From 03b205257187901be0bd9d80460444ea2de2f59c Mon Sep 17 00:00:00 2001 From: Aenimus Date: Fri, 26 Sep 2025 15:26:56 +0100 Subject: [PATCH 1/5] chore: wip --- composition/src/index.ts | 4 +- .../constants/string-constants.ts | 7 + .../src/resolvability-graph/graph-nodes.ts | 9 +- composition/src/resolvability-graph/graph.ts | 328 +++++++++++++----- .../node-resolution-data.ts | 60 ++++ .../node-resolution-data/types/params.ts | 10 + .../src/resolvability-graph/types/params.ts | 40 +++ .../src/resolvability-graph/types/types.ts | 16 + composition/src/resolvability-graph/utils.ts | 29 +- .../v1/normalization/normalization-factory.ts | 2 +- 10 files changed, 385 insertions(+), 120 deletions(-) create mode 100644 composition/src/resolvability-graph/constants/string-constants.ts create mode 100644 composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts create mode 100644 composition/src/resolvability-graph/node-resolution-data/types/params.ts create mode 100644 composition/src/resolvability-graph/types/params.ts create mode 100644 composition/src/resolvability-graph/types/types.ts diff --git a/composition/src/index.ts b/composition/src/index.ts index 74dc5dc703..57b4220fac 100644 --- a/composition/src/index.ts +++ b/composition/src/index.ts @@ -8,6 +8,8 @@ export * from './normalization/normalization'; export * from './normalization/types'; export * from './resolvability-graph/graph'; export * from './resolvability-graph/graph-nodes'; +export * from './resolvability-graph/node-resolution-data/node-resolution-data'; +export * from './resolvability-graph/node-resolution-data/types/params'; export * from './resolvability-graph/utils'; export * from './router-compatibility-version/router-compatibility-version'; export * from './router-configuration/types'; @@ -36,4 +38,4 @@ export * from './v1/subgraph/subgraph'; export * from './v1/utils/constants'; export * from './v1/utils/utils'; export * from './v1/utils/string-constants'; -export * from './v1/warnings/warnings'; +export * from './v1/warnings/warnings'; \ No newline at end of file diff --git a/composition/src/resolvability-graph/constants/string-constants.ts b/composition/src/resolvability-graph/constants/string-constants.ts new file mode 100644 index 0000000000..2b7e63ddd4 --- /dev/null +++ b/composition/src/resolvability-graph/constants/string-constants.ts @@ -0,0 +1,7 @@ +export const MUTATION = 'Mutation'; +export const QUERY = 'Query'; +export const SUBSCRIPTION = 'Subscription'; + +export const NOT_APPLICABLE = 'N/A'; + +export const ROOT_TYPE_NAMES = new Set([MUTATION, QUERY, SUBSCRIPTION]); \ No newline at end of file diff --git a/composition/src/resolvability-graph/graph-nodes.ts b/composition/src/resolvability-graph/graph-nodes.ts index fbe7b8bcfa..368a10aa83 100644 --- a/composition/src/resolvability-graph/graph-nodes.ts +++ b/composition/src/resolvability-graph/graph-nodes.ts @@ -1,5 +1,6 @@ import { add, getEntriesNotInHashSet, getValueOrDefault } from '../utils/utils'; import { GraphFieldData } from '../utils/types'; +import { SubgraphName, TypeName } from './types/types'; export class Edge { edgeName: string; @@ -23,10 +24,10 @@ export type GraphNodeOptions = { }; export class GraphNode { - fieldDataByFieldName = new Map(); + fieldDataByName = new Map(); headToTailEdges = new Map(); entityEdges: Array = []; - nodeName: string; + nodeName: `${SubgraphName}.${TypeName}`; hasEntitySiblings = false; isAbstract: boolean; isInaccessible = false; @@ -48,7 +49,7 @@ export class GraphNode { if (this.isAbstract) { return; } - const inaccessibleFieldNames = getEntriesNotInHashSet(this.headToTailEdges.keys(), this.fieldDataByFieldName); + const inaccessibleFieldNames = getEntriesNotInHashSet(this.headToTailEdges.keys(), this.fieldDataByName); for (const fieldName of inaccessibleFieldNames) { const headToTailEdge = this.headToTailEdges.get(fieldName); if (!headToTailEdge) { @@ -76,7 +77,7 @@ export class GraphNode { } export class RootNode { - fieldDataByFieldName = new Map(); + fieldDataByName = new Map(); headToShareableTailEdges = new Map>(); // It is used isAbstract = false; diff --git a/composition/src/resolvability-graph/graph.ts b/composition/src/resolvability-graph/graph.ts index 70ba21b927..fa431bf7cb 100644 --- a/composition/src/resolvability-graph/graph.ts +++ b/composition/src/resolvability-graph/graph.ts @@ -4,35 +4,47 @@ import { EntityResolvabilityResult, generateResolvabilityErrors, newRootFieldData, - NodeResolutionData, RootFieldData, } from './utils'; -import { NOT_APPLICABLE, ROOT_TYPE_NAMES } from '../utils/string-constants'; import { GraphFieldData, RootTypeName } from '../utils/types'; import { add, getOrThrowError, getValueOrDefault } from '../utils/utils'; +import type { FieldPath, NodeName, RootCoords, TypeName, ValidateNodeResult } from './types/types'; +import { + ValidateEntityDescendantEdgeParams, + ValidateEntityDescendantNodeParams, + VisitEdgeParams, + VisitNodeParams, + WalkerParams +} from './types/params'; +import { NodeResolutionData } from './node-resolution-data/node-resolution-data'; +import { NOT_APPLICABLE, ROOT_TYPE_NAMES } from './constants/string-constants'; export class Graph { edgeId = -1; entityDataNodes = new Map(); - entityNodeNamesBySharedFieldPath = new Map>(); - nodeByNodeName = new Map(); - nodesByTypeName = new Map>(); - rootNodeByRootTypeName = new Map(); + entityNodeNamesBySharedFieldPath = new Map>(); + nodeByNodeName = new Map(); + nodesByTypeName = new Map>(); + rootNodeByTypeName = new Map(); subgraphName = NOT_APPLICABLE; resolvableFieldNamesByRelativeFieldPathByEntityNodeName = new Map>(); - nodeResolutionDataByFieldPath = new Map(); - unresolvableFieldPaths = new Set(); - failureResultByEntityNodeName = new Map(); + nodeResolutionDataByFieldPath = new Map(); + nodeResolutionDataByNodeName = new Map(); + // Consolidate shared root fields. + nodeResolutionDataByTypeNameAndRootCoords = new Map>(); + nodeResolutionDataByTypeNameByEntityNodeName = new Map>(); + unresolvableFieldPaths = new Set(); + failureResultByEntityNodeName = new Map(); walkerIndex = -1; constructor() {} getRootNode(typeName: RootTypeName): RootNode { - return getValueOrDefault(this.rootNodeByRootTypeName, typeName, () => new RootNode(typeName)); + return getValueOrDefault(this.rootNodeByTypeName, typeName, () => new RootNode(typeName)); } addOrUpdateNode(typeName: string, options?: GraphNodeOptions): GraphNode { - const nodeName = `${this.subgraphName}.${typeName}`; + const nodeName: NodeName = `${this.subgraphName}.${typeName}`; const node = this.nodeByNodeName.get(nodeName); if (node) { node.isAbstract ||= !!options?.isAbstract; @@ -93,7 +105,7 @@ export class Graph { if (ROOT_TYPE_NAMES.has(typeName)) { const rootNode = this.getRootNode(typeName as RootTypeName); rootNode.removeInaccessibleEdges(fieldDataByFieldName); - rootNode.fieldDataByFieldName = fieldDataByFieldName; + rootNode.fieldDataByName = fieldDataByFieldName; return; } const nodes = this.nodesByTypeName.get(typeName); @@ -101,7 +113,7 @@ export class Graph { return; } for (const node of nodes) { - node.fieldDataByFieldName = fieldDataByFieldName; + node.fieldDataByName = fieldDataByFieldName; node.handleInaccessibleEdges(); node.isLeaf = false; if (!entityDataNode) { @@ -110,7 +122,7 @@ export class Graph { node.hasEntitySiblings = true; for (const fieldSet of node.satisfiedFieldSets) { const subgraphNames = entityDataNode.targetSubgraphNamesByFieldSet.get(fieldSet); - for (const subgraphName of subgraphNames || []) { + for (const subgraphName of subgraphNames ?? []) { // A subgraph should not jump to itself if (subgraphName === node.subgraphName) { continue; @@ -129,10 +141,10 @@ export class Graph { } validateEntities( - entityNodeNamesBySharedFieldPath: Map>, + entityNodeNamesBySharedFieldPath: Map>, rootFieldData: RootFieldData, ): EntityResolvabilityResult { - const nestedEntityNodeNamesBySharedFieldPathByParentNodeName = new Map>>(); + const nestedEntityNodeNamesBySharedFieldPathByParentNodeName = new Map>>(); for (const [sharedFieldPath, entityNodeNames] of entityNodeNamesBySharedFieldPath) { const isFieldShared = entityNodeNames.size > 1; let failureResult: EntityResolvabilityFailure | undefined; @@ -143,18 +155,18 @@ export class Graph { * paths are assessed collectively, rather than by a single instance of the shared fields * */ const sharedResolvableFieldNamesByRelativeFieldPath = isFieldShared - ? new Map() + ? new Map() : undefined; /* * 2. unresolvableSharedFieldPaths is used to determine whether there are still unresolvable paths even after * all shared fields have been analysed. * */ - const unresolvableSharedFieldPaths = new Set(); + const unresolvableSharedFieldPaths = new Set(); /* * 3. nestedEntityNodeNamesBySharedFieldPath should be a reference to the same set, to ensure nested shared fields * are analysed as shared fields when moving deeper. * */ - const sharedNestedEntityNodeNamesBySharedFieldPath = new Map>(); + const sharedNestedEntityNodeNamesBySharedFieldPath = new Map>(); for (const entityNodeName of entityNodeNames) { const entityNode = this.nodeByNodeName.get(entityNodeName); if (!entityNode) { @@ -178,11 +190,13 @@ export class Graph { const nestedEntityNodeNamesBySharedFieldPath = getValueOrDefault( nestedEntityNodeNamesBySharedFieldPathByParentNodeName, entityNodeName, - () => (isFieldShared ? sharedNestedEntityNodeNamesBySharedFieldPath : new Map>()), + () => (isFieldShared ? sharedNestedEntityNodeNamesBySharedFieldPath : new Map>()), ); const walker = new Walker({ interSubgraphNodes, entityNodeNamesBySharedFieldPath: nestedEntityNodeNamesBySharedFieldPath, + nodeResolutionDataByNodeName: this.nodeResolutionDataByNodeName, + nodeResolutionDataByTypeNameByEntityNodeName: this.nodeResolutionDataByTypeNameByEntityNodeName, originNode: entityNode, resolvableFieldNamesByRelativeFieldPathByEntityNodeName: this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName, @@ -253,7 +267,7 @@ export class Graph { validate(): Array { const errors: Array = []; - for (const rootNode of this.rootNodeByRootTypeName.values()) { + for (const rootNode of this.rootNodeByTypeName.values()) { shareableRootFieldLoop: for (const [ rootFieldName, shareableRootFieldEdges, @@ -263,9 +277,13 @@ export class Graph { continue shareableRootFieldLoop; } this.walkerIndex += 1; - this.visitEdge(rootFieldEdge, `${rootNode.typeName.toLowerCase()}`); + this.visitEdge({ + edge: rootFieldEdge, + fieldPath: rootNode.typeName.toLowerCase(), + rootCoords: `${rootNode.typeName}.${rootFieldName}`, + }); } - const fieldData = getOrThrowError(rootNode.fieldDataByFieldName, rootFieldName, 'fieldDataByFieldName'); + const fieldData = getOrThrowError(rootNode.fieldDataByName, rootFieldName, 'fieldDataByName'); const rootFieldData = newRootFieldData(rootNode.typeName, rootFieldName, fieldData.subgraphNames); if (this.unresolvableFieldPaths.size > 0) { generateResolvabilityErrors({ @@ -284,62 +302,134 @@ export class Graph { if (errors.length > 0) { return errors; } - this.entityNodeNamesBySharedFieldPath = new Map>(); + this.entityNodeNamesBySharedFieldPath = new Map>(); } } return []; } // Returns true if the edge is visited and false otherwise (e.g., inaccessible) - visitEdge(edge: Edge, fieldPath: string): boolean { + visitEdge({ edge, fieldPath, rootCoords }: VisitEdgeParams): ValidateNodeResult { if (edge.isInaccessible || edge.node.isInaccessible) { - return false; + return { visited: false, areDescendentsResolved: true }; } - if (!add(edge.visitedIndices, this.walkerIndex) || edge.node.isLeaf) { - return true; + if (edge.node.isLeaf) { + return { visited: true, areDescendentsResolved: true }; } - if (edge.node.isAbstract) { - this.validateAbstractNode(edge.node, `${fieldPath}.${edge.edgeName}`); - } else { - this.validateConcreteNode(edge.node, `${fieldPath}.${edge.edgeName}`); + if (!add(edge.visitedIndices, this.walkerIndex)) { + return { visited: false, areDescendentsResolved: false }; } - return true; + if (edge.node.isAbstract) { + return this.validateAbstractNode({ + node: edge.node, + fieldPath: `${fieldPath}.${edge.edgeName}`, + rootCoords, + }); + } + return this.validateConcreteNode({ + node: edge.node, + fieldPath: `${fieldPath}.${edge.edgeName}`, + rootCoords, + }); } - validateConcreteNode(node: GraphNode, fieldPath: string) { + validateConcreteNode({ node, fieldPath, rootCoords }: VisitNodeParams): ValidateNodeResult { if (node.headToTailEdges.size < 1) { - return; + node.isLeaf = true; + return { visited: true, areDescendentsResolved: true }; } if (node.hasEntitySiblings) { - getValueOrDefault(this.entityNodeNamesBySharedFieldPath, fieldPath, () => new Set()).add(node.nodeName); - return; + getValueOrDefault(this.entityNodeNamesBySharedFieldPath, fieldPath, () => new Set()).add(node.nodeName); + // return { visited: true, areDescendentsResolved: false }; } - const resolvedFieldNames = getValueOrDefault( + const dataByRootCoords = getValueOrDefault( + this.nodeResolutionDataByTypeNameAndRootCoords, + node.typeName, + () => new Map, + ); + const rootCoordsData = getValueOrDefault( + dataByRootCoords, + rootCoords, + () => new NodeResolutionData({ + fieldDataByName: node.fieldDataByName, + typeName: node.typeName, + }), + ); + const existingData = this.nodeResolutionDataByNodeName.get(node.nodeName); + if (existingData) { + return { + visited: true, + areDescendentsResolved: existingData.areDescendentsResolved(), + }; + } + if (rootCoordsData.isResolved && rootCoordsData.areDescendentsResolved()) { + return { + visited: true, + areDescendentsResolved: true, + }; + } + const nodeNameData = getValueOrDefault( + this.nodeResolutionDataByNodeName, + node.nodeName, + () => new NodeResolutionData({ + fieldDataByName: node.fieldDataByName, + typeName: node.typeName, + }), + ); + const fieldPathData = getValueOrDefault( this.nodeResolutionDataByFieldPath, fieldPath, - () => new NodeResolutionData(node.typeName, node.fieldDataByFieldName), + () => new NodeResolutionData({ + fieldDataByName: node.fieldDataByName, + typeName: node.typeName, + }), ); for (const [fieldName, edge] of node.headToTailEdges) { - // Returns true if the edge was visited - if (this.visitEdge(edge, fieldPath)) { - resolvedFieldNames.add(fieldName); + const { visited, areDescendentsResolved } = this.visitEdge({ edge, fieldPath, rootCoords }); + if (visited) { + fieldPathData.add(fieldName); + rootCoordsData.add(fieldName); + nodeNameData.add(fieldName); } + if (!areDescendentsResolved) { + continue; + } + fieldPathData.resolvedDescendentNames.add(fieldName); + nodeNameData.resolvedDescendentNames.add(fieldName); + rootCoordsData.resolvedDescendentNames.add(fieldName); } - if (resolvedFieldNames.isResolved) { + if (rootCoordsData.isResolved || nodeNameData.isResolved) { + this.nodeResolutionDataByFieldPath.delete(fieldPath); this.unresolvableFieldPaths.delete(fieldPath); } else { this.unresolvableFieldPaths.add(fieldPath); } + return { + visited: true, + areDescendentsResolved: + rootCoordsData.areDescendentsResolved() || + nodeNameData.areDescendentsResolved(), + }; } - validateAbstractNode(node: GraphNode, fieldPath: string) { + validateAbstractNode({ node, fieldPath, rootCoords }: VisitNodeParams): ValidateNodeResult { if (node.headToTailEdges.size < 1) { - return; + return { visited: true, areDescendentsResolved: true }; } + let resolvedDescendents = 0; for (const edge of node.headToTailEdges.values()) { - this.visitEdge(edge, fieldPath); + /* Propagate any one of the abstract path failures. + * Don't set value in-line so or it will short-circuit. + * */ + if (this.visitEdge({ edge, fieldPath, rootCoords }).areDescendentsResolved) { + resolvedDescendents += 1; + } } + return { + visited: true, + areDescendentsResolved: resolvedDescendents === node.headToTailEdges.size, + }; } generateEntityResolvabilityErrors( @@ -368,19 +458,11 @@ export class Graph { } } -type WalkerOptions = { - entityNodeNamesBySharedFieldPath: Map>; - interSubgraphNodes: Array; - originNode: GraphNode; - resolvableFieldNamesByRelativeFieldPathByEntityNodeName: Map>; - unresolvableSharedFieldPaths: Set; - walkerIndex: number; - sharedResolvableFieldNamesByRelativeFieldPath?: Map; -}; - class Walker { entityNodeNamesBySharedFieldPath: Map>; interSubgraphNodes: Array; + nodeResolutionDataByTypeNameByEntityNodeName: Map>; + nodeResolutionDataByNodeName: Map; originNode: GraphNode; resolvableFieldNamesByRelativeFieldPath: Map; resolvableFieldNamesByRelativeFieldPathByEntityNodeName: Map>; @@ -392,14 +474,18 @@ class Walker { constructor({ entityNodeNamesBySharedFieldPath, interSubgraphNodes, + nodeResolutionDataByTypeNameByEntityNodeName, + nodeResolutionDataByNodeName, originNode, resolvableFieldNamesByRelativeFieldPathByEntityNodeName, unresolvableSharedFieldPaths, walkerIndex, sharedResolvableFieldNamesByRelativeFieldPath, - }: WalkerOptions) { + }: WalkerParams) { this.entityNodeNamesBySharedFieldPath = entityNodeNamesBySharedFieldPath; this.interSubgraphNodes = interSubgraphNodes; + this.nodeResolutionDataByTypeNameByEntityNodeName = nodeResolutionDataByTypeNameByEntityNodeName; + this.nodeResolutionDataByNodeName = nodeResolutionDataByNodeName; this.originNode = originNode; this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName = resolvableFieldNamesByRelativeFieldPathByEntityNodeName; @@ -413,88 +499,152 @@ class Walker { this.sharedResolvableFieldNamesByRelativeFieldPath = sharedResolvableFieldNamesByRelativeFieldPath; } + getNodeResolutionData({ fieldDataByName, nodeName, typeName }: GraphNode): NodeResolutionData { + const nodeResolutionData = this.nodeResolutionDataByNodeName.get(nodeName); + if (nodeResolutionData) { + return nodeResolutionData.copy(); + } + return new NodeResolutionData({ fieldDataByName, typeName }); + } + visitEntityNode(node: GraphNode) { - this.validateEntityRelatedConcreteNode(node, ''); + const nodeResolutionDataByTypeName = getValueOrDefault( + this.nodeResolutionDataByTypeNameByEntityNodeName, + node.nodeName, + () => new Map(), + ); + this.validateEntityDescendantConcreteNode({ node, nodeResolutionDataByTypeName, fieldPath: '' }); const accessibleEntityNodeNames = node.getAllAccessibleEntityNodeNames(); for (const sibling of this.interSubgraphNodes) { - if (this.unresolvableFieldPaths.size < 0) { + if (this.unresolvableFieldPaths.size < 1) { return; } if (!accessibleEntityNodeNames.has(sibling.nodeName)) { continue; } - this.validateEntityRelatedConcreteNode(sibling, ''); + this.validateEntityDescendantConcreteNode({ + node: sibling, + nodeResolutionDataByTypeName, + fieldPath: '', + }); } } // Returns true if the edge is visited and false if it's inaccessible - visitEntityRelatedEdge(edge: Edge, fieldPath: string) { + visitEntityDescendentEdge({ edge, fieldPath, nodeResolutionDataByTypeName }: ValidateEntityDescendantEdgeParams): ValidateNodeResult { if (edge.isInaccessible || edge.node.isInaccessible) { - return false; + return { visited: false, areDescendentsResolved: false }; + } + if (edge.node.isLeaf) { + return { visited: true, areDescendentsResolved: true }; } - if (!add(edge.visitedIndices, this.walkerIndex) || edge.node.isLeaf) { - return true; + if (!add(edge.visitedIndices, this.walkerIndex)) { + return { visited: false, areDescendentsResolved: false }; } if (edge.node.hasEntitySiblings) { getValueOrDefault( this.entityNodeNamesBySharedFieldPath, `${fieldPath}.${edge.edgeName}`, - () => new Set(), + () => new Set(), ).add(edge.node.nodeName); - return true; + return { visited: true, areDescendentsResolved: false }; } if (edge.node.isAbstract) { - this.validateEntityRelatedAbstractNode(edge.node, `${fieldPath}.${edge.edgeName}`); - } else { - this.validateEntityRelatedConcreteNode(edge.node, `${fieldPath}.${edge.edgeName}`); - } - return true; + return this.validateEntityDescendantAbstractNode({ + fieldPath: `${fieldPath}.${edge.edgeName}`, + node: edge.node, + nodeResolutionDataByTypeName, + }); + } + return this.validateEntityDescendantConcreteNode({ + fieldPath: `${fieldPath}.${edge.edgeName}`, + node: edge.node, + nodeResolutionDataByTypeName + }); } - validateEntityRelatedConcreteNode(node: GraphNode, fieldPath: string) { + validateEntityDescendantConcreteNode({ node, nodeResolutionDataByTypeName, fieldPath }: ValidateEntityDescendantNodeParams): ValidateNodeResult { if (node.headToTailEdges.size < 1) { - return; + return { visited: true, areDescendentsResolved: true }; + } + const nodeResolutionData = getValueOrDefault( + nodeResolutionDataByTypeName, + node.typeName, + () => this.getNodeResolutionData(node), + ); + if (nodeResolutionData.isResolved) { + this.unresolvableFieldPaths.delete(fieldPath); + if (nodeResolutionData.areDescendentsResolved()) { + return { visited: true, areDescendentsResolved: true }; + } } const originResolvedFieldNames = getValueOrDefault( this.resolvableFieldNamesByRelativeFieldPath, fieldPath, - () => new NodeResolutionData(node.typeName, node.fieldDataByFieldName), + () => this.getNodeResolutionData(node), ); const sharedResolvedFieldNames = this.sharedResolvableFieldNamesByRelativeFieldPath ? getValueOrDefault( this.sharedResolvableFieldNamesByRelativeFieldPath, fieldPath, - () => new NodeResolutionData(node.typeName, node.fieldDataByFieldName), + () => this.getNodeResolutionData(node), ) : undefined; for (const [fieldName, edge] of node.headToTailEdges) { - // Returns true if the edge is visited - if (this.visitEntityRelatedEdge(edge, fieldPath)) { + const { visited, areDescendentsResolved } = this.visitEntityDescendentEdge({ edge, nodeResolutionDataByTypeName, fieldPath }); + if (visited) { + nodeResolutionData.add(fieldName); originResolvedFieldNames.add(fieldName); sharedResolvedFieldNames?.add(fieldName); } + if (!areDescendentsResolved) { + continue; + } + nodeResolutionData.resolvedDescendentNames.add(fieldName); + sharedResolvedFieldNames?.resolvedDescendentNames.add(fieldName); + // Returns true if the edge is visited + // if (this.visitEntityDescendentEdge({ edge, nodeResolutionDataByTypeName, fieldPath })) { + // originResolvedFieldNames.add(fieldName); + // sharedResolvedFieldNames?.add(fieldName); + // } } - if (originResolvedFieldNames.isResolved) { + if (nodeResolutionData.isResolved || sharedResolvedFieldNames?.isResolved) { this.unresolvableFieldPaths.delete(fieldPath); } else { this.unresolvableFieldPaths.add(fieldPath); } - if (!sharedResolvedFieldNames) { - return; - } - if (sharedResolvedFieldNames.isResolved) { - this.unresolvableSharedFieldPaths.delete(fieldPath); - } else { - this.unresolvableSharedFieldPaths.add(fieldPath); - } + // if (originResolvedFieldNames.isResolved) { + // this.unresolvableFieldPaths.delete(fieldPath); + // } else { + // this.unresolvableFieldPaths.add(fieldPath); + // } + // if (!sharedResolvedFieldNames) { + // return; + // } + // if (sharedResolvedFieldNames.isResolved) { + // this.unresolvableSharedFieldPaths.delete(fieldPath); + // } else { + // this.unresolvableSharedFieldPaths.add(fieldPath); + // } + return { + visited: true, + areDescendentsResolved: nodeResolutionData.areDescendentsResolved(), + }; } - validateEntityRelatedAbstractNode(node: GraphNode, fieldPath: string) { + validateEntityDescendantAbstractNode({ node, nodeResolutionDataByTypeName, fieldPath }: ValidateEntityDescendantNodeParams): ValidateNodeResult { if (node.headToTailEdges.size < 1) { - return; + return { visited: true, areDescendentsResolved: true }; } + let resolvedDescendents = 0; for (const edge of node.headToTailEdges.values()) { - this.visitEntityRelatedEdge(edge, fieldPath); + /* Propagate any one of the abstract path failures. + * Don't set value in-line so or it will short-circuit. + * */ + if (this.visitEntityDescendentEdge({ edge, nodeResolutionDataByTypeName, fieldPath }).areDescendentsResolved) { + resolvedDescendents += 1; + } } + return { visited: true, areDescendentsResolved: resolvedDescendents === node.headToTailEdges.size }; } } diff --git a/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts b/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts new file mode 100644 index 0000000000..79f8b8d3ff --- /dev/null +++ b/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts @@ -0,0 +1,60 @@ +import { GraphFieldData } from '../../utils/types'; +import { getEntriesNotInHashSet } from '../../utils/utils'; +import { unexpectedEdgeFatalError } from '../../errors/errors'; +import { FieldName, SubgraphName } from '../types/types'; +import { NodeResolutionDataParams } from './types/params'; + +export class NodeResolutionData { + fieldDataByName: Map; + isResolved: boolean + resolvedDescendentNames: Set; + resolvedFieldNames: Set; + typeName: string; + + constructor({ + fieldDataByName, + isResolved = false, + resolvedDescendentNames, + resolvedFieldNames, + typeName, + }: NodeResolutionDataParams) { + this.fieldDataByName = fieldDataByName; + this.isResolved = isResolved; + this.resolvedDescendentNames = new Set(resolvedDescendentNames); + this.resolvedFieldNames = new Set(resolvedFieldNames); + this.typeName = typeName; + } + + add(fieldName: FieldName): boolean { + this.resolvedFieldNames.add(fieldName); + if (this.resolvedFieldNames.size > this.fieldDataByName.size) { + const unexpectedEntries = getEntriesNotInHashSet(this.resolvedFieldNames, this.fieldDataByName); + throw unexpectedEdgeFatalError(this.typeName, unexpectedEntries); + } + this.isResolved = this.resolvedFieldNames.size === this.fieldDataByName.size; + return this.isResolved; + } + + copy(): NodeResolutionData { + const fieldDataByName = new Map(); + for (const [fieldName, data] of this.fieldDataByName) { + fieldDataByName.set(fieldName, { + isLeaf: data.isLeaf, + name: data.name, + namedTypeName: data.namedTypeName, + subgraphNames: new Set(data.subgraphNames), + }); + } + return new NodeResolutionData({ + fieldDataByName: this.fieldDataByName, + isResolved: this.isResolved, + resolvedDescendentNames: this.resolvedDescendentNames, + resolvedFieldNames: this.resolvedFieldNames, + typeName: this.typeName, + }); + } + + areDescendentsResolved(): boolean { + return this.fieldDataByName.size === this.resolvedDescendentNames.size; + } +} \ No newline at end of file diff --git a/composition/src/resolvability-graph/node-resolution-data/types/params.ts b/composition/src/resolvability-graph/node-resolution-data/types/params.ts new file mode 100644 index 0000000000..7a58dffb90 --- /dev/null +++ b/composition/src/resolvability-graph/node-resolution-data/types/params.ts @@ -0,0 +1,10 @@ +import { FieldName, TypeName } from '../../types/types'; +import { GraphFieldData } from '../../../utils/types'; + +export type NodeResolutionDataParams = { + fieldDataByName: Map; + typeName: TypeName; + isResolved?: boolean; + resolvedDescendentNames?: Set; + resolvedFieldNames?: Set; +}; \ No newline at end of file diff --git a/composition/src/resolvability-graph/types/params.ts b/composition/src/resolvability-graph/types/params.ts new file mode 100644 index 0000000000..cde70b8f34 --- /dev/null +++ b/composition/src/resolvability-graph/types/params.ts @@ -0,0 +1,40 @@ +import { Edge, GraphNode } from '../graph-nodes'; +import type { FieldPath, NodeName, RootCoords, TypeName } from './types'; + +import { NodeResolutionData } from '../node-resolution-data/node-resolution-data'; + +export type VisitEdgeParams = { + edge: Edge; + fieldPath: FieldPath; + rootCoords: RootCoords; +}; + +export type VisitNodeParams = { + node: GraphNode; + fieldPath: FieldPath; + rootCoords: RootCoords; +}; + +export type ValidateEntityDescendantEdgeParams = { + edge: Edge; + fieldPath: FieldPath; + nodeResolutionDataByTypeName: Map; +} + +export type ValidateEntityDescendantNodeParams = { + fieldPath: FieldPath; + node: GraphNode; + nodeResolutionDataByTypeName: Map; +} + +export type WalkerParams = { + entityNodeNamesBySharedFieldPath: Map>; + interSubgraphNodes: Array; + nodeResolutionDataByNodeName: Map; + nodeResolutionDataByTypeNameByEntityNodeName: Map>; + originNode: GraphNode; + resolvableFieldNamesByRelativeFieldPathByEntityNodeName: Map>; + unresolvableSharedFieldPaths: Set; + walkerIndex: number; + sharedResolvableFieldNamesByRelativeFieldPath?: Map; +}; \ No newline at end of file diff --git a/composition/src/resolvability-graph/types/types.ts b/composition/src/resolvability-graph/types/types.ts new file mode 100644 index 0000000000..3eaa0d2c84 --- /dev/null +++ b/composition/src/resolvability-graph/types/types.ts @@ -0,0 +1,16 @@ +export type ValidateNodeResult = { + visited: boolean; + areDescendentsResolved: boolean; +}; + +export type FieldPath = string; + +export type FieldName = string; + +export type NodeName = `${SubgraphName}.${TypeName}`; + +export type RootCoords = `${TypeName}.${FieldName}`; + +export type SubgraphName = string; + +export type TypeName = string; \ No newline at end of file diff --git a/composition/src/resolvability-graph/utils.ts b/composition/src/resolvability-graph/utils.ts index 5fc4d8c693..431b154d16 100644 --- a/composition/src/resolvability-graph/utils.ts +++ b/composition/src/resolvability-graph/utils.ts @@ -1,29 +1,8 @@ -import { unexpectedEdgeFatalError, unresolvablePathError } from '../errors/errors'; +import { unresolvablePathError } from '../errors/errors'; import { LITERAL_SPACE, QUOTATION_JOIN } from '../utils/string-constants'; -import { getEntriesNotInHashSet, getOrThrowError } from '../utils/utils'; +import { getOrThrowError } from '../utils/utils'; import { GraphFieldData } from '../utils/types'; - -export class NodeResolutionData { - fieldDataByFieldName: Map; - isResolved = false; - resolvedFieldNames = new Set(); - typeName: string; - - constructor(typeName: string, fieldDataByFieldName: Map) { - this.fieldDataByFieldName = fieldDataByFieldName; - this.typeName = typeName; - } - - add(fieldName: string): boolean { - this.resolvedFieldNames.add(fieldName); - if (this.resolvedFieldNames.size > this.fieldDataByFieldName.size) { - const unexpectedEntries = getEntriesNotInHashSet(this.resolvedFieldNames, this.fieldDataByFieldName); - throw unexpectedEdgeFatalError(this.typeName, unexpectedEntries); - } - this.isResolved = this.resolvedFieldNames.size === this.fieldDataByFieldName.size; - return this.isResolved; - } -} +import { NodeResolutionData } from './node-resolution-data/node-resolution-data'; export type EntityResolvabilitySuccess = { success: true; @@ -210,7 +189,7 @@ export function generateResolvabilityErrors({ 'nodeResolutionDataByFieldPath', ); const fieldDataByFieldName = new Map(); - for (const [fieldName, fieldData] of nodeResolutionData.fieldDataByFieldName) { + for (const [fieldName, fieldData] of nodeResolutionData.fieldDataByName) { if (nodeResolutionData.resolvedFieldNames.has(fieldName)) { continue; } diff --git a/composition/src/v1/normalization/normalization-factory.ts b/composition/src/v1/normalization/normalization-factory.ts index 35009a3fad..578b4fbfb1 100644 --- a/composition/src/v1/normalization/normalization-factory.ts +++ b/composition/src/v1/normalization/normalization-factory.ts @@ -3692,7 +3692,7 @@ export class NormalizationFactory { } // There will be a run time error if a field can return an Interface without any Object implementations. const implementationTypeNames = this.concreteTypeNamesByAbstractTypeName.get(referencedTypeName); - if (!implementationTypeNames || implementationTypeNames.size < 0) { + if (!implementationTypeNames || implementationTypeNames.size < 1) { // Temporarily propagate as a warning until @inaccessible, entity interfaces and other such considerations are handled this.warnings.push(unimplementedInterfaceOutputTypeWarning(this.subgraphName, referencedTypeName)); } From 3f71abf11d93b7bca06a493d7873d666ae50613d Mon Sep 17 00:00:00 2001 From: Aenimus Date: Mon, 29 Sep 2025 23:28:51 +0100 Subject: [PATCH 2/5] chore: wip --- composition/src/errors/errors.ts | 2 +- composition/src/index.ts | 5 +- .../constants/string-constants.ts | 3 +- .../src/resolvability-graph/graph-nodes.ts | 6 +- composition/src/resolvability-graph/graph.ts | 687 +++++------------- .../node-resolution-data.ts | 46 +- .../node-resolution-data/types/params.ts | 2 +- .../src/resolvability-graph/types/params.ts | 44 +- .../src/resolvability-graph/types/types.ts | 37 +- .../resolvability-graph/utils/types/params.ts | 30 + .../resolvability-graph/utils/types/types.ts | 7 + .../resolvability-graph/{ => utils}/utils.ts | 128 +++- .../walker/entity-walker/entity-walker.ts | 235 ++++++ .../walker/entity-walker/types/params.ts | 47 ++ .../root-field-walkers/root-field-walker.ts | 271 +++++++ .../walker/root-field-walkers/types/params.ts | 45 ++ composition/src/utils/utils.ts | 4 +- .../src/v1/federation/federation-factory.ts | 6 +- 18 files changed, 992 insertions(+), 613 deletions(-) create mode 100644 composition/src/resolvability-graph/utils/types/params.ts create mode 100644 composition/src/resolvability-graph/utils/types/types.ts rename composition/src/resolvability-graph/{ => utils}/utils.ts (62%) create mode 100644 composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts create mode 100644 composition/src/resolvability-graph/walker/entity-walker/types/params.ts create mode 100644 composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts create mode 100644 composition/src/resolvability-graph/walker/root-field-walkers/types/params.ts diff --git a/composition/src/errors/errors.ts b/composition/src/errors/errors.ts index 1ab937dfee..3475f32537 100644 --- a/composition/src/errors/errors.ts +++ b/composition/src/errors/errors.ts @@ -13,7 +13,7 @@ import { SemanticNonNullLevelsIndexOutOfBoundsErrorParams, SemanticNonNullLevelsNonNullErrorParams, } from './types'; -import { UnresolvableFieldData } from '../resolvability-graph/utils'; +import { UnresolvableFieldData } from '../resolvability-graph/utils/utils'; import { AND_UPPER, ARGUMENT, diff --git a/composition/src/index.ts b/composition/src/index.ts index 57b4220fac..1f4c3d0793 100644 --- a/composition/src/index.ts +++ b/composition/src/index.ts @@ -10,7 +10,8 @@ export * from './resolvability-graph/graph'; export * from './resolvability-graph/graph-nodes'; export * from './resolvability-graph/node-resolution-data/node-resolution-data'; export * from './resolvability-graph/node-resolution-data/types/params'; -export * from './resolvability-graph/utils'; +export * from './resolvability-graph/utils/types/types'; +export * from './resolvability-graph/utils/utils'; export * from './router-compatibility-version/router-compatibility-version'; export * from './router-configuration/types'; export * from './router-configuration/utils'; @@ -38,4 +39,4 @@ export * from './v1/subgraph/subgraph'; export * from './v1/utils/constants'; export * from './v1/utils/utils'; export * from './v1/utils/string-constants'; -export * from './v1/warnings/warnings'; \ No newline at end of file +export * from './v1/warnings/warnings'; diff --git a/composition/src/resolvability-graph/constants/string-constants.ts b/composition/src/resolvability-graph/constants/string-constants.ts index 2b7e63ddd4..6a52c05a29 100644 --- a/composition/src/resolvability-graph/constants/string-constants.ts +++ b/composition/src/resolvability-graph/constants/string-constants.ts @@ -2,6 +2,7 @@ export const MUTATION = 'Mutation'; export const QUERY = 'Query'; export const SUBSCRIPTION = 'Subscription'; +export const LITERAL_PERIOD = '.'; export const NOT_APPLICABLE = 'N/A'; -export const ROOT_TYPE_NAMES = new Set([MUTATION, QUERY, SUBSCRIPTION]); \ No newline at end of file +export const ROOT_TYPE_NAMES = new Set([MUTATION, QUERY, SUBSCRIPTION]); diff --git a/composition/src/resolvability-graph/graph-nodes.ts b/composition/src/resolvability-graph/graph-nodes.ts index 368a10aa83..98dccf63a4 100644 --- a/composition/src/resolvability-graph/graph-nodes.ts +++ b/composition/src/resolvability-graph/graph-nodes.ts @@ -26,7 +26,7 @@ export type GraphNodeOptions = { export class GraphNode { fieldDataByName = new Map(); headToTailEdges = new Map(); - entityEdges: Array = []; + entityEdges = new Array(); nodeName: `${SubgraphName}.${TypeName}`; hasEntitySiblings = false; isAbstract: boolean; @@ -78,7 +78,7 @@ export class GraphNode { export class RootNode { fieldDataByName = new Map(); - headToShareableTailEdges = new Map>(); + headToSharedTailEdges = new Map>(); // It is used isAbstract = false; isRootNode = true; @@ -89,7 +89,7 @@ export class RootNode { } removeInaccessibleEdges(fieldDataByFieldName: Map) { - for (const [fieldName, edges] of this.headToShareableTailEdges) { + for (const [fieldName, edges] of this.headToSharedTailEdges) { if (fieldDataByFieldName.has(fieldName)) { continue; } diff --git a/composition/src/resolvability-graph/graph.ts b/composition/src/resolvability-graph/graph.ts index fa431bf7cb..6c740a7723 100644 --- a/composition/src/resolvability-graph/graph.ts +++ b/composition/src/resolvability-graph/graph.ts @@ -1,40 +1,37 @@ import { Edge, EntityDataNode, GraphNode, GraphNodeOptions, RootNode } from './graph-nodes'; import { EntityResolvabilityFailure, - EntityResolvabilityResult, generateResolvabilityErrors, + generateRootResolvabilityErrors, + getMultipliedRelativeOriginPaths, newRootFieldData, - RootFieldData, -} from './utils'; +} from './utils/utils'; import { GraphFieldData, RootTypeName } from '../utils/types'; -import { add, getOrThrowError, getValueOrDefault } from '../utils/utils'; -import type { FieldPath, NodeName, RootCoords, TypeName, ValidateNodeResult } from './types/types'; -import { - ValidateEntityDescendantEdgeParams, - ValidateEntityDescendantNodeParams, - VisitEdgeParams, - VisitNodeParams, - WalkerParams -} from './types/params'; +import { getFirstEntry, getOrThrowError, getValueOrDefault } from '../utils/utils'; +import { FieldPath, NodeName, SelectionPath, SubgraphName, TypeName, ValidationResult } from './types/types'; +import { VisitEntityParams } from './types/params'; import { NodeResolutionData } from './node-resolution-data/node-resolution-data'; -import { NOT_APPLICABLE, ROOT_TYPE_NAMES } from './constants/string-constants'; +import { LITERAL_PERIOD, NOT_APPLICABLE, ROOT_TYPE_NAMES } from './constants/string-constants'; +import { EntityWalker } from './walker/entity-walker/entity-walker'; +import { RootFieldWalker } from './walker/root-field-walkers/root-field-walker'; +import { EntityResolvabilityErrorsParams } from './utils/types/params'; export class Graph { edgeId = -1; - entityDataNodes = new Map(); + entityDataNodeByTypeName = new Map(); entityNodeNamesBySharedFieldPath = new Map>(); nodeByNodeName = new Map(); nodesByTypeName = new Map>(); + resolvedRootFieldNodeNames = new Set(); rootNodeByTypeName = new Map(); subgraphName = NOT_APPLICABLE; resolvableFieldNamesByRelativeFieldPathByEntityNodeName = new Map>(); nodeResolutionDataByFieldPath = new Map(); - nodeResolutionDataByNodeName = new Map(); - // Consolidate shared root fields. - nodeResolutionDataByTypeNameAndRootCoords = new Map>(); - nodeResolutionDataByTypeNameByEntityNodeName = new Map>(); - unresolvableFieldPaths = new Set(); + resDataByNodeName = new Map(); + resDataByRelativePathByEntity = new Map>(); failureResultByEntityNodeName = new Map(); + unresolvableFieldPaths = new Set(); + visitedEntitiesByOriginEntity = new Map>(); walkerIndex = -1; constructor() {} @@ -62,7 +59,7 @@ export class Graph { addEdge(headNode: GraphNode | RootNode, tailNode: GraphNode, fieldName: string, isAbstractEdge = false): Edge { if (headNode.isRootNode) { const edge = new Edge(this.getNextEdgeId(), tailNode, fieldName); - getValueOrDefault((headNode as RootNode).headToShareableTailEdges, fieldName, () => []).push(edge); + getValueOrDefault((headNode as RootNode).headToSharedTailEdges, fieldName, () => []).push(edge); return edge; } const headGraphNode = headNode as GraphNode; @@ -77,12 +74,12 @@ export class Graph { } addEntityDataNode(typeName: string): EntityDataNode { - const node = this.entityDataNodes.get(typeName); + const node = this.entityDataNodeByTypeName.get(typeName); if (node) { return node; } const newNode = new EntityDataNode(typeName); - this.entityDataNodes.set(typeName, newNode); + this.entityDataNodeByTypeName.set(typeName, newNode); return newNode; } @@ -90,6 +87,10 @@ export class Graph { return (this.edgeId += 1); } + getNextWalkerIndex() { + return (this.walkerIndex += 1); + } + setNodeInaccessible(typeName: string) { const nodes = this.nodesByTypeName.get(typeName); if (!nodes) { @@ -101,7 +102,7 @@ export class Graph { } initializeNode(typeName: string, fieldDataByFieldName: Map) { - const entityDataNode = this.entityDataNodes.get(typeName); + const entityDataNode = this.entityDataNodeByTypeName.get(typeName); if (ROOT_TYPE_NAMES.has(typeName)) { const rootNode = this.getRootNode(typeName as RootTypeName); rootNode.removeInaccessibleEdges(fieldDataByFieldName); @@ -140,511 +141,187 @@ export class Graph { this.subgraphName = subgraphName; } - validateEntities( - entityNodeNamesBySharedFieldPath: Map>, - rootFieldData: RootFieldData, - ): EntityResolvabilityResult { - const nestedEntityNodeNamesBySharedFieldPathByParentNodeName = new Map>>(); - for (const [sharedFieldPath, entityNodeNames] of entityNodeNamesBySharedFieldPath) { - const isFieldShared = entityNodeNames.size > 1; - let failureResult: EntityResolvabilityFailure | undefined; - /* In the event of a shared entity field, the validation changes slightly. - * The fields are linked through a mutual entity ancestor, and may/may not have additional routing through a key. - * In this case, the following must occur: - * 1. sharedResolvableFieldNamesByRelativeFieldPath will be created and passed to ensure the resolvability of - * paths are assessed collectively, rather than by a single instance of the shared fields - * */ - const sharedResolvableFieldNamesByRelativeFieldPath = isFieldShared - ? new Map() - : undefined; - /* - * 2. unresolvableSharedFieldPaths is used to determine whether there are still unresolvable paths even after - * all shared fields have been analysed. - * */ - const unresolvableSharedFieldPaths = new Set(); - /* - * 3. nestedEntityNodeNamesBySharedFieldPath should be a reference to the same set, to ensure nested shared fields - * are analysed as shared fields when moving deeper. - * */ - const sharedNestedEntityNodeNamesBySharedFieldPath = new Map>(); - for (const entityNodeName of entityNodeNames) { - const entityNode = this.nodeByNodeName.get(entityNodeName); - if (!entityNode) { - throw new Error(`Fatal: Could not find entity node for "${entityNodeName}".`); - } - const resolvableFieldNamesByRelativeFieldPath = - this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName.get(entityNodeName); - if (resolvableFieldNamesByRelativeFieldPath) { - // If at least one of the referenced entities is always fully resolvable, the path is resolvable. - const entityFailureResult = this.failureResultByEntityNodeName.get(entityNodeName); - if (!entityFailureResult) { - failureResult = undefined; - break; - } - // If the path is shared, it must be assessed collectively - if (!isFieldShared) { - return entityFailureResult; - } - } - const interSubgraphNodes = this.nodesByTypeName.get(entityNode.typeName) || []; - const nestedEntityNodeNamesBySharedFieldPath = getValueOrDefault( - nestedEntityNodeNamesBySharedFieldPathByParentNodeName, - entityNodeName, - () => (isFieldShared ? sharedNestedEntityNodeNamesBySharedFieldPath : new Map>()), - ); - const walker = new Walker({ - interSubgraphNodes, - entityNodeNamesBySharedFieldPath: nestedEntityNodeNamesBySharedFieldPath, - nodeResolutionDataByNodeName: this.nodeResolutionDataByNodeName, - nodeResolutionDataByTypeNameByEntityNodeName: this.nodeResolutionDataByTypeNameByEntityNodeName, - originNode: entityNode, - resolvableFieldNamesByRelativeFieldPathByEntityNodeName: - this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName, - walkerIndex: (this.walkerIndex += 1), - sharedResolvableFieldNamesByRelativeFieldPath, - unresolvableSharedFieldPaths, - }); - walker.visitEntityNode(entityNode); - if (walker.unresolvableFieldPaths.size > 0) { - if (isFieldShared && unresolvableSharedFieldPaths.size < 1) { - failureResult = undefined; - break; - } - failureResult = { - entityAncestorData: { - fieldSetsByTargetSubgraphName: getOrThrowError( - this.entityDataNodes, - entityNode.typeName, - 'entityDataNodes', - ).fieldSetsByTargetSubgraphName, - subgraphName: entityNode.subgraphName, - typeName: entityNode.typeName, - }, - nodeName: entityNodeName, - parentFieldPathForEntityReference: [sharedFieldPath], - success: false, - typeName: entityNode.typeName, - unresolvableFieldPaths: isFieldShared ? unresolvableSharedFieldPaths : walker.unresolvableFieldPaths, - }; - this.failureResultByEntityNodeName.set(entityNodeName, failureResult); - continue; - } - // In a shared path, only a single instance need succeed - failureResult = undefined; - break; + visitEntity({ + encounteredEntityNodeNames, + entityNodeName, + relativeOriginPaths, + resDataByRelativeOriginPath, + subgraphNameByUnresolvablePath, + visitedEntities, + }: VisitEntityParams) { + const entityNode = this.nodeByNodeName.get(entityNodeName); + if (!entityNode) { + throw new Error(`Fatal: Could not find entity node for "${entityNodeName}".`); + } + visitedEntities.add(entityNodeName); + const interSubgraphNodes = this.nodesByTypeName.get(entityNode.typeName); + if (!interSubgraphNodes?.length) { + throw new Error(`Fatal: Could not find any nodes for "${entityNodeName}".`); + } + const walker = new EntityWalker({ + encounteredEntityNodeNames, + index: this.getNextWalkerIndex(), + relativeOriginPaths, + resDataByNodeName: this.resDataByNodeName, + resDataByRelativeOriginPath, + subgraphNameByUnresolvablePath, + visitedEntities, + }); + const accessibleEntityNodeNames = entityNode.getAllAccessibleEntityNodeNames(); + for (const siblingEntityNode of interSubgraphNodes) { + if ( + siblingEntityNode.nodeName !== entityNode.nodeName && + !accessibleEntityNodeNames.has(siblingEntityNode.nodeName) + ) { + continue; } - if (failureResult) { - if (isFieldShared && sharedResolvableFieldNamesByRelativeFieldPath) { - this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName.set( - failureResult.nodeName, - sharedResolvableFieldNamesByRelativeFieldPath, - ); - } - return failureResult; + const { areDescendantsResolved } = walker.visitEntityDescendantConcreteNode({ + node: siblingEntityNode, + selectionPath: '', + }); + // All fields and descendent fields are resolved; nothing more to do for this entity. + if (areDescendantsResolved) { + return; } } - if (nestedEntityNodeNamesBySharedFieldPathByParentNodeName.size > 0) { - for (const [ - parentNodeName, - fieldPathsByNestedNodeName, - ] of nestedEntityNodeNamesBySharedFieldPathByParentNodeName) { - const result = this.validateEntities(fieldPathsByNestedNodeName, rootFieldData); - if (result.success) { - continue; - } - for (const [sharedFieldPath, entityNodeNames] of entityNodeNamesBySharedFieldPath) { - if (!entityNodeNames.has(parentNodeName)) { - continue; - } - result.parentFieldPathForEntityReference.push(sharedFieldPath); - break; - } - return result; - } + // Because of shared entity descendant paths, we can only assess the errors after checking all nested entities. + for (const [nestedEntityNodeName, selectionPath] of walker.selectionPathByEntityNodeName) { + /* Short circuiting on failures here can cause false positives. + * For example, an Object that is an entity at least one graph and defines at least one unique (nested) field. + * If that Object has no accessible keys but is accessible through an ancestor, short-circuiting here would + * produce an error before that shared path has been visited. + */ + this.visitEntity({ + encounteredEntityNodeNames, + entityNodeName: nestedEntityNodeName, + relativeOriginPaths: getMultipliedRelativeOriginPaths({ + relativeOriginPaths, + selectionPath: selectionPath, + }), + resDataByRelativeOriginPath, + subgraphNameByUnresolvablePath, + visitedEntities, + }); } - return { success: true }; } - validate(): Array { - const errors: Array = []; + validate(): ValidationResult { for (const rootNode of this.rootNodeByTypeName.values()) { - shareableRootFieldLoop: for (const [ - rootFieldName, - shareableRootFieldEdges, - ] of rootNode.headToShareableTailEdges) { - for (const rootFieldEdge of shareableRootFieldEdges) { - if (rootFieldEdge.isInaccessible) { - continue shareableRootFieldLoop; + for (const [rootFieldName, sharedRootFieldEdges] of rootNode.headToSharedTailEdges) { + const isShared = sharedRootFieldEdges.length > 1; + if (!isShared) { + const namedTypeNodeName = sharedRootFieldEdges[0]!.node.nodeName; + if (this.resolvedRootFieldNodeNames.has(namedTypeNodeName)) { + continue; } - this.walkerIndex += 1; - this.visitEdge({ - edge: rootFieldEdge, - fieldPath: rootNode.typeName.toLowerCase(), - rootCoords: `${rootNode.typeName}.${rootFieldName}`, - }); + this.resolvedRootFieldNodeNames.add(namedTypeNodeName); + } + const rootFieldWalker = new RootFieldWalker({ + index: this.getNextWalkerIndex(), + nodeResolutionDataByNodeName: this.resDataByNodeName, + }); + if ( + rootFieldWalker.visitRootFieldEdges({ + edges: sharedRootFieldEdges, + rootTypeName: rootNode.typeName.toLowerCase(), + }).areDescendantsResolved + ) { + continue; + } + if (rootFieldWalker.selectionPathsByEntityNodeName.size < 1 && rootFieldWalker.unresolvablePaths.size < 1) { + continue; } const fieldData = getOrThrowError(rootNode.fieldDataByName, rootFieldName, 'fieldDataByName'); const rootFieldData = newRootFieldData(rootNode.typeName, rootFieldName, fieldData.subgraphNames); - if (this.unresolvableFieldPaths.size > 0) { - generateResolvabilityErrors({ - unresolvableFieldPaths: this.unresolvableFieldPaths, - nodeResolutionDataByFieldPath: this.nodeResolutionDataByFieldPath, - rootFieldData, - errors, - }); + // If there are no nested entities, then the unresolvable fields must be impossible to resolve. + if (rootFieldWalker.selectionPathsByEntityNodeName.size < 1) { + return { + errors: generateRootResolvabilityErrors({ + unresolvablePaths: rootFieldWalker.unresolvablePaths, + resDataByPath: rootFieldWalker.resDataByPath, + rootFieldData, + }), + success: false, + }; } - if (this.entityNodeNamesBySharedFieldPath.size > 0) { - const result = this.validateEntities(this.entityNodeNamesBySharedFieldPath, rootFieldData); - if (!result.success) { - this.generateEntityResolvabilityErrors(result, rootFieldData, errors); + for (const [entityNodeName, selectionPaths] of rootFieldWalker.selectionPathsByEntityNodeName) { + if (!isShared && this.resDataByNodeName.has(entityNodeName)) { + continue; } + const resDataByRelativeOriginPath = getValueOrDefault( + this.resDataByRelativePathByEntity, + entityNodeName, + () => new Map(), + ); + const subgraphNameByUnresolvablePath = new Map(); + this.visitEntity({ + encounteredEntityNodeNames: new Set(), + entityNodeName, + resDataByRelativeOriginPath: resDataByRelativeOriginPath, + subgraphNameByUnresolvablePath, + visitedEntities: getValueOrDefault( + this.visitedEntitiesByOriginEntity, + entityNodeName, + () => new Set(), + ), + }); + if (subgraphNameByUnresolvablePath.size < 1) { + continue; + } + if (isShared) { + // TODO + for (const path of rootFieldWalker.unresolvablePaths) { + } + return { + errors: [new Error('Shared errors')], + success: false, + }; + } + return { + errors: this.generateEntityResolvabilityErrors({ + entityNodeName, + // Propagate errors for the first encounter only. + pathFromRoot: getFirstEntry(selectionPaths) ?? '', + rootFieldData, + subgraphNameByUnresolvablePath, + }), + success: false, + }; } - if (errors.length > 0) { - return errors; - } - this.entityNodeNamesBySharedFieldPath = new Map>(); - } - } - return []; - } - - // Returns true if the edge is visited and false otherwise (e.g., inaccessible) - visitEdge({ edge, fieldPath, rootCoords }: VisitEdgeParams): ValidateNodeResult { - if (edge.isInaccessible || edge.node.isInaccessible) { - return { visited: false, areDescendentsResolved: true }; - } - if (edge.node.isLeaf) { - return { visited: true, areDescendentsResolved: true }; - } - if (!add(edge.visitedIndices, this.walkerIndex)) { - return { visited: false, areDescendentsResolved: false }; - } - if (edge.node.isAbstract) { - return this.validateAbstractNode({ - node: edge.node, - fieldPath: `${fieldPath}.${edge.edgeName}`, - rootCoords, - }); - } - return this.validateConcreteNode({ - node: edge.node, - fieldPath: `${fieldPath}.${edge.edgeName}`, - rootCoords, - }); - } - - validateConcreteNode({ node, fieldPath, rootCoords }: VisitNodeParams): ValidateNodeResult { - if (node.headToTailEdges.size < 1) { - node.isLeaf = true; - return { visited: true, areDescendentsResolved: true }; - } - if (node.hasEntitySiblings) { - getValueOrDefault(this.entityNodeNamesBySharedFieldPath, fieldPath, () => new Set()).add(node.nodeName); - // return { visited: true, areDescendentsResolved: false }; - } - - const dataByRootCoords = getValueOrDefault( - this.nodeResolutionDataByTypeNameAndRootCoords, - node.typeName, - () => new Map, - ); - const rootCoordsData = getValueOrDefault( - dataByRootCoords, - rootCoords, - () => new NodeResolutionData({ - fieldDataByName: node.fieldDataByName, - typeName: node.typeName, - }), - ); - const existingData = this.nodeResolutionDataByNodeName.get(node.nodeName); - if (existingData) { - return { - visited: true, - areDescendentsResolved: existingData.areDescendentsResolved(), - }; - } - if (rootCoordsData.isResolved && rootCoordsData.areDescendentsResolved()) { - return { - visited: true, - areDescendentsResolved: true, - }; - } - const nodeNameData = getValueOrDefault( - this.nodeResolutionDataByNodeName, - node.nodeName, - () => new NodeResolutionData({ - fieldDataByName: node.fieldDataByName, - typeName: node.typeName, - }), - ); - const fieldPathData = getValueOrDefault( - this.nodeResolutionDataByFieldPath, - fieldPath, - () => new NodeResolutionData({ - fieldDataByName: node.fieldDataByName, - typeName: node.typeName, - }), - ); - for (const [fieldName, edge] of node.headToTailEdges) { - const { visited, areDescendentsResolved } = this.visitEdge({ edge, fieldPath, rootCoords }); - if (visited) { - fieldPathData.add(fieldName); - rootCoordsData.add(fieldName); - nodeNameData.add(fieldName); - } - if (!areDescendentsResolved) { - continue; - } - fieldPathData.resolvedDescendentNames.add(fieldName); - nodeNameData.resolvedDescendentNames.add(fieldName); - rootCoordsData.resolvedDescendentNames.add(fieldName); - } - if (rootCoordsData.isResolved || nodeNameData.isResolved) { - this.nodeResolutionDataByFieldPath.delete(fieldPath); - this.unresolvableFieldPaths.delete(fieldPath); - } else { - this.unresolvableFieldPaths.add(fieldPath); - } - return { - visited: true, - areDescendentsResolved: - rootCoordsData.areDescendentsResolved() || - nodeNameData.areDescendentsResolved(), - }; - } - - validateAbstractNode({ node, fieldPath, rootCoords }: VisitNodeParams): ValidateNodeResult { - if (node.headToTailEdges.size < 1) { - return { visited: true, areDescendentsResolved: true }; - } - let resolvedDescendents = 0; - for (const edge of node.headToTailEdges.values()) { - /* Propagate any one of the abstract path failures. - * Don't set value in-line so or it will short-circuit. - * */ - if (this.visitEdge({ edge, fieldPath, rootCoords }).areDescendentsResolved) { - resolvedDescendents += 1; } } return { - visited: true, - areDescendentsResolved: resolvedDescendents === node.headToTailEdges.size, + success: true, }; } - generateEntityResolvabilityErrors( - result: EntityResolvabilityFailure, - rootFieldData: RootFieldData, - errors: Array, - ) { + generateEntityResolvabilityErrors({ + entityNodeName, + pathFromRoot, + rootFieldData, + subgraphNameByUnresolvablePath, + }: EntityResolvabilityErrorsParams): Array { const nodeResolutionDataByFieldPath = getOrThrowError( - this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName, - result.nodeName, - 'resolvableFieldNamesByRelativeFieldPathByEntityNodeName', - ); - let pathFromRoot = ''; - // Reconstruct the path - for (const fieldPath of result.parentFieldPathForEntityReference) { - pathFromRoot = fieldPath + pathFromRoot; - } - generateResolvabilityErrors({ - unresolvableFieldPaths: result.unresolvableFieldPaths, - nodeResolutionDataByFieldPath, - rootFieldData: rootFieldData, - errors, - pathFromRoot, - entityAncestorData: result.entityAncestorData, - }); - } -} - -class Walker { - entityNodeNamesBySharedFieldPath: Map>; - interSubgraphNodes: Array; - nodeResolutionDataByTypeNameByEntityNodeName: Map>; - nodeResolutionDataByNodeName: Map; - originNode: GraphNode; - resolvableFieldNamesByRelativeFieldPath: Map; - resolvableFieldNamesByRelativeFieldPathByEntityNodeName: Map>; - unresolvableFieldPaths = new Set(); - unresolvableSharedFieldPaths: Set; - walkerIndex: number; - sharedResolvableFieldNamesByRelativeFieldPath?: Map; - - constructor({ - entityNodeNamesBySharedFieldPath, - interSubgraphNodes, - nodeResolutionDataByTypeNameByEntityNodeName, - nodeResolutionDataByNodeName, - originNode, - resolvableFieldNamesByRelativeFieldPathByEntityNodeName, - unresolvableSharedFieldPaths, - walkerIndex, - sharedResolvableFieldNamesByRelativeFieldPath, - }: WalkerParams) { - this.entityNodeNamesBySharedFieldPath = entityNodeNamesBySharedFieldPath; - this.interSubgraphNodes = interSubgraphNodes; - this.nodeResolutionDataByTypeNameByEntityNodeName = nodeResolutionDataByTypeNameByEntityNodeName; - this.nodeResolutionDataByNodeName = nodeResolutionDataByNodeName; - this.originNode = originNode; - this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName = - resolvableFieldNamesByRelativeFieldPathByEntityNodeName; - this.resolvableFieldNamesByRelativeFieldPath = getValueOrDefault( - this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName, - originNode.nodeName, - () => new Map(), + this.resDataByRelativePathByEntity, + entityNodeName, + 'resDataByRelativePathByEntity', ); - this.unresolvableSharedFieldPaths = unresolvableSharedFieldPaths; - this.walkerIndex = walkerIndex; - this.sharedResolvableFieldNamesByRelativeFieldPath = sharedResolvableFieldNamesByRelativeFieldPath; - } - - getNodeResolutionData({ fieldDataByName, nodeName, typeName }: GraphNode): NodeResolutionData { - const nodeResolutionData = this.nodeResolutionDataByNodeName.get(nodeName); - if (nodeResolutionData) { - return nodeResolutionData.copy(); - } - return new NodeResolutionData({ fieldDataByName, typeName }); - } - - visitEntityNode(node: GraphNode) { - const nodeResolutionDataByTypeName = getValueOrDefault( - this.nodeResolutionDataByTypeNameByEntityNodeName, - node.nodeName, - () => new Map(), + const entityTypeName = entityNodeName.split(LITERAL_PERIOD)[1]; + const { fieldSetsByTargetSubgraphName } = getOrThrowError( + this.entityDataNodeByTypeName, + entityTypeName, + 'entityDataNodeByTypeName', ); - this.validateEntityDescendantConcreteNode({ node, nodeResolutionDataByTypeName, fieldPath: '' }); - const accessibleEntityNodeNames = node.getAllAccessibleEntityNodeNames(); - for (const sibling of this.interSubgraphNodes) { - if (this.unresolvableFieldPaths.size < 1) { - return; - } - if (!accessibleEntityNodeNames.has(sibling.nodeName)) { - continue; - } - this.validateEntityDescendantConcreteNode({ - node: sibling, - nodeResolutionDataByTypeName, - fieldPath: '', - }); - } - } - - // Returns true if the edge is visited and false if it's inaccessible - visitEntityDescendentEdge({ edge, fieldPath, nodeResolutionDataByTypeName }: ValidateEntityDescendantEdgeParams): ValidateNodeResult { - if (edge.isInaccessible || edge.node.isInaccessible) { - return { visited: false, areDescendentsResolved: false }; - } - if (edge.node.isLeaf) { - return { visited: true, areDescendentsResolved: true }; - } - if (!add(edge.visitedIndices, this.walkerIndex)) { - return { visited: false, areDescendentsResolved: false }; - } - if (edge.node.hasEntitySiblings) { - getValueOrDefault( - this.entityNodeNamesBySharedFieldPath, - `${fieldPath}.${edge.edgeName}`, - () => new Set(), - ).add(edge.node.nodeName); - return { visited: true, areDescendentsResolved: false }; - } - if (edge.node.isAbstract) { - return this.validateEntityDescendantAbstractNode({ - fieldPath: `${fieldPath}.${edge.edgeName}`, - node: edge.node, - nodeResolutionDataByTypeName, - }); - } - return this.validateEntityDescendantConcreteNode({ - fieldPath: `${fieldPath}.${edge.edgeName}`, - node: edge.node, - nodeResolutionDataByTypeName + return generateResolvabilityErrors({ + entityAncestorData: { + fieldSetsByTargetSubgraphName, + subgraphName: '', + typeName: entityTypeName, + }, + pathFromRoot, + resDataByPath: nodeResolutionDataByFieldPath, + rootFieldData: rootFieldData, + subgraphNameByUnresolvablePath, }); } - - validateEntityDescendantConcreteNode({ node, nodeResolutionDataByTypeName, fieldPath }: ValidateEntityDescendantNodeParams): ValidateNodeResult { - if (node.headToTailEdges.size < 1) { - return { visited: true, areDescendentsResolved: true }; - } - const nodeResolutionData = getValueOrDefault( - nodeResolutionDataByTypeName, - node.typeName, - () => this.getNodeResolutionData(node), - ); - if (nodeResolutionData.isResolved) { - this.unresolvableFieldPaths.delete(fieldPath); - if (nodeResolutionData.areDescendentsResolved()) { - return { visited: true, areDescendentsResolved: true }; - } - } - const originResolvedFieldNames = getValueOrDefault( - this.resolvableFieldNamesByRelativeFieldPath, - fieldPath, - () => this.getNodeResolutionData(node), - ); - const sharedResolvedFieldNames = this.sharedResolvableFieldNamesByRelativeFieldPath - ? getValueOrDefault( - this.sharedResolvableFieldNamesByRelativeFieldPath, - fieldPath, - () => this.getNodeResolutionData(node), - ) - : undefined; - for (const [fieldName, edge] of node.headToTailEdges) { - const { visited, areDescendentsResolved } = this.visitEntityDescendentEdge({ edge, nodeResolutionDataByTypeName, fieldPath }); - if (visited) { - nodeResolutionData.add(fieldName); - originResolvedFieldNames.add(fieldName); - sharedResolvedFieldNames?.add(fieldName); - } - if (!areDescendentsResolved) { - continue; - } - nodeResolutionData.resolvedDescendentNames.add(fieldName); - sharedResolvedFieldNames?.resolvedDescendentNames.add(fieldName); - // Returns true if the edge is visited - // if (this.visitEntityDescendentEdge({ edge, nodeResolutionDataByTypeName, fieldPath })) { - // originResolvedFieldNames.add(fieldName); - // sharedResolvedFieldNames?.add(fieldName); - // } - } - if (nodeResolutionData.isResolved || sharedResolvedFieldNames?.isResolved) { - this.unresolvableFieldPaths.delete(fieldPath); - } else { - this.unresolvableFieldPaths.add(fieldPath); - } - // if (originResolvedFieldNames.isResolved) { - // this.unresolvableFieldPaths.delete(fieldPath); - // } else { - // this.unresolvableFieldPaths.add(fieldPath); - // } - // if (!sharedResolvedFieldNames) { - // return; - // } - // if (sharedResolvedFieldNames.isResolved) { - // this.unresolvableSharedFieldPaths.delete(fieldPath); - // } else { - // this.unresolvableSharedFieldPaths.add(fieldPath); - // } - return { - visited: true, - areDescendentsResolved: nodeResolutionData.areDescendentsResolved(), - }; - } - - validateEntityDescendantAbstractNode({ node, nodeResolutionDataByTypeName, fieldPath }: ValidateEntityDescendantNodeParams): ValidateNodeResult { - if (node.headToTailEdges.size < 1) { - return { visited: true, areDescendentsResolved: true }; - } - let resolvedDescendents = 0; - for (const edge of node.headToTailEdges.values()) { - /* Propagate any one of the abstract path failures. - * Don't set value in-line so or it will short-circuit. - * */ - if (this.visitEntityDescendentEdge({ edge, nodeResolutionDataByTypeName, fieldPath }).areDescendentsResolved) { - resolvedDescendents += 1; - } - } - return { visited: true, areDescendentsResolved: resolvedDescendents === node.headToTailEdges.size }; - } } diff --git a/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts b/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts index 79f8b8d3ff..d44afacdf9 100644 --- a/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts +++ b/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts @@ -1,13 +1,12 @@ import { GraphFieldData } from '../../utils/types'; -import { getEntriesNotInHashSet } from '../../utils/utils'; import { unexpectedEdgeFatalError } from '../../errors/errors'; import { FieldName, SubgraphName } from '../types/types'; import { NodeResolutionDataParams } from './types/params'; export class NodeResolutionData { + #isResolved = false; fieldDataByName: Map; - isResolved: boolean - resolvedDescendentNames: Set; + resolvedDescendantNames: Set; resolvedFieldNames: Set; typeName: string; @@ -18,21 +17,18 @@ export class NodeResolutionData { resolvedFieldNames, typeName, }: NodeResolutionDataParams) { + this.#isResolved = isResolved; this.fieldDataByName = fieldDataByName; - this.isResolved = isResolved; - this.resolvedDescendentNames = new Set(resolvedDescendentNames); + this.resolvedDescendantNames = new Set(resolvedDescendentNames); this.resolvedFieldNames = new Set(resolvedFieldNames); this.typeName = typeName; } - add(fieldName: FieldName): boolean { - this.resolvedFieldNames.add(fieldName); - if (this.resolvedFieldNames.size > this.fieldDataByName.size) { - const unexpectedEntries = getEntriesNotInHashSet(this.resolvedFieldNames, this.fieldDataByName); - throw unexpectedEdgeFatalError(this.typeName, unexpectedEntries); + addResolvedFieldName(fieldName: FieldName) { + if (!this.fieldDataByName.has(fieldName)) { + throw unexpectedEdgeFatalError(this.typeName, [fieldName]); } - this.isResolved = this.resolvedFieldNames.size === this.fieldDataByName.size; - return this.isResolved; + this.resolvedFieldNames.add(fieldName); } copy(): NodeResolutionData { @@ -47,14 +43,30 @@ export class NodeResolutionData { } return new NodeResolutionData({ fieldDataByName: this.fieldDataByName, - isResolved: this.isResolved, - resolvedDescendentNames: this.resolvedDescendentNames, + isResolved: this.#isResolved, + resolvedDescendentNames: this.resolvedDescendantNames, resolvedFieldNames: this.resolvedFieldNames, typeName: this.typeName, }); } - areDescendentsResolved(): boolean { - return this.fieldDataByName.size === this.resolvedDescendentNames.size; + areDescendantsResolved(): boolean { + return this.fieldDataByName.size === this.resolvedDescendantNames.size; + } + + isResolved(): boolean { + if (this.#isResolved) { + return true; + } + if (this.fieldDataByName.size !== this.resolvedFieldNames.size) { + return false; + } + for (const fieldName of this.fieldDataByName.keys()) { + if (!this.resolvedFieldNames.has(fieldName)) { + return false; + } + } + this.#isResolved = true; + return true; } -} \ No newline at end of file +} diff --git a/composition/src/resolvability-graph/node-resolution-data/types/params.ts b/composition/src/resolvability-graph/node-resolution-data/types/params.ts index 7a58dffb90..77692202c9 100644 --- a/composition/src/resolvability-graph/node-resolution-data/types/params.ts +++ b/composition/src/resolvability-graph/node-resolution-data/types/params.ts @@ -7,4 +7,4 @@ export type NodeResolutionDataParams = { isResolved?: boolean; resolvedDescendentNames?: Set; resolvedFieldNames?: Set; -}; \ No newline at end of file +}; diff --git a/composition/src/resolvability-graph/types/params.ts b/composition/src/resolvability-graph/types/params.ts index cde70b8f34..fcd02aed04 100644 --- a/composition/src/resolvability-graph/types/params.ts +++ b/composition/src/resolvability-graph/types/params.ts @@ -1,40 +1,12 @@ -import { Edge, GraphNode } from '../graph-nodes'; -import type { FieldPath, NodeName, RootCoords, TypeName } from './types'; +import type { NodeName, SelectionPath, SubgraphName } from './types'; import { NodeResolutionData } from '../node-resolution-data/node-resolution-data'; -export type VisitEdgeParams = { - edge: Edge; - fieldPath: FieldPath; - rootCoords: RootCoords; +export type VisitEntityParams = { + encounteredEntityNodeNames: Set; + entityNodeName: NodeName; + resDataByRelativeOriginPath: Map; + subgraphNameByUnresolvablePath: Map; + visitedEntities: Set; + relativeOriginPaths?: Set; }; - -export type VisitNodeParams = { - node: GraphNode; - fieldPath: FieldPath; - rootCoords: RootCoords; -}; - -export type ValidateEntityDescendantEdgeParams = { - edge: Edge; - fieldPath: FieldPath; - nodeResolutionDataByTypeName: Map; -} - -export type ValidateEntityDescendantNodeParams = { - fieldPath: FieldPath; - node: GraphNode; - nodeResolutionDataByTypeName: Map; -} - -export type WalkerParams = { - entityNodeNamesBySharedFieldPath: Map>; - interSubgraphNodes: Array; - nodeResolutionDataByNodeName: Map; - nodeResolutionDataByTypeNameByEntityNodeName: Map>; - originNode: GraphNode; - resolvableFieldNamesByRelativeFieldPathByEntityNodeName: Map>; - unresolvableSharedFieldPaths: Set; - walkerIndex: number; - sharedResolvableFieldNamesByRelativeFieldPath?: Map; -}; \ No newline at end of file diff --git a/composition/src/resolvability-graph/types/types.ts b/composition/src/resolvability-graph/types/types.ts index 3eaa0d2c84..30493d6cc9 100644 --- a/composition/src/resolvability-graph/types/types.ts +++ b/composition/src/resolvability-graph/types/types.ts @@ -1,6 +1,7 @@ -export type ValidateNodeResult = { +export type VisitNodeResult = { visited: boolean; - areDescendentsResolved: boolean; + areDescendantsResolved: boolean; + isRevisitedNode?: boolean; }; export type FieldPath = string; @@ -11,6 +12,36 @@ export type NodeName = `${SubgraphName}.${TypeName}`; export type RootCoords = `${TypeName}.${FieldName}`; +export type SelectionPath = string; + export type SubgraphName = string; -export type TypeName = string; \ No newline at end of file +export type TypeName = string; + +export type RootFieldData = { + coords: `${TypeName}.${FieldName}`; + message: string; + subgraphNames: Set; +}; + +export type ValidationFailure = { + errors: Array; + success: false; +}; + +export type ValidationSuccess = { + success: true; +}; + +export type ValidationResult = ValidationFailure | ValidationSuccess; + +export type VisitEntityFailure = { + subgraphNameByUnresolvablePath: Map; + success: false; +}; + +export type VisitEntitySuccess = { + success: true; +}; + +export type VisitEntityResult = VisitEntityFailure | VisitEntitySuccess; diff --git a/composition/src/resolvability-graph/utils/types/params.ts b/composition/src/resolvability-graph/utils/types/params.ts new file mode 100644 index 0000000000..53fd6126cd --- /dev/null +++ b/composition/src/resolvability-graph/utils/types/params.ts @@ -0,0 +1,30 @@ +import type { NodeName, RootFieldData, SelectionPath, SubgraphName } from '../../types/types'; +import { NodeResolutionData } from '../../node-resolution-data/node-resolution-data'; + +import { EntityAncestorData } from './types'; + +export type EntityResolvabilityErrorsParams = { + entityNodeName: NodeName; + pathFromRoot: SelectionPath; + rootFieldData: RootFieldData; + subgraphNameByUnresolvablePath: Map; +}; + +export type RootResolvabilityErrorsParams = { + resDataByPath: Map; + rootFieldData: RootFieldData; + unresolvablePaths: Iterable; +}; + +export type ResolvabilityErrorsParams = { + entityAncestorData: EntityAncestorData; + resDataByPath: Map; + rootFieldData: RootFieldData; + subgraphNameByUnresolvablePath: Map; + pathFromRoot?: SelectionPath; +}; + +export type GetMultipliedRelativeOriginPathsParams = { + selectionPath: SelectionPath; + relativeOriginPaths?: Set; +}; diff --git a/composition/src/resolvability-graph/utils/types/types.ts b/composition/src/resolvability-graph/utils/types/types.ts new file mode 100644 index 0000000000..410f3fc654 --- /dev/null +++ b/composition/src/resolvability-graph/utils/types/types.ts @@ -0,0 +1,7 @@ +import { SubgraphName, TypeName } from '../../types/types'; + +export type EntityAncestorData = { + fieldSetsByTargetSubgraphName: Map>; + subgraphName: SubgraphName; + typeName: TypeName; +}; diff --git a/composition/src/resolvability-graph/utils.ts b/composition/src/resolvability-graph/utils/utils.ts similarity index 62% rename from composition/src/resolvability-graph/utils.ts rename to composition/src/resolvability-graph/utils/utils.ts index 431b154d16..c992e218c5 100644 --- a/composition/src/resolvability-graph/utils.ts +++ b/composition/src/resolvability-graph/utils/utils.ts @@ -1,8 +1,16 @@ -import { unresolvablePathError } from '../errors/errors'; -import { LITERAL_SPACE, QUOTATION_JOIN } from '../utils/string-constants'; -import { getOrThrowError } from '../utils/utils'; -import { GraphFieldData } from '../utils/types'; -import { NodeResolutionData } from './node-resolution-data/node-resolution-data'; +import { unresolvablePathError } from '../../errors/errors'; +import { LITERAL_SPACE, QUOTATION_JOIN } from '../../utils/string-constants'; +import { getOrThrowError } from '../../utils/utils'; +import { GraphFieldData } from '../../utils/types'; +import { NodeResolutionData } from '../node-resolution-data/node-resolution-data'; +import { FieldName, RootFieldData, SelectionPath, SubgraphName, TypeName } from '../types/types'; + +import { + GetMultipliedRelativeOriginPathsParams, + ResolvabilityErrorsParams, + RootResolvabilityErrorsParams, +} from './types/params'; +import { EntityAncestorData } from './types/types'; export type EntityResolvabilitySuccess = { success: true; @@ -26,15 +34,13 @@ export type UnresolvableFieldData = { typeName: string; }; -export type RootFieldData = { - coordinate: string; - message: string; - subgraphNames: Set; -}; - -export function newRootFieldData(typeName: string, fieldName: string, subgraphNames: Set) { +export function newRootFieldData( + typeName: TypeName, + fieldName: FieldName, + subgraphNames: Set, +): RootFieldData { return { - coordinate: `${typeName}.${fieldName}`, + coords: `${typeName}.${fieldName}`, message: `The root type field "${typeName}.${fieldName}" is defined in the following subgraph` + (subgraphNames.size > 1 ? `s` : ``) + @@ -66,12 +72,6 @@ function formatFieldNameSelection(fieldData: GraphFieldData, pathLength: number) ); } -export type EntityAncestorData = { - fieldSetsByTargetSubgraphName: Map>; - subgraphName: string; - typeName: string; -}; - export type GenerateResolvabilityErrorReasonsOptions = { rootFieldData: RootFieldData; unresolvableFieldData: UnresolvableFieldData; @@ -109,16 +109,16 @@ export function generateResolvabilityErrorReasons({ ); } reasons.push( - `The type "${typeName}" is not a descendent of any other entity ancestors that can provide a shared route to access "${fieldName}".`, + `The type "${typeName}" is not a descendant of any other entity ancestors that can provide a shared route to access "${fieldName}".`, ); } else { if (rootFieldData.subgraphNames.size > 1) { reasons.push( - `None of the subgraphs that share the same root type field "${rootFieldData.coordinate}" can provide a route to access "${fieldName}".`, + `None of the subgraphs that shares the same root type field "${rootFieldData.coords}" can provide a route to access "${fieldName}".`, ); } reasons.push( - `The type "${typeName}" is not a descendent of an entity ancestor that can provide a shared route to access "${fieldName}".`, + `The type "${typeName}" is not a descendant of an entity ancestor that can provide a shared route to access "${fieldName}".`, ); } if (typeName !== entityAncestorData?.typeName) { @@ -173,21 +173,14 @@ function getUnresolvablePath(fieldPath: string, pathFromRoot?: string): string { return fieldPath; } -export function generateResolvabilityErrors({ - entityAncestorData, - errors, - nodeResolutionDataByFieldPath, - pathFromRoot, +export function generateRootResolvabilityErrors({ + resDataByPath, rootFieldData, - unresolvableFieldPaths, -}: ResolvabilityErrorsOptions) { - const unresolvableFieldDatas: Array = []; - for (const fieldPath of unresolvableFieldPaths) { - const nodeResolutionData = getOrThrowError( - nodeResolutionDataByFieldPath, - fieldPath, - 'nodeResolutionDataByFieldPath', - ); + unresolvablePaths, +}: RootResolvabilityErrorsParams): Array { + const unresolvableFieldDatas = new Array(); + for (const path of unresolvablePaths) { + const nodeResolutionData = getOrThrowError(resDataByPath, path, 'resDataByPath'); const fieldDataByFieldName = new Map(); for (const [fieldName, fieldData] of nodeResolutionData.fieldDataByName) { if (nodeResolutionData.resolvedFieldNames.has(fieldName)) { @@ -195,8 +188,7 @@ export function generateResolvabilityErrors({ } fieldDataByFieldName.set(fieldName, fieldData); } - const fullPath = getUnresolvablePath(fieldPath, pathFromRoot); - const selectionSetSegments = generateSelectionSetSegments(fullPath); + const selectionSetSegments = generateSelectionSetSegments(path); for (const [fieldName, fieldData] of fieldDataByFieldName) { unresolvableFieldDatas.push({ fieldName, @@ -206,12 +198,70 @@ export function generateResolvabilityErrors({ }); } } + const errors = new Array(); for (const unresolvableFieldData of unresolvableFieldDatas) { errors.push( unresolvablePathError( unresolvableFieldData, - generateResolvabilityErrorReasons({ rootFieldData, unresolvableFieldData, entityAncestorData }), + generateResolvabilityErrorReasons({ rootFieldData, unresolvableFieldData }), ), ); } + return errors; +} + +export function generateResolvabilityErrors({ + entityAncestorData, + resDataByPath, + pathFromRoot, + rootFieldData, + subgraphNameByUnresolvablePath, +}: ResolvabilityErrorsParams): Array { + const errors = new Array(); + for (const [path, subgraphName] of subgraphNameByUnresolvablePath) { + const unresolvableFieldDatas = new Array(); + const nodeResolutionData = getOrThrowError(resDataByPath, path, 'resDataByPath'); + const fieldDataByFieldName = new Map(); + for (const [fieldName, fieldData] of nodeResolutionData.fieldDataByName) { + if (nodeResolutionData.resolvedFieldNames.has(fieldName)) { + continue; + } + fieldDataByFieldName.set(fieldName, fieldData); + } + const fullPath = getUnresolvablePath(path, pathFromRoot); + const selectionSetSegments = generateSelectionSetSegments(fullPath); + for (const [fieldName, fieldData] of fieldDataByFieldName) { + unresolvableFieldDatas.push({ + fieldName, + selectionSet: renderSelectionSet(selectionSetSegments, fieldData), + subgraphNames: fieldData.subgraphNames, + typeName: nodeResolutionData.typeName, + }); + } + // Reflect whence the resolvability came accurately. + entityAncestorData.subgraphName = subgraphName; + for (const unresolvableFieldData of unresolvableFieldDatas) { + errors.push( + unresolvablePathError( + unresolvableFieldData, + generateResolvabilityErrorReasons({ rootFieldData, unresolvableFieldData, entityAncestorData }), + ), + ); + } + } + return errors; +} + +export function getMultipliedRelativeOriginPaths({ + relativeOriginPaths, + selectionPath, +}: GetMultipliedRelativeOriginPathsParams): Set { + if (!relativeOriginPaths) { + return new Set([selectionPath]); + } + const multipliedPaths = new Set(); + for (const originPath of relativeOriginPaths) { + multipliedPaths.add(`${originPath}${selectionPath}`); + } + return multipliedPaths; } diff --git a/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts b/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts new file mode 100644 index 0000000000..bc01ea37f2 --- /dev/null +++ b/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts @@ -0,0 +1,235 @@ +import { NodeResolutionData } from '../../node-resolution-data/node-resolution-data'; +import type { NodeName, SelectionPath, SubgraphName, VisitNodeResult } from '../../types/types'; +import { + AddUnresolvablePathsParams, + EntityWalkerParams, + GetNodeResolutionDataParams, + PropagateVisitedFieldParams, + RemoveUnresolvablePathsParams, + VisitEntityDescendantEdgeParams, + VisitEntityDescendantNodeParams, +} from './types/params'; +import { add, getValueOrDefault } from '../../../utils/utils'; + +export class EntityWalker { + // Prevents registering the same entity node before there has been a chance to validate it. + encounteredEntityNodeNames: Set; + index: number; + resDataByNodeName: Map; + resDataByRelativeOriginPath: Map; + selectionPathByEntityNodeName = new Map(); + // The subgraph name is so the propagated errors accurately reflect which subgraph cannot reach the node. + subgraphNameByUnresolvablePath: Map; + visitedEntities: Set; + relativeOriginPaths?: Set; + + constructor({ + encounteredEntityNodeNames, + index, + relativeOriginPaths, + resDataByNodeName, + resDataByRelativeOriginPath, + subgraphNameByUnresolvablePath, + visitedEntities, + }: EntityWalkerParams) { + this.encounteredEntityNodeNames = encounteredEntityNodeNames; + this.index = index; + this.relativeOriginPaths = relativeOriginPaths; + this.resDataByNodeName = resDataByNodeName; + this.resDataByRelativeOriginPath = resDataByRelativeOriginPath; + this.visitedEntities = visitedEntities; + this.subgraphNameByUnresolvablePath = subgraphNameByUnresolvablePath; + } + + getNodeResolutionData({ + node: { fieldDataByName, nodeName, typeName }, + selectionPath, + }: GetNodeResolutionDataParams): NodeResolutionData { + const dataByNodeName = getValueOrDefault( + this.resDataByNodeName, + nodeName, + () => new NodeResolutionData({ fieldDataByName, typeName }), + ); + if (!this.relativeOriginPaths || this.relativeOriginPaths.size < 1) { + return getValueOrDefault(this.resDataByRelativeOriginPath, selectionPath, () => dataByNodeName.copy()); + } + let returnData: NodeResolutionData | undefined = undefined; + for (const path of this.relativeOriginPaths) { + const data = getValueOrDefault(this.resDataByRelativeOriginPath, `${path}${selectionPath}`, () => + dataByNodeName.copy(), + ); + returnData ??= data; + } + return returnData!; + } + + visitEntityDescendantEdge({ edge, selectionPath }: VisitEntityDescendantEdgeParams): VisitNodeResult { + if (edge.isInaccessible || edge.node.isInaccessible) { + return { visited: false, areDescendantsResolved: false }; + } + if (edge.node.isLeaf) { + return { visited: true, areDescendantsResolved: true }; + } + if (!add(edge.visitedIndices, this.index)) { + /* This check is necessary to avoid infinite loops inexpensively. + * If the edge has been visited before, any unresolvable will be propagated by the first instance. + * Descendant paths need to be cleaned up to avoid false positives. + */ + this.removeUnresolvablePaths({ + selectionPath: `${selectionPath}.${edge.edgeName}`, + removeDescendantPaths: true, + }); + return { visited: true, areDescendantsResolved: true, isRevisitedNode: true }; + } + if (edge.node.hasEntitySiblings) { + /* This check prevents infinite loops. + * The entity is only propagated into this map after it has been assessed for resolvability. + * Consequently, only a valid node would appear here. + * */ + if (this.visitedEntities.has(edge.node.nodeName) || this.encounteredEntityNodeNames.has(edge.node.nodeName)) { + return { visited: true, areDescendantsResolved: true }; + } + this.encounteredEntityNodeNames.add(edge.node.nodeName); + getValueOrDefault( + this.selectionPathByEntityNodeName, + edge.node.nodeName, + () => `${selectionPath}.${edge.edgeName}`, + ); + return { visited: true, areDescendantsResolved: false }; + } + if (edge.node.isAbstract) { + return this.visitEntityDescendantAbstractNode({ + node: edge.node, + selectionPath: `${selectionPath}.${edge.edgeName}`, + }); + } + return this.visitEntityDescendantConcreteNode({ + node: edge.node, + selectionPath: `${selectionPath}.${edge.edgeName}`, + }); + } + + visitEntityDescendantConcreteNode({ node, selectionPath }: VisitEntityDescendantNodeParams): VisitNodeResult { + if (node.headToTailEdges.size < 1) { + node.isLeaf = true; + return { visited: true, areDescendantsResolved: true }; + } + const data = this.getNodeResolutionData({ node, selectionPath }); + if (data.isResolved()) { + if (data.areDescendantsResolved()) { + return { visited: true, areDescendantsResolved: true }; + } + } + let removeChildPaths: boolean | undefined = undefined; + for (const [fieldName, edge] of node.headToTailEdges) { + const { visited, areDescendantsResolved, isRevisitedNode } = this.visitEntityDescendantEdge({ + edge, + selectionPath, + }); + removeChildPaths &&= isRevisitedNode; + this.propagateVisitedField({ + areDescendantsResolved, + fieldName, + data, + nodeName: node.nodeName, + selectionPath, + visited, + }); + } + if (data.isResolved()) { + this.removeUnresolvablePaths({ selectionPath }); + } else { + this.addUnresolvablePaths({ selectionPath, subgraphName: node.subgraphName }); + } + return { + visited: true, + areDescendantsResolved: data.areDescendantsResolved(), + }; + } + + visitEntityDescendantAbstractNode({ node, selectionPath }: VisitEntityDescendantNodeParams): VisitNodeResult { + if (node.headToTailEdges.size < 1) { + return { visited: true, areDescendantsResolved: true }; + } + let resolvedDescendents = 0; + for (const edge of node.headToTailEdges.values()) { + // Propagate any one of the abstract path failures. + if (this.visitEntityDescendantEdge({ edge, selectionPath }).areDescendantsResolved) { + resolvedDescendents += 1; + } + } + return { visited: true, areDescendantsResolved: resolvedDescendents === node.headToTailEdges.size }; + } + + propagateVisitedField({ + areDescendantsResolved, + data, + fieldName, + nodeName, + selectionPath, + visited, + }: PropagateVisitedFieldParams) { + if (!visited) { + return; + } + const dataByNodeName = getValueOrDefault(this.resDataByNodeName, nodeName, () => data.copy()); + data.addResolvedFieldName(fieldName); + dataByNodeName.addResolvedFieldName(fieldName); + if (areDescendantsResolved) { + data.resolvedDescendantNames.add(fieldName); + dataByNodeName.addResolvedFieldName(fieldName); + } + if (this.relativeOriginPaths) { + for (const originPath of this.relativeOriginPaths) { + const originData = getValueOrDefault(this.resDataByRelativeOriginPath, `${originPath}${selectionPath}`, () => + data.copy(), + ); + originData.addResolvedFieldName(fieldName); + if (areDescendantsResolved) { + originData.resolvedDescendantNames.add(fieldName); + } + } + return; + } + const originData = getValueOrDefault(this.resDataByRelativeOriginPath, selectionPath, () => data.copy()); + originData.addResolvedFieldName(fieldName); + if (areDescendantsResolved) { + originData.resolvedDescendantNames.add(fieldName); + } + } + + addUnresolvablePaths({ selectionPath, subgraphName }: AddUnresolvablePathsParams) { + if (!this.relativeOriginPaths) { + getValueOrDefault(this.subgraphNameByUnresolvablePath, selectionPath, () => subgraphName); + return; + } + for (const path of this.relativeOriginPaths) { + getValueOrDefault(this.subgraphNameByUnresolvablePath, `${path}${selectionPath}`, () => subgraphName); + } + } + + removeUnresolvablePaths({ selectionPath, removeDescendantPaths }: RemoveUnresolvablePathsParams) { + if (!this.relativeOriginPaths) { + this.subgraphNameByUnresolvablePath.delete(selectionPath); + if (removeDescendantPaths) { + for (const unresolvablePath of this.subgraphNameByUnresolvablePath.keys()) { + if (unresolvablePath.startsWith(selectionPath)) { + this.subgraphNameByUnresolvablePath.delete(unresolvablePath); + } + } + } + return; + } + for (const originPath of this.relativeOriginPaths) { + const fullPath = `${originPath}${selectionPath}`; + this.subgraphNameByUnresolvablePath.delete(fullPath); + if (removeDescendantPaths) { + for (const unresolvablePath of this.subgraphNameByUnresolvablePath.keys()) { + if (unresolvablePath.startsWith(fullPath)) { + this.subgraphNameByUnresolvablePath.delete(unresolvablePath); + } + } + } + } + } +} diff --git a/composition/src/resolvability-graph/walker/entity-walker/types/params.ts b/composition/src/resolvability-graph/walker/entity-walker/types/params.ts new file mode 100644 index 0000000000..25fa58099d --- /dev/null +++ b/composition/src/resolvability-graph/walker/entity-walker/types/params.ts @@ -0,0 +1,47 @@ +import { FieldName, NodeName, SelectionPath, SubgraphName } from '../../../types/types'; +import { Edge, GraphNode } from '../../../graph-nodes'; +import { NodeResolutionData } from '../../../node-resolution-data/node-resolution-data'; + +export type EntityWalkerParams = { + encounteredEntityNodeNames: Set; + index: number; + resDataByNodeName: Map; + resDataByRelativeOriginPath: Map; + relativeOriginPaths?: Set; + subgraphNameByUnresolvablePath: Map; + visitedEntities: Set; +}; + +export type VisitEntityDescendantEdgeParams = { + edge: Edge; + selectionPath: SelectionPath; +}; + +export type VisitEntityDescendantNodeParams = { + node: GraphNode; + selectionPath: SelectionPath; +}; + +export type PropagateVisitedFieldParams = { + areDescendantsResolved: boolean; + data: NodeResolutionData; + fieldName: FieldName; + nodeName: NodeName; + selectionPath: SelectionPath; + visited: boolean; +}; + +export type GetNodeResolutionDataParams = { + node: GraphNode; + selectionPath: SelectionPath; +}; + +export type AddUnresolvablePathsParams = { + selectionPath: SelectionPath; + subgraphName: SubgraphName; +}; + +export type RemoveUnresolvablePathsParams = { + selectionPath: SelectionPath; + removeDescendantPaths?: boolean; +}; diff --git a/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts b/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts new file mode 100644 index 0000000000..8ed7580af1 --- /dev/null +++ b/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts @@ -0,0 +1,271 @@ +import { + GetNodeResolutionDataParams, + PropagateVisitedFieldParams, + PropagateVisitedSharedFieldParams, + RootFieldWalkerParams, + VisitEdgeParams, + VisitNodeParams, + VisitRootFieldEdgesParams, +} from './types/params'; +import { add, getValueOrDefault } from '../../../utils/utils'; +import { NodeName, SelectionPath, VisitNodeResult } from '../../types/types'; +import { NodeResolutionData } from '../../node-resolution-data/node-resolution-data'; + +export class RootFieldWalker { + index: number; + resDataByNodeName: Map; + resDataByPath = new Map(); + selectionPathsByEntityNodeName = new Map>(); + unresolvablePaths = new Set(); + + constructor({ index, nodeResolutionDataByNodeName }: RootFieldWalkerParams) { + this.index = index; + this.resDataByNodeName = nodeResolutionDataByNodeName; + } + + visitEdge({ edge, selectionPath }: VisitEdgeParams): VisitNodeResult { + if (edge.isInaccessible || edge.node.isInaccessible) { + return { visited: false, areDescendantsResolved: true }; + } + if (edge.node.isLeaf) { + return { visited: true, areDescendantsResolved: true }; + } + if (!add(edge.visitedIndices, this.index)) { + return { visited: true, areDescendantsResolved: true }; + } + /* Check for siblings rather than entity edges. + * This is because resolvable: false and unsatisfied edges are not propagated. + * In these cases, the error message explains the specific reason the jump cannot happen. + */ + if (edge.node.hasEntitySiblings) { + /* This check prevents infinite loops. + * The entity is only propagated into this map after it has been assessed for resolvability. + * Consequently, only a valid node would appear here. + * */ + if (this.resDataByNodeName.has(edge.node.nodeName)) { + return { visited: true, areDescendantsResolved: true }; + } + getValueOrDefault(this.selectionPathsByEntityNodeName, edge.node.nodeName, () => new Set()).add( + `${selectionPath}.${edge.edgeName}`, + ); + return { visited: true, areDescendantsResolved: false }; + } + if (edge.node.isAbstract) { + return this.visitAbstractNode({ + node: edge.node, + selectionPath: `${selectionPath}.${edge.edgeName}`, + }); + } + return this.visitConcreteNode({ + node: edge.node, + selectionPath: `${selectionPath}.${edge.edgeName}`, + }); + } + + visitAbstractNode({ node, selectionPath }: VisitNodeParams): VisitNodeResult { + if (node.headToTailEdges.size < 1) { + return { visited: true, areDescendantsResolved: true }; + } + let resolvedDescendents = 0; + for (const edge of node.headToTailEdges.values()) { + // Propagate any one of the abstract path failures. + if (this.visitEdge({ edge, selectionPath }).areDescendantsResolved) { + resolvedDescendents += 1; + } + } + return { + visited: true, + areDescendantsResolved: resolvedDescendents === node.headToTailEdges.size, + }; + } + + visitConcreteNode({ node, selectionPath }: VisitNodeParams): VisitNodeResult { + if (node.headToTailEdges.size < 1) { + node.isLeaf = true; + return { visited: true, areDescendantsResolved: true }; + } + const existingData = this.resDataByNodeName.get(node.nodeName); + if (existingData) { + return { visited: true, areDescendantsResolved: existingData.areDescendantsResolved() }; + } + const data = this.getNodeResolutionData({ node, selectionPath }); + if (data.isResolved() && data.areDescendantsResolved()) { + return { + visited: true, + areDescendantsResolved: true, + }; + } + for (const [fieldName, edge] of node.headToTailEdges) { + const { visited, areDescendantsResolved } = this.visitEdge({ edge, selectionPath }); + this.propagateVisitedField({ + areDescendantsResolved, + fieldName, + data, + node, + selectionPath, + visited, + }); + } + if (data.isResolved()) { + this.unresolvablePaths.delete(selectionPath); + } else { + this.unresolvablePaths.add(selectionPath); + } + return { + visited: true, + areDescendantsResolved: data.areDescendantsResolved(), + }; + } + + visitSharedEdge({ edge, selectionPath }: VisitEdgeParams): VisitNodeResult { + if (edge.isInaccessible || edge.node.isInaccessible) { + return { visited: false, areDescendantsResolved: true }; + } + if (edge.node.isLeaf) { + return { visited: true, areDescendantsResolved: true }; + } + if (!add(edge.visitedIndices, this.index)) { + return { visited: true, areDescendantsResolved: true }; + } + /* Check for siblings rather than entity edges. + * This is because resolvable: false and unsatisfied edges are not propagated. + * In these cases, the error message explains the specific reason the jump cannot happen. + */ + if (edge.node.hasEntitySiblings) { + getValueOrDefault(this.selectionPathsByEntityNodeName, edge.node.nodeName, () => new Set()).add( + `${selectionPath}.${edge.edgeName}`, + ); + } + if (edge.node.isAbstract) { + return this.visitSharedAbstractNode({ + node: edge.node, + selectionPath: `${selectionPath}.${edge.edgeName}`, + }); + } + return this.visitSharedConcreteNode({ + node: edge.node, + selectionPath: `${selectionPath}.${edge.edgeName}`, + }); + } + + visitSharedAbstractNode({ node, selectionPath }: VisitNodeParams): VisitNodeResult { + if (node.headToTailEdges.size < 1) { + return { visited: true, areDescendantsResolved: true }; + } + let resolvedDescendents = 0; + for (const edge of node.headToTailEdges.values()) { + // Propagate any one of the abstract path failures. + if (this.visitSharedEdge({ edge, selectionPath }).areDescendantsResolved) { + resolvedDescendents += 1; + } + } + return { + visited: true, + areDescendantsResolved: resolvedDescendents === node.headToTailEdges.size, + }; + } + + visitSharedConcreteNode({ node, selectionPath }: VisitNodeParams): VisitNodeResult { + if (node.headToTailEdges.size < 1) { + node.isLeaf = true; + return { visited: true, areDescendantsResolved: true }; + } + const data = this.getSharedNodeResolutionData({ node, selectionPath }); + if (data.isResolved() && data.areDescendantsResolved()) { + return { + visited: true, + areDescendantsResolved: true, + }; + } + for (const [fieldName, edge] of node.headToTailEdges) { + const { visited, areDescendantsResolved } = this.visitSharedEdge({ edge, selectionPath }); + this.propagateSharedVisitedField({ + areDescendantsResolved, + data, + fieldName, + node, + visited, + }); + } + if (data.isResolved()) { + this.unresolvablePaths.delete(selectionPath); + } else { + this.unresolvablePaths.add(selectionPath); + } + return { + visited: true, + areDescendantsResolved: data.areDescendantsResolved(), + }; + } + getNodeResolutionData({ node, selectionPath }: GetNodeResolutionDataParams): NodeResolutionData { + const data = getValueOrDefault(this.resDataByNodeName, node.nodeName, () => new NodeResolutionData(node)); + getValueOrDefault(this.resDataByPath, selectionPath, () => data.copy()); + return data; + } + + getSharedNodeResolutionData({ node, selectionPath }: GetNodeResolutionDataParams): NodeResolutionData { + const dataByNodeName = getValueOrDefault(this.resDataByNodeName, node.nodeName, () => new NodeResolutionData(node)); + return getValueOrDefault(this.resDataByPath, selectionPath, () => dataByNodeName.copy()); + } + + propagateVisitedField({ + areDescendantsResolved, + data, + fieldName, + node, + selectionPath, + visited, + }: PropagateVisitedFieldParams) { + if (!visited) { + return; + } + data.addResolvedFieldName(fieldName); + const dataBySelectionPath = getValueOrDefault( + this.resDataByPath, + selectionPath, + () => new NodeResolutionData(node), + ); + dataBySelectionPath.addResolvedFieldName(fieldName); + if (!areDescendantsResolved) { + return; + } + data.resolvedDescendantNames.add(fieldName); + dataBySelectionPath.resolvedDescendantNames.add(fieldName); + } + + propagateSharedVisitedField({ + areDescendantsResolved, + data, + fieldName, + node, + visited, + }: PropagateVisitedSharedFieldParams) { + if (!visited) { + return; + } + data.addResolvedFieldName(fieldName); + const dataByNodeName = getValueOrDefault(this.resDataByNodeName, node.nodeName, () => new NodeResolutionData(node)); + dataByNodeName.addResolvedFieldName(fieldName); + if (!areDescendantsResolved) { + return; + } + data.resolvedDescendantNames.add(fieldName); + dataByNodeName.resolvedDescendantNames.add(fieldName); + } + + visitRootFieldEdges({ edges, rootTypeName }: VisitRootFieldEdgesParams): VisitNodeResult { + const isShared = edges.length > 1; + for (const edge of edges) { + if (edge.isInaccessible) { + return { visited: false, areDescendantsResolved: false }; + } + const result = isShared + ? this.visitSharedEdge({ edge, selectionPath: rootTypeName }) + : this.visitEdge({ edge, selectionPath: rootTypeName }); + if (result.areDescendantsResolved) { + return result; + } + } + return { visited: true, areDescendantsResolved: false }; + } +} diff --git a/composition/src/resolvability-graph/walker/root-field-walkers/types/params.ts b/composition/src/resolvability-graph/walker/root-field-walkers/types/params.ts new file mode 100644 index 0000000000..2f70c3ec57 --- /dev/null +++ b/composition/src/resolvability-graph/walker/root-field-walkers/types/params.ts @@ -0,0 +1,45 @@ +import { Edge, GraphNode } from '../../../graph-nodes'; +import { FieldName, NodeName, SelectionPath, TypeName } from '../../../types/types'; +import { NodeResolutionData } from '../../../node-resolution-data/node-resolution-data'; + +export type RootFieldWalkerParams = { + index: number; + nodeResolutionDataByNodeName: Map; +}; + +export type VisitEdgeParams = { + edge: Edge; + selectionPath: SelectionPath; +}; + +export type VisitNodeParams = { + node: GraphNode; + selectionPath: SelectionPath; +}; + +export type PropagateVisitedFieldParams = { + areDescendantsResolved: boolean; + data: NodeResolutionData; + fieldName: FieldName; + node: GraphNode; + selectionPath: SelectionPath; + visited: boolean; +}; + +export type PropagateVisitedSharedFieldParams = { + areDescendantsResolved: boolean; + data: NodeResolutionData; + fieldName: FieldName; + node: GraphNode; + visited: boolean; +}; + +export type VisitRootFieldEdgesParams = { + edges: Array; + rootTypeName: TypeName; +}; + +export type GetNodeResolutionDataParams = { + node: GraphNode; + selectionPath: SelectionPath; +}; diff --git a/composition/src/utils/utils.ts b/composition/src/utils/utils.ts index dded8209d6..4b0ae271cb 100644 --- a/composition/src/utils/utils.ts +++ b/composition/src/utils/utils.ts @@ -248,8 +248,8 @@ export function addMapEntries(source: Map, target: Map) { } } -export function getFirstEntry(hashSet: Set | Map): V | undefined { - const { value, done } = hashSet.values().next(); +export function getFirstEntry(collection: Set | Map): V | undefined { + const { value, done } = collection.values().next(); if (done) { return; } diff --git a/composition/src/v1/federation/federation-factory.ts b/composition/src/v1/federation/federation-factory.ts index 295494ff52..dc76448467 100644 --- a/composition/src/v1/federation/federation-factory.ts +++ b/composition/src/v1/federation/federation-factory.ts @@ -2797,9 +2797,9 @@ export class FederationFactory { * This should only be done for troubleshooting purposes. * */ if (!this.disableResolvabilityValidation && this.internalSubgraphBySubgraphName.size > 1) { - const resolvabilityErrors = this.internalGraph.validate(); - if (resolvabilityErrors.length > 0) { - return { errors: resolvabilityErrors, success: false, warnings: this.warnings }; + const validationResult = this.internalGraph.validate(); + if (!validationResult.success) { + return { errors: validationResult.errors, success: false, warnings: this.warnings }; } } const newRouterAST: DocumentNode = { From 1cb8e76ee74a5ddf370fb97fb9b66cb180d45dcf Mon Sep 17 00:00:00 2001 From: Aenimus Date: Tue, 30 Sep 2025 23:06:24 +0100 Subject: [PATCH 3/5] chore: add tests and clean up --- composition-go/index.global.js | 338 +++--- .../constants/string-constants.ts | 2 + composition/src/resolvability-graph/graph.ts | 278 ++++- .../node-resolution-data.ts | 15 +- .../node-resolution-data/types/params.ts | 2 +- .../src/resolvability-graph/types/params.ts | 16 +- .../src/resolvability-graph/types/types.ts | 15 - .../resolvability-graph/utils/types/params.ts | 33 +- .../resolvability-graph/utils/types/types.ts | 12 + .../src/resolvability-graph/utils/utils.ts | 138 ++- .../walker/entity-walker/entity-walker.ts | 6 +- .../root-field-walkers/root-field-walker.ts | 25 +- composition/tests/v1/resolvability.test.ts | 1065 +++++++++++++++-- 13 files changed, 1528 insertions(+), 417 deletions(-) diff --git a/composition-go/index.global.js b/composition-go/index.global.js index 0c6414963e..a2383b3631 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 rJ=Object.create;var gd=Object.defineProperty,iJ=Object.defineProperties,aJ=Object.getOwnPropertyDescriptor,sJ=Object.getOwnPropertyDescriptors,oJ=Object.getOwnPropertyNames,FA=Object.getOwnPropertySymbols,uJ=Object.getPrototypeOf,PA=Object.prototype.hasOwnProperty,cJ=Object.prototype.propertyIsEnumerable;var un=Math.pow,gy=(e,t,n)=>t in e?gd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,x=(e,t)=>{for(var n in t||(t={}))PA.call(t,n)&&gy(e,n,t[n]);if(FA)for(var n of FA(t))cJ.call(t,n)&&gy(e,n,t[n]);return e},Y=(e,t)=>iJ(e,sJ(t));var Lu=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),um=(e,t)=>{for(var n in t)gd(e,n,{get:t[n],enumerable:!0})},wA=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of oJ(t))!PA.call(e,i)&&i!==n&&gd(e,i,{get:()=>t[i],enumerable:!(r=aJ(t,i))||r.enumerable});return e};var us=(e,t,n)=>(n=e!=null?rJ(uJ(e)):{},wA(t||!e||!e.__esModule?gd(n,"default",{value:e,enumerable:!0}):n,e)),cm=e=>wA(gd({},"__esModule",{value:!0}),e);var _=(e,t,n)=>(gy(e,typeof t!="symbol"?t+"":t,n),n);var Oi=(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=Lu(()=>{"use strict"});var O={};um(O,{_debugEnd:()=>IR,_debugProcess:()=>yR,_events:()=>UR,_eventsCount:()=>kR,_exiting:()=>eR,_fatalExceptions:()=>NR,_getActiveHandles:()=>iR,_getActiveRequests:()=>rR,_kill:()=>sR,_linkedBinding:()=>XA,_maxListeners:()=>BR,_preload_modules:()=>wR,_rawDebug:()=>zA,_startProfilerIdleNotifier:()=>gR,_stopProfilerIdleNotifier:()=>_R,_tickCallback:()=>hR,abort:()=>DR,addListener:()=>MR,allowedNodeEnvironmentFlags:()=>pR,arch:()=>kA,argv:()=>qA,argv0:()=>PR,assert:()=>fR,binding:()=>$A,chdir:()=>JA,config:()=>tR,cpuUsage:()=>pm,cwd:()=>YA,debugPort:()=>FR,default:()=>YR,dlopen:()=>nR,domain:()=>ZA,emit:()=>KR,emitWarning:()=>GA,env:()=>xA,execArgv:()=>VA,execPath:()=>RR,exit:()=>lR,features:()=>mR,hasUncaughtExceptionCaptureCallback:()=>ER,hrtime:()=>dm,kill:()=>cR,listeners:()=>QR,memoryUsage:()=>uR,moduleLoadList:()=>WA,nextTick:()=>CA,off:()=>qR,on:()=>ls,once:()=>xR,openStdin:()=>dR,pid:()=>bR,platform:()=>MA,ppid:()=>AR,prependListener:()=>GR,prependOnceListener:()=>$R,reallyExit:()=>aR,release:()=>HA,removeAllListeners:()=>jR,removeListener:()=>VR,resourceUsage:()=>oR,setSourceMapsEnabled:()=>LR,setUncaughtExceptionCaptureCallback:()=>TR,stderr:()=>SR,stdin:()=>OR,stdout:()=>vR,title:()=>UA,umask:()=>QA,uptime:()=>CR,version:()=>jA,versions:()=>KA});function Sy(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function lJ(){!Jc||!Cu||(Jc=!1,Cu.length?cs=Cu.concat(cs):lm=-1,cs.length&&LA())}function LA(){if(!Jc){var e=setTimeout(lJ,0);Jc=!0;for(var t=cs.length;t;){for(Cu=cs,cs=[];++lm1)for(var n=1;n{"use strict";m();T();N();cs=[],Jc=!1,lm=-1;BA.prototype.run=function(){this.fun.apply(null,this.array)};UA="browser",kA="x64",MA="browser",xA={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},qA=["/usr/bin/node"],VA=[],jA="v16.8.0",KA={},GA=function(e,t){console.warn((t?t+": ":"")+e)},$A=function(e){Sy("binding")},QA=function(e){return 0},YA=function(){return"/"},JA=function(e){},HA={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};zA=yr,WA=[];ZA={},eR=!1,tR={};aR=yr,sR=yr,pm=function(){return{}},oR=pm,uR=pm,cR=yr,lR=yr,dR=yr,pR={};mR={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},NR=yr,TR=yr;hR=yr,yR=yr,IR=yr,gR=yr,_R=yr,vR=void 0,SR=void 0,OR=void 0,DR=yr,bR=2,AR=1,RR="/bin/usr/node",FR=9229,PR="node",wR=[],LR=yr,Jo={now:typeof performance!="undefined"?performance.now.bind(performance):void 0,timing:typeof performance!="undefined"?performance.timing:void 0};Jo.now===void 0&&(_y=Date.now(),Jo.timing&&Jo.timing.navigationStart&&(_y=Jo.timing.navigationStart),Jo.now=()=>Date.now()-_y);vy=1e9;dm.bigint=function(e){var t=dm(e);return typeof BigInt=="undefined"?t[0]*vy+t[1]:BigInt(t[0]*vy)+BigInt(t[1])};BR=10,UR={},kR=0;MR=ls,xR=ls,qR=ls,VR=ls,jR=ls,KR=yr,GR=ls,$R=ls;YR={version:jA,versions:KA,arch:kA,platform:MA,release:HA,_rawDebug:zA,moduleLoadList:WA,binding:$A,_linkedBinding:XA,_events:UR,_eventsCount:kR,_maxListeners:BR,on:ls,addListener:MR,once:xR,off:qR,removeListener:VR,removeAllListeners:jR,emit:KR,prependListener:GR,prependOnceListener:$R,listeners:QR,domain:ZA,_exiting:eR,config:tR,dlopen:nR,uptime:CR,_getActiveRequests:rR,_getActiveHandles:iR,reallyExit:aR,_kill:sR,cpuUsage:pm,resourceUsage:oR,memoryUsage:uR,kill:cR,exit:lR,openStdin:dR,allowedNodeEnvironmentFlags:pR,assert:fR,features:mR,_fatalExceptions:NR,setUncaughtExceptionCaptureCallback:TR,hasUncaughtExceptionCaptureCallback:ER,emitWarning:GA,nextTick:CA,_tickCallback:hR,_debugProcess:yR,_debugEnd:IR,_startProfilerIdleNotifier:gR,_stopProfilerIdleNotifier:_R,stdout:vR,stdin:OR,stderr:SR,abort:DR,umask:QA,chdir:JA,cwd:YA,env:xA,title:UA,argv:qA,execArgv:VA,pid:bR,ppid:AR,execPath:RR,debugPort:FR,hrtime:dm,argv0:PR,_preload_modules:wR,setSourceMapsEnabled:LR}});var N=Lu(()=>{"use strict";JR()});function dJ(){if(HR)return _d;HR=!0,_d.byteLength=c,_d.toByteArray=d,_d.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 k=v.indexOf("=");k===-1&&(k=P);var K=k===P?0:4-k%4;return[k,K]}function c(v){var P=o(v),k=P[0],K=P[1];return(k+K)*3/4-K}function l(v,P,k){return(P+k)*3/4-k}function d(v){var P,k=o(v),K=k[0],Q=k[1],se=new n(l(v,K,Q)),ie=0,Te=Q>0?K-4:K,de;for(de=0;de>16&255,se[ie++]=P>>8&255,se[ie++]=P&255;return Q===2&&(P=t[v.charCodeAt(de)]<<2|t[v.charCodeAt(de+1)]>>4,se[ie++]=P&255),Q===1&&(P=t[v.charCodeAt(de)]<<10|t[v.charCodeAt(de+1)]<<4|t[v.charCodeAt(de+2)]>>2,se[ie++]=P>>8&255,se[ie++]=P&255),se}function f(v){return e[v>>18&63]+e[v>>12&63]+e[v>>6&63]+e[v&63]}function y(v,P,k){for(var K,Q=[],se=P;seTe?Te:ie+se));return K===1?(P=v[k-1],Q.push(e[P>>2]+e[P<<4&63]+"==")):K===2&&(P=(v[k-2]<<8)+v[k-1],Q.push(e[P>>10]+e[P>>4&63]+e[P<<2&63]+"=")),Q.join("")}return _d}function pJ(){if(zR)return fm;zR=!0;return fm.read=function(e,t,n,r,i){var a,o,c=i*8-r-1,l=(1<>1,f=-7,y=n?i-1:0,I=n?-1:1,v=e[t+y];for(y+=I,a=v&(1<<-f)-1,v>>=-f,f+=c;f>0;a=a*256+e[t+y],y+=I,f-=8);for(o=a&(1<<-f)-1,a>>=-f,f+=r;f>0;o=o*256+e[t+y],y+=I,f-=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)},fm.write=function(e,t,n,r,i,a){var o,c,l,d=a*8-i-1,f=(1<>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:a-1,P=r?1:-1,k=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=f):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+y>=1?t+=I/l:t+=I*Math.pow(2,1-y),t*l>=2&&(o++,l/=2),o+y>=f?(c=0,o=f):o+y>=1?(c=(t*l-1)*Math.pow(2,i),o=o+y):(c=t*Math.pow(2,y-1)*Math.pow(2,i),o=0));i>=8;e[n+v]=c&255,v+=P,c/=256,i-=8);for(o=o<0;e[n+v]=o&255,v+=P,o/=256,d-=8);e[n+v-P]|=k*128},fm}function fJ(){if(WR)return Bu;WR=!0;let e=dJ(),t=pJ(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Bu.Buffer=o,Bu.SlowBuffer=Q,Bu.INSPECT_MAX_BYTES=50;let r=2147483647;Bu.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 R=new Uint8Array(1),h={foo:function(){return 42}};return Object.setPrototypeOf(h,Uint8Array.prototype),Object.setPrototypeOf(R,h),R.foo()===42}catch(R){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(R){if(R>r)throw new RangeError('The value "'+R+'" is invalid for option "size"');let h=new Uint8Array(R);return Object.setPrototypeOf(h,o.prototype),h}function o(R,h,g){if(typeof R=="number"){if(typeof h=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(R)}return c(R,h,g)}o.poolSize=8192;function c(R,h,g){if(typeof R=="string")return y(R,h);if(ArrayBuffer.isView(R))return v(R);if(R==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof R);if(Vt(R,ArrayBuffer)||R&&Vt(R.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Vt(R,SharedArrayBuffer)||R&&Vt(R.buffer,SharedArrayBuffer)))return P(R,h,g);if(typeof R=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let C=R.valueOf&&R.valueOf();if(C!=null&&C!==R)return o.from(C,h,g);let G=k(R);if(G)return G;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof R[Symbol.toPrimitive]=="function")return o.from(R[Symbol.toPrimitive]("string"),h,g);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof R)}o.from=function(R,h,g){return c(R,h,g)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(R){if(typeof R!="number")throw new TypeError('"size" argument must be of type number');if(R<0)throw new RangeError('The value "'+R+'" is invalid for option "size"')}function d(R,h,g){return l(R),R<=0?a(R):h!==void 0?typeof g=="string"?a(R).fill(h,g):a(R).fill(h):a(R)}o.alloc=function(R,h,g){return d(R,h,g)};function f(R){return l(R),a(R<0?0:K(R)|0)}o.allocUnsafe=function(R){return f(R)},o.allocUnsafeSlow=function(R){return f(R)};function y(R,h){if((typeof h!="string"||h==="")&&(h="utf8"),!o.isEncoding(h))throw new TypeError("Unknown encoding: "+h);let g=se(R,h)|0,C=a(g),G=C.write(R,h);return G!==g&&(C=C.slice(0,G)),C}function I(R){let h=R.length<0?0:K(R.length)|0,g=a(h);for(let C=0;C=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return R|0}function Q(R){return+R!=R&&(R=0),o.alloc(+R)}o.isBuffer=function(h){return h!=null&&h._isBuffer===!0&&h!==o.prototype},o.compare=function(h,g){if(Vt(h,Uint8Array)&&(h=o.from(h,h.offset,h.byteLength)),Vt(g,Uint8Array)&&(g=o.from(g,g.offset,g.byteLength)),!o.isBuffer(h)||!o.isBuffer(g))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(h===g)return 0;let C=h.length,G=g.length;for(let te=0,pe=Math.min(C,G);teG.length?(o.isBuffer(pe)||(pe=o.from(pe)),pe.copy(G,te)):Uint8Array.prototype.set.call(G,pe,te);else if(o.isBuffer(pe))pe.copy(G,te);else throw new TypeError('"list" argument must be an Array of Buffers');te+=pe.length}return G};function se(R,h){if(o.isBuffer(R))return R.length;if(ArrayBuffer.isView(R)||Vt(R,ArrayBuffer))return R.byteLength;if(typeof R!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof R);let g=R.length,C=arguments.length>2&&arguments[2]===!0;if(!C&&g===0)return 0;let G=!1;for(;;)switch(h){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":return Xa(R).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return mr(R).length;default:if(G)return C?-1:Xa(R).length;h=(""+h).toLowerCase(),G=!0}}o.byteLength=se;function ie(R,h,g){let C=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,h>>>=0,g<=h))return"";for(R||(R="utf8");;)switch(R){case"hex":return Rr(this,h,g);case"utf8":case"utf-8":return tn(this,h,g);case"ascii":return mn(this,h,g);case"latin1":case"binary":return Ar(this,h,g);case"base64":return en(this,h,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return kn(this,h,g);default:if(C)throw new TypeError("Unknown encoding: "+R);R=(R+"").toLowerCase(),C=!0}}o.prototype._isBuffer=!0;function Te(R,h,g){let C=R[h];R[h]=R[g],R[g]=C}o.prototype.swap16=function(){let h=this.length;if(h%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let g=0;gg&&(h+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(h,g,C,G,te){if(Vt(h,Uint8Array)&&(h=o.from(h,h.offset,h.byteLength)),!o.isBuffer(h))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof h);if(g===void 0&&(g=0),C===void 0&&(C=h?h.length:0),G===void 0&&(G=0),te===void 0&&(te=this.length),g<0||C>h.length||G<0||te>this.length)throw new RangeError("out of range index");if(G>=te&&g>=C)return 0;if(G>=te)return-1;if(g>=C)return 1;if(g>>>=0,C>>>=0,G>>>=0,te>>>=0,this===h)return 0;let pe=te-G,ft=C-g,Nn=Math.min(pe,ft),on=this.slice(G,te),yn=h.slice(g,C);for(let nn=0;nn2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,Nr(g)&&(g=G?0:R.length-1),g<0&&(g=R.length+g),g>=R.length){if(G)return-1;g=R.length-1}else if(g<0)if(G)g=0;else return-1;if(typeof h=="string"&&(h=o.from(h,C)),o.isBuffer(h))return h.length===0?-1:Re(R,h,g,C,G);if(typeof h=="number")return h=h&255,typeof Uint8Array.prototype.indexOf=="function"?G?Uint8Array.prototype.indexOf.call(R,h,g):Uint8Array.prototype.lastIndexOf.call(R,h,g):Re(R,[h],g,C,G);throw new TypeError("val must be string, number or Buffer")}function Re(R,h,g,C,G){let te=1,pe=R.length,ft=h.length;if(C!==void 0&&(C=String(C).toLowerCase(),C==="ucs2"||C==="ucs-2"||C==="utf16le"||C==="utf-16le")){if(R.length<2||h.length<2)return-1;te=2,pe/=2,ft/=2,g/=2}function Nn(yn,nn){return te===1?yn[nn]:yn.readUInt16BE(nn*te)}let on;if(G){let yn=-1;for(on=g;onpe&&(g=pe-ft),on=g;on>=0;on--){let yn=!0;for(let nn=0;nnG&&(C=G)):C=G;let te=h.length;C>te/2&&(C=te/2);let pe;for(pe=0;pe>>0,isFinite(C)?(C=C>>>0,G===void 0&&(G="utf8")):(G=C,C=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let te=this.length-g;if((C===void 0||C>te)&&(C=te),h.length>0&&(C<0||g<0)||g>this.length)throw new RangeError("Attempt to write outside buffer bounds");G||(G="utf8");let pe=!1;for(;;)switch(G){case"hex":return xe(this,h,g,C);case"utf8":case"utf-8":return tt(this,h,g,C);case"ascii":case"latin1":case"binary":return ee(this,h,g,C);case"base64":return Se(this,h,g,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gt(this,h,g,C);default:if(pe)throw new TypeError("Unknown encoding: "+G);G=(""+G).toLowerCase(),pe=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function en(R,h,g){return h===0&&g===R.length?e.fromByteArray(R):e.fromByteArray(R.slice(h,g))}function tn(R,h,g){g=Math.min(R.length,g);let C=[],G=h;for(;G239?4:te>223?3:te>191?2:1;if(G+ft<=g){let Nn,on,yn,nn;switch(ft){case 1:te<128&&(pe=te);break;case 2:Nn=R[G+1],(Nn&192)===128&&(nn=(te&31)<<6|Nn&63,nn>127&&(pe=nn));break;case 3:Nn=R[G+1],on=R[G+2],(Nn&192)===128&&(on&192)===128&&(nn=(te&15)<<12|(Nn&63)<<6|on&63,nn>2047&&(nn<55296||nn>57343)&&(pe=nn));break;case 4:Nn=R[G+1],on=R[G+2],yn=R[G+3],(Nn&192)===128&&(on&192)===128&&(yn&192)===128&&(nn=(te&15)<<18|(Nn&63)<<12|(on&63)<<6|yn&63,nn>65535&&nn<1114112&&(pe=nn))}}pe===null?(pe=65533,ft=1):pe>65535&&(pe-=65536,C.push(pe>>>10&1023|55296),pe=56320|pe&1023),C.push(pe),G+=ft}return Qt(C)}let bn=4096;function Qt(R){let h=R.length;if(h<=bn)return String.fromCharCode.apply(String,R);let g="",C=0;for(;CC)&&(g=C);let G="";for(let te=h;teC&&(h=C),g<0?(g+=C,g<0&&(g=0)):g>C&&(g=C),gg)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(h,g,C){h=h>>>0,g=g>>>0,C||zt(h,g,this.length);let G=this[h],te=1,pe=0;for(;++pe>>0,g=g>>>0,C||zt(h,g,this.length);let G=this[h+--g],te=1;for(;g>0&&(te*=256);)G+=this[h+--g]*te;return G},o.prototype.readUint8=o.prototype.readUInt8=function(h,g){return h=h>>>0,g||zt(h,1,this.length),this[h]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(h,g){return h=h>>>0,g||zt(h,2,this.length),this[h]|this[h+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(h,g){return h=h>>>0,g||zt(h,2,this.length),this[h]<<8|this[h+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),(this[h]|this[h+1]<<8|this[h+2]<<16)+this[h+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),this[h]*16777216+(this[h+1]<<16|this[h+2]<<8|this[h+3])},o.prototype.readBigUInt64LE=Ia(function(h){h=h>>>0,nt(h,"offset");let g=this[h],C=this[h+7];(g===void 0||C===void 0)&&Rt(h,this.length-8);let G=g+this[++h]*un(2,8)+this[++h]*un(2,16)+this[++h]*un(2,24),te=this[++h]+this[++h]*un(2,8)+this[++h]*un(2,16)+C*un(2,24);return BigInt(G)+(BigInt(te)<>>0,nt(h,"offset");let g=this[h],C=this[h+7];(g===void 0||C===void 0)&&Rt(h,this.length-8);let G=g*un(2,24)+this[++h]*un(2,16)+this[++h]*un(2,8)+this[++h],te=this[++h]*un(2,24)+this[++h]*un(2,16)+this[++h]*un(2,8)+C;return(BigInt(G)<>>0,g=g>>>0,C||zt(h,g,this.length);let G=this[h],te=1,pe=0;for(;++pe=te&&(G-=Math.pow(2,8*g)),G},o.prototype.readIntBE=function(h,g,C){h=h>>>0,g=g>>>0,C||zt(h,g,this.length);let G=g,te=1,pe=this[h+--G];for(;G>0&&(te*=256);)pe+=this[h+--G]*te;return te*=128,pe>=te&&(pe-=Math.pow(2,8*g)),pe},o.prototype.readInt8=function(h,g){return h=h>>>0,g||zt(h,1,this.length),this[h]&128?(255-this[h]+1)*-1:this[h]},o.prototype.readInt16LE=function(h,g){h=h>>>0,g||zt(h,2,this.length);let C=this[h]|this[h+1]<<8;return C&32768?C|4294901760:C},o.prototype.readInt16BE=function(h,g){h=h>>>0,g||zt(h,2,this.length);let C=this[h+1]|this[h]<<8;return C&32768?C|4294901760:C},o.prototype.readInt32LE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24},o.prototype.readInt32BE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]},o.prototype.readBigInt64LE=Ia(function(h){h=h>>>0,nt(h,"offset");let g=this[h],C=this[h+7];(g===void 0||C===void 0)&&Rt(h,this.length-8);let G=this[h+4]+this[h+5]*un(2,8)+this[h+6]*un(2,16)+(C<<24);return(BigInt(G)<>>0,nt(h,"offset");let g=this[h],C=this[h+7];(g===void 0||C===void 0)&&Rt(h,this.length-8);let G=(g<<24)+this[++h]*un(2,16)+this[++h]*un(2,8)+this[++h];return(BigInt(G)<>>0,g||zt(h,4,this.length),t.read(this,h,!0,23,4)},o.prototype.readFloatBE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),t.read(this,h,!1,23,4)},o.prototype.readDoubleLE=function(h,g){return h=h>>>0,g||zt(h,8,this.length),t.read(this,h,!0,52,8)},o.prototype.readDoubleBE=function(h,g){return h=h>>>0,g||zt(h,8,this.length),t.read(this,h,!1,52,8)};function An(R,h,g,C,G,te){if(!o.isBuffer(R))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>G||hR.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(h,g,C,G){if(h=+h,g=g>>>0,C=C>>>0,!G){let ft=Math.pow(2,8*C)-1;An(this,h,g,C,ft,0)}let te=1,pe=0;for(this[g]=h&255;++pe>>0,C=C>>>0,!G){let ft=Math.pow(2,8*C)-1;An(this,h,g,C,ft,0)}let te=C-1,pe=1;for(this[g+te]=h&255;--te>=0&&(pe*=256);)this[g+te]=h/pe&255;return g+C},o.prototype.writeUint8=o.prototype.writeUInt8=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,1,255,0),this[g]=h&255,g+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,2,65535,0),this[g]=h&255,this[g+1]=h>>>8,g+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,2,65535,0),this[g]=h>>>8,this[g+1]=h&255,g+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,4,4294967295,0),this[g+3]=h>>>24,this[g+2]=h>>>16,this[g+1]=h>>>8,this[g]=h&255,g+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,4,4294967295,0),this[g]=h>>>24,this[g+1]=h>>>16,this[g+2]=h>>>8,this[g+3]=h&255,g+4};function ue(R,h,g,C,G){Ut(h,C,G,R,g,7);let te=Number(h&BigInt(4294967295));R[g++]=te,te=te>>8,R[g++]=te,te=te>>8,R[g++]=te,te=te>>8,R[g++]=te;let pe=Number(h>>BigInt(32)&BigInt(4294967295));return R[g++]=pe,pe=pe>>8,R[g++]=pe,pe=pe>>8,R[g++]=pe,pe=pe>>8,R[g++]=pe,g}function De(R,h,g,C,G){Ut(h,C,G,R,g,7);let te=Number(h&BigInt(4294967295));R[g+7]=te,te=te>>8,R[g+6]=te,te=te>>8,R[g+5]=te,te=te>>8,R[g+4]=te;let pe=Number(h>>BigInt(32)&BigInt(4294967295));return R[g+3]=pe,pe=pe>>8,R[g+2]=pe,pe=pe>>8,R[g+1]=pe,pe=pe>>8,R[g]=pe,g+8}o.prototype.writeBigUInt64LE=Ia(function(h,g=0){return ue(this,h,g,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=Ia(function(h,g=0){return De(this,h,g,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(h,g,C,G){if(h=+h,g=g>>>0,!G){let Nn=Math.pow(2,8*C-1);An(this,h,g,C,Nn-1,-Nn)}let te=0,pe=1,ft=0;for(this[g]=h&255;++te>0)-ft&255;return g+C},o.prototype.writeIntBE=function(h,g,C,G){if(h=+h,g=g>>>0,!G){let Nn=Math.pow(2,8*C-1);An(this,h,g,C,Nn-1,-Nn)}let te=C-1,pe=1,ft=0;for(this[g+te]=h&255;--te>=0&&(pe*=256);)h<0&&ft===0&&this[g+te+1]!==0&&(ft=1),this[g+te]=(h/pe>>0)-ft&255;return g+C},o.prototype.writeInt8=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,1,127,-128),h<0&&(h=255+h+1),this[g]=h&255,g+1},o.prototype.writeInt16LE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,2,32767,-32768),this[g]=h&255,this[g+1]=h>>>8,g+2},o.prototype.writeInt16BE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,2,32767,-32768),this[g]=h>>>8,this[g+1]=h&255,g+2},o.prototype.writeInt32LE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,4,2147483647,-2147483648),this[g]=h&255,this[g+1]=h>>>8,this[g+2]=h>>>16,this[g+3]=h>>>24,g+4},o.prototype.writeInt32BE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,4,2147483647,-2147483648),h<0&&(h=4294967295+h+1),this[g]=h>>>24,this[g+1]=h>>>16,this[g+2]=h>>>8,this[g+3]=h&255,g+4},o.prototype.writeBigInt64LE=Ia(function(h,g=0){return ue(this,h,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=Ia(function(h,g=0){return De(this,h,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ve(R,h,g,C,G,te){if(g+C>R.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function Ce(R,h,g,C,G){return h=+h,g=g>>>0,G||ve(R,h,g,4),t.write(R,h,g,C,23,4),g+4}o.prototype.writeFloatLE=function(h,g,C){return Ce(this,h,g,!0,C)},o.prototype.writeFloatBE=function(h,g,C){return Ce(this,h,g,!1,C)};function _t(R,h,g,C,G){return h=+h,g=g>>>0,G||ve(R,h,g,8),t.write(R,h,g,C,52,8),g+8}o.prototype.writeDoubleLE=function(h,g,C){return _t(this,h,g,!0,C)},o.prototype.writeDoubleBE=function(h,g,C){return _t(this,h,g,!1,C)},o.prototype.copy=function(h,g,C,G){if(!o.isBuffer(h))throw new TypeError("argument should be a Buffer");if(C||(C=0),!G&&G!==0&&(G=this.length),g>=h.length&&(g=h.length),g||(g=0),G>0&&G=this.length)throw new RangeError("Index out of range");if(G<0)throw new RangeError("sourceEnd out of bounds");G>this.length&&(G=this.length),h.length-g>>0,C=C===void 0?this.length:C>>>0,h||(h=0);let te;if(typeof h=="number")for(te=g;teun(2,32)?G=qe(String(g)):typeof g=="bigint"&&(G=String(g),(g>un(BigInt(2),BigInt(32))||g<-un(BigInt(2),BigInt(32)))&&(G=qe(G)),G+="n"),C+=` It must be ${h}. Received ${G}`,C},RangeError);function qe(R){let h="",g=R.length,C=R[0]==="-"?1:0;for(;g>=C+4;g-=3)h=`_${R.slice(g-3,g)}${h}`;return`${R.slice(0,g)}${h}`}function Ye(R,h,g){nt(h,"offset"),(R[h]===void 0||R[h+g]===void 0)&&Rt(h,R.length-(g+1))}function Ut(R,h,g,C,G,te){if(R>g||R3?h===0||h===BigInt(0)?ft=`>= 0${pe} and < 2${pe} ** ${(te+1)*8}${pe}`:ft=`>= -(2${pe} ** ${(te+1)*8-1}${pe}) and < 2 ** ${(te+1)*8-1}${pe}`:ft=`>= ${h}${pe} and <= ${g}${pe}`,new J.ERR_OUT_OF_RANGE("value",ft,R)}Ye(C,G,te)}function nt(R,h){if(typeof R!="number")throw new J.ERR_INVALID_ARG_TYPE(h,"number",R)}function Rt(R,h,g){throw Math.floor(R)!==R?(nt(R,g),new J.ERR_OUT_OF_RANGE(g||"offset","an integer",R)):h<0?new J.ERR_BUFFER_OUT_OF_BOUNDS:new J.ERR_OUT_OF_RANGE(g||"offset",`>= ${g?1:0} and <= ${h}`,R)}let Wa=/[^+/0-9A-Za-z-_]/g;function qr(R){if(R=R.split("=")[0],R=R.trim().replace(Wa,""),R.length<2)return"";for(;R.length%4!==0;)R=R+"=";return R}function Xa(R,h){h=h||1/0;let g,C=R.length,G=null,te=[];for(let pe=0;pe55295&&g<57344){if(!G){if(g>56319){(h-=3)>-1&&te.push(239,191,189);continue}else if(pe+1===C){(h-=3)>-1&&te.push(239,191,189);continue}G=g;continue}if(g<56320){(h-=3)>-1&&te.push(239,191,189),G=g;continue}g=(G-55296<<10|g-56320)+65536}else G&&(h-=3)>-1&&te.push(239,191,189);if(G=null,g<128){if((h-=1)<0)break;te.push(g)}else if(g<2048){if((h-=2)<0)break;te.push(g>>6|192,g&63|128)}else if(g<65536){if((h-=3)<0)break;te.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((h-=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 Cc(R){let h=[];for(let g=0;g>8,G=g%256,te.push(G),te.push(C);return te}function mr(R){return e.toByteArray(qr(R))}function ni(R,h,g,C){let G;for(G=0;G=h.length||G>=R.length);++G)h[G+g]=R[G];return G}function Vt(R,h){return R instanceof h||R!=null&&R.constructor!=null&&R.constructor.name!=null&&R.constructor.name===h.name}function Nr(R){return R!==R}let _u=function(){let R="0123456789abcdef",h=new Array(256);for(let g=0;g<16;++g){let C=g*16;for(let G=0;G<16;++G)h[C+G]=R[g]+R[G]}return h}();function Ia(R){return typeof BigInt=="undefined"?vu:R}function vu(){throw new Error("BigInt not supported")}return Bu}var _d,HR,fm,zR,Bu,WR,Uu,D,qde,Vde,XR=Lu(()=>{"use strict";m();T();N();_d={},HR=!1;fm={},zR=!1;Bu={},WR=!1;Uu=fJ();Uu.Buffer;Uu.SlowBuffer;Uu.INSPECT_MAX_BYTES;Uu.kMaxLength;D=Uu.Buffer,qde=Uu.INSPECT_MAX_BYTES,Vde=Uu.kMaxLength});var T=Lu(()=>{"use strict";XR()});var ZR=w(Hc=>{"use strict";m();T();N();Object.defineProperty(Hc,"__esModule",{value:!0});Hc.versionInfo=Hc.version=void 0;var mJ="16.9.0";Hc.version=mJ;var NJ=Object.freeze({major:16,minor:9,patch:0,preReleaseTag:null});Hc.versionInfo=NJ});var Lr=w(Oy=>{"use strict";m();T();N();Object.defineProperty(Oy,"__esModule",{value:!0});Oy.devAssert=TJ;function TJ(e,t){if(!!!e)throw new Error(t)}});var mm=w(Dy=>{"use strict";m();T();N();Object.defineProperty(Dy,"__esModule",{value:!0});Dy.isPromise=EJ;function EJ(e){return typeof(e==null?void 0:e.then)=="function"}});var Sa=w(by=>{"use strict";m();T();N();Object.defineProperty(by,"__esModule",{value:!0});by.isObjectLike=hJ;function hJ(e){return typeof e=="object"&&e!==null}});var Ir=w(Ay=>{"use strict";m();T();N();Object.defineProperty(Ay,"__esModule",{value:!0});Ay.invariant=yJ;function yJ(e,t){if(!!!e)throw new Error(t!=null?t:"Unexpected invariant triggered.")}});var Nm=w(Ry=>{"use strict";m();T();N();Object.defineProperty(Ry,"__esModule",{value:!0});Ry.getLocation=_J;var IJ=Ir(),gJ=/\r\n|[\n\r]/g;function _J(e,t){let n=0,r=1;for(let i of e.body.matchAll(gJ)){if(typeof i.index=="number"||(0,IJ.invariant)(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}});var Fy=w(Tm=>{"use strict";m();T();N();Object.defineProperty(Tm,"__esModule",{value:!0});Tm.printLocation=SJ;Tm.printSourceLocation=tF;var vJ=Nm();function SJ(e){return tF(e.source,(0,vJ.getLocation)(e.source,e.start))}function tF(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} -`,f=r.split(/\r\n|[\n\r]/g),y=f[i];if(y.length>120){let I=Math.floor(l/80),v=l%80,P=[];for(let k=0;k["|",k]),["|","^".padStart(v)],["|",P[I+1]]])}return d+eF([[`${o-1} |`,f[i-1]],[`${o} |`,y],["|","^".padStart(l)],[`${o+1} |`,f[i+1]]])}function eF(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(zc=>{"use strict";m();T();N();Object.defineProperty(zc,"__esModule",{value:!0});zc.GraphQLError=void 0;zc.formatError=AJ;zc.printError=bJ;var OJ=Sa(),nF=Nm(),rF=Fy();function DJ(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 Py=class e extends Error{constructor(t,...n){var r,i,a;let{nodes:o,source:c,positions:l,path:d,originalError:f,extensions:y}=DJ(n);super(t),this.name="GraphQLError",this.path=d!=null?d:void 0,this.originalError=f!=null?f:void 0,this.nodes=iF(Array.isArray(o)?o:o?[o]:void 0);let I=iF((r=this.nodes)===null||r===void 0?void 0:r.map(P=>P.loc).filter(P=>P!=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(P=>P.start),this.locations=l&&c?l.map(P=>(0,nF.getLocation)(c,P)):I==null?void 0:I.map(P=>(0,nF.getLocation)(P.source,P.start));let v=(0,OJ.isObjectLike)(f==null?void 0:f.extensions)?f==null?void 0:f.extensions:void 0;this.extensions=(a=y!=null?y: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}}),f!=null&&f.stack?Object.defineProperty(this,"stack",{value:f.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 bJ=Object.create;var Od=Object.defineProperty,AJ=Object.defineProperties,RJ=Object.getOwnPropertyDescriptor,PJ=Object.getOwnPropertyDescriptors,FJ=Object.getOwnPropertyNames,zA=Object.getOwnPropertySymbols,wJ=Object.getPrototypeOf,WA=Object.prototype.hasOwnProperty,LJ=Object.prototype.propertyIsEnumerable;var un=Math.pow,Ly=(e,t,n)=>t in e?Od(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,x=(e,t)=>{for(var n in t||(t={}))WA.call(t,n)&&Ly(e,n,t[n]);if(zA)for(var n of zA(t))LJ.call(t,n)&&Ly(e,n,t[n]);return e},Q=(e,t)=>AJ(e,PJ(t));var ku=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pm=(e,t)=>{for(var n in t)Od(e,n,{get:t[n],enumerable:!0})},XA=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of FJ(t))!WA.call(e,i)&&i!==n&&Od(e,i,{get:()=>t[i],enumerable:!(r=RJ(t,i))||r.enumerable});return e};var fs=(e,t,n)=>(n=e!=null?bJ(wJ(e)):{},XA(t||!e||!e.__esModule?Od(n,"default",{value:e,enumerable:!0}):n,e)),fm=e=>XA(Od({},"__esModule",{value:!0}),e);var _=(e,t,n)=>(Ly(e,typeof t!="symbol"?t+"":t,n),n),ZA=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Cy=(e,t,n)=>(ZA(e,t,"read from private field"),n?n.call(e):t.get(e)),eR=(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)},By=(e,t,n,r)=>(ZA(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Di=(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=ku(()=>{"use strict"});var O={};pm(O,{_debugEnd:()=>jR,_debugProcess:()=>VR,_events:()=>iP,_eventsCount:()=>aP,_exiting:()=>_R,_fatalExceptions:()=>kR,_getActiveHandles:()=>DR,_getActiveRequests:()=>OR,_kill:()=>AR,_linkedBinding:()=>IR,_maxListeners:()=>rP,_preload_modules:()=>eP,_rawDebug:()=>hR,_startProfilerIdleNotifier:()=>KR,_stopProfilerIdleNotifier:()=>GR,_tickCallback:()=>qR,abort:()=>JR,addListener:()=>sP,allowedNodeEnvironmentFlags:()=>CR,arch:()=>aR,argv:()=>uR,argv0:()=>ZR,assert:()=>BR,binding:()=>fR,chdir:()=>TR,config:()=>vR,cpuUsage:()=>Tm,cwd:()=>NR,debugPort:()=>XR,default:()=>NP,dlopen:()=>SR,domain:()=>gR,emit:()=>dP,emitWarning:()=>pR,env:()=>oR,execArgv:()=>cR,execPath:()=>WR,exit:()=>wR,features:()=>UR,hasUncaughtExceptionCaptureCallback:()=>xR,hrtime:()=>Nm,kill:()=>FR,listeners:()=>mP,memoryUsage:()=>PR,moduleLoadList:()=>yR,nextTick:()=>nR,off:()=>uP,on:()=>Ns,once:()=>oP,openStdin:()=>LR,pid:()=>HR,platform:()=>sR,ppid:()=>zR,prependListener:()=>pP,prependOnceListener:()=>fP,reallyExit:()=>bR,release:()=>ER,removeAllListeners:()=>lP,removeListener:()=>cP,resourceUsage:()=>RR,setSourceMapsEnabled:()=>tP,setUncaughtExceptionCaptureCallback:()=>MR,stderr:()=>QR,stdin:()=>YR,stdout:()=>$R,title:()=>iR,umask:()=>mR,uptime:()=>nP,version:()=>lR,versions:()=>dR});function My(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function CJ(){!Xc||!Mu||(Xc=!1,Mu.length?ms=Mu.concat(ms):mm=-1,ms.length&&tR())}function tR(){if(!Xc){var e=setTimeout(CJ,0);Xc=!0;for(var t=ms.length;t;){for(Mu=ms,ms=[];++mm1)for(var n=1;n{"use strict";m();T();N();ms=[],Xc=!1,mm=-1;rR.prototype.run=function(){this.fun.apply(null,this.array)};iR="browser",aR="x64",sR="browser",oR={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},uR=["/usr/bin/node"],cR=[],lR="v16.8.0",dR={},pR=function(e,t){console.warn((t?t+": ":"")+e)},fR=function(e){My("binding")},mR=function(e){return 0},NR=function(){return"/"},TR=function(e){},ER={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};hR=yr,yR=[];gR={},_R=!1,vR={};bR=yr,AR=yr,Tm=function(){return{}},RR=Tm,PR=Tm,FR=yr,wR=yr,LR=yr,CR={};UR={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},kR=yr,MR=yr;qR=yr,VR=yr,jR=yr,KR=yr,GR=yr,$R=void 0,QR=void 0,YR=void 0,JR=yr,HR=2,zR=1,WR="/bin/usr/node",XR=9229,ZR="node",eP=[],tP=yr,Xo={now:typeof performance!="undefined"?performance.now.bind(performance):void 0,timing:typeof performance!="undefined"?performance.timing:void 0};Xo.now===void 0&&(Uy=Date.now(),Xo.timing&&Xo.timing.navigationStart&&(Uy=Xo.timing.navigationStart),Xo.now=()=>Date.now()-Uy);ky=1e9;Nm.bigint=function(e){var t=Nm(e);return typeof BigInt=="undefined"?t[0]*ky+t[1]:BigInt(t[0]*ky)+BigInt(t[1])};rP=10,iP={},aP=0;sP=Ns,oP=Ns,uP=Ns,cP=Ns,lP=Ns,dP=yr,pP=Ns,fP=Ns;NP={version:lR,versions:dR,arch:aR,platform:sR,release:ER,_rawDebug:hR,moduleLoadList:yR,binding:fR,_linkedBinding:IR,_events:iP,_eventsCount:aP,_maxListeners:rP,on:Ns,addListener:sP,once:oP,off:uP,removeListener:cP,removeAllListeners:lP,emit:dP,prependListener:pP,prependOnceListener:fP,listeners:mP,domain:gR,_exiting:_R,config:vR,dlopen:SR,uptime:nP,_getActiveRequests:OR,_getActiveHandles:DR,reallyExit:bR,_kill:AR,cpuUsage:Tm,resourceUsage:RR,memoryUsage:PR,kill:FR,exit:wR,openStdin:LR,allowedNodeEnvironmentFlags:CR,assert:BR,features:UR,_fatalExceptions:kR,setUncaughtExceptionCaptureCallback:MR,hasUncaughtExceptionCaptureCallback:xR,emitWarning:pR,nextTick:nR,_tickCallback:qR,_debugProcess:VR,_debugEnd:jR,_startProfilerIdleNotifier:KR,_stopProfilerIdleNotifier:GR,stdout:$R,stdin:YR,stderr:QR,abort:JR,umask:mR,chdir:TR,cwd:NR,env:oR,title:iR,argv:uR,execArgv:cR,pid:HR,ppid:zR,execPath:WR,debugPort:XR,hrtime:Nm,argv0:ZR,_preload_modules:eP,setSourceMapsEnabled:tP}});var N=ku(()=>{"use strict";TP()});function BJ(){if(EP)return Dd;EP=!0,Dd.byteLength=c,Dd.toByteArray=d,Dd.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 k=v.indexOf("=");k===-1&&(k=F);var K=k===F?0:4-k%4;return[k,K]}function c(v){var F=o(v),k=F[0],K=F[1];return(k+K)*3/4-K}function l(v,F,k){return(F+k)*3/4-k}function d(v){var F,k=o(v),K=k[0],J=k[1],se=new n(l(v,K,J)),ie=0,Te=J>0?K-4:K,de;for(de=0;de>16&255,se[ie++]=F>>8&255,se[ie++]=F&255;return J===2&&(F=t[v.charCodeAt(de)]<<2|t[v.charCodeAt(de+1)]>>4,se[ie++]=F&255),J===1&&(F=t[v.charCodeAt(de)]<<10|t[v.charCodeAt(de+1)]<<4|t[v.charCodeAt(de+2)]>>2,se[ie++]=F>>8&255,se[ie++]=F&255),se}function f(v){return e[v>>18&63]+e[v>>12&63]+e[v>>6&63]+e[v&63]}function y(v,F,k){for(var K,J=[],se=F;seTe?Te:ie+se));return K===1?(F=v[k-1],J.push(e[F>>2]+e[F<<4&63]+"==")):K===2&&(F=(v[k-2]<<8)+v[k-1],J.push(e[F>>10]+e[F>>4&63]+e[F<<2&63]+"=")),J.join("")}return Dd}function UJ(){if(hP)return Em;hP=!0;return Em.read=function(e,t,n,r,i){var a,o,c=i*8-r-1,l=(1<>1,f=-7,y=n?i-1:0,I=n?-1:1,v=e[t+y];for(y+=I,a=v&(1<<-f)-1,v>>=-f,f+=c;f>0;a=a*256+e[t+y],y+=I,f-=8);for(o=a&(1<<-f)-1,a>>=-f,f+=r;f>0;o=o*256+e[t+y],y+=I,f-=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)},Em.write=function(e,t,n,r,i,a){var o,c,l,d=a*8-i-1,f=(1<>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:a-1,F=r?1:-1,k=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=f):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+y>=1?t+=I/l:t+=I*Math.pow(2,1-y),t*l>=2&&(o++,l/=2),o+y>=f?(c=0,o=f):o+y>=1?(c=(t*l-1)*Math.pow(2,i),o=o+y):(c=t*Math.pow(2,y-1)*Math.pow(2,i),o=0));i>=8;e[n+v]=c&255,v+=F,c/=256,i-=8);for(o=o<0;e[n+v]=o&255,v+=F,o/=256,d-=8);e[n+v-F]|=k*128},Em}function kJ(){if(yP)return xu;yP=!0;let e=BJ(),t=UJ(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;xu.Buffer=o,xu.SlowBuffer=J,xu.INSPECT_MAX_BYTES=50;let r=2147483647;xu.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 R=new Uint8Array(1),h={foo:function(){return 42}};return Object.setPrototypeOf(h,Uint8Array.prototype),Object.setPrototypeOf(R,h),R.foo()===42}catch(R){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(R){if(R>r)throw new RangeError('The value "'+R+'" is invalid for option "size"');let h=new Uint8Array(R);return Object.setPrototypeOf(h,o.prototype),h}function o(R,h,g){if(typeof R=="number"){if(typeof h=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(R)}return c(R,h,g)}o.poolSize=8192;function c(R,h,g){if(typeof R=="string")return y(R,h);if(ArrayBuffer.isView(R))return v(R);if(R==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof R);if(Vt(R,ArrayBuffer)||R&&Vt(R.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Vt(R,SharedArrayBuffer)||R&&Vt(R.buffer,SharedArrayBuffer)))return F(R,h,g);if(typeof R=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let C=R.valueOf&&R.valueOf();if(C!=null&&C!==R)return o.from(C,h,g);let G=k(R);if(G)return G;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof R[Symbol.toPrimitive]=="function")return o.from(R[Symbol.toPrimitive]("string"),h,g);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof R)}o.from=function(R,h,g){return c(R,h,g)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(R){if(typeof R!="number")throw new TypeError('"size" argument must be of type number');if(R<0)throw new RangeError('The value "'+R+'" is invalid for option "size"')}function d(R,h,g){return l(R),R<=0?a(R):h!==void 0?typeof g=="string"?a(R).fill(h,g):a(R).fill(h):a(R)}o.alloc=function(R,h,g){return d(R,h,g)};function f(R){return l(R),a(R<0?0:K(R)|0)}o.allocUnsafe=function(R){return f(R)},o.allocUnsafeSlow=function(R){return f(R)};function y(R,h){if((typeof h!="string"||h==="")&&(h="utf8"),!o.isEncoding(h))throw new TypeError("Unknown encoding: "+h);let g=se(R,h)|0,C=a(g),G=C.write(R,h);return G!==g&&(C=C.slice(0,G)),C}function I(R){let h=R.length<0?0:K(R.length)|0,g=a(h);for(let C=0;C=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return R|0}function J(R){return+R!=R&&(R=0),o.alloc(+R)}o.isBuffer=function(h){return h!=null&&h._isBuffer===!0&&h!==o.prototype},o.compare=function(h,g){if(Vt(h,Uint8Array)&&(h=o.from(h,h.offset,h.byteLength)),Vt(g,Uint8Array)&&(g=o.from(g,g.offset,g.byteLength)),!o.isBuffer(h)||!o.isBuffer(g))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(h===g)return 0;let C=h.length,G=g.length;for(let te=0,pe=Math.min(C,G);teG.length?(o.isBuffer(pe)||(pe=o.from(pe)),pe.copy(G,te)):Uint8Array.prototype.set.call(G,pe,te);else if(o.isBuffer(pe))pe.copy(G,te);else throw new TypeError('"list" argument must be an Array of Buffers');te+=pe.length}return G};function se(R,h){if(o.isBuffer(R))return R.length;if(ArrayBuffer.isView(R)||Vt(R,ArrayBuffer))return R.byteLength;if(typeof R!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof R);let g=R.length,C=arguments.length>2&&arguments[2]===!0;if(!C&&g===0)return 0;let G=!1;for(;;)switch(h){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":return rs(R).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return mr(R).length;default:if(G)return C?-1:rs(R).length;h=(""+h).toLowerCase(),G=!0}}o.byteLength=se;function ie(R,h,g){let C=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,h>>>=0,g<=h))return"";for(R||(R="utf8");;)switch(R){case"hex":return Fr(this,h,g);case"utf8":case"utf-8":return tn(this,h,g);case"ascii":return mn(this,h,g);case"latin1":case"binary":return Pr(this,h,g);case"base64":return en(this,h,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return kn(this,h,g);default:if(C)throw new TypeError("Unknown encoding: "+R);R=(R+"").toLowerCase(),C=!0}}o.prototype._isBuffer=!0;function Te(R,h,g){let C=R[h];R[h]=R[g],R[g]=C}o.prototype.swap16=function(){let h=this.length;if(h%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let g=0;gg&&(h+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(h,g,C,G,te){if(Vt(h,Uint8Array)&&(h=o.from(h,h.offset,h.byteLength)),!o.isBuffer(h))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof h);if(g===void 0&&(g=0),C===void 0&&(C=h?h.length:0),G===void 0&&(G=0),te===void 0&&(te=this.length),g<0||C>h.length||G<0||te>this.length)throw new RangeError("out of range index");if(G>=te&&g>=C)return 0;if(G>=te)return-1;if(g>=C)return 1;if(g>>>=0,C>>>=0,G>>>=0,te>>>=0,this===h)return 0;let pe=te-G,ft=C-g,Nn=Math.min(pe,ft),on=this.slice(G,te),yn=h.slice(g,C);for(let nn=0;nn2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,Nr(g)&&(g=G?0:R.length-1),g<0&&(g=R.length+g),g>=R.length){if(G)return-1;g=R.length-1}else if(g<0)if(G)g=0;else return-1;if(typeof h=="string"&&(h=o.from(h,C)),o.isBuffer(h))return h.length===0?-1:Re(R,h,g,C,G);if(typeof h=="number")return h=h&255,typeof Uint8Array.prototype.indexOf=="function"?G?Uint8Array.prototype.indexOf.call(R,h,g):Uint8Array.prototype.lastIndexOf.call(R,h,g):Re(R,[h],g,C,G);throw new TypeError("val must be string, number or Buffer")}function Re(R,h,g,C,G){let te=1,pe=R.length,ft=h.length;if(C!==void 0&&(C=String(C).toLowerCase(),C==="ucs2"||C==="ucs-2"||C==="utf16le"||C==="utf-16le")){if(R.length<2||h.length<2)return-1;te=2,pe/=2,ft/=2,g/=2}function Nn(yn,nn){return te===1?yn[nn]:yn.readUInt16BE(nn*te)}let on;if(G){let yn=-1;for(on=g;onpe&&(g=pe-ft),on=g;on>=0;on--){let yn=!0;for(let nn=0;nnG&&(C=G)):C=G;let te=h.length;C>te/2&&(C=te/2);let pe;for(pe=0;pe>>0,isFinite(C)?(C=C>>>0,G===void 0&&(G="utf8")):(G=C,C=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let te=this.length-g;if((C===void 0||C>te)&&(C=te),h.length>0&&(C<0||g<0)||g>this.length)throw new RangeError("Attempt to write outside buffer bounds");G||(G="utf8");let pe=!1;for(;;)switch(G){case"hex":return xe(this,h,g,C);case"utf8":case"utf-8":return tt(this,h,g,C);case"ascii":case"latin1":case"binary":return ee(this,h,g,C);case"base64":return Se(this,h,g,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _t(this,h,g,C);default:if(pe)throw new TypeError("Unknown encoding: "+G);G=(""+G).toLowerCase(),pe=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function en(R,h,g){return h===0&&g===R.length?e.fromByteArray(R):e.fromByteArray(R.slice(h,g))}function tn(R,h,g){g=Math.min(R.length,g);let C=[],G=h;for(;G239?4:te>223?3:te>191?2:1;if(G+ft<=g){let Nn,on,yn,nn;switch(ft){case 1:te<128&&(pe=te);break;case 2:Nn=R[G+1],(Nn&192)===128&&(nn=(te&31)<<6|Nn&63,nn>127&&(pe=nn));break;case 3:Nn=R[G+1],on=R[G+2],(Nn&192)===128&&(on&192)===128&&(nn=(te&15)<<12|(Nn&63)<<6|on&63,nn>2047&&(nn<55296||nn>57343)&&(pe=nn));break;case 4:Nn=R[G+1],on=R[G+2],yn=R[G+3],(Nn&192)===128&&(on&192)===128&&(yn&192)===128&&(nn=(te&15)<<18|(Nn&63)<<12|(on&63)<<6|yn&63,nn>65535&&nn<1114112&&(pe=nn))}}pe===null?(pe=65533,ft=1):pe>65535&&(pe-=65536,C.push(pe>>>10&1023|55296),pe=56320|pe&1023),C.push(pe),G+=ft}return Qt(C)}let bn=4096;function Qt(R){let h=R.length;if(h<=bn)return String.fromCharCode.apply(String,R);let g="",C=0;for(;CC)&&(g=C);let G="";for(let te=h;teC&&(h=C),g<0?(g+=C,g<0&&(g=0)):g>C&&(g=C),gg)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(h,g,C){h=h>>>0,g=g>>>0,C||zt(h,g,this.length);let G=this[h],te=1,pe=0;for(;++pe>>0,g=g>>>0,C||zt(h,g,this.length);let G=this[h+--g],te=1;for(;g>0&&(te*=256);)G+=this[h+--g]*te;return G},o.prototype.readUint8=o.prototype.readUInt8=function(h,g){return h=h>>>0,g||zt(h,1,this.length),this[h]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(h,g){return h=h>>>0,g||zt(h,2,this.length),this[h]|this[h+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(h,g){return h=h>>>0,g||zt(h,2,this.length),this[h]<<8|this[h+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),(this[h]|this[h+1]<<8|this[h+2]<<16)+this[h+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),this[h]*16777216+(this[h+1]<<16|this[h+2]<<8|this[h+3])},o.prototype.readBigUInt64LE=_a(function(h){h=h>>>0,nt(h,"offset");let g=this[h],C=this[h+7];(g===void 0||C===void 0)&&Rt(h,this.length-8);let G=g+this[++h]*un(2,8)+this[++h]*un(2,16)+this[++h]*un(2,24),te=this[++h]+this[++h]*un(2,8)+this[++h]*un(2,16)+C*un(2,24);return BigInt(G)+(BigInt(te)<>>0,nt(h,"offset");let g=this[h],C=this[h+7];(g===void 0||C===void 0)&&Rt(h,this.length-8);let G=g*un(2,24)+this[++h]*un(2,16)+this[++h]*un(2,8)+this[++h],te=this[++h]*un(2,24)+this[++h]*un(2,16)+this[++h]*un(2,8)+C;return(BigInt(G)<>>0,g=g>>>0,C||zt(h,g,this.length);let G=this[h],te=1,pe=0;for(;++pe=te&&(G-=Math.pow(2,8*g)),G},o.prototype.readIntBE=function(h,g,C){h=h>>>0,g=g>>>0,C||zt(h,g,this.length);let G=g,te=1,pe=this[h+--G];for(;G>0&&(te*=256);)pe+=this[h+--G]*te;return te*=128,pe>=te&&(pe-=Math.pow(2,8*g)),pe},o.prototype.readInt8=function(h,g){return h=h>>>0,g||zt(h,1,this.length),this[h]&128?(255-this[h]+1)*-1:this[h]},o.prototype.readInt16LE=function(h,g){h=h>>>0,g||zt(h,2,this.length);let C=this[h]|this[h+1]<<8;return C&32768?C|4294901760:C},o.prototype.readInt16BE=function(h,g){h=h>>>0,g||zt(h,2,this.length);let C=this[h+1]|this[h]<<8;return C&32768?C|4294901760:C},o.prototype.readInt32LE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24},o.prototype.readInt32BE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]},o.prototype.readBigInt64LE=_a(function(h){h=h>>>0,nt(h,"offset");let g=this[h],C=this[h+7];(g===void 0||C===void 0)&&Rt(h,this.length-8);let G=this[h+4]+this[h+5]*un(2,8)+this[h+6]*un(2,16)+(C<<24);return(BigInt(G)<>>0,nt(h,"offset");let g=this[h],C=this[h+7];(g===void 0||C===void 0)&&Rt(h,this.length-8);let G=(g<<24)+this[++h]*un(2,16)+this[++h]*un(2,8)+this[++h];return(BigInt(G)<>>0,g||zt(h,4,this.length),t.read(this,h,!0,23,4)},o.prototype.readFloatBE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),t.read(this,h,!1,23,4)},o.prototype.readDoubleLE=function(h,g){return h=h>>>0,g||zt(h,8,this.length),t.read(this,h,!0,52,8)},o.prototype.readDoubleBE=function(h,g){return h=h>>>0,g||zt(h,8,this.length),t.read(this,h,!1,52,8)};function An(R,h,g,C,G,te){if(!o.isBuffer(R))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>G||hR.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(h,g,C,G){if(h=+h,g=g>>>0,C=C>>>0,!G){let ft=Math.pow(2,8*C)-1;An(this,h,g,C,ft,0)}let te=1,pe=0;for(this[g]=h&255;++pe>>0,C=C>>>0,!G){let ft=Math.pow(2,8*C)-1;An(this,h,g,C,ft,0)}let te=C-1,pe=1;for(this[g+te]=h&255;--te>=0&&(pe*=256);)this[g+te]=h/pe&255;return g+C},o.prototype.writeUint8=o.prototype.writeUInt8=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,1,255,0),this[g]=h&255,g+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,2,65535,0),this[g]=h&255,this[g+1]=h>>>8,g+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,2,65535,0),this[g]=h>>>8,this[g+1]=h&255,g+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,4,4294967295,0),this[g+3]=h>>>24,this[g+2]=h>>>16,this[g+1]=h>>>8,this[g]=h&255,g+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,4,4294967295,0),this[g]=h>>>24,this[g+1]=h>>>16,this[g+2]=h>>>8,this[g+3]=h&255,g+4};function ue(R,h,g,C,G){Ut(h,C,G,R,g,7);let te=Number(h&BigInt(4294967295));R[g++]=te,te=te>>8,R[g++]=te,te=te>>8,R[g++]=te,te=te>>8,R[g++]=te;let pe=Number(h>>BigInt(32)&BigInt(4294967295));return R[g++]=pe,pe=pe>>8,R[g++]=pe,pe=pe>>8,R[g++]=pe,pe=pe>>8,R[g++]=pe,g}function De(R,h,g,C,G){Ut(h,C,G,R,g,7);let te=Number(h&BigInt(4294967295));R[g+7]=te,te=te>>8,R[g+6]=te,te=te>>8,R[g+5]=te,te=te>>8,R[g+4]=te;let pe=Number(h>>BigInt(32)&BigInt(4294967295));return R[g+3]=pe,pe=pe>>8,R[g+2]=pe,pe=pe>>8,R[g+1]=pe,pe=pe>>8,R[g]=pe,g+8}o.prototype.writeBigUInt64LE=_a(function(h,g=0){return ue(this,h,g,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=_a(function(h,g=0){return De(this,h,g,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(h,g,C,G){if(h=+h,g=g>>>0,!G){let Nn=Math.pow(2,8*C-1);An(this,h,g,C,Nn-1,-Nn)}let te=0,pe=1,ft=0;for(this[g]=h&255;++te>0)-ft&255;return g+C},o.prototype.writeIntBE=function(h,g,C,G){if(h=+h,g=g>>>0,!G){let Nn=Math.pow(2,8*C-1);An(this,h,g,C,Nn-1,-Nn)}let te=C-1,pe=1,ft=0;for(this[g+te]=h&255;--te>=0&&(pe*=256);)h<0&&ft===0&&this[g+te+1]!==0&&(ft=1),this[g+te]=(h/pe>>0)-ft&255;return g+C},o.prototype.writeInt8=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,1,127,-128),h<0&&(h=255+h+1),this[g]=h&255,g+1},o.prototype.writeInt16LE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,2,32767,-32768),this[g]=h&255,this[g+1]=h>>>8,g+2},o.prototype.writeInt16BE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,2,32767,-32768),this[g]=h>>>8,this[g+1]=h&255,g+2},o.prototype.writeInt32LE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,4,2147483647,-2147483648),this[g]=h&255,this[g+1]=h>>>8,this[g+2]=h>>>16,this[g+3]=h>>>24,g+4},o.prototype.writeInt32BE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,4,2147483647,-2147483648),h<0&&(h=4294967295+h+1),this[g]=h>>>24,this[g+1]=h>>>16,this[g+2]=h>>>8,this[g+3]=h&255,g+4},o.prototype.writeBigInt64LE=_a(function(h,g=0){return ue(this,h,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=_a(function(h,g=0){return De(this,h,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ve(R,h,g,C,G,te){if(g+C>R.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function Ce(R,h,g,C,G){return h=+h,g=g>>>0,G||ve(R,h,g,4),t.write(R,h,g,C,23,4),g+4}o.prototype.writeFloatLE=function(h,g,C){return Ce(this,h,g,!0,C)},o.prototype.writeFloatBE=function(h,g,C){return Ce(this,h,g,!1,C)};function vt(R,h,g,C,G){return h=+h,g=g>>>0,G||ve(R,h,g,8),t.write(R,h,g,C,52,8),g+8}o.prototype.writeDoubleLE=function(h,g,C){return vt(this,h,g,!0,C)},o.prototype.writeDoubleBE=function(h,g,C){return vt(this,h,g,!1,C)},o.prototype.copy=function(h,g,C,G){if(!o.isBuffer(h))throw new TypeError("argument should be a Buffer");if(C||(C=0),!G&&G!==0&&(G=this.length),g>=h.length&&(g=h.length),g||(g=0),G>0&&G=this.length)throw new RangeError("Index out of range");if(G<0)throw new RangeError("sourceEnd out of bounds");G>this.length&&(G=this.length),h.length-g>>0,C=C===void 0?this.length:C>>>0,h||(h=0);let te;if(typeof h=="number")for(te=g;teun(2,32)?G=qe(String(g)):typeof g=="bigint"&&(G=String(g),(g>un(BigInt(2),BigInt(32))||g<-un(BigInt(2),BigInt(32)))&&(G=qe(G)),G+="n"),C+=` It must be ${h}. Received ${G}`,C},RangeError);function qe(R){let h="",g=R.length,C=R[0]==="-"?1:0;for(;g>=C+4;g-=3)h=`_${R.slice(g-3,g)}${h}`;return`${R.slice(0,g)}${h}`}function Ye(R,h,g){nt(h,"offset"),(R[h]===void 0||R[h+g]===void 0)&&Rt(h,R.length-(g+1))}function Ut(R,h,g,C,G,te){if(R>g||R3?h===0||h===BigInt(0)?ft=`>= 0${pe} and < 2${pe} ** ${(te+1)*8}${pe}`:ft=`>= -(2${pe} ** ${(te+1)*8-1}${pe}) and < 2 ** ${(te+1)*8-1}${pe}`:ft=`>= ${h}${pe} and <= ${g}${pe}`,new Y.ERR_OUT_OF_RANGE("value",ft,R)}Ye(C,G,te)}function nt(R,h){if(typeof R!="number")throw new Y.ERR_INVALID_ARG_TYPE(h,"number",R)}function Rt(R,h,g){throw Math.floor(R)!==R?(nt(R,g),new Y.ERR_OUT_OF_RANGE(g||"offset","an integer",R)):h<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(g||"offset",`>= ${g?1:0} and <= ${h}`,R)}let ns=/[^+/0-9A-Za-z-_]/g;function Vr(R){if(R=R.split("=")[0],R=R.trim().replace(ns,""),R.length<2)return"";for(;R.length%4!==0;)R=R+"=";return R}function rs(R,h){h=h||1/0;let g,C=R.length,G=null,te=[];for(let pe=0;pe55295&&g<57344){if(!G){if(g>56319){(h-=3)>-1&&te.push(239,191,189);continue}else if(pe+1===C){(h-=3)>-1&&te.push(239,191,189);continue}G=g;continue}if(g<56320){(h-=3)>-1&&te.push(239,191,189),G=g;continue}g=(G-55296<<10|g-56320)+65536}else G&&(h-=3)>-1&&te.push(239,191,189);if(G=null,g<128){if((h-=1)<0)break;te.push(g)}else if(g<2048){if((h-=2)<0)break;te.push(g>>6|192,g&63|128)}else if(g<65536){if((h-=3)<0)break;te.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((h-=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 Mc(R){let h=[];for(let g=0;g>8,G=g%256,te.push(G),te.push(C);return te}function mr(R){return e.toByteArray(Vr(R))}function ni(R,h,g,C){let G;for(G=0;G=h.length||G>=R.length);++G)h[G+g]=R[G];return G}function Vt(R,h){return R instanceof h||R!=null&&R.constructor!=null&&R.constructor.name!=null&&R.constructor.name===h.name}function Nr(R){return R!==R}let Du=function(){let R="0123456789abcdef",h=new Array(256);for(let g=0;g<16;++g){let C=g*16;for(let G=0;G<16;++G)h[C+G]=R[g]+R[G]}return h}();function _a(R){return typeof BigInt=="undefined"?bu:R}function bu(){throw new Error("BigInt not supported")}return xu}var Dd,EP,Em,hP,xu,yP,qu,D,Tpe,Epe,IP=ku(()=>{"use strict";m();T();N();Dd={},EP=!1;Em={},hP=!1;xu={},yP=!1;qu=kJ();qu.Buffer;qu.SlowBuffer;qu.INSPECT_MAX_BYTES;qu.kMaxLength;D=qu.Buffer,Tpe=qu.INSPECT_MAX_BYTES,Epe=qu.kMaxLength});var T=ku(()=>{"use strict";IP()});var gP=w(Zc=>{"use strict";m();T();N();Object.defineProperty(Zc,"__esModule",{value:!0});Zc.versionInfo=Zc.version=void 0;var MJ="16.9.0";Zc.version=MJ;var xJ=Object.freeze({major:16,minor:9,patch:0,preReleaseTag:null});Zc.versionInfo=xJ});var Br=w(xy=>{"use strict";m();T();N();Object.defineProperty(xy,"__esModule",{value:!0});xy.devAssert=qJ;function qJ(e,t){if(!!!e)throw new Error(t)}});var hm=w(qy=>{"use strict";m();T();N();Object.defineProperty(qy,"__esModule",{value:!0});qy.isPromise=VJ;function VJ(e){return typeof(e==null?void 0:e.then)=="function"}});var Da=w(Vy=>{"use strict";m();T();N();Object.defineProperty(Vy,"__esModule",{value:!0});Vy.isObjectLike=jJ;function jJ(e){return typeof e=="object"&&e!==null}});var Ir=w(jy=>{"use strict";m();T();N();Object.defineProperty(jy,"__esModule",{value:!0});jy.invariant=KJ;function KJ(e,t){if(!!!e)throw new Error(t!=null?t:"Unexpected invariant triggered.")}});var ym=w(Ky=>{"use strict";m();T();N();Object.defineProperty(Ky,"__esModule",{value:!0});Ky.getLocation=QJ;var GJ=Ir(),$J=/\r\n|[\n\r]/g;function QJ(e,t){let n=0,r=1;for(let i of e.body.matchAll($J)){if(typeof i.index=="number"||(0,GJ.invariant)(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}});var Gy=w(Im=>{"use strict";m();T();N();Object.defineProperty(Im,"__esModule",{value:!0});Im.printLocation=JJ;Im.printSourceLocation=vP;var YJ=ym();function JJ(e){return vP(e.source,(0,YJ.getLocation)(e.source,e.start))}function vP(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} +`,f=r.split(/\r\n|[\n\r]/g),y=f[i];if(y.length>120){let I=Math.floor(l/80),v=l%80,F=[];for(let k=0;k["|",k]),["|","^".padStart(v)],["|",F[I+1]]])}return d+_P([[`${o-1} |`,f[i-1]],[`${o} |`,y],["|","^".padStart(l)],[`${o+1} |`,f[i+1]]])}function _P(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(el=>{"use strict";m();T();N();Object.defineProperty(el,"__esModule",{value:!0});el.GraphQLError=void 0;el.formatError=XJ;el.printError=WJ;var HJ=Da(),SP=ym(),OP=Gy();function zJ(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 $y=class e extends Error{constructor(t,...n){var r,i,a;let{nodes:o,source:c,positions:l,path:d,originalError:f,extensions:y}=zJ(n);super(t),this.name="GraphQLError",this.path=d!=null?d:void 0,this.originalError=f!=null?f:void 0,this.nodes=DP(Array.isArray(o)?o:o?[o]:void 0);let I=DP((r=this.nodes)===null||r===void 0?void 0:r.map(F=>F.loc).filter(F=>F!=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(F=>F.start),this.locations=l&&c?l.map(F=>(0,SP.getLocation)(c,F)):I==null?void 0:I.map(F=>(0,SP.getLocation)(F.source,F.start));let v=(0,HJ.isObjectLike)(f==null?void 0:f.extensions)?f==null?void 0:f.extensions:void 0;this.extensions=(a=y!=null?y: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}}),f!=null&&f.stack?Object.defineProperty(this,"stack",{value:f.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,rF.printLocation)(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` +`+(0,OP.printLocation)(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` -`+(0,rF.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}};zc.GraphQLError=Py;function iF(e){return e===void 0||e.length===0?void 0:e}function bJ(e){return e.toString()}function AJ(e){return e.toJSON()}});var Em=w(wy=>{"use strict";m();T();N();Object.defineProperty(wy,"__esModule",{value:!0});wy.syntaxError=FJ;var RJ=ze();function FJ(e,t,n){return new RJ.GraphQLError(`Syntax Error: ${n}`,{source:e,positions:[t]})}});var Oa=w(Di=>{"use strict";m();T();N();Object.defineProperty(Di,"__esModule",{value:!0});Di.Token=Di.QueryDocumentKeys=Di.OperationTypeNode=Di.Location=void 0;Di.isNode=wJ;var Ly=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}}};Di.Location=Ly;var Cy=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}}};Di.Token=Cy;var aF={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"]};Di.QueryDocumentKeys=aF;var PJ=new Set(Object.keys(aF));function wJ(e){let t=e==null?void 0:e.kind;return typeof t=="string"&&PJ.has(t)}var By;Di.OperationTypeNode=By;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(By||(Di.OperationTypeNode=By={}))});var Wc=w(vd=>{"use strict";m();T();N();Object.defineProperty(vd,"__esModule",{value:!0});vd.DirectiveLocation=void 0;var Uy;vd.DirectiveLocation=Uy;(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"})(Uy||(vd.DirectiveLocation=Uy={}))});var Pt=w(Sd=>{"use strict";m();T();N();Object.defineProperty(Sd,"__esModule",{value:!0});Sd.Kind=void 0;var ky;Sd.Kind=ky;(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"})(ky||(Sd.Kind=ky={}))});var hm=w(ku=>{"use strict";m();T();N();Object.defineProperty(ku,"__esModule",{value:!0});ku.isDigit=sF;ku.isLetter=My;ku.isNameContinue=BJ;ku.isNameStart=CJ;ku.isWhiteSpace=LJ;function LJ(e){return e===9||e===32}function sF(e){return e>=48&&e<=57}function My(e){return e>=97&&e<=122||e>=65&&e<=90}function CJ(e){return My(e)||e===95}function BJ(e){return My(e)||sF(e)||e===95}});var Dd=w(Od=>{"use strict";m();T();N();Object.defineProperty(Od,"__esModule",{value:!0});Od.dedentBlockStringLines=UJ;Od.isPrintableAsBlockString=MJ;Od.printBlockString=xJ;var xy=hm();function UJ(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 kJ(e){let t=0;for(;t1&&r.slice(1).every(v=>v.length===0||(0,xy.isWhiteSpace)(v.charCodeAt(0))),o=n.endsWith('\\"""'),c=e.endsWith('"')&&!o,l=e.endsWith("\\"),d=c||l,f=!(t!=null&&t.minimize)&&(!i||e.length>70||d||a||o),y="",I=i&&(0,xy.isWhiteSpace)(e.charCodeAt(0));return(f&&!I||a)&&(y+=` +`+(0,OP.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}};el.GraphQLError=$y;function DP(e){return e===void 0||e.length===0?void 0:e}function WJ(e){return e.toString()}function XJ(e){return e.toJSON()}});var gm=w(Qy=>{"use strict";m();T();N();Object.defineProperty(Qy,"__esModule",{value:!0});Qy.syntaxError=eH;var ZJ=ze();function eH(e,t,n){return new ZJ.GraphQLError(`Syntax Error: ${n}`,{source:e,positions:[t]})}});var ba=w(bi=>{"use strict";m();T();N();Object.defineProperty(bi,"__esModule",{value:!0});bi.Token=bi.QueryDocumentKeys=bi.OperationTypeNode=bi.Location=void 0;bi.isNode=nH;var Yy=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}}};bi.Location=Yy;var Jy=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}}};bi.Token=Jy;var bP={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"]};bi.QueryDocumentKeys=bP;var tH=new Set(Object.keys(bP));function nH(e){let t=e==null?void 0:e.kind;return typeof t=="string"&&tH.has(t)}var Hy;bi.OperationTypeNode=Hy;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(Hy||(bi.OperationTypeNode=Hy={}))});var tl=w(bd=>{"use strict";m();T();N();Object.defineProperty(bd,"__esModule",{value:!0});bd.DirectiveLocation=void 0;var zy;bd.DirectiveLocation=zy;(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"})(zy||(bd.DirectiveLocation=zy={}))});var Ft=w(Ad=>{"use strict";m();T();N();Object.defineProperty(Ad,"__esModule",{value:!0});Ad.Kind=void 0;var Wy;Ad.Kind=Wy;(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"})(Wy||(Ad.Kind=Wy={}))});var _m=w(Vu=>{"use strict";m();T();N();Object.defineProperty(Vu,"__esModule",{value:!0});Vu.isDigit=AP;Vu.isLetter=Xy;Vu.isNameContinue=aH;Vu.isNameStart=iH;Vu.isWhiteSpace=rH;function rH(e){return e===9||e===32}function AP(e){return e>=48&&e<=57}function Xy(e){return e>=97&&e<=122||e>=65&&e<=90}function iH(e){return Xy(e)||e===95}function aH(e){return Xy(e)||AP(e)||e===95}});var Pd=w(Rd=>{"use strict";m();T();N();Object.defineProperty(Rd,"__esModule",{value:!0});Rd.dedentBlockStringLines=sH;Rd.isPrintableAsBlockString=uH;Rd.printBlockString=cH;var Zy=_m();function sH(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 oH(e){let t=0;for(;t1&&r.slice(1).every(v=>v.length===0||(0,Zy.isWhiteSpace)(v.charCodeAt(0))),o=n.endsWith('\\"""'),c=e.endsWith('"')&&!o,l=e.endsWith("\\"),d=c||l,f=!(t!=null&&t.minimize)&&(!i||e.length>70||d||a||o),y="",I=i&&(0,Zy.isWhiteSpace)(e.charCodeAt(0));return(f&&!I||a)&&(y+=` `),y+=n,(f||d)&&(y+=` -`),'"""'+y+'"""'}});var Ad=w(bd=>{"use strict";m();T();N();Object.defineProperty(bd,"__esModule",{value:!0});bd.TokenKind=void 0;var qy;bd.TokenKind=qy;(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"})(qy||(bd.TokenKind=qy={}))});var Im=w(Fd=>{"use strict";m();T();N();Object.defineProperty(Fd,"__esModule",{value:!0});Fd.Lexer=void 0;Fd.isPunctuatorTokenKind=VJ;var Xi=Em(),uF=Oa(),qJ=Dd(),Mu=hm(),It=Ad(),jy=class{constructor(t){let n=new uF.Token(It.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!==It.TokenKind.EOF)do if(t.next)t=t.next;else{let n=jJ(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===It.TokenKind.COMMENT);return t}};Fd.Lexer=jy;function VJ(e){return e===It.TokenKind.BANG||e===It.TokenKind.DOLLAR||e===It.TokenKind.AMP||e===It.TokenKind.PAREN_L||e===It.TokenKind.PAREN_R||e===It.TokenKind.SPREAD||e===It.TokenKind.COLON||e===It.TokenKind.EQUALS||e===It.TokenKind.AT||e===It.TokenKind.BRACKET_L||e===It.TokenKind.BRACKET_R||e===It.TokenKind.BRACE_L||e===It.TokenKind.PIPE||e===It.TokenKind.BRACE_R}function Xc(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function ym(e,t){return cF(e.charCodeAt(t))&&lF(e.charCodeAt(t+1))}function cF(e){return e>=55296&&e<=56319}function lF(e){return e>=56320&&e<=57343}function xu(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return It.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 Gn(e,t,n,r,i){let a=e.line,o=1+n-e.lineStart;return new uF.Token(t,n,r,a,o,i)}function jJ(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 JJ(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,Xi.syntaxError)(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function HJ(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(Ky,"__esModule",{value:!0});Ky.inspect=XJ;var WJ=10,dF=2;function XJ(e){return gm(e,[])}function gm(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return ZJ(e,t);default:return String(e)}}function ZJ(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(eH(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:gm(r,n)}else if(Array.isArray(e))return nH(e,n);return tH(e,n)}function eH(e){return typeof e.toJSON=="function"}function tH(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>dF?"["+rH(e)+"]":"{ "+n.map(([i,a])=>i+": "+gm(a,t)).join(", ")+" }"}function nH(e,t){if(e.length===0)return"[]";if(t.length>dF)return"[Array]";let n=Math.min(WJ,e.length),r=e.length-n,i=[];for(let a=0;a1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function rH(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 Pd=w(_m=>{"use strict";m();T();N();Object.defineProperty(_m,"__esModule",{value:!0});_m.instanceOf=void 0;var iH=Xt(),aH=globalThis.process&&O.env.NODE_ENV==="production",sH=aH?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,iH.inspect)(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm. +`),'"""'+y+'"""'}});var wd=w(Fd=>{"use strict";m();T();N();Object.defineProperty(Fd,"__esModule",{value:!0});Fd.TokenKind=void 0;var eI;Fd.TokenKind=eI;(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"})(eI||(Fd.TokenKind=eI={}))});var Sm=w(Cd=>{"use strict";m();T();N();Object.defineProperty(Cd,"__esModule",{value:!0});Cd.Lexer=void 0;Cd.isPunctuatorTokenKind=dH;var ea=gm(),PP=ba(),lH=Pd(),ju=_m(),gt=wd(),nI=class{constructor(t){let n=new PP.Token(gt.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!==gt.TokenKind.EOF)do if(t.next)t=t.next;else{let n=pH(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===gt.TokenKind.COMMENT);return t}};Cd.Lexer=nI;function dH(e){return e===gt.TokenKind.BANG||e===gt.TokenKind.DOLLAR||e===gt.TokenKind.AMP||e===gt.TokenKind.PAREN_L||e===gt.TokenKind.PAREN_R||e===gt.TokenKind.SPREAD||e===gt.TokenKind.COLON||e===gt.TokenKind.EQUALS||e===gt.TokenKind.AT||e===gt.TokenKind.BRACKET_L||e===gt.TokenKind.BRACKET_R||e===gt.TokenKind.BRACE_L||e===gt.TokenKind.PIPE||e===gt.TokenKind.BRACE_R}function nl(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function vm(e,t){return FP(e.charCodeAt(t))&&wP(e.charCodeAt(t+1))}function FP(e){return e>=55296&&e<=56319}function wP(e){return e>=56320&&e<=57343}function Ku(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return gt.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 $n(e,t,n,r,i){let a=e.line,o=1+n-e.lineStart;return new PP.Token(t,n,r,a,o,i)}function pH(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 hH(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,ea.syntaxError)(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function yH(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(rI,"__esModule",{value:!0});rI.inspect=_H;var gH=10,LP=2;function _H(e){return Om(e,[])}function Om(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return vH(e,t);default:return String(e)}}function vH(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(SH(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:Om(r,n)}else if(Array.isArray(e))return DH(e,n);return OH(e,n)}function SH(e){return typeof e.toJSON=="function"}function OH(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>LP?"["+bH(e)+"]":"{ "+n.map(([i,a])=>i+": "+Om(a,t)).join(", ")+" }"}function DH(e,t){if(e.length===0)return"[]";if(t.length>LP)return"[Array]";let n=Math.min(gH,e.length),r=e.length-n,i=[];for(let a=0;a1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function bH(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 Bd=w(Dm=>{"use strict";m();T();N();Object.defineProperty(Dm,"__esModule",{value:!0});Dm.instanceOf=void 0;var AH=Xt(),RH=globalThis.process&&O.env.NODE_ENV==="production",PH=RH?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,AH.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,42 +36,42 @@ 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};_m.instanceOf=sH});var Sm=w(wd=>{"use strict";m();T();N();Object.defineProperty(wd,"__esModule",{value:!0});wd.Source=void 0;wd.isSource=cH;var Gy=Lr(),oH=Xt(),uH=Pd(),vm=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||(0,Gy.devAssert)(!1,`Body must be a string. Received: ${(0,oH.inspect)(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||(0,Gy.devAssert)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,Gy.devAssert)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};wd.Source=vm;function cH(e){return(0,uH.instanceOf)(e,vm)}});var Zc=w(Ho=>{"use strict";m();T();N();Object.defineProperty(Ho,"__esModule",{value:!0});Ho.Parser=void 0;Ho.parse=dH;Ho.parseConstValue=fH;Ho.parseType=mH;Ho.parseValue=pH;var qu=Em(),Ld=Oa(),lH=Wc(),at=Pt(),fF=Im(),pF=Sm(),Oe=Ad();function dH(e,t){return new Vu(e,t).parseDocument()}function pH(e,t){let n=new Vu(e,t);n.expectToken(Oe.TokenKind.SOF);let r=n.parseValueLiteral(!1);return n.expectToken(Oe.TokenKind.EOF),r}function fH(e,t){let n=new Vu(e,t);n.expectToken(Oe.TokenKind.SOF);let r=n.parseConstValueLiteral();return n.expectToken(Oe.TokenKind.EOF),r}function mH(e,t){let n=new Vu(e,t);n.expectToken(Oe.TokenKind.SOF);let r=n.parseTypeReference();return n.expectToken(Oe.TokenKind.EOF),r}var Vu=class{constructor(t,n={}){let r=(0,pF.isSource)(t)?t:new pF.Source(t);this._lexer=new fF.Lexer(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(Oe.TokenKind.NAME);return this.node(t,{kind:at.Kind.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:at.Kind.DOCUMENT,definitions:this.many(Oe.TokenKind.SOF,this.parseDefinition,Oe.TokenKind.EOF)})}parseDefinition(){if(this.peek(Oe.TokenKind.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===Oe.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,qu.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(Oe.TokenKind.BRACE_L))return this.node(t,{kind:at.Kind.OPERATION_DEFINITION,operation:Ld.OperationTypeNode.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(Oe.TokenKind.NAME)&&(r=this.parseName()),this.node(t,{kind:at.Kind.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(Oe.TokenKind.NAME);switch(t.value){case"query":return Ld.OperationTypeNode.QUERY;case"mutation":return Ld.OperationTypeNode.MUTATION;case"subscription":return Ld.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(Oe.TokenKind.PAREN_L,this.parseVariableDefinition,Oe.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:at.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Oe.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Oe.TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(Oe.TokenKind.DOLLAR),this.node(t,{kind:at.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:at.Kind.SELECTION_SET,selections:this.many(Oe.TokenKind.BRACE_L,this.parseSelection,Oe.TokenKind.BRACE_R)})}parseSelection(){return this.peek(Oe.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(Oe.TokenKind.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:at.Kind.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Oe.TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(Oe.TokenKind.PAREN_L,n,Oe.TokenKind.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(Oe.TokenKind.COLON),this.node(n,{kind:at.Kind.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(Oe.TokenKind.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(Oe.TokenKind.NAME)?this.node(t,{kind:at.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:at.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:at.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:at.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 Oe.TokenKind.BRACKET_L:return this.parseList(t);case Oe.TokenKind.BRACE_L:return this.parseObject(t);case Oe.TokenKind.INT:return this.advanceLexer(),this.node(n,{kind:at.Kind.INT,value:n.value});case Oe.TokenKind.FLOAT:return this.advanceLexer(),this.node(n,{kind:at.Kind.FLOAT,value:n.value});case Oe.TokenKind.STRING:case Oe.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case Oe.TokenKind.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:at.Kind.BOOLEAN,value:!0});case"false":return this.node(n,{kind:at.Kind.BOOLEAN,value:!1});case"null":return this.node(n,{kind:at.Kind.NULL});default:return this.node(n,{kind:at.Kind.ENUM,value:n.value})}case Oe.TokenKind.DOLLAR:if(t)if(this.expectToken(Oe.TokenKind.DOLLAR),this._lexer.token.kind===Oe.TokenKind.NAME){let r=this._lexer.token.value;throw(0,qu.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:at.Kind.STRING,value:t.value,block:t.kind===Oe.TokenKind.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:at.Kind.LIST,values:this.any(Oe.TokenKind.BRACKET_L,n,Oe.TokenKind.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:at.Kind.OBJECT,fields:this.any(Oe.TokenKind.BRACE_L,n,Oe.TokenKind.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(Oe.TokenKind.COLON),this.node(n,{kind:at.Kind.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(Oe.TokenKind.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(Oe.TokenKind.AT),this.node(n,{kind:at.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(Oe.TokenKind.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(Oe.TokenKind.BRACKET_R),n=this.node(t,{kind:at.Kind.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(Oe.TokenKind.BANG)?this.node(t,{kind:at.Kind.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:at.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Oe.TokenKind.STRING)||this.peek(Oe.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(Oe.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Oe.TokenKind.BRACE_R);return this.node(t,{kind:at.Kind.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(Oe.TokenKind.COLON);let r=this.parseNamedType();return this.node(t,{kind:at.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:at.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:at.Kind.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Oe.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Oe.TokenKind.BRACE_L,this.parseFieldDefinition,Oe.TokenKind.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Oe.TokenKind.COLON);let a=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:at.Kind.FIELD_DEFINITION,description:n,name:r,arguments:i,type:a,directives:o})}parseArgumentDefs(){return this.optionalMany(Oe.TokenKind.PAREN_L,this.parseInputValueDef,Oe.TokenKind.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(Oe.TokenKind.COLON);let i=this.parseTypeReference(),a;this.expectOptionalToken(Oe.TokenKind.EQUALS)&&(a=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:at.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:at.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:at.Kind.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(Oe.TokenKind.EQUALS)?this.delimitedMany(Oe.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:at.Kind.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:a})}parseEnumValuesDefinition(){return this.optionalMany(Oe.TokenKind.BRACE_L,this.parseEnumValueDefinition,Oe.TokenKind.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:at.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,qu.syntaxError)(this._lexer.source,this._lexer.token.start,`${Om(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:at.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(Oe.TokenKind.BRACE_L,this.parseInputValueDef,Oe.TokenKind.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===Oe.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(Oe.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Oe.TokenKind.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:at.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:at.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:at.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:at.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:at.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:at.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:at.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(Oe.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:at.Kind.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Oe.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(lH.DirectiveLocation,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Ld.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,qu.syntaxError)(this._lexer.source,n.start,`Expected ${mF(t)}, found ${Om(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===Oe.TokenKind.NAME&&n.value===t)this.advanceLexer();else throw(0,qu.syntaxError)(this._lexer.source,n.start,`Expected "${t}", found ${Om(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===Oe.TokenKind.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t!=null?t:this._lexer.token;return(0,qu.syntaxError)(this._lexer.source,n.start,`Unexpected ${Om(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!==Oe.TokenKind.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw(0,qu.syntaxError)(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};Ho.Parser=Vu;function Om(e){let t=e.value;return mF(e.kind)+(t!=null?` "${t}"`:"")}function mF(e){return(0,fF.isPunctuatorTokenKind)(e)?`"${e}"`:e}});var zo=w($y=>{"use strict";m();T();N();Object.defineProperty($y,"__esModule",{value:!0});$y.didYouMean=TH;var NH=5;function TH(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,NH),c=o.pop();return i+o.join(", ")+", or "+c+"?"}});var NF=w(Qy=>{"use strict";m();T();N();Object.defineProperty(Qy,"__esModule",{value:!0});Qy.identityFunc=EH;function EH(e){return e}});var Wo=w(Yy=>{"use strict";m();T();N();Object.defineProperty(Yy,"__esModule",{value:!0});Yy.keyMap=hH;function hH(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}});var Cd=w(Jy=>{"use strict";m();T();N();Object.defineProperty(Jy,"__esModule",{value:!0});Jy.keyValMap=yH;function yH(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}});var zy=w(Hy=>{"use strict";m();T();N();Object.defineProperty(Hy,"__esModule",{value:!0});Hy.mapValue=IH;function IH(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}});var Bd=w(Xy=>{"use strict";m();T();N();Object.defineProperty(Xy,"__esModule",{value:!0});Xy.naturalCompare=gH;function gH(e,t){let n=0,r=0;for(;n0);let c=0;do++r,c=c*10+a-Wy,a=t.charCodeAt(r);while(Dm(a)&&c>0);if(oc)return 1}else{if(ia)return 1;++n,++r}}return e.length-t.length}var Wy=48,_H=57;function Dm(e){return!isNaN(e)&&Wy<=e&&e<=_H}});var Xo=w(eI=>{"use strict";m();T();N();Object.defineProperty(eI,"__esModule",{value:!0});eI.suggestionList=SH;var vH=Bd();function SH(e,t){let n=Object.create(null),r=new Zy(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,vH.naturalCompare)(a,o)})}var Zy=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=TF(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=TF(r),a=this._inputArray;if(i.lengthn)return;let l=this._rows;for(let f=0;f<=c;f++)l[0][f]=f;for(let f=1;f<=o;f++){let y=l[(f-1)%3],I=l[f%3],v=I[0]=f;for(let P=1;P<=c;P++){let k=i[f-1]===a[P-1]?0:1,K=Math.min(y[P]+1,I[P-1]+1,y[P-1]+k);if(f>1&&P>1&&i[f-1]===a[P-2]&&i[f-2]===a[P-1]){let Q=l[(f-2)%3][P-2];K=Math.min(K,Q+1)}Kn)return}let d=l[o%3][c];return d<=n?d:void 0}};function TF(e){let t=e.length,n=new Array(t);for(let r=0;r{"use strict";m();T();N();Object.defineProperty(tI,"__esModule",{value:!0});tI.toObjMap=OH;function OH(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 EF=w(nI=>{"use strict";m();T();N();Object.defineProperty(nI,"__esModule",{value:!0});nI.printString=DH;function DH(e){return`"${e.replace(bH,AH)}"`}var bH=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function AH(e){return RH[e.charCodeAt(0)]}var RH=["\\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 ju=w(Zo=>{"use strict";m();T();N();Object.defineProperty(Zo,"__esModule",{value:!0});Zo.BREAK=void 0;Zo.getEnterLeaveForKind=Am;Zo.getVisitFn=CH;Zo.visit=wH;Zo.visitInParallel=LH;var FH=Lr(),PH=Xt(),rI=Oa(),hF=Pt(),el=Object.freeze({});Zo.BREAK=el;function wH(e,t,n=rI.QueryDocumentKeys){let r=new Map;for(let Q of Object.values(hF.Kind))r.set(Q,Am(t,Q));let i,a=Array.isArray(e),o=[e],c=-1,l=[],d=e,f,y,I=[],v=[];do{c++;let Q=c===o.length,se=Q&&l.length!==0;if(Q){if(f=v.length===0?void 0:I[I.length-1],d=y,y=v.pop(),se)if(a){d=d.slice();let Te=0;for(let[de,Re]of l){let xe=de-Te;Re===null?(d.splice(xe,1),Te++):d[xe]=Re}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(let[Te,de]of l)d[Te]=de}c=i.index,o=i.keys,l=i.edits,a=i.inArray,i=i.prev}else if(y){if(f=a?c:o[c],d=y[f],d==null)continue;I.push(f)}let ie;if(!Array.isArray(d)){var P,k;(0,rI.isNode)(d)||(0,FH.devAssert)(!1,`Invalid AST Node: ${(0,PH.inspect)(d)}.`);let Te=Q?(P=r.get(d.kind))===null||P===void 0?void 0:P.leave:(k=r.get(d.kind))===null||k===void 0?void 0:k.enter;if(ie=Te==null?void 0:Te.call(t,d,f,y,I,v),ie===el)break;if(ie===!1){if(!Q){I.pop();continue}}else if(ie!==void 0&&(l.push([f,ie]),!Q))if((0,rI.isNode)(ie))d=ie;else{I.pop();continue}}if(ie===void 0&&se&&l.push([f,d]),Q)I.pop();else{var K;i={inArray:a,index:c,keys:o,edits:l,prev:i},a=Array.isArray(d),o=a?d:(K=n[d.kind])!==null&&K!==void 0?K:[],c=-1,l=[],y&&v.push(y),y=d}}while(i!==void 0);return l.length!==0?l[l.length-1][1]:e}function LH(e){let t=new Array(e.length).fill(null),n=Object.create(null);for(let r of Object.values(hF.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(iI,"__esModule",{value:!0});iI.print=MH;var BH=Dd(),UH=EF(),kH=ju();function MH(e){return(0,kH.visit)(e,qH)}var xH=80,qH={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Ve(e.definitions,` +spurious results.`)}}return!1};Dm.instanceOf=PH});var Am=w(Ud=>{"use strict";m();T();N();Object.defineProperty(Ud,"__esModule",{value:!0});Ud.Source=void 0;Ud.isSource=LH;var iI=Br(),FH=Xt(),wH=Bd(),bm=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||(0,iI.devAssert)(!1,`Body must be a string. Received: ${(0,FH.inspect)(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||(0,iI.devAssert)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,iI.devAssert)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};Ud.Source=bm;function LH(e){return(0,wH.instanceOf)(e,bm)}});var rl=w(Zo=>{"use strict";m();T();N();Object.defineProperty(Zo,"__esModule",{value:!0});Zo.Parser=void 0;Zo.parse=BH;Zo.parseConstValue=kH;Zo.parseType=MH;Zo.parseValue=UH;var Gu=gm(),kd=ba(),CH=tl(),at=Ft(),BP=Sm(),CP=Am(),Oe=wd();function BH(e,t){return new $u(e,t).parseDocument()}function UH(e,t){let n=new $u(e,t);n.expectToken(Oe.TokenKind.SOF);let r=n.parseValueLiteral(!1);return n.expectToken(Oe.TokenKind.EOF),r}function kH(e,t){let n=new $u(e,t);n.expectToken(Oe.TokenKind.SOF);let r=n.parseConstValueLiteral();return n.expectToken(Oe.TokenKind.EOF),r}function MH(e,t){let n=new $u(e,t);n.expectToken(Oe.TokenKind.SOF);let r=n.parseTypeReference();return n.expectToken(Oe.TokenKind.EOF),r}var $u=class{constructor(t,n={}){let r=(0,CP.isSource)(t)?t:new CP.Source(t);this._lexer=new BP.Lexer(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(Oe.TokenKind.NAME);return this.node(t,{kind:at.Kind.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:at.Kind.DOCUMENT,definitions:this.many(Oe.TokenKind.SOF,this.parseDefinition,Oe.TokenKind.EOF)})}parseDefinition(){if(this.peek(Oe.TokenKind.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===Oe.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,Gu.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(Oe.TokenKind.BRACE_L))return this.node(t,{kind:at.Kind.OPERATION_DEFINITION,operation:kd.OperationTypeNode.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(Oe.TokenKind.NAME)&&(r=this.parseName()),this.node(t,{kind:at.Kind.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(Oe.TokenKind.NAME);switch(t.value){case"query":return kd.OperationTypeNode.QUERY;case"mutation":return kd.OperationTypeNode.MUTATION;case"subscription":return kd.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(Oe.TokenKind.PAREN_L,this.parseVariableDefinition,Oe.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:at.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Oe.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Oe.TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(Oe.TokenKind.DOLLAR),this.node(t,{kind:at.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:at.Kind.SELECTION_SET,selections:this.many(Oe.TokenKind.BRACE_L,this.parseSelection,Oe.TokenKind.BRACE_R)})}parseSelection(){return this.peek(Oe.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(Oe.TokenKind.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:at.Kind.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Oe.TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(Oe.TokenKind.PAREN_L,n,Oe.TokenKind.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(Oe.TokenKind.COLON),this.node(n,{kind:at.Kind.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(Oe.TokenKind.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(Oe.TokenKind.NAME)?this.node(t,{kind:at.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:at.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:at.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:at.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 Oe.TokenKind.BRACKET_L:return this.parseList(t);case Oe.TokenKind.BRACE_L:return this.parseObject(t);case Oe.TokenKind.INT:return this.advanceLexer(),this.node(n,{kind:at.Kind.INT,value:n.value});case Oe.TokenKind.FLOAT:return this.advanceLexer(),this.node(n,{kind:at.Kind.FLOAT,value:n.value});case Oe.TokenKind.STRING:case Oe.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case Oe.TokenKind.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:at.Kind.BOOLEAN,value:!0});case"false":return this.node(n,{kind:at.Kind.BOOLEAN,value:!1});case"null":return this.node(n,{kind:at.Kind.NULL});default:return this.node(n,{kind:at.Kind.ENUM,value:n.value})}case Oe.TokenKind.DOLLAR:if(t)if(this.expectToken(Oe.TokenKind.DOLLAR),this._lexer.token.kind===Oe.TokenKind.NAME){let r=this._lexer.token.value;throw(0,Gu.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:at.Kind.STRING,value:t.value,block:t.kind===Oe.TokenKind.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:at.Kind.LIST,values:this.any(Oe.TokenKind.BRACKET_L,n,Oe.TokenKind.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:at.Kind.OBJECT,fields:this.any(Oe.TokenKind.BRACE_L,n,Oe.TokenKind.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(Oe.TokenKind.COLON),this.node(n,{kind:at.Kind.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(Oe.TokenKind.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(Oe.TokenKind.AT),this.node(n,{kind:at.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(Oe.TokenKind.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(Oe.TokenKind.BRACKET_R),n=this.node(t,{kind:at.Kind.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(Oe.TokenKind.BANG)?this.node(t,{kind:at.Kind.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:at.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Oe.TokenKind.STRING)||this.peek(Oe.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(Oe.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Oe.TokenKind.BRACE_R);return this.node(t,{kind:at.Kind.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(Oe.TokenKind.COLON);let r=this.parseNamedType();return this.node(t,{kind:at.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:at.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:at.Kind.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Oe.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Oe.TokenKind.BRACE_L,this.parseFieldDefinition,Oe.TokenKind.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Oe.TokenKind.COLON);let a=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:at.Kind.FIELD_DEFINITION,description:n,name:r,arguments:i,type:a,directives:o})}parseArgumentDefs(){return this.optionalMany(Oe.TokenKind.PAREN_L,this.parseInputValueDef,Oe.TokenKind.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(Oe.TokenKind.COLON);let i=this.parseTypeReference(),a;this.expectOptionalToken(Oe.TokenKind.EQUALS)&&(a=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:at.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:at.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:at.Kind.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(Oe.TokenKind.EQUALS)?this.delimitedMany(Oe.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:at.Kind.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:a})}parseEnumValuesDefinition(){return this.optionalMany(Oe.TokenKind.BRACE_L,this.parseEnumValueDefinition,Oe.TokenKind.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:at.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,Gu.syntaxError)(this._lexer.source,this._lexer.token.start,`${Rm(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:at.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(Oe.TokenKind.BRACE_L,this.parseInputValueDef,Oe.TokenKind.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===Oe.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(Oe.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Oe.TokenKind.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:at.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:at.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:at.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:at.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:at.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:at.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:at.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(Oe.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:at.Kind.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Oe.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(CH.DirectiveLocation,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new kd.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,Gu.syntaxError)(this._lexer.source,n.start,`Expected ${UP(t)}, found ${Rm(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===Oe.TokenKind.NAME&&n.value===t)this.advanceLexer();else throw(0,Gu.syntaxError)(this._lexer.source,n.start,`Expected "${t}", found ${Rm(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===Oe.TokenKind.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t!=null?t:this._lexer.token;return(0,Gu.syntaxError)(this._lexer.source,n.start,`Unexpected ${Rm(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!==Oe.TokenKind.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw(0,Gu.syntaxError)(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};Zo.Parser=$u;function Rm(e){let t=e.value;return UP(e.kind)+(t!=null?` "${t}"`:"")}function UP(e){return(0,BP.isPunctuatorTokenKind)(e)?`"${e}"`:e}});var eu=w(aI=>{"use strict";m();T();N();Object.defineProperty(aI,"__esModule",{value:!0});aI.didYouMean=qH;var xH=5;function qH(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,xH),c=o.pop();return i+o.join(", ")+", or "+c+"?"}});var kP=w(sI=>{"use strict";m();T();N();Object.defineProperty(sI,"__esModule",{value:!0});sI.identityFunc=VH;function VH(e){return e}});var tu=w(oI=>{"use strict";m();T();N();Object.defineProperty(oI,"__esModule",{value:!0});oI.keyMap=jH;function jH(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}});var Md=w(uI=>{"use strict";m();T();N();Object.defineProperty(uI,"__esModule",{value:!0});uI.keyValMap=KH;function KH(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}});var lI=w(cI=>{"use strict";m();T();N();Object.defineProperty(cI,"__esModule",{value:!0});cI.mapValue=GH;function GH(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}});var xd=w(pI=>{"use strict";m();T();N();Object.defineProperty(pI,"__esModule",{value:!0});pI.naturalCompare=$H;function $H(e,t){let n=0,r=0;for(;n0);let c=0;do++r,c=c*10+a-dI,a=t.charCodeAt(r);while(Pm(a)&&c>0);if(oc)return 1}else{if(ia)return 1;++n,++r}}return e.length-t.length}var dI=48,QH=57;function Pm(e){return!isNaN(e)&&dI<=e&&e<=QH}});var nu=w(mI=>{"use strict";m();T();N();Object.defineProperty(mI,"__esModule",{value:!0});mI.suggestionList=JH;var YH=xd();function JH(e,t){let n=Object.create(null),r=new fI(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,YH.naturalCompare)(a,o)})}var fI=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=MP(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=MP(r),a=this._inputArray;if(i.lengthn)return;let l=this._rows;for(let f=0;f<=c;f++)l[0][f]=f;for(let f=1;f<=o;f++){let y=l[(f-1)%3],I=l[f%3],v=I[0]=f;for(let F=1;F<=c;F++){let k=i[f-1]===a[F-1]?0:1,K=Math.min(y[F]+1,I[F-1]+1,y[F-1]+k);if(f>1&&F>1&&i[f-1]===a[F-2]&&i[f-2]===a[F-1]){let J=l[(f-2)%3][F-2];K=Math.min(K,J+1)}Kn)return}let d=l[o%3][c];return d<=n?d:void 0}};function MP(e){let t=e.length,n=new Array(t);for(let r=0;r{"use strict";m();T();N();Object.defineProperty(NI,"__esModule",{value:!0});NI.toObjMap=HH;function HH(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 xP=w(TI=>{"use strict";m();T();N();Object.defineProperty(TI,"__esModule",{value:!0});TI.printString=zH;function zH(e){return`"${e.replace(WH,XH)}"`}var WH=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function XH(e){return ZH[e.charCodeAt(0)]}var ZH=["\\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 Qu=w(ru=>{"use strict";m();T();N();Object.defineProperty(ru,"__esModule",{value:!0});ru.BREAK=void 0;ru.getEnterLeaveForKind=wm;ru.getVisitFn=i3;ru.visit=n3;ru.visitInParallel=r3;var e3=Br(),t3=Xt(),EI=ba(),qP=Ft(),il=Object.freeze({});ru.BREAK=il;function n3(e,t,n=EI.QueryDocumentKeys){let r=new Map;for(let J of Object.values(qP.Kind))r.set(J,wm(t,J));let i,a=Array.isArray(e),o=[e],c=-1,l=[],d=e,f,y,I=[],v=[];do{c++;let J=c===o.length,se=J&&l.length!==0;if(J){if(f=v.length===0?void 0:I[I.length-1],d=y,y=v.pop(),se)if(a){d=d.slice();let Te=0;for(let[de,Re]of l){let xe=de-Te;Re===null?(d.splice(xe,1),Te++):d[xe]=Re}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(let[Te,de]of l)d[Te]=de}c=i.index,o=i.keys,l=i.edits,a=i.inArray,i=i.prev}else if(y){if(f=a?c:o[c],d=y[f],d==null)continue;I.push(f)}let ie;if(!Array.isArray(d)){var F,k;(0,EI.isNode)(d)||(0,e3.devAssert)(!1,`Invalid AST Node: ${(0,t3.inspect)(d)}.`);let Te=J?(F=r.get(d.kind))===null||F===void 0?void 0:F.leave:(k=r.get(d.kind))===null||k===void 0?void 0:k.enter;if(ie=Te==null?void 0:Te.call(t,d,f,y,I,v),ie===il)break;if(ie===!1){if(!J){I.pop();continue}}else if(ie!==void 0&&(l.push([f,ie]),!J))if((0,EI.isNode)(ie))d=ie;else{I.pop();continue}}if(ie===void 0&&se&&l.push([f,d]),J)I.pop();else{var K;i={inArray:a,index:c,keys:o,edits:l,prev:i},a=Array.isArray(d),o=a?d:(K=n[d.kind])!==null&&K!==void 0?K:[],c=-1,l=[],y&&v.push(y),y=d}}while(i!==void 0);return l.length!==0?l[l.length-1][1]:e}function r3(e){let t=new Array(e.length).fill(null),n=Object.create(null);for(let r of Object.values(qP.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(hI,"__esModule",{value:!0});hI.print=u3;var a3=Pd(),s3=xP(),o3=Qu();function u3(e){return(0,o3.visit)(e,l3)}var c3=80,l3={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Ve(e.definitions,` -`)},OperationDefinition:{leave(e){let t=Dt("(",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+Dt(" = ",n)+Dt(" ",Ve(r," "))},SelectionSet:{leave:({selections:e})=>Zi(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=Dt("",e,": ")+t,o=a+Dt("(",Ve(n,", "),")");return o.length>xH&&(o=a+Dt(`( -`,Rm(Ve(n,` +`)},OperationDefinition:{leave(e){let t=Dt("(",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+Dt(" = ",n)+Dt(" ",Ve(r," "))},SelectionSet:{leave:({selections:e})=>ta(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=Dt("",e,": ")+t,o=a+Dt("(",Ve(n,", "),")");return o.length>c3&&(o=a+Dt(`( +`,Lm(Ve(n,` `)),` -)`)),Ve([o,Ve(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Dt(" ",Ve(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Ve(["...",Dt("on ",e),Ve(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${Dt("(",Ve(n,", "),")")} on ${t} ${Dt("",Ve(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?(0,BH.printBlockString)(e):(0,UH.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+Dt("(",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})=>Dt("",e,` -`)+Ve(["schema",Ve(t," "),Zi(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>Dt("",e,` +)`)),Ve([o,Ve(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Dt(" ",Ve(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Ve(["...",Dt("on ",e),Ve(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${Dt("(",Ve(n,", "),")")} on ${t} ${Dt("",Ve(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?(0,a3.printBlockString)(e):(0,s3.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+Dt("(",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})=>Dt("",e,` +`)+Ve(["schema",Ve(t," "),ta(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>Dt("",e,` `)+Ve(["scalar",t,Ve(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>Dt("",e,` -`)+Ve(["type",t,Dt("implements ",Ve(n," & ")),Ve(r," "),Zi(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>Dt("",e,` -`)+t+(yF(n)?Dt(`( -`,Rm(Ve(n,` +`)+Ve(["type",t,Dt("implements ",Ve(n," & ")),Ve(r," "),ta(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>Dt("",e,` +`)+t+(VP(n)?Dt(`( +`,Lm(Ve(n,` `)),` )`):Dt("(",Ve(n,", "),")"))+": "+r+Dt(" ",Ve(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>Dt("",e,` `)+Ve([t+": "+n,Dt("= ",r),Ve(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>Dt("",e,` -`)+Ve(["interface",t,Dt("implements ",Ve(n," & ")),Ve(r," "),Zi(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>Dt("",e,` +`)+Ve(["interface",t,Dt("implements ",Ve(n," & ")),Ve(r," "),ta(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>Dt("",e,` `)+Ve(["union",t,Ve(n," "),Dt("= ",Ve(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>Dt("",e,` -`)+Ve(["enum",t,Ve(n," "),Zi(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>Dt("",e,` +`)+Ve(["enum",t,Ve(n," "),ta(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>Dt("",e,` `)+Ve([t,Ve(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>Dt("",e,` -`)+Ve(["input",t,Ve(n," "),Zi(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>Dt("",e,` -`)+"directive @"+t+(yF(n)?Dt(`( -`,Rm(Ve(n,` +`)+Ve(["input",t,Ve(n," "),ta(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>Dt("",e,` +`)+"directive @"+t+(VP(n)?Dt(`( +`,Lm(Ve(n,` `)),` -)`):Dt("(",Ve(n,", "),")"))+(r?" repeatable":"")+" on "+Ve(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Ve(["extend schema",Ve(e," "),Zi(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,Dt("implements ",Ve(t," & ")),Ve(n," "),Zi(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Ve(["extend interface",e,Dt("implements ",Ve(t," & ")),Ve(n," "),Zi(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Ve(["extend union",e,Ve(t," "),Dt("= ",Ve(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Ve(["extend enum",e,Ve(t," "),Zi(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Ve(["extend input",e,Ve(t," "),Zi(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 Zi(e){return Dt(`{ -`,Rm(Ve(e,` +)`):Dt("(",Ve(n,", "),")"))+(r?" repeatable":"")+" on "+Ve(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Ve(["extend schema",Ve(e," "),ta(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,Dt("implements ",Ve(t," & ")),Ve(n," "),ta(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Ve(["extend interface",e,Dt("implements ",Ve(t," & ")),Ve(n," "),ta(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Ve(["extend union",e,Ve(t," "),Dt("= ",Ve(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Ve(["extend enum",e,Ve(t," "),ta(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Ve(["extend input",e,Ve(t," "),ta(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 ta(e){return Dt(`{ +`,Lm(Ve(e,` `)),` -}`)}function Dt(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function Rm(e){return Dt(" ",e.replace(/\n/g,` - `))}function yF(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` -`)))!==null&&t!==void 0?t:!1}});var oI=w(sI=>{"use strict";m();T();N();Object.defineProperty(sI,"__esModule",{value:!0});sI.valueFromASTUntyped=aI;var VH=Cd(),ds=Pt();function aI(e,t){switch(e.kind){case ds.Kind.NULL:return null;case ds.Kind.INT:return parseInt(e.value,10);case ds.Kind.FLOAT:return parseFloat(e.value);case ds.Kind.STRING:case ds.Kind.ENUM:case ds.Kind.BOOLEAN:return e.value;case ds.Kind.LIST:return e.values.map(n=>aI(n,t));case ds.Kind.OBJECT:return(0,VH.keyValMap)(e.fields,n=>n.name.value,n=>aI(n.value,t));case ds.Kind.VARIABLE:return t==null?void 0:t[e.name.value]}}});var Ud=w(Pm=>{"use strict";m();T();N();Object.defineProperty(Pm,"__esModule",{value:!0});Pm.assertEnumValueName=jH;Pm.assertName=_F;var IF=Lr(),Fm=ze(),gF=hm();function _F(e){if(e!=null||(0,IF.devAssert)(!1,"Must provide name."),typeof e=="string"||(0,IF.devAssert)(!1,"Expected name to be a string."),e.length===0)throw new Fm.GraphQLError("Expected name to be a non-empty string.");for(let t=1;t{"use strict";m();T();N();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.GraphQLUnionType=Ge.GraphQLScalarType=Ge.GraphQLObjectType=Ge.GraphQLNonNull=Ge.GraphQLList=Ge.GraphQLInterfaceType=Ge.GraphQLInputObjectType=Ge.GraphQLEnumType=void 0;Ge.argsToArgsConfig=BF;Ge.assertAbstractType=u3;Ge.assertCompositeType=o3;Ge.assertEnumType=e3;Ge.assertInputObjectType=t3;Ge.assertInputType=i3;Ge.assertInterfaceType=XH;Ge.assertLeafType=s3;Ge.assertListType=n3;Ge.assertNamedType=p3;Ge.assertNonNullType=r3;Ge.assertNullableType=l3;Ge.assertObjectType=WH;Ge.assertOutputType=a3;Ge.assertScalarType=zH;Ge.assertType=HH;Ge.assertUnionType=ZH;Ge.assertWrappingType=c3;Ge.defineArguments=LF;Ge.getNamedType=f3;Ge.getNullableType=d3;Ge.isAbstractType=RF;Ge.isCompositeType=AF;Ge.isEnumType=Qu;Ge.isInputObjectType=Md;Ge.isInputType=uI;Ge.isInterfaceType=Gu;Ge.isLeafType=bF;Ge.isListType=Km;Ge.isNamedType=FF;Ge.isNonNullType=tu;Ge.isNullableType=lI;Ge.isObjectType=nl;Ge.isOutputType=cI;Ge.isRequiredArgument=m3;Ge.isRequiredInputField=E3;Ge.isScalarType=Ku;Ge.isType=jm;Ge.isUnionType=$u;Ge.isWrappingType=xd;Ge.resolveObjMapThunk=pI;Ge.resolveReadonlyArrayThunk=dI;var sr=Lr(),KH=zo(),vF=NF(),pn=Xt(),eu=Pd(),GH=Sa(),$H=Wo(),DF=Cd(),Vm=zy(),QH=Xo(),Da=bm(),kd=ze(),YH=Pt(),SF=ci(),JH=oI(),ba=Ud();function jm(e){return Ku(e)||nl(e)||Gu(e)||$u(e)||Qu(e)||Md(e)||Km(e)||tu(e)}function HH(e){if(!jm(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL type.`);return e}function Ku(e){return(0,eu.instanceOf)(e,Bm)}function zH(e){if(!Ku(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Scalar type.`);return e}function nl(e){return(0,eu.instanceOf)(e,Um)}function WH(e){if(!nl(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Object type.`);return e}function Gu(e){return(0,eu.instanceOf)(e,km)}function XH(e){if(!Gu(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Interface type.`);return e}function $u(e){return(0,eu.instanceOf)(e,Mm)}function ZH(e){if(!$u(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Union type.`);return e}function Qu(e){return(0,eu.instanceOf)(e,xm)}function e3(e){if(!Qu(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Enum type.`);return e}function Md(e){return(0,eu.instanceOf)(e,qm)}function t3(e){if(!Md(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Input Object type.`);return e}function Km(e){return(0,eu.instanceOf)(e,Lm)}function n3(e){if(!Km(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL List type.`);return e}function tu(e){return(0,eu.instanceOf)(e,Cm)}function r3(e){if(!tu(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Non-Null type.`);return e}function uI(e){return Ku(e)||Qu(e)||Md(e)||xd(e)&&uI(e.ofType)}function i3(e){if(!uI(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL input type.`);return e}function cI(e){return Ku(e)||nl(e)||Gu(e)||$u(e)||Qu(e)||xd(e)&&cI(e.ofType)}function a3(e){if(!cI(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL output type.`);return e}function bF(e){return Ku(e)||Qu(e)}function s3(e){if(!bF(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL leaf type.`);return e}function AF(e){return nl(e)||Gu(e)||$u(e)}function o3(e){if(!AF(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL composite type.`);return e}function RF(e){return Gu(e)||$u(e)}function u3(e){if(!RF(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL abstract type.`);return e}var Lm=class{constructor(t){jm(t)||(0,sr.devAssert)(!1,`Expected ${(0,pn.inspect)(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}};Ge.GraphQLList=Lm;var Cm=class{constructor(t){lI(t)||(0,sr.devAssert)(!1,`Expected ${(0,pn.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()}};Ge.GraphQLNonNull=Cm;function xd(e){return Km(e)||tu(e)}function c3(e){if(!xd(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL wrapping type.`);return e}function lI(e){return jm(e)&&!tu(e)}function l3(e){if(!lI(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL nullable type.`);return e}function d3(e){if(e)return tu(e)?e.ofType:e}function FF(e){return Ku(e)||nl(e)||Gu(e)||$u(e)||Qu(e)||Md(e)}function p3(e){if(!FF(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL named type.`);return e}function f3(e){if(e){let t=e;for(;xd(t);)t=t.ofType;return t}}function dI(e){return typeof e=="function"?e():e}function pI(e){return typeof e=="function"?e():e}var Bm=class{constructor(t){var n,r,i,a;let o=(n=t.parseValue)!==null&&n!==void 0?n:vF.identityFunc;this.name=(0,ba.assertName)(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:vF.identityFunc,this.parseValue=o,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(c,l)=>o((0,JH.valueFromASTUntyped)(c,l)),this.extensions=(0,Da.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,sr.devAssert)(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${(0,pn.inspect)(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||(0,sr.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,sr.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()}};Ge.GraphQLScalarType=Bm;var Um=class{constructor(t){var n;this.name=(0,ba.assertName)(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=(0,Da.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>wF(t),this._interfaces=()=>PF(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||(0,sr.devAssert)(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${(0,pn.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:CF(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLObjectType=Um;function PF(e){var t;let n=dI((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||(0,sr.devAssert)(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function wF(e){let t=pI(e.fields);return tl(t)||(0,sr.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,Vm.mapValue)(t,(n,r)=>{var i;tl(n)||(0,sr.devAssert)(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||(0,sr.devAssert)(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${(0,pn.inspect)(n.resolve)}.`);let a=(i=n.args)!==null&&i!==void 0?i:{};return tl(a)||(0,sr.devAssert)(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:(0,ba.assertName)(r),description:n.description,type:n.type,args:LF(a),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:(0,Da.toObjMap)(n.extensions),astNode:n.astNode}})}function LF(e){return Object.entries(e).map(([t,n])=>({name:(0,ba.assertName)(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,Da.toObjMap)(n.extensions),astNode:n.astNode}))}function tl(e){return(0,GH.isObjectLike)(e)&&!Array.isArray(e)}function CF(e){return(0,Vm.mapValue)(e,t=>({description:t.description,type:t.type,args:BF(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function BF(e){return(0,DF.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 m3(e){return tu(e.type)&&e.defaultValue===void 0}var km=class{constructor(t){var n;this.name=(0,ba.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,Da.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=wF.bind(void 0,t),this._interfaces=PF.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,sr.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,pn.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:CF(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLInterfaceType=km;var Mm=class{constructor(t){var n;this.name=(0,ba.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,Da.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=N3.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,sr.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,pn.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()}};Ge.GraphQLUnionType=Mm;function N3(e){let t=dI(e.types);return Array.isArray(t)||(0,sr.devAssert)(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}var xm=class{constructor(t){var n;this.name=(0,ba.assertName)(t.name),this.description=t.description,this.extensions=(0,Da.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:OF(this.name,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=OF(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=(0,$H.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 kd.GraphQLError(`Enum "${this.name}" cannot represent value: ${(0,pn.inspect)(t)}`);return n.name}parseValue(t){if(typeof t!="string"){let r=(0,pn.inspect)(t);throw new kd.GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${r}.`+wm(this,r))}let n=this.getValue(t);if(n==null)throw new kd.GraphQLError(`Value "${t}" does not exist in "${this.name}" enum.`+wm(this,t));return n.value}parseLiteral(t,n){if(t.kind!==YH.Kind.ENUM){let i=(0,SF.print)(t);throw new kd.GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+wm(this,i),{nodes:t})}let r=this.getValue(t.value);if(r==null){let i=(0,SF.print)(t);throw new kd.GraphQLError(`Value "${i}" does not exist in "${this.name}" enum.`+wm(this,i),{nodes:t})}return r.value}toConfig(){let t=(0,DF.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()}};Ge.GraphQLEnumType=xm;function wm(e,t){let n=e.getValues().map(i=>i.name),r=(0,QH.suggestionList)(t,n);return(0,KH.didYouMean)("the enum value",r)}function OF(e,t){return tl(t)||(0,sr.devAssert)(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(tl(r)||(0,sr.devAssert)(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${(0,pn.inspect)(r)}.`),{name:(0,ba.assertEnumValueName)(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:(0,Da.toObjMap)(r.extensions),astNode:r.astNode}))}var qm=class{constructor(t){var n,r;this.name=(0,ba.assertName)(t.name),this.description=t.description,this.extensions=(0,Da.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=T3.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,Vm.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()}};Ge.GraphQLInputObjectType=qm;function T3(e){let t=pI(e.fields);return tl(t)||(0,sr.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,Vm.mapValue)(t,(n,r)=>(!("resolve"in n)||(0,sr.devAssert)(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:(0,ba.assertName)(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,Da.toObjMap)(n.extensions),astNode:n.astNode}))}function E3(e){return tu(e.type)&&e.defaultValue===void 0}});var Vd=w(qd=>{"use strict";m();T();N();Object.defineProperty(qd,"__esModule",{value:!0});qd.doTypesOverlap=h3;qd.isEqualType=fI;qd.isTypeSubTypeOf=Gm;var gr=wt();function fI(e,t){return e===t?!0:(0,gr.isNonNullType)(e)&&(0,gr.isNonNullType)(t)||(0,gr.isListType)(e)&&(0,gr.isListType)(t)?fI(e.ofType,t.ofType):!1}function Gm(e,t,n){return t===n?!0:(0,gr.isNonNullType)(n)?(0,gr.isNonNullType)(t)?Gm(e,t.ofType,n.ofType):!1:(0,gr.isNonNullType)(t)?Gm(e,t.ofType,n):(0,gr.isListType)(n)?(0,gr.isListType)(t)?Gm(e,t.ofType,n.ofType):!1:(0,gr.isListType)(t)?!1:(0,gr.isAbstractType)(n)&&((0,gr.isInterfaceType)(t)||(0,gr.isObjectType)(t))&&e.isSubType(n,t)}function h3(e,t,n){return t===n?!0:(0,gr.isAbstractType)(t)?(0,gr.isAbstractType)(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):(0,gr.isAbstractType)(n)?e.isSubType(n,t):!1}});var Aa=w(zn=>{"use strict";m();T();N();Object.defineProperty(zn,"__esModule",{value:!0});zn.GraphQLString=zn.GraphQLInt=zn.GraphQLID=zn.GraphQLFloat=zn.GraphQLBoolean=zn.GRAPHQL_MIN_INT=zn.GRAPHQL_MAX_INT=void 0;zn.isSpecifiedScalarType=y3;zn.specifiedScalarTypes=void 0;var ea=Xt(),UF=Sa(),or=ze(),Yu=Pt(),jd=ci(),Kd=wt(),$m=2147483647;zn.GRAPHQL_MAX_INT=$m;var Qm=-2147483648;zn.GRAPHQL_MIN_INT=Qm;var kF=new Kd.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=Gd(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 or.GraphQLError(`Int cannot represent non-integer value: ${(0,ea.inspect)(t)}`);if(n>$m||n$m||e$m||te.name===t)}function Gd(e){if((0,UF.isObjectLike)(e)){if(typeof e.valueOf=="function"){let t=e.valueOf();if(!(0,UF.isObjectLike)(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}});var $r=w(qn=>{"use strict";m();T();N();Object.defineProperty(qn,"__esModule",{value:!0});qn.GraphQLSpecifiedByDirective=qn.GraphQLSkipDirective=qn.GraphQLOneOfDirective=qn.GraphQLIncludeDirective=qn.GraphQLDirective=qn.GraphQLDeprecatedDirective=qn.DEFAULT_DEPRECATION_REASON=void 0;qn.assertDirective=O3;qn.isDirective=GF;qn.isSpecifiedDirective=D3;qn.specifiedDirectives=void 0;var KF=Lr(),I3=Xt(),g3=Pd(),_3=Sa(),v3=bm(),bi=Wc(),S3=Ud(),$d=wt(),Ym=Aa();function GF(e){return(0,g3.instanceOf)(e,ps)}function O3(e){if(!GF(e))throw new Error(`Expected ${(0,I3.inspect)(e)} to be a GraphQL directive.`);return e}var ps=class{constructor(t){var n,r;this.name=(0,S3.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,v3.toObjMap)(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||(0,KF.devAssert)(!1,`@${t.name} locations must be an Array.`);let i=(r=t.args)!==null&&r!==void 0?r:{};(0,_3.isObjectLike)(i)&&!Array.isArray(i)||(0,KF.devAssert)(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=(0,$d.defineArguments)(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:(0,$d.argsToArgsConfig)(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}};qn.GraphQLDirective=ps;var $F=new ps({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[bi.DirectiveLocation.FIELD,bi.DirectiveLocation.FRAGMENT_SPREAD,bi.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new $d.GraphQLNonNull(Ym.GraphQLBoolean),description:"Included when true."}}});qn.GraphQLIncludeDirective=$F;var QF=new ps({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[bi.DirectiveLocation.FIELD,bi.DirectiveLocation.FRAGMENT_SPREAD,bi.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new $d.GraphQLNonNull(Ym.GraphQLBoolean),description:"Skipped when true."}}});qn.GraphQLSkipDirective=QF;var YF="No longer supported";qn.DEFAULT_DEPRECATION_REASON=YF;var JF=new ps({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[bi.DirectiveLocation.FIELD_DEFINITION,bi.DirectiveLocation.ARGUMENT_DEFINITION,bi.DirectiveLocation.INPUT_FIELD_DEFINITION,bi.DirectiveLocation.ENUM_VALUE],args:{reason:{type:Ym.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:YF}}});qn.GraphQLDeprecatedDirective=JF;var HF=new ps({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[bi.DirectiveLocation.SCALAR],args:{url:{type:new $d.GraphQLNonNull(Ym.GraphQLString),description:"The URL that specifies the behavior of this scalar."}}});qn.GraphQLSpecifiedByDirective=HF;var zF=new ps({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[bi.DirectiveLocation.INPUT_OBJECT],args:{}});qn.GraphQLOneOfDirective=zF;var WF=Object.freeze([$F,QF,JF,HF,zF]);qn.specifiedDirectives=WF;function D3(e){return WF.some(({name:t})=>t===e.name)}});var Jm=w(mI=>{"use strict";m();T();N();Object.defineProperty(mI,"__esModule",{value:!0});mI.isIterableObject=b3;function b3(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}});var Jd=w(NI=>{"use strict";m();T();N();Object.defineProperty(NI,"__esModule",{value:!0});NI.astFromValue=Yd;var XF=Xt(),A3=Ir(),R3=Jm(),F3=Sa(),Ai=Pt(),Qd=wt(),P3=Aa();function Yd(e,t){if((0,Qd.isNonNullType)(t)){let n=Yd(e,t.ofType);return(n==null?void 0:n.kind)===Ai.Kind.NULL?null:n}if(e===null)return{kind:Ai.Kind.NULL};if(e===void 0)return null;if((0,Qd.isListType)(t)){let n=t.ofType;if((0,R3.isIterableObject)(e)){let r=[];for(let i of e){let a=Yd(i,n);a!=null&&r.push(a)}return{kind:Ai.Kind.LIST,values:r}}return Yd(e,n)}if((0,Qd.isInputObjectType)(t)){if(!(0,F3.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Yd(e[r.name],r.type);i&&n.push({kind:Ai.Kind.OBJECT_FIELD,name:{kind:Ai.Kind.NAME,value:r.name},value:i})}return{kind:Ai.Kind.OBJECT,fields:n}}if((0,Qd.isLeafType)(t)){let n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:Ai.Kind.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){let r=String(n);return ZF.test(r)?{kind:Ai.Kind.INT,value:r}:{kind:Ai.Kind.FLOAT,value:r}}if(typeof n=="string")return(0,Qd.isEnumType)(t)?{kind:Ai.Kind.ENUM,value:n}:t===P3.GraphQLID&&ZF.test(n)?{kind:Ai.Kind.INT,value:n}:{kind:Ai.Kind.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${(0,XF.inspect)(n)}.`)}(0,A3.invariant)(!1,"Unexpected input type: "+(0,XF.inspect)(t))}var ZF=/^-?(?:0|[1-9][0-9]*)$/});var Fi=w(Zt=>{"use strict";m();T();N();Object.defineProperty(Zt,"__esModule",{value:!0});Zt.introspectionTypes=Zt.__TypeKind=Zt.__Type=Zt.__Schema=Zt.__InputValue=Zt.__Field=Zt.__EnumValue=Zt.__DirectiveLocation=Zt.__Directive=Zt.TypeNameMetaFieldDef=Zt.TypeMetaFieldDef=Zt.TypeKind=Zt.SchemaMetaFieldDef=void 0;Zt.isIntrospectionType=x3;var w3=Xt(),L3=Ir(),Wn=Wc(),C3=ci(),B3=Jd(),ke=wt(),cn=Aa(),TI=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:cn.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(Ri))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new ke.GraphQLNonNull(Ri),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Ri,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Ri,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(EI))),resolve:e=>e.getDirectives()}})});Zt.__Schema=TI;var EI=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 Dt(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function Lm(e){return Dt(" ",e.replace(/\n/g,` + `))}function VP(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` +`)))!==null&&t!==void 0?t:!1}});var gI=w(II=>{"use strict";m();T();N();Object.defineProperty(II,"__esModule",{value:!0});II.valueFromASTUntyped=yI;var d3=Md(),Ts=Ft();function yI(e,t){switch(e.kind){case Ts.Kind.NULL:return null;case Ts.Kind.INT:return parseInt(e.value,10);case Ts.Kind.FLOAT:return parseFloat(e.value);case Ts.Kind.STRING:case Ts.Kind.ENUM:case Ts.Kind.BOOLEAN:return e.value;case Ts.Kind.LIST:return e.values.map(n=>yI(n,t));case Ts.Kind.OBJECT:return(0,d3.keyValMap)(e.fields,n=>n.name.value,n=>yI(n.value,t));case Ts.Kind.VARIABLE:return t==null?void 0:t[e.name.value]}}});var qd=w(Bm=>{"use strict";m();T();N();Object.defineProperty(Bm,"__esModule",{value:!0});Bm.assertEnumValueName=p3;Bm.assertName=GP;var jP=Br(),Cm=ze(),KP=_m();function GP(e){if(e!=null||(0,jP.devAssert)(!1,"Must provide name."),typeof e=="string"||(0,jP.devAssert)(!1,"Expected name to be a string."),e.length===0)throw new Cm.GraphQLError("Expected name to be a non-empty string.");for(let t=1;t{"use strict";m();T();N();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.GraphQLUnionType=Ge.GraphQLScalarType=Ge.GraphQLObjectType=Ge.GraphQLNonNull=Ge.GraphQLList=Ge.GraphQLInterfaceType=Ge.GraphQLInputObjectType=Ge.GraphQLEnumType=void 0;Ge.argsToArgsConfig=rF;Ge.assertAbstractType=w3;Ge.assertCompositeType=F3;Ge.assertEnumType=S3;Ge.assertInputObjectType=O3;Ge.assertInputType=A3;Ge.assertInterfaceType=_3;Ge.assertLeafType=P3;Ge.assertListType=D3;Ge.assertNamedType=U3;Ge.assertNonNullType=b3;Ge.assertNullableType=C3;Ge.assertObjectType=g3;Ge.assertOutputType=R3;Ge.assertScalarType=I3;Ge.assertType=y3;Ge.assertUnionType=v3;Ge.assertWrappingType=L3;Ge.defineArguments=tF;Ge.getNamedType=k3;Ge.getNullableType=B3;Ge.isAbstractType=WP;Ge.isCompositeType=zP;Ge.isEnumType=zu;Ge.isInputObjectType=jd;Ge.isInputType=_I;Ge.isInterfaceType=Ju;Ge.isLeafType=HP;Ge.isListType=Ym;Ge.isNamedType=XP;Ge.isNonNullType=au;Ge.isNullableType=SI;Ge.isObjectType=sl;Ge.isOutputType=vI;Ge.isRequiredArgument=M3;Ge.isRequiredInputField=V3;Ge.isScalarType=Yu;Ge.isType=Qm;Ge.isUnionType=Hu;Ge.isWrappingType=Kd;Ge.resolveObjMapThunk=DI;Ge.resolveReadonlyArrayThunk=OI;var or=Br(),f3=eu(),$P=kP(),pn=Xt(),iu=Bd(),m3=Da(),N3=tu(),JP=Md(),$m=lI(),T3=nu(),Aa=Fm(),Vd=ze(),E3=Ft(),QP=ci(),h3=gI(),Ra=qd();function Qm(e){return Yu(e)||sl(e)||Ju(e)||Hu(e)||zu(e)||jd(e)||Ym(e)||au(e)}function y3(e){if(!Qm(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL type.`);return e}function Yu(e){return(0,iu.instanceOf)(e,xm)}function I3(e){if(!Yu(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Scalar type.`);return e}function sl(e){return(0,iu.instanceOf)(e,qm)}function g3(e){if(!sl(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Object type.`);return e}function Ju(e){return(0,iu.instanceOf)(e,Vm)}function _3(e){if(!Ju(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Interface type.`);return e}function Hu(e){return(0,iu.instanceOf)(e,jm)}function v3(e){if(!Hu(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Union type.`);return e}function zu(e){return(0,iu.instanceOf)(e,Km)}function S3(e){if(!zu(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Enum type.`);return e}function jd(e){return(0,iu.instanceOf)(e,Gm)}function O3(e){if(!jd(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Input Object type.`);return e}function Ym(e){return(0,iu.instanceOf)(e,km)}function D3(e){if(!Ym(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL List type.`);return e}function au(e){return(0,iu.instanceOf)(e,Mm)}function b3(e){if(!au(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Non-Null type.`);return e}function _I(e){return Yu(e)||zu(e)||jd(e)||Kd(e)&&_I(e.ofType)}function A3(e){if(!_I(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL input type.`);return e}function vI(e){return Yu(e)||sl(e)||Ju(e)||Hu(e)||zu(e)||Kd(e)&&vI(e.ofType)}function R3(e){if(!vI(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL output type.`);return e}function HP(e){return Yu(e)||zu(e)}function P3(e){if(!HP(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL leaf type.`);return e}function zP(e){return sl(e)||Ju(e)||Hu(e)}function F3(e){if(!zP(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL composite type.`);return e}function WP(e){return Ju(e)||Hu(e)}function w3(e){if(!WP(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL abstract type.`);return e}var km=class{constructor(t){Qm(t)||(0,or.devAssert)(!1,`Expected ${(0,pn.inspect)(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}};Ge.GraphQLList=km;var Mm=class{constructor(t){SI(t)||(0,or.devAssert)(!1,`Expected ${(0,pn.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()}};Ge.GraphQLNonNull=Mm;function Kd(e){return Ym(e)||au(e)}function L3(e){if(!Kd(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL wrapping type.`);return e}function SI(e){return Qm(e)&&!au(e)}function C3(e){if(!SI(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL nullable type.`);return e}function B3(e){if(e)return au(e)?e.ofType:e}function XP(e){return Yu(e)||sl(e)||Ju(e)||Hu(e)||zu(e)||jd(e)}function U3(e){if(!XP(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL named type.`);return e}function k3(e){if(e){let t=e;for(;Kd(t);)t=t.ofType;return t}}function OI(e){return typeof e=="function"?e():e}function DI(e){return typeof e=="function"?e():e}var xm=class{constructor(t){var n,r,i,a;let o=(n=t.parseValue)!==null&&n!==void 0?n:$P.identityFunc;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:$P.identityFunc,this.parseValue=o,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(c,l)=>o((0,h3.valueFromASTUntyped)(c,l)),this.extensions=(0,Aa.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,or.devAssert)(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${(0,pn.inspect)(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||(0,or.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,or.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()}};Ge.GraphQLScalarType=xm;var qm=class{constructor(t){var n;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=(0,Aa.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>eF(t),this._interfaces=()=>ZP(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||(0,or.devAssert)(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${(0,pn.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:nF(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLObjectType=qm;function ZP(e){var t;let n=OI((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||(0,or.devAssert)(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function eF(e){let t=DI(e.fields);return al(t)||(0,or.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,$m.mapValue)(t,(n,r)=>{var i;al(n)||(0,or.devAssert)(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||(0,or.devAssert)(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${(0,pn.inspect)(n.resolve)}.`);let a=(i=n.args)!==null&&i!==void 0?i:{};return al(a)||(0,or.devAssert)(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:(0,Ra.assertName)(r),description:n.description,type:n.type,args:tF(a),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:(0,Aa.toObjMap)(n.extensions),astNode:n.astNode}})}function tF(e){return Object.entries(e).map(([t,n])=>({name:(0,Ra.assertName)(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,Aa.toObjMap)(n.extensions),astNode:n.astNode}))}function al(e){return(0,m3.isObjectLike)(e)&&!Array.isArray(e)}function nF(e){return(0,$m.mapValue)(e,t=>({description:t.description,type:t.type,args:rF(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function rF(e){return(0,JP.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 M3(e){return au(e.type)&&e.defaultValue===void 0}var Vm=class{constructor(t){var n;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,Aa.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=eF.bind(void 0,t),this._interfaces=ZP.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,or.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,pn.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:nF(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLInterfaceType=Vm;var jm=class{constructor(t){var n;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,Aa.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=x3.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,or.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,pn.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()}};Ge.GraphQLUnionType=jm;function x3(e){let t=OI(e.types);return Array.isArray(t)||(0,or.devAssert)(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}var Km=class{constructor(t){var n;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.extensions=(0,Aa.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:YP(this.name,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=YP(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=(0,N3.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 Vd.GraphQLError(`Enum "${this.name}" cannot represent value: ${(0,pn.inspect)(t)}`);return n.name}parseValue(t){if(typeof t!="string"){let r=(0,pn.inspect)(t);throw new Vd.GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${r}.`+Um(this,r))}let n=this.getValue(t);if(n==null)throw new Vd.GraphQLError(`Value "${t}" does not exist in "${this.name}" enum.`+Um(this,t));return n.value}parseLiteral(t,n){if(t.kind!==E3.Kind.ENUM){let i=(0,QP.print)(t);throw new Vd.GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+Um(this,i),{nodes:t})}let r=this.getValue(t.value);if(r==null){let i=(0,QP.print)(t);throw new Vd.GraphQLError(`Value "${i}" does not exist in "${this.name}" enum.`+Um(this,i),{nodes:t})}return r.value}toConfig(){let t=(0,JP.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()}};Ge.GraphQLEnumType=Km;function Um(e,t){let n=e.getValues().map(i=>i.name),r=(0,T3.suggestionList)(t,n);return(0,f3.didYouMean)("the enum value",r)}function YP(e,t){return al(t)||(0,or.devAssert)(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(al(r)||(0,or.devAssert)(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${(0,pn.inspect)(r)}.`),{name:(0,Ra.assertEnumValueName)(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:(0,Aa.toObjMap)(r.extensions),astNode:r.astNode}))}var Gm=class{constructor(t){var n,r;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.extensions=(0,Aa.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=q3.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,$m.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()}};Ge.GraphQLInputObjectType=Gm;function q3(e){let t=DI(e.fields);return al(t)||(0,or.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,$m.mapValue)(t,(n,r)=>(!("resolve"in n)||(0,or.devAssert)(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:(0,Ra.assertName)(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,Aa.toObjMap)(n.extensions),astNode:n.astNode}))}function V3(e){return au(e.type)&&e.defaultValue===void 0}});var $d=w(Gd=>{"use strict";m();T();N();Object.defineProperty(Gd,"__esModule",{value:!0});Gd.doTypesOverlap=j3;Gd.isEqualType=bI;Gd.isTypeSubTypeOf=Jm;var gr=wt();function bI(e,t){return e===t?!0:(0,gr.isNonNullType)(e)&&(0,gr.isNonNullType)(t)||(0,gr.isListType)(e)&&(0,gr.isListType)(t)?bI(e.ofType,t.ofType):!1}function Jm(e,t,n){return t===n?!0:(0,gr.isNonNullType)(n)?(0,gr.isNonNullType)(t)?Jm(e,t.ofType,n.ofType):!1:(0,gr.isNonNullType)(t)?Jm(e,t.ofType,n):(0,gr.isListType)(n)?(0,gr.isListType)(t)?Jm(e,t.ofType,n.ofType):!1:(0,gr.isListType)(t)?!1:(0,gr.isAbstractType)(n)&&((0,gr.isInterfaceType)(t)||(0,gr.isObjectType)(t))&&e.isSubType(n,t)}function j3(e,t,n){return t===n?!0:(0,gr.isAbstractType)(t)?(0,gr.isAbstractType)(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):(0,gr.isAbstractType)(n)?e.isSubType(n,t):!1}});var Pa=w(Wn=>{"use strict";m();T();N();Object.defineProperty(Wn,"__esModule",{value:!0});Wn.GraphQLString=Wn.GraphQLInt=Wn.GraphQLID=Wn.GraphQLFloat=Wn.GraphQLBoolean=Wn.GRAPHQL_MIN_INT=Wn.GRAPHQL_MAX_INT=void 0;Wn.isSpecifiedScalarType=K3;Wn.specifiedScalarTypes=void 0;var na=Xt(),iF=Da(),ur=ze(),Wu=Ft(),Qd=ci(),Yd=wt(),Hm=2147483647;Wn.GRAPHQL_MAX_INT=Hm;var zm=-2147483648;Wn.GRAPHQL_MIN_INT=zm;var aF=new Yd.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=Jd(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 ur.GraphQLError(`Int cannot represent non-integer value: ${(0,na.inspect)(t)}`);if(n>Hm||nHm||eHm||te.name===t)}function Jd(e){if((0,iF.isObjectLike)(e)){if(typeof e.valueOf=="function"){let t=e.valueOf();if(!(0,iF.isObjectLike)(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}});var Qr=w(qn=>{"use strict";m();T();N();Object.defineProperty(qn,"__esModule",{value:!0});qn.GraphQLSpecifiedByDirective=qn.GraphQLSkipDirective=qn.GraphQLOneOfDirective=qn.GraphQLIncludeDirective=qn.GraphQLDirective=qn.GraphQLDeprecatedDirective=qn.DEFAULT_DEPRECATION_REASON=void 0;qn.assertDirective=H3;qn.isDirective=pF;qn.isSpecifiedDirective=z3;qn.specifiedDirectives=void 0;var dF=Br(),G3=Xt(),$3=Bd(),Q3=Da(),Y3=Fm(),Ai=tl(),J3=qd(),Hd=wt(),Wm=Pa();function pF(e){return(0,$3.instanceOf)(e,Es)}function H3(e){if(!pF(e))throw new Error(`Expected ${(0,G3.inspect)(e)} to be a GraphQL directive.`);return e}var Es=class{constructor(t){var n,r;this.name=(0,J3.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,Y3.toObjMap)(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||(0,dF.devAssert)(!1,`@${t.name} locations must be an Array.`);let i=(r=t.args)!==null&&r!==void 0?r:{};(0,Q3.isObjectLike)(i)&&!Array.isArray(i)||(0,dF.devAssert)(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=(0,Hd.defineArguments)(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:(0,Hd.argsToArgsConfig)(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}};qn.GraphQLDirective=Es;var fF=new Es({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[Ai.DirectiveLocation.FIELD,Ai.DirectiveLocation.FRAGMENT_SPREAD,Ai.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Hd.GraphQLNonNull(Wm.GraphQLBoolean),description:"Included when true."}}});qn.GraphQLIncludeDirective=fF;var mF=new Es({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[Ai.DirectiveLocation.FIELD,Ai.DirectiveLocation.FRAGMENT_SPREAD,Ai.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Hd.GraphQLNonNull(Wm.GraphQLBoolean),description:"Skipped when true."}}});qn.GraphQLSkipDirective=mF;var NF="No longer supported";qn.DEFAULT_DEPRECATION_REASON=NF;var TF=new Es({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[Ai.DirectiveLocation.FIELD_DEFINITION,Ai.DirectiveLocation.ARGUMENT_DEFINITION,Ai.DirectiveLocation.INPUT_FIELD_DEFINITION,Ai.DirectiveLocation.ENUM_VALUE],args:{reason:{type:Wm.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:NF}}});qn.GraphQLDeprecatedDirective=TF;var EF=new Es({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Ai.DirectiveLocation.SCALAR],args:{url:{type:new Hd.GraphQLNonNull(Wm.GraphQLString),description:"The URL that specifies the behavior of this scalar."}}});qn.GraphQLSpecifiedByDirective=EF;var hF=new Es({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[Ai.DirectiveLocation.INPUT_OBJECT],args:{}});qn.GraphQLOneOfDirective=hF;var yF=Object.freeze([fF,mF,TF,EF,hF]);qn.specifiedDirectives=yF;function z3(e){return yF.some(({name:t})=>t===e.name)}});var Xm=w(AI=>{"use strict";m();T();N();Object.defineProperty(AI,"__esModule",{value:!0});AI.isIterableObject=W3;function W3(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}});var Xd=w(RI=>{"use strict";m();T();N();Object.defineProperty(RI,"__esModule",{value:!0});RI.astFromValue=Wd;var IF=Xt(),X3=Ir(),Z3=Xm(),e6=Da(),Ri=Ft(),zd=wt(),t6=Pa();function Wd(e,t){if((0,zd.isNonNullType)(t)){let n=Wd(e,t.ofType);return(n==null?void 0:n.kind)===Ri.Kind.NULL?null:n}if(e===null)return{kind:Ri.Kind.NULL};if(e===void 0)return null;if((0,zd.isListType)(t)){let n=t.ofType;if((0,Z3.isIterableObject)(e)){let r=[];for(let i of e){let a=Wd(i,n);a!=null&&r.push(a)}return{kind:Ri.Kind.LIST,values:r}}return Wd(e,n)}if((0,zd.isInputObjectType)(t)){if(!(0,e6.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Wd(e[r.name],r.type);i&&n.push({kind:Ri.Kind.OBJECT_FIELD,name:{kind:Ri.Kind.NAME,value:r.name},value:i})}return{kind:Ri.Kind.OBJECT,fields:n}}if((0,zd.isLeafType)(t)){let n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:Ri.Kind.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){let r=String(n);return gF.test(r)?{kind:Ri.Kind.INT,value:r}:{kind:Ri.Kind.FLOAT,value:r}}if(typeof n=="string")return(0,zd.isEnumType)(t)?{kind:Ri.Kind.ENUM,value:n}:t===t6.GraphQLID&&gF.test(n)?{kind:Ri.Kind.INT,value:n}:{kind:Ri.Kind.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${(0,IF.inspect)(n)}.`)}(0,X3.invariant)(!1,"Unexpected input type: "+(0,IF.inspect)(t))}var gF=/^-?(?:0|[1-9][0-9]*)$/});var Fi=w(Zt=>{"use strict";m();T();N();Object.defineProperty(Zt,"__esModule",{value:!0});Zt.introspectionTypes=Zt.__TypeKind=Zt.__Type=Zt.__Schema=Zt.__InputValue=Zt.__Field=Zt.__EnumValue=Zt.__DirectiveLocation=Zt.__Directive=Zt.TypeNameMetaFieldDef=Zt.TypeMetaFieldDef=Zt.TypeKind=Zt.SchemaMetaFieldDef=void 0;Zt.isIntrospectionType=c6;var n6=Xt(),r6=Ir(),Xn=tl(),i6=ci(),a6=Xd(),ke=wt(),cn=Pa(),PI=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:cn.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(Pi))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new ke.GraphQLNonNull(Pi),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Pi,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Pi,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(FI))),resolve:e=>e.getDirectives()}})});Zt.__Schema=PI;var FI=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(cn.GraphQLString),resolve:e=>e.name},description:{type:cn.GraphQLString,resolve:e=>e.description},isRepeatable:{type:new ke.GraphQLNonNull(cn.GraphQLBoolean),resolve:e=>e.isRepeatable},locations:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(hI))),resolve:e=>e.locations},args:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(Hd))),args:{includeDeprecated:{type:cn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})});Zt.__Directive=EI;var hI=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:Wn.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:Wn.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:Wn.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:Wn.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:Wn.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:Wn.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:Wn.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:Wn.DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:Wn.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:Wn.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:Wn.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:Wn.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:Wn.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:Wn.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:Wn.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:Wn.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:Wn.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:Wn.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:Wn.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}});Zt.__DirectiveLocation=hI;var Ri=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 Xn.SCALAR;if((0,ke.isObjectType)(e))return Xn.OBJECT;if((0,ke.isInterfaceType)(e))return Xn.INTERFACE;if((0,ke.isUnionType)(e))return Xn.UNION;if((0,ke.isEnumType)(e))return Xn.ENUM;if((0,ke.isInputObjectType)(e))return Xn.INPUT_OBJECT;if((0,ke.isListType)(e))return Xn.LIST;if((0,ke.isNonNullType)(e))return Xn.NON_NULL;(0,L3.invariant)(!1,`Unexpected type: "${(0,w3.inspect)(e)}".`)}},name:{type:cn.GraphQLString,resolve:e=>"name"in e?e.name:void 0},description:{type:cn.GraphQLString,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:cn.GraphQLString,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new ke.GraphQLList(new ke.GraphQLNonNull(yI)),args:{includeDeprecated:{type:cn.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(Ri)),resolve(e){if((0,ke.isObjectType)(e)||(0,ke.isInterfaceType)(e))return e.getInterfaces()}},possibleTypes:{type:new ke.GraphQLList(new ke.GraphQLNonNull(Ri)),resolve(e,t,n,{schema:r}){if((0,ke.isAbstractType)(e))return r.getPossibleTypes(e)}},enumValues:{type:new ke.GraphQLList(new ke.GraphQLNonNull(II)),args:{includeDeprecated:{type:cn.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(Hd)),args:{includeDeprecated:{type:cn.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:Ri,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:cn.GraphQLBoolean,resolve:e=>{if((0,ke.isInputObjectType)(e))return e.isOneOf}}})});Zt.__Type=Ri;var yI=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(cn.GraphQLString),resolve:e=>e.name},description:{type:cn.GraphQLString,resolve:e=>e.description},args:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(Hd))),args:{includeDeprecated:{type:cn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new ke.GraphQLNonNull(Ri),resolve:e=>e.type},isDeprecated:{type:new ke.GraphQLNonNull(cn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:cn.GraphQLString,resolve:e=>e.deprecationReason}})});Zt.__Field=yI;var Hd=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(cn.GraphQLString),resolve:e=>e.name},description:{type:cn.GraphQLString,resolve:e=>e.description},type:{type:new ke.GraphQLNonNull(Ri),resolve:e=>e.type},defaultValue:{type:cn.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:n}=e,r=(0,B3.astFromValue)(n,t);return r?(0,C3.print)(r):null}},isDeprecated:{type:new ke.GraphQLNonNull(cn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:cn.GraphQLString,resolve:e=>e.deprecationReason}})});Zt.__InputValue=Hd;var II=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(cn.GraphQLString),resolve:e=>e.name},description:{type:cn.GraphQLString,resolve:e=>e.description},isDeprecated:{type:new ke.GraphQLNonNull(cn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:cn.GraphQLString,resolve:e=>e.deprecationReason}})});Zt.__EnumValue=II;var Xn;Zt.TypeKind=Xn;(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"})(Xn||(Zt.TypeKind=Xn={}));var gI=new ke.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:Xn.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:Xn.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:Xn.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:Xn.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:Xn.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:Xn.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:Xn.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:Xn.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});Zt.__TypeKind=gI;var U3={name:"__schema",type:new ke.GraphQLNonNull(TI),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};Zt.SchemaMetaFieldDef=U3;var k3={name:"__type",type:Ri,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new ke.GraphQLNonNull(cn.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};Zt.TypeMetaFieldDef=k3;var M3={name:"__typename",type:new ke.GraphQLNonNull(cn.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};Zt.TypeNameMetaFieldDef=M3;var eP=Object.freeze([TI,EI,hI,Ri,yI,Hd,II,gI]);Zt.introspectionTypes=eP;function x3(e){return eP.some(({name:t})=>e.name===t)}});var Ju=w(rl=>{"use strict";m();T();N();Object.defineProperty(rl,"__esModule",{value:!0});rl.GraphQLSchema=void 0;rl.assertSchema=G3;rl.isSchema=nP;var Hm=Lr(),vI=Xt(),q3=Pd(),V3=Sa(),j3=bm(),_I=Oa(),ta=wt(),tP=$r(),K3=Fi();function nP(e){return(0,q3.instanceOf)(e,zm)}function G3(e){if(!nP(e))throw new Error(`Expected ${(0,vI.inspect)(e)} to be a GraphQL schema.`);return e}var zm=class{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,(0,V3.isObjectLike)(t)||(0,Hm.devAssert)(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||(0,Hm.devAssert)(!1,`"types" must be Array if provided but got: ${(0,vI.inspect)(t.types)}.`),!t.directives||Array.isArray(t.directives)||(0,Hm.devAssert)(!1,`"directives" must be Array if provided but got: ${(0,vI.inspect)(t.directives)}.`),this.description=t.description,this.extensions=(0,j3.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:tP.specifiedDirectives;let i=new Set(t.types);if(t.types!=null)for(let a of t.types)i.delete(a),na(a,i);this._queryType!=null&&na(this._queryType,i),this._mutationType!=null&&na(this._mutationType,i),this._subscriptionType!=null&&na(this._subscriptionType,i);for(let a of this._directives)if((0,tP.isDirective)(a))for(let o of a.args)na(o.type,i);na(K3.__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,Hm.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,ta.isInterfaceType)(a)){for(let c of a.getInterfaces())if((0,ta.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,ta.isObjectType)(a)){for(let c of a.getInterfaces())if((0,ta.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,ta.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,ta.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}}};rl.GraphQLSchema=zm;function na(e,t){let n=(0,ta.getNamedType)(e);if(!t.has(n)){if(t.add(n),(0,ta.isUnionType)(n))for(let r of n.getTypes())na(r,t);else if((0,ta.isObjectType)(n)||(0,ta.isInterfaceType)(n)){for(let r of n.getInterfaces())na(r,t);for(let r of Object.values(n.getFields())){na(r.type,t);for(let i of r.args)na(i.type,t)}}else if((0,ta.isInputObjectType)(n))for(let r of Object.values(n.getFields()))na(r.type,t)}return t}});var Wd=w(Wm=>{"use strict";m();T();N();Object.defineProperty(Wm,"__esModule",{value:!0});Wm.assertValidSchema=J3;Wm.validateSchema=uP;var _r=Xt(),$3=ze(),SI=Oa(),rP=Vd(),Fn=wt(),oP=$r(),Q3=Fi(),Y3=Ju();function uP(e){if((0,Y3.assertSchema)(e),e.__validationErrors)return e.__validationErrors;let t=new DI(e);H3(t),z3(t),W3(t);let n=t.getErrors();return e.__validationErrors=n,n}function J3(e){let t=uP(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(cn.GraphQLString),resolve:e=>e.name},description:{type:cn.GraphQLString,resolve:e=>e.description},isRepeatable:{type:new ke.GraphQLNonNull(cn.GraphQLBoolean),resolve:e=>e.isRepeatable},locations:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(wI))),resolve:e=>e.locations},args:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(Zd))),args:{includeDeprecated:{type:cn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})});Zt.__Directive=FI;var wI=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:Xn.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:Xn.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:Xn.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:Xn.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:Xn.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:Xn.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:Xn.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:Xn.DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:Xn.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:Xn.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:Xn.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:Xn.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:Xn.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:Xn.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:Xn.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:Xn.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:Xn.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:Xn.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:Xn.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}});Zt.__DirectiveLocation=wI;var Pi=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(BI),resolve(e){if((0,ke.isScalarType)(e))return Zn.SCALAR;if((0,ke.isObjectType)(e))return Zn.OBJECT;if((0,ke.isInterfaceType)(e))return Zn.INTERFACE;if((0,ke.isUnionType)(e))return Zn.UNION;if((0,ke.isEnumType)(e))return Zn.ENUM;if((0,ke.isInputObjectType)(e))return Zn.INPUT_OBJECT;if((0,ke.isListType)(e))return Zn.LIST;if((0,ke.isNonNullType)(e))return Zn.NON_NULL;(0,r6.invariant)(!1,`Unexpected type: "${(0,n6.inspect)(e)}".`)}},name:{type:cn.GraphQLString,resolve:e=>"name"in e?e.name:void 0},description:{type:cn.GraphQLString,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:cn.GraphQLString,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new ke.GraphQLList(new ke.GraphQLNonNull(LI)),args:{includeDeprecated:{type:cn.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(Pi)),resolve(e){if((0,ke.isObjectType)(e)||(0,ke.isInterfaceType)(e))return e.getInterfaces()}},possibleTypes:{type:new ke.GraphQLList(new ke.GraphQLNonNull(Pi)),resolve(e,t,n,{schema:r}){if((0,ke.isAbstractType)(e))return r.getPossibleTypes(e)}},enumValues:{type:new ke.GraphQLList(new ke.GraphQLNonNull(CI)),args:{includeDeprecated:{type:cn.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(Zd)),args:{includeDeprecated:{type:cn.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:Pi,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:cn.GraphQLBoolean,resolve:e=>{if((0,ke.isInputObjectType)(e))return e.isOneOf}}})});Zt.__Type=Pi;var LI=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(cn.GraphQLString),resolve:e=>e.name},description:{type:cn.GraphQLString,resolve:e=>e.description},args:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(Zd))),args:{includeDeprecated:{type:cn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new ke.GraphQLNonNull(Pi),resolve:e=>e.type},isDeprecated:{type:new ke.GraphQLNonNull(cn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:cn.GraphQLString,resolve:e=>e.deprecationReason}})});Zt.__Field=LI;var Zd=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(cn.GraphQLString),resolve:e=>e.name},description:{type:cn.GraphQLString,resolve:e=>e.description},type:{type:new ke.GraphQLNonNull(Pi),resolve:e=>e.type},defaultValue:{type:cn.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:n}=e,r=(0,a6.astFromValue)(n,t);return r?(0,i6.print)(r):null}},isDeprecated:{type:new ke.GraphQLNonNull(cn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:cn.GraphQLString,resolve:e=>e.deprecationReason}})});Zt.__InputValue=Zd;var CI=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(cn.GraphQLString),resolve:e=>e.name},description:{type:cn.GraphQLString,resolve:e=>e.description},isDeprecated:{type:new ke.GraphQLNonNull(cn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:cn.GraphQLString,resolve:e=>e.deprecationReason}})});Zt.__EnumValue=CI;var Zn;Zt.TypeKind=Zn;(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"})(Zn||(Zt.TypeKind=Zn={}));var BI=new ke.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:Zn.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:Zn.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:Zn.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:Zn.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:Zn.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:Zn.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:Zn.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:Zn.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});Zt.__TypeKind=BI;var s6={name:"__schema",type:new ke.GraphQLNonNull(PI),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};Zt.SchemaMetaFieldDef=s6;var o6={name:"__type",type:Pi,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new ke.GraphQLNonNull(cn.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};Zt.TypeMetaFieldDef=o6;var u6={name:"__typename",type:new ke.GraphQLNonNull(cn.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};Zt.TypeNameMetaFieldDef=u6;var _F=Object.freeze([PI,FI,wI,Pi,LI,Zd,CI,BI]);Zt.introspectionTypes=_F;function c6(e){return _F.some(({name:t})=>e.name===t)}});var Xu=w(ol=>{"use strict";m();T();N();Object.defineProperty(ol,"__esModule",{value:!0});ol.GraphQLSchema=void 0;ol.assertSchema=m6;ol.isSchema=SF;var Zm=Br(),kI=Xt(),l6=Bd(),d6=Da(),p6=Fm(),UI=ba(),ra=wt(),vF=Qr(),f6=Fi();function SF(e){return(0,l6.instanceOf)(e,eN)}function m6(e){if(!SF(e))throw new Error(`Expected ${(0,kI.inspect)(e)} to be a GraphQL schema.`);return e}var eN=class{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,(0,d6.isObjectLike)(t)||(0,Zm.devAssert)(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||(0,Zm.devAssert)(!1,`"types" must be Array if provided but got: ${(0,kI.inspect)(t.types)}.`),!t.directives||Array.isArray(t.directives)||(0,Zm.devAssert)(!1,`"directives" must be Array if provided but got: ${(0,kI.inspect)(t.directives)}.`),this.description=t.description,this.extensions=(0,p6.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:vF.specifiedDirectives;let i=new Set(t.types);if(t.types!=null)for(let a of t.types)i.delete(a),ia(a,i);this._queryType!=null&&ia(this._queryType,i),this._mutationType!=null&&ia(this._mutationType,i),this._subscriptionType!=null&&ia(this._subscriptionType,i);for(let a of this._directives)if((0,vF.isDirective)(a))for(let o of a.args)ia(o.type,i);ia(f6.__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,Zm.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,ra.isInterfaceType)(a)){for(let c of a.getInterfaces())if((0,ra.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,ra.isObjectType)(a)){for(let c of a.getInterfaces())if((0,ra.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 UI.OperationTypeNode.QUERY:return this.getQueryType();case UI.OperationTypeNode.MUTATION:return this.getMutationType();case UI.OperationTypeNode.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return(0,ra.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,ra.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}}};ol.GraphQLSchema=eN;function ia(e,t){let n=(0,ra.getNamedType)(e);if(!t.has(n)){if(t.add(n),(0,ra.isUnionType)(n))for(let r of n.getTypes())ia(r,t);else if((0,ra.isObjectType)(n)||(0,ra.isInterfaceType)(n)){for(let r of n.getInterfaces())ia(r,t);for(let r of Object.values(n.getFields())){ia(r.type,t);for(let i of r.args)ia(i.type,t)}}else if((0,ra.isInputObjectType)(n))for(let r of Object.values(n.getFields()))ia(r.type,t)}return t}});var tp=w(tN=>{"use strict";m();T();N();Object.defineProperty(tN,"__esModule",{value:!0});tN.assertValidSchema=h6;tN.validateSchema=PF;var _r=Xt(),N6=ze(),MI=ba(),OF=$d(),Pn=wt(),RF=Qr(),T6=Fi(),E6=Xu();function PF(e){if((0,E6.assertSchema)(e),e.__validationErrors)return e.__validationErrors;let t=new qI(e);y6(t),I6(t),g6(t);let n=t.getErrors();return e.__validationErrors=n,n}function h6(e){let t=PF(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` -`))}var DI=class{constructor(t){this._errors=[],this.schema=t}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new $3.GraphQLError(t,{nodes:r}))}getErrors(){return this._errors}};function H3(e){let t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!(0,Fn.isObjectType)(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${(0,_r.inspect)(n)}.`,(r=OI(t,SI.OperationTypeNode.QUERY))!==null&&r!==void 0?r:n.astNode)}let i=t.getMutationType();if(i&&!(0,Fn.isObjectType)(i)){var a;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${(0,_r.inspect)(i)}.`,(a=OI(t,SI.OperationTypeNode.MUTATION))!==null&&a!==void 0?a:i.astNode)}let o=t.getSubscriptionType();if(o&&!(0,Fn.isObjectType)(o)){var c;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${(0,_r.inspect)(o)}.`,(c=OI(t,SI.OperationTypeNode.SUBSCRIPTION))!==null&&c!==void 0?c:o.astNode)}}function OI(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 z3(e){for(let n of e.schema.getDirectives()){if(!(0,oP.isDirective)(n)){e.reportError(`Expected directive but got: ${(0,_r.inspect)(n)}.`,n==null?void 0:n.astNode);continue}Hu(e,n);for(let r of n.args)if(Hu(e,r),(0,Fn.isInputType)(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${(0,_r.inspect)(r.type)}.`,r.astNode),(0,Fn.isRequiredArgument)(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[bI(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function Hu(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function W3(e){let t=i6(e),n=e.schema.getTypeMap();for(let r of Object.values(n)){if(!(0,Fn.isNamedType)(r)){e.reportError(`Expected GraphQL named type but got: ${(0,_r.inspect)(r)}.`,r.astNode);continue}(0,Q3.isIntrospectionType)(r)||Hu(e,r),(0,Fn.isObjectType)(r)||(0,Fn.isInterfaceType)(r)?(iP(e,r),aP(e,r)):(0,Fn.isUnionType)(r)?e6(e,r):(0,Fn.isEnumType)(r)?t6(e,r):(0,Fn.isInputObjectType)(r)&&(n6(e,r),t(r))}}function iP(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(Hu(e,o),!(0,Fn.isOutputType)(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${(0,_r.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(Hu(e,c),!(0,Fn.isInputType)(c.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${l}:) must be Input Type but got: ${(0,_r.inspect)(c.type)}.`,(i=c.astNode)===null||i===void 0?void 0:i.type)}if((0,Fn.isRequiredArgument)(c)&&c.deprecationReason!=null){var a;e.reportError(`Required argument ${t.name}.${o.name}(${l}:) cannot be deprecated.`,[bI(c.astNode),(a=c.astNode)===null||a===void 0?void 0:a.type])}}}}function aP(e,t){let n=Object.create(null);for(let r of t.getInterfaces()){if(!(0,Fn.isInterfaceType)(r)){e.reportError(`Type ${(0,_r.inspect)(t)} must only implement Interface types, it cannot implement ${(0,_r.inspect)(r)}.`,zd(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,zd(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,zd(t,r));continue}n[r.name]=!0,Z3(e,t,r),X3(e,t,r)}}function X3(e,t,n){let r=t.getFields();for(let l of Object.values(n.getFields())){let d=l.name,f=r[d];if(!f){e.reportError(`Interface field ${n.name}.${d} expected but ${t.name} does not provide it.`,[l.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!(0,rP.isTypeSubTypeOf)(e.schema,f.type,l.type)){var i,a;e.reportError(`Interface field ${n.name}.${d} expects type ${(0,_r.inspect)(l.type)} but ${t.name}.${d} is type ${(0,_r.inspect)(f.type)}.`,[(i=l.astNode)===null||i===void 0?void 0:i.type,(a=f.astNode)===null||a===void 0?void 0:a.type])}for(let y of l.args){let I=y.name,v=f.args.find(P=>P.name===I);if(!v){e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expected but ${t.name}.${d} does not provide it.`,[y.astNode,f.astNode]);continue}if(!(0,rP.isEqualType)(y.type,v.type)){var o,c;e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expects type ${(0,_r.inspect)(y.type)} but ${t.name}.${d}(${I}:) is type ${(0,_r.inspect)(v.type)}.`,[(o=y.astNode)===null||o===void 0?void 0:o.type,(c=v.astNode)===null||c===void 0?void 0:c.type])}}for(let y of f.args){let I=y.name;!l.args.find(P=>P.name===I)&&(0,Fn.isRequiredArgument)(y)&&e.reportError(`Object field ${t.name}.${d} includes required argument ${I} that is missing from the Interface field ${n.name}.${d}.`,[y.astNode,l.astNode])}}}function Z3(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}.`,[...zd(n,i),...zd(t,n)])}function e6(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.`,sP(t,i.name));continue}r[i.name]=!0,(0,Fn.isObjectType)(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${(0,_r.inspect)(i)}.`,sP(t,String(i)))}}function t6(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)Hu(e,r)}function n6(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(Hu(e,a),!(0,Fn.isInputType)(a.type)){var r;e.reportError(`The type of ${t.name}.${a.name} must be Input Type but got: ${(0,_r.inspect)(a.type)}.`,(r=a.astNode)===null||r===void 0?void 0:r.type)}if((0,Fn.isRequiredInputField)(a)&&a.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${a.name} cannot be deprecated.`,[bI(a.astNode),(i=a.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&r6(t,a,e)}}function r6(e,t,n){if((0,Fn.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 i6(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,Fn.isNonNullType)(c.type)&&(0,Fn.isInputObjectType)(c.type.ofType)){let l=c.type.ofType,d=r[l.name];if(n.push(c),d===void 0)i(l);else{let f=n.slice(d),y=f.map(I=>I.name).join(".");e.reportError(`Cannot reference Input Object "${l.name}" within itself through a series of non-null fields: "${y}".`,f.map(I=>I.astNode))}n.pop()}r[a.name]=void 0}}function zd(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 sP(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 bI(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===oP.GraphQLDeprecatedDirective.name)}});var Ra=w(FI=>{"use strict";m();T();N();Object.defineProperty(FI,"__esModule",{value:!0});FI.typeFromAST=RI;var AI=Pt(),cP=wt();function RI(e,t){switch(t.kind){case AI.Kind.LIST_TYPE:{let n=RI(e,t.type);return n&&new cP.GraphQLList(n)}case AI.Kind.NON_NULL_TYPE:{let n=RI(e,t.type);return n&&new cP.GraphQLNonNull(n)}case AI.Kind.NAMED_TYPE:return e.getType(t.name.value)}}});var Xm=w(Xd=>{"use strict";m();T();N();Object.defineProperty(Xd,"__esModule",{value:!0});Xd.TypeInfo=void 0;Xd.visitWithTypeInfo=o6;var a6=Oa(),Pn=Pt(),lP=ju(),wn=wt(),il=Fi(),dP=Ra(),PI=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:s6,n&&((0,wn.isInputType)(n)&&this._inputTypeStack.push(n),(0,wn.isCompositeType)(n)&&this._parentTypeStack.push(n),(0,wn.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 Pn.Kind.SELECTION_SET:{let i=(0,wn.getNamedType)(this.getType());this._parentTypeStack.push((0,wn.isCompositeType)(i)?i:void 0);break}case Pn.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,wn.isOutputType)(o)?o:void 0);break}case Pn.Kind.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case Pn.Kind.OPERATION_DEFINITION:{let i=n.getRootType(t.operation);this._typeStack.push((0,wn.isObjectType)(i)?i:void 0);break}case Pn.Kind.INLINE_FRAGMENT:case Pn.Kind.FRAGMENT_DEFINITION:{let i=t.typeCondition,a=i?(0,dP.typeFromAST)(n,i):(0,wn.getNamedType)(this.getType());this._typeStack.push((0,wn.isOutputType)(a)?a:void 0);break}case Pn.Kind.VARIABLE_DEFINITION:{let i=(0,dP.typeFromAST)(n,t.type);this._inputTypeStack.push((0,wn.isInputType)(i)?i:void 0);break}case Pn.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,wn.isInputType)(a)?a:void 0);break}case Pn.Kind.LIST:{let i=(0,wn.getNullableType)(this.getInputType()),a=(0,wn.isListType)(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push((0,wn.isInputType)(a)?a:void 0);break}case Pn.Kind.OBJECT_FIELD:{let i=(0,wn.getNamedType)(this.getInputType()),a,o;(0,wn.isInputObjectType)(i)&&(o=i.getFields()[t.name.value],o&&(a=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push((0,wn.isInputType)(a)?a:void 0);break}case Pn.Kind.ENUM:{let i=(0,wn.getNamedType)(this.getInputType()),a;(0,wn.isEnumType)(i)&&(a=i.getValue(t.value)),this._enumValue=a;break}default:}}leave(t){switch(t.kind){case Pn.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Pn.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Pn.Kind.DIRECTIVE:this._directive=null;break;case Pn.Kind.OPERATION_DEFINITION:case Pn.Kind.INLINE_FRAGMENT:case Pn.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Pn.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Pn.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Pn.Kind.LIST:case Pn.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Pn.Kind.ENUM:this._enumValue=null;break;default:}}};Xd.TypeInfo=PI;function s6(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,wn.isCompositeType)(t))return il.TypeNameMetaFieldDef;if((0,wn.isObjectType)(t)||(0,wn.isInterfaceType)(t))return t.getFields()[r]}function o6(e,t){return{enter(...n){let r=n[0];e.enter(r);let i=(0,lP.getEnterLeaveForKind)(t,r.kind).enter;if(i){let a=i.apply(t,n);return a!==void 0&&(e.leave(r),(0,a6.isNode)(a)&&e.enter(a)),a}},leave(...n){let r=n[0],i=(0,lP.getEnterLeaveForKind)(t,r.kind).leave,a;return i&&(a=i.apply(t,n)),e.leave(r),a}}}});var zu=w(Pi=>{"use strict";m();T();N();Object.defineProperty(Pi,"__esModule",{value:!0});Pi.isConstValueNode=wI;Pi.isDefinitionNode=u6;Pi.isExecutableDefinitionNode=pP;Pi.isSelectionNode=c6;Pi.isTypeDefinitionNode=NP;Pi.isTypeExtensionNode=EP;Pi.isTypeNode=l6;Pi.isTypeSystemDefinitionNode=mP;Pi.isTypeSystemExtensionNode=TP;Pi.isValueNode=fP;var Lt=Pt();function u6(e){return pP(e)||mP(e)||TP(e)}function pP(e){return e.kind===Lt.Kind.OPERATION_DEFINITION||e.kind===Lt.Kind.FRAGMENT_DEFINITION}function c6(e){return e.kind===Lt.Kind.FIELD||e.kind===Lt.Kind.FRAGMENT_SPREAD||e.kind===Lt.Kind.INLINE_FRAGMENT}function fP(e){return e.kind===Lt.Kind.VARIABLE||e.kind===Lt.Kind.INT||e.kind===Lt.Kind.FLOAT||e.kind===Lt.Kind.STRING||e.kind===Lt.Kind.BOOLEAN||e.kind===Lt.Kind.NULL||e.kind===Lt.Kind.ENUM||e.kind===Lt.Kind.LIST||e.kind===Lt.Kind.OBJECT}function wI(e){return fP(e)&&(e.kind===Lt.Kind.LIST?e.values.some(wI):e.kind===Lt.Kind.OBJECT?e.fields.some(t=>wI(t.value)):e.kind!==Lt.Kind.VARIABLE)}function l6(e){return e.kind===Lt.Kind.NAMED_TYPE||e.kind===Lt.Kind.LIST_TYPE||e.kind===Lt.Kind.NON_NULL_TYPE}function mP(e){return e.kind===Lt.Kind.SCHEMA_DEFINITION||NP(e)||e.kind===Lt.Kind.DIRECTIVE_DEFINITION}function NP(e){return e.kind===Lt.Kind.SCALAR_TYPE_DEFINITION||e.kind===Lt.Kind.OBJECT_TYPE_DEFINITION||e.kind===Lt.Kind.INTERFACE_TYPE_DEFINITION||e.kind===Lt.Kind.UNION_TYPE_DEFINITION||e.kind===Lt.Kind.ENUM_TYPE_DEFINITION||e.kind===Lt.Kind.INPUT_OBJECT_TYPE_DEFINITION}function TP(e){return e.kind===Lt.Kind.SCHEMA_EXTENSION||EP(e)}function EP(e){return e.kind===Lt.Kind.SCALAR_TYPE_EXTENSION||e.kind===Lt.Kind.OBJECT_TYPE_EXTENSION||e.kind===Lt.Kind.INTERFACE_TYPE_EXTENSION||e.kind===Lt.Kind.UNION_TYPE_EXTENSION||e.kind===Lt.Kind.ENUM_TYPE_EXTENSION||e.kind===Lt.Kind.INPUT_OBJECT_TYPE_EXTENSION}});var CI=w(LI=>{"use strict";m();T();N();Object.defineProperty(LI,"__esModule",{value:!0});LI.ExecutableDefinitionsRule=f6;var d6=ze(),hP=Pt(),p6=zu();function f6(e){return{Document(t){for(let n of t.definitions)if(!(0,p6.isExecutableDefinitionNode)(n)){let r=n.kind===hP.Kind.SCHEMA_DEFINITION||n.kind===hP.Kind.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new d6.GraphQLError(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}});var UI=w(BI=>{"use strict";m();T();N();Object.defineProperty(BI,"__esModule",{value:!0});BI.FieldsOnCorrectTypeRule=E6;var yP=zo(),m6=Bd(),N6=Xo(),T6=ze(),Zd=wt();function E6(e){return{Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),a=t.name.value,o=(0,yP.didYouMean)("to use an inline fragment on",h6(i,n,a));o===""&&(o=(0,yP.didYouMean)(y6(n,a))),e.reportError(new T6.GraphQLError(`Cannot query field "${a}" on type "${n.name}".`+o,{nodes:t}))}}}}function h6(e,t,n){if(!(0,Zd.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,Zd.isInterfaceType)(o)&&e.isSubType(o,c)?-1:(0,Zd.isInterfaceType)(c)&&e.isSubType(c,o)?1:(0,m6.naturalCompare)(o.name,c.name)}).map(o=>o.name)}function y6(e,t){if((0,Zd.isObjectType)(e)||(0,Zd.isInterfaceType)(e)){let n=Object.keys(e.getFields());return(0,N6.suggestionList)(t,n)}return[]}});var MI=w(kI=>{"use strict";m();T();N();Object.defineProperty(kI,"__esModule",{value:!0});kI.FragmentsOnCompositeTypesRule=I6;var IP=ze(),gP=ci(),_P=wt(),vP=Ra();function I6(e){return{InlineFragment(t){let n=t.typeCondition;if(n){let r=(0,vP.typeFromAST)(e.getSchema(),n);if(r&&!(0,_P.isCompositeType)(r)){let i=(0,gP.print)(n);e.reportError(new IP.GraphQLError(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){let n=(0,vP.typeFromAST)(e.getSchema(),t.typeCondition);if(n&&!(0,_P.isCompositeType)(n)){let r=(0,gP.print)(t.typeCondition);e.reportError(new IP.GraphQLError(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}});var xI=w(Zm=>{"use strict";m();T();N();Object.defineProperty(Zm,"__esModule",{value:!0});Zm.KnownArgumentNamesOnDirectivesRule=bP;Zm.KnownArgumentNamesRule=v6;var SP=zo(),OP=Xo(),DP=ze(),g6=Pt(),_6=$r();function v6(e){return Y(x({},bP(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,OP.suggestionList)(a,o);e.reportError(new DP.GraphQLError(`Unknown argument "${a}" on field "${i.name}.${r.name}".`+(0,SP.didYouMean)(c),{nodes:t}))}}})}function bP(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():_6.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===g6.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 f=d.name.value;if(!l.includes(f)){let y=(0,OP.suggestionList)(f,l);e.reportError(new DP.GraphQLError(`Unknown argument "${f}" on directive "@${c}".`+(0,SP.didYouMean)(y),{nodes:d}))}}return!1}}}});var KI=w(jI=>{"use strict";m();T();N();Object.defineProperty(jI,"__esModule",{value:!0});jI.KnownDirectivesRule=D6;var S6=Xt(),qI=Ir(),AP=ze(),VI=Oa(),Zn=Wc(),hn=Pt(),O6=$r();function D6(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():O6.specifiedDirectives;for(let a of r)t[a.name]=a.locations;let i=e.getDocument().definitions;for(let a of i)a.kind===hn.Kind.DIRECTIVE_DEFINITION&&(t[a.name.value]=a.locations.map(o=>o.value));return{Directive(a,o,c,l,d){let f=a.name.value,y=t[f];if(!y){e.reportError(new AP.GraphQLError(`Unknown directive "@${f}".`,{nodes:a}));return}let I=b6(d);I&&!y.includes(I)&&e.reportError(new AP.GraphQLError(`Directive "@${f}" may not be used on ${I}.`,{nodes:a}))}}}function b6(e){let t=e[e.length-1];switch("kind"in t||(0,qI.invariant)(!1),t.kind){case hn.Kind.OPERATION_DEFINITION:return A6(t.operation);case hn.Kind.FIELD:return Zn.DirectiveLocation.FIELD;case hn.Kind.FRAGMENT_SPREAD:return Zn.DirectiveLocation.FRAGMENT_SPREAD;case hn.Kind.INLINE_FRAGMENT:return Zn.DirectiveLocation.INLINE_FRAGMENT;case hn.Kind.FRAGMENT_DEFINITION:return Zn.DirectiveLocation.FRAGMENT_DEFINITION;case hn.Kind.VARIABLE_DEFINITION:return Zn.DirectiveLocation.VARIABLE_DEFINITION;case hn.Kind.SCHEMA_DEFINITION:case hn.Kind.SCHEMA_EXTENSION:return Zn.DirectiveLocation.SCHEMA;case hn.Kind.SCALAR_TYPE_DEFINITION:case hn.Kind.SCALAR_TYPE_EXTENSION:return Zn.DirectiveLocation.SCALAR;case hn.Kind.OBJECT_TYPE_DEFINITION:case hn.Kind.OBJECT_TYPE_EXTENSION:return Zn.DirectiveLocation.OBJECT;case hn.Kind.FIELD_DEFINITION:return Zn.DirectiveLocation.FIELD_DEFINITION;case hn.Kind.INTERFACE_TYPE_DEFINITION:case hn.Kind.INTERFACE_TYPE_EXTENSION:return Zn.DirectiveLocation.INTERFACE;case hn.Kind.UNION_TYPE_DEFINITION:case hn.Kind.UNION_TYPE_EXTENSION:return Zn.DirectiveLocation.UNION;case hn.Kind.ENUM_TYPE_DEFINITION:case hn.Kind.ENUM_TYPE_EXTENSION:return Zn.DirectiveLocation.ENUM;case hn.Kind.ENUM_VALUE_DEFINITION:return Zn.DirectiveLocation.ENUM_VALUE;case hn.Kind.INPUT_OBJECT_TYPE_DEFINITION:case hn.Kind.INPUT_OBJECT_TYPE_EXTENSION:return Zn.DirectiveLocation.INPUT_OBJECT;case hn.Kind.INPUT_VALUE_DEFINITION:{let n=e[e.length-3];return"kind"in n||(0,qI.invariant)(!1),n.kind===hn.Kind.INPUT_OBJECT_TYPE_DEFINITION?Zn.DirectiveLocation.INPUT_FIELD_DEFINITION:Zn.DirectiveLocation.ARGUMENT_DEFINITION}default:(0,qI.invariant)(!1,"Unexpected kind: "+(0,S6.inspect)(t.kind))}}function A6(e){switch(e){case VI.OperationTypeNode.QUERY:return Zn.DirectiveLocation.QUERY;case VI.OperationTypeNode.MUTATION:return Zn.DirectiveLocation.MUTATION;case VI.OperationTypeNode.SUBSCRIPTION:return Zn.DirectiveLocation.SUBSCRIPTION}}});var $I=w(GI=>{"use strict";m();T();N();Object.defineProperty(GI,"__esModule",{value:!0});GI.KnownFragmentNamesRule=F6;var R6=ze();function F6(e){return{FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new R6.GraphQLError(`Unknown fragment "${n}".`,{nodes:t.name}))}}}});var JI=w(YI=>{"use strict";m();T();N();Object.defineProperty(YI,"__esModule",{value:!0});YI.KnownTypeNamesRule=U6;var P6=zo(),w6=Xo(),L6=ze(),QI=zu(),C6=Fi(),B6=Aa();function U6(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let a of e.getDocument().definitions)(0,QI.isTypeDefinitionNode)(a)&&(r[a.name.value]=!0);let i=[...Object.keys(n),...Object.keys(r)];return{NamedType(a,o,c,l,d){let f=a.name.value;if(!n[f]&&!r[f]){var y;let I=(y=d[2])!==null&&y!==void 0?y:c,v=I!=null&&k6(I);if(v&&RP.includes(f))return;let P=(0,w6.suggestionList)(f,v?RP.concat(i):i);e.reportError(new L6.GraphQLError(`Unknown type "${f}".`+(0,P6.didYouMean)(P),{nodes:a}))}}}}var RP=[...B6.specifiedScalarTypes,...C6.introspectionTypes].map(e=>e.name);function k6(e){return"kind"in e&&((0,QI.isTypeSystemDefinitionNode)(e)||(0,QI.isTypeSystemExtensionNode)(e))}});var zI=w(HI=>{"use strict";m();T();N();Object.defineProperty(HI,"__esModule",{value:!0});HI.LoneAnonymousOperationRule=q6;var M6=ze(),x6=Pt();function q6(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===x6.Kind.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new M6.GraphQLError("This anonymous operation must be the only defined operation.",{nodes:n}))}}}});var XI=w(WI=>{"use strict";m();T();N();Object.defineProperty(WI,"__esModule",{value:!0});WI.LoneSchemaDefinitionRule=V6;var FP=ze();function V6(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 FP.GraphQLError("Cannot define a new schema within a schema extension.",{nodes:c}));return}o>0&&e.reportError(new FP.GraphQLError("Must provide only one schema definition.",{nodes:c})),++o}}}});var eg=w(ZI=>{"use strict";m();T();N();Object.defineProperty(ZI,"__esModule",{value:!0});ZI.MaxIntrospectionDepthRule=G6;var j6=ze(),PP=Pt(),K6=3;function G6(e){function t(n,r=Object.create(null),i=0){if(n.kind===PP.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===PP.Kind.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=K6))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 j6.GraphQLError("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}});var ng=w(tg=>{"use strict";m();T();N();Object.defineProperty(tg,"__esModule",{value:!0});tg.NoFragmentCyclesRule=Q6;var $6=ze();function Q6(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,f=r[d];if(n.push(l),f===void 0){let y=e.getFragment(d);y&&i(y)}else{let y=n.slice(f),I=y.slice(0,-1).map(v=>'"'+v.name.value+'"').join(", ");e.reportError(new $6.GraphQLError(`Cannot spread fragment "${d}" within itself`+(I!==""?` via ${I}.`:"."),{nodes:y}))}n.pop()}r[o]=void 0}}}});var ig=w(rg=>{"use strict";m();T();N();Object.defineProperty(rg,"__esModule",{value:!0});rg.NoUndefinedVariablesRule=J6;var Y6=ze();function J6(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 Y6.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 sg=w(ag=>{"use strict";m();T();N();Object.defineProperty(ag,"__esModule",{value:!0});ag.NoUnusedFragmentsRule=z6;var H6=ze();function z6(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 H6.GraphQLError(`Fragment "${a}" is never used.`,{nodes:i}))}}}}}});var ug=w(og=>{"use strict";m();T();N();Object.defineProperty(og,"__esModule",{value:!0});og.NoUnusedVariablesRule=X6;var W6=ze();function X6(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 W6.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 dg=w(lg=>{"use strict";m();T();N();Object.defineProperty(lg,"__esModule",{value:!0});lg.sortValueNode=cg;var Z6=Bd(),fs=Pt();function cg(e){switch(e.kind){case fs.Kind.OBJECT:return Y(x({},e),{fields:ez(e.fields)});case fs.Kind.LIST:return Y(x({},e),{values:e.values.map(cg)});case fs.Kind.INT:case fs.Kind.FLOAT:case fs.Kind.STRING:case fs.Kind.BOOLEAN:case fs.Kind.NULL:case fs.Kind.ENUM:case fs.Kind.VARIABLE:return e}}function ez(e){return e.map(t=>Y(x({},t),{value:cg(t.value)})).sort((t,n)=>(0,Z6.naturalCompare)(t.name.value,n.name.value))}});var hg=w(Eg=>{"use strict";m();T();N();Object.defineProperty(Eg,"__esModule",{value:!0});Eg.OverlappingFieldsCanBeMergedRule=iz;var wP=Xt(),tz=ze(),pg=Pt(),nz=ci(),Qr=wt(),rz=dg(),CP=Ra();function BP(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+BP(n)).join(" and "):e}function iz(e){let t=new Ng,n=new Map;return{SelectionSet(r){let i=az(e,n,t,e.getParentType(),r);for(let[[a,o],c,l]of i){let d=BP(o);e.reportError(new tz.GraphQLError(`Fields "${a}" conflict because ${d}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:c.concat(l)}))}}}}function az(e,t,n,r,i){let a=[],[o,c]=nN(e,t,r,i);if(oz(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:LP(o)===LP(c)})}function LP(e){return(0,nz.print)((0,rz.sortValueNode)(e))}function fg(e,t){return(0,Qr.isListType)(e)?(0,Qr.isListType)(t)?fg(e.ofType,t.ofType):!0:(0,Qr.isListType)(t)?!0:(0,Qr.isNonNullType)(e)?(0,Qr.isNonNullType)(t)?fg(e.ofType,t.ofType):!0:(0,Qr.isNonNullType)(t)?!0:(0,Qr.isLeafType)(e)||(0,Qr.isLeafType)(t)?e!==t:!1}function nN(e,t,n,r){let i=t.get(r);if(i)return i;let a=Object.create(null),o=Object.create(null);kP(e,n,r,a,o);let c=[a,Object.keys(o)];return t.set(r,c),c}function mg(e,t,n){let r=t.get(n.selectionSet);if(r)return r;let i=(0,CP.typeFromAST)(e.getSchema(),n.typeCondition);return nN(e,t,i,n.selectionSet)}function kP(e,t,n,r,i){for(let a of n.selections)switch(a.kind){case pg.Kind.FIELD:{let o=a.name.value,c;((0,Qr.isObjectType)(t)||(0,Qr.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 pg.Kind.FRAGMENT_SPREAD:i[a.name.value]=!0;break;case pg.Kind.INLINE_FRAGMENT:{let o=a.typeCondition,c=o?(0,CP.typeFromAST)(e.getSchema(),o):t;kP(e,c,a.selectionSet,r,i);break}}}function cz(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 Ng=class{constructor(){this._data=new Map}has(t,n,r){var i;let[a,o]=t{"use strict";m();T();N();Object.defineProperty(Ig,"__esModule",{value:!0});Ig.PossibleFragmentSpreadsRule=dz;var rN=Xt(),MP=ze(),yg=wt(),xP=Vd(),lz=Ra();function dz(e){return{InlineFragment(t){let n=e.getType(),r=e.getParentType();if((0,yg.isCompositeType)(n)&&(0,yg.isCompositeType)(r)&&!(0,xP.doTypesOverlap)(e.getSchema(),n,r)){let i=(0,rN.inspect)(r),a=(0,rN.inspect)(n);e.reportError(new MP.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=pz(e,n),i=e.getParentType();if(r&&i&&!(0,xP.doTypesOverlap)(e.getSchema(),r,i)){let a=(0,rN.inspect)(i),o=(0,rN.inspect)(r);e.reportError(new MP.GraphQLError(`Fragment "${n}" cannot be spread here as objects of type "${a}" can never be of type "${o}".`,{nodes:t}))}}}}function pz(e,t){let n=e.getFragment(t);if(n){let r=(0,lz.typeFromAST)(e.getSchema(),n.typeCondition);if((0,yg.isCompositeType)(r))return r}}});var vg=w(_g=>{"use strict";m();T();N();Object.defineProperty(_g,"__esModule",{value:!0});_g.PossibleTypeExtensionsRule=Tz;var fz=zo(),VP=Xt(),jP=Ir(),mz=Xo(),qP=ze(),gn=Pt(),Nz=zu(),al=wt();function Tz(e){let t=e.getSchema(),n=Object.create(null);for(let i of e.getDocument().definitions)(0,Nz.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=Ez[o.kind]:c&&(l=hz(c)),l){if(l!==i.kind){let d=yz(i.kind);e.reportError(new qP.GraphQLError(`Cannot extend non-${d} type "${a}".`,{nodes:o?[o,i]:i}))}}else{let d=Object.keys(x(x({},n),t==null?void 0:t.getTypeMap())),f=(0,mz.suggestionList)(a,d);e.reportError(new qP.GraphQLError(`Cannot extend type "${a}" because it is not defined.`+(0,fz.didYouMean)(f),{nodes:i.name}))}}}var Ez={[gn.Kind.SCALAR_TYPE_DEFINITION]:gn.Kind.SCALAR_TYPE_EXTENSION,[gn.Kind.OBJECT_TYPE_DEFINITION]:gn.Kind.OBJECT_TYPE_EXTENSION,[gn.Kind.INTERFACE_TYPE_DEFINITION]:gn.Kind.INTERFACE_TYPE_EXTENSION,[gn.Kind.UNION_TYPE_DEFINITION]:gn.Kind.UNION_TYPE_EXTENSION,[gn.Kind.ENUM_TYPE_DEFINITION]:gn.Kind.ENUM_TYPE_EXTENSION,[gn.Kind.INPUT_OBJECT_TYPE_DEFINITION]:gn.Kind.INPUT_OBJECT_TYPE_EXTENSION};function hz(e){if((0,al.isScalarType)(e))return gn.Kind.SCALAR_TYPE_EXTENSION;if((0,al.isObjectType)(e))return gn.Kind.OBJECT_TYPE_EXTENSION;if((0,al.isInterfaceType)(e))return gn.Kind.INTERFACE_TYPE_EXTENSION;if((0,al.isUnionType)(e))return gn.Kind.UNION_TYPE_EXTENSION;if((0,al.isEnumType)(e))return gn.Kind.ENUM_TYPE_EXTENSION;if((0,al.isInputObjectType)(e))return gn.Kind.INPUT_OBJECT_TYPE_EXTENSION;(0,jP.invariant)(!1,"Unexpected type: "+(0,VP.inspect)(e))}function yz(e){switch(e){case gn.Kind.SCALAR_TYPE_EXTENSION:return"scalar";case gn.Kind.OBJECT_TYPE_EXTENSION:return"object";case gn.Kind.INTERFACE_TYPE_EXTENSION:return"interface";case gn.Kind.UNION_TYPE_EXTENSION:return"union";case gn.Kind.ENUM_TYPE_EXTENSION:return"enum";case gn.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,jP.invariant)(!1,"Unexpected kind: "+(0,VP.inspect)(e))}}});var Og=w(iN=>{"use strict";m();T();N();Object.defineProperty(iN,"__esModule",{value:!0});iN.ProvidedRequiredArgumentsOnDirectivesRule=YP;iN.ProvidedRequiredArgumentsRule=_z;var GP=Xt(),KP=Wo(),$P=ze(),QP=Pt(),Iz=ci(),Sg=wt(),gz=$r();function _z(e){return Y(x({},YP(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,Sg.isRequiredArgument)(a)){let o=(0,GP.inspect)(a.type);e.reportError(new $P.GraphQLError(`Field "${r.name}" argument "${a.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}})}function YP(e){var t;let n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:gz.specifiedDirectives;for(let c of i)n[c.name]=(0,KP.keyMap)(c.args.filter(Sg.isRequiredArgument),l=>l.name);let a=e.getDocument().definitions;for(let c of a)if(c.kind===QP.Kind.DIRECTIVE_DEFINITION){var o;let l=(o=c.arguments)!==null&&o!==void 0?o:[];n[c.name.value]=(0,KP.keyMap)(l.filter(vz),d=>d.name.value)}return{Directive:{leave(c){let l=c.name.value,d=n[l];if(d){var f;let y=(f=c.arguments)!==null&&f!==void 0?f:[],I=new Set(y.map(v=>v.name.value));for(let[v,P]of Object.entries(d))if(!I.has(v)){let k=(0,Sg.isType)(P.type)?(0,GP.inspect)(P.type):(0,Iz.print)(P.type);e.reportError(new $P.GraphQLError(`Directive "@${l}" argument "${v}" of type "${k}" is required, but it was not provided.`,{nodes:c}))}}}}}}function vz(e){return e.type.kind===QP.Kind.NON_NULL_TYPE&&e.defaultValue==null}});var bg=w(Dg=>{"use strict";m();T();N();Object.defineProperty(Dg,"__esModule",{value:!0});Dg.ScalarLeafsRule=Sz;var JP=Xt(),HP=ze(),zP=wt();function Sz(e){return{Field(t){let n=e.getType(),r=t.selectionSet;if(n){if((0,zP.isLeafType)((0,zP.getNamedType)(n))){if(r){let i=t.name.value,a=(0,JP.inspect)(n);e.reportError(new HP.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,JP.inspect)(n);e.reportError(new HP.GraphQLError(`Field "${i}" of type "${a}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}});var Rg=w(Ag=>{"use strict";m();T();N();Object.defineProperty(Ag,"__esModule",{value:!0});Ag.printPathArray=Oz;function Oz(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var ep=w(aN=>{"use strict";m();T();N();Object.defineProperty(aN,"__esModule",{value:!0});aN.addPath=Dz;aN.pathToArray=bz;function Dz(e,t,n){return{prev:e,key:t,typename:n}}function bz(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}});var Pg=w(Fg=>{"use strict";m();T();N();Object.defineProperty(Fg,"__esModule",{value:!0});Fg.coerceInputValue=Cz;var Az=zo(),sN=Xt(),Rz=Ir(),Fz=Jm(),Pz=Sa(),ra=ep(),wz=Rg(),Lz=Xo(),ms=ze(),tp=wt();function Cz(e,t,n=Bz){return np(e,t,n,void 0)}function Bz(e,t,n){let r="Invalid value "+(0,sN.inspect)(t);throw e.length>0&&(r+=` at "value${(0,wz.printPathArray)(e)}"`),n.message=r+": "+n.message,n}function np(e,t,n,r){if((0,tp.isNonNullType)(t)){if(e!=null)return np(e,t.ofType,n,r);n((0,ra.pathToArray)(r),e,new ms.GraphQLError(`Expected non-nullable type "${(0,sN.inspect)(t)}" not to be null.`));return}if(e==null)return null;if((0,tp.isListType)(t)){let i=t.ofType;return(0,Fz.isIterableObject)(e)?Array.from(e,(a,o)=>{let c=(0,ra.addPath)(r,o,void 0);return np(a,i,n,c)}):[np(e,i,n,r)]}if((0,tp.isInputObjectType)(t)){if(!(0,Pz.isObjectLike)(e)){n((0,ra.pathToArray)(r),e,new ms.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,tp.isNonNullType)(o.type)){let l=(0,sN.inspect)(o.type);n((0,ra.pathToArray)(r),e,new ms.GraphQLError(`Field "${o.name}" of required type "${l}" was not provided.`))}continue}i[o.name]=np(c,o.type,n,(0,ra.addPath)(r,o.name,t.name))}for(let o of Object.keys(e))if(!a[o]){let c=(0,Lz.suggestionList)(o,Object.keys(t.getFields()));n((0,ra.pathToArray)(r),e,new ms.GraphQLError(`Field "${o}" is not defined by type "${t.name}".`+(0,Az.didYouMean)(c)))}if(t.isOneOf){let o=Object.keys(i);o.length!==1&&n((0,ra.pathToArray)(r),e,new ms.GraphQLError(`Exactly one key must be specified for OneOf type "${t.name}".`));let c=o[0],l=i[c];l===null&&n((0,ra.pathToArray)(r).concat(c),l,new ms.GraphQLError(`Field "${c}" must be non-null.`))}return i}if((0,tp.isLeafType)(t)){let i;try{i=t.parseValue(e)}catch(a){a instanceof ms.GraphQLError?n((0,ra.pathToArray)(r),e,a):n((0,ra.pathToArray)(r),e,new ms.GraphQLError(`Expected type "${t.name}". `+a.message,{originalError:a}));return}return i===void 0&&n((0,ra.pathToArray)(r),e,new ms.GraphQLError(`Expected type "${t.name}".`)),i}(0,Rz.invariant)(!1,"Unexpected input type: "+(0,sN.inspect)(t))}});var ip=w(wg=>{"use strict";m();T();N();Object.defineProperty(wg,"__esModule",{value:!0});wg.valueFromAST=rp;var Uz=Xt(),kz=Ir(),Mz=Wo(),sl=Pt(),Wu=wt();function rp(e,t,n){if(e){if(e.kind===sl.Kind.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0)return;let i=n[r];return i===null&&(0,Wu.isNonNullType)(t)?void 0:i}if((0,Wu.isNonNullType)(t))return e.kind===sl.Kind.NULL?void 0:rp(e,t.ofType,n);if(e.kind===sl.Kind.NULL)return null;if((0,Wu.isListType)(t)){let r=t.ofType;if(e.kind===sl.Kind.LIST){let a=[];for(let o of e.values)if(WP(o,n)){if((0,Wu.isNonNullType)(r))return;a.push(null)}else{let c=rp(o,r,n);if(c===void 0)return;a.push(c)}return a}let i=rp(e,r,n);return i===void 0?void 0:[i]}if((0,Wu.isInputObjectType)(t)){if(e.kind!==sl.Kind.OBJECT)return;let r=Object.create(null),i=(0,Mz.keyMap)(e.fields,a=>a.name.value);for(let a of Object.values(t.getFields())){let o=i[a.name];if(!o||WP(o.value,n)){if(a.defaultValue!==void 0)r[a.name]=a.defaultValue;else if((0,Wu.isNonNullType)(a.type))return;continue}let c=rp(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,Wu.isLeafType)(t)){let r;try{r=t.parseLiteral(e,n)}catch(i){return}return r===void 0?void 0:r}(0,kz.invariant)(!1,"Unexpected input type: "+(0,Uz.inspect)(t))}}function WP(e,t){return e.kind===sl.Kind.VARIABLE&&(t==null||t[e.name.value]===void 0)}});var cl=w(ap=>{"use strict";m();T();N();Object.defineProperty(ap,"__esModule",{value:!0});ap.getArgumentValues=tw;ap.getDirectiveValues=$z;ap.getVariableValues=Kz;var ol=Xt(),xz=Wo(),qz=Rg(),Ns=ze(),XP=Pt(),ZP=ci(),ul=wt(),Vz=Pg(),jz=Ra(),ew=ip();function Kz(e,t,n,r){let i=[],a=r==null?void 0:r.maxErrors;try{let o=Gz(e,t,n,c=>{if(a!=null&&i.length>=a)throw new Ns.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 Gz(e,t,n,r){let i={};for(let a of t){let o=a.variable.name.value,c=(0,jz.typeFromAST)(e,a.type);if(!(0,ul.isInputType)(c)){let d=(0,ZP.print)(a.type);r(new Ns.GraphQLError(`Variable "$${o}" expected value of type "${d}" which cannot be used as an input type.`,{nodes:a.type}));continue}if(!nw(n,o)){if(a.defaultValue)i[o]=(0,ew.valueFromAST)(a.defaultValue,c);else if((0,ul.isNonNullType)(c)){let d=(0,ol.inspect)(c);r(new Ns.GraphQLError(`Variable "$${o}" of required type "${d}" was not provided.`,{nodes:a}))}continue}let l=n[o];if(l===null&&(0,ul.isNonNullType)(c)){let d=(0,ol.inspect)(c);r(new Ns.GraphQLError(`Variable "$${o}" of non-null type "${d}" must not be null.`,{nodes:a}));continue}i[o]=(0,Vz.coerceInputValue)(l,c,(d,f,y)=>{let I=`Variable "$${o}" got invalid value `+(0,ol.inspect)(f);d.length>0&&(I+=` at "${o}${(0,qz.printPathArray)(d)}"`),r(new Ns.GraphQLError(I+"; "+y.message,{nodes:a,originalError:y}))})}return i}function tw(e,t,n){var r;let i={},a=(r=t.arguments)!==null&&r!==void 0?r:[],o=(0,xz.keyMap)(a,c=>c.name.value);for(let c of e.args){let l=c.name,d=c.type,f=o[l];if(!f){if(c.defaultValue!==void 0)i[l]=c.defaultValue;else if((0,ul.isNonNullType)(d))throw new Ns.GraphQLError(`Argument "${l}" of required type "${(0,ol.inspect)(d)}" was not provided.`,{nodes:t});continue}let y=f.value,I=y.kind===XP.Kind.NULL;if(y.kind===XP.Kind.VARIABLE){let P=y.name.value;if(n==null||!nw(n,P)){if(c.defaultValue!==void 0)i[l]=c.defaultValue;else if((0,ul.isNonNullType)(d))throw new Ns.GraphQLError(`Argument "${l}" of required type "${(0,ol.inspect)(d)}" was provided the variable "$${P}" which was not provided a runtime value.`,{nodes:y});continue}I=n[P]==null}if(I&&(0,ul.isNonNullType)(d))throw new Ns.GraphQLError(`Argument "${l}" of non-null type "${(0,ol.inspect)(d)}" must not be null.`,{nodes:y});let v=(0,ew.valueFromAST)(y,d,n);if(v===void 0)throw new Ns.GraphQLError(`Argument "${l}" has invalid value ${(0,ZP.print)(y)}.`,{nodes:y});i[l]=v}return i}function $z(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 tw(e,i,n)}function nw(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var cN=w(uN=>{"use strict";m();T();N();Object.defineProperty(uN,"__esModule",{value:!0});uN.collectFields=Jz;uN.collectSubfields=Hz;var Lg=Pt(),Qz=wt(),rw=$r(),Yz=Ra(),iw=cl();function Jz(e,t,n,r,i){let a=new Map;return oN(e,t,n,r,i,a,new Set),a}function Hz(e,t,n,r,i){let a=new Map,o=new Set;for(let c of i)c.selectionSet&&oN(e,t,n,r,c.selectionSet,a,o);return a}function oN(e,t,n,r,i,a,o){for(let c of i.selections)switch(c.kind){case Lg.Kind.FIELD:{if(!Cg(n,c))continue;let l=zz(c),d=a.get(l);d!==void 0?d.push(c):a.set(l,[c]);break}case Lg.Kind.INLINE_FRAGMENT:{if(!Cg(n,c)||!aw(e,c,r))continue;oN(e,t,n,r,c.selectionSet,a,o);break}case Lg.Kind.FRAGMENT_SPREAD:{let l=c.name.value;if(o.has(l)||!Cg(n,c))continue;o.add(l);let d=t[l];if(!d||!aw(e,d,r))continue;oN(e,t,n,r,d.selectionSet,a,o);break}}}function Cg(e,t){let n=(0,iw.getDirectiveValues)(rw.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,iw.getDirectiveValues)(rw.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function aw(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,Yz.typeFromAST)(e,r);return i===n?!0:(0,Qz.isAbstractType)(i)?e.isSubType(i,n):!1}function zz(e){return e.alias?e.alias.value:e.name.value}});var Ug=w(Bg=>{"use strict";m();T();N();Object.defineProperty(Bg,"__esModule",{value:!0});Bg.SingleFieldSubscriptionsRule=Zz;var sw=ze(),Wz=Pt(),Xz=cN();function Zz(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===Wz.Kind.FRAGMENT_DEFINITION&&(c[d.name.value]=d);let l=(0,Xz.collectFields)(n,c,a,r,t.selectionSet);if(l.size>1){let y=[...l.values()].slice(1).flat();e.reportError(new sw.GraphQLError(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:y}))}for(let d of l.values())d[0].name.value.startsWith("__")&&e.reportError(new sw.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 lN=w(kg=>{"use strict";m();T();N();Object.defineProperty(kg,"__esModule",{value:!0});kg.groupBy=e4;function e4(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 xg=w(Mg=>{"use strict";m();T();N();Object.defineProperty(Mg,"__esModule",{value:!0});Mg.UniqueArgumentDefinitionNamesRule=r4;var t4=lN(),n4=ze();function r4(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,f=(c=l.arguments)!==null&&c!==void 0?c:[];n(`${a}.${d}`,f)}return!1}function n(r,i){let a=(0,t4.groupBy)(i,o=>o.name.value);for(let[o,c]of a)c.length>1&&e.reportError(new n4.GraphQLError(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:c.map(l=>l.name)}));return!1}}});var Vg=w(qg=>{"use strict";m();T();N();Object.defineProperty(qg,"__esModule",{value:!0});qg.UniqueArgumentNamesRule=s4;var i4=lN(),a4=ze();function s4(e){return{Field:t,Directive:t};function t(n){var r;let i=(r=n.arguments)!==null&&r!==void 0?r:[],a=(0,i4.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 Kg=w(jg=>{"use strict";m();T();N();Object.defineProperty(jg,"__esModule",{value:!0});jg.UniqueDirectiveNamesRule=o4;var ow=ze();function o4(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 ow.GraphQLError(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new ow.GraphQLError(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}});var Qg=w($g=>{"use strict";m();T();N();Object.defineProperty($g,"__esModule",{value:!0});$g.UniqueDirectivesPerLocationRule=l4;var u4=ze(),Gg=Pt(),uw=zu(),c4=$r();function l4(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():c4.specifiedDirectives;for(let c of r)t[c.name]=!c.isRepeatable;let i=e.getDocument().definitions;for(let c of i)c.kind===Gg.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===Gg.Kind.SCHEMA_DEFINITION||c.kind===Gg.Kind.SCHEMA_EXTENSION)l=a;else if((0,uw.isTypeDefinitionNode)(c)||(0,uw.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 f=d.name.value;t[f]&&(l[f]?e.reportError(new u4.GraphQLError(`The directive "@${f}" can only be used once at this location.`,{nodes:[l[f],d]})):l[f]=d)}}}}});var Jg=w(Yg=>{"use strict";m();T();N();Object.defineProperty(Yg,"__esModule",{value:!0});Yg.UniqueEnumValueNamesRule=p4;var cw=ze(),d4=wt();function p4(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 f of l){let y=f.name.value,I=n[c];(0,d4.isEnumType)(I)&&I.getValue(y)?e.reportError(new cw.GraphQLError(`Enum value "${c}.${y}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):d[y]?e.reportError(new cw.GraphQLError(`Enum value "${c}.${y}" can only be defined once.`,{nodes:[d[y],f.name]})):d[y]=f.name}return!1}}});var Wg=w(zg=>{"use strict";m();T();N();Object.defineProperty(zg,"__esModule",{value:!0});zg.UniqueFieldDefinitionNamesRule=f4;var lw=ze(),Hg=wt();function f4(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 f of l){let y=f.name.value;m4(n[c],y)?e.reportError(new lw.GraphQLError(`Field "${c}.${y}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):d[y]?e.reportError(new lw.GraphQLError(`Field "${c}.${y}" can only be defined once.`,{nodes:[d[y],f.name]})):d[y]=f.name}return!1}}function m4(e,t){return(0,Hg.isObjectType)(e)||(0,Hg.isInterfaceType)(e)||(0,Hg.isInputObjectType)(e)?e.getFields()[t]!=null:!1}});var Zg=w(Xg=>{"use strict";m();T();N();Object.defineProperty(Xg,"__esModule",{value:!0});Xg.UniqueFragmentNamesRule=T4;var N4=ze();function T4(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){let r=n.name.value;return t[r]?e.reportError(new N4.GraphQLError(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}});var t_=w(e_=>{"use strict";m();T();N();Object.defineProperty(e_,"__esModule",{value:!0});e_.UniqueInputFieldNamesRule=y4;var E4=Ir(),h4=ze();function y4(e){let t=[],n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){let r=t.pop();r||(0,E4.invariant)(!1),n=r}},ObjectField(r){let i=r.name.value;n[i]?e.reportError(new h4.GraphQLError(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}});var r_=w(n_=>{"use strict";m();T();N();Object.defineProperty(n_,"__esModule",{value:!0});n_.UniqueOperationNamesRule=g4;var I4=ze();function g4(e){let t=Object.create(null);return{OperationDefinition(n){let r=n.name;return r&&(t[r.value]?e.reportError(new I4.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(i_=>{"use strict";m();T();N();Object.defineProperty(i_,"__esModule",{value:!0});i_.UniqueOperationTypesRule=_4;var dw=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,f=n[d];r[d]?e.reportError(new dw.GraphQLError(`Type for ${d} already defined in the schema. It cannot be redefined.`,{nodes:l})):f?e.reportError(new dw.GraphQLError(`There can be only one ${d} type in schema.`,{nodes:[f,l]})):n[d]=l}return!1}}});var o_=w(s_=>{"use strict";m();T();N();Object.defineProperty(s_,"__esModule",{value:!0});s_.UniqueTypeNamesRule=v4;var pw=ze();function v4(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 pw.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 pw.GraphQLError(`There can be only one type named "${a}".`,{nodes:[t[a],i.name]})):t[a]=i.name,!1}}});var c_=w(u_=>{"use strict";m();T();N();Object.defineProperty(u_,"__esModule",{value:!0});u_.UniqueVariableNamesRule=D4;var S4=lN(),O4=ze();function D4(e){return{OperationDefinition(t){var n;let r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=(0,S4.groupBy)(r,a=>a.variable.name.value);for(let[a,o]of i)o.length>1&&e.reportError(new O4.GraphQLError(`There can be only one variable named "$${a}".`,{nodes:o.map(c=>c.variable.name)}))}}}});var p_=w(d_=>{"use strict";m();T();N();Object.defineProperty(d_,"__esModule",{value:!0});d_.ValuesOfCorrectTypeRule=F4;var b4=zo(),sp=Xt(),A4=Wo(),R4=Xo(),Pa=ze(),l_=Pt(),dN=ci(),Fa=wt();function F4(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){let r=(0,Fa.getNullableType)(e.getParentInputType());if(!(0,Fa.isListType)(r))return Xu(e,n),!1},ObjectValue(n){let r=(0,Fa.getNamedType)(e.getInputType());if(!(0,Fa.isInputObjectType)(r))return Xu(e,n),!1;let i=(0,A4.keyMap)(n.fields,a=>a.name.value);for(let a of Object.values(r.getFields()))if(!i[a.name]&&(0,Fa.isRequiredInputField)(a)){let c=(0,sp.inspect)(a.type);e.reportError(new Pa.GraphQLError(`Field "${r.name}.${a.name}" of required type "${c}" was not provided.`,{nodes:n}))}r.isOneOf&&P4(e,n,r,i,t)},ObjectField(n){let r=(0,Fa.getNamedType)(e.getParentInputType());if(!e.getInputType()&&(0,Fa.isInputObjectType)(r)){let a=(0,R4.suggestionList)(n.name.value,Object.keys(r.getFields()));e.reportError(new Pa.GraphQLError(`Field "${n.name.value}" is not defined by type "${r.name}".`+(0,b4.didYouMean)(a),{nodes:n}))}},NullValue(n){let r=e.getInputType();(0,Fa.isNonNullType)(r)&&e.reportError(new Pa.GraphQLError(`Expected value of type "${(0,sp.inspect)(r)}", found ${(0,dN.print)(n)}.`,{nodes:n}))},EnumValue:n=>Xu(e,n),IntValue:n=>Xu(e,n),FloatValue:n=>Xu(e,n),StringValue:n=>Xu(e,n),BooleanValue:n=>Xu(e,n)}}function Xu(e,t){let n=e.getInputType();if(!n)return;let r=(0,Fa.getNamedType)(n);if(!(0,Fa.isLeafType)(r)){let i=(0,sp.inspect)(n);e.reportError(new Pa.GraphQLError(`Expected value of type "${i}", found ${(0,dN.print)(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){let a=(0,sp.inspect)(n);e.reportError(new Pa.GraphQLError(`Expected value of type "${a}", found ${(0,dN.print)(t)}.`,{nodes:t}))}}catch(i){let a=(0,sp.inspect)(n);i instanceof Pa.GraphQLError?e.reportError(i):e.reportError(new Pa.GraphQLError(`Expected value of type "${a}", found ${(0,dN.print)(t)}; `+i.message,{nodes:t,originalError:i}))}}function P4(e,t,n,r,i){var a;let o=Object.keys(r);if(o.length!==1){e.reportError(new Pa.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,f=(l==null?void 0:l.kind)===l_.Kind.VARIABLE;if(d){e.reportError(new Pa.GraphQLError(`Field "${n.name}.${o[0]}" must be non-null.`,{nodes:[t]}));return}if(f){let y=l.name.value;i[y].type.kind!==l_.Kind.NON_NULL_TYPE&&e.reportError(new Pa.GraphQLError(`Variable "${y}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}});var m_=w(f_=>{"use strict";m();T();N();Object.defineProperty(f_,"__esModule",{value:!0});f_.VariablesAreInputTypesRule=U4;var w4=ze(),L4=ci(),C4=wt(),B4=Ra();function U4(e){return{VariableDefinition(t){let n=(0,B4.typeFromAST)(e.getSchema(),t.type);if(n!==void 0&&!(0,C4.isInputType)(n)){let r=t.variable.name.value,i=(0,L4.print)(t.type);e.reportError(new w4.GraphQLError(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}});var T_=w(N_=>{"use strict";m();T();N();Object.defineProperty(N_,"__esModule",{value:!0});N_.VariablesInAllowedPositionRule=q4;var fw=Xt(),k4=ze(),M4=Pt(),mw=wt(),Nw=Vd(),x4=Ra();function q4(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(),f=(0,x4.typeFromAST)(d,l.type);if(f&&!V4(d,f,l.defaultValue,a,o)){let y=(0,fw.inspect)(f),I=(0,fw.inspect)(a);e.reportError(new k4.GraphQLError(`Variable "$${c}" of type "${y}" used in position expecting type "${I}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function V4(e,t,n,r,i){if((0,mw.isNonNullType)(r)&&!(0,mw.isNonNullType)(t)){if(!(n!=null&&n.kind!==M4.Kind.NULL)&&!(i!==void 0))return!1;let c=r.ofType;return(0,Nw.isTypeSubTypeOf)(e,t,c)}return(0,Nw.isTypeSubTypeOf)(e,t,r)}});var E_=w(nu=>{"use strict";m();T();N();Object.defineProperty(nu,"__esModule",{value:!0});nu.specifiedSDLRules=nu.specifiedRules=nu.recommendedRules=void 0;var j4=CI(),K4=UI(),G4=MI(),Tw=xI(),Ew=KI(),$4=$I(),hw=JI(),Q4=zI(),Y4=XI(),J4=eg(),H4=ng(),z4=ig(),W4=sg(),X4=ug(),Z4=hg(),eW=gg(),tW=vg(),yw=Og(),nW=bg(),rW=Ug(),iW=xg(),Iw=Vg(),aW=Kg(),gw=Qg(),sW=Jg(),oW=Wg(),uW=Zg(),_w=t_(),cW=r_(),lW=a_(),dW=o_(),pW=c_(),fW=p_(),mW=m_(),NW=T_(),vw=Object.freeze([J4.MaxIntrospectionDepthRule]);nu.recommendedRules=vw;var TW=Object.freeze([j4.ExecutableDefinitionsRule,cW.UniqueOperationNamesRule,Q4.LoneAnonymousOperationRule,rW.SingleFieldSubscriptionsRule,hw.KnownTypeNamesRule,G4.FragmentsOnCompositeTypesRule,mW.VariablesAreInputTypesRule,nW.ScalarLeafsRule,K4.FieldsOnCorrectTypeRule,uW.UniqueFragmentNamesRule,$4.KnownFragmentNamesRule,W4.NoUnusedFragmentsRule,eW.PossibleFragmentSpreadsRule,H4.NoFragmentCyclesRule,pW.UniqueVariableNamesRule,z4.NoUndefinedVariablesRule,X4.NoUnusedVariablesRule,Ew.KnownDirectivesRule,gw.UniqueDirectivesPerLocationRule,Tw.KnownArgumentNamesRule,Iw.UniqueArgumentNamesRule,fW.ValuesOfCorrectTypeRule,yw.ProvidedRequiredArgumentsRule,NW.VariablesInAllowedPositionRule,Z4.OverlappingFieldsCanBeMergedRule,_w.UniqueInputFieldNamesRule,...vw]);nu.specifiedRules=TW;var EW=Object.freeze([Y4.LoneSchemaDefinitionRule,lW.UniqueOperationTypesRule,dW.UniqueTypeNamesRule,sW.UniqueEnumValueNamesRule,oW.UniqueFieldDefinitionNamesRule,iW.UniqueArgumentDefinitionNamesRule,aW.UniqueDirectiveNamesRule,hw.KnownTypeNamesRule,Ew.KnownDirectivesRule,gw.UniqueDirectivesPerLocationRule,tW.PossibleTypeExtensionsRule,Tw.KnownArgumentNamesOnDirectivesRule,Iw.UniqueArgumentNamesRule,_w.UniqueInputFieldNamesRule,yw.ProvidedRequiredArgumentsOnDirectivesRule]);nu.specifiedSDLRules=EW});var I_=w(ru=>{"use strict";m();T();N();Object.defineProperty(ru,"__esModule",{value:!0});ru.ValidationContext=ru.SDLValidationContext=ru.ASTValidationContext=void 0;var Sw=Pt(),hW=ju(),Ow=Xm(),op=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===Sw.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===Sw.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}};ru.ASTValidationContext=op;var h_=class extends op{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}};ru.SDLValidationContext=h_;var y_=class extends op{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 Ow.TypeInfo(this._schema);(0,hW.visit)(t,(0,Ow.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()}};ru.ValidationContext=y_});var dl=w(ll=>{"use strict";m();T();N();Object.defineProperty(ll,"__esModule",{value:!0});ll.assertValidSDL=vW;ll.assertValidSDLExtension=SW;ll.validate=_W;ll.validateSDL=g_;var yW=Lr(),IW=ze(),pN=ju(),gW=Wd(),Dw=Xm(),bw=E_(),Aw=I_();function _W(e,t,n=bw.specifiedRules,r,i=new Dw.TypeInfo(e)){var a;let o=(a=r==null?void 0:r.maxErrors)!==null&&a!==void 0?a:100;t||(0,yW.devAssert)(!1,"Must provide document."),(0,gW.assertValidSchema)(e);let c=Object.freeze({}),l=[],d=new Aw.ValidationContext(e,t,i,y=>{if(l.length>=o)throw l.push(new IW.GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),c;l.push(y)}),f=(0,pN.visitInParallel)(n.map(y=>y(d)));try{(0,pN.visit)(t,(0,Dw.visitWithTypeInfo)(i,f))}catch(y){if(y!==c)throw y}return l}function g_(e,t,n=bw.specifiedSDLRules){let r=[],i=new Aw.SDLValidationContext(e,t,o=>{r.push(o)}),a=n.map(o=>o(i));return(0,pN.visit)(e,(0,pN.visitInParallel)(a)),r}function vW(e){let t=g_(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` +`))}var qI=class{constructor(t){this._errors=[],this.schema=t}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new N6.GraphQLError(t,{nodes:r}))}getErrors(){return this._errors}};function y6(e){let t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!(0,Pn.isObjectType)(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${(0,_r.inspect)(n)}.`,(r=xI(t,MI.OperationTypeNode.QUERY))!==null&&r!==void 0?r:n.astNode)}let i=t.getMutationType();if(i&&!(0,Pn.isObjectType)(i)){var a;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${(0,_r.inspect)(i)}.`,(a=xI(t,MI.OperationTypeNode.MUTATION))!==null&&a!==void 0?a:i.astNode)}let o=t.getSubscriptionType();if(o&&!(0,Pn.isObjectType)(o)){var c;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${(0,_r.inspect)(o)}.`,(c=xI(t,MI.OperationTypeNode.SUBSCRIPTION))!==null&&c!==void 0?c:o.astNode)}}function xI(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 I6(e){for(let n of e.schema.getDirectives()){if(!(0,RF.isDirective)(n)){e.reportError(`Expected directive but got: ${(0,_r.inspect)(n)}.`,n==null?void 0:n.astNode);continue}Zu(e,n);for(let r of n.args)if(Zu(e,r),(0,Pn.isInputType)(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${(0,_r.inspect)(r.type)}.`,r.astNode),(0,Pn.isRequiredArgument)(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[VI(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function Zu(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function g6(e){let t=A6(e),n=e.schema.getTypeMap();for(let r of Object.values(n)){if(!(0,Pn.isNamedType)(r)){e.reportError(`Expected GraphQL named type but got: ${(0,_r.inspect)(r)}.`,r.astNode);continue}(0,T6.isIntrospectionType)(r)||Zu(e,r),(0,Pn.isObjectType)(r)||(0,Pn.isInterfaceType)(r)?(DF(e,r),bF(e,r)):(0,Pn.isUnionType)(r)?S6(e,r):(0,Pn.isEnumType)(r)?O6(e,r):(0,Pn.isInputObjectType)(r)&&(D6(e,r),t(r))}}function DF(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(Zu(e,o),!(0,Pn.isOutputType)(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${(0,_r.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(Zu(e,c),!(0,Pn.isInputType)(c.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${l}:) must be Input Type but got: ${(0,_r.inspect)(c.type)}.`,(i=c.astNode)===null||i===void 0?void 0:i.type)}if((0,Pn.isRequiredArgument)(c)&&c.deprecationReason!=null){var a;e.reportError(`Required argument ${t.name}.${o.name}(${l}:) cannot be deprecated.`,[VI(c.astNode),(a=c.astNode)===null||a===void 0?void 0:a.type])}}}}function bF(e,t){let n=Object.create(null);for(let r of t.getInterfaces()){if(!(0,Pn.isInterfaceType)(r)){e.reportError(`Type ${(0,_r.inspect)(t)} must only implement Interface types, it cannot implement ${(0,_r.inspect)(r)}.`,ep(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,ep(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,ep(t,r));continue}n[r.name]=!0,v6(e,t,r),_6(e,t,r)}}function _6(e,t,n){let r=t.getFields();for(let l of Object.values(n.getFields())){let d=l.name,f=r[d];if(!f){e.reportError(`Interface field ${n.name}.${d} expected but ${t.name} does not provide it.`,[l.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!(0,OF.isTypeSubTypeOf)(e.schema,f.type,l.type)){var i,a;e.reportError(`Interface field ${n.name}.${d} expects type ${(0,_r.inspect)(l.type)} but ${t.name}.${d} is type ${(0,_r.inspect)(f.type)}.`,[(i=l.astNode)===null||i===void 0?void 0:i.type,(a=f.astNode)===null||a===void 0?void 0:a.type])}for(let y of l.args){let I=y.name,v=f.args.find(F=>F.name===I);if(!v){e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expected but ${t.name}.${d} does not provide it.`,[y.astNode,f.astNode]);continue}if(!(0,OF.isEqualType)(y.type,v.type)){var o,c;e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expects type ${(0,_r.inspect)(y.type)} but ${t.name}.${d}(${I}:) is type ${(0,_r.inspect)(v.type)}.`,[(o=y.astNode)===null||o===void 0?void 0:o.type,(c=v.astNode)===null||c===void 0?void 0:c.type])}}for(let y of f.args){let I=y.name;!l.args.find(F=>F.name===I)&&(0,Pn.isRequiredArgument)(y)&&e.reportError(`Object field ${t.name}.${d} includes required argument ${I} that is missing from the Interface field ${n.name}.${d}.`,[y.astNode,l.astNode])}}}function v6(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}.`,[...ep(n,i),...ep(t,n)])}function S6(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.`,AF(t,i.name));continue}r[i.name]=!0,(0,Pn.isObjectType)(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${(0,_r.inspect)(i)}.`,AF(t,String(i)))}}function O6(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)Zu(e,r)}function D6(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(Zu(e,a),!(0,Pn.isInputType)(a.type)){var r;e.reportError(`The type of ${t.name}.${a.name} must be Input Type but got: ${(0,_r.inspect)(a.type)}.`,(r=a.astNode)===null||r===void 0?void 0:r.type)}if((0,Pn.isRequiredInputField)(a)&&a.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${a.name} cannot be deprecated.`,[VI(a.astNode),(i=a.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&b6(t,a,e)}}function b6(e,t,n){if((0,Pn.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 A6(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,Pn.isNonNullType)(c.type)&&(0,Pn.isInputObjectType)(c.type.ofType)){let l=c.type.ofType,d=r[l.name];if(n.push(c),d===void 0)i(l);else{let f=n.slice(d),y=f.map(I=>I.name).join(".");e.reportError(`Cannot reference Input Object "${l.name}" within itself through a series of non-null fields: "${y}".`,f.map(I=>I.astNode))}n.pop()}r[a.name]=void 0}}function ep(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 AF(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 VI(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===RF.GraphQLDeprecatedDirective.name)}});var Fa=w(GI=>{"use strict";m();T();N();Object.defineProperty(GI,"__esModule",{value:!0});GI.typeFromAST=KI;var jI=Ft(),FF=wt();function KI(e,t){switch(t.kind){case jI.Kind.LIST_TYPE:{let n=KI(e,t.type);return n&&new FF.GraphQLList(n)}case jI.Kind.NON_NULL_TYPE:{let n=KI(e,t.type);return n&&new FF.GraphQLNonNull(n)}case jI.Kind.NAMED_TYPE:return e.getType(t.name.value)}}});var nN=w(np=>{"use strict";m();T();N();Object.defineProperty(np,"__esModule",{value:!0});np.TypeInfo=void 0;np.visitWithTypeInfo=F6;var R6=ba(),Fn=Ft(),wF=Qu(),wn=wt(),ul=Fi(),LF=Fa(),$I=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:P6,n&&((0,wn.isInputType)(n)&&this._inputTypeStack.push(n),(0,wn.isCompositeType)(n)&&this._parentTypeStack.push(n),(0,wn.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 Fn.Kind.SELECTION_SET:{let i=(0,wn.getNamedType)(this.getType());this._parentTypeStack.push((0,wn.isCompositeType)(i)?i:void 0);break}case Fn.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,wn.isOutputType)(o)?o:void 0);break}case Fn.Kind.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case Fn.Kind.OPERATION_DEFINITION:{let i=n.getRootType(t.operation);this._typeStack.push((0,wn.isObjectType)(i)?i:void 0);break}case Fn.Kind.INLINE_FRAGMENT:case Fn.Kind.FRAGMENT_DEFINITION:{let i=t.typeCondition,a=i?(0,LF.typeFromAST)(n,i):(0,wn.getNamedType)(this.getType());this._typeStack.push((0,wn.isOutputType)(a)?a:void 0);break}case Fn.Kind.VARIABLE_DEFINITION:{let i=(0,LF.typeFromAST)(n,t.type);this._inputTypeStack.push((0,wn.isInputType)(i)?i:void 0);break}case Fn.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,wn.isInputType)(a)?a:void 0);break}case Fn.Kind.LIST:{let i=(0,wn.getNullableType)(this.getInputType()),a=(0,wn.isListType)(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push((0,wn.isInputType)(a)?a:void 0);break}case Fn.Kind.OBJECT_FIELD:{let i=(0,wn.getNamedType)(this.getInputType()),a,o;(0,wn.isInputObjectType)(i)&&(o=i.getFields()[t.name.value],o&&(a=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push((0,wn.isInputType)(a)?a:void 0);break}case Fn.Kind.ENUM:{let i=(0,wn.getNamedType)(this.getInputType()),a;(0,wn.isEnumType)(i)&&(a=i.getValue(t.value)),this._enumValue=a;break}default:}}leave(t){switch(t.kind){case Fn.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Fn.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Fn.Kind.DIRECTIVE:this._directive=null;break;case Fn.Kind.OPERATION_DEFINITION:case Fn.Kind.INLINE_FRAGMENT:case Fn.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Fn.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Fn.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Fn.Kind.LIST:case Fn.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Fn.Kind.ENUM:this._enumValue=null;break;default:}}};np.TypeInfo=$I;function P6(e,t,n){let r=n.name.value;if(r===ul.SchemaMetaFieldDef.name&&e.getQueryType()===t)return ul.SchemaMetaFieldDef;if(r===ul.TypeMetaFieldDef.name&&e.getQueryType()===t)return ul.TypeMetaFieldDef;if(r===ul.TypeNameMetaFieldDef.name&&(0,wn.isCompositeType)(t))return ul.TypeNameMetaFieldDef;if((0,wn.isObjectType)(t)||(0,wn.isInterfaceType)(t))return t.getFields()[r]}function F6(e,t){return{enter(...n){let r=n[0];e.enter(r);let i=(0,wF.getEnterLeaveForKind)(t,r.kind).enter;if(i){let a=i.apply(t,n);return a!==void 0&&(e.leave(r),(0,R6.isNode)(a)&&e.enter(a)),a}},leave(...n){let r=n[0],i=(0,wF.getEnterLeaveForKind)(t,r.kind).leave,a;return i&&(a=i.apply(t,n)),e.leave(r),a}}}});var ec=w(wi=>{"use strict";m();T();N();Object.defineProperty(wi,"__esModule",{value:!0});wi.isConstValueNode=QI;wi.isDefinitionNode=w6;wi.isExecutableDefinitionNode=CF;wi.isSelectionNode=L6;wi.isTypeDefinitionNode=kF;wi.isTypeExtensionNode=xF;wi.isTypeNode=C6;wi.isTypeSystemDefinitionNode=UF;wi.isTypeSystemExtensionNode=MF;wi.isValueNode=BF;var Lt=Ft();function w6(e){return CF(e)||UF(e)||MF(e)}function CF(e){return e.kind===Lt.Kind.OPERATION_DEFINITION||e.kind===Lt.Kind.FRAGMENT_DEFINITION}function L6(e){return e.kind===Lt.Kind.FIELD||e.kind===Lt.Kind.FRAGMENT_SPREAD||e.kind===Lt.Kind.INLINE_FRAGMENT}function BF(e){return e.kind===Lt.Kind.VARIABLE||e.kind===Lt.Kind.INT||e.kind===Lt.Kind.FLOAT||e.kind===Lt.Kind.STRING||e.kind===Lt.Kind.BOOLEAN||e.kind===Lt.Kind.NULL||e.kind===Lt.Kind.ENUM||e.kind===Lt.Kind.LIST||e.kind===Lt.Kind.OBJECT}function QI(e){return BF(e)&&(e.kind===Lt.Kind.LIST?e.values.some(QI):e.kind===Lt.Kind.OBJECT?e.fields.some(t=>QI(t.value)):e.kind!==Lt.Kind.VARIABLE)}function C6(e){return e.kind===Lt.Kind.NAMED_TYPE||e.kind===Lt.Kind.LIST_TYPE||e.kind===Lt.Kind.NON_NULL_TYPE}function UF(e){return e.kind===Lt.Kind.SCHEMA_DEFINITION||kF(e)||e.kind===Lt.Kind.DIRECTIVE_DEFINITION}function kF(e){return e.kind===Lt.Kind.SCALAR_TYPE_DEFINITION||e.kind===Lt.Kind.OBJECT_TYPE_DEFINITION||e.kind===Lt.Kind.INTERFACE_TYPE_DEFINITION||e.kind===Lt.Kind.UNION_TYPE_DEFINITION||e.kind===Lt.Kind.ENUM_TYPE_DEFINITION||e.kind===Lt.Kind.INPUT_OBJECT_TYPE_DEFINITION}function MF(e){return e.kind===Lt.Kind.SCHEMA_EXTENSION||xF(e)}function xF(e){return e.kind===Lt.Kind.SCALAR_TYPE_EXTENSION||e.kind===Lt.Kind.OBJECT_TYPE_EXTENSION||e.kind===Lt.Kind.INTERFACE_TYPE_EXTENSION||e.kind===Lt.Kind.UNION_TYPE_EXTENSION||e.kind===Lt.Kind.ENUM_TYPE_EXTENSION||e.kind===Lt.Kind.INPUT_OBJECT_TYPE_EXTENSION}});var JI=w(YI=>{"use strict";m();T();N();Object.defineProperty(YI,"__esModule",{value:!0});YI.ExecutableDefinitionsRule=k6;var B6=ze(),qF=Ft(),U6=ec();function k6(e){return{Document(t){for(let n of t.definitions)if(!(0,U6.isExecutableDefinitionNode)(n)){let r=n.kind===qF.Kind.SCHEMA_DEFINITION||n.kind===qF.Kind.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new B6.GraphQLError(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}});var zI=w(HI=>{"use strict";m();T();N();Object.defineProperty(HI,"__esModule",{value:!0});HI.FieldsOnCorrectTypeRule=V6;var VF=eu(),M6=xd(),x6=nu(),q6=ze(),rp=wt();function V6(e){return{Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),a=t.name.value,o=(0,VF.didYouMean)("to use an inline fragment on",j6(i,n,a));o===""&&(o=(0,VF.didYouMean)(K6(n,a))),e.reportError(new q6.GraphQLError(`Cannot query field "${a}" on type "${n.name}".`+o,{nodes:t}))}}}}function j6(e,t,n){if(!(0,rp.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,rp.isInterfaceType)(o)&&e.isSubType(o,c)?-1:(0,rp.isInterfaceType)(c)&&e.isSubType(c,o)?1:(0,M6.naturalCompare)(o.name,c.name)}).map(o=>o.name)}function K6(e,t){if((0,rp.isObjectType)(e)||(0,rp.isInterfaceType)(e)){let n=Object.keys(e.getFields());return(0,x6.suggestionList)(t,n)}return[]}});var XI=w(WI=>{"use strict";m();T();N();Object.defineProperty(WI,"__esModule",{value:!0});WI.FragmentsOnCompositeTypesRule=G6;var jF=ze(),KF=ci(),GF=wt(),$F=Fa();function G6(e){return{InlineFragment(t){let n=t.typeCondition;if(n){let r=(0,$F.typeFromAST)(e.getSchema(),n);if(r&&!(0,GF.isCompositeType)(r)){let i=(0,KF.print)(n);e.reportError(new jF.GraphQLError(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){let n=(0,$F.typeFromAST)(e.getSchema(),t.typeCondition);if(n&&!(0,GF.isCompositeType)(n)){let r=(0,KF.print)(t.typeCondition);e.reportError(new jF.GraphQLError(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}});var ZI=w(rN=>{"use strict";m();T();N();Object.defineProperty(rN,"__esModule",{value:!0});rN.KnownArgumentNamesOnDirectivesRule=HF;rN.KnownArgumentNamesRule=Y6;var QF=eu(),YF=nu(),JF=ze(),$6=Ft(),Q6=Qr();function Y6(e){return Q(x({},HF(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,YF.suggestionList)(a,o);e.reportError(new JF.GraphQLError(`Unknown argument "${a}" on field "${i.name}.${r.name}".`+(0,QF.didYouMean)(c),{nodes:t}))}}})}function HF(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Q6.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===$6.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 f=d.name.value;if(!l.includes(f)){let y=(0,YF.suggestionList)(f,l);e.reportError(new JF.GraphQLError(`Unknown argument "${f}" on directive "@${c}".`+(0,QF.didYouMean)(y),{nodes:d}))}}return!1}}}});var rg=w(ng=>{"use strict";m();T();N();Object.defineProperty(ng,"__esModule",{value:!0});ng.KnownDirectivesRule=z6;var J6=Xt(),eg=Ir(),zF=ze(),tg=ba(),er=tl(),hn=Ft(),H6=Qr();function z6(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():H6.specifiedDirectives;for(let a of r)t[a.name]=a.locations;let i=e.getDocument().definitions;for(let a of i)a.kind===hn.Kind.DIRECTIVE_DEFINITION&&(t[a.name.value]=a.locations.map(o=>o.value));return{Directive(a,o,c,l,d){let f=a.name.value,y=t[f];if(!y){e.reportError(new zF.GraphQLError(`Unknown directive "@${f}".`,{nodes:a}));return}let I=W6(d);I&&!y.includes(I)&&e.reportError(new zF.GraphQLError(`Directive "@${f}" may not be used on ${I}.`,{nodes:a}))}}}function W6(e){let t=e[e.length-1];switch("kind"in t||(0,eg.invariant)(!1),t.kind){case hn.Kind.OPERATION_DEFINITION:return X6(t.operation);case hn.Kind.FIELD:return er.DirectiveLocation.FIELD;case hn.Kind.FRAGMENT_SPREAD:return er.DirectiveLocation.FRAGMENT_SPREAD;case hn.Kind.INLINE_FRAGMENT:return er.DirectiveLocation.INLINE_FRAGMENT;case hn.Kind.FRAGMENT_DEFINITION:return er.DirectiveLocation.FRAGMENT_DEFINITION;case hn.Kind.VARIABLE_DEFINITION:return er.DirectiveLocation.VARIABLE_DEFINITION;case hn.Kind.SCHEMA_DEFINITION:case hn.Kind.SCHEMA_EXTENSION:return er.DirectiveLocation.SCHEMA;case hn.Kind.SCALAR_TYPE_DEFINITION:case hn.Kind.SCALAR_TYPE_EXTENSION:return er.DirectiveLocation.SCALAR;case hn.Kind.OBJECT_TYPE_DEFINITION:case hn.Kind.OBJECT_TYPE_EXTENSION:return er.DirectiveLocation.OBJECT;case hn.Kind.FIELD_DEFINITION:return er.DirectiveLocation.FIELD_DEFINITION;case hn.Kind.INTERFACE_TYPE_DEFINITION:case hn.Kind.INTERFACE_TYPE_EXTENSION:return er.DirectiveLocation.INTERFACE;case hn.Kind.UNION_TYPE_DEFINITION:case hn.Kind.UNION_TYPE_EXTENSION:return er.DirectiveLocation.UNION;case hn.Kind.ENUM_TYPE_DEFINITION:case hn.Kind.ENUM_TYPE_EXTENSION:return er.DirectiveLocation.ENUM;case hn.Kind.ENUM_VALUE_DEFINITION:return er.DirectiveLocation.ENUM_VALUE;case hn.Kind.INPUT_OBJECT_TYPE_DEFINITION:case hn.Kind.INPUT_OBJECT_TYPE_EXTENSION:return er.DirectiveLocation.INPUT_OBJECT;case hn.Kind.INPUT_VALUE_DEFINITION:{let n=e[e.length-3];return"kind"in n||(0,eg.invariant)(!1),n.kind===hn.Kind.INPUT_OBJECT_TYPE_DEFINITION?er.DirectiveLocation.INPUT_FIELD_DEFINITION:er.DirectiveLocation.ARGUMENT_DEFINITION}default:(0,eg.invariant)(!1,"Unexpected kind: "+(0,J6.inspect)(t.kind))}}function X6(e){switch(e){case tg.OperationTypeNode.QUERY:return er.DirectiveLocation.QUERY;case tg.OperationTypeNode.MUTATION:return er.DirectiveLocation.MUTATION;case tg.OperationTypeNode.SUBSCRIPTION:return er.DirectiveLocation.SUBSCRIPTION}}});var ag=w(ig=>{"use strict";m();T();N();Object.defineProperty(ig,"__esModule",{value:!0});ig.KnownFragmentNamesRule=ez;var Z6=ze();function ez(e){return{FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new Z6.GraphQLError(`Unknown fragment "${n}".`,{nodes:t.name}))}}}});var ug=w(og=>{"use strict";m();T();N();Object.defineProperty(og,"__esModule",{value:!0});og.KnownTypeNamesRule=sz;var tz=eu(),nz=nu(),rz=ze(),sg=ec(),iz=Fi(),az=Pa();function sz(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let a of e.getDocument().definitions)(0,sg.isTypeDefinitionNode)(a)&&(r[a.name.value]=!0);let i=[...Object.keys(n),...Object.keys(r)];return{NamedType(a,o,c,l,d){let f=a.name.value;if(!n[f]&&!r[f]){var y;let I=(y=d[2])!==null&&y!==void 0?y:c,v=I!=null&&oz(I);if(v&&WF.includes(f))return;let F=(0,nz.suggestionList)(f,v?WF.concat(i):i);e.reportError(new rz.GraphQLError(`Unknown type "${f}".`+(0,tz.didYouMean)(F),{nodes:a}))}}}}var WF=[...az.specifiedScalarTypes,...iz.introspectionTypes].map(e=>e.name);function oz(e){return"kind"in e&&((0,sg.isTypeSystemDefinitionNode)(e)||(0,sg.isTypeSystemExtensionNode)(e))}});var lg=w(cg=>{"use strict";m();T();N();Object.defineProperty(cg,"__esModule",{value:!0});cg.LoneAnonymousOperationRule=lz;var uz=ze(),cz=Ft();function lz(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===cz.Kind.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new uz.GraphQLError("This anonymous operation must be the only defined operation.",{nodes:n}))}}}});var pg=w(dg=>{"use strict";m();T();N();Object.defineProperty(dg,"__esModule",{value:!0});dg.LoneSchemaDefinitionRule=dz;var XF=ze();function dz(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 XF.GraphQLError("Cannot define a new schema within a schema extension.",{nodes:c}));return}o>0&&e.reportError(new XF.GraphQLError("Must provide only one schema definition.",{nodes:c})),++o}}}});var mg=w(fg=>{"use strict";m();T();N();Object.defineProperty(fg,"__esModule",{value:!0});fg.MaxIntrospectionDepthRule=mz;var pz=ze(),ZF=Ft(),fz=3;function mz(e){function t(n,r=Object.create(null),i=0){if(n.kind===ZF.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===ZF.Kind.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=fz))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 pz.GraphQLError("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}});var Tg=w(Ng=>{"use strict";m();T();N();Object.defineProperty(Ng,"__esModule",{value:!0});Ng.NoFragmentCyclesRule=Tz;var Nz=ze();function Tz(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,f=r[d];if(n.push(l),f===void 0){let y=e.getFragment(d);y&&i(y)}else{let y=n.slice(f),I=y.slice(0,-1).map(v=>'"'+v.name.value+'"').join(", ");e.reportError(new Nz.GraphQLError(`Cannot spread fragment "${d}" within itself`+(I!==""?` via ${I}.`:"."),{nodes:y}))}n.pop()}r[o]=void 0}}}});var hg=w(Eg=>{"use strict";m();T();N();Object.defineProperty(Eg,"__esModule",{value:!0});Eg.NoUndefinedVariablesRule=hz;var Ez=ze();function hz(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 Ez.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 Ig=w(yg=>{"use strict";m();T();N();Object.defineProperty(yg,"__esModule",{value:!0});yg.NoUnusedFragmentsRule=Iz;var yz=ze();function Iz(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 yz.GraphQLError(`Fragment "${a}" is never used.`,{nodes:i}))}}}}}});var _g=w(gg=>{"use strict";m();T();N();Object.defineProperty(gg,"__esModule",{value:!0});gg.NoUnusedVariablesRule=_z;var gz=ze();function _z(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 gz.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 Og=w(Sg=>{"use strict";m();T();N();Object.defineProperty(Sg,"__esModule",{value:!0});Sg.sortValueNode=vg;var vz=xd(),hs=Ft();function vg(e){switch(e.kind){case hs.Kind.OBJECT:return Q(x({},e),{fields:Sz(e.fields)});case hs.Kind.LIST:return Q(x({},e),{values:e.values.map(vg)});case hs.Kind.INT:case hs.Kind.FLOAT:case hs.Kind.STRING:case hs.Kind.BOOLEAN:case hs.Kind.NULL:case hs.Kind.ENUM:case hs.Kind.VARIABLE:return e}}function Sz(e){return e.map(t=>Q(x({},t),{value:vg(t.value)})).sort((t,n)=>(0,vz.naturalCompare)(t.name.value,n.name.value))}});var wg=w(Fg=>{"use strict";m();T();N();Object.defineProperty(Fg,"__esModule",{value:!0});Fg.OverlappingFieldsCanBeMergedRule=Az;var ew=Xt(),Oz=ze(),Dg=Ft(),Dz=ci(),Yr=wt(),bz=Og(),nw=Fa();function rw(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+rw(n)).join(" and "):e}function Az(e){let t=new Rg,n=new Map;return{SelectionSet(r){let i=Rz(e,n,t,e.getParentType(),r);for(let[[a,o],c,l]of i){let d=rw(o);e.reportError(new Oz.GraphQLError(`Fields "${a}" conflict because ${d}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:c.concat(l)}))}}}}function Rz(e,t,n,r,i){let a=[],[o,c]=sN(e,t,r,i);if(Fz(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:tw(o)===tw(c)})}function tw(e){return(0,Dz.print)((0,bz.sortValueNode)(e))}function bg(e,t){return(0,Yr.isListType)(e)?(0,Yr.isListType)(t)?bg(e.ofType,t.ofType):!0:(0,Yr.isListType)(t)?!0:(0,Yr.isNonNullType)(e)?(0,Yr.isNonNullType)(t)?bg(e.ofType,t.ofType):!0:(0,Yr.isNonNullType)(t)?!0:(0,Yr.isLeafType)(e)||(0,Yr.isLeafType)(t)?e!==t:!1}function sN(e,t,n,r){let i=t.get(r);if(i)return i;let a=Object.create(null),o=Object.create(null);aw(e,n,r,a,o);let c=[a,Object.keys(o)];return t.set(r,c),c}function Ag(e,t,n){let r=t.get(n.selectionSet);if(r)return r;let i=(0,nw.typeFromAST)(e.getSchema(),n.typeCondition);return sN(e,t,i,n.selectionSet)}function aw(e,t,n,r,i){for(let a of n.selections)switch(a.kind){case Dg.Kind.FIELD:{let o=a.name.value,c;((0,Yr.isObjectType)(t)||(0,Yr.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 Dg.Kind.FRAGMENT_SPREAD:i[a.name.value]=!0;break;case Dg.Kind.INLINE_FRAGMENT:{let o=a.typeCondition,c=o?(0,nw.typeFromAST)(e.getSchema(),o):t;aw(e,c,a.selectionSet,r,i);break}}}function Lz(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 Rg=class{constructor(){this._data=new Map}has(t,n,r){var i;let[a,o]=t{"use strict";m();T();N();Object.defineProperty(Cg,"__esModule",{value:!0});Cg.PossibleFragmentSpreadsRule=Bz;var oN=Xt(),sw=ze(),Lg=wt(),ow=$d(),Cz=Fa();function Bz(e){return{InlineFragment(t){let n=e.getType(),r=e.getParentType();if((0,Lg.isCompositeType)(n)&&(0,Lg.isCompositeType)(r)&&!(0,ow.doTypesOverlap)(e.getSchema(),n,r)){let i=(0,oN.inspect)(r),a=(0,oN.inspect)(n);e.reportError(new sw.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=Uz(e,n),i=e.getParentType();if(r&&i&&!(0,ow.doTypesOverlap)(e.getSchema(),r,i)){let a=(0,oN.inspect)(i),o=(0,oN.inspect)(r);e.reportError(new sw.GraphQLError(`Fragment "${n}" cannot be spread here as objects of type "${a}" can never be of type "${o}".`,{nodes:t}))}}}}function Uz(e,t){let n=e.getFragment(t);if(n){let r=(0,Cz.typeFromAST)(e.getSchema(),n.typeCondition);if((0,Lg.isCompositeType)(r))return r}}});var kg=w(Ug=>{"use strict";m();T();N();Object.defineProperty(Ug,"__esModule",{value:!0});Ug.PossibleTypeExtensionsRule=qz;var kz=eu(),cw=Xt(),lw=Ir(),Mz=nu(),uw=ze(),gn=Ft(),xz=ec(),cl=wt();function qz(e){let t=e.getSchema(),n=Object.create(null);for(let i of e.getDocument().definitions)(0,xz.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=Vz[o.kind]:c&&(l=jz(c)),l){if(l!==i.kind){let d=Kz(i.kind);e.reportError(new uw.GraphQLError(`Cannot extend non-${d} type "${a}".`,{nodes:o?[o,i]:i}))}}else{let d=Object.keys(x(x({},n),t==null?void 0:t.getTypeMap())),f=(0,Mz.suggestionList)(a,d);e.reportError(new uw.GraphQLError(`Cannot extend type "${a}" because it is not defined.`+(0,kz.didYouMean)(f),{nodes:i.name}))}}}var Vz={[gn.Kind.SCALAR_TYPE_DEFINITION]:gn.Kind.SCALAR_TYPE_EXTENSION,[gn.Kind.OBJECT_TYPE_DEFINITION]:gn.Kind.OBJECT_TYPE_EXTENSION,[gn.Kind.INTERFACE_TYPE_DEFINITION]:gn.Kind.INTERFACE_TYPE_EXTENSION,[gn.Kind.UNION_TYPE_DEFINITION]:gn.Kind.UNION_TYPE_EXTENSION,[gn.Kind.ENUM_TYPE_DEFINITION]:gn.Kind.ENUM_TYPE_EXTENSION,[gn.Kind.INPUT_OBJECT_TYPE_DEFINITION]:gn.Kind.INPUT_OBJECT_TYPE_EXTENSION};function jz(e){if((0,cl.isScalarType)(e))return gn.Kind.SCALAR_TYPE_EXTENSION;if((0,cl.isObjectType)(e))return gn.Kind.OBJECT_TYPE_EXTENSION;if((0,cl.isInterfaceType)(e))return gn.Kind.INTERFACE_TYPE_EXTENSION;if((0,cl.isUnionType)(e))return gn.Kind.UNION_TYPE_EXTENSION;if((0,cl.isEnumType)(e))return gn.Kind.ENUM_TYPE_EXTENSION;if((0,cl.isInputObjectType)(e))return gn.Kind.INPUT_OBJECT_TYPE_EXTENSION;(0,lw.invariant)(!1,"Unexpected type: "+(0,cw.inspect)(e))}function Kz(e){switch(e){case gn.Kind.SCALAR_TYPE_EXTENSION:return"scalar";case gn.Kind.OBJECT_TYPE_EXTENSION:return"object";case gn.Kind.INTERFACE_TYPE_EXTENSION:return"interface";case gn.Kind.UNION_TYPE_EXTENSION:return"union";case gn.Kind.ENUM_TYPE_EXTENSION:return"enum";case gn.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,lw.invariant)(!1,"Unexpected kind: "+(0,cw.inspect)(e))}}});var xg=w(uN=>{"use strict";m();T();N();Object.defineProperty(uN,"__esModule",{value:!0});uN.ProvidedRequiredArgumentsOnDirectivesRule=Nw;uN.ProvidedRequiredArgumentsRule=Qz;var pw=Xt(),dw=tu(),fw=ze(),mw=Ft(),Gz=ci(),Mg=wt(),$z=Qr();function Qz(e){return Q(x({},Nw(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,Mg.isRequiredArgument)(a)){let o=(0,pw.inspect)(a.type);e.reportError(new fw.GraphQLError(`Field "${r.name}" argument "${a.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}})}function Nw(e){var t;let n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:$z.specifiedDirectives;for(let c of i)n[c.name]=(0,dw.keyMap)(c.args.filter(Mg.isRequiredArgument),l=>l.name);let a=e.getDocument().definitions;for(let c of a)if(c.kind===mw.Kind.DIRECTIVE_DEFINITION){var o;let l=(o=c.arguments)!==null&&o!==void 0?o:[];n[c.name.value]=(0,dw.keyMap)(l.filter(Yz),d=>d.name.value)}return{Directive:{leave(c){let l=c.name.value,d=n[l];if(d){var f;let y=(f=c.arguments)!==null&&f!==void 0?f:[],I=new Set(y.map(v=>v.name.value));for(let[v,F]of Object.entries(d))if(!I.has(v)){let k=(0,Mg.isType)(F.type)?(0,pw.inspect)(F.type):(0,Gz.print)(F.type);e.reportError(new fw.GraphQLError(`Directive "@${l}" argument "${v}" of type "${k}" is required, but it was not provided.`,{nodes:c}))}}}}}}function Yz(e){return e.type.kind===mw.Kind.NON_NULL_TYPE&&e.defaultValue==null}});var Vg=w(qg=>{"use strict";m();T();N();Object.defineProperty(qg,"__esModule",{value:!0});qg.ScalarLeafsRule=Jz;var Tw=Xt(),Ew=ze(),hw=wt();function Jz(e){return{Field(t){let n=e.getType(),r=t.selectionSet;if(n){if((0,hw.isLeafType)((0,hw.getNamedType)(n))){if(r){let i=t.name.value,a=(0,Tw.inspect)(n);e.reportError(new Ew.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,Tw.inspect)(n);e.reportError(new Ew.GraphQLError(`Field "${i}" of type "${a}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}});var Kg=w(jg=>{"use strict";m();T();N();Object.defineProperty(jg,"__esModule",{value:!0});jg.printPathArray=Hz;function Hz(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var ip=w(cN=>{"use strict";m();T();N();Object.defineProperty(cN,"__esModule",{value:!0});cN.addPath=zz;cN.pathToArray=Wz;function zz(e,t,n){return{prev:e,key:t,typename:n}}function Wz(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}});var $g=w(Gg=>{"use strict";m();T();N();Object.defineProperty(Gg,"__esModule",{value:!0});Gg.coerceInputValue=iW;var Xz=eu(),lN=Xt(),Zz=Ir(),eW=Xm(),tW=Da(),aa=ip(),nW=Kg(),rW=nu(),ys=ze(),ap=wt();function iW(e,t,n=aW){return sp(e,t,n,void 0)}function aW(e,t,n){let r="Invalid value "+(0,lN.inspect)(t);throw e.length>0&&(r+=` at "value${(0,nW.printPathArray)(e)}"`),n.message=r+": "+n.message,n}function sp(e,t,n,r){if((0,ap.isNonNullType)(t)){if(e!=null)return sp(e,t.ofType,n,r);n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Expected non-nullable type "${(0,lN.inspect)(t)}" not to be null.`));return}if(e==null)return null;if((0,ap.isListType)(t)){let i=t.ofType;return(0,eW.isIterableObject)(e)?Array.from(e,(a,o)=>{let c=(0,aa.addPath)(r,o,void 0);return sp(a,i,n,c)}):[sp(e,i,n,r)]}if((0,ap.isInputObjectType)(t)){if(!(0,tW.isObjectLike)(e)){n((0,aa.pathToArray)(r),e,new ys.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,ap.isNonNullType)(o.type)){let l=(0,lN.inspect)(o.type);n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Field "${o.name}" of required type "${l}" was not provided.`))}continue}i[o.name]=sp(c,o.type,n,(0,aa.addPath)(r,o.name,t.name))}for(let o of Object.keys(e))if(!a[o]){let c=(0,rW.suggestionList)(o,Object.keys(t.getFields()));n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Field "${o}" is not defined by type "${t.name}".`+(0,Xz.didYouMean)(c)))}if(t.isOneOf){let o=Object.keys(i);o.length!==1&&n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Exactly one key must be specified for OneOf type "${t.name}".`));let c=o[0],l=i[c];l===null&&n((0,aa.pathToArray)(r).concat(c),l,new ys.GraphQLError(`Field "${c}" must be non-null.`))}return i}if((0,ap.isLeafType)(t)){let i;try{i=t.parseValue(e)}catch(a){a instanceof ys.GraphQLError?n((0,aa.pathToArray)(r),e,a):n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Expected type "${t.name}". `+a.message,{originalError:a}));return}return i===void 0&&n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Expected type "${t.name}".`)),i}(0,Zz.invariant)(!1,"Unexpected input type: "+(0,lN.inspect)(t))}});var up=w(Qg=>{"use strict";m();T();N();Object.defineProperty(Qg,"__esModule",{value:!0});Qg.valueFromAST=op;var sW=Xt(),oW=Ir(),uW=tu(),ll=Ft(),tc=wt();function op(e,t,n){if(e){if(e.kind===ll.Kind.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0)return;let i=n[r];return i===null&&(0,tc.isNonNullType)(t)?void 0:i}if((0,tc.isNonNullType)(t))return e.kind===ll.Kind.NULL?void 0:op(e,t.ofType,n);if(e.kind===ll.Kind.NULL)return null;if((0,tc.isListType)(t)){let r=t.ofType;if(e.kind===ll.Kind.LIST){let a=[];for(let o of e.values)if(yw(o,n)){if((0,tc.isNonNullType)(r))return;a.push(null)}else{let c=op(o,r,n);if(c===void 0)return;a.push(c)}return a}let i=op(e,r,n);return i===void 0?void 0:[i]}if((0,tc.isInputObjectType)(t)){if(e.kind!==ll.Kind.OBJECT)return;let r=Object.create(null),i=(0,uW.keyMap)(e.fields,a=>a.name.value);for(let a of Object.values(t.getFields())){let o=i[a.name];if(!o||yw(o.value,n)){if(a.defaultValue!==void 0)r[a.name]=a.defaultValue;else if((0,tc.isNonNullType)(a.type))return;continue}let c=op(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,tc.isLeafType)(t)){let r;try{r=t.parseLiteral(e,n)}catch(i){return}return r===void 0?void 0:r}(0,oW.invariant)(!1,"Unexpected input type: "+(0,sW.inspect)(t))}}function yw(e,t){return e.kind===ll.Kind.VARIABLE&&(t==null||t[e.name.value]===void 0)}});var fl=w(cp=>{"use strict";m();T();N();Object.defineProperty(cp,"__esModule",{value:!0});cp.getArgumentValues=vw;cp.getDirectiveValues=NW;cp.getVariableValues=fW;var dl=Xt(),cW=tu(),lW=Kg(),Is=ze(),Iw=Ft(),gw=ci(),pl=wt(),dW=$g(),pW=Fa(),_w=up();function fW(e,t,n,r){let i=[],a=r==null?void 0:r.maxErrors;try{let o=mW(e,t,n,c=>{if(a!=null&&i.length>=a)throw new Is.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 mW(e,t,n,r){let i={};for(let a of t){let o=a.variable.name.value,c=(0,pW.typeFromAST)(e,a.type);if(!(0,pl.isInputType)(c)){let d=(0,gw.print)(a.type);r(new Is.GraphQLError(`Variable "$${o}" expected value of type "${d}" which cannot be used as an input type.`,{nodes:a.type}));continue}if(!Sw(n,o)){if(a.defaultValue)i[o]=(0,_w.valueFromAST)(a.defaultValue,c);else if((0,pl.isNonNullType)(c)){let d=(0,dl.inspect)(c);r(new Is.GraphQLError(`Variable "$${o}" of required type "${d}" was not provided.`,{nodes:a}))}continue}let l=n[o];if(l===null&&(0,pl.isNonNullType)(c)){let d=(0,dl.inspect)(c);r(new Is.GraphQLError(`Variable "$${o}" of non-null type "${d}" must not be null.`,{nodes:a}));continue}i[o]=(0,dW.coerceInputValue)(l,c,(d,f,y)=>{let I=`Variable "$${o}" got invalid value `+(0,dl.inspect)(f);d.length>0&&(I+=` at "${o}${(0,lW.printPathArray)(d)}"`),r(new Is.GraphQLError(I+"; "+y.message,{nodes:a,originalError:y}))})}return i}function vw(e,t,n){var r;let i={},a=(r=t.arguments)!==null&&r!==void 0?r:[],o=(0,cW.keyMap)(a,c=>c.name.value);for(let c of e.args){let l=c.name,d=c.type,f=o[l];if(!f){if(c.defaultValue!==void 0)i[l]=c.defaultValue;else if((0,pl.isNonNullType)(d))throw new Is.GraphQLError(`Argument "${l}" of required type "${(0,dl.inspect)(d)}" was not provided.`,{nodes:t});continue}let y=f.value,I=y.kind===Iw.Kind.NULL;if(y.kind===Iw.Kind.VARIABLE){let F=y.name.value;if(n==null||!Sw(n,F)){if(c.defaultValue!==void 0)i[l]=c.defaultValue;else if((0,pl.isNonNullType)(d))throw new Is.GraphQLError(`Argument "${l}" of required type "${(0,dl.inspect)(d)}" was provided the variable "$${F}" which was not provided a runtime value.`,{nodes:y});continue}I=n[F]==null}if(I&&(0,pl.isNonNullType)(d))throw new Is.GraphQLError(`Argument "${l}" of non-null type "${(0,dl.inspect)(d)}" must not be null.`,{nodes:y});let v=(0,_w.valueFromAST)(y,d,n);if(v===void 0)throw new Is.GraphQLError(`Argument "${l}" has invalid value ${(0,gw.print)(y)}.`,{nodes:y});i[l]=v}return i}function NW(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 vw(e,i,n)}function Sw(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var fN=w(pN=>{"use strict";m();T();N();Object.defineProperty(pN,"__esModule",{value:!0});pN.collectFields=hW;pN.collectSubfields=yW;var Yg=Ft(),TW=wt(),Ow=Qr(),EW=Fa(),Dw=fl();function hW(e,t,n,r,i){let a=new Map;return dN(e,t,n,r,i,a,new Set),a}function yW(e,t,n,r,i){let a=new Map,o=new Set;for(let c of i)c.selectionSet&&dN(e,t,n,r,c.selectionSet,a,o);return a}function dN(e,t,n,r,i,a,o){for(let c of i.selections)switch(c.kind){case Yg.Kind.FIELD:{if(!Jg(n,c))continue;let l=IW(c),d=a.get(l);d!==void 0?d.push(c):a.set(l,[c]);break}case Yg.Kind.INLINE_FRAGMENT:{if(!Jg(n,c)||!bw(e,c,r))continue;dN(e,t,n,r,c.selectionSet,a,o);break}case Yg.Kind.FRAGMENT_SPREAD:{let l=c.name.value;if(o.has(l)||!Jg(n,c))continue;o.add(l);let d=t[l];if(!d||!bw(e,d,r))continue;dN(e,t,n,r,d.selectionSet,a,o);break}}}function Jg(e,t){let n=(0,Dw.getDirectiveValues)(Ow.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,Dw.getDirectiveValues)(Ow.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function bw(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,EW.typeFromAST)(e,r);return i===n?!0:(0,TW.isAbstractType)(i)?e.isSubType(i,n):!1}function IW(e){return e.alias?e.alias.value:e.name.value}});var zg=w(Hg=>{"use strict";m();T();N();Object.defineProperty(Hg,"__esModule",{value:!0});Hg.SingleFieldSubscriptionsRule=vW;var Aw=ze(),gW=Ft(),_W=fN();function vW(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===gW.Kind.FRAGMENT_DEFINITION&&(c[d.name.value]=d);let l=(0,_W.collectFields)(n,c,a,r,t.selectionSet);if(l.size>1){let y=[...l.values()].slice(1).flat();e.reportError(new Aw.GraphQLError(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:y}))}for(let d of l.values())d[0].name.value.startsWith("__")&&e.reportError(new Aw.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 mN=w(Wg=>{"use strict";m();T();N();Object.defineProperty(Wg,"__esModule",{value:!0});Wg.groupBy=SW;function SW(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 Zg=w(Xg=>{"use strict";m();T();N();Object.defineProperty(Xg,"__esModule",{value:!0});Xg.UniqueArgumentDefinitionNamesRule=bW;var OW=mN(),DW=ze();function bW(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,f=(c=l.arguments)!==null&&c!==void 0?c:[];n(`${a}.${d}`,f)}return!1}function n(r,i){let a=(0,OW.groupBy)(i,o=>o.name.value);for(let[o,c]of a)c.length>1&&e.reportError(new DW.GraphQLError(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:c.map(l=>l.name)}));return!1}}});var t_=w(e_=>{"use strict";m();T();N();Object.defineProperty(e_,"__esModule",{value:!0});e_.UniqueArgumentNamesRule=PW;var AW=mN(),RW=ze();function PW(e){return{Field:t,Directive:t};function t(n){var r;let i=(r=n.arguments)!==null&&r!==void 0?r:[],a=(0,AW.groupBy)(i,o=>o.name.value);for(let[o,c]of a)c.length>1&&e.reportError(new RW.GraphQLError(`There can be only one argument named "${o}".`,{nodes:c.map(l=>l.name)}))}}});var r_=w(n_=>{"use strict";m();T();N();Object.defineProperty(n_,"__esModule",{value:!0});n_.UniqueDirectiveNamesRule=FW;var Rw=ze();function FW(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 Rw.GraphQLError(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new Rw.GraphQLError(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}});var s_=w(a_=>{"use strict";m();T();N();Object.defineProperty(a_,"__esModule",{value:!0});a_.UniqueDirectivesPerLocationRule=CW;var wW=ze(),i_=Ft(),Pw=ec(),LW=Qr();function CW(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():LW.specifiedDirectives;for(let c of r)t[c.name]=!c.isRepeatable;let i=e.getDocument().definitions;for(let c of i)c.kind===i_.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===i_.Kind.SCHEMA_DEFINITION||c.kind===i_.Kind.SCHEMA_EXTENSION)l=a;else if((0,Pw.isTypeDefinitionNode)(c)||(0,Pw.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 f=d.name.value;t[f]&&(l[f]?e.reportError(new wW.GraphQLError(`The directive "@${f}" can only be used once at this location.`,{nodes:[l[f],d]})):l[f]=d)}}}}});var u_=w(o_=>{"use strict";m();T();N();Object.defineProperty(o_,"__esModule",{value:!0});o_.UniqueEnumValueNamesRule=UW;var Fw=ze(),BW=wt();function UW(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 f of l){let y=f.name.value,I=n[c];(0,BW.isEnumType)(I)&&I.getValue(y)?e.reportError(new Fw.GraphQLError(`Enum value "${c}.${y}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):d[y]?e.reportError(new Fw.GraphQLError(`Enum value "${c}.${y}" can only be defined once.`,{nodes:[d[y],f.name]})):d[y]=f.name}return!1}}});var d_=w(l_=>{"use strict";m();T();N();Object.defineProperty(l_,"__esModule",{value:!0});l_.UniqueFieldDefinitionNamesRule=kW;var ww=ze(),c_=wt();function kW(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 f of l){let y=f.name.value;MW(n[c],y)?e.reportError(new ww.GraphQLError(`Field "${c}.${y}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):d[y]?e.reportError(new ww.GraphQLError(`Field "${c}.${y}" can only be defined once.`,{nodes:[d[y],f.name]})):d[y]=f.name}return!1}}function MW(e,t){return(0,c_.isObjectType)(e)||(0,c_.isInterfaceType)(e)||(0,c_.isInputObjectType)(e)?e.getFields()[t]!=null:!1}});var f_=w(p_=>{"use strict";m();T();N();Object.defineProperty(p_,"__esModule",{value:!0});p_.UniqueFragmentNamesRule=qW;var xW=ze();function qW(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){let r=n.name.value;return t[r]?e.reportError(new xW.GraphQLError(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}});var N_=w(m_=>{"use strict";m();T();N();Object.defineProperty(m_,"__esModule",{value:!0});m_.UniqueInputFieldNamesRule=KW;var VW=Ir(),jW=ze();function KW(e){let t=[],n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){let r=t.pop();r||(0,VW.invariant)(!1),n=r}},ObjectField(r){let i=r.name.value;n[i]?e.reportError(new jW.GraphQLError(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}});var E_=w(T_=>{"use strict";m();T();N();Object.defineProperty(T_,"__esModule",{value:!0});T_.UniqueOperationNamesRule=$W;var GW=ze();function $W(e){let t=Object.create(null);return{OperationDefinition(n){let r=n.name;return r&&(t[r.value]?e.reportError(new GW.GraphQLError(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}});var y_=w(h_=>{"use strict";m();T();N();Object.defineProperty(h_,"__esModule",{value:!0});h_.UniqueOperationTypesRule=QW;var Lw=ze();function QW(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,f=n[d];r[d]?e.reportError(new Lw.GraphQLError(`Type for ${d} already defined in the schema. It cannot be redefined.`,{nodes:l})):f?e.reportError(new Lw.GraphQLError(`There can be only one ${d} type in schema.`,{nodes:[f,l]})):n[d]=l}return!1}}});var g_=w(I_=>{"use strict";m();T();N();Object.defineProperty(I_,"__esModule",{value:!0});I_.UniqueTypeNamesRule=YW;var Cw=ze();function YW(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 Cw.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 Cw.GraphQLError(`There can be only one type named "${a}".`,{nodes:[t[a],i.name]})):t[a]=i.name,!1}}});var v_=w(__=>{"use strict";m();T();N();Object.defineProperty(__,"__esModule",{value:!0});__.UniqueVariableNamesRule=zW;var JW=mN(),HW=ze();function zW(e){return{OperationDefinition(t){var n;let r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=(0,JW.groupBy)(r,a=>a.variable.name.value);for(let[a,o]of i)o.length>1&&e.reportError(new HW.GraphQLError(`There can be only one variable named "$${a}".`,{nodes:o.map(c=>c.variable.name)}))}}}});var D_=w(O_=>{"use strict";m();T();N();Object.defineProperty(O_,"__esModule",{value:!0});O_.ValuesOfCorrectTypeRule=e4;var WW=eu(),lp=Xt(),XW=tu(),ZW=nu(),La=ze(),S_=Ft(),NN=ci(),wa=wt();function e4(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){let r=(0,wa.getNullableType)(e.getParentInputType());if(!(0,wa.isListType)(r))return nc(e,n),!1},ObjectValue(n){let r=(0,wa.getNamedType)(e.getInputType());if(!(0,wa.isInputObjectType)(r))return nc(e,n),!1;let i=(0,XW.keyMap)(n.fields,a=>a.name.value);for(let a of Object.values(r.getFields()))if(!i[a.name]&&(0,wa.isRequiredInputField)(a)){let c=(0,lp.inspect)(a.type);e.reportError(new La.GraphQLError(`Field "${r.name}.${a.name}" of required type "${c}" was not provided.`,{nodes:n}))}r.isOneOf&&t4(e,n,r,i,t)},ObjectField(n){let r=(0,wa.getNamedType)(e.getParentInputType());if(!e.getInputType()&&(0,wa.isInputObjectType)(r)){let a=(0,ZW.suggestionList)(n.name.value,Object.keys(r.getFields()));e.reportError(new La.GraphQLError(`Field "${n.name.value}" is not defined by type "${r.name}".`+(0,WW.didYouMean)(a),{nodes:n}))}},NullValue(n){let r=e.getInputType();(0,wa.isNonNullType)(r)&&e.reportError(new La.GraphQLError(`Expected value of type "${(0,lp.inspect)(r)}", found ${(0,NN.print)(n)}.`,{nodes:n}))},EnumValue:n=>nc(e,n),IntValue:n=>nc(e,n),FloatValue:n=>nc(e,n),StringValue:n=>nc(e,n),BooleanValue:n=>nc(e,n)}}function nc(e,t){let n=e.getInputType();if(!n)return;let r=(0,wa.getNamedType)(n);if(!(0,wa.isLeafType)(r)){let i=(0,lp.inspect)(n);e.reportError(new La.GraphQLError(`Expected value of type "${i}", found ${(0,NN.print)(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){let a=(0,lp.inspect)(n);e.reportError(new La.GraphQLError(`Expected value of type "${a}", found ${(0,NN.print)(t)}.`,{nodes:t}))}}catch(i){let a=(0,lp.inspect)(n);i instanceof La.GraphQLError?e.reportError(i):e.reportError(new La.GraphQLError(`Expected value of type "${a}", found ${(0,NN.print)(t)}; `+i.message,{nodes:t,originalError:i}))}}function t4(e,t,n,r,i){var a;let o=Object.keys(r);if(o.length!==1){e.reportError(new La.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===S_.Kind.NULL,f=(l==null?void 0:l.kind)===S_.Kind.VARIABLE;if(d){e.reportError(new La.GraphQLError(`Field "${n.name}.${o[0]}" must be non-null.`,{nodes:[t]}));return}if(f){let y=l.name.value;i[y].type.kind!==S_.Kind.NON_NULL_TYPE&&e.reportError(new La.GraphQLError(`Variable "${y}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}});var A_=w(b_=>{"use strict";m();T();N();Object.defineProperty(b_,"__esModule",{value:!0});b_.VariablesAreInputTypesRule=s4;var n4=ze(),r4=ci(),i4=wt(),a4=Fa();function s4(e){return{VariableDefinition(t){let n=(0,a4.typeFromAST)(e.getSchema(),t.type);if(n!==void 0&&!(0,i4.isInputType)(n)){let r=t.variable.name.value,i=(0,r4.print)(t.type);e.reportError(new n4.GraphQLError(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}});var P_=w(R_=>{"use strict";m();T();N();Object.defineProperty(R_,"__esModule",{value:!0});R_.VariablesInAllowedPositionRule=l4;var Bw=Xt(),o4=ze(),u4=Ft(),Uw=wt(),kw=$d(),c4=Fa();function l4(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(),f=(0,c4.typeFromAST)(d,l.type);if(f&&!d4(d,f,l.defaultValue,a,o)){let y=(0,Bw.inspect)(f),I=(0,Bw.inspect)(a);e.reportError(new o4.GraphQLError(`Variable "$${c}" of type "${y}" used in position expecting type "${I}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function d4(e,t,n,r,i){if((0,Uw.isNonNullType)(r)&&!(0,Uw.isNonNullType)(t)){if(!(n!=null&&n.kind!==u4.Kind.NULL)&&!(i!==void 0))return!1;let c=r.ofType;return(0,kw.isTypeSubTypeOf)(e,t,c)}return(0,kw.isTypeSubTypeOf)(e,t,r)}});var F_=w(su=>{"use strict";m();T();N();Object.defineProperty(su,"__esModule",{value:!0});su.specifiedSDLRules=su.specifiedRules=su.recommendedRules=void 0;var p4=JI(),f4=zI(),m4=XI(),Mw=ZI(),xw=rg(),N4=ag(),qw=ug(),T4=lg(),E4=pg(),h4=mg(),y4=Tg(),I4=hg(),g4=Ig(),_4=_g(),v4=wg(),S4=Bg(),O4=kg(),Vw=xg(),D4=Vg(),b4=zg(),A4=Zg(),jw=t_(),R4=r_(),Kw=s_(),P4=u_(),F4=d_(),w4=f_(),Gw=N_(),L4=E_(),C4=y_(),B4=g_(),U4=v_(),k4=D_(),M4=A_(),x4=P_(),$w=Object.freeze([h4.MaxIntrospectionDepthRule]);su.recommendedRules=$w;var q4=Object.freeze([p4.ExecutableDefinitionsRule,L4.UniqueOperationNamesRule,T4.LoneAnonymousOperationRule,b4.SingleFieldSubscriptionsRule,qw.KnownTypeNamesRule,m4.FragmentsOnCompositeTypesRule,M4.VariablesAreInputTypesRule,D4.ScalarLeafsRule,f4.FieldsOnCorrectTypeRule,w4.UniqueFragmentNamesRule,N4.KnownFragmentNamesRule,g4.NoUnusedFragmentsRule,S4.PossibleFragmentSpreadsRule,y4.NoFragmentCyclesRule,U4.UniqueVariableNamesRule,I4.NoUndefinedVariablesRule,_4.NoUnusedVariablesRule,xw.KnownDirectivesRule,Kw.UniqueDirectivesPerLocationRule,Mw.KnownArgumentNamesRule,jw.UniqueArgumentNamesRule,k4.ValuesOfCorrectTypeRule,Vw.ProvidedRequiredArgumentsRule,x4.VariablesInAllowedPositionRule,v4.OverlappingFieldsCanBeMergedRule,Gw.UniqueInputFieldNamesRule,...$w]);su.specifiedRules=q4;var V4=Object.freeze([E4.LoneSchemaDefinitionRule,C4.UniqueOperationTypesRule,B4.UniqueTypeNamesRule,P4.UniqueEnumValueNamesRule,F4.UniqueFieldDefinitionNamesRule,A4.UniqueArgumentDefinitionNamesRule,R4.UniqueDirectiveNamesRule,qw.KnownTypeNamesRule,xw.KnownDirectivesRule,Kw.UniqueDirectivesPerLocationRule,O4.PossibleTypeExtensionsRule,Mw.KnownArgumentNamesOnDirectivesRule,jw.UniqueArgumentNamesRule,Gw.UniqueInputFieldNamesRule,Vw.ProvidedRequiredArgumentsOnDirectivesRule]);su.specifiedSDLRules=V4});var C_=w(ou=>{"use strict";m();T();N();Object.defineProperty(ou,"__esModule",{value:!0});ou.ValidationContext=ou.SDLValidationContext=ou.ASTValidationContext=void 0;var Qw=Ft(),j4=Qu(),Yw=nN(),dp=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===Qw.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===Qw.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}};ou.ASTValidationContext=dp;var w_=class extends dp{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}};ou.SDLValidationContext=w_;var L_=class extends dp{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 Yw.TypeInfo(this._schema);(0,j4.visit)(t,(0,Yw.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()}};ou.ValidationContext=L_});var Nl=w(ml=>{"use strict";m();T();N();Object.defineProperty(ml,"__esModule",{value:!0});ml.assertValidSDL=Y4;ml.assertValidSDLExtension=J4;ml.validate=Q4;ml.validateSDL=B_;var K4=Br(),G4=ze(),TN=Qu(),$4=tp(),Jw=nN(),Hw=F_(),zw=C_();function Q4(e,t,n=Hw.specifiedRules,r,i=new Jw.TypeInfo(e)){var a;let o=(a=r==null?void 0:r.maxErrors)!==null&&a!==void 0?a:100;t||(0,K4.devAssert)(!1,"Must provide document."),(0,$4.assertValidSchema)(e);let c=Object.freeze({}),l=[],d=new zw.ValidationContext(e,t,i,y=>{if(l.length>=o)throw l.push(new G4.GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),c;l.push(y)}),f=(0,TN.visitInParallel)(n.map(y=>y(d)));try{(0,TN.visit)(t,(0,Jw.visitWithTypeInfo)(i,f))}catch(y){if(y!==c)throw y}return l}function B_(e,t,n=Hw.specifiedSDLRules){let r=[],i=new zw.SDLValidationContext(e,t,o=>{r.push(o)}),a=n.map(o=>o(i));return(0,TN.visit)(e,(0,TN.visitInParallel)(a)),r}function Y4(e){let t=B_(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` -`))}function SW(e,t){let n=g_(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(` +`))}function J4(e,t){let n=B_(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(` -`))}});var Rw=w(__=>{"use strict";m();T();N();Object.defineProperty(__,"__esModule",{value:!0});__.memoize3=OW;function OW(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 Fw=w(v_=>{"use strict";m();T();N();Object.defineProperty(v_,"__esModule",{value:!0});v_.promiseForObject=DW;function DW(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 Pw=w(S_=>{"use strict";m();T();N();Object.defineProperty(S_,"__esModule",{value:!0});S_.promiseReduce=AW;var bW=mm();function AW(e,t,n){let r=n;for(let i of e)r=(0,bW.isPromise)(r)?r.then(a=>t(a,i)):t(r,i);return r}});var ww=w(D_=>{"use strict";m();T();N();Object.defineProperty(D_,"__esModule",{value:!0});D_.toError=FW;var RW=Xt();function FW(e){return e instanceof Error?e:new O_(e)}var O_=class extends Error{constructor(t){super("Unexpected error value: "+(0,RW.inspect)(t)),this.name="NonErrorThrown",this.thrownValue=t}}});var fN=w(b_=>{"use strict";m();T();N();Object.defineProperty(b_,"__esModule",{value:!0});b_.locatedError=LW;var PW=ww(),wW=ze();function LW(e,t,n){var r;let i=(0,PW.toError)(e);return CW(i)?i:new wW.GraphQLError(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function CW(e){return Array.isArray(e.path)}});var cp=w(Li=>{"use strict";m();T();N();Object.defineProperty(Li,"__esModule",{value:!0});Li.assertValidExecutionArguments=qw;Li.buildExecutionContext=Vw;Li.buildResolveInfo=Kw;Li.defaultTypeResolver=Li.defaultFieldResolver=void 0;Li.execute=xw;Li.executeSync=VW;Li.getFieldDef=$w;var R_=Lr(),Zu=Xt(),BW=Ir(),UW=Jm(),w_=Sa(),ia=mm(),kW=Rw(),ec=ep(),Lw=Fw(),MW=Pw(),wi=ze(),NN=fN(),A_=Oa(),Cw=Pt(),iu=wt(),pl=Fi(),xW=Wd(),kw=cN(),Mw=cl(),qW=(0,kW.memoize3)((e,t,n)=>(0,kw.collectSubfields)(e.schema,e.fragments,e.variableValues,t,n));function xw(e){arguments.length<2||(0,R_.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;qw(t,n,r);let a=Vw(e);if(!("schema"in a))return{errors:a};try{let{operation:o}=a,c=jW(a,o,i);return(0,ia.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 VW(e){let t=xw(e);if((0,ia.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 qw(e,t,n){t||(0,R_.devAssert)(!1,"Must provide document."),(0,xW.assertValidSchema)(e),n==null||(0,w_.isObjectLike)(n)||(0,R_.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 Vw(e){var t,n;let{schema:r,document:i,rootValue:a,contextValue:o,variableValues:c,operationName:l,fieldResolver:d,typeResolver:f,subscribeFieldResolver:y}=e,I,v=Object.create(null);for(let K of i.definitions)switch(K.kind){case Cw.Kind.OPERATION_DEFINITION:if(l==null){if(I!==void 0)return[new wi.GraphQLError("Must provide operation name if query contains multiple operations.")];I=K}else((t=K.name)===null||t===void 0?void 0:t.value)===l&&(I=K);break;case Cw.Kind.FRAGMENT_DEFINITION:v[K.name.value]=K;break;default:}if(!I)return l!=null?[new wi.GraphQLError(`Unknown operation named "${l}".`)]:[new wi.GraphQLError("Must provide an operation.")];let P=(n=I.variableDefinitions)!==null&&n!==void 0?n:[],k=(0,Mw.getVariableValues)(r,P,c!=null?c:{},{maxErrors:50});return k.errors?k.errors:{schema:r,fragments:v,rootValue:a,contextValue:o,operation:I,variableValues:k.coerced,fieldResolver:d!=null?d:P_,typeResolver:f!=null?f:Gw,subscribeFieldResolver:y!=null?y:P_,errors:[]}}function jW(e,t,n){let r=e.schema.getRootType(t.operation);if(r==null)throw new wi.GraphQLError(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});let i=(0,kw.collectFields)(e.schema,e.fragments,e.variableValues,r,t.selectionSet),a=void 0;switch(t.operation){case A_.OperationTypeNode.QUERY:return TN(e,r,n,a,i);case A_.OperationTypeNode.MUTATION:return KW(e,r,n,a,i);case A_.OperationTypeNode.SUBSCRIPTION:return TN(e,r,n,a,i)}}function KW(e,t,n,r,i){return(0,MW.promiseReduce)(i.entries(),(a,[o,c])=>{let l=(0,ec.addPath)(r,o,t.name),d=jw(e,t,n,c,l);return d===void 0?a:(0,ia.isPromise)(d)?d.then(f=>(a[o]=f,a)):(a[o]=d,a)},Object.create(null))}function TN(e,t,n,r,i){let a=Object.create(null),o=!1;try{for(let[c,l]of i.entries()){let d=(0,ec.addPath)(r,c,t.name),f=jw(e,t,n,l,d);f!==void 0&&(a[c]=f,(0,ia.isPromise)(f)&&(o=!0))}}catch(c){if(o)return(0,Lw.promiseForObject)(a).finally(()=>{throw c});throw c}return o?(0,Lw.promiseForObject)(a):a}function jw(e,t,n,r,i){var a;let o=$w(e.schema,t,r[0]);if(!o)return;let c=o.type,l=(a=o.resolve)!==null&&a!==void 0?a:e.fieldResolver,d=Kw(e,o,r,t,i);try{let f=(0,Mw.getArgumentValues)(o,r[0],e.variableValues),y=e.contextValue,I=l(n,f,y,d),v;return(0,ia.isPromise)(I)?v=I.then(P=>up(e,c,r,d,i,P)):v=up(e,c,r,d,i,I),(0,ia.isPromise)(v)?v.then(void 0,P=>{let k=(0,NN.locatedError)(P,r,(0,ec.pathToArray)(i));return EN(k,c,e)}):v}catch(f){let y=(0,NN.locatedError)(f,r,(0,ec.pathToArray)(i));return EN(y,c,e)}}function Kw(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 EN(e,t,n){if((0,iu.isNonNullType)(t))throw e;return n.errors.push(e),null}function up(e,t,n,r,i,a){if(a instanceof Error)throw a;if((0,iu.isNonNullType)(t)){let o=up(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,iu.isListType)(t))return GW(e,t,n,r,i,a);if((0,iu.isLeafType)(t))return $W(t,a);if((0,iu.isAbstractType)(t))return QW(e,t,n,r,i,a);if((0,iu.isObjectType)(t))return F_(e,t,n,r,i,a);(0,BW.invariant)(!1,"Cannot complete value of unexpected output type: "+(0,Zu.inspect)(t))}function GW(e,t,n,r,i,a){if(!(0,UW.isIterableObject)(a))throw new wi.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,f)=>{let y=(0,ec.addPath)(i,f,void 0);try{let I;return(0,ia.isPromise)(d)?I=d.then(v=>up(e,o,n,r,y,v)):I=up(e,o,n,r,y,d),(0,ia.isPromise)(I)?(c=!0,I.then(void 0,v=>{let P=(0,NN.locatedError)(v,n,(0,ec.pathToArray)(y));return EN(P,o,e)})):I}catch(I){let v=(0,NN.locatedError)(I,n,(0,ec.pathToArray)(y));return EN(v,o,e)}});return c?Promise.all(l):l}function $W(e,t){let n=e.serialize(t);if(n==null)throw new Error(`Expected \`${(0,Zu.inspect)(e)}.serialize(${(0,Zu.inspect)(t)})\` to return non-nullable value, returned: ${(0,Zu.inspect)(n)}`);return n}function QW(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,ia.isPromise)(d)?d.then(f=>F_(e,Bw(f,e,t,n,r,a),n,r,i,a)):F_(e,Bw(d,e,t,n,r,a),n,r,i,a)}function Bw(e,t,n,r,i,a){if(e==null)throw new wi.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,iu.isObjectType)(e))throw new wi.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 wi.GraphQLError(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${(0,Zu.inspect)(a)}, received "${(0,Zu.inspect)(e)}".`);let o=t.schema.getType(e);if(o==null)throw new wi.GraphQLError(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!(0,iu.isObjectType)(o))throw new wi.GraphQLError(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new wi.GraphQLError(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function F_(e,t,n,r,i,a){let o=qW(e,t,n);if(t.isTypeOf){let c=t.isTypeOf(a,e.contextValue,r);if((0,ia.isPromise)(c))return c.then(l=>{if(!l)throw Uw(t,a,n);return TN(e,t,a,i,o)});if(!c)throw Uw(t,a,n)}return TN(e,t,a,i,o)}function Uw(e,t,n){return new wi.GraphQLError(`Expected value of type "${e.name}" but got: ${(0,Zu.inspect)(t)}.`,{nodes:n})}var Gw=function(e,t,n,r){if((0,w_.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(hN,"__esModule",{value:!0});hN.graphql=ZW;hN.graphqlSync=e8;var YW=Lr(),JW=mm(),HW=Zc(),zW=Wd(),WW=dl(),XW=cp();function ZW(e){return new Promise(t=>t(Qw(e)))}function e8(e){let t=Qw(e);if((0,JW.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function Qw(e){arguments.length<2||(0,YW.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,zW.validateSchema)(t);if(d.length>0)return{errors:d};let f;try{f=(0,HW.parse)(n)}catch(I){return{errors:[I]}}let y=(0,WW.validate)(t,f);return y.length>0?{errors:y}:(0,XW.execute)({schema:t,document:f,rootValue:r,contextValue:i,variableValues:a,operationName:o,fieldResolver:c,typeResolver:l})}});var zw=w(ye=>{"use strict";m();T();N();Object.defineProperty(ye,"__esModule",{value:!0});Object.defineProperty(ye,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return aa.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(ye,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return Ts.GRAPHQL_MAX_INT}});Object.defineProperty(ye,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return Ts.GRAPHQL_MIN_INT}});Object.defineProperty(ye,"GraphQLBoolean",{enumerable:!0,get:function(){return Ts.GraphQLBoolean}});Object.defineProperty(ye,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return aa.GraphQLDeprecatedDirective}});Object.defineProperty(ye,"GraphQLDirective",{enumerable:!0,get:function(){return aa.GraphQLDirective}});Object.defineProperty(ye,"GraphQLEnumType",{enumerable:!0,get:function(){return rt.GraphQLEnumType}});Object.defineProperty(ye,"GraphQLFloat",{enumerable:!0,get:function(){return Ts.GraphQLFloat}});Object.defineProperty(ye,"GraphQLID",{enumerable:!0,get:function(){return Ts.GraphQLID}});Object.defineProperty(ye,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return aa.GraphQLIncludeDirective}});Object.defineProperty(ye,"GraphQLInputObjectType",{enumerable:!0,get:function(){return rt.GraphQLInputObjectType}});Object.defineProperty(ye,"GraphQLInt",{enumerable:!0,get:function(){return Ts.GraphQLInt}});Object.defineProperty(ye,"GraphQLInterfaceType",{enumerable:!0,get:function(){return rt.GraphQLInterfaceType}});Object.defineProperty(ye,"GraphQLList",{enumerable:!0,get:function(){return rt.GraphQLList}});Object.defineProperty(ye,"GraphQLNonNull",{enumerable:!0,get:function(){return rt.GraphQLNonNull}});Object.defineProperty(ye,"GraphQLObjectType",{enumerable:!0,get:function(){return rt.GraphQLObjectType}});Object.defineProperty(ye,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return aa.GraphQLOneOfDirective}});Object.defineProperty(ye,"GraphQLScalarType",{enumerable:!0,get:function(){return rt.GraphQLScalarType}});Object.defineProperty(ye,"GraphQLSchema",{enumerable:!0,get:function(){return L_.GraphQLSchema}});Object.defineProperty(ye,"GraphQLSkipDirective",{enumerable:!0,get:function(){return aa.GraphQLSkipDirective}});Object.defineProperty(ye,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return aa.GraphQLSpecifiedByDirective}});Object.defineProperty(ye,"GraphQLString",{enumerable:!0,get:function(){return Ts.GraphQLString}});Object.defineProperty(ye,"GraphQLUnionType",{enumerable:!0,get:function(){return rt.GraphQLUnionType}});Object.defineProperty(ye,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return Yr.SchemaMetaFieldDef}});Object.defineProperty(ye,"TypeKind",{enumerable:!0,get:function(){return Yr.TypeKind}});Object.defineProperty(ye,"TypeMetaFieldDef",{enumerable:!0,get:function(){return Yr.TypeMetaFieldDef}});Object.defineProperty(ye,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return Yr.TypeNameMetaFieldDef}});Object.defineProperty(ye,"__Directive",{enumerable:!0,get:function(){return Yr.__Directive}});Object.defineProperty(ye,"__DirectiveLocation",{enumerable:!0,get:function(){return Yr.__DirectiveLocation}});Object.defineProperty(ye,"__EnumValue",{enumerable:!0,get:function(){return Yr.__EnumValue}});Object.defineProperty(ye,"__Field",{enumerable:!0,get:function(){return Yr.__Field}});Object.defineProperty(ye,"__InputValue",{enumerable:!0,get:function(){return Yr.__InputValue}});Object.defineProperty(ye,"__Schema",{enumerable:!0,get:function(){return Yr.__Schema}});Object.defineProperty(ye,"__Type",{enumerable:!0,get:function(){return Yr.__Type}});Object.defineProperty(ye,"__TypeKind",{enumerable:!0,get:function(){return Yr.__TypeKind}});Object.defineProperty(ye,"assertAbstractType",{enumerable:!0,get:function(){return rt.assertAbstractType}});Object.defineProperty(ye,"assertCompositeType",{enumerable:!0,get:function(){return rt.assertCompositeType}});Object.defineProperty(ye,"assertDirective",{enumerable:!0,get:function(){return aa.assertDirective}});Object.defineProperty(ye,"assertEnumType",{enumerable:!0,get:function(){return rt.assertEnumType}});Object.defineProperty(ye,"assertEnumValueName",{enumerable:!0,get:function(){return Hw.assertEnumValueName}});Object.defineProperty(ye,"assertInputObjectType",{enumerable:!0,get:function(){return rt.assertInputObjectType}});Object.defineProperty(ye,"assertInputType",{enumerable:!0,get:function(){return rt.assertInputType}});Object.defineProperty(ye,"assertInterfaceType",{enumerable:!0,get:function(){return rt.assertInterfaceType}});Object.defineProperty(ye,"assertLeafType",{enumerable:!0,get:function(){return rt.assertLeafType}});Object.defineProperty(ye,"assertListType",{enumerable:!0,get:function(){return rt.assertListType}});Object.defineProperty(ye,"assertName",{enumerable:!0,get:function(){return Hw.assertName}});Object.defineProperty(ye,"assertNamedType",{enumerable:!0,get:function(){return rt.assertNamedType}});Object.defineProperty(ye,"assertNonNullType",{enumerable:!0,get:function(){return rt.assertNonNullType}});Object.defineProperty(ye,"assertNullableType",{enumerable:!0,get:function(){return rt.assertNullableType}});Object.defineProperty(ye,"assertObjectType",{enumerable:!0,get:function(){return rt.assertObjectType}});Object.defineProperty(ye,"assertOutputType",{enumerable:!0,get:function(){return rt.assertOutputType}});Object.defineProperty(ye,"assertScalarType",{enumerable:!0,get:function(){return rt.assertScalarType}});Object.defineProperty(ye,"assertSchema",{enumerable:!0,get:function(){return L_.assertSchema}});Object.defineProperty(ye,"assertType",{enumerable:!0,get:function(){return rt.assertType}});Object.defineProperty(ye,"assertUnionType",{enumerable:!0,get:function(){return rt.assertUnionType}});Object.defineProperty(ye,"assertValidSchema",{enumerable:!0,get:function(){return Jw.assertValidSchema}});Object.defineProperty(ye,"assertWrappingType",{enumerable:!0,get:function(){return rt.assertWrappingType}});Object.defineProperty(ye,"getNamedType",{enumerable:!0,get:function(){return rt.getNamedType}});Object.defineProperty(ye,"getNullableType",{enumerable:!0,get:function(){return rt.getNullableType}});Object.defineProperty(ye,"introspectionTypes",{enumerable:!0,get:function(){return Yr.introspectionTypes}});Object.defineProperty(ye,"isAbstractType",{enumerable:!0,get:function(){return rt.isAbstractType}});Object.defineProperty(ye,"isCompositeType",{enumerable:!0,get:function(){return rt.isCompositeType}});Object.defineProperty(ye,"isDirective",{enumerable:!0,get:function(){return aa.isDirective}});Object.defineProperty(ye,"isEnumType",{enumerable:!0,get:function(){return rt.isEnumType}});Object.defineProperty(ye,"isInputObjectType",{enumerable:!0,get:function(){return rt.isInputObjectType}});Object.defineProperty(ye,"isInputType",{enumerable:!0,get:function(){return rt.isInputType}});Object.defineProperty(ye,"isInterfaceType",{enumerable:!0,get:function(){return rt.isInterfaceType}});Object.defineProperty(ye,"isIntrospectionType",{enumerable:!0,get:function(){return Yr.isIntrospectionType}});Object.defineProperty(ye,"isLeafType",{enumerable:!0,get:function(){return rt.isLeafType}});Object.defineProperty(ye,"isListType",{enumerable:!0,get:function(){return rt.isListType}});Object.defineProperty(ye,"isNamedType",{enumerable:!0,get:function(){return rt.isNamedType}});Object.defineProperty(ye,"isNonNullType",{enumerable:!0,get:function(){return rt.isNonNullType}});Object.defineProperty(ye,"isNullableType",{enumerable:!0,get:function(){return rt.isNullableType}});Object.defineProperty(ye,"isObjectType",{enumerable:!0,get:function(){return rt.isObjectType}});Object.defineProperty(ye,"isOutputType",{enumerable:!0,get:function(){return rt.isOutputType}});Object.defineProperty(ye,"isRequiredArgument",{enumerable:!0,get:function(){return rt.isRequiredArgument}});Object.defineProperty(ye,"isRequiredInputField",{enumerable:!0,get:function(){return rt.isRequiredInputField}});Object.defineProperty(ye,"isScalarType",{enumerable:!0,get:function(){return rt.isScalarType}});Object.defineProperty(ye,"isSchema",{enumerable:!0,get:function(){return L_.isSchema}});Object.defineProperty(ye,"isSpecifiedDirective",{enumerable:!0,get:function(){return aa.isSpecifiedDirective}});Object.defineProperty(ye,"isSpecifiedScalarType",{enumerable:!0,get:function(){return Ts.isSpecifiedScalarType}});Object.defineProperty(ye,"isType",{enumerable:!0,get:function(){return rt.isType}});Object.defineProperty(ye,"isUnionType",{enumerable:!0,get:function(){return rt.isUnionType}});Object.defineProperty(ye,"isWrappingType",{enumerable:!0,get:function(){return rt.isWrappingType}});Object.defineProperty(ye,"resolveObjMapThunk",{enumerable:!0,get:function(){return rt.resolveObjMapThunk}});Object.defineProperty(ye,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return rt.resolveReadonlyArrayThunk}});Object.defineProperty(ye,"specifiedDirectives",{enumerable:!0,get:function(){return aa.specifiedDirectives}});Object.defineProperty(ye,"specifiedScalarTypes",{enumerable:!0,get:function(){return Ts.specifiedScalarTypes}});Object.defineProperty(ye,"validateSchema",{enumerable:!0,get:function(){return Jw.validateSchema}});var L_=Ju(),rt=wt(),aa=$r(),Ts=Aa(),Yr=Fi(),Jw=Wd(),Hw=Ud()});var Xw=w(kt=>{"use strict";m();T();N();Object.defineProperty(kt,"__esModule",{value:!0});Object.defineProperty(kt,"BREAK",{enumerable:!0,get:function(){return lp.BREAK}});Object.defineProperty(kt,"DirectiveLocation",{enumerable:!0,get:function(){return o8.DirectiveLocation}});Object.defineProperty(kt,"Kind",{enumerable:!0,get:function(){return r8.Kind}});Object.defineProperty(kt,"Lexer",{enumerable:!0,get:function(){return a8.Lexer}});Object.defineProperty(kt,"Location",{enumerable:!0,get:function(){return C_.Location}});Object.defineProperty(kt,"OperationTypeNode",{enumerable:!0,get:function(){return C_.OperationTypeNode}});Object.defineProperty(kt,"Source",{enumerable:!0,get:function(){return t8.Source}});Object.defineProperty(kt,"Token",{enumerable:!0,get:function(){return C_.Token}});Object.defineProperty(kt,"TokenKind",{enumerable:!0,get:function(){return i8.TokenKind}});Object.defineProperty(kt,"getEnterLeaveForKind",{enumerable:!0,get:function(){return lp.getEnterLeaveForKind}});Object.defineProperty(kt,"getLocation",{enumerable:!0,get:function(){return n8.getLocation}});Object.defineProperty(kt,"getVisitFn",{enumerable:!0,get:function(){return lp.getVisitFn}});Object.defineProperty(kt,"isConstValueNode",{enumerable:!0,get:function(){return wa.isConstValueNode}});Object.defineProperty(kt,"isDefinitionNode",{enumerable:!0,get:function(){return wa.isDefinitionNode}});Object.defineProperty(kt,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return wa.isExecutableDefinitionNode}});Object.defineProperty(kt,"isSelectionNode",{enumerable:!0,get:function(){return wa.isSelectionNode}});Object.defineProperty(kt,"isTypeDefinitionNode",{enumerable:!0,get:function(){return wa.isTypeDefinitionNode}});Object.defineProperty(kt,"isTypeExtensionNode",{enumerable:!0,get:function(){return wa.isTypeExtensionNode}});Object.defineProperty(kt,"isTypeNode",{enumerable:!0,get:function(){return wa.isTypeNode}});Object.defineProperty(kt,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return wa.isTypeSystemDefinitionNode}});Object.defineProperty(kt,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return wa.isTypeSystemExtensionNode}});Object.defineProperty(kt,"isValueNode",{enumerable:!0,get:function(){return wa.isValueNode}});Object.defineProperty(kt,"parse",{enumerable:!0,get:function(){return yN.parse}});Object.defineProperty(kt,"parseConstValue",{enumerable:!0,get:function(){return yN.parseConstValue}});Object.defineProperty(kt,"parseType",{enumerable:!0,get:function(){return yN.parseType}});Object.defineProperty(kt,"parseValue",{enumerable:!0,get:function(){return yN.parseValue}});Object.defineProperty(kt,"print",{enumerable:!0,get:function(){return s8.print}});Object.defineProperty(kt,"printLocation",{enumerable:!0,get:function(){return Ww.printLocation}});Object.defineProperty(kt,"printSourceLocation",{enumerable:!0,get:function(){return Ww.printSourceLocation}});Object.defineProperty(kt,"visit",{enumerable:!0,get:function(){return lp.visit}});Object.defineProperty(kt,"visitInParallel",{enumerable:!0,get:function(){return lp.visitInParallel}});var t8=Sm(),n8=Nm(),Ww=Fy(),r8=Pt(),i8=Ad(),a8=Im(),yN=Zc(),s8=ci(),lp=ju(),C_=Oa(),wa=zu(),o8=Wc()});var Zw=w(B_=>{"use strict";m();T();N();Object.defineProperty(B_,"__esModule",{value:!0});B_.isAsyncIterable=u8;function u8(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}});var eL=w(U_=>{"use strict";m();T();N();Object.defineProperty(U_,"__esModule",{value:!0});U_.mapAsyncIterator=c8;function c8(e,t){let n=e[Symbol.asyncIterator]();function r(a){return Oi(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 Oi(this,null,function*(){return r(yield n.next())})},return(){return Oi(this,null,function*(){return typeof n.return=="function"?r(yield n.return()):{value:void 0,done:!0}})},throw(a){return Oi(this,null,function*(){if(typeof n.throw=="function")return r(yield n.throw(a));throw a})},[Symbol.asyncIterator](){return this}}}});var iL=w(IN=>{"use strict";m();T();N();Object.defineProperty(IN,"__esModule",{value:!0});IN.createSourceEventStream=rL;IN.subscribe=T8;var l8=Lr(),d8=Xt(),nL=Zw(),tL=ep(),k_=ze(),p8=fN(),f8=cN(),dp=cp(),m8=eL(),N8=cl();function T8(t){return Oi(this,arguments,function*(e){arguments.length<2||(0,l8.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let n=yield rL(e);if(!(0,nL.isAsyncIterable)(n))return n;let r=i=>(0,dp.execute)(Y(x({},e),{rootValue:i}));return(0,m8.mapAsyncIterator)(n,r)})}function E8(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 rL(...e){return Oi(this,null,function*(){let t=E8(e),{schema:n,document:r,variableValues:i}=t;(0,dp.assertValidExecutionArguments)(n,r,i);let a=(0,dp.buildExecutionContext)(t);if(!("schema"in a))return{errors:a};try{let o=yield h8(a);if(!(0,nL.isAsyncIterable)(o))throw new Error(`Subscription field must return Async Iterable. Received: ${(0,d8.inspect)(o)}.`);return o}catch(o){if(o instanceof k_.GraphQLError)return{errors:[o]};throw o}})}function h8(e){return Oi(this,null,function*(){let{schema:t,fragments:n,operation:r,variableValues:i,rootValue:a}=e,o=t.getSubscriptionType();if(o==null)throw new k_.GraphQLError("Schema is not configured to execute subscription operation.",{nodes:r});let c=(0,f8.collectFields)(t,n,i,o,r.selectionSet),[l,d]=[...c.entries()][0],f=(0,dp.getFieldDef)(t,o,d[0]);if(!f){let P=d[0].name.value;throw new k_.GraphQLError(`The subscription field "${P}" is not defined.`,{nodes:d})}let y=(0,tL.addPath)(void 0,l,o.name),I=(0,dp.buildResolveInfo)(e,f,d,o,y);try{var v;let P=(0,N8.getArgumentValues)(f,d[0],i),k=e.contextValue,Q=yield((v=f.subscribe)!==null&&v!==void 0?v:e.subscribeFieldResolver)(a,P,k,I);if(Q instanceof Error)throw Q;return Q}catch(P){throw(0,p8.locatedError)(P,d,(0,tL.pathToArray)(y))}})}});var sL=w(Ci=>{"use strict";m();T();N();Object.defineProperty(Ci,"__esModule",{value:!0});Object.defineProperty(Ci,"createSourceEventStream",{enumerable:!0,get:function(){return aL.createSourceEventStream}});Object.defineProperty(Ci,"defaultFieldResolver",{enumerable:!0,get:function(){return gN.defaultFieldResolver}});Object.defineProperty(Ci,"defaultTypeResolver",{enumerable:!0,get:function(){return gN.defaultTypeResolver}});Object.defineProperty(Ci,"execute",{enumerable:!0,get:function(){return gN.execute}});Object.defineProperty(Ci,"executeSync",{enumerable:!0,get:function(){return gN.executeSync}});Object.defineProperty(Ci,"getArgumentValues",{enumerable:!0,get:function(){return M_.getArgumentValues}});Object.defineProperty(Ci,"getDirectiveValues",{enumerable:!0,get:function(){return M_.getDirectiveValues}});Object.defineProperty(Ci,"getVariableValues",{enumerable:!0,get:function(){return M_.getVariableValues}});Object.defineProperty(Ci,"responsePathAsArray",{enumerable:!0,get:function(){return y8.pathToArray}});Object.defineProperty(Ci,"subscribe",{enumerable:!0,get:function(){return aL.subscribe}});var y8=ep(),gN=cp(),aL=iL(),M_=cl()});var oL=w(V_=>{"use strict";m();T();N();Object.defineProperty(V_,"__esModule",{value:!0});V_.NoDeprecatedCustomRule=I8;var x_=Ir(),pp=ze(),q_=wt();function I8(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,x_.invariant)(!1),e.reportError(new pp.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 pp.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,x_.invariant)(!1),e.reportError(new pp.GraphQLError(`Field "${a.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){let n=(0,q_.getNamedType)(e.getParentInputType());if((0,q_.isInputObjectType)(n)){let r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new pp.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,q_.getNamedType)(e.getInputType());i!=null||(0,x_.invariant)(!1),e.reportError(new pp.GraphQLError(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}});var uL=w(j_=>{"use strict";m();T();N();Object.defineProperty(j_,"__esModule",{value:!0});j_.NoSchemaIntrospectionCustomRule=S8;var g8=ze(),_8=wt(),v8=Fi();function S8(e){return{Field(t){let n=(0,_8.getNamedType)(e.getType());n&&(0,v8.isIntrospectionType)(n)&&e.reportError(new g8.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}});var lL=w(dt=>{"use strict";m();T();N();Object.defineProperty(dt,"__esModule",{value:!0});Object.defineProperty(dt,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return b8.ExecutableDefinitionsRule}});Object.defineProperty(dt,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return A8.FieldsOnCorrectTypeRule}});Object.defineProperty(dt,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return R8.FragmentsOnCompositeTypesRule}});Object.defineProperty(dt,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return F8.KnownArgumentNamesRule}});Object.defineProperty(dt,"KnownDirectivesRule",{enumerable:!0,get:function(){return P8.KnownDirectivesRule}});Object.defineProperty(dt,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return w8.KnownFragmentNamesRule}});Object.defineProperty(dt,"KnownTypeNamesRule",{enumerable:!0,get:function(){return L8.KnownTypeNamesRule}});Object.defineProperty(dt,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return C8.LoneAnonymousOperationRule}});Object.defineProperty(dt,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return e5.LoneSchemaDefinitionRule}});Object.defineProperty(dt,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return Z8.MaxIntrospectionDepthRule}});Object.defineProperty(dt,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return u5.NoDeprecatedCustomRule}});Object.defineProperty(dt,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return B8.NoFragmentCyclesRule}});Object.defineProperty(dt,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return c5.NoSchemaIntrospectionCustomRule}});Object.defineProperty(dt,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return U8.NoUndefinedVariablesRule}});Object.defineProperty(dt,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return k8.NoUnusedFragmentsRule}});Object.defineProperty(dt,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return M8.NoUnusedVariablesRule}});Object.defineProperty(dt,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return x8.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(dt,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return q8.PossibleFragmentSpreadsRule}});Object.defineProperty(dt,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return o5.PossibleTypeExtensionsRule}});Object.defineProperty(dt,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return V8.ProvidedRequiredArgumentsRule}});Object.defineProperty(dt,"ScalarLeafsRule",{enumerable:!0,get:function(){return j8.ScalarLeafsRule}});Object.defineProperty(dt,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return K8.SingleFieldSubscriptionsRule}});Object.defineProperty(dt,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return a5.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(dt,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return G8.UniqueArgumentNamesRule}});Object.defineProperty(dt,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return s5.UniqueDirectiveNamesRule}});Object.defineProperty(dt,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return $8.UniqueDirectivesPerLocationRule}});Object.defineProperty(dt,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return r5.UniqueEnumValueNamesRule}});Object.defineProperty(dt,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return i5.UniqueFieldDefinitionNamesRule}});Object.defineProperty(dt,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return Q8.UniqueFragmentNamesRule}});Object.defineProperty(dt,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return Y8.UniqueInputFieldNamesRule}});Object.defineProperty(dt,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return J8.UniqueOperationNamesRule}});Object.defineProperty(dt,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return t5.UniqueOperationTypesRule}});Object.defineProperty(dt,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return n5.UniqueTypeNamesRule}});Object.defineProperty(dt,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return H8.UniqueVariableNamesRule}});Object.defineProperty(dt,"ValidationContext",{enumerable:!0,get:function(){return D8.ValidationContext}});Object.defineProperty(dt,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return z8.ValuesOfCorrectTypeRule}});Object.defineProperty(dt,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return W8.VariablesAreInputTypesRule}});Object.defineProperty(dt,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return X8.VariablesInAllowedPositionRule}});Object.defineProperty(dt,"recommendedRules",{enumerable:!0,get:function(){return cL.recommendedRules}});Object.defineProperty(dt,"specifiedRules",{enumerable:!0,get:function(){return cL.specifiedRules}});Object.defineProperty(dt,"validate",{enumerable:!0,get:function(){return O8.validate}});var O8=dl(),D8=I_(),cL=E_(),b8=CI(),A8=UI(),R8=MI(),F8=xI(),P8=KI(),w8=$I(),L8=JI(),C8=zI(),B8=ng(),U8=ig(),k8=sg(),M8=ug(),x8=hg(),q8=gg(),V8=Og(),j8=bg(),K8=Ug(),G8=Vg(),$8=Qg(),Q8=Zg(),Y8=t_(),J8=r_(),H8=c_(),z8=p_(),W8=m_(),X8=T_(),Z8=eg(),e5=XI(),t5=a_(),n5=o_(),r5=Jg(),i5=Wg(),a5=xg(),s5=Kg(),o5=vg(),u5=oL(),c5=uL()});var dL=w(tc=>{"use strict";m();T();N();Object.defineProperty(tc,"__esModule",{value:!0});Object.defineProperty(tc,"GraphQLError",{enumerable:!0,get:function(){return K_.GraphQLError}});Object.defineProperty(tc,"formatError",{enumerable:!0,get:function(){return K_.formatError}});Object.defineProperty(tc,"locatedError",{enumerable:!0,get:function(){return d5.locatedError}});Object.defineProperty(tc,"printError",{enumerable:!0,get:function(){return K_.printError}});Object.defineProperty(tc,"syntaxError",{enumerable:!0,get:function(){return l5.syntaxError}});var K_=ze(),l5=Em(),d5=fN()});var $_=w(G_=>{"use strict";m();T();N();Object.defineProperty(G_,"__esModule",{value:!0});G_.getIntrospectionQuery=p5;function p5(e){let t=x({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 Ww=w(U_=>{"use strict";m();T();N();Object.defineProperty(U_,"__esModule",{value:!0});U_.memoize3=H4;function H4(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 Xw=w(k_=>{"use strict";m();T();N();Object.defineProperty(k_,"__esModule",{value:!0});k_.promiseForObject=z4;function z4(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 Zw=w(M_=>{"use strict";m();T();N();Object.defineProperty(M_,"__esModule",{value:!0});M_.promiseReduce=X4;var W4=hm();function X4(e,t,n){let r=n;for(let i of e)r=(0,W4.isPromise)(r)?r.then(a=>t(a,i)):t(r,i);return r}});var eL=w(q_=>{"use strict";m();T();N();Object.defineProperty(q_,"__esModule",{value:!0});q_.toError=e8;var Z4=Xt();function e8(e){return e instanceof Error?e:new x_(e)}var x_=class extends Error{constructor(t){super("Unexpected error value: "+(0,Z4.inspect)(t)),this.name="NonErrorThrown",this.thrownValue=t}}});var EN=w(V_=>{"use strict";m();T();N();Object.defineProperty(V_,"__esModule",{value:!0});V_.locatedError=r8;var t8=eL(),n8=ze();function r8(e,t,n){var r;let i=(0,t8.toError)(e);return i8(i)?i:new n8.GraphQLError(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function i8(e){return Array.isArray(e.path)}});var fp=w(Ci=>{"use strict";m();T();N();Object.defineProperty(Ci,"__esModule",{value:!0});Ci.assertValidExecutionArguments=uL;Ci.buildExecutionContext=cL;Ci.buildResolveInfo=dL;Ci.defaultTypeResolver=Ci.defaultFieldResolver=void 0;Ci.execute=oL;Ci.executeSync=d8;Ci.getFieldDef=fL;var K_=Br(),rc=Xt(),a8=Ir(),s8=Xm(),Q_=Da(),sa=hm(),o8=Ww(),ic=ip(),tL=Xw(),u8=Zw(),Li=ze(),yN=EN(),j_=ba(),nL=Ft(),uu=wt(),Tl=Fi(),c8=tp(),aL=fN(),sL=fl(),l8=(0,o8.memoize3)((e,t,n)=>(0,aL.collectSubfields)(e.schema,e.fragments,e.variableValues,t,n));function oL(e){arguments.length<2||(0,K_.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;uL(t,n,r);let a=cL(e);if(!("schema"in a))return{errors:a};try{let{operation:o}=a,c=p8(a,o,i);return(0,sa.isPromise)(c)?c.then(l=>hN(l,a.errors),l=>(a.errors.push(l),hN(null,a.errors))):hN(c,a.errors)}catch(o){return a.errors.push(o),hN(null,a.errors)}}function d8(e){let t=oL(e);if((0,sa.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function hN(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function uL(e,t,n){t||(0,K_.devAssert)(!1,"Must provide document."),(0,c8.assertValidSchema)(e),n==null||(0,Q_.isObjectLike)(n)||(0,K_.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 cL(e){var t,n;let{schema:r,document:i,rootValue:a,contextValue:o,variableValues:c,operationName:l,fieldResolver:d,typeResolver:f,subscribeFieldResolver:y}=e,I,v=Object.create(null);for(let K of i.definitions)switch(K.kind){case nL.Kind.OPERATION_DEFINITION:if(l==null){if(I!==void 0)return[new Li.GraphQLError("Must provide operation name if query contains multiple operations.")];I=K}else((t=K.name)===null||t===void 0?void 0:t.value)===l&&(I=K);break;case nL.Kind.FRAGMENT_DEFINITION:v[K.name.value]=K;break;default:}if(!I)return l!=null?[new Li.GraphQLError(`Unknown operation named "${l}".`)]:[new Li.GraphQLError("Must provide an operation.")];let F=(n=I.variableDefinitions)!==null&&n!==void 0?n:[],k=(0,sL.getVariableValues)(r,F,c!=null?c:{},{maxErrors:50});return k.errors?k.errors:{schema:r,fragments:v,rootValue:a,contextValue:o,operation:I,variableValues:k.coerced,fieldResolver:d!=null?d:$_,typeResolver:f!=null?f:pL,subscribeFieldResolver:y!=null?y:$_,errors:[]}}function p8(e,t,n){let r=e.schema.getRootType(t.operation);if(r==null)throw new Li.GraphQLError(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});let i=(0,aL.collectFields)(e.schema,e.fragments,e.variableValues,r,t.selectionSet),a=void 0;switch(t.operation){case j_.OperationTypeNode.QUERY:return IN(e,r,n,a,i);case j_.OperationTypeNode.MUTATION:return f8(e,r,n,a,i);case j_.OperationTypeNode.SUBSCRIPTION:return IN(e,r,n,a,i)}}function f8(e,t,n,r,i){return(0,u8.promiseReduce)(i.entries(),(a,[o,c])=>{let l=(0,ic.addPath)(r,o,t.name),d=lL(e,t,n,c,l);return d===void 0?a:(0,sa.isPromise)(d)?d.then(f=>(a[o]=f,a)):(a[o]=d,a)},Object.create(null))}function IN(e,t,n,r,i){let a=Object.create(null),o=!1;try{for(let[c,l]of i.entries()){let d=(0,ic.addPath)(r,c,t.name),f=lL(e,t,n,l,d);f!==void 0&&(a[c]=f,(0,sa.isPromise)(f)&&(o=!0))}}catch(c){if(o)return(0,tL.promiseForObject)(a).finally(()=>{throw c});throw c}return o?(0,tL.promiseForObject)(a):a}function lL(e,t,n,r,i){var a;let o=fL(e.schema,t,r[0]);if(!o)return;let c=o.type,l=(a=o.resolve)!==null&&a!==void 0?a:e.fieldResolver,d=dL(e,o,r,t,i);try{let f=(0,sL.getArgumentValues)(o,r[0],e.variableValues),y=e.contextValue,I=l(n,f,y,d),v;return(0,sa.isPromise)(I)?v=I.then(F=>pp(e,c,r,d,i,F)):v=pp(e,c,r,d,i,I),(0,sa.isPromise)(v)?v.then(void 0,F=>{let k=(0,yN.locatedError)(F,r,(0,ic.pathToArray)(i));return gN(k,c,e)}):v}catch(f){let y=(0,yN.locatedError)(f,r,(0,ic.pathToArray)(i));return gN(y,c,e)}}function dL(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 gN(e,t,n){if((0,uu.isNonNullType)(t))throw e;return n.errors.push(e),null}function pp(e,t,n,r,i,a){if(a instanceof Error)throw a;if((0,uu.isNonNullType)(t)){let o=pp(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,uu.isListType)(t))return m8(e,t,n,r,i,a);if((0,uu.isLeafType)(t))return N8(t,a);if((0,uu.isAbstractType)(t))return T8(e,t,n,r,i,a);if((0,uu.isObjectType)(t))return G_(e,t,n,r,i,a);(0,a8.invariant)(!1,"Cannot complete value of unexpected output type: "+(0,rc.inspect)(t))}function m8(e,t,n,r,i,a){if(!(0,s8.isIterableObject)(a))throw new Li.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,f)=>{let y=(0,ic.addPath)(i,f,void 0);try{let I;return(0,sa.isPromise)(d)?I=d.then(v=>pp(e,o,n,r,y,v)):I=pp(e,o,n,r,y,d),(0,sa.isPromise)(I)?(c=!0,I.then(void 0,v=>{let F=(0,yN.locatedError)(v,n,(0,ic.pathToArray)(y));return gN(F,o,e)})):I}catch(I){let v=(0,yN.locatedError)(I,n,(0,ic.pathToArray)(y));return gN(v,o,e)}});return c?Promise.all(l):l}function N8(e,t){let n=e.serialize(t);if(n==null)throw new Error(`Expected \`${(0,rc.inspect)(e)}.serialize(${(0,rc.inspect)(t)})\` to return non-nullable value, returned: ${(0,rc.inspect)(n)}`);return n}function T8(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,sa.isPromise)(d)?d.then(f=>G_(e,rL(f,e,t,n,r,a),n,r,i,a)):G_(e,rL(d,e,t,n,r,a),n,r,i,a)}function rL(e,t,n,r,i,a){if(e==null)throw new Li.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,uu.isObjectType)(e))throw new Li.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 Li.GraphQLError(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${(0,rc.inspect)(a)}, received "${(0,rc.inspect)(e)}".`);let o=t.schema.getType(e);if(o==null)throw new Li.GraphQLError(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!(0,uu.isObjectType)(o))throw new Li.GraphQLError(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new Li.GraphQLError(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function G_(e,t,n,r,i,a){let o=l8(e,t,n);if(t.isTypeOf){let c=t.isTypeOf(a,e.contextValue,r);if((0,sa.isPromise)(c))return c.then(l=>{if(!l)throw iL(t,a,n);return IN(e,t,a,i,o)});if(!c)throw iL(t,a,n)}return IN(e,t,a,i,o)}function iL(e,t,n){return new Li.GraphQLError(`Expected value of type "${e.name}" but got: ${(0,rc.inspect)(t)}.`,{nodes:n})}var pL=function(e,t,n,r){if((0,Q_.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(_N,"__esModule",{value:!0});_N.graphql=v8;_N.graphqlSync=S8;var E8=Br(),h8=hm(),y8=rl(),I8=tp(),g8=Nl(),_8=fp();function v8(e){return new Promise(t=>t(mL(e)))}function S8(e){let t=mL(e);if((0,h8.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function mL(e){arguments.length<2||(0,E8.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,I8.validateSchema)(t);if(d.length>0)return{errors:d};let f;try{f=(0,y8.parse)(n)}catch(I){return{errors:[I]}}let y=(0,g8.validate)(t,f);return y.length>0?{errors:y}:(0,_8.execute)({schema:t,document:f,rootValue:r,contextValue:i,variableValues:a,operationName:o,fieldResolver:c,typeResolver:l})}});var hL=w(ye=>{"use strict";m();T();N();Object.defineProperty(ye,"__esModule",{value:!0});Object.defineProperty(ye,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return oa.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(ye,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return gs.GRAPHQL_MAX_INT}});Object.defineProperty(ye,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return gs.GRAPHQL_MIN_INT}});Object.defineProperty(ye,"GraphQLBoolean",{enumerable:!0,get:function(){return gs.GraphQLBoolean}});Object.defineProperty(ye,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return oa.GraphQLDeprecatedDirective}});Object.defineProperty(ye,"GraphQLDirective",{enumerable:!0,get:function(){return oa.GraphQLDirective}});Object.defineProperty(ye,"GraphQLEnumType",{enumerable:!0,get:function(){return rt.GraphQLEnumType}});Object.defineProperty(ye,"GraphQLFloat",{enumerable:!0,get:function(){return gs.GraphQLFloat}});Object.defineProperty(ye,"GraphQLID",{enumerable:!0,get:function(){return gs.GraphQLID}});Object.defineProperty(ye,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return oa.GraphQLIncludeDirective}});Object.defineProperty(ye,"GraphQLInputObjectType",{enumerable:!0,get:function(){return rt.GraphQLInputObjectType}});Object.defineProperty(ye,"GraphQLInt",{enumerable:!0,get:function(){return gs.GraphQLInt}});Object.defineProperty(ye,"GraphQLInterfaceType",{enumerable:!0,get:function(){return rt.GraphQLInterfaceType}});Object.defineProperty(ye,"GraphQLList",{enumerable:!0,get:function(){return rt.GraphQLList}});Object.defineProperty(ye,"GraphQLNonNull",{enumerable:!0,get:function(){return rt.GraphQLNonNull}});Object.defineProperty(ye,"GraphQLObjectType",{enumerable:!0,get:function(){return rt.GraphQLObjectType}});Object.defineProperty(ye,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return oa.GraphQLOneOfDirective}});Object.defineProperty(ye,"GraphQLScalarType",{enumerable:!0,get:function(){return rt.GraphQLScalarType}});Object.defineProperty(ye,"GraphQLSchema",{enumerable:!0,get:function(){return Y_.GraphQLSchema}});Object.defineProperty(ye,"GraphQLSkipDirective",{enumerable:!0,get:function(){return oa.GraphQLSkipDirective}});Object.defineProperty(ye,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return oa.GraphQLSpecifiedByDirective}});Object.defineProperty(ye,"GraphQLString",{enumerable:!0,get:function(){return gs.GraphQLString}});Object.defineProperty(ye,"GraphQLUnionType",{enumerable:!0,get:function(){return rt.GraphQLUnionType}});Object.defineProperty(ye,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return Jr.SchemaMetaFieldDef}});Object.defineProperty(ye,"TypeKind",{enumerable:!0,get:function(){return Jr.TypeKind}});Object.defineProperty(ye,"TypeMetaFieldDef",{enumerable:!0,get:function(){return Jr.TypeMetaFieldDef}});Object.defineProperty(ye,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return Jr.TypeNameMetaFieldDef}});Object.defineProperty(ye,"__Directive",{enumerable:!0,get:function(){return Jr.__Directive}});Object.defineProperty(ye,"__DirectiveLocation",{enumerable:!0,get:function(){return Jr.__DirectiveLocation}});Object.defineProperty(ye,"__EnumValue",{enumerable:!0,get:function(){return Jr.__EnumValue}});Object.defineProperty(ye,"__Field",{enumerable:!0,get:function(){return Jr.__Field}});Object.defineProperty(ye,"__InputValue",{enumerable:!0,get:function(){return Jr.__InputValue}});Object.defineProperty(ye,"__Schema",{enumerable:!0,get:function(){return Jr.__Schema}});Object.defineProperty(ye,"__Type",{enumerable:!0,get:function(){return Jr.__Type}});Object.defineProperty(ye,"__TypeKind",{enumerable:!0,get:function(){return Jr.__TypeKind}});Object.defineProperty(ye,"assertAbstractType",{enumerable:!0,get:function(){return rt.assertAbstractType}});Object.defineProperty(ye,"assertCompositeType",{enumerable:!0,get:function(){return rt.assertCompositeType}});Object.defineProperty(ye,"assertDirective",{enumerable:!0,get:function(){return oa.assertDirective}});Object.defineProperty(ye,"assertEnumType",{enumerable:!0,get:function(){return rt.assertEnumType}});Object.defineProperty(ye,"assertEnumValueName",{enumerable:!0,get:function(){return EL.assertEnumValueName}});Object.defineProperty(ye,"assertInputObjectType",{enumerable:!0,get:function(){return rt.assertInputObjectType}});Object.defineProperty(ye,"assertInputType",{enumerable:!0,get:function(){return rt.assertInputType}});Object.defineProperty(ye,"assertInterfaceType",{enumerable:!0,get:function(){return rt.assertInterfaceType}});Object.defineProperty(ye,"assertLeafType",{enumerable:!0,get:function(){return rt.assertLeafType}});Object.defineProperty(ye,"assertListType",{enumerable:!0,get:function(){return rt.assertListType}});Object.defineProperty(ye,"assertName",{enumerable:!0,get:function(){return EL.assertName}});Object.defineProperty(ye,"assertNamedType",{enumerable:!0,get:function(){return rt.assertNamedType}});Object.defineProperty(ye,"assertNonNullType",{enumerable:!0,get:function(){return rt.assertNonNullType}});Object.defineProperty(ye,"assertNullableType",{enumerable:!0,get:function(){return rt.assertNullableType}});Object.defineProperty(ye,"assertObjectType",{enumerable:!0,get:function(){return rt.assertObjectType}});Object.defineProperty(ye,"assertOutputType",{enumerable:!0,get:function(){return rt.assertOutputType}});Object.defineProperty(ye,"assertScalarType",{enumerable:!0,get:function(){return rt.assertScalarType}});Object.defineProperty(ye,"assertSchema",{enumerable:!0,get:function(){return Y_.assertSchema}});Object.defineProperty(ye,"assertType",{enumerable:!0,get:function(){return rt.assertType}});Object.defineProperty(ye,"assertUnionType",{enumerable:!0,get:function(){return rt.assertUnionType}});Object.defineProperty(ye,"assertValidSchema",{enumerable:!0,get:function(){return TL.assertValidSchema}});Object.defineProperty(ye,"assertWrappingType",{enumerable:!0,get:function(){return rt.assertWrappingType}});Object.defineProperty(ye,"getNamedType",{enumerable:!0,get:function(){return rt.getNamedType}});Object.defineProperty(ye,"getNullableType",{enumerable:!0,get:function(){return rt.getNullableType}});Object.defineProperty(ye,"introspectionTypes",{enumerable:!0,get:function(){return Jr.introspectionTypes}});Object.defineProperty(ye,"isAbstractType",{enumerable:!0,get:function(){return rt.isAbstractType}});Object.defineProperty(ye,"isCompositeType",{enumerable:!0,get:function(){return rt.isCompositeType}});Object.defineProperty(ye,"isDirective",{enumerable:!0,get:function(){return oa.isDirective}});Object.defineProperty(ye,"isEnumType",{enumerable:!0,get:function(){return rt.isEnumType}});Object.defineProperty(ye,"isInputObjectType",{enumerable:!0,get:function(){return rt.isInputObjectType}});Object.defineProperty(ye,"isInputType",{enumerable:!0,get:function(){return rt.isInputType}});Object.defineProperty(ye,"isInterfaceType",{enumerable:!0,get:function(){return rt.isInterfaceType}});Object.defineProperty(ye,"isIntrospectionType",{enumerable:!0,get:function(){return Jr.isIntrospectionType}});Object.defineProperty(ye,"isLeafType",{enumerable:!0,get:function(){return rt.isLeafType}});Object.defineProperty(ye,"isListType",{enumerable:!0,get:function(){return rt.isListType}});Object.defineProperty(ye,"isNamedType",{enumerable:!0,get:function(){return rt.isNamedType}});Object.defineProperty(ye,"isNonNullType",{enumerable:!0,get:function(){return rt.isNonNullType}});Object.defineProperty(ye,"isNullableType",{enumerable:!0,get:function(){return rt.isNullableType}});Object.defineProperty(ye,"isObjectType",{enumerable:!0,get:function(){return rt.isObjectType}});Object.defineProperty(ye,"isOutputType",{enumerable:!0,get:function(){return rt.isOutputType}});Object.defineProperty(ye,"isRequiredArgument",{enumerable:!0,get:function(){return rt.isRequiredArgument}});Object.defineProperty(ye,"isRequiredInputField",{enumerable:!0,get:function(){return rt.isRequiredInputField}});Object.defineProperty(ye,"isScalarType",{enumerable:!0,get:function(){return rt.isScalarType}});Object.defineProperty(ye,"isSchema",{enumerable:!0,get:function(){return Y_.isSchema}});Object.defineProperty(ye,"isSpecifiedDirective",{enumerable:!0,get:function(){return oa.isSpecifiedDirective}});Object.defineProperty(ye,"isSpecifiedScalarType",{enumerable:!0,get:function(){return gs.isSpecifiedScalarType}});Object.defineProperty(ye,"isType",{enumerable:!0,get:function(){return rt.isType}});Object.defineProperty(ye,"isUnionType",{enumerable:!0,get:function(){return rt.isUnionType}});Object.defineProperty(ye,"isWrappingType",{enumerable:!0,get:function(){return rt.isWrappingType}});Object.defineProperty(ye,"resolveObjMapThunk",{enumerable:!0,get:function(){return rt.resolveObjMapThunk}});Object.defineProperty(ye,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return rt.resolveReadonlyArrayThunk}});Object.defineProperty(ye,"specifiedDirectives",{enumerable:!0,get:function(){return oa.specifiedDirectives}});Object.defineProperty(ye,"specifiedScalarTypes",{enumerable:!0,get:function(){return gs.specifiedScalarTypes}});Object.defineProperty(ye,"validateSchema",{enumerable:!0,get:function(){return TL.validateSchema}});var Y_=Xu(),rt=wt(),oa=Qr(),gs=Pa(),Jr=Fi(),TL=tp(),EL=qd()});var IL=w(kt=>{"use strict";m();T();N();Object.defineProperty(kt,"__esModule",{value:!0});Object.defineProperty(kt,"BREAK",{enumerable:!0,get:function(){return mp.BREAK}});Object.defineProperty(kt,"DirectiveLocation",{enumerable:!0,get:function(){return F8.DirectiveLocation}});Object.defineProperty(kt,"Kind",{enumerable:!0,get:function(){return b8.Kind}});Object.defineProperty(kt,"Lexer",{enumerable:!0,get:function(){return R8.Lexer}});Object.defineProperty(kt,"Location",{enumerable:!0,get:function(){return J_.Location}});Object.defineProperty(kt,"OperationTypeNode",{enumerable:!0,get:function(){return J_.OperationTypeNode}});Object.defineProperty(kt,"Source",{enumerable:!0,get:function(){return O8.Source}});Object.defineProperty(kt,"Token",{enumerable:!0,get:function(){return J_.Token}});Object.defineProperty(kt,"TokenKind",{enumerable:!0,get:function(){return A8.TokenKind}});Object.defineProperty(kt,"getEnterLeaveForKind",{enumerable:!0,get:function(){return mp.getEnterLeaveForKind}});Object.defineProperty(kt,"getLocation",{enumerable:!0,get:function(){return D8.getLocation}});Object.defineProperty(kt,"getVisitFn",{enumerable:!0,get:function(){return mp.getVisitFn}});Object.defineProperty(kt,"isConstValueNode",{enumerable:!0,get:function(){return Ca.isConstValueNode}});Object.defineProperty(kt,"isDefinitionNode",{enumerable:!0,get:function(){return Ca.isDefinitionNode}});Object.defineProperty(kt,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Ca.isExecutableDefinitionNode}});Object.defineProperty(kt,"isSelectionNode",{enumerable:!0,get:function(){return Ca.isSelectionNode}});Object.defineProperty(kt,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Ca.isTypeDefinitionNode}});Object.defineProperty(kt,"isTypeExtensionNode",{enumerable:!0,get:function(){return Ca.isTypeExtensionNode}});Object.defineProperty(kt,"isTypeNode",{enumerable:!0,get:function(){return Ca.isTypeNode}});Object.defineProperty(kt,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Ca.isTypeSystemDefinitionNode}});Object.defineProperty(kt,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Ca.isTypeSystemExtensionNode}});Object.defineProperty(kt,"isValueNode",{enumerable:!0,get:function(){return Ca.isValueNode}});Object.defineProperty(kt,"parse",{enumerable:!0,get:function(){return vN.parse}});Object.defineProperty(kt,"parseConstValue",{enumerable:!0,get:function(){return vN.parseConstValue}});Object.defineProperty(kt,"parseType",{enumerable:!0,get:function(){return vN.parseType}});Object.defineProperty(kt,"parseValue",{enumerable:!0,get:function(){return vN.parseValue}});Object.defineProperty(kt,"print",{enumerable:!0,get:function(){return P8.print}});Object.defineProperty(kt,"printLocation",{enumerable:!0,get:function(){return yL.printLocation}});Object.defineProperty(kt,"printSourceLocation",{enumerable:!0,get:function(){return yL.printSourceLocation}});Object.defineProperty(kt,"visit",{enumerable:!0,get:function(){return mp.visit}});Object.defineProperty(kt,"visitInParallel",{enumerable:!0,get:function(){return mp.visitInParallel}});var O8=Am(),D8=ym(),yL=Gy(),b8=Ft(),A8=wd(),R8=Sm(),vN=rl(),P8=ci(),mp=Qu(),J_=ba(),Ca=ec(),F8=tl()});var gL=w(H_=>{"use strict";m();T();N();Object.defineProperty(H_,"__esModule",{value:!0});H_.isAsyncIterable=w8;function w8(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}});var _L=w(z_=>{"use strict";m();T();N();Object.defineProperty(z_,"__esModule",{value:!0});z_.mapAsyncIterator=L8;function L8(e,t){let n=e[Symbol.asyncIterator]();function r(a){return Di(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 Di(this,null,function*(){return r(yield n.next())})},return(){return Di(this,null,function*(){return typeof n.return=="function"?r(yield n.return()):{value:void 0,done:!0}})},throw(a){return Di(this,null,function*(){if(typeof n.throw=="function")return r(yield n.throw(a));throw a})},[Symbol.asyncIterator](){return this}}}});var DL=w(SN=>{"use strict";m();T();N();Object.defineProperty(SN,"__esModule",{value:!0});SN.createSourceEventStream=OL;SN.subscribe=q8;var C8=Br(),B8=Xt(),SL=gL(),vL=ip(),W_=ze(),U8=EN(),k8=fN(),Np=fp(),M8=_L(),x8=fl();function q8(t){return Di(this,arguments,function*(e){arguments.length<2||(0,C8.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let n=yield OL(e);if(!(0,SL.isAsyncIterable)(n))return n;let r=i=>(0,Np.execute)(Q(x({},e),{rootValue:i}));return(0,M8.mapAsyncIterator)(n,r)})}function V8(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 OL(...e){return Di(this,null,function*(){let t=V8(e),{schema:n,document:r,variableValues:i}=t;(0,Np.assertValidExecutionArguments)(n,r,i);let a=(0,Np.buildExecutionContext)(t);if(!("schema"in a))return{errors:a};try{let o=yield j8(a);if(!(0,SL.isAsyncIterable)(o))throw new Error(`Subscription field must return Async Iterable. Received: ${(0,B8.inspect)(o)}.`);return o}catch(o){if(o instanceof W_.GraphQLError)return{errors:[o]};throw o}})}function j8(e){return Di(this,null,function*(){let{schema:t,fragments:n,operation:r,variableValues:i,rootValue:a}=e,o=t.getSubscriptionType();if(o==null)throw new W_.GraphQLError("Schema is not configured to execute subscription operation.",{nodes:r});let c=(0,k8.collectFields)(t,n,i,o,r.selectionSet),[l,d]=[...c.entries()][0],f=(0,Np.getFieldDef)(t,o,d[0]);if(!f){let F=d[0].name.value;throw new W_.GraphQLError(`The subscription field "${F}" is not defined.`,{nodes:d})}let y=(0,vL.addPath)(void 0,l,o.name),I=(0,Np.buildResolveInfo)(e,f,d,o,y);try{var v;let F=(0,x8.getArgumentValues)(f,d[0],i),k=e.contextValue,J=yield((v=f.subscribe)!==null&&v!==void 0?v:e.subscribeFieldResolver)(a,F,k,I);if(J instanceof Error)throw J;return J}catch(F){throw(0,U8.locatedError)(F,d,(0,vL.pathToArray)(y))}})}});var AL=w(Bi=>{"use strict";m();T();N();Object.defineProperty(Bi,"__esModule",{value:!0});Object.defineProperty(Bi,"createSourceEventStream",{enumerable:!0,get:function(){return bL.createSourceEventStream}});Object.defineProperty(Bi,"defaultFieldResolver",{enumerable:!0,get:function(){return ON.defaultFieldResolver}});Object.defineProperty(Bi,"defaultTypeResolver",{enumerable:!0,get:function(){return ON.defaultTypeResolver}});Object.defineProperty(Bi,"execute",{enumerable:!0,get:function(){return ON.execute}});Object.defineProperty(Bi,"executeSync",{enumerable:!0,get:function(){return ON.executeSync}});Object.defineProperty(Bi,"getArgumentValues",{enumerable:!0,get:function(){return X_.getArgumentValues}});Object.defineProperty(Bi,"getDirectiveValues",{enumerable:!0,get:function(){return X_.getDirectiveValues}});Object.defineProperty(Bi,"getVariableValues",{enumerable:!0,get:function(){return X_.getVariableValues}});Object.defineProperty(Bi,"responsePathAsArray",{enumerable:!0,get:function(){return K8.pathToArray}});Object.defineProperty(Bi,"subscribe",{enumerable:!0,get:function(){return bL.subscribe}});var K8=ip(),ON=fp(),bL=DL(),X_=fl()});var RL=w(tv=>{"use strict";m();T();N();Object.defineProperty(tv,"__esModule",{value:!0});tv.NoDeprecatedCustomRule=G8;var Z_=Ir(),Tp=ze(),ev=wt();function G8(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,Z_.invariant)(!1),e.reportError(new Tp.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 Tp.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,Z_.invariant)(!1),e.reportError(new Tp.GraphQLError(`Field "${a.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){let n=(0,ev.getNamedType)(e.getParentInputType());if((0,ev.isInputObjectType)(n)){let r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new Tp.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,ev.getNamedType)(e.getInputType());i!=null||(0,Z_.invariant)(!1),e.reportError(new Tp.GraphQLError(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}});var PL=w(nv=>{"use strict";m();T();N();Object.defineProperty(nv,"__esModule",{value:!0});nv.NoSchemaIntrospectionCustomRule=J8;var $8=ze(),Q8=wt(),Y8=Fi();function J8(e){return{Field(t){let n=(0,Q8.getNamedType)(e.getType());n&&(0,Y8.isIntrospectionType)(n)&&e.reportError(new $8.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}});var wL=w(pt=>{"use strict";m();T();N();Object.defineProperty(pt,"__esModule",{value:!0});Object.defineProperty(pt,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return W8.ExecutableDefinitionsRule}});Object.defineProperty(pt,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return X8.FieldsOnCorrectTypeRule}});Object.defineProperty(pt,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return Z8.FragmentsOnCompositeTypesRule}});Object.defineProperty(pt,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return e5.KnownArgumentNamesRule}});Object.defineProperty(pt,"KnownDirectivesRule",{enumerable:!0,get:function(){return t5.KnownDirectivesRule}});Object.defineProperty(pt,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return n5.KnownFragmentNamesRule}});Object.defineProperty(pt,"KnownTypeNamesRule",{enumerable:!0,get:function(){return r5.KnownTypeNamesRule}});Object.defineProperty(pt,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return i5.LoneAnonymousOperationRule}});Object.defineProperty(pt,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return S5.LoneSchemaDefinitionRule}});Object.defineProperty(pt,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return v5.MaxIntrospectionDepthRule}});Object.defineProperty(pt,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return w5.NoDeprecatedCustomRule}});Object.defineProperty(pt,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return a5.NoFragmentCyclesRule}});Object.defineProperty(pt,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return L5.NoSchemaIntrospectionCustomRule}});Object.defineProperty(pt,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return s5.NoUndefinedVariablesRule}});Object.defineProperty(pt,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return o5.NoUnusedFragmentsRule}});Object.defineProperty(pt,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return u5.NoUnusedVariablesRule}});Object.defineProperty(pt,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return c5.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(pt,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return l5.PossibleFragmentSpreadsRule}});Object.defineProperty(pt,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return F5.PossibleTypeExtensionsRule}});Object.defineProperty(pt,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return d5.ProvidedRequiredArgumentsRule}});Object.defineProperty(pt,"ScalarLeafsRule",{enumerable:!0,get:function(){return p5.ScalarLeafsRule}});Object.defineProperty(pt,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return f5.SingleFieldSubscriptionsRule}});Object.defineProperty(pt,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return R5.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(pt,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return m5.UniqueArgumentNamesRule}});Object.defineProperty(pt,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return P5.UniqueDirectiveNamesRule}});Object.defineProperty(pt,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return N5.UniqueDirectivesPerLocationRule}});Object.defineProperty(pt,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return b5.UniqueEnumValueNamesRule}});Object.defineProperty(pt,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return A5.UniqueFieldDefinitionNamesRule}});Object.defineProperty(pt,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return T5.UniqueFragmentNamesRule}});Object.defineProperty(pt,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return E5.UniqueInputFieldNamesRule}});Object.defineProperty(pt,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return h5.UniqueOperationNamesRule}});Object.defineProperty(pt,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return O5.UniqueOperationTypesRule}});Object.defineProperty(pt,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return D5.UniqueTypeNamesRule}});Object.defineProperty(pt,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return y5.UniqueVariableNamesRule}});Object.defineProperty(pt,"ValidationContext",{enumerable:!0,get:function(){return z8.ValidationContext}});Object.defineProperty(pt,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return I5.ValuesOfCorrectTypeRule}});Object.defineProperty(pt,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return g5.VariablesAreInputTypesRule}});Object.defineProperty(pt,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return _5.VariablesInAllowedPositionRule}});Object.defineProperty(pt,"recommendedRules",{enumerable:!0,get:function(){return FL.recommendedRules}});Object.defineProperty(pt,"specifiedRules",{enumerable:!0,get:function(){return FL.specifiedRules}});Object.defineProperty(pt,"validate",{enumerable:!0,get:function(){return H8.validate}});var H8=Nl(),z8=C_(),FL=F_(),W8=JI(),X8=zI(),Z8=XI(),e5=ZI(),t5=rg(),n5=ag(),r5=ug(),i5=lg(),a5=Tg(),s5=hg(),o5=Ig(),u5=_g(),c5=wg(),l5=Bg(),d5=xg(),p5=Vg(),f5=zg(),m5=t_(),N5=s_(),T5=f_(),E5=N_(),h5=E_(),y5=v_(),I5=D_(),g5=A_(),_5=P_(),v5=mg(),S5=pg(),O5=y_(),D5=g_(),b5=u_(),A5=d_(),R5=Zg(),P5=r_(),F5=kg(),w5=RL(),L5=PL()});var LL=w(ac=>{"use strict";m();T();N();Object.defineProperty(ac,"__esModule",{value:!0});Object.defineProperty(ac,"GraphQLError",{enumerable:!0,get:function(){return rv.GraphQLError}});Object.defineProperty(ac,"formatError",{enumerable:!0,get:function(){return rv.formatError}});Object.defineProperty(ac,"locatedError",{enumerable:!0,get:function(){return B5.locatedError}});Object.defineProperty(ac,"printError",{enumerable:!0,get:function(){return rv.printError}});Object.defineProperty(ac,"syntaxError",{enumerable:!0,get:function(){return C5.syntaxError}});var rv=ze(),C5=gm(),B5=EN()});var av=w(iv=>{"use strict";m();T();N();Object.defineProperty(iv,"__esModule",{value:!0});iv.getIntrospectionQuery=U5;function U5(e){let t=x({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,84 +177,84 @@ In some cases, you need to provide options to alter GraphQL's execution behavior } } } - `}});var pL=w(Q_=>{"use strict";m();T();N();Object.defineProperty(Q_,"__esModule",{value:!0});Q_.getOperationAST=m5;var f5=Pt();function m5(e,t){let n=null;for(let i of e.definitions)if(i.kind===f5.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 fL=w(Y_=>{"use strict";m();T();N();Object.defineProperty(Y_,"__esModule",{value:!0});Y_.getOperationRootType=N5;var _N=ze();function N5(e,t){if(t.operation==="query"){let n=e.getQueryType();if(!n)throw new _N.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 _N.GraphQLError("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){let n=e.getSubscriptionType();if(!n)throw new _N.GraphQLError("Schema is not configured for subscriptions.",{nodes:t});return n}throw new _N.GraphQLError("Can only have query, mutation and subscription operations.",{nodes:t})}});var mL=w(J_=>{"use strict";m();T();N();Object.defineProperty(J_,"__esModule",{value:!0});J_.introspectionFromSchema=I5;var T5=Ir(),E5=Zc(),h5=cp(),y5=$_();function I5(e,t){let n=x({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0},t),r=(0,E5.parse)((0,y5.getIntrospectionQuery)(n)),i=(0,h5.executeSync)({schema:e,document:r});return!i.errors&&i.data||(0,T5.invariant)(!1),i.data}});var TL=w(H_=>{"use strict";m();T();N();Object.defineProperty(H_,"__esModule",{value:!0});H_.buildClientSchema=b5;var g5=Lr(),li=Xt(),NL=Sa(),vN=Cd(),_5=Zc(),di=wt(),v5=$r(),La=Fi(),S5=Aa(),O5=Ju(),D5=ip();function b5(e,t){(0,NL.isObjectLike)(e)&&(0,NL.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,li.inspect)(e)}.`);let n=e.__schema,r=(0,vN.keyValMap)(n.types,ee=>ee.name,ee=>I(ee));for(let ee of[...S5.specifiedScalarTypes,...La.introspectionTypes])r[ee.name]&&(r[ee.name]=ee);let i=n.queryType?f(n.queryType):null,a=n.mutationType?f(n.mutationType):null,o=n.subscriptionType?f(n.subscriptionType):null,c=n.directives?n.directives.map(tt):[];return new O5.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(ee){if(ee.kind===La.TypeKind.LIST){let Se=ee.ofType;if(!Se)throw new Error("Decorated type deeper than introspection query.");return new di.GraphQLList(l(Se))}if(ee.kind===La.TypeKind.NON_NULL){let Se=ee.ofType;if(!Se)throw new Error("Decorated type deeper than introspection query.");let gt=l(Se);return new di.GraphQLNonNull((0,di.assertNullableType)(gt))}return d(ee)}function d(ee){let Se=ee.name;if(!Se)throw new Error(`Unknown type reference: ${(0,li.inspect)(ee)}.`);let gt=r[Se];if(!gt)throw new Error(`Invalid or incomplete schema, unknown type: ${Se}. Ensure that a full introspection query is used in order to build a client schema.`);return gt}function f(ee){return(0,di.assertObjectType)(d(ee))}function y(ee){return(0,di.assertInterfaceType)(d(ee))}function I(ee){if(ee!=null&&ee.name!=null&&ee.kind!=null)switch(ee.kind){case La.TypeKind.SCALAR:return v(ee);case La.TypeKind.OBJECT:return k(ee);case La.TypeKind.INTERFACE:return K(ee);case La.TypeKind.UNION:return Q(ee);case La.TypeKind.ENUM:return se(ee);case La.TypeKind.INPUT_OBJECT:return ie(ee)}let Se=(0,li.inspect)(ee);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${Se}.`)}function v(ee){return new di.GraphQLScalarType({name:ee.name,description:ee.description,specifiedByURL:ee.specifiedByURL})}function P(ee){if(ee.interfaces===null&&ee.kind===La.TypeKind.INTERFACE)return[];if(!ee.interfaces){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing interfaces: ${Se}.`)}return ee.interfaces.map(y)}function k(ee){return new di.GraphQLObjectType({name:ee.name,description:ee.description,interfaces:()=>P(ee),fields:()=>Te(ee)})}function K(ee){return new di.GraphQLInterfaceType({name:ee.name,description:ee.description,interfaces:()=>P(ee),fields:()=>Te(ee)})}function Q(ee){if(!ee.possibleTypes){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing possibleTypes: ${Se}.`)}return new di.GraphQLUnionType({name:ee.name,description:ee.description,types:()=>ee.possibleTypes.map(f)})}function se(ee){if(!ee.enumValues){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing enumValues: ${Se}.`)}return new di.GraphQLEnumType({name:ee.name,description:ee.description,values:(0,vN.keyValMap)(ee.enumValues,Se=>Se.name,Se=>({description:Se.description,deprecationReason:Se.deprecationReason}))})}function ie(ee){if(!ee.inputFields){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing inputFields: ${Se}.`)}return new di.GraphQLInputObjectType({name:ee.name,description:ee.description,fields:()=>Re(ee.inputFields),isOneOf:ee.isOneOf})}function Te(ee){if(!ee.fields)throw new Error(`Introspection result missing fields: ${(0,li.inspect)(ee)}.`);return(0,vN.keyValMap)(ee.fields,Se=>Se.name,de)}function de(ee){let Se=l(ee.type);if(!(0,di.isOutputType)(Se)){let gt=(0,li.inspect)(Se);throw new Error(`Introspection must provide output type for fields, but received: ${gt}.`)}if(!ee.args){let gt=(0,li.inspect)(ee);throw new Error(`Introspection result missing field args: ${gt}.`)}return{description:ee.description,deprecationReason:ee.deprecationReason,type:Se,args:Re(ee.args)}}function Re(ee){return(0,vN.keyValMap)(ee,Se=>Se.name,xe)}function xe(ee){let Se=l(ee.type);if(!(0,di.isInputType)(Se)){let en=(0,li.inspect)(Se);throw new Error(`Introspection must provide input type for arguments, but received: ${en}.`)}let gt=ee.defaultValue!=null?(0,D5.valueFromAST)((0,_5.parseValue)(ee.defaultValue),Se):void 0;return{description:ee.description,type:Se,defaultValue:gt,deprecationReason:ee.deprecationReason}}function tt(ee){if(!ee.args){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing directive args: ${Se}.`)}if(!ee.locations){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing directive locations: ${Se}.`)}return new v5.GraphQLDirective({name:ee.name,description:ee.description,isRepeatable:ee.isRepeatable,locations:ee.locations.slice(),args:Re(ee.args)})}}});var W_=w(ON=>{"use strict";m();T();N();Object.defineProperty(ON,"__esModule",{value:!0});ON.extendSchema=L5;ON.extendSchemaImpl=SL;var A5=Lr(),R5=Xt(),F5=Ir(),P5=Wo(),fp=zy(),Bi=Pt(),EL=zu(),_n=wt(),mp=$r(),_L=Fi(),vL=Aa(),hL=Ju(),w5=dl(),z_=cl(),yL=ip();function L5(e,t,n){(0,hL.assertSchema)(e),t!=null&&t.kind===Bi.Kind.DOCUMENT||(0,A5.devAssert)(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&(0,w5.assertValidSDLExtension)(t,e);let r=e.toConfig(),i=SL(r,t,n);return r===i?e:new hL.GraphQLSchema(i)}function SL(e,t,n){var r,i,a,o;let c=[],l=Object.create(null),d=[],f,y=[];for(let ue of t.definitions)if(ue.kind===Bi.Kind.SCHEMA_DEFINITION)f=ue;else if(ue.kind===Bi.Kind.SCHEMA_EXTENSION)y.push(ue);else if((0,EL.isTypeDefinitionNode)(ue))c.push(ue);else if((0,EL.isTypeExtensionNode)(ue)){let De=ue.name.value,ve=l[De];l[De]=ve?ve.concat([ue]):[ue]}else ue.kind===Bi.Kind.DIRECTIVE_DEFINITION&&d.push(ue);if(Object.keys(l).length===0&&c.length===0&&d.length===0&&y.length===0&&f==null)return e;let I=Object.create(null);for(let ue of e.types)I[ue.name]=se(ue);for(let ue of c){var v;let De=ue.name.value;I[De]=(v=IL[De])!==null&&v!==void 0?v:An(ue)}let P=x(x({query:e.query&&K(e.query),mutation:e.mutation&&K(e.mutation),subscription:e.subscription&&K(e.subscription)},f&>([f])),gt(y));return Y(x({description:(r=f)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value},P),{types:Object.values(I),directives:[...e.directives.map(Q),...d.map(bn)],extensions:Object.create(null),astNode:(a=f)!==null&&a!==void 0?a:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(y),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1});function k(ue){return(0,_n.isListType)(ue)?new _n.GraphQLList(k(ue.ofType)):(0,_n.isNonNullType)(ue)?new _n.GraphQLNonNull(k(ue.ofType)):K(ue)}function K(ue){return I[ue.name]}function Q(ue){let De=ue.toConfig();return new mp.GraphQLDirective(Y(x({},De),{args:(0,fp.mapValue)(De.args,Se)}))}function se(ue){if((0,_L.isIntrospectionType)(ue)||(0,vL.isSpecifiedScalarType)(ue))return ue;if((0,_n.isScalarType)(ue))return de(ue);if((0,_n.isObjectType)(ue))return Re(ue);if((0,_n.isInterfaceType)(ue))return xe(ue);if((0,_n.isUnionType)(ue))return tt(ue);if((0,_n.isEnumType)(ue))return Te(ue);if((0,_n.isInputObjectType)(ue))return ie(ue);(0,F5.invariant)(!1,"Unexpected type: "+(0,R5.inspect)(ue))}function ie(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[];return new _n.GraphQLInputObjectType(Y(x({},ve),{fields:()=>x(x({},(0,fp.mapValue)(ve.fields,_t=>Y(x({},_t),{type:k(_t.type)}))),Ar(Ce)),extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function Te(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ue.name])!==null&&De!==void 0?De:[];return new _n.GraphQLEnumType(Y(x({},ve),{values:x(x({},ve.values),Rr(Ce)),extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function de(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[],_t=ve.specifiedByURL;for(let oe of Ce){var J;_t=(J=gL(oe))!==null&&J!==void 0?J:_t}return new _n.GraphQLScalarType(Y(x({},ve),{specifiedByURL:_t,extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function Re(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[];return new _n.GraphQLObjectType(Y(x({},ve),{interfaces:()=>[...ue.getInterfaces().map(K),...kn(Ce)],fields:()=>x(x({},(0,fp.mapValue)(ve.fields,ee)),Qt(Ce)),extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function xe(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[];return new _n.GraphQLInterfaceType(Y(x({},ve),{interfaces:()=>[...ue.getInterfaces().map(K),...kn(Ce)],fields:()=>x(x({},(0,fp.mapValue)(ve.fields,ee)),Qt(Ce)),extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function tt(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[];return new _n.GraphQLUnionType(Y(x({},ve),{types:()=>[...ue.getTypes().map(K),...zt(Ce)],extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function ee(ue){return Y(x({},ue),{type:k(ue.type),args:ue.args&&(0,fp.mapValue)(ue.args,Se)})}function Se(ue){return Y(x({},ue),{type:k(ue.type)})}function gt(ue){let De={};for(let Ce of ue){var ve;let _t=(ve=Ce.operationTypes)!==null&&ve!==void 0?ve:[];for(let J of _t)De[J.operation]=en(J.type)}return De}function en(ue){var De;let ve=ue.name.value,Ce=(De=IL[ve])!==null&&De!==void 0?De:I[ve];if(Ce===void 0)throw new Error(`Unknown type: "${ve}".`);return Ce}function tn(ue){return ue.kind===Bi.Kind.LIST_TYPE?new _n.GraphQLList(tn(ue.type)):ue.kind===Bi.Kind.NON_NULL_TYPE?new _n.GraphQLNonNull(tn(ue.type)):en(ue)}function bn(ue){var De;return new mp.GraphQLDirective({name:ue.name.value,description:(De=ue.description)===null||De===void 0?void 0:De.value,locations:ue.locations.map(({value:ve})=>ve),isRepeatable:ue.repeatable,args:mn(ue.arguments),astNode:ue})}function Qt(ue){let De=Object.create(null);for(let _t of ue){var ve;let J=(ve=_t.fields)!==null&&ve!==void 0?ve:[];for(let oe of J){var Ce;De[oe.name.value]={type:tn(oe.type),description:(Ce=oe.description)===null||Ce===void 0?void 0:Ce.value,args:mn(oe.arguments),deprecationReason:SN(oe),astNode:oe}}}return De}function mn(ue){let De=ue!=null?ue:[],ve=Object.create(null);for(let _t of De){var Ce;let J=tn(_t.type);ve[_t.name.value]={type:J,description:(Ce=_t.description)===null||Ce===void 0?void 0:Ce.value,defaultValue:(0,yL.valueFromAST)(_t.defaultValue,J),deprecationReason:SN(_t),astNode:_t}}return ve}function Ar(ue){let De=Object.create(null);for(let _t of ue){var ve;let J=(ve=_t.fields)!==null&&ve!==void 0?ve:[];for(let oe of J){var Ce;let qe=tn(oe.type);De[oe.name.value]={type:qe,description:(Ce=oe.description)===null||Ce===void 0?void 0:Ce.value,defaultValue:(0,yL.valueFromAST)(oe.defaultValue,qe),deprecationReason:SN(oe),astNode:oe}}}return De}function Rr(ue){let De=Object.create(null);for(let _t of ue){var ve;let J=(ve=_t.values)!==null&&ve!==void 0?ve:[];for(let oe of J){var Ce;De[oe.name.value]={description:(Ce=oe.description)===null||Ce===void 0?void 0:Ce.value,deprecationReason:SN(oe),astNode:oe}}}return De}function kn(ue){return ue.flatMap(De=>{var ve,Ce;return(ve=(Ce=De.interfaces)===null||Ce===void 0?void 0:Ce.map(en))!==null&&ve!==void 0?ve:[]})}function zt(ue){return ue.flatMap(De=>{var ve,Ce;return(ve=(Ce=De.types)===null||Ce===void 0?void 0:Ce.map(en))!==null&&ve!==void 0?ve:[]})}function An(ue){var De;let ve=ue.name.value,Ce=(De=l[ve])!==null&&De!==void 0?De:[];switch(ue.kind){case Bi.Kind.OBJECT_TYPE_DEFINITION:{var _t;let nt=[ue,...Ce];return new _n.GraphQLObjectType({name:ve,description:(_t=ue.description)===null||_t===void 0?void 0:_t.value,interfaces:()=>kn(nt),fields:()=>Qt(nt),astNode:ue,extensionASTNodes:Ce})}case Bi.Kind.INTERFACE_TYPE_DEFINITION:{var J;let nt=[ue,...Ce];return new _n.GraphQLInterfaceType({name:ve,description:(J=ue.description)===null||J===void 0?void 0:J.value,interfaces:()=>kn(nt),fields:()=>Qt(nt),astNode:ue,extensionASTNodes:Ce})}case Bi.Kind.ENUM_TYPE_DEFINITION:{var oe;let nt=[ue,...Ce];return new _n.GraphQLEnumType({name:ve,description:(oe=ue.description)===null||oe===void 0?void 0:oe.value,values:Rr(nt),astNode:ue,extensionASTNodes:Ce})}case Bi.Kind.UNION_TYPE_DEFINITION:{var qe;let nt=[ue,...Ce];return new _n.GraphQLUnionType({name:ve,description:(qe=ue.description)===null||qe===void 0?void 0:qe.value,types:()=>zt(nt),astNode:ue,extensionASTNodes:Ce})}case Bi.Kind.SCALAR_TYPE_DEFINITION:{var Ye;return new _n.GraphQLScalarType({name:ve,description:(Ye=ue.description)===null||Ye===void 0?void 0:Ye.value,specifiedByURL:gL(ue),astNode:ue,extensionASTNodes:Ce})}case Bi.Kind.INPUT_OBJECT_TYPE_DEFINITION:{var Ut;let nt=[ue,...Ce];return new _n.GraphQLInputObjectType({name:ve,description:(Ut=ue.description)===null||Ut===void 0?void 0:Ut.value,fields:()=>Ar(nt),astNode:ue,extensionASTNodes:Ce,isOneOf:C5(ue)})}}}}var IL=(0,P5.keyMap)([...vL.specifiedScalarTypes,..._L.introspectionTypes],e=>e.name);function SN(e){let t=(0,z_.getDirectiveValues)(mp.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function gL(e){let t=(0,z_.getDirectiveValues)(mp.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}function C5(e){return!!(0,z_.getDirectiveValues)(mp.GraphQLOneOfDirective,e)}});var DL=w(DN=>{"use strict";m();T();N();Object.defineProperty(DN,"__esModule",{value:!0});DN.buildASTSchema=OL;DN.buildSchema=j5;var B5=Lr(),U5=Pt(),k5=Zc(),M5=$r(),x5=Ju(),q5=dl(),V5=W_();function OL(e,t){e!=null&&e.kind===U5.Kind.DOCUMENT||(0,B5.devAssert)(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,q5.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,V5.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,...M5.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new x5.GraphQLSchema(Y(x({},r),{directives:i}))}function j5(e,t){let n=(0,k5.parse)(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return OL(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}});var RL=w(Z_=>{"use strict";m();T();N();Object.defineProperty(Z_,"__esModule",{value:!0});Z_.lexicographicSortSchema=H5;var K5=Xt(),G5=Ir(),$5=Cd(),bL=Bd(),Cr=wt(),Q5=$r(),Y5=Fi(),J5=Ju();function H5(e){let t=e.toConfig(),n=(0,$5.keyValMap)(X_(t.types),I=>I.name,y);return new J5.GraphQLSchema(Y(x({},t),{types:Object.values(n),directives:X_(t.directives).map(o),query:a(t.query),mutation:a(t.mutation),subscription:a(t.subscription)}));function r(I){return(0,Cr.isListType)(I)?new Cr.GraphQLList(r(I.ofType)):(0,Cr.isNonNullType)(I)?new Cr.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 Q5.GraphQLDirective(Y(x({},v),{locations:AL(v.locations,P=>P),args:c(v.args)}))}function c(I){return bN(I,v=>Y(x({},v),{type:r(v.type)}))}function l(I){return bN(I,v=>Y(x({},v),{type:r(v.type),args:v.args&&c(v.args)}))}function d(I){return bN(I,v=>Y(x({},v),{type:r(v.type)}))}function f(I){return X_(I).map(i)}function y(I){if((0,Cr.isScalarType)(I)||(0,Y5.isIntrospectionType)(I))return I;if((0,Cr.isObjectType)(I)){let v=I.toConfig();return new Cr.GraphQLObjectType(Y(x({},v),{interfaces:()=>f(v.interfaces),fields:()=>l(v.fields)}))}if((0,Cr.isInterfaceType)(I)){let v=I.toConfig();return new Cr.GraphQLInterfaceType(Y(x({},v),{interfaces:()=>f(v.interfaces),fields:()=>l(v.fields)}))}if((0,Cr.isUnionType)(I)){let v=I.toConfig();return new Cr.GraphQLUnionType(Y(x({},v),{types:()=>f(v.types)}))}if((0,Cr.isEnumType)(I)){let v=I.toConfig();return new Cr.GraphQLEnumType(Y(x({},v),{values:bN(v.values,P=>P)}))}if((0,Cr.isInputObjectType)(I)){let v=I.toConfig();return new Cr.GraphQLInputObjectType(Y(x({},v),{fields:()=>d(v.fields)}))}(0,G5.invariant)(!1,"Unexpected type: "+(0,K5.inspect)(I))}}function bN(e,t){let n=Object.create(null);for(let r of Object.keys(e).sort(bL.naturalCompare))n[r]=t(e[r]);return n}function X_(e){return AL(e,t=>t.name)}function AL(e,t){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);return(0,bL.naturalCompare)(i,a)})}});var UL=w(Np=>{"use strict";m();T();N();Object.defineProperty(Np,"__esModule",{value:!0});Np.printIntrospectionSchema=nX;Np.printSchema=tX;Np.printType=wL;var z5=Xt(),W5=Ir(),X5=Dd(),tv=Pt(),AN=ci(),fl=wt(),nv=$r(),FL=Fi(),Z5=Aa(),eX=Jd();function tX(e){return PL(e,t=>!(0,nv.isSpecifiedDirective)(t),rX)}function nX(e){return PL(e,nv.isSpecifiedDirective,FL.isIntrospectionType)}function rX(e){return!(0,Z5.isSpecifiedScalarType)(e)&&!(0,FL.isIntrospectionType)(e)}function PL(e,t,n){let r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[iX(e),...r.map(a=>pX(a)),...i.map(a=>wL(a))].filter(Boolean).join(` + `}});var CL=w(sv=>{"use strict";m();T();N();Object.defineProperty(sv,"__esModule",{value:!0});sv.getOperationAST=M5;var k5=Ft();function M5(e,t){let n=null;for(let i of e.definitions)if(i.kind===k5.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 BL=w(ov=>{"use strict";m();T();N();Object.defineProperty(ov,"__esModule",{value:!0});ov.getOperationRootType=x5;var DN=ze();function x5(e,t){if(t.operation==="query"){let n=e.getQueryType();if(!n)throw new DN.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 DN.GraphQLError("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){let n=e.getSubscriptionType();if(!n)throw new DN.GraphQLError("Schema is not configured for subscriptions.",{nodes:t});return n}throw new DN.GraphQLError("Can only have query, mutation and subscription operations.",{nodes:t})}});var UL=w(uv=>{"use strict";m();T();N();Object.defineProperty(uv,"__esModule",{value:!0});uv.introspectionFromSchema=G5;var q5=Ir(),V5=rl(),j5=fp(),K5=av();function G5(e,t){let n=x({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0},t),r=(0,V5.parse)((0,K5.getIntrospectionQuery)(n)),i=(0,j5.executeSync)({schema:e,document:r});return!i.errors&&i.data||(0,q5.invariant)(!1),i.data}});var ML=w(cv=>{"use strict";m();T();N();Object.defineProperty(cv,"__esModule",{value:!0});cv.buildClientSchema=W5;var $5=Br(),li=Xt(),kL=Da(),bN=Md(),Q5=rl(),di=wt(),Y5=Qr(),Ba=Fi(),J5=Pa(),H5=Xu(),z5=up();function W5(e,t){(0,kL.isObjectLike)(e)&&(0,kL.isObjectLike)(e.__schema)||(0,$5.devAssert)(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0,li.inspect)(e)}.`);let n=e.__schema,r=(0,bN.keyValMap)(n.types,ee=>ee.name,ee=>I(ee));for(let ee of[...J5.specifiedScalarTypes,...Ba.introspectionTypes])r[ee.name]&&(r[ee.name]=ee);let i=n.queryType?f(n.queryType):null,a=n.mutationType?f(n.mutationType):null,o=n.subscriptionType?f(n.subscriptionType):null,c=n.directives?n.directives.map(tt):[];return new H5.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(ee){if(ee.kind===Ba.TypeKind.LIST){let Se=ee.ofType;if(!Se)throw new Error("Decorated type deeper than introspection query.");return new di.GraphQLList(l(Se))}if(ee.kind===Ba.TypeKind.NON_NULL){let Se=ee.ofType;if(!Se)throw new Error("Decorated type deeper than introspection query.");let _t=l(Se);return new di.GraphQLNonNull((0,di.assertNullableType)(_t))}return d(ee)}function d(ee){let Se=ee.name;if(!Se)throw new Error(`Unknown type reference: ${(0,li.inspect)(ee)}.`);let _t=r[Se];if(!_t)throw new Error(`Invalid or incomplete schema, unknown type: ${Se}. Ensure that a full introspection query is used in order to build a client schema.`);return _t}function f(ee){return(0,di.assertObjectType)(d(ee))}function y(ee){return(0,di.assertInterfaceType)(d(ee))}function I(ee){if(ee!=null&&ee.name!=null&&ee.kind!=null)switch(ee.kind){case Ba.TypeKind.SCALAR:return v(ee);case Ba.TypeKind.OBJECT:return k(ee);case Ba.TypeKind.INTERFACE:return K(ee);case Ba.TypeKind.UNION:return J(ee);case Ba.TypeKind.ENUM:return se(ee);case Ba.TypeKind.INPUT_OBJECT:return ie(ee)}let Se=(0,li.inspect)(ee);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${Se}.`)}function v(ee){return new di.GraphQLScalarType({name:ee.name,description:ee.description,specifiedByURL:ee.specifiedByURL})}function F(ee){if(ee.interfaces===null&&ee.kind===Ba.TypeKind.INTERFACE)return[];if(!ee.interfaces){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing interfaces: ${Se}.`)}return ee.interfaces.map(y)}function k(ee){return new di.GraphQLObjectType({name:ee.name,description:ee.description,interfaces:()=>F(ee),fields:()=>Te(ee)})}function K(ee){return new di.GraphQLInterfaceType({name:ee.name,description:ee.description,interfaces:()=>F(ee),fields:()=>Te(ee)})}function J(ee){if(!ee.possibleTypes){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing possibleTypes: ${Se}.`)}return new di.GraphQLUnionType({name:ee.name,description:ee.description,types:()=>ee.possibleTypes.map(f)})}function se(ee){if(!ee.enumValues){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing enumValues: ${Se}.`)}return new di.GraphQLEnumType({name:ee.name,description:ee.description,values:(0,bN.keyValMap)(ee.enumValues,Se=>Se.name,Se=>({description:Se.description,deprecationReason:Se.deprecationReason}))})}function ie(ee){if(!ee.inputFields){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing inputFields: ${Se}.`)}return new di.GraphQLInputObjectType({name:ee.name,description:ee.description,fields:()=>Re(ee.inputFields),isOneOf:ee.isOneOf})}function Te(ee){if(!ee.fields)throw new Error(`Introspection result missing fields: ${(0,li.inspect)(ee)}.`);return(0,bN.keyValMap)(ee.fields,Se=>Se.name,de)}function de(ee){let Se=l(ee.type);if(!(0,di.isOutputType)(Se)){let _t=(0,li.inspect)(Se);throw new Error(`Introspection must provide output type for fields, but received: ${_t}.`)}if(!ee.args){let _t=(0,li.inspect)(ee);throw new Error(`Introspection result missing field args: ${_t}.`)}return{description:ee.description,deprecationReason:ee.deprecationReason,type:Se,args:Re(ee.args)}}function Re(ee){return(0,bN.keyValMap)(ee,Se=>Se.name,xe)}function xe(ee){let Se=l(ee.type);if(!(0,di.isInputType)(Se)){let en=(0,li.inspect)(Se);throw new Error(`Introspection must provide input type for arguments, but received: ${en}.`)}let _t=ee.defaultValue!=null?(0,z5.valueFromAST)((0,Q5.parseValue)(ee.defaultValue),Se):void 0;return{description:ee.description,type:Se,defaultValue:_t,deprecationReason:ee.deprecationReason}}function tt(ee){if(!ee.args){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing directive args: ${Se}.`)}if(!ee.locations){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing directive locations: ${Se}.`)}return new Y5.GraphQLDirective({name:ee.name,description:ee.description,isRepeatable:ee.isRepeatable,locations:ee.locations.slice(),args:Re(ee.args)})}}});var dv=w(RN=>{"use strict";m();T();N();Object.defineProperty(RN,"__esModule",{value:!0});RN.extendSchema=rX;RN.extendSchemaImpl=QL;var X5=Br(),Z5=Xt(),eX=Ir(),tX=tu(),Ep=lI(),Ui=Ft(),xL=ec(),_n=wt(),hp=Qr(),GL=Fi(),$L=Pa(),qL=Xu(),nX=Nl(),lv=fl(),VL=up();function rX(e,t,n){(0,qL.assertSchema)(e),t!=null&&t.kind===Ui.Kind.DOCUMENT||(0,X5.devAssert)(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&(0,nX.assertValidSDLExtension)(t,e);let r=e.toConfig(),i=QL(r,t,n);return r===i?e:new qL.GraphQLSchema(i)}function QL(e,t,n){var r,i,a,o;let c=[],l=Object.create(null),d=[],f,y=[];for(let ue of t.definitions)if(ue.kind===Ui.Kind.SCHEMA_DEFINITION)f=ue;else if(ue.kind===Ui.Kind.SCHEMA_EXTENSION)y.push(ue);else if((0,xL.isTypeDefinitionNode)(ue))c.push(ue);else if((0,xL.isTypeExtensionNode)(ue)){let De=ue.name.value,ve=l[De];l[De]=ve?ve.concat([ue]):[ue]}else ue.kind===Ui.Kind.DIRECTIVE_DEFINITION&&d.push(ue);if(Object.keys(l).length===0&&c.length===0&&d.length===0&&y.length===0&&f==null)return e;let I=Object.create(null);for(let ue of e.types)I[ue.name]=se(ue);for(let ue of c){var v;let De=ue.name.value;I[De]=(v=jL[De])!==null&&v!==void 0?v:An(ue)}let F=x(x({query:e.query&&K(e.query),mutation:e.mutation&&K(e.mutation),subscription:e.subscription&&K(e.subscription)},f&&_t([f])),_t(y));return Q(x({description:(r=f)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value},F),{types:Object.values(I),directives:[...e.directives.map(J),...d.map(bn)],extensions:Object.create(null),astNode:(a=f)!==null&&a!==void 0?a:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(y),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1});function k(ue){return(0,_n.isListType)(ue)?new _n.GraphQLList(k(ue.ofType)):(0,_n.isNonNullType)(ue)?new _n.GraphQLNonNull(k(ue.ofType)):K(ue)}function K(ue){return I[ue.name]}function J(ue){let De=ue.toConfig();return new hp.GraphQLDirective(Q(x({},De),{args:(0,Ep.mapValue)(De.args,Se)}))}function se(ue){if((0,GL.isIntrospectionType)(ue)||(0,$L.isSpecifiedScalarType)(ue))return ue;if((0,_n.isScalarType)(ue))return de(ue);if((0,_n.isObjectType)(ue))return Re(ue);if((0,_n.isInterfaceType)(ue))return xe(ue);if((0,_n.isUnionType)(ue))return tt(ue);if((0,_n.isEnumType)(ue))return Te(ue);if((0,_n.isInputObjectType)(ue))return ie(ue);(0,eX.invariant)(!1,"Unexpected type: "+(0,Z5.inspect)(ue))}function ie(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[];return new _n.GraphQLInputObjectType(Q(x({},ve),{fields:()=>x(x({},(0,Ep.mapValue)(ve.fields,vt=>Q(x({},vt),{type:k(vt.type)}))),Pr(Ce)),extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function Te(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ue.name])!==null&&De!==void 0?De:[];return new _n.GraphQLEnumType(Q(x({},ve),{values:x(x({},ve.values),Fr(Ce)),extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function de(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[],vt=ve.specifiedByURL;for(let oe of Ce){var Y;vt=(Y=KL(oe))!==null&&Y!==void 0?Y:vt}return new _n.GraphQLScalarType(Q(x({},ve),{specifiedByURL:vt,extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function Re(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[];return new _n.GraphQLObjectType(Q(x({},ve),{interfaces:()=>[...ue.getInterfaces().map(K),...kn(Ce)],fields:()=>x(x({},(0,Ep.mapValue)(ve.fields,ee)),Qt(Ce)),extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function xe(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[];return new _n.GraphQLInterfaceType(Q(x({},ve),{interfaces:()=>[...ue.getInterfaces().map(K),...kn(Ce)],fields:()=>x(x({},(0,Ep.mapValue)(ve.fields,ee)),Qt(Ce)),extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function tt(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[];return new _n.GraphQLUnionType(Q(x({},ve),{types:()=>[...ue.getTypes().map(K),...zt(Ce)],extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function ee(ue){return Q(x({},ue),{type:k(ue.type),args:ue.args&&(0,Ep.mapValue)(ue.args,Se)})}function Se(ue){return Q(x({},ue),{type:k(ue.type)})}function _t(ue){let De={};for(let Ce of ue){var ve;let vt=(ve=Ce.operationTypes)!==null&&ve!==void 0?ve:[];for(let Y of vt)De[Y.operation]=en(Y.type)}return De}function en(ue){var De;let ve=ue.name.value,Ce=(De=jL[ve])!==null&&De!==void 0?De:I[ve];if(Ce===void 0)throw new Error(`Unknown type: "${ve}".`);return Ce}function tn(ue){return ue.kind===Ui.Kind.LIST_TYPE?new _n.GraphQLList(tn(ue.type)):ue.kind===Ui.Kind.NON_NULL_TYPE?new _n.GraphQLNonNull(tn(ue.type)):en(ue)}function bn(ue){var De;return new hp.GraphQLDirective({name:ue.name.value,description:(De=ue.description)===null||De===void 0?void 0:De.value,locations:ue.locations.map(({value:ve})=>ve),isRepeatable:ue.repeatable,args:mn(ue.arguments),astNode:ue})}function Qt(ue){let De=Object.create(null);for(let vt of ue){var ve;let Y=(ve=vt.fields)!==null&&ve!==void 0?ve:[];for(let oe of Y){var Ce;De[oe.name.value]={type:tn(oe.type),description:(Ce=oe.description)===null||Ce===void 0?void 0:Ce.value,args:mn(oe.arguments),deprecationReason:AN(oe),astNode:oe}}}return De}function mn(ue){let De=ue!=null?ue:[],ve=Object.create(null);for(let vt of De){var Ce;let Y=tn(vt.type);ve[vt.name.value]={type:Y,description:(Ce=vt.description)===null||Ce===void 0?void 0:Ce.value,defaultValue:(0,VL.valueFromAST)(vt.defaultValue,Y),deprecationReason:AN(vt),astNode:vt}}return ve}function Pr(ue){let De=Object.create(null);for(let vt of ue){var ve;let Y=(ve=vt.fields)!==null&&ve!==void 0?ve:[];for(let oe of Y){var Ce;let qe=tn(oe.type);De[oe.name.value]={type:qe,description:(Ce=oe.description)===null||Ce===void 0?void 0:Ce.value,defaultValue:(0,VL.valueFromAST)(oe.defaultValue,qe),deprecationReason:AN(oe),astNode:oe}}}return De}function Fr(ue){let De=Object.create(null);for(let vt of ue){var ve;let Y=(ve=vt.values)!==null&&ve!==void 0?ve:[];for(let oe of Y){var Ce;De[oe.name.value]={description:(Ce=oe.description)===null||Ce===void 0?void 0:Ce.value,deprecationReason:AN(oe),astNode:oe}}}return De}function kn(ue){return ue.flatMap(De=>{var ve,Ce;return(ve=(Ce=De.interfaces)===null||Ce===void 0?void 0:Ce.map(en))!==null&&ve!==void 0?ve:[]})}function zt(ue){return ue.flatMap(De=>{var ve,Ce;return(ve=(Ce=De.types)===null||Ce===void 0?void 0:Ce.map(en))!==null&&ve!==void 0?ve:[]})}function An(ue){var De;let ve=ue.name.value,Ce=(De=l[ve])!==null&&De!==void 0?De:[];switch(ue.kind){case Ui.Kind.OBJECT_TYPE_DEFINITION:{var vt;let nt=[ue,...Ce];return new _n.GraphQLObjectType({name:ve,description:(vt=ue.description)===null||vt===void 0?void 0:vt.value,interfaces:()=>kn(nt),fields:()=>Qt(nt),astNode:ue,extensionASTNodes:Ce})}case Ui.Kind.INTERFACE_TYPE_DEFINITION:{var Y;let nt=[ue,...Ce];return new _n.GraphQLInterfaceType({name:ve,description:(Y=ue.description)===null||Y===void 0?void 0:Y.value,interfaces:()=>kn(nt),fields:()=>Qt(nt),astNode:ue,extensionASTNodes:Ce})}case Ui.Kind.ENUM_TYPE_DEFINITION:{var oe;let nt=[ue,...Ce];return new _n.GraphQLEnumType({name:ve,description:(oe=ue.description)===null||oe===void 0?void 0:oe.value,values:Fr(nt),astNode:ue,extensionASTNodes:Ce})}case Ui.Kind.UNION_TYPE_DEFINITION:{var qe;let nt=[ue,...Ce];return new _n.GraphQLUnionType({name:ve,description:(qe=ue.description)===null||qe===void 0?void 0:qe.value,types:()=>zt(nt),astNode:ue,extensionASTNodes:Ce})}case Ui.Kind.SCALAR_TYPE_DEFINITION:{var Ye;return new _n.GraphQLScalarType({name:ve,description:(Ye=ue.description)===null||Ye===void 0?void 0:Ye.value,specifiedByURL:KL(ue),astNode:ue,extensionASTNodes:Ce})}case Ui.Kind.INPUT_OBJECT_TYPE_DEFINITION:{var Ut;let nt=[ue,...Ce];return new _n.GraphQLInputObjectType({name:ve,description:(Ut=ue.description)===null||Ut===void 0?void 0:Ut.value,fields:()=>Pr(nt),astNode:ue,extensionASTNodes:Ce,isOneOf:iX(ue)})}}}}var jL=(0,tX.keyMap)([...$L.specifiedScalarTypes,...GL.introspectionTypes],e=>e.name);function AN(e){let t=(0,lv.getDirectiveValues)(hp.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function KL(e){let t=(0,lv.getDirectiveValues)(hp.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}function iX(e){return!!(0,lv.getDirectiveValues)(hp.GraphQLOneOfDirective,e)}});var JL=w(PN=>{"use strict";m();T();N();Object.defineProperty(PN,"__esModule",{value:!0});PN.buildASTSchema=YL;PN.buildSchema=pX;var aX=Br(),sX=Ft(),oX=rl(),uX=Qr(),cX=Xu(),lX=Nl(),dX=dv();function YL(e,t){e!=null&&e.kind===sX.Kind.DOCUMENT||(0,aX.devAssert)(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,lX.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,dX.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,...uX.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new cX.GraphQLSchema(Q(x({},r),{directives:i}))}function pX(e,t){let n=(0,oX.parse)(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return YL(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}});var WL=w(fv=>{"use strict";m();T();N();Object.defineProperty(fv,"__esModule",{value:!0});fv.lexicographicSortSchema=yX;var fX=Xt(),mX=Ir(),NX=Md(),HL=xd(),Ur=wt(),TX=Qr(),EX=Fi(),hX=Xu();function yX(e){let t=e.toConfig(),n=(0,NX.keyValMap)(pv(t.types),I=>I.name,y);return new hX.GraphQLSchema(Q(x({},t),{types:Object.values(n),directives:pv(t.directives).map(o),query:a(t.query),mutation:a(t.mutation),subscription:a(t.subscription)}));function r(I){return(0,Ur.isListType)(I)?new Ur.GraphQLList(r(I.ofType)):(0,Ur.isNonNullType)(I)?new Ur.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 TX.GraphQLDirective(Q(x({},v),{locations:zL(v.locations,F=>F),args:c(v.args)}))}function c(I){return FN(I,v=>Q(x({},v),{type:r(v.type)}))}function l(I){return FN(I,v=>Q(x({},v),{type:r(v.type),args:v.args&&c(v.args)}))}function d(I){return FN(I,v=>Q(x({},v),{type:r(v.type)}))}function f(I){return pv(I).map(i)}function y(I){if((0,Ur.isScalarType)(I)||(0,EX.isIntrospectionType)(I))return I;if((0,Ur.isObjectType)(I)){let v=I.toConfig();return new Ur.GraphQLObjectType(Q(x({},v),{interfaces:()=>f(v.interfaces),fields:()=>l(v.fields)}))}if((0,Ur.isInterfaceType)(I)){let v=I.toConfig();return new Ur.GraphQLInterfaceType(Q(x({},v),{interfaces:()=>f(v.interfaces),fields:()=>l(v.fields)}))}if((0,Ur.isUnionType)(I)){let v=I.toConfig();return new Ur.GraphQLUnionType(Q(x({},v),{types:()=>f(v.types)}))}if((0,Ur.isEnumType)(I)){let v=I.toConfig();return new Ur.GraphQLEnumType(Q(x({},v),{values:FN(v.values,F=>F)}))}if((0,Ur.isInputObjectType)(I)){let v=I.toConfig();return new Ur.GraphQLInputObjectType(Q(x({},v),{fields:()=>d(v.fields)}))}(0,mX.invariant)(!1,"Unexpected type: "+(0,fX.inspect)(I))}}function FN(e,t){let n=Object.create(null);for(let r of Object.keys(e).sort(HL.naturalCompare))n[r]=t(e[r]);return n}function pv(e){return zL(e,t=>t.name)}function zL(e,t){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);return(0,HL.naturalCompare)(i,a)})}});var iC=w(yp=>{"use strict";m();T();N();Object.defineProperty(yp,"__esModule",{value:!0});yp.printIntrospectionSchema=DX;yp.printSchema=OX;yp.printType=eC;var IX=Xt(),gX=Ir(),_X=Pd(),Nv=Ft(),wN=ci(),El=wt(),Tv=Qr(),XL=Fi(),vX=Pa(),SX=Xd();function OX(e){return ZL(e,t=>!(0,Tv.isSpecifiedDirective)(t),bX)}function DX(e){return ZL(e,Tv.isSpecifiedDirective,XL.isIntrospectionType)}function bX(e){return!(0,vX.isSpecifiedScalarType)(e)&&!(0,XL.isIntrospectionType)(e)}function ZL(e,t,n){let r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[AX(e),...r.map(a=>UX(a)),...i.map(a=>eC(a))].filter(Boolean).join(` -`)}function iX(e){if(e.description==null&&aX(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}`),Ui(e)+`schema { +`)}function AX(e){if(e.description==null&&RX(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}`),ki(e)+`schema { ${t.join(` `)} -}`}function aX(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 wL(e){if((0,fl.isScalarType)(e))return sX(e);if((0,fl.isObjectType)(e))return oX(e);if((0,fl.isInterfaceType)(e))return uX(e);if((0,fl.isUnionType)(e))return cX(e);if((0,fl.isEnumType)(e))return lX(e);if((0,fl.isInputObjectType)(e))return dX(e);(0,W5.invariant)(!1,"Unexpected type: "+(0,z5.inspect)(e))}function sX(e){return Ui(e)+`scalar ${e.name}`+fX(e)}function LL(e){let t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function oX(e){return Ui(e)+`type ${e.name}`+LL(e)+CL(e)}function uX(e){return Ui(e)+`interface ${e.name}`+LL(e)+CL(e)}function cX(e){let t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return Ui(e)+"union "+e.name+n}function lX(e){let t=e.getValues().map((n,r)=>Ui(n," ",!r)+" "+n.name+iv(n.deprecationReason));return Ui(e)+`enum ${e.name}`+rv(t)}function dX(e){let t=Object.values(e.getFields()).map((n,r)=>Ui(n," ",!r)+" "+ev(n));return Ui(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+rv(t)}function CL(e){let t=Object.values(e.getFields()).map((n,r)=>Ui(n," ",!r)+" "+n.name+BL(n.args," ")+": "+String(n.type)+iv(n.deprecationReason));return rv(t)}function rv(e){return e.length!==0?` { +}`}function RX(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 eC(e){if((0,El.isScalarType)(e))return PX(e);if((0,El.isObjectType)(e))return FX(e);if((0,El.isInterfaceType)(e))return wX(e);if((0,El.isUnionType)(e))return LX(e);if((0,El.isEnumType)(e))return CX(e);if((0,El.isInputObjectType)(e))return BX(e);(0,gX.invariant)(!1,"Unexpected type: "+(0,IX.inspect)(e))}function PX(e){return ki(e)+`scalar ${e.name}`+kX(e)}function tC(e){let t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function FX(e){return ki(e)+`type ${e.name}`+tC(e)+nC(e)}function wX(e){return ki(e)+`interface ${e.name}`+tC(e)+nC(e)}function LX(e){let t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return ki(e)+"union "+e.name+n}function CX(e){let t=e.getValues().map((n,r)=>ki(n," ",!r)+" "+n.name+hv(n.deprecationReason));return ki(e)+`enum ${e.name}`+Ev(t)}function BX(e){let t=Object.values(e.getFields()).map((n,r)=>ki(n," ",!r)+" "+mv(n));return ki(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+Ev(t)}function nC(e){let t=Object.values(e.getFields()).map((n,r)=>ki(n," ",!r)+" "+n.name+rC(n.args," ")+": "+String(n.type)+hv(n.deprecationReason));return Ev(t)}function Ev(e){return e.length!==0?` { `+e.join(` `)+` -}`:""}function BL(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(ev).join(", ")+")":`( -`+e.map((n,r)=>Ui(n," "+t,!r)+" "+t+ev(n)).join(` +}`:""}function rC(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(mv).join(", ")+")":`( +`+e.map((n,r)=>ki(n," "+t,!r)+" "+t+mv(n)).join(` `)+` -`+t+")"}function ev(e){let t=(0,eX.astFromValue)(e.defaultValue,e.type),n=e.name+": "+String(e.type);return t&&(n+=` = ${(0,AN.print)(t)}`),n+iv(e.deprecationReason)}function pX(e){return Ui(e)+"directive @"+e.name+BL(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function iv(e){return e==null?"":e!==nv.DEFAULT_DEPRECATION_REASON?` @deprecated(reason: ${(0,AN.print)({kind:tv.Kind.STRING,value:e})})`:" @deprecated"}function fX(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${(0,AN.print)({kind:tv.Kind.STRING,value:e.specifiedByURL})})`}function Ui(e,t="",n=!0){let{description:r}=e;if(r==null)return"";let i=(0,AN.print)({kind:tv.Kind.STRING,value:r,block:(0,X5.isPrintableAsBlockString)(r)});return(t&&!n?` +`+t+")"}function mv(e){let t=(0,SX.astFromValue)(e.defaultValue,e.type),n=e.name+": "+String(e.type);return t&&(n+=` = ${(0,wN.print)(t)}`),n+hv(e.deprecationReason)}function UX(e){return ki(e)+"directive @"+e.name+rC(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function hv(e){return e==null?"":e!==Tv.DEFAULT_DEPRECATION_REASON?` @deprecated(reason: ${(0,wN.print)({kind:Nv.Kind.STRING,value:e})})`:" @deprecated"}function kX(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${(0,wN.print)({kind:Nv.Kind.STRING,value:e.specifiedByURL})})`}function ki(e,t="",n=!0){let{description:r}=e;if(r==null)return"";let i=(0,wN.print)({kind:Nv.Kind.STRING,value:r,block:(0,_X.isPrintableAsBlockString)(r)});return(t&&!n?` `+t:t)+i.replace(/\n/g,` `+t)+` -`}});var kL=w(av=>{"use strict";m();T();N();Object.defineProperty(av,"__esModule",{value:!0});av.concatAST=NX;var mX=Pt();function NX(e){let t=[];for(let n of e)t.push(...n.definitions);return{kind:mX.Kind.DOCUMENT,definitions:t}}});var qL=w(sv=>{"use strict";m();T();N();Object.defineProperty(sv,"__esModule",{value:!0});sv.separateOperations=EX;var RN=Pt(),TX=ju();function EX(e){let t=[],n=Object.create(null);for(let i of e.definitions)switch(i.kind){case RN.Kind.OPERATION_DEFINITION:t.push(i);break;case RN.Kind.FRAGMENT_DEFINITION:n[i.name.value]=ML(i.selectionSet);break;default:}let r=Object.create(null);for(let i of t){let a=new Set;for(let c of ML(i.selectionSet))xL(a,n,c);let o=i.name?i.name.value:"";r[o]={kind:RN.Kind.DOCUMENT,definitions:e.definitions.filter(c=>c===i||c.kind===RN.Kind.FRAGMENT_DEFINITION&&a.has(c.name.value))}}return r}function xL(e,t,n){if(!e.has(n)){e.add(n);let r=t[n];if(r!==void 0)for(let i of r)xL(e,t,i)}}function ML(e){let t=[];return(0,TX.visit)(e,{FragmentSpread(n){t.push(n.name.value)}}),t}});var KL=w(uv=>{"use strict";m();T();N();Object.defineProperty(uv,"__esModule",{value:!0});uv.stripIgnoredCharacters=yX;var hX=Dd(),VL=Im(),jL=Sm(),ov=Ad();function yX(e){let t=(0,jL.isSource)(e)?e:new jL.Source(e),n=t.body,r=new VL.Lexer(t),i="",a=!1;for(;r.advance().kind!==ov.TokenKind.EOF;){let o=r.token,c=o.kind,l=!(0,VL.isPunctuatorTokenKind)(o.kind);a&&(l||o.kind===ov.TokenKind.SPREAD)&&(i+=" ");let d=n.slice(o.start,o.end);c===ov.TokenKind.BLOCK_STRING?i+=(0,hX.printBlockString)(o.value,{minimize:!0}):i+=d,a=l}return i}});var $L=w(FN=>{"use strict";m();T();N();Object.defineProperty(FN,"__esModule",{value:!0});FN.assertValidName=vX;FN.isValidNameError=GL;var IX=Lr(),gX=ze(),_X=Ud();function vX(e){let t=GL(e);if(t)throw t;return e}function GL(e){if(typeof e=="string"||(0,IX.devAssert)(!1,"Expected name to be a string."),e.startsWith("__"))return new gX.GraphQLError(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{(0,_X.assertName)(e)}catch(t){return t}}});var ZL=w(Ca=>{"use strict";m();T();N();Object.defineProperty(Ca,"__esModule",{value:!0});Ca.DangerousChangeType=Ca.BreakingChangeType=void 0;Ca.findBreakingChanges=RX;Ca.findDangerousChanges=FX;var SX=Xt(),WL=Ir(),QL=Wo(),OX=ci(),jt=wt(),DX=Aa(),bX=Jd(),AX=dg(),Ln;Ca.BreakingChangeType=Ln;(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"})(Ln||(Ca.BreakingChangeType=Ln={}));var sa;Ca.DangerousChangeType=sa;(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"})(sa||(Ca.DangerousChangeType=sa={}));function RX(e,t){return XL(e,t).filter(n=>n.type in Ln)}function FX(e,t){return XL(e,t).filter(n=>n.type in sa)}function XL(e,t){return[...wX(e,t),...PX(e,t)]}function PX(e,t){let n=[],r=Es(e.getDirectives(),t.getDirectives());for(let i of r.removed)n.push({type:Ln.DIRECTIVE_REMOVED,description:`${i.name} was removed.`});for(let[i,a]of r.persisted){let o=Es(i.args,a.args);for(let c of o.added)(0,jt.isRequiredArgument)(c)&&n.push({type:Ln.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:Ln.DIRECTIVE_ARG_REMOVED,description:`${c.name} was removed from ${i.name}.`});i.isRepeatable&&!a.isRepeatable&&n.push({type:Ln.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${i.name}.`});for(let c of i.locations)a.locations.includes(c)||n.push({type:Ln.DIRECTIVE_LOCATION_REMOVED,description:`${c} was removed from ${i.name}.`})}return n}function wX(e,t){let n=[],r=Es(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(let i of r.removed)n.push({type:Ln.TYPE_REMOVED,description:(0,DX.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,jt.isEnumType)(i)&&(0,jt.isEnumType)(a)?n.push(...BX(i,a)):(0,jt.isUnionType)(i)&&(0,jt.isUnionType)(a)?n.push(...CX(i,a)):(0,jt.isInputObjectType)(i)&&(0,jt.isInputObjectType)(a)?n.push(...LX(i,a)):(0,jt.isObjectType)(i)&&(0,jt.isObjectType)(a)?n.push(...JL(i,a),...YL(i,a)):(0,jt.isInterfaceType)(i)&&(0,jt.isInterfaceType)(a)?n.push(...JL(i,a),...YL(i,a)):i.constructor!==a.constructor&&n.push({type:Ln.TYPE_CHANGED_KIND,description:`${i.name} changed from ${HL(i)} to ${HL(a)}.`});return n}function LX(e,t){let n=[],r=Es(Object.values(e.getFields()),Object.values(t.getFields()));for(let i of r.added)(0,jt.isRequiredInputField)(i)?n.push({type:Ln.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${i.name} on input type ${e.name} was added.`}):n.push({type:sa.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:Ln.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(let[i,a]of r.persisted)Ep(i.type,a.type)||n.push({type:Ln.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function CX(e,t){let n=[],r=Es(e.getTypes(),t.getTypes());for(let i of r.added)n.push({type:sa.TYPE_ADDED_TO_UNION,description:`${i.name} was added to union type ${e.name}.`});for(let i of r.removed)n.push({type:Ln.TYPE_REMOVED_FROM_UNION,description:`${i.name} was removed from union type ${e.name}.`});return n}function BX(e,t){let n=[],r=Es(e.getValues(),t.getValues());for(let i of r.added)n.push({type:sa.VALUE_ADDED_TO_ENUM,description:`${i.name} was added to enum type ${e.name}.`});for(let i of r.removed)n.push({type:Ln.VALUE_REMOVED_FROM_ENUM,description:`${i.name} was removed from enum type ${e.name}.`});return n}function YL(e,t){let n=[],r=Es(e.getInterfaces(),t.getInterfaces());for(let i of r.added)n.push({type:sa.IMPLEMENTED_INTERFACE_ADDED,description:`${i.name} added to interfaces implemented by ${e.name}.`});for(let i of r.removed)n.push({type:Ln.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${i.name}.`});return n}function JL(e,t){let n=[],r=Es(Object.values(e.getFields()),Object.values(t.getFields()));for(let i of r.removed)n.push({type:Ln.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(let[i,a]of r.persisted)n.push(...UX(e,i,a)),Tp(i.type,a.type)||n.push({type:Ln.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function UX(e,t,n){let r=[],i=Es(t.args,n.args);for(let a of i.removed)r.push({type:Ln.ARG_REMOVED,description:`${e.name}.${t.name} arg ${a.name} was removed.`});for(let[a,o]of i.persisted)if(!Ep(a.type,o.type))r.push({type:Ln.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:sa.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${a.name} defaultValue was removed.`});else{let l=zL(a.defaultValue,a.type),d=zL(o.defaultValue,o.type);l!==d&&r.push({type:sa.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,jt.isRequiredArgument)(a)?r.push({type:Ln.REQUIRED_ARG_ADDED,description:`A required arg ${a.name} on ${e.name}.${t.name} was added.`}):r.push({type:sa.OPTIONAL_ARG_ADDED,description:`An optional arg ${a.name} on ${e.name}.${t.name} was added.`});return r}function Tp(e,t){return(0,jt.isListType)(e)?(0,jt.isListType)(t)&&Tp(e.ofType,t.ofType)||(0,jt.isNonNullType)(t)&&Tp(e,t.ofType):(0,jt.isNonNullType)(e)?(0,jt.isNonNullType)(t)&&Tp(e.ofType,t.ofType):(0,jt.isNamedType)(t)&&e.name===t.name||(0,jt.isNonNullType)(t)&&Tp(e,t.ofType)}function Ep(e,t){return(0,jt.isListType)(e)?(0,jt.isListType)(t)&&Ep(e.ofType,t.ofType):(0,jt.isNonNullType)(e)?(0,jt.isNonNullType)(t)&&Ep(e.ofType,t.ofType)||!(0,jt.isNonNullType)(t)&&Ep(e.ofType,t):(0,jt.isNamedType)(t)&&e.name===t.name}function HL(e){if((0,jt.isScalarType)(e))return"a Scalar type";if((0,jt.isObjectType)(e))return"an Object type";if((0,jt.isInterfaceType)(e))return"an Interface type";if((0,jt.isUnionType)(e))return"a Union type";if((0,jt.isEnumType)(e))return"an Enum type";if((0,jt.isInputObjectType)(e))return"an Input type";(0,WL.invariant)(!1,"Unexpected type: "+(0,SX.inspect)(e))}function zL(e,t){let n=(0,bX.astFromValue)(e,t);return n!=null||(0,WL.invariant)(!1),(0,OX.print)((0,AX.sortValueNode)(n))}function Es(e,t){let n=[],r=[],i=[],a=(0,QL.keyMap)(e,({name:c})=>c),o=(0,QL.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 rC=w(Mt=>{"use strict";m();T();N();Object.defineProperty(Mt,"__esModule",{value:!0});Object.defineProperty(Mt,"BreakingChangeType",{enumerable:!0,get:function(){return PN.BreakingChangeType}});Object.defineProperty(Mt,"DangerousChangeType",{enumerable:!0,get:function(){return PN.DangerousChangeType}});Object.defineProperty(Mt,"TypeInfo",{enumerable:!0,get:function(){return tC.TypeInfo}});Object.defineProperty(Mt,"assertValidName",{enumerable:!0,get:function(){return nC.assertValidName}});Object.defineProperty(Mt,"astFromValue",{enumerable:!0,get:function(){return YX.astFromValue}});Object.defineProperty(Mt,"buildASTSchema",{enumerable:!0,get:function(){return eC.buildASTSchema}});Object.defineProperty(Mt,"buildClientSchema",{enumerable:!0,get:function(){return VX.buildClientSchema}});Object.defineProperty(Mt,"buildSchema",{enumerable:!0,get:function(){return eC.buildSchema}});Object.defineProperty(Mt,"coerceInputValue",{enumerable:!0,get:function(){return JX.coerceInputValue}});Object.defineProperty(Mt,"concatAST",{enumerable:!0,get:function(){return HX.concatAST}});Object.defineProperty(Mt,"doTypesOverlap",{enumerable:!0,get:function(){return lv.doTypesOverlap}});Object.defineProperty(Mt,"extendSchema",{enumerable:!0,get:function(){return jX.extendSchema}});Object.defineProperty(Mt,"findBreakingChanges",{enumerable:!0,get:function(){return PN.findBreakingChanges}});Object.defineProperty(Mt,"findDangerousChanges",{enumerable:!0,get:function(){return PN.findDangerousChanges}});Object.defineProperty(Mt,"getIntrospectionQuery",{enumerable:!0,get:function(){return kX.getIntrospectionQuery}});Object.defineProperty(Mt,"getOperationAST",{enumerable:!0,get:function(){return MX.getOperationAST}});Object.defineProperty(Mt,"getOperationRootType",{enumerable:!0,get:function(){return xX.getOperationRootType}});Object.defineProperty(Mt,"introspectionFromSchema",{enumerable:!0,get:function(){return qX.introspectionFromSchema}});Object.defineProperty(Mt,"isEqualType",{enumerable:!0,get:function(){return lv.isEqualType}});Object.defineProperty(Mt,"isTypeSubTypeOf",{enumerable:!0,get:function(){return lv.isTypeSubTypeOf}});Object.defineProperty(Mt,"isValidNameError",{enumerable:!0,get:function(){return nC.isValidNameError}});Object.defineProperty(Mt,"lexicographicSortSchema",{enumerable:!0,get:function(){return KX.lexicographicSortSchema}});Object.defineProperty(Mt,"printIntrospectionSchema",{enumerable:!0,get:function(){return cv.printIntrospectionSchema}});Object.defineProperty(Mt,"printSchema",{enumerable:!0,get:function(){return cv.printSchema}});Object.defineProperty(Mt,"printType",{enumerable:!0,get:function(){return cv.printType}});Object.defineProperty(Mt,"separateOperations",{enumerable:!0,get:function(){return zX.separateOperations}});Object.defineProperty(Mt,"stripIgnoredCharacters",{enumerable:!0,get:function(){return WX.stripIgnoredCharacters}});Object.defineProperty(Mt,"typeFromAST",{enumerable:!0,get:function(){return GX.typeFromAST}});Object.defineProperty(Mt,"valueFromAST",{enumerable:!0,get:function(){return $X.valueFromAST}});Object.defineProperty(Mt,"valueFromASTUntyped",{enumerable:!0,get:function(){return QX.valueFromASTUntyped}});Object.defineProperty(Mt,"visitWithTypeInfo",{enumerable:!0,get:function(){return tC.visitWithTypeInfo}});var kX=$_(),MX=pL(),xX=fL(),qX=mL(),VX=TL(),eC=DL(),jX=W_(),KX=RL(),cv=UL(),GX=Ra(),$X=ip(),QX=oI(),YX=Jd(),tC=Xm(),JX=Pg(),HX=kL(),zX=qL(),WX=KL(),lv=Vd(),nC=$L(),PN=ZL()});var Ae=w(V=>{"use strict";m();T();N();Object.defineProperty(V,"__esModule",{value:!0});Object.defineProperty(V,"BREAK",{enumerable:!0,get:function(){return Jt.BREAK}});Object.defineProperty(V,"BreakingChangeType",{enumerable:!0,get:function(){return Ht.BreakingChangeType}});Object.defineProperty(V,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return ge.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(V,"DangerousChangeType",{enumerable:!0,get:function(){return Ht.DangerousChangeType}});Object.defineProperty(V,"DirectiveLocation",{enumerable:!0,get:function(){return Jt.DirectiveLocation}});Object.defineProperty(V,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return Tt.ExecutableDefinitionsRule}});Object.defineProperty(V,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return Tt.FieldsOnCorrectTypeRule}});Object.defineProperty(V,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return Tt.FragmentsOnCompositeTypesRule}});Object.defineProperty(V,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return ge.GRAPHQL_MAX_INT}});Object.defineProperty(V,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return ge.GRAPHQL_MIN_INT}});Object.defineProperty(V,"GraphQLBoolean",{enumerable:!0,get:function(){return ge.GraphQLBoolean}});Object.defineProperty(V,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return ge.GraphQLDeprecatedDirective}});Object.defineProperty(V,"GraphQLDirective",{enumerable:!0,get:function(){return ge.GraphQLDirective}});Object.defineProperty(V,"GraphQLEnumType",{enumerable:!0,get:function(){return ge.GraphQLEnumType}});Object.defineProperty(V,"GraphQLError",{enumerable:!0,get:function(){return hp.GraphQLError}});Object.defineProperty(V,"GraphQLFloat",{enumerable:!0,get:function(){return ge.GraphQLFloat}});Object.defineProperty(V,"GraphQLID",{enumerable:!0,get:function(){return ge.GraphQLID}});Object.defineProperty(V,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return ge.GraphQLIncludeDirective}});Object.defineProperty(V,"GraphQLInputObjectType",{enumerable:!0,get:function(){return ge.GraphQLInputObjectType}});Object.defineProperty(V,"GraphQLInt",{enumerable:!0,get:function(){return ge.GraphQLInt}});Object.defineProperty(V,"GraphQLInterfaceType",{enumerable:!0,get:function(){return ge.GraphQLInterfaceType}});Object.defineProperty(V,"GraphQLList",{enumerable:!0,get:function(){return ge.GraphQLList}});Object.defineProperty(V,"GraphQLNonNull",{enumerable:!0,get:function(){return ge.GraphQLNonNull}});Object.defineProperty(V,"GraphQLObjectType",{enumerable:!0,get:function(){return ge.GraphQLObjectType}});Object.defineProperty(V,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return ge.GraphQLOneOfDirective}});Object.defineProperty(V,"GraphQLScalarType",{enumerable:!0,get:function(){return ge.GraphQLScalarType}});Object.defineProperty(V,"GraphQLSchema",{enumerable:!0,get:function(){return ge.GraphQLSchema}});Object.defineProperty(V,"GraphQLSkipDirective",{enumerable:!0,get:function(){return ge.GraphQLSkipDirective}});Object.defineProperty(V,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return ge.GraphQLSpecifiedByDirective}});Object.defineProperty(V,"GraphQLString",{enumerable:!0,get:function(){return ge.GraphQLString}});Object.defineProperty(V,"GraphQLUnionType",{enumerable:!0,get:function(){return ge.GraphQLUnionType}});Object.defineProperty(V,"Kind",{enumerable:!0,get:function(){return Jt.Kind}});Object.defineProperty(V,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return Tt.KnownArgumentNamesRule}});Object.defineProperty(V,"KnownDirectivesRule",{enumerable:!0,get:function(){return Tt.KnownDirectivesRule}});Object.defineProperty(V,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return Tt.KnownFragmentNamesRule}});Object.defineProperty(V,"KnownTypeNamesRule",{enumerable:!0,get:function(){return Tt.KnownTypeNamesRule}});Object.defineProperty(V,"Lexer",{enumerable:!0,get:function(){return Jt.Lexer}});Object.defineProperty(V,"Location",{enumerable:!0,get:function(){return Jt.Location}});Object.defineProperty(V,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return Tt.LoneAnonymousOperationRule}});Object.defineProperty(V,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return Tt.LoneSchemaDefinitionRule}});Object.defineProperty(V,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return Tt.MaxIntrospectionDepthRule}});Object.defineProperty(V,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return Tt.NoDeprecatedCustomRule}});Object.defineProperty(V,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return Tt.NoFragmentCyclesRule}});Object.defineProperty(V,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return Tt.NoSchemaIntrospectionCustomRule}});Object.defineProperty(V,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return Tt.NoUndefinedVariablesRule}});Object.defineProperty(V,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return Tt.NoUnusedFragmentsRule}});Object.defineProperty(V,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return Tt.NoUnusedVariablesRule}});Object.defineProperty(V,"OperationTypeNode",{enumerable:!0,get:function(){return Jt.OperationTypeNode}});Object.defineProperty(V,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return Tt.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(V,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return Tt.PossibleFragmentSpreadsRule}});Object.defineProperty(V,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return Tt.PossibleTypeExtensionsRule}});Object.defineProperty(V,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return Tt.ProvidedRequiredArgumentsRule}});Object.defineProperty(V,"ScalarLeafsRule",{enumerable:!0,get:function(){return Tt.ScalarLeafsRule}});Object.defineProperty(V,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return ge.SchemaMetaFieldDef}});Object.defineProperty(V,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return Tt.SingleFieldSubscriptionsRule}});Object.defineProperty(V,"Source",{enumerable:!0,get:function(){return Jt.Source}});Object.defineProperty(V,"Token",{enumerable:!0,get:function(){return Jt.Token}});Object.defineProperty(V,"TokenKind",{enumerable:!0,get:function(){return Jt.TokenKind}});Object.defineProperty(V,"TypeInfo",{enumerable:!0,get:function(){return Ht.TypeInfo}});Object.defineProperty(V,"TypeKind",{enumerable:!0,get:function(){return ge.TypeKind}});Object.defineProperty(V,"TypeMetaFieldDef",{enumerable:!0,get:function(){return ge.TypeMetaFieldDef}});Object.defineProperty(V,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return ge.TypeNameMetaFieldDef}});Object.defineProperty(V,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return Tt.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(V,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return Tt.UniqueArgumentNamesRule}});Object.defineProperty(V,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return Tt.UniqueDirectiveNamesRule}});Object.defineProperty(V,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return Tt.UniqueDirectivesPerLocationRule}});Object.defineProperty(V,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return Tt.UniqueEnumValueNamesRule}});Object.defineProperty(V,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return Tt.UniqueFieldDefinitionNamesRule}});Object.defineProperty(V,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return Tt.UniqueFragmentNamesRule}});Object.defineProperty(V,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return Tt.UniqueInputFieldNamesRule}});Object.defineProperty(V,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return Tt.UniqueOperationNamesRule}});Object.defineProperty(V,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return Tt.UniqueOperationTypesRule}});Object.defineProperty(V,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return Tt.UniqueTypeNamesRule}});Object.defineProperty(V,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return Tt.UniqueVariableNamesRule}});Object.defineProperty(V,"ValidationContext",{enumerable:!0,get:function(){return Tt.ValidationContext}});Object.defineProperty(V,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return Tt.ValuesOfCorrectTypeRule}});Object.defineProperty(V,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return Tt.VariablesAreInputTypesRule}});Object.defineProperty(V,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return Tt.VariablesInAllowedPositionRule}});Object.defineProperty(V,"__Directive",{enumerable:!0,get:function(){return ge.__Directive}});Object.defineProperty(V,"__DirectiveLocation",{enumerable:!0,get:function(){return ge.__DirectiveLocation}});Object.defineProperty(V,"__EnumValue",{enumerable:!0,get:function(){return ge.__EnumValue}});Object.defineProperty(V,"__Field",{enumerable:!0,get:function(){return ge.__Field}});Object.defineProperty(V,"__InputValue",{enumerable:!0,get:function(){return ge.__InputValue}});Object.defineProperty(V,"__Schema",{enumerable:!0,get:function(){return ge.__Schema}});Object.defineProperty(V,"__Type",{enumerable:!0,get:function(){return ge.__Type}});Object.defineProperty(V,"__TypeKind",{enumerable:!0,get:function(){return ge.__TypeKind}});Object.defineProperty(V,"assertAbstractType",{enumerable:!0,get:function(){return ge.assertAbstractType}});Object.defineProperty(V,"assertCompositeType",{enumerable:!0,get:function(){return ge.assertCompositeType}});Object.defineProperty(V,"assertDirective",{enumerable:!0,get:function(){return ge.assertDirective}});Object.defineProperty(V,"assertEnumType",{enumerable:!0,get:function(){return ge.assertEnumType}});Object.defineProperty(V,"assertEnumValueName",{enumerable:!0,get:function(){return ge.assertEnumValueName}});Object.defineProperty(V,"assertInputObjectType",{enumerable:!0,get:function(){return ge.assertInputObjectType}});Object.defineProperty(V,"assertInputType",{enumerable:!0,get:function(){return ge.assertInputType}});Object.defineProperty(V,"assertInterfaceType",{enumerable:!0,get:function(){return ge.assertInterfaceType}});Object.defineProperty(V,"assertLeafType",{enumerable:!0,get:function(){return ge.assertLeafType}});Object.defineProperty(V,"assertListType",{enumerable:!0,get:function(){return ge.assertListType}});Object.defineProperty(V,"assertName",{enumerable:!0,get:function(){return ge.assertName}});Object.defineProperty(V,"assertNamedType",{enumerable:!0,get:function(){return ge.assertNamedType}});Object.defineProperty(V,"assertNonNullType",{enumerable:!0,get:function(){return ge.assertNonNullType}});Object.defineProperty(V,"assertNullableType",{enumerable:!0,get:function(){return ge.assertNullableType}});Object.defineProperty(V,"assertObjectType",{enumerable:!0,get:function(){return ge.assertObjectType}});Object.defineProperty(V,"assertOutputType",{enumerable:!0,get:function(){return ge.assertOutputType}});Object.defineProperty(V,"assertScalarType",{enumerable:!0,get:function(){return ge.assertScalarType}});Object.defineProperty(V,"assertSchema",{enumerable:!0,get:function(){return ge.assertSchema}});Object.defineProperty(V,"assertType",{enumerable:!0,get:function(){return ge.assertType}});Object.defineProperty(V,"assertUnionType",{enumerable:!0,get:function(){return ge.assertUnionType}});Object.defineProperty(V,"assertValidName",{enumerable:!0,get:function(){return Ht.assertValidName}});Object.defineProperty(V,"assertValidSchema",{enumerable:!0,get:function(){return ge.assertValidSchema}});Object.defineProperty(V,"assertWrappingType",{enumerable:!0,get:function(){return ge.assertWrappingType}});Object.defineProperty(V,"astFromValue",{enumerable:!0,get:function(){return Ht.astFromValue}});Object.defineProperty(V,"buildASTSchema",{enumerable:!0,get:function(){return Ht.buildASTSchema}});Object.defineProperty(V,"buildClientSchema",{enumerable:!0,get:function(){return Ht.buildClientSchema}});Object.defineProperty(V,"buildSchema",{enumerable:!0,get:function(){return Ht.buildSchema}});Object.defineProperty(V,"coerceInputValue",{enumerable:!0,get:function(){return Ht.coerceInputValue}});Object.defineProperty(V,"concatAST",{enumerable:!0,get:function(){return Ht.concatAST}});Object.defineProperty(V,"createSourceEventStream",{enumerable:!0,get:function(){return Ba.createSourceEventStream}});Object.defineProperty(V,"defaultFieldResolver",{enumerable:!0,get:function(){return Ba.defaultFieldResolver}});Object.defineProperty(V,"defaultTypeResolver",{enumerable:!0,get:function(){return Ba.defaultTypeResolver}});Object.defineProperty(V,"doTypesOverlap",{enumerable:!0,get:function(){return Ht.doTypesOverlap}});Object.defineProperty(V,"execute",{enumerable:!0,get:function(){return Ba.execute}});Object.defineProperty(V,"executeSync",{enumerable:!0,get:function(){return Ba.executeSync}});Object.defineProperty(V,"extendSchema",{enumerable:!0,get:function(){return Ht.extendSchema}});Object.defineProperty(V,"findBreakingChanges",{enumerable:!0,get:function(){return Ht.findBreakingChanges}});Object.defineProperty(V,"findDangerousChanges",{enumerable:!0,get:function(){return Ht.findDangerousChanges}});Object.defineProperty(V,"formatError",{enumerable:!0,get:function(){return hp.formatError}});Object.defineProperty(V,"getArgumentValues",{enumerable:!0,get:function(){return Ba.getArgumentValues}});Object.defineProperty(V,"getDirectiveValues",{enumerable:!0,get:function(){return Ba.getDirectiveValues}});Object.defineProperty(V,"getEnterLeaveForKind",{enumerable:!0,get:function(){return Jt.getEnterLeaveForKind}});Object.defineProperty(V,"getIntrospectionQuery",{enumerable:!0,get:function(){return Ht.getIntrospectionQuery}});Object.defineProperty(V,"getLocation",{enumerable:!0,get:function(){return Jt.getLocation}});Object.defineProperty(V,"getNamedType",{enumerable:!0,get:function(){return ge.getNamedType}});Object.defineProperty(V,"getNullableType",{enumerable:!0,get:function(){return ge.getNullableType}});Object.defineProperty(V,"getOperationAST",{enumerable:!0,get:function(){return Ht.getOperationAST}});Object.defineProperty(V,"getOperationRootType",{enumerable:!0,get:function(){return Ht.getOperationRootType}});Object.defineProperty(V,"getVariableValues",{enumerable:!0,get:function(){return Ba.getVariableValues}});Object.defineProperty(V,"getVisitFn",{enumerable:!0,get:function(){return Jt.getVisitFn}});Object.defineProperty(V,"graphql",{enumerable:!0,get:function(){return aC.graphql}});Object.defineProperty(V,"graphqlSync",{enumerable:!0,get:function(){return aC.graphqlSync}});Object.defineProperty(V,"introspectionFromSchema",{enumerable:!0,get:function(){return Ht.introspectionFromSchema}});Object.defineProperty(V,"introspectionTypes",{enumerable:!0,get:function(){return ge.introspectionTypes}});Object.defineProperty(V,"isAbstractType",{enumerable:!0,get:function(){return ge.isAbstractType}});Object.defineProperty(V,"isCompositeType",{enumerable:!0,get:function(){return ge.isCompositeType}});Object.defineProperty(V,"isConstValueNode",{enumerable:!0,get:function(){return Jt.isConstValueNode}});Object.defineProperty(V,"isDefinitionNode",{enumerable:!0,get:function(){return Jt.isDefinitionNode}});Object.defineProperty(V,"isDirective",{enumerable:!0,get:function(){return ge.isDirective}});Object.defineProperty(V,"isEnumType",{enumerable:!0,get:function(){return ge.isEnumType}});Object.defineProperty(V,"isEqualType",{enumerable:!0,get:function(){return Ht.isEqualType}});Object.defineProperty(V,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Jt.isExecutableDefinitionNode}});Object.defineProperty(V,"isInputObjectType",{enumerable:!0,get:function(){return ge.isInputObjectType}});Object.defineProperty(V,"isInputType",{enumerable:!0,get:function(){return ge.isInputType}});Object.defineProperty(V,"isInterfaceType",{enumerable:!0,get:function(){return ge.isInterfaceType}});Object.defineProperty(V,"isIntrospectionType",{enumerable:!0,get:function(){return ge.isIntrospectionType}});Object.defineProperty(V,"isLeafType",{enumerable:!0,get:function(){return ge.isLeafType}});Object.defineProperty(V,"isListType",{enumerable:!0,get:function(){return ge.isListType}});Object.defineProperty(V,"isNamedType",{enumerable:!0,get:function(){return ge.isNamedType}});Object.defineProperty(V,"isNonNullType",{enumerable:!0,get:function(){return ge.isNonNullType}});Object.defineProperty(V,"isNullableType",{enumerable:!0,get:function(){return ge.isNullableType}});Object.defineProperty(V,"isObjectType",{enumerable:!0,get:function(){return ge.isObjectType}});Object.defineProperty(V,"isOutputType",{enumerable:!0,get:function(){return ge.isOutputType}});Object.defineProperty(V,"isRequiredArgument",{enumerable:!0,get:function(){return ge.isRequiredArgument}});Object.defineProperty(V,"isRequiredInputField",{enumerable:!0,get:function(){return ge.isRequiredInputField}});Object.defineProperty(V,"isScalarType",{enumerable:!0,get:function(){return ge.isScalarType}});Object.defineProperty(V,"isSchema",{enumerable:!0,get:function(){return ge.isSchema}});Object.defineProperty(V,"isSelectionNode",{enumerable:!0,get:function(){return Jt.isSelectionNode}});Object.defineProperty(V,"isSpecifiedDirective",{enumerable:!0,get:function(){return ge.isSpecifiedDirective}});Object.defineProperty(V,"isSpecifiedScalarType",{enumerable:!0,get:function(){return ge.isSpecifiedScalarType}});Object.defineProperty(V,"isType",{enumerable:!0,get:function(){return ge.isType}});Object.defineProperty(V,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Jt.isTypeDefinitionNode}});Object.defineProperty(V,"isTypeExtensionNode",{enumerable:!0,get:function(){return Jt.isTypeExtensionNode}});Object.defineProperty(V,"isTypeNode",{enumerable:!0,get:function(){return Jt.isTypeNode}});Object.defineProperty(V,"isTypeSubTypeOf",{enumerable:!0,get:function(){return Ht.isTypeSubTypeOf}});Object.defineProperty(V,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Jt.isTypeSystemDefinitionNode}});Object.defineProperty(V,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Jt.isTypeSystemExtensionNode}});Object.defineProperty(V,"isUnionType",{enumerable:!0,get:function(){return ge.isUnionType}});Object.defineProperty(V,"isValidNameError",{enumerable:!0,get:function(){return Ht.isValidNameError}});Object.defineProperty(V,"isValueNode",{enumerable:!0,get:function(){return Jt.isValueNode}});Object.defineProperty(V,"isWrappingType",{enumerable:!0,get:function(){return ge.isWrappingType}});Object.defineProperty(V,"lexicographicSortSchema",{enumerable:!0,get:function(){return Ht.lexicographicSortSchema}});Object.defineProperty(V,"locatedError",{enumerable:!0,get:function(){return hp.locatedError}});Object.defineProperty(V,"parse",{enumerable:!0,get:function(){return Jt.parse}});Object.defineProperty(V,"parseConstValue",{enumerable:!0,get:function(){return Jt.parseConstValue}});Object.defineProperty(V,"parseType",{enumerable:!0,get:function(){return Jt.parseType}});Object.defineProperty(V,"parseValue",{enumerable:!0,get:function(){return Jt.parseValue}});Object.defineProperty(V,"print",{enumerable:!0,get:function(){return Jt.print}});Object.defineProperty(V,"printError",{enumerable:!0,get:function(){return hp.printError}});Object.defineProperty(V,"printIntrospectionSchema",{enumerable:!0,get:function(){return Ht.printIntrospectionSchema}});Object.defineProperty(V,"printLocation",{enumerable:!0,get:function(){return Jt.printLocation}});Object.defineProperty(V,"printSchema",{enumerable:!0,get:function(){return Ht.printSchema}});Object.defineProperty(V,"printSourceLocation",{enumerable:!0,get:function(){return Jt.printSourceLocation}});Object.defineProperty(V,"printType",{enumerable:!0,get:function(){return Ht.printType}});Object.defineProperty(V,"recommendedRules",{enumerable:!0,get:function(){return Tt.recommendedRules}});Object.defineProperty(V,"resolveObjMapThunk",{enumerable:!0,get:function(){return ge.resolveObjMapThunk}});Object.defineProperty(V,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return ge.resolveReadonlyArrayThunk}});Object.defineProperty(V,"responsePathAsArray",{enumerable:!0,get:function(){return Ba.responsePathAsArray}});Object.defineProperty(V,"separateOperations",{enumerable:!0,get:function(){return Ht.separateOperations}});Object.defineProperty(V,"specifiedDirectives",{enumerable:!0,get:function(){return ge.specifiedDirectives}});Object.defineProperty(V,"specifiedRules",{enumerable:!0,get:function(){return Tt.specifiedRules}});Object.defineProperty(V,"specifiedScalarTypes",{enumerable:!0,get:function(){return ge.specifiedScalarTypes}});Object.defineProperty(V,"stripIgnoredCharacters",{enumerable:!0,get:function(){return Ht.stripIgnoredCharacters}});Object.defineProperty(V,"subscribe",{enumerable:!0,get:function(){return Ba.subscribe}});Object.defineProperty(V,"syntaxError",{enumerable:!0,get:function(){return hp.syntaxError}});Object.defineProperty(V,"typeFromAST",{enumerable:!0,get:function(){return Ht.typeFromAST}});Object.defineProperty(V,"validate",{enumerable:!0,get:function(){return Tt.validate}});Object.defineProperty(V,"validateSchema",{enumerable:!0,get:function(){return ge.validateSchema}});Object.defineProperty(V,"valueFromAST",{enumerable:!0,get:function(){return Ht.valueFromAST}});Object.defineProperty(V,"valueFromASTUntyped",{enumerable:!0,get:function(){return Ht.valueFromASTUntyped}});Object.defineProperty(V,"version",{enumerable:!0,get:function(){return iC.version}});Object.defineProperty(V,"versionInfo",{enumerable:!0,get:function(){return iC.versionInfo}});Object.defineProperty(V,"visit",{enumerable:!0,get:function(){return Jt.visit}});Object.defineProperty(V,"visitInParallel",{enumerable:!0,get:function(){return Jt.visitInParallel}});Object.defineProperty(V,"visitWithTypeInfo",{enumerable:!0,get:function(){return Ht.visitWithTypeInfo}});var iC=ZR(),aC=Yw(),ge=zw(),Jt=Xw(),Ba=sL(),Tt=lL(),hp=dL(),Ht=rC()});var ur=w(A=>{"use strict";m();T();N();Object.defineProperty(A,"__esModule",{value:!0});A.FIELDS=A.FIELD_SET_SCALAR=A.FIELD_UPPER=A.FIELD_PATH=A.FIELD=A.EXTENSIONS=A.EXTENDS=A.EXTERNAL=A.EXECUTION=A.ENUM_VALUE_UPPER=A.ENUM_VALUE=A.ENUM_UPPER=A.ENUM=A.ENTITY_UNION=A.ENTITIES_FIELD=A.ENTITIES=A.EDFS_REDIS_SUBSCRIBE=A.EDFS_REDIS_PUBLISH=A.EDFS_NATS_STREAM_CONFIGURATION=A.EDFS_PUBLISH_RESULT=A.EDFS_NATS_SUBSCRIBE=A.EDFS_NATS_REQUEST=A.EDFS_NATS_PUBLISH=A.EDFS_KAFKA_SUBSCRIBE=A.EDFS_KAFKA_PUBLISH=A.DIRECTIVE_DEFINITION=A.DESCRIPTION_OVERRIDE=A.DEPRECATED_DEFAULT_ARGUMENT_VALUE=A.DEPRECATED=A.DEFAULT_SUBSCRIPTION=A.DEFAULT_QUERY=A.DEFAULT_MUTATION=A.DEFAULT_EDFS_PROVIDER_ID=A.DEFAULT=A.CONSUMER_NAME=A.CONSUMER_INACTIVE_THRESHOLD=A.CONFIGURE_CHILD_DESCRIPTIONS=A.CONFIGURE_DESCRIPTION=A.CONDITION=A.COMPOSE_DIRECTIVE=A.CHANNELS=A.CHANNEL=A.BOOLEAN_SCALAR=A.BOOLEAN=A.ARGUMENT_DEFINITION_UPPER=A.AUTHENTICATED=A.ARGUMENT=A.ANY_SCALAR=A.AND_UPPER=A.AS=void 0;A.OPERATION_TO_DEFAULT=A.ONE_OF=A.NULL=A.NOT_UPPER=A.NON_NULLABLE_STRING=A.NON_NULLABLE_INT=A.NON_NULLABLE_BOOLEAN=A.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT=A.NAME=A.NOT_APPLICABLE=A.PROVIDER_TYPE_REDIS=A.PROVIDER_TYPE_NATS=A.PROVIDER_TYPE_KAFKA=A.PROPAGATE=A.MUTATION_UPPER=A.MUTATION=A.NUMBER=A.LITERAL_NEW_LINE=A.LITERAL_SPACE=A.LIST=A.LINK_PURPOSE=A.LINK_IMPORT=A.LINK=A.LEVELS=A.LEFT_PARENTHESIS=A.KEY=A.INTERFACE_OBJECT=A.INTERFACE_UPPER=A.INTERFACE=A.INT_SCALAR=A.INPUT_VALUE=A.INPUT_OBJECT_UPPER=A.INPUT_OBJECT=A.INPUT_FIELD_DEFINITION_UPPER=A.INPUT_FIELD=A.INPUT=A.INLINE_FRAGMENT_UPPER=A.INLINE_FRAGMENT=A.INACCESSIBLE=A.IN_UPPER=A.IMPORT=A.ID_SCALAR=A.HYPHEN_JOIN=A.FROM=A.FRAGMENT_SPREAD_UPPER=A.FRAGMENT_DEFINITION_UPPER=A.FOR=A.FLOAT_SCALAR=A.FIRST_ORDINAL=A.FIELD_DEFINITION_UPPER=void 0;A.TOPICS=A.TOPIC=A.TAG=A.SUCCESS=A.SUBSCRIPTION_UPPER=A.SUBSCRIBE=A.SUBSCRIPTION_FILTER_VALUE=A.SUBSCRIPTION_FILTER_CONDITION=A.SUBSCRIPTION_FILTER=A.SUBSCRIPTION_FIELD_CONDITION=A.SUBSCRIPTION=A.SUBJECTS=A.SUBJECT=A.STRING_SCALAR=A.STRING=A.STREAM_NAME=A.STREAM_CONFIGURATION=A.SPECIFIED_BY=A.SHAREABLE=A.SERVICE_FIELD=A.SERVICE_OBJECT=A.SEMANTIC_NON_NULL=A.SELECTION_REPRESENTATION=A.SECURITY=A.SCOPE_SCALAR=A.SCOPES=A.SCHEMA_UPPER=A.SCHEMA=A.SCALAR_UPPER=A.SCALAR=A.RESOLVABLE=A.REQUIRES_SCOPES=A.REQUIRES=A.REQUIRE_FETCH_REASONS=A.REQUEST=A.REASON=A.QUOTATION_JOIN=A.QUERY_UPPER=A.QUERY=A.PUBLISH=A.PROVIDES=A.PROVIDER_ID=A.PERIOD=A.PARENT_EXTENSION_DATA_MAP=A.PARENT_DEFINITION_DATA_MAP=A.PARENT_DEFINITION_DATA=A.OVERRIDE=A.OR_UPPER=A.OBJECT_UPPER=A.OBJECT=void 0;A.NON_REPEATABLE_PERSISTED_DIRECTIVES=A.OUTPUT_NODE_KINDS=A.INPUT_NODE_KINDS=A.IGNORED_FIELDS=A.INHERITABLE_DIRECTIVE_NAMES=A.PERSISTED_CLIENT_DIRECTIVES=A.AUTHORIZATION_DIRECTIVES=A.ROOT_TYPE_NAMES=A.EXECUTABLE_DIRECTIVE_LOCATIONS=A.VARIABLE_DEFINITION_UPPER=A.VALUES=A.URL_LOWER=A.UNION_UPPER=A.UNION=void 0;var au=Ae();A.AS="as";A.AND_UPPER="AND";A.ANY_SCALAR="_Any";A.ARGUMENT="argument";A.AUTHENTICATED="authenticated";A.ARGUMENT_DEFINITION_UPPER="ARGUMENT_DEFINITION";A.BOOLEAN="boolean";A.BOOLEAN_SCALAR="Boolean";A.CHANNEL="channel";A.CHANNELS="channels";A.COMPOSE_DIRECTIVE="composeDirective";A.CONDITION="condition";A.CONFIGURE_DESCRIPTION="openfed__configureDescription";A.CONFIGURE_CHILD_DESCRIPTIONS="openfed__configureChildDescriptions";A.CONSUMER_INACTIVE_THRESHOLD="consumerInactiveThreshold";A.CONSUMER_NAME="consumerName";A.DEFAULT="default";A.DEFAULT_EDFS_PROVIDER_ID="default";A.DEFAULT_MUTATION="Mutation";A.DEFAULT_QUERY="Query";A.DEFAULT_SUBSCRIPTION="Subscription";A.DEPRECATED="deprecated";A.DEPRECATED_DEFAULT_ARGUMENT_VALUE="No longer supported";A.DESCRIPTION_OVERRIDE="descriptionOverride";A.DIRECTIVE_DEFINITION="directive definition";A.EDFS_KAFKA_PUBLISH="edfs__kafkaPublish";A.EDFS_KAFKA_SUBSCRIBE="edfs__kafkaSubscribe";A.EDFS_NATS_PUBLISH="edfs__natsPublish";A.EDFS_NATS_REQUEST="edfs__natsRequest";A.EDFS_NATS_SUBSCRIBE="edfs__natsSubscribe";A.EDFS_PUBLISH_RESULT="edfs__PublishResult";A.EDFS_NATS_STREAM_CONFIGURATION="edfs__NatsStreamConfiguration";A.EDFS_REDIS_PUBLISH="edfs__redisPublish";A.EDFS_REDIS_SUBSCRIBE="edfs__redisSubscribe";A.ENTITIES="entities";A.ENTITIES_FIELD="_entities";A.ENTITY_UNION="_Entity";A.ENUM="Enum";A.ENUM_UPPER="ENUM";A.ENUM_VALUE="Enum Value";A.ENUM_VALUE_UPPER="ENUM_VALUE";A.EXECUTION="EXECUTION";A.EXTERNAL="external";A.EXTENDS="extends";A.EXTENSIONS="extensions";A.FIELD="field";A.FIELD_PATH="fieldPath";A.FIELD_UPPER="FIELD";A.FIELD_SET_SCALAR="openfed__FieldSet";A.FIELDS="fields";A.FIELD_DEFINITION_UPPER="FIELD_DEFINITION";A.FIRST_ORDINAL="1st";A.FLOAT_SCALAR="Float";A.FOR="for";A.FRAGMENT_DEFINITION_UPPER="FRAGMENT_DEFINITION";A.FRAGMENT_SPREAD_UPPER="FRAGMENT_SPREAD";A.FROM="from";A.HYPHEN_JOIN=` +`}});var aC=w(yv=>{"use strict";m();T();N();Object.defineProperty(yv,"__esModule",{value:!0});yv.concatAST=xX;var MX=Ft();function xX(e){let t=[];for(let n of e)t.push(...n.definitions);return{kind:MX.Kind.DOCUMENT,definitions:t}}});var uC=w(Iv=>{"use strict";m();T();N();Object.defineProperty(Iv,"__esModule",{value:!0});Iv.separateOperations=VX;var LN=Ft(),qX=Qu();function VX(e){let t=[],n=Object.create(null);for(let i of e.definitions)switch(i.kind){case LN.Kind.OPERATION_DEFINITION:t.push(i);break;case LN.Kind.FRAGMENT_DEFINITION:n[i.name.value]=sC(i.selectionSet);break;default:}let r=Object.create(null);for(let i of t){let a=new Set;for(let c of sC(i.selectionSet))oC(a,n,c);let o=i.name?i.name.value:"";r[o]={kind:LN.Kind.DOCUMENT,definitions:e.definitions.filter(c=>c===i||c.kind===LN.Kind.FRAGMENT_DEFINITION&&a.has(c.name.value))}}return r}function oC(e,t,n){if(!e.has(n)){e.add(n);let r=t[n];if(r!==void 0)for(let i of r)oC(e,t,i)}}function sC(e){let t=[];return(0,qX.visit)(e,{FragmentSpread(n){t.push(n.name.value)}}),t}});var dC=w(_v=>{"use strict";m();T();N();Object.defineProperty(_v,"__esModule",{value:!0});_v.stripIgnoredCharacters=KX;var jX=Pd(),cC=Sm(),lC=Am(),gv=wd();function KX(e){let t=(0,lC.isSource)(e)?e:new lC.Source(e),n=t.body,r=new cC.Lexer(t),i="",a=!1;for(;r.advance().kind!==gv.TokenKind.EOF;){let o=r.token,c=o.kind,l=!(0,cC.isPunctuatorTokenKind)(o.kind);a&&(l||o.kind===gv.TokenKind.SPREAD)&&(i+=" ");let d=n.slice(o.start,o.end);c===gv.TokenKind.BLOCK_STRING?i+=(0,jX.printBlockString)(o.value,{minimize:!0}):i+=d,a=l}return i}});var fC=w(CN=>{"use strict";m();T();N();Object.defineProperty(CN,"__esModule",{value:!0});CN.assertValidName=YX;CN.isValidNameError=pC;var GX=Br(),$X=ze(),QX=qd();function YX(e){let t=pC(e);if(t)throw t;return e}function pC(e){if(typeof e=="string"||(0,GX.devAssert)(!1,"Expected name to be a string."),e.startsWith("__"))return new $X.GraphQLError(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{(0,QX.assertName)(e)}catch(t){return t}}});var gC=w(Ua=>{"use strict";m();T();N();Object.defineProperty(Ua,"__esModule",{value:!0});Ua.DangerousChangeType=Ua.BreakingChangeType=void 0;Ua.findBreakingChanges=ZX;Ua.findDangerousChanges=e9;var JX=Xt(),yC=Ir(),mC=tu(),HX=ci(),jt=wt(),zX=Pa(),WX=Xd(),XX=Og(),Ln;Ua.BreakingChangeType=Ln;(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"})(Ln||(Ua.BreakingChangeType=Ln={}));var ua;Ua.DangerousChangeType=ua;(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"})(ua||(Ua.DangerousChangeType=ua={}));function ZX(e,t){return IC(e,t).filter(n=>n.type in Ln)}function e9(e,t){return IC(e,t).filter(n=>n.type in ua)}function IC(e,t){return[...n9(e,t),...t9(e,t)]}function t9(e,t){let n=[],r=_s(e.getDirectives(),t.getDirectives());for(let i of r.removed)n.push({type:Ln.DIRECTIVE_REMOVED,description:`${i.name} was removed.`});for(let[i,a]of r.persisted){let o=_s(i.args,a.args);for(let c of o.added)(0,jt.isRequiredArgument)(c)&&n.push({type:Ln.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:Ln.DIRECTIVE_ARG_REMOVED,description:`${c.name} was removed from ${i.name}.`});i.isRepeatable&&!a.isRepeatable&&n.push({type:Ln.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${i.name}.`});for(let c of i.locations)a.locations.includes(c)||n.push({type:Ln.DIRECTIVE_LOCATION_REMOVED,description:`${c} was removed from ${i.name}.`})}return n}function n9(e,t){let n=[],r=_s(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(let i of r.removed)n.push({type:Ln.TYPE_REMOVED,description:(0,zX.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,jt.isEnumType)(i)&&(0,jt.isEnumType)(a)?n.push(...a9(i,a)):(0,jt.isUnionType)(i)&&(0,jt.isUnionType)(a)?n.push(...i9(i,a)):(0,jt.isInputObjectType)(i)&&(0,jt.isInputObjectType)(a)?n.push(...r9(i,a)):(0,jt.isObjectType)(i)&&(0,jt.isObjectType)(a)?n.push(...TC(i,a),...NC(i,a)):(0,jt.isInterfaceType)(i)&&(0,jt.isInterfaceType)(a)?n.push(...TC(i,a),...NC(i,a)):i.constructor!==a.constructor&&n.push({type:Ln.TYPE_CHANGED_KIND,description:`${i.name} changed from ${EC(i)} to ${EC(a)}.`});return n}function r9(e,t){let n=[],r=_s(Object.values(e.getFields()),Object.values(t.getFields()));for(let i of r.added)(0,jt.isRequiredInputField)(i)?n.push({type:Ln.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${i.name} on input type ${e.name} was added.`}):n.push({type:ua.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:Ln.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(let[i,a]of r.persisted)gp(i.type,a.type)||n.push({type:Ln.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function i9(e,t){let n=[],r=_s(e.getTypes(),t.getTypes());for(let i of r.added)n.push({type:ua.TYPE_ADDED_TO_UNION,description:`${i.name} was added to union type ${e.name}.`});for(let i of r.removed)n.push({type:Ln.TYPE_REMOVED_FROM_UNION,description:`${i.name} was removed from union type ${e.name}.`});return n}function a9(e,t){let n=[],r=_s(e.getValues(),t.getValues());for(let i of r.added)n.push({type:ua.VALUE_ADDED_TO_ENUM,description:`${i.name} was added to enum type ${e.name}.`});for(let i of r.removed)n.push({type:Ln.VALUE_REMOVED_FROM_ENUM,description:`${i.name} was removed from enum type ${e.name}.`});return n}function NC(e,t){let n=[],r=_s(e.getInterfaces(),t.getInterfaces());for(let i of r.added)n.push({type:ua.IMPLEMENTED_INTERFACE_ADDED,description:`${i.name} added to interfaces implemented by ${e.name}.`});for(let i of r.removed)n.push({type:Ln.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${i.name}.`});return n}function TC(e,t){let n=[],r=_s(Object.values(e.getFields()),Object.values(t.getFields()));for(let i of r.removed)n.push({type:Ln.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(let[i,a]of r.persisted)n.push(...s9(e,i,a)),Ip(i.type,a.type)||n.push({type:Ln.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(a.type)}.`});return n}function s9(e,t,n){let r=[],i=_s(t.args,n.args);for(let a of i.removed)r.push({type:Ln.ARG_REMOVED,description:`${e.name}.${t.name} arg ${a.name} was removed.`});for(let[a,o]of i.persisted)if(!gp(a.type,o.type))r.push({type:Ln.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:ua.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${a.name} defaultValue was removed.`});else{let l=hC(a.defaultValue,a.type),d=hC(o.defaultValue,o.type);l!==d&&r.push({type:ua.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,jt.isRequiredArgument)(a)?r.push({type:Ln.REQUIRED_ARG_ADDED,description:`A required arg ${a.name} on ${e.name}.${t.name} was added.`}):r.push({type:ua.OPTIONAL_ARG_ADDED,description:`An optional arg ${a.name} on ${e.name}.${t.name} was added.`});return r}function Ip(e,t){return(0,jt.isListType)(e)?(0,jt.isListType)(t)&&Ip(e.ofType,t.ofType)||(0,jt.isNonNullType)(t)&&Ip(e,t.ofType):(0,jt.isNonNullType)(e)?(0,jt.isNonNullType)(t)&&Ip(e.ofType,t.ofType):(0,jt.isNamedType)(t)&&e.name===t.name||(0,jt.isNonNullType)(t)&&Ip(e,t.ofType)}function gp(e,t){return(0,jt.isListType)(e)?(0,jt.isListType)(t)&&gp(e.ofType,t.ofType):(0,jt.isNonNullType)(e)?(0,jt.isNonNullType)(t)&&gp(e.ofType,t.ofType)||!(0,jt.isNonNullType)(t)&&gp(e.ofType,t):(0,jt.isNamedType)(t)&&e.name===t.name}function EC(e){if((0,jt.isScalarType)(e))return"a Scalar type";if((0,jt.isObjectType)(e))return"an Object type";if((0,jt.isInterfaceType)(e))return"an Interface type";if((0,jt.isUnionType)(e))return"a Union type";if((0,jt.isEnumType)(e))return"an Enum type";if((0,jt.isInputObjectType)(e))return"an Input type";(0,yC.invariant)(!1,"Unexpected type: "+(0,JX.inspect)(e))}function hC(e,t){let n=(0,WX.astFromValue)(e,t);return n!=null||(0,yC.invariant)(!1),(0,HX.print)((0,XX.sortValueNode)(n))}function _s(e,t){let n=[],r=[],i=[],a=(0,mC.keyMap)(e,({name:c})=>c),o=(0,mC.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 OC=w(Mt=>{"use strict";m();T();N();Object.defineProperty(Mt,"__esModule",{value:!0});Object.defineProperty(Mt,"BreakingChangeType",{enumerable:!0,get:function(){return BN.BreakingChangeType}});Object.defineProperty(Mt,"DangerousChangeType",{enumerable:!0,get:function(){return BN.DangerousChangeType}});Object.defineProperty(Mt,"TypeInfo",{enumerable:!0,get:function(){return vC.TypeInfo}});Object.defineProperty(Mt,"assertValidName",{enumerable:!0,get:function(){return SC.assertValidName}});Object.defineProperty(Mt,"astFromValue",{enumerable:!0,get:function(){return E9.astFromValue}});Object.defineProperty(Mt,"buildASTSchema",{enumerable:!0,get:function(){return _C.buildASTSchema}});Object.defineProperty(Mt,"buildClientSchema",{enumerable:!0,get:function(){return d9.buildClientSchema}});Object.defineProperty(Mt,"buildSchema",{enumerable:!0,get:function(){return _C.buildSchema}});Object.defineProperty(Mt,"coerceInputValue",{enumerable:!0,get:function(){return h9.coerceInputValue}});Object.defineProperty(Mt,"concatAST",{enumerable:!0,get:function(){return y9.concatAST}});Object.defineProperty(Mt,"doTypesOverlap",{enumerable:!0,get:function(){return Sv.doTypesOverlap}});Object.defineProperty(Mt,"extendSchema",{enumerable:!0,get:function(){return p9.extendSchema}});Object.defineProperty(Mt,"findBreakingChanges",{enumerable:!0,get:function(){return BN.findBreakingChanges}});Object.defineProperty(Mt,"findDangerousChanges",{enumerable:!0,get:function(){return BN.findDangerousChanges}});Object.defineProperty(Mt,"getIntrospectionQuery",{enumerable:!0,get:function(){return o9.getIntrospectionQuery}});Object.defineProperty(Mt,"getOperationAST",{enumerable:!0,get:function(){return u9.getOperationAST}});Object.defineProperty(Mt,"getOperationRootType",{enumerable:!0,get:function(){return c9.getOperationRootType}});Object.defineProperty(Mt,"introspectionFromSchema",{enumerable:!0,get:function(){return l9.introspectionFromSchema}});Object.defineProperty(Mt,"isEqualType",{enumerable:!0,get:function(){return Sv.isEqualType}});Object.defineProperty(Mt,"isTypeSubTypeOf",{enumerable:!0,get:function(){return Sv.isTypeSubTypeOf}});Object.defineProperty(Mt,"isValidNameError",{enumerable:!0,get:function(){return SC.isValidNameError}});Object.defineProperty(Mt,"lexicographicSortSchema",{enumerable:!0,get:function(){return f9.lexicographicSortSchema}});Object.defineProperty(Mt,"printIntrospectionSchema",{enumerable:!0,get:function(){return vv.printIntrospectionSchema}});Object.defineProperty(Mt,"printSchema",{enumerable:!0,get:function(){return vv.printSchema}});Object.defineProperty(Mt,"printType",{enumerable:!0,get:function(){return vv.printType}});Object.defineProperty(Mt,"separateOperations",{enumerable:!0,get:function(){return I9.separateOperations}});Object.defineProperty(Mt,"stripIgnoredCharacters",{enumerable:!0,get:function(){return g9.stripIgnoredCharacters}});Object.defineProperty(Mt,"typeFromAST",{enumerable:!0,get:function(){return m9.typeFromAST}});Object.defineProperty(Mt,"valueFromAST",{enumerable:!0,get:function(){return N9.valueFromAST}});Object.defineProperty(Mt,"valueFromASTUntyped",{enumerable:!0,get:function(){return T9.valueFromASTUntyped}});Object.defineProperty(Mt,"visitWithTypeInfo",{enumerable:!0,get:function(){return vC.visitWithTypeInfo}});var o9=av(),u9=CL(),c9=BL(),l9=UL(),d9=ML(),_C=JL(),p9=dv(),f9=WL(),vv=iC(),m9=Fa(),N9=up(),T9=gI(),E9=Xd(),vC=nN(),h9=$g(),y9=aC(),I9=uC(),g9=dC(),Sv=$d(),SC=fC(),BN=gC()});var Ae=w(V=>{"use strict";m();T();N();Object.defineProperty(V,"__esModule",{value:!0});Object.defineProperty(V,"BREAK",{enumerable:!0,get:function(){return Jt.BREAK}});Object.defineProperty(V,"BreakingChangeType",{enumerable:!0,get:function(){return Ht.BreakingChangeType}});Object.defineProperty(V,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return ge.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(V,"DangerousChangeType",{enumerable:!0,get:function(){return Ht.DangerousChangeType}});Object.defineProperty(V,"DirectiveLocation",{enumerable:!0,get:function(){return Jt.DirectiveLocation}});Object.defineProperty(V,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return Tt.ExecutableDefinitionsRule}});Object.defineProperty(V,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return Tt.FieldsOnCorrectTypeRule}});Object.defineProperty(V,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return Tt.FragmentsOnCompositeTypesRule}});Object.defineProperty(V,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return ge.GRAPHQL_MAX_INT}});Object.defineProperty(V,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return ge.GRAPHQL_MIN_INT}});Object.defineProperty(V,"GraphQLBoolean",{enumerable:!0,get:function(){return ge.GraphQLBoolean}});Object.defineProperty(V,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return ge.GraphQLDeprecatedDirective}});Object.defineProperty(V,"GraphQLDirective",{enumerable:!0,get:function(){return ge.GraphQLDirective}});Object.defineProperty(V,"GraphQLEnumType",{enumerable:!0,get:function(){return ge.GraphQLEnumType}});Object.defineProperty(V,"GraphQLError",{enumerable:!0,get:function(){return _p.GraphQLError}});Object.defineProperty(V,"GraphQLFloat",{enumerable:!0,get:function(){return ge.GraphQLFloat}});Object.defineProperty(V,"GraphQLID",{enumerable:!0,get:function(){return ge.GraphQLID}});Object.defineProperty(V,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return ge.GraphQLIncludeDirective}});Object.defineProperty(V,"GraphQLInputObjectType",{enumerable:!0,get:function(){return ge.GraphQLInputObjectType}});Object.defineProperty(V,"GraphQLInt",{enumerable:!0,get:function(){return ge.GraphQLInt}});Object.defineProperty(V,"GraphQLInterfaceType",{enumerable:!0,get:function(){return ge.GraphQLInterfaceType}});Object.defineProperty(V,"GraphQLList",{enumerable:!0,get:function(){return ge.GraphQLList}});Object.defineProperty(V,"GraphQLNonNull",{enumerable:!0,get:function(){return ge.GraphQLNonNull}});Object.defineProperty(V,"GraphQLObjectType",{enumerable:!0,get:function(){return ge.GraphQLObjectType}});Object.defineProperty(V,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return ge.GraphQLOneOfDirective}});Object.defineProperty(V,"GraphQLScalarType",{enumerable:!0,get:function(){return ge.GraphQLScalarType}});Object.defineProperty(V,"GraphQLSchema",{enumerable:!0,get:function(){return ge.GraphQLSchema}});Object.defineProperty(V,"GraphQLSkipDirective",{enumerable:!0,get:function(){return ge.GraphQLSkipDirective}});Object.defineProperty(V,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return ge.GraphQLSpecifiedByDirective}});Object.defineProperty(V,"GraphQLString",{enumerable:!0,get:function(){return ge.GraphQLString}});Object.defineProperty(V,"GraphQLUnionType",{enumerable:!0,get:function(){return ge.GraphQLUnionType}});Object.defineProperty(V,"Kind",{enumerable:!0,get:function(){return Jt.Kind}});Object.defineProperty(V,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return Tt.KnownArgumentNamesRule}});Object.defineProperty(V,"KnownDirectivesRule",{enumerable:!0,get:function(){return Tt.KnownDirectivesRule}});Object.defineProperty(V,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return Tt.KnownFragmentNamesRule}});Object.defineProperty(V,"KnownTypeNamesRule",{enumerable:!0,get:function(){return Tt.KnownTypeNamesRule}});Object.defineProperty(V,"Lexer",{enumerable:!0,get:function(){return Jt.Lexer}});Object.defineProperty(V,"Location",{enumerable:!0,get:function(){return Jt.Location}});Object.defineProperty(V,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return Tt.LoneAnonymousOperationRule}});Object.defineProperty(V,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return Tt.LoneSchemaDefinitionRule}});Object.defineProperty(V,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return Tt.MaxIntrospectionDepthRule}});Object.defineProperty(V,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return Tt.NoDeprecatedCustomRule}});Object.defineProperty(V,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return Tt.NoFragmentCyclesRule}});Object.defineProperty(V,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return Tt.NoSchemaIntrospectionCustomRule}});Object.defineProperty(V,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return Tt.NoUndefinedVariablesRule}});Object.defineProperty(V,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return Tt.NoUnusedFragmentsRule}});Object.defineProperty(V,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return Tt.NoUnusedVariablesRule}});Object.defineProperty(V,"OperationTypeNode",{enumerable:!0,get:function(){return Jt.OperationTypeNode}});Object.defineProperty(V,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return Tt.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(V,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return Tt.PossibleFragmentSpreadsRule}});Object.defineProperty(V,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return Tt.PossibleTypeExtensionsRule}});Object.defineProperty(V,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return Tt.ProvidedRequiredArgumentsRule}});Object.defineProperty(V,"ScalarLeafsRule",{enumerable:!0,get:function(){return Tt.ScalarLeafsRule}});Object.defineProperty(V,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return ge.SchemaMetaFieldDef}});Object.defineProperty(V,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return Tt.SingleFieldSubscriptionsRule}});Object.defineProperty(V,"Source",{enumerable:!0,get:function(){return Jt.Source}});Object.defineProperty(V,"Token",{enumerable:!0,get:function(){return Jt.Token}});Object.defineProperty(V,"TokenKind",{enumerable:!0,get:function(){return Jt.TokenKind}});Object.defineProperty(V,"TypeInfo",{enumerable:!0,get:function(){return Ht.TypeInfo}});Object.defineProperty(V,"TypeKind",{enumerable:!0,get:function(){return ge.TypeKind}});Object.defineProperty(V,"TypeMetaFieldDef",{enumerable:!0,get:function(){return ge.TypeMetaFieldDef}});Object.defineProperty(V,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return ge.TypeNameMetaFieldDef}});Object.defineProperty(V,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return Tt.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(V,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return Tt.UniqueArgumentNamesRule}});Object.defineProperty(V,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return Tt.UniqueDirectiveNamesRule}});Object.defineProperty(V,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return Tt.UniqueDirectivesPerLocationRule}});Object.defineProperty(V,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return Tt.UniqueEnumValueNamesRule}});Object.defineProperty(V,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return Tt.UniqueFieldDefinitionNamesRule}});Object.defineProperty(V,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return Tt.UniqueFragmentNamesRule}});Object.defineProperty(V,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return Tt.UniqueInputFieldNamesRule}});Object.defineProperty(V,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return Tt.UniqueOperationNamesRule}});Object.defineProperty(V,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return Tt.UniqueOperationTypesRule}});Object.defineProperty(V,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return Tt.UniqueTypeNamesRule}});Object.defineProperty(V,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return Tt.UniqueVariableNamesRule}});Object.defineProperty(V,"ValidationContext",{enumerable:!0,get:function(){return Tt.ValidationContext}});Object.defineProperty(V,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return Tt.ValuesOfCorrectTypeRule}});Object.defineProperty(V,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return Tt.VariablesAreInputTypesRule}});Object.defineProperty(V,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return Tt.VariablesInAllowedPositionRule}});Object.defineProperty(V,"__Directive",{enumerable:!0,get:function(){return ge.__Directive}});Object.defineProperty(V,"__DirectiveLocation",{enumerable:!0,get:function(){return ge.__DirectiveLocation}});Object.defineProperty(V,"__EnumValue",{enumerable:!0,get:function(){return ge.__EnumValue}});Object.defineProperty(V,"__Field",{enumerable:!0,get:function(){return ge.__Field}});Object.defineProperty(V,"__InputValue",{enumerable:!0,get:function(){return ge.__InputValue}});Object.defineProperty(V,"__Schema",{enumerable:!0,get:function(){return ge.__Schema}});Object.defineProperty(V,"__Type",{enumerable:!0,get:function(){return ge.__Type}});Object.defineProperty(V,"__TypeKind",{enumerable:!0,get:function(){return ge.__TypeKind}});Object.defineProperty(V,"assertAbstractType",{enumerable:!0,get:function(){return ge.assertAbstractType}});Object.defineProperty(V,"assertCompositeType",{enumerable:!0,get:function(){return ge.assertCompositeType}});Object.defineProperty(V,"assertDirective",{enumerable:!0,get:function(){return ge.assertDirective}});Object.defineProperty(V,"assertEnumType",{enumerable:!0,get:function(){return ge.assertEnumType}});Object.defineProperty(V,"assertEnumValueName",{enumerable:!0,get:function(){return ge.assertEnumValueName}});Object.defineProperty(V,"assertInputObjectType",{enumerable:!0,get:function(){return ge.assertInputObjectType}});Object.defineProperty(V,"assertInputType",{enumerable:!0,get:function(){return ge.assertInputType}});Object.defineProperty(V,"assertInterfaceType",{enumerable:!0,get:function(){return ge.assertInterfaceType}});Object.defineProperty(V,"assertLeafType",{enumerable:!0,get:function(){return ge.assertLeafType}});Object.defineProperty(V,"assertListType",{enumerable:!0,get:function(){return ge.assertListType}});Object.defineProperty(V,"assertName",{enumerable:!0,get:function(){return ge.assertName}});Object.defineProperty(V,"assertNamedType",{enumerable:!0,get:function(){return ge.assertNamedType}});Object.defineProperty(V,"assertNonNullType",{enumerable:!0,get:function(){return ge.assertNonNullType}});Object.defineProperty(V,"assertNullableType",{enumerable:!0,get:function(){return ge.assertNullableType}});Object.defineProperty(V,"assertObjectType",{enumerable:!0,get:function(){return ge.assertObjectType}});Object.defineProperty(V,"assertOutputType",{enumerable:!0,get:function(){return ge.assertOutputType}});Object.defineProperty(V,"assertScalarType",{enumerable:!0,get:function(){return ge.assertScalarType}});Object.defineProperty(V,"assertSchema",{enumerable:!0,get:function(){return ge.assertSchema}});Object.defineProperty(V,"assertType",{enumerable:!0,get:function(){return ge.assertType}});Object.defineProperty(V,"assertUnionType",{enumerable:!0,get:function(){return ge.assertUnionType}});Object.defineProperty(V,"assertValidName",{enumerable:!0,get:function(){return Ht.assertValidName}});Object.defineProperty(V,"assertValidSchema",{enumerable:!0,get:function(){return ge.assertValidSchema}});Object.defineProperty(V,"assertWrappingType",{enumerable:!0,get:function(){return ge.assertWrappingType}});Object.defineProperty(V,"astFromValue",{enumerable:!0,get:function(){return Ht.astFromValue}});Object.defineProperty(V,"buildASTSchema",{enumerable:!0,get:function(){return Ht.buildASTSchema}});Object.defineProperty(V,"buildClientSchema",{enumerable:!0,get:function(){return Ht.buildClientSchema}});Object.defineProperty(V,"buildSchema",{enumerable:!0,get:function(){return Ht.buildSchema}});Object.defineProperty(V,"coerceInputValue",{enumerable:!0,get:function(){return Ht.coerceInputValue}});Object.defineProperty(V,"concatAST",{enumerable:!0,get:function(){return Ht.concatAST}});Object.defineProperty(V,"createSourceEventStream",{enumerable:!0,get:function(){return ka.createSourceEventStream}});Object.defineProperty(V,"defaultFieldResolver",{enumerable:!0,get:function(){return ka.defaultFieldResolver}});Object.defineProperty(V,"defaultTypeResolver",{enumerable:!0,get:function(){return ka.defaultTypeResolver}});Object.defineProperty(V,"doTypesOverlap",{enumerable:!0,get:function(){return Ht.doTypesOverlap}});Object.defineProperty(V,"execute",{enumerable:!0,get:function(){return ka.execute}});Object.defineProperty(V,"executeSync",{enumerable:!0,get:function(){return ka.executeSync}});Object.defineProperty(V,"extendSchema",{enumerable:!0,get:function(){return Ht.extendSchema}});Object.defineProperty(V,"findBreakingChanges",{enumerable:!0,get:function(){return Ht.findBreakingChanges}});Object.defineProperty(V,"findDangerousChanges",{enumerable:!0,get:function(){return Ht.findDangerousChanges}});Object.defineProperty(V,"formatError",{enumerable:!0,get:function(){return _p.formatError}});Object.defineProperty(V,"getArgumentValues",{enumerable:!0,get:function(){return ka.getArgumentValues}});Object.defineProperty(V,"getDirectiveValues",{enumerable:!0,get:function(){return ka.getDirectiveValues}});Object.defineProperty(V,"getEnterLeaveForKind",{enumerable:!0,get:function(){return Jt.getEnterLeaveForKind}});Object.defineProperty(V,"getIntrospectionQuery",{enumerable:!0,get:function(){return Ht.getIntrospectionQuery}});Object.defineProperty(V,"getLocation",{enumerable:!0,get:function(){return Jt.getLocation}});Object.defineProperty(V,"getNamedType",{enumerable:!0,get:function(){return ge.getNamedType}});Object.defineProperty(V,"getNullableType",{enumerable:!0,get:function(){return ge.getNullableType}});Object.defineProperty(V,"getOperationAST",{enumerable:!0,get:function(){return Ht.getOperationAST}});Object.defineProperty(V,"getOperationRootType",{enumerable:!0,get:function(){return Ht.getOperationRootType}});Object.defineProperty(V,"getVariableValues",{enumerable:!0,get:function(){return ka.getVariableValues}});Object.defineProperty(V,"getVisitFn",{enumerable:!0,get:function(){return Jt.getVisitFn}});Object.defineProperty(V,"graphql",{enumerable:!0,get:function(){return bC.graphql}});Object.defineProperty(V,"graphqlSync",{enumerable:!0,get:function(){return bC.graphqlSync}});Object.defineProperty(V,"introspectionFromSchema",{enumerable:!0,get:function(){return Ht.introspectionFromSchema}});Object.defineProperty(V,"introspectionTypes",{enumerable:!0,get:function(){return ge.introspectionTypes}});Object.defineProperty(V,"isAbstractType",{enumerable:!0,get:function(){return ge.isAbstractType}});Object.defineProperty(V,"isCompositeType",{enumerable:!0,get:function(){return ge.isCompositeType}});Object.defineProperty(V,"isConstValueNode",{enumerable:!0,get:function(){return Jt.isConstValueNode}});Object.defineProperty(V,"isDefinitionNode",{enumerable:!0,get:function(){return Jt.isDefinitionNode}});Object.defineProperty(V,"isDirective",{enumerable:!0,get:function(){return ge.isDirective}});Object.defineProperty(V,"isEnumType",{enumerable:!0,get:function(){return ge.isEnumType}});Object.defineProperty(V,"isEqualType",{enumerable:!0,get:function(){return Ht.isEqualType}});Object.defineProperty(V,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Jt.isExecutableDefinitionNode}});Object.defineProperty(V,"isInputObjectType",{enumerable:!0,get:function(){return ge.isInputObjectType}});Object.defineProperty(V,"isInputType",{enumerable:!0,get:function(){return ge.isInputType}});Object.defineProperty(V,"isInterfaceType",{enumerable:!0,get:function(){return ge.isInterfaceType}});Object.defineProperty(V,"isIntrospectionType",{enumerable:!0,get:function(){return ge.isIntrospectionType}});Object.defineProperty(V,"isLeafType",{enumerable:!0,get:function(){return ge.isLeafType}});Object.defineProperty(V,"isListType",{enumerable:!0,get:function(){return ge.isListType}});Object.defineProperty(V,"isNamedType",{enumerable:!0,get:function(){return ge.isNamedType}});Object.defineProperty(V,"isNonNullType",{enumerable:!0,get:function(){return ge.isNonNullType}});Object.defineProperty(V,"isNullableType",{enumerable:!0,get:function(){return ge.isNullableType}});Object.defineProperty(V,"isObjectType",{enumerable:!0,get:function(){return ge.isObjectType}});Object.defineProperty(V,"isOutputType",{enumerable:!0,get:function(){return ge.isOutputType}});Object.defineProperty(V,"isRequiredArgument",{enumerable:!0,get:function(){return ge.isRequiredArgument}});Object.defineProperty(V,"isRequiredInputField",{enumerable:!0,get:function(){return ge.isRequiredInputField}});Object.defineProperty(V,"isScalarType",{enumerable:!0,get:function(){return ge.isScalarType}});Object.defineProperty(V,"isSchema",{enumerable:!0,get:function(){return ge.isSchema}});Object.defineProperty(V,"isSelectionNode",{enumerable:!0,get:function(){return Jt.isSelectionNode}});Object.defineProperty(V,"isSpecifiedDirective",{enumerable:!0,get:function(){return ge.isSpecifiedDirective}});Object.defineProperty(V,"isSpecifiedScalarType",{enumerable:!0,get:function(){return ge.isSpecifiedScalarType}});Object.defineProperty(V,"isType",{enumerable:!0,get:function(){return ge.isType}});Object.defineProperty(V,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Jt.isTypeDefinitionNode}});Object.defineProperty(V,"isTypeExtensionNode",{enumerable:!0,get:function(){return Jt.isTypeExtensionNode}});Object.defineProperty(V,"isTypeNode",{enumerable:!0,get:function(){return Jt.isTypeNode}});Object.defineProperty(V,"isTypeSubTypeOf",{enumerable:!0,get:function(){return Ht.isTypeSubTypeOf}});Object.defineProperty(V,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Jt.isTypeSystemDefinitionNode}});Object.defineProperty(V,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Jt.isTypeSystemExtensionNode}});Object.defineProperty(V,"isUnionType",{enumerable:!0,get:function(){return ge.isUnionType}});Object.defineProperty(V,"isValidNameError",{enumerable:!0,get:function(){return Ht.isValidNameError}});Object.defineProperty(V,"isValueNode",{enumerable:!0,get:function(){return Jt.isValueNode}});Object.defineProperty(V,"isWrappingType",{enumerable:!0,get:function(){return ge.isWrappingType}});Object.defineProperty(V,"lexicographicSortSchema",{enumerable:!0,get:function(){return Ht.lexicographicSortSchema}});Object.defineProperty(V,"locatedError",{enumerable:!0,get:function(){return _p.locatedError}});Object.defineProperty(V,"parse",{enumerable:!0,get:function(){return Jt.parse}});Object.defineProperty(V,"parseConstValue",{enumerable:!0,get:function(){return Jt.parseConstValue}});Object.defineProperty(V,"parseType",{enumerable:!0,get:function(){return Jt.parseType}});Object.defineProperty(V,"parseValue",{enumerable:!0,get:function(){return Jt.parseValue}});Object.defineProperty(V,"print",{enumerable:!0,get:function(){return Jt.print}});Object.defineProperty(V,"printError",{enumerable:!0,get:function(){return _p.printError}});Object.defineProperty(V,"printIntrospectionSchema",{enumerable:!0,get:function(){return Ht.printIntrospectionSchema}});Object.defineProperty(V,"printLocation",{enumerable:!0,get:function(){return Jt.printLocation}});Object.defineProperty(V,"printSchema",{enumerable:!0,get:function(){return Ht.printSchema}});Object.defineProperty(V,"printSourceLocation",{enumerable:!0,get:function(){return Jt.printSourceLocation}});Object.defineProperty(V,"printType",{enumerable:!0,get:function(){return Ht.printType}});Object.defineProperty(V,"recommendedRules",{enumerable:!0,get:function(){return Tt.recommendedRules}});Object.defineProperty(V,"resolveObjMapThunk",{enumerable:!0,get:function(){return ge.resolveObjMapThunk}});Object.defineProperty(V,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return ge.resolveReadonlyArrayThunk}});Object.defineProperty(V,"responsePathAsArray",{enumerable:!0,get:function(){return ka.responsePathAsArray}});Object.defineProperty(V,"separateOperations",{enumerable:!0,get:function(){return Ht.separateOperations}});Object.defineProperty(V,"specifiedDirectives",{enumerable:!0,get:function(){return ge.specifiedDirectives}});Object.defineProperty(V,"specifiedRules",{enumerable:!0,get:function(){return Tt.specifiedRules}});Object.defineProperty(V,"specifiedScalarTypes",{enumerable:!0,get:function(){return ge.specifiedScalarTypes}});Object.defineProperty(V,"stripIgnoredCharacters",{enumerable:!0,get:function(){return Ht.stripIgnoredCharacters}});Object.defineProperty(V,"subscribe",{enumerable:!0,get:function(){return ka.subscribe}});Object.defineProperty(V,"syntaxError",{enumerable:!0,get:function(){return _p.syntaxError}});Object.defineProperty(V,"typeFromAST",{enumerable:!0,get:function(){return Ht.typeFromAST}});Object.defineProperty(V,"validate",{enumerable:!0,get:function(){return Tt.validate}});Object.defineProperty(V,"validateSchema",{enumerable:!0,get:function(){return ge.validateSchema}});Object.defineProperty(V,"valueFromAST",{enumerable:!0,get:function(){return Ht.valueFromAST}});Object.defineProperty(V,"valueFromASTUntyped",{enumerable:!0,get:function(){return Ht.valueFromASTUntyped}});Object.defineProperty(V,"version",{enumerable:!0,get:function(){return DC.version}});Object.defineProperty(V,"versionInfo",{enumerable:!0,get:function(){return DC.versionInfo}});Object.defineProperty(V,"visit",{enumerable:!0,get:function(){return Jt.visit}});Object.defineProperty(V,"visitInParallel",{enumerable:!0,get:function(){return Jt.visitInParallel}});Object.defineProperty(V,"visitWithTypeInfo",{enumerable:!0,get:function(){return Ht.visitWithTypeInfo}});var DC=gP(),bC=NL(),ge=hL(),Jt=IL(),ka=AL(),Tt=wL(),_p=LL(),Ht=OC()});var vr=w(A=>{"use strict";m();T();N();Object.defineProperty(A,"__esModule",{value:!0});A.FIELDS=A.FIELD_SET_SCALAR=A.FIELD_UPPER=A.FIELD_PATH=A.FIELD=A.EXTENSIONS=A.EXTENDS=A.EXTERNAL=A.EXECUTION=A.ENUM_VALUE_UPPER=A.ENUM_VALUE=A.ENUM_UPPER=A.ENUM=A.ENTITY_UNION=A.ENTITIES_FIELD=A.ENTITIES=A.EDFS_REDIS_SUBSCRIBE=A.EDFS_REDIS_PUBLISH=A.EDFS_NATS_STREAM_CONFIGURATION=A.EDFS_PUBLISH_RESULT=A.EDFS_NATS_SUBSCRIBE=A.EDFS_NATS_REQUEST=A.EDFS_NATS_PUBLISH=A.EDFS_KAFKA_SUBSCRIBE=A.EDFS_KAFKA_PUBLISH=A.DIRECTIVE_DEFINITION=A.DESCRIPTION_OVERRIDE=A.DEPRECATED_DEFAULT_ARGUMENT_VALUE=A.DEPRECATED=A.DEFAULT_SUBSCRIPTION=A.DEFAULT_QUERY=A.DEFAULT_MUTATION=A.DEFAULT_EDFS_PROVIDER_ID=A.DEFAULT=A.CONSUMER_NAME=A.CONSUMER_INACTIVE_THRESHOLD=A.CONFIGURE_CHILD_DESCRIPTIONS=A.CONFIGURE_DESCRIPTION=A.CONDITION=A.COMPOSE_DIRECTIVE=A.CHANNELS=A.CHANNEL=A.BOOLEAN_SCALAR=A.BOOLEAN=A.ARGUMENT_DEFINITION_UPPER=A.AUTHENTICATED=A.ARGUMENT=A.ANY_SCALAR=A.AND_UPPER=A.AS=void 0;A.OPERATION_TO_DEFAULT=A.ONE_OF=A.NULL=A.NOT_UPPER=A.NON_NULLABLE_STRING=A.NON_NULLABLE_INT=A.NON_NULLABLE_BOOLEAN=A.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT=A.NAME=A.NOT_APPLICABLE=A.PROVIDER_TYPE_REDIS=A.PROVIDER_TYPE_NATS=A.PROVIDER_TYPE_KAFKA=A.PROPAGATE=A.MUTATION_UPPER=A.MUTATION=A.NUMBER=A.LITERAL_NEW_LINE=A.LITERAL_SPACE=A.LIST=A.LINK_PURPOSE=A.LINK_IMPORT=A.LINK=A.LEVELS=A.LEFT_PARENTHESIS=A.KEY=A.INTERFACE_OBJECT=A.INTERFACE_UPPER=A.INTERFACE=A.INT_SCALAR=A.INPUT_VALUE=A.INPUT_OBJECT_UPPER=A.INPUT_OBJECT=A.INPUT_FIELD_DEFINITION_UPPER=A.INPUT_FIELD=A.INPUT=A.INLINE_FRAGMENT_UPPER=A.INLINE_FRAGMENT=A.INACCESSIBLE=A.IN_UPPER=A.IMPORT=A.ID_SCALAR=A.HYPHEN_JOIN=A.FROM=A.FRAGMENT_SPREAD_UPPER=A.FRAGMENT_DEFINITION_UPPER=A.FOR=A.FLOAT_SCALAR=A.FIRST_ORDINAL=A.FIELD_DEFINITION_UPPER=void 0;A.TOPICS=A.TOPIC=A.TAG=A.SUCCESS=A.SUBSCRIPTION_UPPER=A.SUBSCRIBE=A.SUBSCRIPTION_FILTER_VALUE=A.SUBSCRIPTION_FILTER_CONDITION=A.SUBSCRIPTION_FILTER=A.SUBSCRIPTION_FIELD_CONDITION=A.SUBSCRIPTION=A.SUBJECTS=A.SUBJECT=A.STRING_SCALAR=A.STRING=A.STREAM_NAME=A.STREAM_CONFIGURATION=A.SPECIFIED_BY=A.SHAREABLE=A.SERVICE_FIELD=A.SERVICE_OBJECT=A.SEMANTIC_NON_NULL=A.SELECTION_REPRESENTATION=A.SECURITY=A.SCOPE_SCALAR=A.SCOPES=A.SCHEMA_UPPER=A.SCHEMA=A.SCALAR_UPPER=A.SCALAR=A.RESOLVABLE=A.REQUIRES_SCOPES=A.REQUIRES=A.REQUIRE_FETCH_REASONS=A.REQUEST=A.REASON=A.QUOTATION_JOIN=A.QUERY_UPPER=A.QUERY=A.PUBLISH=A.PROVIDES=A.PROVIDER_ID=A.PERIOD=A.PARENT_EXTENSION_DATA_MAP=A.PARENT_DEFINITION_DATA_MAP=A.PARENT_DEFINITION_DATA=A.OVERRIDE=A.OR_UPPER=A.OBJECT_UPPER=A.OBJECT=void 0;A.NON_REPEATABLE_PERSISTED_DIRECTIVES=A.OUTPUT_NODE_KINDS=A.INPUT_NODE_KINDS=A.IGNORED_FIELDS=A.INHERITABLE_DIRECTIVE_NAMES=A.PERSISTED_CLIENT_DIRECTIVES=A.AUTHORIZATION_DIRECTIVES=A.ROOT_TYPE_NAMES=A.EXECUTABLE_DIRECTIVE_LOCATIONS=A.VARIABLE_DEFINITION_UPPER=A.VALUES=A.URL_LOWER=A.UNION_UPPER=A.UNION=void 0;var cu=Ae();A.AS="as";A.AND_UPPER="AND";A.ANY_SCALAR="_Any";A.ARGUMENT="argument";A.AUTHENTICATED="authenticated";A.ARGUMENT_DEFINITION_UPPER="ARGUMENT_DEFINITION";A.BOOLEAN="boolean";A.BOOLEAN_SCALAR="Boolean";A.CHANNEL="channel";A.CHANNELS="channels";A.COMPOSE_DIRECTIVE="composeDirective";A.CONDITION="condition";A.CONFIGURE_DESCRIPTION="openfed__configureDescription";A.CONFIGURE_CHILD_DESCRIPTIONS="openfed__configureChildDescriptions";A.CONSUMER_INACTIVE_THRESHOLD="consumerInactiveThreshold";A.CONSUMER_NAME="consumerName";A.DEFAULT="default";A.DEFAULT_EDFS_PROVIDER_ID="default";A.DEFAULT_MUTATION="Mutation";A.DEFAULT_QUERY="Query";A.DEFAULT_SUBSCRIPTION="Subscription";A.DEPRECATED="deprecated";A.DEPRECATED_DEFAULT_ARGUMENT_VALUE="No longer supported";A.DESCRIPTION_OVERRIDE="descriptionOverride";A.DIRECTIVE_DEFINITION="directive definition";A.EDFS_KAFKA_PUBLISH="edfs__kafkaPublish";A.EDFS_KAFKA_SUBSCRIBE="edfs__kafkaSubscribe";A.EDFS_NATS_PUBLISH="edfs__natsPublish";A.EDFS_NATS_REQUEST="edfs__natsRequest";A.EDFS_NATS_SUBSCRIBE="edfs__natsSubscribe";A.EDFS_PUBLISH_RESULT="edfs__PublishResult";A.EDFS_NATS_STREAM_CONFIGURATION="edfs__NatsStreamConfiguration";A.EDFS_REDIS_PUBLISH="edfs__redisPublish";A.EDFS_REDIS_SUBSCRIBE="edfs__redisSubscribe";A.ENTITIES="entities";A.ENTITIES_FIELD="_entities";A.ENTITY_UNION="_Entity";A.ENUM="Enum";A.ENUM_UPPER="ENUM";A.ENUM_VALUE="Enum Value";A.ENUM_VALUE_UPPER="ENUM_VALUE";A.EXECUTION="EXECUTION";A.EXTERNAL="external";A.EXTENDS="extends";A.EXTENSIONS="extensions";A.FIELD="field";A.FIELD_PATH="fieldPath";A.FIELD_UPPER="FIELD";A.FIELD_SET_SCALAR="openfed__FieldSet";A.FIELDS="fields";A.FIELD_DEFINITION_UPPER="FIELD_DEFINITION";A.FIRST_ORDINAL="1st";A.FLOAT_SCALAR="Float";A.FOR="for";A.FRAGMENT_DEFINITION_UPPER="FRAGMENT_DEFINITION";A.FRAGMENT_SPREAD_UPPER="FRAGMENT_SPREAD";A.FROM="from";A.HYPHEN_JOIN=` -`;A.ID_SCALAR="ID";A.IMPORT="import";A.IN_UPPER="IN";A.INACCESSIBLE="inaccessible";A.INLINE_FRAGMENT="inlineFragment";A.INLINE_FRAGMENT_UPPER="INLINE_FRAGMENT";A.INPUT="Input";A.INPUT_FIELD="Input field";A.INPUT_FIELD_DEFINITION_UPPER="INPUT_FIELD_DEFINITION";A.INPUT_OBJECT="Input Object";A.INPUT_OBJECT_UPPER="INPUT_OBJECT";A.INPUT_VALUE="Input Value";A.INT_SCALAR="Int";A.INTERFACE="Interface";A.INTERFACE_UPPER="INTERFACE";A.INTERFACE_OBJECT="interfaceObject";A.KEY="key";A.LEFT_PARENTHESIS="(";A.LEVELS="levels";A.LINK="link";A.LINK_IMPORT="link__Import";A.LINK_PURPOSE="link__Purpose";A.LIST="list";A.LITERAL_SPACE=" ";A.LITERAL_NEW_LINE=` -`;A.NUMBER="number";A.MUTATION="Mutation";A.MUTATION_UPPER="MUTATION";A.PROPAGATE="propagate";A.PROVIDER_TYPE_KAFKA="kafka";A.PROVIDER_TYPE_NATS="nats";A.PROVIDER_TYPE_REDIS="redis";A.NOT_APPLICABLE="N/A";A.NAME="name";A.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT="edfs__PublishResult!";A.NON_NULLABLE_BOOLEAN="Boolean!";A.NON_NULLABLE_INT="Int!";A.NON_NULLABLE_STRING="String!";A.NOT_UPPER="NOT";A.NULL="Null";A.ONE_OF="oneOf";A.OPERATION_TO_DEFAULT="operationTypeNodeToDefaultType";A.OBJECT="Object";A.OBJECT_UPPER="OBJECT";A.OR_UPPER="OR";A.OVERRIDE="override";A.PARENT_DEFINITION_DATA="parentDefinitionDataByTypeName";A.PARENT_DEFINITION_DATA_MAP="parentDefinitionDataByParentTypeName";A.PARENT_EXTENSION_DATA_MAP="parentExtensionDataByParentTypeName";A.PERIOD=".";A.PROVIDER_ID="providerId";A.PROVIDES="provides";A.PUBLISH="publish";A.QUERY="Query";A.QUERY_UPPER="QUERY";A.QUOTATION_JOIN='", "';A.REASON="reason";A.REQUEST="request";A.REQUIRE_FETCH_REASONS="openfed__requireFetchReasons";A.REQUIRES="requires";A.REQUIRES_SCOPES="requiresScopes";A.RESOLVABLE="resolvable";A.SCALAR="Scalar";A.SCALAR_UPPER="SCALAR";A.SCHEMA="schema";A.SCHEMA_UPPER="SCHEMA";A.SCOPES="scopes";A.SCOPE_SCALAR="openfed__Scope";A.SECURITY="SECURITY";A.SELECTION_REPRESENTATION=" { ... }";A.SEMANTIC_NON_NULL="semanticNonNull";A.SERVICE_OBJECT="_Service";A.SERVICE_FIELD="_service";A.SHAREABLE="shareable";A.SPECIFIED_BY="specifiedBy";A.STREAM_CONFIGURATION="streamConfiguration";A.STREAM_NAME="streamName";A.STRING="string";A.STRING_SCALAR="String";A.SUBJECT="subject";A.SUBJECTS="subjects";A.SUBSCRIPTION="Subscription";A.SUBSCRIPTION_FIELD_CONDITION="openfed__SubscriptionFieldCondition";A.SUBSCRIPTION_FILTER="openfed__subscriptionFilter";A.SUBSCRIPTION_FILTER_CONDITION="openfed__SubscriptionFilterCondition";A.SUBSCRIPTION_FILTER_VALUE="openfed__SubscriptionFilterValue";A.SUBSCRIBE="subscribe";A.SUBSCRIPTION_UPPER="SUBSCRIPTION";A.SUCCESS="success";A.TAG="tag";A.TOPIC="topic";A.TOPICS="topics";A.UNION="Union";A.UNION_UPPER="UNION";A.URL_LOWER="url";A.VALUES="values";A.VARIABLE_DEFINITION_UPPER="VARIABLE_DEFINITION";A.EXECUTABLE_DIRECTIVE_LOCATIONS=new Set([A.FIELD_UPPER,A.FRAGMENT_DEFINITION_UPPER,A.FRAGMENT_SPREAD_UPPER,A.INLINE_FRAGMENT_UPPER,A.MUTATION_UPPER,A.QUERY_UPPER,A.SUBSCRIPTION_UPPER]);A.ROOT_TYPE_NAMES=new Set([A.MUTATION,A.QUERY,A.SUBSCRIPTION]);A.AUTHORIZATION_DIRECTIVES=new Set([A.AUTHENTICATED,A.REQUIRES_SCOPES]);A.PERSISTED_CLIENT_DIRECTIVES=new Set([A.DEPRECATED,A.ONE_OF,A.SEMANTIC_NON_NULL]);A.INHERITABLE_DIRECTIVE_NAMES=new Set([A.EXTERNAL,A.REQUIRE_FETCH_REASONS,A.SHAREABLE]);A.IGNORED_FIELDS=new Set([A.ENTITIES_FIELD,A.SERVICE_FIELD]);A.INPUT_NODE_KINDS=new Set([au.Kind.ENUM_TYPE_DEFINITION,au.Kind.INPUT_OBJECT_TYPE_DEFINITION,au.Kind.SCALAR_TYPE_DEFINITION]);A.OUTPUT_NODE_KINDS=new Set([au.Kind.ENUM_TYPE_DEFINITION,au.Kind.INTERFACE_TYPE_DEFINITION,au.Kind.OBJECT_TYPE_DEFINITION,au.Kind.SCALAR_TYPE_DEFINITION,au.Kind.UNION_TYPE_DEFINITION]);A.NON_REPEATABLE_PERSISTED_DIRECTIVES=new Set([A.INACCESSIBLE,A.ONE_OF,A.SEMANTIC_NON_NULL])});var Jr=w($n=>{"use strict";m();T();N();Object.defineProperty($n,"__esModule",{value:!0});$n.operationTypeNodeToDefaultType=void 0;$n.isObjectLikeNodeEntity=XX;$n.isNodeInterfaceObject=ZX;$n.stringToNameNode=LN;$n.stringArrayToNameNodeArray=e9;$n.setToNameNodeArray=t9;$n.stringToNamedTypeNode=sC;$n.setToNamedTypeNodeArray=n9;$n.nodeKindToDirectiveLocation=r9;$n.isKindAbstract=i9;$n.extractExecutableDirectiveLocations=a9;$n.formatDescription=s9;$n.lexicographicallySortArgumentNodes=oC;$n.lexicographicallySortSelectionSetNode=wN;$n.lexicographicallySortDocumentNode=o9;$n.parse=uC;$n.safeParse=u9;var xt=Ae(),Sn=ur();function XX(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===Sn.KEY)return!0;return!1}function ZX(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===Sn.INTERFACE_OBJECT)return!0;return!1}function LN(e){return{kind:xt.Kind.NAME,value:e}}function e9(e){let t=[];for(let n of e)t.push(LN(n));return t}function t9(e){let t=[];for(let n of e)t.push(LN(n));return t}function sC(e){return{kind:xt.Kind.NAMED_TYPE,name:LN(e)}}function n9(e){let t=[];for(let n of e)t.push(sC(n));return t}function r9(e){switch(e){case xt.Kind.ARGUMENT:return Sn.ARGUMENT_DEFINITION_UPPER;case xt.Kind.ENUM_TYPE_DEFINITION:case xt.Kind.ENUM_TYPE_EXTENSION:return Sn.ENUM_UPPER;case xt.Kind.ENUM_VALUE_DEFINITION:return Sn.ENUM_VALUE_UPPER;case xt.Kind.FIELD_DEFINITION:return Sn.FIELD_DEFINITION_UPPER;case xt.Kind.FRAGMENT_DEFINITION:return Sn.FRAGMENT_DEFINITION_UPPER;case xt.Kind.FRAGMENT_SPREAD:return Sn.FRAGMENT_SPREAD_UPPER;case xt.Kind.INLINE_FRAGMENT:return Sn.INLINE_FRAGMENT_UPPER;case xt.Kind.INPUT_VALUE_DEFINITION:return Sn.INPUT_FIELD_DEFINITION_UPPER;case xt.Kind.INPUT_OBJECT_TYPE_DEFINITION:case xt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return Sn.INPUT_OBJECT_UPPER;case xt.Kind.INTERFACE_TYPE_DEFINITION:case xt.Kind.INTERFACE_TYPE_EXTENSION:return Sn.INTERFACE_UPPER;case xt.Kind.OBJECT_TYPE_DEFINITION:case xt.Kind.OBJECT_TYPE_EXTENSION:return Sn.OBJECT_UPPER;case xt.Kind.SCALAR_TYPE_DEFINITION:case xt.Kind.SCALAR_TYPE_EXTENSION:return Sn.SCALAR_UPPER;case xt.Kind.SCHEMA_DEFINITION:case xt.Kind.SCHEMA_EXTENSION:return Sn.SCHEMA_UPPER;case xt.Kind.UNION_TYPE_DEFINITION:case xt.Kind.UNION_TYPE_EXTENSION:return Sn.UNION_UPPER;default:return e}}$n.operationTypeNodeToDefaultType=new Map([[xt.OperationTypeNode.MUTATION,Sn.MUTATION],[xt.OperationTypeNode.QUERY,Sn.QUERY],[xt.OperationTypeNode.SUBSCRIPTION,Sn.SUBSCRIPTION]]);function i9(e){return e===xt.Kind.INTERFACE_TYPE_DEFINITION||e===xt.Kind.UNION_TYPE_DEFINITION}function a9(e,t){for(let n of e){let r=n.value;Sn.EXECUTABLE_DIRECTIVE_LOCATIONS.has(r)&&t.add(r)}return t}function s9(e){if(!e)return e;let t=e.value;if(e.block){let n=t.split(` +`;A.NUMBER="number";A.MUTATION="Mutation";A.MUTATION_UPPER="MUTATION";A.PROPAGATE="propagate";A.PROVIDER_TYPE_KAFKA="kafka";A.PROVIDER_TYPE_NATS="nats";A.PROVIDER_TYPE_REDIS="redis";A.NOT_APPLICABLE="N/A";A.NAME="name";A.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT="edfs__PublishResult!";A.NON_NULLABLE_BOOLEAN="Boolean!";A.NON_NULLABLE_INT="Int!";A.NON_NULLABLE_STRING="String!";A.NOT_UPPER="NOT";A.NULL="Null";A.ONE_OF="oneOf";A.OPERATION_TO_DEFAULT="operationTypeNodeToDefaultType";A.OBJECT="Object";A.OBJECT_UPPER="OBJECT";A.OR_UPPER="OR";A.OVERRIDE="override";A.PARENT_DEFINITION_DATA="parentDefinitionDataByTypeName";A.PARENT_DEFINITION_DATA_MAP="parentDefinitionDataByParentTypeName";A.PARENT_EXTENSION_DATA_MAP="parentExtensionDataByParentTypeName";A.PERIOD=".";A.PROVIDER_ID="providerId";A.PROVIDES="provides";A.PUBLISH="publish";A.QUERY="Query";A.QUERY_UPPER="QUERY";A.QUOTATION_JOIN='", "';A.REASON="reason";A.REQUEST="request";A.REQUIRE_FETCH_REASONS="openfed__requireFetchReasons";A.REQUIRES="requires";A.REQUIRES_SCOPES="requiresScopes";A.RESOLVABLE="resolvable";A.SCALAR="Scalar";A.SCALAR_UPPER="SCALAR";A.SCHEMA="schema";A.SCHEMA_UPPER="SCHEMA";A.SCOPES="scopes";A.SCOPE_SCALAR="openfed__Scope";A.SECURITY="SECURITY";A.SELECTION_REPRESENTATION=" { ... }";A.SEMANTIC_NON_NULL="semanticNonNull";A.SERVICE_OBJECT="_Service";A.SERVICE_FIELD="_service";A.SHAREABLE="shareable";A.SPECIFIED_BY="specifiedBy";A.STREAM_CONFIGURATION="streamConfiguration";A.STREAM_NAME="streamName";A.STRING="string";A.STRING_SCALAR="String";A.SUBJECT="subject";A.SUBJECTS="subjects";A.SUBSCRIPTION="Subscription";A.SUBSCRIPTION_FIELD_CONDITION="openfed__SubscriptionFieldCondition";A.SUBSCRIPTION_FILTER="openfed__subscriptionFilter";A.SUBSCRIPTION_FILTER_CONDITION="openfed__SubscriptionFilterCondition";A.SUBSCRIPTION_FILTER_VALUE="openfed__SubscriptionFilterValue";A.SUBSCRIBE="subscribe";A.SUBSCRIPTION_UPPER="SUBSCRIPTION";A.SUCCESS="success";A.TAG="tag";A.TOPIC="topic";A.TOPICS="topics";A.UNION="Union";A.UNION_UPPER="UNION";A.URL_LOWER="url";A.VALUES="values";A.VARIABLE_DEFINITION_UPPER="VARIABLE_DEFINITION";A.EXECUTABLE_DIRECTIVE_LOCATIONS=new Set([A.FIELD_UPPER,A.FRAGMENT_DEFINITION_UPPER,A.FRAGMENT_SPREAD_UPPER,A.INLINE_FRAGMENT_UPPER,A.MUTATION_UPPER,A.QUERY_UPPER,A.SUBSCRIPTION_UPPER]);A.ROOT_TYPE_NAMES=new Set([A.MUTATION,A.QUERY,A.SUBSCRIPTION]);A.AUTHORIZATION_DIRECTIVES=new Set([A.AUTHENTICATED,A.REQUIRES_SCOPES]);A.PERSISTED_CLIENT_DIRECTIVES=new Set([A.DEPRECATED,A.ONE_OF,A.SEMANTIC_NON_NULL]);A.INHERITABLE_DIRECTIVE_NAMES=new Set([A.EXTERNAL,A.REQUIRE_FETCH_REASONS,A.SHAREABLE]);A.IGNORED_FIELDS=new Set([A.ENTITIES_FIELD,A.SERVICE_FIELD]);A.INPUT_NODE_KINDS=new Set([cu.Kind.ENUM_TYPE_DEFINITION,cu.Kind.INPUT_OBJECT_TYPE_DEFINITION,cu.Kind.SCALAR_TYPE_DEFINITION]);A.OUTPUT_NODE_KINDS=new Set([cu.Kind.ENUM_TYPE_DEFINITION,cu.Kind.INTERFACE_TYPE_DEFINITION,cu.Kind.OBJECT_TYPE_DEFINITION,cu.Kind.SCALAR_TYPE_DEFINITION,cu.Kind.UNION_TYPE_DEFINITION]);A.NON_REPEATABLE_PERSISTED_DIRECTIVES=new Set([A.INACCESSIBLE,A.ONE_OF,A.SEMANTIC_NON_NULL])});var Hr=w(Qn=>{"use strict";m();T();N();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.operationTypeNodeToDefaultType=void 0;Qn.isObjectLikeNodeEntity=_9;Qn.isNodeInterfaceObject=v9;Qn.stringToNameNode=kN;Qn.stringArrayToNameNodeArray=S9;Qn.setToNameNodeArray=O9;Qn.stringToNamedTypeNode=AC;Qn.setToNamedTypeNodeArray=D9;Qn.nodeKindToDirectiveLocation=b9;Qn.isKindAbstract=A9;Qn.extractExecutableDirectiveLocations=R9;Qn.formatDescription=P9;Qn.lexicographicallySortArgumentNodes=RC;Qn.lexicographicallySortSelectionSetNode=UN;Qn.lexicographicallySortDocumentNode=F9;Qn.parse=PC;Qn.safeParse=w9;var xt=Ae(),Sn=vr();function _9(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===Sn.KEY)return!0;return!1}function v9(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===Sn.INTERFACE_OBJECT)return!0;return!1}function kN(e){return{kind:xt.Kind.NAME,value:e}}function S9(e){let t=[];for(let n of e)t.push(kN(n));return t}function O9(e){let t=[];for(let n of e)t.push(kN(n));return t}function AC(e){return{kind:xt.Kind.NAMED_TYPE,name:kN(e)}}function D9(e){let t=[];for(let n of e)t.push(AC(n));return t}function b9(e){switch(e){case xt.Kind.ARGUMENT:return Sn.ARGUMENT_DEFINITION_UPPER;case xt.Kind.ENUM_TYPE_DEFINITION:case xt.Kind.ENUM_TYPE_EXTENSION:return Sn.ENUM_UPPER;case xt.Kind.ENUM_VALUE_DEFINITION:return Sn.ENUM_VALUE_UPPER;case xt.Kind.FIELD_DEFINITION:return Sn.FIELD_DEFINITION_UPPER;case xt.Kind.FRAGMENT_DEFINITION:return Sn.FRAGMENT_DEFINITION_UPPER;case xt.Kind.FRAGMENT_SPREAD:return Sn.FRAGMENT_SPREAD_UPPER;case xt.Kind.INLINE_FRAGMENT:return Sn.INLINE_FRAGMENT_UPPER;case xt.Kind.INPUT_VALUE_DEFINITION:return Sn.INPUT_FIELD_DEFINITION_UPPER;case xt.Kind.INPUT_OBJECT_TYPE_DEFINITION:case xt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return Sn.INPUT_OBJECT_UPPER;case xt.Kind.INTERFACE_TYPE_DEFINITION:case xt.Kind.INTERFACE_TYPE_EXTENSION:return Sn.INTERFACE_UPPER;case xt.Kind.OBJECT_TYPE_DEFINITION:case xt.Kind.OBJECT_TYPE_EXTENSION:return Sn.OBJECT_UPPER;case xt.Kind.SCALAR_TYPE_DEFINITION:case xt.Kind.SCALAR_TYPE_EXTENSION:return Sn.SCALAR_UPPER;case xt.Kind.SCHEMA_DEFINITION:case xt.Kind.SCHEMA_EXTENSION:return Sn.SCHEMA_UPPER;case xt.Kind.UNION_TYPE_DEFINITION:case xt.Kind.UNION_TYPE_EXTENSION:return Sn.UNION_UPPER;default:return e}}Qn.operationTypeNodeToDefaultType=new Map([[xt.OperationTypeNode.MUTATION,Sn.MUTATION],[xt.OperationTypeNode.QUERY,Sn.QUERY],[xt.OperationTypeNode.SUBSCRIPTION,Sn.SUBSCRIPTION]]);function A9(e){return e===xt.Kind.INTERFACE_TYPE_DEFINITION||e===xt.Kind.UNION_TYPE_DEFINITION}function R9(e,t){for(let n of e){let r=n.value;Sn.EXECUTABLE_DIRECTIVE_LOCATIONS.has(r)&&t.add(r)}return t}function P9(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 Y(x({},e),{value:t,block:!0})}function oC(e){return e.arguments?e.arguments.sort((n,r)=>n.name.value.localeCompare(r.name.value)):e.arguments}function wN(e){let t=e.selections;return Y(x({},e),{selections:t.sort((n,r)=>{var a,o,c,l;return Sn.NAME in n?Sn.NAME in r?n.name.value.localeCompare(r.name.value):-1:Sn.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 xt.Kind.FIELD:return Y(x({},n),{arguments:oC(n),selectionSet:n.selectionSet?wN(n.selectionSet):n.selectionSet});case xt.Kind.FRAGMENT_SPREAD:return n;case xt.Kind.INLINE_FRAGMENT:return Y(x({},n),{selectionSet:wN(n.selectionSet)})}})})}function o9(e){return Y(x({},e),{definitions:e.definitions.map(t=>t.kind!==xt.Kind.OPERATION_DEFINITION?t:Y(x({},t),{selectionSet:wN(t.selectionSet)}))})}function uC(e,t=!0){return(0,xt.parse)(e,{noLocation:t})}function u9(e,t=!0){try{return{documentNode:uC(e,t)}}catch(n){return{error:n}}}});var dC=w(Nl=>{"use strict";m();T();N();Object.defineProperty(Nl,"__esModule",{value:!0});Nl.AccumulatorMap=void 0;Nl.mapValue=ml;Nl.extendSchemaImpl=c9;var Ue=Ae(),hs=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)}};Nl.AccumulatorMap=hs;function ml(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}function c9(e,t,n){var De,ve,Ce,_t;let r=[],i=new hs,a=new hs,o=new hs,c=new hs,l=new hs,d=new hs,f=[],y,I=[],v=!1;for(let J of t.definitions){switch(J.kind){case Ue.Kind.SCHEMA_DEFINITION:y=J;break;case Ue.Kind.SCHEMA_EXTENSION:I.push(J);break;case Ue.Kind.DIRECTIVE_DEFINITION:f.push(J);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(J);break;case Ue.Kind.SCALAR_TYPE_EXTENSION:i.add(J.name.value,J);break;case Ue.Kind.OBJECT_TYPE_EXTENSION:a.add(J.name.value,J);break;case Ue.Kind.INTERFACE_TYPE_EXTENSION:o.add(J.name.value,J);break;case Ue.Kind.UNION_TYPE_EXTENSION:c.add(J.name.value,J);break;case Ue.Kind.ENUM_TYPE_EXTENSION:l.add(J.name.value,J);break;case Ue.Kind.INPUT_OBJECT_TYPE_EXTENSION:d.add(J.name.value,J);break;default:continue}v=!0}if(!v)return e;let P=new Map;for(let J of e.types){let oe=ie(J);oe&&P.set(J.name,oe)}for(let J of r){let oe=J.name.value;P.set(oe,(De=cC.get(oe))!=null?De:ue(J))}for(let[J,oe]of a)P.set(J,new Ue.GraphQLObjectType({name:J,interfaces:()=>zt(oe),fields:()=>mn(oe),extensionASTNodes:oe}));if(n!=null&&n.addInvalidExtensionOrphans){for(let[J,oe]of o)P.set(J,new Ue.GraphQLInterfaceType({name:J,interfaces:()=>zt(oe),fields:()=>mn(oe),extensionASTNodes:oe}));for(let[J,oe]of l)P.set(J,new Ue.GraphQLEnumType({name:J,values:kn(oe),extensionASTNodes:oe}));for(let[J,oe]of c)P.set(J,new Ue.GraphQLUnionType({name:J,types:()=>An(oe),extensionASTNodes:oe}));for(let[J,oe]of i)P.set(J,new Ue.GraphQLScalarType({name:J,extensionASTNodes:oe}));for(let[J,oe]of d)P.set(J,new Ue.GraphQLInputObjectType({name:J,fields:()=>Rr(oe),extensionASTNodes:oe}))}let k=x(x({query:e.query&&Q(e.query),mutation:e.mutation&&Q(e.mutation),subscription:e.subscription&&Q(e.subscription)},y&&en([y])),en(I));return Y(x({description:(Ce=(ve=y==null?void 0:y.description)==null?void 0:ve.value)!=null?Ce:e.description},k),{types:Array.from(P.values()),directives:[...e.directives.map(se),...f.map(Qt)],extensions:e.extensions,astNode:y!=null?y:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(I),assumeValid:(_t=n==null?void 0:n.assumeValid)!=null?_t:!1});function K(J){return(0,Ue.isListType)(J)?new Ue.GraphQLList(K(J.ofType)):(0,Ue.isNonNullType)(J)?new Ue.GraphQLNonNull(K(J.ofType)):Q(J)}function Q(J){return P.get(J.name)}function se(J){if((0,Ue.isSpecifiedDirective)(J))return J;let oe=J.toConfig();return new Ue.GraphQLDirective(Y(x({},oe),{args:ml(oe.args,gt)}))}function ie(J){if((0,Ue.isIntrospectionType)(J)||(0,Ue.isSpecifiedScalarType)(J))return J;if((0,Ue.isScalarType)(J))return Re(J);if((0,Ue.isObjectType)(J))return xe(J);if((0,Ue.isInterfaceType)(J))return tt(J);if((0,Ue.isUnionType)(J))return ee(J);if((0,Ue.isEnumType)(J))return de(J);if((0,Ue.isInputObjectType)(J))return Te(J)}function Te(J){var Ye;let oe=J.toConfig(),qe=(Ye=d.get(oe.name))!=null?Ye:[];return new Ue.GraphQLInputObjectType(Y(x({},oe),{fields:()=>x(x({},ml(oe.fields,Ut=>Y(x({},Ut),{type:K(Ut.type)}))),Rr(qe)),extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function de(J){var Ye;let oe=J.toConfig(),qe=(Ye=l.get(J.name))!=null?Ye:[];return new Ue.GraphQLEnumType(Y(x({},oe),{values:x(x({},oe.values),kn(qe)),extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function Re(J){var Ut,nt;let oe=J.toConfig(),qe=(Ut=i.get(oe.name))!=null?Ut:[],Ye=oe.specifiedByURL;for(let Rt of qe)Ye=(nt=lC(Rt))!=null?nt:Ye;return new Ue.GraphQLScalarType(Y(x({},oe),{specifiedByURL:Ye,extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function xe(J){var Ye;let oe=J.toConfig(),qe=(Ye=a.get(oe.name))!=null?Ye:[];return new Ue.GraphQLObjectType(Y(x({},oe),{interfaces:()=>[...J.getInterfaces().map(Q),...zt(qe)],fields:()=>x(x({},ml(oe.fields,Se)),mn(qe)),extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function tt(J){var Ye;let oe=J.toConfig(),qe=(Ye=o.get(oe.name))!=null?Ye:[];return new Ue.GraphQLInterfaceType(Y(x({},oe),{interfaces:()=>[...J.getInterfaces().map(Q),...zt(qe)],fields:()=>x(x({},ml(oe.fields,Se)),mn(qe)),extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function ee(J){var Ye;let oe=J.toConfig(),qe=(Ye=c.get(oe.name))!=null?Ye:[];return new Ue.GraphQLUnionType(Y(x({},oe),{types:()=>[...J.getTypes().map(Q),...An(qe)],extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function Se(J){return Y(x({},J),{type:K(J.type),args:J.args&&ml(J.args,gt)})}function gt(J){return Y(x({},J),{type:K(J.type)})}function en(J){var qe;let oe={};for(let Ye of J){let Ut=(qe=Ye.operationTypes)!=null?qe:[];for(let nt of Ut)oe[nt.operation]=tn(nt.type)}return oe}function tn(J){var Ye;let oe=J.name.value,qe=(Ye=cC.get(oe))!=null?Ye:P.get(oe);if(qe===void 0)throw new Error(`Unknown type: "${oe}".`);return qe}function bn(J){return J.kind===Ue.Kind.LIST_TYPE?new Ue.GraphQLList(bn(J.type)):J.kind===Ue.Kind.NON_NULL_TYPE?new Ue.GraphQLNonNull(bn(J.type)):tn(J)}function Qt(J){var oe;return new Ue.GraphQLDirective({name:J.name.value,description:(oe=J.description)==null?void 0:oe.value,locations:J.locations.map(({value:qe})=>qe),isRepeatable:J.repeatable,args:Ar(J.arguments),astNode:J})}function mn(J){var qe,Ye;let oe=Object.create(null);for(let Ut of J){let nt=(qe=Ut.fields)!=null?qe:[];for(let Rt of nt)oe[Rt.name.value]={type:bn(Rt.type),description:(Ye=Rt.description)==null?void 0:Ye.value,args:Ar(Rt.arguments),deprecationReason:CN(Rt),astNode:Rt}}return oe}function Ar(J){var Ye;let oe=J!=null?J:[],qe=Object.create(null);for(let Ut of oe){let nt=bn(Ut.type);qe[Ut.name.value]={type:nt,description:(Ye=Ut.description)==null?void 0:Ye.value,defaultValue:(0,Ue.valueFromAST)(Ut.defaultValue,nt),deprecationReason:CN(Ut),astNode:Ut}}return qe}function Rr(J){var qe,Ye;let oe=Object.create(null);for(let Ut of J){let nt=(qe=Ut.fields)!=null?qe:[];for(let Rt of nt){let Wa=bn(Rt.type);oe[Rt.name.value]={type:Wa,description:(Ye=Rt.description)==null?void 0:Ye.value,defaultValue:(0,Ue.valueFromAST)(Rt.defaultValue,Wa),deprecationReason:CN(Rt),astNode:Rt}}}return oe}function kn(J){var qe,Ye;let oe=Object.create(null);for(let Ut of J){let nt=(qe=Ut.values)!=null?qe:[];for(let Rt of nt)oe[Rt.name.value]={description:(Ye=Rt.description)==null?void 0:Ye.value,deprecationReason:CN(Rt),astNode:Rt}}return oe}function zt(J){return J.flatMap(oe=>{var qe,Ye;return(Ye=(qe=oe.interfaces)==null?void 0:qe.map(tn))!=null?Ye:[]})}function An(J){return J.flatMap(oe=>{var qe,Ye;return(Ye=(qe=oe.types)==null?void 0:qe.map(tn))!=null?Ye:[]})}function ue(J){var qe,Ye,Ut,nt,Rt,Wa,qr,Xa,Cc,ya,mr,ni;let oe=J.name.value;switch(J.kind){case Ue.Kind.OBJECT_TYPE_DEFINITION:{let Vt=(qe=a.get(oe))!=null?qe:[],Nr=[J,...Vt];return a.delete(oe),new Ue.GraphQLObjectType({name:oe,description:(Ye=J.description)==null?void 0:Ye.value,interfaces:()=>zt(Nr),fields:()=>mn(Nr),astNode:J,extensionASTNodes:Vt})}case Ue.Kind.INTERFACE_TYPE_DEFINITION:{let Vt=(Ut=o.get(oe))!=null?Ut:[],Nr=[J,...Vt];return o.delete(oe),new Ue.GraphQLInterfaceType({name:oe,description:(nt=J.description)==null?void 0:nt.value,interfaces:()=>zt(Nr),fields:()=>mn(Nr),astNode:J,extensionASTNodes:Vt})}case Ue.Kind.ENUM_TYPE_DEFINITION:{let Vt=(Rt=l.get(oe))!=null?Rt:[],Nr=[J,...Vt];return l.delete(oe),new Ue.GraphQLEnumType({name:oe,description:(Wa=J.description)==null?void 0:Wa.value,values:kn(Nr),astNode:J,extensionASTNodes:Vt})}case Ue.Kind.UNION_TYPE_DEFINITION:{let Vt=(qr=c.get(oe))!=null?qr:[],Nr=[J,...Vt];return c.delete(oe),new Ue.GraphQLUnionType({name:oe,description:(Xa=J.description)==null?void 0:Xa.value,types:()=>An(Nr),astNode:J,extensionASTNodes:Vt})}case Ue.Kind.SCALAR_TYPE_DEFINITION:{let Vt=(Cc=i.get(oe))!=null?Cc:[];return i.delete(oe),new Ue.GraphQLScalarType({name:oe,description:(ya=J.description)==null?void 0:ya.value,specifiedByURL:lC(J),astNode:J,extensionASTNodes:Vt})}case Ue.Kind.INPUT_OBJECT_TYPE_DEFINITION:{let Vt=(mr=d.get(oe))!=null?mr:[],Nr=[J,...Vt];return d.delete(oe),new Ue.GraphQLInputObjectType({name:oe,description:(ni=J.description)==null?void 0:ni.value,fields:()=>Rr(Nr),astNode:J,extensionASTNodes:Vt})}}}}var cC=new Map([...Ue.specifiedScalarTypes,...Ue.introspectionTypes].map(e=>[e.name,e]));function CN(e){let t=(0,Ue.getDirectiveValues)(Ue.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function lC(e){let t=(0,Ue.getDirectiveValues)(Ue.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}});var pv=w(dv=>{"use strict";m();T();N();Object.defineProperty(dv,"__esModule",{value:!0});dv.buildASTSchema=p9;var pC=Ae(),l9=dl(),d9=dC();function p9(e,t){(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,l9.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,d9.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,...pC.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new pC.GraphQLSchema(Y(x({},r),{directives:i}))}});var Tl=w(su=>{"use strict";m();T();N();Object.defineProperty(su,"__esModule",{value:!0});su.MAX_INT32=su.MAX_SUBSCRIPTION_FILTER_DEPTH=su.MAXIMUM_TYPE_NESTING=void 0;su.MAXIMUM_TYPE_NESTING=30;su.MAX_SUBSCRIPTION_FILTER_DEPTH=5;su.MAX_INT32=un(2,31)-1});var Hr=w(lr=>{"use strict";m();T();N();Object.defineProperty(lr,"__esModule",{value:!0});lr.getOrThrowError=m9;lr.getEntriesNotInHashSet=N9;lr.numberToOrdinal=T9;lr.addIterableValuesToSet=E9;lr.addSets=h9;lr.kindToNodeType=y9;lr.getValueOrDefault=I9;lr.add=g9;lr.generateSimpleDirective=_9;lr.generateRequiresScopesDirective=v9;lr.generateSemanticNonNullDirective=S9;lr.copyObjectValueMap=O9;lr.addNewObjectValueMapEntries=D9;lr.copyArrayValueMap=b9;lr.addMapEntries=A9;lr.getFirstEntry=R9;var Kt=Ae(),cr=ur(),f9=oa(),yp=Jr();function m9(e,t,n){let r=e.get(t);if(r===void 0)throw(0,f9.invalidKeyFatalError)(t,n);return r}function N9(e,t){let n=[];for(let r of e)t.has(r)||n.push(r);return n}function T9(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 E9(e,t){for(let n of e)t.add(n)}function h9(e,t){let n=new Set(e);for(let r of t)n.add(r);return n}function y9(e){switch(e){case Kt.Kind.BOOLEAN:return cr.BOOLEAN_SCALAR;case Kt.Kind.ENUM:case Kt.Kind.ENUM_TYPE_DEFINITION:return cr.ENUM;case Kt.Kind.ENUM_TYPE_EXTENSION:return"Enum extension";case Kt.Kind.ENUM_VALUE_DEFINITION:return cr.ENUM_VALUE;case Kt.Kind.FIELD_DEFINITION:return cr.FIELD;case Kt.Kind.FLOAT:return cr.FLOAT_SCALAR;case Kt.Kind.INPUT_OBJECT_TYPE_DEFINITION:return cr.INPUT_OBJECT;case Kt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"Input Object extension";case Kt.Kind.INPUT_VALUE_DEFINITION:return cr.INPUT_VALUE;case Kt.Kind.INT:return cr.INT_SCALAR;case Kt.Kind.INTERFACE_TYPE_DEFINITION:return cr.INTERFACE;case Kt.Kind.INTERFACE_TYPE_EXTENSION:return"Interface extension";case Kt.Kind.NULL:return cr.NULL;case Kt.Kind.OBJECT:case Kt.Kind.OBJECT_TYPE_DEFINITION:return cr.OBJECT;case Kt.Kind.OBJECT_TYPE_EXTENSION:return"Object extension";case Kt.Kind.STRING:return cr.STRING_SCALAR;case Kt.Kind.SCALAR_TYPE_DEFINITION:return cr.SCALAR;case Kt.Kind.SCALAR_TYPE_EXTENSION:return"Scalar extension";case Kt.Kind.UNION_TYPE_DEFINITION:return cr.UNION;case Kt.Kind.UNION_TYPE_EXTENSION:return"Union extension";default:return e}}function I9(e,t,n){let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i}function g9(e,t){return e.has(t)?!1:(e.add(t),!0)}function _9(e){return{kind:Kt.Kind.DIRECTIVE,name:(0,yp.stringToNameNode)(e)}}function v9(e){let t=[];for(let n of e){let r=[];for(let i of n)r.push({kind:Kt.Kind.STRING,value:i});t.push({kind:Kt.Kind.LIST,values:r})}return{kind:Kt.Kind.DIRECTIVE,name:(0,yp.stringToNameNode)(cr.REQUIRES_SCOPES),arguments:[{kind:Kt.Kind.ARGUMENT,name:(0,yp.stringToNameNode)(cr.SCOPES),value:{kind:Kt.Kind.LIST,values:t}}]}}function S9(e){let t=Array.from(e).sort((r,i)=>r-i),n=new Array;for(let r of t)n.push({kind:Kt.Kind.INT,value:r.toString()});return{kind:Kt.Kind.DIRECTIVE,name:(0,yp.stringToNameNode)(cr.SEMANTIC_NON_NULL),arguments:[{kind:Kt.Kind.ARGUMENT,name:(0,yp.stringToNameNode)(cr.LEVELS),value:{kind:Kt.Kind.LIST,values:n}}]}}function O9(e){let t=new Map;for(let[n,r]of e)t.set(n,x({},r));return t}function D9(e,t){for(let[n,r]of e)t.set(n,x({},r))}function b9(e){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function A9(e,t){for(let[n,r]of e)t.set(n,r)}function R9(e){let{value:t,done:n}=e.values().next();if(!n)return t}});var Ip=w(BN=>{"use strict";m();T();N();Object.defineProperty(BN,"__esModule",{value:!0});BN.ExtensionType=void 0;var fC;(function(e){e[e.EXTENDS=0]="EXTENDS",e[e.NONE=1]="NONE",e[e.REAL=2]="REAL"})(fC||(BN.ExtensionType=fC={}))});var ou=w(Sr=>{"use strict";m();T();N();Object.defineProperty(Sr,"__esModule",{value:!0});Sr.getMutableDirectiveDefinitionNode=P9;Sr.getMutableEnumNode=w9;Sr.getMutableEnumValueNode=L9;Sr.getMutableFieldNode=C9;Sr.getMutableInputObjectNode=B9;Sr.getMutableInputValueNode=U9;Sr.getMutableInterfaceNode=k9;Sr.getMutableObjectNode=M9;Sr.getMutableObjectExtensionNode=x9;Sr.getMutableScalarNode=q9;Sr.getMutableTypeNode=fv;Sr.getMutableUnionNode=V9;Sr.getTypeNodeNamedTypeName=mv;Sr.getNamedTypeNode=NC;var vr=Ae(),El=Jr(),mC=oa(),F9=Tl();function P9(e){return{arguments:[],kind:e.kind,locations:[],name:x({},e.name),repeatable:e.repeatable,description:(0,El.formatDescription)(e.description)}}function w9(e){return{kind:vr.Kind.ENUM_TYPE_DEFINITION,name:x({},e)}}function L9(e){return{directives:[],kind:e.kind,name:x({},e.name),description:(0,El.formatDescription)(e.description)}}function C9(e,t,n){return{arguments:[],directives:[],kind:e.kind,name:x({},e.name),type:fv(e.type,t,n),description:(0,El.formatDescription)(e.description)}}function B9(e){return{kind:vr.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:x({},e)}}function U9(e,t,n){return{directives:[],kind:e.kind,name:x({},e.name),type:fv(e.type,t,n),defaultValue:e.defaultValue,description:(0,El.formatDescription)(e.description)}}function k9(e){return{kind:vr.Kind.INTERFACE_TYPE_DEFINITION,name:x({},e)}}function M9(e){return{kind:vr.Kind.OBJECT_TYPE_DEFINITION,name:x({},e)}}function x9(e){let t=e.kind===vr.Kind.OBJECT_TYPE_DEFINITION?e.description:void 0;return{kind:vr.Kind.OBJECT_TYPE_EXTENSION,name:x({},e.name),description:(0,El.formatDescription)(t)}}function q9(e){return{kind:vr.Kind.SCALAR_TYPE_DEFINITION,name:x({},e)}}function fv(e,t,n){let r={kind:e.kind},i=r;for(let a=0;a{"use strict";m();T();N();Object.defineProperty(UN,"__esModule",{value:!0});UN.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=void 0;UN.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=30});var ys=w(X=>{"use strict";m();T();N();Object.defineProperty(X,"__esModule",{value:!0});X.MAX_OR_SCOPES=X.EDFS_ARGS_REGEXP=X.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION=X.CONFIGURE_DESCRIPTION_DEFINITION=X.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION=X.SCOPE_SCALAR_DEFINITION=X.FIELD_SET_SCALAR_DEFINITION=X.VERSION_TWO_DIRECTIVE_DEFINITIONS=X.EVENT_DRIVEN_DIRECTIVE_DEFINITIONS_BY_DIRECTIVE_NAME=X.BASE_DIRECTIVE_DEFINITIONS=X.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=X.SUBSCRIPTION_FIELD_CONDITION_DEFINITION=X.SUBSCRIPTION_FILTER_VALUE_DEFINITION=X.SUBSCRIPTION_FILTER_CONDITION_DEFINITION=X.SUBSCRIPTION_FILTER_DEFINITION=X.SHAREABLE_DEFINITION=X.SEMANTIC_NON_NULL_DEFINITION=X.REQUIRES_SCOPES_DEFINITION=X.REQUIRE_FETCH_REASONS_DEFINITION=X.OVERRIDE_DEFINITION=X.ONE_OF_DEFINITION=X.LINK_DEFINITION=X.LINK_PURPOSE_DEFINITION=X.LINK_IMPORT_DEFINITION=X.INTERFACE_OBJECT_DEFINITION=X.INACCESSIBLE_DEFINITION=X.COMPOSE_DIRECTIVE_DEFINITION=X.AUTHENTICATED_DEFINITION=X.ALL_IN_BUILT_DIRECTIVE_NAMES=X.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=X.EDFS_REDIS_SUBSCRIBE_DEFINITION=X.EDFS_REDIS_PUBLISH_DEFINITION=X.TAG_DEFINITION=X.SPECIFIED_BY_DEFINITION=X.REQUIRES_DEFINITION=X.PROVIDES_DEFINITION=X.KEY_DEFINITION=X.REQUIRED_FIELDSET_TYPE_NODE=X.EDFS_NATS_SUBSCRIBE_DEFINITION=X.EDFS_NATS_REQUEST_DEFINITION=X.EDFS_NATS_PUBLISH_DEFINITION=X.EDFS_KAFKA_SUBSCRIBE_DEFINITION=X.EDFS_KAFKA_PUBLISH_DEFINITION=X.EXTERNAL_DEFINITION=X.EXTENDS_DEFINITION=X.DEPRECATED_DEFINITION=X.BASE_SCALARS=X.REQUIRED_STRING_TYPE_NODE=void 0;var ae=Ae(),re=Jr(),j9=Nv(),U=ur();X.REQUIRED_STRING_TYPE_NODE={kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)};X.BASE_SCALARS=new Set(["_Any","_Entities",U.BOOLEAN_SCALAR,U.FLOAT_SCALAR,U.ID_SCALAR,U.INT_SCALAR,U.FIELD_SET_SCALAR,U.SCOPE_SCALAR,U.STRING_SCALAR]);X.DEPRECATED_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.REASON),type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR),defaultValue:{kind:ae.Kind.STRING,value:ae.DEFAULT_DEPRECATION_REASON}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ARGUMENT_DEFINITION_UPPER,U.ENUM_VALUE_UPPER,U.FIELD_DEFINITION_UPPER,U.INPUT_FIELD_DEFINITION_UPPER]),name:(0,re.stringToNameNode)(U.DEPRECATED),repeatable:!1};X.EXTENDS_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.INTERFACE_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.EXTENDS),repeatable:!1};X.EXTERNAL_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.EXTERNAL),repeatable:!1};X.EDFS_KAFKA_PUBLISH_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.TOPIC),type:X.REQUIRED_STRING_TYPE_NODE},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_KAFKA_PUBLISH),repeatable:!1};X.EDFS_KAFKA_SUBSCRIBE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.TOPICS),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:X.REQUIRED_STRING_TYPE_NODE}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_KAFKA_SUBSCRIBE),repeatable:!1};X.EDFS_NATS_PUBLISH_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBJECT),type:X.REQUIRED_STRING_TYPE_NODE},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)},defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_NATS_PUBLISH),repeatable:!1};X.EDFS_NATS_REQUEST_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBJECT),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)},defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_NATS_REQUEST),repeatable:!1};X.EDFS_NATS_SUBSCRIBE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBJECTS),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:X.REQUIRED_STRING_TYPE_NODE}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.STREAM_CONFIGURATION),type:(0,re.stringToNamedTypeNode)(U.EDFS_NATS_STREAM_CONFIGURATION)}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_NATS_SUBSCRIBE),repeatable:!1};X.REQUIRED_FIELDSET_TYPE_NODE={kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.FIELD_SET_SCALAR)};X.KEY_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELDS),type:X.REQUIRED_FIELDSET_TYPE_NODE},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.RESOLVABLE),type:(0,re.stringToNamedTypeNode)(U.BOOLEAN_SCALAR),defaultValue:{kind:ae.Kind.BOOLEAN,value:!0}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.INTERFACE_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.KEY),repeatable:!0};X.PROVIDES_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELDS),type:X.REQUIRED_FIELDSET_TYPE_NODE}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.PROVIDES),repeatable:!1};X.REQUIRES_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELDS),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.FIELD_SET_SCALAR)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.REQUIRES),repeatable:!1};X.SPECIFIED_BY_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.URL_LOWER),type:X.REQUIRED_STRING_TYPE_NODE}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.SCALAR_UPPER]),name:(0,re.stringToNameNode)(U.SPECIFIED_BY),repeatable:!1};X.TAG_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.NAME),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ARGUMENT_DEFINITION_UPPER,U.ENUM_UPPER,U.ENUM_VALUE_UPPER,U.FIELD_DEFINITION_UPPER,U.INPUT_FIELD_DEFINITION_UPPER,U.INPUT_OBJECT_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER,U.UNION_UPPER]),name:(0,re.stringToNameNode)(U.TAG),repeatable:!0};X.EDFS_REDIS_PUBLISH_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CHANNEL),type:X.REQUIRED_STRING_TYPE_NODE},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_REDIS_PUBLISH),repeatable:!1};X.EDFS_REDIS_SUBSCRIBE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CHANNELS),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:X.REQUIRED_STRING_TYPE_NODE}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_REDIS_SUBSCRIBE),repeatable:!1};X.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=new Map([[U.DEPRECATED,X.DEPRECATED_DEFINITION],[U.EXTENDS,X.EXTENDS_DEFINITION],[U.EXTERNAL,X.EXTERNAL_DEFINITION],[U.EDFS_KAFKA_PUBLISH,X.EDFS_KAFKA_PUBLISH_DEFINITION],[U.EDFS_KAFKA_SUBSCRIBE,X.EDFS_KAFKA_SUBSCRIBE_DEFINITION],[U.EDFS_NATS_PUBLISH,X.EDFS_NATS_PUBLISH_DEFINITION],[U.EDFS_NATS_REQUEST,X.EDFS_NATS_REQUEST_DEFINITION],[U.EDFS_NATS_SUBSCRIBE,X.EDFS_NATS_SUBSCRIBE_DEFINITION],[U.EDFS_REDIS_PUBLISH,X.EDFS_REDIS_PUBLISH_DEFINITION],[U.EDFS_REDIS_SUBSCRIBE,X.EDFS_REDIS_SUBSCRIBE_DEFINITION],[U.KEY,X.KEY_DEFINITION],[U.PROVIDES,X.PROVIDES_DEFINITION],[U.REQUIRES,X.REQUIRES_DEFINITION],[U.SPECIFIED_BY,X.SPECIFIED_BY_DEFINITION],[U.TAG,X.TAG_DEFINITION]]);X.ALL_IN_BUILT_DIRECTIVE_NAMES=new Set([U.AUTHENTICATED,U.COMPOSE_DIRECTIVE,U.CONFIGURE_DESCRIPTION,U.CONFIGURE_CHILD_DESCRIPTIONS,U.DEPRECATED,U.EDFS_NATS_PUBLISH,U.EDFS_NATS_REQUEST,U.EDFS_NATS_SUBSCRIBE,U.EDFS_KAFKA_PUBLISH,U.EDFS_KAFKA_SUBSCRIBE,U.EDFS_REDIS_PUBLISH,U.EDFS_REDIS_SUBSCRIBE,U.EXTENDS,U.EXTERNAL,U.INACCESSIBLE,U.INTERFACE_OBJECT,U.KEY,U.LINK,U.ONE_OF,U.OVERRIDE,U.PROVIDES,U.REQUIRE_FETCH_REASONS,U.REQUIRES,U.REQUIRES_SCOPES,U.SEMANTIC_NON_NULL,U.SHAREABLE,U.SPECIFIED_BY,U.SUBSCRIPTION_FILTER,U.TAG]);X.AUTHENTICATED_DEFINITION={arguments:[],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ENUM_UPPER,U.FIELD_DEFINITION_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER]),name:(0,re.stringToNameNode)(U.AUTHENTICATED),repeatable:!1};X.COMPOSE_DIRECTIVE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.NAME),type:X.REQUIRED_STRING_TYPE_NODE}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.SCHEMA_UPPER]),name:(0,re.stringToNameNode)(U.COMPOSE_DIRECTIVE),repeatable:!0};X.INACCESSIBLE_DEFINITION={arguments:[],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ARGUMENT_DEFINITION_UPPER,U.ENUM_UPPER,U.ENUM_VALUE_UPPER,U.FIELD_DEFINITION_UPPER,U.INPUT_FIELD_DEFINITION_UPPER,U.INPUT_OBJECT_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER,U.UNION_UPPER]),name:(0,re.stringToNameNode)(U.INACCESSIBLE),repeatable:!1};X.INTERFACE_OBJECT_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.INTERFACE_OBJECT),repeatable:!1};X.LINK_IMPORT_DEFINITION={kind:ae.Kind.SCALAR_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.LINK_IMPORT)};X.LINK_PURPOSE_DEFINITION={kind:ae.Kind.ENUM_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.LINK_PURPOSE),values:[{directives:[],kind:ae.Kind.ENUM_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.EXECUTION)},{directives:[],kind:ae.Kind.ENUM_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SECURITY)}]};X.LINK_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.URL_LOWER),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.AS),type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FOR),type:(0,re.stringToNamedTypeNode)(U.LINK_PURPOSE)},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.IMPORT),type:{kind:ae.Kind.LIST_TYPE,type:(0,re.stringToNamedTypeNode)(U.LINK_IMPORT)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.SCHEMA_UPPER]),name:(0,re.stringToNameNode)(U.LINK),repeatable:!0};X.ONE_OF_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.INPUT_OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.ONE_OF),repeatable:!1};X.OVERRIDE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FROM),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER]),name:(0,re.stringToNameNode)(U.OVERRIDE),repeatable:!1};X.REQUIRE_FETCH_REASONS_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.REQUIRE_FETCH_REASONS),repeatable:!0};X.REQUIRES_SCOPES_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SCOPES),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.SCOPE_SCALAR)}}}}}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ENUM_UPPER,U.FIELD_DEFINITION_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER]),name:(0,re.stringToNameNode)(U.REQUIRES_SCOPES),repeatable:!1};X.SEMANTIC_NON_NULL_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.LEVELS),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.INT_SCALAR)}}},defaultValue:{kind:ae.Kind.LIST,values:[{kind:ae.Kind.INT,value:"0"}]}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.SEMANTIC_NON_NULL),repeatable:!1};X.SHAREABLE_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.SHAREABLE),repeatable:!0};X.SUBSCRIPTION_FILTER_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CONDITION),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_CONDITION)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER]),name:(0,re.stringToNameNode)(U.SUBSCRIPTION_FILTER),repeatable:!1};X.SUBSCRIPTION_FILTER_CONDITION_DEFINITION={fields:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.AND_UPPER),type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.IN_UPPER),type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FIELD_CONDITION)},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.OR_UPPER),type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.NOT_UPPER),type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_CONDITION)}],kind:ae.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBSCRIPTION_FILTER_CONDITION)};X.SUBSCRIPTION_FILTER_VALUE_DEFINITION={kind:ae.Kind.SCALAR_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBSCRIPTION_FILTER_VALUE)};X.SUBSCRIPTION_FIELD_CONDITION_DEFINITION={fields:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELD_PATH),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.VALUES),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_VALUE)}}}],kind:ae.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBSCRIPTION_FIELD_CONDITION)};X.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=new Map([[U.AUTHENTICATED,X.AUTHENTICATED_DEFINITION],[U.COMPOSE_DIRECTIVE,X.COMPOSE_DIRECTIVE_DEFINITION],[U.INACCESSIBLE,X.INACCESSIBLE_DEFINITION],[U.INTERFACE_OBJECT,X.INTERFACE_OBJECT_DEFINITION],[U.LINK,X.LINK_DEFINITION],[U.OVERRIDE,X.OVERRIDE_DEFINITION],[U.REQUIRES_SCOPES,X.REQUIRES_SCOPES_DEFINITION],[U.SHAREABLE,X.SHAREABLE_DEFINITION]]);X.BASE_DIRECTIVE_DEFINITIONS=[X.DEPRECATED_DEFINITION,X.EXTENDS_DEFINITION,X.EXTERNAL_DEFINITION,X.KEY_DEFINITION,X.PROVIDES_DEFINITION,X.REQUIRES_DEFINITION,X.SPECIFIED_BY_DEFINITION,X.TAG_DEFINITION];X.EVENT_DRIVEN_DIRECTIVE_DEFINITIONS_BY_DIRECTIVE_NAME=new Map([[U.EDFS_KAFKA_PUBLISH,X.EDFS_KAFKA_PUBLISH_DEFINITION],[U.EDFS_KAFKA_SUBSCRIBE,X.EDFS_KAFKA_SUBSCRIBE_DEFINITION],[U.EDFS_NATS_PUBLISH,X.EDFS_NATS_PUBLISH_DEFINITION],[U.EDFS_NATS_REQUEST,X.EDFS_NATS_REQUEST_DEFINITION],[U.EDFS_NATS_SUBSCRIBE,X.EDFS_NATS_SUBSCRIBE_DEFINITION],[U.EDFS_REDIS_PUBLISH,X.EDFS_REDIS_PUBLISH_DEFINITION],[U.EDFS_REDIS_SUBSCRIBE,X.EDFS_REDIS_SUBSCRIBE_DEFINITION]]);X.VERSION_TWO_DIRECTIVE_DEFINITIONS=[X.AUTHENTICATED_DEFINITION,X.COMPOSE_DIRECTIVE_DEFINITION,X.INACCESSIBLE_DEFINITION,X.INTERFACE_OBJECT_DEFINITION,X.OVERRIDE_DEFINITION,X.REQUIRES_SCOPES_DEFINITION,X.SHAREABLE_DEFINITION];X.FIELD_SET_SCALAR_DEFINITION={kind:ae.Kind.SCALAR_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELD_SET_SCALAR)};X.SCOPE_SCALAR_DEFINITION={kind:ae.Kind.SCALAR_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.SCOPE_SCALAR)};X.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION={kind:ae.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.EDFS_NATS_STREAM_CONFIGURATION),fields:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CONSUMER_NAME),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.STREAM_NAME),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CONSUMER_INACTIVE_THRESHOLD),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.INT_SCALAR)},defaultValue:{kind:ae.Kind.INT,value:j9.DEFAULT_CONSUMER_INACTIVE_THRESHOLD.toString()}}]};X.CONFIGURE_DESCRIPTION_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROPAGATE),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.BOOLEAN_SCALAR)},defaultValue:{kind:ae.Kind.BOOLEAN,value:!0}},{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.DESCRIPTION_OVERRIDE),type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ARGUMENT_DEFINITION_UPPER,U.ENUM_UPPER,U.ENUM_VALUE_UPPER,U.FIELD_DEFINITION_UPPER,U.INTERFACE_UPPER,U.INPUT_OBJECT_UPPER,U.INPUT_FIELD_DEFINITION_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER,U.SCHEMA_UPPER,U.UNION_UPPER]),name:(0,re.stringToNameNode)(U.CONFIGURE_DESCRIPTION),repeatable:!1};X.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROPAGATE),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.BOOLEAN_SCALAR)},defaultValue:{kind:ae.Kind.BOOLEAN,value:!0}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ENUM_UPPER,U.INPUT_OBJECT_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.CONFIGURE_CHILD_DESCRIPTIONS),repeatable:!1};X.EDFS_ARGS_REGEXP=/{{\s*args\.([a-zA-Z0-9_]+)\s*}}/g;X.MAX_OR_SCOPES=16});var kN=w(nc=>{"use strict";m();T();N();Object.defineProperty(nc,"__esModule",{value:!0});nc.newParentTagData=Q9;nc.newChildTagData=Y9;nc.validateImplicitFieldSets=J9;nc.newContractTagOptionsFromArrays=H9;nc.getDescriptionFromString=z9;var zr=Ae(),K9=ou(),G9=ys(),$9=Jr(),TC=Hr();function Q9(e){return{childTagDataByChildName:new Map,tagNames:new Set,typeName:e}}function Y9(e){return{name:e,tagNames:new Set,tagNamesByArgumentName:new Map}}function J9({conditionalFieldDataByCoords:e,currentSubgraphName:t,entityData:n,implicitKeys:r,objectData:i,parentDefinitionDataByTypeName:a,graphNode:o}){let c=(0,TC.getValueOrDefault)(n.keyFieldSetDatasBySubgraphName,t,()=>new Map);for(let[l,d]of n.documentNodeByKeyFieldSet){if(c.has(l))continue;let f=[i],y=[],I=[],v=-1,P=!0,k=!0;(0,zr.visit)(d,{Argument:{enter(){return k=!1,zr.BREAK}},Field:{enter(K){let Q=f[v];if(P)return k=!1,zr.BREAK;let se=K.name.value,ie=Q.fieldDataByName.get(se);if(!ie||ie.argumentDataByName.size||y[v].has(se))return k=!1,zr.BREAK;let{isUnconditionallyProvided:Te}=(0,TC.getOrThrowError)(ie.externalFieldDataBySubgraphName,t,`${ie.originalParentTypeName}.${se}.externalFieldDataBySubgraphName`),de=e.get(`${ie.renamedParentTypeName}.${se}`);if(de){if(de.providedBy.length>0)I.push(...de.providedBy);else if(de.requiredBy.length>0)return k=!1,zr.BREAK}else if(!Te)return k=!1,zr.BREAK;y[v].add(se);let Re=(0,K9.getTypeNodeNamedTypeName)(ie.node.type);if(G9.BASE_SCALARS.has(Re))return;let xe=a.get(Re);if(!xe)return k=!1,zr.BREAK;if(xe.kind===zr.Kind.OBJECT_TYPE_DEFINITION){P=!0,f.push(xe);return}if((0,$9.isKindAbstract)(xe.kind))return k=!1,zr.BREAK}},InlineFragment:{enter(){return k=!1,zr.BREAK}},SelectionSet:{enter(){if(!P||(v+=1,P=!1,v<0||v>=f.length))return k=!1,zr.BREAK;y.push(new Set)},leave(){if(P)return k=!1,zr.BREAK;v-=1,f.pop(),y.pop()}}}),k&&(r.push(Y(x({fieldName:"",selectionSet:l},I.length>0?{conditions:I}:{}),{disableEntityResolver:!0})),o&&o.satisfiedFieldSets.add(l))}}function H9(e,t){return{tagNamesToExclude:new Set(e),tagNamesToInclude:new Set(t)}}function z9(e){if(e)return{block:!0,kind:zr.Kind.STRING,value:e}}});var yl=w(mt=>{"use strict";m();T();N();Object.defineProperty(mt,"__esModule",{value:!0});mt.MergeMethod=void 0;mt.newPersistedDirectivesData=X9;mt.isNodeExternalOrShareable=Z9;mt.isTypeRequired=e7;mt.areDefaultValuesCompatible=hC;mt.compareAndValidateInputValueDefaultValues=t7;mt.setMutualExecutableLocations=n7;mt.isTypeNameRootType=r7;mt.getRenamedRootTypeName=i7;mt.childMapToValueArray=s7;mt.setLongestDescription=o7;mt.isParentDataRootType=yC;mt.isInterfaceDefinitionData=u7;mt.setParentDataExtensionType=c7;mt.extractPersistedDirectives=p7;mt.propagateAuthDirectives=f7;mt.propagateFieldAuthDirectives=m7;mt.generateDeprecatedDirective=yv;mt.getClientPersistedDirectiveNodes=Ev;mt.getNodeForRouterSchemaByData=T7;mt.getClientSchemaFieldNodeByFieldData=E7;mt.getNodeWithPersistedDirectivesByInputValueData=gC;mt.addValidPersistedDirectiveDefinitionNodeByData=y7;mt.newInvalidFieldNames=I7;mt.validateExternalAndShareable=g7;mt.isTypeValidImplementation=MN;mt.isNodeDataInaccessible=_C;mt.isLeafKind=_7;mt.getSubscriptionFilterValue=v7;mt.getParentTypeName=S7;mt.newConditionalFieldData=O7;mt.getDefinitionDataCoords=D7;mt.isParentDataCompositeOutputType=b7;mt.newExternalFieldData=A7;mt.getInitialFederatedDescription=R7;mt.areKindsEqual=F7;mt.isFieldData=Iv;mt.isInputNodeKind=P7;mt.isOutputNodeKind=w7;var st=Ae(),Tv=Ip(),hl=Jr(),hv=oa(),Ct=ur(),rc=Hr(),W9=kN();function X9(){return{deprecatedReason:"",directivesByDirectiveName:new Map,isDeprecated:!1,tagDirectiveByName:new Map}}function Z9(e,t,n){var i;let r={isExternal:n.has(Ct.EXTERNAL),isShareable:t||n.has(Ct.SHAREABLE)};if(!((i=e.directives)!=null&&i.length))return r;for(let a of e.directives){let o=a.name.value;if(o===Ct.EXTERNAL){r.isExternal=!0;continue}o===Ct.SHAREABLE&&(r.isShareable=!0)}return r}function e7(e){return e.kind===st.Kind.NON_NULL_TYPE}function hC(e,t){switch(e.kind){case st.Kind.LIST_TYPE:return t.kind===st.Kind.LIST||t.kind===st.Kind.NULL;case st.Kind.NAMED_TYPE:if(t.kind===st.Kind.NULL)return!0;switch(e.name.value){case Ct.BOOLEAN_SCALAR:return t.kind===st.Kind.BOOLEAN;case Ct.FLOAT_SCALAR:return t.kind===st.Kind.INT||t.kind===st.Kind.FLOAT;case Ct.INT_SCALAR:return t.kind===st.Kind.INT;case Ct.STRING_SCALAR:return t.kind===st.Kind.STRING;default:return!0}case st.Kind.NON_NULL_TYPE:return t.kind===st.Kind.NULL?!1:hC(e.type,t)}}function t7(e,t,n){if(!e.defaultValue)return;if(!t.defaultValue){e.includeDefaultValue=!1;return}let r=(0,st.print)(e.defaultValue),i=(0,st.print)(t.defaultValue);if(r!==i){n.push((0,hv.incompatibleInputValueDefaultValuesError)(`${e.isArgument?Ct.ARGUMENT:Ct.INPUT_FIELD} "${e.name}"`,e.originalCoords,[...t.subgraphNames],r,i));return}}function n7(e,t){let n=new Set;for(let r of t)e.executableLocations.has(r)&&n.add(r);e.executableLocations=n}function r7(e,t){return Ct.ROOT_TYPE_NAMES.has(e)||t.has(e)}function i7(e,t){let n=t.get(e);if(!n)return e;switch(n){case st.OperationTypeNode.MUTATION:return Ct.MUTATION;case st.OperationTypeNode.SUBSCRIPTION:return Ct.SUBSCRIPTION;default:return Ct.QUERY}}function a7(e){for(let t of e.argumentDataByName.values()){for(let n of t.directivesByDirectiveName.values())t.node.directives.push(...n);e.node.arguments.push(t.node)}}function s7(e){let t=[];for(let n of e.values()){Iv(n)&&a7(n);for(let r of n.directivesByDirectiveName.values())n.node.directives.push(...r);t.push(n.node)}return t}function o7(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.directivesByDirectiveName.set(Ct.REQUIRES_SCOPES,[(0,rc.generateRequiresScopesDirective)(t.requiredScopes)]))}function m7(e,t){if(!t)return;let n=t.fieldAuthDataByFieldName.get(e.name);n&&(n.originalData.requiresAuthentication&&e.persistedDirectivesData.directivesByDirectiveName.set(Ct.AUTHENTICATED,[(0,rc.generateSimpleDirective)(Ct.AUTHENTICATED)]),n.originalData.requiredScopes.length>0&&e.persistedDirectivesData.directivesByDirectiveName.set(Ct.REQUIRES_SCOPES,[(0,rc.generateRequiresScopesDirective)(n.originalData.requiredScopes)]))}function yv(e){return{kind:st.Kind.DIRECTIVE,name:(0,hl.stringToNameNode)(Ct.DEPRECATED),arguments:[{kind:st.Kind.ARGUMENT,name:(0,hl.stringToNameNode)(Ct.REASON),value:{kind:st.Kind.STRING,value:e||Ct.DEPRECATED_DEFAULT_ARGUMENT_VALUE}}]}}function N7(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,hv.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}i.push(...o)}}return i}function IC(e,t,n){let r=[...e.persistedDirectivesData.tagDirectiveByName.values()];return e.persistedDirectivesData.isDeprecated&&r.push(yv(e.persistedDirectivesData.deprecatedReason)),r.push(...N7(e.persistedDirectivesData.directivesByDirectiveName,t,e.name,n)),r}function Ev(e){var n;let t=[];e.persistedDirectivesData.isDeprecated&&t.push(yv(e.persistedDirectivesData.deprecatedReason));for(let[r,i]of e.persistedDirectivesData.directivesByDirectiveName){if(r===Ct.SEMANTIC_NON_NULL&&Iv(e)){t.push((0,rc.generateSemanticNonNullDirective)((n=(0,rc.getFirstEntry)(e.nullLevelsBySubgraphName))!=null?n:new Set([0])));continue}Ct.PERSISTED_CLIENT_DIRECTIVES.has(r)&&t.push(i[0])}return t}function T7(e,t,n){return e.node.name=(0,hl.stringToNameNode)(e.name),e.node.description=e.description,e.node.directives=IC(e,t,n),e.node}function E7(e){let t=Ev(e),n=[];for(let r of e.argumentDataByName.values())_C(r)||n.push(Y(x({},r.node),{directives:Ev(r)}));return Y(x({},e.node),{directives:t,arguments:n})}function gC(e,t,n){return e.node.name=(0,hl.stringToNameNode)(e.name),e.node.type=e.type,e.node.description=e.description,e.node.directives=IC(e,t,n),e.includeDefaultValue&&(e.node.defaultValue=e.defaultValue),e.node}function h7(e,t,n,r,i){let a=[];for(let[o,c]of t.argumentDataByArgumentName){let l=(0,rc.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(gC(c,n,r)),i&&i.add(o)}return a.length>0?(r.push((0,hv.invalidRequiredInputValueError)(Ct.DIRECTIVE_DEFINITION,`@${t.name}`,a)),!1):!0}function y7(e,t,n,r){let i=[];h7(i,t,n,r)&&e.push({arguments:i,kind:st.Kind.DIRECTIVE_DEFINITION,locations:(0,hl.setToNameNodeArray)(t.executableLocations),name:(0,hl.stringToNameNode)(t.name),repeatable:t.repeatable,description:t.description})}function I7(){return{byShareable:new Set,subgraphNamesByExternalFieldName:new Map}}function g7(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 EC;(function(e){e[e.UNION=0]="UNION",e[e.INTERSECTION=1]="INTERSECTION",e[e.CONSISTENT=2]="CONSISTENT"})(EC||(mt.MergeMethod=EC={}));function MN(e,t,n){if(e.kind===st.Kind.NON_NULL_TYPE)return t.kind!==st.Kind.NON_NULL_TYPE?!1:MN(e.type,t.type,n);if(t.kind===st.Kind.NON_NULL_TYPE)return MN(e,t.type,n);switch(e.kind){case st.Kind.NAMED_TYPE:if(t.kind===st.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===st.Kind.LIST_TYPE?MN(e.type,t.type,n):!1}}function _C(e){return e.persistedDirectivesData.directivesByDirectiveName.has(Ct.INACCESSIBLE)||e.directivesByDirectiveName.has(Ct.INACCESSIBLE)}function _7(e){return e===st.Kind.SCALAR_TYPE_DEFINITION||e===st.Kind.ENUM_TYPE_DEFINITION}function v7(e){switch(e.kind){case st.Kind.BOOLEAN:return e.value;case st.Kind.ENUM:case st.Kind.STRING:return e.value;case st.Kind.FLOAT:case st.Kind.INT:try{return parseFloat(e.value)}catch(t){return"NaN"}case st.Kind.NULL:return null}}function S7(e){return e.kind===st.Kind.OBJECT_TYPE_DEFINITION&&e.renamedTypeName||e.name}function O7(){return{providedBy:[],requiredBy:[]}}function D7(e,t){switch(e.kind){case st.Kind.ENUM_VALUE_DEFINITION:return`${e.parentTypeName}.${e.name}`;case st.Kind.FIELD_DEFINITION:return`${t?e.renamedParentTypeName:e.originalParentTypeName}.${e.name}`;case st.Kind.ARGUMENT:case st.Kind.INPUT_VALUE_DEFINITION:return t?e.federatedCoords:e.originalCoords;case st.Kind.OBJECT_TYPE_DEFINITION:return t?e.renamedTypeName:e.name;default:return e.name}}function b7(e){return e.kind===st.Kind.OBJECT_TYPE_DEFINITION||e.kind===st.Kind.INTERFACE_TYPE_DEFINITION}function A7(e){return{isDefinedExternal:e,isUnconditionallyProvided:!e}}function R7(e){let{value:t,done:n}=e.configureDescriptionDataBySubgraphName.values().next();if(n)return e.description;if(t.propagate)return(0,W9.getDescriptionFromString)(t.description)||e.description}function F7(e,t){return e.kind===t.kind}function Iv(e){return e.kind===st.Kind.FIELD_DEFINITION}function P7(e){return Ct.INPUT_NODE_KINDS.has(e)}function w7(e){return Ct.OUTPUT_NODE_KINDS.has(e)}});var vv={};um(vv,{__addDisposableResource:()=>KC,__assign:()=>xN,__asyncDelegator:()=>BC,__asyncGenerator:()=>CC,__asyncValues:()=>UC,__await:()=>Il,__awaiter:()=>AC,__classPrivateFieldGet:()=>qC,__classPrivateFieldIn:()=>jC,__classPrivateFieldSet:()=>VC,__createBinding:()=>VN,__decorate:()=>OC,__disposeResources:()=>GC,__esDecorate:()=>L7,__exportStar:()=>FC,__extends:()=>vC,__generator:()=>RC,__importDefault:()=>xC,__importStar:()=>MC,__makeTemplateObject:()=>kC,__metadata:()=>bC,__param:()=>DC,__propKey:()=>B7,__read:()=>_v,__rest:()=>SC,__runInitializers:()=>C7,__setFunctionName:()=>U7,__spread:()=>PC,__spreadArray:()=>LC,__spreadArrays:()=>wC,__values:()=>qN,default:()=>x7});function vC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");gv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function SC(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 DC(e,t){return function(n,r){t(n,r,e)}}function L7(e,t,n,r,i,a){function o(Q){if(Q!==void 0&&typeof Q!="function")throw new TypeError("Function expected");return Q}for(var c=r.kind,l=c==="getter"?"get":c==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,f=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),y,I=!1,v=n.length-1;v>=0;v--){var P={};for(var k in r)P[k]=k==="access"?{}:r[k];for(var k in r.access)P.access[k]=r.access[k];P.addInitializer=function(Q){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(Q||null))};var K=(0,n[v])(c==="accessor"?{get:f.get,set:f.set}:f[l],P);if(c==="accessor"){if(K===void 0)continue;if(K===null||typeof K!="object")throw new TypeError("Object expected");(y=o(K.get))&&(f.get=y),(y=o(K.set))&&(f.set=y),(y=o(K.init))&&i.unshift(y)}else(y=o(K))&&(c==="field"?i.unshift(y):f[l]=y)}d&&Object.defineProperty(d,r.name,f),I=!0}function C7(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 _v(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 PC(){for(var e=[],t=0;t1||c(I,v)})})}function c(I,v){try{l(r[I](v))}catch(P){y(a[0][3],P)}}function l(I){I.value instanceof Il?Promise.resolve(I.value.v).then(d,f):y(a[0][2],I)}function d(I){c("next",I)}function f(I){c("throw",I)}function y(I,v){I(v),a.shift(),a.length&&c(a[0][0],a[0][1])}}function BC(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:Il(e[i](o)),done:!1}:a?a(o):o}:a}}function UC(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 qN=="function"?qN(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 kC(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function MC(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)&&VN(t,e,n);return k7(t,e),t}function xC(e){return e&&e.__esModule?e:{default:e}}function qC(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 VC(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 jC(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 KC(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 GC(e){function t(r){e.error=e.hasError?new M7(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 gv,xN,VN,k7,M7,x7,Sv=Lu(()=>{"use strict";m();T();N();gv=function(e,t){return gv=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])},gv(e,t)};xN=function(){return xN=Object.assign||function(t){for(var n,r=1,i=arguments.length;rdB,__assign:()=>jN,__asyncDelegator:()=>rB,__asyncGenerator:()=>nB,__asyncValues:()=>iB,__await:()=>gl,__awaiter:()=>zC,__classPrivateFieldGet:()=>uB,__classPrivateFieldIn:()=>lB,__classPrivateFieldSet:()=>cB,__createBinding:()=>GN,__decorate:()=>YC,__disposeResources:()=>pB,__esDecorate:()=>q7,__exportStar:()=>XC,__extends:()=>$C,__generator:()=>WC,__importDefault:()=>oB,__importStar:()=>sB,__makeTemplateObject:()=>aB,__metadata:()=>HC,__param:()=>JC,__propKey:()=>j7,__read:()=>Dv,__rest:()=>QC,__runInitializers:()=>V7,__setFunctionName:()=>K7,__spread:()=>ZC,__spreadArray:()=>tB,__spreadArrays:()=>eB,__values:()=>KN,default:()=>Q7});function $C(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ov(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function QC(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 JC(e,t){return function(n,r){t(n,r,e)}}function q7(e,t,n,r,i,a){function o(Q){if(Q!==void 0&&typeof Q!="function")throw new TypeError("Function expected");return Q}for(var c=r.kind,l=c==="getter"?"get":c==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,f=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),y,I=!1,v=n.length-1;v>=0;v--){var P={};for(var k in r)P[k]=k==="access"?{}:r[k];for(var k in r.access)P.access[k]=r.access[k];P.addInitializer=function(Q){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(Q||null))};var K=(0,n[v])(c==="accessor"?{get:f.get,set:f.set}:f[l],P);if(c==="accessor"){if(K===void 0)continue;if(K===null||typeof K!="object")throw new TypeError("Object expected");(y=o(K.get))&&(f.get=y),(y=o(K.set))&&(f.set=y),(y=o(K.init))&&i.unshift(y)}else(y=o(K))&&(c==="field"?i.unshift(y):f[l]=y)}d&&Object.defineProperty(d,r.name,f),I=!0}function V7(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 Dv(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 ZC(){for(var e=[],t=0;t1||c(I,v)})})}function c(I,v){try{l(r[I](v))}catch(P){y(a[0][3],P)}}function l(I){I.value instanceof gl?Promise.resolve(I.value.v).then(d,f):y(a[0][2],I)}function d(I){c("next",I)}function f(I){c("throw",I)}function y(I,v){I(v),a.shift(),a.length&&c(a[0][0],a[0][1])}}function rB(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:gl(e[i](o)),done:!1}:a?a(o):o}:a}}function iB(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 KN=="function"?KN(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 aB(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function sB(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)&&GN(t,e,n);return G7(t,e),t}function oB(e){return e&&e.__esModule?e:{default:e}}function uB(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 cB(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 lB(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 dB(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 pB(e){function t(r){e.error=e.hasError?new $7(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 Ov,jN,GN,G7,$7,Q7,mB=Lu(()=>{"use strict";m();T();N();Ov=function(e,t){return Ov=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])},Ov(e,t)};jN=function(){return jN=Object.assign||function(t){for(var n,r=1,i=arguments.length;r{"use strict";m();T();N()});var gp=w(dr=>{"use strict";m();T();N();Object.defineProperty(dr,"__esModule",{value:!0});dr.assertSome=dr.isSome=dr.compareNodes=dr.nodeToString=dr.compareStrings=dr.isValidPath=dr.isDocumentString=dr.asArray=void 0;var Y7=Ae(),J7=e=>Array.isArray(e)?e:e?[e]:[];dr.asArray=J7;var H7=/\.[a-z0-9]+$/i;function z7(e){if(typeof e!="string"||H7.test(e))return!1;try{return(0,Y7.parse)(e),!0}catch(t){}return!1}dr.isDocumentString=z7;var W7=/[‘“!%^<>`]/;function X7(e){return typeof e=="string"&&!W7.test(e)}dr.isValidPath=X7;function TB(e,t){return String(e)String(t)?1:0}dr.compareStrings=TB;function bv(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}dr.nodeToString=bv;function Z7(e,t,n){let r=bv(e),i=bv(t);return typeof n=="function"?n(r,i):TB(r,i)}dr.compareNodes=Z7;function eZ(e){return e!=null}dr.isSome=eZ;function tZ(e,t="Value should be something"){if(e==null)throw new Error(t)}dr.assertSome=tZ});var _p=w(QN=>{"use strict";m();T();N();Object.defineProperty(QN,"__esModule",{value:!0});QN.inspect=void 0;var yB=3;function nZ(e){return $N(e,[])}QN.inspect=nZ;function $N(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return rZ(e,t);default:return String(e)}}function EB(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message}; - ${e.stack}`}function rZ(e,t){if(e===null)return"null";if(e instanceof Error)return e.name==="AggregateError"?EB(e)+` -`+hB(e.errors,t):EB(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(iZ(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:$N(r,n)}else if(Array.isArray(e))return hB(e,n);return aZ(e,n)}function iZ(e){return typeof e.toJSON=="function"}function aZ(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>yB?"["+sZ(e)+"]":"{ "+n.map(([i,a])=>i+": "+$N(a,t)).join(", ")+" }"}function hB(e,t){if(e.length===0)return"[]";if(t.length>yB)return"[Array]";let n=e.length,r=[];for(let i=0;i{"use strict";m();T();N();Object.defineProperty(_l,"__esModule",{value:!0});_l.relocatedError=_l.createGraphQLError=void 0;var Av=Ae(),oZ=["message","locations","path","nodes","source","positions","originalError","name","stack","extensions"];function uZ(e){return e!=null&&typeof e=="object"&&Object.keys(e).every(t=>oZ.includes(t))}function Rv(e,t){return t!=null&&t.originalError&&!(t.originalError instanceof Error)&&uZ(t.originalError)&&(t.originalError=Rv(t.originalError.message,t.originalError)),Av.versionInfo.major>=17?new Av.GraphQLError(e,t):new Av.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)}_l.createGraphQLError=Rv;function cZ(e,t){return Rv(e.message,{nodes:e.nodes,source:e.source,positions:e.positions,path:t==null?e.path:t,originalError:e,extensions:e.extensions})}_l.relocatedError=cZ});var vp=w(ki=>{"use strict";m();T();N();Object.defineProperty(ki,"__esModule",{value:!0});ki.hasOwnProperty=ki.promiseReduce=ki.isPromise=ki.isObjectLike=ki.isIterableObject=void 0;function lZ(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}ki.isIterableObject=lZ;function dZ(e){return typeof e=="object"&&e!==null}ki.isObjectLike=dZ;function IB(e){return(e==null?void 0:e.then)!=null}ki.isPromise=IB;function pZ(e,t,n){let r=n;for(let i of e)r=IB(r)?r.then(a=>t(a,i)):t(r,i);return r}ki.promiseReduce=pZ;function fZ(e,t){return Object.prototype.hasOwnProperty.call(e,t)}ki.hasOwnProperty=fZ});var Pv=w(HN=>{"use strict";m();T();N();Object.defineProperty(HN,"__esModule",{value:!0});HN.getArgumentValues=void 0;var Fv=_p(),ic=Ae(),JN=YN(),mZ=vp();function NZ(e,t,n={}){var o;let r={},a=((o=t.arguments)!=null?o:[]).reduce((c,l)=>Y(x({},c),{[l.name.value]:l}),{});for(let{name:c,type:l,defaultValue:d}of e.args){let f=a[c];if(!f){if(d!==void 0)r[c]=d;else if((0,ic.isNonNullType)(l))throw(0,JN.createGraphQLError)(`Argument "${c}" of required type "${(0,Fv.inspect)(l)}" was not provided.`,{nodes:[t]});continue}let y=f.value,I=y.kind===ic.Kind.NULL;if(y.kind===ic.Kind.VARIABLE){let P=y.name.value;if(n==null||!(0,mZ.hasOwnProperty)(n,P)){if(d!==void 0)r[c]=d;else if((0,ic.isNonNullType)(l))throw(0,JN.createGraphQLError)(`Argument "${c}" of required type "${(0,Fv.inspect)(l)}" was provided the variable "$${P}" which was not provided a runtime value.`,{nodes:[y]});continue}I=n[P]==null}if(I&&(0,ic.isNonNullType)(l))throw(0,JN.createGraphQLError)(`Argument "${c}" of non-null type "${(0,Fv.inspect)(l)}" must not be null.`,{nodes:[y]});let v=(0,ic.valueFromAST)(y,l,n);if(v===void 0)throw(0,JN.createGraphQLError)(`Argument "${c}" has invalid value ${(0,ic.print)(y)}.`,{nodes:[y]});r[c]=v}return r}HN.getArgumentValues=NZ});var wv=w(Ua=>{"use strict";m();T();N();Object.defineProperty(Ua,"__esModule",{value:!0});Ua.getDirective=Ua.getDirectives=Ua.getDirectiveInExtensions=Ua.getDirectivesInExtensions=void 0;var _B=Pv();function vB(e,t=["directives"]){return t.reduce((n,r)=>n==null?n:n[r],e==null?void 0:e.extensions)}Ua.getDirectivesInExtensions=vB;function gB(e,t){let n=e.filter(r=>r.name===t);if(n.length)return n.map(r=>{var i;return(i=r.args)!=null?i:{}})}function SB(e,t,n=["directives"]){let r=n.reduce((a,o)=>a==null?a:a[o],e==null?void 0:e.extensions);if(r===void 0)return;if(Array.isArray(r))return gB(r,t);let i=[];for(let[a,o]of Object.entries(r))if(Array.isArray(o))for(let c of o)i.push({name:a,args:c});else i.push({name:a,args:o});return gB(i,t)}Ua.getDirectiveInExtensions=SB;function TZ(e,t,n=["directives"]){let r=vB(t,n);if(r!=null&&r.length>0)return r;let a=(e&&e.getDirectives?e.getDirectives():[]).reduce((l,d)=>(l[d.name]=d,l),{}),o=[];t.astNode&&o.push(t.astNode),"extensionASTNodes"in t&&t.extensionASTNodes&&(o=[...o,...t.extensionASTNodes]);let c=[];for(let l of o)if(l.directives)for(let d of l.directives){let f=a[d.name.value];f&&c.push({name:d.name.value,args:(0,_B.getArgumentValues)(f,d)})}return c}Ua.getDirectives=TZ;function EZ(e,t,n,r=["directives"]){let i=SB(t,n,r);if(i!=null)return i;let a=e&&e.getDirective?e.getDirective(n):void 0;if(a==null)return;let o=[];t.astNode&&o.push(t.astNode),"extensionASTNodes"in t&&t.extensionASTNodes&&(o=[...o,...t.extensionASTNodes]);let c=[];for(let l of o)if(l.directives)for(let d of l.directives)d.name.value===n&&c.push((0,_B.getArgumentValues)(a,d));if(c.length)return c}Ua.getDirective=EZ});var Lv=w(zN=>{"use strict";m();T();N();Object.defineProperty(zN,"__esModule",{value:!0});zN.getFieldsWithDirectives=void 0;var hZ=Ae();function yZ(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}`,f=c.directives.map(y=>({name:y.name.value,args:(y.arguments||[]).reduce((I,v)=>Y(x({},I),{[v.name.value]:(0,hZ.valueFromASTUntyped)(v.value)}),{})}));n[d]=f}}}return n}zN.getFieldsWithDirectives=yZ});var OB=w(WN=>{"use strict";m();T();N();Object.defineProperty(WN,"__esModule",{value:!0});WN.getArgumentsWithDirectives=void 0;var Cv=Ae();function IZ(e){return e.kind===Cv.Kind.OBJECT_TYPE_DEFINITION||e.kind===Cv.Kind.OBJECT_TYPE_EXTENSION}function gZ(e){var r;let t={},n=e.definitions.filter(IZ);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(f=>({name:f.name.value,args:(f.arguments||[]).reduce((y,I)=>Y(x({},y),{[I.name.value]:(0,Cv.valueFromASTUntyped)(I.value)}),{})}));c[l.name.value]=d}}return t}WN.getArgumentsWithDirectives=gZ});var Bv=w(XN=>{"use strict";m();T();N();Object.defineProperty(XN,"__esModule",{value:!0});XN.getImplementingTypes=void 0;var _Z=Ae();function vZ(e,t){let n=t.getTypeMap(),r=[];for(let i in n){let a=n[i];(0,_Z.isObjectType)(a)&&a.getInterfaces().find(c=>c.name===e)&&r.push(a.name)}return r}XN.getImplementingTypes=vZ});var kv=w(ZN=>{"use strict";m();T();N();Object.defineProperty(ZN,"__esModule",{value:!0});ZN.astFromType=void 0;var SZ=_p(),ac=Ae();function Uv(e){if((0,ac.isNonNullType)(e)){let t=Uv(e.ofType);if(t.kind===ac.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${(0,SZ.inspect)(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:ac.Kind.NON_NULL_TYPE,type:t}}else if((0,ac.isListType)(e))return{kind:ac.Kind.LIST_TYPE,type:Uv(e.ofType)};return{kind:ac.Kind.NAMED_TYPE,name:{kind:ac.Kind.NAME,value:e.name}}}ZN.astFromType=Uv});var tT=w(eT=>{"use strict";m();T();N();Object.defineProperty(eT,"__esModule",{value:!0});eT.astFromValueUntyped=void 0;var ka=Ae();function Mv(e){if(e===null)return{kind:ka.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=Mv(n);r!=null&&t.push(r)}return{kind:ka.Kind.LIST,values:t}}if(typeof e=="object"){let t=[];for(let n in e){let r=e[n],i=Mv(r);i&&t.push({kind:ka.Kind.OBJECT_FIELD,name:{kind:ka.Kind.NAME,value:n},value:i})}return{kind:ka.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:ka.Kind.BOOLEAN,value:e};if(typeof e=="bigint")return{kind:ka.Kind.INT,value:String(e)};if(typeof e=="number"&&isFinite(e)){let t=String(e);return OZ.test(t)?{kind:ka.Kind.INT,value:t}:{kind:ka.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:ka.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}eT.astFromValueUntyped=Mv;var OZ=/^-?(?:0|[1-9][0-9]*)$/});var bB=w(nT=>{"use strict";m();T();N();Object.defineProperty(nT,"__esModule",{value:!0});nT.astFromValue=void 0;var DZ=_p(),pi=Ae(),bZ=tT(),DB=vp();function Sp(e,t){if((0,pi.isNonNullType)(t)){let n=Sp(e,t.ofType);return(n==null?void 0:n.kind)===pi.Kind.NULL?null:n}if(e===null)return{kind:pi.Kind.NULL};if(e===void 0)return null;if((0,pi.isListType)(t)){let n=t.ofType;if((0,DB.isIterableObject)(e)){let r=[];for(let i of e){let a=Sp(i,n);a!=null&&r.push(a)}return{kind:pi.Kind.LIST,values:r}}return Sp(e,n)}if((0,pi.isInputObjectType)(t)){if(!(0,DB.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Sp(e[r.name],r.type);i&&n.push({kind:pi.Kind.OBJECT_FIELD,name:{kind:pi.Kind.NAME,value:r.name},value:i})}return{kind:pi.Kind.OBJECT,fields:n}}if((0,pi.isLeafType)(t)){let n=t.serialize(e);return n==null?null:(0,pi.isEnumType)(t)?{kind:pi.Kind.ENUM,value:n}:t.name==="ID"&&typeof n=="string"&&AZ.test(n)?{kind:pi.Kind.INT,value:n}:(0,bZ.astFromValueUntyped)(n)}console.assert(!1,"Unexpected input type: "+(0,DZ.inspect)(t))}nT.astFromValue=Sp;var AZ=/^-?(?:0|[1-9][0-9]*)$/});var AB=w(rT=>{"use strict";m();T();N();Object.defineProperty(rT,"__esModule",{value:!0});rT.getDescriptionNode=void 0;var RZ=Ae();function FZ(e){var t;if((t=e.astNode)!=null&&t.description)return Y(x({},e.astNode.description),{block:!0});if(e.description)return{kind:RZ.Kind.STRING,value:e.description,block:!0}}rT.getDescriptionNode=FZ});var vl=w(Or=>{"use strict";m();T();N();Object.defineProperty(Or,"__esModule",{value:!0});Or.memoize2of5=Or.memoize2of4=Or.memoize5=Or.memoize4=Or.memoize3=Or.memoize2=Or.memoize1=void 0;function PZ(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}}Or.memoize1=PZ;function wZ(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}}Or.memoize2=wZ;function LZ(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 f=e(r,i,a);return d.set(a,f),f}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}}Or.memoize3=LZ;function CZ(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 y=new WeakMap;c.set(i,y);let I=new WeakMap;y.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 y=new WeakMap;l.set(a,y);let I=e(r,i,a,o);return y.set(o,I),I}let d=l.get(a);if(!d){let y=new WeakMap;l.set(a,y);let I=e(r,i,a,o);return y.set(o,I),I}let f=d.get(o);if(f===void 0){let y=e(r,i,a,o);return d.set(o,y),y}return f}}Or.memoize4=CZ;function BZ(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 P=new WeakMap;v.set(a,P);let k=new WeakMap;P.set(o,k);let K=e(r,i,a,o,c);return k.set(c,K),K}let d=l.get(i);if(!d){d=new WeakMap,l.set(i,d);let v=new WeakMap;d.set(a,v);let P=new WeakMap;v.set(o,P);let k=e(r,i,a,o,c);return P.set(c,k),k}let f=d.get(a);if(!f){f=new WeakMap,d.set(a,f);let v=new WeakMap;f.set(o,v);let P=e(r,i,a,o,c);return v.set(c,P),P}let y=f.get(o);if(!y){y=new WeakMap,f.set(o,y);let v=e(r,i,a,o,c);return y.set(c,v),v}let I=y.get(c);if(I===void 0){let v=e(r,i,a,o,c);return y.set(c,v),v}return I}}Or.memoize5=BZ;function UZ(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}}Or.memoize2of4=UZ;function kZ(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 f=e(r,i,a,o,c);return l.set(i,f),f}let d=l.get(i);if(d===void 0){let f=e(r,i,a,o,c);return l.set(i,f),f}return d}}Or.memoize2of5=kZ});var Op=w(fi=>{"use strict";m();T();N();Object.defineProperty(fi,"__esModule",{value:!0});fi.getRootTypeMap=fi.getRootTypes=fi.getRootTypeNames=fi.getDefinedRootType=void 0;var MZ=YN(),xv=vl();function xZ(e,t,n){let i=(0,fi.getRootTypeMap)(e).get(t);if(i==null)throw(0,MZ.createGraphQLError)(`Schema is not configured to execute ${t} operation.`,{nodes:n});return i}fi.getDefinedRootType=xZ;fi.getRootTypeNames=(0,xv.memoize1)(function(t){let n=(0,fi.getRootTypes)(t);return new Set([...n].map(r=>r.name))});fi.getRootTypes=(0,xv.memoize1)(function(t){let n=(0,fi.getRootTypeMap)(t);return new Set(n.values())});fi.getRootTypeMap=(0,xv.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 Gv=w(ht=>{"use strict";m();T();N();Object.defineProperty(ht,"__esModule",{value:!0});ht.makeDirectiveNodes=ht.makeDirectiveNode=ht.makeDeprecatedDirective=ht.astFromEnumValue=ht.astFromInputField=ht.astFromField=ht.astFromScalarType=ht.astFromEnumType=ht.astFromInputObjectType=ht.astFromUnionType=ht.astFromInterfaceType=ht.astFromObjectType=ht.astFromArg=ht.getDeprecatableDirectiveNodes=ht.getDirectiveNodes=ht.astFromDirective=ht.astFromSchema=ht.printSchemaWithDirectives=ht.getDocumentNodeFromSchema=void 0;var ut=Ae(),sc=kv(),qv=bB(),qZ=tT(),Mi=AB(),Vv=wv(),VZ=gp(),jZ=Op();function RB(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=FB(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let c of o)(0,ut.isSpecifiedDirective)(c)||a.push(PB(c,e,n));for(let c in r){let l=r[c],d=(0,ut.isSpecifiedScalarType)(l),f=(0,ut.isIntrospectionType)(l);if(!(d||f))if((0,ut.isObjectType)(l))a.push(wB(l,e,n));else if((0,ut.isInterfaceType)(l))a.push(LB(l,e,n));else if((0,ut.isUnionType)(l))a.push(CB(l,e,n));else if((0,ut.isInputObjectType)(l))a.push(BB(l,e,n));else if((0,ut.isEnumType)(l))a.push(UB(l,e,n));else if((0,ut.isScalarType)(l))a.push(kB(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:ut.Kind.DOCUMENT,definitions:a}}ht.getDocumentNodeFromSchema=RB;function KZ(e,t={}){let n=RB(e,t);return(0,ut.print)(n)}ht.printSchemaWithDirectives=KZ;function FB(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 f of d.operationTypes)n.set(f.operation,f);let i=(0,jZ.getRootTypeMap)(e);for(let[d,f]of n){let y=i.get(d);if(y!=null){let I=(0,sc.astFromType)(y);f!=null?f.type=I:n.set(d,{kind:ut.Kind.OPERATION_TYPE_DEFINITION,operation:d,type:I})}}let a=[...n.values()].filter(VZ.isSome),o=oc(e,e,t);if(!a.length&&!o.length)return null;let c={kind:a!=null?ut.Kind.SCHEMA_DEFINITION:ut.Kind.SCHEMA_EXTENSION,operationTypes:a,directives:o},l=(0,Mi.getDescriptionNode)(e);return l&&(c.description=l),c}ht.astFromSchema=FB;function PB(e,t,n){var r,i;return{kind:ut.Kind.DIRECTIVE_DEFINITION,description:(0,Mi.getDescriptionNode)(e),name:{kind:ut.Kind.NAME,value:e.name},arguments:(r=e.args)==null?void 0:r.map(a=>jv(a,t,n)),repeatable:e.isRepeatable,locations:((i=e.locations)==null?void 0:i.map(a=>({kind:ut.Kind.NAME,value:a})))||[]}}ht.astFromDirective=PB;function oc(e,t,n){let r=(0,Vv.getDirectivesInExtensions)(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=iT(t,r);else{a=[];for(let o of i)o.directives&&a.push(...o.directives)}return a}ht.getDirectiveNodes=oc;function bp(e,t,n){var c,l;let r=[],i=null,a=(0,Vv.getDirectivesInExtensions)(e,n),o;return a!=null?o=iT(t,a):o=(c=e.astNode)==null?void 0:c.directives,o!=null&&(r=o.filter(d=>d.name.value!=="deprecated"),e.deprecationReason!=null&&(i=(l=o.filter(d=>d.name.value==="deprecated"))==null?void 0:l[0])),e.deprecationReason!=null&&i==null&&(i=qB(e.deprecationReason)),i==null?r:[i].concat(r)}ht.getDeprecatableDirectiveNodes=bp;function jv(e,t,n){var r;return{kind:ut.Kind.INPUT_VALUE_DEFINITION,description:(0,Mi.getDescriptionNode)(e),name:{kind:ut.Kind.NAME,value:e.name},type:(0,sc.astFromType)(e.type),defaultValue:e.defaultValue!==void 0&&(r=(0,qv.astFromValue)(e.defaultValue,e.type))!=null?r:void 0,directives:bp(e,t,n)}}ht.astFromArg=jv;function wB(e,t,n){return{kind:ut.Kind.OBJECT_TYPE_DEFINITION,description:(0,Mi.getDescriptionNode)(e),name:{kind:ut.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>Kv(r,t,n)),interfaces:Object.values(e.getInterfaces()).map(r=>(0,sc.astFromType)(r)),directives:oc(e,t,n)}}ht.astFromObjectType=wB;function LB(e,t,n){let r={kind:ut.Kind.INTERFACE_TYPE_DEFINITION,description:(0,Mi.getDescriptionNode)(e),name:{kind:ut.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(i=>Kv(i,t,n)),directives:oc(e,t,n)};return"getInterfaces"in e&&(r.interfaces=Object.values(e.getInterfaces()).map(i=>(0,sc.astFromType)(i))),r}ht.astFromInterfaceType=LB;function CB(e,t,n){return{kind:ut.Kind.UNION_TYPE_DEFINITION,description:(0,Mi.getDescriptionNode)(e),name:{kind:ut.Kind.NAME,value:e.name},directives:oc(e,t,n),types:e.getTypes().map(r=>(0,sc.astFromType)(r))}}ht.astFromUnionType=CB;function BB(e,t,n){return{kind:ut.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:(0,Mi.getDescriptionNode)(e),name:{kind:ut.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>MB(r,t,n)),directives:oc(e,t,n)}}ht.astFromInputObjectType=BB;function UB(e,t,n){return{kind:ut.Kind.ENUM_TYPE_DEFINITION,description:(0,Mi.getDescriptionNode)(e),name:{kind:ut.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(r=>xB(r,t,n)),directives:oc(e,t,n)}}ht.astFromEnumType=UB;function kB(e,t,n){var o;let r=(0,Vv.getDirectivesInExtensions)(e,n),i=r?iT(t,r):((o=e.astNode)==null?void 0:o.directives)||[],a=e.specifiedByUrl||e.specifiedByURL;if(a&&!i.some(c=>c.name.value==="specifiedBy")){let c={url:a};i.push(Dp("specifiedBy",c))}return{kind:ut.Kind.SCALAR_TYPE_DEFINITION,description:(0,Mi.getDescriptionNode)(e),name:{kind:ut.Kind.NAME,value:e.name},directives:i}}ht.astFromScalarType=kB;function Kv(e,t,n){return{kind:ut.Kind.FIELD_DEFINITION,description:(0,Mi.getDescriptionNode)(e),name:{kind:ut.Kind.NAME,value:e.name},arguments:e.args.map(r=>jv(r,t,n)),type:(0,sc.astFromType)(e.type),directives:bp(e,t,n)}}ht.astFromField=Kv;function MB(e,t,n){var r;return{kind:ut.Kind.INPUT_VALUE_DEFINITION,description:(0,Mi.getDescriptionNode)(e),name:{kind:ut.Kind.NAME,value:e.name},type:(0,sc.astFromType)(e.type),directives:bp(e,t,n),defaultValue:(r=(0,qv.astFromValue)(e.defaultValue,e.type))!=null?r:void 0}}ht.astFromInputField=MB;function xB(e,t,n){return{kind:ut.Kind.ENUM_VALUE_DEFINITION,description:(0,Mi.getDescriptionNode)(e),name:{kind:ut.Kind.NAME,value:e.name},directives:bp(e,t,n)}}ht.astFromEnumValue=xB;function qB(e){return Dp("deprecated",{reason:e},ut.GraphQLDeprecatedDirective)}ht.makeDeprecatedDirective=qB;function Dp(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,qv.astFromValue)(o,i.type);c&&r.push({kind:ut.Kind.ARGUMENT,name:{kind:ut.Kind.NAME,value:a},value:c})}}else for(let i in t){let a=t[i],o=(0,qZ.astFromValueUntyped)(a);o&&r.push({kind:ut.Kind.ARGUMENT,name:{kind:ut.Kind.NAME,value:i},value:o})}return{kind:ut.Kind.DIRECTIVE,name:{kind:ut.Kind.NAME,value:e},arguments:r}}ht.makeDirectiveNode=Dp;function iT(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(Dp(r,o,a));else n.push(Dp(r,i,a))}return n}ht.makeDirectiveNodes=iT});var jB=w(Sl=>{"use strict";m();T();N();Object.defineProperty(Sl,"__esModule",{value:!0});Sl.createDefaultRules=Sl.validateGraphQlDocuments=void 0;var Ap=Ae();function GZ(e,t,n=VB()){var c;let r=new Set,i=new Map;for(let l of t)for(let d of l.definitions)d.kind===Ap.Kind.FRAGMENT_DEFINITION?i.set(d.name.value,d):r.add(d);let a={kind:Ap.Kind.DOCUMENT,definitions:Array.from([...r,...i.values()])},o=(0,Ap.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}Sl.validateGraphQlDocuments=GZ;function VB(){let e=["NoUnusedFragmentsRule","NoUnusedVariablesRule","KnownDirectivesRule"];return Ap.versionInfo.major<15&&(e=e.map(t=>t.replace(/Rule$/,""))),Ap.specifiedRules.filter(t=>!e.includes(t.name))}Sl.createDefaultRules=VB});var KB=w(aT=>{"use strict";m();T();N();Object.defineProperty(aT,"__esModule",{value:!0});aT.parseGraphQLJSON=void 0;var $Z=Ae();function QZ(e){return e=e.toString(),e.charCodeAt(0)===65279&&(e=e.slice(1)),e}function YZ(e){return JSON.parse(QZ(e))}function JZ(e,t,n){let r=YZ(t);if(r.data&&(r=r.data),r.kind==="Document")return{location:e,document:r};if(r.__schema){let i=(0,$Z.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")}aT.parseGraphQLJSON=JZ});var Qv=w(Cn=>{"use strict";m();T();N();Object.defineProperty(Cn,"__esModule",{value:!0});Cn.getBlockStringIndentation=Cn.dedentBlockStringValue=Cn.getLeadingCommentBlock=Cn.getComment=Cn.getDescription=Cn.printWithComments=Cn.printComment=Cn.pushComment=Cn.collectComment=Cn.resetComments=void 0;var YB=Ae(),HZ=80,Ol={};function zZ(){Ol={}}Cn.resetComments=zZ;function WZ(e){var n;let t=(n=e.name)==null?void 0:n.value;if(t!=null)switch(Rp(e,t),e.kind){case"EnumTypeDefinition":if(e.values)for(let r of e.values)Rp(r,t,r.name.value);break;case"ObjectTypeDefinition":case"InputObjectTypeDefinition":case"InterfaceTypeDefinition":if(e.fields){for(let r of e.fields)if(Rp(r,t,r.name.value),nee(r)&&r.arguments)for(let i of r.arguments)Rp(i,t,r.name.value,i.name.value)}break}}Cn.collectComment=WZ;function Rp(e,t,n,r){let i=$v(e);if(typeof i!="string"||i.length===0)return;let a=[t];n&&(a.push(n),r&&a.push(r));let o=a.join(".");Ol[o]||(Ol[o]=[]),Ol[o].push(i)}Cn.pushComment=Rp;function JB(e){return` +`))}return Q(x({},e),{value:t,block:!0})}function RC(e){return e.arguments?e.arguments.sort((n,r)=>n.name.value.localeCompare(r.name.value)):e.arguments}function UN(e){let t=e.selections;return Q(x({},e),{selections:t.sort((n,r)=>{var a,o,c,l;return Sn.NAME in n?Sn.NAME in r?n.name.value.localeCompare(r.name.value):-1:Sn.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 xt.Kind.FIELD:return Q(x({},n),{arguments:RC(n),selectionSet:n.selectionSet?UN(n.selectionSet):n.selectionSet});case xt.Kind.FRAGMENT_SPREAD:return n;case xt.Kind.INLINE_FRAGMENT:return Q(x({},n),{selectionSet:UN(n.selectionSet)})}})})}function F9(e){return Q(x({},e),{definitions:e.definitions.map(t=>t.kind!==xt.Kind.OPERATION_DEFINITION?t:Q(x({},t),{selectionSet:UN(t.selectionSet)}))})}function PC(e,t=!0){return(0,xt.parse)(e,{noLocation:t})}function w9(e,t=!0){try{return{documentNode:PC(e,t)}}catch(n){return{error:n}}}});var LC=w(yl=>{"use strict";m();T();N();Object.defineProperty(yl,"__esModule",{value:!0});yl.AccumulatorMap=void 0;yl.mapValue=hl;yl.extendSchemaImpl=L9;var Ue=Ae(),vs=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)}};yl.AccumulatorMap=vs;function hl(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}function L9(e,t,n){var De,ve,Ce,vt;let r=[],i=new vs,a=new vs,o=new vs,c=new vs,l=new vs,d=new vs,f=[],y,I=[],v=!1;for(let Y of t.definitions){switch(Y.kind){case Ue.Kind.SCHEMA_DEFINITION:y=Y;break;case Ue.Kind.SCHEMA_EXTENSION:I.push(Y);break;case Ue.Kind.DIRECTIVE_DEFINITION:f.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 F=new Map;for(let Y of e.types){let oe=ie(Y);oe&&F.set(Y.name,oe)}for(let Y of r){let oe=Y.name.value;F.set(oe,(De=FC.get(oe))!=null?De:ue(Y))}for(let[Y,oe]of a)F.set(Y,new Ue.GraphQLObjectType({name:Y,interfaces:()=>zt(oe),fields:()=>mn(oe),extensionASTNodes:oe}));if(n!=null&&n.addInvalidExtensionOrphans){for(let[Y,oe]of o)F.set(Y,new Ue.GraphQLInterfaceType({name:Y,interfaces:()=>zt(oe),fields:()=>mn(oe),extensionASTNodes:oe}));for(let[Y,oe]of l)F.set(Y,new Ue.GraphQLEnumType({name:Y,values:kn(oe),extensionASTNodes:oe}));for(let[Y,oe]of c)F.set(Y,new Ue.GraphQLUnionType({name:Y,types:()=>An(oe),extensionASTNodes:oe}));for(let[Y,oe]of i)F.set(Y,new Ue.GraphQLScalarType({name:Y,extensionASTNodes:oe}));for(let[Y,oe]of d)F.set(Y,new Ue.GraphQLInputObjectType({name:Y,fields:()=>Fr(oe),extensionASTNodes:oe}))}let k=x(x({query:e.query&&J(e.query),mutation:e.mutation&&J(e.mutation),subscription:e.subscription&&J(e.subscription)},y&&en([y])),en(I));return Q(x({description:(Ce=(ve=y==null?void 0:y.description)==null?void 0:ve.value)!=null?Ce:e.description},k),{types:Array.from(F.values()),directives:[...e.directives.map(se),...f.map(Qt)],extensions:e.extensions,astNode:y!=null?y:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(I),assumeValid:(vt=n==null?void 0:n.assumeValid)!=null?vt:!1});function K(Y){return(0,Ue.isListType)(Y)?new Ue.GraphQLList(K(Y.ofType)):(0,Ue.isNonNullType)(Y)?new Ue.GraphQLNonNull(K(Y.ofType)):J(Y)}function J(Y){return F.get(Y.name)}function se(Y){if((0,Ue.isSpecifiedDirective)(Y))return Y;let oe=Y.toConfig();return new Ue.GraphQLDirective(Q(x({},oe),{args:hl(oe.args,_t)}))}function ie(Y){if((0,Ue.isIntrospectionType)(Y)||(0,Ue.isSpecifiedScalarType)(Y))return Y;if((0,Ue.isScalarType)(Y))return Re(Y);if((0,Ue.isObjectType)(Y))return xe(Y);if((0,Ue.isInterfaceType)(Y))return tt(Y);if((0,Ue.isUnionType)(Y))return ee(Y);if((0,Ue.isEnumType)(Y))return de(Y);if((0,Ue.isInputObjectType)(Y))return Te(Y)}function Te(Y){var Ye;let oe=Y.toConfig(),qe=(Ye=d.get(oe.name))!=null?Ye:[];return new Ue.GraphQLInputObjectType(Q(x({},oe),{fields:()=>x(x({},hl(oe.fields,Ut=>Q(x({},Ut),{type:K(Ut.type)}))),Fr(qe)),extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function de(Y){var Ye;let oe=Y.toConfig(),qe=(Ye=l.get(Y.name))!=null?Ye:[];return new Ue.GraphQLEnumType(Q(x({},oe),{values:x(x({},oe.values),kn(qe)),extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function Re(Y){var Ut,nt;let oe=Y.toConfig(),qe=(Ut=i.get(oe.name))!=null?Ut:[],Ye=oe.specifiedByURL;for(let Rt of qe)Ye=(nt=wC(Rt))!=null?nt:Ye;return new Ue.GraphQLScalarType(Q(x({},oe),{specifiedByURL:Ye,extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function xe(Y){var Ye;let oe=Y.toConfig(),qe=(Ye=a.get(oe.name))!=null?Ye:[];return new Ue.GraphQLObjectType(Q(x({},oe),{interfaces:()=>[...Y.getInterfaces().map(J),...zt(qe)],fields:()=>x(x({},hl(oe.fields,Se)),mn(qe)),extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function tt(Y){var Ye;let oe=Y.toConfig(),qe=(Ye=o.get(oe.name))!=null?Ye:[];return new Ue.GraphQLInterfaceType(Q(x({},oe),{interfaces:()=>[...Y.getInterfaces().map(J),...zt(qe)],fields:()=>x(x({},hl(oe.fields,Se)),mn(qe)),extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function ee(Y){var Ye;let oe=Y.toConfig(),qe=(Ye=c.get(oe.name))!=null?Ye:[];return new Ue.GraphQLUnionType(Q(x({},oe),{types:()=>[...Y.getTypes().map(J),...An(qe)],extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function Se(Y){return Q(x({},Y),{type:K(Y.type),args:Y.args&&hl(Y.args,_t)})}function _t(Y){return Q(x({},Y),{type:K(Y.type)})}function en(Y){var qe;let oe={};for(let Ye of Y){let Ut=(qe=Ye.operationTypes)!=null?qe:[];for(let nt of Ut)oe[nt.operation]=tn(nt.type)}return oe}function tn(Y){var Ye;let oe=Y.name.value,qe=(Ye=FC.get(oe))!=null?Ye:F.get(oe);if(qe===void 0)throw new Error(`Unknown type: "${oe}".`);return qe}function bn(Y){return Y.kind===Ue.Kind.LIST_TYPE?new Ue.GraphQLList(bn(Y.type)):Y.kind===Ue.Kind.NON_NULL_TYPE?new Ue.GraphQLNonNull(bn(Y.type)):tn(Y)}function Qt(Y){var oe;return new Ue.GraphQLDirective({name:Y.name.value,description:(oe=Y.description)==null?void 0:oe.value,locations:Y.locations.map(({value:qe})=>qe),isRepeatable:Y.repeatable,args:Pr(Y.arguments),astNode:Y})}function mn(Y){var qe,Ye;let oe=Object.create(null);for(let Ut of Y){let nt=(qe=Ut.fields)!=null?qe:[];for(let Rt of nt)oe[Rt.name.value]={type:bn(Rt.type),description:(Ye=Rt.description)==null?void 0:Ye.value,args:Pr(Rt.arguments),deprecationReason:MN(Rt),astNode:Rt}}return oe}function Pr(Y){var Ye;let oe=Y!=null?Y:[],qe=Object.create(null);for(let Ut of oe){let nt=bn(Ut.type);qe[Ut.name.value]={type:nt,description:(Ye=Ut.description)==null?void 0:Ye.value,defaultValue:(0,Ue.valueFromAST)(Ut.defaultValue,nt),deprecationReason:MN(Ut),astNode:Ut}}return qe}function Fr(Y){var qe,Ye;let oe=Object.create(null);for(let Ut of Y){let nt=(qe=Ut.fields)!=null?qe:[];for(let Rt of nt){let ns=bn(Rt.type);oe[Rt.name.value]={type:ns,description:(Ye=Rt.description)==null?void 0:Ye.value,defaultValue:(0,Ue.valueFromAST)(Rt.defaultValue,ns),deprecationReason:MN(Rt),astNode:Rt}}}return oe}function kn(Y){var qe,Ye;let oe=Object.create(null);for(let Ut of Y){let nt=(qe=Ut.values)!=null?qe:[];for(let Rt of nt)oe[Rt.name.value]={description:(Ye=Rt.description)==null?void 0:Ye.value,deprecationReason:MN(Rt),astNode:Rt}}return oe}function zt(Y){return Y.flatMap(oe=>{var qe,Ye;return(Ye=(qe=oe.interfaces)==null?void 0:qe.map(tn))!=null?Ye:[]})}function An(Y){return Y.flatMap(oe=>{var qe,Ye;return(Ye=(qe=oe.types)==null?void 0:qe.map(tn))!=null?Ye:[]})}function ue(Y){var qe,Ye,Ut,nt,Rt,ns,Vr,rs,Mc,ga,mr,ni;let oe=Y.name.value;switch(Y.kind){case Ue.Kind.OBJECT_TYPE_DEFINITION:{let Vt=(qe=a.get(oe))!=null?qe:[],Nr=[Y,...Vt];return a.delete(oe),new Ue.GraphQLObjectType({name:oe,description:(Ye=Y.description)==null?void 0:Ye.value,interfaces:()=>zt(Nr),fields:()=>mn(Nr),astNode:Y,extensionASTNodes:Vt})}case Ue.Kind.INTERFACE_TYPE_DEFINITION:{let Vt=(Ut=o.get(oe))!=null?Ut:[],Nr=[Y,...Vt];return o.delete(oe),new Ue.GraphQLInterfaceType({name:oe,description:(nt=Y.description)==null?void 0:nt.value,interfaces:()=>zt(Nr),fields:()=>mn(Nr),astNode:Y,extensionASTNodes:Vt})}case Ue.Kind.ENUM_TYPE_DEFINITION:{let Vt=(Rt=l.get(oe))!=null?Rt:[],Nr=[Y,...Vt];return l.delete(oe),new Ue.GraphQLEnumType({name:oe,description:(ns=Y.description)==null?void 0:ns.value,values:kn(Nr),astNode:Y,extensionASTNodes:Vt})}case Ue.Kind.UNION_TYPE_DEFINITION:{let Vt=(Vr=c.get(oe))!=null?Vr:[],Nr=[Y,...Vt];return c.delete(oe),new Ue.GraphQLUnionType({name:oe,description:(rs=Y.description)==null?void 0:rs.value,types:()=>An(Nr),astNode:Y,extensionASTNodes:Vt})}case Ue.Kind.SCALAR_TYPE_DEFINITION:{let Vt=(Mc=i.get(oe))!=null?Mc:[];return i.delete(oe),new Ue.GraphQLScalarType({name:oe,description:(ga=Y.description)==null?void 0:ga.value,specifiedByURL:wC(Y),astNode:Y,extensionASTNodes:Vt})}case Ue.Kind.INPUT_OBJECT_TYPE_DEFINITION:{let Vt=(mr=d.get(oe))!=null?mr:[],Nr=[Y,...Vt];return d.delete(oe),new Ue.GraphQLInputObjectType({name:oe,description:(ni=Y.description)==null?void 0:ni.value,fields:()=>Fr(Nr),astNode:Y,extensionASTNodes:Vt})}}}}var FC=new Map([...Ue.specifiedScalarTypes,...Ue.introspectionTypes].map(e=>[e.name,e]));function MN(e){let t=(0,Ue.getDirectiveValues)(Ue.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function wC(e){let t=(0,Ue.getDirectiveValues)(Ue.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}});var Dv=w(Ov=>{"use strict";m();T();N();Object.defineProperty(Ov,"__esModule",{value:!0});Ov.buildASTSchema=U9;var CC=Ae(),C9=Nl(),B9=LC();function U9(e,t){(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,B9.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,...CC.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new CC.GraphQLSchema(Q(x({},r),{directives:i}))}});var Il=w(lu=>{"use strict";m();T();N();Object.defineProperty(lu,"__esModule",{value:!0});lu.MAX_INT32=lu.MAX_SUBSCRIPTION_FILTER_DEPTH=lu.MAXIMUM_TYPE_NESTING=void 0;lu.MAXIMUM_TYPE_NESTING=30;lu.MAX_SUBSCRIPTION_FILTER_DEPTH=5;lu.MAX_INT32=un(2,31)-1});var Sr=w(lr=>{"use strict";m();T();N();Object.defineProperty(lr,"__esModule",{value:!0});lr.getOrThrowError=M9;lr.getEntriesNotInHashSet=x9;lr.numberToOrdinal=q9;lr.addIterableValuesToSet=V9;lr.addSets=j9;lr.kindToNodeType=K9;lr.getValueOrDefault=G9;lr.add=$9;lr.generateSimpleDirective=Q9;lr.generateRequiresScopesDirective=Y9;lr.generateSemanticNonNullDirective=J9;lr.copyObjectValueMap=H9;lr.addNewObjectValueMapEntries=z9;lr.copyArrayValueMap=W9;lr.addMapEntries=X9;lr.getFirstEntry=Z9;var Kt=Ae(),cr=vr(),k9=Mi(),vp=Hr();function M9(e,t,n){let r=e.get(t);if(r===void 0)throw(0,k9.invalidKeyFatalError)(t,n);return r}function x9(e,t){let n=[];for(let r of e)t.has(r)||n.push(r);return n}function q9(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 V9(e,t){for(let n of e)t.add(n)}function j9(e,t){let n=new Set(e);for(let r of t)n.add(r);return n}function K9(e){switch(e){case Kt.Kind.BOOLEAN:return cr.BOOLEAN_SCALAR;case Kt.Kind.ENUM:case Kt.Kind.ENUM_TYPE_DEFINITION:return cr.ENUM;case Kt.Kind.ENUM_TYPE_EXTENSION:return"Enum extension";case Kt.Kind.ENUM_VALUE_DEFINITION:return cr.ENUM_VALUE;case Kt.Kind.FIELD_DEFINITION:return cr.FIELD;case Kt.Kind.FLOAT:return cr.FLOAT_SCALAR;case Kt.Kind.INPUT_OBJECT_TYPE_DEFINITION:return cr.INPUT_OBJECT;case Kt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"Input Object extension";case Kt.Kind.INPUT_VALUE_DEFINITION:return cr.INPUT_VALUE;case Kt.Kind.INT:return cr.INT_SCALAR;case Kt.Kind.INTERFACE_TYPE_DEFINITION:return cr.INTERFACE;case Kt.Kind.INTERFACE_TYPE_EXTENSION:return"Interface extension";case Kt.Kind.NULL:return cr.NULL;case Kt.Kind.OBJECT:case Kt.Kind.OBJECT_TYPE_DEFINITION:return cr.OBJECT;case Kt.Kind.OBJECT_TYPE_EXTENSION:return"Object extension";case Kt.Kind.STRING:return cr.STRING_SCALAR;case Kt.Kind.SCALAR_TYPE_DEFINITION:return cr.SCALAR;case Kt.Kind.SCALAR_TYPE_EXTENSION:return"Scalar extension";case Kt.Kind.UNION_TYPE_DEFINITION:return cr.UNION;case Kt.Kind.UNION_TYPE_EXTENSION:return"Union extension";default:return e}}function G9(e,t,n){let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i}function $9(e,t){return e.has(t)?!1:(e.add(t),!0)}function Q9(e){return{kind:Kt.Kind.DIRECTIVE,name:(0,vp.stringToNameNode)(e)}}function Y9(e){let t=[];for(let n of e){let r=[];for(let i of n)r.push({kind:Kt.Kind.STRING,value:i});t.push({kind:Kt.Kind.LIST,values:r})}return{kind:Kt.Kind.DIRECTIVE,name:(0,vp.stringToNameNode)(cr.REQUIRES_SCOPES),arguments:[{kind:Kt.Kind.ARGUMENT,name:(0,vp.stringToNameNode)(cr.SCOPES),value:{kind:Kt.Kind.LIST,values:t}}]}}function J9(e){let t=Array.from(e).sort((r,i)=>r-i),n=new Array;for(let r of t)n.push({kind:Kt.Kind.INT,value:r.toString()});return{kind:Kt.Kind.DIRECTIVE,name:(0,vp.stringToNameNode)(cr.SEMANTIC_NON_NULL),arguments:[{kind:Kt.Kind.ARGUMENT,name:(0,vp.stringToNameNode)(cr.LEVELS),value:{kind:Kt.Kind.LIST,values:n}}]}}function H9(e){let t=new Map;for(let[n,r]of e)t.set(n,x({},r));return t}function z9(e,t){for(let[n,r]of e)t.set(n,x({},r))}function W9(e){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function X9(e,t){for(let[n,r]of e)t.set(n,r)}function Z9(e){let{value:t,done:n}=e.values().next();if(!n)return t}});var Sp=w(xN=>{"use strict";m();T();N();Object.defineProperty(xN,"__esModule",{value:!0});xN.ExtensionType=void 0;var BC;(function(e){e[e.EXTENDS=0]="EXTENDS",e[e.NONE=1]="NONE",e[e.REAL=2]="REAL"})(BC||(xN.ExtensionType=BC={}))});var du=w(Dr=>{"use strict";m();T();N();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.getMutableDirectiveDefinitionNode=t7;Dr.getMutableEnumNode=n7;Dr.getMutableEnumValueNode=r7;Dr.getMutableFieldNode=i7;Dr.getMutableInputObjectNode=a7;Dr.getMutableInputValueNode=s7;Dr.getMutableInterfaceNode=o7;Dr.getMutableObjectNode=u7;Dr.getMutableObjectExtensionNode=c7;Dr.getMutableScalarNode=l7;Dr.getMutableTypeNode=bv;Dr.getMutableUnionNode=d7;Dr.getTypeNodeNamedTypeName=Av;Dr.getNamedTypeNode=kC;var Or=Ae(),gl=Hr(),UC=Mi(),e7=Il();function t7(e){return{arguments:[],kind:e.kind,locations:[],name:x({},e.name),repeatable:e.repeatable,description:(0,gl.formatDescription)(e.description)}}function n7(e){return{kind:Or.Kind.ENUM_TYPE_DEFINITION,name:x({},e)}}function r7(e){return{directives:[],kind:e.kind,name:x({},e.name),description:(0,gl.formatDescription)(e.description)}}function i7(e,t,n){return{arguments:[],directives:[],kind:e.kind,name:x({},e.name),type:bv(e.type,t,n),description:(0,gl.formatDescription)(e.description)}}function a7(e){return{kind:Or.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:x({},e)}}function s7(e,t,n){return{directives:[],kind:e.kind,name:x({},e.name),type:bv(e.type,t,n),defaultValue:e.defaultValue,description:(0,gl.formatDescription)(e.description)}}function o7(e){return{kind:Or.Kind.INTERFACE_TYPE_DEFINITION,name:x({},e)}}function u7(e){return{kind:Or.Kind.OBJECT_TYPE_DEFINITION,name:x({},e)}}function c7(e){let t=e.kind===Or.Kind.OBJECT_TYPE_DEFINITION?e.description:void 0;return{kind:Or.Kind.OBJECT_TYPE_EXTENSION,name:x({},e.name),description:(0,gl.formatDescription)(t)}}function l7(e){return{kind:Or.Kind.SCALAR_TYPE_DEFINITION,name:x({},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(qN,"__esModule",{value:!0});qN.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=void 0;qN.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=30});var Ss=w(X=>{"use strict";m();T();N();Object.defineProperty(X,"__esModule",{value:!0});X.MAX_OR_SCOPES=X.EDFS_ARGS_REGEXP=X.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION=X.CONFIGURE_DESCRIPTION_DEFINITION=X.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION=X.SCOPE_SCALAR_DEFINITION=X.FIELD_SET_SCALAR_DEFINITION=X.VERSION_TWO_DIRECTIVE_DEFINITIONS=X.EVENT_DRIVEN_DIRECTIVE_DEFINITIONS_BY_DIRECTIVE_NAME=X.BASE_DIRECTIVE_DEFINITIONS=X.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=X.SUBSCRIPTION_FIELD_CONDITION_DEFINITION=X.SUBSCRIPTION_FILTER_VALUE_DEFINITION=X.SUBSCRIPTION_FILTER_CONDITION_DEFINITION=X.SUBSCRIPTION_FILTER_DEFINITION=X.SHAREABLE_DEFINITION=X.SEMANTIC_NON_NULL_DEFINITION=X.REQUIRES_SCOPES_DEFINITION=X.REQUIRE_FETCH_REASONS_DEFINITION=X.OVERRIDE_DEFINITION=X.ONE_OF_DEFINITION=X.LINK_DEFINITION=X.LINK_PURPOSE_DEFINITION=X.LINK_IMPORT_DEFINITION=X.INTERFACE_OBJECT_DEFINITION=X.INACCESSIBLE_DEFINITION=X.COMPOSE_DIRECTIVE_DEFINITION=X.AUTHENTICATED_DEFINITION=X.ALL_IN_BUILT_DIRECTIVE_NAMES=X.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=X.EDFS_REDIS_SUBSCRIBE_DEFINITION=X.EDFS_REDIS_PUBLISH_DEFINITION=X.TAG_DEFINITION=X.SPECIFIED_BY_DEFINITION=X.REQUIRES_DEFINITION=X.PROVIDES_DEFINITION=X.KEY_DEFINITION=X.REQUIRED_FIELDSET_TYPE_NODE=X.EDFS_NATS_SUBSCRIBE_DEFINITION=X.EDFS_NATS_REQUEST_DEFINITION=X.EDFS_NATS_PUBLISH_DEFINITION=X.EDFS_KAFKA_SUBSCRIBE_DEFINITION=X.EDFS_KAFKA_PUBLISH_DEFINITION=X.EXTERNAL_DEFINITION=X.EXTENDS_DEFINITION=X.DEPRECATED_DEFINITION=X.BASE_SCALARS=X.REQUIRED_STRING_TYPE_NODE=void 0;var ae=Ae(),re=Hr(),p7=Rv(),U=vr();X.REQUIRED_STRING_TYPE_NODE={kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)};X.BASE_SCALARS=new Set(["_Any","_Entities",U.BOOLEAN_SCALAR,U.FLOAT_SCALAR,U.ID_SCALAR,U.INT_SCALAR,U.FIELD_SET_SCALAR,U.SCOPE_SCALAR,U.STRING_SCALAR]);X.DEPRECATED_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.REASON),type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR),defaultValue:{kind:ae.Kind.STRING,value:ae.DEFAULT_DEPRECATION_REASON}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ARGUMENT_DEFINITION_UPPER,U.ENUM_VALUE_UPPER,U.FIELD_DEFINITION_UPPER,U.INPUT_FIELD_DEFINITION_UPPER]),name:(0,re.stringToNameNode)(U.DEPRECATED),repeatable:!1};X.EXTENDS_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.INTERFACE_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.EXTENDS),repeatable:!1};X.EXTERNAL_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.EXTERNAL),repeatable:!1};X.EDFS_KAFKA_PUBLISH_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.TOPIC),type:X.REQUIRED_STRING_TYPE_NODE},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_KAFKA_PUBLISH),repeatable:!1};X.EDFS_KAFKA_SUBSCRIBE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.TOPICS),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:X.REQUIRED_STRING_TYPE_NODE}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_KAFKA_SUBSCRIBE),repeatable:!1};X.EDFS_NATS_PUBLISH_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBJECT),type:X.REQUIRED_STRING_TYPE_NODE},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)},defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_NATS_PUBLISH),repeatable:!1};X.EDFS_NATS_REQUEST_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBJECT),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)},defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_NATS_REQUEST),repeatable:!1};X.EDFS_NATS_SUBSCRIBE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBJECTS),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:X.REQUIRED_STRING_TYPE_NODE}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.STREAM_CONFIGURATION),type:(0,re.stringToNamedTypeNode)(U.EDFS_NATS_STREAM_CONFIGURATION)}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_NATS_SUBSCRIBE),repeatable:!1};X.REQUIRED_FIELDSET_TYPE_NODE={kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.FIELD_SET_SCALAR)};X.KEY_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELDS),type:X.REQUIRED_FIELDSET_TYPE_NODE},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.RESOLVABLE),type:(0,re.stringToNamedTypeNode)(U.BOOLEAN_SCALAR),defaultValue:{kind:ae.Kind.BOOLEAN,value:!0}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.INTERFACE_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.KEY),repeatable:!0};X.PROVIDES_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELDS),type:X.REQUIRED_FIELDSET_TYPE_NODE}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.PROVIDES),repeatable:!1};X.REQUIRES_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELDS),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.FIELD_SET_SCALAR)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.REQUIRES),repeatable:!1};X.SPECIFIED_BY_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.URL_LOWER),type:X.REQUIRED_STRING_TYPE_NODE}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.SCALAR_UPPER]),name:(0,re.stringToNameNode)(U.SPECIFIED_BY),repeatable:!1};X.TAG_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.NAME),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ARGUMENT_DEFINITION_UPPER,U.ENUM_UPPER,U.ENUM_VALUE_UPPER,U.FIELD_DEFINITION_UPPER,U.INPUT_FIELD_DEFINITION_UPPER,U.INPUT_OBJECT_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER,U.UNION_UPPER]),name:(0,re.stringToNameNode)(U.TAG),repeatable:!0};X.EDFS_REDIS_PUBLISH_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CHANNEL),type:X.REQUIRED_STRING_TYPE_NODE},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_REDIS_PUBLISH),repeatable:!1};X.EDFS_REDIS_SUBSCRIBE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CHANNELS),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:X.REQUIRED_STRING_TYPE_NODE}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_REDIS_SUBSCRIBE),repeatable:!1};X.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=new Map([[U.DEPRECATED,X.DEPRECATED_DEFINITION],[U.EXTENDS,X.EXTENDS_DEFINITION],[U.EXTERNAL,X.EXTERNAL_DEFINITION],[U.EDFS_KAFKA_PUBLISH,X.EDFS_KAFKA_PUBLISH_DEFINITION],[U.EDFS_KAFKA_SUBSCRIBE,X.EDFS_KAFKA_SUBSCRIBE_DEFINITION],[U.EDFS_NATS_PUBLISH,X.EDFS_NATS_PUBLISH_DEFINITION],[U.EDFS_NATS_REQUEST,X.EDFS_NATS_REQUEST_DEFINITION],[U.EDFS_NATS_SUBSCRIBE,X.EDFS_NATS_SUBSCRIBE_DEFINITION],[U.EDFS_REDIS_PUBLISH,X.EDFS_REDIS_PUBLISH_DEFINITION],[U.EDFS_REDIS_SUBSCRIBE,X.EDFS_REDIS_SUBSCRIBE_DEFINITION],[U.KEY,X.KEY_DEFINITION],[U.PROVIDES,X.PROVIDES_DEFINITION],[U.REQUIRES,X.REQUIRES_DEFINITION],[U.SPECIFIED_BY,X.SPECIFIED_BY_DEFINITION],[U.TAG,X.TAG_DEFINITION]]);X.ALL_IN_BUILT_DIRECTIVE_NAMES=new Set([U.AUTHENTICATED,U.COMPOSE_DIRECTIVE,U.CONFIGURE_DESCRIPTION,U.CONFIGURE_CHILD_DESCRIPTIONS,U.DEPRECATED,U.EDFS_NATS_PUBLISH,U.EDFS_NATS_REQUEST,U.EDFS_NATS_SUBSCRIBE,U.EDFS_KAFKA_PUBLISH,U.EDFS_KAFKA_SUBSCRIBE,U.EDFS_REDIS_PUBLISH,U.EDFS_REDIS_SUBSCRIBE,U.EXTENDS,U.EXTERNAL,U.INACCESSIBLE,U.INTERFACE_OBJECT,U.KEY,U.LINK,U.ONE_OF,U.OVERRIDE,U.PROVIDES,U.REQUIRE_FETCH_REASONS,U.REQUIRES,U.REQUIRES_SCOPES,U.SEMANTIC_NON_NULL,U.SHAREABLE,U.SPECIFIED_BY,U.SUBSCRIPTION_FILTER,U.TAG]);X.AUTHENTICATED_DEFINITION={arguments:[],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ENUM_UPPER,U.FIELD_DEFINITION_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER]),name:(0,re.stringToNameNode)(U.AUTHENTICATED),repeatable:!1};X.COMPOSE_DIRECTIVE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.NAME),type:X.REQUIRED_STRING_TYPE_NODE}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.SCHEMA_UPPER]),name:(0,re.stringToNameNode)(U.COMPOSE_DIRECTIVE),repeatable:!0};X.INACCESSIBLE_DEFINITION={arguments:[],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ARGUMENT_DEFINITION_UPPER,U.ENUM_UPPER,U.ENUM_VALUE_UPPER,U.FIELD_DEFINITION_UPPER,U.INPUT_FIELD_DEFINITION_UPPER,U.INPUT_OBJECT_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER,U.UNION_UPPER]),name:(0,re.stringToNameNode)(U.INACCESSIBLE),repeatable:!1};X.INTERFACE_OBJECT_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.INTERFACE_OBJECT),repeatable:!1};X.LINK_IMPORT_DEFINITION={kind:ae.Kind.SCALAR_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.LINK_IMPORT)};X.LINK_PURPOSE_DEFINITION={kind:ae.Kind.ENUM_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.LINK_PURPOSE),values:[{directives:[],kind:ae.Kind.ENUM_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.EXECUTION)},{directives:[],kind:ae.Kind.ENUM_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SECURITY)}]};X.LINK_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.URL_LOWER),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.AS),type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FOR),type:(0,re.stringToNamedTypeNode)(U.LINK_PURPOSE)},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.IMPORT),type:{kind:ae.Kind.LIST_TYPE,type:(0,re.stringToNamedTypeNode)(U.LINK_IMPORT)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.SCHEMA_UPPER]),name:(0,re.stringToNameNode)(U.LINK),repeatable:!0};X.ONE_OF_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.INPUT_OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.ONE_OF),repeatable:!1};X.OVERRIDE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FROM),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER]),name:(0,re.stringToNameNode)(U.OVERRIDE),repeatable:!1};X.REQUIRE_FETCH_REASONS_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.REQUIRE_FETCH_REASONS),repeatable:!0};X.REQUIRES_SCOPES_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SCOPES),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.SCOPE_SCALAR)}}}}}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ENUM_UPPER,U.FIELD_DEFINITION_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER]),name:(0,re.stringToNameNode)(U.REQUIRES_SCOPES),repeatable:!1};X.SEMANTIC_NON_NULL_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.LEVELS),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.INT_SCALAR)}}},defaultValue:{kind:ae.Kind.LIST,values:[{kind:ae.Kind.INT,value:"0"}]}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.SEMANTIC_NON_NULL),repeatable:!1};X.SHAREABLE_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.SHAREABLE),repeatable:!0};X.SUBSCRIPTION_FILTER_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CONDITION),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_CONDITION)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER]),name:(0,re.stringToNameNode)(U.SUBSCRIPTION_FILTER),repeatable:!1};X.SUBSCRIPTION_FILTER_CONDITION_DEFINITION={fields:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.AND_UPPER),type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.IN_UPPER),type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FIELD_CONDITION)},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.OR_UPPER),type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.NOT_UPPER),type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_CONDITION)}],kind:ae.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBSCRIPTION_FILTER_CONDITION)};X.SUBSCRIPTION_FILTER_VALUE_DEFINITION={kind:ae.Kind.SCALAR_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBSCRIPTION_FILTER_VALUE)};X.SUBSCRIPTION_FIELD_CONDITION_DEFINITION={fields:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELD_PATH),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.VALUES),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_VALUE)}}}],kind:ae.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBSCRIPTION_FIELD_CONDITION)};X.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=new Map([[U.AUTHENTICATED,X.AUTHENTICATED_DEFINITION],[U.COMPOSE_DIRECTIVE,X.COMPOSE_DIRECTIVE_DEFINITION],[U.INACCESSIBLE,X.INACCESSIBLE_DEFINITION],[U.INTERFACE_OBJECT,X.INTERFACE_OBJECT_DEFINITION],[U.LINK,X.LINK_DEFINITION],[U.OVERRIDE,X.OVERRIDE_DEFINITION],[U.REQUIRES_SCOPES,X.REQUIRES_SCOPES_DEFINITION],[U.SHAREABLE,X.SHAREABLE_DEFINITION]]);X.BASE_DIRECTIVE_DEFINITIONS=[X.DEPRECATED_DEFINITION,X.EXTENDS_DEFINITION,X.EXTERNAL_DEFINITION,X.KEY_DEFINITION,X.PROVIDES_DEFINITION,X.REQUIRES_DEFINITION,X.SPECIFIED_BY_DEFINITION,X.TAG_DEFINITION];X.EVENT_DRIVEN_DIRECTIVE_DEFINITIONS_BY_DIRECTIVE_NAME=new Map([[U.EDFS_KAFKA_PUBLISH,X.EDFS_KAFKA_PUBLISH_DEFINITION],[U.EDFS_KAFKA_SUBSCRIBE,X.EDFS_KAFKA_SUBSCRIBE_DEFINITION],[U.EDFS_NATS_PUBLISH,X.EDFS_NATS_PUBLISH_DEFINITION],[U.EDFS_NATS_REQUEST,X.EDFS_NATS_REQUEST_DEFINITION],[U.EDFS_NATS_SUBSCRIBE,X.EDFS_NATS_SUBSCRIBE_DEFINITION],[U.EDFS_REDIS_PUBLISH,X.EDFS_REDIS_PUBLISH_DEFINITION],[U.EDFS_REDIS_SUBSCRIBE,X.EDFS_REDIS_SUBSCRIBE_DEFINITION]]);X.VERSION_TWO_DIRECTIVE_DEFINITIONS=[X.AUTHENTICATED_DEFINITION,X.COMPOSE_DIRECTIVE_DEFINITION,X.INACCESSIBLE_DEFINITION,X.INTERFACE_OBJECT_DEFINITION,X.OVERRIDE_DEFINITION,X.REQUIRES_SCOPES_DEFINITION,X.SHAREABLE_DEFINITION];X.FIELD_SET_SCALAR_DEFINITION={kind:ae.Kind.SCALAR_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELD_SET_SCALAR)};X.SCOPE_SCALAR_DEFINITION={kind:ae.Kind.SCALAR_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.SCOPE_SCALAR)};X.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION={kind:ae.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.EDFS_NATS_STREAM_CONFIGURATION),fields:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CONSUMER_NAME),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.STREAM_NAME),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CONSUMER_INACTIVE_THRESHOLD),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.INT_SCALAR)},defaultValue:{kind:ae.Kind.INT,value:p7.DEFAULT_CONSUMER_INACTIVE_THRESHOLD.toString()}}]};X.CONFIGURE_DESCRIPTION_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROPAGATE),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.BOOLEAN_SCALAR)},defaultValue:{kind:ae.Kind.BOOLEAN,value:!0}},{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.DESCRIPTION_OVERRIDE),type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ARGUMENT_DEFINITION_UPPER,U.ENUM_UPPER,U.ENUM_VALUE_UPPER,U.FIELD_DEFINITION_UPPER,U.INTERFACE_UPPER,U.INPUT_OBJECT_UPPER,U.INPUT_FIELD_DEFINITION_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER,U.SCHEMA_UPPER,U.UNION_UPPER]),name:(0,re.stringToNameNode)(U.CONFIGURE_DESCRIPTION),repeatable:!1};X.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROPAGATE),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.BOOLEAN_SCALAR)},defaultValue:{kind:ae.Kind.BOOLEAN,value:!0}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ENUM_UPPER,U.INPUT_OBJECT_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.CONFIGURE_CHILD_DESCRIPTIONS),repeatable:!1};X.EDFS_ARGS_REGEXP=/{{\s*args\.([a-zA-Z0-9_]+)\s*}}/g;X.MAX_OR_SCOPES=16});var VN=w(sc=>{"use strict";m();T();N();Object.defineProperty(sc,"__esModule",{value:!0});sc.newParentTagData=T7;sc.newChildTagData=E7;sc.validateImplicitFieldSets=h7;sc.newContractTagOptionsFromArrays=y7;sc.getDescriptionFromString=I7;var zr=Ae(),f7=du(),m7=Ss(),N7=Hr(),MC=Sr();function T7(e){return{childTagDataByChildName:new Map,tagNames:new Set,typeName:e}}function E7(e){return{name:e,tagNames:new Set,tagNamesByArgumentName:new Map}}function h7({conditionalFieldDataByCoords:e,currentSubgraphName:t,entityData:n,implicitKeys:r,objectData:i,parentDefinitionDataByTypeName:a,graphNode:o}){let c=(0,MC.getValueOrDefault)(n.keyFieldSetDatasBySubgraphName,t,()=>new Map);for(let[l,d]of n.documentNodeByKeyFieldSet){if(c.has(l))continue;let f=[i],y=[],I=[],v=-1,F=!0,k=!0;(0,zr.visit)(d,{Argument:{enter(){return k=!1,zr.BREAK}},Field:{enter(K){let J=f[v];if(F)return k=!1,zr.BREAK;let se=K.name.value,ie=J.fieldDataByName.get(se);if(!ie||ie.argumentDataByName.size||y[v].has(se))return k=!1,zr.BREAK;let{isUnconditionallyProvided:Te}=(0,MC.getOrThrowError)(ie.externalFieldDataBySubgraphName,t,`${ie.originalParentTypeName}.${se}.externalFieldDataBySubgraphName`),de=e.get(`${ie.renamedParentTypeName}.${se}`);if(de){if(de.providedBy.length>0)I.push(...de.providedBy);else if(de.requiredBy.length>0)return k=!1,zr.BREAK}else if(!Te)return k=!1,zr.BREAK;y[v].add(se);let Re=(0,f7.getTypeNodeNamedTypeName)(ie.node.type);if(m7.BASE_SCALARS.has(Re))return;let xe=a.get(Re);if(!xe)return k=!1,zr.BREAK;if(xe.kind===zr.Kind.OBJECT_TYPE_DEFINITION){F=!0,f.push(xe);return}if((0,N7.isKindAbstract)(xe.kind))return k=!1,zr.BREAK}},InlineFragment:{enter(){return k=!1,zr.BREAK}},SelectionSet:{enter(){if(!F||(v+=1,F=!1,v<0||v>=f.length))return k=!1,zr.BREAK;y.push(new Set)},leave(){if(F)return k=!1,zr.BREAK;v-=1,f.pop(),y.pop()}}}),k&&(r.push(Q(x({fieldName:"",selectionSet:l},I.length>0?{conditions:I}:{}),{disableEntityResolver:!0})),o&&o.satisfiedFieldSets.add(l))}}function y7(e,t){return{tagNamesToExclude:new Set(e),tagNamesToInclude:new Set(t)}}function I7(e){if(e)return{block:!0,kind:zr.Kind.STRING,value:e}}});var vl=w(mt=>{"use strict";m();T();N();Object.defineProperty(mt,"__esModule",{value:!0});mt.MergeMethod=void 0;mt.newPersistedDirectivesData=_7;mt.isNodeExternalOrShareable=v7;mt.isTypeRequired=S7;mt.areDefaultValuesCompatible=qC;mt.compareAndValidateInputValueDefaultValues=O7;mt.setMutualExecutableLocations=D7;mt.isTypeNameRootType=b7;mt.getRenamedRootTypeName=A7;mt.childMapToValueArray=P7;mt.setLongestDescription=F7;mt.isParentDataRootType=VC;mt.isInterfaceDefinitionData=w7;mt.setParentDataExtensionType=L7;mt.extractPersistedDirectives=U7;mt.propagateAuthDirectives=k7;mt.propagateFieldAuthDirectives=M7;mt.generateDeprecatedDirective=Lv;mt.getClientPersistedDirectiveNodes=Fv;mt.getNodeForRouterSchemaByData=q7;mt.getClientSchemaFieldNodeByFieldData=V7;mt.getNodeWithPersistedDirectivesByInputValueData=KC;mt.addValidPersistedDirectiveDefinitionNodeByData=K7;mt.newInvalidFieldNames=G7;mt.validateExternalAndShareable=$7;mt.isTypeValidImplementation=jN;mt.isNodeDataInaccessible=GC;mt.isLeafKind=Q7;mt.getSubscriptionFilterValue=Y7;mt.getParentTypeName=J7;mt.newConditionalFieldData=H7;mt.getDefinitionDataCoords=z7;mt.isParentDataCompositeOutputType=W7;mt.newExternalFieldData=X7;mt.getInitialFederatedDescription=Z7;mt.areKindsEqual=eZ;mt.isFieldData=Cv;mt.isInputNodeKind=tZ;mt.isOutputNodeKind=nZ;var st=Ae(),Pv=Sp(),_l=Hr(),wv=Mi(),Ct=vr(),oc=Sr(),g7=VN();function _7(){return{deprecatedReason:"",directivesByDirectiveName:new Map,isDeprecated:!1,tagDirectiveByName:new Map}}function v7(e,t,n){var i;let r={isExternal:n.has(Ct.EXTERNAL),isShareable:t||n.has(Ct.SHAREABLE)};if(!((i=e.directives)!=null&&i.length))return r;for(let a of e.directives){let o=a.name.value;if(o===Ct.EXTERNAL){r.isExternal=!0;continue}o===Ct.SHAREABLE&&(r.isShareable=!0)}return r}function S7(e){return e.kind===st.Kind.NON_NULL_TYPE}function qC(e,t){switch(e.kind){case st.Kind.LIST_TYPE:return t.kind===st.Kind.LIST||t.kind===st.Kind.NULL;case st.Kind.NAMED_TYPE:if(t.kind===st.Kind.NULL)return!0;switch(e.name.value){case Ct.BOOLEAN_SCALAR:return t.kind===st.Kind.BOOLEAN;case Ct.FLOAT_SCALAR:return t.kind===st.Kind.INT||t.kind===st.Kind.FLOAT;case Ct.INT_SCALAR:return t.kind===st.Kind.INT;case Ct.STRING_SCALAR:return t.kind===st.Kind.STRING;default:return!0}case st.Kind.NON_NULL_TYPE:return t.kind===st.Kind.NULL?!1:qC(e.type,t)}}function O7(e,t,n){if(!e.defaultValue)return;if(!t.defaultValue){e.includeDefaultValue=!1;return}let r=(0,st.print)(e.defaultValue),i=(0,st.print)(t.defaultValue);if(r!==i){n.push((0,wv.incompatibleInputValueDefaultValuesError)(`${e.isArgument?Ct.ARGUMENT:Ct.INPUT_FIELD} "${e.name}"`,e.originalCoords,[...t.subgraphNames],r,i));return}}function D7(e,t){let n=new Set;for(let r of t)e.executableLocations.has(r)&&n.add(r);e.executableLocations=n}function b7(e,t){return Ct.ROOT_TYPE_NAMES.has(e)||t.has(e)}function A7(e,t){let n=t.get(e);if(!n)return e;switch(n){case st.OperationTypeNode.MUTATION:return Ct.MUTATION;case st.OperationTypeNode.SUBSCRIPTION:return Ct.SUBSCRIPTION;default:return Ct.QUERY}}function R7(e){for(let t of e.argumentDataByName.values()){for(let n of t.directivesByDirectiveName.values())t.node.directives.push(...n);e.node.arguments.push(t.node)}}function P7(e){let t=[];for(let n of e.values()){Cv(n)&&R7(n);for(let r of n.directivesByDirectiveName.values())n.node.directives.push(...r);t.push(n.node)}return t}function F7(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.directivesByDirectiveName.set(Ct.REQUIRES_SCOPES,[(0,oc.generateRequiresScopesDirective)(t.requiredScopes)]))}function M7(e,t){if(!t)return;let n=t.fieldAuthDataByFieldName.get(e.name);n&&(n.originalData.requiresAuthentication&&e.persistedDirectivesData.directivesByDirectiveName.set(Ct.AUTHENTICATED,[(0,oc.generateSimpleDirective)(Ct.AUTHENTICATED)]),n.originalData.requiredScopes.length>0&&e.persistedDirectivesData.directivesByDirectiveName.set(Ct.REQUIRES_SCOPES,[(0,oc.generateRequiresScopesDirective)(n.originalData.requiredScopes)]))}function Lv(e){return{kind:st.Kind.DIRECTIVE,name:(0,_l.stringToNameNode)(Ct.DEPRECATED),arguments:[{kind:st.Kind.ARGUMENT,name:(0,_l.stringToNameNode)(Ct.REASON),value:{kind:st.Kind.STRING,value:e||Ct.DEPRECATED_DEFAULT_ARGUMENT_VALUE}}]}}function x7(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,wv.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}i.push(...o)}}return i}function jC(e,t,n){let r=[...e.persistedDirectivesData.tagDirectiveByName.values()];return e.persistedDirectivesData.isDeprecated&&r.push(Lv(e.persistedDirectivesData.deprecatedReason)),r.push(...x7(e.persistedDirectivesData.directivesByDirectiveName,t,e.name,n)),r}function Fv(e){var n;let t=[];e.persistedDirectivesData.isDeprecated&&t.push(Lv(e.persistedDirectivesData.deprecatedReason));for(let[r,i]of e.persistedDirectivesData.directivesByDirectiveName){if(r===Ct.SEMANTIC_NON_NULL&&Cv(e)){t.push((0,oc.generateSemanticNonNullDirective)((n=(0,oc.getFirstEntry)(e.nullLevelsBySubgraphName))!=null?n:new Set([0])));continue}Ct.PERSISTED_CLIENT_DIRECTIVES.has(r)&&t.push(i[0])}return t}function q7(e,t,n){return e.node.name=(0,_l.stringToNameNode)(e.name),e.node.description=e.description,e.node.directives=jC(e,t,n),e.node}function V7(e){let t=Fv(e),n=[];for(let r of e.argumentDataByName.values())GC(r)||n.push(Q(x({},r.node),{directives:Fv(r)}));return Q(x({},e.node),{directives:t,arguments:n})}function KC(e,t,n){return e.node.name=(0,_l.stringToNameNode)(e.name),e.node.type=e.type,e.node.description=e.description,e.node.directives=jC(e,t,n),e.includeDefaultValue&&(e.node.defaultValue=e.defaultValue),e.node}function j7(e,t,n,r,i){let a=[];for(let[o,c]of t.argumentDataByArgumentName){let l=(0,oc.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(KC(c,n,r)),i&&i.add(o)}return a.length>0?(r.push((0,wv.invalidRequiredInputValueError)(Ct.DIRECTIVE_DEFINITION,`@${t.name}`,a)),!1):!0}function K7(e,t,n,r){let i=[];j7(i,t,n,r)&&e.push({arguments:i,kind:st.Kind.DIRECTIVE_DEFINITION,locations:(0,_l.setToNameNodeArray)(t.executableLocations),name:(0,_l.stringToNameNode)(t.name),repeatable:t.repeatable,description:t.description})}function G7(){return{byShareable:new Set,subgraphNamesByExternalFieldName:new Map}}function $7(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 xC;(function(e){e[e.UNION=0]="UNION",e[e.INTERSECTION=1]="INTERSECTION",e[e.CONSISTENT=2]="CONSISTENT"})(xC||(mt.MergeMethod=xC={}));function jN(e,t,n){if(e.kind===st.Kind.NON_NULL_TYPE)return t.kind!==st.Kind.NON_NULL_TYPE?!1:jN(e.type,t.type,n);if(t.kind===st.Kind.NON_NULL_TYPE)return jN(e,t.type,n);switch(e.kind){case st.Kind.NAMED_TYPE:if(t.kind===st.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===st.Kind.LIST_TYPE?jN(e.type,t.type,n):!1}}function GC(e){return e.persistedDirectivesData.directivesByDirectiveName.has(Ct.INACCESSIBLE)||e.directivesByDirectiveName.has(Ct.INACCESSIBLE)}function Q7(e){return e===st.Kind.SCALAR_TYPE_DEFINITION||e===st.Kind.ENUM_TYPE_DEFINITION}function Y7(e){switch(e.kind){case st.Kind.BOOLEAN:return e.value;case st.Kind.ENUM:case st.Kind.STRING:return e.value;case st.Kind.FLOAT:case st.Kind.INT:try{return parseFloat(e.value)}catch(t){return"NaN"}case st.Kind.NULL:return null}}function J7(e){return e.kind===st.Kind.OBJECT_TYPE_DEFINITION&&e.renamedTypeName||e.name}function H7(){return{providedBy:[],requiredBy:[]}}function z7(e,t){switch(e.kind){case st.Kind.ENUM_VALUE_DEFINITION:return`${e.parentTypeName}.${e.name}`;case st.Kind.FIELD_DEFINITION:return`${t?e.renamedParentTypeName:e.originalParentTypeName}.${e.name}`;case st.Kind.ARGUMENT:case st.Kind.INPUT_VALUE_DEFINITION:return t?e.federatedCoords:e.originalCoords;case st.Kind.OBJECT_TYPE_DEFINITION:return t?e.renamedTypeName:e.name;default:return e.name}}function W7(e){return e.kind===st.Kind.OBJECT_TYPE_DEFINITION||e.kind===st.Kind.INTERFACE_TYPE_DEFINITION}function X7(e){return{isDefinedExternal:e,isUnconditionallyProvided:!e}}function Z7(e){let{value:t,done:n}=e.configureDescriptionDataBySubgraphName.values().next();if(n)return e.description;if(t.propagate)return(0,g7.getDescriptionFromString)(t.description)||e.description}function eZ(e,t){return e.kind===t.kind}function Cv(e){return e.kind===st.Kind.FIELD_DEFINITION}function tZ(e){return Ct.INPUT_NODE_KINDS.has(e)}function nZ(e){return Ct.OUTPUT_NODE_KINDS.has(e)}});var kv={};pm(kv,{__addDisposableResource:()=>dB,__assign:()=>KN,__asyncDelegator:()=>rB,__asyncGenerator:()=>nB,__asyncValues:()=>iB,__await:()=>Sl,__awaiter:()=>zC,__classPrivateFieldGet:()=>uB,__classPrivateFieldIn:()=>lB,__classPrivateFieldSet:()=>cB,__createBinding:()=>$N,__decorate:()=>YC,__disposeResources:()=>pB,__esDecorate:()=>rZ,__exportStar:()=>XC,__extends:()=>$C,__generator:()=>WC,__importDefault:()=>oB,__importStar:()=>sB,__makeTemplateObject:()=>aB,__metadata:()=>HC,__param:()=>JC,__propKey:()=>aZ,__read:()=>Uv,__rest:()=>QC,__runInitializers:()=>iZ,__setFunctionName:()=>sZ,__spread:()=>ZC,__spreadArray:()=>tB,__spreadArrays:()=>eB,__values:()=>GN,default:()=>cZ});function $C(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Bv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function QC(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 JC(e,t){return function(n,r){t(n,r,e)}}function rZ(e,t,n,r,i,a){function o(J){if(J!==void 0&&typeof J!="function")throw new TypeError("Function expected");return J}for(var c=r.kind,l=c==="getter"?"get":c==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,f=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),y,I=!1,v=n.length-1;v>=0;v--){var F={};for(var k in r)F[k]=k==="access"?{}:r[k];for(var k in r.access)F.access[k]=r.access[k];F.addInitializer=function(J){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(J||null))};var K=(0,n[v])(c==="accessor"?{get:f.get,set:f.set}:f[l],F);if(c==="accessor"){if(K===void 0)continue;if(K===null||typeof K!="object")throw new TypeError("Object expected");(y=o(K.get))&&(f.get=y),(y=o(K.set))&&(f.set=y),(y=o(K.init))&&i.unshift(y)}else(y=o(K))&&(c==="field"?i.unshift(y):f[l]=y)}d&&Object.defineProperty(d,r.name,f),I=!0}function iZ(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 Uv(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 ZC(){for(var e=[],t=0;t1||c(I,v)})})}function c(I,v){try{l(r[I](v))}catch(F){y(a[0][3],F)}}function l(I){I.value instanceof Sl?Promise.resolve(I.value.v).then(d,f):y(a[0][2],I)}function d(I){c("next",I)}function f(I){c("throw",I)}function y(I,v){I(v),a.shift(),a.length&&c(a[0][0],a[0][1])}}function rB(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:Sl(e[i](o)),done:!1}:a?a(o):o}:a}}function iB(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 GN=="function"?GN(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 aB(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function sB(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)&&$N(t,e,n);return oZ(t,e),t}function oB(e){return e&&e.__esModule?e:{default:e}}function uB(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 cB(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 lB(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 dB(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 pB(e){function t(r){e.error=e.hasError?new uZ(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 Bv,KN,$N,oZ,uZ,cZ,Mv=ku(()=>{"use strict";m();T();N();Bv=function(e,t){return Bv=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])},Bv(e,t)};KN=function(){return KN=Object.assign||function(t){for(var n,r=1,i=arguments.length;rLB,__assign:()=>QN,__asyncDelegator:()=>OB,__asyncGenerator:()=>SB,__asyncValues:()=>DB,__await:()=>Ol,__awaiter:()=>hB,__classPrivateFieldGet:()=>PB,__classPrivateFieldIn:()=>wB,__classPrivateFieldSet:()=>FB,__createBinding:()=>JN,__decorate:()=>NB,__disposeResources:()=>CB,__esDecorate:()=>lZ,__exportStar:()=>IB,__extends:()=>fB,__generator:()=>yB,__importDefault:()=>RB,__importStar:()=>AB,__makeTemplateObject:()=>bB,__metadata:()=>EB,__param:()=>TB,__propKey:()=>pZ,__read:()=>qv,__rest:()=>mB,__runInitializers:()=>dZ,__setFunctionName:()=>fZ,__spread:()=>gB,__spreadArray:()=>vB,__spreadArrays:()=>_B,__values:()=>YN,default:()=>TZ});function fB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function mB(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 TB(e,t){return function(n,r){t(n,r,e)}}function lZ(e,t,n,r,i,a){function o(J){if(J!==void 0&&typeof J!="function")throw new TypeError("Function expected");return J}for(var c=r.kind,l=c==="getter"?"get":c==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,f=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),y,I=!1,v=n.length-1;v>=0;v--){var F={};for(var k in r)F[k]=k==="access"?{}:r[k];for(var k in r.access)F.access[k]=r.access[k];F.addInitializer=function(J){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(J||null))};var K=(0,n[v])(c==="accessor"?{get:f.get,set:f.set}:f[l],F);if(c==="accessor"){if(K===void 0)continue;if(K===null||typeof K!="object")throw new TypeError("Object expected");(y=o(K.get))&&(f.get=y),(y=o(K.set))&&(f.set=y),(y=o(K.init))&&i.unshift(y)}else(y=o(K))&&(c==="field"?i.unshift(y):f[l]=y)}d&&Object.defineProperty(d,r.name,f),I=!0}function dZ(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 qv(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 gB(){for(var e=[],t=0;t1||c(I,v)})})}function c(I,v){try{l(r[I](v))}catch(F){y(a[0][3],F)}}function l(I){I.value instanceof Ol?Promise.resolve(I.value.v).then(d,f):y(a[0][2],I)}function d(I){c("next",I)}function f(I){c("throw",I)}function y(I,v){I(v),a.shift(),a.length&&c(a[0][0],a[0][1])}}function OB(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:Ol(e[i](o)),done:!1}:a?a(o):o}:a}}function DB(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 YN=="function"?YN(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 bB(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function AB(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)&&JN(t,e,n);return mZ(t,e),t}function RB(e){return e&&e.__esModule?e:{default:e}}function PB(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 FB(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 wB(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 LB(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 CB(e){function t(r){e.error=e.hasError?new NZ(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 xv,QN,JN,mZ,NZ,TZ,UB=ku(()=>{"use strict";m();T();N();xv=function(e,t){return xv=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])},xv(e,t)};QN=function(){return QN=Object.assign||function(t){for(var n,r=1,i=arguments.length;r{"use strict";m();T();N()});var Op=w(dr=>{"use strict";m();T();N();Object.defineProperty(dr,"__esModule",{value:!0});dr.assertSome=dr.isSome=dr.compareNodes=dr.nodeToString=dr.compareStrings=dr.isValidPath=dr.isDocumentString=dr.asArray=void 0;var EZ=Ae(),hZ=e=>Array.isArray(e)?e:e?[e]:[];dr.asArray=hZ;var yZ=/\.[a-z0-9]+$/i;function IZ(e){if(typeof e!="string"||yZ.test(e))return!1;try{return(0,EZ.parse)(e),!0}catch(t){}return!1}dr.isDocumentString=IZ;var gZ=/[‘“!%^<>`]/;function _Z(e){return typeof e=="string"&&!gZ.test(e)}dr.isValidPath=_Z;function MB(e,t){return String(e)String(t)?1:0}dr.compareStrings=MB;function Vv(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}dr.nodeToString=Vv;function vZ(e,t,n){let r=Vv(e),i=Vv(t);return typeof n=="function"?n(r,i):MB(r,i)}dr.compareNodes=vZ;function SZ(e){return e!=null}dr.isSome=SZ;function OZ(e,t="Value should be something"){if(e==null)throw new Error(t)}dr.assertSome=OZ});var Dp=w(zN=>{"use strict";m();T();N();Object.defineProperty(zN,"__esModule",{value:!0});zN.inspect=void 0;var VB=3;function DZ(e){return HN(e,[])}zN.inspect=DZ;function HN(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return bZ(e,t);default:return String(e)}}function xB(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message}; + ${e.stack}`}function bZ(e,t){if(e===null)return"null";if(e instanceof Error)return e.name==="AggregateError"?xB(e)+` +`+qB(e.errors,t):xB(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(AZ(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:HN(r,n)}else if(Array.isArray(e))return qB(e,n);return RZ(e,n)}function AZ(e){return typeof e.toJSON=="function"}function RZ(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>VB?"["+PZ(e)+"]":"{ "+n.map(([i,a])=>i+": "+HN(a,t)).join(", ")+" }"}function qB(e,t){if(e.length===0)return"[]";if(t.length>VB)return"[Array]";let n=e.length,r=[];for(let i=0;i{"use strict";m();T();N();Object.defineProperty(Dl,"__esModule",{value:!0});Dl.relocatedError=Dl.createGraphQLError=void 0;var jv=Ae(),FZ=["message","locations","path","nodes","source","positions","originalError","name","stack","extensions"];function wZ(e){return e!=null&&typeof e=="object"&&Object.keys(e).every(t=>FZ.includes(t))}function Kv(e,t){return t!=null&&t.originalError&&!(t.originalError instanceof Error)&&wZ(t.originalError)&&(t.originalError=Kv(t.originalError.message,t.originalError)),jv.versionInfo.major>=17?new jv.GraphQLError(e,t):new jv.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)}Dl.createGraphQLError=Kv;function LZ(e,t){return Kv(e.message,{nodes:e.nodes,source:e.source,positions:e.positions,path:t==null?e.path:t,originalError:e,extensions:e.extensions})}Dl.relocatedError=LZ});var bp=w(xi=>{"use strict";m();T();N();Object.defineProperty(xi,"__esModule",{value:!0});xi.hasOwnProperty=xi.promiseReduce=xi.isPromise=xi.isObjectLike=xi.isIterableObject=void 0;function CZ(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}xi.isIterableObject=CZ;function BZ(e){return typeof e=="object"&&e!==null}xi.isObjectLike=BZ;function jB(e){return(e==null?void 0:e.then)!=null}xi.isPromise=jB;function UZ(e,t,n){let r=n;for(let i of e)r=jB(r)?r.then(a=>t(a,i)):t(r,i);return r}xi.promiseReduce=UZ;function kZ(e,t){return Object.prototype.hasOwnProperty.call(e,t)}xi.hasOwnProperty=kZ});var $v=w(ZN=>{"use strict";m();T();N();Object.defineProperty(ZN,"__esModule",{value:!0});ZN.getArgumentValues=void 0;var Gv=Dp(),uc=Ae(),XN=WN(),MZ=bp();function xZ(e,t,n={}){var o;let r={},a=((o=t.arguments)!=null?o:[]).reduce((c,l)=>Q(x({},c),{[l.name.value]:l}),{});for(let{name:c,type:l,defaultValue:d}of e.args){let f=a[c];if(!f){if(d!==void 0)r[c]=d;else if((0,uc.isNonNullType)(l))throw(0,XN.createGraphQLError)(`Argument "${c}" of required type "${(0,Gv.inspect)(l)}" was not provided.`,{nodes:[t]});continue}let y=f.value,I=y.kind===uc.Kind.NULL;if(y.kind===uc.Kind.VARIABLE){let F=y.name.value;if(n==null||!(0,MZ.hasOwnProperty)(n,F)){if(d!==void 0)r[c]=d;else if((0,uc.isNonNullType)(l))throw(0,XN.createGraphQLError)(`Argument "${c}" of required type "${(0,Gv.inspect)(l)}" was provided the variable "$${F}" which was not provided a runtime value.`,{nodes:[y]});continue}I=n[F]==null}if(I&&(0,uc.isNonNullType)(l))throw(0,XN.createGraphQLError)(`Argument "${c}" of non-null type "${(0,Gv.inspect)(l)}" must not be null.`,{nodes:[y]});let v=(0,uc.valueFromAST)(y,l,n);if(v===void 0)throw(0,XN.createGraphQLError)(`Argument "${c}" has invalid value ${(0,uc.print)(y)}.`,{nodes:[y]});r[c]=v}return r}ZN.getArgumentValues=xZ});var Qv=w(Ma=>{"use strict";m();T();N();Object.defineProperty(Ma,"__esModule",{value:!0});Ma.getDirective=Ma.getDirectives=Ma.getDirectiveInExtensions=Ma.getDirectivesInExtensions=void 0;var GB=$v();function $B(e,t=["directives"]){return t.reduce((n,r)=>n==null?n:n[r],e==null?void 0:e.extensions)}Ma.getDirectivesInExtensions=$B;function KB(e,t){let n=e.filter(r=>r.name===t);if(n.length)return n.map(r=>{var i;return(i=r.args)!=null?i:{}})}function QB(e,t,n=["directives"]){let r=n.reduce((a,o)=>a==null?a:a[o],e==null?void 0:e.extensions);if(r===void 0)return;if(Array.isArray(r))return KB(r,t);let i=[];for(let[a,o]of Object.entries(r))if(Array.isArray(o))for(let c of o)i.push({name:a,args:c});else i.push({name:a,args:o});return KB(i,t)}Ma.getDirectiveInExtensions=QB;function qZ(e,t,n=["directives"]){let r=$B(t,n);if(r!=null&&r.length>0)return r;let a=(e&&e.getDirectives?e.getDirectives():[]).reduce((l,d)=>(l[d.name]=d,l),{}),o=[];t.astNode&&o.push(t.astNode),"extensionASTNodes"in t&&t.extensionASTNodes&&(o=[...o,...t.extensionASTNodes]);let c=[];for(let l of o)if(l.directives)for(let d of l.directives){let f=a[d.name.value];f&&c.push({name:d.name.value,args:(0,GB.getArgumentValues)(f,d)})}return c}Ma.getDirectives=qZ;function VZ(e,t,n,r=["directives"]){let i=QB(t,n,r);if(i!=null)return i;let a=e&&e.getDirective?e.getDirective(n):void 0;if(a==null)return;let o=[];t.astNode&&o.push(t.astNode),"extensionASTNodes"in t&&t.extensionASTNodes&&(o=[...o,...t.extensionASTNodes]);let c=[];for(let l of o)if(l.directives)for(let d of l.directives)d.name.value===n&&c.push((0,GB.getArgumentValues)(a,d));if(c.length)return c}Ma.getDirective=VZ});var Yv=w(eT=>{"use strict";m();T();N();Object.defineProperty(eT,"__esModule",{value:!0});eT.getFieldsWithDirectives=void 0;var jZ=Ae();function KZ(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}`,f=c.directives.map(y=>({name:y.name.value,args:(y.arguments||[]).reduce((I,v)=>Q(x({},I),{[v.name.value]:(0,jZ.valueFromASTUntyped)(v.value)}),{})}));n[d]=f}}}return n}eT.getFieldsWithDirectives=KZ});var YB=w(tT=>{"use strict";m();T();N();Object.defineProperty(tT,"__esModule",{value:!0});tT.getArgumentsWithDirectives=void 0;var Jv=Ae();function GZ(e){return e.kind===Jv.Kind.OBJECT_TYPE_DEFINITION||e.kind===Jv.Kind.OBJECT_TYPE_EXTENSION}function $Z(e){var r;let t={},n=e.definitions.filter(GZ);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(f=>({name:f.name.value,args:(f.arguments||[]).reduce((y,I)=>Q(x({},y),{[I.name.value]:(0,Jv.valueFromASTUntyped)(I.value)}),{})}));c[l.name.value]=d}}return t}tT.getArgumentsWithDirectives=$Z});var Hv=w(nT=>{"use strict";m();T();N();Object.defineProperty(nT,"__esModule",{value:!0});nT.getImplementingTypes=void 0;var QZ=Ae();function YZ(e,t){let n=t.getTypeMap(),r=[];for(let i in n){let a=n[i];(0,QZ.isObjectType)(a)&&a.getInterfaces().find(c=>c.name===e)&&r.push(a.name)}return r}nT.getImplementingTypes=YZ});var Wv=w(rT=>{"use strict";m();T();N();Object.defineProperty(rT,"__esModule",{value:!0});rT.astFromType=void 0;var JZ=Dp(),cc=Ae();function zv(e){if((0,cc.isNonNullType)(e)){let t=zv(e.ofType);if(t.kind===cc.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${(0,JZ.inspect)(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:cc.Kind.NON_NULL_TYPE,type:t}}else if((0,cc.isListType)(e))return{kind:cc.Kind.LIST_TYPE,type:zv(e.ofType)};return{kind:cc.Kind.NAMED_TYPE,name:{kind:cc.Kind.NAME,value:e.name}}}rT.astFromType=zv});var aT=w(iT=>{"use strict";m();T();N();Object.defineProperty(iT,"__esModule",{value:!0});iT.astFromValueUntyped=void 0;var xa=Ae();function Xv(e){if(e===null)return{kind:xa.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=Xv(n);r!=null&&t.push(r)}return{kind:xa.Kind.LIST,values:t}}if(typeof e=="object"){let t=[];for(let n in e){let r=e[n],i=Xv(r);i&&t.push({kind:xa.Kind.OBJECT_FIELD,name:{kind:xa.Kind.NAME,value:n},value:i})}return{kind:xa.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:xa.Kind.BOOLEAN,value:e};if(typeof e=="bigint")return{kind:xa.Kind.INT,value:String(e)};if(typeof e=="number"&&isFinite(e)){let t=String(e);return HZ.test(t)?{kind:xa.Kind.INT,value:t}:{kind:xa.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:xa.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}iT.astFromValueUntyped=Xv;var HZ=/^-?(?:0|[1-9][0-9]*)$/});var HB=w(sT=>{"use strict";m();T();N();Object.defineProperty(sT,"__esModule",{value:!0});sT.astFromValue=void 0;var zZ=Dp(),pi=Ae(),WZ=aT(),JB=bp();function Ap(e,t){if((0,pi.isNonNullType)(t)){let n=Ap(e,t.ofType);return(n==null?void 0:n.kind)===pi.Kind.NULL?null:n}if(e===null)return{kind:pi.Kind.NULL};if(e===void 0)return null;if((0,pi.isListType)(t)){let n=t.ofType;if((0,JB.isIterableObject)(e)){let r=[];for(let i of e){let a=Ap(i,n);a!=null&&r.push(a)}return{kind:pi.Kind.LIST,values:r}}return Ap(e,n)}if((0,pi.isInputObjectType)(t)){if(!(0,JB.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Ap(e[r.name],r.type);i&&n.push({kind:pi.Kind.OBJECT_FIELD,name:{kind:pi.Kind.NAME,value:r.name},value:i})}return{kind:pi.Kind.OBJECT,fields:n}}if((0,pi.isLeafType)(t)){let n=t.serialize(e);return n==null?null:(0,pi.isEnumType)(t)?{kind:pi.Kind.ENUM,value:n}:t.name==="ID"&&typeof n=="string"&&XZ.test(n)?{kind:pi.Kind.INT,value:n}:(0,WZ.astFromValueUntyped)(n)}console.assert(!1,"Unexpected input type: "+(0,zZ.inspect)(t))}sT.astFromValue=Ap;var XZ=/^-?(?:0|[1-9][0-9]*)$/});var zB=w(oT=>{"use strict";m();T();N();Object.defineProperty(oT,"__esModule",{value:!0});oT.getDescriptionNode=void 0;var ZZ=Ae();function eee(e){var t;if((t=e.astNode)!=null&&t.description)return Q(x({},e.astNode.description),{block:!0});if(e.description)return{kind:ZZ.Kind.STRING,value:e.description,block:!0}}oT.getDescriptionNode=eee});var bl=w(br=>{"use strict";m();T();N();Object.defineProperty(br,"__esModule",{value:!0});br.memoize2of5=br.memoize2of4=br.memoize5=br.memoize4=br.memoize3=br.memoize2=br.memoize1=void 0;function tee(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}}br.memoize1=tee;function nee(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}}br.memoize2=nee;function ree(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 f=e(r,i,a);return d.set(a,f),f}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}}br.memoize3=ree;function iee(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 y=new WeakMap;c.set(i,y);let I=new WeakMap;y.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 y=new WeakMap;l.set(a,y);let I=e(r,i,a,o);return y.set(o,I),I}let d=l.get(a);if(!d){let y=new WeakMap;l.set(a,y);let I=e(r,i,a,o);return y.set(o,I),I}let f=d.get(o);if(f===void 0){let y=e(r,i,a,o);return d.set(o,y),y}return f}}br.memoize4=iee;function aee(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 F=new WeakMap;v.set(a,F);let k=new WeakMap;F.set(o,k);let K=e(r,i,a,o,c);return k.set(c,K),K}let d=l.get(i);if(!d){d=new WeakMap,l.set(i,d);let v=new WeakMap;d.set(a,v);let F=new WeakMap;v.set(o,F);let k=e(r,i,a,o,c);return F.set(c,k),k}let f=d.get(a);if(!f){f=new WeakMap,d.set(a,f);let v=new WeakMap;f.set(o,v);let F=e(r,i,a,o,c);return v.set(c,F),F}let y=f.get(o);if(!y){y=new WeakMap,f.set(o,y);let v=e(r,i,a,o,c);return y.set(c,v),v}let I=y.get(c);if(I===void 0){let v=e(r,i,a,o,c);return y.set(c,v),v}return I}}br.memoize5=aee;function see(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}}br.memoize2of4=see;function oee(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 f=e(r,i,a,o,c);return l.set(i,f),f}let d=l.get(i);if(d===void 0){let f=e(r,i,a,o,c);return l.set(i,f),f}return d}}br.memoize2of5=oee});var Rp=w(fi=>{"use strict";m();T();N();Object.defineProperty(fi,"__esModule",{value:!0});fi.getRootTypeMap=fi.getRootTypes=fi.getRootTypeNames=fi.getDefinedRootType=void 0;var uee=WN(),Zv=bl();function cee(e,t,n){let i=(0,fi.getRootTypeMap)(e).get(t);if(i==null)throw(0,uee.createGraphQLError)(`Schema is not configured to execute ${t} operation.`,{nodes:n});return i}fi.getDefinedRootType=cee;fi.getRootTypeNames=(0,Zv.memoize1)(function(t){let n=(0,fi.getRootTypes)(t);return new Set([...n].map(r=>r.name))});fi.getRootTypes=(0,Zv.memoize1)(function(t){let n=(0,fi.getRootTypeMap)(t);return new Set(n.values())});fi.getRootTypeMap=(0,Zv.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 iS=w(ht=>{"use strict";m();T();N();Object.defineProperty(ht,"__esModule",{value:!0});ht.makeDirectiveNodes=ht.makeDirectiveNode=ht.makeDeprecatedDirective=ht.astFromEnumValue=ht.astFromInputField=ht.astFromField=ht.astFromScalarType=ht.astFromEnumType=ht.astFromInputObjectType=ht.astFromUnionType=ht.astFromInterfaceType=ht.astFromObjectType=ht.astFromArg=ht.getDeprecatableDirectiveNodes=ht.getDirectiveNodes=ht.astFromDirective=ht.astFromSchema=ht.printSchemaWithDirectives=ht.getDocumentNodeFromSchema=void 0;var ct=Ae(),lc=Wv(),eS=HB(),lee=aT(),qi=zB(),tS=Qv(),dee=Op(),pee=Rp();function WB(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=XB(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let c of o)(0,ct.isSpecifiedDirective)(c)||a.push(ZB(c,e,n));for(let c in r){let l=r[c],d=(0,ct.isSpecifiedScalarType)(l),f=(0,ct.isIntrospectionType)(l);if(!(d||f))if((0,ct.isObjectType)(l))a.push(eU(l,e,n));else if((0,ct.isInterfaceType)(l))a.push(tU(l,e,n));else if((0,ct.isUnionType)(l))a.push(nU(l,e,n));else if((0,ct.isInputObjectType)(l))a.push(rU(l,e,n));else if((0,ct.isEnumType)(l))a.push(iU(l,e,n));else if((0,ct.isScalarType)(l))a.push(aU(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:ct.Kind.DOCUMENT,definitions:a}}ht.getDocumentNodeFromSchema=WB;function fee(e,t={}){let n=WB(e,t);return(0,ct.print)(n)}ht.printSchemaWithDirectives=fee;function XB(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 f of d.operationTypes)n.set(f.operation,f);let i=(0,pee.getRootTypeMap)(e);for(let[d,f]of n){let y=i.get(d);if(y!=null){let I=(0,lc.astFromType)(y);f!=null?f.type=I:n.set(d,{kind:ct.Kind.OPERATION_TYPE_DEFINITION,operation:d,type:I})}}let a=[...n.values()].filter(dee.isSome),o=dc(e,e,t);if(!a.length&&!o.length)return null;let c={kind:a!=null?ct.Kind.SCHEMA_DEFINITION:ct.Kind.SCHEMA_EXTENSION,operationTypes:a,directives:o},l=(0,qi.getDescriptionNode)(e);return l&&(c.description=l),c}ht.astFromSchema=XB;function ZB(e,t,n){var r,i;return{kind:ct.Kind.DIRECTIVE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},arguments:(r=e.args)==null?void 0:r.map(a=>nS(a,t,n)),repeatable:e.isRepeatable,locations:((i=e.locations)==null?void 0:i.map(a=>({kind:ct.Kind.NAME,value:a})))||[]}}ht.astFromDirective=ZB;function dc(e,t,n){let r=(0,tS.getDirectivesInExtensions)(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=uT(t,r);else{a=[];for(let o of i)o.directives&&a.push(...o.directives)}return a}ht.getDirectiveNodes=dc;function Fp(e,t,n){var c,l;let r=[],i=null,a=(0,tS.getDirectivesInExtensions)(e,n),o;return a!=null?o=uT(t,a):o=(c=e.astNode)==null?void 0:c.directives,o!=null&&(r=o.filter(d=>d.name.value!=="deprecated"),e.deprecationReason!=null&&(i=(l=o.filter(d=>d.name.value==="deprecated"))==null?void 0:l[0])),e.deprecationReason!=null&&i==null&&(i=uU(e.deprecationReason)),i==null?r:[i].concat(r)}ht.getDeprecatableDirectiveNodes=Fp;function nS(e,t,n){var r;return{kind:ct.Kind.INPUT_VALUE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},type:(0,lc.astFromType)(e.type),defaultValue:e.defaultValue!==void 0&&(r=(0,eS.astFromValue)(e.defaultValue,e.type))!=null?r:void 0,directives:Fp(e,t,n)}}ht.astFromArg=nS;function eU(e,t,n){return{kind:ct.Kind.OBJECT_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>rS(r,t,n)),interfaces:Object.values(e.getInterfaces()).map(r=>(0,lc.astFromType)(r)),directives:dc(e,t,n)}}ht.astFromObjectType=eU;function tU(e,t,n){let r={kind:ct.Kind.INTERFACE_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(i=>rS(i,t,n)),directives:dc(e,t,n)};return"getInterfaces"in e&&(r.interfaces=Object.values(e.getInterfaces()).map(i=>(0,lc.astFromType)(i))),r}ht.astFromInterfaceType=tU;function nU(e,t,n){return{kind:ct.Kind.UNION_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},directives:dc(e,t,n),types:e.getTypes().map(r=>(0,lc.astFromType)(r))}}ht.astFromUnionType=nU;function rU(e,t,n){return{kind:ct.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>sU(r,t,n)),directives:dc(e,t,n)}}ht.astFromInputObjectType=rU;function iU(e,t,n){return{kind:ct.Kind.ENUM_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(r=>oU(r,t,n)),directives:dc(e,t,n)}}ht.astFromEnumType=iU;function aU(e,t,n){var o;let r=(0,tS.getDirectivesInExtensions)(e,n),i=r?uT(t,r):((o=e.astNode)==null?void 0:o.directives)||[],a=e.specifiedByUrl||e.specifiedByURL;if(a&&!i.some(c=>c.name.value==="specifiedBy")){let c={url:a};i.push(Pp("specifiedBy",c))}return{kind:ct.Kind.SCALAR_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},directives:i}}ht.astFromScalarType=aU;function rS(e,t,n){return{kind:ct.Kind.FIELD_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},arguments:e.args.map(r=>nS(r,t,n)),type:(0,lc.astFromType)(e.type),directives:Fp(e,t,n)}}ht.astFromField=rS;function sU(e,t,n){var r;return{kind:ct.Kind.INPUT_VALUE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},type:(0,lc.astFromType)(e.type),directives:Fp(e,t,n),defaultValue:(r=(0,eS.astFromValue)(e.defaultValue,e.type))!=null?r:void 0}}ht.astFromInputField=sU;function oU(e,t,n){return{kind:ct.Kind.ENUM_VALUE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},directives:Fp(e,t,n)}}ht.astFromEnumValue=oU;function uU(e){return Pp("deprecated",{reason:e},ct.GraphQLDeprecatedDirective)}ht.makeDeprecatedDirective=uU;function Pp(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,eS.astFromValue)(o,i.type);c&&r.push({kind:ct.Kind.ARGUMENT,name:{kind:ct.Kind.NAME,value:a},value:c})}}else for(let i in t){let a=t[i],o=(0,lee.astFromValueUntyped)(a);o&&r.push({kind:ct.Kind.ARGUMENT,name:{kind:ct.Kind.NAME,value:i},value:o})}return{kind:ct.Kind.DIRECTIVE,name:{kind:ct.Kind.NAME,value:e},arguments:r}}ht.makeDirectiveNode=Pp;function uT(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(Pp(r,o,a));else n.push(Pp(r,i,a))}return n}ht.makeDirectiveNodes=uT});var lU=w(Al=>{"use strict";m();T();N();Object.defineProperty(Al,"__esModule",{value:!0});Al.createDefaultRules=Al.validateGraphQlDocuments=void 0;var wp=Ae();function mee(e,t,n=cU()){var c;let r=new Set,i=new Map;for(let l of t)for(let d of l.definitions)d.kind===wp.Kind.FRAGMENT_DEFINITION?i.set(d.name.value,d):r.add(d);let a={kind:wp.Kind.DOCUMENT,definitions:Array.from([...r,...i.values()])},o=(0,wp.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}Al.validateGraphQlDocuments=mee;function cU(){let e=["NoUnusedFragmentsRule","NoUnusedVariablesRule","KnownDirectivesRule"];return wp.versionInfo.major<15&&(e=e.map(t=>t.replace(/Rule$/,""))),wp.specifiedRules.filter(t=>!e.includes(t.name))}Al.createDefaultRules=cU});var dU=w(cT=>{"use strict";m();T();N();Object.defineProperty(cT,"__esModule",{value:!0});cT.parseGraphQLJSON=void 0;var Nee=Ae();function Tee(e){return e=e.toString(),e.charCodeAt(0)===65279&&(e=e.slice(1)),e}function Eee(e){return JSON.parse(Tee(e))}function hee(e,t,n){let r=Eee(t);if(r.data&&(r=r.data),r.kind==="Document")return{location:e,document:r};if(r.__schema){let i=(0,Nee.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")}cT.parseGraphQLJSON=hee});var sS=w(Cn=>{"use strict";m();T();N();Object.defineProperty(Cn,"__esModule",{value:!0});Cn.getBlockStringIndentation=Cn.dedentBlockStringValue=Cn.getLeadingCommentBlock=Cn.getComment=Cn.getDescription=Cn.printWithComments=Cn.printComment=Cn.pushComment=Cn.collectComment=Cn.resetComments=void 0;var NU=Ae(),yee=80,Rl={};function Iee(){Rl={}}Cn.resetComments=Iee;function gee(e){var n;let t=(n=e.name)==null?void 0:n.value;if(t!=null)switch(Lp(e,t),e.kind){case"EnumTypeDefinition":if(e.values)for(let r of e.values)Lp(r,t,r.name.value);break;case"ObjectTypeDefinition":case"InputObjectTypeDefinition":case"InterfaceTypeDefinition":if(e.fields){for(let r of e.fields)if(Lp(r,t,r.name.value),Dee(r)&&r.arguments)for(let i of r.arguments)Lp(i,t,r.name.value,i.name.value)}break}}Cn.collectComment=gee;function Lp(e,t,n,r){let i=aS(e);if(typeof i!="string"||i.length===0)return;let a=[t];n&&(a.push(n),r&&a.push(r));let o=a.join(".");Rl[o]||(Rl[o]=[]),Rl[o].push(i)}Cn.pushComment=Lp;function TU(e){return` # `+e.replace(/\n/g,` -# `)}Cn.printComment=JB;function Me(e,t){return e?e.filter(n=>n).join(t||""):""}function GB(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` -`)))!=null?t:!1}function XZ(e){return(t,n,r,i,a)=>{var f;let o=[],c=i.reduce((y,I)=>(["fields","arguments","values"].includes(I)&&y.name&&o.push(y.name.value),y[I]),a[0]),l=[...o,(f=c==null?void 0:c.name)==null?void 0:f.value].filter(Boolean).join("."),d=[];return t.kind.includes("Definition")&&Ol[l]&&d.push(...Ol[l]),Me([...d.map(JB),t.description,e(t,n,r,i,a)],` -`)}}function Fp(e){return e&&` ${e.replace(/\n/g,` - `)}`}function ua(e){return e&&e.length!==0?`{ -${Fp(Me(e,` +# `)}Cn.printComment=TU;function Me(e,t){return e?e.filter(n=>n).join(t||""):""}function pU(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` +`)))!=null?t:!1}function _ee(e){return(t,n,r,i,a)=>{var f;let o=[],c=i.reduce((y,I)=>(["fields","arguments","values"].includes(I)&&y.name&&o.push(y.name.value),y[I]),a[0]),l=[...o,(f=c==null?void 0:c.name)==null?void 0:f.value].filter(Boolean).join("."),d=[];return t.kind.includes("Definition")&&Rl[l]&&d.push(...Rl[l]),Me([...d.map(TU),t.description,e(t,n,r,i,a)],` +`)}}function Cp(e){return e&&` ${e.replace(/\n/g,` + `)}`}function ca(e){return e&&e.length!==0?`{ +${Cp(Me(e,` `))} -}`:""}function On(e,t,n){return t?e+t+(n||""):""}function ZZ(e,t=!1){let n=e.replace(/"""/g,'\\"""');return(e[0]===" "||e[0]===" ")&&e.indexOf(` +}`:""}function On(e,t,n){return t?e+t+(n||""):""}function vee(e,t=!1){let n=e.replace(/"""/g,'\\"""');return(e[0]===" "||e[0]===" ")&&e.indexOf(` `)===-1?`"""${n.replace(/"$/,`" `)}"""`:`""" -${t?n:Fp(n)} -"""`}var $B={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Me(e.definitions,` +${t?n:Cp(n)} +"""`}var fU={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Me(e.definitions,` -`)},OperationDefinition:{leave:e=>{let t=On("(",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+On(" = ",n)+On(" ",Me(r," "))},SelectionSet:{leave:({selections:e})=>ua(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=On("",e,": ")+t,o=a+On("(",Me(n,", "),")");return o.length>HZ&&(o=a+On(`( -`,Fp(Me(n,` +`)},OperationDefinition:{leave:e=>{let t=On("(",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+On(" = ",n)+On(" ",Me(r," "))},SelectionSet:{leave:({selections:e})=>ca(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=On("",e,": ")+t,o=a+On("(",Me(n,", "),")");return o.length>yee&&(o=a+On(`( +`,Cp(Me(n,` `)),` -)`)),Me([o,Me(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+On(" ",Me(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Me(["...",On("on ",e),Me(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${On("(",Me(n,", "),")")} on ${t} ${On("",Me(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?ZZ(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+On("(",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," "),ua(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,On("implements ",Me(t," & ")),Me(n," "),ua(r)]," ")},FieldDefinition:{leave:({name:e,arguments:t,type:n,directives:r})=>e+(GB(t)?On(`( -`,Fp(Me(t,` +)`)),Me([o,Me(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+On(" ",Me(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Me(["...",On("on ",e),Me(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${On("(",Me(n,", "),")")} on ${t} ${On("",Me(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?vee(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+On("(",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," "),ca(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,On("implements ",Me(t," & ")),Me(n," "),ca(r)]," ")},FieldDefinition:{leave:({name:e,arguments:t,type:n,directives:r})=>e+(pU(t)?On(`( +`,Cp(Me(t,` `)),` -)`):On("(",Me(t,", "),")"))+": "+n+On(" ",Me(r," "))},InputValueDefinition:{leave:({name:e,type:t,defaultValue:n,directives:r})=>Me([e+": "+t,On("= ",n),Me(r," ")]," ")},InterfaceTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Me(["interface",e,On("implements ",Me(t," & ")),Me(n," "),ua(r)]," ")},UnionTypeDefinition:{leave:({name:e,directives:t,types:n})=>Me(["union",e,Me(t," "),On("= ",Me(n," | "))]," ")},EnumTypeDefinition:{leave:({name:e,directives:t,values:n})=>Me(["enum",e,Me(t," "),ua(n)]," ")},EnumValueDefinition:{leave:({name:e,directives:t})=>Me([e,Me(t," ")]," ")},InputObjectTypeDefinition:{leave:({name:e,directives:t,fields:n})=>Me(["input",e,Me(t," "),ua(n)]," ")},DirectiveDefinition:{leave:({name:e,arguments:t,repeatable:n,locations:r})=>"directive @"+e+(GB(t)?On(`( -`,Fp(Me(t,` +)`):On("(",Me(t,", "),")"))+": "+n+On(" ",Me(r," "))},InputValueDefinition:{leave:({name:e,type:t,defaultValue:n,directives:r})=>Me([e+": "+t,On("= ",n),Me(r," ")]," ")},InterfaceTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Me(["interface",e,On("implements ",Me(t," & ")),Me(n," "),ca(r)]," ")},UnionTypeDefinition:{leave:({name:e,directives:t,types:n})=>Me(["union",e,Me(t," "),On("= ",Me(n," | "))]," ")},EnumTypeDefinition:{leave:({name:e,directives:t,values:n})=>Me(["enum",e,Me(t," "),ca(n)]," ")},EnumValueDefinition:{leave:({name:e,directives:t})=>Me([e,Me(t," ")]," ")},InputObjectTypeDefinition:{leave:({name:e,directives:t,fields:n})=>Me(["input",e,Me(t," "),ca(n)]," ")},DirectiveDefinition:{leave:({name:e,arguments:t,repeatable:n,locations:r})=>"directive @"+e+(pU(t)?On(`( +`,Cp(Me(t,` `)),` -)`):On("(",Me(t,", "),")"))+(n?" repeatable":"")+" on "+Me(r," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Me(["extend schema",Me(e," "),ua(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,On("implements ",Me(t," & ")),Me(n," "),ua(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Me(["extend interface",e,On("implements ",Me(t," & ")),Me(n," "),ua(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Me(["extend union",e,Me(t," "),On("= ",Me(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Me(["extend enum",e,Me(t," "),ua(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Me(["extend input",e,Me(t," "),ua(n)]," ")}},eee=Object.keys($B).reduce((e,t)=>Y(x({},e),{[t]:{leave:XZ($B[t].leave)}}),{});function tee(e){return(0,YB.visit)(e,eee)}Cn.printWithComments=tee;function nee(e){return e.kind==="FieldDefinition"}function ree(e,t){if(e.description!=null)return e.description.value;if(t!=null&&t.commentDescriptions)return $v(e)}Cn.getDescription=ree;function $v(e){let t=HB(e);if(t!==void 0)return zB(` -${t}`)}Cn.getComment=$v;function HB(e){let t=e.loc;if(!t)return;let n=[],r=t.startToken.prev;for(;r!=null&&r.kind===YB.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}Cn.getLeadingCommentBlock=HB;function zB(e){let t=e.split(/\r\n|[\n\r]/g),n=WB(t);if(n!==0)for(let r=1;r0&&QB(t[0]);)t.shift();for(;t.length>0&&QB(t[t.length-1]);)t.pop();return t.join(` -`)}Cn.dedentBlockStringValue=zB;function WB(e){let t=null;for(let n=1;n{"use strict";m();T();N();Object.defineProperty(uu,"__esModule",{value:!0});uu.isDescribable=uu.transformCommentsToDescriptions=uu.parseGraphQLSDL=void 0;var xi=Ae(),ZB=Qv();function iee(e,t,n={}){let r;try{n.commentDescriptions&&t.includes("#")?(r=eU(t,n),n.noLocation&&(r=(0,xi.parse)((0,xi.print)(r),n))):r=(0,xi.parse)(new xi.Source(t,e),n)}catch(i){if(i.message.includes("EOF")&&t.replace(/(\#[^*]*)/g,"").trim()==="")r={kind:xi.Kind.DOCUMENT,definitions:[]};else throw i}return{location:e,document:r}}uu.parseGraphQLSDL=iee;function eU(e,t={}){let n=(0,xi.parse)(e,Y(x({},t),{noLocation:!1}));return(0,xi.visit)(n,{leave:i=>{if(tU(i)){let a=(0,ZB.getLeadingCommentBlock)(i);if(a!==void 0){let o=(0,ZB.dedentBlockStringValue)(` +)`):On("(",Me(t,", "),")"))+(n?" repeatable":"")+" on "+Me(r," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Me(["extend schema",Me(e," "),ca(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,On("implements ",Me(t," & ")),Me(n," "),ca(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Me(["extend interface",e,On("implements ",Me(t," & ")),Me(n," "),ca(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Me(["extend union",e,Me(t," "),On("= ",Me(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Me(["extend enum",e,Me(t," "),ca(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Me(["extend input",e,Me(t," "),ca(n)]," ")}},See=Object.keys(fU).reduce((e,t)=>Q(x({},e),{[t]:{leave:_ee(fU[t].leave)}}),{});function Oee(e){return(0,NU.visit)(e,See)}Cn.printWithComments=Oee;function Dee(e){return e.kind==="FieldDefinition"}function bee(e,t){if(e.description!=null)return e.description.value;if(t!=null&&t.commentDescriptions)return aS(e)}Cn.getDescription=bee;function aS(e){let t=EU(e);if(t!==void 0)return hU(` +${t}`)}Cn.getComment=aS;function EU(e){let t=e.loc;if(!t)return;let n=[],r=t.startToken.prev;for(;r!=null&&r.kind===NU.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}Cn.getLeadingCommentBlock=EU;function hU(e){let t=e.split(/\r\n|[\n\r]/g),n=yU(t);if(n!==0)for(let r=1;r0&&mU(t[0]);)t.shift();for(;t.length>0&&mU(t[t.length-1]);)t.pop();return t.join(` +`)}Cn.dedentBlockStringValue=hU;function yU(e){let t=null;for(let n=1;n{"use strict";m();T();N();Object.defineProperty(pu,"__esModule",{value:!0});pu.isDescribable=pu.transformCommentsToDescriptions=pu.parseGraphQLSDL=void 0;var Vi=Ae(),gU=sS();function Aee(e,t,n={}){let r;try{n.commentDescriptions&&t.includes("#")?(r=_U(t,n),n.noLocation&&(r=(0,Vi.parse)((0,Vi.print)(r),n))):r=(0,Vi.parse)(new Vi.Source(t,e),n)}catch(i){if(i.message.includes("EOF")&&t.replace(/(\#[^*]*)/g,"").trim()==="")r={kind:Vi.Kind.DOCUMENT,definitions:[]};else throw i}return{location:e,document:r}}pu.parseGraphQLSDL=Aee;function _U(e,t={}){let n=(0,Vi.parse)(e,Q(x({},t),{noLocation:!1}));return(0,Vi.visit)(n,{leave:i=>{if(vU(i)){let a=(0,gU.getLeadingCommentBlock)(i);if(a!==void 0){let o=(0,gU.dedentBlockStringValue)(` `+a),c=o.includes(` -`);return i.description?Y(x({},i),{description:Y(x({},i.description),{value:i.description.value+` -`+o,block:!0})}):Y(x({},i),{description:{kind:xi.Kind.STRING,value:o,block:c}})}}}})}uu.transformCommentsToDescriptions=eU;function tU(e){return(0,xi.isTypeSystemDefinitionNode)(e)||e.kind===xi.Kind.FIELD_DEFINITION||e.kind===xi.Kind.INPUT_VALUE_DEFINITION||e.kind===xi.Kind.ENUM_VALUE_DEFINITION}uu.isDescribable=tU});var lU=w(oT=>{"use strict";m();T();N();Object.defineProperty(oT,"__esModule",{value:!0});oT.buildOperationNodeForField=void 0;var ct=Ae(),sU=Op(),Hv=[],sT=new Map;function oU(e){Hv.push(e)}function rU(){Hv=[]}function iU(){sT=new Map}function aee({schema:e,kind:t,field:n,models:r,ignore:i=[],depthLimit:a,circularReferenceDepth:o,argNames:c,selectedFields:l=!0}){rU(),iU();let d=(0,sU.getRootTypeNames)(e),f=see({schema:e,fieldName:n,kind:t,models:r||[],ignore:i,depthLimit:a||1/0,circularReferenceDepth:o||1,argNames:c,selectedFields:l,rootTypeNames:d});return f.variableDefinitions=[...Hv],rU(),iU(),f}oT.buildOperationNodeForField=aee;function see({schema:e,fieldName:t,kind:n,models:r,ignore:i,depthLimit:a,circularReferenceDepth:o,argNames:c,selectedFields:l,rootTypeNames:d}){let f=(0,sU.getDefinedRootType)(e,n),y=f.getFields()[t],I=`${t}_${n}`;if(y.args)for(let v of y.args){let P=v.name;(!c||c.includes(P))&&oU(uU(v,P))}return{kind:ct.Kind.OPERATION_DEFINITION,operation:n,name:{kind:ct.Kind.NAME,value:I},variableDefinitions:[],selectionSet:{kind:ct.Kind.SELECTION_SET,selections:[cU({type:f,field:y,models:r,firstCall:!0,path:[],ancestors:[],ignore:i,depthLimit:a,circularReferenceDepth:o,schema:e,depth:0,argNames:c,selectedFields:l,rootTypeNames:d})]}}}function Jv({parent:e,type:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:I,rootTypeNames:v}){if(!(typeof I=="boolean"&&f>c)){if((0,ct.isUnionType)(t)){let P=t.getTypes();return{kind:ct.Kind.SELECTION_SET,selections:P.filter(k=>!Yv([...a,k],{depth:l})).map(k=>({kind:ct.Kind.INLINE_FRAGMENT,typeCondition:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:k.name}},selectionSet:Jv({parent:t,type:k,models:n,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:I,rootTypeNames:v})})).filter(k=>{var K,Q;return((Q=(K=k==null?void 0:k.selectionSet)==null?void 0:K.selections)==null?void 0:Q.length)>0})}}if((0,ct.isInterfaceType)(t)){let P=Object.values(d.getTypeMap()).filter(k=>(0,ct.isObjectType)(k)&&k.getInterfaces().includes(t));return{kind:ct.Kind.SELECTION_SET,selections:P.filter(k=>!Yv([...a,k],{depth:l})).map(k=>({kind:ct.Kind.INLINE_FRAGMENT,typeCondition:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:k.name}},selectionSet:Jv({parent:t,type:k,models:n,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:I,rootTypeNames:v})})).filter(k=>{var K,Q;return((Q=(K=k==null?void 0:k.selectionSet)==null?void 0:K.selections)==null?void 0:Q.length)>0})}}if((0,ct.isObjectType)(t)&&!v.has(t.name)){let P=o.includes(t.name)||o.includes(`${e.name}.${i[i.length-1]}`),k=n.includes(t.name);if(!r&&k&&!P)return{kind:ct.Kind.SELECTION_SET,selections:[{kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:"id"}}]};let K=t.getFields();return{kind:ct.Kind.SELECTION_SET,selections:Object.keys(K).filter(Q=>!Yv([...a,(0,ct.getNamedType)(K[Q].type)],{depth:l})).map(Q=>{let se=typeof I=="object"?I[Q]:!0;return se?cU({type:t,field:K[Q],models:n,path:[...i,Q],ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:se,rootTypeNames:v}):null}).filter(Q=>{var se,ie;return Q==null?!1:"selectionSet"in Q?!!((ie=(se=Q.selectionSet)==null?void 0:se.selections)!=null&&ie.length):!0})}}}}function uU(e,t){function n(r){return(0,ct.isListType)(r)?{kind:ct.Kind.LIST_TYPE,type:n(r.ofType)}:(0,ct.isNonNullType)(r)?{kind:ct.Kind.NON_NULL_TYPE,type:n(r.ofType)}:{kind:ct.Kind.NAMED_TYPE,name:{kind:ct.Kind.NAME,value:r.name}}}return{kind:ct.Kind.VARIABLE_DEFINITION,variable:{kind:ct.Kind.VARIABLE,name:{kind:ct.Kind.NAME,value:t||e.name}},type:n(e.type)}}function aU(e,t){return[...t,e].join("_")}function cU({type:e,field:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:I,rootTypeNames:v}){let P=(0,ct.getNamedType)(t.type),k=[],K=!1;if(t.args&&t.args.length&&(k=t.args.map(Te=>{let de=aU(Te.name,i);return y&&!y.includes(de)?((0,ct.isNonNullType)(Te.type)&&(K=!0),null):(r||oU(uU(Te,de)),{kind:ct.Kind.ARGUMENT,name:{kind:ct.Kind.NAME,value:Te.name},value:{kind:ct.Kind.VARIABLE,name:{kind:ct.Kind.NAME,value:aU(Te.name,i)}}})}).filter(Boolean)),K)return null;let Q=[...i,t.name],se=Q.join("."),ie=t.name;return sT.has(se)&&sT.get(se)!==t.type.toString()&&(ie+=t.type.toString().replace("!","NonNull").replace("[","List").replace("]","")),sT.set(se,t.type.toString()),!(0,ct.isScalarType)(P)&&!(0,ct.isEnumType)(P)?Y(x({kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:t.name}},ie!==t.name&&{alias:{kind:ct.Kind.NAME,value:ie}}),{selectionSet:Jv({parent:e,type:P,models:n,firstCall:r,path:Q,ancestors:[...a,e],ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f+1,argNames:y,selectedFields:I,rootTypeNames:v})||void 0,arguments:k}):Y(x({kind:ct.Kind.FIELD,name:{kind:ct.Kind.NAME,value:t.name}},ie!==t.name&&{alias:{kind:ct.Kind.NAME,value:ie}}),{arguments:k})}function Yv(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 pU=w(uT=>{"use strict";m();T();N();Object.defineProperty(uT,"__esModule",{value:!0});uT.DirectiveLocation=void 0;var dU;(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"})(dU||(uT.DirectiveLocation=dU={}))});var uc=w(cT=>{"use strict";m();T();N();Object.defineProperty(cT,"__esModule",{value:!0});cT.MapperKind=void 0;var fU;(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"})(fU||(cT.MapperKind=fU={}))});var zv=w(lT=>{"use strict";m();T();N();Object.defineProperty(lT,"__esModule",{value:!0});lT.getObjectTypeFromTypeMap=void 0;var oee=Ae();function uee(e,t){if(t){let n=e[t.name];if((0,oee.isObjectType)(n))return n}}lT.getObjectTypeFromTypeMap=uee});var Zv=w(Ma=>{"use strict";m();T();N();Object.defineProperty(Ma,"__esModule",{value:!0});Ma.getBuiltInForStub=Ma.isNamedStub=Ma.createStub=Ma.createNamedStub=void 0;var pr=Ae();function Wv(e,t){let n;return t==="object"?n=pr.GraphQLObjectType:t==="interface"?n=pr.GraphQLInterfaceType:n=pr.GraphQLInputObjectType,new n({name:e,fields:{_fake:{type:pr.GraphQLString}}})}Ma.createNamedStub=Wv;function Xv(e,t){switch(e.kind){case pr.Kind.LIST_TYPE:return new pr.GraphQLList(Xv(e.type,t));case pr.Kind.NON_NULL_TYPE:return new pr.GraphQLNonNull(Xv(e.type,t));default:return t==="output"?Wv(e.name.value,"object"):Wv(e.name.value,"input")}}Ma.createStub=Xv;function cee(e){if("getFields"in e){let t=e.getFields();for(let n in t)return t[n].name==="_fake"}return!1}Ma.isNamedStub=cee;function lee(e){switch(e.name){case pr.GraphQLInt.name:return pr.GraphQLInt;case pr.GraphQLFloat.name:return pr.GraphQLFloat;case pr.GraphQLString.name:return pr.GraphQLString;case pr.GraphQLBoolean.name:return pr.GraphQLBoolean;case pr.GraphQLID.name:return pr.GraphQLID;default:return e}}Ma.getBuiltInForStub=lee});var pT=w(dT=>{"use strict";m();T();N();Object.defineProperty(dT,"__esModule",{value:!0});dT.rewireTypes=void 0;var Qn=Ae(),mU=Zv();function dee(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 P=v.name;if(!P.startsWith("__")){if(r[P]!=null){console.warn(`Duplicate schema type name ${P} found; keeping the existing one found in the schema`);continue}r[P]=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,Qn.isSpecifiedDirective)(I))return I;let v=I.toConfig();return v.args=o(v.args),new Qn.GraphQLDirective(v)}function o(I){let v={};for(let P in I){let k=I[P],K=y(k.type);K!=null&&(k.type=K,v[P]=k)}return v}function c(I){if((0,Qn.isObjectType)(I)){let v=I.toConfig(),P=Y(x({},v),{fields:()=>l(v.fields),interfaces:()=>f(v.interfaces)});return new Qn.GraphQLObjectType(P)}else if((0,Qn.isInterfaceType)(I)){let v=I.toConfig(),P=Y(x({},v),{fields:()=>l(v.fields)});return"interfaces"in P&&(P.interfaces=()=>f(v.interfaces)),new Qn.GraphQLInterfaceType(P)}else if((0,Qn.isUnionType)(I)){let v=I.toConfig(),P=Y(x({},v),{types:()=>f(v.types)});return new Qn.GraphQLUnionType(P)}else if((0,Qn.isInputObjectType)(I)){let v=I.toConfig(),P=Y(x({},v),{fields:()=>d(v.fields)});return new Qn.GraphQLInputObjectType(P)}else if((0,Qn.isEnumType)(I)){let v=I.toConfig();return new Qn.GraphQLEnumType(v)}else if((0,Qn.isScalarType)(I)){if((0,Qn.isSpecifiedScalarType)(I))return I;let v=I.toConfig();return new Qn.GraphQLScalarType(v)}throw new Error(`Unexpected schema type: ${I}`)}function l(I){let v={};for(let P in I){let k=I[P],K=y(k.type);K!=null&&k.args&&(k.type=K,k.args=o(k.args),v[P]=k)}return v}function d(I){let v={};for(let P in I){let k=I[P],K=y(k.type);K!=null&&(k.type=K,v[P]=k)}return v}function f(I){let v=[];for(let P of I){let k=y(P);k!=null&&v.push(k)}return v}function y(I){if((0,Qn.isListType)(I)){let v=y(I.ofType);return v!=null?new Qn.GraphQLList(v):null}else if((0,Qn.isNonNullType)(I)){let v=y(I.ofType);return v!=null?new Qn.GraphQLNonNull(v):null}else if((0,Qn.isNamedType)(I)){let v=n[I.name];return v===void 0&&(v=(0,mU.isNamedStub)(I)?(0,mU.getBuiltInForStub)(I):c(I),r[v.name]=n[I.name]=v),v!=null?r[v.name]:null}return null}}dT.rewireTypes=dee});var eS=w(xa=>{"use strict";m();T();N();Object.defineProperty(xa,"__esModule",{value:!0});xa.parseInputValueLiteral=xa.parseInputValue=xa.serializeInputValue=xa.transformInputValue=void 0;var fT=Ae(),pee=gp();function Dl(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,pee.asArray)(t).map(a=>Dl(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]=Dl(l.type,t[c],n,r))}return r!=null?r(i,o):o}}xa.transformInputValue=Dl;function fee(e,t){return Dl(e,t,(n,r)=>{try{return n.serialize(r)}catch(i){return r}})}xa.serializeInputValue=fee;function mee(e,t){return Dl(e,t,(n,r)=>{try{return n.parseValue(r)}catch(i){return r}})}xa.parseInputValue=mee;function Nee(e,t){return Dl(e,t,(n,r)=>n.parseLiteral(r,{}))}xa.parseInputValueLiteral=Nee});var Rl=w(Al=>{"use strict";m();T();N();Object.defineProperty(Al,"__esModule",{value:!0});Al.correctASTNodes=Al.mapSchema=void 0;var it=Ae(),bl=zv(),bt=uc(),Tee=pT(),NU=eS();function Eee(e,t={}){let n=hU(EU(tS(TU(hee(tS(TU(e.getTypeMap(),e,NU.serializeInputValue),e,t,c=>(0,it.isLeafType)(c)),e,t),e,NU.parseInputValue),e,t,c=>!(0,it.isLeafType)(c)),e,t),e,t),r=e.getDirectives(),i=yee(r,e,t),{typeMap:a,directives:o}=(0,Tee.rewireTypes)(n,i);return new it.GraphQLSchema(Y(x({},e.toConfig()),{query:(0,bl.getObjectTypeFromTypeMap)(a,(0,bl.getObjectTypeFromTypeMap)(n,e.getQueryType())),mutation:(0,bl.getObjectTypeFromTypeMap)(a,(0,bl.getObjectTypeFromTypeMap)(n,e.getMutationType())),subscription:(0,bl.getObjectTypeFromTypeMap)(a,(0,bl.getObjectTypeFromTypeMap)(n,e.getSubscriptionType())),types:Object.values(a),directives:o}))}Al.mapSchema=Eee;function tS(e,t,n,r=()=>!0){let i={};for(let a in e)if(!a.startsWith("__")){let o=e[a];if(o==null||!r(o)){i[a]=o;continue}let c=gee(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 hee(e,t,n){let r=Dee(n);return r?tS(e,t,{[bt.MapperKind.ENUM_TYPE]:i=>{let a=i.toConfig(),o=a.values,c={};for(let l in o){let d=o[l],f=r(d,i.name,t,l);if(f===void 0)c[l]=d;else if(Array.isArray(f)){let[y,I]=f;c[y]=I===void 0?d:I}else f!==null&&(c[l]=f)}return Pp(new it.GraphQLEnumType(Y(x({},a),{values:c})))}},i=>(0,it.isEnumType)(i)):e}function TU(e,t,n){let r=hU(e,t,{[bt.MapperKind.ARGUMENT]:i=>{if(i.defaultValue===void 0)return i;let a=mT(e,i.type);if(a!=null)return Y(x({},i),{defaultValue:n(a,i.defaultValue)})}});return EU(r,t,{[bt.MapperKind.INPUT_OBJECT_FIELD]:i=>{if(i.defaultValue===void 0)return i;let a=mT(r,i.type);if(a!=null)return Y(x({},i),{defaultValue:n(a,i.defaultValue)})}})}function mT(e,t){if((0,it.isListType)(t)){let n=mT(e,t.ofType);return n!=null?new it.GraphQLList(n):null}else if((0,it.isNonNullType)(t)){let n=mT(e,t.ofType);return n!=null?new it.GraphQLNonNull(n):null}else if((0,it.isNamedType)(t)){let n=e[t.name];return n!=null?n:null}return null}function EU(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,it.isObjectType)(a)&&!(0,it.isInterfaceType)(a)&&!(0,it.isInputObjectType)(a)){r[i]=a;continue}let o=vee(t,n,i);if(o==null){r[i]=a;continue}let c=a.toConfig(),l=c.fields,d={};for(let f in l){let y=l[f],I=o(y,f,i,t);if(I===void 0)d[f]=y;else if(Array.isArray(I)){let[v,P]=I;P.astNode!=null&&(P.astNode=Y(x({},P.astNode),{name:Y(x({},P.astNode.name),{value:v})})),d[v]=P===void 0?y:P}else I!==null&&(d[f]=I)}(0,it.isObjectType)(a)?r[i]=Pp(new it.GraphQLObjectType(Y(x({},c),{fields:d}))):(0,it.isInterfaceType)(a)?r[i]=Pp(new it.GraphQLInterfaceType(Y(x({},c),{fields:d}))):r[i]=Pp(new it.GraphQLInputObjectType(Y(x({},c),{fields:d})))}return r}function hU(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,it.isObjectType)(a)&&!(0,it.isInterfaceType)(a)){r[i]=a;continue}let o=See(n);if(o==null){r[i]=a;continue}let c=a.toConfig(),l=c.fields,d={};for(let f in l){let y=l[f],I=y.args;if(I==null){d[f]=y;continue}let v=Object.keys(I);if(!v.length){d[f]=y;continue}let P={};for(let k of v){let K=I[k],Q=o(K,f,i,t);if(Q===void 0)P[k]=K;else if(Array.isArray(Q)){let[se,ie]=Q;P[se]=ie}else Q!==null&&(P[k]=Q)}d[f]=Y(x({},y),{args:P})}(0,it.isObjectType)(a)?r[i]=new it.GraphQLObjectType(Y(x({},c),{fields:d})):(0,it.isInterfaceType)(a)?r[i]=new it.GraphQLInterfaceType(Y(x({},c),{fields:d})):r[i]=new it.GraphQLInputObjectType(Y(x({},c),{fields:d}))}return r}function yee(e,t,n){let r=Oee(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 Iee(e,t){var i,a,o;let n=e.getType(t),r=[bt.MapperKind.TYPE];return(0,it.isObjectType)(n)?(r.push(bt.MapperKind.COMPOSITE_TYPE,bt.MapperKind.OBJECT_TYPE),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(bt.MapperKind.ROOT_OBJECT,bt.MapperKind.QUERY):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(bt.MapperKind.ROOT_OBJECT,bt.MapperKind.MUTATION):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(bt.MapperKind.ROOT_OBJECT,bt.MapperKind.SUBSCRIPTION)):(0,it.isInputObjectType)(n)?r.push(bt.MapperKind.INPUT_OBJECT_TYPE):(0,it.isInterfaceType)(n)?r.push(bt.MapperKind.COMPOSITE_TYPE,bt.MapperKind.ABSTRACT_TYPE,bt.MapperKind.INTERFACE_TYPE):(0,it.isUnionType)(n)?r.push(bt.MapperKind.COMPOSITE_TYPE,bt.MapperKind.ABSTRACT_TYPE,bt.MapperKind.UNION_TYPE):(0,it.isEnumType)(n)?r.push(bt.MapperKind.ENUM_TYPE):(0,it.isScalarType)(n)&&r.push(bt.MapperKind.SCALAR_TYPE),r}function gee(e,t,n){let r=Iee(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function _ee(e,t){var i,a,o;let n=e.getType(t),r=[bt.MapperKind.FIELD];return(0,it.isObjectType)(n)?(r.push(bt.MapperKind.COMPOSITE_FIELD,bt.MapperKind.OBJECT_FIELD),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(bt.MapperKind.ROOT_FIELD,bt.MapperKind.QUERY_ROOT_FIELD):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(bt.MapperKind.ROOT_FIELD,bt.MapperKind.MUTATION_ROOT_FIELD):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(bt.MapperKind.ROOT_FIELD,bt.MapperKind.SUBSCRIPTION_ROOT_FIELD)):(0,it.isInterfaceType)(n)?r.push(bt.MapperKind.COMPOSITE_FIELD,bt.MapperKind.INTERFACE_FIELD):(0,it.isInputObjectType)(n)&&r.push(bt.MapperKind.INPUT_OBJECT_FIELD),r}function vee(e,t,n){let r=_ee(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function See(e){let t=e[bt.MapperKind.ARGUMENT];return t!=null?t:null}function Oee(e){let t=e[bt.MapperKind.DIRECTIVE];return t!=null?t:null}function Dee(e){let t=e[bt.MapperKind.ENUM_VALUE];return t!=null?t:null}function Pp(e){if((0,it.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=Y(x({},t.astNode),{kind:it.Kind.OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Y(x({},n),{kind:it.Kind.OBJECT_TYPE_EXTENSION,fields:void 0}))),new it.GraphQLObjectType(t)}else if((0,it.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=Y(x({},t.astNode),{kind:it.Kind.INTERFACE_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Y(x({},n),{kind:it.Kind.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new it.GraphQLInterfaceType(t)}else if((0,it.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=Y(x({},t.astNode),{kind:it.Kind.INPUT_OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Y(x({},n),{kind:it.Kind.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new it.GraphQLInputObjectType(t)}else if((0,it.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=Y(x({},t.astNode),{values:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Y(x({},n),{values:void 0}))),new it.GraphQLEnumType(t)}else return e}Al.correctASTNodes=Pp});var yU=w(TT=>{"use strict";m();T();N();Object.defineProperty(TT,"__esModule",{value:!0});TT.filterSchema=void 0;var NT=Ae(),Is=uc(),bee=Rl();function Aee({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}){return(0,bee.mapSchema)(e,{[Is.MapperKind.QUERY]:d=>nS(d,"Query",r,c),[Is.MapperKind.MUTATION]:d=>nS(d,"Mutation",r,c),[Is.MapperKind.SUBSCRIPTION]:d=>nS(d,"Subscription",r,c),[Is.MapperKind.OBJECT_TYPE]:d=>t(d.name,d)?rS(NT.GraphQLObjectType,d,i||n,c):null,[Is.MapperKind.INTERFACE_TYPE]:d=>t(d.name,d)?rS(NT.GraphQLInterfaceType,d,a||n,c):null,[Is.MapperKind.INPUT_OBJECT_TYPE]:d=>t(d.name,d)?rS(NT.GraphQLInputObjectType,d,o||n):null,[Is.MapperKind.UNION_TYPE]:d=>t(d.name,d)?void 0:null,[Is.MapperKind.ENUM_TYPE]:d=>t(d.name,d)?void 0:null,[Is.MapperKind.SCALAR_TYPE]:d=>t(d.name,d)?void 0:null})}TT.filterSchema=Aee;function nS(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(t,a,c,o.args[c])||delete o.args[c]}return new NT.GraphQLObjectType(i)}return e}function rS(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 gU=w(Fl=>{"use strict";m();T();N();Object.defineProperty(Fl,"__esModule",{value:!0});Fl.healTypes=Fl.healSchema=void 0;var qa=Ae();function Ree(e){return IU(e.getTypeMap(),e.getDirectives()),e}Fl.healSchema=Ree;function IU(e,t){let n=Object.create(null);for(let d in e){let f=e[d];if(f==null||d.startsWith("__"))continue;let y=f.name;if(!y.startsWith("__")){if(n[y]!=null){console.warn(`Duplicate schema type name ${y} found; keeping the existing one found in the schema`);continue}n[y]=f}}for(let d in n){let f=n[d];e[d]=f}for(let d of t)d.args=d.args.filter(f=>(f.type=l(f.type),f.type!==null));for(let d in e){let f=e[d];!d.startsWith("__")&&d in n&&f!=null&&r(f)}for(let d in e)!d.startsWith("__")&&!(d in n)&&delete e[d];function r(d){if((0,qa.isObjectType)(d)){i(d),a(d);return}else if((0,qa.isInterfaceType)(d)){i(d),"getInterfaces"in d&&a(d);return}else if((0,qa.isUnionType)(d)){c(d);return}else if((0,qa.isInputObjectType)(d)){o(d);return}else if((0,qa.isLeafType)(d))return;throw new Error(`Unexpected schema type: ${d}`)}function i(d){let f=d.getFields();for(let[y,I]of Object.entries(f))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 f[y]}function a(d){if("getInterfaces"in d){let f=d.getInterfaces();f.push(...f.splice(0).map(y=>l(y)).filter(Boolean))}}function o(d){let f=d.getFields();for(let[y,I]of Object.entries(f))I.type=l(I.type),I.type===null&&delete f[y]}function c(d){let f=d.getTypes();f.push(...f.splice(0).map(y=>l(y)).filter(Boolean))}function l(d){if((0,qa.isListType)(d)){let f=l(d.ofType);return f!=null?new qa.GraphQLList(f):null}else if((0,qa.isNonNullType)(d)){let f=l(d.ofType);return f!=null?new qa.GraphQLNonNull(f):null}else if((0,qa.isNamedType)(d)){let f=e[d.name];if(f&&d!==f)return f}return d}}Fl.healTypes=IU});var _U=w(ET=>{"use strict";m();T();N();Object.defineProperty(ET,"__esModule",{value:!0});ET.getResolversFromSchema=void 0;var cc=Ae();function Fee(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,cc.isScalarType)(c)){if(!(0,cc.isSpecifiedScalarType)(c)){let l=c.toConfig();delete l.astNode,n[o]=new cc.GraphQLScalarType(l)}}else if((0,cc.isEnumType)(c)){n[o]={};let l=c.getValues();for(let d of l)n[o][d.name]=d.value}else if((0,cc.isInterfaceType)(c))c.resolveType!=null&&(n[o]={__resolveType:c.resolveType});else if((0,cc.isUnionType)(c))c.resolveType!=null&&(n[o]={__resolveType:c.resolveType});else if((0,cc.isObjectType)(c)){n[o]={},c.isTypeOf!=null&&(n[o].__isTypeOf=c.isTypeOf);let l=c.getFields();for(let d in l){let f=l[d];if(f.subscribe!=null&&(n[o][d]=n[o][d]||{},n[o][d].subscribe=f.subscribe),f.resolve!=null&&((i=f.resolve)==null?void 0:i.name)!=="defaultFieldResolver"){switch((a=f.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=f.resolve}}}}return n}ET.getResolversFromSchema=Fee});var SU=w(hT=>{"use strict";m();T();N();Object.defineProperty(hT,"__esModule",{value:!0});hT.forEachField=void 0;var vU=Ae();function Pee(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,vU.getNamedType)(i).name.startsWith("__")&&(0,vU.isObjectType)(i)){let a=i.getFields();for(let o in a){let c=a[o];t(c,r,o)}}}}hT.forEachField=Pee});var OU=w(yT=>{"use strict";m();T();N();Object.defineProperty(yT,"__esModule",{value:!0});yT.forEachDefaultValue=void 0;var iS=Ae();function wee(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,iS.getNamedType)(i).name.startsWith("__")){if((0,iS.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,iS.isInputObjectType)(i)){let a=i.getFields();for(let o in a){let c=a[o];c.defaultValue=t(c.type,c.defaultValue)}}}}}yT.forEachDefaultValue=wee});var oS=w(IT=>{"use strict";m();T();N();Object.defineProperty(IT,"__esModule",{value:!0});IT.addTypes=void 0;var aS=Ae(),sS=zv(),Lee=pT();function Cee(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,aS.isNamedType)(c)?r[c.name]=c:(0,aS.isDirective)(c)&&(i[c.name]=c);let{typeMap:a,directives:o}=(0,Lee.rewireTypes)(r,Object.values(i));return new aS.GraphQLSchema(Y(x({},n),{query:(0,sS.getObjectTypeFromTypeMap)(a,e.getQueryType()),mutation:(0,sS.getObjectTypeFromTypeMap)(a,e.getMutationType()),subscription:(0,sS.getObjectTypeFromTypeMap)(a,e.getSubscriptionType()),types:Object.values(a),directives:o}))}IT.addTypes=Cee});var bU=w(_T=>{"use strict";m();T();N();Object.defineProperty(_T,"__esModule",{value:!0});_T.pruneSchema=void 0;var er=Ae(),Bee=Bv(),Uee=uc(),kee=Rl(),Mee=Op();function xee(e,t={}){let{skipEmptyCompositeTypePruning:n,skipEmptyUnionPruning:r,skipPruning:i,skipUnimplementedInterfacesPruning:a,skipUnusedTypesPruning:o}=t,c=[],l=e;do{let d=qee(l);if(i){let f=[];for(let y in l.getTypeMap()){if(y.startsWith("__"))continue;let I=l.getType(y);I&&i(I)&&f.push(y)}d=DU(f,l,d)}c=[],l=(0,kee.mapSchema)(l,{[Uee.MapperKind.TYPE]:f=>!d.has(f.name)&&!(0,er.isSpecifiedScalarType)(f)?((0,er.isUnionType)(f)||(0,er.isInputObjectType)(f)||(0,er.isInterfaceType)(f)||(0,er.isObjectType)(f)||(0,er.isScalarType)(f))&&(o||(0,er.isUnionType)(f)&&r&&!Object.keys(f.getTypes()).length||((0,er.isInputObjectType)(f)||(0,er.isInterfaceType)(f)||(0,er.isObjectType)(f))&&n&&!Object.keys(f.getFields()).length||(0,er.isInterfaceType)(f)&&a)?f:(c.push(f.name),d.delete(f.name),null):f})}while(c.length);return l}_T.pruneSchema=xee;function qee(e){let t=[];for(let n of(0,Mee.getRootTypes)(e))t.push(n.name);return DU(t,e)}function DU(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,Bee.getImplementingTypes)(a.name,t)),r[i]=!1),(0,er.isEnumType)(a)&&e.push(...a.getValues().flatMap(o=>o.astNode?gT(t,o.astNode):[])),"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(f=>{let y=[(0,er.getNamedType)(f.type).name];return f.astNode&&y.push(...gT(t,f.astNode)),y}));let d=(0,er.getNamedType)(l.type);e.push(d.name),l.astNode&&e.push(...gT(t,l.astNode)),(0,er.isInterfaceType)(d)&&!(d.name in r)&&(r[d.name]=!0)}}a.astNode&&e.push(...gT(t,a.astNode)),n.add(i)}}return n}function gT(e,t){var n;return((n=t.directives)!=null?n:[]).flatMap(r=>{var i,a;return(a=(i=e.getDirective(r.name.value))==null?void 0:i.args.map(o=>(0,er.getNamedType)(o.type).name))!=null?a:[]})}});var RU=w(vT=>{"use strict";m();T();N();Object.defineProperty(vT,"__esModule",{value:!0});vT.mergeDeep=void 0;var Vee=gp();function AU(e,t=!1,n=!1){let r=e[0]||{},i={};t&&Object.setPrototypeOf(i,Object.create(Object.getPrototypeOf(r)));for(let a of e)if(uS(r)&&uS(a)){if(t){let o=Object.getPrototypeOf(i),c=Object.getPrototypeOf(a);if(c)for(let l of Object.getOwnPropertyNames(c)){let d=Object.getOwnPropertyDescriptor(c,l);(0,Vee.isSome)(d)&&Object.defineProperty(o,l,d)}}for(let o in a)uS(a[o])?o in i?i[o]=AU([i[o],a[o]],t,n):Object.assign(i,{[o]:a[o]}):n&&Array.isArray(i[o])?Array.isArray(a[o])?i[o].push(...a[o]):i[o].push(a[o]):Object.assign(i,{[o]:a[o]})}else if(n&&Array.isArray(r))Array.isArray(a)?r.push(...a):r.push(a);else if(n&&Array.isArray(a))return[r,...a];return i}vT.mergeDeep=AU;function uS(e){return e&&typeof e=="object"&&!Array.isArray(e)}});var FU=w(ST=>{"use strict";m();T();N();Object.defineProperty(ST,"__esModule",{value:!0});ST.parseSelectionSet=void 0;var jee=Ae();function Kee(e,t){return(0,jee.parse)(e,t).definitions[0].selectionSet}ST.parseSelectionSet=Kee});var PU=w(OT=>{"use strict";m();T();N();Object.defineProperty(OT,"__esModule",{value:!0});OT.getResponseKeyFromInfo=void 0;function Gee(e){return e.fieldNodes[0].alias!=null?e.fieldNodes[0].alias.value:e.fieldName}OT.getResponseKeyFromInfo=Gee});var wU=w(Va=>{"use strict";m();T();N();Object.defineProperty(Va,"__esModule",{value:!0});Va.modifyObjectFields=Va.selectObjectFields=Va.removeObjectFields=Va.appendObjectFields=void 0;var DT=Ae(),$ee=oS(),bT=uc(),lc=Rl();function Qee(e,t,n){return e.getType(t)==null?(0,$ee.addTypes)(e,[new DT.GraphQLObjectType({name:t,fields:n})]):(0,lc.mapSchema)(e,{[bT.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,lc.correctASTNodes)(new DT.GraphQLObjectType(Y(x({},i),{fields:o})))}}})}Va.appendObjectFields=Qee;function Yee(e,t,n){let r={};return[(0,lc.mapSchema)(e,{[bT.MapperKind.OBJECT_TYPE]:a=>{if(a.name===t){let o=a.toConfig(),c=o.fields,l={};for(let d in c){let f=c[d];n(d,f)?r[d]=f:l[d]=f}return(0,lc.correctASTNodes)(new DT.GraphQLObjectType(Y(x({},o),{fields:l})))}}}),r]}Va.removeObjectFields=Yee;function Jee(e,t,n){let r={};return(0,lc.mapSchema)(e,{[bT.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}Va.selectObjectFields=Jee;function Hee(e,t,n,r){let i={};return[(0,lc.mapSchema)(e,{[bT.MapperKind.OBJECT_TYPE]:o=>{if(o.name===t){let c=o.toConfig(),l=c.fields,d={};for(let f in l){let y=l[f];n(f,y)?i[f]=y:d[f]=y}for(let f in r){let y=r[f];d[f]=y}return(0,lc.correctASTNodes)(new DT.GraphQLObjectType(Y(x({},c),{fields:d})))}}}),i]}Va.modifyObjectFields=Hee});var LU=w(AT=>{"use strict";m();T();N();Object.defineProperty(AT,"__esModule",{value:!0});AT.renameType=void 0;var qi=Ae();function zee(e,t){if((0,qi.isObjectType)(e))return new qi.GraphQLObjectType(Y(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Y(x({},e.astNode),{name:Y(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Y(x({},n),{name:Y(x({},n.name),{value:t})}))}));if((0,qi.isInterfaceType)(e))return new qi.GraphQLInterfaceType(Y(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Y(x({},e.astNode),{name:Y(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Y(x({},n),{name:Y(x({},n.name),{value:t})}))}));if((0,qi.isUnionType)(e))return new qi.GraphQLUnionType(Y(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Y(x({},e.astNode),{name:Y(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Y(x({},n),{name:Y(x({},n.name),{value:t})}))}));if((0,qi.isInputObjectType)(e))return new qi.GraphQLInputObjectType(Y(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Y(x({},e.astNode),{name:Y(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Y(x({},n),{name:Y(x({},n.name),{value:t})}))}));if((0,qi.isEnumType)(e))return new qi.GraphQLEnumType(Y(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Y(x({},e.astNode),{name:Y(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Y(x({},n),{name:Y(x({},n.name),{value:t})}))}));if((0,qi.isScalarType)(e))return new qi.GraphQLScalarType(Y(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Y(x({},e.astNode),{name:Y(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Y(x({},n),{name:Y(x({},n.name),{value:t})}))}));throw new Error(`Unknown type ${e}.`)}AT.renameType=zee});var UU=w(RT=>{"use strict";m();T();N();Object.defineProperty(RT,"__esModule",{value:!0});RT.mapAsyncIterator=void 0;var Wee=vp();function Xee(e,t,n,r){let i,a,o;r&&(o=d=>{let f=r();return(0,Wee.isPromise)(f)?f.then(()=>d):d}),typeof e.return=="function"&&(i=e.return,a=d=>{let f=()=>Promise.reject(d);return i.call(e).then(f,f)});function c(d){return d.done?o?o(d):d:CU(d.value,t).then(BU,a)}let l;if(n){let d=n;l=f=>CU(f,d).then(BU,a)}return{next(){return e.next().then(c,l)},return(){let d=i?i.call(e).then(c,l):Promise.resolve({value:void 0,done:!0});return o?d.then(o):d},throw(d){return typeof e.throw=="function"?e.throw(d).then(c,l):Promise.reject(d).catch(a)},[Symbol.asyncIterator](){return this}}}RT.mapAsyncIterator=Xee;function CU(e,t){return new Promise(n=>n(t(e)))}function BU(e){return{value:e,done:!1}}});var kU=w(Pl=>{"use strict";m();T();N();Object.defineProperty(Pl,"__esModule",{value:!0});Pl.createVariableNameGenerator=Pl.updateArgument=void 0;var dc=Ae(),Zee=kv();function ete(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,Zee.astFromType)(a)},o!==void 0){n[i]=o;return}i in n&&delete n[i]}Pl.updateArgument=ete;function tte(e){let t=0;return n=>{let r;do r=`_v${(t++).toString()}_${n}`;while(r in e);return r}}Pl.createVariableNameGenerator=tte});var MU=w(FT=>{"use strict";m();T();N();Object.defineProperty(FT,"__esModule",{value:!0});FT.implementsAbstractType=void 0;var cS=Ae();function nte(e,t,n){return n==null||t==null?!1:t===n?!0:(0,cS.isCompositeType)(t)&&(0,cS.isCompositeType)(n)?(0,cS.doTypesOverlap)(e,t,n):!1}FT.implementsAbstractType=nte});var xU=w(PT=>{"use strict";m();T();N();Object.defineProperty(PT,"__esModule",{value:!0});PT.observableToAsyncIterable=void 0;function rte(e){let t=[],n=[],r=!0,i=f=>{t.length!==0?t.shift()({value:f,done:!1}):n.push({value:f,done:!1})},a=f=>{t.length!==0?t.shift()({value:{errors:[f]},done:!1}):n.push({value:{errors:[f]},done:!1})},o=()=>{t.length!==0?t.shift()({done:!0}):n.push({done:!0})},c=()=>new Promise(f=>{if(n.length!==0){let y=n.shift();f(y)}else t.push(f)}),l=e.subscribe({next(f){i(f)},error(f){a(f)},complete(){o()}}),d=()=>{if(r){r=!1,l.unsubscribe();for(let f of t)f({value:void 0,done:!0});t.length=0,n.length=0}};return{next(){return r?c():this.return()},return(){return d(),Promise.resolve({value:void 0,done:!0})},throw(f){return d(),Promise.reject(f)},[Symbol.asyncIterator](){return this}}}PT.observableToAsyncIterable=rte});var qU=w(wT=>{"use strict";m();T();N();Object.defineProperty(wT,"__esModule",{value:!0});wT.AccumulatorMap=void 0;var lS=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)}};wT.AccumulatorMap=lS});var dS=w(wl=>{"use strict";m();T();N();Object.defineProperty(wl,"__esModule",{value:!0});wl.GraphQLStreamDirective=wl.GraphQLDeferDirective=void 0;var Vi=Ae();wl.GraphQLDeferDirective=new Vi.GraphQLDirective({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[Vi.DirectiveLocation.FRAGMENT_SPREAD,Vi.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Vi.GraphQLNonNull(Vi.GraphQLBoolean),description:"Deferred when true or undefined.",defaultValue:!0},label:{type:Vi.GraphQLString,description:"Unique name"}}});wl.GraphQLStreamDirective=new Vi.GraphQLDirective({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[Vi.DirectiveLocation.FIELD],args:{if:{type:new Vi.GraphQLNonNull(Vi.GraphQLBoolean),description:"Stream when true or undefined.",defaultValue:!0},label:{type:Vi.GraphQLString,description:"Unique name"},initialCount:{defaultValue:0,type:Vi.GraphQLInt,description:"Number of items to return immediately"}}})});var mS=w(Wr=>{"use strict";m();T();N();Object.defineProperty(Wr,"__esModule",{value:!0});Wr.collectSubFields=Wr.getDeferValues=Wr.getFieldEntryKey=Wr.doesFragmentConditionMatch=Wr.shouldIncludeNode=Wr.collectFields=void 0;var ja=Ae(),CT=qU(),ite=dS(),ate=vl();function Ll(e,t,n,r,i,a,o,c){for(let l of i.selections)switch(l.kind){case ja.Kind.FIELD:{if(!LT(n,l))continue;a.add(VU(l),l);break}case ja.Kind.INLINE_FRAGMENT:{if(!LT(n,l)||!pS(e,l,r))continue;let d=fS(n,l);if(d){let f=new CT.AccumulatorMap;Ll(e,t,n,r,l.selectionSet,f,o,c),o.push({label:d.label,fields:f})}else Ll(e,t,n,r,l.selectionSet,a,o,c);break}case ja.Kind.FRAGMENT_SPREAD:{let d=l.name.value;if(!LT(n,l))continue;let f=fS(n,l);if(c.has(d)&&!f)continue;let y=t[d];if(!y||!pS(e,y,r))continue;if(f||c.add(d),f){let I=new CT.AccumulatorMap;Ll(e,t,n,r,y.selectionSet,I,o,c),o.push({label:f.label,fields:I})}else Ll(e,t,n,r,y.selectionSet,a,o,c);break}}}function ste(e,t,n,r,i){let a=new CT.AccumulatorMap,o=[];return Ll(e,t,n,r,i,a,o,new Set),{fields:a,patches:o}}Wr.collectFields=ste;function LT(e,t){let n=(0,ja.getDirectiveValues)(ja.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,ja.getDirectiveValues)(ja.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}Wr.shouldIncludeNode=LT;function pS(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,ja.typeFromAST)(e,r);return i===n?!0:(0,ja.isAbstractType)(i)?e.getPossibleTypes(i).includes(n):!1}Wr.doesFragmentConditionMatch=pS;function VU(e){return e.alias?e.alias.value:e.name.value}Wr.getFieldEntryKey=VU;function fS(e,t){let n=(0,ja.getDirectiveValues)(ite.GraphQLDeferDirective,t,e);if(n&&n.if!==!1)return{label:typeof n.label=="string"?n.label:void 0}}Wr.getDeferValues=fS;Wr.collectSubFields=(0,ate.memoize5)(function(t,n,r,i,a){let o=new CT.AccumulatorMap,c=new Set,l=[],d={fields:o,patches:l};for(let f of a)f.selectionSet&&Ll(t,n,r,i,f.selectionSet,o,l,c);return d})});var NS=w(Cl=>{"use strict";m();T();N();Object.defineProperty(Cl,"__esModule",{value:!0});Cl.getOperationASTFromRequest=Cl.getOperationASTFromDocument=void 0;var ote=Ae(),ute=vl();function jU(e,t){let n=(0,ote.getOperationAST)(e,t);if(!n)throw new Error(`Cannot infer operation ${t||""}`);return n}Cl.getOperationASTFromDocument=jU;Cl.getOperationASTFromRequest=(0,ute.memoize1)(function(t){return jU(t.document,t.operationName)})});var $U=w(lu=>{"use strict";m();T();N();Object.defineProperty(lu,"__esModule",{value:!0});lu.visitResult=lu.visitErrors=lu.visitData=void 0;var cu=Ae(),TS=mS(),cte=NS();function ES(e,t,n){if(Array.isArray(e))return e.map(r=>ES(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:ES(a,t,n)})}return n!=null?n(r):r}return e}lu.visitData=ES;function lte(e,t){return e.map(n=>t(n))}lu.visitErrors=lte;function dte(e,t,n,r,i){let a=t.document.definitions.reduce((I,v)=>(v.kind===cu.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,f=d!=null&&i!=null,y=(0,cte.getOperationASTFromRequest)(t);return l!=null&&y!=null&&(e.data=mte(l,y,n,a,o,r,f?d:void 0,c)),d!=null&&i&&(e.errors=pte(d,i,c)),e}lu.visitResult=dte;function pte(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,f)=>{let y=f.type.name,I=t[y];if(I==null)return d;let v=I[f.fieldName];return v==null?d:v(d,f.pathIndex)},o);return a&&i.has(o)?a(l):l})}function fte(e,t){switch(t.operation){case"query":return e.getQueryType();case"mutation":return e.getMutationType();case"subscription":return e.getSubscriptionType()}}function mte(e,t,n,r,i,a,o,c){let l=fte(n,t),{fields:d}=(0,TS.collectFields)(n,r,i,l,t.selectionSet);return hS(e,l,d,n,r,i,a,0,o,c)}function hS(e,t,n,r,i,a,o,c,l,d){var se;let f=t.getFields(),y=o==null?void 0:o[t.name],I=y==null?void 0:y.__enter,v=I!=null?I(e):e,P,k=null;if(l!=null){P=Tte(l,c),k=P.errorMap;for(let ie of P.unpathedErrors)d.unpathedErrors.add(ie)}for(let[ie,Te]of n){let de=Te[0].name.value,Re=(se=f[de])==null?void 0:se.type;if(Re==null)switch(de){case"__typename":Re=cu.TypeNameMetaFieldDef.type;break;case"__schema":Re=cu.SchemaMetaFieldDef.type;break;case"__type":Re=cu.TypeMetaFieldDef.type;break}let xe=c+1,tt;k&&(tt=k[ie],tt!=null&&delete k[ie],Ete(t,de,xe,tt,d));let ee=GU(e[ie],Re,Te,r,i,a,o,xe,tt,d);KU(v,ie,ee,y,de)}let K=v.__typename;if(K!=null&&KU(v,"__typename",K,y,"__typename"),k)for(let ie in k){let Te=k[ie];for(let de of Te)d.unpathedErrors.add(de)}let Q=y==null?void 0:y.__leave;return Q!=null?Q(v):v}function KU(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 Nte(e,t,n,r,i,a,o,c,l,d){return e.map(f=>GU(f,t,n,r,i,a,o,c+1,l,d))}function GU(e,t,n,r,i,a,o,c,l=[],d){if(e==null)return e;let f=(0,cu.getNullableType)(t);if((0,cu.isListType)(f))return Nte(e,f.ofType,n,r,i,a,o,c,l,d);if((0,cu.isAbstractType)(f)){let v=r.getType(e.__typename),{fields:P}=(0,TS.collectSubFields)(r,i,a,v,n);return hS(e,v,P,r,i,a,o,c,l,d)}else if((0,cu.isObjectType)(f)){let{fields:v}=(0,TS.collectSubFields)(r,i,a,f,n);return hS(e,f,v,r,i,a,o,c,l,d)}let y=o==null?void 0:o[f.name];if(y==null)return e;let I=y(e);return I===void 0?e:I}function Tte(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 Ete(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 QU=w(BT=>{"use strict";m();T();N();Object.defineProperty(BT,"__esModule",{value:!0});BT.valueMatchesCriteria=void 0;function yS(e,t){return e==null?e===t:Array.isArray(e)?Array.isArray(t)&&e.every((n,r)=>yS(n,t[r])):typeof e=="object"?typeof t=="object"&&t&&Object.keys(t).every(n=>yS(e[n],t[n])):t instanceof RegExp?t.test(e):e===t}BT.valueMatchesCriteria=yS});var YU=w(UT=>{"use strict";m();T();N();Object.defineProperty(UT,"__esModule",{value:!0});UT.isAsyncIterable=void 0;function hte(e){return(e==null?void 0:e[Symbol.asyncIterator])!=null}UT.isAsyncIterable=hte});var JU=w(kT=>{"use strict";m();T();N();Object.defineProperty(kT,"__esModule",{value:!0});kT.isDocumentNode=void 0;var yte=Ae();function Ite(e){return e&&typeof e=="object"&&"kind"in e&&e.kind===yte.Kind.DOCUMENT}kT.isDocumentNode=Ite});var HU=w(()=>{"use strict";m();T();N()});var ZU=w(du=>{"use strict";m();T();N();Object.defineProperty(du,"__esModule",{value:!0});du.withCancel=du.getAsyncIterableWithCancel=du.getAsyncIteratorWithCancel=void 0;var gte=vl();function _te(e){return Oi(this,null,function*(){return{value:e,done:!0}})}var zU=(0,gte.memoize2)(function(t,n){return function(...i){return Reflect.apply(n,t,i)}});function WU(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||_te;return function(l){return Oi(this,null,function*(){let d=yield t(l);return Reflect.apply(o,n,[d])})}}else if(typeof a=="function")return zU(n,a);return a}})}du.getAsyncIteratorWithCancel=WU;function XU(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 WU(c,t)}:typeof a=="function"?zU(n,a):a}})}du.getAsyncIterableWithCancel=XU;du.withCancel=XU});var ek=w(MT=>{"use strict";m();T();N();Object.defineProperty(MT,"__esModule",{value:!0});MT.fixSchemaAst=void 0;var vte=Ae(),Ste=Gv();function Ote(e,t){let n=(0,Ste.getDocumentNodeFromSchema)(e);return(0,vte.buildASTSchema)(n,x({},t||{}))}function Dte(e,t){let n;return(!e.astNode||!e.extensionASTNodes)&&(n=Ote(e,t)),!e.astNode&&(n!=null&&n.astNode)&&(e.astNode=n.astNode),!e.extensionASTNodes&&(n!=null&&n.astNode)&&(e.extensionASTNodes=n.extensionASTNodes),e}MT.fixSchemaAst=Dte});var tk=w(xT=>{"use strict";m();T();N();Object.defineProperty(xT,"__esModule",{value:!0});xT.extractExtensionsFromSchema=void 0;var gs=uc(),bte=Rl();function ca(e={}){let t=x({},e),n=t.directives;if(n!=null)for(let r in n){let i=n[r];Array.isArray(i)||(n[r]=[i])}return t}function Ate(e){let t={schemaExtensions:ca(e.extensions),types:{}};return(0,bte.mapSchema)(e,{[gs.MapperKind.OBJECT_TYPE]:n=>(t.types[n.name]={fields:{},type:"object",extensions:ca(n.extensions)},n),[gs.MapperKind.INTERFACE_TYPE]:n=>(t.types[n.name]={fields:{},type:"interface",extensions:ca(n.extensions)},n),[gs.MapperKind.FIELD]:(n,r,i)=>{t.types[i].fields[r]={arguments:{},extensions:ca(n.extensions)};let a=n.args;if(a!=null)for(let o in a)t.types[i].fields[r].arguments[o]=ca(a[o].extensions);return n},[gs.MapperKind.ENUM_TYPE]:n=>(t.types[n.name]={values:{},type:"enum",extensions:ca(n.extensions)},n),[gs.MapperKind.ENUM_VALUE]:(n,r,i,a)=>(t.types[r].values[a]=ca(n.extensions),n),[gs.MapperKind.SCALAR_TYPE]:n=>(t.types[n.name]={type:"scalar",extensions:ca(n.extensions)},n),[gs.MapperKind.UNION_TYPE]:n=>(t.types[n.name]={type:"union",extensions:ca(n.extensions)},n),[gs.MapperKind.INPUT_OBJECT_TYPE]:n=>(t.types[n.name]={fields:{},type:"input",extensions:ca(n.extensions)},n),[gs.MapperKind.INPUT_OBJECT_FIELD]:(n,r,i)=>(t.types[i].fields[r]={extensions:ca(n.extensions)},n)}),t}xT.extractExtensionsFromSchema=Ate});var nk=w(pu=>{"use strict";m();T();N();Object.defineProperty(pu,"__esModule",{value:!0});pu.printPathArray=pu.pathToArray=pu.addPath=void 0;function Rte(e,t,n){return{prev:e,key:t,typename:n}}pu.addPath=Rte;function Fte(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}pu.pathToArray=Fte;function Pte(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}pu.printPathArray=Pte});var rk=w(IS=>{"use strict";m();T();N();function qT(e,t,n){if(typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t))for(n=0;n{"use strict";m();T();N();Object.defineProperty(VT,"__esModule",{value:!0});VT.mergeIncrementalResult=void 0;var gS=rk();function ik({incrementalResult:e,executionResult:t}){var r;let n=["data",...(r=e.path)!=null?r:[]];if(e.items)for(let i of e.items)(0,gS.dset)(t,n,i),n[n.length-1]++;e.data&&(0,gS.dset)(t,n,e.data),e.errors&&(t.errors=t.errors||[],t.errors.push(...e.errors)),e.extensions&&(0,gS.dset)(t,"extensions",e.extensions),e.incremental&&e.incremental.forEach(i=>{ik({incrementalResult:i,executionResult:t})})}VT.mergeIncrementalResult=ik});var ok=w(Bl=>{"use strict";m();T();N();Object.defineProperty(Bl,"__esModule",{value:!0});Bl.debugTimerEnd=Bl.debugTimerStart=void 0;var sk=new Set;function Lte(e){let t=(globalThis==null?void 0:globalThis.process.env.DEBUG)||globalThis.DEBUG;(t==="1"||t!=null&&t.includes(e))&&(sk.add(e),console.time(e))}Bl.debugTimerStart=Lte;function Cte(e){sk.has(e)&&console.timeEnd(e)}Bl.debugTimerEnd=Cte});var la=w(Qe=>{"use strict";m();T();N();Object.defineProperty(Qe,"__esModule",{value:!0});Qe.inspect=void 0;var Je=(mB(),cm(fB));Je.__exportStar(NB(),Qe);Je.__exportStar(gp(),Qe);Je.__exportStar(wv(),Qe);Je.__exportStar(Lv(),Qe);Je.__exportStar(OB(),Qe);Je.__exportStar(Bv(),Qe);Je.__exportStar(Gv(),Qe);Je.__exportStar(Lv(),Qe);Je.__exportStar(jB(),Qe);Je.__exportStar(KB(),Qe);Je.__exportStar(nU(),Qe);Je.__exportStar(lU(),Qe);Je.__exportStar(pU(),Qe);Je.__exportStar(yU(),Qe);Je.__exportStar(gU(),Qe);Je.__exportStar(_U(),Qe);Je.__exportStar(SU(),Qe);Je.__exportStar(OU(),Qe);Je.__exportStar(Rl(),Qe);Je.__exportStar(oS(),Qe);Je.__exportStar(pT(),Qe);Je.__exportStar(bU(),Qe);Je.__exportStar(RU(),Qe);Je.__exportStar(uc(),Qe);Je.__exportStar(Zv(),Qe);Je.__exportStar(FU(),Qe);Je.__exportStar(PU(),Qe);Je.__exportStar(wU(),Qe);Je.__exportStar(LU(),Qe);Je.__exportStar(eS(),Qe);Je.__exportStar(UU(),Qe);Je.__exportStar(kU(),Qe);Je.__exportStar(MU(),Qe);Je.__exportStar(YN(),Qe);Je.__exportStar(xU(),Qe);Je.__exportStar($U(),Qe);Je.__exportStar(Pv(),Qe);Je.__exportStar(QU(),Qe);Je.__exportStar(YU(),Qe);Je.__exportStar(JU(),Qe);Je.__exportStar(tT(),Qe);Je.__exportStar(HU(),Qe);Je.__exportStar(ZU(),Qe);Je.__exportStar(Op(),Qe);Je.__exportStar(Qv(),Qe);Je.__exportStar(mS(),Qe);var Bte=_p();Object.defineProperty(Qe,"inspect",{enumerable:!0,get:function(){return Bte.inspect}});Je.__exportStar(vl(),Qe);Je.__exportStar(ek(),Qe);Je.__exportStar(NS(),Qe);Je.__exportStar(tk(),Qe);Je.__exportStar(nk(),Qe);Je.__exportStar(vp(),Qe);Je.__exportStar(dS(),Qe);Je.__exportStar(ak(),Qe);Je.__exportStar(ok(),Qe)});var ck=w(jT=>{"use strict";m();T();N();Object.defineProperty(jT,"__esModule",{value:!0});jT.mergeResolvers=void 0;var Ute=la();function uk(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=uk(i)),typeof i=="object"&&i&&n.push(i);let r=(0,Ute.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=uk});var _S=w(KT=>{"use strict";m();T();N();Object.defineProperty(KT,"__esModule",{value:!0});KT.mergeArguments=void 0;var lk=la();function kte(e,t,n){let r=Mte([...t,...e].filter(lk.isSome),n);return n&&n.sort&&r.sort(lk.compareNodes),r}KT.mergeArguments=kte;function Mte(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 ji=w(Ul=>{"use strict";m();T();N();Object.defineProperty(Ul,"__esModule",{value:!0});Ul.mergeDirective=Ul.mergeDirectives=void 0;var dk=Ae(),xte=la();function qte(e,t){return!!e.find(n=>n.name.value===t.name.value)}function pk(e,t){var n;return!!((n=t==null?void 0:t[e.name.value])!=null&&n.repeatable)}function Vte(e,t){return t.some(({value:n})=>n===e.value)}function fk(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=Qte(o,c,(l,d)=>{let f=l.value;return!f||!d.some(y=>y.value===f)})}else a.value=r.value}else n.push(r)}return n}function jte(e,t){return e.map((n,r,i)=>{let a=i.findIndex(o=>o.name.value===n.name.value);if(a!==r&&!pk(n,t)){let o=i[a];return n.arguments=fk(n.arguments,o.arguments),null}return n}).filter(xte.isSome)}function Kte(e=[],t=[],n,r){let i=n&&n.reverseDirectives,a=i?e:t,o=i?t:e,c=jte([...a],r);for(let l of o)if(qte(c,l)&&!pk(l,r)){let d=c.findIndex(y=>y.name.value===l.name.value),f=c[d];c[d].arguments=fk(l.arguments||[],f.arguments||[])}else c.push(l);return c}Ul.mergeDirectives=Kte;function Gte(e,t){let n=(0,dk.print)(Y(x({},e),{description:void 0})),r=(0,dk.print)(Y(x({},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}". +`);return i.description?Q(x({},i),{description:Q(x({},i.description),{value:i.description.value+` +`+o,block:!0})}):Q(x({},i),{description:{kind:Vi.Kind.STRING,value:o,block:c}})}}}})}pu.transformCommentsToDescriptions=_U;function vU(e){return(0,Vi.isTypeSystemDefinitionNode)(e)||e.kind===Vi.Kind.FIELD_DEFINITION||e.kind===Vi.Kind.INPUT_VALUE_DEFINITION||e.kind===Vi.Kind.ENUM_VALUE_DEFINITION}pu.isDescribable=vU});var wU=w(dT=>{"use strict";m();T();N();Object.defineProperty(dT,"__esModule",{value:!0});dT.buildOperationNodeForField=void 0;var lt=Ae(),AU=Rp(),cS=[],lT=new Map;function RU(e){cS.push(e)}function OU(){cS=[]}function DU(){lT=new Map}function Ree({schema:e,kind:t,field:n,models:r,ignore:i=[],depthLimit:a,circularReferenceDepth:o,argNames:c,selectedFields:l=!0}){OU(),DU();let d=(0,AU.getRootTypeNames)(e),f=Pee({schema:e,fieldName:n,kind:t,models:r||[],ignore:i,depthLimit:a||1/0,circularReferenceDepth:o||1,argNames:c,selectedFields:l,rootTypeNames:d});return f.variableDefinitions=[...cS],OU(),DU(),f}dT.buildOperationNodeForField=Ree;function Pee({schema:e,fieldName:t,kind:n,models:r,ignore:i,depthLimit:a,circularReferenceDepth:o,argNames:c,selectedFields:l,rootTypeNames:d}){let f=(0,AU.getDefinedRootType)(e,n),y=f.getFields()[t],I=`${t}_${n}`;if(y.args)for(let v of y.args){let F=v.name;(!c||c.includes(F))&&RU(PU(v,F))}return{kind:lt.Kind.OPERATION_DEFINITION,operation:n,name:{kind:lt.Kind.NAME,value:I},variableDefinitions:[],selectionSet:{kind:lt.Kind.SELECTION_SET,selections:[FU({type:f,field:y,models:r,firstCall:!0,path:[],ancestors:[],ignore:i,depthLimit:a,circularReferenceDepth:o,schema:e,depth:0,argNames:c,selectedFields:l,rootTypeNames:d})]}}}function uS({parent:e,type:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:I,rootTypeNames:v}){if(!(typeof I=="boolean"&&f>c)){if((0,lt.isUnionType)(t)){let F=t.getTypes();return{kind:lt.Kind.SELECTION_SET,selections:F.filter(k=>!oS([...a,k],{depth:l})).map(k=>({kind:lt.Kind.INLINE_FRAGMENT,typeCondition:{kind:lt.Kind.NAMED_TYPE,name:{kind:lt.Kind.NAME,value:k.name}},selectionSet:uS({parent:t,type:k,models:n,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:I,rootTypeNames:v})})).filter(k=>{var K,J;return((J=(K=k==null?void 0:k.selectionSet)==null?void 0:K.selections)==null?void 0:J.length)>0})}}if((0,lt.isInterfaceType)(t)){let F=Object.values(d.getTypeMap()).filter(k=>(0,lt.isObjectType)(k)&&k.getInterfaces().includes(t));return{kind:lt.Kind.SELECTION_SET,selections:F.filter(k=>!oS([...a,k],{depth:l})).map(k=>({kind:lt.Kind.INLINE_FRAGMENT,typeCondition:{kind:lt.Kind.NAMED_TYPE,name:{kind:lt.Kind.NAME,value:k.name}},selectionSet:uS({parent:t,type:k,models:n,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:I,rootTypeNames:v})})).filter(k=>{var K,J;return((J=(K=k==null?void 0:k.selectionSet)==null?void 0:K.selections)==null?void 0:J.length)>0})}}if((0,lt.isObjectType)(t)&&!v.has(t.name)){let F=o.includes(t.name)||o.includes(`${e.name}.${i[i.length-1]}`),k=n.includes(t.name);if(!r&&k&&!F)return{kind:lt.Kind.SELECTION_SET,selections:[{kind:lt.Kind.FIELD,name:{kind:lt.Kind.NAME,value:"id"}}]};let K=t.getFields();return{kind:lt.Kind.SELECTION_SET,selections:Object.keys(K).filter(J=>!oS([...a,(0,lt.getNamedType)(K[J].type)],{depth:l})).map(J=>{let se=typeof I=="object"?I[J]:!0;return se?FU({type:t,field:K[J],models:n,path:[...i,J],ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:se,rootTypeNames:v}):null}).filter(J=>{var se,ie;return J==null?!1:"selectionSet"in J?!!((ie=(se=J.selectionSet)==null?void 0:se.selections)!=null&&ie.length):!0})}}}}function PU(e,t){function n(r){return(0,lt.isListType)(r)?{kind:lt.Kind.LIST_TYPE,type:n(r.ofType)}:(0,lt.isNonNullType)(r)?{kind:lt.Kind.NON_NULL_TYPE,type:n(r.ofType)}:{kind:lt.Kind.NAMED_TYPE,name:{kind:lt.Kind.NAME,value:r.name}}}return{kind:lt.Kind.VARIABLE_DEFINITION,variable:{kind:lt.Kind.VARIABLE,name:{kind:lt.Kind.NAME,value:t||e.name}},type:n(e.type)}}function bU(e,t){return[...t,e].join("_")}function FU({type:e,field:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:I,rootTypeNames:v}){let F=(0,lt.getNamedType)(t.type),k=[],K=!1;if(t.args&&t.args.length&&(k=t.args.map(Te=>{let de=bU(Te.name,i);return y&&!y.includes(de)?((0,lt.isNonNullType)(Te.type)&&(K=!0),null):(r||RU(PU(Te,de)),{kind:lt.Kind.ARGUMENT,name:{kind:lt.Kind.NAME,value:Te.name},value:{kind:lt.Kind.VARIABLE,name:{kind:lt.Kind.NAME,value:bU(Te.name,i)}}})}).filter(Boolean)),K)return null;let J=[...i,t.name],se=J.join("."),ie=t.name;return lT.has(se)&&lT.get(se)!==t.type.toString()&&(ie+=t.type.toString().replace("!","NonNull").replace("[","List").replace("]","")),lT.set(se,t.type.toString()),!(0,lt.isScalarType)(F)&&!(0,lt.isEnumType)(F)?Q(x({kind:lt.Kind.FIELD,name:{kind:lt.Kind.NAME,value:t.name}},ie!==t.name&&{alias:{kind:lt.Kind.NAME,value:ie}}),{selectionSet:uS({parent:e,type:F,models:n,firstCall:r,path:J,ancestors:[...a,e],ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f+1,argNames:y,selectedFields:I,rootTypeNames:v})||void 0,arguments:k}):Q(x({kind:lt.Kind.FIELD,name:{kind:lt.Kind.NAME,value:t.name}},ie!==t.name&&{alias:{kind:lt.Kind.NAME,value:ie}}),{arguments:k})}function oS(e,t={depth:1}){let n=e[e.length-1];return(0,lt.isScalarType)(n)?!1:e.filter(i=>i.name===n.name).length>t.depth}});var CU=w(pT=>{"use strict";m();T();N();Object.defineProperty(pT,"__esModule",{value:!0});pT.DirectiveLocation=void 0;var LU;(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"})(LU||(pT.DirectiveLocation=LU={}))});var pc=w(fT=>{"use strict";m();T();N();Object.defineProperty(fT,"__esModule",{value:!0});fT.MapperKind=void 0;var BU;(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"})(BU||(fT.MapperKind=BU={}))});var lS=w(mT=>{"use strict";m();T();N();Object.defineProperty(mT,"__esModule",{value:!0});mT.getObjectTypeFromTypeMap=void 0;var Fee=Ae();function wee(e,t){if(t){let n=e[t.name];if((0,Fee.isObjectType)(n))return n}}mT.getObjectTypeFromTypeMap=wee});var fS=w(qa=>{"use strict";m();T();N();Object.defineProperty(qa,"__esModule",{value:!0});qa.getBuiltInForStub=qa.isNamedStub=qa.createStub=qa.createNamedStub=void 0;var pr=Ae();function dS(e,t){let n;return t==="object"?n=pr.GraphQLObjectType:t==="interface"?n=pr.GraphQLInterfaceType:n=pr.GraphQLInputObjectType,new n({name:e,fields:{_fake:{type:pr.GraphQLString}}})}qa.createNamedStub=dS;function pS(e,t){switch(e.kind){case pr.Kind.LIST_TYPE:return new pr.GraphQLList(pS(e.type,t));case pr.Kind.NON_NULL_TYPE:return new pr.GraphQLNonNull(pS(e.type,t));default:return t==="output"?dS(e.name.value,"object"):dS(e.name.value,"input")}}qa.createStub=pS;function Lee(e){if("getFields"in e){let t=e.getFields();for(let n in t)return t[n].name==="_fake"}return!1}qa.isNamedStub=Lee;function Cee(e){switch(e.name){case pr.GraphQLInt.name:return pr.GraphQLInt;case pr.GraphQLFloat.name:return pr.GraphQLFloat;case pr.GraphQLString.name:return pr.GraphQLString;case pr.GraphQLBoolean.name:return pr.GraphQLBoolean;case pr.GraphQLID.name:return pr.GraphQLID;default:return e}}qa.getBuiltInForStub=Cee});var TT=w(NT=>{"use strict";m();T();N();Object.defineProperty(NT,"__esModule",{value:!0});NT.rewireTypes=void 0;var Yn=Ae(),UU=fS();function Bee(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 F=v.name;if(!F.startsWith("__")){if(r[F]!=null){console.warn(`Duplicate schema type name ${F} found; keeping the existing one found in the schema`);continue}r[F]=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,Yn.isSpecifiedDirective)(I))return I;let v=I.toConfig();return v.args=o(v.args),new Yn.GraphQLDirective(v)}function o(I){let v={};for(let F in I){let k=I[F],K=y(k.type);K!=null&&(k.type=K,v[F]=k)}return v}function c(I){if((0,Yn.isObjectType)(I)){let v=I.toConfig(),F=Q(x({},v),{fields:()=>l(v.fields),interfaces:()=>f(v.interfaces)});return new Yn.GraphQLObjectType(F)}else if((0,Yn.isInterfaceType)(I)){let v=I.toConfig(),F=Q(x({},v),{fields:()=>l(v.fields)});return"interfaces"in F&&(F.interfaces=()=>f(v.interfaces)),new Yn.GraphQLInterfaceType(F)}else if((0,Yn.isUnionType)(I)){let v=I.toConfig(),F=Q(x({},v),{types:()=>f(v.types)});return new Yn.GraphQLUnionType(F)}else if((0,Yn.isInputObjectType)(I)){let v=I.toConfig(),F=Q(x({},v),{fields:()=>d(v.fields)});return new Yn.GraphQLInputObjectType(F)}else if((0,Yn.isEnumType)(I)){let v=I.toConfig();return new Yn.GraphQLEnumType(v)}else if((0,Yn.isScalarType)(I)){if((0,Yn.isSpecifiedScalarType)(I))return I;let v=I.toConfig();return new Yn.GraphQLScalarType(v)}throw new Error(`Unexpected schema type: ${I}`)}function l(I){let v={};for(let F in I){let k=I[F],K=y(k.type);K!=null&&k.args&&(k.type=K,k.args=o(k.args),v[F]=k)}return v}function d(I){let v={};for(let F in I){let k=I[F],K=y(k.type);K!=null&&(k.type=K,v[F]=k)}return v}function f(I){let v=[];for(let F of I){let k=y(F);k!=null&&v.push(k)}return v}function y(I){if((0,Yn.isListType)(I)){let v=y(I.ofType);return v!=null?new Yn.GraphQLList(v):null}else if((0,Yn.isNonNullType)(I)){let v=y(I.ofType);return v!=null?new Yn.GraphQLNonNull(v):null}else if((0,Yn.isNamedType)(I)){let v=n[I.name];return v===void 0&&(v=(0,UU.isNamedStub)(I)?(0,UU.getBuiltInForStub)(I):c(I),r[v.name]=n[I.name]=v),v!=null?r[v.name]:null}return null}}NT.rewireTypes=Bee});var mS=w(Va=>{"use strict";m();T();N();Object.defineProperty(Va,"__esModule",{value:!0});Va.parseInputValueLiteral=Va.parseInputValue=Va.serializeInputValue=Va.transformInputValue=void 0;var ET=Ae(),Uee=Op();function Pl(e,t,n=null,r=null){if(t==null)return t;let i=(0,ET.getNullableType)(e);if((0,ET.isLeafType)(i))return n!=null?n(i,t):t;if((0,ET.isListType)(i))return(0,Uee.asArray)(t).map(a=>Pl(i.ofType,a,n,r));if((0,ET.isInputObjectType)(i)){let a=i.getFields(),o={};for(let c in t){let l=a[c];l!=null&&(o[c]=Pl(l.type,t[c],n,r))}return r!=null?r(i,o):o}}Va.transformInputValue=Pl;function kee(e,t){return Pl(e,t,(n,r)=>{try{return n.serialize(r)}catch(i){return r}})}Va.serializeInputValue=kee;function Mee(e,t){return Pl(e,t,(n,r)=>{try{return n.parseValue(r)}catch(i){return r}})}Va.parseInputValue=Mee;function xee(e,t){return Pl(e,t,(n,r)=>n.parseLiteral(r,{}))}Va.parseInputValueLiteral=xee});var Ll=w(wl=>{"use strict";m();T();N();Object.defineProperty(wl,"__esModule",{value:!0});wl.correctASTNodes=wl.mapSchema=void 0;var it=Ae(),Fl=lS(),bt=pc(),qee=TT(),kU=mS();function Vee(e,t={}){let n=qU(xU(NS(MU(jee(NS(MU(e.getTypeMap(),e,kU.serializeInputValue),e,t,c=>(0,it.isLeafType)(c)),e,t),e,kU.parseInputValue),e,t,c=>!(0,it.isLeafType)(c)),e,t),e,t),r=e.getDirectives(),i=Kee(r,e,t),{typeMap:a,directives:o}=(0,qee.rewireTypes)(n,i);return new it.GraphQLSchema(Q(x({},e.toConfig()),{query:(0,Fl.getObjectTypeFromTypeMap)(a,(0,Fl.getObjectTypeFromTypeMap)(n,e.getQueryType())),mutation:(0,Fl.getObjectTypeFromTypeMap)(a,(0,Fl.getObjectTypeFromTypeMap)(n,e.getMutationType())),subscription:(0,Fl.getObjectTypeFromTypeMap)(a,(0,Fl.getObjectTypeFromTypeMap)(n,e.getSubscriptionType())),types:Object.values(a),directives:o}))}wl.mapSchema=Vee;function NS(e,t,n,r=()=>!0){let i={};for(let a in e)if(!a.startsWith("__")){let o=e[a];if(o==null||!r(o)){i[a]=o;continue}let c=$ee(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 jee(e,t,n){let r=zee(n);return r?NS(e,t,{[bt.MapperKind.ENUM_TYPE]:i=>{let a=i.toConfig(),o=a.values,c={};for(let l in o){let d=o[l],f=r(d,i.name,t,l);if(f===void 0)c[l]=d;else if(Array.isArray(f)){let[y,I]=f;c[y]=I===void 0?d:I}else f!==null&&(c[l]=f)}return Bp(new it.GraphQLEnumType(Q(x({},a),{values:c})))}},i=>(0,it.isEnumType)(i)):e}function MU(e,t,n){let r=qU(e,t,{[bt.MapperKind.ARGUMENT]:i=>{if(i.defaultValue===void 0)return i;let a=hT(e,i.type);if(a!=null)return Q(x({},i),{defaultValue:n(a,i.defaultValue)})}});return xU(r,t,{[bt.MapperKind.INPUT_OBJECT_FIELD]:i=>{if(i.defaultValue===void 0)return i;let a=hT(r,i.type);if(a!=null)return Q(x({},i),{defaultValue:n(a,i.defaultValue)})}})}function hT(e,t){if((0,it.isListType)(t)){let n=hT(e,t.ofType);return n!=null?new it.GraphQLList(n):null}else if((0,it.isNonNullType)(t)){let n=hT(e,t.ofType);return n!=null?new it.GraphQLNonNull(n):null}else if((0,it.isNamedType)(t)){let n=e[t.name];return n!=null?n:null}return null}function xU(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,it.isObjectType)(a)&&!(0,it.isInterfaceType)(a)&&!(0,it.isInputObjectType)(a)){r[i]=a;continue}let o=Yee(t,n,i);if(o==null){r[i]=a;continue}let c=a.toConfig(),l=c.fields,d={};for(let f in l){let y=l[f],I=o(y,f,i,t);if(I===void 0)d[f]=y;else if(Array.isArray(I)){let[v,F]=I;F.astNode!=null&&(F.astNode=Q(x({},F.astNode),{name:Q(x({},F.astNode.name),{value:v})})),d[v]=F===void 0?y:F}else I!==null&&(d[f]=I)}(0,it.isObjectType)(a)?r[i]=Bp(new it.GraphQLObjectType(Q(x({},c),{fields:d}))):(0,it.isInterfaceType)(a)?r[i]=Bp(new it.GraphQLInterfaceType(Q(x({},c),{fields:d}))):r[i]=Bp(new it.GraphQLInputObjectType(Q(x({},c),{fields:d})))}return r}function qU(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,it.isObjectType)(a)&&!(0,it.isInterfaceType)(a)){r[i]=a;continue}let o=Jee(n);if(o==null){r[i]=a;continue}let c=a.toConfig(),l=c.fields,d={};for(let f in l){let y=l[f],I=y.args;if(I==null){d[f]=y;continue}let v=Object.keys(I);if(!v.length){d[f]=y;continue}let F={};for(let k of v){let K=I[k],J=o(K,f,i,t);if(J===void 0)F[k]=K;else if(Array.isArray(J)){let[se,ie]=J;F[se]=ie}else J!==null&&(F[k]=J)}d[f]=Q(x({},y),{args:F})}(0,it.isObjectType)(a)?r[i]=new it.GraphQLObjectType(Q(x({},c),{fields:d})):(0,it.isInterfaceType)(a)?r[i]=new it.GraphQLInterfaceType(Q(x({},c),{fields:d})):r[i]=new it.GraphQLInputObjectType(Q(x({},c),{fields:d}))}return r}function Kee(e,t,n){let r=Hee(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 Gee(e,t){var i,a,o;let n=e.getType(t),r=[bt.MapperKind.TYPE];return(0,it.isObjectType)(n)?(r.push(bt.MapperKind.COMPOSITE_TYPE,bt.MapperKind.OBJECT_TYPE),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(bt.MapperKind.ROOT_OBJECT,bt.MapperKind.QUERY):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(bt.MapperKind.ROOT_OBJECT,bt.MapperKind.MUTATION):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(bt.MapperKind.ROOT_OBJECT,bt.MapperKind.SUBSCRIPTION)):(0,it.isInputObjectType)(n)?r.push(bt.MapperKind.INPUT_OBJECT_TYPE):(0,it.isInterfaceType)(n)?r.push(bt.MapperKind.COMPOSITE_TYPE,bt.MapperKind.ABSTRACT_TYPE,bt.MapperKind.INTERFACE_TYPE):(0,it.isUnionType)(n)?r.push(bt.MapperKind.COMPOSITE_TYPE,bt.MapperKind.ABSTRACT_TYPE,bt.MapperKind.UNION_TYPE):(0,it.isEnumType)(n)?r.push(bt.MapperKind.ENUM_TYPE):(0,it.isScalarType)(n)&&r.push(bt.MapperKind.SCALAR_TYPE),r}function $ee(e,t,n){let r=Gee(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function Qee(e,t){var i,a,o;let n=e.getType(t),r=[bt.MapperKind.FIELD];return(0,it.isObjectType)(n)?(r.push(bt.MapperKind.COMPOSITE_FIELD,bt.MapperKind.OBJECT_FIELD),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(bt.MapperKind.ROOT_FIELD,bt.MapperKind.QUERY_ROOT_FIELD):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(bt.MapperKind.ROOT_FIELD,bt.MapperKind.MUTATION_ROOT_FIELD):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(bt.MapperKind.ROOT_FIELD,bt.MapperKind.SUBSCRIPTION_ROOT_FIELD)):(0,it.isInterfaceType)(n)?r.push(bt.MapperKind.COMPOSITE_FIELD,bt.MapperKind.INTERFACE_FIELD):(0,it.isInputObjectType)(n)&&r.push(bt.MapperKind.INPUT_OBJECT_FIELD),r}function Yee(e,t,n){let r=Qee(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function Jee(e){let t=e[bt.MapperKind.ARGUMENT];return t!=null?t:null}function Hee(e){let t=e[bt.MapperKind.DIRECTIVE];return t!=null?t:null}function zee(e){let t=e[bt.MapperKind.ENUM_VALUE];return t!=null?t:null}function Bp(e){if((0,it.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(x({},t.astNode),{kind:it.Kind.OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(x({},n),{kind:it.Kind.OBJECT_TYPE_EXTENSION,fields:void 0}))),new it.GraphQLObjectType(t)}else if((0,it.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(x({},t.astNode),{kind:it.Kind.INTERFACE_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(x({},n),{kind:it.Kind.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new it.GraphQLInterfaceType(t)}else if((0,it.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(x({},t.astNode),{kind:it.Kind.INPUT_OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(x({},n),{kind:it.Kind.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new it.GraphQLInputObjectType(t)}else if((0,it.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(x({},t.astNode),{values:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(x({},n),{values:void 0}))),new it.GraphQLEnumType(t)}else return e}wl.correctASTNodes=Bp});var VU=w(IT=>{"use strict";m();T();N();Object.defineProperty(IT,"__esModule",{value:!0});IT.filterSchema=void 0;var yT=Ae(),Os=pc(),Wee=Ll();function Xee({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}){return(0,Wee.mapSchema)(e,{[Os.MapperKind.QUERY]:d=>TS(d,"Query",r,c),[Os.MapperKind.MUTATION]:d=>TS(d,"Mutation",r,c),[Os.MapperKind.SUBSCRIPTION]:d=>TS(d,"Subscription",r,c),[Os.MapperKind.OBJECT_TYPE]:d=>t(d.name,d)?ES(yT.GraphQLObjectType,d,i||n,c):null,[Os.MapperKind.INTERFACE_TYPE]:d=>t(d.name,d)?ES(yT.GraphQLInterfaceType,d,a||n,c):null,[Os.MapperKind.INPUT_OBJECT_TYPE]:d=>t(d.name,d)?ES(yT.GraphQLInputObjectType,d,o||n):null,[Os.MapperKind.UNION_TYPE]:d=>t(d.name,d)?void 0:null,[Os.MapperKind.ENUM_TYPE]:d=>t(d.name,d)?void 0:null,[Os.MapperKind.SCALAR_TYPE]:d=>t(d.name,d)?void 0:null})}IT.filterSchema=Xee;function TS(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(t,a,c,o.args[c])||delete o.args[c]}return new yT.GraphQLObjectType(i)}return e}function ES(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 KU=w(Cl=>{"use strict";m();T();N();Object.defineProperty(Cl,"__esModule",{value:!0});Cl.healTypes=Cl.healSchema=void 0;var ja=Ae();function Zee(e){return jU(e.getTypeMap(),e.getDirectives()),e}Cl.healSchema=Zee;function jU(e,t){let n=Object.create(null);for(let d in e){let f=e[d];if(f==null||d.startsWith("__"))continue;let y=f.name;if(!y.startsWith("__")){if(n[y]!=null){console.warn(`Duplicate schema type name ${y} found; keeping the existing one found in the schema`);continue}n[y]=f}}for(let d in n){let f=n[d];e[d]=f}for(let d of t)d.args=d.args.filter(f=>(f.type=l(f.type),f.type!==null));for(let d in e){let f=e[d];!d.startsWith("__")&&d in n&&f!=null&&r(f)}for(let d in e)!d.startsWith("__")&&!(d in n)&&delete e[d];function r(d){if((0,ja.isObjectType)(d)){i(d),a(d);return}else if((0,ja.isInterfaceType)(d)){i(d),"getInterfaces"in d&&a(d);return}else if((0,ja.isUnionType)(d)){c(d);return}else if((0,ja.isInputObjectType)(d)){o(d);return}else if((0,ja.isLeafType)(d))return;throw new Error(`Unexpected schema type: ${d}`)}function i(d){let f=d.getFields();for(let[y,I]of Object.entries(f))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 f[y]}function a(d){if("getInterfaces"in d){let f=d.getInterfaces();f.push(...f.splice(0).map(y=>l(y)).filter(Boolean))}}function o(d){let f=d.getFields();for(let[y,I]of Object.entries(f))I.type=l(I.type),I.type===null&&delete f[y]}function c(d){let f=d.getTypes();f.push(...f.splice(0).map(y=>l(y)).filter(Boolean))}function l(d){if((0,ja.isListType)(d)){let f=l(d.ofType);return f!=null?new ja.GraphQLList(f):null}else if((0,ja.isNonNullType)(d)){let f=l(d.ofType);return f!=null?new ja.GraphQLNonNull(f):null}else if((0,ja.isNamedType)(d)){let f=e[d.name];if(f&&d!==f)return f}return d}}Cl.healTypes=jU});var GU=w(gT=>{"use strict";m();T();N();Object.defineProperty(gT,"__esModule",{value:!0});gT.getResolversFromSchema=void 0;var fc=Ae();function ete(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,fc.isScalarType)(c)){if(!(0,fc.isSpecifiedScalarType)(c)){let l=c.toConfig();delete l.astNode,n[o]=new fc.GraphQLScalarType(l)}}else if((0,fc.isEnumType)(c)){n[o]={};let l=c.getValues();for(let d of l)n[o][d.name]=d.value}else if((0,fc.isInterfaceType)(c))c.resolveType!=null&&(n[o]={__resolveType:c.resolveType});else if((0,fc.isUnionType)(c))c.resolveType!=null&&(n[o]={__resolveType:c.resolveType});else if((0,fc.isObjectType)(c)){n[o]={},c.isTypeOf!=null&&(n[o].__isTypeOf=c.isTypeOf);let l=c.getFields();for(let d in l){let f=l[d];if(f.subscribe!=null&&(n[o][d]=n[o][d]||{},n[o][d].subscribe=f.subscribe),f.resolve!=null&&((i=f.resolve)==null?void 0:i.name)!=="defaultFieldResolver"){switch((a=f.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=f.resolve}}}}return n}gT.getResolversFromSchema=ete});var QU=w(_T=>{"use strict";m();T();N();Object.defineProperty(_T,"__esModule",{value:!0});_T.forEachField=void 0;var $U=Ae();function tte(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,$U.getNamedType)(i).name.startsWith("__")&&(0,$U.isObjectType)(i)){let a=i.getFields();for(let o in a){let c=a[o];t(c,r,o)}}}}_T.forEachField=tte});var YU=w(vT=>{"use strict";m();T();N();Object.defineProperty(vT,"__esModule",{value:!0});vT.forEachDefaultValue=void 0;var hS=Ae();function nte(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,hS.getNamedType)(i).name.startsWith("__")){if((0,hS.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,hS.isInputObjectType)(i)){let a=i.getFields();for(let o in a){let c=a[o];c.defaultValue=t(c.type,c.defaultValue)}}}}}vT.forEachDefaultValue=nte});var gS=w(ST=>{"use strict";m();T();N();Object.defineProperty(ST,"__esModule",{value:!0});ST.addTypes=void 0;var yS=Ae(),IS=lS(),rte=TT();function ite(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,yS.isNamedType)(c)?r[c.name]=c:(0,yS.isDirective)(c)&&(i[c.name]=c);let{typeMap:a,directives:o}=(0,rte.rewireTypes)(r,Object.values(i));return new yS.GraphQLSchema(Q(x({},n),{query:(0,IS.getObjectTypeFromTypeMap)(a,e.getQueryType()),mutation:(0,IS.getObjectTypeFromTypeMap)(a,e.getMutationType()),subscription:(0,IS.getObjectTypeFromTypeMap)(a,e.getSubscriptionType()),types:Object.values(a),directives:o}))}ST.addTypes=ite});var HU=w(DT=>{"use strict";m();T();N();Object.defineProperty(DT,"__esModule",{value:!0});DT.pruneSchema=void 0;var tr=Ae(),ate=Hv(),ste=pc(),ote=Ll(),ute=Rp();function cte(e,t={}){let{skipEmptyCompositeTypePruning:n,skipEmptyUnionPruning:r,skipPruning:i,skipUnimplementedInterfacesPruning:a,skipUnusedTypesPruning:o}=t,c=[],l=e;do{let d=lte(l);if(i){let f=[];for(let y in l.getTypeMap()){if(y.startsWith("__"))continue;let I=l.getType(y);I&&i(I)&&f.push(y)}d=JU(f,l,d)}c=[],l=(0,ote.mapSchema)(l,{[ste.MapperKind.TYPE]:f=>!d.has(f.name)&&!(0,tr.isSpecifiedScalarType)(f)?((0,tr.isUnionType)(f)||(0,tr.isInputObjectType)(f)||(0,tr.isInterfaceType)(f)||(0,tr.isObjectType)(f)||(0,tr.isScalarType)(f))&&(o||(0,tr.isUnionType)(f)&&r&&!Object.keys(f.getTypes()).length||((0,tr.isInputObjectType)(f)||(0,tr.isInterfaceType)(f)||(0,tr.isObjectType)(f))&&n&&!Object.keys(f.getFields()).length||(0,tr.isInterfaceType)(f)&&a)?f:(c.push(f.name),d.delete(f.name),null):f})}while(c.length);return l}DT.pruneSchema=cte;function lte(e){let t=[];for(let n of(0,ute.getRootTypes)(e))t.push(n.name);return JU(t,e)}function JU(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,tr.isUnionType)(a)&&e.push(...a.getTypes().map(o=>o.name)),(0,tr.isInterfaceType)(a)&&r[i]===!0&&(e.push(...(0,ate.getImplementingTypes)(a.name,t)),r[i]=!1),(0,tr.isEnumType)(a)&&e.push(...a.getValues().flatMap(o=>o.astNode?OT(t,o.astNode):[])),"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,tr.isObjectType)(a)&&e.push(...l.args.flatMap(f=>{let y=[(0,tr.getNamedType)(f.type).name];return f.astNode&&y.push(...OT(t,f.astNode)),y}));let d=(0,tr.getNamedType)(l.type);e.push(d.name),l.astNode&&e.push(...OT(t,l.astNode)),(0,tr.isInterfaceType)(d)&&!(d.name in r)&&(r[d.name]=!0)}}a.astNode&&e.push(...OT(t,a.astNode)),n.add(i)}}return n}function OT(e,t){var n;return((n=t.directives)!=null?n:[]).flatMap(r=>{var i,a;return(a=(i=e.getDirective(r.name.value))==null?void 0:i.args.map(o=>(0,tr.getNamedType)(o.type).name))!=null?a:[]})}});var WU=w(bT=>{"use strict";m();T();N();Object.defineProperty(bT,"__esModule",{value:!0});bT.mergeDeep=void 0;var dte=Op();function zU(e,t=!1,n=!1){let r=e[0]||{},i={};t&&Object.setPrototypeOf(i,Object.create(Object.getPrototypeOf(r)));for(let a of e)if(_S(r)&&_S(a)){if(t){let o=Object.getPrototypeOf(i),c=Object.getPrototypeOf(a);if(c)for(let l of Object.getOwnPropertyNames(c)){let d=Object.getOwnPropertyDescriptor(c,l);(0,dte.isSome)(d)&&Object.defineProperty(o,l,d)}}for(let o in a)_S(a[o])?o in i?i[o]=zU([i[o],a[o]],t,n):Object.assign(i,{[o]:a[o]}):n&&Array.isArray(i[o])?Array.isArray(a[o])?i[o].push(...a[o]):i[o].push(a[o]):Object.assign(i,{[o]:a[o]})}else if(n&&Array.isArray(r))Array.isArray(a)?r.push(...a):r.push(a);else if(n&&Array.isArray(a))return[r,...a];return i}bT.mergeDeep=zU;function _S(e){return e&&typeof e=="object"&&!Array.isArray(e)}});var XU=w(AT=>{"use strict";m();T();N();Object.defineProperty(AT,"__esModule",{value:!0});AT.parseSelectionSet=void 0;var pte=Ae();function fte(e,t){return(0,pte.parse)(e,t).definitions[0].selectionSet}AT.parseSelectionSet=fte});var ZU=w(RT=>{"use strict";m();T();N();Object.defineProperty(RT,"__esModule",{value:!0});RT.getResponseKeyFromInfo=void 0;function mte(e){return e.fieldNodes[0].alias!=null?e.fieldNodes[0].alias.value:e.fieldName}RT.getResponseKeyFromInfo=mte});var ek=w(Ka=>{"use strict";m();T();N();Object.defineProperty(Ka,"__esModule",{value:!0});Ka.modifyObjectFields=Ka.selectObjectFields=Ka.removeObjectFields=Ka.appendObjectFields=void 0;var PT=Ae(),Nte=gS(),FT=pc(),mc=Ll();function Tte(e,t,n){return e.getType(t)==null?(0,Nte.addTypes)(e,[new PT.GraphQLObjectType({name:t,fields:n})]):(0,mc.mapSchema)(e,{[FT.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,mc.correctASTNodes)(new PT.GraphQLObjectType(Q(x({},i),{fields:o})))}}})}Ka.appendObjectFields=Tte;function Ete(e,t,n){let r={};return[(0,mc.mapSchema)(e,{[FT.MapperKind.OBJECT_TYPE]:a=>{if(a.name===t){let o=a.toConfig(),c=o.fields,l={};for(let d in c){let f=c[d];n(d,f)?r[d]=f:l[d]=f}return(0,mc.correctASTNodes)(new PT.GraphQLObjectType(Q(x({},o),{fields:l})))}}}),r]}Ka.removeObjectFields=Ete;function hte(e,t,n){let r={};return(0,mc.mapSchema)(e,{[FT.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}Ka.selectObjectFields=hte;function yte(e,t,n,r){let i={};return[(0,mc.mapSchema)(e,{[FT.MapperKind.OBJECT_TYPE]:o=>{if(o.name===t){let c=o.toConfig(),l=c.fields,d={};for(let f in l){let y=l[f];n(f,y)?i[f]=y:d[f]=y}for(let f in r){let y=r[f];d[f]=y}return(0,mc.correctASTNodes)(new PT.GraphQLObjectType(Q(x({},c),{fields:d})))}}}),i]}Ka.modifyObjectFields=yte});var tk=w(wT=>{"use strict";m();T();N();Object.defineProperty(wT,"__esModule",{value:!0});wT.renameType=void 0;var ji=Ae();function Ite(e,t){if((0,ji.isObjectType)(e))return new ji.GraphQLObjectType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));if((0,ji.isInterfaceType)(e))return new ji.GraphQLInterfaceType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));if((0,ji.isUnionType)(e))return new ji.GraphQLUnionType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));if((0,ji.isInputObjectType)(e))return new ji.GraphQLInputObjectType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));if((0,ji.isEnumType)(e))return new ji.GraphQLEnumType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));if((0,ji.isScalarType)(e))return new ji.GraphQLScalarType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));throw new Error(`Unknown type ${e}.`)}wT.renameType=Ite});var ik=w(LT=>{"use strict";m();T();N();Object.defineProperty(LT,"__esModule",{value:!0});LT.mapAsyncIterator=void 0;var gte=bp();function _te(e,t,n,r){let i,a,o;r&&(o=d=>{let f=r();return(0,gte.isPromise)(f)?f.then(()=>d):d}),typeof e.return=="function"&&(i=e.return,a=d=>{let f=()=>Promise.reject(d);return i.call(e).then(f,f)});function c(d){return d.done?o?o(d):d:nk(d.value,t).then(rk,a)}let l;if(n){let d=n;l=f=>nk(f,d).then(rk,a)}return{next(){return e.next().then(c,l)},return(){let d=i?i.call(e).then(c,l):Promise.resolve({value:void 0,done:!0});return o?d.then(o):d},throw(d){return typeof e.throw=="function"?e.throw(d).then(c,l):Promise.reject(d).catch(a)},[Symbol.asyncIterator](){return this}}}LT.mapAsyncIterator=_te;function nk(e,t){return new Promise(n=>n(t(e)))}function rk(e){return{value:e,done:!1}}});var ak=w(Bl=>{"use strict";m();T();N();Object.defineProperty(Bl,"__esModule",{value:!0});Bl.createVariableNameGenerator=Bl.updateArgument=void 0;var Nc=Ae(),vte=Wv();function Ste(e,t,n,r,i,a,o){if(e[r]={kind:Nc.Kind.ARGUMENT,name:{kind:Nc.Kind.NAME,value:r},value:{kind:Nc.Kind.VARIABLE,name:{kind:Nc.Kind.NAME,value:i}}},t[i]={kind:Nc.Kind.VARIABLE_DEFINITION,variable:{kind:Nc.Kind.VARIABLE,name:{kind:Nc.Kind.NAME,value:i}},type:(0,vte.astFromType)(a)},o!==void 0){n[i]=o;return}i in n&&delete n[i]}Bl.updateArgument=Ste;function Ote(e){let t=0;return n=>{let r;do r=`_v${(t++).toString()}_${n}`;while(r in e);return r}}Bl.createVariableNameGenerator=Ote});var sk=w(CT=>{"use strict";m();T();N();Object.defineProperty(CT,"__esModule",{value:!0});CT.implementsAbstractType=void 0;var vS=Ae();function Dte(e,t,n){return n==null||t==null?!1:t===n?!0:(0,vS.isCompositeType)(t)&&(0,vS.isCompositeType)(n)?(0,vS.doTypesOverlap)(e,t,n):!1}CT.implementsAbstractType=Dte});var ok=w(BT=>{"use strict";m();T();N();Object.defineProperty(BT,"__esModule",{value:!0});BT.observableToAsyncIterable=void 0;function bte(e){let t=[],n=[],r=!0,i=f=>{t.length!==0?t.shift()({value:f,done:!1}):n.push({value:f,done:!1})},a=f=>{t.length!==0?t.shift()({value:{errors:[f]},done:!1}):n.push({value:{errors:[f]},done:!1})},o=()=>{t.length!==0?t.shift()({done:!0}):n.push({done:!0})},c=()=>new Promise(f=>{if(n.length!==0){let y=n.shift();f(y)}else t.push(f)}),l=e.subscribe({next(f){i(f)},error(f){a(f)},complete(){o()}}),d=()=>{if(r){r=!1,l.unsubscribe();for(let f of t)f({value:void 0,done:!0});t.length=0,n.length=0}};return{next(){return r?c():this.return()},return(){return d(),Promise.resolve({value:void 0,done:!0})},throw(f){return d(),Promise.reject(f)},[Symbol.asyncIterator](){return this}}}BT.observableToAsyncIterable=bte});var uk=w(UT=>{"use strict";m();T();N();Object.defineProperty(UT,"__esModule",{value:!0});UT.AccumulatorMap=void 0;var SS=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)}};UT.AccumulatorMap=SS});var OS=w(Ul=>{"use strict";m();T();N();Object.defineProperty(Ul,"__esModule",{value:!0});Ul.GraphQLStreamDirective=Ul.GraphQLDeferDirective=void 0;var Ki=Ae();Ul.GraphQLDeferDirective=new Ki.GraphQLDirective({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[Ki.DirectiveLocation.FRAGMENT_SPREAD,Ki.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Ki.GraphQLNonNull(Ki.GraphQLBoolean),description:"Deferred when true or undefined.",defaultValue:!0},label:{type:Ki.GraphQLString,description:"Unique name"}}});Ul.GraphQLStreamDirective=new Ki.GraphQLDirective({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[Ki.DirectiveLocation.FIELD],args:{if:{type:new Ki.GraphQLNonNull(Ki.GraphQLBoolean),description:"Stream when true or undefined.",defaultValue:!0},label:{type:Ki.GraphQLString,description:"Unique name"},initialCount:{defaultValue:0,type:Ki.GraphQLInt,description:"Number of items to return immediately"}}})});var AS=w(Wr=>{"use strict";m();T();N();Object.defineProperty(Wr,"__esModule",{value:!0});Wr.collectSubFields=Wr.getDeferValues=Wr.getFieldEntryKey=Wr.doesFragmentConditionMatch=Wr.shouldIncludeNode=Wr.collectFields=void 0;var Ga=Ae(),MT=uk(),Ate=OS(),Rte=bl();function kl(e,t,n,r,i,a,o,c){for(let l of i.selections)switch(l.kind){case Ga.Kind.FIELD:{if(!kT(n,l))continue;a.add(ck(l),l);break}case Ga.Kind.INLINE_FRAGMENT:{if(!kT(n,l)||!DS(e,l,r))continue;let d=bS(n,l);if(d){let f=new MT.AccumulatorMap;kl(e,t,n,r,l.selectionSet,f,o,c),o.push({label:d.label,fields:f})}else kl(e,t,n,r,l.selectionSet,a,o,c);break}case Ga.Kind.FRAGMENT_SPREAD:{let d=l.name.value;if(!kT(n,l))continue;let f=bS(n,l);if(c.has(d)&&!f)continue;let y=t[d];if(!y||!DS(e,y,r))continue;if(f||c.add(d),f){let I=new MT.AccumulatorMap;kl(e,t,n,r,y.selectionSet,I,o,c),o.push({label:f.label,fields:I})}else kl(e,t,n,r,y.selectionSet,a,o,c);break}}}function Pte(e,t,n,r,i){let a=new MT.AccumulatorMap,o=[];return kl(e,t,n,r,i,a,o,new Set),{fields:a,patches:o}}Wr.collectFields=Pte;function kT(e,t){let n=(0,Ga.getDirectiveValues)(Ga.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,Ga.getDirectiveValues)(Ga.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}Wr.shouldIncludeNode=kT;function DS(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,Ga.typeFromAST)(e,r);return i===n?!0:(0,Ga.isAbstractType)(i)?e.getPossibleTypes(i).includes(n):!1}Wr.doesFragmentConditionMatch=DS;function ck(e){return e.alias?e.alias.value:e.name.value}Wr.getFieldEntryKey=ck;function bS(e,t){let n=(0,Ga.getDirectiveValues)(Ate.GraphQLDeferDirective,t,e);if(n&&n.if!==!1)return{label:typeof n.label=="string"?n.label:void 0}}Wr.getDeferValues=bS;Wr.collectSubFields=(0,Rte.memoize5)(function(t,n,r,i,a){let o=new MT.AccumulatorMap,c=new Set,l=[],d={fields:o,patches:l};for(let f of a)f.selectionSet&&kl(t,n,r,i,f.selectionSet,o,l,c);return d})});var RS=w(Ml=>{"use strict";m();T();N();Object.defineProperty(Ml,"__esModule",{value:!0});Ml.getOperationASTFromRequest=Ml.getOperationASTFromDocument=void 0;var Fte=Ae(),wte=bl();function lk(e,t){let n=(0,Fte.getOperationAST)(e,t);if(!n)throw new Error(`Cannot infer operation ${t||""}`);return n}Ml.getOperationASTFromDocument=lk;Ml.getOperationASTFromRequest=(0,wte.memoize1)(function(t){return lk(t.document,t.operationName)})});var fk=w(mu=>{"use strict";m();T();N();Object.defineProperty(mu,"__esModule",{value:!0});mu.visitResult=mu.visitErrors=mu.visitData=void 0;var fu=Ae(),PS=AS(),Lte=RS();function FS(e,t,n){if(Array.isArray(e))return e.map(r=>FS(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:FS(a,t,n)})}return n!=null?n(r):r}return e}mu.visitData=FS;function Cte(e,t){return e.map(n=>t(n))}mu.visitErrors=Cte;function Bte(e,t,n,r,i){let a=t.document.definitions.reduce((I,v)=>(v.kind===fu.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,f=d!=null&&i!=null,y=(0,Lte.getOperationASTFromRequest)(t);return l!=null&&y!=null&&(e.data=Mte(l,y,n,a,o,r,f?d:void 0,c)),d!=null&&i&&(e.errors=Ute(d,i,c)),e}mu.visitResult=Bte;function Ute(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,f)=>{let y=f.type.name,I=t[y];if(I==null)return d;let v=I[f.fieldName];return v==null?d:v(d,f.pathIndex)},o);return a&&i.has(o)?a(l):l})}function kte(e,t){switch(t.operation){case"query":return e.getQueryType();case"mutation":return e.getMutationType();case"subscription":return e.getSubscriptionType()}}function Mte(e,t,n,r,i,a,o,c){let l=kte(n,t),{fields:d}=(0,PS.collectFields)(n,r,i,l,t.selectionSet);return wS(e,l,d,n,r,i,a,0,o,c)}function wS(e,t,n,r,i,a,o,c,l,d){var se;let f=t.getFields(),y=o==null?void 0:o[t.name],I=y==null?void 0:y.__enter,v=I!=null?I(e):e,F,k=null;if(l!=null){F=qte(l,c),k=F.errorMap;for(let ie of F.unpathedErrors)d.unpathedErrors.add(ie)}for(let[ie,Te]of n){let de=Te[0].name.value,Re=(se=f[de])==null?void 0:se.type;if(Re==null)switch(de){case"__typename":Re=fu.TypeNameMetaFieldDef.type;break;case"__schema":Re=fu.SchemaMetaFieldDef.type;break;case"__type":Re=fu.TypeMetaFieldDef.type;break}let xe=c+1,tt;k&&(tt=k[ie],tt!=null&&delete k[ie],Vte(t,de,xe,tt,d));let ee=pk(e[ie],Re,Te,r,i,a,o,xe,tt,d);dk(v,ie,ee,y,de)}let K=v.__typename;if(K!=null&&dk(v,"__typename",K,y,"__typename"),k)for(let ie in k){let Te=k[ie];for(let de of Te)d.unpathedErrors.add(de)}let J=y==null?void 0:y.__leave;return J!=null?J(v):v}function dk(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 xte(e,t,n,r,i,a,o,c,l,d){return e.map(f=>pk(f,t,n,r,i,a,o,c+1,l,d))}function pk(e,t,n,r,i,a,o,c,l=[],d){if(e==null)return e;let f=(0,fu.getNullableType)(t);if((0,fu.isListType)(f))return xte(e,f.ofType,n,r,i,a,o,c,l,d);if((0,fu.isAbstractType)(f)){let v=r.getType(e.__typename),{fields:F}=(0,PS.collectSubFields)(r,i,a,v,n);return wS(e,v,F,r,i,a,o,c,l,d)}else if((0,fu.isObjectType)(f)){let{fields:v}=(0,PS.collectSubFields)(r,i,a,f,n);return wS(e,f,v,r,i,a,o,c,l,d)}let y=o==null?void 0:o[f.name];if(y==null)return e;let I=y(e);return I===void 0?e:I}function qte(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 Vte(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 mk=w(xT=>{"use strict";m();T();N();Object.defineProperty(xT,"__esModule",{value:!0});xT.valueMatchesCriteria=void 0;function LS(e,t){return e==null?e===t:Array.isArray(e)?Array.isArray(t)&&e.every((n,r)=>LS(n,t[r])):typeof e=="object"?typeof t=="object"&&t&&Object.keys(t).every(n=>LS(e[n],t[n])):t instanceof RegExp?t.test(e):e===t}xT.valueMatchesCriteria=LS});var Nk=w(qT=>{"use strict";m();T();N();Object.defineProperty(qT,"__esModule",{value:!0});qT.isAsyncIterable=void 0;function jte(e){return(e==null?void 0:e[Symbol.asyncIterator])!=null}qT.isAsyncIterable=jte});var Tk=w(VT=>{"use strict";m();T();N();Object.defineProperty(VT,"__esModule",{value:!0});VT.isDocumentNode=void 0;var Kte=Ae();function Gte(e){return e&&typeof e=="object"&&"kind"in e&&e.kind===Kte.Kind.DOCUMENT}VT.isDocumentNode=Gte});var Ek=w(()=>{"use strict";m();T();N()});var gk=w(Nu=>{"use strict";m();T();N();Object.defineProperty(Nu,"__esModule",{value:!0});Nu.withCancel=Nu.getAsyncIterableWithCancel=Nu.getAsyncIteratorWithCancel=void 0;var $te=bl();function Qte(e){return Di(this,null,function*(){return{value:e,done:!0}})}var hk=(0,$te.memoize2)(function(t,n){return function(...i){return Reflect.apply(n,t,i)}});function yk(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||Qte;return function(l){return Di(this,null,function*(){let d=yield t(l);return Reflect.apply(o,n,[d])})}}else if(typeof a=="function")return hk(n,a);return a}})}Nu.getAsyncIteratorWithCancel=yk;function Ik(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 yk(c,t)}:typeof a=="function"?hk(n,a):a}})}Nu.getAsyncIterableWithCancel=Ik;Nu.withCancel=Ik});var _k=w(jT=>{"use strict";m();T();N();Object.defineProperty(jT,"__esModule",{value:!0});jT.fixSchemaAst=void 0;var Yte=Ae(),Jte=iS();function Hte(e,t){let n=(0,Jte.getDocumentNodeFromSchema)(e);return(0,Yte.buildASTSchema)(n,x({},t||{}))}function zte(e,t){let n;return(!e.astNode||!e.extensionASTNodes)&&(n=Hte(e,t)),!e.astNode&&(n!=null&&n.astNode)&&(e.astNode=n.astNode),!e.extensionASTNodes&&(n!=null&&n.astNode)&&(e.extensionASTNodes=n.extensionASTNodes),e}jT.fixSchemaAst=zte});var vk=w(KT=>{"use strict";m();T();N();Object.defineProperty(KT,"__esModule",{value:!0});KT.extractExtensionsFromSchema=void 0;var Ds=pc(),Wte=Ll();function la(e={}){let t=x({},e),n=t.directives;if(n!=null)for(let r in n){let i=n[r];Array.isArray(i)||(n[r]=[i])}return t}function Xte(e){let t={schemaExtensions:la(e.extensions),types:{}};return(0,Wte.mapSchema)(e,{[Ds.MapperKind.OBJECT_TYPE]:n=>(t.types[n.name]={fields:{},type:"object",extensions:la(n.extensions)},n),[Ds.MapperKind.INTERFACE_TYPE]:n=>(t.types[n.name]={fields:{},type:"interface",extensions:la(n.extensions)},n),[Ds.MapperKind.FIELD]:(n,r,i)=>{t.types[i].fields[r]={arguments:{},extensions:la(n.extensions)};let a=n.args;if(a!=null)for(let o in a)t.types[i].fields[r].arguments[o]=la(a[o].extensions);return n},[Ds.MapperKind.ENUM_TYPE]:n=>(t.types[n.name]={values:{},type:"enum",extensions:la(n.extensions)},n),[Ds.MapperKind.ENUM_VALUE]:(n,r,i,a)=>(t.types[r].values[a]=la(n.extensions),n),[Ds.MapperKind.SCALAR_TYPE]:n=>(t.types[n.name]={type:"scalar",extensions:la(n.extensions)},n),[Ds.MapperKind.UNION_TYPE]:n=>(t.types[n.name]={type:"union",extensions:la(n.extensions)},n),[Ds.MapperKind.INPUT_OBJECT_TYPE]:n=>(t.types[n.name]={fields:{},type:"input",extensions:la(n.extensions)},n),[Ds.MapperKind.INPUT_OBJECT_FIELD]:(n,r,i)=>(t.types[i].fields[r]={extensions:la(n.extensions)},n)}),t}KT.extractExtensionsFromSchema=Xte});var Sk=w(Tu=>{"use strict";m();T();N();Object.defineProperty(Tu,"__esModule",{value:!0});Tu.printPathArray=Tu.pathToArray=Tu.addPath=void 0;function Zte(e,t,n){return{prev:e,key:t,typename:n}}Tu.addPath=Zte;function ene(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}Tu.pathToArray=ene;function tne(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}Tu.printPathArray=tne});var Ok=w(CS=>{"use strict";m();T();N();function GT(e,t,n){if(typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t))for(n=0;n{"use strict";m();T();N();Object.defineProperty($T,"__esModule",{value:!0});$T.mergeIncrementalResult=void 0;var BS=Ok();function Dk({incrementalResult:e,executionResult:t}){var r;let n=["data",...(r=e.path)!=null?r:[]];if(e.items)for(let i of e.items)(0,BS.dset)(t,n,i),n[n.length-1]++;e.data&&(0,BS.dset)(t,n,e.data),e.errors&&(t.errors=t.errors||[],t.errors.push(...e.errors)),e.extensions&&(0,BS.dset)(t,"extensions",e.extensions),e.incremental&&e.incremental.forEach(i=>{Dk({incrementalResult:i,executionResult:t})})}$T.mergeIncrementalResult=Dk});var Rk=w(xl=>{"use strict";m();T();N();Object.defineProperty(xl,"__esModule",{value:!0});xl.debugTimerEnd=xl.debugTimerStart=void 0;var Ak=new Set;function rne(e){let t=(globalThis==null?void 0:globalThis.process.env.DEBUG)||globalThis.DEBUG;(t==="1"||t!=null&&t.includes(e))&&(Ak.add(e),console.time(e))}xl.debugTimerStart=rne;function ine(e){Ak.has(e)&&console.timeEnd(e)}xl.debugTimerEnd=ine});var da=w(Qe=>{"use strict";m();T();N();Object.defineProperty(Qe,"__esModule",{value:!0});Qe.inspect=void 0;var Je=(UB(),fm(BB));Je.__exportStar(kB(),Qe);Je.__exportStar(Op(),Qe);Je.__exportStar(Qv(),Qe);Je.__exportStar(Yv(),Qe);Je.__exportStar(YB(),Qe);Je.__exportStar(Hv(),Qe);Je.__exportStar(iS(),Qe);Je.__exportStar(Yv(),Qe);Je.__exportStar(lU(),Qe);Je.__exportStar(dU(),Qe);Je.__exportStar(SU(),Qe);Je.__exportStar(wU(),Qe);Je.__exportStar(CU(),Qe);Je.__exportStar(VU(),Qe);Je.__exportStar(KU(),Qe);Je.__exportStar(GU(),Qe);Je.__exportStar(QU(),Qe);Je.__exportStar(YU(),Qe);Je.__exportStar(Ll(),Qe);Je.__exportStar(gS(),Qe);Je.__exportStar(TT(),Qe);Je.__exportStar(HU(),Qe);Je.__exportStar(WU(),Qe);Je.__exportStar(pc(),Qe);Je.__exportStar(fS(),Qe);Je.__exportStar(XU(),Qe);Je.__exportStar(ZU(),Qe);Je.__exportStar(ek(),Qe);Je.__exportStar(tk(),Qe);Je.__exportStar(mS(),Qe);Je.__exportStar(ik(),Qe);Je.__exportStar(ak(),Qe);Je.__exportStar(sk(),Qe);Je.__exportStar(WN(),Qe);Je.__exportStar(ok(),Qe);Je.__exportStar(fk(),Qe);Je.__exportStar($v(),Qe);Je.__exportStar(mk(),Qe);Je.__exportStar(Nk(),Qe);Je.__exportStar(Tk(),Qe);Je.__exportStar(aT(),Qe);Je.__exportStar(Ek(),Qe);Je.__exportStar(gk(),Qe);Je.__exportStar(Rp(),Qe);Je.__exportStar(sS(),Qe);Je.__exportStar(AS(),Qe);var ane=Dp();Object.defineProperty(Qe,"inspect",{enumerable:!0,get:function(){return ane.inspect}});Je.__exportStar(bl(),Qe);Je.__exportStar(_k(),Qe);Je.__exportStar(RS(),Qe);Je.__exportStar(vk(),Qe);Je.__exportStar(Sk(),Qe);Je.__exportStar(bp(),Qe);Je.__exportStar(OS(),Qe);Je.__exportStar(bk(),Qe);Je.__exportStar(Rk(),Qe)});var Fk=w(QT=>{"use strict";m();T();N();Object.defineProperty(QT,"__esModule",{value:!0});QT.mergeResolvers=void 0;var sne=da();function Pk(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=Pk(i)),typeof i=="object"&&i&&n.push(i);let r=(0,sne.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=Pk});var US=w(YT=>{"use strict";m();T();N();Object.defineProperty(YT,"__esModule",{value:!0});YT.mergeArguments=void 0;var wk=da();function one(e,t,n){let r=une([...t,...e].filter(wk.isSome),n);return n&&n.sort&&r.sort(wk.compareNodes),r}YT.mergeArguments=one;function une(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 Gi=w(ql=>{"use strict";m();T();N();Object.defineProperty(ql,"__esModule",{value:!0});ql.mergeDirective=ql.mergeDirectives=void 0;var Lk=Ae(),cne=da();function lne(e,t){return!!e.find(n=>n.name.value===t.name.value)}function Ck(e,t){var n;return!!((n=t==null?void 0:t[e.name.value])!=null&&n.repeatable)}function dne(e,t){return t.some(({value:n})=>n===e.value)}function Bk(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=Tne(o,c,(l,d)=>{let f=l.value;return!f||!d.some(y=>y.value===f)})}else a.value=r.value}else n.push(r)}return n}function pne(e,t){return e.map((n,r,i)=>{let a=i.findIndex(o=>o.name.value===n.name.value);if(a!==r&&!Ck(n,t)){let o=i[a];return n.arguments=Bk(n.arguments,o.arguments),null}return n}).filter(cne.isSome)}function fne(e=[],t=[],n,r){let i=n&&n.reverseDirectives,a=i?e:t,o=i?t:e,c=pne([...a],r);for(let l of o)if(lne(c,l)&&!Ck(l,r)){let d=c.findIndex(y=>y.name.value===l.name.value),f=c[d];c[d].arguments=Bk(l.arguments||[],f.arguments||[])}else c.push(l);return c}ql.mergeDirectives=fne;function mne(e,t){let n=(0,Lk.print)(Q(x({},e),{description:void 0})),r=(0,Lk.print)(Q(x({},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 $te(e,t){return t?(Gte(e,t),Y(x({},e),{locations:[...t.locations,...e.locations.filter(n=>!Vte(n,t.locations))]})):e}Ul.mergeDirective=$te;function Qte(e,t,n){return e.concat(t.filter(r=>n(r,e)))}});var vS=w(GT=>{"use strict";m();T();N();Object.defineProperty(GT,"__esModule",{value:!0});GT.mergeEnumValues=void 0;var Yte=ji(),Jte=la();function Hte(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,Yte.mergeDirectives)(o.directives,l.directives,r)}else i.set(c,o)}let a=[...i.values()];return n&&n.sort&&a.sort(Jte.compareNodes),a}GT.mergeEnumValues=Hte});var SS=w($T=>{"use strict";m();T();N();Object.defineProperty($T,"__esModule",{value:!0});$T.mergeEnum=void 0;var zte=Ae(),Wte=ji(),Xte=vS();function Zte(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,Wte.mergeDirectives)(e.directives,t.directives,n,r),values:(0,Xte.mergeEnumValues)(e.values,t.values,n)}:n!=null&&n.convertExtensions?Y(x({},e),{kind:zte.Kind.ENUM_TYPE_DEFINITION}):e}$T.mergeEnum=Zte});var QT=w(Vn=>{"use strict";m();T();N();Object.defineProperty(Vn,"__esModule",{value:!0});Vn.defaultStringComparator=Vn.CompareVal=Vn.printTypeNode=Vn.isNonNullTypeNode=Vn.isListTypeNode=Vn.isWrappingTypeNode=Vn.extractType=Vn.isSourceTypes=Vn.isStringTypes=void 0;var wp=Ae();function ene(e){return typeof e=="string"}Vn.isStringTypes=ene;function tne(e){return e instanceof wp.Source}Vn.isSourceTypes=tne;function nne(e){let t=e;for(;t.kind===wp.Kind.LIST_TYPE||t.kind==="NonNullType";)t=t.type;return t}Vn.extractType=nne;function rne(e){return e.kind!==wp.Kind.NAMED_TYPE}Vn.isWrappingTypeNode=rne;function mk(e){return e.kind===wp.Kind.LIST_TYPE}Vn.isListTypeNode=mk;function Nk(e){return e.kind===wp.Kind.NON_NULL_TYPE}Vn.isNonNullTypeNode=Nk;function OS(e){return mk(e)?`[${OS(e.type)}]`:Nk(e)?`${OS(e.type)}!`:e.name.value}Vn.printTypeNode=OS;var pc;(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"})(pc=Vn.CompareVal||(Vn.CompareVal={}));function ine(e,t){return e==null&&t==null?pc.A_EQUALS_B:e==null?pc.A_SMALLER_THAN_B:t==null?pc.A_GREATER_THAN_B:et?pc.A_GREATER_THAN_B:pc.A_EQUALS_B}Vn.defaultStringComparator=ine});var Cp=w(YT=>{"use strict";m();T();N();Object.defineProperty(YT,"__esModule",{value:!0});YT.mergeFields=void 0;var Xr=QT(),ane=ji(),sne=la(),one=_S();function une(e,t){let n=e.findIndex(r=>r.name.value===t.name.value);return[n>-1?e[n]:null,n]}function cne(e,t,n,r,i){let a=[];if(n!=null&&a.push(...n),t!=null)for(let o of t){let[c,l]=une(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)||lne(e,c,o,r==null?void 0:r.throwOnConflict);d.arguments=(0,one.mergeArguments)(o.arguments||[],c.arguments||[],r),d.directives=(0,ane.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(sne.compareNodes),r&&r.exclusions){let o=r.exclusions;return a.filter(c=>!o.includes(`${e.name.value}.${c.name.value}`))}return a}YT.mergeFields=cne;function lne(e,t,n,r=!1){let i=(0,Xr.printTypeNode)(t.type),a=(0,Xr.printTypeNode)(n.type);if(i!==a){let o=(0,Xr.extractType)(t.type),c=(0,Xr.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(!Lp(t.type,n.type,!r))throw new Error(`Field '${e.name.value}.${t.name.value}' changed type from '${i}' to '${a}'`)}return(0,Xr.isNonNullTypeNode)(n.type)&&!(0,Xr.isNonNullTypeNode)(t.type)&&(t.type=n.type),t}function Lp(e,t,n=!1){if(!(0,Xr.isWrappingTypeNode)(e)&&!(0,Xr.isWrappingTypeNode)(t))return e.toString()===t.toString();if((0,Xr.isNonNullTypeNode)(t)){let r=(0,Xr.isNonNullTypeNode)(e)?e.type:e;return Lp(r,t.type)}return(0,Xr.isNonNullTypeNode)(e)?Lp(t,e,n):(0,Xr.isListTypeNode)(e)?(0,Xr.isListTypeNode)(t)&&Lp(e.type,t.type)||(0,Xr.isNonNullTypeNode)(t)&&Lp(e,t.type):!1}});var DS=w(JT=>{"use strict";m();T();N();Object.defineProperty(JT,"__esModule",{value:!0});JT.mergeInputType=void 0;var dne=Ae(),pne=Cp(),fne=ji();function mne(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,pne.mergeFields)(e,e.fields,t.fields,n),directives:(0,fne.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?Y(x({},e),{kind:dne.Kind.INPUT_OBJECT_TYPE_DEFINITION}):e}JT.mergeInputType=mne});var Bp=w(HT=>{"use strict";m();T();N();Object.defineProperty(HT,"__esModule",{value:!0});HT.mergeNamedTypeArray=void 0;var Nne=la();function Tne(e,t){return!!e.find(n=>n.name.value===t.name.value)}function Ene(e=[],t=[],n={}){let r=[...t,...e.filter(i=>!Tne(t,i))];return n&&n.sort&&r.sort(Nne.compareNodes),r}HT.mergeNamedTypeArray=Ene});var bS=w(zT=>{"use strict";m();T();N();Object.defineProperty(zT,"__esModule",{value:!0});zT.mergeInterface=void 0;var hne=Ae(),yne=Cp(),Ine=ji(),gne=Bp();function _ne(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,yne.mergeFields)(e,e.fields,t.fields,n),directives:(0,Ine.mergeDirectives)(e.directives,t.directives,n,r),interfaces:e.interfaces?(0,gne.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?Y(x({},e),{kind:hne.Kind.INTERFACE_TYPE_DEFINITION}):e}zT.mergeInterface=_ne});var AS=w(WT=>{"use strict";m();T();N();Object.defineProperty(WT,"__esModule",{value:!0});WT.mergeType=void 0;var vne=Ae(),Sne=Cp(),One=ji(),Dne=Bp();function bne(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,Sne.mergeFields)(e,e.fields,t.fields,n),directives:(0,One.mergeDirectives)(e.directives,t.directives,n,r),interfaces:(0,Dne.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?Y(x({},e),{kind:vne.Kind.OBJECT_TYPE_DEFINITION}):e}WT.mergeType=bne});var RS=w(XT=>{"use strict";m();T();N();Object.defineProperty(XT,"__esModule",{value:!0});XT.mergeScalar=void 0;var Ane=Ae(),Rne=ji();function Fne(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,Rne.mergeDirectives)(e.directives,t.directives,n,r)}:n!=null&&n.convertExtensions?Y(x({},e),{kind:Ane.Kind.SCALAR_TYPE_DEFINITION}):e}XT.mergeScalar=Fne});var PS=w(ZT=>{"use strict";m();T();N();Object.defineProperty(ZT,"__esModule",{value:!0});ZT.mergeUnion=void 0;var FS=Ae(),Pne=ji(),wne=Bp();function Lne(e,t,n,r){return t?{name:e.name,description:e.description||t.description,directives:(0,Pne.mergeDirectives)(e.directives,t.directives,n,r),kind:n!=null&&n.convertExtensions||e.kind==="UnionTypeDefinition"||t.kind==="UnionTypeDefinition"?FS.Kind.UNION_TYPE_DEFINITION:FS.Kind.UNION_TYPE_EXTENSION,loc:e.loc,types:(0,wne.mergeNamedTypeArray)(e.types,t.types,n)}:n!=null&&n.convertExtensions?Y(x({},e),{kind:FS.Kind.UNION_TYPE_DEFINITION}):e}ZT.mergeUnion=Lne});var wS=w(fc=>{"use strict";m();T();N();Object.defineProperty(fc,"__esModule",{value:!0});fc.mergeSchemaDefs=fc.DEFAULT_OPERATION_TYPE_NAME_MAP=void 0;var Up=Ae(),Cne=ji();fc.DEFAULT_OPERATION_TYPE_NAME_MAP={query:"Query",mutation:"Mutation",subscription:"Subscription"};function Bne(e=[],t=[]){let n=[];for(let r in fc.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 Une(e,t,n,r){return t?{kind:e.kind===Up.Kind.SCHEMA_DEFINITION||t.kind===Up.Kind.SCHEMA_DEFINITION?Up.Kind.SCHEMA_DEFINITION:Up.Kind.SCHEMA_EXTENSION,description:e.description||t.description,directives:(0,Cne.mergeDirectives)(e.directives,t.directives,n,r),operationTypes:Bne(e.operationTypes,t.operationTypes)}:n!=null&&n.convertExtensions?Y(x({},e),{kind:Up.Kind.SCHEMA_DEFINITION}):e}fc.mergeSchemaDefs=Une});var LS=w(Ka=>{"use strict";m();T();N();Object.defineProperty(Ka,"__esModule",{value:!0});Ka.mergeGraphQLNodes=Ka.isNamedDefinitionNode=Ka.schemaDefSymbol=void 0;var Br=Ae(),kne=AS(),Mne=SS(),xne=RS(),qne=PS(),Vne=DS(),jne=bS(),Kne=ji(),Gne=wS(),$ne=la();Ka.schemaDefSymbol="SCHEMA_DEF_SYMBOL";function Tk(e){return"name"in e}Ka.isNamedDefinitionNode=Tk;function Qne(e,t,n={}){var i,a,o;let r=n;for(let c of e)if(Tk(c)){let l=(i=c.name)==null?void 0:i.value;if(t!=null&&t.commentDescriptions&&(0,$ne.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 Br.Kind.OBJECT_TYPE_DEFINITION:case Br.Kind.OBJECT_TYPE_EXTENSION:r[l]=(0,kne.mergeType)(c,r[l],t,n);break;case Br.Kind.ENUM_TYPE_DEFINITION:case Br.Kind.ENUM_TYPE_EXTENSION:r[l]=(0,Mne.mergeEnum)(c,r[l],t,n);break;case Br.Kind.UNION_TYPE_DEFINITION:case Br.Kind.UNION_TYPE_EXTENSION:r[l]=(0,qne.mergeUnion)(c,r[l],t,n);break;case Br.Kind.SCALAR_TYPE_DEFINITION:case Br.Kind.SCALAR_TYPE_EXTENSION:r[l]=(0,xne.mergeScalar)(c,r[l],t,n);break;case Br.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Br.Kind.INPUT_OBJECT_TYPE_EXTENSION:r[l]=(0,Vne.mergeInputType)(c,r[l],t,n);break;case Br.Kind.INTERFACE_TYPE_DEFINITION:case Br.Kind.INTERFACE_TYPE_EXTENSION:r[l]=(0,jne.mergeInterface)(c,r[l],t,n);break;case Br.Kind.DIRECTIVE_DEFINITION:r[l]=(0,Kne.mergeDirective)(c,r[l]);break}}else(c.kind===Br.Kind.SCHEMA_DEFINITION||c.kind===Br.Kind.SCHEMA_EXTENSION)&&(r[Ka.schemaDefSymbol]=(0,Gne.mergeSchemaDefs)(c,r[Ka.schemaDefSymbol],t));return r}Ka.mergeGraphQLNodes=Qne});var yk=w(ql=>{"use strict";m();T();N();Object.defineProperty(ql,"__esModule",{value:!0});ql.mergeGraphQLTypes=ql.mergeTypeDefs=void 0;var Ki=Ae(),CS=QT(),kl=LS(),xl=la(),Ek=wS();function Yne(e,t){(0,xl.resetComments)();let n={kind:Ki.Kind.DOCUMENT,definitions:hk(e,x({useSchemaDefinition:!0,forceSchemaDefinition:!1,throwOnConflict:!1,commentDescriptions:!1},t))},r;return t!=null&&t.commentDescriptions?r=(0,xl.printWithComments)(n):r=n,(0,xl.resetComments)(),r}ql.mergeTypeDefs=Yne;function Ml(e,t,n=[],r=[],i=new Set){if(e&&!i.has(e))if(i.add(e),typeof e=="function")Ml(e(),t,n,r,i);else if(Array.isArray(e))for(let a of e)Ml(a,t,n,r,i);else if((0,Ki.isSchema)(e)){let a=(0,xl.getDocumentNodeFromSchema)(e,t);Ml(a.definitions,t,n,r,i)}else if((0,CS.isStringTypes)(e)||(0,CS.isSourceTypes)(e)){let a=(0,Ki.parse)(e,t);Ml(a.definitions,t,n,r,i)}else if(typeof e=="object"&&(0,Ki.isDefinitionNode)(e))e.kind===Ki.Kind.DIRECTIVE_DEFINITION?n.push(e):r.push(e);else if((0,xl.isDocumentNode)(e))Ml(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 hk(e,t){var c,l,d;(0,xl.resetComments)();let{allDirectives:n,allNodes:r}=Ml(e,t),i=(0,kl.mergeGraphQLNodes)(n,t),a=(0,kl.mergeGraphQLNodes)(r,t,i);if(t!=null&&t.useSchemaDefinition){let f=a[kl.schemaDefSymbol]||{kind:Ki.Kind.SCHEMA_DEFINITION,operationTypes:[]},y=f.operationTypes;for(let I in Ek.DEFAULT_OPERATION_TYPE_NAME_MAP)if(!y.find(P=>P.operation===I)){let P=Ek.DEFAULT_OPERATION_TYPE_NAME_MAP[I],k=a[P];k!=null&&k.name!=null&&y.push({kind:Ki.Kind.OPERATION_TYPE_DEFINITION,type:{kind:Ki.Kind.NAMED_TYPE,name:k.name},operation:I})}((c=f==null?void 0:f.operationTypes)==null?void 0:c.length)!=null&&f.operationTypes.length>0&&(a[kl.schemaDefSymbol]=f)}t!=null&&t.forceSchemaDefinition&&!((d=(l=a[kl.schemaDefSymbol])==null?void 0:l.operationTypes)!=null&&d.length)&&(a[kl.schemaDefSymbol]={kind:Ki.Kind.SCHEMA_DEFINITION,operationTypes:[{kind:Ki.Kind.OPERATION_TYPE_DEFINITION,operation:"query",type:{kind:Ki.Kind.NAMED_TYPE,name:{kind:Ki.Kind.NAME,value:"Query"}}}]});let o=Object.values(a);if(t!=null&&t.sort){let f=typeof t.sort=="function"?t.sort:CS.defaultStringComparator;o.sort((y,I)=>{var v,P;return f((v=y.name)==null?void 0:v.value,(P=I.name)==null?void 0:P.value)})}return o}ql.mergeGraphQLTypes=hk});var Ik=w(Dr=>{"use strict";m();T();N();Object.defineProperty(Dr,"__esModule",{value:!0});var Zr=(Sv(),cm(vv));Zr.__exportStar(_S(),Dr);Zr.__exportStar(ji(),Dr);Zr.__exportStar(vS(),Dr);Zr.__exportStar(SS(),Dr);Zr.__exportStar(Cp(),Dr);Zr.__exportStar(DS(),Dr);Zr.__exportStar(bS(),Dr);Zr.__exportStar(Bp(),Dr);Zr.__exportStar(LS(),Dr);Zr.__exportStar(yk(),Dr);Zr.__exportStar(RS(),Dr);Zr.__exportStar(AS(),Dr);Zr.__exportStar(PS(),Dr);Zr.__exportStar(QT(),Dr)});var _k=w(fu=>{"use strict";m();T();N();Object.defineProperty(fu,"__esModule",{value:!0});fu.applyExtensions=fu.mergeExtensions=fu.extractExtensionsFromSchema=void 0;var gk=la(),Jne=la();Object.defineProperty(fu,"extractExtensionsFromSchema",{enumerable:!0,get:function(){return Jne.extractExtensionsFromSchema}});function Hne(e){return(0,gk.mergeDeep)(e)}fu.mergeExtensions=Hne;function Vl(e,t){e&&(e.extensions=(0,gk.mergeDeep)([e.extensions||{},t||{}]))}function zne(e,t){Vl(e,t.schemaExtensions);for(let[n,r]of Object.entries(t.types||{})){let i=e.getType(n);if(i){if(Vl(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){Vl(c,o.extensions);for(let[l,d]of Object.entries(o.arguments))Vl(c.args.find(f=>f.name===l),d)}}else if(r.type==="input")for(let[a,o]of Object.entries(r.fields)){let c=i.getFields()[a];Vl(c,o.extensions)}else if(r.type==="enum")for(let[a,o]of Object.entries(r.values)){let c=i.getValue(a);Vl(c,o)}}}return e}fu.applyExtensions=zne});var eE=w(kp=>{"use strict";m();T();N();Object.defineProperty(kp,"__esModule",{value:!0});var BS=(Sv(),cm(vv));BS.__exportStar(ck(),kp);BS.__exportStar(Ik(),kp);BS.__exportStar(_k(),kp)});var oa=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=Zne;z.incompatibleInputValueDefaultValueTypeError=ere;z.incompatibleMergedTypesError=tre;z.incompatibleInputValueDefaultValuesError=nre;z.incompatibleSharedEnumError=rre;z.invalidSubgraphNamesError=ire;z.duplicateDirectiveDefinitionError=are;z.duplicateEnumValueDefinitionError=sre;z.duplicateFieldDefinitionError=ore;z.duplicateInputFieldDefinitionError=ure;z.duplicateImplementedInterfaceError=cre;z.duplicateUnionMemberDefinitionError=lre;z.duplicateTypeDefinitionError=dre;z.duplicateOperationTypeDefinitionError=pre;z.noBaseDefinitionForExtensionError=fre;z.noBaseScalarDefinitionError=mre;z.noDefinedUnionMembersError=Nre;z.noDefinedEnumValuesError=Tre;z.operationDefinitionError=Ere;z.invalidFieldShareabilityError=hre;z.undefinedDirectiveError=yre;z.undefinedTypeError=Ire;z.invalidRepeatedDirectiveErrorMessage=gre;z.invalidDirectiveError=_re;z.invalidRepeatedFederatedDirectiveErrorMessage=vre;z.invalidDirectiveLocationErrorMessage=Sre;z.undefinedRequiredArgumentsErrorMessage=Ore;z.unexpectedDirectiveArgumentErrorMessage=Dre;z.duplicateDirectiveArgumentDefinitionsErrorMessage=bre;z.invalidArgumentValueErrorMessage=Are;z.maximumTypeNestingExceededError=Rre;z.unexpectedKindFatalError=Fre;z.incompatibleParentKindFatalError=Pre;z.unexpectedEdgeFatalError=wre;z.incompatibleParentKindMergeError=Lre;z.fieldTypeMergeFatalError=Cre;z.unexpectedTypeNodeKindFatalError=Bre;z.invalidKeyFatalError=Ure;z.unexpectedParentKindForChildError=kre;z.subgraphValidationError=Mre;z.invalidSubgraphNameErrorMessage=xre;z.invalidOperationTypeDefinitionError=qre;z.invalidRootTypeDefinitionError=Vre;z.subgraphInvalidSyntaxError=jre;z.invalidInterfaceImplementationError=Kre;z.invalidRequiredInputValueError=Gre;z.duplicateArgumentsError=$re;z.noQueryRootTypeError=Qre;z.expectedEntityError=Yre;z.abstractTypeInKeyFieldSetErrorMessage=Jre;z.unknownTypeInFieldSetErrorMessage=Hre;z.invalidSelectionSetErrorMessage=zre;z.invalidSelectionSetDefinitionErrorMessage=Wre;z.undefinedFieldInFieldSetErrorMessage=Xre;z.unparsableFieldSetErrorMessage=Zre;z.unparsableFieldSetSelectionErrorMessage=eie;z.undefinedCompositeOutputTypeError=tie;z.unexpectedArgumentErrorMessage=nie;z.argumentsInKeyFieldSetErrorMessage=rie;z.invalidProvidesOrRequiresDirectivesError=iie;z.duplicateFieldInFieldSetErrorMessage=aie;z.invalidConfigurationDataErrorMessage=sie;z.incompatibleTypeWithProvidesErrorMessage=oie;z.invalidInlineFragmentTypeErrorMessage=uie;z.inlineFragmentWithoutTypeConditionErrorMessage=cie;z.unknownInlineFragmentTypeConditionErrorMessage=lie;z.invalidInlineFragmentTypeConditionTypeErrorMessage=die;z.invalidInlineFragmentTypeConditionErrorMessage=pie;z.invalidSelectionOnUnionErrorMessage=fie;z.duplicateOverriddenFieldErrorMessage=mie;z.duplicateOverriddenFieldsError=Nie;z.noFieldDefinitionsError=Tie;z.noInputValueDefinitionsError=Eie;z.allChildDefinitionsAreInaccessibleError=hie;z.equivalentSourceAndTargetOverrideErrorMessage=yie;z.undefinedEntityInterfaceImplementationsError=Iie;z.orScopesLimitError=gie;z.invalidEventDrivenGraphError=_ie;z.invalidRootTypeFieldEventsDirectivesErrorMessage=vie;z.invalidEventDrivenMutationResponseTypeErrorMessage=Sie;z.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage=Oie;z.invalidNatsStreamInputFieldsErrorMessage=Die;z.invalidKeyFieldSetsEventDrivenErrorMessage=bie;z.nonExternalKeyFieldNamesEventDrivenErrorMessage=Aie;z.nonKeyFieldNamesEventDrivenErrorMessage=Rie;z.nonEntityObjectExtensionsEventDrivenErrorMessage=Fie;z.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage=Pie;z.invalidEdfsDirectiveName=wie;z.invalidImplementedTypeError=Lie;z.selfImplementationError=Cie;z.invalidEventSubjectErrorMessage=Bie;z.invalidEventSubjectsErrorMessage=Uie;z.invalidEventSubjectsItemErrorMessage=kie;z.invalidEventSubjectsArgumentErrorMessage=Mie;z.undefinedEventSubjectsArgumentErrorMessage=xie;z.invalidEventDirectiveError=qie;z.invalidReferencesOfInaccessibleTypeError=Vie;z.inaccessibleRequiredInputValueError=jie;z.invalidUnionMemberTypeError=Kie;z.invalidRootTypeError=Gie;z.invalidSubscriptionFilterLocationError=$ie;z.invalidSubscriptionFilterDirectiveError=Qie;z.subscriptionFilterNamedTypeErrorMessage=Yie;z.subscriptionFilterConditionDepthExceededErrorMessage=Jie;z.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage=Hie;z.subscriptionFilterConditionInvalidInputFieldErrorMessage=zie;z.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage=Wie;z.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage=Xie;z.subscriptionFilterArrayConditionInvalidLengthErrorMessage=Zie;z.invalidInputFieldTypeErrorMessage=eae;z.subscriptionFieldConditionInvalidInputFieldErrorMessage=tae;z.subscriptionFieldConditionInvalidValuesArrayErrorMessage=nae;z.subscriptionFieldConditionEmptyValuesArrayErrorMessage=rae;z.unknownFieldSubgraphNameError=iae;z.invalidSubscriptionFieldConditionFieldPathErrorMessage=aae;z.invalidSubscriptionFieldConditionFieldPathParentErrorMessage=sae;z.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage=oae;z.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage=uae;z.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage=cae;z.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage=lae;z.unresolvablePathError=dae;z.allExternalFieldInstancesError=pae;z.externalInterfaceFieldsError=fae;z.nonExternalConditionalFieldError=mae;z.incompatibleFederatedFieldNamedTypeError=Nae;z.unknownNamedTypeErrorMessage=Ak;z.unknownNamedTypeError=Tae;z.unknownFieldDataError=Eae;z.unexpectedNonCompositeOutputTypeError=hae;z.invalidExternalDirectiveError=yae;z.configureDescriptionNoDescriptionError=Iae;z.configureDescriptionPropagationError=gae;z.duplicateDirectiveDefinitionArgumentErrorMessage=_ae;z.duplicateDirectiveDefinitionLocationErrorMessage=vae;z.invalidDirectiveDefinitionLocationErrorMessage=Sae;z.invalidDirectiveDefinitionError=Oae;z.fieldAlreadyProvidedErrorMessage=Dae;z.invalidInterfaceObjectImplementationDefinitionsError=bae;z.invalidNamedTypeError=Aae;z.semanticNonNullLevelsNaNIndexErrorMessage=Rae;z.semanticNonNullLevelsIndexOutOfBoundsErrorMessage=Fae;z.semanticNonNullLevelsNonNullErrorMessage=Pae;z.semanticNonNullInconsistentLevelsError=wae;z.oneOfRequiredFieldsError=Lae;var vk=Ae(),He=ur(),Sk=Tl(),jl=Hr(),Wne=yl(),Xne=eE();z.minimumSubgraphRequirementError=new Error("At least one subgraph is required for federation.");function Zne(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 ere(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 tre({actualType:e,coords:t,expectedType:n,isArgument:r}){return new Error(`Incompatible types when merging two instances of ${r?"field argument":He.FIELD} "${t}": - Expected type "${n}" but received "${e}".`)}function nre(e,t,n,r,i){return new Error(`Expected the ${e} defined on path "${t}" to define the default value "${r}". + ${n}`)}function Nne(e,t){return t?(mne(e,t),Q(x({},e),{locations:[...t.locations,...e.locations.filter(n=>!dne(n,t.locations))]})):e}ql.mergeDirective=Nne;function Tne(e,t,n){return e.concat(t.filter(r=>n(r,e)))}});var kS=w(JT=>{"use strict";m();T();N();Object.defineProperty(JT,"__esModule",{value:!0});JT.mergeEnumValues=void 0;var Ene=Gi(),hne=da();function yne(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,Ene.mergeDirectives)(o.directives,l.directives,r)}else i.set(c,o)}let a=[...i.values()];return n&&n.sort&&a.sort(hne.compareNodes),a}JT.mergeEnumValues=yne});var MS=w(HT=>{"use strict";m();T();N();Object.defineProperty(HT,"__esModule",{value:!0});HT.mergeEnum=void 0;var Ine=Ae(),gne=Gi(),_ne=kS();function vne(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,gne.mergeDirectives)(e.directives,t.directives,n,r),values:(0,_ne.mergeEnumValues)(e.values,t.values,n)}:n!=null&&n.convertExtensions?Q(x({},e),{kind:Ine.Kind.ENUM_TYPE_DEFINITION}):e}HT.mergeEnum=vne});var zT=w(Vn=>{"use strict";m();T();N();Object.defineProperty(Vn,"__esModule",{value:!0});Vn.defaultStringComparator=Vn.CompareVal=Vn.printTypeNode=Vn.isNonNullTypeNode=Vn.isListTypeNode=Vn.isWrappingTypeNode=Vn.extractType=Vn.isSourceTypes=Vn.isStringTypes=void 0;var Up=Ae();function Sne(e){return typeof e=="string"}Vn.isStringTypes=Sne;function One(e){return e instanceof Up.Source}Vn.isSourceTypes=One;function Dne(e){let t=e;for(;t.kind===Up.Kind.LIST_TYPE||t.kind==="NonNullType";)t=t.type;return t}Vn.extractType=Dne;function bne(e){return e.kind!==Up.Kind.NAMED_TYPE}Vn.isWrappingTypeNode=bne;function Uk(e){return e.kind===Up.Kind.LIST_TYPE}Vn.isListTypeNode=Uk;function kk(e){return e.kind===Up.Kind.NON_NULL_TYPE}Vn.isNonNullTypeNode=kk;function xS(e){return Uk(e)?`[${xS(e.type)}]`:kk(e)?`${xS(e.type)}!`:e.name.value}Vn.printTypeNode=xS;var Tc;(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"})(Tc=Vn.CompareVal||(Vn.CompareVal={}));function Ane(e,t){return e==null&&t==null?Tc.A_EQUALS_B:e==null?Tc.A_SMALLER_THAN_B:t==null?Tc.A_GREATER_THAN_B:et?Tc.A_GREATER_THAN_B:Tc.A_EQUALS_B}Vn.defaultStringComparator=Ane});var Mp=w(WT=>{"use strict";m();T();N();Object.defineProperty(WT,"__esModule",{value:!0});WT.mergeFields=void 0;var Xr=zT(),Rne=Gi(),Pne=da(),Fne=US();function wne(e,t){let n=e.findIndex(r=>r.name.value===t.name.value);return[n>-1?e[n]:null,n]}function Lne(e,t,n,r,i){let a=[];if(n!=null&&a.push(...n),t!=null)for(let o of t){let[c,l]=wne(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)||Cne(e,c,o,r==null?void 0:r.throwOnConflict);d.arguments=(0,Fne.mergeArguments)(o.arguments||[],c.arguments||[],r),d.directives=(0,Rne.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(Pne.compareNodes),r&&r.exclusions){let o=r.exclusions;return a.filter(c=>!o.includes(`${e.name.value}.${c.name.value}`))}return a}WT.mergeFields=Lne;function Cne(e,t,n,r=!1){let i=(0,Xr.printTypeNode)(t.type),a=(0,Xr.printTypeNode)(n.type);if(i!==a){let o=(0,Xr.extractType)(t.type),c=(0,Xr.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(!kp(t.type,n.type,!r))throw new Error(`Field '${e.name.value}.${t.name.value}' changed type from '${i}' to '${a}'`)}return(0,Xr.isNonNullTypeNode)(n.type)&&!(0,Xr.isNonNullTypeNode)(t.type)&&(t.type=n.type),t}function kp(e,t,n=!1){if(!(0,Xr.isWrappingTypeNode)(e)&&!(0,Xr.isWrappingTypeNode)(t))return e.toString()===t.toString();if((0,Xr.isNonNullTypeNode)(t)){let r=(0,Xr.isNonNullTypeNode)(e)?e.type:e;return kp(r,t.type)}return(0,Xr.isNonNullTypeNode)(e)?kp(t,e,n):(0,Xr.isListTypeNode)(e)?(0,Xr.isListTypeNode)(t)&&kp(e.type,t.type)||(0,Xr.isNonNullTypeNode)(t)&&kp(e,t.type):!1}});var qS=w(XT=>{"use strict";m();T();N();Object.defineProperty(XT,"__esModule",{value:!0});XT.mergeInputType=void 0;var Bne=Ae(),Une=Mp(),kne=Gi();function Mne(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,Une.mergeFields)(e,e.fields,t.fields,n),directives:(0,kne.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(x({},e),{kind:Bne.Kind.INPUT_OBJECT_TYPE_DEFINITION}):e}XT.mergeInputType=Mne});var xp=w(ZT=>{"use strict";m();T();N();Object.defineProperty(ZT,"__esModule",{value:!0});ZT.mergeNamedTypeArray=void 0;var xne=da();function qne(e,t){return!!e.find(n=>n.name.value===t.name.value)}function Vne(e=[],t=[],n={}){let r=[...t,...e.filter(i=>!qne(t,i))];return n&&n.sort&&r.sort(xne.compareNodes),r}ZT.mergeNamedTypeArray=Vne});var VS=w(eE=>{"use strict";m();T();N();Object.defineProperty(eE,"__esModule",{value:!0});eE.mergeInterface=void 0;var jne=Ae(),Kne=Mp(),Gne=Gi(),$ne=xp();function Qne(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,Kne.mergeFields)(e,e.fields,t.fields,n),directives:(0,Gne.mergeDirectives)(e.directives,t.directives,n,r),interfaces:e.interfaces?(0,$ne.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(x({},e),{kind:jne.Kind.INTERFACE_TYPE_DEFINITION}):e}eE.mergeInterface=Qne});var jS=w(tE=>{"use strict";m();T();N();Object.defineProperty(tE,"__esModule",{value:!0});tE.mergeType=void 0;var Yne=Ae(),Jne=Mp(),Hne=Gi(),zne=xp();function Wne(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,Jne.mergeFields)(e,e.fields,t.fields,n),directives:(0,Hne.mergeDirectives)(e.directives,t.directives,n,r),interfaces:(0,zne.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(x({},e),{kind:Yne.Kind.OBJECT_TYPE_DEFINITION}):e}tE.mergeType=Wne});var KS=w(nE=>{"use strict";m();T();N();Object.defineProperty(nE,"__esModule",{value:!0});nE.mergeScalar=void 0;var Xne=Ae(),Zne=Gi();function ere(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,Zne.mergeDirectives)(e.directives,t.directives,n,r)}:n!=null&&n.convertExtensions?Q(x({},e),{kind:Xne.Kind.SCALAR_TYPE_DEFINITION}):e}nE.mergeScalar=ere});var $S=w(rE=>{"use strict";m();T();N();Object.defineProperty(rE,"__esModule",{value:!0});rE.mergeUnion=void 0;var GS=Ae(),tre=Gi(),nre=xp();function rre(e,t,n,r){return t?{name:e.name,description:e.description||t.description,directives:(0,tre.mergeDirectives)(e.directives,t.directives,n,r),kind:n!=null&&n.convertExtensions||e.kind==="UnionTypeDefinition"||t.kind==="UnionTypeDefinition"?GS.Kind.UNION_TYPE_DEFINITION:GS.Kind.UNION_TYPE_EXTENSION,loc:e.loc,types:(0,nre.mergeNamedTypeArray)(e.types,t.types,n)}:n!=null&&n.convertExtensions?Q(x({},e),{kind:GS.Kind.UNION_TYPE_DEFINITION}):e}rE.mergeUnion=rre});var QS=w(Ec=>{"use strict";m();T();N();Object.defineProperty(Ec,"__esModule",{value:!0});Ec.mergeSchemaDefs=Ec.DEFAULT_OPERATION_TYPE_NAME_MAP=void 0;var qp=Ae(),ire=Gi();Ec.DEFAULT_OPERATION_TYPE_NAME_MAP={query:"Query",mutation:"Mutation",subscription:"Subscription"};function are(e=[],t=[]){let n=[];for(let r in Ec.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 sre(e,t,n,r){return t?{kind:e.kind===qp.Kind.SCHEMA_DEFINITION||t.kind===qp.Kind.SCHEMA_DEFINITION?qp.Kind.SCHEMA_DEFINITION:qp.Kind.SCHEMA_EXTENSION,description:e.description||t.description,directives:(0,ire.mergeDirectives)(e.directives,t.directives,n,r),operationTypes:are(e.operationTypes,t.operationTypes)}:n!=null&&n.convertExtensions?Q(x({},e),{kind:qp.Kind.SCHEMA_DEFINITION}):e}Ec.mergeSchemaDefs=sre});var YS=w($a=>{"use strict";m();T();N();Object.defineProperty($a,"__esModule",{value:!0});$a.mergeGraphQLNodes=$a.isNamedDefinitionNode=$a.schemaDefSymbol=void 0;var kr=Ae(),ore=jS(),ure=MS(),cre=KS(),lre=$S(),dre=qS(),pre=VS(),fre=Gi(),mre=QS(),Nre=da();$a.schemaDefSymbol="SCHEMA_DEF_SYMBOL";function Mk(e){return"name"in e}$a.isNamedDefinitionNode=Mk;function Tre(e,t,n={}){var i,a,o;let r=n;for(let c of e)if(Mk(c)){let l=(i=c.name)==null?void 0:i.value;if(t!=null&&t.commentDescriptions&&(0,Nre.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 kr.Kind.OBJECT_TYPE_DEFINITION:case kr.Kind.OBJECT_TYPE_EXTENSION:r[l]=(0,ore.mergeType)(c,r[l],t,n);break;case kr.Kind.ENUM_TYPE_DEFINITION:case kr.Kind.ENUM_TYPE_EXTENSION:r[l]=(0,ure.mergeEnum)(c,r[l],t,n);break;case kr.Kind.UNION_TYPE_DEFINITION:case kr.Kind.UNION_TYPE_EXTENSION:r[l]=(0,lre.mergeUnion)(c,r[l],t,n);break;case kr.Kind.SCALAR_TYPE_DEFINITION:case kr.Kind.SCALAR_TYPE_EXTENSION:r[l]=(0,cre.mergeScalar)(c,r[l],t,n);break;case kr.Kind.INPUT_OBJECT_TYPE_DEFINITION:case kr.Kind.INPUT_OBJECT_TYPE_EXTENSION:r[l]=(0,dre.mergeInputType)(c,r[l],t,n);break;case kr.Kind.INTERFACE_TYPE_DEFINITION:case kr.Kind.INTERFACE_TYPE_EXTENSION:r[l]=(0,pre.mergeInterface)(c,r[l],t,n);break;case kr.Kind.DIRECTIVE_DEFINITION:r[l]=(0,fre.mergeDirective)(c,r[l]);break}}else(c.kind===kr.Kind.SCHEMA_DEFINITION||c.kind===kr.Kind.SCHEMA_EXTENSION)&&(r[$a.schemaDefSymbol]=(0,mre.mergeSchemaDefs)(c,r[$a.schemaDefSymbol],t));return r}$a.mergeGraphQLNodes=Tre});var Vk=w(Gl=>{"use strict";m();T();N();Object.defineProperty(Gl,"__esModule",{value:!0});Gl.mergeGraphQLTypes=Gl.mergeTypeDefs=void 0;var $i=Ae(),JS=zT(),Vl=YS(),Kl=da(),xk=QS();function Ere(e,t){(0,Kl.resetComments)();let n={kind:$i.Kind.DOCUMENT,definitions:qk(e,x({useSchemaDefinition:!0,forceSchemaDefinition:!1,throwOnConflict:!1,commentDescriptions:!1},t))},r;return t!=null&&t.commentDescriptions?r=(0,Kl.printWithComments)(n):r=n,(0,Kl.resetComments)(),r}Gl.mergeTypeDefs=Ere;function jl(e,t,n=[],r=[],i=new Set){if(e&&!i.has(e))if(i.add(e),typeof e=="function")jl(e(),t,n,r,i);else if(Array.isArray(e))for(let a of e)jl(a,t,n,r,i);else if((0,$i.isSchema)(e)){let a=(0,Kl.getDocumentNodeFromSchema)(e,t);jl(a.definitions,t,n,r,i)}else if((0,JS.isStringTypes)(e)||(0,JS.isSourceTypes)(e)){let a=(0,$i.parse)(e,t);jl(a.definitions,t,n,r,i)}else if(typeof e=="object"&&(0,$i.isDefinitionNode)(e))e.kind===$i.Kind.DIRECTIVE_DEFINITION?n.push(e):r.push(e);else if((0,Kl.isDocumentNode)(e))jl(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 qk(e,t){var c,l,d;(0,Kl.resetComments)();let{allDirectives:n,allNodes:r}=jl(e,t),i=(0,Vl.mergeGraphQLNodes)(n,t),a=(0,Vl.mergeGraphQLNodes)(r,t,i);if(t!=null&&t.useSchemaDefinition){let f=a[Vl.schemaDefSymbol]||{kind:$i.Kind.SCHEMA_DEFINITION,operationTypes:[]},y=f.operationTypes;for(let I in xk.DEFAULT_OPERATION_TYPE_NAME_MAP)if(!y.find(F=>F.operation===I)){let F=xk.DEFAULT_OPERATION_TYPE_NAME_MAP[I],k=a[F];k!=null&&k.name!=null&&y.push({kind:$i.Kind.OPERATION_TYPE_DEFINITION,type:{kind:$i.Kind.NAMED_TYPE,name:k.name},operation:I})}((c=f==null?void 0:f.operationTypes)==null?void 0:c.length)!=null&&f.operationTypes.length>0&&(a[Vl.schemaDefSymbol]=f)}t!=null&&t.forceSchemaDefinition&&!((d=(l=a[Vl.schemaDefSymbol])==null?void 0:l.operationTypes)!=null&&d.length)&&(a[Vl.schemaDefSymbol]={kind:$i.Kind.SCHEMA_DEFINITION,operationTypes:[{kind:$i.Kind.OPERATION_TYPE_DEFINITION,operation:"query",type:{kind:$i.Kind.NAMED_TYPE,name:{kind:$i.Kind.NAME,value:"Query"}}}]});let o=Object.values(a);if(t!=null&&t.sort){let f=typeof t.sort=="function"?t.sort:JS.defaultStringComparator;o.sort((y,I)=>{var v,F;return f((v=y.name)==null?void 0:v.value,(F=I.name)==null?void 0:F.value)})}return o}Gl.mergeGraphQLTypes=qk});var jk=w(Ar=>{"use strict";m();T();N();Object.defineProperty(Ar,"__esModule",{value:!0});var Zr=(Mv(),fm(kv));Zr.__exportStar(US(),Ar);Zr.__exportStar(Gi(),Ar);Zr.__exportStar(kS(),Ar);Zr.__exportStar(MS(),Ar);Zr.__exportStar(Mp(),Ar);Zr.__exportStar(qS(),Ar);Zr.__exportStar(VS(),Ar);Zr.__exportStar(xp(),Ar);Zr.__exportStar(YS(),Ar);Zr.__exportStar(Vk(),Ar);Zr.__exportStar(KS(),Ar);Zr.__exportStar(jS(),Ar);Zr.__exportStar($S(),Ar);Zr.__exportStar(zT(),Ar)});var Gk=w(Eu=>{"use strict";m();T();N();Object.defineProperty(Eu,"__esModule",{value:!0});Eu.applyExtensions=Eu.mergeExtensions=Eu.extractExtensionsFromSchema=void 0;var Kk=da(),hre=da();Object.defineProperty(Eu,"extractExtensionsFromSchema",{enumerable:!0,get:function(){return hre.extractExtensionsFromSchema}});function yre(e){return(0,Kk.mergeDeep)(e)}Eu.mergeExtensions=yre;function $l(e,t){e&&(e.extensions=(0,Kk.mergeDeep)([e.extensions||{},t||{}]))}function Ire(e,t){$l(e,t.schemaExtensions);for(let[n,r]of Object.entries(t.types||{})){let i=e.getType(n);if(i){if($l(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){$l(c,o.extensions);for(let[l,d]of Object.entries(o.arguments))$l(c.args.find(f=>f.name===l),d)}}else if(r.type==="input")for(let[a,o]of Object.entries(r.fields)){let c=i.getFields()[a];$l(c,o.extensions)}else if(r.type==="enum")for(let[a,o]of Object.entries(r.values)){let c=i.getValue(a);$l(c,o)}}}return e}Eu.applyExtensions=Ire});var iE=w(Vp=>{"use strict";m();T();N();Object.defineProperty(Vp,"__esModule",{value:!0});var HS=(Mv(),fm(kv));HS.__exportStar(Fk(),Vp);HS.__exportStar(jk(),Vp);HS.__exportStar(Gk(),Vp)});var Mi=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=vre;z.incompatibleInputValueDefaultValueTypeError=Sre;z.incompatibleMergedTypesError=Ore;z.incompatibleInputValueDefaultValuesError=Dre;z.incompatibleSharedEnumError=bre;z.invalidSubgraphNamesError=Are;z.duplicateDirectiveDefinitionError=Rre;z.duplicateEnumValueDefinitionError=Pre;z.duplicateFieldDefinitionError=Fre;z.duplicateInputFieldDefinitionError=wre;z.duplicateImplementedInterfaceError=Lre;z.duplicateUnionMemberDefinitionError=Cre;z.duplicateTypeDefinitionError=Bre;z.duplicateOperationTypeDefinitionError=Ure;z.noBaseDefinitionForExtensionError=kre;z.noBaseScalarDefinitionError=Mre;z.noDefinedUnionMembersError=xre;z.noDefinedEnumValuesError=qre;z.operationDefinitionError=Vre;z.invalidFieldShareabilityError=jre;z.undefinedDirectiveError=Kre;z.undefinedTypeError=Gre;z.invalidRepeatedDirectiveErrorMessage=$re;z.invalidDirectiveError=Qre;z.invalidRepeatedFederatedDirectiveErrorMessage=Yre;z.invalidDirectiveLocationErrorMessage=Jre;z.undefinedRequiredArgumentsErrorMessage=Hre;z.unexpectedDirectiveArgumentErrorMessage=zre;z.duplicateDirectiveArgumentDefinitionsErrorMessage=Wre;z.invalidArgumentValueErrorMessage=Xre;z.maximumTypeNestingExceededError=Zre;z.unexpectedKindFatalError=eie;z.incompatibleParentKindFatalError=tie;z.unexpectedEdgeFatalError=nie;z.incompatibleParentKindMergeError=rie;z.fieldTypeMergeFatalError=iie;z.unexpectedTypeNodeKindFatalError=aie;z.invalidKeyFatalError=sie;z.unexpectedParentKindForChildError=oie;z.subgraphValidationError=uie;z.invalidSubgraphNameErrorMessage=cie;z.invalidOperationTypeDefinitionError=lie;z.invalidRootTypeDefinitionError=die;z.subgraphInvalidSyntaxError=pie;z.invalidInterfaceImplementationError=fie;z.invalidRequiredInputValueError=mie;z.duplicateArgumentsError=Nie;z.noQueryRootTypeError=Tie;z.expectedEntityError=Eie;z.abstractTypeInKeyFieldSetErrorMessage=hie;z.unknownTypeInFieldSetErrorMessage=yie;z.invalidSelectionSetErrorMessage=Iie;z.invalidSelectionSetDefinitionErrorMessage=gie;z.undefinedFieldInFieldSetErrorMessage=_ie;z.unparsableFieldSetErrorMessage=vie;z.unparsableFieldSetSelectionErrorMessage=Sie;z.undefinedCompositeOutputTypeError=Oie;z.unexpectedArgumentErrorMessage=Die;z.argumentsInKeyFieldSetErrorMessage=bie;z.invalidProvidesOrRequiresDirectivesError=Aie;z.duplicateFieldInFieldSetErrorMessage=Rie;z.invalidConfigurationDataErrorMessage=Pie;z.incompatibleTypeWithProvidesErrorMessage=Fie;z.invalidInlineFragmentTypeErrorMessage=wie;z.inlineFragmentWithoutTypeConditionErrorMessage=Lie;z.unknownInlineFragmentTypeConditionErrorMessage=Cie;z.invalidInlineFragmentTypeConditionTypeErrorMessage=Bie;z.invalidInlineFragmentTypeConditionErrorMessage=Uie;z.invalidSelectionOnUnionErrorMessage=kie;z.duplicateOverriddenFieldErrorMessage=Mie;z.duplicateOverriddenFieldsError=xie;z.noFieldDefinitionsError=qie;z.noInputValueDefinitionsError=Vie;z.allChildDefinitionsAreInaccessibleError=jie;z.equivalentSourceAndTargetOverrideErrorMessage=Kie;z.undefinedEntityInterfaceImplementationsError=Gie;z.orScopesLimitError=$ie;z.invalidEventDrivenGraphError=Qie;z.invalidRootTypeFieldEventsDirectivesErrorMessage=Yie;z.invalidEventDrivenMutationResponseTypeErrorMessage=Jie;z.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage=Hie;z.invalidNatsStreamInputFieldsErrorMessage=zie;z.invalidKeyFieldSetsEventDrivenErrorMessage=Wie;z.nonExternalKeyFieldNamesEventDrivenErrorMessage=Xie;z.nonKeyFieldNamesEventDrivenErrorMessage=Zie;z.nonEntityObjectExtensionsEventDrivenErrorMessage=eae;z.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage=tae;z.invalidEdfsDirectiveName=nae;z.invalidImplementedTypeError=rae;z.selfImplementationError=iae;z.invalidEventSubjectErrorMessage=aae;z.invalidEventSubjectsErrorMessage=sae;z.invalidEventSubjectsItemErrorMessage=oae;z.invalidEventSubjectsArgumentErrorMessage=uae;z.undefinedEventSubjectsArgumentErrorMessage=cae;z.invalidEventDirectiveError=lae;z.invalidReferencesOfInaccessibleTypeError=dae;z.inaccessibleRequiredInputValueError=pae;z.invalidUnionMemberTypeError=fae;z.invalidRootTypeError=mae;z.invalidSubscriptionFilterLocationError=Nae;z.invalidSubscriptionFilterDirectiveError=Tae;z.subscriptionFilterNamedTypeErrorMessage=Eae;z.subscriptionFilterConditionDepthExceededErrorMessage=hae;z.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage=yae;z.subscriptionFilterConditionInvalidInputFieldErrorMessage=Iae;z.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage=gae;z.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage=_ae;z.subscriptionFilterArrayConditionInvalidLengthErrorMessage=vae;z.invalidInputFieldTypeErrorMessage=Sae;z.subscriptionFieldConditionInvalidInputFieldErrorMessage=Oae;z.subscriptionFieldConditionInvalidValuesArrayErrorMessage=Dae;z.subscriptionFieldConditionEmptyValuesArrayErrorMessage=bae;z.unknownFieldSubgraphNameError=Aae;z.invalidSubscriptionFieldConditionFieldPathErrorMessage=Rae;z.invalidSubscriptionFieldConditionFieldPathParentErrorMessage=Pae;z.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage=Fae;z.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage=wae;z.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage=Lae;z.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage=Cae;z.unresolvablePathError=Bae;z.allExternalFieldInstancesError=Uae;z.externalInterfaceFieldsError=kae;z.nonExternalConditionalFieldError=Mae;z.incompatibleFederatedFieldNamedTypeError=xae;z.unknownNamedTypeErrorMessage=zk;z.unknownNamedTypeError=qae;z.unknownFieldDataError=Vae;z.unexpectedNonCompositeOutputTypeError=jae;z.invalidExternalDirectiveError=Kae;z.configureDescriptionNoDescriptionError=Gae;z.configureDescriptionPropagationError=$ae;z.duplicateDirectiveDefinitionArgumentErrorMessage=Qae;z.duplicateDirectiveDefinitionLocationErrorMessage=Yae;z.invalidDirectiveDefinitionLocationErrorMessage=Jae;z.invalidDirectiveDefinitionError=Hae;z.fieldAlreadyProvidedErrorMessage=zae;z.invalidInterfaceObjectImplementationDefinitionsError=Wae;z.invalidNamedTypeError=Xae;z.semanticNonNullLevelsNaNIndexErrorMessage=Zae;z.semanticNonNullLevelsIndexOutOfBoundsErrorMessage=ese;z.semanticNonNullLevelsNonNullErrorMessage=tse;z.semanticNonNullInconsistentLevelsError=nse;z.oneOfRequiredFieldsError=rse;var $k=Ae(),He=vr(),Qk=Il(),Ql=Sr(),gre=vl(),_re=iE();z.minimumSubgraphRequirementError=new Error("At least one subgraph is required for federation.");function vre(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 Sre(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 Ore({actualType:e,coords:t,expectedType:n,isArgument:r}){return new Error(`Incompatible types when merging two instances of ${r?"field argument":He.FIELD} "${t}": + Expected type "${n}" but received "${e}".`)}function Dre(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(He.QUOTATION_JOIN)+`" -If an instance defines a default value, that default value must be consistently defined across all subgraphs.`)}function rre(e){return new Error(`Enum "${e}" was used as both an input and output but was inconsistently defined across inclusive subgraphs.`)}function ire(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 bre(e){return new Error(`Enum "${e}" was used as both an input and output but was inconsistently defined across inclusive subgraphs.`)}function Are(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 are(e){return new Error(`The directive "${e}" must only be defined once.`)}function sre(e,t){return new Error(`The Enum "${e}" must only define the Enum value definition "${t}" once.`)}function ore(e,t,n){return new Error(`The ${e} "${t}" must only define the field definition "${n}" once.`)}function ure(e,t){return new Error(`The Input Object "${e}" must only define the Input field definition "${t}" once.`)}function cre(e,t,n){return new Error(`The ${e} "${t}" must only implement the Interface "${n}" once.`)}function lre(e,t){return new Error(`The Union "${e}" must only define the Union member "${t}" once.`)}function dre(e,t){return new Error(`The ${e} "${t}" must only be defined once.`)}function pre(e,t,n){return new Error(`The operation type "${e}" cannot be defined as "${t}" because it has already been defined as "${n}".`)}function fre(e,t){return new Error(`The ${e} "${t}" is an extension, but no base ${e} definition of "${t}" is defined in any subgraph.`)}function mre(e){return new Error(`The Scalar extension "${e}" is invalid because no base Scalar definition of "${e} is defined in the subgraph.`)}function Nre(e){return new Error(`The Union "${e}" must define at least one Union member.`)}function Tre(e){return new Error(`The Enum "${e}" must define at least one Enum value.`)}function Ere(e,t,n){return new Error(`Expected the response type "${e}" for operation "${t}" to be type Object but received "${n}.`)}function hre(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 Rre(e){return new Error(`The directive "${e}" must only be defined once.`)}function Pre(e,t){return new Error(`The Enum "${e}" must only define the Enum value definition "${t}" once.`)}function Fre(e,t,n){return new Error(`The ${e} "${t}" must only define the field definition "${n}" once.`)}function wre(e,t){return new Error(`The Input Object "${e}" must only define the Input field definition "${t}" once.`)}function Lre(e,t,n){return new Error(`The ${e} "${t}" must only implement the Interface "${n}" once.`)}function Cre(e,t){return new Error(`The Union "${e}" must only define the Union member "${t}" once.`)}function Bre(e,t){return new Error(`The ${e} "${t}" must only be defined once.`)}function Ure(e,t,n){return new Error(`The operation type "${e}" cannot be defined as "${t}" because it has already been defined as "${n}".`)}function kre(e,t){return new Error(`The ${e} "${t}" is an extension, but no base ${e} definition of "${t}" is defined in any subgraph.`)}function Mre(e){return new Error(`The Scalar extension "${e}" is invalid because no base Scalar definition of "${e} is defined in the subgraph.`)}function xre(e){return new Error(`The Union "${e}" must define at least one Union member.`)}function qre(e){return new Error(`The Enum "${e}" must define at least one Enum value.`)}function Vre(e,t,n){return new Error(`Expected the response type "${e}" for operation "${t}" to be type Object but received "${n}.`)}function jre(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(He.QUOTATION_JOIN)+`". However, it is not declared "@shareable" in the following subgraph`+(c.length>1?"s":"")+`: "${c.join(He.QUOTATION_JOIN)}".`)}return new Error(`The Object "${n}" defines the same fields in multiple subgraphs without the "@shareable" directive:${r.join(` -`)}`)}function yre(e,t){return new Error(`The directive "@${e}" declared on coordinates "${t}" is not defined in the schema.`)}function Ire(e){return new Error(` The type "${e}" was referenced in the schema, but it was never defined.`)}function gre(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 _re(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 Kre(e,t){return new Error(`The directive "@${e}" declared on coordinates "${t}" is not defined in the schema.`)}function Gre(e){return new Error(` The type "${e}" was referenced in the schema, but it was never defined.`)}function $re(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 Qre(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 vre(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 Sre(e,t){return` The definition for "@${e}" does not define "${t}" as a valid location.`}function Ore(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(He.QUOTATION_JOIN)+'".'}function Dre(e,t){return` The definition for "@${e}" does not define the following argument`+(t.length>1?"s that are":" that is")+' provided: "'+t.join(He.QUOTATION_JOIN)+'".'}function bre(e){return" The following argument"+(e.length>1?"s are":" is")+' defined more than once: "'+e.join(He.QUOTATION_JOIN)+'"'}function Are(e,t,n,r){return` The value "${e}" provided to argument "${t}(${n}: ...)" is not a valid "${r}" type.`}function Rre(e){return new Error(` The type defined at path "${e}" has more than ${Sk.MAXIMUM_TYPE_NESTING} layers of nesting, or there is a cyclical error.`)}function Fre(e){return new Error(`Fatal: Unexpected type for "${e}"`)}function Pre(e,t,n){return new Error(`Fatal: Expected "${e}" to be type ${(0,jl.kindToNodeType)(t)} but received "${(0,jl.kindToNodeType)(n)}".`)}function wre(e,t){return new Error(`Fatal: The type "${e}" visited the following unexpected edge`+(t.length>1?"s":"")+`: - " ${t.join(He.QUOTATION_JOIN)}".`)}function Lre(e,t,n){return new Error(` When merging types, expected "${e}" to be type "${t}" but received "${n}".`)}function Cre(e){return new Error(`Fatal: Unsuccessfully merged the cross-subgraph types of field "${e}" without producing a type error object.`)}function Bre(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 Ure(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 kre(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 Mre(e,t){return new Error(`The subgraph "${e}" could not be federated for the following reason`+(t.length>1?"s":"")+`: +`))}function Yre(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 Jre(e,t){return` The definition for "@${e}" does not define "${t}" as a valid location.`}function Hre(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(He.QUOTATION_JOIN)+'".'}function zre(e,t){return` The definition for "@${e}" does not define the following argument`+(t.length>1?"s that are":" that is")+' provided: "'+t.join(He.QUOTATION_JOIN)+'".'}function Wre(e){return" The following argument"+(e.length>1?"s are":" is")+' defined more than once: "'+e.join(He.QUOTATION_JOIN)+'"'}function Xre(e,t,n,r){return` The value "${e}" provided to argument "${t}(${n}: ...)" is not a valid "${r}" type.`}function Zre(e){return new Error(` The type defined at path "${e}" has more than ${Qk.MAXIMUM_TYPE_NESTING} layers of nesting, or there is a cyclical error.`)}function eie(e){return new Error(`Fatal: Unexpected type for "${e}"`)}function tie(e,t,n){return new Error(`Fatal: Expected "${e}" to be type ${(0,Ql.kindToNodeType)(t)} but received "${(0,Ql.kindToNodeType)(n)}".`)}function nie(e,t){return new Error(`Fatal: The type "${e}" visited the following unexpected edge`+(t.length>1?"s":"")+`: + " ${t.join(He.QUOTATION_JOIN)}".`)}function rie(e,t,n){return new Error(` When merging types, expected "${e}" to be type "${t}" but received "${n}".`)}function iie(e){return new Error(`Fatal: Unsuccessfully merged the cross-subgraph types of field "${e}" without producing a type error object.`)}function aie(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 sie(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 oie(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 uie(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 xre(e,t){return`The ${(0,jl.numberToOrdinal)(e+1)} subgraph in the array did not define a name. Consequently, any further errors will temporarily identify this subgraph as "${t}".`}function qre(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 Vre(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 jre(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 Kre(e,t,n){let r=[];for(let[i,a]of n){let o=` The implementation of Interface "${i}" by "${e}" is invalid because: +`))}function cie(e,t){return`The ${(0,Ql.numberToOrdinal)(e+1)} subgraph in the array did not define a name. Consequently, any further errors will temporarily identify this subgraph as "${t}".`}function lie(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 die(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 pie(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 fie(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 f=d.unimplementedArguments.size,y=d.invalidImplementedArguments.length,I=d.invalidAdditionalArguments.size;if(o+=` The field "${l}" is invalid because: `,f&&(o+=` The following argument${f>1?"s are":" is"} not implemented: "`+[...d.unimplementedArguments].join('", "')+`" @@ -267,87 +267,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 Gre(e,t,n,r=!0){let i=r?He.ARGUMENT:He.INPUT_FIELD,a=`The ${e} "${t}" could not be federated because: +`))}function mie(e,t,n,r=!0){let i=r?He.ARGUMENT:He.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 $re(e,t){return new Error(`The field "${e}" is invalid because: +`;return new Error(a)}function Nie(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(He.QUOTATION_JOIN)+`" -`)}function Qre(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 Tie(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 Yre(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 Jre(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 Eie(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 hie(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 Hre(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 yie(e,t,n){return` The following field set is invalid: "${e}" - This is because "${t}" returns the unknown type "${n}".`}function zre(e,t,n,r){return` The following field set is invalid: + This is because "${t}" returns the unknown type "${n}".`}function Iie(e,t,n,r){return` The following field set is invalid: "${e}" - This is because of the selection set corresponding to the `+tE(t,n,r)+` Composite types such as "${r}" types must define a selection set with at least one field selection.`}function Wre(e,t,n,r){return` The following field set is invalid: + 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 gie(e,t,n,r){return` The following field set is invalid: "${e}" - This is because of the selection set corresponding to the `+tE(t,n,r)+` Non-composite types such as "${r}" cannot define a selection set.`}function Xre(e,t,n){return` The following field set is invalid: + 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 _ie(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 Zre(e,t){let n=` The following field set is invalid: + The type "${t}" does not define a field named "${n}".`}function vie(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 eie(e,t){return` The following field set is invalid: + The reason provided was: `+t.message),n}function Sie(e,t){return` The following field set is invalid: "${e}" - This is because the selection set defined on "${t}" could not be parsed.`}function tie(e){return new Error(` Expected an object/interface or object/interface extension named "${e}" to exist.`)}function nie(e,t,n){return` The following field set is invalid: + This is because the selection set defined on "${t}" could not be parsed.`}function Oie(e){return new Error(` Expected an object/interface or object/interface extension named "${e}" to exist.`)}function Die(e,t,n){return` The following field set is invalid: "${e}" - This is because "${t}" does not define an argument named "${n}".`}function rie(e,t){return` The following field set is invalid: + This is because "${t}" does not define an argument named "${n}".`}function bie(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 iie(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 Aie(e,t){return new Error(`The following "${e}" directive`+(t.length>1?"s are":" is")+` invalid: `+t.join(` -`))}function aie(e,t){return` The following field set is invalid: +`))}function Rie(e,t){return` The following field set is invalid: "${e}" - This is because "${t}" was included in the field set more than once.`}function sie(e,t,n){return` Expected ConfigurationData to exist for type "${e}" when adding field "${t}" while validating field set "${n}".`}function oie(e,t){return` A "@provides" directive is declared on field "${e}". - However, the response type "${t}" is not an Object nor Interface.`}function US(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 Pie(e,t,n){return` Expected ConfigurationData to exist for type "${e}" when adding field "${t}" while validating field set "${n}".`}function Fie(e,t){return` A "@provides" directive is declared on field "${e}". + However, the response type "${t}" is not an Object nor Interface.`}function zS(e,t,n=!1){return e.length<1?`enclosing type name "${t}". `:`field coordinates "${e[e.length-1]}"`+(n?` that returns "${t}"`:"")+`. -`}function tE(e,t,n){return e.length<1?`enclosing type name "${t}", which is type "${n}". +`}function aE(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 uie(e,t,n,r){return` The following field set is invalid: +`}function wie(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 `+US(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 cie(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 `+zS(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 Lie(e,t){return` The following field set is invalid: "${e}" - This is because "${t}" defines an inline fragment without a type condition.`}function lie(e,t,n,r){return` The following field set is invalid: + This is because "${t}" defines an inline fragment without a type condition.`}function Cie(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 `+US(t,n)}function die(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 `+zS(t,n)}function Bie(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 `+US(t,n)+` However, "${r}" is type "${i}" when types "Interface" or "Object" would be expected.`}function pie(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 `+zS(t,n)+` However, "${r}" is type "${i}" when types "Interface" or "Object" would be expected.`}function Uie(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 `+tE(t,i,r);return r===He.INTERFACE?a+` However, "${n}" does not implement "${i}"`:a+` However, "${n}" is not a member of "${i}".`}function fie(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 `+aE(t,i,r);return r===He.INTERFACE?a+` However, "${n}" does not implement "${i}"`:a+` However, "${n}" is not a member of "${i}".`}function kie(e,t,n){return` The following field set is invalid: "${e}" - This is because of the selection set corresponding to the `+tE(t,n,He.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 mie(e,t){return` The field "${e}" declares an @override directive in the following subgraphs: "`+t.join(He.QUOTATION_JOIN)+'".'}function Nie(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(He.QUOTATION_JOIN)+`". -`)}function Tie(e,t){return new Error(`The ${e} "${t}" is invalid because it does not define any fields.`)}function Eie(e){return new Error(`The Input Object "${e}" is invalid because it does not define any input values.`)}function hie(e,t,n){return new Error(`The ${e} "${t}" is invalid because all its ${n} definitions are declared "@inaccessible".`)}function yie(e,t){return`Cannot override field "${t}" because the source and target subgraph names are both "${e}"`}function Iie(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 `+aE(t,n,He.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 Mie(e,t){return` The field "${e}" declares an @override directive in the following subgraphs: "`+t.join(He.QUOTATION_JOIN)+'".'}function xie(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(He.QUOTATION_JOIN)+`". +`)}function qie(e,t){return new Error(`The ${e} "${t}" is invalid because it does not define any fields.`)}function Vie(e){return new Error(`The Input Object "${e}" is invalid because it does not define any input values.`)}function jie(e,t,n){return new Error(`The ${e} "${t}" is invalid because all its ${n} definitions are declared "@inaccessible".`)}function Kie(e,t){return`Cannot override field "${t}" because the source and target subgraph names are both "${e}"`}function Gie(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,jl.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,Ql.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(He.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,jl.getEntriesNotInHashSet)(o,l);n+=` Subgraph "${c}" does not define the following implementations: "`+d.join(He.QUOTATION_JOIN)+`" -`}}return new Error(n)}function gie(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,Ql.getEntriesNotInHashSet)(o,l);n+=` Subgraph "${c}" does not define the following implementations: "`+d.join(He.QUOTATION_JOIN)+`" +`}}return new Error(n)}function $ie(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(He.QUOTATION_JOIN)+`" -If you require more, please contact support.`)}function _ie(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 Qie(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 vie(e){let t=` Root type fields defined in an Event Driven graph must define a valid events directive: +`))}function Yie(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 Sie(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 Jie(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 Oie(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 Hie(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: @@ -355,19 +355,19 @@ Moreover, only fields that compose part of an entity's (composite) key and are d consumerInactiveThreshold: Int! = 30 consumerName: String! streamName: String! - }`;function Die(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(He.QUOTATION_JOIN)+'".'),t.length>0&&a.push("The following required field"+(t.length>1?"s were":" was")+' defined more than once: "'+t.join(He.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(He.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(He.QUOTATION_JOIN)+'".'),i+=` + }`;function zie(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(He.QUOTATION_JOIN)+'".'),t.length>0&&a.push("The following required field"+(t.length>1?"s were":" was")+' defined more than once: "'+t.join(He.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(He.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(He.QUOTATION_JOIN)+'".'),i+=` However, the provided input was invalid for the following reason`+(a.length>1?"s":"")+`: `+a.join(` - `),i}function bie(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 Wie(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(He.QUOTATION_JOIN)+`" -`;return t}function Aie(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 Xie(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 Rie(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 Zie(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 Fie(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 eae(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(He.QUOTATION_JOIN)+`" -`}function Pie(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 tae(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(He.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 { @@ -377,20 +377,20 @@ Consequently, the following object extension definition`+(e.length>1?"s are":" i consumerInactiveThreshold: Int! = 30 consumerName: String! streamName: String! - }`;function wie(e){return new Error(`Could not retrieve definition for Event-Driven Federated Subscription directive "${e}".`)}function Lie(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 nae(e){return new Error(`Could not retrieve definition for Event-Driven Federated Subscription directive "${e}".`)}function rae(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 Cie(e){return new Error(` The interface "${e}" must not implement itself.`)}function Bie(e){return`The "${e}" argument must be string with a minimum length of one.`}function Uie(e){return`The "${e}" argument must be a list of strings.`}function kie(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 Mie(e){return`An argument template references the invalid argument "${e}".`}function xie(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 qie(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 iae(e){return new Error(` The interface "${e}" must not implement itself.`)}function aae(e){return`The "${e}" argument must be string with a minimum length of one.`}function sae(e){return`The "${e}" argument must be a list of strings.`}function oae(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 uae(e){return`An argument template references the invalid argument "${e}".`}function cae(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 lae(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 Vie(e,t,n){return new Error(`The ${e} "${t}" is declared "@inaccessible"; however, the ${e} is still referenced at the following paths: + `))}function dae(e,t,n){return new Error(`The ${e} "${t}" is declared "@inaccessible"; however, the ${e} is still referenced at the following paths: "`+n.join(He.QUOTATION_JOIN)+`" -`)}function jie(e,t){return new Error(`The ${e.kind===vk.Kind.ARGUMENT?"argument":"Input field"} "${e.name}" defined at coordinates "${e.federatedCoords}" is declared "@inaccessible"; however, it is a required ${e.kind===vk.Kind.ARGUMENT?"argument of field":"field of Input Object"} "${t}".`)}function Kie(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 pae(e,t){return new Error(`The ${e.kind===$k.Kind.ARGUMENT?"argument":"Input field"} "${e.name}" defined at coordinates "${e.federatedCoords}" is declared "@inaccessible"; however, it is a required ${e.kind===$k.Kind.ARGUMENT?"argument of field":"field of Input Object"} "${t}".`)}function fae(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 Gie(e){return new Error(`Expected type "${e}" to be a root type but could not find its respective OperationTypeNode.`)}function $ie(e){return new Error(`The "@${He.SUBSCRIPTION_FILTER}" directive must only be defined on a subscription root field, but it was defined on the path "${e}".`)}function Qie(e,t){return new Error(`The "@${He.SUBSCRIPTION_FILTER}" directive defined on path "${e}" is invalid for the following reason`+(t.length>1?"s":"")+`: + `))}function mae(e){return new Error(`Expected type "${e}" to be a root type but could not find its respective OperationTypeNode.`)}function Nae(e){return new Error(`The "@${He.SUBSCRIPTION_FILTER}" directive must only be defined on a subscription root field, but it was defined on the path "${e}".`)}function Tae(e,t){return new Error(`The "@${He.SUBSCRIPTION_FILTER}" directive defined on path "${e}" is invalid for the following reason`+(t.length>1?"s":"")+`: `+t.join(` -`))}function Yie(e){return` Unknown type "${e}".`}function Jie(e){return` The input path "${e}" exceeds the maximum depth of ${Sk.MAX_SUBSCRIPTION_FILTER_DEPTH} for any one filter condition. - If you require a larger maximum depth, please contact support.`}var Ok=` Each "${He.SUBSCRIPTION_FILTER_CONDITION}" input object must define exactly one of the following input value fields: "${He.AND_UPPER}", "${He.IN_UPPER}", "${He.NOT_UPPER}", or "${He.OR_UPPER}". -`;function Hie(e,t){return Ok+` However, input path "${e}" defines ${t} fields.`}function zie(e,t){return Ok+` However, input path "${e}" defines the invalid input value field "${t}".`}function Wie(e,t,n){return` Expected the value of input path "${e}" to be type "${t}" but received type "${n}"`}var Dk=` An AND or OR input field defined on a "${He.SUBSCRIPTION_FILTER_CONDITION}" should define a list of 1\u20135 nested conditions. -`;function Xie(e,t){let n=t.length>1;return Dk+" However, the following "+(n?"indices":"index")+` defined on input path "${e}" `+(n?"are":"is")+' not type "object": '+t.join(", ")}function Zie(e,t){return Dk+` However, the list defined on input path "${e}" has a length of ${t}.`}function eae(e,t,n){return` Expected the input path "${e}" to be type "${t}" but received "${n}".`}function tae(e,t,n,r,i){let a=` Each "${He.SUBSCRIPTION_FIELD_CONDITION}" input object must only define the following two input value fields: "${He.FIELD_PATH}" and "${He.VALUES}". +`))}function Eae(e){return` Unknown type "${e}".`}function hae(e){return` The input path "${e}" exceeds the maximum depth of ${Qk.MAX_SUBSCRIPTION_FILTER_DEPTH} for any one filter condition. + If you require a larger maximum depth, please contact support.`}var Yk=` Each "${He.SUBSCRIPTION_FILTER_CONDITION}" input object must define exactly one of the following input value fields: "${He.AND_UPPER}", "${He.IN_UPPER}", "${He.NOT_UPPER}", or "${He.OR_UPPER}". +`;function yae(e,t){return Yk+` However, input path "${e}" defines ${t} fields.`}function Iae(e,t){return Yk+` However, input path "${e}" defines the invalid input value field "${t}".`}function gae(e,t,n){return` Expected the value of input path "${e}" to be type "${t}" but received type "${n}"`}var Jk=` An AND or OR input field defined on a "${He.SUBSCRIPTION_FILTER_CONDITION}" should define a list of 1\u20135 nested conditions. +`;function _ae(e,t){let n=t.length>1;return Jk+" However, the following "+(n?"indices":"index")+` defined on input path "${e}" `+(n?"are":"is")+' not type "object": '+t.join(", ")}function vae(e,t){return Jk+` However, the list defined on input path "${e}" has a length of ${t}.`}function Sae(e,t,n){return` Expected the input path "${e}" to be type "${t}" but received "${n}".`}function Oae(e,t,n,r,i){let a=` Each "${He.SUBSCRIPTION_FIELD_CONDITION}" input object must only define the following two input value fields: "${He.FIELD_PATH}" and "${He.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(He.QUOTATION_JOIN)+'"'),n.length>0&&(a+=` @@ -399,82 +399,82 @@ 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(He.QUOTATION_JOIN)+'"'),i.length>0&&(a+=` `+i.join(` - `)),a}var bk=` A "${He.SUBSCRIPTION_FIELD_CONDITION}" input object must define a "values" input value field with a list of at least one valid "${He.SUBSCRIPTION_FILTER_VALUE}" kind (boolean, enum, float, int, null, or string). -`;function nae(e,t){let n=t.length>1;return bk+" However, the following "+(n?"indices":"index")+` defined on input path "${e}" `+(n?"are":"is")+` not a valid "${He.SUBSCRIPTION_FILTER_VALUE}": `+t.join(", ")}function rae(e){return bk+` However, the list defined on input path "${e}" is empty.`}function iae(e){return new Error(` Field "${e}" defined no subgraph names.`)}function aae(e,t){return` Input path "${e}" defines the value "${t}", which is not a period (.) delimited field path.`}function sae(e,t,n){return` Input path "${e}" defines the value "${t}". - However, "${n}" is not type "object"`}function oae(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 uae(e,t,n,r,i){return`Input path "${e}" defines the value "${t}". + `)),a}var Hk=` A "${He.SUBSCRIPTION_FIELD_CONDITION}" input object must define a "values" input value field with a list of at least one valid "${He.SUBSCRIPTION_FILTER_VALUE}" kind (boolean, enum, float, int, null, or string). +`;function Dae(e,t){let n=t.length>1;return Hk+" However, the following "+(n?"indices":"index")+` defined on input path "${e}" `+(n?"are":"is")+` not a valid "${He.SUBSCRIPTION_FILTER_VALUE}": `+t.join(", ")}function bae(e){return Hk+` However, the list defined on input path "${e}" is empty.`}function Aae(e){return new Error(` Field "${e}" defined no subgraph names.`)}function Rae(e,t){return` Input path "${e}" defines the value "${t}", which is not a period (.) delimited field path.`}function Pae(e,t,n){return` Input path "${e}" defines the value "${t}". + However, "${n}" is not type "object"`}function Fae(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 wae(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 "@${He.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 cae(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 lae(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 dae({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 Lae(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 Cae(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 Bae({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 pae(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 Uae(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(He.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 fae(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 kae(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(He.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 mae(e,t,n,r,i){return new Error(`The field "${e}" in subgraph "${t}" defines a "@${i}" 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 Mae(e,t,n,r,i){return new Error(`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.`)}function Nae(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(He.QUOTATION_JOIN)+'".')}return new Error(`Each instance of a shared field must resolve identically across subgraphs. +Consequently, "${n}" is already provided by subgraph "${t}" and should not form part of a "@${i}" directive field set.`)}function xae(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(He.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 Ak(e,t){return`The field "${e}" returns the unknown named type "${t}".`}function Tae(e,t){return new Error(Ak(e,t))}function Eae(e){return new Error(`Could not find FieldData for field "${e}" -.This should never happen. Please report this issue on GitHub.`)}function hae(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 yae(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 Iae(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 gae(e,t){return new Error(`The coordinates "${e}" declare "@openfed__configureDescription(propagate: true)" in the following subgraphs: +`))}function zk(e,t){return`The field "${e}" returns the unknown named type "${t}".`}function qae(e,t){return new Error(zk(e,t))}function Vae(e){return new Error(`Could not find FieldData for field "${e}" +.This should never happen. Please report this issue on GitHub.`)}function jae(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 Kae(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 Gae(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 $ae(e,t){return new Error(`The coordinates "${e}" declare "@openfed__configureDescription(propagate: true)" in the following subgraphs: "`+t.join(He.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 _ae(e){return"- The following argument"+(e.length>1?"s are":" is")+` defined more than once: - "`+e.join(He.QUOTATION_JOIN)+'"'}function vae(e){return`- The location "${e}" is defined multiple times.`}function Sae(e){return`- "${e}" is not a valid directive location.`}function Oae(e,t){return new Error(`The directive definition for "@${e}" is invalid for the following reason`+(t.length>1?"s":"")+`: -`+t.join(He.LITERAL_NEW_LINE)+'"')}function Dae(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 bae(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(He.QUOTATION_JOIN)+'"')}function Aae({data:e,namedTypeData:t,nodeType:n}){let r=(0,Wne.isFieldData)(e),i=r?`${e.originalParentTypeName}.${e.name}`:e.originalCoords;return new Error(`The ${n} "${i}" is invalid because it defines type `+(0,Xne.printTypeNode)(e.type)+`; however, ${(0,jl.kindToNodeType)(t.kind)} "${t.name}" is not a valid `+(r?"output":"input")+" type.")}function Rae(e){return`Index "${e}" is not a valid integer.`}function Fae({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 Pae({typeString:e,value:t}){return`Index "${t}" of type ${e} is non-null but must be nullable.`}z.semanticNonNullArgumentErrorMessage=`Argument "${He.LEVELS}" validation error.`;function wae(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 Qae(e){return"- The following argument"+(e.length>1?"s are":" is")+` defined more than once: + "`+e.join(He.QUOTATION_JOIN)+'"'}function Yae(e){return`- The location "${e}" is defined multiple times.`}function Jae(e){return`- "${e}" is not a valid directive location.`}function Hae(e,t){return new Error(`The directive definition for "@${e}" is invalid for the following reason`+(t.length>1?"s":"")+`: +`+t.join(He.LITERAL_NEW_LINE)+'"')}function zae(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 Wae(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(He.QUOTATION_JOIN)+'"')}function Xae({data:e,namedTypeData:t,nodeType:n}){let r=(0,gre.isFieldData)(e),i=r?`${e.originalParentTypeName}.${e.name}`:e.originalCoords;return new Error(`The ${n} "${i}" is invalid because it defines type `+(0,_re.printTypeNode)(e.type)+`; however, ${(0,Ql.kindToNodeType)(t.kind)} "${t.name}" is not a valid `+(r?"output":"input")+" type.")}function Zae(e){return`Index "${e}" is not a valid integer.`}function ese({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 tse({typeString:e,value:t}){return`Index "${t}" of type ${e} is non-null but must be nullable.`}z.semanticNonNullArgumentErrorMessage=`Argument "${He.LEVELS}" validation error.`;function nse(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 Lae({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(He.QUOTATION_JOIN)+'".')}});var Fk=w(Rk=>{"use strict";m();T();N();Object.defineProperty(Rk,"__esModule",{value:!0})});var Mp=w(Gi=>{"use strict";m();T();N();Object.defineProperty(Gi,"__esModule",{value:!0});Gi.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=Gi.SUBSCRIPTION_FILTER_INPUT_NAMES=Gi.STREAM_CONFIGURATION_FIELD_NAMES=Gi.EVENT_DIRECTIVE_NAMES=Gi.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=void 0;var fn=ur();Gi.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=new Set([fn.ARGUMENT_DEFINITION_UPPER,fn.ENUM_UPPER,fn.ENUM_VALUE_UPPER,fn.FIELD_DEFINITION_UPPER,fn.INPUT_FIELD_DEFINITION_UPPER,fn.INPUT_OBJECT_UPPER,fn.INTERFACE_UPPER,fn.OBJECT_UPPER,fn.SCALAR_UPPER,fn.SCHEMA_UPPER,fn.UNION_UPPER]);Gi.EVENT_DIRECTIVE_NAMES=new Set([fn.EDFS_KAFKA_PUBLISH,fn.EDFS_KAFKA_SUBSCRIBE,fn.EDFS_NATS_PUBLISH,fn.EDFS_NATS_REQUEST,fn.EDFS_NATS_SUBSCRIBE,fn.EDFS_REDIS_PUBLISH,fn.EDFS_REDIS_SUBSCRIBE]);Gi.STREAM_CONFIGURATION_FIELD_NAMES=new Set([fn.CONSUMER_INACTIVE_THRESHOLD,fn.CONSUMER_NAME,fn.STREAM_NAME]);Gi.SUBSCRIPTION_FILTER_INPUT_NAMES=new Set([fn.AND_UPPER,fn.IN_UPPER,fn.NOT_UPPER,fn.OR_UPPER]);Gi.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=new Set([fn.AND_UPPER,fn.OR_UPPER])});var $i=w((kS,Pk)=>{"use strict";m();T();N();var xp=function(e){return e&&e.Math===Math&&e};Pk.exports=xp(typeof globalThis=="object"&&globalThis)||xp(typeof window=="object"&&window)||xp(typeof self=="object"&&self)||xp(typeof global=="object"&&global)||xp(typeof kS=="object"&&kS)||function(){return this}()||Function("return this")()});var _s=w((dAe,wk)=>{"use strict";m();T();N();wk.exports=function(e){try{return!!e()}catch(t){return!0}}});var mu=w((NAe,Lk)=>{"use strict";m();T();N();var Cae=_s();Lk.exports=!Cae(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var MS=w((yAe,Ck)=>{"use strict";m();T();N();var Bae=_s();Ck.exports=!Bae(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var mc=w((vAe,Bk)=>{"use strict";m();T();N();var Uae=MS(),nE=Function.prototype.call;Bk.exports=Uae?nE.bind(nE):function(){return nE.apply(nE,arguments)}});var xk=w(Mk=>{"use strict";m();T();N();var Uk={}.propertyIsEnumerable,kk=Object.getOwnPropertyDescriptor,kae=kk&&!Uk.call({1:2},1);Mk.f=kae?function(t){var n=kk(this,t);return!!n&&n.enumerable}:Uk});var xS=w((PAe,qk)=>{"use strict";m();T();N();qk.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var mi=w((BAe,Kk)=>{"use strict";m();T();N();var Vk=MS(),jk=Function.prototype,qS=jk.call,Mae=Vk&&jk.bind.bind(qS,qS);Kk.exports=Vk?Mae:function(e){return function(){return qS.apply(e,arguments)}}});var Qk=w((xAe,$k)=>{"use strict";m();T();N();var Gk=mi(),xae=Gk({}.toString),qae=Gk("".slice);$k.exports=function(e){return qae(xae(e),8,-1)}});var Jk=w((KAe,Yk)=>{"use strict";m();T();N();var Vae=mi(),jae=_s(),Kae=Qk(),VS=Object,Gae=Vae("".split);Yk.exports=jae(function(){return!VS("z").propertyIsEnumerable(0)})?function(e){return Kae(e)==="String"?Gae(e,""):VS(e)}:VS});var jS=w((YAe,Hk)=>{"use strict";m();T();N();Hk.exports=function(e){return e==null}});var KS=w((WAe,zk)=>{"use strict";m();T();N();var $ae=jS(),Qae=TypeError;zk.exports=function(e){if($ae(e))throw new Qae("Can't call method on "+e);return e}});var rE=w((tRe,Wk)=>{"use strict";m();T();N();var Yae=Jk(),Jae=KS();Wk.exports=function(e){return Yae(Jae(e))}});var da=w((aRe,Xk)=>{"use strict";m();T();N();var GS=typeof document=="object"&&document.all;Xk.exports=typeof GS=="undefined"&&GS!==void 0?function(e){return typeof e=="function"||e===GS}:function(e){return typeof e=="function"}});var Kl=w((cRe,Zk)=>{"use strict";m();T();N();var Hae=da();Zk.exports=function(e){return typeof e=="object"?e!==null:Hae(e)}});var iE=w((fRe,eM)=>{"use strict";m();T();N();var $S=$i(),zae=da(),Wae=function(e){return zae(e)?e:void 0};eM.exports=function(e,t){return arguments.length<2?Wae($S[e]):$S[e]&&$S[e][t]}});var nM=w((ERe,tM)=>{"use strict";m();T();N();var Xae=mi();tM.exports=Xae({}.isPrototypeOf)});var sM=w((gRe,aM)=>{"use strict";m();T();N();var Zae=$i(),rM=Zae.navigator,iM=rM&&rM.userAgent;aM.exports=iM?String(iM):""});var fM=w((ORe,pM)=>{"use strict";m();T();N();var dM=$i(),QS=sM(),oM=dM.process,uM=dM.Deno,cM=oM&&oM.versions||uM&&uM.version,lM=cM&&cM.v8,pa,aE;lM&&(pa=lM.split("."),aE=pa[0]>0&&pa[0]<4?1:+(pa[0]+pa[1]));!aE&&QS&&(pa=QS.match(/Edge\/(\d+)/),(!pa||pa[1]>=74)&&(pa=QS.match(/Chrome\/(\d+)/),pa&&(aE=+pa[1])));pM.exports=aE});var YS=w((RRe,NM)=>{"use strict";m();T();N();var mM=fM(),ese=_s(),tse=$i(),nse=tse.String;NM.exports=!!Object.getOwnPropertySymbols&&!ese(function(){var e=Symbol("symbol detection");return!nse(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&mM&&mM<41})});var JS=w((LRe,TM)=>{"use strict";m();T();N();var rse=YS();TM.exports=rse&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var HS=w((kRe,EM)=>{"use strict";m();T();N();var ise=iE(),ase=da(),sse=nM(),ose=JS(),use=Object;EM.exports=ose?function(e){return typeof e=="symbol"}:function(e){var t=ise("Symbol");return ase(t)&&sse(t.prototype,use(e))}});var yM=w((VRe,hM)=>{"use strict";m();T();N();var cse=String;hM.exports=function(e){try{return cse(e)}catch(t){return"Object"}}});var sE=w(($Re,IM)=>{"use strict";m();T();N();var lse=da(),dse=yM(),pse=TypeError;IM.exports=function(e){if(lse(e))return e;throw new pse(dse(e)+" is not a function")}});var zS=w((HRe,gM)=>{"use strict";m();T();N();var fse=sE(),mse=jS();gM.exports=function(e,t){var n=e[t];return mse(n)?void 0:fse(n)}});var vM=w((ZRe,_M)=>{"use strict";m();T();N();var WS=mc(),XS=da(),ZS=Kl(),Nse=TypeError;_M.exports=function(e,t){var n,r;if(t==="string"&&XS(n=e.toString)&&!ZS(r=WS(n,e))||XS(n=e.valueOf)&&!ZS(r=WS(n,e))||t!=="string"&&XS(n=e.toString)&&!ZS(r=WS(n,e)))return r;throw new Nse("Can't convert object to primitive value")}});var OM=w((rFe,SM)=>{"use strict";m();T();N();SM.exports=!1});var oE=w((oFe,bM)=>{"use strict";m();T();N();var DM=$i(),Tse=Object.defineProperty;bM.exports=function(e,t){try{Tse(DM,e,{value:t,configurable:!0,writable:!0})}catch(n){DM[e]=t}return t}});var uE=w((dFe,FM)=>{"use strict";m();T();N();var Ese=OM(),hse=$i(),yse=oE(),AM="__core-js_shared__",RM=FM.exports=hse[AM]||yse(AM,{});(RM.versions||(RM.versions=[])).push({version:"3.41.0",mode:Ese?"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 eO=w((NFe,wM)=>{"use strict";m();T();N();var PM=uE();wM.exports=function(e,t){return PM[e]||(PM[e]=t||{})}});var CM=w((yFe,LM)=>{"use strict";m();T();N();var Ise=KS(),gse=Object;LM.exports=function(e){return gse(Ise(e))}});var Nu=w((vFe,BM)=>{"use strict";m();T();N();var _se=mi(),vse=CM(),Sse=_se({}.hasOwnProperty);BM.exports=Object.hasOwn||function(t,n){return Sse(vse(t),n)}});var tO=w((bFe,UM)=>{"use strict";m();T();N();var Ose=mi(),Dse=0,bse=Math.random(),Ase=Ose(1 .toString);UM.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Ase(++Dse+bse,36)}});var xM=w((PFe,MM)=>{"use strict";m();T();N();var Rse=$i(),Fse=eO(),kM=Nu(),Pse=tO(),wse=YS(),Lse=JS(),Gl=Rse.Symbol,nO=Fse("wks"),Cse=Lse?Gl.for||Gl:Gl&&Gl.withoutSetter||Pse;MM.exports=function(e){return kM(nO,e)||(nO[e]=wse&&kM(Gl,e)?Gl[e]:Cse("Symbol."+e)),nO[e]}});var KM=w((BFe,jM)=>{"use strict";m();T();N();var Bse=mc(),qM=Kl(),VM=HS(),Use=zS(),kse=vM(),Mse=xM(),xse=TypeError,qse=Mse("toPrimitive");jM.exports=function(e,t){if(!qM(e)||VM(e))return e;var n=Use(e,qse),r;if(n){if(t===void 0&&(t="default"),r=Bse(n,e,t),!qM(r)||VM(r))return r;throw new xse("Can't convert object to primitive value")}return t===void 0&&(t="number"),kse(e,t)}});var rO=w((xFe,GM)=>{"use strict";m();T();N();var Vse=KM(),jse=HS();GM.exports=function(e){var t=Vse(e,"string");return jse(t)?t:t+""}});var YM=w((KFe,QM)=>{"use strict";m();T();N();var Kse=$i(),$M=Kl(),iO=Kse.document,Gse=$M(iO)&&$M(iO.createElement);QM.exports=function(e){return Gse?iO.createElement(e):{}}});var aO=w((YFe,JM)=>{"use strict";m();T();N();var $se=mu(),Qse=_s(),Yse=YM();JM.exports=!$se&&!Qse(function(){return Object.defineProperty(Yse("div"),"a",{get:function(){return 7}}).a!==7})});var sO=w(zM=>{"use strict";m();T();N();var Jse=mu(),Hse=mc(),zse=xk(),Wse=xS(),Xse=rE(),Zse=rO(),eoe=Nu(),toe=aO(),HM=Object.getOwnPropertyDescriptor;zM.f=Jse?HM:function(t,n){if(t=Xse(t),n=Zse(n),toe)try{return HM(t,n)}catch(r){}if(eoe(t,n))return Wse(!Hse(zse.f,t,n),t[n])}});var XM=w((tPe,WM)=>{"use strict";m();T();N();var noe=mu(),roe=_s();WM.exports=noe&&roe(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var qp=w((aPe,ZM)=>{"use strict";m();T();N();var ioe=Kl(),aoe=String,soe=TypeError;ZM.exports=function(e){if(ioe(e))return e;throw new soe(aoe(e)+" is not an object")}});var lE=w(tx=>{"use strict";m();T();N();var ooe=mu(),uoe=aO(),coe=XM(),cE=qp(),ex=rO(),loe=TypeError,oO=Object.defineProperty,doe=Object.getOwnPropertyDescriptor,uO="enumerable",cO="configurable",lO="writable";tx.f=ooe?coe?function(t,n,r){if(cE(t),n=ex(n),cE(r),typeof t=="function"&&n==="prototype"&&"value"in r&&lO in r&&!r[lO]){var i=doe(t,n);i&&i[lO]&&(t[n]=r.value,r={configurable:cO in r?r[cO]:i[cO],enumerable:uO in r?r[uO]:i[uO],writable:!1})}return oO(t,n,r)}:oO:function(t,n,r){if(cE(t),n=ex(n),cE(r),uoe)try{return oO(t,n,r)}catch(i){}if("get"in r||"set"in r)throw new loe("Accessors not supported");return"value"in r&&(t[n]=r.value),t}});var dO=w((fPe,nx)=>{"use strict";m();T();N();var poe=mu(),foe=lE(),moe=xS();nx.exports=poe?function(e,t,n){return foe.f(e,t,moe(1,n))}:function(e,t,n){return e[t]=n,e}});var ax=w((EPe,ix)=>{"use strict";m();T();N();var pO=mu(),Noe=Nu(),rx=Function.prototype,Toe=pO&&Object.getOwnPropertyDescriptor,fO=Noe(rx,"name"),Eoe=fO&&function(){}.name==="something",hoe=fO&&(!pO||pO&&Toe(rx,"name").configurable);ix.exports={EXISTS:fO,PROPER:Eoe,CONFIGURABLE:hoe}});var ox=w((gPe,sx)=>{"use strict";m();T();N();var yoe=mi(),Ioe=da(),mO=uE(),goe=yoe(Function.toString);Ioe(mO.inspectSource)||(mO.inspectSource=function(e){return goe(e)});sx.exports=mO.inspectSource});var lx=w((OPe,cx)=>{"use strict";m();T();N();var _oe=$i(),voe=da(),ux=_oe.WeakMap;cx.exports=voe(ux)&&/native code/.test(String(ux))});var fx=w((RPe,px)=>{"use strict";m();T();N();var Soe=eO(),Ooe=tO(),dx=Soe("keys");px.exports=function(e){return dx[e]||(dx[e]=Ooe(e))}});var NO=w((LPe,mx)=>{"use strict";m();T();N();mx.exports={}});var hx=w((kPe,Ex)=>{"use strict";m();T();N();var Doe=lx(),Tx=$i(),boe=Kl(),Aoe=dO(),TO=Nu(),EO=uE(),Roe=fx(),Foe=NO(),Nx="Object already initialized",hO=Tx.TypeError,Poe=Tx.WeakMap,dE,Vp,pE,woe=function(e){return pE(e)?Vp(e):dE(e,{})},Loe=function(e){return function(t){var n;if(!boe(t)||(n=Vp(t)).type!==e)throw new hO("Incompatible receiver, "+e+" required");return n}};Doe||EO.state?(fa=EO.state||(EO.state=new Poe),fa.get=fa.get,fa.has=fa.has,fa.set=fa.set,dE=function(e,t){if(fa.has(e))throw new hO(Nx);return t.facade=e,fa.set(e,t),t},Vp=function(e){return fa.get(e)||{}},pE=function(e){return fa.has(e)}):(Nc=Roe("state"),Foe[Nc]=!0,dE=function(e,t){if(TO(e,Nc))throw new hO(Nx);return t.facade=e,Aoe(e,Nc,t),t},Vp=function(e){return TO(e,Nc)?e[Nc]:{}},pE=function(e){return TO(e,Nc)});var fa,Nc;Ex.exports={set:dE,get:Vp,has:pE,enforce:woe,getterFor:Loe}});var _x=w((VPe,gx)=>{"use strict";m();T();N();var IO=mi(),Coe=_s(),Boe=da(),fE=Nu(),yO=mu(),Uoe=ax().CONFIGURABLE,koe=ox(),Ix=hx(),Moe=Ix.enforce,xoe=Ix.get,yx=String,mE=Object.defineProperty,qoe=IO("".slice),Voe=IO("".replace),joe=IO([].join),Koe=yO&&!Coe(function(){return mE(function(){},"length",{value:8}).length!==8}),Goe=String(String).split("String"),$oe=gx.exports=function(e,t,n){qoe(yx(t),0,7)==="Symbol("&&(t="["+Voe(yx(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!fE(e,"name")||Uoe&&e.name!==t)&&(yO?mE(e,"name",{value:t,configurable:!0}):e.name=t),Koe&&n&&fE(n,"arity")&&e.length!==n.arity&&mE(e,"length",{value:n.arity});try{n&&fE(n,"constructor")&&n.constructor?yO&&mE(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(i){}var r=Moe(e);return fE(r,"source")||(r.source=joe(Goe,typeof t=="string"?t:"")),e};Function.prototype.toString=$oe(function(){return Boe(this)&&xoe(this).source||koe(this)},"toString")});var Sx=w(($Pe,vx)=>{"use strict";m();T();N();var Qoe=da(),Yoe=lE(),Joe=_x(),Hoe=oE();vx.exports=function(e,t,n,r){r||(r={});var i=r.enumerable,a=r.name!==void 0?r.name:t;if(Qoe(n)&&Joe(n,a,r),r.global)i?e[t]=n:Hoe(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(o){}i?e[t]=n:Yoe.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e}});var Dx=w((HPe,Ox)=>{"use strict";m();T();N();var zoe=Math.ceil,Woe=Math.floor;Ox.exports=Math.trunc||function(t){var n=+t;return(n>0?Woe:zoe)(n)}});var NE=w((ZPe,bx)=>{"use strict";m();T();N();var Xoe=Dx();bx.exports=function(e){var t=+e;return t!==t||t===0?0:Xoe(t)}});var Rx=w((rwe,Ax)=>{"use strict";m();T();N();var Zoe=NE(),eue=Math.max,tue=Math.min;Ax.exports=function(e,t){var n=Zoe(e);return n<0?eue(n+t,0):tue(n,t)}});var Px=w((owe,Fx)=>{"use strict";m();T();N();var nue=NE(),rue=Math.min;Fx.exports=function(e){var t=nue(e);return t>0?rue(t,9007199254740991):0}});var Lx=w((dwe,wx)=>{"use strict";m();T();N();var iue=Px();wx.exports=function(e){return iue(e.length)}});var Ux=w((Nwe,Bx)=>{"use strict";m();T();N();var aue=rE(),sue=Rx(),oue=Lx(),Cx=function(e){return function(t,n,r){var i=aue(t),a=oue(i);if(a===0)return!e&&-1;var o=sue(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}};Bx.exports={includes:Cx(!0),indexOf:Cx(!1)}});var xx=w((ywe,Mx)=>{"use strict";m();T();N();var uue=mi(),gO=Nu(),cue=rE(),lue=Ux().indexOf,due=NO(),kx=uue([].push);Mx.exports=function(e,t){var n=cue(e),r=0,i=[],a;for(a in n)!gO(due,a)&&gO(n,a)&&kx(i,a);for(;t.length>r;)gO(n,a=t[r++])&&(~lue(i,a)||kx(i,a));return i}});var Vx=w((vwe,qx)=>{"use strict";m();T();N();qx.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Kx=w(jx=>{"use strict";m();T();N();var pue=xx(),fue=Vx(),mue=fue.concat("length","prototype");jx.f=Object.getOwnPropertyNames||function(t){return pue(t,mue)}});var $x=w(Gx=>{"use strict";m();T();N();Gx.f=Object.getOwnPropertySymbols});var Yx=w((Bwe,Qx)=>{"use strict";m();T();N();var Nue=iE(),Tue=mi(),Eue=Kx(),hue=$x(),yue=qp(),Iue=Tue([].concat);Qx.exports=Nue("Reflect","ownKeys")||function(t){var n=Eue.f(yue(t)),r=hue.f;return r?Iue(n,r(t)):n}});var zx=w((xwe,Hx)=>{"use strict";m();T();N();var Jx=Nu(),gue=Yx(),_ue=sO(),vue=lE();Hx.exports=function(e,t,n){for(var r=gue(t),i=vue.f,a=_ue.f,o=0;o{"use strict";m();T();N();var Sue=_s(),Oue=da(),Due=/#|\.prototype\./,jp=function(e,t){var n=Aue[bue(e)];return n===Fue?!0:n===Rue?!1:Oue(t)?Sue(t):!!t},bue=jp.normalize=function(e){return String(e).replace(Due,".").toLowerCase()},Aue=jp.data={},Rue=jp.NATIVE="N",Fue=jp.POLYFILL="P";Wx.exports=jp});var _O=w((Ywe,Zx)=>{"use strict";m();T();N();var TE=$i(),Pue=sO().f,wue=dO(),Lue=Sx(),Cue=oE(),Bue=zx(),Uue=Xx();Zx.exports=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,c,l,d,f;if(r?o=TE:i?o=TE[n]||Cue(n,{}):o=TE[n]&&TE[n].prototype,o)for(c in t){if(d=t[c],e.dontCallGetSet?(f=Pue(o,c),l=f&&f.value):l=o[c],a=Uue(r?c:n+(i?".":"#")+c,e.forced),!a&&l!==void 0){if(typeof d==typeof l)continue;Bue(d,l)}(e.sham||l&&l.sham)&&wue(d,"sham",!0),Lue(o,c,d,e)}}});var Kp=w((Wwe,eq)=>{"use strict";m();T();N();var vO=mi(),EE=Set.prototype;eq.exports={Set,add:vO(EE.add),has:vO(EE.has),remove:vO(EE.delete),proto:EE}});var SO=w((tLe,tq)=>{"use strict";m();T();N();var kue=Kp().has;tq.exports=function(e){return kue(e),e}});var rq=w((aLe,nq)=>{"use strict";m();T();N();var Mue=mi(),xue=sE();nq.exports=function(e,t,n){try{return Mue(xue(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}}});var OO=w((cLe,iq)=>{"use strict";m();T();N();var que=rq(),Vue=Kp();iq.exports=que(Vue.proto,"size","get")||function(e){return e.size}});var DO=w((fLe,aq)=>{"use strict";m();T();N();var jue=mc();aq.exports=function(e,t,n){for(var r=n?e:e.iterator,i=e.next,a,o;!(a=jue(i,r)).done;)if(o=t(a.value),o!==void 0)return o}});var dq=w((ELe,lq)=>{"use strict";m();T();N();var sq=mi(),Kue=DO(),oq=Kp(),Gue=oq.Set,uq=oq.proto,$ue=sq(uq.forEach),cq=sq(uq.keys),Que=cq(new Gue).next;lq.exports=function(e,t,n){return n?Kue({iterator:cq(e),next:Que},t):$ue(e,t)}});var fq=w((gLe,pq)=>{"use strict";m();T();N();pq.exports=function(e){return{iterator:e,next:e.next,done:!1}}});var bO=w((OLe,yq)=>{"use strict";m();T();N();var mq=sE(),Eq=qp(),Nq=mc(),Yue=NE(),Jue=fq(),Tq="Invalid size",Hue=RangeError,zue=TypeError,Wue=Math.max,hq=function(e,t){this.set=e,this.size=Wue(t,0),this.has=mq(e.has),this.keys=mq(e.keys)};hq.prototype={getIterator:function(){return Jue(Eq(Nq(this.keys,this.set)))},includes:function(e){return Nq(this.has,this.set,e)}};yq.exports=function(e){Eq(e);var t=+e.size;if(t!==t)throw new zue(Tq);var n=Yue(t);if(n<0)throw new Hue(Tq);return new hq(e,n)}});var gq=w((RLe,Iq)=>{"use strict";m();T();N();var Xue=SO(),Zue=OO(),ece=dq(),tce=bO();Iq.exports=function(t){var n=Xue(this),r=tce(t);return Zue(n)>r.size?!1:ece(n,function(i){if(!r.includes(i))return!1},!0)!==!1}});var AO=w((LLe,Sq)=>{"use strict";m();T();N();var nce=iE(),_q=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},vq=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};Sq.exports=function(e,t){var n=nce("Set");try{new n()[e](_q(0));try{return new n()[e](_q(-1)),!1}catch(i){if(!t)return!0;try{return new n()[e](vq(-1/0)),!1}catch(a){var r=new n;return r.add(1),r.add(2),t(r[e](vq(1/0)))}}}catch(i){return!1}}});var Oq=w(()=>{"use strict";m();T();N();var rce=_O(),ice=gq(),ace=AO(),sce=!ace("isSubsetOf",function(e){return e});rce({target:"Set",proto:!0,real:!0,forced:sce},{isSubsetOf:ice})});var Dq=w(()=>{"use strict";m();T();N();Oq()});var Rq=w((YLe,Aq)=>{"use strict";m();T();N();var oce=mc(),bq=qp(),uce=zS();Aq.exports=function(e,t,n){var r,i;bq(e);try{if(r=uce(e,"return"),!r){if(t==="throw")throw n;return n}r=oce(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return bq(r),n}});var Pq=w((WLe,Fq)=>{"use strict";m();T();N();var cce=SO(),lce=Kp().has,dce=OO(),pce=bO(),fce=DO(),mce=Rq();Fq.exports=function(t){var n=cce(this),r=pce(t);if(dce(n){"use strict";m();T();N();var Nce=_O(),Tce=Pq(),Ece=AO(),hce=!Ece("isSupersetOf",function(e){return!e});Nce({target:"Set",proto:!0,real:!0,forced:hce},{isSupersetOf:Tce})});var Lq=w(()=>{"use strict";m();T();N();wq()});var Gp=w(Bn=>{"use strict";m();T();N();Object.defineProperty(Bn,"__esModule",{value:!0});Bn.subtractSet=yce;Bn.mapToArrayOfValues=Ice;Bn.kindToConvertedTypeString=gce;Bn.fieldDatasToSimpleFieldDatas=_ce;Bn.isNodeLeaf=vce;Bn.newEntityInterfaceFederationData=Sce;Bn.upsertEntityInterfaceFederationData=Oce;Bn.upsertEntityData=bce;Bn.updateEntityData=Cq;Bn.newFieldAuthorizationData=Ace;Bn.newAuthorizationData=Rce;Bn.addScopes=RO;Bn.mergeRequiredScopesByAND=IE;Bn.mergeRequiredScopesByOR=FO;Bn.upsertFieldAuthorizationData=Bq;Bn.upsertAuthorizationData=wce;Bn.upsertAuthorizationConfiguration=Lce;Bn.isNodeKindObject=Cce;Bn.isObjectDefinitionData=Bce;Bn.getNodeCoords=Uce;var Gt=Ae(),ei=ur(),hE=Hr(),yE=ys();Dq();Lq();function yce(e,t){for(let n of e)t.delete(n)}function Ice(e){let t=[];for(let n of e.values())t.push(n);return t}function gce(e){switch(e){case Gt.Kind.BOOLEAN:return ei.BOOLEAN_SCALAR;case Gt.Kind.ENUM:case Gt.Kind.ENUM_TYPE_DEFINITION:case Gt.Kind.ENUM_TYPE_EXTENSION:return ei.ENUM;case Gt.Kind.ENUM_VALUE_DEFINITION:return ei.ENUM_VALUE;case Gt.Kind.FIELD_DEFINITION:return ei.FIELD;case Gt.Kind.FLOAT:return ei.FLOAT_SCALAR;case Gt.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Gt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return ei.INPUT_OBJECT;case Gt.Kind.INPUT_VALUE_DEFINITION:return ei.INPUT_VALUE;case Gt.Kind.INT:return ei.INT_SCALAR;case Gt.Kind.INTERFACE_TYPE_DEFINITION:case Gt.Kind.INTERFACE_TYPE_EXTENSION:return ei.INTERFACE;case Gt.Kind.NULL:return ei.NULL;case Gt.Kind.OBJECT:case Gt.Kind.OBJECT_TYPE_DEFINITION:case Gt.Kind.OBJECT_TYPE_EXTENSION:return ei.OBJECT;case Gt.Kind.STRING:return ei.STRING_SCALAR;case Gt.Kind.SCALAR_TYPE_DEFINITION:case Gt.Kind.SCALAR_TYPE_EXTENSION:return ei.SCALAR;case Gt.Kind.UNION_TYPE_DEFINITION:case Gt.Kind.UNION_TYPE_EXTENSION:return ei.UNION;default:return e}}function _ce(e){let t=[];for(let{name:n,namedTypeName:r}of e)t.push({name:n,namedTypeName:r});return t}function vce(e){if(!e)return!0;switch(e){case Gt.Kind.OBJECT_TYPE_DEFINITION:case Gt.Kind.INTERFACE_TYPE_DEFINITION:case Gt.Kind.UNION_TYPE_DEFINITION:return!1;default:return!0}}function Sce(e,t){return{concreteTypeNames:new Set(e.concreteTypeNames),fieldDatasBySubgraphName:new Map([[t,e.fieldDatas]]),interfaceFieldNames:new Set(e.interfaceFieldNames),interfaceObjectFieldNames:new Set(e.interfaceObjectFieldNames),interfaceObjectSubgraphs:new Set(e.isInterfaceObject?[t]:[]),subgraphDataByTypeName:new Map([[t,e]]),typeName:e.typeName}}function Oce(e,t,n){(0,hE.addIterableValuesToSet)(t.concreteTypeNames,e.concreteTypeNames),e.subgraphDataByTypeName.set(n,t),e.fieldDatasBySubgraphName.set(n,t.fieldDatas),(0,hE.addIterableValuesToSet)(t.interfaceFieldNames,e.interfaceFieldNames),(0,hE.addIterableValuesToSet)(t.interfaceObjectFieldNames,e.interfaceObjectFieldNames),t.isInterfaceObject&&e.interfaceObjectSubgraphs.add(n)}function Dce({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 bce({entityDataByTypeName:e,keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}){let i=e.get(r);i?Cq({entityData:i,keyFieldSetDataByFieldSet:t,subgraphName:n}):e.set(r,Dce({keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}))}function Cq({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 Ace(e){return{fieldName:e,inheritedData:{requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1},originalData:{requiredScopes:[],requiresAuthentication:!1}}}function Rce(e){return{fieldAuthDataByFieldName:new Map,requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1,typeName:e}}function RO(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 IE(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,hE.addSets)(r,i);RO(n,a)}return n}function FO(e,t){for(let n of t)RO(e,n);return e.length<=yE.MAX_OR_SCOPES}function Bq(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),!FO(r.inheritedData.requiredScopesByOR,t.inheritedData.requiredScopes)||r.inheritedData.requiredScopes.length*t.inheritedData.requiredScopes.length>yE.MAX_OR_SCOPES||r.originalData.requiredScopes.length*t.originalData.requiredScopes.length>yE.MAX_OR_SCOPES?!1:(r.inheritedData.requiredScopes=IE(r.inheritedData.requiredScopes,t.inheritedData.requiredScopes),r.originalData.requiredScopes=IE(r.originalData.requiredScopes,t.originalData.requiredScopes),!0)):(e.set(n,Uq(t)),!0)}function Fce(e){let t=new Map;for(let[n,r]of e)t.set(n,Uq(r));return t}function Uq(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 Pce(e){return{fieldAuthDataByFieldName:Fce(e.fieldAuthDataByFieldName),requiredScopes:[...e.requiredScopes],requiredScopesByOR:[...e.requiredScopes],requiresAuthentication:e.requiresAuthentication,typeName:e.typeName}}function wce(e,t,n){let r=e.get(t.typeName);if(!r){e.set(t.typeName,Pce(t));return}r.requiresAuthentication||(r.requiresAuthentication=t.requiresAuthentication),!FO(r.requiredScopesByOR,t.requiredScopes)||r.requiredScopes.length*t.requiredScopes.length>yE.MAX_OR_SCOPES?n.add(t.typeName):r.requiredScopes=IE(r.requiredScopes,t.requiredScopes);for(let[i,a]of t.fieldAuthDataByFieldName)Bq(r.fieldAuthDataByFieldName,a)||n.add(`${t.typeName}.${i}`)}function Lce(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 Cce(e){return e===Gt.Kind.OBJECT_TYPE_DEFINITION||e===Gt.Kind.OBJECT_TYPE_EXTENSION}function Bce(e){return e?e.kind===Gt.Kind.OBJECT_TYPE_DEFINITION:!1}function Uce(e){switch(e.kind){case Gt.Kind.ARGUMENT:case Gt.Kind.FIELD_DEFINITION:case Gt.Kind.INPUT_VALUE_DEFINITION:case Gt.Kind.ENUM_VALUE_DEFINITION:return e.federatedCoords;default:return e.name}}});var PO=w($e=>{"use strict";m();T();N();Object.defineProperty($e,"__esModule",{value:!0});$e.TAG_DEFINITION_DATA=$e.SUBSCRIPTION_FILTER_DEFINITION_DATA=$e.SHAREABLE_DEFINITION_DATA=$e.SPECIFIED_BY_DEFINITION_DATA=$e.SEMANTIC_NON_NULL_DATA=$e.REQUIRES_SCOPES_DEFINITION_DATA=$e.REQUIRE_FETCH_REASONS_DEFINITION_DATA=$e.REDIS_SUBSCRIBE_DEFINITION_DATA=$e.REDIS_PUBLISH_DEFINITION_DATA=$e.REQUIRES_DEFINITION_DATA=$e.PROVIDES_DEFINITION_DATA=$e.LINK_DEFINITION_DATA=$e.KEY_DEFINITION_DATA=$e.OVERRIDE_DEFINITION_DATA=$e.ONE_OF_DEFINITION_DATA=$e.NATS_SUBSCRIBE_DEFINITION_DATA=$e.NATS_REQUEST_DEFINITION_DATA=$e.NATS_PUBLISH_DEFINITION_DATA=$e.KAFKA_SUBSCRIBE_DEFINITION_DATA=$e.KAFKA_PUBLISH_DEFINITION_DATA=$e.INTERFACE_OBJECT_DEFINITION_DATA=$e.INACCESSIBLE_DEFINITION_DATA=$e.EXTERNAL_DEFINITION_DATA=$e.EXTENDS_DEFINITION_DATA=$e.DEPRECATED_DEFINITION_DATA=$e.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA=$e.CONFIGURE_DESCRIPTION_DEFINITION_DATA=$e.COMPOSE_DIRECTIVE_DEFINITION_DATA=$e.AUTHENTICATED_DEFINITION_DATA=void 0;var Xe=ys(),Qi=Jr(),$t=Ae(),q=ur();$e.AUTHENTICATED_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([]),isRepeatable:!1,locations:new Set([q.ENUM_UPPER,q.FIELD_DEFINITION_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER]),name:q.AUTHENTICATED,node:Xe.AUTHENTICATED_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.COMPOSE_DIRECTIVE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.NAME,{name:q.NAME,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([q.SCHEMA_UPPER]),name:q.COMPOSE_DIRECTIVE,node:Xe.COMPOSE_DIRECTIVE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.NAME])};$e.CONFIGURE_DESCRIPTION_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.PROPAGATE,{name:q.PROPAGATE,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Qi.stringToNamedTypeNode)(q.BOOLEAN_SCALAR)},defaultValue:{kind:$t.Kind.BOOLEAN,value:!0}}],[q.DESCRIPTION_OVERRIDE,{name:q.DESCRIPTION_OVERRIDE,typeNode:(0,Qi.stringToNamedTypeNode)(q.STRING_SCALAR)}]]),isRepeatable:!1,locations:new Set([q.ARGUMENT_DEFINITION_UPPER,q.ENUM_UPPER,q.ENUM_VALUE_UPPER,q.FIELD_DEFINITION_UPPER,q.INTERFACE_UPPER,q.INPUT_OBJECT_UPPER,q.INPUT_FIELD_DEFINITION_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER,q.SCHEMA_UPPER,q.UNION_UPPER]),name:q.CONFIGURE_DESCRIPTION,node:Xe.CONFIGURE_DESCRIPTION_DEFINITION,optionalArgumentNames:new Set([q.PROPAGATE,q.DESCRIPTION_OVERRIDE]),requiredArgumentNames:new Set};$e.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.PROPAGATE,{name:q.PROPAGATE,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Qi.stringToNamedTypeNode)(q.BOOLEAN_SCALAR)},defaultValue:{kind:$t.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!1,locations:new Set([q.ENUM_UPPER,q.INPUT_OBJECT_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER]),name:q.CONFIGURE_CHILD_DESCRIPTIONS,node:Xe.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION,optionalArgumentNames:new Set([q.PROPAGATE]),requiredArgumentNames:new Set};$e.DEPRECATED_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.REASON,{name:q.REASON,typeNode:(0,Qi.stringToNamedTypeNode)(q.STRING_SCALAR),defaultValue:{kind:$t.Kind.STRING,value:$t.DEFAULT_DEPRECATION_REASON}}]]),isRepeatable:!1,locations:new Set([q.ARGUMENT_DEFINITION_UPPER,q.ENUM_VALUE_UPPER,q.FIELD_DEFINITION_UPPER,q.INPUT_FIELD_DEFINITION_UPPER]),name:q.DEPRECATED,node:Xe.DEPRECATED_DEFINITION,optionalArgumentNames:new Set([q.REASON]),requiredArgumentNames:new Set};$e.EXTENDS_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!1,locations:new Set([q.INTERFACE_UPPER,q.OBJECT_UPPER]),name:q.EXTENDS,node:Xe.EXTENDS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.EXTERNAL_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER,q.OBJECT_UPPER]),name:q.EXTERNAL,node:Xe.EXTERNAL_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.INACCESSIBLE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!1,locations:new Set([q.ARGUMENT_DEFINITION_UPPER,q.ENUM_UPPER,q.ENUM_VALUE_UPPER,q.FIELD_DEFINITION_UPPER,q.INPUT_FIELD_DEFINITION_UPPER,q.INPUT_OBJECT_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER,q.UNION_UPPER]),name:q.INACCESSIBLE,node:Xe.INACCESSIBLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.INTERFACE_OBJECT_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!1,locations:new Set([q.OBJECT_UPPER]),name:q.INTERFACE_OBJECT,node:Xe.INTERFACE_OBJECT_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.KAFKA_PUBLISH_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.TOPIC,{name:q.TOPIC,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_KAFKA_PUBLISH,node:Xe.EDFS_KAFKA_PUBLISH_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.TOPIC])};$e.KAFKA_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.TOPICS,{name:q.TOPICS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:Xe.REQUIRED_STRING_TYPE_NODE}}}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_KAFKA_SUBSCRIBE,node:Xe.EDFS_KAFKA_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.TOPICS])};$e.NATS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.SUBJECT,{name:q.SUBJECT,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_NATS_PUBLISH,node:Xe.EDFS_NATS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.SUBJECT])};$e.NATS_REQUEST_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.SUBJECT,{name:q.SUBJECT,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_NATS_REQUEST,node:Xe.EDFS_NATS_REQUEST_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.SUBJECT])};$e.NATS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.SUBJECTS,{name:q.SUBJECTS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:Xe.REQUIRED_STRING_TYPE_NODE}}}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}],[q.STREAM_CONFIGURATION,{name:q.STREAM_CONFIGURATION,typeNode:(0,Qi.stringToNamedTypeNode)(q.EDFS_NATS_STREAM_CONFIGURATION)}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_NATS_SUBSCRIBE,node:Xe.EDFS_NATS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.SUBJECTS])};$e.ONE_OF_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([]),isRepeatable:!1,locations:new Set([q.INPUT_OBJECT_UPPER]),name:q.ONE_OF,node:Xe.ONE_OF_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.OVERRIDE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.FROM,{name:q.FROM,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.OVERRIDE,node:Xe.OVERRIDE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.FROM])};$e.KEY_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.FIELDS,{name:q.FIELDS,typeNode:Xe.REQUIRED_FIELDSET_TYPE_NODE}],[q.RESOLVABLE,{name:q.RESOLVABLE,typeNode:(0,Qi.stringToNamedTypeNode)(q.BOOLEAN_SCALAR),defaultValue:{kind:$t.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!0,locations:new Set([q.INTERFACE_UPPER,q.OBJECT_UPPER]),name:q.KEY,node:Xe.KEY_DEFINITION,optionalArgumentNames:new Set([q.RESOLVABLE]),requiredArgumentNames:new Set([q.FIELDS])};$e.LINK_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.URL_LOWER,{name:q.URL_LOWER,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.AS,{name:q.AS,typeNode:(0,Qi.stringToNamedTypeNode)(q.STRING_SCALAR)}],[q.FOR,{name:q.FOR,typeNode:(0,Qi.stringToNamedTypeNode)(q.LINK_PURPOSE)}],[q.IMPORT,{name:q.IMPORT,typeNode:{kind:$t.Kind.LIST_TYPE,type:(0,Qi.stringToNamedTypeNode)(q.LINK_IMPORT)}}]]),isRepeatable:!0,locations:new Set([q.SCHEMA_UPPER]),name:q.LINK,node:Xe.LINK_DEFINITION,optionalArgumentNames:new Set([q.AS,q.FOR,q.IMPORT]),requiredArgumentNames:new Set([q.URL_LOWER])};$e.PROVIDES_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.FIELDS,{name:q.FIELDS,typeNode:Xe.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.PROVIDES,node:Xe.PROVIDES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.FIELDS])};$e.REQUIRES_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.FIELDS,{name:q.FIELDS,typeNode:Xe.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.REQUIRES,node:Xe.REQUIRES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.FIELDS])};$e.REDIS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.CHANNEL,{name:q.CHANNEL,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_REDIS_PUBLISH,node:Xe.EDFS_REDIS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.CHANNEL])};$e.REDIS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.CHANNELS,{name:q.CHANNELS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:Xe.REQUIRED_STRING_TYPE_NODE}}}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_REDIS_SUBSCRIBE,node:Xe.EDFS_REDIS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.CHANNELS])};$e.REQUIRE_FETCH_REASONS_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!0,locations:new Set([q.FIELD_DEFINITION_UPPER,q.OBJECT_UPPER]),name:q.REQUIRE_FETCH_REASONS,node:Xe.REQUIRE_FETCH_REASONS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.REQUIRES_SCOPES_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.SCOPES,{name:q.SCOPES,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Qi.stringToNamedTypeNode)(q.SCOPE_SCALAR)}}}}}}]]),isRepeatable:!1,locations:new Set([q.ENUM_UPPER,q.FIELD_DEFINITION_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER]),name:q.REQUIRES_SCOPES,node:Xe.REQUIRES_SCOPES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.SCOPES])};$e.SEMANTIC_NON_NULL_DATA={argumentTypeNodeByArgumentName:new Map([[q.LEVELS,{name:q.LEVELS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Qi.stringToNamedTypeNode)(q.INT_SCALAR)}}},defaultValue:{kind:$t.Kind.LIST,values:[{kind:$t.Kind.INT,value:"0"}]}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.SEMANTIC_NON_NULL,node:Xe.SEMANTIC_NON_NULL_DEFINITION,optionalArgumentNames:new Set([q.LEVELS]),requiredArgumentNames:new Set};$e.SPECIFIED_BY_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.URL_LOWER,{name:q.URL_LOWER,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([q.SCALAR_UPPER]),name:q.SPECIFIED_BY,node:Xe.SPECIFIED_BY_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.URL_LOWER])};$e.SHAREABLE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!0,locations:new Set([q.FIELD_DEFINITION_UPPER,q.OBJECT_UPPER]),name:q.SHAREABLE,node:Xe.SHAREABLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.SUBSCRIPTION_FILTER_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.CONDITION,{name:q.CONDITION,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Qi.stringToNamedTypeNode)(q.SUBSCRIPTION_FILTER_CONDITION)}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.SUBSCRIPTION_FILTER,node:Xe.SUBSCRIPTION_FILTER_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.CONDITION])};$e.TAG_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.NAME,{name:q.NAME,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([q.ARGUMENT_DEFINITION_UPPER,q.ENUM_UPPER,q.ENUM_VALUE_UPPER,q.FIELD_DEFINITION_UPPER,q.INPUT_FIELD_DEFINITION_UPPER,q.INPUT_OBJECT_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER,q.UNION_UPPER]),name:q.TAG,node:Xe.TAG_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.NAME])}});var $p=w(ma=>{"use strict";m();T();N();Object.defineProperty(ma,"__esModule",{value:!0});ma.newFieldSetData=kce;ma.extractFieldSetValue=Mce;ma.getNormalizedFieldSet=xce;ma.getInitialFieldCoordsPath=qce;ma.validateKeyFieldSets=Vce;ma.getConditionalFieldSetDirectiveName=jce;ma.isNodeQuery=Kce;ma.validateArgumentTemplateReferences=Gce;ma.initializeDirectiveDefinitionDatas=$ce;var tr=Ae(),kq=Jr(),br=oa(),Mq=ys(),wO=ou(),an=PO(),At=ur(),Tu=Hr();function kce(){return{provides:new Map,requires:new Map}}function Mce(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!==At.FIELDS||i.value.kind!==tr.Kind.STRING||t.set(e,i.value.value)}function xce(e){return(0,tr.print)((0,kq.lexicographicallySortDocumentNode)(e)).replaceAll(/\s+/g," ").slice(2,-2)}function qce(e,t){return e?[t]:[]}function Vce(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[f,{documentNode:y,isUnresolvable:I,rawFieldSet:v}]of n){r&&(r.resolvable||(r.resolvable=!I)),d+=1;let P=[],k=[t],K=[],Q=[],se=new Set,ie=-1,Te=!0,de="";if((0,tr.visit)(y,{Argument:{enter(Re){return P.push((0,br.unexpectedArgumentErrorMessage)(v,`${k[ie].name}.${de}`,Re.name.value)),tr.BREAK}},Field:{enter(Re){let xe=k[ie],tt=xe.name;if(Te){let bn=`${tt}.${de}`,Qt=xe.fieldDataByName.get(de);if(!Qt)return P.push((0,br.undefinedFieldInFieldSetErrorMessage)(v,bn,de)),tr.BREAK;let mn=(0,wO.getTypeNodeNamedTypeName)(Qt.node.type),Ar=e.parentDefinitionDataByTypeName.get(mn),Rr=Ar?Ar.kind:tr.Kind.SCALAR_TYPE_DEFINITION;return P.push((0,br.invalidSelectionSetErrorMessage)(v,[bn],mn,(0,Tu.kindToNodeType)(Rr))),tr.BREAK}let ee=Re.name.value,Se=`${tt}.${ee}`;de=ee;let gt=xe.fieldDataByName.get(ee);if(!gt)return P.push((0,br.undefinedFieldInFieldSetErrorMessage)(v,tt,ee)),tr.BREAK;if(gt.argumentDataByName.size)return P.push((0,br.argumentsInKeyFieldSetErrorMessage)(v,Se)),tr.BREAK;if(K[ie].has(ee))return P.push((0,br.duplicateFieldInFieldSetErrorMessage)(v,Se)),tr.BREAK;(0,Tu.getValueOrDefault)((0,Tu.getValueOrDefault)(e.keyFieldSetsByEntityTypeNameByFieldCoords,Se,()=>new Map),i,()=>new Set).add(f),Q.push(ee),gt.isShareableBySubgraphName.set(e.subgraphName,!0),K[ie].add(ee),(0,Tu.getValueOrDefault)(e.keyFieldNamesByParentTypeName,tt,()=>new Set).add(ee);let en=(0,wO.getTypeNodeNamedTypeName)(gt.node.type);if(Mq.BASE_SCALARS.has(en)){se.add(Q.join(At.PERIOD)),Q.pop();return}let tn=e.parentDefinitionDataByTypeName.get(en);if(!tn)return P.push((0,br.unknownTypeInFieldSetErrorMessage)(v,Se,en)),tr.BREAK;if(tn.kind===tr.Kind.OBJECT_TYPE_DEFINITION){Te=!0,k.push(tn);return}if((0,kq.isKindAbstract)(tn.kind))return P.push((0,br.abstractTypeInKeyFieldSetErrorMessage)(v,Se,en,(0,Tu.kindToNodeType)(tn.kind))),tr.BREAK;se.add(Q.join(At.PERIOD)),Q.pop()}},InlineFragment:{enter(){return P.push(br.inlineFragmentInFieldSetErrorMessage),tr.BREAK}},SelectionSet:{enter(){if(!Te){let Re=k[ie],tt=`${Re.name}.${de}`,ee=Re.fieldDataByName.get(de);if(!ee)return P.push((0,br.undefinedFieldInFieldSetErrorMessage)(v,tt,de)),tr.BREAK;let Se=(0,wO.getTypeNodeNamedTypeName)(ee.node.type),gt=e.parentDefinitionDataByTypeName.get(Se),en=gt?gt.kind:tr.Kind.SCALAR_TYPE_DEFINITION;return P.push((0,br.invalidSelectionSetDefinitionErrorMessage)(v,[tt],Se,(0,Tu.kindToNodeType)(en))),tr.BREAK}if(ie+=1,Te=!1,ie<0||ie>=k.length)return P.push((0,br.unparsableFieldSetSelectionErrorMessage)(v,de)),tr.BREAK;K.push(new Set)},leave(){if(Te){let xe=k[ie].name,tt=k[ie+1],ee=`${xe}.${de}`;P.push((0,br.invalidSelectionSetErrorMessage)(v,[ee],tt.name,(0,Tu.kindToNodeType)(tt.kind))),Te=!1}ie-=1,k.pop(),K.pop()}}}),P.length>0){e.errors.push((0,br.invalidDirectiveError)(At.KEY,i,(0,Tu.numberToOrdinal)(d),P));continue}a.push(x({fieldName:"",selectionSet:f},I?{disableEntityResolver:!0}:{})),l.satisfiedFieldSets.add(f),!I&&(c==null||c.addTargetSubgraphByFieldSet(f,e.subgraphName),o.push(se))}if(a.length>0)return a}function jce(e){return e?At.PROVIDES:At.REQUIRES}function Kce(e,t){return e===At.QUERY||t===tr.OperationTypeNode.QUERY}function Gce(e,t,n){let r=e.matchAll(Mq.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,br.undefinedEventSubjectsArgumentErrorMessage)(o));for(let o of a)n.push((0,br.invalidEventSubjectsArgumentErrorMessage)(o))}function $ce(){return new Map([[At.AUTHENTICATED,an.AUTHENTICATED_DEFINITION_DATA],[At.COMPOSE_DIRECTIVE,an.COMPOSE_DIRECTIVE_DEFINITION_DATA],[At.CONFIGURE_DESCRIPTION,an.CONFIGURE_DESCRIPTION_DEFINITION_DATA],[At.CONFIGURE_CHILD_DESCRIPTIONS,an.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA],[At.DEPRECATED,an.DEPRECATED_DEFINITION_DATA],[At.EDFS_KAFKA_PUBLISH,an.KAFKA_PUBLISH_DEFINITION_DATA],[At.EDFS_KAFKA_SUBSCRIBE,an.KAFKA_SUBSCRIBE_DEFINITION_DATA],[At.EDFS_NATS_PUBLISH,an.NATS_PUBLISH_DEFINITION_DATA],[At.EDFS_NATS_REQUEST,an.NATS_REQUEST_DEFINITION_DATA],[At.EDFS_NATS_SUBSCRIBE,an.NATS_SUBSCRIBE_DEFINITION_DATA],[At.EDFS_REDIS_PUBLISH,an.REDIS_PUBLISH_DEFINITION_DATA],[At.EDFS_REDIS_SUBSCRIBE,an.REDIS_SUBSCRIBE_DEFINITION_DATA],[At.EXTENDS,an.EXTENDS_DEFINITION_DATA],[At.EXTERNAL,an.EXTERNAL_DEFINITION_DATA],[At.INACCESSIBLE,an.INACCESSIBLE_DEFINITION_DATA],[At.INTERFACE_OBJECT,an.INTERFACE_OBJECT_DEFINITION_DATA],[At.KEY,an.KEY_DEFINITION_DATA],[At.LINK,an.LINK_DEFINITION_DATA],[At.ONE_OF,an.ONE_OF_DEFINITION_DATA],[At.OVERRIDE,an.OVERRIDE_DEFINITION_DATA],[At.PROVIDES,an.PROVIDES_DEFINITION_DATA],[At.REQUIRE_FETCH_REASONS,an.REQUIRE_FETCH_REASONS_DEFINITION_DATA],[At.REQUIRES,an.REQUIRES_DEFINITION_DATA],[At.REQUIRES_SCOPES,an.REQUIRES_SCOPES_DEFINITION_DATA],[At.SEMANTIC_NON_NULL,an.SEMANTIC_NON_NULL_DATA],[At.SHAREABLE,an.SHAREABLE_DEFINITION_DATA],[At.SPECIFIED_BY,an.SPECIFIED_BY_DEFINITION_DATA],[At.SUBSCRIPTION_FILTER,an.SUBSCRIPTION_FILTER_DEFINITION_DATA],[At.TAG,an.TAG_DEFINITION_DATA]])}});var CO=w(LO=>{"use strict";m();T();N();Object.defineProperty(LO,"__esModule",{value:!0});LO.recordSubgraphName=Qce;function Qce(e,t,n){if(!t.has(e)){t.add(e);return}n.add(e)}});var UO=w(gE=>{"use strict";m();T();N();Object.defineProperty(gE,"__esModule",{value:!0});gE.Warning=void 0;var BO=class extends Error{constructor(n){super(n.message);_(this,"subgraph");this.name="Warning",this.subgraph=n.subgraph}};gE.Warning=BO});var Qp=w(Ni=>{"use strict";m();T();N();Object.defineProperty(Ni,"__esModule",{value:!0});Ni.invalidOverrideTargetSubgraphNameWarning=Yce;Ni.externalInterfaceFieldsWarning=Jce;Ni.nonExternalConditionalFieldWarning=Hce;Ni.unimplementedInterfaceOutputTypeWarning=zce;Ni.invalidExternalFieldWarning=Wce;Ni.requiresDefinedOnNonEntityFieldWarning=Xce;Ni.consumerInactiveThresholdInvalidValueWarning=Zce;Ni.externalEntityExtensionKeyFieldWarning=ele;Ni.fieldAlreadyProvidedWarning=tle;Ni.singleSubgraphInputFieldOneOfWarning=nle;Ni.singleFederatedInputFieldOneOfWarning=rle;var Na=UO(),kO=ur();function Yce(e,t,n,r){return new Na.Warning({message:`The Object type "${t}" defines the directive "@override(from: "${e}")" on the following field`+(n.length>1?"s":"")+': "'+n.join(kO.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 rse({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(He.QUOTATION_JOIN)+'".')}});var Xk=w(Wk=>{"use strict";m();T();N();Object.defineProperty(Wk,"__esModule",{value:!0})});var jp=w(Qi=>{"use strict";m();T();N();Object.defineProperty(Qi,"__esModule",{value:!0});Qi.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=Qi.SUBSCRIPTION_FILTER_INPUT_NAMES=Qi.STREAM_CONFIGURATION_FIELD_NAMES=Qi.EVENT_DIRECTIVE_NAMES=Qi.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=void 0;var fn=vr();Qi.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=new Set([fn.ARGUMENT_DEFINITION_UPPER,fn.ENUM_UPPER,fn.ENUM_VALUE_UPPER,fn.FIELD_DEFINITION_UPPER,fn.INPUT_FIELD_DEFINITION_UPPER,fn.INPUT_OBJECT_UPPER,fn.INTERFACE_UPPER,fn.OBJECT_UPPER,fn.SCALAR_UPPER,fn.SCHEMA_UPPER,fn.UNION_UPPER]);Qi.EVENT_DIRECTIVE_NAMES=new Set([fn.EDFS_KAFKA_PUBLISH,fn.EDFS_KAFKA_SUBSCRIBE,fn.EDFS_NATS_PUBLISH,fn.EDFS_NATS_REQUEST,fn.EDFS_NATS_SUBSCRIBE,fn.EDFS_REDIS_PUBLISH,fn.EDFS_REDIS_SUBSCRIBE]);Qi.STREAM_CONFIGURATION_FIELD_NAMES=new Set([fn.CONSUMER_INACTIVE_THRESHOLD,fn.CONSUMER_NAME,fn.STREAM_NAME]);Qi.SUBSCRIPTION_FILTER_INPUT_NAMES=new Set([fn.AND_UPPER,fn.IN_UPPER,fn.NOT_UPPER,fn.OR_UPPER]);Qi.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=new Set([fn.AND_UPPER,fn.OR_UPPER])});var Yi=w((WS,Zk)=>{"use strict";m();T();N();var Kp=function(e){return e&&e.Math===Math&&e};Zk.exports=Kp(typeof globalThis=="object"&&globalThis)||Kp(typeof window=="object"&&window)||Kp(typeof self=="object"&&self)||Kp(typeof global=="object"&&global)||Kp(typeof WS=="object"&&WS)||function(){return this}()||Function("return this")()});var bs=w((VAe,eM)=>{"use strict";m();T();N();eM.exports=function(e){try{return!!e()}catch(t){return!0}}});var hu=w(($Ae,tM)=>{"use strict";m();T();N();var ise=bs();tM.exports=!ise(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var XS=w((HAe,nM)=>{"use strict";m();T();N();var ase=bs();nM.exports=!ase(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var hc=w((ZAe,rM)=>{"use strict";m();T();N();var sse=XS(),sE=Function.prototype.call;rM.exports=sse?sE.bind(sE):function(){return sE.apply(sE,arguments)}});var oM=w(sM=>{"use strict";m();T();N();var iM={}.propertyIsEnumerable,aM=Object.getOwnPropertyDescriptor,ose=aM&&!iM.call({1:2},1);sM.f=ose?function(t){var n=aM(this,t);return!!n&&n.enumerable}:iM});var ZS=w((oRe,uM)=>{"use strict";m();T();N();uM.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var mi=w((dRe,dM)=>{"use strict";m();T();N();var cM=XS(),lM=Function.prototype,eO=lM.call,use=cM&&lM.bind.bind(eO,eO);dM.exports=cM?use:function(e){return function(){return eO.apply(e,arguments)}}});var mM=w((NRe,fM)=>{"use strict";m();T();N();var pM=mi(),cse=pM({}.toString),lse=pM("".slice);fM.exports=function(e){return lse(cse(e),8,-1)}});var TM=w((yRe,NM)=>{"use strict";m();T();N();var dse=mi(),pse=bs(),fse=mM(),tO=Object,mse=dse("".split);NM.exports=pse(function(){return!tO("z").propertyIsEnumerable(0)})?function(e){return fse(e)==="String"?mse(e,""):tO(e)}:tO});var nO=w((vRe,EM)=>{"use strict";m();T();N();EM.exports=function(e){return e==null}});var rO=w((bRe,hM)=>{"use strict";m();T();N();var Nse=nO(),Tse=TypeError;hM.exports=function(e){if(Nse(e))throw new Tse("Can't call method on "+e);return e}});var oE=w((FRe,yM)=>{"use strict";m();T();N();var Ese=TM(),hse=rO();yM.exports=function(e){return Ese(hse(e))}});var pa=w((BRe,IM)=>{"use strict";m();T();N();var iO=typeof document=="object"&&document.all;IM.exports=typeof iO=="undefined"&&iO!==void 0?function(e){return typeof e=="function"||e===iO}:function(e){return typeof e=="function"}});var Yl=w((xRe,gM)=>{"use strict";m();T();N();var yse=pa();gM.exports=function(e){return typeof e=="object"?e!==null:yse(e)}});var uE=w((KRe,_M)=>{"use strict";m();T();N();var aO=Yi(),Ise=pa(),gse=function(e){return Ise(e)?e:void 0};_M.exports=function(e,t){return arguments.length<2?gse(aO[e]):aO[e]&&aO[e][t]}});var SM=w((YRe,vM)=>{"use strict";m();T();N();var _se=mi();vM.exports=_se({}.isPrototypeOf)});var AM=w((WRe,bM)=>{"use strict";m();T();N();var vse=Yi(),OM=vse.navigator,DM=OM&&OM.userAgent;bM.exports=DM?String(DM):""});var BM=w((tPe,CM)=>{"use strict";m();T();N();var LM=Yi(),sO=AM(),RM=LM.process,PM=LM.Deno,FM=RM&&RM.versions||PM&&PM.version,wM=FM&&FM.v8,fa,cE;wM&&(fa=wM.split("."),cE=fa[0]>0&&fa[0]<4?1:+(fa[0]+fa[1]));!cE&&sO&&(fa=sO.match(/Edge\/(\d+)/),(!fa||fa[1]>=74)&&(fa=sO.match(/Chrome\/(\d+)/),fa&&(cE=+fa[1])));CM.exports=cE});var oO=w((aPe,kM)=>{"use strict";m();T();N();var UM=BM(),Sse=bs(),Ose=Yi(),Dse=Ose.String;kM.exports=!!Object.getOwnPropertySymbols&&!Sse(function(){var e=Symbol("symbol detection");return!Dse(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&UM&&UM<41})});var uO=w((cPe,MM)=>{"use strict";m();T();N();var bse=oO();MM.exports=bse&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var cO=w((fPe,xM)=>{"use strict";m();T();N();var Ase=uE(),Rse=pa(),Pse=SM(),Fse=uO(),wse=Object;xM.exports=Fse?function(e){return typeof e=="symbol"}:function(e){var t=Ase("Symbol");return Rse(t)&&Pse(t.prototype,wse(e))}});var VM=w((EPe,qM)=>{"use strict";m();T();N();var Lse=String;qM.exports=function(e){try{return Lse(e)}catch(t){return"Object"}}});var lE=w((gPe,jM)=>{"use strict";m();T();N();var Cse=pa(),Bse=VM(),Use=TypeError;jM.exports=function(e){if(Cse(e))return e;throw new Use(Bse(e)+" is not a function")}});var lO=w((OPe,KM)=>{"use strict";m();T();N();var kse=lE(),Mse=nO();KM.exports=function(e,t){var n=e[t];return Mse(n)?void 0:kse(n)}});var $M=w((RPe,GM)=>{"use strict";m();T();N();var dO=hc(),pO=pa(),fO=Yl(),xse=TypeError;GM.exports=function(e,t){var n,r;if(t==="string"&&pO(n=e.toString)&&!fO(r=dO(n,e))||pO(n=e.valueOf)&&!fO(r=dO(n,e))||t!=="string"&&pO(n=e.toString)&&!fO(r=dO(n,e)))return r;throw new xse("Can't convert object to primitive value")}});var YM=w((LPe,QM)=>{"use strict";m();T();N();QM.exports=!1});var dE=w((kPe,HM)=>{"use strict";m();T();N();var JM=Yi(),qse=Object.defineProperty;HM.exports=function(e,t){try{qse(JM,e,{value:t,configurable:!0,writable:!0})}catch(n){JM[e]=t}return t}});var pE=w((VPe,XM)=>{"use strict";m();T();N();var Vse=YM(),jse=Yi(),Kse=dE(),zM="__core-js_shared__",WM=XM.exports=jse[zM]||Kse(zM,{});(WM.versions||(WM.versions=[])).push({version:"3.41.0",mode:Vse?"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 mO=w(($Pe,ex)=>{"use strict";m();T();N();var ZM=pE();ex.exports=function(e,t){return ZM[e]||(ZM[e]=t||{})}});var nx=w((HPe,tx)=>{"use strict";m();T();N();var Gse=rO(),$se=Object;tx.exports=function(e){return $se(Gse(e))}});var yu=w((ZPe,rx)=>{"use strict";m();T();N();var Qse=mi(),Yse=nx(),Jse=Qse({}.hasOwnProperty);rx.exports=Object.hasOwn||function(t,n){return Jse(Yse(t),n)}});var NO=w((rFe,ix)=>{"use strict";m();T();N();var Hse=mi(),zse=0,Wse=Math.random(),Xse=Hse(1 .toString);ix.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Xse(++zse+Wse,36)}});var ox=w((oFe,sx)=>{"use strict";m();T();N();var Zse=Yi(),eoe=mO(),ax=yu(),toe=NO(),noe=oO(),roe=uO(),Jl=Zse.Symbol,TO=eoe("wks"),ioe=roe?Jl.for||Jl:Jl&&Jl.withoutSetter||toe;sx.exports=function(e){return ax(TO,e)||(TO[e]=noe&&ax(Jl,e)?Jl[e]:ioe("Symbol."+e)),TO[e]}});var dx=w((dFe,lx)=>{"use strict";m();T();N();var aoe=hc(),ux=Yl(),cx=cO(),soe=lO(),ooe=$M(),uoe=ox(),coe=TypeError,loe=uoe("toPrimitive");lx.exports=function(e,t){if(!ux(e)||cx(e))return e;var n=soe(e,loe),r;if(n){if(t===void 0&&(t="default"),r=aoe(n,e,t),!ux(r)||cx(r))return r;throw new coe("Can't convert object to primitive value")}return t===void 0&&(t="number"),ooe(e,t)}});var EO=w((NFe,px)=>{"use strict";m();T();N();var doe=dx(),poe=cO();px.exports=function(e){var t=doe(e,"string");return poe(t)?t:t+""}});var Nx=w((yFe,mx)=>{"use strict";m();T();N();var foe=Yi(),fx=Yl(),hO=foe.document,moe=fx(hO)&&fx(hO.createElement);mx.exports=function(e){return moe?hO.createElement(e):{}}});var yO=w((vFe,Tx)=>{"use strict";m();T();N();var Noe=hu(),Toe=bs(),Eoe=Nx();Tx.exports=!Noe&&!Toe(function(){return Object.defineProperty(Eoe("div"),"a",{get:function(){return 7}}).a!==7})});var IO=w(hx=>{"use strict";m();T();N();var hoe=hu(),yoe=hc(),Ioe=oM(),goe=ZS(),_oe=oE(),voe=EO(),Soe=yu(),Ooe=yO(),Ex=Object.getOwnPropertyDescriptor;hx.f=hoe?Ex:function(t,n){if(t=_oe(t),n=voe(n),Ooe)try{return Ex(t,n)}catch(r){}if(Soe(t,n))return goe(!yoe(Ioe.f,t,n),t[n])}});var Ix=w((FFe,yx)=>{"use strict";m();T();N();var Doe=hu(),boe=bs();yx.exports=Doe&&boe(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Gp=w((BFe,gx)=>{"use strict";m();T();N();var Aoe=Yl(),Roe=String,Poe=TypeError;gx.exports=function(e){if(Aoe(e))return e;throw new Poe(Roe(e)+" is not an object")}});var mE=w(vx=>{"use strict";m();T();N();var Foe=hu(),woe=yO(),Loe=Ix(),fE=Gp(),_x=EO(),Coe=TypeError,gO=Object.defineProperty,Boe=Object.getOwnPropertyDescriptor,_O="enumerable",vO="configurable",SO="writable";vx.f=Foe?Loe?function(t,n,r){if(fE(t),n=_x(n),fE(r),typeof t=="function"&&n==="prototype"&&"value"in r&&SO in r&&!r[SO]){var i=Boe(t,n);i&&i[SO]&&(t[n]=r.value,r={configurable:vO in r?r[vO]:i[vO],enumerable:_O in r?r[_O]:i[_O],writable:!1})}return gO(t,n,r)}:gO:function(t,n,r){if(fE(t),n=_x(n),fE(r),woe)try{return gO(t,n,r)}catch(i){}if("get"in r||"set"in r)throw new Coe("Accessors not supported");return"value"in r&&(t[n]=r.value),t}});var OO=w((KFe,Sx)=>{"use strict";m();T();N();var Uoe=hu(),koe=mE(),Moe=ZS();Sx.exports=Uoe?function(e,t,n){return koe.f(e,t,Moe(1,n))}:function(e,t,n){return e[t]=n,e}});var bx=w((YFe,Dx)=>{"use strict";m();T();N();var DO=hu(),xoe=yu(),Ox=Function.prototype,qoe=DO&&Object.getOwnPropertyDescriptor,bO=xoe(Ox,"name"),Voe=bO&&function(){}.name==="something",joe=bO&&(!DO||DO&&qoe(Ox,"name").configurable);Dx.exports={EXISTS:bO,PROPER:Voe,CONFIGURABLE:joe}});var Rx=w((WFe,Ax)=>{"use strict";m();T();N();var Koe=mi(),Goe=pa(),AO=pE(),$oe=Koe(Function.toString);Goe(AO.inspectSource)||(AO.inspectSource=function(e){return $oe(e)});Ax.exports=AO.inspectSource});var wx=w((twe,Fx)=>{"use strict";m();T();N();var Qoe=Yi(),Yoe=pa(),Px=Qoe.WeakMap;Fx.exports=Yoe(Px)&&/native code/.test(String(Px))});var Bx=w((awe,Cx)=>{"use strict";m();T();N();var Joe=mO(),Hoe=NO(),Lx=Joe("keys");Cx.exports=function(e){return Lx[e]||(Lx[e]=Hoe(e))}});var RO=w((cwe,Ux)=>{"use strict";m();T();N();Ux.exports={}});var qx=w((fwe,xx)=>{"use strict";m();T();N();var zoe=wx(),Mx=Yi(),Woe=Yl(),Xoe=OO(),PO=yu(),FO=pE(),Zoe=Bx(),eue=RO(),kx="Object already initialized",wO=Mx.TypeError,tue=Mx.WeakMap,NE,$p,TE,nue=function(e){return TE(e)?$p(e):NE(e,{})},rue=function(e){return function(t){var n;if(!Woe(t)||(n=$p(t)).type!==e)throw new wO("Incompatible receiver, "+e+" required");return n}};zoe||FO.state?(ma=FO.state||(FO.state=new tue),ma.get=ma.get,ma.has=ma.has,ma.set=ma.set,NE=function(e,t){if(ma.has(e))throw new wO(kx);return t.facade=e,ma.set(e,t),t},$p=function(e){return ma.get(e)||{}},TE=function(e){return ma.has(e)}):(yc=Zoe("state"),eue[yc]=!0,NE=function(e,t){if(PO(e,yc))throw new wO(kx);return t.facade=e,Xoe(e,yc,t),t},$p=function(e){return PO(e,yc)?e[yc]:{}},TE=function(e){return PO(e,yc)});var ma,yc;xx.exports={set:NE,get:$p,has:TE,enforce:nue,getterFor:rue}});var Gx=w((Ewe,Kx)=>{"use strict";m();T();N();var CO=mi(),iue=bs(),aue=pa(),EE=yu(),LO=hu(),sue=bx().CONFIGURABLE,oue=Rx(),jx=qx(),uue=jx.enforce,cue=jx.get,Vx=String,hE=Object.defineProperty,lue=CO("".slice),due=CO("".replace),pue=CO([].join),fue=LO&&!iue(function(){return hE(function(){},"length",{value:8}).length!==8}),mue=String(String).split("String"),Nue=Kx.exports=function(e,t,n){lue(Vx(t),0,7)==="Symbol("&&(t="["+due(Vx(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!EE(e,"name")||sue&&e.name!==t)&&(LO?hE(e,"name",{value:t,configurable:!0}):e.name=t),fue&&n&&EE(n,"arity")&&e.length!==n.arity&&hE(e,"length",{value:n.arity});try{n&&EE(n,"constructor")&&n.constructor?LO&&hE(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(i){}var r=uue(e);return EE(r,"source")||(r.source=pue(mue,typeof t=="string"?t:"")),e};Function.prototype.toString=Nue(function(){return aue(this)&&cue(this).source||oue(this)},"toString")});var Qx=w((gwe,$x)=>{"use strict";m();T();N();var Tue=pa(),Eue=mE(),hue=Gx(),yue=dE();$x.exports=function(e,t,n,r){r||(r={});var i=r.enumerable,a=r.name!==void 0?r.name:t;if(Tue(n)&&hue(n,a,r),r.global)i?e[t]=n:yue(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(o){}i?e[t]=n:Eue.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e}});var Jx=w((Owe,Yx)=>{"use strict";m();T();N();var Iue=Math.ceil,gue=Math.floor;Yx.exports=Math.trunc||function(t){var n=+t;return(n>0?gue:Iue)(n)}});var yE=w((Rwe,Hx)=>{"use strict";m();T();N();var _ue=Jx();Hx.exports=function(e){var t=+e;return t!==t||t===0?0:_ue(t)}});var Wx=w((Lwe,zx)=>{"use strict";m();T();N();var vue=yE(),Sue=Math.max,Oue=Math.min;zx.exports=function(e,t){var n=vue(e);return n<0?Sue(n+t,0):Oue(n,t)}});var Zx=w((kwe,Xx)=>{"use strict";m();T();N();var Due=yE(),bue=Math.min;Xx.exports=function(e){var t=Due(e);return t>0?bue(t,9007199254740991):0}});var tq=w((Vwe,eq)=>{"use strict";m();T();N();var Aue=Zx();eq.exports=function(e){return Aue(e.length)}});var iq=w(($we,rq)=>{"use strict";m();T();N();var Rue=oE(),Pue=Wx(),Fue=tq(),nq=function(e){return function(t,n,r){var i=Rue(t),a=Fue(i);if(a===0)return!e&&-1;var o=Pue(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}};rq.exports={includes:nq(!0),indexOf:nq(!1)}});var oq=w((Hwe,sq)=>{"use strict";m();T();N();var wue=mi(),BO=yu(),Lue=oE(),Cue=iq().indexOf,Bue=RO(),aq=wue([].push);sq.exports=function(e,t){var n=Lue(e),r=0,i=[],a;for(a in n)!BO(Bue,a)&&BO(n,a)&&aq(i,a);for(;t.length>r;)BO(n,a=t[r++])&&(~Cue(i,a)||aq(i,a));return i}});var cq=w((Zwe,uq)=>{"use strict";m();T();N();uq.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var dq=w(lq=>{"use strict";m();T();N();var Uue=oq(),kue=cq(),Mue=kue.concat("length","prototype");lq.f=Object.getOwnPropertyNames||function(t){return Uue(t,Mue)}});var fq=w(pq=>{"use strict";m();T();N();pq.f=Object.getOwnPropertySymbols});var Nq=w((dLe,mq)=>{"use strict";m();T();N();var xue=uE(),que=mi(),Vue=dq(),jue=fq(),Kue=Gp(),Gue=que([].concat);mq.exports=xue("Reflect","ownKeys")||function(t){var n=Vue.f(Kue(t)),r=jue.f;return r?Gue(n,r(t)):n}});var hq=w((NLe,Eq)=>{"use strict";m();T();N();var Tq=yu(),$ue=Nq(),Que=IO(),Yue=mE();Eq.exports=function(e,t,n){for(var r=$ue(t),i=Yue.f,a=Que.f,o=0;o{"use strict";m();T();N();var Jue=bs(),Hue=pa(),zue=/#|\.prototype\./,Qp=function(e,t){var n=Xue[Wue(e)];return n===ece?!0:n===Zue?!1:Hue(t)?Jue(t):!!t},Wue=Qp.normalize=function(e){return String(e).replace(zue,".").toLowerCase()},Xue=Qp.data={},Zue=Qp.NATIVE="N",ece=Qp.POLYFILL="P";yq.exports=Qp});var UO=w((vLe,gq)=>{"use strict";m();T();N();var IE=Yi(),tce=IO().f,nce=OO(),rce=Qx(),ice=dE(),ace=hq(),sce=Iq();gq.exports=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,c,l,d,f;if(r?o=IE:i?o=IE[n]||ice(n,{}):o=IE[n]&&IE[n].prototype,o)for(c in t){if(d=t[c],e.dontCallGetSet?(f=tce(o,c),l=f&&f.value):l=o[c],a=sce(r?c:n+(i?".":"#")+c,e.forced),!a&&l!==void 0){if(typeof d==typeof l)continue;ace(d,l)}(e.sham||l&&l.sham)&&nce(d,"sham",!0),rce(o,c,d,e)}}});var Yp=w((bLe,_q)=>{"use strict";m();T();N();var kO=mi(),gE=Set.prototype;_q.exports={Set,add:kO(gE.add),has:kO(gE.has),remove:kO(gE.delete),proto:gE}});var MO=w((FLe,vq)=>{"use strict";m();T();N();var oce=Yp().has;vq.exports=function(e){return oce(e),e}});var Oq=w((BLe,Sq)=>{"use strict";m();T();N();var uce=mi(),cce=lE();Sq.exports=function(e,t,n){try{return uce(cce(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}}});var xO=w((xLe,Dq)=>{"use strict";m();T();N();var lce=Oq(),dce=Yp();Dq.exports=lce(dce.proto,"size","get")||function(e){return e.size}});var qO=w((KLe,bq)=>{"use strict";m();T();N();var pce=hc();bq.exports=function(e,t,n){for(var r=n?e:e.iterator,i=e.next,a,o;!(a=pce(i,r)).done;)if(o=t(a.value),o!==void 0)return o}});var Lq=w((YLe,wq)=>{"use strict";m();T();N();var Aq=mi(),fce=qO(),Rq=Yp(),mce=Rq.Set,Pq=Rq.proto,Nce=Aq(Pq.forEach),Fq=Aq(Pq.keys),Tce=Fq(new mce).next;wq.exports=function(e,t,n){return n?fce({iterator:Fq(e),next:Tce},t):Nce(e,t)}});var Bq=w((WLe,Cq)=>{"use strict";m();T();N();Cq.exports=function(e){return{iterator:e,next:e.next,done:!1}}});var VO=w((tCe,Vq)=>{"use strict";m();T();N();var Uq=lE(),xq=Gp(),kq=hc(),Ece=yE(),hce=Bq(),Mq="Invalid size",yce=RangeError,Ice=TypeError,gce=Math.max,qq=function(e,t){this.set=e,this.size=gce(t,0),this.has=Uq(e.has),this.keys=Uq(e.keys)};qq.prototype={getIterator:function(){return hce(xq(kq(this.keys,this.set)))},includes:function(e){return kq(this.has,this.set,e)}};Vq.exports=function(e){xq(e);var t=+e.size;if(t!==t)throw new Ice(Mq);var n=Ece(t);if(n<0)throw new yce(Mq);return new qq(e,n)}});var Kq=w((aCe,jq)=>{"use strict";m();T();N();var _ce=MO(),vce=xO(),Sce=Lq(),Oce=VO();jq.exports=function(t){var n=_ce(this),r=Oce(t);return vce(n)>r.size?!1:Sce(n,function(i){if(!r.includes(i))return!1},!0)!==!1}});var jO=w((cCe,Qq)=>{"use strict";m();T();N();var Dce=uE(),Gq=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},$q=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};Qq.exports=function(e,t){var n=Dce("Set");try{new n()[e](Gq(0));try{return new n()[e](Gq(-1)),!1}catch(i){if(!t)return!0;try{return new n()[e]($q(-1/0)),!1}catch(a){var r=new n;return r.add(1),r.add(2),t(r[e]($q(1/0)))}}}catch(i){return!1}}});var Yq=w(()=>{"use strict";m();T();N();var bce=UO(),Ace=Kq(),Rce=jO(),Pce=!Rce("isSubsetOf",function(e){return e});bce({target:"Set",proto:!0,real:!0,forced:Pce},{isSubsetOf:Ace})});var Jq=w(()=>{"use strict";m();T();N();Yq()});var Wq=w((vCe,zq)=>{"use strict";m();T();N();var Fce=hc(),Hq=Gp(),wce=lO();zq.exports=function(e,t,n){var r,i;Hq(e);try{if(r=wce(e,"return"),!r){if(t==="throw")throw n;return n}r=Fce(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return Hq(r),n}});var Zq=w((bCe,Xq)=>{"use strict";m();T();N();var Lce=MO(),Cce=Yp().has,Bce=xO(),Uce=VO(),kce=qO(),Mce=Wq();Xq.exports=function(t){var n=Lce(this),r=Uce(t);if(Bce(n){"use strict";m();T();N();var xce=UO(),qce=Zq(),Vce=jO(),jce=!Vce("isSupersetOf",function(e){return!e});xce({target:"Set",proto:!0,real:!0,forced:jce},{isSupersetOf:qce})});var tV=w(()=>{"use strict";m();T();N();eV()});var Jp=w(Bn=>{"use strict";m();T();N();Object.defineProperty(Bn,"__esModule",{value:!0});Bn.subtractSet=Kce;Bn.mapToArrayOfValues=Gce;Bn.kindToConvertedTypeString=$ce;Bn.fieldDatasToSimpleFieldDatas=Qce;Bn.isNodeLeaf=Yce;Bn.newEntityInterfaceFederationData=Jce;Bn.upsertEntityInterfaceFederationData=Hce;Bn.upsertEntityData=Wce;Bn.updateEntityData=nV;Bn.newFieldAuthorizationData=Xce;Bn.newAuthorizationData=Zce;Bn.addScopes=KO;Bn.mergeRequiredScopesByAND=SE;Bn.mergeRequiredScopesByOR=GO;Bn.upsertFieldAuthorizationData=rV;Bn.upsertAuthorizationData=nle;Bn.upsertAuthorizationConfiguration=rle;Bn.isNodeKindObject=ile;Bn.isObjectDefinitionData=ale;Bn.getNodeCoords=sle;var Gt=Ae(),ei=vr(),_E=Sr(),vE=Ss();Jq();tV();function Kce(e,t){for(let n of e)t.delete(n)}function Gce(e){let t=[];for(let n of e.values())t.push(n);return t}function $ce(e){switch(e){case Gt.Kind.BOOLEAN:return ei.BOOLEAN_SCALAR;case Gt.Kind.ENUM:case Gt.Kind.ENUM_TYPE_DEFINITION:case Gt.Kind.ENUM_TYPE_EXTENSION:return ei.ENUM;case Gt.Kind.ENUM_VALUE_DEFINITION:return ei.ENUM_VALUE;case Gt.Kind.FIELD_DEFINITION:return ei.FIELD;case Gt.Kind.FLOAT:return ei.FLOAT_SCALAR;case Gt.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Gt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return ei.INPUT_OBJECT;case Gt.Kind.INPUT_VALUE_DEFINITION:return ei.INPUT_VALUE;case Gt.Kind.INT:return ei.INT_SCALAR;case Gt.Kind.INTERFACE_TYPE_DEFINITION:case Gt.Kind.INTERFACE_TYPE_EXTENSION:return ei.INTERFACE;case Gt.Kind.NULL:return ei.NULL;case Gt.Kind.OBJECT:case Gt.Kind.OBJECT_TYPE_DEFINITION:case Gt.Kind.OBJECT_TYPE_EXTENSION:return ei.OBJECT;case Gt.Kind.STRING:return ei.STRING_SCALAR;case Gt.Kind.SCALAR_TYPE_DEFINITION:case Gt.Kind.SCALAR_TYPE_EXTENSION:return ei.SCALAR;case Gt.Kind.UNION_TYPE_DEFINITION:case Gt.Kind.UNION_TYPE_EXTENSION:return ei.UNION;default:return e}}function Qce(e){let t=[];for(let{name:n,namedTypeName:r}of e)t.push({name:n,namedTypeName:r});return t}function Yce(e){if(!e)return!0;switch(e){case Gt.Kind.OBJECT_TYPE_DEFINITION:case Gt.Kind.INTERFACE_TYPE_DEFINITION:case Gt.Kind.UNION_TYPE_DEFINITION:return!1;default:return!0}}function Jce(e,t){return{concreteTypeNames:new Set(e.concreteTypeNames),fieldDatasBySubgraphName:new Map([[t,e.fieldDatas]]),interfaceFieldNames:new Set(e.interfaceFieldNames),interfaceObjectFieldNames:new Set(e.interfaceObjectFieldNames),interfaceObjectSubgraphs:new Set(e.isInterfaceObject?[t]:[]),subgraphDataByTypeName:new Map([[t,e]]),typeName:e.typeName}}function Hce(e,t,n){(0,_E.addIterableValuesToSet)(t.concreteTypeNames,e.concreteTypeNames),e.subgraphDataByTypeName.set(n,t),e.fieldDatasBySubgraphName.set(n,t.fieldDatas),(0,_E.addIterableValuesToSet)(t.interfaceFieldNames,e.interfaceFieldNames),(0,_E.addIterableValuesToSet)(t.interfaceObjectFieldNames,e.interfaceObjectFieldNames),t.isInterfaceObject&&e.interfaceObjectSubgraphs.add(n)}function zce({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 Wce({entityDataByTypeName:e,keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}){let i=e.get(r);i?nV({entityData:i,keyFieldSetDataByFieldSet:t,subgraphName:n}):e.set(r,zce({keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}))}function nV({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 Xce(e){return{fieldName:e,inheritedData:{requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1},originalData:{requiredScopes:[],requiresAuthentication:!1}}}function Zce(e){return{fieldAuthDataByFieldName:new Map,requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1,typeName:e}}function KO(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 SE(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,_E.addSets)(r,i);KO(n,a)}return n}function GO(e,t){for(let n of t)KO(e,n);return e.length<=vE.MAX_OR_SCOPES}function rV(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),!GO(r.inheritedData.requiredScopesByOR,t.inheritedData.requiredScopes)||r.inheritedData.requiredScopes.length*t.inheritedData.requiredScopes.length>vE.MAX_OR_SCOPES||r.originalData.requiredScopes.length*t.originalData.requiredScopes.length>vE.MAX_OR_SCOPES?!1:(r.inheritedData.requiredScopes=SE(r.inheritedData.requiredScopes,t.inheritedData.requiredScopes),r.originalData.requiredScopes=SE(r.originalData.requiredScopes,t.originalData.requiredScopes),!0)):(e.set(n,iV(t)),!0)}function ele(e){let t=new Map;for(let[n,r]of e)t.set(n,iV(r));return t}function iV(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 tle(e){return{fieldAuthDataByFieldName:ele(e.fieldAuthDataByFieldName),requiredScopes:[...e.requiredScopes],requiredScopesByOR:[...e.requiredScopes],requiresAuthentication:e.requiresAuthentication,typeName:e.typeName}}function nle(e,t,n){let r=e.get(t.typeName);if(!r){e.set(t.typeName,tle(t));return}r.requiresAuthentication||(r.requiresAuthentication=t.requiresAuthentication),!GO(r.requiredScopesByOR,t.requiredScopes)||r.requiredScopes.length*t.requiredScopes.length>vE.MAX_OR_SCOPES?n.add(t.typeName):r.requiredScopes=SE(r.requiredScopes,t.requiredScopes);for(let[i,a]of t.fieldAuthDataByFieldName)rV(r.fieldAuthDataByFieldName,a)||n.add(`${t.typeName}.${i}`)}function rle(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 ile(e){return e===Gt.Kind.OBJECT_TYPE_DEFINITION||e===Gt.Kind.OBJECT_TYPE_EXTENSION}function ale(e){return e?e.kind===Gt.Kind.OBJECT_TYPE_DEFINITION:!1}function sle(e){switch(e.kind){case Gt.Kind.ARGUMENT:case Gt.Kind.FIELD_DEFINITION:case Gt.Kind.INPUT_VALUE_DEFINITION:case Gt.Kind.ENUM_VALUE_DEFINITION:return e.federatedCoords;default:return e.name}}});var $O=w($e=>{"use strict";m();T();N();Object.defineProperty($e,"__esModule",{value:!0});$e.TAG_DEFINITION_DATA=$e.SUBSCRIPTION_FILTER_DEFINITION_DATA=$e.SHAREABLE_DEFINITION_DATA=$e.SPECIFIED_BY_DEFINITION_DATA=$e.SEMANTIC_NON_NULL_DATA=$e.REQUIRES_SCOPES_DEFINITION_DATA=$e.REQUIRE_FETCH_REASONS_DEFINITION_DATA=$e.REDIS_SUBSCRIBE_DEFINITION_DATA=$e.REDIS_PUBLISH_DEFINITION_DATA=$e.REQUIRES_DEFINITION_DATA=$e.PROVIDES_DEFINITION_DATA=$e.LINK_DEFINITION_DATA=$e.KEY_DEFINITION_DATA=$e.OVERRIDE_DEFINITION_DATA=$e.ONE_OF_DEFINITION_DATA=$e.NATS_SUBSCRIBE_DEFINITION_DATA=$e.NATS_REQUEST_DEFINITION_DATA=$e.NATS_PUBLISH_DEFINITION_DATA=$e.KAFKA_SUBSCRIBE_DEFINITION_DATA=$e.KAFKA_PUBLISH_DEFINITION_DATA=$e.INTERFACE_OBJECT_DEFINITION_DATA=$e.INACCESSIBLE_DEFINITION_DATA=$e.EXTERNAL_DEFINITION_DATA=$e.EXTENDS_DEFINITION_DATA=$e.DEPRECATED_DEFINITION_DATA=$e.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA=$e.CONFIGURE_DESCRIPTION_DEFINITION_DATA=$e.COMPOSE_DIRECTIVE_DEFINITION_DATA=$e.AUTHENTICATED_DEFINITION_DATA=void 0;var Xe=Ss(),Ji=Hr(),$t=Ae(),q=vr();$e.AUTHENTICATED_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([]),isRepeatable:!1,locations:new Set([q.ENUM_UPPER,q.FIELD_DEFINITION_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER]),name:q.AUTHENTICATED,node:Xe.AUTHENTICATED_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.COMPOSE_DIRECTIVE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.NAME,{name:q.NAME,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([q.SCHEMA_UPPER]),name:q.COMPOSE_DIRECTIVE,node:Xe.COMPOSE_DIRECTIVE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.NAME])};$e.CONFIGURE_DESCRIPTION_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.PROPAGATE,{name:q.PROPAGATE,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.BOOLEAN_SCALAR)},defaultValue:{kind:$t.Kind.BOOLEAN,value:!0}}],[q.DESCRIPTION_OVERRIDE,{name:q.DESCRIPTION_OVERRIDE,typeNode:(0,Ji.stringToNamedTypeNode)(q.STRING_SCALAR)}]]),isRepeatable:!1,locations:new Set([q.ARGUMENT_DEFINITION_UPPER,q.ENUM_UPPER,q.ENUM_VALUE_UPPER,q.FIELD_DEFINITION_UPPER,q.INTERFACE_UPPER,q.INPUT_OBJECT_UPPER,q.INPUT_FIELD_DEFINITION_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER,q.SCHEMA_UPPER,q.UNION_UPPER]),name:q.CONFIGURE_DESCRIPTION,node:Xe.CONFIGURE_DESCRIPTION_DEFINITION,optionalArgumentNames:new Set([q.PROPAGATE,q.DESCRIPTION_OVERRIDE]),requiredArgumentNames:new Set};$e.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.PROPAGATE,{name:q.PROPAGATE,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.BOOLEAN_SCALAR)},defaultValue:{kind:$t.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!1,locations:new Set([q.ENUM_UPPER,q.INPUT_OBJECT_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER]),name:q.CONFIGURE_CHILD_DESCRIPTIONS,node:Xe.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION,optionalArgumentNames:new Set([q.PROPAGATE]),requiredArgumentNames:new Set};$e.DEPRECATED_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.REASON,{name:q.REASON,typeNode:(0,Ji.stringToNamedTypeNode)(q.STRING_SCALAR),defaultValue:{kind:$t.Kind.STRING,value:$t.DEFAULT_DEPRECATION_REASON}}]]),isRepeatable:!1,locations:new Set([q.ARGUMENT_DEFINITION_UPPER,q.ENUM_VALUE_UPPER,q.FIELD_DEFINITION_UPPER,q.INPUT_FIELD_DEFINITION_UPPER]),name:q.DEPRECATED,node:Xe.DEPRECATED_DEFINITION,optionalArgumentNames:new Set([q.REASON]),requiredArgumentNames:new Set};$e.EXTENDS_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!1,locations:new Set([q.INTERFACE_UPPER,q.OBJECT_UPPER]),name:q.EXTENDS,node:Xe.EXTENDS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.EXTERNAL_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER,q.OBJECT_UPPER]),name:q.EXTERNAL,node:Xe.EXTERNAL_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.INACCESSIBLE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!1,locations:new Set([q.ARGUMENT_DEFINITION_UPPER,q.ENUM_UPPER,q.ENUM_VALUE_UPPER,q.FIELD_DEFINITION_UPPER,q.INPUT_FIELD_DEFINITION_UPPER,q.INPUT_OBJECT_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER,q.UNION_UPPER]),name:q.INACCESSIBLE,node:Xe.INACCESSIBLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.INTERFACE_OBJECT_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!1,locations:new Set([q.OBJECT_UPPER]),name:q.INTERFACE_OBJECT,node:Xe.INTERFACE_OBJECT_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.KAFKA_PUBLISH_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.TOPIC,{name:q.TOPIC,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_KAFKA_PUBLISH,node:Xe.EDFS_KAFKA_PUBLISH_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.TOPIC])};$e.KAFKA_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.TOPICS,{name:q.TOPICS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:Xe.REQUIRED_STRING_TYPE_NODE}}}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_KAFKA_SUBSCRIBE,node:Xe.EDFS_KAFKA_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.TOPICS])};$e.NATS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.SUBJECT,{name:q.SUBJECT,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_NATS_PUBLISH,node:Xe.EDFS_NATS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.SUBJECT])};$e.NATS_REQUEST_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.SUBJECT,{name:q.SUBJECT,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_NATS_REQUEST,node:Xe.EDFS_NATS_REQUEST_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.SUBJECT])};$e.NATS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.SUBJECTS,{name:q.SUBJECTS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:Xe.REQUIRED_STRING_TYPE_NODE}}}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}],[q.STREAM_CONFIGURATION,{name:q.STREAM_CONFIGURATION,typeNode:(0,Ji.stringToNamedTypeNode)(q.EDFS_NATS_STREAM_CONFIGURATION)}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_NATS_SUBSCRIBE,node:Xe.EDFS_NATS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.SUBJECTS])};$e.ONE_OF_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([]),isRepeatable:!1,locations:new Set([q.INPUT_OBJECT_UPPER]),name:q.ONE_OF,node:Xe.ONE_OF_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.OVERRIDE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.FROM,{name:q.FROM,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.OVERRIDE,node:Xe.OVERRIDE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.FROM])};$e.KEY_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.FIELDS,{name:q.FIELDS,typeNode:Xe.REQUIRED_FIELDSET_TYPE_NODE}],[q.RESOLVABLE,{name:q.RESOLVABLE,typeNode:(0,Ji.stringToNamedTypeNode)(q.BOOLEAN_SCALAR),defaultValue:{kind:$t.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!0,locations:new Set([q.INTERFACE_UPPER,q.OBJECT_UPPER]),name:q.KEY,node:Xe.KEY_DEFINITION,optionalArgumentNames:new Set([q.RESOLVABLE]),requiredArgumentNames:new Set([q.FIELDS])};$e.LINK_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.URL_LOWER,{name:q.URL_LOWER,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.AS,{name:q.AS,typeNode:(0,Ji.stringToNamedTypeNode)(q.STRING_SCALAR)}],[q.FOR,{name:q.FOR,typeNode:(0,Ji.stringToNamedTypeNode)(q.LINK_PURPOSE)}],[q.IMPORT,{name:q.IMPORT,typeNode:{kind:$t.Kind.LIST_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.LINK_IMPORT)}}]]),isRepeatable:!0,locations:new Set([q.SCHEMA_UPPER]),name:q.LINK,node:Xe.LINK_DEFINITION,optionalArgumentNames:new Set([q.AS,q.FOR,q.IMPORT]),requiredArgumentNames:new Set([q.URL_LOWER])};$e.PROVIDES_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.FIELDS,{name:q.FIELDS,typeNode:Xe.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.PROVIDES,node:Xe.PROVIDES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.FIELDS])};$e.REQUIRES_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.FIELDS,{name:q.FIELDS,typeNode:Xe.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.REQUIRES,node:Xe.REQUIRES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.FIELDS])};$e.REDIS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.CHANNEL,{name:q.CHANNEL,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_REDIS_PUBLISH,node:Xe.EDFS_REDIS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.CHANNEL])};$e.REDIS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.CHANNELS,{name:q.CHANNELS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:Xe.REQUIRED_STRING_TYPE_NODE}}}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_REDIS_SUBSCRIBE,node:Xe.EDFS_REDIS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.CHANNELS])};$e.REQUIRE_FETCH_REASONS_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!0,locations:new Set([q.FIELD_DEFINITION_UPPER,q.OBJECT_UPPER]),name:q.REQUIRE_FETCH_REASONS,node:Xe.REQUIRE_FETCH_REASONS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.REQUIRES_SCOPES_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.SCOPES,{name:q.SCOPES,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.SCOPE_SCALAR)}}}}}}]]),isRepeatable:!1,locations:new Set([q.ENUM_UPPER,q.FIELD_DEFINITION_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER]),name:q.REQUIRES_SCOPES,node:Xe.REQUIRES_SCOPES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.SCOPES])};$e.SEMANTIC_NON_NULL_DATA={argumentTypeNodeByArgumentName:new Map([[q.LEVELS,{name:q.LEVELS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.INT_SCALAR)}}},defaultValue:{kind:$t.Kind.LIST,values:[{kind:$t.Kind.INT,value:"0"}]}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.SEMANTIC_NON_NULL,node:Xe.SEMANTIC_NON_NULL_DEFINITION,optionalArgumentNames:new Set([q.LEVELS]),requiredArgumentNames:new Set};$e.SPECIFIED_BY_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.URL_LOWER,{name:q.URL_LOWER,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([q.SCALAR_UPPER]),name:q.SPECIFIED_BY,node:Xe.SPECIFIED_BY_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.URL_LOWER])};$e.SHAREABLE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!0,locations:new Set([q.FIELD_DEFINITION_UPPER,q.OBJECT_UPPER]),name:q.SHAREABLE,node:Xe.SHAREABLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.SUBSCRIPTION_FILTER_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.CONDITION,{name:q.CONDITION,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.SUBSCRIPTION_FILTER_CONDITION)}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.SUBSCRIPTION_FILTER,node:Xe.SUBSCRIPTION_FILTER_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.CONDITION])};$e.TAG_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.NAME,{name:q.NAME,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([q.ARGUMENT_DEFINITION_UPPER,q.ENUM_UPPER,q.ENUM_VALUE_UPPER,q.FIELD_DEFINITION_UPPER,q.INPUT_FIELD_DEFINITION_UPPER,q.INPUT_OBJECT_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER,q.UNION_UPPER]),name:q.TAG,node:Xe.TAG_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.NAME])}});var Hp=w(Na=>{"use strict";m();T();N();Object.defineProperty(Na,"__esModule",{value:!0});Na.newFieldSetData=ole;Na.extractFieldSetValue=ule;Na.getNormalizedFieldSet=cle;Na.getInitialFieldCoordsPath=lle;Na.validateKeyFieldSets=dle;Na.getConditionalFieldSetDirectiveName=ple;Na.isNodeQuery=fle;Na.validateArgumentTemplateReferences=mle;Na.initializeDirectiveDefinitionDatas=Nle;var nr=Ae(),aV=Hr(),Rr=Mi(),sV=Ss(),QO=du(),an=$O(),At=vr(),Iu=Sr();function ole(){return{provides:new Map,requires:new Map}}function ule(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!==At.FIELDS||i.value.kind!==nr.Kind.STRING||t.set(e,i.value.value)}function cle(e){return(0,nr.print)((0,aV.lexicographicallySortDocumentNode)(e)).replaceAll(/\s+/g," ").slice(2,-2)}function lle(e,t){return e?[t]:[]}function dle(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[f,{documentNode:y,isUnresolvable:I,rawFieldSet:v}]of n){r&&(r.resolvable||(r.resolvable=!I)),d+=1;let F=[],k=[t],K=[],J=[],se=new Set,ie=-1,Te=!0,de="";if((0,nr.visit)(y,{Argument:{enter(Re){return F.push((0,Rr.unexpectedArgumentErrorMessage)(v,`${k[ie].name}.${de}`,Re.name.value)),nr.BREAK}},Field:{enter(Re){let xe=k[ie],tt=xe.name;if(Te){let bn=`${tt}.${de}`,Qt=xe.fieldDataByName.get(de);if(!Qt)return F.push((0,Rr.undefinedFieldInFieldSetErrorMessage)(v,bn,de)),nr.BREAK;let mn=(0,QO.getTypeNodeNamedTypeName)(Qt.node.type),Pr=e.parentDefinitionDataByTypeName.get(mn),Fr=Pr?Pr.kind:nr.Kind.SCALAR_TYPE_DEFINITION;return F.push((0,Rr.invalidSelectionSetErrorMessage)(v,[bn],mn,(0,Iu.kindToNodeType)(Fr))),nr.BREAK}let ee=Re.name.value,Se=`${tt}.${ee}`;de=ee;let _t=xe.fieldDataByName.get(ee);if(!_t)return F.push((0,Rr.undefinedFieldInFieldSetErrorMessage)(v,tt,ee)),nr.BREAK;if(_t.argumentDataByName.size)return F.push((0,Rr.argumentsInKeyFieldSetErrorMessage)(v,Se)),nr.BREAK;if(K[ie].has(ee))return F.push((0,Rr.duplicateFieldInFieldSetErrorMessage)(v,Se)),nr.BREAK;(0,Iu.getValueOrDefault)((0,Iu.getValueOrDefault)(e.keyFieldSetsByEntityTypeNameByFieldCoords,Se,()=>new Map),i,()=>new Set).add(f),J.push(ee),_t.isShareableBySubgraphName.set(e.subgraphName,!0),K[ie].add(ee),(0,Iu.getValueOrDefault)(e.keyFieldNamesByParentTypeName,tt,()=>new Set).add(ee);let en=(0,QO.getTypeNodeNamedTypeName)(_t.node.type);if(sV.BASE_SCALARS.has(en)){se.add(J.join(At.PERIOD)),J.pop();return}let tn=e.parentDefinitionDataByTypeName.get(en);if(!tn)return F.push((0,Rr.unknownTypeInFieldSetErrorMessage)(v,Se,en)),nr.BREAK;if(tn.kind===nr.Kind.OBJECT_TYPE_DEFINITION){Te=!0,k.push(tn);return}if((0,aV.isKindAbstract)(tn.kind))return F.push((0,Rr.abstractTypeInKeyFieldSetErrorMessage)(v,Se,en,(0,Iu.kindToNodeType)(tn.kind))),nr.BREAK;se.add(J.join(At.PERIOD)),J.pop()}},InlineFragment:{enter(){return F.push(Rr.inlineFragmentInFieldSetErrorMessage),nr.BREAK}},SelectionSet:{enter(){if(!Te){let Re=k[ie],tt=`${Re.name}.${de}`,ee=Re.fieldDataByName.get(de);if(!ee)return F.push((0,Rr.undefinedFieldInFieldSetErrorMessage)(v,tt,de)),nr.BREAK;let Se=(0,QO.getTypeNodeNamedTypeName)(ee.node.type),_t=e.parentDefinitionDataByTypeName.get(Se),en=_t?_t.kind:nr.Kind.SCALAR_TYPE_DEFINITION;return F.push((0,Rr.invalidSelectionSetDefinitionErrorMessage)(v,[tt],Se,(0,Iu.kindToNodeType)(en))),nr.BREAK}if(ie+=1,Te=!1,ie<0||ie>=k.length)return F.push((0,Rr.unparsableFieldSetSelectionErrorMessage)(v,de)),nr.BREAK;K.push(new Set)},leave(){if(Te){let xe=k[ie].name,tt=k[ie+1],ee=`${xe}.${de}`;F.push((0,Rr.invalidSelectionSetErrorMessage)(v,[ee],tt.name,(0,Iu.kindToNodeType)(tt.kind))),Te=!1}ie-=1,k.pop(),K.pop()}}}),F.length>0){e.errors.push((0,Rr.invalidDirectiveError)(At.KEY,i,(0,Iu.numberToOrdinal)(d),F));continue}a.push(x({fieldName:"",selectionSet:f},I?{disableEntityResolver:!0}:{})),l.satisfiedFieldSets.add(f),!I&&(c==null||c.addTargetSubgraphByFieldSet(f,e.subgraphName),o.push(se))}if(a.length>0)return a}function ple(e){return e?At.PROVIDES:At.REQUIRES}function fle(e,t){return e===At.QUERY||t===nr.OperationTypeNode.QUERY}function mle(e,t,n){let r=e.matchAll(sV.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,Rr.undefinedEventSubjectsArgumentErrorMessage)(o));for(let o of a)n.push((0,Rr.invalidEventSubjectsArgumentErrorMessage)(o))}function Nle(){return new Map([[At.AUTHENTICATED,an.AUTHENTICATED_DEFINITION_DATA],[At.COMPOSE_DIRECTIVE,an.COMPOSE_DIRECTIVE_DEFINITION_DATA],[At.CONFIGURE_DESCRIPTION,an.CONFIGURE_DESCRIPTION_DEFINITION_DATA],[At.CONFIGURE_CHILD_DESCRIPTIONS,an.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA],[At.DEPRECATED,an.DEPRECATED_DEFINITION_DATA],[At.EDFS_KAFKA_PUBLISH,an.KAFKA_PUBLISH_DEFINITION_DATA],[At.EDFS_KAFKA_SUBSCRIBE,an.KAFKA_SUBSCRIBE_DEFINITION_DATA],[At.EDFS_NATS_PUBLISH,an.NATS_PUBLISH_DEFINITION_DATA],[At.EDFS_NATS_REQUEST,an.NATS_REQUEST_DEFINITION_DATA],[At.EDFS_NATS_SUBSCRIBE,an.NATS_SUBSCRIBE_DEFINITION_DATA],[At.EDFS_REDIS_PUBLISH,an.REDIS_PUBLISH_DEFINITION_DATA],[At.EDFS_REDIS_SUBSCRIBE,an.REDIS_SUBSCRIBE_DEFINITION_DATA],[At.EXTENDS,an.EXTENDS_DEFINITION_DATA],[At.EXTERNAL,an.EXTERNAL_DEFINITION_DATA],[At.INACCESSIBLE,an.INACCESSIBLE_DEFINITION_DATA],[At.INTERFACE_OBJECT,an.INTERFACE_OBJECT_DEFINITION_DATA],[At.KEY,an.KEY_DEFINITION_DATA],[At.LINK,an.LINK_DEFINITION_DATA],[At.ONE_OF,an.ONE_OF_DEFINITION_DATA],[At.OVERRIDE,an.OVERRIDE_DEFINITION_DATA],[At.PROVIDES,an.PROVIDES_DEFINITION_DATA],[At.REQUIRE_FETCH_REASONS,an.REQUIRE_FETCH_REASONS_DEFINITION_DATA],[At.REQUIRES,an.REQUIRES_DEFINITION_DATA],[At.REQUIRES_SCOPES,an.REQUIRES_SCOPES_DEFINITION_DATA],[At.SEMANTIC_NON_NULL,an.SEMANTIC_NON_NULL_DATA],[At.SHAREABLE,an.SHAREABLE_DEFINITION_DATA],[At.SPECIFIED_BY,an.SPECIFIED_BY_DEFINITION_DATA],[At.SUBSCRIPTION_FILTER,an.SUBSCRIPTION_FILTER_DEFINITION_DATA],[At.TAG,an.TAG_DEFINITION_DATA]])}});var JO=w(YO=>{"use strict";m();T();N();Object.defineProperty(YO,"__esModule",{value:!0});YO.recordSubgraphName=Tle;function Tle(e,t,n){if(!t.has(e)){t.add(e);return}n.add(e)}});var zO=w(OE=>{"use strict";m();T();N();Object.defineProperty(OE,"__esModule",{value:!0});OE.Warning=void 0;var HO=class extends Error{constructor(n){super(n.message);_(this,"subgraph");this.name="Warning",this.subgraph=n.subgraph}};OE.Warning=HO});var zp=w(Ni=>{"use strict";m();T();N();Object.defineProperty(Ni,"__esModule",{value:!0});Ni.invalidOverrideTargetSubgraphNameWarning=Ele;Ni.externalInterfaceFieldsWarning=hle;Ni.nonExternalConditionalFieldWarning=yle;Ni.unimplementedInterfaceOutputTypeWarning=Ile;Ni.invalidExternalFieldWarning=gle;Ni.requiresDefinedOnNonEntityFieldWarning=_le;Ni.consumerInactiveThresholdInvalidValueWarning=vle;Ni.externalEntityExtensionKeyFieldWarning=Sle;Ni.fieldAlreadyProvidedWarning=Ole;Ni.singleSubgraphInputFieldOneOfWarning=Dle;Ni.singleFederatedInputFieldOneOfWarning=ble;var Ta=zO(),WO=vr();function Ele(e,t,n,r){return new Ta.Warning({message:`The Object type "${t}" defines the directive "@override(from: "${e}")" on the following field`+(n.length>1?"s":"")+': "'+n.join(WO.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 _E(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 Jce(e,t,n){return new Na.Warning({message:_E(e)+`The Interface "${t}" is invalid because the following field definition`+(n.length>1?"s are":" is")+` declared "@external": - "`+n.join(kO.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 Hce(e,t,n,r,i){return new Na.Warning({message:_E(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 DE(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 hle(e,t,n){return new Ta.Warning({message:DE(e)+`The Interface "${t}" is invalid because the following field definition`+(n.length>1?"s are":" is")+` declared "@external": + "`+n.join(WO.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 yle(e,t,n,r,i){return new Ta.Warning({message:DE(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 zce(e,t){return new Na.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 Wce(e,t){return new Na.Warning({message:_E(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 Xce(e,t){return new Na.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 Zce(e,t=""){return new Na.Warning({message:'The "consumerInactiveThreshold" argument of type "Int" should be positive and smaller than 2,147,483,648.'+ +t?` -${t}`:"",subgraph:{name:e}})}function ele(e,t,n,r){return new Na.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 Ile(e,t){return new Ta.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 gle(e,t){return new Ta.Warning({message:DE(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 _le(e,t){return new Ta.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 vle(e,t=""){return new Ta.Warning({message:'The "consumerInactiveThreshold" argument of type "Int" should be positive and smaller than 2,147,483,648.'+ +t?` +${t}`:"",subgraph:{name:e}})}function Sle(e,t,n,r){return new Ta.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(kO.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 tle(e,t,n,r){return new Na.Warning({message:_E(r)+`The field "${e}" is unconditionally provided by subgraph "${r}" and should not form part of any "@${t}" field set. + "`+n.join(WO.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 Ole(e,t,n,r){return new Ta.Warning({message:DE(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 nle({fieldName:e,subgraphName:t,typeName:n}){return new Na.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 rle({fieldName:e,typeName:t}){return new Na.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 xO=w(SE=>{"use strict";m();T();N();Object.defineProperty(SE,"__esModule",{value:!0});SE.upsertDirectiveSchemaAndEntityDefinitions=sle;SE.upsertParentsAndChildren=ole;var jn=Ae(),Eu=oa(),Ec=ys(),vE=Gp(),$l=Jr(),MO=$p(),ile=Mp(),Tc=yl(),Yp=ou(),ale=Qp(),Yn=ur(),fr=Hr();function sle(e,t){(0,jn.visit)(t,{Directive:{enter(n){let r=n.name.value;if(ile.EVENT_DIRECTIVE_NAMES.has(r)&&e.edfsDirectiveReferences.add(r),Ec.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(r))return e.isSubgraphVersionTwo=!0,!1;if(Ec.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(r))return!1;switch(r){case Yn.SUBSCRIPTION_FILTER:{e.directiveDefinitionByDirectiveName.set(Yn.SUBSCRIPTION_FILTER,Ec.SUBSCRIPTION_FILTER_DEFINITION);break}case Yn.CONFIGURE_DESCRIPTION:{e.directiveDefinitionByDirectiveName.set(Yn.CONFIGURE_DESCRIPTION,Ec.CONFIGURE_DESCRIPTION_DEFINITION);break}case Yn.CONFIGURE_CHILD_DESCRIPTIONS:{e.directiveDefinitionByDirectiveName.set(Yn.CONFIGURE_CHILD_DESCRIPTIONS,Ec.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION);break}}e.referencedDirectiveNames.add(r)}},DirectiveDefinition:{enter(n){return e.addDirectiveDefinitionDataByNode(n)&&e.customDirectiveDefinitions.set(n.name.value,n),!1}},InterfaceTypeDefinition:{enter(n){let r=n.name.value;if(e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),!(0,$l.isObjectLikeNodeEntity)(n))return;let i=(0,fr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,vE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,fr.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,$l.isObjectLikeNodeEntity)(n))return;let i=(0,fr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,vE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,fr.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,$l.isObjectLikeNodeEntity)(n))return;let r=n.name.value;(0,$l.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,fr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,vE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r})}},ObjectTypeExtension:{enter(n){if(!(0,$l.isObjectLikeNodeEntity)(n))return;let r=n.name.value,i=(0,fr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,vE.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,Yp.getTypeNodeNamedTypeName)(n.type);if(i)return(0,Eu.duplicateOperationTypeDefinitionError)(r,a,(0,Yp.getTypeNodeNamedTypeName)(i.type)),!1;let o=e.operationTypeNodeByTypeName.get(a);return o?(e.errors.push((0,Eu.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.directivesByDirectiveName)}},SchemaExtension:{enter(n){e.extractDirectives(n,e.schemaData.directivesByDirectiveName)}}})}function ole(e,t){let n=!1,r;(0,jn.visit)(t,{EnumTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},EnumTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},EnumValueDefinition:{enter(i){let a=i.name.value;e.lastChildNodeKind=i.kind;let o=(0,fr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Yn.PARENT_DEFINITION_DATA);if(o.kind!==jn.Kind.ENUM_TYPE_DEFINITION){e.errors.push((0,Eu.unexpectedParentKindForChildError)(e.originalParentTypeName,"Enum or Enum extension",(0,fr.kindToNodeType)(o.kind),a,(0,fr.kindToNodeType)(i.kind)));return}if(o.enumValueDataByValueName.has(a)){e.errors.push((0,Eu.duplicateEnumValueDefinitionError)(e.originalParentTypeName,a));return}o.enumValueDataByValueName.set(a,{appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:e.extractDirectives(i,new Map),federatedCoords:`${e.originalParentTypeName}.${a}`,kind:jn.Kind.ENUM_VALUE_DEFINITION,name:a,node:(0,Yp.getMutableEnumValueNode)(i),parentTypeName:e.originalParentTypeName,persistedDirectivesData:(0,Tc.newPersistedDirectivesData)(),subgraphNames:new Set([e.subgraphName]),description:(0,$l.formatDescription)(i.description)})},leave(){e.lastChildNodeKind=jn.Kind.NULL}},FieldDefinition:{enter(i){let a=i.name.value;if(n&&Yn.IGNORED_FIELDS.has(a))return!1;e.edfsDirectiveReferences.size>0&&e.validateSubscriptionFilterDirectiveLocation(i),e.lastChildNodeKind=i.kind;let o=(0,Yp.getTypeNodeNamedTypeName)(i.type);(0,fr.getValueOrDefault)(e.fieldCoordsByNamedTypeName,o,()=>new Set).add(`${e.renamedParentTypeName||e.originalParentTypeName}.${a}`),r&&!r.isAbstract&&e.internalGraph.addEdge(r,e.internalGraph.addOrUpdateNode(o),a),Ec.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let c=(0,fr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Yn.PARENT_DEFINITION_DATA);if(!(0,Tc.isParentDataCompositeOutputType)(c)){e.errors.push((0,Eu.unexpectedParentKindForChildError)(e.originalParentTypeName,'"Object" or "Interface"',(0,fr.kindToNodeType)(c.kind),a,(0,fr.kindToNodeType)(i.kind)));return}if(c.fieldDataByName.has(a)){e.errors.push((0,Eu.duplicateFieldDefinitionError)((0,fr.kindToNodeType)(c.kind),c.name,a));return}let l=e.extractArguments(new Map,i),d=e.extractDirectives(i,new Map),f=new Set;(0,Tc.isInterfaceDefinitionData)(c)||(e.addInheritedDirectivesToFieldData(d,f),d.has(Yn.EXTERNAL)&&e.unvalidatedExternalFieldCoords.add(`${e.originalParentTypeName}.${a}`),(e.doesParentObjectRequireFetchReasons||d.has(Yn.REQUIRE_FETCH_REASONS))&&c.requireFetchReasonsFieldNames.add(a));let y=e.addFieldDataByNode(c.fieldDataByName,i,l,d,f);n&&e.extractEventDirectivesToConfiguration(i,l);let I=y.directivesByDirectiveName.get(Yn.PROVIDES),v=y.directivesByDirectiveName.get(Yn.REQUIRES);if(!v&&!I)return;let P=e.entityDataByTypeName.get(e.originalParentTypeName),k=(0,fr.getValueOrDefault)(e.fieldSetDataByTypeName,e.originalParentTypeName,MO.newFieldSetData);I&&(0,MO.extractFieldSetValue)(a,k.provides,I),v&&(P||e.warnings.push((0,ale.requiresDefinedOnNonEntityFieldWarning)(`${e.originalParentTypeName}.${a}`,e.subgraphName)),(0,MO.extractFieldSetValue)(a,k.requires,v))},leave(){e.lastChildNodeKind=jn.Kind.NULL}},InputObjectTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i)},leave(){e.lastParentNodeKind=jn.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=jn.Kind.NULL}},InputValueDefinition:{enter(i){let a=i.name.value;if(e.lastParentNodeKind!==jn.Kind.INPUT_OBJECT_TYPE_DEFINITION&&e.lastParentNodeKind!==jn.Kind.INPUT_OBJECT_TYPE_EXTENSION){e.argumentName=a;return}e.lastChildNodeKind=i.kind;let o=(0,Yp.getTypeNodeNamedTypeName)(i.type);Ec.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let c=(0,fr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Yn.PARENT_DEFINITION_DATA);if(c.kind!==jn.Kind.INPUT_OBJECT_TYPE_DEFINITION)return e.errors.push((0,Eu.unexpectedParentKindForChildError)(e.originalParentTypeName,"input object or input object extension",(0,fr.kindToNodeType)(c.kind),a,(0,fr.kindToNodeType)(i.kind))),!1;if(c.inputValueDataByName.has(a)){e.errors.push((0,Eu.duplicateInputFieldDefinitionError)(e.originalParentTypeName,a));return}e.addInputValueDataByNode({inputValueDataByName:c.inputValueDataByName,isArgument:!1,node:i,originalParentTypeName:e.originalParentTypeName})},leave(){e.argumentName="",e.lastChildNodeKind===jn.Kind.INPUT_VALUE_DEFINITION&&(e.lastChildNodeKind=jn.Kind.NULL)}},InterfaceTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},InterfaceTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},ObjectTypeDefinition:{enter(i){if(i.name.value===Yn.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,Tc.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,Tc.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=jn.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentObjectRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ObjectTypeExtension:{enter(i){if(i.name.value===Yn.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,Tc.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,Tc.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=jn.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentObjectRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ScalarTypeDefinition:{enter(i){if(i.name.value===Yn.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},ScalarTypeExtension:{enter(i){if(i.name.value===Yn.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},UnionTypeDefinition:{enter(i){i.name.value!==Yn.ENTITY_UNION&&e.upsertUnionByNode(i)}},UnionTypeExtension:{enter(i){if(i.name.value===Yn.ENTITY_UNION)return!1;e.upsertUnionByNode(i,!0)}}})}});var GO=w(Ga=>{"use strict";m();T();N();Object.defineProperty(Ga,"__esModule",{value:!0});Ga.EntityDataNode=Ga.RootNode=Ga.GraphNode=Ga.Edge=void 0;var OE=Hr(),qO=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}};Ga.Edge=qO;var VO=class{constructor(t,n,r){_(this,"fieldDataByFieldName",new Map);_(this,"headToTailEdges",new Map);_(this,"entityEdges",[]);_(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,OE.getEntriesNotInHashSet)(this.headToTailEdges.keys(),this.fieldDataByFieldName);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,OE.add)(n,r.node.nodeName)&&this.getAccessibleEntityNodeNames(r.node,n)}};Ga.GraphNode=VO;var jO=class{constructor(t){_(this,"fieldDataByFieldName",new Map);_(this,"headToShareableTailEdges",new Map);_(this,"isAbstract",!1);_(this,"isRootNode",!0);_(this,"typeName");this.typeName=t}removeInaccessibleEdges(t){for(let[n,r]of this.headToShareableTailEdges)if(!t.has(n))for(let i of r)i.isInaccessible=!0}};Ga.RootNode=jO;var KO=class{constructor(t){_(this,"fieldSetsByTargetSubgraphName",new Map);_(this,"targetSubgraphNamesByFieldSet",new Map);_(this,"typeName");this.typeName=t}addTargetSubgraphByFieldSet(t,n){(0,OE.getValueOrDefault)(this.targetSubgraphNamesByFieldSet,t,()=>new Set).add(n),(0,OE.getValueOrDefault)(this.fieldSetsByTargetSubgraphName,n,()=>new Set).add(t)}};Ga.EntityDataNode=KO});var QO=w(vs=>{"use strict";m();T();N();Object.defineProperty(vs,"__esModule",{value:!0});vs.NodeResolutionData=void 0;vs.newRootFieldData=ule;vs.generateResolvabilityErrorReasons=Vq;vs.generateSelectionSetSegments=jq;vs.renderSelectionSet=Kq;vs.generateResolvabilityErrors=dle;var xq=oa(),hc=ur(),qq=Hr(),$O=class{constructor(t,n){_(this,"fieldDataByFieldName");_(this,"isResolved",!1);_(this,"resolvedFieldNames",new Set);_(this,"typeName");this.fieldDataByFieldName=n,this.typeName=t}add(t){if(this.resolvedFieldNames.add(t),this.resolvedFieldNames.size>this.fieldDataByFieldName.size){let n=(0,qq.getEntriesNotInHashSet)(this.resolvedFieldNames,this.fieldDataByFieldName);throw(0,xq.unexpectedEdgeFatalError)(this.typeName,n)}return this.isResolved=this.resolvedFieldNames.size===this.fieldDataByFieldName.size,this.isResolved}};vs.NodeResolutionData=$O;function ule(e,t,n){return{coordinate:`${e}.${t}`,message:`The root type field "${e}.${t}" is defined in the following subgraph`+(n.size>1?"s":"")+`: "${[...n].join(hc.QUOTATION_JOIN)}".`,subgraphNames:n}}function cle(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 Dle({fieldName:e,subgraphName:t,typeName:n}){return new Ta.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 ble({fieldName:e,typeName:t}){return new Ta.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 ZO=w(AE=>{"use strict";m();T();N();Object.defineProperty(AE,"__esModule",{value:!0});AE.upsertDirectiveSchemaAndEntityDefinitions=Ple;AE.upsertParentsAndChildren=Fle;var jn=Ae(),gu=Mi(),gc=Ss(),bE=Jp(),Hl=Hr(),XO=Hp(),Ale=jp(),Ic=vl(),Wp=du(),Rle=zp(),Jn=vr(),fr=Sr();function Ple(e,t){(0,jn.visit)(t,{Directive:{enter(n){let r=n.name.value;if(Ale.EVENT_DIRECTIVE_NAMES.has(r)&&e.edfsDirectiveReferences.add(r),gc.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(r))return e.isSubgraphVersionTwo=!0,!1;if(gc.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(r))return!1;switch(r){case Jn.SUBSCRIPTION_FILTER:{e.directiveDefinitionByDirectiveName.set(Jn.SUBSCRIPTION_FILTER,gc.SUBSCRIPTION_FILTER_DEFINITION);break}case Jn.CONFIGURE_DESCRIPTION:{e.directiveDefinitionByDirectiveName.set(Jn.CONFIGURE_DESCRIPTION,gc.CONFIGURE_DESCRIPTION_DEFINITION);break}case Jn.CONFIGURE_CHILD_DESCRIPTIONS:{e.directiveDefinitionByDirectiveName.set(Jn.CONFIGURE_CHILD_DESCRIPTIONS,gc.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION);break}}e.referencedDirectiveNames.add(r)}},DirectiveDefinition:{enter(n){return e.addDirectiveDefinitionDataByNode(n)&&e.customDirectiveDefinitions.set(n.name.value,n),!1}},InterfaceTypeDefinition:{enter(n){let r=n.name.value;if(e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),!(0,Hl.isObjectLikeNodeEntity)(n))return;let i=(0,fr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,bE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,fr.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,Hl.isObjectLikeNodeEntity)(n))return;let i=(0,fr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,bE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,fr.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,Hl.isObjectLikeNodeEntity)(n))return;let r=n.name.value;(0,Hl.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,fr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,bE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r})}},ObjectTypeExtension:{enter(n){if(!(0,Hl.isObjectLikeNodeEntity)(n))return;let r=n.name.value,i=(0,fr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,bE.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,Wp.getTypeNodeNamedTypeName)(n.type);if(i)return(0,gu.duplicateOperationTypeDefinitionError)(r,a,(0,Wp.getTypeNodeNamedTypeName)(i.type)),!1;let o=e.operationTypeNodeByTypeName.get(a);return o?(e.errors.push((0,gu.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.directivesByDirectiveName)}},SchemaExtension:{enter(n){e.extractDirectives(n,e.schemaData.directivesByDirectiveName)}}})}function Fle(e,t){let n=!1,r;(0,jn.visit)(t,{EnumTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},EnumTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},EnumValueDefinition:{enter(i){let a=i.name.value;e.lastChildNodeKind=i.kind;let o=(0,fr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Jn.PARENT_DEFINITION_DATA);if(o.kind!==jn.Kind.ENUM_TYPE_DEFINITION){e.errors.push((0,gu.unexpectedParentKindForChildError)(e.originalParentTypeName,"Enum or Enum extension",(0,fr.kindToNodeType)(o.kind),a,(0,fr.kindToNodeType)(i.kind)));return}if(o.enumValueDataByValueName.has(a)){e.errors.push((0,gu.duplicateEnumValueDefinitionError)(e.originalParentTypeName,a));return}o.enumValueDataByValueName.set(a,{appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:e.extractDirectives(i,new Map),federatedCoords:`${e.originalParentTypeName}.${a}`,kind:jn.Kind.ENUM_VALUE_DEFINITION,name:a,node:(0,Wp.getMutableEnumValueNode)(i),parentTypeName:e.originalParentTypeName,persistedDirectivesData:(0,Ic.newPersistedDirectivesData)(),subgraphNames:new Set([e.subgraphName]),description:(0,Hl.formatDescription)(i.description)})},leave(){e.lastChildNodeKind=jn.Kind.NULL}},FieldDefinition:{enter(i){let a=i.name.value;if(n&&Jn.IGNORED_FIELDS.has(a))return!1;e.edfsDirectiveReferences.size>0&&e.validateSubscriptionFilterDirectiveLocation(i),e.lastChildNodeKind=i.kind;let o=(0,Wp.getTypeNodeNamedTypeName)(i.type);(0,fr.getValueOrDefault)(e.fieldCoordsByNamedTypeName,o,()=>new Set).add(`${e.renamedParentTypeName||e.originalParentTypeName}.${a}`),r&&!r.isAbstract&&e.internalGraph.addEdge(r,e.internalGraph.addOrUpdateNode(o),a),gc.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let c=(0,fr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Jn.PARENT_DEFINITION_DATA);if(!(0,Ic.isParentDataCompositeOutputType)(c)){e.errors.push((0,gu.unexpectedParentKindForChildError)(e.originalParentTypeName,'"Object" or "Interface"',(0,fr.kindToNodeType)(c.kind),a,(0,fr.kindToNodeType)(i.kind)));return}if(c.fieldDataByName.has(a)){e.errors.push((0,gu.duplicateFieldDefinitionError)((0,fr.kindToNodeType)(c.kind),c.name,a));return}let l=e.extractArguments(new Map,i),d=e.extractDirectives(i,new Map),f=new Set;(0,Ic.isInterfaceDefinitionData)(c)||(e.addInheritedDirectivesToFieldData(d,f),d.has(Jn.EXTERNAL)&&e.unvalidatedExternalFieldCoords.add(`${e.originalParentTypeName}.${a}`),(e.doesParentObjectRequireFetchReasons||d.has(Jn.REQUIRE_FETCH_REASONS))&&c.requireFetchReasonsFieldNames.add(a));let y=e.addFieldDataByNode(c.fieldDataByName,i,l,d,f);n&&e.extractEventDirectivesToConfiguration(i,l);let I=y.directivesByDirectiveName.get(Jn.PROVIDES),v=y.directivesByDirectiveName.get(Jn.REQUIRES);if(!v&&!I)return;let F=e.entityDataByTypeName.get(e.originalParentTypeName),k=(0,fr.getValueOrDefault)(e.fieldSetDataByTypeName,e.originalParentTypeName,XO.newFieldSetData);I&&(0,XO.extractFieldSetValue)(a,k.provides,I),v&&(F||e.warnings.push((0,Rle.requiresDefinedOnNonEntityFieldWarning)(`${e.originalParentTypeName}.${a}`,e.subgraphName)),(0,XO.extractFieldSetValue)(a,k.requires,v))},leave(){e.lastChildNodeKind=jn.Kind.NULL}},InputObjectTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i)},leave(){e.lastParentNodeKind=jn.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=jn.Kind.NULL}},InputValueDefinition:{enter(i){let a=i.name.value;if(e.lastParentNodeKind!==jn.Kind.INPUT_OBJECT_TYPE_DEFINITION&&e.lastParentNodeKind!==jn.Kind.INPUT_OBJECT_TYPE_EXTENSION){e.argumentName=a;return}e.lastChildNodeKind=i.kind;let o=(0,Wp.getTypeNodeNamedTypeName)(i.type);gc.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let c=(0,fr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Jn.PARENT_DEFINITION_DATA);if(c.kind!==jn.Kind.INPUT_OBJECT_TYPE_DEFINITION)return e.errors.push((0,gu.unexpectedParentKindForChildError)(e.originalParentTypeName,"input object or input object extension",(0,fr.kindToNodeType)(c.kind),a,(0,fr.kindToNodeType)(i.kind))),!1;if(c.inputValueDataByName.has(a)){e.errors.push((0,gu.duplicateInputFieldDefinitionError)(e.originalParentTypeName,a));return}e.addInputValueDataByNode({inputValueDataByName:c.inputValueDataByName,isArgument:!1,node:i,originalParentTypeName:e.originalParentTypeName})},leave(){e.argumentName="",e.lastChildNodeKind===jn.Kind.INPUT_VALUE_DEFINITION&&(e.lastChildNodeKind=jn.Kind.NULL)}},InterfaceTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},InterfaceTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},ObjectTypeDefinition:{enter(i){if(i.name.value===Jn.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,Ic.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,Ic.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=jn.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentObjectRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ObjectTypeExtension:{enter(i){if(i.name.value===Jn.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,Ic.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,Ic.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=jn.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentObjectRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ScalarTypeDefinition:{enter(i){if(i.name.value===Jn.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},ScalarTypeExtension:{enter(i){if(i.name.value===Jn.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},UnionTypeDefinition:{enter(i){i.name.value!==Jn.ENTITY_UNION&&e.upsertUnionByNode(i)}},UnionTypeExtension:{enter(i){if(i.name.value===Jn.ENTITY_UNION)return!1;e.upsertUnionByNode(i,!0)}}})}});var iD=w(Qa=>{"use strict";m();T();N();Object.defineProperty(Qa,"__esModule",{value:!0});Qa.EntityDataNode=Qa.RootNode=Qa.GraphNode=Qa.Edge=void 0;var RE=Sr(),eD=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}};Qa.Edge=eD;var tD=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,RE.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,RE.add)(n,r.node.nodeName)&&this.getAccessibleEntityNodeNames(r.node,n)}};Qa.GraphNode=tD;var nD=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}};Qa.RootNode=nD;var rD=class{constructor(t){_(this,"fieldSetsByTargetSubgraphName",new Map);_(this,"targetSubgraphNamesByFieldSet",new Map);_(this,"typeName");this.typeName=t}addTargetSubgraphByFieldSet(t,n){(0,RE.getValueOrDefault)(this.targetSubgraphNamesByFieldSet,t,()=>new Set).add(n),(0,RE.getValueOrDefault)(this.fieldSetsByTargetSubgraphName,n,()=>new Set).add(t)}};Qa.EntityDataNode=rD});var aD=w(Kn=>{"use strict";m();T();N();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.ROOT_TYPE_NAMES=Kn.QUOTATION_JOIN=Kn.NOT_APPLICABLE=Kn.LITERAL_SPACE=Kn.LITERAL_PERIOD=Kn.SUBSCRIPTION=Kn.QUERY=Kn.MUTATION=void 0;Kn.MUTATION="Mutation";Kn.QUERY="Query";Kn.SUBSCRIPTION="Subscription";Kn.LITERAL_PERIOD=".";Kn.LITERAL_SPACE=" ";Kn.NOT_APPLICABLE="N/A";Kn.QUOTATION_JOIN='", "';Kn.ROOT_TYPE_NAMES=new Set([Kn.MUTATION,Kn.QUERY,Kn.SUBSCRIPTION])});var cD=w(Ea=>{"use strict";m();T();N();Object.defineProperty(Ea,"__esModule",{value:!0});Ea.newRootFieldData=wle;Ea.generateResolvabilityErrorReasons=uD;Ea.generateSharedResolvabilityErrorReasons=oV;Ea.generateSelectionSetSegments=PE;Ea.renderSelectionSet=FE;Ea.generateRootResolvabilityErrors=Cle;Ea.generateEntityResolvabilityErrors=Ble;Ea.generateSharedEntityResolvabilityErrors=Ule;Ea.getMultipliedRelativeOriginPaths=kle;var sD=Mi(),oD=Sr(),Ya=aD();function wle(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(Ya.QUOTATION_JOIN)}".`,subgraphNames:n}}function Lle(e,t){return e.isLeaf?e.name+` <-- `:e.name+` { <-- -`+hc.LITERAL_SPACE.repeat(t+3)+`... -`+hc.LITERAL_SPACE.repeat(t+2)+`} -`}function Vq({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(hc.QUOTATION_JOIN)}".`];if(e){let c=!1;for(let[l,d]of e.fieldSetsByTargetSubgraphName)if(a.has(l)){c=!0;for(let f of d)o.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" does not satisfy the key field set "${f}" 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 descendent 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 share the same root type field "${t.coordinate}" can provide a route to access "${r}".`),o.push(`The type "${i}" is not a descendent 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 jq(e){let t=e.split(new RegExp("(?<=\\w)\\.")),n="",r="";for(let i=0;i{"use strict";m();T();N();Object.defineProperty(DE,"__esModule",{value:!0});DE.Graph=void 0;var Ql=GO(),Yl=QO(),Gq=ur(),Ur=Hr(),YO=class{constructor(){_(this,"edgeId",-1);_(this,"entityDataNodes",new Map);_(this,"entityNodeNamesBySharedFieldPath",new Map);_(this,"nodeByNodeName",new Map);_(this,"nodesByTypeName",new Map);_(this,"rootNodeByRootTypeName",new Map);_(this,"subgraphName",Gq.NOT_APPLICABLE);_(this,"resolvableFieldNamesByRelativeFieldPathByEntityNodeName",new Map);_(this,"nodeResolutionDataByFieldPath",new Map);_(this,"unresolvableFieldPaths",new Set);_(this,"failureResultByEntityNodeName",new Map);_(this,"walkerIndex",-1)}getRootNode(t){return(0,Ur.getValueOrDefault)(this.rootNodeByRootTypeName,t,()=>new Ql.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 Ql.GraphNode(this.subgraphName,t,n);return this.nodeByNodeName.set(r,a),(0,Ur.getValueOrDefault)(this.nodesByTypeName,t,()=>[]).push(a),a}addEdge(t,n,r,i=!1){if(t.isRootNode){let c=new Ql.Edge(this.getNextEdgeId(),n,r);return(0,Ur.getValueOrDefault)(t.headToShareableTailEdges,r,()=>[]).push(c),c}let a=t,o=new Ql.Edge(this.getNextEdgeId(),n,i?n.typeName:r,i);return a.headToTailEdges.set(r,o),o}addEntityDataNode(t){let n=this.entityDataNodes.get(t);if(n)return n;let r=new Ql.EntityDataNode(t);return this.entityDataNodes.set(t,r),r}getNextEdgeId(){return this.edgeId+=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.entityDataNodes.get(t);if(Gq.ROOT_TYPE_NAMES.has(t)){let a=this.getRootNode(t);a.removeInaccessibleEdges(n),a.fieldDataByFieldName=n;return}let i=this.nodesByTypeName.get(t);if(i){for(let a of i)if(a.fieldDataByFieldName=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||[]){if(l===a.subgraphName)continue;let d=this.nodeByNodeName.get(`${l}.${a.typeName}`);d&&a.entityEdges.push(new Ql.Edge(this.getNextEdgeId(),d,""))}}}}}setSubgraphName(t){this.subgraphName=t}validateEntities(t,n){let r=new Map;for(let[i,a]of t){let o=a.size>1,c,l=o?new Map:void 0,d=new Set,f=new Map;for(let y of a){let I=this.nodeByNodeName.get(y);if(!I)throw new Error(`Fatal: Could not find entity node for "${y}".`);if(this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName.get(y)){let Q=this.failureResultByEntityNodeName.get(y);if(!Q){c=void 0;break}if(!o)return Q}let P=this.nodesByTypeName.get(I.typeName)||[],k=(0,Ur.getValueOrDefault)(r,y,()=>o?f:new Map),K=new JO({interSubgraphNodes:P,entityNodeNamesBySharedFieldPath:k,originNode:I,resolvableFieldNamesByRelativeFieldPathByEntityNodeName:this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName,walkerIndex:this.walkerIndex+=1,sharedResolvableFieldNamesByRelativeFieldPath:l,unresolvableSharedFieldPaths:d});if(K.visitEntityNode(I),K.unresolvableFieldPaths.size>0){if(o&&d.size<1){c=void 0;break}c={entityAncestorData:{fieldSetsByTargetSubgraphName:(0,Ur.getOrThrowError)(this.entityDataNodes,I.typeName,"entityDataNodes").fieldSetsByTargetSubgraphName,subgraphName:I.subgraphName,typeName:I.typeName},nodeName:y,parentFieldPathForEntityReference:[i],success:!1,typeName:I.typeName,unresolvableFieldPaths:o?d:K.unresolvableFieldPaths},this.failureResultByEntityNodeName.set(y,c);continue}c=void 0;break}if(c)return o&&l&&this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName.set(c.nodeName,l),c}if(r.size>0)for(let[i,a]of r){let o=this.validateEntities(a,n);if(!o.success){for(let[c,l]of t)if(l.has(i)){o.parentFieldPathForEntityReference.push(c);break}return o}}return{success:!0}}validate(){let t=[];for(let n of this.rootNodeByRootTypeName.values())e:for(let[r,i]of n.headToShareableTailEdges){for(let c of i){if(c.isInaccessible)continue e;this.walkerIndex+=1,this.visitEdge(c,`${n.typeName.toLowerCase()}`)}let a=(0,Ur.getOrThrowError)(n.fieldDataByFieldName,r,"fieldDataByFieldName"),o=(0,Yl.newRootFieldData)(n.typeName,r,a.subgraphNames);if(this.unresolvableFieldPaths.size>0&&(0,Yl.generateResolvabilityErrors)({unresolvableFieldPaths:this.unresolvableFieldPaths,nodeResolutionDataByFieldPath:this.nodeResolutionDataByFieldPath,rootFieldData:o,errors:t}),this.entityNodeNamesBySharedFieldPath.size>0){let c=this.validateEntities(this.entityNodeNamesBySharedFieldPath,o);c.success||this.generateEntityResolvabilityErrors(c,o,t)}if(t.length>0)return t;this.entityNodeNamesBySharedFieldPath=new Map}return[]}visitEdge(t,n){return t.isInaccessible||t.node.isInaccessible?!1:(!(0,Ur.add)(t.visitedIndices,this.walkerIndex)||t.node.isLeaf||(t.node.isAbstract?this.validateAbstractNode(t.node,`${n}.${t.edgeName}`):this.validateConcreteNode(t.node,`${n}.${t.edgeName}`)),!0)}validateConcreteNode(t,n){if(t.headToTailEdges.size<1)return;if(t.hasEntitySiblings){(0,Ur.getValueOrDefault)(this.entityNodeNamesBySharedFieldPath,n,()=>new Set).add(t.nodeName);return}let r=(0,Ur.getValueOrDefault)(this.nodeResolutionDataByFieldPath,n,()=>new Yl.NodeResolutionData(t.typeName,t.fieldDataByFieldName));for(let[i,a]of t.headToTailEdges)this.visitEdge(a,n)&&r.add(i);r.isResolved?this.unresolvableFieldPaths.delete(n):this.unresolvableFieldPaths.add(n)}validateAbstractNode(t,n){if(!(t.headToTailEdges.size<1))for(let r of t.headToTailEdges.values())this.visitEdge(r,n)}generateEntityResolvabilityErrors(t,n,r){let i=(0,Ur.getOrThrowError)(this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName,t.nodeName,"resolvableFieldNamesByRelativeFieldPathByEntityNodeName"),a="";for(let o of t.parentFieldPathForEntityReference)a=o+a;(0,Yl.generateResolvabilityErrors)({unresolvableFieldPaths:t.unresolvableFieldPaths,nodeResolutionDataByFieldPath:i,rootFieldData:n,errors:r,pathFromRoot:a,entityAncestorData:t.entityAncestorData})}};DE.Graph=YO;var JO=class{constructor({entityNodeNamesBySharedFieldPath:t,interSubgraphNodes:n,originNode:r,resolvableFieldNamesByRelativeFieldPathByEntityNodeName:i,unresolvableSharedFieldPaths:a,walkerIndex:o,sharedResolvableFieldNamesByRelativeFieldPath:c}){_(this,"entityNodeNamesBySharedFieldPath");_(this,"interSubgraphNodes");_(this,"originNode");_(this,"resolvableFieldNamesByRelativeFieldPath");_(this,"resolvableFieldNamesByRelativeFieldPathByEntityNodeName");_(this,"unresolvableFieldPaths",new Set);_(this,"unresolvableSharedFieldPaths");_(this,"walkerIndex");_(this,"sharedResolvableFieldNamesByRelativeFieldPath");this.entityNodeNamesBySharedFieldPath=t,this.interSubgraphNodes=n,this.originNode=r,this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName=i,this.resolvableFieldNamesByRelativeFieldPath=(0,Ur.getValueOrDefault)(this.resolvableFieldNamesByRelativeFieldPathByEntityNodeName,r.nodeName,()=>new Map),this.unresolvableSharedFieldPaths=a,this.walkerIndex=o,this.sharedResolvableFieldNamesByRelativeFieldPath=c}visitEntityNode(t){this.validateEntityRelatedConcreteNode(t,"");let n=t.getAllAccessibleEntityNodeNames();for(let r of this.interSubgraphNodes){if(this.unresolvableFieldPaths.size<0)return;n.has(r.nodeName)&&this.validateEntityRelatedConcreteNode(r,"")}}visitEntityRelatedEdge(t,n){return t.isInaccessible||t.node.isInaccessible?!1:!(0,Ur.add)(t.visitedIndices,this.walkerIndex)||t.node.isLeaf?!0:t.node.hasEntitySiblings?((0,Ur.getValueOrDefault)(this.entityNodeNamesBySharedFieldPath,`${n}.${t.edgeName}`,()=>new Set).add(t.node.nodeName),!0):(t.node.isAbstract?this.validateEntityRelatedAbstractNode(t.node,`${n}.${t.edgeName}`):this.validateEntityRelatedConcreteNode(t.node,`${n}.${t.edgeName}`),!0)}validateEntityRelatedConcreteNode(t,n){if(t.headToTailEdges.size<1)return;let r=(0,Ur.getValueOrDefault)(this.resolvableFieldNamesByRelativeFieldPath,n,()=>new Yl.NodeResolutionData(t.typeName,t.fieldDataByFieldName)),i=this.sharedResolvableFieldNamesByRelativeFieldPath?(0,Ur.getValueOrDefault)(this.sharedResolvableFieldNamesByRelativeFieldPath,n,()=>new Yl.NodeResolutionData(t.typeName,t.fieldDataByFieldName)):void 0;for(let[a,o]of t.headToTailEdges)this.visitEntityRelatedEdge(o,n)&&(r.add(a),i==null||i.add(a));r.isResolved?this.unresolvableFieldPaths.delete(n):this.unresolvableFieldPaths.add(n),i&&(i.isResolved?this.unresolvableSharedFieldPaths.delete(n):this.unresolvableSharedFieldPaths.add(n))}validateEntityRelatedAbstractNode(t,n){if(!(t.headToTailEdges.size<1))for(let r of t.headToTailEdges.values())this.visitEntityRelatedEdge(r,n)}}});var zO=w(bE=>{"use strict";m();T();N();Object.defineProperty(bE,"__esModule",{value:!0});bE.newFieldSetConditionData=ple;bE.newConfigurationData=fle;function ple({fieldCoordinatesPath:e,fieldPath:t}){return{fieldCoordinatesPath:e,fieldPath:t}}function fle(e,t){return{fieldNames:new Set,isRootNode:e,typeName:t}}});var XO=w(yc=>{"use strict";m();T();N();Object.defineProperty(yc,"__esModule",{value:!0});yc.NormalizationFactory=void 0;yc.normalizeSubgraphFromString=Ele;yc.normalizeSubgraph=Qq;yc.batchNormalize=hle;var Z=Ae(),Dn=Jr(),ti=$p(),qt=ys(),rr=Gp(),le=oa(),AE=Mp(),mle=pv(),Ti=eE(),Nle=CO(),Qa=Qp(),$q=xO(),$a=Ip(),sn=yl(),nr=ou(),WO=HO(),RE=Nv(),W=ur(),Tle=Tl(),je=Hr(),Jp=zO();function Ele(e,t=!0){let{error:n,documentNode:r}=(0,Dn.safeParse)(e,t);return n||!r?{errors:[(0,le.subgraphInvalidSyntaxError)(n)],success:!1,warnings:[]}:new Hp(new WO.Graph).normalize(r)}function Qq(e,t,n){return new Hp(n||new WO.Graph,t).normalize(e)}var Hp=class{constructor(t,n){_(this,"argumentName","");_(this,"authorizationDataByParentTypeName",new Map);_(this,"concreteTypeNamesByAbstractTypeName",new Map);_(this,"conditionalFieldDataByCoords",new Map);_(this,"configurationDataByTypeName",new Map);_(this,"customDirectiveDefinitions",new Map);_(this,"definedDirectiveNames",new Set);_(this,"directiveDefinitionByDirectiveName",new Map);_(this,"directiveDefinitionDataByDirectiveName",(0,ti.initializeDirectiveDefinitionDatas)());_(this,"doesParentObjectRequireFetchReasons",!1);_(this,"edfsDirectiveReferences",new Set);_(this,"errors",[]);_(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,"isCurrentParentExtension",!1);_(this,"isParentObjectExternal",!1);_(this,"isParentObjectShareable",!1);_(this,"isSubgraphEventDrivenGraph",!1);_(this,"isSubgraphVersionTwo",!1);_(this,"keyFieldSetDatasByTypeName",new Map);_(this,"lastParentNodeKind",Z.Kind.NULL);_(this,"lastChildNodeKind",Z.Kind.NULL);_(this,"parentTypeNamesWithAuthDirectives",new Set);_(this,"keyFieldSetDataByTypeName",new Map);_(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",[]);for(let[r,i]of qt.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME)this.directiveDefinitionByDirectiveName.set(r,i);this.subgraphName=n||W.NOT_APPLICABLE,this.internalGraph=t,this.internalGraph.setSubgraphName(this.subgraphName),this.schemaData={directivesByDirectiveName:new Map,kind:Z.Kind.SCHEMA_DEFINITION,name:W.SCHEMA,operationTypes:new Map}}validateArguments(t,n){for(let r of t.argumentDataByName.values()){let i=(0,nr.getTypeNodeNamedTypeName)(r.type);if(qt.BASE_SCALARS.has(i)){r.namedTypeKind=Z.Kind.SCALAR_TYPE_DEFINITION;continue}let a=this.parentDefinitionDataByTypeName.get(i);if(a){if((0,sn.isInputNodeKind)(a.kind)){r.namedTypeKind=a.kind;continue}this.errors.push((0,le.invalidNamedTypeError)({data:r,namedTypeData:a,nodeType:`${(0,je.kindToNodeType)(n)} field argument`}))}}}isTypeNameRootType(t){return W.ROOT_TYPE_NAMES.has(t)||this.operationTypeNodeByTypeName.has(t)}isArgumentValueValid(t,n){if(n.kind===Z.Kind.NULL)return t.kind!==Z.Kind.NON_NULL_TYPE;switch(t.kind){case Z.Kind.LIST_TYPE:{if(n.kind!==Z.Kind.LIST)return this.isArgumentValueValid((0,nr.getNamedTypeNode)(t.type),n);for(let r of n.values)if(!this.isArgumentValueValid(t.type,r))return!1;return!0}case Z.Kind.NAMED_TYPE:switch(t.name.value){case W.BOOLEAN_SCALAR:return n.kind===Z.Kind.BOOLEAN;case W.FLOAT_SCALAR:return n.kind===Z.Kind.FLOAT||n.kind===Z.Kind.INT;case W.ID_SCALAR:return n.kind===Z.Kind.STRING||n.kind===Z.Kind.INT;case W.INT_SCALAR:return n.kind===Z.Kind.INT;case W.FIELD_SET_SCALAR:case W.SCOPE_SCALAR:case W.STRING_SCALAR:return n.kind===Z.Kind.STRING;case W.LINK_IMPORT:return!0;case W.LINK_PURPOSE:return n.kind!==Z.Kind.ENUM?!1:n.value===W.SECURITY||n.value===W.EXECUTION;case W.SUBSCRIPTION_FIELD_CONDITION:case W.SUBSCRIPTION_FILTER_CONDITION:return n.kind===Z.Kind.OBJECT;default:{let r=this.parentDefinitionDataByTypeName.get(t.name.value);if(!r)return!1;if(r.kind===Z.Kind.SCALAR_TYPE_DEFINITION)return!0;if(r.kind===Z.Kind.ENUM_TYPE_DEFINITION){if(n.kind!==Z.Kind.ENUM)return!1;let i=r.enumValueDataByValueName.get(n.value);return i?!i.directivesByDirectiveName.has(W.INACCESSIBLE):!1}return r.kind!==Z.Kind.INPUT_OBJECT_TYPE_DEFINITION?!1:n.kind===Z.Kind.OBJECT}}default:return this.isArgumentValueValid(t.type,n)}}addInheritedDirectivesToFieldData(t,n){return this.isParentObjectExternal&&!t.has(W.EXTERNAL)&&(t.set(W.EXTERNAL,[(0,je.generateSimpleDirective)(W.EXTERNAL)]),n.add(W.EXTERNAL)),this.doesParentObjectRequireFetchReasons&&!t.has(W.REQUIRE_FETCH_REASONS)&&(t.set(W.REQUIRE_FETCH_REASONS,[(0,je.generateSimpleDirective)(W.REQUIRE_FETCH_REASONS)]),n.add(W.REQUIRE_FETCH_REASONS)),this.isParentObjectShareable&&!t.has(W.SHAREABLE)&&(t.set(W.SHAREABLE,[(0,je.generateSimpleDirective)(W.SHAREABLE)]),n.add(W.SHAREABLE)),t}extractDirectives(t,n){if(!t.directives)return n;for(let r of t.directives){let i=r.name.value;i===W.SHAREABLE?(0,je.getValueOrDefault)(n,i,()=>[r]):(0,je.getValueOrDefault)(n,i,()=>[]).push(r),(0,rr.isNodeKindObject)(t.kind)&&(this.isParentObjectExternal||(this.isParentObjectExternal=i===W.EXTERNAL),this.doesParentObjectRequireFetchReasons||(this.doesParentObjectRequireFetchReasons=i===W.REQUIRE_FETCH_REASONS),this.isParentObjectShareable||(this.isParentObjectShareable=i===W.SHAREABLE))}return n}validateDirective({data:t,definitionData:n,directiveCoords:r,directiveNode:i,errorMessages:a,requiredArgumentNames:o}){let c=i.name.value,l=t.kind===Z.Kind.FIELD_DEFINITION?t.renamedParentTypeName||t.originalParentTypeName:t.name,d=c===W.AUTHENTICATED,f=(0,sn.isFieldData)(t),y=c===W.OVERRIDE,I=c===W.REQUIRES_SCOPES,v=c===W.SEMANTIC_NON_NULL;if(!i.arguments||i.arguments.length<1)return n.requiredArgumentNames.size>0&&a.push((0,le.undefinedRequiredArgumentsErrorMessage)(c,o,[])),d&&this.handleAuthenticatedDirective(t,l),v&&f&&((0,sn.isTypeRequired)(t.type)?a.push((0,le.semanticNonNullLevelsNonNullErrorMessage)({typeString:(0,Ti.printTypeNode)(t.type),value:"0"})):t.nullLevelsBySubgraphName.set(this.subgraphName,new Set([0]))),a;let P=new Set,k=new Set,K=new Set,Q=[];for(let Te of i.arguments){let de=Te.name.value;if(P.has(de)){k.add(de);continue}P.add(de);let Re=n.argumentTypeNodeByArgumentName.get(de);if(!Re){K.add(de);continue}if(!this.isArgumentValueValid(Re.typeNode,Te.value)){a.push((0,le.invalidArgumentValueErrorMessage)((0,Z.print)(Te.value),`@${c}`,de,(0,Ti.printTypeNode)(Re.typeNode)));continue}if(y&&f){this.handleOverrideDirective({data:t,directiveCoords:r,errorMessages:a,targetSubgraphName:Te.value.value});continue}if(v&&f){this.handleSemanticNonNullDirective({data:t,directiveNode:i,errorMessages:a});continue}!I||de!==W.SCOPES||this.extractRequiredScopes({directiveCoords:r,orScopes:Te.value.values,requiredScopes:Q})}k.size>0&&a.push((0,le.duplicateDirectiveArgumentDefinitionsErrorMessage)([...k])),K.size>0&&a.push((0,le.unexpectedDirectiveArgumentErrorMessage)(c,[...K]));let se=(0,je.getEntriesNotInHashSet)(o,P);if(se.length>0&&a.push((0,le.undefinedRequiredArgumentsErrorMessage)(c,o,se)),a.length>0||!I)return a;let ie=(0,je.getValueOrDefault)(this.authorizationDataByParentTypeName,l,()=>(0,rr.newAuthorizationData)(l));if(t.kind!==Z.Kind.FIELD_DEFINITION)this.parentTypeNamesWithAuthDirectives.add(l),ie.requiredScopes.push(...Q);else{let Te=(0,je.getValueOrDefault)(ie.fieldAuthDataByFieldName,t.name,()=>(0,rr.newFieldAuthorizationData)(t.name));Te.inheritedData.requiredScopes.push(...Q),Te.originalData.requiredScopes.push(...Q)}return a}validateDirectives(t,n){let r=new Set;for(let[i,a]of t.directivesByDirectiveName){let o=this.directiveDefinitionDataByDirectiveName.get(i);if(!o){r.has(i)||(this.errors.push((0,le.undefinedDirectiveError)(i,n)),r.add(i));continue}let c=[],l=(0,Dn.nodeKindToDirectiveLocation)(t.kind);if(o.locations.has(l)||c.push((0,le.invalidDirectiveLocationErrorMessage)(i,l)),a.length>1&&!o.isRepeatable){let f=(0,je.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);f.has(i)||(f.add(i),c.push((0,le.invalidRepeatedDirectiveErrorMessage)(i)))}let d=[...o.requiredArgumentNames];for(let f=0;f0&&this.errors.push((0,le.invalidDirectiveError)(i,n,(0,je.numberToOrdinal)(f+1),y))}}switch(t.kind){case Z.Kind.ENUM_TYPE_DEFINITION:{for(let[i,a]of t.enumValueDataByValueName)this.validateDirectives(a,`${t.name}.${i}`);return}case Z.Kind.FIELD_DEFINITION:{for(let[i,a]of t.argumentDataByName)this.validateDirectives(a,`${t.originalParentTypeName}.${t.name}(${i}: ...)`);return}case Z.Kind.INPUT_OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.inputValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case Z.Kind.INTERFACE_TYPE_DEFINITION:case Z.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?$a.ExtensionType.REAL:r||!n.has(W.EXTENDS)?$a.ExtensionType.NONE:$a.ExtensionType.EXTENDS}setParentDataExtensionType(t,n){switch(t.extensionType){case $a.ExtensionType.EXTENDS:case $a.ExtensionType.NONE:{if(n===$a.ExtensionType.REAL)return;this.errors.push((0,le.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 W.PROPAGATE:{if(o.value.kind!=Z.Kind.BOOLEAN)return;r.propagate=o.value.value;break}case W.DESCRIPTION_OVERRIDE:{if(o.value.kind!=Z.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.directivesByDirectiveName.get(W.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,le.duplicateImplementedInterfaceError)((0,rr.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.directivesByDirectiveName.has(W.KEY)),n.isInaccessible||(n.isInaccessible=n.directivesByDirectiveName.has(W.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,le.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,{argumentDataByArgumentName: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(!W.EXECUTABLE_DIRECTIVE_LOCATIONS.has(o)&&!AE.TYPE_SYSTEM_DIRECTIVE_LOCATIONS.has(o)){n.push((0,le.invalidDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}if(r.has(o)){n.push((0,le.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={argumentTypeNodeByArgumentName: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,sn.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,le.duplicateDirectiveDefinitionArgumentErrorMessage)([...c])),o}addDirectiveDefinitionDataByNode(t){let n=t.name.value;if(this.definedDirectiveNames.has(n))return this.errors.push((0,le.duplicateDirectiveDefinitionError)(n)),!1;if(this.definedDirectiveNames.add(n),this.directiveDefinitionByDirectiveName.set(n,t),qt.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(n))return this.isSubgraphVersionTwo=!0,!1;if(qt.ALL_IN_BUILT_DIRECTIVE_NAMES.has(n))return!1;let r=[],{argumentTypeNodeByArgumentName:i,optionalArgumentNames:a,requiredArgumentNames:o}=this.extractArgumentData(t.arguments,r);return this.directiveDefinitionDataByDirectiveName.set(n,{argumentTypeNodeByArgumentName:i,isRepeatable:t.repeatable,locations:this.extractDirectiveLocations(t,r),name:n,node:t,optionalArgumentNames:a,requiredArgumentNames:o}),r.length>0&&this.errors.push((0,le.invalidDirectiveDefinitionError)(n,r)),!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:f}=(0,sn.isNodeExternalOrShareable)(n,!this.isSubgraphVersionTwo,i),y=(0,nr.getTypeNodeNamedTypeName)(n.type),I={argumentDataByName:r,configureDescriptionDataBySubgraphName:new Map,externalFieldDataBySubgraphName:new Map([[this.subgraphName,(0,sn.newExternalFieldData)(d)]]),federatedCoords:`${c}.${o}`,inheritedDirectiveNames:a,isInaccessible:i.has(W.INACCESSIBLE),isShareableBySubgraphName:new Map([[this.subgraphName,f]]),kind:Z.Kind.FIELD_DEFINITION,name:o,namedTypeKind:qt.BASE_SCALARS.has(y)?Z.Kind.SCALAR_TYPE_DEFINITION:Z.Kind.NULL,namedTypeName:y,node:(0,nr.getMutableFieldNode)(n,l,this.errors),nullLevelsBySubgraphName:new Map,originalParentTypeName:this.originalParentTypeName,persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),renamedParentTypeName:c,subgraphNames:new Set([this.subgraphName]),type:(0,nr.getMutableTypeNode)(n.type,l,this.errors),directivesByDirectiveName:i,description:(0,Dn.formatDescription)(n.description)};return qt.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,sn.areDefaultValuesCompatible)(i.type,i.defaultValue)&&this.errors.push((0,le.incompatibleInputValueDefaultValueTypeError)((r?W.ARGUMENT:W.INPUT_FIELD)+` "${l}"`,d,(0,Ti.printTypeNode)(i.type),(0,Z.print)(i.defaultValue)));let f=r?`${c}${t?`.${t}`:""}(${l}: ...)`:`${c}.${l}`,y=(0,nr.getTypeNodeNamedTypeName)(i.type),I={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:this.extractDirectives(i,new Map),federatedCoords:f,fieldName:t,includeDefaultValue:!!i.defaultValue,isArgument:r,kind:r?Z.Kind.ARGUMENT:Z.Kind.INPUT_VALUE_DEFINITION,name:l,namedTypeKind:qt.BASE_SCALARS.has(y)?Z.Kind.SCALAR_TYPE_DEFINITION:Z.Kind.NULL,namedTypeName:y,node:(0,nr.getMutableInputValueNode)(i,a,this.errors),originalCoords:d,originalParentTypeName:a,persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),renamedParentTypeName:c,requiredSubgraphNames:new Set((0,sn.isTypeRequired)(i.type)?[this.subgraphName]:[]),subgraphNames:new Set([this.subgraphName]),type:(0,nr.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.directivesByDirectiveName)||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!==Z.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,rr.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,o);return}let l={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:o,fieldDataByName:new Map,implementedInterfaceTypeNames:this.extractImplementedInterfaceTypeNames(t,new Set),isEntity:a.has(W.KEY),isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.INTERFACE_TYPE_DEFINITION,name:r,node:(0,nr.getMutableInterfaceNode)(t.name),persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),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 Z.OperationTypeNode.MUTATION:return W.MUTATION;case Z.OperationTypeNode.SUBSCRIPTION:return W.SUBSCRIPTION;default:return W.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 f;let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(f=i==null?void 0:i.directivesByDirectiveName)!=null?f:new Map),o=this.isTypeNameRootType(r),c=this.getNodeExtensionType(n,a,o);if(this.addInterfaceObjectFieldsByNode(t),i){if(i.kind!==Z.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,rr.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,c),a.has(W.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(i.implementedInterfaceTypeNames,r);return}let l=this.extractImplementedInterfaceTypeNames(t,new Set);a.has(W.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(l,r);let d={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:c,fieldDataByName:new Map,implementedInterfaceTypeNames:l,isEntity:a.has(W.KEY),isInaccessible:a.has(W.INACCESSIBLE),isRootType:o,kind:Z.Kind.OBJECT_TYPE_DEFINITION,name:r,node:(0,nr.getMutableObjectNode)(t.name),persistedDirectivesData:(0,sn.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.ENUM_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,rr.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(W.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,directivesByDirectiveName:a,extensionType:o,enumValueDataByValueName:new Map,isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.ENUM_TYPE_DEFINITION,name:r,node:(0,nr.getMutableEnumNode)(t.name),persistedDirectivesData:(0,sn.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.INPUT_OBJECT_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,rr.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(W.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={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:o,inputValueDataByName:new Map,isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:r,node:(0,nr.getMutableInputObjectNode)(t.name),persistedDirectivesData:(0,sn.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)}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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.SCALAR_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,rr.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,directivesByDirectiveName:a,extensionType:o,kind:Z.Kind.SCALAR_TYPE_DEFINITION,name:r,node:(0,nr.getMutableScalarNode)(t.name),persistedDirectivesData:(0,sn.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,le.duplicateUnionMemberDefinitionError)(r,a));continue}(0,je.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(a),qt.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(this.addConcreteTypeNamesForUnion(t),i){if(i.kind!==Z.Kind.UNION_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,rr.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,directivesByDirectiveName:a,extensionType:o,kind:Z.Kind.UNION_TYPE_DEFINITION,memberByMemberTypeName:this.extractUnionMembers(t,new Map),name:r,node:(0,nr.getMutableUnionNode)(t.name),persistedDirectivesData:(0,sn.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,le.expectedEntityError)(r));return}let i=0;for(let o of t.directives){if(o.name.value!==W.KEY||(i+=1,!o.arguments||o.arguments.length<1))continue;let c,l=!1;for(let v of o.arguments){if(v.name.value===W.RESOLVABLE){v.value.kind===Z.Kind.BOOLEAN&&!v.value.value&&(l=!0);continue}if(v.name.value!==W.FIELDS){c=void 0;break}if(v.value.kind!==Z.Kind.STRING){c=void 0;break}c=v.value.value}if(c===void 0)continue;let{error:d,documentNode:f}=(0,Dn.safeParse)("{"+c+"}");if(d||!f){this.errors.push((0,le.invalidDirectiveError)(W.KEY,r,(0,je.numberToOrdinal)(i),[(0,le.unparsableFieldSetErrorMessage)(c,d)]));continue}let y=(0,ti.getNormalizedFieldSet)(f),I=n.get(y);I?I.isUnresolvable||(I.isUnresolvable=l):n.set(y,{documentNode:f,isUnresolvable:l,normalizedFieldSet:y,rawFieldSet:c})}}getFieldSetParent(t,n,r,i){if(!t)return{fieldSetParentData:n};let a=(0,je.getOrThrowError)(n.fieldDataByName,r,`${i}.fieldDataByFieldName`),o=(0,nr.getTypeNodeNamedTypeName)(a.node.type),c=this.parentDefinitionDataByTypeName.get(o);return c?c.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION&&c.kind!==Z.Kind.OBJECT_TYPE_DEFINITION?{errorString:(0,le.incompatibleTypeWithProvidesErrorMessage)(`${i}.${r}`,o)}:{fieldSetParentData:c}:{errorString:(0,le.unknownNamedTypeErrorMessage)(`${i}.${r}`,o)}}validateConditionalFieldSet(t,n,r,i,a){let{error:o,documentNode:c}=(0,Dn.safeParse)("{"+n+"}");if(o||!c)return{errorMessages:[(0,le.unparsableFieldSetErrorMessage)(n,o)]};let l=this,d=[t],f=(0,ti.getConditionalFieldSetDirectiveName)(i),y=[],I=`${a}.${r}`,v=(0,ti.getInitialFieldCoordsPath)(i,I),P=[r],k=new Set,K=[],Q=-1,se=!0,ie=r,Te=!1;return(0,Z.visit)(c,{Argument:{enter(){return!1}},Field:{enter(de){let Re=d[Q],xe=Re.name;if(Re.kind===Z.Kind.UNION_TYPE_DEFINITION)return K.push((0,le.invalidSelectionOnUnionErrorMessage)(n,v,xe)),Z.BREAK;let tt=de.name.value,ee=`${xe}.${tt}`;if(l.unvalidatedExternalFieldCoords.delete(ee),se)return K.push((0,le.invalidSelectionSetErrorMessage)(n,v,xe,(0,je.kindToNodeType)(Re.kind))),Z.BREAK;v.push(ee),P.push(tt),ie=tt;let Se=Re.fieldDataByName.get(tt);if(!Se)return K.push((0,le.undefinedFieldInFieldSetErrorMessage)(n,xe,tt)),Z.BREAK;if(y[Q].has(tt))return K.push((0,le.duplicateFieldInFieldSetErrorMessage)(n,ee)),Z.BREAK;y[Q].add(tt);let{isDefinedExternal:gt,isUnconditionallyProvided:en}=(0,je.getOrThrowError)(Se.externalFieldDataBySubgraphName,l.subgraphName,`${ee}.externalFieldDataBySubgraphName`),tn=gt&&!en;en||(Te=!0);let bn=(0,nr.getTypeNodeNamedTypeName)(Se.node.type),Qt=l.parentDefinitionDataByTypeName.get(bn);if(qt.BASE_SCALARS.has(bn)||(Qt==null?void 0:Qt.kind)===Z.Kind.SCALAR_TYPE_DEFINITION||(Qt==null?void 0:Qt.kind)===Z.Kind.ENUM_TYPE_DEFINITION){if(k.size<1&&!gt){if(l.isSubgraphVersionTwo){l.errors.push((0,le.nonExternalConditionalFieldError)(I,l.subgraphName,ee,n,f));return}l.warnings.push((0,Qa.nonExternalConditionalFieldWarning)(I,l.subgraphName,ee,n,f));return}if(k.size<1&&en){l.isSubgraphVersionTwo?K.push((0,le.fieldAlreadyProvidedErrorMessage)(ee,l.subgraphName,f)):l.warnings.push((0,Qa.fieldAlreadyProvidedWarning)(ee,f,I,l.subgraphName));return}if(!tn&&!i)return;let mn=(0,je.getValueOrDefault)(l.conditionalFieldDataByCoords,ee,sn.newConditionalFieldData),Ar=(0,Jp.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...P]});i?mn.providedBy.push(Ar):mn.requiredBy.push(Ar);return}if(!Qt)return K.push((0,le.unknownTypeInFieldSetErrorMessage)(n,ee,bn)),Z.BREAK;if(gt&&(i&&(0,je.getValueOrDefault)(l.conditionalFieldDataByCoords,ee,sn.newConditionalFieldData).providedBy.push((0,Jp.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...P]})),k.add(ee)),Qt.kind===Z.Kind.OBJECT_TYPE_DEFINITION||Qt.kind===Z.Kind.INTERFACE_TYPE_DEFINITION||Qt.kind===Z.Kind.UNION_TYPE_DEFINITION){se=!0,d.push(Qt);return}},leave(){k.delete(v.pop()||""),P.pop()}},InlineFragment:{enter(de){let Re=d[Q],xe=Re.name,tt=v.length<1?t.name:v[v.length-1];if(!de.typeCondition)return K.push((0,le.inlineFragmentWithoutTypeConditionErrorMessage)(n,tt)),Z.BREAK;let ee=de.typeCondition.name.value;if(ee===xe){d.push(Re),se=!0;return}if(!(0,Dn.isKindAbstract)(Re.kind))return K.push((0,le.invalidInlineFragmentTypeErrorMessage)(n,v,ee,xe)),Z.BREAK;let Se=l.parentDefinitionDataByTypeName.get(ee);if(!Se)return K.push((0,le.unknownInlineFragmentTypeConditionErrorMessage)(n,v,xe,ee)),Z.BREAK;switch(se=!0,Se.kind){case Z.Kind.INTERFACE_TYPE_DEFINITION:{if(!Se.implementedInterfaceTypeNames.has(xe))break;d.push(Se);return}case Z.Kind.OBJECT_TYPE_DEFINITION:{let gt=l.concreteTypeNamesByAbstractTypeName.get(xe);if(!gt||!gt.has(ee))break;d.push(Se);return}case Z.Kind.UNION_TYPE_DEFINITION:{d.push(Se);return}default:return K.push((0,le.invalidInlineFragmentTypeConditionTypeErrorMessage)(n,v,xe,ee,(0,je.kindToNodeType)(Se.kind))),Z.BREAK}return K.push((0,le.invalidInlineFragmentTypeConditionErrorMessage)(n,v,ee,(0,je.kindToNodeType)(Re.kind),xe)),Z.BREAK}},SelectionSet:{enter(){if(!se){let de=d[Q];if(de.kind===Z.Kind.UNION_TYPE_DEFINITION)return K.push((0,le.unparsableFieldSetSelectionErrorMessage)(n,ie)),Z.BREAK;let Re=de.fieldDataByName.get(ie);if(!Re)return K.push((0,le.undefinedFieldInFieldSetErrorMessage)(n,de.name,ie)),Z.BREAK;let xe=(0,nr.getTypeNodeNamedTypeName)(Re.node.type),tt=l.parentDefinitionDataByTypeName.get(xe),ee=tt?tt.kind:Z.Kind.SCALAR_TYPE_DEFINITION;return K.push((0,le.invalidSelectionSetDefinitionErrorMessage)(n,v,xe,(0,je.kindToNodeType)(ee))),Z.BREAK}if(Q+=1,se=!1,Q<0||Q>=d.length)return K.push((0,le.unparsableFieldSetSelectionErrorMessage)(n,ie)),Z.BREAK;y.push(new Set)},leave(){if(se){let de=d[Q+1];K.push((0,le.invalidSelectionSetErrorMessage)(n,v,de.name,(0,je.kindToNodeType)(de.kind))),se=!1}Q-=1,d.pop(),y.pop()}}}),K.length>0||!Te?{errorMessages:K}:{configuration:{fieldName:r,selectionSet:(0,ti.getNormalizedFieldSet)(c)},errorMessages:K}}validateProvidesOrRequires(t,n,r){let i=[],a=[],o=(0,sn.getParentTypeName)(t);for(let[c,l]of n){let{fieldSetParentData:d,errorString:f}=this.getFieldSetParent(r,t,c,o),y=`${o}.${c}`;if(f){i.push(f);continue}if(!d)continue;let{errorMessages:I,configuration:v}=this.validateConditionalFieldSet(d,l,c,r,o);if(I.length>0){i.push(` On field "${y}": - -`+I.join(W.HYPHEN_JOIN));continue}v&&a.push(v)}if(i.length>0){this.errors.push((0,le.invalidProvidesOrRequiresDirectivesError)((0,ti.getConditionalFieldSetDirectiveName)(r),i));return}if(a.length>0)return a}validateInterfaceImplementations(t){if(t.implementedInterfaceTypeNames.size<1)return;let n=t.directivesByDirectiveName.has(W.INACCESSIBLE),r=new Map,i=new Map,a=!1;for(let o of t.implementedInterfaceTypeNames){let c=this.parentDefinitionDataByTypeName.get(o);if(qt.BASE_SCALARS.has(o)&&this.referencedTypeNames.add(o),!c)continue;if(c.kind!==Z.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[f,y]of c.fieldDataByName){this.unvalidatedExternalFieldCoords.delete(`${t.name}.${f}`);let I=!1,v=t.fieldDataByName.get(f);if(!v){d=!0,l.unimplementedFields.push(f);continue}let P={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,Ti.printTypeNode)(y.node.type),unimplementedArguments:new Set};(0,sn.isTypeValidImplementation)(y.node.type,v.node.type,this.concreteTypeNamesByAbstractTypeName)||(d=!0,I=!0,P.implementedResponseType=(0,Ti.printTypeNode)(v.node.type));let k=new Set;for(let[K,Q]of y.argumentDataByName){k.add(K);let se=v.argumentDataByName.get(K);if(!se){d=!0,I=!0,P.unimplementedArguments.add(K);continue}let ie=(0,Ti.printTypeNode)(se.type),Te=(0,Ti.printTypeNode)(Q.type);Te!==ie&&(d=!0,I=!0,P.invalidImplementedArguments.push({actualType:ie,argumentName:K,expectedType:Te}))}for(let[K,Q]of v.argumentDataByName)k.has(K)||Q.type.kind===Z.Kind.NON_NULL_TYPE&&(d=!0,I=!0,P.invalidAdditionalArguments.add(K));!n&&v.isInaccessible&&!y.isInaccessible&&(d=!0,I=!0,P.isInaccessible=!0),I&&l.invalidFieldImplementations.set(f,P)}d&&r.set(o,l)}i.size>0&&this.errors.push((0,le.invalidImplementedTypeError)(t.name,i)),a&&this.errors.push((0,le.selfImplementationError)(t.name)),r.size>0&&this.errors.push((0,le.invalidInterfaceImplementationError)(t.name,(0,je.kindToNodeType)(t.kind),r))}handleAuthenticatedDirective(t,n){let r=(0,je.getValueOrDefault)(this.authorizationDataByParentTypeName,n,()=>(0,rr.newAuthorizationData)(n));if(t.kind===Z.Kind.FIELD_DEFINITION){let i=(0,je.getValueOrDefault)(r.fieldAuthDataByFieldName,t.name,()=>(0,rr.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,le.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 y;let i=new Set,a=t.node.type,o=0;for(;a;)switch(a.kind){case Z.Kind.LIST_TYPE:{o+=1,a=a.type;break}case Z.Kind.NON_NULL_TYPE:{i.add(o),a=a.type;break}default:{a=null;break}}let c=(y=n.arguments)==null?void 0:y.find(I=>I.name.value===W.LEVELS);if(!c||c.value.kind!==Z.Kind.LIST){r.push(le.semanticNonNullArgumentErrorMessage);return}let l=c.value.values,d=(0,Ti.printTypeNode)(t.type),f=new Set;for(let{value:I}of l){let v=parseInt(I,10);if(Number.isNaN(v)){r.push((0,le.semanticNonNullLevelsNaNIndexErrorMessage)(I));continue}if(v<0||v>o){r.push((0,le.semanticNonNullLevelsIndexOutOfBoundsErrorMessage)({maxIndex:o,typeString:d,value:I}));continue}if(!i.has(v)){f.add(v);continue}r.push((0,le.semanticNonNullLevelsNonNullErrorMessage)({typeString:d,value:I}))}t.nullLevelsBySubgraphName.set(this.subgraphName,f)}extractRequiredScopes({directiveCoords:t,orScopes:n,requiredScopes:r}){if(n.length>qt.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,rr.addScopes)(r,a)}}getKafkaPublishConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.TOPIC:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push((0,le.invalidEventSubjectErrorMessage)(W.TOPIC));continue}(0,ti.validateArgumentTemplateReferences)(c.value.value,n,i),a.push(c.value.value);break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_KAFKA,topics:a,type:W.PUBLISH}}getKafkaSubscribeConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.TOPICS:{if(c.value.kind!==Z.Kind.LIST){i.push((0,le.invalidEventSubjectsErrorMessage)(W.TOPICS));continue}for(let l of c.value.values){if(l.kind!==Z.Kind.STRING||l.value.length<1){i.push((0,le.invalidEventSubjectsItemErrorMessage)(W.TOPICS));break}(0,ti.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_KAFKA,topics:a,type:W.SUBSCRIBE}}getNatsPublishAndRequestConfiguration(t,n,r,i,a){let o=[],c=W.DEFAULT_EDFS_PROVIDER_ID;for(let l of n.arguments||[])switch(l.name.value){case W.SUBJECT:{if(l.value.kind!==Z.Kind.STRING||l.value.value.length<1){a.push((0,le.invalidEventSubjectErrorMessage)(W.SUBJECT));continue}(0,ti.validateArgumentTemplateReferences)(l.value.value,r,a),o.push(l.value.value);break}case W.PROVIDER_ID:{if(l.value.kind!==Z.Kind.STRING||l.value.value.length<1){a.push(le.invalidEventProviderIdErrorMessage);continue}c=l.value.value;break}}if(!(a.length>0))return{fieldName:i,providerId:c,providerType:W.PROVIDER_TYPE_NATS,subjects:o,type:t}}getNatsSubscribeConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID,c=RE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,l="",d="";for(let f of t.arguments||[])switch(f.name.value){case W.SUBJECTS:{if(f.value.kind!==Z.Kind.LIST){i.push((0,le.invalidEventSubjectsErrorMessage)(W.SUBJECTS));continue}for(let y of f.value.values){if(y.kind!==Z.Kind.STRING||y.value.length<1){i.push((0,le.invalidEventSubjectsItemErrorMessage)(W.SUBJECTS));break}(0,ti.validateArgumentTemplateReferences)(y.value,n,i),a.push(y.value)}break}case W.PROVIDER_ID:{if(f.value.kind!==Z.Kind.STRING||f.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=f.value.value;break}case W.STREAM_CONFIGURATION:{if(this.usesEdfsNatsStreamConfiguration=!0,f.value.kind!==Z.Kind.OBJECT||f.value.fields.length<1){i.push(le.invalidNatsStreamInputErrorMessage);continue}let y=!0,I=new Set,v=new Set(AE.STREAM_CONFIGURATION_FIELD_NAMES),P=new Set([W.CONSUMER_NAME,W.STREAM_NAME]),k=new Set,K=new Set;for(let Q of f.value.fields){let se=Q.name.value;if(!AE.STREAM_CONFIGURATION_FIELD_NAMES.has(se)){I.add(se),y=!1;continue}if(v.has(se))v.delete(se);else{k.add(se),y=!1;continue}switch(P.has(se)&&P.delete(se),se){case W.CONSUMER_NAME:if(Q.value.kind!=Z.Kind.STRING||Q.value.value.length<1){K.add(se),y=!1;continue}l=Q.value.value;break;case W.STREAM_NAME:if(Q.value.kind!=Z.Kind.STRING||Q.value.value.length<1){K.add(se),y=!1;continue}d=Q.value.value;break;case W.CONSUMER_INACTIVE_THRESHOLD:if(Q.value.kind!=Z.Kind.INT){i.push((0,le.invalidArgumentValueErrorMessage)((0,Z.print)(Q.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",W.INT_SCALAR)),y=!1;continue}try{c=parseInt(Q.value.value,10)}catch(ie){i.push((0,le.invalidArgumentValueErrorMessage)((0,Z.print)(Q.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",W.INT_SCALAR)),y=!1}break}}(!y||P.size>0)&&i.push((0,le.invalidNatsStreamInputFieldsErrorMessage)([...P],[...k],[...K],[...I]))}}if(!(i.length>0))return c<0?(c=RE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,this.warnings.push((0,Qa.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,`The value has been set to ${RE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}.`))):c>Tle.MAX_INT32&&(c=0,this.warnings.push((0,Qa.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,"The value has been set to 0. This means the consumer will remain indefinitely active until its manual deletion."))),x({fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_NATS,subjects:a,type:W.SUBSCRIBE},l&&d?{streamConfiguration:{consumerInactiveThreshold:c,consumerName:l,streamName:d}}:{})}getRedisPublishConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.CHANNEL:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push((0,le.invalidEventSubjectErrorMessage)(W.CHANNEL));continue}(0,ti.validateArgumentTemplateReferences)(c.value.value,n,i),a.push(c.value.value);break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_REDIS,channels:a,type:W.PUBLISH}}getRedisSubscribeConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.CHANNELS:{if(c.value.kind!==Z.Kind.LIST){i.push((0,le.invalidEventSubjectsErrorMessage)(W.CHANNELS));continue}for(let l of c.value.values){if(l.kind!==Z.Kind.STRING||l.value.length<1){i.push((0,le.invalidEventSubjectsItemErrorMessage)(W.CHANNELS));break}(0,ti.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_REDIS,channels:a,type:W.SUBSCRIBE}}validateSubscriptionFilterDirectiveLocation(t){if(!t.directives)return;let n=this.renamedParentTypeName||this.originalParentTypeName,r=`${n}.${t.name.value}`,i=this.getOperationTypeNodeForRootTypeName(n)===Z.OperationTypeNode.SUBSCRIPTION;for(let a of t.directives)if(a.name.value===W.SUBSCRIPTION_FILTER&&!i){this.errors.push((0,le.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 W.EDFS_KAFKA_PUBLISH:c=this.getKafkaPublishConfiguration(a,n,r,o);break;case W.EDFS_KAFKA_SUBSCRIBE:c=this.getKafkaSubscribeConfiguration(a,n,r,o);break;case W.EDFS_NATS_PUBLISH:{c=this.getNatsPublishAndRequestConfiguration(W.PUBLISH,a,n,r,o);break}case W.EDFS_NATS_REQUEST:{c=this.getNatsPublishAndRequestConfiguration(W.REQUEST,a,n,r,o);break}case W.EDFS_NATS_SUBSCRIBE:{c=this.getNatsSubscribeConfiguration(a,n,r,o);break}case W.EDFS_REDIS_PUBLISH:{c=this.getRedisPublishConfiguration(a,n,r,o);break}case W.EDFS_REDIS_SUBSCRIBE:{c=this.getRedisSubscribeConfiguration(a,n,r,o);break}default:continue}if(o.length>0){this.errors.push((0,le.invalidEventDirectiveError)(a.name.value,i,o));continue}c&&(0,je.getValueOrDefault)(this.eventsConfigurations,this.renamedParentTypeName||this.originalParentTypeName,()=>[]).push(c)}}getValidEventsDirectiveNamesForOperationTypeNode(t){switch(t){case Z.OperationTypeNode.MUTATION:return new Set([W.EDFS_KAFKA_PUBLISH,W.EDFS_NATS_PUBLISH,W.EDFS_NATS_REQUEST,W.EDFS_REDIS_PUBLISH]);case Z.OperationTypeNode.QUERY:return new Set([W.EDFS_NATS_REQUEST]);case Z.OperationTypeNode.SUBSCRIPTION:return new Set([W.EDFS_KAFKA_SUBSCRIBE,W.EDFS_NATS_SUBSCRIBE,W.EDFS_REDIS_SUBSCRIBE])}}getOperationTypeNodeForRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(n)return n;switch(t){case W.MUTATION:return Z.OperationTypeNode.MUTATION;case W.QUERY:return Z.OperationTypeNode.QUERY;case W.SUBSCRIPTION:return Z.OperationTypeNode.SUBSCRIPTION;default:return}}validateEventDrivenRootType(t,n,r,i){let a=this.getOperationTypeNodeForRootTypeName(t.name);if(!a){this.errors.push((0,le.invalidRootTypeError)(t.name));return}let o=this.getValidEventsDirectiveNamesForOperationTypeNode(a);for(let[c,l]of t.fieldDataByName){let d=`${l.originalParentTypeName}.${c}`,f=new Set;for(let K of AE.EVENT_DIRECTIVE_NAMES)l.directivesByDirectiveName.has(K)&&f.add(K);let y=new Set;for(let K of f)o.has(K)||y.add(K);if((f.size<1||y.size>0)&&n.set(d,{definesDirectives:f.size>0,invalidDirectiveNames:[...y]}),a===Z.OperationTypeNode.MUTATION){let K=(0,Ti.printTypeNode)(l.type);K!==W.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT&&i.set(d,K);continue}let I=(0,Ti.printTypeNode)(l.type),v=l.namedTypeName+"!",P=!1,k=this.concreteTypeNamesByAbstractTypeName.get(l.namedTypeName)||new Set([l.namedTypeName]);for(let K of k)if(P||(P=this.entityDataByTypeName.has(K)),P)break;(!P||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(W.EDFS_PUBLISH_RESULT);if(!t)return!0;if(t.kind!==Z.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size!=1)return!1;for(let[n,r]of t.fieldDataByName)if(r.argumentDataByName.size>0||n!==W.SUCCESS||(0,Ti.printTypeNode)(r.type)!==W.NON_NULLABLE_BOOLEAN)return!1;return!0}isNatsStreamConfigurationInputObjectValid(t){if(t.kind!==Z.Kind.INPUT_OBJECT_TYPE_DEFINITION||t.inputValueDataByName.size!=3)return!1;for(let[n,r]of t.inputValueDataByName)switch(n){case W.CONSUMER_INACTIVE_THRESHOLD:{if((0,Ti.printTypeNode)(r.type)!==W.NON_NULLABLE_INT||!r.defaultValue||r.defaultValue.kind!==Z.Kind.INT||r.defaultValue.value!==`${RE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}`)return!1;break}case W.CONSUMER_NAME:case W.STREAM_NAME:{if((0,Ti.printTypeNode)(r.type)!==W.NON_NULLABLE_STRING)return!1;break}default:return!1}return!0}validateEventDrivenSubgraph(t){let n=[],r=new Map,i=new Map,a=new Map,o=new Map,c=new Map,l=new Map,d=new Set,f=new Set;for(let[y,I]of this.parentDefinitionDataByTypeName){if(y===W.EDFS_PUBLISH_RESULT||y===W.EDFS_NATS_STREAM_CONFIGURATION||I.kind!==Z.Kind.OBJECT_TYPE_DEFINITION)continue;if(I.isRootType){this.validateEventDrivenRootType(I,r,i,a);continue}let v=this.keyFieldNamesByParentTypeName.get(y);if(!v){f.add(y);continue}this.validateEventDrivenKeyDefinition(y,o),this.validateEventDrivenObjectFields(I.fieldDataByName,v,c,l)}if(this.isEdfsPublishResultValid()||n.push(le.invalidEdfsPublishResultObjectErrorMessage),this.edfsDirectiveReferences.has(W.EDFS_NATS_SUBSCRIBE)){let y=this.parentDefinitionDataByTypeName.get(W.EDFS_NATS_STREAM_CONFIGURATION);y&&this.usesEdfsNatsStreamConfiguration&&!this.isNatsStreamConfigurationInputObjectValid(y)&&n.push(le.invalidNatsStreamConfigurationDefinitionErrorMessage),this.parentDefinitionDataByTypeName.delete(W.EDFS_NATS_STREAM_CONFIGURATION),t.push(qt.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION)}r.size>0&&n.push((0,le.invalidRootTypeFieldEventsDirectivesErrorMessage)(r)),a.size>0&&n.push((0,le.invalidEventDrivenMutationResponseTypeErrorMessage)(a)),i.size>0&&n.push((0,le.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage)(i)),o.size>0&&n.push((0,le.invalidKeyFieldSetsEventDrivenErrorMessage)(o)),c.size>0&&n.push((0,le.nonExternalKeyFieldNamesEventDrivenErrorMessage)(c)),l.size>0&&n.push((0,le.nonKeyFieldNamesEventDrivenErrorMessage)(l)),d.size>0&&n.push((0,le.nonEntityObjectExtensionsEventDrivenErrorMessage)([...d])),f.size>0&&n.push((0,le.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage)([...f])),n.length>0&&this.errors.push((0,le.invalidEventDrivenGraphError)(n))}validateUnionMembers(t){if(t.memberByMemberTypeName.size<1){this.errors.push((0,le.noDefinedUnionMembersError)(t.name));return}let n=[];for(let r of t.memberByMemberTypeName.keys()){let i=this.parentDefinitionDataByTypeName.get(r);i&&i.kind!==Z.Kind.OBJECT_TYPE_DEFINITION&&n.push(`"${r}", which is type "${(0,je.kindToNodeType)(i.kind)}"`)}n.length>0&&this.errors.push((0,le.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!==Z.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,le.undefinedCompositeOutputTypeError)(t));continue}let i=(0,sn.getParentTypeName)(r),a=(0,je.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Jp.newConfigurationData)(!0,i)),o=(0,ti.validateKeyFieldSets)(this,r,n);o&&(a.keys=o)}}getValidFlattenedDirectiveArray(t,n,r=!1){let i=[];for(let[a,o]of t){if(r&&W.INHERITABLE_DIRECTIVE_NAMES.has(a))continue;let c=this.directiveDefinitionDataByDirectiveName.get(a);if(!c)continue;if(!c.isRepeatable&&o.length>1){let f=(0,je.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);f.has(a)||(f.add(a),this.errors.push((0,le.invalidDirectiveError)(a,n,"1st",[(0,le.invalidRepeatedDirectiveErrorMessage)(a)])));continue}if(a!==W.KEY){i.push(...o);continue}let l=[],d=new Set;for(let f=0;fnew Set).add(k)),(0,je.getValueOrDefault)(a.keyFieldNamesByParentTypeName,v,()=>new Set).add(P);let se=(0,nr.getTypeNodeNamedTypeName)(K.node.type);if(qt.BASE_SCALARS.has(se))return;let ie=a.parentDefinitionDataByTypeName.get(se);if(!ie)return Z.BREAK;if(ie.kind===Z.Kind.OBJECT_TYPE_DEFINITION){f=!0,c.push(ie);return}if((0,Dn.isKindAbstract)(ie.kind))return Z.BREAK}},InlineFragment:{enter(){return Z.BREAK}},SelectionSet:{enter(){if(!f||(d+=1,f=!1,d<0||d>=c.length))return Z.BREAK},leave(){f&&(f=!1),d-=1,c.pop()}}}),!(l.size<1))for(let[y,I]of l)this.warnings.push((0,Qa.externalEntityExtensionKeyFieldWarning)(i.name,y,[...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!==Z.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,le.undefinedCompositeOutputTypeError)(t));continue}let i=(0,sn.getParentTypeName)(r),a=(0,je.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Jp.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.directivesByDirectiveName.has(W.ONE_OF)?n.size>0?(this.errors.push((0,le.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(n),typeName:t.name})),!1):(t.inputValueDataByName.size===1&&this.warnings.push((0,Qa.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 a;(0,$q.upsertDirectiveSchemaAndEntityDefinitions)(this,t),(0,$q.upsertParentsAndChildren)(this,t),this.validateDirectives(this.schemaData,W.SCHEMA);for(let[o,c]of this.parentDefinitionDataByTypeName)this.validateDirectives(c,o);this.invalidORScopesCoords.size>0&&this.errors.push((0,le.orScopesLimitError)(qt.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));let n=[];for(let o of qt.BASE_DIRECTIVE_DEFINITIONS)n.push(o);if(n.push(qt.FIELD_SET_SCALAR_DEFINITION),this.isSubgraphVersionTwo){for(let o of qt.VERSION_TWO_DIRECTIVE_DEFINITIONS)n.push(o),this.directiveDefinitionByDirectiveName.set(o.name.value,o);n.push(qt.SCOPE_SCALAR_DEFINITION)}for(let o of this.edfsDirectiveReferences){let c=qt.EVENT_DRIVEN_DIRECTIVE_DEFINITIONS_BY_DIRECTIVE_NAME.get(o);if(!c){this.errors.push((0,le.invalidEdfsDirectiveName)(o));continue}n.push(c)}this.edfsDirectiveReferences.size>0&&this.referencedDirectiveNames.has(W.SUBSCRIPTION_FILTER)&&(n.push(qt.SUBSCRIPTION_FILTER_DEFINITION),n.push(qt.SUBSCRIPTION_FILTER_CONDITION_DEFINITION),n.push(qt.SUBSCRIPTION_FIELD_CONDITION_DEFINITION),n.push(qt.SUBSCRIPTION_FILTER_VALUE_DEFINITION)),this.referencedDirectiveNames.has(W.CONFIGURE_DESCRIPTION)&&n.push(qt.CONFIGURE_DESCRIPTION_DEFINITION),this.referencedDirectiveNames.has(W.CONFIGURE_CHILD_DESCRIPTIONS)&&n.push(qt.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION),this.referencedDirectiveNames.has(W.LINK)&&(n.push(qt.LINK_DEFINITION),n.push(qt.LINK_IMPORT_DEFINITION),n.push(qt.LINK_PURPOSE_DEFINITION)),this.referencedDirectiveNames.has(W.ONE_OF)&&n.push(qt.ONE_OF_DEFINITION),this.referencedDirectiveNames.has(W.REQUIRE_FETCH_REASONS)&&n.push(qt.REQUIRE_FETCH_REASONS_DEFINITION),this.referencedDirectiveNames.has(W.SEMANTIC_NON_NULL)&&n.push(qt.SEMANTIC_NON_NULL_DEFINITION);for(let o of this.customDirectiveDefinitions.values())n.push(o);this.schemaData.operationTypes.size>0&&n.push(this.getSchemaNodeByData(this.schemaData));for(let o of this.invalidConfigureDescriptionNodeDatas)o.description||this.errors.push((0,le.configureDescriptionNoDescriptionError)((0,je.kindToNodeType)(o.kind),o.name));this.evaluateExternalKeyFields();for(let[o,c]of this.parentDefinitionDataByTypeName)switch(c.kind){case Z.Kind.ENUM_TYPE_DEFINITION:{if(c.enumValueDataByValueName.size<1){this.errors.push((0,le.noDefinedEnumValuesError)(o));break}n.push(this.getEnumNodeByData(c));break}case Z.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(c.inputValueDataByName.size<1){this.errors.push((0,le.noInputValueDefinitionsError)(o));break}let l=new Set;for(let d of c.inputValueDataByName.values()){if((0,sn.isTypeRequired)(d.type)&&l.add(d.name),d.namedTypeKind!==Z.Kind.NULL)continue;let f=this.parentDefinitionDataByTypeName.get(d.namedTypeName);if(f){if(!(0,sn.isInputNodeKind)(f.kind)){this.errors.push((0,le.invalidNamedTypeError)({data:d,namedTypeData:f,nodeType:`${(0,je.kindToNodeType)(c.kind)} field`}));continue}d.namedTypeKind=f.kind}}if(!this.validateOneOfDirective({data:c,requiredFieldNames:l}))break;n.push(this.getInputObjectNodeByData(c));break}case Z.Kind.INTERFACE_TYPE_DEFINITION:case Z.Kind.OBJECT_TYPE_DEFINITION:{let l=this.entityDataByTypeName.has(o),d=this.operationTypeNodeByTypeName.get(o),f=c.kind===Z.Kind.OBJECT_TYPE_DEFINITION;this.isSubgraphVersionTwo&&c.extensionType===$a.ExtensionType.EXTENDS&&(c.extensionType=$a.ExtensionType.NONE),d&&(c.fieldDataByName.delete(W.SERVICE_FIELD),c.fieldDataByName.delete(W.ENTITIES_FIELD));let y=[];for(let[K,Q]of c.fieldDataByName){if(!f&&((a=Q.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&a.isDefinedExternal)&&y.push(K),this.validateArguments(Q,c.kind),Q.namedTypeKind!==Z.Kind.NULL)continue;let se=this.parentDefinitionDataByTypeName.get(Q.namedTypeName);if(se){if(!(0,sn.isOutputNodeKind)(se.kind)){this.errors.push((0,le.invalidNamedTypeError)({data:Q,namedTypeData:se,nodeType:`${(0,je.kindToNodeType)(c.kind)} field`}));continue}Q.namedTypeKind=this.entityInterfaceDataByTypeName.get(se.name)?Z.Kind.INTERFACE_TYPE_DEFINITION:se.kind}}y.length>0&&(this.isSubgraphVersionTwo?this.errors.push((0,le.externalInterfaceFieldsError)(o,y)):this.warnings.push((0,Qa.externalInterfaceFieldsWarning)(this.subgraphName,o,y)));let I=(0,sn.getParentTypeName)(c),v=(0,je.getValueOrDefault)(this.configurationDataByTypeName,I,()=>(0,Jp.newConfigurationData)(l,o)),P=this.entityInterfaceDataByTypeName.get(o);if(P){P.fieldDatas=(0,rr.fieldDatasToSimpleFieldDatas)(c.fieldDataByName.values());let K=this.concreteTypeNamesByAbstractTypeName.get(o);K&&(0,je.addIterableValuesToSet)(K,P.concreteTypeNames),v.isInterfaceObject=P.isInterfaceObject,v.entityInterfaceConcreteTypeNames=P.concreteTypeNames}let k=this.eventsConfigurations.get(I);k&&(v.events=k),this.addFieldNamesToConfigurationData(c.fieldDataByName,v),this.validateInterfaceImplementations(c),n.push(this.getCompositeOutputNodeByData(c)),c.fieldDataByName.size<1&&!(0,ti.isNodeQuery)(o,d)&&this.errors.push((0,le.noFieldDefinitionsError)((0,je.kindToNodeType)(c.kind),o)),f&&c.requireFetchReasonsFieldNames.size>0&&(v.requireFetchReasonsFieldNames=[...c.requireFetchReasonsFieldNames]);break}case Z.Kind.SCALAR_TYPE_DEFINITION:{if(c.extensionType===$a.ExtensionType.REAL){this.errors.push((0,le.noBaseScalarDefinitionError)(o));break}n.push(this.getScalarNodeByData(c));break}case Z.Kind.UNION_TYPE_DEFINITION:{n.push(this.getUnionNodeByData(c)),this.validateUnionMembers(c);break}default:throw(0,le.unexpectedKindFatalError)(o)}this.addValidConditionalFieldSetConfigurations(),this.addValidKeyFieldSetConfigurations();for(let o of Object.values(Z.OperationTypeNode)){let c=this.schemaData.operationTypes.get(o),l=(0,je.getOrThrowError)(Dn.operationTypeNodeToDefaultType,o,W.OPERATION_TO_DEFAULT),d=c?(0,nr.getTypeNodeNamedTypeName)(c.type):l;if(qt.BASE_SCALARS.has(d)&&this.referencedTypeNames.add(d),d!==l&&this.parentDefinitionDataByTypeName.has(l)){this.errors.push((0,le.invalidRootTypeDefinitionError)(o,d,l));continue}let f=this.parentDefinitionDataByTypeName.get(d);if(c){if(!f)continue;this.operationTypeNodeByTypeName.set(d,o)}if(!f)continue;let y=this.configurationDataByTypeName.get(l);y&&(y.isRootNode=!0,y.typeName=l),f.kind!==Z.Kind.OBJECT_TYPE_DEFINITION&&this.errors.push((0,le.operationDefinitionError)(d,o,f.kind))}for(let o of this.referencedTypeNames){let c=this.parentDefinitionDataByTypeName.get(o);if(!c){this.errors.push((0,le.undefinedTypeError)(o));continue}if(c.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION)continue;let l=this.concreteTypeNamesByAbstractTypeName.get(o);(!l||l.size<0)&&this.warnings.push((0,Qa.unimplementedInterfaceOutputTypeWarning)(this.subgraphName,o))}let r=new Map;for(let o of this.directiveDefinitionByDirectiveName.values()){let c=(0,Dn.extractExecutableDirectiveLocations)(o.locations,new Set);c.size<1||this.addPersistedDirectiveDefinitionDataByNode(r,o,c)}this.isSubgraphEventDrivenGraph=this.edfsDirectiveReferences.size>0,this.isSubgraphEventDrivenGraph&&this.validateEventDrivenSubgraph(n);for(let o of this.unvalidatedExternalFieldCoords)this.isSubgraphVersionTwo?this.errors.push((0,le.invalidExternalDirectiveError)(o)):this.warnings.push((0,Qa.invalidExternalFieldWarning)(o,this.subgraphName));if(this.errors.length>0)return{success:!1,errors:this.errors,warnings:this.warnings};let i={kind:Z.Kind.DOCUMENT,definitions:n};return{authorizationDataByParentTypeName:this.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:this.concreteTypeNamesByAbstractTypeName,conditionalFieldDataByCoordinates:this.conditionalFieldDataByCoords,configurationDataByTypeName:this.configurationDataByTypeName,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:r,subgraphAST:i,subgraphString:(0,Z.print)(i),schema:(0,mle.buildASTSchema)(i,{assumeValid:!0,assumeValidSDL:!0}),success:!0,warnings:this.warnings}}};yc.NormalizationFactory=Hp;function hle(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,f=new Set,y=[],I=new Set,v=new Map,P=[],k=[];for(let se of e)se.name&&(0,Nle.recordSubgraphName)(se.name,d,f);let K=new WO.Graph;for(let se=0;se0&&P.push(...de.warnings),!de.success){k.push((0,le.subgraphValidationError)(Te,de.errors));continue}if(!de){k.push((0,le.subgraphValidationError)(Te,[le.subgraphValidationFailureError]));continue}l.set(Te,de.parentDefinitionDataByTypeName);for(let Re of de.authorizationDataByParentTypeName.values())(0,rr.upsertAuthorizationData)(t,Re,I);for(let[Re,xe]of de.fieldCoordsByNamedTypeName)(0,je.addIterableValuesToSet)(xe,(0,je.getValueOrDefault)(v,Re,()=>new Set));for(let[Re,xe]of de.concreteTypeNamesByAbstractTypeName){let tt=n.get(Re);if(!tt){n.set(Re,new Set(xe));continue}(0,je.addIterableValuesToSet)(xe,tt)}for(let[Re,xe]of de.entityDataByTypeName){let tt=xe.keyFieldSetDatasBySubgraphName.get(Te);tt&&(0,rr.upsertEntityData)({entityDataByTypeName:r,keyFieldSetDataByFieldSet:tt,typeName:Re,subgraphName:Te})}if(ie.name&&i.set(Te,{conditionalFieldDataByCoordinates:de.conditionalFieldDataByCoordinates,configurationDataByTypeName:de.configurationDataByTypeName,definitions:de.subgraphAST,entityInterfaces:de.entityInterfaces,isVersionTwo:de.isVersionTwo,keyFieldNamesByParentTypeName:de.keyFieldNamesByParentTypeName,name:Te,operationTypes:de.operationTypes,overriddenFieldNamesByParentTypeName:new Map,parentDefinitionDataByTypeName:de.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:de.persistedDirectiveDefinitionDataByDirectiveName,schema:de.schema,url:ie.url}),!(de.overridesByTargetSubgraphName.size<1))for(let[Re,xe]of de.overridesByTargetSubgraphName){let tt=d.has(Re);for(let[ee,Se]of xe){let gt=de.originalTypeNameByRenamedTypeName.get(ee)||ee;if(!tt)P.push((0,Qa.invalidOverrideTargetSubgraphNameWarning)(Re,gt,[...Se],ie.name));else{let en=(0,je.getValueOrDefault)(a,Re,()=>new Map),tn=(0,je.getValueOrDefault)(en,ee,()=>new Set(Se));(0,je.addIterableValuesToSet)(Se,tn)}for(let en of Se){let tn=`${gt}.${en}`,bn=o.get(tn);if(!bn){o.set(tn,[Te]);continue}bn.push(Te),c.add(tn)}}}}let Q=[];if(I.size>0&&Q.push((0,le.orScopesLimitError)(qt.MAX_OR_SCOPES,[...I])),(y.length>0||f.size>0)&&Q.push((0,le.invalidSubgraphNamesError)([...f],y)),c.size>0){let se=[];for(let ie of c){let Te=(0,je.getOrThrowError)(o,ie,"overrideSourceSubgraphNamesByFieldPath");se.push((0,le.duplicateOverriddenFieldErrorMessage)(ie,Te))}Q.push((0,le.duplicateOverriddenFieldsError)(se))}if(Q.push(...k),Q.length>0)return{errors:Q,success:!1,warnings:P};for(let[se,ie]of a){let Te=(0,je.getOrThrowError)(i,se,"internalSubgraphBySubgraphName");Te.overriddenFieldNamesByParentTypeName=ie;for(let[de,Re]of ie){let xe=Te.configurationDataByTypeName.get(de);xe&&((0,rr.subtractSet)(Re,xe.fieldNames),xe.fieldNames.size<1&&Te.configurationDataByTypeName.delete(de))}}return{authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,fieldCoordsByNamedTypeName:v,internalSubgraphBySubgraphName:i,internalGraph:K,success:!0,warnings:P}}});var FE=w(_c=>{"use strict";m();T();N();Object.defineProperty(_c,"__esModule",{value:!0});_c.DivergentType=void 0;_c.getLeastRestrictiveMergedTypeNode=Ile;_c.getMostRestrictiveMergedTypeNode=gle;_c.renameNamedTypeName=_le;var Ic=Ae(),Jq=oa(),yle=ou(),Yq=Jr(),Hq=Tl(),gc;(function(e){e[e.NONE=0]="NONE",e[e.CURRENT=1]="CURRENT",e[e.OTHER=2]="OTHER"})(gc||(_c.DivergentType=gc={}));function zq(e,t,n,r,i){t=(0,yle.getMutableTypeNode)(t,n,i);let a={kind:e.kind},o=gc.NONE,c=a;for(let l=0;l{"use strict";m();T();N();Object.defineProperty(eD,"__esModule",{value:!0});eD.renameRootTypes=Ole;var vle=Ae(),ZO=Jr(),Sle=FE(),hu=ur(),vc=Hr();function Ole(e,t){let n,r=!1,i;(0,vle.visit)(t.definitions,{FieldDefinition:{enter(a){let o=a.name.value;if(r&&(o===hu.SERVICE_FIELD||o===hu.ENTITIES_FIELD))return n.fieldDataByName.delete(o),!1;let c=n.name,l=(0,vc.getOrThrowError)(n.fieldDataByName,o,`${c}.fieldDataByFieldName`),d=t.operationTypes.get(l.namedTypeName);if(d){let f=(0,vc.getOrThrowError)(ZO.operationTypeNodeToDefaultType,d,hu.OPERATION_TO_DEFAULT);l.namedTypeName!==f&&(0,Sle.renameNamedTypeName)(l,f,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,vc.getOrThrowError)(t.parentDefinitionDataByTypeName,o,hu.PARENT_DEFINITION_DATA)},leave(){n=void 0}},ObjectTypeDefinition:{enter(a){let o=a.name.value,c=t.operationTypes.get(o),l=c?(0,vc.getOrThrowError)(ZO.operationTypeNodeToDefaultType,c,hu.OPERATION_TO_DEFAULT):o;n=(0,vc.getOrThrowError)(t.parentDefinitionDataByTypeName,o,hu.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,vc.getOrThrowError)(ZO.operationTypeNodeToDefaultType,c,hu.OPERATION_TO_DEFAULT):o;n=(0,vc.getOrThrowError)(t.parentDefinitionDataByTypeName,o,hu.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 Wq=w((Jl,zp)=>{"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,f=2,y=4,I=1,v=2,P=1,k=2,K=4,Q=8,se=16,ie=32,Te=64,de=128,Re=256,xe=512,tt=30,ee="...",Se=800,gt=16,en=1,tn=2,bn=3,Qt=1/0,mn=9007199254740991,Ar=17976931348623157e292,Rr=NaN,kn=4294967295,zt=kn-1,An=kn>>>1,ue=[["ary",de],["bind",P],["bindKey",k],["curry",Q],["curryRight",se],["flip",xe],["partial",ie],["partialRight",Te],["rearg",Re]],De="[object Arguments]",ve="[object Array]",Ce="[object AsyncFunction]",_t="[object Boolean]",J="[object Date]",oe="[object DOMException]",qe="[object Error]",Ye="[object Function]",Ut="[object GeneratorFunction]",nt="[object Map]",Rt="[object Number]",Wa="[object Null]",qr="[object Object]",Xa="[object Promise]",Cc="[object Proxy]",ya="[object RegExp]",mr="[object Set]",ni="[object String]",Vt="[object Symbol]",Nr="[object Undefined]",_u="[object WeakMap]",Ia="[object WeakSet]",vu="[object ArrayBuffer]",R="[object DataView]",h="[object Float32Array]",g="[object Float64Array]",C="[object Int8Array]",G="[object Int16Array]",te="[object Int32Array]",pe="[object Uint8Array]",ft="[object Uint8ClampedArray]",Nn="[object Uint16Array]",on="[object Uint32Array]",yn=/\b__p \+= '';/g,nn=/\b(__p \+=) '' \+/g,D1=/(__e\(.*?\)|\b__t\)) \+\n'';/g,tb=/&(?:amp|lt|gt|quot|#39);/g,nb=/[&<>"']/g,b1=RegExp(tb.source),A1=RegExp(nb.source),R1=/<%-([\s\S]+?)%>/g,F1=/<%([\s\S]+?)%>/g,rb=/<%=([\s\S]+?)%>/g,P1=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,w1=/^\w*$/,L1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ch=/[\\^$.*+?()[\]{}|]/g,C1=RegExp(ch.source),lh=/^\s+/,B1=/\s/,U1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,k1=/\{\n\/\* \[wrapped with (.+)\] \*/,M1=/,? & /,x1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,q1=/[()=,{}\[\]\/\s]/,V1=/\\(\\)?/g,j1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ib=/\w*$/,K1=/^[-+]0x[0-9a-f]+$/i,G1=/^0b[01]+$/i,$1=/^\[object .+?Constructor\]$/,Q1=/^0o[0-7]+$/i,Y1=/^(?:0|[1-9]\d*)$/,J1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,If=/($^)/,H1=/['\n\r\u2028\u2029\\]/g,gf="\\ud800-\\udfff",z1="\\u0300-\\u036f",W1="\\ufe20-\\ufe2f",X1="\\u20d0-\\u20ff",ab=z1+W1+X1,sb="\\u2700-\\u27bf",ob="a-z\\xdf-\\xf6\\xf8-\\xff",Z1="\\xac\\xb1\\xd7\\xf7",ej="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",tj="\\u2000-\\u206f",nj=" \\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",ub="A-Z\\xc0-\\xd6\\xd8-\\xde",cb="\\ufe0e\\ufe0f",lb=Z1+ej+tj+nj,dh="['\u2019]",rj="["+gf+"]",db="["+lb+"]",_f="["+ab+"]",pb="\\d+",ij="["+sb+"]",fb="["+ob+"]",mb="[^"+gf+lb+pb+sb+ob+ub+"]",ph="\\ud83c[\\udffb-\\udfff]",aj="(?:"+_f+"|"+ph+")",Nb="[^"+gf+"]",fh="(?:\\ud83c[\\udde6-\\uddff]){2}",mh="[\\ud800-\\udbff][\\udc00-\\udfff]",Bc="["+ub+"]",Tb="\\u200d",Eb="(?:"+fb+"|"+mb+")",sj="(?:"+Bc+"|"+mb+")",hb="(?:"+dh+"(?:d|ll|m|re|s|t|ve))?",yb="(?:"+dh+"(?:D|LL|M|RE|S|T|VE))?",Ib=aj+"?",gb="["+cb+"]?",oj="(?:"+Tb+"(?:"+[Nb,fh,mh].join("|")+")"+gb+Ib+")*",uj="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",cj="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",_b=gb+Ib+oj,lj="(?:"+[ij,fh,mh].join("|")+")"+_b,dj="(?:"+[Nb+_f+"?",_f,fh,mh,rj].join("|")+")",pj=RegExp(dh,"g"),fj=RegExp(_f,"g"),Nh=RegExp(ph+"(?="+ph+")|"+dj+_b,"g"),mj=RegExp([Bc+"?"+fb+"+"+hb+"(?="+[db,Bc,"$"].join("|")+")",sj+"+"+yb+"(?="+[db,Bc+Eb,"$"].join("|")+")",Bc+"?"+Eb+"+"+hb,Bc+"+"+yb,cj,uj,pb,lj].join("|"),"g"),Nj=RegExp("["+Tb+gf+ab+cb+"]"),Tj=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ej=["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"],hj=-1,En={};En[h]=En[g]=En[C]=En[G]=En[te]=En[pe]=En[ft]=En[Nn]=En[on]=!0,En[De]=En[ve]=En[vu]=En[_t]=En[R]=En[J]=En[qe]=En[Ye]=En[nt]=En[Rt]=En[qr]=En[ya]=En[mr]=En[ni]=En[_u]=!1;var Tn={};Tn[De]=Tn[ve]=Tn[vu]=Tn[R]=Tn[_t]=Tn[J]=Tn[h]=Tn[g]=Tn[C]=Tn[G]=Tn[te]=Tn[nt]=Tn[Rt]=Tn[qr]=Tn[ya]=Tn[mr]=Tn[ni]=Tn[Vt]=Tn[pe]=Tn[ft]=Tn[Nn]=Tn[on]=!0,Tn[qe]=Tn[Ye]=Tn[_u]=!1;var yj={\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"},Ij={"&":"&","<":"<",">":">",'"':""","'":"'"},gj={"&":"&","<":"<",">":">",""":'"',"'":"'"},_j={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},vj=parseFloat,Sj=parseInt,vb=typeof global=="object"&&global&&global.Object===Object&&global,Oj=typeof self=="object"&&self&&self.Object===Object&&self,ir=vb||Oj||Function("return this")(),Th=typeof Jl=="object"&&Jl&&!Jl.nodeType&&Jl,Su=Th&&typeof zp=="object"&&zp&&!zp.nodeType&&zp,Sb=Su&&Su.exports===Th,Eh=Sb&&vb.process,Ei=function(){try{var $=Su&&Su.require&&Su.require("util").types;return $||Eh&&Eh.binding&&Eh.binding("util")}catch(ce){}}(),Ob=Ei&&Ei.isArrayBuffer,Db=Ei&&Ei.isDate,bb=Ei&&Ei.isMap,Ab=Ei&&Ei.isRegExp,Rb=Ei&&Ei.isSet,Fb=Ei&&Ei.isTypedArray;function ri($,ce,ne){switch(ne.length){case 0:return $.call(ce);case 1:return $.call(ce,ne[0]);case 2:return $.call(ce,ne[0],ne[1]);case 3:return $.call(ce,ne[0],ne[1],ne[2])}return $.apply(ce,ne)}function Dj($,ce,ne,Be){for(var ot=-1,Yt=$==null?0:$.length;++ot-1}function hh($,ce,ne){for(var Be=-1,ot=$==null?0:$.length;++Be-1;);return ne}function Mb($,ce){for(var ne=$.length;ne--&&Uc(ce,$[ne],0)>-1;);return ne}function Bj($,ce){for(var ne=$.length,Be=0;ne--;)$[ne]===ce&&++Be;return Be}var Uj=_h(yj),kj=_h(Ij);function Mj($){return"\\"+_j[$]}function xj($,ce){return $==null?e:$[ce]}function kc($){return Nj.test($)}function qj($){return Tj.test($)}function Vj($){for(var ce,ne=[];!(ce=$.next()).done;)ne.push(ce.value);return ne}function Dh($){var ce=-1,ne=Array($.size);return $.forEach(function(Be,ot){ne[++ce]=[ot,Be]}),ne}function xb($,ce){return function(ne){return $(ce(ne))}}function qo($,ce){for(var ne=-1,Be=$.length,ot=0,Yt=[];++ne-1}function AK(s,u){var p=this.__data__,E=qf(p,s);return E<0?(++this.size,p.push([s,u])):p[E][1]=u,this}Za.prototype.clear=SK,Za.prototype.delete=OK,Za.prototype.get=DK,Za.prototype.has=bK,Za.prototype.set=AK;function es(s){var u=-1,p=s==null?0:s.length;for(this.clear();++u=u?s:u)),s}function gi(s,u,p,E,S,L){var M,j=u&d,H=u&f,fe=u&y;if(p&&(M=S?p(s,E,S,L):p(s)),M!==e)return M;if(!vn(s))return s;var me=lt(s);if(me){if(M=wG(s),!j)return Vr(s,M)}else{var he=hr(s),be=he==Ye||he==Ut;if(Yo(s))return g0(s,j);if(he==qr||he==De||be&&!S){if(M=H||be?{}:q0(s),!j)return H?gG(s,GK(M,s)):IG(s,Wb(M,s))}else{if(!Tn[he])return S?s:{};M=LG(s,he,j)}}L||(L=new Hi);var Ke=L.get(s);if(Ke)return Ke;L.set(s,M),NA(s)?s.forEach(function(et){M.add(gi(et,u,p,et,s,L))}):fA(s)&&s.forEach(function(et,vt){M.set(vt,gi(et,u,p,vt,s,L))});var Ze=fe?H?Xh:Wh:H?Kr:ar,Et=me?e:Ze(s);return hi(Et||s,function(et,vt){Et&&(vt=et,et=s[vt]),pd(M,vt,gi(et,u,p,vt,s,L))}),M}function $K(s){var u=ar(s);return function(p){return Xb(p,s,u)}}function Xb(s,u,p){var E=p.length;if(s==null)return!E;for(s=dn(s);E--;){var S=p[E],L=u[S],M=s[S];if(M===e&&!(S in s)||!L(M))return!1}return!0}function Zb(s,u,p){if(typeof s!="function")throw new yi(i);return yd(function(){s.apply(e,p)},u)}function fd(s,u,p,E){var S=-1,L=vf,M=!0,j=s.length,H=[],fe=u.length;if(!j)return H;p&&(u=In(u,ii(p))),E?(L=hh,M=!1):u.length>=n&&(L=sd,M=!1,u=new bu(u));e:for(;++SS?0:S+p),E=E===e||E>S?S:Nt(E),E<0&&(E+=S),E=p>E?0:EA(E);p0&&p(j)?u>1?Tr(j,u-1,p,E,S):xo(S,j):E||(S[S.length]=j)}return S}var Lh=b0(),n0=b0(!0);function ga(s,u){return s&&Lh(s,u,ar)}function Ch(s,u){return s&&n0(s,u,ar)}function jf(s,u){return Mo(u,function(p){return as(s[p])})}function Ru(s,u){u=$o(u,s);for(var p=0,E=u.length;s!=null&&pu}function JK(s,u){return s!=null&&rn.call(s,u)}function HK(s,u){return s!=null&&u in dn(s)}function zK(s,u,p){return s>=Er(u,p)&&s=120&&me.length>=120)?new bu(M&&me):e}me=s[0];var he=-1,be=j[0];e:for(;++he-1;)j!==s&&Lf.call(j,H,1),Lf.call(s,H,1);return s}function f0(s,u){for(var p=s?u.length:0,E=p-1;p--;){var S=u[p];if(p==E||S!==L){var L=S;is(S)?Lf.call(s,S,1):Gh(s,S)}}return s}function Vh(s,u){return s+Uf(Yb()*(u-s+1))}function cG(s,u,p,E){for(var S=-1,L=Hn(Bf((u-s)/(p||1)),0),M=ne(L);L--;)M[E?L:++S]=s,s+=p;return M}function jh(s,u){var p="";if(!s||u<1||u>mn)return p;do u%2&&(p+=s),u=Uf(u/2),u&&(s+=s);while(u);return p}function yt(s,u){return ay(K0(s,u,Gr),s+"")}function lG(s){return zb(Yc(s))}function dG(s,u){var p=Yc(s);return Zf(p,Au(u,0,p.length))}function Td(s,u,p,E){if(!vn(s))return s;u=$o(u,s);for(var S=-1,L=u.length,M=L-1,j=s;j!=null&&++SS?0:S+u),p=p>S?S:p,p<0&&(p+=S),S=u>p?0:p-u>>>0,u>>>=0;for(var L=ne(S);++E>>1,M=s[L];M!==null&&!si(M)&&(p?M<=u:M=n){var fe=u?null:OG(s);if(fe)return Of(fe);M=!1,S=sd,H=new bu}else H=u?[]:j;e:for(;++E=E?s:_i(s,u,p)}var I0=nK||function(s){return ir.clearTimeout(s)};function g0(s,u){if(u)return s.slice();var p=s.length,E=jb?jb(p):new s.constructor(p);return s.copy(E),E}function Jh(s){var u=new s.constructor(s.byteLength);return new Pf(u).set(new Pf(s)),u}function TG(s,u){var p=u?Jh(s.buffer):s.buffer;return new s.constructor(p,s.byteOffset,s.byteLength)}function EG(s){var u=new s.constructor(s.source,ib.exec(s));return u.lastIndex=s.lastIndex,u}function hG(s){return dd?dn(dd.call(s)):{}}function _0(s,u){var p=u?Jh(s.buffer):s.buffer;return new s.constructor(p,s.byteOffset,s.length)}function v0(s,u){if(s!==u){var p=s!==e,E=s===null,S=s===s,L=si(s),M=u!==e,j=u===null,H=u===u,fe=si(u);if(!j&&!fe&&!L&&s>u||L&&M&&H&&!j&&!fe||E&&M&&H||!p&&H||!S)return 1;if(!E&&!L&&!fe&&s=j)return H;var fe=p[E];return H*(fe=="desc"?-1:1)}}return s.index-u.index}function S0(s,u,p,E){for(var S=-1,L=s.length,M=p.length,j=-1,H=u.length,fe=Hn(L-M,0),me=ne(H+fe),he=!E;++j1?p[S-1]:e,M=S>2?p[2]:e;for(L=s.length>3&&typeof L=="function"?(S--,L):e,M&&Pr(p[0],p[1],M)&&(L=S<3?e:L,S=1),u=dn(u);++E-1?S[L?u[M]:M]:e}}function F0(s){return rs(function(u){var p=u.length,E=p,S=Ii.prototype.thru;for(s&&u.reverse();E--;){var L=u[E];if(typeof L!="function")throw new yi(i);if(S&&!M&&Wf(L)=="wrapper")var M=new Ii([],!0)}for(E=M?E:p;++E1&&Ft.reverse(),me&&Hj))return!1;var fe=L.get(s),me=L.get(u);if(fe&&me)return fe==u&&me==s;var he=-1,be=!0,Ke=p&v?new bu:e;for(L.set(s,u),L.set(u,s);++he1?"& ":"")+u[E],u=u.join(p>2?", ":" "),s.replace(U1,`{ +`+Ya.LITERAL_SPACE.repeat(t+3)+`... +`+Ya.LITERAL_SPACE.repeat(t+2)+`} +`}function uD({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(Ya.QUOTATION_JOIN)}".`];if(e){let c=!1;for(let[l,d]of e.fieldSetsByTargetSubgraphName)if(a.has(l)){c=!0;for(let f of d)o.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" does not satisfy the key field set "${f}" 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 oV({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(Ya.QUOTATION_JOIN)}".`],c=!1;for(let[l,d]of e.fieldSetsByTargetSubgraphName){if(!a.has(l))continue;let f=e.subgraphNames.filter(I=>I!==l),y=f.length>1;c=!0;for(let I of d)o.push(`The entity ancestor "${e.typeName}" in subgraph${y?"s":""} "${f.join(Ya.QUOTATION_JOIN)}" do${y?"":"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(Ya.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==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 PE(e){let t=e.split(new RegExp("(?<=\\w)\\.")),n="",r="";for(let i=0;i{"use strict";m();T();N();Object.defineProperty(wE,"__esModule",{value:!0});wE.NodeResolutionData=void 0;var Mle=Mi(),_c,dD=class dD{constructor({fieldDataByName:t,isResolved:n=!1,resolvedDescendantNames:r,resolvedFieldNames:i,typeName:a}){eR(this,_c,!1);_(this,"fieldDataByName");_(this,"resolvedDescendantNames");_(this,"resolvedFieldNames");_(this,"typeName");By(this,_c,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,Mle.unexpectedEdgeFatalError)(this.typeName,[t]);this.resolvedFieldNames.add(t)}copy(){let t=new Map;for(let[n,r]of this.fieldDataByName)t.set(n,{isLeaf:r.isLeaf,name:r.name,namedTypeName:r.namedTypeName,subgraphNames:new Set(r.subgraphNames)});return new dD({fieldDataByName:this.fieldDataByName,isResolved:Cy(this,_c),resolvedDescendantNames:this.resolvedDescendantNames,resolvedFieldNames:this.resolvedFieldNames,typeName:this.typeName})}areDescendantsResolved(){return this.fieldDataByName.size===this.resolvedDescendantNames.size}isResolved(){if(Cy(this,_c))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 By(this,_c,!0),!0}};_c=new WeakMap;var lD=dD;wE.NodeResolutionData=lD});var cV=w(CE=>{"use strict";m();T();N();Object.defineProperty(CE,"__esModule",{value:!0});CE.EntityWalker=void 0;var xle=LE(),Ja=Sr(),pD=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,Ja.getValueOrDefault)(this.resDataByNodeName,n,()=>new xle.NodeResolutionData({fieldDataByName:t,typeName:r}));if(!this.relativeOriginPaths||this.relativeOriginPaths.size<1)return(0,Ja.getValueOrDefault)(this.resDataByRelativeOriginPath,i,()=>a.copy());let o;for(let c of this.relativeOriginPaths){let l=(0,Ja.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,Ja.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,Ja.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&&(i=d),this.propagateVisitedField({areDescendantsResolved:l,fieldName:a,data:r,nodeName:t.nodeName,selectionPath:n,visited:c})}return r.isResolved()?this.removeUnresolvablePaths({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,Ja.getValueOrDefault)(this.resDataByNodeName,i,()=>n.copy());if(n.addResolvedFieldName(r),c.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),c.addResolvedFieldName(r)),this.relativeOriginPaths){for(let d of this.relativeOriginPaths){let f=(0,Ja.getValueOrDefault)(this.resDataByRelativeOriginPath,`${d}${a}`,()=>n.copy());f.addResolvedFieldName(r),t&&f.resolvedDescendantNames.add(r)}return}let l=(0,Ja.getValueOrDefault)(this.resDataByRelativeOriginPath,a,()=>n.copy());l.addResolvedFieldName(r),t&&l.resolvedDescendantNames.add(r)}addUnresolvablePaths({selectionPath:t,subgraphName:n}){if(!this.relativeOriginPaths){(0,Ja.getValueOrDefault)(this.subgraphNameByUnresolvablePath,t,()=>n);return}for(let r of this.relativeOriginPaths)(0,Ja.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)}}};CE.EntityWalker=pD});var lV=w(UE=>{"use strict";m();T();N();Object.defineProperty(UE,"__esModule",{value:!0});UE.RootFieldWalker=void 0;var Ha=Sr(),BE=LE(),fD=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,Ha.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.resDataByNodeName.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:((0,Ha.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,Ha.add)(t.visitedIndices,this.index)?(t.node.hasEntitySiblings&&(0,Ha.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,Ha.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new BE.NodeResolutionData(t));return(0,Ha.getValueOrDefault)(this.resDataByPath,n,()=>r.copy()),r}getSharedNodeResolutionData({node:t,selectionPath:n}){let r=(0,Ha.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new BE.NodeResolutionData(t));return(0,Ha.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,Ha.getValueOrDefault)(this.resDataByPath,a,()=>new BE.NodeResolutionData(i));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,Ha.getValueOrDefault)(this.resDataByNodeName,i.nodeName,()=>new BE.NodeResolutionData(i));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}}};UE.RootFieldWalker=fD});var ND=w(ME=>{"use strict";m();T();N();Object.defineProperty(ME,"__esModule",{value:!0});ME.Graph=void 0;var zl=iD(),Wl=cD(),Ti=Sr(),kE=aD(),qle=cV(),Vle=lV(),mD=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",kE.NOT_APPLICABLE);_(this,"resDataByNodeName",new Map);_(this,"resDataByRelativePathByEntity",new Map);_(this,"visitedEntitiesByOriginEntity",new Map);_(this,"walkerIndex",-1)}getRootNode(t){return(0,Ti.getValueOrDefault)(this.rootNodeByTypeName,t,()=>new zl.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 zl.GraphNode(this.subgraphName,t,n);return this.nodeByNodeName.set(r,a),(0,Ti.getValueOrDefault)(this.nodesByTypeName,t,()=>[]).push(a),a}addEdge(t,n,r,i=!1){if(t.isRootNode){let c=new zl.Edge(this.getNextEdgeId(),n,r);return(0,Ti.getValueOrDefault)(t.headToSharedTailEdges,r,()=>[]).push(c),c}let a=t,o=new zl.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 zl.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 zl.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 qle.EntityWalker({encounteredEntityNodeNames:t,index:this.getNextWalkerIndex(),relativeOriginPaths:r,resDataByNodeName:this.resDataByNodeName,resDataByRelativeOriginPath:i,subgraphNameByUnresolvablePath:a,visitedEntities:o}),f=c.getAllAccessibleEntityNodeNames();for(let y of l){if(y.nodeName!==c.nodeName&&!f.has(y.nodeName))continue;let{areDescendantsResolved:I}=d.visitEntityDescendantConcreteNode({node:y,selectionPath:""});if(I)return}for(let[y,I]of d.selectionPathByEntityNodeName)this.visitEntity({encounteredEntityNodeNames:t,entityNodeName:y,relativeOriginPaths:(0,Wl.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 f=r[0].node.nodeName;if(this.resolvedRootFieldNodeNames.has(f))continue;this.resolvedRootFieldNodeNames.add(f)}let a=new Vle.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,Ti.getOrThrowError)(t.fieldDataByName,n,"fieldDataByName"),l=(0,Wl.newRootFieldData)(t.typeName,n,c.subgraphNames);if(!o)return{errors:(0,Wl.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.split(t)[1],c=(0,Ti.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,Ti.getOrThrowError)(n,a,"resDataByRelativeOriginPath"),c=`${t}${a}`,l=(0,Ti.getOrThrowError)(i.resDataByPath,c,"rootFieldWalker.resDataByPath");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(a.size<1)continue;this.consolidateUnresolvableRootWithEntityPaths({pathFromRoot:r,resDataByRelativeOriginPath:o,subgraphNameByUnresolvablePath:a,walker:n}),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,Wl.generateRootResolvabilityErrors)({unresolvablePaths:n.unresolvablePaths,resDataByPath:n.resDataByPath,rootFieldData:t})),!(c.length<1))return{errors:c,success:!1}}return{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,Ti.getValueOrDefault)(this.resDataByRelativePathByEntity,i,()=>new Map);if(this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:i,resDataByRelativeOriginPath:c,subgraphNameByUnresolvablePath:o,visitedEntities:(0,Ti.getValueOrDefault)(this.visitedEntitiesByOriginEntity,i,()=>new Set)}),!(o.size<1))return{errors:this.getEntityResolvabilityErrors({entityNodeName:i,pathFromRoot:(r=(0,Ti.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,Ti.getOrThrowError)(this.resDataByRelativePathByEntity,t,"resDataByRelativePathByEntity"),o=t.split(kE.LITERAL_PERIOD)[1],{fieldSetsByTargetSubgraphName:c}=(0,Ti.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,Wl.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 f=d.split(kE.LITERAL_PERIOD);o!=null||(o=f[1]),c.push(f[0])}let{fieldSetsByTargetSubgraphName:l}=(0,Ti.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,Wl.generateSharedEntityResolvabilityErrors)({entityAncestors:{fieldSetsByTargetSubgraphName:l,subgraphNames:c,typeName:o},pathFromRoot:n,resDataByPath:i,rootFieldData:r,subgraphNameByUnresolvablePath:a})}};ME.Graph=mD});var TD=w(xE=>{"use strict";m();T();N();Object.defineProperty(xE,"__esModule",{value:!0});xE.newFieldSetConditionData=jle;xE.newConfigurationData=Kle;function jle({fieldCoordinatesPath:e,fieldPath:t}){return{fieldCoordinatesPath:e,fieldPath:t}}function Kle(e,t){return{fieldNames:new Set,isRootNode:e,typeName:t}}});var hD=w(vc=>{"use strict";m();T();N();Object.defineProperty(vc,"__esModule",{value:!0});vc.NormalizationFactory=void 0;vc.normalizeSubgraphFromString=Yle;vc.normalizeSubgraph=pV;vc.batchNormalize=Jle;var Z=Ae(),Dn=Hr(),ti=Hp(),qt=Ss(),ir=Jp(),le=Mi(),qE=jp(),Gle=Dv(),Ei=iE(),$le=JO(),Wa=zp(),dV=ZO(),za=Sp(),sn=vl(),rr=du(),ED=ND(),VE=Rv(),W=vr(),Qle=Il(),je=Sr(),Xp=TD();function Yle(e,t=!0){let{error:n,documentNode:r}=(0,Dn.safeParse)(e,t);return n||!r?{errors:[(0,le.subgraphInvalidSyntaxError)(n)],success:!1,warnings:[]}:new Zp(new ED.Graph).normalize(r)}function pV(e,t,n){return new Zp(n||new ED.Graph,t).normalize(e)}var Zp=class{constructor(t,n){_(this,"argumentName","");_(this,"authorizationDataByParentTypeName",new Map);_(this,"concreteTypeNamesByAbstractTypeName",new Map);_(this,"conditionalFieldDataByCoords",new Map);_(this,"configurationDataByTypeName",new Map);_(this,"customDirectiveDefinitions",new Map);_(this,"definedDirectiveNames",new Set);_(this,"directiveDefinitionByDirectiveName",new Map);_(this,"directiveDefinitionDataByDirectiveName",(0,ti.initializeDirectiveDefinitionDatas)());_(this,"doesParentObjectRequireFetchReasons",!1);_(this,"edfsDirectiveReferences",new Set);_(this,"errors",[]);_(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,"isCurrentParentExtension",!1);_(this,"isParentObjectExternal",!1);_(this,"isParentObjectShareable",!1);_(this,"isSubgraphEventDrivenGraph",!1);_(this,"isSubgraphVersionTwo",!1);_(this,"keyFieldSetDatasByTypeName",new Map);_(this,"lastParentNodeKind",Z.Kind.NULL);_(this,"lastChildNodeKind",Z.Kind.NULL);_(this,"parentTypeNamesWithAuthDirectives",new Set);_(this,"keyFieldSetDataByTypeName",new Map);_(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",[]);for(let[r,i]of qt.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME)this.directiveDefinitionByDirectiveName.set(r,i);this.subgraphName=n||W.NOT_APPLICABLE,this.internalGraph=t,this.internalGraph.setSubgraphName(this.subgraphName),this.schemaData={directivesByDirectiveName:new Map,kind:Z.Kind.SCHEMA_DEFINITION,name:W.SCHEMA,operationTypes:new Map}}validateArguments(t,n){for(let r of t.argumentDataByName.values()){let i=(0,rr.getTypeNodeNamedTypeName)(r.type);if(qt.BASE_SCALARS.has(i)){r.namedTypeKind=Z.Kind.SCALAR_TYPE_DEFINITION;continue}let a=this.parentDefinitionDataByTypeName.get(i);if(a){if((0,sn.isInputNodeKind)(a.kind)){r.namedTypeKind=a.kind;continue}this.errors.push((0,le.invalidNamedTypeError)({data:r,namedTypeData:a,nodeType:`${(0,je.kindToNodeType)(n)} field argument`}))}}}isTypeNameRootType(t){return W.ROOT_TYPE_NAMES.has(t)||this.operationTypeNodeByTypeName.has(t)}isArgumentValueValid(t,n){if(n.kind===Z.Kind.NULL)return t.kind!==Z.Kind.NON_NULL_TYPE;switch(t.kind){case Z.Kind.LIST_TYPE:{if(n.kind!==Z.Kind.LIST)return this.isArgumentValueValid((0,rr.getNamedTypeNode)(t.type),n);for(let r of n.values)if(!this.isArgumentValueValid(t.type,r))return!1;return!0}case Z.Kind.NAMED_TYPE:switch(t.name.value){case W.BOOLEAN_SCALAR:return n.kind===Z.Kind.BOOLEAN;case W.FLOAT_SCALAR:return n.kind===Z.Kind.FLOAT||n.kind===Z.Kind.INT;case W.ID_SCALAR:return n.kind===Z.Kind.STRING||n.kind===Z.Kind.INT;case W.INT_SCALAR:return n.kind===Z.Kind.INT;case W.FIELD_SET_SCALAR:case W.SCOPE_SCALAR:case W.STRING_SCALAR:return n.kind===Z.Kind.STRING;case W.LINK_IMPORT:return!0;case W.LINK_PURPOSE:return n.kind!==Z.Kind.ENUM?!1:n.value===W.SECURITY||n.value===W.EXECUTION;case W.SUBSCRIPTION_FIELD_CONDITION:case W.SUBSCRIPTION_FILTER_CONDITION:return n.kind===Z.Kind.OBJECT;default:{let r=this.parentDefinitionDataByTypeName.get(t.name.value);if(!r)return!1;if(r.kind===Z.Kind.SCALAR_TYPE_DEFINITION)return!0;if(r.kind===Z.Kind.ENUM_TYPE_DEFINITION){if(n.kind!==Z.Kind.ENUM)return!1;let i=r.enumValueDataByValueName.get(n.value);return i?!i.directivesByDirectiveName.has(W.INACCESSIBLE):!1}return r.kind!==Z.Kind.INPUT_OBJECT_TYPE_DEFINITION?!1:n.kind===Z.Kind.OBJECT}}default:return this.isArgumentValueValid(t.type,n)}}addInheritedDirectivesToFieldData(t,n){return this.isParentObjectExternal&&!t.has(W.EXTERNAL)&&(t.set(W.EXTERNAL,[(0,je.generateSimpleDirective)(W.EXTERNAL)]),n.add(W.EXTERNAL)),this.doesParentObjectRequireFetchReasons&&!t.has(W.REQUIRE_FETCH_REASONS)&&(t.set(W.REQUIRE_FETCH_REASONS,[(0,je.generateSimpleDirective)(W.REQUIRE_FETCH_REASONS)]),n.add(W.REQUIRE_FETCH_REASONS)),this.isParentObjectShareable&&!t.has(W.SHAREABLE)&&(t.set(W.SHAREABLE,[(0,je.generateSimpleDirective)(W.SHAREABLE)]),n.add(W.SHAREABLE)),t}extractDirectives(t,n){if(!t.directives)return n;for(let r of t.directives){let i=r.name.value;i===W.SHAREABLE?(0,je.getValueOrDefault)(n,i,()=>[r]):(0,je.getValueOrDefault)(n,i,()=>[]).push(r),(0,ir.isNodeKindObject)(t.kind)&&(this.isParentObjectExternal||(this.isParentObjectExternal=i===W.EXTERNAL),this.doesParentObjectRequireFetchReasons||(this.doesParentObjectRequireFetchReasons=i===W.REQUIRE_FETCH_REASONS),this.isParentObjectShareable||(this.isParentObjectShareable=i===W.SHAREABLE))}return n}validateDirective({data:t,definitionData:n,directiveCoords:r,directiveNode:i,errorMessages:a,requiredArgumentNames:o}){let c=i.name.value,l=t.kind===Z.Kind.FIELD_DEFINITION?t.renamedParentTypeName||t.originalParentTypeName:t.name,d=c===W.AUTHENTICATED,f=(0,sn.isFieldData)(t),y=c===W.OVERRIDE,I=c===W.REQUIRES_SCOPES,v=c===W.SEMANTIC_NON_NULL;if(!i.arguments||i.arguments.length<1)return n.requiredArgumentNames.size>0&&a.push((0,le.undefinedRequiredArgumentsErrorMessage)(c,o,[])),d&&this.handleAuthenticatedDirective(t,l),v&&f&&((0,sn.isTypeRequired)(t.type)?a.push((0,le.semanticNonNullLevelsNonNullErrorMessage)({typeString:(0,Ei.printTypeNode)(t.type),value:"0"})):t.nullLevelsBySubgraphName.set(this.subgraphName,new Set([0]))),a;let F=new Set,k=new Set,K=new Set,J=[];for(let Te of i.arguments){let de=Te.name.value;if(F.has(de)){k.add(de);continue}F.add(de);let Re=n.argumentTypeNodeByArgumentName.get(de);if(!Re){K.add(de);continue}if(!this.isArgumentValueValid(Re.typeNode,Te.value)){a.push((0,le.invalidArgumentValueErrorMessage)((0,Z.print)(Te.value),`@${c}`,de,(0,Ei.printTypeNode)(Re.typeNode)));continue}if(y&&f){this.handleOverrideDirective({data:t,directiveCoords:r,errorMessages:a,targetSubgraphName:Te.value.value});continue}if(v&&f){this.handleSemanticNonNullDirective({data:t,directiveNode:i,errorMessages:a});continue}!I||de!==W.SCOPES||this.extractRequiredScopes({directiveCoords:r,orScopes:Te.value.values,requiredScopes:J})}k.size>0&&a.push((0,le.duplicateDirectiveArgumentDefinitionsErrorMessage)([...k])),K.size>0&&a.push((0,le.unexpectedDirectiveArgumentErrorMessage)(c,[...K]));let se=(0,je.getEntriesNotInHashSet)(o,F);if(se.length>0&&a.push((0,le.undefinedRequiredArgumentsErrorMessage)(c,o,se)),a.length>0||!I)return a;let ie=(0,je.getValueOrDefault)(this.authorizationDataByParentTypeName,l,()=>(0,ir.newAuthorizationData)(l));if(t.kind!==Z.Kind.FIELD_DEFINITION)this.parentTypeNamesWithAuthDirectives.add(l),ie.requiredScopes.push(...J);else{let Te=(0,je.getValueOrDefault)(ie.fieldAuthDataByFieldName,t.name,()=>(0,ir.newFieldAuthorizationData)(t.name));Te.inheritedData.requiredScopes.push(...J),Te.originalData.requiredScopes.push(...J)}return a}validateDirectives(t,n){let r=new Set;for(let[i,a]of t.directivesByDirectiveName){let o=this.directiveDefinitionDataByDirectiveName.get(i);if(!o){r.has(i)||(this.errors.push((0,le.undefinedDirectiveError)(i,n)),r.add(i));continue}let c=[],l=(0,Dn.nodeKindToDirectiveLocation)(t.kind);if(o.locations.has(l)||c.push((0,le.invalidDirectiveLocationErrorMessage)(i,l)),a.length>1&&!o.isRepeatable){let f=(0,je.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);f.has(i)||(f.add(i),c.push((0,le.invalidRepeatedDirectiveErrorMessage)(i)))}let d=[...o.requiredArgumentNames];for(let f=0;f0&&this.errors.push((0,le.invalidDirectiveError)(i,n,(0,je.numberToOrdinal)(f+1),y))}}switch(t.kind){case Z.Kind.ENUM_TYPE_DEFINITION:{for(let[i,a]of t.enumValueDataByValueName)this.validateDirectives(a,`${t.name}.${i}`);return}case Z.Kind.FIELD_DEFINITION:{for(let[i,a]of t.argumentDataByName)this.validateDirectives(a,`${t.originalParentTypeName}.${t.name}(${i}: ...)`);return}case Z.Kind.INPUT_OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.inputValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case Z.Kind.INTERFACE_TYPE_DEFINITION:case Z.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?za.ExtensionType.REAL:r||!n.has(W.EXTENDS)?za.ExtensionType.NONE:za.ExtensionType.EXTENDS}setParentDataExtensionType(t,n){switch(t.extensionType){case za.ExtensionType.EXTENDS:case za.ExtensionType.NONE:{if(n===za.ExtensionType.REAL)return;this.errors.push((0,le.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 W.PROPAGATE:{if(o.value.kind!=Z.Kind.BOOLEAN)return;r.propagate=o.value.value;break}case W.DESCRIPTION_OVERRIDE:{if(o.value.kind!=Z.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.directivesByDirectiveName.get(W.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,le.duplicateImplementedInterfaceError)((0,ir.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.directivesByDirectiveName.has(W.KEY)),n.isInaccessible||(n.isInaccessible=n.directivesByDirectiveName.has(W.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,le.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,{argumentDataByArgumentName: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(!W.EXECUTABLE_DIRECTIVE_LOCATIONS.has(o)&&!qE.TYPE_SYSTEM_DIRECTIVE_LOCATIONS.has(o)){n.push((0,le.invalidDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}if(r.has(o)){n.push((0,le.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={argumentTypeNodeByArgumentName: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,sn.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,le.duplicateDirectiveDefinitionArgumentErrorMessage)([...c])),o}addDirectiveDefinitionDataByNode(t){let n=t.name.value;if(this.definedDirectiveNames.has(n))return this.errors.push((0,le.duplicateDirectiveDefinitionError)(n)),!1;if(this.definedDirectiveNames.add(n),this.directiveDefinitionByDirectiveName.set(n,t),qt.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(n))return this.isSubgraphVersionTwo=!0,!1;if(qt.ALL_IN_BUILT_DIRECTIVE_NAMES.has(n))return!1;let r=[],{argumentTypeNodeByArgumentName:i,optionalArgumentNames:a,requiredArgumentNames:o}=this.extractArgumentData(t.arguments,r);return this.directiveDefinitionDataByDirectiveName.set(n,{argumentTypeNodeByArgumentName:i,isRepeatable:t.repeatable,locations:this.extractDirectiveLocations(t,r),name:n,node:t,optionalArgumentNames:a,requiredArgumentNames:o}),r.length>0&&this.errors.push((0,le.invalidDirectiveDefinitionError)(n,r)),!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:f}=(0,sn.isNodeExternalOrShareable)(n,!this.isSubgraphVersionTwo,i),y=(0,rr.getTypeNodeNamedTypeName)(n.type),I={argumentDataByName:r,configureDescriptionDataBySubgraphName:new Map,externalFieldDataBySubgraphName:new Map([[this.subgraphName,(0,sn.newExternalFieldData)(d)]]),federatedCoords:`${c}.${o}`,inheritedDirectiveNames:a,isInaccessible:i.has(W.INACCESSIBLE),isShareableBySubgraphName:new Map([[this.subgraphName,f]]),kind:Z.Kind.FIELD_DEFINITION,name:o,namedTypeKind:qt.BASE_SCALARS.has(y)?Z.Kind.SCALAR_TYPE_DEFINITION:Z.Kind.NULL,namedTypeName:y,node:(0,rr.getMutableFieldNode)(n,l,this.errors),nullLevelsBySubgraphName:new Map,originalParentTypeName:this.originalParentTypeName,persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),renamedParentTypeName:c,subgraphNames:new Set([this.subgraphName]),type:(0,rr.getMutableTypeNode)(n.type,l,this.errors),directivesByDirectiveName:i,description:(0,Dn.formatDescription)(n.description)};return qt.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,sn.areDefaultValuesCompatible)(i.type,i.defaultValue)&&this.errors.push((0,le.incompatibleInputValueDefaultValueTypeError)((r?W.ARGUMENT:W.INPUT_FIELD)+` "${l}"`,d,(0,Ei.printTypeNode)(i.type),(0,Z.print)(i.defaultValue)));let f=r?`${c}${t?`.${t}`:""}(${l}: ...)`:`${c}.${l}`,y=(0,rr.getTypeNodeNamedTypeName)(i.type),I={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:this.extractDirectives(i,new Map),federatedCoords:f,fieldName:t,includeDefaultValue:!!i.defaultValue,isArgument:r,kind:r?Z.Kind.ARGUMENT:Z.Kind.INPUT_VALUE_DEFINITION,name:l,namedTypeKind:qt.BASE_SCALARS.has(y)?Z.Kind.SCALAR_TYPE_DEFINITION:Z.Kind.NULL,namedTypeName:y,node:(0,rr.getMutableInputValueNode)(i,a,this.errors),originalCoords:d,originalParentTypeName:a,persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),renamedParentTypeName:c,requiredSubgraphNames:new Set((0,sn.isTypeRequired)(i.type)?[this.subgraphName]:[]),subgraphNames:new Set([this.subgraphName]),type:(0,rr.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.directivesByDirectiveName)||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!==Z.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,o);return}let l={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:o,fieldDataByName:new Map,implementedInterfaceTypeNames:this.extractImplementedInterfaceTypeNames(t,new Set),isEntity:a.has(W.KEY),isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.INTERFACE_TYPE_DEFINITION,name:r,node:(0,rr.getMutableInterfaceNode)(t.name),persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),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 Z.OperationTypeNode.MUTATION:return W.MUTATION;case Z.OperationTypeNode.SUBSCRIPTION:return W.SUBSCRIPTION;default:return W.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 f;let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(f=i==null?void 0:i.directivesByDirectiveName)!=null?f:new Map),o=this.isTypeNameRootType(r),c=this.getNodeExtensionType(n,a,o);if(this.addInterfaceObjectFieldsByNode(t),i){if(i.kind!==Z.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,c),a.has(W.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(i.implementedInterfaceTypeNames,r);return}let l=this.extractImplementedInterfaceTypeNames(t,new Set);a.has(W.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(l,r);let d={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:c,fieldDataByName:new Map,implementedInterfaceTypeNames:l,isEntity:a.has(W.KEY),isInaccessible:a.has(W.INACCESSIBLE),isRootType:o,kind:Z.Kind.OBJECT_TYPE_DEFINITION,name:r,node:(0,rr.getMutableObjectNode)(t.name),persistedDirectivesData:(0,sn.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.ENUM_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(W.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,directivesByDirectiveName:a,extensionType:o,enumValueDataByValueName:new Map,isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.ENUM_TYPE_DEFINITION,name:r,node:(0,rr.getMutableEnumNode)(t.name),persistedDirectivesData:(0,sn.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.INPUT_OBJECT_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(W.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={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:o,inputValueDataByName:new Map,isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:r,node:(0,rr.getMutableInputObjectNode)(t.name),persistedDirectivesData:(0,sn.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)}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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.SCALAR_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.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,directivesByDirectiveName:a,extensionType:o,kind:Z.Kind.SCALAR_TYPE_DEFINITION,name:r,node:(0,rr.getMutableScalarNode)(t.name),persistedDirectivesData:(0,sn.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,le.duplicateUnionMemberDefinitionError)(r,a));continue}(0,je.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(a),qt.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(this.addConcreteTypeNamesForUnion(t),i){if(i.kind!==Z.Kind.UNION_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.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,directivesByDirectiveName:a,extensionType:o,kind:Z.Kind.UNION_TYPE_DEFINITION,memberByMemberTypeName:this.extractUnionMembers(t,new Map),name:r,node:(0,rr.getMutableUnionNode)(t.name),persistedDirectivesData:(0,sn.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,le.expectedEntityError)(r));return}let i=0;for(let o of t.directives){if(o.name.value!==W.KEY||(i+=1,!o.arguments||o.arguments.length<1))continue;let c,l=!1;for(let v of o.arguments){if(v.name.value===W.RESOLVABLE){v.value.kind===Z.Kind.BOOLEAN&&!v.value.value&&(l=!0);continue}if(v.name.value!==W.FIELDS){c=void 0;break}if(v.value.kind!==Z.Kind.STRING){c=void 0;break}c=v.value.value}if(c===void 0)continue;let{error:d,documentNode:f}=(0,Dn.safeParse)("{"+c+"}");if(d||!f){this.errors.push((0,le.invalidDirectiveError)(W.KEY,r,(0,je.numberToOrdinal)(i),[(0,le.unparsableFieldSetErrorMessage)(c,d)]));continue}let y=(0,ti.getNormalizedFieldSet)(f),I=n.get(y);I?I.isUnresolvable||(I.isUnresolvable=l):n.set(y,{documentNode:f,isUnresolvable:l,normalizedFieldSet:y,rawFieldSet:c})}}getFieldSetParent(t,n,r,i){if(!t)return{fieldSetParentData:n};let a=(0,je.getOrThrowError)(n.fieldDataByName,r,`${i}.fieldDataByFieldName`),o=(0,rr.getTypeNodeNamedTypeName)(a.node.type),c=this.parentDefinitionDataByTypeName.get(o);return c?c.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION&&c.kind!==Z.Kind.OBJECT_TYPE_DEFINITION?{errorString:(0,le.incompatibleTypeWithProvidesErrorMessage)(`${i}.${r}`,o)}:{fieldSetParentData:c}:{errorString:(0,le.unknownNamedTypeErrorMessage)(`${i}.${r}`,o)}}validateConditionalFieldSet(t,n,r,i,a){let{error:o,documentNode:c}=(0,Dn.safeParse)("{"+n+"}");if(o||!c)return{errorMessages:[(0,le.unparsableFieldSetErrorMessage)(n,o)]};let l=this,d=[t],f=(0,ti.getConditionalFieldSetDirectiveName)(i),y=[],I=`${a}.${r}`,v=(0,ti.getInitialFieldCoordsPath)(i,I),F=[r],k=new Set,K=[],J=-1,se=!0,ie=r,Te=!1;return(0,Z.visit)(c,{Argument:{enter(){return!1}},Field:{enter(de){let Re=d[J],xe=Re.name;if(Re.kind===Z.Kind.UNION_TYPE_DEFINITION)return K.push((0,le.invalidSelectionOnUnionErrorMessage)(n,v,xe)),Z.BREAK;let tt=de.name.value,ee=`${xe}.${tt}`;if(l.unvalidatedExternalFieldCoords.delete(ee),se)return K.push((0,le.invalidSelectionSetErrorMessage)(n,v,xe,(0,je.kindToNodeType)(Re.kind))),Z.BREAK;v.push(ee),F.push(tt),ie=tt;let Se=Re.fieldDataByName.get(tt);if(!Se)return K.push((0,le.undefinedFieldInFieldSetErrorMessage)(n,xe,tt)),Z.BREAK;if(y[J].has(tt))return K.push((0,le.duplicateFieldInFieldSetErrorMessage)(n,ee)),Z.BREAK;y[J].add(tt);let{isDefinedExternal:_t,isUnconditionallyProvided:en}=(0,je.getOrThrowError)(Se.externalFieldDataBySubgraphName,l.subgraphName,`${ee}.externalFieldDataBySubgraphName`),tn=_t&&!en;en||(Te=!0);let bn=(0,rr.getTypeNodeNamedTypeName)(Se.node.type),Qt=l.parentDefinitionDataByTypeName.get(bn);if(qt.BASE_SCALARS.has(bn)||(Qt==null?void 0:Qt.kind)===Z.Kind.SCALAR_TYPE_DEFINITION||(Qt==null?void 0:Qt.kind)===Z.Kind.ENUM_TYPE_DEFINITION){if(k.size<1&&!_t){if(l.isSubgraphVersionTwo){l.errors.push((0,le.nonExternalConditionalFieldError)(I,l.subgraphName,ee,n,f));return}l.warnings.push((0,Wa.nonExternalConditionalFieldWarning)(I,l.subgraphName,ee,n,f));return}if(k.size<1&&en){l.isSubgraphVersionTwo?K.push((0,le.fieldAlreadyProvidedErrorMessage)(ee,l.subgraphName,f)):l.warnings.push((0,Wa.fieldAlreadyProvidedWarning)(ee,f,I,l.subgraphName));return}if(!tn&&!i)return;let mn=(0,je.getValueOrDefault)(l.conditionalFieldDataByCoords,ee,sn.newConditionalFieldData),Pr=(0,Xp.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...F]});i?mn.providedBy.push(Pr):mn.requiredBy.push(Pr);return}if(!Qt)return K.push((0,le.unknownTypeInFieldSetErrorMessage)(n,ee,bn)),Z.BREAK;if(_t&&(i&&(0,je.getValueOrDefault)(l.conditionalFieldDataByCoords,ee,sn.newConditionalFieldData).providedBy.push((0,Xp.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...F]})),k.add(ee)),Qt.kind===Z.Kind.OBJECT_TYPE_DEFINITION||Qt.kind===Z.Kind.INTERFACE_TYPE_DEFINITION||Qt.kind===Z.Kind.UNION_TYPE_DEFINITION){se=!0,d.push(Qt);return}},leave(){k.delete(v.pop()||""),F.pop()}},InlineFragment:{enter(de){let Re=d[J],xe=Re.name,tt=v.length<1?t.name:v[v.length-1];if(!de.typeCondition)return K.push((0,le.inlineFragmentWithoutTypeConditionErrorMessage)(n,tt)),Z.BREAK;let ee=de.typeCondition.name.value;if(ee===xe){d.push(Re),se=!0;return}if(!(0,Dn.isKindAbstract)(Re.kind))return K.push((0,le.invalidInlineFragmentTypeErrorMessage)(n,v,ee,xe)),Z.BREAK;let Se=l.parentDefinitionDataByTypeName.get(ee);if(!Se)return K.push((0,le.unknownInlineFragmentTypeConditionErrorMessage)(n,v,xe,ee)),Z.BREAK;switch(se=!0,Se.kind){case Z.Kind.INTERFACE_TYPE_DEFINITION:{if(!Se.implementedInterfaceTypeNames.has(xe))break;d.push(Se);return}case Z.Kind.OBJECT_TYPE_DEFINITION:{let _t=l.concreteTypeNamesByAbstractTypeName.get(xe);if(!_t||!_t.has(ee))break;d.push(Se);return}case Z.Kind.UNION_TYPE_DEFINITION:{d.push(Se);return}default:return K.push((0,le.invalidInlineFragmentTypeConditionTypeErrorMessage)(n,v,xe,ee,(0,je.kindToNodeType)(Se.kind))),Z.BREAK}return K.push((0,le.invalidInlineFragmentTypeConditionErrorMessage)(n,v,ee,(0,je.kindToNodeType)(Re.kind),xe)),Z.BREAK}},SelectionSet:{enter(){if(!se){let de=d[J];if(de.kind===Z.Kind.UNION_TYPE_DEFINITION)return K.push((0,le.unparsableFieldSetSelectionErrorMessage)(n,ie)),Z.BREAK;let Re=de.fieldDataByName.get(ie);if(!Re)return K.push((0,le.undefinedFieldInFieldSetErrorMessage)(n,de.name,ie)),Z.BREAK;let xe=(0,rr.getTypeNodeNamedTypeName)(Re.node.type),tt=l.parentDefinitionDataByTypeName.get(xe),ee=tt?tt.kind:Z.Kind.SCALAR_TYPE_DEFINITION;return K.push((0,le.invalidSelectionSetDefinitionErrorMessage)(n,v,xe,(0,je.kindToNodeType)(ee))),Z.BREAK}if(J+=1,se=!1,J<0||J>=d.length)return K.push((0,le.unparsableFieldSetSelectionErrorMessage)(n,ie)),Z.BREAK;y.push(new Set)},leave(){if(se){let de=d[J+1];K.push((0,le.invalidSelectionSetErrorMessage)(n,v,de.name,(0,je.kindToNodeType)(de.kind))),se=!1}J-=1,d.pop(),y.pop()}}}),K.length>0||!Te?{errorMessages:K}:{configuration:{fieldName:r,selectionSet:(0,ti.getNormalizedFieldSet)(c)},errorMessages:K}}validateProvidesOrRequires(t,n,r){let i=[],a=[],o=(0,sn.getParentTypeName)(t);for(let[c,l]of n){let{fieldSetParentData:d,errorString:f}=this.getFieldSetParent(r,t,c,o),y=`${o}.${c}`;if(f){i.push(f);continue}if(!d)continue;let{errorMessages:I,configuration:v}=this.validateConditionalFieldSet(d,l,c,r,o);if(I.length>0){i.push(` On field "${y}": + -`+I.join(W.HYPHEN_JOIN));continue}v&&a.push(v)}if(i.length>0){this.errors.push((0,le.invalidProvidesOrRequiresDirectivesError)((0,ti.getConditionalFieldSetDirectiveName)(r),i));return}if(a.length>0)return a}validateInterfaceImplementations(t){if(t.implementedInterfaceTypeNames.size<1)return;let n=t.directivesByDirectiveName.has(W.INACCESSIBLE),r=new Map,i=new Map,a=!1;for(let o of t.implementedInterfaceTypeNames){let c=this.parentDefinitionDataByTypeName.get(o);if(qt.BASE_SCALARS.has(o)&&this.referencedTypeNames.add(o),!c)continue;if(c.kind!==Z.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[f,y]of c.fieldDataByName){this.unvalidatedExternalFieldCoords.delete(`${t.name}.${f}`);let I=!1,v=t.fieldDataByName.get(f);if(!v){d=!0,l.unimplementedFields.push(f);continue}let F={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,Ei.printTypeNode)(y.node.type),unimplementedArguments:new Set};(0,sn.isTypeValidImplementation)(y.node.type,v.node.type,this.concreteTypeNamesByAbstractTypeName)||(d=!0,I=!0,F.implementedResponseType=(0,Ei.printTypeNode)(v.node.type));let k=new Set;for(let[K,J]of y.argumentDataByName){k.add(K);let se=v.argumentDataByName.get(K);if(!se){d=!0,I=!0,F.unimplementedArguments.add(K);continue}let ie=(0,Ei.printTypeNode)(se.type),Te=(0,Ei.printTypeNode)(J.type);Te!==ie&&(d=!0,I=!0,F.invalidImplementedArguments.push({actualType:ie,argumentName:K,expectedType:Te}))}for(let[K,J]of v.argumentDataByName)k.has(K)||J.type.kind===Z.Kind.NON_NULL_TYPE&&(d=!0,I=!0,F.invalidAdditionalArguments.add(K));!n&&v.isInaccessible&&!y.isInaccessible&&(d=!0,I=!0,F.isInaccessible=!0),I&&l.invalidFieldImplementations.set(f,F)}d&&r.set(o,l)}i.size>0&&this.errors.push((0,le.invalidImplementedTypeError)(t.name,i)),a&&this.errors.push((0,le.selfImplementationError)(t.name)),r.size>0&&this.errors.push((0,le.invalidInterfaceImplementationError)(t.name,(0,je.kindToNodeType)(t.kind),r))}handleAuthenticatedDirective(t,n){let r=(0,je.getValueOrDefault)(this.authorizationDataByParentTypeName,n,()=>(0,ir.newAuthorizationData)(n));if(t.kind===Z.Kind.FIELD_DEFINITION){let i=(0,je.getValueOrDefault)(r.fieldAuthDataByFieldName,t.name,()=>(0,ir.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,le.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 y;let i=new Set,a=t.node.type,o=0;for(;a;)switch(a.kind){case Z.Kind.LIST_TYPE:{o+=1,a=a.type;break}case Z.Kind.NON_NULL_TYPE:{i.add(o),a=a.type;break}default:{a=null;break}}let c=(y=n.arguments)==null?void 0:y.find(I=>I.name.value===W.LEVELS);if(!c||c.value.kind!==Z.Kind.LIST){r.push(le.semanticNonNullArgumentErrorMessage);return}let l=c.value.values,d=(0,Ei.printTypeNode)(t.type),f=new Set;for(let{value:I}of l){let v=parseInt(I,10);if(Number.isNaN(v)){r.push((0,le.semanticNonNullLevelsNaNIndexErrorMessage)(I));continue}if(v<0||v>o){r.push((0,le.semanticNonNullLevelsIndexOutOfBoundsErrorMessage)({maxIndex:o,typeString:d,value:I}));continue}if(!i.has(v)){f.add(v);continue}r.push((0,le.semanticNonNullLevelsNonNullErrorMessage)({typeString:d,value:I}))}t.nullLevelsBySubgraphName.set(this.subgraphName,f)}extractRequiredScopes({directiveCoords:t,orScopes:n,requiredScopes:r}){if(n.length>qt.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,ir.addScopes)(r,a)}}getKafkaPublishConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.TOPIC:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push((0,le.invalidEventSubjectErrorMessage)(W.TOPIC));continue}(0,ti.validateArgumentTemplateReferences)(c.value.value,n,i),a.push(c.value.value);break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_KAFKA,topics:a,type:W.PUBLISH}}getKafkaSubscribeConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.TOPICS:{if(c.value.kind!==Z.Kind.LIST){i.push((0,le.invalidEventSubjectsErrorMessage)(W.TOPICS));continue}for(let l of c.value.values){if(l.kind!==Z.Kind.STRING||l.value.length<1){i.push((0,le.invalidEventSubjectsItemErrorMessage)(W.TOPICS));break}(0,ti.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_KAFKA,topics:a,type:W.SUBSCRIBE}}getNatsPublishAndRequestConfiguration(t,n,r,i,a){let o=[],c=W.DEFAULT_EDFS_PROVIDER_ID;for(let l of n.arguments||[])switch(l.name.value){case W.SUBJECT:{if(l.value.kind!==Z.Kind.STRING||l.value.value.length<1){a.push((0,le.invalidEventSubjectErrorMessage)(W.SUBJECT));continue}(0,ti.validateArgumentTemplateReferences)(l.value.value,r,a),o.push(l.value.value);break}case W.PROVIDER_ID:{if(l.value.kind!==Z.Kind.STRING||l.value.value.length<1){a.push(le.invalidEventProviderIdErrorMessage);continue}c=l.value.value;break}}if(!(a.length>0))return{fieldName:i,providerId:c,providerType:W.PROVIDER_TYPE_NATS,subjects:o,type:t}}getNatsSubscribeConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID,c=VE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,l="",d="";for(let f of t.arguments||[])switch(f.name.value){case W.SUBJECTS:{if(f.value.kind!==Z.Kind.LIST){i.push((0,le.invalidEventSubjectsErrorMessage)(W.SUBJECTS));continue}for(let y of f.value.values){if(y.kind!==Z.Kind.STRING||y.value.length<1){i.push((0,le.invalidEventSubjectsItemErrorMessage)(W.SUBJECTS));break}(0,ti.validateArgumentTemplateReferences)(y.value,n,i),a.push(y.value)}break}case W.PROVIDER_ID:{if(f.value.kind!==Z.Kind.STRING||f.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=f.value.value;break}case W.STREAM_CONFIGURATION:{if(this.usesEdfsNatsStreamConfiguration=!0,f.value.kind!==Z.Kind.OBJECT||f.value.fields.length<1){i.push(le.invalidNatsStreamInputErrorMessage);continue}let y=!0,I=new Set,v=new Set(qE.STREAM_CONFIGURATION_FIELD_NAMES),F=new Set([W.CONSUMER_NAME,W.STREAM_NAME]),k=new Set,K=new Set;for(let J of f.value.fields){let se=J.name.value;if(!qE.STREAM_CONFIGURATION_FIELD_NAMES.has(se)){I.add(se),y=!1;continue}if(v.has(se))v.delete(se);else{k.add(se),y=!1;continue}switch(F.has(se)&&F.delete(se),se){case W.CONSUMER_NAME:if(J.value.kind!=Z.Kind.STRING||J.value.value.length<1){K.add(se),y=!1;continue}l=J.value.value;break;case W.STREAM_NAME:if(J.value.kind!=Z.Kind.STRING||J.value.value.length<1){K.add(se),y=!1;continue}d=J.value.value;break;case W.CONSUMER_INACTIVE_THRESHOLD:if(J.value.kind!=Z.Kind.INT){i.push((0,le.invalidArgumentValueErrorMessage)((0,Z.print)(J.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",W.INT_SCALAR)),y=!1;continue}try{c=parseInt(J.value.value,10)}catch(ie){i.push((0,le.invalidArgumentValueErrorMessage)((0,Z.print)(J.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",W.INT_SCALAR)),y=!1}break}}(!y||F.size>0)&&i.push((0,le.invalidNatsStreamInputFieldsErrorMessage)([...F],[...k],[...K],[...I]))}}if(!(i.length>0))return c<0?(c=VE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,this.warnings.push((0,Wa.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,`The value has been set to ${VE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}.`))):c>Qle.MAX_INT32&&(c=0,this.warnings.push((0,Wa.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,"The value has been set to 0. This means the consumer will remain indefinitely active until its manual deletion."))),x({fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_NATS,subjects:a,type:W.SUBSCRIBE},l&&d?{streamConfiguration:{consumerInactiveThreshold:c,consumerName:l,streamName:d}}:{})}getRedisPublishConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.CHANNEL:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push((0,le.invalidEventSubjectErrorMessage)(W.CHANNEL));continue}(0,ti.validateArgumentTemplateReferences)(c.value.value,n,i),a.push(c.value.value);break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_REDIS,channels:a,type:W.PUBLISH}}getRedisSubscribeConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.CHANNELS:{if(c.value.kind!==Z.Kind.LIST){i.push((0,le.invalidEventSubjectsErrorMessage)(W.CHANNELS));continue}for(let l of c.value.values){if(l.kind!==Z.Kind.STRING||l.value.length<1){i.push((0,le.invalidEventSubjectsItemErrorMessage)(W.CHANNELS));break}(0,ti.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_REDIS,channels:a,type:W.SUBSCRIBE}}validateSubscriptionFilterDirectiveLocation(t){if(!t.directives)return;let n=this.renamedParentTypeName||this.originalParentTypeName,r=`${n}.${t.name.value}`,i=this.getOperationTypeNodeForRootTypeName(n)===Z.OperationTypeNode.SUBSCRIPTION;for(let a of t.directives)if(a.name.value===W.SUBSCRIPTION_FILTER&&!i){this.errors.push((0,le.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 W.EDFS_KAFKA_PUBLISH:c=this.getKafkaPublishConfiguration(a,n,r,o);break;case W.EDFS_KAFKA_SUBSCRIBE:c=this.getKafkaSubscribeConfiguration(a,n,r,o);break;case W.EDFS_NATS_PUBLISH:{c=this.getNatsPublishAndRequestConfiguration(W.PUBLISH,a,n,r,o);break}case W.EDFS_NATS_REQUEST:{c=this.getNatsPublishAndRequestConfiguration(W.REQUEST,a,n,r,o);break}case W.EDFS_NATS_SUBSCRIBE:{c=this.getNatsSubscribeConfiguration(a,n,r,o);break}case W.EDFS_REDIS_PUBLISH:{c=this.getRedisPublishConfiguration(a,n,r,o);break}case W.EDFS_REDIS_SUBSCRIBE:{c=this.getRedisSubscribeConfiguration(a,n,r,o);break}default:continue}if(o.length>0){this.errors.push((0,le.invalidEventDirectiveError)(a.name.value,i,o));continue}c&&(0,je.getValueOrDefault)(this.eventsConfigurations,this.renamedParentTypeName||this.originalParentTypeName,()=>[]).push(c)}}getValidEventsDirectiveNamesForOperationTypeNode(t){switch(t){case Z.OperationTypeNode.MUTATION:return new Set([W.EDFS_KAFKA_PUBLISH,W.EDFS_NATS_PUBLISH,W.EDFS_NATS_REQUEST,W.EDFS_REDIS_PUBLISH]);case Z.OperationTypeNode.QUERY:return new Set([W.EDFS_NATS_REQUEST]);case Z.OperationTypeNode.SUBSCRIPTION:return new Set([W.EDFS_KAFKA_SUBSCRIBE,W.EDFS_NATS_SUBSCRIBE,W.EDFS_REDIS_SUBSCRIBE])}}getOperationTypeNodeForRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(n)return n;switch(t){case W.MUTATION:return Z.OperationTypeNode.MUTATION;case W.QUERY:return Z.OperationTypeNode.QUERY;case W.SUBSCRIPTION:return Z.OperationTypeNode.SUBSCRIPTION;default:return}}validateEventDrivenRootType(t,n,r,i){let a=this.getOperationTypeNodeForRootTypeName(t.name);if(!a){this.errors.push((0,le.invalidRootTypeError)(t.name));return}let o=this.getValidEventsDirectiveNamesForOperationTypeNode(a);for(let[c,l]of t.fieldDataByName){let d=`${l.originalParentTypeName}.${c}`,f=new Set;for(let K of qE.EVENT_DIRECTIVE_NAMES)l.directivesByDirectiveName.has(K)&&f.add(K);let y=new Set;for(let K of f)o.has(K)||y.add(K);if((f.size<1||y.size>0)&&n.set(d,{definesDirectives:f.size>0,invalidDirectiveNames:[...y]}),a===Z.OperationTypeNode.MUTATION){let K=(0,Ei.printTypeNode)(l.type);K!==W.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT&&i.set(d,K);continue}let I=(0,Ei.printTypeNode)(l.type),v=l.namedTypeName+"!",F=!1,k=this.concreteTypeNamesByAbstractTypeName.get(l.namedTypeName)||new Set([l.namedTypeName]);for(let K of k)if(F||(F=this.entityDataByTypeName.has(K)),F)break;(!F||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(W.EDFS_PUBLISH_RESULT);if(!t)return!0;if(t.kind!==Z.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size!=1)return!1;for(let[n,r]of t.fieldDataByName)if(r.argumentDataByName.size>0||n!==W.SUCCESS||(0,Ei.printTypeNode)(r.type)!==W.NON_NULLABLE_BOOLEAN)return!1;return!0}isNatsStreamConfigurationInputObjectValid(t){if(t.kind!==Z.Kind.INPUT_OBJECT_TYPE_DEFINITION||t.inputValueDataByName.size!=3)return!1;for(let[n,r]of t.inputValueDataByName)switch(n){case W.CONSUMER_INACTIVE_THRESHOLD:{if((0,Ei.printTypeNode)(r.type)!==W.NON_NULLABLE_INT||!r.defaultValue||r.defaultValue.kind!==Z.Kind.INT||r.defaultValue.value!==`${VE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}`)return!1;break}case W.CONSUMER_NAME:case W.STREAM_NAME:{if((0,Ei.printTypeNode)(r.type)!==W.NON_NULLABLE_STRING)return!1;break}default:return!1}return!0}validateEventDrivenSubgraph(t){let n=[],r=new Map,i=new Map,a=new Map,o=new Map,c=new Map,l=new Map,d=new Set,f=new Set;for(let[y,I]of this.parentDefinitionDataByTypeName){if(y===W.EDFS_PUBLISH_RESULT||y===W.EDFS_NATS_STREAM_CONFIGURATION||I.kind!==Z.Kind.OBJECT_TYPE_DEFINITION)continue;if(I.isRootType){this.validateEventDrivenRootType(I,r,i,a);continue}let v=this.keyFieldNamesByParentTypeName.get(y);if(!v){f.add(y);continue}this.validateEventDrivenKeyDefinition(y,o),this.validateEventDrivenObjectFields(I.fieldDataByName,v,c,l)}if(this.isEdfsPublishResultValid()||n.push(le.invalidEdfsPublishResultObjectErrorMessage),this.edfsDirectiveReferences.has(W.EDFS_NATS_SUBSCRIBE)){let y=this.parentDefinitionDataByTypeName.get(W.EDFS_NATS_STREAM_CONFIGURATION);y&&this.usesEdfsNatsStreamConfiguration&&!this.isNatsStreamConfigurationInputObjectValid(y)&&n.push(le.invalidNatsStreamConfigurationDefinitionErrorMessage),this.parentDefinitionDataByTypeName.delete(W.EDFS_NATS_STREAM_CONFIGURATION),t.push(qt.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION)}r.size>0&&n.push((0,le.invalidRootTypeFieldEventsDirectivesErrorMessage)(r)),a.size>0&&n.push((0,le.invalidEventDrivenMutationResponseTypeErrorMessage)(a)),i.size>0&&n.push((0,le.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage)(i)),o.size>0&&n.push((0,le.invalidKeyFieldSetsEventDrivenErrorMessage)(o)),c.size>0&&n.push((0,le.nonExternalKeyFieldNamesEventDrivenErrorMessage)(c)),l.size>0&&n.push((0,le.nonKeyFieldNamesEventDrivenErrorMessage)(l)),d.size>0&&n.push((0,le.nonEntityObjectExtensionsEventDrivenErrorMessage)([...d])),f.size>0&&n.push((0,le.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage)([...f])),n.length>0&&this.errors.push((0,le.invalidEventDrivenGraphError)(n))}validateUnionMembers(t){if(t.memberByMemberTypeName.size<1){this.errors.push((0,le.noDefinedUnionMembersError)(t.name));return}let n=[];for(let r of t.memberByMemberTypeName.keys()){let i=this.parentDefinitionDataByTypeName.get(r);i&&i.kind!==Z.Kind.OBJECT_TYPE_DEFINITION&&n.push(`"${r}", which is type "${(0,je.kindToNodeType)(i.kind)}"`)}n.length>0&&this.errors.push((0,le.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!==Z.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,le.undefinedCompositeOutputTypeError)(t));continue}let i=(0,sn.getParentTypeName)(r),a=(0,je.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Xp.newConfigurationData)(!0,i)),o=(0,ti.validateKeyFieldSets)(this,r,n);o&&(a.keys=o)}}getValidFlattenedDirectiveArray(t,n,r=!1){let i=[];for(let[a,o]of t){if(r&&W.INHERITABLE_DIRECTIVE_NAMES.has(a))continue;let c=this.directiveDefinitionDataByDirectiveName.get(a);if(!c)continue;if(!c.isRepeatable&&o.length>1){let f=(0,je.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);f.has(a)||(f.add(a),this.errors.push((0,le.invalidDirectiveError)(a,n,"1st",[(0,le.invalidRepeatedDirectiveErrorMessage)(a)])));continue}if(a!==W.KEY){i.push(...o);continue}let l=[],d=new Set;for(let f=0;fnew Set).add(k)),(0,je.getValueOrDefault)(a.keyFieldNamesByParentTypeName,v,()=>new Set).add(F);let se=(0,rr.getTypeNodeNamedTypeName)(K.node.type);if(qt.BASE_SCALARS.has(se))return;let ie=a.parentDefinitionDataByTypeName.get(se);if(!ie)return Z.BREAK;if(ie.kind===Z.Kind.OBJECT_TYPE_DEFINITION){f=!0,c.push(ie);return}if((0,Dn.isKindAbstract)(ie.kind))return Z.BREAK}},InlineFragment:{enter(){return Z.BREAK}},SelectionSet:{enter(){if(!f||(d+=1,f=!1,d<0||d>=c.length))return Z.BREAK},leave(){f&&(f=!1),d-=1,c.pop()}}}),!(l.size<1))for(let[y,I]of l)this.warnings.push((0,Wa.externalEntityExtensionKeyFieldWarning)(i.name,y,[...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!==Z.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,le.undefinedCompositeOutputTypeError)(t));continue}let i=(0,sn.getParentTypeName)(r),a=(0,je.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Xp.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.directivesByDirectiveName.has(W.ONE_OF)?n.size>0?(this.errors.push((0,le.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(n),typeName:t.name})),!1):(t.inputValueDataByName.size===1&&this.warnings.push((0,Wa.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 a;(0,dV.upsertDirectiveSchemaAndEntityDefinitions)(this,t),(0,dV.upsertParentsAndChildren)(this,t),this.validateDirectives(this.schemaData,W.SCHEMA);for(let[o,c]of this.parentDefinitionDataByTypeName)this.validateDirectives(c,o);this.invalidORScopesCoords.size>0&&this.errors.push((0,le.orScopesLimitError)(qt.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));let n=[];for(let o of qt.BASE_DIRECTIVE_DEFINITIONS)n.push(o);if(n.push(qt.FIELD_SET_SCALAR_DEFINITION),this.isSubgraphVersionTwo){for(let o of qt.VERSION_TWO_DIRECTIVE_DEFINITIONS)n.push(o),this.directiveDefinitionByDirectiveName.set(o.name.value,o);n.push(qt.SCOPE_SCALAR_DEFINITION)}for(let o of this.edfsDirectiveReferences){let c=qt.EVENT_DRIVEN_DIRECTIVE_DEFINITIONS_BY_DIRECTIVE_NAME.get(o);if(!c){this.errors.push((0,le.invalidEdfsDirectiveName)(o));continue}n.push(c)}this.edfsDirectiveReferences.size>0&&this.referencedDirectiveNames.has(W.SUBSCRIPTION_FILTER)&&(n.push(qt.SUBSCRIPTION_FILTER_DEFINITION),n.push(qt.SUBSCRIPTION_FILTER_CONDITION_DEFINITION),n.push(qt.SUBSCRIPTION_FIELD_CONDITION_DEFINITION),n.push(qt.SUBSCRIPTION_FILTER_VALUE_DEFINITION)),this.referencedDirectiveNames.has(W.CONFIGURE_DESCRIPTION)&&n.push(qt.CONFIGURE_DESCRIPTION_DEFINITION),this.referencedDirectiveNames.has(W.CONFIGURE_CHILD_DESCRIPTIONS)&&n.push(qt.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION),this.referencedDirectiveNames.has(W.LINK)&&(n.push(qt.LINK_DEFINITION),n.push(qt.LINK_IMPORT_DEFINITION),n.push(qt.LINK_PURPOSE_DEFINITION)),this.referencedDirectiveNames.has(W.ONE_OF)&&n.push(qt.ONE_OF_DEFINITION),this.referencedDirectiveNames.has(W.REQUIRE_FETCH_REASONS)&&n.push(qt.REQUIRE_FETCH_REASONS_DEFINITION),this.referencedDirectiveNames.has(W.SEMANTIC_NON_NULL)&&n.push(qt.SEMANTIC_NON_NULL_DEFINITION);for(let o of this.customDirectiveDefinitions.values())n.push(o);this.schemaData.operationTypes.size>0&&n.push(this.getSchemaNodeByData(this.schemaData));for(let o of this.invalidConfigureDescriptionNodeDatas)o.description||this.errors.push((0,le.configureDescriptionNoDescriptionError)((0,je.kindToNodeType)(o.kind),o.name));this.evaluateExternalKeyFields();for(let[o,c]of this.parentDefinitionDataByTypeName)switch(c.kind){case Z.Kind.ENUM_TYPE_DEFINITION:{if(c.enumValueDataByValueName.size<1){this.errors.push((0,le.noDefinedEnumValuesError)(o));break}n.push(this.getEnumNodeByData(c));break}case Z.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(c.inputValueDataByName.size<1){this.errors.push((0,le.noInputValueDefinitionsError)(o));break}let l=new Set;for(let d of c.inputValueDataByName.values()){if((0,sn.isTypeRequired)(d.type)&&l.add(d.name),d.namedTypeKind!==Z.Kind.NULL)continue;let f=this.parentDefinitionDataByTypeName.get(d.namedTypeName);if(f){if(!(0,sn.isInputNodeKind)(f.kind)){this.errors.push((0,le.invalidNamedTypeError)({data:d,namedTypeData:f,nodeType:`${(0,je.kindToNodeType)(c.kind)} field`}));continue}d.namedTypeKind=f.kind}}if(!this.validateOneOfDirective({data:c,requiredFieldNames:l}))break;n.push(this.getInputObjectNodeByData(c));break}case Z.Kind.INTERFACE_TYPE_DEFINITION:case Z.Kind.OBJECT_TYPE_DEFINITION:{let l=this.entityDataByTypeName.has(o),d=this.operationTypeNodeByTypeName.get(o),f=c.kind===Z.Kind.OBJECT_TYPE_DEFINITION;this.isSubgraphVersionTwo&&c.extensionType===za.ExtensionType.EXTENDS&&(c.extensionType=za.ExtensionType.NONE),d&&(c.fieldDataByName.delete(W.SERVICE_FIELD),c.fieldDataByName.delete(W.ENTITIES_FIELD));let y=[];for(let[K,J]of c.fieldDataByName){if(!f&&((a=J.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&a.isDefinedExternal)&&y.push(K),this.validateArguments(J,c.kind),J.namedTypeKind!==Z.Kind.NULL)continue;let se=this.parentDefinitionDataByTypeName.get(J.namedTypeName);if(se){if(!(0,sn.isOutputNodeKind)(se.kind)){this.errors.push((0,le.invalidNamedTypeError)({data:J,namedTypeData:se,nodeType:`${(0,je.kindToNodeType)(c.kind)} field`}));continue}J.namedTypeKind=this.entityInterfaceDataByTypeName.get(se.name)?Z.Kind.INTERFACE_TYPE_DEFINITION:se.kind}}y.length>0&&(this.isSubgraphVersionTwo?this.errors.push((0,le.externalInterfaceFieldsError)(o,y)):this.warnings.push((0,Wa.externalInterfaceFieldsWarning)(this.subgraphName,o,y)));let I=(0,sn.getParentTypeName)(c),v=(0,je.getValueOrDefault)(this.configurationDataByTypeName,I,()=>(0,Xp.newConfigurationData)(l,o)),F=this.entityInterfaceDataByTypeName.get(o);if(F){F.fieldDatas=(0,ir.fieldDatasToSimpleFieldDatas)(c.fieldDataByName.values());let K=this.concreteTypeNamesByAbstractTypeName.get(o);K&&(0,je.addIterableValuesToSet)(K,F.concreteTypeNames),v.isInterfaceObject=F.isInterfaceObject,v.entityInterfaceConcreteTypeNames=F.concreteTypeNames}let k=this.eventsConfigurations.get(I);k&&(v.events=k),this.addFieldNamesToConfigurationData(c.fieldDataByName,v),this.validateInterfaceImplementations(c),n.push(this.getCompositeOutputNodeByData(c)),c.fieldDataByName.size<1&&!(0,ti.isNodeQuery)(o,d)&&this.errors.push((0,le.noFieldDefinitionsError)((0,je.kindToNodeType)(c.kind),o)),f&&c.requireFetchReasonsFieldNames.size>0&&(v.requireFetchReasonsFieldNames=[...c.requireFetchReasonsFieldNames]);break}case Z.Kind.SCALAR_TYPE_DEFINITION:{if(c.extensionType===za.ExtensionType.REAL){this.errors.push((0,le.noBaseScalarDefinitionError)(o));break}n.push(this.getScalarNodeByData(c));break}case Z.Kind.UNION_TYPE_DEFINITION:{n.push(this.getUnionNodeByData(c)),this.validateUnionMembers(c);break}default:throw(0,le.unexpectedKindFatalError)(o)}this.addValidConditionalFieldSetConfigurations(),this.addValidKeyFieldSetConfigurations();for(let o of Object.values(Z.OperationTypeNode)){let c=this.schemaData.operationTypes.get(o),l=(0,je.getOrThrowError)(Dn.operationTypeNodeToDefaultType,o,W.OPERATION_TO_DEFAULT),d=c?(0,rr.getTypeNodeNamedTypeName)(c.type):l;if(qt.BASE_SCALARS.has(d)&&this.referencedTypeNames.add(d),d!==l&&this.parentDefinitionDataByTypeName.has(l)){this.errors.push((0,le.invalidRootTypeDefinitionError)(o,d,l));continue}let f=this.parentDefinitionDataByTypeName.get(d);if(c){if(!f)continue;this.operationTypeNodeByTypeName.set(d,o)}if(!f)continue;let y=this.configurationDataByTypeName.get(l);y&&(y.isRootNode=!0,y.typeName=l),f.kind!==Z.Kind.OBJECT_TYPE_DEFINITION&&this.errors.push((0,le.operationDefinitionError)(d,o,f.kind))}for(let o of this.referencedTypeNames){let c=this.parentDefinitionDataByTypeName.get(o);if(!c){this.errors.push((0,le.undefinedTypeError)(o));continue}if(c.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION)continue;let l=this.concreteTypeNamesByAbstractTypeName.get(o);(!l||l.size<1)&&this.warnings.push((0,Wa.unimplementedInterfaceOutputTypeWarning)(this.subgraphName,o))}let r=new Map;for(let o of this.directiveDefinitionByDirectiveName.values()){let c=(0,Dn.extractExecutableDirectiveLocations)(o.locations,new Set);c.size<1||this.addPersistedDirectiveDefinitionDataByNode(r,o,c)}this.isSubgraphEventDrivenGraph=this.edfsDirectiveReferences.size>0,this.isSubgraphEventDrivenGraph&&this.validateEventDrivenSubgraph(n);for(let o of this.unvalidatedExternalFieldCoords)this.isSubgraphVersionTwo?this.errors.push((0,le.invalidExternalDirectiveError)(o)):this.warnings.push((0,Wa.invalidExternalFieldWarning)(o,this.subgraphName));if(this.errors.length>0)return{success:!1,errors:this.errors,warnings:this.warnings};let i={kind:Z.Kind.DOCUMENT,definitions:n};return{authorizationDataByParentTypeName:this.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:this.concreteTypeNamesByAbstractTypeName,conditionalFieldDataByCoordinates:this.conditionalFieldDataByCoords,configurationDataByTypeName:this.configurationDataByTypeName,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:r,subgraphAST:i,subgraphString:(0,Z.print)(i),schema:(0,Gle.buildASTSchema)(i,{assumeValid:!0,assumeValidSDL:!0}),success:!0,warnings:this.warnings}}};vc.NormalizationFactory=Zp;function Jle(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,f=new Set,y=[],I=new Set,v=new Map,F=[],k=[];for(let se of e)se.name&&(0,$le.recordSubgraphName)(se.name,d,f);let K=new ED.Graph;for(let se=0;se0&&F.push(...de.warnings),!de.success){k.push((0,le.subgraphValidationError)(Te,de.errors));continue}if(!de){k.push((0,le.subgraphValidationError)(Te,[le.subgraphValidationFailureError]));continue}l.set(Te,de.parentDefinitionDataByTypeName);for(let Re of de.authorizationDataByParentTypeName.values())(0,ir.upsertAuthorizationData)(t,Re,I);for(let[Re,xe]of de.fieldCoordsByNamedTypeName)(0,je.addIterableValuesToSet)(xe,(0,je.getValueOrDefault)(v,Re,()=>new Set));for(let[Re,xe]of de.concreteTypeNamesByAbstractTypeName){let tt=n.get(Re);if(!tt){n.set(Re,new Set(xe));continue}(0,je.addIterableValuesToSet)(xe,tt)}for(let[Re,xe]of de.entityDataByTypeName){let tt=xe.keyFieldSetDatasBySubgraphName.get(Te);tt&&(0,ir.upsertEntityData)({entityDataByTypeName:r,keyFieldSetDataByFieldSet:tt,typeName:Re,subgraphName:Te})}if(ie.name&&i.set(Te,{conditionalFieldDataByCoordinates:de.conditionalFieldDataByCoordinates,configurationDataByTypeName:de.configurationDataByTypeName,definitions:de.subgraphAST,entityInterfaces:de.entityInterfaces,isVersionTwo:de.isVersionTwo,keyFieldNamesByParentTypeName:de.keyFieldNamesByParentTypeName,name:Te,operationTypes:de.operationTypes,overriddenFieldNamesByParentTypeName:new Map,parentDefinitionDataByTypeName:de.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:de.persistedDirectiveDefinitionDataByDirectiveName,schema:de.schema,url:ie.url}),!(de.overridesByTargetSubgraphName.size<1))for(let[Re,xe]of de.overridesByTargetSubgraphName){let tt=d.has(Re);for(let[ee,Se]of xe){let _t=de.originalTypeNameByRenamedTypeName.get(ee)||ee;if(!tt)F.push((0,Wa.invalidOverrideTargetSubgraphNameWarning)(Re,_t,[...Se],ie.name));else{let en=(0,je.getValueOrDefault)(a,Re,()=>new Map),tn=(0,je.getValueOrDefault)(en,ee,()=>new Set(Se));(0,je.addIterableValuesToSet)(Se,tn)}for(let en of Se){let tn=`${_t}.${en}`,bn=o.get(tn);if(!bn){o.set(tn,[Te]);continue}bn.push(Te),c.add(tn)}}}}let J=[];if(I.size>0&&J.push((0,le.orScopesLimitError)(qt.MAX_OR_SCOPES,[...I])),(y.length>0||f.size>0)&&J.push((0,le.invalidSubgraphNamesError)([...f],y)),c.size>0){let se=[];for(let ie of c){let Te=(0,je.getOrThrowError)(o,ie,"overrideSourceSubgraphNamesByFieldPath");se.push((0,le.duplicateOverriddenFieldErrorMessage)(ie,Te))}J.push((0,le.duplicateOverriddenFieldsError)(se))}if(J.push(...k),J.length>0)return{errors:J,success:!1,warnings:F};for(let[se,ie]of a){let Te=(0,je.getOrThrowError)(i,se,"internalSubgraphBySubgraphName");Te.overriddenFieldNamesByParentTypeName=ie;for(let[de,Re]of ie){let xe=Te.configurationDataByTypeName.get(de);xe&&((0,ir.subtractSet)(Re,xe.fieldNames),xe.fieldNames.size<1&&Te.configurationDataByTypeName.delete(de))}}return{authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,fieldCoordsByNamedTypeName:v,internalSubgraphBySubgraphName:i,internalGraph:K,success:!0,warnings:F}}});var jE=w(Dc=>{"use strict";m();T();N();Object.defineProperty(Dc,"__esModule",{value:!0});Dc.DivergentType=void 0;Dc.getLeastRestrictiveMergedTypeNode=zle;Dc.getMostRestrictiveMergedTypeNode=Wle;Dc.renameNamedTypeName=Xle;var Sc=Ae(),mV=Mi(),Hle=du(),fV=Hr(),NV=Il(),Oc;(function(e){e[e.NONE=0]="NONE",e[e.CURRENT=1]="CURRENT",e[e.OTHER=2]="OTHER"})(Oc||(Dc.DivergentType=Oc={}));function TV(e,t,n,r,i){t=(0,Hle.getMutableTypeNode)(t,n,i);let a={kind:e.kind},o=Oc.NONE,c=a;for(let l=0;l{"use strict";m();T();N();Object.defineProperty(ID,"__esModule",{value:!0});ID.renameRootTypes=tde;var Zle=Ae(),yD=Hr(),ede=jE(),_u=vr(),bc=Sr();function tde(e,t){let n,r=!1,i;(0,Zle.visit)(t.definitions,{FieldDefinition:{enter(a){let o=a.name.value;if(r&&(o===_u.SERVICE_FIELD||o===_u.ENTITIES_FIELD))return n.fieldDataByName.delete(o),!1;let c=n.name,l=(0,bc.getOrThrowError)(n.fieldDataByName,o,`${c}.fieldDataByFieldName`),d=t.operationTypes.get(l.namedTypeName);if(d){let f=(0,bc.getOrThrowError)(yD.operationTypeNodeToDefaultType,d,_u.OPERATION_TO_DEFAULT);l.namedTypeName!==f&&(0,ede.renameNamedTypeName)(l,f,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,bc.getOrThrowError)(t.parentDefinitionDataByTypeName,o,_u.PARENT_DEFINITION_DATA)},leave(){n=void 0}},ObjectTypeDefinition:{enter(a){let o=a.name.value,c=t.operationTypes.get(o),l=c?(0,bc.getOrThrowError)(yD.operationTypeNodeToDefaultType,c,_u.OPERATION_TO_DEFAULT):o;n=(0,bc.getOrThrowError)(t.parentDefinitionDataByTypeName,o,_u.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,bc.getOrThrowError)(yD.operationTypeNodeToDefaultType,c,_u.OPERATION_TO_DEFAULT):o;n=(0,bc.getOrThrowError)(t.parentDefinitionDataByTypeName,o,_u.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 EV=w((Xl,ef)=>{"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,f=2,y=4,I=1,v=2,F=1,k=2,K=4,J=8,se=16,ie=32,Te=64,de=128,Re=256,xe=512,tt=30,ee="...",Se=800,_t=16,en=1,tn=2,bn=3,Qt=1/0,mn=9007199254740991,Pr=17976931348623157e292,Fr=NaN,kn=4294967295,zt=kn-1,An=kn>>>1,ue=[["ary",de],["bind",F],["bindKey",k],["curry",J],["curryRight",se],["flip",xe],["partial",ie],["partialRight",Te],["rearg",Re]],De="[object Arguments]",ve="[object Array]",Ce="[object AsyncFunction]",vt="[object Boolean]",Y="[object Date]",oe="[object DOMException]",qe="[object Error]",Ye="[object Function]",Ut="[object GeneratorFunction]",nt="[object Map]",Rt="[object Number]",ns="[object Null]",Vr="[object Object]",rs="[object Promise]",Mc="[object Proxy]",ga="[object RegExp]",mr="[object Set]",ni="[object String]",Vt="[object Symbol]",Nr="[object Undefined]",Du="[object WeakMap]",_a="[object WeakSet]",bu="[object ArrayBuffer]",R="[object DataView]",h="[object Float32Array]",g="[object Float64Array]",C="[object Int8Array]",G="[object Int16Array]",te="[object Int32Array]",pe="[object Uint8Array]",ft="[object Uint8ClampedArray]",Nn="[object Uint16Array]",on="[object Uint32Array]",yn=/\b__p \+= '';/g,nn=/\b(__p \+=) '' \+/g,z1=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gb=/&(?:amp|lt|gt|quot|#39);/g,_b=/[&<>"']/g,W1=RegExp(gb.source),X1=RegExp(_b.source),Z1=/<%-([\s\S]+?)%>/g,ej=/<%([\s\S]+?)%>/g,vb=/<%=([\s\S]+?)%>/g,tj=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nj=/^\w*$/,rj=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gh=/[\\^$.*+?()[\]{}|]/g,ij=RegExp(gh.source),_h=/^\s+/,aj=/\s/,sj=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oj=/\{\n\/\* \[wrapped with (.+)\] \*/,uj=/,? & /,cj=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lj=/[()=,{}\[\]\/\s]/,dj=/\\(\\)?/g,pj=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Sb=/\w*$/,fj=/^[-+]0x[0-9a-f]+$/i,mj=/^0b[01]+$/i,Nj=/^\[object .+?Constructor\]$/,Tj=/^0o[0-7]+$/i,Ej=/^(?:0|[1-9]\d*)$/,hj=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Sf=/($^)/,yj=/['\n\r\u2028\u2029\\]/g,Of="\\ud800-\\udfff",Ij="\\u0300-\\u036f",gj="\\ufe20-\\ufe2f",_j="\\u20d0-\\u20ff",Ob=Ij+gj+_j,Db="\\u2700-\\u27bf",bb="a-z\\xdf-\\xf6\\xf8-\\xff",vj="\\xac\\xb1\\xd7\\xf7",Sj="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Oj="\\u2000-\\u206f",Dj=" \\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",Ab="A-Z\\xc0-\\xd6\\xd8-\\xde",Rb="\\ufe0e\\ufe0f",Pb=vj+Sj+Oj+Dj,vh="['\u2019]",bj="["+Of+"]",Fb="["+Pb+"]",Df="["+Ob+"]",wb="\\d+",Aj="["+Db+"]",Lb="["+bb+"]",Cb="[^"+Of+Pb+wb+Db+bb+Ab+"]",Sh="\\ud83c[\\udffb-\\udfff]",Rj="(?:"+Df+"|"+Sh+")",Bb="[^"+Of+"]",Oh="(?:\\ud83c[\\udde6-\\uddff]){2}",Dh="[\\ud800-\\udbff][\\udc00-\\udfff]",xc="["+Ab+"]",Ub="\\u200d",kb="(?:"+Lb+"|"+Cb+")",Pj="(?:"+xc+"|"+Cb+")",Mb="(?:"+vh+"(?:d|ll|m|re|s|t|ve))?",xb="(?:"+vh+"(?:D|LL|M|RE|S|T|VE))?",qb=Rj+"?",Vb="["+Rb+"]?",Fj="(?:"+Ub+"(?:"+[Bb,Oh,Dh].join("|")+")"+Vb+qb+")*",wj="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Lj="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",jb=Vb+qb+Fj,Cj="(?:"+[Aj,Oh,Dh].join("|")+")"+jb,Bj="(?:"+[Bb+Df+"?",Df,Oh,Dh,bj].join("|")+")",Uj=RegExp(vh,"g"),kj=RegExp(Df,"g"),bh=RegExp(Sh+"(?="+Sh+")|"+Bj+jb,"g"),Mj=RegExp([xc+"?"+Lb+"+"+Mb+"(?="+[Fb,xc,"$"].join("|")+")",Pj+"+"+xb+"(?="+[Fb,xc+kb,"$"].join("|")+")",xc+"?"+kb+"+"+Mb,xc+"+"+xb,Lj,wj,wb,Cj].join("|"),"g"),xj=RegExp("["+Ub+Of+Ob+Rb+"]"),qj=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Vj=["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"],jj=-1,En={};En[h]=En[g]=En[C]=En[G]=En[te]=En[pe]=En[ft]=En[Nn]=En[on]=!0,En[De]=En[ve]=En[bu]=En[vt]=En[R]=En[Y]=En[qe]=En[Ye]=En[nt]=En[Rt]=En[Vr]=En[ga]=En[mr]=En[ni]=En[Du]=!1;var Tn={};Tn[De]=Tn[ve]=Tn[bu]=Tn[R]=Tn[vt]=Tn[Y]=Tn[h]=Tn[g]=Tn[C]=Tn[G]=Tn[te]=Tn[nt]=Tn[Rt]=Tn[Vr]=Tn[ga]=Tn[mr]=Tn[ni]=Tn[Vt]=Tn[pe]=Tn[ft]=Tn[Nn]=Tn[on]=!0,Tn[qe]=Tn[Ye]=Tn[Du]=!1;var Kj={\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"},Gj={"&":"&","<":"<",">":">",'"':""","'":"'"},$j={"&":"&","<":"<",">":">",""":'"',"'":"'"},Qj={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Yj=parseFloat,Jj=parseInt,Kb=typeof global=="object"&&global&&global.Object===Object&&global,Hj=typeof self=="object"&&self&&self.Object===Object&&self,ar=Kb||Hj||Function("return this")(),Ah=typeof Xl=="object"&&Xl&&!Xl.nodeType&&Xl,Au=Ah&&typeof ef=="object"&&ef&&!ef.nodeType&&ef,Gb=Au&&Au.exports===Ah,Rh=Gb&&Kb.process,hi=function(){try{var $=Au&&Au.require&&Au.require("util").types;return $||Rh&&Rh.binding&&Rh.binding("util")}catch(ce){}}(),$b=hi&&hi.isArrayBuffer,Qb=hi&&hi.isDate,Yb=hi&&hi.isMap,Jb=hi&&hi.isRegExp,Hb=hi&&hi.isSet,zb=hi&&hi.isTypedArray;function ri($,ce,ne){switch(ne.length){case 0:return $.call(ce);case 1:return $.call(ce,ne[0]);case 2:return $.call(ce,ne[0],ne[1]);case 3:return $.call(ce,ne[0],ne[1],ne[2])}return $.apply(ce,ne)}function zj($,ce,ne,Be){for(var ut=-1,Yt=$==null?0:$.length;++ut-1}function Ph($,ce,ne){for(var Be=-1,ut=$==null?0:$.length;++Be-1;);return ne}function i0($,ce){for(var ne=$.length;ne--&&qc(ce,$[ne],0)>-1;);return ne}function aK($,ce){for(var ne=$.length,Be=0;ne--;)$[ne]===ce&&++Be;return Be}var sK=Ch(Kj),oK=Ch(Gj);function uK($){return"\\"+Qj[$]}function cK($,ce){return $==null?e:$[ce]}function Vc($){return xj.test($)}function lK($){return qj.test($)}function dK($){for(var ce,ne=[];!(ce=$.next()).done;)ne.push(ce.value);return ne}function Mh($){var ce=-1,ne=Array($.size);return $.forEach(function(Be,ut){ne[++ce]=[ut,Be]}),ne}function a0($,ce){return function(ne){return $(ce(ne))}}function Go($,ce){for(var ne=-1,Be=$.length,ut=0,Yt=[];++ne-1}function XK(s,u){var p=this.__data__,E=Gf(p,s);return E<0?(++this.size,p.push([s,u])):p[E][1]=u,this}is.prototype.clear=JK,is.prototype.delete=HK,is.prototype.get=zK,is.prototype.has=WK,is.prototype.set=XK;function as(s){var u=-1,p=s==null?0:s.length;for(this.clear();++u=u?s:u)),s}function _i(s,u,p,E,S,L){var M,j=u&d,H=u&f,fe=u&y;if(p&&(M=S?p(s,E,S,L):p(s)),M!==e)return M;if(!vn(s))return s;var me=dt(s);if(me){if(M=n$(s),!j)return jr(s,M)}else{var he=hr(s),be=he==Ye||he==Ut;if(Wo(s))return V0(s,j);if(he==Vr||he==De||be&&!S){if(M=H||be?{}:sA(s),!j)return H?$G(s,mG(M,s)):GG(s,E0(M,s))}else{if(!Tn[he])return S?s:{};M=r$(s,he,j)}}L||(L=new Wi);var Ke=L.get(s);if(Ke)return Ke;L.set(s,M),BA(s)?s.forEach(function(et){M.add(_i(et,u,p,et,s,L))}):LA(s)&&s.forEach(function(et,St){M.set(St,_i(et,u,p,St,s,L))});var Ze=fe?H?ly:cy:H?Gr:sr,Et=me?e:Ze(s);return yi(Et||s,function(et,St){Et&&(St=et,et=s[St]),Td(M,St,_i(et,u,p,St,s,L))}),M}function NG(s){var u=sr(s);return function(p){return h0(p,s,u)}}function h0(s,u,p){var E=p.length;if(s==null)return!E;for(s=dn(s);E--;){var S=p[E],L=u[S],M=s[S];if(M===e&&!(S in s)||!L(M))return!1}return!0}function y0(s,u,p){if(typeof s!="function")throw new Ii(i);return vd(function(){s.apply(e,p)},u)}function Ed(s,u,p,E){var S=-1,L=bf,M=!0,j=s.length,H=[],fe=u.length;if(!j)return H;p&&(u=In(u,ii(p))),E?(L=Ph,M=!1):u.length>=n&&(L=ld,M=!1,u=new Fu(u));e:for(;++SS?0:S+p),E=E===e||E>S?S:Nt(E),E<0&&(E+=S),E=p>E?0:kA(E);p0&&p(j)?u>1?Tr(j,u-1,p,E,S):Ko(S,j):E||(S[S.length]=j)}return S}var $h=Y0(),_0=Y0(!0);function va(s,u){return s&&$h(s,u,sr)}function Qh(s,u){return s&&_0(s,u,sr)}function Qf(s,u){return jo(u,function(p){return ls(s[p])})}function Lu(s,u){u=Ho(u,s);for(var p=0,E=u.length;s!=null&&pu}function hG(s,u){return s!=null&&rn.call(s,u)}function yG(s,u){return s!=null&&u in dn(s)}function IG(s,u,p){return s>=Er(u,p)&&s=120&&me.length>=120)?new Fu(M&&me):e}me=s[0];var he=-1,be=j[0];e:for(;++he-1;)j!==s&&kf.call(j,H,1),kf.call(s,H,1);return s}function L0(s,u){for(var p=s?u.length:0,E=p-1;p--;){var S=u[p];if(p==E||S!==L){var L=S;cs(S)?kf.call(s,S,1):ny(s,S)}}return s}function Zh(s,u){return s+qf(f0()*(u-s+1))}function LG(s,u,p,E){for(var S=-1,L=zn(xf((u-s)/(p||1)),0),M=ne(L);L--;)M[E?L:++S]=s,s+=p;return M}function ey(s,u){var p="";if(!s||u<1||u>mn)return p;do u%2&&(p+=s),u=qf(u/2),u&&(s+=s);while(u);return p}function It(s,u){return Ey(cA(s,u,$r),s+"")}function CG(s){return T0(Wc(s))}function BG(s,u){var p=Wc(s);return rm(p,wu(u,0,p.length))}function Id(s,u,p,E){if(!vn(s))return s;u=Ho(u,s);for(var S=-1,L=u.length,M=L-1,j=s;j!=null&&++SS?0:S+u),p=p>S?S:p,p<0&&(p+=S),S=u>p?0:p-u>>>0,u>>>=0;for(var L=ne(S);++E>>1,M=s[L];M!==null&&!si(M)&&(p?M<=u:M=n){var fe=u?null:HG(s);if(fe)return Rf(fe);M=!1,S=ld,H=new Fu}else H=u?[]:j;e:for(;++E=E?s:vi(s,u,p)}var q0=DK||function(s){return ar.clearTimeout(s)};function V0(s,u){if(u)return s.slice();var p=s.length,E=u0?u0(p):new s.constructor(p);return s.copy(E),E}function sy(s){var u=new s.constructor(s.byteLength);return new Bf(u).set(new Bf(s)),u}function qG(s,u){var p=u?sy(s.buffer):s.buffer;return new s.constructor(p,s.byteOffset,s.byteLength)}function VG(s){var u=new s.constructor(s.source,Sb.exec(s));return u.lastIndex=s.lastIndex,u}function jG(s){return Nd?dn(Nd.call(s)):{}}function j0(s,u){var p=u?sy(s.buffer):s.buffer;return new s.constructor(p,s.byteOffset,s.length)}function K0(s,u){if(s!==u){var p=s!==e,E=s===null,S=s===s,L=si(s),M=u!==e,j=u===null,H=u===u,fe=si(u);if(!j&&!fe&&!L&&s>u||L&&M&&H&&!j&&!fe||E&&M&&H||!p&&H||!S)return 1;if(!E&&!L&&!fe&&s=j)return H;var fe=p[E];return H*(fe=="desc"?-1:1)}}return s.index-u.index}function G0(s,u,p,E){for(var S=-1,L=s.length,M=p.length,j=-1,H=u.length,fe=zn(L-M,0),me=ne(H+fe),he=!E;++j1?p[S-1]:e,M=S>2?p[2]:e;for(L=s.length>3&&typeof L=="function"?(S--,L):e,M&&Lr(p[0],p[1],M)&&(L=S<3?e:L,S=1),u=dn(u);++E-1?S[L?u[M]:M]:e}}function z0(s){return us(function(u){var p=u.length,E=p,S=gi.prototype.thru;for(s&&u.reverse();E--;){var L=u[E];if(typeof L!="function")throw new Ii(i);if(S&&!M&&tm(L)=="wrapper")var M=new gi([],!0)}for(E=M?E:p;++E1&&Pt.reverse(),me&&Hj))return!1;var fe=L.get(s),me=L.get(u);if(fe&&me)return fe==u&&me==s;var he=-1,be=!0,Ke=p&v?new Fu:e;for(L.set(s,u),L.set(u,s);++he1?"& ":"")+u[E],u=u.join(p>2?", ":" "),s.replace(sj,`{ /* [wrapped with `+u+`] */ -`)}function BG(s){return lt(s)||wu(s)||!!($b&&s&&s[$b])}function is(s,u){var p=typeof s;return u=u==null?mn:u,!!u&&(p=="number"||p!="symbol"&&Y1.test(s))&&s>-1&&s%1==0&&s0){if(++u>=Se)return arguments[0]}else u=0;return s.apply(e,arguments)}}function Zf(s,u){var p=-1,E=s.length,S=E-1;for(u=u===e?E:u;++p1?s[u-1]:e;return p=typeof p=="function"?(s.pop(),p):e,tA(s,p)});function nA(s){var u=F(s);return u.__chain__=!0,u}function Q$(s,u){return u(s),s}function em(s,u){return u(s)}var Y$=rs(function(s){var u=s.length,p=u?s[0]:0,E=this.__wrapped__,S=function(L){return wh(L,s)};return u>1||this.__actions__.length||!(E instanceof Ot)||!is(p)?this.thru(S):(E=E.slice(p,+p+(u?1:0)),E.__actions__.push({func:em,args:[S],thisArg:e}),new Ii(E,this.__chain__).thru(function(L){return u&&!L.length&&L.push(e),L}))});function J$(){return nA(this)}function H$(){return new Ii(this.value(),this.__chain__)}function z$(){this.__values__===e&&(this.__values__=TA(this.value()));var s=this.__index__>=this.__values__.length,u=s?e:this.__values__[this.__index__++];return{done:s,value:u}}function W$(){return this}function X$(s){for(var u,p=this;p instanceof xf;){var E=H0(p);E.__index__=0,E.__values__=e,u?S.__wrapped__=E:u=E;var S=E;p=p.__wrapped__}return S.__wrapped__=s,u}function Z$(){var s=this.__wrapped__;if(s instanceof Ot){var u=s;return this.__actions__.length&&(u=new Ot(this)),u=u.reverse(),u.__actions__.push({func:em,args:[sy],thisArg:e}),new Ii(u,this.__chain__)}return this.thru(sy)}function eQ(){return h0(this.__wrapped__,this.__actions__)}var tQ=Qf(function(s,u,p){rn.call(s,p)?++s[p]:ts(s,p,1)});function nQ(s,u,p){var E=lt(s)?Pb:QK;return p&&Pr(s,u,p)&&(u=e),E(s,We(u,3))}function rQ(s,u){var p=lt(s)?Mo:t0;return p(s,We(u,3))}var iQ=R0(z0),aQ=R0(W0);function sQ(s,u){return Tr(tm(s,u),1)}function oQ(s,u){return Tr(tm(s,u),Qt)}function uQ(s,u,p){return p=p===e?1:Nt(p),Tr(tm(s,u),p)}function rA(s,u){var p=lt(s)?hi:Ko;return p(s,We(u,3))}function iA(s,u){var p=lt(s)?bj:e0;return p(s,We(u,3))}var cQ=Qf(function(s,u,p){rn.call(s,p)?s[p].push(u):ts(s,p,[u])});function lQ(s,u,p,E){s=jr(s)?s:Yc(s),p=p&&!E?Nt(p):0;var S=s.length;return p<0&&(p=Hn(S+p,0)),sm(s)?p<=S&&s.indexOf(u,p)>-1:!!S&&Uc(s,u,p)>-1}var dQ=yt(function(s,u,p){var E=-1,S=typeof u=="function",L=jr(s)?ne(s.length):[];return Ko(s,function(M){L[++E]=S?ri(u,M,p):md(M,u,p)}),L}),pQ=Qf(function(s,u,p){ts(s,p,u)});function tm(s,u){var p=lt(s)?In:o0;return p(s,We(u,3))}function fQ(s,u,p,E){return s==null?[]:(lt(u)||(u=u==null?[]:[u]),p=E?e:p,lt(p)||(p=p==null?[]:[p]),d0(s,u,p))}var mQ=Qf(function(s,u,p){s[p?0:1].push(u)},function(){return[[],[]]});function NQ(s,u,p){var E=lt(s)?yh:Bb,S=arguments.length<3;return E(s,We(u,4),p,S,Ko)}function TQ(s,u,p){var E=lt(s)?Aj:Bb,S=arguments.length<3;return E(s,We(u,4),p,S,e0)}function EQ(s,u){var p=lt(s)?Mo:t0;return p(s,im(We(u,3)))}function hQ(s){var u=lt(s)?zb:lG;return u(s)}function yQ(s,u,p){(p?Pr(s,u,p):u===e)?u=1:u=Nt(u);var E=lt(s)?VK:dG;return E(s,u)}function IQ(s){var u=lt(s)?jK:fG;return u(s)}function gQ(s){if(s==null)return 0;if(jr(s))return sm(s)?Mc(s):s.length;var u=hr(s);return u==nt||u==mr?s.size:Mh(s).length}function _Q(s,u,p){var E=lt(s)?Ih:mG;return p&&Pr(s,u,p)&&(u=e),E(s,We(u,3))}var vQ=yt(function(s,u){if(s==null)return[];var p=u.length;return p>1&&Pr(s,u[0],u[1])?u=[]:p>2&&Pr(u[0],u[1],u[2])&&(u=[u[0]]),d0(s,Tr(u,1),[])}),nm=rK||function(){return ir.Date.now()};function SQ(s,u){if(typeof u!="function")throw new yi(i);return s=Nt(s),function(){if(--s<1)return u.apply(this,arguments)}}function aA(s,u,p){return u=p?e:u,u=s&&u==null?s.length:u,ns(s,de,e,e,e,e,u)}function sA(s,u){var p;if(typeof u!="function")throw new yi(i);return s=Nt(s),function(){return--s>0&&(p=u.apply(this,arguments)),s<=1&&(u=e),p}}var uy=yt(function(s,u,p){var E=P;if(p.length){var S=qo(p,$c(uy));E|=ie}return ns(s,E,u,p,S)}),oA=yt(function(s,u,p){var E=P|k;if(p.length){var S=qo(p,$c(oA));E|=ie}return ns(u,E,s,p,S)});function uA(s,u,p){u=p?e:u;var E=ns(s,Q,e,e,e,e,e,u);return E.placeholder=uA.placeholder,E}function cA(s,u,p){u=p?e:u;var E=ns(s,se,e,e,e,e,e,u);return E.placeholder=cA.placeholder,E}function lA(s,u,p){var E,S,L,M,j,H,fe=0,me=!1,he=!1,be=!0;if(typeof s!="function")throw new yi(i);u=Si(u)||0,vn(p)&&(me=!!p.leading,he="maxWait"in p,L=he?Hn(Si(p.maxWait)||0,u):L,be="trailing"in p?!!p.trailing:be);function Ke(xn){var Wi=E,os=S;return E=S=e,fe=xn,M=s.apply(os,Wi),M}function Ze(xn){return fe=xn,j=yd(vt,u),me?Ke(xn):M}function Et(xn){var Wi=xn-H,os=xn-fe,RA=u-Wi;return he?Er(RA,L-os):RA}function et(xn){var Wi=xn-H,os=xn-fe;return H===e||Wi>=u||Wi<0||he&&os>=L}function vt(){var xn=nm();if(et(xn))return Ft(xn);j=yd(vt,Et(xn))}function Ft(xn){return j=e,be&&E?Ke(xn):(E=S=e,M)}function oi(){j!==e&&I0(j),fe=0,E=H=S=j=e}function wr(){return j===e?M:Ft(nm())}function ui(){var xn=nm(),Wi=et(xn);if(E=arguments,S=this,H=xn,Wi){if(j===e)return Ze(H);if(he)return I0(j),j=yd(vt,u),Ke(H)}return j===e&&(j=yd(vt,u)),M}return ui.cancel=oi,ui.flush=wr,ui}var OQ=yt(function(s,u){return Zb(s,1,u)}),DQ=yt(function(s,u,p){return Zb(s,Si(u)||0,p)});function bQ(s){return ns(s,xe)}function rm(s,u){if(typeof s!="function"||u!=null&&typeof u!="function")throw new yi(i);var p=function(){var E=arguments,S=u?u.apply(this,E):E[0],L=p.cache;if(L.has(S))return L.get(S);var M=s.apply(this,E);return p.cache=L.set(S,M)||L,M};return p.cache=new(rm.Cache||es),p}rm.Cache=es;function im(s){if(typeof s!="function")throw new yi(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 AQ(s){return sA(2,s)}var RQ=NG(function(s,u){u=u.length==1&<(u[0])?In(u[0],ii(We())):In(Tr(u,1),ii(We()));var p=u.length;return yt(function(E){for(var S=-1,L=Er(E.length,p);++S=u}),wu=i0(function(){return arguments}())?i0:function(s){return Rn(s)&&rn.call(s,"callee")&&!Gb.call(s,"callee")},lt=ne.isArray,GQ=Ob?ii(Ob):XK;function jr(s){return s!=null&&am(s.length)&&!as(s)}function Mn(s){return Rn(s)&&jr(s)}function $Q(s){return s===!0||s===!1||Rn(s)&&Fr(s)==_t}var Yo=aK||Iy,QQ=Db?ii(Db):ZK;function YQ(s){return Rn(s)&&s.nodeType===1&&!Id(s)}function JQ(s){if(s==null)return!0;if(jr(s)&&(lt(s)||typeof s=="string"||typeof s.splice=="function"||Yo(s)||Qc(s)||wu(s)))return!s.length;var u=hr(s);if(u==nt||u==mr)return!s.size;if(hd(s))return!Mh(s).length;for(var p in s)if(rn.call(s,p))return!1;return!0}function HQ(s,u){return Nd(s,u)}function zQ(s,u,p){p=typeof p=="function"?p:e;var E=p?p(s,u):e;return E===e?Nd(s,u,e,p):!!E}function ly(s){if(!Rn(s))return!1;var u=Fr(s);return u==qe||u==oe||typeof s.message=="string"&&typeof s.name=="string"&&!Id(s)}function WQ(s){return typeof s=="number"&&Qb(s)}function as(s){if(!vn(s))return!1;var u=Fr(s);return u==Ye||u==Ut||u==Ce||u==Cc}function pA(s){return typeof s=="number"&&s==Nt(s)}function am(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=mn}function vn(s){var u=typeof s;return s!=null&&(u=="object"||u=="function")}function Rn(s){return s!=null&&typeof s=="object"}var fA=bb?ii(bb):tG;function XQ(s,u){return s===u||kh(s,u,ey(u))}function ZQ(s,u,p){return p=typeof p=="function"?p:e,kh(s,u,ey(u),p)}function e2(s){return mA(s)&&s!=+s}function t2(s){if(MG(s))throw new ot(r);return a0(s)}function n2(s){return s===null}function r2(s){return s==null}function mA(s){return typeof s=="number"||Rn(s)&&Fr(s)==Rt}function Id(s){if(!Rn(s)||Fr(s)!=qr)return!1;var u=wf(s);if(u===null)return!0;var p=rn.call(u,"constructor")&&u.constructor;return typeof p=="function"&&p instanceof p&&Af.call(p)==Zj}var dy=Ab?ii(Ab):nG;function i2(s){return pA(s)&&s>=-mn&&s<=mn}var NA=Rb?ii(Rb):rG;function sm(s){return typeof s=="string"||!lt(s)&&Rn(s)&&Fr(s)==ni}function si(s){return typeof s=="symbol"||Rn(s)&&Fr(s)==Vt}var Qc=Fb?ii(Fb):iG;function a2(s){return s===e}function s2(s){return Rn(s)&&hr(s)==_u}function o2(s){return Rn(s)&&Fr(s)==Ia}var u2=zf(xh),c2=zf(function(s,u){return s<=u});function TA(s){if(!s)return[];if(jr(s))return sm(s)?Ji(s):Vr(s);if(od&&s[od])return Vj(s[od]());var u=hr(s),p=u==nt?Dh:u==mr?Of:Yc;return p(s)}function ss(s){if(!s)return s===0?s:0;if(s=Si(s),s===Qt||s===-Qt){var u=s<0?-1:1;return u*Ar}return s===s?s:0}function Nt(s){var u=ss(s),p=u%1;return u===u?p?u-p:u:0}function EA(s){return s?Au(Nt(s),0,kn):0}function Si(s){if(typeof s=="number")return s;if(si(s))return Rr;if(vn(s)){var u=typeof s.valueOf=="function"?s.valueOf():s;s=vn(u)?u+"":u}if(typeof s!="string")return s===0?s:+s;s=Ub(s);var p=G1.test(s);return p||Q1.test(s)?Sj(s.slice(2),p?2:8):K1.test(s)?Rr:+s}function hA(s){return _a(s,Kr(s))}function l2(s){return s?Au(Nt(s),-mn,mn):s===0?s:0}function Wt(s){return s==null?"":ai(s)}var d2=Kc(function(s,u){if(hd(u)||jr(u)){_a(u,ar(u),s);return}for(var p in u)rn.call(u,p)&&pd(s,p,u[p])}),yA=Kc(function(s,u){_a(u,Kr(u),s)}),om=Kc(function(s,u,p,E){_a(u,Kr(u),s,E)}),p2=Kc(function(s,u,p,E){_a(u,ar(u),s,E)}),f2=rs(wh);function m2(s,u){var p=jc(s);return u==null?p:Wb(p,u)}var N2=yt(function(s,u){s=dn(s);var p=-1,E=u.length,S=E>2?u[2]:e;for(S&&Pr(u[0],u[1],S)&&(E=1);++p1),L}),_a(s,Xh(s),p),E&&(p=gi(p,d|f|y,DG));for(var S=u.length;S--;)Gh(p,u[S]);return p});function L2(s,u){return gA(s,im(We(u)))}var C2=rs(function(s,u){return s==null?{}:oG(s,u)});function gA(s,u){if(s==null)return{};var p=In(Xh(s),function(E){return[E]});return u=We(u),p0(s,p,function(E,S){return u(E,S[0])})}function B2(s,u,p){u=$o(u,s);var E=-1,S=u.length;for(S||(S=1,s=e);++Eu){var E=s;s=u,u=E}if(p||s%1||u%1){var S=Yb();return Er(s+S*(u-s+vj("1e-"+((S+"").length-1))),u)}return Vh(s,u)}var Q2=Gc(function(s,u,p){return u=u.toLowerCase(),s+(p?SA(u):u)});function SA(s){return my(Wt(s).toLowerCase())}function OA(s){return s=Wt(s),s&&s.replace(J1,Uj).replace(fj,"")}function Y2(s,u,p){s=Wt(s),u=ai(u);var E=s.length;p=p===e?E:Au(Nt(p),0,E);var S=p;return p-=u.length,p>=0&&s.slice(p,S)==u}function J2(s){return s=Wt(s),s&&A1.test(s)?s.replace(nb,kj):s}function H2(s){return s=Wt(s),s&&C1.test(s)?s.replace(ch,"\\$&"):s}var z2=Gc(function(s,u,p){return s+(p?"-":"")+u.toLowerCase()}),W2=Gc(function(s,u,p){return s+(p?" ":"")+u.toLowerCase()}),X2=A0("toLowerCase");function Z2(s,u,p){s=Wt(s),u=Nt(u);var E=u?Mc(s):0;if(!u||E>=u)return s;var S=(u-E)/2;return Hf(Uf(S),p)+s+Hf(Bf(S),p)}function eY(s,u,p){s=Wt(s),u=Nt(u);var E=u?Mc(s):0;return u&&E>>0,p?(s=Wt(s),s&&(typeof u=="string"||u!=null&&!dy(u))&&(u=ai(u),!u&&kc(s))?Qo(Ji(s),0,p):s.split(u,p)):[]}var oY=Gc(function(s,u,p){return s+(p?" ":"")+my(u)});function uY(s,u,p){return s=Wt(s),p=p==null?0:Au(Nt(p),0,s.length),u=ai(u),s.slice(p,p+u.length)==u}function cY(s,u,p){var E=F.templateSettings;p&&Pr(s,u,p)&&(u=e),s=Wt(s),u=om({},u,E,B0);var S=om({},u.imports,E.imports,B0),L=ar(S),M=Oh(S,L),j,H,fe=0,me=u.interpolate||If,he="__p += '",be=bh((u.escape||If).source+"|"+me.source+"|"+(me===rb?j1:If).source+"|"+(u.evaluate||If).source+"|$","g"),Ke="//# sourceURL="+(rn.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++hj+"]")+` -`;s.replace(be,function(et,vt,Ft,oi,wr,ui){return Ft||(Ft=oi),he+=s.slice(fe,ui).replace(H1,Mj),vt&&(j=!0,he+=`' + -__e(`+vt+`) + -'`),wr&&(H=!0,he+=`'; -`+wr+`; -__p += '`),Ft&&(he+=`' + -((__t = (`+Ft+`)) == null ? '' : __t) + +`)}function a$(s){return dt(s)||Uu(s)||!!(d0&&s&&s[d0])}function cs(s,u){var p=typeof s;return u=u==null?mn:u,!!u&&(p=="number"||p!="symbol"&&Ej.test(s))&&s>-1&&s%1==0&&s0){if(++u>=Se)return arguments[0]}else u=0;return s.apply(e,arguments)}}function rm(s,u){var p=-1,E=s.length,S=E-1;for(u=u===e?E:u;++p1?s[u-1]:e;return p=typeof p=="function"?(s.pop(),p):e,gA(s,p)});function _A(s){var u=P(s);return u.__chain__=!0,u}function TQ(s,u){return u(s),s}function im(s,u){return u(s)}var EQ=us(function(s){var u=s.length,p=u?s[0]:0,E=this.__wrapped__,S=function(L){return Gh(L,s)};return u>1||this.__actions__.length||!(E instanceof Ot)||!cs(p)?this.thru(S):(E=E.slice(p,+p+(u?1:0)),E.__actions__.push({func:im,args:[S],thisArg:e}),new gi(E,this.__chain__).thru(function(L){return u&&!L.length&&L.push(e),L}))});function hQ(){return _A(this)}function yQ(){return new gi(this.value(),this.__chain__)}function IQ(){this.__values__===e&&(this.__values__=UA(this.value()));var s=this.__index__>=this.__values__.length,u=s?e:this.__values__[this.__index__++];return{done:s,value:u}}function gQ(){return this}function _Q(s){for(var u,p=this;p instanceof Kf;){var E=NA(p);E.__index__=0,E.__values__=e,u?S.__wrapped__=E:u=E;var S=E;p=p.__wrapped__}return S.__wrapped__=s,u}function vQ(){var s=this.__wrapped__;if(s instanceof Ot){var u=s;return this.__actions__.length&&(u=new Ot(this)),u=u.reverse(),u.__actions__.push({func:im,args:[hy],thisArg:e}),new gi(u,this.__chain__)}return this.thru(hy)}function SQ(){return M0(this.__wrapped__,this.__actions__)}var OQ=zf(function(s,u,p){rn.call(s,p)?++s[p]:ss(s,p,1)});function DQ(s,u,p){var E=dt(s)?Wb:TG;return p&&Lr(s,u,p)&&(u=e),E(s,We(u,3))}function bQ(s,u){var p=dt(s)?jo:g0;return p(s,We(u,3))}var AQ=H0(TA),RQ=H0(EA);function PQ(s,u){return Tr(am(s,u),1)}function FQ(s,u){return Tr(am(s,u),Qt)}function wQ(s,u,p){return p=p===e?1:Nt(p),Tr(am(s,u),p)}function vA(s,u){var p=dt(s)?yi:Yo;return p(s,We(u,3))}function SA(s,u){var p=dt(s)?Wj:I0;return p(s,We(u,3))}var LQ=zf(function(s,u,p){rn.call(s,p)?s[p].push(u):ss(s,p,[u])});function CQ(s,u,p,E){s=Kr(s)?s:Wc(s),p=p&&!E?Nt(p):0;var S=s.length;return p<0&&(p=zn(S+p,0)),lm(s)?p<=S&&s.indexOf(u,p)>-1:!!S&&qc(s,u,p)>-1}var BQ=It(function(s,u,p){var E=-1,S=typeof u=="function",L=Kr(s)?ne(s.length):[];return Yo(s,function(M){L[++E]=S?ri(u,M,p):hd(M,u,p)}),L}),UQ=zf(function(s,u,p){ss(s,p,u)});function am(s,u){var p=dt(s)?In:b0;return p(s,We(u,3))}function kQ(s,u,p,E){return s==null?[]:(dt(u)||(u=u==null?[]:[u]),p=E?e:p,dt(p)||(p=p==null?[]:[p]),F0(s,u,p))}var MQ=zf(function(s,u,p){s[p?0:1].push(u)},function(){return[[],[]]});function xQ(s,u,p){var E=dt(s)?Fh:t0,S=arguments.length<3;return E(s,We(u,4),p,S,Yo)}function qQ(s,u,p){var E=dt(s)?Xj:t0,S=arguments.length<3;return E(s,We(u,4),p,S,I0)}function VQ(s,u){var p=dt(s)?jo:g0;return p(s,um(We(u,3)))}function jQ(s){var u=dt(s)?T0:CG;return u(s)}function KQ(s,u,p){(p?Lr(s,u,p):u===e)?u=1:u=Nt(u);var E=dt(s)?dG:BG;return E(s,u)}function GQ(s){var u=dt(s)?pG:kG;return u(s)}function $Q(s){if(s==null)return 0;if(Kr(s))return lm(s)?jc(s):s.length;var u=hr(s);return u==nt||u==mr?s.size:zh(s).length}function QQ(s,u,p){var E=dt(s)?wh:MG;return p&&Lr(s,u,p)&&(u=e),E(s,We(u,3))}var YQ=It(function(s,u){if(s==null)return[];var p=u.length;return p>1&&Lr(s,u[0],u[1])?u=[]:p>2&&Lr(u[0],u[1],u[2])&&(u=[u[0]]),F0(s,Tr(u,1),[])}),sm=bK||function(){return ar.Date.now()};function JQ(s,u){if(typeof u!="function")throw new Ii(i);return s=Nt(s),function(){if(--s<1)return u.apply(this,arguments)}}function OA(s,u,p){return u=p?e:u,u=s&&u==null?s.length:u,os(s,de,e,e,e,e,u)}function DA(s,u){var p;if(typeof u!="function")throw new Ii(i);return s=Nt(s),function(){return--s>0&&(p=u.apply(this,arguments)),s<=1&&(u=e),p}}var Iy=It(function(s,u,p){var E=F;if(p.length){var S=Go(p,Hc(Iy));E|=ie}return os(s,E,u,p,S)}),bA=It(function(s,u,p){var E=F|k;if(p.length){var S=Go(p,Hc(bA));E|=ie}return os(u,E,s,p,S)});function AA(s,u,p){u=p?e:u;var E=os(s,J,e,e,e,e,e,u);return E.placeholder=AA.placeholder,E}function RA(s,u,p){u=p?e:u;var E=os(s,se,e,e,e,e,e,u);return E.placeholder=RA.placeholder,E}function PA(s,u,p){var E,S,L,M,j,H,fe=0,me=!1,he=!1,be=!0;if(typeof s!="function")throw new Ii(i);u=Oi(u)||0,vn(p)&&(me=!!p.leading,he="maxWait"in p,L=he?zn(Oi(p.maxWait)||0,u):L,be="trailing"in p?!!p.trailing:be);function Ke(xn){var Zi=E,ps=S;return E=S=e,fe=xn,M=s.apply(ps,Zi),M}function Ze(xn){return fe=xn,j=vd(St,u),me?Ke(xn):M}function Et(xn){var Zi=xn-H,ps=xn-fe,HA=u-Zi;return he?Er(HA,L-ps):HA}function et(xn){var Zi=xn-H,ps=xn-fe;return H===e||Zi>=u||Zi<0||he&&ps>=L}function St(){var xn=sm();if(et(xn))return Pt(xn);j=vd(St,Et(xn))}function Pt(xn){return j=e,be&&E?Ke(xn):(E=S=e,M)}function oi(){j!==e&&q0(j),fe=0,E=H=S=j=e}function Cr(){return j===e?M:Pt(sm())}function ui(){var xn=sm(),Zi=et(xn);if(E=arguments,S=this,H=xn,Zi){if(j===e)return Ze(H);if(he)return q0(j),j=vd(St,u),Ke(H)}return j===e&&(j=vd(St,u)),M}return ui.cancel=oi,ui.flush=Cr,ui}var HQ=It(function(s,u){return y0(s,1,u)}),zQ=It(function(s,u,p){return y0(s,Oi(u)||0,p)});function WQ(s){return os(s,xe)}function om(s,u){if(typeof s!="function"||u!=null&&typeof u!="function")throw new Ii(i);var p=function(){var E=arguments,S=u?u.apply(this,E):E[0],L=p.cache;if(L.has(S))return L.get(S);var M=s.apply(this,E);return p.cache=L.set(S,M)||L,M};return p.cache=new(om.Cache||as),p}om.Cache=as;function um(s){if(typeof s!="function")throw new Ii(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 XQ(s){return DA(2,s)}var ZQ=xG(function(s,u){u=u.length==1&&dt(u[0])?In(u[0],ii(We())):In(Tr(u,1),ii(We()));var p=u.length;return It(function(E){for(var S=-1,L=Er(E.length,p);++S=u}),Uu=S0(function(){return arguments}())?S0:function(s){return Rn(s)&&rn.call(s,"callee")&&!l0.call(s,"callee")},dt=ne.isArray,m2=$b?ii($b):_G;function Kr(s){return s!=null&&cm(s.length)&&!ls(s)}function Mn(s){return Rn(s)&&Kr(s)}function N2(s){return s===!0||s===!1||Rn(s)&&wr(s)==vt}var Wo=RK||wy,T2=Qb?ii(Qb):vG;function E2(s){return Rn(s)&&s.nodeType===1&&!Sd(s)}function h2(s){if(s==null)return!0;if(Kr(s)&&(dt(s)||typeof s=="string"||typeof s.splice=="function"||Wo(s)||zc(s)||Uu(s)))return!s.length;var u=hr(s);if(u==nt||u==mr)return!s.size;if(_d(s))return!zh(s).length;for(var p in s)if(rn.call(s,p))return!1;return!0}function y2(s,u){return yd(s,u)}function I2(s,u,p){p=typeof p=="function"?p:e;var E=p?p(s,u):e;return E===e?yd(s,u,e,p):!!E}function _y(s){if(!Rn(s))return!1;var u=wr(s);return u==qe||u==oe||typeof s.message=="string"&&typeof s.name=="string"&&!Sd(s)}function g2(s){return typeof s=="number"&&p0(s)}function ls(s){if(!vn(s))return!1;var u=wr(s);return u==Ye||u==Ut||u==Ce||u==Mc}function wA(s){return typeof s=="number"&&s==Nt(s)}function cm(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=mn}function vn(s){var u=typeof s;return s!=null&&(u=="object"||u=="function")}function Rn(s){return s!=null&&typeof s=="object"}var LA=Yb?ii(Yb):OG;function _2(s,u){return s===u||Hh(s,u,py(u))}function v2(s,u,p){return p=typeof p=="function"?p:e,Hh(s,u,py(u),p)}function S2(s){return CA(s)&&s!=+s}function O2(s){if(u$(s))throw new ut(r);return O0(s)}function D2(s){return s===null}function b2(s){return s==null}function CA(s){return typeof s=="number"||Rn(s)&&wr(s)==Rt}function Sd(s){if(!Rn(s)||wr(s)!=Vr)return!1;var u=Uf(s);if(u===null)return!0;var p=rn.call(u,"constructor")&&u.constructor;return typeof p=="function"&&p instanceof p&&wf.call(p)==vK}var vy=Jb?ii(Jb):DG;function A2(s){return wA(s)&&s>=-mn&&s<=mn}var BA=Hb?ii(Hb):bG;function lm(s){return typeof s=="string"||!dt(s)&&Rn(s)&&wr(s)==ni}function si(s){return typeof s=="symbol"||Rn(s)&&wr(s)==Vt}var zc=zb?ii(zb):AG;function R2(s){return s===e}function P2(s){return Rn(s)&&hr(s)==Du}function F2(s){return Rn(s)&&wr(s)==_a}var w2=em(Wh),L2=em(function(s,u){return s<=u});function UA(s){if(!s)return[];if(Kr(s))return lm(s)?zi(s):jr(s);if(dd&&s[dd])return dK(s[dd]());var u=hr(s),p=u==nt?Mh:u==mr?Rf:Wc;return p(s)}function ds(s){if(!s)return s===0?s:0;if(s=Oi(s),s===Qt||s===-Qt){var u=s<0?-1:1;return u*Pr}return s===s?s:0}function Nt(s){var u=ds(s),p=u%1;return u===u?p?u-p:u:0}function kA(s){return s?wu(Nt(s),0,kn):0}function Oi(s){if(typeof s=="number")return s;if(si(s))return Fr;if(vn(s)){var u=typeof s.valueOf=="function"?s.valueOf():s;s=vn(u)?u+"":u}if(typeof s!="string")return s===0?s:+s;s=n0(s);var p=mj.test(s);return p||Tj.test(s)?Jj(s.slice(2),p?2:8):fj.test(s)?Fr:+s}function MA(s){return Sa(s,Gr(s))}function C2(s){return s?wu(Nt(s),-mn,mn):s===0?s:0}function Wt(s){return s==null?"":ai(s)}var B2=Yc(function(s,u){if(_d(u)||Kr(u)){Sa(u,sr(u),s);return}for(var p in u)rn.call(u,p)&&Td(s,p,u[p])}),xA=Yc(function(s,u){Sa(u,Gr(u),s)}),dm=Yc(function(s,u,p,E){Sa(u,Gr(u),s,E)}),U2=Yc(function(s,u,p,E){Sa(u,sr(u),s,E)}),k2=us(Gh);function M2(s,u){var p=Qc(s);return u==null?p:E0(p,u)}var x2=It(function(s,u){s=dn(s);var p=-1,E=u.length,S=E>2?u[2]:e;for(S&&Lr(u[0],u[1],S)&&(E=1);++p1),L}),Sa(s,ly(s),p),E&&(p=_i(p,d|f|y,zG));for(var S=u.length;S--;)ny(p,u[S]);return p});function rY(s,u){return VA(s,um(We(u)))}var iY=us(function(s,u){return s==null?{}:FG(s,u)});function VA(s,u){if(s==null)return{};var p=In(ly(s),function(E){return[E]});return u=We(u),w0(s,p,function(E,S){return u(E,S[0])})}function aY(s,u,p){u=Ho(u,s);var E=-1,S=u.length;for(S||(S=1,s=e);++Eu){var E=s;s=u,u=E}if(p||s%1||u%1){var S=f0();return Er(s+S*(u-s+Yj("1e-"+((S+"").length-1))),u)}return Zh(s,u)}var TY=Jc(function(s,u,p){return u=u.toLowerCase(),s+(p?GA(u):u)});function GA(s){return Dy(Wt(s).toLowerCase())}function $A(s){return s=Wt(s),s&&s.replace(hj,sK).replace(kj,"")}function EY(s,u,p){s=Wt(s),u=ai(u);var E=s.length;p=p===e?E:wu(Nt(p),0,E);var S=p;return p-=u.length,p>=0&&s.slice(p,S)==u}function hY(s){return s=Wt(s),s&&X1.test(s)?s.replace(_b,oK):s}function yY(s){return s=Wt(s),s&&ij.test(s)?s.replace(gh,"\\$&"):s}var IY=Jc(function(s,u,p){return s+(p?"-":"")+u.toLowerCase()}),gY=Jc(function(s,u,p){return s+(p?" ":"")+u.toLowerCase()}),_Y=J0("toLowerCase");function vY(s,u,p){s=Wt(s),u=Nt(u);var E=u?jc(s):0;if(!u||E>=u)return s;var S=(u-E)/2;return Zf(qf(S),p)+s+Zf(xf(S),p)}function SY(s,u,p){s=Wt(s),u=Nt(u);var E=u?jc(s):0;return u&&E>>0,p?(s=Wt(s),s&&(typeof u=="string"||u!=null&&!vy(u))&&(u=ai(u),!u&&Vc(s))?zo(zi(s),0,p):s.split(u,p)):[]}var FY=Jc(function(s,u,p){return s+(p?" ":"")+Dy(u)});function wY(s,u,p){return s=Wt(s),p=p==null?0:wu(Nt(p),0,s.length),u=ai(u),s.slice(p,p+u.length)==u}function LY(s,u,p){var E=P.templateSettings;p&&Lr(s,u,p)&&(u=e),s=Wt(s),u=dm({},u,E,tA);var S=dm({},u.imports,E.imports,tA),L=sr(S),M=kh(S,L),j,H,fe=0,me=u.interpolate||Sf,he="__p += '",be=xh((u.escape||Sf).source+"|"+me.source+"|"+(me===vb?pj:Sf).source+"|"+(u.evaluate||Sf).source+"|$","g"),Ke="//# sourceURL="+(rn.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++jj+"]")+` +`;s.replace(be,function(et,St,Pt,oi,Cr,ui){return Pt||(Pt=oi),he+=s.slice(fe,ui).replace(yj,uK),St&&(j=!0,he+=`' + +__e(`+St+`) + +'`),Cr&&(H=!0,he+=`'; +`+Cr+`; +__p += '`),Pt&&(he+=`' + +((__t = (`+Pt+`)) == null ? '' : __t) + '`),fe=ui+et.length,et}),he+=`'; `;var Ze=rn.call(u,"variable")&&u.variable;if(!Ze)he=`with (obj) { `+he+` } -`;else if(q1.test(Ze))throw new ot(a);he=(H?he.replace(yn,""):he).replace(nn,"$1").replace(D1,"$1;"),he="function("+(Ze||"obj")+`) { +`;else if(lj.test(Ze))throw new ut(a);he=(H?he.replace(yn,""):he).replace(nn,"$1").replace(z1,"$1;"),he="function("+(Ze||"obj")+`) { `+(Ze?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(j?", __e = _.escape":"")+(H?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+he+`return __p -}`;var Et=bA(function(){return Yt(L,Ke+"return "+he).apply(e,M)});if(Et.source=he,ly(Et))throw Et;return Et}function lY(s){return Wt(s).toLowerCase()}function dY(s){return Wt(s).toUpperCase()}function pY(s,u,p){if(s=Wt(s),s&&(p||u===e))return Ub(s);if(!s||!(u=ai(u)))return s;var E=Ji(s),S=Ji(u),L=kb(E,S),M=Mb(E,S)+1;return Qo(E,L,M).join("")}function fY(s,u,p){if(s=Wt(s),s&&(p||u===e))return s.slice(0,qb(s)+1);if(!s||!(u=ai(u)))return s;var E=Ji(s),S=Mb(E,Ji(u))+1;return Qo(E,0,S).join("")}function mY(s,u,p){if(s=Wt(s),s&&(p||u===e))return s.replace(lh,"");if(!s||!(u=ai(u)))return s;var E=Ji(s),S=kb(E,Ji(u));return Qo(E,S).join("")}function NY(s,u){var p=tt,E=ee;if(vn(u)){var S="separator"in u?u.separator:S;p="length"in u?Nt(u.length):p,E="omission"in u?ai(u.omission):E}s=Wt(s);var L=s.length;if(kc(s)){var M=Ji(s);L=M.length}if(p>=L)return s;var j=p-Mc(E);if(j<1)return E;var H=M?Qo(M,0,j).join(""):s.slice(0,j);if(S===e)return H+E;if(M&&(j+=H.length-j),dy(S)){if(s.slice(j).search(S)){var fe,me=H;for(S.global||(S=bh(S.source,Wt(ib.exec(S))+"g")),S.lastIndex=0;fe=S.exec(me);)var he=fe.index;H=H.slice(0,he===e?j:he)}}else if(s.indexOf(ai(S),j)!=j){var be=H.lastIndexOf(S);be>-1&&(H=H.slice(0,be))}return H+E}function TY(s){return s=Wt(s),s&&b1.test(s)?s.replace(tb,$j):s}var EY=Gc(function(s,u,p){return s+(p?" ":"")+u.toUpperCase()}),my=A0("toUpperCase");function DA(s,u,p){return s=Wt(s),u=p?e:u,u===e?qj(s)?Jj(s):Pj(s):s.match(u)||[]}var bA=yt(function(s,u){try{return ri(s,e,u)}catch(p){return ly(p)?p:new ot(p)}}),hY=rs(function(s,u){return hi(u,function(p){p=va(p),ts(s,p,uy(s[p],s))}),s});function yY(s){var u=s==null?0:s.length,p=We();return s=u?In(s,function(E){if(typeof E[1]!="function")throw new yi(i);return[p(E[0]),E[1]]}):[],yt(function(E){for(var S=-1;++Smn)return[];var p=kn,E=Er(s,kn);u=We(u),s-=kn;for(var S=Sh(E,u);++p0||u<0)?new Ot(p):(s<0?p=p.takeRight(-s):s&&(p=p.drop(s)),u!==e&&(u=Nt(u),p=u<0?p.dropRight(-u):p.take(u-s)),p)},Ot.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Ot.prototype.toArray=function(){return this.take(kn)},ga(Ot.prototype,function(s,u){var p=/^(?:filter|find|map|reject)|While$/.test(u),E=/^(?:head|last)$/.test(u),S=F[E?"take"+(u=="last"?"Right":""):u],L=E||/^find/.test(u);S&&(F.prototype[u]=function(){var M=this.__wrapped__,j=E?[1]:arguments,H=M instanceof Ot,fe=j[0],me=H||lt(M),he=function(vt){var Ft=S.apply(F,xo([vt],j));return E&&be?Ft[0]:Ft};me&&p&&typeof fe=="function"&&fe.length!=1&&(H=me=!1);var be=this.__chain__,Ke=!!this.__actions__.length,Ze=L&&!be,Et=H&&!Ke;if(!L&&me){M=Et?M:new Ot(this);var et=s.apply(M,j);return et.__actions__.push({func:em,args:[he],thisArg:e}),new Ii(et,be)}return Ze&&Et?s.apply(this,j):(et=this.thru(he),Ze?E?et.value()[0]:et.value():et)})}),hi(["pop","push","shift","sort","splice","unshift"],function(s){var u=Df[s],p=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",E=/^(?:pop|shift)$/.test(s);F.prototype[s]=function(){var S=arguments;if(E&&!this.__chain__){var L=this.value();return u.apply(lt(L)?L:[],S)}return this[p](function(M){return u.apply(lt(M)?M:[],S)})}}),ga(Ot.prototype,function(s,u){var p=F[u];if(p){var E=p.name+"";rn.call(Vc,E)||(Vc[E]=[]),Vc[E].push({name:u,func:p})}}),Vc[Yf(e,k).name]=[{name:"wrapper",func:e}],Ot.prototype.clone=TK,Ot.prototype.reverse=EK,Ot.prototype.value=hK,F.prototype.at=Y$,F.prototype.chain=J$,F.prototype.commit=H$,F.prototype.next=z$,F.prototype.plant=X$,F.prototype.reverse=Z$,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=eQ,F.prototype.first=F.prototype.head,od&&(F.prototype[od]=W$),F},Vo=Hj();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ir._=Vo,define(function(){return Vo})):Su?((Su.exports=Vo)._=Vo,Th._=Vo):ir._=Vo}).call(Jl)});var nV=w(Oc=>{"use strict";m();T();N();Object.defineProperty(Oc,"__esModule",{value:!0});Oc.FederationFactory=void 0;Oc.federateSubgraphs=Fle;Oc.federateSubgraphsWithContracts=Ple;Oc.federateSubgraphsContract=wle;var Fe=Ae(),Xq=ou(),kr=Jr(),Pe=oa(),Sc=kN(),Zq=Mp(),Mr=Gp(),PE=eE(),Bt=ys(),Dle=XO(),ble=$p(),eV=Ip(),Ie=yl(),Ale=tD(),tV=Wq(),Hl=FE(),_e=ur(),wE=Tl(),Ee=Hr(),Rle=Qp(),LE=class{constructor({authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,disableResolvabilityValidation:r,entityDataByTypeName:i,entityInterfaceFederationDataByTypeName:a,fieldCoordsByNamedTypeName:o,internalGraph:c,internalSubgraphBySubgraphName:l,warnings:d}){_(this,"authorizationDataByParentTypeName");_(this,"coordsByNamedTypeName",new Map);_(this,"disableResolvabilityValidation",!1);_(this,"clientDefinitions",[Bt.DEPRECATED_DEFINITION]);_(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([[_e.AUTHENTICATED,Bt.AUTHENTICATED_DEFINITION],[_e.DEPRECATED,Bt.DEPRECATED_DEFINITION],[_e.INACCESSIBLE,Bt.INACCESSIBLE_DEFINITION],[_e.ONE_OF,Bt.ONE_OF_DEFINITION],[_e.REQUIRES_SCOPES,Bt.REQUIRES_SCOPES_DEFINITION],[_e.SEMANTIC_NON_NULL,Bt.SEMANTIC_NON_NULL_DEFINITION],[_e.TAG,Bt.TAG_DEFINITION]]));_(this,"persistedDirectiveDefinitions",new Set([_e.AUTHENTICATED,_e.DEPRECATED,_e.INACCESSIBLE,_e.TAG,_e.REQUIRES_SCOPES]));_(this,"potentialPersistedDirectiveDefinitionDataByDirectiveName",new Map);_(this,"referencedPersistedDirectiveNames",new Set);_(this,"routerDefinitions",[Bt.DEPRECATED_DEFINITION,Bt.TAG_DEFINITION]);_(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}getValidImplementedInterfaces(t){var o;let n=[];if(t.implementedInterfaceTypeNames.size<1)return n;let r=(0,Ie.isNodeDataInaccessible)(t),i=new Map,a=new Map;for(let c of t.implementedInterfaceTypeNames){n.push((0,kr.stringToNamedTypeNode)(c));let l=(0,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,c,_e.PARENT_DEFINITION_DATA);if(l.kind!==Fe.Kind.INTERFACE_TYPE_DEFINITION){a.set(l.name,(0,Ee.kindToNodeType)(l.kind));continue}let d={invalidFieldImplementations:new Map,unimplementedFields:[]},f=!1;for(let[y,I]of l.fieldDataByName){let v=!1,P=t.fieldDataByName.get(y);if(!P){f=!0,d.unimplementedFields.push(y);continue}let k={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,PE.printTypeNode)(I.node.type),unimplementedArguments:new Set};(0,Ie.isTypeValidImplementation)(I.node.type,P.node.type,this.concreteTypeNamesByAbstractTypeName)||(f=!0,v=!0,k.implementedResponseType=(0,PE.printTypeNode)(P.node.type));let K=new Set;for(let[Q,se]of I.argumentDataByName){let ie=se.node;K.add(Q);let Te=(o=P.argumentDataByName.get(Q))==null?void 0:o.node;if(!Te){f=!0,v=!0,k.unimplementedArguments.add(Q);continue}let de=(0,PE.printTypeNode)(Te.type),Re=(0,PE.printTypeNode)(ie.type);Re!==de&&(f=!0,v=!0,k.invalidImplementedArguments.push({actualType:de,argumentName:Q,expectedType:Re}))}for(let[Q,se]of P.argumentDataByName){let ie=se.node;K.has(Q)||ie.type.kind===Fe.Kind.NON_NULL_TYPE&&(f=!0,v=!0,k.invalidAdditionalArguments.add(Q))}!r&&P.isInaccessible&&!I.isInaccessible&&(f=!0,v=!0,k.isInaccessible=!0),v&&d.invalidFieldImplementations.set(y,k)}f&&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,Ee.kindToNodeType)(t.kind),i)),n}addValidPrimaryKeyTargetsToEntityData(t){var f;let n=this.entityDataByTypeName.get(t);if(!n)return;let r=(0,Ee.getOrThrowError)(this.internalSubgraphBySubgraphName,this.currentSubgraphName,"internalSubgraphBySubgraphName"),i=r.parentDefinitionDataByTypeName,a=i.get(n.typeName);if(!a||a.kind!==Fe.Kind.OBJECT_TYPE_DEFINITION)throw(0,Pe.incompatibleParentKindFatalError)(n.typeName,Fe.Kind.OBJECT_TYPE_DEFINITION,(a==null?void 0:a.kind)||Fe.Kind.NULL);let o=r.configurationDataByTypeName.get(n.typeName);if(!o)return;let c=[],l=this.internalGraph.nodeByNodeName.get(`${this.currentSubgraphName}.${n.typeName}`);(0,Sc.validateImplicitFieldSets)({conditionalFieldDataByCoords:r.conditionalFieldDataByCoordinates,currentSubgraphName:this.currentSubgraphName,entityData:n,implicitKeys:c,objectData:a,parentDefinitionDataByTypeName:i,graphNode:l});for(let[y,I]of this.entityInterfaceFederationDataByTypeName){if(!((f=I.concreteTypeNames)!=null&&f.has(n.typeName)))continue;let v=this.entityDataByTypeName.get(y);v&&(0,Sc.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(y=>y.selectionSet));for(let y of c)d.has(y.selectionSet)||(o.keys.push(y),d.add(y.selectionSet))}addValidPrimaryKeyTargetsFromInterfaceObject(t,n,r,i){let a=t.parentDefinitionDataByTypeName,o=a.get(n);if(!o||!(0,Ie.isParentDataCompositeOutputType)(o))throw(0,Pe.incompatibleParentKindFatalError)(n,Fe.Kind.INTERFACE_TYPE_DEFINITION,(o==null?void 0:o.kind)||Fe.Kind.NULL);let c=(0,Ee.getOrThrowError)(t.configurationDataByTypeName,r.typeName,"internalSubgraph.configurationDataByTypeName"),l=[];if((0,Sc.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(f=>f.selectionSet));for(let f of l)d.has(f.selectionSet)||(c.keys.push(f),d.add(f.selectionSet))}getEnumValueMergeMethod(t){return this.namedInputValueTypeNames.has(t)?this.namedOutputTypeNames.has(t)?Ie.MergeMethod.CONSISTENT:Ie.MergeMethod.INTERSECTION:Ie.MergeMethod.UNION}generateTagData(){for(let[t,n]of this.tagNamesByCoords){let r=t.split(".");if(r.length<1)continue;let i=(0,Ee.getValueOrDefault)(this.parentTagDataByTypeName,r[0],()=>(0,Sc.newParentTagData)(r[0]));switch(r.length){case 1:for(let l of n)i.tagNames.add(l);break;case 2:let a=(0,Ee.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Sc.newChildTagData)(r[1]));for(let l of n)a.tagNames.add(l);break;case 3:let o=(0,Ee.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Sc.newChildTagData)(r[1])),c=(0,Ee.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);(0,Ie.extractPersistedDirectives)(a.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName);let o=(0,Ie.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,Ee.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,Ie.setLongestDescription)(a,n),(0,Ee.addIterableValuesToSet)(n.subgraphNames,a.subgraphNames)}upsertInputValueData(t,n,r,i){let a=t.get(n.name),o=a||this.copyInputValueData(n);if((0,Ie.extractPersistedDirectives)(o.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.recordTagNamesByCoords(o,`${r}.${o.name}`),this.namedInputValueTypeNames.add(o.namedTypeName),(0,Ee.getValueOrDefault)(this.coordsByNamedTypeName,o.namedTypeName,()=>new Set).add(o.federatedCoords),!a){t.set(o.name,o);return}(0,Ee.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,o.configureDescriptionDataBySubgraphName),(0,Ie.setLongestDescription)(o,n),(0,Ee.addIterableValuesToSet)(n.requiredSubgraphNames,o.requiredSubgraphNames),(0,Ee.addIterableValuesToSet)(n.subgraphNames,o.subgraphNames),this.handleInputValueInaccessibility(i,o,r);let c=(0,Hl.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,Ie.compareAndValidateInputValueDefaultValues)(o,n,this.errors)}handleInputValueInaccessibility(t,n,r){if(t){this.inaccessibleRequiredInputValueErrorByCoords.delete(n.federatedCoords),this.inaccessibleCoords.add(n.federatedCoords);return}if((0,Ie.isNodeDataInaccessible)(n)){if((0,Ie.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.directivesByDirectiveName.get(_e.SUBSCRIPTION_FILTER);if(!r)return;let i=(0,Ee.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,Xq.getMutableTypeNode)(n,r,this.errors);let a={kind:t.kind},o=Hl.DivergentType.NONE,c=a;for(let l=0;lnew Set))}upsertFieldData(t,n,r){n.directivesByDirectiveName.has(_e.SEMANTIC_NON_NULL)&&this.referencedPersistedDirectiveNames.add(_e.SEMANTIC_NON_NULL);let i=t.get(n.name),a=i||this.copyFieldData(n,r||(0,Ie.isNodeDataInaccessible)(n));(0,Ee.getValueOrDefault)(this.coordsByNamedTypeName,n.namedTypeName,()=>new Set).add(a.federatedCoords),this.namedOutputTypeNames.add(n.namedTypeName),this.handleSubscriptionFilterDirective(n,a),(0,Ie.extractPersistedDirectives)(a.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName);let o=r||(0,Ie.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,Ee.getValueOrDefault)(this.subgraphNamesByNamedTypeNameByFieldCoords,a.federatedCoords,()=>new Map),d=(0,Ee.getValueOrDefault)(l,a.namedTypeName,()=>new Set);if(d.size<1)for(let f of a.subgraphNames)n.subgraphNames.has(f)||d.add(f);(0,Ee.addIterableValuesToSet)(n.subgraphNames,(0,Ee.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,Ee.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,i.configureDescriptionDataBySubgraphName),(0,Ie.setLongestDescription)(a,n),a.isInaccessible||(a.isInaccessible=n.isInaccessible),(0,Ee.addNewObjectValueMapEntries)(n.externalFieldDataBySubgraphName,a.externalFieldDataBySubgraphName),(0,Ee.addMapEntries)(n.isShareableBySubgraphName,a.isShareableBySubgraphName),(0,Ee.addMapEntries)(n.nullLevelsBySubgraphName,a.nullLevelsBySubgraphName),(0,Ee.addIterableValuesToSet)(n.subgraphNames,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,Ee.getValueOrDefault)(this.tagNamesByCoords,r,()=>new Set);for(let a of t.persistedDirectivesData.tagDirectiveByName.keys())i.add(a)}copyMutualParentDefinitionData(t){return{configureDescriptionDataBySubgraphName:(0,Ee.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByDirectiveName:(0,Ee.copyArrayValueMap)(t.directivesByDirectiveName),extensionType:t.extensionType,name:t.name,persistedDirectivesData:(0,Ie.extractPersistedDirectives)((0,Ie.newPersistedDirectivesData)(),t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),description:(0,Ie.getInitialFederatedDescription)(t)}}copyEnumValueData(t){return{appearances:t.appearances,configureDescriptionDataBySubgraphName:(0,Ee.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),federatedCoords:t.federatedCoords,directivesByDirectiveName:(0,Ee.copyArrayValueMap)(t.directivesByDirectiveName),kind:t.kind,name:t.name,node:{directives:[],kind:t.kind,name:(0,kr.stringToNameNode)(t.name)},parentTypeName:t.parentTypeName,persistedDirectivesData:(0,Ie.extractPersistedDirectives)((0,Ie.newPersistedDirectivesData)(),t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),subgraphNames:new Set(t.subgraphNames),description:(0,Ie.getInitialFederatedDescription)(t)}}copyInputValueData(t){return{configureDescriptionDataBySubgraphName:(0,Ee.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByDirectiveName:(0,Ee.copyArrayValueMap)(t.directivesByDirectiveName),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:Fe.Kind.INPUT_VALUE_DEFINITION,name:(0,kr.stringToNameNode)(t.name),type:t.type},originalCoords:t.originalCoords,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:(0,Ie.extractPersistedDirectives)((0,Ie.newPersistedDirectivesData)(),t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),renamedParentTypeName:t.renamedParentTypeName,requiredSubgraphNames:new Set(t.requiredSubgraphNames),subgraphNames:new Set(t.subgraphNames),type:t.type,defaultValue:t.defaultValue,description:(0,Ie.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,Ee.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 t.directivesByDirectiveName.has(_e.SEMANTIC_NON_NULL)&&this.referencedPersistedDirectiveNames.add(_e.SEMANTIC_NON_NULL),{argumentDataByName:this.copyInputValueDataByValueName(t.argumentDataByName,n,t.federatedCoords),configureDescriptionDataBySubgraphName:(0,Ee.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByDirectiveName:(0,Ee.copyArrayValueMap)(t.directivesByDirectiveName),externalFieldDataBySubgraphName:(0,Ee.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:(0,Ie.extractPersistedDirectives)((0,Ie.newPersistedDirectivesData)(),t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),renamedParentTypeName:t.renamedParentTypeName,subgraphNames:new Set(t.subgraphNames),type:t.type,description:(0,Ie.getInitialFederatedDescription)(t)}}copyEnumValueDataByValueName(t,n){let r=new Map;for(let[i,a]of t){let o=this.copyEnumValueData(a);this.recordTagNamesByCoords(o,o.federatedCoords),(n||(0,Ie.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,Ie.isNodeDataInaccessible)(a),c=this.copyFieldData(a,o);this.handleSubscriptionFilterDirective(c),(0,Ee.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 Fe.Kind.ENUM_TYPE_DEFINITION:return Y(x({},n),{appearances:t.appearances,enumValueDataByValueName:this.copyEnumValueDataByValueName(t.enumValueDataByValueName,t.isInaccessible),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,kr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Fe.Kind.INPUT_OBJECT_TYPE_DEFINITION:return Y(x({},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 Fe.Kind.INTERFACE_TYPE_DEFINITION:return Y(x({},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)},subgraphNames:new Set(t.subgraphNames)});case Fe.Kind.OBJECT_TYPE_DEFINITION:return Y(x({},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 Fe.Kind.SCALAR_TYPE_DEFINITION:return Y(x({},n),{kind:t.kind,node:{kind:t.kind,name:(0,kr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Fe.Kind.UNION_TYPE_DEFINITION:return Y(x({},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,Ie.isParentDataRootType)(r)&&(r.extensionType=eV.ExtensionType.NONE),r}return(0,Ie.extractPersistedDirectives)(t.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),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,Ie.isNodeDataInaccessible)(a);if(o&&this.inaccessibleCoords.add(a.name),r&&r.interfaceObjectSubgraphs.has(n)&&(a.kind=Fe.Kind.INTERFACE_TYPE_DEFINITION,a.node.kind=Fe.Kind.INTERFACE_TYPE_DEFINITION),!i){this.parentDefinitionDataByTypeName.set(a.name,a);return}if(a.kind!==t.kind&&(!r||!r.interfaceObjectSubgraphs.has(n)||a.kind!==Fe.Kind.INTERFACE_TYPE_DEFINITION||t.kind!==Fe.Kind.OBJECT_TYPE_DEFINITION)){this.errors.push((0,Pe.incompatibleParentKindMergeError)(a.name,(0,Ee.kindToNodeType)(a.kind),(0,Ee.kindToNodeType)(t.kind)));return}switch((0,Ee.addNewObjectValueMapEntries)(t.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,Ie.setLongestDescription)(a,t),(0,Ie.setParentDataExtensionType)(a,t),a.kind){case Fe.Kind.ENUM_TYPE_DEFINITION:if(!(0,Ie.areKindsEqual)(a,t))return;a.appearances+=1,a.isInaccessible||(a.isInaccessible=o),(0,Ee.addIterableValuesToSet)(t.subgraphNames,a.subgraphNames);for(let l of t.enumValueDataByValueName.values())this.upsertEnumValueData(a.enumValueDataByValueName,l,o);return;case Fe.Kind.INPUT_OBJECT_TYPE_DEFINITION:if(!(0,Ie.areKindsEqual)(a,t))return;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ee.addIterableValuesToSet)(t.subgraphNames,a.subgraphNames);for(let l of t.inputValueDataByName.values())this.upsertInputValueData(a.inputValueDataByName,l,a.name,a.isInaccessible);return;case Fe.Kind.INTERFACE_TYPE_DEFINITION:case Fe.Kind.OBJECT_TYPE_DEFINITION:let c=t;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ee.addIterableValuesToSet)(c.implementedInterfaceTypeNames,a.implementedInterfaceTypeNames),(0,Ee.addIterableValuesToSet)(c.subgraphNames,a.subgraphNames);for(let l of c.fieldDataByName.values())this.upsertFieldData(a.fieldDataByName,l,a.isInaccessible);return;case Fe.Kind.UNION_TYPE_DEFINITION:if(!(0,Ie.areKindsEqual)(a,t))return;(0,Ee.addMapEntries)(t.memberByMemberTypeName,a.memberByMemberTypeName),(0,Ee.addIterableValuesToSet)(t.subgraphNames,a.subgraphNames);return;default:(0,Ee.addIterableValuesToSet)(t.subgraphNames,a.subgraphNames);return}}propagateInaccessibilityToExistingChildren(t){switch(t.kind){case Fe.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.argumentDataByArgumentName.values())this.namedInputValueTypeNames.add(o.namedTypeName),this.upsertInputValueData(a,o,`@${t.name}`,!1);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.set(r,{argumentDataByArgumentName: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,Ie.setMutualExecutableLocations)(i,t.executableLocations),i.executableLocations.size<1){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}for(let a of t.argumentDataByArgumentName.values())this.namedInputValueTypeNames.add((0,Xq.getTypeNodeNamedTypeName)(a.type)),this.upsertInputValueData(i.argumentDataByArgumentName,a,`@${i.name}`,!1);(0,Ie.setLongestDescription)(i,t),i.repeatable&&(i.repeatable=t.repeatable),(0,Ee.addIterableValuesToSet)(t.subgraphNames,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 Fe.Kind.UNION_TYPE_DEFINITION:{if(l){this.errors.push((0,Pe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}l=f;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 f of o.keys()){d=f;for(let[y,I]of o)if(f!==y&&!I.implementedInterfaceTypeNames.has(f)){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,Ale.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 f of i.satisfiedFieldSets)c.satisfiedFieldSets.add(f),a.has(f)&&l.addTargetSubgraphByFieldSet(f,o);let d=r.fieldDatasBySubgraphName.get(o);for(let{name:f,namedTypeName:y}of d||[])this.internalGraph.addEdge(c,this.internalGraph.addOrUpdateNode(y),f);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,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,n,_e.PARENT_DEFINITION_DATA);if(i.kind===Fe.Kind.INTERFACE_TYPE_DEFINITION)for(let a of r.interfaceObjectSubgraphs){let o=(0,Ee.getOrThrowError)(this.internalSubgraphBySubgraphName,a,"internalSubgraphBySubgraphName"),c=o.configurationDataByTypeName,l=this.concreteTypeNamesByAbstractTypeName.get(n);if(!l)continue;let d=(0,Ee.getOrThrowError)(c,n,"configurationDataByTypeName"),f=d.keys;if(!f)continue;d.entityInterfaceConcreteTypeNames=new Set(r.concreteTypeNames),this.internalGraph.setSubgraphName(a);let y=this.internalGraph.addOrUpdateNode(n,{isAbstract:!0});for(let I of l){let v=(0,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,I,_e.PARENT_DEFINITION_DATA);if(!(0,Mr.isObjectDefinitionData)(v))continue;let P=(0,Ee.getOrThrowError)(this.entityDataByTypeName,I,"entityDataByTypeName");P.subgraphNames.add(a);let k=c.get(I);if(k)if((0,Ee.addIterableValuesToSet)(d.fieldNames,k.fieldNames),!k.keys)k.keys=[...f];else e:for(let ie of f){for(let{selectionSet:Te}of k.keys)if(ie.selectionSet===Te)continue e;k.keys.push(ie)}else c.set(I,{fieldNames:new Set(d.fieldNames),isRootNode:!0,keys:[...f],typeName:I});let K=new Set;for(let ie of f.filter(Te=>!Te.disableEntityResolver))K.add(ie.selectionSet);let Q=this.authorizationDataByParentTypeName.get(n),se=(0,Ee.getOrThrowError)(o.parentDefinitionDataByTypeName,n,"internalSubgraph.parentDefinitionDataByTypeName");if((0,Mr.isObjectDefinitionData)(se)){for(let[ie,Te]of se.fieldDataByName){let de=`${I}.${ie}`;(0,Ee.getValueOrDefault)(this.fieldCoordsByNamedTypeName,Te.namedTypeName,()=>new Set).add(de);let Re=Q==null?void 0:Q.fieldAuthDataByFieldName.get(ie);if(Re){let ee=(0,Ee.getValueOrDefault)(this.authorizationDataByParentTypeName,I,()=>(0,Mr.newAuthorizationData)(I));(0,Mr.upsertFieldAuthorizationData)(ee.fieldAuthDataByFieldName,Re)||this.invalidORScopesCoords.add(de)}let xe=v.fieldDataByName.get(ie);if(xe){let ee=(t=Te.isShareableBySubgraphName.get(a))!=null?t:!1;xe.isShareableBySubgraphName.set(a,ee),xe.subgraphNames.add(a);let Se=Te.externalFieldDataBySubgraphName.get(a);if(!Se)continue;xe.externalFieldDataBySubgraphName.set(a,x({},Se));continue}let tt=i.isInaccessible||v.isInaccessible||Te.isInaccessible;v.fieldDataByName.set(ie,this.copyFieldData(Te,tt))}this.handleInterfaceObjectForInternalGraph({internalSubgraph:o,subgraphName:a,interfaceObjectData:r,interfaceObjectNode:y,resolvableKeyFieldSets:K,entityData:P})}}}}}fieldDataToGraphFieldData(t){var n;return{name:t.name,namedTypeName:t.namedTypeName,isLeaf:(0,Mr.isNodeLeaf)((n=this.parentDefinitionDataByTypeName.get(t.namedTypeName))==null?void 0:n.kind),subgraphNames:t.subgraphNames}}getValidFlattenedPersistedDirectiveNodeArray(t){var i;let n=(0,Mr.getNodeCoords)(t),r=[];for(let[a,o]of t.persistedDirectivesData.directivesByDirectiveName){if(a===_e.SEMANTIC_NON_NULL&&(0,Ie.isFieldData)(t)){r.push((0,Ee.generateSemanticNonNullDirective)((i=(0,Ee.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,Ie.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,Sc.getDescriptionFromString)(r);if(n.length<1)return t.description;this.errors.push((0,Pe.configureDescriptionPropagationError)((0,Ie.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,Ie.isTypeRequired)(c.type)&&i.push({inputValueName:o,missingSubgraphs:(0,Ee.getEntriesNotInHashSet)(t.subgraphNames,c.subgraphNames),requiredSubgraphs:[...c.requiredSubgraphNames]});return i.length>0?this.errors.push((0,Pe.invalidRequiredInputValueError)(_e.FIELD,a,i)):r.length>0&&((0,Ee.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.directivesByDirectiveName.has(_e.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,Rle.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,Ee.kindToNodeType)(r.kind),n)),r.kind){case Fe.Kind.ENUM_TYPE_DEFINITION:{let i=[],a=[],o=this.getEnumValueMergeMethod(n);(0,Ie.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n));for(let c of r.enumValueDataByValueName.values()){let l=(0,Ie.getNodeForRouterSchemaByData)(c,this.persistedDirectiveDefinitionByDirectiveName,this.errors),d=(0,Ie.isNodeDataInaccessible)(c),f=Y(x({},c.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(c)});switch(o){case Ie.MergeMethod.CONSISTENT:!d&&r.appearances>c.appearances&&this.errors.push((0,Pe.incompatibleSharedEnumError)(n)),i.push(l),d||a.push(f);break;case Ie.MergeMethod.INTERSECTION:r.appearances===c.appearances&&(i.push(l),d||a.push(f));break;default:i.push(l),d||a.push(f);break}}if(r.node.values=i,this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,Ie.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ee.kindToNodeType)(r.kind),n,_e.ENUM_VALUE));break}this.clientDefinitions.push(Y(x({},r.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(r),values:a}));break}case Fe.Kind.INPUT_OBJECT_TYPE_DEFINITION:{let i=new Array,a=new Array,o=new Array,c=new Set;for(let[l,d]of r.inputValueDataByName)if((0,Ie.isTypeRequired)(d.type)&&c.add(l),r.subgraphNames.size===d.subgraphNames.size){if(a.push(this.getNodeWithPersistedDirectivesByInputValueData(d)),(0,Ie.isNodeDataInaccessible)(d))continue;o.push(Y(x({},d.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(d)}))}else(0,Ie.isTypeRequired)(d.type)&&i.push({inputValueName:l,missingSubgraphs:(0,Ee.getEntriesNotInHashSet)(r.subgraphNames,d.subgraphNames),requiredSubgraphs:[...d.requiredSubgraphNames]});if(i.length>0){this.errors.push((0,Pe.invalidRequiredInputValueError)(_e.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,Ie.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r);break}if(o.length<1){this.errors.push((0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ee.kindToNodeType)(r.kind),n,"Input field"));break}this.clientDefinitions.push(Y(x({},r.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(r),fields:o}));break}case Fe.Kind.INTERFACE_TYPE_DEFINITION:case Fe.Kind.OBJECT_TYPE_DEFINITION:{let i=[],a=[],o=new Map,c=(0,Ie.newInvalidFieldNames)(),l=r.kind===Fe.Kind.OBJECT_TYPE_DEFINITION,d=this.authorizationDataByParentTypeName.get(n);(0,Ie.propagateAuthDirectives)(r,d);for(let[y,I]of r.fieldDataByName){(0,Ie.propagateFieldAuthDirectives)(I,d);let v=this.getValidFieldArgumentNodes(I);l&&(0,Ie.validateExternalAndShareable)(I,c),this.validateSemanticNonNull(I),i.push(this.getNodeWithPersistedDirectivesByFieldData(I,v)),!(0,Ie.isNodeDataInaccessible)(I)&&(a.push((0,Ie.getClientSchemaFieldNodeByFieldData)(I)),o.set(y,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 f=(0,ble.isNodeQuery)(n);if((0,Ie.isNodeDataInaccessible)(r)){if(f){this.errors.push(Pe.inaccessibleQueryRootTypeError);break}this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){let y=f?(0,Pe.noQueryRootTypeError)(!1):(0,Pe.allChildDefinitionsAreInaccessibleError)((0,Ee.kindToNodeType)(r.kind),n,_e.FIELD);this.errors.push(y);break}this.clientDefinitions.push(Y(x({},r.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(r),fields:a}));break}case Fe.Kind.SCALAR_TYPE_DEFINITION:{if(Bt.BASE_SCALARS.has(n))break;if((0,Ie.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n)),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,Ie.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}this.clientDefinitions.push(Y(x({},r.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(r)}));break}case Fe.Kind.UNION_TYPE_DEFINITION:{if(r.node.types=(0,Mr.mapToArrayOfValues)(r.memberByMemberTypeName),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,Ie.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)(_e.UNION,n,"union member type"));break}this.clientDefinitions.push(Y(x({},r.node),{directives:(0,Ie.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(_e.PERIOD);switch(o.length){case 2:{let c=(0,Ee.getValueOrDefault)(this.authorizationDataByParentTypeName,o[0],()=>(0,Mr.newAuthorizationData)(o[0])),l=(0,Ee.getValueOrDefault)(c.fieldAuthDataByFieldName,o[1],()=>(0,Mr.newFieldAuthorizationData)(o[1]));(t=l.inheritedData).requiresAuthentication||(t.requiresAuthentication=r.requiresAuthentication),l.inheritedData.requiredScopes.length*r.requiredScopes.length>Bt.MAX_OR_SCOPES?this.invalidORScopesCoords.add(a):(l.inheritedData.requiredScopesByOR=(0,Mr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopesByOR,r.requiredScopesByOR),l.inheritedData.requiredScopes=(0,Mr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopes,r.requiredScopes));break}default:break}}}}federateSubgraphData(){this.federateInternalSubgraphData(),this.handleEntityInterfaces(),this.generateTagData(),this.pushVersionTwoDirectiveDefinitionsToDocumentDefinitions(),this.pushNamedTypeAuthDataToFields()}validateInterfaceImplementationsAndPushToDocumentDefinitions(t){for(let{data:n,clientSchemaFieldNodes:r}of t){if(n.node.interfaces=this.getValidImplementedInterfaces(n),this.routerDefinitions.push((0,Ie.getNodeForRouterSchemaByData)(n,this.persistedDirectiveDefinitionByDirectiveName,this.errors)),(0,Ie.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(Y(x({},n.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(n),fields:r,interfaces:i}))}}pushVersionTwoDirectiveDefinitionsToDocumentDefinitions(){if(!this.isVersionTwo){this.referencedPersistedDirectiveNames.has(_e.SEMANTIC_NON_NULL)&&(this.clientDefinitions.push(Bt.SEMANTIC_NON_NULL_DEFINITION),this.routerDefinitions=[Bt.DEPRECATED_DEFINITION,Bt.SEMANTIC_NON_NULL_DEFINITION,Bt.TAG_DEFINITION]);return}if(this.referencedPersistedDirectiveNames.has(_e.SEMANTIC_NON_NULL)){this.clientDefinitions.push(Bt.SEMANTIC_NON_NULL_DEFINITION),this.routerDefinitions=[Bt.AUTHENTICATED_DEFINITION,Bt.DEPRECATED_DEFINITION,Bt.INACCESSIBLE_DEFINITION,Bt.REQUIRES_SCOPES_DEFINITION,Bt.SEMANTIC_NON_NULL_DEFINITION,Bt.TAG_DEFINITION,Bt.SCOPE_SCALAR_DEFINITION];return}this.routerDefinitions=[Bt.AUTHENTICATED_DEFINITION,Bt.DEPRECATED_DEFINITION,Bt.INACCESSIBLE_DEFINITION,Bt.REQUIRES_SCOPES_DEFINITION,Bt.TAG_DEFINITION,Bt.SCOPE_SCALAR_DEFINITION]}validatePathSegmentInaccessibility(t){if(!t)return!1;let r=t.split(_e.LEFT_PARENTHESIS)[0].split(_e.PERIOD),i=r[0];for(let a=0;a0&&this.errors.push((0,Pe.invalidReferencesOfInaccessibleTypeError)((0,Ee.kindToNodeType)(t.kind),t.name,r))}validateQueryRootType(){let t=this.parentDefinitionDataByTypeName.get(_e.QUERY);if(!t||t.kind!==Fe.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size<1){this.errors.push((0,Pe.noQueryRootTypeError)());return}for(let n of t.fieldDataByName.values())if(!(0,Ie.isNodeDataInaccessible)(n))return;this.errors.push((0,Pe.noQueryRootTypeError)())}validateSubscriptionFieldConditionFieldPath(t,n,r,i,a){let o=t.split(_e.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?`.${f}`:f,c.kind!==Fe.Kind.OBJECT_TYPE_DEFINITION)return a.push((0,Pe.invalidSubscriptionFieldConditionFieldPathParentErrorMessage)(r,t,l)),[];let y=c.fieldDataByName.get(f);if(!y)return a.push((0,Pe.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,f,c.renamedTypeName)),[];let I=`${c.renamedTypeName}.${f}`;if(!y.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(Bt.BASE_SCALARS.has(y.namedTypeName)){c={kind:Fe.Kind.SCALAR_TYPE_DEFINITION,name:y.namedTypeName};continue}c=(0,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,y.namedTypeName,_e.PARENT_DEFINITION_DATA)}return(0,Ie.isLeafKind)(c.kind)?o:(a.push((0,Pe.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage)(r,t,o[o.length-1],(0,Ee.kindToNodeType)(c.kind),c.name)),[])}validateSubscriptionFieldCondition(t,n,r,i,a,o,c){if(i>wE.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return c.push((0,Pe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;let l=!1,d=new Set([_e.FIELD_PATH,_e.VALUES]),f=new Set,y=new Set,I=[];for(let v of t.fields){let P=v.name.value,k=a+`.${P}`;switch(P){case _e.FIELD_PATH:{if(d.has(_e.FIELD_PATH))d.delete(_e.FIELD_PATH);else{l=!0,f.add(_e.FIELD_PATH);break}if(v.value.kind!==Fe.Kind.STRING){I.push((0,Pe.invalidInputFieldTypeErrorMessage)(k,_e.STRING,(0,Ee.kindToNodeType)(v.value.kind))),l=!0;break}let K=this.validateSubscriptionFieldConditionFieldPath(v.value.value,r,k,o,I);if(K.length<1){l=!0;break}n.fieldPath=K;break}case _e.VALUES:{if(d.has(_e.VALUES))d.delete(_e.VALUES);else{l=!0,f.add(_e.VALUES);break}let K=v.value.kind;if(K==Fe.Kind.NULL||K==Fe.Kind.OBJECT){I.push((0,Pe.invalidInputFieldTypeErrorMessage)(k,_e.LIST,(0,Ee.kindToNodeType)(v.value.kind))),l=!0;break}if(K!==Fe.Kind.LIST){n.values=[(0,Ie.getSubscriptionFilterValue)(v.value)];break}let Q=new Set,se=[];for(let ie=0;ie0){I.push((0,Pe.subscriptionFieldConditionInvalidValuesArrayErrorMessage)(k,se));continue}if(Q.size<1){l=!0,I.push((0,Pe.subscriptionFieldConditionEmptyValuesArrayErrorMessage)(k));continue}n.values=[...Q];break}default:l=!0,y.add(P)}}return l?(c.push((0,Pe.subscriptionFieldConditionInvalidInputFieldErrorMessage)(a,[...d],[...f],[...y],I)),!1):!0}validateSubscriptionFilterCondition(t,n,r,i,a,o,c){if(i>wE.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(!Zq.SUBSCRIPTION_FILTER_INPUT_NAMES.has(d))return c.push((0,Pe.subscriptionFilterConditionInvalidInputFieldErrorMessage)(a,d)),!1;let f=a+`.${d}`;switch(l.value.kind){case Fe.Kind.OBJECT:switch(d){case _e.IN_UPPER:return n.in={fieldPath:[],values:[]},this.validateSubscriptionFieldCondition(l.value,n.in,r,i,a+".IN",o,c);case _e.NOT_UPPER:return n.not={},this.validateSubscriptionFilterCondition(l.value,n.not,r,i,a+".NOT",o,c);default:return c.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(f,_e.LIST,_e.OBJECT)),!1}case Fe.Kind.LIST:{let y=[];switch(d){case _e.AND_UPPER:{n.and=y;break}case _e.OR_UPPER:{n.or=y;break}default:return c.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(f,_e.OBJECT,_e.LIST)),!1}let I=l.value.values.length;if(I<1||I>5)return c.push((0,Pe.subscriptionFilterArrayConditionInvalidLengthErrorMessage)(f,I)),!1;let v=!0,P=[];for(let k=0;k0?(c.push((0,Pe.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage)(f,P)),!1):v}default:{let y=Zq.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES.has(d)?_e.LIST:_e.OBJECT;return c.push((0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(f,y,(0,Ee.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!==Fe.Kind.OBJECT){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(r,[(0,Pe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(_e.CONDITION,_e.OBJECT,(0,Ee.kindToNodeType)(c.value.kind))]));return}let l={},d=[];if(!this.validateSubscriptionFilterCondition(c.value,l,n,0,_e.CONDITION,o,d)){this.errors.push((0,Pe.invalidSubscriptionFilterDirectiveError)(r,d)),this.isMaxDepth=!1;return}(0,Ee.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,Ie.isNodeDataInaccessible)(r)||r.kind===Fe.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)(Bt.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));for(let a of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,Ie.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.length>0)return{errors:a,success:!1,warnings:this.warnings}}let n={kind:Fe.Kind.DOCUMENT,definitions:this.routerDefinitions},r=(0,Fe.buildASTSchema)({kind:Fe.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),i=new Map;for(let a of this.internalSubgraphBySubgraphName.values())i.set(a.name,{configurationDataByTypeName:a.configurationDataByTypeName,isVersionTwo:a.isVersionTwo,parentDefinitionDataByTypeName:a.parentDefinitionDataByTypeName,schema:a.schema});for(let a of this.authorizationDataByParentTypeName.values())(0,Mr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,a);return x({fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),subgraphConfigBySubgraphName:i,federatedGraphAST:n,federatedGraphSchema:(0,Fe.buildASTSchema)(n,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:r,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,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,Ee.getOrThrowError)(n,o,`${t.name}.childDataByChildName`);if((0,Ie.isNodeDataInaccessible)(l)){a-=1;continue}i.isDisjointFrom(c.tagNames)||((0,Ee.getValueOrDefault)(l.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}handleChildTagInclusions(t,n,r,i){let a=n.size;for(let[o,c]of n){if((0,Ie.isNodeDataInaccessible)(c)){a-=1;continue}let l=r.get(o);(!l||i.isDisjointFrom(l.tagNames))&&((0,Ee.getValueOrDefault)(c.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}buildFederationContractResult(t){if(this.isVersionTwo||this.routerDefinitions.push(Bt.INACCESSIBLE_DEFINITION),t.tagNamesToExclude.size>0)for(let[o,c]of this.parentTagDataByTypeName){let l=(0,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,o,_e.PARENT_DEFINITION_DATA);if(!(0,Ie.isNodeDataInaccessible)(l)){if(!t.tagNamesToExclude.isDisjointFrom(c.tagNames)){l.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(!(c.childTagDataByChildName.size<1))switch(l.kind){case Fe.Kind.SCALAR_TYPE_DEFINITION:case Fe.Kind.UNION_TYPE_DEFINITION:break;case Fe.Kind.ENUM_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.enumValueDataByValueName,c.childTagDataByChildName,t.tagNamesToExclude);break}case Fe.Kind.INPUT_OBJECT_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.inputValueDataByName,c.childTagDataByChildName,t.tagNamesToExclude);break}default:{let d=l.fieldDataByName.size;for(let[f,y]of c.childTagDataByChildName){let I=(0,Ee.getOrThrowError)(l.fieldDataByName,f,`${o}.fieldDataByFieldName`);if((0,Ie.isNodeDataInaccessible)(I)){d-=1;continue}if(!t.tagNamesToExclude.isDisjointFrom(y.tagNames)){(0,Ee.getValueOrDefault)(I.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(I.federatedCoords),d-=1;continue}for(let[v,P]of y.tagNamesByArgumentName){let k=(0,Ee.getOrThrowError)(I.argumentDataByName,v,`${f}.argumentDataByArgumentName`);(0,Ie.isNodeDataInaccessible)(k)||t.tagNamesToExclude.isDisjointFrom(P)||((0,Ee.getValueOrDefault)(k.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(k.federatedCoords))}}d<1&&(l.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}}else if(t.tagNamesToInclude.size>0)for(let[o,c]of this.parentDefinitionDataByTypeName){if((0,Ie.isNodeDataInaccessible)(c))continue;let l=this.parentTagDataByTypeName.get(o);if(!l){c.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(t.tagNamesToInclude.isDisjointFrom(l.tagNames)){if(l.childTagDataByChildName.size<1){c.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}switch(c.kind){case Fe.Kind.SCALAR_TYPE_DEFINITION:case Fe.Kind.UNION_TYPE_DEFINITION:continue;case Fe.Kind.ENUM_TYPE_DEFINITION:this.handleChildTagInclusions(c,c.enumValueDataByValueName,l.childTagDataByChildName,t.tagNamesToInclude);break;case Fe.Kind.INPUT_OBJECT_TYPE_DEFINITION:this.handleChildTagInclusions(c,c.inputValueDataByName,l.childTagDataByChildName,t.tagNamesToInclude);break;default:let d=c.fieldDataByName.size;for(let[f,y]of c.fieldDataByName){if((0,Ie.isNodeDataInaccessible)(y)){d-=1;continue}let I=l.childTagDataByChildName.get(f);(!I||t.tagNamesToInclude.isDisjointFrom(I.tagNames))&&((0,Ee.getValueOrDefault)(y.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(y.federatedCoords),d-=1)}d<1&&(c.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration();for(let o of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,Ie.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:Fe.Kind.DOCUMENT,definitions:this.routerDefinitions},i=(0,Fe.buildASTSchema)({kind:Fe.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),a=new Map;for(let o of this.internalSubgraphBySubgraphName.values())a.set(o.name,{configurationDataByTypeName:o.configurationDataByTypeName,isVersionTwo:o.isVersionTwo,parentDefinitionDataByTypeName:o.parentDefinitionDataByTypeName,schema:o.schema});for(let o of this.authorizationDataByParentTypeName.values())(0,Mr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,o);return x({fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),subgraphConfigBySubgraphName:a,federatedGraphAST:r,federatedGraphSchema:(0,Fe.buildASTSchema)(r,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:i,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,success:!0,warnings:this.warnings},this.getClientSchemaObjectBoolean())}federateSubgraphsInternal(){return this.federateSubgraphData(),this.buildFederationResult()}};Oc.FederationFactory=LE;function nD({disableResolvabilityValidation:e,subgraphs:t}){if(t.length<1)return{errors:[Pe.minimumSubgraphRequirementError],success:!1,warnings:[]};let n=(0,Dle.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,f]of l.entityInterfaces){let y=r.get(d);if(!y){r.set(d,(0,Mr.newEntityInterfaceFederationData)(f,c));continue}(0,Mr.upsertEntityInterfaceFederationData)(y,f,c)}let a=new Array,o=new Map;for(let[c,l]of r){let d=l.concreteTypeNames.size;for(let[f,y]of l.subgraphDataByTypeName){let I=(0,Ee.getValueOrDefault)(o,f,()=>new Set);if((0,Ee.addIterableValuesToSet)(y.concreteTypeNames,I),!y.isInterfaceObject){y.resolvable&&y.concreteTypeNames.size!==d&&(0,Ee.getValueOrDefault)(i,c,()=>new Array).push({subgraphName:f,definedConcreteTypeNames:new Set(y.concreteTypeNames),requiredConcreteTypeNames:new Set(l.concreteTypeNames)});continue}(0,Ee.addIterableValuesToSet)(l.concreteTypeNames,I);let{parentDefinitionDataByTypeName:v}=(0,Ee.getOrThrowError)(n.internalSubgraphBySubgraphName,f,"internalSubgraphBySubgraphName"),P=[];for(let k of l.concreteTypeNames)v.has(k)&&P.push(k);P.length>0&&a.push((0,Pe.invalidInterfaceObjectImplementationDefinitionsError)(c,f,P))}}for(let[c,l]of i){let d=new Array;for(let f of l){let y=o.get(f.subgraphName);if(!y){d.push(f);continue}let I=f.requiredConcreteTypeNames.intersection(y);f.requiredConcreteTypeNames.size!==I.size&&(f.definedConcreteTypeNames=I,d.push(f))}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 LE({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 Fle({disableResolvabilityValidation:e,subgraphs:t}){let n=nD({subgraphs:t,disableResolvabilityValidation:e});return n.success?n.federationFactory.federateSubgraphsInternal():{errors:n.errors,success:!1,warnings:n.warnings}}function Ple({subgraphs:e,tagOptionsByContractName:t,disableResolvabilityValidation:n}){let r=nD({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,f]of t){l!==o&&i.push((0,tV.cloneDeep)(i[l]));let y=i[l].buildFederationContractResult(f);c.set(d,y),l++}return Y(x({},a),{federationResultByContractName:c})}function wle({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n}){let r=nD({subgraphs:n,disableResolvabilityValidation:t});return r.success?(r.federationFactory.federateSubgraphData(),r.federationFactory.buildFederationContractResult(e)):{errors:r.errors,success:!1,warnings:r.warnings}}});var CE=w(Ss=>{"use strict";m();T();N();Object.defineProperty(Ss,"__esModule",{value:!0});Ss.LATEST_ROUTER_COMPATIBILITY_VERSION=Ss.ROUTER_COMPATIBILITY_VERSIONS=Ss.ROUTER_COMPATIBILITY_VERSION_ONE=void 0;Ss.ROUTER_COMPATIBILITY_VERSION_ONE="1";Ss.ROUTER_COMPATIBILITY_VERSIONS=new Set([Ss.ROUTER_COMPATIBILITY_VERSION_ONE]);Ss.LATEST_ROUTER_COMPATIBILITY_VERSION="1"});var rV=w(Wp=>{"use strict";m();T();N();Object.defineProperty(Wp,"__esModule",{value:!0});Wp.federateSubgraphs=Lle;Wp.federateSubgraphsWithContracts=Cle;Wp.federateSubgraphsContract=Ble;var rD=nV(),iD=CE();function Lle({disableResolvabilityValidation:e,subgraphs:t,version:n=iD.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(n){default:return(0,rD.federateSubgraphs)({disableResolvabilityValidation:e,subgraphs:t})}}function Cle({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n,version:r=iD.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,rD.federateSubgraphsWithContracts)({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n})}}function Ble({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n,version:r=iD.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,rD.federateSubgraphsContract)({disableResolvabilityValidation:t,subgraphs:n,contractTagOptions:e})}}});var aV=w(iV=>{"use strict";m();T();N();Object.defineProperty(iV,"__esModule",{value:!0})});var sV=w(Xp=>{"use strict";m();T();N();Object.defineProperty(Xp,"__esModule",{value:!0});Xp.normalizeSubgraphFromString=Ule;Xp.normalizeSubgraph=kle;Xp.batchNormalize=Mle;var aD=XO(),sD=CE();function Ule(e,t=!0,n=sD.ROUTER_COMPATIBILITY_VERSION_ONE){switch(n){default:return(0,aD.normalizeSubgraphFromString)(e,t)}}function kle(e,t,n,r=sD.ROUTER_COMPATIBILITY_VERSION_ONE){switch(r){default:return(0,aD.normalizeSubgraph)(e,t,n)}}function Mle(e,t=sD.ROUTER_COMPATIBILITY_VERSION_ONE){switch(t){default:return(0,aD.batchNormalize)(e)}}});var uV=w(oV=>{"use strict";m();T();N();Object.defineProperty(oV,"__esModule",{value:!0})});var lV=w(cV=>{"use strict";m();T();N();Object.defineProperty(cV,"__esModule",{value:!0})});var pV=w(dV=>{"use strict";m();T();N();Object.defineProperty(dV,"__esModule",{value:!0})});var mV=w(fV=>{"use strict";m();T();N();Object.defineProperty(fV,"__esModule",{value:!0})});var NV=w(BE=>{"use strict";m();T();N();Object.defineProperty(BE,"__esModule",{value:!0});BE.COMPOSITION_VERSION=void 0;BE.COMPOSITION_VERSION="{{$COMPOSITION__VERSION}}"});var EV=w(TV=>{"use strict";m();T();N();Object.defineProperty(TV,"__esModule",{value:!0})});var yV=w(hV=>{"use strict";m();T();N();Object.defineProperty(hV,"__esModule",{value:!0})});var gV=w(IV=>{"use strict";m();T();N();Object.defineProperty(IV,"__esModule",{value:!0})});var UE=w(pt=>{"use strict";m();T();N();var xle=pt&&pt.__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]}),St=pt&&pt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&xle(t,e,n)};Object.defineProperty(pt,"__esModule",{value:!0});St(Jr(),pt);St(pv(),pt);St(oa(),pt);St(Fk(),pt);St(rV(),pt);St(aV(),pt);St(sV(),pt);St(uV(),pt);St(HO(),pt);St(GO(),pt);St(QO(),pt);St(CE(),pt);St(lV(),pt);St(zO(),pt);St(ou(),pt);St(Ip(),pt);St(yl(),pt);St(pV(),pt);St(mV(),pt);St(NV(),pt);St(ur(),pt);St(EV(),pt);St(Hr(),pt);St(UO(),pt);St(kN(),pt);St(tD(),pt);St(yV(),pt);St(PO(),pt);St($p(),pt);St(gV(),pt);St(xO(),pt);St(FE(),pt);St(CO(),pt);St(ys(),pt);St(Gp(),pt);St(Mp(),pt);St(Qp(),pt)});var wde={};um(wde,{buildRouterConfiguration:()=>Pde,federateSubgraphs:()=>Fde});m();T();N();var wc=us(UE());m();T();N();m();T();N();function oD(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 _V={};m();T();N();function vV(e){return e!=null}m();T();N();m();T();N();var AV=us(Ae(),1);m();T();N();var SV;if(typeof AggregateError=="undefined"){class e extends Error{constructor(n,r=""){super(r),this.errors=n,this.name="AggregateError",Error.captureStackTrace(this,e)}}SV=function(t,n){return new e(t,n)}}else SV=AggregateError;function OV(e){return"errors"in e&&Array.isArray(e.errors)}var RV=3;function FV(e){return kE(e,[])}function kE(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return qle(e,t);default:return String(e)}}function DV(e){return e instanceof AV.GraphQLError?e.toString():`${e.name}: ${e.message}; - ${e.stack}`}function qle(e,t){if(e===null)return"null";if(e instanceof Error)return OV(e)?DV(e)+` -`+bV(e.errors,t):DV(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(Vle(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:kE(r,n)}else if(Array.isArray(e))return bV(e,n);return jle(e,n)}function Vle(e){return typeof e.toJSON=="function"}function jle(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>RV?"["+Kle(e)+"]":"{ "+n.map(([i,a])=>i+": "+kE(a,t)).join(", ")+" }"}function bV(e,t){if(e.length===0)return"[]";if(t.length>RV)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 we=us(Ae(),1);m();T();N();var Ya=us(Ae(),1);function Ja(e){if((0,Ya.isNonNullType)(e)){let t=Ja(e.ofType);if(t.kind===Ya.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${FV(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:Ya.Kind.NON_NULL_TYPE,type:t}}else if((0,Ya.isListType)(e))return{kind:Ya.Kind.LIST_TYPE,type:Ja(e.ofType)};return{kind:Ya.Kind.NAMED_TYPE,name:{kind:Ya.Kind.NAME,value:e.name}}}m();T();N();var Ha=us(Ae(),1);function xE(e){if(e===null)return{kind:Ha.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=xE(n);r!=null&&t.push(r)}return{kind:Ha.Kind.LIST,values:t}}if(typeof e=="object"){let t=[];for(let n in e){let r=e[n],i=xE(r);i&&t.push({kind:Ha.Kind.OBJECT_FIELD,name:{kind:Ha.Kind.NAME,value:n},value:i})}return{kind:Ha.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:Ha.Kind.BOOLEAN,value:e};if(typeof e=="number"&&isFinite(e)){let t=String(e);return Gle.test(t)?{kind:Ha.Kind.INT,value:t}:{kind:Ha.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:Ha.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}var Gle=/^-?(?:0|[1-9][0-9]*)$/;m();T();N();m();T();N();function qE(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 lke=qE(function(t){let n=$le(t);return new Set([...n].map(r=>r.name))}),$le=qE(function(t){let n=uD(t);return new Set(n.values())}),uD=qE(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 Qle(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=Yle(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let c of o)(0,we.isSpecifiedDirective)(c)||a.push(Jle(c,e,n));for(let c in r){let l=r[c],d=(0,we.isSpecifiedScalarType)(l),f=(0,we.isIntrospectionType)(l);if(!(d||f))if((0,we.isObjectType)(l))a.push(Hle(l,e,n));else if((0,we.isInterfaceType)(l))a.push(zle(l,e,n));else if((0,we.isUnionType)(l))a.push(Wle(l,e,n));else if((0,we.isInputObjectType)(l))a.push(Xle(l,e,n));else if((0,we.isEnumType)(l))a.push(Zle(l,e,n));else if((0,we.isScalarType)(l))a.push(ede(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:we.Kind.DOCUMENT,definitions:a}}function PV(e,t={}){let n=Qle(e,t);return(0,we.print)(n)}function Yle(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 f of e.extensionASTNodes)a.push(f);for(let f of a)if(f.operationTypes)for(let y of f.operationTypes)i.set(y.operation,y);let o=uD(e);for(let[f,y]of i){let I=o.get(f);if(I!=null){let v=Ja(I);y!=null?y.type=v:i.set(f,{kind:we.Kind.OPERATION_TYPE_DEFINITION,operation:f,type:v})}}let c=[...i.values()].filter(vV),l=zl(e,e,t);if(!c.length&&!l.length)return null;let d={kind:c!=null?we.Kind.SCHEMA_DEFINITION:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,d}function Jle(e,t,n){var r,i,a,o;return{kind:we.Kind.DIRECTIVE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:we.Kind.STRING,value:e.description}:void 0,name:{kind:we.Kind.NAME,value:e.name},arguments:(a=e.args)===null||a===void 0?void 0:a.map(c=>wV(c,t,n)),repeatable:e.isRepeatable,locations:((o=e.locations)===null||o===void 0?void 0:o.map(c=>({kind:we.Kind.NAME,value:c})))||[]}}function zl(e,t,n){let r=ME(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=cD(t,r);else{a=[];for(let o of i)o.directives&&a.push(...o.directives)}return a}function jE(e,t,n){var r,i;let a=[],o=null,c=ME(e,n),l;return c!=null?l=cD(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=rde(e.deprecationReason)),o==null?a:[o].concat(a)}function wV(e,t,n){var r,i,a;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},type:Ja(e.type),defaultValue:e.defaultValue!==void 0&&(a=(0,we.astFromValue)(e.defaultValue,e.type))!==null&&a!==void 0?a:void 0,directives:jE(e,t,n)}}function Hle(e,t,n){var r,i;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(a=>LV(a,t,n)),interfaces:Object.values(e.getInterfaces()).map(a=>Ja(a)),directives:zl(e,t,n)}}function zle(e,t,n){var r,i;let a={kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(o=>LV(o,t,n)),directives:zl(e,t,n)};return"getInterfaces"in e&&(a.interfaces=Object.values(e.getInterfaces()).map(o=>Ja(o))),a}function Wle(e,t,n){var r,i;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},directives:zl(e,t,n),types:e.getTypes().map(a=>Ja(a))}}function Xle(e,t,n){var r,i;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(a=>tde(a,t,n)),directives:zl(e,t,n)}}function Zle(e,t,n){var r,i;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(a=>nde(a,t,n)),directives:zl(e,t,n)}}function ede(e,t,n){var r,i,a;let o=ME(e,n),c=o?cD(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(VE("specifiedBy",d))}return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},directives:c}}function LV(e,t,n){var r,i;return{kind:we.Kind.FIELD_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},arguments:e.args.map(a=>wV(a,t,n)),type:Ja(e.type),directives:jE(e,t,n)}}function tde(e,t,n){var r,i,a;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},type:Ja(e.type),directives:jE(e,t,n),defaultValue:(a=(0,we.astFromValue)(e.defaultValue,e.type))!==null&&a!==void 0?a:void 0}}function nde(e,t,n){var r,i;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},directives:jE(e,t,n)}}function rde(e){return VE("deprecated",{reason:e},we.GraphQLDeprecatedDirective)}function VE(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,we.astFromValue)(o,i.type);c&&r.push({kind:we.Kind.ARGUMENT,name:{kind:we.Kind.NAME,value:a},value:c})}}else for(let i in t){let a=t[i],o=xE(a);o&&r.push({kind:we.Kind.ARGUMENT,name:{kind:we.Kind.NAME,value:i},value:o})}return{kind:we.Kind.DIRECTIVE,name:{kind:we.Kind.NAME,value:e},arguments:r}}function cD(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(VE(r,o,a));else n.push(VE(r,i,a))}return n}var ad=us(UE(),1);m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();function ln(e,t){if(!e)throw new Error(t)}var ide=34028234663852886e22,ade=-34028234663852886e22,sde=4294967295,ode=2147483647,ude=-2147483648;function Wl(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>ode||esde||e<0)throw new Error("invalid uint 32: "+e)}function KE(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>ide||e({no:i.no,name:i.name,localName:e[i.no]})),r)}function dD(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let o of t){let c=kV(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 UV(e,t,n){let r={};for(let i of t){let a=kV(i);r[a.localName]=a.no,r[a.no]=a.localName}return lD(r,e,t,n),r}function kV(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}m();T();N();m();T();N();var Le=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 MV(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 Le),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 qV(){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 GE=4294967296;function pD(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>=GE&&(i=i+(r/GE|0),r=r%GE)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?jV(r,i):mD(r,i)}function VV(e,t){let n=mD(e,t),r=n.hi&2147483648;r&&(n=jV(n.lo,n.hi));let i=fD(n.lo,n.hi);return r?"-"+i:i}function fD(e,t){if({lo:e,hi:t}=cde(e,t),t<=2097151)return String(GE*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()+xV(o)+xV(a)}function cde(e,t){return{lo:e>>>0,hi:t>>>0}}function mD(e,t){return{lo:e|0,hi:t|0}}function jV(e,t){return t=~t,e?e=~e+1:t+=1,mD(e,t)}var xV=e=>{let t=String(e);return"0000000".slice(t.length)+t};function ND(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 KV(){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 lde(){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 O!="object"||typeof O.env!="object"||O.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||dln(/^-?[0-9]+$/.test(i),`int64 invalid: ${i}`),r=i=>ln(/^[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),pD(i)},uEnc(i){return typeof i!="string"&&(i=i.toString()),r(i),pD(i)},dec(i,a){return VV(i,a)},uDec(i,a){return fD(i,a)}}}var Kn=lde();m();T();N();var Ne;(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"})(Ne||(Ne={}));var Ta;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING"})(Ta||(Ta={}));function Os(e,t,n){if(t===n)return!0;if(e==Ne.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(Zp(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return Wl(t),ND(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){KE(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){Zp(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){Wl(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return Wl(t),t=(t<<1^t>>31)>>>0,ND(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=Kn.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=Kn.uEnc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}int64(t){let n=Kn.enc(t);return $E(n.lo,n.hi,this.buf),this}sint64(t){let n=Kn.enc(t),r=n.hi>>31,i=n.lo<<1^r,a=(n.hi<<1|n.lo>>>31)^r;return $E(i,a,this.buf),this}uint64(t){let n=Kn.uEnc(t);return $E(n.lo,n.hi,this.buf),this}},JE=class{constructor(t,n){this.varint64=qV,this.uint32=KV,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 Un.Varint:for(;this.buf[this.pos++]&128;);break;case Un.Bit64:this.pos+=4;case Un.Bit32:this.pos+=4;break;case Un.LengthDelimited:let r=this.uint32();this.pos+=r;break;case Un.StartGroup:let i;for(;(i=this.tag()[1])!==Un.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 Kn.dec(...this.varint64())}uint64(){return Kn.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),r=-(t&1);return t=(t>>>1|(n&1)<<31)^r,n=n>>>1^r,Kn.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 Kn.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Kn.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 GV(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 HE(e){let t=e.field.localName,n=Object.create(null);return n[t]=dde(e),[n,()=>n[t]]}function dde(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 Ea(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 $V(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 Ds="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),zE=[];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+=Ds[i|r>>4],i=(r&15)<<2,n=2;break;case 2:t+=Ds[i|r>>6],t+=Ds[r&63],n=0;break}return n&&(t+=Ds[i],t+="=",n==1&&(t+="=")),t}};m();T();N();function QV(e,t,n){JV(t,e);let r=t.runtime.bin.makeReadOptions(n),i=$V(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,o]=HE(t);for(let c of i)t.runtime.bin.readField(a,r.readerFactory(c.data),t.field,c.wireType,r);return o()}function YV(e,t,n,r){JV(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(ED(e,t)){let d=e.getType().runtime.bin.listUnknownFields(e).filter(f=>f.no!=t.field.no);e.getType().runtime.bin.discardUnknownFields(e);for(let f of d)e.getType().runtime.bin.onUnknownField(e,f.no,f.wireType,f.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 JV(e,t){ln(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}m();T();N();function WE(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:!QE(e.T,t[n]);case"message":return t[n]!==void 0;case"map":return Object.keys(t[n]).length>0}}function hD(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?Ea(e.T,e.L):void 0;break;case"message":t[n]=void 0;break}}m();T();N();m();T();N();function ha(e,t){if(e===null||typeof e!="object"||!Object.getOwnPropertyNames(Le.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 XE(e,t){return ha(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}var KMe={"google.protobuf.DoubleValue":Ne.DOUBLE,"google.protobuf.FloatValue":Ne.FLOAT,"google.protobuf.Int64Value":Ne.INT64,"google.protobuf.UInt64Value":Ne.UINT64,"google.protobuf.Int32Value":Ne.INT32,"google.protobuf.UInt32Value":Ne.UINT32,"google.protobuf.BoolValue":Ne.BOOL,"google.protobuf.StringValue":Ne.STRING,"google.protobuf.BytesValue":Ne.BYTES};var HV={ignoreUnknownFields:!1},zV={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function pde(e){return e?Object.assign(Object.assign({},HV),e):HV}function fde(e){return e?Object.assign(Object.assign({},zV),e):zV}var th=Symbol(),ZE=Symbol();function ZV(){return{makeReadOptions:pde,makeWriteOptions:fde,readMessage(e,t,n,r){if(t==null||Array.isArray(t)||typeof t!="object")throw new Error(`cannot decode message ${e.typeName} from JSON: ${za(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)}WV(r,c,l,n,e)}else{let d=!1;if(a!=null&&a.findExtension&&o.startsWith("[")&&o.endsWith("]")){let f=a.findExtension(o.substring(1,o.length-1));if(f&&f.extendee.typeName==e.typeName){d=!0;let[y,I]=HE(f);WV(y,c,f.field,n,f),YV(r,f,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(!WE(i,e)){if(i.req)throw"required field not set";if(!t.emitDefaultValues||!Nde(i))continue}let o=i.oneof?e[i.oneof.localName].value:e[i.localName],c=XV(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&&ED(e,c)){let l=QV(e,c,t),d=XV(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 ef(e,t,n!=null?n:Ta.BIGINT,!0)},writeScalar(e,t,n){if(t!==void 0&&(n||QE(e,t)))return eh(e,t)},debug:za}}function za(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 WV(e,t,n,r,i){let a=n.localName;if(n.repeated){if(ln(n.kind!="map"),t===null)return;if(!Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${za(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: ${za(c)}`);switch(n.kind){case"message":o.push(n.T.fromJson(c,r));break;case"enum":let l=yD(n.T,c,r.ignoreUnknownFields,!0);l!==ZE&&o.push(l);break;case"scalar":try{o.push(ef(n.T,c,n.L,!0))}catch(d){let f=`cannot decode field ${i.typeName}.${n.name} from JSON: ${za(c)}`;throw d instanceof Error&&d.message.length>0&&(f+=`: ${d.message}`),new Error(f)}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: ${za(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=mde(n.K,c)}catch(f){let y=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${za(t)}`;throw f instanceof Error&&f.message.length>0&&(y+=`: ${f.message}`),new Error(y)}switch(n.V.kind){case"message":o[d]=n.V.T.fromJson(l,r);break;case"enum":let f=yD(n.V.T,l,r.ignoreUnknownFields,!0);f!==ZE&&(o[d]=f);break;case"scalar":try{o[d]=ef(n.V.T,l,Ta.BIGINT,!0)}catch(y){let I=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${za(t)}`;throw y instanceof Error&&y.message.length>0&&(I+=`: ${y.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];ha(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=yD(n.T,t,r.ignoreUnknownFields,!1);switch(l){case th:hD(n,e);break;case ZE:break;default:e[a]=l;break}break;case"scalar":try{let d=ef(n.T,t,n.L,!1);switch(d){case th:hD(n,e);break;default:e[a]=d;break}}catch(d){let f=`cannot decode field ${i.typeName}.${n.name} from JSON: ${za(t)}`;throw d instanceof Error&&d.message.length>0&&(f+=`: ${d.message}`),new Error(f)}break}}function mde(e,t){if(e===Ne.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1;break}return ef(e,t,Ta.BIGINT,!0).toString()}function ef(e,t,n,r){if(t===null)return r?Ea(e,n):th;switch(e){case Ne.DOUBLE:case Ne.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==Ne.FLOAT&&KE(i),i;case Ne.INT32:case Ne.FIXED32:case Ne.SFIXED32:case Ne.SINT32:case Ne.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==Ne.UINT32||e==Ne.FIXED32?Zp(a):Wl(a),a;case Ne.INT64:case Ne.SFIXED64:case Ne.SINT64:if(typeof t!="number"&&typeof t!="string")break;let o=Kn.parse(t);return n?o.toString():o;case Ne.FIXED64:case Ne.UINT64:if(typeof t!="number"&&typeof t!="string")break;let c=Kn.uParse(t);return n?c.toString():c;case Ne.BOOL:if(typeof t!="boolean")break;return t;case Ne.STRING:if(typeof t!="string")break;try{encodeURIComponent(t)}catch(l){throw new Error("invalid UTF8")}return t;case Ne.BYTES:if(t==="")return new Uint8Array(0);if(typeof t!="string")break;return TD.dec(t)}throw new Error}function yD(e,t,n,r){if(t===null)return e.typeName=="google.protobuf.NullValue"?0:r?e.values[0].no:th;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 ZE;break}throw new Error(`cannot decode enum ${e.typeName} from JSON: ${za(t)}`)}function Nde(e){return e.repeated||e.kind=="map"?!0:!(e.oneof||e.kind=="message"||e.opt||e.req)}function XV(e,t,n){if(e.kind=="map"){ln(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()]=ID(a,c,n.enumAsInteger);break}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){ln(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 ID(e.T,t,n.enumAsInteger);case"message":return XE(e.T,t).toJson(n)}}function ID(e,t,n){var r;if(ln(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 Ne.INT32:case Ne.SFIXED32:case Ne.SINT32:case Ne.FIXED32:case Ne.UINT32:return ln(typeof t=="number"),t;case Ne.FLOAT:case Ne.DOUBLE:return ln(typeof t=="number"),Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":t;case Ne.STRING:return ln(typeof t=="string"),t;case Ne.BOOL:return ln(typeof t=="boolean"),t;case Ne.UINT64:case Ne.FIXED64:case Ne.INT64:case Ne.SFIXED64:case Ne.SINT64:return ln(typeof t=="bigint"||typeof t=="string"||typeof t=="number"),t.toString();case Ne.BYTES:return ln(t instanceof Uint8Array),TD.enc(t)}}m();T();N();var Xl=Symbol("@bufbuild/protobuf/unknown-fields"),e1={readUnknownFields:!0,readerFactory:e=>new JE(e)},t1={writeUnknownFields:!0,writerFactory:()=>new YE};function Tde(e){return e?Object.assign(Object.assign({},e1),e):e1}function Ede(e){return e?Object.assign(Object.assign({},t1),e):t1}function a1(){return{makeReadOptions:Tde,makeWriteOptions:Ede,listUnknownFields(e){var t;return(t=e[Xl])!==null&&t!==void 0?t:[]},discardUnknownFields(e){delete e[Xl]},writeUnknownFields(e,t){let r=e[Xl];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[Xl])||(i[Xl]=[]),i[Xl].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=yde),a){let I=e[o];if(r==Un.LengthDelimited&&c!=Ne.STRING&&c!=Ne.BYTES){let P=t.uint32()+t.pos;for(;t.posha(I,y)?I:new y(I));else{let I=o[i];y.fieldWrapper?y.typeName==="google.protobuf.BytesValue"?a[i]=nf(I):a[i]=I:a[i]=ha(I,y)?I:new y(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)=>Os(r.T,o,a[c]));case"enum":return i.every((o,c)=>Os(Ne.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 Os(Ne.INT32,i,a);case"scalar":return Os(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 Os(Ne.INT32,i.value,a.value);case"scalar":return Os(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(f=>l.equals(i[f],a[f]));case"enum":return c.every(f=>Os(Ne.INT32,i[f],a[f]));case"scalar":let d=r.V.T;return c.every(f=>Os(d,i[f],a[f]))}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(ih);else if(i.kind=="map"){o=r[i.localName];for(let[c,l]of Object.entries(a))o[c]=ih(l)}else i.kind=="oneof"?o=i.findField(a.case)?{case:a.case,value:ih(a.value)}:{case:void 0}:o=ih(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 ih(e){if(e===void 0)return e;if(ha(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function nf(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function u1(e,t,n){return{syntax:e,json:ZV(),bin:a1(),util:Object.assign(Object.assign({},o1()),{newFieldList:t,initFields:n}),makeMessageType(r,i,a){return MV(this,r,i,a)},makeEnum:UV,makeEnumType:dD,getEnumType:BV,makeExtension(r,i,a){return GV(this,r,i,a)}}}m();T();N();var ah=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 gD(e,t){let n=d1(e);return t?n:Ode(Sde(n))}function c1(e){return gD(e,!1)}var l1=d1;function d1(e){let t=!1,n=[];for(let r=0;r`${e}$`,Sde=e=>vde.has(e)?p1(e):e,Ode=e=>_de.has(e)?p1(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=c1(t)}addField(t){ln(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 ah(e,t=>f1(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]=Ea(t.T,t.L);break;case"message":break}}});var Zl;(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"})(Zl||(Zl={}));B.util.setEnumType(Zl,"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 bs;(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"})(bs||(bs={}));B.util.setEnumType(bs,"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 As;(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"})(As||(As={}));B.util.setEnumType(As,"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 v1=us(Ae(),1);m();T();N();var _D;(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"})(_D||(_D={}));B.util.setEnumType(_D,"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 bc;(function(e){e[e.OBJECT_FIELD=0]="OBJECT_FIELD",e[e.FIELD_ARGUMENT=1]="FIELD_ARGUMENT"})(bc||(bc={}));B.util.setEnumType(bc,"wg.cosmo.node.v1.ArgumentSource",[{no:0,name:"OBJECT_FIELD"},{no:1,name:"FIELD_ARGUMENT"}]);var yu;(function(e){e[e.STATIC=0]="STATIC",e[e.GRAPHQL=1]="GRAPHQL",e[e.PUBSUB=2]="PUBSUB"})(yu||(yu={}));B.util.setEnumType(yu,"wg.cosmo.node.v1.DataSourceKind",[{no:0,name:"STATIC"},{no:1,name:"GRAPHQL"},{no:2,name:"PUBSUB"}]);var rf;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.QUERY=1]="QUERY",e[e.MUTATION=2]="MUTATION",e[e.SUBSCRIPTION=3]="SUBSCRIPTION"})(rf||(rf={}));B.util.setEnumType(rf,"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 Uo;(function(e){e[e.PUBLISH=0]="PUBLISH",e[e.REQUEST=1]="REQUEST",e[e.SUBSCRIBE=2]="SUBSCRIBE"})(Uo||(Uo={}));B.util.setEnumType(Uo,"wg.cosmo.node.v1.EventType",[{no:0,name:"PUBLISH"},{no:1,name:"REQUEST"},{no:2,name:"SUBSCRIBE"}]);var Iu;(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"})(Iu||(Iu={}));B.util.setEnumType(Iu,"wg.cosmo.node.v1.ConfigurationVariableKind",[{no:0,name:"STATIC_CONFIGURATION_VARIABLE"},{no:1,name:"ENV_CONFIGURATION_VARIABLE"},{no:2,name:"PLACEHOLDER_CONFIGURATION_VARIABLE"}]);var Ac;(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"})(Ac||(Ac={}));B.util.setEnumType(Ac,"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 Rs=class Rs extends Le{constructor(n){super();_(this,"id","");_(this,"name","");_(this,"routingUrl","");B.util.initPartial(n,this)}static fromBinary(n,r){return new Rs().fromBinary(n,r)}static fromJson(n,r){return new Rs().fromJson(n,r)}static fromJsonString(n,r){return new Rs().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Rs,n,r)}};_(Rs,"runtime",B),_(Rs,"typeName","wg.cosmo.node.v1.Subgraph"),_(Rs,"fields",B.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=Rs,Fs=class Fs extends Le{constructor(n){super();_(this,"configByFeatureFlagName",{});B.util.initPartial(n,this)}static fromBinary(n,r){return new Fs().fromBinary(n,r)}static fromJson(n,r){return new Fs().fromJson(n,r)}static fromJsonString(n,r){return new Fs().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Fs,n,r)}};_(Fs,"runtime",B),_(Fs,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs"),_(Fs,"fields",B.util.newFieldList(()=>[{no:1,name:"config_by_feature_flag_name",kind:"map",K:9,V:{kind:"message",T:SD}}]));var vD=Fs,Ps=class Ps extends Le{constructor(n){super();_(this,"engineConfig");_(this,"version","");_(this,"subgraphs",[]);B.util.initPartial(n,this)}static fromBinary(n,r){return new Ps().fromBinary(n,r)}static fromJson(n,r){return new Ps().fromJson(n,r)}static fromJsonString(n,r){return new Ps().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Ps,n,r)}};_(Ps,"runtime",B),_(Ps,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig"),_(Ps,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:ed},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:oh,repeated:!0}]));var SD=Ps,ws=class ws extends Le{constructor(n){super();_(this,"engineConfig");_(this,"version","");_(this,"subgraphs",[]);_(this,"featureFlagConfigs");_(this,"compatibilityVersion","");B.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 B.util.equals(ws,n,r)}};_(ws,"runtime",B),_(ws,"typeName","wg.cosmo.node.v1.RouterConfig"),_(ws,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:ed},{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:vD,opt:!0},{no:5,name:"compatibility_version",kind:"scalar",T:9}]));var af=ws,Ls=class Ls extends Le{constructor(n){super();_(this,"code",Zl.OK);_(this,"details");B.util.initPartial(n,this)}static fromBinary(n,r){return new Ls().fromBinary(n,r)}static fromJson(n,r){return new Ls().fromJson(n,r)}static fromJsonString(n,r){return new Ls().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Ls,n,r)}};_(Ls,"runtime",B),_(Ls,"typeName","wg.cosmo.node.v1.Response"),_(Ls,"fields",B.util.newFieldList(()=>[{no:1,name:"code",kind:"enum",T:B.getEnumType(Zl)},{no:2,name:"details",kind:"scalar",T:9,opt:!0}]));var OD=Ls,Cs=class Cs extends Le{constructor(n){super();_(this,"code",0);_(this,"message","");B.util.initPartial(n,this)}static fromBinary(n,r){return new Cs().fromBinary(n,r)}static fromJson(n,r){return new Cs().fromJson(n,r)}static fromJsonString(n,r){return new Cs().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Cs,n,r)}};_(Cs,"runtime",B),_(Cs,"typeName","wg.cosmo.node.v1.ResponseStatus"),_(Cs,"fields",B.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9}]));var m1=Cs,Bs=class Bs extends Le{constructor(n){super();_(this,"accountLimits");_(this,"graphPublicKey","");B.util.initPartial(n,this)}static fromBinary(n,r){return new Bs().fromBinary(n,r)}static fromJson(n,r){return new Bs().fromJson(n,r)}static fromJsonString(n,r){return new Bs().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Bs,n,r)}};_(Bs,"runtime",B),_(Bs,"typeName","wg.cosmo.node.v1.RegistrationInfo"),_(Bs,"fields",B.util.newFieldList(()=>[{no:1,name:"account_limits",kind:"message",T:bD},{no:2,name:"graph_public_key",kind:"scalar",T:9}]));var DD=Bs,Us=class Us extends Le{constructor(n){super();_(this,"traceSamplingRate",0);B.util.initPartial(n,this)}static fromBinary(n,r){return new Us().fromBinary(n,r)}static fromJson(n,r){return new Us().fromJson(n,r)}static fromJsonString(n,r){return new Us().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Us,n,r)}};_(Us,"runtime",B),_(Us,"typeName","wg.cosmo.node.v1.AccountLimits"),_(Us,"fields",B.util.newFieldList(()=>[{no:1,name:"trace_sampling_rate",kind:"scalar",T:2}]));var bD=Us,ks=class ks extends Le{constructor(t){super(),B.util.initPartial(t,this)}static fromBinary(t,n){return new ks().fromBinary(t,n)}static fromJson(t,n){return new ks().fromJson(t,n)}static fromJsonString(t,n){return new ks().fromJsonString(t,n)}static equals(t,n){return B.util.equals(ks,t,n)}};_(ks,"runtime",B),_(ks,"typeName","wg.cosmo.node.v1.SelfRegisterRequest"),_(ks,"fields",B.util.newFieldList(()=>[]));var N1=ks,Ms=class Ms extends Le{constructor(n){super();_(this,"response");_(this,"registrationInfo");B.util.initPartial(n,this)}static fromBinary(n,r){return new Ms().fromBinary(n,r)}static fromJson(n,r){return new Ms().fromJson(n,r)}static fromJsonString(n,r){return new Ms().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Ms,n,r)}};_(Ms,"runtime",B),_(Ms,"typeName","wg.cosmo.node.v1.SelfRegisterResponse"),_(Ms,"fields",B.util.newFieldList(()=>[{no:1,name:"response",kind:"message",T:OD},{no:2,name:"registrationInfo",kind:"message",T:DD,opt:!0}]));var T1=Ms,xs=class xs extends Le{constructor(n){super();_(this,"defaultFlushInterval",Kn.zero);_(this,"datasourceConfigurations",[]);_(this,"fieldConfigurations",[]);_(this,"graphqlSchema","");_(this,"typeConfigurations",[]);_(this,"stringStorage",{});_(this,"graphqlClientSchema");B.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 B.util.equals(xs,n,r)}};_(xs,"runtime",B),_(xs,"typeName","wg.cosmo.node.v1.EngineConfiguration"),_(xs,"fields",B.util.newFieldList(()=>[{no:1,name:"defaultFlushInterval",kind:"scalar",T:3},{no:2,name:"datasource_configurations",kind:"message",T:sf,repeated:!0},{no:3,name:"field_configurations",kind:"message",T:cf,repeated:!0},{no:4,name:"graphqlSchema",kind:"scalar",T:9},{no:5,name:"type_configurations",kind:"message",T:AD,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 ed=xs,qs=class qs extends Le{constructor(n){super();_(this,"kind",yu.STATIC);_(this,"rootNodes",[]);_(this,"childNodes",[]);_(this,"overrideFieldPathFromAlias",!1);_(this,"customGraphql");_(this,"customStatic");_(this,"directives",[]);_(this,"requestTimeoutSeconds",Kn.zero);_(this,"id","");_(this,"keys",[]);_(this,"provides",[]);_(this,"requires",[]);_(this,"customEvents");_(this,"entityInterfaces",[]);_(this,"interfaceObjects",[]);B.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 B.util.equals(qs,n,r)}};_(qs,"runtime",B),_(qs,"typeName","wg.cosmo.node.v1.DataSourceConfiguration"),_(qs,"fields",B.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:B.getEnumType(yu)},{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:pf},{no:6,name:"custom_static",kind:"message",T:xD},{no:7,name:"directives",kind:"message",T:qD,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:Dc,repeated:!0},{no:11,name:"provides",kind:"message",T:Dc,repeated:!0},{no:12,name:"requires",kind:"message",T:Dc,repeated:!0},{no:13,name:"custom_events",kind:"message",T:Fc},{no:14,name:"entity_interfaces",kind:"message",T:nd,repeated:!0},{no:15,name:"interface_objects",kind:"message",T:nd,repeated:!0}]));var sf=qs,Vs=class Vs extends Le{constructor(n){super();_(this,"name","");_(this,"sourceType",bc.OBJECT_FIELD);B.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 B.util.equals(Vs,n,r)}};_(Vs,"runtime",B),_(Vs,"typeName","wg.cosmo.node.v1.ArgumentConfiguration"),_(Vs,"fields",B.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"source_type",kind:"enum",T:B.getEnumType(bc)}]));var of=Vs,js=class js extends Le{constructor(n){super();_(this,"requiredAndScopes",[]);B.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 B.util.equals(js,n,r)}};_(js,"runtime",B),_(js,"typeName","wg.cosmo.node.v1.Scopes"),_(js,"fields",B.util.newFieldList(()=>[{no:1,name:"required_and_scopes",kind:"scalar",T:9,repeated:!0}]));var Rc=js,Ks=class Ks extends Le{constructor(n){super();_(this,"requiresAuthentication",!1);_(this,"requiredOrScopes",[]);_(this,"requiredOrScopesByOr",[]);B.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 B.util.equals(Ks,n,r)}};_(Ks,"runtime",B),_(Ks,"typeName","wg.cosmo.node.v1.AuthorizationConfiguration"),_(Ks,"fields",B.util.newFieldList(()=>[{no:1,name:"requires_authentication",kind:"scalar",T:8},{no:2,name:"required_or_scopes",kind:"message",T:Rc,repeated:!0},{no:3,name:"required_or_scopes_by_or",kind:"message",T:Rc,repeated:!0}]));var uf=Ks,Gs=class Gs extends Le{constructor(n){super();_(this,"typeName","");_(this,"fieldName","");_(this,"argumentsConfiguration",[]);_(this,"authorizationConfiguration");_(this,"subscriptionFilterCondition");B.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 B.util.equals(Gs,n,r)}};_(Gs,"runtime",B),_(Gs,"typeName","wg.cosmo.node.v1.FieldConfiguration"),_(Gs,"fields",B.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:of,repeated:!0},{no:4,name:"authorization_configuration",kind:"message",T:uf},{no:5,name:"subscription_filter_condition",kind:"message",T:gu,opt:!0}]));var cf=Gs,$s=class $s extends Le{constructor(n){super();_(this,"typeName","");_(this,"renameTo","");B.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 B.util.equals($s,n,r)}};_($s,"runtime",B),_($s,"typeName","wg.cosmo.node.v1.TypeConfiguration"),_($s,"fields",B.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var AD=$s,Qs=class Qs extends Le{constructor(n){super();_(this,"typeName","");_(this,"fieldNames",[]);_(this,"externalFieldNames",[]);_(this,"requireFetchReasonsFieldNames",[]);B.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 B.util.equals(Qs,n,r)}};_(Qs,"runtime",B),_(Qs,"typeName","wg.cosmo.node.v1.TypeField"),_(Qs,"fields",B.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=Qs,Ys=class Ys extends Le{constructor(n){super();_(this,"fieldName","");_(this,"typeName","");B.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 B.util.equals(Ys,n,r)}};_(Ys,"runtime",B),_(Ys,"typeName","wg.cosmo.node.v1.FieldCoordinates"),_(Ys,"fields",B.util.newFieldList(()=>[{no:1,name:"field_name",kind:"scalar",T:9},{no:2,name:"type_name",kind:"scalar",T:9}]));var lf=Ys,Js=class Js extends Le{constructor(n){super();_(this,"fieldCoordinatesPath",[]);_(this,"fieldPath",[]);B.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 B.util.equals(Js,n,r)}};_(Js,"runtime",B),_(Js,"typeName","wg.cosmo.node.v1.FieldSetCondition"),_(Js,"fields",B.util.newFieldList(()=>[{no:1,name:"field_coordinates_path",kind:"message",T:lf,repeated:!0},{no:2,name:"field_path",kind:"scalar",T:9,repeated:!0}]));var df=Js,Hs=class Hs extends Le{constructor(n){super();_(this,"typeName","");_(this,"fieldName","");_(this,"selectionSet","");_(this,"disableEntityResolver",!1);_(this,"conditions",[]);B.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 B.util.equals(Hs,n,r)}};_(Hs,"runtime",B),_(Hs,"typeName","wg.cosmo.node.v1.RequiredField"),_(Hs,"fields",B.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:df,repeated:!0}]));var Dc=Hs,zs=class zs extends Le{constructor(n){super();_(this,"interfaceTypeName","");_(this,"concreteTypeNames",[]);B.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 B.util.equals(zs,n,r)}};_(zs,"runtime",B),_(zs,"typeName","wg.cosmo.node.v1.EntityInterfaceConfiguration"),_(zs,"fields",B.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 nd=zs,Ws=class Ws extends Le{constructor(n){super();_(this,"url");_(this,"method",Ac.GET);_(this,"header",{});_(this,"body");_(this,"query",[]);_(this,"urlEncodeBody",!1);_(this,"mtls");_(this,"baseUrl");_(this,"path");_(this,"httpProxyUrl");B.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 B.util.equals(Ws,n,r)}};_(Ws,"runtime",B),_(Ws,"typeName","wg.cosmo.node.v1.FetchConfiguration"),_(Ws,"fields",B.util.newFieldList(()=>[{no:1,name:"url",kind:"message",T:xr},{no:2,name:"method",kind:"enum",T:B.getEnumType(Ac)},{no:3,name:"header",kind:"map",K:9,V:{kind:"message",T:jD}},{no:4,name:"body",kind:"message",T:xr},{no:5,name:"query",kind:"message",T:VD,repeated:!0},{no:7,name:"url_encode_body",kind:"scalar",T:8},{no:8,name:"mtls",kind:"message",T:KD},{no:9,name:"base_url",kind:"message",T:xr},{no:10,name:"path",kind:"message",T:xr},{no:11,name:"http_proxy_url",kind:"message",T:xr,opt:!0}]));var RD=Ws,Xs=class Xs extends Le{constructor(n){super();_(this,"statusCode",Kn.zero);_(this,"typeName","");_(this,"injectStatusCodeIntoBody",!1);B.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 B.util.equals(Xs,n,r)}};_(Xs,"runtime",B),_(Xs,"typeName","wg.cosmo.node.v1.StatusCodeTypeMapping"),_(Xs,"fields",B.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 E1=Xs,Zs=class Zs extends Le{constructor(n){super();_(this,"fetch");_(this,"subscription");_(this,"federation");_(this,"upstreamSchema");_(this,"customScalarTypeFields",[]);_(this,"grpc");B.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 B.util.equals(Zs,n,r)}};_(Zs,"runtime",B),_(Zs,"typeName","wg.cosmo.node.v1.DataSourceCustom_GraphQL"),_(Zs,"fields",B.util.newFieldList(()=>[{no:1,name:"fetch",kind:"message",T:RD},{no:2,name:"subscription",kind:"message",T:GD},{no:3,name:"federation",kind:"message",T:$D},{no:4,name:"upstream_schema",kind:"message",T:hf},{no:6,name:"custom_scalar_type_fields",kind:"message",T:QD,repeated:!0},{no:7,name:"grpc",kind:"message",T:rd}]));var pf=Zs,eo=class eo extends Le{constructor(n){super();_(this,"mapping");_(this,"protoSchema","");_(this,"plugin");B.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 B.util.equals(eo,n,r)}};_(eo,"runtime",B),_(eo,"typeName","wg.cosmo.node.v1.GRPCConfiguration"),_(eo,"fields",B.util.newFieldList(()=>[{no:1,name:"mapping",kind:"message",T:PD},{no:2,name:"proto_schema",kind:"scalar",T:9},{no:3,name:"plugin",kind:"message",T:ff}]));var rd=eo,to=class to extends Le{constructor(n){super();_(this,"repository","");_(this,"reference","");B.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 B.util.equals(to,n,r)}};_(to,"runtime",B),_(to,"typeName","wg.cosmo.node.v1.ImageReference"),_(to,"fields",B.util.newFieldList(()=>[{no:1,name:"repository",kind:"scalar",T:9},{no:2,name:"reference",kind:"scalar",T:9}]));var FD=to,no=class no extends Le{constructor(n){super();_(this,"name","");_(this,"version","");_(this,"imageReference");B.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 B.util.equals(no,n,r)}};_(no,"runtime",B),_(no,"typeName","wg.cosmo.node.v1.PluginConfiguration"),_(no,"fields",B.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:FD,opt:!0}]));var ff=no,ro=class ro extends Le{constructor(n){super();_(this,"enabled",!1);B.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 B.util.equals(ro,n,r)}};_(ro,"runtime",B),_(ro,"typeName","wg.cosmo.node.v1.SSLConfiguration"),_(ro,"fields",B.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8}]));var h1=ro,io=class io extends Le{constructor(n){super();_(this,"version",0);_(this,"service","");_(this,"operationMappings",[]);_(this,"entityMappings",[]);_(this,"typeFieldMappings",[]);_(this,"enumMappings",[]);B.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 B.util.equals(io,n,r)}};_(io,"runtime",B),_(io,"typeName","wg.cosmo.node.v1.GRPCMapping"),_(io,"fields",B.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:wD,repeated:!0},{no:4,name:"entity_mappings",kind:"message",T:LD,repeated:!0},{no:5,name:"type_field_mappings",kind:"message",T:CD,repeated:!0},{no:6,name:"enum_mappings",kind:"message",T:kD,repeated:!0}]));var PD=io,ao=class ao extends Le{constructor(n){super();_(this,"type",rf.UNSPECIFIED);_(this,"original","");_(this,"mapped","");_(this,"request","");_(this,"response","");B.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 B.util.equals(ao,n,r)}};_(ao,"runtime",B),_(ao,"typeName","wg.cosmo.node.v1.OperationMapping"),_(ao,"fields",B.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:B.getEnumType(rf)},{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 wD=ao,so=class so extends Le{constructor(n){super();_(this,"typeName","");_(this,"kind","");_(this,"key","");_(this,"rpc","");_(this,"request","");_(this,"response","");B.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 B.util.equals(so,n,r)}};_(so,"runtime",B),_(so,"typeName","wg.cosmo.node.v1.EntityMapping"),_(so,"fields",B.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 LD=so,oo=class oo extends Le{constructor(n){super();_(this,"type","");_(this,"fieldMappings",[]);B.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 B.util.equals(oo,n,r)}};_(oo,"runtime",B),_(oo,"typeName","wg.cosmo.node.v1.TypeFieldMapping"),_(oo,"fields",B.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"field_mappings",kind:"message",T:BD,repeated:!0}]));var CD=oo,uo=class uo extends Le{constructor(n){super();_(this,"original","");_(this,"mapped","");_(this,"argumentMappings",[]);B.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 B.util.equals(uo,n,r)}};_(uo,"runtime",B),_(uo,"typeName","wg.cosmo.node.v1.FieldMapping"),_(uo,"fields",B.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:UD,repeated:!0}]));var BD=uo,co=class co extends Le{constructor(n){super();_(this,"original","");_(this,"mapped","");B.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 B.util.equals(co,n,r)}};_(co,"runtime",B),_(co,"typeName","wg.cosmo.node.v1.ArgumentMapping"),_(co,"fields",B.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var UD=co,lo=class lo extends Le{constructor(n){super();_(this,"type","");_(this,"values",[]);B.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 B.util.equals(lo,n,r)}};_(lo,"runtime",B),_(lo,"typeName","wg.cosmo.node.v1.EnumMapping"),_(lo,"fields",B.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"values",kind:"message",T:MD,repeated:!0}]));var kD=lo,po=class po extends Le{constructor(n){super();_(this,"original","");_(this,"mapped","");B.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 B.util.equals(po,n,r)}};_(po,"runtime",B),_(po,"typeName","wg.cosmo.node.v1.EnumValueMapping"),_(po,"fields",B.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var MD=po,fo=class fo extends Le{constructor(n){super();_(this,"consumerName","");_(this,"streamName","");_(this,"consumerInactiveThreshold",0);B.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 B.util.equals(fo,n,r)}};_(fo,"runtime",B),_(fo,"typeName","wg.cosmo.node.v1.NatsStreamConfiguration"),_(fo,"fields",B.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 mf=fo,mo=class mo extends Le{constructor(n){super();_(this,"engineEventConfiguration");_(this,"subjects",[]);_(this,"streamConfiguration");B.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 B.util.equals(mo,n,r)}};_(mo,"runtime",B),_(mo,"typeName","wg.cosmo.node.v1.NatsEventConfiguration"),_(mo,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:ko},{no:2,name:"subjects",kind:"scalar",T:9,repeated:!0},{no:3,name:"stream_configuration",kind:"message",T:mf}]));var Nf=mo,No=class No extends Le{constructor(n){super();_(this,"engineEventConfiguration");_(this,"topics",[]);B.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 B.util.equals(No,n,r)}};_(No,"runtime",B),_(No,"typeName","wg.cosmo.node.v1.KafkaEventConfiguration"),_(No,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:ko},{no:2,name:"topics",kind:"scalar",T:9,repeated:!0}]));var Tf=No,To=class To extends Le{constructor(n){super();_(this,"engineEventConfiguration");_(this,"channels",[]);B.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 B.util.equals(To,n,r)}};_(To,"runtime",B),_(To,"typeName","wg.cosmo.node.v1.RedisEventConfiguration"),_(To,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:ko},{no:2,name:"channels",kind:"scalar",T:9,repeated:!0}]));var Ef=To,Eo=class Eo extends Le{constructor(n){super();_(this,"providerId","");_(this,"type",Uo.PUBLISH);_(this,"typeName","");_(this,"fieldName","");B.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 B.util.equals(Eo,n,r)}};_(Eo,"runtime",B),_(Eo,"typeName","wg.cosmo.node.v1.EngineEventConfiguration"),_(Eo,"fields",B.util.newFieldList(()=>[{no:1,name:"provider_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:B.getEnumType(Uo)},{no:3,name:"type_name",kind:"scalar",T:9},{no:4,name:"field_name",kind:"scalar",T:9}]));var ko=Eo,ho=class ho extends Le{constructor(n){super();_(this,"nats",[]);_(this,"kafka",[]);_(this,"redis",[]);B.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 B.util.equals(ho,n,r)}};_(ho,"runtime",B),_(ho,"typeName","wg.cosmo.node.v1.DataSourceCustomEvents"),_(ho,"fields",B.util.newFieldList(()=>[{no:1,name:"nats",kind:"message",T:Nf,repeated:!0},{no:2,name:"kafka",kind:"message",T:Tf,repeated:!0},{no:3,name:"redis",kind:"message",T:Ef,repeated:!0}]));var Fc=ho,yo=class yo extends Le{constructor(n){super();_(this,"data");B.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 B.util.equals(yo,n,r)}};_(yo,"runtime",B),_(yo,"typeName","wg.cosmo.node.v1.DataSourceCustom_Static"),_(yo,"fields",B.util.newFieldList(()=>[{no:1,name:"data",kind:"message",T:xr}]));var xD=yo,Io=class Io extends Le{constructor(n){super();_(this,"kind",Iu.STATIC_CONFIGURATION_VARIABLE);_(this,"staticVariableContent","");_(this,"environmentVariableName","");_(this,"environmentVariableDefaultValue","");_(this,"placeholderVariableName","");B.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 B.util.equals(Io,n,r)}};_(Io,"runtime",B),_(Io,"typeName","wg.cosmo.node.v1.ConfigurationVariable"),_(Io,"fields",B.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:B.getEnumType(Iu)},{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 xr=Io,go=class go extends Le{constructor(n){super();_(this,"directiveName","");_(this,"renameTo","");B.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 B.util.equals(go,n,r)}};_(go,"runtime",B),_(go,"typeName","wg.cosmo.node.v1.DirectiveConfiguration"),_(go,"fields",B.util.newFieldList(()=>[{no:1,name:"directive_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var qD=go,_o=class _o extends Le{constructor(n){super();_(this,"name","");_(this,"value","");B.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 B.util.equals(_o,n,r)}};_(_o,"runtime",B),_(_o,"typeName","wg.cosmo.node.v1.URLQueryConfiguration"),_(_o,"fields",B.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]));var VD=_o,vo=class vo extends Le{constructor(n){super();_(this,"values",[]);B.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 B.util.equals(vo,n,r)}};_(vo,"runtime",B),_(vo,"typeName","wg.cosmo.node.v1.HTTPHeader"),_(vo,"fields",B.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:xr,repeated:!0}]));var jD=vo,So=class So extends Le{constructor(n){super();_(this,"key");_(this,"cert");_(this,"insecureSkipVerify",!1);B.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 B.util.equals(So,n,r)}};_(So,"runtime",B),_(So,"typeName","wg.cosmo.node.v1.MTLSConfiguration"),_(So,"fields",B.util.newFieldList(()=>[{no:1,name:"key",kind:"message",T:xr},{no:2,name:"cert",kind:"message",T:xr},{no:3,name:"insecureSkipVerify",kind:"scalar",T:8}]));var KD=So,Oo=class Oo extends Le{constructor(n){super();_(this,"enabled",!1);_(this,"url");_(this,"useSSE");_(this,"protocol");_(this,"websocketSubprotocol");B.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 B.util.equals(Oo,n,r)}};_(Oo,"runtime",B),_(Oo,"typeName","wg.cosmo.node.v1.GraphQLSubscriptionConfiguration"),_(Oo,"fields",B.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"url",kind:"message",T:xr},{no:3,name:"useSSE",kind:"scalar",T:8,opt:!0},{no:4,name:"protocol",kind:"enum",T:B.getEnumType(bs),opt:!0},{no:5,name:"websocketSubprotocol",kind:"enum",T:B.getEnumType(As),opt:!0}]));var GD=Oo,Do=class Do extends Le{constructor(n){super();_(this,"enabled",!1);_(this,"serviceSdl","");B.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 B.util.equals(Do,n,r)}};_(Do,"runtime",B),_(Do,"typeName","wg.cosmo.node.v1.GraphQLFederationConfiguration"),_(Do,"fields",B.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"serviceSdl",kind:"scalar",T:9}]));var $D=Do,bo=class bo extends Le{constructor(n){super();_(this,"key","");B.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 B.util.equals(bo,n,r)}};_(bo,"runtime",B),_(bo,"typeName","wg.cosmo.node.v1.InternedString"),_(bo,"fields",B.util.newFieldList(()=>[{no:1,name:"key",kind:"scalar",T:9}]));var hf=bo,Ao=class Ao extends Le{constructor(n){super();_(this,"typeName","");_(this,"fieldName","");B.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 B.util.equals(Ao,n,r)}};_(Ao,"runtime",B),_(Ao,"typeName","wg.cosmo.node.v1.SingleTypeField"),_(Ao,"fields",B.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9}]));var QD=Ao,Ro=class Ro extends Le{constructor(n){super();_(this,"fieldPath",[]);_(this,"json","");B.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 B.util.equals(Ro,n,r)}};_(Ro,"runtime",B),_(Ro,"typeName","wg.cosmo.node.v1.SubscriptionFieldCondition"),_(Ro,"fields",B.util.newFieldList(()=>[{no:1,name:"field_path",kind:"scalar",T:9,repeated:!0},{no:2,name:"json",kind:"scalar",T:9}]));var yf=Ro,Yi=class Yi extends Le{constructor(n){super();_(this,"and",[]);_(this,"in");_(this,"not");_(this,"or",[]);B.util.initPartial(n,this)}static fromBinary(n,r){return new Yi().fromBinary(n,r)}static fromJson(n,r){return new Yi().fromJson(n,r)}static fromJsonString(n,r){return new Yi().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Yi,n,r)}};_(Yi,"runtime",B),_(Yi,"typeName","wg.cosmo.node.v1.SubscriptionFilterCondition"),_(Yi,"fields",B.util.newFieldList(()=>[{no:1,name:"and",kind:"message",T:Yi,repeated:!0},{no:2,name:"in",kind:"message",T:yf,opt:!0},{no:3,name:"not",kind:"message",T:Yi,opt:!0},{no:4,name:"or",kind:"message",T:Yi,repeated:!0}]));var gu=Yi,Fo=class Fo extends Le{constructor(n){super();_(this,"operations",[]);B.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 B.util.equals(Fo,n,r)}};_(Fo,"runtime",B),_(Fo,"typeName","wg.cosmo.node.v1.CacheWarmerOperations"),_(Fo,"fields",B.util.newFieldList(()=>[{no:1,name:"operations",kind:"message",T:YD,repeated:!0}]));var y1=Fo,Po=class Po extends Le{constructor(n){super();_(this,"request");_(this,"client");B.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 B.util.equals(Po,n,r)}};_(Po,"runtime",B),_(Po,"typeName","wg.cosmo.node.v1.Operation"),_(Po,"fields",B.util.newFieldList(()=>[{no:1,name:"request",kind:"message",T:JD},{no:2,name:"client",kind:"message",T:WD}]));var YD=Po,wo=class wo extends Le{constructor(n){super();_(this,"operationName","");_(this,"query","");_(this,"extensions");B.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 B.util.equals(wo,n,r)}};_(wo,"runtime",B),_(wo,"typeName","wg.cosmo.node.v1.OperationRequest"),_(wo,"fields",B.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:HD}]));var JD=wo,Lo=class Lo extends Le{constructor(n){super();_(this,"persistedQuery");B.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 B.util.equals(Lo,n,r)}};_(Lo,"runtime",B),_(Lo,"typeName","wg.cosmo.node.v1.Extension"),_(Lo,"fields",B.util.newFieldList(()=>[{no:1,name:"persisted_query",kind:"message",T:zD}]));var HD=Lo,Co=class Co extends Le{constructor(n){super();_(this,"sha256Hash","");_(this,"version",0);B.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 B.util.equals(Co,n,r)}};_(Co,"runtime",B),_(Co,"typeName","wg.cosmo.node.v1.PersistedQuery"),_(Co,"fields",B.util.newFieldList(()=>[{no:1,name:"sha256_hash",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:5}]));var zD=Co,Bo=class Bo extends Le{constructor(n){super();_(this,"name","");_(this,"version","");B.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 B.util.equals(Bo,n,r)}};_(Bo,"runtime",B),_(Bo,"typeName","wg.cosmo.node.v1.ClientInfo"),_(Bo,"fields",B.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9}]));var WD=Bo;m();T();N();function XD(e){return new Error(`Normalization failed to return a ${e}.`)}function I1(e){return new Error(`Invalid router compatibility version "${e}".`)}m();T();N();var id=us(UE(),1);function Dde(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 lf({fieldName:a[1],typeName:a[0]}))}t.push(new df({fieldCoordinatesPath:r,fieldPath:n.fieldPath}))}return t}function ZD(e,t,n){if(e)for(let r of e){let i=Dde(r);t.push(new Dc(x(x({typeName:n,fieldName:r.fieldName,selectionSet:r.selectionSet},r.disableEntityResolver?{disableEntityResolver:!0}:{}),i?{conditions:i}:{})))}}function eb(e){switch(e){case"publish":return Uo.PUBLISH;case"request":return Uo.REQUEST;case"subscribe":return Uo.SUBSCRIBE}}function g1(e){var n;let t={rootNodes:[],childNodes:[],keys:[],provides:[],events:new Fc({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 f=new nd({interfaceTypeName:i,concreteTypeNames:[...r.entityInterfaceConcreteTypeNames]});r.isInterfaceObject?t.interfaceObjects.push(f):t.entityInterfaces.push(f)}ZD(r.keys,t.keys,i),ZD(r.provides,t.provides,i),ZD(r.requires,t.requires,i);let c=[],l=[],d=[];for(let f of(n=r.events)!=null?n:[])switch(f.providerType){case id.PROVIDER_TYPE_KAFKA:{l.push(new Tf({engineEventConfiguration:new ko({fieldName:f.fieldName,providerId:f.providerId,type:eb(f.type),typeName:i}),topics:f.topics}));break}case id.PROVIDER_TYPE_NATS:{c.push(new Nf(x({engineEventConfiguration:new ko({fieldName:f.fieldName,providerId:f.providerId,type:eb(f.type),typeName:i}),subjects:f.subjects},f.streamConfiguration?{streamConfiguration:new mf({consumerInactiveThreshold:f.streamConfiguration.consumerInactiveThreshold,consumerName:f.streamConfiguration.consumerName,streamName:f.streamConfiguration.streamName})}:{})));break}case id.PROVIDER_TYPE_REDIS:{d.push(new Ef({engineEventConfiguration:new ko({fieldName:f.fieldName,providerId:f.providerId,type:eb(f.type),typeName:i}),channels:f.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 _1(e){var n,r;let t=[];for(let i of e){let a=i.argumentNames.map(f=>new of({name:f,sourceType:bc.FIELD_ARGUMENT})),o=new cf({argumentsConfiguration:a,fieldName:i.fieldName,typeName:i.typeName}),c=((n=i.requiredScopes)==null?void 0:n.map(f=>new Rc({requiredAndScopes:f})))||[],l=((r=i.requiredScopesByOR)==null?void 0:r.map(f=>new Rc({requiredAndScopes:f})))||[],d=c.length>0;if((i.requiresAuthentication||d)&&(o.authorizationConfiguration=new uf({requiresAuthentication:i.requiresAuthentication||d,requiredOrScopes:c,requiredOrScopesByOr:l})),i.subscriptionFilterCondition){let f=new gu;uh(f,i.subscriptionFilterCondition),o.subscriptionFilterCondition=f}t.push(o)}return t}function uh(e,t){if(t.and!==void 0){let n=[];for(let r of t.and){let i=new gu;uh(i,r),n.push(i)}e.and=n;return}if(t.in!==void 0){e.in=new yf({fieldPath:t.in.fieldPath,json:JSON.stringify(t.in.values)});return}if(t.not!==void 0){e.not=new gu,uh(e.not,t.not);return}if(t.or!==void 0){let n=[];for(let r of t.or){let i=new gu;uh(i,r),n.push(i)}e.or=n;return}throw new Error("Fatal: Incoming SubscriptionCondition object was malformed.")}var Pc;(function(e){e[e.Plugin=0]="Plugin",e[e.Standard=1]="Standard",e[e.GRPC=2]="GRPC"})(Pc||(Pc={}));var bde=(e,t)=>{let n=stringHash(t);return e.stringStorage[n]=t,new hf({key:n})},Ade=e=>{switch(e){case"ws":return bs.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS;case"sse":return bs.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE;case"sse_post":return bs.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST}},Rde=e=>{switch(e){case"auto":return As.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO;case"graphql-ws":return As.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS;case"graphql-transport-ws":return As.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS}},S1=function(e){if(!ad.ROUTER_COMPATIBILITY_VERSIONS.has(e.routerCompatibilityVersion))throw I1(e.routerCompatibilityVersion);let t=new ed({defaultFlushInterval:BigInt(500),datasourceConfigurations:[],fieldConfigurations:[],graphqlSchema:"",stringStorage:{},typeConfigurations:[]});for(let n of e.subgraphs){if(!n.configurationDataByTypeName)throw XD("ConfigurationDataByTypeName");if(!n.schema)throw XD("GraphQLSchema");let r={enabled:!0},i=bde(t,PV((0,v1.lexicographicSortSchema)(n.schema))),{childNodes:a,entityInterfaces:o,events:c,interfaceObjects:l,keys:d,provides:f,requires:y,rootNodes:I}=g1(n.configurationDataByTypeName),v;switch(n.kind){case Pc.Standard:{r.enabled=!0,r.protocol=Ade(n.subscriptionProtocol||"ws"),r.websocketSubprotocol=Rde(n.websocketSubprotocol||"auto"),r.url=new xr({kind:Iu.STATIC_CONFIGURATION_VARIABLE,staticVariableContent:n.subscriptionUrl||n.url});break}case Pc.Plugin:{v=new rd({mapping:n.mapping,protoSchema:n.protoSchema,plugin:new ff({name:n.name,version:n.version,imageReference:n.imageReference})});break}case Pc.GRPC:{v=new rd({mapping:n.mapping,protoSchema:n.protoSchema});break}}let P,k,K;if(c.kafka.length>0||c.nats.length>0||c.redis.length>0){P=yu.PUBSUB,K=new Fc({kafka:c.kafka,nats:c.nats,redis:c.redis});let se=de=>ad.ROOT_TYPE_NAMES.has(de.typeName),ie=0,Te=0;for(;ie({id:n.id,name:n.name,routingUrl:n.url})),compatibilityVersion:`${e.routerCompatibilityVersion}:${ad.COMPOSITION_VERSION}`})};m();T();N();var Lc=us(Ae());function O1(e){let t;try{t=(0,Lc.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 Fde(e){let t=(0,wc.federateSubgraphs)({subgraphs:e.map(O1),version:wc.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,Lc.print)(t.federatedGraphAST)}}function Pde(e){let t=(0,wc.federateSubgraphs)({subgraphs:e.map(O1),version:wc.LATEST_ROUTER_COMPATIBILITY_VERSION});if(!t.success)throw new Error(`could not federate schema: ${t.errors.map(r=>r.message).join(", ")}`);return S1({federatedClientSDL:(0,Lc.printSchema)(t.federatedGraphClientSchema),federatedSDL:(0,Lc.printSchema)(t.federatedGraphSchema),fieldConfigurations:t.fieldConfigurations,routerCompatibilityVersion:wc.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:Pc.Standard,id:`${i}`,name:r.name,url:oD(r.url),sdl:r.schema,subscriptionUrl:oD((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 cm(wde);})(); +}`;var Et=YA(function(){return Yt(L,Ke+"return "+he).apply(e,M)});if(Et.source=he,_y(Et))throw Et;return Et}function CY(s){return Wt(s).toLowerCase()}function BY(s){return Wt(s).toUpperCase()}function UY(s,u,p){if(s=Wt(s),s&&(p||u===e))return n0(s);if(!s||!(u=ai(u)))return s;var E=zi(s),S=zi(u),L=r0(E,S),M=i0(E,S)+1;return zo(E,L,M).join("")}function kY(s,u,p){if(s=Wt(s),s&&(p||u===e))return s.slice(0,s0(s)+1);if(!s||!(u=ai(u)))return s;var E=zi(s),S=i0(E,zi(u))+1;return zo(E,0,S).join("")}function MY(s,u,p){if(s=Wt(s),s&&(p||u===e))return s.replace(_h,"");if(!s||!(u=ai(u)))return s;var E=zi(s),S=r0(E,zi(u));return zo(E,S).join("")}function xY(s,u){var p=tt,E=ee;if(vn(u)){var S="separator"in u?u.separator:S;p="length"in u?Nt(u.length):p,E="omission"in u?ai(u.omission):E}s=Wt(s);var L=s.length;if(Vc(s)){var M=zi(s);L=M.length}if(p>=L)return s;var j=p-jc(E);if(j<1)return E;var H=M?zo(M,0,j).join(""):s.slice(0,j);if(S===e)return H+E;if(M&&(j+=H.length-j),vy(S)){if(s.slice(j).search(S)){var fe,me=H;for(S.global||(S=xh(S.source,Wt(Sb.exec(S))+"g")),S.lastIndex=0;fe=S.exec(me);)var he=fe.index;H=H.slice(0,he===e?j:he)}}else if(s.indexOf(ai(S),j)!=j){var be=H.lastIndexOf(S);be>-1&&(H=H.slice(0,be))}return H+E}function qY(s){return s=Wt(s),s&&W1.test(s)?s.replace(gb,NK):s}var VY=Jc(function(s,u,p){return s+(p?" ":"")+u.toUpperCase()}),Dy=J0("toUpperCase");function QA(s,u,p){return s=Wt(s),u=p?e:u,u===e?lK(s)?hK(s):tK(s):s.match(u)||[]}var YA=It(function(s,u){try{return ri(s,e,u)}catch(p){return _y(p)?p:new ut(p)}}),jY=us(function(s,u){return yi(u,function(p){p=Oa(p),ss(s,p,Iy(s[p],s))}),s});function KY(s){var u=s==null?0:s.length,p=We();return s=u?In(s,function(E){if(typeof E[1]!="function")throw new Ii(i);return[p(E[0]),E[1]]}):[],It(function(E){for(var S=-1;++Smn)return[];var p=kn,E=Er(s,kn);u=We(u),s-=kn;for(var S=Uh(E,u);++p0||u<0)?new Ot(p):(s<0?p=p.takeRight(-s):s&&(p=p.drop(s)),u!==e&&(u=Nt(u),p=u<0?p.dropRight(-u):p.take(u-s)),p)},Ot.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Ot.prototype.toArray=function(){return this.take(kn)},va(Ot.prototype,function(s,u){var p=/^(?:filter|find|map|reject)|While$/.test(u),E=/^(?:head|last)$/.test(u),S=P[E?"take"+(u=="last"?"Right":""):u],L=E||/^find/.test(u);S&&(P.prototype[u]=function(){var M=this.__wrapped__,j=E?[1]:arguments,H=M instanceof Ot,fe=j[0],me=H||dt(M),he=function(St){var Pt=S.apply(P,Ko([St],j));return E&&be?Pt[0]:Pt};me&&p&&typeof fe=="function"&&fe.length!=1&&(H=me=!1);var be=this.__chain__,Ke=!!this.__actions__.length,Ze=L&&!be,Et=H&&!Ke;if(!L&&me){M=Et?M:new Ot(this);var et=s.apply(M,j);return et.__actions__.push({func:im,args:[he],thisArg:e}),new gi(et,be)}return Ze&&Et?s.apply(this,j):(et=this.thru(he),Ze?E?et.value()[0]:et.value():et)})}),yi(["pop","push","shift","sort","splice","unshift"],function(s){var u=Pf[s],p=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",E=/^(?:pop|shift)$/.test(s);P.prototype[s]=function(){var S=arguments;if(E&&!this.__chain__){var L=this.value();return u.apply(dt(L)?L:[],S)}return this[p](function(M){return u.apply(dt(M)?M:[],S)})}}),va(Ot.prototype,function(s,u){var p=P[u];if(p){var E=p.name+"";rn.call($c,E)||($c[E]=[]),$c[E].push({name:u,func:p})}}),$c[Wf(e,k).name]=[{name:"wrapper",func:e}],Ot.prototype.clone=qK,Ot.prototype.reverse=VK,Ot.prototype.value=jK,P.prototype.at=EQ,P.prototype.chain=hQ,P.prototype.commit=yQ,P.prototype.next=IQ,P.prototype.plant=_Q,P.prototype.reverse=vQ,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=SQ,P.prototype.first=P.prototype.head,dd&&(P.prototype[dd]=gQ),P},$o=yK();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ar._=$o,define(function(){return $o})):Au?((Au.exports=$o)._=$o,Ah._=$o):ar._=$o}).call(Xl)});var _V=w(Rc=>{"use strict";m();T();N();Object.defineProperty(Rc,"__esModule",{value:!0});Rc.FederationFactory=void 0;Rc.federateSubgraphs=sde;Rc.federateSubgraphsWithContracts=ode;Rc.federateSubgraphsContract=ude;var Pe=Ae(),hV=du(),Mr=Hr(),Fe=Mi(),Ac=VN(),yV=jp(),xr=Jp(),KE=iE(),Bt=Ss(),nde=hD(),rde=Hp(),IV=Sp(),Ie=vl(),ide=gD(),gV=EV(),Zl=jE(),_e=vr(),GE=Il(),Ee=Sr(),ade=zp(),$E=class{constructor({authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,disableResolvabilityValidation:r,entityDataByTypeName:i,entityInterfaceFederationDataByTypeName:a,fieldCoordsByNamedTypeName:o,internalGraph:c,internalSubgraphBySubgraphName:l,warnings:d}){_(this,"authorizationDataByParentTypeName");_(this,"coordsByNamedTypeName",new Map);_(this,"disableResolvabilityValidation",!1);_(this,"clientDefinitions",[Bt.DEPRECATED_DEFINITION]);_(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([[_e.AUTHENTICATED,Bt.AUTHENTICATED_DEFINITION],[_e.DEPRECATED,Bt.DEPRECATED_DEFINITION],[_e.INACCESSIBLE,Bt.INACCESSIBLE_DEFINITION],[_e.ONE_OF,Bt.ONE_OF_DEFINITION],[_e.REQUIRES_SCOPES,Bt.REQUIRES_SCOPES_DEFINITION],[_e.SEMANTIC_NON_NULL,Bt.SEMANTIC_NON_NULL_DEFINITION],[_e.TAG,Bt.TAG_DEFINITION]]));_(this,"persistedDirectiveDefinitions",new Set([_e.AUTHENTICATED,_e.DEPRECATED,_e.INACCESSIBLE,_e.TAG,_e.REQUIRES_SCOPES]));_(this,"potentialPersistedDirectiveDefinitionDataByDirectiveName",new Map);_(this,"referencedPersistedDirectiveNames",new Set);_(this,"routerDefinitions",[Bt.DEPRECATED_DEFINITION,Bt.TAG_DEFINITION]);_(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}getValidImplementedInterfaces(t){var o;let n=[];if(t.implementedInterfaceTypeNames.size<1)return n;let r=(0,Ie.isNodeDataInaccessible)(t),i=new Map,a=new Map;for(let c of t.implementedInterfaceTypeNames){n.push((0,Mr.stringToNamedTypeNode)(c));let l=(0,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,c,_e.PARENT_DEFINITION_DATA);if(l.kind!==Pe.Kind.INTERFACE_TYPE_DEFINITION){a.set(l.name,(0,Ee.kindToNodeType)(l.kind));continue}let d={invalidFieldImplementations:new Map,unimplementedFields:[]},f=!1;for(let[y,I]of l.fieldDataByName){let v=!1,F=t.fieldDataByName.get(y);if(!F){f=!0,d.unimplementedFields.push(y);continue}let k={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,KE.printTypeNode)(I.node.type),unimplementedArguments:new Set};(0,Ie.isTypeValidImplementation)(I.node.type,F.node.type,this.concreteTypeNamesByAbstractTypeName)||(f=!0,v=!0,k.implementedResponseType=(0,KE.printTypeNode)(F.node.type));let K=new Set;for(let[J,se]of I.argumentDataByName){let ie=se.node;K.add(J);let Te=(o=F.argumentDataByName.get(J))==null?void 0:o.node;if(!Te){f=!0,v=!0,k.unimplementedArguments.add(J);continue}let de=(0,KE.printTypeNode)(Te.type),Re=(0,KE.printTypeNode)(ie.type);Re!==de&&(f=!0,v=!0,k.invalidImplementedArguments.push({actualType:de,argumentName:J,expectedType:Re}))}for(let[J,se]of F.argumentDataByName){let ie=se.node;K.has(J)||ie.type.kind===Pe.Kind.NON_NULL_TYPE&&(f=!0,v=!0,k.invalidAdditionalArguments.add(J))}!r&&F.isInaccessible&&!I.isInaccessible&&(f=!0,v=!0,k.isInaccessible=!0),v&&d.invalidFieldImplementations.set(y,k)}f&&i.set(c,d)}return a.size>0&&this.errors.push((0,Fe.invalidImplementedTypeError)(t.name,a)),i.size>0&&this.errors.push((0,Fe.invalidInterfaceImplementationError)(t.node.name.value,(0,Ee.kindToNodeType)(t.kind),i)),n}addValidPrimaryKeyTargetsToEntityData(t){var f;let n=this.entityDataByTypeName.get(t);if(!n)return;let r=(0,Ee.getOrThrowError)(this.internalSubgraphBySubgraphName,this.currentSubgraphName,"internalSubgraphBySubgraphName"),i=r.parentDefinitionDataByTypeName,a=i.get(n.typeName);if(!a||a.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION)throw(0,Fe.incompatibleParentKindFatalError)(n.typeName,Pe.Kind.OBJECT_TYPE_DEFINITION,(a==null?void 0:a.kind)||Pe.Kind.NULL);let o=r.configurationDataByTypeName.get(n.typeName);if(!o)return;let c=[],l=this.internalGraph.nodeByNodeName.get(`${this.currentSubgraphName}.${n.typeName}`);(0,Ac.validateImplicitFieldSets)({conditionalFieldDataByCoords:r.conditionalFieldDataByCoordinates,currentSubgraphName:this.currentSubgraphName,entityData:n,implicitKeys:c,objectData:a,parentDefinitionDataByTypeName:i,graphNode:l});for(let[y,I]of this.entityInterfaceFederationDataByTypeName){if(!((f=I.concreteTypeNames)!=null&&f.has(n.typeName)))continue;let v=this.entityDataByTypeName.get(y);v&&(0,Ac.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(y=>y.selectionSet));for(let y of c)d.has(y.selectionSet)||(o.keys.push(y),d.add(y.selectionSet))}addValidPrimaryKeyTargetsFromInterfaceObject(t,n,r,i){let a=t.parentDefinitionDataByTypeName,o=a.get(n);if(!o||!(0,Ie.isParentDataCompositeOutputType)(o))throw(0,Fe.incompatibleParentKindFatalError)(n,Pe.Kind.INTERFACE_TYPE_DEFINITION,(o==null?void 0:o.kind)||Pe.Kind.NULL);let c=(0,Ee.getOrThrowError)(t.configurationDataByTypeName,r.typeName,"internalSubgraph.configurationDataByTypeName"),l=[];if((0,Ac.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(f=>f.selectionSet));for(let f of l)d.has(f.selectionSet)||(c.keys.push(f),d.add(f.selectionSet))}getEnumValueMergeMethod(t){return this.namedInputValueTypeNames.has(t)?this.namedOutputTypeNames.has(t)?Ie.MergeMethod.CONSISTENT:Ie.MergeMethod.INTERSECTION:Ie.MergeMethod.UNION}generateTagData(){for(let[t,n]of this.tagNamesByCoords){let r=t.split(".");if(r.length<1)continue;let i=(0,Ee.getValueOrDefault)(this.parentTagDataByTypeName,r[0],()=>(0,Ac.newParentTagData)(r[0]));switch(r.length){case 1:for(let l of n)i.tagNames.add(l);break;case 2:let a=(0,Ee.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Ac.newChildTagData)(r[1]));for(let l of n)a.tagNames.add(l);break;case 3:let o=(0,Ee.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Ac.newChildTagData)(r[1])),c=(0,Ee.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);(0,Ie.extractPersistedDirectives)(a.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName);let o=(0,Ie.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,Ee.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,Ie.setLongestDescription)(a,n),(0,Ee.addIterableValuesToSet)(n.subgraphNames,a.subgraphNames)}upsertInputValueData(t,n,r,i){let a=t.get(n.name),o=a||this.copyInputValueData(n);if((0,Ie.extractPersistedDirectives)(o.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.recordTagNamesByCoords(o,`${r}.${o.name}`),this.namedInputValueTypeNames.add(o.namedTypeName),(0,Ee.getValueOrDefault)(this.coordsByNamedTypeName,o.namedTypeName,()=>new Set).add(o.federatedCoords),!a){t.set(o.name,o);return}(0,Ee.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,o.configureDescriptionDataBySubgraphName),(0,Ie.setLongestDescription)(o,n),(0,Ee.addIterableValuesToSet)(n.requiredSubgraphNames,o.requiredSubgraphNames),(0,Ee.addIterableValuesToSet)(n.subgraphNames,o.subgraphNames),this.handleInputValueInaccessibility(i,o,r);let c=(0,Zl.getMostRestrictiveMergedTypeNode)(o.type,n.type,o.originalCoords,this.errors);c.success?o.type=c.typeNode:this.errors.push((0,Fe.incompatibleMergedTypesError)({actualType:c.actualType,isArgument:a.isArgument,coords:a.federatedCoords,expectedType:c.expectedType})),(0,Ie.compareAndValidateInputValueDefaultValues)(o,n,this.errors)}handleInputValueInaccessibility(t,n,r){if(t){this.inaccessibleRequiredInputValueErrorByCoords.delete(n.federatedCoords),this.inaccessibleCoords.add(n.federatedCoords);return}if((0,Ie.isNodeDataInaccessible)(n)){if((0,Ie.isTypeRequired)(n.type)){this.inaccessibleRequiredInputValueErrorByCoords.set(n.federatedCoords,(0,Fe.inaccessibleRequiredInputValueError)(n,r));return}this.inaccessibleCoords.add(n.federatedCoords)}}handleSubscriptionFilterDirective(t,n){let r=t.directivesByDirectiveName.get(_e.SUBSCRIPTION_FILTER);if(!r)return;let i=(0,Ee.getFirstEntry)(t.subgraphNames);if(i===void 0){this.errors.push((0,Fe.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,hV.getMutableTypeNode)(n,r,this.errors);let a={kind:t.kind},o=Zl.DivergentType.NONE,c=a;for(let l=0;lnew Set))}upsertFieldData(t,n,r){n.directivesByDirectiveName.has(_e.SEMANTIC_NON_NULL)&&this.referencedPersistedDirectiveNames.add(_e.SEMANTIC_NON_NULL);let i=t.get(n.name),a=i||this.copyFieldData(n,r||(0,Ie.isNodeDataInaccessible)(n));(0,Ee.getValueOrDefault)(this.coordsByNamedTypeName,n.namedTypeName,()=>new Set).add(a.federatedCoords),this.namedOutputTypeNames.add(n.namedTypeName),this.handleSubscriptionFilterDirective(n,a),(0,Ie.extractPersistedDirectives)(a.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName);let o=r||(0,Ie.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,Ee.getValueOrDefault)(this.subgraphNamesByNamedTypeNameByFieldCoords,a.federatedCoords,()=>new Map),d=(0,Ee.getValueOrDefault)(l,a.namedTypeName,()=>new Set);if(d.size<1)for(let f of a.subgraphNames)n.subgraphNames.has(f)||d.add(f);(0,Ee.addIterableValuesToSet)(n.subgraphNames,(0,Ee.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,Ee.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,i.configureDescriptionDataBySubgraphName),(0,Ie.setLongestDescription)(a,n),a.isInaccessible||(a.isInaccessible=n.isInaccessible),(0,Ee.addNewObjectValueMapEntries)(n.externalFieldDataBySubgraphName,a.externalFieldDataBySubgraphName),(0,Ee.addMapEntries)(n.isShareableBySubgraphName,a.isShareableBySubgraphName),(0,Ee.addMapEntries)(n.nullLevelsBySubgraphName,a.nullLevelsBySubgraphName),(0,Ee.addIterableValuesToSet)(n.subgraphNames,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,Ee.getValueOrDefault)(this.tagNamesByCoords,r,()=>new Set);for(let a of t.persistedDirectivesData.tagDirectiveByName.keys())i.add(a)}copyMutualParentDefinitionData(t){return{configureDescriptionDataBySubgraphName:(0,Ee.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByDirectiveName:(0,Ee.copyArrayValueMap)(t.directivesByDirectiveName),extensionType:t.extensionType,name:t.name,persistedDirectivesData:(0,Ie.extractPersistedDirectives)((0,Ie.newPersistedDirectivesData)(),t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),description:(0,Ie.getInitialFederatedDescription)(t)}}copyEnumValueData(t){return{appearances:t.appearances,configureDescriptionDataBySubgraphName:(0,Ee.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),federatedCoords:t.federatedCoords,directivesByDirectiveName:(0,Ee.copyArrayValueMap)(t.directivesByDirectiveName),kind:t.kind,name:t.name,node:{directives:[],kind:t.kind,name:(0,Mr.stringToNameNode)(t.name)},parentTypeName:t.parentTypeName,persistedDirectivesData:(0,Ie.extractPersistedDirectives)((0,Ie.newPersistedDirectivesData)(),t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),subgraphNames:new Set(t.subgraphNames),description:(0,Ie.getInitialFederatedDescription)(t)}}copyInputValueData(t){return{configureDescriptionDataBySubgraphName:(0,Ee.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByDirectiveName:(0,Ee.copyArrayValueMap)(t.directivesByDirectiveName),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:Pe.Kind.INPUT_VALUE_DEFINITION,name:(0,Mr.stringToNameNode)(t.name),type:t.type},originalCoords:t.originalCoords,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:(0,Ie.extractPersistedDirectives)((0,Ie.newPersistedDirectivesData)(),t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),renamedParentTypeName:t.renamedParentTypeName,requiredSubgraphNames:new Set(t.requiredSubgraphNames),subgraphNames:new Set(t.subgraphNames),type:t.type,defaultValue:t.defaultValue,description:(0,Ie.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,Ee.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 t.directivesByDirectiveName.has(_e.SEMANTIC_NON_NULL)&&this.referencedPersistedDirectiveNames.add(_e.SEMANTIC_NON_NULL),{argumentDataByName:this.copyInputValueDataByValueName(t.argumentDataByName,n,t.federatedCoords),configureDescriptionDataBySubgraphName:(0,Ee.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByDirectiveName:(0,Ee.copyArrayValueMap)(t.directivesByDirectiveName),externalFieldDataBySubgraphName:(0,Ee.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,Mr.stringToNameNode)(t.name),type:t.type},nullLevelsBySubgraphName:t.nullLevelsBySubgraphName,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:(0,Ie.extractPersistedDirectives)((0,Ie.newPersistedDirectivesData)(),t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),renamedParentTypeName:t.renamedParentTypeName,subgraphNames:new Set(t.subgraphNames),type:t.type,description:(0,Ie.getInitialFederatedDescription)(t)}}copyEnumValueDataByValueName(t,n){let r=new Map;for(let[i,a]of t){let o=this.copyEnumValueData(a);this.recordTagNamesByCoords(o,o.federatedCoords),(n||(0,Ie.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,Ie.isNodeDataInaccessible)(a),c=this.copyFieldData(a,o);this.handleSubscriptionFilterDirective(c),(0,Ee.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 Pe.Kind.ENUM_TYPE_DEFINITION:return Q(x({},n),{appearances:t.appearances,enumValueDataByValueName:this.copyEnumValueDataByValueName(t.enumValueDataByValueName,t.isInaccessible),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,Mr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:return Q(x({},n),{inputValueDataByName:this.copyInputValueDataByValueName(t.inputValueDataByName,t.isInaccessible,t.name),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,Mr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Pe.Kind.INTERFACE_TYPE_DEFINITION:return Q(x({},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,Mr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Pe.Kind.OBJECT_TYPE_DEFINITION:return Q(x({},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,Mr.stringToNameNode)(t.renamedTypeName||t.name)},requireFetchReasonsFieldNames:new Set,renamedTypeName:t.renamedTypeName,subgraphNames:new Set(t.subgraphNames)});case Pe.Kind.SCALAR_TYPE_DEFINITION:return Q(x({},n),{kind:t.kind,node:{kind:t.kind,name:(0,Mr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Pe.Kind.UNION_TYPE_DEFINITION:return Q(x({},n),{kind:t.kind,node:{kind:t.kind,name:(0,Mr.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,Ie.isParentDataRootType)(r)&&(r.extensionType=IV.ExtensionType.NONE),r}return(0,Ie.extractPersistedDirectives)(t.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),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,Ie.isNodeDataInaccessible)(a);if(o&&this.inaccessibleCoords.add(a.name),r&&r.interfaceObjectSubgraphs.has(n)&&(a.kind=Pe.Kind.INTERFACE_TYPE_DEFINITION,a.node.kind=Pe.Kind.INTERFACE_TYPE_DEFINITION),!i){this.parentDefinitionDataByTypeName.set(a.name,a);return}if(a.kind!==t.kind&&(!r||!r.interfaceObjectSubgraphs.has(n)||a.kind!==Pe.Kind.INTERFACE_TYPE_DEFINITION||t.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION)){this.errors.push((0,Fe.incompatibleParentKindMergeError)(a.name,(0,Ee.kindToNodeType)(a.kind),(0,Ee.kindToNodeType)(t.kind)));return}switch((0,Ee.addNewObjectValueMapEntries)(t.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,Ie.setLongestDescription)(a,t),(0,Ie.setParentDataExtensionType)(a,t),a.kind){case Pe.Kind.ENUM_TYPE_DEFINITION:if(!(0,Ie.areKindsEqual)(a,t))return;a.appearances+=1,a.isInaccessible||(a.isInaccessible=o),(0,Ee.addIterableValuesToSet)(t.subgraphNames,a.subgraphNames);for(let l of t.enumValueDataByValueName.values())this.upsertEnumValueData(a.enumValueDataByValueName,l,o);return;case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:if(!(0,Ie.areKindsEqual)(a,t))return;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ee.addIterableValuesToSet)(t.subgraphNames,a.subgraphNames);for(let l of t.inputValueDataByName.values())this.upsertInputValueData(a.inputValueDataByName,l,a.name,a.isInaccessible);return;case Pe.Kind.INTERFACE_TYPE_DEFINITION:case Pe.Kind.OBJECT_TYPE_DEFINITION:let c=t;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ee.addIterableValuesToSet)(c.implementedInterfaceTypeNames,a.implementedInterfaceTypeNames),(0,Ee.addIterableValuesToSet)(c.subgraphNames,a.subgraphNames);for(let l of c.fieldDataByName.values())this.upsertFieldData(a.fieldDataByName,l,a.isInaccessible);return;case Pe.Kind.UNION_TYPE_DEFINITION:if(!(0,Ie.areKindsEqual)(a,t))return;(0,Ee.addMapEntries)(t.memberByMemberTypeName,a.memberByMemberTypeName),(0,Ee.addIterableValuesToSet)(t.subgraphNames,a.subgraphNames);return;default:(0,Ee.addIterableValuesToSet)(t.subgraphNames,a.subgraphNames);return}}propagateInaccessibilityToExistingChildren(t){switch(t.kind){case Pe.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.argumentDataByArgumentName.values())this.namedInputValueTypeNames.add(o.namedTypeName),this.upsertInputValueData(a,o,`@${t.name}`,!1);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.set(r,{argumentDataByArgumentName: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,Ie.setMutualExecutableLocations)(i,t.executableLocations),i.executableLocations.size<1){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}for(let a of t.argumentDataByArgumentName.values())this.namedInputValueTypeNames.add((0,hV.getTypeNodeNamedTypeName)(a.type)),this.upsertInputValueData(i.argumentDataByArgumentName,a,`@${i.name}`,!1);(0,Ie.setLongestDescription)(i,t),i.repeatable&&(i.repeatable=t.repeatable),(0,Ee.addIterableValuesToSet)(t.subgraphNames,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,Fe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}break}case Pe.Kind.UNION_TYPE_DEFINITION:{if(l){this.errors.push((0,Fe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}l=f;break}default:{this.errors.push((0,Fe.incompatibleFederatedFieldNamedTypeError)(t,n));break}}}if(o.size<1&&!l){this.errors.push((0,Fe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}let d=l;if(o.size>0){if(l){this.errors.push((0,Fe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}for(let f of o.keys()){d=f;for(let[y,I]of o)if(f!==y&&!I.implementedInterfaceTypeNames.has(f)){d="";break}if(d)break}}if(!this.shouldUpdateFederatedFieldAbstractNamedType(d,c)){this.errors.push((0,Fe.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,ide.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 f of i.satisfiedFieldSets)c.satisfiedFieldSets.add(f),a.has(f)&&l.addTargetSubgraphByFieldSet(f,o);let d=r.fieldDatasBySubgraphName.get(o);for(let{name:f,namedTypeName:y}of d||[])this.internalGraph.addEdge(c,this.internalGraph.addOrUpdateNode(y),f);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,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,n,_e.PARENT_DEFINITION_DATA);if(i.kind===Pe.Kind.INTERFACE_TYPE_DEFINITION)for(let a of r.interfaceObjectSubgraphs){let o=(0,Ee.getOrThrowError)(this.internalSubgraphBySubgraphName,a,"internalSubgraphBySubgraphName"),c=o.configurationDataByTypeName,l=this.concreteTypeNamesByAbstractTypeName.get(n);if(!l)continue;let d=(0,Ee.getOrThrowError)(c,n,"configurationDataByTypeName"),f=d.keys;if(!f)continue;d.entityInterfaceConcreteTypeNames=new Set(r.concreteTypeNames),this.internalGraph.setSubgraphName(a);let y=this.internalGraph.addOrUpdateNode(n,{isAbstract:!0});for(let I of l){let v=(0,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,I,_e.PARENT_DEFINITION_DATA);if(!(0,xr.isObjectDefinitionData)(v))continue;let F=(0,Ee.getOrThrowError)(this.entityDataByTypeName,I,"entityDataByTypeName");F.subgraphNames.add(a);let k=c.get(I);if(k)if((0,Ee.addIterableValuesToSet)(d.fieldNames,k.fieldNames),!k.keys)k.keys=[...f];else e:for(let ie of f){for(let{selectionSet:Te}of k.keys)if(ie.selectionSet===Te)continue e;k.keys.push(ie)}else c.set(I,{fieldNames:new Set(d.fieldNames),isRootNode:!0,keys:[...f],typeName:I});let K=new Set;for(let ie of f.filter(Te=>!Te.disableEntityResolver))K.add(ie.selectionSet);let J=this.authorizationDataByParentTypeName.get(n),se=(0,Ee.getOrThrowError)(o.parentDefinitionDataByTypeName,n,"internalSubgraph.parentDefinitionDataByTypeName");if((0,xr.isObjectDefinitionData)(se)){for(let[ie,Te]of se.fieldDataByName){let de=`${I}.${ie}`;(0,Ee.getValueOrDefault)(this.fieldCoordsByNamedTypeName,Te.namedTypeName,()=>new Set).add(de);let Re=J==null?void 0:J.fieldAuthDataByFieldName.get(ie);if(Re){let ee=(0,Ee.getValueOrDefault)(this.authorizationDataByParentTypeName,I,()=>(0,xr.newAuthorizationData)(I));(0,xr.upsertFieldAuthorizationData)(ee.fieldAuthDataByFieldName,Re)||this.invalidORScopesCoords.add(de)}let xe=v.fieldDataByName.get(ie);if(xe){let ee=(t=Te.isShareableBySubgraphName.get(a))!=null?t:!1;xe.isShareableBySubgraphName.set(a,ee),xe.subgraphNames.add(a);let Se=Te.externalFieldDataBySubgraphName.get(a);if(!Se)continue;xe.externalFieldDataBySubgraphName.set(a,x({},Se));continue}let tt=i.isInaccessible||v.isInaccessible||Te.isInaccessible;v.fieldDataByName.set(ie,this.copyFieldData(Te,tt))}this.handleInterfaceObjectForInternalGraph({internalSubgraph:o,subgraphName:a,interfaceObjectData:r,interfaceObjectNode:y,resolvableKeyFieldSets:K,entityData:F})}}}}}fieldDataToGraphFieldData(t){var n;return{name:t.name,namedTypeName:t.namedTypeName,isLeaf:(0,xr.isNodeLeaf)((n=this.parentDefinitionDataByTypeName.get(t.namedTypeName))==null?void 0:n.kind),subgraphNames:t.subgraphNames}}getValidFlattenedPersistedDirectiveNodeArray(t){var i;let n=(0,xr.getNodeCoords)(t),r=[];for(let[a,o]of t.persistedDirectivesData.directivesByDirectiveName){if(a===_e.SEMANTIC_NON_NULL&&(0,Ie.isFieldData)(t)){r.push((0,Ee.generateSemanticNonNullDirective)((i=(0,Ee.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,Fe.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}r.push(...o)}}return r}getRouterPersistedDirectiveNodes(t){let n=[...t.persistedDirectivesData.tagDirectiveByName.values()];return t.persistedDirectivesData.isDeprecated&&n.push((0,Ie.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,Ac.getDescriptionFromString)(r);if(n.length<1)return t.description;this.errors.push((0,Fe.configureDescriptionPropagationError)((0,Ie.getDefinitionDataCoords)(t,!0),n))}getNodeForRouterSchemaByData(t){return t.node.name=(0,Mr.stringToNameNode)(t.name),t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.node}getNodeWithPersistedDirectivesByInputValueData(t){return t.node.name=(0,Mr.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,Ie.isTypeRequired)(c.type)&&i.push({inputValueName:o,missingSubgraphs:(0,Ee.getEntriesNotInHashSet)(t.subgraphNames,c.subgraphNames),requiredSubgraphs:[...c.requiredSubgraphNames]});return i.length>0?this.errors.push((0,Fe.invalidRequiredInputValueError)(_e.FIELD,a,i)):r.length>0&&((0,Ee.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,Mr.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,Fe.semanticNonNullInconsistentLevelsError)(t));return}for(let i of r)if(!n.has(i)){this.errors.push((0,Fe.semanticNonNullInconsistentLevelsError)(t));return}}}validateOneOfDirective({data:t,inputValueNodes:n,requiredFieldNames:r}){return t.directivesByDirectiveName.has(_e.ONE_OF)?r.size>0?(this.errors.push((0,Fe.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(r),typeName:t.name})),!1):(n.length===1&&this.warnings.push((0,ade.singleFederatedInputFieldOneOfWarning)({fieldName:n[0].name.value,typeName:t.name})),!0):!0}pushParentDefinitionDataToDocumentDefinitions(t){for(let[n,r]of this.parentDefinitionDataByTypeName)switch(r.extensionType!==IV.ExtensionType.NONE&&this.errors.push((0,Fe.noBaseDefinitionForExtensionError)((0,Ee.kindToNodeType)(r.kind),n)),r.kind){case Pe.Kind.ENUM_TYPE_DEFINITION:{let i=[],a=[],o=this.getEnumValueMergeMethod(n);(0,Ie.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n));for(let c of r.enumValueDataByValueName.values()){let l=(0,Ie.getNodeForRouterSchemaByData)(c,this.persistedDirectiveDefinitionByDirectiveName,this.errors),d=(0,Ie.isNodeDataInaccessible)(c),f=Q(x({},c.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(c)});switch(o){case Ie.MergeMethod.CONSISTENT:!d&&r.appearances>c.appearances&&this.errors.push((0,Fe.incompatibleSharedEnumError)(n)),i.push(l),d||a.push(f);break;case Ie.MergeMethod.INTERSECTION:r.appearances===c.appearances&&(i.push(l),d||a.push(f));break;default:i.push(l),d||a.push(f);break}}if(r.node.values=i,this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,Ie.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){this.errors.push((0,Fe.allChildDefinitionsAreInaccessibleError)((0,Ee.kindToNodeType)(r.kind),n,_e.ENUM_VALUE));break}this.clientDefinitions.push(Q(x({},r.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(r),values:a}));break}case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:{let i=new Array,a=new Array,o=new Array,c=new Set;for(let[l,d]of r.inputValueDataByName)if((0,Ie.isTypeRequired)(d.type)&&c.add(l),r.subgraphNames.size===d.subgraphNames.size){if(a.push(this.getNodeWithPersistedDirectivesByInputValueData(d)),(0,Ie.isNodeDataInaccessible)(d))continue;o.push(Q(x({},d.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(d)}))}else(0,Ie.isTypeRequired)(d.type)&&i.push({inputValueName:l,missingSubgraphs:(0,Ee.getEntriesNotInHashSet)(r.subgraphNames,d.subgraphNames),requiredSubgraphs:[...d.requiredSubgraphNames]});if(i.length>0){this.errors.push((0,Fe.invalidRequiredInputValueError)(_e.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,Ie.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r);break}if(o.length<1){this.errors.push((0,Fe.allChildDefinitionsAreInaccessibleError)((0,Ee.kindToNodeType)(r.kind),n,"Input field"));break}this.clientDefinitions.push(Q(x({},r.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(r),fields:o}));break}case Pe.Kind.INTERFACE_TYPE_DEFINITION:case Pe.Kind.OBJECT_TYPE_DEFINITION:{let i=[],a=[],o=new Map,c=(0,Ie.newInvalidFieldNames)(),l=r.kind===Pe.Kind.OBJECT_TYPE_DEFINITION,d=this.authorizationDataByParentTypeName.get(n);(0,Ie.propagateAuthDirectives)(r,d);for(let[y,I]of r.fieldDataByName){(0,Ie.propagateFieldAuthDirectives)(I,d);let v=this.getValidFieldArgumentNodes(I);l&&(0,Ie.validateExternalAndShareable)(I,c),this.validateSemanticNonNull(I),i.push(this.getNodeWithPersistedDirectivesByFieldData(I,v)),!(0,Ie.isNodeDataInaccessible)(I)&&(a.push((0,Ie.getClientSchemaFieldNodeByFieldData)(I)),o.set(y,this.fieldDataToGraphFieldData(I)))}if(l&&(c.byShareable.size>0&&this.errors.push((0,Fe.invalidFieldShareabilityError)(r,c.byShareable)),c.subgraphNamesByExternalFieldName.size>0&&this.errors.push((0,Fe.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 f=(0,rde.isNodeQuery)(n);if((0,Ie.isNodeDataInaccessible)(r)){if(f){this.errors.push(Fe.inaccessibleQueryRootTypeError);break}this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){let y=f?(0,Fe.noQueryRootTypeError)(!1):(0,Fe.allChildDefinitionsAreInaccessibleError)((0,Ee.kindToNodeType)(r.kind),n,_e.FIELD);this.errors.push(y);break}this.clientDefinitions.push(Q(x({},r.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(r),fields:a}));break}case Pe.Kind.SCALAR_TYPE_DEFINITION:{if(Bt.BASE_SCALARS.has(n))break;if((0,Ie.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n)),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,Ie.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}this.clientDefinitions.push(Q(x({},r.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(r)}));break}case Pe.Kind.UNION_TYPE_DEFINITION:{if(r.node.types=(0,xr.mapToArrayOfValues)(r.memberByMemberTypeName),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,Ie.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}let i=this.getClientSchemaUnionMembers(r);if(i.length<1){this.errors.push((0,Fe.allChildDefinitionsAreInaccessibleError)(_e.UNION,n,"union member type"));break}this.clientDefinitions.push(Q(x({},r.node),{directives:(0,Ie.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(_e.PERIOD);switch(o.length){case 2:{let c=(0,Ee.getValueOrDefault)(this.authorizationDataByParentTypeName,o[0],()=>(0,xr.newAuthorizationData)(o[0])),l=(0,Ee.getValueOrDefault)(c.fieldAuthDataByFieldName,o[1],()=>(0,xr.newFieldAuthorizationData)(o[1]));(t=l.inheritedData).requiresAuthentication||(t.requiresAuthentication=r.requiresAuthentication),l.inheritedData.requiredScopes.length*r.requiredScopes.length>Bt.MAX_OR_SCOPES?this.invalidORScopesCoords.add(a):(l.inheritedData.requiredScopesByOR=(0,xr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopesByOR,r.requiredScopesByOR),l.inheritedData.requiredScopes=(0,xr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopes,r.requiredScopes));break}default:break}}}}federateSubgraphData(){this.federateInternalSubgraphData(),this.handleEntityInterfaces(),this.generateTagData(),this.pushVersionTwoDirectiveDefinitionsToDocumentDefinitions(),this.pushNamedTypeAuthDataToFields()}validateInterfaceImplementationsAndPushToDocumentDefinitions(t){for(let{data:n,clientSchemaFieldNodes:r}of t){if(n.node.interfaces=this.getValidImplementedInterfaces(n),this.routerDefinitions.push((0,Ie.getNodeForRouterSchemaByData)(n,this.persistedDirectiveDefinitionByDirectiveName,this.errors)),(0,Ie.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,Mr.stringToNamedTypeNode)(a));this.clientDefinitions.push(Q(x({},n.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(n),fields:r,interfaces:i}))}}pushVersionTwoDirectiveDefinitionsToDocumentDefinitions(){if(!this.isVersionTwo){this.referencedPersistedDirectiveNames.has(_e.SEMANTIC_NON_NULL)&&(this.clientDefinitions.push(Bt.SEMANTIC_NON_NULL_DEFINITION),this.routerDefinitions=[Bt.DEPRECATED_DEFINITION,Bt.SEMANTIC_NON_NULL_DEFINITION,Bt.TAG_DEFINITION]);return}if(this.referencedPersistedDirectiveNames.has(_e.SEMANTIC_NON_NULL)){this.clientDefinitions.push(Bt.SEMANTIC_NON_NULL_DEFINITION),this.routerDefinitions=[Bt.AUTHENTICATED_DEFINITION,Bt.DEPRECATED_DEFINITION,Bt.INACCESSIBLE_DEFINITION,Bt.REQUIRES_SCOPES_DEFINITION,Bt.SEMANTIC_NON_NULL_DEFINITION,Bt.TAG_DEFINITION,Bt.SCOPE_SCALAR_DEFINITION];return}this.routerDefinitions=[Bt.AUTHENTICATED_DEFINITION,Bt.DEPRECATED_DEFINITION,Bt.INACCESSIBLE_DEFINITION,Bt.REQUIRES_SCOPES_DEFINITION,Bt.TAG_DEFINITION,Bt.SCOPE_SCALAR_DEFINITION]}validatePathSegmentInaccessibility(t){if(!t)return!1;let r=t.split(_e.LEFT_PARENTHESIS)[0].split(_e.PERIOD),i=r[0];for(let a=0;a0&&this.errors.push((0,Fe.invalidReferencesOfInaccessibleTypeError)((0,Ee.kindToNodeType)(t.kind),t.name,r))}validateQueryRootType(){let t=this.parentDefinitionDataByTypeName.get(_e.QUERY);if(!t||t.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size<1){this.errors.push((0,Fe.noQueryRootTypeError)());return}for(let n of t.fieldDataByName.values())if(!(0,Ie.isNodeDataInaccessible)(n))return;this.errors.push((0,Fe.noQueryRootTypeError)())}validateSubscriptionFieldConditionFieldPath(t,n,r,i,a){let o=t.split(_e.PERIOD);if(o.length<1)return a.push((0,Fe.invalidSubscriptionFieldConditionFieldPathErrorMessage)(r,t)),[];let c=n;if(this.inaccessibleCoords.has(c.renamedTypeName))return a.push((0,Fe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,o[0],c.renamedTypeName)),[];let l="";for(let d=0;d0?`.${f}`:f,c.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION)return a.push((0,Fe.invalidSubscriptionFieldConditionFieldPathParentErrorMessage)(r,t,l)),[];let y=c.fieldDataByName.get(f);if(!y)return a.push((0,Fe.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,f,c.renamedTypeName)),[];let I=`${c.renamedTypeName}.${f}`;if(!y.subgraphNames.has(i))return a.push((0,Fe.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I,i)),[];if(this.inaccessibleCoords.has(I))return a.push((0,Fe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I)),[];if(Bt.BASE_SCALARS.has(y.namedTypeName)){c={kind:Pe.Kind.SCALAR_TYPE_DEFINITION,name:y.namedTypeName};continue}c=(0,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,y.namedTypeName,_e.PARENT_DEFINITION_DATA)}return(0,Ie.isLeafKind)(c.kind)?o:(a.push((0,Fe.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage)(r,t,o[o.length-1],(0,Ee.kindToNodeType)(c.kind),c.name)),[])}validateSubscriptionFieldCondition(t,n,r,i,a,o,c){if(i>GE.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return c.push((0,Fe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;let l=!1,d=new Set([_e.FIELD_PATH,_e.VALUES]),f=new Set,y=new Set,I=[];for(let v of t.fields){let F=v.name.value,k=a+`.${F}`;switch(F){case _e.FIELD_PATH:{if(d.has(_e.FIELD_PATH))d.delete(_e.FIELD_PATH);else{l=!0,f.add(_e.FIELD_PATH);break}if(v.value.kind!==Pe.Kind.STRING){I.push((0,Fe.invalidInputFieldTypeErrorMessage)(k,_e.STRING,(0,Ee.kindToNodeType)(v.value.kind))),l=!0;break}let K=this.validateSubscriptionFieldConditionFieldPath(v.value.value,r,k,o,I);if(K.length<1){l=!0;break}n.fieldPath=K;break}case _e.VALUES:{if(d.has(_e.VALUES))d.delete(_e.VALUES);else{l=!0,f.add(_e.VALUES);break}let K=v.value.kind;if(K==Pe.Kind.NULL||K==Pe.Kind.OBJECT){I.push((0,Fe.invalidInputFieldTypeErrorMessage)(k,_e.LIST,(0,Ee.kindToNodeType)(v.value.kind))),l=!0;break}if(K!==Pe.Kind.LIST){n.values=[(0,Ie.getSubscriptionFilterValue)(v.value)];break}let J=new Set,se=[];for(let ie=0;ie0){I.push((0,Fe.subscriptionFieldConditionInvalidValuesArrayErrorMessage)(k,se));continue}if(J.size<1){l=!0,I.push((0,Fe.subscriptionFieldConditionEmptyValuesArrayErrorMessage)(k));continue}n.values=[...J];break}default:l=!0,y.add(F)}}return l?(c.push((0,Fe.subscriptionFieldConditionInvalidInputFieldErrorMessage)(a,[...d],[...f],[...y],I)),!1):!0}validateSubscriptionFilterCondition(t,n,r,i,a,o,c){if(i>GE.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return c.push((0,Fe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;if(i+=1,t.fields.length!==1)return c.push((0,Fe.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage)(a,t.fields.length)),!1;let l=t.fields[0],d=l.name.value;if(!yV.SUBSCRIPTION_FILTER_INPUT_NAMES.has(d))return c.push((0,Fe.subscriptionFilterConditionInvalidInputFieldErrorMessage)(a,d)),!1;let f=a+`.${d}`;switch(l.value.kind){case Pe.Kind.OBJECT:switch(d){case _e.IN_UPPER:return n.in={fieldPath:[],values:[]},this.validateSubscriptionFieldCondition(l.value,n.in,r,i,a+".IN",o,c);case _e.NOT_UPPER:return n.not={},this.validateSubscriptionFilterCondition(l.value,n.not,r,i,a+".NOT",o,c);default:return c.push((0,Fe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(f,_e.LIST,_e.OBJECT)),!1}case Pe.Kind.LIST:{let y=[];switch(d){case _e.AND_UPPER:{n.and=y;break}case _e.OR_UPPER:{n.or=y;break}default:return c.push((0,Fe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(f,_e.OBJECT,_e.LIST)),!1}let I=l.value.values.length;if(I<1||I>5)return c.push((0,Fe.subscriptionFilterArrayConditionInvalidLengthErrorMessage)(f,I)),!1;let v=!0,F=[];for(let k=0;k0?(c.push((0,Fe.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage)(f,F)),!1):v}default:{let y=yV.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES.has(d)?_e.LIST:_e.OBJECT;return c.push((0,Fe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(f,y,(0,Ee.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!==Pe.Kind.OBJECT){this.errors.push((0,Fe.invalidSubscriptionFilterDirectiveError)(r,[(0,Fe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(_e.CONDITION,_e.OBJECT,(0,Ee.kindToNodeType)(c.value.kind))]));return}let l={},d=[];if(!this.validateSubscriptionFilterCondition(c.value,l,n,0,_e.CONDITION,o,d)){this.errors.push((0,Fe.invalidSubscriptionFilterDirectiveError)(r,d)),this.isMaxDepth=!1;return}(0,Ee.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,Fe.invalidSubscriptionFilterDirectiveError)(t,[(0,Fe.subscriptionFilterNamedTypeErrorMessage)(n.fieldData.namedTypeName)]));continue}(0,Ie.isNodeDataInaccessible)(r)||r.kind===Pe.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,Fe.orScopesLimitError)(Bt.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));for(let a of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,Ie.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:Pe.Kind.DOCUMENT,definitions:this.routerDefinitions},r=(0,Pe.buildASTSchema)({kind:Pe.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),i=new Map;for(let a of this.internalSubgraphBySubgraphName.values())i.set(a.name,{configurationDataByTypeName:a.configurationDataByTypeName,isVersionTwo:a.isVersionTwo,parentDefinitionDataByTypeName:a.parentDefinitionDataByTypeName,schema:a.schema});for(let a of this.authorizationDataByParentTypeName.values())(0,xr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,a);return x({fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),subgraphConfigBySubgraphName:i,federatedGraphAST:n,federatedGraphSchema:(0,Pe.buildASTSchema)(n,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:r,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,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,Ee.getOrThrowError)(n,o,`${t.name}.childDataByChildName`);if((0,Ie.isNodeDataInaccessible)(l)){a-=1;continue}i.isDisjointFrom(c.tagNames)||((0,Ee.getValueOrDefault)(l.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}handleChildTagInclusions(t,n,r,i){let a=n.size;for(let[o,c]of n){if((0,Ie.isNodeDataInaccessible)(c)){a-=1;continue}let l=r.get(o);(!l||i.isDisjointFrom(l.tagNames))&&((0,Ee.getValueOrDefault)(c.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}buildFederationContractResult(t){if(this.isVersionTwo||this.routerDefinitions.push(Bt.INACCESSIBLE_DEFINITION),t.tagNamesToExclude.size>0)for(let[o,c]of this.parentTagDataByTypeName){let l=(0,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,o,_e.PARENT_DEFINITION_DATA);if(!(0,Ie.isNodeDataInaccessible)(l)){if(!t.tagNamesToExclude.isDisjointFrom(c.tagNames)){l.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(!(c.childTagDataByChildName.size<1))switch(l.kind){case Pe.Kind.SCALAR_TYPE_DEFINITION:case Pe.Kind.UNION_TYPE_DEFINITION:break;case Pe.Kind.ENUM_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.enumValueDataByValueName,c.childTagDataByChildName,t.tagNamesToExclude);break}case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.inputValueDataByName,c.childTagDataByChildName,t.tagNamesToExclude);break}default:{let d=l.fieldDataByName.size;for(let[f,y]of c.childTagDataByChildName){let I=(0,Ee.getOrThrowError)(l.fieldDataByName,f,`${o}.fieldDataByFieldName`);if((0,Ie.isNodeDataInaccessible)(I)){d-=1;continue}if(!t.tagNamesToExclude.isDisjointFrom(y.tagNames)){(0,Ee.getValueOrDefault)(I.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(I.federatedCoords),d-=1;continue}for(let[v,F]of y.tagNamesByArgumentName){let k=(0,Ee.getOrThrowError)(I.argumentDataByName,v,`${f}.argumentDataByArgumentName`);(0,Ie.isNodeDataInaccessible)(k)||t.tagNamesToExclude.isDisjointFrom(F)||((0,Ee.getValueOrDefault)(k.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(k.federatedCoords))}}d<1&&(l.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}}else if(t.tagNamesToInclude.size>0)for(let[o,c]of this.parentDefinitionDataByTypeName){if((0,Ie.isNodeDataInaccessible)(c))continue;let l=this.parentTagDataByTypeName.get(o);if(!l){c.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(t.tagNamesToInclude.isDisjointFrom(l.tagNames)){if(l.childTagDataByChildName.size<1){c.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}switch(c.kind){case Pe.Kind.SCALAR_TYPE_DEFINITION:case Pe.Kind.UNION_TYPE_DEFINITION:continue;case Pe.Kind.ENUM_TYPE_DEFINITION:this.handleChildTagInclusions(c,c.enumValueDataByValueName,l.childTagDataByChildName,t.tagNamesToInclude);break;case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:this.handleChildTagInclusions(c,c.inputValueDataByName,l.childTagDataByChildName,t.tagNamesToInclude);break;default:let d=c.fieldDataByName.size;for(let[f,y]of c.fieldDataByName){if((0,Ie.isNodeDataInaccessible)(y)){d-=1;continue}let I=l.childTagDataByChildName.get(f);(!I||t.tagNamesToInclude.isDisjointFrom(I.tagNames))&&((0,Ee.getValueOrDefault)(y.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(y.federatedCoords),d-=1)}d<1&&(c.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration();for(let o of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,Ie.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:Pe.Kind.DOCUMENT,definitions:this.routerDefinitions},i=(0,Pe.buildASTSchema)({kind:Pe.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),a=new Map;for(let o of this.internalSubgraphBySubgraphName.values())a.set(o.name,{configurationDataByTypeName:o.configurationDataByTypeName,isVersionTwo:o.isVersionTwo,parentDefinitionDataByTypeName:o.parentDefinitionDataByTypeName,schema:o.schema});for(let o of this.authorizationDataByParentTypeName.values())(0,xr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,o);return x({fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),subgraphConfigBySubgraphName:a,federatedGraphAST:r,federatedGraphSchema:(0,Pe.buildASTSchema)(r,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:i,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,success:!0,warnings:this.warnings},this.getClientSchemaObjectBoolean())}federateSubgraphsInternal(){return this.federateSubgraphData(),this.buildFederationResult()}};Rc.FederationFactory=$E;function _D({disableResolvabilityValidation:e,subgraphs:t}){if(t.length<1)return{errors:[Fe.minimumSubgraphRequirementError],success:!1,warnings:[]};let n=(0,nde.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,f]of l.entityInterfaces){let y=r.get(d);if(!y){r.set(d,(0,xr.newEntityInterfaceFederationData)(f,c));continue}(0,xr.upsertEntityInterfaceFederationData)(y,f,c)}let a=new Array,o=new Map;for(let[c,l]of r){let d=l.concreteTypeNames.size;for(let[f,y]of l.subgraphDataByTypeName){let I=(0,Ee.getValueOrDefault)(o,f,()=>new Set);if((0,Ee.addIterableValuesToSet)(y.concreteTypeNames,I),!y.isInterfaceObject){y.resolvable&&y.concreteTypeNames.size!==d&&(0,Ee.getValueOrDefault)(i,c,()=>new Array).push({subgraphName:f,definedConcreteTypeNames:new Set(y.concreteTypeNames),requiredConcreteTypeNames:new Set(l.concreteTypeNames)});continue}(0,Ee.addIterableValuesToSet)(l.concreteTypeNames,I);let{parentDefinitionDataByTypeName:v}=(0,Ee.getOrThrowError)(n.internalSubgraphBySubgraphName,f,"internalSubgraphBySubgraphName"),F=[];for(let k of l.concreteTypeNames)v.has(k)&&F.push(k);F.length>0&&a.push((0,Fe.invalidInterfaceObjectImplementationDefinitionsError)(c,f,F))}}for(let[c,l]of i){let d=new Array;for(let f of l){let y=o.get(f.subgraphName);if(!y){d.push(f);continue}let I=f.requiredConcreteTypeNames.intersection(y);f.requiredConcreteTypeNames.size!==I.size&&(f.definedConcreteTypeNames=I,d.push(f))}if(d.length>0){i.set(c,d);continue}i.delete(c)}return i.size>0&&a.push((0,Fe.undefinedEntityInterfaceImplementationsError)(i,r)),a.length>0?{errors:a,success:!1,warnings:n.warnings}:{federationFactory:new $E({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 sde({disableResolvabilityValidation:e,subgraphs:t}){let n=_D({subgraphs:t,disableResolvabilityValidation:e});return n.success?n.federationFactory.federateSubgraphsInternal():{errors:n.errors,success:!1,warnings:n.warnings}}function ode({subgraphs:e,tagOptionsByContractName:t,disableResolvabilityValidation:n}){let r=_D({subgraphs:e,disableResolvabilityValidation:n});if(!r.success)return{errors:r.errors,success:!1,warnings:r.warnings};r.federationFactory.federateSubgraphData();let i=[(0,gV.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,f]of t){l!==o&&i.push((0,gV.cloneDeep)(i[l]));let y=i[l].buildFederationContractResult(f);c.set(d,y),l++}return Q(x({},a),{federationResultByContractName:c})}function ude({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n}){let r=_D({subgraphs:n,disableResolvabilityValidation:t});return r.success?(r.federationFactory.federateSubgraphData(),r.federationFactory.buildFederationContractResult(e)):{errors:r.errors,success:!1,warnings:r.warnings}}});var QE=w(As=>{"use strict";m();T();N();Object.defineProperty(As,"__esModule",{value:!0});As.LATEST_ROUTER_COMPATIBILITY_VERSION=As.ROUTER_COMPATIBILITY_VERSIONS=As.ROUTER_COMPATIBILITY_VERSION_ONE=void 0;As.ROUTER_COMPATIBILITY_VERSION_ONE="1";As.ROUTER_COMPATIBILITY_VERSIONS=new Set([As.ROUTER_COMPATIBILITY_VERSION_ONE]);As.LATEST_ROUTER_COMPATIBILITY_VERSION="1"});var vV=w(tf=>{"use strict";m();T();N();Object.defineProperty(tf,"__esModule",{value:!0});tf.federateSubgraphs=cde;tf.federateSubgraphsWithContracts=lde;tf.federateSubgraphsContract=dde;var vD=_V(),SD=QE();function cde({disableResolvabilityValidation:e,subgraphs:t,version:n=SD.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(n){default:return(0,vD.federateSubgraphs)({disableResolvabilityValidation:e,subgraphs:t})}}function lde({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n,version:r=SD.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,vD.federateSubgraphsWithContracts)({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n})}}function dde({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n,version:r=SD.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,vD.federateSubgraphsContract)({disableResolvabilityValidation:t,subgraphs:n,contractTagOptions:e})}}});var OV=w(SV=>{"use strict";m();T();N();Object.defineProperty(SV,"__esModule",{value:!0})});var DV=w(nf=>{"use strict";m();T();N();Object.defineProperty(nf,"__esModule",{value:!0});nf.normalizeSubgraphFromString=pde;nf.normalizeSubgraph=fde;nf.batchNormalize=mde;var OD=hD(),DD=QE();function pde(e,t=!0,n=DD.ROUTER_COMPATIBILITY_VERSION_ONE){switch(n){default:return(0,OD.normalizeSubgraphFromString)(e,t)}}function fde(e,t,n,r=DD.ROUTER_COMPATIBILITY_VERSION_ONE){switch(r){default:return(0,OD.normalizeSubgraph)(e,t,n)}}function mde(e,t=DD.ROUTER_COMPATIBILITY_VERSION_ONE){switch(t){default:return(0,OD.batchNormalize)(e)}}});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 MV=w(kV=>{"use strict";m();T();N();Object.defineProperty(kV,"__esModule",{value:!0})});var xV=w(YE=>{"use strict";m();T();N();Object.defineProperty(YE,"__esModule",{value:!0});YE.COMPOSITION_VERSION=void 0;YE.COMPOSITION_VERSION="{{$COMPOSITION__VERSION}}"});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 JE=w(ot=>{"use strict";m();T();N();var Nde=ot&&ot.__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]}),yt=ot&&ot.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Nde(t,e,n)};Object.defineProperty(ot,"__esModule",{value:!0});yt(Hr(),ot);yt(Dv(),ot);yt(Mi(),ot);yt(Xk(),ot);yt(vV(),ot);yt(OV(),ot);yt(DV(),ot);yt(AV(),ot);yt(ND(),ot);yt(iD(),ot);yt(LE(),ot);yt(PV(),ot);yt(wV(),ot);yt(cD(),ot);yt(QE(),ot);yt(CV(),ot);yt(TD(),ot);yt(du(),ot);yt(Sp(),ot);yt(vl(),ot);yt(UV(),ot);yt(MV(),ot);yt(xV(),ot);yt(vr(),ot);yt(VV(),ot);yt(Sr(),ot);yt(zO(),ot);yt(VN(),ot);yt(gD(),ot);yt(KV(),ot);yt($O(),ot);yt(Hp(),ot);yt($V(),ot);yt(ZO(),ot);yt(jE(),ot);yt(JO(),ot);yt(Ss(),ot);yt(Jp(),ot);yt(jp(),ot);yt(zp(),ot)});var upe={};pm(upe,{buildRouterConfiguration:()=>ope,federateSubgraphs:()=>spe});m();T();N();var Uc=fs(JE());m();T();N();m();T();N();function bD(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=fs(Ae(),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 e1(e){return HE(e,[])}function HE(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Tde(e,t);default:return String(e)}}function zV(e){return e instanceof XV.GraphQLError?e.toString():`${e.name}: ${e.message}; + ${e.stack}`}function Tde(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(Ede(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:HE(r,n)}else if(Array.isArray(e))return WV(e,n);return hde(e,n)}function Ede(e){return typeof e.toJSON=="function"}function hde(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>ZV?"["+yde(e)+"]":"{ "+n.map(([i,a])=>i+": "+HE(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 we=fs(Ae(),1);m();T();N();var Xa=fs(Ae(),1);function Za(e){if((0,Xa.isNonNullType)(e)){let t=Za(e.ofType);if(t.kind===Xa.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${e1(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:Xa.Kind.NON_NULL_TYPE,type:t}}else if((0,Xa.isListType)(e))return{kind:Xa.Kind.LIST_TYPE,type:Za(e.ofType)};return{kind:Xa.Kind.NAMED_TYPE,name:{kind:Xa.Kind.NAME,value:e.name}}}m();T();N();var es=fs(Ae(),1);function WE(e){if(e===null)return{kind:es.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=WE(n);r!=null&&t.push(r)}return{kind:es.Kind.LIST,values:t}}if(typeof e=="object"){let t=[];for(let n in e){let r=e[n],i=WE(r);i&&t.push({kind:es.Kind.OBJECT_FIELD,name:{kind:es.Kind.NAME,value:n},value:i})}return{kind:es.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:es.Kind.BOOLEAN,value:e};if(typeof e=="number"&&isFinite(e)){let t=String(e);return Ide.test(t)?{kind:es.Kind.INT,value:t}:{kind:es.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:es.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}var Ide=/^-?(?:0|[1-9][0-9]*)$/;m();T();N();m();T();N();function XE(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 pMe=XE(function(t){let n=gde(t);return new Set([...n].map(r=>r.name))}),gde=XE(function(t){let n=AD(t);return new Set(n.values())}),AD=XE(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 _de(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=vde(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let c of o)(0,we.isSpecifiedDirective)(c)||a.push(Sde(c,e,n));for(let c in r){let l=r[c],d=(0,we.isSpecifiedScalarType)(l),f=(0,we.isIntrospectionType)(l);if(!(d||f))if((0,we.isObjectType)(l))a.push(Ode(l,e,n));else if((0,we.isInterfaceType)(l))a.push(Dde(l,e,n));else if((0,we.isUnionType)(l))a.push(bde(l,e,n));else if((0,we.isInputObjectType)(l))a.push(Ade(l,e,n));else if((0,we.isEnumType)(l))a.push(Rde(l,e,n));else if((0,we.isScalarType)(l))a.push(Pde(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:we.Kind.DOCUMENT,definitions:a}}function t1(e,t={}){let n=_de(e,t);return(0,we.print)(n)}function vde(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 f of e.extensionASTNodes)a.push(f);for(let f of a)if(f.operationTypes)for(let y of f.operationTypes)i.set(y.operation,y);let o=AD(e);for(let[f,y]of i){let I=o.get(f);if(I!=null){let v=Za(I);y!=null?y.type=v:i.set(f,{kind:we.Kind.OPERATION_TYPE_DEFINITION,operation:f,type:v})}}let c=[...i.values()].filter(YV),l=ed(e,e,t);if(!c.length&&!l.length)return null;let d={kind:c!=null?we.Kind.SCHEMA_DEFINITION:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,d}function Sde(e,t,n){var r,i,a,o;return{kind:we.Kind.DIRECTIVE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:we.Kind.STRING,value:e.description}:void 0,name:{kind:we.Kind.NAME,value:e.name},arguments:(a=e.args)===null||a===void 0?void 0:a.map(c=>n1(c,t,n)),repeatable:e.isRepeatable,locations:((o=e.locations)===null||o===void 0?void 0:o.map(c=>({kind:we.Kind.NAME,value:c})))||[]}}function ed(e,t,n){let r=zE(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=RD(t,r);else{a=[];for(let o of i)o.directives&&a.push(...o.directives)}return a}function eh(e,t,n){var r,i;let a=[],o=null,c=zE(e,n),l;return c!=null?l=RD(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=Lde(e.deprecationReason)),o==null?a:[o].concat(a)}function n1(e,t,n){var r,i,a;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},type:Za(e.type),defaultValue:e.defaultValue!==void 0&&(a=(0,we.astFromValue)(e.defaultValue,e.type))!==null&&a!==void 0?a:void 0,directives:eh(e,t,n)}}function Ode(e,t,n){var r,i;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(a=>r1(a,t,n)),interfaces:Object.values(e.getInterfaces()).map(a=>Za(a)),directives:ed(e,t,n)}}function Dde(e,t,n){var r,i;let a={kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(o=>r1(o,t,n)),directives:ed(e,t,n)};return"getInterfaces"in e&&(a.interfaces=Object.values(e.getInterfaces()).map(o=>Za(o))),a}function bde(e,t,n){var r,i;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},directives:ed(e,t,n),types:e.getTypes().map(a=>Za(a))}}function Ade(e,t,n){var r,i;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(a=>Fde(a,t,n)),directives:ed(e,t,n)}}function Rde(e,t,n){var r,i;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(a=>wde(a,t,n)),directives:ed(e,t,n)}}function Pde(e,t,n){var r,i,a;let o=zE(e,n),c=o?RD(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(ZE("specifiedBy",d))}return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},directives:c}}function r1(e,t,n){var r,i;return{kind:we.Kind.FIELD_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},arguments:e.args.map(a=>n1(a,t,n)),type:Za(e.type),directives:eh(e,t,n)}}function Fde(e,t,n){var r,i,a;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},type:Za(e.type),directives:eh(e,t,n),defaultValue:(a=(0,we.astFromValue)(e.defaultValue,e.type))!==null&&a!==void 0?a:void 0}}function wde(e,t,n){var r,i;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},directives:eh(e,t,n)}}function Lde(e){return ZE("deprecated",{reason:e},we.GraphQLDeprecatedDirective)}function ZE(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,we.astFromValue)(o,i.type);c&&r.push({kind:we.Kind.ARGUMENT,name:{kind:we.Kind.NAME,value:a},value:c})}}else for(let i in t){let a=t[i],o=WE(a);o&&r.push({kind:we.Kind.ARGUMENT,name:{kind:we.Kind.NAME,value:i},value:o})}return{kind:we.Kind.DIRECTIVE,name:{kind:we.Kind.NAME,value:e},arguments:r}}function RD(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(ZE(r,o,a));else n.push(ZE(r,i,a))}return n}var cd=fs(JE(),1);m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();function ln(e,t){if(!e)throw new Error(t)}var Cde=34028234663852886e22,Bde=-34028234663852886e22,Ude=4294967295,kde=2147483647,Mde=-2147483648;function td(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>kde||eUde||e<0)throw new Error("invalid uint 32: "+e)}function th(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>Cde||e({no:i.no,name:i.name,localName:e[i.no]})),r)}function FD(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let o of t){let c=o1(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 s1(e,t,n){let r={};for(let i of t){let a=o1(i);r[a.localName]=a.no,r[a.no]=a.localName}return PD(r,e,t,n),r}function o1(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}m();T();N();m();T();N();var Le=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 u1(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 Le),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 l1(){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 nh=4294967296;function wD(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>=nh&&(i=i+(r/nh|0),r=r%nh)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?p1(r,i):CD(r,i)}function d1(e,t){let n=CD(e,t),r=n.hi&2147483648;r&&(n=p1(n.lo,n.hi));let i=LD(n.lo,n.hi);return r?"-"+i:i}function LD(e,t){if({lo:e,hi:t}=xde(e,t),t<=2097151)return String(nh*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()+c1(o)+c1(a)}function xde(e,t){return{lo:e>>>0,hi:t>>>0}}function CD(e,t){return{lo:e|0,hi:t|0}}function p1(e,t){return t=~t,e?e=~e+1:t+=1,CD(e,t)}var c1=e=>{let t=String(e);return"0000000".slice(t.length)+t};function BD(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 f1(){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 qde(){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 O!="object"||typeof O.env!="object"||O.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||dln(/^-?[0-9]+$/.test(i),`int64 invalid: ${i}`),r=i=>ln(/^[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),wD(i)},uEnc(i){return typeof i!="string"&&(i=i.toString()),r(i),wD(i)},dec(i,a){return d1(i,a)},uDec(i,a){return LD(i,a)}}}var Gn=qde();m();T();N();var Ne;(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"})(Ne||(Ne={}));var ha;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING"})(ha||(ha={}));function Rs(e,t,n){if(t===n)return!0;if(e==Ne.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(rf(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return td(t),BD(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){th(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){rf(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){td(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return td(t),t=(t<<1^t>>31)>>>0,BD(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=Gn.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=Gn.uEnc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}int64(t){let n=Gn.enc(t);return rh(n.lo,n.hi,this.buf),this}sint64(t){let n=Gn.enc(t),r=n.hi>>31,i=n.lo<<1^r,a=(n.hi<<1|n.lo>>>31)^r;return rh(i,a,this.buf),this}uint64(t){let n=Gn.uEnc(t);return rh(n.lo,n.hi,this.buf),this}},sh=class{constructor(t,n){this.varint64=l1,this.uint32=f1,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 Un.Varint:for(;this.buf[this.pos++]&128;);break;case Un.Bit64:this.pos+=4;case Un.Bit32:this.pos+=4;break;case Un.LengthDelimited:let r=this.uint32();this.pos+=r;break;case Un.StartGroup:let i;for(;(i=this.tag()[1])!==Un.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 Gn.dec(...this.varint64())}uint64(){return Gn.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),r=-(t&1);return t=(t>>>1|(n&1)<<31)^r,n=n>>>1^r,Gn.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 Gn.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Gn.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 m1(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 oh(e){let t=e.field.localName,n=Object.create(null);return n[t]=Vde(e),[n,()=>n[t]]}function Vde(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 ya(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 N1(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 Ps="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),uh=[];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+=Ps[i|r>>4],i=(r&15)<<2,n=2;break;case 2:t+=Ps[i|r>>6],t+=Ps[r&63],n=0;break}return n&&(t+=Ps[i],t+="=",n==1&&(t+="=")),t}};m();T();N();function T1(e,t,n){h1(t,e);let r=t.runtime.bin.makeReadOptions(n),i=N1(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,o]=oh(t);for(let c of i)t.runtime.bin.readField(a,r.readerFactory(c.data),t.field,c.wireType,r);return o()}function E1(e,t,n,r){h1(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(kD(e,t)){let d=e.getType().runtime.bin.listUnknownFields(e).filter(f=>f.no!=t.field.no);e.getType().runtime.bin.discardUnknownFields(e);for(let f of d)e.getType().runtime.bin.onUnknownField(e,f.no,f.wireType,f.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 h1(e,t){ln(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}m();T();N();function ch(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:!ih(e.T,t[n]);case"message":return t[n]!==void 0;case"map":return Object.keys(t[n]).length>0}}function MD(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?ya(e.T,e.L):void 0;break;case"message":t[n]=void 0;break}}m();T();N();m();T();N();function Ia(e,t){if(e===null||typeof e!="object"||!Object.getOwnPropertyNames(Le.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 lh(e,t){return Ia(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}var $xe={"google.protobuf.DoubleValue":Ne.DOUBLE,"google.protobuf.FloatValue":Ne.FLOAT,"google.protobuf.Int64Value":Ne.INT64,"google.protobuf.UInt64Value":Ne.UINT64,"google.protobuf.Int32Value":Ne.INT32,"google.protobuf.UInt32Value":Ne.UINT32,"google.protobuf.BoolValue":Ne.BOOL,"google.protobuf.StringValue":Ne.STRING,"google.protobuf.BytesValue":Ne.BYTES};var y1={ignoreUnknownFields:!1},I1={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function jde(e){return e?Object.assign(Object.assign({},y1),e):y1}function Kde(e){return e?Object.assign(Object.assign({},I1),e):I1}var fh=Symbol(),dh=Symbol();function v1(){return{makeReadOptions:jde,makeWriteOptions:Kde,readMessage(e,t,n,r){if(t==null||Array.isArray(t)||typeof t!="object")throw new Error(`cannot decode message ${e.typeName} from JSON: ${ts(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)}g1(r,c,l,n,e)}else{let d=!1;if(a!=null&&a.findExtension&&o.startsWith("[")&&o.endsWith("]")){let f=a.findExtension(o.substring(1,o.length-1));if(f&&f.extendee.typeName==e.typeName){d=!0;let[y,I]=oh(f);g1(y,c,f.field,n,f),E1(r,f,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(!ch(i,e)){if(i.req)throw"required field not set";if(!t.emitDefaultValues||!$de(i))continue}let o=i.oneof?e[i.oneof.localName].value:e[i.localName],c=_1(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&&kD(e,c)){let l=T1(e,c,t),d=_1(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 af(e,t,n!=null?n:ha.BIGINT,!0)},writeScalar(e,t,n){if(t!==void 0&&(n||ih(e,t)))return ph(e,t)},debug:ts}}function ts(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 g1(e,t,n,r,i){let a=n.localName;if(n.repeated){if(ln(n.kind!="map"),t===null)return;if(!Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${ts(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: ${ts(c)}`);switch(n.kind){case"message":o.push(n.T.fromJson(c,r));break;case"enum":let l=xD(n.T,c,r.ignoreUnknownFields,!0);l!==dh&&o.push(l);break;case"scalar":try{o.push(af(n.T,c,n.L,!0))}catch(d){let f=`cannot decode field ${i.typeName}.${n.name} from JSON: ${ts(c)}`;throw d instanceof Error&&d.message.length>0&&(f+=`: ${d.message}`),new Error(f)}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: ${ts(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=Gde(n.K,c)}catch(f){let y=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${ts(t)}`;throw f instanceof Error&&f.message.length>0&&(y+=`: ${f.message}`),new Error(y)}switch(n.V.kind){case"message":o[d]=n.V.T.fromJson(l,r);break;case"enum":let f=xD(n.V.T,l,r.ignoreUnknownFields,!0);f!==dh&&(o[d]=f);break;case"scalar":try{o[d]=af(n.V.T,l,ha.BIGINT,!0)}catch(y){let I=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${ts(t)}`;throw y instanceof Error&&y.message.length>0&&(I+=`: ${y.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];Ia(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=xD(n.T,t,r.ignoreUnknownFields,!1);switch(l){case fh:MD(n,e);break;case dh:break;default:e[a]=l;break}break;case"scalar":try{let d=af(n.T,t,n.L,!1);switch(d){case fh:MD(n,e);break;default:e[a]=d;break}}catch(d){let f=`cannot decode field ${i.typeName}.${n.name} from JSON: ${ts(t)}`;throw d instanceof Error&&d.message.length>0&&(f+=`: ${d.message}`),new Error(f)}break}}function Gde(e,t){if(e===Ne.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1;break}return af(e,t,ha.BIGINT,!0).toString()}function af(e,t,n,r){if(t===null)return r?ya(e,n):fh;switch(e){case Ne.DOUBLE:case Ne.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==Ne.FLOAT&&th(i),i;case Ne.INT32:case Ne.FIXED32:case Ne.SFIXED32:case Ne.SINT32:case Ne.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==Ne.UINT32||e==Ne.FIXED32?rf(a):td(a),a;case Ne.INT64:case Ne.SFIXED64:case Ne.SINT64:if(typeof t!="number"&&typeof t!="string")break;let o=Gn.parse(t);return n?o.toString():o;case Ne.FIXED64:case Ne.UINT64:if(typeof t!="number"&&typeof t!="string")break;let c=Gn.uParse(t);return n?c.toString():c;case Ne.BOOL:if(typeof t!="boolean")break;return t;case Ne.STRING:if(typeof t!="string")break;try{encodeURIComponent(t)}catch(l){throw new Error("invalid UTF8")}return t;case Ne.BYTES:if(t==="")return new Uint8Array(0);if(typeof t!="string")break;return UD.dec(t)}throw new Error}function xD(e,t,n,r){if(t===null)return e.typeName=="google.protobuf.NullValue"?0:r?e.values[0].no:fh;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 dh;break}throw new Error(`cannot decode enum ${e.typeName} from JSON: ${ts(t)}`)}function $de(e){return e.repeated||e.kind=="map"?!0:!(e.oneof||e.kind=="message"||e.opt||e.req)}function _1(e,t,n){if(e.kind=="map"){ln(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()]=ph(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()]=qD(a,c,n.enumAsInteger);break}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){ln(Array.isArray(t));let r=[];switch(e.kind){case"scalar":for(let i=0;i0?r:void 0}switch(e.kind){case"scalar":return ph(e.T,t);case"enum":return qD(e.T,t,n.enumAsInteger);case"message":return lh(e.T,t).toJson(n)}}function qD(e,t,n){var r;if(ln(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 ph(e,t){switch(e){case Ne.INT32:case Ne.SFIXED32:case Ne.SINT32:case Ne.FIXED32:case Ne.UINT32:return ln(typeof t=="number"),t;case Ne.FLOAT:case Ne.DOUBLE:return ln(typeof t=="number"),Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":t;case Ne.STRING:return ln(typeof t=="string"),t;case Ne.BOOL:return ln(typeof t=="boolean"),t;case Ne.UINT64:case Ne.FIXED64:case Ne.INT64:case Ne.SFIXED64:case Ne.SINT64:return ln(typeof t=="bigint"||typeof t=="string"||typeof t=="number"),t.toString();case Ne.BYTES:return ln(t instanceof Uint8Array),UD.enc(t)}}m();T();N();var nd=Symbol("@bufbuild/protobuf/unknown-fields"),S1={readUnknownFields:!0,readerFactory:e=>new sh(e)},O1={writeUnknownFields:!0,writerFactory:()=>new ah};function Qde(e){return e?Object.assign(Object.assign({},S1),e):S1}function Yde(e){return e?Object.assign(Object.assign({},O1),e):O1}function R1(){return{makeReadOptions:Qde,makeWriteOptions:Yde,listUnknownFields(e){var t;return(t=e[nd])!==null&&t!==void 0?t:[]},discardUnknownFields(e){delete e[nd]},writeUnknownFields(e,t){let r=e[nd];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[nd])||(i[nd]=[]),i[nd].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=Hde),a){let I=e[o];if(r==Un.LengthDelimited&&c!=Ne.STRING&&c!=Ne.BYTES){let F=t.uint32()+t.pos;for(;t.posIa(I,y)?I:new y(I));else{let I=o[i];y.fieldWrapper?y.typeName==="google.protobuf.BytesValue"?a[i]=of(I):a[i]=I:a[i]=Ia(I,y)?I:new y(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)=>Rs(r.T,o,a[c]));case"enum":return i.every((o,c)=>Rs(Ne.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 Rs(Ne.INT32,i,a);case"scalar":return Rs(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 Rs(Ne.INT32,i.value,a.value);case"scalar":return Rs(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(f=>l.equals(i[f],a[f]));case"enum":return c.every(f=>Rs(Ne.INT32,i[f],a[f]));case"scalar":let d=r.V.T;return c.every(f=>Rs(d,i[f],a[f]))}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(Th);else if(i.kind=="map"){o=r[i.localName];for(let[c,l]of Object.entries(a))o[c]=Th(l)}else i.kind=="oneof"?o=i.findField(a.case)?{case:a.case,value:Th(a.value)}:{case:void 0}:o=Th(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 Th(e){if(e===void 0)return e;if(Ia(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function of(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function w1(e,t,n){return{syntax:e,json:v1(),bin:R1(),util:Object.assign(Object.assign({},F1()),{newFieldList:t,initFields:n}),makeMessageType(r,i,a){return u1(this,r,i,a)},makeEnum:s1,makeEnumType:FD,getEnumType:a1,makeExtension(r,i,a){return m1(this,r,i,a)}}}m();T();N();var Eh=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 VD(e,t){let n=B1(e);return t?n:tpe(epe(n))}function L1(e){return VD(e,!1)}var C1=B1;function B1(e){let t=!1,n=[];for(let r=0;r`${e}$`,epe=e=>Zde.has(e)?U1(e):e,tpe=e=>Xde.has(e)?U1(e):e;var hh=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=L1(t)}addField(t){ln(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 Eh(e,t=>k1(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]=ya(t.T,t.L);break;case"message":break}}});var rd;(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"})(rd||(rd={}));B.util.setEnumType(rd,"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 Fs;(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"})(Fs||(Fs={}));B.util.setEnumType(Fs,"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 ws;(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"})(ws||(ws={}));B.util.setEnumType(ws,"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 Y1=fs(Ae(),1);m();T();N();var jD;(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"})(jD||(jD={}));B.util.setEnumType(jD,"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 Fc;(function(e){e[e.OBJECT_FIELD=0]="OBJECT_FIELD",e[e.FIELD_ARGUMENT=1]="FIELD_ARGUMENT"})(Fc||(Fc={}));B.util.setEnumType(Fc,"wg.cosmo.node.v1.ArgumentSource",[{no:0,name:"OBJECT_FIELD"},{no:1,name:"FIELD_ARGUMENT"}]);var vu;(function(e){e[e.STATIC=0]="STATIC",e[e.GRAPHQL=1]="GRAPHQL",e[e.PUBSUB=2]="PUBSUB"})(vu||(vu={}));B.util.setEnumType(vu,"wg.cosmo.node.v1.DataSourceKind",[{no:0,name:"STATIC"},{no:1,name:"GRAPHQL"},{no:2,name:"PUBSUB"}]);var uf;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.QUERY=1]="QUERY",e[e.MUTATION=2]="MUTATION",e[e.SUBSCRIPTION=3]="SUBSCRIPTION"})(uf||(uf={}));B.util.setEnumType(uf,"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 qo;(function(e){e[e.PUBLISH=0]="PUBLISH",e[e.REQUEST=1]="REQUEST",e[e.SUBSCRIBE=2]="SUBSCRIBE"})(qo||(qo={}));B.util.setEnumType(qo,"wg.cosmo.node.v1.EventType",[{no:0,name:"PUBLISH"},{no:1,name:"REQUEST"},{no:2,name:"SUBSCRIBE"}]);var Su;(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"})(Su||(Su={}));B.util.setEnumType(Su,"wg.cosmo.node.v1.ConfigurationVariableKind",[{no:0,name:"STATIC_CONFIGURATION_VARIABLE"},{no:1,name:"ENV_CONFIGURATION_VARIABLE"},{no:2,name:"PLACEHOLDER_CONFIGURATION_VARIABLE"}]);var wc;(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"})(wc||(wc={}));B.util.setEnumType(wc,"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 Ls=class Ls extends Le{constructor(n){super();_(this,"id","");_(this,"name","");_(this,"routingUrl","");B.util.initPartial(n,this)}static fromBinary(n,r){return new Ls().fromBinary(n,r)}static fromJson(n,r){return new Ls().fromJson(n,r)}static fromJsonString(n,r){return new Ls().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Ls,n,r)}};_(Ls,"runtime",B),_(Ls,"typeName","wg.cosmo.node.v1.Subgraph"),_(Ls,"fields",B.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 yh=Ls,Cs=class Cs extends Le{constructor(n){super();_(this,"configByFeatureFlagName",{});B.util.initPartial(n,this)}static fromBinary(n,r){return new Cs().fromBinary(n,r)}static fromJson(n,r){return new Cs().fromJson(n,r)}static fromJsonString(n,r){return new Cs().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Cs,n,r)}};_(Cs,"runtime",B),_(Cs,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs"),_(Cs,"fields",B.util.newFieldList(()=>[{no:1,name:"config_by_feature_flag_name",kind:"map",K:9,V:{kind:"message",T:GD}}]));var KD=Cs,Bs=class Bs extends Le{constructor(n){super();_(this,"engineConfig");_(this,"version","");_(this,"subgraphs",[]);B.util.initPartial(n,this)}static fromBinary(n,r){return new Bs().fromBinary(n,r)}static fromJson(n,r){return new Bs().fromJson(n,r)}static fromJsonString(n,r){return new Bs().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Bs,n,r)}};_(Bs,"runtime",B),_(Bs,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig"),_(Bs,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:id},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:yh,repeated:!0}]));var GD=Bs,Us=class Us extends Le{constructor(n){super();_(this,"engineConfig");_(this,"version","");_(this,"subgraphs",[]);_(this,"featureFlagConfigs");_(this,"compatibilityVersion","");B.util.initPartial(n,this)}static fromBinary(n,r){return new Us().fromBinary(n,r)}static fromJson(n,r){return new Us().fromJson(n,r)}static fromJsonString(n,r){return new Us().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Us,n,r)}};_(Us,"runtime",B),_(Us,"typeName","wg.cosmo.node.v1.RouterConfig"),_(Us,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:id},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:yh,repeated:!0},{no:4,name:"feature_flag_configs",kind:"message",T:KD,opt:!0},{no:5,name:"compatibility_version",kind:"scalar",T:9}]));var cf=Us,ks=class ks extends Le{constructor(n){super();_(this,"code",rd.OK);_(this,"details");B.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 B.util.equals(ks,n,r)}};_(ks,"runtime",B),_(ks,"typeName","wg.cosmo.node.v1.Response"),_(ks,"fields",B.util.newFieldList(()=>[{no:1,name:"code",kind:"enum",T:B.getEnumType(rd)},{no:2,name:"details",kind:"scalar",T:9,opt:!0}]));var $D=ks,Ms=class Ms extends Le{constructor(n){super();_(this,"code",0);_(this,"message","");B.util.initPartial(n,this)}static fromBinary(n,r){return new Ms().fromBinary(n,r)}static fromJson(n,r){return new Ms().fromJson(n,r)}static fromJsonString(n,r){return new Ms().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Ms,n,r)}};_(Ms,"runtime",B),_(Ms,"typeName","wg.cosmo.node.v1.ResponseStatus"),_(Ms,"fields",B.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9}]));var M1=Ms,xs=class xs extends Le{constructor(n){super();_(this,"accountLimits");_(this,"graphPublicKey","");B.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 B.util.equals(xs,n,r)}};_(xs,"runtime",B),_(xs,"typeName","wg.cosmo.node.v1.RegistrationInfo"),_(xs,"fields",B.util.newFieldList(()=>[{no:1,name:"account_limits",kind:"message",T:YD},{no:2,name:"graph_public_key",kind:"scalar",T:9}]));var QD=xs,qs=class qs extends Le{constructor(n){super();_(this,"traceSamplingRate",0);B.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 B.util.equals(qs,n,r)}};_(qs,"runtime",B),_(qs,"typeName","wg.cosmo.node.v1.AccountLimits"),_(qs,"fields",B.util.newFieldList(()=>[{no:1,name:"trace_sampling_rate",kind:"scalar",T:2}]));var YD=qs,Vs=class Vs extends Le{constructor(t){super(),B.util.initPartial(t,this)}static fromBinary(t,n){return new Vs().fromBinary(t,n)}static fromJson(t,n){return new Vs().fromJson(t,n)}static fromJsonString(t,n){return new Vs().fromJsonString(t,n)}static equals(t,n){return B.util.equals(Vs,t,n)}};_(Vs,"runtime",B),_(Vs,"typeName","wg.cosmo.node.v1.SelfRegisterRequest"),_(Vs,"fields",B.util.newFieldList(()=>[]));var x1=Vs,js=class js extends Le{constructor(n){super();_(this,"response");_(this,"registrationInfo");B.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 B.util.equals(js,n,r)}};_(js,"runtime",B),_(js,"typeName","wg.cosmo.node.v1.SelfRegisterResponse"),_(js,"fields",B.util.newFieldList(()=>[{no:1,name:"response",kind:"message",T:$D},{no:2,name:"registrationInfo",kind:"message",T:QD,opt:!0}]));var q1=js,Ks=class Ks extends Le{constructor(n){super();_(this,"defaultFlushInterval",Gn.zero);_(this,"datasourceConfigurations",[]);_(this,"fieldConfigurations",[]);_(this,"graphqlSchema","");_(this,"typeConfigurations",[]);_(this,"stringStorage",{});_(this,"graphqlClientSchema");B.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 B.util.equals(Ks,n,r)}};_(Ks,"runtime",B),_(Ks,"typeName","wg.cosmo.node.v1.EngineConfiguration"),_(Ks,"fields",B.util.newFieldList(()=>[{no:1,name:"defaultFlushInterval",kind:"scalar",T:3},{no:2,name:"datasource_configurations",kind:"message",T:lf,repeated:!0},{no:3,name:"field_configurations",kind:"message",T:ff,repeated:!0},{no:4,name:"graphqlSchema",kind:"scalar",T:9},{no:5,name:"type_configurations",kind:"message",T:JD,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 id=Ks,Gs=class Gs extends Le{constructor(n){super();_(this,"kind",vu.STATIC);_(this,"rootNodes",[]);_(this,"childNodes",[]);_(this,"overrideFieldPathFromAlias",!1);_(this,"customGraphql");_(this,"customStatic");_(this,"directives",[]);_(this,"requestTimeoutSeconds",Gn.zero);_(this,"id","");_(this,"keys",[]);_(this,"provides",[]);_(this,"requires",[]);_(this,"customEvents");_(this,"entityInterfaces",[]);_(this,"interfaceObjects",[]);B.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 B.util.equals(Gs,n,r)}};_(Gs,"runtime",B),_(Gs,"typeName","wg.cosmo.node.v1.DataSourceConfiguration"),_(Gs,"fields",B.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:B.getEnumType(vu)},{no:2,name:"root_nodes",kind:"message",T:ad,repeated:!0},{no:3,name:"child_nodes",kind:"message",T:ad,repeated:!0},{no:4,name:"override_field_path_from_alias",kind:"scalar",T:8},{no:5,name:"custom_graphql",kind:"message",T:Tf},{no:6,name:"custom_static",kind:"message",T:ab},{no:7,name:"directives",kind:"message",T:sb,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:Pc,repeated:!0},{no:11,name:"provides",kind:"message",T:Pc,repeated:!0},{no:12,name:"requires",kind:"message",T:Pc,repeated:!0},{no:13,name:"custom_events",kind:"message",T:Cc},{no:14,name:"entity_interfaces",kind:"message",T:sd,repeated:!0},{no:15,name:"interface_objects",kind:"message",T:sd,repeated:!0}]));var lf=Gs,$s=class $s extends Le{constructor(n){super();_(this,"name","");_(this,"sourceType",Fc.OBJECT_FIELD);B.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 B.util.equals($s,n,r)}};_($s,"runtime",B),_($s,"typeName","wg.cosmo.node.v1.ArgumentConfiguration"),_($s,"fields",B.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"source_type",kind:"enum",T:B.getEnumType(Fc)}]));var df=$s,Qs=class Qs extends Le{constructor(n){super();_(this,"requiredAndScopes",[]);B.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 B.util.equals(Qs,n,r)}};_(Qs,"runtime",B),_(Qs,"typeName","wg.cosmo.node.v1.Scopes"),_(Qs,"fields",B.util.newFieldList(()=>[{no:1,name:"required_and_scopes",kind:"scalar",T:9,repeated:!0}]));var Lc=Qs,Ys=class Ys extends Le{constructor(n){super();_(this,"requiresAuthentication",!1);_(this,"requiredOrScopes",[]);_(this,"requiredOrScopesByOr",[]);B.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 B.util.equals(Ys,n,r)}};_(Ys,"runtime",B),_(Ys,"typeName","wg.cosmo.node.v1.AuthorizationConfiguration"),_(Ys,"fields",B.util.newFieldList(()=>[{no:1,name:"requires_authentication",kind:"scalar",T:8},{no:2,name:"required_or_scopes",kind:"message",T:Lc,repeated:!0},{no:3,name:"required_or_scopes_by_or",kind:"message",T:Lc,repeated:!0}]));var pf=Ys,Js=class Js extends Le{constructor(n){super();_(this,"typeName","");_(this,"fieldName","");_(this,"argumentsConfiguration",[]);_(this,"authorizationConfiguration");_(this,"subscriptionFilterCondition");B.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 B.util.equals(Js,n,r)}};_(Js,"runtime",B),_(Js,"typeName","wg.cosmo.node.v1.FieldConfiguration"),_(Js,"fields",B.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:df,repeated:!0},{no:4,name:"authorization_configuration",kind:"message",T:pf},{no:5,name:"subscription_filter_condition",kind:"message",T:Ou,opt:!0}]));var ff=Js,Hs=class Hs extends Le{constructor(n){super();_(this,"typeName","");_(this,"renameTo","");B.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 B.util.equals(Hs,n,r)}};_(Hs,"runtime",B),_(Hs,"typeName","wg.cosmo.node.v1.TypeConfiguration"),_(Hs,"fields",B.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var JD=Hs,zs=class zs extends Le{constructor(n){super();_(this,"typeName","");_(this,"fieldNames",[]);_(this,"externalFieldNames",[]);_(this,"requireFetchReasonsFieldNames",[]);B.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 B.util.equals(zs,n,r)}};_(zs,"runtime",B),_(zs,"typeName","wg.cosmo.node.v1.TypeField"),_(zs,"fields",B.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 ad=zs,Ws=class Ws extends Le{constructor(n){super();_(this,"fieldName","");_(this,"typeName","");B.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 B.util.equals(Ws,n,r)}};_(Ws,"runtime",B),_(Ws,"typeName","wg.cosmo.node.v1.FieldCoordinates"),_(Ws,"fields",B.util.newFieldList(()=>[{no:1,name:"field_name",kind:"scalar",T:9},{no:2,name:"type_name",kind:"scalar",T:9}]));var mf=Ws,Xs=class Xs extends Le{constructor(n){super();_(this,"fieldCoordinatesPath",[]);_(this,"fieldPath",[]);B.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 B.util.equals(Xs,n,r)}};_(Xs,"runtime",B),_(Xs,"typeName","wg.cosmo.node.v1.FieldSetCondition"),_(Xs,"fields",B.util.newFieldList(()=>[{no:1,name:"field_coordinates_path",kind:"message",T:mf,repeated:!0},{no:2,name:"field_path",kind:"scalar",T:9,repeated:!0}]));var Nf=Xs,Zs=class Zs extends Le{constructor(n){super();_(this,"typeName","");_(this,"fieldName","");_(this,"selectionSet","");_(this,"disableEntityResolver",!1);_(this,"conditions",[]);B.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 B.util.equals(Zs,n,r)}};_(Zs,"runtime",B),_(Zs,"typeName","wg.cosmo.node.v1.RequiredField"),_(Zs,"fields",B.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:Nf,repeated:!0}]));var Pc=Zs,eo=class eo extends Le{constructor(n){super();_(this,"interfaceTypeName","");_(this,"concreteTypeNames",[]);B.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 B.util.equals(eo,n,r)}};_(eo,"runtime",B),_(eo,"typeName","wg.cosmo.node.v1.EntityInterfaceConfiguration"),_(eo,"fields",B.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 sd=eo,to=class to extends Le{constructor(n){super();_(this,"url");_(this,"method",wc.GET);_(this,"header",{});_(this,"body");_(this,"query",[]);_(this,"urlEncodeBody",!1);_(this,"mtls");_(this,"baseUrl");_(this,"path");_(this,"httpProxyUrl");B.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 B.util.equals(to,n,r)}};_(to,"runtime",B),_(to,"typeName","wg.cosmo.node.v1.FetchConfiguration"),_(to,"fields",B.util.newFieldList(()=>[{no:1,name:"url",kind:"message",T:qr},{no:2,name:"method",kind:"enum",T:B.getEnumType(wc)},{no:3,name:"header",kind:"map",K:9,V:{kind:"message",T:ub}},{no:4,name:"body",kind:"message",T:qr},{no:5,name:"query",kind:"message",T:ob,repeated:!0},{no:7,name:"url_encode_body",kind:"scalar",T:8},{no:8,name:"mtls",kind:"message",T:cb},{no:9,name:"base_url",kind:"message",T:qr},{no:10,name:"path",kind:"message",T:qr},{no:11,name:"http_proxy_url",kind:"message",T:qr,opt:!0}]));var HD=to,no=class no extends Le{constructor(n){super();_(this,"statusCode",Gn.zero);_(this,"typeName","");_(this,"injectStatusCodeIntoBody",!1);B.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 B.util.equals(no,n,r)}};_(no,"runtime",B),_(no,"typeName","wg.cosmo.node.v1.StatusCodeTypeMapping"),_(no,"fields",B.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 V1=no,ro=class ro extends Le{constructor(n){super();_(this,"fetch");_(this,"subscription");_(this,"federation");_(this,"upstreamSchema");_(this,"customScalarTypeFields",[]);_(this,"grpc");B.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 B.util.equals(ro,n,r)}};_(ro,"runtime",B),_(ro,"typeName","wg.cosmo.node.v1.DataSourceCustom_GraphQL"),_(ro,"fields",B.util.newFieldList(()=>[{no:1,name:"fetch",kind:"message",T:HD},{no:2,name:"subscription",kind:"message",T:lb},{no:3,name:"federation",kind:"message",T:db},{no:4,name:"upstream_schema",kind:"message",T:_f},{no:6,name:"custom_scalar_type_fields",kind:"message",T:pb,repeated:!0},{no:7,name:"grpc",kind:"message",T:od}]));var Tf=ro,io=class io extends Le{constructor(n){super();_(this,"mapping");_(this,"protoSchema","");_(this,"plugin");B.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 B.util.equals(io,n,r)}};_(io,"runtime",B),_(io,"typeName","wg.cosmo.node.v1.GRPCConfiguration"),_(io,"fields",B.util.newFieldList(()=>[{no:1,name:"mapping",kind:"message",T:WD},{no:2,name:"proto_schema",kind:"scalar",T:9},{no:3,name:"plugin",kind:"message",T:Ef}]));var od=io,ao=class ao extends Le{constructor(n){super();_(this,"repository","");_(this,"reference","");B.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 B.util.equals(ao,n,r)}};_(ao,"runtime",B),_(ao,"typeName","wg.cosmo.node.v1.ImageReference"),_(ao,"fields",B.util.newFieldList(()=>[{no:1,name:"repository",kind:"scalar",T:9},{no:2,name:"reference",kind:"scalar",T:9}]));var zD=ao,so=class so extends Le{constructor(n){super();_(this,"name","");_(this,"version","");_(this,"imageReference");B.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 B.util.equals(so,n,r)}};_(so,"runtime",B),_(so,"typeName","wg.cosmo.node.v1.PluginConfiguration"),_(so,"fields",B.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:zD,opt:!0}]));var Ef=so,oo=class oo extends Le{constructor(n){super();_(this,"enabled",!1);B.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 B.util.equals(oo,n,r)}};_(oo,"runtime",B),_(oo,"typeName","wg.cosmo.node.v1.SSLConfiguration"),_(oo,"fields",B.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8}]));var j1=oo,uo=class uo extends Le{constructor(n){super();_(this,"version",0);_(this,"service","");_(this,"operationMappings",[]);_(this,"entityMappings",[]);_(this,"typeFieldMappings",[]);_(this,"enumMappings",[]);B.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 B.util.equals(uo,n,r)}};_(uo,"runtime",B),_(uo,"typeName","wg.cosmo.node.v1.GRPCMapping"),_(uo,"fields",B.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:XD,repeated:!0},{no:4,name:"entity_mappings",kind:"message",T:ZD,repeated:!0},{no:5,name:"type_field_mappings",kind:"message",T:eb,repeated:!0},{no:6,name:"enum_mappings",kind:"message",T:rb,repeated:!0}]));var WD=uo,co=class co extends Le{constructor(n){super();_(this,"type",uf.UNSPECIFIED);_(this,"original","");_(this,"mapped","");_(this,"request","");_(this,"response","");B.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 B.util.equals(co,n,r)}};_(co,"runtime",B),_(co,"typeName","wg.cosmo.node.v1.OperationMapping"),_(co,"fields",B.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:B.getEnumType(uf)},{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 XD=co,lo=class lo extends Le{constructor(n){super();_(this,"typeName","");_(this,"kind","");_(this,"key","");_(this,"rpc","");_(this,"request","");_(this,"response","");B.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 B.util.equals(lo,n,r)}};_(lo,"runtime",B),_(lo,"typeName","wg.cosmo.node.v1.EntityMapping"),_(lo,"fields",B.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 ZD=lo,po=class po extends Le{constructor(n){super();_(this,"type","");_(this,"fieldMappings",[]);B.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 B.util.equals(po,n,r)}};_(po,"runtime",B),_(po,"typeName","wg.cosmo.node.v1.TypeFieldMapping"),_(po,"fields",B.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"field_mappings",kind:"message",T:tb,repeated:!0}]));var eb=po,fo=class fo extends Le{constructor(n){super();_(this,"original","");_(this,"mapped","");_(this,"argumentMappings",[]);B.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 B.util.equals(fo,n,r)}};_(fo,"runtime",B),_(fo,"typeName","wg.cosmo.node.v1.FieldMapping"),_(fo,"fields",B.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:nb,repeated:!0}]));var tb=fo,mo=class mo extends Le{constructor(n){super();_(this,"original","");_(this,"mapped","");B.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 B.util.equals(mo,n,r)}};_(mo,"runtime",B),_(mo,"typeName","wg.cosmo.node.v1.ArgumentMapping"),_(mo,"fields",B.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var nb=mo,No=class No extends Le{constructor(n){super();_(this,"type","");_(this,"values",[]);B.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 B.util.equals(No,n,r)}};_(No,"runtime",B),_(No,"typeName","wg.cosmo.node.v1.EnumMapping"),_(No,"fields",B.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"values",kind:"message",T:ib,repeated:!0}]));var rb=No,To=class To extends Le{constructor(n){super();_(this,"original","");_(this,"mapped","");B.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 B.util.equals(To,n,r)}};_(To,"runtime",B),_(To,"typeName","wg.cosmo.node.v1.EnumValueMapping"),_(To,"fields",B.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var ib=To,Eo=class Eo extends Le{constructor(n){super();_(this,"consumerName","");_(this,"streamName","");_(this,"consumerInactiveThreshold",0);B.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 B.util.equals(Eo,n,r)}};_(Eo,"runtime",B),_(Eo,"typeName","wg.cosmo.node.v1.NatsStreamConfiguration"),_(Eo,"fields",B.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 hf=Eo,ho=class ho extends Le{constructor(n){super();_(this,"engineEventConfiguration");_(this,"subjects",[]);_(this,"streamConfiguration");B.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 B.util.equals(ho,n,r)}};_(ho,"runtime",B),_(ho,"typeName","wg.cosmo.node.v1.NatsEventConfiguration"),_(ho,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:Vo},{no:2,name:"subjects",kind:"scalar",T:9,repeated:!0},{no:3,name:"stream_configuration",kind:"message",T:hf}]));var yf=ho,yo=class yo extends Le{constructor(n){super();_(this,"engineEventConfiguration");_(this,"topics",[]);B.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 B.util.equals(yo,n,r)}};_(yo,"runtime",B),_(yo,"typeName","wg.cosmo.node.v1.KafkaEventConfiguration"),_(yo,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:Vo},{no:2,name:"topics",kind:"scalar",T:9,repeated:!0}]));var If=yo,Io=class Io extends Le{constructor(n){super();_(this,"engineEventConfiguration");_(this,"channels",[]);B.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 B.util.equals(Io,n,r)}};_(Io,"runtime",B),_(Io,"typeName","wg.cosmo.node.v1.RedisEventConfiguration"),_(Io,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:Vo},{no:2,name:"channels",kind:"scalar",T:9,repeated:!0}]));var gf=Io,go=class go extends Le{constructor(n){super();_(this,"providerId","");_(this,"type",qo.PUBLISH);_(this,"typeName","");_(this,"fieldName","");B.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 B.util.equals(go,n,r)}};_(go,"runtime",B),_(go,"typeName","wg.cosmo.node.v1.EngineEventConfiguration"),_(go,"fields",B.util.newFieldList(()=>[{no:1,name:"provider_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:B.getEnumType(qo)},{no:3,name:"type_name",kind:"scalar",T:9},{no:4,name:"field_name",kind:"scalar",T:9}]));var Vo=go,_o=class _o extends Le{constructor(n){super();_(this,"nats",[]);_(this,"kafka",[]);_(this,"redis",[]);B.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 B.util.equals(_o,n,r)}};_(_o,"runtime",B),_(_o,"typeName","wg.cosmo.node.v1.DataSourceCustomEvents"),_(_o,"fields",B.util.newFieldList(()=>[{no:1,name:"nats",kind:"message",T:yf,repeated:!0},{no:2,name:"kafka",kind:"message",T:If,repeated:!0},{no:3,name:"redis",kind:"message",T:gf,repeated:!0}]));var Cc=_o,vo=class vo extends Le{constructor(n){super();_(this,"data");B.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 B.util.equals(vo,n,r)}};_(vo,"runtime",B),_(vo,"typeName","wg.cosmo.node.v1.DataSourceCustom_Static"),_(vo,"fields",B.util.newFieldList(()=>[{no:1,name:"data",kind:"message",T:qr}]));var ab=vo,So=class So extends Le{constructor(n){super();_(this,"kind",Su.STATIC_CONFIGURATION_VARIABLE);_(this,"staticVariableContent","");_(this,"environmentVariableName","");_(this,"environmentVariableDefaultValue","");_(this,"placeholderVariableName","");B.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 B.util.equals(So,n,r)}};_(So,"runtime",B),_(So,"typeName","wg.cosmo.node.v1.ConfigurationVariable"),_(So,"fields",B.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:B.getEnumType(Su)},{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 qr=So,Oo=class Oo extends Le{constructor(n){super();_(this,"directiveName","");_(this,"renameTo","");B.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 B.util.equals(Oo,n,r)}};_(Oo,"runtime",B),_(Oo,"typeName","wg.cosmo.node.v1.DirectiveConfiguration"),_(Oo,"fields",B.util.newFieldList(()=>[{no:1,name:"directive_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var sb=Oo,Do=class Do extends Le{constructor(n){super();_(this,"name","");_(this,"value","");B.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 B.util.equals(Do,n,r)}};_(Do,"runtime",B),_(Do,"typeName","wg.cosmo.node.v1.URLQueryConfiguration"),_(Do,"fields",B.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]));var ob=Do,bo=class bo extends Le{constructor(n){super();_(this,"values",[]);B.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 B.util.equals(bo,n,r)}};_(bo,"runtime",B),_(bo,"typeName","wg.cosmo.node.v1.HTTPHeader"),_(bo,"fields",B.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:qr,repeated:!0}]));var ub=bo,Ao=class Ao extends Le{constructor(n){super();_(this,"key");_(this,"cert");_(this,"insecureSkipVerify",!1);B.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 B.util.equals(Ao,n,r)}};_(Ao,"runtime",B),_(Ao,"typeName","wg.cosmo.node.v1.MTLSConfiguration"),_(Ao,"fields",B.util.newFieldList(()=>[{no:1,name:"key",kind:"message",T:qr},{no:2,name:"cert",kind:"message",T:qr},{no:3,name:"insecureSkipVerify",kind:"scalar",T:8}]));var cb=Ao,Ro=class Ro extends Le{constructor(n){super();_(this,"enabled",!1);_(this,"url");_(this,"useSSE");_(this,"protocol");_(this,"websocketSubprotocol");B.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 B.util.equals(Ro,n,r)}};_(Ro,"runtime",B),_(Ro,"typeName","wg.cosmo.node.v1.GraphQLSubscriptionConfiguration"),_(Ro,"fields",B.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"url",kind:"message",T:qr},{no:3,name:"useSSE",kind:"scalar",T:8,opt:!0},{no:4,name:"protocol",kind:"enum",T:B.getEnumType(Fs),opt:!0},{no:5,name:"websocketSubprotocol",kind:"enum",T:B.getEnumType(ws),opt:!0}]));var lb=Ro,Po=class Po extends Le{constructor(n){super();_(this,"enabled",!1);_(this,"serviceSdl","");B.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 B.util.equals(Po,n,r)}};_(Po,"runtime",B),_(Po,"typeName","wg.cosmo.node.v1.GraphQLFederationConfiguration"),_(Po,"fields",B.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"serviceSdl",kind:"scalar",T:9}]));var db=Po,Fo=class Fo extends Le{constructor(n){super();_(this,"key","");B.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 B.util.equals(Fo,n,r)}};_(Fo,"runtime",B),_(Fo,"typeName","wg.cosmo.node.v1.InternedString"),_(Fo,"fields",B.util.newFieldList(()=>[{no:1,name:"key",kind:"scalar",T:9}]));var _f=Fo,wo=class wo extends Le{constructor(n){super();_(this,"typeName","");_(this,"fieldName","");B.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 B.util.equals(wo,n,r)}};_(wo,"runtime",B),_(wo,"typeName","wg.cosmo.node.v1.SingleTypeField"),_(wo,"fields",B.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9}]));var pb=wo,Lo=class Lo extends Le{constructor(n){super();_(this,"fieldPath",[]);_(this,"json","");B.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 B.util.equals(Lo,n,r)}};_(Lo,"runtime",B),_(Lo,"typeName","wg.cosmo.node.v1.SubscriptionFieldCondition"),_(Lo,"fields",B.util.newFieldList(()=>[{no:1,name:"field_path",kind:"scalar",T:9,repeated:!0},{no:2,name:"json",kind:"scalar",T:9}]));var vf=Lo,Hi=class Hi extends Le{constructor(n){super();_(this,"and",[]);_(this,"in");_(this,"not");_(this,"or",[]);B.util.initPartial(n,this)}static fromBinary(n,r){return new Hi().fromBinary(n,r)}static fromJson(n,r){return new Hi().fromJson(n,r)}static fromJsonString(n,r){return new Hi().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Hi,n,r)}};_(Hi,"runtime",B),_(Hi,"typeName","wg.cosmo.node.v1.SubscriptionFilterCondition"),_(Hi,"fields",B.util.newFieldList(()=>[{no:1,name:"and",kind:"message",T:Hi,repeated:!0},{no:2,name:"in",kind:"message",T:vf,opt:!0},{no:3,name:"not",kind:"message",T:Hi,opt:!0},{no:4,name:"or",kind:"message",T:Hi,repeated:!0}]));var Ou=Hi,Co=class Co extends Le{constructor(n){super();_(this,"operations",[]);B.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 B.util.equals(Co,n,r)}};_(Co,"runtime",B),_(Co,"typeName","wg.cosmo.node.v1.CacheWarmerOperations"),_(Co,"fields",B.util.newFieldList(()=>[{no:1,name:"operations",kind:"message",T:fb,repeated:!0}]));var K1=Co,Bo=class Bo extends Le{constructor(n){super();_(this,"request");_(this,"client");B.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 B.util.equals(Bo,n,r)}};_(Bo,"runtime",B),_(Bo,"typeName","wg.cosmo.node.v1.Operation"),_(Bo,"fields",B.util.newFieldList(()=>[{no:1,name:"request",kind:"message",T:mb},{no:2,name:"client",kind:"message",T:Eb}]));var fb=Bo,Uo=class Uo extends Le{constructor(n){super();_(this,"operationName","");_(this,"query","");_(this,"extensions");B.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 B.util.equals(Uo,n,r)}};_(Uo,"runtime",B),_(Uo,"typeName","wg.cosmo.node.v1.OperationRequest"),_(Uo,"fields",B.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:Nb}]));var mb=Uo,ko=class ko extends Le{constructor(n){super();_(this,"persistedQuery");B.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 B.util.equals(ko,n,r)}};_(ko,"runtime",B),_(ko,"typeName","wg.cosmo.node.v1.Extension"),_(ko,"fields",B.util.newFieldList(()=>[{no:1,name:"persisted_query",kind:"message",T:Tb}]));var Nb=ko,Mo=class Mo extends Le{constructor(n){super();_(this,"sha256Hash","");_(this,"version",0);B.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 B.util.equals(Mo,n,r)}};_(Mo,"runtime",B),_(Mo,"typeName","wg.cosmo.node.v1.PersistedQuery"),_(Mo,"fields",B.util.newFieldList(()=>[{no:1,name:"sha256_hash",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:5}]));var Tb=Mo,xo=class xo extends Le{constructor(n){super();_(this,"name","");_(this,"version","");B.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 B.util.equals(xo,n,r)}};_(xo,"runtime",B),_(xo,"typeName","wg.cosmo.node.v1.ClientInfo"),_(xo,"fields",B.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9}]));var Eb=xo;m();T();N();function hb(e){return new Error(`Normalization failed to return a ${e}.`)}function G1(e){return new Error(`Invalid router compatibility version "${e}".`)}m();T();N();var ud=fs(JE(),1);function npe(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 mf({fieldName:a[1],typeName:a[0]}))}t.push(new Nf({fieldCoordinatesPath:r,fieldPath:n.fieldPath}))}return t}function yb(e,t,n){if(e)for(let r of e){let i=npe(r);t.push(new Pc(x(x({typeName:n,fieldName:r.fieldName,selectionSet:r.selectionSet},r.disableEntityResolver?{disableEntityResolver:!0}:{}),i?{conditions:i}:{})))}}function Ib(e){switch(e){case"publish":return qo.PUBLISH;case"request":return qo.REQUEST;case"subscribe":return qo.SUBSCRIBE}}function $1(e){var n;let t={rootNodes:[],childNodes:[],keys:[],provides:[],events:new Cc({nats:[],kafka:[],redis:[]}),requires:[],entityInterfaces:[],interfaceObjects:[]};for(let r of e.values()){let i=r.typeName,a=[...r.fieldNames],o=new ad({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 f=new sd({interfaceTypeName:i,concreteTypeNames:[...r.entityInterfaceConcreteTypeNames]});r.isInterfaceObject?t.interfaceObjects.push(f):t.entityInterfaces.push(f)}yb(r.keys,t.keys,i),yb(r.provides,t.provides,i),yb(r.requires,t.requires,i);let c=[],l=[],d=[];for(let f of(n=r.events)!=null?n:[])switch(f.providerType){case ud.PROVIDER_TYPE_KAFKA:{l.push(new If({engineEventConfiguration:new Vo({fieldName:f.fieldName,providerId:f.providerId,type:Ib(f.type),typeName:i}),topics:f.topics}));break}case ud.PROVIDER_TYPE_NATS:{c.push(new yf(x({engineEventConfiguration:new Vo({fieldName:f.fieldName,providerId:f.providerId,type:Ib(f.type),typeName:i}),subjects:f.subjects},f.streamConfiguration?{streamConfiguration:new hf({consumerInactiveThreshold:f.streamConfiguration.consumerInactiveThreshold,consumerName:f.streamConfiguration.consumerName,streamName:f.streamConfiguration.streamName})}:{})));break}case ud.PROVIDER_TYPE_REDIS:{d.push(new gf({engineEventConfiguration:new Vo({fieldName:f.fieldName,providerId:f.providerId,type:Ib(f.type),typeName:i}),channels:f.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 Q1(e){var n,r;let t=[];for(let i of e){let a=i.argumentNames.map(f=>new df({name:f,sourceType:Fc.FIELD_ARGUMENT})),o=new ff({argumentsConfiguration:a,fieldName:i.fieldName,typeName:i.typeName}),c=((n=i.requiredScopes)==null?void 0:n.map(f=>new Lc({requiredAndScopes:f})))||[],l=((r=i.requiredScopesByOR)==null?void 0:r.map(f=>new Lc({requiredAndScopes:f})))||[],d=c.length>0;if((i.requiresAuthentication||d)&&(o.authorizationConfiguration=new pf({requiresAuthentication:i.requiresAuthentication||d,requiredOrScopes:c,requiredOrScopesByOr:l})),i.subscriptionFilterCondition){let f=new Ou;Ih(f,i.subscriptionFilterCondition),o.subscriptionFilterCondition=f}t.push(o)}return t}function Ih(e,t){if(t.and!==void 0){let n=[];for(let r of t.and){let i=new Ou;Ih(i,r),n.push(i)}e.and=n;return}if(t.in!==void 0){e.in=new vf({fieldPath:t.in.fieldPath,json:JSON.stringify(t.in.values)});return}if(t.not!==void 0){e.not=new Ou,Ih(e.not,t.not);return}if(t.or!==void 0){let n=[];for(let r of t.or){let i=new Ou;Ih(i,r),n.push(i)}e.or=n;return}throw new Error("Fatal: Incoming SubscriptionCondition object was malformed.")}var Bc;(function(e){e[e.Plugin=0]="Plugin",e[e.Standard=1]="Standard",e[e.GRPC=2]="GRPC"})(Bc||(Bc={}));var rpe=(e,t)=>{let n=stringHash(t);return e.stringStorage[n]=t,new _f({key:n})},ipe=e=>{switch(e){case"ws":return Fs.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS;case"sse":return Fs.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE;case"sse_post":return Fs.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST}},ape=e=>{switch(e){case"auto":return ws.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO;case"graphql-ws":return ws.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS;case"graphql-transport-ws":return ws.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS}},J1=function(e){if(!cd.ROUTER_COMPATIBILITY_VERSIONS.has(e.routerCompatibilityVersion))throw G1(e.routerCompatibilityVersion);let t=new id({defaultFlushInterval:BigInt(500),datasourceConfigurations:[],fieldConfigurations:[],graphqlSchema:"",stringStorage:{},typeConfigurations:[]});for(let n of e.subgraphs){if(!n.configurationDataByTypeName)throw hb("ConfigurationDataByTypeName");if(!n.schema)throw hb("GraphQLSchema");let r={enabled:!0},i=rpe(t,t1((0,Y1.lexicographicSortSchema)(n.schema))),{childNodes:a,entityInterfaces:o,events:c,interfaceObjects:l,keys:d,provides:f,requires:y,rootNodes:I}=$1(n.configurationDataByTypeName),v;switch(n.kind){case Bc.Standard:{r.enabled=!0,r.protocol=ipe(n.subscriptionProtocol||"ws"),r.websocketSubprotocol=ape(n.websocketSubprotocol||"auto"),r.url=new qr({kind:Su.STATIC_CONFIGURATION_VARIABLE,staticVariableContent:n.subscriptionUrl||n.url});break}case Bc.Plugin:{v=new od({mapping:n.mapping,protoSchema:n.protoSchema,plugin:new Ef({name:n.name,version:n.version,imageReference:n.imageReference})});break}case Bc.GRPC:{v=new od({mapping:n.mapping,protoSchema:n.protoSchema});break}}let F,k,K;if(c.kafka.length>0||c.nats.length>0||c.redis.length>0){F=vu.PUBSUB,K=new Cc({kafka:c.kafka,nats:c.nats,redis:c.redis});let se=de=>cd.ROOT_TYPE_NAMES.has(de.typeName),ie=0,Te=0;for(;ie({id:n.id,name:n.name,routingUrl:n.url})),compatibilityVersion:`${e.routerCompatibilityVersion}:${cd.COMPOSITION_VERSION}`})};m();T();N();var kc=fs(Ae());function H1(e){let t;try{t=(0,kc.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 spe(e){let t=(0,Uc.federateSubgraphs)({subgraphs:e.map(H1),version:Uc.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,kc.print)(t.federatedGraphAST)}}function ope(e){let t=(0,Uc.federateSubgraphs)({subgraphs:e.map(H1),version:Uc.LATEST_ROUTER_COMPATIBILITY_VERSION});if(!t.success)throw new Error(`could not federate schema: ${t.errors.map(r=>r.message).join(", ")}`);return J1({federatedClientSDL:(0,kc.printSchema)(t.federatedGraphClientSchema),federatedSDL:(0,kc.printSchema)(t.federatedGraphSchema),fieldConfigurations:t.fieldConfigurations,routerCompatibilityVersion:Uc.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:Bc.Standard,id:`${i}`,name:r.name,url:bD(r.url),sdl:r.schema,subscriptionUrl:bD((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 fm(upe);})(); /*! Bundled license information: @jspm/core/nodelibs/browser/buffer.js: diff --git a/composition/src/resolvability-graph/constants/string-constants.ts b/composition/src/resolvability-graph/constants/string-constants.ts index 6a52c05a29..5de2a19400 100644 --- a/composition/src/resolvability-graph/constants/string-constants.ts +++ b/composition/src/resolvability-graph/constants/string-constants.ts @@ -3,6 +3,8 @@ export const QUERY = 'Query'; export const SUBSCRIPTION = 'Subscription'; export const LITERAL_PERIOD = '.'; +export const LITERAL_SPACE = ' '; export const NOT_APPLICABLE = 'N/A'; +export const QUOTATION_JOIN = '", "'; export const ROOT_TYPE_NAMES = new Set([MUTATION, QUERY, SUBSCRIPTION]); diff --git a/composition/src/resolvability-graph/graph.ts b/composition/src/resolvability-graph/graph.ts index 6c740a7723..69177e4713 100644 --- a/composition/src/resolvability-graph/graph.ts +++ b/composition/src/resolvability-graph/graph.ts @@ -1,36 +1,31 @@ import { Edge, EntityDataNode, GraphNode, GraphNodeOptions, RootNode } from './graph-nodes'; import { - EntityResolvabilityFailure, - generateResolvabilityErrors, + generateEntityResolvabilityErrors, generateRootResolvabilityErrors, + generateSharedEntityResolvabilityErrors, getMultipliedRelativeOriginPaths, newRootFieldData, } from './utils/utils'; import { GraphFieldData, RootTypeName } from '../utils/types'; import { getFirstEntry, getOrThrowError, getValueOrDefault } from '../utils/utils'; -import { FieldPath, NodeName, SelectionPath, SubgraphName, TypeName, ValidationResult } from './types/types'; -import { VisitEntityParams } from './types/params'; +import { NodeName, SelectionPath, SubgraphName, TypeName, ValidationResult } from './types/types'; +import { ConsolidateUnresolvablePathsParams, ValidateEntitiesParams, VisitEntityParams } from './types/params'; import { NodeResolutionData } from './node-resolution-data/node-resolution-data'; import { LITERAL_PERIOD, NOT_APPLICABLE, ROOT_TYPE_NAMES } from './constants/string-constants'; import { EntityWalker } from './walker/entity-walker/entity-walker'; import { RootFieldWalker } from './walker/root-field-walkers/root-field-walker'; -import { EntityResolvabilityErrorsParams } from './utils/types/params'; +import { EntityResolvabilityErrorsParams, EntitySharedRootFieldResolvabilityErrorsParams } from './utils/types/params'; export class Graph { edgeId = -1; entityDataNodeByTypeName = new Map(); - entityNodeNamesBySharedFieldPath = new Map>(); nodeByNodeName = new Map(); nodesByTypeName = new Map>(); resolvedRootFieldNodeNames = new Set(); rootNodeByTypeName = new Map(); subgraphName = NOT_APPLICABLE; - resolvableFieldNamesByRelativeFieldPathByEntityNodeName = new Map>(); - nodeResolutionDataByFieldPath = new Map(); resDataByNodeName = new Map(); resDataByRelativePathByEntity = new Map>(); - failureResultByEntityNodeName = new Map(); - unresolvableFieldPaths = new Set(); visitedEntitiesByOriginEntity = new Map>(); walkerIndex = -1; @@ -208,8 +203,8 @@ export class Graph { validate(): ValidationResult { for (const rootNode of this.rootNodeByTypeName.values()) { for (const [rootFieldName, sharedRootFieldEdges] of rootNode.headToSharedTailEdges) { - const isShared = sharedRootFieldEdges.length > 1; - if (!isShared) { + const isSharedRootField = sharedRootFieldEdges.length > 1; + if (!isSharedRootField) { const namedTypeNodeName = sharedRootFieldEdges[0]!.node.nodeName; if (this.resolvedRootFieldNodeNames.has(namedTypeNodeName)) { continue; @@ -228,13 +223,16 @@ export class Graph { ) { continue; } - if (rootFieldWalker.selectionPathsByEntityNodeName.size < 1 && rootFieldWalker.unresolvablePaths.size < 1) { + const involvesEntities = isSharedRootField + ? rootFieldWalker.entityNodeNamesByPath.size > 0 + : rootFieldWalker.pathsByEntityNodeName.size > 0; + if (rootFieldWalker.unresolvablePaths.size < 1 && !involvesEntities) { continue; } const fieldData = getOrThrowError(rootNode.fieldDataByName, rootFieldName, 'fieldDataByName'); const rootFieldData = newRootFieldData(rootNode.typeName, rootFieldName, fieldData.subgraphNames); // If there are no nested entities, then the unresolvable fields must be impossible to resolve. - if (rootFieldWalker.selectionPathsByEntityNodeName.size < 1) { + if (!involvesEntities) { return { errors: generateRootResolvabilityErrors({ unresolvablePaths: rootFieldWalker.unresolvablePaths, @@ -244,49 +242,9 @@ export class Graph { success: false, }; } - for (const [entityNodeName, selectionPaths] of rootFieldWalker.selectionPathsByEntityNodeName) { - if (!isShared && this.resDataByNodeName.has(entityNodeName)) { - continue; - } - const resDataByRelativeOriginPath = getValueOrDefault( - this.resDataByRelativePathByEntity, - entityNodeName, - () => new Map(), - ); - const subgraphNameByUnresolvablePath = new Map(); - this.visitEntity({ - encounteredEntityNodeNames: new Set(), - entityNodeName, - resDataByRelativeOriginPath: resDataByRelativeOriginPath, - subgraphNameByUnresolvablePath, - visitedEntities: getValueOrDefault( - this.visitedEntitiesByOriginEntity, - entityNodeName, - () => new Set(), - ), - }); - if (subgraphNameByUnresolvablePath.size < 1) { - continue; - } - if (isShared) { - // TODO - for (const path of rootFieldWalker.unresolvablePaths) { - } - return { - errors: [new Error('Shared errors')], - success: false, - }; - } - return { - errors: this.generateEntityResolvabilityErrors({ - entityNodeName, - // Propagate errors for the first encounter only. - pathFromRoot: getFirstEntry(selectionPaths) ?? '', - rootFieldData, - subgraphNameByUnresolvablePath, - }), - success: false, - }; + const result = this.validateEntities({ isSharedRootField, rootFieldData, walker: rootFieldWalker }); + if (!result.success) { + return result; } } } @@ -295,7 +253,177 @@ export class Graph { }; } - generateEntityResolvabilityErrors({ + consolidateUnresolvableRootWithEntityPaths({ + pathFromRoot, + resDataByRelativeOriginPath, + subgraphNameByUnresolvablePath, + walker, + }: ConsolidateUnresolvablePathsParams) { + for (const unresolvableRootPath of walker.unresolvablePaths) { + if (!unresolvableRootPath.startsWith(pathFromRoot)) { + continue; + } + const relativePath = unresolvableRootPath.split(pathFromRoot)[1]; + const rootResData = getOrThrowError( + walker.resDataByPath, + unresolvableRootPath, + `rootFieldWalker.unresolvablePaths`, + ); + const entityResData = resDataByRelativeOriginPath.get(relativePath); + if (!entityResData) { + continue; + } + rootResData.addData(entityResData); + entityResData.addData(rootResData); + if (!rootResData.isResolved()) { + // Delete the root path so that the error only propagates once through the entity. + walker.unresolvablePaths.delete(unresolvableRootPath); + continue; + } + walker.unresolvablePaths.delete(unresolvableRootPath); + subgraphNameByUnresolvablePath.delete(relativePath); + } + } + + consolidateUnresolvableEntityWithRootPaths({ + pathFromRoot, + resDataByRelativeOriginPath, + subgraphNameByUnresolvablePath, + walker, + }: ConsolidateUnresolvablePathsParams) { + for (const unresolvableEntityPath of subgraphNameByUnresolvablePath.keys()) { + const entityResData = getOrThrowError( + resDataByRelativeOriginPath, + unresolvableEntityPath, + `resDataByRelativeOriginPath`, + ); + const fullPath = `${pathFromRoot}${unresolvableEntityPath}`; + const rootResData = getOrThrowError(walker.resDataByPath, fullPath, `rootFieldWalker.resDataByPath`); + entityResData.addData(rootResData); + rootResData.addData(entityResData); + if (!entityResData.isResolved()) { + continue; + } + subgraphNameByUnresolvablePath.delete(unresolvableEntityPath); + } + } + + validateSharedRootFieldEntities({ rootFieldData, walker }: ValidateEntitiesParams): ValidationResult { + for (const [pathFromRoot, entityNodeNames] of walker.entityNodeNamesByPath) { + const subgraphNameByUnresolvablePath = new Map(); + // Shared fields are unique contexts, so the resolution data cannot be reused. + const resDataByRelativeOriginPath = new Map(); + /* The entity nodes are connected through the root (and not necessarily through a key), so all origins must be + * explored before an error can be propagated with certainty. + * */ + for (const entityNodeName of entityNodeNames) { + this.visitEntity({ + encounteredEntityNodeNames: new Set(), + entityNodeName, + resDataByRelativeOriginPath: resDataByRelativeOriginPath, + subgraphNameByUnresolvablePath, + visitedEntities: new Set(), + }); + } + if (subgraphNameByUnresolvablePath.size < 1) { + continue; + } + this.consolidateUnresolvableRootWithEntityPaths({ + pathFromRoot, + resDataByRelativeOriginPath, + subgraphNameByUnresolvablePath, + walker, + }); + this.consolidateUnresolvableEntityWithRootPaths({ + pathFromRoot, + resDataByRelativeOriginPath, + subgraphNameByUnresolvablePath, + walker, + }); + const errors = new Array(); + if (subgraphNameByUnresolvablePath.size > 0) { + errors.push( + ...this.getSharedEntityResolvabilityErrors({ + entityNodeNames, + resDataByPath: resDataByRelativeOriginPath, + pathFromRoot, + rootFieldData, + subgraphNameByUnresolvablePath, + }), + ); + } + if (walker.unresolvablePaths.size > 0) { + errors.push( + ...generateRootResolvabilityErrors({ + unresolvablePaths: walker.unresolvablePaths, + resDataByPath: walker.resDataByPath, + rootFieldData, + }), + ); + } + if (errors.length < 1) { + continue; + } + return { + errors, + success: false, + }; + } + return { + success: true, + }; + } + + validateRootFieldEntities({ rootFieldData, walker }: ValidateEntitiesParams): ValidationResult { + for (const [entityNodeName, entityPaths] of walker.pathsByEntityNodeName) { + const subgraphNameByUnresolvablePath = new Map(); + if (this.resDataByNodeName.has(entityNodeName)) { + continue; + } + const resDataByRelativeOriginPath = getValueOrDefault( + this.resDataByRelativePathByEntity, + entityNodeName, + () => new Map(), + ); + this.visitEntity({ + encounteredEntityNodeNames: new Set(), + entityNodeName, + resDataByRelativeOriginPath: resDataByRelativeOriginPath, + subgraphNameByUnresolvablePath, + visitedEntities: getValueOrDefault( + this.visitedEntitiesByOriginEntity, + entityNodeName, + () => new Set(), + ), + }); + + if (subgraphNameByUnresolvablePath.size < 1) { + continue; + } + return { + errors: this.getEntityResolvabilityErrors({ + entityNodeName, + // Propagate errors for the first encounter only. + pathFromRoot: getFirstEntry(entityPaths) ?? '', + rootFieldData, + subgraphNameByUnresolvablePath, + }), + success: false, + }; + } + return { + success: true, + }; + } + + validateEntities(params: ValidateEntitiesParams): ValidationResult { + if (params.isSharedRootField) { + return this.validateSharedRootFieldEntities(params); + } + return this.validateRootFieldEntities(params); + } + + getEntityResolvabilityErrors({ entityNodeName, pathFromRoot, rootFieldData, @@ -312,7 +440,7 @@ export class Graph { entityTypeName, 'entityDataNodeByTypeName', ); - return generateResolvabilityErrors({ + return generateEntityResolvabilityErrors({ entityAncestorData: { fieldSetsByTargetSubgraphName, subgraphName: '', @@ -324,4 +452,36 @@ export class Graph { subgraphNameByUnresolvablePath, }); } + + getSharedEntityResolvabilityErrors({ + entityNodeNames, + pathFromRoot, + rootFieldData, + resDataByPath, + subgraphNameByUnresolvablePath, + }: EntitySharedRootFieldResolvabilityErrorsParams): Array { + let entityTypeName: string | undefined = undefined; + const subgraphNames = new Array(); + for (const entityNodeName of entityNodeNames) { + const segments = entityNodeName.split(LITERAL_PERIOD); + entityTypeName ??= segments[1]; + subgraphNames.push(segments[0]); + } + const { fieldSetsByTargetSubgraphName } = getOrThrowError( + this.entityDataNodeByTypeName, + entityTypeName, + 'entityDataNodeByTypeName', + ); + return generateSharedEntityResolvabilityErrors({ + entityAncestors: { + fieldSetsByTargetSubgraphName, + subgraphNames, + typeName: entityTypeName!, + }, + pathFromRoot, + resDataByPath, + rootFieldData: rootFieldData, + subgraphNameByUnresolvablePath, + }); + } } diff --git a/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts b/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts index d44afacdf9..4f7bf46c86 100644 --- a/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts +++ b/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts @@ -13,17 +13,26 @@ export class NodeResolutionData { constructor({ fieldDataByName, isResolved = false, - resolvedDescendentNames, + resolvedDescendantNames, resolvedFieldNames, typeName, }: NodeResolutionDataParams) { this.#isResolved = isResolved; this.fieldDataByName = fieldDataByName; - this.resolvedDescendantNames = new Set(resolvedDescendentNames); + this.resolvedDescendantNames = new Set(resolvedDescendantNames); this.resolvedFieldNames = new Set(resolvedFieldNames); this.typeName = typeName; } + addData(data: NodeResolutionData) { + for (const fieldName of data.resolvedFieldNames) { + this.addResolvedFieldName(fieldName); + } + for (const fieldName of data.resolvedDescendantNames) { + this.resolvedDescendantNames.add(fieldName); + } + } + addResolvedFieldName(fieldName: FieldName) { if (!this.fieldDataByName.has(fieldName)) { throw unexpectedEdgeFatalError(this.typeName, [fieldName]); @@ -44,7 +53,7 @@ export class NodeResolutionData { return new NodeResolutionData({ fieldDataByName: this.fieldDataByName, isResolved: this.#isResolved, - resolvedDescendentNames: this.resolvedDescendantNames, + resolvedDescendantNames: this.resolvedDescendantNames, resolvedFieldNames: this.resolvedFieldNames, typeName: this.typeName, }); diff --git a/composition/src/resolvability-graph/node-resolution-data/types/params.ts b/composition/src/resolvability-graph/node-resolution-data/types/params.ts index 77692202c9..870c82d1e7 100644 --- a/composition/src/resolvability-graph/node-resolution-data/types/params.ts +++ b/composition/src/resolvability-graph/node-resolution-data/types/params.ts @@ -5,6 +5,6 @@ export type NodeResolutionDataParams = { fieldDataByName: Map; typeName: TypeName; isResolved?: boolean; - resolvedDescendentNames?: Set; + resolvedDescendantNames?: Set; resolvedFieldNames?: Set; }; diff --git a/composition/src/resolvability-graph/types/params.ts b/composition/src/resolvability-graph/types/params.ts index fcd02aed04..7b807b09b6 100644 --- a/composition/src/resolvability-graph/types/params.ts +++ b/composition/src/resolvability-graph/types/params.ts @@ -1,6 +1,7 @@ -import type { NodeName, SelectionPath, SubgraphName } from './types'; +import type { NodeName, RootFieldData, SelectionPath, SubgraphName } from './types'; import { NodeResolutionData } from '../node-resolution-data/node-resolution-data'; +import { RootFieldWalker } from '../walker/root-field-walkers/root-field-walker'; export type VisitEntityParams = { encounteredEntityNodeNames: Set; @@ -10,3 +11,16 @@ export type VisitEntityParams = { visitedEntities: Set; relativeOriginPaths?: Set; }; + +export type ValidateEntitiesParams = { + isSharedRootField: boolean; + rootFieldData: RootFieldData; + walker: RootFieldWalker; +}; + +export type ConsolidateUnresolvablePathsParams = { + pathFromRoot: SelectionPath; + resDataByRelativeOriginPath: Map; + subgraphNameByUnresolvablePath: Map; + walker: RootFieldWalker; +}; diff --git a/composition/src/resolvability-graph/types/types.ts b/composition/src/resolvability-graph/types/types.ts index 30493d6cc9..cfbd2eafe2 100644 --- a/composition/src/resolvability-graph/types/types.ts +++ b/composition/src/resolvability-graph/types/types.ts @@ -4,14 +4,10 @@ export type VisitNodeResult = { isRevisitedNode?: boolean; }; -export type FieldPath = string; - export type FieldName = string; export type NodeName = `${SubgraphName}.${TypeName}`; -export type RootCoords = `${TypeName}.${FieldName}`; - export type SelectionPath = string; export type SubgraphName = string; @@ -34,14 +30,3 @@ export type ValidationSuccess = { }; export type ValidationResult = ValidationFailure | ValidationSuccess; - -export type VisitEntityFailure = { - subgraphNameByUnresolvablePath: Map; - success: false; -}; - -export type VisitEntitySuccess = { - success: true; -}; - -export type VisitEntityResult = VisitEntityFailure | VisitEntitySuccess; diff --git a/composition/src/resolvability-graph/utils/types/params.ts b/composition/src/resolvability-graph/utils/types/params.ts index 53fd6126cd..8f4e241966 100644 --- a/composition/src/resolvability-graph/utils/types/params.ts +++ b/composition/src/resolvability-graph/utils/types/params.ts @@ -1,7 +1,8 @@ -import type { NodeName, RootFieldData, SelectionPath, SubgraphName } from '../../types/types'; +import { NodeName, RootFieldData, SelectionPath, SubgraphName } from '../../types/types'; import { NodeResolutionData } from '../../node-resolution-data/node-resolution-data'; -import { EntityAncestorData } from './types'; +import { EntityAncestorCollection, EntityAncestorData } from './types'; +import { UnresolvableFieldData } from '../utils'; export type EntityResolvabilityErrorsParams = { entityNodeName: NodeName; @@ -10,6 +11,14 @@ export type EntityResolvabilityErrorsParams = { subgraphNameByUnresolvablePath: Map; }; +export type EntitySharedRootFieldResolvabilityErrorsParams = { + entityNodeNames: Set; + pathFromRoot: SelectionPath; + rootFieldData: RootFieldData; + resDataByPath: Map; + subgraphNameByUnresolvablePath: Map; +}; + export type RootResolvabilityErrorsParams = { resDataByPath: Map; rootFieldData: RootFieldData; @@ -24,7 +33,27 @@ export type ResolvabilityErrorsParams = { pathFromRoot?: SelectionPath; }; +export type SharedResolvabilityErrorsParams = { + entityAncestors: EntityAncestorCollection; + resDataByPath: Map; + rootFieldData: RootFieldData; + subgraphNameByUnresolvablePath: Map; + pathFromRoot?: SelectionPath; +}; + export type GetMultipliedRelativeOriginPathsParams = { selectionPath: SelectionPath; relativeOriginPaths?: Set; }; + +export type GenerateResolvabilityErrorReasonsParams = { + rootFieldData: RootFieldData; + unresolvableFieldData: UnresolvableFieldData; + entityAncestorData?: EntityAncestorData; +}; + +export type GenerateSharedResolvabilityErrorReasonsParams = { + rootFieldData: RootFieldData; + unresolvableFieldData: UnresolvableFieldData; + entityAncestors: EntityAncestorCollection; +}; diff --git a/composition/src/resolvability-graph/utils/types/types.ts b/composition/src/resolvability-graph/utils/types/types.ts index 410f3fc654..98b77ee9aa 100644 --- a/composition/src/resolvability-graph/utils/types/types.ts +++ b/composition/src/resolvability-graph/utils/types/types.ts @@ -5,3 +5,15 @@ export type EntityAncestorData = { subgraphName: SubgraphName; typeName: TypeName; }; + +export type EntityAncestorCollection = { + fieldSetsByTargetSubgraphName: Map>; + subgraphNames: Array; + typeName: TypeName; +}; + +export type SelectionSetSegments = { + outputEnd: string; + outputStart: string; + pathNodes: Array; +}; diff --git a/composition/src/resolvability-graph/utils/utils.ts b/composition/src/resolvability-graph/utils/utils.ts index c992e218c5..a8e92c25c0 100644 --- a/composition/src/resolvability-graph/utils/utils.ts +++ b/composition/src/resolvability-graph/utils/utils.ts @@ -1,31 +1,18 @@ import { unresolvablePathError } from '../../errors/errors'; -import { LITERAL_SPACE, QUOTATION_JOIN } from '../../utils/string-constants'; import { getOrThrowError } from '../../utils/utils'; import { GraphFieldData } from '../../utils/types'; -import { NodeResolutionData } from '../node-resolution-data/node-resolution-data'; import { FieldName, RootFieldData, SelectionPath, SubgraphName, TypeName } from '../types/types'; import { + GenerateResolvabilityErrorReasonsParams, + GenerateSharedResolvabilityErrorReasonsParams, GetMultipliedRelativeOriginPathsParams, ResolvabilityErrorsParams, RootResolvabilityErrorsParams, + SharedResolvabilityErrorsParams, } from './types/params'; -import { EntityAncestorData } from './types/types'; - -export type EntityResolvabilitySuccess = { - success: true; -}; - -export type EntityResolvabilityFailure = { - entityAncestorData: EntityAncestorData; - nodeName: string; - parentFieldPathForEntityReference: Array; - success: false; - typeName: string; - unresolvableFieldPaths: Set; -}; - -export type EntityResolvabilityResult = EntityResolvabilitySuccess | EntityResolvabilityFailure; +import { SelectionSetSegments } from './types/types'; +import { LITERAL_SPACE, QUOTATION_JOIN } from '../constants/string-constants'; export type UnresolvableFieldData = { fieldName: string; @@ -49,15 +36,6 @@ export function newRootFieldData( }; } -type ResolvabilityErrorsOptions = { - errors: Array; - nodeResolutionDataByFieldPath: Map; - rootFieldData: RootFieldData; - unresolvableFieldPaths: Array | Set; - entityAncestorData?: EntityAncestorData; - pathFromRoot?: string; -}; - function formatFieldNameSelection(fieldData: GraphFieldData, pathLength: number): string { if (fieldData.isLeaf) { return fieldData.name + ` <--\n`; @@ -72,17 +50,11 @@ function formatFieldNameSelection(fieldData: GraphFieldData, pathLength: number) ); } -export type GenerateResolvabilityErrorReasonsOptions = { - rootFieldData: RootFieldData; - unresolvableFieldData: UnresolvableFieldData; - entityAncestorData?: EntityAncestorData; -}; - export function generateResolvabilityErrorReasons({ entityAncestorData, rootFieldData, unresolvableFieldData, -}: GenerateResolvabilityErrorReasonsOptions): Array { +}: GenerateResolvabilityErrorReasonsParams): Array { const { fieldName, typeName, subgraphNames } = unresolvableFieldData; const reasons: Array = [ rootFieldData.message, @@ -129,11 +101,54 @@ export function generateResolvabilityErrorReasons({ return reasons; } -type SelectionSetSegments = { - outputEnd: string; - outputStart: string; - pathNodes: Array; -}; +export function generateSharedResolvabilityErrorReasons({ + entityAncestors, + rootFieldData, + unresolvableFieldData, +}: GenerateSharedResolvabilityErrorReasonsParams): Array { + const { fieldName, typeName, subgraphNames } = unresolvableFieldData; + const reasons: Array = [ + rootFieldData.message, + `The field "${typeName}.${fieldName}" is defined in the following subgraph` + + (subgraphNames.size > 1 ? `s` : ``) + + `: "${[...subgraphNames].join(QUOTATION_JOIN)}".`, + ]; + let hasIntersectingTargetSubgraph = false; + for (const [targetSubgraphName, fieldSets] of entityAncestors.fieldSetsByTargetSubgraphName) { + if (!subgraphNames.has(targetSubgraphName)) { + continue; + } + const filteredSubgraphNames = entityAncestors.subgraphNames.filter( + (subgraphName) => subgraphName !== targetSubgraphName, + ); + const isSubsetPlural = filteredSubgraphNames.length > 1; + hasIntersectingTargetSubgraph = true; + for (const fieldSet of fieldSets) { + reasons.push( + `The entity ancestor "${entityAncestors.typeName}" in subgraph${isSubsetPlural ? `s` : ``}` + + ` "${filteredSubgraphNames.join(QUOTATION_JOIN)}" do${isSubsetPlural ? `` : `es`} not satisfy` + + ` the key field set "${fieldSet}" to access subgraph "${targetSubgraphName}".`, + ); + } + } + if (!hasIntersectingTargetSubgraph) { + const isPlural = entityAncestors.subgraphNames.length > 1; + reasons.push( + `The entity ancestor "${entityAncestors.typeName}" in subgraph${isPlural ? `s` : ``}` + + ` "${entityAncestors.subgraphNames.join(QUOTATION_JOIN)}" ha${isPlural ? `ve` : `s`} no accessible target` + + ` entities (resolvable @key directives) in the subgraphs where "${typeName}.${fieldName}" is defined.`, + ); + } + reasons.push( + `The type "${typeName}" is not a descendant of any other entity ancestors that can provide a shared route to access "${fieldName}".`, + ); + if (typeName !== entityAncestors?.typeName) { + reasons.push( + `The type "${typeName}" has no accessible target entities (resolvable @key directives) in any other subgraph, so accessing other subgraphs is not possible.`, + ); + } + return reasons; +} export function generateSelectionSetSegments(fieldPath: string): SelectionSetSegments { // Regex is to split on singular periods and not fragments (... on TypeName) @@ -210,7 +225,7 @@ export function generateRootResolvabilityErrors({ return errors; } -export function generateResolvabilityErrors({ +export function generateEntityResolvabilityErrors({ entityAncestorData, resDataByPath, pathFromRoot, @@ -238,7 +253,7 @@ export function generateResolvabilityErrors({ typeName: nodeResolutionData.typeName, }); } - // Reflect whence the resolvability came accurately. + // Reflect whence the resolvability error came accurately. entityAncestorData.subgraphName = subgraphName; for (const unresolvableFieldData of unresolvableFieldDatas) { errors.push( @@ -252,6 +267,47 @@ export function generateResolvabilityErrors({ return errors; } +export function generateSharedEntityResolvabilityErrors({ + entityAncestors, + resDataByPath, + pathFromRoot, + rootFieldData, + subgraphNameByUnresolvablePath, +}: SharedResolvabilityErrorsParams): Array { + const errors = new Array(); + for (const path of subgraphNameByUnresolvablePath.keys()) { + const unresolvableFieldDatas = new Array(); + const nodeResolutionData = getOrThrowError(resDataByPath, path, 'resDataByPath'); + const fieldDataByFieldName = new Map(); + for (const [fieldName, fieldData] of nodeResolutionData.fieldDataByName) { + if (nodeResolutionData.resolvedFieldNames.has(fieldName)) { + continue; + } + fieldDataByFieldName.set(fieldName, fieldData); + } + const fullPath = getUnresolvablePath(path, pathFromRoot); + const selectionSetSegments = generateSelectionSetSegments(fullPath); + for (const [fieldName, fieldData] of fieldDataByFieldName) { + unresolvableFieldDatas.push({ + fieldName, + selectionSet: renderSelectionSet(selectionSetSegments, fieldData), + subgraphNames: fieldData.subgraphNames, + typeName: nodeResolutionData.typeName, + }); + } + // Reflect whence the resolvability error came accurately. + for (const unresolvableFieldData of unresolvableFieldDatas) { + errors.push( + unresolvablePathError( + unresolvableFieldData, + generateSharedResolvabilityErrorReasons({ rootFieldData, unresolvableFieldData, entityAncestors }), + ), + ); + } + } + return errors; +} + export function getMultipliedRelativeOriginPaths({ relativeOriginPaths, selectionPath, diff --git a/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts b/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts index bc01ea37f2..e604b145be 100644 --- a/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts +++ b/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts @@ -151,14 +151,14 @@ export class EntityWalker { if (node.headToTailEdges.size < 1) { return { visited: true, areDescendantsResolved: true }; } - let resolvedDescendents = 0; + let resolvedDescendants = 0; for (const edge of node.headToTailEdges.values()) { // Propagate any one of the abstract path failures. if (this.visitEntityDescendantEdge({ edge, selectionPath }).areDescendantsResolved) { - resolvedDescendents += 1; + resolvedDescendants += 1; } } - return { visited: true, areDescendantsResolved: resolvedDescendents === node.headToTailEdges.size }; + return { visited: true, areDescendantsResolved: resolvedDescendants === node.headToTailEdges.size }; } propagateVisitedField({ diff --git a/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts b/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts index 8ed7580af1..048a0e8fad 100644 --- a/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts +++ b/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts @@ -15,7 +15,10 @@ export class RootFieldWalker { index: number; resDataByNodeName: Map; resDataByPath = new Map(); - selectionPathsByEntityNodeName = new Map>(); + // Used by shared root fields. + entityNodeNamesByPath = new Map>(); + // Used by unshared root fields. + pathsByEntityNodeName = new Map>(); unresolvablePaths = new Set(); constructor({ index, nodeResolutionDataByNodeName }: RootFieldWalkerParams) { @@ -45,7 +48,7 @@ export class RootFieldWalker { if (this.resDataByNodeName.has(edge.node.nodeName)) { return { visited: true, areDescendantsResolved: true }; } - getValueOrDefault(this.selectionPathsByEntityNodeName, edge.node.nodeName, () => new Set()).add( + getValueOrDefault(this.pathsByEntityNodeName, edge.node.nodeName, () => new Set()).add( `${selectionPath}.${edge.edgeName}`, ); return { visited: true, areDescendantsResolved: false }; @@ -66,16 +69,16 @@ export class RootFieldWalker { if (node.headToTailEdges.size < 1) { return { visited: true, areDescendantsResolved: true }; } - let resolvedDescendents = 0; + let resolvedDescendants = 0; for (const edge of node.headToTailEdges.values()) { // Propagate any one of the abstract path failures. if (this.visitEdge({ edge, selectionPath }).areDescendantsResolved) { - resolvedDescendents += 1; + resolvedDescendants += 1; } } return { visited: true, - areDescendantsResolved: resolvedDescendents === node.headToTailEdges.size, + areDescendantsResolved: resolvedDescendants === node.headToTailEdges.size, }; } @@ -132,9 +135,11 @@ export class RootFieldWalker { * In these cases, the error message explains the specific reason the jump cannot happen. */ if (edge.node.hasEntitySiblings) { - getValueOrDefault(this.selectionPathsByEntityNodeName, edge.node.nodeName, () => new Set()).add( + getValueOrDefault( + this.entityNodeNamesByPath, `${selectionPath}.${edge.edgeName}`, - ); + () => new Set(), + ).add(edge.node.nodeName); } if (edge.node.isAbstract) { return this.visitSharedAbstractNode({ @@ -152,16 +157,16 @@ export class RootFieldWalker { if (node.headToTailEdges.size < 1) { return { visited: true, areDescendantsResolved: true }; } - let resolvedDescendents = 0; + let resolvedDescendants = 0; for (const edge of node.headToTailEdges.values()) { // Propagate any one of the abstract path failures. if (this.visitSharedEdge({ edge, selectionPath }).areDescendantsResolved) { - resolvedDescendents += 1; + resolvedDescendants += 1; } } return { visited: true, - areDescendantsResolved: resolvedDescendents === node.headToTailEdges.size, + areDescendantsResolved: resolvedDescendants === node.headToTailEdges.size, }; } diff --git a/composition/tests/v1/resolvability.test.ts b/composition/tests/v1/resolvability.test.ts index a35b9958d8..53b0816918 100644 --- a/composition/tests/v1/resolvability.test.ts +++ b/composition/tests/v1/resolvability.test.ts @@ -1,11 +1,15 @@ import { + EntityAncestorCollection, EntityAncestorData, federateSubgraphs, generateResolvabilityErrorReasons, generateSelectionSetSegments, + generateSharedResolvabilityErrorReasons, GraphFieldData, newRootFieldData, + OBJECT, parse, + QUERY, renderSelectionSet, ROUTER_COMPATIBILITY_VERSION_ONE, Subgraph, @@ -64,7 +68,7 @@ describe('Field resolvability tests', () => { test('that unshared queries that return a nested type that cannot be resolved in a single subgraph returns an error', () => { const fieldPath = 'query.query.nest.nest.nest'; - const rootFieldData = newRootFieldData('Query', 'query', new Set(['subgraph-b'])); + const rootFieldData = newRootFieldData(QUERY, 'query', new Set(['subgraph-b'])); const unresolvableFieldData: UnresolvableFieldData = { fieldName: 'name', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { @@ -74,10 +78,9 @@ describe('Field resolvability tests', () => { subgraphNames: new Set(['subgraph-c']), typeName: 'Nested4', }; - const result = federateSubgraphsFailure([subgraphB, subgraphC], ROUTER_COMPATIBILITY_VERSION_ONE); - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors } = federateSubgraphsFailure([subgraphB, subgraphC], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( unresolvablePathError( unresolvableFieldData, generateResolvabilityErrorReasons({ rootFieldData, unresolvableFieldData }), @@ -87,7 +90,7 @@ describe('Field resolvability tests', () => { test('that unresolvable fields return an error #1', () => { const fieldPath = 'query.friend'; - const rootFieldData = newRootFieldData('Query', 'friend', new Set(['subgraph-d'])); + const rootFieldData = newRootFieldData(QUERY, 'friend', new Set(['subgraph-d'])); const unresolvableFieldData: UnresolvableFieldData = { fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { @@ -125,10 +128,9 @@ describe('Field resolvability tests', () => { subgraphNames: new Set(['subgraph-v']), typeName: 'Entity', }; - const result = federateSubgraphsFailure([subgraphV, subgraphW], ROUTER_COMPATIBILITY_VERSION_ONE); - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors } = federateSubgraphsFailure([subgraphV, subgraphW], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( unresolvablePathError( unresolvableFieldData, generateResolvabilityErrorReasons({ entityAncestorData, rootFieldData, unresolvableFieldData }), @@ -153,10 +155,9 @@ describe('Field resolvability tests', () => { subgraphNames: new Set(['subgraph-v']), typeName: 'Entity', }; - const result = federateSubgraphsFailure([subgraphW, subgraphV], ROUTER_COMPATIBILITY_VERSION_ONE); - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors } = federateSubgraphsFailure([subgraphW, subgraphV], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( unresolvablePathError( unresolvableFieldData, generateResolvabilityErrorReasons({ entityAncestorData, rootFieldData, unresolvableFieldData }), @@ -166,7 +167,7 @@ describe('Field resolvability tests', () => { test('that unresolvable fields that are the first fields to be added still return an error', () => { const fieldPath = 'query.friend'; - const rootFieldData = newRootFieldData('Query', 'friend', new Set(['subgraph-d'])); + const rootFieldData = newRootFieldData(QUERY, 'friend', new Set(['subgraph-d'])); const unresolvableFieldData: UnresolvableFieldData = { fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { @@ -176,10 +177,9 @@ describe('Field resolvability tests', () => { subgraphNames: new Set(['subgraph-f']), typeName: 'Friend', }; - const result = federateSubgraphsFailure([subgraphF, subgraphD], ROUTER_COMPATIBILITY_VERSION_ONE); - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors } = federateSubgraphsFailure([subgraphF, subgraphD], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( unresolvablePathError( unresolvableFieldData, generateResolvabilityErrorReasons({ rootFieldData, unresolvableFieldData }), @@ -189,7 +189,7 @@ describe('Field resolvability tests', () => { test('that multiple unresolved fields return an error for each', () => { const fieldPath = 'query.friend'; - const rootFieldData = newRootFieldData('Query', 'friend', new Set(['subgraph-d'])); + const rootFieldData = newRootFieldData(QUERY, 'friend', new Set(['subgraph-d'])); const fieldDataOne: UnresolvableFieldData = { fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { @@ -274,7 +274,7 @@ describe('Field resolvability tests', () => { test('that queries that return interfaces whose constituent types are unresolvable return an error', () => { const fieldPath = 'query.humans.... on Friend'; - const rootFieldData = newRootFieldData('Query', 'humans', new Set(['subgraph-i'])); + const rootFieldData = newRootFieldData(QUERY, 'humans', new Set(['subgraph-i'])); const unresolvableFieldData: UnresolvableFieldData = { fieldName: 'name', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { @@ -297,7 +297,7 @@ describe('Field resolvability tests', () => { test('that queries that return nested interfaces whose constituent types are unresolvable return an error', () => { const fieldPath = 'query.humans.... on Friend.pets.... on Cat'; - const rootFieldData = newRootFieldData('Query', 'humans', new Set(['subgraph-k'])); + const rootFieldData = newRootFieldData(QUERY, 'humans', new Set(['subgraph-k'])); const unresolvableFieldData: UnresolvableFieldData = { fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { @@ -345,7 +345,7 @@ describe('Field resolvability tests', () => { test('that queries that return unions whose constituent types are unresolvable return an error', () => { const fieldPath = 'query.humans.... on Enemy'; - const rootFieldData = newRootFieldData('Query', 'humans', new Set(['subgraph-o'])); + const rootFieldData = newRootFieldData(QUERY, 'humans', new Set(['subgraph-o'])); const unresolvableFieldData: UnresolvableFieldData = { fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { @@ -356,7 +356,6 @@ describe('Field resolvability tests', () => { typeName: 'Enemy', }; const result = federateSubgraphsFailure([subgraphO, subgraphP], ROUTER_COMPATIBILITY_VERSION_ONE); - expect(result.success).toBe(false); expect(result.errors).toHaveLength(1); expect(result.errors[0]).toStrictEqual( unresolvablePathError( @@ -514,7 +513,7 @@ describe('Field resolvability tests', () => { test('that an error is returned if a nested entity cannot access a subgraph where a field is defined #1', () => { const fieldPath = 'query.entityOne.entityTwo.entityOne'; - const rootFieldData = newRootFieldData('Query', 'entityOne', new Set(['subgraph-ac'])); + const rootFieldData = newRootFieldData(QUERY, 'entityOne', new Set(['subgraph-ac'])); const entityAncestorData: EntityAncestorData = { fieldSetsByTargetSubgraphName: new Map>(), subgraphName: 'subgraph-ad', @@ -538,26 +537,23 @@ describe('Field resolvability tests', () => { subgraphNames: new Set(['subgraph-ac']), typeName: 'EntityOne', }; - const result = federateSubgraphsFailure([subgraphAC, subgraphAD], ROUTER_COMPATIBILITY_VERSION_ONE); - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(2); - expect(result.errors[0]).toStrictEqual( + const { errors } = federateSubgraphsFailure([subgraphAC, subgraphAD], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(2); + expect(errors).toStrictEqual([ unresolvablePathError( fieldDataOne, generateResolvabilityErrorReasons({ entityAncestorData, rootFieldData, unresolvableFieldData: fieldDataOne }), ), - ); - expect(result.errors[1]).toStrictEqual( unresolvablePathError( fieldDataTwo, generateResolvabilityErrorReasons({ entityAncestorData, rootFieldData, unresolvableFieldData: fieldDataTwo }), ), - ); + ]); }); test('that an error is returned if a nested entity cannot access a subgraph where a field is defined #2', () => { const fieldPath = 'query.entityOne.entityTwo.entityOne'; - const rootFieldData = newRootFieldData('Query', 'entityOne', new Set(['subgraph-ba'])); + const rootFieldData = newRootFieldData(QUERY, 'entityOne', new Set(['subgraph-ba'])); const entityAncestorData: EntityAncestorData = { fieldSetsByTargetSubgraphName: new Map>(), subgraphName: 'subgraph-bb', @@ -581,21 +577,18 @@ describe('Field resolvability tests', () => { subgraphNames: new Set(['subgraph-ba']), typeName: 'EntityOne', }; - const result = federateSubgraphsFailure([subgraphBA, subgraphBB], ROUTER_COMPATIBILITY_VERSION_ONE); - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(2); - expect(result.errors[0]).toStrictEqual( + const { errors } = federateSubgraphsFailure([subgraphBA, subgraphBB], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(2); + expect(errors).toStrictEqual([ unresolvablePathError( fieldDataOne, generateResolvabilityErrorReasons({ entityAncestorData, rootFieldData, unresolvableFieldData: fieldDataOne }), ), - ); - expect(result.errors[1]).toStrictEqual( unresolvablePathError( fieldDataTwo, generateResolvabilityErrorReasons({ entityAncestorData, rootFieldData, unresolvableFieldData: fieldDataTwo }), ), - ); + ]); }); test('that an error is returned if a field cannot be accessed by an entity subgraph jump', () => { @@ -615,10 +608,9 @@ describe('Field resolvability tests', () => { subgraphNames: new Set(['subgraph-af']), typeName: 'Entity', }; - const result = federateSubgraphsFailure([subgraphAE, subgraphAF], ROUTER_COMPATIBILITY_VERSION_ONE); - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors } = federateSubgraphsFailure([subgraphAE, subgraphAF], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( unresolvablePathError( unresolvableFieldData, generateResolvabilityErrorReasons({ entityAncestorData, rootFieldData, unresolvableFieldData }), @@ -764,9 +756,11 @@ describe('Field resolvability tests', () => { }); test('that revisited fields do not produce false positives #3', () => { - const result = federateSubgraphsSuccess([subgraphAS, subgraphAT], ROUTER_COMPATIBILITY_VERSION_ONE); - expect(result.success).toBe(true); - expect(schemaToSortedNormalizedString(result.federatedGraphSchema)).toBe( + const { federatedGraphSchema } = federateSubgraphsSuccess( + [subgraphAS, subgraphAT], + ROUTER_COMPATIBILITY_VERSION_ONE, + ); + expect(schemaToSortedNormalizedString(federatedGraphSchema)).toBe( normalizeString( versionTwoRouterDefinitions + ` @@ -1051,9 +1045,11 @@ describe('Field resolvability tests', () => { }); test('that shared entity fields do not trigger false positives', () => { - const result = federateSubgraphsSuccess([subgraphBC, subgraphBD, subgraphBE], ROUTER_COMPATIBILITY_VERSION_ONE); - expect(result.success).toBe(true); - expect(schemaToSortedNormalizedString(result.federatedGraphSchema)).toBe( + const { federatedGraphSchema } = federateSubgraphsSuccess( + [subgraphBC, subgraphBD, subgraphBE], + ROUTER_COMPATIBILITY_VERSION_ONE, + ); + expect(schemaToSortedNormalizedString(federatedGraphSchema)).toBe( normalizeString( versionTwoRouterDefinitions + ` @@ -1145,7 +1141,7 @@ describe('Field resolvability tests', () => { subgraphName: subgraphBH.name, typeName: 'Entity', }; - const rootFieldData = newRootFieldData('Query', 'entity', new Set([subgraphBH.name])); + const rootFieldData = newRootFieldData(QUERY, 'entity', new Set([subgraphBH.name])); const unresolvableFieldData: UnresolvableFieldData = { fieldName: 'isNew', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { @@ -1155,10 +1151,9 @@ describe('Field resolvability tests', () => { subgraphNames: new Set([subgraphBJ.name]), typeName: 'Entity', }; - const result = federateSubgraphsFailure([subgraphBH, subgraphBJ], ROUTER_COMPATIBILITY_VERSION_ONE); - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors } = federateSubgraphsFailure([subgraphBH, subgraphBJ], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( unresolvablePathError( unresolvableFieldData, generateResolvabilityErrorReasons({ entityAncestorData, rootFieldData, unresolvableFieldData }), @@ -1167,9 +1162,11 @@ describe('Field resolvability tests', () => { }); test('that a shared entity field cycle is resolvable', () => { - const result = federateSubgraphsSuccess([subgraphBK, subgraphBL], ROUTER_COMPATIBILITY_VERSION_ONE); - expect(result.success).toBe(true); - expect(schemaToSortedNormalizedString(result.federatedGraphSchema)).toBe( + const { federatedGraphSchema } = federateSubgraphsSuccess( + [subgraphBK, subgraphBL], + ROUTER_COMPATIBILITY_VERSION_ONE, + ); + expect(schemaToSortedNormalizedString(federatedGraphSchema)).toBe( normalizeString( versionTwoRouterDefinitions + ` @@ -1213,7 +1210,7 @@ describe('Field resolvability tests', () => { subgraphName: subgraphBM.name, typeName: 'Entity', }; - const rootFieldData = newRootFieldData('Query', 'entity', new Set([subgraphBM.name])); + const rootFieldData = newRootFieldData(QUERY, 'entity', new Set([subgraphBM.name])); const unresolvableFieldData: UnresolvableFieldData = { fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { @@ -1241,7 +1238,7 @@ describe('Field resolvability tests', () => { subgraphName: subgraphBM.name, typeName: 'Entity', }; - const rootFieldData = newRootFieldData('Query', 'entity', new Set([subgraphBM.name])); + const rootFieldData = newRootFieldData(QUERY, 'entity', new Set([subgraphBM.name])); const unresolvableFieldData: UnresolvableFieldData = { fieldName: 'age', selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { @@ -1251,10 +1248,9 @@ describe('Field resolvability tests', () => { subgraphNames: new Set([subgraphBN.name]), typeName: 'Entity', }; - const result = federateSubgraphsFailure([subgraphBN, subgraphBM], ROUTER_COMPATIBILITY_VERSION_ONE); - expect(result.success).toBe(false); - expect(result.errors).toHaveLength(1); - expect(result.errors[0]).toStrictEqual( + const { errors } = federateSubgraphsFailure([subgraphBN, subgraphBM], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( unresolvablePathError( unresolvableFieldData, generateResolvabilityErrorReasons({ entityAncestorData, rootFieldData, unresolvableFieldData }), @@ -1264,9 +1260,11 @@ describe('Field resolvability tests', () => { // @TODO test('that an entity can be a key target without ever being a key source', () => { - const result = federateSubgraphsSuccess([subgraphBO, subgraphBP], ROUTER_COMPATIBILITY_VERSION_ONE); - expect(result.success).toBe(true); - expect(schemaToSortedNormalizedString(result.federatedGraphSchema)).toBe( + const { federatedGraphSchema } = federateSubgraphsSuccess( + [subgraphBO, subgraphBP], + ROUTER_COMPATIBILITY_VERSION_ONE, + ); + expect(schemaToSortedNormalizedString(federatedGraphSchema)).toBe( normalizeString( versionOneRouterDefinitions + ` @@ -1297,61 +1295,462 @@ describe('Field resolvability tests', () => { }); expect(resultTwo.success).toBe(true); }); -}); - -const subgraphA: Subgraph = { - name: 'subgraph-a', - url: '', - definitions: parse(` - type Query { - query: Nested @shareable - } - - type Nested @shareable { - nest: Nested2 - } - type Nested2 @shareable { - nest: Nested3 - } + test('that sibling fields that return the same named type do not interfere with resolvability #1', () => { + const { federatedGraphSchema } = federateSubgraphsSuccess([aaaa, aaab], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(schemaToSortedNormalizedString(federatedGraphSchema)).toBe( + normalizeString( + versionTwoRouterDefinitions + + ` + interface Interface { + id: ID! + } + + type ObjectA { + interface: Interface + } + + type ObjectB implements Interface { + id: ID! + name: String! + objectC: ObjectC + } + + type ObjectC { + objectD: ObjectD + } + + type ObjectD { + objectEs: [ObjectE!] + objectEs2: [ObjectE!] + } + + type ObjectE { + objectFs: [ObjectF!] + } + + type ObjectF { + id: ID! + objectGs: [ObjectG!] + } + + type ObjectG { + id: ID! + } + + type Output { + objectA: ObjectA! + } + + type Query { + objectA: Output! + } + + scalar openfed__Scope + `, + ), + ); + }); - type Nested3 @shareable { - nest: Nested4 - } + test('that sibling fields that return the same named type do not interfere with resolvability #2', () => { + const { federatedGraphSchema } = federateSubgraphsSuccess([baaa, baab], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(schemaToSortedNormalizedString(federatedGraphSchema)).toBe( + normalizeString( + versionOneRouterDefinitions + + ` + type ObjectA { + a: ID + id: ID! + objectB: ObjectB! + } + + type ObjectB { + objectC: ObjectC! + objectCs: [ObjectC!]! + } + + type ObjectC { + objectDs: [ObjectD!] + } + + type ObjectD { + a: ID + b: ID + } + + type Query { + objectA: ObjectA + } + `, + ), + ); + }); - type Nested4 { - name: String - } - `), -}; + test('that sibling fields that return the same named type do not interfere with resolvability #3', () => { + const { federatedGraphSchema } = federateSubgraphsSuccess([caaa, caab], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(schemaToSortedNormalizedString(federatedGraphSchema)).toBe( + normalizeString( + versionOneRouterDefinitions + + ` + type ObjectA { + a: ID + id: ID! + objectB: ObjectB! + objectBs: [ObjectB!]! + } + + type ObjectB { + objectC: ObjectC! + } + + type ObjectC { + a: ID! + b: ID! + } + + type Query { + objectA: ObjectA + } + `, + ), + ); + }); -const subgraphB: Subgraph = { - name: 'subgraph-b', - url: '', - definitions: parse(` - type Query { - query: Nested @shareable - } + test('that sibling fields that return the same named type do not interfere with resolvability #4', () => { + const { federatedGraphSchema } = federateSubgraphsSuccess([daaa, daab], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(schemaToSortedNormalizedString(federatedGraphSchema)).toBe( + normalizeString( + versionTwoRouterDefinitions + + ` + interface Interface { + id: ID! + objectB: ObjectB! + } + + type ObjectA implements Interface { + id: ID! + name: String! + objectB: ObjectB! + } + + type ObjectB { + objectC: ObjectC! + } + + type ObjectC { + objectD: ObjectD + objectDs: [ObjectD!] + } + + type ObjectD { + objectEs: [ObjectE!] + } + + type ObjectE { + a: ID + b: ID + } + + type Query { + interface: Interface + } + + scalar openfed__Scope + `, + ), + ); + }); - type Nested @shareable { - nest: Nested2 - } + test('that fields are accessible through a shared root field', () => { + const { federatedGraphSchema } = federateSubgraphsSuccess([eaaa, eaab], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(schemaToSortedNormalizedString(federatedGraphSchema)).toBe( + normalizeString( + versionOneRouterDefinitions + + ` + type Entity { + id: ID! + name: String! + object: Object! + } + + type Object { + id: ID! + name: String! + } + + type Query { + entities: [Entity!]! + } + `, + ), + ); + }); - type Nested2 @shareable { - nest: Nested3 - } + test('that an error is returned if a field is inaccessible through a shared root field', () => { + const fieldPath = 'query.entities.objectTwo'; + const entityAncestors: EntityAncestorCollection = { + fieldSetsByTargetSubgraphName: new Map>([[eaaa.name, new Set(['id'])]]), + subgraphNames: [eaaa.name, eaac.name], + typeName: 'Entity', + }; + const rootFieldData = newRootFieldData(QUERY, 'entities', new Set([eaaa.name, eaac.name])); + const unresolvableFieldData: UnresolvableFieldData = { + fieldName: 'id', + selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { + isLeaf: true, + name: 'id', + } as GraphFieldData), + subgraphNames: new Set([eaaa.name]), + typeName: OBJECT, + }; + const { errors } = federateSubgraphsFailure([eaaa, eaac], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( + unresolvablePathError( + unresolvableFieldData, + generateSharedResolvabilityErrorReasons({ entityAncestors, rootFieldData, unresolvableFieldData }), + ), + ); + }); - type Nested3 @shareable { - nest: Nested4 - } + test('that a shared root field can be combined with entity jumps to resolve a field', () => { + const { federatedGraphSchema } = federateSubgraphsSuccess([eaaa, eaac, eaad], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(schemaToSortedNormalizedString(federatedGraphSchema)).toBe( + normalizeString( + versionOneRouterDefinitions + + ` + type Entity { + id: ID! + name: String! + object: Object! + objectTwo: Object! + } + + type Object { + id: ID! + name: String! + } + + type Query { + entities: [Entity!]! + } + `, + ), + ); + }); - type Nested4 { - age: Int - } - `), -}; + test('that an error is returned if a field is inaccessible through a shared root field nor an entity #1', () => { + const entityAncestors: EntityAncestorCollection = { + fieldSetsByTargetSubgraphName: new Map>([ + [eaaa.name, new Set(['id'])], + [eaae.name, new Set(['name'])], + ]), + subgraphNames: [eaac.name, eaae.name], + typeName: 'Entity', + }; + const rootFieldData = newRootFieldData(QUERY, 'entities', new Set([eaac.name, eaae.name])); + const unresolvableFieldDataOne: UnresolvableFieldData = { + fieldName: 'age', + selectionSet: renderSelectionSet(generateSelectionSetSegments('query.entities.object'), { + isLeaf: true, + name: 'age', + } as GraphFieldData), + subgraphNames: new Set([eaaf.name]), + typeName: OBJECT, + }; + const unresolvableFieldDataTwo: UnresolvableFieldData = { + fieldName: 'age', + selectionSet: renderSelectionSet(generateSelectionSetSegments('query.entities.objectTwo'), { + isLeaf: true, + name: 'age', + } as GraphFieldData), + subgraphNames: new Set([eaaf.name]), + typeName: OBJECT, + }; + const { errors } = federateSubgraphsFailure([eaac, eaae, eaaf], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(2); + expect(errors).toStrictEqual([ + unresolvablePathError( + unresolvableFieldDataOne, + generateSharedResolvabilityErrorReasons({ + entityAncestors, + rootFieldData, + unresolvableFieldData: unresolvableFieldDataOne, + }), + ), + unresolvablePathError( + unresolvableFieldDataTwo, + generateSharedResolvabilityErrorReasons({ + entityAncestors, + rootFieldData, + unresolvableFieldData: unresolvableFieldDataTwo, + }), + ), + ]); + }); -const subgraphC: Subgraph = { + test('that an error is returned if a field is inaccessible through a shared root field nor an entity #2', () => { + const entityAncestors: EntityAncestorCollection = { + fieldSetsByTargetSubgraphName: new Map>([ + [eaaa.name, new Set(['id'])], + [eaae.name, new Set(['name'])], + [eaag.name, new Set(['age'])], + ]), + subgraphNames: [eaac.name, eaae.name, eaag.name], + typeName: 'Entity', + }; + const rootFieldData = newRootFieldData(QUERY, 'entities', new Set([eaac.name, eaae.name])); + const unresolvableFieldDataOne: UnresolvableFieldData = { + fieldName: 'age', + selectionSet: renderSelectionSet(generateSelectionSetSegments('query.entities.object'), { + isLeaf: true, + name: 'age', + } as GraphFieldData), + subgraphNames: new Set([eaag.name]), + typeName: OBJECT, + }; + const unresolvableFieldDataTwo: UnresolvableFieldData = { + fieldName: 'age', + selectionSet: renderSelectionSet(generateSelectionSetSegments('query.entities.objectTwo'), { + isLeaf: true, + name: 'age', + } as GraphFieldData), + subgraphNames: new Set([eaag.name]), + typeName: OBJECT, + }; + const unresolvableFieldDataThree: UnresolvableFieldData = { + fieldName: 'age', + selectionSet: renderSelectionSet(generateSelectionSetSegments('query.entities'), { + isLeaf: true, + name: 'age', + } as GraphFieldData), + subgraphNames: new Set([eaag.name]), + typeName: 'Entity', + }; + const { errors } = federateSubgraphsFailure([eaac, eaae, eaag], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(3); + expect(errors).toStrictEqual([ + unresolvablePathError( + unresolvableFieldDataOne, + generateSharedResolvabilityErrorReasons({ + entityAncestors, + rootFieldData, + unresolvableFieldData: unresolvableFieldDataOne, + }), + ), + unresolvablePathError( + unresolvableFieldDataTwo, + generateSharedResolvabilityErrorReasons({ + entityAncestors, + rootFieldData, + unresolvableFieldData: unresolvableFieldDataTwo, + }), + ), + unresolvablePathError( + unresolvableFieldDataThree, + generateSharedResolvabilityErrorReasons({ + entityAncestors, + rootFieldData, + unresolvableFieldData: unresolvableFieldDataThree, + }), + ), + ]); + }); + + test('that an error is returned if fields returning the same named type are unresolvable', () => { + const fieldPath = 'query.object.nestedObjectTwo'; + const rootFieldData = newRootFieldData(QUERY, 'object', new Set([faaa.name, faab.name])); + const unresolvableFieldData: UnresolvableFieldData = { + fieldName: 'id', + selectionSet: renderSelectionSet(generateSelectionSetSegments(fieldPath), { + isLeaf: true, + name: 'id', + } as GraphFieldData), + subgraphNames: new Set([faaa.name]), + typeName: 'NestedObject', + }; + const { errors } = federateSubgraphsFailure([faaa, faab], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(errors).toHaveLength(1); + expect(errors[0]).toStrictEqual( + unresolvablePathError( + unresolvableFieldData, + generateResolvabilityErrorReasons({ rootFieldData, unresolvableFieldData }), + ), + ); + }); + + test('a cyclical shared root field is resolvable', () => { + const { federatedGraphSchema } = federateSubgraphsSuccess([gaaa, gaab], ROUTER_COMPATIBILITY_VERSION_ONE); + expect(schemaToSortedNormalizedString(federatedGraphSchema)).toBe( + normalizeString( + versionOneRouterDefinitions + + ` + type Object { + object: Object! + } + + type Query { + object: Object! + } + `, + ), + ); + }); +}); + +const subgraphA: Subgraph = { + name: 'subgraph-a', + url: '', + definitions: parse(` + type Query { + query: Nested @shareable + } + + type Nested @shareable { + nest: Nested2 + } + + type Nested2 @shareable { + nest: Nested3 + } + + type Nested3 @shareable { + nest: Nested4 + } + + type Nested4 { + name: String + } + `), +}; + +const subgraphB: Subgraph = { + name: 'subgraph-b', + url: '', + definitions: parse(` + type Query { + query: Nested @shareable + } + + type Nested @shareable { + nest: Nested2 + } + + type Nested2 @shareable { + nest: Nested3 + } + + type Nested3 @shareable { + nest: Nested4 + } + + type Nested4 { + age: Int + } + `), +}; + +const subgraphC: Subgraph = { name: 'subgraph-c', url: '', definitions: parse(` @@ -2543,3 +2942,443 @@ const subgraphBR: Subgraph = { } `), }; + +const aaaa: Subgraph = { + name: 'aaaa', + url: '', + definitions: parse(` + interface Interface { + id: ID! + } + + type ObjectB implements Interface @key(fields: "id") { + id: ID! + name: String! @requires(fields: "objectC { objectD { objectEs { objectFs { id } } } }") + objectC: ObjectC @external + } + + type ObjectC { + objectD: ObjectD @external + } + + type ObjectD { + objectEs: [ObjectE!] @external + } + + type ObjectE { + objectFs: [ObjectF!] @external + } + + type ObjectF { + id: ID! @external + } + `), +}; + +const aaab: Subgraph = { + name: 'aaab', + url: '', + definitions: parse(` + interface Interface @key(fields: "id") { + id: ID! + } + + type ObjectA { + interface: Interface + } + + type ObjectB implements Interface @key(fields: "id") @shareable { + id: ID! + objectC: ObjectC + } + + type ObjectC { + objectD: ObjectD + } + + type ObjectD { + objectEs: [ObjectE!] + objectEs2: [ObjectE!] + } + + type ObjectE { + objectFs: [ObjectF!] + } + + type ObjectF { + id: ID! + objectGs: [ObjectG!] + } + + type ObjectG { + id: ID! + } + + type Output { + objectA: ObjectA! + } + + type Query { + objectA: Output! + } + `), +}; + +const baaa: Subgraph = { + name: 'baaa', + url: '', + definitions: parse(` + type ObjectA @key(fields : "id") { + a: ID @requires(fields: "objectB { objectC { objectDs { a } } }") + id: ID! + objectB: ObjectB! @external + } + + type ObjectB { + objectC: ObjectC! @external + } + + type ObjectC { + objectDs: [ObjectD!] @external + } + + type ObjectD { + a: ID @external + } + `), +}; + +const baab: Subgraph = { + name: 'baab', + url: '', + definitions: parse(` + type ObjectA @key(fields : "id") { + id: ID! + objectB: ObjectB! + } + + type ObjectB { + objectCs: [ObjectC!]! + objectC: ObjectC! + } + + type ObjectC { + objectDs: [ObjectD!] + } + + type ObjectD { + a: ID + b: ID + } + + type Query { + objectA: ObjectA + } + `), +}; + +const caaa: Subgraph = { + name: 'caaa', + url: '', + definitions: parse(` + type ObjectA @key(fields : "id") { + a: ID @requires(fields: "objectB { objectC { a } }") + id: ID! + objectB: ObjectB! @external + } + + type ObjectB { + objectC: ObjectC! @external + } + + type ObjectC { + a: ID! @external + } + `), +}; + +const caab: Subgraph = { + name: 'caab', + url: '', + definitions: parse(` + type ObjectA @key(fields : "id") { + id: ID! + objectB: ObjectB! + objectBs: [ObjectB!]! + } + + type ObjectB { + objectC: ObjectC! + } + + type ObjectC { + a: ID! + b: ID! + } + + type Query { + objectA: ObjectA + } + `), +}; + +const daaa: Subgraph = { + name: 'daaa', + url: '', + definitions: parse(` + interface Interface { + objectB: ObjectB! + } + + type ObjectA implements Interface @key(fields : "id") { + id: ID! + name: String! @requires(fields: "objectB { objectC { objectDs { objectEs { a } } } }") + objectB: ObjectB! @external + } + + type ObjectB { + objectC: ObjectC! @external + } + + type ObjectC { + objectDs: [ObjectD!] @external + } + + + type ObjectD { + objectEs: [ObjectE!] @external + } + + type ObjectE { + a: ID! + } + `), +}; + +const daab: Subgraph = { + name: 'daab', + url: '', + definitions: parse(` + interface Interface @key(fields : "id") { + id: ID! + objectB: ObjectB! + } + + type ObjectA implements Interface @key(fields : "id") { + id: ID! + objectB: ObjectB! + } + + type ObjectB { + objectC: ObjectC! + } + + type ObjectC { + objectD: ObjectD + objectDs: [ObjectD!] + } + + type ObjectD { + objectEs: [ObjectE!] + } + + type ObjectE @shareable { + a: ID + b: ID + } + + type Query { + interface: Interface + } + `), +}; + +const eaaa: Subgraph = { + name: 'eaaa', + url: '', + definitions: parse(` + type Entity @key(fields: "id") { + id: ID! + object: Object! + } + + type Object { + id: ID! + } + + type Query { + entities: [Entity!]! + } + `), +}; + +const eaab: Subgraph = { + name: 'eaab', + url: '', + definitions: parse(` + type Entity @key(fields: "name") { + name: String! + object: Object! + } + + type Object { + name: String! + } + + type Query { + entities: [Entity!]! + } + `), +}; + +const eaac: Subgraph = { + name: 'eaac', + url: '', + definitions: parse(` + type Entity @key(fields: "name") { + name: String! + object: Object! + objectTwo: Object! + } + + type Object { + name: String! + } + + type Query { + entities: [Entity!]! + } + `), +}; + +const eaad: Subgraph = { + name: 'eaad', + url: '', + definitions: parse(` + type Entity @key(fields: "name") { + name: String! + objectTwo: Object! + } + + type Object { + id: ID! + } + `), +}; + +const eaae: Subgraph = { + name: 'eaae', + url: '', + definitions: parse(` + type Entity @key(fields: "id") { + id: ID + object: Object! + objectTwo: Object! + } + + type Object { + id: ID! + } + + type Query { + entities: [Entity!]! + } + `), +}; + +const eaaf: Subgraph = { + name: 'eaaf', + url: '', + definitions: parse(` + type Entity @key(fields: "id", resolvable: false) { + id: ID + object: Object! + objectTwo: Object! + } + + type Object { + age: Int! + } + `), +}; + +const eaag: Subgraph = { + name: 'eaag', + url: '', + definitions: parse(` + type Entity @key(fields: "age") { + age: Int! + object: Object! + objectTwo: Object! + } + + type Object { + age: Int! + } + `), +}; + +const faaa: Subgraph = { + name: 'faaa', + url: '', + definitions: parse(` + type NestedObject { + id: ID! + } + + type Object { + nestedObject: NestedObject! + } + + type Query { + object: Object! + } + `), +}; + +const faab: Subgraph = { + name: 'faab', + url: '', + definitions: parse(` + type NestedObject { + name: String! + } + + type Object { + nestedObject: NestedObject! + nestedObjectTwo: NestedObject! + } + + type Query { + object: Object! + } + `), +}; + +const gaaa: Subgraph = { + name: 'gaaa', + url: '', + definitions: parse(` + type Object { + object: Object! + } + + type Query { + object: Object! + } + `), +}; + +const gaab: Subgraph = { + name: 'gaab', + url: '', + definitions: parse(` + type Object { + object: Object! + } + + type Query { + object: Object! + } + `), +}; From 6c0908435f7b8afbd35c7b77124b4e271ee15141 Mon Sep 17 00:00:00 2001 From: Aenimus Date: Wed, 1 Oct 2025 02:23:33 +0100 Subject: [PATCH 4/5] chore: respond to PR feedback --- composition-go/index.global.js | 62 +++++++++---------- .../src/resolvability-graph/graph-nodes.ts | 34 +++++----- composition/src/resolvability-graph/graph.ts | 41 +++++++----- .../node-resolution-data.ts | 14 +---- .../node-resolution-data/types/params.ts | 2 +- .../src/resolvability-graph/utils/utils.ts | 20 +++--- .../walker/entity-walker/entity-walker.ts | 12 ++-- .../walker/entity-walker/types/params.ts | 2 +- .../root-field-walkers/root-field-walker.ts | 38 ++++++++++-- .../src/v1/federation/federation-factory.ts | 2 +- 10 files changed, 132 insertions(+), 95 deletions(-) diff --git a/composition-go/index.global.js b/composition-go/index.global.js index a2383b3631..5ba76ee5ce 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 bJ=Object.create;var Od=Object.defineProperty,AJ=Object.defineProperties,RJ=Object.getOwnPropertyDescriptor,PJ=Object.getOwnPropertyDescriptors,FJ=Object.getOwnPropertyNames,zA=Object.getOwnPropertySymbols,wJ=Object.getPrototypeOf,WA=Object.prototype.hasOwnProperty,LJ=Object.prototype.propertyIsEnumerable;var un=Math.pow,Ly=(e,t,n)=>t in e?Od(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,x=(e,t)=>{for(var n in t||(t={}))WA.call(t,n)&&Ly(e,n,t[n]);if(zA)for(var n of zA(t))LJ.call(t,n)&&Ly(e,n,t[n]);return e},Q=(e,t)=>AJ(e,PJ(t));var ku=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pm=(e,t)=>{for(var n in t)Od(e,n,{get:t[n],enumerable:!0})},XA=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of FJ(t))!WA.call(e,i)&&i!==n&&Od(e,i,{get:()=>t[i],enumerable:!(r=RJ(t,i))||r.enumerable});return e};var fs=(e,t,n)=>(n=e!=null?bJ(wJ(e)):{},XA(t||!e||!e.__esModule?Od(n,"default",{value:e,enumerable:!0}):n,e)),fm=e=>XA(Od({},"__esModule",{value:!0}),e);var _=(e,t,n)=>(Ly(e,typeof t!="symbol"?t+"":t,n),n),ZA=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Cy=(e,t,n)=>(ZA(e,t,"read from private field"),n?n.call(e):t.get(e)),eR=(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)},By=(e,t,n,r)=>(ZA(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Di=(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=ku(()=>{"use strict"});var O={};pm(O,{_debugEnd:()=>jR,_debugProcess:()=>VR,_events:()=>iP,_eventsCount:()=>aP,_exiting:()=>_R,_fatalExceptions:()=>kR,_getActiveHandles:()=>DR,_getActiveRequests:()=>OR,_kill:()=>AR,_linkedBinding:()=>IR,_maxListeners:()=>rP,_preload_modules:()=>eP,_rawDebug:()=>hR,_startProfilerIdleNotifier:()=>KR,_stopProfilerIdleNotifier:()=>GR,_tickCallback:()=>qR,abort:()=>JR,addListener:()=>sP,allowedNodeEnvironmentFlags:()=>CR,arch:()=>aR,argv:()=>uR,argv0:()=>ZR,assert:()=>BR,binding:()=>fR,chdir:()=>TR,config:()=>vR,cpuUsage:()=>Tm,cwd:()=>NR,debugPort:()=>XR,default:()=>NP,dlopen:()=>SR,domain:()=>gR,emit:()=>dP,emitWarning:()=>pR,env:()=>oR,execArgv:()=>cR,execPath:()=>WR,exit:()=>wR,features:()=>UR,hasUncaughtExceptionCaptureCallback:()=>xR,hrtime:()=>Nm,kill:()=>FR,listeners:()=>mP,memoryUsage:()=>PR,moduleLoadList:()=>yR,nextTick:()=>nR,off:()=>uP,on:()=>Ns,once:()=>oP,openStdin:()=>LR,pid:()=>HR,platform:()=>sR,ppid:()=>zR,prependListener:()=>pP,prependOnceListener:()=>fP,reallyExit:()=>bR,release:()=>ER,removeAllListeners:()=>lP,removeListener:()=>cP,resourceUsage:()=>RR,setSourceMapsEnabled:()=>tP,setUncaughtExceptionCaptureCallback:()=>MR,stderr:()=>QR,stdin:()=>YR,stdout:()=>$R,title:()=>iR,umask:()=>mR,uptime:()=>nP,version:()=>lR,versions:()=>dR});function My(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function CJ(){!Xc||!Mu||(Xc=!1,Mu.length?ms=Mu.concat(ms):mm=-1,ms.length&&tR())}function tR(){if(!Xc){var e=setTimeout(CJ,0);Xc=!0;for(var t=ms.length;t;){for(Mu=ms,ms=[];++mm1)for(var n=1;n{"use strict";m();T();N();ms=[],Xc=!1,mm=-1;rR.prototype.run=function(){this.fun.apply(null,this.array)};iR="browser",aR="x64",sR="browser",oR={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},uR=["/usr/bin/node"],cR=[],lR="v16.8.0",dR={},pR=function(e,t){console.warn((t?t+": ":"")+e)},fR=function(e){My("binding")},mR=function(e){return 0},NR=function(){return"/"},TR=function(e){},ER={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};hR=yr,yR=[];gR={},_R=!1,vR={};bR=yr,AR=yr,Tm=function(){return{}},RR=Tm,PR=Tm,FR=yr,wR=yr,LR=yr,CR={};UR={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},kR=yr,MR=yr;qR=yr,VR=yr,jR=yr,KR=yr,GR=yr,$R=void 0,QR=void 0,YR=void 0,JR=yr,HR=2,zR=1,WR="/bin/usr/node",XR=9229,ZR="node",eP=[],tP=yr,Xo={now:typeof performance!="undefined"?performance.now.bind(performance):void 0,timing:typeof performance!="undefined"?performance.timing:void 0};Xo.now===void 0&&(Uy=Date.now(),Xo.timing&&Xo.timing.navigationStart&&(Uy=Xo.timing.navigationStart),Xo.now=()=>Date.now()-Uy);ky=1e9;Nm.bigint=function(e){var t=Nm(e);return typeof BigInt=="undefined"?t[0]*ky+t[1]:BigInt(t[0]*ky)+BigInt(t[1])};rP=10,iP={},aP=0;sP=Ns,oP=Ns,uP=Ns,cP=Ns,lP=Ns,dP=yr,pP=Ns,fP=Ns;NP={version:lR,versions:dR,arch:aR,platform:sR,release:ER,_rawDebug:hR,moduleLoadList:yR,binding:fR,_linkedBinding:IR,_events:iP,_eventsCount:aP,_maxListeners:rP,on:Ns,addListener:sP,once:oP,off:uP,removeListener:cP,removeAllListeners:lP,emit:dP,prependListener:pP,prependOnceListener:fP,listeners:mP,domain:gR,_exiting:_R,config:vR,dlopen:SR,uptime:nP,_getActiveRequests:OR,_getActiveHandles:DR,reallyExit:bR,_kill:AR,cpuUsage:Tm,resourceUsage:RR,memoryUsage:PR,kill:FR,exit:wR,openStdin:LR,allowedNodeEnvironmentFlags:CR,assert:BR,features:UR,_fatalExceptions:kR,setUncaughtExceptionCaptureCallback:MR,hasUncaughtExceptionCaptureCallback:xR,emitWarning:pR,nextTick:nR,_tickCallback:qR,_debugProcess:VR,_debugEnd:jR,_startProfilerIdleNotifier:KR,_stopProfilerIdleNotifier:GR,stdout:$R,stdin:YR,stderr:QR,abort:JR,umask:mR,chdir:TR,cwd:NR,env:oR,title:iR,argv:uR,execArgv:cR,pid:HR,ppid:zR,execPath:WR,debugPort:XR,hrtime:Nm,argv0:ZR,_preload_modules:eP,setSourceMapsEnabled:tP}});var N=ku(()=>{"use strict";TP()});function BJ(){if(EP)return Dd;EP=!0,Dd.byteLength=c,Dd.toByteArray=d,Dd.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 k=v.indexOf("=");k===-1&&(k=F);var K=k===F?0:4-k%4;return[k,K]}function c(v){var F=o(v),k=F[0],K=F[1];return(k+K)*3/4-K}function l(v,F,k){return(F+k)*3/4-k}function d(v){var F,k=o(v),K=k[0],J=k[1],se=new n(l(v,K,J)),ie=0,Te=J>0?K-4:K,de;for(de=0;de>16&255,se[ie++]=F>>8&255,se[ie++]=F&255;return J===2&&(F=t[v.charCodeAt(de)]<<2|t[v.charCodeAt(de+1)]>>4,se[ie++]=F&255),J===1&&(F=t[v.charCodeAt(de)]<<10|t[v.charCodeAt(de+1)]<<4|t[v.charCodeAt(de+2)]>>2,se[ie++]=F>>8&255,se[ie++]=F&255),se}function f(v){return e[v>>18&63]+e[v>>12&63]+e[v>>6&63]+e[v&63]}function y(v,F,k){for(var K,J=[],se=F;seTe?Te:ie+se));return K===1?(F=v[k-1],J.push(e[F>>2]+e[F<<4&63]+"==")):K===2&&(F=(v[k-2]<<8)+v[k-1],J.push(e[F>>10]+e[F>>4&63]+e[F<<2&63]+"=")),J.join("")}return Dd}function UJ(){if(hP)return Em;hP=!0;return Em.read=function(e,t,n,r,i){var a,o,c=i*8-r-1,l=(1<>1,f=-7,y=n?i-1:0,I=n?-1:1,v=e[t+y];for(y+=I,a=v&(1<<-f)-1,v>>=-f,f+=c;f>0;a=a*256+e[t+y],y+=I,f-=8);for(o=a&(1<<-f)-1,a>>=-f,f+=r;f>0;o=o*256+e[t+y],y+=I,f-=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)},Em.write=function(e,t,n,r,i,a){var o,c,l,d=a*8-i-1,f=(1<>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:a-1,F=r?1:-1,k=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=f):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+y>=1?t+=I/l:t+=I*Math.pow(2,1-y),t*l>=2&&(o++,l/=2),o+y>=f?(c=0,o=f):o+y>=1?(c=(t*l-1)*Math.pow(2,i),o=o+y):(c=t*Math.pow(2,y-1)*Math.pow(2,i),o=0));i>=8;e[n+v]=c&255,v+=F,c/=256,i-=8);for(o=o<0;e[n+v]=o&255,v+=F,o/=256,d-=8);e[n+v-F]|=k*128},Em}function kJ(){if(yP)return xu;yP=!0;let e=BJ(),t=UJ(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;xu.Buffer=o,xu.SlowBuffer=J,xu.INSPECT_MAX_BYTES=50;let r=2147483647;xu.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 R=new Uint8Array(1),h={foo:function(){return 42}};return Object.setPrototypeOf(h,Uint8Array.prototype),Object.setPrototypeOf(R,h),R.foo()===42}catch(R){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(R){if(R>r)throw new RangeError('The value "'+R+'" is invalid for option "size"');let h=new Uint8Array(R);return Object.setPrototypeOf(h,o.prototype),h}function o(R,h,g){if(typeof R=="number"){if(typeof h=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(R)}return c(R,h,g)}o.poolSize=8192;function c(R,h,g){if(typeof R=="string")return y(R,h);if(ArrayBuffer.isView(R))return v(R);if(R==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof R);if(Vt(R,ArrayBuffer)||R&&Vt(R.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Vt(R,SharedArrayBuffer)||R&&Vt(R.buffer,SharedArrayBuffer)))return F(R,h,g);if(typeof R=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let C=R.valueOf&&R.valueOf();if(C!=null&&C!==R)return o.from(C,h,g);let G=k(R);if(G)return G;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof R[Symbol.toPrimitive]=="function")return o.from(R[Symbol.toPrimitive]("string"),h,g);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof R)}o.from=function(R,h,g){return c(R,h,g)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(R){if(typeof R!="number")throw new TypeError('"size" argument must be of type number');if(R<0)throw new RangeError('The value "'+R+'" is invalid for option "size"')}function d(R,h,g){return l(R),R<=0?a(R):h!==void 0?typeof g=="string"?a(R).fill(h,g):a(R).fill(h):a(R)}o.alloc=function(R,h,g){return d(R,h,g)};function f(R){return l(R),a(R<0?0:K(R)|0)}o.allocUnsafe=function(R){return f(R)},o.allocUnsafeSlow=function(R){return f(R)};function y(R,h){if((typeof h!="string"||h==="")&&(h="utf8"),!o.isEncoding(h))throw new TypeError("Unknown encoding: "+h);let g=se(R,h)|0,C=a(g),G=C.write(R,h);return G!==g&&(C=C.slice(0,G)),C}function I(R){let h=R.length<0?0:K(R.length)|0,g=a(h);for(let C=0;C=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return R|0}function J(R){return+R!=R&&(R=0),o.alloc(+R)}o.isBuffer=function(h){return h!=null&&h._isBuffer===!0&&h!==o.prototype},o.compare=function(h,g){if(Vt(h,Uint8Array)&&(h=o.from(h,h.offset,h.byteLength)),Vt(g,Uint8Array)&&(g=o.from(g,g.offset,g.byteLength)),!o.isBuffer(h)||!o.isBuffer(g))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(h===g)return 0;let C=h.length,G=g.length;for(let te=0,pe=Math.min(C,G);teG.length?(o.isBuffer(pe)||(pe=o.from(pe)),pe.copy(G,te)):Uint8Array.prototype.set.call(G,pe,te);else if(o.isBuffer(pe))pe.copy(G,te);else throw new TypeError('"list" argument must be an Array of Buffers');te+=pe.length}return G};function se(R,h){if(o.isBuffer(R))return R.length;if(ArrayBuffer.isView(R)||Vt(R,ArrayBuffer))return R.byteLength;if(typeof R!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof R);let g=R.length,C=arguments.length>2&&arguments[2]===!0;if(!C&&g===0)return 0;let G=!1;for(;;)switch(h){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":return rs(R).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return mr(R).length;default:if(G)return C?-1:rs(R).length;h=(""+h).toLowerCase(),G=!0}}o.byteLength=se;function ie(R,h,g){let C=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,h>>>=0,g<=h))return"";for(R||(R="utf8");;)switch(R){case"hex":return Fr(this,h,g);case"utf8":case"utf-8":return tn(this,h,g);case"ascii":return mn(this,h,g);case"latin1":case"binary":return Pr(this,h,g);case"base64":return en(this,h,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return kn(this,h,g);default:if(C)throw new TypeError("Unknown encoding: "+R);R=(R+"").toLowerCase(),C=!0}}o.prototype._isBuffer=!0;function Te(R,h,g){let C=R[h];R[h]=R[g],R[g]=C}o.prototype.swap16=function(){let h=this.length;if(h%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let g=0;gg&&(h+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(h,g,C,G,te){if(Vt(h,Uint8Array)&&(h=o.from(h,h.offset,h.byteLength)),!o.isBuffer(h))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof h);if(g===void 0&&(g=0),C===void 0&&(C=h?h.length:0),G===void 0&&(G=0),te===void 0&&(te=this.length),g<0||C>h.length||G<0||te>this.length)throw new RangeError("out of range index");if(G>=te&&g>=C)return 0;if(G>=te)return-1;if(g>=C)return 1;if(g>>>=0,C>>>=0,G>>>=0,te>>>=0,this===h)return 0;let pe=te-G,ft=C-g,Nn=Math.min(pe,ft),on=this.slice(G,te),yn=h.slice(g,C);for(let nn=0;nn2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,Nr(g)&&(g=G?0:R.length-1),g<0&&(g=R.length+g),g>=R.length){if(G)return-1;g=R.length-1}else if(g<0)if(G)g=0;else return-1;if(typeof h=="string"&&(h=o.from(h,C)),o.isBuffer(h))return h.length===0?-1:Re(R,h,g,C,G);if(typeof h=="number")return h=h&255,typeof Uint8Array.prototype.indexOf=="function"?G?Uint8Array.prototype.indexOf.call(R,h,g):Uint8Array.prototype.lastIndexOf.call(R,h,g):Re(R,[h],g,C,G);throw new TypeError("val must be string, number or Buffer")}function Re(R,h,g,C,G){let te=1,pe=R.length,ft=h.length;if(C!==void 0&&(C=String(C).toLowerCase(),C==="ucs2"||C==="ucs-2"||C==="utf16le"||C==="utf-16le")){if(R.length<2||h.length<2)return-1;te=2,pe/=2,ft/=2,g/=2}function Nn(yn,nn){return te===1?yn[nn]:yn.readUInt16BE(nn*te)}let on;if(G){let yn=-1;for(on=g;onpe&&(g=pe-ft),on=g;on>=0;on--){let yn=!0;for(let nn=0;nnG&&(C=G)):C=G;let te=h.length;C>te/2&&(C=te/2);let pe;for(pe=0;pe>>0,isFinite(C)?(C=C>>>0,G===void 0&&(G="utf8")):(G=C,C=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let te=this.length-g;if((C===void 0||C>te)&&(C=te),h.length>0&&(C<0||g<0)||g>this.length)throw new RangeError("Attempt to write outside buffer bounds");G||(G="utf8");let pe=!1;for(;;)switch(G){case"hex":return xe(this,h,g,C);case"utf8":case"utf-8":return tt(this,h,g,C);case"ascii":case"latin1":case"binary":return ee(this,h,g,C);case"base64":return Se(this,h,g,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _t(this,h,g,C);default:if(pe)throw new TypeError("Unknown encoding: "+G);G=(""+G).toLowerCase(),pe=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function en(R,h,g){return h===0&&g===R.length?e.fromByteArray(R):e.fromByteArray(R.slice(h,g))}function tn(R,h,g){g=Math.min(R.length,g);let C=[],G=h;for(;G239?4:te>223?3:te>191?2:1;if(G+ft<=g){let Nn,on,yn,nn;switch(ft){case 1:te<128&&(pe=te);break;case 2:Nn=R[G+1],(Nn&192)===128&&(nn=(te&31)<<6|Nn&63,nn>127&&(pe=nn));break;case 3:Nn=R[G+1],on=R[G+2],(Nn&192)===128&&(on&192)===128&&(nn=(te&15)<<12|(Nn&63)<<6|on&63,nn>2047&&(nn<55296||nn>57343)&&(pe=nn));break;case 4:Nn=R[G+1],on=R[G+2],yn=R[G+3],(Nn&192)===128&&(on&192)===128&&(yn&192)===128&&(nn=(te&15)<<18|(Nn&63)<<12|(on&63)<<6|yn&63,nn>65535&&nn<1114112&&(pe=nn))}}pe===null?(pe=65533,ft=1):pe>65535&&(pe-=65536,C.push(pe>>>10&1023|55296),pe=56320|pe&1023),C.push(pe),G+=ft}return Qt(C)}let bn=4096;function Qt(R){let h=R.length;if(h<=bn)return String.fromCharCode.apply(String,R);let g="",C=0;for(;CC)&&(g=C);let G="";for(let te=h;teC&&(h=C),g<0?(g+=C,g<0&&(g=0)):g>C&&(g=C),gg)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(h,g,C){h=h>>>0,g=g>>>0,C||zt(h,g,this.length);let G=this[h],te=1,pe=0;for(;++pe>>0,g=g>>>0,C||zt(h,g,this.length);let G=this[h+--g],te=1;for(;g>0&&(te*=256);)G+=this[h+--g]*te;return G},o.prototype.readUint8=o.prototype.readUInt8=function(h,g){return h=h>>>0,g||zt(h,1,this.length),this[h]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(h,g){return h=h>>>0,g||zt(h,2,this.length),this[h]|this[h+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(h,g){return h=h>>>0,g||zt(h,2,this.length),this[h]<<8|this[h+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),(this[h]|this[h+1]<<8|this[h+2]<<16)+this[h+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),this[h]*16777216+(this[h+1]<<16|this[h+2]<<8|this[h+3])},o.prototype.readBigUInt64LE=_a(function(h){h=h>>>0,nt(h,"offset");let g=this[h],C=this[h+7];(g===void 0||C===void 0)&&Rt(h,this.length-8);let G=g+this[++h]*un(2,8)+this[++h]*un(2,16)+this[++h]*un(2,24),te=this[++h]+this[++h]*un(2,8)+this[++h]*un(2,16)+C*un(2,24);return BigInt(G)+(BigInt(te)<>>0,nt(h,"offset");let g=this[h],C=this[h+7];(g===void 0||C===void 0)&&Rt(h,this.length-8);let G=g*un(2,24)+this[++h]*un(2,16)+this[++h]*un(2,8)+this[++h],te=this[++h]*un(2,24)+this[++h]*un(2,16)+this[++h]*un(2,8)+C;return(BigInt(G)<>>0,g=g>>>0,C||zt(h,g,this.length);let G=this[h],te=1,pe=0;for(;++pe=te&&(G-=Math.pow(2,8*g)),G},o.prototype.readIntBE=function(h,g,C){h=h>>>0,g=g>>>0,C||zt(h,g,this.length);let G=g,te=1,pe=this[h+--G];for(;G>0&&(te*=256);)pe+=this[h+--G]*te;return te*=128,pe>=te&&(pe-=Math.pow(2,8*g)),pe},o.prototype.readInt8=function(h,g){return h=h>>>0,g||zt(h,1,this.length),this[h]&128?(255-this[h]+1)*-1:this[h]},o.prototype.readInt16LE=function(h,g){h=h>>>0,g||zt(h,2,this.length);let C=this[h]|this[h+1]<<8;return C&32768?C|4294901760:C},o.prototype.readInt16BE=function(h,g){h=h>>>0,g||zt(h,2,this.length);let C=this[h+1]|this[h]<<8;return C&32768?C|4294901760:C},o.prototype.readInt32LE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24},o.prototype.readInt32BE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]},o.prototype.readBigInt64LE=_a(function(h){h=h>>>0,nt(h,"offset");let g=this[h],C=this[h+7];(g===void 0||C===void 0)&&Rt(h,this.length-8);let G=this[h+4]+this[h+5]*un(2,8)+this[h+6]*un(2,16)+(C<<24);return(BigInt(G)<>>0,nt(h,"offset");let g=this[h],C=this[h+7];(g===void 0||C===void 0)&&Rt(h,this.length-8);let G=(g<<24)+this[++h]*un(2,16)+this[++h]*un(2,8)+this[++h];return(BigInt(G)<>>0,g||zt(h,4,this.length),t.read(this,h,!0,23,4)},o.prototype.readFloatBE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),t.read(this,h,!1,23,4)},o.prototype.readDoubleLE=function(h,g){return h=h>>>0,g||zt(h,8,this.length),t.read(this,h,!0,52,8)},o.prototype.readDoubleBE=function(h,g){return h=h>>>0,g||zt(h,8,this.length),t.read(this,h,!1,52,8)};function An(R,h,g,C,G,te){if(!o.isBuffer(R))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>G||hR.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(h,g,C,G){if(h=+h,g=g>>>0,C=C>>>0,!G){let ft=Math.pow(2,8*C)-1;An(this,h,g,C,ft,0)}let te=1,pe=0;for(this[g]=h&255;++pe>>0,C=C>>>0,!G){let ft=Math.pow(2,8*C)-1;An(this,h,g,C,ft,0)}let te=C-1,pe=1;for(this[g+te]=h&255;--te>=0&&(pe*=256);)this[g+te]=h/pe&255;return g+C},o.prototype.writeUint8=o.prototype.writeUInt8=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,1,255,0),this[g]=h&255,g+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,2,65535,0),this[g]=h&255,this[g+1]=h>>>8,g+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,2,65535,0),this[g]=h>>>8,this[g+1]=h&255,g+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,4,4294967295,0),this[g+3]=h>>>24,this[g+2]=h>>>16,this[g+1]=h>>>8,this[g]=h&255,g+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,4,4294967295,0),this[g]=h>>>24,this[g+1]=h>>>16,this[g+2]=h>>>8,this[g+3]=h&255,g+4};function ue(R,h,g,C,G){Ut(h,C,G,R,g,7);let te=Number(h&BigInt(4294967295));R[g++]=te,te=te>>8,R[g++]=te,te=te>>8,R[g++]=te,te=te>>8,R[g++]=te;let pe=Number(h>>BigInt(32)&BigInt(4294967295));return R[g++]=pe,pe=pe>>8,R[g++]=pe,pe=pe>>8,R[g++]=pe,pe=pe>>8,R[g++]=pe,g}function De(R,h,g,C,G){Ut(h,C,G,R,g,7);let te=Number(h&BigInt(4294967295));R[g+7]=te,te=te>>8,R[g+6]=te,te=te>>8,R[g+5]=te,te=te>>8,R[g+4]=te;let pe=Number(h>>BigInt(32)&BigInt(4294967295));return R[g+3]=pe,pe=pe>>8,R[g+2]=pe,pe=pe>>8,R[g+1]=pe,pe=pe>>8,R[g]=pe,g+8}o.prototype.writeBigUInt64LE=_a(function(h,g=0){return ue(this,h,g,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=_a(function(h,g=0){return De(this,h,g,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(h,g,C,G){if(h=+h,g=g>>>0,!G){let Nn=Math.pow(2,8*C-1);An(this,h,g,C,Nn-1,-Nn)}let te=0,pe=1,ft=0;for(this[g]=h&255;++te>0)-ft&255;return g+C},o.prototype.writeIntBE=function(h,g,C,G){if(h=+h,g=g>>>0,!G){let Nn=Math.pow(2,8*C-1);An(this,h,g,C,Nn-1,-Nn)}let te=C-1,pe=1,ft=0;for(this[g+te]=h&255;--te>=0&&(pe*=256);)h<0&&ft===0&&this[g+te+1]!==0&&(ft=1),this[g+te]=(h/pe>>0)-ft&255;return g+C},o.prototype.writeInt8=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,1,127,-128),h<0&&(h=255+h+1),this[g]=h&255,g+1},o.prototype.writeInt16LE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,2,32767,-32768),this[g]=h&255,this[g+1]=h>>>8,g+2},o.prototype.writeInt16BE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,2,32767,-32768),this[g]=h>>>8,this[g+1]=h&255,g+2},o.prototype.writeInt32LE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,4,2147483647,-2147483648),this[g]=h&255,this[g+1]=h>>>8,this[g+2]=h>>>16,this[g+3]=h>>>24,g+4},o.prototype.writeInt32BE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,4,2147483647,-2147483648),h<0&&(h=4294967295+h+1),this[g]=h>>>24,this[g+1]=h>>>16,this[g+2]=h>>>8,this[g+3]=h&255,g+4},o.prototype.writeBigInt64LE=_a(function(h,g=0){return ue(this,h,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=_a(function(h,g=0){return De(this,h,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ve(R,h,g,C,G,te){if(g+C>R.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function Ce(R,h,g,C,G){return h=+h,g=g>>>0,G||ve(R,h,g,4),t.write(R,h,g,C,23,4),g+4}o.prototype.writeFloatLE=function(h,g,C){return Ce(this,h,g,!0,C)},o.prototype.writeFloatBE=function(h,g,C){return Ce(this,h,g,!1,C)};function vt(R,h,g,C,G){return h=+h,g=g>>>0,G||ve(R,h,g,8),t.write(R,h,g,C,52,8),g+8}o.prototype.writeDoubleLE=function(h,g,C){return vt(this,h,g,!0,C)},o.prototype.writeDoubleBE=function(h,g,C){return vt(this,h,g,!1,C)},o.prototype.copy=function(h,g,C,G){if(!o.isBuffer(h))throw new TypeError("argument should be a Buffer");if(C||(C=0),!G&&G!==0&&(G=this.length),g>=h.length&&(g=h.length),g||(g=0),G>0&&G=this.length)throw new RangeError("Index out of range");if(G<0)throw new RangeError("sourceEnd out of bounds");G>this.length&&(G=this.length),h.length-g>>0,C=C===void 0?this.length:C>>>0,h||(h=0);let te;if(typeof h=="number")for(te=g;teun(2,32)?G=qe(String(g)):typeof g=="bigint"&&(G=String(g),(g>un(BigInt(2),BigInt(32))||g<-un(BigInt(2),BigInt(32)))&&(G=qe(G)),G+="n"),C+=` It must be ${h}. Received ${G}`,C},RangeError);function qe(R){let h="",g=R.length,C=R[0]==="-"?1:0;for(;g>=C+4;g-=3)h=`_${R.slice(g-3,g)}${h}`;return`${R.slice(0,g)}${h}`}function Ye(R,h,g){nt(h,"offset"),(R[h]===void 0||R[h+g]===void 0)&&Rt(h,R.length-(g+1))}function Ut(R,h,g,C,G,te){if(R>g||R3?h===0||h===BigInt(0)?ft=`>= 0${pe} and < 2${pe} ** ${(te+1)*8}${pe}`:ft=`>= -(2${pe} ** ${(te+1)*8-1}${pe}) and < 2 ** ${(te+1)*8-1}${pe}`:ft=`>= ${h}${pe} and <= ${g}${pe}`,new Y.ERR_OUT_OF_RANGE("value",ft,R)}Ye(C,G,te)}function nt(R,h){if(typeof R!="number")throw new Y.ERR_INVALID_ARG_TYPE(h,"number",R)}function Rt(R,h,g){throw Math.floor(R)!==R?(nt(R,g),new Y.ERR_OUT_OF_RANGE(g||"offset","an integer",R)):h<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(g||"offset",`>= ${g?1:0} and <= ${h}`,R)}let ns=/[^+/0-9A-Za-z-_]/g;function Vr(R){if(R=R.split("=")[0],R=R.trim().replace(ns,""),R.length<2)return"";for(;R.length%4!==0;)R=R+"=";return R}function rs(R,h){h=h||1/0;let g,C=R.length,G=null,te=[];for(let pe=0;pe55295&&g<57344){if(!G){if(g>56319){(h-=3)>-1&&te.push(239,191,189);continue}else if(pe+1===C){(h-=3)>-1&&te.push(239,191,189);continue}G=g;continue}if(g<56320){(h-=3)>-1&&te.push(239,191,189),G=g;continue}g=(G-55296<<10|g-56320)+65536}else G&&(h-=3)>-1&&te.push(239,191,189);if(G=null,g<128){if((h-=1)<0)break;te.push(g)}else if(g<2048){if((h-=2)<0)break;te.push(g>>6|192,g&63|128)}else if(g<65536){if((h-=3)<0)break;te.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((h-=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 Mc(R){let h=[];for(let g=0;g>8,G=g%256,te.push(G),te.push(C);return te}function mr(R){return e.toByteArray(Vr(R))}function ni(R,h,g,C){let G;for(G=0;G=h.length||G>=R.length);++G)h[G+g]=R[G];return G}function Vt(R,h){return R instanceof h||R!=null&&R.constructor!=null&&R.constructor.name!=null&&R.constructor.name===h.name}function Nr(R){return R!==R}let Du=function(){let R="0123456789abcdef",h=new Array(256);for(let g=0;g<16;++g){let C=g*16;for(let G=0;G<16;++G)h[C+G]=R[g]+R[G]}return h}();function _a(R){return typeof BigInt=="undefined"?bu:R}function bu(){throw new Error("BigInt not supported")}return xu}var Dd,EP,Em,hP,xu,yP,qu,D,Tpe,Epe,IP=ku(()=>{"use strict";m();T();N();Dd={},EP=!1;Em={},hP=!1;xu={},yP=!1;qu=kJ();qu.Buffer;qu.SlowBuffer;qu.INSPECT_MAX_BYTES;qu.kMaxLength;D=qu.Buffer,Tpe=qu.INSPECT_MAX_BYTES,Epe=qu.kMaxLength});var T=ku(()=>{"use strict";IP()});var gP=w(Zc=>{"use strict";m();T();N();Object.defineProperty(Zc,"__esModule",{value:!0});Zc.versionInfo=Zc.version=void 0;var MJ="16.9.0";Zc.version=MJ;var xJ=Object.freeze({major:16,minor:9,patch:0,preReleaseTag:null});Zc.versionInfo=xJ});var Br=w(xy=>{"use strict";m();T();N();Object.defineProperty(xy,"__esModule",{value:!0});xy.devAssert=qJ;function qJ(e,t){if(!!!e)throw new Error(t)}});var hm=w(qy=>{"use strict";m();T();N();Object.defineProperty(qy,"__esModule",{value:!0});qy.isPromise=VJ;function VJ(e){return typeof(e==null?void 0:e.then)=="function"}});var Da=w(Vy=>{"use strict";m();T();N();Object.defineProperty(Vy,"__esModule",{value:!0});Vy.isObjectLike=jJ;function jJ(e){return typeof e=="object"&&e!==null}});var Ir=w(jy=>{"use strict";m();T();N();Object.defineProperty(jy,"__esModule",{value:!0});jy.invariant=KJ;function KJ(e,t){if(!!!e)throw new Error(t!=null?t:"Unexpected invariant triggered.")}});var ym=w(Ky=>{"use strict";m();T();N();Object.defineProperty(Ky,"__esModule",{value:!0});Ky.getLocation=QJ;var GJ=Ir(),$J=/\r\n|[\n\r]/g;function QJ(e,t){let n=0,r=1;for(let i of e.body.matchAll($J)){if(typeof i.index=="number"||(0,GJ.invariant)(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}});var Gy=w(Im=>{"use strict";m();T();N();Object.defineProperty(Im,"__esModule",{value:!0});Im.printLocation=JJ;Im.printSourceLocation=vP;var YJ=ym();function JJ(e){return vP(e.source,(0,YJ.getLocation)(e.source,e.start))}function vP(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} +"use strict";var shim=(()=>{var bJ=Object.create;var Od=Object.defineProperty,AJ=Object.defineProperties,RJ=Object.getOwnPropertyDescriptor,PJ=Object.getOwnPropertyDescriptors,FJ=Object.getOwnPropertyNames,zA=Object.getOwnPropertySymbols,wJ=Object.getPrototypeOf,WA=Object.prototype.hasOwnProperty,LJ=Object.prototype.propertyIsEnumerable;var un=Math.pow,Ly=(e,t,n)=>t in e?Od(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,x=(e,t)=>{for(var n in t||(t={}))WA.call(t,n)&&Ly(e,n,t[n]);if(zA)for(var n of zA(t))LJ.call(t,n)&&Ly(e,n,t[n]);return e},Q=(e,t)=>AJ(e,PJ(t));var ku=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pm=(e,t)=>{for(var n in t)Od(e,n,{get:t[n],enumerable:!0})},XA=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of FJ(t))!WA.call(e,i)&&i!==n&&Od(e,i,{get:()=>t[i],enumerable:!(r=RJ(t,i))||r.enumerable});return e};var fs=(e,t,n)=>(n=e!=null?bJ(wJ(e)):{},XA(t||!e||!e.__esModule?Od(n,"default",{value:e,enumerable:!0}):n,e)),fm=e=>XA(Od({},"__esModule",{value:!0}),e);var _=(e,t,n)=>(Ly(e,typeof t!="symbol"?t+"":t,n),n),ZA=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Cy=(e,t,n)=>(ZA(e,t,"read from private field"),n?n.call(e):t.get(e)),eR=(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)},By=(e,t,n,r)=>(ZA(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Di=(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=ku(()=>{"use strict"});var O={};pm(O,{_debugEnd:()=>jR,_debugProcess:()=>VR,_events:()=>iP,_eventsCount:()=>aP,_exiting:()=>_R,_fatalExceptions:()=>kR,_getActiveHandles:()=>DR,_getActiveRequests:()=>OR,_kill:()=>AR,_linkedBinding:()=>IR,_maxListeners:()=>rP,_preload_modules:()=>eP,_rawDebug:()=>hR,_startProfilerIdleNotifier:()=>KR,_stopProfilerIdleNotifier:()=>GR,_tickCallback:()=>qR,abort:()=>JR,addListener:()=>sP,allowedNodeEnvironmentFlags:()=>CR,arch:()=>aR,argv:()=>uR,argv0:()=>ZR,assert:()=>BR,binding:()=>fR,chdir:()=>TR,config:()=>vR,cpuUsage:()=>Tm,cwd:()=>NR,debugPort:()=>XR,default:()=>NP,dlopen:()=>SR,domain:()=>gR,emit:()=>dP,emitWarning:()=>pR,env:()=>oR,execArgv:()=>cR,execPath:()=>WR,exit:()=>wR,features:()=>UR,hasUncaughtExceptionCaptureCallback:()=>xR,hrtime:()=>Nm,kill:()=>FR,listeners:()=>mP,memoryUsage:()=>PR,moduleLoadList:()=>yR,nextTick:()=>nR,off:()=>uP,on:()=>Ns,once:()=>oP,openStdin:()=>LR,pid:()=>HR,platform:()=>sR,ppid:()=>zR,prependListener:()=>pP,prependOnceListener:()=>fP,reallyExit:()=>bR,release:()=>ER,removeAllListeners:()=>lP,removeListener:()=>cP,resourceUsage:()=>RR,setSourceMapsEnabled:()=>tP,setUncaughtExceptionCaptureCallback:()=>MR,stderr:()=>QR,stdin:()=>YR,stdout:()=>$R,title:()=>iR,umask:()=>mR,uptime:()=>nP,version:()=>lR,versions:()=>dR});function My(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function CJ(){!Zc||!Mu||(Zc=!1,Mu.length?ms=Mu.concat(ms):mm=-1,ms.length&&tR())}function tR(){if(!Zc){var e=setTimeout(CJ,0);Zc=!0;for(var t=ms.length;t;){for(Mu=ms,ms=[];++mm1)for(var n=1;n{"use strict";m();T();N();ms=[],Zc=!1,mm=-1;rR.prototype.run=function(){this.fun.apply(null,this.array)};iR="browser",aR="x64",sR="browser",oR={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},uR=["/usr/bin/node"],cR=[],lR="v16.8.0",dR={},pR=function(e,t){console.warn((t?t+": ":"")+e)},fR=function(e){My("binding")},mR=function(e){return 0},NR=function(){return"/"},TR=function(e){},ER={name:"node",sourceUrl:"",headersUrl:"",libUrl:""};hR=yr,yR=[];gR={},_R=!1,vR={};bR=yr,AR=yr,Tm=function(){return{}},RR=Tm,PR=Tm,FR=yr,wR=yr,LR=yr,CR={};UR={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},kR=yr,MR=yr;qR=yr,VR=yr,jR=yr,KR=yr,GR=yr,$R=void 0,QR=void 0,YR=void 0,JR=yr,HR=2,zR=1,WR="/bin/usr/node",XR=9229,ZR="node",eP=[],tP=yr,Xo={now:typeof performance!="undefined"?performance.now.bind(performance):void 0,timing:typeof performance!="undefined"?performance.timing:void 0};Xo.now===void 0&&(Uy=Date.now(),Xo.timing&&Xo.timing.navigationStart&&(Uy=Xo.timing.navigationStart),Xo.now=()=>Date.now()-Uy);ky=1e9;Nm.bigint=function(e){var t=Nm(e);return typeof BigInt=="undefined"?t[0]*ky+t[1]:BigInt(t[0]*ky)+BigInt(t[1])};rP=10,iP={},aP=0;sP=Ns,oP=Ns,uP=Ns,cP=Ns,lP=Ns,dP=yr,pP=Ns,fP=Ns;NP={version:lR,versions:dR,arch:aR,platform:sR,release:ER,_rawDebug:hR,moduleLoadList:yR,binding:fR,_linkedBinding:IR,_events:iP,_eventsCount:aP,_maxListeners:rP,on:Ns,addListener:sP,once:oP,off:uP,removeListener:cP,removeAllListeners:lP,emit:dP,prependListener:pP,prependOnceListener:fP,listeners:mP,domain:gR,_exiting:_R,config:vR,dlopen:SR,uptime:nP,_getActiveRequests:OR,_getActiveHandles:DR,reallyExit:bR,_kill:AR,cpuUsage:Tm,resourceUsage:RR,memoryUsage:PR,kill:FR,exit:wR,openStdin:LR,allowedNodeEnvironmentFlags:CR,assert:BR,features:UR,_fatalExceptions:kR,setUncaughtExceptionCaptureCallback:MR,hasUncaughtExceptionCaptureCallback:xR,emitWarning:pR,nextTick:nR,_tickCallback:qR,_debugProcess:VR,_debugEnd:jR,_startProfilerIdleNotifier:KR,_stopProfilerIdleNotifier:GR,stdout:$R,stdin:YR,stderr:QR,abort:JR,umask:mR,chdir:TR,cwd:NR,env:oR,title:iR,argv:uR,execArgv:cR,pid:HR,ppid:zR,execPath:WR,debugPort:XR,hrtime:Nm,argv0:ZR,_preload_modules:eP,setSourceMapsEnabled:tP}});var N=ku(()=>{"use strict";TP()});function BJ(){if(EP)return Dd;EP=!0,Dd.byteLength=c,Dd.toByteArray=d,Dd.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 k=v.indexOf("=");k===-1&&(k=F);var K=k===F?0:4-k%4;return[k,K]}function c(v){var F=o(v),k=F[0],K=F[1];return(k+K)*3/4-K}function l(v,F,k){return(F+k)*3/4-k}function d(v){var F,k=o(v),K=k[0],J=k[1],se=new n(l(v,K,J)),ie=0,Te=J>0?K-4:K,de;for(de=0;de>16&255,se[ie++]=F>>8&255,se[ie++]=F&255;return J===2&&(F=t[v.charCodeAt(de)]<<2|t[v.charCodeAt(de+1)]>>4,se[ie++]=F&255),J===1&&(F=t[v.charCodeAt(de)]<<10|t[v.charCodeAt(de+1)]<<4|t[v.charCodeAt(de+2)]>>2,se[ie++]=F>>8&255,se[ie++]=F&255),se}function f(v){return e[v>>18&63]+e[v>>12&63]+e[v>>6&63]+e[v&63]}function y(v,F,k){for(var K,J=[],se=F;seTe?Te:ie+se));return K===1?(F=v[k-1],J.push(e[F>>2]+e[F<<4&63]+"==")):K===2&&(F=(v[k-2]<<8)+v[k-1],J.push(e[F>>10]+e[F>>4&63]+e[F<<2&63]+"=")),J.join("")}return Dd}function UJ(){if(hP)return Em;hP=!0;return Em.read=function(e,t,n,r,i){var a,o,c=i*8-r-1,l=(1<>1,f=-7,y=n?i-1:0,I=n?-1:1,v=e[t+y];for(y+=I,a=v&(1<<-f)-1,v>>=-f,f+=c;f>0;a=a*256+e[t+y],y+=I,f-=8);for(o=a&(1<<-f)-1,a>>=-f,f+=r;f>0;o=o*256+e[t+y],y+=I,f-=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)},Em.write=function(e,t,n,r,i,a){var o,c,l,d=a*8-i-1,f=(1<>1,I=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:a-1,F=r?1:-1,k=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=f):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+y>=1?t+=I/l:t+=I*Math.pow(2,1-y),t*l>=2&&(o++,l/=2),o+y>=f?(c=0,o=f):o+y>=1?(c=(t*l-1)*Math.pow(2,i),o=o+y):(c=t*Math.pow(2,y-1)*Math.pow(2,i),o=0));i>=8;e[n+v]=c&255,v+=F,c/=256,i-=8);for(o=o<0;e[n+v]=o&255,v+=F,o/=256,d-=8);e[n+v-F]|=k*128},Em}function kJ(){if(yP)return xu;yP=!0;let e=BJ(),t=UJ(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;xu.Buffer=o,xu.SlowBuffer=J,xu.INSPECT_MAX_BYTES=50;let r=2147483647;xu.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 R=new Uint8Array(1),h={foo:function(){return 42}};return Object.setPrototypeOf(h,Uint8Array.prototype),Object.setPrototypeOf(R,h),R.foo()===42}catch(R){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(R){if(R>r)throw new RangeError('The value "'+R+'" is invalid for option "size"');let h=new Uint8Array(R);return Object.setPrototypeOf(h,o.prototype),h}function o(R,h,g){if(typeof R=="number"){if(typeof h=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(R)}return c(R,h,g)}o.poolSize=8192;function c(R,h,g){if(typeof R=="string")return y(R,h);if(ArrayBuffer.isView(R))return v(R);if(R==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof R);if(Vt(R,ArrayBuffer)||R&&Vt(R.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Vt(R,SharedArrayBuffer)||R&&Vt(R.buffer,SharedArrayBuffer)))return F(R,h,g);if(typeof R=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let C=R.valueOf&&R.valueOf();if(C!=null&&C!==R)return o.from(C,h,g);let G=k(R);if(G)return G;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof R[Symbol.toPrimitive]=="function")return o.from(R[Symbol.toPrimitive]("string"),h,g);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof R)}o.from=function(R,h,g){return c(R,h,g)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function l(R){if(typeof R!="number")throw new TypeError('"size" argument must be of type number');if(R<0)throw new RangeError('The value "'+R+'" is invalid for option "size"')}function d(R,h,g){return l(R),R<=0?a(R):h!==void 0?typeof g=="string"?a(R).fill(h,g):a(R).fill(h):a(R)}o.alloc=function(R,h,g){return d(R,h,g)};function f(R){return l(R),a(R<0?0:K(R)|0)}o.allocUnsafe=function(R){return f(R)},o.allocUnsafeSlow=function(R){return f(R)};function y(R,h){if((typeof h!="string"||h==="")&&(h="utf8"),!o.isEncoding(h))throw new TypeError("Unknown encoding: "+h);let g=se(R,h)|0,C=a(g),G=C.write(R,h);return G!==g&&(C=C.slice(0,G)),C}function I(R){let h=R.length<0?0:K(R.length)|0,g=a(h);for(let C=0;C=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return R|0}function J(R){return+R!=R&&(R=0),o.alloc(+R)}o.isBuffer=function(h){return h!=null&&h._isBuffer===!0&&h!==o.prototype},o.compare=function(h,g){if(Vt(h,Uint8Array)&&(h=o.from(h,h.offset,h.byteLength)),Vt(g,Uint8Array)&&(g=o.from(g,g.offset,g.byteLength)),!o.isBuffer(h)||!o.isBuffer(g))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(h===g)return 0;let C=h.length,G=g.length;for(let te=0,pe=Math.min(C,G);teG.length?(o.isBuffer(pe)||(pe=o.from(pe)),pe.copy(G,te)):Uint8Array.prototype.set.call(G,pe,te);else if(o.isBuffer(pe))pe.copy(G,te);else throw new TypeError('"list" argument must be an Array of Buffers');te+=pe.length}return G};function se(R,h){if(o.isBuffer(R))return R.length;if(ArrayBuffer.isView(R)||Vt(R,ArrayBuffer))return R.byteLength;if(typeof R!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof R);let g=R.length,C=arguments.length>2&&arguments[2]===!0;if(!C&&g===0)return 0;let G=!1;for(;;)switch(h){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":return rs(R).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return mr(R).length;default:if(G)return C?-1:rs(R).length;h=(""+h).toLowerCase(),G=!0}}o.byteLength=se;function ie(R,h,g){let C=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,h>>>=0,g<=h))return"";for(R||(R="utf8");;)switch(R){case"hex":return Fr(this,h,g);case"utf8":case"utf-8":return tn(this,h,g);case"ascii":return mn(this,h,g);case"latin1":case"binary":return Pr(this,h,g);case"base64":return en(this,h,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return kn(this,h,g);default:if(C)throw new TypeError("Unknown encoding: "+R);R=(R+"").toLowerCase(),C=!0}}o.prototype._isBuffer=!0;function Te(R,h,g){let C=R[h];R[h]=R[g],R[g]=C}o.prototype.swap16=function(){let h=this.length;if(h%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let g=0;gg&&(h+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(h,g,C,G,te){if(Vt(h,Uint8Array)&&(h=o.from(h,h.offset,h.byteLength)),!o.isBuffer(h))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof h);if(g===void 0&&(g=0),C===void 0&&(C=h?h.length:0),G===void 0&&(G=0),te===void 0&&(te=this.length),g<0||C>h.length||G<0||te>this.length)throw new RangeError("out of range index");if(G>=te&&g>=C)return 0;if(G>=te)return-1;if(g>=C)return 1;if(g>>>=0,C>>>=0,G>>>=0,te>>>=0,this===h)return 0;let pe=te-G,ft=C-g,Nn=Math.min(pe,ft),on=this.slice(G,te),yn=h.slice(g,C);for(let nn=0;nn2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,Nr(g)&&(g=G?0:R.length-1),g<0&&(g=R.length+g),g>=R.length){if(G)return-1;g=R.length-1}else if(g<0)if(G)g=0;else return-1;if(typeof h=="string"&&(h=o.from(h,C)),o.isBuffer(h))return h.length===0?-1:Re(R,h,g,C,G);if(typeof h=="number")return h=h&255,typeof Uint8Array.prototype.indexOf=="function"?G?Uint8Array.prototype.indexOf.call(R,h,g):Uint8Array.prototype.lastIndexOf.call(R,h,g):Re(R,[h],g,C,G);throw new TypeError("val must be string, number or Buffer")}function Re(R,h,g,C,G){let te=1,pe=R.length,ft=h.length;if(C!==void 0&&(C=String(C).toLowerCase(),C==="ucs2"||C==="ucs-2"||C==="utf16le"||C==="utf-16le")){if(R.length<2||h.length<2)return-1;te=2,pe/=2,ft/=2,g/=2}function Nn(yn,nn){return te===1?yn[nn]:yn.readUInt16BE(nn*te)}let on;if(G){let yn=-1;for(on=g;onpe&&(g=pe-ft),on=g;on>=0;on--){let yn=!0;for(let nn=0;nnG&&(C=G)):C=G;let te=h.length;C>te/2&&(C=te/2);let pe;for(pe=0;pe>>0,isFinite(C)?(C=C>>>0,G===void 0&&(G="utf8")):(G=C,C=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let te=this.length-g;if((C===void 0||C>te)&&(C=te),h.length>0&&(C<0||g<0)||g>this.length)throw new RangeError("Attempt to write outside buffer bounds");G||(G="utf8");let pe=!1;for(;;)switch(G){case"hex":return xe(this,h,g,C);case"utf8":case"utf-8":return tt(this,h,g,C);case"ascii":case"latin1":case"binary":return ee(this,h,g,C);case"base64":return Se(this,h,g,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _t(this,h,g,C);default:if(pe)throw new TypeError("Unknown encoding: "+G);G=(""+G).toLowerCase(),pe=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function en(R,h,g){return h===0&&g===R.length?e.fromByteArray(R):e.fromByteArray(R.slice(h,g))}function tn(R,h,g){g=Math.min(R.length,g);let C=[],G=h;for(;G239?4:te>223?3:te>191?2:1;if(G+ft<=g){let Nn,on,yn,nn;switch(ft){case 1:te<128&&(pe=te);break;case 2:Nn=R[G+1],(Nn&192)===128&&(nn=(te&31)<<6|Nn&63,nn>127&&(pe=nn));break;case 3:Nn=R[G+1],on=R[G+2],(Nn&192)===128&&(on&192)===128&&(nn=(te&15)<<12|(Nn&63)<<6|on&63,nn>2047&&(nn<55296||nn>57343)&&(pe=nn));break;case 4:Nn=R[G+1],on=R[G+2],yn=R[G+3],(Nn&192)===128&&(on&192)===128&&(yn&192)===128&&(nn=(te&15)<<18|(Nn&63)<<12|(on&63)<<6|yn&63,nn>65535&&nn<1114112&&(pe=nn))}}pe===null?(pe=65533,ft=1):pe>65535&&(pe-=65536,C.push(pe>>>10&1023|55296),pe=56320|pe&1023),C.push(pe),G+=ft}return Qt(C)}let bn=4096;function Qt(R){let h=R.length;if(h<=bn)return String.fromCharCode.apply(String,R);let g="",C=0;for(;CC)&&(g=C);let G="";for(let te=h;teC&&(h=C),g<0?(g+=C,g<0&&(g=0)):g>C&&(g=C),gg)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(h,g,C){h=h>>>0,g=g>>>0,C||zt(h,g,this.length);let G=this[h],te=1,pe=0;for(;++pe>>0,g=g>>>0,C||zt(h,g,this.length);let G=this[h+--g],te=1;for(;g>0&&(te*=256);)G+=this[h+--g]*te;return G},o.prototype.readUint8=o.prototype.readUInt8=function(h,g){return h=h>>>0,g||zt(h,1,this.length),this[h]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(h,g){return h=h>>>0,g||zt(h,2,this.length),this[h]|this[h+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(h,g){return h=h>>>0,g||zt(h,2,this.length),this[h]<<8|this[h+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),(this[h]|this[h+1]<<8|this[h+2]<<16)+this[h+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),this[h]*16777216+(this[h+1]<<16|this[h+2]<<8|this[h+3])},o.prototype.readBigUInt64LE=_a(function(h){h=h>>>0,nt(h,"offset");let g=this[h],C=this[h+7];(g===void 0||C===void 0)&&Rt(h,this.length-8);let G=g+this[++h]*un(2,8)+this[++h]*un(2,16)+this[++h]*un(2,24),te=this[++h]+this[++h]*un(2,8)+this[++h]*un(2,16)+C*un(2,24);return BigInt(G)+(BigInt(te)<>>0,nt(h,"offset");let g=this[h],C=this[h+7];(g===void 0||C===void 0)&&Rt(h,this.length-8);let G=g*un(2,24)+this[++h]*un(2,16)+this[++h]*un(2,8)+this[++h],te=this[++h]*un(2,24)+this[++h]*un(2,16)+this[++h]*un(2,8)+C;return(BigInt(G)<>>0,g=g>>>0,C||zt(h,g,this.length);let G=this[h],te=1,pe=0;for(;++pe=te&&(G-=Math.pow(2,8*g)),G},o.prototype.readIntBE=function(h,g,C){h=h>>>0,g=g>>>0,C||zt(h,g,this.length);let G=g,te=1,pe=this[h+--G];for(;G>0&&(te*=256);)pe+=this[h+--G]*te;return te*=128,pe>=te&&(pe-=Math.pow(2,8*g)),pe},o.prototype.readInt8=function(h,g){return h=h>>>0,g||zt(h,1,this.length),this[h]&128?(255-this[h]+1)*-1:this[h]},o.prototype.readInt16LE=function(h,g){h=h>>>0,g||zt(h,2,this.length);let C=this[h]|this[h+1]<<8;return C&32768?C|4294901760:C},o.prototype.readInt16BE=function(h,g){h=h>>>0,g||zt(h,2,this.length);let C=this[h+1]|this[h]<<8;return C&32768?C|4294901760:C},o.prototype.readInt32LE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24},o.prototype.readInt32BE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]},o.prototype.readBigInt64LE=_a(function(h){h=h>>>0,nt(h,"offset");let g=this[h],C=this[h+7];(g===void 0||C===void 0)&&Rt(h,this.length-8);let G=this[h+4]+this[h+5]*un(2,8)+this[h+6]*un(2,16)+(C<<24);return(BigInt(G)<>>0,nt(h,"offset");let g=this[h],C=this[h+7];(g===void 0||C===void 0)&&Rt(h,this.length-8);let G=(g<<24)+this[++h]*un(2,16)+this[++h]*un(2,8)+this[++h];return(BigInt(G)<>>0,g||zt(h,4,this.length),t.read(this,h,!0,23,4)},o.prototype.readFloatBE=function(h,g){return h=h>>>0,g||zt(h,4,this.length),t.read(this,h,!1,23,4)},o.prototype.readDoubleLE=function(h,g){return h=h>>>0,g||zt(h,8,this.length),t.read(this,h,!0,52,8)},o.prototype.readDoubleBE=function(h,g){return h=h>>>0,g||zt(h,8,this.length),t.read(this,h,!1,52,8)};function An(R,h,g,C,G,te){if(!o.isBuffer(R))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>G||hR.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(h,g,C,G){if(h=+h,g=g>>>0,C=C>>>0,!G){let ft=Math.pow(2,8*C)-1;An(this,h,g,C,ft,0)}let te=1,pe=0;for(this[g]=h&255;++pe>>0,C=C>>>0,!G){let ft=Math.pow(2,8*C)-1;An(this,h,g,C,ft,0)}let te=C-1,pe=1;for(this[g+te]=h&255;--te>=0&&(pe*=256);)this[g+te]=h/pe&255;return g+C},o.prototype.writeUint8=o.prototype.writeUInt8=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,1,255,0),this[g]=h&255,g+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,2,65535,0),this[g]=h&255,this[g+1]=h>>>8,g+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,2,65535,0),this[g]=h>>>8,this[g+1]=h&255,g+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,4,4294967295,0),this[g+3]=h>>>24,this[g+2]=h>>>16,this[g+1]=h>>>8,this[g]=h&255,g+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,4,4294967295,0),this[g]=h>>>24,this[g+1]=h>>>16,this[g+2]=h>>>8,this[g+3]=h&255,g+4};function ue(R,h,g,C,G){Ut(h,C,G,R,g,7);let te=Number(h&BigInt(4294967295));R[g++]=te,te=te>>8,R[g++]=te,te=te>>8,R[g++]=te,te=te>>8,R[g++]=te;let pe=Number(h>>BigInt(32)&BigInt(4294967295));return R[g++]=pe,pe=pe>>8,R[g++]=pe,pe=pe>>8,R[g++]=pe,pe=pe>>8,R[g++]=pe,g}function De(R,h,g,C,G){Ut(h,C,G,R,g,7);let te=Number(h&BigInt(4294967295));R[g+7]=te,te=te>>8,R[g+6]=te,te=te>>8,R[g+5]=te,te=te>>8,R[g+4]=te;let pe=Number(h>>BigInt(32)&BigInt(4294967295));return R[g+3]=pe,pe=pe>>8,R[g+2]=pe,pe=pe>>8,R[g+1]=pe,pe=pe>>8,R[g]=pe,g+8}o.prototype.writeBigUInt64LE=_a(function(h,g=0){return ue(this,h,g,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=_a(function(h,g=0){return De(this,h,g,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(h,g,C,G){if(h=+h,g=g>>>0,!G){let Nn=Math.pow(2,8*C-1);An(this,h,g,C,Nn-1,-Nn)}let te=0,pe=1,ft=0;for(this[g]=h&255;++te>0)-ft&255;return g+C},o.prototype.writeIntBE=function(h,g,C,G){if(h=+h,g=g>>>0,!G){let Nn=Math.pow(2,8*C-1);An(this,h,g,C,Nn-1,-Nn)}let te=C-1,pe=1,ft=0;for(this[g+te]=h&255;--te>=0&&(pe*=256);)h<0&&ft===0&&this[g+te+1]!==0&&(ft=1),this[g+te]=(h/pe>>0)-ft&255;return g+C},o.prototype.writeInt8=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,1,127,-128),h<0&&(h=255+h+1),this[g]=h&255,g+1},o.prototype.writeInt16LE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,2,32767,-32768),this[g]=h&255,this[g+1]=h>>>8,g+2},o.prototype.writeInt16BE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,2,32767,-32768),this[g]=h>>>8,this[g+1]=h&255,g+2},o.prototype.writeInt32LE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,4,2147483647,-2147483648),this[g]=h&255,this[g+1]=h>>>8,this[g+2]=h>>>16,this[g+3]=h>>>24,g+4},o.prototype.writeInt32BE=function(h,g,C){return h=+h,g=g>>>0,C||An(this,h,g,4,2147483647,-2147483648),h<0&&(h=4294967295+h+1),this[g]=h>>>24,this[g+1]=h>>>16,this[g+2]=h>>>8,this[g+3]=h&255,g+4},o.prototype.writeBigInt64LE=_a(function(h,g=0){return ue(this,h,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=_a(function(h,g=0){return De(this,h,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ve(R,h,g,C,G,te){if(g+C>R.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function Ce(R,h,g,C,G){return h=+h,g=g>>>0,G||ve(R,h,g,4),t.write(R,h,g,C,23,4),g+4}o.prototype.writeFloatLE=function(h,g,C){return Ce(this,h,g,!0,C)},o.prototype.writeFloatBE=function(h,g,C){return Ce(this,h,g,!1,C)};function vt(R,h,g,C,G){return h=+h,g=g>>>0,G||ve(R,h,g,8),t.write(R,h,g,C,52,8),g+8}o.prototype.writeDoubleLE=function(h,g,C){return vt(this,h,g,!0,C)},o.prototype.writeDoubleBE=function(h,g,C){return vt(this,h,g,!1,C)},o.prototype.copy=function(h,g,C,G){if(!o.isBuffer(h))throw new TypeError("argument should be a Buffer");if(C||(C=0),!G&&G!==0&&(G=this.length),g>=h.length&&(g=h.length),g||(g=0),G>0&&G=this.length)throw new RangeError("Index out of range");if(G<0)throw new RangeError("sourceEnd out of bounds");G>this.length&&(G=this.length),h.length-g>>0,C=C===void 0?this.length:C>>>0,h||(h=0);let te;if(typeof h=="number")for(te=g;teun(2,32)?G=qe(String(g)):typeof g=="bigint"&&(G=String(g),(g>un(BigInt(2),BigInt(32))||g<-un(BigInt(2),BigInt(32)))&&(G=qe(G)),G+="n"),C+=` It must be ${h}. Received ${G}`,C},RangeError);function qe(R){let h="",g=R.length,C=R[0]==="-"?1:0;for(;g>=C+4;g-=3)h=`_${R.slice(g-3,g)}${h}`;return`${R.slice(0,g)}${h}`}function Ye(R,h,g){nt(h,"offset"),(R[h]===void 0||R[h+g]===void 0)&&Rt(h,R.length-(g+1))}function Ut(R,h,g,C,G,te){if(R>g||R3?h===0||h===BigInt(0)?ft=`>= 0${pe} and < 2${pe} ** ${(te+1)*8}${pe}`:ft=`>= -(2${pe} ** ${(te+1)*8-1}${pe}) and < 2 ** ${(te+1)*8-1}${pe}`:ft=`>= ${h}${pe} and <= ${g}${pe}`,new Y.ERR_OUT_OF_RANGE("value",ft,R)}Ye(C,G,te)}function nt(R,h){if(typeof R!="number")throw new Y.ERR_INVALID_ARG_TYPE(h,"number",R)}function Rt(R,h,g){throw Math.floor(R)!==R?(nt(R,g),new Y.ERR_OUT_OF_RANGE(g||"offset","an integer",R)):h<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(g||"offset",`>= ${g?1:0} and <= ${h}`,R)}let ns=/[^+/0-9A-Za-z-_]/g;function Vr(R){if(R=R.split("=")[0],R=R.trim().replace(ns,""),R.length<2)return"";for(;R.length%4!==0;)R=R+"=";return R}function rs(R,h){h=h||1/0;let g,C=R.length,G=null,te=[];for(let pe=0;pe55295&&g<57344){if(!G){if(g>56319){(h-=3)>-1&&te.push(239,191,189);continue}else if(pe+1===C){(h-=3)>-1&&te.push(239,191,189);continue}G=g;continue}if(g<56320){(h-=3)>-1&&te.push(239,191,189),G=g;continue}g=(G-55296<<10|g-56320)+65536}else G&&(h-=3)>-1&&te.push(239,191,189);if(G=null,g<128){if((h-=1)<0)break;te.push(g)}else if(g<2048){if((h-=2)<0)break;te.push(g>>6|192,g&63|128)}else if(g<65536){if((h-=3)<0)break;te.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((h-=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 xc(R){let h=[];for(let g=0;g>8,G=g%256,te.push(G),te.push(C);return te}function mr(R){return e.toByteArray(Vr(R))}function ni(R,h,g,C){let G;for(G=0;G=h.length||G>=R.length);++G)h[G+g]=R[G];return G}function Vt(R,h){return R instanceof h||R!=null&&R.constructor!=null&&R.constructor.name!=null&&R.constructor.name===h.name}function Nr(R){return R!==R}let Du=function(){let R="0123456789abcdef",h=new Array(256);for(let g=0;g<16;++g){let C=g*16;for(let G=0;G<16;++G)h[C+G]=R[g]+R[G]}return h}();function _a(R){return typeof BigInt=="undefined"?bu:R}function bu(){throw new Error("BigInt not supported")}return xu}var Dd,EP,Em,hP,xu,yP,qu,D,Tpe,Epe,IP=ku(()=>{"use strict";m();T();N();Dd={},EP=!1;Em={},hP=!1;xu={},yP=!1;qu=kJ();qu.Buffer;qu.SlowBuffer;qu.INSPECT_MAX_BYTES;qu.kMaxLength;D=qu.Buffer,Tpe=qu.INSPECT_MAX_BYTES,Epe=qu.kMaxLength});var T=ku(()=>{"use strict";IP()});var gP=w(el=>{"use strict";m();T();N();Object.defineProperty(el,"__esModule",{value:!0});el.versionInfo=el.version=void 0;var MJ="16.9.0";el.version=MJ;var xJ=Object.freeze({major:16,minor:9,patch:0,preReleaseTag:null});el.versionInfo=xJ});var Br=w(xy=>{"use strict";m();T();N();Object.defineProperty(xy,"__esModule",{value:!0});xy.devAssert=qJ;function qJ(e,t){if(!!!e)throw new Error(t)}});var hm=w(qy=>{"use strict";m();T();N();Object.defineProperty(qy,"__esModule",{value:!0});qy.isPromise=VJ;function VJ(e){return typeof(e==null?void 0:e.then)=="function"}});var Da=w(Vy=>{"use strict";m();T();N();Object.defineProperty(Vy,"__esModule",{value:!0});Vy.isObjectLike=jJ;function jJ(e){return typeof e=="object"&&e!==null}});var Ir=w(jy=>{"use strict";m();T();N();Object.defineProperty(jy,"__esModule",{value:!0});jy.invariant=KJ;function KJ(e,t){if(!!!e)throw new Error(t!=null?t:"Unexpected invariant triggered.")}});var ym=w(Ky=>{"use strict";m();T();N();Object.defineProperty(Ky,"__esModule",{value:!0});Ky.getLocation=QJ;var GJ=Ir(),$J=/\r\n|[\n\r]/g;function QJ(e,t){let n=0,r=1;for(let i of e.body.matchAll($J)){if(typeof i.index=="number"||(0,GJ.invariant)(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}});var Gy=w(Im=>{"use strict";m();T();N();Object.defineProperty(Im,"__esModule",{value:!0});Im.printLocation=JJ;Im.printSourceLocation=vP;var YJ=ym();function JJ(e){return vP(e.source,(0,YJ.getLocation)(e.source,e.start))}function vP(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} `,f=r.split(/\r\n|[\n\r]/g),y=f[i];if(y.length>120){let I=Math.floor(l/80),v=l%80,F=[];for(let k=0;k["|",k]),["|","^".padStart(v)],["|",F[I+1]]])}return d+_P([[`${o-1} |`,f[i-1]],[`${o} |`,y],["|","^".padStart(l)],[`${o+1} |`,f[i+1]]])}function _P(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(el=>{"use strict";m();T();N();Object.defineProperty(el,"__esModule",{value:!0});el.GraphQLError=void 0;el.formatError=XJ;el.printError=WJ;var HJ=Da(),SP=ym(),OP=Gy();function zJ(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 $y=class e extends Error{constructor(t,...n){var r,i,a;let{nodes:o,source:c,positions:l,path:d,originalError:f,extensions:y}=zJ(n);super(t),this.name="GraphQLError",this.path=d!=null?d:void 0,this.originalError=f!=null?f:void 0,this.nodes=DP(Array.isArray(o)?o:o?[o]:void 0);let I=DP((r=this.nodes)===null||r===void 0?void 0:r.map(F=>F.loc).filter(F=>F!=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(F=>F.start),this.locations=l&&c?l.map(F=>(0,SP.getLocation)(c,F)):I==null?void 0:I.map(F=>(0,SP.getLocation)(F.source,F.start));let v=(0,HJ.isObjectLike)(f==null?void 0:f.extensions)?f==null?void 0:f.extensions:void 0;this.extensions=(a=y!=null?y: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}}),f!=null&&f.stack?Object.defineProperty(this,"stack",{value:f.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+=` +`)}});var ze=w(tl=>{"use strict";m();T();N();Object.defineProperty(tl,"__esModule",{value:!0});tl.GraphQLError=void 0;tl.formatError=XJ;tl.printError=WJ;var HJ=Da(),SP=ym(),OP=Gy();function zJ(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 $y=class e extends Error{constructor(t,...n){var r,i,a;let{nodes:o,source:c,positions:l,path:d,originalError:f,extensions:y}=zJ(n);super(t),this.name="GraphQLError",this.path=d!=null?d:void 0,this.originalError=f!=null?f:void 0,this.nodes=DP(Array.isArray(o)?o:o?[o]:void 0);let I=DP((r=this.nodes)===null||r===void 0?void 0:r.map(F=>F.loc).filter(F=>F!=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(F=>F.start),this.locations=l&&c?l.map(F=>(0,SP.getLocation)(c,F)):I==null?void 0:I.map(F=>(0,SP.getLocation)(F.source,F.start));let v=(0,HJ.isObjectLike)(f==null?void 0:f.extensions)?f==null?void 0:f.extensions:void 0;this.extensions=(a=y!=null?y: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}}),f!=null&&f.stack?Object.defineProperty(this,"stack",{value:f.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,OP.printLocation)(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` -`+(0,OP.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}};el.GraphQLError=$y;function DP(e){return e===void 0||e.length===0?void 0:e}function WJ(e){return e.toString()}function XJ(e){return e.toJSON()}});var gm=w(Qy=>{"use strict";m();T();N();Object.defineProperty(Qy,"__esModule",{value:!0});Qy.syntaxError=eH;var ZJ=ze();function eH(e,t,n){return new ZJ.GraphQLError(`Syntax Error: ${n}`,{source:e,positions:[t]})}});var ba=w(bi=>{"use strict";m();T();N();Object.defineProperty(bi,"__esModule",{value:!0});bi.Token=bi.QueryDocumentKeys=bi.OperationTypeNode=bi.Location=void 0;bi.isNode=nH;var Yy=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}}};bi.Location=Yy;var Jy=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}}};bi.Token=Jy;var bP={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"]};bi.QueryDocumentKeys=bP;var tH=new Set(Object.keys(bP));function nH(e){let t=e==null?void 0:e.kind;return typeof t=="string"&&tH.has(t)}var Hy;bi.OperationTypeNode=Hy;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(Hy||(bi.OperationTypeNode=Hy={}))});var tl=w(bd=>{"use strict";m();T();N();Object.defineProperty(bd,"__esModule",{value:!0});bd.DirectiveLocation=void 0;var zy;bd.DirectiveLocation=zy;(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"})(zy||(bd.DirectiveLocation=zy={}))});var Ft=w(Ad=>{"use strict";m();T();N();Object.defineProperty(Ad,"__esModule",{value:!0});Ad.Kind=void 0;var Wy;Ad.Kind=Wy;(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"})(Wy||(Ad.Kind=Wy={}))});var _m=w(Vu=>{"use strict";m();T();N();Object.defineProperty(Vu,"__esModule",{value:!0});Vu.isDigit=AP;Vu.isLetter=Xy;Vu.isNameContinue=aH;Vu.isNameStart=iH;Vu.isWhiteSpace=rH;function rH(e){return e===9||e===32}function AP(e){return e>=48&&e<=57}function Xy(e){return e>=97&&e<=122||e>=65&&e<=90}function iH(e){return Xy(e)||e===95}function aH(e){return Xy(e)||AP(e)||e===95}});var Pd=w(Rd=>{"use strict";m();T();N();Object.defineProperty(Rd,"__esModule",{value:!0});Rd.dedentBlockStringLines=sH;Rd.isPrintableAsBlockString=uH;Rd.printBlockString=cH;var Zy=_m();function sH(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 oH(e){let t=0;for(;t1&&r.slice(1).every(v=>v.length===0||(0,Zy.isWhiteSpace)(v.charCodeAt(0))),o=n.endsWith('\\"""'),c=e.endsWith('"')&&!o,l=e.endsWith("\\"),d=c||l,f=!(t!=null&&t.minimize)&&(!i||e.length>70||d||a||o),y="",I=i&&(0,Zy.isWhiteSpace)(e.charCodeAt(0));return(f&&!I||a)&&(y+=` +`+(0,OP.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}};tl.GraphQLError=$y;function DP(e){return e===void 0||e.length===0?void 0:e}function WJ(e){return e.toString()}function XJ(e){return e.toJSON()}});var gm=w(Qy=>{"use strict";m();T();N();Object.defineProperty(Qy,"__esModule",{value:!0});Qy.syntaxError=eH;var ZJ=ze();function eH(e,t,n){return new ZJ.GraphQLError(`Syntax Error: ${n}`,{source:e,positions:[t]})}});var ba=w(bi=>{"use strict";m();T();N();Object.defineProperty(bi,"__esModule",{value:!0});bi.Token=bi.QueryDocumentKeys=bi.OperationTypeNode=bi.Location=void 0;bi.isNode=nH;var Yy=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}}};bi.Location=Yy;var Jy=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}}};bi.Token=Jy;var bP={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"]};bi.QueryDocumentKeys=bP;var tH=new Set(Object.keys(bP));function nH(e){let t=e==null?void 0:e.kind;return typeof t=="string"&&tH.has(t)}var Hy;bi.OperationTypeNode=Hy;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(Hy||(bi.OperationTypeNode=Hy={}))});var nl=w(bd=>{"use strict";m();T();N();Object.defineProperty(bd,"__esModule",{value:!0});bd.DirectiveLocation=void 0;var zy;bd.DirectiveLocation=zy;(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"})(zy||(bd.DirectiveLocation=zy={}))});var Ft=w(Ad=>{"use strict";m();T();N();Object.defineProperty(Ad,"__esModule",{value:!0});Ad.Kind=void 0;var Wy;Ad.Kind=Wy;(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"})(Wy||(Ad.Kind=Wy={}))});var _m=w(Vu=>{"use strict";m();T();N();Object.defineProperty(Vu,"__esModule",{value:!0});Vu.isDigit=AP;Vu.isLetter=Xy;Vu.isNameContinue=aH;Vu.isNameStart=iH;Vu.isWhiteSpace=rH;function rH(e){return e===9||e===32}function AP(e){return e>=48&&e<=57}function Xy(e){return e>=97&&e<=122||e>=65&&e<=90}function iH(e){return Xy(e)||e===95}function aH(e){return Xy(e)||AP(e)||e===95}});var Pd=w(Rd=>{"use strict";m();T();N();Object.defineProperty(Rd,"__esModule",{value:!0});Rd.dedentBlockStringLines=sH;Rd.isPrintableAsBlockString=uH;Rd.printBlockString=cH;var Zy=_m();function sH(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 oH(e){let t=0;for(;t1&&r.slice(1).every(v=>v.length===0||(0,Zy.isWhiteSpace)(v.charCodeAt(0))),o=n.endsWith('\\"""'),c=e.endsWith('"')&&!o,l=e.endsWith("\\"),d=c||l,f=!(t!=null&&t.minimize)&&(!i||e.length>70||d||a||o),y="",I=i&&(0,Zy.isWhiteSpace)(e.charCodeAt(0));return(f&&!I||a)&&(y+=` `),y+=n,(f||d)&&(y+=` -`),'"""'+y+'"""'}});var wd=w(Fd=>{"use strict";m();T();N();Object.defineProperty(Fd,"__esModule",{value:!0});Fd.TokenKind=void 0;var eI;Fd.TokenKind=eI;(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"})(eI||(Fd.TokenKind=eI={}))});var Sm=w(Cd=>{"use strict";m();T();N();Object.defineProperty(Cd,"__esModule",{value:!0});Cd.Lexer=void 0;Cd.isPunctuatorTokenKind=dH;var ea=gm(),PP=ba(),lH=Pd(),ju=_m(),gt=wd(),nI=class{constructor(t){let n=new PP.Token(gt.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!==gt.TokenKind.EOF)do if(t.next)t=t.next;else{let n=pH(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===gt.TokenKind.COMMENT);return t}};Cd.Lexer=nI;function dH(e){return e===gt.TokenKind.BANG||e===gt.TokenKind.DOLLAR||e===gt.TokenKind.AMP||e===gt.TokenKind.PAREN_L||e===gt.TokenKind.PAREN_R||e===gt.TokenKind.SPREAD||e===gt.TokenKind.COLON||e===gt.TokenKind.EQUALS||e===gt.TokenKind.AT||e===gt.TokenKind.BRACKET_L||e===gt.TokenKind.BRACKET_R||e===gt.TokenKind.BRACE_L||e===gt.TokenKind.PIPE||e===gt.TokenKind.BRACE_R}function nl(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function vm(e,t){return FP(e.charCodeAt(t))&&wP(e.charCodeAt(t+1))}function FP(e){return e>=55296&&e<=56319}function wP(e){return e>=56320&&e<=57343}function Ku(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return gt.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 $n(e,t,n,r,i){let a=e.line,o=1+n-e.lineStart;return new PP.Token(t,n,r,a,o,i)}function pH(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 hH(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:` +`),'"""'+y+'"""'}});var wd=w(Fd=>{"use strict";m();T();N();Object.defineProperty(Fd,"__esModule",{value:!0});Fd.TokenKind=void 0;var eI;Fd.TokenKind=eI;(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"})(eI||(Fd.TokenKind=eI={}))});var Sm=w(Cd=>{"use strict";m();T();N();Object.defineProperty(Cd,"__esModule",{value:!0});Cd.Lexer=void 0;Cd.isPunctuatorTokenKind=dH;var ea=gm(),PP=ba(),lH=Pd(),ju=_m(),gt=wd(),nI=class{constructor(t){let n=new PP.Token(gt.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!==gt.TokenKind.EOF)do if(t.next)t=t.next;else{let n=pH(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===gt.TokenKind.COMMENT);return t}};Cd.Lexer=nI;function dH(e){return e===gt.TokenKind.BANG||e===gt.TokenKind.DOLLAR||e===gt.TokenKind.AMP||e===gt.TokenKind.PAREN_L||e===gt.TokenKind.PAREN_R||e===gt.TokenKind.SPREAD||e===gt.TokenKind.COLON||e===gt.TokenKind.EQUALS||e===gt.TokenKind.AT||e===gt.TokenKind.BRACKET_L||e===gt.TokenKind.BRACKET_R||e===gt.TokenKind.BRACE_L||e===gt.TokenKind.PIPE||e===gt.TokenKind.BRACE_R}function rl(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function vm(e,t){return FP(e.charCodeAt(t))&&wP(e.charCodeAt(t+1))}function FP(e){return e>=55296&&e<=56319}function wP(e){return e>=56320&&e<=57343}function Ku(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return gt.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 $n(e,t,n,r,i){let a=e.line,o=1+n-e.lineStart;return new PP.Token(t,n,r,a,o,i)}function pH(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 hH(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,ea.syntaxError)(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function yH(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(rI,"__esModule",{value:!0});rI.inspect=_H;var gH=10,LP=2;function _H(e){return Om(e,[])}function Om(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return vH(e,t);default:return String(e)}}function vH(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(SH(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:Om(r,n)}else if(Array.isArray(e))return DH(e,n);return OH(e,n)}function SH(e){return typeof e.toJSON=="function"}function OH(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>LP?"["+bH(e)+"]":"{ "+n.map(([i,a])=>i+": "+Om(a,t)).join(", ")+" }"}function DH(e,t){if(e.length===0)return"[]";if(t.length>LP)return"[Array]";let n=Math.min(gH,e.length),r=e.length-n,i=[];for(let a=0;a1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function bH(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 Bd=w(Dm=>{"use strict";m();T();N();Object.defineProperty(Dm,"__esModule",{value:!0});Dm.instanceOf=void 0;var AH=Xt(),RH=globalThis.process&&O.env.NODE_ENV==="production",PH=RH?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,AH.inspect)(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm. +`));return e.line+=l.length-1,e.lineStart=i,f}if(d===92&&n.charCodeAt(a+1)===34&&n.charCodeAt(a+2)===34&&n.charCodeAt(a+3)===34){c+=n.slice(o,a),o=a+1,a+=4;continue}if(d===10||d===13){c+=n.slice(o,a),l.push(c),d===13&&n.charCodeAt(a+1)===10?a+=2:++a,c="",o=a,i=a;continue}if(rl(d))++a;else if(vm(n,a))a+=2;else throw(0,ea.syntaxError)(e.source,a,`Invalid character within String: ${Ku(e,a)}.`)}throw(0,ea.syntaxError)(e.source,a,"Unterminated string.")}function IH(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i{"use strict";m();T();N();Object.defineProperty(rI,"__esModule",{value:!0});rI.inspect=_H;var gH=10,LP=2;function _H(e){return Om(e,[])}function Om(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return vH(e,t);default:return String(e)}}function vH(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(SH(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:Om(r,n)}else if(Array.isArray(e))return DH(e,n);return OH(e,n)}function SH(e){return typeof e.toJSON=="function"}function OH(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>LP?"["+bH(e)+"]":"{ "+n.map(([i,a])=>i+": "+Om(a,t)).join(", ")+" }"}function DH(e,t){if(e.length===0)return"[]";if(t.length>LP)return"[Array]";let n=Math.min(gH,e.length),r=e.length-n,i=[];for(let a=0;a1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function bH(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 Bd=w(Dm=>{"use strict";m();T();N();Object.defineProperty(Dm,"__esModule",{value:!0});Dm.instanceOf=void 0;var AH=Xt(),RH=globalThis.process&&O.env.NODE_ENV==="production",PH=RH?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,AH.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,7 +36,7 @@ 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};Dm.instanceOf=PH});var Am=w(Ud=>{"use strict";m();T();N();Object.defineProperty(Ud,"__esModule",{value:!0});Ud.Source=void 0;Ud.isSource=LH;var iI=Br(),FH=Xt(),wH=Bd(),bm=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||(0,iI.devAssert)(!1,`Body must be a string. Received: ${(0,FH.inspect)(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||(0,iI.devAssert)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,iI.devAssert)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};Ud.Source=bm;function LH(e){return(0,wH.instanceOf)(e,bm)}});var rl=w(Zo=>{"use strict";m();T();N();Object.defineProperty(Zo,"__esModule",{value:!0});Zo.Parser=void 0;Zo.parse=BH;Zo.parseConstValue=kH;Zo.parseType=MH;Zo.parseValue=UH;var Gu=gm(),kd=ba(),CH=tl(),at=Ft(),BP=Sm(),CP=Am(),Oe=wd();function BH(e,t){return new $u(e,t).parseDocument()}function UH(e,t){let n=new $u(e,t);n.expectToken(Oe.TokenKind.SOF);let r=n.parseValueLiteral(!1);return n.expectToken(Oe.TokenKind.EOF),r}function kH(e,t){let n=new $u(e,t);n.expectToken(Oe.TokenKind.SOF);let r=n.parseConstValueLiteral();return n.expectToken(Oe.TokenKind.EOF),r}function MH(e,t){let n=new $u(e,t);n.expectToken(Oe.TokenKind.SOF);let r=n.parseTypeReference();return n.expectToken(Oe.TokenKind.EOF),r}var $u=class{constructor(t,n={}){let r=(0,CP.isSource)(t)?t:new CP.Source(t);this._lexer=new BP.Lexer(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(Oe.TokenKind.NAME);return this.node(t,{kind:at.Kind.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:at.Kind.DOCUMENT,definitions:this.many(Oe.TokenKind.SOF,this.parseDefinition,Oe.TokenKind.EOF)})}parseDefinition(){if(this.peek(Oe.TokenKind.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===Oe.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,Gu.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(Oe.TokenKind.BRACE_L))return this.node(t,{kind:at.Kind.OPERATION_DEFINITION,operation:kd.OperationTypeNode.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(Oe.TokenKind.NAME)&&(r=this.parseName()),this.node(t,{kind:at.Kind.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(Oe.TokenKind.NAME);switch(t.value){case"query":return kd.OperationTypeNode.QUERY;case"mutation":return kd.OperationTypeNode.MUTATION;case"subscription":return kd.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(Oe.TokenKind.PAREN_L,this.parseVariableDefinition,Oe.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:at.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Oe.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Oe.TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(Oe.TokenKind.DOLLAR),this.node(t,{kind:at.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:at.Kind.SELECTION_SET,selections:this.many(Oe.TokenKind.BRACE_L,this.parseSelection,Oe.TokenKind.BRACE_R)})}parseSelection(){return this.peek(Oe.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(Oe.TokenKind.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:at.Kind.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Oe.TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(Oe.TokenKind.PAREN_L,n,Oe.TokenKind.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(Oe.TokenKind.COLON),this.node(n,{kind:at.Kind.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(Oe.TokenKind.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(Oe.TokenKind.NAME)?this.node(t,{kind:at.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:at.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:at.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:at.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 Oe.TokenKind.BRACKET_L:return this.parseList(t);case Oe.TokenKind.BRACE_L:return this.parseObject(t);case Oe.TokenKind.INT:return this.advanceLexer(),this.node(n,{kind:at.Kind.INT,value:n.value});case Oe.TokenKind.FLOAT:return this.advanceLexer(),this.node(n,{kind:at.Kind.FLOAT,value:n.value});case Oe.TokenKind.STRING:case Oe.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case Oe.TokenKind.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:at.Kind.BOOLEAN,value:!0});case"false":return this.node(n,{kind:at.Kind.BOOLEAN,value:!1});case"null":return this.node(n,{kind:at.Kind.NULL});default:return this.node(n,{kind:at.Kind.ENUM,value:n.value})}case Oe.TokenKind.DOLLAR:if(t)if(this.expectToken(Oe.TokenKind.DOLLAR),this._lexer.token.kind===Oe.TokenKind.NAME){let r=this._lexer.token.value;throw(0,Gu.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:at.Kind.STRING,value:t.value,block:t.kind===Oe.TokenKind.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:at.Kind.LIST,values:this.any(Oe.TokenKind.BRACKET_L,n,Oe.TokenKind.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:at.Kind.OBJECT,fields:this.any(Oe.TokenKind.BRACE_L,n,Oe.TokenKind.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(Oe.TokenKind.COLON),this.node(n,{kind:at.Kind.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(Oe.TokenKind.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(Oe.TokenKind.AT),this.node(n,{kind:at.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(Oe.TokenKind.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(Oe.TokenKind.BRACKET_R),n=this.node(t,{kind:at.Kind.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(Oe.TokenKind.BANG)?this.node(t,{kind:at.Kind.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:at.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Oe.TokenKind.STRING)||this.peek(Oe.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(Oe.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Oe.TokenKind.BRACE_R);return this.node(t,{kind:at.Kind.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(Oe.TokenKind.COLON);let r=this.parseNamedType();return this.node(t,{kind:at.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:at.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:at.Kind.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Oe.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Oe.TokenKind.BRACE_L,this.parseFieldDefinition,Oe.TokenKind.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Oe.TokenKind.COLON);let a=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:at.Kind.FIELD_DEFINITION,description:n,name:r,arguments:i,type:a,directives:o})}parseArgumentDefs(){return this.optionalMany(Oe.TokenKind.PAREN_L,this.parseInputValueDef,Oe.TokenKind.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(Oe.TokenKind.COLON);let i=this.parseTypeReference(),a;this.expectOptionalToken(Oe.TokenKind.EQUALS)&&(a=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:at.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:at.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:at.Kind.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(Oe.TokenKind.EQUALS)?this.delimitedMany(Oe.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:at.Kind.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:a})}parseEnumValuesDefinition(){return this.optionalMany(Oe.TokenKind.BRACE_L,this.parseEnumValueDefinition,Oe.TokenKind.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:at.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,Gu.syntaxError)(this._lexer.source,this._lexer.token.start,`${Rm(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:at.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(Oe.TokenKind.BRACE_L,this.parseInputValueDef,Oe.TokenKind.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===Oe.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(Oe.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Oe.TokenKind.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:at.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:at.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:at.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:at.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:at.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:at.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:at.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(Oe.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:at.Kind.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Oe.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(CH.DirectiveLocation,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new kd.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,Gu.syntaxError)(this._lexer.source,n.start,`Expected ${UP(t)}, found ${Rm(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===Oe.TokenKind.NAME&&n.value===t)this.advanceLexer();else throw(0,Gu.syntaxError)(this._lexer.source,n.start,`Expected "${t}", found ${Rm(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===Oe.TokenKind.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t!=null?t:this._lexer.token;return(0,Gu.syntaxError)(this._lexer.source,n.start,`Unexpected ${Rm(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!==Oe.TokenKind.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw(0,Gu.syntaxError)(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};Zo.Parser=$u;function Rm(e){let t=e.value;return UP(e.kind)+(t!=null?` "${t}"`:"")}function UP(e){return(0,BP.isPunctuatorTokenKind)(e)?`"${e}"`:e}});var eu=w(aI=>{"use strict";m();T();N();Object.defineProperty(aI,"__esModule",{value:!0});aI.didYouMean=qH;var xH=5;function qH(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,xH),c=o.pop();return i+o.join(", ")+", or "+c+"?"}});var kP=w(sI=>{"use strict";m();T();N();Object.defineProperty(sI,"__esModule",{value:!0});sI.identityFunc=VH;function VH(e){return e}});var tu=w(oI=>{"use strict";m();T();N();Object.defineProperty(oI,"__esModule",{value:!0});oI.keyMap=jH;function jH(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}});var Md=w(uI=>{"use strict";m();T();N();Object.defineProperty(uI,"__esModule",{value:!0});uI.keyValMap=KH;function KH(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}});var lI=w(cI=>{"use strict";m();T();N();Object.defineProperty(cI,"__esModule",{value:!0});cI.mapValue=GH;function GH(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}});var xd=w(pI=>{"use strict";m();T();N();Object.defineProperty(pI,"__esModule",{value:!0});pI.naturalCompare=$H;function $H(e,t){let n=0,r=0;for(;n0);let c=0;do++r,c=c*10+a-dI,a=t.charCodeAt(r);while(Pm(a)&&c>0);if(oc)return 1}else{if(ia)return 1;++n,++r}}return e.length-t.length}var dI=48,QH=57;function Pm(e){return!isNaN(e)&&dI<=e&&e<=QH}});var nu=w(mI=>{"use strict";m();T();N();Object.defineProperty(mI,"__esModule",{value:!0});mI.suggestionList=JH;var YH=xd();function JH(e,t){let n=Object.create(null),r=new fI(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,YH.naturalCompare)(a,o)})}var fI=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=MP(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=MP(r),a=this._inputArray;if(i.lengthn)return;let l=this._rows;for(let f=0;f<=c;f++)l[0][f]=f;for(let f=1;f<=o;f++){let y=l[(f-1)%3],I=l[f%3],v=I[0]=f;for(let F=1;F<=c;F++){let k=i[f-1]===a[F-1]?0:1,K=Math.min(y[F]+1,I[F-1]+1,y[F-1]+k);if(f>1&&F>1&&i[f-1]===a[F-2]&&i[f-2]===a[F-1]){let J=l[(f-2)%3][F-2];K=Math.min(K,J+1)}Kn)return}let d=l[o%3][c];return d<=n?d:void 0}};function MP(e){let t=e.length,n=new Array(t);for(let r=0;r{"use strict";m();T();N();Object.defineProperty(NI,"__esModule",{value:!0});NI.toObjMap=HH;function HH(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 xP=w(TI=>{"use strict";m();T();N();Object.defineProperty(TI,"__esModule",{value:!0});TI.printString=zH;function zH(e){return`"${e.replace(WH,XH)}"`}var WH=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function XH(e){return ZH[e.charCodeAt(0)]}var ZH=["\\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 Qu=w(ru=>{"use strict";m();T();N();Object.defineProperty(ru,"__esModule",{value:!0});ru.BREAK=void 0;ru.getEnterLeaveForKind=wm;ru.getVisitFn=i3;ru.visit=n3;ru.visitInParallel=r3;var e3=Br(),t3=Xt(),EI=ba(),qP=Ft(),il=Object.freeze({});ru.BREAK=il;function n3(e,t,n=EI.QueryDocumentKeys){let r=new Map;for(let J of Object.values(qP.Kind))r.set(J,wm(t,J));let i,a=Array.isArray(e),o=[e],c=-1,l=[],d=e,f,y,I=[],v=[];do{c++;let J=c===o.length,se=J&&l.length!==0;if(J){if(f=v.length===0?void 0:I[I.length-1],d=y,y=v.pop(),se)if(a){d=d.slice();let Te=0;for(let[de,Re]of l){let xe=de-Te;Re===null?(d.splice(xe,1),Te++):d[xe]=Re}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(let[Te,de]of l)d[Te]=de}c=i.index,o=i.keys,l=i.edits,a=i.inArray,i=i.prev}else if(y){if(f=a?c:o[c],d=y[f],d==null)continue;I.push(f)}let ie;if(!Array.isArray(d)){var F,k;(0,EI.isNode)(d)||(0,e3.devAssert)(!1,`Invalid AST Node: ${(0,t3.inspect)(d)}.`);let Te=J?(F=r.get(d.kind))===null||F===void 0?void 0:F.leave:(k=r.get(d.kind))===null||k===void 0?void 0:k.enter;if(ie=Te==null?void 0:Te.call(t,d,f,y,I,v),ie===il)break;if(ie===!1){if(!J){I.pop();continue}}else if(ie!==void 0&&(l.push([f,ie]),!J))if((0,EI.isNode)(ie))d=ie;else{I.pop();continue}}if(ie===void 0&&se&&l.push([f,d]),J)I.pop();else{var K;i={inArray:a,index:c,keys:o,edits:l,prev:i},a=Array.isArray(d),o=a?d:(K=n[d.kind])!==null&&K!==void 0?K:[],c=-1,l=[],y&&v.push(y),y=d}}while(i!==void 0);return l.length!==0?l[l.length-1][1]:e}function r3(e){let t=new Array(e.length).fill(null),n=Object.create(null);for(let r of Object.values(qP.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(hI,"__esModule",{value:!0});hI.print=u3;var a3=Pd(),s3=xP(),o3=Qu();function u3(e){return(0,o3.visit)(e,l3)}var c3=80,l3={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Ve(e.definitions,` +spurious results.`)}}return!1};Dm.instanceOf=PH});var Am=w(Ud=>{"use strict";m();T();N();Object.defineProperty(Ud,"__esModule",{value:!0});Ud.Source=void 0;Ud.isSource=LH;var iI=Br(),FH=Xt(),wH=Bd(),bm=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||(0,iI.devAssert)(!1,`Body must be a string. Received: ${(0,FH.inspect)(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||(0,iI.devAssert)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,iI.devAssert)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};Ud.Source=bm;function LH(e){return(0,wH.instanceOf)(e,bm)}});var il=w(Zo=>{"use strict";m();T();N();Object.defineProperty(Zo,"__esModule",{value:!0});Zo.Parser=void 0;Zo.parse=BH;Zo.parseConstValue=kH;Zo.parseType=MH;Zo.parseValue=UH;var Gu=gm(),kd=ba(),CH=nl(),at=Ft(),BP=Sm(),CP=Am(),Oe=wd();function BH(e,t){return new $u(e,t).parseDocument()}function UH(e,t){let n=new $u(e,t);n.expectToken(Oe.TokenKind.SOF);let r=n.parseValueLiteral(!1);return n.expectToken(Oe.TokenKind.EOF),r}function kH(e,t){let n=new $u(e,t);n.expectToken(Oe.TokenKind.SOF);let r=n.parseConstValueLiteral();return n.expectToken(Oe.TokenKind.EOF),r}function MH(e,t){let n=new $u(e,t);n.expectToken(Oe.TokenKind.SOF);let r=n.parseTypeReference();return n.expectToken(Oe.TokenKind.EOF),r}var $u=class{constructor(t,n={}){let r=(0,CP.isSource)(t)?t:new CP.Source(t);this._lexer=new BP.Lexer(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(Oe.TokenKind.NAME);return this.node(t,{kind:at.Kind.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:at.Kind.DOCUMENT,definitions:this.many(Oe.TokenKind.SOF,this.parseDefinition,Oe.TokenKind.EOF)})}parseDefinition(){if(this.peek(Oe.TokenKind.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===Oe.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,Gu.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(Oe.TokenKind.BRACE_L))return this.node(t,{kind:at.Kind.OPERATION_DEFINITION,operation:kd.OperationTypeNode.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(Oe.TokenKind.NAME)&&(r=this.parseName()),this.node(t,{kind:at.Kind.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(Oe.TokenKind.NAME);switch(t.value){case"query":return kd.OperationTypeNode.QUERY;case"mutation":return kd.OperationTypeNode.MUTATION;case"subscription":return kd.OperationTypeNode.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(Oe.TokenKind.PAREN_L,this.parseVariableDefinition,Oe.TokenKind.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:at.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Oe.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Oe.TokenKind.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(Oe.TokenKind.DOLLAR),this.node(t,{kind:at.Kind.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:at.Kind.SELECTION_SET,selections:this.many(Oe.TokenKind.BRACE_L,this.parseSelection,Oe.TokenKind.BRACE_R)})}parseSelection(){return this.peek(Oe.TokenKind.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(Oe.TokenKind.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:at.Kind.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Oe.TokenKind.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(Oe.TokenKind.PAREN_L,n,Oe.TokenKind.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(Oe.TokenKind.COLON),this.node(n,{kind:at.Kind.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(Oe.TokenKind.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(Oe.TokenKind.NAME)?this.node(t,{kind:at.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:at.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:at.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:at.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 Oe.TokenKind.BRACKET_L:return this.parseList(t);case Oe.TokenKind.BRACE_L:return this.parseObject(t);case Oe.TokenKind.INT:return this.advanceLexer(),this.node(n,{kind:at.Kind.INT,value:n.value});case Oe.TokenKind.FLOAT:return this.advanceLexer(),this.node(n,{kind:at.Kind.FLOAT,value:n.value});case Oe.TokenKind.STRING:case Oe.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case Oe.TokenKind.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:at.Kind.BOOLEAN,value:!0});case"false":return this.node(n,{kind:at.Kind.BOOLEAN,value:!1});case"null":return this.node(n,{kind:at.Kind.NULL});default:return this.node(n,{kind:at.Kind.ENUM,value:n.value})}case Oe.TokenKind.DOLLAR:if(t)if(this.expectToken(Oe.TokenKind.DOLLAR),this._lexer.token.kind===Oe.TokenKind.NAME){let r=this._lexer.token.value;throw(0,Gu.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:at.Kind.STRING,value:t.value,block:t.kind===Oe.TokenKind.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:at.Kind.LIST,values:this.any(Oe.TokenKind.BRACKET_L,n,Oe.TokenKind.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:at.Kind.OBJECT,fields:this.any(Oe.TokenKind.BRACE_L,n,Oe.TokenKind.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(Oe.TokenKind.COLON),this.node(n,{kind:at.Kind.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(Oe.TokenKind.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(Oe.TokenKind.AT),this.node(n,{kind:at.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(Oe.TokenKind.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(Oe.TokenKind.BRACKET_R),n=this.node(t,{kind:at.Kind.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(Oe.TokenKind.BANG)?this.node(t,{kind:at.Kind.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:at.Kind.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Oe.TokenKind.STRING)||this.peek(Oe.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(Oe.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Oe.TokenKind.BRACE_R);return this.node(t,{kind:at.Kind.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(Oe.TokenKind.COLON);let r=this.parseNamedType();return this.node(t,{kind:at.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:at.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:at.Kind.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:a,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Oe.TokenKind.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Oe.TokenKind.BRACE_L,this.parseFieldDefinition,Oe.TokenKind.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(Oe.TokenKind.COLON);let a=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:at.Kind.FIELD_DEFINITION,description:n,name:r,arguments:i,type:a,directives:o})}parseArgumentDefs(){return this.optionalMany(Oe.TokenKind.PAREN_L,this.parseInputValueDef,Oe.TokenKind.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(Oe.TokenKind.COLON);let i=this.parseTypeReference(),a;this.expectOptionalToken(Oe.TokenKind.EQUALS)&&(a=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:at.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:at.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:at.Kind.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(Oe.TokenKind.EQUALS)?this.delimitedMany(Oe.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:at.Kind.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:a})}parseEnumValuesDefinition(){return this.optionalMany(Oe.TokenKind.BRACE_L,this.parseEnumValueDefinition,Oe.TokenKind.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:at.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,Gu.syntaxError)(this._lexer.source,this._lexer.token.start,`${Rm(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:at.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(Oe.TokenKind.BRACE_L,this.parseInputValueDef,Oe.TokenKind.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===Oe.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(Oe.TokenKind.BRACE_L,this.parseOperationTypeDefinition,Oe.TokenKind.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:at.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:at.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:at.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:at.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:at.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:at.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:at.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(Oe.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:at.Kind.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Oe.TokenKind.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(CH.DirectiveLocation,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new kd.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,Gu.syntaxError)(this._lexer.source,n.start,`Expected ${UP(t)}, found ${Rm(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===Oe.TokenKind.NAME&&n.value===t)this.advanceLexer();else throw(0,Gu.syntaxError)(this._lexer.source,n.start,`Expected "${t}", found ${Rm(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===Oe.TokenKind.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t!=null?t:this._lexer.token;return(0,Gu.syntaxError)(this._lexer.source,n.start,`Unexpected ${Rm(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!==Oe.TokenKind.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw(0,Gu.syntaxError)(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};Zo.Parser=$u;function Rm(e){let t=e.value;return UP(e.kind)+(t!=null?` "${t}"`:"")}function UP(e){return(0,BP.isPunctuatorTokenKind)(e)?`"${e}"`:e}});var eu=w(aI=>{"use strict";m();T();N();Object.defineProperty(aI,"__esModule",{value:!0});aI.didYouMean=qH;var xH=5;function qH(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,xH),c=o.pop();return i+o.join(", ")+", or "+c+"?"}});var kP=w(sI=>{"use strict";m();T();N();Object.defineProperty(sI,"__esModule",{value:!0});sI.identityFunc=VH;function VH(e){return e}});var tu=w(oI=>{"use strict";m();T();N();Object.defineProperty(oI,"__esModule",{value:!0});oI.keyMap=jH;function jH(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}});var Md=w(uI=>{"use strict";m();T();N();Object.defineProperty(uI,"__esModule",{value:!0});uI.keyValMap=KH;function KH(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}});var lI=w(cI=>{"use strict";m();T();N();Object.defineProperty(cI,"__esModule",{value:!0});cI.mapValue=GH;function GH(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}});var xd=w(pI=>{"use strict";m();T();N();Object.defineProperty(pI,"__esModule",{value:!0});pI.naturalCompare=$H;function $H(e,t){let n=0,r=0;for(;n0);let c=0;do++r,c=c*10+a-dI,a=t.charCodeAt(r);while(Pm(a)&&c>0);if(oc)return 1}else{if(ia)return 1;++n,++r}}return e.length-t.length}var dI=48,QH=57;function Pm(e){return!isNaN(e)&&dI<=e&&e<=QH}});var nu=w(mI=>{"use strict";m();T();N();Object.defineProperty(mI,"__esModule",{value:!0});mI.suggestionList=JH;var YH=xd();function JH(e,t){let n=Object.create(null),r=new fI(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,YH.naturalCompare)(a,o)})}var fI=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=MP(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=MP(r),a=this._inputArray;if(i.lengthn)return;let l=this._rows;for(let f=0;f<=c;f++)l[0][f]=f;for(let f=1;f<=o;f++){let y=l[(f-1)%3],I=l[f%3],v=I[0]=f;for(let F=1;F<=c;F++){let k=i[f-1]===a[F-1]?0:1,K=Math.min(y[F]+1,I[F-1]+1,y[F-1]+k);if(f>1&&F>1&&i[f-1]===a[F-2]&&i[f-2]===a[F-1]){let J=l[(f-2)%3][F-2];K=Math.min(K,J+1)}Kn)return}let d=l[o%3][c];return d<=n?d:void 0}};function MP(e){let t=e.length,n=new Array(t);for(let r=0;r{"use strict";m();T();N();Object.defineProperty(NI,"__esModule",{value:!0});NI.toObjMap=HH;function HH(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 xP=w(TI=>{"use strict";m();T();N();Object.defineProperty(TI,"__esModule",{value:!0});TI.printString=zH;function zH(e){return`"${e.replace(WH,XH)}"`}var WH=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function XH(e){return ZH[e.charCodeAt(0)]}var ZH=["\\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 Qu=w(ru=>{"use strict";m();T();N();Object.defineProperty(ru,"__esModule",{value:!0});ru.BREAK=void 0;ru.getEnterLeaveForKind=wm;ru.getVisitFn=i3;ru.visit=n3;ru.visitInParallel=r3;var e3=Br(),t3=Xt(),EI=ba(),qP=Ft(),al=Object.freeze({});ru.BREAK=al;function n3(e,t,n=EI.QueryDocumentKeys){let r=new Map;for(let J of Object.values(qP.Kind))r.set(J,wm(t,J));let i,a=Array.isArray(e),o=[e],c=-1,l=[],d=e,f,y,I=[],v=[];do{c++;let J=c===o.length,se=J&&l.length!==0;if(J){if(f=v.length===0?void 0:I[I.length-1],d=y,y=v.pop(),se)if(a){d=d.slice();let Te=0;for(let[de,Re]of l){let xe=de-Te;Re===null?(d.splice(xe,1),Te++):d[xe]=Re}}else{d=Object.defineProperties({},Object.getOwnPropertyDescriptors(d));for(let[Te,de]of l)d[Te]=de}c=i.index,o=i.keys,l=i.edits,a=i.inArray,i=i.prev}else if(y){if(f=a?c:o[c],d=y[f],d==null)continue;I.push(f)}let ie;if(!Array.isArray(d)){var F,k;(0,EI.isNode)(d)||(0,e3.devAssert)(!1,`Invalid AST Node: ${(0,t3.inspect)(d)}.`);let Te=J?(F=r.get(d.kind))===null||F===void 0?void 0:F.leave:(k=r.get(d.kind))===null||k===void 0?void 0:k.enter;if(ie=Te==null?void 0:Te.call(t,d,f,y,I,v),ie===al)break;if(ie===!1){if(!J){I.pop();continue}}else if(ie!==void 0&&(l.push([f,ie]),!J))if((0,EI.isNode)(ie))d=ie;else{I.pop();continue}}if(ie===void 0&&se&&l.push([f,d]),J)I.pop();else{var K;i={inArray:a,index:c,keys:o,edits:l,prev:i},a=Array.isArray(d),o=a?d:(K=n[d.kind])!==null&&K!==void 0?K:[],c=-1,l=[],y&&v.push(y),y=d}}while(i!==void 0);return l.length!==0?l[l.length-1][1]:e}function r3(e){let t=new Array(e.length).fill(null),n=Object.create(null);for(let r of Object.values(qP.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(hI,"__esModule",{value:!0});hI.print=u3;var a3=Pd(),s3=xP(),o3=Qu();function u3(e){return(0,o3.visit)(e,l3)}var c3=80,l3={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Ve(e.definitions,` `)},OperationDefinition:{leave(e){let t=Dt("(",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+Dt(" = ",n)+Dt(" ",Ve(r," "))},SelectionSet:{leave:({selections:e})=>ta(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=Dt("",e,": ")+t,o=a+Dt("(",Ve(n,", "),")");return o.length>c3&&(o=a+Dt(`( `,Lm(Ve(n,` @@ -63,15 +63,15 @@ spurious results.`)}}return!1};Dm.instanceOf=PH});var Am=w(Ud=>{"use strict";m() `)),` }`)}function Dt(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function Lm(e){return Dt(" ",e.replace(/\n/g,` `))}function VP(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` -`)))!==null&&t!==void 0?t:!1}});var gI=w(II=>{"use strict";m();T();N();Object.defineProperty(II,"__esModule",{value:!0});II.valueFromASTUntyped=yI;var d3=Md(),Ts=Ft();function yI(e,t){switch(e.kind){case Ts.Kind.NULL:return null;case Ts.Kind.INT:return parseInt(e.value,10);case Ts.Kind.FLOAT:return parseFloat(e.value);case Ts.Kind.STRING:case Ts.Kind.ENUM:case Ts.Kind.BOOLEAN:return e.value;case Ts.Kind.LIST:return e.values.map(n=>yI(n,t));case Ts.Kind.OBJECT:return(0,d3.keyValMap)(e.fields,n=>n.name.value,n=>yI(n.value,t));case Ts.Kind.VARIABLE:return t==null?void 0:t[e.name.value]}}});var qd=w(Bm=>{"use strict";m();T();N();Object.defineProperty(Bm,"__esModule",{value:!0});Bm.assertEnumValueName=p3;Bm.assertName=GP;var jP=Br(),Cm=ze(),KP=_m();function GP(e){if(e!=null||(0,jP.devAssert)(!1,"Must provide name."),typeof e=="string"||(0,jP.devAssert)(!1,"Expected name to be a string."),e.length===0)throw new Cm.GraphQLError("Expected name to be a non-empty string.");for(let t=1;t{"use strict";m();T();N();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.GraphQLUnionType=Ge.GraphQLScalarType=Ge.GraphQLObjectType=Ge.GraphQLNonNull=Ge.GraphQLList=Ge.GraphQLInterfaceType=Ge.GraphQLInputObjectType=Ge.GraphQLEnumType=void 0;Ge.argsToArgsConfig=rF;Ge.assertAbstractType=w3;Ge.assertCompositeType=F3;Ge.assertEnumType=S3;Ge.assertInputObjectType=O3;Ge.assertInputType=A3;Ge.assertInterfaceType=_3;Ge.assertLeafType=P3;Ge.assertListType=D3;Ge.assertNamedType=U3;Ge.assertNonNullType=b3;Ge.assertNullableType=C3;Ge.assertObjectType=g3;Ge.assertOutputType=R3;Ge.assertScalarType=I3;Ge.assertType=y3;Ge.assertUnionType=v3;Ge.assertWrappingType=L3;Ge.defineArguments=tF;Ge.getNamedType=k3;Ge.getNullableType=B3;Ge.isAbstractType=WP;Ge.isCompositeType=zP;Ge.isEnumType=zu;Ge.isInputObjectType=jd;Ge.isInputType=_I;Ge.isInterfaceType=Ju;Ge.isLeafType=HP;Ge.isListType=Ym;Ge.isNamedType=XP;Ge.isNonNullType=au;Ge.isNullableType=SI;Ge.isObjectType=sl;Ge.isOutputType=vI;Ge.isRequiredArgument=M3;Ge.isRequiredInputField=V3;Ge.isScalarType=Yu;Ge.isType=Qm;Ge.isUnionType=Hu;Ge.isWrappingType=Kd;Ge.resolveObjMapThunk=DI;Ge.resolveReadonlyArrayThunk=OI;var or=Br(),f3=eu(),$P=kP(),pn=Xt(),iu=Bd(),m3=Da(),N3=tu(),JP=Md(),$m=lI(),T3=nu(),Aa=Fm(),Vd=ze(),E3=Ft(),QP=ci(),h3=gI(),Ra=qd();function Qm(e){return Yu(e)||sl(e)||Ju(e)||Hu(e)||zu(e)||jd(e)||Ym(e)||au(e)}function y3(e){if(!Qm(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL type.`);return e}function Yu(e){return(0,iu.instanceOf)(e,xm)}function I3(e){if(!Yu(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Scalar type.`);return e}function sl(e){return(0,iu.instanceOf)(e,qm)}function g3(e){if(!sl(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Object type.`);return e}function Ju(e){return(0,iu.instanceOf)(e,Vm)}function _3(e){if(!Ju(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Interface type.`);return e}function Hu(e){return(0,iu.instanceOf)(e,jm)}function v3(e){if(!Hu(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Union type.`);return e}function zu(e){return(0,iu.instanceOf)(e,Km)}function S3(e){if(!zu(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Enum type.`);return e}function jd(e){return(0,iu.instanceOf)(e,Gm)}function O3(e){if(!jd(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Input Object type.`);return e}function Ym(e){return(0,iu.instanceOf)(e,km)}function D3(e){if(!Ym(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL List type.`);return e}function au(e){return(0,iu.instanceOf)(e,Mm)}function b3(e){if(!au(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Non-Null type.`);return e}function _I(e){return Yu(e)||zu(e)||jd(e)||Kd(e)&&_I(e.ofType)}function A3(e){if(!_I(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL input type.`);return e}function vI(e){return Yu(e)||sl(e)||Ju(e)||Hu(e)||zu(e)||Kd(e)&&vI(e.ofType)}function R3(e){if(!vI(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL output type.`);return e}function HP(e){return Yu(e)||zu(e)}function P3(e){if(!HP(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL leaf type.`);return e}function zP(e){return sl(e)||Ju(e)||Hu(e)}function F3(e){if(!zP(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL composite type.`);return e}function WP(e){return Ju(e)||Hu(e)}function w3(e){if(!WP(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL abstract type.`);return e}var km=class{constructor(t){Qm(t)||(0,or.devAssert)(!1,`Expected ${(0,pn.inspect)(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}};Ge.GraphQLList=km;var Mm=class{constructor(t){SI(t)||(0,or.devAssert)(!1,`Expected ${(0,pn.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()}};Ge.GraphQLNonNull=Mm;function Kd(e){return Ym(e)||au(e)}function L3(e){if(!Kd(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL wrapping type.`);return e}function SI(e){return Qm(e)&&!au(e)}function C3(e){if(!SI(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL nullable type.`);return e}function B3(e){if(e)return au(e)?e.ofType:e}function XP(e){return Yu(e)||sl(e)||Ju(e)||Hu(e)||zu(e)||jd(e)}function U3(e){if(!XP(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL named type.`);return e}function k3(e){if(e){let t=e;for(;Kd(t);)t=t.ofType;return t}}function OI(e){return typeof e=="function"?e():e}function DI(e){return typeof e=="function"?e():e}var xm=class{constructor(t){var n,r,i,a;let o=(n=t.parseValue)!==null&&n!==void 0?n:$P.identityFunc;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:$P.identityFunc,this.parseValue=o,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(c,l)=>o((0,h3.valueFromASTUntyped)(c,l)),this.extensions=(0,Aa.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,or.devAssert)(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${(0,pn.inspect)(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||(0,or.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,or.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()}};Ge.GraphQLScalarType=xm;var qm=class{constructor(t){var n;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=(0,Aa.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>eF(t),this._interfaces=()=>ZP(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||(0,or.devAssert)(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${(0,pn.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:nF(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLObjectType=qm;function ZP(e){var t;let n=OI((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||(0,or.devAssert)(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function eF(e){let t=DI(e.fields);return al(t)||(0,or.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,$m.mapValue)(t,(n,r)=>{var i;al(n)||(0,or.devAssert)(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||(0,or.devAssert)(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${(0,pn.inspect)(n.resolve)}.`);let a=(i=n.args)!==null&&i!==void 0?i:{};return al(a)||(0,or.devAssert)(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:(0,Ra.assertName)(r),description:n.description,type:n.type,args:tF(a),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:(0,Aa.toObjMap)(n.extensions),astNode:n.astNode}})}function tF(e){return Object.entries(e).map(([t,n])=>({name:(0,Ra.assertName)(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,Aa.toObjMap)(n.extensions),astNode:n.astNode}))}function al(e){return(0,m3.isObjectLike)(e)&&!Array.isArray(e)}function nF(e){return(0,$m.mapValue)(e,t=>({description:t.description,type:t.type,args:rF(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function rF(e){return(0,JP.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 M3(e){return au(e.type)&&e.defaultValue===void 0}var Vm=class{constructor(t){var n;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,Aa.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=eF.bind(void 0,t),this._interfaces=ZP.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,or.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,pn.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:nF(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLInterfaceType=Vm;var jm=class{constructor(t){var n;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,Aa.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=x3.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,or.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,pn.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()}};Ge.GraphQLUnionType=jm;function x3(e){let t=OI(e.types);return Array.isArray(t)||(0,or.devAssert)(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}var Km=class{constructor(t){var n;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.extensions=(0,Aa.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:YP(this.name,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=YP(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=(0,N3.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 Vd.GraphQLError(`Enum "${this.name}" cannot represent value: ${(0,pn.inspect)(t)}`);return n.name}parseValue(t){if(typeof t!="string"){let r=(0,pn.inspect)(t);throw new Vd.GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${r}.`+Um(this,r))}let n=this.getValue(t);if(n==null)throw new Vd.GraphQLError(`Value "${t}" does not exist in "${this.name}" enum.`+Um(this,t));return n.value}parseLiteral(t,n){if(t.kind!==E3.Kind.ENUM){let i=(0,QP.print)(t);throw new Vd.GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+Um(this,i),{nodes:t})}let r=this.getValue(t.value);if(r==null){let i=(0,QP.print)(t);throw new Vd.GraphQLError(`Value "${i}" does not exist in "${this.name}" enum.`+Um(this,i),{nodes:t})}return r.value}toConfig(){let t=(0,JP.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()}};Ge.GraphQLEnumType=Km;function Um(e,t){let n=e.getValues().map(i=>i.name),r=(0,T3.suggestionList)(t,n);return(0,f3.didYouMean)("the enum value",r)}function YP(e,t){return al(t)||(0,or.devAssert)(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(al(r)||(0,or.devAssert)(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${(0,pn.inspect)(r)}.`),{name:(0,Ra.assertEnumValueName)(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:(0,Aa.toObjMap)(r.extensions),astNode:r.astNode}))}var Gm=class{constructor(t){var n,r;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.extensions=(0,Aa.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=q3.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,$m.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()}};Ge.GraphQLInputObjectType=Gm;function q3(e){let t=DI(e.fields);return al(t)||(0,or.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,$m.mapValue)(t,(n,r)=>(!("resolve"in n)||(0,or.devAssert)(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:(0,Ra.assertName)(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,Aa.toObjMap)(n.extensions),astNode:n.astNode}))}function V3(e){return au(e.type)&&e.defaultValue===void 0}});var $d=w(Gd=>{"use strict";m();T();N();Object.defineProperty(Gd,"__esModule",{value:!0});Gd.doTypesOverlap=j3;Gd.isEqualType=bI;Gd.isTypeSubTypeOf=Jm;var gr=wt();function bI(e,t){return e===t?!0:(0,gr.isNonNullType)(e)&&(0,gr.isNonNullType)(t)||(0,gr.isListType)(e)&&(0,gr.isListType)(t)?bI(e.ofType,t.ofType):!1}function Jm(e,t,n){return t===n?!0:(0,gr.isNonNullType)(n)?(0,gr.isNonNullType)(t)?Jm(e,t.ofType,n.ofType):!1:(0,gr.isNonNullType)(t)?Jm(e,t.ofType,n):(0,gr.isListType)(n)?(0,gr.isListType)(t)?Jm(e,t.ofType,n.ofType):!1:(0,gr.isListType)(t)?!1:(0,gr.isAbstractType)(n)&&((0,gr.isInterfaceType)(t)||(0,gr.isObjectType)(t))&&e.isSubType(n,t)}function j3(e,t,n){return t===n?!0:(0,gr.isAbstractType)(t)?(0,gr.isAbstractType)(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):(0,gr.isAbstractType)(n)?e.isSubType(n,t):!1}});var Pa=w(Wn=>{"use strict";m();T();N();Object.defineProperty(Wn,"__esModule",{value:!0});Wn.GraphQLString=Wn.GraphQLInt=Wn.GraphQLID=Wn.GraphQLFloat=Wn.GraphQLBoolean=Wn.GRAPHQL_MIN_INT=Wn.GRAPHQL_MAX_INT=void 0;Wn.isSpecifiedScalarType=K3;Wn.specifiedScalarTypes=void 0;var na=Xt(),iF=Da(),ur=ze(),Wu=Ft(),Qd=ci(),Yd=wt(),Hm=2147483647;Wn.GRAPHQL_MAX_INT=Hm;var zm=-2147483648;Wn.GRAPHQL_MIN_INT=zm;var aF=new Yd.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=Jd(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 ur.GraphQLError(`Int cannot represent non-integer value: ${(0,na.inspect)(t)}`);if(n>Hm||nHm||eHm||te.name===t)}function Jd(e){if((0,iF.isObjectLike)(e)){if(typeof e.valueOf=="function"){let t=e.valueOf();if(!(0,iF.isObjectLike)(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}});var Qr=w(qn=>{"use strict";m();T();N();Object.defineProperty(qn,"__esModule",{value:!0});qn.GraphQLSpecifiedByDirective=qn.GraphQLSkipDirective=qn.GraphQLOneOfDirective=qn.GraphQLIncludeDirective=qn.GraphQLDirective=qn.GraphQLDeprecatedDirective=qn.DEFAULT_DEPRECATION_REASON=void 0;qn.assertDirective=H3;qn.isDirective=pF;qn.isSpecifiedDirective=z3;qn.specifiedDirectives=void 0;var dF=Br(),G3=Xt(),$3=Bd(),Q3=Da(),Y3=Fm(),Ai=tl(),J3=qd(),Hd=wt(),Wm=Pa();function pF(e){return(0,$3.instanceOf)(e,Es)}function H3(e){if(!pF(e))throw new Error(`Expected ${(0,G3.inspect)(e)} to be a GraphQL directive.`);return e}var Es=class{constructor(t){var n,r;this.name=(0,J3.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,Y3.toObjMap)(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||(0,dF.devAssert)(!1,`@${t.name} locations must be an Array.`);let i=(r=t.args)!==null&&r!==void 0?r:{};(0,Q3.isObjectLike)(i)&&!Array.isArray(i)||(0,dF.devAssert)(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=(0,Hd.defineArguments)(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:(0,Hd.argsToArgsConfig)(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}};qn.GraphQLDirective=Es;var fF=new Es({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[Ai.DirectiveLocation.FIELD,Ai.DirectiveLocation.FRAGMENT_SPREAD,Ai.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Hd.GraphQLNonNull(Wm.GraphQLBoolean),description:"Included when true."}}});qn.GraphQLIncludeDirective=fF;var mF=new Es({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[Ai.DirectiveLocation.FIELD,Ai.DirectiveLocation.FRAGMENT_SPREAD,Ai.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Hd.GraphQLNonNull(Wm.GraphQLBoolean),description:"Skipped when true."}}});qn.GraphQLSkipDirective=mF;var NF="No longer supported";qn.DEFAULT_DEPRECATION_REASON=NF;var TF=new Es({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[Ai.DirectiveLocation.FIELD_DEFINITION,Ai.DirectiveLocation.ARGUMENT_DEFINITION,Ai.DirectiveLocation.INPUT_FIELD_DEFINITION,Ai.DirectiveLocation.ENUM_VALUE],args:{reason:{type:Wm.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:NF}}});qn.GraphQLDeprecatedDirective=TF;var EF=new Es({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Ai.DirectiveLocation.SCALAR],args:{url:{type:new Hd.GraphQLNonNull(Wm.GraphQLString),description:"The URL that specifies the behavior of this scalar."}}});qn.GraphQLSpecifiedByDirective=EF;var hF=new Es({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[Ai.DirectiveLocation.INPUT_OBJECT],args:{}});qn.GraphQLOneOfDirective=hF;var yF=Object.freeze([fF,mF,TF,EF,hF]);qn.specifiedDirectives=yF;function z3(e){return yF.some(({name:t})=>t===e.name)}});var Xm=w(AI=>{"use strict";m();T();N();Object.defineProperty(AI,"__esModule",{value:!0});AI.isIterableObject=W3;function W3(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}});var Xd=w(RI=>{"use strict";m();T();N();Object.defineProperty(RI,"__esModule",{value:!0});RI.astFromValue=Wd;var IF=Xt(),X3=Ir(),Z3=Xm(),e6=Da(),Ri=Ft(),zd=wt(),t6=Pa();function Wd(e,t){if((0,zd.isNonNullType)(t)){let n=Wd(e,t.ofType);return(n==null?void 0:n.kind)===Ri.Kind.NULL?null:n}if(e===null)return{kind:Ri.Kind.NULL};if(e===void 0)return null;if((0,zd.isListType)(t)){let n=t.ofType;if((0,Z3.isIterableObject)(e)){let r=[];for(let i of e){let a=Wd(i,n);a!=null&&r.push(a)}return{kind:Ri.Kind.LIST,values:r}}return Wd(e,n)}if((0,zd.isInputObjectType)(t)){if(!(0,e6.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Wd(e[r.name],r.type);i&&n.push({kind:Ri.Kind.OBJECT_FIELD,name:{kind:Ri.Kind.NAME,value:r.name},value:i})}return{kind:Ri.Kind.OBJECT,fields:n}}if((0,zd.isLeafType)(t)){let n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:Ri.Kind.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){let r=String(n);return gF.test(r)?{kind:Ri.Kind.INT,value:r}:{kind:Ri.Kind.FLOAT,value:r}}if(typeof n=="string")return(0,zd.isEnumType)(t)?{kind:Ri.Kind.ENUM,value:n}:t===t6.GraphQLID&&gF.test(n)?{kind:Ri.Kind.INT,value:n}:{kind:Ri.Kind.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${(0,IF.inspect)(n)}.`)}(0,X3.invariant)(!1,"Unexpected input type: "+(0,IF.inspect)(t))}var gF=/^-?(?:0|[1-9][0-9]*)$/});var Fi=w(Zt=>{"use strict";m();T();N();Object.defineProperty(Zt,"__esModule",{value:!0});Zt.introspectionTypes=Zt.__TypeKind=Zt.__Type=Zt.__Schema=Zt.__InputValue=Zt.__Field=Zt.__EnumValue=Zt.__DirectiveLocation=Zt.__Directive=Zt.TypeNameMetaFieldDef=Zt.TypeMetaFieldDef=Zt.TypeKind=Zt.SchemaMetaFieldDef=void 0;Zt.isIntrospectionType=c6;var n6=Xt(),r6=Ir(),Xn=tl(),i6=ci(),a6=Xd(),ke=wt(),cn=Pa(),PI=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:cn.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(Pi))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new ke.GraphQLNonNull(Pi),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Pi,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Pi,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(FI))),resolve:e=>e.getDirectives()}})});Zt.__Schema=PI;var FI=new ke.GraphQLObjectType({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. +`)))!==null&&t!==void 0?t:!1}});var gI=w(II=>{"use strict";m();T();N();Object.defineProperty(II,"__esModule",{value:!0});II.valueFromASTUntyped=yI;var d3=Md(),Ts=Ft();function yI(e,t){switch(e.kind){case Ts.Kind.NULL:return null;case Ts.Kind.INT:return parseInt(e.value,10);case Ts.Kind.FLOAT:return parseFloat(e.value);case Ts.Kind.STRING:case Ts.Kind.ENUM:case Ts.Kind.BOOLEAN:return e.value;case Ts.Kind.LIST:return e.values.map(n=>yI(n,t));case Ts.Kind.OBJECT:return(0,d3.keyValMap)(e.fields,n=>n.name.value,n=>yI(n.value,t));case Ts.Kind.VARIABLE:return t==null?void 0:t[e.name.value]}}});var qd=w(Bm=>{"use strict";m();T();N();Object.defineProperty(Bm,"__esModule",{value:!0});Bm.assertEnumValueName=p3;Bm.assertName=GP;var jP=Br(),Cm=ze(),KP=_m();function GP(e){if(e!=null||(0,jP.devAssert)(!1,"Must provide name."),typeof e=="string"||(0,jP.devAssert)(!1,"Expected name to be a string."),e.length===0)throw new Cm.GraphQLError("Expected name to be a non-empty string.");for(let t=1;t{"use strict";m();T();N();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.GraphQLUnionType=Ge.GraphQLScalarType=Ge.GraphQLObjectType=Ge.GraphQLNonNull=Ge.GraphQLList=Ge.GraphQLInterfaceType=Ge.GraphQLInputObjectType=Ge.GraphQLEnumType=void 0;Ge.argsToArgsConfig=rF;Ge.assertAbstractType=w3;Ge.assertCompositeType=F3;Ge.assertEnumType=S3;Ge.assertInputObjectType=O3;Ge.assertInputType=A3;Ge.assertInterfaceType=_3;Ge.assertLeafType=P3;Ge.assertListType=D3;Ge.assertNamedType=U3;Ge.assertNonNullType=b3;Ge.assertNullableType=C3;Ge.assertObjectType=g3;Ge.assertOutputType=R3;Ge.assertScalarType=I3;Ge.assertType=y3;Ge.assertUnionType=v3;Ge.assertWrappingType=L3;Ge.defineArguments=tF;Ge.getNamedType=k3;Ge.getNullableType=B3;Ge.isAbstractType=WP;Ge.isCompositeType=zP;Ge.isEnumType=zu;Ge.isInputObjectType=jd;Ge.isInputType=_I;Ge.isInterfaceType=Ju;Ge.isLeafType=HP;Ge.isListType=Ym;Ge.isNamedType=XP;Ge.isNonNullType=au;Ge.isNullableType=SI;Ge.isObjectType=ol;Ge.isOutputType=vI;Ge.isRequiredArgument=M3;Ge.isRequiredInputField=V3;Ge.isScalarType=Yu;Ge.isType=Qm;Ge.isUnionType=Hu;Ge.isWrappingType=Kd;Ge.resolveObjMapThunk=DI;Ge.resolveReadonlyArrayThunk=OI;var or=Br(),f3=eu(),$P=kP(),pn=Xt(),iu=Bd(),m3=Da(),N3=tu(),JP=Md(),$m=lI(),T3=nu(),Aa=Fm(),Vd=ze(),E3=Ft(),QP=ci(),h3=gI(),Ra=qd();function Qm(e){return Yu(e)||ol(e)||Ju(e)||Hu(e)||zu(e)||jd(e)||Ym(e)||au(e)}function y3(e){if(!Qm(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL type.`);return e}function Yu(e){return(0,iu.instanceOf)(e,xm)}function I3(e){if(!Yu(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Scalar type.`);return e}function ol(e){return(0,iu.instanceOf)(e,qm)}function g3(e){if(!ol(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Object type.`);return e}function Ju(e){return(0,iu.instanceOf)(e,Vm)}function _3(e){if(!Ju(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Interface type.`);return e}function Hu(e){return(0,iu.instanceOf)(e,jm)}function v3(e){if(!Hu(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Union type.`);return e}function zu(e){return(0,iu.instanceOf)(e,Km)}function S3(e){if(!zu(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Enum type.`);return e}function jd(e){return(0,iu.instanceOf)(e,Gm)}function O3(e){if(!jd(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Input Object type.`);return e}function Ym(e){return(0,iu.instanceOf)(e,km)}function D3(e){if(!Ym(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL List type.`);return e}function au(e){return(0,iu.instanceOf)(e,Mm)}function b3(e){if(!au(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL Non-Null type.`);return e}function _I(e){return Yu(e)||zu(e)||jd(e)||Kd(e)&&_I(e.ofType)}function A3(e){if(!_I(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL input type.`);return e}function vI(e){return Yu(e)||ol(e)||Ju(e)||Hu(e)||zu(e)||Kd(e)&&vI(e.ofType)}function R3(e){if(!vI(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL output type.`);return e}function HP(e){return Yu(e)||zu(e)}function P3(e){if(!HP(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL leaf type.`);return e}function zP(e){return ol(e)||Ju(e)||Hu(e)}function F3(e){if(!zP(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL composite type.`);return e}function WP(e){return Ju(e)||Hu(e)}function w3(e){if(!WP(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL abstract type.`);return e}var km=class{constructor(t){Qm(t)||(0,or.devAssert)(!1,`Expected ${(0,pn.inspect)(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}};Ge.GraphQLList=km;var Mm=class{constructor(t){SI(t)||(0,or.devAssert)(!1,`Expected ${(0,pn.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()}};Ge.GraphQLNonNull=Mm;function Kd(e){return Ym(e)||au(e)}function L3(e){if(!Kd(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL wrapping type.`);return e}function SI(e){return Qm(e)&&!au(e)}function C3(e){if(!SI(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL nullable type.`);return e}function B3(e){if(e)return au(e)?e.ofType:e}function XP(e){return Yu(e)||ol(e)||Ju(e)||Hu(e)||zu(e)||jd(e)}function U3(e){if(!XP(e))throw new Error(`Expected ${(0,pn.inspect)(e)} to be a GraphQL named type.`);return e}function k3(e){if(e){let t=e;for(;Kd(t);)t=t.ofType;return t}}function OI(e){return typeof e=="function"?e():e}function DI(e){return typeof e=="function"?e():e}var xm=class{constructor(t){var n,r,i,a;let o=(n=t.parseValue)!==null&&n!==void 0?n:$P.identityFunc;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:$P.identityFunc,this.parseValue=o,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(c,l)=>o((0,h3.valueFromASTUntyped)(c,l)),this.extensions=(0,Aa.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,or.devAssert)(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${(0,pn.inspect)(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||(0,or.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,or.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()}};Ge.GraphQLScalarType=xm;var qm=class{constructor(t){var n;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=(0,Aa.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>eF(t),this._interfaces=()=>ZP(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||(0,or.devAssert)(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${(0,pn.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:nF(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLObjectType=qm;function ZP(e){var t;let n=OI((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||(0,or.devAssert)(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function eF(e){let t=DI(e.fields);return sl(t)||(0,or.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,$m.mapValue)(t,(n,r)=>{var i;sl(n)||(0,or.devAssert)(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||(0,or.devAssert)(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${(0,pn.inspect)(n.resolve)}.`);let a=(i=n.args)!==null&&i!==void 0?i:{};return sl(a)||(0,or.devAssert)(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:(0,Ra.assertName)(r),description:n.description,type:n.type,args:tF(a),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:(0,Aa.toObjMap)(n.extensions),astNode:n.astNode}})}function tF(e){return Object.entries(e).map(([t,n])=>({name:(0,Ra.assertName)(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,Aa.toObjMap)(n.extensions),astNode:n.astNode}))}function sl(e){return(0,m3.isObjectLike)(e)&&!Array.isArray(e)}function nF(e){return(0,$m.mapValue)(e,t=>({description:t.description,type:t.type,args:rF(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function rF(e){return(0,JP.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 M3(e){return au(e.type)&&e.defaultValue===void 0}var Vm=class{constructor(t){var n;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,Aa.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=eF.bind(void 0,t),this._interfaces=ZP.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,or.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,pn.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:nF(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};Ge.GraphQLInterfaceType=Vm;var jm=class{constructor(t){var n;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=(0,Aa.toObjMap)(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=x3.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||(0,or.devAssert)(!1,`${this.name} must provide "resolveType" as a function, but got: ${(0,pn.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()}};Ge.GraphQLUnionType=jm;function x3(e){let t=OI(e.types);return Array.isArray(t)||(0,or.devAssert)(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}var Km=class{constructor(t){var n;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.extensions=(0,Aa.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:YP(this.name,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=YP(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=(0,N3.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 Vd.GraphQLError(`Enum "${this.name}" cannot represent value: ${(0,pn.inspect)(t)}`);return n.name}parseValue(t){if(typeof t!="string"){let r=(0,pn.inspect)(t);throw new Vd.GraphQLError(`Enum "${this.name}" cannot represent non-string value: ${r}.`+Um(this,r))}let n=this.getValue(t);if(n==null)throw new Vd.GraphQLError(`Value "${t}" does not exist in "${this.name}" enum.`+Um(this,t));return n.value}parseLiteral(t,n){if(t.kind!==E3.Kind.ENUM){let i=(0,QP.print)(t);throw new Vd.GraphQLError(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+Um(this,i),{nodes:t})}let r=this.getValue(t.value);if(r==null){let i=(0,QP.print)(t);throw new Vd.GraphQLError(`Value "${i}" does not exist in "${this.name}" enum.`+Um(this,i),{nodes:t})}return r.value}toConfig(){let t=(0,JP.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()}};Ge.GraphQLEnumType=Km;function Um(e,t){let n=e.getValues().map(i=>i.name),r=(0,T3.suggestionList)(t,n);return(0,f3.didYouMean)("the enum value",r)}function YP(e,t){return sl(t)||(0,or.devAssert)(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(sl(r)||(0,or.devAssert)(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${(0,pn.inspect)(r)}.`),{name:(0,Ra.assertEnumValueName)(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:(0,Aa.toObjMap)(r.extensions),astNode:r.astNode}))}var Gm=class{constructor(t){var n,r;this.name=(0,Ra.assertName)(t.name),this.description=t.description,this.extensions=(0,Aa.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=q3.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,$m.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()}};Ge.GraphQLInputObjectType=Gm;function q3(e){let t=DI(e.fields);return sl(t)||(0,or.devAssert)(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),(0,$m.mapValue)(t,(n,r)=>(!("resolve"in n)||(0,or.devAssert)(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:(0,Ra.assertName)(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:(0,Aa.toObjMap)(n.extensions),astNode:n.astNode}))}function V3(e){return au(e.type)&&e.defaultValue===void 0}});var $d=w(Gd=>{"use strict";m();T();N();Object.defineProperty(Gd,"__esModule",{value:!0});Gd.doTypesOverlap=j3;Gd.isEqualType=bI;Gd.isTypeSubTypeOf=Jm;var gr=wt();function bI(e,t){return e===t?!0:(0,gr.isNonNullType)(e)&&(0,gr.isNonNullType)(t)||(0,gr.isListType)(e)&&(0,gr.isListType)(t)?bI(e.ofType,t.ofType):!1}function Jm(e,t,n){return t===n?!0:(0,gr.isNonNullType)(n)?(0,gr.isNonNullType)(t)?Jm(e,t.ofType,n.ofType):!1:(0,gr.isNonNullType)(t)?Jm(e,t.ofType,n):(0,gr.isListType)(n)?(0,gr.isListType)(t)?Jm(e,t.ofType,n.ofType):!1:(0,gr.isListType)(t)?!1:(0,gr.isAbstractType)(n)&&((0,gr.isInterfaceType)(t)||(0,gr.isObjectType)(t))&&e.isSubType(n,t)}function j3(e,t,n){return t===n?!0:(0,gr.isAbstractType)(t)?(0,gr.isAbstractType)(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):(0,gr.isAbstractType)(n)?e.isSubType(n,t):!1}});var Pa=w(Wn=>{"use strict";m();T();N();Object.defineProperty(Wn,"__esModule",{value:!0});Wn.GraphQLString=Wn.GraphQLInt=Wn.GraphQLID=Wn.GraphQLFloat=Wn.GraphQLBoolean=Wn.GRAPHQL_MIN_INT=Wn.GRAPHQL_MAX_INT=void 0;Wn.isSpecifiedScalarType=K3;Wn.specifiedScalarTypes=void 0;var na=Xt(),iF=Da(),ur=ze(),Wu=Ft(),Qd=ci(),Yd=wt(),Hm=2147483647;Wn.GRAPHQL_MAX_INT=Hm;var zm=-2147483648;Wn.GRAPHQL_MIN_INT=zm;var aF=new Yd.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=Jd(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 ur.GraphQLError(`Int cannot represent non-integer value: ${(0,na.inspect)(t)}`);if(n>Hm||nHm||eHm||te.name===t)}function Jd(e){if((0,iF.isObjectLike)(e)){if(typeof e.valueOf=="function"){let t=e.valueOf();if(!(0,iF.isObjectLike)(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}});var Qr=w(qn=>{"use strict";m();T();N();Object.defineProperty(qn,"__esModule",{value:!0});qn.GraphQLSpecifiedByDirective=qn.GraphQLSkipDirective=qn.GraphQLOneOfDirective=qn.GraphQLIncludeDirective=qn.GraphQLDirective=qn.GraphQLDeprecatedDirective=qn.DEFAULT_DEPRECATION_REASON=void 0;qn.assertDirective=H3;qn.isDirective=pF;qn.isSpecifiedDirective=z3;qn.specifiedDirectives=void 0;var dF=Br(),G3=Xt(),$3=Bd(),Q3=Da(),Y3=Fm(),Ai=nl(),J3=qd(),Hd=wt(),Wm=Pa();function pF(e){return(0,$3.instanceOf)(e,Es)}function H3(e){if(!pF(e))throw new Error(`Expected ${(0,G3.inspect)(e)} to be a GraphQL directive.`);return e}var Es=class{constructor(t){var n,r;this.name=(0,J3.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,Y3.toObjMap)(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||(0,dF.devAssert)(!1,`@${t.name} locations must be an Array.`);let i=(r=t.args)!==null&&r!==void 0?r:{};(0,Q3.isObjectLike)(i)&&!Array.isArray(i)||(0,dF.devAssert)(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=(0,Hd.defineArguments)(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:(0,Hd.argsToArgsConfig)(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}};qn.GraphQLDirective=Es;var fF=new Es({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[Ai.DirectiveLocation.FIELD,Ai.DirectiveLocation.FRAGMENT_SPREAD,Ai.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Hd.GraphQLNonNull(Wm.GraphQLBoolean),description:"Included when true."}}});qn.GraphQLIncludeDirective=fF;var mF=new Es({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[Ai.DirectiveLocation.FIELD,Ai.DirectiveLocation.FRAGMENT_SPREAD,Ai.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Hd.GraphQLNonNull(Wm.GraphQLBoolean),description:"Skipped when true."}}});qn.GraphQLSkipDirective=mF;var NF="No longer supported";qn.DEFAULT_DEPRECATION_REASON=NF;var TF=new Es({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[Ai.DirectiveLocation.FIELD_DEFINITION,Ai.DirectiveLocation.ARGUMENT_DEFINITION,Ai.DirectiveLocation.INPUT_FIELD_DEFINITION,Ai.DirectiveLocation.ENUM_VALUE],args:{reason:{type:Wm.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:NF}}});qn.GraphQLDeprecatedDirective=TF;var EF=new Es({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Ai.DirectiveLocation.SCALAR],args:{url:{type:new Hd.GraphQLNonNull(Wm.GraphQLString),description:"The URL that specifies the behavior of this scalar."}}});qn.GraphQLSpecifiedByDirective=EF;var hF=new Es({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[Ai.DirectiveLocation.INPUT_OBJECT],args:{}});qn.GraphQLOneOfDirective=hF;var yF=Object.freeze([fF,mF,TF,EF,hF]);qn.specifiedDirectives=yF;function z3(e){return yF.some(({name:t})=>t===e.name)}});var Xm=w(AI=>{"use strict";m();T();N();Object.defineProperty(AI,"__esModule",{value:!0});AI.isIterableObject=W3;function W3(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}});var Xd=w(RI=>{"use strict";m();T();N();Object.defineProperty(RI,"__esModule",{value:!0});RI.astFromValue=Wd;var IF=Xt(),X3=Ir(),Z3=Xm(),e6=Da(),Ri=Ft(),zd=wt(),t6=Pa();function Wd(e,t){if((0,zd.isNonNullType)(t)){let n=Wd(e,t.ofType);return(n==null?void 0:n.kind)===Ri.Kind.NULL?null:n}if(e===null)return{kind:Ri.Kind.NULL};if(e===void 0)return null;if((0,zd.isListType)(t)){let n=t.ofType;if((0,Z3.isIterableObject)(e)){let r=[];for(let i of e){let a=Wd(i,n);a!=null&&r.push(a)}return{kind:Ri.Kind.LIST,values:r}}return Wd(e,n)}if((0,zd.isInputObjectType)(t)){if(!(0,e6.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Wd(e[r.name],r.type);i&&n.push({kind:Ri.Kind.OBJECT_FIELD,name:{kind:Ri.Kind.NAME,value:r.name},value:i})}return{kind:Ri.Kind.OBJECT,fields:n}}if((0,zd.isLeafType)(t)){let n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:Ri.Kind.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){let r=String(n);return gF.test(r)?{kind:Ri.Kind.INT,value:r}:{kind:Ri.Kind.FLOAT,value:r}}if(typeof n=="string")return(0,zd.isEnumType)(t)?{kind:Ri.Kind.ENUM,value:n}:t===t6.GraphQLID&&gF.test(n)?{kind:Ri.Kind.INT,value:n}:{kind:Ri.Kind.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${(0,IF.inspect)(n)}.`)}(0,X3.invariant)(!1,"Unexpected input type: "+(0,IF.inspect)(t))}var gF=/^-?(?:0|[1-9][0-9]*)$/});var Fi=w(Zt=>{"use strict";m();T();N();Object.defineProperty(Zt,"__esModule",{value:!0});Zt.introspectionTypes=Zt.__TypeKind=Zt.__Type=Zt.__Schema=Zt.__InputValue=Zt.__Field=Zt.__EnumValue=Zt.__DirectiveLocation=Zt.__Directive=Zt.TypeNameMetaFieldDef=Zt.TypeMetaFieldDef=Zt.TypeKind=Zt.SchemaMetaFieldDef=void 0;Zt.isIntrospectionType=c6;var n6=Xt(),r6=Ir(),Xn=nl(),i6=ci(),a6=Xd(),ke=wt(),cn=Pa(),PI=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:cn.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(Pi))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new ke.GraphQLNonNull(Pi),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Pi,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Pi,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(FI))),resolve:e=>e.getDirectives()}})});Zt.__Schema=PI;var FI=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(cn.GraphQLString),resolve:e=>e.name},description:{type:cn.GraphQLString,resolve:e=>e.description},isRepeatable:{type:new ke.GraphQLNonNull(cn.GraphQLBoolean),resolve:e=>e.isRepeatable},locations:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(wI))),resolve:e=>e.locations},args:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(Zd))),args:{includeDeprecated:{type:cn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})});Zt.__Directive=FI;var wI=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:Xn.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:Xn.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:Xn.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:Xn.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:Xn.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:Xn.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:Xn.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:Xn.DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:Xn.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:Xn.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:Xn.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:Xn.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:Xn.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:Xn.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:Xn.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:Xn.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:Xn.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:Xn.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:Xn.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}});Zt.__DirectiveLocation=wI;var Pi=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(BI),resolve(e){if((0,ke.isScalarType)(e))return Zn.SCALAR;if((0,ke.isObjectType)(e))return Zn.OBJECT;if((0,ke.isInterfaceType)(e))return Zn.INTERFACE;if((0,ke.isUnionType)(e))return Zn.UNION;if((0,ke.isEnumType)(e))return Zn.ENUM;if((0,ke.isInputObjectType)(e))return Zn.INPUT_OBJECT;if((0,ke.isListType)(e))return Zn.LIST;if((0,ke.isNonNullType)(e))return Zn.NON_NULL;(0,r6.invariant)(!1,`Unexpected type: "${(0,n6.inspect)(e)}".`)}},name:{type:cn.GraphQLString,resolve:e=>"name"in e?e.name:void 0},description:{type:cn.GraphQLString,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:cn.GraphQLString,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new ke.GraphQLList(new ke.GraphQLNonNull(LI)),args:{includeDeprecated:{type:cn.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(Pi)),resolve(e){if((0,ke.isObjectType)(e)||(0,ke.isInterfaceType)(e))return e.getInterfaces()}},possibleTypes:{type:new ke.GraphQLList(new ke.GraphQLNonNull(Pi)),resolve(e,t,n,{schema:r}){if((0,ke.isAbstractType)(e))return r.getPossibleTypes(e)}},enumValues:{type:new ke.GraphQLList(new ke.GraphQLNonNull(CI)),args:{includeDeprecated:{type:cn.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(Zd)),args:{includeDeprecated:{type:cn.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:Pi,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:cn.GraphQLBoolean,resolve:e=>{if((0,ke.isInputObjectType)(e))return e.isOneOf}}})});Zt.__Type=Pi;var LI=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(cn.GraphQLString),resolve:e=>e.name},description:{type:cn.GraphQLString,resolve:e=>e.description},args:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(Zd))),args:{includeDeprecated:{type:cn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new ke.GraphQLNonNull(Pi),resolve:e=>e.type},isDeprecated:{type:new ke.GraphQLNonNull(cn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:cn.GraphQLString,resolve:e=>e.deprecationReason}})});Zt.__Field=LI;var Zd=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(cn.GraphQLString),resolve:e=>e.name},description:{type:cn.GraphQLString,resolve:e=>e.description},type:{type:new ke.GraphQLNonNull(Pi),resolve:e=>e.type},defaultValue:{type:cn.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:n}=e,r=(0,a6.astFromValue)(n,t);return r?(0,i6.print)(r):null}},isDeprecated:{type:new ke.GraphQLNonNull(cn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:cn.GraphQLString,resolve:e=>e.deprecationReason}})});Zt.__InputValue=Zd;var CI=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(cn.GraphQLString),resolve:e=>e.name},description:{type:cn.GraphQLString,resolve:e=>e.description},isDeprecated:{type:new ke.GraphQLNonNull(cn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:cn.GraphQLString,resolve:e=>e.deprecationReason}})});Zt.__EnumValue=CI;var Zn;Zt.TypeKind=Zn;(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"})(Zn||(Zt.TypeKind=Zn={}));var BI=new ke.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:Zn.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:Zn.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:Zn.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:Zn.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:Zn.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:Zn.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:Zn.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:Zn.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});Zt.__TypeKind=BI;var s6={name:"__schema",type:new ke.GraphQLNonNull(PI),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};Zt.SchemaMetaFieldDef=s6;var o6={name:"__type",type:Pi,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new ke.GraphQLNonNull(cn.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};Zt.TypeMetaFieldDef=o6;var u6={name:"__typename",type:new ke.GraphQLNonNull(cn.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};Zt.TypeNameMetaFieldDef=u6;var _F=Object.freeze([PI,FI,wI,Pi,LI,Zd,CI,BI]);Zt.introspectionTypes=_F;function c6(e){return _F.some(({name:t})=>e.name===t)}});var Xu=w(ol=>{"use strict";m();T();N();Object.defineProperty(ol,"__esModule",{value:!0});ol.GraphQLSchema=void 0;ol.assertSchema=m6;ol.isSchema=SF;var Zm=Br(),kI=Xt(),l6=Bd(),d6=Da(),p6=Fm(),UI=ba(),ra=wt(),vF=Qr(),f6=Fi();function SF(e){return(0,l6.instanceOf)(e,eN)}function m6(e){if(!SF(e))throw new Error(`Expected ${(0,kI.inspect)(e)} to be a GraphQL schema.`);return e}var eN=class{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,(0,d6.isObjectLike)(t)||(0,Zm.devAssert)(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||(0,Zm.devAssert)(!1,`"types" must be Array if provided but got: ${(0,kI.inspect)(t.types)}.`),!t.directives||Array.isArray(t.directives)||(0,Zm.devAssert)(!1,`"directives" must be Array if provided but got: ${(0,kI.inspect)(t.directives)}.`),this.description=t.description,this.extensions=(0,p6.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:vF.specifiedDirectives;let i=new Set(t.types);if(t.types!=null)for(let a of t.types)i.delete(a),ia(a,i);this._queryType!=null&&ia(this._queryType,i),this._mutationType!=null&&ia(this._mutationType,i),this._subscriptionType!=null&&ia(this._subscriptionType,i);for(let a of this._directives)if((0,vF.isDirective)(a))for(let o of a.args)ia(o.type,i);ia(f6.__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,Zm.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,ra.isInterfaceType)(a)){for(let c of a.getInterfaces())if((0,ra.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,ra.isObjectType)(a)){for(let c of a.getInterfaces())if((0,ra.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 UI.OperationTypeNode.QUERY:return this.getQueryType();case UI.OperationTypeNode.MUTATION:return this.getMutationType();case UI.OperationTypeNode.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return(0,ra.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,ra.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}}};ol.GraphQLSchema=eN;function ia(e,t){let n=(0,ra.getNamedType)(e);if(!t.has(n)){if(t.add(n),(0,ra.isUnionType)(n))for(let r of n.getTypes())ia(r,t);else if((0,ra.isObjectType)(n)||(0,ra.isInterfaceType)(n)){for(let r of n.getInterfaces())ia(r,t);for(let r of Object.values(n.getFields())){ia(r.type,t);for(let i of r.args)ia(i.type,t)}}else if((0,ra.isInputObjectType)(n))for(let r of Object.values(n.getFields()))ia(r.type,t)}return t}});var tp=w(tN=>{"use strict";m();T();N();Object.defineProperty(tN,"__esModule",{value:!0});tN.assertValidSchema=h6;tN.validateSchema=PF;var _r=Xt(),N6=ze(),MI=ba(),OF=$d(),Pn=wt(),RF=Qr(),T6=Fi(),E6=Xu();function PF(e){if((0,E6.assertSchema)(e),e.__validationErrors)return e.__validationErrors;let t=new qI(e);y6(t),I6(t),g6(t);let n=t.getErrors();return e.__validationErrors=n,n}function h6(e){let t=PF(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(cn.GraphQLString),resolve:e=>e.name},description:{type:cn.GraphQLString,resolve:e=>e.description},isRepeatable:{type:new ke.GraphQLNonNull(cn.GraphQLBoolean),resolve:e=>e.isRepeatable},locations:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(wI))),resolve:e=>e.locations},args:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(Zd))),args:{includeDeprecated:{type:cn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})});Zt.__Directive=FI;var wI=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:Xn.DirectiveLocation.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:Xn.DirectiveLocation.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:Xn.DirectiveLocation.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:Xn.DirectiveLocation.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:Xn.DirectiveLocation.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:Xn.DirectiveLocation.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:Xn.DirectiveLocation.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:Xn.DirectiveLocation.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:Xn.DirectiveLocation.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:Xn.DirectiveLocation.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:Xn.DirectiveLocation.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:Xn.DirectiveLocation.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:Xn.DirectiveLocation.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:Xn.DirectiveLocation.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:Xn.DirectiveLocation.UNION,description:"Location adjacent to a union definition."},ENUM:{value:Xn.DirectiveLocation.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:Xn.DirectiveLocation.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:Xn.DirectiveLocation.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:Xn.DirectiveLocation.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}});Zt.__DirectiveLocation=wI;var Pi=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(BI),resolve(e){if((0,ke.isScalarType)(e))return Zn.SCALAR;if((0,ke.isObjectType)(e))return Zn.OBJECT;if((0,ke.isInterfaceType)(e))return Zn.INTERFACE;if((0,ke.isUnionType)(e))return Zn.UNION;if((0,ke.isEnumType)(e))return Zn.ENUM;if((0,ke.isInputObjectType)(e))return Zn.INPUT_OBJECT;if((0,ke.isListType)(e))return Zn.LIST;if((0,ke.isNonNullType)(e))return Zn.NON_NULL;(0,r6.invariant)(!1,`Unexpected type: "${(0,n6.inspect)(e)}".`)}},name:{type:cn.GraphQLString,resolve:e=>"name"in e?e.name:void 0},description:{type:cn.GraphQLString,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:cn.GraphQLString,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new ke.GraphQLList(new ke.GraphQLNonNull(LI)),args:{includeDeprecated:{type:cn.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(Pi)),resolve(e){if((0,ke.isObjectType)(e)||(0,ke.isInterfaceType)(e))return e.getInterfaces()}},possibleTypes:{type:new ke.GraphQLList(new ke.GraphQLNonNull(Pi)),resolve(e,t,n,{schema:r}){if((0,ke.isAbstractType)(e))return r.getPossibleTypes(e)}},enumValues:{type:new ke.GraphQLList(new ke.GraphQLNonNull(CI)),args:{includeDeprecated:{type:cn.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(Zd)),args:{includeDeprecated:{type:cn.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:Pi,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:cn.GraphQLBoolean,resolve:e=>{if((0,ke.isInputObjectType)(e))return e.isOneOf}}})});Zt.__Type=Pi;var LI=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(cn.GraphQLString),resolve:e=>e.name},description:{type:cn.GraphQLString,resolve:e=>e.description},args:{type:new ke.GraphQLNonNull(new ke.GraphQLList(new ke.GraphQLNonNull(Zd))),args:{includeDeprecated:{type:cn.GraphQLBoolean,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new ke.GraphQLNonNull(Pi),resolve:e=>e.type},isDeprecated:{type:new ke.GraphQLNonNull(cn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:cn.GraphQLString,resolve:e=>e.deprecationReason}})});Zt.__Field=LI;var Zd=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(cn.GraphQLString),resolve:e=>e.name},description:{type:cn.GraphQLString,resolve:e=>e.description},type:{type:new ke.GraphQLNonNull(Pi),resolve:e=>e.type},defaultValue:{type:cn.GraphQLString,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:n}=e,r=(0,a6.astFromValue)(n,t);return r?(0,i6.print)(r):null}},isDeprecated:{type:new ke.GraphQLNonNull(cn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:cn.GraphQLString,resolve:e=>e.deprecationReason}})});Zt.__InputValue=Zd;var CI=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(cn.GraphQLString),resolve:e=>e.name},description:{type:cn.GraphQLString,resolve:e=>e.description},isDeprecated:{type:new ke.GraphQLNonNull(cn.GraphQLBoolean),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:cn.GraphQLString,resolve:e=>e.deprecationReason}})});Zt.__EnumValue=CI;var Zn;Zt.TypeKind=Zn;(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"})(Zn||(Zt.TypeKind=Zn={}));var BI=new ke.GraphQLEnumType({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:Zn.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:Zn.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:Zn.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:Zn.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:Zn.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:Zn.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:Zn.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:Zn.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}});Zt.__TypeKind=BI;var s6={name:"__schema",type:new ke.GraphQLNonNull(PI),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};Zt.SchemaMetaFieldDef=s6;var o6={name:"__type",type:Pi,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new ke.GraphQLNonNull(cn.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};Zt.TypeMetaFieldDef=o6;var u6={name:"__typename",type:new ke.GraphQLNonNull(cn.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};Zt.TypeNameMetaFieldDef=u6;var _F=Object.freeze([PI,FI,wI,Pi,LI,Zd,CI,BI]);Zt.introspectionTypes=_F;function c6(e){return _F.some(({name:t})=>e.name===t)}});var Xu=w(ul=>{"use strict";m();T();N();Object.defineProperty(ul,"__esModule",{value:!0});ul.GraphQLSchema=void 0;ul.assertSchema=m6;ul.isSchema=SF;var Zm=Br(),kI=Xt(),l6=Bd(),d6=Da(),p6=Fm(),UI=ba(),ra=wt(),vF=Qr(),f6=Fi();function SF(e){return(0,l6.instanceOf)(e,eN)}function m6(e){if(!SF(e))throw new Error(`Expected ${(0,kI.inspect)(e)} to be a GraphQL schema.`);return e}var eN=class{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,(0,d6.isObjectLike)(t)||(0,Zm.devAssert)(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||(0,Zm.devAssert)(!1,`"types" must be Array if provided but got: ${(0,kI.inspect)(t.types)}.`),!t.directives||Array.isArray(t.directives)||(0,Zm.devAssert)(!1,`"directives" must be Array if provided but got: ${(0,kI.inspect)(t.directives)}.`),this.description=t.description,this.extensions=(0,p6.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:vF.specifiedDirectives;let i=new Set(t.types);if(t.types!=null)for(let a of t.types)i.delete(a),ia(a,i);this._queryType!=null&&ia(this._queryType,i),this._mutationType!=null&&ia(this._mutationType,i),this._subscriptionType!=null&&ia(this._subscriptionType,i);for(let a of this._directives)if((0,vF.isDirective)(a))for(let o of a.args)ia(o.type,i);ia(f6.__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,Zm.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,ra.isInterfaceType)(a)){for(let c of a.getInterfaces())if((0,ra.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,ra.isObjectType)(a)){for(let c of a.getInterfaces())if((0,ra.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 UI.OperationTypeNode.QUERY:return this.getQueryType();case UI.OperationTypeNode.MUTATION:return this.getMutationType();case UI.OperationTypeNode.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return(0,ra.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,ra.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}}};ul.GraphQLSchema=eN;function ia(e,t){let n=(0,ra.getNamedType)(e);if(!t.has(n)){if(t.add(n),(0,ra.isUnionType)(n))for(let r of n.getTypes())ia(r,t);else if((0,ra.isObjectType)(n)||(0,ra.isInterfaceType)(n)){for(let r of n.getInterfaces())ia(r,t);for(let r of Object.values(n.getFields())){ia(r.type,t);for(let i of r.args)ia(i.type,t)}}else if((0,ra.isInputObjectType)(n))for(let r of Object.values(n.getFields()))ia(r.type,t)}return t}});var tp=w(tN=>{"use strict";m();T();N();Object.defineProperty(tN,"__esModule",{value:!0});tN.assertValidSchema=h6;tN.validateSchema=PF;var _r=Xt(),N6=ze(),MI=ba(),OF=$d(),Pn=wt(),RF=Qr(),T6=Fi(),E6=Xu();function PF(e){if((0,E6.assertSchema)(e),e.__validationErrors)return e.__validationErrors;let t=new qI(e);y6(t),I6(t),g6(t);let n=t.getErrors();return e.__validationErrors=n,n}function h6(e){let t=PF(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` -`))}var qI=class{constructor(t){this._errors=[],this.schema=t}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new N6.GraphQLError(t,{nodes:r}))}getErrors(){return this._errors}};function y6(e){let t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!(0,Pn.isObjectType)(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${(0,_r.inspect)(n)}.`,(r=xI(t,MI.OperationTypeNode.QUERY))!==null&&r!==void 0?r:n.astNode)}let i=t.getMutationType();if(i&&!(0,Pn.isObjectType)(i)){var a;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${(0,_r.inspect)(i)}.`,(a=xI(t,MI.OperationTypeNode.MUTATION))!==null&&a!==void 0?a:i.astNode)}let o=t.getSubscriptionType();if(o&&!(0,Pn.isObjectType)(o)){var c;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${(0,_r.inspect)(o)}.`,(c=xI(t,MI.OperationTypeNode.SUBSCRIPTION))!==null&&c!==void 0?c:o.astNode)}}function xI(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 I6(e){for(let n of e.schema.getDirectives()){if(!(0,RF.isDirective)(n)){e.reportError(`Expected directive but got: ${(0,_r.inspect)(n)}.`,n==null?void 0:n.astNode);continue}Zu(e,n);for(let r of n.args)if(Zu(e,r),(0,Pn.isInputType)(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${(0,_r.inspect)(r.type)}.`,r.astNode),(0,Pn.isRequiredArgument)(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[VI(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function Zu(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function g6(e){let t=A6(e),n=e.schema.getTypeMap();for(let r of Object.values(n)){if(!(0,Pn.isNamedType)(r)){e.reportError(`Expected GraphQL named type but got: ${(0,_r.inspect)(r)}.`,r.astNode);continue}(0,T6.isIntrospectionType)(r)||Zu(e,r),(0,Pn.isObjectType)(r)||(0,Pn.isInterfaceType)(r)?(DF(e,r),bF(e,r)):(0,Pn.isUnionType)(r)?S6(e,r):(0,Pn.isEnumType)(r)?O6(e,r):(0,Pn.isInputObjectType)(r)&&(D6(e,r),t(r))}}function DF(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(Zu(e,o),!(0,Pn.isOutputType)(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${(0,_r.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(Zu(e,c),!(0,Pn.isInputType)(c.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${l}:) must be Input Type but got: ${(0,_r.inspect)(c.type)}.`,(i=c.astNode)===null||i===void 0?void 0:i.type)}if((0,Pn.isRequiredArgument)(c)&&c.deprecationReason!=null){var a;e.reportError(`Required argument ${t.name}.${o.name}(${l}:) cannot be deprecated.`,[VI(c.astNode),(a=c.astNode)===null||a===void 0?void 0:a.type])}}}}function bF(e,t){let n=Object.create(null);for(let r of t.getInterfaces()){if(!(0,Pn.isInterfaceType)(r)){e.reportError(`Type ${(0,_r.inspect)(t)} must only implement Interface types, it cannot implement ${(0,_r.inspect)(r)}.`,ep(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,ep(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,ep(t,r));continue}n[r.name]=!0,v6(e,t,r),_6(e,t,r)}}function _6(e,t,n){let r=t.getFields();for(let l of Object.values(n.getFields())){let d=l.name,f=r[d];if(!f){e.reportError(`Interface field ${n.name}.${d} expected but ${t.name} does not provide it.`,[l.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!(0,OF.isTypeSubTypeOf)(e.schema,f.type,l.type)){var i,a;e.reportError(`Interface field ${n.name}.${d} expects type ${(0,_r.inspect)(l.type)} but ${t.name}.${d} is type ${(0,_r.inspect)(f.type)}.`,[(i=l.astNode)===null||i===void 0?void 0:i.type,(a=f.astNode)===null||a===void 0?void 0:a.type])}for(let y of l.args){let I=y.name,v=f.args.find(F=>F.name===I);if(!v){e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expected but ${t.name}.${d} does not provide it.`,[y.astNode,f.astNode]);continue}if(!(0,OF.isEqualType)(y.type,v.type)){var o,c;e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expects type ${(0,_r.inspect)(y.type)} but ${t.name}.${d}(${I}:) is type ${(0,_r.inspect)(v.type)}.`,[(o=y.astNode)===null||o===void 0?void 0:o.type,(c=v.astNode)===null||c===void 0?void 0:c.type])}}for(let y of f.args){let I=y.name;!l.args.find(F=>F.name===I)&&(0,Pn.isRequiredArgument)(y)&&e.reportError(`Object field ${t.name}.${d} includes required argument ${I} that is missing from the Interface field ${n.name}.${d}.`,[y.astNode,l.astNode])}}}function v6(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}.`,[...ep(n,i),...ep(t,n)])}function S6(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.`,AF(t,i.name));continue}r[i.name]=!0,(0,Pn.isObjectType)(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${(0,_r.inspect)(i)}.`,AF(t,String(i)))}}function O6(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)Zu(e,r)}function D6(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(Zu(e,a),!(0,Pn.isInputType)(a.type)){var r;e.reportError(`The type of ${t.name}.${a.name} must be Input Type but got: ${(0,_r.inspect)(a.type)}.`,(r=a.astNode)===null||r===void 0?void 0:r.type)}if((0,Pn.isRequiredInputField)(a)&&a.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${a.name} cannot be deprecated.`,[VI(a.astNode),(i=a.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&b6(t,a,e)}}function b6(e,t,n){if((0,Pn.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 A6(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,Pn.isNonNullType)(c.type)&&(0,Pn.isInputObjectType)(c.type.ofType)){let l=c.type.ofType,d=r[l.name];if(n.push(c),d===void 0)i(l);else{let f=n.slice(d),y=f.map(I=>I.name).join(".");e.reportError(`Cannot reference Input Object "${l.name}" within itself through a series of non-null fields: "${y}".`,f.map(I=>I.astNode))}n.pop()}r[a.name]=void 0}}function ep(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 AF(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 VI(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===RF.GraphQLDeprecatedDirective.name)}});var Fa=w(GI=>{"use strict";m();T();N();Object.defineProperty(GI,"__esModule",{value:!0});GI.typeFromAST=KI;var jI=Ft(),FF=wt();function KI(e,t){switch(t.kind){case jI.Kind.LIST_TYPE:{let n=KI(e,t.type);return n&&new FF.GraphQLList(n)}case jI.Kind.NON_NULL_TYPE:{let n=KI(e,t.type);return n&&new FF.GraphQLNonNull(n)}case jI.Kind.NAMED_TYPE:return e.getType(t.name.value)}}});var nN=w(np=>{"use strict";m();T();N();Object.defineProperty(np,"__esModule",{value:!0});np.TypeInfo=void 0;np.visitWithTypeInfo=F6;var R6=ba(),Fn=Ft(),wF=Qu(),wn=wt(),ul=Fi(),LF=Fa(),$I=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:P6,n&&((0,wn.isInputType)(n)&&this._inputTypeStack.push(n),(0,wn.isCompositeType)(n)&&this._parentTypeStack.push(n),(0,wn.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 Fn.Kind.SELECTION_SET:{let i=(0,wn.getNamedType)(this.getType());this._parentTypeStack.push((0,wn.isCompositeType)(i)?i:void 0);break}case Fn.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,wn.isOutputType)(o)?o:void 0);break}case Fn.Kind.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case Fn.Kind.OPERATION_DEFINITION:{let i=n.getRootType(t.operation);this._typeStack.push((0,wn.isObjectType)(i)?i:void 0);break}case Fn.Kind.INLINE_FRAGMENT:case Fn.Kind.FRAGMENT_DEFINITION:{let i=t.typeCondition,a=i?(0,LF.typeFromAST)(n,i):(0,wn.getNamedType)(this.getType());this._typeStack.push((0,wn.isOutputType)(a)?a:void 0);break}case Fn.Kind.VARIABLE_DEFINITION:{let i=(0,LF.typeFromAST)(n,t.type);this._inputTypeStack.push((0,wn.isInputType)(i)?i:void 0);break}case Fn.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,wn.isInputType)(a)?a:void 0);break}case Fn.Kind.LIST:{let i=(0,wn.getNullableType)(this.getInputType()),a=(0,wn.isListType)(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push((0,wn.isInputType)(a)?a:void 0);break}case Fn.Kind.OBJECT_FIELD:{let i=(0,wn.getNamedType)(this.getInputType()),a,o;(0,wn.isInputObjectType)(i)&&(o=i.getFields()[t.name.value],o&&(a=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push((0,wn.isInputType)(a)?a:void 0);break}case Fn.Kind.ENUM:{let i=(0,wn.getNamedType)(this.getInputType()),a;(0,wn.isEnumType)(i)&&(a=i.getValue(t.value)),this._enumValue=a;break}default:}}leave(t){switch(t.kind){case Fn.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Fn.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Fn.Kind.DIRECTIVE:this._directive=null;break;case Fn.Kind.OPERATION_DEFINITION:case Fn.Kind.INLINE_FRAGMENT:case Fn.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Fn.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Fn.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Fn.Kind.LIST:case Fn.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Fn.Kind.ENUM:this._enumValue=null;break;default:}}};np.TypeInfo=$I;function P6(e,t,n){let r=n.name.value;if(r===ul.SchemaMetaFieldDef.name&&e.getQueryType()===t)return ul.SchemaMetaFieldDef;if(r===ul.TypeMetaFieldDef.name&&e.getQueryType()===t)return ul.TypeMetaFieldDef;if(r===ul.TypeNameMetaFieldDef.name&&(0,wn.isCompositeType)(t))return ul.TypeNameMetaFieldDef;if((0,wn.isObjectType)(t)||(0,wn.isInterfaceType)(t))return t.getFields()[r]}function F6(e,t){return{enter(...n){let r=n[0];e.enter(r);let i=(0,wF.getEnterLeaveForKind)(t,r.kind).enter;if(i){let a=i.apply(t,n);return a!==void 0&&(e.leave(r),(0,R6.isNode)(a)&&e.enter(a)),a}},leave(...n){let r=n[0],i=(0,wF.getEnterLeaveForKind)(t,r.kind).leave,a;return i&&(a=i.apply(t,n)),e.leave(r),a}}}});var ec=w(wi=>{"use strict";m();T();N();Object.defineProperty(wi,"__esModule",{value:!0});wi.isConstValueNode=QI;wi.isDefinitionNode=w6;wi.isExecutableDefinitionNode=CF;wi.isSelectionNode=L6;wi.isTypeDefinitionNode=kF;wi.isTypeExtensionNode=xF;wi.isTypeNode=C6;wi.isTypeSystemDefinitionNode=UF;wi.isTypeSystemExtensionNode=MF;wi.isValueNode=BF;var Lt=Ft();function w6(e){return CF(e)||UF(e)||MF(e)}function CF(e){return e.kind===Lt.Kind.OPERATION_DEFINITION||e.kind===Lt.Kind.FRAGMENT_DEFINITION}function L6(e){return e.kind===Lt.Kind.FIELD||e.kind===Lt.Kind.FRAGMENT_SPREAD||e.kind===Lt.Kind.INLINE_FRAGMENT}function BF(e){return e.kind===Lt.Kind.VARIABLE||e.kind===Lt.Kind.INT||e.kind===Lt.Kind.FLOAT||e.kind===Lt.Kind.STRING||e.kind===Lt.Kind.BOOLEAN||e.kind===Lt.Kind.NULL||e.kind===Lt.Kind.ENUM||e.kind===Lt.Kind.LIST||e.kind===Lt.Kind.OBJECT}function QI(e){return BF(e)&&(e.kind===Lt.Kind.LIST?e.values.some(QI):e.kind===Lt.Kind.OBJECT?e.fields.some(t=>QI(t.value)):e.kind!==Lt.Kind.VARIABLE)}function C6(e){return e.kind===Lt.Kind.NAMED_TYPE||e.kind===Lt.Kind.LIST_TYPE||e.kind===Lt.Kind.NON_NULL_TYPE}function UF(e){return e.kind===Lt.Kind.SCHEMA_DEFINITION||kF(e)||e.kind===Lt.Kind.DIRECTIVE_DEFINITION}function kF(e){return e.kind===Lt.Kind.SCALAR_TYPE_DEFINITION||e.kind===Lt.Kind.OBJECT_TYPE_DEFINITION||e.kind===Lt.Kind.INTERFACE_TYPE_DEFINITION||e.kind===Lt.Kind.UNION_TYPE_DEFINITION||e.kind===Lt.Kind.ENUM_TYPE_DEFINITION||e.kind===Lt.Kind.INPUT_OBJECT_TYPE_DEFINITION}function MF(e){return e.kind===Lt.Kind.SCHEMA_EXTENSION||xF(e)}function xF(e){return e.kind===Lt.Kind.SCALAR_TYPE_EXTENSION||e.kind===Lt.Kind.OBJECT_TYPE_EXTENSION||e.kind===Lt.Kind.INTERFACE_TYPE_EXTENSION||e.kind===Lt.Kind.UNION_TYPE_EXTENSION||e.kind===Lt.Kind.ENUM_TYPE_EXTENSION||e.kind===Lt.Kind.INPUT_OBJECT_TYPE_EXTENSION}});var JI=w(YI=>{"use strict";m();T();N();Object.defineProperty(YI,"__esModule",{value:!0});YI.ExecutableDefinitionsRule=k6;var B6=ze(),qF=Ft(),U6=ec();function k6(e){return{Document(t){for(let n of t.definitions)if(!(0,U6.isExecutableDefinitionNode)(n)){let r=n.kind===qF.Kind.SCHEMA_DEFINITION||n.kind===qF.Kind.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new B6.GraphQLError(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}});var zI=w(HI=>{"use strict";m();T();N();Object.defineProperty(HI,"__esModule",{value:!0});HI.FieldsOnCorrectTypeRule=V6;var VF=eu(),M6=xd(),x6=nu(),q6=ze(),rp=wt();function V6(e){return{Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),a=t.name.value,o=(0,VF.didYouMean)("to use an inline fragment on",j6(i,n,a));o===""&&(o=(0,VF.didYouMean)(K6(n,a))),e.reportError(new q6.GraphQLError(`Cannot query field "${a}" on type "${n.name}".`+o,{nodes:t}))}}}}function j6(e,t,n){if(!(0,rp.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,rp.isInterfaceType)(o)&&e.isSubType(o,c)?-1:(0,rp.isInterfaceType)(c)&&e.isSubType(c,o)?1:(0,M6.naturalCompare)(o.name,c.name)}).map(o=>o.name)}function K6(e,t){if((0,rp.isObjectType)(e)||(0,rp.isInterfaceType)(e)){let n=Object.keys(e.getFields());return(0,x6.suggestionList)(t,n)}return[]}});var XI=w(WI=>{"use strict";m();T();N();Object.defineProperty(WI,"__esModule",{value:!0});WI.FragmentsOnCompositeTypesRule=G6;var jF=ze(),KF=ci(),GF=wt(),$F=Fa();function G6(e){return{InlineFragment(t){let n=t.typeCondition;if(n){let r=(0,$F.typeFromAST)(e.getSchema(),n);if(r&&!(0,GF.isCompositeType)(r)){let i=(0,KF.print)(n);e.reportError(new jF.GraphQLError(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){let n=(0,$F.typeFromAST)(e.getSchema(),t.typeCondition);if(n&&!(0,GF.isCompositeType)(n)){let r=(0,KF.print)(t.typeCondition);e.reportError(new jF.GraphQLError(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}});var ZI=w(rN=>{"use strict";m();T();N();Object.defineProperty(rN,"__esModule",{value:!0});rN.KnownArgumentNamesOnDirectivesRule=HF;rN.KnownArgumentNamesRule=Y6;var QF=eu(),YF=nu(),JF=ze(),$6=Ft(),Q6=Qr();function Y6(e){return Q(x({},HF(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,YF.suggestionList)(a,o);e.reportError(new JF.GraphQLError(`Unknown argument "${a}" on field "${i.name}.${r.name}".`+(0,QF.didYouMean)(c),{nodes:t}))}}})}function HF(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Q6.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===$6.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 f=d.name.value;if(!l.includes(f)){let y=(0,YF.suggestionList)(f,l);e.reportError(new JF.GraphQLError(`Unknown argument "${f}" on directive "@${c}".`+(0,QF.didYouMean)(y),{nodes:d}))}}return!1}}}});var rg=w(ng=>{"use strict";m();T();N();Object.defineProperty(ng,"__esModule",{value:!0});ng.KnownDirectivesRule=z6;var J6=Xt(),eg=Ir(),zF=ze(),tg=ba(),er=tl(),hn=Ft(),H6=Qr();function z6(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():H6.specifiedDirectives;for(let a of r)t[a.name]=a.locations;let i=e.getDocument().definitions;for(let a of i)a.kind===hn.Kind.DIRECTIVE_DEFINITION&&(t[a.name.value]=a.locations.map(o=>o.value));return{Directive(a,o,c,l,d){let f=a.name.value,y=t[f];if(!y){e.reportError(new zF.GraphQLError(`Unknown directive "@${f}".`,{nodes:a}));return}let I=W6(d);I&&!y.includes(I)&&e.reportError(new zF.GraphQLError(`Directive "@${f}" may not be used on ${I}.`,{nodes:a}))}}}function W6(e){let t=e[e.length-1];switch("kind"in t||(0,eg.invariant)(!1),t.kind){case hn.Kind.OPERATION_DEFINITION:return X6(t.operation);case hn.Kind.FIELD:return er.DirectiveLocation.FIELD;case hn.Kind.FRAGMENT_SPREAD:return er.DirectiveLocation.FRAGMENT_SPREAD;case hn.Kind.INLINE_FRAGMENT:return er.DirectiveLocation.INLINE_FRAGMENT;case hn.Kind.FRAGMENT_DEFINITION:return er.DirectiveLocation.FRAGMENT_DEFINITION;case hn.Kind.VARIABLE_DEFINITION:return er.DirectiveLocation.VARIABLE_DEFINITION;case hn.Kind.SCHEMA_DEFINITION:case hn.Kind.SCHEMA_EXTENSION:return er.DirectiveLocation.SCHEMA;case hn.Kind.SCALAR_TYPE_DEFINITION:case hn.Kind.SCALAR_TYPE_EXTENSION:return er.DirectiveLocation.SCALAR;case hn.Kind.OBJECT_TYPE_DEFINITION:case hn.Kind.OBJECT_TYPE_EXTENSION:return er.DirectiveLocation.OBJECT;case hn.Kind.FIELD_DEFINITION:return er.DirectiveLocation.FIELD_DEFINITION;case hn.Kind.INTERFACE_TYPE_DEFINITION:case hn.Kind.INTERFACE_TYPE_EXTENSION:return er.DirectiveLocation.INTERFACE;case hn.Kind.UNION_TYPE_DEFINITION:case hn.Kind.UNION_TYPE_EXTENSION:return er.DirectiveLocation.UNION;case hn.Kind.ENUM_TYPE_DEFINITION:case hn.Kind.ENUM_TYPE_EXTENSION:return er.DirectiveLocation.ENUM;case hn.Kind.ENUM_VALUE_DEFINITION:return er.DirectiveLocation.ENUM_VALUE;case hn.Kind.INPUT_OBJECT_TYPE_DEFINITION:case hn.Kind.INPUT_OBJECT_TYPE_EXTENSION:return er.DirectiveLocation.INPUT_OBJECT;case hn.Kind.INPUT_VALUE_DEFINITION:{let n=e[e.length-3];return"kind"in n||(0,eg.invariant)(!1),n.kind===hn.Kind.INPUT_OBJECT_TYPE_DEFINITION?er.DirectiveLocation.INPUT_FIELD_DEFINITION:er.DirectiveLocation.ARGUMENT_DEFINITION}default:(0,eg.invariant)(!1,"Unexpected kind: "+(0,J6.inspect)(t.kind))}}function X6(e){switch(e){case tg.OperationTypeNode.QUERY:return er.DirectiveLocation.QUERY;case tg.OperationTypeNode.MUTATION:return er.DirectiveLocation.MUTATION;case tg.OperationTypeNode.SUBSCRIPTION:return er.DirectiveLocation.SUBSCRIPTION}}});var ag=w(ig=>{"use strict";m();T();N();Object.defineProperty(ig,"__esModule",{value:!0});ig.KnownFragmentNamesRule=ez;var Z6=ze();function ez(e){return{FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new Z6.GraphQLError(`Unknown fragment "${n}".`,{nodes:t.name}))}}}});var ug=w(og=>{"use strict";m();T();N();Object.defineProperty(og,"__esModule",{value:!0});og.KnownTypeNamesRule=sz;var tz=eu(),nz=nu(),rz=ze(),sg=ec(),iz=Fi(),az=Pa();function sz(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let a of e.getDocument().definitions)(0,sg.isTypeDefinitionNode)(a)&&(r[a.name.value]=!0);let i=[...Object.keys(n),...Object.keys(r)];return{NamedType(a,o,c,l,d){let f=a.name.value;if(!n[f]&&!r[f]){var y;let I=(y=d[2])!==null&&y!==void 0?y:c,v=I!=null&&oz(I);if(v&&WF.includes(f))return;let F=(0,nz.suggestionList)(f,v?WF.concat(i):i);e.reportError(new rz.GraphQLError(`Unknown type "${f}".`+(0,tz.didYouMean)(F),{nodes:a}))}}}}var WF=[...az.specifiedScalarTypes,...iz.introspectionTypes].map(e=>e.name);function oz(e){return"kind"in e&&((0,sg.isTypeSystemDefinitionNode)(e)||(0,sg.isTypeSystemExtensionNode)(e))}});var lg=w(cg=>{"use strict";m();T();N();Object.defineProperty(cg,"__esModule",{value:!0});cg.LoneAnonymousOperationRule=lz;var uz=ze(),cz=Ft();function lz(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===cz.Kind.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new uz.GraphQLError("This anonymous operation must be the only defined operation.",{nodes:n}))}}}});var pg=w(dg=>{"use strict";m();T();N();Object.defineProperty(dg,"__esModule",{value:!0});dg.LoneSchemaDefinitionRule=dz;var XF=ze();function dz(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 XF.GraphQLError("Cannot define a new schema within a schema extension.",{nodes:c}));return}o>0&&e.reportError(new XF.GraphQLError("Must provide only one schema definition.",{nodes:c})),++o}}}});var mg=w(fg=>{"use strict";m();T();N();Object.defineProperty(fg,"__esModule",{value:!0});fg.MaxIntrospectionDepthRule=mz;var pz=ze(),ZF=Ft(),fz=3;function mz(e){function t(n,r=Object.create(null),i=0){if(n.kind===ZF.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===ZF.Kind.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=fz))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 pz.GraphQLError("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}});var Tg=w(Ng=>{"use strict";m();T();N();Object.defineProperty(Ng,"__esModule",{value:!0});Ng.NoFragmentCyclesRule=Tz;var Nz=ze();function Tz(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,f=r[d];if(n.push(l),f===void 0){let y=e.getFragment(d);y&&i(y)}else{let y=n.slice(f),I=y.slice(0,-1).map(v=>'"'+v.name.value+'"').join(", ");e.reportError(new Nz.GraphQLError(`Cannot spread fragment "${d}" within itself`+(I!==""?` via ${I}.`:"."),{nodes:y}))}n.pop()}r[o]=void 0}}}});var hg=w(Eg=>{"use strict";m();T();N();Object.defineProperty(Eg,"__esModule",{value:!0});Eg.NoUndefinedVariablesRule=hz;var Ez=ze();function hz(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 Ez.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 Ig=w(yg=>{"use strict";m();T();N();Object.defineProperty(yg,"__esModule",{value:!0});yg.NoUnusedFragmentsRule=Iz;var yz=ze();function Iz(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 yz.GraphQLError(`Fragment "${a}" is never used.`,{nodes:i}))}}}}}});var _g=w(gg=>{"use strict";m();T();N();Object.defineProperty(gg,"__esModule",{value:!0});gg.NoUnusedVariablesRule=_z;var gz=ze();function _z(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 gz.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 Og=w(Sg=>{"use strict";m();T();N();Object.defineProperty(Sg,"__esModule",{value:!0});Sg.sortValueNode=vg;var vz=xd(),hs=Ft();function vg(e){switch(e.kind){case hs.Kind.OBJECT:return Q(x({},e),{fields:Sz(e.fields)});case hs.Kind.LIST:return Q(x({},e),{values:e.values.map(vg)});case hs.Kind.INT:case hs.Kind.FLOAT:case hs.Kind.STRING:case hs.Kind.BOOLEAN:case hs.Kind.NULL:case hs.Kind.ENUM:case hs.Kind.VARIABLE:return e}}function Sz(e){return e.map(t=>Q(x({},t),{value:vg(t.value)})).sort((t,n)=>(0,vz.naturalCompare)(t.name.value,n.name.value))}});var wg=w(Fg=>{"use strict";m();T();N();Object.defineProperty(Fg,"__esModule",{value:!0});Fg.OverlappingFieldsCanBeMergedRule=Az;var ew=Xt(),Oz=ze(),Dg=Ft(),Dz=ci(),Yr=wt(),bz=Og(),nw=Fa();function rw(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+rw(n)).join(" and "):e}function Az(e){let t=new Rg,n=new Map;return{SelectionSet(r){let i=Rz(e,n,t,e.getParentType(),r);for(let[[a,o],c,l]of i){let d=rw(o);e.reportError(new Oz.GraphQLError(`Fields "${a}" conflict because ${d}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:c.concat(l)}))}}}}function Rz(e,t,n,r,i){let a=[],[o,c]=sN(e,t,r,i);if(Fz(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:tw(o)===tw(c)})}function tw(e){return(0,Dz.print)((0,bz.sortValueNode)(e))}function bg(e,t){return(0,Yr.isListType)(e)?(0,Yr.isListType)(t)?bg(e.ofType,t.ofType):!0:(0,Yr.isListType)(t)?!0:(0,Yr.isNonNullType)(e)?(0,Yr.isNonNullType)(t)?bg(e.ofType,t.ofType):!0:(0,Yr.isNonNullType)(t)?!0:(0,Yr.isLeafType)(e)||(0,Yr.isLeafType)(t)?e!==t:!1}function sN(e,t,n,r){let i=t.get(r);if(i)return i;let a=Object.create(null),o=Object.create(null);aw(e,n,r,a,o);let c=[a,Object.keys(o)];return t.set(r,c),c}function Ag(e,t,n){let r=t.get(n.selectionSet);if(r)return r;let i=(0,nw.typeFromAST)(e.getSchema(),n.typeCondition);return sN(e,t,i,n.selectionSet)}function aw(e,t,n,r,i){for(let a of n.selections)switch(a.kind){case Dg.Kind.FIELD:{let o=a.name.value,c;((0,Yr.isObjectType)(t)||(0,Yr.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 Dg.Kind.FRAGMENT_SPREAD:i[a.name.value]=!0;break;case Dg.Kind.INLINE_FRAGMENT:{let o=a.typeCondition,c=o?(0,nw.typeFromAST)(e.getSchema(),o):t;aw(e,c,a.selectionSet,r,i);break}}}function Lz(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 Rg=class{constructor(){this._data=new Map}has(t,n,r){var i;let[a,o]=t{"use strict";m();T();N();Object.defineProperty(Cg,"__esModule",{value:!0});Cg.PossibleFragmentSpreadsRule=Bz;var oN=Xt(),sw=ze(),Lg=wt(),ow=$d(),Cz=Fa();function Bz(e){return{InlineFragment(t){let n=e.getType(),r=e.getParentType();if((0,Lg.isCompositeType)(n)&&(0,Lg.isCompositeType)(r)&&!(0,ow.doTypesOverlap)(e.getSchema(),n,r)){let i=(0,oN.inspect)(r),a=(0,oN.inspect)(n);e.reportError(new sw.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=Uz(e,n),i=e.getParentType();if(r&&i&&!(0,ow.doTypesOverlap)(e.getSchema(),r,i)){let a=(0,oN.inspect)(i),o=(0,oN.inspect)(r);e.reportError(new sw.GraphQLError(`Fragment "${n}" cannot be spread here as objects of type "${a}" can never be of type "${o}".`,{nodes:t}))}}}}function Uz(e,t){let n=e.getFragment(t);if(n){let r=(0,Cz.typeFromAST)(e.getSchema(),n.typeCondition);if((0,Lg.isCompositeType)(r))return r}}});var kg=w(Ug=>{"use strict";m();T();N();Object.defineProperty(Ug,"__esModule",{value:!0});Ug.PossibleTypeExtensionsRule=qz;var kz=eu(),cw=Xt(),lw=Ir(),Mz=nu(),uw=ze(),gn=Ft(),xz=ec(),cl=wt();function qz(e){let t=e.getSchema(),n=Object.create(null);for(let i of e.getDocument().definitions)(0,xz.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=Vz[o.kind]:c&&(l=jz(c)),l){if(l!==i.kind){let d=Kz(i.kind);e.reportError(new uw.GraphQLError(`Cannot extend non-${d} type "${a}".`,{nodes:o?[o,i]:i}))}}else{let d=Object.keys(x(x({},n),t==null?void 0:t.getTypeMap())),f=(0,Mz.suggestionList)(a,d);e.reportError(new uw.GraphQLError(`Cannot extend type "${a}" because it is not defined.`+(0,kz.didYouMean)(f),{nodes:i.name}))}}}var Vz={[gn.Kind.SCALAR_TYPE_DEFINITION]:gn.Kind.SCALAR_TYPE_EXTENSION,[gn.Kind.OBJECT_TYPE_DEFINITION]:gn.Kind.OBJECT_TYPE_EXTENSION,[gn.Kind.INTERFACE_TYPE_DEFINITION]:gn.Kind.INTERFACE_TYPE_EXTENSION,[gn.Kind.UNION_TYPE_DEFINITION]:gn.Kind.UNION_TYPE_EXTENSION,[gn.Kind.ENUM_TYPE_DEFINITION]:gn.Kind.ENUM_TYPE_EXTENSION,[gn.Kind.INPUT_OBJECT_TYPE_DEFINITION]:gn.Kind.INPUT_OBJECT_TYPE_EXTENSION};function jz(e){if((0,cl.isScalarType)(e))return gn.Kind.SCALAR_TYPE_EXTENSION;if((0,cl.isObjectType)(e))return gn.Kind.OBJECT_TYPE_EXTENSION;if((0,cl.isInterfaceType)(e))return gn.Kind.INTERFACE_TYPE_EXTENSION;if((0,cl.isUnionType)(e))return gn.Kind.UNION_TYPE_EXTENSION;if((0,cl.isEnumType)(e))return gn.Kind.ENUM_TYPE_EXTENSION;if((0,cl.isInputObjectType)(e))return gn.Kind.INPUT_OBJECT_TYPE_EXTENSION;(0,lw.invariant)(!1,"Unexpected type: "+(0,cw.inspect)(e))}function Kz(e){switch(e){case gn.Kind.SCALAR_TYPE_EXTENSION:return"scalar";case gn.Kind.OBJECT_TYPE_EXTENSION:return"object";case gn.Kind.INTERFACE_TYPE_EXTENSION:return"interface";case gn.Kind.UNION_TYPE_EXTENSION:return"union";case gn.Kind.ENUM_TYPE_EXTENSION:return"enum";case gn.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,lw.invariant)(!1,"Unexpected kind: "+(0,cw.inspect)(e))}}});var xg=w(uN=>{"use strict";m();T();N();Object.defineProperty(uN,"__esModule",{value:!0});uN.ProvidedRequiredArgumentsOnDirectivesRule=Nw;uN.ProvidedRequiredArgumentsRule=Qz;var pw=Xt(),dw=tu(),fw=ze(),mw=Ft(),Gz=ci(),Mg=wt(),$z=Qr();function Qz(e){return Q(x({},Nw(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,Mg.isRequiredArgument)(a)){let o=(0,pw.inspect)(a.type);e.reportError(new fw.GraphQLError(`Field "${r.name}" argument "${a.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}})}function Nw(e){var t;let n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:$z.specifiedDirectives;for(let c of i)n[c.name]=(0,dw.keyMap)(c.args.filter(Mg.isRequiredArgument),l=>l.name);let a=e.getDocument().definitions;for(let c of a)if(c.kind===mw.Kind.DIRECTIVE_DEFINITION){var o;let l=(o=c.arguments)!==null&&o!==void 0?o:[];n[c.name.value]=(0,dw.keyMap)(l.filter(Yz),d=>d.name.value)}return{Directive:{leave(c){let l=c.name.value,d=n[l];if(d){var f;let y=(f=c.arguments)!==null&&f!==void 0?f:[],I=new Set(y.map(v=>v.name.value));for(let[v,F]of Object.entries(d))if(!I.has(v)){let k=(0,Mg.isType)(F.type)?(0,pw.inspect)(F.type):(0,Gz.print)(F.type);e.reportError(new fw.GraphQLError(`Directive "@${l}" argument "${v}" of type "${k}" is required, but it was not provided.`,{nodes:c}))}}}}}}function Yz(e){return e.type.kind===mw.Kind.NON_NULL_TYPE&&e.defaultValue==null}});var Vg=w(qg=>{"use strict";m();T();N();Object.defineProperty(qg,"__esModule",{value:!0});qg.ScalarLeafsRule=Jz;var Tw=Xt(),Ew=ze(),hw=wt();function Jz(e){return{Field(t){let n=e.getType(),r=t.selectionSet;if(n){if((0,hw.isLeafType)((0,hw.getNamedType)(n))){if(r){let i=t.name.value,a=(0,Tw.inspect)(n);e.reportError(new Ew.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,Tw.inspect)(n);e.reportError(new Ew.GraphQLError(`Field "${i}" of type "${a}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}});var Kg=w(jg=>{"use strict";m();T();N();Object.defineProperty(jg,"__esModule",{value:!0});jg.printPathArray=Hz;function Hz(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var ip=w(cN=>{"use strict";m();T();N();Object.defineProperty(cN,"__esModule",{value:!0});cN.addPath=zz;cN.pathToArray=Wz;function zz(e,t,n){return{prev:e,key:t,typename:n}}function Wz(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}});var $g=w(Gg=>{"use strict";m();T();N();Object.defineProperty(Gg,"__esModule",{value:!0});Gg.coerceInputValue=iW;var Xz=eu(),lN=Xt(),Zz=Ir(),eW=Xm(),tW=Da(),aa=ip(),nW=Kg(),rW=nu(),ys=ze(),ap=wt();function iW(e,t,n=aW){return sp(e,t,n,void 0)}function aW(e,t,n){let r="Invalid value "+(0,lN.inspect)(t);throw e.length>0&&(r+=` at "value${(0,nW.printPathArray)(e)}"`),n.message=r+": "+n.message,n}function sp(e,t,n,r){if((0,ap.isNonNullType)(t)){if(e!=null)return sp(e,t.ofType,n,r);n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Expected non-nullable type "${(0,lN.inspect)(t)}" not to be null.`));return}if(e==null)return null;if((0,ap.isListType)(t)){let i=t.ofType;return(0,eW.isIterableObject)(e)?Array.from(e,(a,o)=>{let c=(0,aa.addPath)(r,o,void 0);return sp(a,i,n,c)}):[sp(e,i,n,r)]}if((0,ap.isInputObjectType)(t)){if(!(0,tW.isObjectLike)(e)){n((0,aa.pathToArray)(r),e,new ys.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,ap.isNonNullType)(o.type)){let l=(0,lN.inspect)(o.type);n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Field "${o.name}" of required type "${l}" was not provided.`))}continue}i[o.name]=sp(c,o.type,n,(0,aa.addPath)(r,o.name,t.name))}for(let o of Object.keys(e))if(!a[o]){let c=(0,rW.suggestionList)(o,Object.keys(t.getFields()));n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Field "${o}" is not defined by type "${t.name}".`+(0,Xz.didYouMean)(c)))}if(t.isOneOf){let o=Object.keys(i);o.length!==1&&n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Exactly one key must be specified for OneOf type "${t.name}".`));let c=o[0],l=i[c];l===null&&n((0,aa.pathToArray)(r).concat(c),l,new ys.GraphQLError(`Field "${c}" must be non-null.`))}return i}if((0,ap.isLeafType)(t)){let i;try{i=t.parseValue(e)}catch(a){a instanceof ys.GraphQLError?n((0,aa.pathToArray)(r),e,a):n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Expected type "${t.name}". `+a.message,{originalError:a}));return}return i===void 0&&n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Expected type "${t.name}".`)),i}(0,Zz.invariant)(!1,"Unexpected input type: "+(0,lN.inspect)(t))}});var up=w(Qg=>{"use strict";m();T();N();Object.defineProperty(Qg,"__esModule",{value:!0});Qg.valueFromAST=op;var sW=Xt(),oW=Ir(),uW=tu(),ll=Ft(),tc=wt();function op(e,t,n){if(e){if(e.kind===ll.Kind.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0)return;let i=n[r];return i===null&&(0,tc.isNonNullType)(t)?void 0:i}if((0,tc.isNonNullType)(t))return e.kind===ll.Kind.NULL?void 0:op(e,t.ofType,n);if(e.kind===ll.Kind.NULL)return null;if((0,tc.isListType)(t)){let r=t.ofType;if(e.kind===ll.Kind.LIST){let a=[];for(let o of e.values)if(yw(o,n)){if((0,tc.isNonNullType)(r))return;a.push(null)}else{let c=op(o,r,n);if(c===void 0)return;a.push(c)}return a}let i=op(e,r,n);return i===void 0?void 0:[i]}if((0,tc.isInputObjectType)(t)){if(e.kind!==ll.Kind.OBJECT)return;let r=Object.create(null),i=(0,uW.keyMap)(e.fields,a=>a.name.value);for(let a of Object.values(t.getFields())){let o=i[a.name];if(!o||yw(o.value,n)){if(a.defaultValue!==void 0)r[a.name]=a.defaultValue;else if((0,tc.isNonNullType)(a.type))return;continue}let c=op(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,tc.isLeafType)(t)){let r;try{r=t.parseLiteral(e,n)}catch(i){return}return r===void 0?void 0:r}(0,oW.invariant)(!1,"Unexpected input type: "+(0,sW.inspect)(t))}}function yw(e,t){return e.kind===ll.Kind.VARIABLE&&(t==null||t[e.name.value]===void 0)}});var fl=w(cp=>{"use strict";m();T();N();Object.defineProperty(cp,"__esModule",{value:!0});cp.getArgumentValues=vw;cp.getDirectiveValues=NW;cp.getVariableValues=fW;var dl=Xt(),cW=tu(),lW=Kg(),Is=ze(),Iw=Ft(),gw=ci(),pl=wt(),dW=$g(),pW=Fa(),_w=up();function fW(e,t,n,r){let i=[],a=r==null?void 0:r.maxErrors;try{let o=mW(e,t,n,c=>{if(a!=null&&i.length>=a)throw new Is.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 mW(e,t,n,r){let i={};for(let a of t){let o=a.variable.name.value,c=(0,pW.typeFromAST)(e,a.type);if(!(0,pl.isInputType)(c)){let d=(0,gw.print)(a.type);r(new Is.GraphQLError(`Variable "$${o}" expected value of type "${d}" which cannot be used as an input type.`,{nodes:a.type}));continue}if(!Sw(n,o)){if(a.defaultValue)i[o]=(0,_w.valueFromAST)(a.defaultValue,c);else if((0,pl.isNonNullType)(c)){let d=(0,dl.inspect)(c);r(new Is.GraphQLError(`Variable "$${o}" of required type "${d}" was not provided.`,{nodes:a}))}continue}let l=n[o];if(l===null&&(0,pl.isNonNullType)(c)){let d=(0,dl.inspect)(c);r(new Is.GraphQLError(`Variable "$${o}" of non-null type "${d}" must not be null.`,{nodes:a}));continue}i[o]=(0,dW.coerceInputValue)(l,c,(d,f,y)=>{let I=`Variable "$${o}" got invalid value `+(0,dl.inspect)(f);d.length>0&&(I+=` at "${o}${(0,lW.printPathArray)(d)}"`),r(new Is.GraphQLError(I+"; "+y.message,{nodes:a,originalError:y}))})}return i}function vw(e,t,n){var r;let i={},a=(r=t.arguments)!==null&&r!==void 0?r:[],o=(0,cW.keyMap)(a,c=>c.name.value);for(let c of e.args){let l=c.name,d=c.type,f=o[l];if(!f){if(c.defaultValue!==void 0)i[l]=c.defaultValue;else if((0,pl.isNonNullType)(d))throw new Is.GraphQLError(`Argument "${l}" of required type "${(0,dl.inspect)(d)}" was not provided.`,{nodes:t});continue}let y=f.value,I=y.kind===Iw.Kind.NULL;if(y.kind===Iw.Kind.VARIABLE){let F=y.name.value;if(n==null||!Sw(n,F)){if(c.defaultValue!==void 0)i[l]=c.defaultValue;else if((0,pl.isNonNullType)(d))throw new Is.GraphQLError(`Argument "${l}" of required type "${(0,dl.inspect)(d)}" was provided the variable "$${F}" which was not provided a runtime value.`,{nodes:y});continue}I=n[F]==null}if(I&&(0,pl.isNonNullType)(d))throw new Is.GraphQLError(`Argument "${l}" of non-null type "${(0,dl.inspect)(d)}" must not be null.`,{nodes:y});let v=(0,_w.valueFromAST)(y,d,n);if(v===void 0)throw new Is.GraphQLError(`Argument "${l}" has invalid value ${(0,gw.print)(y)}.`,{nodes:y});i[l]=v}return i}function NW(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 vw(e,i,n)}function Sw(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var fN=w(pN=>{"use strict";m();T();N();Object.defineProperty(pN,"__esModule",{value:!0});pN.collectFields=hW;pN.collectSubfields=yW;var Yg=Ft(),TW=wt(),Ow=Qr(),EW=Fa(),Dw=fl();function hW(e,t,n,r,i){let a=new Map;return dN(e,t,n,r,i,a,new Set),a}function yW(e,t,n,r,i){let a=new Map,o=new Set;for(let c of i)c.selectionSet&&dN(e,t,n,r,c.selectionSet,a,o);return a}function dN(e,t,n,r,i,a,o){for(let c of i.selections)switch(c.kind){case Yg.Kind.FIELD:{if(!Jg(n,c))continue;let l=IW(c),d=a.get(l);d!==void 0?d.push(c):a.set(l,[c]);break}case Yg.Kind.INLINE_FRAGMENT:{if(!Jg(n,c)||!bw(e,c,r))continue;dN(e,t,n,r,c.selectionSet,a,o);break}case Yg.Kind.FRAGMENT_SPREAD:{let l=c.name.value;if(o.has(l)||!Jg(n,c))continue;o.add(l);let d=t[l];if(!d||!bw(e,d,r))continue;dN(e,t,n,r,d.selectionSet,a,o);break}}}function Jg(e,t){let n=(0,Dw.getDirectiveValues)(Ow.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,Dw.getDirectiveValues)(Ow.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function bw(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,EW.typeFromAST)(e,r);return i===n?!0:(0,TW.isAbstractType)(i)?e.isSubType(i,n):!1}function IW(e){return e.alias?e.alias.value:e.name.value}});var zg=w(Hg=>{"use strict";m();T();N();Object.defineProperty(Hg,"__esModule",{value:!0});Hg.SingleFieldSubscriptionsRule=vW;var Aw=ze(),gW=Ft(),_W=fN();function vW(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===gW.Kind.FRAGMENT_DEFINITION&&(c[d.name.value]=d);let l=(0,_W.collectFields)(n,c,a,r,t.selectionSet);if(l.size>1){let y=[...l.values()].slice(1).flat();e.reportError(new Aw.GraphQLError(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:y}))}for(let d of l.values())d[0].name.value.startsWith("__")&&e.reportError(new Aw.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 mN=w(Wg=>{"use strict";m();T();N();Object.defineProperty(Wg,"__esModule",{value:!0});Wg.groupBy=SW;function SW(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 Zg=w(Xg=>{"use strict";m();T();N();Object.defineProperty(Xg,"__esModule",{value:!0});Xg.UniqueArgumentDefinitionNamesRule=bW;var OW=mN(),DW=ze();function bW(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,f=(c=l.arguments)!==null&&c!==void 0?c:[];n(`${a}.${d}`,f)}return!1}function n(r,i){let a=(0,OW.groupBy)(i,o=>o.name.value);for(let[o,c]of a)c.length>1&&e.reportError(new DW.GraphQLError(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:c.map(l=>l.name)}));return!1}}});var t_=w(e_=>{"use strict";m();T();N();Object.defineProperty(e_,"__esModule",{value:!0});e_.UniqueArgumentNamesRule=PW;var AW=mN(),RW=ze();function PW(e){return{Field:t,Directive:t};function t(n){var r;let i=(r=n.arguments)!==null&&r!==void 0?r:[],a=(0,AW.groupBy)(i,o=>o.name.value);for(let[o,c]of a)c.length>1&&e.reportError(new RW.GraphQLError(`There can be only one argument named "${o}".`,{nodes:c.map(l=>l.name)}))}}});var r_=w(n_=>{"use strict";m();T();N();Object.defineProperty(n_,"__esModule",{value:!0});n_.UniqueDirectiveNamesRule=FW;var Rw=ze();function FW(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 Rw.GraphQLError(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new Rw.GraphQLError(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}});var s_=w(a_=>{"use strict";m();T();N();Object.defineProperty(a_,"__esModule",{value:!0});a_.UniqueDirectivesPerLocationRule=CW;var wW=ze(),i_=Ft(),Pw=ec(),LW=Qr();function CW(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():LW.specifiedDirectives;for(let c of r)t[c.name]=!c.isRepeatable;let i=e.getDocument().definitions;for(let c of i)c.kind===i_.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===i_.Kind.SCHEMA_DEFINITION||c.kind===i_.Kind.SCHEMA_EXTENSION)l=a;else if((0,Pw.isTypeDefinitionNode)(c)||(0,Pw.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 f=d.name.value;t[f]&&(l[f]?e.reportError(new wW.GraphQLError(`The directive "@${f}" can only be used once at this location.`,{nodes:[l[f],d]})):l[f]=d)}}}}});var u_=w(o_=>{"use strict";m();T();N();Object.defineProperty(o_,"__esModule",{value:!0});o_.UniqueEnumValueNamesRule=UW;var Fw=ze(),BW=wt();function UW(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 f of l){let y=f.name.value,I=n[c];(0,BW.isEnumType)(I)&&I.getValue(y)?e.reportError(new Fw.GraphQLError(`Enum value "${c}.${y}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):d[y]?e.reportError(new Fw.GraphQLError(`Enum value "${c}.${y}" can only be defined once.`,{nodes:[d[y],f.name]})):d[y]=f.name}return!1}}});var d_=w(l_=>{"use strict";m();T();N();Object.defineProperty(l_,"__esModule",{value:!0});l_.UniqueFieldDefinitionNamesRule=kW;var ww=ze(),c_=wt();function kW(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 f of l){let y=f.name.value;MW(n[c],y)?e.reportError(new ww.GraphQLError(`Field "${c}.${y}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):d[y]?e.reportError(new ww.GraphQLError(`Field "${c}.${y}" can only be defined once.`,{nodes:[d[y],f.name]})):d[y]=f.name}return!1}}function MW(e,t){return(0,c_.isObjectType)(e)||(0,c_.isInterfaceType)(e)||(0,c_.isInputObjectType)(e)?e.getFields()[t]!=null:!1}});var f_=w(p_=>{"use strict";m();T();N();Object.defineProperty(p_,"__esModule",{value:!0});p_.UniqueFragmentNamesRule=qW;var xW=ze();function qW(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){let r=n.name.value;return t[r]?e.reportError(new xW.GraphQLError(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}});var N_=w(m_=>{"use strict";m();T();N();Object.defineProperty(m_,"__esModule",{value:!0});m_.UniqueInputFieldNamesRule=KW;var VW=Ir(),jW=ze();function KW(e){let t=[],n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){let r=t.pop();r||(0,VW.invariant)(!1),n=r}},ObjectField(r){let i=r.name.value;n[i]?e.reportError(new jW.GraphQLError(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}});var E_=w(T_=>{"use strict";m();T();N();Object.defineProperty(T_,"__esModule",{value:!0});T_.UniqueOperationNamesRule=$W;var GW=ze();function $W(e){let t=Object.create(null);return{OperationDefinition(n){let r=n.name;return r&&(t[r.value]?e.reportError(new GW.GraphQLError(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}});var y_=w(h_=>{"use strict";m();T();N();Object.defineProperty(h_,"__esModule",{value:!0});h_.UniqueOperationTypesRule=QW;var Lw=ze();function QW(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,f=n[d];r[d]?e.reportError(new Lw.GraphQLError(`Type for ${d} already defined in the schema. It cannot be redefined.`,{nodes:l})):f?e.reportError(new Lw.GraphQLError(`There can be only one ${d} type in schema.`,{nodes:[f,l]})):n[d]=l}return!1}}});var g_=w(I_=>{"use strict";m();T();N();Object.defineProperty(I_,"__esModule",{value:!0});I_.UniqueTypeNamesRule=YW;var Cw=ze();function YW(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 Cw.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 Cw.GraphQLError(`There can be only one type named "${a}".`,{nodes:[t[a],i.name]})):t[a]=i.name,!1}}});var v_=w(__=>{"use strict";m();T();N();Object.defineProperty(__,"__esModule",{value:!0});__.UniqueVariableNamesRule=zW;var JW=mN(),HW=ze();function zW(e){return{OperationDefinition(t){var n;let r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=(0,JW.groupBy)(r,a=>a.variable.name.value);for(let[a,o]of i)o.length>1&&e.reportError(new HW.GraphQLError(`There can be only one variable named "$${a}".`,{nodes:o.map(c=>c.variable.name)}))}}}});var D_=w(O_=>{"use strict";m();T();N();Object.defineProperty(O_,"__esModule",{value:!0});O_.ValuesOfCorrectTypeRule=e4;var WW=eu(),lp=Xt(),XW=tu(),ZW=nu(),La=ze(),S_=Ft(),NN=ci(),wa=wt();function e4(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){let r=(0,wa.getNullableType)(e.getParentInputType());if(!(0,wa.isListType)(r))return nc(e,n),!1},ObjectValue(n){let r=(0,wa.getNamedType)(e.getInputType());if(!(0,wa.isInputObjectType)(r))return nc(e,n),!1;let i=(0,XW.keyMap)(n.fields,a=>a.name.value);for(let a of Object.values(r.getFields()))if(!i[a.name]&&(0,wa.isRequiredInputField)(a)){let c=(0,lp.inspect)(a.type);e.reportError(new La.GraphQLError(`Field "${r.name}.${a.name}" of required type "${c}" was not provided.`,{nodes:n}))}r.isOneOf&&t4(e,n,r,i,t)},ObjectField(n){let r=(0,wa.getNamedType)(e.getParentInputType());if(!e.getInputType()&&(0,wa.isInputObjectType)(r)){let a=(0,ZW.suggestionList)(n.name.value,Object.keys(r.getFields()));e.reportError(new La.GraphQLError(`Field "${n.name.value}" is not defined by type "${r.name}".`+(0,WW.didYouMean)(a),{nodes:n}))}},NullValue(n){let r=e.getInputType();(0,wa.isNonNullType)(r)&&e.reportError(new La.GraphQLError(`Expected value of type "${(0,lp.inspect)(r)}", found ${(0,NN.print)(n)}.`,{nodes:n}))},EnumValue:n=>nc(e,n),IntValue:n=>nc(e,n),FloatValue:n=>nc(e,n),StringValue:n=>nc(e,n),BooleanValue:n=>nc(e,n)}}function nc(e,t){let n=e.getInputType();if(!n)return;let r=(0,wa.getNamedType)(n);if(!(0,wa.isLeafType)(r)){let i=(0,lp.inspect)(n);e.reportError(new La.GraphQLError(`Expected value of type "${i}", found ${(0,NN.print)(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){let a=(0,lp.inspect)(n);e.reportError(new La.GraphQLError(`Expected value of type "${a}", found ${(0,NN.print)(t)}.`,{nodes:t}))}}catch(i){let a=(0,lp.inspect)(n);i instanceof La.GraphQLError?e.reportError(i):e.reportError(new La.GraphQLError(`Expected value of type "${a}", found ${(0,NN.print)(t)}; `+i.message,{nodes:t,originalError:i}))}}function t4(e,t,n,r,i){var a;let o=Object.keys(r);if(o.length!==1){e.reportError(new La.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===S_.Kind.NULL,f=(l==null?void 0:l.kind)===S_.Kind.VARIABLE;if(d){e.reportError(new La.GraphQLError(`Field "${n.name}.${o[0]}" must be non-null.`,{nodes:[t]}));return}if(f){let y=l.name.value;i[y].type.kind!==S_.Kind.NON_NULL_TYPE&&e.reportError(new La.GraphQLError(`Variable "${y}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}});var A_=w(b_=>{"use strict";m();T();N();Object.defineProperty(b_,"__esModule",{value:!0});b_.VariablesAreInputTypesRule=s4;var n4=ze(),r4=ci(),i4=wt(),a4=Fa();function s4(e){return{VariableDefinition(t){let n=(0,a4.typeFromAST)(e.getSchema(),t.type);if(n!==void 0&&!(0,i4.isInputType)(n)){let r=t.variable.name.value,i=(0,r4.print)(t.type);e.reportError(new n4.GraphQLError(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}});var P_=w(R_=>{"use strict";m();T();N();Object.defineProperty(R_,"__esModule",{value:!0});R_.VariablesInAllowedPositionRule=l4;var Bw=Xt(),o4=ze(),u4=Ft(),Uw=wt(),kw=$d(),c4=Fa();function l4(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(),f=(0,c4.typeFromAST)(d,l.type);if(f&&!d4(d,f,l.defaultValue,a,o)){let y=(0,Bw.inspect)(f),I=(0,Bw.inspect)(a);e.reportError(new o4.GraphQLError(`Variable "$${c}" of type "${y}" used in position expecting type "${I}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function d4(e,t,n,r,i){if((0,Uw.isNonNullType)(r)&&!(0,Uw.isNonNullType)(t)){if(!(n!=null&&n.kind!==u4.Kind.NULL)&&!(i!==void 0))return!1;let c=r.ofType;return(0,kw.isTypeSubTypeOf)(e,t,c)}return(0,kw.isTypeSubTypeOf)(e,t,r)}});var F_=w(su=>{"use strict";m();T();N();Object.defineProperty(su,"__esModule",{value:!0});su.specifiedSDLRules=su.specifiedRules=su.recommendedRules=void 0;var p4=JI(),f4=zI(),m4=XI(),Mw=ZI(),xw=rg(),N4=ag(),qw=ug(),T4=lg(),E4=pg(),h4=mg(),y4=Tg(),I4=hg(),g4=Ig(),_4=_g(),v4=wg(),S4=Bg(),O4=kg(),Vw=xg(),D4=Vg(),b4=zg(),A4=Zg(),jw=t_(),R4=r_(),Kw=s_(),P4=u_(),F4=d_(),w4=f_(),Gw=N_(),L4=E_(),C4=y_(),B4=g_(),U4=v_(),k4=D_(),M4=A_(),x4=P_(),$w=Object.freeze([h4.MaxIntrospectionDepthRule]);su.recommendedRules=$w;var q4=Object.freeze([p4.ExecutableDefinitionsRule,L4.UniqueOperationNamesRule,T4.LoneAnonymousOperationRule,b4.SingleFieldSubscriptionsRule,qw.KnownTypeNamesRule,m4.FragmentsOnCompositeTypesRule,M4.VariablesAreInputTypesRule,D4.ScalarLeafsRule,f4.FieldsOnCorrectTypeRule,w4.UniqueFragmentNamesRule,N4.KnownFragmentNamesRule,g4.NoUnusedFragmentsRule,S4.PossibleFragmentSpreadsRule,y4.NoFragmentCyclesRule,U4.UniqueVariableNamesRule,I4.NoUndefinedVariablesRule,_4.NoUnusedVariablesRule,xw.KnownDirectivesRule,Kw.UniqueDirectivesPerLocationRule,Mw.KnownArgumentNamesRule,jw.UniqueArgumentNamesRule,k4.ValuesOfCorrectTypeRule,Vw.ProvidedRequiredArgumentsRule,x4.VariablesInAllowedPositionRule,v4.OverlappingFieldsCanBeMergedRule,Gw.UniqueInputFieldNamesRule,...$w]);su.specifiedRules=q4;var V4=Object.freeze([E4.LoneSchemaDefinitionRule,C4.UniqueOperationTypesRule,B4.UniqueTypeNamesRule,P4.UniqueEnumValueNamesRule,F4.UniqueFieldDefinitionNamesRule,A4.UniqueArgumentDefinitionNamesRule,R4.UniqueDirectiveNamesRule,qw.KnownTypeNamesRule,xw.KnownDirectivesRule,Kw.UniqueDirectivesPerLocationRule,O4.PossibleTypeExtensionsRule,Mw.KnownArgumentNamesOnDirectivesRule,jw.UniqueArgumentNamesRule,Gw.UniqueInputFieldNamesRule,Vw.ProvidedRequiredArgumentsOnDirectivesRule]);su.specifiedSDLRules=V4});var C_=w(ou=>{"use strict";m();T();N();Object.defineProperty(ou,"__esModule",{value:!0});ou.ValidationContext=ou.SDLValidationContext=ou.ASTValidationContext=void 0;var Qw=Ft(),j4=Qu(),Yw=nN(),dp=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===Qw.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===Qw.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}};ou.ASTValidationContext=dp;var w_=class extends dp{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}};ou.SDLValidationContext=w_;var L_=class extends dp{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 Yw.TypeInfo(this._schema);(0,j4.visit)(t,(0,Yw.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()}};ou.ValidationContext=L_});var Nl=w(ml=>{"use strict";m();T();N();Object.defineProperty(ml,"__esModule",{value:!0});ml.assertValidSDL=Y4;ml.assertValidSDLExtension=J4;ml.validate=Q4;ml.validateSDL=B_;var K4=Br(),G4=ze(),TN=Qu(),$4=tp(),Jw=nN(),Hw=F_(),zw=C_();function Q4(e,t,n=Hw.specifiedRules,r,i=new Jw.TypeInfo(e)){var a;let o=(a=r==null?void 0:r.maxErrors)!==null&&a!==void 0?a:100;t||(0,K4.devAssert)(!1,"Must provide document."),(0,$4.assertValidSchema)(e);let c=Object.freeze({}),l=[],d=new zw.ValidationContext(e,t,i,y=>{if(l.length>=o)throw l.push(new G4.GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),c;l.push(y)}),f=(0,TN.visitInParallel)(n.map(y=>y(d)));try{(0,TN.visit)(t,(0,Jw.visitWithTypeInfo)(i,f))}catch(y){if(y!==c)throw y}return l}function B_(e,t,n=Hw.specifiedSDLRules){let r=[],i=new zw.SDLValidationContext(e,t,o=>{r.push(o)}),a=n.map(o=>o(i));return(0,TN.visit)(e,(0,TN.visitInParallel)(a)),r}function Y4(e){let t=B_(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` +`))}var qI=class{constructor(t){this._errors=[],this.schema=t}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new N6.GraphQLError(t,{nodes:r}))}getErrors(){return this._errors}};function y6(e){let t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!(0,Pn.isObjectType)(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${(0,_r.inspect)(n)}.`,(r=xI(t,MI.OperationTypeNode.QUERY))!==null&&r!==void 0?r:n.astNode)}let i=t.getMutationType();if(i&&!(0,Pn.isObjectType)(i)){var a;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${(0,_r.inspect)(i)}.`,(a=xI(t,MI.OperationTypeNode.MUTATION))!==null&&a!==void 0?a:i.astNode)}let o=t.getSubscriptionType();if(o&&!(0,Pn.isObjectType)(o)){var c;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${(0,_r.inspect)(o)}.`,(c=xI(t,MI.OperationTypeNode.SUBSCRIPTION))!==null&&c!==void 0?c:o.astNode)}}function xI(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 I6(e){for(let n of e.schema.getDirectives()){if(!(0,RF.isDirective)(n)){e.reportError(`Expected directive but got: ${(0,_r.inspect)(n)}.`,n==null?void 0:n.astNode);continue}Zu(e,n);for(let r of n.args)if(Zu(e,r),(0,Pn.isInputType)(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${(0,_r.inspect)(r.type)}.`,r.astNode),(0,Pn.isRequiredArgument)(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[VI(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function Zu(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function g6(e){let t=A6(e),n=e.schema.getTypeMap();for(let r of Object.values(n)){if(!(0,Pn.isNamedType)(r)){e.reportError(`Expected GraphQL named type but got: ${(0,_r.inspect)(r)}.`,r.astNode);continue}(0,T6.isIntrospectionType)(r)||Zu(e,r),(0,Pn.isObjectType)(r)||(0,Pn.isInterfaceType)(r)?(DF(e,r),bF(e,r)):(0,Pn.isUnionType)(r)?S6(e,r):(0,Pn.isEnumType)(r)?O6(e,r):(0,Pn.isInputObjectType)(r)&&(D6(e,r),t(r))}}function DF(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(Zu(e,o),!(0,Pn.isOutputType)(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${(0,_r.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(Zu(e,c),!(0,Pn.isInputType)(c.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${l}:) must be Input Type but got: ${(0,_r.inspect)(c.type)}.`,(i=c.astNode)===null||i===void 0?void 0:i.type)}if((0,Pn.isRequiredArgument)(c)&&c.deprecationReason!=null){var a;e.reportError(`Required argument ${t.name}.${o.name}(${l}:) cannot be deprecated.`,[VI(c.astNode),(a=c.astNode)===null||a===void 0?void 0:a.type])}}}}function bF(e,t){let n=Object.create(null);for(let r of t.getInterfaces()){if(!(0,Pn.isInterfaceType)(r)){e.reportError(`Type ${(0,_r.inspect)(t)} must only implement Interface types, it cannot implement ${(0,_r.inspect)(r)}.`,ep(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,ep(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,ep(t,r));continue}n[r.name]=!0,v6(e,t,r),_6(e,t,r)}}function _6(e,t,n){let r=t.getFields();for(let l of Object.values(n.getFields())){let d=l.name,f=r[d];if(!f){e.reportError(`Interface field ${n.name}.${d} expected but ${t.name} does not provide it.`,[l.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!(0,OF.isTypeSubTypeOf)(e.schema,f.type,l.type)){var i,a;e.reportError(`Interface field ${n.name}.${d} expects type ${(0,_r.inspect)(l.type)} but ${t.name}.${d} is type ${(0,_r.inspect)(f.type)}.`,[(i=l.astNode)===null||i===void 0?void 0:i.type,(a=f.astNode)===null||a===void 0?void 0:a.type])}for(let y of l.args){let I=y.name,v=f.args.find(F=>F.name===I);if(!v){e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expected but ${t.name}.${d} does not provide it.`,[y.astNode,f.astNode]);continue}if(!(0,OF.isEqualType)(y.type,v.type)){var o,c;e.reportError(`Interface field argument ${n.name}.${d}(${I}:) expects type ${(0,_r.inspect)(y.type)} but ${t.name}.${d}(${I}:) is type ${(0,_r.inspect)(v.type)}.`,[(o=y.astNode)===null||o===void 0?void 0:o.type,(c=v.astNode)===null||c===void 0?void 0:c.type])}}for(let y of f.args){let I=y.name;!l.args.find(F=>F.name===I)&&(0,Pn.isRequiredArgument)(y)&&e.reportError(`Object field ${t.name}.${d} includes required argument ${I} that is missing from the Interface field ${n.name}.${d}.`,[y.astNode,l.astNode])}}}function v6(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}.`,[...ep(n,i),...ep(t,n)])}function S6(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.`,AF(t,i.name));continue}r[i.name]=!0,(0,Pn.isObjectType)(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${(0,_r.inspect)(i)}.`,AF(t,String(i)))}}function O6(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)Zu(e,r)}function D6(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(Zu(e,a),!(0,Pn.isInputType)(a.type)){var r;e.reportError(`The type of ${t.name}.${a.name} must be Input Type but got: ${(0,_r.inspect)(a.type)}.`,(r=a.astNode)===null||r===void 0?void 0:r.type)}if((0,Pn.isRequiredInputField)(a)&&a.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${a.name} cannot be deprecated.`,[VI(a.astNode),(i=a.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&b6(t,a,e)}}function b6(e,t,n){if((0,Pn.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 A6(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,Pn.isNonNullType)(c.type)&&(0,Pn.isInputObjectType)(c.type.ofType)){let l=c.type.ofType,d=r[l.name];if(n.push(c),d===void 0)i(l);else{let f=n.slice(d),y=f.map(I=>I.name).join(".");e.reportError(`Cannot reference Input Object "${l.name}" within itself through a series of non-null fields: "${y}".`,f.map(I=>I.astNode))}n.pop()}r[a.name]=void 0}}function ep(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 AF(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 VI(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===RF.GraphQLDeprecatedDirective.name)}});var Fa=w(GI=>{"use strict";m();T();N();Object.defineProperty(GI,"__esModule",{value:!0});GI.typeFromAST=KI;var jI=Ft(),FF=wt();function KI(e,t){switch(t.kind){case jI.Kind.LIST_TYPE:{let n=KI(e,t.type);return n&&new FF.GraphQLList(n)}case jI.Kind.NON_NULL_TYPE:{let n=KI(e,t.type);return n&&new FF.GraphQLNonNull(n)}case jI.Kind.NAMED_TYPE:return e.getType(t.name.value)}}});var nN=w(np=>{"use strict";m();T();N();Object.defineProperty(np,"__esModule",{value:!0});np.TypeInfo=void 0;np.visitWithTypeInfo=F6;var R6=ba(),Fn=Ft(),wF=Qu(),wn=wt(),cl=Fi(),LF=Fa(),$I=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:P6,n&&((0,wn.isInputType)(n)&&this._inputTypeStack.push(n),(0,wn.isCompositeType)(n)&&this._parentTypeStack.push(n),(0,wn.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 Fn.Kind.SELECTION_SET:{let i=(0,wn.getNamedType)(this.getType());this._parentTypeStack.push((0,wn.isCompositeType)(i)?i:void 0);break}case Fn.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,wn.isOutputType)(o)?o:void 0);break}case Fn.Kind.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case Fn.Kind.OPERATION_DEFINITION:{let i=n.getRootType(t.operation);this._typeStack.push((0,wn.isObjectType)(i)?i:void 0);break}case Fn.Kind.INLINE_FRAGMENT:case Fn.Kind.FRAGMENT_DEFINITION:{let i=t.typeCondition,a=i?(0,LF.typeFromAST)(n,i):(0,wn.getNamedType)(this.getType());this._typeStack.push((0,wn.isOutputType)(a)?a:void 0);break}case Fn.Kind.VARIABLE_DEFINITION:{let i=(0,LF.typeFromAST)(n,t.type);this._inputTypeStack.push((0,wn.isInputType)(i)?i:void 0);break}case Fn.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,wn.isInputType)(a)?a:void 0);break}case Fn.Kind.LIST:{let i=(0,wn.getNullableType)(this.getInputType()),a=(0,wn.isListType)(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push((0,wn.isInputType)(a)?a:void 0);break}case Fn.Kind.OBJECT_FIELD:{let i=(0,wn.getNamedType)(this.getInputType()),a,o;(0,wn.isInputObjectType)(i)&&(o=i.getFields()[t.name.value],o&&(a=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push((0,wn.isInputType)(a)?a:void 0);break}case Fn.Kind.ENUM:{let i=(0,wn.getNamedType)(this.getInputType()),a;(0,wn.isEnumType)(i)&&(a=i.getValue(t.value)),this._enumValue=a;break}default:}}leave(t){switch(t.kind){case Fn.Kind.SELECTION_SET:this._parentTypeStack.pop();break;case Fn.Kind.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case Fn.Kind.DIRECTIVE:this._directive=null;break;case Fn.Kind.OPERATION_DEFINITION:case Fn.Kind.INLINE_FRAGMENT:case Fn.Kind.FRAGMENT_DEFINITION:this._typeStack.pop();break;case Fn.Kind.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case Fn.Kind.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Fn.Kind.LIST:case Fn.Kind.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case Fn.Kind.ENUM:this._enumValue=null;break;default:}}};np.TypeInfo=$I;function P6(e,t,n){let r=n.name.value;if(r===cl.SchemaMetaFieldDef.name&&e.getQueryType()===t)return cl.SchemaMetaFieldDef;if(r===cl.TypeMetaFieldDef.name&&e.getQueryType()===t)return cl.TypeMetaFieldDef;if(r===cl.TypeNameMetaFieldDef.name&&(0,wn.isCompositeType)(t))return cl.TypeNameMetaFieldDef;if((0,wn.isObjectType)(t)||(0,wn.isInterfaceType)(t))return t.getFields()[r]}function F6(e,t){return{enter(...n){let r=n[0];e.enter(r);let i=(0,wF.getEnterLeaveForKind)(t,r.kind).enter;if(i){let a=i.apply(t,n);return a!==void 0&&(e.leave(r),(0,R6.isNode)(a)&&e.enter(a)),a}},leave(...n){let r=n[0],i=(0,wF.getEnterLeaveForKind)(t,r.kind).leave,a;return i&&(a=i.apply(t,n)),e.leave(r),a}}}});var ec=w(wi=>{"use strict";m();T();N();Object.defineProperty(wi,"__esModule",{value:!0});wi.isConstValueNode=QI;wi.isDefinitionNode=w6;wi.isExecutableDefinitionNode=CF;wi.isSelectionNode=L6;wi.isTypeDefinitionNode=kF;wi.isTypeExtensionNode=xF;wi.isTypeNode=C6;wi.isTypeSystemDefinitionNode=UF;wi.isTypeSystemExtensionNode=MF;wi.isValueNode=BF;var Lt=Ft();function w6(e){return CF(e)||UF(e)||MF(e)}function CF(e){return e.kind===Lt.Kind.OPERATION_DEFINITION||e.kind===Lt.Kind.FRAGMENT_DEFINITION}function L6(e){return e.kind===Lt.Kind.FIELD||e.kind===Lt.Kind.FRAGMENT_SPREAD||e.kind===Lt.Kind.INLINE_FRAGMENT}function BF(e){return e.kind===Lt.Kind.VARIABLE||e.kind===Lt.Kind.INT||e.kind===Lt.Kind.FLOAT||e.kind===Lt.Kind.STRING||e.kind===Lt.Kind.BOOLEAN||e.kind===Lt.Kind.NULL||e.kind===Lt.Kind.ENUM||e.kind===Lt.Kind.LIST||e.kind===Lt.Kind.OBJECT}function QI(e){return BF(e)&&(e.kind===Lt.Kind.LIST?e.values.some(QI):e.kind===Lt.Kind.OBJECT?e.fields.some(t=>QI(t.value)):e.kind!==Lt.Kind.VARIABLE)}function C6(e){return e.kind===Lt.Kind.NAMED_TYPE||e.kind===Lt.Kind.LIST_TYPE||e.kind===Lt.Kind.NON_NULL_TYPE}function UF(e){return e.kind===Lt.Kind.SCHEMA_DEFINITION||kF(e)||e.kind===Lt.Kind.DIRECTIVE_DEFINITION}function kF(e){return e.kind===Lt.Kind.SCALAR_TYPE_DEFINITION||e.kind===Lt.Kind.OBJECT_TYPE_DEFINITION||e.kind===Lt.Kind.INTERFACE_TYPE_DEFINITION||e.kind===Lt.Kind.UNION_TYPE_DEFINITION||e.kind===Lt.Kind.ENUM_TYPE_DEFINITION||e.kind===Lt.Kind.INPUT_OBJECT_TYPE_DEFINITION}function MF(e){return e.kind===Lt.Kind.SCHEMA_EXTENSION||xF(e)}function xF(e){return e.kind===Lt.Kind.SCALAR_TYPE_EXTENSION||e.kind===Lt.Kind.OBJECT_TYPE_EXTENSION||e.kind===Lt.Kind.INTERFACE_TYPE_EXTENSION||e.kind===Lt.Kind.UNION_TYPE_EXTENSION||e.kind===Lt.Kind.ENUM_TYPE_EXTENSION||e.kind===Lt.Kind.INPUT_OBJECT_TYPE_EXTENSION}});var JI=w(YI=>{"use strict";m();T();N();Object.defineProperty(YI,"__esModule",{value:!0});YI.ExecutableDefinitionsRule=k6;var B6=ze(),qF=Ft(),U6=ec();function k6(e){return{Document(t){for(let n of t.definitions)if(!(0,U6.isExecutableDefinitionNode)(n)){let r=n.kind===qF.Kind.SCHEMA_DEFINITION||n.kind===qF.Kind.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new B6.GraphQLError(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}});var zI=w(HI=>{"use strict";m();T();N();Object.defineProperty(HI,"__esModule",{value:!0});HI.FieldsOnCorrectTypeRule=V6;var VF=eu(),M6=xd(),x6=nu(),q6=ze(),rp=wt();function V6(e){return{Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),a=t.name.value,o=(0,VF.didYouMean)("to use an inline fragment on",j6(i,n,a));o===""&&(o=(0,VF.didYouMean)(K6(n,a))),e.reportError(new q6.GraphQLError(`Cannot query field "${a}" on type "${n.name}".`+o,{nodes:t}))}}}}function j6(e,t,n){if(!(0,rp.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,rp.isInterfaceType)(o)&&e.isSubType(o,c)?-1:(0,rp.isInterfaceType)(c)&&e.isSubType(c,o)?1:(0,M6.naturalCompare)(o.name,c.name)}).map(o=>o.name)}function K6(e,t){if((0,rp.isObjectType)(e)||(0,rp.isInterfaceType)(e)){let n=Object.keys(e.getFields());return(0,x6.suggestionList)(t,n)}return[]}});var XI=w(WI=>{"use strict";m();T();N();Object.defineProperty(WI,"__esModule",{value:!0});WI.FragmentsOnCompositeTypesRule=G6;var jF=ze(),KF=ci(),GF=wt(),$F=Fa();function G6(e){return{InlineFragment(t){let n=t.typeCondition;if(n){let r=(0,$F.typeFromAST)(e.getSchema(),n);if(r&&!(0,GF.isCompositeType)(r)){let i=(0,KF.print)(n);e.reportError(new jF.GraphQLError(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){let n=(0,$F.typeFromAST)(e.getSchema(),t.typeCondition);if(n&&!(0,GF.isCompositeType)(n)){let r=(0,KF.print)(t.typeCondition);e.reportError(new jF.GraphQLError(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}});var ZI=w(rN=>{"use strict";m();T();N();Object.defineProperty(rN,"__esModule",{value:!0});rN.KnownArgumentNamesOnDirectivesRule=HF;rN.KnownArgumentNamesRule=Y6;var QF=eu(),YF=nu(),JF=ze(),$6=Ft(),Q6=Qr();function Y6(e){return Q(x({},HF(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,YF.suggestionList)(a,o);e.reportError(new JF.GraphQLError(`Unknown argument "${a}" on field "${i.name}.${r.name}".`+(0,QF.didYouMean)(c),{nodes:t}))}}})}function HF(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Q6.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===$6.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 f=d.name.value;if(!l.includes(f)){let y=(0,YF.suggestionList)(f,l);e.reportError(new JF.GraphQLError(`Unknown argument "${f}" on directive "@${c}".`+(0,QF.didYouMean)(y),{nodes:d}))}}return!1}}}});var rg=w(ng=>{"use strict";m();T();N();Object.defineProperty(ng,"__esModule",{value:!0});ng.KnownDirectivesRule=z6;var J6=Xt(),eg=Ir(),zF=ze(),tg=ba(),er=nl(),hn=Ft(),H6=Qr();function z6(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():H6.specifiedDirectives;for(let a of r)t[a.name]=a.locations;let i=e.getDocument().definitions;for(let a of i)a.kind===hn.Kind.DIRECTIVE_DEFINITION&&(t[a.name.value]=a.locations.map(o=>o.value));return{Directive(a,o,c,l,d){let f=a.name.value,y=t[f];if(!y){e.reportError(new zF.GraphQLError(`Unknown directive "@${f}".`,{nodes:a}));return}let I=W6(d);I&&!y.includes(I)&&e.reportError(new zF.GraphQLError(`Directive "@${f}" may not be used on ${I}.`,{nodes:a}))}}}function W6(e){let t=e[e.length-1];switch("kind"in t||(0,eg.invariant)(!1),t.kind){case hn.Kind.OPERATION_DEFINITION:return X6(t.operation);case hn.Kind.FIELD:return er.DirectiveLocation.FIELD;case hn.Kind.FRAGMENT_SPREAD:return er.DirectiveLocation.FRAGMENT_SPREAD;case hn.Kind.INLINE_FRAGMENT:return er.DirectiveLocation.INLINE_FRAGMENT;case hn.Kind.FRAGMENT_DEFINITION:return er.DirectiveLocation.FRAGMENT_DEFINITION;case hn.Kind.VARIABLE_DEFINITION:return er.DirectiveLocation.VARIABLE_DEFINITION;case hn.Kind.SCHEMA_DEFINITION:case hn.Kind.SCHEMA_EXTENSION:return er.DirectiveLocation.SCHEMA;case hn.Kind.SCALAR_TYPE_DEFINITION:case hn.Kind.SCALAR_TYPE_EXTENSION:return er.DirectiveLocation.SCALAR;case hn.Kind.OBJECT_TYPE_DEFINITION:case hn.Kind.OBJECT_TYPE_EXTENSION:return er.DirectiveLocation.OBJECT;case hn.Kind.FIELD_DEFINITION:return er.DirectiveLocation.FIELD_DEFINITION;case hn.Kind.INTERFACE_TYPE_DEFINITION:case hn.Kind.INTERFACE_TYPE_EXTENSION:return er.DirectiveLocation.INTERFACE;case hn.Kind.UNION_TYPE_DEFINITION:case hn.Kind.UNION_TYPE_EXTENSION:return er.DirectiveLocation.UNION;case hn.Kind.ENUM_TYPE_DEFINITION:case hn.Kind.ENUM_TYPE_EXTENSION:return er.DirectiveLocation.ENUM;case hn.Kind.ENUM_VALUE_DEFINITION:return er.DirectiveLocation.ENUM_VALUE;case hn.Kind.INPUT_OBJECT_TYPE_DEFINITION:case hn.Kind.INPUT_OBJECT_TYPE_EXTENSION:return er.DirectiveLocation.INPUT_OBJECT;case hn.Kind.INPUT_VALUE_DEFINITION:{let n=e[e.length-3];return"kind"in n||(0,eg.invariant)(!1),n.kind===hn.Kind.INPUT_OBJECT_TYPE_DEFINITION?er.DirectiveLocation.INPUT_FIELD_DEFINITION:er.DirectiveLocation.ARGUMENT_DEFINITION}default:(0,eg.invariant)(!1,"Unexpected kind: "+(0,J6.inspect)(t.kind))}}function X6(e){switch(e){case tg.OperationTypeNode.QUERY:return er.DirectiveLocation.QUERY;case tg.OperationTypeNode.MUTATION:return er.DirectiveLocation.MUTATION;case tg.OperationTypeNode.SUBSCRIPTION:return er.DirectiveLocation.SUBSCRIPTION}}});var ag=w(ig=>{"use strict";m();T();N();Object.defineProperty(ig,"__esModule",{value:!0});ig.KnownFragmentNamesRule=ez;var Z6=ze();function ez(e){return{FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new Z6.GraphQLError(`Unknown fragment "${n}".`,{nodes:t.name}))}}}});var ug=w(og=>{"use strict";m();T();N();Object.defineProperty(og,"__esModule",{value:!0});og.KnownTypeNamesRule=sz;var tz=eu(),nz=nu(),rz=ze(),sg=ec(),iz=Fi(),az=Pa();function sz(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let a of e.getDocument().definitions)(0,sg.isTypeDefinitionNode)(a)&&(r[a.name.value]=!0);let i=[...Object.keys(n),...Object.keys(r)];return{NamedType(a,o,c,l,d){let f=a.name.value;if(!n[f]&&!r[f]){var y;let I=(y=d[2])!==null&&y!==void 0?y:c,v=I!=null&&oz(I);if(v&&WF.includes(f))return;let F=(0,nz.suggestionList)(f,v?WF.concat(i):i);e.reportError(new rz.GraphQLError(`Unknown type "${f}".`+(0,tz.didYouMean)(F),{nodes:a}))}}}}var WF=[...az.specifiedScalarTypes,...iz.introspectionTypes].map(e=>e.name);function oz(e){return"kind"in e&&((0,sg.isTypeSystemDefinitionNode)(e)||(0,sg.isTypeSystemExtensionNode)(e))}});var lg=w(cg=>{"use strict";m();T();N();Object.defineProperty(cg,"__esModule",{value:!0});cg.LoneAnonymousOperationRule=lz;var uz=ze(),cz=Ft();function lz(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===cz.Kind.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new uz.GraphQLError("This anonymous operation must be the only defined operation.",{nodes:n}))}}}});var pg=w(dg=>{"use strict";m();T();N();Object.defineProperty(dg,"__esModule",{value:!0});dg.LoneSchemaDefinitionRule=dz;var XF=ze();function dz(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 XF.GraphQLError("Cannot define a new schema within a schema extension.",{nodes:c}));return}o>0&&e.reportError(new XF.GraphQLError("Must provide only one schema definition.",{nodes:c})),++o}}}});var mg=w(fg=>{"use strict";m();T();N();Object.defineProperty(fg,"__esModule",{value:!0});fg.MaxIntrospectionDepthRule=mz;var pz=ze(),ZF=Ft(),fz=3;function mz(e){function t(n,r=Object.create(null),i=0){if(n.kind===ZF.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===ZF.Kind.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=fz))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 pz.GraphQLError("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}});var Tg=w(Ng=>{"use strict";m();T();N();Object.defineProperty(Ng,"__esModule",{value:!0});Ng.NoFragmentCyclesRule=Tz;var Nz=ze();function Tz(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,f=r[d];if(n.push(l),f===void 0){let y=e.getFragment(d);y&&i(y)}else{let y=n.slice(f),I=y.slice(0,-1).map(v=>'"'+v.name.value+'"').join(", ");e.reportError(new Nz.GraphQLError(`Cannot spread fragment "${d}" within itself`+(I!==""?` via ${I}.`:"."),{nodes:y}))}n.pop()}r[o]=void 0}}}});var hg=w(Eg=>{"use strict";m();T();N();Object.defineProperty(Eg,"__esModule",{value:!0});Eg.NoUndefinedVariablesRule=hz;var Ez=ze();function hz(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 Ez.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 Ig=w(yg=>{"use strict";m();T();N();Object.defineProperty(yg,"__esModule",{value:!0});yg.NoUnusedFragmentsRule=Iz;var yz=ze();function Iz(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 yz.GraphQLError(`Fragment "${a}" is never used.`,{nodes:i}))}}}}}});var _g=w(gg=>{"use strict";m();T();N();Object.defineProperty(gg,"__esModule",{value:!0});gg.NoUnusedVariablesRule=_z;var gz=ze();function _z(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 gz.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 Og=w(Sg=>{"use strict";m();T();N();Object.defineProperty(Sg,"__esModule",{value:!0});Sg.sortValueNode=vg;var vz=xd(),hs=Ft();function vg(e){switch(e.kind){case hs.Kind.OBJECT:return Q(x({},e),{fields:Sz(e.fields)});case hs.Kind.LIST:return Q(x({},e),{values:e.values.map(vg)});case hs.Kind.INT:case hs.Kind.FLOAT:case hs.Kind.STRING:case hs.Kind.BOOLEAN:case hs.Kind.NULL:case hs.Kind.ENUM:case hs.Kind.VARIABLE:return e}}function Sz(e){return e.map(t=>Q(x({},t),{value:vg(t.value)})).sort((t,n)=>(0,vz.naturalCompare)(t.name.value,n.name.value))}});var wg=w(Fg=>{"use strict";m();T();N();Object.defineProperty(Fg,"__esModule",{value:!0});Fg.OverlappingFieldsCanBeMergedRule=Az;var ew=Xt(),Oz=ze(),Dg=Ft(),Dz=ci(),Yr=wt(),bz=Og(),nw=Fa();function rw(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+rw(n)).join(" and "):e}function Az(e){let t=new Rg,n=new Map;return{SelectionSet(r){let i=Rz(e,n,t,e.getParentType(),r);for(let[[a,o],c,l]of i){let d=rw(o);e.reportError(new Oz.GraphQLError(`Fields "${a}" conflict because ${d}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:c.concat(l)}))}}}}function Rz(e,t,n,r,i){let a=[],[o,c]=sN(e,t,r,i);if(Fz(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:tw(o)===tw(c)})}function tw(e){return(0,Dz.print)((0,bz.sortValueNode)(e))}function bg(e,t){return(0,Yr.isListType)(e)?(0,Yr.isListType)(t)?bg(e.ofType,t.ofType):!0:(0,Yr.isListType)(t)?!0:(0,Yr.isNonNullType)(e)?(0,Yr.isNonNullType)(t)?bg(e.ofType,t.ofType):!0:(0,Yr.isNonNullType)(t)?!0:(0,Yr.isLeafType)(e)||(0,Yr.isLeafType)(t)?e!==t:!1}function sN(e,t,n,r){let i=t.get(r);if(i)return i;let a=Object.create(null),o=Object.create(null);aw(e,n,r,a,o);let c=[a,Object.keys(o)];return t.set(r,c),c}function Ag(e,t,n){let r=t.get(n.selectionSet);if(r)return r;let i=(0,nw.typeFromAST)(e.getSchema(),n.typeCondition);return sN(e,t,i,n.selectionSet)}function aw(e,t,n,r,i){for(let a of n.selections)switch(a.kind){case Dg.Kind.FIELD:{let o=a.name.value,c;((0,Yr.isObjectType)(t)||(0,Yr.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 Dg.Kind.FRAGMENT_SPREAD:i[a.name.value]=!0;break;case Dg.Kind.INLINE_FRAGMENT:{let o=a.typeCondition,c=o?(0,nw.typeFromAST)(e.getSchema(),o):t;aw(e,c,a.selectionSet,r,i);break}}}function Lz(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 Rg=class{constructor(){this._data=new Map}has(t,n,r){var i;let[a,o]=t{"use strict";m();T();N();Object.defineProperty(Cg,"__esModule",{value:!0});Cg.PossibleFragmentSpreadsRule=Bz;var oN=Xt(),sw=ze(),Lg=wt(),ow=$d(),Cz=Fa();function Bz(e){return{InlineFragment(t){let n=e.getType(),r=e.getParentType();if((0,Lg.isCompositeType)(n)&&(0,Lg.isCompositeType)(r)&&!(0,ow.doTypesOverlap)(e.getSchema(),n,r)){let i=(0,oN.inspect)(r),a=(0,oN.inspect)(n);e.reportError(new sw.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=Uz(e,n),i=e.getParentType();if(r&&i&&!(0,ow.doTypesOverlap)(e.getSchema(),r,i)){let a=(0,oN.inspect)(i),o=(0,oN.inspect)(r);e.reportError(new sw.GraphQLError(`Fragment "${n}" cannot be spread here as objects of type "${a}" can never be of type "${o}".`,{nodes:t}))}}}}function Uz(e,t){let n=e.getFragment(t);if(n){let r=(0,Cz.typeFromAST)(e.getSchema(),n.typeCondition);if((0,Lg.isCompositeType)(r))return r}}});var kg=w(Ug=>{"use strict";m();T();N();Object.defineProperty(Ug,"__esModule",{value:!0});Ug.PossibleTypeExtensionsRule=qz;var kz=eu(),cw=Xt(),lw=Ir(),Mz=nu(),uw=ze(),gn=Ft(),xz=ec(),ll=wt();function qz(e){let t=e.getSchema(),n=Object.create(null);for(let i of e.getDocument().definitions)(0,xz.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=Vz[o.kind]:c&&(l=jz(c)),l){if(l!==i.kind){let d=Kz(i.kind);e.reportError(new uw.GraphQLError(`Cannot extend non-${d} type "${a}".`,{nodes:o?[o,i]:i}))}}else{let d=Object.keys(x(x({},n),t==null?void 0:t.getTypeMap())),f=(0,Mz.suggestionList)(a,d);e.reportError(new uw.GraphQLError(`Cannot extend type "${a}" because it is not defined.`+(0,kz.didYouMean)(f),{nodes:i.name}))}}}var Vz={[gn.Kind.SCALAR_TYPE_DEFINITION]:gn.Kind.SCALAR_TYPE_EXTENSION,[gn.Kind.OBJECT_TYPE_DEFINITION]:gn.Kind.OBJECT_TYPE_EXTENSION,[gn.Kind.INTERFACE_TYPE_DEFINITION]:gn.Kind.INTERFACE_TYPE_EXTENSION,[gn.Kind.UNION_TYPE_DEFINITION]:gn.Kind.UNION_TYPE_EXTENSION,[gn.Kind.ENUM_TYPE_DEFINITION]:gn.Kind.ENUM_TYPE_EXTENSION,[gn.Kind.INPUT_OBJECT_TYPE_DEFINITION]:gn.Kind.INPUT_OBJECT_TYPE_EXTENSION};function jz(e){if((0,ll.isScalarType)(e))return gn.Kind.SCALAR_TYPE_EXTENSION;if((0,ll.isObjectType)(e))return gn.Kind.OBJECT_TYPE_EXTENSION;if((0,ll.isInterfaceType)(e))return gn.Kind.INTERFACE_TYPE_EXTENSION;if((0,ll.isUnionType)(e))return gn.Kind.UNION_TYPE_EXTENSION;if((0,ll.isEnumType)(e))return gn.Kind.ENUM_TYPE_EXTENSION;if((0,ll.isInputObjectType)(e))return gn.Kind.INPUT_OBJECT_TYPE_EXTENSION;(0,lw.invariant)(!1,"Unexpected type: "+(0,cw.inspect)(e))}function Kz(e){switch(e){case gn.Kind.SCALAR_TYPE_EXTENSION:return"scalar";case gn.Kind.OBJECT_TYPE_EXTENSION:return"object";case gn.Kind.INTERFACE_TYPE_EXTENSION:return"interface";case gn.Kind.UNION_TYPE_EXTENSION:return"union";case gn.Kind.ENUM_TYPE_EXTENSION:return"enum";case gn.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:(0,lw.invariant)(!1,"Unexpected kind: "+(0,cw.inspect)(e))}}});var xg=w(uN=>{"use strict";m();T();N();Object.defineProperty(uN,"__esModule",{value:!0});uN.ProvidedRequiredArgumentsOnDirectivesRule=Nw;uN.ProvidedRequiredArgumentsRule=Qz;var pw=Xt(),dw=tu(),fw=ze(),mw=Ft(),Gz=ci(),Mg=wt(),$z=Qr();function Qz(e){return Q(x({},Nw(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,Mg.isRequiredArgument)(a)){let o=(0,pw.inspect)(a.type);e.reportError(new fw.GraphQLError(`Field "${r.name}" argument "${a.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}})}function Nw(e){var t;let n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:$z.specifiedDirectives;for(let c of i)n[c.name]=(0,dw.keyMap)(c.args.filter(Mg.isRequiredArgument),l=>l.name);let a=e.getDocument().definitions;for(let c of a)if(c.kind===mw.Kind.DIRECTIVE_DEFINITION){var o;let l=(o=c.arguments)!==null&&o!==void 0?o:[];n[c.name.value]=(0,dw.keyMap)(l.filter(Yz),d=>d.name.value)}return{Directive:{leave(c){let l=c.name.value,d=n[l];if(d){var f;let y=(f=c.arguments)!==null&&f!==void 0?f:[],I=new Set(y.map(v=>v.name.value));for(let[v,F]of Object.entries(d))if(!I.has(v)){let k=(0,Mg.isType)(F.type)?(0,pw.inspect)(F.type):(0,Gz.print)(F.type);e.reportError(new fw.GraphQLError(`Directive "@${l}" argument "${v}" of type "${k}" is required, but it was not provided.`,{nodes:c}))}}}}}}function Yz(e){return e.type.kind===mw.Kind.NON_NULL_TYPE&&e.defaultValue==null}});var Vg=w(qg=>{"use strict";m();T();N();Object.defineProperty(qg,"__esModule",{value:!0});qg.ScalarLeafsRule=Jz;var Tw=Xt(),Ew=ze(),hw=wt();function Jz(e){return{Field(t){let n=e.getType(),r=t.selectionSet;if(n){if((0,hw.isLeafType)((0,hw.getNamedType)(n))){if(r){let i=t.name.value,a=(0,Tw.inspect)(n);e.reportError(new Ew.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,Tw.inspect)(n);e.reportError(new Ew.GraphQLError(`Field "${i}" of type "${a}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}});var Kg=w(jg=>{"use strict";m();T();N();Object.defineProperty(jg,"__esModule",{value:!0});jg.printPathArray=Hz;function Hz(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}});var ip=w(cN=>{"use strict";m();T();N();Object.defineProperty(cN,"__esModule",{value:!0});cN.addPath=zz;cN.pathToArray=Wz;function zz(e,t,n){return{prev:e,key:t,typename:n}}function Wz(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}});var $g=w(Gg=>{"use strict";m();T();N();Object.defineProperty(Gg,"__esModule",{value:!0});Gg.coerceInputValue=iW;var Xz=eu(),lN=Xt(),Zz=Ir(),eW=Xm(),tW=Da(),aa=ip(),nW=Kg(),rW=nu(),ys=ze(),ap=wt();function iW(e,t,n=aW){return sp(e,t,n,void 0)}function aW(e,t,n){let r="Invalid value "+(0,lN.inspect)(t);throw e.length>0&&(r+=` at "value${(0,nW.printPathArray)(e)}"`),n.message=r+": "+n.message,n}function sp(e,t,n,r){if((0,ap.isNonNullType)(t)){if(e!=null)return sp(e,t.ofType,n,r);n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Expected non-nullable type "${(0,lN.inspect)(t)}" not to be null.`));return}if(e==null)return null;if((0,ap.isListType)(t)){let i=t.ofType;return(0,eW.isIterableObject)(e)?Array.from(e,(a,o)=>{let c=(0,aa.addPath)(r,o,void 0);return sp(a,i,n,c)}):[sp(e,i,n,r)]}if((0,ap.isInputObjectType)(t)){if(!(0,tW.isObjectLike)(e)){n((0,aa.pathToArray)(r),e,new ys.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,ap.isNonNullType)(o.type)){let l=(0,lN.inspect)(o.type);n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Field "${o.name}" of required type "${l}" was not provided.`))}continue}i[o.name]=sp(c,o.type,n,(0,aa.addPath)(r,o.name,t.name))}for(let o of Object.keys(e))if(!a[o]){let c=(0,rW.suggestionList)(o,Object.keys(t.getFields()));n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Field "${o}" is not defined by type "${t.name}".`+(0,Xz.didYouMean)(c)))}if(t.isOneOf){let o=Object.keys(i);o.length!==1&&n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Exactly one key must be specified for OneOf type "${t.name}".`));let c=o[0],l=i[c];l===null&&n((0,aa.pathToArray)(r).concat(c),l,new ys.GraphQLError(`Field "${c}" must be non-null.`))}return i}if((0,ap.isLeafType)(t)){let i;try{i=t.parseValue(e)}catch(a){a instanceof ys.GraphQLError?n((0,aa.pathToArray)(r),e,a):n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Expected type "${t.name}". `+a.message,{originalError:a}));return}return i===void 0&&n((0,aa.pathToArray)(r),e,new ys.GraphQLError(`Expected type "${t.name}".`)),i}(0,Zz.invariant)(!1,"Unexpected input type: "+(0,lN.inspect)(t))}});var up=w(Qg=>{"use strict";m();T();N();Object.defineProperty(Qg,"__esModule",{value:!0});Qg.valueFromAST=op;var sW=Xt(),oW=Ir(),uW=tu(),dl=Ft(),tc=wt();function op(e,t,n){if(e){if(e.kind===dl.Kind.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0)return;let i=n[r];return i===null&&(0,tc.isNonNullType)(t)?void 0:i}if((0,tc.isNonNullType)(t))return e.kind===dl.Kind.NULL?void 0:op(e,t.ofType,n);if(e.kind===dl.Kind.NULL)return null;if((0,tc.isListType)(t)){let r=t.ofType;if(e.kind===dl.Kind.LIST){let a=[];for(let o of e.values)if(yw(o,n)){if((0,tc.isNonNullType)(r))return;a.push(null)}else{let c=op(o,r,n);if(c===void 0)return;a.push(c)}return a}let i=op(e,r,n);return i===void 0?void 0:[i]}if((0,tc.isInputObjectType)(t)){if(e.kind!==dl.Kind.OBJECT)return;let r=Object.create(null),i=(0,uW.keyMap)(e.fields,a=>a.name.value);for(let a of Object.values(t.getFields())){let o=i[a.name];if(!o||yw(o.value,n)){if(a.defaultValue!==void 0)r[a.name]=a.defaultValue;else if((0,tc.isNonNullType)(a.type))return;continue}let c=op(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,tc.isLeafType)(t)){let r;try{r=t.parseLiteral(e,n)}catch(i){return}return r===void 0?void 0:r}(0,oW.invariant)(!1,"Unexpected input type: "+(0,sW.inspect)(t))}}function yw(e,t){return e.kind===dl.Kind.VARIABLE&&(t==null||t[e.name.value]===void 0)}});var ml=w(cp=>{"use strict";m();T();N();Object.defineProperty(cp,"__esModule",{value:!0});cp.getArgumentValues=vw;cp.getDirectiveValues=NW;cp.getVariableValues=fW;var pl=Xt(),cW=tu(),lW=Kg(),Is=ze(),Iw=Ft(),gw=ci(),fl=wt(),dW=$g(),pW=Fa(),_w=up();function fW(e,t,n,r){let i=[],a=r==null?void 0:r.maxErrors;try{let o=mW(e,t,n,c=>{if(a!=null&&i.length>=a)throw new Is.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 mW(e,t,n,r){let i={};for(let a of t){let o=a.variable.name.value,c=(0,pW.typeFromAST)(e,a.type);if(!(0,fl.isInputType)(c)){let d=(0,gw.print)(a.type);r(new Is.GraphQLError(`Variable "$${o}" expected value of type "${d}" which cannot be used as an input type.`,{nodes:a.type}));continue}if(!Sw(n,o)){if(a.defaultValue)i[o]=(0,_w.valueFromAST)(a.defaultValue,c);else if((0,fl.isNonNullType)(c)){let d=(0,pl.inspect)(c);r(new Is.GraphQLError(`Variable "$${o}" of required type "${d}" was not provided.`,{nodes:a}))}continue}let l=n[o];if(l===null&&(0,fl.isNonNullType)(c)){let d=(0,pl.inspect)(c);r(new Is.GraphQLError(`Variable "$${o}" of non-null type "${d}" must not be null.`,{nodes:a}));continue}i[o]=(0,dW.coerceInputValue)(l,c,(d,f,y)=>{let I=`Variable "$${o}" got invalid value `+(0,pl.inspect)(f);d.length>0&&(I+=` at "${o}${(0,lW.printPathArray)(d)}"`),r(new Is.GraphQLError(I+"; "+y.message,{nodes:a,originalError:y}))})}return i}function vw(e,t,n){var r;let i={},a=(r=t.arguments)!==null&&r!==void 0?r:[],o=(0,cW.keyMap)(a,c=>c.name.value);for(let c of e.args){let l=c.name,d=c.type,f=o[l];if(!f){if(c.defaultValue!==void 0)i[l]=c.defaultValue;else if((0,fl.isNonNullType)(d))throw new Is.GraphQLError(`Argument "${l}" of required type "${(0,pl.inspect)(d)}" was not provided.`,{nodes:t});continue}let y=f.value,I=y.kind===Iw.Kind.NULL;if(y.kind===Iw.Kind.VARIABLE){let F=y.name.value;if(n==null||!Sw(n,F)){if(c.defaultValue!==void 0)i[l]=c.defaultValue;else if((0,fl.isNonNullType)(d))throw new Is.GraphQLError(`Argument "${l}" of required type "${(0,pl.inspect)(d)}" was provided the variable "$${F}" which was not provided a runtime value.`,{nodes:y});continue}I=n[F]==null}if(I&&(0,fl.isNonNullType)(d))throw new Is.GraphQLError(`Argument "${l}" of non-null type "${(0,pl.inspect)(d)}" must not be null.`,{nodes:y});let v=(0,_w.valueFromAST)(y,d,n);if(v===void 0)throw new Is.GraphQLError(`Argument "${l}" has invalid value ${(0,gw.print)(y)}.`,{nodes:y});i[l]=v}return i}function NW(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 vw(e,i,n)}function Sw(e,t){return Object.prototype.hasOwnProperty.call(e,t)}});var fN=w(pN=>{"use strict";m();T();N();Object.defineProperty(pN,"__esModule",{value:!0});pN.collectFields=hW;pN.collectSubfields=yW;var Yg=Ft(),TW=wt(),Ow=Qr(),EW=Fa(),Dw=ml();function hW(e,t,n,r,i){let a=new Map;return dN(e,t,n,r,i,a,new Set),a}function yW(e,t,n,r,i){let a=new Map,o=new Set;for(let c of i)c.selectionSet&&dN(e,t,n,r,c.selectionSet,a,o);return a}function dN(e,t,n,r,i,a,o){for(let c of i.selections)switch(c.kind){case Yg.Kind.FIELD:{if(!Jg(n,c))continue;let l=IW(c),d=a.get(l);d!==void 0?d.push(c):a.set(l,[c]);break}case Yg.Kind.INLINE_FRAGMENT:{if(!Jg(n,c)||!bw(e,c,r))continue;dN(e,t,n,r,c.selectionSet,a,o);break}case Yg.Kind.FRAGMENT_SPREAD:{let l=c.name.value;if(o.has(l)||!Jg(n,c))continue;o.add(l);let d=t[l];if(!d||!bw(e,d,r))continue;dN(e,t,n,r,d.selectionSet,a,o);break}}}function Jg(e,t){let n=(0,Dw.getDirectiveValues)(Ow.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,Dw.getDirectiveValues)(Ow.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}function bw(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,EW.typeFromAST)(e,r);return i===n?!0:(0,TW.isAbstractType)(i)?e.isSubType(i,n):!1}function IW(e){return e.alias?e.alias.value:e.name.value}});var zg=w(Hg=>{"use strict";m();T();N();Object.defineProperty(Hg,"__esModule",{value:!0});Hg.SingleFieldSubscriptionsRule=vW;var Aw=ze(),gW=Ft(),_W=fN();function vW(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===gW.Kind.FRAGMENT_DEFINITION&&(c[d.name.value]=d);let l=(0,_W.collectFields)(n,c,a,r,t.selectionSet);if(l.size>1){let y=[...l.values()].slice(1).flat();e.reportError(new Aw.GraphQLError(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:y}))}for(let d of l.values())d[0].name.value.startsWith("__")&&e.reportError(new Aw.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 mN=w(Wg=>{"use strict";m();T();N();Object.defineProperty(Wg,"__esModule",{value:!0});Wg.groupBy=SW;function SW(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 Zg=w(Xg=>{"use strict";m();T();N();Object.defineProperty(Xg,"__esModule",{value:!0});Xg.UniqueArgumentDefinitionNamesRule=bW;var OW=mN(),DW=ze();function bW(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,f=(c=l.arguments)!==null&&c!==void 0?c:[];n(`${a}.${d}`,f)}return!1}function n(r,i){let a=(0,OW.groupBy)(i,o=>o.name.value);for(let[o,c]of a)c.length>1&&e.reportError(new DW.GraphQLError(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:c.map(l=>l.name)}));return!1}}});var t_=w(e_=>{"use strict";m();T();N();Object.defineProperty(e_,"__esModule",{value:!0});e_.UniqueArgumentNamesRule=PW;var AW=mN(),RW=ze();function PW(e){return{Field:t,Directive:t};function t(n){var r;let i=(r=n.arguments)!==null&&r!==void 0?r:[],a=(0,AW.groupBy)(i,o=>o.name.value);for(let[o,c]of a)c.length>1&&e.reportError(new RW.GraphQLError(`There can be only one argument named "${o}".`,{nodes:c.map(l=>l.name)}))}}});var r_=w(n_=>{"use strict";m();T();N();Object.defineProperty(n_,"__esModule",{value:!0});n_.UniqueDirectiveNamesRule=FW;var Rw=ze();function FW(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 Rw.GraphQLError(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new Rw.GraphQLError(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}});var s_=w(a_=>{"use strict";m();T();N();Object.defineProperty(a_,"__esModule",{value:!0});a_.UniqueDirectivesPerLocationRule=CW;var wW=ze(),i_=Ft(),Pw=ec(),LW=Qr();function CW(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():LW.specifiedDirectives;for(let c of r)t[c.name]=!c.isRepeatable;let i=e.getDocument().definitions;for(let c of i)c.kind===i_.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===i_.Kind.SCHEMA_DEFINITION||c.kind===i_.Kind.SCHEMA_EXTENSION)l=a;else if((0,Pw.isTypeDefinitionNode)(c)||(0,Pw.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 f=d.name.value;t[f]&&(l[f]?e.reportError(new wW.GraphQLError(`The directive "@${f}" can only be used once at this location.`,{nodes:[l[f],d]})):l[f]=d)}}}}});var u_=w(o_=>{"use strict";m();T();N();Object.defineProperty(o_,"__esModule",{value:!0});o_.UniqueEnumValueNamesRule=UW;var Fw=ze(),BW=wt();function UW(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 f of l){let y=f.name.value,I=n[c];(0,BW.isEnumType)(I)&&I.getValue(y)?e.reportError(new Fw.GraphQLError(`Enum value "${c}.${y}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):d[y]?e.reportError(new Fw.GraphQLError(`Enum value "${c}.${y}" can only be defined once.`,{nodes:[d[y],f.name]})):d[y]=f.name}return!1}}});var d_=w(l_=>{"use strict";m();T();N();Object.defineProperty(l_,"__esModule",{value:!0});l_.UniqueFieldDefinitionNamesRule=kW;var ww=ze(),c_=wt();function kW(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 f of l){let y=f.name.value;MW(n[c],y)?e.reportError(new ww.GraphQLError(`Field "${c}.${y}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):d[y]?e.reportError(new ww.GraphQLError(`Field "${c}.${y}" can only be defined once.`,{nodes:[d[y],f.name]})):d[y]=f.name}return!1}}function MW(e,t){return(0,c_.isObjectType)(e)||(0,c_.isInterfaceType)(e)||(0,c_.isInputObjectType)(e)?e.getFields()[t]!=null:!1}});var f_=w(p_=>{"use strict";m();T();N();Object.defineProperty(p_,"__esModule",{value:!0});p_.UniqueFragmentNamesRule=qW;var xW=ze();function qW(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){let r=n.name.value;return t[r]?e.reportError(new xW.GraphQLError(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}});var N_=w(m_=>{"use strict";m();T();N();Object.defineProperty(m_,"__esModule",{value:!0});m_.UniqueInputFieldNamesRule=KW;var VW=Ir(),jW=ze();function KW(e){let t=[],n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){let r=t.pop();r||(0,VW.invariant)(!1),n=r}},ObjectField(r){let i=r.name.value;n[i]?e.reportError(new jW.GraphQLError(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}});var E_=w(T_=>{"use strict";m();T();N();Object.defineProperty(T_,"__esModule",{value:!0});T_.UniqueOperationNamesRule=$W;var GW=ze();function $W(e){let t=Object.create(null);return{OperationDefinition(n){let r=n.name;return r&&(t[r.value]?e.reportError(new GW.GraphQLError(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}});var y_=w(h_=>{"use strict";m();T();N();Object.defineProperty(h_,"__esModule",{value:!0});h_.UniqueOperationTypesRule=QW;var Lw=ze();function QW(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,f=n[d];r[d]?e.reportError(new Lw.GraphQLError(`Type for ${d} already defined in the schema. It cannot be redefined.`,{nodes:l})):f?e.reportError(new Lw.GraphQLError(`There can be only one ${d} type in schema.`,{nodes:[f,l]})):n[d]=l}return!1}}});var g_=w(I_=>{"use strict";m();T();N();Object.defineProperty(I_,"__esModule",{value:!0});I_.UniqueTypeNamesRule=YW;var Cw=ze();function YW(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 Cw.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 Cw.GraphQLError(`There can be only one type named "${a}".`,{nodes:[t[a],i.name]})):t[a]=i.name,!1}}});var v_=w(__=>{"use strict";m();T();N();Object.defineProperty(__,"__esModule",{value:!0});__.UniqueVariableNamesRule=zW;var JW=mN(),HW=ze();function zW(e){return{OperationDefinition(t){var n;let r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=(0,JW.groupBy)(r,a=>a.variable.name.value);for(let[a,o]of i)o.length>1&&e.reportError(new HW.GraphQLError(`There can be only one variable named "$${a}".`,{nodes:o.map(c=>c.variable.name)}))}}}});var D_=w(O_=>{"use strict";m();T();N();Object.defineProperty(O_,"__esModule",{value:!0});O_.ValuesOfCorrectTypeRule=e4;var WW=eu(),lp=Xt(),XW=tu(),ZW=nu(),La=ze(),S_=Ft(),NN=ci(),wa=wt();function e4(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){let r=(0,wa.getNullableType)(e.getParentInputType());if(!(0,wa.isListType)(r))return nc(e,n),!1},ObjectValue(n){let r=(0,wa.getNamedType)(e.getInputType());if(!(0,wa.isInputObjectType)(r))return nc(e,n),!1;let i=(0,XW.keyMap)(n.fields,a=>a.name.value);for(let a of Object.values(r.getFields()))if(!i[a.name]&&(0,wa.isRequiredInputField)(a)){let c=(0,lp.inspect)(a.type);e.reportError(new La.GraphQLError(`Field "${r.name}.${a.name}" of required type "${c}" was not provided.`,{nodes:n}))}r.isOneOf&&t4(e,n,r,i,t)},ObjectField(n){let r=(0,wa.getNamedType)(e.getParentInputType());if(!e.getInputType()&&(0,wa.isInputObjectType)(r)){let a=(0,ZW.suggestionList)(n.name.value,Object.keys(r.getFields()));e.reportError(new La.GraphQLError(`Field "${n.name.value}" is not defined by type "${r.name}".`+(0,WW.didYouMean)(a),{nodes:n}))}},NullValue(n){let r=e.getInputType();(0,wa.isNonNullType)(r)&&e.reportError(new La.GraphQLError(`Expected value of type "${(0,lp.inspect)(r)}", found ${(0,NN.print)(n)}.`,{nodes:n}))},EnumValue:n=>nc(e,n),IntValue:n=>nc(e,n),FloatValue:n=>nc(e,n),StringValue:n=>nc(e,n),BooleanValue:n=>nc(e,n)}}function nc(e,t){let n=e.getInputType();if(!n)return;let r=(0,wa.getNamedType)(n);if(!(0,wa.isLeafType)(r)){let i=(0,lp.inspect)(n);e.reportError(new La.GraphQLError(`Expected value of type "${i}", found ${(0,NN.print)(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){let a=(0,lp.inspect)(n);e.reportError(new La.GraphQLError(`Expected value of type "${a}", found ${(0,NN.print)(t)}.`,{nodes:t}))}}catch(i){let a=(0,lp.inspect)(n);i instanceof La.GraphQLError?e.reportError(i):e.reportError(new La.GraphQLError(`Expected value of type "${a}", found ${(0,NN.print)(t)}; `+i.message,{nodes:t,originalError:i}))}}function t4(e,t,n,r,i){var a;let o=Object.keys(r);if(o.length!==1){e.reportError(new La.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===S_.Kind.NULL,f=(l==null?void 0:l.kind)===S_.Kind.VARIABLE;if(d){e.reportError(new La.GraphQLError(`Field "${n.name}.${o[0]}" must be non-null.`,{nodes:[t]}));return}if(f){let y=l.name.value;i[y].type.kind!==S_.Kind.NON_NULL_TYPE&&e.reportError(new La.GraphQLError(`Variable "${y}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}});var A_=w(b_=>{"use strict";m();T();N();Object.defineProperty(b_,"__esModule",{value:!0});b_.VariablesAreInputTypesRule=s4;var n4=ze(),r4=ci(),i4=wt(),a4=Fa();function s4(e){return{VariableDefinition(t){let n=(0,a4.typeFromAST)(e.getSchema(),t.type);if(n!==void 0&&!(0,i4.isInputType)(n)){let r=t.variable.name.value,i=(0,r4.print)(t.type);e.reportError(new n4.GraphQLError(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}});var P_=w(R_=>{"use strict";m();T();N();Object.defineProperty(R_,"__esModule",{value:!0});R_.VariablesInAllowedPositionRule=l4;var Bw=Xt(),o4=ze(),u4=Ft(),Uw=wt(),kw=$d(),c4=Fa();function l4(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(),f=(0,c4.typeFromAST)(d,l.type);if(f&&!d4(d,f,l.defaultValue,a,o)){let y=(0,Bw.inspect)(f),I=(0,Bw.inspect)(a);e.reportError(new o4.GraphQLError(`Variable "$${c}" of type "${y}" used in position expecting type "${I}".`,{nodes:[l,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function d4(e,t,n,r,i){if((0,Uw.isNonNullType)(r)&&!(0,Uw.isNonNullType)(t)){if(!(n!=null&&n.kind!==u4.Kind.NULL)&&!(i!==void 0))return!1;let c=r.ofType;return(0,kw.isTypeSubTypeOf)(e,t,c)}return(0,kw.isTypeSubTypeOf)(e,t,r)}});var F_=w(su=>{"use strict";m();T();N();Object.defineProperty(su,"__esModule",{value:!0});su.specifiedSDLRules=su.specifiedRules=su.recommendedRules=void 0;var p4=JI(),f4=zI(),m4=XI(),Mw=ZI(),xw=rg(),N4=ag(),qw=ug(),T4=lg(),E4=pg(),h4=mg(),y4=Tg(),I4=hg(),g4=Ig(),_4=_g(),v4=wg(),S4=Bg(),O4=kg(),Vw=xg(),D4=Vg(),b4=zg(),A4=Zg(),jw=t_(),R4=r_(),Kw=s_(),P4=u_(),F4=d_(),w4=f_(),Gw=N_(),L4=E_(),C4=y_(),B4=g_(),U4=v_(),k4=D_(),M4=A_(),x4=P_(),$w=Object.freeze([h4.MaxIntrospectionDepthRule]);su.recommendedRules=$w;var q4=Object.freeze([p4.ExecutableDefinitionsRule,L4.UniqueOperationNamesRule,T4.LoneAnonymousOperationRule,b4.SingleFieldSubscriptionsRule,qw.KnownTypeNamesRule,m4.FragmentsOnCompositeTypesRule,M4.VariablesAreInputTypesRule,D4.ScalarLeafsRule,f4.FieldsOnCorrectTypeRule,w4.UniqueFragmentNamesRule,N4.KnownFragmentNamesRule,g4.NoUnusedFragmentsRule,S4.PossibleFragmentSpreadsRule,y4.NoFragmentCyclesRule,U4.UniqueVariableNamesRule,I4.NoUndefinedVariablesRule,_4.NoUnusedVariablesRule,xw.KnownDirectivesRule,Kw.UniqueDirectivesPerLocationRule,Mw.KnownArgumentNamesRule,jw.UniqueArgumentNamesRule,k4.ValuesOfCorrectTypeRule,Vw.ProvidedRequiredArgumentsRule,x4.VariablesInAllowedPositionRule,v4.OverlappingFieldsCanBeMergedRule,Gw.UniqueInputFieldNamesRule,...$w]);su.specifiedRules=q4;var V4=Object.freeze([E4.LoneSchemaDefinitionRule,C4.UniqueOperationTypesRule,B4.UniqueTypeNamesRule,P4.UniqueEnumValueNamesRule,F4.UniqueFieldDefinitionNamesRule,A4.UniqueArgumentDefinitionNamesRule,R4.UniqueDirectiveNamesRule,qw.KnownTypeNamesRule,xw.KnownDirectivesRule,Kw.UniqueDirectivesPerLocationRule,O4.PossibleTypeExtensionsRule,Mw.KnownArgumentNamesOnDirectivesRule,jw.UniqueArgumentNamesRule,Gw.UniqueInputFieldNamesRule,Vw.ProvidedRequiredArgumentsOnDirectivesRule]);su.specifiedSDLRules=V4});var C_=w(ou=>{"use strict";m();T();N();Object.defineProperty(ou,"__esModule",{value:!0});ou.ValidationContext=ou.SDLValidationContext=ou.ASTValidationContext=void 0;var Qw=Ft(),j4=Qu(),Yw=nN(),dp=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===Qw.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===Qw.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}};ou.ASTValidationContext=dp;var w_=class extends dp{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}};ou.SDLValidationContext=w_;var L_=class extends dp{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 Yw.TypeInfo(this._schema);(0,j4.visit)(t,(0,Yw.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()}};ou.ValidationContext=L_});var Tl=w(Nl=>{"use strict";m();T();N();Object.defineProperty(Nl,"__esModule",{value:!0});Nl.assertValidSDL=Y4;Nl.assertValidSDLExtension=J4;Nl.validate=Q4;Nl.validateSDL=B_;var K4=Br(),G4=ze(),TN=Qu(),$4=tp(),Jw=nN(),Hw=F_(),zw=C_();function Q4(e,t,n=Hw.specifiedRules,r,i=new Jw.TypeInfo(e)){var a;let o=(a=r==null?void 0:r.maxErrors)!==null&&a!==void 0?a:100;t||(0,K4.devAssert)(!1,"Must provide document."),(0,$4.assertValidSchema)(e);let c=Object.freeze({}),l=[],d=new zw.ValidationContext(e,t,i,y=>{if(l.length>=o)throw l.push(new G4.GraphQLError("Too many validation errors, error limit reached. Validation aborted.")),c;l.push(y)}),f=(0,TN.visitInParallel)(n.map(y=>y(d)));try{(0,TN.visit)(t,(0,Jw.visitWithTypeInfo)(i,f))}catch(y){if(y!==c)throw y}return l}function B_(e,t,n=Hw.specifiedSDLRules){let r=[],i=new zw.SDLValidationContext(e,t,o=>{r.push(o)}),a=n.map(o=>o(i));return(0,TN.visit)(e,(0,TN.visitInParallel)(a)),r}function Y4(e){let t=B_(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` `))}function J4(e,t){let n=B_(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(` -`))}});var Ww=w(U_=>{"use strict";m();T();N();Object.defineProperty(U_,"__esModule",{value:!0});U_.memoize3=H4;function H4(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 Xw=w(k_=>{"use strict";m();T();N();Object.defineProperty(k_,"__esModule",{value:!0});k_.promiseForObject=z4;function z4(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 Zw=w(M_=>{"use strict";m();T();N();Object.defineProperty(M_,"__esModule",{value:!0});M_.promiseReduce=X4;var W4=hm();function X4(e,t,n){let r=n;for(let i of e)r=(0,W4.isPromise)(r)?r.then(a=>t(a,i)):t(r,i);return r}});var eL=w(q_=>{"use strict";m();T();N();Object.defineProperty(q_,"__esModule",{value:!0});q_.toError=e8;var Z4=Xt();function e8(e){return e instanceof Error?e:new x_(e)}var x_=class extends Error{constructor(t){super("Unexpected error value: "+(0,Z4.inspect)(t)),this.name="NonErrorThrown",this.thrownValue=t}}});var EN=w(V_=>{"use strict";m();T();N();Object.defineProperty(V_,"__esModule",{value:!0});V_.locatedError=r8;var t8=eL(),n8=ze();function r8(e,t,n){var r;let i=(0,t8.toError)(e);return i8(i)?i:new n8.GraphQLError(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function i8(e){return Array.isArray(e.path)}});var fp=w(Ci=>{"use strict";m();T();N();Object.defineProperty(Ci,"__esModule",{value:!0});Ci.assertValidExecutionArguments=uL;Ci.buildExecutionContext=cL;Ci.buildResolveInfo=dL;Ci.defaultTypeResolver=Ci.defaultFieldResolver=void 0;Ci.execute=oL;Ci.executeSync=d8;Ci.getFieldDef=fL;var K_=Br(),rc=Xt(),a8=Ir(),s8=Xm(),Q_=Da(),sa=hm(),o8=Ww(),ic=ip(),tL=Xw(),u8=Zw(),Li=ze(),yN=EN(),j_=ba(),nL=Ft(),uu=wt(),Tl=Fi(),c8=tp(),aL=fN(),sL=fl(),l8=(0,o8.memoize3)((e,t,n)=>(0,aL.collectSubfields)(e.schema,e.fragments,e.variableValues,t,n));function oL(e){arguments.length<2||(0,K_.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;uL(t,n,r);let a=cL(e);if(!("schema"in a))return{errors:a};try{let{operation:o}=a,c=p8(a,o,i);return(0,sa.isPromise)(c)?c.then(l=>hN(l,a.errors),l=>(a.errors.push(l),hN(null,a.errors))):hN(c,a.errors)}catch(o){return a.errors.push(o),hN(null,a.errors)}}function d8(e){let t=oL(e);if((0,sa.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function hN(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function uL(e,t,n){t||(0,K_.devAssert)(!1,"Must provide document."),(0,c8.assertValidSchema)(e),n==null||(0,Q_.isObjectLike)(n)||(0,K_.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 cL(e){var t,n;let{schema:r,document:i,rootValue:a,contextValue:o,variableValues:c,operationName:l,fieldResolver:d,typeResolver:f,subscribeFieldResolver:y}=e,I,v=Object.create(null);for(let K of i.definitions)switch(K.kind){case nL.Kind.OPERATION_DEFINITION:if(l==null){if(I!==void 0)return[new Li.GraphQLError("Must provide operation name if query contains multiple operations.")];I=K}else((t=K.name)===null||t===void 0?void 0:t.value)===l&&(I=K);break;case nL.Kind.FRAGMENT_DEFINITION:v[K.name.value]=K;break;default:}if(!I)return l!=null?[new Li.GraphQLError(`Unknown operation named "${l}".`)]:[new Li.GraphQLError("Must provide an operation.")];let F=(n=I.variableDefinitions)!==null&&n!==void 0?n:[],k=(0,sL.getVariableValues)(r,F,c!=null?c:{},{maxErrors:50});return k.errors?k.errors:{schema:r,fragments:v,rootValue:a,contextValue:o,operation:I,variableValues:k.coerced,fieldResolver:d!=null?d:$_,typeResolver:f!=null?f:pL,subscribeFieldResolver:y!=null?y:$_,errors:[]}}function p8(e,t,n){let r=e.schema.getRootType(t.operation);if(r==null)throw new Li.GraphQLError(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});let i=(0,aL.collectFields)(e.schema,e.fragments,e.variableValues,r,t.selectionSet),a=void 0;switch(t.operation){case j_.OperationTypeNode.QUERY:return IN(e,r,n,a,i);case j_.OperationTypeNode.MUTATION:return f8(e,r,n,a,i);case j_.OperationTypeNode.SUBSCRIPTION:return IN(e,r,n,a,i)}}function f8(e,t,n,r,i){return(0,u8.promiseReduce)(i.entries(),(a,[o,c])=>{let l=(0,ic.addPath)(r,o,t.name),d=lL(e,t,n,c,l);return d===void 0?a:(0,sa.isPromise)(d)?d.then(f=>(a[o]=f,a)):(a[o]=d,a)},Object.create(null))}function IN(e,t,n,r,i){let a=Object.create(null),o=!1;try{for(let[c,l]of i.entries()){let d=(0,ic.addPath)(r,c,t.name),f=lL(e,t,n,l,d);f!==void 0&&(a[c]=f,(0,sa.isPromise)(f)&&(o=!0))}}catch(c){if(o)return(0,tL.promiseForObject)(a).finally(()=>{throw c});throw c}return o?(0,tL.promiseForObject)(a):a}function lL(e,t,n,r,i){var a;let o=fL(e.schema,t,r[0]);if(!o)return;let c=o.type,l=(a=o.resolve)!==null&&a!==void 0?a:e.fieldResolver,d=dL(e,o,r,t,i);try{let f=(0,sL.getArgumentValues)(o,r[0],e.variableValues),y=e.contextValue,I=l(n,f,y,d),v;return(0,sa.isPromise)(I)?v=I.then(F=>pp(e,c,r,d,i,F)):v=pp(e,c,r,d,i,I),(0,sa.isPromise)(v)?v.then(void 0,F=>{let k=(0,yN.locatedError)(F,r,(0,ic.pathToArray)(i));return gN(k,c,e)}):v}catch(f){let y=(0,yN.locatedError)(f,r,(0,ic.pathToArray)(i));return gN(y,c,e)}}function dL(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 gN(e,t,n){if((0,uu.isNonNullType)(t))throw e;return n.errors.push(e),null}function pp(e,t,n,r,i,a){if(a instanceof Error)throw a;if((0,uu.isNonNullType)(t)){let o=pp(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,uu.isListType)(t))return m8(e,t,n,r,i,a);if((0,uu.isLeafType)(t))return N8(t,a);if((0,uu.isAbstractType)(t))return T8(e,t,n,r,i,a);if((0,uu.isObjectType)(t))return G_(e,t,n,r,i,a);(0,a8.invariant)(!1,"Cannot complete value of unexpected output type: "+(0,rc.inspect)(t))}function m8(e,t,n,r,i,a){if(!(0,s8.isIterableObject)(a))throw new Li.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,f)=>{let y=(0,ic.addPath)(i,f,void 0);try{let I;return(0,sa.isPromise)(d)?I=d.then(v=>pp(e,o,n,r,y,v)):I=pp(e,o,n,r,y,d),(0,sa.isPromise)(I)?(c=!0,I.then(void 0,v=>{let F=(0,yN.locatedError)(v,n,(0,ic.pathToArray)(y));return gN(F,o,e)})):I}catch(I){let v=(0,yN.locatedError)(I,n,(0,ic.pathToArray)(y));return gN(v,o,e)}});return c?Promise.all(l):l}function N8(e,t){let n=e.serialize(t);if(n==null)throw new Error(`Expected \`${(0,rc.inspect)(e)}.serialize(${(0,rc.inspect)(t)})\` to return non-nullable value, returned: ${(0,rc.inspect)(n)}`);return n}function T8(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,sa.isPromise)(d)?d.then(f=>G_(e,rL(f,e,t,n,r,a),n,r,i,a)):G_(e,rL(d,e,t,n,r,a),n,r,i,a)}function rL(e,t,n,r,i,a){if(e==null)throw new Li.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,uu.isObjectType)(e))throw new Li.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 Li.GraphQLError(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${(0,rc.inspect)(a)}, received "${(0,rc.inspect)(e)}".`);let o=t.schema.getType(e);if(o==null)throw new Li.GraphQLError(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!(0,uu.isObjectType)(o))throw new Li.GraphQLError(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new Li.GraphQLError(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function G_(e,t,n,r,i,a){let o=l8(e,t,n);if(t.isTypeOf){let c=t.isTypeOf(a,e.contextValue,r);if((0,sa.isPromise)(c))return c.then(l=>{if(!l)throw iL(t,a,n);return IN(e,t,a,i,o)});if(!c)throw iL(t,a,n)}return IN(e,t,a,i,o)}function iL(e,t,n){return new Li.GraphQLError(`Expected value of type "${e.name}" but got: ${(0,rc.inspect)(t)}.`,{nodes:n})}var pL=function(e,t,n,r){if((0,Q_.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(_N,"__esModule",{value:!0});_N.graphql=v8;_N.graphqlSync=S8;var E8=Br(),h8=hm(),y8=rl(),I8=tp(),g8=Nl(),_8=fp();function v8(e){return new Promise(t=>t(mL(e)))}function S8(e){let t=mL(e);if((0,h8.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function mL(e){arguments.length<2||(0,E8.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,I8.validateSchema)(t);if(d.length>0)return{errors:d};let f;try{f=(0,y8.parse)(n)}catch(I){return{errors:[I]}}let y=(0,g8.validate)(t,f);return y.length>0?{errors:y}:(0,_8.execute)({schema:t,document:f,rootValue:r,contextValue:i,variableValues:a,operationName:o,fieldResolver:c,typeResolver:l})}});var hL=w(ye=>{"use strict";m();T();N();Object.defineProperty(ye,"__esModule",{value:!0});Object.defineProperty(ye,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return oa.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(ye,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return gs.GRAPHQL_MAX_INT}});Object.defineProperty(ye,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return gs.GRAPHQL_MIN_INT}});Object.defineProperty(ye,"GraphQLBoolean",{enumerable:!0,get:function(){return gs.GraphQLBoolean}});Object.defineProperty(ye,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return oa.GraphQLDeprecatedDirective}});Object.defineProperty(ye,"GraphQLDirective",{enumerable:!0,get:function(){return oa.GraphQLDirective}});Object.defineProperty(ye,"GraphQLEnumType",{enumerable:!0,get:function(){return rt.GraphQLEnumType}});Object.defineProperty(ye,"GraphQLFloat",{enumerable:!0,get:function(){return gs.GraphQLFloat}});Object.defineProperty(ye,"GraphQLID",{enumerable:!0,get:function(){return gs.GraphQLID}});Object.defineProperty(ye,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return oa.GraphQLIncludeDirective}});Object.defineProperty(ye,"GraphQLInputObjectType",{enumerable:!0,get:function(){return rt.GraphQLInputObjectType}});Object.defineProperty(ye,"GraphQLInt",{enumerable:!0,get:function(){return gs.GraphQLInt}});Object.defineProperty(ye,"GraphQLInterfaceType",{enumerable:!0,get:function(){return rt.GraphQLInterfaceType}});Object.defineProperty(ye,"GraphQLList",{enumerable:!0,get:function(){return rt.GraphQLList}});Object.defineProperty(ye,"GraphQLNonNull",{enumerable:!0,get:function(){return rt.GraphQLNonNull}});Object.defineProperty(ye,"GraphQLObjectType",{enumerable:!0,get:function(){return rt.GraphQLObjectType}});Object.defineProperty(ye,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return oa.GraphQLOneOfDirective}});Object.defineProperty(ye,"GraphQLScalarType",{enumerable:!0,get:function(){return rt.GraphQLScalarType}});Object.defineProperty(ye,"GraphQLSchema",{enumerable:!0,get:function(){return Y_.GraphQLSchema}});Object.defineProperty(ye,"GraphQLSkipDirective",{enumerable:!0,get:function(){return oa.GraphQLSkipDirective}});Object.defineProperty(ye,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return oa.GraphQLSpecifiedByDirective}});Object.defineProperty(ye,"GraphQLString",{enumerable:!0,get:function(){return gs.GraphQLString}});Object.defineProperty(ye,"GraphQLUnionType",{enumerable:!0,get:function(){return rt.GraphQLUnionType}});Object.defineProperty(ye,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return Jr.SchemaMetaFieldDef}});Object.defineProperty(ye,"TypeKind",{enumerable:!0,get:function(){return Jr.TypeKind}});Object.defineProperty(ye,"TypeMetaFieldDef",{enumerable:!0,get:function(){return Jr.TypeMetaFieldDef}});Object.defineProperty(ye,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return Jr.TypeNameMetaFieldDef}});Object.defineProperty(ye,"__Directive",{enumerable:!0,get:function(){return Jr.__Directive}});Object.defineProperty(ye,"__DirectiveLocation",{enumerable:!0,get:function(){return Jr.__DirectiveLocation}});Object.defineProperty(ye,"__EnumValue",{enumerable:!0,get:function(){return Jr.__EnumValue}});Object.defineProperty(ye,"__Field",{enumerable:!0,get:function(){return Jr.__Field}});Object.defineProperty(ye,"__InputValue",{enumerable:!0,get:function(){return Jr.__InputValue}});Object.defineProperty(ye,"__Schema",{enumerable:!0,get:function(){return Jr.__Schema}});Object.defineProperty(ye,"__Type",{enumerable:!0,get:function(){return Jr.__Type}});Object.defineProperty(ye,"__TypeKind",{enumerable:!0,get:function(){return Jr.__TypeKind}});Object.defineProperty(ye,"assertAbstractType",{enumerable:!0,get:function(){return rt.assertAbstractType}});Object.defineProperty(ye,"assertCompositeType",{enumerable:!0,get:function(){return rt.assertCompositeType}});Object.defineProperty(ye,"assertDirective",{enumerable:!0,get:function(){return oa.assertDirective}});Object.defineProperty(ye,"assertEnumType",{enumerable:!0,get:function(){return rt.assertEnumType}});Object.defineProperty(ye,"assertEnumValueName",{enumerable:!0,get:function(){return EL.assertEnumValueName}});Object.defineProperty(ye,"assertInputObjectType",{enumerable:!0,get:function(){return rt.assertInputObjectType}});Object.defineProperty(ye,"assertInputType",{enumerable:!0,get:function(){return rt.assertInputType}});Object.defineProperty(ye,"assertInterfaceType",{enumerable:!0,get:function(){return rt.assertInterfaceType}});Object.defineProperty(ye,"assertLeafType",{enumerable:!0,get:function(){return rt.assertLeafType}});Object.defineProperty(ye,"assertListType",{enumerable:!0,get:function(){return rt.assertListType}});Object.defineProperty(ye,"assertName",{enumerable:!0,get:function(){return EL.assertName}});Object.defineProperty(ye,"assertNamedType",{enumerable:!0,get:function(){return rt.assertNamedType}});Object.defineProperty(ye,"assertNonNullType",{enumerable:!0,get:function(){return rt.assertNonNullType}});Object.defineProperty(ye,"assertNullableType",{enumerable:!0,get:function(){return rt.assertNullableType}});Object.defineProperty(ye,"assertObjectType",{enumerable:!0,get:function(){return rt.assertObjectType}});Object.defineProperty(ye,"assertOutputType",{enumerable:!0,get:function(){return rt.assertOutputType}});Object.defineProperty(ye,"assertScalarType",{enumerable:!0,get:function(){return rt.assertScalarType}});Object.defineProperty(ye,"assertSchema",{enumerable:!0,get:function(){return Y_.assertSchema}});Object.defineProperty(ye,"assertType",{enumerable:!0,get:function(){return rt.assertType}});Object.defineProperty(ye,"assertUnionType",{enumerable:!0,get:function(){return rt.assertUnionType}});Object.defineProperty(ye,"assertValidSchema",{enumerable:!0,get:function(){return TL.assertValidSchema}});Object.defineProperty(ye,"assertWrappingType",{enumerable:!0,get:function(){return rt.assertWrappingType}});Object.defineProperty(ye,"getNamedType",{enumerable:!0,get:function(){return rt.getNamedType}});Object.defineProperty(ye,"getNullableType",{enumerable:!0,get:function(){return rt.getNullableType}});Object.defineProperty(ye,"introspectionTypes",{enumerable:!0,get:function(){return Jr.introspectionTypes}});Object.defineProperty(ye,"isAbstractType",{enumerable:!0,get:function(){return rt.isAbstractType}});Object.defineProperty(ye,"isCompositeType",{enumerable:!0,get:function(){return rt.isCompositeType}});Object.defineProperty(ye,"isDirective",{enumerable:!0,get:function(){return oa.isDirective}});Object.defineProperty(ye,"isEnumType",{enumerable:!0,get:function(){return rt.isEnumType}});Object.defineProperty(ye,"isInputObjectType",{enumerable:!0,get:function(){return rt.isInputObjectType}});Object.defineProperty(ye,"isInputType",{enumerable:!0,get:function(){return rt.isInputType}});Object.defineProperty(ye,"isInterfaceType",{enumerable:!0,get:function(){return rt.isInterfaceType}});Object.defineProperty(ye,"isIntrospectionType",{enumerable:!0,get:function(){return Jr.isIntrospectionType}});Object.defineProperty(ye,"isLeafType",{enumerable:!0,get:function(){return rt.isLeafType}});Object.defineProperty(ye,"isListType",{enumerable:!0,get:function(){return rt.isListType}});Object.defineProperty(ye,"isNamedType",{enumerable:!0,get:function(){return rt.isNamedType}});Object.defineProperty(ye,"isNonNullType",{enumerable:!0,get:function(){return rt.isNonNullType}});Object.defineProperty(ye,"isNullableType",{enumerable:!0,get:function(){return rt.isNullableType}});Object.defineProperty(ye,"isObjectType",{enumerable:!0,get:function(){return rt.isObjectType}});Object.defineProperty(ye,"isOutputType",{enumerable:!0,get:function(){return rt.isOutputType}});Object.defineProperty(ye,"isRequiredArgument",{enumerable:!0,get:function(){return rt.isRequiredArgument}});Object.defineProperty(ye,"isRequiredInputField",{enumerable:!0,get:function(){return rt.isRequiredInputField}});Object.defineProperty(ye,"isScalarType",{enumerable:!0,get:function(){return rt.isScalarType}});Object.defineProperty(ye,"isSchema",{enumerable:!0,get:function(){return Y_.isSchema}});Object.defineProperty(ye,"isSpecifiedDirective",{enumerable:!0,get:function(){return oa.isSpecifiedDirective}});Object.defineProperty(ye,"isSpecifiedScalarType",{enumerable:!0,get:function(){return gs.isSpecifiedScalarType}});Object.defineProperty(ye,"isType",{enumerable:!0,get:function(){return rt.isType}});Object.defineProperty(ye,"isUnionType",{enumerable:!0,get:function(){return rt.isUnionType}});Object.defineProperty(ye,"isWrappingType",{enumerable:!0,get:function(){return rt.isWrappingType}});Object.defineProperty(ye,"resolveObjMapThunk",{enumerable:!0,get:function(){return rt.resolveObjMapThunk}});Object.defineProperty(ye,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return rt.resolveReadonlyArrayThunk}});Object.defineProperty(ye,"specifiedDirectives",{enumerable:!0,get:function(){return oa.specifiedDirectives}});Object.defineProperty(ye,"specifiedScalarTypes",{enumerable:!0,get:function(){return gs.specifiedScalarTypes}});Object.defineProperty(ye,"validateSchema",{enumerable:!0,get:function(){return TL.validateSchema}});var Y_=Xu(),rt=wt(),oa=Qr(),gs=Pa(),Jr=Fi(),TL=tp(),EL=qd()});var IL=w(kt=>{"use strict";m();T();N();Object.defineProperty(kt,"__esModule",{value:!0});Object.defineProperty(kt,"BREAK",{enumerable:!0,get:function(){return mp.BREAK}});Object.defineProperty(kt,"DirectiveLocation",{enumerable:!0,get:function(){return F8.DirectiveLocation}});Object.defineProperty(kt,"Kind",{enumerable:!0,get:function(){return b8.Kind}});Object.defineProperty(kt,"Lexer",{enumerable:!0,get:function(){return R8.Lexer}});Object.defineProperty(kt,"Location",{enumerable:!0,get:function(){return J_.Location}});Object.defineProperty(kt,"OperationTypeNode",{enumerable:!0,get:function(){return J_.OperationTypeNode}});Object.defineProperty(kt,"Source",{enumerable:!0,get:function(){return O8.Source}});Object.defineProperty(kt,"Token",{enumerable:!0,get:function(){return J_.Token}});Object.defineProperty(kt,"TokenKind",{enumerable:!0,get:function(){return A8.TokenKind}});Object.defineProperty(kt,"getEnterLeaveForKind",{enumerable:!0,get:function(){return mp.getEnterLeaveForKind}});Object.defineProperty(kt,"getLocation",{enumerable:!0,get:function(){return D8.getLocation}});Object.defineProperty(kt,"getVisitFn",{enumerable:!0,get:function(){return mp.getVisitFn}});Object.defineProperty(kt,"isConstValueNode",{enumerable:!0,get:function(){return Ca.isConstValueNode}});Object.defineProperty(kt,"isDefinitionNode",{enumerable:!0,get:function(){return Ca.isDefinitionNode}});Object.defineProperty(kt,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Ca.isExecutableDefinitionNode}});Object.defineProperty(kt,"isSelectionNode",{enumerable:!0,get:function(){return Ca.isSelectionNode}});Object.defineProperty(kt,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Ca.isTypeDefinitionNode}});Object.defineProperty(kt,"isTypeExtensionNode",{enumerable:!0,get:function(){return Ca.isTypeExtensionNode}});Object.defineProperty(kt,"isTypeNode",{enumerable:!0,get:function(){return Ca.isTypeNode}});Object.defineProperty(kt,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Ca.isTypeSystemDefinitionNode}});Object.defineProperty(kt,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Ca.isTypeSystemExtensionNode}});Object.defineProperty(kt,"isValueNode",{enumerable:!0,get:function(){return Ca.isValueNode}});Object.defineProperty(kt,"parse",{enumerable:!0,get:function(){return vN.parse}});Object.defineProperty(kt,"parseConstValue",{enumerable:!0,get:function(){return vN.parseConstValue}});Object.defineProperty(kt,"parseType",{enumerable:!0,get:function(){return vN.parseType}});Object.defineProperty(kt,"parseValue",{enumerable:!0,get:function(){return vN.parseValue}});Object.defineProperty(kt,"print",{enumerable:!0,get:function(){return P8.print}});Object.defineProperty(kt,"printLocation",{enumerable:!0,get:function(){return yL.printLocation}});Object.defineProperty(kt,"printSourceLocation",{enumerable:!0,get:function(){return yL.printSourceLocation}});Object.defineProperty(kt,"visit",{enumerable:!0,get:function(){return mp.visit}});Object.defineProperty(kt,"visitInParallel",{enumerable:!0,get:function(){return mp.visitInParallel}});var O8=Am(),D8=ym(),yL=Gy(),b8=Ft(),A8=wd(),R8=Sm(),vN=rl(),P8=ci(),mp=Qu(),J_=ba(),Ca=ec(),F8=tl()});var gL=w(H_=>{"use strict";m();T();N();Object.defineProperty(H_,"__esModule",{value:!0});H_.isAsyncIterable=w8;function w8(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}});var _L=w(z_=>{"use strict";m();T();N();Object.defineProperty(z_,"__esModule",{value:!0});z_.mapAsyncIterator=L8;function L8(e,t){let n=e[Symbol.asyncIterator]();function r(a){return Di(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 Di(this,null,function*(){return r(yield n.next())})},return(){return Di(this,null,function*(){return typeof n.return=="function"?r(yield n.return()):{value:void 0,done:!0}})},throw(a){return Di(this,null,function*(){if(typeof n.throw=="function")return r(yield n.throw(a));throw a})},[Symbol.asyncIterator](){return this}}}});var DL=w(SN=>{"use strict";m();T();N();Object.defineProperty(SN,"__esModule",{value:!0});SN.createSourceEventStream=OL;SN.subscribe=q8;var C8=Br(),B8=Xt(),SL=gL(),vL=ip(),W_=ze(),U8=EN(),k8=fN(),Np=fp(),M8=_L(),x8=fl();function q8(t){return Di(this,arguments,function*(e){arguments.length<2||(0,C8.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let n=yield OL(e);if(!(0,SL.isAsyncIterable)(n))return n;let r=i=>(0,Np.execute)(Q(x({},e),{rootValue:i}));return(0,M8.mapAsyncIterator)(n,r)})}function V8(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 OL(...e){return Di(this,null,function*(){let t=V8(e),{schema:n,document:r,variableValues:i}=t;(0,Np.assertValidExecutionArguments)(n,r,i);let a=(0,Np.buildExecutionContext)(t);if(!("schema"in a))return{errors:a};try{let o=yield j8(a);if(!(0,SL.isAsyncIterable)(o))throw new Error(`Subscription field must return Async Iterable. Received: ${(0,B8.inspect)(o)}.`);return o}catch(o){if(o instanceof W_.GraphQLError)return{errors:[o]};throw o}})}function j8(e){return Di(this,null,function*(){let{schema:t,fragments:n,operation:r,variableValues:i,rootValue:a}=e,o=t.getSubscriptionType();if(o==null)throw new W_.GraphQLError("Schema is not configured to execute subscription operation.",{nodes:r});let c=(0,k8.collectFields)(t,n,i,o,r.selectionSet),[l,d]=[...c.entries()][0],f=(0,Np.getFieldDef)(t,o,d[0]);if(!f){let F=d[0].name.value;throw new W_.GraphQLError(`The subscription field "${F}" is not defined.`,{nodes:d})}let y=(0,vL.addPath)(void 0,l,o.name),I=(0,Np.buildResolveInfo)(e,f,d,o,y);try{var v;let F=(0,x8.getArgumentValues)(f,d[0],i),k=e.contextValue,J=yield((v=f.subscribe)!==null&&v!==void 0?v:e.subscribeFieldResolver)(a,F,k,I);if(J instanceof Error)throw J;return J}catch(F){throw(0,U8.locatedError)(F,d,(0,vL.pathToArray)(y))}})}});var AL=w(Bi=>{"use strict";m();T();N();Object.defineProperty(Bi,"__esModule",{value:!0});Object.defineProperty(Bi,"createSourceEventStream",{enumerable:!0,get:function(){return bL.createSourceEventStream}});Object.defineProperty(Bi,"defaultFieldResolver",{enumerable:!0,get:function(){return ON.defaultFieldResolver}});Object.defineProperty(Bi,"defaultTypeResolver",{enumerable:!0,get:function(){return ON.defaultTypeResolver}});Object.defineProperty(Bi,"execute",{enumerable:!0,get:function(){return ON.execute}});Object.defineProperty(Bi,"executeSync",{enumerable:!0,get:function(){return ON.executeSync}});Object.defineProperty(Bi,"getArgumentValues",{enumerable:!0,get:function(){return X_.getArgumentValues}});Object.defineProperty(Bi,"getDirectiveValues",{enumerable:!0,get:function(){return X_.getDirectiveValues}});Object.defineProperty(Bi,"getVariableValues",{enumerable:!0,get:function(){return X_.getVariableValues}});Object.defineProperty(Bi,"responsePathAsArray",{enumerable:!0,get:function(){return K8.pathToArray}});Object.defineProperty(Bi,"subscribe",{enumerable:!0,get:function(){return bL.subscribe}});var K8=ip(),ON=fp(),bL=DL(),X_=fl()});var RL=w(tv=>{"use strict";m();T();N();Object.defineProperty(tv,"__esModule",{value:!0});tv.NoDeprecatedCustomRule=G8;var Z_=Ir(),Tp=ze(),ev=wt();function G8(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,Z_.invariant)(!1),e.reportError(new Tp.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 Tp.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,Z_.invariant)(!1),e.reportError(new Tp.GraphQLError(`Field "${a.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){let n=(0,ev.getNamedType)(e.getParentInputType());if((0,ev.isInputObjectType)(n)){let r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new Tp.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,ev.getNamedType)(e.getInputType());i!=null||(0,Z_.invariant)(!1),e.reportError(new Tp.GraphQLError(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}});var PL=w(nv=>{"use strict";m();T();N();Object.defineProperty(nv,"__esModule",{value:!0});nv.NoSchemaIntrospectionCustomRule=J8;var $8=ze(),Q8=wt(),Y8=Fi();function J8(e){return{Field(t){let n=(0,Q8.getNamedType)(e.getType());n&&(0,Y8.isIntrospectionType)(n)&&e.reportError(new $8.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}});var wL=w(pt=>{"use strict";m();T();N();Object.defineProperty(pt,"__esModule",{value:!0});Object.defineProperty(pt,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return W8.ExecutableDefinitionsRule}});Object.defineProperty(pt,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return X8.FieldsOnCorrectTypeRule}});Object.defineProperty(pt,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return Z8.FragmentsOnCompositeTypesRule}});Object.defineProperty(pt,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return e5.KnownArgumentNamesRule}});Object.defineProperty(pt,"KnownDirectivesRule",{enumerable:!0,get:function(){return t5.KnownDirectivesRule}});Object.defineProperty(pt,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return n5.KnownFragmentNamesRule}});Object.defineProperty(pt,"KnownTypeNamesRule",{enumerable:!0,get:function(){return r5.KnownTypeNamesRule}});Object.defineProperty(pt,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return i5.LoneAnonymousOperationRule}});Object.defineProperty(pt,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return S5.LoneSchemaDefinitionRule}});Object.defineProperty(pt,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return v5.MaxIntrospectionDepthRule}});Object.defineProperty(pt,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return w5.NoDeprecatedCustomRule}});Object.defineProperty(pt,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return a5.NoFragmentCyclesRule}});Object.defineProperty(pt,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return L5.NoSchemaIntrospectionCustomRule}});Object.defineProperty(pt,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return s5.NoUndefinedVariablesRule}});Object.defineProperty(pt,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return o5.NoUnusedFragmentsRule}});Object.defineProperty(pt,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return u5.NoUnusedVariablesRule}});Object.defineProperty(pt,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return c5.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(pt,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return l5.PossibleFragmentSpreadsRule}});Object.defineProperty(pt,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return F5.PossibleTypeExtensionsRule}});Object.defineProperty(pt,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return d5.ProvidedRequiredArgumentsRule}});Object.defineProperty(pt,"ScalarLeafsRule",{enumerable:!0,get:function(){return p5.ScalarLeafsRule}});Object.defineProperty(pt,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return f5.SingleFieldSubscriptionsRule}});Object.defineProperty(pt,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return R5.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(pt,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return m5.UniqueArgumentNamesRule}});Object.defineProperty(pt,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return P5.UniqueDirectiveNamesRule}});Object.defineProperty(pt,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return N5.UniqueDirectivesPerLocationRule}});Object.defineProperty(pt,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return b5.UniqueEnumValueNamesRule}});Object.defineProperty(pt,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return A5.UniqueFieldDefinitionNamesRule}});Object.defineProperty(pt,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return T5.UniqueFragmentNamesRule}});Object.defineProperty(pt,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return E5.UniqueInputFieldNamesRule}});Object.defineProperty(pt,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return h5.UniqueOperationNamesRule}});Object.defineProperty(pt,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return O5.UniqueOperationTypesRule}});Object.defineProperty(pt,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return D5.UniqueTypeNamesRule}});Object.defineProperty(pt,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return y5.UniqueVariableNamesRule}});Object.defineProperty(pt,"ValidationContext",{enumerable:!0,get:function(){return z8.ValidationContext}});Object.defineProperty(pt,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return I5.ValuesOfCorrectTypeRule}});Object.defineProperty(pt,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return g5.VariablesAreInputTypesRule}});Object.defineProperty(pt,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return _5.VariablesInAllowedPositionRule}});Object.defineProperty(pt,"recommendedRules",{enumerable:!0,get:function(){return FL.recommendedRules}});Object.defineProperty(pt,"specifiedRules",{enumerable:!0,get:function(){return FL.specifiedRules}});Object.defineProperty(pt,"validate",{enumerable:!0,get:function(){return H8.validate}});var H8=Nl(),z8=C_(),FL=F_(),W8=JI(),X8=zI(),Z8=XI(),e5=ZI(),t5=rg(),n5=ag(),r5=ug(),i5=lg(),a5=Tg(),s5=hg(),o5=Ig(),u5=_g(),c5=wg(),l5=Bg(),d5=xg(),p5=Vg(),f5=zg(),m5=t_(),N5=s_(),T5=f_(),E5=N_(),h5=E_(),y5=v_(),I5=D_(),g5=A_(),_5=P_(),v5=mg(),S5=pg(),O5=y_(),D5=g_(),b5=u_(),A5=d_(),R5=Zg(),P5=r_(),F5=kg(),w5=RL(),L5=PL()});var LL=w(ac=>{"use strict";m();T();N();Object.defineProperty(ac,"__esModule",{value:!0});Object.defineProperty(ac,"GraphQLError",{enumerable:!0,get:function(){return rv.GraphQLError}});Object.defineProperty(ac,"formatError",{enumerable:!0,get:function(){return rv.formatError}});Object.defineProperty(ac,"locatedError",{enumerable:!0,get:function(){return B5.locatedError}});Object.defineProperty(ac,"printError",{enumerable:!0,get:function(){return rv.printError}});Object.defineProperty(ac,"syntaxError",{enumerable:!0,get:function(){return C5.syntaxError}});var rv=ze(),C5=gm(),B5=EN()});var av=w(iv=>{"use strict";m();T();N();Object.defineProperty(iv,"__esModule",{value:!0});iv.getIntrospectionQuery=U5;function U5(e){let t=x({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 Ww=w(U_=>{"use strict";m();T();N();Object.defineProperty(U_,"__esModule",{value:!0});U_.memoize3=H4;function H4(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 Xw=w(k_=>{"use strict";m();T();N();Object.defineProperty(k_,"__esModule",{value:!0});k_.promiseForObject=z4;function z4(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 Zw=w(M_=>{"use strict";m();T();N();Object.defineProperty(M_,"__esModule",{value:!0});M_.promiseReduce=X4;var W4=hm();function X4(e,t,n){let r=n;for(let i of e)r=(0,W4.isPromise)(r)?r.then(a=>t(a,i)):t(r,i);return r}});var eL=w(q_=>{"use strict";m();T();N();Object.defineProperty(q_,"__esModule",{value:!0});q_.toError=e8;var Z4=Xt();function e8(e){return e instanceof Error?e:new x_(e)}var x_=class extends Error{constructor(t){super("Unexpected error value: "+(0,Z4.inspect)(t)),this.name="NonErrorThrown",this.thrownValue=t}}});var EN=w(V_=>{"use strict";m();T();N();Object.defineProperty(V_,"__esModule",{value:!0});V_.locatedError=r8;var t8=eL(),n8=ze();function r8(e,t,n){var r;let i=(0,t8.toError)(e);return i8(i)?i:new n8.GraphQLError(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function i8(e){return Array.isArray(e.path)}});var fp=w(Ci=>{"use strict";m();T();N();Object.defineProperty(Ci,"__esModule",{value:!0});Ci.assertValidExecutionArguments=uL;Ci.buildExecutionContext=cL;Ci.buildResolveInfo=dL;Ci.defaultTypeResolver=Ci.defaultFieldResolver=void 0;Ci.execute=oL;Ci.executeSync=d8;Ci.getFieldDef=fL;var K_=Br(),rc=Xt(),a8=Ir(),s8=Xm(),Q_=Da(),sa=hm(),o8=Ww(),ic=ip(),tL=Xw(),u8=Zw(),Li=ze(),yN=EN(),j_=ba(),nL=Ft(),uu=wt(),El=Fi(),c8=tp(),aL=fN(),sL=ml(),l8=(0,o8.memoize3)((e,t,n)=>(0,aL.collectSubfields)(e.schema,e.fragments,e.variableValues,t,n));function oL(e){arguments.length<2||(0,K_.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;uL(t,n,r);let a=cL(e);if(!("schema"in a))return{errors:a};try{let{operation:o}=a,c=p8(a,o,i);return(0,sa.isPromise)(c)?c.then(l=>hN(l,a.errors),l=>(a.errors.push(l),hN(null,a.errors))):hN(c,a.errors)}catch(o){return a.errors.push(o),hN(null,a.errors)}}function d8(e){let t=oL(e);if((0,sa.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function hN(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function uL(e,t,n){t||(0,K_.devAssert)(!1,"Must provide document."),(0,c8.assertValidSchema)(e),n==null||(0,Q_.isObjectLike)(n)||(0,K_.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 cL(e){var t,n;let{schema:r,document:i,rootValue:a,contextValue:o,variableValues:c,operationName:l,fieldResolver:d,typeResolver:f,subscribeFieldResolver:y}=e,I,v=Object.create(null);for(let K of i.definitions)switch(K.kind){case nL.Kind.OPERATION_DEFINITION:if(l==null){if(I!==void 0)return[new Li.GraphQLError("Must provide operation name if query contains multiple operations.")];I=K}else((t=K.name)===null||t===void 0?void 0:t.value)===l&&(I=K);break;case nL.Kind.FRAGMENT_DEFINITION:v[K.name.value]=K;break;default:}if(!I)return l!=null?[new Li.GraphQLError(`Unknown operation named "${l}".`)]:[new Li.GraphQLError("Must provide an operation.")];let F=(n=I.variableDefinitions)!==null&&n!==void 0?n:[],k=(0,sL.getVariableValues)(r,F,c!=null?c:{},{maxErrors:50});return k.errors?k.errors:{schema:r,fragments:v,rootValue:a,contextValue:o,operation:I,variableValues:k.coerced,fieldResolver:d!=null?d:$_,typeResolver:f!=null?f:pL,subscribeFieldResolver:y!=null?y:$_,errors:[]}}function p8(e,t,n){let r=e.schema.getRootType(t.operation);if(r==null)throw new Li.GraphQLError(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});let i=(0,aL.collectFields)(e.schema,e.fragments,e.variableValues,r,t.selectionSet),a=void 0;switch(t.operation){case j_.OperationTypeNode.QUERY:return IN(e,r,n,a,i);case j_.OperationTypeNode.MUTATION:return f8(e,r,n,a,i);case j_.OperationTypeNode.SUBSCRIPTION:return IN(e,r,n,a,i)}}function f8(e,t,n,r,i){return(0,u8.promiseReduce)(i.entries(),(a,[o,c])=>{let l=(0,ic.addPath)(r,o,t.name),d=lL(e,t,n,c,l);return d===void 0?a:(0,sa.isPromise)(d)?d.then(f=>(a[o]=f,a)):(a[o]=d,a)},Object.create(null))}function IN(e,t,n,r,i){let a=Object.create(null),o=!1;try{for(let[c,l]of i.entries()){let d=(0,ic.addPath)(r,c,t.name),f=lL(e,t,n,l,d);f!==void 0&&(a[c]=f,(0,sa.isPromise)(f)&&(o=!0))}}catch(c){if(o)return(0,tL.promiseForObject)(a).finally(()=>{throw c});throw c}return o?(0,tL.promiseForObject)(a):a}function lL(e,t,n,r,i){var a;let o=fL(e.schema,t,r[0]);if(!o)return;let c=o.type,l=(a=o.resolve)!==null&&a!==void 0?a:e.fieldResolver,d=dL(e,o,r,t,i);try{let f=(0,sL.getArgumentValues)(o,r[0],e.variableValues),y=e.contextValue,I=l(n,f,y,d),v;return(0,sa.isPromise)(I)?v=I.then(F=>pp(e,c,r,d,i,F)):v=pp(e,c,r,d,i,I),(0,sa.isPromise)(v)?v.then(void 0,F=>{let k=(0,yN.locatedError)(F,r,(0,ic.pathToArray)(i));return gN(k,c,e)}):v}catch(f){let y=(0,yN.locatedError)(f,r,(0,ic.pathToArray)(i));return gN(y,c,e)}}function dL(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 gN(e,t,n){if((0,uu.isNonNullType)(t))throw e;return n.errors.push(e),null}function pp(e,t,n,r,i,a){if(a instanceof Error)throw a;if((0,uu.isNonNullType)(t)){let o=pp(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,uu.isListType)(t))return m8(e,t,n,r,i,a);if((0,uu.isLeafType)(t))return N8(t,a);if((0,uu.isAbstractType)(t))return T8(e,t,n,r,i,a);if((0,uu.isObjectType)(t))return G_(e,t,n,r,i,a);(0,a8.invariant)(!1,"Cannot complete value of unexpected output type: "+(0,rc.inspect)(t))}function m8(e,t,n,r,i,a){if(!(0,s8.isIterableObject)(a))throw new Li.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,f)=>{let y=(0,ic.addPath)(i,f,void 0);try{let I;return(0,sa.isPromise)(d)?I=d.then(v=>pp(e,o,n,r,y,v)):I=pp(e,o,n,r,y,d),(0,sa.isPromise)(I)?(c=!0,I.then(void 0,v=>{let F=(0,yN.locatedError)(v,n,(0,ic.pathToArray)(y));return gN(F,o,e)})):I}catch(I){let v=(0,yN.locatedError)(I,n,(0,ic.pathToArray)(y));return gN(v,o,e)}});return c?Promise.all(l):l}function N8(e,t){let n=e.serialize(t);if(n==null)throw new Error(`Expected \`${(0,rc.inspect)(e)}.serialize(${(0,rc.inspect)(t)})\` to return non-nullable value, returned: ${(0,rc.inspect)(n)}`);return n}function T8(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,sa.isPromise)(d)?d.then(f=>G_(e,rL(f,e,t,n,r,a),n,r,i,a)):G_(e,rL(d,e,t,n,r,a),n,r,i,a)}function rL(e,t,n,r,i,a){if(e==null)throw new Li.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,uu.isObjectType)(e))throw new Li.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 Li.GraphQLError(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${(0,rc.inspect)(a)}, received "${(0,rc.inspect)(e)}".`);let o=t.schema.getType(e);if(o==null)throw new Li.GraphQLError(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!(0,uu.isObjectType)(o))throw new Li.GraphQLError(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new Li.GraphQLError(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function G_(e,t,n,r,i,a){let o=l8(e,t,n);if(t.isTypeOf){let c=t.isTypeOf(a,e.contextValue,r);if((0,sa.isPromise)(c))return c.then(l=>{if(!l)throw iL(t,a,n);return IN(e,t,a,i,o)});if(!c)throw iL(t,a,n)}return IN(e,t,a,i,o)}function iL(e,t,n){return new Li.GraphQLError(`Expected value of type "${e.name}" but got: ${(0,rc.inspect)(t)}.`,{nodes:n})}var pL=function(e,t,n,r){if((0,Q_.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(_N,"__esModule",{value:!0});_N.graphql=v8;_N.graphqlSync=S8;var E8=Br(),h8=hm(),y8=il(),I8=tp(),g8=Tl(),_8=fp();function v8(e){return new Promise(t=>t(mL(e)))}function S8(e){let t=mL(e);if((0,h8.isPromise)(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function mL(e){arguments.length<2||(0,E8.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,I8.validateSchema)(t);if(d.length>0)return{errors:d};let f;try{f=(0,y8.parse)(n)}catch(I){return{errors:[I]}}let y=(0,g8.validate)(t,f);return y.length>0?{errors:y}:(0,_8.execute)({schema:t,document:f,rootValue:r,contextValue:i,variableValues:a,operationName:o,fieldResolver:c,typeResolver:l})}});var hL=w(ye=>{"use strict";m();T();N();Object.defineProperty(ye,"__esModule",{value:!0});Object.defineProperty(ye,"DEFAULT_DEPRECATION_REASON",{enumerable:!0,get:function(){return oa.DEFAULT_DEPRECATION_REASON}});Object.defineProperty(ye,"GRAPHQL_MAX_INT",{enumerable:!0,get:function(){return gs.GRAPHQL_MAX_INT}});Object.defineProperty(ye,"GRAPHQL_MIN_INT",{enumerable:!0,get:function(){return gs.GRAPHQL_MIN_INT}});Object.defineProperty(ye,"GraphQLBoolean",{enumerable:!0,get:function(){return gs.GraphQLBoolean}});Object.defineProperty(ye,"GraphQLDeprecatedDirective",{enumerable:!0,get:function(){return oa.GraphQLDeprecatedDirective}});Object.defineProperty(ye,"GraphQLDirective",{enumerable:!0,get:function(){return oa.GraphQLDirective}});Object.defineProperty(ye,"GraphQLEnumType",{enumerable:!0,get:function(){return rt.GraphQLEnumType}});Object.defineProperty(ye,"GraphQLFloat",{enumerable:!0,get:function(){return gs.GraphQLFloat}});Object.defineProperty(ye,"GraphQLID",{enumerable:!0,get:function(){return gs.GraphQLID}});Object.defineProperty(ye,"GraphQLIncludeDirective",{enumerable:!0,get:function(){return oa.GraphQLIncludeDirective}});Object.defineProperty(ye,"GraphQLInputObjectType",{enumerable:!0,get:function(){return rt.GraphQLInputObjectType}});Object.defineProperty(ye,"GraphQLInt",{enumerable:!0,get:function(){return gs.GraphQLInt}});Object.defineProperty(ye,"GraphQLInterfaceType",{enumerable:!0,get:function(){return rt.GraphQLInterfaceType}});Object.defineProperty(ye,"GraphQLList",{enumerable:!0,get:function(){return rt.GraphQLList}});Object.defineProperty(ye,"GraphQLNonNull",{enumerable:!0,get:function(){return rt.GraphQLNonNull}});Object.defineProperty(ye,"GraphQLObjectType",{enumerable:!0,get:function(){return rt.GraphQLObjectType}});Object.defineProperty(ye,"GraphQLOneOfDirective",{enumerable:!0,get:function(){return oa.GraphQLOneOfDirective}});Object.defineProperty(ye,"GraphQLScalarType",{enumerable:!0,get:function(){return rt.GraphQLScalarType}});Object.defineProperty(ye,"GraphQLSchema",{enumerable:!0,get:function(){return Y_.GraphQLSchema}});Object.defineProperty(ye,"GraphQLSkipDirective",{enumerable:!0,get:function(){return oa.GraphQLSkipDirective}});Object.defineProperty(ye,"GraphQLSpecifiedByDirective",{enumerable:!0,get:function(){return oa.GraphQLSpecifiedByDirective}});Object.defineProperty(ye,"GraphQLString",{enumerable:!0,get:function(){return gs.GraphQLString}});Object.defineProperty(ye,"GraphQLUnionType",{enumerable:!0,get:function(){return rt.GraphQLUnionType}});Object.defineProperty(ye,"SchemaMetaFieldDef",{enumerable:!0,get:function(){return Jr.SchemaMetaFieldDef}});Object.defineProperty(ye,"TypeKind",{enumerable:!0,get:function(){return Jr.TypeKind}});Object.defineProperty(ye,"TypeMetaFieldDef",{enumerable:!0,get:function(){return Jr.TypeMetaFieldDef}});Object.defineProperty(ye,"TypeNameMetaFieldDef",{enumerable:!0,get:function(){return Jr.TypeNameMetaFieldDef}});Object.defineProperty(ye,"__Directive",{enumerable:!0,get:function(){return Jr.__Directive}});Object.defineProperty(ye,"__DirectiveLocation",{enumerable:!0,get:function(){return Jr.__DirectiveLocation}});Object.defineProperty(ye,"__EnumValue",{enumerable:!0,get:function(){return Jr.__EnumValue}});Object.defineProperty(ye,"__Field",{enumerable:!0,get:function(){return Jr.__Field}});Object.defineProperty(ye,"__InputValue",{enumerable:!0,get:function(){return Jr.__InputValue}});Object.defineProperty(ye,"__Schema",{enumerable:!0,get:function(){return Jr.__Schema}});Object.defineProperty(ye,"__Type",{enumerable:!0,get:function(){return Jr.__Type}});Object.defineProperty(ye,"__TypeKind",{enumerable:!0,get:function(){return Jr.__TypeKind}});Object.defineProperty(ye,"assertAbstractType",{enumerable:!0,get:function(){return rt.assertAbstractType}});Object.defineProperty(ye,"assertCompositeType",{enumerable:!0,get:function(){return rt.assertCompositeType}});Object.defineProperty(ye,"assertDirective",{enumerable:!0,get:function(){return oa.assertDirective}});Object.defineProperty(ye,"assertEnumType",{enumerable:!0,get:function(){return rt.assertEnumType}});Object.defineProperty(ye,"assertEnumValueName",{enumerable:!0,get:function(){return EL.assertEnumValueName}});Object.defineProperty(ye,"assertInputObjectType",{enumerable:!0,get:function(){return rt.assertInputObjectType}});Object.defineProperty(ye,"assertInputType",{enumerable:!0,get:function(){return rt.assertInputType}});Object.defineProperty(ye,"assertInterfaceType",{enumerable:!0,get:function(){return rt.assertInterfaceType}});Object.defineProperty(ye,"assertLeafType",{enumerable:!0,get:function(){return rt.assertLeafType}});Object.defineProperty(ye,"assertListType",{enumerable:!0,get:function(){return rt.assertListType}});Object.defineProperty(ye,"assertName",{enumerable:!0,get:function(){return EL.assertName}});Object.defineProperty(ye,"assertNamedType",{enumerable:!0,get:function(){return rt.assertNamedType}});Object.defineProperty(ye,"assertNonNullType",{enumerable:!0,get:function(){return rt.assertNonNullType}});Object.defineProperty(ye,"assertNullableType",{enumerable:!0,get:function(){return rt.assertNullableType}});Object.defineProperty(ye,"assertObjectType",{enumerable:!0,get:function(){return rt.assertObjectType}});Object.defineProperty(ye,"assertOutputType",{enumerable:!0,get:function(){return rt.assertOutputType}});Object.defineProperty(ye,"assertScalarType",{enumerable:!0,get:function(){return rt.assertScalarType}});Object.defineProperty(ye,"assertSchema",{enumerable:!0,get:function(){return Y_.assertSchema}});Object.defineProperty(ye,"assertType",{enumerable:!0,get:function(){return rt.assertType}});Object.defineProperty(ye,"assertUnionType",{enumerable:!0,get:function(){return rt.assertUnionType}});Object.defineProperty(ye,"assertValidSchema",{enumerable:!0,get:function(){return TL.assertValidSchema}});Object.defineProperty(ye,"assertWrappingType",{enumerable:!0,get:function(){return rt.assertWrappingType}});Object.defineProperty(ye,"getNamedType",{enumerable:!0,get:function(){return rt.getNamedType}});Object.defineProperty(ye,"getNullableType",{enumerable:!0,get:function(){return rt.getNullableType}});Object.defineProperty(ye,"introspectionTypes",{enumerable:!0,get:function(){return Jr.introspectionTypes}});Object.defineProperty(ye,"isAbstractType",{enumerable:!0,get:function(){return rt.isAbstractType}});Object.defineProperty(ye,"isCompositeType",{enumerable:!0,get:function(){return rt.isCompositeType}});Object.defineProperty(ye,"isDirective",{enumerable:!0,get:function(){return oa.isDirective}});Object.defineProperty(ye,"isEnumType",{enumerable:!0,get:function(){return rt.isEnumType}});Object.defineProperty(ye,"isInputObjectType",{enumerable:!0,get:function(){return rt.isInputObjectType}});Object.defineProperty(ye,"isInputType",{enumerable:!0,get:function(){return rt.isInputType}});Object.defineProperty(ye,"isInterfaceType",{enumerable:!0,get:function(){return rt.isInterfaceType}});Object.defineProperty(ye,"isIntrospectionType",{enumerable:!0,get:function(){return Jr.isIntrospectionType}});Object.defineProperty(ye,"isLeafType",{enumerable:!0,get:function(){return rt.isLeafType}});Object.defineProperty(ye,"isListType",{enumerable:!0,get:function(){return rt.isListType}});Object.defineProperty(ye,"isNamedType",{enumerable:!0,get:function(){return rt.isNamedType}});Object.defineProperty(ye,"isNonNullType",{enumerable:!0,get:function(){return rt.isNonNullType}});Object.defineProperty(ye,"isNullableType",{enumerable:!0,get:function(){return rt.isNullableType}});Object.defineProperty(ye,"isObjectType",{enumerable:!0,get:function(){return rt.isObjectType}});Object.defineProperty(ye,"isOutputType",{enumerable:!0,get:function(){return rt.isOutputType}});Object.defineProperty(ye,"isRequiredArgument",{enumerable:!0,get:function(){return rt.isRequiredArgument}});Object.defineProperty(ye,"isRequiredInputField",{enumerable:!0,get:function(){return rt.isRequiredInputField}});Object.defineProperty(ye,"isScalarType",{enumerable:!0,get:function(){return rt.isScalarType}});Object.defineProperty(ye,"isSchema",{enumerable:!0,get:function(){return Y_.isSchema}});Object.defineProperty(ye,"isSpecifiedDirective",{enumerable:!0,get:function(){return oa.isSpecifiedDirective}});Object.defineProperty(ye,"isSpecifiedScalarType",{enumerable:!0,get:function(){return gs.isSpecifiedScalarType}});Object.defineProperty(ye,"isType",{enumerable:!0,get:function(){return rt.isType}});Object.defineProperty(ye,"isUnionType",{enumerable:!0,get:function(){return rt.isUnionType}});Object.defineProperty(ye,"isWrappingType",{enumerable:!0,get:function(){return rt.isWrappingType}});Object.defineProperty(ye,"resolveObjMapThunk",{enumerable:!0,get:function(){return rt.resolveObjMapThunk}});Object.defineProperty(ye,"resolveReadonlyArrayThunk",{enumerable:!0,get:function(){return rt.resolveReadonlyArrayThunk}});Object.defineProperty(ye,"specifiedDirectives",{enumerable:!0,get:function(){return oa.specifiedDirectives}});Object.defineProperty(ye,"specifiedScalarTypes",{enumerable:!0,get:function(){return gs.specifiedScalarTypes}});Object.defineProperty(ye,"validateSchema",{enumerable:!0,get:function(){return TL.validateSchema}});var Y_=Xu(),rt=wt(),oa=Qr(),gs=Pa(),Jr=Fi(),TL=tp(),EL=qd()});var IL=w(kt=>{"use strict";m();T();N();Object.defineProperty(kt,"__esModule",{value:!0});Object.defineProperty(kt,"BREAK",{enumerable:!0,get:function(){return mp.BREAK}});Object.defineProperty(kt,"DirectiveLocation",{enumerable:!0,get:function(){return F8.DirectiveLocation}});Object.defineProperty(kt,"Kind",{enumerable:!0,get:function(){return b8.Kind}});Object.defineProperty(kt,"Lexer",{enumerable:!0,get:function(){return R8.Lexer}});Object.defineProperty(kt,"Location",{enumerable:!0,get:function(){return J_.Location}});Object.defineProperty(kt,"OperationTypeNode",{enumerable:!0,get:function(){return J_.OperationTypeNode}});Object.defineProperty(kt,"Source",{enumerable:!0,get:function(){return O8.Source}});Object.defineProperty(kt,"Token",{enumerable:!0,get:function(){return J_.Token}});Object.defineProperty(kt,"TokenKind",{enumerable:!0,get:function(){return A8.TokenKind}});Object.defineProperty(kt,"getEnterLeaveForKind",{enumerable:!0,get:function(){return mp.getEnterLeaveForKind}});Object.defineProperty(kt,"getLocation",{enumerable:!0,get:function(){return D8.getLocation}});Object.defineProperty(kt,"getVisitFn",{enumerable:!0,get:function(){return mp.getVisitFn}});Object.defineProperty(kt,"isConstValueNode",{enumerable:!0,get:function(){return Ca.isConstValueNode}});Object.defineProperty(kt,"isDefinitionNode",{enumerable:!0,get:function(){return Ca.isDefinitionNode}});Object.defineProperty(kt,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return Ca.isExecutableDefinitionNode}});Object.defineProperty(kt,"isSelectionNode",{enumerable:!0,get:function(){return Ca.isSelectionNode}});Object.defineProperty(kt,"isTypeDefinitionNode",{enumerable:!0,get:function(){return Ca.isTypeDefinitionNode}});Object.defineProperty(kt,"isTypeExtensionNode",{enumerable:!0,get:function(){return Ca.isTypeExtensionNode}});Object.defineProperty(kt,"isTypeNode",{enumerable:!0,get:function(){return Ca.isTypeNode}});Object.defineProperty(kt,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return Ca.isTypeSystemDefinitionNode}});Object.defineProperty(kt,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return Ca.isTypeSystemExtensionNode}});Object.defineProperty(kt,"isValueNode",{enumerable:!0,get:function(){return Ca.isValueNode}});Object.defineProperty(kt,"parse",{enumerable:!0,get:function(){return vN.parse}});Object.defineProperty(kt,"parseConstValue",{enumerable:!0,get:function(){return vN.parseConstValue}});Object.defineProperty(kt,"parseType",{enumerable:!0,get:function(){return vN.parseType}});Object.defineProperty(kt,"parseValue",{enumerable:!0,get:function(){return vN.parseValue}});Object.defineProperty(kt,"print",{enumerable:!0,get:function(){return P8.print}});Object.defineProperty(kt,"printLocation",{enumerable:!0,get:function(){return yL.printLocation}});Object.defineProperty(kt,"printSourceLocation",{enumerable:!0,get:function(){return yL.printSourceLocation}});Object.defineProperty(kt,"visit",{enumerable:!0,get:function(){return mp.visit}});Object.defineProperty(kt,"visitInParallel",{enumerable:!0,get:function(){return mp.visitInParallel}});var O8=Am(),D8=ym(),yL=Gy(),b8=Ft(),A8=wd(),R8=Sm(),vN=il(),P8=ci(),mp=Qu(),J_=ba(),Ca=ec(),F8=nl()});var gL=w(H_=>{"use strict";m();T();N();Object.defineProperty(H_,"__esModule",{value:!0});H_.isAsyncIterable=w8;function w8(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}});var _L=w(z_=>{"use strict";m();T();N();Object.defineProperty(z_,"__esModule",{value:!0});z_.mapAsyncIterator=L8;function L8(e,t){let n=e[Symbol.asyncIterator]();function r(a){return Di(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 Di(this,null,function*(){return r(yield n.next())})},return(){return Di(this,null,function*(){return typeof n.return=="function"?r(yield n.return()):{value:void 0,done:!0}})},throw(a){return Di(this,null,function*(){if(typeof n.throw=="function")return r(yield n.throw(a));throw a})},[Symbol.asyncIterator](){return this}}}});var DL=w(SN=>{"use strict";m();T();N();Object.defineProperty(SN,"__esModule",{value:!0});SN.createSourceEventStream=OL;SN.subscribe=q8;var C8=Br(),B8=Xt(),SL=gL(),vL=ip(),W_=ze(),U8=EN(),k8=fN(),Np=fp(),M8=_L(),x8=ml();function q8(t){return Di(this,arguments,function*(e){arguments.length<2||(0,C8.devAssert)(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");let n=yield OL(e);if(!(0,SL.isAsyncIterable)(n))return n;let r=i=>(0,Np.execute)(Q(x({},e),{rootValue:i}));return(0,M8.mapAsyncIterator)(n,r)})}function V8(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 OL(...e){return Di(this,null,function*(){let t=V8(e),{schema:n,document:r,variableValues:i}=t;(0,Np.assertValidExecutionArguments)(n,r,i);let a=(0,Np.buildExecutionContext)(t);if(!("schema"in a))return{errors:a};try{let o=yield j8(a);if(!(0,SL.isAsyncIterable)(o))throw new Error(`Subscription field must return Async Iterable. Received: ${(0,B8.inspect)(o)}.`);return o}catch(o){if(o instanceof W_.GraphQLError)return{errors:[o]};throw o}})}function j8(e){return Di(this,null,function*(){let{schema:t,fragments:n,operation:r,variableValues:i,rootValue:a}=e,o=t.getSubscriptionType();if(o==null)throw new W_.GraphQLError("Schema is not configured to execute subscription operation.",{nodes:r});let c=(0,k8.collectFields)(t,n,i,o,r.selectionSet),[l,d]=[...c.entries()][0],f=(0,Np.getFieldDef)(t,o,d[0]);if(!f){let F=d[0].name.value;throw new W_.GraphQLError(`The subscription field "${F}" is not defined.`,{nodes:d})}let y=(0,vL.addPath)(void 0,l,o.name),I=(0,Np.buildResolveInfo)(e,f,d,o,y);try{var v;let F=(0,x8.getArgumentValues)(f,d[0],i),k=e.contextValue,J=yield((v=f.subscribe)!==null&&v!==void 0?v:e.subscribeFieldResolver)(a,F,k,I);if(J instanceof Error)throw J;return J}catch(F){throw(0,U8.locatedError)(F,d,(0,vL.pathToArray)(y))}})}});var AL=w(Bi=>{"use strict";m();T();N();Object.defineProperty(Bi,"__esModule",{value:!0});Object.defineProperty(Bi,"createSourceEventStream",{enumerable:!0,get:function(){return bL.createSourceEventStream}});Object.defineProperty(Bi,"defaultFieldResolver",{enumerable:!0,get:function(){return ON.defaultFieldResolver}});Object.defineProperty(Bi,"defaultTypeResolver",{enumerable:!0,get:function(){return ON.defaultTypeResolver}});Object.defineProperty(Bi,"execute",{enumerable:!0,get:function(){return ON.execute}});Object.defineProperty(Bi,"executeSync",{enumerable:!0,get:function(){return ON.executeSync}});Object.defineProperty(Bi,"getArgumentValues",{enumerable:!0,get:function(){return X_.getArgumentValues}});Object.defineProperty(Bi,"getDirectiveValues",{enumerable:!0,get:function(){return X_.getDirectiveValues}});Object.defineProperty(Bi,"getVariableValues",{enumerable:!0,get:function(){return X_.getVariableValues}});Object.defineProperty(Bi,"responsePathAsArray",{enumerable:!0,get:function(){return K8.pathToArray}});Object.defineProperty(Bi,"subscribe",{enumerable:!0,get:function(){return bL.subscribe}});var K8=ip(),ON=fp(),bL=DL(),X_=ml()});var RL=w(tv=>{"use strict";m();T();N();Object.defineProperty(tv,"__esModule",{value:!0});tv.NoDeprecatedCustomRule=G8;var Z_=Ir(),Tp=ze(),ev=wt();function G8(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,Z_.invariant)(!1),e.reportError(new Tp.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 Tp.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,Z_.invariant)(!1),e.reportError(new Tp.GraphQLError(`Field "${a.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){let n=(0,ev.getNamedType)(e.getParentInputType());if((0,ev.isInputObjectType)(n)){let r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new Tp.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,ev.getNamedType)(e.getInputType());i!=null||(0,Z_.invariant)(!1),e.reportError(new Tp.GraphQLError(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}});var PL=w(nv=>{"use strict";m();T();N();Object.defineProperty(nv,"__esModule",{value:!0});nv.NoSchemaIntrospectionCustomRule=J8;var $8=ze(),Q8=wt(),Y8=Fi();function J8(e){return{Field(t){let n=(0,Q8.getNamedType)(e.getType());n&&(0,Y8.isIntrospectionType)(n)&&e.reportError(new $8.GraphQLError(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}});var wL=w(pt=>{"use strict";m();T();N();Object.defineProperty(pt,"__esModule",{value:!0});Object.defineProperty(pt,"ExecutableDefinitionsRule",{enumerable:!0,get:function(){return W8.ExecutableDefinitionsRule}});Object.defineProperty(pt,"FieldsOnCorrectTypeRule",{enumerable:!0,get:function(){return X8.FieldsOnCorrectTypeRule}});Object.defineProperty(pt,"FragmentsOnCompositeTypesRule",{enumerable:!0,get:function(){return Z8.FragmentsOnCompositeTypesRule}});Object.defineProperty(pt,"KnownArgumentNamesRule",{enumerable:!0,get:function(){return e5.KnownArgumentNamesRule}});Object.defineProperty(pt,"KnownDirectivesRule",{enumerable:!0,get:function(){return t5.KnownDirectivesRule}});Object.defineProperty(pt,"KnownFragmentNamesRule",{enumerable:!0,get:function(){return n5.KnownFragmentNamesRule}});Object.defineProperty(pt,"KnownTypeNamesRule",{enumerable:!0,get:function(){return r5.KnownTypeNamesRule}});Object.defineProperty(pt,"LoneAnonymousOperationRule",{enumerable:!0,get:function(){return i5.LoneAnonymousOperationRule}});Object.defineProperty(pt,"LoneSchemaDefinitionRule",{enumerable:!0,get:function(){return S5.LoneSchemaDefinitionRule}});Object.defineProperty(pt,"MaxIntrospectionDepthRule",{enumerable:!0,get:function(){return v5.MaxIntrospectionDepthRule}});Object.defineProperty(pt,"NoDeprecatedCustomRule",{enumerable:!0,get:function(){return w5.NoDeprecatedCustomRule}});Object.defineProperty(pt,"NoFragmentCyclesRule",{enumerable:!0,get:function(){return a5.NoFragmentCyclesRule}});Object.defineProperty(pt,"NoSchemaIntrospectionCustomRule",{enumerable:!0,get:function(){return L5.NoSchemaIntrospectionCustomRule}});Object.defineProperty(pt,"NoUndefinedVariablesRule",{enumerable:!0,get:function(){return s5.NoUndefinedVariablesRule}});Object.defineProperty(pt,"NoUnusedFragmentsRule",{enumerable:!0,get:function(){return o5.NoUnusedFragmentsRule}});Object.defineProperty(pt,"NoUnusedVariablesRule",{enumerable:!0,get:function(){return u5.NoUnusedVariablesRule}});Object.defineProperty(pt,"OverlappingFieldsCanBeMergedRule",{enumerable:!0,get:function(){return c5.OverlappingFieldsCanBeMergedRule}});Object.defineProperty(pt,"PossibleFragmentSpreadsRule",{enumerable:!0,get:function(){return l5.PossibleFragmentSpreadsRule}});Object.defineProperty(pt,"PossibleTypeExtensionsRule",{enumerable:!0,get:function(){return F5.PossibleTypeExtensionsRule}});Object.defineProperty(pt,"ProvidedRequiredArgumentsRule",{enumerable:!0,get:function(){return d5.ProvidedRequiredArgumentsRule}});Object.defineProperty(pt,"ScalarLeafsRule",{enumerable:!0,get:function(){return p5.ScalarLeafsRule}});Object.defineProperty(pt,"SingleFieldSubscriptionsRule",{enumerable:!0,get:function(){return f5.SingleFieldSubscriptionsRule}});Object.defineProperty(pt,"UniqueArgumentDefinitionNamesRule",{enumerable:!0,get:function(){return R5.UniqueArgumentDefinitionNamesRule}});Object.defineProperty(pt,"UniqueArgumentNamesRule",{enumerable:!0,get:function(){return m5.UniqueArgumentNamesRule}});Object.defineProperty(pt,"UniqueDirectiveNamesRule",{enumerable:!0,get:function(){return P5.UniqueDirectiveNamesRule}});Object.defineProperty(pt,"UniqueDirectivesPerLocationRule",{enumerable:!0,get:function(){return N5.UniqueDirectivesPerLocationRule}});Object.defineProperty(pt,"UniqueEnumValueNamesRule",{enumerable:!0,get:function(){return b5.UniqueEnumValueNamesRule}});Object.defineProperty(pt,"UniqueFieldDefinitionNamesRule",{enumerable:!0,get:function(){return A5.UniqueFieldDefinitionNamesRule}});Object.defineProperty(pt,"UniqueFragmentNamesRule",{enumerable:!0,get:function(){return T5.UniqueFragmentNamesRule}});Object.defineProperty(pt,"UniqueInputFieldNamesRule",{enumerable:!0,get:function(){return E5.UniqueInputFieldNamesRule}});Object.defineProperty(pt,"UniqueOperationNamesRule",{enumerable:!0,get:function(){return h5.UniqueOperationNamesRule}});Object.defineProperty(pt,"UniqueOperationTypesRule",{enumerable:!0,get:function(){return O5.UniqueOperationTypesRule}});Object.defineProperty(pt,"UniqueTypeNamesRule",{enumerable:!0,get:function(){return D5.UniqueTypeNamesRule}});Object.defineProperty(pt,"UniqueVariableNamesRule",{enumerable:!0,get:function(){return y5.UniqueVariableNamesRule}});Object.defineProperty(pt,"ValidationContext",{enumerable:!0,get:function(){return z8.ValidationContext}});Object.defineProperty(pt,"ValuesOfCorrectTypeRule",{enumerable:!0,get:function(){return I5.ValuesOfCorrectTypeRule}});Object.defineProperty(pt,"VariablesAreInputTypesRule",{enumerable:!0,get:function(){return g5.VariablesAreInputTypesRule}});Object.defineProperty(pt,"VariablesInAllowedPositionRule",{enumerable:!0,get:function(){return _5.VariablesInAllowedPositionRule}});Object.defineProperty(pt,"recommendedRules",{enumerable:!0,get:function(){return FL.recommendedRules}});Object.defineProperty(pt,"specifiedRules",{enumerable:!0,get:function(){return FL.specifiedRules}});Object.defineProperty(pt,"validate",{enumerable:!0,get:function(){return H8.validate}});var H8=Tl(),z8=C_(),FL=F_(),W8=JI(),X8=zI(),Z8=XI(),e5=ZI(),t5=rg(),n5=ag(),r5=ug(),i5=lg(),a5=Tg(),s5=hg(),o5=Ig(),u5=_g(),c5=wg(),l5=Bg(),d5=xg(),p5=Vg(),f5=zg(),m5=t_(),N5=s_(),T5=f_(),E5=N_(),h5=E_(),y5=v_(),I5=D_(),g5=A_(),_5=P_(),v5=mg(),S5=pg(),O5=y_(),D5=g_(),b5=u_(),A5=d_(),R5=Zg(),P5=r_(),F5=kg(),w5=RL(),L5=PL()});var LL=w(ac=>{"use strict";m();T();N();Object.defineProperty(ac,"__esModule",{value:!0});Object.defineProperty(ac,"GraphQLError",{enumerable:!0,get:function(){return rv.GraphQLError}});Object.defineProperty(ac,"formatError",{enumerable:!0,get:function(){return rv.formatError}});Object.defineProperty(ac,"locatedError",{enumerable:!0,get:function(){return B5.locatedError}});Object.defineProperty(ac,"printError",{enumerable:!0,get:function(){return rv.printError}});Object.defineProperty(ac,"syntaxError",{enumerable:!0,get:function(){return C5.syntaxError}});var rv=ze(),C5=gm(),B5=EN()});var av=w(iv=>{"use strict";m();T();N();Object.defineProperty(iv,"__esModule",{value:!0});iv.getIntrospectionQuery=U5;function U5(e){let t=x({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,12 +177,12 @@ In some cases, you need to provide options to alter GraphQL's execution behavior } } } - `}});var CL=w(sv=>{"use strict";m();T();N();Object.defineProperty(sv,"__esModule",{value:!0});sv.getOperationAST=M5;var k5=Ft();function M5(e,t){let n=null;for(let i of e.definitions)if(i.kind===k5.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 BL=w(ov=>{"use strict";m();T();N();Object.defineProperty(ov,"__esModule",{value:!0});ov.getOperationRootType=x5;var DN=ze();function x5(e,t){if(t.operation==="query"){let n=e.getQueryType();if(!n)throw new DN.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 DN.GraphQLError("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){let n=e.getSubscriptionType();if(!n)throw new DN.GraphQLError("Schema is not configured for subscriptions.",{nodes:t});return n}throw new DN.GraphQLError("Can only have query, mutation and subscription operations.",{nodes:t})}});var UL=w(uv=>{"use strict";m();T();N();Object.defineProperty(uv,"__esModule",{value:!0});uv.introspectionFromSchema=G5;var q5=Ir(),V5=rl(),j5=fp(),K5=av();function G5(e,t){let n=x({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0},t),r=(0,V5.parse)((0,K5.getIntrospectionQuery)(n)),i=(0,j5.executeSync)({schema:e,document:r});return!i.errors&&i.data||(0,q5.invariant)(!1),i.data}});var ML=w(cv=>{"use strict";m();T();N();Object.defineProperty(cv,"__esModule",{value:!0});cv.buildClientSchema=W5;var $5=Br(),li=Xt(),kL=Da(),bN=Md(),Q5=rl(),di=wt(),Y5=Qr(),Ba=Fi(),J5=Pa(),H5=Xu(),z5=up();function W5(e,t){(0,kL.isObjectLike)(e)&&(0,kL.isObjectLike)(e.__schema)||(0,$5.devAssert)(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0,li.inspect)(e)}.`);let n=e.__schema,r=(0,bN.keyValMap)(n.types,ee=>ee.name,ee=>I(ee));for(let ee of[...J5.specifiedScalarTypes,...Ba.introspectionTypes])r[ee.name]&&(r[ee.name]=ee);let i=n.queryType?f(n.queryType):null,a=n.mutationType?f(n.mutationType):null,o=n.subscriptionType?f(n.subscriptionType):null,c=n.directives?n.directives.map(tt):[];return new H5.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(ee){if(ee.kind===Ba.TypeKind.LIST){let Se=ee.ofType;if(!Se)throw new Error("Decorated type deeper than introspection query.");return new di.GraphQLList(l(Se))}if(ee.kind===Ba.TypeKind.NON_NULL){let Se=ee.ofType;if(!Se)throw new Error("Decorated type deeper than introspection query.");let _t=l(Se);return new di.GraphQLNonNull((0,di.assertNullableType)(_t))}return d(ee)}function d(ee){let Se=ee.name;if(!Se)throw new Error(`Unknown type reference: ${(0,li.inspect)(ee)}.`);let _t=r[Se];if(!_t)throw new Error(`Invalid or incomplete schema, unknown type: ${Se}. Ensure that a full introspection query is used in order to build a client schema.`);return _t}function f(ee){return(0,di.assertObjectType)(d(ee))}function y(ee){return(0,di.assertInterfaceType)(d(ee))}function I(ee){if(ee!=null&&ee.name!=null&&ee.kind!=null)switch(ee.kind){case Ba.TypeKind.SCALAR:return v(ee);case Ba.TypeKind.OBJECT:return k(ee);case Ba.TypeKind.INTERFACE:return K(ee);case Ba.TypeKind.UNION:return J(ee);case Ba.TypeKind.ENUM:return se(ee);case Ba.TypeKind.INPUT_OBJECT:return ie(ee)}let Se=(0,li.inspect)(ee);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${Se}.`)}function v(ee){return new di.GraphQLScalarType({name:ee.name,description:ee.description,specifiedByURL:ee.specifiedByURL})}function F(ee){if(ee.interfaces===null&&ee.kind===Ba.TypeKind.INTERFACE)return[];if(!ee.interfaces){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing interfaces: ${Se}.`)}return ee.interfaces.map(y)}function k(ee){return new di.GraphQLObjectType({name:ee.name,description:ee.description,interfaces:()=>F(ee),fields:()=>Te(ee)})}function K(ee){return new di.GraphQLInterfaceType({name:ee.name,description:ee.description,interfaces:()=>F(ee),fields:()=>Te(ee)})}function J(ee){if(!ee.possibleTypes){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing possibleTypes: ${Se}.`)}return new di.GraphQLUnionType({name:ee.name,description:ee.description,types:()=>ee.possibleTypes.map(f)})}function se(ee){if(!ee.enumValues){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing enumValues: ${Se}.`)}return new di.GraphQLEnumType({name:ee.name,description:ee.description,values:(0,bN.keyValMap)(ee.enumValues,Se=>Se.name,Se=>({description:Se.description,deprecationReason:Se.deprecationReason}))})}function ie(ee){if(!ee.inputFields){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing inputFields: ${Se}.`)}return new di.GraphQLInputObjectType({name:ee.name,description:ee.description,fields:()=>Re(ee.inputFields),isOneOf:ee.isOneOf})}function Te(ee){if(!ee.fields)throw new Error(`Introspection result missing fields: ${(0,li.inspect)(ee)}.`);return(0,bN.keyValMap)(ee.fields,Se=>Se.name,de)}function de(ee){let Se=l(ee.type);if(!(0,di.isOutputType)(Se)){let _t=(0,li.inspect)(Se);throw new Error(`Introspection must provide output type for fields, but received: ${_t}.`)}if(!ee.args){let _t=(0,li.inspect)(ee);throw new Error(`Introspection result missing field args: ${_t}.`)}return{description:ee.description,deprecationReason:ee.deprecationReason,type:Se,args:Re(ee.args)}}function Re(ee){return(0,bN.keyValMap)(ee,Se=>Se.name,xe)}function xe(ee){let Se=l(ee.type);if(!(0,di.isInputType)(Se)){let en=(0,li.inspect)(Se);throw new Error(`Introspection must provide input type for arguments, but received: ${en}.`)}let _t=ee.defaultValue!=null?(0,z5.valueFromAST)((0,Q5.parseValue)(ee.defaultValue),Se):void 0;return{description:ee.description,type:Se,defaultValue:_t,deprecationReason:ee.deprecationReason}}function tt(ee){if(!ee.args){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing directive args: ${Se}.`)}if(!ee.locations){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing directive locations: ${Se}.`)}return new Y5.GraphQLDirective({name:ee.name,description:ee.description,isRepeatable:ee.isRepeatable,locations:ee.locations.slice(),args:Re(ee.args)})}}});var dv=w(RN=>{"use strict";m();T();N();Object.defineProperty(RN,"__esModule",{value:!0});RN.extendSchema=rX;RN.extendSchemaImpl=QL;var X5=Br(),Z5=Xt(),eX=Ir(),tX=tu(),Ep=lI(),Ui=Ft(),xL=ec(),_n=wt(),hp=Qr(),GL=Fi(),$L=Pa(),qL=Xu(),nX=Nl(),lv=fl(),VL=up();function rX(e,t,n){(0,qL.assertSchema)(e),t!=null&&t.kind===Ui.Kind.DOCUMENT||(0,X5.devAssert)(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&(0,nX.assertValidSDLExtension)(t,e);let r=e.toConfig(),i=QL(r,t,n);return r===i?e:new qL.GraphQLSchema(i)}function QL(e,t,n){var r,i,a,o;let c=[],l=Object.create(null),d=[],f,y=[];for(let ue of t.definitions)if(ue.kind===Ui.Kind.SCHEMA_DEFINITION)f=ue;else if(ue.kind===Ui.Kind.SCHEMA_EXTENSION)y.push(ue);else if((0,xL.isTypeDefinitionNode)(ue))c.push(ue);else if((0,xL.isTypeExtensionNode)(ue)){let De=ue.name.value,ve=l[De];l[De]=ve?ve.concat([ue]):[ue]}else ue.kind===Ui.Kind.DIRECTIVE_DEFINITION&&d.push(ue);if(Object.keys(l).length===0&&c.length===0&&d.length===0&&y.length===0&&f==null)return e;let I=Object.create(null);for(let ue of e.types)I[ue.name]=se(ue);for(let ue of c){var v;let De=ue.name.value;I[De]=(v=jL[De])!==null&&v!==void 0?v:An(ue)}let F=x(x({query:e.query&&K(e.query),mutation:e.mutation&&K(e.mutation),subscription:e.subscription&&K(e.subscription)},f&&_t([f])),_t(y));return Q(x({description:(r=f)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value},F),{types:Object.values(I),directives:[...e.directives.map(J),...d.map(bn)],extensions:Object.create(null),astNode:(a=f)!==null&&a!==void 0?a:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(y),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1});function k(ue){return(0,_n.isListType)(ue)?new _n.GraphQLList(k(ue.ofType)):(0,_n.isNonNullType)(ue)?new _n.GraphQLNonNull(k(ue.ofType)):K(ue)}function K(ue){return I[ue.name]}function J(ue){let De=ue.toConfig();return new hp.GraphQLDirective(Q(x({},De),{args:(0,Ep.mapValue)(De.args,Se)}))}function se(ue){if((0,GL.isIntrospectionType)(ue)||(0,$L.isSpecifiedScalarType)(ue))return ue;if((0,_n.isScalarType)(ue))return de(ue);if((0,_n.isObjectType)(ue))return Re(ue);if((0,_n.isInterfaceType)(ue))return xe(ue);if((0,_n.isUnionType)(ue))return tt(ue);if((0,_n.isEnumType)(ue))return Te(ue);if((0,_n.isInputObjectType)(ue))return ie(ue);(0,eX.invariant)(!1,"Unexpected type: "+(0,Z5.inspect)(ue))}function ie(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[];return new _n.GraphQLInputObjectType(Q(x({},ve),{fields:()=>x(x({},(0,Ep.mapValue)(ve.fields,vt=>Q(x({},vt),{type:k(vt.type)}))),Pr(Ce)),extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function Te(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ue.name])!==null&&De!==void 0?De:[];return new _n.GraphQLEnumType(Q(x({},ve),{values:x(x({},ve.values),Fr(Ce)),extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function de(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[],vt=ve.specifiedByURL;for(let oe of Ce){var Y;vt=(Y=KL(oe))!==null&&Y!==void 0?Y:vt}return new _n.GraphQLScalarType(Q(x({},ve),{specifiedByURL:vt,extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function Re(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[];return new _n.GraphQLObjectType(Q(x({},ve),{interfaces:()=>[...ue.getInterfaces().map(K),...kn(Ce)],fields:()=>x(x({},(0,Ep.mapValue)(ve.fields,ee)),Qt(Ce)),extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function xe(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[];return new _n.GraphQLInterfaceType(Q(x({},ve),{interfaces:()=>[...ue.getInterfaces().map(K),...kn(Ce)],fields:()=>x(x({},(0,Ep.mapValue)(ve.fields,ee)),Qt(Ce)),extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function tt(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[];return new _n.GraphQLUnionType(Q(x({},ve),{types:()=>[...ue.getTypes().map(K),...zt(Ce)],extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function ee(ue){return Q(x({},ue),{type:k(ue.type),args:ue.args&&(0,Ep.mapValue)(ue.args,Se)})}function Se(ue){return Q(x({},ue),{type:k(ue.type)})}function _t(ue){let De={};for(let Ce of ue){var ve;let vt=(ve=Ce.operationTypes)!==null&&ve!==void 0?ve:[];for(let Y of vt)De[Y.operation]=en(Y.type)}return De}function en(ue){var De;let ve=ue.name.value,Ce=(De=jL[ve])!==null&&De!==void 0?De:I[ve];if(Ce===void 0)throw new Error(`Unknown type: "${ve}".`);return Ce}function tn(ue){return ue.kind===Ui.Kind.LIST_TYPE?new _n.GraphQLList(tn(ue.type)):ue.kind===Ui.Kind.NON_NULL_TYPE?new _n.GraphQLNonNull(tn(ue.type)):en(ue)}function bn(ue){var De;return new hp.GraphQLDirective({name:ue.name.value,description:(De=ue.description)===null||De===void 0?void 0:De.value,locations:ue.locations.map(({value:ve})=>ve),isRepeatable:ue.repeatable,args:mn(ue.arguments),astNode:ue})}function Qt(ue){let De=Object.create(null);for(let vt of ue){var ve;let Y=(ve=vt.fields)!==null&&ve!==void 0?ve:[];for(let oe of Y){var Ce;De[oe.name.value]={type:tn(oe.type),description:(Ce=oe.description)===null||Ce===void 0?void 0:Ce.value,args:mn(oe.arguments),deprecationReason:AN(oe),astNode:oe}}}return De}function mn(ue){let De=ue!=null?ue:[],ve=Object.create(null);for(let vt of De){var Ce;let Y=tn(vt.type);ve[vt.name.value]={type:Y,description:(Ce=vt.description)===null||Ce===void 0?void 0:Ce.value,defaultValue:(0,VL.valueFromAST)(vt.defaultValue,Y),deprecationReason:AN(vt),astNode:vt}}return ve}function Pr(ue){let De=Object.create(null);for(let vt of ue){var ve;let Y=(ve=vt.fields)!==null&&ve!==void 0?ve:[];for(let oe of Y){var Ce;let qe=tn(oe.type);De[oe.name.value]={type:qe,description:(Ce=oe.description)===null||Ce===void 0?void 0:Ce.value,defaultValue:(0,VL.valueFromAST)(oe.defaultValue,qe),deprecationReason:AN(oe),astNode:oe}}}return De}function Fr(ue){let De=Object.create(null);for(let vt of ue){var ve;let Y=(ve=vt.values)!==null&&ve!==void 0?ve:[];for(let oe of Y){var Ce;De[oe.name.value]={description:(Ce=oe.description)===null||Ce===void 0?void 0:Ce.value,deprecationReason:AN(oe),astNode:oe}}}return De}function kn(ue){return ue.flatMap(De=>{var ve,Ce;return(ve=(Ce=De.interfaces)===null||Ce===void 0?void 0:Ce.map(en))!==null&&ve!==void 0?ve:[]})}function zt(ue){return ue.flatMap(De=>{var ve,Ce;return(ve=(Ce=De.types)===null||Ce===void 0?void 0:Ce.map(en))!==null&&ve!==void 0?ve:[]})}function An(ue){var De;let ve=ue.name.value,Ce=(De=l[ve])!==null&&De!==void 0?De:[];switch(ue.kind){case Ui.Kind.OBJECT_TYPE_DEFINITION:{var vt;let nt=[ue,...Ce];return new _n.GraphQLObjectType({name:ve,description:(vt=ue.description)===null||vt===void 0?void 0:vt.value,interfaces:()=>kn(nt),fields:()=>Qt(nt),astNode:ue,extensionASTNodes:Ce})}case Ui.Kind.INTERFACE_TYPE_DEFINITION:{var Y;let nt=[ue,...Ce];return new _n.GraphQLInterfaceType({name:ve,description:(Y=ue.description)===null||Y===void 0?void 0:Y.value,interfaces:()=>kn(nt),fields:()=>Qt(nt),astNode:ue,extensionASTNodes:Ce})}case Ui.Kind.ENUM_TYPE_DEFINITION:{var oe;let nt=[ue,...Ce];return new _n.GraphQLEnumType({name:ve,description:(oe=ue.description)===null||oe===void 0?void 0:oe.value,values:Fr(nt),astNode:ue,extensionASTNodes:Ce})}case Ui.Kind.UNION_TYPE_DEFINITION:{var qe;let nt=[ue,...Ce];return new _n.GraphQLUnionType({name:ve,description:(qe=ue.description)===null||qe===void 0?void 0:qe.value,types:()=>zt(nt),astNode:ue,extensionASTNodes:Ce})}case Ui.Kind.SCALAR_TYPE_DEFINITION:{var Ye;return new _n.GraphQLScalarType({name:ve,description:(Ye=ue.description)===null||Ye===void 0?void 0:Ye.value,specifiedByURL:KL(ue),astNode:ue,extensionASTNodes:Ce})}case Ui.Kind.INPUT_OBJECT_TYPE_DEFINITION:{var Ut;let nt=[ue,...Ce];return new _n.GraphQLInputObjectType({name:ve,description:(Ut=ue.description)===null||Ut===void 0?void 0:Ut.value,fields:()=>Pr(nt),astNode:ue,extensionASTNodes:Ce,isOneOf:iX(ue)})}}}}var jL=(0,tX.keyMap)([...$L.specifiedScalarTypes,...GL.introspectionTypes],e=>e.name);function AN(e){let t=(0,lv.getDirectiveValues)(hp.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function KL(e){let t=(0,lv.getDirectiveValues)(hp.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}function iX(e){return!!(0,lv.getDirectiveValues)(hp.GraphQLOneOfDirective,e)}});var JL=w(PN=>{"use strict";m();T();N();Object.defineProperty(PN,"__esModule",{value:!0});PN.buildASTSchema=YL;PN.buildSchema=pX;var aX=Br(),sX=Ft(),oX=rl(),uX=Qr(),cX=Xu(),lX=Nl(),dX=dv();function YL(e,t){e!=null&&e.kind===sX.Kind.DOCUMENT||(0,aX.devAssert)(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,lX.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,dX.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,...uX.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new cX.GraphQLSchema(Q(x({},r),{directives:i}))}function pX(e,t){let n=(0,oX.parse)(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return YL(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}});var WL=w(fv=>{"use strict";m();T();N();Object.defineProperty(fv,"__esModule",{value:!0});fv.lexicographicSortSchema=yX;var fX=Xt(),mX=Ir(),NX=Md(),HL=xd(),Ur=wt(),TX=Qr(),EX=Fi(),hX=Xu();function yX(e){let t=e.toConfig(),n=(0,NX.keyValMap)(pv(t.types),I=>I.name,y);return new hX.GraphQLSchema(Q(x({},t),{types:Object.values(n),directives:pv(t.directives).map(o),query:a(t.query),mutation:a(t.mutation),subscription:a(t.subscription)}));function r(I){return(0,Ur.isListType)(I)?new Ur.GraphQLList(r(I.ofType)):(0,Ur.isNonNullType)(I)?new Ur.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 TX.GraphQLDirective(Q(x({},v),{locations:zL(v.locations,F=>F),args:c(v.args)}))}function c(I){return FN(I,v=>Q(x({},v),{type:r(v.type)}))}function l(I){return FN(I,v=>Q(x({},v),{type:r(v.type),args:v.args&&c(v.args)}))}function d(I){return FN(I,v=>Q(x({},v),{type:r(v.type)}))}function f(I){return pv(I).map(i)}function y(I){if((0,Ur.isScalarType)(I)||(0,EX.isIntrospectionType)(I))return I;if((0,Ur.isObjectType)(I)){let v=I.toConfig();return new Ur.GraphQLObjectType(Q(x({},v),{interfaces:()=>f(v.interfaces),fields:()=>l(v.fields)}))}if((0,Ur.isInterfaceType)(I)){let v=I.toConfig();return new Ur.GraphQLInterfaceType(Q(x({},v),{interfaces:()=>f(v.interfaces),fields:()=>l(v.fields)}))}if((0,Ur.isUnionType)(I)){let v=I.toConfig();return new Ur.GraphQLUnionType(Q(x({},v),{types:()=>f(v.types)}))}if((0,Ur.isEnumType)(I)){let v=I.toConfig();return new Ur.GraphQLEnumType(Q(x({},v),{values:FN(v.values,F=>F)}))}if((0,Ur.isInputObjectType)(I)){let v=I.toConfig();return new Ur.GraphQLInputObjectType(Q(x({},v),{fields:()=>d(v.fields)}))}(0,mX.invariant)(!1,"Unexpected type: "+(0,fX.inspect)(I))}}function FN(e,t){let n=Object.create(null);for(let r of Object.keys(e).sort(HL.naturalCompare))n[r]=t(e[r]);return n}function pv(e){return zL(e,t=>t.name)}function zL(e,t){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);return(0,HL.naturalCompare)(i,a)})}});var iC=w(yp=>{"use strict";m();T();N();Object.defineProperty(yp,"__esModule",{value:!0});yp.printIntrospectionSchema=DX;yp.printSchema=OX;yp.printType=eC;var IX=Xt(),gX=Ir(),_X=Pd(),Nv=Ft(),wN=ci(),El=wt(),Tv=Qr(),XL=Fi(),vX=Pa(),SX=Xd();function OX(e){return ZL(e,t=>!(0,Tv.isSpecifiedDirective)(t),bX)}function DX(e){return ZL(e,Tv.isSpecifiedDirective,XL.isIntrospectionType)}function bX(e){return!(0,vX.isSpecifiedScalarType)(e)&&!(0,XL.isIntrospectionType)(e)}function ZL(e,t,n){let r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[AX(e),...r.map(a=>UX(a)),...i.map(a=>eC(a))].filter(Boolean).join(` + `}});var CL=w(sv=>{"use strict";m();T();N();Object.defineProperty(sv,"__esModule",{value:!0});sv.getOperationAST=M5;var k5=Ft();function M5(e,t){let n=null;for(let i of e.definitions)if(i.kind===k5.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 BL=w(ov=>{"use strict";m();T();N();Object.defineProperty(ov,"__esModule",{value:!0});ov.getOperationRootType=x5;var DN=ze();function x5(e,t){if(t.operation==="query"){let n=e.getQueryType();if(!n)throw new DN.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 DN.GraphQLError("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){let n=e.getSubscriptionType();if(!n)throw new DN.GraphQLError("Schema is not configured for subscriptions.",{nodes:t});return n}throw new DN.GraphQLError("Can only have query, mutation and subscription operations.",{nodes:t})}});var UL=w(uv=>{"use strict";m();T();N();Object.defineProperty(uv,"__esModule",{value:!0});uv.introspectionFromSchema=G5;var q5=Ir(),V5=il(),j5=fp(),K5=av();function G5(e,t){let n=x({specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,oneOf:!0},t),r=(0,V5.parse)((0,K5.getIntrospectionQuery)(n)),i=(0,j5.executeSync)({schema:e,document:r});return!i.errors&&i.data||(0,q5.invariant)(!1),i.data}});var ML=w(cv=>{"use strict";m();T();N();Object.defineProperty(cv,"__esModule",{value:!0});cv.buildClientSchema=W5;var $5=Br(),li=Xt(),kL=Da(),bN=Md(),Q5=il(),di=wt(),Y5=Qr(),Ba=Fi(),J5=Pa(),H5=Xu(),z5=up();function W5(e,t){(0,kL.isObjectLike)(e)&&(0,kL.isObjectLike)(e.__schema)||(0,$5.devAssert)(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${(0,li.inspect)(e)}.`);let n=e.__schema,r=(0,bN.keyValMap)(n.types,ee=>ee.name,ee=>I(ee));for(let ee of[...J5.specifiedScalarTypes,...Ba.introspectionTypes])r[ee.name]&&(r[ee.name]=ee);let i=n.queryType?f(n.queryType):null,a=n.mutationType?f(n.mutationType):null,o=n.subscriptionType?f(n.subscriptionType):null,c=n.directives?n.directives.map(tt):[];return new H5.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(ee){if(ee.kind===Ba.TypeKind.LIST){let Se=ee.ofType;if(!Se)throw new Error("Decorated type deeper than introspection query.");return new di.GraphQLList(l(Se))}if(ee.kind===Ba.TypeKind.NON_NULL){let Se=ee.ofType;if(!Se)throw new Error("Decorated type deeper than introspection query.");let _t=l(Se);return new di.GraphQLNonNull((0,di.assertNullableType)(_t))}return d(ee)}function d(ee){let Se=ee.name;if(!Se)throw new Error(`Unknown type reference: ${(0,li.inspect)(ee)}.`);let _t=r[Se];if(!_t)throw new Error(`Invalid or incomplete schema, unknown type: ${Se}. Ensure that a full introspection query is used in order to build a client schema.`);return _t}function f(ee){return(0,di.assertObjectType)(d(ee))}function y(ee){return(0,di.assertInterfaceType)(d(ee))}function I(ee){if(ee!=null&&ee.name!=null&&ee.kind!=null)switch(ee.kind){case Ba.TypeKind.SCALAR:return v(ee);case Ba.TypeKind.OBJECT:return k(ee);case Ba.TypeKind.INTERFACE:return K(ee);case Ba.TypeKind.UNION:return J(ee);case Ba.TypeKind.ENUM:return se(ee);case Ba.TypeKind.INPUT_OBJECT:return ie(ee)}let Se=(0,li.inspect)(ee);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${Se}.`)}function v(ee){return new di.GraphQLScalarType({name:ee.name,description:ee.description,specifiedByURL:ee.specifiedByURL})}function F(ee){if(ee.interfaces===null&&ee.kind===Ba.TypeKind.INTERFACE)return[];if(!ee.interfaces){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing interfaces: ${Se}.`)}return ee.interfaces.map(y)}function k(ee){return new di.GraphQLObjectType({name:ee.name,description:ee.description,interfaces:()=>F(ee),fields:()=>Te(ee)})}function K(ee){return new di.GraphQLInterfaceType({name:ee.name,description:ee.description,interfaces:()=>F(ee),fields:()=>Te(ee)})}function J(ee){if(!ee.possibleTypes){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing possibleTypes: ${Se}.`)}return new di.GraphQLUnionType({name:ee.name,description:ee.description,types:()=>ee.possibleTypes.map(f)})}function se(ee){if(!ee.enumValues){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing enumValues: ${Se}.`)}return new di.GraphQLEnumType({name:ee.name,description:ee.description,values:(0,bN.keyValMap)(ee.enumValues,Se=>Se.name,Se=>({description:Se.description,deprecationReason:Se.deprecationReason}))})}function ie(ee){if(!ee.inputFields){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing inputFields: ${Se}.`)}return new di.GraphQLInputObjectType({name:ee.name,description:ee.description,fields:()=>Re(ee.inputFields),isOneOf:ee.isOneOf})}function Te(ee){if(!ee.fields)throw new Error(`Introspection result missing fields: ${(0,li.inspect)(ee)}.`);return(0,bN.keyValMap)(ee.fields,Se=>Se.name,de)}function de(ee){let Se=l(ee.type);if(!(0,di.isOutputType)(Se)){let _t=(0,li.inspect)(Se);throw new Error(`Introspection must provide output type for fields, but received: ${_t}.`)}if(!ee.args){let _t=(0,li.inspect)(ee);throw new Error(`Introspection result missing field args: ${_t}.`)}return{description:ee.description,deprecationReason:ee.deprecationReason,type:Se,args:Re(ee.args)}}function Re(ee){return(0,bN.keyValMap)(ee,Se=>Se.name,xe)}function xe(ee){let Se=l(ee.type);if(!(0,di.isInputType)(Se)){let en=(0,li.inspect)(Se);throw new Error(`Introspection must provide input type for arguments, but received: ${en}.`)}let _t=ee.defaultValue!=null?(0,z5.valueFromAST)((0,Q5.parseValue)(ee.defaultValue),Se):void 0;return{description:ee.description,type:Se,defaultValue:_t,deprecationReason:ee.deprecationReason}}function tt(ee){if(!ee.args){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing directive args: ${Se}.`)}if(!ee.locations){let Se=(0,li.inspect)(ee);throw new Error(`Introspection result missing directive locations: ${Se}.`)}return new Y5.GraphQLDirective({name:ee.name,description:ee.description,isRepeatable:ee.isRepeatable,locations:ee.locations.slice(),args:Re(ee.args)})}}});var dv=w(RN=>{"use strict";m();T();N();Object.defineProperty(RN,"__esModule",{value:!0});RN.extendSchema=rX;RN.extendSchemaImpl=QL;var X5=Br(),Z5=Xt(),eX=Ir(),tX=tu(),Ep=lI(),Ui=Ft(),xL=ec(),_n=wt(),hp=Qr(),GL=Fi(),$L=Pa(),qL=Xu(),nX=Tl(),lv=ml(),VL=up();function rX(e,t,n){(0,qL.assertSchema)(e),t!=null&&t.kind===Ui.Kind.DOCUMENT||(0,X5.devAssert)(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&(0,nX.assertValidSDLExtension)(t,e);let r=e.toConfig(),i=QL(r,t,n);return r===i?e:new qL.GraphQLSchema(i)}function QL(e,t,n){var r,i,a,o;let c=[],l=Object.create(null),d=[],f,y=[];for(let ue of t.definitions)if(ue.kind===Ui.Kind.SCHEMA_DEFINITION)f=ue;else if(ue.kind===Ui.Kind.SCHEMA_EXTENSION)y.push(ue);else if((0,xL.isTypeDefinitionNode)(ue))c.push(ue);else if((0,xL.isTypeExtensionNode)(ue)){let De=ue.name.value,ve=l[De];l[De]=ve?ve.concat([ue]):[ue]}else ue.kind===Ui.Kind.DIRECTIVE_DEFINITION&&d.push(ue);if(Object.keys(l).length===0&&c.length===0&&d.length===0&&y.length===0&&f==null)return e;let I=Object.create(null);for(let ue of e.types)I[ue.name]=se(ue);for(let ue of c){var v;let De=ue.name.value;I[De]=(v=jL[De])!==null&&v!==void 0?v:An(ue)}let F=x(x({query:e.query&&K(e.query),mutation:e.mutation&&K(e.mutation),subscription:e.subscription&&K(e.subscription)},f&&_t([f])),_t(y));return Q(x({description:(r=f)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value},F),{types:Object.values(I),directives:[...e.directives.map(J),...d.map(bn)],extensions:Object.create(null),astNode:(a=f)!==null&&a!==void 0?a:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(y),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1});function k(ue){return(0,_n.isListType)(ue)?new _n.GraphQLList(k(ue.ofType)):(0,_n.isNonNullType)(ue)?new _n.GraphQLNonNull(k(ue.ofType)):K(ue)}function K(ue){return I[ue.name]}function J(ue){let De=ue.toConfig();return new hp.GraphQLDirective(Q(x({},De),{args:(0,Ep.mapValue)(De.args,Se)}))}function se(ue){if((0,GL.isIntrospectionType)(ue)||(0,$L.isSpecifiedScalarType)(ue))return ue;if((0,_n.isScalarType)(ue))return de(ue);if((0,_n.isObjectType)(ue))return Re(ue);if((0,_n.isInterfaceType)(ue))return xe(ue);if((0,_n.isUnionType)(ue))return tt(ue);if((0,_n.isEnumType)(ue))return Te(ue);if((0,_n.isInputObjectType)(ue))return ie(ue);(0,eX.invariant)(!1,"Unexpected type: "+(0,Z5.inspect)(ue))}function ie(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[];return new _n.GraphQLInputObjectType(Q(x({},ve),{fields:()=>x(x({},(0,Ep.mapValue)(ve.fields,vt=>Q(x({},vt),{type:k(vt.type)}))),Pr(Ce)),extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function Te(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ue.name])!==null&&De!==void 0?De:[];return new _n.GraphQLEnumType(Q(x({},ve),{values:x(x({},ve.values),Fr(Ce)),extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function de(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[],vt=ve.specifiedByURL;for(let oe of Ce){var Y;vt=(Y=KL(oe))!==null&&Y!==void 0?Y:vt}return new _n.GraphQLScalarType(Q(x({},ve),{specifiedByURL:vt,extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function Re(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[];return new _n.GraphQLObjectType(Q(x({},ve),{interfaces:()=>[...ue.getInterfaces().map(K),...kn(Ce)],fields:()=>x(x({},(0,Ep.mapValue)(ve.fields,ee)),Qt(Ce)),extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function xe(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[];return new _n.GraphQLInterfaceType(Q(x({},ve),{interfaces:()=>[...ue.getInterfaces().map(K),...kn(Ce)],fields:()=>x(x({},(0,Ep.mapValue)(ve.fields,ee)),Qt(Ce)),extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function tt(ue){var De;let ve=ue.toConfig(),Ce=(De=l[ve.name])!==null&&De!==void 0?De:[];return new _n.GraphQLUnionType(Q(x({},ve),{types:()=>[...ue.getTypes().map(K),...zt(Ce)],extensionASTNodes:ve.extensionASTNodes.concat(Ce)}))}function ee(ue){return Q(x({},ue),{type:k(ue.type),args:ue.args&&(0,Ep.mapValue)(ue.args,Se)})}function Se(ue){return Q(x({},ue),{type:k(ue.type)})}function _t(ue){let De={};for(let Ce of ue){var ve;let vt=(ve=Ce.operationTypes)!==null&&ve!==void 0?ve:[];for(let Y of vt)De[Y.operation]=en(Y.type)}return De}function en(ue){var De;let ve=ue.name.value,Ce=(De=jL[ve])!==null&&De!==void 0?De:I[ve];if(Ce===void 0)throw new Error(`Unknown type: "${ve}".`);return Ce}function tn(ue){return ue.kind===Ui.Kind.LIST_TYPE?new _n.GraphQLList(tn(ue.type)):ue.kind===Ui.Kind.NON_NULL_TYPE?new _n.GraphQLNonNull(tn(ue.type)):en(ue)}function bn(ue){var De;return new hp.GraphQLDirective({name:ue.name.value,description:(De=ue.description)===null||De===void 0?void 0:De.value,locations:ue.locations.map(({value:ve})=>ve),isRepeatable:ue.repeatable,args:mn(ue.arguments),astNode:ue})}function Qt(ue){let De=Object.create(null);for(let vt of ue){var ve;let Y=(ve=vt.fields)!==null&&ve!==void 0?ve:[];for(let oe of Y){var Ce;De[oe.name.value]={type:tn(oe.type),description:(Ce=oe.description)===null||Ce===void 0?void 0:Ce.value,args:mn(oe.arguments),deprecationReason:AN(oe),astNode:oe}}}return De}function mn(ue){let De=ue!=null?ue:[],ve=Object.create(null);for(let vt of De){var Ce;let Y=tn(vt.type);ve[vt.name.value]={type:Y,description:(Ce=vt.description)===null||Ce===void 0?void 0:Ce.value,defaultValue:(0,VL.valueFromAST)(vt.defaultValue,Y),deprecationReason:AN(vt),astNode:vt}}return ve}function Pr(ue){let De=Object.create(null);for(let vt of ue){var ve;let Y=(ve=vt.fields)!==null&&ve!==void 0?ve:[];for(let oe of Y){var Ce;let qe=tn(oe.type);De[oe.name.value]={type:qe,description:(Ce=oe.description)===null||Ce===void 0?void 0:Ce.value,defaultValue:(0,VL.valueFromAST)(oe.defaultValue,qe),deprecationReason:AN(oe),astNode:oe}}}return De}function Fr(ue){let De=Object.create(null);for(let vt of ue){var ve;let Y=(ve=vt.values)!==null&&ve!==void 0?ve:[];for(let oe of Y){var Ce;De[oe.name.value]={description:(Ce=oe.description)===null||Ce===void 0?void 0:Ce.value,deprecationReason:AN(oe),astNode:oe}}}return De}function kn(ue){return ue.flatMap(De=>{var ve,Ce;return(ve=(Ce=De.interfaces)===null||Ce===void 0?void 0:Ce.map(en))!==null&&ve!==void 0?ve:[]})}function zt(ue){return ue.flatMap(De=>{var ve,Ce;return(ve=(Ce=De.types)===null||Ce===void 0?void 0:Ce.map(en))!==null&&ve!==void 0?ve:[]})}function An(ue){var De;let ve=ue.name.value,Ce=(De=l[ve])!==null&&De!==void 0?De:[];switch(ue.kind){case Ui.Kind.OBJECT_TYPE_DEFINITION:{var vt;let nt=[ue,...Ce];return new _n.GraphQLObjectType({name:ve,description:(vt=ue.description)===null||vt===void 0?void 0:vt.value,interfaces:()=>kn(nt),fields:()=>Qt(nt),astNode:ue,extensionASTNodes:Ce})}case Ui.Kind.INTERFACE_TYPE_DEFINITION:{var Y;let nt=[ue,...Ce];return new _n.GraphQLInterfaceType({name:ve,description:(Y=ue.description)===null||Y===void 0?void 0:Y.value,interfaces:()=>kn(nt),fields:()=>Qt(nt),astNode:ue,extensionASTNodes:Ce})}case Ui.Kind.ENUM_TYPE_DEFINITION:{var oe;let nt=[ue,...Ce];return new _n.GraphQLEnumType({name:ve,description:(oe=ue.description)===null||oe===void 0?void 0:oe.value,values:Fr(nt),astNode:ue,extensionASTNodes:Ce})}case Ui.Kind.UNION_TYPE_DEFINITION:{var qe;let nt=[ue,...Ce];return new _n.GraphQLUnionType({name:ve,description:(qe=ue.description)===null||qe===void 0?void 0:qe.value,types:()=>zt(nt),astNode:ue,extensionASTNodes:Ce})}case Ui.Kind.SCALAR_TYPE_DEFINITION:{var Ye;return new _n.GraphQLScalarType({name:ve,description:(Ye=ue.description)===null||Ye===void 0?void 0:Ye.value,specifiedByURL:KL(ue),astNode:ue,extensionASTNodes:Ce})}case Ui.Kind.INPUT_OBJECT_TYPE_DEFINITION:{var Ut;let nt=[ue,...Ce];return new _n.GraphQLInputObjectType({name:ve,description:(Ut=ue.description)===null||Ut===void 0?void 0:Ut.value,fields:()=>Pr(nt),astNode:ue,extensionASTNodes:Ce,isOneOf:iX(ue)})}}}}var jL=(0,tX.keyMap)([...$L.specifiedScalarTypes,...GL.introspectionTypes],e=>e.name);function AN(e){let t=(0,lv.getDirectiveValues)(hp.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function KL(e){let t=(0,lv.getDirectiveValues)(hp.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}function iX(e){return!!(0,lv.getDirectiveValues)(hp.GraphQLOneOfDirective,e)}});var JL=w(PN=>{"use strict";m();T();N();Object.defineProperty(PN,"__esModule",{value:!0});PN.buildASTSchema=YL;PN.buildSchema=pX;var aX=Br(),sX=Ft(),oX=il(),uX=Qr(),cX=Xu(),lX=Tl(),dX=dv();function YL(e,t){e!=null&&e.kind===sX.Kind.DOCUMENT||(0,aX.devAssert)(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&(0,lX.assertValidSDL)(e);let n={description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},r=(0,dX.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,...uX.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new cX.GraphQLSchema(Q(x({},r),{directives:i}))}function pX(e,t){let n=(0,oX.parse)(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return YL(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}});var WL=w(fv=>{"use strict";m();T();N();Object.defineProperty(fv,"__esModule",{value:!0});fv.lexicographicSortSchema=yX;var fX=Xt(),mX=Ir(),NX=Md(),HL=xd(),Ur=wt(),TX=Qr(),EX=Fi(),hX=Xu();function yX(e){let t=e.toConfig(),n=(0,NX.keyValMap)(pv(t.types),I=>I.name,y);return new hX.GraphQLSchema(Q(x({},t),{types:Object.values(n),directives:pv(t.directives).map(o),query:a(t.query),mutation:a(t.mutation),subscription:a(t.subscription)}));function r(I){return(0,Ur.isListType)(I)?new Ur.GraphQLList(r(I.ofType)):(0,Ur.isNonNullType)(I)?new Ur.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 TX.GraphQLDirective(Q(x({},v),{locations:zL(v.locations,F=>F),args:c(v.args)}))}function c(I){return FN(I,v=>Q(x({},v),{type:r(v.type)}))}function l(I){return FN(I,v=>Q(x({},v),{type:r(v.type),args:v.args&&c(v.args)}))}function d(I){return FN(I,v=>Q(x({},v),{type:r(v.type)}))}function f(I){return pv(I).map(i)}function y(I){if((0,Ur.isScalarType)(I)||(0,EX.isIntrospectionType)(I))return I;if((0,Ur.isObjectType)(I)){let v=I.toConfig();return new Ur.GraphQLObjectType(Q(x({},v),{interfaces:()=>f(v.interfaces),fields:()=>l(v.fields)}))}if((0,Ur.isInterfaceType)(I)){let v=I.toConfig();return new Ur.GraphQLInterfaceType(Q(x({},v),{interfaces:()=>f(v.interfaces),fields:()=>l(v.fields)}))}if((0,Ur.isUnionType)(I)){let v=I.toConfig();return new Ur.GraphQLUnionType(Q(x({},v),{types:()=>f(v.types)}))}if((0,Ur.isEnumType)(I)){let v=I.toConfig();return new Ur.GraphQLEnumType(Q(x({},v),{values:FN(v.values,F=>F)}))}if((0,Ur.isInputObjectType)(I)){let v=I.toConfig();return new Ur.GraphQLInputObjectType(Q(x({},v),{fields:()=>d(v.fields)}))}(0,mX.invariant)(!1,"Unexpected type: "+(0,fX.inspect)(I))}}function FN(e,t){let n=Object.create(null);for(let r of Object.keys(e).sort(HL.naturalCompare))n[r]=t(e[r]);return n}function pv(e){return zL(e,t=>t.name)}function zL(e,t){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);return(0,HL.naturalCompare)(i,a)})}});var iC=w(yp=>{"use strict";m();T();N();Object.defineProperty(yp,"__esModule",{value:!0});yp.printIntrospectionSchema=DX;yp.printSchema=OX;yp.printType=eC;var IX=Xt(),gX=Ir(),_X=Pd(),Nv=Ft(),wN=ci(),hl=wt(),Tv=Qr(),XL=Fi(),vX=Pa(),SX=Xd();function OX(e){return ZL(e,t=>!(0,Tv.isSpecifiedDirective)(t),bX)}function DX(e){return ZL(e,Tv.isSpecifiedDirective,XL.isIntrospectionType)}function bX(e){return!(0,vX.isSpecifiedScalarType)(e)&&!(0,XL.isIntrospectionType)(e)}function ZL(e,t,n){let r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[AX(e),...r.map(a=>UX(a)),...i.map(a=>eC(a))].filter(Boolean).join(` `)}function AX(e){if(e.description==null&&RX(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}`),ki(e)+`schema { ${t.join(` `)} -}`}function RX(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 eC(e){if((0,El.isScalarType)(e))return PX(e);if((0,El.isObjectType)(e))return FX(e);if((0,El.isInterfaceType)(e))return wX(e);if((0,El.isUnionType)(e))return LX(e);if((0,El.isEnumType)(e))return CX(e);if((0,El.isInputObjectType)(e))return BX(e);(0,gX.invariant)(!1,"Unexpected type: "+(0,IX.inspect)(e))}function PX(e){return ki(e)+`scalar ${e.name}`+kX(e)}function tC(e){let t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function FX(e){return ki(e)+`type ${e.name}`+tC(e)+nC(e)}function wX(e){return ki(e)+`interface ${e.name}`+tC(e)+nC(e)}function LX(e){let t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return ki(e)+"union "+e.name+n}function CX(e){let t=e.getValues().map((n,r)=>ki(n," ",!r)+" "+n.name+hv(n.deprecationReason));return ki(e)+`enum ${e.name}`+Ev(t)}function BX(e){let t=Object.values(e.getFields()).map((n,r)=>ki(n," ",!r)+" "+mv(n));return ki(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+Ev(t)}function nC(e){let t=Object.values(e.getFields()).map((n,r)=>ki(n," ",!r)+" "+n.name+rC(n.args," ")+": "+String(n.type)+hv(n.deprecationReason));return Ev(t)}function Ev(e){return e.length!==0?` { +}`}function RX(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 eC(e){if((0,hl.isScalarType)(e))return PX(e);if((0,hl.isObjectType)(e))return FX(e);if((0,hl.isInterfaceType)(e))return wX(e);if((0,hl.isUnionType)(e))return LX(e);if((0,hl.isEnumType)(e))return CX(e);if((0,hl.isInputObjectType)(e))return BX(e);(0,gX.invariant)(!1,"Unexpected type: "+(0,IX.inspect)(e))}function PX(e){return ki(e)+`scalar ${e.name}`+kX(e)}function tC(e){let t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function FX(e){return ki(e)+`type ${e.name}`+tC(e)+nC(e)}function wX(e){return ki(e)+`interface ${e.name}`+tC(e)+nC(e)}function LX(e){let t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return ki(e)+"union "+e.name+n}function CX(e){let t=e.getValues().map((n,r)=>ki(n," ",!r)+" "+n.name+hv(n.deprecationReason));return ki(e)+`enum ${e.name}`+Ev(t)}function BX(e){let t=Object.values(e.getFields()).map((n,r)=>ki(n," ",!r)+" "+mv(n));return ki(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+Ev(t)}function nC(e){let t=Object.values(e.getFields()).map((n,r)=>ki(n," ",!r)+" "+n.name+rC(n.args," ")+": "+String(n.type)+hv(n.deprecationReason));return Ev(t)}function Ev(e){return e.length!==0?` { `+e.join(` `)+` }`:""}function rC(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(mv).join(", ")+")":`( @@ -195,13 +195,13 @@ ${t.join(` -`;A.ID_SCALAR="ID";A.IMPORT="import";A.IN_UPPER="IN";A.INACCESSIBLE="inaccessible";A.INLINE_FRAGMENT="inlineFragment";A.INLINE_FRAGMENT_UPPER="INLINE_FRAGMENT";A.INPUT="Input";A.INPUT_FIELD="Input field";A.INPUT_FIELD_DEFINITION_UPPER="INPUT_FIELD_DEFINITION";A.INPUT_OBJECT="Input Object";A.INPUT_OBJECT_UPPER="INPUT_OBJECT";A.INPUT_VALUE="Input Value";A.INT_SCALAR="Int";A.INTERFACE="Interface";A.INTERFACE_UPPER="INTERFACE";A.INTERFACE_OBJECT="interfaceObject";A.KEY="key";A.LEFT_PARENTHESIS="(";A.LEVELS="levels";A.LINK="link";A.LINK_IMPORT="link__Import";A.LINK_PURPOSE="link__Purpose";A.LIST="list";A.LITERAL_SPACE=" ";A.LITERAL_NEW_LINE=` `;A.NUMBER="number";A.MUTATION="Mutation";A.MUTATION_UPPER="MUTATION";A.PROPAGATE="propagate";A.PROVIDER_TYPE_KAFKA="kafka";A.PROVIDER_TYPE_NATS="nats";A.PROVIDER_TYPE_REDIS="redis";A.NOT_APPLICABLE="N/A";A.NAME="name";A.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT="edfs__PublishResult!";A.NON_NULLABLE_BOOLEAN="Boolean!";A.NON_NULLABLE_INT="Int!";A.NON_NULLABLE_STRING="String!";A.NOT_UPPER="NOT";A.NULL="Null";A.ONE_OF="oneOf";A.OPERATION_TO_DEFAULT="operationTypeNodeToDefaultType";A.OBJECT="Object";A.OBJECT_UPPER="OBJECT";A.OR_UPPER="OR";A.OVERRIDE="override";A.PARENT_DEFINITION_DATA="parentDefinitionDataByTypeName";A.PARENT_DEFINITION_DATA_MAP="parentDefinitionDataByParentTypeName";A.PARENT_EXTENSION_DATA_MAP="parentExtensionDataByParentTypeName";A.PERIOD=".";A.PROVIDER_ID="providerId";A.PROVIDES="provides";A.PUBLISH="publish";A.QUERY="Query";A.QUERY_UPPER="QUERY";A.QUOTATION_JOIN='", "';A.REASON="reason";A.REQUEST="request";A.REQUIRE_FETCH_REASONS="openfed__requireFetchReasons";A.REQUIRES="requires";A.REQUIRES_SCOPES="requiresScopes";A.RESOLVABLE="resolvable";A.SCALAR="Scalar";A.SCALAR_UPPER="SCALAR";A.SCHEMA="schema";A.SCHEMA_UPPER="SCHEMA";A.SCOPES="scopes";A.SCOPE_SCALAR="openfed__Scope";A.SECURITY="SECURITY";A.SELECTION_REPRESENTATION=" { ... }";A.SEMANTIC_NON_NULL="semanticNonNull";A.SERVICE_OBJECT="_Service";A.SERVICE_FIELD="_service";A.SHAREABLE="shareable";A.SPECIFIED_BY="specifiedBy";A.STREAM_CONFIGURATION="streamConfiguration";A.STREAM_NAME="streamName";A.STRING="string";A.STRING_SCALAR="String";A.SUBJECT="subject";A.SUBJECTS="subjects";A.SUBSCRIPTION="Subscription";A.SUBSCRIPTION_FIELD_CONDITION="openfed__SubscriptionFieldCondition";A.SUBSCRIPTION_FILTER="openfed__subscriptionFilter";A.SUBSCRIPTION_FILTER_CONDITION="openfed__SubscriptionFilterCondition";A.SUBSCRIPTION_FILTER_VALUE="openfed__SubscriptionFilterValue";A.SUBSCRIBE="subscribe";A.SUBSCRIPTION_UPPER="SUBSCRIPTION";A.SUCCESS="success";A.TAG="tag";A.TOPIC="topic";A.TOPICS="topics";A.UNION="Union";A.UNION_UPPER="UNION";A.URL_LOWER="url";A.VALUES="values";A.VARIABLE_DEFINITION_UPPER="VARIABLE_DEFINITION";A.EXECUTABLE_DIRECTIVE_LOCATIONS=new Set([A.FIELD_UPPER,A.FRAGMENT_DEFINITION_UPPER,A.FRAGMENT_SPREAD_UPPER,A.INLINE_FRAGMENT_UPPER,A.MUTATION_UPPER,A.QUERY_UPPER,A.SUBSCRIPTION_UPPER]);A.ROOT_TYPE_NAMES=new Set([A.MUTATION,A.QUERY,A.SUBSCRIPTION]);A.AUTHORIZATION_DIRECTIVES=new Set([A.AUTHENTICATED,A.REQUIRES_SCOPES]);A.PERSISTED_CLIENT_DIRECTIVES=new Set([A.DEPRECATED,A.ONE_OF,A.SEMANTIC_NON_NULL]);A.INHERITABLE_DIRECTIVE_NAMES=new Set([A.EXTERNAL,A.REQUIRE_FETCH_REASONS,A.SHAREABLE]);A.IGNORED_FIELDS=new Set([A.ENTITIES_FIELD,A.SERVICE_FIELD]);A.INPUT_NODE_KINDS=new Set([cu.Kind.ENUM_TYPE_DEFINITION,cu.Kind.INPUT_OBJECT_TYPE_DEFINITION,cu.Kind.SCALAR_TYPE_DEFINITION]);A.OUTPUT_NODE_KINDS=new Set([cu.Kind.ENUM_TYPE_DEFINITION,cu.Kind.INTERFACE_TYPE_DEFINITION,cu.Kind.OBJECT_TYPE_DEFINITION,cu.Kind.SCALAR_TYPE_DEFINITION,cu.Kind.UNION_TYPE_DEFINITION]);A.NON_REPEATABLE_PERSISTED_DIRECTIVES=new Set([A.INACCESSIBLE,A.ONE_OF,A.SEMANTIC_NON_NULL])});var Hr=w(Qn=>{"use strict";m();T();N();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.operationTypeNodeToDefaultType=void 0;Qn.isObjectLikeNodeEntity=_9;Qn.isNodeInterfaceObject=v9;Qn.stringToNameNode=kN;Qn.stringArrayToNameNodeArray=S9;Qn.setToNameNodeArray=O9;Qn.stringToNamedTypeNode=AC;Qn.setToNamedTypeNodeArray=D9;Qn.nodeKindToDirectiveLocation=b9;Qn.isKindAbstract=A9;Qn.extractExecutableDirectiveLocations=R9;Qn.formatDescription=P9;Qn.lexicographicallySortArgumentNodes=RC;Qn.lexicographicallySortSelectionSetNode=UN;Qn.lexicographicallySortDocumentNode=F9;Qn.parse=PC;Qn.safeParse=w9;var xt=Ae(),Sn=vr();function _9(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===Sn.KEY)return!0;return!1}function v9(e){var t;if(!((t=e.directives)!=null&&t.length))return!1;for(let n of e.directives)if(n.name.value===Sn.INTERFACE_OBJECT)return!0;return!1}function kN(e){return{kind:xt.Kind.NAME,value:e}}function S9(e){let t=[];for(let n of e)t.push(kN(n));return t}function O9(e){let t=[];for(let n of e)t.push(kN(n));return t}function AC(e){return{kind:xt.Kind.NAMED_TYPE,name:kN(e)}}function D9(e){let t=[];for(let n of e)t.push(AC(n));return t}function b9(e){switch(e){case xt.Kind.ARGUMENT:return Sn.ARGUMENT_DEFINITION_UPPER;case xt.Kind.ENUM_TYPE_DEFINITION:case xt.Kind.ENUM_TYPE_EXTENSION:return Sn.ENUM_UPPER;case xt.Kind.ENUM_VALUE_DEFINITION:return Sn.ENUM_VALUE_UPPER;case xt.Kind.FIELD_DEFINITION:return Sn.FIELD_DEFINITION_UPPER;case xt.Kind.FRAGMENT_DEFINITION:return Sn.FRAGMENT_DEFINITION_UPPER;case xt.Kind.FRAGMENT_SPREAD:return Sn.FRAGMENT_SPREAD_UPPER;case xt.Kind.INLINE_FRAGMENT:return Sn.INLINE_FRAGMENT_UPPER;case xt.Kind.INPUT_VALUE_DEFINITION:return Sn.INPUT_FIELD_DEFINITION_UPPER;case xt.Kind.INPUT_OBJECT_TYPE_DEFINITION:case xt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return Sn.INPUT_OBJECT_UPPER;case xt.Kind.INTERFACE_TYPE_DEFINITION:case xt.Kind.INTERFACE_TYPE_EXTENSION:return Sn.INTERFACE_UPPER;case xt.Kind.OBJECT_TYPE_DEFINITION:case xt.Kind.OBJECT_TYPE_EXTENSION:return Sn.OBJECT_UPPER;case xt.Kind.SCALAR_TYPE_DEFINITION:case xt.Kind.SCALAR_TYPE_EXTENSION:return Sn.SCALAR_UPPER;case xt.Kind.SCHEMA_DEFINITION:case xt.Kind.SCHEMA_EXTENSION:return Sn.SCHEMA_UPPER;case xt.Kind.UNION_TYPE_DEFINITION:case xt.Kind.UNION_TYPE_EXTENSION:return Sn.UNION_UPPER;default:return e}}Qn.operationTypeNodeToDefaultType=new Map([[xt.OperationTypeNode.MUTATION,Sn.MUTATION],[xt.OperationTypeNode.QUERY,Sn.QUERY],[xt.OperationTypeNode.SUBSCRIPTION,Sn.SUBSCRIPTION]]);function A9(e){return e===xt.Kind.INTERFACE_TYPE_DEFINITION||e===xt.Kind.UNION_TYPE_DEFINITION}function R9(e,t){for(let n of e){let r=n.value;Sn.EXECUTABLE_DIRECTIVE_LOCATIONS.has(r)&&t.add(r)}return t}function P9(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(x({},e),{value:t,block:!0})}function RC(e){return e.arguments?e.arguments.sort((n,r)=>n.name.value.localeCompare(r.name.value)):e.arguments}function UN(e){let t=e.selections;return Q(x({},e),{selections:t.sort((n,r)=>{var a,o,c,l;return Sn.NAME in n?Sn.NAME in r?n.name.value.localeCompare(r.name.value):-1:Sn.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 xt.Kind.FIELD:return Q(x({},n),{arguments:RC(n),selectionSet:n.selectionSet?UN(n.selectionSet):n.selectionSet});case xt.Kind.FRAGMENT_SPREAD:return n;case xt.Kind.INLINE_FRAGMENT:return Q(x({},n),{selectionSet:UN(n.selectionSet)})}})})}function F9(e){return Q(x({},e),{definitions:e.definitions.map(t=>t.kind!==xt.Kind.OPERATION_DEFINITION?t:Q(x({},t),{selectionSet:UN(t.selectionSet)}))})}function PC(e,t=!0){return(0,xt.parse)(e,{noLocation:t})}function w9(e,t=!0){try{return{documentNode:PC(e,t)}}catch(n){return{error:n}}}});var LC=w(yl=>{"use strict";m();T();N();Object.defineProperty(yl,"__esModule",{value:!0});yl.AccumulatorMap=void 0;yl.mapValue=hl;yl.extendSchemaImpl=L9;var Ue=Ae(),vs=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)}};yl.AccumulatorMap=vs;function hl(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}function L9(e,t,n){var De,ve,Ce,vt;let r=[],i=new vs,a=new vs,o=new vs,c=new vs,l=new vs,d=new vs,f=[],y,I=[],v=!1;for(let Y of t.definitions){switch(Y.kind){case Ue.Kind.SCHEMA_DEFINITION:y=Y;break;case Ue.Kind.SCHEMA_EXTENSION:I.push(Y);break;case Ue.Kind.DIRECTIVE_DEFINITION:f.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 F=new Map;for(let Y of e.types){let oe=ie(Y);oe&&F.set(Y.name,oe)}for(let Y of r){let oe=Y.name.value;F.set(oe,(De=FC.get(oe))!=null?De:ue(Y))}for(let[Y,oe]of a)F.set(Y,new Ue.GraphQLObjectType({name:Y,interfaces:()=>zt(oe),fields:()=>mn(oe),extensionASTNodes:oe}));if(n!=null&&n.addInvalidExtensionOrphans){for(let[Y,oe]of o)F.set(Y,new Ue.GraphQLInterfaceType({name:Y,interfaces:()=>zt(oe),fields:()=>mn(oe),extensionASTNodes:oe}));for(let[Y,oe]of l)F.set(Y,new Ue.GraphQLEnumType({name:Y,values:kn(oe),extensionASTNodes:oe}));for(let[Y,oe]of c)F.set(Y,new Ue.GraphQLUnionType({name:Y,types:()=>An(oe),extensionASTNodes:oe}));for(let[Y,oe]of i)F.set(Y,new Ue.GraphQLScalarType({name:Y,extensionASTNodes:oe}));for(let[Y,oe]of d)F.set(Y,new Ue.GraphQLInputObjectType({name:Y,fields:()=>Fr(oe),extensionASTNodes:oe}))}let k=x(x({query:e.query&&J(e.query),mutation:e.mutation&&J(e.mutation),subscription:e.subscription&&J(e.subscription)},y&&en([y])),en(I));return Q(x({description:(Ce=(ve=y==null?void 0:y.description)==null?void 0:ve.value)!=null?Ce:e.description},k),{types:Array.from(F.values()),directives:[...e.directives.map(se),...f.map(Qt)],extensions:e.extensions,astNode:y!=null?y:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(I),assumeValid:(vt=n==null?void 0:n.assumeValid)!=null?vt:!1});function K(Y){return(0,Ue.isListType)(Y)?new Ue.GraphQLList(K(Y.ofType)):(0,Ue.isNonNullType)(Y)?new Ue.GraphQLNonNull(K(Y.ofType)):J(Y)}function J(Y){return F.get(Y.name)}function se(Y){if((0,Ue.isSpecifiedDirective)(Y))return Y;let oe=Y.toConfig();return new Ue.GraphQLDirective(Q(x({},oe),{args:hl(oe.args,_t)}))}function ie(Y){if((0,Ue.isIntrospectionType)(Y)||(0,Ue.isSpecifiedScalarType)(Y))return Y;if((0,Ue.isScalarType)(Y))return Re(Y);if((0,Ue.isObjectType)(Y))return xe(Y);if((0,Ue.isInterfaceType)(Y))return tt(Y);if((0,Ue.isUnionType)(Y))return ee(Y);if((0,Ue.isEnumType)(Y))return de(Y);if((0,Ue.isInputObjectType)(Y))return Te(Y)}function Te(Y){var Ye;let oe=Y.toConfig(),qe=(Ye=d.get(oe.name))!=null?Ye:[];return new Ue.GraphQLInputObjectType(Q(x({},oe),{fields:()=>x(x({},hl(oe.fields,Ut=>Q(x({},Ut),{type:K(Ut.type)}))),Fr(qe)),extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function de(Y){var Ye;let oe=Y.toConfig(),qe=(Ye=l.get(Y.name))!=null?Ye:[];return new Ue.GraphQLEnumType(Q(x({},oe),{values:x(x({},oe.values),kn(qe)),extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function Re(Y){var Ut,nt;let oe=Y.toConfig(),qe=(Ut=i.get(oe.name))!=null?Ut:[],Ye=oe.specifiedByURL;for(let Rt of qe)Ye=(nt=wC(Rt))!=null?nt:Ye;return new Ue.GraphQLScalarType(Q(x({},oe),{specifiedByURL:Ye,extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function xe(Y){var Ye;let oe=Y.toConfig(),qe=(Ye=a.get(oe.name))!=null?Ye:[];return new Ue.GraphQLObjectType(Q(x({},oe),{interfaces:()=>[...Y.getInterfaces().map(J),...zt(qe)],fields:()=>x(x({},hl(oe.fields,Se)),mn(qe)),extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function tt(Y){var Ye;let oe=Y.toConfig(),qe=(Ye=o.get(oe.name))!=null?Ye:[];return new Ue.GraphQLInterfaceType(Q(x({},oe),{interfaces:()=>[...Y.getInterfaces().map(J),...zt(qe)],fields:()=>x(x({},hl(oe.fields,Se)),mn(qe)),extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function ee(Y){var Ye;let oe=Y.toConfig(),qe=(Ye=c.get(oe.name))!=null?Ye:[];return new Ue.GraphQLUnionType(Q(x({},oe),{types:()=>[...Y.getTypes().map(J),...An(qe)],extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function Se(Y){return Q(x({},Y),{type:K(Y.type),args:Y.args&&hl(Y.args,_t)})}function _t(Y){return Q(x({},Y),{type:K(Y.type)})}function en(Y){var qe;let oe={};for(let Ye of Y){let Ut=(qe=Ye.operationTypes)!=null?qe:[];for(let nt of Ut)oe[nt.operation]=tn(nt.type)}return oe}function tn(Y){var Ye;let oe=Y.name.value,qe=(Ye=FC.get(oe))!=null?Ye:F.get(oe);if(qe===void 0)throw new Error(`Unknown type: "${oe}".`);return qe}function bn(Y){return Y.kind===Ue.Kind.LIST_TYPE?new Ue.GraphQLList(bn(Y.type)):Y.kind===Ue.Kind.NON_NULL_TYPE?new Ue.GraphQLNonNull(bn(Y.type)):tn(Y)}function Qt(Y){var oe;return new Ue.GraphQLDirective({name:Y.name.value,description:(oe=Y.description)==null?void 0:oe.value,locations:Y.locations.map(({value:qe})=>qe),isRepeatable:Y.repeatable,args:Pr(Y.arguments),astNode:Y})}function mn(Y){var qe,Ye;let oe=Object.create(null);for(let Ut of Y){let nt=(qe=Ut.fields)!=null?qe:[];for(let Rt of nt)oe[Rt.name.value]={type:bn(Rt.type),description:(Ye=Rt.description)==null?void 0:Ye.value,args:Pr(Rt.arguments),deprecationReason:MN(Rt),astNode:Rt}}return oe}function Pr(Y){var Ye;let oe=Y!=null?Y:[],qe=Object.create(null);for(let Ut of oe){let nt=bn(Ut.type);qe[Ut.name.value]={type:nt,description:(Ye=Ut.description)==null?void 0:Ye.value,defaultValue:(0,Ue.valueFromAST)(Ut.defaultValue,nt),deprecationReason:MN(Ut),astNode:Ut}}return qe}function Fr(Y){var qe,Ye;let oe=Object.create(null);for(let Ut of Y){let nt=(qe=Ut.fields)!=null?qe:[];for(let Rt of nt){let ns=bn(Rt.type);oe[Rt.name.value]={type:ns,description:(Ye=Rt.description)==null?void 0:Ye.value,defaultValue:(0,Ue.valueFromAST)(Rt.defaultValue,ns),deprecationReason:MN(Rt),astNode:Rt}}}return oe}function kn(Y){var qe,Ye;let oe=Object.create(null);for(let Ut of Y){let nt=(qe=Ut.values)!=null?qe:[];for(let Rt of nt)oe[Rt.name.value]={description:(Ye=Rt.description)==null?void 0:Ye.value,deprecationReason:MN(Rt),astNode:Rt}}return oe}function zt(Y){return Y.flatMap(oe=>{var qe,Ye;return(Ye=(qe=oe.interfaces)==null?void 0:qe.map(tn))!=null?Ye:[]})}function An(Y){return Y.flatMap(oe=>{var qe,Ye;return(Ye=(qe=oe.types)==null?void 0:qe.map(tn))!=null?Ye:[]})}function ue(Y){var qe,Ye,Ut,nt,Rt,ns,Vr,rs,Mc,ga,mr,ni;let oe=Y.name.value;switch(Y.kind){case Ue.Kind.OBJECT_TYPE_DEFINITION:{let Vt=(qe=a.get(oe))!=null?qe:[],Nr=[Y,...Vt];return a.delete(oe),new Ue.GraphQLObjectType({name:oe,description:(Ye=Y.description)==null?void 0:Ye.value,interfaces:()=>zt(Nr),fields:()=>mn(Nr),astNode:Y,extensionASTNodes:Vt})}case Ue.Kind.INTERFACE_TYPE_DEFINITION:{let Vt=(Ut=o.get(oe))!=null?Ut:[],Nr=[Y,...Vt];return o.delete(oe),new Ue.GraphQLInterfaceType({name:oe,description:(nt=Y.description)==null?void 0:nt.value,interfaces:()=>zt(Nr),fields:()=>mn(Nr),astNode:Y,extensionASTNodes:Vt})}case Ue.Kind.ENUM_TYPE_DEFINITION:{let Vt=(Rt=l.get(oe))!=null?Rt:[],Nr=[Y,...Vt];return l.delete(oe),new Ue.GraphQLEnumType({name:oe,description:(ns=Y.description)==null?void 0:ns.value,values:kn(Nr),astNode:Y,extensionASTNodes:Vt})}case Ue.Kind.UNION_TYPE_DEFINITION:{let Vt=(Vr=c.get(oe))!=null?Vr:[],Nr=[Y,...Vt];return c.delete(oe),new Ue.GraphQLUnionType({name:oe,description:(rs=Y.description)==null?void 0:rs.value,types:()=>An(Nr),astNode:Y,extensionASTNodes:Vt})}case Ue.Kind.SCALAR_TYPE_DEFINITION:{let Vt=(Mc=i.get(oe))!=null?Mc:[];return i.delete(oe),new Ue.GraphQLScalarType({name:oe,description:(ga=Y.description)==null?void 0:ga.value,specifiedByURL:wC(Y),astNode:Y,extensionASTNodes:Vt})}case Ue.Kind.INPUT_OBJECT_TYPE_DEFINITION:{let Vt=(mr=d.get(oe))!=null?mr:[],Nr=[Y,...Vt];return d.delete(oe),new Ue.GraphQLInputObjectType({name:oe,description:(ni=Y.description)==null?void 0:ni.value,fields:()=>Fr(Nr),astNode:Y,extensionASTNodes:Vt})}}}}var FC=new Map([...Ue.specifiedScalarTypes,...Ue.introspectionTypes].map(e=>[e.name,e]));function MN(e){let t=(0,Ue.getDirectiveValues)(Ue.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function wC(e){let t=(0,Ue.getDirectiveValues)(Ue.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}});var Dv=w(Ov=>{"use strict";m();T();N();Object.defineProperty(Ov,"__esModule",{value:!0});Ov.buildASTSchema=U9;var CC=Ae(),C9=Nl(),B9=LC();function U9(e,t){(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,B9.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,...CC.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new CC.GraphQLSchema(Q(x({},r),{directives:i}))}});var Il=w(lu=>{"use strict";m();T();N();Object.defineProperty(lu,"__esModule",{value:!0});lu.MAX_INT32=lu.MAX_SUBSCRIPTION_FILTER_DEPTH=lu.MAXIMUM_TYPE_NESTING=void 0;lu.MAXIMUM_TYPE_NESTING=30;lu.MAX_SUBSCRIPTION_FILTER_DEPTH=5;lu.MAX_INT32=un(2,31)-1});var Sr=w(lr=>{"use strict";m();T();N();Object.defineProperty(lr,"__esModule",{value:!0});lr.getOrThrowError=M9;lr.getEntriesNotInHashSet=x9;lr.numberToOrdinal=q9;lr.addIterableValuesToSet=V9;lr.addSets=j9;lr.kindToNodeType=K9;lr.getValueOrDefault=G9;lr.add=$9;lr.generateSimpleDirective=Q9;lr.generateRequiresScopesDirective=Y9;lr.generateSemanticNonNullDirective=J9;lr.copyObjectValueMap=H9;lr.addNewObjectValueMapEntries=z9;lr.copyArrayValueMap=W9;lr.addMapEntries=X9;lr.getFirstEntry=Z9;var Kt=Ae(),cr=vr(),k9=Mi(),vp=Hr();function M9(e,t,n){let r=e.get(t);if(r===void 0)throw(0,k9.invalidKeyFatalError)(t,n);return r}function x9(e,t){let n=[];for(let r of e)t.has(r)||n.push(r);return n}function q9(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 V9(e,t){for(let n of e)t.add(n)}function j9(e,t){let n=new Set(e);for(let r of t)n.add(r);return n}function K9(e){switch(e){case Kt.Kind.BOOLEAN:return cr.BOOLEAN_SCALAR;case Kt.Kind.ENUM:case Kt.Kind.ENUM_TYPE_DEFINITION:return cr.ENUM;case Kt.Kind.ENUM_TYPE_EXTENSION:return"Enum extension";case Kt.Kind.ENUM_VALUE_DEFINITION:return cr.ENUM_VALUE;case Kt.Kind.FIELD_DEFINITION:return cr.FIELD;case Kt.Kind.FLOAT:return cr.FLOAT_SCALAR;case Kt.Kind.INPUT_OBJECT_TYPE_DEFINITION:return cr.INPUT_OBJECT;case Kt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"Input Object extension";case Kt.Kind.INPUT_VALUE_DEFINITION:return cr.INPUT_VALUE;case Kt.Kind.INT:return cr.INT_SCALAR;case Kt.Kind.INTERFACE_TYPE_DEFINITION:return cr.INTERFACE;case Kt.Kind.INTERFACE_TYPE_EXTENSION:return"Interface extension";case Kt.Kind.NULL:return cr.NULL;case Kt.Kind.OBJECT:case Kt.Kind.OBJECT_TYPE_DEFINITION:return cr.OBJECT;case Kt.Kind.OBJECT_TYPE_EXTENSION:return"Object extension";case Kt.Kind.STRING:return cr.STRING_SCALAR;case Kt.Kind.SCALAR_TYPE_DEFINITION:return cr.SCALAR;case Kt.Kind.SCALAR_TYPE_EXTENSION:return"Scalar extension";case Kt.Kind.UNION_TYPE_DEFINITION:return cr.UNION;case Kt.Kind.UNION_TYPE_EXTENSION:return"Union extension";default:return e}}function G9(e,t,n){let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i}function $9(e,t){return e.has(t)?!1:(e.add(t),!0)}function Q9(e){return{kind:Kt.Kind.DIRECTIVE,name:(0,vp.stringToNameNode)(e)}}function Y9(e){let t=[];for(let n of e){let r=[];for(let i of n)r.push({kind:Kt.Kind.STRING,value:i});t.push({kind:Kt.Kind.LIST,values:r})}return{kind:Kt.Kind.DIRECTIVE,name:(0,vp.stringToNameNode)(cr.REQUIRES_SCOPES),arguments:[{kind:Kt.Kind.ARGUMENT,name:(0,vp.stringToNameNode)(cr.SCOPES),value:{kind:Kt.Kind.LIST,values:t}}]}}function J9(e){let t=Array.from(e).sort((r,i)=>r-i),n=new Array;for(let r of t)n.push({kind:Kt.Kind.INT,value:r.toString()});return{kind:Kt.Kind.DIRECTIVE,name:(0,vp.stringToNameNode)(cr.SEMANTIC_NON_NULL),arguments:[{kind:Kt.Kind.ARGUMENT,name:(0,vp.stringToNameNode)(cr.LEVELS),value:{kind:Kt.Kind.LIST,values:n}}]}}function H9(e){let t=new Map;for(let[n,r]of e)t.set(n,x({},r));return t}function z9(e,t){for(let[n,r]of e)t.set(n,x({},r))}function W9(e){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function X9(e,t){for(let[n,r]of e)t.set(n,r)}function Z9(e){let{value:t,done:n}=e.values().next();if(!n)return t}});var Sp=w(xN=>{"use strict";m();T();N();Object.defineProperty(xN,"__esModule",{value:!0});xN.ExtensionType=void 0;var BC;(function(e){e[e.EXTENDS=0]="EXTENDS",e[e.NONE=1]="NONE",e[e.REAL=2]="REAL"})(BC||(xN.ExtensionType=BC={}))});var du=w(Dr=>{"use strict";m();T();N();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.getMutableDirectiveDefinitionNode=t7;Dr.getMutableEnumNode=n7;Dr.getMutableEnumValueNode=r7;Dr.getMutableFieldNode=i7;Dr.getMutableInputObjectNode=a7;Dr.getMutableInputValueNode=s7;Dr.getMutableInterfaceNode=o7;Dr.getMutableObjectNode=u7;Dr.getMutableObjectExtensionNode=c7;Dr.getMutableScalarNode=l7;Dr.getMutableTypeNode=bv;Dr.getMutableUnionNode=d7;Dr.getTypeNodeNamedTypeName=Av;Dr.getNamedTypeNode=kC;var Or=Ae(),gl=Hr(),UC=Mi(),e7=Il();function t7(e){return{arguments:[],kind:e.kind,locations:[],name:x({},e.name),repeatable:e.repeatable,description:(0,gl.formatDescription)(e.description)}}function n7(e){return{kind:Or.Kind.ENUM_TYPE_DEFINITION,name:x({},e)}}function r7(e){return{directives:[],kind:e.kind,name:x({},e.name),description:(0,gl.formatDescription)(e.description)}}function i7(e,t,n){return{arguments:[],directives:[],kind:e.kind,name:x({},e.name),type:bv(e.type,t,n),description:(0,gl.formatDescription)(e.description)}}function a7(e){return{kind:Or.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:x({},e)}}function s7(e,t,n){return{directives:[],kind:e.kind,name:x({},e.name),type:bv(e.type,t,n),defaultValue:e.defaultValue,description:(0,gl.formatDescription)(e.description)}}function o7(e){return{kind:Or.Kind.INTERFACE_TYPE_DEFINITION,name:x({},e)}}function u7(e){return{kind:Or.Kind.OBJECT_TYPE_DEFINITION,name:x({},e)}}function c7(e){let t=e.kind===Or.Kind.OBJECT_TYPE_DEFINITION?e.description:void 0;return{kind:Or.Kind.OBJECT_TYPE_EXTENSION,name:x({},e.name),description:(0,gl.formatDescription)(t)}}function l7(e){return{kind:Or.Kind.SCALAR_TYPE_DEFINITION,name:x({},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(qN,"__esModule",{value:!0});qN.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=void 0;qN.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=30});var Ss=w(X=>{"use strict";m();T();N();Object.defineProperty(X,"__esModule",{value:!0});X.MAX_OR_SCOPES=X.EDFS_ARGS_REGEXP=X.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION=X.CONFIGURE_DESCRIPTION_DEFINITION=X.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION=X.SCOPE_SCALAR_DEFINITION=X.FIELD_SET_SCALAR_DEFINITION=X.VERSION_TWO_DIRECTIVE_DEFINITIONS=X.EVENT_DRIVEN_DIRECTIVE_DEFINITIONS_BY_DIRECTIVE_NAME=X.BASE_DIRECTIVE_DEFINITIONS=X.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=X.SUBSCRIPTION_FIELD_CONDITION_DEFINITION=X.SUBSCRIPTION_FILTER_VALUE_DEFINITION=X.SUBSCRIPTION_FILTER_CONDITION_DEFINITION=X.SUBSCRIPTION_FILTER_DEFINITION=X.SHAREABLE_DEFINITION=X.SEMANTIC_NON_NULL_DEFINITION=X.REQUIRES_SCOPES_DEFINITION=X.REQUIRE_FETCH_REASONS_DEFINITION=X.OVERRIDE_DEFINITION=X.ONE_OF_DEFINITION=X.LINK_DEFINITION=X.LINK_PURPOSE_DEFINITION=X.LINK_IMPORT_DEFINITION=X.INTERFACE_OBJECT_DEFINITION=X.INACCESSIBLE_DEFINITION=X.COMPOSE_DIRECTIVE_DEFINITION=X.AUTHENTICATED_DEFINITION=X.ALL_IN_BUILT_DIRECTIVE_NAMES=X.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=X.EDFS_REDIS_SUBSCRIBE_DEFINITION=X.EDFS_REDIS_PUBLISH_DEFINITION=X.TAG_DEFINITION=X.SPECIFIED_BY_DEFINITION=X.REQUIRES_DEFINITION=X.PROVIDES_DEFINITION=X.KEY_DEFINITION=X.REQUIRED_FIELDSET_TYPE_NODE=X.EDFS_NATS_SUBSCRIBE_DEFINITION=X.EDFS_NATS_REQUEST_DEFINITION=X.EDFS_NATS_PUBLISH_DEFINITION=X.EDFS_KAFKA_SUBSCRIBE_DEFINITION=X.EDFS_KAFKA_PUBLISH_DEFINITION=X.EXTERNAL_DEFINITION=X.EXTENDS_DEFINITION=X.DEPRECATED_DEFINITION=X.BASE_SCALARS=X.REQUIRED_STRING_TYPE_NODE=void 0;var ae=Ae(),re=Hr(),p7=Rv(),U=vr();X.REQUIRED_STRING_TYPE_NODE={kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)};X.BASE_SCALARS=new Set(["_Any","_Entities",U.BOOLEAN_SCALAR,U.FLOAT_SCALAR,U.ID_SCALAR,U.INT_SCALAR,U.FIELD_SET_SCALAR,U.SCOPE_SCALAR,U.STRING_SCALAR]);X.DEPRECATED_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.REASON),type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR),defaultValue:{kind:ae.Kind.STRING,value:ae.DEFAULT_DEPRECATION_REASON}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ARGUMENT_DEFINITION_UPPER,U.ENUM_VALUE_UPPER,U.FIELD_DEFINITION_UPPER,U.INPUT_FIELD_DEFINITION_UPPER]),name:(0,re.stringToNameNode)(U.DEPRECATED),repeatable:!1};X.EXTENDS_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.INTERFACE_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.EXTENDS),repeatable:!1};X.EXTERNAL_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.EXTERNAL),repeatable:!1};X.EDFS_KAFKA_PUBLISH_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.TOPIC),type:X.REQUIRED_STRING_TYPE_NODE},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_KAFKA_PUBLISH),repeatable:!1};X.EDFS_KAFKA_SUBSCRIBE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.TOPICS),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:X.REQUIRED_STRING_TYPE_NODE}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_KAFKA_SUBSCRIBE),repeatable:!1};X.EDFS_NATS_PUBLISH_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBJECT),type:X.REQUIRED_STRING_TYPE_NODE},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)},defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_NATS_PUBLISH),repeatable:!1};X.EDFS_NATS_REQUEST_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBJECT),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)},defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_NATS_REQUEST),repeatable:!1};X.EDFS_NATS_SUBSCRIBE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBJECTS),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:X.REQUIRED_STRING_TYPE_NODE}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.STREAM_CONFIGURATION),type:(0,re.stringToNamedTypeNode)(U.EDFS_NATS_STREAM_CONFIGURATION)}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_NATS_SUBSCRIBE),repeatable:!1};X.REQUIRED_FIELDSET_TYPE_NODE={kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.FIELD_SET_SCALAR)};X.KEY_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELDS),type:X.REQUIRED_FIELDSET_TYPE_NODE},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.RESOLVABLE),type:(0,re.stringToNamedTypeNode)(U.BOOLEAN_SCALAR),defaultValue:{kind:ae.Kind.BOOLEAN,value:!0}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.INTERFACE_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.KEY),repeatable:!0};X.PROVIDES_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELDS),type:X.REQUIRED_FIELDSET_TYPE_NODE}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.PROVIDES),repeatable:!1};X.REQUIRES_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELDS),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.FIELD_SET_SCALAR)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.REQUIRES),repeatable:!1};X.SPECIFIED_BY_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.URL_LOWER),type:X.REQUIRED_STRING_TYPE_NODE}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.SCALAR_UPPER]),name:(0,re.stringToNameNode)(U.SPECIFIED_BY),repeatable:!1};X.TAG_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.NAME),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ARGUMENT_DEFINITION_UPPER,U.ENUM_UPPER,U.ENUM_VALUE_UPPER,U.FIELD_DEFINITION_UPPER,U.INPUT_FIELD_DEFINITION_UPPER,U.INPUT_OBJECT_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER,U.UNION_UPPER]),name:(0,re.stringToNameNode)(U.TAG),repeatable:!0};X.EDFS_REDIS_PUBLISH_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CHANNEL),type:X.REQUIRED_STRING_TYPE_NODE},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_REDIS_PUBLISH),repeatable:!1};X.EDFS_REDIS_SUBSCRIBE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CHANNELS),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:X.REQUIRED_STRING_TYPE_NODE}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_REDIS_SUBSCRIBE),repeatable:!1};X.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=new Map([[U.DEPRECATED,X.DEPRECATED_DEFINITION],[U.EXTENDS,X.EXTENDS_DEFINITION],[U.EXTERNAL,X.EXTERNAL_DEFINITION],[U.EDFS_KAFKA_PUBLISH,X.EDFS_KAFKA_PUBLISH_DEFINITION],[U.EDFS_KAFKA_SUBSCRIBE,X.EDFS_KAFKA_SUBSCRIBE_DEFINITION],[U.EDFS_NATS_PUBLISH,X.EDFS_NATS_PUBLISH_DEFINITION],[U.EDFS_NATS_REQUEST,X.EDFS_NATS_REQUEST_DEFINITION],[U.EDFS_NATS_SUBSCRIBE,X.EDFS_NATS_SUBSCRIBE_DEFINITION],[U.EDFS_REDIS_PUBLISH,X.EDFS_REDIS_PUBLISH_DEFINITION],[U.EDFS_REDIS_SUBSCRIBE,X.EDFS_REDIS_SUBSCRIBE_DEFINITION],[U.KEY,X.KEY_DEFINITION],[U.PROVIDES,X.PROVIDES_DEFINITION],[U.REQUIRES,X.REQUIRES_DEFINITION],[U.SPECIFIED_BY,X.SPECIFIED_BY_DEFINITION],[U.TAG,X.TAG_DEFINITION]]);X.ALL_IN_BUILT_DIRECTIVE_NAMES=new Set([U.AUTHENTICATED,U.COMPOSE_DIRECTIVE,U.CONFIGURE_DESCRIPTION,U.CONFIGURE_CHILD_DESCRIPTIONS,U.DEPRECATED,U.EDFS_NATS_PUBLISH,U.EDFS_NATS_REQUEST,U.EDFS_NATS_SUBSCRIBE,U.EDFS_KAFKA_PUBLISH,U.EDFS_KAFKA_SUBSCRIBE,U.EDFS_REDIS_PUBLISH,U.EDFS_REDIS_SUBSCRIBE,U.EXTENDS,U.EXTERNAL,U.INACCESSIBLE,U.INTERFACE_OBJECT,U.KEY,U.LINK,U.ONE_OF,U.OVERRIDE,U.PROVIDES,U.REQUIRE_FETCH_REASONS,U.REQUIRES,U.REQUIRES_SCOPES,U.SEMANTIC_NON_NULL,U.SHAREABLE,U.SPECIFIED_BY,U.SUBSCRIPTION_FILTER,U.TAG]);X.AUTHENTICATED_DEFINITION={arguments:[],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ENUM_UPPER,U.FIELD_DEFINITION_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER]),name:(0,re.stringToNameNode)(U.AUTHENTICATED),repeatable:!1};X.COMPOSE_DIRECTIVE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.NAME),type:X.REQUIRED_STRING_TYPE_NODE}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.SCHEMA_UPPER]),name:(0,re.stringToNameNode)(U.COMPOSE_DIRECTIVE),repeatable:!0};X.INACCESSIBLE_DEFINITION={arguments:[],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ARGUMENT_DEFINITION_UPPER,U.ENUM_UPPER,U.ENUM_VALUE_UPPER,U.FIELD_DEFINITION_UPPER,U.INPUT_FIELD_DEFINITION_UPPER,U.INPUT_OBJECT_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER,U.UNION_UPPER]),name:(0,re.stringToNameNode)(U.INACCESSIBLE),repeatable:!1};X.INTERFACE_OBJECT_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.INTERFACE_OBJECT),repeatable:!1};X.LINK_IMPORT_DEFINITION={kind:ae.Kind.SCALAR_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.LINK_IMPORT)};X.LINK_PURPOSE_DEFINITION={kind:ae.Kind.ENUM_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.LINK_PURPOSE),values:[{directives:[],kind:ae.Kind.ENUM_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.EXECUTION)},{directives:[],kind:ae.Kind.ENUM_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SECURITY)}]};X.LINK_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.URL_LOWER),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.AS),type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FOR),type:(0,re.stringToNamedTypeNode)(U.LINK_PURPOSE)},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.IMPORT),type:{kind:ae.Kind.LIST_TYPE,type:(0,re.stringToNamedTypeNode)(U.LINK_IMPORT)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.SCHEMA_UPPER]),name:(0,re.stringToNameNode)(U.LINK),repeatable:!0};X.ONE_OF_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.INPUT_OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.ONE_OF),repeatable:!1};X.OVERRIDE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FROM),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER]),name:(0,re.stringToNameNode)(U.OVERRIDE),repeatable:!1};X.REQUIRE_FETCH_REASONS_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.REQUIRE_FETCH_REASONS),repeatable:!0};X.REQUIRES_SCOPES_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SCOPES),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.SCOPE_SCALAR)}}}}}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ENUM_UPPER,U.FIELD_DEFINITION_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER]),name:(0,re.stringToNameNode)(U.REQUIRES_SCOPES),repeatable:!1};X.SEMANTIC_NON_NULL_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.LEVELS),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.INT_SCALAR)}}},defaultValue:{kind:ae.Kind.LIST,values:[{kind:ae.Kind.INT,value:"0"}]}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.SEMANTIC_NON_NULL),repeatable:!1};X.SHAREABLE_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.SHAREABLE),repeatable:!0};X.SUBSCRIPTION_FILTER_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CONDITION),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_CONDITION)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER]),name:(0,re.stringToNameNode)(U.SUBSCRIPTION_FILTER),repeatable:!1};X.SUBSCRIPTION_FILTER_CONDITION_DEFINITION={fields:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.AND_UPPER),type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.IN_UPPER),type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FIELD_CONDITION)},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.OR_UPPER),type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.NOT_UPPER),type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_CONDITION)}],kind:ae.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBSCRIPTION_FILTER_CONDITION)};X.SUBSCRIPTION_FILTER_VALUE_DEFINITION={kind:ae.Kind.SCALAR_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBSCRIPTION_FILTER_VALUE)};X.SUBSCRIPTION_FIELD_CONDITION_DEFINITION={fields:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELD_PATH),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.VALUES),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_VALUE)}}}],kind:ae.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBSCRIPTION_FIELD_CONDITION)};X.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=new Map([[U.AUTHENTICATED,X.AUTHENTICATED_DEFINITION],[U.COMPOSE_DIRECTIVE,X.COMPOSE_DIRECTIVE_DEFINITION],[U.INACCESSIBLE,X.INACCESSIBLE_DEFINITION],[U.INTERFACE_OBJECT,X.INTERFACE_OBJECT_DEFINITION],[U.LINK,X.LINK_DEFINITION],[U.OVERRIDE,X.OVERRIDE_DEFINITION],[U.REQUIRES_SCOPES,X.REQUIRES_SCOPES_DEFINITION],[U.SHAREABLE,X.SHAREABLE_DEFINITION]]);X.BASE_DIRECTIVE_DEFINITIONS=[X.DEPRECATED_DEFINITION,X.EXTENDS_DEFINITION,X.EXTERNAL_DEFINITION,X.KEY_DEFINITION,X.PROVIDES_DEFINITION,X.REQUIRES_DEFINITION,X.SPECIFIED_BY_DEFINITION,X.TAG_DEFINITION];X.EVENT_DRIVEN_DIRECTIVE_DEFINITIONS_BY_DIRECTIVE_NAME=new Map([[U.EDFS_KAFKA_PUBLISH,X.EDFS_KAFKA_PUBLISH_DEFINITION],[U.EDFS_KAFKA_SUBSCRIBE,X.EDFS_KAFKA_SUBSCRIBE_DEFINITION],[U.EDFS_NATS_PUBLISH,X.EDFS_NATS_PUBLISH_DEFINITION],[U.EDFS_NATS_REQUEST,X.EDFS_NATS_REQUEST_DEFINITION],[U.EDFS_NATS_SUBSCRIBE,X.EDFS_NATS_SUBSCRIBE_DEFINITION],[U.EDFS_REDIS_PUBLISH,X.EDFS_REDIS_PUBLISH_DEFINITION],[U.EDFS_REDIS_SUBSCRIBE,X.EDFS_REDIS_SUBSCRIBE_DEFINITION]]);X.VERSION_TWO_DIRECTIVE_DEFINITIONS=[X.AUTHENTICATED_DEFINITION,X.COMPOSE_DIRECTIVE_DEFINITION,X.INACCESSIBLE_DEFINITION,X.INTERFACE_OBJECT_DEFINITION,X.OVERRIDE_DEFINITION,X.REQUIRES_SCOPES_DEFINITION,X.SHAREABLE_DEFINITION];X.FIELD_SET_SCALAR_DEFINITION={kind:ae.Kind.SCALAR_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELD_SET_SCALAR)};X.SCOPE_SCALAR_DEFINITION={kind:ae.Kind.SCALAR_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.SCOPE_SCALAR)};X.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION={kind:ae.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.EDFS_NATS_STREAM_CONFIGURATION),fields:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CONSUMER_NAME),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.STREAM_NAME),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CONSUMER_INACTIVE_THRESHOLD),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.INT_SCALAR)},defaultValue:{kind:ae.Kind.INT,value:p7.DEFAULT_CONSUMER_INACTIVE_THRESHOLD.toString()}}]};X.CONFIGURE_DESCRIPTION_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROPAGATE),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.BOOLEAN_SCALAR)},defaultValue:{kind:ae.Kind.BOOLEAN,value:!0}},{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.DESCRIPTION_OVERRIDE),type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ARGUMENT_DEFINITION_UPPER,U.ENUM_UPPER,U.ENUM_VALUE_UPPER,U.FIELD_DEFINITION_UPPER,U.INTERFACE_UPPER,U.INPUT_OBJECT_UPPER,U.INPUT_FIELD_DEFINITION_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER,U.SCHEMA_UPPER,U.UNION_UPPER]),name:(0,re.stringToNameNode)(U.CONFIGURE_DESCRIPTION),repeatable:!1};X.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROPAGATE),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.BOOLEAN_SCALAR)},defaultValue:{kind:ae.Kind.BOOLEAN,value:!0}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ENUM_UPPER,U.INPUT_OBJECT_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.CONFIGURE_CHILD_DESCRIPTIONS),repeatable:!1};X.EDFS_ARGS_REGEXP=/{{\s*args\.([a-zA-Z0-9_]+)\s*}}/g;X.MAX_OR_SCOPES=16});var VN=w(sc=>{"use strict";m();T();N();Object.defineProperty(sc,"__esModule",{value:!0});sc.newParentTagData=T7;sc.newChildTagData=E7;sc.validateImplicitFieldSets=h7;sc.newContractTagOptionsFromArrays=y7;sc.getDescriptionFromString=I7;var zr=Ae(),f7=du(),m7=Ss(),N7=Hr(),MC=Sr();function T7(e){return{childTagDataByChildName:new Map,tagNames:new Set,typeName:e}}function E7(e){return{name:e,tagNames:new Set,tagNamesByArgumentName:new Map}}function h7({conditionalFieldDataByCoords:e,currentSubgraphName:t,entityData:n,implicitKeys:r,objectData:i,parentDefinitionDataByTypeName:a,graphNode:o}){let c=(0,MC.getValueOrDefault)(n.keyFieldSetDatasBySubgraphName,t,()=>new Map);for(let[l,d]of n.documentNodeByKeyFieldSet){if(c.has(l))continue;let f=[i],y=[],I=[],v=-1,F=!0,k=!0;(0,zr.visit)(d,{Argument:{enter(){return k=!1,zr.BREAK}},Field:{enter(K){let J=f[v];if(F)return k=!1,zr.BREAK;let se=K.name.value,ie=J.fieldDataByName.get(se);if(!ie||ie.argumentDataByName.size||y[v].has(se))return k=!1,zr.BREAK;let{isUnconditionallyProvided:Te}=(0,MC.getOrThrowError)(ie.externalFieldDataBySubgraphName,t,`${ie.originalParentTypeName}.${se}.externalFieldDataBySubgraphName`),de=e.get(`${ie.renamedParentTypeName}.${se}`);if(de){if(de.providedBy.length>0)I.push(...de.providedBy);else if(de.requiredBy.length>0)return k=!1,zr.BREAK}else if(!Te)return k=!1,zr.BREAK;y[v].add(se);let Re=(0,f7.getTypeNodeNamedTypeName)(ie.node.type);if(m7.BASE_SCALARS.has(Re))return;let xe=a.get(Re);if(!xe)return k=!1,zr.BREAK;if(xe.kind===zr.Kind.OBJECT_TYPE_DEFINITION){F=!0,f.push(xe);return}if((0,N7.isKindAbstract)(xe.kind))return k=!1,zr.BREAK}},InlineFragment:{enter(){return k=!1,zr.BREAK}},SelectionSet:{enter(){if(!F||(v+=1,F=!1,v<0||v>=f.length))return k=!1,zr.BREAK;y.push(new Set)},leave(){if(F)return k=!1,zr.BREAK;v-=1,f.pop(),y.pop()}}}),k&&(r.push(Q(x({fieldName:"",selectionSet:l},I.length>0?{conditions:I}:{}),{disableEntityResolver:!0})),o&&o.satisfiedFieldSets.add(l))}}function y7(e,t){return{tagNamesToExclude:new Set(e),tagNamesToInclude:new Set(t)}}function I7(e){if(e)return{block:!0,kind:zr.Kind.STRING,value:e}}});var vl=w(mt=>{"use strict";m();T();N();Object.defineProperty(mt,"__esModule",{value:!0});mt.MergeMethod=void 0;mt.newPersistedDirectivesData=_7;mt.isNodeExternalOrShareable=v7;mt.isTypeRequired=S7;mt.areDefaultValuesCompatible=qC;mt.compareAndValidateInputValueDefaultValues=O7;mt.setMutualExecutableLocations=D7;mt.isTypeNameRootType=b7;mt.getRenamedRootTypeName=A7;mt.childMapToValueArray=P7;mt.setLongestDescription=F7;mt.isParentDataRootType=VC;mt.isInterfaceDefinitionData=w7;mt.setParentDataExtensionType=L7;mt.extractPersistedDirectives=U7;mt.propagateAuthDirectives=k7;mt.propagateFieldAuthDirectives=M7;mt.generateDeprecatedDirective=Lv;mt.getClientPersistedDirectiveNodes=Fv;mt.getNodeForRouterSchemaByData=q7;mt.getClientSchemaFieldNodeByFieldData=V7;mt.getNodeWithPersistedDirectivesByInputValueData=KC;mt.addValidPersistedDirectiveDefinitionNodeByData=K7;mt.newInvalidFieldNames=G7;mt.validateExternalAndShareable=$7;mt.isTypeValidImplementation=jN;mt.isNodeDataInaccessible=GC;mt.isLeafKind=Q7;mt.getSubscriptionFilterValue=Y7;mt.getParentTypeName=J7;mt.newConditionalFieldData=H7;mt.getDefinitionDataCoords=z7;mt.isParentDataCompositeOutputType=W7;mt.newExternalFieldData=X7;mt.getInitialFederatedDescription=Z7;mt.areKindsEqual=eZ;mt.isFieldData=Cv;mt.isInputNodeKind=tZ;mt.isOutputNodeKind=nZ;var st=Ae(),Pv=Sp(),_l=Hr(),wv=Mi(),Ct=vr(),oc=Sr(),g7=VN();function _7(){return{deprecatedReason:"",directivesByDirectiveName:new Map,isDeprecated:!1,tagDirectiveByName:new Map}}function v7(e,t,n){var i;let r={isExternal:n.has(Ct.EXTERNAL),isShareable:t||n.has(Ct.SHAREABLE)};if(!((i=e.directives)!=null&&i.length))return r;for(let a of e.directives){let o=a.name.value;if(o===Ct.EXTERNAL){r.isExternal=!0;continue}o===Ct.SHAREABLE&&(r.isShareable=!0)}return r}function S7(e){return e.kind===st.Kind.NON_NULL_TYPE}function qC(e,t){switch(e.kind){case st.Kind.LIST_TYPE:return t.kind===st.Kind.LIST||t.kind===st.Kind.NULL;case st.Kind.NAMED_TYPE:if(t.kind===st.Kind.NULL)return!0;switch(e.name.value){case Ct.BOOLEAN_SCALAR:return t.kind===st.Kind.BOOLEAN;case Ct.FLOAT_SCALAR:return t.kind===st.Kind.INT||t.kind===st.Kind.FLOAT;case Ct.INT_SCALAR:return t.kind===st.Kind.INT;case Ct.STRING_SCALAR:return t.kind===st.Kind.STRING;default:return!0}case st.Kind.NON_NULL_TYPE:return t.kind===st.Kind.NULL?!1:qC(e.type,t)}}function O7(e,t,n){if(!e.defaultValue)return;if(!t.defaultValue){e.includeDefaultValue=!1;return}let r=(0,st.print)(e.defaultValue),i=(0,st.print)(t.defaultValue);if(r!==i){n.push((0,wv.incompatibleInputValueDefaultValuesError)(`${e.isArgument?Ct.ARGUMENT:Ct.INPUT_FIELD} "${e.name}"`,e.originalCoords,[...t.subgraphNames],r,i));return}}function D7(e,t){let n=new Set;for(let r of t)e.executableLocations.has(r)&&n.add(r);e.executableLocations=n}function b7(e,t){return Ct.ROOT_TYPE_NAMES.has(e)||t.has(e)}function A7(e,t){let n=t.get(e);if(!n)return e;switch(n){case st.OperationTypeNode.MUTATION:return Ct.MUTATION;case st.OperationTypeNode.SUBSCRIPTION:return Ct.SUBSCRIPTION;default:return Ct.QUERY}}function R7(e){for(let t of e.argumentDataByName.values()){for(let n of t.directivesByDirectiveName.values())t.node.directives.push(...n);e.node.arguments.push(t.node)}}function P7(e){let t=[];for(let n of e.values()){Cv(n)&&R7(n);for(let r of n.directivesByDirectiveName.values())n.node.directives.push(...r);t.push(n.node)}return t}function F7(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.directivesByDirectiveName.set(Ct.REQUIRES_SCOPES,[(0,oc.generateRequiresScopesDirective)(t.requiredScopes)]))}function M7(e,t){if(!t)return;let n=t.fieldAuthDataByFieldName.get(e.name);n&&(n.originalData.requiresAuthentication&&e.persistedDirectivesData.directivesByDirectiveName.set(Ct.AUTHENTICATED,[(0,oc.generateSimpleDirective)(Ct.AUTHENTICATED)]),n.originalData.requiredScopes.length>0&&e.persistedDirectivesData.directivesByDirectiveName.set(Ct.REQUIRES_SCOPES,[(0,oc.generateRequiresScopesDirective)(n.originalData.requiredScopes)]))}function Lv(e){return{kind:st.Kind.DIRECTIVE,name:(0,_l.stringToNameNode)(Ct.DEPRECATED),arguments:[{kind:st.Kind.ARGUMENT,name:(0,_l.stringToNameNode)(Ct.REASON),value:{kind:st.Kind.STRING,value:e||Ct.DEPRECATED_DEFAULT_ARGUMENT_VALUE}}]}}function x7(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,wv.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}i.push(...o)}}return i}function jC(e,t,n){let r=[...e.persistedDirectivesData.tagDirectiveByName.values()];return e.persistedDirectivesData.isDeprecated&&r.push(Lv(e.persistedDirectivesData.deprecatedReason)),r.push(...x7(e.persistedDirectivesData.directivesByDirectiveName,t,e.name,n)),r}function Fv(e){var n;let t=[];e.persistedDirectivesData.isDeprecated&&t.push(Lv(e.persistedDirectivesData.deprecatedReason));for(let[r,i]of e.persistedDirectivesData.directivesByDirectiveName){if(r===Ct.SEMANTIC_NON_NULL&&Cv(e)){t.push((0,oc.generateSemanticNonNullDirective)((n=(0,oc.getFirstEntry)(e.nullLevelsBySubgraphName))!=null?n:new Set([0])));continue}Ct.PERSISTED_CLIENT_DIRECTIVES.has(r)&&t.push(i[0])}return t}function q7(e,t,n){return e.node.name=(0,_l.stringToNameNode)(e.name),e.node.description=e.description,e.node.directives=jC(e,t,n),e.node}function V7(e){let t=Fv(e),n=[];for(let r of e.argumentDataByName.values())GC(r)||n.push(Q(x({},r.node),{directives:Fv(r)}));return Q(x({},e.node),{directives:t,arguments:n})}function KC(e,t,n){return e.node.name=(0,_l.stringToNameNode)(e.name),e.node.type=e.type,e.node.description=e.description,e.node.directives=jC(e,t,n),e.includeDefaultValue&&(e.node.defaultValue=e.defaultValue),e.node}function j7(e,t,n,r,i){let a=[];for(let[o,c]of t.argumentDataByArgumentName){let l=(0,oc.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(KC(c,n,r)),i&&i.add(o)}return a.length>0?(r.push((0,wv.invalidRequiredInputValueError)(Ct.DIRECTIVE_DEFINITION,`@${t.name}`,a)),!1):!0}function K7(e,t,n,r){let i=[];j7(i,t,n,r)&&e.push({arguments:i,kind:st.Kind.DIRECTIVE_DEFINITION,locations:(0,_l.setToNameNodeArray)(t.executableLocations),name:(0,_l.stringToNameNode)(t.name),repeatable:t.repeatable,description:t.description})}function G7(){return{byShareable:new Set,subgraphNamesByExternalFieldName:new Map}}function $7(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 xC;(function(e){e[e.UNION=0]="UNION",e[e.INTERSECTION=1]="INTERSECTION",e[e.CONSISTENT=2]="CONSISTENT"})(xC||(mt.MergeMethod=xC={}));function jN(e,t,n){if(e.kind===st.Kind.NON_NULL_TYPE)return t.kind!==st.Kind.NON_NULL_TYPE?!1:jN(e.type,t.type,n);if(t.kind===st.Kind.NON_NULL_TYPE)return jN(e,t.type,n);switch(e.kind){case st.Kind.NAMED_TYPE:if(t.kind===st.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===st.Kind.LIST_TYPE?jN(e.type,t.type,n):!1}}function GC(e){return e.persistedDirectivesData.directivesByDirectiveName.has(Ct.INACCESSIBLE)||e.directivesByDirectiveName.has(Ct.INACCESSIBLE)}function Q7(e){return e===st.Kind.SCALAR_TYPE_DEFINITION||e===st.Kind.ENUM_TYPE_DEFINITION}function Y7(e){switch(e.kind){case st.Kind.BOOLEAN:return e.value;case st.Kind.ENUM:case st.Kind.STRING:return e.value;case st.Kind.FLOAT:case st.Kind.INT:try{return parseFloat(e.value)}catch(t){return"NaN"}case st.Kind.NULL:return null}}function J7(e){return e.kind===st.Kind.OBJECT_TYPE_DEFINITION&&e.renamedTypeName||e.name}function H7(){return{providedBy:[],requiredBy:[]}}function z7(e,t){switch(e.kind){case st.Kind.ENUM_VALUE_DEFINITION:return`${e.parentTypeName}.${e.name}`;case st.Kind.FIELD_DEFINITION:return`${t?e.renamedParentTypeName:e.originalParentTypeName}.${e.name}`;case st.Kind.ARGUMENT:case st.Kind.INPUT_VALUE_DEFINITION:return t?e.federatedCoords:e.originalCoords;case st.Kind.OBJECT_TYPE_DEFINITION:return t?e.renamedTypeName:e.name;default:return e.name}}function W7(e){return e.kind===st.Kind.OBJECT_TYPE_DEFINITION||e.kind===st.Kind.INTERFACE_TYPE_DEFINITION}function X7(e){return{isDefinedExternal:e,isUnconditionallyProvided:!e}}function Z7(e){let{value:t,done:n}=e.configureDescriptionDataBySubgraphName.values().next();if(n)return e.description;if(t.propagate)return(0,g7.getDescriptionFromString)(t.description)||e.description}function eZ(e,t){return e.kind===t.kind}function Cv(e){return e.kind===st.Kind.FIELD_DEFINITION}function tZ(e){return Ct.INPUT_NODE_KINDS.has(e)}function nZ(e){return Ct.OUTPUT_NODE_KINDS.has(e)}});var kv={};pm(kv,{__addDisposableResource:()=>dB,__assign:()=>KN,__asyncDelegator:()=>rB,__asyncGenerator:()=>nB,__asyncValues:()=>iB,__await:()=>Sl,__awaiter:()=>zC,__classPrivateFieldGet:()=>uB,__classPrivateFieldIn:()=>lB,__classPrivateFieldSet:()=>cB,__createBinding:()=>$N,__decorate:()=>YC,__disposeResources:()=>pB,__esDecorate:()=>rZ,__exportStar:()=>XC,__extends:()=>$C,__generator:()=>WC,__importDefault:()=>oB,__importStar:()=>sB,__makeTemplateObject:()=>aB,__metadata:()=>HC,__param:()=>JC,__propKey:()=>aZ,__read:()=>Uv,__rest:()=>QC,__runInitializers:()=>iZ,__setFunctionName:()=>sZ,__spread:()=>ZC,__spreadArray:()=>tB,__spreadArrays:()=>eB,__values:()=>GN,default:()=>cZ});function $C(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Bv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function QC(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 JC(e,t){return function(n,r){t(n,r,e)}}function rZ(e,t,n,r,i,a){function o(J){if(J!==void 0&&typeof J!="function")throw new TypeError("Function expected");return J}for(var c=r.kind,l=c==="getter"?"get":c==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,f=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),y,I=!1,v=n.length-1;v>=0;v--){var F={};for(var k in r)F[k]=k==="access"?{}:r[k];for(var k in r.access)F.access[k]=r.access[k];F.addInitializer=function(J){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(J||null))};var K=(0,n[v])(c==="accessor"?{get:f.get,set:f.set}:f[l],F);if(c==="accessor"){if(K===void 0)continue;if(K===null||typeof K!="object")throw new TypeError("Object expected");(y=o(K.get))&&(f.get=y),(y=o(K.set))&&(f.set=y),(y=o(K.init))&&i.unshift(y)}else(y=o(K))&&(c==="field"?i.unshift(y):f[l]=y)}d&&Object.defineProperty(d,r.name,f),I=!0}function iZ(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 Uv(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 ZC(){for(var e=[],t=0;t1||c(I,v)})})}function c(I,v){try{l(r[I](v))}catch(F){y(a[0][3],F)}}function l(I){I.value instanceof Sl?Promise.resolve(I.value.v).then(d,f):y(a[0][2],I)}function d(I){c("next",I)}function f(I){c("throw",I)}function y(I,v){I(v),a.shift(),a.length&&c(a[0][0],a[0][1])}}function rB(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:Sl(e[i](o)),done:!1}:a?a(o):o}:a}}function iB(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 GN=="function"?GN(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 aB(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function sB(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)&&$N(t,e,n);return oZ(t,e),t}function oB(e){return e&&e.__esModule?e:{default:e}}function uB(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 cB(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 lB(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 dB(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 pB(e){function t(r){e.error=e.hasError?new uZ(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 Bv,KN,$N,oZ,uZ,cZ,Mv=ku(()=>{"use strict";m();T();N();Bv=function(e,t){return Bv=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])},Bv(e,t)};KN=function(){return KN=Object.assign||function(t){for(var n,r=1,i=arguments.length;rLB,__assign:()=>QN,__asyncDelegator:()=>OB,__asyncGenerator:()=>SB,__asyncValues:()=>DB,__await:()=>Ol,__awaiter:()=>hB,__classPrivateFieldGet:()=>PB,__classPrivateFieldIn:()=>wB,__classPrivateFieldSet:()=>FB,__createBinding:()=>JN,__decorate:()=>NB,__disposeResources:()=>CB,__esDecorate:()=>lZ,__exportStar:()=>IB,__extends:()=>fB,__generator:()=>yB,__importDefault:()=>RB,__importStar:()=>AB,__makeTemplateObject:()=>bB,__metadata:()=>EB,__param:()=>TB,__propKey:()=>pZ,__read:()=>qv,__rest:()=>mB,__runInitializers:()=>dZ,__setFunctionName:()=>fZ,__spread:()=>gB,__spreadArray:()=>vB,__spreadArrays:()=>_B,__values:()=>YN,default:()=>TZ});function fB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function mB(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 TB(e,t){return function(n,r){t(n,r,e)}}function lZ(e,t,n,r,i,a){function o(J){if(J!==void 0&&typeof J!="function")throw new TypeError("Function expected");return J}for(var c=r.kind,l=c==="getter"?"get":c==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,f=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),y,I=!1,v=n.length-1;v>=0;v--){var F={};for(var k in r)F[k]=k==="access"?{}:r[k];for(var k in r.access)F.access[k]=r.access[k];F.addInitializer=function(J){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(J||null))};var K=(0,n[v])(c==="accessor"?{get:f.get,set:f.set}:f[l],F);if(c==="accessor"){if(K===void 0)continue;if(K===null||typeof K!="object")throw new TypeError("Object expected");(y=o(K.get))&&(f.get=y),(y=o(K.set))&&(f.set=y),(y=o(K.init))&&i.unshift(y)}else(y=o(K))&&(c==="field"?i.unshift(y):f[l]=y)}d&&Object.defineProperty(d,r.name,f),I=!0}function dZ(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 qv(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 gB(){for(var e=[],t=0;t1||c(I,v)})})}function c(I,v){try{l(r[I](v))}catch(F){y(a[0][3],F)}}function l(I){I.value instanceof Ol?Promise.resolve(I.value.v).then(d,f):y(a[0][2],I)}function d(I){c("next",I)}function f(I){c("throw",I)}function y(I,v){I(v),a.shift(),a.length&&c(a[0][0],a[0][1])}}function OB(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:Ol(e[i](o)),done:!1}:a?a(o):o}:a}}function DB(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 YN=="function"?YN(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 bB(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function AB(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)&&JN(t,e,n);return mZ(t,e),t}function RB(e){return e&&e.__esModule?e:{default:e}}function PB(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 FB(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 wB(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 LB(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 CB(e){function t(r){e.error=e.hasError?new NZ(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 xv,QN,JN,mZ,NZ,TZ,UB=ku(()=>{"use strict";m();T();N();xv=function(e,t){return xv=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])},xv(e,t)};QN=function(){return QN=Object.assign||function(t){for(var n,r=1,i=arguments.length;r{"use strict";m();T();N()});var Op=w(dr=>{"use strict";m();T();N();Object.defineProperty(dr,"__esModule",{value:!0});dr.assertSome=dr.isSome=dr.compareNodes=dr.nodeToString=dr.compareStrings=dr.isValidPath=dr.isDocumentString=dr.asArray=void 0;var EZ=Ae(),hZ=e=>Array.isArray(e)?e:e?[e]:[];dr.asArray=hZ;var yZ=/\.[a-z0-9]+$/i;function IZ(e){if(typeof e!="string"||yZ.test(e))return!1;try{return(0,EZ.parse)(e),!0}catch(t){}return!1}dr.isDocumentString=IZ;var gZ=/[‘“!%^<>`]/;function _Z(e){return typeof e=="string"&&!gZ.test(e)}dr.isValidPath=_Z;function MB(e,t){return String(e)String(t)?1:0}dr.compareStrings=MB;function Vv(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}dr.nodeToString=Vv;function vZ(e,t,n){let r=Vv(e),i=Vv(t);return typeof n=="function"?n(r,i):MB(r,i)}dr.compareNodes=vZ;function SZ(e){return e!=null}dr.isSome=SZ;function OZ(e,t="Value should be something"){if(e==null)throw new Error(t)}dr.assertSome=OZ});var Dp=w(zN=>{"use strict";m();T();N();Object.defineProperty(zN,"__esModule",{value:!0});zN.inspect=void 0;var VB=3;function DZ(e){return HN(e,[])}zN.inspect=DZ;function HN(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return bZ(e,t);default:return String(e)}}function xB(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message}; +`))}return Q(x({},e),{value:t,block:!0})}function RC(e){return e.arguments?e.arguments.sort((n,r)=>n.name.value.localeCompare(r.name.value)):e.arguments}function UN(e){let t=e.selections;return Q(x({},e),{selections:t.sort((n,r)=>{var a,o,c,l;return Sn.NAME in n?Sn.NAME in r?n.name.value.localeCompare(r.name.value):-1:Sn.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 xt.Kind.FIELD:return Q(x({},n),{arguments:RC(n),selectionSet:n.selectionSet?UN(n.selectionSet):n.selectionSet});case xt.Kind.FRAGMENT_SPREAD:return n;case xt.Kind.INLINE_FRAGMENT:return Q(x({},n),{selectionSet:UN(n.selectionSet)})}})})}function F9(e){return Q(x({},e),{definitions:e.definitions.map(t=>t.kind!==xt.Kind.OPERATION_DEFINITION?t:Q(x({},t),{selectionSet:UN(t.selectionSet)}))})}function PC(e,t=!0){return(0,xt.parse)(e,{noLocation:t})}function w9(e,t=!0){try{return{documentNode:PC(e,t)}}catch(n){return{error:n}}}});var LC=w(Il=>{"use strict";m();T();N();Object.defineProperty(Il,"__esModule",{value:!0});Il.AccumulatorMap=void 0;Il.mapValue=yl;Il.extendSchemaImpl=L9;var Ue=Ae(),vs=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)}};Il.AccumulatorMap=vs;function yl(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}function L9(e,t,n){var De,ve,Ce,vt;let r=[],i=new vs,a=new vs,o=new vs,c=new vs,l=new vs,d=new vs,f=[],y,I=[],v=!1;for(let Y of t.definitions){switch(Y.kind){case Ue.Kind.SCHEMA_DEFINITION:y=Y;break;case Ue.Kind.SCHEMA_EXTENSION:I.push(Y);break;case Ue.Kind.DIRECTIVE_DEFINITION:f.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 F=new Map;for(let Y of e.types){let oe=ie(Y);oe&&F.set(Y.name,oe)}for(let Y of r){let oe=Y.name.value;F.set(oe,(De=FC.get(oe))!=null?De:ue(Y))}for(let[Y,oe]of a)F.set(Y,new Ue.GraphQLObjectType({name:Y,interfaces:()=>zt(oe),fields:()=>mn(oe),extensionASTNodes:oe}));if(n!=null&&n.addInvalidExtensionOrphans){for(let[Y,oe]of o)F.set(Y,new Ue.GraphQLInterfaceType({name:Y,interfaces:()=>zt(oe),fields:()=>mn(oe),extensionASTNodes:oe}));for(let[Y,oe]of l)F.set(Y,new Ue.GraphQLEnumType({name:Y,values:kn(oe),extensionASTNodes:oe}));for(let[Y,oe]of c)F.set(Y,new Ue.GraphQLUnionType({name:Y,types:()=>An(oe),extensionASTNodes:oe}));for(let[Y,oe]of i)F.set(Y,new Ue.GraphQLScalarType({name:Y,extensionASTNodes:oe}));for(let[Y,oe]of d)F.set(Y,new Ue.GraphQLInputObjectType({name:Y,fields:()=>Fr(oe),extensionASTNodes:oe}))}let k=x(x({query:e.query&&J(e.query),mutation:e.mutation&&J(e.mutation),subscription:e.subscription&&J(e.subscription)},y&&en([y])),en(I));return Q(x({description:(Ce=(ve=y==null?void 0:y.description)==null?void 0:ve.value)!=null?Ce:e.description},k),{types:Array.from(F.values()),directives:[...e.directives.map(se),...f.map(Qt)],extensions:e.extensions,astNode:y!=null?y:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(I),assumeValid:(vt=n==null?void 0:n.assumeValid)!=null?vt:!1});function K(Y){return(0,Ue.isListType)(Y)?new Ue.GraphQLList(K(Y.ofType)):(0,Ue.isNonNullType)(Y)?new Ue.GraphQLNonNull(K(Y.ofType)):J(Y)}function J(Y){return F.get(Y.name)}function se(Y){if((0,Ue.isSpecifiedDirective)(Y))return Y;let oe=Y.toConfig();return new Ue.GraphQLDirective(Q(x({},oe),{args:yl(oe.args,_t)}))}function ie(Y){if((0,Ue.isIntrospectionType)(Y)||(0,Ue.isSpecifiedScalarType)(Y))return Y;if((0,Ue.isScalarType)(Y))return Re(Y);if((0,Ue.isObjectType)(Y))return xe(Y);if((0,Ue.isInterfaceType)(Y))return tt(Y);if((0,Ue.isUnionType)(Y))return ee(Y);if((0,Ue.isEnumType)(Y))return de(Y);if((0,Ue.isInputObjectType)(Y))return Te(Y)}function Te(Y){var Ye;let oe=Y.toConfig(),qe=(Ye=d.get(oe.name))!=null?Ye:[];return new Ue.GraphQLInputObjectType(Q(x({},oe),{fields:()=>x(x({},yl(oe.fields,Ut=>Q(x({},Ut),{type:K(Ut.type)}))),Fr(qe)),extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function de(Y){var Ye;let oe=Y.toConfig(),qe=(Ye=l.get(Y.name))!=null?Ye:[];return new Ue.GraphQLEnumType(Q(x({},oe),{values:x(x({},oe.values),kn(qe)),extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function Re(Y){var Ut,nt;let oe=Y.toConfig(),qe=(Ut=i.get(oe.name))!=null?Ut:[],Ye=oe.specifiedByURL;for(let Rt of qe)Ye=(nt=wC(Rt))!=null?nt:Ye;return new Ue.GraphQLScalarType(Q(x({},oe),{specifiedByURL:Ye,extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function xe(Y){var Ye;let oe=Y.toConfig(),qe=(Ye=a.get(oe.name))!=null?Ye:[];return new Ue.GraphQLObjectType(Q(x({},oe),{interfaces:()=>[...Y.getInterfaces().map(J),...zt(qe)],fields:()=>x(x({},yl(oe.fields,Se)),mn(qe)),extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function tt(Y){var Ye;let oe=Y.toConfig(),qe=(Ye=o.get(oe.name))!=null?Ye:[];return new Ue.GraphQLInterfaceType(Q(x({},oe),{interfaces:()=>[...Y.getInterfaces().map(J),...zt(qe)],fields:()=>x(x({},yl(oe.fields,Se)),mn(qe)),extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function ee(Y){var Ye;let oe=Y.toConfig(),qe=(Ye=c.get(oe.name))!=null?Ye:[];return new Ue.GraphQLUnionType(Q(x({},oe),{types:()=>[...Y.getTypes().map(J),...An(qe)],extensionASTNodes:oe.extensionASTNodes.concat(qe)}))}function Se(Y){return Q(x({},Y),{type:K(Y.type),args:Y.args&&yl(Y.args,_t)})}function _t(Y){return Q(x({},Y),{type:K(Y.type)})}function en(Y){var qe;let oe={};for(let Ye of Y){let Ut=(qe=Ye.operationTypes)!=null?qe:[];for(let nt of Ut)oe[nt.operation]=tn(nt.type)}return oe}function tn(Y){var Ye;let oe=Y.name.value,qe=(Ye=FC.get(oe))!=null?Ye:F.get(oe);if(qe===void 0)throw new Error(`Unknown type: "${oe}".`);return qe}function bn(Y){return Y.kind===Ue.Kind.LIST_TYPE?new Ue.GraphQLList(bn(Y.type)):Y.kind===Ue.Kind.NON_NULL_TYPE?new Ue.GraphQLNonNull(bn(Y.type)):tn(Y)}function Qt(Y){var oe;return new Ue.GraphQLDirective({name:Y.name.value,description:(oe=Y.description)==null?void 0:oe.value,locations:Y.locations.map(({value:qe})=>qe),isRepeatable:Y.repeatable,args:Pr(Y.arguments),astNode:Y})}function mn(Y){var qe,Ye;let oe=Object.create(null);for(let Ut of Y){let nt=(qe=Ut.fields)!=null?qe:[];for(let Rt of nt)oe[Rt.name.value]={type:bn(Rt.type),description:(Ye=Rt.description)==null?void 0:Ye.value,args:Pr(Rt.arguments),deprecationReason:MN(Rt),astNode:Rt}}return oe}function Pr(Y){var Ye;let oe=Y!=null?Y:[],qe=Object.create(null);for(let Ut of oe){let nt=bn(Ut.type);qe[Ut.name.value]={type:nt,description:(Ye=Ut.description)==null?void 0:Ye.value,defaultValue:(0,Ue.valueFromAST)(Ut.defaultValue,nt),deprecationReason:MN(Ut),astNode:Ut}}return qe}function Fr(Y){var qe,Ye;let oe=Object.create(null);for(let Ut of Y){let nt=(qe=Ut.fields)!=null?qe:[];for(let Rt of nt){let ns=bn(Rt.type);oe[Rt.name.value]={type:ns,description:(Ye=Rt.description)==null?void 0:Ye.value,defaultValue:(0,Ue.valueFromAST)(Rt.defaultValue,ns),deprecationReason:MN(Rt),astNode:Rt}}}return oe}function kn(Y){var qe,Ye;let oe=Object.create(null);for(let Ut of Y){let nt=(qe=Ut.values)!=null?qe:[];for(let Rt of nt)oe[Rt.name.value]={description:(Ye=Rt.description)==null?void 0:Ye.value,deprecationReason:MN(Rt),astNode:Rt}}return oe}function zt(Y){return Y.flatMap(oe=>{var qe,Ye;return(Ye=(qe=oe.interfaces)==null?void 0:qe.map(tn))!=null?Ye:[]})}function An(Y){return Y.flatMap(oe=>{var qe,Ye;return(Ye=(qe=oe.types)==null?void 0:qe.map(tn))!=null?Ye:[]})}function ue(Y){var qe,Ye,Ut,nt,Rt,ns,Vr,rs,xc,ga,mr,ni;let oe=Y.name.value;switch(Y.kind){case Ue.Kind.OBJECT_TYPE_DEFINITION:{let Vt=(qe=a.get(oe))!=null?qe:[],Nr=[Y,...Vt];return a.delete(oe),new Ue.GraphQLObjectType({name:oe,description:(Ye=Y.description)==null?void 0:Ye.value,interfaces:()=>zt(Nr),fields:()=>mn(Nr),astNode:Y,extensionASTNodes:Vt})}case Ue.Kind.INTERFACE_TYPE_DEFINITION:{let Vt=(Ut=o.get(oe))!=null?Ut:[],Nr=[Y,...Vt];return o.delete(oe),new Ue.GraphQLInterfaceType({name:oe,description:(nt=Y.description)==null?void 0:nt.value,interfaces:()=>zt(Nr),fields:()=>mn(Nr),astNode:Y,extensionASTNodes:Vt})}case Ue.Kind.ENUM_TYPE_DEFINITION:{let Vt=(Rt=l.get(oe))!=null?Rt:[],Nr=[Y,...Vt];return l.delete(oe),new Ue.GraphQLEnumType({name:oe,description:(ns=Y.description)==null?void 0:ns.value,values:kn(Nr),astNode:Y,extensionASTNodes:Vt})}case Ue.Kind.UNION_TYPE_DEFINITION:{let Vt=(Vr=c.get(oe))!=null?Vr:[],Nr=[Y,...Vt];return c.delete(oe),new Ue.GraphQLUnionType({name:oe,description:(rs=Y.description)==null?void 0:rs.value,types:()=>An(Nr),astNode:Y,extensionASTNodes:Vt})}case Ue.Kind.SCALAR_TYPE_DEFINITION:{let Vt=(xc=i.get(oe))!=null?xc:[];return i.delete(oe),new Ue.GraphQLScalarType({name:oe,description:(ga=Y.description)==null?void 0:ga.value,specifiedByURL:wC(Y),astNode:Y,extensionASTNodes:Vt})}case Ue.Kind.INPUT_OBJECT_TYPE_DEFINITION:{let Vt=(mr=d.get(oe))!=null?mr:[],Nr=[Y,...Vt];return d.delete(oe),new Ue.GraphQLInputObjectType({name:oe,description:(ni=Y.description)==null?void 0:ni.value,fields:()=>Fr(Nr),astNode:Y,extensionASTNodes:Vt})}}}}var FC=new Map([...Ue.specifiedScalarTypes,...Ue.introspectionTypes].map(e=>[e.name,e]));function MN(e){let t=(0,Ue.getDirectiveValues)(Ue.GraphQLDeprecatedDirective,e);return t==null?void 0:t.reason}function wC(e){let t=(0,Ue.getDirectiveValues)(Ue.GraphQLSpecifiedByDirective,e);return t==null?void 0:t.url}});var Dv=w(Ov=>{"use strict";m();T();N();Object.defineProperty(Ov,"__esModule",{value:!0});Ov.buildASTSchema=U9;var CC=Ae(),C9=Tl(),B9=LC();function U9(e,t){(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,B9.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,...CC.specifiedDirectives.filter(a=>r.directives.every(o=>o.name!==a.name))];return new CC.GraphQLSchema(Q(x({},r),{directives:i}))}});var gl=w(lu=>{"use strict";m();T();N();Object.defineProperty(lu,"__esModule",{value:!0});lu.MAX_INT32=lu.MAX_SUBSCRIPTION_FILTER_DEPTH=lu.MAXIMUM_TYPE_NESTING=void 0;lu.MAXIMUM_TYPE_NESTING=30;lu.MAX_SUBSCRIPTION_FILTER_DEPTH=5;lu.MAX_INT32=un(2,31)-1});var Sr=w(lr=>{"use strict";m();T();N();Object.defineProperty(lr,"__esModule",{value:!0});lr.getOrThrowError=M9;lr.getEntriesNotInHashSet=x9;lr.numberToOrdinal=q9;lr.addIterableValuesToSet=V9;lr.addSets=j9;lr.kindToNodeType=K9;lr.getValueOrDefault=G9;lr.add=$9;lr.generateSimpleDirective=Q9;lr.generateRequiresScopesDirective=Y9;lr.generateSemanticNonNullDirective=J9;lr.copyObjectValueMap=H9;lr.addNewObjectValueMapEntries=z9;lr.copyArrayValueMap=W9;lr.addMapEntries=X9;lr.getFirstEntry=Z9;var Kt=Ae(),cr=vr(),k9=Mi(),vp=Hr();function M9(e,t,n){let r=e.get(t);if(r===void 0)throw(0,k9.invalidKeyFatalError)(t,n);return r}function x9(e,t){let n=[];for(let r of e)t.has(r)||n.push(r);return n}function q9(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 V9(e,t){for(let n of e)t.add(n)}function j9(e,t){let n=new Set(e);for(let r of t)n.add(r);return n}function K9(e){switch(e){case Kt.Kind.BOOLEAN:return cr.BOOLEAN_SCALAR;case Kt.Kind.ENUM:case Kt.Kind.ENUM_TYPE_DEFINITION:return cr.ENUM;case Kt.Kind.ENUM_TYPE_EXTENSION:return"Enum extension";case Kt.Kind.ENUM_VALUE_DEFINITION:return cr.ENUM_VALUE;case Kt.Kind.FIELD_DEFINITION:return cr.FIELD;case Kt.Kind.FLOAT:return cr.FLOAT_SCALAR;case Kt.Kind.INPUT_OBJECT_TYPE_DEFINITION:return cr.INPUT_OBJECT;case Kt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return"Input Object extension";case Kt.Kind.INPUT_VALUE_DEFINITION:return cr.INPUT_VALUE;case Kt.Kind.INT:return cr.INT_SCALAR;case Kt.Kind.INTERFACE_TYPE_DEFINITION:return cr.INTERFACE;case Kt.Kind.INTERFACE_TYPE_EXTENSION:return"Interface extension";case Kt.Kind.NULL:return cr.NULL;case Kt.Kind.OBJECT:case Kt.Kind.OBJECT_TYPE_DEFINITION:return cr.OBJECT;case Kt.Kind.OBJECT_TYPE_EXTENSION:return"Object extension";case Kt.Kind.STRING:return cr.STRING_SCALAR;case Kt.Kind.SCALAR_TYPE_DEFINITION:return cr.SCALAR;case Kt.Kind.SCALAR_TYPE_EXTENSION:return"Scalar extension";case Kt.Kind.UNION_TYPE_DEFINITION:return cr.UNION;case Kt.Kind.UNION_TYPE_EXTENSION:return"Union extension";default:return e}}function G9(e,t,n){let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i}function $9(e,t){return e.has(t)?!1:(e.add(t),!0)}function Q9(e){return{kind:Kt.Kind.DIRECTIVE,name:(0,vp.stringToNameNode)(e)}}function Y9(e){let t=[];for(let n of e){let r=[];for(let i of n)r.push({kind:Kt.Kind.STRING,value:i});t.push({kind:Kt.Kind.LIST,values:r})}return{kind:Kt.Kind.DIRECTIVE,name:(0,vp.stringToNameNode)(cr.REQUIRES_SCOPES),arguments:[{kind:Kt.Kind.ARGUMENT,name:(0,vp.stringToNameNode)(cr.SCOPES),value:{kind:Kt.Kind.LIST,values:t}}]}}function J9(e){let t=Array.from(e).sort((r,i)=>r-i),n=new Array;for(let r of t)n.push({kind:Kt.Kind.INT,value:r.toString()});return{kind:Kt.Kind.DIRECTIVE,name:(0,vp.stringToNameNode)(cr.SEMANTIC_NON_NULL),arguments:[{kind:Kt.Kind.ARGUMENT,name:(0,vp.stringToNameNode)(cr.LEVELS),value:{kind:Kt.Kind.LIST,values:n}}]}}function H9(e){let t=new Map;for(let[n,r]of e)t.set(n,x({},r));return t}function z9(e,t){for(let[n,r]of e)t.set(n,x({},r))}function W9(e){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function X9(e,t){for(let[n,r]of e)t.set(n,r)}function Z9(e){let{value:t,done:n}=e.values().next();if(!n)return t}});var Sp=w(xN=>{"use strict";m();T();N();Object.defineProperty(xN,"__esModule",{value:!0});xN.ExtensionType=void 0;var BC;(function(e){e[e.EXTENDS=0]="EXTENDS",e[e.NONE=1]="NONE",e[e.REAL=2]="REAL"})(BC||(xN.ExtensionType=BC={}))});var du=w(Dr=>{"use strict";m();T();N();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.getMutableDirectiveDefinitionNode=t7;Dr.getMutableEnumNode=n7;Dr.getMutableEnumValueNode=r7;Dr.getMutableFieldNode=i7;Dr.getMutableInputObjectNode=a7;Dr.getMutableInputValueNode=s7;Dr.getMutableInterfaceNode=o7;Dr.getMutableObjectNode=u7;Dr.getMutableObjectExtensionNode=c7;Dr.getMutableScalarNode=l7;Dr.getMutableTypeNode=bv;Dr.getMutableUnionNode=d7;Dr.getTypeNodeNamedTypeName=Av;Dr.getNamedTypeNode=kC;var Or=Ae(),_l=Hr(),UC=Mi(),e7=gl();function t7(e){return{arguments:[],kind:e.kind,locations:[],name:x({},e.name),repeatable:e.repeatable,description:(0,_l.formatDescription)(e.description)}}function n7(e){return{kind:Or.Kind.ENUM_TYPE_DEFINITION,name:x({},e)}}function r7(e){return{directives:[],kind:e.kind,name:x({},e.name),description:(0,_l.formatDescription)(e.description)}}function i7(e,t,n){return{arguments:[],directives:[],kind:e.kind,name:x({},e.name),type:bv(e.type,t,n),description:(0,_l.formatDescription)(e.description)}}function a7(e){return{kind:Or.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:x({},e)}}function s7(e,t,n){return{directives:[],kind:e.kind,name:x({},e.name),type:bv(e.type,t,n),defaultValue:e.defaultValue,description:(0,_l.formatDescription)(e.description)}}function o7(e){return{kind:Or.Kind.INTERFACE_TYPE_DEFINITION,name:x({},e)}}function u7(e){return{kind:Or.Kind.OBJECT_TYPE_DEFINITION,name:x({},e)}}function c7(e){let t=e.kind===Or.Kind.OBJECT_TYPE_DEFINITION?e.description:void 0;return{kind:Or.Kind.OBJECT_TYPE_EXTENSION,name:x({},e.name),description:(0,_l.formatDescription)(t)}}function l7(e){return{kind:Or.Kind.SCALAR_TYPE_DEFINITION,name:x({},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(qN,"__esModule",{value:!0});qN.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=void 0;qN.DEFAULT_CONSUMER_INACTIVE_THRESHOLD=30});var Ss=w(X=>{"use strict";m();T();N();Object.defineProperty(X,"__esModule",{value:!0});X.MAX_OR_SCOPES=X.EDFS_ARGS_REGEXP=X.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION=X.CONFIGURE_DESCRIPTION_DEFINITION=X.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION=X.SCOPE_SCALAR_DEFINITION=X.FIELD_SET_SCALAR_DEFINITION=X.VERSION_TWO_DIRECTIVE_DEFINITIONS=X.EVENT_DRIVEN_DIRECTIVE_DEFINITIONS_BY_DIRECTIVE_NAME=X.BASE_DIRECTIVE_DEFINITIONS=X.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=X.SUBSCRIPTION_FIELD_CONDITION_DEFINITION=X.SUBSCRIPTION_FILTER_VALUE_DEFINITION=X.SUBSCRIPTION_FILTER_CONDITION_DEFINITION=X.SUBSCRIPTION_FILTER_DEFINITION=X.SHAREABLE_DEFINITION=X.SEMANTIC_NON_NULL_DEFINITION=X.REQUIRES_SCOPES_DEFINITION=X.REQUIRE_FETCH_REASONS_DEFINITION=X.OVERRIDE_DEFINITION=X.ONE_OF_DEFINITION=X.LINK_DEFINITION=X.LINK_PURPOSE_DEFINITION=X.LINK_IMPORT_DEFINITION=X.INTERFACE_OBJECT_DEFINITION=X.INACCESSIBLE_DEFINITION=X.COMPOSE_DIRECTIVE_DEFINITION=X.AUTHENTICATED_DEFINITION=X.ALL_IN_BUILT_DIRECTIVE_NAMES=X.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=X.EDFS_REDIS_SUBSCRIBE_DEFINITION=X.EDFS_REDIS_PUBLISH_DEFINITION=X.TAG_DEFINITION=X.SPECIFIED_BY_DEFINITION=X.REQUIRES_DEFINITION=X.PROVIDES_DEFINITION=X.KEY_DEFINITION=X.REQUIRED_FIELDSET_TYPE_NODE=X.EDFS_NATS_SUBSCRIBE_DEFINITION=X.EDFS_NATS_REQUEST_DEFINITION=X.EDFS_NATS_PUBLISH_DEFINITION=X.EDFS_KAFKA_SUBSCRIBE_DEFINITION=X.EDFS_KAFKA_PUBLISH_DEFINITION=X.EXTERNAL_DEFINITION=X.EXTENDS_DEFINITION=X.DEPRECATED_DEFINITION=X.BASE_SCALARS=X.REQUIRED_STRING_TYPE_NODE=void 0;var ae=Ae(),re=Hr(),p7=Rv(),U=vr();X.REQUIRED_STRING_TYPE_NODE={kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)};X.BASE_SCALARS=new Set(["_Any","_Entities",U.BOOLEAN_SCALAR,U.FLOAT_SCALAR,U.ID_SCALAR,U.INT_SCALAR,U.FIELD_SET_SCALAR,U.SCOPE_SCALAR,U.STRING_SCALAR]);X.DEPRECATED_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.REASON),type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR),defaultValue:{kind:ae.Kind.STRING,value:ae.DEFAULT_DEPRECATION_REASON}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ARGUMENT_DEFINITION_UPPER,U.ENUM_VALUE_UPPER,U.FIELD_DEFINITION_UPPER,U.INPUT_FIELD_DEFINITION_UPPER]),name:(0,re.stringToNameNode)(U.DEPRECATED),repeatable:!1};X.EXTENDS_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.INTERFACE_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.EXTENDS),repeatable:!1};X.EXTERNAL_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.EXTERNAL),repeatable:!1};X.EDFS_KAFKA_PUBLISH_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.TOPIC),type:X.REQUIRED_STRING_TYPE_NODE},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_KAFKA_PUBLISH),repeatable:!1};X.EDFS_KAFKA_SUBSCRIBE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.TOPICS),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:X.REQUIRED_STRING_TYPE_NODE}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_KAFKA_SUBSCRIBE),repeatable:!1};X.EDFS_NATS_PUBLISH_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBJECT),type:X.REQUIRED_STRING_TYPE_NODE},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)},defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_NATS_PUBLISH),repeatable:!1};X.EDFS_NATS_REQUEST_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBJECT),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)},defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_NATS_REQUEST),repeatable:!1};X.EDFS_NATS_SUBSCRIBE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBJECTS),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:X.REQUIRED_STRING_TYPE_NODE}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.STREAM_CONFIGURATION),type:(0,re.stringToNamedTypeNode)(U.EDFS_NATS_STREAM_CONFIGURATION)}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_NATS_SUBSCRIBE),repeatable:!1};X.REQUIRED_FIELDSET_TYPE_NODE={kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.FIELD_SET_SCALAR)};X.KEY_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELDS),type:X.REQUIRED_FIELDSET_TYPE_NODE},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.RESOLVABLE),type:(0,re.stringToNamedTypeNode)(U.BOOLEAN_SCALAR),defaultValue:{kind:ae.Kind.BOOLEAN,value:!0}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.INTERFACE_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.KEY),repeatable:!0};X.PROVIDES_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELDS),type:X.REQUIRED_FIELDSET_TYPE_NODE}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.PROVIDES),repeatable:!1};X.REQUIRES_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELDS),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.FIELD_SET_SCALAR)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.REQUIRES),repeatable:!1};X.SPECIFIED_BY_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.URL_LOWER),type:X.REQUIRED_STRING_TYPE_NODE}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.SCALAR_UPPER]),name:(0,re.stringToNameNode)(U.SPECIFIED_BY),repeatable:!1};X.TAG_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.NAME),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ARGUMENT_DEFINITION_UPPER,U.ENUM_UPPER,U.ENUM_VALUE_UPPER,U.FIELD_DEFINITION_UPPER,U.INPUT_FIELD_DEFINITION_UPPER,U.INPUT_OBJECT_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER,U.UNION_UPPER]),name:(0,re.stringToNameNode)(U.TAG),repeatable:!0};X.EDFS_REDIS_PUBLISH_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CHANNEL),type:X.REQUIRED_STRING_TYPE_NODE},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_REDIS_PUBLISH),repeatable:!1};X.EDFS_REDIS_SUBSCRIBE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CHANNELS),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:X.REQUIRED_STRING_TYPE_NODE}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROVIDER_ID),type:X.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:ae.Kind.STRING,value:U.DEFAULT_EDFS_PROVIDER_ID}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.EDFS_REDIS_SUBSCRIBE),repeatable:!1};X.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=new Map([[U.DEPRECATED,X.DEPRECATED_DEFINITION],[U.EXTENDS,X.EXTENDS_DEFINITION],[U.EXTERNAL,X.EXTERNAL_DEFINITION],[U.EDFS_KAFKA_PUBLISH,X.EDFS_KAFKA_PUBLISH_DEFINITION],[U.EDFS_KAFKA_SUBSCRIBE,X.EDFS_KAFKA_SUBSCRIBE_DEFINITION],[U.EDFS_NATS_PUBLISH,X.EDFS_NATS_PUBLISH_DEFINITION],[U.EDFS_NATS_REQUEST,X.EDFS_NATS_REQUEST_DEFINITION],[U.EDFS_NATS_SUBSCRIBE,X.EDFS_NATS_SUBSCRIBE_DEFINITION],[U.EDFS_REDIS_PUBLISH,X.EDFS_REDIS_PUBLISH_DEFINITION],[U.EDFS_REDIS_SUBSCRIBE,X.EDFS_REDIS_SUBSCRIBE_DEFINITION],[U.KEY,X.KEY_DEFINITION],[U.PROVIDES,X.PROVIDES_DEFINITION],[U.REQUIRES,X.REQUIRES_DEFINITION],[U.SPECIFIED_BY,X.SPECIFIED_BY_DEFINITION],[U.TAG,X.TAG_DEFINITION]]);X.ALL_IN_BUILT_DIRECTIVE_NAMES=new Set([U.AUTHENTICATED,U.COMPOSE_DIRECTIVE,U.CONFIGURE_DESCRIPTION,U.CONFIGURE_CHILD_DESCRIPTIONS,U.DEPRECATED,U.EDFS_NATS_PUBLISH,U.EDFS_NATS_REQUEST,U.EDFS_NATS_SUBSCRIBE,U.EDFS_KAFKA_PUBLISH,U.EDFS_KAFKA_SUBSCRIBE,U.EDFS_REDIS_PUBLISH,U.EDFS_REDIS_SUBSCRIBE,U.EXTENDS,U.EXTERNAL,U.INACCESSIBLE,U.INTERFACE_OBJECT,U.KEY,U.LINK,U.ONE_OF,U.OVERRIDE,U.PROVIDES,U.REQUIRE_FETCH_REASONS,U.REQUIRES,U.REQUIRES_SCOPES,U.SEMANTIC_NON_NULL,U.SHAREABLE,U.SPECIFIED_BY,U.SUBSCRIPTION_FILTER,U.TAG]);X.AUTHENTICATED_DEFINITION={arguments:[],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ENUM_UPPER,U.FIELD_DEFINITION_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER]),name:(0,re.stringToNameNode)(U.AUTHENTICATED),repeatable:!1};X.COMPOSE_DIRECTIVE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.NAME),type:X.REQUIRED_STRING_TYPE_NODE}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.SCHEMA_UPPER]),name:(0,re.stringToNameNode)(U.COMPOSE_DIRECTIVE),repeatable:!0};X.INACCESSIBLE_DEFINITION={arguments:[],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ARGUMENT_DEFINITION_UPPER,U.ENUM_UPPER,U.ENUM_VALUE_UPPER,U.FIELD_DEFINITION_UPPER,U.INPUT_FIELD_DEFINITION_UPPER,U.INPUT_OBJECT_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER,U.UNION_UPPER]),name:(0,re.stringToNameNode)(U.INACCESSIBLE),repeatable:!1};X.INTERFACE_OBJECT_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.INTERFACE_OBJECT),repeatable:!1};X.LINK_IMPORT_DEFINITION={kind:ae.Kind.SCALAR_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.LINK_IMPORT)};X.LINK_PURPOSE_DEFINITION={kind:ae.Kind.ENUM_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.LINK_PURPOSE),values:[{directives:[],kind:ae.Kind.ENUM_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.EXECUTION)},{directives:[],kind:ae.Kind.ENUM_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SECURITY)}]};X.LINK_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.URL_LOWER),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.AS),type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FOR),type:(0,re.stringToNamedTypeNode)(U.LINK_PURPOSE)},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.IMPORT),type:{kind:ae.Kind.LIST_TYPE,type:(0,re.stringToNamedTypeNode)(U.LINK_IMPORT)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.SCHEMA_UPPER]),name:(0,re.stringToNameNode)(U.LINK),repeatable:!0};X.ONE_OF_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.INPUT_OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.ONE_OF),repeatable:!1};X.OVERRIDE_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FROM),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER]),name:(0,re.stringToNameNode)(U.OVERRIDE),repeatable:!1};X.REQUIRE_FETCH_REASONS_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.REQUIRE_FETCH_REASONS),repeatable:!0};X.REQUIRES_SCOPES_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.SCOPES),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.SCOPE_SCALAR)}}}}}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ENUM_UPPER,U.FIELD_DEFINITION_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER]),name:(0,re.stringToNameNode)(U.REQUIRES_SCOPES),repeatable:!1};X.SEMANTIC_NON_NULL_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.LEVELS),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.INT_SCALAR)}}},defaultValue:{kind:ae.Kind.LIST,values:[{kind:ae.Kind.INT,value:"0"}]}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:[(0,re.stringToNameNode)(U.FIELD_DEFINITION_UPPER)],name:(0,re.stringToNameNode)(U.SEMANTIC_NON_NULL),repeatable:!1};X.SHAREABLE_DEFINITION={kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.SHAREABLE),repeatable:!0};X.SUBSCRIPTION_FILTER_DEFINITION={arguments:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CONDITION),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_CONDITION)}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.FIELD_DEFINITION_UPPER]),name:(0,re.stringToNameNode)(U.SUBSCRIPTION_FILTER),repeatable:!1};X.SUBSCRIPTION_FILTER_CONDITION_DEFINITION={fields:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.AND_UPPER),type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.IN_UPPER),type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FIELD_CONDITION)},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.OR_UPPER),type:{kind:ae.Kind.LIST_TYPE,type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_CONDITION)}}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.NOT_UPPER),type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_CONDITION)}],kind:ae.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBSCRIPTION_FILTER_CONDITION)};X.SUBSCRIPTION_FILTER_VALUE_DEFINITION={kind:ae.Kind.SCALAR_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBSCRIPTION_FILTER_VALUE)};X.SUBSCRIPTION_FIELD_CONDITION_DEFINITION={fields:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELD_PATH),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.VALUES),type:{kind:ae.Kind.NON_NULL_TYPE,type:{kind:ae.Kind.LIST_TYPE,type:(0,re.stringToNamedTypeNode)(U.SUBSCRIPTION_FILTER_VALUE)}}}],kind:ae.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.SUBSCRIPTION_FIELD_CONDITION)};X.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME=new Map([[U.AUTHENTICATED,X.AUTHENTICATED_DEFINITION],[U.COMPOSE_DIRECTIVE,X.COMPOSE_DIRECTIVE_DEFINITION],[U.INACCESSIBLE,X.INACCESSIBLE_DEFINITION],[U.INTERFACE_OBJECT,X.INTERFACE_OBJECT_DEFINITION],[U.LINK,X.LINK_DEFINITION],[U.OVERRIDE,X.OVERRIDE_DEFINITION],[U.REQUIRES_SCOPES,X.REQUIRES_SCOPES_DEFINITION],[U.SHAREABLE,X.SHAREABLE_DEFINITION]]);X.BASE_DIRECTIVE_DEFINITIONS=[X.DEPRECATED_DEFINITION,X.EXTENDS_DEFINITION,X.EXTERNAL_DEFINITION,X.KEY_DEFINITION,X.PROVIDES_DEFINITION,X.REQUIRES_DEFINITION,X.SPECIFIED_BY_DEFINITION,X.TAG_DEFINITION];X.EVENT_DRIVEN_DIRECTIVE_DEFINITIONS_BY_DIRECTIVE_NAME=new Map([[U.EDFS_KAFKA_PUBLISH,X.EDFS_KAFKA_PUBLISH_DEFINITION],[U.EDFS_KAFKA_SUBSCRIBE,X.EDFS_KAFKA_SUBSCRIBE_DEFINITION],[U.EDFS_NATS_PUBLISH,X.EDFS_NATS_PUBLISH_DEFINITION],[U.EDFS_NATS_REQUEST,X.EDFS_NATS_REQUEST_DEFINITION],[U.EDFS_NATS_SUBSCRIBE,X.EDFS_NATS_SUBSCRIBE_DEFINITION],[U.EDFS_REDIS_PUBLISH,X.EDFS_REDIS_PUBLISH_DEFINITION],[U.EDFS_REDIS_SUBSCRIBE,X.EDFS_REDIS_SUBSCRIBE_DEFINITION]]);X.VERSION_TWO_DIRECTIVE_DEFINITIONS=[X.AUTHENTICATED_DEFINITION,X.COMPOSE_DIRECTIVE_DEFINITION,X.INACCESSIBLE_DEFINITION,X.INTERFACE_OBJECT_DEFINITION,X.OVERRIDE_DEFINITION,X.REQUIRES_SCOPES_DEFINITION,X.SHAREABLE_DEFINITION];X.FIELD_SET_SCALAR_DEFINITION={kind:ae.Kind.SCALAR_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.FIELD_SET_SCALAR)};X.SCOPE_SCALAR_DEFINITION={kind:ae.Kind.SCALAR_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.SCOPE_SCALAR)};X.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION={kind:ae.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:(0,re.stringToNameNode)(U.EDFS_NATS_STREAM_CONFIGURATION),fields:[{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CONSUMER_NAME),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.STREAM_NAME),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}},{kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.CONSUMER_INACTIVE_THRESHOLD),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.INT_SCALAR)},defaultValue:{kind:ae.Kind.INT,value:p7.DEFAULT_CONSUMER_INACTIVE_THRESHOLD.toString()}}]};X.CONFIGURE_DESCRIPTION_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROPAGATE),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.BOOLEAN_SCALAR)},defaultValue:{kind:ae.Kind.BOOLEAN,value:!0}},{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.DESCRIPTION_OVERRIDE),type:(0,re.stringToNamedTypeNode)(U.STRING_SCALAR)}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ARGUMENT_DEFINITION_UPPER,U.ENUM_UPPER,U.ENUM_VALUE_UPPER,U.FIELD_DEFINITION_UPPER,U.INTERFACE_UPPER,U.INPUT_OBJECT_UPPER,U.INPUT_FIELD_DEFINITION_UPPER,U.OBJECT_UPPER,U.SCALAR_UPPER,U.SCHEMA_UPPER,U.UNION_UPPER]),name:(0,re.stringToNameNode)(U.CONFIGURE_DESCRIPTION),repeatable:!1};X.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION={arguments:[{directives:[],kind:ae.Kind.INPUT_VALUE_DEFINITION,name:(0,re.stringToNameNode)(U.PROPAGATE),type:{kind:ae.Kind.NON_NULL_TYPE,type:(0,re.stringToNamedTypeNode)(U.BOOLEAN_SCALAR)},defaultValue:{kind:ae.Kind.BOOLEAN,value:!0}}],kind:ae.Kind.DIRECTIVE_DEFINITION,locations:(0,re.stringArrayToNameNodeArray)([U.ENUM_UPPER,U.INPUT_OBJECT_UPPER,U.INTERFACE_UPPER,U.OBJECT_UPPER]),name:(0,re.stringToNameNode)(U.CONFIGURE_CHILD_DESCRIPTIONS),repeatable:!1};X.EDFS_ARGS_REGEXP=/{{\s*args\.([a-zA-Z0-9_]+)\s*}}/g;X.MAX_OR_SCOPES=16});var VN=w(sc=>{"use strict";m();T();N();Object.defineProperty(sc,"__esModule",{value:!0});sc.newParentTagData=T7;sc.newChildTagData=E7;sc.validateImplicitFieldSets=h7;sc.newContractTagOptionsFromArrays=y7;sc.getDescriptionFromString=I7;var zr=Ae(),f7=du(),m7=Ss(),N7=Hr(),MC=Sr();function T7(e){return{childTagDataByChildName:new Map,tagNames:new Set,typeName:e}}function E7(e){return{name:e,tagNames:new Set,tagNamesByArgumentName:new Map}}function h7({conditionalFieldDataByCoords:e,currentSubgraphName:t,entityData:n,implicitKeys:r,objectData:i,parentDefinitionDataByTypeName:a,graphNode:o}){let c=(0,MC.getValueOrDefault)(n.keyFieldSetDatasBySubgraphName,t,()=>new Map);for(let[l,d]of n.documentNodeByKeyFieldSet){if(c.has(l))continue;let f=[i],y=[],I=[],v=-1,F=!0,k=!0;(0,zr.visit)(d,{Argument:{enter(){return k=!1,zr.BREAK}},Field:{enter(K){let J=f[v];if(F)return k=!1,zr.BREAK;let se=K.name.value,ie=J.fieldDataByName.get(se);if(!ie||ie.argumentDataByName.size||y[v].has(se))return k=!1,zr.BREAK;let{isUnconditionallyProvided:Te}=(0,MC.getOrThrowError)(ie.externalFieldDataBySubgraphName,t,`${ie.originalParentTypeName}.${se}.externalFieldDataBySubgraphName`),de=e.get(`${ie.renamedParentTypeName}.${se}`);if(de){if(de.providedBy.length>0)I.push(...de.providedBy);else if(de.requiredBy.length>0)return k=!1,zr.BREAK}else if(!Te)return k=!1,zr.BREAK;y[v].add(se);let Re=(0,f7.getTypeNodeNamedTypeName)(ie.node.type);if(m7.BASE_SCALARS.has(Re))return;let xe=a.get(Re);if(!xe)return k=!1,zr.BREAK;if(xe.kind===zr.Kind.OBJECT_TYPE_DEFINITION){F=!0,f.push(xe);return}if((0,N7.isKindAbstract)(xe.kind))return k=!1,zr.BREAK}},InlineFragment:{enter(){return k=!1,zr.BREAK}},SelectionSet:{enter(){if(!F||(v+=1,F=!1,v<0||v>=f.length))return k=!1,zr.BREAK;y.push(new Set)},leave(){if(F)return k=!1,zr.BREAK;v-=1,f.pop(),y.pop()}}}),k&&(r.push(Q(x({fieldName:"",selectionSet:l},I.length>0?{conditions:I}:{}),{disableEntityResolver:!0})),o&&o.satisfiedFieldSets.add(l))}}function y7(e,t){return{tagNamesToExclude:new Set(e),tagNamesToInclude:new Set(t)}}function I7(e){if(e)return{block:!0,kind:zr.Kind.STRING,value:e}}});var Sl=w(mt=>{"use strict";m();T();N();Object.defineProperty(mt,"__esModule",{value:!0});mt.MergeMethod=void 0;mt.newPersistedDirectivesData=_7;mt.isNodeExternalOrShareable=v7;mt.isTypeRequired=S7;mt.areDefaultValuesCompatible=qC;mt.compareAndValidateInputValueDefaultValues=O7;mt.setMutualExecutableLocations=D7;mt.isTypeNameRootType=b7;mt.getRenamedRootTypeName=A7;mt.childMapToValueArray=P7;mt.setLongestDescription=F7;mt.isParentDataRootType=VC;mt.isInterfaceDefinitionData=w7;mt.setParentDataExtensionType=L7;mt.extractPersistedDirectives=U7;mt.propagateAuthDirectives=k7;mt.propagateFieldAuthDirectives=M7;mt.generateDeprecatedDirective=Lv;mt.getClientPersistedDirectiveNodes=Fv;mt.getNodeForRouterSchemaByData=q7;mt.getClientSchemaFieldNodeByFieldData=V7;mt.getNodeWithPersistedDirectivesByInputValueData=KC;mt.addValidPersistedDirectiveDefinitionNodeByData=K7;mt.newInvalidFieldNames=G7;mt.validateExternalAndShareable=$7;mt.isTypeValidImplementation=jN;mt.isNodeDataInaccessible=GC;mt.isLeafKind=Q7;mt.getSubscriptionFilterValue=Y7;mt.getParentTypeName=J7;mt.newConditionalFieldData=H7;mt.getDefinitionDataCoords=z7;mt.isParentDataCompositeOutputType=W7;mt.newExternalFieldData=X7;mt.getInitialFederatedDescription=Z7;mt.areKindsEqual=eZ;mt.isFieldData=Cv;mt.isInputNodeKind=tZ;mt.isOutputNodeKind=nZ;var st=Ae(),Pv=Sp(),vl=Hr(),wv=Mi(),Ct=vr(),oc=Sr(),g7=VN();function _7(){return{deprecatedReason:"",directivesByDirectiveName:new Map,isDeprecated:!1,tagDirectiveByName:new Map}}function v7(e,t,n){var i;let r={isExternal:n.has(Ct.EXTERNAL),isShareable:t||n.has(Ct.SHAREABLE)};if(!((i=e.directives)!=null&&i.length))return r;for(let a of e.directives){let o=a.name.value;if(o===Ct.EXTERNAL){r.isExternal=!0;continue}o===Ct.SHAREABLE&&(r.isShareable=!0)}return r}function S7(e){return e.kind===st.Kind.NON_NULL_TYPE}function qC(e,t){switch(e.kind){case st.Kind.LIST_TYPE:return t.kind===st.Kind.LIST||t.kind===st.Kind.NULL;case st.Kind.NAMED_TYPE:if(t.kind===st.Kind.NULL)return!0;switch(e.name.value){case Ct.BOOLEAN_SCALAR:return t.kind===st.Kind.BOOLEAN;case Ct.FLOAT_SCALAR:return t.kind===st.Kind.INT||t.kind===st.Kind.FLOAT;case Ct.INT_SCALAR:return t.kind===st.Kind.INT;case Ct.STRING_SCALAR:return t.kind===st.Kind.STRING;default:return!0}case st.Kind.NON_NULL_TYPE:return t.kind===st.Kind.NULL?!1:qC(e.type,t)}}function O7(e,t,n){if(!e.defaultValue)return;if(!t.defaultValue){e.includeDefaultValue=!1;return}let r=(0,st.print)(e.defaultValue),i=(0,st.print)(t.defaultValue);if(r!==i){n.push((0,wv.incompatibleInputValueDefaultValuesError)(`${e.isArgument?Ct.ARGUMENT:Ct.INPUT_FIELD} "${e.name}"`,e.originalCoords,[...t.subgraphNames],r,i));return}}function D7(e,t){let n=new Set;for(let r of t)e.executableLocations.has(r)&&n.add(r);e.executableLocations=n}function b7(e,t){return Ct.ROOT_TYPE_NAMES.has(e)||t.has(e)}function A7(e,t){let n=t.get(e);if(!n)return e;switch(n){case st.OperationTypeNode.MUTATION:return Ct.MUTATION;case st.OperationTypeNode.SUBSCRIPTION:return Ct.SUBSCRIPTION;default:return Ct.QUERY}}function R7(e){for(let t of e.argumentDataByName.values()){for(let n of t.directivesByDirectiveName.values())t.node.directives.push(...n);e.node.arguments.push(t.node)}}function P7(e){let t=[];for(let n of e.values()){Cv(n)&&R7(n);for(let r of n.directivesByDirectiveName.values())n.node.directives.push(...r);t.push(n.node)}return t}function F7(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.directivesByDirectiveName.set(Ct.REQUIRES_SCOPES,[(0,oc.generateRequiresScopesDirective)(t.requiredScopes)]))}function M7(e,t){if(!t)return;let n=t.fieldAuthDataByFieldName.get(e.name);n&&(n.originalData.requiresAuthentication&&e.persistedDirectivesData.directivesByDirectiveName.set(Ct.AUTHENTICATED,[(0,oc.generateSimpleDirective)(Ct.AUTHENTICATED)]),n.originalData.requiredScopes.length>0&&e.persistedDirectivesData.directivesByDirectiveName.set(Ct.REQUIRES_SCOPES,[(0,oc.generateRequiresScopesDirective)(n.originalData.requiredScopes)]))}function Lv(e){return{kind:st.Kind.DIRECTIVE,name:(0,vl.stringToNameNode)(Ct.DEPRECATED),arguments:[{kind:st.Kind.ARGUMENT,name:(0,vl.stringToNameNode)(Ct.REASON),value:{kind:st.Kind.STRING,value:e||Ct.DEPRECATED_DEFAULT_ARGUMENT_VALUE}}]}}function x7(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,wv.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}i.push(...o)}}return i}function jC(e,t,n){let r=[...e.persistedDirectivesData.tagDirectiveByName.values()];return e.persistedDirectivesData.isDeprecated&&r.push(Lv(e.persistedDirectivesData.deprecatedReason)),r.push(...x7(e.persistedDirectivesData.directivesByDirectiveName,t,e.name,n)),r}function Fv(e){var n;let t=[];e.persistedDirectivesData.isDeprecated&&t.push(Lv(e.persistedDirectivesData.deprecatedReason));for(let[r,i]of e.persistedDirectivesData.directivesByDirectiveName){if(r===Ct.SEMANTIC_NON_NULL&&Cv(e)){t.push((0,oc.generateSemanticNonNullDirective)((n=(0,oc.getFirstEntry)(e.nullLevelsBySubgraphName))!=null?n:new Set([0])));continue}Ct.PERSISTED_CLIENT_DIRECTIVES.has(r)&&t.push(i[0])}return t}function q7(e,t,n){return e.node.name=(0,vl.stringToNameNode)(e.name),e.node.description=e.description,e.node.directives=jC(e,t,n),e.node}function V7(e){let t=Fv(e),n=[];for(let r of e.argumentDataByName.values())GC(r)||n.push(Q(x({},r.node),{directives:Fv(r)}));return Q(x({},e.node),{directives:t,arguments:n})}function KC(e,t,n){return e.node.name=(0,vl.stringToNameNode)(e.name),e.node.type=e.type,e.node.description=e.description,e.node.directives=jC(e,t,n),e.includeDefaultValue&&(e.node.defaultValue=e.defaultValue),e.node}function j7(e,t,n,r,i){let a=[];for(let[o,c]of t.argumentDataByArgumentName){let l=(0,oc.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(KC(c,n,r)),i&&i.add(o)}return a.length>0?(r.push((0,wv.invalidRequiredInputValueError)(Ct.DIRECTIVE_DEFINITION,`@${t.name}`,a)),!1):!0}function K7(e,t,n,r){let i=[];j7(i,t,n,r)&&e.push({arguments:i,kind:st.Kind.DIRECTIVE_DEFINITION,locations:(0,vl.setToNameNodeArray)(t.executableLocations),name:(0,vl.stringToNameNode)(t.name),repeatable:t.repeatable,description:t.description})}function G7(){return{byShareable:new Set,subgraphNamesByExternalFieldName:new Map}}function $7(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 xC;(function(e){e[e.UNION=0]="UNION",e[e.INTERSECTION=1]="INTERSECTION",e[e.CONSISTENT=2]="CONSISTENT"})(xC||(mt.MergeMethod=xC={}));function jN(e,t,n){if(e.kind===st.Kind.NON_NULL_TYPE)return t.kind!==st.Kind.NON_NULL_TYPE?!1:jN(e.type,t.type,n);if(t.kind===st.Kind.NON_NULL_TYPE)return jN(e,t.type,n);switch(e.kind){case st.Kind.NAMED_TYPE:if(t.kind===st.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===st.Kind.LIST_TYPE?jN(e.type,t.type,n):!1}}function GC(e){return e.persistedDirectivesData.directivesByDirectiveName.has(Ct.INACCESSIBLE)||e.directivesByDirectiveName.has(Ct.INACCESSIBLE)}function Q7(e){return e===st.Kind.SCALAR_TYPE_DEFINITION||e===st.Kind.ENUM_TYPE_DEFINITION}function Y7(e){switch(e.kind){case st.Kind.BOOLEAN:return e.value;case st.Kind.ENUM:case st.Kind.STRING:return e.value;case st.Kind.FLOAT:case st.Kind.INT:try{return parseFloat(e.value)}catch(t){return"NaN"}case st.Kind.NULL:return null}}function J7(e){return e.kind===st.Kind.OBJECT_TYPE_DEFINITION&&e.renamedTypeName||e.name}function H7(){return{providedBy:[],requiredBy:[]}}function z7(e,t){switch(e.kind){case st.Kind.ENUM_VALUE_DEFINITION:return`${e.parentTypeName}.${e.name}`;case st.Kind.FIELD_DEFINITION:return`${t?e.renamedParentTypeName:e.originalParentTypeName}.${e.name}`;case st.Kind.ARGUMENT:case st.Kind.INPUT_VALUE_DEFINITION:return t?e.federatedCoords:e.originalCoords;case st.Kind.OBJECT_TYPE_DEFINITION:return t?e.renamedTypeName:e.name;default:return e.name}}function W7(e){return e.kind===st.Kind.OBJECT_TYPE_DEFINITION||e.kind===st.Kind.INTERFACE_TYPE_DEFINITION}function X7(e){return{isDefinedExternal:e,isUnconditionallyProvided:!e}}function Z7(e){let{value:t,done:n}=e.configureDescriptionDataBySubgraphName.values().next();if(n)return e.description;if(t.propagate)return(0,g7.getDescriptionFromString)(t.description)||e.description}function eZ(e,t){return e.kind===t.kind}function Cv(e){return e.kind===st.Kind.FIELD_DEFINITION}function tZ(e){return Ct.INPUT_NODE_KINDS.has(e)}function nZ(e){return Ct.OUTPUT_NODE_KINDS.has(e)}});var kv={};pm(kv,{__addDisposableResource:()=>dB,__assign:()=>KN,__asyncDelegator:()=>rB,__asyncGenerator:()=>nB,__asyncValues:()=>iB,__await:()=>Ol,__awaiter:()=>zC,__classPrivateFieldGet:()=>uB,__classPrivateFieldIn:()=>lB,__classPrivateFieldSet:()=>cB,__createBinding:()=>$N,__decorate:()=>YC,__disposeResources:()=>pB,__esDecorate:()=>rZ,__exportStar:()=>XC,__extends:()=>$C,__generator:()=>WC,__importDefault:()=>oB,__importStar:()=>sB,__makeTemplateObject:()=>aB,__metadata:()=>HC,__param:()=>JC,__propKey:()=>aZ,__read:()=>Uv,__rest:()=>QC,__runInitializers:()=>iZ,__setFunctionName:()=>sZ,__spread:()=>ZC,__spreadArray:()=>tB,__spreadArrays:()=>eB,__values:()=>GN,default:()=>cZ});function $C(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Bv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function QC(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 JC(e,t){return function(n,r){t(n,r,e)}}function rZ(e,t,n,r,i,a){function o(J){if(J!==void 0&&typeof J!="function")throw new TypeError("Function expected");return J}for(var c=r.kind,l=c==="getter"?"get":c==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,f=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),y,I=!1,v=n.length-1;v>=0;v--){var F={};for(var k in r)F[k]=k==="access"?{}:r[k];for(var k in r.access)F.access[k]=r.access[k];F.addInitializer=function(J){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(J||null))};var K=(0,n[v])(c==="accessor"?{get:f.get,set:f.set}:f[l],F);if(c==="accessor"){if(K===void 0)continue;if(K===null||typeof K!="object")throw new TypeError("Object expected");(y=o(K.get))&&(f.get=y),(y=o(K.set))&&(f.set=y),(y=o(K.init))&&i.unshift(y)}else(y=o(K))&&(c==="field"?i.unshift(y):f[l]=y)}d&&Object.defineProperty(d,r.name,f),I=!0}function iZ(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 Uv(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 ZC(){for(var e=[],t=0;t1||c(I,v)})})}function c(I,v){try{l(r[I](v))}catch(F){y(a[0][3],F)}}function l(I){I.value instanceof Ol?Promise.resolve(I.value.v).then(d,f):y(a[0][2],I)}function d(I){c("next",I)}function f(I){c("throw",I)}function y(I,v){I(v),a.shift(),a.length&&c(a[0][0],a[0][1])}}function rB(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:Ol(e[i](o)),done:!1}:a?a(o):o}:a}}function iB(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 GN=="function"?GN(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 aB(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function sB(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)&&$N(t,e,n);return oZ(t,e),t}function oB(e){return e&&e.__esModule?e:{default:e}}function uB(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 cB(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 lB(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 dB(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 pB(e){function t(r){e.error=e.hasError?new uZ(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 Bv,KN,$N,oZ,uZ,cZ,Mv=ku(()=>{"use strict";m();T();N();Bv=function(e,t){return Bv=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])},Bv(e,t)};KN=function(){return KN=Object.assign||function(t){for(var n,r=1,i=arguments.length;rLB,__assign:()=>QN,__asyncDelegator:()=>OB,__asyncGenerator:()=>SB,__asyncValues:()=>DB,__await:()=>Dl,__awaiter:()=>hB,__classPrivateFieldGet:()=>PB,__classPrivateFieldIn:()=>wB,__classPrivateFieldSet:()=>FB,__createBinding:()=>JN,__decorate:()=>NB,__disposeResources:()=>CB,__esDecorate:()=>lZ,__exportStar:()=>IB,__extends:()=>fB,__generator:()=>yB,__importDefault:()=>RB,__importStar:()=>AB,__makeTemplateObject:()=>bB,__metadata:()=>EB,__param:()=>TB,__propKey:()=>pZ,__read:()=>qv,__rest:()=>mB,__runInitializers:()=>dZ,__setFunctionName:()=>fZ,__spread:()=>gB,__spreadArray:()=>vB,__spreadArrays:()=>_B,__values:()=>YN,default:()=>TZ});function fB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function mB(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 TB(e,t){return function(n,r){t(n,r,e)}}function lZ(e,t,n,r,i,a){function o(J){if(J!==void 0&&typeof J!="function")throw new TypeError("Function expected");return J}for(var c=r.kind,l=c==="getter"?"get":c==="setter"?"set":"value",d=!t&&e?r.static?e:e.prototype:null,f=t||(d?Object.getOwnPropertyDescriptor(d,r.name):{}),y,I=!1,v=n.length-1;v>=0;v--){var F={};for(var k in r)F[k]=k==="access"?{}:r[k];for(var k in r.access)F.access[k]=r.access[k];F.addInitializer=function(J){if(I)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(J||null))};var K=(0,n[v])(c==="accessor"?{get:f.get,set:f.set}:f[l],F);if(c==="accessor"){if(K===void 0)continue;if(K===null||typeof K!="object")throw new TypeError("Object expected");(y=o(K.get))&&(f.get=y),(y=o(K.set))&&(f.set=y),(y=o(K.init))&&i.unshift(y)}else(y=o(K))&&(c==="field"?i.unshift(y):f[l]=y)}d&&Object.defineProperty(d,r.name,f),I=!0}function dZ(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 qv(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 gB(){for(var e=[],t=0;t1||c(I,v)})})}function c(I,v){try{l(r[I](v))}catch(F){y(a[0][3],F)}}function l(I){I.value instanceof Dl?Promise.resolve(I.value.v).then(d,f):y(a[0][2],I)}function d(I){c("next",I)}function f(I){c("throw",I)}function y(I,v){I(v),a.shift(),a.length&&c(a[0][0],a[0][1])}}function OB(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:Dl(e[i](o)),done:!1}:a?a(o):o}:a}}function DB(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 YN=="function"?YN(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 bB(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function AB(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)&&JN(t,e,n);return mZ(t,e),t}function RB(e){return e&&e.__esModule?e:{default:e}}function PB(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 FB(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 wB(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 LB(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 CB(e){function t(r){e.error=e.hasError?new NZ(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 xv,QN,JN,mZ,NZ,TZ,UB=ku(()=>{"use strict";m();T();N();xv=function(e,t){return xv=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])},xv(e,t)};QN=function(){return QN=Object.assign||function(t){for(var n,r=1,i=arguments.length;r{"use strict";m();T();N()});var Op=w(dr=>{"use strict";m();T();N();Object.defineProperty(dr,"__esModule",{value:!0});dr.assertSome=dr.isSome=dr.compareNodes=dr.nodeToString=dr.compareStrings=dr.isValidPath=dr.isDocumentString=dr.asArray=void 0;var EZ=Ae(),hZ=e=>Array.isArray(e)?e:e?[e]:[];dr.asArray=hZ;var yZ=/\.[a-z0-9]+$/i;function IZ(e){if(typeof e!="string"||yZ.test(e))return!1;try{return(0,EZ.parse)(e),!0}catch(t){}return!1}dr.isDocumentString=IZ;var gZ=/[‘“!%^<>`]/;function _Z(e){return typeof e=="string"&&!gZ.test(e)}dr.isValidPath=_Z;function MB(e,t){return String(e)String(t)?1:0}dr.compareStrings=MB;function Vv(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}dr.nodeToString=Vv;function vZ(e,t,n){let r=Vv(e),i=Vv(t);return typeof n=="function"?n(r,i):MB(r,i)}dr.compareNodes=vZ;function SZ(e){return e!=null}dr.isSome=SZ;function OZ(e,t="Value should be something"){if(e==null)throw new Error(t)}dr.assertSome=OZ});var Dp=w(zN=>{"use strict";m();T();N();Object.defineProperty(zN,"__esModule",{value:!0});zN.inspect=void 0;var VB=3;function DZ(e){return HN(e,[])}zN.inspect=DZ;function HN(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return bZ(e,t);default:return String(e)}}function xB(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message}; ${e.stack}`}function bZ(e,t){if(e===null)return"null";if(e instanceof Error)return e.name==="AggregateError"?xB(e)+` -`+qB(e.errors,t):xB(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(AZ(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:HN(r,n)}else if(Array.isArray(e))return qB(e,n);return RZ(e,n)}function AZ(e){return typeof e.toJSON=="function"}function RZ(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>VB?"["+PZ(e)+"]":"{ "+n.map(([i,a])=>i+": "+HN(a,t)).join(", ")+" }"}function qB(e,t){if(e.length===0)return"[]";if(t.length>VB)return"[Array]";let n=e.length,r=[];for(let i=0;i{"use strict";m();T();N();Object.defineProperty(Dl,"__esModule",{value:!0});Dl.relocatedError=Dl.createGraphQLError=void 0;var jv=Ae(),FZ=["message","locations","path","nodes","source","positions","originalError","name","stack","extensions"];function wZ(e){return e!=null&&typeof e=="object"&&Object.keys(e).every(t=>FZ.includes(t))}function Kv(e,t){return t!=null&&t.originalError&&!(t.originalError instanceof Error)&&wZ(t.originalError)&&(t.originalError=Kv(t.originalError.message,t.originalError)),jv.versionInfo.major>=17?new jv.GraphQLError(e,t):new jv.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)}Dl.createGraphQLError=Kv;function LZ(e,t){return Kv(e.message,{nodes:e.nodes,source:e.source,positions:e.positions,path:t==null?e.path:t,originalError:e,extensions:e.extensions})}Dl.relocatedError=LZ});var bp=w(xi=>{"use strict";m();T();N();Object.defineProperty(xi,"__esModule",{value:!0});xi.hasOwnProperty=xi.promiseReduce=xi.isPromise=xi.isObjectLike=xi.isIterableObject=void 0;function CZ(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}xi.isIterableObject=CZ;function BZ(e){return typeof e=="object"&&e!==null}xi.isObjectLike=BZ;function jB(e){return(e==null?void 0:e.then)!=null}xi.isPromise=jB;function UZ(e,t,n){let r=n;for(let i of e)r=jB(r)?r.then(a=>t(a,i)):t(r,i);return r}xi.promiseReduce=UZ;function kZ(e,t){return Object.prototype.hasOwnProperty.call(e,t)}xi.hasOwnProperty=kZ});var $v=w(ZN=>{"use strict";m();T();N();Object.defineProperty(ZN,"__esModule",{value:!0});ZN.getArgumentValues=void 0;var Gv=Dp(),uc=Ae(),XN=WN(),MZ=bp();function xZ(e,t,n={}){var o;let r={},a=((o=t.arguments)!=null?o:[]).reduce((c,l)=>Q(x({},c),{[l.name.value]:l}),{});for(let{name:c,type:l,defaultValue:d}of e.args){let f=a[c];if(!f){if(d!==void 0)r[c]=d;else if((0,uc.isNonNullType)(l))throw(0,XN.createGraphQLError)(`Argument "${c}" of required type "${(0,Gv.inspect)(l)}" was not provided.`,{nodes:[t]});continue}let y=f.value,I=y.kind===uc.Kind.NULL;if(y.kind===uc.Kind.VARIABLE){let F=y.name.value;if(n==null||!(0,MZ.hasOwnProperty)(n,F)){if(d!==void 0)r[c]=d;else if((0,uc.isNonNullType)(l))throw(0,XN.createGraphQLError)(`Argument "${c}" of required type "${(0,Gv.inspect)(l)}" was provided the variable "$${F}" which was not provided a runtime value.`,{nodes:[y]});continue}I=n[F]==null}if(I&&(0,uc.isNonNullType)(l))throw(0,XN.createGraphQLError)(`Argument "${c}" of non-null type "${(0,Gv.inspect)(l)}" must not be null.`,{nodes:[y]});let v=(0,uc.valueFromAST)(y,l,n);if(v===void 0)throw(0,XN.createGraphQLError)(`Argument "${c}" has invalid value ${(0,uc.print)(y)}.`,{nodes:[y]});r[c]=v}return r}ZN.getArgumentValues=xZ});var Qv=w(Ma=>{"use strict";m();T();N();Object.defineProperty(Ma,"__esModule",{value:!0});Ma.getDirective=Ma.getDirectives=Ma.getDirectiveInExtensions=Ma.getDirectivesInExtensions=void 0;var GB=$v();function $B(e,t=["directives"]){return t.reduce((n,r)=>n==null?n:n[r],e==null?void 0:e.extensions)}Ma.getDirectivesInExtensions=$B;function KB(e,t){let n=e.filter(r=>r.name===t);if(n.length)return n.map(r=>{var i;return(i=r.args)!=null?i:{}})}function QB(e,t,n=["directives"]){let r=n.reduce((a,o)=>a==null?a:a[o],e==null?void 0:e.extensions);if(r===void 0)return;if(Array.isArray(r))return KB(r,t);let i=[];for(let[a,o]of Object.entries(r))if(Array.isArray(o))for(let c of o)i.push({name:a,args:c});else i.push({name:a,args:o});return KB(i,t)}Ma.getDirectiveInExtensions=QB;function qZ(e,t,n=["directives"]){let r=$B(t,n);if(r!=null&&r.length>0)return r;let a=(e&&e.getDirectives?e.getDirectives():[]).reduce((l,d)=>(l[d.name]=d,l),{}),o=[];t.astNode&&o.push(t.astNode),"extensionASTNodes"in t&&t.extensionASTNodes&&(o=[...o,...t.extensionASTNodes]);let c=[];for(let l of o)if(l.directives)for(let d of l.directives){let f=a[d.name.value];f&&c.push({name:d.name.value,args:(0,GB.getArgumentValues)(f,d)})}return c}Ma.getDirectives=qZ;function VZ(e,t,n,r=["directives"]){let i=QB(t,n,r);if(i!=null)return i;let a=e&&e.getDirective?e.getDirective(n):void 0;if(a==null)return;let o=[];t.astNode&&o.push(t.astNode),"extensionASTNodes"in t&&t.extensionASTNodes&&(o=[...o,...t.extensionASTNodes]);let c=[];for(let l of o)if(l.directives)for(let d of l.directives)d.name.value===n&&c.push((0,GB.getArgumentValues)(a,d));if(c.length)return c}Ma.getDirective=VZ});var Yv=w(eT=>{"use strict";m();T();N();Object.defineProperty(eT,"__esModule",{value:!0});eT.getFieldsWithDirectives=void 0;var jZ=Ae();function KZ(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}`,f=c.directives.map(y=>({name:y.name.value,args:(y.arguments||[]).reduce((I,v)=>Q(x({},I),{[v.name.value]:(0,jZ.valueFromASTUntyped)(v.value)}),{})}));n[d]=f}}}return n}eT.getFieldsWithDirectives=KZ});var YB=w(tT=>{"use strict";m();T();N();Object.defineProperty(tT,"__esModule",{value:!0});tT.getArgumentsWithDirectives=void 0;var Jv=Ae();function GZ(e){return e.kind===Jv.Kind.OBJECT_TYPE_DEFINITION||e.kind===Jv.Kind.OBJECT_TYPE_EXTENSION}function $Z(e){var r;let t={},n=e.definitions.filter(GZ);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(f=>({name:f.name.value,args:(f.arguments||[]).reduce((y,I)=>Q(x({},y),{[I.name.value]:(0,Jv.valueFromASTUntyped)(I.value)}),{})}));c[l.name.value]=d}}return t}tT.getArgumentsWithDirectives=$Z});var Hv=w(nT=>{"use strict";m();T();N();Object.defineProperty(nT,"__esModule",{value:!0});nT.getImplementingTypes=void 0;var QZ=Ae();function YZ(e,t){let n=t.getTypeMap(),r=[];for(let i in n){let a=n[i];(0,QZ.isObjectType)(a)&&a.getInterfaces().find(c=>c.name===e)&&r.push(a.name)}return r}nT.getImplementingTypes=YZ});var Wv=w(rT=>{"use strict";m();T();N();Object.defineProperty(rT,"__esModule",{value:!0});rT.astFromType=void 0;var JZ=Dp(),cc=Ae();function zv(e){if((0,cc.isNonNullType)(e)){let t=zv(e.ofType);if(t.kind===cc.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${(0,JZ.inspect)(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:cc.Kind.NON_NULL_TYPE,type:t}}else if((0,cc.isListType)(e))return{kind:cc.Kind.LIST_TYPE,type:zv(e.ofType)};return{kind:cc.Kind.NAMED_TYPE,name:{kind:cc.Kind.NAME,value:e.name}}}rT.astFromType=zv});var aT=w(iT=>{"use strict";m();T();N();Object.defineProperty(iT,"__esModule",{value:!0});iT.astFromValueUntyped=void 0;var xa=Ae();function Xv(e){if(e===null)return{kind:xa.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=Xv(n);r!=null&&t.push(r)}return{kind:xa.Kind.LIST,values:t}}if(typeof e=="object"){let t=[];for(let n in e){let r=e[n],i=Xv(r);i&&t.push({kind:xa.Kind.OBJECT_FIELD,name:{kind:xa.Kind.NAME,value:n},value:i})}return{kind:xa.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:xa.Kind.BOOLEAN,value:e};if(typeof e=="bigint")return{kind:xa.Kind.INT,value:String(e)};if(typeof e=="number"&&isFinite(e)){let t=String(e);return HZ.test(t)?{kind:xa.Kind.INT,value:t}:{kind:xa.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:xa.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}iT.astFromValueUntyped=Xv;var HZ=/^-?(?:0|[1-9][0-9]*)$/});var HB=w(sT=>{"use strict";m();T();N();Object.defineProperty(sT,"__esModule",{value:!0});sT.astFromValue=void 0;var zZ=Dp(),pi=Ae(),WZ=aT(),JB=bp();function Ap(e,t){if((0,pi.isNonNullType)(t)){let n=Ap(e,t.ofType);return(n==null?void 0:n.kind)===pi.Kind.NULL?null:n}if(e===null)return{kind:pi.Kind.NULL};if(e===void 0)return null;if((0,pi.isListType)(t)){let n=t.ofType;if((0,JB.isIterableObject)(e)){let r=[];for(let i of e){let a=Ap(i,n);a!=null&&r.push(a)}return{kind:pi.Kind.LIST,values:r}}return Ap(e,n)}if((0,pi.isInputObjectType)(t)){if(!(0,JB.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Ap(e[r.name],r.type);i&&n.push({kind:pi.Kind.OBJECT_FIELD,name:{kind:pi.Kind.NAME,value:r.name},value:i})}return{kind:pi.Kind.OBJECT,fields:n}}if((0,pi.isLeafType)(t)){let n=t.serialize(e);return n==null?null:(0,pi.isEnumType)(t)?{kind:pi.Kind.ENUM,value:n}:t.name==="ID"&&typeof n=="string"&&XZ.test(n)?{kind:pi.Kind.INT,value:n}:(0,WZ.astFromValueUntyped)(n)}console.assert(!1,"Unexpected input type: "+(0,zZ.inspect)(t))}sT.astFromValue=Ap;var XZ=/^-?(?:0|[1-9][0-9]*)$/});var zB=w(oT=>{"use strict";m();T();N();Object.defineProperty(oT,"__esModule",{value:!0});oT.getDescriptionNode=void 0;var ZZ=Ae();function eee(e){var t;if((t=e.astNode)!=null&&t.description)return Q(x({},e.astNode.description),{block:!0});if(e.description)return{kind:ZZ.Kind.STRING,value:e.description,block:!0}}oT.getDescriptionNode=eee});var bl=w(br=>{"use strict";m();T();N();Object.defineProperty(br,"__esModule",{value:!0});br.memoize2of5=br.memoize2of4=br.memoize5=br.memoize4=br.memoize3=br.memoize2=br.memoize1=void 0;function tee(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}}br.memoize1=tee;function nee(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}}br.memoize2=nee;function ree(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 f=e(r,i,a);return d.set(a,f),f}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}}br.memoize3=ree;function iee(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 y=new WeakMap;c.set(i,y);let I=new WeakMap;y.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 y=new WeakMap;l.set(a,y);let I=e(r,i,a,o);return y.set(o,I),I}let d=l.get(a);if(!d){let y=new WeakMap;l.set(a,y);let I=e(r,i,a,o);return y.set(o,I),I}let f=d.get(o);if(f===void 0){let y=e(r,i,a,o);return d.set(o,y),y}return f}}br.memoize4=iee;function aee(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 F=new WeakMap;v.set(a,F);let k=new WeakMap;F.set(o,k);let K=e(r,i,a,o,c);return k.set(c,K),K}let d=l.get(i);if(!d){d=new WeakMap,l.set(i,d);let v=new WeakMap;d.set(a,v);let F=new WeakMap;v.set(o,F);let k=e(r,i,a,o,c);return F.set(c,k),k}let f=d.get(a);if(!f){f=new WeakMap,d.set(a,f);let v=new WeakMap;f.set(o,v);let F=e(r,i,a,o,c);return v.set(c,F),F}let y=f.get(o);if(!y){y=new WeakMap,f.set(o,y);let v=e(r,i,a,o,c);return y.set(c,v),v}let I=y.get(c);if(I===void 0){let v=e(r,i,a,o,c);return y.set(c,v),v}return I}}br.memoize5=aee;function see(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}}br.memoize2of4=see;function oee(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 f=e(r,i,a,o,c);return l.set(i,f),f}let d=l.get(i);if(d===void 0){let f=e(r,i,a,o,c);return l.set(i,f),f}return d}}br.memoize2of5=oee});var Rp=w(fi=>{"use strict";m();T();N();Object.defineProperty(fi,"__esModule",{value:!0});fi.getRootTypeMap=fi.getRootTypes=fi.getRootTypeNames=fi.getDefinedRootType=void 0;var uee=WN(),Zv=bl();function cee(e,t,n){let i=(0,fi.getRootTypeMap)(e).get(t);if(i==null)throw(0,uee.createGraphQLError)(`Schema is not configured to execute ${t} operation.`,{nodes:n});return i}fi.getDefinedRootType=cee;fi.getRootTypeNames=(0,Zv.memoize1)(function(t){let n=(0,fi.getRootTypes)(t);return new Set([...n].map(r=>r.name))});fi.getRootTypes=(0,Zv.memoize1)(function(t){let n=(0,fi.getRootTypeMap)(t);return new Set(n.values())});fi.getRootTypeMap=(0,Zv.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 iS=w(ht=>{"use strict";m();T();N();Object.defineProperty(ht,"__esModule",{value:!0});ht.makeDirectiveNodes=ht.makeDirectiveNode=ht.makeDeprecatedDirective=ht.astFromEnumValue=ht.astFromInputField=ht.astFromField=ht.astFromScalarType=ht.astFromEnumType=ht.astFromInputObjectType=ht.astFromUnionType=ht.astFromInterfaceType=ht.astFromObjectType=ht.astFromArg=ht.getDeprecatableDirectiveNodes=ht.getDirectiveNodes=ht.astFromDirective=ht.astFromSchema=ht.printSchemaWithDirectives=ht.getDocumentNodeFromSchema=void 0;var ct=Ae(),lc=Wv(),eS=HB(),lee=aT(),qi=zB(),tS=Qv(),dee=Op(),pee=Rp();function WB(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=XB(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let c of o)(0,ct.isSpecifiedDirective)(c)||a.push(ZB(c,e,n));for(let c in r){let l=r[c],d=(0,ct.isSpecifiedScalarType)(l),f=(0,ct.isIntrospectionType)(l);if(!(d||f))if((0,ct.isObjectType)(l))a.push(eU(l,e,n));else if((0,ct.isInterfaceType)(l))a.push(tU(l,e,n));else if((0,ct.isUnionType)(l))a.push(nU(l,e,n));else if((0,ct.isInputObjectType)(l))a.push(rU(l,e,n));else if((0,ct.isEnumType)(l))a.push(iU(l,e,n));else if((0,ct.isScalarType)(l))a.push(aU(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:ct.Kind.DOCUMENT,definitions:a}}ht.getDocumentNodeFromSchema=WB;function fee(e,t={}){let n=WB(e,t);return(0,ct.print)(n)}ht.printSchemaWithDirectives=fee;function XB(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 f of d.operationTypes)n.set(f.operation,f);let i=(0,pee.getRootTypeMap)(e);for(let[d,f]of n){let y=i.get(d);if(y!=null){let I=(0,lc.astFromType)(y);f!=null?f.type=I:n.set(d,{kind:ct.Kind.OPERATION_TYPE_DEFINITION,operation:d,type:I})}}let a=[...n.values()].filter(dee.isSome),o=dc(e,e,t);if(!a.length&&!o.length)return null;let c={kind:a!=null?ct.Kind.SCHEMA_DEFINITION:ct.Kind.SCHEMA_EXTENSION,operationTypes:a,directives:o},l=(0,qi.getDescriptionNode)(e);return l&&(c.description=l),c}ht.astFromSchema=XB;function ZB(e,t,n){var r,i;return{kind:ct.Kind.DIRECTIVE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},arguments:(r=e.args)==null?void 0:r.map(a=>nS(a,t,n)),repeatable:e.isRepeatable,locations:((i=e.locations)==null?void 0:i.map(a=>({kind:ct.Kind.NAME,value:a})))||[]}}ht.astFromDirective=ZB;function dc(e,t,n){let r=(0,tS.getDirectivesInExtensions)(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=uT(t,r);else{a=[];for(let o of i)o.directives&&a.push(...o.directives)}return a}ht.getDirectiveNodes=dc;function Fp(e,t,n){var c,l;let r=[],i=null,a=(0,tS.getDirectivesInExtensions)(e,n),o;return a!=null?o=uT(t,a):o=(c=e.astNode)==null?void 0:c.directives,o!=null&&(r=o.filter(d=>d.name.value!=="deprecated"),e.deprecationReason!=null&&(i=(l=o.filter(d=>d.name.value==="deprecated"))==null?void 0:l[0])),e.deprecationReason!=null&&i==null&&(i=uU(e.deprecationReason)),i==null?r:[i].concat(r)}ht.getDeprecatableDirectiveNodes=Fp;function nS(e,t,n){var r;return{kind:ct.Kind.INPUT_VALUE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},type:(0,lc.astFromType)(e.type),defaultValue:e.defaultValue!==void 0&&(r=(0,eS.astFromValue)(e.defaultValue,e.type))!=null?r:void 0,directives:Fp(e,t,n)}}ht.astFromArg=nS;function eU(e,t,n){return{kind:ct.Kind.OBJECT_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>rS(r,t,n)),interfaces:Object.values(e.getInterfaces()).map(r=>(0,lc.astFromType)(r)),directives:dc(e,t,n)}}ht.astFromObjectType=eU;function tU(e,t,n){let r={kind:ct.Kind.INTERFACE_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(i=>rS(i,t,n)),directives:dc(e,t,n)};return"getInterfaces"in e&&(r.interfaces=Object.values(e.getInterfaces()).map(i=>(0,lc.astFromType)(i))),r}ht.astFromInterfaceType=tU;function nU(e,t,n){return{kind:ct.Kind.UNION_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},directives:dc(e,t,n),types:e.getTypes().map(r=>(0,lc.astFromType)(r))}}ht.astFromUnionType=nU;function rU(e,t,n){return{kind:ct.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>sU(r,t,n)),directives:dc(e,t,n)}}ht.astFromInputObjectType=rU;function iU(e,t,n){return{kind:ct.Kind.ENUM_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(r=>oU(r,t,n)),directives:dc(e,t,n)}}ht.astFromEnumType=iU;function aU(e,t,n){var o;let r=(0,tS.getDirectivesInExtensions)(e,n),i=r?uT(t,r):((o=e.astNode)==null?void 0:o.directives)||[],a=e.specifiedByUrl||e.specifiedByURL;if(a&&!i.some(c=>c.name.value==="specifiedBy")){let c={url:a};i.push(Pp("specifiedBy",c))}return{kind:ct.Kind.SCALAR_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},directives:i}}ht.astFromScalarType=aU;function rS(e,t,n){return{kind:ct.Kind.FIELD_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},arguments:e.args.map(r=>nS(r,t,n)),type:(0,lc.astFromType)(e.type),directives:Fp(e,t,n)}}ht.astFromField=rS;function sU(e,t,n){var r;return{kind:ct.Kind.INPUT_VALUE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},type:(0,lc.astFromType)(e.type),directives:Fp(e,t,n),defaultValue:(r=(0,eS.astFromValue)(e.defaultValue,e.type))!=null?r:void 0}}ht.astFromInputField=sU;function oU(e,t,n){return{kind:ct.Kind.ENUM_VALUE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},directives:Fp(e,t,n)}}ht.astFromEnumValue=oU;function uU(e){return Pp("deprecated",{reason:e},ct.GraphQLDeprecatedDirective)}ht.makeDeprecatedDirective=uU;function Pp(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,eS.astFromValue)(o,i.type);c&&r.push({kind:ct.Kind.ARGUMENT,name:{kind:ct.Kind.NAME,value:a},value:c})}}else for(let i in t){let a=t[i],o=(0,lee.astFromValueUntyped)(a);o&&r.push({kind:ct.Kind.ARGUMENT,name:{kind:ct.Kind.NAME,value:i},value:o})}return{kind:ct.Kind.DIRECTIVE,name:{kind:ct.Kind.NAME,value:e},arguments:r}}ht.makeDirectiveNode=Pp;function uT(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(Pp(r,o,a));else n.push(Pp(r,i,a))}return n}ht.makeDirectiveNodes=uT});var lU=w(Al=>{"use strict";m();T();N();Object.defineProperty(Al,"__esModule",{value:!0});Al.createDefaultRules=Al.validateGraphQlDocuments=void 0;var wp=Ae();function mee(e,t,n=cU()){var c;let r=new Set,i=new Map;for(let l of t)for(let d of l.definitions)d.kind===wp.Kind.FRAGMENT_DEFINITION?i.set(d.name.value,d):r.add(d);let a={kind:wp.Kind.DOCUMENT,definitions:Array.from([...r,...i.values()])},o=(0,wp.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}Al.validateGraphQlDocuments=mee;function cU(){let e=["NoUnusedFragmentsRule","NoUnusedVariablesRule","KnownDirectivesRule"];return wp.versionInfo.major<15&&(e=e.map(t=>t.replace(/Rule$/,""))),wp.specifiedRules.filter(t=>!e.includes(t.name))}Al.createDefaultRules=cU});var dU=w(cT=>{"use strict";m();T();N();Object.defineProperty(cT,"__esModule",{value:!0});cT.parseGraphQLJSON=void 0;var Nee=Ae();function Tee(e){return e=e.toString(),e.charCodeAt(0)===65279&&(e=e.slice(1)),e}function Eee(e){return JSON.parse(Tee(e))}function hee(e,t,n){let r=Eee(t);if(r.data&&(r=r.data),r.kind==="Document")return{location:e,document:r};if(r.__schema){let i=(0,Nee.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")}cT.parseGraphQLJSON=hee});var sS=w(Cn=>{"use strict";m();T();N();Object.defineProperty(Cn,"__esModule",{value:!0});Cn.getBlockStringIndentation=Cn.dedentBlockStringValue=Cn.getLeadingCommentBlock=Cn.getComment=Cn.getDescription=Cn.printWithComments=Cn.printComment=Cn.pushComment=Cn.collectComment=Cn.resetComments=void 0;var NU=Ae(),yee=80,Rl={};function Iee(){Rl={}}Cn.resetComments=Iee;function gee(e){var n;let t=(n=e.name)==null?void 0:n.value;if(t!=null)switch(Lp(e,t),e.kind){case"EnumTypeDefinition":if(e.values)for(let r of e.values)Lp(r,t,r.name.value);break;case"ObjectTypeDefinition":case"InputObjectTypeDefinition":case"InterfaceTypeDefinition":if(e.fields){for(let r of e.fields)if(Lp(r,t,r.name.value),Dee(r)&&r.arguments)for(let i of r.arguments)Lp(i,t,r.name.value,i.name.value)}break}}Cn.collectComment=gee;function Lp(e,t,n,r){let i=aS(e);if(typeof i!="string"||i.length===0)return;let a=[t];n&&(a.push(n),r&&a.push(r));let o=a.join(".");Rl[o]||(Rl[o]=[]),Rl[o].push(i)}Cn.pushComment=Lp;function TU(e){return` +`+qB(e.errors,t):xB(e);if(t.includes(e))return"[Circular]";let n=[...t,e];if(AZ(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:HN(r,n)}else if(Array.isArray(e))return qB(e,n);return RZ(e,n)}function AZ(e){return typeof e.toJSON=="function"}function RZ(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>VB?"["+PZ(e)+"]":"{ "+n.map(([i,a])=>i+": "+HN(a,t)).join(", ")+" }"}function qB(e,t){if(e.length===0)return"[]";if(t.length>VB)return"[Array]";let n=e.length,r=[];for(let i=0;i{"use strict";m();T();N();Object.defineProperty(bl,"__esModule",{value:!0});bl.relocatedError=bl.createGraphQLError=void 0;var jv=Ae(),FZ=["message","locations","path","nodes","source","positions","originalError","name","stack","extensions"];function wZ(e){return e!=null&&typeof e=="object"&&Object.keys(e).every(t=>FZ.includes(t))}function Kv(e,t){return t!=null&&t.originalError&&!(t.originalError instanceof Error)&&wZ(t.originalError)&&(t.originalError=Kv(t.originalError.message,t.originalError)),jv.versionInfo.major>=17?new jv.GraphQLError(e,t):new jv.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)}bl.createGraphQLError=Kv;function LZ(e,t){return Kv(e.message,{nodes:e.nodes,source:e.source,positions:e.positions,path:t==null?e.path:t,originalError:e,extensions:e.extensions})}bl.relocatedError=LZ});var bp=w(xi=>{"use strict";m();T();N();Object.defineProperty(xi,"__esModule",{value:!0});xi.hasOwnProperty=xi.promiseReduce=xi.isPromise=xi.isObjectLike=xi.isIterableObject=void 0;function CZ(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}xi.isIterableObject=CZ;function BZ(e){return typeof e=="object"&&e!==null}xi.isObjectLike=BZ;function jB(e){return(e==null?void 0:e.then)!=null}xi.isPromise=jB;function UZ(e,t,n){let r=n;for(let i of e)r=jB(r)?r.then(a=>t(a,i)):t(r,i);return r}xi.promiseReduce=UZ;function kZ(e,t){return Object.prototype.hasOwnProperty.call(e,t)}xi.hasOwnProperty=kZ});var $v=w(ZN=>{"use strict";m();T();N();Object.defineProperty(ZN,"__esModule",{value:!0});ZN.getArgumentValues=void 0;var Gv=Dp(),uc=Ae(),XN=WN(),MZ=bp();function xZ(e,t,n={}){var o;let r={},a=((o=t.arguments)!=null?o:[]).reduce((c,l)=>Q(x({},c),{[l.name.value]:l}),{});for(let{name:c,type:l,defaultValue:d}of e.args){let f=a[c];if(!f){if(d!==void 0)r[c]=d;else if((0,uc.isNonNullType)(l))throw(0,XN.createGraphQLError)(`Argument "${c}" of required type "${(0,Gv.inspect)(l)}" was not provided.`,{nodes:[t]});continue}let y=f.value,I=y.kind===uc.Kind.NULL;if(y.kind===uc.Kind.VARIABLE){let F=y.name.value;if(n==null||!(0,MZ.hasOwnProperty)(n,F)){if(d!==void 0)r[c]=d;else if((0,uc.isNonNullType)(l))throw(0,XN.createGraphQLError)(`Argument "${c}" of required type "${(0,Gv.inspect)(l)}" was provided the variable "$${F}" which was not provided a runtime value.`,{nodes:[y]});continue}I=n[F]==null}if(I&&(0,uc.isNonNullType)(l))throw(0,XN.createGraphQLError)(`Argument "${c}" of non-null type "${(0,Gv.inspect)(l)}" must not be null.`,{nodes:[y]});let v=(0,uc.valueFromAST)(y,l,n);if(v===void 0)throw(0,XN.createGraphQLError)(`Argument "${c}" has invalid value ${(0,uc.print)(y)}.`,{nodes:[y]});r[c]=v}return r}ZN.getArgumentValues=xZ});var Qv=w(Ma=>{"use strict";m();T();N();Object.defineProperty(Ma,"__esModule",{value:!0});Ma.getDirective=Ma.getDirectives=Ma.getDirectiveInExtensions=Ma.getDirectivesInExtensions=void 0;var GB=$v();function $B(e,t=["directives"]){return t.reduce((n,r)=>n==null?n:n[r],e==null?void 0:e.extensions)}Ma.getDirectivesInExtensions=$B;function KB(e,t){let n=e.filter(r=>r.name===t);if(n.length)return n.map(r=>{var i;return(i=r.args)!=null?i:{}})}function QB(e,t,n=["directives"]){let r=n.reduce((a,o)=>a==null?a:a[o],e==null?void 0:e.extensions);if(r===void 0)return;if(Array.isArray(r))return KB(r,t);let i=[];for(let[a,o]of Object.entries(r))if(Array.isArray(o))for(let c of o)i.push({name:a,args:c});else i.push({name:a,args:o});return KB(i,t)}Ma.getDirectiveInExtensions=QB;function qZ(e,t,n=["directives"]){let r=$B(t,n);if(r!=null&&r.length>0)return r;let a=(e&&e.getDirectives?e.getDirectives():[]).reduce((l,d)=>(l[d.name]=d,l),{}),o=[];t.astNode&&o.push(t.astNode),"extensionASTNodes"in t&&t.extensionASTNodes&&(o=[...o,...t.extensionASTNodes]);let c=[];for(let l of o)if(l.directives)for(let d of l.directives){let f=a[d.name.value];f&&c.push({name:d.name.value,args:(0,GB.getArgumentValues)(f,d)})}return c}Ma.getDirectives=qZ;function VZ(e,t,n,r=["directives"]){let i=QB(t,n,r);if(i!=null)return i;let a=e&&e.getDirective?e.getDirective(n):void 0;if(a==null)return;let o=[];t.astNode&&o.push(t.astNode),"extensionASTNodes"in t&&t.extensionASTNodes&&(o=[...o,...t.extensionASTNodes]);let c=[];for(let l of o)if(l.directives)for(let d of l.directives)d.name.value===n&&c.push((0,GB.getArgumentValues)(a,d));if(c.length)return c}Ma.getDirective=VZ});var Yv=w(eT=>{"use strict";m();T();N();Object.defineProperty(eT,"__esModule",{value:!0});eT.getFieldsWithDirectives=void 0;var jZ=Ae();function KZ(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}`,f=c.directives.map(y=>({name:y.name.value,args:(y.arguments||[]).reduce((I,v)=>Q(x({},I),{[v.name.value]:(0,jZ.valueFromASTUntyped)(v.value)}),{})}));n[d]=f}}}return n}eT.getFieldsWithDirectives=KZ});var YB=w(tT=>{"use strict";m();T();N();Object.defineProperty(tT,"__esModule",{value:!0});tT.getArgumentsWithDirectives=void 0;var Jv=Ae();function GZ(e){return e.kind===Jv.Kind.OBJECT_TYPE_DEFINITION||e.kind===Jv.Kind.OBJECT_TYPE_EXTENSION}function $Z(e){var r;let t={},n=e.definitions.filter(GZ);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(f=>({name:f.name.value,args:(f.arguments||[]).reduce((y,I)=>Q(x({},y),{[I.name.value]:(0,Jv.valueFromASTUntyped)(I.value)}),{})}));c[l.name.value]=d}}return t}tT.getArgumentsWithDirectives=$Z});var Hv=w(nT=>{"use strict";m();T();N();Object.defineProperty(nT,"__esModule",{value:!0});nT.getImplementingTypes=void 0;var QZ=Ae();function YZ(e,t){let n=t.getTypeMap(),r=[];for(let i in n){let a=n[i];(0,QZ.isObjectType)(a)&&a.getInterfaces().find(c=>c.name===e)&&r.push(a.name)}return r}nT.getImplementingTypes=YZ});var Wv=w(rT=>{"use strict";m();T();N();Object.defineProperty(rT,"__esModule",{value:!0});rT.astFromType=void 0;var JZ=Dp(),cc=Ae();function zv(e){if((0,cc.isNonNullType)(e)){let t=zv(e.ofType);if(t.kind===cc.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${(0,JZ.inspect)(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:cc.Kind.NON_NULL_TYPE,type:t}}else if((0,cc.isListType)(e))return{kind:cc.Kind.LIST_TYPE,type:zv(e.ofType)};return{kind:cc.Kind.NAMED_TYPE,name:{kind:cc.Kind.NAME,value:e.name}}}rT.astFromType=zv});var aT=w(iT=>{"use strict";m();T();N();Object.defineProperty(iT,"__esModule",{value:!0});iT.astFromValueUntyped=void 0;var xa=Ae();function Xv(e){if(e===null)return{kind:xa.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=Xv(n);r!=null&&t.push(r)}return{kind:xa.Kind.LIST,values:t}}if(typeof e=="object"){let t=[];for(let n in e){let r=e[n],i=Xv(r);i&&t.push({kind:xa.Kind.OBJECT_FIELD,name:{kind:xa.Kind.NAME,value:n},value:i})}return{kind:xa.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:xa.Kind.BOOLEAN,value:e};if(typeof e=="bigint")return{kind:xa.Kind.INT,value:String(e)};if(typeof e=="number"&&isFinite(e)){let t=String(e);return HZ.test(t)?{kind:xa.Kind.INT,value:t}:{kind:xa.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:xa.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}iT.astFromValueUntyped=Xv;var HZ=/^-?(?:0|[1-9][0-9]*)$/});var HB=w(sT=>{"use strict";m();T();N();Object.defineProperty(sT,"__esModule",{value:!0});sT.astFromValue=void 0;var zZ=Dp(),pi=Ae(),WZ=aT(),JB=bp();function Ap(e,t){if((0,pi.isNonNullType)(t)){let n=Ap(e,t.ofType);return(n==null?void 0:n.kind)===pi.Kind.NULL?null:n}if(e===null)return{kind:pi.Kind.NULL};if(e===void 0)return null;if((0,pi.isListType)(t)){let n=t.ofType;if((0,JB.isIterableObject)(e)){let r=[];for(let i of e){let a=Ap(i,n);a!=null&&r.push(a)}return{kind:pi.Kind.LIST,values:r}}return Ap(e,n)}if((0,pi.isInputObjectType)(t)){if(!(0,JB.isObjectLike)(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Ap(e[r.name],r.type);i&&n.push({kind:pi.Kind.OBJECT_FIELD,name:{kind:pi.Kind.NAME,value:r.name},value:i})}return{kind:pi.Kind.OBJECT,fields:n}}if((0,pi.isLeafType)(t)){let n=t.serialize(e);return n==null?null:(0,pi.isEnumType)(t)?{kind:pi.Kind.ENUM,value:n}:t.name==="ID"&&typeof n=="string"&&XZ.test(n)?{kind:pi.Kind.INT,value:n}:(0,WZ.astFromValueUntyped)(n)}console.assert(!1,"Unexpected input type: "+(0,zZ.inspect)(t))}sT.astFromValue=Ap;var XZ=/^-?(?:0|[1-9][0-9]*)$/});var zB=w(oT=>{"use strict";m();T();N();Object.defineProperty(oT,"__esModule",{value:!0});oT.getDescriptionNode=void 0;var ZZ=Ae();function eee(e){var t;if((t=e.astNode)!=null&&t.description)return Q(x({},e.astNode.description),{block:!0});if(e.description)return{kind:ZZ.Kind.STRING,value:e.description,block:!0}}oT.getDescriptionNode=eee});var Al=w(br=>{"use strict";m();T();N();Object.defineProperty(br,"__esModule",{value:!0});br.memoize2of5=br.memoize2of4=br.memoize5=br.memoize4=br.memoize3=br.memoize2=br.memoize1=void 0;function tee(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}}br.memoize1=tee;function nee(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}}br.memoize2=nee;function ree(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 f=e(r,i,a);return d.set(a,f),f}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}}br.memoize3=ree;function iee(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 y=new WeakMap;c.set(i,y);let I=new WeakMap;y.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 y=new WeakMap;l.set(a,y);let I=e(r,i,a,o);return y.set(o,I),I}let d=l.get(a);if(!d){let y=new WeakMap;l.set(a,y);let I=e(r,i,a,o);return y.set(o,I),I}let f=d.get(o);if(f===void 0){let y=e(r,i,a,o);return d.set(o,y),y}return f}}br.memoize4=iee;function aee(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 F=new WeakMap;v.set(a,F);let k=new WeakMap;F.set(o,k);let K=e(r,i,a,o,c);return k.set(c,K),K}let d=l.get(i);if(!d){d=new WeakMap,l.set(i,d);let v=new WeakMap;d.set(a,v);let F=new WeakMap;v.set(o,F);let k=e(r,i,a,o,c);return F.set(c,k),k}let f=d.get(a);if(!f){f=new WeakMap,d.set(a,f);let v=new WeakMap;f.set(o,v);let F=e(r,i,a,o,c);return v.set(c,F),F}let y=f.get(o);if(!y){y=new WeakMap,f.set(o,y);let v=e(r,i,a,o,c);return y.set(c,v),v}let I=y.get(c);if(I===void 0){let v=e(r,i,a,o,c);return y.set(c,v),v}return I}}br.memoize5=aee;function see(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}}br.memoize2of4=see;function oee(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 f=e(r,i,a,o,c);return l.set(i,f),f}let d=l.get(i);if(d===void 0){let f=e(r,i,a,o,c);return l.set(i,f),f}return d}}br.memoize2of5=oee});var Rp=w(fi=>{"use strict";m();T();N();Object.defineProperty(fi,"__esModule",{value:!0});fi.getRootTypeMap=fi.getRootTypes=fi.getRootTypeNames=fi.getDefinedRootType=void 0;var uee=WN(),Zv=Al();function cee(e,t,n){let i=(0,fi.getRootTypeMap)(e).get(t);if(i==null)throw(0,uee.createGraphQLError)(`Schema is not configured to execute ${t} operation.`,{nodes:n});return i}fi.getDefinedRootType=cee;fi.getRootTypeNames=(0,Zv.memoize1)(function(t){let n=(0,fi.getRootTypes)(t);return new Set([...n].map(r=>r.name))});fi.getRootTypes=(0,Zv.memoize1)(function(t){let n=(0,fi.getRootTypeMap)(t);return new Set(n.values())});fi.getRootTypeMap=(0,Zv.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 iS=w(ht=>{"use strict";m();T();N();Object.defineProperty(ht,"__esModule",{value:!0});ht.makeDirectiveNodes=ht.makeDirectiveNode=ht.makeDeprecatedDirective=ht.astFromEnumValue=ht.astFromInputField=ht.astFromField=ht.astFromScalarType=ht.astFromEnumType=ht.astFromInputObjectType=ht.astFromUnionType=ht.astFromInterfaceType=ht.astFromObjectType=ht.astFromArg=ht.getDeprecatableDirectiveNodes=ht.getDirectiveNodes=ht.astFromDirective=ht.astFromSchema=ht.printSchemaWithDirectives=ht.getDocumentNodeFromSchema=void 0;var ct=Ae(),lc=Wv(),eS=HB(),lee=aT(),qi=zB(),tS=Qv(),dee=Op(),pee=Rp();function WB(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=XB(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let c of o)(0,ct.isSpecifiedDirective)(c)||a.push(ZB(c,e,n));for(let c in r){let l=r[c],d=(0,ct.isSpecifiedScalarType)(l),f=(0,ct.isIntrospectionType)(l);if(!(d||f))if((0,ct.isObjectType)(l))a.push(eU(l,e,n));else if((0,ct.isInterfaceType)(l))a.push(tU(l,e,n));else if((0,ct.isUnionType)(l))a.push(nU(l,e,n));else if((0,ct.isInputObjectType)(l))a.push(rU(l,e,n));else if((0,ct.isEnumType)(l))a.push(iU(l,e,n));else if((0,ct.isScalarType)(l))a.push(aU(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:ct.Kind.DOCUMENT,definitions:a}}ht.getDocumentNodeFromSchema=WB;function fee(e,t={}){let n=WB(e,t);return(0,ct.print)(n)}ht.printSchemaWithDirectives=fee;function XB(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 f of d.operationTypes)n.set(f.operation,f);let i=(0,pee.getRootTypeMap)(e);for(let[d,f]of n){let y=i.get(d);if(y!=null){let I=(0,lc.astFromType)(y);f!=null?f.type=I:n.set(d,{kind:ct.Kind.OPERATION_TYPE_DEFINITION,operation:d,type:I})}}let a=[...n.values()].filter(dee.isSome),o=dc(e,e,t);if(!a.length&&!o.length)return null;let c={kind:a!=null?ct.Kind.SCHEMA_DEFINITION:ct.Kind.SCHEMA_EXTENSION,operationTypes:a,directives:o},l=(0,qi.getDescriptionNode)(e);return l&&(c.description=l),c}ht.astFromSchema=XB;function ZB(e,t,n){var r,i;return{kind:ct.Kind.DIRECTIVE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},arguments:(r=e.args)==null?void 0:r.map(a=>nS(a,t,n)),repeatable:e.isRepeatable,locations:((i=e.locations)==null?void 0:i.map(a=>({kind:ct.Kind.NAME,value:a})))||[]}}ht.astFromDirective=ZB;function dc(e,t,n){let r=(0,tS.getDirectivesInExtensions)(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=uT(t,r);else{a=[];for(let o of i)o.directives&&a.push(...o.directives)}return a}ht.getDirectiveNodes=dc;function Fp(e,t,n){var c,l;let r=[],i=null,a=(0,tS.getDirectivesInExtensions)(e,n),o;return a!=null?o=uT(t,a):o=(c=e.astNode)==null?void 0:c.directives,o!=null&&(r=o.filter(d=>d.name.value!=="deprecated"),e.deprecationReason!=null&&(i=(l=o.filter(d=>d.name.value==="deprecated"))==null?void 0:l[0])),e.deprecationReason!=null&&i==null&&(i=uU(e.deprecationReason)),i==null?r:[i].concat(r)}ht.getDeprecatableDirectiveNodes=Fp;function nS(e,t,n){var r;return{kind:ct.Kind.INPUT_VALUE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},type:(0,lc.astFromType)(e.type),defaultValue:e.defaultValue!==void 0&&(r=(0,eS.astFromValue)(e.defaultValue,e.type))!=null?r:void 0,directives:Fp(e,t,n)}}ht.astFromArg=nS;function eU(e,t,n){return{kind:ct.Kind.OBJECT_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>rS(r,t,n)),interfaces:Object.values(e.getInterfaces()).map(r=>(0,lc.astFromType)(r)),directives:dc(e,t,n)}}ht.astFromObjectType=eU;function tU(e,t,n){let r={kind:ct.Kind.INTERFACE_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(i=>rS(i,t,n)),directives:dc(e,t,n)};return"getInterfaces"in e&&(r.interfaces=Object.values(e.getInterfaces()).map(i=>(0,lc.astFromType)(i))),r}ht.astFromInterfaceType=tU;function nU(e,t,n){return{kind:ct.Kind.UNION_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},directives:dc(e,t,n),types:e.getTypes().map(r=>(0,lc.astFromType)(r))}}ht.astFromUnionType=nU;function rU(e,t,n){return{kind:ct.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(r=>sU(r,t,n)),directives:dc(e,t,n)}}ht.astFromInputObjectType=rU;function iU(e,t,n){return{kind:ct.Kind.ENUM_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(r=>oU(r,t,n)),directives:dc(e,t,n)}}ht.astFromEnumType=iU;function aU(e,t,n){var o;let r=(0,tS.getDirectivesInExtensions)(e,n),i=r?uT(t,r):((o=e.astNode)==null?void 0:o.directives)||[],a=e.specifiedByUrl||e.specifiedByURL;if(a&&!i.some(c=>c.name.value==="specifiedBy")){let c={url:a};i.push(Pp("specifiedBy",c))}return{kind:ct.Kind.SCALAR_TYPE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},directives:i}}ht.astFromScalarType=aU;function rS(e,t,n){return{kind:ct.Kind.FIELD_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},arguments:e.args.map(r=>nS(r,t,n)),type:(0,lc.astFromType)(e.type),directives:Fp(e,t,n)}}ht.astFromField=rS;function sU(e,t,n){var r;return{kind:ct.Kind.INPUT_VALUE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},type:(0,lc.astFromType)(e.type),directives:Fp(e,t,n),defaultValue:(r=(0,eS.astFromValue)(e.defaultValue,e.type))!=null?r:void 0}}ht.astFromInputField=sU;function oU(e,t,n){return{kind:ct.Kind.ENUM_VALUE_DEFINITION,description:(0,qi.getDescriptionNode)(e),name:{kind:ct.Kind.NAME,value:e.name},directives:Fp(e,t,n)}}ht.astFromEnumValue=oU;function uU(e){return Pp("deprecated",{reason:e},ct.GraphQLDeprecatedDirective)}ht.makeDeprecatedDirective=uU;function Pp(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,eS.astFromValue)(o,i.type);c&&r.push({kind:ct.Kind.ARGUMENT,name:{kind:ct.Kind.NAME,value:a},value:c})}}else for(let i in t){let a=t[i],o=(0,lee.astFromValueUntyped)(a);o&&r.push({kind:ct.Kind.ARGUMENT,name:{kind:ct.Kind.NAME,value:i},value:o})}return{kind:ct.Kind.DIRECTIVE,name:{kind:ct.Kind.NAME,value:e},arguments:r}}ht.makeDirectiveNode=Pp;function uT(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(Pp(r,o,a));else n.push(Pp(r,i,a))}return n}ht.makeDirectiveNodes=uT});var lU=w(Rl=>{"use strict";m();T();N();Object.defineProperty(Rl,"__esModule",{value:!0});Rl.createDefaultRules=Rl.validateGraphQlDocuments=void 0;var wp=Ae();function mee(e,t,n=cU()){var c;let r=new Set,i=new Map;for(let l of t)for(let d of l.definitions)d.kind===wp.Kind.FRAGMENT_DEFINITION?i.set(d.name.value,d):r.add(d);let a={kind:wp.Kind.DOCUMENT,definitions:Array.from([...r,...i.values()])},o=(0,wp.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}Rl.validateGraphQlDocuments=mee;function cU(){let e=["NoUnusedFragmentsRule","NoUnusedVariablesRule","KnownDirectivesRule"];return wp.versionInfo.major<15&&(e=e.map(t=>t.replace(/Rule$/,""))),wp.specifiedRules.filter(t=>!e.includes(t.name))}Rl.createDefaultRules=cU});var dU=w(cT=>{"use strict";m();T();N();Object.defineProperty(cT,"__esModule",{value:!0});cT.parseGraphQLJSON=void 0;var Nee=Ae();function Tee(e){return e=e.toString(),e.charCodeAt(0)===65279&&(e=e.slice(1)),e}function Eee(e){return JSON.parse(Tee(e))}function hee(e,t,n){let r=Eee(t);if(r.data&&(r=r.data),r.kind==="Document")return{location:e,document:r};if(r.__schema){let i=(0,Nee.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")}cT.parseGraphQLJSON=hee});var sS=w(Cn=>{"use strict";m();T();N();Object.defineProperty(Cn,"__esModule",{value:!0});Cn.getBlockStringIndentation=Cn.dedentBlockStringValue=Cn.getLeadingCommentBlock=Cn.getComment=Cn.getDescription=Cn.printWithComments=Cn.printComment=Cn.pushComment=Cn.collectComment=Cn.resetComments=void 0;var NU=Ae(),yee=80,Pl={};function Iee(){Pl={}}Cn.resetComments=Iee;function gee(e){var n;let t=(n=e.name)==null?void 0:n.value;if(t!=null)switch(Lp(e,t),e.kind){case"EnumTypeDefinition":if(e.values)for(let r of e.values)Lp(r,t,r.name.value);break;case"ObjectTypeDefinition":case"InputObjectTypeDefinition":case"InterfaceTypeDefinition":if(e.fields){for(let r of e.fields)if(Lp(r,t,r.name.value),Dee(r)&&r.arguments)for(let i of r.arguments)Lp(i,t,r.name.value,i.name.value)}break}}Cn.collectComment=gee;function Lp(e,t,n,r){let i=aS(e);if(typeof i!="string"||i.length===0)return;let a=[t];n&&(a.push(n),r&&a.push(r));let o=a.join(".");Pl[o]||(Pl[o]=[]),Pl[o].push(i)}Cn.pushComment=Lp;function TU(e){return` # `+e.replace(/\n/g,` # `)}Cn.printComment=TU;function Me(e,t){return e?e.filter(n=>n).join(t||""):""}function pU(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(` -`)))!=null?t:!1}function _ee(e){return(t,n,r,i,a)=>{var f;let o=[],c=i.reduce((y,I)=>(["fields","arguments","values"].includes(I)&&y.name&&o.push(y.name.value),y[I]),a[0]),l=[...o,(f=c==null?void 0:c.name)==null?void 0:f.value].filter(Boolean).join("."),d=[];return t.kind.includes("Definition")&&Rl[l]&&d.push(...Rl[l]),Me([...d.map(TU),t.description,e(t,n,r,i,a)],` +`)))!=null?t:!1}function _ee(e){return(t,n,r,i,a)=>{var f;let o=[],c=i.reduce((y,I)=>(["fields","arguments","values"].includes(I)&&y.name&&o.push(y.name.value),y[I]),a[0]),l=[...o,(f=c==null?void 0:c.name)==null?void 0:f.value].filter(Boolean).join("."),d=[];return t.kind.includes("Definition")&&Pl[l]&&d.push(...Pl[l]),Me([...d.map(TU),t.description,e(t,n,r,i,a)],` `)}}function Cp(e){return e&&` ${e.replace(/\n/g,` `)}`}function ca(e){return e&&e.length!==0?`{ ${Cp(Me(e,` @@ -227,11 +227,11 @@ ${t}`)}Cn.getComment=aS;function EU(e){let t=e.loc;if(!t)return;let n=[],r=t.sta `)}Cn.dedentBlockStringValue=hU;function yU(e){let t=null;for(let n=1;n{"use strict";m();T();N();Object.defineProperty(pu,"__esModule",{value:!0});pu.isDescribable=pu.transformCommentsToDescriptions=pu.parseGraphQLSDL=void 0;var Vi=Ae(),gU=sS();function Aee(e,t,n={}){let r;try{n.commentDescriptions&&t.includes("#")?(r=_U(t,n),n.noLocation&&(r=(0,Vi.parse)((0,Vi.print)(r),n))):r=(0,Vi.parse)(new Vi.Source(t,e),n)}catch(i){if(i.message.includes("EOF")&&t.replace(/(\#[^*]*)/g,"").trim()==="")r={kind:Vi.Kind.DOCUMENT,definitions:[]};else throw i}return{location:e,document:r}}pu.parseGraphQLSDL=Aee;function _U(e,t={}){let n=(0,Vi.parse)(e,Q(x({},t),{noLocation:!1}));return(0,Vi.visit)(n,{leave:i=>{if(vU(i)){let a=(0,gU.getLeadingCommentBlock)(i);if(a!==void 0){let o=(0,gU.dedentBlockStringValue)(` `+a),c=o.includes(` `);return i.description?Q(x({},i),{description:Q(x({},i.description),{value:i.description.value+` -`+o,block:!0})}):Q(x({},i),{description:{kind:Vi.Kind.STRING,value:o,block:c}})}}}})}pu.transformCommentsToDescriptions=_U;function vU(e){return(0,Vi.isTypeSystemDefinitionNode)(e)||e.kind===Vi.Kind.FIELD_DEFINITION||e.kind===Vi.Kind.INPUT_VALUE_DEFINITION||e.kind===Vi.Kind.ENUM_VALUE_DEFINITION}pu.isDescribable=vU});var wU=w(dT=>{"use strict";m();T();N();Object.defineProperty(dT,"__esModule",{value:!0});dT.buildOperationNodeForField=void 0;var lt=Ae(),AU=Rp(),cS=[],lT=new Map;function RU(e){cS.push(e)}function OU(){cS=[]}function DU(){lT=new Map}function Ree({schema:e,kind:t,field:n,models:r,ignore:i=[],depthLimit:a,circularReferenceDepth:o,argNames:c,selectedFields:l=!0}){OU(),DU();let d=(0,AU.getRootTypeNames)(e),f=Pee({schema:e,fieldName:n,kind:t,models:r||[],ignore:i,depthLimit:a||1/0,circularReferenceDepth:o||1,argNames:c,selectedFields:l,rootTypeNames:d});return f.variableDefinitions=[...cS],OU(),DU(),f}dT.buildOperationNodeForField=Ree;function Pee({schema:e,fieldName:t,kind:n,models:r,ignore:i,depthLimit:a,circularReferenceDepth:o,argNames:c,selectedFields:l,rootTypeNames:d}){let f=(0,AU.getDefinedRootType)(e,n),y=f.getFields()[t],I=`${t}_${n}`;if(y.args)for(let v of y.args){let F=v.name;(!c||c.includes(F))&&RU(PU(v,F))}return{kind:lt.Kind.OPERATION_DEFINITION,operation:n,name:{kind:lt.Kind.NAME,value:I},variableDefinitions:[],selectionSet:{kind:lt.Kind.SELECTION_SET,selections:[FU({type:f,field:y,models:r,firstCall:!0,path:[],ancestors:[],ignore:i,depthLimit:a,circularReferenceDepth:o,schema:e,depth:0,argNames:c,selectedFields:l,rootTypeNames:d})]}}}function uS({parent:e,type:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:I,rootTypeNames:v}){if(!(typeof I=="boolean"&&f>c)){if((0,lt.isUnionType)(t)){let F=t.getTypes();return{kind:lt.Kind.SELECTION_SET,selections:F.filter(k=>!oS([...a,k],{depth:l})).map(k=>({kind:lt.Kind.INLINE_FRAGMENT,typeCondition:{kind:lt.Kind.NAMED_TYPE,name:{kind:lt.Kind.NAME,value:k.name}},selectionSet:uS({parent:t,type:k,models:n,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:I,rootTypeNames:v})})).filter(k=>{var K,J;return((J=(K=k==null?void 0:k.selectionSet)==null?void 0:K.selections)==null?void 0:J.length)>0})}}if((0,lt.isInterfaceType)(t)){let F=Object.values(d.getTypeMap()).filter(k=>(0,lt.isObjectType)(k)&&k.getInterfaces().includes(t));return{kind:lt.Kind.SELECTION_SET,selections:F.filter(k=>!oS([...a,k],{depth:l})).map(k=>({kind:lt.Kind.INLINE_FRAGMENT,typeCondition:{kind:lt.Kind.NAMED_TYPE,name:{kind:lt.Kind.NAME,value:k.name}},selectionSet:uS({parent:t,type:k,models:n,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:I,rootTypeNames:v})})).filter(k=>{var K,J;return((J=(K=k==null?void 0:k.selectionSet)==null?void 0:K.selections)==null?void 0:J.length)>0})}}if((0,lt.isObjectType)(t)&&!v.has(t.name)){let F=o.includes(t.name)||o.includes(`${e.name}.${i[i.length-1]}`),k=n.includes(t.name);if(!r&&k&&!F)return{kind:lt.Kind.SELECTION_SET,selections:[{kind:lt.Kind.FIELD,name:{kind:lt.Kind.NAME,value:"id"}}]};let K=t.getFields();return{kind:lt.Kind.SELECTION_SET,selections:Object.keys(K).filter(J=>!oS([...a,(0,lt.getNamedType)(K[J].type)],{depth:l})).map(J=>{let se=typeof I=="object"?I[J]:!0;return se?FU({type:t,field:K[J],models:n,path:[...i,J],ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:se,rootTypeNames:v}):null}).filter(J=>{var se,ie;return J==null?!1:"selectionSet"in J?!!((ie=(se=J.selectionSet)==null?void 0:se.selections)!=null&&ie.length):!0})}}}}function PU(e,t){function n(r){return(0,lt.isListType)(r)?{kind:lt.Kind.LIST_TYPE,type:n(r.ofType)}:(0,lt.isNonNullType)(r)?{kind:lt.Kind.NON_NULL_TYPE,type:n(r.ofType)}:{kind:lt.Kind.NAMED_TYPE,name:{kind:lt.Kind.NAME,value:r.name}}}return{kind:lt.Kind.VARIABLE_DEFINITION,variable:{kind:lt.Kind.VARIABLE,name:{kind:lt.Kind.NAME,value:t||e.name}},type:n(e.type)}}function bU(e,t){return[...t,e].join("_")}function FU({type:e,field:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:I,rootTypeNames:v}){let F=(0,lt.getNamedType)(t.type),k=[],K=!1;if(t.args&&t.args.length&&(k=t.args.map(Te=>{let de=bU(Te.name,i);return y&&!y.includes(de)?((0,lt.isNonNullType)(Te.type)&&(K=!0),null):(r||RU(PU(Te,de)),{kind:lt.Kind.ARGUMENT,name:{kind:lt.Kind.NAME,value:Te.name},value:{kind:lt.Kind.VARIABLE,name:{kind:lt.Kind.NAME,value:bU(Te.name,i)}}})}).filter(Boolean)),K)return null;let J=[...i,t.name],se=J.join("."),ie=t.name;return lT.has(se)&&lT.get(se)!==t.type.toString()&&(ie+=t.type.toString().replace("!","NonNull").replace("[","List").replace("]","")),lT.set(se,t.type.toString()),!(0,lt.isScalarType)(F)&&!(0,lt.isEnumType)(F)?Q(x({kind:lt.Kind.FIELD,name:{kind:lt.Kind.NAME,value:t.name}},ie!==t.name&&{alias:{kind:lt.Kind.NAME,value:ie}}),{selectionSet:uS({parent:e,type:F,models:n,firstCall:r,path:J,ancestors:[...a,e],ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f+1,argNames:y,selectedFields:I,rootTypeNames:v})||void 0,arguments:k}):Q(x({kind:lt.Kind.FIELD,name:{kind:lt.Kind.NAME,value:t.name}},ie!==t.name&&{alias:{kind:lt.Kind.NAME,value:ie}}),{arguments:k})}function oS(e,t={depth:1}){let n=e[e.length-1];return(0,lt.isScalarType)(n)?!1:e.filter(i=>i.name===n.name).length>t.depth}});var CU=w(pT=>{"use strict";m();T();N();Object.defineProperty(pT,"__esModule",{value:!0});pT.DirectiveLocation=void 0;var LU;(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"})(LU||(pT.DirectiveLocation=LU={}))});var pc=w(fT=>{"use strict";m();T();N();Object.defineProperty(fT,"__esModule",{value:!0});fT.MapperKind=void 0;var BU;(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"})(BU||(fT.MapperKind=BU={}))});var lS=w(mT=>{"use strict";m();T();N();Object.defineProperty(mT,"__esModule",{value:!0});mT.getObjectTypeFromTypeMap=void 0;var Fee=Ae();function wee(e,t){if(t){let n=e[t.name];if((0,Fee.isObjectType)(n))return n}}mT.getObjectTypeFromTypeMap=wee});var fS=w(qa=>{"use strict";m();T();N();Object.defineProperty(qa,"__esModule",{value:!0});qa.getBuiltInForStub=qa.isNamedStub=qa.createStub=qa.createNamedStub=void 0;var pr=Ae();function dS(e,t){let n;return t==="object"?n=pr.GraphQLObjectType:t==="interface"?n=pr.GraphQLInterfaceType:n=pr.GraphQLInputObjectType,new n({name:e,fields:{_fake:{type:pr.GraphQLString}}})}qa.createNamedStub=dS;function pS(e,t){switch(e.kind){case pr.Kind.LIST_TYPE:return new pr.GraphQLList(pS(e.type,t));case pr.Kind.NON_NULL_TYPE:return new pr.GraphQLNonNull(pS(e.type,t));default:return t==="output"?dS(e.name.value,"object"):dS(e.name.value,"input")}}qa.createStub=pS;function Lee(e){if("getFields"in e){let t=e.getFields();for(let n in t)return t[n].name==="_fake"}return!1}qa.isNamedStub=Lee;function Cee(e){switch(e.name){case pr.GraphQLInt.name:return pr.GraphQLInt;case pr.GraphQLFloat.name:return pr.GraphQLFloat;case pr.GraphQLString.name:return pr.GraphQLString;case pr.GraphQLBoolean.name:return pr.GraphQLBoolean;case pr.GraphQLID.name:return pr.GraphQLID;default:return e}}qa.getBuiltInForStub=Cee});var TT=w(NT=>{"use strict";m();T();N();Object.defineProperty(NT,"__esModule",{value:!0});NT.rewireTypes=void 0;var Yn=Ae(),UU=fS();function Bee(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 F=v.name;if(!F.startsWith("__")){if(r[F]!=null){console.warn(`Duplicate schema type name ${F} found; keeping the existing one found in the schema`);continue}r[F]=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,Yn.isSpecifiedDirective)(I))return I;let v=I.toConfig();return v.args=o(v.args),new Yn.GraphQLDirective(v)}function o(I){let v={};for(let F in I){let k=I[F],K=y(k.type);K!=null&&(k.type=K,v[F]=k)}return v}function c(I){if((0,Yn.isObjectType)(I)){let v=I.toConfig(),F=Q(x({},v),{fields:()=>l(v.fields),interfaces:()=>f(v.interfaces)});return new Yn.GraphQLObjectType(F)}else if((0,Yn.isInterfaceType)(I)){let v=I.toConfig(),F=Q(x({},v),{fields:()=>l(v.fields)});return"interfaces"in F&&(F.interfaces=()=>f(v.interfaces)),new Yn.GraphQLInterfaceType(F)}else if((0,Yn.isUnionType)(I)){let v=I.toConfig(),F=Q(x({},v),{types:()=>f(v.types)});return new Yn.GraphQLUnionType(F)}else if((0,Yn.isInputObjectType)(I)){let v=I.toConfig(),F=Q(x({},v),{fields:()=>d(v.fields)});return new Yn.GraphQLInputObjectType(F)}else if((0,Yn.isEnumType)(I)){let v=I.toConfig();return new Yn.GraphQLEnumType(v)}else if((0,Yn.isScalarType)(I)){if((0,Yn.isSpecifiedScalarType)(I))return I;let v=I.toConfig();return new Yn.GraphQLScalarType(v)}throw new Error(`Unexpected schema type: ${I}`)}function l(I){let v={};for(let F in I){let k=I[F],K=y(k.type);K!=null&&k.args&&(k.type=K,k.args=o(k.args),v[F]=k)}return v}function d(I){let v={};for(let F in I){let k=I[F],K=y(k.type);K!=null&&(k.type=K,v[F]=k)}return v}function f(I){let v=[];for(let F of I){let k=y(F);k!=null&&v.push(k)}return v}function y(I){if((0,Yn.isListType)(I)){let v=y(I.ofType);return v!=null?new Yn.GraphQLList(v):null}else if((0,Yn.isNonNullType)(I)){let v=y(I.ofType);return v!=null?new Yn.GraphQLNonNull(v):null}else if((0,Yn.isNamedType)(I)){let v=n[I.name];return v===void 0&&(v=(0,UU.isNamedStub)(I)?(0,UU.getBuiltInForStub)(I):c(I),r[v.name]=n[I.name]=v),v!=null?r[v.name]:null}return null}}NT.rewireTypes=Bee});var mS=w(Va=>{"use strict";m();T();N();Object.defineProperty(Va,"__esModule",{value:!0});Va.parseInputValueLiteral=Va.parseInputValue=Va.serializeInputValue=Va.transformInputValue=void 0;var ET=Ae(),Uee=Op();function Pl(e,t,n=null,r=null){if(t==null)return t;let i=(0,ET.getNullableType)(e);if((0,ET.isLeafType)(i))return n!=null?n(i,t):t;if((0,ET.isListType)(i))return(0,Uee.asArray)(t).map(a=>Pl(i.ofType,a,n,r));if((0,ET.isInputObjectType)(i)){let a=i.getFields(),o={};for(let c in t){let l=a[c];l!=null&&(o[c]=Pl(l.type,t[c],n,r))}return r!=null?r(i,o):o}}Va.transformInputValue=Pl;function kee(e,t){return Pl(e,t,(n,r)=>{try{return n.serialize(r)}catch(i){return r}})}Va.serializeInputValue=kee;function Mee(e,t){return Pl(e,t,(n,r)=>{try{return n.parseValue(r)}catch(i){return r}})}Va.parseInputValue=Mee;function xee(e,t){return Pl(e,t,(n,r)=>n.parseLiteral(r,{}))}Va.parseInputValueLiteral=xee});var Ll=w(wl=>{"use strict";m();T();N();Object.defineProperty(wl,"__esModule",{value:!0});wl.correctASTNodes=wl.mapSchema=void 0;var it=Ae(),Fl=lS(),bt=pc(),qee=TT(),kU=mS();function Vee(e,t={}){let n=qU(xU(NS(MU(jee(NS(MU(e.getTypeMap(),e,kU.serializeInputValue),e,t,c=>(0,it.isLeafType)(c)),e,t),e,kU.parseInputValue),e,t,c=>!(0,it.isLeafType)(c)),e,t),e,t),r=e.getDirectives(),i=Kee(r,e,t),{typeMap:a,directives:o}=(0,qee.rewireTypes)(n,i);return new it.GraphQLSchema(Q(x({},e.toConfig()),{query:(0,Fl.getObjectTypeFromTypeMap)(a,(0,Fl.getObjectTypeFromTypeMap)(n,e.getQueryType())),mutation:(0,Fl.getObjectTypeFromTypeMap)(a,(0,Fl.getObjectTypeFromTypeMap)(n,e.getMutationType())),subscription:(0,Fl.getObjectTypeFromTypeMap)(a,(0,Fl.getObjectTypeFromTypeMap)(n,e.getSubscriptionType())),types:Object.values(a),directives:o}))}wl.mapSchema=Vee;function NS(e,t,n,r=()=>!0){let i={};for(let a in e)if(!a.startsWith("__")){let o=e[a];if(o==null||!r(o)){i[a]=o;continue}let c=$ee(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 jee(e,t,n){let r=zee(n);return r?NS(e,t,{[bt.MapperKind.ENUM_TYPE]:i=>{let a=i.toConfig(),o=a.values,c={};for(let l in o){let d=o[l],f=r(d,i.name,t,l);if(f===void 0)c[l]=d;else if(Array.isArray(f)){let[y,I]=f;c[y]=I===void 0?d:I}else f!==null&&(c[l]=f)}return Bp(new it.GraphQLEnumType(Q(x({},a),{values:c})))}},i=>(0,it.isEnumType)(i)):e}function MU(e,t,n){let r=qU(e,t,{[bt.MapperKind.ARGUMENT]:i=>{if(i.defaultValue===void 0)return i;let a=hT(e,i.type);if(a!=null)return Q(x({},i),{defaultValue:n(a,i.defaultValue)})}});return xU(r,t,{[bt.MapperKind.INPUT_OBJECT_FIELD]:i=>{if(i.defaultValue===void 0)return i;let a=hT(r,i.type);if(a!=null)return Q(x({},i),{defaultValue:n(a,i.defaultValue)})}})}function hT(e,t){if((0,it.isListType)(t)){let n=hT(e,t.ofType);return n!=null?new it.GraphQLList(n):null}else if((0,it.isNonNullType)(t)){let n=hT(e,t.ofType);return n!=null?new it.GraphQLNonNull(n):null}else if((0,it.isNamedType)(t)){let n=e[t.name];return n!=null?n:null}return null}function xU(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,it.isObjectType)(a)&&!(0,it.isInterfaceType)(a)&&!(0,it.isInputObjectType)(a)){r[i]=a;continue}let o=Yee(t,n,i);if(o==null){r[i]=a;continue}let c=a.toConfig(),l=c.fields,d={};for(let f in l){let y=l[f],I=o(y,f,i,t);if(I===void 0)d[f]=y;else if(Array.isArray(I)){let[v,F]=I;F.astNode!=null&&(F.astNode=Q(x({},F.astNode),{name:Q(x({},F.astNode.name),{value:v})})),d[v]=F===void 0?y:F}else I!==null&&(d[f]=I)}(0,it.isObjectType)(a)?r[i]=Bp(new it.GraphQLObjectType(Q(x({},c),{fields:d}))):(0,it.isInterfaceType)(a)?r[i]=Bp(new it.GraphQLInterfaceType(Q(x({},c),{fields:d}))):r[i]=Bp(new it.GraphQLInputObjectType(Q(x({},c),{fields:d})))}return r}function qU(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,it.isObjectType)(a)&&!(0,it.isInterfaceType)(a)){r[i]=a;continue}let o=Jee(n);if(o==null){r[i]=a;continue}let c=a.toConfig(),l=c.fields,d={};for(let f in l){let y=l[f],I=y.args;if(I==null){d[f]=y;continue}let v=Object.keys(I);if(!v.length){d[f]=y;continue}let F={};for(let k of v){let K=I[k],J=o(K,f,i,t);if(J===void 0)F[k]=K;else if(Array.isArray(J)){let[se,ie]=J;F[se]=ie}else J!==null&&(F[k]=J)}d[f]=Q(x({},y),{args:F})}(0,it.isObjectType)(a)?r[i]=new it.GraphQLObjectType(Q(x({},c),{fields:d})):(0,it.isInterfaceType)(a)?r[i]=new it.GraphQLInterfaceType(Q(x({},c),{fields:d})):r[i]=new it.GraphQLInputObjectType(Q(x({},c),{fields:d}))}return r}function Kee(e,t,n){let r=Hee(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 Gee(e,t){var i,a,o;let n=e.getType(t),r=[bt.MapperKind.TYPE];return(0,it.isObjectType)(n)?(r.push(bt.MapperKind.COMPOSITE_TYPE,bt.MapperKind.OBJECT_TYPE),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(bt.MapperKind.ROOT_OBJECT,bt.MapperKind.QUERY):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(bt.MapperKind.ROOT_OBJECT,bt.MapperKind.MUTATION):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(bt.MapperKind.ROOT_OBJECT,bt.MapperKind.SUBSCRIPTION)):(0,it.isInputObjectType)(n)?r.push(bt.MapperKind.INPUT_OBJECT_TYPE):(0,it.isInterfaceType)(n)?r.push(bt.MapperKind.COMPOSITE_TYPE,bt.MapperKind.ABSTRACT_TYPE,bt.MapperKind.INTERFACE_TYPE):(0,it.isUnionType)(n)?r.push(bt.MapperKind.COMPOSITE_TYPE,bt.MapperKind.ABSTRACT_TYPE,bt.MapperKind.UNION_TYPE):(0,it.isEnumType)(n)?r.push(bt.MapperKind.ENUM_TYPE):(0,it.isScalarType)(n)&&r.push(bt.MapperKind.SCALAR_TYPE),r}function $ee(e,t,n){let r=Gee(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function Qee(e,t){var i,a,o;let n=e.getType(t),r=[bt.MapperKind.FIELD];return(0,it.isObjectType)(n)?(r.push(bt.MapperKind.COMPOSITE_FIELD,bt.MapperKind.OBJECT_FIELD),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(bt.MapperKind.ROOT_FIELD,bt.MapperKind.QUERY_ROOT_FIELD):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(bt.MapperKind.ROOT_FIELD,bt.MapperKind.MUTATION_ROOT_FIELD):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(bt.MapperKind.ROOT_FIELD,bt.MapperKind.SUBSCRIPTION_ROOT_FIELD)):(0,it.isInterfaceType)(n)?r.push(bt.MapperKind.COMPOSITE_FIELD,bt.MapperKind.INTERFACE_FIELD):(0,it.isInputObjectType)(n)&&r.push(bt.MapperKind.INPUT_OBJECT_FIELD),r}function Yee(e,t,n){let r=Qee(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function Jee(e){let t=e[bt.MapperKind.ARGUMENT];return t!=null?t:null}function Hee(e){let t=e[bt.MapperKind.DIRECTIVE];return t!=null?t:null}function zee(e){let t=e[bt.MapperKind.ENUM_VALUE];return t!=null?t:null}function Bp(e){if((0,it.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(x({},t.astNode),{kind:it.Kind.OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(x({},n),{kind:it.Kind.OBJECT_TYPE_EXTENSION,fields:void 0}))),new it.GraphQLObjectType(t)}else if((0,it.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(x({},t.astNode),{kind:it.Kind.INTERFACE_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(x({},n),{kind:it.Kind.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new it.GraphQLInterfaceType(t)}else if((0,it.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(x({},t.astNode),{kind:it.Kind.INPUT_OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(x({},n),{kind:it.Kind.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new it.GraphQLInputObjectType(t)}else if((0,it.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(x({},t.astNode),{values:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(x({},n),{values:void 0}))),new it.GraphQLEnumType(t)}else return e}wl.correctASTNodes=Bp});var VU=w(IT=>{"use strict";m();T();N();Object.defineProperty(IT,"__esModule",{value:!0});IT.filterSchema=void 0;var yT=Ae(),Os=pc(),Wee=Ll();function Xee({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}){return(0,Wee.mapSchema)(e,{[Os.MapperKind.QUERY]:d=>TS(d,"Query",r,c),[Os.MapperKind.MUTATION]:d=>TS(d,"Mutation",r,c),[Os.MapperKind.SUBSCRIPTION]:d=>TS(d,"Subscription",r,c),[Os.MapperKind.OBJECT_TYPE]:d=>t(d.name,d)?ES(yT.GraphQLObjectType,d,i||n,c):null,[Os.MapperKind.INTERFACE_TYPE]:d=>t(d.name,d)?ES(yT.GraphQLInterfaceType,d,a||n,c):null,[Os.MapperKind.INPUT_OBJECT_TYPE]:d=>t(d.name,d)?ES(yT.GraphQLInputObjectType,d,o||n):null,[Os.MapperKind.UNION_TYPE]:d=>t(d.name,d)?void 0:null,[Os.MapperKind.ENUM_TYPE]:d=>t(d.name,d)?void 0:null,[Os.MapperKind.SCALAR_TYPE]:d=>t(d.name,d)?void 0:null})}IT.filterSchema=Xee;function TS(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(t,a,c,o.args[c])||delete o.args[c]}return new yT.GraphQLObjectType(i)}return e}function ES(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 KU=w(Cl=>{"use strict";m();T();N();Object.defineProperty(Cl,"__esModule",{value:!0});Cl.healTypes=Cl.healSchema=void 0;var ja=Ae();function Zee(e){return jU(e.getTypeMap(),e.getDirectives()),e}Cl.healSchema=Zee;function jU(e,t){let n=Object.create(null);for(let d in e){let f=e[d];if(f==null||d.startsWith("__"))continue;let y=f.name;if(!y.startsWith("__")){if(n[y]!=null){console.warn(`Duplicate schema type name ${y} found; keeping the existing one found in the schema`);continue}n[y]=f}}for(let d in n){let f=n[d];e[d]=f}for(let d of t)d.args=d.args.filter(f=>(f.type=l(f.type),f.type!==null));for(let d in e){let f=e[d];!d.startsWith("__")&&d in n&&f!=null&&r(f)}for(let d in e)!d.startsWith("__")&&!(d in n)&&delete e[d];function r(d){if((0,ja.isObjectType)(d)){i(d),a(d);return}else if((0,ja.isInterfaceType)(d)){i(d),"getInterfaces"in d&&a(d);return}else if((0,ja.isUnionType)(d)){c(d);return}else if((0,ja.isInputObjectType)(d)){o(d);return}else if((0,ja.isLeafType)(d))return;throw new Error(`Unexpected schema type: ${d}`)}function i(d){let f=d.getFields();for(let[y,I]of Object.entries(f))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 f[y]}function a(d){if("getInterfaces"in d){let f=d.getInterfaces();f.push(...f.splice(0).map(y=>l(y)).filter(Boolean))}}function o(d){let f=d.getFields();for(let[y,I]of Object.entries(f))I.type=l(I.type),I.type===null&&delete f[y]}function c(d){let f=d.getTypes();f.push(...f.splice(0).map(y=>l(y)).filter(Boolean))}function l(d){if((0,ja.isListType)(d)){let f=l(d.ofType);return f!=null?new ja.GraphQLList(f):null}else if((0,ja.isNonNullType)(d)){let f=l(d.ofType);return f!=null?new ja.GraphQLNonNull(f):null}else if((0,ja.isNamedType)(d)){let f=e[d.name];if(f&&d!==f)return f}return d}}Cl.healTypes=jU});var GU=w(gT=>{"use strict";m();T();N();Object.defineProperty(gT,"__esModule",{value:!0});gT.getResolversFromSchema=void 0;var fc=Ae();function ete(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,fc.isScalarType)(c)){if(!(0,fc.isSpecifiedScalarType)(c)){let l=c.toConfig();delete l.astNode,n[o]=new fc.GraphQLScalarType(l)}}else if((0,fc.isEnumType)(c)){n[o]={};let l=c.getValues();for(let d of l)n[o][d.name]=d.value}else if((0,fc.isInterfaceType)(c))c.resolveType!=null&&(n[o]={__resolveType:c.resolveType});else if((0,fc.isUnionType)(c))c.resolveType!=null&&(n[o]={__resolveType:c.resolveType});else if((0,fc.isObjectType)(c)){n[o]={},c.isTypeOf!=null&&(n[o].__isTypeOf=c.isTypeOf);let l=c.getFields();for(let d in l){let f=l[d];if(f.subscribe!=null&&(n[o][d]=n[o][d]||{},n[o][d].subscribe=f.subscribe),f.resolve!=null&&((i=f.resolve)==null?void 0:i.name)!=="defaultFieldResolver"){switch((a=f.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=f.resolve}}}}return n}gT.getResolversFromSchema=ete});var QU=w(_T=>{"use strict";m();T();N();Object.defineProperty(_T,"__esModule",{value:!0});_T.forEachField=void 0;var $U=Ae();function tte(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,$U.getNamedType)(i).name.startsWith("__")&&(0,$U.isObjectType)(i)){let a=i.getFields();for(let o in a){let c=a[o];t(c,r,o)}}}}_T.forEachField=tte});var YU=w(vT=>{"use strict";m();T();N();Object.defineProperty(vT,"__esModule",{value:!0});vT.forEachDefaultValue=void 0;var hS=Ae();function nte(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,hS.getNamedType)(i).name.startsWith("__")){if((0,hS.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,hS.isInputObjectType)(i)){let a=i.getFields();for(let o in a){let c=a[o];c.defaultValue=t(c.type,c.defaultValue)}}}}}vT.forEachDefaultValue=nte});var gS=w(ST=>{"use strict";m();T();N();Object.defineProperty(ST,"__esModule",{value:!0});ST.addTypes=void 0;var yS=Ae(),IS=lS(),rte=TT();function ite(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,yS.isNamedType)(c)?r[c.name]=c:(0,yS.isDirective)(c)&&(i[c.name]=c);let{typeMap:a,directives:o}=(0,rte.rewireTypes)(r,Object.values(i));return new yS.GraphQLSchema(Q(x({},n),{query:(0,IS.getObjectTypeFromTypeMap)(a,e.getQueryType()),mutation:(0,IS.getObjectTypeFromTypeMap)(a,e.getMutationType()),subscription:(0,IS.getObjectTypeFromTypeMap)(a,e.getSubscriptionType()),types:Object.values(a),directives:o}))}ST.addTypes=ite});var HU=w(DT=>{"use strict";m();T();N();Object.defineProperty(DT,"__esModule",{value:!0});DT.pruneSchema=void 0;var tr=Ae(),ate=Hv(),ste=pc(),ote=Ll(),ute=Rp();function cte(e,t={}){let{skipEmptyCompositeTypePruning:n,skipEmptyUnionPruning:r,skipPruning:i,skipUnimplementedInterfacesPruning:a,skipUnusedTypesPruning:o}=t,c=[],l=e;do{let d=lte(l);if(i){let f=[];for(let y in l.getTypeMap()){if(y.startsWith("__"))continue;let I=l.getType(y);I&&i(I)&&f.push(y)}d=JU(f,l,d)}c=[],l=(0,ote.mapSchema)(l,{[ste.MapperKind.TYPE]:f=>!d.has(f.name)&&!(0,tr.isSpecifiedScalarType)(f)?((0,tr.isUnionType)(f)||(0,tr.isInputObjectType)(f)||(0,tr.isInterfaceType)(f)||(0,tr.isObjectType)(f)||(0,tr.isScalarType)(f))&&(o||(0,tr.isUnionType)(f)&&r&&!Object.keys(f.getTypes()).length||((0,tr.isInputObjectType)(f)||(0,tr.isInterfaceType)(f)||(0,tr.isObjectType)(f))&&n&&!Object.keys(f.getFields()).length||(0,tr.isInterfaceType)(f)&&a)?f:(c.push(f.name),d.delete(f.name),null):f})}while(c.length);return l}DT.pruneSchema=cte;function lte(e){let t=[];for(let n of(0,ute.getRootTypes)(e))t.push(n.name);return JU(t,e)}function JU(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,tr.isUnionType)(a)&&e.push(...a.getTypes().map(o=>o.name)),(0,tr.isInterfaceType)(a)&&r[i]===!0&&(e.push(...(0,ate.getImplementingTypes)(a.name,t)),r[i]=!1),(0,tr.isEnumType)(a)&&e.push(...a.getValues().flatMap(o=>o.astNode?OT(t,o.astNode):[])),"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,tr.isObjectType)(a)&&e.push(...l.args.flatMap(f=>{let y=[(0,tr.getNamedType)(f.type).name];return f.astNode&&y.push(...OT(t,f.astNode)),y}));let d=(0,tr.getNamedType)(l.type);e.push(d.name),l.astNode&&e.push(...OT(t,l.astNode)),(0,tr.isInterfaceType)(d)&&!(d.name in r)&&(r[d.name]=!0)}}a.astNode&&e.push(...OT(t,a.astNode)),n.add(i)}}return n}function OT(e,t){var n;return((n=t.directives)!=null?n:[]).flatMap(r=>{var i,a;return(a=(i=e.getDirective(r.name.value))==null?void 0:i.args.map(o=>(0,tr.getNamedType)(o.type).name))!=null?a:[]})}});var WU=w(bT=>{"use strict";m();T();N();Object.defineProperty(bT,"__esModule",{value:!0});bT.mergeDeep=void 0;var dte=Op();function zU(e,t=!1,n=!1){let r=e[0]||{},i={};t&&Object.setPrototypeOf(i,Object.create(Object.getPrototypeOf(r)));for(let a of e)if(_S(r)&&_S(a)){if(t){let o=Object.getPrototypeOf(i),c=Object.getPrototypeOf(a);if(c)for(let l of Object.getOwnPropertyNames(c)){let d=Object.getOwnPropertyDescriptor(c,l);(0,dte.isSome)(d)&&Object.defineProperty(o,l,d)}}for(let o in a)_S(a[o])?o in i?i[o]=zU([i[o],a[o]],t,n):Object.assign(i,{[o]:a[o]}):n&&Array.isArray(i[o])?Array.isArray(a[o])?i[o].push(...a[o]):i[o].push(a[o]):Object.assign(i,{[o]:a[o]})}else if(n&&Array.isArray(r))Array.isArray(a)?r.push(...a):r.push(a);else if(n&&Array.isArray(a))return[r,...a];return i}bT.mergeDeep=zU;function _S(e){return e&&typeof e=="object"&&!Array.isArray(e)}});var XU=w(AT=>{"use strict";m();T();N();Object.defineProperty(AT,"__esModule",{value:!0});AT.parseSelectionSet=void 0;var pte=Ae();function fte(e,t){return(0,pte.parse)(e,t).definitions[0].selectionSet}AT.parseSelectionSet=fte});var ZU=w(RT=>{"use strict";m();T();N();Object.defineProperty(RT,"__esModule",{value:!0});RT.getResponseKeyFromInfo=void 0;function mte(e){return e.fieldNodes[0].alias!=null?e.fieldNodes[0].alias.value:e.fieldName}RT.getResponseKeyFromInfo=mte});var ek=w(Ka=>{"use strict";m();T();N();Object.defineProperty(Ka,"__esModule",{value:!0});Ka.modifyObjectFields=Ka.selectObjectFields=Ka.removeObjectFields=Ka.appendObjectFields=void 0;var PT=Ae(),Nte=gS(),FT=pc(),mc=Ll();function Tte(e,t,n){return e.getType(t)==null?(0,Nte.addTypes)(e,[new PT.GraphQLObjectType({name:t,fields:n})]):(0,mc.mapSchema)(e,{[FT.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,mc.correctASTNodes)(new PT.GraphQLObjectType(Q(x({},i),{fields:o})))}}})}Ka.appendObjectFields=Tte;function Ete(e,t,n){let r={};return[(0,mc.mapSchema)(e,{[FT.MapperKind.OBJECT_TYPE]:a=>{if(a.name===t){let o=a.toConfig(),c=o.fields,l={};for(let d in c){let f=c[d];n(d,f)?r[d]=f:l[d]=f}return(0,mc.correctASTNodes)(new PT.GraphQLObjectType(Q(x({},o),{fields:l})))}}}),r]}Ka.removeObjectFields=Ete;function hte(e,t,n){let r={};return(0,mc.mapSchema)(e,{[FT.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}Ka.selectObjectFields=hte;function yte(e,t,n,r){let i={};return[(0,mc.mapSchema)(e,{[FT.MapperKind.OBJECT_TYPE]:o=>{if(o.name===t){let c=o.toConfig(),l=c.fields,d={};for(let f in l){let y=l[f];n(f,y)?i[f]=y:d[f]=y}for(let f in r){let y=r[f];d[f]=y}return(0,mc.correctASTNodes)(new PT.GraphQLObjectType(Q(x({},c),{fields:d})))}}}),i]}Ka.modifyObjectFields=yte});var tk=w(wT=>{"use strict";m();T();N();Object.defineProperty(wT,"__esModule",{value:!0});wT.renameType=void 0;var ji=Ae();function Ite(e,t){if((0,ji.isObjectType)(e))return new ji.GraphQLObjectType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));if((0,ji.isInterfaceType)(e))return new ji.GraphQLInterfaceType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));if((0,ji.isUnionType)(e))return new ji.GraphQLUnionType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));if((0,ji.isInputObjectType)(e))return new ji.GraphQLInputObjectType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));if((0,ji.isEnumType)(e))return new ji.GraphQLEnumType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));if((0,ji.isScalarType)(e))return new ji.GraphQLScalarType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));throw new Error(`Unknown type ${e}.`)}wT.renameType=Ite});var ik=w(LT=>{"use strict";m();T();N();Object.defineProperty(LT,"__esModule",{value:!0});LT.mapAsyncIterator=void 0;var gte=bp();function _te(e,t,n,r){let i,a,o;r&&(o=d=>{let f=r();return(0,gte.isPromise)(f)?f.then(()=>d):d}),typeof e.return=="function"&&(i=e.return,a=d=>{let f=()=>Promise.reject(d);return i.call(e).then(f,f)});function c(d){return d.done?o?o(d):d:nk(d.value,t).then(rk,a)}let l;if(n){let d=n;l=f=>nk(f,d).then(rk,a)}return{next(){return e.next().then(c,l)},return(){let d=i?i.call(e).then(c,l):Promise.resolve({value:void 0,done:!0});return o?d.then(o):d},throw(d){return typeof e.throw=="function"?e.throw(d).then(c,l):Promise.reject(d).catch(a)},[Symbol.asyncIterator](){return this}}}LT.mapAsyncIterator=_te;function nk(e,t){return new Promise(n=>n(t(e)))}function rk(e){return{value:e,done:!1}}});var ak=w(Bl=>{"use strict";m();T();N();Object.defineProperty(Bl,"__esModule",{value:!0});Bl.createVariableNameGenerator=Bl.updateArgument=void 0;var Nc=Ae(),vte=Wv();function Ste(e,t,n,r,i,a,o){if(e[r]={kind:Nc.Kind.ARGUMENT,name:{kind:Nc.Kind.NAME,value:r},value:{kind:Nc.Kind.VARIABLE,name:{kind:Nc.Kind.NAME,value:i}}},t[i]={kind:Nc.Kind.VARIABLE_DEFINITION,variable:{kind:Nc.Kind.VARIABLE,name:{kind:Nc.Kind.NAME,value:i}},type:(0,vte.astFromType)(a)},o!==void 0){n[i]=o;return}i in n&&delete n[i]}Bl.updateArgument=Ste;function Ote(e){let t=0;return n=>{let r;do r=`_v${(t++).toString()}_${n}`;while(r in e);return r}}Bl.createVariableNameGenerator=Ote});var sk=w(CT=>{"use strict";m();T();N();Object.defineProperty(CT,"__esModule",{value:!0});CT.implementsAbstractType=void 0;var vS=Ae();function Dte(e,t,n){return n==null||t==null?!1:t===n?!0:(0,vS.isCompositeType)(t)&&(0,vS.isCompositeType)(n)?(0,vS.doTypesOverlap)(e,t,n):!1}CT.implementsAbstractType=Dte});var ok=w(BT=>{"use strict";m();T();N();Object.defineProperty(BT,"__esModule",{value:!0});BT.observableToAsyncIterable=void 0;function bte(e){let t=[],n=[],r=!0,i=f=>{t.length!==0?t.shift()({value:f,done:!1}):n.push({value:f,done:!1})},a=f=>{t.length!==0?t.shift()({value:{errors:[f]},done:!1}):n.push({value:{errors:[f]},done:!1})},o=()=>{t.length!==0?t.shift()({done:!0}):n.push({done:!0})},c=()=>new Promise(f=>{if(n.length!==0){let y=n.shift();f(y)}else t.push(f)}),l=e.subscribe({next(f){i(f)},error(f){a(f)},complete(){o()}}),d=()=>{if(r){r=!1,l.unsubscribe();for(let f of t)f({value:void 0,done:!0});t.length=0,n.length=0}};return{next(){return r?c():this.return()},return(){return d(),Promise.resolve({value:void 0,done:!0})},throw(f){return d(),Promise.reject(f)},[Symbol.asyncIterator](){return this}}}BT.observableToAsyncIterable=bte});var uk=w(UT=>{"use strict";m();T();N();Object.defineProperty(UT,"__esModule",{value:!0});UT.AccumulatorMap=void 0;var SS=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)}};UT.AccumulatorMap=SS});var OS=w(Ul=>{"use strict";m();T();N();Object.defineProperty(Ul,"__esModule",{value:!0});Ul.GraphQLStreamDirective=Ul.GraphQLDeferDirective=void 0;var Ki=Ae();Ul.GraphQLDeferDirective=new Ki.GraphQLDirective({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[Ki.DirectiveLocation.FRAGMENT_SPREAD,Ki.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Ki.GraphQLNonNull(Ki.GraphQLBoolean),description:"Deferred when true or undefined.",defaultValue:!0},label:{type:Ki.GraphQLString,description:"Unique name"}}});Ul.GraphQLStreamDirective=new Ki.GraphQLDirective({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[Ki.DirectiveLocation.FIELD],args:{if:{type:new Ki.GraphQLNonNull(Ki.GraphQLBoolean),description:"Stream when true or undefined.",defaultValue:!0},label:{type:Ki.GraphQLString,description:"Unique name"},initialCount:{defaultValue:0,type:Ki.GraphQLInt,description:"Number of items to return immediately"}}})});var AS=w(Wr=>{"use strict";m();T();N();Object.defineProperty(Wr,"__esModule",{value:!0});Wr.collectSubFields=Wr.getDeferValues=Wr.getFieldEntryKey=Wr.doesFragmentConditionMatch=Wr.shouldIncludeNode=Wr.collectFields=void 0;var Ga=Ae(),MT=uk(),Ate=OS(),Rte=bl();function kl(e,t,n,r,i,a,o,c){for(let l of i.selections)switch(l.kind){case Ga.Kind.FIELD:{if(!kT(n,l))continue;a.add(ck(l),l);break}case Ga.Kind.INLINE_FRAGMENT:{if(!kT(n,l)||!DS(e,l,r))continue;let d=bS(n,l);if(d){let f=new MT.AccumulatorMap;kl(e,t,n,r,l.selectionSet,f,o,c),o.push({label:d.label,fields:f})}else kl(e,t,n,r,l.selectionSet,a,o,c);break}case Ga.Kind.FRAGMENT_SPREAD:{let d=l.name.value;if(!kT(n,l))continue;let f=bS(n,l);if(c.has(d)&&!f)continue;let y=t[d];if(!y||!DS(e,y,r))continue;if(f||c.add(d),f){let I=new MT.AccumulatorMap;kl(e,t,n,r,y.selectionSet,I,o,c),o.push({label:f.label,fields:I})}else kl(e,t,n,r,y.selectionSet,a,o,c);break}}}function Pte(e,t,n,r,i){let a=new MT.AccumulatorMap,o=[];return kl(e,t,n,r,i,a,o,new Set),{fields:a,patches:o}}Wr.collectFields=Pte;function kT(e,t){let n=(0,Ga.getDirectiveValues)(Ga.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,Ga.getDirectiveValues)(Ga.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}Wr.shouldIncludeNode=kT;function DS(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,Ga.typeFromAST)(e,r);return i===n?!0:(0,Ga.isAbstractType)(i)?e.getPossibleTypes(i).includes(n):!1}Wr.doesFragmentConditionMatch=DS;function ck(e){return e.alias?e.alias.value:e.name.value}Wr.getFieldEntryKey=ck;function bS(e,t){let n=(0,Ga.getDirectiveValues)(Ate.GraphQLDeferDirective,t,e);if(n&&n.if!==!1)return{label:typeof n.label=="string"?n.label:void 0}}Wr.getDeferValues=bS;Wr.collectSubFields=(0,Rte.memoize5)(function(t,n,r,i,a){let o=new MT.AccumulatorMap,c=new Set,l=[],d={fields:o,patches:l};for(let f of a)f.selectionSet&&kl(t,n,r,i,f.selectionSet,o,l,c);return d})});var RS=w(Ml=>{"use strict";m();T();N();Object.defineProperty(Ml,"__esModule",{value:!0});Ml.getOperationASTFromRequest=Ml.getOperationASTFromDocument=void 0;var Fte=Ae(),wte=bl();function lk(e,t){let n=(0,Fte.getOperationAST)(e,t);if(!n)throw new Error(`Cannot infer operation ${t||""}`);return n}Ml.getOperationASTFromDocument=lk;Ml.getOperationASTFromRequest=(0,wte.memoize1)(function(t){return lk(t.document,t.operationName)})});var fk=w(mu=>{"use strict";m();T();N();Object.defineProperty(mu,"__esModule",{value:!0});mu.visitResult=mu.visitErrors=mu.visitData=void 0;var fu=Ae(),PS=AS(),Lte=RS();function FS(e,t,n){if(Array.isArray(e))return e.map(r=>FS(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:FS(a,t,n)})}return n!=null?n(r):r}return e}mu.visitData=FS;function Cte(e,t){return e.map(n=>t(n))}mu.visitErrors=Cte;function Bte(e,t,n,r,i){let a=t.document.definitions.reduce((I,v)=>(v.kind===fu.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,f=d!=null&&i!=null,y=(0,Lte.getOperationASTFromRequest)(t);return l!=null&&y!=null&&(e.data=Mte(l,y,n,a,o,r,f?d:void 0,c)),d!=null&&i&&(e.errors=Ute(d,i,c)),e}mu.visitResult=Bte;function Ute(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,f)=>{let y=f.type.name,I=t[y];if(I==null)return d;let v=I[f.fieldName];return v==null?d:v(d,f.pathIndex)},o);return a&&i.has(o)?a(l):l})}function kte(e,t){switch(t.operation){case"query":return e.getQueryType();case"mutation":return e.getMutationType();case"subscription":return e.getSubscriptionType()}}function Mte(e,t,n,r,i,a,o,c){let l=kte(n,t),{fields:d}=(0,PS.collectFields)(n,r,i,l,t.selectionSet);return wS(e,l,d,n,r,i,a,0,o,c)}function wS(e,t,n,r,i,a,o,c,l,d){var se;let f=t.getFields(),y=o==null?void 0:o[t.name],I=y==null?void 0:y.__enter,v=I!=null?I(e):e,F,k=null;if(l!=null){F=qte(l,c),k=F.errorMap;for(let ie of F.unpathedErrors)d.unpathedErrors.add(ie)}for(let[ie,Te]of n){let de=Te[0].name.value,Re=(se=f[de])==null?void 0:se.type;if(Re==null)switch(de){case"__typename":Re=fu.TypeNameMetaFieldDef.type;break;case"__schema":Re=fu.SchemaMetaFieldDef.type;break;case"__type":Re=fu.TypeMetaFieldDef.type;break}let xe=c+1,tt;k&&(tt=k[ie],tt!=null&&delete k[ie],Vte(t,de,xe,tt,d));let ee=pk(e[ie],Re,Te,r,i,a,o,xe,tt,d);dk(v,ie,ee,y,de)}let K=v.__typename;if(K!=null&&dk(v,"__typename",K,y,"__typename"),k)for(let ie in k){let Te=k[ie];for(let de of Te)d.unpathedErrors.add(de)}let J=y==null?void 0:y.__leave;return J!=null?J(v):v}function dk(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 xte(e,t,n,r,i,a,o,c,l,d){return e.map(f=>pk(f,t,n,r,i,a,o,c+1,l,d))}function pk(e,t,n,r,i,a,o,c,l=[],d){if(e==null)return e;let f=(0,fu.getNullableType)(t);if((0,fu.isListType)(f))return xte(e,f.ofType,n,r,i,a,o,c,l,d);if((0,fu.isAbstractType)(f)){let v=r.getType(e.__typename),{fields:F}=(0,PS.collectSubFields)(r,i,a,v,n);return wS(e,v,F,r,i,a,o,c,l,d)}else if((0,fu.isObjectType)(f)){let{fields:v}=(0,PS.collectSubFields)(r,i,a,f,n);return wS(e,f,v,r,i,a,o,c,l,d)}let y=o==null?void 0:o[f.name];if(y==null)return e;let I=y(e);return I===void 0?e:I}function qte(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 Vte(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 mk=w(xT=>{"use strict";m();T();N();Object.defineProperty(xT,"__esModule",{value:!0});xT.valueMatchesCriteria=void 0;function LS(e,t){return e==null?e===t:Array.isArray(e)?Array.isArray(t)&&e.every((n,r)=>LS(n,t[r])):typeof e=="object"?typeof t=="object"&&t&&Object.keys(t).every(n=>LS(e[n],t[n])):t instanceof RegExp?t.test(e):e===t}xT.valueMatchesCriteria=LS});var Nk=w(qT=>{"use strict";m();T();N();Object.defineProperty(qT,"__esModule",{value:!0});qT.isAsyncIterable=void 0;function jte(e){return(e==null?void 0:e[Symbol.asyncIterator])!=null}qT.isAsyncIterable=jte});var Tk=w(VT=>{"use strict";m();T();N();Object.defineProperty(VT,"__esModule",{value:!0});VT.isDocumentNode=void 0;var Kte=Ae();function Gte(e){return e&&typeof e=="object"&&"kind"in e&&e.kind===Kte.Kind.DOCUMENT}VT.isDocumentNode=Gte});var Ek=w(()=>{"use strict";m();T();N()});var gk=w(Nu=>{"use strict";m();T();N();Object.defineProperty(Nu,"__esModule",{value:!0});Nu.withCancel=Nu.getAsyncIterableWithCancel=Nu.getAsyncIteratorWithCancel=void 0;var $te=bl();function Qte(e){return Di(this,null,function*(){return{value:e,done:!0}})}var hk=(0,$te.memoize2)(function(t,n){return function(...i){return Reflect.apply(n,t,i)}});function yk(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||Qte;return function(l){return Di(this,null,function*(){let d=yield t(l);return Reflect.apply(o,n,[d])})}}else if(typeof a=="function")return hk(n,a);return a}})}Nu.getAsyncIteratorWithCancel=yk;function Ik(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 yk(c,t)}:typeof a=="function"?hk(n,a):a}})}Nu.getAsyncIterableWithCancel=Ik;Nu.withCancel=Ik});var _k=w(jT=>{"use strict";m();T();N();Object.defineProperty(jT,"__esModule",{value:!0});jT.fixSchemaAst=void 0;var Yte=Ae(),Jte=iS();function Hte(e,t){let n=(0,Jte.getDocumentNodeFromSchema)(e);return(0,Yte.buildASTSchema)(n,x({},t||{}))}function zte(e,t){let n;return(!e.astNode||!e.extensionASTNodes)&&(n=Hte(e,t)),!e.astNode&&(n!=null&&n.astNode)&&(e.astNode=n.astNode),!e.extensionASTNodes&&(n!=null&&n.astNode)&&(e.extensionASTNodes=n.extensionASTNodes),e}jT.fixSchemaAst=zte});var vk=w(KT=>{"use strict";m();T();N();Object.defineProperty(KT,"__esModule",{value:!0});KT.extractExtensionsFromSchema=void 0;var Ds=pc(),Wte=Ll();function la(e={}){let t=x({},e),n=t.directives;if(n!=null)for(let r in n){let i=n[r];Array.isArray(i)||(n[r]=[i])}return t}function Xte(e){let t={schemaExtensions:la(e.extensions),types:{}};return(0,Wte.mapSchema)(e,{[Ds.MapperKind.OBJECT_TYPE]:n=>(t.types[n.name]={fields:{},type:"object",extensions:la(n.extensions)},n),[Ds.MapperKind.INTERFACE_TYPE]:n=>(t.types[n.name]={fields:{},type:"interface",extensions:la(n.extensions)},n),[Ds.MapperKind.FIELD]:(n,r,i)=>{t.types[i].fields[r]={arguments:{},extensions:la(n.extensions)};let a=n.args;if(a!=null)for(let o in a)t.types[i].fields[r].arguments[o]=la(a[o].extensions);return n},[Ds.MapperKind.ENUM_TYPE]:n=>(t.types[n.name]={values:{},type:"enum",extensions:la(n.extensions)},n),[Ds.MapperKind.ENUM_VALUE]:(n,r,i,a)=>(t.types[r].values[a]=la(n.extensions),n),[Ds.MapperKind.SCALAR_TYPE]:n=>(t.types[n.name]={type:"scalar",extensions:la(n.extensions)},n),[Ds.MapperKind.UNION_TYPE]:n=>(t.types[n.name]={type:"union",extensions:la(n.extensions)},n),[Ds.MapperKind.INPUT_OBJECT_TYPE]:n=>(t.types[n.name]={fields:{},type:"input",extensions:la(n.extensions)},n),[Ds.MapperKind.INPUT_OBJECT_FIELD]:(n,r,i)=>(t.types[i].fields[r]={extensions:la(n.extensions)},n)}),t}KT.extractExtensionsFromSchema=Xte});var Sk=w(Tu=>{"use strict";m();T();N();Object.defineProperty(Tu,"__esModule",{value:!0});Tu.printPathArray=Tu.pathToArray=Tu.addPath=void 0;function Zte(e,t,n){return{prev:e,key:t,typename:n}}Tu.addPath=Zte;function ene(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}Tu.pathToArray=ene;function tne(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}Tu.printPathArray=tne});var Ok=w(CS=>{"use strict";m();T();N();function GT(e,t,n){if(typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t))for(n=0;n{"use strict";m();T();N();Object.defineProperty($T,"__esModule",{value:!0});$T.mergeIncrementalResult=void 0;var BS=Ok();function Dk({incrementalResult:e,executionResult:t}){var r;let n=["data",...(r=e.path)!=null?r:[]];if(e.items)for(let i of e.items)(0,BS.dset)(t,n,i),n[n.length-1]++;e.data&&(0,BS.dset)(t,n,e.data),e.errors&&(t.errors=t.errors||[],t.errors.push(...e.errors)),e.extensions&&(0,BS.dset)(t,"extensions",e.extensions),e.incremental&&e.incremental.forEach(i=>{Dk({incrementalResult:i,executionResult:t})})}$T.mergeIncrementalResult=Dk});var Rk=w(xl=>{"use strict";m();T();N();Object.defineProperty(xl,"__esModule",{value:!0});xl.debugTimerEnd=xl.debugTimerStart=void 0;var Ak=new Set;function rne(e){let t=(globalThis==null?void 0:globalThis.process.env.DEBUG)||globalThis.DEBUG;(t==="1"||t!=null&&t.includes(e))&&(Ak.add(e),console.time(e))}xl.debugTimerStart=rne;function ine(e){Ak.has(e)&&console.timeEnd(e)}xl.debugTimerEnd=ine});var da=w(Qe=>{"use strict";m();T();N();Object.defineProperty(Qe,"__esModule",{value:!0});Qe.inspect=void 0;var Je=(UB(),fm(BB));Je.__exportStar(kB(),Qe);Je.__exportStar(Op(),Qe);Je.__exportStar(Qv(),Qe);Je.__exportStar(Yv(),Qe);Je.__exportStar(YB(),Qe);Je.__exportStar(Hv(),Qe);Je.__exportStar(iS(),Qe);Je.__exportStar(Yv(),Qe);Je.__exportStar(lU(),Qe);Je.__exportStar(dU(),Qe);Je.__exportStar(SU(),Qe);Je.__exportStar(wU(),Qe);Je.__exportStar(CU(),Qe);Je.__exportStar(VU(),Qe);Je.__exportStar(KU(),Qe);Je.__exportStar(GU(),Qe);Je.__exportStar(QU(),Qe);Je.__exportStar(YU(),Qe);Je.__exportStar(Ll(),Qe);Je.__exportStar(gS(),Qe);Je.__exportStar(TT(),Qe);Je.__exportStar(HU(),Qe);Je.__exportStar(WU(),Qe);Je.__exportStar(pc(),Qe);Je.__exportStar(fS(),Qe);Je.__exportStar(XU(),Qe);Je.__exportStar(ZU(),Qe);Je.__exportStar(ek(),Qe);Je.__exportStar(tk(),Qe);Je.__exportStar(mS(),Qe);Je.__exportStar(ik(),Qe);Je.__exportStar(ak(),Qe);Je.__exportStar(sk(),Qe);Je.__exportStar(WN(),Qe);Je.__exportStar(ok(),Qe);Je.__exportStar(fk(),Qe);Je.__exportStar($v(),Qe);Je.__exportStar(mk(),Qe);Je.__exportStar(Nk(),Qe);Je.__exportStar(Tk(),Qe);Je.__exportStar(aT(),Qe);Je.__exportStar(Ek(),Qe);Je.__exportStar(gk(),Qe);Je.__exportStar(Rp(),Qe);Je.__exportStar(sS(),Qe);Je.__exportStar(AS(),Qe);var ane=Dp();Object.defineProperty(Qe,"inspect",{enumerable:!0,get:function(){return ane.inspect}});Je.__exportStar(bl(),Qe);Je.__exportStar(_k(),Qe);Je.__exportStar(RS(),Qe);Je.__exportStar(vk(),Qe);Je.__exportStar(Sk(),Qe);Je.__exportStar(bp(),Qe);Je.__exportStar(OS(),Qe);Je.__exportStar(bk(),Qe);Je.__exportStar(Rk(),Qe)});var Fk=w(QT=>{"use strict";m();T();N();Object.defineProperty(QT,"__esModule",{value:!0});QT.mergeResolvers=void 0;var sne=da();function Pk(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=Pk(i)),typeof i=="object"&&i&&n.push(i);let r=(0,sne.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=Pk});var US=w(YT=>{"use strict";m();T();N();Object.defineProperty(YT,"__esModule",{value:!0});YT.mergeArguments=void 0;var wk=da();function one(e,t,n){let r=une([...t,...e].filter(wk.isSome),n);return n&&n.sort&&r.sort(wk.compareNodes),r}YT.mergeArguments=one;function une(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 Gi=w(ql=>{"use strict";m();T();N();Object.defineProperty(ql,"__esModule",{value:!0});ql.mergeDirective=ql.mergeDirectives=void 0;var Lk=Ae(),cne=da();function lne(e,t){return!!e.find(n=>n.name.value===t.name.value)}function Ck(e,t){var n;return!!((n=t==null?void 0:t[e.name.value])!=null&&n.repeatable)}function dne(e,t){return t.some(({value:n})=>n===e.value)}function Bk(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=Tne(o,c,(l,d)=>{let f=l.value;return!f||!d.some(y=>y.value===f)})}else a.value=r.value}else n.push(r)}return n}function pne(e,t){return e.map((n,r,i)=>{let a=i.findIndex(o=>o.name.value===n.name.value);if(a!==r&&!Ck(n,t)){let o=i[a];return n.arguments=Bk(n.arguments,o.arguments),null}return n}).filter(cne.isSome)}function fne(e=[],t=[],n,r){let i=n&&n.reverseDirectives,a=i?e:t,o=i?t:e,c=pne([...a],r);for(let l of o)if(lne(c,l)&&!Ck(l,r)){let d=c.findIndex(y=>y.name.value===l.name.value),f=c[d];c[d].arguments=Bk(l.arguments||[],f.arguments||[])}else c.push(l);return c}ql.mergeDirectives=fne;function mne(e,t){let n=(0,Lk.print)(Q(x({},e),{description:void 0})),r=(0,Lk.print)(Q(x({},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(x({},i),{description:{kind:Vi.Kind.STRING,value:o,block:c}})}}}})}pu.transformCommentsToDescriptions=_U;function vU(e){return(0,Vi.isTypeSystemDefinitionNode)(e)||e.kind===Vi.Kind.FIELD_DEFINITION||e.kind===Vi.Kind.INPUT_VALUE_DEFINITION||e.kind===Vi.Kind.ENUM_VALUE_DEFINITION}pu.isDescribable=vU});var wU=w(dT=>{"use strict";m();T();N();Object.defineProperty(dT,"__esModule",{value:!0});dT.buildOperationNodeForField=void 0;var lt=Ae(),AU=Rp(),cS=[],lT=new Map;function RU(e){cS.push(e)}function OU(){cS=[]}function DU(){lT=new Map}function Ree({schema:e,kind:t,field:n,models:r,ignore:i=[],depthLimit:a,circularReferenceDepth:o,argNames:c,selectedFields:l=!0}){OU(),DU();let d=(0,AU.getRootTypeNames)(e),f=Pee({schema:e,fieldName:n,kind:t,models:r||[],ignore:i,depthLimit:a||1/0,circularReferenceDepth:o||1,argNames:c,selectedFields:l,rootTypeNames:d});return f.variableDefinitions=[...cS],OU(),DU(),f}dT.buildOperationNodeForField=Ree;function Pee({schema:e,fieldName:t,kind:n,models:r,ignore:i,depthLimit:a,circularReferenceDepth:o,argNames:c,selectedFields:l,rootTypeNames:d}){let f=(0,AU.getDefinedRootType)(e,n),y=f.getFields()[t],I=`${t}_${n}`;if(y.args)for(let v of y.args){let F=v.name;(!c||c.includes(F))&&RU(PU(v,F))}return{kind:lt.Kind.OPERATION_DEFINITION,operation:n,name:{kind:lt.Kind.NAME,value:I},variableDefinitions:[],selectionSet:{kind:lt.Kind.SELECTION_SET,selections:[FU({type:f,field:y,models:r,firstCall:!0,path:[],ancestors:[],ignore:i,depthLimit:a,circularReferenceDepth:o,schema:e,depth:0,argNames:c,selectedFields:l,rootTypeNames:d})]}}}function uS({parent:e,type:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:I,rootTypeNames:v}){if(!(typeof I=="boolean"&&f>c)){if((0,lt.isUnionType)(t)){let F=t.getTypes();return{kind:lt.Kind.SELECTION_SET,selections:F.filter(k=>!oS([...a,k],{depth:l})).map(k=>({kind:lt.Kind.INLINE_FRAGMENT,typeCondition:{kind:lt.Kind.NAMED_TYPE,name:{kind:lt.Kind.NAME,value:k.name}},selectionSet:uS({parent:t,type:k,models:n,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:I,rootTypeNames:v})})).filter(k=>{var K,J;return((J=(K=k==null?void 0:k.selectionSet)==null?void 0:K.selections)==null?void 0:J.length)>0})}}if((0,lt.isInterfaceType)(t)){let F=Object.values(d.getTypeMap()).filter(k=>(0,lt.isObjectType)(k)&&k.getInterfaces().includes(t));return{kind:lt.Kind.SELECTION_SET,selections:F.filter(k=>!oS([...a,k],{depth:l})).map(k=>({kind:lt.Kind.INLINE_FRAGMENT,typeCondition:{kind:lt.Kind.NAMED_TYPE,name:{kind:lt.Kind.NAME,value:k.name}},selectionSet:uS({parent:t,type:k,models:n,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:I,rootTypeNames:v})})).filter(k=>{var K,J;return((J=(K=k==null?void 0:k.selectionSet)==null?void 0:K.selections)==null?void 0:J.length)>0})}}if((0,lt.isObjectType)(t)&&!v.has(t.name)){let F=o.includes(t.name)||o.includes(`${e.name}.${i[i.length-1]}`),k=n.includes(t.name);if(!r&&k&&!F)return{kind:lt.Kind.SELECTION_SET,selections:[{kind:lt.Kind.FIELD,name:{kind:lt.Kind.NAME,value:"id"}}]};let K=t.getFields();return{kind:lt.Kind.SELECTION_SET,selections:Object.keys(K).filter(J=>!oS([...a,(0,lt.getNamedType)(K[J].type)],{depth:l})).map(J=>{let se=typeof I=="object"?I[J]:!0;return se?FU({type:t,field:K[J],models:n,path:[...i,J],ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:se,rootTypeNames:v}):null}).filter(J=>{var se,ie;return J==null?!1:"selectionSet"in J?!!((ie=(se=J.selectionSet)==null?void 0:se.selections)!=null&&ie.length):!0})}}}}function PU(e,t){function n(r){return(0,lt.isListType)(r)?{kind:lt.Kind.LIST_TYPE,type:n(r.ofType)}:(0,lt.isNonNullType)(r)?{kind:lt.Kind.NON_NULL_TYPE,type:n(r.ofType)}:{kind:lt.Kind.NAMED_TYPE,name:{kind:lt.Kind.NAME,value:r.name}}}return{kind:lt.Kind.VARIABLE_DEFINITION,variable:{kind:lt.Kind.VARIABLE,name:{kind:lt.Kind.NAME,value:t||e.name}},type:n(e.type)}}function bU(e,t){return[...t,e].join("_")}function FU({type:e,field:t,models:n,firstCall:r,path:i,ancestors:a,ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f,argNames:y,selectedFields:I,rootTypeNames:v}){let F=(0,lt.getNamedType)(t.type),k=[],K=!1;if(t.args&&t.args.length&&(k=t.args.map(Te=>{let de=bU(Te.name,i);return y&&!y.includes(de)?((0,lt.isNonNullType)(Te.type)&&(K=!0),null):(r||RU(PU(Te,de)),{kind:lt.Kind.ARGUMENT,name:{kind:lt.Kind.NAME,value:Te.name},value:{kind:lt.Kind.VARIABLE,name:{kind:lt.Kind.NAME,value:bU(Te.name,i)}}})}).filter(Boolean)),K)return null;let J=[...i,t.name],se=J.join("."),ie=t.name;return lT.has(se)&&lT.get(se)!==t.type.toString()&&(ie+=t.type.toString().replace("!","NonNull").replace("[","List").replace("]","")),lT.set(se,t.type.toString()),!(0,lt.isScalarType)(F)&&!(0,lt.isEnumType)(F)?Q(x({kind:lt.Kind.FIELD,name:{kind:lt.Kind.NAME,value:t.name}},ie!==t.name&&{alias:{kind:lt.Kind.NAME,value:ie}}),{selectionSet:uS({parent:e,type:F,models:n,firstCall:r,path:J,ancestors:[...a,e],ignore:o,depthLimit:c,circularReferenceDepth:l,schema:d,depth:f+1,argNames:y,selectedFields:I,rootTypeNames:v})||void 0,arguments:k}):Q(x({kind:lt.Kind.FIELD,name:{kind:lt.Kind.NAME,value:t.name}},ie!==t.name&&{alias:{kind:lt.Kind.NAME,value:ie}}),{arguments:k})}function oS(e,t={depth:1}){let n=e[e.length-1];return(0,lt.isScalarType)(n)?!1:e.filter(i=>i.name===n.name).length>t.depth}});var CU=w(pT=>{"use strict";m();T();N();Object.defineProperty(pT,"__esModule",{value:!0});pT.DirectiveLocation=void 0;var LU;(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"})(LU||(pT.DirectiveLocation=LU={}))});var pc=w(fT=>{"use strict";m();T();N();Object.defineProperty(fT,"__esModule",{value:!0});fT.MapperKind=void 0;var BU;(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"})(BU||(fT.MapperKind=BU={}))});var lS=w(mT=>{"use strict";m();T();N();Object.defineProperty(mT,"__esModule",{value:!0});mT.getObjectTypeFromTypeMap=void 0;var Fee=Ae();function wee(e,t){if(t){let n=e[t.name];if((0,Fee.isObjectType)(n))return n}}mT.getObjectTypeFromTypeMap=wee});var fS=w(qa=>{"use strict";m();T();N();Object.defineProperty(qa,"__esModule",{value:!0});qa.getBuiltInForStub=qa.isNamedStub=qa.createStub=qa.createNamedStub=void 0;var pr=Ae();function dS(e,t){let n;return t==="object"?n=pr.GraphQLObjectType:t==="interface"?n=pr.GraphQLInterfaceType:n=pr.GraphQLInputObjectType,new n({name:e,fields:{_fake:{type:pr.GraphQLString}}})}qa.createNamedStub=dS;function pS(e,t){switch(e.kind){case pr.Kind.LIST_TYPE:return new pr.GraphQLList(pS(e.type,t));case pr.Kind.NON_NULL_TYPE:return new pr.GraphQLNonNull(pS(e.type,t));default:return t==="output"?dS(e.name.value,"object"):dS(e.name.value,"input")}}qa.createStub=pS;function Lee(e){if("getFields"in e){let t=e.getFields();for(let n in t)return t[n].name==="_fake"}return!1}qa.isNamedStub=Lee;function Cee(e){switch(e.name){case pr.GraphQLInt.name:return pr.GraphQLInt;case pr.GraphQLFloat.name:return pr.GraphQLFloat;case pr.GraphQLString.name:return pr.GraphQLString;case pr.GraphQLBoolean.name:return pr.GraphQLBoolean;case pr.GraphQLID.name:return pr.GraphQLID;default:return e}}qa.getBuiltInForStub=Cee});var TT=w(NT=>{"use strict";m();T();N();Object.defineProperty(NT,"__esModule",{value:!0});NT.rewireTypes=void 0;var Yn=Ae(),UU=fS();function Bee(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 F=v.name;if(!F.startsWith("__")){if(r[F]!=null){console.warn(`Duplicate schema type name ${F} found; keeping the existing one found in the schema`);continue}r[F]=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,Yn.isSpecifiedDirective)(I))return I;let v=I.toConfig();return v.args=o(v.args),new Yn.GraphQLDirective(v)}function o(I){let v={};for(let F in I){let k=I[F],K=y(k.type);K!=null&&(k.type=K,v[F]=k)}return v}function c(I){if((0,Yn.isObjectType)(I)){let v=I.toConfig(),F=Q(x({},v),{fields:()=>l(v.fields),interfaces:()=>f(v.interfaces)});return new Yn.GraphQLObjectType(F)}else if((0,Yn.isInterfaceType)(I)){let v=I.toConfig(),F=Q(x({},v),{fields:()=>l(v.fields)});return"interfaces"in F&&(F.interfaces=()=>f(v.interfaces)),new Yn.GraphQLInterfaceType(F)}else if((0,Yn.isUnionType)(I)){let v=I.toConfig(),F=Q(x({},v),{types:()=>f(v.types)});return new Yn.GraphQLUnionType(F)}else if((0,Yn.isInputObjectType)(I)){let v=I.toConfig(),F=Q(x({},v),{fields:()=>d(v.fields)});return new Yn.GraphQLInputObjectType(F)}else if((0,Yn.isEnumType)(I)){let v=I.toConfig();return new Yn.GraphQLEnumType(v)}else if((0,Yn.isScalarType)(I)){if((0,Yn.isSpecifiedScalarType)(I))return I;let v=I.toConfig();return new Yn.GraphQLScalarType(v)}throw new Error(`Unexpected schema type: ${I}`)}function l(I){let v={};for(let F in I){let k=I[F],K=y(k.type);K!=null&&k.args&&(k.type=K,k.args=o(k.args),v[F]=k)}return v}function d(I){let v={};for(let F in I){let k=I[F],K=y(k.type);K!=null&&(k.type=K,v[F]=k)}return v}function f(I){let v=[];for(let F of I){let k=y(F);k!=null&&v.push(k)}return v}function y(I){if((0,Yn.isListType)(I)){let v=y(I.ofType);return v!=null?new Yn.GraphQLList(v):null}else if((0,Yn.isNonNullType)(I)){let v=y(I.ofType);return v!=null?new Yn.GraphQLNonNull(v):null}else if((0,Yn.isNamedType)(I)){let v=n[I.name];return v===void 0&&(v=(0,UU.isNamedStub)(I)?(0,UU.getBuiltInForStub)(I):c(I),r[v.name]=n[I.name]=v),v!=null?r[v.name]:null}return null}}NT.rewireTypes=Bee});var mS=w(Va=>{"use strict";m();T();N();Object.defineProperty(Va,"__esModule",{value:!0});Va.parseInputValueLiteral=Va.parseInputValue=Va.serializeInputValue=Va.transformInputValue=void 0;var ET=Ae(),Uee=Op();function Fl(e,t,n=null,r=null){if(t==null)return t;let i=(0,ET.getNullableType)(e);if((0,ET.isLeafType)(i))return n!=null?n(i,t):t;if((0,ET.isListType)(i))return(0,Uee.asArray)(t).map(a=>Fl(i.ofType,a,n,r));if((0,ET.isInputObjectType)(i)){let a=i.getFields(),o={};for(let c in t){let l=a[c];l!=null&&(o[c]=Fl(l.type,t[c],n,r))}return r!=null?r(i,o):o}}Va.transformInputValue=Fl;function kee(e,t){return Fl(e,t,(n,r)=>{try{return n.serialize(r)}catch(i){return r}})}Va.serializeInputValue=kee;function Mee(e,t){return Fl(e,t,(n,r)=>{try{return n.parseValue(r)}catch(i){return r}})}Va.parseInputValue=Mee;function xee(e,t){return Fl(e,t,(n,r)=>n.parseLiteral(r,{}))}Va.parseInputValueLiteral=xee});var Cl=w(Ll=>{"use strict";m();T();N();Object.defineProperty(Ll,"__esModule",{value:!0});Ll.correctASTNodes=Ll.mapSchema=void 0;var it=Ae(),wl=lS(),bt=pc(),qee=TT(),kU=mS();function Vee(e,t={}){let n=qU(xU(NS(MU(jee(NS(MU(e.getTypeMap(),e,kU.serializeInputValue),e,t,c=>(0,it.isLeafType)(c)),e,t),e,kU.parseInputValue),e,t,c=>!(0,it.isLeafType)(c)),e,t),e,t),r=e.getDirectives(),i=Kee(r,e,t),{typeMap:a,directives:o}=(0,qee.rewireTypes)(n,i);return new it.GraphQLSchema(Q(x({},e.toConfig()),{query:(0,wl.getObjectTypeFromTypeMap)(a,(0,wl.getObjectTypeFromTypeMap)(n,e.getQueryType())),mutation:(0,wl.getObjectTypeFromTypeMap)(a,(0,wl.getObjectTypeFromTypeMap)(n,e.getMutationType())),subscription:(0,wl.getObjectTypeFromTypeMap)(a,(0,wl.getObjectTypeFromTypeMap)(n,e.getSubscriptionType())),types:Object.values(a),directives:o}))}Ll.mapSchema=Vee;function NS(e,t,n,r=()=>!0){let i={};for(let a in e)if(!a.startsWith("__")){let o=e[a];if(o==null||!r(o)){i[a]=o;continue}let c=$ee(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 jee(e,t,n){let r=zee(n);return r?NS(e,t,{[bt.MapperKind.ENUM_TYPE]:i=>{let a=i.toConfig(),o=a.values,c={};for(let l in o){let d=o[l],f=r(d,i.name,t,l);if(f===void 0)c[l]=d;else if(Array.isArray(f)){let[y,I]=f;c[y]=I===void 0?d:I}else f!==null&&(c[l]=f)}return Bp(new it.GraphQLEnumType(Q(x({},a),{values:c})))}},i=>(0,it.isEnumType)(i)):e}function MU(e,t,n){let r=qU(e,t,{[bt.MapperKind.ARGUMENT]:i=>{if(i.defaultValue===void 0)return i;let a=hT(e,i.type);if(a!=null)return Q(x({},i),{defaultValue:n(a,i.defaultValue)})}});return xU(r,t,{[bt.MapperKind.INPUT_OBJECT_FIELD]:i=>{if(i.defaultValue===void 0)return i;let a=hT(r,i.type);if(a!=null)return Q(x({},i),{defaultValue:n(a,i.defaultValue)})}})}function hT(e,t){if((0,it.isListType)(t)){let n=hT(e,t.ofType);return n!=null?new it.GraphQLList(n):null}else if((0,it.isNonNullType)(t)){let n=hT(e,t.ofType);return n!=null?new it.GraphQLNonNull(n):null}else if((0,it.isNamedType)(t)){let n=e[t.name];return n!=null?n:null}return null}function xU(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,it.isObjectType)(a)&&!(0,it.isInterfaceType)(a)&&!(0,it.isInputObjectType)(a)){r[i]=a;continue}let o=Yee(t,n,i);if(o==null){r[i]=a;continue}let c=a.toConfig(),l=c.fields,d={};for(let f in l){let y=l[f],I=o(y,f,i,t);if(I===void 0)d[f]=y;else if(Array.isArray(I)){let[v,F]=I;F.astNode!=null&&(F.astNode=Q(x({},F.astNode),{name:Q(x({},F.astNode.name),{value:v})})),d[v]=F===void 0?y:F}else I!==null&&(d[f]=I)}(0,it.isObjectType)(a)?r[i]=Bp(new it.GraphQLObjectType(Q(x({},c),{fields:d}))):(0,it.isInterfaceType)(a)?r[i]=Bp(new it.GraphQLInterfaceType(Q(x({},c),{fields:d}))):r[i]=Bp(new it.GraphQLInputObjectType(Q(x({},c),{fields:d})))}return r}function qU(e,t,n){let r={};for(let i in e)if(!i.startsWith("__")){let a=e[i];if(!(0,it.isObjectType)(a)&&!(0,it.isInterfaceType)(a)){r[i]=a;continue}let o=Jee(n);if(o==null){r[i]=a;continue}let c=a.toConfig(),l=c.fields,d={};for(let f in l){let y=l[f],I=y.args;if(I==null){d[f]=y;continue}let v=Object.keys(I);if(!v.length){d[f]=y;continue}let F={};for(let k of v){let K=I[k],J=o(K,f,i,t);if(J===void 0)F[k]=K;else if(Array.isArray(J)){let[se,ie]=J;F[se]=ie}else J!==null&&(F[k]=J)}d[f]=Q(x({},y),{args:F})}(0,it.isObjectType)(a)?r[i]=new it.GraphQLObjectType(Q(x({},c),{fields:d})):(0,it.isInterfaceType)(a)?r[i]=new it.GraphQLInterfaceType(Q(x({},c),{fields:d})):r[i]=new it.GraphQLInputObjectType(Q(x({},c),{fields:d}))}return r}function Kee(e,t,n){let r=Hee(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 Gee(e,t){var i,a,o;let n=e.getType(t),r=[bt.MapperKind.TYPE];return(0,it.isObjectType)(n)?(r.push(bt.MapperKind.COMPOSITE_TYPE,bt.MapperKind.OBJECT_TYPE),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(bt.MapperKind.ROOT_OBJECT,bt.MapperKind.QUERY):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(bt.MapperKind.ROOT_OBJECT,bt.MapperKind.MUTATION):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(bt.MapperKind.ROOT_OBJECT,bt.MapperKind.SUBSCRIPTION)):(0,it.isInputObjectType)(n)?r.push(bt.MapperKind.INPUT_OBJECT_TYPE):(0,it.isInterfaceType)(n)?r.push(bt.MapperKind.COMPOSITE_TYPE,bt.MapperKind.ABSTRACT_TYPE,bt.MapperKind.INTERFACE_TYPE):(0,it.isUnionType)(n)?r.push(bt.MapperKind.COMPOSITE_TYPE,bt.MapperKind.ABSTRACT_TYPE,bt.MapperKind.UNION_TYPE):(0,it.isEnumType)(n)?r.push(bt.MapperKind.ENUM_TYPE):(0,it.isScalarType)(n)&&r.push(bt.MapperKind.SCALAR_TYPE),r}function $ee(e,t,n){let r=Gee(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function Qee(e,t){var i,a,o;let n=e.getType(t),r=[bt.MapperKind.FIELD];return(0,it.isObjectType)(n)?(r.push(bt.MapperKind.COMPOSITE_FIELD,bt.MapperKind.OBJECT_FIELD),t===((i=e.getQueryType())==null?void 0:i.name)?r.push(bt.MapperKind.ROOT_FIELD,bt.MapperKind.QUERY_ROOT_FIELD):t===((a=e.getMutationType())==null?void 0:a.name)?r.push(bt.MapperKind.ROOT_FIELD,bt.MapperKind.MUTATION_ROOT_FIELD):t===((o=e.getSubscriptionType())==null?void 0:o.name)&&r.push(bt.MapperKind.ROOT_FIELD,bt.MapperKind.SUBSCRIPTION_ROOT_FIELD)):(0,it.isInterfaceType)(n)?r.push(bt.MapperKind.COMPOSITE_FIELD,bt.MapperKind.INTERFACE_FIELD):(0,it.isInputObjectType)(n)&&r.push(bt.MapperKind.INPUT_OBJECT_FIELD),r}function Yee(e,t,n){let r=Qee(e,n),i,a=[...r];for(;!i&&a.length>0;){let o=a.pop();i=t[o]}return i!=null?i:null}function Jee(e){let t=e[bt.MapperKind.ARGUMENT];return t!=null?t:null}function Hee(e){let t=e[bt.MapperKind.DIRECTIVE];return t!=null?t:null}function zee(e){let t=e[bt.MapperKind.ENUM_VALUE];return t!=null?t:null}function Bp(e){if((0,it.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(x({},t.astNode),{kind:it.Kind.OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(x({},n),{kind:it.Kind.OBJECT_TYPE_EXTENSION,fields:void 0}))),new it.GraphQLObjectType(t)}else if((0,it.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(x({},t.astNode),{kind:it.Kind.INTERFACE_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(x({},n),{kind:it.Kind.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new it.GraphQLInterfaceType(t)}else if((0,it.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(x({},t.astNode),{kind:it.Kind.INPUT_OBJECT_TYPE_DEFINITION,fields:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(x({},n),{kind:it.Kind.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new it.GraphQLInputObjectType(t)}else if((0,it.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(x({},t.astNode),{values:n})}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>Q(x({},n),{values:void 0}))),new it.GraphQLEnumType(t)}else return e}Ll.correctASTNodes=Bp});var VU=w(IT=>{"use strict";m();T();N();Object.defineProperty(IT,"__esModule",{value:!0});IT.filterSchema=void 0;var yT=Ae(),Os=pc(),Wee=Cl();function Xee({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}){return(0,Wee.mapSchema)(e,{[Os.MapperKind.QUERY]:d=>TS(d,"Query",r,c),[Os.MapperKind.MUTATION]:d=>TS(d,"Mutation",r,c),[Os.MapperKind.SUBSCRIPTION]:d=>TS(d,"Subscription",r,c),[Os.MapperKind.OBJECT_TYPE]:d=>t(d.name,d)?ES(yT.GraphQLObjectType,d,i||n,c):null,[Os.MapperKind.INTERFACE_TYPE]:d=>t(d.name,d)?ES(yT.GraphQLInterfaceType,d,a||n,c):null,[Os.MapperKind.INPUT_OBJECT_TYPE]:d=>t(d.name,d)?ES(yT.GraphQLInputObjectType,d,o||n):null,[Os.MapperKind.UNION_TYPE]:d=>t(d.name,d)?void 0:null,[Os.MapperKind.ENUM_TYPE]:d=>t(d.name,d)?void 0:null,[Os.MapperKind.SCALAR_TYPE]:d=>t(d.name,d)?void 0:null})}IT.filterSchema=Xee;function TS(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(t,a,c,o.args[c])||delete o.args[c]}return new yT.GraphQLObjectType(i)}return e}function ES(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 KU=w(Bl=>{"use strict";m();T();N();Object.defineProperty(Bl,"__esModule",{value:!0});Bl.healTypes=Bl.healSchema=void 0;var ja=Ae();function Zee(e){return jU(e.getTypeMap(),e.getDirectives()),e}Bl.healSchema=Zee;function jU(e,t){let n=Object.create(null);for(let d in e){let f=e[d];if(f==null||d.startsWith("__"))continue;let y=f.name;if(!y.startsWith("__")){if(n[y]!=null){console.warn(`Duplicate schema type name ${y} found; keeping the existing one found in the schema`);continue}n[y]=f}}for(let d in n){let f=n[d];e[d]=f}for(let d of t)d.args=d.args.filter(f=>(f.type=l(f.type),f.type!==null));for(let d in e){let f=e[d];!d.startsWith("__")&&d in n&&f!=null&&r(f)}for(let d in e)!d.startsWith("__")&&!(d in n)&&delete e[d];function r(d){if((0,ja.isObjectType)(d)){i(d),a(d);return}else if((0,ja.isInterfaceType)(d)){i(d),"getInterfaces"in d&&a(d);return}else if((0,ja.isUnionType)(d)){c(d);return}else if((0,ja.isInputObjectType)(d)){o(d);return}else if((0,ja.isLeafType)(d))return;throw new Error(`Unexpected schema type: ${d}`)}function i(d){let f=d.getFields();for(let[y,I]of Object.entries(f))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 f[y]}function a(d){if("getInterfaces"in d){let f=d.getInterfaces();f.push(...f.splice(0).map(y=>l(y)).filter(Boolean))}}function o(d){let f=d.getFields();for(let[y,I]of Object.entries(f))I.type=l(I.type),I.type===null&&delete f[y]}function c(d){let f=d.getTypes();f.push(...f.splice(0).map(y=>l(y)).filter(Boolean))}function l(d){if((0,ja.isListType)(d)){let f=l(d.ofType);return f!=null?new ja.GraphQLList(f):null}else if((0,ja.isNonNullType)(d)){let f=l(d.ofType);return f!=null?new ja.GraphQLNonNull(f):null}else if((0,ja.isNamedType)(d)){let f=e[d.name];if(f&&d!==f)return f}return d}}Bl.healTypes=jU});var GU=w(gT=>{"use strict";m();T();N();Object.defineProperty(gT,"__esModule",{value:!0});gT.getResolversFromSchema=void 0;var fc=Ae();function ete(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,fc.isScalarType)(c)){if(!(0,fc.isSpecifiedScalarType)(c)){let l=c.toConfig();delete l.astNode,n[o]=new fc.GraphQLScalarType(l)}}else if((0,fc.isEnumType)(c)){n[o]={};let l=c.getValues();for(let d of l)n[o][d.name]=d.value}else if((0,fc.isInterfaceType)(c))c.resolveType!=null&&(n[o]={__resolveType:c.resolveType});else if((0,fc.isUnionType)(c))c.resolveType!=null&&(n[o]={__resolveType:c.resolveType});else if((0,fc.isObjectType)(c)){n[o]={},c.isTypeOf!=null&&(n[o].__isTypeOf=c.isTypeOf);let l=c.getFields();for(let d in l){let f=l[d];if(f.subscribe!=null&&(n[o][d]=n[o][d]||{},n[o][d].subscribe=f.subscribe),f.resolve!=null&&((i=f.resolve)==null?void 0:i.name)!=="defaultFieldResolver"){switch((a=f.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=f.resolve}}}}return n}gT.getResolversFromSchema=ete});var QU=w(_T=>{"use strict";m();T();N();Object.defineProperty(_T,"__esModule",{value:!0});_T.forEachField=void 0;var $U=Ae();function tte(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,$U.getNamedType)(i).name.startsWith("__")&&(0,$U.isObjectType)(i)){let a=i.getFields();for(let o in a){let c=a[o];t(c,r,o)}}}}_T.forEachField=tte});var YU=w(vT=>{"use strict";m();T();N();Object.defineProperty(vT,"__esModule",{value:!0});vT.forEachDefaultValue=void 0;var hS=Ae();function nte(e,t){let n=e.getTypeMap();for(let r in n){let i=n[r];if(!(0,hS.getNamedType)(i).name.startsWith("__")){if((0,hS.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,hS.isInputObjectType)(i)){let a=i.getFields();for(let o in a){let c=a[o];c.defaultValue=t(c.type,c.defaultValue)}}}}}vT.forEachDefaultValue=nte});var gS=w(ST=>{"use strict";m();T();N();Object.defineProperty(ST,"__esModule",{value:!0});ST.addTypes=void 0;var yS=Ae(),IS=lS(),rte=TT();function ite(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,yS.isNamedType)(c)?r[c.name]=c:(0,yS.isDirective)(c)&&(i[c.name]=c);let{typeMap:a,directives:o}=(0,rte.rewireTypes)(r,Object.values(i));return new yS.GraphQLSchema(Q(x({},n),{query:(0,IS.getObjectTypeFromTypeMap)(a,e.getQueryType()),mutation:(0,IS.getObjectTypeFromTypeMap)(a,e.getMutationType()),subscription:(0,IS.getObjectTypeFromTypeMap)(a,e.getSubscriptionType()),types:Object.values(a),directives:o}))}ST.addTypes=ite});var HU=w(DT=>{"use strict";m();T();N();Object.defineProperty(DT,"__esModule",{value:!0});DT.pruneSchema=void 0;var tr=Ae(),ate=Hv(),ste=pc(),ote=Cl(),ute=Rp();function cte(e,t={}){let{skipEmptyCompositeTypePruning:n,skipEmptyUnionPruning:r,skipPruning:i,skipUnimplementedInterfacesPruning:a,skipUnusedTypesPruning:o}=t,c=[],l=e;do{let d=lte(l);if(i){let f=[];for(let y in l.getTypeMap()){if(y.startsWith("__"))continue;let I=l.getType(y);I&&i(I)&&f.push(y)}d=JU(f,l,d)}c=[],l=(0,ote.mapSchema)(l,{[ste.MapperKind.TYPE]:f=>!d.has(f.name)&&!(0,tr.isSpecifiedScalarType)(f)?((0,tr.isUnionType)(f)||(0,tr.isInputObjectType)(f)||(0,tr.isInterfaceType)(f)||(0,tr.isObjectType)(f)||(0,tr.isScalarType)(f))&&(o||(0,tr.isUnionType)(f)&&r&&!Object.keys(f.getTypes()).length||((0,tr.isInputObjectType)(f)||(0,tr.isInterfaceType)(f)||(0,tr.isObjectType)(f))&&n&&!Object.keys(f.getFields()).length||(0,tr.isInterfaceType)(f)&&a)?f:(c.push(f.name),d.delete(f.name),null):f})}while(c.length);return l}DT.pruneSchema=cte;function lte(e){let t=[];for(let n of(0,ute.getRootTypes)(e))t.push(n.name);return JU(t,e)}function JU(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,tr.isUnionType)(a)&&e.push(...a.getTypes().map(o=>o.name)),(0,tr.isInterfaceType)(a)&&r[i]===!0&&(e.push(...(0,ate.getImplementingTypes)(a.name,t)),r[i]=!1),(0,tr.isEnumType)(a)&&e.push(...a.getValues().flatMap(o=>o.astNode?OT(t,o.astNode):[])),"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,tr.isObjectType)(a)&&e.push(...l.args.flatMap(f=>{let y=[(0,tr.getNamedType)(f.type).name];return f.astNode&&y.push(...OT(t,f.astNode)),y}));let d=(0,tr.getNamedType)(l.type);e.push(d.name),l.astNode&&e.push(...OT(t,l.astNode)),(0,tr.isInterfaceType)(d)&&!(d.name in r)&&(r[d.name]=!0)}}a.astNode&&e.push(...OT(t,a.astNode)),n.add(i)}}return n}function OT(e,t){var n;return((n=t.directives)!=null?n:[]).flatMap(r=>{var i,a;return(a=(i=e.getDirective(r.name.value))==null?void 0:i.args.map(o=>(0,tr.getNamedType)(o.type).name))!=null?a:[]})}});var WU=w(bT=>{"use strict";m();T();N();Object.defineProperty(bT,"__esModule",{value:!0});bT.mergeDeep=void 0;var dte=Op();function zU(e,t=!1,n=!1){let r=e[0]||{},i={};t&&Object.setPrototypeOf(i,Object.create(Object.getPrototypeOf(r)));for(let a of e)if(_S(r)&&_S(a)){if(t){let o=Object.getPrototypeOf(i),c=Object.getPrototypeOf(a);if(c)for(let l of Object.getOwnPropertyNames(c)){let d=Object.getOwnPropertyDescriptor(c,l);(0,dte.isSome)(d)&&Object.defineProperty(o,l,d)}}for(let o in a)_S(a[o])?o in i?i[o]=zU([i[o],a[o]],t,n):Object.assign(i,{[o]:a[o]}):n&&Array.isArray(i[o])?Array.isArray(a[o])?i[o].push(...a[o]):i[o].push(a[o]):Object.assign(i,{[o]:a[o]})}else if(n&&Array.isArray(r))Array.isArray(a)?r.push(...a):r.push(a);else if(n&&Array.isArray(a))return[r,...a];return i}bT.mergeDeep=zU;function _S(e){return e&&typeof e=="object"&&!Array.isArray(e)}});var XU=w(AT=>{"use strict";m();T();N();Object.defineProperty(AT,"__esModule",{value:!0});AT.parseSelectionSet=void 0;var pte=Ae();function fte(e,t){return(0,pte.parse)(e,t).definitions[0].selectionSet}AT.parseSelectionSet=fte});var ZU=w(RT=>{"use strict";m();T();N();Object.defineProperty(RT,"__esModule",{value:!0});RT.getResponseKeyFromInfo=void 0;function mte(e){return e.fieldNodes[0].alias!=null?e.fieldNodes[0].alias.value:e.fieldName}RT.getResponseKeyFromInfo=mte});var ek=w(Ka=>{"use strict";m();T();N();Object.defineProperty(Ka,"__esModule",{value:!0});Ka.modifyObjectFields=Ka.selectObjectFields=Ka.removeObjectFields=Ka.appendObjectFields=void 0;var PT=Ae(),Nte=gS(),FT=pc(),mc=Cl();function Tte(e,t,n){return e.getType(t)==null?(0,Nte.addTypes)(e,[new PT.GraphQLObjectType({name:t,fields:n})]):(0,mc.mapSchema)(e,{[FT.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,mc.correctASTNodes)(new PT.GraphQLObjectType(Q(x({},i),{fields:o})))}}})}Ka.appendObjectFields=Tte;function Ete(e,t,n){let r={};return[(0,mc.mapSchema)(e,{[FT.MapperKind.OBJECT_TYPE]:a=>{if(a.name===t){let o=a.toConfig(),c=o.fields,l={};for(let d in c){let f=c[d];n(d,f)?r[d]=f:l[d]=f}return(0,mc.correctASTNodes)(new PT.GraphQLObjectType(Q(x({},o),{fields:l})))}}}),r]}Ka.removeObjectFields=Ete;function hte(e,t,n){let r={};return(0,mc.mapSchema)(e,{[FT.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}Ka.selectObjectFields=hte;function yte(e,t,n,r){let i={};return[(0,mc.mapSchema)(e,{[FT.MapperKind.OBJECT_TYPE]:o=>{if(o.name===t){let c=o.toConfig(),l=c.fields,d={};for(let f in l){let y=l[f];n(f,y)?i[f]=y:d[f]=y}for(let f in r){let y=r[f];d[f]=y}return(0,mc.correctASTNodes)(new PT.GraphQLObjectType(Q(x({},c),{fields:d})))}}}),i]}Ka.modifyObjectFields=yte});var tk=w(wT=>{"use strict";m();T();N();Object.defineProperty(wT,"__esModule",{value:!0});wT.renameType=void 0;var ji=Ae();function Ite(e,t){if((0,ji.isObjectType)(e))return new ji.GraphQLObjectType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));if((0,ji.isInterfaceType)(e))return new ji.GraphQLInterfaceType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));if((0,ji.isUnionType)(e))return new ji.GraphQLUnionType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));if((0,ji.isInputObjectType)(e))return new ji.GraphQLInputObjectType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));if((0,ji.isEnumType)(e))return new ji.GraphQLEnumType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));if((0,ji.isScalarType)(e))return new ji.GraphQLScalarType(Q(x({},e.toConfig()),{name:t,astNode:e.astNode==null?e.astNode:Q(x({},e.astNode),{name:Q(x({},e.astNode.name),{value:t})}),extensionASTNodes:e.extensionASTNodes==null?e.extensionASTNodes:e.extensionASTNodes.map(n=>Q(x({},n),{name:Q(x({},n.name),{value:t})}))}));throw new Error(`Unknown type ${e}.`)}wT.renameType=Ite});var ik=w(LT=>{"use strict";m();T();N();Object.defineProperty(LT,"__esModule",{value:!0});LT.mapAsyncIterator=void 0;var gte=bp();function _te(e,t,n,r){let i,a,o;r&&(o=d=>{let f=r();return(0,gte.isPromise)(f)?f.then(()=>d):d}),typeof e.return=="function"&&(i=e.return,a=d=>{let f=()=>Promise.reject(d);return i.call(e).then(f,f)});function c(d){return d.done?o?o(d):d:nk(d.value,t).then(rk,a)}let l;if(n){let d=n;l=f=>nk(f,d).then(rk,a)}return{next(){return e.next().then(c,l)},return(){let d=i?i.call(e).then(c,l):Promise.resolve({value:void 0,done:!0});return o?d.then(o):d},throw(d){return typeof e.throw=="function"?e.throw(d).then(c,l):Promise.reject(d).catch(a)},[Symbol.asyncIterator](){return this}}}LT.mapAsyncIterator=_te;function nk(e,t){return new Promise(n=>n(t(e)))}function rk(e){return{value:e,done:!1}}});var ak=w(Ul=>{"use strict";m();T();N();Object.defineProperty(Ul,"__esModule",{value:!0});Ul.createVariableNameGenerator=Ul.updateArgument=void 0;var Nc=Ae(),vte=Wv();function Ste(e,t,n,r,i,a,o){if(e[r]={kind:Nc.Kind.ARGUMENT,name:{kind:Nc.Kind.NAME,value:r},value:{kind:Nc.Kind.VARIABLE,name:{kind:Nc.Kind.NAME,value:i}}},t[i]={kind:Nc.Kind.VARIABLE_DEFINITION,variable:{kind:Nc.Kind.VARIABLE,name:{kind:Nc.Kind.NAME,value:i}},type:(0,vte.astFromType)(a)},o!==void 0){n[i]=o;return}i in n&&delete n[i]}Ul.updateArgument=Ste;function Ote(e){let t=0;return n=>{let r;do r=`_v${(t++).toString()}_${n}`;while(r in e);return r}}Ul.createVariableNameGenerator=Ote});var sk=w(CT=>{"use strict";m();T();N();Object.defineProperty(CT,"__esModule",{value:!0});CT.implementsAbstractType=void 0;var vS=Ae();function Dte(e,t,n){return n==null||t==null?!1:t===n?!0:(0,vS.isCompositeType)(t)&&(0,vS.isCompositeType)(n)?(0,vS.doTypesOverlap)(e,t,n):!1}CT.implementsAbstractType=Dte});var ok=w(BT=>{"use strict";m();T();N();Object.defineProperty(BT,"__esModule",{value:!0});BT.observableToAsyncIterable=void 0;function bte(e){let t=[],n=[],r=!0,i=f=>{t.length!==0?t.shift()({value:f,done:!1}):n.push({value:f,done:!1})},a=f=>{t.length!==0?t.shift()({value:{errors:[f]},done:!1}):n.push({value:{errors:[f]},done:!1})},o=()=>{t.length!==0?t.shift()({done:!0}):n.push({done:!0})},c=()=>new Promise(f=>{if(n.length!==0){let y=n.shift();f(y)}else t.push(f)}),l=e.subscribe({next(f){i(f)},error(f){a(f)},complete(){o()}}),d=()=>{if(r){r=!1,l.unsubscribe();for(let f of t)f({value:void 0,done:!0});t.length=0,n.length=0}};return{next(){return r?c():this.return()},return(){return d(),Promise.resolve({value:void 0,done:!0})},throw(f){return d(),Promise.reject(f)},[Symbol.asyncIterator](){return this}}}BT.observableToAsyncIterable=bte});var uk=w(UT=>{"use strict";m();T();N();Object.defineProperty(UT,"__esModule",{value:!0});UT.AccumulatorMap=void 0;var SS=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)}};UT.AccumulatorMap=SS});var OS=w(kl=>{"use strict";m();T();N();Object.defineProperty(kl,"__esModule",{value:!0});kl.GraphQLStreamDirective=kl.GraphQLDeferDirective=void 0;var Ki=Ae();kl.GraphQLDeferDirective=new Ki.GraphQLDirective({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[Ki.DirectiveLocation.FRAGMENT_SPREAD,Ki.DirectiveLocation.INLINE_FRAGMENT],args:{if:{type:new Ki.GraphQLNonNull(Ki.GraphQLBoolean),description:"Deferred when true or undefined.",defaultValue:!0},label:{type:Ki.GraphQLString,description:"Unique name"}}});kl.GraphQLStreamDirective=new Ki.GraphQLDirective({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[Ki.DirectiveLocation.FIELD],args:{if:{type:new Ki.GraphQLNonNull(Ki.GraphQLBoolean),description:"Stream when true or undefined.",defaultValue:!0},label:{type:Ki.GraphQLString,description:"Unique name"},initialCount:{defaultValue:0,type:Ki.GraphQLInt,description:"Number of items to return immediately"}}})});var AS=w(Wr=>{"use strict";m();T();N();Object.defineProperty(Wr,"__esModule",{value:!0});Wr.collectSubFields=Wr.getDeferValues=Wr.getFieldEntryKey=Wr.doesFragmentConditionMatch=Wr.shouldIncludeNode=Wr.collectFields=void 0;var Ga=Ae(),MT=uk(),Ate=OS(),Rte=Al();function Ml(e,t,n,r,i,a,o,c){for(let l of i.selections)switch(l.kind){case Ga.Kind.FIELD:{if(!kT(n,l))continue;a.add(ck(l),l);break}case Ga.Kind.INLINE_FRAGMENT:{if(!kT(n,l)||!DS(e,l,r))continue;let d=bS(n,l);if(d){let f=new MT.AccumulatorMap;Ml(e,t,n,r,l.selectionSet,f,o,c),o.push({label:d.label,fields:f})}else Ml(e,t,n,r,l.selectionSet,a,o,c);break}case Ga.Kind.FRAGMENT_SPREAD:{let d=l.name.value;if(!kT(n,l))continue;let f=bS(n,l);if(c.has(d)&&!f)continue;let y=t[d];if(!y||!DS(e,y,r))continue;if(f||c.add(d),f){let I=new MT.AccumulatorMap;Ml(e,t,n,r,y.selectionSet,I,o,c),o.push({label:f.label,fields:I})}else Ml(e,t,n,r,y.selectionSet,a,o,c);break}}}function Pte(e,t,n,r,i){let a=new MT.AccumulatorMap,o=[];return Ml(e,t,n,r,i,a,o,new Set),{fields:a,patches:o}}Wr.collectFields=Pte;function kT(e,t){let n=(0,Ga.getDirectiveValues)(Ga.GraphQLSkipDirective,t,e);if((n==null?void 0:n.if)===!0)return!1;let r=(0,Ga.getDirectiveValues)(Ga.GraphQLIncludeDirective,t,e);return(r==null?void 0:r.if)!==!1}Wr.shouldIncludeNode=kT;function DS(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=(0,Ga.typeFromAST)(e,r);return i===n?!0:(0,Ga.isAbstractType)(i)?e.getPossibleTypes(i).includes(n):!1}Wr.doesFragmentConditionMatch=DS;function ck(e){return e.alias?e.alias.value:e.name.value}Wr.getFieldEntryKey=ck;function bS(e,t){let n=(0,Ga.getDirectiveValues)(Ate.GraphQLDeferDirective,t,e);if(n&&n.if!==!1)return{label:typeof n.label=="string"?n.label:void 0}}Wr.getDeferValues=bS;Wr.collectSubFields=(0,Rte.memoize5)(function(t,n,r,i,a){let o=new MT.AccumulatorMap,c=new Set,l=[],d={fields:o,patches:l};for(let f of a)f.selectionSet&&Ml(t,n,r,i,f.selectionSet,o,l,c);return d})});var RS=w(xl=>{"use strict";m();T();N();Object.defineProperty(xl,"__esModule",{value:!0});xl.getOperationASTFromRequest=xl.getOperationASTFromDocument=void 0;var Fte=Ae(),wte=Al();function lk(e,t){let n=(0,Fte.getOperationAST)(e,t);if(!n)throw new Error(`Cannot infer operation ${t||""}`);return n}xl.getOperationASTFromDocument=lk;xl.getOperationASTFromRequest=(0,wte.memoize1)(function(t){return lk(t.document,t.operationName)})});var fk=w(mu=>{"use strict";m();T();N();Object.defineProperty(mu,"__esModule",{value:!0});mu.visitResult=mu.visitErrors=mu.visitData=void 0;var fu=Ae(),PS=AS(),Lte=RS();function FS(e,t,n){if(Array.isArray(e))return e.map(r=>FS(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:FS(a,t,n)})}return n!=null?n(r):r}return e}mu.visitData=FS;function Cte(e,t){return e.map(n=>t(n))}mu.visitErrors=Cte;function Bte(e,t,n,r,i){let a=t.document.definitions.reduce((I,v)=>(v.kind===fu.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,f=d!=null&&i!=null,y=(0,Lte.getOperationASTFromRequest)(t);return l!=null&&y!=null&&(e.data=Mte(l,y,n,a,o,r,f?d:void 0,c)),d!=null&&i&&(e.errors=Ute(d,i,c)),e}mu.visitResult=Bte;function Ute(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,f)=>{let y=f.type.name,I=t[y];if(I==null)return d;let v=I[f.fieldName];return v==null?d:v(d,f.pathIndex)},o);return a&&i.has(o)?a(l):l})}function kte(e,t){switch(t.operation){case"query":return e.getQueryType();case"mutation":return e.getMutationType();case"subscription":return e.getSubscriptionType()}}function Mte(e,t,n,r,i,a,o,c){let l=kte(n,t),{fields:d}=(0,PS.collectFields)(n,r,i,l,t.selectionSet);return wS(e,l,d,n,r,i,a,0,o,c)}function wS(e,t,n,r,i,a,o,c,l,d){var se;let f=t.getFields(),y=o==null?void 0:o[t.name],I=y==null?void 0:y.__enter,v=I!=null?I(e):e,F,k=null;if(l!=null){F=qte(l,c),k=F.errorMap;for(let ie of F.unpathedErrors)d.unpathedErrors.add(ie)}for(let[ie,Te]of n){let de=Te[0].name.value,Re=(se=f[de])==null?void 0:se.type;if(Re==null)switch(de){case"__typename":Re=fu.TypeNameMetaFieldDef.type;break;case"__schema":Re=fu.SchemaMetaFieldDef.type;break;case"__type":Re=fu.TypeMetaFieldDef.type;break}let xe=c+1,tt;k&&(tt=k[ie],tt!=null&&delete k[ie],Vte(t,de,xe,tt,d));let ee=pk(e[ie],Re,Te,r,i,a,o,xe,tt,d);dk(v,ie,ee,y,de)}let K=v.__typename;if(K!=null&&dk(v,"__typename",K,y,"__typename"),k)for(let ie in k){let Te=k[ie];for(let de of Te)d.unpathedErrors.add(de)}let J=y==null?void 0:y.__leave;return J!=null?J(v):v}function dk(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 xte(e,t,n,r,i,a,o,c,l,d){return e.map(f=>pk(f,t,n,r,i,a,o,c+1,l,d))}function pk(e,t,n,r,i,a,o,c,l=[],d){if(e==null)return e;let f=(0,fu.getNullableType)(t);if((0,fu.isListType)(f))return xte(e,f.ofType,n,r,i,a,o,c,l,d);if((0,fu.isAbstractType)(f)){let v=r.getType(e.__typename),{fields:F}=(0,PS.collectSubFields)(r,i,a,v,n);return wS(e,v,F,r,i,a,o,c,l,d)}else if((0,fu.isObjectType)(f)){let{fields:v}=(0,PS.collectSubFields)(r,i,a,f,n);return wS(e,f,v,r,i,a,o,c,l,d)}let y=o==null?void 0:o[f.name];if(y==null)return e;let I=y(e);return I===void 0?e:I}function qte(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 Vte(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 mk=w(xT=>{"use strict";m();T();N();Object.defineProperty(xT,"__esModule",{value:!0});xT.valueMatchesCriteria=void 0;function LS(e,t){return e==null?e===t:Array.isArray(e)?Array.isArray(t)&&e.every((n,r)=>LS(n,t[r])):typeof e=="object"?typeof t=="object"&&t&&Object.keys(t).every(n=>LS(e[n],t[n])):t instanceof RegExp?t.test(e):e===t}xT.valueMatchesCriteria=LS});var Nk=w(qT=>{"use strict";m();T();N();Object.defineProperty(qT,"__esModule",{value:!0});qT.isAsyncIterable=void 0;function jte(e){return(e==null?void 0:e[Symbol.asyncIterator])!=null}qT.isAsyncIterable=jte});var Tk=w(VT=>{"use strict";m();T();N();Object.defineProperty(VT,"__esModule",{value:!0});VT.isDocumentNode=void 0;var Kte=Ae();function Gte(e){return e&&typeof e=="object"&&"kind"in e&&e.kind===Kte.Kind.DOCUMENT}VT.isDocumentNode=Gte});var Ek=w(()=>{"use strict";m();T();N()});var gk=w(Nu=>{"use strict";m();T();N();Object.defineProperty(Nu,"__esModule",{value:!0});Nu.withCancel=Nu.getAsyncIterableWithCancel=Nu.getAsyncIteratorWithCancel=void 0;var $te=Al();function Qte(e){return Di(this,null,function*(){return{value:e,done:!0}})}var hk=(0,$te.memoize2)(function(t,n){return function(...i){return Reflect.apply(n,t,i)}});function yk(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||Qte;return function(l){return Di(this,null,function*(){let d=yield t(l);return Reflect.apply(o,n,[d])})}}else if(typeof a=="function")return hk(n,a);return a}})}Nu.getAsyncIteratorWithCancel=yk;function Ik(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 yk(c,t)}:typeof a=="function"?hk(n,a):a}})}Nu.getAsyncIterableWithCancel=Ik;Nu.withCancel=Ik});var _k=w(jT=>{"use strict";m();T();N();Object.defineProperty(jT,"__esModule",{value:!0});jT.fixSchemaAst=void 0;var Yte=Ae(),Jte=iS();function Hte(e,t){let n=(0,Jte.getDocumentNodeFromSchema)(e);return(0,Yte.buildASTSchema)(n,x({},t||{}))}function zte(e,t){let n;return(!e.astNode||!e.extensionASTNodes)&&(n=Hte(e,t)),!e.astNode&&(n!=null&&n.astNode)&&(e.astNode=n.astNode),!e.extensionASTNodes&&(n!=null&&n.astNode)&&(e.extensionASTNodes=n.extensionASTNodes),e}jT.fixSchemaAst=zte});var vk=w(KT=>{"use strict";m();T();N();Object.defineProperty(KT,"__esModule",{value:!0});KT.extractExtensionsFromSchema=void 0;var Ds=pc(),Wte=Cl();function la(e={}){let t=x({},e),n=t.directives;if(n!=null)for(let r in n){let i=n[r];Array.isArray(i)||(n[r]=[i])}return t}function Xte(e){let t={schemaExtensions:la(e.extensions),types:{}};return(0,Wte.mapSchema)(e,{[Ds.MapperKind.OBJECT_TYPE]:n=>(t.types[n.name]={fields:{},type:"object",extensions:la(n.extensions)},n),[Ds.MapperKind.INTERFACE_TYPE]:n=>(t.types[n.name]={fields:{},type:"interface",extensions:la(n.extensions)},n),[Ds.MapperKind.FIELD]:(n,r,i)=>{t.types[i].fields[r]={arguments:{},extensions:la(n.extensions)};let a=n.args;if(a!=null)for(let o in a)t.types[i].fields[r].arguments[o]=la(a[o].extensions);return n},[Ds.MapperKind.ENUM_TYPE]:n=>(t.types[n.name]={values:{},type:"enum",extensions:la(n.extensions)},n),[Ds.MapperKind.ENUM_VALUE]:(n,r,i,a)=>(t.types[r].values[a]=la(n.extensions),n),[Ds.MapperKind.SCALAR_TYPE]:n=>(t.types[n.name]={type:"scalar",extensions:la(n.extensions)},n),[Ds.MapperKind.UNION_TYPE]:n=>(t.types[n.name]={type:"union",extensions:la(n.extensions)},n),[Ds.MapperKind.INPUT_OBJECT_TYPE]:n=>(t.types[n.name]={fields:{},type:"input",extensions:la(n.extensions)},n),[Ds.MapperKind.INPUT_OBJECT_FIELD]:(n,r,i)=>(t.types[i].fields[r]={extensions:la(n.extensions)},n)}),t}KT.extractExtensionsFromSchema=Xte});var Sk=w(Tu=>{"use strict";m();T();N();Object.defineProperty(Tu,"__esModule",{value:!0});Tu.printPathArray=Tu.pathToArray=Tu.addPath=void 0;function Zte(e,t,n){return{prev:e,key:t,typename:n}}Tu.addPath=Zte;function ene(e){let t=[],n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}Tu.pathToArray=ene;function tne(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}Tu.printPathArray=tne});var Ok=w(CS=>{"use strict";m();T();N();function GT(e,t,n){if(typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t))for(n=0;n{"use strict";m();T();N();Object.defineProperty($T,"__esModule",{value:!0});$T.mergeIncrementalResult=void 0;var BS=Ok();function Dk({incrementalResult:e,executionResult:t}){var r;let n=["data",...(r=e.path)!=null?r:[]];if(e.items)for(let i of e.items)(0,BS.dset)(t,n,i),n[n.length-1]++;e.data&&(0,BS.dset)(t,n,e.data),e.errors&&(t.errors=t.errors||[],t.errors.push(...e.errors)),e.extensions&&(0,BS.dset)(t,"extensions",e.extensions),e.incremental&&e.incremental.forEach(i=>{Dk({incrementalResult:i,executionResult:t})})}$T.mergeIncrementalResult=Dk});var Rk=w(ql=>{"use strict";m();T();N();Object.defineProperty(ql,"__esModule",{value:!0});ql.debugTimerEnd=ql.debugTimerStart=void 0;var Ak=new Set;function rne(e){let t=(globalThis==null?void 0:globalThis.process.env.DEBUG)||globalThis.DEBUG;(t==="1"||t!=null&&t.includes(e))&&(Ak.add(e),console.time(e))}ql.debugTimerStart=rne;function ine(e){Ak.has(e)&&console.timeEnd(e)}ql.debugTimerEnd=ine});var da=w(Qe=>{"use strict";m();T();N();Object.defineProperty(Qe,"__esModule",{value:!0});Qe.inspect=void 0;var Je=(UB(),fm(BB));Je.__exportStar(kB(),Qe);Je.__exportStar(Op(),Qe);Je.__exportStar(Qv(),Qe);Je.__exportStar(Yv(),Qe);Je.__exportStar(YB(),Qe);Je.__exportStar(Hv(),Qe);Je.__exportStar(iS(),Qe);Je.__exportStar(Yv(),Qe);Je.__exportStar(lU(),Qe);Je.__exportStar(dU(),Qe);Je.__exportStar(SU(),Qe);Je.__exportStar(wU(),Qe);Je.__exportStar(CU(),Qe);Je.__exportStar(VU(),Qe);Je.__exportStar(KU(),Qe);Je.__exportStar(GU(),Qe);Je.__exportStar(QU(),Qe);Je.__exportStar(YU(),Qe);Je.__exportStar(Cl(),Qe);Je.__exportStar(gS(),Qe);Je.__exportStar(TT(),Qe);Je.__exportStar(HU(),Qe);Je.__exportStar(WU(),Qe);Je.__exportStar(pc(),Qe);Je.__exportStar(fS(),Qe);Je.__exportStar(XU(),Qe);Je.__exportStar(ZU(),Qe);Je.__exportStar(ek(),Qe);Je.__exportStar(tk(),Qe);Je.__exportStar(mS(),Qe);Je.__exportStar(ik(),Qe);Je.__exportStar(ak(),Qe);Je.__exportStar(sk(),Qe);Je.__exportStar(WN(),Qe);Je.__exportStar(ok(),Qe);Je.__exportStar(fk(),Qe);Je.__exportStar($v(),Qe);Je.__exportStar(mk(),Qe);Je.__exportStar(Nk(),Qe);Je.__exportStar(Tk(),Qe);Je.__exportStar(aT(),Qe);Je.__exportStar(Ek(),Qe);Je.__exportStar(gk(),Qe);Je.__exportStar(Rp(),Qe);Je.__exportStar(sS(),Qe);Je.__exportStar(AS(),Qe);var ane=Dp();Object.defineProperty(Qe,"inspect",{enumerable:!0,get:function(){return ane.inspect}});Je.__exportStar(Al(),Qe);Je.__exportStar(_k(),Qe);Je.__exportStar(RS(),Qe);Je.__exportStar(vk(),Qe);Je.__exportStar(Sk(),Qe);Je.__exportStar(bp(),Qe);Je.__exportStar(OS(),Qe);Je.__exportStar(bk(),Qe);Je.__exportStar(Rk(),Qe)});var Fk=w(QT=>{"use strict";m();T();N();Object.defineProperty(QT,"__esModule",{value:!0});QT.mergeResolvers=void 0;var sne=da();function Pk(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=Pk(i)),typeof i=="object"&&i&&n.push(i);let r=(0,sne.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=Pk});var US=w(YT=>{"use strict";m();T();N();Object.defineProperty(YT,"__esModule",{value:!0});YT.mergeArguments=void 0;var wk=da();function one(e,t,n){let r=une([...t,...e].filter(wk.isSome),n);return n&&n.sort&&r.sort(wk.compareNodes),r}YT.mergeArguments=one;function une(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 Gi=w(Vl=>{"use strict";m();T();N();Object.defineProperty(Vl,"__esModule",{value:!0});Vl.mergeDirective=Vl.mergeDirectives=void 0;var Lk=Ae(),cne=da();function lne(e,t){return!!e.find(n=>n.name.value===t.name.value)}function Ck(e,t){var n;return!!((n=t==null?void 0:t[e.name.value])!=null&&n.repeatable)}function dne(e,t){return t.some(({value:n})=>n===e.value)}function Bk(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=Tne(o,c,(l,d)=>{let f=l.value;return!f||!d.some(y=>y.value===f)})}else a.value=r.value}else n.push(r)}return n}function pne(e,t){return e.map((n,r,i)=>{let a=i.findIndex(o=>o.name.value===n.name.value);if(a!==r&&!Ck(n,t)){let o=i[a];return n.arguments=Bk(n.arguments,o.arguments),null}return n}).filter(cne.isSome)}function fne(e=[],t=[],n,r){let i=n&&n.reverseDirectives,a=i?e:t,o=i?t:e,c=pne([...a],r);for(let l of o)if(lne(c,l)&&!Ck(l,r)){let d=c.findIndex(y=>y.name.value===l.name.value),f=c[d];c[d].arguments=Bk(l.arguments||[],f.arguments||[])}else c.push(l);return c}Vl.mergeDirectives=fne;function mne(e,t){let n=(0,Lk.print)(Q(x({},e),{description:void 0})),r=(0,Lk.print)(Q(x({},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 Nne(e,t){return t?(mne(e,t),Q(x({},e),{locations:[...t.locations,...e.locations.filter(n=>!dne(n,t.locations))]})):e}ql.mergeDirective=Nne;function Tne(e,t,n){return e.concat(t.filter(r=>n(r,e)))}});var kS=w(JT=>{"use strict";m();T();N();Object.defineProperty(JT,"__esModule",{value:!0});JT.mergeEnumValues=void 0;var Ene=Gi(),hne=da();function yne(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,Ene.mergeDirectives)(o.directives,l.directives,r)}else i.set(c,o)}let a=[...i.values()];return n&&n.sort&&a.sort(hne.compareNodes),a}JT.mergeEnumValues=yne});var MS=w(HT=>{"use strict";m();T();N();Object.defineProperty(HT,"__esModule",{value:!0});HT.mergeEnum=void 0;var Ine=Ae(),gne=Gi(),_ne=kS();function vne(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,gne.mergeDirectives)(e.directives,t.directives,n,r),values:(0,_ne.mergeEnumValues)(e.values,t.values,n)}:n!=null&&n.convertExtensions?Q(x({},e),{kind:Ine.Kind.ENUM_TYPE_DEFINITION}):e}HT.mergeEnum=vne});var zT=w(Vn=>{"use strict";m();T();N();Object.defineProperty(Vn,"__esModule",{value:!0});Vn.defaultStringComparator=Vn.CompareVal=Vn.printTypeNode=Vn.isNonNullTypeNode=Vn.isListTypeNode=Vn.isWrappingTypeNode=Vn.extractType=Vn.isSourceTypes=Vn.isStringTypes=void 0;var Up=Ae();function Sne(e){return typeof e=="string"}Vn.isStringTypes=Sne;function One(e){return e instanceof Up.Source}Vn.isSourceTypes=One;function Dne(e){let t=e;for(;t.kind===Up.Kind.LIST_TYPE||t.kind==="NonNullType";)t=t.type;return t}Vn.extractType=Dne;function bne(e){return e.kind!==Up.Kind.NAMED_TYPE}Vn.isWrappingTypeNode=bne;function Uk(e){return e.kind===Up.Kind.LIST_TYPE}Vn.isListTypeNode=Uk;function kk(e){return e.kind===Up.Kind.NON_NULL_TYPE}Vn.isNonNullTypeNode=kk;function xS(e){return Uk(e)?`[${xS(e.type)}]`:kk(e)?`${xS(e.type)}!`:e.name.value}Vn.printTypeNode=xS;var Tc;(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"})(Tc=Vn.CompareVal||(Vn.CompareVal={}));function Ane(e,t){return e==null&&t==null?Tc.A_EQUALS_B:e==null?Tc.A_SMALLER_THAN_B:t==null?Tc.A_GREATER_THAN_B:et?Tc.A_GREATER_THAN_B:Tc.A_EQUALS_B}Vn.defaultStringComparator=Ane});var Mp=w(WT=>{"use strict";m();T();N();Object.defineProperty(WT,"__esModule",{value:!0});WT.mergeFields=void 0;var Xr=zT(),Rne=Gi(),Pne=da(),Fne=US();function wne(e,t){let n=e.findIndex(r=>r.name.value===t.name.value);return[n>-1?e[n]:null,n]}function Lne(e,t,n,r,i){let a=[];if(n!=null&&a.push(...n),t!=null)for(let o of t){let[c,l]=wne(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)||Cne(e,c,o,r==null?void 0:r.throwOnConflict);d.arguments=(0,Fne.mergeArguments)(o.arguments||[],c.arguments||[],r),d.directives=(0,Rne.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(Pne.compareNodes),r&&r.exclusions){let o=r.exclusions;return a.filter(c=>!o.includes(`${e.name.value}.${c.name.value}`))}return a}WT.mergeFields=Lne;function Cne(e,t,n,r=!1){let i=(0,Xr.printTypeNode)(t.type),a=(0,Xr.printTypeNode)(n.type);if(i!==a){let o=(0,Xr.extractType)(t.type),c=(0,Xr.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(!kp(t.type,n.type,!r))throw new Error(`Field '${e.name.value}.${t.name.value}' changed type from '${i}' to '${a}'`)}return(0,Xr.isNonNullTypeNode)(n.type)&&!(0,Xr.isNonNullTypeNode)(t.type)&&(t.type=n.type),t}function kp(e,t,n=!1){if(!(0,Xr.isWrappingTypeNode)(e)&&!(0,Xr.isWrappingTypeNode)(t))return e.toString()===t.toString();if((0,Xr.isNonNullTypeNode)(t)){let r=(0,Xr.isNonNullTypeNode)(e)?e.type:e;return kp(r,t.type)}return(0,Xr.isNonNullTypeNode)(e)?kp(t,e,n):(0,Xr.isListTypeNode)(e)?(0,Xr.isListTypeNode)(t)&&kp(e.type,t.type)||(0,Xr.isNonNullTypeNode)(t)&&kp(e,t.type):!1}});var qS=w(XT=>{"use strict";m();T();N();Object.defineProperty(XT,"__esModule",{value:!0});XT.mergeInputType=void 0;var Bne=Ae(),Une=Mp(),kne=Gi();function Mne(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,Une.mergeFields)(e,e.fields,t.fields,n),directives:(0,kne.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(x({},e),{kind:Bne.Kind.INPUT_OBJECT_TYPE_DEFINITION}):e}XT.mergeInputType=Mne});var xp=w(ZT=>{"use strict";m();T();N();Object.defineProperty(ZT,"__esModule",{value:!0});ZT.mergeNamedTypeArray=void 0;var xne=da();function qne(e,t){return!!e.find(n=>n.name.value===t.name.value)}function Vne(e=[],t=[],n={}){let r=[...t,...e.filter(i=>!qne(t,i))];return n&&n.sort&&r.sort(xne.compareNodes),r}ZT.mergeNamedTypeArray=Vne});var VS=w(eE=>{"use strict";m();T();N();Object.defineProperty(eE,"__esModule",{value:!0});eE.mergeInterface=void 0;var jne=Ae(),Kne=Mp(),Gne=Gi(),$ne=xp();function Qne(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,Kne.mergeFields)(e,e.fields,t.fields,n),directives:(0,Gne.mergeDirectives)(e.directives,t.directives,n,r),interfaces:e.interfaces?(0,$ne.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(x({},e),{kind:jne.Kind.INTERFACE_TYPE_DEFINITION}):e}eE.mergeInterface=Qne});var jS=w(tE=>{"use strict";m();T();N();Object.defineProperty(tE,"__esModule",{value:!0});tE.mergeType=void 0;var Yne=Ae(),Jne=Mp(),Hne=Gi(),zne=xp();function Wne(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,Jne.mergeFields)(e,e.fields,t.fields,n),directives:(0,Hne.mergeDirectives)(e.directives,t.directives,n,r),interfaces:(0,zne.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(x({},e),{kind:Yne.Kind.OBJECT_TYPE_DEFINITION}):e}tE.mergeType=Wne});var KS=w(nE=>{"use strict";m();T();N();Object.defineProperty(nE,"__esModule",{value:!0});nE.mergeScalar=void 0;var Xne=Ae(),Zne=Gi();function ere(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,Zne.mergeDirectives)(e.directives,t.directives,n,r)}:n!=null&&n.convertExtensions?Q(x({},e),{kind:Xne.Kind.SCALAR_TYPE_DEFINITION}):e}nE.mergeScalar=ere});var $S=w(rE=>{"use strict";m();T();N();Object.defineProperty(rE,"__esModule",{value:!0});rE.mergeUnion=void 0;var GS=Ae(),tre=Gi(),nre=xp();function rre(e,t,n,r){return t?{name:e.name,description:e.description||t.description,directives:(0,tre.mergeDirectives)(e.directives,t.directives,n,r),kind:n!=null&&n.convertExtensions||e.kind==="UnionTypeDefinition"||t.kind==="UnionTypeDefinition"?GS.Kind.UNION_TYPE_DEFINITION:GS.Kind.UNION_TYPE_EXTENSION,loc:e.loc,types:(0,nre.mergeNamedTypeArray)(e.types,t.types,n)}:n!=null&&n.convertExtensions?Q(x({},e),{kind:GS.Kind.UNION_TYPE_DEFINITION}):e}rE.mergeUnion=rre});var QS=w(Ec=>{"use strict";m();T();N();Object.defineProperty(Ec,"__esModule",{value:!0});Ec.mergeSchemaDefs=Ec.DEFAULT_OPERATION_TYPE_NAME_MAP=void 0;var qp=Ae(),ire=Gi();Ec.DEFAULT_OPERATION_TYPE_NAME_MAP={query:"Query",mutation:"Mutation",subscription:"Subscription"};function are(e=[],t=[]){let n=[];for(let r in Ec.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 sre(e,t,n,r){return t?{kind:e.kind===qp.Kind.SCHEMA_DEFINITION||t.kind===qp.Kind.SCHEMA_DEFINITION?qp.Kind.SCHEMA_DEFINITION:qp.Kind.SCHEMA_EXTENSION,description:e.description||t.description,directives:(0,ire.mergeDirectives)(e.directives,t.directives,n,r),operationTypes:are(e.operationTypes,t.operationTypes)}:n!=null&&n.convertExtensions?Q(x({},e),{kind:qp.Kind.SCHEMA_DEFINITION}):e}Ec.mergeSchemaDefs=sre});var YS=w($a=>{"use strict";m();T();N();Object.defineProperty($a,"__esModule",{value:!0});$a.mergeGraphQLNodes=$a.isNamedDefinitionNode=$a.schemaDefSymbol=void 0;var kr=Ae(),ore=jS(),ure=MS(),cre=KS(),lre=$S(),dre=qS(),pre=VS(),fre=Gi(),mre=QS(),Nre=da();$a.schemaDefSymbol="SCHEMA_DEF_SYMBOL";function Mk(e){return"name"in e}$a.isNamedDefinitionNode=Mk;function Tre(e,t,n={}){var i,a,o;let r=n;for(let c of e)if(Mk(c)){let l=(i=c.name)==null?void 0:i.value;if(t!=null&&t.commentDescriptions&&(0,Nre.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 kr.Kind.OBJECT_TYPE_DEFINITION:case kr.Kind.OBJECT_TYPE_EXTENSION:r[l]=(0,ore.mergeType)(c,r[l],t,n);break;case kr.Kind.ENUM_TYPE_DEFINITION:case kr.Kind.ENUM_TYPE_EXTENSION:r[l]=(0,ure.mergeEnum)(c,r[l],t,n);break;case kr.Kind.UNION_TYPE_DEFINITION:case kr.Kind.UNION_TYPE_EXTENSION:r[l]=(0,lre.mergeUnion)(c,r[l],t,n);break;case kr.Kind.SCALAR_TYPE_DEFINITION:case kr.Kind.SCALAR_TYPE_EXTENSION:r[l]=(0,cre.mergeScalar)(c,r[l],t,n);break;case kr.Kind.INPUT_OBJECT_TYPE_DEFINITION:case kr.Kind.INPUT_OBJECT_TYPE_EXTENSION:r[l]=(0,dre.mergeInputType)(c,r[l],t,n);break;case kr.Kind.INTERFACE_TYPE_DEFINITION:case kr.Kind.INTERFACE_TYPE_EXTENSION:r[l]=(0,pre.mergeInterface)(c,r[l],t,n);break;case kr.Kind.DIRECTIVE_DEFINITION:r[l]=(0,fre.mergeDirective)(c,r[l]);break}}else(c.kind===kr.Kind.SCHEMA_DEFINITION||c.kind===kr.Kind.SCHEMA_EXTENSION)&&(r[$a.schemaDefSymbol]=(0,mre.mergeSchemaDefs)(c,r[$a.schemaDefSymbol],t));return r}$a.mergeGraphQLNodes=Tre});var Vk=w(Gl=>{"use strict";m();T();N();Object.defineProperty(Gl,"__esModule",{value:!0});Gl.mergeGraphQLTypes=Gl.mergeTypeDefs=void 0;var $i=Ae(),JS=zT(),Vl=YS(),Kl=da(),xk=QS();function Ere(e,t){(0,Kl.resetComments)();let n={kind:$i.Kind.DOCUMENT,definitions:qk(e,x({useSchemaDefinition:!0,forceSchemaDefinition:!1,throwOnConflict:!1,commentDescriptions:!1},t))},r;return t!=null&&t.commentDescriptions?r=(0,Kl.printWithComments)(n):r=n,(0,Kl.resetComments)(),r}Gl.mergeTypeDefs=Ere;function jl(e,t,n=[],r=[],i=new Set){if(e&&!i.has(e))if(i.add(e),typeof e=="function")jl(e(),t,n,r,i);else if(Array.isArray(e))for(let a of e)jl(a,t,n,r,i);else if((0,$i.isSchema)(e)){let a=(0,Kl.getDocumentNodeFromSchema)(e,t);jl(a.definitions,t,n,r,i)}else if((0,JS.isStringTypes)(e)||(0,JS.isSourceTypes)(e)){let a=(0,$i.parse)(e,t);jl(a.definitions,t,n,r,i)}else if(typeof e=="object"&&(0,$i.isDefinitionNode)(e))e.kind===$i.Kind.DIRECTIVE_DEFINITION?n.push(e):r.push(e);else if((0,Kl.isDocumentNode)(e))jl(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 qk(e,t){var c,l,d;(0,Kl.resetComments)();let{allDirectives:n,allNodes:r}=jl(e,t),i=(0,Vl.mergeGraphQLNodes)(n,t),a=(0,Vl.mergeGraphQLNodes)(r,t,i);if(t!=null&&t.useSchemaDefinition){let f=a[Vl.schemaDefSymbol]||{kind:$i.Kind.SCHEMA_DEFINITION,operationTypes:[]},y=f.operationTypes;for(let I in xk.DEFAULT_OPERATION_TYPE_NAME_MAP)if(!y.find(F=>F.operation===I)){let F=xk.DEFAULT_OPERATION_TYPE_NAME_MAP[I],k=a[F];k!=null&&k.name!=null&&y.push({kind:$i.Kind.OPERATION_TYPE_DEFINITION,type:{kind:$i.Kind.NAMED_TYPE,name:k.name},operation:I})}((c=f==null?void 0:f.operationTypes)==null?void 0:c.length)!=null&&f.operationTypes.length>0&&(a[Vl.schemaDefSymbol]=f)}t!=null&&t.forceSchemaDefinition&&!((d=(l=a[Vl.schemaDefSymbol])==null?void 0:l.operationTypes)!=null&&d.length)&&(a[Vl.schemaDefSymbol]={kind:$i.Kind.SCHEMA_DEFINITION,operationTypes:[{kind:$i.Kind.OPERATION_TYPE_DEFINITION,operation:"query",type:{kind:$i.Kind.NAMED_TYPE,name:{kind:$i.Kind.NAME,value:"Query"}}}]});let o=Object.values(a);if(t!=null&&t.sort){let f=typeof t.sort=="function"?t.sort:JS.defaultStringComparator;o.sort((y,I)=>{var v,F;return f((v=y.name)==null?void 0:v.value,(F=I.name)==null?void 0:F.value)})}return o}Gl.mergeGraphQLTypes=qk});var jk=w(Ar=>{"use strict";m();T();N();Object.defineProperty(Ar,"__esModule",{value:!0});var Zr=(Mv(),fm(kv));Zr.__exportStar(US(),Ar);Zr.__exportStar(Gi(),Ar);Zr.__exportStar(kS(),Ar);Zr.__exportStar(MS(),Ar);Zr.__exportStar(Mp(),Ar);Zr.__exportStar(qS(),Ar);Zr.__exportStar(VS(),Ar);Zr.__exportStar(xp(),Ar);Zr.__exportStar(YS(),Ar);Zr.__exportStar(Vk(),Ar);Zr.__exportStar(KS(),Ar);Zr.__exportStar(jS(),Ar);Zr.__exportStar($S(),Ar);Zr.__exportStar(zT(),Ar)});var Gk=w(Eu=>{"use strict";m();T();N();Object.defineProperty(Eu,"__esModule",{value:!0});Eu.applyExtensions=Eu.mergeExtensions=Eu.extractExtensionsFromSchema=void 0;var Kk=da(),hre=da();Object.defineProperty(Eu,"extractExtensionsFromSchema",{enumerable:!0,get:function(){return hre.extractExtensionsFromSchema}});function yre(e){return(0,Kk.mergeDeep)(e)}Eu.mergeExtensions=yre;function $l(e,t){e&&(e.extensions=(0,Kk.mergeDeep)([e.extensions||{},t||{}]))}function Ire(e,t){$l(e,t.schemaExtensions);for(let[n,r]of Object.entries(t.types||{})){let i=e.getType(n);if(i){if($l(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){$l(c,o.extensions);for(let[l,d]of Object.entries(o.arguments))$l(c.args.find(f=>f.name===l),d)}}else if(r.type==="input")for(let[a,o]of Object.entries(r.fields)){let c=i.getFields()[a];$l(c,o.extensions)}else if(r.type==="enum")for(let[a,o]of Object.entries(r.values)){let c=i.getValue(a);$l(c,o)}}}return e}Eu.applyExtensions=Ire});var iE=w(Vp=>{"use strict";m();T();N();Object.defineProperty(Vp,"__esModule",{value:!0});var HS=(Mv(),fm(kv));HS.__exportStar(Fk(),Vp);HS.__exportStar(jk(),Vp);HS.__exportStar(Gk(),Vp)});var Mi=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=vre;z.incompatibleInputValueDefaultValueTypeError=Sre;z.incompatibleMergedTypesError=Ore;z.incompatibleInputValueDefaultValuesError=Dre;z.incompatibleSharedEnumError=bre;z.invalidSubgraphNamesError=Are;z.duplicateDirectiveDefinitionError=Rre;z.duplicateEnumValueDefinitionError=Pre;z.duplicateFieldDefinitionError=Fre;z.duplicateInputFieldDefinitionError=wre;z.duplicateImplementedInterfaceError=Lre;z.duplicateUnionMemberDefinitionError=Cre;z.duplicateTypeDefinitionError=Bre;z.duplicateOperationTypeDefinitionError=Ure;z.noBaseDefinitionForExtensionError=kre;z.noBaseScalarDefinitionError=Mre;z.noDefinedUnionMembersError=xre;z.noDefinedEnumValuesError=qre;z.operationDefinitionError=Vre;z.invalidFieldShareabilityError=jre;z.undefinedDirectiveError=Kre;z.undefinedTypeError=Gre;z.invalidRepeatedDirectiveErrorMessage=$re;z.invalidDirectiveError=Qre;z.invalidRepeatedFederatedDirectiveErrorMessage=Yre;z.invalidDirectiveLocationErrorMessage=Jre;z.undefinedRequiredArgumentsErrorMessage=Hre;z.unexpectedDirectiveArgumentErrorMessage=zre;z.duplicateDirectiveArgumentDefinitionsErrorMessage=Wre;z.invalidArgumentValueErrorMessage=Xre;z.maximumTypeNestingExceededError=Zre;z.unexpectedKindFatalError=eie;z.incompatibleParentKindFatalError=tie;z.unexpectedEdgeFatalError=nie;z.incompatibleParentKindMergeError=rie;z.fieldTypeMergeFatalError=iie;z.unexpectedTypeNodeKindFatalError=aie;z.invalidKeyFatalError=sie;z.unexpectedParentKindForChildError=oie;z.subgraphValidationError=uie;z.invalidSubgraphNameErrorMessage=cie;z.invalidOperationTypeDefinitionError=lie;z.invalidRootTypeDefinitionError=die;z.subgraphInvalidSyntaxError=pie;z.invalidInterfaceImplementationError=fie;z.invalidRequiredInputValueError=mie;z.duplicateArgumentsError=Nie;z.noQueryRootTypeError=Tie;z.expectedEntityError=Eie;z.abstractTypeInKeyFieldSetErrorMessage=hie;z.unknownTypeInFieldSetErrorMessage=yie;z.invalidSelectionSetErrorMessage=Iie;z.invalidSelectionSetDefinitionErrorMessage=gie;z.undefinedFieldInFieldSetErrorMessage=_ie;z.unparsableFieldSetErrorMessage=vie;z.unparsableFieldSetSelectionErrorMessage=Sie;z.undefinedCompositeOutputTypeError=Oie;z.unexpectedArgumentErrorMessage=Die;z.argumentsInKeyFieldSetErrorMessage=bie;z.invalidProvidesOrRequiresDirectivesError=Aie;z.duplicateFieldInFieldSetErrorMessage=Rie;z.invalidConfigurationDataErrorMessage=Pie;z.incompatibleTypeWithProvidesErrorMessage=Fie;z.invalidInlineFragmentTypeErrorMessage=wie;z.inlineFragmentWithoutTypeConditionErrorMessage=Lie;z.unknownInlineFragmentTypeConditionErrorMessage=Cie;z.invalidInlineFragmentTypeConditionTypeErrorMessage=Bie;z.invalidInlineFragmentTypeConditionErrorMessage=Uie;z.invalidSelectionOnUnionErrorMessage=kie;z.duplicateOverriddenFieldErrorMessage=Mie;z.duplicateOverriddenFieldsError=xie;z.noFieldDefinitionsError=qie;z.noInputValueDefinitionsError=Vie;z.allChildDefinitionsAreInaccessibleError=jie;z.equivalentSourceAndTargetOverrideErrorMessage=Kie;z.undefinedEntityInterfaceImplementationsError=Gie;z.orScopesLimitError=$ie;z.invalidEventDrivenGraphError=Qie;z.invalidRootTypeFieldEventsDirectivesErrorMessage=Yie;z.invalidEventDrivenMutationResponseTypeErrorMessage=Jie;z.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage=Hie;z.invalidNatsStreamInputFieldsErrorMessage=zie;z.invalidKeyFieldSetsEventDrivenErrorMessage=Wie;z.nonExternalKeyFieldNamesEventDrivenErrorMessage=Xie;z.nonKeyFieldNamesEventDrivenErrorMessage=Zie;z.nonEntityObjectExtensionsEventDrivenErrorMessage=eae;z.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage=tae;z.invalidEdfsDirectiveName=nae;z.invalidImplementedTypeError=rae;z.selfImplementationError=iae;z.invalidEventSubjectErrorMessage=aae;z.invalidEventSubjectsErrorMessage=sae;z.invalidEventSubjectsItemErrorMessage=oae;z.invalidEventSubjectsArgumentErrorMessage=uae;z.undefinedEventSubjectsArgumentErrorMessage=cae;z.invalidEventDirectiveError=lae;z.invalidReferencesOfInaccessibleTypeError=dae;z.inaccessibleRequiredInputValueError=pae;z.invalidUnionMemberTypeError=fae;z.invalidRootTypeError=mae;z.invalidSubscriptionFilterLocationError=Nae;z.invalidSubscriptionFilterDirectiveError=Tae;z.subscriptionFilterNamedTypeErrorMessage=Eae;z.subscriptionFilterConditionDepthExceededErrorMessage=hae;z.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage=yae;z.subscriptionFilterConditionInvalidInputFieldErrorMessage=Iae;z.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage=gae;z.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage=_ae;z.subscriptionFilterArrayConditionInvalidLengthErrorMessage=vae;z.invalidInputFieldTypeErrorMessage=Sae;z.subscriptionFieldConditionInvalidInputFieldErrorMessage=Oae;z.subscriptionFieldConditionInvalidValuesArrayErrorMessage=Dae;z.subscriptionFieldConditionEmptyValuesArrayErrorMessage=bae;z.unknownFieldSubgraphNameError=Aae;z.invalidSubscriptionFieldConditionFieldPathErrorMessage=Rae;z.invalidSubscriptionFieldConditionFieldPathParentErrorMessage=Pae;z.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage=Fae;z.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage=wae;z.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage=Lae;z.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage=Cae;z.unresolvablePathError=Bae;z.allExternalFieldInstancesError=Uae;z.externalInterfaceFieldsError=kae;z.nonExternalConditionalFieldError=Mae;z.incompatibleFederatedFieldNamedTypeError=xae;z.unknownNamedTypeErrorMessage=zk;z.unknownNamedTypeError=qae;z.unknownFieldDataError=Vae;z.unexpectedNonCompositeOutputTypeError=jae;z.invalidExternalDirectiveError=Kae;z.configureDescriptionNoDescriptionError=Gae;z.configureDescriptionPropagationError=$ae;z.duplicateDirectiveDefinitionArgumentErrorMessage=Qae;z.duplicateDirectiveDefinitionLocationErrorMessage=Yae;z.invalidDirectiveDefinitionLocationErrorMessage=Jae;z.invalidDirectiveDefinitionError=Hae;z.fieldAlreadyProvidedErrorMessage=zae;z.invalidInterfaceObjectImplementationDefinitionsError=Wae;z.invalidNamedTypeError=Xae;z.semanticNonNullLevelsNaNIndexErrorMessage=Zae;z.semanticNonNullLevelsIndexOutOfBoundsErrorMessage=ese;z.semanticNonNullLevelsNonNullErrorMessage=tse;z.semanticNonNullInconsistentLevelsError=nse;z.oneOfRequiredFieldsError=rse;var $k=Ae(),He=vr(),Qk=Il(),Ql=Sr(),gre=vl(),_re=iE();z.minimumSubgraphRequirementError=new Error("At least one subgraph is required for federation.");function vre(e,t,n){return new Error(`The named type "${e}" is defined as both types "${t}" and "${n}". + ${n}`)}function Nne(e,t){return t?(mne(e,t),Q(x({},e),{locations:[...t.locations,...e.locations.filter(n=>!dne(n,t.locations))]})):e}Vl.mergeDirective=Nne;function Tne(e,t,n){return e.concat(t.filter(r=>n(r,e)))}});var kS=w(JT=>{"use strict";m();T();N();Object.defineProperty(JT,"__esModule",{value:!0});JT.mergeEnumValues=void 0;var Ene=Gi(),hne=da();function yne(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,Ene.mergeDirectives)(o.directives,l.directives,r)}else i.set(c,o)}let a=[...i.values()];return n&&n.sort&&a.sort(hne.compareNodes),a}JT.mergeEnumValues=yne});var MS=w(HT=>{"use strict";m();T();N();Object.defineProperty(HT,"__esModule",{value:!0});HT.mergeEnum=void 0;var Ine=Ae(),gne=Gi(),_ne=kS();function vne(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,gne.mergeDirectives)(e.directives,t.directives,n,r),values:(0,_ne.mergeEnumValues)(e.values,t.values,n)}:n!=null&&n.convertExtensions?Q(x({},e),{kind:Ine.Kind.ENUM_TYPE_DEFINITION}):e}HT.mergeEnum=vne});var zT=w(Vn=>{"use strict";m();T();N();Object.defineProperty(Vn,"__esModule",{value:!0});Vn.defaultStringComparator=Vn.CompareVal=Vn.printTypeNode=Vn.isNonNullTypeNode=Vn.isListTypeNode=Vn.isWrappingTypeNode=Vn.extractType=Vn.isSourceTypes=Vn.isStringTypes=void 0;var Up=Ae();function Sne(e){return typeof e=="string"}Vn.isStringTypes=Sne;function One(e){return e instanceof Up.Source}Vn.isSourceTypes=One;function Dne(e){let t=e;for(;t.kind===Up.Kind.LIST_TYPE||t.kind==="NonNullType";)t=t.type;return t}Vn.extractType=Dne;function bne(e){return e.kind!==Up.Kind.NAMED_TYPE}Vn.isWrappingTypeNode=bne;function Uk(e){return e.kind===Up.Kind.LIST_TYPE}Vn.isListTypeNode=Uk;function kk(e){return e.kind===Up.Kind.NON_NULL_TYPE}Vn.isNonNullTypeNode=kk;function xS(e){return Uk(e)?`[${xS(e.type)}]`:kk(e)?`${xS(e.type)}!`:e.name.value}Vn.printTypeNode=xS;var Tc;(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"})(Tc=Vn.CompareVal||(Vn.CompareVal={}));function Ane(e,t){return e==null&&t==null?Tc.A_EQUALS_B:e==null?Tc.A_SMALLER_THAN_B:t==null?Tc.A_GREATER_THAN_B:et?Tc.A_GREATER_THAN_B:Tc.A_EQUALS_B}Vn.defaultStringComparator=Ane});var Mp=w(WT=>{"use strict";m();T();N();Object.defineProperty(WT,"__esModule",{value:!0});WT.mergeFields=void 0;var Xr=zT(),Rne=Gi(),Pne=da(),Fne=US();function wne(e,t){let n=e.findIndex(r=>r.name.value===t.name.value);return[n>-1?e[n]:null,n]}function Lne(e,t,n,r,i){let a=[];if(n!=null&&a.push(...n),t!=null)for(let o of t){let[c,l]=wne(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)||Cne(e,c,o,r==null?void 0:r.throwOnConflict);d.arguments=(0,Fne.mergeArguments)(o.arguments||[],c.arguments||[],r),d.directives=(0,Rne.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(Pne.compareNodes),r&&r.exclusions){let o=r.exclusions;return a.filter(c=>!o.includes(`${e.name.value}.${c.name.value}`))}return a}WT.mergeFields=Lne;function Cne(e,t,n,r=!1){let i=(0,Xr.printTypeNode)(t.type),a=(0,Xr.printTypeNode)(n.type);if(i!==a){let o=(0,Xr.extractType)(t.type),c=(0,Xr.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(!kp(t.type,n.type,!r))throw new Error(`Field '${e.name.value}.${t.name.value}' changed type from '${i}' to '${a}'`)}return(0,Xr.isNonNullTypeNode)(n.type)&&!(0,Xr.isNonNullTypeNode)(t.type)&&(t.type=n.type),t}function kp(e,t,n=!1){if(!(0,Xr.isWrappingTypeNode)(e)&&!(0,Xr.isWrappingTypeNode)(t))return e.toString()===t.toString();if((0,Xr.isNonNullTypeNode)(t)){let r=(0,Xr.isNonNullTypeNode)(e)?e.type:e;return kp(r,t.type)}return(0,Xr.isNonNullTypeNode)(e)?kp(t,e,n):(0,Xr.isListTypeNode)(e)?(0,Xr.isListTypeNode)(t)&&kp(e.type,t.type)||(0,Xr.isNonNullTypeNode)(t)&&kp(e,t.type):!1}});var qS=w(XT=>{"use strict";m();T();N();Object.defineProperty(XT,"__esModule",{value:!0});XT.mergeInputType=void 0;var Bne=Ae(),Une=Mp(),kne=Gi();function Mne(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,Une.mergeFields)(e,e.fields,t.fields,n),directives:(0,kne.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(x({},e),{kind:Bne.Kind.INPUT_OBJECT_TYPE_DEFINITION}):e}XT.mergeInputType=Mne});var xp=w(ZT=>{"use strict";m();T();N();Object.defineProperty(ZT,"__esModule",{value:!0});ZT.mergeNamedTypeArray=void 0;var xne=da();function qne(e,t){return!!e.find(n=>n.name.value===t.name.value)}function Vne(e=[],t=[],n={}){let r=[...t,...e.filter(i=>!qne(t,i))];return n&&n.sort&&r.sort(xne.compareNodes),r}ZT.mergeNamedTypeArray=Vne});var VS=w(eE=>{"use strict";m();T();N();Object.defineProperty(eE,"__esModule",{value:!0});eE.mergeInterface=void 0;var jne=Ae(),Kne=Mp(),Gne=Gi(),$ne=xp();function Qne(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,Kne.mergeFields)(e,e.fields,t.fields,n),directives:(0,Gne.mergeDirectives)(e.directives,t.directives,n,r),interfaces:e.interfaces?(0,$ne.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(x({},e),{kind:jne.Kind.INTERFACE_TYPE_DEFINITION}):e}eE.mergeInterface=Qne});var jS=w(tE=>{"use strict";m();T();N();Object.defineProperty(tE,"__esModule",{value:!0});tE.mergeType=void 0;var Yne=Ae(),Jne=Mp(),Hne=Gi(),zne=xp();function Wne(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,Jne.mergeFields)(e,e.fields,t.fields,n),directives:(0,Hne.mergeDirectives)(e.directives,t.directives,n,r),interfaces:(0,zne.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(x({},e),{kind:Yne.Kind.OBJECT_TYPE_DEFINITION}):e}tE.mergeType=Wne});var KS=w(nE=>{"use strict";m();T();N();Object.defineProperty(nE,"__esModule",{value:!0});nE.mergeScalar=void 0;var Xne=Ae(),Zne=Gi();function ere(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,Zne.mergeDirectives)(e.directives,t.directives,n,r)}:n!=null&&n.convertExtensions?Q(x({},e),{kind:Xne.Kind.SCALAR_TYPE_DEFINITION}):e}nE.mergeScalar=ere});var $S=w(rE=>{"use strict";m();T();N();Object.defineProperty(rE,"__esModule",{value:!0});rE.mergeUnion=void 0;var GS=Ae(),tre=Gi(),nre=xp();function rre(e,t,n,r){return t?{name:e.name,description:e.description||t.description,directives:(0,tre.mergeDirectives)(e.directives,t.directives,n,r),kind:n!=null&&n.convertExtensions||e.kind==="UnionTypeDefinition"||t.kind==="UnionTypeDefinition"?GS.Kind.UNION_TYPE_DEFINITION:GS.Kind.UNION_TYPE_EXTENSION,loc:e.loc,types:(0,nre.mergeNamedTypeArray)(e.types,t.types,n)}:n!=null&&n.convertExtensions?Q(x({},e),{kind:GS.Kind.UNION_TYPE_DEFINITION}):e}rE.mergeUnion=rre});var QS=w(Ec=>{"use strict";m();T();N();Object.defineProperty(Ec,"__esModule",{value:!0});Ec.mergeSchemaDefs=Ec.DEFAULT_OPERATION_TYPE_NAME_MAP=void 0;var qp=Ae(),ire=Gi();Ec.DEFAULT_OPERATION_TYPE_NAME_MAP={query:"Query",mutation:"Mutation",subscription:"Subscription"};function are(e=[],t=[]){let n=[];for(let r in Ec.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 sre(e,t,n,r){return t?{kind:e.kind===qp.Kind.SCHEMA_DEFINITION||t.kind===qp.Kind.SCHEMA_DEFINITION?qp.Kind.SCHEMA_DEFINITION:qp.Kind.SCHEMA_EXTENSION,description:e.description||t.description,directives:(0,ire.mergeDirectives)(e.directives,t.directives,n,r),operationTypes:are(e.operationTypes,t.operationTypes)}:n!=null&&n.convertExtensions?Q(x({},e),{kind:qp.Kind.SCHEMA_DEFINITION}):e}Ec.mergeSchemaDefs=sre});var YS=w($a=>{"use strict";m();T();N();Object.defineProperty($a,"__esModule",{value:!0});$a.mergeGraphQLNodes=$a.isNamedDefinitionNode=$a.schemaDefSymbol=void 0;var kr=Ae(),ore=jS(),ure=MS(),cre=KS(),lre=$S(),dre=qS(),pre=VS(),fre=Gi(),mre=QS(),Nre=da();$a.schemaDefSymbol="SCHEMA_DEF_SYMBOL";function Mk(e){return"name"in e}$a.isNamedDefinitionNode=Mk;function Tre(e,t,n={}){var i,a,o;let r=n;for(let c of e)if(Mk(c)){let l=(i=c.name)==null?void 0:i.value;if(t!=null&&t.commentDescriptions&&(0,Nre.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 kr.Kind.OBJECT_TYPE_DEFINITION:case kr.Kind.OBJECT_TYPE_EXTENSION:r[l]=(0,ore.mergeType)(c,r[l],t,n);break;case kr.Kind.ENUM_TYPE_DEFINITION:case kr.Kind.ENUM_TYPE_EXTENSION:r[l]=(0,ure.mergeEnum)(c,r[l],t,n);break;case kr.Kind.UNION_TYPE_DEFINITION:case kr.Kind.UNION_TYPE_EXTENSION:r[l]=(0,lre.mergeUnion)(c,r[l],t,n);break;case kr.Kind.SCALAR_TYPE_DEFINITION:case kr.Kind.SCALAR_TYPE_EXTENSION:r[l]=(0,cre.mergeScalar)(c,r[l],t,n);break;case kr.Kind.INPUT_OBJECT_TYPE_DEFINITION:case kr.Kind.INPUT_OBJECT_TYPE_EXTENSION:r[l]=(0,dre.mergeInputType)(c,r[l],t,n);break;case kr.Kind.INTERFACE_TYPE_DEFINITION:case kr.Kind.INTERFACE_TYPE_EXTENSION:r[l]=(0,pre.mergeInterface)(c,r[l],t,n);break;case kr.Kind.DIRECTIVE_DEFINITION:r[l]=(0,fre.mergeDirective)(c,r[l]);break}}else(c.kind===kr.Kind.SCHEMA_DEFINITION||c.kind===kr.Kind.SCHEMA_EXTENSION)&&(r[$a.schemaDefSymbol]=(0,mre.mergeSchemaDefs)(c,r[$a.schemaDefSymbol],t));return r}$a.mergeGraphQLNodes=Tre});var Vk=w($l=>{"use strict";m();T();N();Object.defineProperty($l,"__esModule",{value:!0});$l.mergeGraphQLTypes=$l.mergeTypeDefs=void 0;var $i=Ae(),JS=zT(),jl=YS(),Gl=da(),xk=QS();function Ere(e,t){(0,Gl.resetComments)();let n={kind:$i.Kind.DOCUMENT,definitions:qk(e,x({useSchemaDefinition:!0,forceSchemaDefinition:!1,throwOnConflict:!1,commentDescriptions:!1},t))},r;return t!=null&&t.commentDescriptions?r=(0,Gl.printWithComments)(n):r=n,(0,Gl.resetComments)(),r}$l.mergeTypeDefs=Ere;function Kl(e,t,n=[],r=[],i=new Set){if(e&&!i.has(e))if(i.add(e),typeof e=="function")Kl(e(),t,n,r,i);else if(Array.isArray(e))for(let a of e)Kl(a,t,n,r,i);else if((0,$i.isSchema)(e)){let a=(0,Gl.getDocumentNodeFromSchema)(e,t);Kl(a.definitions,t,n,r,i)}else if((0,JS.isStringTypes)(e)||(0,JS.isSourceTypes)(e)){let a=(0,$i.parse)(e,t);Kl(a.definitions,t,n,r,i)}else if(typeof e=="object"&&(0,$i.isDefinitionNode)(e))e.kind===$i.Kind.DIRECTIVE_DEFINITION?n.push(e):r.push(e);else if((0,Gl.isDocumentNode)(e))Kl(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 qk(e,t){var c,l,d;(0,Gl.resetComments)();let{allDirectives:n,allNodes:r}=Kl(e,t),i=(0,jl.mergeGraphQLNodes)(n,t),a=(0,jl.mergeGraphQLNodes)(r,t,i);if(t!=null&&t.useSchemaDefinition){let f=a[jl.schemaDefSymbol]||{kind:$i.Kind.SCHEMA_DEFINITION,operationTypes:[]},y=f.operationTypes;for(let I in xk.DEFAULT_OPERATION_TYPE_NAME_MAP)if(!y.find(F=>F.operation===I)){let F=xk.DEFAULT_OPERATION_TYPE_NAME_MAP[I],k=a[F];k!=null&&k.name!=null&&y.push({kind:$i.Kind.OPERATION_TYPE_DEFINITION,type:{kind:$i.Kind.NAMED_TYPE,name:k.name},operation:I})}((c=f==null?void 0:f.operationTypes)==null?void 0:c.length)!=null&&f.operationTypes.length>0&&(a[jl.schemaDefSymbol]=f)}t!=null&&t.forceSchemaDefinition&&!((d=(l=a[jl.schemaDefSymbol])==null?void 0:l.operationTypes)!=null&&d.length)&&(a[jl.schemaDefSymbol]={kind:$i.Kind.SCHEMA_DEFINITION,operationTypes:[{kind:$i.Kind.OPERATION_TYPE_DEFINITION,operation:"query",type:{kind:$i.Kind.NAMED_TYPE,name:{kind:$i.Kind.NAME,value:"Query"}}}]});let o=Object.values(a);if(t!=null&&t.sort){let f=typeof t.sort=="function"?t.sort:JS.defaultStringComparator;o.sort((y,I)=>{var v,F;return f((v=y.name)==null?void 0:v.value,(F=I.name)==null?void 0:F.value)})}return o}$l.mergeGraphQLTypes=qk});var jk=w(Ar=>{"use strict";m();T();N();Object.defineProperty(Ar,"__esModule",{value:!0});var Zr=(Mv(),fm(kv));Zr.__exportStar(US(),Ar);Zr.__exportStar(Gi(),Ar);Zr.__exportStar(kS(),Ar);Zr.__exportStar(MS(),Ar);Zr.__exportStar(Mp(),Ar);Zr.__exportStar(qS(),Ar);Zr.__exportStar(VS(),Ar);Zr.__exportStar(xp(),Ar);Zr.__exportStar(YS(),Ar);Zr.__exportStar(Vk(),Ar);Zr.__exportStar(KS(),Ar);Zr.__exportStar(jS(),Ar);Zr.__exportStar($S(),Ar);Zr.__exportStar(zT(),Ar)});var Gk=w(Eu=>{"use strict";m();T();N();Object.defineProperty(Eu,"__esModule",{value:!0});Eu.applyExtensions=Eu.mergeExtensions=Eu.extractExtensionsFromSchema=void 0;var Kk=da(),hre=da();Object.defineProperty(Eu,"extractExtensionsFromSchema",{enumerable:!0,get:function(){return hre.extractExtensionsFromSchema}});function yre(e){return(0,Kk.mergeDeep)(e)}Eu.mergeExtensions=yre;function Ql(e,t){e&&(e.extensions=(0,Kk.mergeDeep)([e.extensions||{},t||{}]))}function Ire(e,t){Ql(e,t.schemaExtensions);for(let[n,r]of Object.entries(t.types||{})){let i=e.getType(n);if(i){if(Ql(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){Ql(c,o.extensions);for(let[l,d]of Object.entries(o.arguments))Ql(c.args.find(f=>f.name===l),d)}}else if(r.type==="input")for(let[a,o]of Object.entries(r.fields)){let c=i.getFields()[a];Ql(c,o.extensions)}else if(r.type==="enum")for(let[a,o]of Object.entries(r.values)){let c=i.getValue(a);Ql(c,o)}}}return e}Eu.applyExtensions=Ire});var iE=w(Vp=>{"use strict";m();T();N();Object.defineProperty(Vp,"__esModule",{value:!0});var HS=(Mv(),fm(kv));HS.__exportStar(Fk(),Vp);HS.__exportStar(jk(),Vp);HS.__exportStar(Gk(),Vp)});var Mi=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=vre;z.incompatibleInputValueDefaultValueTypeError=Sre;z.incompatibleMergedTypesError=Ore;z.incompatibleInputValueDefaultValuesError=Dre;z.incompatibleSharedEnumError=bre;z.invalidSubgraphNamesError=Are;z.duplicateDirectiveDefinitionError=Rre;z.duplicateEnumValueDefinitionError=Pre;z.duplicateFieldDefinitionError=Fre;z.duplicateInputFieldDefinitionError=wre;z.duplicateImplementedInterfaceError=Lre;z.duplicateUnionMemberDefinitionError=Cre;z.duplicateTypeDefinitionError=Bre;z.duplicateOperationTypeDefinitionError=Ure;z.noBaseDefinitionForExtensionError=kre;z.noBaseScalarDefinitionError=Mre;z.noDefinedUnionMembersError=xre;z.noDefinedEnumValuesError=qre;z.operationDefinitionError=Vre;z.invalidFieldShareabilityError=jre;z.undefinedDirectiveError=Kre;z.undefinedTypeError=Gre;z.invalidRepeatedDirectiveErrorMessage=$re;z.invalidDirectiveError=Qre;z.invalidRepeatedFederatedDirectiveErrorMessage=Yre;z.invalidDirectiveLocationErrorMessage=Jre;z.undefinedRequiredArgumentsErrorMessage=Hre;z.unexpectedDirectiveArgumentErrorMessage=zre;z.duplicateDirectiveArgumentDefinitionsErrorMessage=Wre;z.invalidArgumentValueErrorMessage=Xre;z.maximumTypeNestingExceededError=Zre;z.unexpectedKindFatalError=eie;z.incompatibleParentKindFatalError=tie;z.unexpectedEdgeFatalError=nie;z.incompatibleParentKindMergeError=rie;z.fieldTypeMergeFatalError=iie;z.unexpectedTypeNodeKindFatalError=aie;z.invalidKeyFatalError=sie;z.unexpectedParentKindForChildError=oie;z.subgraphValidationError=uie;z.invalidSubgraphNameErrorMessage=cie;z.invalidOperationTypeDefinitionError=lie;z.invalidRootTypeDefinitionError=die;z.subgraphInvalidSyntaxError=pie;z.invalidInterfaceImplementationError=fie;z.invalidRequiredInputValueError=mie;z.duplicateArgumentsError=Nie;z.noQueryRootTypeError=Tie;z.expectedEntityError=Eie;z.abstractTypeInKeyFieldSetErrorMessage=hie;z.unknownTypeInFieldSetErrorMessage=yie;z.invalidSelectionSetErrorMessage=Iie;z.invalidSelectionSetDefinitionErrorMessage=gie;z.undefinedFieldInFieldSetErrorMessage=_ie;z.unparsableFieldSetErrorMessage=vie;z.unparsableFieldSetSelectionErrorMessage=Sie;z.undefinedCompositeOutputTypeError=Oie;z.unexpectedArgumentErrorMessage=Die;z.argumentsInKeyFieldSetErrorMessage=bie;z.invalidProvidesOrRequiresDirectivesError=Aie;z.duplicateFieldInFieldSetErrorMessage=Rie;z.invalidConfigurationDataErrorMessage=Pie;z.incompatibleTypeWithProvidesErrorMessage=Fie;z.invalidInlineFragmentTypeErrorMessage=wie;z.inlineFragmentWithoutTypeConditionErrorMessage=Lie;z.unknownInlineFragmentTypeConditionErrorMessage=Cie;z.invalidInlineFragmentTypeConditionTypeErrorMessage=Bie;z.invalidInlineFragmentTypeConditionErrorMessage=Uie;z.invalidSelectionOnUnionErrorMessage=kie;z.duplicateOverriddenFieldErrorMessage=Mie;z.duplicateOverriddenFieldsError=xie;z.noFieldDefinitionsError=qie;z.noInputValueDefinitionsError=Vie;z.allChildDefinitionsAreInaccessibleError=jie;z.equivalentSourceAndTargetOverrideErrorMessage=Kie;z.undefinedEntityInterfaceImplementationsError=Gie;z.orScopesLimitError=$ie;z.invalidEventDrivenGraphError=Qie;z.invalidRootTypeFieldEventsDirectivesErrorMessage=Yie;z.invalidEventDrivenMutationResponseTypeErrorMessage=Jie;z.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage=Hie;z.invalidNatsStreamInputFieldsErrorMessage=zie;z.invalidKeyFieldSetsEventDrivenErrorMessage=Wie;z.nonExternalKeyFieldNamesEventDrivenErrorMessage=Xie;z.nonKeyFieldNamesEventDrivenErrorMessage=Zie;z.nonEntityObjectExtensionsEventDrivenErrorMessage=eae;z.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage=tae;z.invalidEdfsDirectiveName=nae;z.invalidImplementedTypeError=rae;z.selfImplementationError=iae;z.invalidEventSubjectErrorMessage=aae;z.invalidEventSubjectsErrorMessage=sae;z.invalidEventSubjectsItemErrorMessage=oae;z.invalidEventSubjectsArgumentErrorMessage=uae;z.undefinedEventSubjectsArgumentErrorMessage=cae;z.invalidEventDirectiveError=lae;z.invalidReferencesOfInaccessibleTypeError=dae;z.inaccessibleRequiredInputValueError=pae;z.invalidUnionMemberTypeError=fae;z.invalidRootTypeError=mae;z.invalidSubscriptionFilterLocationError=Nae;z.invalidSubscriptionFilterDirectiveError=Tae;z.subscriptionFilterNamedTypeErrorMessage=Eae;z.subscriptionFilterConditionDepthExceededErrorMessage=hae;z.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage=yae;z.subscriptionFilterConditionInvalidInputFieldErrorMessage=Iae;z.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage=gae;z.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage=_ae;z.subscriptionFilterArrayConditionInvalidLengthErrorMessage=vae;z.invalidInputFieldTypeErrorMessage=Sae;z.subscriptionFieldConditionInvalidInputFieldErrorMessage=Oae;z.subscriptionFieldConditionInvalidValuesArrayErrorMessage=Dae;z.subscriptionFieldConditionEmptyValuesArrayErrorMessage=bae;z.unknownFieldSubgraphNameError=Aae;z.invalidSubscriptionFieldConditionFieldPathErrorMessage=Rae;z.invalidSubscriptionFieldConditionFieldPathParentErrorMessage=Pae;z.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage=Fae;z.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage=wae;z.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage=Lae;z.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage=Cae;z.unresolvablePathError=Bae;z.allExternalFieldInstancesError=Uae;z.externalInterfaceFieldsError=kae;z.nonExternalConditionalFieldError=Mae;z.incompatibleFederatedFieldNamedTypeError=xae;z.unknownNamedTypeErrorMessage=zk;z.unknownNamedTypeError=qae;z.unknownFieldDataError=Vae;z.unexpectedNonCompositeOutputTypeError=jae;z.invalidExternalDirectiveError=Kae;z.configureDescriptionNoDescriptionError=Gae;z.configureDescriptionPropagationError=$ae;z.duplicateDirectiveDefinitionArgumentErrorMessage=Qae;z.duplicateDirectiveDefinitionLocationErrorMessage=Yae;z.invalidDirectiveDefinitionLocationErrorMessage=Jae;z.invalidDirectiveDefinitionError=Hae;z.fieldAlreadyProvidedErrorMessage=zae;z.invalidInterfaceObjectImplementationDefinitionsError=Wae;z.invalidNamedTypeError=Xae;z.semanticNonNullLevelsNaNIndexErrorMessage=Zae;z.semanticNonNullLevelsIndexOutOfBoundsErrorMessage=ese;z.semanticNonNullLevelsNonNullErrorMessage=tse;z.semanticNonNullInconsistentLevelsError=nse;z.oneOfRequiredFieldsError=rse;var $k=Ae(),He=vr(),Qk=gl(),Yl=Sr(),gre=Sl(),_re=iE();z.minimumSubgraphRequirementError=new Error("At least one subgraph is required for federation.");function vre(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 Sre(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 Ore({actualType:e,coords:t,expectedType:n,isArgument:r}){return new Error(`Incompatible types when merging two instances of ${r?"field argument":He.FIELD} "${t}": Expected type "${n}" but received "${e}".`)}function Dre(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":"")+`: @@ -248,10 +248,10 @@ If an instance defines a default value, that default value must be consistently `:`: `)+r.join(` `))}function Yre(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 Jre(e,t){return` The definition for "@${e}" does not define "${t}" as a valid location.`}function Hre(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(He.QUOTATION_JOIN)+'".'}function zre(e,t){return` The definition for "@${e}" does not define the following argument`+(t.length>1?"s that are":" that is")+' provided: "'+t.join(He.QUOTATION_JOIN)+'".'}function Wre(e){return" The following argument"+(e.length>1?"s are":" is")+' defined more than once: "'+e.join(He.QUOTATION_JOIN)+'"'}function Xre(e,t,n,r){return` The value "${e}" provided to argument "${t}(${n}: ...)" is not a valid "${r}" type.`}function Zre(e){return new Error(` The type defined at path "${e}" has more than ${Qk.MAXIMUM_TYPE_NESTING} layers of nesting, or there is a cyclical error.`)}function eie(e){return new Error(`Fatal: Unexpected type for "${e}"`)}function tie(e,t,n){return new Error(`Fatal: Expected "${e}" to be type ${(0,Ql.kindToNodeType)(t)} but received "${(0,Ql.kindToNodeType)(n)}".`)}function nie(e,t){return new Error(`Fatal: The type "${e}" visited the following unexpected edge`+(t.length>1?"s":"")+`: + 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(He.QUOTATION_JOIN)+'".'}function zre(e,t){return` The definition for "@${e}" does not define the following argument`+(t.length>1?"s that are":" that is")+' provided: "'+t.join(He.QUOTATION_JOIN)+'".'}function Wre(e){return" The following argument"+(e.length>1?"s are":" is")+' defined more than once: "'+e.join(He.QUOTATION_JOIN)+'"'}function Xre(e,t,n,r){return` The value "${e}" provided to argument "${t}(${n}: ...)" is not a valid "${r}" type.`}function Zre(e){return new Error(` The type defined at path "${e}" has more than ${Qk.MAXIMUM_TYPE_NESTING} layers of nesting, or there is a cyclical error.`)}function eie(e){return new Error(`Fatal: Unexpected type for "${e}"`)}function tie(e,t,n){return new Error(`Fatal: Expected "${e}" to be type ${(0,Yl.kindToNodeType)(t)} but received "${(0,Yl.kindToNodeType)(n)}".`)}function nie(e,t){return new Error(`Fatal: The type "${e}" visited the following unexpected edge`+(t.length>1?"s":"")+`: " ${t.join(He.QUOTATION_JOIN)}".`)}function rie(e,t,n){return new Error(` When merging types, expected "${e}" to be type "${t}" but received "${n}".`)}function iie(e){return new Error(`Fatal: Unsuccessfully merged the cross-subgraph types of field "${e}" without producing a type error object.`)}function aie(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 sie(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 oie(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 uie(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 cie(e,t){return`The ${(0,Ql.numberToOrdinal)(e+1)} subgraph in the array did not define a name. Consequently, any further errors will temporarily identify this subgraph as "${t}".`}function lie(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. +`))}function cie(e,t){return`The ${(0,Yl.numberToOrdinal)(e+1)} subgraph in the array did not define a name. Consequently, any further errors will temporarily identify this subgraph as "${t}".`}function lie(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 die(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 pie(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 fie(e,t,n){let r=[];for(let[i,a]of n){let o=` The implementation of Interface "${i}" by "${e}" is invalid because: @@ -324,10 +324,10 @@ For federation, it is only possible to use the default root types names ("Mutati This is because of the selection set corresponding to the `+aE(t,n,He.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 Mie(e,t){return` The field "${e}" declares an @override directive in the following subgraphs: "`+t.join(He.QUOTATION_JOIN)+'".'}function xie(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(He.QUOTATION_JOIN)+`". `)}function qie(e,t){return new Error(`The ${e} "${t}" is invalid because it does not define any fields.`)}function Vie(e){return new Error(`The Input Object "${e}" is invalid because it does not define any input values.`)}function jie(e,t,n){return new Error(`The ${e} "${t}" is invalid because all its ${n} definitions are declared "@inaccessible".`)}function Kie(e,t){return`Cannot override field "${t}" because the source and target subgraph names are both "${e}"`}function Gie(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,Ql.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,Yl.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(He.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,Ql.getEntriesNotInHashSet)(o,l);n+=` Subgraph "${c}" does not define the following implementations: "`+d.join(He.QUOTATION_JOIN)+`" +`;for(let{subgraphName:c,definedConcreteTypeNames:l}of i){let d=(0,Yl.getEntriesNotInHashSet)(o,l);n+=` Subgraph "${c}" does not define the following implementations: "`+d.join(He.QUOTATION_JOIN)+`" `}}return new Error(n)}function $ie(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(He.QUOTATION_JOIN)+`" If you require more, please contact support.`)}function Qie(e){return new Error(`An "Event Driven" graph\u2014a subgraph that defines event driven directives\u2014must not define any resolvers. @@ -428,9 +428,9 @@ This should never happen. Please report this issue on GitHub.`)}function Kae(e){ A federated graph only supports a single description; consequently, only one subgraph may define argument "propagate" as true (this is the default value).`)}function Qae(e){return"- The following argument"+(e.length>1?"s are":" is")+` defined more than once: "`+e.join(He.QUOTATION_JOIN)+'"'}function Yae(e){return`- The location "${e}" is defined multiple times.`}function Jae(e){return`- "${e}" is not a valid directive location.`}function Hae(e,t){return new Error(`The directive definition for "@${e}" is invalid for the following reason`+(t.length>1?"s":"")+`: `+t.join(He.LITERAL_NEW_LINE)+'"')}function zae(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 Wae(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(He.QUOTATION_JOIN)+'"')}function Xae({data:e,namedTypeData:t,nodeType:n}){let r=(0,gre.isFieldData)(e),i=r?`${e.originalParentTypeName}.${e.name}`:e.originalCoords;return new Error(`The ${n} "${i}" is invalid because it defines type `+(0,_re.printTypeNode)(e.type)+`; however, ${(0,Ql.kindToNodeType)(t.kind)} "${t.name}" is not a valid `+(r?"output":"input")+" type.")}function Zae(e){return`Index "${e}" is not a valid integer.`}function ese({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 tse({typeString:e,value:t}){return`Index "${t}" of type ${e} is non-null but must be nullable.`}z.semanticNonNullArgumentErrorMessage=`Argument "${He.LEVELS}" validation error.`;function nse(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: + "`+n.join(He.QUOTATION_JOIN)+'"')}function Xae({data:e,namedTypeData:t,nodeType:n}){let r=(0,gre.isFieldData)(e),i=r?`${e.originalParentTypeName}.${e.name}`:e.originalCoords;return new Error(`The ${n} "${i}" is invalid because it defines type `+(0,_re.printTypeNode)(e.type)+`; however, ${(0,Yl.kindToNodeType)(t.kind)} "${t.name}" is not a valid `+(r?"output":"input")+" type.")}function Zae(e){return`Index "${e}" is not a valid integer.`}function ese({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 tse({typeString:e,value:t}){return`Index "${t}" of type ${e} is non-null but must be nullable.`}z.semanticNonNullArgumentErrorMessage=`Argument "${He.LEVELS}" validation error.`;function nse(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 rse({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(He.QUOTATION_JOIN)+'".')}});var Xk=w(Wk=>{"use strict";m();T();N();Object.defineProperty(Wk,"__esModule",{value:!0})});var jp=w(Qi=>{"use strict";m();T();N();Object.defineProperty(Qi,"__esModule",{value:!0});Qi.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=Qi.SUBSCRIPTION_FILTER_INPUT_NAMES=Qi.STREAM_CONFIGURATION_FIELD_NAMES=Qi.EVENT_DIRECTIVE_NAMES=Qi.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=void 0;var fn=vr();Qi.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=new Set([fn.ARGUMENT_DEFINITION_UPPER,fn.ENUM_UPPER,fn.ENUM_VALUE_UPPER,fn.FIELD_DEFINITION_UPPER,fn.INPUT_FIELD_DEFINITION_UPPER,fn.INPUT_OBJECT_UPPER,fn.INTERFACE_UPPER,fn.OBJECT_UPPER,fn.SCALAR_UPPER,fn.SCHEMA_UPPER,fn.UNION_UPPER]);Qi.EVENT_DIRECTIVE_NAMES=new Set([fn.EDFS_KAFKA_PUBLISH,fn.EDFS_KAFKA_SUBSCRIBE,fn.EDFS_NATS_PUBLISH,fn.EDFS_NATS_REQUEST,fn.EDFS_NATS_SUBSCRIBE,fn.EDFS_REDIS_PUBLISH,fn.EDFS_REDIS_SUBSCRIBE]);Qi.STREAM_CONFIGURATION_FIELD_NAMES=new Set([fn.CONSUMER_INACTIVE_THRESHOLD,fn.CONSUMER_NAME,fn.STREAM_NAME]);Qi.SUBSCRIPTION_FILTER_INPUT_NAMES=new Set([fn.AND_UPPER,fn.IN_UPPER,fn.NOT_UPPER,fn.OR_UPPER]);Qi.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=new Set([fn.AND_UPPER,fn.OR_UPPER])});var Yi=w((WS,Zk)=>{"use strict";m();T();N();var Kp=function(e){return e&&e.Math===Math&&e};Zk.exports=Kp(typeof globalThis=="object"&&globalThis)||Kp(typeof window=="object"&&window)||Kp(typeof self=="object"&&self)||Kp(typeof global=="object"&&global)||Kp(typeof WS=="object"&&WS)||function(){return this}()||Function("return this")()});var bs=w((VAe,eM)=>{"use strict";m();T();N();eM.exports=function(e){try{return!!e()}catch(t){return!0}}});var hu=w(($Ae,tM)=>{"use strict";m();T();N();var ise=bs();tM.exports=!ise(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var XS=w((HAe,nM)=>{"use strict";m();T();N();var ase=bs();nM.exports=!ase(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var hc=w((ZAe,rM)=>{"use strict";m();T();N();var sse=XS(),sE=Function.prototype.call;rM.exports=sse?sE.bind(sE):function(){return sE.apply(sE,arguments)}});var oM=w(sM=>{"use strict";m();T();N();var iM={}.propertyIsEnumerable,aM=Object.getOwnPropertyDescriptor,ose=aM&&!iM.call({1:2},1);sM.f=ose?function(t){var n=aM(this,t);return!!n&&n.enumerable}:iM});var ZS=w((oRe,uM)=>{"use strict";m();T();N();uM.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var mi=w((dRe,dM)=>{"use strict";m();T();N();var cM=XS(),lM=Function.prototype,eO=lM.call,use=cM&&lM.bind.bind(eO,eO);dM.exports=cM?use:function(e){return function(){return eO.apply(e,arguments)}}});var mM=w((NRe,fM)=>{"use strict";m();T();N();var pM=mi(),cse=pM({}.toString),lse=pM("".slice);fM.exports=function(e){return lse(cse(e),8,-1)}});var TM=w((yRe,NM)=>{"use strict";m();T();N();var dse=mi(),pse=bs(),fse=mM(),tO=Object,mse=dse("".split);NM.exports=pse(function(){return!tO("z").propertyIsEnumerable(0)})?function(e){return fse(e)==="String"?mse(e,""):tO(e)}:tO});var nO=w((vRe,EM)=>{"use strict";m();T();N();EM.exports=function(e){return e==null}});var rO=w((bRe,hM)=>{"use strict";m();T();N();var Nse=nO(),Tse=TypeError;hM.exports=function(e){if(Nse(e))throw new Tse("Can't call method on "+e);return e}});var oE=w((FRe,yM)=>{"use strict";m();T();N();var Ese=TM(),hse=rO();yM.exports=function(e){return Ese(hse(e))}});var pa=w((BRe,IM)=>{"use strict";m();T();N();var iO=typeof document=="object"&&document.all;IM.exports=typeof iO=="undefined"&&iO!==void 0?function(e){return typeof e=="function"||e===iO}:function(e){return typeof e=="function"}});var Yl=w((xRe,gM)=>{"use strict";m();T();N();var yse=pa();gM.exports=function(e){return typeof e=="object"?e!==null:yse(e)}});var uE=w((KRe,_M)=>{"use strict";m();T();N();var aO=Yi(),Ise=pa(),gse=function(e){return Ise(e)?e:void 0};_M.exports=function(e,t){return arguments.length<2?gse(aO[e]):aO[e]&&aO[e][t]}});var SM=w((YRe,vM)=>{"use strict";m();T();N();var _se=mi();vM.exports=_se({}.isPrototypeOf)});var AM=w((WRe,bM)=>{"use strict";m();T();N();var vse=Yi(),OM=vse.navigator,DM=OM&&OM.userAgent;bM.exports=DM?String(DM):""});var BM=w((tPe,CM)=>{"use strict";m();T();N();var LM=Yi(),sO=AM(),RM=LM.process,PM=LM.Deno,FM=RM&&RM.versions||PM&&PM.version,wM=FM&&FM.v8,fa,cE;wM&&(fa=wM.split("."),cE=fa[0]>0&&fa[0]<4?1:+(fa[0]+fa[1]));!cE&&sO&&(fa=sO.match(/Edge\/(\d+)/),(!fa||fa[1]>=74)&&(fa=sO.match(/Chrome\/(\d+)/),fa&&(cE=+fa[1])));CM.exports=cE});var oO=w((aPe,kM)=>{"use strict";m();T();N();var UM=BM(),Sse=bs(),Ose=Yi(),Dse=Ose.String;kM.exports=!!Object.getOwnPropertySymbols&&!Sse(function(){var e=Symbol("symbol detection");return!Dse(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&UM&&UM<41})});var uO=w((cPe,MM)=>{"use strict";m();T();N();var bse=oO();MM.exports=bse&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var cO=w((fPe,xM)=>{"use strict";m();T();N();var Ase=uE(),Rse=pa(),Pse=SM(),Fse=uO(),wse=Object;xM.exports=Fse?function(e){return typeof e=="symbol"}:function(e){var t=Ase("Symbol");return Rse(t)&&Pse(t.prototype,wse(e))}});var VM=w((EPe,qM)=>{"use strict";m();T();N();var Lse=String;qM.exports=function(e){try{return Lse(e)}catch(t){return"Object"}}});var lE=w((gPe,jM)=>{"use strict";m();T();N();var Cse=pa(),Bse=VM(),Use=TypeError;jM.exports=function(e){if(Cse(e))return e;throw new Use(Bse(e)+" is not a function")}});var lO=w((OPe,KM)=>{"use strict";m();T();N();var kse=lE(),Mse=nO();KM.exports=function(e,t){var n=e[t];return Mse(n)?void 0:kse(n)}});var $M=w((RPe,GM)=>{"use strict";m();T();N();var dO=hc(),pO=pa(),fO=Yl(),xse=TypeError;GM.exports=function(e,t){var n,r;if(t==="string"&&pO(n=e.toString)&&!fO(r=dO(n,e))||pO(n=e.valueOf)&&!fO(r=dO(n,e))||t!=="string"&&pO(n=e.toString)&&!fO(r=dO(n,e)))return r;throw new xse("Can't convert object to primitive value")}});var YM=w((LPe,QM)=>{"use strict";m();T();N();QM.exports=!1});var dE=w((kPe,HM)=>{"use strict";m();T();N();var JM=Yi(),qse=Object.defineProperty;HM.exports=function(e,t){try{qse(JM,e,{value:t,configurable:!0,writable:!0})}catch(n){JM[e]=t}return t}});var pE=w((VPe,XM)=>{"use strict";m();T();N();var Vse=YM(),jse=Yi(),Kse=dE(),zM="__core-js_shared__",WM=XM.exports=jse[zM]||Kse(zM,{});(WM.versions||(WM.versions=[])).push({version:"3.41.0",mode:Vse?"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 mO=w(($Pe,ex)=>{"use strict";m();T();N();var ZM=pE();ex.exports=function(e,t){return ZM[e]||(ZM[e]=t||{})}});var nx=w((HPe,tx)=>{"use strict";m();T();N();var Gse=rO(),$se=Object;tx.exports=function(e){return $se(Gse(e))}});var yu=w((ZPe,rx)=>{"use strict";m();T();N();var Qse=mi(),Yse=nx(),Jse=Qse({}.hasOwnProperty);rx.exports=Object.hasOwn||function(t,n){return Jse(Yse(t),n)}});var NO=w((rFe,ix)=>{"use strict";m();T();N();var Hse=mi(),zse=0,Wse=Math.random(),Xse=Hse(1 .toString);ix.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Xse(++zse+Wse,36)}});var ox=w((oFe,sx)=>{"use strict";m();T();N();var Zse=Yi(),eoe=mO(),ax=yu(),toe=NO(),noe=oO(),roe=uO(),Jl=Zse.Symbol,TO=eoe("wks"),ioe=roe?Jl.for||Jl:Jl&&Jl.withoutSetter||toe;sx.exports=function(e){return ax(TO,e)||(TO[e]=noe&&ax(Jl,e)?Jl[e]:ioe("Symbol."+e)),TO[e]}});var dx=w((dFe,lx)=>{"use strict";m();T();N();var aoe=hc(),ux=Yl(),cx=cO(),soe=lO(),ooe=$M(),uoe=ox(),coe=TypeError,loe=uoe("toPrimitive");lx.exports=function(e,t){if(!ux(e)||cx(e))return e;var n=soe(e,loe),r;if(n){if(t===void 0&&(t="default"),r=aoe(n,e,t),!ux(r)||cx(r))return r;throw new coe("Can't convert object to primitive value")}return t===void 0&&(t="number"),ooe(e,t)}});var EO=w((NFe,px)=>{"use strict";m();T();N();var doe=dx(),poe=cO();px.exports=function(e){var t=doe(e,"string");return poe(t)?t:t+""}});var Nx=w((yFe,mx)=>{"use strict";m();T();N();var foe=Yi(),fx=Yl(),hO=foe.document,moe=fx(hO)&&fx(hO.createElement);mx.exports=function(e){return moe?hO.createElement(e):{}}});var yO=w((vFe,Tx)=>{"use strict";m();T();N();var Noe=hu(),Toe=bs(),Eoe=Nx();Tx.exports=!Noe&&!Toe(function(){return Object.defineProperty(Eoe("div"),"a",{get:function(){return 7}}).a!==7})});var IO=w(hx=>{"use strict";m();T();N();var hoe=hu(),yoe=hc(),Ioe=oM(),goe=ZS(),_oe=oE(),voe=EO(),Soe=yu(),Ooe=yO(),Ex=Object.getOwnPropertyDescriptor;hx.f=hoe?Ex:function(t,n){if(t=_oe(t),n=voe(n),Ooe)try{return Ex(t,n)}catch(r){}if(Soe(t,n))return goe(!yoe(Ioe.f,t,n),t[n])}});var Ix=w((FFe,yx)=>{"use strict";m();T();N();var Doe=hu(),boe=bs();yx.exports=Doe&&boe(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Gp=w((BFe,gx)=>{"use strict";m();T();N();var Aoe=Yl(),Roe=String,Poe=TypeError;gx.exports=function(e){if(Aoe(e))return e;throw new Poe(Roe(e)+" is not an object")}});var mE=w(vx=>{"use strict";m();T();N();var Foe=hu(),woe=yO(),Loe=Ix(),fE=Gp(),_x=EO(),Coe=TypeError,gO=Object.defineProperty,Boe=Object.getOwnPropertyDescriptor,_O="enumerable",vO="configurable",SO="writable";vx.f=Foe?Loe?function(t,n,r){if(fE(t),n=_x(n),fE(r),typeof t=="function"&&n==="prototype"&&"value"in r&&SO in r&&!r[SO]){var i=Boe(t,n);i&&i[SO]&&(t[n]=r.value,r={configurable:vO in r?r[vO]:i[vO],enumerable:_O in r?r[_O]:i[_O],writable:!1})}return gO(t,n,r)}:gO:function(t,n,r){if(fE(t),n=_x(n),fE(r),woe)try{return gO(t,n,r)}catch(i){}if("get"in r||"set"in r)throw new Coe("Accessors not supported");return"value"in r&&(t[n]=r.value),t}});var OO=w((KFe,Sx)=>{"use strict";m();T();N();var Uoe=hu(),koe=mE(),Moe=ZS();Sx.exports=Uoe?function(e,t,n){return koe.f(e,t,Moe(1,n))}:function(e,t,n){return e[t]=n,e}});var bx=w((YFe,Dx)=>{"use strict";m();T();N();var DO=hu(),xoe=yu(),Ox=Function.prototype,qoe=DO&&Object.getOwnPropertyDescriptor,bO=xoe(Ox,"name"),Voe=bO&&function(){}.name==="something",joe=bO&&(!DO||DO&&qoe(Ox,"name").configurable);Dx.exports={EXISTS:bO,PROPER:Voe,CONFIGURABLE:joe}});var Rx=w((WFe,Ax)=>{"use strict";m();T();N();var Koe=mi(),Goe=pa(),AO=pE(),$oe=Koe(Function.toString);Goe(AO.inspectSource)||(AO.inspectSource=function(e){return $oe(e)});Ax.exports=AO.inspectSource});var wx=w((twe,Fx)=>{"use strict";m();T();N();var Qoe=Yi(),Yoe=pa(),Px=Qoe.WeakMap;Fx.exports=Yoe(Px)&&/native code/.test(String(Px))});var Bx=w((awe,Cx)=>{"use strict";m();T();N();var Joe=mO(),Hoe=NO(),Lx=Joe("keys");Cx.exports=function(e){return Lx[e]||(Lx[e]=Hoe(e))}});var RO=w((cwe,Ux)=>{"use strict";m();T();N();Ux.exports={}});var qx=w((fwe,xx)=>{"use strict";m();T();N();var zoe=wx(),Mx=Yi(),Woe=Yl(),Xoe=OO(),PO=yu(),FO=pE(),Zoe=Bx(),eue=RO(),kx="Object already initialized",wO=Mx.TypeError,tue=Mx.WeakMap,NE,$p,TE,nue=function(e){return TE(e)?$p(e):NE(e,{})},rue=function(e){return function(t){var n;if(!Woe(t)||(n=$p(t)).type!==e)throw new wO("Incompatible receiver, "+e+" required");return n}};zoe||FO.state?(ma=FO.state||(FO.state=new tue),ma.get=ma.get,ma.has=ma.has,ma.set=ma.set,NE=function(e,t){if(ma.has(e))throw new wO(kx);return t.facade=e,ma.set(e,t),t},$p=function(e){return ma.get(e)||{}},TE=function(e){return ma.has(e)}):(yc=Zoe("state"),eue[yc]=!0,NE=function(e,t){if(PO(e,yc))throw new wO(kx);return t.facade=e,Xoe(e,yc,t),t},$p=function(e){return PO(e,yc)?e[yc]:{}},TE=function(e){return PO(e,yc)});var ma,yc;xx.exports={set:NE,get:$p,has:TE,enforce:nue,getterFor:rue}});var Gx=w((Ewe,Kx)=>{"use strict";m();T();N();var CO=mi(),iue=bs(),aue=pa(),EE=yu(),LO=hu(),sue=bx().CONFIGURABLE,oue=Rx(),jx=qx(),uue=jx.enforce,cue=jx.get,Vx=String,hE=Object.defineProperty,lue=CO("".slice),due=CO("".replace),pue=CO([].join),fue=LO&&!iue(function(){return hE(function(){},"length",{value:8}).length!==8}),mue=String(String).split("String"),Nue=Kx.exports=function(e,t,n){lue(Vx(t),0,7)==="Symbol("&&(t="["+due(Vx(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!EE(e,"name")||sue&&e.name!==t)&&(LO?hE(e,"name",{value:t,configurable:!0}):e.name=t),fue&&n&&EE(n,"arity")&&e.length!==n.arity&&hE(e,"length",{value:n.arity});try{n&&EE(n,"constructor")&&n.constructor?LO&&hE(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(i){}var r=uue(e);return EE(r,"source")||(r.source=pue(mue,typeof t=="string"?t:"")),e};Function.prototype.toString=Nue(function(){return aue(this)&&cue(this).source||oue(this)},"toString")});var Qx=w((gwe,$x)=>{"use strict";m();T();N();var Tue=pa(),Eue=mE(),hue=Gx(),yue=dE();$x.exports=function(e,t,n,r){r||(r={});var i=r.enumerable,a=r.name!==void 0?r.name:t;if(Tue(n)&&hue(n,a,r),r.global)i?e[t]=n:yue(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(o){}i?e[t]=n:Eue.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e}});var Jx=w((Owe,Yx)=>{"use strict";m();T();N();var Iue=Math.ceil,gue=Math.floor;Yx.exports=Math.trunc||function(t){var n=+t;return(n>0?gue:Iue)(n)}});var yE=w((Rwe,Hx)=>{"use strict";m();T();N();var _ue=Jx();Hx.exports=function(e){var t=+e;return t!==t||t===0?0:_ue(t)}});var Wx=w((Lwe,zx)=>{"use strict";m();T();N();var vue=yE(),Sue=Math.max,Oue=Math.min;zx.exports=function(e,t){var n=vue(e);return n<0?Sue(n+t,0):Oue(n,t)}});var Zx=w((kwe,Xx)=>{"use strict";m();T();N();var Due=yE(),bue=Math.min;Xx.exports=function(e){var t=Due(e);return t>0?bue(t,9007199254740991):0}});var tq=w((Vwe,eq)=>{"use strict";m();T();N();var Aue=Zx();eq.exports=function(e){return Aue(e.length)}});var iq=w(($we,rq)=>{"use strict";m();T();N();var Rue=oE(),Pue=Wx(),Fue=tq(),nq=function(e){return function(t,n,r){var i=Rue(t),a=Fue(i);if(a===0)return!e&&-1;var o=Pue(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}};rq.exports={includes:nq(!0),indexOf:nq(!1)}});var oq=w((Hwe,sq)=>{"use strict";m();T();N();var wue=mi(),BO=yu(),Lue=oE(),Cue=iq().indexOf,Bue=RO(),aq=wue([].push);sq.exports=function(e,t){var n=Lue(e),r=0,i=[],a;for(a in n)!BO(Bue,a)&&BO(n,a)&&aq(i,a);for(;t.length>r;)BO(n,a=t[r++])&&(~Cue(i,a)||aq(i,a));return i}});var cq=w((Zwe,uq)=>{"use strict";m();T();N();uq.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var dq=w(lq=>{"use strict";m();T();N();var Uue=oq(),kue=cq(),Mue=kue.concat("length","prototype");lq.f=Object.getOwnPropertyNames||function(t){return Uue(t,Mue)}});var fq=w(pq=>{"use strict";m();T();N();pq.f=Object.getOwnPropertySymbols});var Nq=w((dLe,mq)=>{"use strict";m();T();N();var xue=uE(),que=mi(),Vue=dq(),jue=fq(),Kue=Gp(),Gue=que([].concat);mq.exports=xue("Reflect","ownKeys")||function(t){var n=Vue.f(Kue(t)),r=jue.f;return r?Gue(n,r(t)):n}});var hq=w((NLe,Eq)=>{"use strict";m();T();N();var Tq=yu(),$ue=Nq(),Que=IO(),Yue=mE();Eq.exports=function(e,t,n){for(var r=$ue(t),i=Yue.f,a=Que.f,o=0;o{"use strict";m();T();N();var Jue=bs(),Hue=pa(),zue=/#|\.prototype\./,Qp=function(e,t){var n=Xue[Wue(e)];return n===ece?!0:n===Zue?!1:Hue(t)?Jue(t):!!t},Wue=Qp.normalize=function(e){return String(e).replace(zue,".").toLowerCase()},Xue=Qp.data={},Zue=Qp.NATIVE="N",ece=Qp.POLYFILL="P";yq.exports=Qp});var UO=w((vLe,gq)=>{"use strict";m();T();N();var IE=Yi(),tce=IO().f,nce=OO(),rce=Qx(),ice=dE(),ace=hq(),sce=Iq();gq.exports=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,c,l,d,f;if(r?o=IE:i?o=IE[n]||ice(n,{}):o=IE[n]&&IE[n].prototype,o)for(c in t){if(d=t[c],e.dontCallGetSet?(f=tce(o,c),l=f&&f.value):l=o[c],a=sce(r?c:n+(i?".":"#")+c,e.forced),!a&&l!==void 0){if(typeof d==typeof l)continue;ace(d,l)}(e.sham||l&&l.sham)&&nce(d,"sham",!0),rce(o,c,d,e)}}});var Yp=w((bLe,_q)=>{"use strict";m();T();N();var kO=mi(),gE=Set.prototype;_q.exports={Set,add:kO(gE.add),has:kO(gE.has),remove:kO(gE.delete),proto:gE}});var MO=w((FLe,vq)=>{"use strict";m();T();N();var oce=Yp().has;vq.exports=function(e){return oce(e),e}});var Oq=w((BLe,Sq)=>{"use strict";m();T();N();var uce=mi(),cce=lE();Sq.exports=function(e,t,n){try{return uce(cce(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}}});var xO=w((xLe,Dq)=>{"use strict";m();T();N();var lce=Oq(),dce=Yp();Dq.exports=lce(dce.proto,"size","get")||function(e){return e.size}});var qO=w((KLe,bq)=>{"use strict";m();T();N();var pce=hc();bq.exports=function(e,t,n){for(var r=n?e:e.iterator,i=e.next,a,o;!(a=pce(i,r)).done;)if(o=t(a.value),o!==void 0)return o}});var Lq=w((YLe,wq)=>{"use strict";m();T();N();var Aq=mi(),fce=qO(),Rq=Yp(),mce=Rq.Set,Pq=Rq.proto,Nce=Aq(Pq.forEach),Fq=Aq(Pq.keys),Tce=Fq(new mce).next;wq.exports=function(e,t,n){return n?fce({iterator:Fq(e),next:Tce},t):Nce(e,t)}});var Bq=w((WLe,Cq)=>{"use strict";m();T();N();Cq.exports=function(e){return{iterator:e,next:e.next,done:!1}}});var VO=w((tCe,Vq)=>{"use strict";m();T();N();var Uq=lE(),xq=Gp(),kq=hc(),Ece=yE(),hce=Bq(),Mq="Invalid size",yce=RangeError,Ice=TypeError,gce=Math.max,qq=function(e,t){this.set=e,this.size=gce(t,0),this.has=Uq(e.has),this.keys=Uq(e.keys)};qq.prototype={getIterator:function(){return hce(xq(kq(this.keys,this.set)))},includes:function(e){return kq(this.has,this.set,e)}};Vq.exports=function(e){xq(e);var t=+e.size;if(t!==t)throw new Ice(Mq);var n=Ece(t);if(n<0)throw new yce(Mq);return new qq(e,n)}});var Kq=w((aCe,jq)=>{"use strict";m();T();N();var _ce=MO(),vce=xO(),Sce=Lq(),Oce=VO();jq.exports=function(t){var n=_ce(this),r=Oce(t);return vce(n)>r.size?!1:Sce(n,function(i){if(!r.includes(i))return!1},!0)!==!1}});var jO=w((cCe,Qq)=>{"use strict";m();T();N();var Dce=uE(),Gq=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},$q=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};Qq.exports=function(e,t){var n=Dce("Set");try{new n()[e](Gq(0));try{return new n()[e](Gq(-1)),!1}catch(i){if(!t)return!0;try{return new n()[e]($q(-1/0)),!1}catch(a){var r=new n;return r.add(1),r.add(2),t(r[e]($q(1/0)))}}}catch(i){return!1}}});var Yq=w(()=>{"use strict";m();T();N();var bce=UO(),Ace=Kq(),Rce=jO(),Pce=!Rce("isSubsetOf",function(e){return e});bce({target:"Set",proto:!0,real:!0,forced:Pce},{isSubsetOf:Ace})});var Jq=w(()=>{"use strict";m();T();N();Yq()});var Wq=w((vCe,zq)=>{"use strict";m();T();N();var Fce=hc(),Hq=Gp(),wce=lO();zq.exports=function(e,t,n){var r,i;Hq(e);try{if(r=wce(e,"return"),!r){if(t==="throw")throw n;return n}r=Fce(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return Hq(r),n}});var Zq=w((bCe,Xq)=>{"use strict";m();T();N();var Lce=MO(),Cce=Yp().has,Bce=xO(),Uce=VO(),kce=qO(),Mce=Wq();Xq.exports=function(t){var n=Lce(this),r=Uce(t);if(Bce(n){"use strict";m();T();N();var xce=UO(),qce=Zq(),Vce=jO(),jce=!Vce("isSupersetOf",function(e){return!e});xce({target:"Set",proto:!0,real:!0,forced:jce},{isSupersetOf:qce})});var tV=w(()=>{"use strict";m();T();N();eV()});var Jp=w(Bn=>{"use strict";m();T();N();Object.defineProperty(Bn,"__esModule",{value:!0});Bn.subtractSet=Kce;Bn.mapToArrayOfValues=Gce;Bn.kindToConvertedTypeString=$ce;Bn.fieldDatasToSimpleFieldDatas=Qce;Bn.isNodeLeaf=Yce;Bn.newEntityInterfaceFederationData=Jce;Bn.upsertEntityInterfaceFederationData=Hce;Bn.upsertEntityData=Wce;Bn.updateEntityData=nV;Bn.newFieldAuthorizationData=Xce;Bn.newAuthorizationData=Zce;Bn.addScopes=KO;Bn.mergeRequiredScopesByAND=SE;Bn.mergeRequiredScopesByOR=GO;Bn.upsertFieldAuthorizationData=rV;Bn.upsertAuthorizationData=nle;Bn.upsertAuthorizationConfiguration=rle;Bn.isNodeKindObject=ile;Bn.isObjectDefinitionData=ale;Bn.getNodeCoords=sle;var Gt=Ae(),ei=vr(),_E=Sr(),vE=Ss();Jq();tV();function Kce(e,t){for(let n of e)t.delete(n)}function Gce(e){let t=[];for(let n of e.values())t.push(n);return t}function $ce(e){switch(e){case Gt.Kind.BOOLEAN:return ei.BOOLEAN_SCALAR;case Gt.Kind.ENUM:case Gt.Kind.ENUM_TYPE_DEFINITION:case Gt.Kind.ENUM_TYPE_EXTENSION:return ei.ENUM;case Gt.Kind.ENUM_VALUE_DEFINITION:return ei.ENUM_VALUE;case Gt.Kind.FIELD_DEFINITION:return ei.FIELD;case Gt.Kind.FLOAT:return ei.FLOAT_SCALAR;case Gt.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Gt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return ei.INPUT_OBJECT;case Gt.Kind.INPUT_VALUE_DEFINITION:return ei.INPUT_VALUE;case Gt.Kind.INT:return ei.INT_SCALAR;case Gt.Kind.INTERFACE_TYPE_DEFINITION:case Gt.Kind.INTERFACE_TYPE_EXTENSION:return ei.INTERFACE;case Gt.Kind.NULL:return ei.NULL;case Gt.Kind.OBJECT:case Gt.Kind.OBJECT_TYPE_DEFINITION:case Gt.Kind.OBJECT_TYPE_EXTENSION:return ei.OBJECT;case Gt.Kind.STRING:return ei.STRING_SCALAR;case Gt.Kind.SCALAR_TYPE_DEFINITION:case Gt.Kind.SCALAR_TYPE_EXTENSION:return ei.SCALAR;case Gt.Kind.UNION_TYPE_DEFINITION:case Gt.Kind.UNION_TYPE_EXTENSION:return ei.UNION;default:return e}}function Qce(e){let t=[];for(let{name:n,namedTypeName:r}of e)t.push({name:n,namedTypeName:r});return t}function Yce(e){if(!e)return!0;switch(e){case Gt.Kind.OBJECT_TYPE_DEFINITION:case Gt.Kind.INTERFACE_TYPE_DEFINITION:case Gt.Kind.UNION_TYPE_DEFINITION:return!1;default:return!0}}function Jce(e,t){return{concreteTypeNames:new Set(e.concreteTypeNames),fieldDatasBySubgraphName:new Map([[t,e.fieldDatas]]),interfaceFieldNames:new Set(e.interfaceFieldNames),interfaceObjectFieldNames:new Set(e.interfaceObjectFieldNames),interfaceObjectSubgraphs:new Set(e.isInterfaceObject?[t]:[]),subgraphDataByTypeName:new Map([[t,e]]),typeName:e.typeName}}function Hce(e,t,n){(0,_E.addIterableValuesToSet)(t.concreteTypeNames,e.concreteTypeNames),e.subgraphDataByTypeName.set(n,t),e.fieldDatasBySubgraphName.set(n,t.fieldDatas),(0,_E.addIterableValuesToSet)(t.interfaceFieldNames,e.interfaceFieldNames),(0,_E.addIterableValuesToSet)(t.interfaceObjectFieldNames,e.interfaceObjectFieldNames),t.isInterfaceObject&&e.interfaceObjectSubgraphs.add(n)}function zce({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 Wce({entityDataByTypeName:e,keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}){let i=e.get(r);i?nV({entityData:i,keyFieldSetDataByFieldSet:t,subgraphName:n}):e.set(r,zce({keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}))}function nV({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 Xce(e){return{fieldName:e,inheritedData:{requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1},originalData:{requiredScopes:[],requiresAuthentication:!1}}}function Zce(e){return{fieldAuthDataByFieldName:new Map,requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1,typeName:e}}function KO(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 SE(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,_E.addSets)(r,i);KO(n,a)}return n}function GO(e,t){for(let n of t)KO(e,n);return e.length<=vE.MAX_OR_SCOPES}function rV(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),!GO(r.inheritedData.requiredScopesByOR,t.inheritedData.requiredScopes)||r.inheritedData.requiredScopes.length*t.inheritedData.requiredScopes.length>vE.MAX_OR_SCOPES||r.originalData.requiredScopes.length*t.originalData.requiredScopes.length>vE.MAX_OR_SCOPES?!1:(r.inheritedData.requiredScopes=SE(r.inheritedData.requiredScopes,t.inheritedData.requiredScopes),r.originalData.requiredScopes=SE(r.originalData.requiredScopes,t.originalData.requiredScopes),!0)):(e.set(n,iV(t)),!0)}function ele(e){let t=new Map;for(let[n,r]of e)t.set(n,iV(r));return t}function iV(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 tle(e){return{fieldAuthDataByFieldName:ele(e.fieldAuthDataByFieldName),requiredScopes:[...e.requiredScopes],requiredScopesByOR:[...e.requiredScopes],requiresAuthentication:e.requiresAuthentication,typeName:e.typeName}}function nle(e,t,n){let r=e.get(t.typeName);if(!r){e.set(t.typeName,tle(t));return}r.requiresAuthentication||(r.requiresAuthentication=t.requiresAuthentication),!GO(r.requiredScopesByOR,t.requiredScopes)||r.requiredScopes.length*t.requiredScopes.length>vE.MAX_OR_SCOPES?n.add(t.typeName):r.requiredScopes=SE(r.requiredScopes,t.requiredScopes);for(let[i,a]of t.fieldAuthDataByFieldName)rV(r.fieldAuthDataByFieldName,a)||n.add(`${t.typeName}.${i}`)}function rle(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 ile(e){return e===Gt.Kind.OBJECT_TYPE_DEFINITION||e===Gt.Kind.OBJECT_TYPE_EXTENSION}function ale(e){return e?e.kind===Gt.Kind.OBJECT_TYPE_DEFINITION:!1}function sle(e){switch(e.kind){case Gt.Kind.ARGUMENT:case Gt.Kind.FIELD_DEFINITION:case Gt.Kind.INPUT_VALUE_DEFINITION:case Gt.Kind.ENUM_VALUE_DEFINITION:return e.federatedCoords;default:return e.name}}});var $O=w($e=>{"use strict";m();T();N();Object.defineProperty($e,"__esModule",{value:!0});$e.TAG_DEFINITION_DATA=$e.SUBSCRIPTION_FILTER_DEFINITION_DATA=$e.SHAREABLE_DEFINITION_DATA=$e.SPECIFIED_BY_DEFINITION_DATA=$e.SEMANTIC_NON_NULL_DATA=$e.REQUIRES_SCOPES_DEFINITION_DATA=$e.REQUIRE_FETCH_REASONS_DEFINITION_DATA=$e.REDIS_SUBSCRIBE_DEFINITION_DATA=$e.REDIS_PUBLISH_DEFINITION_DATA=$e.REQUIRES_DEFINITION_DATA=$e.PROVIDES_DEFINITION_DATA=$e.LINK_DEFINITION_DATA=$e.KEY_DEFINITION_DATA=$e.OVERRIDE_DEFINITION_DATA=$e.ONE_OF_DEFINITION_DATA=$e.NATS_SUBSCRIBE_DEFINITION_DATA=$e.NATS_REQUEST_DEFINITION_DATA=$e.NATS_PUBLISH_DEFINITION_DATA=$e.KAFKA_SUBSCRIBE_DEFINITION_DATA=$e.KAFKA_PUBLISH_DEFINITION_DATA=$e.INTERFACE_OBJECT_DEFINITION_DATA=$e.INACCESSIBLE_DEFINITION_DATA=$e.EXTERNAL_DEFINITION_DATA=$e.EXTENDS_DEFINITION_DATA=$e.DEPRECATED_DEFINITION_DATA=$e.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA=$e.CONFIGURE_DESCRIPTION_DEFINITION_DATA=$e.COMPOSE_DIRECTIVE_DEFINITION_DATA=$e.AUTHENTICATED_DEFINITION_DATA=void 0;var Xe=Ss(),Ji=Hr(),$t=Ae(),q=vr();$e.AUTHENTICATED_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([]),isRepeatable:!1,locations:new Set([q.ENUM_UPPER,q.FIELD_DEFINITION_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER]),name:q.AUTHENTICATED,node:Xe.AUTHENTICATED_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.COMPOSE_DIRECTIVE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.NAME,{name:q.NAME,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([q.SCHEMA_UPPER]),name:q.COMPOSE_DIRECTIVE,node:Xe.COMPOSE_DIRECTIVE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.NAME])};$e.CONFIGURE_DESCRIPTION_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.PROPAGATE,{name:q.PROPAGATE,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.BOOLEAN_SCALAR)},defaultValue:{kind:$t.Kind.BOOLEAN,value:!0}}],[q.DESCRIPTION_OVERRIDE,{name:q.DESCRIPTION_OVERRIDE,typeNode:(0,Ji.stringToNamedTypeNode)(q.STRING_SCALAR)}]]),isRepeatable:!1,locations:new Set([q.ARGUMENT_DEFINITION_UPPER,q.ENUM_UPPER,q.ENUM_VALUE_UPPER,q.FIELD_DEFINITION_UPPER,q.INTERFACE_UPPER,q.INPUT_OBJECT_UPPER,q.INPUT_FIELD_DEFINITION_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER,q.SCHEMA_UPPER,q.UNION_UPPER]),name:q.CONFIGURE_DESCRIPTION,node:Xe.CONFIGURE_DESCRIPTION_DEFINITION,optionalArgumentNames:new Set([q.PROPAGATE,q.DESCRIPTION_OVERRIDE]),requiredArgumentNames:new Set};$e.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.PROPAGATE,{name:q.PROPAGATE,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.BOOLEAN_SCALAR)},defaultValue:{kind:$t.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!1,locations:new Set([q.ENUM_UPPER,q.INPUT_OBJECT_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER]),name:q.CONFIGURE_CHILD_DESCRIPTIONS,node:Xe.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION,optionalArgumentNames:new Set([q.PROPAGATE]),requiredArgumentNames:new Set};$e.DEPRECATED_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.REASON,{name:q.REASON,typeNode:(0,Ji.stringToNamedTypeNode)(q.STRING_SCALAR),defaultValue:{kind:$t.Kind.STRING,value:$t.DEFAULT_DEPRECATION_REASON}}]]),isRepeatable:!1,locations:new Set([q.ARGUMENT_DEFINITION_UPPER,q.ENUM_VALUE_UPPER,q.FIELD_DEFINITION_UPPER,q.INPUT_FIELD_DEFINITION_UPPER]),name:q.DEPRECATED,node:Xe.DEPRECATED_DEFINITION,optionalArgumentNames:new Set([q.REASON]),requiredArgumentNames:new Set};$e.EXTENDS_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!1,locations:new Set([q.INTERFACE_UPPER,q.OBJECT_UPPER]),name:q.EXTENDS,node:Xe.EXTENDS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.EXTERNAL_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER,q.OBJECT_UPPER]),name:q.EXTERNAL,node:Xe.EXTERNAL_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.INACCESSIBLE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!1,locations:new Set([q.ARGUMENT_DEFINITION_UPPER,q.ENUM_UPPER,q.ENUM_VALUE_UPPER,q.FIELD_DEFINITION_UPPER,q.INPUT_FIELD_DEFINITION_UPPER,q.INPUT_OBJECT_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER,q.UNION_UPPER]),name:q.INACCESSIBLE,node:Xe.INACCESSIBLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.INTERFACE_OBJECT_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!1,locations:new Set([q.OBJECT_UPPER]),name:q.INTERFACE_OBJECT,node:Xe.INTERFACE_OBJECT_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.KAFKA_PUBLISH_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.TOPIC,{name:q.TOPIC,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_KAFKA_PUBLISH,node:Xe.EDFS_KAFKA_PUBLISH_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.TOPIC])};$e.KAFKA_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.TOPICS,{name:q.TOPICS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:Xe.REQUIRED_STRING_TYPE_NODE}}}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_KAFKA_SUBSCRIBE,node:Xe.EDFS_KAFKA_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.TOPICS])};$e.NATS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.SUBJECT,{name:q.SUBJECT,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_NATS_PUBLISH,node:Xe.EDFS_NATS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.SUBJECT])};$e.NATS_REQUEST_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.SUBJECT,{name:q.SUBJECT,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_NATS_REQUEST,node:Xe.EDFS_NATS_REQUEST_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.SUBJECT])};$e.NATS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.SUBJECTS,{name:q.SUBJECTS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:Xe.REQUIRED_STRING_TYPE_NODE}}}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}],[q.STREAM_CONFIGURATION,{name:q.STREAM_CONFIGURATION,typeNode:(0,Ji.stringToNamedTypeNode)(q.EDFS_NATS_STREAM_CONFIGURATION)}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_NATS_SUBSCRIBE,node:Xe.EDFS_NATS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.SUBJECTS])};$e.ONE_OF_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([]),isRepeatable:!1,locations:new Set([q.INPUT_OBJECT_UPPER]),name:q.ONE_OF,node:Xe.ONE_OF_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.OVERRIDE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.FROM,{name:q.FROM,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.OVERRIDE,node:Xe.OVERRIDE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.FROM])};$e.KEY_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.FIELDS,{name:q.FIELDS,typeNode:Xe.REQUIRED_FIELDSET_TYPE_NODE}],[q.RESOLVABLE,{name:q.RESOLVABLE,typeNode:(0,Ji.stringToNamedTypeNode)(q.BOOLEAN_SCALAR),defaultValue:{kind:$t.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!0,locations:new Set([q.INTERFACE_UPPER,q.OBJECT_UPPER]),name:q.KEY,node:Xe.KEY_DEFINITION,optionalArgumentNames:new Set([q.RESOLVABLE]),requiredArgumentNames:new Set([q.FIELDS])};$e.LINK_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.URL_LOWER,{name:q.URL_LOWER,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.AS,{name:q.AS,typeNode:(0,Ji.stringToNamedTypeNode)(q.STRING_SCALAR)}],[q.FOR,{name:q.FOR,typeNode:(0,Ji.stringToNamedTypeNode)(q.LINK_PURPOSE)}],[q.IMPORT,{name:q.IMPORT,typeNode:{kind:$t.Kind.LIST_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.LINK_IMPORT)}}]]),isRepeatable:!0,locations:new Set([q.SCHEMA_UPPER]),name:q.LINK,node:Xe.LINK_DEFINITION,optionalArgumentNames:new Set([q.AS,q.FOR,q.IMPORT]),requiredArgumentNames:new Set([q.URL_LOWER])};$e.PROVIDES_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.FIELDS,{name:q.FIELDS,typeNode:Xe.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.PROVIDES,node:Xe.PROVIDES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.FIELDS])};$e.REQUIRES_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.FIELDS,{name:q.FIELDS,typeNode:Xe.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.REQUIRES,node:Xe.REQUIRES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.FIELDS])};$e.REDIS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.CHANNEL,{name:q.CHANNEL,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_REDIS_PUBLISH,node:Xe.EDFS_REDIS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.CHANNEL])};$e.REDIS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.CHANNELS,{name:q.CHANNELS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:Xe.REQUIRED_STRING_TYPE_NODE}}}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_REDIS_SUBSCRIBE,node:Xe.EDFS_REDIS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.CHANNELS])};$e.REQUIRE_FETCH_REASONS_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!0,locations:new Set([q.FIELD_DEFINITION_UPPER,q.OBJECT_UPPER]),name:q.REQUIRE_FETCH_REASONS,node:Xe.REQUIRE_FETCH_REASONS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.REQUIRES_SCOPES_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.SCOPES,{name:q.SCOPES,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.SCOPE_SCALAR)}}}}}}]]),isRepeatable:!1,locations:new Set([q.ENUM_UPPER,q.FIELD_DEFINITION_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER]),name:q.REQUIRES_SCOPES,node:Xe.REQUIRES_SCOPES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.SCOPES])};$e.SEMANTIC_NON_NULL_DATA={argumentTypeNodeByArgumentName:new Map([[q.LEVELS,{name:q.LEVELS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.INT_SCALAR)}}},defaultValue:{kind:$t.Kind.LIST,values:[{kind:$t.Kind.INT,value:"0"}]}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.SEMANTIC_NON_NULL,node:Xe.SEMANTIC_NON_NULL_DEFINITION,optionalArgumentNames:new Set([q.LEVELS]),requiredArgumentNames:new Set};$e.SPECIFIED_BY_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.URL_LOWER,{name:q.URL_LOWER,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([q.SCALAR_UPPER]),name:q.SPECIFIED_BY,node:Xe.SPECIFIED_BY_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.URL_LOWER])};$e.SHAREABLE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!0,locations:new Set([q.FIELD_DEFINITION_UPPER,q.OBJECT_UPPER]),name:q.SHAREABLE,node:Xe.SHAREABLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.SUBSCRIPTION_FILTER_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.CONDITION,{name:q.CONDITION,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.SUBSCRIPTION_FILTER_CONDITION)}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.SUBSCRIPTION_FILTER,node:Xe.SUBSCRIPTION_FILTER_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.CONDITION])};$e.TAG_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.NAME,{name:q.NAME,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([q.ARGUMENT_DEFINITION_UPPER,q.ENUM_UPPER,q.ENUM_VALUE_UPPER,q.FIELD_DEFINITION_UPPER,q.INPUT_FIELD_DEFINITION_UPPER,q.INPUT_OBJECT_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER,q.UNION_UPPER]),name:q.TAG,node:Xe.TAG_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.NAME])}});var Hp=w(Na=>{"use strict";m();T();N();Object.defineProperty(Na,"__esModule",{value:!0});Na.newFieldSetData=ole;Na.extractFieldSetValue=ule;Na.getNormalizedFieldSet=cle;Na.getInitialFieldCoordsPath=lle;Na.validateKeyFieldSets=dle;Na.getConditionalFieldSetDirectiveName=ple;Na.isNodeQuery=fle;Na.validateArgumentTemplateReferences=mle;Na.initializeDirectiveDefinitionDatas=Nle;var nr=Ae(),aV=Hr(),Rr=Mi(),sV=Ss(),QO=du(),an=$O(),At=vr(),Iu=Sr();function ole(){return{provides:new Map,requires:new Map}}function ule(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!==At.FIELDS||i.value.kind!==nr.Kind.STRING||t.set(e,i.value.value)}function cle(e){return(0,nr.print)((0,aV.lexicographicallySortDocumentNode)(e)).replaceAll(/\s+/g," ").slice(2,-2)}function lle(e,t){return e?[t]:[]}function dle(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[f,{documentNode:y,isUnresolvable:I,rawFieldSet:v}]of n){r&&(r.resolvable||(r.resolvable=!I)),d+=1;let F=[],k=[t],K=[],J=[],se=new Set,ie=-1,Te=!0,de="";if((0,nr.visit)(y,{Argument:{enter(Re){return F.push((0,Rr.unexpectedArgumentErrorMessage)(v,`${k[ie].name}.${de}`,Re.name.value)),nr.BREAK}},Field:{enter(Re){let xe=k[ie],tt=xe.name;if(Te){let bn=`${tt}.${de}`,Qt=xe.fieldDataByName.get(de);if(!Qt)return F.push((0,Rr.undefinedFieldInFieldSetErrorMessage)(v,bn,de)),nr.BREAK;let mn=(0,QO.getTypeNodeNamedTypeName)(Qt.node.type),Pr=e.parentDefinitionDataByTypeName.get(mn),Fr=Pr?Pr.kind:nr.Kind.SCALAR_TYPE_DEFINITION;return F.push((0,Rr.invalidSelectionSetErrorMessage)(v,[bn],mn,(0,Iu.kindToNodeType)(Fr))),nr.BREAK}let ee=Re.name.value,Se=`${tt}.${ee}`;de=ee;let _t=xe.fieldDataByName.get(ee);if(!_t)return F.push((0,Rr.undefinedFieldInFieldSetErrorMessage)(v,tt,ee)),nr.BREAK;if(_t.argumentDataByName.size)return F.push((0,Rr.argumentsInKeyFieldSetErrorMessage)(v,Se)),nr.BREAK;if(K[ie].has(ee))return F.push((0,Rr.duplicateFieldInFieldSetErrorMessage)(v,Se)),nr.BREAK;(0,Iu.getValueOrDefault)((0,Iu.getValueOrDefault)(e.keyFieldSetsByEntityTypeNameByFieldCoords,Se,()=>new Map),i,()=>new Set).add(f),J.push(ee),_t.isShareableBySubgraphName.set(e.subgraphName,!0),K[ie].add(ee),(0,Iu.getValueOrDefault)(e.keyFieldNamesByParentTypeName,tt,()=>new Set).add(ee);let en=(0,QO.getTypeNodeNamedTypeName)(_t.node.type);if(sV.BASE_SCALARS.has(en)){se.add(J.join(At.PERIOD)),J.pop();return}let tn=e.parentDefinitionDataByTypeName.get(en);if(!tn)return F.push((0,Rr.unknownTypeInFieldSetErrorMessage)(v,Se,en)),nr.BREAK;if(tn.kind===nr.Kind.OBJECT_TYPE_DEFINITION){Te=!0,k.push(tn);return}if((0,aV.isKindAbstract)(tn.kind))return F.push((0,Rr.abstractTypeInKeyFieldSetErrorMessage)(v,Se,en,(0,Iu.kindToNodeType)(tn.kind))),nr.BREAK;se.add(J.join(At.PERIOD)),J.pop()}},InlineFragment:{enter(){return F.push(Rr.inlineFragmentInFieldSetErrorMessage),nr.BREAK}},SelectionSet:{enter(){if(!Te){let Re=k[ie],tt=`${Re.name}.${de}`,ee=Re.fieldDataByName.get(de);if(!ee)return F.push((0,Rr.undefinedFieldInFieldSetErrorMessage)(v,tt,de)),nr.BREAK;let Se=(0,QO.getTypeNodeNamedTypeName)(ee.node.type),_t=e.parentDefinitionDataByTypeName.get(Se),en=_t?_t.kind:nr.Kind.SCALAR_TYPE_DEFINITION;return F.push((0,Rr.invalidSelectionSetDefinitionErrorMessage)(v,[tt],Se,(0,Iu.kindToNodeType)(en))),nr.BREAK}if(ie+=1,Te=!1,ie<0||ie>=k.length)return F.push((0,Rr.unparsableFieldSetSelectionErrorMessage)(v,de)),nr.BREAK;K.push(new Set)},leave(){if(Te){let xe=k[ie].name,tt=k[ie+1],ee=`${xe}.${de}`;F.push((0,Rr.invalidSelectionSetErrorMessage)(v,[ee],tt.name,(0,Iu.kindToNodeType)(tt.kind))),Te=!1}ie-=1,k.pop(),K.pop()}}}),F.length>0){e.errors.push((0,Rr.invalidDirectiveError)(At.KEY,i,(0,Iu.numberToOrdinal)(d),F));continue}a.push(x({fieldName:"",selectionSet:f},I?{disableEntityResolver:!0}:{})),l.satisfiedFieldSets.add(f),!I&&(c==null||c.addTargetSubgraphByFieldSet(f,e.subgraphName),o.push(se))}if(a.length>0)return a}function ple(e){return e?At.PROVIDES:At.REQUIRES}function fle(e,t){return e===At.QUERY||t===nr.OperationTypeNode.QUERY}function mle(e,t,n){let r=e.matchAll(sV.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,Rr.undefinedEventSubjectsArgumentErrorMessage)(o));for(let o of a)n.push((0,Rr.invalidEventSubjectsArgumentErrorMessage)(o))}function Nle(){return new Map([[At.AUTHENTICATED,an.AUTHENTICATED_DEFINITION_DATA],[At.COMPOSE_DIRECTIVE,an.COMPOSE_DIRECTIVE_DEFINITION_DATA],[At.CONFIGURE_DESCRIPTION,an.CONFIGURE_DESCRIPTION_DEFINITION_DATA],[At.CONFIGURE_CHILD_DESCRIPTIONS,an.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA],[At.DEPRECATED,an.DEPRECATED_DEFINITION_DATA],[At.EDFS_KAFKA_PUBLISH,an.KAFKA_PUBLISH_DEFINITION_DATA],[At.EDFS_KAFKA_SUBSCRIBE,an.KAFKA_SUBSCRIBE_DEFINITION_DATA],[At.EDFS_NATS_PUBLISH,an.NATS_PUBLISH_DEFINITION_DATA],[At.EDFS_NATS_REQUEST,an.NATS_REQUEST_DEFINITION_DATA],[At.EDFS_NATS_SUBSCRIBE,an.NATS_SUBSCRIBE_DEFINITION_DATA],[At.EDFS_REDIS_PUBLISH,an.REDIS_PUBLISH_DEFINITION_DATA],[At.EDFS_REDIS_SUBSCRIBE,an.REDIS_SUBSCRIBE_DEFINITION_DATA],[At.EXTENDS,an.EXTENDS_DEFINITION_DATA],[At.EXTERNAL,an.EXTERNAL_DEFINITION_DATA],[At.INACCESSIBLE,an.INACCESSIBLE_DEFINITION_DATA],[At.INTERFACE_OBJECT,an.INTERFACE_OBJECT_DEFINITION_DATA],[At.KEY,an.KEY_DEFINITION_DATA],[At.LINK,an.LINK_DEFINITION_DATA],[At.ONE_OF,an.ONE_OF_DEFINITION_DATA],[At.OVERRIDE,an.OVERRIDE_DEFINITION_DATA],[At.PROVIDES,an.PROVIDES_DEFINITION_DATA],[At.REQUIRE_FETCH_REASONS,an.REQUIRE_FETCH_REASONS_DEFINITION_DATA],[At.REQUIRES,an.REQUIRES_DEFINITION_DATA],[At.REQUIRES_SCOPES,an.REQUIRES_SCOPES_DEFINITION_DATA],[At.SEMANTIC_NON_NULL,an.SEMANTIC_NON_NULL_DATA],[At.SHAREABLE,an.SHAREABLE_DEFINITION_DATA],[At.SPECIFIED_BY,an.SPECIFIED_BY_DEFINITION_DATA],[At.SUBSCRIPTION_FILTER,an.SUBSCRIPTION_FILTER_DEFINITION_DATA],[At.TAG,an.TAG_DEFINITION_DATA]])}});var JO=w(YO=>{"use strict";m();T();N();Object.defineProperty(YO,"__esModule",{value:!0});YO.recordSubgraphName=Tle;function Tle(e,t,n){if(!t.has(e)){t.add(e);return}n.add(e)}});var zO=w(OE=>{"use strict";m();T();N();Object.defineProperty(OE,"__esModule",{value:!0});OE.Warning=void 0;var HO=class extends Error{constructor(n){super(n.message);_(this,"subgraph");this.name="Warning",this.subgraph=n.subgraph}};OE.Warning=HO});var zp=w(Ni=>{"use strict";m();T();N();Object.defineProperty(Ni,"__esModule",{value:!0});Ni.invalidOverrideTargetSubgraphNameWarning=Ele;Ni.externalInterfaceFieldsWarning=hle;Ni.nonExternalConditionalFieldWarning=yle;Ni.unimplementedInterfaceOutputTypeWarning=Ile;Ni.invalidExternalFieldWarning=gle;Ni.requiresDefinedOnNonEntityFieldWarning=_le;Ni.consumerInactiveThresholdInvalidValueWarning=vle;Ni.externalEntityExtensionKeyFieldWarning=Sle;Ni.fieldAlreadyProvidedWarning=Ole;Ni.singleSubgraphInputFieldOneOfWarning=Dle;Ni.singleFederatedInputFieldOneOfWarning=ble;var Ta=zO(),WO=vr();function Ele(e,t,n,r){return new Ta.Warning({message:`The Object type "${t}" defines the directive "@override(from: "${e}")" on the following field`+(n.length>1?"s":"")+': "'+n.join(WO.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 rse({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(He.QUOTATION_JOIN)+'".')}});var Xk=w(Wk=>{"use strict";m();T();N();Object.defineProperty(Wk,"__esModule",{value:!0})});var jp=w(Qi=>{"use strict";m();T();N();Object.defineProperty(Qi,"__esModule",{value:!0});Qi.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=Qi.SUBSCRIPTION_FILTER_INPUT_NAMES=Qi.STREAM_CONFIGURATION_FIELD_NAMES=Qi.EVENT_DIRECTIVE_NAMES=Qi.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=void 0;var fn=vr();Qi.TYPE_SYSTEM_DIRECTIVE_LOCATIONS=new Set([fn.ARGUMENT_DEFINITION_UPPER,fn.ENUM_UPPER,fn.ENUM_VALUE_UPPER,fn.FIELD_DEFINITION_UPPER,fn.INPUT_FIELD_DEFINITION_UPPER,fn.INPUT_OBJECT_UPPER,fn.INTERFACE_UPPER,fn.OBJECT_UPPER,fn.SCALAR_UPPER,fn.SCHEMA_UPPER,fn.UNION_UPPER]);Qi.EVENT_DIRECTIVE_NAMES=new Set([fn.EDFS_KAFKA_PUBLISH,fn.EDFS_KAFKA_SUBSCRIBE,fn.EDFS_NATS_PUBLISH,fn.EDFS_NATS_REQUEST,fn.EDFS_NATS_SUBSCRIBE,fn.EDFS_REDIS_PUBLISH,fn.EDFS_REDIS_SUBSCRIBE]);Qi.STREAM_CONFIGURATION_FIELD_NAMES=new Set([fn.CONSUMER_INACTIVE_THRESHOLD,fn.CONSUMER_NAME,fn.STREAM_NAME]);Qi.SUBSCRIPTION_FILTER_INPUT_NAMES=new Set([fn.AND_UPPER,fn.IN_UPPER,fn.NOT_UPPER,fn.OR_UPPER]);Qi.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES=new Set([fn.AND_UPPER,fn.OR_UPPER])});var Yi=w((WS,Zk)=>{"use strict";m();T();N();var Kp=function(e){return e&&e.Math===Math&&e};Zk.exports=Kp(typeof globalThis=="object"&&globalThis)||Kp(typeof window=="object"&&window)||Kp(typeof self=="object"&&self)||Kp(typeof global=="object"&&global)||Kp(typeof WS=="object"&&WS)||function(){return this}()||Function("return this")()});var bs=w((VAe,eM)=>{"use strict";m();T();N();eM.exports=function(e){try{return!!e()}catch(t){return!0}}});var hu=w(($Ae,tM)=>{"use strict";m();T();N();var ise=bs();tM.exports=!ise(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var XS=w((HAe,nM)=>{"use strict";m();T();N();var ase=bs();nM.exports=!ase(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var hc=w((ZAe,rM)=>{"use strict";m();T();N();var sse=XS(),sE=Function.prototype.call;rM.exports=sse?sE.bind(sE):function(){return sE.apply(sE,arguments)}});var oM=w(sM=>{"use strict";m();T();N();var iM={}.propertyIsEnumerable,aM=Object.getOwnPropertyDescriptor,ose=aM&&!iM.call({1:2},1);sM.f=ose?function(t){var n=aM(this,t);return!!n&&n.enumerable}:iM});var ZS=w((oRe,uM)=>{"use strict";m();T();N();uM.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var mi=w((dRe,dM)=>{"use strict";m();T();N();var cM=XS(),lM=Function.prototype,eO=lM.call,use=cM&&lM.bind.bind(eO,eO);dM.exports=cM?use:function(e){return function(){return eO.apply(e,arguments)}}});var mM=w((NRe,fM)=>{"use strict";m();T();N();var pM=mi(),cse=pM({}.toString),lse=pM("".slice);fM.exports=function(e){return lse(cse(e),8,-1)}});var TM=w((yRe,NM)=>{"use strict";m();T();N();var dse=mi(),pse=bs(),fse=mM(),tO=Object,mse=dse("".split);NM.exports=pse(function(){return!tO("z").propertyIsEnumerable(0)})?function(e){return fse(e)==="String"?mse(e,""):tO(e)}:tO});var nO=w((vRe,EM)=>{"use strict";m();T();N();EM.exports=function(e){return e==null}});var rO=w((bRe,hM)=>{"use strict";m();T();N();var Nse=nO(),Tse=TypeError;hM.exports=function(e){if(Nse(e))throw new Tse("Can't call method on "+e);return e}});var oE=w((FRe,yM)=>{"use strict";m();T();N();var Ese=TM(),hse=rO();yM.exports=function(e){return Ese(hse(e))}});var pa=w((BRe,IM)=>{"use strict";m();T();N();var iO=typeof document=="object"&&document.all;IM.exports=typeof iO=="undefined"&&iO!==void 0?function(e){return typeof e=="function"||e===iO}:function(e){return typeof e=="function"}});var Jl=w((xRe,gM)=>{"use strict";m();T();N();var yse=pa();gM.exports=function(e){return typeof e=="object"?e!==null:yse(e)}});var uE=w((KRe,_M)=>{"use strict";m();T();N();var aO=Yi(),Ise=pa(),gse=function(e){return Ise(e)?e:void 0};_M.exports=function(e,t){return arguments.length<2?gse(aO[e]):aO[e]&&aO[e][t]}});var SM=w((YRe,vM)=>{"use strict";m();T();N();var _se=mi();vM.exports=_se({}.isPrototypeOf)});var AM=w((WRe,bM)=>{"use strict";m();T();N();var vse=Yi(),OM=vse.navigator,DM=OM&&OM.userAgent;bM.exports=DM?String(DM):""});var BM=w((tPe,CM)=>{"use strict";m();T();N();var LM=Yi(),sO=AM(),RM=LM.process,PM=LM.Deno,FM=RM&&RM.versions||PM&&PM.version,wM=FM&&FM.v8,fa,cE;wM&&(fa=wM.split("."),cE=fa[0]>0&&fa[0]<4?1:+(fa[0]+fa[1]));!cE&&sO&&(fa=sO.match(/Edge\/(\d+)/),(!fa||fa[1]>=74)&&(fa=sO.match(/Chrome\/(\d+)/),fa&&(cE=+fa[1])));CM.exports=cE});var oO=w((aPe,kM)=>{"use strict";m();T();N();var UM=BM(),Sse=bs(),Ose=Yi(),Dse=Ose.String;kM.exports=!!Object.getOwnPropertySymbols&&!Sse(function(){var e=Symbol("symbol detection");return!Dse(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&UM&&UM<41})});var uO=w((cPe,MM)=>{"use strict";m();T();N();var bse=oO();MM.exports=bse&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var cO=w((fPe,xM)=>{"use strict";m();T();N();var Ase=uE(),Rse=pa(),Pse=SM(),Fse=uO(),wse=Object;xM.exports=Fse?function(e){return typeof e=="symbol"}:function(e){var t=Ase("Symbol");return Rse(t)&&Pse(t.prototype,wse(e))}});var VM=w((EPe,qM)=>{"use strict";m();T();N();var Lse=String;qM.exports=function(e){try{return Lse(e)}catch(t){return"Object"}}});var lE=w((gPe,jM)=>{"use strict";m();T();N();var Cse=pa(),Bse=VM(),Use=TypeError;jM.exports=function(e){if(Cse(e))return e;throw new Use(Bse(e)+" is not a function")}});var lO=w((OPe,KM)=>{"use strict";m();T();N();var kse=lE(),Mse=nO();KM.exports=function(e,t){var n=e[t];return Mse(n)?void 0:kse(n)}});var $M=w((RPe,GM)=>{"use strict";m();T();N();var dO=hc(),pO=pa(),fO=Jl(),xse=TypeError;GM.exports=function(e,t){var n,r;if(t==="string"&&pO(n=e.toString)&&!fO(r=dO(n,e))||pO(n=e.valueOf)&&!fO(r=dO(n,e))||t!=="string"&&pO(n=e.toString)&&!fO(r=dO(n,e)))return r;throw new xse("Can't convert object to primitive value")}});var YM=w((LPe,QM)=>{"use strict";m();T();N();QM.exports=!1});var dE=w((kPe,HM)=>{"use strict";m();T();N();var JM=Yi(),qse=Object.defineProperty;HM.exports=function(e,t){try{qse(JM,e,{value:t,configurable:!0,writable:!0})}catch(n){JM[e]=t}return t}});var pE=w((VPe,XM)=>{"use strict";m();T();N();var Vse=YM(),jse=Yi(),Kse=dE(),zM="__core-js_shared__",WM=XM.exports=jse[zM]||Kse(zM,{});(WM.versions||(WM.versions=[])).push({version:"3.41.0",mode:Vse?"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 mO=w(($Pe,ex)=>{"use strict";m();T();N();var ZM=pE();ex.exports=function(e,t){return ZM[e]||(ZM[e]=t||{})}});var nx=w((HPe,tx)=>{"use strict";m();T();N();var Gse=rO(),$se=Object;tx.exports=function(e){return $se(Gse(e))}});var yu=w((ZPe,rx)=>{"use strict";m();T();N();var Qse=mi(),Yse=nx(),Jse=Qse({}.hasOwnProperty);rx.exports=Object.hasOwn||function(t,n){return Jse(Yse(t),n)}});var NO=w((rFe,ix)=>{"use strict";m();T();N();var Hse=mi(),zse=0,Wse=Math.random(),Xse=Hse(1 .toString);ix.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Xse(++zse+Wse,36)}});var ox=w((oFe,sx)=>{"use strict";m();T();N();var Zse=Yi(),eoe=mO(),ax=yu(),toe=NO(),noe=oO(),roe=uO(),Hl=Zse.Symbol,TO=eoe("wks"),ioe=roe?Hl.for||Hl:Hl&&Hl.withoutSetter||toe;sx.exports=function(e){return ax(TO,e)||(TO[e]=noe&&ax(Hl,e)?Hl[e]:ioe("Symbol."+e)),TO[e]}});var dx=w((dFe,lx)=>{"use strict";m();T();N();var aoe=hc(),ux=Jl(),cx=cO(),soe=lO(),ooe=$M(),uoe=ox(),coe=TypeError,loe=uoe("toPrimitive");lx.exports=function(e,t){if(!ux(e)||cx(e))return e;var n=soe(e,loe),r;if(n){if(t===void 0&&(t="default"),r=aoe(n,e,t),!ux(r)||cx(r))return r;throw new coe("Can't convert object to primitive value")}return t===void 0&&(t="number"),ooe(e,t)}});var EO=w((NFe,px)=>{"use strict";m();T();N();var doe=dx(),poe=cO();px.exports=function(e){var t=doe(e,"string");return poe(t)?t:t+""}});var Nx=w((yFe,mx)=>{"use strict";m();T();N();var foe=Yi(),fx=Jl(),hO=foe.document,moe=fx(hO)&&fx(hO.createElement);mx.exports=function(e){return moe?hO.createElement(e):{}}});var yO=w((vFe,Tx)=>{"use strict";m();T();N();var Noe=hu(),Toe=bs(),Eoe=Nx();Tx.exports=!Noe&&!Toe(function(){return Object.defineProperty(Eoe("div"),"a",{get:function(){return 7}}).a!==7})});var IO=w(hx=>{"use strict";m();T();N();var hoe=hu(),yoe=hc(),Ioe=oM(),goe=ZS(),_oe=oE(),voe=EO(),Soe=yu(),Ooe=yO(),Ex=Object.getOwnPropertyDescriptor;hx.f=hoe?Ex:function(t,n){if(t=_oe(t),n=voe(n),Ooe)try{return Ex(t,n)}catch(r){}if(Soe(t,n))return goe(!yoe(Ioe.f,t,n),t[n])}});var Ix=w((FFe,yx)=>{"use strict";m();T();N();var Doe=hu(),boe=bs();yx.exports=Doe&&boe(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Gp=w((BFe,gx)=>{"use strict";m();T();N();var Aoe=Jl(),Roe=String,Poe=TypeError;gx.exports=function(e){if(Aoe(e))return e;throw new Poe(Roe(e)+" is not an object")}});var mE=w(vx=>{"use strict";m();T();N();var Foe=hu(),woe=yO(),Loe=Ix(),fE=Gp(),_x=EO(),Coe=TypeError,gO=Object.defineProperty,Boe=Object.getOwnPropertyDescriptor,_O="enumerable",vO="configurable",SO="writable";vx.f=Foe?Loe?function(t,n,r){if(fE(t),n=_x(n),fE(r),typeof t=="function"&&n==="prototype"&&"value"in r&&SO in r&&!r[SO]){var i=Boe(t,n);i&&i[SO]&&(t[n]=r.value,r={configurable:vO in r?r[vO]:i[vO],enumerable:_O in r?r[_O]:i[_O],writable:!1})}return gO(t,n,r)}:gO:function(t,n,r){if(fE(t),n=_x(n),fE(r),woe)try{return gO(t,n,r)}catch(i){}if("get"in r||"set"in r)throw new Coe("Accessors not supported");return"value"in r&&(t[n]=r.value),t}});var OO=w((KFe,Sx)=>{"use strict";m();T();N();var Uoe=hu(),koe=mE(),Moe=ZS();Sx.exports=Uoe?function(e,t,n){return koe.f(e,t,Moe(1,n))}:function(e,t,n){return e[t]=n,e}});var bx=w((YFe,Dx)=>{"use strict";m();T();N();var DO=hu(),xoe=yu(),Ox=Function.prototype,qoe=DO&&Object.getOwnPropertyDescriptor,bO=xoe(Ox,"name"),Voe=bO&&function(){}.name==="something",joe=bO&&(!DO||DO&&qoe(Ox,"name").configurable);Dx.exports={EXISTS:bO,PROPER:Voe,CONFIGURABLE:joe}});var Rx=w((WFe,Ax)=>{"use strict";m();T();N();var Koe=mi(),Goe=pa(),AO=pE(),$oe=Koe(Function.toString);Goe(AO.inspectSource)||(AO.inspectSource=function(e){return $oe(e)});Ax.exports=AO.inspectSource});var wx=w((twe,Fx)=>{"use strict";m();T();N();var Qoe=Yi(),Yoe=pa(),Px=Qoe.WeakMap;Fx.exports=Yoe(Px)&&/native code/.test(String(Px))});var Bx=w((awe,Cx)=>{"use strict";m();T();N();var Joe=mO(),Hoe=NO(),Lx=Joe("keys");Cx.exports=function(e){return Lx[e]||(Lx[e]=Hoe(e))}});var RO=w((cwe,Ux)=>{"use strict";m();T();N();Ux.exports={}});var qx=w((fwe,xx)=>{"use strict";m();T();N();var zoe=wx(),Mx=Yi(),Woe=Jl(),Xoe=OO(),PO=yu(),FO=pE(),Zoe=Bx(),eue=RO(),kx="Object already initialized",wO=Mx.TypeError,tue=Mx.WeakMap,NE,$p,TE,nue=function(e){return TE(e)?$p(e):NE(e,{})},rue=function(e){return function(t){var n;if(!Woe(t)||(n=$p(t)).type!==e)throw new wO("Incompatible receiver, "+e+" required");return n}};zoe||FO.state?(ma=FO.state||(FO.state=new tue),ma.get=ma.get,ma.has=ma.has,ma.set=ma.set,NE=function(e,t){if(ma.has(e))throw new wO(kx);return t.facade=e,ma.set(e,t),t},$p=function(e){return ma.get(e)||{}},TE=function(e){return ma.has(e)}):(yc=Zoe("state"),eue[yc]=!0,NE=function(e,t){if(PO(e,yc))throw new wO(kx);return t.facade=e,Xoe(e,yc,t),t},$p=function(e){return PO(e,yc)?e[yc]:{}},TE=function(e){return PO(e,yc)});var ma,yc;xx.exports={set:NE,get:$p,has:TE,enforce:nue,getterFor:rue}});var Gx=w((Ewe,Kx)=>{"use strict";m();T();N();var CO=mi(),iue=bs(),aue=pa(),EE=yu(),LO=hu(),sue=bx().CONFIGURABLE,oue=Rx(),jx=qx(),uue=jx.enforce,cue=jx.get,Vx=String,hE=Object.defineProperty,lue=CO("".slice),due=CO("".replace),pue=CO([].join),fue=LO&&!iue(function(){return hE(function(){},"length",{value:8}).length!==8}),mue=String(String).split("String"),Nue=Kx.exports=function(e,t,n){lue(Vx(t),0,7)==="Symbol("&&(t="["+due(Vx(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!EE(e,"name")||sue&&e.name!==t)&&(LO?hE(e,"name",{value:t,configurable:!0}):e.name=t),fue&&n&&EE(n,"arity")&&e.length!==n.arity&&hE(e,"length",{value:n.arity});try{n&&EE(n,"constructor")&&n.constructor?LO&&hE(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(i){}var r=uue(e);return EE(r,"source")||(r.source=pue(mue,typeof t=="string"?t:"")),e};Function.prototype.toString=Nue(function(){return aue(this)&&cue(this).source||oue(this)},"toString")});var Qx=w((gwe,$x)=>{"use strict";m();T();N();var Tue=pa(),Eue=mE(),hue=Gx(),yue=dE();$x.exports=function(e,t,n,r){r||(r={});var i=r.enumerable,a=r.name!==void 0?r.name:t;if(Tue(n)&&hue(n,a,r),r.global)i?e[t]=n:yue(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(o){}i?e[t]=n:Eue.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e}});var Jx=w((Owe,Yx)=>{"use strict";m();T();N();var Iue=Math.ceil,gue=Math.floor;Yx.exports=Math.trunc||function(t){var n=+t;return(n>0?gue:Iue)(n)}});var yE=w((Rwe,Hx)=>{"use strict";m();T();N();var _ue=Jx();Hx.exports=function(e){var t=+e;return t!==t||t===0?0:_ue(t)}});var Wx=w((Lwe,zx)=>{"use strict";m();T();N();var vue=yE(),Sue=Math.max,Oue=Math.min;zx.exports=function(e,t){var n=vue(e);return n<0?Sue(n+t,0):Oue(n,t)}});var Zx=w((kwe,Xx)=>{"use strict";m();T();N();var Due=yE(),bue=Math.min;Xx.exports=function(e){var t=Due(e);return t>0?bue(t,9007199254740991):0}});var tq=w((Vwe,eq)=>{"use strict";m();T();N();var Aue=Zx();eq.exports=function(e){return Aue(e.length)}});var iq=w(($we,rq)=>{"use strict";m();T();N();var Rue=oE(),Pue=Wx(),Fue=tq(),nq=function(e){return function(t,n,r){var i=Rue(t),a=Fue(i);if(a===0)return!e&&-1;var o=Pue(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}};rq.exports={includes:nq(!0),indexOf:nq(!1)}});var oq=w((Hwe,sq)=>{"use strict";m();T();N();var wue=mi(),BO=yu(),Lue=oE(),Cue=iq().indexOf,Bue=RO(),aq=wue([].push);sq.exports=function(e,t){var n=Lue(e),r=0,i=[],a;for(a in n)!BO(Bue,a)&&BO(n,a)&&aq(i,a);for(;t.length>r;)BO(n,a=t[r++])&&(~Cue(i,a)||aq(i,a));return i}});var cq=w((Zwe,uq)=>{"use strict";m();T();N();uq.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var dq=w(lq=>{"use strict";m();T();N();var Uue=oq(),kue=cq(),Mue=kue.concat("length","prototype");lq.f=Object.getOwnPropertyNames||function(t){return Uue(t,Mue)}});var fq=w(pq=>{"use strict";m();T();N();pq.f=Object.getOwnPropertySymbols});var Nq=w((dLe,mq)=>{"use strict";m();T();N();var xue=uE(),que=mi(),Vue=dq(),jue=fq(),Kue=Gp(),Gue=que([].concat);mq.exports=xue("Reflect","ownKeys")||function(t){var n=Vue.f(Kue(t)),r=jue.f;return r?Gue(n,r(t)):n}});var hq=w((NLe,Eq)=>{"use strict";m();T();N();var Tq=yu(),$ue=Nq(),Que=IO(),Yue=mE();Eq.exports=function(e,t,n){for(var r=$ue(t),i=Yue.f,a=Que.f,o=0;o{"use strict";m();T();N();var Jue=bs(),Hue=pa(),zue=/#|\.prototype\./,Qp=function(e,t){var n=Xue[Wue(e)];return n===ece?!0:n===Zue?!1:Hue(t)?Jue(t):!!t},Wue=Qp.normalize=function(e){return String(e).replace(zue,".").toLowerCase()},Xue=Qp.data={},Zue=Qp.NATIVE="N",ece=Qp.POLYFILL="P";yq.exports=Qp});var UO=w((vLe,gq)=>{"use strict";m();T();N();var IE=Yi(),tce=IO().f,nce=OO(),rce=Qx(),ice=dE(),ace=hq(),sce=Iq();gq.exports=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,c,l,d,f;if(r?o=IE:i?o=IE[n]||ice(n,{}):o=IE[n]&&IE[n].prototype,o)for(c in t){if(d=t[c],e.dontCallGetSet?(f=tce(o,c),l=f&&f.value):l=o[c],a=sce(r?c:n+(i?".":"#")+c,e.forced),!a&&l!==void 0){if(typeof d==typeof l)continue;ace(d,l)}(e.sham||l&&l.sham)&&nce(d,"sham",!0),rce(o,c,d,e)}}});var Yp=w((bLe,_q)=>{"use strict";m();T();N();var kO=mi(),gE=Set.prototype;_q.exports={Set,add:kO(gE.add),has:kO(gE.has),remove:kO(gE.delete),proto:gE}});var MO=w((FLe,vq)=>{"use strict";m();T();N();var oce=Yp().has;vq.exports=function(e){return oce(e),e}});var Oq=w((BLe,Sq)=>{"use strict";m();T();N();var uce=mi(),cce=lE();Sq.exports=function(e,t,n){try{return uce(cce(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}}});var xO=w((xLe,Dq)=>{"use strict";m();T();N();var lce=Oq(),dce=Yp();Dq.exports=lce(dce.proto,"size","get")||function(e){return e.size}});var qO=w((KLe,bq)=>{"use strict";m();T();N();var pce=hc();bq.exports=function(e,t,n){for(var r=n?e:e.iterator,i=e.next,a,o;!(a=pce(i,r)).done;)if(o=t(a.value),o!==void 0)return o}});var Lq=w((YLe,wq)=>{"use strict";m();T();N();var Aq=mi(),fce=qO(),Rq=Yp(),mce=Rq.Set,Pq=Rq.proto,Nce=Aq(Pq.forEach),Fq=Aq(Pq.keys),Tce=Fq(new mce).next;wq.exports=function(e,t,n){return n?fce({iterator:Fq(e),next:Tce},t):Nce(e,t)}});var Bq=w((WLe,Cq)=>{"use strict";m();T();N();Cq.exports=function(e){return{iterator:e,next:e.next,done:!1}}});var VO=w((tCe,Vq)=>{"use strict";m();T();N();var Uq=lE(),xq=Gp(),kq=hc(),Ece=yE(),hce=Bq(),Mq="Invalid size",yce=RangeError,Ice=TypeError,gce=Math.max,qq=function(e,t){this.set=e,this.size=gce(t,0),this.has=Uq(e.has),this.keys=Uq(e.keys)};qq.prototype={getIterator:function(){return hce(xq(kq(this.keys,this.set)))},includes:function(e){return kq(this.has,this.set,e)}};Vq.exports=function(e){xq(e);var t=+e.size;if(t!==t)throw new Ice(Mq);var n=Ece(t);if(n<0)throw new yce(Mq);return new qq(e,n)}});var Kq=w((aCe,jq)=>{"use strict";m();T();N();var _ce=MO(),vce=xO(),Sce=Lq(),Oce=VO();jq.exports=function(t){var n=_ce(this),r=Oce(t);return vce(n)>r.size?!1:Sce(n,function(i){if(!r.includes(i))return!1},!0)!==!1}});var jO=w((cCe,Qq)=>{"use strict";m();T();N();var Dce=uE(),Gq=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},$q=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};Qq.exports=function(e,t){var n=Dce("Set");try{new n()[e](Gq(0));try{return new n()[e](Gq(-1)),!1}catch(i){if(!t)return!0;try{return new n()[e]($q(-1/0)),!1}catch(a){var r=new n;return r.add(1),r.add(2),t(r[e]($q(1/0)))}}}catch(i){return!1}}});var Yq=w(()=>{"use strict";m();T();N();var bce=UO(),Ace=Kq(),Rce=jO(),Pce=!Rce("isSubsetOf",function(e){return e});bce({target:"Set",proto:!0,real:!0,forced:Pce},{isSubsetOf:Ace})});var Jq=w(()=>{"use strict";m();T();N();Yq()});var Wq=w((vCe,zq)=>{"use strict";m();T();N();var Fce=hc(),Hq=Gp(),wce=lO();zq.exports=function(e,t,n){var r,i;Hq(e);try{if(r=wce(e,"return"),!r){if(t==="throw")throw n;return n}r=Fce(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return Hq(r),n}});var Zq=w((bCe,Xq)=>{"use strict";m();T();N();var Lce=MO(),Cce=Yp().has,Bce=xO(),Uce=VO(),kce=qO(),Mce=Wq();Xq.exports=function(t){var n=Lce(this),r=Uce(t);if(Bce(n){"use strict";m();T();N();var xce=UO(),qce=Zq(),Vce=jO(),jce=!Vce("isSupersetOf",function(e){return!e});xce({target:"Set",proto:!0,real:!0,forced:jce},{isSupersetOf:qce})});var tV=w(()=>{"use strict";m();T();N();eV()});var Jp=w(Bn=>{"use strict";m();T();N();Object.defineProperty(Bn,"__esModule",{value:!0});Bn.subtractSet=Kce;Bn.mapToArrayOfValues=Gce;Bn.kindToConvertedTypeString=$ce;Bn.fieldDatasToSimpleFieldDatas=Qce;Bn.isNodeLeaf=Yce;Bn.newEntityInterfaceFederationData=Jce;Bn.upsertEntityInterfaceFederationData=Hce;Bn.upsertEntityData=Wce;Bn.updateEntityData=nV;Bn.newFieldAuthorizationData=Xce;Bn.newAuthorizationData=Zce;Bn.addScopes=KO;Bn.mergeRequiredScopesByAND=SE;Bn.mergeRequiredScopesByOR=GO;Bn.upsertFieldAuthorizationData=rV;Bn.upsertAuthorizationData=nle;Bn.upsertAuthorizationConfiguration=rle;Bn.isNodeKindObject=ile;Bn.isObjectDefinitionData=ale;Bn.getNodeCoords=sle;var Gt=Ae(),ei=vr(),_E=Sr(),vE=Ss();Jq();tV();function Kce(e,t){for(let n of e)t.delete(n)}function Gce(e){let t=[];for(let n of e.values())t.push(n);return t}function $ce(e){switch(e){case Gt.Kind.BOOLEAN:return ei.BOOLEAN_SCALAR;case Gt.Kind.ENUM:case Gt.Kind.ENUM_TYPE_DEFINITION:case Gt.Kind.ENUM_TYPE_EXTENSION:return ei.ENUM;case Gt.Kind.ENUM_VALUE_DEFINITION:return ei.ENUM_VALUE;case Gt.Kind.FIELD_DEFINITION:return ei.FIELD;case Gt.Kind.FLOAT:return ei.FLOAT_SCALAR;case Gt.Kind.INPUT_OBJECT_TYPE_DEFINITION:case Gt.Kind.INPUT_OBJECT_TYPE_EXTENSION:return ei.INPUT_OBJECT;case Gt.Kind.INPUT_VALUE_DEFINITION:return ei.INPUT_VALUE;case Gt.Kind.INT:return ei.INT_SCALAR;case Gt.Kind.INTERFACE_TYPE_DEFINITION:case Gt.Kind.INTERFACE_TYPE_EXTENSION:return ei.INTERFACE;case Gt.Kind.NULL:return ei.NULL;case Gt.Kind.OBJECT:case Gt.Kind.OBJECT_TYPE_DEFINITION:case Gt.Kind.OBJECT_TYPE_EXTENSION:return ei.OBJECT;case Gt.Kind.STRING:return ei.STRING_SCALAR;case Gt.Kind.SCALAR_TYPE_DEFINITION:case Gt.Kind.SCALAR_TYPE_EXTENSION:return ei.SCALAR;case Gt.Kind.UNION_TYPE_DEFINITION:case Gt.Kind.UNION_TYPE_EXTENSION:return ei.UNION;default:return e}}function Qce(e){let t=[];for(let{name:n,namedTypeName:r}of e)t.push({name:n,namedTypeName:r});return t}function Yce(e){if(!e)return!0;switch(e){case Gt.Kind.OBJECT_TYPE_DEFINITION:case Gt.Kind.INTERFACE_TYPE_DEFINITION:case Gt.Kind.UNION_TYPE_DEFINITION:return!1;default:return!0}}function Jce(e,t){return{concreteTypeNames:new Set(e.concreteTypeNames),fieldDatasBySubgraphName:new Map([[t,e.fieldDatas]]),interfaceFieldNames:new Set(e.interfaceFieldNames),interfaceObjectFieldNames:new Set(e.interfaceObjectFieldNames),interfaceObjectSubgraphs:new Set(e.isInterfaceObject?[t]:[]),subgraphDataByTypeName:new Map([[t,e]]),typeName:e.typeName}}function Hce(e,t,n){(0,_E.addIterableValuesToSet)(t.concreteTypeNames,e.concreteTypeNames),e.subgraphDataByTypeName.set(n,t),e.fieldDatasBySubgraphName.set(n,t.fieldDatas),(0,_E.addIterableValuesToSet)(t.interfaceFieldNames,e.interfaceFieldNames),(0,_E.addIterableValuesToSet)(t.interfaceObjectFieldNames,e.interfaceObjectFieldNames),t.isInterfaceObject&&e.interfaceObjectSubgraphs.add(n)}function zce({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 Wce({entityDataByTypeName:e,keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}){let i=e.get(r);i?nV({entityData:i,keyFieldSetDataByFieldSet:t,subgraphName:n}):e.set(r,zce({keyFieldSetDataByFieldSet:t,subgraphName:n,typeName:r}))}function nV({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 Xce(e){return{fieldName:e,inheritedData:{requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1},originalData:{requiredScopes:[],requiresAuthentication:!1}}}function Zce(e){return{fieldAuthDataByFieldName:new Map,requiredScopes:[],requiredScopesByOR:[],requiresAuthentication:!1,typeName:e}}function KO(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 SE(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,_E.addSets)(r,i);KO(n,a)}return n}function GO(e,t){for(let n of t)KO(e,n);return e.length<=vE.MAX_OR_SCOPES}function rV(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),!GO(r.inheritedData.requiredScopesByOR,t.inheritedData.requiredScopes)||r.inheritedData.requiredScopes.length*t.inheritedData.requiredScopes.length>vE.MAX_OR_SCOPES||r.originalData.requiredScopes.length*t.originalData.requiredScopes.length>vE.MAX_OR_SCOPES?!1:(r.inheritedData.requiredScopes=SE(r.inheritedData.requiredScopes,t.inheritedData.requiredScopes),r.originalData.requiredScopes=SE(r.originalData.requiredScopes,t.originalData.requiredScopes),!0)):(e.set(n,iV(t)),!0)}function ele(e){let t=new Map;for(let[n,r]of e)t.set(n,iV(r));return t}function iV(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 tle(e){return{fieldAuthDataByFieldName:ele(e.fieldAuthDataByFieldName),requiredScopes:[...e.requiredScopes],requiredScopesByOR:[...e.requiredScopes],requiresAuthentication:e.requiresAuthentication,typeName:e.typeName}}function nle(e,t,n){let r=e.get(t.typeName);if(!r){e.set(t.typeName,tle(t));return}r.requiresAuthentication||(r.requiresAuthentication=t.requiresAuthentication),!GO(r.requiredScopesByOR,t.requiredScopes)||r.requiredScopes.length*t.requiredScopes.length>vE.MAX_OR_SCOPES?n.add(t.typeName):r.requiredScopes=SE(r.requiredScopes,t.requiredScopes);for(let[i,a]of t.fieldAuthDataByFieldName)rV(r.fieldAuthDataByFieldName,a)||n.add(`${t.typeName}.${i}`)}function rle(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 ile(e){return e===Gt.Kind.OBJECT_TYPE_DEFINITION||e===Gt.Kind.OBJECT_TYPE_EXTENSION}function ale(e){return e?e.kind===Gt.Kind.OBJECT_TYPE_DEFINITION:!1}function sle(e){switch(e.kind){case Gt.Kind.ARGUMENT:case Gt.Kind.FIELD_DEFINITION:case Gt.Kind.INPUT_VALUE_DEFINITION:case Gt.Kind.ENUM_VALUE_DEFINITION:return e.federatedCoords;default:return e.name}}});var $O=w($e=>{"use strict";m();T();N();Object.defineProperty($e,"__esModule",{value:!0});$e.TAG_DEFINITION_DATA=$e.SUBSCRIPTION_FILTER_DEFINITION_DATA=$e.SHAREABLE_DEFINITION_DATA=$e.SPECIFIED_BY_DEFINITION_DATA=$e.SEMANTIC_NON_NULL_DATA=$e.REQUIRES_SCOPES_DEFINITION_DATA=$e.REQUIRE_FETCH_REASONS_DEFINITION_DATA=$e.REDIS_SUBSCRIBE_DEFINITION_DATA=$e.REDIS_PUBLISH_DEFINITION_DATA=$e.REQUIRES_DEFINITION_DATA=$e.PROVIDES_DEFINITION_DATA=$e.LINK_DEFINITION_DATA=$e.KEY_DEFINITION_DATA=$e.OVERRIDE_DEFINITION_DATA=$e.ONE_OF_DEFINITION_DATA=$e.NATS_SUBSCRIBE_DEFINITION_DATA=$e.NATS_REQUEST_DEFINITION_DATA=$e.NATS_PUBLISH_DEFINITION_DATA=$e.KAFKA_SUBSCRIBE_DEFINITION_DATA=$e.KAFKA_PUBLISH_DEFINITION_DATA=$e.INTERFACE_OBJECT_DEFINITION_DATA=$e.INACCESSIBLE_DEFINITION_DATA=$e.EXTERNAL_DEFINITION_DATA=$e.EXTENDS_DEFINITION_DATA=$e.DEPRECATED_DEFINITION_DATA=$e.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA=$e.CONFIGURE_DESCRIPTION_DEFINITION_DATA=$e.COMPOSE_DIRECTIVE_DEFINITION_DATA=$e.AUTHENTICATED_DEFINITION_DATA=void 0;var Xe=Ss(),Ji=Hr(),$t=Ae(),q=vr();$e.AUTHENTICATED_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([]),isRepeatable:!1,locations:new Set([q.ENUM_UPPER,q.FIELD_DEFINITION_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER]),name:q.AUTHENTICATED,node:Xe.AUTHENTICATED_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.COMPOSE_DIRECTIVE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.NAME,{name:q.NAME,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([q.SCHEMA_UPPER]),name:q.COMPOSE_DIRECTIVE,node:Xe.COMPOSE_DIRECTIVE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.NAME])};$e.CONFIGURE_DESCRIPTION_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.PROPAGATE,{name:q.PROPAGATE,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.BOOLEAN_SCALAR)},defaultValue:{kind:$t.Kind.BOOLEAN,value:!0}}],[q.DESCRIPTION_OVERRIDE,{name:q.DESCRIPTION_OVERRIDE,typeNode:(0,Ji.stringToNamedTypeNode)(q.STRING_SCALAR)}]]),isRepeatable:!1,locations:new Set([q.ARGUMENT_DEFINITION_UPPER,q.ENUM_UPPER,q.ENUM_VALUE_UPPER,q.FIELD_DEFINITION_UPPER,q.INTERFACE_UPPER,q.INPUT_OBJECT_UPPER,q.INPUT_FIELD_DEFINITION_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER,q.SCHEMA_UPPER,q.UNION_UPPER]),name:q.CONFIGURE_DESCRIPTION,node:Xe.CONFIGURE_DESCRIPTION_DEFINITION,optionalArgumentNames:new Set([q.PROPAGATE,q.DESCRIPTION_OVERRIDE]),requiredArgumentNames:new Set};$e.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.PROPAGATE,{name:q.PROPAGATE,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.BOOLEAN_SCALAR)},defaultValue:{kind:$t.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!1,locations:new Set([q.ENUM_UPPER,q.INPUT_OBJECT_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER]),name:q.CONFIGURE_CHILD_DESCRIPTIONS,node:Xe.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION,optionalArgumentNames:new Set([q.PROPAGATE]),requiredArgumentNames:new Set};$e.DEPRECATED_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.REASON,{name:q.REASON,typeNode:(0,Ji.stringToNamedTypeNode)(q.STRING_SCALAR),defaultValue:{kind:$t.Kind.STRING,value:$t.DEFAULT_DEPRECATION_REASON}}]]),isRepeatable:!1,locations:new Set([q.ARGUMENT_DEFINITION_UPPER,q.ENUM_VALUE_UPPER,q.FIELD_DEFINITION_UPPER,q.INPUT_FIELD_DEFINITION_UPPER]),name:q.DEPRECATED,node:Xe.DEPRECATED_DEFINITION,optionalArgumentNames:new Set([q.REASON]),requiredArgumentNames:new Set};$e.EXTENDS_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!1,locations:new Set([q.INTERFACE_UPPER,q.OBJECT_UPPER]),name:q.EXTENDS,node:Xe.EXTENDS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.EXTERNAL_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER,q.OBJECT_UPPER]),name:q.EXTERNAL,node:Xe.EXTERNAL_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.INACCESSIBLE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!1,locations:new Set([q.ARGUMENT_DEFINITION_UPPER,q.ENUM_UPPER,q.ENUM_VALUE_UPPER,q.FIELD_DEFINITION_UPPER,q.INPUT_FIELD_DEFINITION_UPPER,q.INPUT_OBJECT_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER,q.UNION_UPPER]),name:q.INACCESSIBLE,node:Xe.INACCESSIBLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.INTERFACE_OBJECT_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!1,locations:new Set([q.OBJECT_UPPER]),name:q.INTERFACE_OBJECT,node:Xe.INTERFACE_OBJECT_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.KAFKA_PUBLISH_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.TOPIC,{name:q.TOPIC,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_KAFKA_PUBLISH,node:Xe.EDFS_KAFKA_PUBLISH_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.TOPIC])};$e.KAFKA_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.TOPICS,{name:q.TOPICS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:Xe.REQUIRED_STRING_TYPE_NODE}}}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_KAFKA_SUBSCRIBE,node:Xe.EDFS_KAFKA_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.TOPICS])};$e.NATS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.SUBJECT,{name:q.SUBJECT,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_NATS_PUBLISH,node:Xe.EDFS_NATS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.SUBJECT])};$e.NATS_REQUEST_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.SUBJECT,{name:q.SUBJECT,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_NATS_REQUEST,node:Xe.EDFS_NATS_REQUEST_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.SUBJECT])};$e.NATS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.SUBJECTS,{name:q.SUBJECTS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:Xe.REQUIRED_STRING_TYPE_NODE}}}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}],[q.STREAM_CONFIGURATION,{name:q.STREAM_CONFIGURATION,typeNode:(0,Ji.stringToNamedTypeNode)(q.EDFS_NATS_STREAM_CONFIGURATION)}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_NATS_SUBSCRIBE,node:Xe.EDFS_NATS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.SUBJECTS])};$e.ONE_OF_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([]),isRepeatable:!1,locations:new Set([q.INPUT_OBJECT_UPPER]),name:q.ONE_OF,node:Xe.ONE_OF_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.OVERRIDE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.FROM,{name:q.FROM,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.OVERRIDE,node:Xe.OVERRIDE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.FROM])};$e.KEY_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.FIELDS,{name:q.FIELDS,typeNode:Xe.REQUIRED_FIELDSET_TYPE_NODE}],[q.RESOLVABLE,{name:q.RESOLVABLE,typeNode:(0,Ji.stringToNamedTypeNode)(q.BOOLEAN_SCALAR),defaultValue:{kind:$t.Kind.BOOLEAN,value:!0}}]]),isRepeatable:!0,locations:new Set([q.INTERFACE_UPPER,q.OBJECT_UPPER]),name:q.KEY,node:Xe.KEY_DEFINITION,optionalArgumentNames:new Set([q.RESOLVABLE]),requiredArgumentNames:new Set([q.FIELDS])};$e.LINK_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.URL_LOWER,{name:q.URL_LOWER,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.AS,{name:q.AS,typeNode:(0,Ji.stringToNamedTypeNode)(q.STRING_SCALAR)}],[q.FOR,{name:q.FOR,typeNode:(0,Ji.stringToNamedTypeNode)(q.LINK_PURPOSE)}],[q.IMPORT,{name:q.IMPORT,typeNode:{kind:$t.Kind.LIST_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.LINK_IMPORT)}}]]),isRepeatable:!0,locations:new Set([q.SCHEMA_UPPER]),name:q.LINK,node:Xe.LINK_DEFINITION,optionalArgumentNames:new Set([q.AS,q.FOR,q.IMPORT]),requiredArgumentNames:new Set([q.URL_LOWER])};$e.PROVIDES_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.FIELDS,{name:q.FIELDS,typeNode:Xe.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.PROVIDES,node:Xe.PROVIDES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.FIELDS])};$e.REQUIRES_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.FIELDS,{name:q.FIELDS,typeNode:Xe.REQUIRED_FIELDSET_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.REQUIRES,node:Xe.REQUIRES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.FIELDS])};$e.REDIS_PUBLISH_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.CHANNEL,{name:q.CHANNEL,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_REDIS_PUBLISH,node:Xe.EDFS_REDIS_PUBLISH_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.CHANNEL])};$e.REDIS_SUBSCRIBE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.CHANNELS,{name:q.CHANNELS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:Xe.REQUIRED_STRING_TYPE_NODE}}}],[q.PROVIDER_ID,{name:q.PROVIDER_ID,typeNode:Xe.REQUIRED_STRING_TYPE_NODE,defaultValue:{kind:$t.Kind.STRING,value:q.DEFAULT_EDFS_PROVIDER_ID}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.EDFS_REDIS_SUBSCRIBE,node:Xe.EDFS_REDIS_SUBSCRIBE_DEFINITION,optionalArgumentNames:new Set([q.PROVIDER_ID]),requiredArgumentNames:new Set([q.CHANNELS])};$e.REQUIRE_FETCH_REASONS_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!0,locations:new Set([q.FIELD_DEFINITION_UPPER,q.OBJECT_UPPER]),name:q.REQUIRE_FETCH_REASONS,node:Xe.REQUIRE_FETCH_REASONS_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.REQUIRES_SCOPES_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.SCOPES,{name:q.SCOPES,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.SCOPE_SCALAR)}}}}}}]]),isRepeatable:!1,locations:new Set([q.ENUM_UPPER,q.FIELD_DEFINITION_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER]),name:q.REQUIRES_SCOPES,node:Xe.REQUIRES_SCOPES_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.SCOPES])};$e.SEMANTIC_NON_NULL_DATA={argumentTypeNodeByArgumentName:new Map([[q.LEVELS,{name:q.LEVELS,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:{kind:$t.Kind.LIST_TYPE,type:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.INT_SCALAR)}}},defaultValue:{kind:$t.Kind.LIST,values:[{kind:$t.Kind.INT,value:"0"}]}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.SEMANTIC_NON_NULL,node:Xe.SEMANTIC_NON_NULL_DEFINITION,optionalArgumentNames:new Set([q.LEVELS]),requiredArgumentNames:new Set};$e.SPECIFIED_BY_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.URL_LOWER,{name:q.URL_LOWER,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!1,locations:new Set([q.SCALAR_UPPER]),name:q.SPECIFIED_BY,node:Xe.SPECIFIED_BY_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.URL_LOWER])};$e.SHAREABLE_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map,isRepeatable:!0,locations:new Set([q.FIELD_DEFINITION_UPPER,q.OBJECT_UPPER]),name:q.SHAREABLE,node:Xe.SHAREABLE_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set};$e.SUBSCRIPTION_FILTER_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.CONDITION,{name:q.CONDITION,typeNode:{kind:$t.Kind.NON_NULL_TYPE,type:(0,Ji.stringToNamedTypeNode)(q.SUBSCRIPTION_FILTER_CONDITION)}}]]),isRepeatable:!1,locations:new Set([q.FIELD_DEFINITION_UPPER]),name:q.SUBSCRIPTION_FILTER,node:Xe.SUBSCRIPTION_FILTER_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.CONDITION])};$e.TAG_DEFINITION_DATA={argumentTypeNodeByArgumentName:new Map([[q.NAME,{name:q.NAME,typeNode:Xe.REQUIRED_STRING_TYPE_NODE}]]),isRepeatable:!0,locations:new Set([q.ARGUMENT_DEFINITION_UPPER,q.ENUM_UPPER,q.ENUM_VALUE_UPPER,q.FIELD_DEFINITION_UPPER,q.INPUT_FIELD_DEFINITION_UPPER,q.INPUT_OBJECT_UPPER,q.INTERFACE_UPPER,q.OBJECT_UPPER,q.SCALAR_UPPER,q.UNION_UPPER]),name:q.TAG,node:Xe.TAG_DEFINITION,optionalArgumentNames:new Set,requiredArgumentNames:new Set([q.NAME])}});var Hp=w(Na=>{"use strict";m();T();N();Object.defineProperty(Na,"__esModule",{value:!0});Na.newFieldSetData=ole;Na.extractFieldSetValue=ule;Na.getNormalizedFieldSet=cle;Na.getInitialFieldCoordsPath=lle;Na.validateKeyFieldSets=dle;Na.getConditionalFieldSetDirectiveName=ple;Na.isNodeQuery=fle;Na.validateArgumentTemplateReferences=mle;Na.initializeDirectiveDefinitionDatas=Nle;var nr=Ae(),aV=Hr(),Rr=Mi(),sV=Ss(),QO=du(),an=$O(),At=vr(),Iu=Sr();function ole(){return{provides:new Map,requires:new Map}}function ule(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!==At.FIELDS||i.value.kind!==nr.Kind.STRING||t.set(e,i.value.value)}function cle(e){return(0,nr.print)((0,aV.lexicographicallySortDocumentNode)(e)).replaceAll(/\s+/g," ").slice(2,-2)}function lle(e,t){return e?[t]:[]}function dle(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[f,{documentNode:y,isUnresolvable:I,rawFieldSet:v}]of n){r&&(r.resolvable||(r.resolvable=!I)),d+=1;let F=[],k=[t],K=[],J=[],se=new Set,ie=-1,Te=!0,de="";if((0,nr.visit)(y,{Argument:{enter(Re){return F.push((0,Rr.unexpectedArgumentErrorMessage)(v,`${k[ie].name}.${de}`,Re.name.value)),nr.BREAK}},Field:{enter(Re){let xe=k[ie],tt=xe.name;if(Te){let bn=`${tt}.${de}`,Qt=xe.fieldDataByName.get(de);if(!Qt)return F.push((0,Rr.undefinedFieldInFieldSetErrorMessage)(v,bn,de)),nr.BREAK;let mn=(0,QO.getTypeNodeNamedTypeName)(Qt.node.type),Pr=e.parentDefinitionDataByTypeName.get(mn),Fr=Pr?Pr.kind:nr.Kind.SCALAR_TYPE_DEFINITION;return F.push((0,Rr.invalidSelectionSetErrorMessage)(v,[bn],mn,(0,Iu.kindToNodeType)(Fr))),nr.BREAK}let ee=Re.name.value,Se=`${tt}.${ee}`;de=ee;let _t=xe.fieldDataByName.get(ee);if(!_t)return F.push((0,Rr.undefinedFieldInFieldSetErrorMessage)(v,tt,ee)),nr.BREAK;if(_t.argumentDataByName.size)return F.push((0,Rr.argumentsInKeyFieldSetErrorMessage)(v,Se)),nr.BREAK;if(K[ie].has(ee))return F.push((0,Rr.duplicateFieldInFieldSetErrorMessage)(v,Se)),nr.BREAK;(0,Iu.getValueOrDefault)((0,Iu.getValueOrDefault)(e.keyFieldSetsByEntityTypeNameByFieldCoords,Se,()=>new Map),i,()=>new Set).add(f),J.push(ee),_t.isShareableBySubgraphName.set(e.subgraphName,!0),K[ie].add(ee),(0,Iu.getValueOrDefault)(e.keyFieldNamesByParentTypeName,tt,()=>new Set).add(ee);let en=(0,QO.getTypeNodeNamedTypeName)(_t.node.type);if(sV.BASE_SCALARS.has(en)){se.add(J.join(At.PERIOD)),J.pop();return}let tn=e.parentDefinitionDataByTypeName.get(en);if(!tn)return F.push((0,Rr.unknownTypeInFieldSetErrorMessage)(v,Se,en)),nr.BREAK;if(tn.kind===nr.Kind.OBJECT_TYPE_DEFINITION){Te=!0,k.push(tn);return}if((0,aV.isKindAbstract)(tn.kind))return F.push((0,Rr.abstractTypeInKeyFieldSetErrorMessage)(v,Se,en,(0,Iu.kindToNodeType)(tn.kind))),nr.BREAK;se.add(J.join(At.PERIOD)),J.pop()}},InlineFragment:{enter(){return F.push(Rr.inlineFragmentInFieldSetErrorMessage),nr.BREAK}},SelectionSet:{enter(){if(!Te){let Re=k[ie],tt=`${Re.name}.${de}`,ee=Re.fieldDataByName.get(de);if(!ee)return F.push((0,Rr.undefinedFieldInFieldSetErrorMessage)(v,tt,de)),nr.BREAK;let Se=(0,QO.getTypeNodeNamedTypeName)(ee.node.type),_t=e.parentDefinitionDataByTypeName.get(Se),en=_t?_t.kind:nr.Kind.SCALAR_TYPE_DEFINITION;return F.push((0,Rr.invalidSelectionSetDefinitionErrorMessage)(v,[tt],Se,(0,Iu.kindToNodeType)(en))),nr.BREAK}if(ie+=1,Te=!1,ie<0||ie>=k.length)return F.push((0,Rr.unparsableFieldSetSelectionErrorMessage)(v,de)),nr.BREAK;K.push(new Set)},leave(){if(Te){let xe=k[ie].name,tt=k[ie+1],ee=`${xe}.${de}`;F.push((0,Rr.invalidSelectionSetErrorMessage)(v,[ee],tt.name,(0,Iu.kindToNodeType)(tt.kind))),Te=!1}ie-=1,k.pop(),K.pop()}}}),F.length>0){e.errors.push((0,Rr.invalidDirectiveError)(At.KEY,i,(0,Iu.numberToOrdinal)(d),F));continue}a.push(x({fieldName:"",selectionSet:f},I?{disableEntityResolver:!0}:{})),l.satisfiedFieldSets.add(f),!I&&(c==null||c.addTargetSubgraphByFieldSet(f,e.subgraphName),o.push(se))}if(a.length>0)return a}function ple(e){return e?At.PROVIDES:At.REQUIRES}function fle(e,t){return e===At.QUERY||t===nr.OperationTypeNode.QUERY}function mle(e,t,n){let r=e.matchAll(sV.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,Rr.undefinedEventSubjectsArgumentErrorMessage)(o));for(let o of a)n.push((0,Rr.invalidEventSubjectsArgumentErrorMessage)(o))}function Nle(){return new Map([[At.AUTHENTICATED,an.AUTHENTICATED_DEFINITION_DATA],[At.COMPOSE_DIRECTIVE,an.COMPOSE_DIRECTIVE_DEFINITION_DATA],[At.CONFIGURE_DESCRIPTION,an.CONFIGURE_DESCRIPTION_DEFINITION_DATA],[At.CONFIGURE_CHILD_DESCRIPTIONS,an.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION_DATA],[At.DEPRECATED,an.DEPRECATED_DEFINITION_DATA],[At.EDFS_KAFKA_PUBLISH,an.KAFKA_PUBLISH_DEFINITION_DATA],[At.EDFS_KAFKA_SUBSCRIBE,an.KAFKA_SUBSCRIBE_DEFINITION_DATA],[At.EDFS_NATS_PUBLISH,an.NATS_PUBLISH_DEFINITION_DATA],[At.EDFS_NATS_REQUEST,an.NATS_REQUEST_DEFINITION_DATA],[At.EDFS_NATS_SUBSCRIBE,an.NATS_SUBSCRIBE_DEFINITION_DATA],[At.EDFS_REDIS_PUBLISH,an.REDIS_PUBLISH_DEFINITION_DATA],[At.EDFS_REDIS_SUBSCRIBE,an.REDIS_SUBSCRIBE_DEFINITION_DATA],[At.EXTENDS,an.EXTENDS_DEFINITION_DATA],[At.EXTERNAL,an.EXTERNAL_DEFINITION_DATA],[At.INACCESSIBLE,an.INACCESSIBLE_DEFINITION_DATA],[At.INTERFACE_OBJECT,an.INTERFACE_OBJECT_DEFINITION_DATA],[At.KEY,an.KEY_DEFINITION_DATA],[At.LINK,an.LINK_DEFINITION_DATA],[At.ONE_OF,an.ONE_OF_DEFINITION_DATA],[At.OVERRIDE,an.OVERRIDE_DEFINITION_DATA],[At.PROVIDES,an.PROVIDES_DEFINITION_DATA],[At.REQUIRE_FETCH_REASONS,an.REQUIRE_FETCH_REASONS_DEFINITION_DATA],[At.REQUIRES,an.REQUIRES_DEFINITION_DATA],[At.REQUIRES_SCOPES,an.REQUIRES_SCOPES_DEFINITION_DATA],[At.SEMANTIC_NON_NULL,an.SEMANTIC_NON_NULL_DATA],[At.SHAREABLE,an.SHAREABLE_DEFINITION_DATA],[At.SPECIFIED_BY,an.SPECIFIED_BY_DEFINITION_DATA],[At.SUBSCRIPTION_FILTER,an.SUBSCRIPTION_FILTER_DEFINITION_DATA],[At.TAG,an.TAG_DEFINITION_DATA]])}});var JO=w(YO=>{"use strict";m();T();N();Object.defineProperty(YO,"__esModule",{value:!0});YO.recordSubgraphName=Tle;function Tle(e,t,n){if(!t.has(e)){t.add(e);return}n.add(e)}});var zO=w(OE=>{"use strict";m();T();N();Object.defineProperty(OE,"__esModule",{value:!0});OE.Warning=void 0;var HO=class extends Error{constructor(n){super(n.message);_(this,"subgraph");this.name="Warning",this.subgraph=n.subgraph}};OE.Warning=HO});var zp=w(Ni=>{"use strict";m();T();N();Object.defineProperty(Ni,"__esModule",{value:!0});Ni.invalidOverrideTargetSubgraphNameWarning=Ele;Ni.externalInterfaceFieldsWarning=hle;Ni.nonExternalConditionalFieldWarning=yle;Ni.unimplementedInterfaceOutputTypeWarning=Ile;Ni.invalidExternalFieldWarning=gle;Ni.requiresDefinedOnNonEntityFieldWarning=_le;Ni.consumerInactiveThresholdInvalidValueWarning=vle;Ni.externalEntityExtensionKeyFieldWarning=Sle;Ni.fieldAlreadyProvidedWarning=Ole;Ni.singleSubgraphInputFieldOneOfWarning=Dle;Ni.singleFederatedInputFieldOneOfWarning=ble;var Ta=zO(),WO=vr();function Ele(e,t,n,r){return new Ta.Warning({message:`The Object type "${t}" defines the directive "@override(from: "${e}")" on the following field`+(n.length>1?"s":"")+': "'+n.join(WO.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 DE(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: @@ -445,16 +445,16 @@ The following field coordinates that form part of that field set are declared "@ "`+n.join(WO.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 Ole(e,t,n,r){return new Ta.Warning({message:DE(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 Dle({fieldName:e,subgraphName:t,typeName:n}){return new Ta.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 ble({fieldName:e,typeName:t}){return new Ta.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 ZO=w(AE=>{"use strict";m();T();N();Object.defineProperty(AE,"__esModule",{value:!0});AE.upsertDirectiveSchemaAndEntityDefinitions=Ple;AE.upsertParentsAndChildren=Fle;var jn=Ae(),gu=Mi(),gc=Ss(),bE=Jp(),Hl=Hr(),XO=Hp(),Ale=jp(),Ic=vl(),Wp=du(),Rle=zp(),Jn=vr(),fr=Sr();function Ple(e,t){(0,jn.visit)(t,{Directive:{enter(n){let r=n.name.value;if(Ale.EVENT_DIRECTIVE_NAMES.has(r)&&e.edfsDirectiveReferences.add(r),gc.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(r))return e.isSubgraphVersionTwo=!0,!1;if(gc.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(r))return!1;switch(r){case Jn.SUBSCRIPTION_FILTER:{e.directiveDefinitionByDirectiveName.set(Jn.SUBSCRIPTION_FILTER,gc.SUBSCRIPTION_FILTER_DEFINITION);break}case Jn.CONFIGURE_DESCRIPTION:{e.directiveDefinitionByDirectiveName.set(Jn.CONFIGURE_DESCRIPTION,gc.CONFIGURE_DESCRIPTION_DEFINITION);break}case Jn.CONFIGURE_CHILD_DESCRIPTIONS:{e.directiveDefinitionByDirectiveName.set(Jn.CONFIGURE_CHILD_DESCRIPTIONS,gc.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION);break}}e.referencedDirectiveNames.add(r)}},DirectiveDefinition:{enter(n){return e.addDirectiveDefinitionDataByNode(n)&&e.customDirectiveDefinitions.set(n.name.value,n),!1}},InterfaceTypeDefinition:{enter(n){let r=n.name.value;if(e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),!(0,Hl.isObjectLikeNodeEntity)(n))return;let i=(0,fr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,bE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,fr.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,Hl.isObjectLikeNodeEntity)(n))return;let i=(0,fr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,bE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,fr.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,Hl.isObjectLikeNodeEntity)(n))return;let r=n.name.value;(0,Hl.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,fr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,bE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r})}},ObjectTypeExtension:{enter(n){if(!(0,Hl.isObjectLikeNodeEntity)(n))return;let r=n.name.value,i=(0,fr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,bE.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,Wp.getTypeNodeNamedTypeName)(n.type);if(i)return(0,gu.duplicateOperationTypeDefinitionError)(r,a,(0,Wp.getTypeNodeNamedTypeName)(i.type)),!1;let o=e.operationTypeNodeByTypeName.get(a);return o?(e.errors.push((0,gu.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.directivesByDirectiveName)}},SchemaExtension:{enter(n){e.extractDirectives(n,e.schemaData.directivesByDirectiveName)}}})}function Fle(e,t){let n=!1,r;(0,jn.visit)(t,{EnumTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},EnumTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},EnumValueDefinition:{enter(i){let a=i.name.value;e.lastChildNodeKind=i.kind;let o=(0,fr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Jn.PARENT_DEFINITION_DATA);if(o.kind!==jn.Kind.ENUM_TYPE_DEFINITION){e.errors.push((0,gu.unexpectedParentKindForChildError)(e.originalParentTypeName,"Enum or Enum extension",(0,fr.kindToNodeType)(o.kind),a,(0,fr.kindToNodeType)(i.kind)));return}if(o.enumValueDataByValueName.has(a)){e.errors.push((0,gu.duplicateEnumValueDefinitionError)(e.originalParentTypeName,a));return}o.enumValueDataByValueName.set(a,{appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:e.extractDirectives(i,new Map),federatedCoords:`${e.originalParentTypeName}.${a}`,kind:jn.Kind.ENUM_VALUE_DEFINITION,name:a,node:(0,Wp.getMutableEnumValueNode)(i),parentTypeName:e.originalParentTypeName,persistedDirectivesData:(0,Ic.newPersistedDirectivesData)(),subgraphNames:new Set([e.subgraphName]),description:(0,Hl.formatDescription)(i.description)})},leave(){e.lastChildNodeKind=jn.Kind.NULL}},FieldDefinition:{enter(i){let a=i.name.value;if(n&&Jn.IGNORED_FIELDS.has(a))return!1;e.edfsDirectiveReferences.size>0&&e.validateSubscriptionFilterDirectiveLocation(i),e.lastChildNodeKind=i.kind;let o=(0,Wp.getTypeNodeNamedTypeName)(i.type);(0,fr.getValueOrDefault)(e.fieldCoordsByNamedTypeName,o,()=>new Set).add(`${e.renamedParentTypeName||e.originalParentTypeName}.${a}`),r&&!r.isAbstract&&e.internalGraph.addEdge(r,e.internalGraph.addOrUpdateNode(o),a),gc.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let c=(0,fr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Jn.PARENT_DEFINITION_DATA);if(!(0,Ic.isParentDataCompositeOutputType)(c)){e.errors.push((0,gu.unexpectedParentKindForChildError)(e.originalParentTypeName,'"Object" or "Interface"',(0,fr.kindToNodeType)(c.kind),a,(0,fr.kindToNodeType)(i.kind)));return}if(c.fieldDataByName.has(a)){e.errors.push((0,gu.duplicateFieldDefinitionError)((0,fr.kindToNodeType)(c.kind),c.name,a));return}let l=e.extractArguments(new Map,i),d=e.extractDirectives(i,new Map),f=new Set;(0,Ic.isInterfaceDefinitionData)(c)||(e.addInheritedDirectivesToFieldData(d,f),d.has(Jn.EXTERNAL)&&e.unvalidatedExternalFieldCoords.add(`${e.originalParentTypeName}.${a}`),(e.doesParentObjectRequireFetchReasons||d.has(Jn.REQUIRE_FETCH_REASONS))&&c.requireFetchReasonsFieldNames.add(a));let y=e.addFieldDataByNode(c.fieldDataByName,i,l,d,f);n&&e.extractEventDirectivesToConfiguration(i,l);let I=y.directivesByDirectiveName.get(Jn.PROVIDES),v=y.directivesByDirectiveName.get(Jn.REQUIRES);if(!v&&!I)return;let F=e.entityDataByTypeName.get(e.originalParentTypeName),k=(0,fr.getValueOrDefault)(e.fieldSetDataByTypeName,e.originalParentTypeName,XO.newFieldSetData);I&&(0,XO.extractFieldSetValue)(a,k.provides,I),v&&(F||e.warnings.push((0,Rle.requiresDefinedOnNonEntityFieldWarning)(`${e.originalParentTypeName}.${a}`,e.subgraphName)),(0,XO.extractFieldSetValue)(a,k.requires,v))},leave(){e.lastChildNodeKind=jn.Kind.NULL}},InputObjectTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i)},leave(){e.lastParentNodeKind=jn.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=jn.Kind.NULL}},InputValueDefinition:{enter(i){let a=i.name.value;if(e.lastParentNodeKind!==jn.Kind.INPUT_OBJECT_TYPE_DEFINITION&&e.lastParentNodeKind!==jn.Kind.INPUT_OBJECT_TYPE_EXTENSION){e.argumentName=a;return}e.lastChildNodeKind=i.kind;let o=(0,Wp.getTypeNodeNamedTypeName)(i.type);gc.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let c=(0,fr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Jn.PARENT_DEFINITION_DATA);if(c.kind!==jn.Kind.INPUT_OBJECT_TYPE_DEFINITION)return e.errors.push((0,gu.unexpectedParentKindForChildError)(e.originalParentTypeName,"input object or input object extension",(0,fr.kindToNodeType)(c.kind),a,(0,fr.kindToNodeType)(i.kind))),!1;if(c.inputValueDataByName.has(a)){e.errors.push((0,gu.duplicateInputFieldDefinitionError)(e.originalParentTypeName,a));return}e.addInputValueDataByNode({inputValueDataByName:c.inputValueDataByName,isArgument:!1,node:i,originalParentTypeName:e.originalParentTypeName})},leave(){e.argumentName="",e.lastChildNodeKind===jn.Kind.INPUT_VALUE_DEFINITION&&(e.lastChildNodeKind=jn.Kind.NULL)}},InterfaceTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},InterfaceTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},ObjectTypeDefinition:{enter(i){if(i.name.value===Jn.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,Ic.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,Ic.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=jn.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentObjectRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ObjectTypeExtension:{enter(i){if(i.name.value===Jn.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,Ic.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,Ic.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=jn.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentObjectRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ScalarTypeDefinition:{enter(i){if(i.name.value===Jn.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},ScalarTypeExtension:{enter(i){if(i.name.value===Jn.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},UnionTypeDefinition:{enter(i){i.name.value!==Jn.ENTITY_UNION&&e.upsertUnionByNode(i)}},UnionTypeExtension:{enter(i){if(i.name.value===Jn.ENTITY_UNION)return!1;e.upsertUnionByNode(i,!0)}}})}});var iD=w(Qa=>{"use strict";m();T();N();Object.defineProperty(Qa,"__esModule",{value:!0});Qa.EntityDataNode=Qa.RootNode=Qa.GraphNode=Qa.Edge=void 0;var RE=Sr(),eD=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}};Qa.Edge=eD;var tD=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,RE.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,RE.add)(n,r.node.nodeName)&&this.getAccessibleEntityNodeNames(r.node,n)}};Qa.GraphNode=tD;var nD=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}};Qa.RootNode=nD;var rD=class{constructor(t){_(this,"fieldSetsByTargetSubgraphName",new Map);_(this,"targetSubgraphNamesByFieldSet",new Map);_(this,"typeName");this.typeName=t}addTargetSubgraphByFieldSet(t,n){(0,RE.getValueOrDefault)(this.targetSubgraphNamesByFieldSet,t,()=>new Set).add(n),(0,RE.getValueOrDefault)(this.fieldSetsByTargetSubgraphName,n,()=>new Set).add(t)}};Qa.EntityDataNode=rD});var aD=w(Kn=>{"use strict";m();T();N();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.ROOT_TYPE_NAMES=Kn.QUOTATION_JOIN=Kn.NOT_APPLICABLE=Kn.LITERAL_SPACE=Kn.LITERAL_PERIOD=Kn.SUBSCRIPTION=Kn.QUERY=Kn.MUTATION=void 0;Kn.MUTATION="Mutation";Kn.QUERY="Query";Kn.SUBSCRIPTION="Subscription";Kn.LITERAL_PERIOD=".";Kn.LITERAL_SPACE=" ";Kn.NOT_APPLICABLE="N/A";Kn.QUOTATION_JOIN='", "';Kn.ROOT_TYPE_NAMES=new Set([Kn.MUTATION,Kn.QUERY,Kn.SUBSCRIPTION])});var cD=w(Ea=>{"use strict";m();T();N();Object.defineProperty(Ea,"__esModule",{value:!0});Ea.newRootFieldData=wle;Ea.generateResolvabilityErrorReasons=uD;Ea.generateSharedResolvabilityErrorReasons=oV;Ea.generateSelectionSetSegments=PE;Ea.renderSelectionSet=FE;Ea.generateRootResolvabilityErrors=Cle;Ea.generateEntityResolvabilityErrors=Ble;Ea.generateSharedEntityResolvabilityErrors=Ule;Ea.getMultipliedRelativeOriginPaths=kle;var sD=Mi(),oD=Sr(),Ya=aD();function wle(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(Ya.QUOTATION_JOIN)}".`,subgraphNames:n}}function Lle(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 Dle({fieldName:e,subgraphName:t,typeName:n}){return new Ta.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 ble({fieldName:e,typeName:t}){return new Ta.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 ZO=w(AE=>{"use strict";m();T();N();Object.defineProperty(AE,"__esModule",{value:!0});AE.upsertDirectiveSchemaAndEntityDefinitions=Ple;AE.upsertParentsAndChildren=Fle;var jn=Ae(),gu=Mi(),gc=Ss(),bE=Jp(),zl=Hr(),XO=Hp(),Ale=jp(),Ic=Sl(),Wp=du(),Rle=zp(),Jn=vr(),fr=Sr();function Ple(e,t){(0,jn.visit)(t,{Directive:{enter(n){let r=n.name.value;if(Ale.EVENT_DIRECTIVE_NAMES.has(r)&&e.edfsDirectiveReferences.add(r),gc.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(r))return e.isSubgraphVersionTwo=!0,!1;if(gc.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(r))return!1;switch(r){case Jn.SUBSCRIPTION_FILTER:{e.directiveDefinitionByDirectiveName.set(Jn.SUBSCRIPTION_FILTER,gc.SUBSCRIPTION_FILTER_DEFINITION);break}case Jn.CONFIGURE_DESCRIPTION:{e.directiveDefinitionByDirectiveName.set(Jn.CONFIGURE_DESCRIPTION,gc.CONFIGURE_DESCRIPTION_DEFINITION);break}case Jn.CONFIGURE_CHILD_DESCRIPTIONS:{e.directiveDefinitionByDirectiveName.set(Jn.CONFIGURE_CHILD_DESCRIPTIONS,gc.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION);break}}e.referencedDirectiveNames.add(r)}},DirectiveDefinition:{enter(n){return e.addDirectiveDefinitionDataByNode(n)&&e.customDirectiveDefinitions.set(n.name.value,n),!1}},InterfaceTypeDefinition:{enter(n){let r=n.name.value;if(e.internalGraph.addOrUpdateNode(r,{isAbstract:!0}),!(0,zl.isObjectLikeNodeEntity)(n))return;let i=(0,fr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,bE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,fr.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,zl.isObjectLikeNodeEntity)(n))return;let i=(0,fr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,bE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r}),(0,fr.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,zl.isObjectLikeNodeEntity)(n))return;let r=n.name.value;(0,zl.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,fr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,bE.upsertEntityData)({entityDataByTypeName:e.entityDataByTypeName,keyFieldSetDataByFieldSet:i,subgraphName:e.subgraphName,typeName:r})}},ObjectTypeExtension:{enter(n){if(!(0,zl.isObjectLikeNodeEntity)(n))return;let r=n.name.value,i=(0,fr.getValueOrDefault)(e.keyFieldSetDatasByTypeName,r,()=>new Map);e.extractKeyFieldSets(n,i),(0,bE.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,Wp.getTypeNodeNamedTypeName)(n.type);if(i)return(0,gu.duplicateOperationTypeDefinitionError)(r,a,(0,Wp.getTypeNodeNamedTypeName)(i.type)),!1;let o=e.operationTypeNodeByTypeName.get(a);return o?(e.errors.push((0,gu.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.directivesByDirectiveName)}},SchemaExtension:{enter(n){e.extractDirectives(n,e.schemaData.directivesByDirectiveName)}}})}function Fle(e,t){let n=!1,r;(0,jn.visit)(t,{EnumTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},EnumTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertEnumDataByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},EnumValueDefinition:{enter(i){let a=i.name.value;e.lastChildNodeKind=i.kind;let o=(0,fr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Jn.PARENT_DEFINITION_DATA);if(o.kind!==jn.Kind.ENUM_TYPE_DEFINITION){e.errors.push((0,gu.unexpectedParentKindForChildError)(e.originalParentTypeName,"Enum or Enum extension",(0,fr.kindToNodeType)(o.kind),a,(0,fr.kindToNodeType)(i.kind)));return}if(o.enumValueDataByValueName.has(a)){e.errors.push((0,gu.duplicateEnumValueDefinitionError)(e.originalParentTypeName,a));return}o.enumValueDataByValueName.set(a,{appearances:1,configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:e.extractDirectives(i,new Map),federatedCoords:`${e.originalParentTypeName}.${a}`,kind:jn.Kind.ENUM_VALUE_DEFINITION,name:a,node:(0,Wp.getMutableEnumValueNode)(i),parentTypeName:e.originalParentTypeName,persistedDirectivesData:(0,Ic.newPersistedDirectivesData)(),subgraphNames:new Set([e.subgraphName]),description:(0,zl.formatDescription)(i.description)})},leave(){e.lastChildNodeKind=jn.Kind.NULL}},FieldDefinition:{enter(i){let a=i.name.value;if(n&&Jn.IGNORED_FIELDS.has(a))return!1;e.edfsDirectiveReferences.size>0&&e.validateSubscriptionFilterDirectiveLocation(i),e.lastChildNodeKind=i.kind;let o=(0,Wp.getTypeNodeNamedTypeName)(i.type);(0,fr.getValueOrDefault)(e.fieldCoordsByNamedTypeName,o,()=>new Set).add(`${e.renamedParentTypeName||e.originalParentTypeName}.${a}`),r&&!r.isAbstract&&e.internalGraph.addEdge(r,e.internalGraph.addOrUpdateNode(o),a),gc.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let c=(0,fr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Jn.PARENT_DEFINITION_DATA);if(!(0,Ic.isParentDataCompositeOutputType)(c)){e.errors.push((0,gu.unexpectedParentKindForChildError)(e.originalParentTypeName,'"Object" or "Interface"',(0,fr.kindToNodeType)(c.kind),a,(0,fr.kindToNodeType)(i.kind)));return}if(c.fieldDataByName.has(a)){e.errors.push((0,gu.duplicateFieldDefinitionError)((0,fr.kindToNodeType)(c.kind),c.name,a));return}let l=e.extractArguments(new Map,i),d=e.extractDirectives(i,new Map),f=new Set;(0,Ic.isInterfaceDefinitionData)(c)||(e.addInheritedDirectivesToFieldData(d,f),d.has(Jn.EXTERNAL)&&e.unvalidatedExternalFieldCoords.add(`${e.originalParentTypeName}.${a}`),(e.doesParentObjectRequireFetchReasons||d.has(Jn.REQUIRE_FETCH_REASONS))&&c.requireFetchReasonsFieldNames.add(a));let y=e.addFieldDataByNode(c.fieldDataByName,i,l,d,f);n&&e.extractEventDirectivesToConfiguration(i,l);let I=y.directivesByDirectiveName.get(Jn.PROVIDES),v=y.directivesByDirectiveName.get(Jn.REQUIRES);if(!v&&!I)return;let F=e.entityDataByTypeName.get(e.originalParentTypeName),k=(0,fr.getValueOrDefault)(e.fieldSetDataByTypeName,e.originalParentTypeName,XO.newFieldSetData);I&&(0,XO.extractFieldSetValue)(a,k.provides,I),v&&(F||e.warnings.push((0,Rle.requiresDefinedOnNonEntityFieldWarning)(`${e.originalParentTypeName}.${a}`,e.subgraphName)),(0,XO.extractFieldSetValue)(a,k.requires,v))},leave(){e.lastChildNodeKind=jn.Kind.NULL}},InputObjectTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInputObjectByNode(i)},leave(){e.lastParentNodeKind=jn.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=jn.Kind.NULL}},InputValueDefinition:{enter(i){let a=i.name.value;if(e.lastParentNodeKind!==jn.Kind.INPUT_OBJECT_TYPE_DEFINITION&&e.lastParentNodeKind!==jn.Kind.INPUT_OBJECT_TYPE_EXTENSION){e.argumentName=a;return}e.lastChildNodeKind=i.kind;let o=(0,Wp.getTypeNodeNamedTypeName)(i.type);gc.BASE_SCALARS.has(o)||e.referencedTypeNames.add(o);let c=(0,fr.getOrThrowError)(e.parentDefinitionDataByTypeName,e.originalParentTypeName,Jn.PARENT_DEFINITION_DATA);if(c.kind!==jn.Kind.INPUT_OBJECT_TYPE_DEFINITION)return e.errors.push((0,gu.unexpectedParentKindForChildError)(e.originalParentTypeName,"input object or input object extension",(0,fr.kindToNodeType)(c.kind),a,(0,fr.kindToNodeType)(i.kind))),!1;if(c.inputValueDataByName.has(a)){e.errors.push((0,gu.duplicateInputFieldDefinitionError)(e.originalParentTypeName,a));return}e.addInputValueDataByNode({inputValueDataByName:c.inputValueDataByName,isArgument:!1,node:i,originalParentTypeName:e.originalParentTypeName})},leave(){e.argumentName="",e.lastChildNodeKind===jn.Kind.INPUT_VALUE_DEFINITION&&(e.lastChildNodeKind=jn.Kind.NULL)}},InterfaceTypeDefinition:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},InterfaceTypeExtension:{enter(i){e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertInterfaceDataByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},ObjectTypeDefinition:{enter(i){if(i.name.value===Jn.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,Ic.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,Ic.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=jn.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentObjectRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ObjectTypeExtension:{enter(i){if(i.name.value===Jn.SERVICE_OBJECT)return!1;e.originalParentTypeName=i.name.value,n=(0,Ic.isTypeNameRootType)(e.originalParentTypeName,e.operationTypeNodeByTypeName),e.renamedParentTypeName=(0,Ic.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=jn.Kind.NULL,e.isParentObjectExternal=!1,e.doesParentObjectRequireFetchReasons=!1,e.isParentObjectShareable=!1}},ScalarTypeDefinition:{enter(i){if(i.name.value===Jn.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},ScalarTypeExtension:{enter(i){if(i.name.value===Jn.ANY_SCALAR)return!1;e.originalParentTypeName=i.name.value,e.lastParentNodeKind=i.kind,e.upsertScalarByNode(i,!0)},leave(){e.originalParentTypeName="",e.lastParentNodeKind=jn.Kind.NULL}},UnionTypeDefinition:{enter(i){i.name.value!==Jn.ENTITY_UNION&&e.upsertUnionByNode(i)}},UnionTypeExtension:{enter(i){if(i.name.value===Jn.ENTITY_UNION)return!1;e.upsertUnionByNode(i,!0)}}})}});var iD=w(Qa=>{"use strict";m();T();N();Object.defineProperty(Qa,"__esModule",{value:!0});Qa.EntityDataNode=Qa.RootNode=Qa.GraphNode=Qa.Edge=void 0;var RE=Sr(),eD=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}};Qa.Edge=eD;var tD=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,RE.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,RE.add)(n,r.node.nodeName)&&this.getAccessibleEntityNodeNames(r.node,n)}};Qa.GraphNode=tD;var nD=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}};Qa.RootNode=nD;var rD=class{constructor(t){_(this,"fieldSetsByTargetSubgraphName",new Map);_(this,"targetSubgraphNamesByFieldSet",new Map);_(this,"typeName");this.typeName=t}addTargetSubgraphByFieldSet(t,n){(0,RE.getValueOrDefault)(this.targetSubgraphNamesByFieldSet,t,()=>new Set).add(n),(0,RE.getValueOrDefault)(this.fieldSetsByTargetSubgraphName,n,()=>new Set).add(t)}};Qa.EntityDataNode=rD});var aD=w(Kn=>{"use strict";m();T();N();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.ROOT_TYPE_NAMES=Kn.QUOTATION_JOIN=Kn.NOT_APPLICABLE=Kn.LITERAL_SPACE=Kn.LITERAL_PERIOD=Kn.SUBSCRIPTION=Kn.QUERY=Kn.MUTATION=void 0;Kn.MUTATION="Mutation";Kn.QUERY="Query";Kn.SUBSCRIPTION="Subscription";Kn.LITERAL_PERIOD=".";Kn.LITERAL_SPACE=" ";Kn.NOT_APPLICABLE="N/A";Kn.QUOTATION_JOIN='", "';Kn.ROOT_TYPE_NAMES=new Set([Kn.MUTATION,Kn.QUERY,Kn.SUBSCRIPTION])});var cD=w(Ea=>{"use strict";m();T();N();Object.defineProperty(Ea,"__esModule",{value:!0});Ea.newRootFieldData=wle;Ea.generateResolvabilityErrorReasons=uD;Ea.generateSharedResolvabilityErrorReasons=oV;Ea.generateSelectionSetSegments=PE;Ea.renderSelectionSet=FE;Ea.generateRootResolvabilityErrors=Cle;Ea.generateEntityResolvabilityErrors=Ble;Ea.generateSharedEntityResolvabilityErrors=Ule;Ea.getMultipliedRelativeOriginPaths=kle;var sD=Mi(),oD=Sr(),Ya=aD();function wle(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(Ya.QUOTATION_JOIN)}".`,subgraphNames:n}}function Lle(e,t){return e.isLeaf?e.name+` <-- `:e.name+` { <-- `+Ya.LITERAL_SPACE.repeat(t+3)+`... `+Ya.LITERAL_SPACE.repeat(t+2)+`} -`}function uD({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(Ya.QUOTATION_JOIN)}".`];if(e){let c=!1;for(let[l,d]of e.fieldSetsByTargetSubgraphName)if(a.has(l)){c=!0;for(let f of d)o.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" does not satisfy the key field set "${f}" 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 oV({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(Ya.QUOTATION_JOIN)}".`],c=!1;for(let[l,d]of e.fieldSetsByTargetSubgraphName){if(!a.has(l))continue;let f=e.subgraphNames.filter(I=>I!==l),y=f.length>1;c=!0;for(let I of d)o.push(`The entity ancestor "${e.typeName}" in subgraph${y?"s":""} "${f.join(Ya.QUOTATION_JOIN)}" do${y?"":"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(Ya.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==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 PE(e){let t=e.split(new RegExp("(?<=\\w)\\.")),n="",r="";for(let i=0;i1?"s":"")+`: "${[...a].join(Ya.QUOTATION_JOIN)}".`];if(e){let c=!1;for(let[l,d]of e.fieldSetsByTargetSubgraphName)if(a.has(l)){c=!0;for(let f of d)o.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" does not satisfy the key field set "${f}" 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 oV({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(Ya.QUOTATION_JOIN)}".`],c=!1;for(let[l,d]of e.fieldSetsByTargetSubgraphName){if(!a.has(l))continue;let f=e.subgraphNames.filter(I=>I!==l),y=f.length>1;c=!0;for(let I of d)o.push(`The entity ancestor "${e.typeName}" in subgraph${y?"s":""} "${f.join(Ya.QUOTATION_JOIN)}" do${y?"":"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(Ya.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 PE(e){let t=e.split(new RegExp("(?<=\\w)\\.")),n="",r="";for(let i=0;i{"use strict";m();T();N();Object.defineProperty(wE,"__esModule",{value:!0});wE.NodeResolutionData=void 0;var Mle=Mi(),_c,dD=class dD{constructor({fieldDataByName:t,isResolved:n=!1,resolvedDescendantNames:r,resolvedFieldNames:i,typeName:a}){eR(this,_c,!1);_(this,"fieldDataByName");_(this,"resolvedDescendantNames");_(this,"resolvedFieldNames");_(this,"typeName");By(this,_c,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,Mle.unexpectedEdgeFatalError)(this.typeName,[t]);this.resolvedFieldNames.add(t)}copy(){let t=new Map;for(let[n,r]of this.fieldDataByName)t.set(n,{isLeaf:r.isLeaf,name:r.name,namedTypeName:r.namedTypeName,subgraphNames:new Set(r.subgraphNames)});return new dD({fieldDataByName:this.fieldDataByName,isResolved:Cy(this,_c),resolvedDescendantNames:this.resolvedDescendantNames,resolvedFieldNames:this.resolvedFieldNames,typeName:this.typeName})}areDescendantsResolved(){return this.fieldDataByName.size===this.resolvedDescendantNames.size}isResolved(){if(Cy(this,_c))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 By(this,_c,!0),!0}};_c=new WeakMap;var lD=dD;wE.NodeResolutionData=lD});var cV=w(CE=>{"use strict";m();T();N();Object.defineProperty(CE,"__esModule",{value:!0});CE.EntityWalker=void 0;var xle=LE(),Ja=Sr(),pD=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,Ja.getValueOrDefault)(this.resDataByNodeName,n,()=>new xle.NodeResolutionData({fieldDataByName:t,typeName:r}));if(!this.relativeOriginPaths||this.relativeOriginPaths.size<1)return(0,Ja.getValueOrDefault)(this.resDataByRelativeOriginPath,i,()=>a.copy());let o;for(let c of this.relativeOriginPaths){let l=(0,Ja.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,Ja.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,Ja.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&&(i=d),this.propagateVisitedField({areDescendantsResolved:l,fieldName:a,data:r,nodeName:t.nodeName,selectionPath:n,visited:c})}return r.isResolved()?this.removeUnresolvablePaths({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,Ja.getValueOrDefault)(this.resDataByNodeName,i,()=>n.copy());if(n.addResolvedFieldName(r),c.addResolvedFieldName(r),t&&(n.resolvedDescendantNames.add(r),c.addResolvedFieldName(r)),this.relativeOriginPaths){for(let d of this.relativeOriginPaths){let f=(0,Ja.getValueOrDefault)(this.resDataByRelativeOriginPath,`${d}${a}`,()=>n.copy());f.addResolvedFieldName(r),t&&f.resolvedDescendantNames.add(r)}return}let l=(0,Ja.getValueOrDefault)(this.resDataByRelativeOriginPath,a,()=>n.copy());l.addResolvedFieldName(r),t&&l.resolvedDescendantNames.add(r)}addUnresolvablePaths({selectionPath:t,subgraphName:n}){if(!this.relativeOriginPaths){(0,Ja.getValueOrDefault)(this.subgraphNameByUnresolvablePath,t,()=>n);return}for(let r of this.relativeOriginPaths)(0,Ja.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)}}};CE.EntityWalker=pD});var lV=w(UE=>{"use strict";m();T();N();Object.defineProperty(UE,"__esModule",{value:!0});UE.RootFieldWalker=void 0;var Ha=Sr(),BE=LE(),fD=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,Ha.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.resDataByNodeName.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:((0,Ha.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,Ha.add)(t.visitedIndices,this.index)?(t.node.hasEntitySiblings&&(0,Ha.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,Ha.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new BE.NodeResolutionData(t));return(0,Ha.getValueOrDefault)(this.resDataByPath,n,()=>r.copy()),r}getSharedNodeResolutionData({node:t,selectionPath:n}){let r=(0,Ha.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new BE.NodeResolutionData(t));return(0,Ha.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,Ha.getValueOrDefault)(this.resDataByPath,a,()=>new BE.NodeResolutionData(i));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,Ha.getValueOrDefault)(this.resDataByNodeName,i.nodeName,()=>new BE.NodeResolutionData(i));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}}};UE.RootFieldWalker=fD});var ND=w(ME=>{"use strict";m();T();N();Object.defineProperty(ME,"__esModule",{value:!0});ME.Graph=void 0;var zl=iD(),Wl=cD(),Ti=Sr(),kE=aD(),qle=cV(),Vle=lV(),mD=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",kE.NOT_APPLICABLE);_(this,"resDataByNodeName",new Map);_(this,"resDataByRelativePathByEntity",new Map);_(this,"visitedEntitiesByOriginEntity",new Map);_(this,"walkerIndex",-1)}getRootNode(t){return(0,Ti.getValueOrDefault)(this.rootNodeByTypeName,t,()=>new zl.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 zl.GraphNode(this.subgraphName,t,n);return this.nodeByNodeName.set(r,a),(0,Ti.getValueOrDefault)(this.nodesByTypeName,t,()=>[]).push(a),a}addEdge(t,n,r,i=!1){if(t.isRootNode){let c=new zl.Edge(this.getNextEdgeId(),n,r);return(0,Ti.getValueOrDefault)(t.headToSharedTailEdges,r,()=>[]).push(c),c}let a=t,o=new zl.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 zl.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 zl.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 qle.EntityWalker({encounteredEntityNodeNames:t,index:this.getNextWalkerIndex(),relativeOriginPaths:r,resDataByNodeName:this.resDataByNodeName,resDataByRelativeOriginPath:i,subgraphNameByUnresolvablePath:a,visitedEntities:o}),f=c.getAllAccessibleEntityNodeNames();for(let y of l){if(y.nodeName!==c.nodeName&&!f.has(y.nodeName))continue;let{areDescendantsResolved:I}=d.visitEntityDescendantConcreteNode({node:y,selectionPath:""});if(I)return}for(let[y,I]of d.selectionPathByEntityNodeName)this.visitEntity({encounteredEntityNodeNames:t,entityNodeName:y,relativeOriginPaths:(0,Wl.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 f=r[0].node.nodeName;if(this.resolvedRootFieldNodeNames.has(f))continue;this.resolvedRootFieldNodeNames.add(f)}let a=new Vle.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,Ti.getOrThrowError)(t.fieldDataByName,n,"fieldDataByName"),l=(0,Wl.newRootFieldData)(t.typeName,n,c.subgraphNames);if(!o)return{errors:(0,Wl.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.split(t)[1],c=(0,Ti.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,Ti.getOrThrowError)(n,a,"resDataByRelativeOriginPath"),c=`${t}${a}`,l=(0,Ti.getOrThrowError)(i.resDataByPath,c,"rootFieldWalker.resDataByPath");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(a.size<1)continue;this.consolidateUnresolvableRootWithEntityPaths({pathFromRoot:r,resDataByRelativeOriginPath:o,subgraphNameByUnresolvablePath:a,walker:n}),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,Wl.generateRootResolvabilityErrors)({unresolvablePaths:n.unresolvablePaths,resDataByPath:n.resDataByPath,rootFieldData:t})),!(c.length<1))return{errors:c,success:!1}}return{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,Ti.getValueOrDefault)(this.resDataByRelativePathByEntity,i,()=>new Map);if(this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:i,resDataByRelativeOriginPath:c,subgraphNameByUnresolvablePath:o,visitedEntities:(0,Ti.getValueOrDefault)(this.visitedEntitiesByOriginEntity,i,()=>new Set)}),!(o.size<1))return{errors:this.getEntityResolvabilityErrors({entityNodeName:i,pathFromRoot:(r=(0,Ti.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,Ti.getOrThrowError)(this.resDataByRelativePathByEntity,t,"resDataByRelativePathByEntity"),o=t.split(kE.LITERAL_PERIOD)[1],{fieldSetsByTargetSubgraphName:c}=(0,Ti.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,Wl.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 f=d.split(kE.LITERAL_PERIOD);o!=null||(o=f[1]),c.push(f[0])}let{fieldSetsByTargetSubgraphName:l}=(0,Ti.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,Wl.generateSharedEntityResolvabilityErrors)({entityAncestors:{fieldSetsByTargetSubgraphName:l,subgraphNames:c,typeName:o},pathFromRoot:n,resDataByPath:i,rootFieldData:r,subgraphNameByUnresolvablePath:a})}};ME.Graph=mD});var TD=w(xE=>{"use strict";m();T();N();Object.defineProperty(xE,"__esModule",{value:!0});xE.newFieldSetConditionData=jle;xE.newConfigurationData=Kle;function jle({fieldCoordinatesPath:e,fieldPath:t}){return{fieldCoordinatesPath:e,fieldPath:t}}function Kle(e,t){return{fieldNames:new Set,isRootNode:e,typeName:t}}});var hD=w(vc=>{"use strict";m();T();N();Object.defineProperty(vc,"__esModule",{value:!0});vc.NormalizationFactory=void 0;vc.normalizeSubgraphFromString=Yle;vc.normalizeSubgraph=pV;vc.batchNormalize=Jle;var Z=Ae(),Dn=Hr(),ti=Hp(),qt=Ss(),ir=Jp(),le=Mi(),qE=jp(),Gle=Dv(),Ei=iE(),$le=JO(),Wa=zp(),dV=ZO(),za=Sp(),sn=vl(),rr=du(),ED=ND(),VE=Rv(),W=vr(),Qle=Il(),je=Sr(),Xp=TD();function Yle(e,t=!0){let{error:n,documentNode:r}=(0,Dn.safeParse)(e,t);return n||!r?{errors:[(0,le.subgraphInvalidSyntaxError)(n)],success:!1,warnings:[]}:new Zp(new ED.Graph).normalize(r)}function pV(e,t,n){return new Zp(n||new ED.Graph,t).normalize(e)}var Zp=class{constructor(t,n){_(this,"argumentName","");_(this,"authorizationDataByParentTypeName",new Map);_(this,"concreteTypeNamesByAbstractTypeName",new Map);_(this,"conditionalFieldDataByCoords",new Map);_(this,"configurationDataByTypeName",new Map);_(this,"customDirectiveDefinitions",new Map);_(this,"definedDirectiveNames",new Set);_(this,"directiveDefinitionByDirectiveName",new Map);_(this,"directiveDefinitionDataByDirectiveName",(0,ti.initializeDirectiveDefinitionDatas)());_(this,"doesParentObjectRequireFetchReasons",!1);_(this,"edfsDirectiveReferences",new Set);_(this,"errors",[]);_(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,"isCurrentParentExtension",!1);_(this,"isParentObjectExternal",!1);_(this,"isParentObjectShareable",!1);_(this,"isSubgraphEventDrivenGraph",!1);_(this,"isSubgraphVersionTwo",!1);_(this,"keyFieldSetDatasByTypeName",new Map);_(this,"lastParentNodeKind",Z.Kind.NULL);_(this,"lastChildNodeKind",Z.Kind.NULL);_(this,"parentTypeNamesWithAuthDirectives",new Set);_(this,"keyFieldSetDataByTypeName",new Map);_(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",[]);for(let[r,i]of qt.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME)this.directiveDefinitionByDirectiveName.set(r,i);this.subgraphName=n||W.NOT_APPLICABLE,this.internalGraph=t,this.internalGraph.setSubgraphName(this.subgraphName),this.schemaData={directivesByDirectiveName:new Map,kind:Z.Kind.SCHEMA_DEFINITION,name:W.SCHEMA,operationTypes:new Map}}validateArguments(t,n){for(let r of t.argumentDataByName.values()){let i=(0,rr.getTypeNodeNamedTypeName)(r.type);if(qt.BASE_SCALARS.has(i)){r.namedTypeKind=Z.Kind.SCALAR_TYPE_DEFINITION;continue}let a=this.parentDefinitionDataByTypeName.get(i);if(a){if((0,sn.isInputNodeKind)(a.kind)){r.namedTypeKind=a.kind;continue}this.errors.push((0,le.invalidNamedTypeError)({data:r,namedTypeData:a,nodeType:`${(0,je.kindToNodeType)(n)} field argument`}))}}}isTypeNameRootType(t){return W.ROOT_TYPE_NAMES.has(t)||this.operationTypeNodeByTypeName.has(t)}isArgumentValueValid(t,n){if(n.kind===Z.Kind.NULL)return t.kind!==Z.Kind.NON_NULL_TYPE;switch(t.kind){case Z.Kind.LIST_TYPE:{if(n.kind!==Z.Kind.LIST)return this.isArgumentValueValid((0,rr.getNamedTypeNode)(t.type),n);for(let r of n.values)if(!this.isArgumentValueValid(t.type,r))return!1;return!0}case Z.Kind.NAMED_TYPE:switch(t.name.value){case W.BOOLEAN_SCALAR:return n.kind===Z.Kind.BOOLEAN;case W.FLOAT_SCALAR:return n.kind===Z.Kind.FLOAT||n.kind===Z.Kind.INT;case W.ID_SCALAR:return n.kind===Z.Kind.STRING||n.kind===Z.Kind.INT;case W.INT_SCALAR:return n.kind===Z.Kind.INT;case W.FIELD_SET_SCALAR:case W.SCOPE_SCALAR:case W.STRING_SCALAR:return n.kind===Z.Kind.STRING;case W.LINK_IMPORT:return!0;case W.LINK_PURPOSE:return n.kind!==Z.Kind.ENUM?!1:n.value===W.SECURITY||n.value===W.EXECUTION;case W.SUBSCRIPTION_FIELD_CONDITION:case W.SUBSCRIPTION_FILTER_CONDITION:return n.kind===Z.Kind.OBJECT;default:{let r=this.parentDefinitionDataByTypeName.get(t.name.value);if(!r)return!1;if(r.kind===Z.Kind.SCALAR_TYPE_DEFINITION)return!0;if(r.kind===Z.Kind.ENUM_TYPE_DEFINITION){if(n.kind!==Z.Kind.ENUM)return!1;let i=r.enumValueDataByValueName.get(n.value);return i?!i.directivesByDirectiveName.has(W.INACCESSIBLE):!1}return r.kind!==Z.Kind.INPUT_OBJECT_TYPE_DEFINITION?!1:n.kind===Z.Kind.OBJECT}}default:return this.isArgumentValueValid(t.type,n)}}addInheritedDirectivesToFieldData(t,n){return this.isParentObjectExternal&&!t.has(W.EXTERNAL)&&(t.set(W.EXTERNAL,[(0,je.generateSimpleDirective)(W.EXTERNAL)]),n.add(W.EXTERNAL)),this.doesParentObjectRequireFetchReasons&&!t.has(W.REQUIRE_FETCH_REASONS)&&(t.set(W.REQUIRE_FETCH_REASONS,[(0,je.generateSimpleDirective)(W.REQUIRE_FETCH_REASONS)]),n.add(W.REQUIRE_FETCH_REASONS)),this.isParentObjectShareable&&!t.has(W.SHAREABLE)&&(t.set(W.SHAREABLE,[(0,je.generateSimpleDirective)(W.SHAREABLE)]),n.add(W.SHAREABLE)),t}extractDirectives(t,n){if(!t.directives)return n;for(let r of t.directives){let i=r.name.value;i===W.SHAREABLE?(0,je.getValueOrDefault)(n,i,()=>[r]):(0,je.getValueOrDefault)(n,i,()=>[]).push(r),(0,ir.isNodeKindObject)(t.kind)&&(this.isParentObjectExternal||(this.isParentObjectExternal=i===W.EXTERNAL),this.doesParentObjectRequireFetchReasons||(this.doesParentObjectRequireFetchReasons=i===W.REQUIRE_FETCH_REASONS),this.isParentObjectShareable||(this.isParentObjectShareable=i===W.SHAREABLE))}return n}validateDirective({data:t,definitionData:n,directiveCoords:r,directiveNode:i,errorMessages:a,requiredArgumentNames:o}){let c=i.name.value,l=t.kind===Z.Kind.FIELD_DEFINITION?t.renamedParentTypeName||t.originalParentTypeName:t.name,d=c===W.AUTHENTICATED,f=(0,sn.isFieldData)(t),y=c===W.OVERRIDE,I=c===W.REQUIRES_SCOPES,v=c===W.SEMANTIC_NON_NULL;if(!i.arguments||i.arguments.length<1)return n.requiredArgumentNames.size>0&&a.push((0,le.undefinedRequiredArgumentsErrorMessage)(c,o,[])),d&&this.handleAuthenticatedDirective(t,l),v&&f&&((0,sn.isTypeRequired)(t.type)?a.push((0,le.semanticNonNullLevelsNonNullErrorMessage)({typeString:(0,Ei.printTypeNode)(t.type),value:"0"})):t.nullLevelsBySubgraphName.set(this.subgraphName,new Set([0]))),a;let F=new Set,k=new Set,K=new Set,J=[];for(let Te of i.arguments){let de=Te.name.value;if(F.has(de)){k.add(de);continue}F.add(de);let Re=n.argumentTypeNodeByArgumentName.get(de);if(!Re){K.add(de);continue}if(!this.isArgumentValueValid(Re.typeNode,Te.value)){a.push((0,le.invalidArgumentValueErrorMessage)((0,Z.print)(Te.value),`@${c}`,de,(0,Ei.printTypeNode)(Re.typeNode)));continue}if(y&&f){this.handleOverrideDirective({data:t,directiveCoords:r,errorMessages:a,targetSubgraphName:Te.value.value});continue}if(v&&f){this.handleSemanticNonNullDirective({data:t,directiveNode:i,errorMessages:a});continue}!I||de!==W.SCOPES||this.extractRequiredScopes({directiveCoords:r,orScopes:Te.value.values,requiredScopes:J})}k.size>0&&a.push((0,le.duplicateDirectiveArgumentDefinitionsErrorMessage)([...k])),K.size>0&&a.push((0,le.unexpectedDirectiveArgumentErrorMessage)(c,[...K]));let se=(0,je.getEntriesNotInHashSet)(o,F);if(se.length>0&&a.push((0,le.undefinedRequiredArgumentsErrorMessage)(c,o,se)),a.length>0||!I)return a;let ie=(0,je.getValueOrDefault)(this.authorizationDataByParentTypeName,l,()=>(0,ir.newAuthorizationData)(l));if(t.kind!==Z.Kind.FIELD_DEFINITION)this.parentTypeNamesWithAuthDirectives.add(l),ie.requiredScopes.push(...J);else{let Te=(0,je.getValueOrDefault)(ie.fieldAuthDataByFieldName,t.name,()=>(0,ir.newFieldAuthorizationData)(t.name));Te.inheritedData.requiredScopes.push(...J),Te.originalData.requiredScopes.push(...J)}return a}validateDirectives(t,n){let r=new Set;for(let[i,a]of t.directivesByDirectiveName){let o=this.directiveDefinitionDataByDirectiveName.get(i);if(!o){r.has(i)||(this.errors.push((0,le.undefinedDirectiveError)(i,n)),r.add(i));continue}let c=[],l=(0,Dn.nodeKindToDirectiveLocation)(t.kind);if(o.locations.has(l)||c.push((0,le.invalidDirectiveLocationErrorMessage)(i,l)),a.length>1&&!o.isRepeatable){let f=(0,je.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);f.has(i)||(f.add(i),c.push((0,le.invalidRepeatedDirectiveErrorMessage)(i)))}let d=[...o.requiredArgumentNames];for(let f=0;f0&&this.errors.push((0,le.invalidDirectiveError)(i,n,(0,je.numberToOrdinal)(f+1),y))}}switch(t.kind){case Z.Kind.ENUM_TYPE_DEFINITION:{for(let[i,a]of t.enumValueDataByValueName)this.validateDirectives(a,`${t.name}.${i}`);return}case Z.Kind.FIELD_DEFINITION:{for(let[i,a]of t.argumentDataByName)this.validateDirectives(a,`${t.originalParentTypeName}.${t.name}(${i}: ...)`);return}case Z.Kind.INPUT_OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.inputValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case Z.Kind.INTERFACE_TYPE_DEFINITION:case Z.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?za.ExtensionType.REAL:r||!n.has(W.EXTENDS)?za.ExtensionType.NONE:za.ExtensionType.EXTENDS}setParentDataExtensionType(t,n){switch(t.extensionType){case za.ExtensionType.EXTENDS:case za.ExtensionType.NONE:{if(n===za.ExtensionType.REAL)return;this.errors.push((0,le.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 W.PROPAGATE:{if(o.value.kind!=Z.Kind.BOOLEAN)return;r.propagate=o.value.value;break}case W.DESCRIPTION_OVERRIDE:{if(o.value.kind!=Z.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.directivesByDirectiveName.get(W.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,le.duplicateImplementedInterfaceError)((0,ir.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.directivesByDirectiveName.has(W.KEY)),n.isInaccessible||(n.isInaccessible=n.directivesByDirectiveName.has(W.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,le.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,{argumentDataByArgumentName: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(!W.EXECUTABLE_DIRECTIVE_LOCATIONS.has(o)&&!qE.TYPE_SYSTEM_DIRECTIVE_LOCATIONS.has(o)){n.push((0,le.invalidDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}if(r.has(o)){n.push((0,le.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={argumentTypeNodeByArgumentName: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,sn.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,le.duplicateDirectiveDefinitionArgumentErrorMessage)([...c])),o}addDirectiveDefinitionDataByNode(t){let n=t.name.value;if(this.definedDirectiveNames.has(n))return this.errors.push((0,le.duplicateDirectiveDefinitionError)(n)),!1;if(this.definedDirectiveNames.add(n),this.directiveDefinitionByDirectiveName.set(n,t),qt.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(n))return this.isSubgraphVersionTwo=!0,!1;if(qt.ALL_IN_BUILT_DIRECTIVE_NAMES.has(n))return!1;let r=[],{argumentTypeNodeByArgumentName:i,optionalArgumentNames:a,requiredArgumentNames:o}=this.extractArgumentData(t.arguments,r);return this.directiveDefinitionDataByDirectiveName.set(n,{argumentTypeNodeByArgumentName:i,isRepeatable:t.repeatable,locations:this.extractDirectiveLocations(t,r),name:n,node:t,optionalArgumentNames:a,requiredArgumentNames:o}),r.length>0&&this.errors.push((0,le.invalidDirectiveDefinitionError)(n,r)),!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:f}=(0,sn.isNodeExternalOrShareable)(n,!this.isSubgraphVersionTwo,i),y=(0,rr.getTypeNodeNamedTypeName)(n.type),I={argumentDataByName:r,configureDescriptionDataBySubgraphName:new Map,externalFieldDataBySubgraphName:new Map([[this.subgraphName,(0,sn.newExternalFieldData)(d)]]),federatedCoords:`${c}.${o}`,inheritedDirectiveNames:a,isInaccessible:i.has(W.INACCESSIBLE),isShareableBySubgraphName:new Map([[this.subgraphName,f]]),kind:Z.Kind.FIELD_DEFINITION,name:o,namedTypeKind:qt.BASE_SCALARS.has(y)?Z.Kind.SCALAR_TYPE_DEFINITION:Z.Kind.NULL,namedTypeName:y,node:(0,rr.getMutableFieldNode)(n,l,this.errors),nullLevelsBySubgraphName:new Map,originalParentTypeName:this.originalParentTypeName,persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),renamedParentTypeName:c,subgraphNames:new Set([this.subgraphName]),type:(0,rr.getMutableTypeNode)(n.type,l,this.errors),directivesByDirectiveName:i,description:(0,Dn.formatDescription)(n.description)};return qt.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,sn.areDefaultValuesCompatible)(i.type,i.defaultValue)&&this.errors.push((0,le.incompatibleInputValueDefaultValueTypeError)((r?W.ARGUMENT:W.INPUT_FIELD)+` "${l}"`,d,(0,Ei.printTypeNode)(i.type),(0,Z.print)(i.defaultValue)));let f=r?`${c}${t?`.${t}`:""}(${l}: ...)`:`${c}.${l}`,y=(0,rr.getTypeNodeNamedTypeName)(i.type),I={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:this.extractDirectives(i,new Map),federatedCoords:f,fieldName:t,includeDefaultValue:!!i.defaultValue,isArgument:r,kind:r?Z.Kind.ARGUMENT:Z.Kind.INPUT_VALUE_DEFINITION,name:l,namedTypeKind:qt.BASE_SCALARS.has(y)?Z.Kind.SCALAR_TYPE_DEFINITION:Z.Kind.NULL,namedTypeName:y,node:(0,rr.getMutableInputValueNode)(i,a,this.errors),originalCoords:d,originalParentTypeName:a,persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),renamedParentTypeName:c,requiredSubgraphNames:new Set((0,sn.isTypeRequired)(i.type)?[this.subgraphName]:[]),subgraphNames:new Set([this.subgraphName]),type:(0,rr.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.directivesByDirectiveName)||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!==Z.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,o);return}let l={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:o,fieldDataByName:new Map,implementedInterfaceTypeNames:this.extractImplementedInterfaceTypeNames(t,new Set),isEntity:a.has(W.KEY),isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.INTERFACE_TYPE_DEFINITION,name:r,node:(0,rr.getMutableInterfaceNode)(t.name),persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),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 Z.OperationTypeNode.MUTATION:return W.MUTATION;case Z.OperationTypeNode.SUBSCRIPTION:return W.SUBSCRIPTION;default:return W.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 f;let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(f=i==null?void 0:i.directivesByDirectiveName)!=null?f:new Map),o=this.isTypeNameRootType(r),c=this.getNodeExtensionType(n,a,o);if(this.addInterfaceObjectFieldsByNode(t),i){if(i.kind!==Z.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,c),a.has(W.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(i.implementedInterfaceTypeNames,r);return}let l=this.extractImplementedInterfaceTypeNames(t,new Set);a.has(W.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(l,r);let d={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:c,fieldDataByName:new Map,implementedInterfaceTypeNames:l,isEntity:a.has(W.KEY),isInaccessible:a.has(W.INACCESSIBLE),isRootType:o,kind:Z.Kind.OBJECT_TYPE_DEFINITION,name:r,node:(0,rr.getMutableObjectNode)(t.name),persistedDirectivesData:(0,sn.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.ENUM_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(W.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,directivesByDirectiveName:a,extensionType:o,enumValueDataByValueName:new Map,isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.ENUM_TYPE_DEFINITION,name:r,node:(0,rr.getMutableEnumNode)(t.name),persistedDirectivesData:(0,sn.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.INPUT_OBJECT_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(W.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={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:o,inputValueDataByName:new Map,isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:r,node:(0,rr.getMutableInputObjectNode)(t.name),persistedDirectivesData:(0,sn.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)}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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.SCALAR_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.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,directivesByDirectiveName:a,extensionType:o,kind:Z.Kind.SCALAR_TYPE_DEFINITION,name:r,node:(0,rr.getMutableScalarNode)(t.name),persistedDirectivesData:(0,sn.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,le.duplicateUnionMemberDefinitionError)(r,a));continue}(0,je.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(a),qt.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(this.addConcreteTypeNamesForUnion(t),i){if(i.kind!==Z.Kind.UNION_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.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,directivesByDirectiveName:a,extensionType:o,kind:Z.Kind.UNION_TYPE_DEFINITION,memberByMemberTypeName:this.extractUnionMembers(t,new Map),name:r,node:(0,rr.getMutableUnionNode)(t.name),persistedDirectivesData:(0,sn.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,le.expectedEntityError)(r));return}let i=0;for(let o of t.directives){if(o.name.value!==W.KEY||(i+=1,!o.arguments||o.arguments.length<1))continue;let c,l=!1;for(let v of o.arguments){if(v.name.value===W.RESOLVABLE){v.value.kind===Z.Kind.BOOLEAN&&!v.value.value&&(l=!0);continue}if(v.name.value!==W.FIELDS){c=void 0;break}if(v.value.kind!==Z.Kind.STRING){c=void 0;break}c=v.value.value}if(c===void 0)continue;let{error:d,documentNode:f}=(0,Dn.safeParse)("{"+c+"}");if(d||!f){this.errors.push((0,le.invalidDirectiveError)(W.KEY,r,(0,je.numberToOrdinal)(i),[(0,le.unparsableFieldSetErrorMessage)(c,d)]));continue}let y=(0,ti.getNormalizedFieldSet)(f),I=n.get(y);I?I.isUnresolvable||(I.isUnresolvable=l):n.set(y,{documentNode:f,isUnresolvable:l,normalizedFieldSet:y,rawFieldSet:c})}}getFieldSetParent(t,n,r,i){if(!t)return{fieldSetParentData:n};let a=(0,je.getOrThrowError)(n.fieldDataByName,r,`${i}.fieldDataByFieldName`),o=(0,rr.getTypeNodeNamedTypeName)(a.node.type),c=this.parentDefinitionDataByTypeName.get(o);return c?c.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION&&c.kind!==Z.Kind.OBJECT_TYPE_DEFINITION?{errorString:(0,le.incompatibleTypeWithProvidesErrorMessage)(`${i}.${r}`,o)}:{fieldSetParentData:c}:{errorString:(0,le.unknownNamedTypeErrorMessage)(`${i}.${r}`,o)}}validateConditionalFieldSet(t,n,r,i,a){let{error:o,documentNode:c}=(0,Dn.safeParse)("{"+n+"}");if(o||!c)return{errorMessages:[(0,le.unparsableFieldSetErrorMessage)(n,o)]};let l=this,d=[t],f=(0,ti.getConditionalFieldSetDirectiveName)(i),y=[],I=`${a}.${r}`,v=(0,ti.getInitialFieldCoordsPath)(i,I),F=[r],k=new Set,K=[],J=-1,se=!0,ie=r,Te=!1;return(0,Z.visit)(c,{Argument:{enter(){return!1}},Field:{enter(de){let Re=d[J],xe=Re.name;if(Re.kind===Z.Kind.UNION_TYPE_DEFINITION)return K.push((0,le.invalidSelectionOnUnionErrorMessage)(n,v,xe)),Z.BREAK;let tt=de.name.value,ee=`${xe}.${tt}`;if(l.unvalidatedExternalFieldCoords.delete(ee),se)return K.push((0,le.invalidSelectionSetErrorMessage)(n,v,xe,(0,je.kindToNodeType)(Re.kind))),Z.BREAK;v.push(ee),F.push(tt),ie=tt;let Se=Re.fieldDataByName.get(tt);if(!Se)return K.push((0,le.undefinedFieldInFieldSetErrorMessage)(n,xe,tt)),Z.BREAK;if(y[J].has(tt))return K.push((0,le.duplicateFieldInFieldSetErrorMessage)(n,ee)),Z.BREAK;y[J].add(tt);let{isDefinedExternal:_t,isUnconditionallyProvided:en}=(0,je.getOrThrowError)(Se.externalFieldDataBySubgraphName,l.subgraphName,`${ee}.externalFieldDataBySubgraphName`),tn=_t&&!en;en||(Te=!0);let bn=(0,rr.getTypeNodeNamedTypeName)(Se.node.type),Qt=l.parentDefinitionDataByTypeName.get(bn);if(qt.BASE_SCALARS.has(bn)||(Qt==null?void 0:Qt.kind)===Z.Kind.SCALAR_TYPE_DEFINITION||(Qt==null?void 0:Qt.kind)===Z.Kind.ENUM_TYPE_DEFINITION){if(k.size<1&&!_t){if(l.isSubgraphVersionTwo){l.errors.push((0,le.nonExternalConditionalFieldError)(I,l.subgraphName,ee,n,f));return}l.warnings.push((0,Wa.nonExternalConditionalFieldWarning)(I,l.subgraphName,ee,n,f));return}if(k.size<1&&en){l.isSubgraphVersionTwo?K.push((0,le.fieldAlreadyProvidedErrorMessage)(ee,l.subgraphName,f)):l.warnings.push((0,Wa.fieldAlreadyProvidedWarning)(ee,f,I,l.subgraphName));return}if(!tn&&!i)return;let mn=(0,je.getValueOrDefault)(l.conditionalFieldDataByCoords,ee,sn.newConditionalFieldData),Pr=(0,Xp.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...F]});i?mn.providedBy.push(Pr):mn.requiredBy.push(Pr);return}if(!Qt)return K.push((0,le.unknownTypeInFieldSetErrorMessage)(n,ee,bn)),Z.BREAK;if(_t&&(i&&(0,je.getValueOrDefault)(l.conditionalFieldDataByCoords,ee,sn.newConditionalFieldData).providedBy.push((0,Xp.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...F]})),k.add(ee)),Qt.kind===Z.Kind.OBJECT_TYPE_DEFINITION||Qt.kind===Z.Kind.INTERFACE_TYPE_DEFINITION||Qt.kind===Z.Kind.UNION_TYPE_DEFINITION){se=!0,d.push(Qt);return}},leave(){k.delete(v.pop()||""),F.pop()}},InlineFragment:{enter(de){let Re=d[J],xe=Re.name,tt=v.length<1?t.name:v[v.length-1];if(!de.typeCondition)return K.push((0,le.inlineFragmentWithoutTypeConditionErrorMessage)(n,tt)),Z.BREAK;let ee=de.typeCondition.name.value;if(ee===xe){d.push(Re),se=!0;return}if(!(0,Dn.isKindAbstract)(Re.kind))return K.push((0,le.invalidInlineFragmentTypeErrorMessage)(n,v,ee,xe)),Z.BREAK;let Se=l.parentDefinitionDataByTypeName.get(ee);if(!Se)return K.push((0,le.unknownInlineFragmentTypeConditionErrorMessage)(n,v,xe,ee)),Z.BREAK;switch(se=!0,Se.kind){case Z.Kind.INTERFACE_TYPE_DEFINITION:{if(!Se.implementedInterfaceTypeNames.has(xe))break;d.push(Se);return}case Z.Kind.OBJECT_TYPE_DEFINITION:{let _t=l.concreteTypeNamesByAbstractTypeName.get(xe);if(!_t||!_t.has(ee))break;d.push(Se);return}case Z.Kind.UNION_TYPE_DEFINITION:{d.push(Se);return}default:return K.push((0,le.invalidInlineFragmentTypeConditionTypeErrorMessage)(n,v,xe,ee,(0,je.kindToNodeType)(Se.kind))),Z.BREAK}return K.push((0,le.invalidInlineFragmentTypeConditionErrorMessage)(n,v,ee,(0,je.kindToNodeType)(Re.kind),xe)),Z.BREAK}},SelectionSet:{enter(){if(!se){let de=d[J];if(de.kind===Z.Kind.UNION_TYPE_DEFINITION)return K.push((0,le.unparsableFieldSetSelectionErrorMessage)(n,ie)),Z.BREAK;let Re=de.fieldDataByName.get(ie);if(!Re)return K.push((0,le.undefinedFieldInFieldSetErrorMessage)(n,de.name,ie)),Z.BREAK;let xe=(0,rr.getTypeNodeNamedTypeName)(Re.node.type),tt=l.parentDefinitionDataByTypeName.get(xe),ee=tt?tt.kind:Z.Kind.SCALAR_TYPE_DEFINITION;return K.push((0,le.invalidSelectionSetDefinitionErrorMessage)(n,v,xe,(0,je.kindToNodeType)(ee))),Z.BREAK}if(J+=1,se=!1,J<0||J>=d.length)return K.push((0,le.unparsableFieldSetSelectionErrorMessage)(n,ie)),Z.BREAK;y.push(new Set)},leave(){if(se){let de=d[J+1];K.push((0,le.invalidSelectionSetErrorMessage)(n,v,de.name,(0,je.kindToNodeType)(de.kind))),se=!1}J-=1,d.pop(),y.pop()}}}),K.length>0||!Te?{errorMessages:K}:{configuration:{fieldName:r,selectionSet:(0,ti.getNormalizedFieldSet)(c)},errorMessages:K}}validateProvidesOrRequires(t,n,r){let i=[],a=[],o=(0,sn.getParentTypeName)(t);for(let[c,l]of n){let{fieldSetParentData:d,errorString:f}=this.getFieldSetParent(r,t,c,o),y=`${o}.${c}`;if(f){i.push(f);continue}if(!d)continue;let{errorMessages:I,configuration:v}=this.validateConditionalFieldSet(d,l,c,r,o);if(I.length>0){i.push(` On field "${y}": - -`+I.join(W.HYPHEN_JOIN));continue}v&&a.push(v)}if(i.length>0){this.errors.push((0,le.invalidProvidesOrRequiresDirectivesError)((0,ti.getConditionalFieldSetDirectiveName)(r),i));return}if(a.length>0)return a}validateInterfaceImplementations(t){if(t.implementedInterfaceTypeNames.size<1)return;let n=t.directivesByDirectiveName.has(W.INACCESSIBLE),r=new Map,i=new Map,a=!1;for(let o of t.implementedInterfaceTypeNames){let c=this.parentDefinitionDataByTypeName.get(o);if(qt.BASE_SCALARS.has(o)&&this.referencedTypeNames.add(o),!c)continue;if(c.kind!==Z.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[f,y]of c.fieldDataByName){this.unvalidatedExternalFieldCoords.delete(`${t.name}.${f}`);let I=!1,v=t.fieldDataByName.get(f);if(!v){d=!0,l.unimplementedFields.push(f);continue}let F={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,Ei.printTypeNode)(y.node.type),unimplementedArguments:new Set};(0,sn.isTypeValidImplementation)(y.node.type,v.node.type,this.concreteTypeNamesByAbstractTypeName)||(d=!0,I=!0,F.implementedResponseType=(0,Ei.printTypeNode)(v.node.type));let k=new Set;for(let[K,J]of y.argumentDataByName){k.add(K);let se=v.argumentDataByName.get(K);if(!se){d=!0,I=!0,F.unimplementedArguments.add(K);continue}let ie=(0,Ei.printTypeNode)(se.type),Te=(0,Ei.printTypeNode)(J.type);Te!==ie&&(d=!0,I=!0,F.invalidImplementedArguments.push({actualType:ie,argumentName:K,expectedType:Te}))}for(let[K,J]of v.argumentDataByName)k.has(K)||J.type.kind===Z.Kind.NON_NULL_TYPE&&(d=!0,I=!0,F.invalidAdditionalArguments.add(K));!n&&v.isInaccessible&&!y.isInaccessible&&(d=!0,I=!0,F.isInaccessible=!0),I&&l.invalidFieldImplementations.set(f,F)}d&&r.set(o,l)}i.size>0&&this.errors.push((0,le.invalidImplementedTypeError)(t.name,i)),a&&this.errors.push((0,le.selfImplementationError)(t.name)),r.size>0&&this.errors.push((0,le.invalidInterfaceImplementationError)(t.name,(0,je.kindToNodeType)(t.kind),r))}handleAuthenticatedDirective(t,n){let r=(0,je.getValueOrDefault)(this.authorizationDataByParentTypeName,n,()=>(0,ir.newAuthorizationData)(n));if(t.kind===Z.Kind.FIELD_DEFINITION){let i=(0,je.getValueOrDefault)(r.fieldAuthDataByFieldName,t.name,()=>(0,ir.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,le.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 y;let i=new Set,a=t.node.type,o=0;for(;a;)switch(a.kind){case Z.Kind.LIST_TYPE:{o+=1,a=a.type;break}case Z.Kind.NON_NULL_TYPE:{i.add(o),a=a.type;break}default:{a=null;break}}let c=(y=n.arguments)==null?void 0:y.find(I=>I.name.value===W.LEVELS);if(!c||c.value.kind!==Z.Kind.LIST){r.push(le.semanticNonNullArgumentErrorMessage);return}let l=c.value.values,d=(0,Ei.printTypeNode)(t.type),f=new Set;for(let{value:I}of l){let v=parseInt(I,10);if(Number.isNaN(v)){r.push((0,le.semanticNonNullLevelsNaNIndexErrorMessage)(I));continue}if(v<0||v>o){r.push((0,le.semanticNonNullLevelsIndexOutOfBoundsErrorMessage)({maxIndex:o,typeString:d,value:I}));continue}if(!i.has(v)){f.add(v);continue}r.push((0,le.semanticNonNullLevelsNonNullErrorMessage)({typeString:d,value:I}))}t.nullLevelsBySubgraphName.set(this.subgraphName,f)}extractRequiredScopes({directiveCoords:t,orScopes:n,requiredScopes:r}){if(n.length>qt.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,ir.addScopes)(r,a)}}getKafkaPublishConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.TOPIC:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push((0,le.invalidEventSubjectErrorMessage)(W.TOPIC));continue}(0,ti.validateArgumentTemplateReferences)(c.value.value,n,i),a.push(c.value.value);break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_KAFKA,topics:a,type:W.PUBLISH}}getKafkaSubscribeConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.TOPICS:{if(c.value.kind!==Z.Kind.LIST){i.push((0,le.invalidEventSubjectsErrorMessage)(W.TOPICS));continue}for(let l of c.value.values){if(l.kind!==Z.Kind.STRING||l.value.length<1){i.push((0,le.invalidEventSubjectsItemErrorMessage)(W.TOPICS));break}(0,ti.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_KAFKA,topics:a,type:W.SUBSCRIBE}}getNatsPublishAndRequestConfiguration(t,n,r,i,a){let o=[],c=W.DEFAULT_EDFS_PROVIDER_ID;for(let l of n.arguments||[])switch(l.name.value){case W.SUBJECT:{if(l.value.kind!==Z.Kind.STRING||l.value.value.length<1){a.push((0,le.invalidEventSubjectErrorMessage)(W.SUBJECT));continue}(0,ti.validateArgumentTemplateReferences)(l.value.value,r,a),o.push(l.value.value);break}case W.PROVIDER_ID:{if(l.value.kind!==Z.Kind.STRING||l.value.value.length<1){a.push(le.invalidEventProviderIdErrorMessage);continue}c=l.value.value;break}}if(!(a.length>0))return{fieldName:i,providerId:c,providerType:W.PROVIDER_TYPE_NATS,subjects:o,type:t}}getNatsSubscribeConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID,c=VE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,l="",d="";for(let f of t.arguments||[])switch(f.name.value){case W.SUBJECTS:{if(f.value.kind!==Z.Kind.LIST){i.push((0,le.invalidEventSubjectsErrorMessage)(W.SUBJECTS));continue}for(let y of f.value.values){if(y.kind!==Z.Kind.STRING||y.value.length<1){i.push((0,le.invalidEventSubjectsItemErrorMessage)(W.SUBJECTS));break}(0,ti.validateArgumentTemplateReferences)(y.value,n,i),a.push(y.value)}break}case W.PROVIDER_ID:{if(f.value.kind!==Z.Kind.STRING||f.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=f.value.value;break}case W.STREAM_CONFIGURATION:{if(this.usesEdfsNatsStreamConfiguration=!0,f.value.kind!==Z.Kind.OBJECT||f.value.fields.length<1){i.push(le.invalidNatsStreamInputErrorMessage);continue}let y=!0,I=new Set,v=new Set(qE.STREAM_CONFIGURATION_FIELD_NAMES),F=new Set([W.CONSUMER_NAME,W.STREAM_NAME]),k=new Set,K=new Set;for(let J of f.value.fields){let se=J.name.value;if(!qE.STREAM_CONFIGURATION_FIELD_NAMES.has(se)){I.add(se),y=!1;continue}if(v.has(se))v.delete(se);else{k.add(se),y=!1;continue}switch(F.has(se)&&F.delete(se),se){case W.CONSUMER_NAME:if(J.value.kind!=Z.Kind.STRING||J.value.value.length<1){K.add(se),y=!1;continue}l=J.value.value;break;case W.STREAM_NAME:if(J.value.kind!=Z.Kind.STRING||J.value.value.length<1){K.add(se),y=!1;continue}d=J.value.value;break;case W.CONSUMER_INACTIVE_THRESHOLD:if(J.value.kind!=Z.Kind.INT){i.push((0,le.invalidArgumentValueErrorMessage)((0,Z.print)(J.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",W.INT_SCALAR)),y=!1;continue}try{c=parseInt(J.value.value,10)}catch(ie){i.push((0,le.invalidArgumentValueErrorMessage)((0,Z.print)(J.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",W.INT_SCALAR)),y=!1}break}}(!y||F.size>0)&&i.push((0,le.invalidNatsStreamInputFieldsErrorMessage)([...F],[...k],[...K],[...I]))}}if(!(i.length>0))return c<0?(c=VE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,this.warnings.push((0,Wa.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,`The value has been set to ${VE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}.`))):c>Qle.MAX_INT32&&(c=0,this.warnings.push((0,Wa.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,"The value has been set to 0. This means the consumer will remain indefinitely active until its manual deletion."))),x({fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_NATS,subjects:a,type:W.SUBSCRIBE},l&&d?{streamConfiguration:{consumerInactiveThreshold:c,consumerName:l,streamName:d}}:{})}getRedisPublishConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.CHANNEL:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push((0,le.invalidEventSubjectErrorMessage)(W.CHANNEL));continue}(0,ti.validateArgumentTemplateReferences)(c.value.value,n,i),a.push(c.value.value);break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_REDIS,channels:a,type:W.PUBLISH}}getRedisSubscribeConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.CHANNELS:{if(c.value.kind!==Z.Kind.LIST){i.push((0,le.invalidEventSubjectsErrorMessage)(W.CHANNELS));continue}for(let l of c.value.values){if(l.kind!==Z.Kind.STRING||l.value.length<1){i.push((0,le.invalidEventSubjectsItemErrorMessage)(W.CHANNELS));break}(0,ti.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_REDIS,channels:a,type:W.SUBSCRIBE}}validateSubscriptionFilterDirectiveLocation(t){if(!t.directives)return;let n=this.renamedParentTypeName||this.originalParentTypeName,r=`${n}.${t.name.value}`,i=this.getOperationTypeNodeForRootTypeName(n)===Z.OperationTypeNode.SUBSCRIPTION;for(let a of t.directives)if(a.name.value===W.SUBSCRIPTION_FILTER&&!i){this.errors.push((0,le.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 W.EDFS_KAFKA_PUBLISH:c=this.getKafkaPublishConfiguration(a,n,r,o);break;case W.EDFS_KAFKA_SUBSCRIBE:c=this.getKafkaSubscribeConfiguration(a,n,r,o);break;case W.EDFS_NATS_PUBLISH:{c=this.getNatsPublishAndRequestConfiguration(W.PUBLISH,a,n,r,o);break}case W.EDFS_NATS_REQUEST:{c=this.getNatsPublishAndRequestConfiguration(W.REQUEST,a,n,r,o);break}case W.EDFS_NATS_SUBSCRIBE:{c=this.getNatsSubscribeConfiguration(a,n,r,o);break}case W.EDFS_REDIS_PUBLISH:{c=this.getRedisPublishConfiguration(a,n,r,o);break}case W.EDFS_REDIS_SUBSCRIBE:{c=this.getRedisSubscribeConfiguration(a,n,r,o);break}default:continue}if(o.length>0){this.errors.push((0,le.invalidEventDirectiveError)(a.name.value,i,o));continue}c&&(0,je.getValueOrDefault)(this.eventsConfigurations,this.renamedParentTypeName||this.originalParentTypeName,()=>[]).push(c)}}getValidEventsDirectiveNamesForOperationTypeNode(t){switch(t){case Z.OperationTypeNode.MUTATION:return new Set([W.EDFS_KAFKA_PUBLISH,W.EDFS_NATS_PUBLISH,W.EDFS_NATS_REQUEST,W.EDFS_REDIS_PUBLISH]);case Z.OperationTypeNode.QUERY:return new Set([W.EDFS_NATS_REQUEST]);case Z.OperationTypeNode.SUBSCRIPTION:return new Set([W.EDFS_KAFKA_SUBSCRIBE,W.EDFS_NATS_SUBSCRIBE,W.EDFS_REDIS_SUBSCRIBE])}}getOperationTypeNodeForRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(n)return n;switch(t){case W.MUTATION:return Z.OperationTypeNode.MUTATION;case W.QUERY:return Z.OperationTypeNode.QUERY;case W.SUBSCRIPTION:return Z.OperationTypeNode.SUBSCRIPTION;default:return}}validateEventDrivenRootType(t,n,r,i){let a=this.getOperationTypeNodeForRootTypeName(t.name);if(!a){this.errors.push((0,le.invalidRootTypeError)(t.name));return}let o=this.getValidEventsDirectiveNamesForOperationTypeNode(a);for(let[c,l]of t.fieldDataByName){let d=`${l.originalParentTypeName}.${c}`,f=new Set;for(let K of qE.EVENT_DIRECTIVE_NAMES)l.directivesByDirectiveName.has(K)&&f.add(K);let y=new Set;for(let K of f)o.has(K)||y.add(K);if((f.size<1||y.size>0)&&n.set(d,{definesDirectives:f.size>0,invalidDirectiveNames:[...y]}),a===Z.OperationTypeNode.MUTATION){let K=(0,Ei.printTypeNode)(l.type);K!==W.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT&&i.set(d,K);continue}let I=(0,Ei.printTypeNode)(l.type),v=l.namedTypeName+"!",F=!1,k=this.concreteTypeNamesByAbstractTypeName.get(l.namedTypeName)||new Set([l.namedTypeName]);for(let K of k)if(F||(F=this.entityDataByTypeName.has(K)),F)break;(!F||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(W.EDFS_PUBLISH_RESULT);if(!t)return!0;if(t.kind!==Z.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size!=1)return!1;for(let[n,r]of t.fieldDataByName)if(r.argumentDataByName.size>0||n!==W.SUCCESS||(0,Ei.printTypeNode)(r.type)!==W.NON_NULLABLE_BOOLEAN)return!1;return!0}isNatsStreamConfigurationInputObjectValid(t){if(t.kind!==Z.Kind.INPUT_OBJECT_TYPE_DEFINITION||t.inputValueDataByName.size!=3)return!1;for(let[n,r]of t.inputValueDataByName)switch(n){case W.CONSUMER_INACTIVE_THRESHOLD:{if((0,Ei.printTypeNode)(r.type)!==W.NON_NULLABLE_INT||!r.defaultValue||r.defaultValue.kind!==Z.Kind.INT||r.defaultValue.value!==`${VE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}`)return!1;break}case W.CONSUMER_NAME:case W.STREAM_NAME:{if((0,Ei.printTypeNode)(r.type)!==W.NON_NULLABLE_STRING)return!1;break}default:return!1}return!0}validateEventDrivenSubgraph(t){let n=[],r=new Map,i=new Map,a=new Map,o=new Map,c=new Map,l=new Map,d=new Set,f=new Set;for(let[y,I]of this.parentDefinitionDataByTypeName){if(y===W.EDFS_PUBLISH_RESULT||y===W.EDFS_NATS_STREAM_CONFIGURATION||I.kind!==Z.Kind.OBJECT_TYPE_DEFINITION)continue;if(I.isRootType){this.validateEventDrivenRootType(I,r,i,a);continue}let v=this.keyFieldNamesByParentTypeName.get(y);if(!v){f.add(y);continue}this.validateEventDrivenKeyDefinition(y,o),this.validateEventDrivenObjectFields(I.fieldDataByName,v,c,l)}if(this.isEdfsPublishResultValid()||n.push(le.invalidEdfsPublishResultObjectErrorMessage),this.edfsDirectiveReferences.has(W.EDFS_NATS_SUBSCRIBE)){let y=this.parentDefinitionDataByTypeName.get(W.EDFS_NATS_STREAM_CONFIGURATION);y&&this.usesEdfsNatsStreamConfiguration&&!this.isNatsStreamConfigurationInputObjectValid(y)&&n.push(le.invalidNatsStreamConfigurationDefinitionErrorMessage),this.parentDefinitionDataByTypeName.delete(W.EDFS_NATS_STREAM_CONFIGURATION),t.push(qt.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION)}r.size>0&&n.push((0,le.invalidRootTypeFieldEventsDirectivesErrorMessage)(r)),a.size>0&&n.push((0,le.invalidEventDrivenMutationResponseTypeErrorMessage)(a)),i.size>0&&n.push((0,le.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage)(i)),o.size>0&&n.push((0,le.invalidKeyFieldSetsEventDrivenErrorMessage)(o)),c.size>0&&n.push((0,le.nonExternalKeyFieldNamesEventDrivenErrorMessage)(c)),l.size>0&&n.push((0,le.nonKeyFieldNamesEventDrivenErrorMessage)(l)),d.size>0&&n.push((0,le.nonEntityObjectExtensionsEventDrivenErrorMessage)([...d])),f.size>0&&n.push((0,le.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage)([...f])),n.length>0&&this.errors.push((0,le.invalidEventDrivenGraphError)(n))}validateUnionMembers(t){if(t.memberByMemberTypeName.size<1){this.errors.push((0,le.noDefinedUnionMembersError)(t.name));return}let n=[];for(let r of t.memberByMemberTypeName.keys()){let i=this.parentDefinitionDataByTypeName.get(r);i&&i.kind!==Z.Kind.OBJECT_TYPE_DEFINITION&&n.push(`"${r}", which is type "${(0,je.kindToNodeType)(i.kind)}"`)}n.length>0&&this.errors.push((0,le.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!==Z.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,le.undefinedCompositeOutputTypeError)(t));continue}let i=(0,sn.getParentTypeName)(r),a=(0,je.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Xp.newConfigurationData)(!0,i)),o=(0,ti.validateKeyFieldSets)(this,r,n);o&&(a.keys=o)}}getValidFlattenedDirectiveArray(t,n,r=!1){let i=[];for(let[a,o]of t){if(r&&W.INHERITABLE_DIRECTIVE_NAMES.has(a))continue;let c=this.directiveDefinitionDataByDirectiveName.get(a);if(!c)continue;if(!c.isRepeatable&&o.length>1){let f=(0,je.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);f.has(a)||(f.add(a),this.errors.push((0,le.invalidDirectiveError)(a,n,"1st",[(0,le.invalidRepeatedDirectiveErrorMessage)(a)])));continue}if(a!==W.KEY){i.push(...o);continue}let l=[],d=new Set;for(let f=0;fnew Set).add(k)),(0,je.getValueOrDefault)(a.keyFieldNamesByParentTypeName,v,()=>new Set).add(F);let se=(0,rr.getTypeNodeNamedTypeName)(K.node.type);if(qt.BASE_SCALARS.has(se))return;let ie=a.parentDefinitionDataByTypeName.get(se);if(!ie)return Z.BREAK;if(ie.kind===Z.Kind.OBJECT_TYPE_DEFINITION){f=!0,c.push(ie);return}if((0,Dn.isKindAbstract)(ie.kind))return Z.BREAK}},InlineFragment:{enter(){return Z.BREAK}},SelectionSet:{enter(){if(!f||(d+=1,f=!1,d<0||d>=c.length))return Z.BREAK},leave(){f&&(f=!1),d-=1,c.pop()}}}),!(l.size<1))for(let[y,I]of l)this.warnings.push((0,Wa.externalEntityExtensionKeyFieldWarning)(i.name,y,[...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!==Z.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,le.undefinedCompositeOutputTypeError)(t));continue}let i=(0,sn.getParentTypeName)(r),a=(0,je.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Xp.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.directivesByDirectiveName.has(W.ONE_OF)?n.size>0?(this.errors.push((0,le.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(n),typeName:t.name})),!1):(t.inputValueDataByName.size===1&&this.warnings.push((0,Wa.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 a;(0,dV.upsertDirectiveSchemaAndEntityDefinitions)(this,t),(0,dV.upsertParentsAndChildren)(this,t),this.validateDirectives(this.schemaData,W.SCHEMA);for(let[o,c]of this.parentDefinitionDataByTypeName)this.validateDirectives(c,o);this.invalidORScopesCoords.size>0&&this.errors.push((0,le.orScopesLimitError)(qt.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));let n=[];for(let o of qt.BASE_DIRECTIVE_DEFINITIONS)n.push(o);if(n.push(qt.FIELD_SET_SCALAR_DEFINITION),this.isSubgraphVersionTwo){for(let o of qt.VERSION_TWO_DIRECTIVE_DEFINITIONS)n.push(o),this.directiveDefinitionByDirectiveName.set(o.name.value,o);n.push(qt.SCOPE_SCALAR_DEFINITION)}for(let o of this.edfsDirectiveReferences){let c=qt.EVENT_DRIVEN_DIRECTIVE_DEFINITIONS_BY_DIRECTIVE_NAME.get(o);if(!c){this.errors.push((0,le.invalidEdfsDirectiveName)(o));continue}n.push(c)}this.edfsDirectiveReferences.size>0&&this.referencedDirectiveNames.has(W.SUBSCRIPTION_FILTER)&&(n.push(qt.SUBSCRIPTION_FILTER_DEFINITION),n.push(qt.SUBSCRIPTION_FILTER_CONDITION_DEFINITION),n.push(qt.SUBSCRIPTION_FIELD_CONDITION_DEFINITION),n.push(qt.SUBSCRIPTION_FILTER_VALUE_DEFINITION)),this.referencedDirectiveNames.has(W.CONFIGURE_DESCRIPTION)&&n.push(qt.CONFIGURE_DESCRIPTION_DEFINITION),this.referencedDirectiveNames.has(W.CONFIGURE_CHILD_DESCRIPTIONS)&&n.push(qt.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION),this.referencedDirectiveNames.has(W.LINK)&&(n.push(qt.LINK_DEFINITION),n.push(qt.LINK_IMPORT_DEFINITION),n.push(qt.LINK_PURPOSE_DEFINITION)),this.referencedDirectiveNames.has(W.ONE_OF)&&n.push(qt.ONE_OF_DEFINITION),this.referencedDirectiveNames.has(W.REQUIRE_FETCH_REASONS)&&n.push(qt.REQUIRE_FETCH_REASONS_DEFINITION),this.referencedDirectiveNames.has(W.SEMANTIC_NON_NULL)&&n.push(qt.SEMANTIC_NON_NULL_DEFINITION);for(let o of this.customDirectiveDefinitions.values())n.push(o);this.schemaData.operationTypes.size>0&&n.push(this.getSchemaNodeByData(this.schemaData));for(let o of this.invalidConfigureDescriptionNodeDatas)o.description||this.errors.push((0,le.configureDescriptionNoDescriptionError)((0,je.kindToNodeType)(o.kind),o.name));this.evaluateExternalKeyFields();for(let[o,c]of this.parentDefinitionDataByTypeName)switch(c.kind){case Z.Kind.ENUM_TYPE_DEFINITION:{if(c.enumValueDataByValueName.size<1){this.errors.push((0,le.noDefinedEnumValuesError)(o));break}n.push(this.getEnumNodeByData(c));break}case Z.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(c.inputValueDataByName.size<1){this.errors.push((0,le.noInputValueDefinitionsError)(o));break}let l=new Set;for(let d of c.inputValueDataByName.values()){if((0,sn.isTypeRequired)(d.type)&&l.add(d.name),d.namedTypeKind!==Z.Kind.NULL)continue;let f=this.parentDefinitionDataByTypeName.get(d.namedTypeName);if(f){if(!(0,sn.isInputNodeKind)(f.kind)){this.errors.push((0,le.invalidNamedTypeError)({data:d,namedTypeData:f,nodeType:`${(0,je.kindToNodeType)(c.kind)} field`}));continue}d.namedTypeKind=f.kind}}if(!this.validateOneOfDirective({data:c,requiredFieldNames:l}))break;n.push(this.getInputObjectNodeByData(c));break}case Z.Kind.INTERFACE_TYPE_DEFINITION:case Z.Kind.OBJECT_TYPE_DEFINITION:{let l=this.entityDataByTypeName.has(o),d=this.operationTypeNodeByTypeName.get(o),f=c.kind===Z.Kind.OBJECT_TYPE_DEFINITION;this.isSubgraphVersionTwo&&c.extensionType===za.ExtensionType.EXTENDS&&(c.extensionType=za.ExtensionType.NONE),d&&(c.fieldDataByName.delete(W.SERVICE_FIELD),c.fieldDataByName.delete(W.ENTITIES_FIELD));let y=[];for(let[K,J]of c.fieldDataByName){if(!f&&((a=J.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&a.isDefinedExternal)&&y.push(K),this.validateArguments(J,c.kind),J.namedTypeKind!==Z.Kind.NULL)continue;let se=this.parentDefinitionDataByTypeName.get(J.namedTypeName);if(se){if(!(0,sn.isOutputNodeKind)(se.kind)){this.errors.push((0,le.invalidNamedTypeError)({data:J,namedTypeData:se,nodeType:`${(0,je.kindToNodeType)(c.kind)} field`}));continue}J.namedTypeKind=this.entityInterfaceDataByTypeName.get(se.name)?Z.Kind.INTERFACE_TYPE_DEFINITION:se.kind}}y.length>0&&(this.isSubgraphVersionTwo?this.errors.push((0,le.externalInterfaceFieldsError)(o,y)):this.warnings.push((0,Wa.externalInterfaceFieldsWarning)(this.subgraphName,o,y)));let I=(0,sn.getParentTypeName)(c),v=(0,je.getValueOrDefault)(this.configurationDataByTypeName,I,()=>(0,Xp.newConfigurationData)(l,o)),F=this.entityInterfaceDataByTypeName.get(o);if(F){F.fieldDatas=(0,ir.fieldDatasToSimpleFieldDatas)(c.fieldDataByName.values());let K=this.concreteTypeNamesByAbstractTypeName.get(o);K&&(0,je.addIterableValuesToSet)(K,F.concreteTypeNames),v.isInterfaceObject=F.isInterfaceObject,v.entityInterfaceConcreteTypeNames=F.concreteTypeNames}let k=this.eventsConfigurations.get(I);k&&(v.events=k),this.addFieldNamesToConfigurationData(c.fieldDataByName,v),this.validateInterfaceImplementations(c),n.push(this.getCompositeOutputNodeByData(c)),c.fieldDataByName.size<1&&!(0,ti.isNodeQuery)(o,d)&&this.errors.push((0,le.noFieldDefinitionsError)((0,je.kindToNodeType)(c.kind),o)),f&&c.requireFetchReasonsFieldNames.size>0&&(v.requireFetchReasonsFieldNames=[...c.requireFetchReasonsFieldNames]);break}case Z.Kind.SCALAR_TYPE_DEFINITION:{if(c.extensionType===za.ExtensionType.REAL){this.errors.push((0,le.noBaseScalarDefinitionError)(o));break}n.push(this.getScalarNodeByData(c));break}case Z.Kind.UNION_TYPE_DEFINITION:{n.push(this.getUnionNodeByData(c)),this.validateUnionMembers(c);break}default:throw(0,le.unexpectedKindFatalError)(o)}this.addValidConditionalFieldSetConfigurations(),this.addValidKeyFieldSetConfigurations();for(let o of Object.values(Z.OperationTypeNode)){let c=this.schemaData.operationTypes.get(o),l=(0,je.getOrThrowError)(Dn.operationTypeNodeToDefaultType,o,W.OPERATION_TO_DEFAULT),d=c?(0,rr.getTypeNodeNamedTypeName)(c.type):l;if(qt.BASE_SCALARS.has(d)&&this.referencedTypeNames.add(d),d!==l&&this.parentDefinitionDataByTypeName.has(l)){this.errors.push((0,le.invalidRootTypeDefinitionError)(o,d,l));continue}let f=this.parentDefinitionDataByTypeName.get(d);if(c){if(!f)continue;this.operationTypeNodeByTypeName.set(d,o)}if(!f)continue;let y=this.configurationDataByTypeName.get(l);y&&(y.isRootNode=!0,y.typeName=l),f.kind!==Z.Kind.OBJECT_TYPE_DEFINITION&&this.errors.push((0,le.operationDefinitionError)(d,o,f.kind))}for(let o of this.referencedTypeNames){let c=this.parentDefinitionDataByTypeName.get(o);if(!c){this.errors.push((0,le.undefinedTypeError)(o));continue}if(c.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION)continue;let l=this.concreteTypeNamesByAbstractTypeName.get(o);(!l||l.size<1)&&this.warnings.push((0,Wa.unimplementedInterfaceOutputTypeWarning)(this.subgraphName,o))}let r=new Map;for(let o of this.directiveDefinitionByDirectiveName.values()){let c=(0,Dn.extractExecutableDirectiveLocations)(o.locations,new Set);c.size<1||this.addPersistedDirectiveDefinitionDataByNode(r,o,c)}this.isSubgraphEventDrivenGraph=this.edfsDirectiveReferences.size>0,this.isSubgraphEventDrivenGraph&&this.validateEventDrivenSubgraph(n);for(let o of this.unvalidatedExternalFieldCoords)this.isSubgraphVersionTwo?this.errors.push((0,le.invalidExternalDirectiveError)(o)):this.warnings.push((0,Wa.invalidExternalFieldWarning)(o,this.subgraphName));if(this.errors.length>0)return{success:!1,errors:this.errors,warnings:this.warnings};let i={kind:Z.Kind.DOCUMENT,definitions:n};return{authorizationDataByParentTypeName:this.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:this.concreteTypeNamesByAbstractTypeName,conditionalFieldDataByCoordinates:this.conditionalFieldDataByCoords,configurationDataByTypeName:this.configurationDataByTypeName,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:r,subgraphAST:i,subgraphString:(0,Z.print)(i),schema:(0,Gle.buildASTSchema)(i,{assumeValid:!0,assumeValidSDL:!0}),success:!0,warnings:this.warnings}}};vc.NormalizationFactory=Zp;function Jle(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,f=new Set,y=[],I=new Set,v=new Map,F=[],k=[];for(let se of e)se.name&&(0,$le.recordSubgraphName)(se.name,d,f);let K=new ED.Graph;for(let se=0;se0&&F.push(...de.warnings),!de.success){k.push((0,le.subgraphValidationError)(Te,de.errors));continue}if(!de){k.push((0,le.subgraphValidationError)(Te,[le.subgraphValidationFailureError]));continue}l.set(Te,de.parentDefinitionDataByTypeName);for(let Re of de.authorizationDataByParentTypeName.values())(0,ir.upsertAuthorizationData)(t,Re,I);for(let[Re,xe]of de.fieldCoordsByNamedTypeName)(0,je.addIterableValuesToSet)(xe,(0,je.getValueOrDefault)(v,Re,()=>new Set));for(let[Re,xe]of de.concreteTypeNamesByAbstractTypeName){let tt=n.get(Re);if(!tt){n.set(Re,new Set(xe));continue}(0,je.addIterableValuesToSet)(xe,tt)}for(let[Re,xe]of de.entityDataByTypeName){let tt=xe.keyFieldSetDatasBySubgraphName.get(Te);tt&&(0,ir.upsertEntityData)({entityDataByTypeName:r,keyFieldSetDataByFieldSet:tt,typeName:Re,subgraphName:Te})}if(ie.name&&i.set(Te,{conditionalFieldDataByCoordinates:de.conditionalFieldDataByCoordinates,configurationDataByTypeName:de.configurationDataByTypeName,definitions:de.subgraphAST,entityInterfaces:de.entityInterfaces,isVersionTwo:de.isVersionTwo,keyFieldNamesByParentTypeName:de.keyFieldNamesByParentTypeName,name:Te,operationTypes:de.operationTypes,overriddenFieldNamesByParentTypeName:new Map,parentDefinitionDataByTypeName:de.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:de.persistedDirectiveDefinitionDataByDirectiveName,schema:de.schema,url:ie.url}),!(de.overridesByTargetSubgraphName.size<1))for(let[Re,xe]of de.overridesByTargetSubgraphName){let tt=d.has(Re);for(let[ee,Se]of xe){let _t=de.originalTypeNameByRenamedTypeName.get(ee)||ee;if(!tt)F.push((0,Wa.invalidOverrideTargetSubgraphNameWarning)(Re,_t,[...Se],ie.name));else{let en=(0,je.getValueOrDefault)(a,Re,()=>new Map),tn=(0,je.getValueOrDefault)(en,ee,()=>new Set(Se));(0,je.addIterableValuesToSet)(Se,tn)}for(let en of Se){let tn=`${_t}.${en}`,bn=o.get(tn);if(!bn){o.set(tn,[Te]);continue}bn.push(Te),c.add(tn)}}}}let J=[];if(I.size>0&&J.push((0,le.orScopesLimitError)(qt.MAX_OR_SCOPES,[...I])),(y.length>0||f.size>0)&&J.push((0,le.invalidSubgraphNamesError)([...f],y)),c.size>0){let se=[];for(let ie of c){let Te=(0,je.getOrThrowError)(o,ie,"overrideSourceSubgraphNamesByFieldPath");se.push((0,le.duplicateOverriddenFieldErrorMessage)(ie,Te))}J.push((0,le.duplicateOverriddenFieldsError)(se))}if(J.push(...k),J.length>0)return{errors:J,success:!1,warnings:F};for(let[se,ie]of a){let Te=(0,je.getOrThrowError)(i,se,"internalSubgraphBySubgraphName");Te.overriddenFieldNamesByParentTypeName=ie;for(let[de,Re]of ie){let xe=Te.configurationDataByTypeName.get(de);xe&&((0,ir.subtractSet)(Re,xe.fieldNames),xe.fieldNames.size<1&&Te.configurationDataByTypeName.delete(de))}}return{authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,fieldCoordsByNamedTypeName:v,internalSubgraphBySubgraphName:i,internalGraph:K,success:!0,warnings:F}}});var jE=w(Dc=>{"use strict";m();T();N();Object.defineProperty(Dc,"__esModule",{value:!0});Dc.DivergentType=void 0;Dc.getLeastRestrictiveMergedTypeNode=zle;Dc.getMostRestrictiveMergedTypeNode=Wle;Dc.renameNamedTypeName=Xle;var Sc=Ae(),mV=Mi(),Hle=du(),fV=Hr(),NV=Il(),Oc;(function(e){e[e.NONE=0]="NONE",e[e.CURRENT=1]="CURRENT",e[e.OTHER=2]="OTHER"})(Oc||(Dc.DivergentType=Oc={}));function TV(e,t,n,r,i){t=(0,Hle.getMutableTypeNode)(t,n,i);let a={kind:e.kind},o=Oc.NONE,c=a;for(let l=0;l{"use strict";m();T();N();Object.defineProperty(ID,"__esModule",{value:!0});ID.renameRootTypes=tde;var Zle=Ae(),yD=Hr(),ede=jE(),_u=vr(),bc=Sr();function tde(e,t){let n,r=!1,i;(0,Zle.visit)(t.definitions,{FieldDefinition:{enter(a){let o=a.name.value;if(r&&(o===_u.SERVICE_FIELD||o===_u.ENTITIES_FIELD))return n.fieldDataByName.delete(o),!1;let c=n.name,l=(0,bc.getOrThrowError)(n.fieldDataByName,o,`${c}.fieldDataByFieldName`),d=t.operationTypes.get(l.namedTypeName);if(d){let f=(0,bc.getOrThrowError)(yD.operationTypeNodeToDefaultType,d,_u.OPERATION_TO_DEFAULT);l.namedTypeName!==f&&(0,ede.renameNamedTypeName)(l,f,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,bc.getOrThrowError)(t.parentDefinitionDataByTypeName,o,_u.PARENT_DEFINITION_DATA)},leave(){n=void 0}},ObjectTypeDefinition:{enter(a){let o=a.name.value,c=t.operationTypes.get(o),l=c?(0,bc.getOrThrowError)(yD.operationTypeNodeToDefaultType,c,_u.OPERATION_TO_DEFAULT):o;n=(0,bc.getOrThrowError)(t.parentDefinitionDataByTypeName,o,_u.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,bc.getOrThrowError)(yD.operationTypeNodeToDefaultType,c,_u.OPERATION_TO_DEFAULT):o;n=(0,bc.getOrThrowError)(t.parentDefinitionDataByTypeName,o,_u.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 EV=w((Xl,ef)=>{"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,f=2,y=4,I=1,v=2,F=1,k=2,K=4,J=8,se=16,ie=32,Te=64,de=128,Re=256,xe=512,tt=30,ee="...",Se=800,_t=16,en=1,tn=2,bn=3,Qt=1/0,mn=9007199254740991,Pr=17976931348623157e292,Fr=NaN,kn=4294967295,zt=kn-1,An=kn>>>1,ue=[["ary",de],["bind",F],["bindKey",k],["curry",J],["curryRight",se],["flip",xe],["partial",ie],["partialRight",Te],["rearg",Re]],De="[object Arguments]",ve="[object Array]",Ce="[object AsyncFunction]",vt="[object Boolean]",Y="[object Date]",oe="[object DOMException]",qe="[object Error]",Ye="[object Function]",Ut="[object GeneratorFunction]",nt="[object Map]",Rt="[object Number]",ns="[object Null]",Vr="[object Object]",rs="[object Promise]",Mc="[object Proxy]",ga="[object RegExp]",mr="[object Set]",ni="[object String]",Vt="[object Symbol]",Nr="[object Undefined]",Du="[object WeakMap]",_a="[object WeakSet]",bu="[object ArrayBuffer]",R="[object DataView]",h="[object Float32Array]",g="[object Float64Array]",C="[object Int8Array]",G="[object Int16Array]",te="[object Int32Array]",pe="[object Uint8Array]",ft="[object Uint8ClampedArray]",Nn="[object Uint16Array]",on="[object Uint32Array]",yn=/\b__p \+= '';/g,nn=/\b(__p \+=) '' \+/g,z1=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gb=/&(?:amp|lt|gt|quot|#39);/g,_b=/[&<>"']/g,W1=RegExp(gb.source),X1=RegExp(_b.source),Z1=/<%-([\s\S]+?)%>/g,ej=/<%([\s\S]+?)%>/g,vb=/<%=([\s\S]+?)%>/g,tj=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nj=/^\w*$/,rj=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gh=/[\\^$.*+?()[\]{}|]/g,ij=RegExp(gh.source),_h=/^\s+/,aj=/\s/,sj=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oj=/\{\n\/\* \[wrapped with (.+)\] \*/,uj=/,? & /,cj=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lj=/[()=,{}\[\]\/\s]/,dj=/\\(\\)?/g,pj=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Sb=/\w*$/,fj=/^[-+]0x[0-9a-f]+$/i,mj=/^0b[01]+$/i,Nj=/^\[object .+?Constructor\]$/,Tj=/^0o[0-7]+$/i,Ej=/^(?:0|[1-9]\d*)$/,hj=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Sf=/($^)/,yj=/['\n\r\u2028\u2029\\]/g,Of="\\ud800-\\udfff",Ij="\\u0300-\\u036f",gj="\\ufe20-\\ufe2f",_j="\\u20d0-\\u20ff",Ob=Ij+gj+_j,Db="\\u2700-\\u27bf",bb="a-z\\xdf-\\xf6\\xf8-\\xff",vj="\\xac\\xb1\\xd7\\xf7",Sj="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Oj="\\u2000-\\u206f",Dj=" \\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",Ab="A-Z\\xc0-\\xd6\\xd8-\\xde",Rb="\\ufe0e\\ufe0f",Pb=vj+Sj+Oj+Dj,vh="['\u2019]",bj="["+Of+"]",Fb="["+Pb+"]",Df="["+Ob+"]",wb="\\d+",Aj="["+Db+"]",Lb="["+bb+"]",Cb="[^"+Of+Pb+wb+Db+bb+Ab+"]",Sh="\\ud83c[\\udffb-\\udfff]",Rj="(?:"+Df+"|"+Sh+")",Bb="[^"+Of+"]",Oh="(?:\\ud83c[\\udde6-\\uddff]){2}",Dh="[\\ud800-\\udbff][\\udc00-\\udfff]",xc="["+Ab+"]",Ub="\\u200d",kb="(?:"+Lb+"|"+Cb+")",Pj="(?:"+xc+"|"+Cb+")",Mb="(?:"+vh+"(?:d|ll|m|re|s|t|ve))?",xb="(?:"+vh+"(?:D|LL|M|RE|S|T|VE))?",qb=Rj+"?",Vb="["+Rb+"]?",Fj="(?:"+Ub+"(?:"+[Bb,Oh,Dh].join("|")+")"+Vb+qb+")*",wj="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Lj="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",jb=Vb+qb+Fj,Cj="(?:"+[Aj,Oh,Dh].join("|")+")"+jb,Bj="(?:"+[Bb+Df+"?",Df,Oh,Dh,bj].join("|")+")",Uj=RegExp(vh,"g"),kj=RegExp(Df,"g"),bh=RegExp(Sh+"(?="+Sh+")|"+Bj+jb,"g"),Mj=RegExp([xc+"?"+Lb+"+"+Mb+"(?="+[Fb,xc,"$"].join("|")+")",Pj+"+"+xb+"(?="+[Fb,xc+kb,"$"].join("|")+")",xc+"?"+kb+"+"+Mb,xc+"+"+xb,Lj,wj,wb,Cj].join("|"),"g"),xj=RegExp("["+Ub+Of+Ob+Rb+"]"),qj=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Vj=["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"],jj=-1,En={};En[h]=En[g]=En[C]=En[G]=En[te]=En[pe]=En[ft]=En[Nn]=En[on]=!0,En[De]=En[ve]=En[bu]=En[vt]=En[R]=En[Y]=En[qe]=En[Ye]=En[nt]=En[Rt]=En[Vr]=En[ga]=En[mr]=En[ni]=En[Du]=!1;var Tn={};Tn[De]=Tn[ve]=Tn[bu]=Tn[R]=Tn[vt]=Tn[Y]=Tn[h]=Tn[g]=Tn[C]=Tn[G]=Tn[te]=Tn[nt]=Tn[Rt]=Tn[Vr]=Tn[ga]=Tn[mr]=Tn[ni]=Tn[Vt]=Tn[pe]=Tn[ft]=Tn[Nn]=Tn[on]=!0,Tn[qe]=Tn[Ye]=Tn[Du]=!1;var Kj={\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"},Gj={"&":"&","<":"<",">":">",'"':""","'":"'"},$j={"&":"&","<":"<",">":">",""":'"',"'":"'"},Qj={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Yj=parseFloat,Jj=parseInt,Kb=typeof global=="object"&&global&&global.Object===Object&&global,Hj=typeof self=="object"&&self&&self.Object===Object&&self,ar=Kb||Hj||Function("return this")(),Ah=typeof Xl=="object"&&Xl&&!Xl.nodeType&&Xl,Au=Ah&&typeof ef=="object"&&ef&&!ef.nodeType&&ef,Gb=Au&&Au.exports===Ah,Rh=Gb&&Kb.process,hi=function(){try{var $=Au&&Au.require&&Au.require("util").types;return $||Rh&&Rh.binding&&Rh.binding("util")}catch(ce){}}(),$b=hi&&hi.isArrayBuffer,Qb=hi&&hi.isDate,Yb=hi&&hi.isMap,Jb=hi&&hi.isRegExp,Hb=hi&&hi.isSet,zb=hi&&hi.isTypedArray;function ri($,ce,ne){switch(ne.length){case 0:return $.call(ce);case 1:return $.call(ce,ne[0]);case 2:return $.call(ce,ne[0],ne[1]);case 3:return $.call(ce,ne[0],ne[1],ne[2])}return $.apply(ce,ne)}function zj($,ce,ne,Be){for(var ut=-1,Yt=$==null?0:$.length;++ut-1}function Ph($,ce,ne){for(var Be=-1,ut=$==null?0:$.length;++Be-1;);return ne}function i0($,ce){for(var ne=$.length;ne--&&qc(ce,$[ne],0)>-1;);return ne}function aK($,ce){for(var ne=$.length,Be=0;ne--;)$[ne]===ce&&++Be;return Be}var sK=Ch(Kj),oK=Ch(Gj);function uK($){return"\\"+Qj[$]}function cK($,ce){return $==null?e:$[ce]}function Vc($){return xj.test($)}function lK($){return qj.test($)}function dK($){for(var ce,ne=[];!(ce=$.next()).done;)ne.push(ce.value);return ne}function Mh($){var ce=-1,ne=Array($.size);return $.forEach(function(Be,ut){ne[++ce]=[ut,Be]}),ne}function a0($,ce){return function(ne){return $(ce(ne))}}function Go($,ce){for(var ne=-1,Be=$.length,ut=0,Yt=[];++ne-1}function XK(s,u){var p=this.__data__,E=Gf(p,s);return E<0?(++this.size,p.push([s,u])):p[E][1]=u,this}is.prototype.clear=JK,is.prototype.delete=HK,is.prototype.get=zK,is.prototype.has=WK,is.prototype.set=XK;function as(s){var u=-1,p=s==null?0:s.length;for(this.clear();++u=u?s:u)),s}function _i(s,u,p,E,S,L){var M,j=u&d,H=u&f,fe=u&y;if(p&&(M=S?p(s,E,S,L):p(s)),M!==e)return M;if(!vn(s))return s;var me=dt(s);if(me){if(M=n$(s),!j)return jr(s,M)}else{var he=hr(s),be=he==Ye||he==Ut;if(Wo(s))return V0(s,j);if(he==Vr||he==De||be&&!S){if(M=H||be?{}:sA(s),!j)return H?$G(s,mG(M,s)):GG(s,E0(M,s))}else{if(!Tn[he])return S?s:{};M=r$(s,he,j)}}L||(L=new Wi);var Ke=L.get(s);if(Ke)return Ke;L.set(s,M),BA(s)?s.forEach(function(et){M.add(_i(et,u,p,et,s,L))}):LA(s)&&s.forEach(function(et,St){M.set(St,_i(et,u,p,St,s,L))});var Ze=fe?H?ly:cy:H?Gr:sr,Et=me?e:Ze(s);return yi(Et||s,function(et,St){Et&&(St=et,et=s[St]),Td(M,St,_i(et,u,p,St,s,L))}),M}function NG(s){var u=sr(s);return function(p){return h0(p,s,u)}}function h0(s,u,p){var E=p.length;if(s==null)return!E;for(s=dn(s);E--;){var S=p[E],L=u[S],M=s[S];if(M===e&&!(S in s)||!L(M))return!1}return!0}function y0(s,u,p){if(typeof s!="function")throw new Ii(i);return vd(function(){s.apply(e,p)},u)}function Ed(s,u,p,E){var S=-1,L=bf,M=!0,j=s.length,H=[],fe=u.length;if(!j)return H;p&&(u=In(u,ii(p))),E?(L=Ph,M=!1):u.length>=n&&(L=ld,M=!1,u=new Fu(u));e:for(;++SS?0:S+p),E=E===e||E>S?S:Nt(E),E<0&&(E+=S),E=p>E?0:kA(E);p0&&p(j)?u>1?Tr(j,u-1,p,E,S):Ko(S,j):E||(S[S.length]=j)}return S}var $h=Y0(),_0=Y0(!0);function va(s,u){return s&&$h(s,u,sr)}function Qh(s,u){return s&&_0(s,u,sr)}function Qf(s,u){return jo(u,function(p){return ls(s[p])})}function Lu(s,u){u=Ho(u,s);for(var p=0,E=u.length;s!=null&&pu}function hG(s,u){return s!=null&&rn.call(s,u)}function yG(s,u){return s!=null&&u in dn(s)}function IG(s,u,p){return s>=Er(u,p)&&s=120&&me.length>=120)?new Fu(M&&me):e}me=s[0];var he=-1,be=j[0];e:for(;++he-1;)j!==s&&kf.call(j,H,1),kf.call(s,H,1);return s}function L0(s,u){for(var p=s?u.length:0,E=p-1;p--;){var S=u[p];if(p==E||S!==L){var L=S;cs(S)?kf.call(s,S,1):ny(s,S)}}return s}function Zh(s,u){return s+qf(f0()*(u-s+1))}function LG(s,u,p,E){for(var S=-1,L=zn(xf((u-s)/(p||1)),0),M=ne(L);L--;)M[E?L:++S]=s,s+=p;return M}function ey(s,u){var p="";if(!s||u<1||u>mn)return p;do u%2&&(p+=s),u=qf(u/2),u&&(s+=s);while(u);return p}function It(s,u){return Ey(cA(s,u,$r),s+"")}function CG(s){return T0(Wc(s))}function BG(s,u){var p=Wc(s);return rm(p,wu(u,0,p.length))}function Id(s,u,p,E){if(!vn(s))return s;u=Ho(u,s);for(var S=-1,L=u.length,M=L-1,j=s;j!=null&&++SS?0:S+u),p=p>S?S:p,p<0&&(p+=S),S=u>p?0:p-u>>>0,u>>>=0;for(var L=ne(S);++E>>1,M=s[L];M!==null&&!si(M)&&(p?M<=u:M=n){var fe=u?null:HG(s);if(fe)return Rf(fe);M=!1,S=ld,H=new Fu}else H=u?[]:j;e:for(;++E=E?s:vi(s,u,p)}var q0=DK||function(s){return ar.clearTimeout(s)};function V0(s,u){if(u)return s.slice();var p=s.length,E=u0?u0(p):new s.constructor(p);return s.copy(E),E}function sy(s){var u=new s.constructor(s.byteLength);return new Bf(u).set(new Bf(s)),u}function qG(s,u){var p=u?sy(s.buffer):s.buffer;return new s.constructor(p,s.byteOffset,s.byteLength)}function VG(s){var u=new s.constructor(s.source,Sb.exec(s));return u.lastIndex=s.lastIndex,u}function jG(s){return Nd?dn(Nd.call(s)):{}}function j0(s,u){var p=u?sy(s.buffer):s.buffer;return new s.constructor(p,s.byteOffset,s.length)}function K0(s,u){if(s!==u){var p=s!==e,E=s===null,S=s===s,L=si(s),M=u!==e,j=u===null,H=u===u,fe=si(u);if(!j&&!fe&&!L&&s>u||L&&M&&H&&!j&&!fe||E&&M&&H||!p&&H||!S)return 1;if(!E&&!L&&!fe&&s=j)return H;var fe=p[E];return H*(fe=="desc"?-1:1)}}return s.index-u.index}function G0(s,u,p,E){for(var S=-1,L=s.length,M=p.length,j=-1,H=u.length,fe=zn(L-M,0),me=ne(H+fe),he=!E;++j1?p[S-1]:e,M=S>2?p[2]:e;for(L=s.length>3&&typeof L=="function"?(S--,L):e,M&&Lr(p[0],p[1],M)&&(L=S<3?e:L,S=1),u=dn(u);++E-1?S[L?u[M]:M]:e}}function z0(s){return us(function(u){var p=u.length,E=p,S=gi.prototype.thru;for(s&&u.reverse();E--;){var L=u[E];if(typeof L!="function")throw new Ii(i);if(S&&!M&&tm(L)=="wrapper")var M=new gi([],!0)}for(E=M?E:p;++E1&&Pt.reverse(),me&&Hj))return!1;var fe=L.get(s),me=L.get(u);if(fe&&me)return fe==u&&me==s;var he=-1,be=!0,Ke=p&v?new Fu:e;for(L.set(s,u),L.set(u,s);++he1?"& ":"")+u[E],u=u.join(p>2?", ":" "),s.replace(sj,`{ +`+r;return{outputEnd:r,outputStart:n,pathNodes:t}}function FE({outputEnd:e,outputStart:t,pathNodes:n},r){return t+Ya.LITERAL_SPACE.repeat(n.length+1)+Lle(r,n.length)+e}function uV(e,t){return t?e?`${t}${e}`:t:e}function Cle({resDataByPath:e,rootFieldData:t,unresolvablePaths:n}){let r=new Array;for(let a of n){let o=(0,oD.getOrThrowError)(e,a,"resDataByPath"),c=new Map;for(let[d,f]of o.fieldDataByName)o.resolvedFieldNames.has(d)||c.set(d,f);let l=PE(a);for(let[d,f]of c)r.push({fieldName:d,selectionSet:FE(l,f),subgraphNames:f.subgraphNames,typeName:o.typeName})}let i=new Array;for(let a of r)i.push((0,sD.unresolvablePathError)(a,uD({rootFieldData:t,unresolvableFieldData:a})));return i}function Ble({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,oD.getOrThrowError)(t,o,"resDataByPath"),f=new Map;for(let[v,F]of d.fieldDataByName)d.resolvedFieldNames.has(v)||f.set(v,F);let y=uV(o,n),I=PE(y);for(let[v,F]of f)l.push({fieldName:v,selectionSet:FE(I,F),subgraphNames:F.subgraphNames,typeName:d.typeName});e.subgraphName=c;for(let v of l)a.push((0,sD.unresolvablePathError)(v,uD({rootFieldData:r,unresolvableFieldData:v,entityAncestorData:e})))}return a}function Ule({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,oD.getOrThrowError)(t,o,"resDataByPath"),d=new Map;for(let[I,v]of l.fieldDataByName)l.resolvedFieldNames.has(I)||d.set(I,v);let f=uV(o,n),y=PE(f);for(let[I,v]of d)c.push({fieldName:I,selectionSet:FE(y,v),subgraphNames:v.subgraphNames,typeName:l.typeName});for(let I of c)a.push((0,sD.unresolvablePathError)(I,oV({rootFieldData:r,unresolvableFieldData:I,entityAncestors:e})))}return a}function kle({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 LE=w(wE=>{"use strict";m();T();N();Object.defineProperty(wE,"__esModule",{value:!0});wE.NodeResolutionData=void 0;var Mle=Mi(),_c,dD=class dD{constructor({fieldDataByName:t,isResolved:n=!1,resolvedDescendantNames:r,resolvedFieldNames:i,typeName:a}){eR(this,_c,!1);_(this,"fieldDataByName");_(this,"resolvedDescendantNames");_(this,"resolvedFieldNames");_(this,"typeName");By(this,_c,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,Mle.unexpectedEdgeFatalError)(this.typeName,[t]);this.resolvedFieldNames.add(t)}copy(){return new dD({fieldDataByName:this.fieldDataByName,isResolved:Cy(this,_c),resolvedDescendantNames:this.resolvedDescendantNames,resolvedFieldNames:this.resolvedFieldNames,typeName:this.typeName})}areDescendantsResolved(){return this.fieldDataByName.size===this.resolvedDescendantNames.size}isResolved(){if(Cy(this,_c))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 By(this,_c,!0),!0}};_c=new WeakMap;var lD=dD;wE.NodeResolutionData=lD});var cV=w(CE=>{"use strict";m();T();N();Object.defineProperty(CE,"__esModule",{value:!0});CE.EntityWalker=void 0;var xle=LE(),Ja=Sr(),pD=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,Ja.getValueOrDefault)(this.resDataByNodeName,n,()=>new xle.NodeResolutionData({fieldDataByName:t,typeName:r}));if(!this.relativeOriginPaths||this.relativeOriginPaths.size<1)return(0,Ja.getValueOrDefault)(this.resDataByRelativeOriginPath,i,()=>a.copy());let o;for(let c of this.relativeOriginPaths){let l=(0,Ja.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,Ja.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,Ja.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&&(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,Ja.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 f=(0,Ja.getValueOrDefault)(this.resDataByRelativeOriginPath,`${d}${a}`,()=>n.copy());f.addResolvedFieldName(r),t&&f.resolvedDescendantNames.add(r)}return}let l=(0,Ja.getValueOrDefault)(this.resDataByRelativeOriginPath,a,()=>n.copy());l.addResolvedFieldName(r),t&&l.resolvedDescendantNames.add(r)}addUnresolvablePaths({selectionPath:t,subgraphName:n}){if(!this.relativeOriginPaths){(0,Ja.getValueOrDefault)(this.subgraphNameByUnresolvablePath,t,()=>n);return}for(let r of this.relativeOriginPaths)(0,Ja.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)}}};CE.EntityWalker=pD});var lV=w(UE=>{"use strict";m();T();N();Object.defineProperty(UE,"__esModule",{value:!0});UE.RootFieldWalker=void 0;var Ha=Sr(),BE=LE(),fD=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,Ha.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.resDataByNodeName.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:((0,Ha.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,Ha.add)(t.visitedIndices,this.index)?(t.node.hasEntitySiblings&&(0,Ha.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,Ha.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new BE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,Ha.getValueOrDefault)(this.resDataByPath,n,()=>r.copy()),r}getSharedNodeResolutionData({node:t,selectionPath:n}){let r=(0,Ha.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new BE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,Ha.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,Ha.getValueOrDefault)(this.resDataByPath,a,()=>new BE.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,Ha.getValueOrDefault)(this.resDataByNodeName,i.nodeName,()=>new BE.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}}};UE.RootFieldWalker=fD});var ND=w(ME=>{"use strict";m();T();N();Object.defineProperty(ME,"__esModule",{value:!0});ME.Graph=void 0;var Wl=iD(),vc=cD(),Ti=Sr(),kE=aD(),qle=cV(),Vle=lV(),mD=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",kE.NOT_APPLICABLE);_(this,"resDataByNodeName",new Map);_(this,"resDataByRelativePathByEntity",new Map);_(this,"visitedEntitiesByOriginEntity",new Map);_(this,"walkerIndex",-1)}getRootNode(t){return(0,Ti.getValueOrDefault)(this.rootNodeByTypeName,t,()=>new Wl.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 Wl.GraphNode(this.subgraphName,t,n);return this.nodeByNodeName.set(r,a),(0,Ti.getValueOrDefault)(this.nodesByTypeName,t,()=>[]).push(a),a}addEdge(t,n,r,i=!1){if(t.isRootNode){let c=new Wl.Edge(this.getNextEdgeId(),n,r);return(0,Ti.getValueOrDefault)(t.headToSharedTailEdges,r,()=>[]).push(c),c}let a=t,o=new Wl.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 Wl.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 Wl.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 qle.EntityWalker({encounteredEntityNodeNames:t,index:this.getNextWalkerIndex(),relativeOriginPaths:r,resDataByNodeName:this.resDataByNodeName,resDataByRelativeOriginPath:i,subgraphNameByUnresolvablePath:a,visitedEntities:o}),f=c.getAllAccessibleEntityNodeNames();for(let y of l){if(y.nodeName!==c.nodeName&&!f.has(y.nodeName))continue;let{areDescendantsResolved:I}=d.visitEntityDescendantConcreteNode({node:y,selectionPath:""});if(I)return}for(let[y,I]of d.selectionPathByEntityNodeName)this.visitEntity({encounteredEntityNodeNames:t,entityNodeName:y,relativeOriginPaths:(0,vc.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 f=r[0].node.nodeName;if(this.resolvedRootFieldNodeNames.has(f))continue;this.resolvedRootFieldNodeNames.add(f)}let a=new Vle.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,Ti.getOrThrowError)(t.fieldDataByName,n,"fieldDataByName"),l=(0,vc.newRootFieldData)(t.typeName,n,c.subgraphNames);if(!o)return{errors:(0,vc.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,Ti.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,Ti.getOrThrowError)(n,a,"resDataByRelativeOriginPath"),c=`${t}${a}`,l=(0,Ti.getOrThrowError)(i.resDataByPath,c,"rootFieldWalker.resDataByPath");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,vc.generateRootResolvabilityErrors)({unresolvablePaths:n.unresolvablePaths,resDataByPath:n.resDataByPath,rootFieldData:t})),!(c.length<1))return{errors:c,success:!1}}return n.unresolvablePaths.size>0?{errors:(0,vc.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,Ti.getValueOrDefault)(this.resDataByRelativePathByEntity,i,()=>new Map);if(this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:i,resDataByRelativeOriginPath:c,subgraphNameByUnresolvablePath:o,visitedEntities:(0,Ti.getValueOrDefault)(this.visitedEntitiesByOriginEntity,i,()=>new Set)}),!(o.size<1))return{errors:this.getEntityResolvabilityErrors({entityNodeName:i,pathFromRoot:(r=(0,Ti.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,Ti.getOrThrowError)(this.resDataByRelativePathByEntity,t,"resDataByRelativePathByEntity"),o=t.split(kE.LITERAL_PERIOD)[1],{fieldSetsByTargetSubgraphName:c}=(0,Ti.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,vc.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 f=d.split(kE.LITERAL_PERIOD);o!=null||(o=f[1]),c.push(f[0])}let{fieldSetsByTargetSubgraphName:l}=(0,Ti.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,vc.generateSharedEntityResolvabilityErrors)({entityAncestors:{fieldSetsByTargetSubgraphName:l,subgraphNames:c,typeName:o},pathFromRoot:n,resDataByPath:i,rootFieldData:r,subgraphNameByUnresolvablePath:a})}};ME.Graph=mD});var TD=w(xE=>{"use strict";m();T();N();Object.defineProperty(xE,"__esModule",{value:!0});xE.newFieldSetConditionData=jle;xE.newConfigurationData=Kle;function jle({fieldCoordinatesPath:e,fieldPath:t}){return{fieldCoordinatesPath:e,fieldPath:t}}function Kle(e,t){return{fieldNames:new Set,isRootNode:e,typeName:t}}});var hD=w(Sc=>{"use strict";m();T();N();Object.defineProperty(Sc,"__esModule",{value:!0});Sc.NormalizationFactory=void 0;Sc.normalizeSubgraphFromString=Yle;Sc.normalizeSubgraph=pV;Sc.batchNormalize=Jle;var Z=Ae(),Dn=Hr(),ti=Hp(),qt=Ss(),ir=Jp(),le=Mi(),qE=jp(),Gle=Dv(),Ei=iE(),$le=JO(),Wa=zp(),dV=ZO(),za=Sp(),sn=Sl(),rr=du(),ED=ND(),VE=Rv(),W=vr(),Qle=gl(),je=Sr(),Xp=TD();function Yle(e,t=!0){let{error:n,documentNode:r}=(0,Dn.safeParse)(e,t);return n||!r?{errors:[(0,le.subgraphInvalidSyntaxError)(n)],success:!1,warnings:[]}:new Zp(new ED.Graph).normalize(r)}function pV(e,t,n){return new Zp(n||new ED.Graph,t).normalize(e)}var Zp=class{constructor(t,n){_(this,"argumentName","");_(this,"authorizationDataByParentTypeName",new Map);_(this,"concreteTypeNamesByAbstractTypeName",new Map);_(this,"conditionalFieldDataByCoords",new Map);_(this,"configurationDataByTypeName",new Map);_(this,"customDirectiveDefinitions",new Map);_(this,"definedDirectiveNames",new Set);_(this,"directiveDefinitionByDirectiveName",new Map);_(this,"directiveDefinitionDataByDirectiveName",(0,ti.initializeDirectiveDefinitionDatas)());_(this,"doesParentObjectRequireFetchReasons",!1);_(this,"edfsDirectiveReferences",new Set);_(this,"errors",[]);_(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,"isCurrentParentExtension",!1);_(this,"isParentObjectExternal",!1);_(this,"isParentObjectShareable",!1);_(this,"isSubgraphEventDrivenGraph",!1);_(this,"isSubgraphVersionTwo",!1);_(this,"keyFieldSetDatasByTypeName",new Map);_(this,"lastParentNodeKind",Z.Kind.NULL);_(this,"lastChildNodeKind",Z.Kind.NULL);_(this,"parentTypeNamesWithAuthDirectives",new Set);_(this,"keyFieldSetDataByTypeName",new Map);_(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",[]);for(let[r,i]of qt.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME)this.directiveDefinitionByDirectiveName.set(r,i);this.subgraphName=n||W.NOT_APPLICABLE,this.internalGraph=t,this.internalGraph.setSubgraphName(this.subgraphName),this.schemaData={directivesByDirectiveName:new Map,kind:Z.Kind.SCHEMA_DEFINITION,name:W.SCHEMA,operationTypes:new Map}}validateArguments(t,n){for(let r of t.argumentDataByName.values()){let i=(0,rr.getTypeNodeNamedTypeName)(r.type);if(qt.BASE_SCALARS.has(i)){r.namedTypeKind=Z.Kind.SCALAR_TYPE_DEFINITION;continue}let a=this.parentDefinitionDataByTypeName.get(i);if(a){if((0,sn.isInputNodeKind)(a.kind)){r.namedTypeKind=a.kind;continue}this.errors.push((0,le.invalidNamedTypeError)({data:r,namedTypeData:a,nodeType:`${(0,je.kindToNodeType)(n)} field argument`}))}}}isTypeNameRootType(t){return W.ROOT_TYPE_NAMES.has(t)||this.operationTypeNodeByTypeName.has(t)}isArgumentValueValid(t,n){if(n.kind===Z.Kind.NULL)return t.kind!==Z.Kind.NON_NULL_TYPE;switch(t.kind){case Z.Kind.LIST_TYPE:{if(n.kind!==Z.Kind.LIST)return this.isArgumentValueValid((0,rr.getNamedTypeNode)(t.type),n);for(let r of n.values)if(!this.isArgumentValueValid(t.type,r))return!1;return!0}case Z.Kind.NAMED_TYPE:switch(t.name.value){case W.BOOLEAN_SCALAR:return n.kind===Z.Kind.BOOLEAN;case W.FLOAT_SCALAR:return n.kind===Z.Kind.FLOAT||n.kind===Z.Kind.INT;case W.ID_SCALAR:return n.kind===Z.Kind.STRING||n.kind===Z.Kind.INT;case W.INT_SCALAR:return n.kind===Z.Kind.INT;case W.FIELD_SET_SCALAR:case W.SCOPE_SCALAR:case W.STRING_SCALAR:return n.kind===Z.Kind.STRING;case W.LINK_IMPORT:return!0;case W.LINK_PURPOSE:return n.kind!==Z.Kind.ENUM?!1:n.value===W.SECURITY||n.value===W.EXECUTION;case W.SUBSCRIPTION_FIELD_CONDITION:case W.SUBSCRIPTION_FILTER_CONDITION:return n.kind===Z.Kind.OBJECT;default:{let r=this.parentDefinitionDataByTypeName.get(t.name.value);if(!r)return!1;if(r.kind===Z.Kind.SCALAR_TYPE_DEFINITION)return!0;if(r.kind===Z.Kind.ENUM_TYPE_DEFINITION){if(n.kind!==Z.Kind.ENUM)return!1;let i=r.enumValueDataByValueName.get(n.value);return i?!i.directivesByDirectiveName.has(W.INACCESSIBLE):!1}return r.kind!==Z.Kind.INPUT_OBJECT_TYPE_DEFINITION?!1:n.kind===Z.Kind.OBJECT}}default:return this.isArgumentValueValid(t.type,n)}}addInheritedDirectivesToFieldData(t,n){return this.isParentObjectExternal&&!t.has(W.EXTERNAL)&&(t.set(W.EXTERNAL,[(0,je.generateSimpleDirective)(W.EXTERNAL)]),n.add(W.EXTERNAL)),this.doesParentObjectRequireFetchReasons&&!t.has(W.REQUIRE_FETCH_REASONS)&&(t.set(W.REQUIRE_FETCH_REASONS,[(0,je.generateSimpleDirective)(W.REQUIRE_FETCH_REASONS)]),n.add(W.REQUIRE_FETCH_REASONS)),this.isParentObjectShareable&&!t.has(W.SHAREABLE)&&(t.set(W.SHAREABLE,[(0,je.generateSimpleDirective)(W.SHAREABLE)]),n.add(W.SHAREABLE)),t}extractDirectives(t,n){if(!t.directives)return n;for(let r of t.directives){let i=r.name.value;i===W.SHAREABLE?(0,je.getValueOrDefault)(n,i,()=>[r]):(0,je.getValueOrDefault)(n,i,()=>[]).push(r),(0,ir.isNodeKindObject)(t.kind)&&(this.isParentObjectExternal||(this.isParentObjectExternal=i===W.EXTERNAL),this.doesParentObjectRequireFetchReasons||(this.doesParentObjectRequireFetchReasons=i===W.REQUIRE_FETCH_REASONS),this.isParentObjectShareable||(this.isParentObjectShareable=i===W.SHAREABLE))}return n}validateDirective({data:t,definitionData:n,directiveCoords:r,directiveNode:i,errorMessages:a,requiredArgumentNames:o}){let c=i.name.value,l=t.kind===Z.Kind.FIELD_DEFINITION?t.renamedParentTypeName||t.originalParentTypeName:t.name,d=c===W.AUTHENTICATED,f=(0,sn.isFieldData)(t),y=c===W.OVERRIDE,I=c===W.REQUIRES_SCOPES,v=c===W.SEMANTIC_NON_NULL;if(!i.arguments||i.arguments.length<1)return n.requiredArgumentNames.size>0&&a.push((0,le.undefinedRequiredArgumentsErrorMessage)(c,o,[])),d&&this.handleAuthenticatedDirective(t,l),v&&f&&((0,sn.isTypeRequired)(t.type)?a.push((0,le.semanticNonNullLevelsNonNullErrorMessage)({typeString:(0,Ei.printTypeNode)(t.type),value:"0"})):t.nullLevelsBySubgraphName.set(this.subgraphName,new Set([0]))),a;let F=new Set,k=new Set,K=new Set,J=[];for(let Te of i.arguments){let de=Te.name.value;if(F.has(de)){k.add(de);continue}F.add(de);let Re=n.argumentTypeNodeByArgumentName.get(de);if(!Re){K.add(de);continue}if(!this.isArgumentValueValid(Re.typeNode,Te.value)){a.push((0,le.invalidArgumentValueErrorMessage)((0,Z.print)(Te.value),`@${c}`,de,(0,Ei.printTypeNode)(Re.typeNode)));continue}if(y&&f){this.handleOverrideDirective({data:t,directiveCoords:r,errorMessages:a,targetSubgraphName:Te.value.value});continue}if(v&&f){this.handleSemanticNonNullDirective({data:t,directiveNode:i,errorMessages:a});continue}!I||de!==W.SCOPES||this.extractRequiredScopes({directiveCoords:r,orScopes:Te.value.values,requiredScopes:J})}k.size>0&&a.push((0,le.duplicateDirectiveArgumentDefinitionsErrorMessage)([...k])),K.size>0&&a.push((0,le.unexpectedDirectiveArgumentErrorMessage)(c,[...K]));let se=(0,je.getEntriesNotInHashSet)(o,F);if(se.length>0&&a.push((0,le.undefinedRequiredArgumentsErrorMessage)(c,o,se)),a.length>0||!I)return a;let ie=(0,je.getValueOrDefault)(this.authorizationDataByParentTypeName,l,()=>(0,ir.newAuthorizationData)(l));if(t.kind!==Z.Kind.FIELD_DEFINITION)this.parentTypeNamesWithAuthDirectives.add(l),ie.requiredScopes.push(...J);else{let Te=(0,je.getValueOrDefault)(ie.fieldAuthDataByFieldName,t.name,()=>(0,ir.newFieldAuthorizationData)(t.name));Te.inheritedData.requiredScopes.push(...J),Te.originalData.requiredScopes.push(...J)}return a}validateDirectives(t,n){let r=new Set;for(let[i,a]of t.directivesByDirectiveName){let o=this.directiveDefinitionDataByDirectiveName.get(i);if(!o){r.has(i)||(this.errors.push((0,le.undefinedDirectiveError)(i,n)),r.add(i));continue}let c=[],l=(0,Dn.nodeKindToDirectiveLocation)(t.kind);if(o.locations.has(l)||c.push((0,le.invalidDirectiveLocationErrorMessage)(i,l)),a.length>1&&!o.isRepeatable){let f=(0,je.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);f.has(i)||(f.add(i),c.push((0,le.invalidRepeatedDirectiveErrorMessage)(i)))}let d=[...o.requiredArgumentNames];for(let f=0;f0&&this.errors.push((0,le.invalidDirectiveError)(i,n,(0,je.numberToOrdinal)(f+1),y))}}switch(t.kind){case Z.Kind.ENUM_TYPE_DEFINITION:{for(let[i,a]of t.enumValueDataByValueName)this.validateDirectives(a,`${t.name}.${i}`);return}case Z.Kind.FIELD_DEFINITION:{for(let[i,a]of t.argumentDataByName)this.validateDirectives(a,`${t.originalParentTypeName}.${t.name}(${i}: ...)`);return}case Z.Kind.INPUT_OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.inputValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case Z.Kind.INTERFACE_TYPE_DEFINITION:case Z.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?za.ExtensionType.REAL:r||!n.has(W.EXTENDS)?za.ExtensionType.NONE:za.ExtensionType.EXTENDS}setParentDataExtensionType(t,n){switch(t.extensionType){case za.ExtensionType.EXTENDS:case za.ExtensionType.NONE:{if(n===za.ExtensionType.REAL)return;this.errors.push((0,le.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 W.PROPAGATE:{if(o.value.kind!=Z.Kind.BOOLEAN)return;r.propagate=o.value.value;break}case W.DESCRIPTION_OVERRIDE:{if(o.value.kind!=Z.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.directivesByDirectiveName.get(W.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,le.duplicateImplementedInterfaceError)((0,ir.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.directivesByDirectiveName.has(W.KEY)),n.isInaccessible||(n.isInaccessible=n.directivesByDirectiveName.has(W.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,le.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,{argumentDataByArgumentName: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(!W.EXECUTABLE_DIRECTIVE_LOCATIONS.has(o)&&!qE.TYPE_SYSTEM_DIRECTIVE_LOCATIONS.has(o)){n.push((0,le.invalidDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}if(r.has(o)){n.push((0,le.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={argumentTypeNodeByArgumentName: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,sn.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,le.duplicateDirectiveDefinitionArgumentErrorMessage)([...c])),o}addDirectiveDefinitionDataByNode(t){let n=t.name.value;if(this.definedDirectiveNames.has(n))return this.errors.push((0,le.duplicateDirectiveDefinitionError)(n)),!1;if(this.definedDirectiveNames.add(n),this.directiveDefinitionByDirectiveName.set(n,t),qt.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(n))return this.isSubgraphVersionTwo=!0,!1;if(qt.ALL_IN_BUILT_DIRECTIVE_NAMES.has(n))return!1;let r=[],{argumentTypeNodeByArgumentName:i,optionalArgumentNames:a,requiredArgumentNames:o}=this.extractArgumentData(t.arguments,r);return this.directiveDefinitionDataByDirectiveName.set(n,{argumentTypeNodeByArgumentName:i,isRepeatable:t.repeatable,locations:this.extractDirectiveLocations(t,r),name:n,node:t,optionalArgumentNames:a,requiredArgumentNames:o}),r.length>0&&this.errors.push((0,le.invalidDirectiveDefinitionError)(n,r)),!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:f}=(0,sn.isNodeExternalOrShareable)(n,!this.isSubgraphVersionTwo,i),y=(0,rr.getTypeNodeNamedTypeName)(n.type),I={argumentDataByName:r,configureDescriptionDataBySubgraphName:new Map,externalFieldDataBySubgraphName:new Map([[this.subgraphName,(0,sn.newExternalFieldData)(d)]]),federatedCoords:`${c}.${o}`,inheritedDirectiveNames:a,isInaccessible:i.has(W.INACCESSIBLE),isShareableBySubgraphName:new Map([[this.subgraphName,f]]),kind:Z.Kind.FIELD_DEFINITION,name:o,namedTypeKind:qt.BASE_SCALARS.has(y)?Z.Kind.SCALAR_TYPE_DEFINITION:Z.Kind.NULL,namedTypeName:y,node:(0,rr.getMutableFieldNode)(n,l,this.errors),nullLevelsBySubgraphName:new Map,originalParentTypeName:this.originalParentTypeName,persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),renamedParentTypeName:c,subgraphNames:new Set([this.subgraphName]),type:(0,rr.getMutableTypeNode)(n.type,l,this.errors),directivesByDirectiveName:i,description:(0,Dn.formatDescription)(n.description)};return qt.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,sn.areDefaultValuesCompatible)(i.type,i.defaultValue)&&this.errors.push((0,le.incompatibleInputValueDefaultValueTypeError)((r?W.ARGUMENT:W.INPUT_FIELD)+` "${l}"`,d,(0,Ei.printTypeNode)(i.type),(0,Z.print)(i.defaultValue)));let f=r?`${c}${t?`.${t}`:""}(${l}: ...)`:`${c}.${l}`,y=(0,rr.getTypeNodeNamedTypeName)(i.type),I={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:this.extractDirectives(i,new Map),federatedCoords:f,fieldName:t,includeDefaultValue:!!i.defaultValue,isArgument:r,kind:r?Z.Kind.ARGUMENT:Z.Kind.INPUT_VALUE_DEFINITION,name:l,namedTypeKind:qt.BASE_SCALARS.has(y)?Z.Kind.SCALAR_TYPE_DEFINITION:Z.Kind.NULL,namedTypeName:y,node:(0,rr.getMutableInputValueNode)(i,a,this.errors),originalCoords:d,originalParentTypeName:a,persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),renamedParentTypeName:c,requiredSubgraphNames:new Set((0,sn.isTypeRequired)(i.type)?[this.subgraphName]:[]),subgraphNames:new Set([this.subgraphName]),type:(0,rr.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.directivesByDirectiveName)||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!==Z.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,o);return}let l={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:o,fieldDataByName:new Map,implementedInterfaceTypeNames:this.extractImplementedInterfaceTypeNames(t,new Set),isEntity:a.has(W.KEY),isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.INTERFACE_TYPE_DEFINITION,name:r,node:(0,rr.getMutableInterfaceNode)(t.name),persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),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 Z.OperationTypeNode.MUTATION:return W.MUTATION;case Z.OperationTypeNode.SUBSCRIPTION:return W.SUBSCRIPTION;default:return W.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 f;let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(f=i==null?void 0:i.directivesByDirectiveName)!=null?f:new Map),o=this.isTypeNameRootType(r),c=this.getNodeExtensionType(n,a,o);if(this.addInterfaceObjectFieldsByNode(t),i){if(i.kind!==Z.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,c),a.has(W.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(i.implementedInterfaceTypeNames,r);return}let l=this.extractImplementedInterfaceTypeNames(t,new Set);a.has(W.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(l,r);let d={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:c,fieldDataByName:new Map,implementedInterfaceTypeNames:l,isEntity:a.has(W.KEY),isInaccessible:a.has(W.INACCESSIBLE),isRootType:o,kind:Z.Kind.OBJECT_TYPE_DEFINITION,name:r,node:(0,rr.getMutableObjectNode)(t.name),persistedDirectivesData:(0,sn.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.ENUM_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(W.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,directivesByDirectiveName:a,extensionType:o,enumValueDataByValueName:new Map,isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.ENUM_TYPE_DEFINITION,name:r,node:(0,rr.getMutableEnumNode)(t.name),persistedDirectivesData:(0,sn.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.INPUT_OBJECT_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(W.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={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:o,inputValueDataByName:new Map,isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:r,node:(0,rr.getMutableInputObjectNode)(t.name),persistedDirectivesData:(0,sn.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)}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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.SCALAR_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.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,directivesByDirectiveName:a,extensionType:o,kind:Z.Kind.SCALAR_TYPE_DEFINITION,name:r,node:(0,rr.getMutableScalarNode)(t.name),persistedDirectivesData:(0,sn.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,le.duplicateUnionMemberDefinitionError)(r,a));continue}(0,je.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(a),qt.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(this.addConcreteTypeNamesForUnion(t),i){if(i.kind!==Z.Kind.UNION_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.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,directivesByDirectiveName:a,extensionType:o,kind:Z.Kind.UNION_TYPE_DEFINITION,memberByMemberTypeName:this.extractUnionMembers(t,new Map),name:r,node:(0,rr.getMutableUnionNode)(t.name),persistedDirectivesData:(0,sn.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,le.expectedEntityError)(r));return}let i=0;for(let o of t.directives){if(o.name.value!==W.KEY||(i+=1,!o.arguments||o.arguments.length<1))continue;let c,l=!1;for(let v of o.arguments){if(v.name.value===W.RESOLVABLE){v.value.kind===Z.Kind.BOOLEAN&&!v.value.value&&(l=!0);continue}if(v.name.value!==W.FIELDS){c=void 0;break}if(v.value.kind!==Z.Kind.STRING){c=void 0;break}c=v.value.value}if(c===void 0)continue;let{error:d,documentNode:f}=(0,Dn.safeParse)("{"+c+"}");if(d||!f){this.errors.push((0,le.invalidDirectiveError)(W.KEY,r,(0,je.numberToOrdinal)(i),[(0,le.unparsableFieldSetErrorMessage)(c,d)]));continue}let y=(0,ti.getNormalizedFieldSet)(f),I=n.get(y);I?I.isUnresolvable||(I.isUnresolvable=l):n.set(y,{documentNode:f,isUnresolvable:l,normalizedFieldSet:y,rawFieldSet:c})}}getFieldSetParent(t,n,r,i){if(!t)return{fieldSetParentData:n};let a=(0,je.getOrThrowError)(n.fieldDataByName,r,`${i}.fieldDataByFieldName`),o=(0,rr.getTypeNodeNamedTypeName)(a.node.type),c=this.parentDefinitionDataByTypeName.get(o);return c?c.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION&&c.kind!==Z.Kind.OBJECT_TYPE_DEFINITION?{errorString:(0,le.incompatibleTypeWithProvidesErrorMessage)(`${i}.${r}`,o)}:{fieldSetParentData:c}:{errorString:(0,le.unknownNamedTypeErrorMessage)(`${i}.${r}`,o)}}validateConditionalFieldSet(t,n,r,i,a){let{error:o,documentNode:c}=(0,Dn.safeParse)("{"+n+"}");if(o||!c)return{errorMessages:[(0,le.unparsableFieldSetErrorMessage)(n,o)]};let l=this,d=[t],f=(0,ti.getConditionalFieldSetDirectiveName)(i),y=[],I=`${a}.${r}`,v=(0,ti.getInitialFieldCoordsPath)(i,I),F=[r],k=new Set,K=[],J=-1,se=!0,ie=r,Te=!1;return(0,Z.visit)(c,{Argument:{enter(){return!1}},Field:{enter(de){let Re=d[J],xe=Re.name;if(Re.kind===Z.Kind.UNION_TYPE_DEFINITION)return K.push((0,le.invalidSelectionOnUnionErrorMessage)(n,v,xe)),Z.BREAK;let tt=de.name.value,ee=`${xe}.${tt}`;if(l.unvalidatedExternalFieldCoords.delete(ee),se)return K.push((0,le.invalidSelectionSetErrorMessage)(n,v,xe,(0,je.kindToNodeType)(Re.kind))),Z.BREAK;v.push(ee),F.push(tt),ie=tt;let Se=Re.fieldDataByName.get(tt);if(!Se)return K.push((0,le.undefinedFieldInFieldSetErrorMessage)(n,xe,tt)),Z.BREAK;if(y[J].has(tt))return K.push((0,le.duplicateFieldInFieldSetErrorMessage)(n,ee)),Z.BREAK;y[J].add(tt);let{isDefinedExternal:_t,isUnconditionallyProvided:en}=(0,je.getOrThrowError)(Se.externalFieldDataBySubgraphName,l.subgraphName,`${ee}.externalFieldDataBySubgraphName`),tn=_t&&!en;en||(Te=!0);let bn=(0,rr.getTypeNodeNamedTypeName)(Se.node.type),Qt=l.parentDefinitionDataByTypeName.get(bn);if(qt.BASE_SCALARS.has(bn)||(Qt==null?void 0:Qt.kind)===Z.Kind.SCALAR_TYPE_DEFINITION||(Qt==null?void 0:Qt.kind)===Z.Kind.ENUM_TYPE_DEFINITION){if(k.size<1&&!_t){if(l.isSubgraphVersionTwo){l.errors.push((0,le.nonExternalConditionalFieldError)(I,l.subgraphName,ee,n,f));return}l.warnings.push((0,Wa.nonExternalConditionalFieldWarning)(I,l.subgraphName,ee,n,f));return}if(k.size<1&&en){l.isSubgraphVersionTwo?K.push((0,le.fieldAlreadyProvidedErrorMessage)(ee,l.subgraphName,f)):l.warnings.push((0,Wa.fieldAlreadyProvidedWarning)(ee,f,I,l.subgraphName));return}if(!tn&&!i)return;let mn=(0,je.getValueOrDefault)(l.conditionalFieldDataByCoords,ee,sn.newConditionalFieldData),Pr=(0,Xp.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...F]});i?mn.providedBy.push(Pr):mn.requiredBy.push(Pr);return}if(!Qt)return K.push((0,le.unknownTypeInFieldSetErrorMessage)(n,ee,bn)),Z.BREAK;if(_t&&(i&&(0,je.getValueOrDefault)(l.conditionalFieldDataByCoords,ee,sn.newConditionalFieldData).providedBy.push((0,Xp.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...F]})),k.add(ee)),Qt.kind===Z.Kind.OBJECT_TYPE_DEFINITION||Qt.kind===Z.Kind.INTERFACE_TYPE_DEFINITION||Qt.kind===Z.Kind.UNION_TYPE_DEFINITION){se=!0,d.push(Qt);return}},leave(){k.delete(v.pop()||""),F.pop()}},InlineFragment:{enter(de){let Re=d[J],xe=Re.name,tt=v.length<1?t.name:v[v.length-1];if(!de.typeCondition)return K.push((0,le.inlineFragmentWithoutTypeConditionErrorMessage)(n,tt)),Z.BREAK;let ee=de.typeCondition.name.value;if(ee===xe){d.push(Re),se=!0;return}if(!(0,Dn.isKindAbstract)(Re.kind))return K.push((0,le.invalidInlineFragmentTypeErrorMessage)(n,v,ee,xe)),Z.BREAK;let Se=l.parentDefinitionDataByTypeName.get(ee);if(!Se)return K.push((0,le.unknownInlineFragmentTypeConditionErrorMessage)(n,v,xe,ee)),Z.BREAK;switch(se=!0,Se.kind){case Z.Kind.INTERFACE_TYPE_DEFINITION:{if(!Se.implementedInterfaceTypeNames.has(xe))break;d.push(Se);return}case Z.Kind.OBJECT_TYPE_DEFINITION:{let _t=l.concreteTypeNamesByAbstractTypeName.get(xe);if(!_t||!_t.has(ee))break;d.push(Se);return}case Z.Kind.UNION_TYPE_DEFINITION:{d.push(Se);return}default:return K.push((0,le.invalidInlineFragmentTypeConditionTypeErrorMessage)(n,v,xe,ee,(0,je.kindToNodeType)(Se.kind))),Z.BREAK}return K.push((0,le.invalidInlineFragmentTypeConditionErrorMessage)(n,v,ee,(0,je.kindToNodeType)(Re.kind),xe)),Z.BREAK}},SelectionSet:{enter(){if(!se){let de=d[J];if(de.kind===Z.Kind.UNION_TYPE_DEFINITION)return K.push((0,le.unparsableFieldSetSelectionErrorMessage)(n,ie)),Z.BREAK;let Re=de.fieldDataByName.get(ie);if(!Re)return K.push((0,le.undefinedFieldInFieldSetErrorMessage)(n,de.name,ie)),Z.BREAK;let xe=(0,rr.getTypeNodeNamedTypeName)(Re.node.type),tt=l.parentDefinitionDataByTypeName.get(xe),ee=tt?tt.kind:Z.Kind.SCALAR_TYPE_DEFINITION;return K.push((0,le.invalidSelectionSetDefinitionErrorMessage)(n,v,xe,(0,je.kindToNodeType)(ee))),Z.BREAK}if(J+=1,se=!1,J<0||J>=d.length)return K.push((0,le.unparsableFieldSetSelectionErrorMessage)(n,ie)),Z.BREAK;y.push(new Set)},leave(){if(se){let de=d[J+1];K.push((0,le.invalidSelectionSetErrorMessage)(n,v,de.name,(0,je.kindToNodeType)(de.kind))),se=!1}J-=1,d.pop(),y.pop()}}}),K.length>0||!Te?{errorMessages:K}:{configuration:{fieldName:r,selectionSet:(0,ti.getNormalizedFieldSet)(c)},errorMessages:K}}validateProvidesOrRequires(t,n,r){let i=[],a=[],o=(0,sn.getParentTypeName)(t);for(let[c,l]of n){let{fieldSetParentData:d,errorString:f}=this.getFieldSetParent(r,t,c,o),y=`${o}.${c}`;if(f){i.push(f);continue}if(!d)continue;let{errorMessages:I,configuration:v}=this.validateConditionalFieldSet(d,l,c,r,o);if(I.length>0){i.push(` On field "${y}": + -`+I.join(W.HYPHEN_JOIN));continue}v&&a.push(v)}if(i.length>0){this.errors.push((0,le.invalidProvidesOrRequiresDirectivesError)((0,ti.getConditionalFieldSetDirectiveName)(r),i));return}if(a.length>0)return a}validateInterfaceImplementations(t){if(t.implementedInterfaceTypeNames.size<1)return;let n=t.directivesByDirectiveName.has(W.INACCESSIBLE),r=new Map,i=new Map,a=!1;for(let o of t.implementedInterfaceTypeNames){let c=this.parentDefinitionDataByTypeName.get(o);if(qt.BASE_SCALARS.has(o)&&this.referencedTypeNames.add(o),!c)continue;if(c.kind!==Z.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[f,y]of c.fieldDataByName){this.unvalidatedExternalFieldCoords.delete(`${t.name}.${f}`);let I=!1,v=t.fieldDataByName.get(f);if(!v){d=!0,l.unimplementedFields.push(f);continue}let F={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,Ei.printTypeNode)(y.node.type),unimplementedArguments:new Set};(0,sn.isTypeValidImplementation)(y.node.type,v.node.type,this.concreteTypeNamesByAbstractTypeName)||(d=!0,I=!0,F.implementedResponseType=(0,Ei.printTypeNode)(v.node.type));let k=new Set;for(let[K,J]of y.argumentDataByName){k.add(K);let se=v.argumentDataByName.get(K);if(!se){d=!0,I=!0,F.unimplementedArguments.add(K);continue}let ie=(0,Ei.printTypeNode)(se.type),Te=(0,Ei.printTypeNode)(J.type);Te!==ie&&(d=!0,I=!0,F.invalidImplementedArguments.push({actualType:ie,argumentName:K,expectedType:Te}))}for(let[K,J]of v.argumentDataByName)k.has(K)||J.type.kind===Z.Kind.NON_NULL_TYPE&&(d=!0,I=!0,F.invalidAdditionalArguments.add(K));!n&&v.isInaccessible&&!y.isInaccessible&&(d=!0,I=!0,F.isInaccessible=!0),I&&l.invalidFieldImplementations.set(f,F)}d&&r.set(o,l)}i.size>0&&this.errors.push((0,le.invalidImplementedTypeError)(t.name,i)),a&&this.errors.push((0,le.selfImplementationError)(t.name)),r.size>0&&this.errors.push((0,le.invalidInterfaceImplementationError)(t.name,(0,je.kindToNodeType)(t.kind),r))}handleAuthenticatedDirective(t,n){let r=(0,je.getValueOrDefault)(this.authorizationDataByParentTypeName,n,()=>(0,ir.newAuthorizationData)(n));if(t.kind===Z.Kind.FIELD_DEFINITION){let i=(0,je.getValueOrDefault)(r.fieldAuthDataByFieldName,t.name,()=>(0,ir.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,le.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 y;let i=new Set,a=t.node.type,o=0;for(;a;)switch(a.kind){case Z.Kind.LIST_TYPE:{o+=1,a=a.type;break}case Z.Kind.NON_NULL_TYPE:{i.add(o),a=a.type;break}default:{a=null;break}}let c=(y=n.arguments)==null?void 0:y.find(I=>I.name.value===W.LEVELS);if(!c||c.value.kind!==Z.Kind.LIST){r.push(le.semanticNonNullArgumentErrorMessage);return}let l=c.value.values,d=(0,Ei.printTypeNode)(t.type),f=new Set;for(let{value:I}of l){let v=parseInt(I,10);if(Number.isNaN(v)){r.push((0,le.semanticNonNullLevelsNaNIndexErrorMessage)(I));continue}if(v<0||v>o){r.push((0,le.semanticNonNullLevelsIndexOutOfBoundsErrorMessage)({maxIndex:o,typeString:d,value:I}));continue}if(!i.has(v)){f.add(v);continue}r.push((0,le.semanticNonNullLevelsNonNullErrorMessage)({typeString:d,value:I}))}t.nullLevelsBySubgraphName.set(this.subgraphName,f)}extractRequiredScopes({directiveCoords:t,orScopes:n,requiredScopes:r}){if(n.length>qt.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,ir.addScopes)(r,a)}}getKafkaPublishConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.TOPIC:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push((0,le.invalidEventSubjectErrorMessage)(W.TOPIC));continue}(0,ti.validateArgumentTemplateReferences)(c.value.value,n,i),a.push(c.value.value);break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_KAFKA,topics:a,type:W.PUBLISH}}getKafkaSubscribeConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.TOPICS:{if(c.value.kind!==Z.Kind.LIST){i.push((0,le.invalidEventSubjectsErrorMessage)(W.TOPICS));continue}for(let l of c.value.values){if(l.kind!==Z.Kind.STRING||l.value.length<1){i.push((0,le.invalidEventSubjectsItemErrorMessage)(W.TOPICS));break}(0,ti.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_KAFKA,topics:a,type:W.SUBSCRIBE}}getNatsPublishAndRequestConfiguration(t,n,r,i,a){let o=[],c=W.DEFAULT_EDFS_PROVIDER_ID;for(let l of n.arguments||[])switch(l.name.value){case W.SUBJECT:{if(l.value.kind!==Z.Kind.STRING||l.value.value.length<1){a.push((0,le.invalidEventSubjectErrorMessage)(W.SUBJECT));continue}(0,ti.validateArgumentTemplateReferences)(l.value.value,r,a),o.push(l.value.value);break}case W.PROVIDER_ID:{if(l.value.kind!==Z.Kind.STRING||l.value.value.length<1){a.push(le.invalidEventProviderIdErrorMessage);continue}c=l.value.value;break}}if(!(a.length>0))return{fieldName:i,providerId:c,providerType:W.PROVIDER_TYPE_NATS,subjects:o,type:t}}getNatsSubscribeConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID,c=VE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,l="",d="";for(let f of t.arguments||[])switch(f.name.value){case W.SUBJECTS:{if(f.value.kind!==Z.Kind.LIST){i.push((0,le.invalidEventSubjectsErrorMessage)(W.SUBJECTS));continue}for(let y of f.value.values){if(y.kind!==Z.Kind.STRING||y.value.length<1){i.push((0,le.invalidEventSubjectsItemErrorMessage)(W.SUBJECTS));break}(0,ti.validateArgumentTemplateReferences)(y.value,n,i),a.push(y.value)}break}case W.PROVIDER_ID:{if(f.value.kind!==Z.Kind.STRING||f.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=f.value.value;break}case W.STREAM_CONFIGURATION:{if(this.usesEdfsNatsStreamConfiguration=!0,f.value.kind!==Z.Kind.OBJECT||f.value.fields.length<1){i.push(le.invalidNatsStreamInputErrorMessage);continue}let y=!0,I=new Set,v=new Set(qE.STREAM_CONFIGURATION_FIELD_NAMES),F=new Set([W.CONSUMER_NAME,W.STREAM_NAME]),k=new Set,K=new Set;for(let J of f.value.fields){let se=J.name.value;if(!qE.STREAM_CONFIGURATION_FIELD_NAMES.has(se)){I.add(se),y=!1;continue}if(v.has(se))v.delete(se);else{k.add(se),y=!1;continue}switch(F.has(se)&&F.delete(se),se){case W.CONSUMER_NAME:if(J.value.kind!=Z.Kind.STRING||J.value.value.length<1){K.add(se),y=!1;continue}l=J.value.value;break;case W.STREAM_NAME:if(J.value.kind!=Z.Kind.STRING||J.value.value.length<1){K.add(se),y=!1;continue}d=J.value.value;break;case W.CONSUMER_INACTIVE_THRESHOLD:if(J.value.kind!=Z.Kind.INT){i.push((0,le.invalidArgumentValueErrorMessage)((0,Z.print)(J.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",W.INT_SCALAR)),y=!1;continue}try{c=parseInt(J.value.value,10)}catch(ie){i.push((0,le.invalidArgumentValueErrorMessage)((0,Z.print)(J.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",W.INT_SCALAR)),y=!1}break}}(!y||F.size>0)&&i.push((0,le.invalidNatsStreamInputFieldsErrorMessage)([...F],[...k],[...K],[...I]))}}if(!(i.length>0))return c<0?(c=VE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,this.warnings.push((0,Wa.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,`The value has been set to ${VE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}.`))):c>Qle.MAX_INT32&&(c=0,this.warnings.push((0,Wa.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,"The value has been set to 0. This means the consumer will remain indefinitely active until its manual deletion."))),x({fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_NATS,subjects:a,type:W.SUBSCRIBE},l&&d?{streamConfiguration:{consumerInactiveThreshold:c,consumerName:l,streamName:d}}:{})}getRedisPublishConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.CHANNEL:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push((0,le.invalidEventSubjectErrorMessage)(W.CHANNEL));continue}(0,ti.validateArgumentTemplateReferences)(c.value.value,n,i),a.push(c.value.value);break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_REDIS,channels:a,type:W.PUBLISH}}getRedisSubscribeConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.CHANNELS:{if(c.value.kind!==Z.Kind.LIST){i.push((0,le.invalidEventSubjectsErrorMessage)(W.CHANNELS));continue}for(let l of c.value.values){if(l.kind!==Z.Kind.STRING||l.value.length<1){i.push((0,le.invalidEventSubjectsItemErrorMessage)(W.CHANNELS));break}(0,ti.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_REDIS,channels:a,type:W.SUBSCRIBE}}validateSubscriptionFilterDirectiveLocation(t){if(!t.directives)return;let n=this.renamedParentTypeName||this.originalParentTypeName,r=`${n}.${t.name.value}`,i=this.getOperationTypeNodeForRootTypeName(n)===Z.OperationTypeNode.SUBSCRIPTION;for(let a of t.directives)if(a.name.value===W.SUBSCRIPTION_FILTER&&!i){this.errors.push((0,le.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 W.EDFS_KAFKA_PUBLISH:c=this.getKafkaPublishConfiguration(a,n,r,o);break;case W.EDFS_KAFKA_SUBSCRIBE:c=this.getKafkaSubscribeConfiguration(a,n,r,o);break;case W.EDFS_NATS_PUBLISH:{c=this.getNatsPublishAndRequestConfiguration(W.PUBLISH,a,n,r,o);break}case W.EDFS_NATS_REQUEST:{c=this.getNatsPublishAndRequestConfiguration(W.REQUEST,a,n,r,o);break}case W.EDFS_NATS_SUBSCRIBE:{c=this.getNatsSubscribeConfiguration(a,n,r,o);break}case W.EDFS_REDIS_PUBLISH:{c=this.getRedisPublishConfiguration(a,n,r,o);break}case W.EDFS_REDIS_SUBSCRIBE:{c=this.getRedisSubscribeConfiguration(a,n,r,o);break}default:continue}if(o.length>0){this.errors.push((0,le.invalidEventDirectiveError)(a.name.value,i,o));continue}c&&(0,je.getValueOrDefault)(this.eventsConfigurations,this.renamedParentTypeName||this.originalParentTypeName,()=>[]).push(c)}}getValidEventsDirectiveNamesForOperationTypeNode(t){switch(t){case Z.OperationTypeNode.MUTATION:return new Set([W.EDFS_KAFKA_PUBLISH,W.EDFS_NATS_PUBLISH,W.EDFS_NATS_REQUEST,W.EDFS_REDIS_PUBLISH]);case Z.OperationTypeNode.QUERY:return new Set([W.EDFS_NATS_REQUEST]);case Z.OperationTypeNode.SUBSCRIPTION:return new Set([W.EDFS_KAFKA_SUBSCRIBE,W.EDFS_NATS_SUBSCRIBE,W.EDFS_REDIS_SUBSCRIBE])}}getOperationTypeNodeForRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(n)return n;switch(t){case W.MUTATION:return Z.OperationTypeNode.MUTATION;case W.QUERY:return Z.OperationTypeNode.QUERY;case W.SUBSCRIPTION:return Z.OperationTypeNode.SUBSCRIPTION;default:return}}validateEventDrivenRootType(t,n,r,i){let a=this.getOperationTypeNodeForRootTypeName(t.name);if(!a){this.errors.push((0,le.invalidRootTypeError)(t.name));return}let o=this.getValidEventsDirectiveNamesForOperationTypeNode(a);for(let[c,l]of t.fieldDataByName){let d=`${l.originalParentTypeName}.${c}`,f=new Set;for(let K of qE.EVENT_DIRECTIVE_NAMES)l.directivesByDirectiveName.has(K)&&f.add(K);let y=new Set;for(let K of f)o.has(K)||y.add(K);if((f.size<1||y.size>0)&&n.set(d,{definesDirectives:f.size>0,invalidDirectiveNames:[...y]}),a===Z.OperationTypeNode.MUTATION){let K=(0,Ei.printTypeNode)(l.type);K!==W.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT&&i.set(d,K);continue}let I=(0,Ei.printTypeNode)(l.type),v=l.namedTypeName+"!",F=!1,k=this.concreteTypeNamesByAbstractTypeName.get(l.namedTypeName)||new Set([l.namedTypeName]);for(let K of k)if(F||(F=this.entityDataByTypeName.has(K)),F)break;(!F||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(W.EDFS_PUBLISH_RESULT);if(!t)return!0;if(t.kind!==Z.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size!=1)return!1;for(let[n,r]of t.fieldDataByName)if(r.argumentDataByName.size>0||n!==W.SUCCESS||(0,Ei.printTypeNode)(r.type)!==W.NON_NULLABLE_BOOLEAN)return!1;return!0}isNatsStreamConfigurationInputObjectValid(t){if(t.kind!==Z.Kind.INPUT_OBJECT_TYPE_DEFINITION||t.inputValueDataByName.size!=3)return!1;for(let[n,r]of t.inputValueDataByName)switch(n){case W.CONSUMER_INACTIVE_THRESHOLD:{if((0,Ei.printTypeNode)(r.type)!==W.NON_NULLABLE_INT||!r.defaultValue||r.defaultValue.kind!==Z.Kind.INT||r.defaultValue.value!==`${VE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}`)return!1;break}case W.CONSUMER_NAME:case W.STREAM_NAME:{if((0,Ei.printTypeNode)(r.type)!==W.NON_NULLABLE_STRING)return!1;break}default:return!1}return!0}validateEventDrivenSubgraph(t){let n=[],r=new Map,i=new Map,a=new Map,o=new Map,c=new Map,l=new Map,d=new Set,f=new Set;for(let[y,I]of this.parentDefinitionDataByTypeName){if(y===W.EDFS_PUBLISH_RESULT||y===W.EDFS_NATS_STREAM_CONFIGURATION||I.kind!==Z.Kind.OBJECT_TYPE_DEFINITION)continue;if(I.isRootType){this.validateEventDrivenRootType(I,r,i,a);continue}let v=this.keyFieldNamesByParentTypeName.get(y);if(!v){f.add(y);continue}this.validateEventDrivenKeyDefinition(y,o),this.validateEventDrivenObjectFields(I.fieldDataByName,v,c,l)}if(this.isEdfsPublishResultValid()||n.push(le.invalidEdfsPublishResultObjectErrorMessage),this.edfsDirectiveReferences.has(W.EDFS_NATS_SUBSCRIBE)){let y=this.parentDefinitionDataByTypeName.get(W.EDFS_NATS_STREAM_CONFIGURATION);y&&this.usesEdfsNatsStreamConfiguration&&!this.isNatsStreamConfigurationInputObjectValid(y)&&n.push(le.invalidNatsStreamConfigurationDefinitionErrorMessage),this.parentDefinitionDataByTypeName.delete(W.EDFS_NATS_STREAM_CONFIGURATION),t.push(qt.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION)}r.size>0&&n.push((0,le.invalidRootTypeFieldEventsDirectivesErrorMessage)(r)),a.size>0&&n.push((0,le.invalidEventDrivenMutationResponseTypeErrorMessage)(a)),i.size>0&&n.push((0,le.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage)(i)),o.size>0&&n.push((0,le.invalidKeyFieldSetsEventDrivenErrorMessage)(o)),c.size>0&&n.push((0,le.nonExternalKeyFieldNamesEventDrivenErrorMessage)(c)),l.size>0&&n.push((0,le.nonKeyFieldNamesEventDrivenErrorMessage)(l)),d.size>0&&n.push((0,le.nonEntityObjectExtensionsEventDrivenErrorMessage)([...d])),f.size>0&&n.push((0,le.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage)([...f])),n.length>0&&this.errors.push((0,le.invalidEventDrivenGraphError)(n))}validateUnionMembers(t){if(t.memberByMemberTypeName.size<1){this.errors.push((0,le.noDefinedUnionMembersError)(t.name));return}let n=[];for(let r of t.memberByMemberTypeName.keys()){let i=this.parentDefinitionDataByTypeName.get(r);i&&i.kind!==Z.Kind.OBJECT_TYPE_DEFINITION&&n.push(`"${r}", which is type "${(0,je.kindToNodeType)(i.kind)}"`)}n.length>0&&this.errors.push((0,le.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!==Z.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,le.undefinedCompositeOutputTypeError)(t));continue}let i=(0,sn.getParentTypeName)(r),a=(0,je.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Xp.newConfigurationData)(!0,i)),o=(0,ti.validateKeyFieldSets)(this,r,n);o&&(a.keys=o)}}getValidFlattenedDirectiveArray(t,n,r=!1){let i=[];for(let[a,o]of t){if(r&&W.INHERITABLE_DIRECTIVE_NAMES.has(a))continue;let c=this.directiveDefinitionDataByDirectiveName.get(a);if(!c)continue;if(!c.isRepeatable&&o.length>1){let f=(0,je.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);f.has(a)||(f.add(a),this.errors.push((0,le.invalidDirectiveError)(a,n,"1st",[(0,le.invalidRepeatedDirectiveErrorMessage)(a)])));continue}if(a!==W.KEY){i.push(...o);continue}let l=[],d=new Set;for(let f=0;fnew Set).add(k)),(0,je.getValueOrDefault)(a.keyFieldNamesByParentTypeName,v,()=>new Set).add(F);let se=(0,rr.getTypeNodeNamedTypeName)(K.node.type);if(qt.BASE_SCALARS.has(se))return;let ie=a.parentDefinitionDataByTypeName.get(se);if(!ie)return Z.BREAK;if(ie.kind===Z.Kind.OBJECT_TYPE_DEFINITION){f=!0,c.push(ie);return}if((0,Dn.isKindAbstract)(ie.kind))return Z.BREAK}},InlineFragment:{enter(){return Z.BREAK}},SelectionSet:{enter(){if(!f||(d+=1,f=!1,d<0||d>=c.length))return Z.BREAK},leave(){f&&(f=!1),d-=1,c.pop()}}}),!(l.size<1))for(let[y,I]of l)this.warnings.push((0,Wa.externalEntityExtensionKeyFieldWarning)(i.name,y,[...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!==Z.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,le.undefinedCompositeOutputTypeError)(t));continue}let i=(0,sn.getParentTypeName)(r),a=(0,je.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Xp.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.directivesByDirectiveName.has(W.ONE_OF)?n.size>0?(this.errors.push((0,le.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(n),typeName:t.name})),!1):(t.inputValueDataByName.size===1&&this.warnings.push((0,Wa.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 a;(0,dV.upsertDirectiveSchemaAndEntityDefinitions)(this,t),(0,dV.upsertParentsAndChildren)(this,t),this.validateDirectives(this.schemaData,W.SCHEMA);for(let[o,c]of this.parentDefinitionDataByTypeName)this.validateDirectives(c,o);this.invalidORScopesCoords.size>0&&this.errors.push((0,le.orScopesLimitError)(qt.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));let n=[];for(let o of qt.BASE_DIRECTIVE_DEFINITIONS)n.push(o);if(n.push(qt.FIELD_SET_SCALAR_DEFINITION),this.isSubgraphVersionTwo){for(let o of qt.VERSION_TWO_DIRECTIVE_DEFINITIONS)n.push(o),this.directiveDefinitionByDirectiveName.set(o.name.value,o);n.push(qt.SCOPE_SCALAR_DEFINITION)}for(let o of this.edfsDirectiveReferences){let c=qt.EVENT_DRIVEN_DIRECTIVE_DEFINITIONS_BY_DIRECTIVE_NAME.get(o);if(!c){this.errors.push((0,le.invalidEdfsDirectiveName)(o));continue}n.push(c)}this.edfsDirectiveReferences.size>0&&this.referencedDirectiveNames.has(W.SUBSCRIPTION_FILTER)&&(n.push(qt.SUBSCRIPTION_FILTER_DEFINITION),n.push(qt.SUBSCRIPTION_FILTER_CONDITION_DEFINITION),n.push(qt.SUBSCRIPTION_FIELD_CONDITION_DEFINITION),n.push(qt.SUBSCRIPTION_FILTER_VALUE_DEFINITION)),this.referencedDirectiveNames.has(W.CONFIGURE_DESCRIPTION)&&n.push(qt.CONFIGURE_DESCRIPTION_DEFINITION),this.referencedDirectiveNames.has(W.CONFIGURE_CHILD_DESCRIPTIONS)&&n.push(qt.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION),this.referencedDirectiveNames.has(W.LINK)&&(n.push(qt.LINK_DEFINITION),n.push(qt.LINK_IMPORT_DEFINITION),n.push(qt.LINK_PURPOSE_DEFINITION)),this.referencedDirectiveNames.has(W.ONE_OF)&&n.push(qt.ONE_OF_DEFINITION),this.referencedDirectiveNames.has(W.REQUIRE_FETCH_REASONS)&&n.push(qt.REQUIRE_FETCH_REASONS_DEFINITION),this.referencedDirectiveNames.has(W.SEMANTIC_NON_NULL)&&n.push(qt.SEMANTIC_NON_NULL_DEFINITION);for(let o of this.customDirectiveDefinitions.values())n.push(o);this.schemaData.operationTypes.size>0&&n.push(this.getSchemaNodeByData(this.schemaData));for(let o of this.invalidConfigureDescriptionNodeDatas)o.description||this.errors.push((0,le.configureDescriptionNoDescriptionError)((0,je.kindToNodeType)(o.kind),o.name));this.evaluateExternalKeyFields();for(let[o,c]of this.parentDefinitionDataByTypeName)switch(c.kind){case Z.Kind.ENUM_TYPE_DEFINITION:{if(c.enumValueDataByValueName.size<1){this.errors.push((0,le.noDefinedEnumValuesError)(o));break}n.push(this.getEnumNodeByData(c));break}case Z.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(c.inputValueDataByName.size<1){this.errors.push((0,le.noInputValueDefinitionsError)(o));break}let l=new Set;for(let d of c.inputValueDataByName.values()){if((0,sn.isTypeRequired)(d.type)&&l.add(d.name),d.namedTypeKind!==Z.Kind.NULL)continue;let f=this.parentDefinitionDataByTypeName.get(d.namedTypeName);if(f){if(!(0,sn.isInputNodeKind)(f.kind)){this.errors.push((0,le.invalidNamedTypeError)({data:d,namedTypeData:f,nodeType:`${(0,je.kindToNodeType)(c.kind)} field`}));continue}d.namedTypeKind=f.kind}}if(!this.validateOneOfDirective({data:c,requiredFieldNames:l}))break;n.push(this.getInputObjectNodeByData(c));break}case Z.Kind.INTERFACE_TYPE_DEFINITION:case Z.Kind.OBJECT_TYPE_DEFINITION:{let l=this.entityDataByTypeName.has(o),d=this.operationTypeNodeByTypeName.get(o),f=c.kind===Z.Kind.OBJECT_TYPE_DEFINITION;this.isSubgraphVersionTwo&&c.extensionType===za.ExtensionType.EXTENDS&&(c.extensionType=za.ExtensionType.NONE),d&&(c.fieldDataByName.delete(W.SERVICE_FIELD),c.fieldDataByName.delete(W.ENTITIES_FIELD));let y=[];for(let[K,J]of c.fieldDataByName){if(!f&&((a=J.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&a.isDefinedExternal)&&y.push(K),this.validateArguments(J,c.kind),J.namedTypeKind!==Z.Kind.NULL)continue;let se=this.parentDefinitionDataByTypeName.get(J.namedTypeName);if(se){if(!(0,sn.isOutputNodeKind)(se.kind)){this.errors.push((0,le.invalidNamedTypeError)({data:J,namedTypeData:se,nodeType:`${(0,je.kindToNodeType)(c.kind)} field`}));continue}J.namedTypeKind=this.entityInterfaceDataByTypeName.get(se.name)?Z.Kind.INTERFACE_TYPE_DEFINITION:se.kind}}y.length>0&&(this.isSubgraphVersionTwo?this.errors.push((0,le.externalInterfaceFieldsError)(o,y)):this.warnings.push((0,Wa.externalInterfaceFieldsWarning)(this.subgraphName,o,y)));let I=(0,sn.getParentTypeName)(c),v=(0,je.getValueOrDefault)(this.configurationDataByTypeName,I,()=>(0,Xp.newConfigurationData)(l,o)),F=this.entityInterfaceDataByTypeName.get(o);if(F){F.fieldDatas=(0,ir.fieldDatasToSimpleFieldDatas)(c.fieldDataByName.values());let K=this.concreteTypeNamesByAbstractTypeName.get(o);K&&(0,je.addIterableValuesToSet)(K,F.concreteTypeNames),v.isInterfaceObject=F.isInterfaceObject,v.entityInterfaceConcreteTypeNames=F.concreteTypeNames}let k=this.eventsConfigurations.get(I);k&&(v.events=k),this.addFieldNamesToConfigurationData(c.fieldDataByName,v),this.validateInterfaceImplementations(c),n.push(this.getCompositeOutputNodeByData(c)),c.fieldDataByName.size<1&&!(0,ti.isNodeQuery)(o,d)&&this.errors.push((0,le.noFieldDefinitionsError)((0,je.kindToNodeType)(c.kind),o)),f&&c.requireFetchReasonsFieldNames.size>0&&(v.requireFetchReasonsFieldNames=[...c.requireFetchReasonsFieldNames]);break}case Z.Kind.SCALAR_TYPE_DEFINITION:{if(c.extensionType===za.ExtensionType.REAL){this.errors.push((0,le.noBaseScalarDefinitionError)(o));break}n.push(this.getScalarNodeByData(c));break}case Z.Kind.UNION_TYPE_DEFINITION:{n.push(this.getUnionNodeByData(c)),this.validateUnionMembers(c);break}default:throw(0,le.unexpectedKindFatalError)(o)}this.addValidConditionalFieldSetConfigurations(),this.addValidKeyFieldSetConfigurations();for(let o of Object.values(Z.OperationTypeNode)){let c=this.schemaData.operationTypes.get(o),l=(0,je.getOrThrowError)(Dn.operationTypeNodeToDefaultType,o,W.OPERATION_TO_DEFAULT),d=c?(0,rr.getTypeNodeNamedTypeName)(c.type):l;if(qt.BASE_SCALARS.has(d)&&this.referencedTypeNames.add(d),d!==l&&this.parentDefinitionDataByTypeName.has(l)){this.errors.push((0,le.invalidRootTypeDefinitionError)(o,d,l));continue}let f=this.parentDefinitionDataByTypeName.get(d);if(c){if(!f)continue;this.operationTypeNodeByTypeName.set(d,o)}if(!f)continue;let y=this.configurationDataByTypeName.get(l);y&&(y.isRootNode=!0,y.typeName=l),f.kind!==Z.Kind.OBJECT_TYPE_DEFINITION&&this.errors.push((0,le.operationDefinitionError)(d,o,f.kind))}for(let o of this.referencedTypeNames){let c=this.parentDefinitionDataByTypeName.get(o);if(!c){this.errors.push((0,le.undefinedTypeError)(o));continue}if(c.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION)continue;let l=this.concreteTypeNamesByAbstractTypeName.get(o);(!l||l.size<1)&&this.warnings.push((0,Wa.unimplementedInterfaceOutputTypeWarning)(this.subgraphName,o))}let r=new Map;for(let o of this.directiveDefinitionByDirectiveName.values()){let c=(0,Dn.extractExecutableDirectiveLocations)(o.locations,new Set);c.size<1||this.addPersistedDirectiveDefinitionDataByNode(r,o,c)}this.isSubgraphEventDrivenGraph=this.edfsDirectiveReferences.size>0,this.isSubgraphEventDrivenGraph&&this.validateEventDrivenSubgraph(n);for(let o of this.unvalidatedExternalFieldCoords)this.isSubgraphVersionTwo?this.errors.push((0,le.invalidExternalDirectiveError)(o)):this.warnings.push((0,Wa.invalidExternalFieldWarning)(o,this.subgraphName));if(this.errors.length>0)return{success:!1,errors:this.errors,warnings:this.warnings};let i={kind:Z.Kind.DOCUMENT,definitions:n};return{authorizationDataByParentTypeName:this.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:this.concreteTypeNamesByAbstractTypeName,conditionalFieldDataByCoordinates:this.conditionalFieldDataByCoords,configurationDataByTypeName:this.configurationDataByTypeName,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:r,subgraphAST:i,subgraphString:(0,Z.print)(i),schema:(0,Gle.buildASTSchema)(i,{assumeValid:!0,assumeValidSDL:!0}),success:!0,warnings:this.warnings}}};Sc.NormalizationFactory=Zp;function Jle(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,f=new Set,y=[],I=new Set,v=new Map,F=[],k=[];for(let se of e)se.name&&(0,$le.recordSubgraphName)(se.name,d,f);let K=new ED.Graph;for(let se=0;se0&&F.push(...de.warnings),!de.success){k.push((0,le.subgraphValidationError)(Te,de.errors));continue}if(!de){k.push((0,le.subgraphValidationError)(Te,[le.subgraphValidationFailureError]));continue}l.set(Te,de.parentDefinitionDataByTypeName);for(let Re of de.authorizationDataByParentTypeName.values())(0,ir.upsertAuthorizationData)(t,Re,I);for(let[Re,xe]of de.fieldCoordsByNamedTypeName)(0,je.addIterableValuesToSet)(xe,(0,je.getValueOrDefault)(v,Re,()=>new Set));for(let[Re,xe]of de.concreteTypeNamesByAbstractTypeName){let tt=n.get(Re);if(!tt){n.set(Re,new Set(xe));continue}(0,je.addIterableValuesToSet)(xe,tt)}for(let[Re,xe]of de.entityDataByTypeName){let tt=xe.keyFieldSetDatasBySubgraphName.get(Te);tt&&(0,ir.upsertEntityData)({entityDataByTypeName:r,keyFieldSetDataByFieldSet:tt,typeName:Re,subgraphName:Te})}if(ie.name&&i.set(Te,{conditionalFieldDataByCoordinates:de.conditionalFieldDataByCoordinates,configurationDataByTypeName:de.configurationDataByTypeName,definitions:de.subgraphAST,entityInterfaces:de.entityInterfaces,isVersionTwo:de.isVersionTwo,keyFieldNamesByParentTypeName:de.keyFieldNamesByParentTypeName,name:Te,operationTypes:de.operationTypes,overriddenFieldNamesByParentTypeName:new Map,parentDefinitionDataByTypeName:de.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:de.persistedDirectiveDefinitionDataByDirectiveName,schema:de.schema,url:ie.url}),!(de.overridesByTargetSubgraphName.size<1))for(let[Re,xe]of de.overridesByTargetSubgraphName){let tt=d.has(Re);for(let[ee,Se]of xe){let _t=de.originalTypeNameByRenamedTypeName.get(ee)||ee;if(!tt)F.push((0,Wa.invalidOverrideTargetSubgraphNameWarning)(Re,_t,[...Se],ie.name));else{let en=(0,je.getValueOrDefault)(a,Re,()=>new Map),tn=(0,je.getValueOrDefault)(en,ee,()=>new Set(Se));(0,je.addIterableValuesToSet)(Se,tn)}for(let en of Se){let tn=`${_t}.${en}`,bn=o.get(tn);if(!bn){o.set(tn,[Te]);continue}bn.push(Te),c.add(tn)}}}}let J=[];if(I.size>0&&J.push((0,le.orScopesLimitError)(qt.MAX_OR_SCOPES,[...I])),(y.length>0||f.size>0)&&J.push((0,le.invalidSubgraphNamesError)([...f],y)),c.size>0){let se=[];for(let ie of c){let Te=(0,je.getOrThrowError)(o,ie,"overrideSourceSubgraphNamesByFieldPath");se.push((0,le.duplicateOverriddenFieldErrorMessage)(ie,Te))}J.push((0,le.duplicateOverriddenFieldsError)(se))}if(J.push(...k),J.length>0)return{errors:J,success:!1,warnings:F};for(let[se,ie]of a){let Te=(0,je.getOrThrowError)(i,se,"internalSubgraphBySubgraphName");Te.overriddenFieldNamesByParentTypeName=ie;for(let[de,Re]of ie){let xe=Te.configurationDataByTypeName.get(de);xe&&((0,ir.subtractSet)(Re,xe.fieldNames),xe.fieldNames.size<1&&Te.configurationDataByTypeName.delete(de))}}return{authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,fieldCoordsByNamedTypeName:v,internalSubgraphBySubgraphName:i,internalGraph:K,success:!0,warnings:F}}});var jE=w(bc=>{"use strict";m();T();N();Object.defineProperty(bc,"__esModule",{value:!0});bc.DivergentType=void 0;bc.getLeastRestrictiveMergedTypeNode=zle;bc.getMostRestrictiveMergedTypeNode=Wle;bc.renameNamedTypeName=Xle;var Oc=Ae(),mV=Mi(),Hle=du(),fV=Hr(),NV=gl(),Dc;(function(e){e[e.NONE=0]="NONE",e[e.CURRENT=1]="CURRENT",e[e.OTHER=2]="OTHER"})(Dc||(bc.DivergentType=Dc={}));function TV(e,t,n,r,i){t=(0,Hle.getMutableTypeNode)(t,n,i);let a={kind:e.kind},o=Dc.NONE,c=a;for(let l=0;l{"use strict";m();T();N();Object.defineProperty(ID,"__esModule",{value:!0});ID.renameRootTypes=tde;var Zle=Ae(),yD=Hr(),ede=jE(),_u=vr(),Ac=Sr();function tde(e,t){let n,r=!1,i;(0,Zle.visit)(t.definitions,{FieldDefinition:{enter(a){let o=a.name.value;if(r&&(o===_u.SERVICE_FIELD||o===_u.ENTITIES_FIELD))return n.fieldDataByName.delete(o),!1;let c=n.name,l=(0,Ac.getOrThrowError)(n.fieldDataByName,o,`${c}.fieldDataByFieldName`),d=t.operationTypes.get(l.namedTypeName);if(d){let f=(0,Ac.getOrThrowError)(yD.operationTypeNodeToDefaultType,d,_u.OPERATION_TO_DEFAULT);l.namedTypeName!==f&&(0,ede.renameNamedTypeName)(l,f,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,Ac.getOrThrowError)(t.parentDefinitionDataByTypeName,o,_u.PARENT_DEFINITION_DATA)},leave(){n=void 0}},ObjectTypeDefinition:{enter(a){let o=a.name.value,c=t.operationTypes.get(o),l=c?(0,Ac.getOrThrowError)(yD.operationTypeNodeToDefaultType,c,_u.OPERATION_TO_DEFAULT):o;n=(0,Ac.getOrThrowError)(t.parentDefinitionDataByTypeName,o,_u.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,Ac.getOrThrowError)(yD.operationTypeNodeToDefaultType,c,_u.OPERATION_TO_DEFAULT):o;n=(0,Ac.getOrThrowError)(t.parentDefinitionDataByTypeName,o,_u.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 EV=w((Xl,ef)=>{"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,f=2,y=4,I=1,v=2,F=1,k=2,K=4,J=8,se=16,ie=32,Te=64,de=128,Re=256,xe=512,tt=30,ee="...",Se=800,_t=16,en=1,tn=2,bn=3,Qt=1/0,mn=9007199254740991,Pr=17976931348623157e292,Fr=NaN,kn=4294967295,zt=kn-1,An=kn>>>1,ue=[["ary",de],["bind",F],["bindKey",k],["curry",J],["curryRight",se],["flip",xe],["partial",ie],["partialRight",Te],["rearg",Re]],De="[object Arguments]",ve="[object Array]",Ce="[object AsyncFunction]",vt="[object Boolean]",Y="[object Date]",oe="[object DOMException]",qe="[object Error]",Ye="[object Function]",Ut="[object GeneratorFunction]",nt="[object Map]",Rt="[object Number]",ns="[object Null]",Vr="[object Object]",rs="[object Promise]",xc="[object Proxy]",ga="[object RegExp]",mr="[object Set]",ni="[object String]",Vt="[object Symbol]",Nr="[object Undefined]",Du="[object WeakMap]",_a="[object WeakSet]",bu="[object ArrayBuffer]",R="[object DataView]",h="[object Float32Array]",g="[object Float64Array]",C="[object Int8Array]",G="[object Int16Array]",te="[object Int32Array]",pe="[object Uint8Array]",ft="[object Uint8ClampedArray]",Nn="[object Uint16Array]",on="[object Uint32Array]",yn=/\b__p \+= '';/g,nn=/\b(__p \+=) '' \+/g,z1=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gb=/&(?:amp|lt|gt|quot|#39);/g,_b=/[&<>"']/g,W1=RegExp(gb.source),X1=RegExp(_b.source),Z1=/<%-([\s\S]+?)%>/g,ej=/<%([\s\S]+?)%>/g,vb=/<%=([\s\S]+?)%>/g,tj=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nj=/^\w*$/,rj=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gh=/[\\^$.*+?()[\]{}|]/g,ij=RegExp(gh.source),_h=/^\s+/,aj=/\s/,sj=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oj=/\{\n\/\* \[wrapped with (.+)\] \*/,uj=/,? & /,cj=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lj=/[()=,{}\[\]\/\s]/,dj=/\\(\\)?/g,pj=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Sb=/\w*$/,fj=/^[-+]0x[0-9a-f]+$/i,mj=/^0b[01]+$/i,Nj=/^\[object .+?Constructor\]$/,Tj=/^0o[0-7]+$/i,Ej=/^(?:0|[1-9]\d*)$/,hj=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Sf=/($^)/,yj=/['\n\r\u2028\u2029\\]/g,Of="\\ud800-\\udfff",Ij="\\u0300-\\u036f",gj="\\ufe20-\\ufe2f",_j="\\u20d0-\\u20ff",Ob=Ij+gj+_j,Db="\\u2700-\\u27bf",bb="a-z\\xdf-\\xf6\\xf8-\\xff",vj="\\xac\\xb1\\xd7\\xf7",Sj="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Oj="\\u2000-\\u206f",Dj=" \\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",Ab="A-Z\\xc0-\\xd6\\xd8-\\xde",Rb="\\ufe0e\\ufe0f",Pb=vj+Sj+Oj+Dj,vh="['\u2019]",bj="["+Of+"]",Fb="["+Pb+"]",Df="["+Ob+"]",wb="\\d+",Aj="["+Db+"]",Lb="["+bb+"]",Cb="[^"+Of+Pb+wb+Db+bb+Ab+"]",Sh="\\ud83c[\\udffb-\\udfff]",Rj="(?:"+Df+"|"+Sh+")",Bb="[^"+Of+"]",Oh="(?:\\ud83c[\\udde6-\\uddff]){2}",Dh="[\\ud800-\\udbff][\\udc00-\\udfff]",qc="["+Ab+"]",Ub="\\u200d",kb="(?:"+Lb+"|"+Cb+")",Pj="(?:"+qc+"|"+Cb+")",Mb="(?:"+vh+"(?:d|ll|m|re|s|t|ve))?",xb="(?:"+vh+"(?:D|LL|M|RE|S|T|VE))?",qb=Rj+"?",Vb="["+Rb+"]?",Fj="(?:"+Ub+"(?:"+[Bb,Oh,Dh].join("|")+")"+Vb+qb+")*",wj="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Lj="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",jb=Vb+qb+Fj,Cj="(?:"+[Aj,Oh,Dh].join("|")+")"+jb,Bj="(?:"+[Bb+Df+"?",Df,Oh,Dh,bj].join("|")+")",Uj=RegExp(vh,"g"),kj=RegExp(Df,"g"),bh=RegExp(Sh+"(?="+Sh+")|"+Bj+jb,"g"),Mj=RegExp([qc+"?"+Lb+"+"+Mb+"(?="+[Fb,qc,"$"].join("|")+")",Pj+"+"+xb+"(?="+[Fb,qc+kb,"$"].join("|")+")",qc+"?"+kb+"+"+Mb,qc+"+"+xb,Lj,wj,wb,Cj].join("|"),"g"),xj=RegExp("["+Ub+Of+Ob+Rb+"]"),qj=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Vj=["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"],jj=-1,En={};En[h]=En[g]=En[C]=En[G]=En[te]=En[pe]=En[ft]=En[Nn]=En[on]=!0,En[De]=En[ve]=En[bu]=En[vt]=En[R]=En[Y]=En[qe]=En[Ye]=En[nt]=En[Rt]=En[Vr]=En[ga]=En[mr]=En[ni]=En[Du]=!1;var Tn={};Tn[De]=Tn[ve]=Tn[bu]=Tn[R]=Tn[vt]=Tn[Y]=Tn[h]=Tn[g]=Tn[C]=Tn[G]=Tn[te]=Tn[nt]=Tn[Rt]=Tn[Vr]=Tn[ga]=Tn[mr]=Tn[ni]=Tn[Vt]=Tn[pe]=Tn[ft]=Tn[Nn]=Tn[on]=!0,Tn[qe]=Tn[Ye]=Tn[Du]=!1;var Kj={\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"},Gj={"&":"&","<":"<",">":">",'"':""","'":"'"},$j={"&":"&","<":"<",">":">",""":'"',"'":"'"},Qj={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Yj=parseFloat,Jj=parseInt,Kb=typeof global=="object"&&global&&global.Object===Object&&global,Hj=typeof self=="object"&&self&&self.Object===Object&&self,ar=Kb||Hj||Function("return this")(),Ah=typeof Xl=="object"&&Xl&&!Xl.nodeType&&Xl,Au=Ah&&typeof ef=="object"&&ef&&!ef.nodeType&&ef,Gb=Au&&Au.exports===Ah,Rh=Gb&&Kb.process,hi=function(){try{var $=Au&&Au.require&&Au.require("util").types;return $||Rh&&Rh.binding&&Rh.binding("util")}catch(ce){}}(),$b=hi&&hi.isArrayBuffer,Qb=hi&&hi.isDate,Yb=hi&&hi.isMap,Jb=hi&&hi.isRegExp,Hb=hi&&hi.isSet,zb=hi&&hi.isTypedArray;function ri($,ce,ne){switch(ne.length){case 0:return $.call(ce);case 1:return $.call(ce,ne[0]);case 2:return $.call(ce,ne[0],ne[1]);case 3:return $.call(ce,ne[0],ne[1],ne[2])}return $.apply(ce,ne)}function zj($,ce,ne,Be){for(var ut=-1,Yt=$==null?0:$.length;++ut-1}function Ph($,ce,ne){for(var Be=-1,ut=$==null?0:$.length;++Be-1;);return ne}function i0($,ce){for(var ne=$.length;ne--&&Vc(ce,$[ne],0)>-1;);return ne}function aK($,ce){for(var ne=$.length,Be=0;ne--;)$[ne]===ce&&++Be;return Be}var sK=Ch(Kj),oK=Ch(Gj);function uK($){return"\\"+Qj[$]}function cK($,ce){return $==null?e:$[ce]}function jc($){return xj.test($)}function lK($){return qj.test($)}function dK($){for(var ce,ne=[];!(ce=$.next()).done;)ne.push(ce.value);return ne}function Mh($){var ce=-1,ne=Array($.size);return $.forEach(function(Be,ut){ne[++ce]=[ut,Be]}),ne}function a0($,ce){return function(ne){return $(ce(ne))}}function Go($,ce){for(var ne=-1,Be=$.length,ut=0,Yt=[];++ne-1}function XK(s,u){var p=this.__data__,E=Gf(p,s);return E<0?(++this.size,p.push([s,u])):p[E][1]=u,this}is.prototype.clear=JK,is.prototype.delete=HK,is.prototype.get=zK,is.prototype.has=WK,is.prototype.set=XK;function as(s){var u=-1,p=s==null?0:s.length;for(this.clear();++u=u?s:u)),s}function _i(s,u,p,E,S,L){var M,j=u&d,H=u&f,fe=u&y;if(p&&(M=S?p(s,E,S,L):p(s)),M!==e)return M;if(!vn(s))return s;var me=dt(s);if(me){if(M=n$(s),!j)return jr(s,M)}else{var he=hr(s),be=he==Ye||he==Ut;if(Wo(s))return V0(s,j);if(he==Vr||he==De||be&&!S){if(M=H||be?{}:sA(s),!j)return H?$G(s,mG(M,s)):GG(s,E0(M,s))}else{if(!Tn[he])return S?s:{};M=r$(s,he,j)}}L||(L=new Wi);var Ke=L.get(s);if(Ke)return Ke;L.set(s,M),BA(s)?s.forEach(function(et){M.add(_i(et,u,p,et,s,L))}):LA(s)&&s.forEach(function(et,St){M.set(St,_i(et,u,p,St,s,L))});var Ze=fe?H?ly:cy:H?Gr:sr,Et=me?e:Ze(s);return yi(Et||s,function(et,St){Et&&(St=et,et=s[St]),Td(M,St,_i(et,u,p,St,s,L))}),M}function NG(s){var u=sr(s);return function(p){return h0(p,s,u)}}function h0(s,u,p){var E=p.length;if(s==null)return!E;for(s=dn(s);E--;){var S=p[E],L=u[S],M=s[S];if(M===e&&!(S in s)||!L(M))return!1}return!0}function y0(s,u,p){if(typeof s!="function")throw new Ii(i);return vd(function(){s.apply(e,p)},u)}function Ed(s,u,p,E){var S=-1,L=bf,M=!0,j=s.length,H=[],fe=u.length;if(!j)return H;p&&(u=In(u,ii(p))),E?(L=Ph,M=!1):u.length>=n&&(L=ld,M=!1,u=new Fu(u));e:for(;++SS?0:S+p),E=E===e||E>S?S:Nt(E),E<0&&(E+=S),E=p>E?0:kA(E);p0&&p(j)?u>1?Tr(j,u-1,p,E,S):Ko(S,j):E||(S[S.length]=j)}return S}var $h=Y0(),_0=Y0(!0);function va(s,u){return s&&$h(s,u,sr)}function Qh(s,u){return s&&_0(s,u,sr)}function Qf(s,u){return jo(u,function(p){return ls(s[p])})}function Lu(s,u){u=Ho(u,s);for(var p=0,E=u.length;s!=null&&pu}function hG(s,u){return s!=null&&rn.call(s,u)}function yG(s,u){return s!=null&&u in dn(s)}function IG(s,u,p){return s>=Er(u,p)&&s=120&&me.length>=120)?new Fu(M&&me):e}me=s[0];var he=-1,be=j[0];e:for(;++he-1;)j!==s&&kf.call(j,H,1),kf.call(s,H,1);return s}function L0(s,u){for(var p=s?u.length:0,E=p-1;p--;){var S=u[p];if(p==E||S!==L){var L=S;cs(S)?kf.call(s,S,1):ny(s,S)}}return s}function Zh(s,u){return s+qf(f0()*(u-s+1))}function LG(s,u,p,E){for(var S=-1,L=zn(xf((u-s)/(p||1)),0),M=ne(L);L--;)M[E?L:++S]=s,s+=p;return M}function ey(s,u){var p="";if(!s||u<1||u>mn)return p;do u%2&&(p+=s),u=qf(u/2),u&&(s+=s);while(u);return p}function It(s,u){return Ey(cA(s,u,$r),s+"")}function CG(s){return T0(Xc(s))}function BG(s,u){var p=Xc(s);return rm(p,wu(u,0,p.length))}function Id(s,u,p,E){if(!vn(s))return s;u=Ho(u,s);for(var S=-1,L=u.length,M=L-1,j=s;j!=null&&++SS?0:S+u),p=p>S?S:p,p<0&&(p+=S),S=u>p?0:p-u>>>0,u>>>=0;for(var L=ne(S);++E>>1,M=s[L];M!==null&&!si(M)&&(p?M<=u:M=n){var fe=u?null:HG(s);if(fe)return Rf(fe);M=!1,S=ld,H=new Fu}else H=u?[]:j;e:for(;++E=E?s:vi(s,u,p)}var q0=DK||function(s){return ar.clearTimeout(s)};function V0(s,u){if(u)return s.slice();var p=s.length,E=u0?u0(p):new s.constructor(p);return s.copy(E),E}function sy(s){var u=new s.constructor(s.byteLength);return new Bf(u).set(new Bf(s)),u}function qG(s,u){var p=u?sy(s.buffer):s.buffer;return new s.constructor(p,s.byteOffset,s.byteLength)}function VG(s){var u=new s.constructor(s.source,Sb.exec(s));return u.lastIndex=s.lastIndex,u}function jG(s){return Nd?dn(Nd.call(s)):{}}function j0(s,u){var p=u?sy(s.buffer):s.buffer;return new s.constructor(p,s.byteOffset,s.length)}function K0(s,u){if(s!==u){var p=s!==e,E=s===null,S=s===s,L=si(s),M=u!==e,j=u===null,H=u===u,fe=si(u);if(!j&&!fe&&!L&&s>u||L&&M&&H&&!j&&!fe||E&&M&&H||!p&&H||!S)return 1;if(!E&&!L&&!fe&&s=j)return H;var fe=p[E];return H*(fe=="desc"?-1:1)}}return s.index-u.index}function G0(s,u,p,E){for(var S=-1,L=s.length,M=p.length,j=-1,H=u.length,fe=zn(L-M,0),me=ne(H+fe),he=!E;++j1?p[S-1]:e,M=S>2?p[2]:e;for(L=s.length>3&&typeof L=="function"?(S--,L):e,M&&Lr(p[0],p[1],M)&&(L=S<3?e:L,S=1),u=dn(u);++E-1?S[L?u[M]:M]:e}}function z0(s){return us(function(u){var p=u.length,E=p,S=gi.prototype.thru;for(s&&u.reverse();E--;){var L=u[E];if(typeof L!="function")throw new Ii(i);if(S&&!M&&tm(L)=="wrapper")var M=new gi([],!0)}for(E=M?E:p;++E1&&Pt.reverse(),me&&Hj))return!1;var fe=L.get(s),me=L.get(u);if(fe&&me)return fe==u&&me==s;var he=-1,be=!0,Ke=p&v?new Fu:e;for(L.set(s,u),L.set(u,s);++he1?"& ":"")+u[E],u=u.join(p>2?", ":" "),s.replace(sj,`{ /* [wrapped with `+u+`] */ -`)}function a$(s){return dt(s)||Uu(s)||!!(d0&&s&&s[d0])}function cs(s,u){var p=typeof s;return u=u==null?mn:u,!!u&&(p=="number"||p!="symbol"&&Ej.test(s))&&s>-1&&s%1==0&&s0){if(++u>=Se)return arguments[0]}else u=0;return s.apply(e,arguments)}}function rm(s,u){var p=-1,E=s.length,S=E-1;for(u=u===e?E:u;++p1?s[u-1]:e;return p=typeof p=="function"?(s.pop(),p):e,gA(s,p)});function _A(s){var u=P(s);return u.__chain__=!0,u}function TQ(s,u){return u(s),s}function im(s,u){return u(s)}var EQ=us(function(s){var u=s.length,p=u?s[0]:0,E=this.__wrapped__,S=function(L){return Gh(L,s)};return u>1||this.__actions__.length||!(E instanceof Ot)||!cs(p)?this.thru(S):(E=E.slice(p,+p+(u?1:0)),E.__actions__.push({func:im,args:[S],thisArg:e}),new gi(E,this.__chain__).thru(function(L){return u&&!L.length&&L.push(e),L}))});function hQ(){return _A(this)}function yQ(){return new gi(this.value(),this.__chain__)}function IQ(){this.__values__===e&&(this.__values__=UA(this.value()));var s=this.__index__>=this.__values__.length,u=s?e:this.__values__[this.__index__++];return{done:s,value:u}}function gQ(){return this}function _Q(s){for(var u,p=this;p instanceof Kf;){var E=NA(p);E.__index__=0,E.__values__=e,u?S.__wrapped__=E:u=E;var S=E;p=p.__wrapped__}return S.__wrapped__=s,u}function vQ(){var s=this.__wrapped__;if(s instanceof Ot){var u=s;return this.__actions__.length&&(u=new Ot(this)),u=u.reverse(),u.__actions__.push({func:im,args:[hy],thisArg:e}),new gi(u,this.__chain__)}return this.thru(hy)}function SQ(){return M0(this.__wrapped__,this.__actions__)}var OQ=zf(function(s,u,p){rn.call(s,p)?++s[p]:ss(s,p,1)});function DQ(s,u,p){var E=dt(s)?Wb:TG;return p&&Lr(s,u,p)&&(u=e),E(s,We(u,3))}function bQ(s,u){var p=dt(s)?jo:g0;return p(s,We(u,3))}var AQ=H0(TA),RQ=H0(EA);function PQ(s,u){return Tr(am(s,u),1)}function FQ(s,u){return Tr(am(s,u),Qt)}function wQ(s,u,p){return p=p===e?1:Nt(p),Tr(am(s,u),p)}function vA(s,u){var p=dt(s)?yi:Yo;return p(s,We(u,3))}function SA(s,u){var p=dt(s)?Wj:I0;return p(s,We(u,3))}var LQ=zf(function(s,u,p){rn.call(s,p)?s[p].push(u):ss(s,p,[u])});function CQ(s,u,p,E){s=Kr(s)?s:Wc(s),p=p&&!E?Nt(p):0;var S=s.length;return p<0&&(p=zn(S+p,0)),lm(s)?p<=S&&s.indexOf(u,p)>-1:!!S&&qc(s,u,p)>-1}var BQ=It(function(s,u,p){var E=-1,S=typeof u=="function",L=Kr(s)?ne(s.length):[];return Yo(s,function(M){L[++E]=S?ri(u,M,p):hd(M,u,p)}),L}),UQ=zf(function(s,u,p){ss(s,p,u)});function am(s,u){var p=dt(s)?In:b0;return p(s,We(u,3))}function kQ(s,u,p,E){return s==null?[]:(dt(u)||(u=u==null?[]:[u]),p=E?e:p,dt(p)||(p=p==null?[]:[p]),F0(s,u,p))}var MQ=zf(function(s,u,p){s[p?0:1].push(u)},function(){return[[],[]]});function xQ(s,u,p){var E=dt(s)?Fh:t0,S=arguments.length<3;return E(s,We(u,4),p,S,Yo)}function qQ(s,u,p){var E=dt(s)?Xj:t0,S=arguments.length<3;return E(s,We(u,4),p,S,I0)}function VQ(s,u){var p=dt(s)?jo:g0;return p(s,um(We(u,3)))}function jQ(s){var u=dt(s)?T0:CG;return u(s)}function KQ(s,u,p){(p?Lr(s,u,p):u===e)?u=1:u=Nt(u);var E=dt(s)?dG:BG;return E(s,u)}function GQ(s){var u=dt(s)?pG:kG;return u(s)}function $Q(s){if(s==null)return 0;if(Kr(s))return lm(s)?jc(s):s.length;var u=hr(s);return u==nt||u==mr?s.size:zh(s).length}function QQ(s,u,p){var E=dt(s)?wh:MG;return p&&Lr(s,u,p)&&(u=e),E(s,We(u,3))}var YQ=It(function(s,u){if(s==null)return[];var p=u.length;return p>1&&Lr(s,u[0],u[1])?u=[]:p>2&&Lr(u[0],u[1],u[2])&&(u=[u[0]]),F0(s,Tr(u,1),[])}),sm=bK||function(){return ar.Date.now()};function JQ(s,u){if(typeof u!="function")throw new Ii(i);return s=Nt(s),function(){if(--s<1)return u.apply(this,arguments)}}function OA(s,u,p){return u=p?e:u,u=s&&u==null?s.length:u,os(s,de,e,e,e,e,u)}function DA(s,u){var p;if(typeof u!="function")throw new Ii(i);return s=Nt(s),function(){return--s>0&&(p=u.apply(this,arguments)),s<=1&&(u=e),p}}var Iy=It(function(s,u,p){var E=F;if(p.length){var S=Go(p,Hc(Iy));E|=ie}return os(s,E,u,p,S)}),bA=It(function(s,u,p){var E=F|k;if(p.length){var S=Go(p,Hc(bA));E|=ie}return os(u,E,s,p,S)});function AA(s,u,p){u=p?e:u;var E=os(s,J,e,e,e,e,e,u);return E.placeholder=AA.placeholder,E}function RA(s,u,p){u=p?e:u;var E=os(s,se,e,e,e,e,e,u);return E.placeholder=RA.placeholder,E}function PA(s,u,p){var E,S,L,M,j,H,fe=0,me=!1,he=!1,be=!0;if(typeof s!="function")throw new Ii(i);u=Oi(u)||0,vn(p)&&(me=!!p.leading,he="maxWait"in p,L=he?zn(Oi(p.maxWait)||0,u):L,be="trailing"in p?!!p.trailing:be);function Ke(xn){var Zi=E,ps=S;return E=S=e,fe=xn,M=s.apply(ps,Zi),M}function Ze(xn){return fe=xn,j=vd(St,u),me?Ke(xn):M}function Et(xn){var Zi=xn-H,ps=xn-fe,HA=u-Zi;return he?Er(HA,L-ps):HA}function et(xn){var Zi=xn-H,ps=xn-fe;return H===e||Zi>=u||Zi<0||he&&ps>=L}function St(){var xn=sm();if(et(xn))return Pt(xn);j=vd(St,Et(xn))}function Pt(xn){return j=e,be&&E?Ke(xn):(E=S=e,M)}function oi(){j!==e&&q0(j),fe=0,E=H=S=j=e}function Cr(){return j===e?M:Pt(sm())}function ui(){var xn=sm(),Zi=et(xn);if(E=arguments,S=this,H=xn,Zi){if(j===e)return Ze(H);if(he)return q0(j),j=vd(St,u),Ke(H)}return j===e&&(j=vd(St,u)),M}return ui.cancel=oi,ui.flush=Cr,ui}var HQ=It(function(s,u){return y0(s,1,u)}),zQ=It(function(s,u,p){return y0(s,Oi(u)||0,p)});function WQ(s){return os(s,xe)}function om(s,u){if(typeof s!="function"||u!=null&&typeof u!="function")throw new Ii(i);var p=function(){var E=arguments,S=u?u.apply(this,E):E[0],L=p.cache;if(L.has(S))return L.get(S);var M=s.apply(this,E);return p.cache=L.set(S,M)||L,M};return p.cache=new(om.Cache||as),p}om.Cache=as;function um(s){if(typeof s!="function")throw new Ii(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 XQ(s){return DA(2,s)}var ZQ=xG(function(s,u){u=u.length==1&&dt(u[0])?In(u[0],ii(We())):In(Tr(u,1),ii(We()));var p=u.length;return It(function(E){for(var S=-1,L=Er(E.length,p);++S=u}),Uu=S0(function(){return arguments}())?S0:function(s){return Rn(s)&&rn.call(s,"callee")&&!l0.call(s,"callee")},dt=ne.isArray,m2=$b?ii($b):_G;function Kr(s){return s!=null&&cm(s.length)&&!ls(s)}function Mn(s){return Rn(s)&&Kr(s)}function N2(s){return s===!0||s===!1||Rn(s)&&wr(s)==vt}var Wo=RK||wy,T2=Qb?ii(Qb):vG;function E2(s){return Rn(s)&&s.nodeType===1&&!Sd(s)}function h2(s){if(s==null)return!0;if(Kr(s)&&(dt(s)||typeof s=="string"||typeof s.splice=="function"||Wo(s)||zc(s)||Uu(s)))return!s.length;var u=hr(s);if(u==nt||u==mr)return!s.size;if(_d(s))return!zh(s).length;for(var p in s)if(rn.call(s,p))return!1;return!0}function y2(s,u){return yd(s,u)}function I2(s,u,p){p=typeof p=="function"?p:e;var E=p?p(s,u):e;return E===e?yd(s,u,e,p):!!E}function _y(s){if(!Rn(s))return!1;var u=wr(s);return u==qe||u==oe||typeof s.message=="string"&&typeof s.name=="string"&&!Sd(s)}function g2(s){return typeof s=="number"&&p0(s)}function ls(s){if(!vn(s))return!1;var u=wr(s);return u==Ye||u==Ut||u==Ce||u==Mc}function wA(s){return typeof s=="number"&&s==Nt(s)}function cm(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=mn}function vn(s){var u=typeof s;return s!=null&&(u=="object"||u=="function")}function Rn(s){return s!=null&&typeof s=="object"}var LA=Yb?ii(Yb):OG;function _2(s,u){return s===u||Hh(s,u,py(u))}function v2(s,u,p){return p=typeof p=="function"?p:e,Hh(s,u,py(u),p)}function S2(s){return CA(s)&&s!=+s}function O2(s){if(u$(s))throw new ut(r);return O0(s)}function D2(s){return s===null}function b2(s){return s==null}function CA(s){return typeof s=="number"||Rn(s)&&wr(s)==Rt}function Sd(s){if(!Rn(s)||wr(s)!=Vr)return!1;var u=Uf(s);if(u===null)return!0;var p=rn.call(u,"constructor")&&u.constructor;return typeof p=="function"&&p instanceof p&&wf.call(p)==vK}var vy=Jb?ii(Jb):DG;function A2(s){return wA(s)&&s>=-mn&&s<=mn}var BA=Hb?ii(Hb):bG;function lm(s){return typeof s=="string"||!dt(s)&&Rn(s)&&wr(s)==ni}function si(s){return typeof s=="symbol"||Rn(s)&&wr(s)==Vt}var zc=zb?ii(zb):AG;function R2(s){return s===e}function P2(s){return Rn(s)&&hr(s)==Du}function F2(s){return Rn(s)&&wr(s)==_a}var w2=em(Wh),L2=em(function(s,u){return s<=u});function UA(s){if(!s)return[];if(Kr(s))return lm(s)?zi(s):jr(s);if(dd&&s[dd])return dK(s[dd]());var u=hr(s),p=u==nt?Mh:u==mr?Rf:Wc;return p(s)}function ds(s){if(!s)return s===0?s:0;if(s=Oi(s),s===Qt||s===-Qt){var u=s<0?-1:1;return u*Pr}return s===s?s:0}function Nt(s){var u=ds(s),p=u%1;return u===u?p?u-p:u:0}function kA(s){return s?wu(Nt(s),0,kn):0}function Oi(s){if(typeof s=="number")return s;if(si(s))return Fr;if(vn(s)){var u=typeof s.valueOf=="function"?s.valueOf():s;s=vn(u)?u+"":u}if(typeof s!="string")return s===0?s:+s;s=n0(s);var p=mj.test(s);return p||Tj.test(s)?Jj(s.slice(2),p?2:8):fj.test(s)?Fr:+s}function MA(s){return Sa(s,Gr(s))}function C2(s){return s?wu(Nt(s),-mn,mn):s===0?s:0}function Wt(s){return s==null?"":ai(s)}var B2=Yc(function(s,u){if(_d(u)||Kr(u)){Sa(u,sr(u),s);return}for(var p in u)rn.call(u,p)&&Td(s,p,u[p])}),xA=Yc(function(s,u){Sa(u,Gr(u),s)}),dm=Yc(function(s,u,p,E){Sa(u,Gr(u),s,E)}),U2=Yc(function(s,u,p,E){Sa(u,sr(u),s,E)}),k2=us(Gh);function M2(s,u){var p=Qc(s);return u==null?p:E0(p,u)}var x2=It(function(s,u){s=dn(s);var p=-1,E=u.length,S=E>2?u[2]:e;for(S&&Lr(u[0],u[1],S)&&(E=1);++p1),L}),Sa(s,ly(s),p),E&&(p=_i(p,d|f|y,zG));for(var S=u.length;S--;)ny(p,u[S]);return p});function rY(s,u){return VA(s,um(We(u)))}var iY=us(function(s,u){return s==null?{}:FG(s,u)});function VA(s,u){if(s==null)return{};var p=In(ly(s),function(E){return[E]});return u=We(u),w0(s,p,function(E,S){return u(E,S[0])})}function aY(s,u,p){u=Ho(u,s);var E=-1,S=u.length;for(S||(S=1,s=e);++Eu){var E=s;s=u,u=E}if(p||s%1||u%1){var S=f0();return Er(s+S*(u-s+Yj("1e-"+((S+"").length-1))),u)}return Zh(s,u)}var TY=Jc(function(s,u,p){return u=u.toLowerCase(),s+(p?GA(u):u)});function GA(s){return Dy(Wt(s).toLowerCase())}function $A(s){return s=Wt(s),s&&s.replace(hj,sK).replace(kj,"")}function EY(s,u,p){s=Wt(s),u=ai(u);var E=s.length;p=p===e?E:wu(Nt(p),0,E);var S=p;return p-=u.length,p>=0&&s.slice(p,S)==u}function hY(s){return s=Wt(s),s&&X1.test(s)?s.replace(_b,oK):s}function yY(s){return s=Wt(s),s&&ij.test(s)?s.replace(gh,"\\$&"):s}var IY=Jc(function(s,u,p){return s+(p?"-":"")+u.toLowerCase()}),gY=Jc(function(s,u,p){return s+(p?" ":"")+u.toLowerCase()}),_Y=J0("toLowerCase");function vY(s,u,p){s=Wt(s),u=Nt(u);var E=u?jc(s):0;if(!u||E>=u)return s;var S=(u-E)/2;return Zf(qf(S),p)+s+Zf(xf(S),p)}function SY(s,u,p){s=Wt(s),u=Nt(u);var E=u?jc(s):0;return u&&E>>0,p?(s=Wt(s),s&&(typeof u=="string"||u!=null&&!vy(u))&&(u=ai(u),!u&&Vc(s))?zo(zi(s),0,p):s.split(u,p)):[]}var FY=Jc(function(s,u,p){return s+(p?" ":"")+Dy(u)});function wY(s,u,p){return s=Wt(s),p=p==null?0:wu(Nt(p),0,s.length),u=ai(u),s.slice(p,p+u.length)==u}function LY(s,u,p){var E=P.templateSettings;p&&Lr(s,u,p)&&(u=e),s=Wt(s),u=dm({},u,E,tA);var S=dm({},u.imports,E.imports,tA),L=sr(S),M=kh(S,L),j,H,fe=0,me=u.interpolate||Sf,he="__p += '",be=xh((u.escape||Sf).source+"|"+me.source+"|"+(me===vb?pj:Sf).source+"|"+(u.evaluate||Sf).source+"|$","g"),Ke="//# sourceURL="+(rn.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++jj+"]")+` +`)}function a$(s){return dt(s)||Uu(s)||!!(d0&&s&&s[d0])}function cs(s,u){var p=typeof s;return u=u==null?mn:u,!!u&&(p=="number"||p!="symbol"&&Ej.test(s))&&s>-1&&s%1==0&&s0){if(++u>=Se)return arguments[0]}else u=0;return s.apply(e,arguments)}}function rm(s,u){var p=-1,E=s.length,S=E-1;for(u=u===e?E:u;++p1?s[u-1]:e;return p=typeof p=="function"?(s.pop(),p):e,gA(s,p)});function _A(s){var u=P(s);return u.__chain__=!0,u}function TQ(s,u){return u(s),s}function im(s,u){return u(s)}var EQ=us(function(s){var u=s.length,p=u?s[0]:0,E=this.__wrapped__,S=function(L){return Gh(L,s)};return u>1||this.__actions__.length||!(E instanceof Ot)||!cs(p)?this.thru(S):(E=E.slice(p,+p+(u?1:0)),E.__actions__.push({func:im,args:[S],thisArg:e}),new gi(E,this.__chain__).thru(function(L){return u&&!L.length&&L.push(e),L}))});function hQ(){return _A(this)}function yQ(){return new gi(this.value(),this.__chain__)}function IQ(){this.__values__===e&&(this.__values__=UA(this.value()));var s=this.__index__>=this.__values__.length,u=s?e:this.__values__[this.__index__++];return{done:s,value:u}}function gQ(){return this}function _Q(s){for(var u,p=this;p instanceof Kf;){var E=NA(p);E.__index__=0,E.__values__=e,u?S.__wrapped__=E:u=E;var S=E;p=p.__wrapped__}return S.__wrapped__=s,u}function vQ(){var s=this.__wrapped__;if(s instanceof Ot){var u=s;return this.__actions__.length&&(u=new Ot(this)),u=u.reverse(),u.__actions__.push({func:im,args:[hy],thisArg:e}),new gi(u,this.__chain__)}return this.thru(hy)}function SQ(){return M0(this.__wrapped__,this.__actions__)}var OQ=zf(function(s,u,p){rn.call(s,p)?++s[p]:ss(s,p,1)});function DQ(s,u,p){var E=dt(s)?Wb:TG;return p&&Lr(s,u,p)&&(u=e),E(s,We(u,3))}function bQ(s,u){var p=dt(s)?jo:g0;return p(s,We(u,3))}var AQ=H0(TA),RQ=H0(EA);function PQ(s,u){return Tr(am(s,u),1)}function FQ(s,u){return Tr(am(s,u),Qt)}function wQ(s,u,p){return p=p===e?1:Nt(p),Tr(am(s,u),p)}function vA(s,u){var p=dt(s)?yi:Yo;return p(s,We(u,3))}function SA(s,u){var p=dt(s)?Wj:I0;return p(s,We(u,3))}var LQ=zf(function(s,u,p){rn.call(s,p)?s[p].push(u):ss(s,p,[u])});function CQ(s,u,p,E){s=Kr(s)?s:Xc(s),p=p&&!E?Nt(p):0;var S=s.length;return p<0&&(p=zn(S+p,0)),lm(s)?p<=S&&s.indexOf(u,p)>-1:!!S&&Vc(s,u,p)>-1}var BQ=It(function(s,u,p){var E=-1,S=typeof u=="function",L=Kr(s)?ne(s.length):[];return Yo(s,function(M){L[++E]=S?ri(u,M,p):hd(M,u,p)}),L}),UQ=zf(function(s,u,p){ss(s,p,u)});function am(s,u){var p=dt(s)?In:b0;return p(s,We(u,3))}function kQ(s,u,p,E){return s==null?[]:(dt(u)||(u=u==null?[]:[u]),p=E?e:p,dt(p)||(p=p==null?[]:[p]),F0(s,u,p))}var MQ=zf(function(s,u,p){s[p?0:1].push(u)},function(){return[[],[]]});function xQ(s,u,p){var E=dt(s)?Fh:t0,S=arguments.length<3;return E(s,We(u,4),p,S,Yo)}function qQ(s,u,p){var E=dt(s)?Xj:t0,S=arguments.length<3;return E(s,We(u,4),p,S,I0)}function VQ(s,u){var p=dt(s)?jo:g0;return p(s,um(We(u,3)))}function jQ(s){var u=dt(s)?T0:CG;return u(s)}function KQ(s,u,p){(p?Lr(s,u,p):u===e)?u=1:u=Nt(u);var E=dt(s)?dG:BG;return E(s,u)}function GQ(s){var u=dt(s)?pG:kG;return u(s)}function $Q(s){if(s==null)return 0;if(Kr(s))return lm(s)?Kc(s):s.length;var u=hr(s);return u==nt||u==mr?s.size:zh(s).length}function QQ(s,u,p){var E=dt(s)?wh:MG;return p&&Lr(s,u,p)&&(u=e),E(s,We(u,3))}var YQ=It(function(s,u){if(s==null)return[];var p=u.length;return p>1&&Lr(s,u[0],u[1])?u=[]:p>2&&Lr(u[0],u[1],u[2])&&(u=[u[0]]),F0(s,Tr(u,1),[])}),sm=bK||function(){return ar.Date.now()};function JQ(s,u){if(typeof u!="function")throw new Ii(i);return s=Nt(s),function(){if(--s<1)return u.apply(this,arguments)}}function OA(s,u,p){return u=p?e:u,u=s&&u==null?s.length:u,os(s,de,e,e,e,e,u)}function DA(s,u){var p;if(typeof u!="function")throw new Ii(i);return s=Nt(s),function(){return--s>0&&(p=u.apply(this,arguments)),s<=1&&(u=e),p}}var Iy=It(function(s,u,p){var E=F;if(p.length){var S=Go(p,zc(Iy));E|=ie}return os(s,E,u,p,S)}),bA=It(function(s,u,p){var E=F|k;if(p.length){var S=Go(p,zc(bA));E|=ie}return os(u,E,s,p,S)});function AA(s,u,p){u=p?e:u;var E=os(s,J,e,e,e,e,e,u);return E.placeholder=AA.placeholder,E}function RA(s,u,p){u=p?e:u;var E=os(s,se,e,e,e,e,e,u);return E.placeholder=RA.placeholder,E}function PA(s,u,p){var E,S,L,M,j,H,fe=0,me=!1,he=!1,be=!0;if(typeof s!="function")throw new Ii(i);u=Oi(u)||0,vn(p)&&(me=!!p.leading,he="maxWait"in p,L=he?zn(Oi(p.maxWait)||0,u):L,be="trailing"in p?!!p.trailing:be);function Ke(xn){var Zi=E,ps=S;return E=S=e,fe=xn,M=s.apply(ps,Zi),M}function Ze(xn){return fe=xn,j=vd(St,u),me?Ke(xn):M}function Et(xn){var Zi=xn-H,ps=xn-fe,HA=u-Zi;return he?Er(HA,L-ps):HA}function et(xn){var Zi=xn-H,ps=xn-fe;return H===e||Zi>=u||Zi<0||he&&ps>=L}function St(){var xn=sm();if(et(xn))return Pt(xn);j=vd(St,Et(xn))}function Pt(xn){return j=e,be&&E?Ke(xn):(E=S=e,M)}function oi(){j!==e&&q0(j),fe=0,E=H=S=j=e}function Cr(){return j===e?M:Pt(sm())}function ui(){var xn=sm(),Zi=et(xn);if(E=arguments,S=this,H=xn,Zi){if(j===e)return Ze(H);if(he)return q0(j),j=vd(St,u),Ke(H)}return j===e&&(j=vd(St,u)),M}return ui.cancel=oi,ui.flush=Cr,ui}var HQ=It(function(s,u){return y0(s,1,u)}),zQ=It(function(s,u,p){return y0(s,Oi(u)||0,p)});function WQ(s){return os(s,xe)}function om(s,u){if(typeof s!="function"||u!=null&&typeof u!="function")throw new Ii(i);var p=function(){var E=arguments,S=u?u.apply(this,E):E[0],L=p.cache;if(L.has(S))return L.get(S);var M=s.apply(this,E);return p.cache=L.set(S,M)||L,M};return p.cache=new(om.Cache||as),p}om.Cache=as;function um(s){if(typeof s!="function")throw new Ii(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 XQ(s){return DA(2,s)}var ZQ=xG(function(s,u){u=u.length==1&&dt(u[0])?In(u[0],ii(We())):In(Tr(u,1),ii(We()));var p=u.length;return It(function(E){for(var S=-1,L=Er(E.length,p);++S=u}),Uu=S0(function(){return arguments}())?S0:function(s){return Rn(s)&&rn.call(s,"callee")&&!l0.call(s,"callee")},dt=ne.isArray,m2=$b?ii($b):_G;function Kr(s){return s!=null&&cm(s.length)&&!ls(s)}function Mn(s){return Rn(s)&&Kr(s)}function N2(s){return s===!0||s===!1||Rn(s)&&wr(s)==vt}var Wo=RK||wy,T2=Qb?ii(Qb):vG;function E2(s){return Rn(s)&&s.nodeType===1&&!Sd(s)}function h2(s){if(s==null)return!0;if(Kr(s)&&(dt(s)||typeof s=="string"||typeof s.splice=="function"||Wo(s)||Wc(s)||Uu(s)))return!s.length;var u=hr(s);if(u==nt||u==mr)return!s.size;if(_d(s))return!zh(s).length;for(var p in s)if(rn.call(s,p))return!1;return!0}function y2(s,u){return yd(s,u)}function I2(s,u,p){p=typeof p=="function"?p:e;var E=p?p(s,u):e;return E===e?yd(s,u,e,p):!!E}function _y(s){if(!Rn(s))return!1;var u=wr(s);return u==qe||u==oe||typeof s.message=="string"&&typeof s.name=="string"&&!Sd(s)}function g2(s){return typeof s=="number"&&p0(s)}function ls(s){if(!vn(s))return!1;var u=wr(s);return u==Ye||u==Ut||u==Ce||u==xc}function wA(s){return typeof s=="number"&&s==Nt(s)}function cm(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=mn}function vn(s){var u=typeof s;return s!=null&&(u=="object"||u=="function")}function Rn(s){return s!=null&&typeof s=="object"}var LA=Yb?ii(Yb):OG;function _2(s,u){return s===u||Hh(s,u,py(u))}function v2(s,u,p){return p=typeof p=="function"?p:e,Hh(s,u,py(u),p)}function S2(s){return CA(s)&&s!=+s}function O2(s){if(u$(s))throw new ut(r);return O0(s)}function D2(s){return s===null}function b2(s){return s==null}function CA(s){return typeof s=="number"||Rn(s)&&wr(s)==Rt}function Sd(s){if(!Rn(s)||wr(s)!=Vr)return!1;var u=Uf(s);if(u===null)return!0;var p=rn.call(u,"constructor")&&u.constructor;return typeof p=="function"&&p instanceof p&&wf.call(p)==vK}var vy=Jb?ii(Jb):DG;function A2(s){return wA(s)&&s>=-mn&&s<=mn}var BA=Hb?ii(Hb):bG;function lm(s){return typeof s=="string"||!dt(s)&&Rn(s)&&wr(s)==ni}function si(s){return typeof s=="symbol"||Rn(s)&&wr(s)==Vt}var Wc=zb?ii(zb):AG;function R2(s){return s===e}function P2(s){return Rn(s)&&hr(s)==Du}function F2(s){return Rn(s)&&wr(s)==_a}var w2=em(Wh),L2=em(function(s,u){return s<=u});function UA(s){if(!s)return[];if(Kr(s))return lm(s)?zi(s):jr(s);if(dd&&s[dd])return dK(s[dd]());var u=hr(s),p=u==nt?Mh:u==mr?Rf:Xc;return p(s)}function ds(s){if(!s)return s===0?s:0;if(s=Oi(s),s===Qt||s===-Qt){var u=s<0?-1:1;return u*Pr}return s===s?s:0}function Nt(s){var u=ds(s),p=u%1;return u===u?p?u-p:u:0}function kA(s){return s?wu(Nt(s),0,kn):0}function Oi(s){if(typeof s=="number")return s;if(si(s))return Fr;if(vn(s)){var u=typeof s.valueOf=="function"?s.valueOf():s;s=vn(u)?u+"":u}if(typeof s!="string")return s===0?s:+s;s=n0(s);var p=mj.test(s);return p||Tj.test(s)?Jj(s.slice(2),p?2:8):fj.test(s)?Fr:+s}function MA(s){return Sa(s,Gr(s))}function C2(s){return s?wu(Nt(s),-mn,mn):s===0?s:0}function Wt(s){return s==null?"":ai(s)}var B2=Jc(function(s,u){if(_d(u)||Kr(u)){Sa(u,sr(u),s);return}for(var p in u)rn.call(u,p)&&Td(s,p,u[p])}),xA=Jc(function(s,u){Sa(u,Gr(u),s)}),dm=Jc(function(s,u,p,E){Sa(u,Gr(u),s,E)}),U2=Jc(function(s,u,p,E){Sa(u,sr(u),s,E)}),k2=us(Gh);function M2(s,u){var p=Yc(s);return u==null?p:E0(p,u)}var x2=It(function(s,u){s=dn(s);var p=-1,E=u.length,S=E>2?u[2]:e;for(S&&Lr(u[0],u[1],S)&&(E=1);++p1),L}),Sa(s,ly(s),p),E&&(p=_i(p,d|f|y,zG));for(var S=u.length;S--;)ny(p,u[S]);return p});function rY(s,u){return VA(s,um(We(u)))}var iY=us(function(s,u){return s==null?{}:FG(s,u)});function VA(s,u){if(s==null)return{};var p=In(ly(s),function(E){return[E]});return u=We(u),w0(s,p,function(E,S){return u(E,S[0])})}function aY(s,u,p){u=Ho(u,s);var E=-1,S=u.length;for(S||(S=1,s=e);++Eu){var E=s;s=u,u=E}if(p||s%1||u%1){var S=f0();return Er(s+S*(u-s+Yj("1e-"+((S+"").length-1))),u)}return Zh(s,u)}var TY=Hc(function(s,u,p){return u=u.toLowerCase(),s+(p?GA(u):u)});function GA(s){return Dy(Wt(s).toLowerCase())}function $A(s){return s=Wt(s),s&&s.replace(hj,sK).replace(kj,"")}function EY(s,u,p){s=Wt(s),u=ai(u);var E=s.length;p=p===e?E:wu(Nt(p),0,E);var S=p;return p-=u.length,p>=0&&s.slice(p,S)==u}function hY(s){return s=Wt(s),s&&X1.test(s)?s.replace(_b,oK):s}function yY(s){return s=Wt(s),s&&ij.test(s)?s.replace(gh,"\\$&"):s}var IY=Hc(function(s,u,p){return s+(p?"-":"")+u.toLowerCase()}),gY=Hc(function(s,u,p){return s+(p?" ":"")+u.toLowerCase()}),_Y=J0("toLowerCase");function vY(s,u,p){s=Wt(s),u=Nt(u);var E=u?Kc(s):0;if(!u||E>=u)return s;var S=(u-E)/2;return Zf(qf(S),p)+s+Zf(xf(S),p)}function SY(s,u,p){s=Wt(s),u=Nt(u);var E=u?Kc(s):0;return u&&E>>0,p?(s=Wt(s),s&&(typeof u=="string"||u!=null&&!vy(u))&&(u=ai(u),!u&&jc(s))?zo(zi(s),0,p):s.split(u,p)):[]}var FY=Hc(function(s,u,p){return s+(p?" ":"")+Dy(u)});function wY(s,u,p){return s=Wt(s),p=p==null?0:wu(Nt(p),0,s.length),u=ai(u),s.slice(p,p+u.length)==u}function LY(s,u,p){var E=P.templateSettings;p&&Lr(s,u,p)&&(u=e),s=Wt(s),u=dm({},u,E,tA);var S=dm({},u.imports,E.imports,tA),L=sr(S),M=kh(S,L),j,H,fe=0,me=u.interpolate||Sf,he="__p += '",be=xh((u.escape||Sf).source+"|"+me.source+"|"+(me===vb?pj:Sf).source+"|"+(u.evaluate||Sf).source+"|$","g"),Ke="//# sourceURL="+(rn.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++jj+"]")+` `;s.replace(be,function(et,St,Pt,oi,Cr,ui){return Pt||(Pt=oi),he+=s.slice(fe,ui).replace(yj,uK),St&&(j=!0,he+=`' + __e(`+St+`) + '`),Cr&&(H=!0,he+=`'; @@ -471,10 +471,10 @@ __p += '`),Pt&&(he+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+he+`return __p -}`;var Et=YA(function(){return Yt(L,Ke+"return "+he).apply(e,M)});if(Et.source=he,_y(Et))throw Et;return Et}function CY(s){return Wt(s).toLowerCase()}function BY(s){return Wt(s).toUpperCase()}function UY(s,u,p){if(s=Wt(s),s&&(p||u===e))return n0(s);if(!s||!(u=ai(u)))return s;var E=zi(s),S=zi(u),L=r0(E,S),M=i0(E,S)+1;return zo(E,L,M).join("")}function kY(s,u,p){if(s=Wt(s),s&&(p||u===e))return s.slice(0,s0(s)+1);if(!s||!(u=ai(u)))return s;var E=zi(s),S=i0(E,zi(u))+1;return zo(E,0,S).join("")}function MY(s,u,p){if(s=Wt(s),s&&(p||u===e))return s.replace(_h,"");if(!s||!(u=ai(u)))return s;var E=zi(s),S=r0(E,zi(u));return zo(E,S).join("")}function xY(s,u){var p=tt,E=ee;if(vn(u)){var S="separator"in u?u.separator:S;p="length"in u?Nt(u.length):p,E="omission"in u?ai(u.omission):E}s=Wt(s);var L=s.length;if(Vc(s)){var M=zi(s);L=M.length}if(p>=L)return s;var j=p-jc(E);if(j<1)return E;var H=M?zo(M,0,j).join(""):s.slice(0,j);if(S===e)return H+E;if(M&&(j+=H.length-j),vy(S)){if(s.slice(j).search(S)){var fe,me=H;for(S.global||(S=xh(S.source,Wt(Sb.exec(S))+"g")),S.lastIndex=0;fe=S.exec(me);)var he=fe.index;H=H.slice(0,he===e?j:he)}}else if(s.indexOf(ai(S),j)!=j){var be=H.lastIndexOf(S);be>-1&&(H=H.slice(0,be))}return H+E}function qY(s){return s=Wt(s),s&&W1.test(s)?s.replace(gb,NK):s}var VY=Jc(function(s,u,p){return s+(p?" ":"")+u.toUpperCase()}),Dy=J0("toUpperCase");function QA(s,u,p){return s=Wt(s),u=p?e:u,u===e?lK(s)?hK(s):tK(s):s.match(u)||[]}var YA=It(function(s,u){try{return ri(s,e,u)}catch(p){return _y(p)?p:new ut(p)}}),jY=us(function(s,u){return yi(u,function(p){p=Oa(p),ss(s,p,Iy(s[p],s))}),s});function KY(s){var u=s==null?0:s.length,p=We();return s=u?In(s,function(E){if(typeof E[1]!="function")throw new Ii(i);return[p(E[0]),E[1]]}):[],It(function(E){for(var S=-1;++Smn)return[];var p=kn,E=Er(s,kn);u=We(u),s-=kn;for(var S=Uh(E,u);++p0||u<0)?new Ot(p):(s<0?p=p.takeRight(-s):s&&(p=p.drop(s)),u!==e&&(u=Nt(u),p=u<0?p.dropRight(-u):p.take(u-s)),p)},Ot.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Ot.prototype.toArray=function(){return this.take(kn)},va(Ot.prototype,function(s,u){var p=/^(?:filter|find|map|reject)|While$/.test(u),E=/^(?:head|last)$/.test(u),S=P[E?"take"+(u=="last"?"Right":""):u],L=E||/^find/.test(u);S&&(P.prototype[u]=function(){var M=this.__wrapped__,j=E?[1]:arguments,H=M instanceof Ot,fe=j[0],me=H||dt(M),he=function(St){var Pt=S.apply(P,Ko([St],j));return E&&be?Pt[0]:Pt};me&&p&&typeof fe=="function"&&fe.length!=1&&(H=me=!1);var be=this.__chain__,Ke=!!this.__actions__.length,Ze=L&&!be,Et=H&&!Ke;if(!L&&me){M=Et?M:new Ot(this);var et=s.apply(M,j);return et.__actions__.push({func:im,args:[he],thisArg:e}),new gi(et,be)}return Ze&&Et?s.apply(this,j):(et=this.thru(he),Ze?E?et.value()[0]:et.value():et)})}),yi(["pop","push","shift","sort","splice","unshift"],function(s){var u=Pf[s],p=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",E=/^(?:pop|shift)$/.test(s);P.prototype[s]=function(){var S=arguments;if(E&&!this.__chain__){var L=this.value();return u.apply(dt(L)?L:[],S)}return this[p](function(M){return u.apply(dt(M)?M:[],S)})}}),va(Ot.prototype,function(s,u){var p=P[u];if(p){var E=p.name+"";rn.call($c,E)||($c[E]=[]),$c[E].push({name:u,func:p})}}),$c[Wf(e,k).name]=[{name:"wrapper",func:e}],Ot.prototype.clone=qK,Ot.prototype.reverse=VK,Ot.prototype.value=jK,P.prototype.at=EQ,P.prototype.chain=hQ,P.prototype.commit=yQ,P.prototype.next=IQ,P.prototype.plant=_Q,P.prototype.reverse=vQ,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=SQ,P.prototype.first=P.prototype.head,dd&&(P.prototype[dd]=gQ),P},$o=yK();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ar._=$o,define(function(){return $o})):Au?((Au.exports=$o)._=$o,Ah._=$o):ar._=$o}).call(Xl)});var _V=w(Rc=>{"use strict";m();T();N();Object.defineProperty(Rc,"__esModule",{value:!0});Rc.FederationFactory=void 0;Rc.federateSubgraphs=sde;Rc.federateSubgraphsWithContracts=ode;Rc.federateSubgraphsContract=ude;var Pe=Ae(),hV=du(),Mr=Hr(),Fe=Mi(),Ac=VN(),yV=jp(),xr=Jp(),KE=iE(),Bt=Ss(),nde=hD(),rde=Hp(),IV=Sp(),Ie=vl(),ide=gD(),gV=EV(),Zl=jE(),_e=vr(),GE=Il(),Ee=Sr(),ade=zp(),$E=class{constructor({authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,disableResolvabilityValidation:r,entityDataByTypeName:i,entityInterfaceFederationDataByTypeName:a,fieldCoordsByNamedTypeName:o,internalGraph:c,internalSubgraphBySubgraphName:l,warnings:d}){_(this,"authorizationDataByParentTypeName");_(this,"coordsByNamedTypeName",new Map);_(this,"disableResolvabilityValidation",!1);_(this,"clientDefinitions",[Bt.DEPRECATED_DEFINITION]);_(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([[_e.AUTHENTICATED,Bt.AUTHENTICATED_DEFINITION],[_e.DEPRECATED,Bt.DEPRECATED_DEFINITION],[_e.INACCESSIBLE,Bt.INACCESSIBLE_DEFINITION],[_e.ONE_OF,Bt.ONE_OF_DEFINITION],[_e.REQUIRES_SCOPES,Bt.REQUIRES_SCOPES_DEFINITION],[_e.SEMANTIC_NON_NULL,Bt.SEMANTIC_NON_NULL_DEFINITION],[_e.TAG,Bt.TAG_DEFINITION]]));_(this,"persistedDirectiveDefinitions",new Set([_e.AUTHENTICATED,_e.DEPRECATED,_e.INACCESSIBLE,_e.TAG,_e.REQUIRES_SCOPES]));_(this,"potentialPersistedDirectiveDefinitionDataByDirectiveName",new Map);_(this,"referencedPersistedDirectiveNames",new Set);_(this,"routerDefinitions",[Bt.DEPRECATED_DEFINITION,Bt.TAG_DEFINITION]);_(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}getValidImplementedInterfaces(t){var o;let n=[];if(t.implementedInterfaceTypeNames.size<1)return n;let r=(0,Ie.isNodeDataInaccessible)(t),i=new Map,a=new Map;for(let c of t.implementedInterfaceTypeNames){n.push((0,Mr.stringToNamedTypeNode)(c));let l=(0,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,c,_e.PARENT_DEFINITION_DATA);if(l.kind!==Pe.Kind.INTERFACE_TYPE_DEFINITION){a.set(l.name,(0,Ee.kindToNodeType)(l.kind));continue}let d={invalidFieldImplementations:new Map,unimplementedFields:[]},f=!1;for(let[y,I]of l.fieldDataByName){let v=!1,F=t.fieldDataByName.get(y);if(!F){f=!0,d.unimplementedFields.push(y);continue}let k={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,KE.printTypeNode)(I.node.type),unimplementedArguments:new Set};(0,Ie.isTypeValidImplementation)(I.node.type,F.node.type,this.concreteTypeNamesByAbstractTypeName)||(f=!0,v=!0,k.implementedResponseType=(0,KE.printTypeNode)(F.node.type));let K=new Set;for(let[J,se]of I.argumentDataByName){let ie=se.node;K.add(J);let Te=(o=F.argumentDataByName.get(J))==null?void 0:o.node;if(!Te){f=!0,v=!0,k.unimplementedArguments.add(J);continue}let de=(0,KE.printTypeNode)(Te.type),Re=(0,KE.printTypeNode)(ie.type);Re!==de&&(f=!0,v=!0,k.invalidImplementedArguments.push({actualType:de,argumentName:J,expectedType:Re}))}for(let[J,se]of F.argumentDataByName){let ie=se.node;K.has(J)||ie.type.kind===Pe.Kind.NON_NULL_TYPE&&(f=!0,v=!0,k.invalidAdditionalArguments.add(J))}!r&&F.isInaccessible&&!I.isInaccessible&&(f=!0,v=!0,k.isInaccessible=!0),v&&d.invalidFieldImplementations.set(y,k)}f&&i.set(c,d)}return a.size>0&&this.errors.push((0,Fe.invalidImplementedTypeError)(t.name,a)),i.size>0&&this.errors.push((0,Fe.invalidInterfaceImplementationError)(t.node.name.value,(0,Ee.kindToNodeType)(t.kind),i)),n}addValidPrimaryKeyTargetsToEntityData(t){var f;let n=this.entityDataByTypeName.get(t);if(!n)return;let r=(0,Ee.getOrThrowError)(this.internalSubgraphBySubgraphName,this.currentSubgraphName,"internalSubgraphBySubgraphName"),i=r.parentDefinitionDataByTypeName,a=i.get(n.typeName);if(!a||a.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION)throw(0,Fe.incompatibleParentKindFatalError)(n.typeName,Pe.Kind.OBJECT_TYPE_DEFINITION,(a==null?void 0:a.kind)||Pe.Kind.NULL);let o=r.configurationDataByTypeName.get(n.typeName);if(!o)return;let c=[],l=this.internalGraph.nodeByNodeName.get(`${this.currentSubgraphName}.${n.typeName}`);(0,Ac.validateImplicitFieldSets)({conditionalFieldDataByCoords:r.conditionalFieldDataByCoordinates,currentSubgraphName:this.currentSubgraphName,entityData:n,implicitKeys:c,objectData:a,parentDefinitionDataByTypeName:i,graphNode:l});for(let[y,I]of this.entityInterfaceFederationDataByTypeName){if(!((f=I.concreteTypeNames)!=null&&f.has(n.typeName)))continue;let v=this.entityDataByTypeName.get(y);v&&(0,Ac.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(y=>y.selectionSet));for(let y of c)d.has(y.selectionSet)||(o.keys.push(y),d.add(y.selectionSet))}addValidPrimaryKeyTargetsFromInterfaceObject(t,n,r,i){let a=t.parentDefinitionDataByTypeName,o=a.get(n);if(!o||!(0,Ie.isParentDataCompositeOutputType)(o))throw(0,Fe.incompatibleParentKindFatalError)(n,Pe.Kind.INTERFACE_TYPE_DEFINITION,(o==null?void 0:o.kind)||Pe.Kind.NULL);let c=(0,Ee.getOrThrowError)(t.configurationDataByTypeName,r.typeName,"internalSubgraph.configurationDataByTypeName"),l=[];if((0,Ac.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(f=>f.selectionSet));for(let f of l)d.has(f.selectionSet)||(c.keys.push(f),d.add(f.selectionSet))}getEnumValueMergeMethod(t){return this.namedInputValueTypeNames.has(t)?this.namedOutputTypeNames.has(t)?Ie.MergeMethod.CONSISTENT:Ie.MergeMethod.INTERSECTION:Ie.MergeMethod.UNION}generateTagData(){for(let[t,n]of this.tagNamesByCoords){let r=t.split(".");if(r.length<1)continue;let i=(0,Ee.getValueOrDefault)(this.parentTagDataByTypeName,r[0],()=>(0,Ac.newParentTagData)(r[0]));switch(r.length){case 1:for(let l of n)i.tagNames.add(l);break;case 2:let a=(0,Ee.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Ac.newChildTagData)(r[1]));for(let l of n)a.tagNames.add(l);break;case 3:let o=(0,Ee.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Ac.newChildTagData)(r[1])),c=(0,Ee.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);(0,Ie.extractPersistedDirectives)(a.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName);let o=(0,Ie.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,Ee.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,Ie.setLongestDescription)(a,n),(0,Ee.addIterableValuesToSet)(n.subgraphNames,a.subgraphNames)}upsertInputValueData(t,n,r,i){let a=t.get(n.name),o=a||this.copyInputValueData(n);if((0,Ie.extractPersistedDirectives)(o.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.recordTagNamesByCoords(o,`${r}.${o.name}`),this.namedInputValueTypeNames.add(o.namedTypeName),(0,Ee.getValueOrDefault)(this.coordsByNamedTypeName,o.namedTypeName,()=>new Set).add(o.federatedCoords),!a){t.set(o.name,o);return}(0,Ee.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,o.configureDescriptionDataBySubgraphName),(0,Ie.setLongestDescription)(o,n),(0,Ee.addIterableValuesToSet)(n.requiredSubgraphNames,o.requiredSubgraphNames),(0,Ee.addIterableValuesToSet)(n.subgraphNames,o.subgraphNames),this.handleInputValueInaccessibility(i,o,r);let c=(0,Zl.getMostRestrictiveMergedTypeNode)(o.type,n.type,o.originalCoords,this.errors);c.success?o.type=c.typeNode:this.errors.push((0,Fe.incompatibleMergedTypesError)({actualType:c.actualType,isArgument:a.isArgument,coords:a.federatedCoords,expectedType:c.expectedType})),(0,Ie.compareAndValidateInputValueDefaultValues)(o,n,this.errors)}handleInputValueInaccessibility(t,n,r){if(t){this.inaccessibleRequiredInputValueErrorByCoords.delete(n.federatedCoords),this.inaccessibleCoords.add(n.federatedCoords);return}if((0,Ie.isNodeDataInaccessible)(n)){if((0,Ie.isTypeRequired)(n.type)){this.inaccessibleRequiredInputValueErrorByCoords.set(n.federatedCoords,(0,Fe.inaccessibleRequiredInputValueError)(n,r));return}this.inaccessibleCoords.add(n.federatedCoords)}}handleSubscriptionFilterDirective(t,n){let r=t.directivesByDirectiveName.get(_e.SUBSCRIPTION_FILTER);if(!r)return;let i=(0,Ee.getFirstEntry)(t.subgraphNames);if(i===void 0){this.errors.push((0,Fe.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,hV.getMutableTypeNode)(n,r,this.errors);let a={kind:t.kind},o=Zl.DivergentType.NONE,c=a;for(let l=0;lnew Set))}upsertFieldData(t,n,r){n.directivesByDirectiveName.has(_e.SEMANTIC_NON_NULL)&&this.referencedPersistedDirectiveNames.add(_e.SEMANTIC_NON_NULL);let i=t.get(n.name),a=i||this.copyFieldData(n,r||(0,Ie.isNodeDataInaccessible)(n));(0,Ee.getValueOrDefault)(this.coordsByNamedTypeName,n.namedTypeName,()=>new Set).add(a.federatedCoords),this.namedOutputTypeNames.add(n.namedTypeName),this.handleSubscriptionFilterDirective(n,a),(0,Ie.extractPersistedDirectives)(a.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName);let o=r||(0,Ie.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,Ee.getValueOrDefault)(this.subgraphNamesByNamedTypeNameByFieldCoords,a.federatedCoords,()=>new Map),d=(0,Ee.getValueOrDefault)(l,a.namedTypeName,()=>new Set);if(d.size<1)for(let f of a.subgraphNames)n.subgraphNames.has(f)||d.add(f);(0,Ee.addIterableValuesToSet)(n.subgraphNames,(0,Ee.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,Ee.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,i.configureDescriptionDataBySubgraphName),(0,Ie.setLongestDescription)(a,n),a.isInaccessible||(a.isInaccessible=n.isInaccessible),(0,Ee.addNewObjectValueMapEntries)(n.externalFieldDataBySubgraphName,a.externalFieldDataBySubgraphName),(0,Ee.addMapEntries)(n.isShareableBySubgraphName,a.isShareableBySubgraphName),(0,Ee.addMapEntries)(n.nullLevelsBySubgraphName,a.nullLevelsBySubgraphName),(0,Ee.addIterableValuesToSet)(n.subgraphNames,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,Ee.getValueOrDefault)(this.tagNamesByCoords,r,()=>new Set);for(let a of t.persistedDirectivesData.tagDirectiveByName.keys())i.add(a)}copyMutualParentDefinitionData(t){return{configureDescriptionDataBySubgraphName:(0,Ee.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByDirectiveName:(0,Ee.copyArrayValueMap)(t.directivesByDirectiveName),extensionType:t.extensionType,name:t.name,persistedDirectivesData:(0,Ie.extractPersistedDirectives)((0,Ie.newPersistedDirectivesData)(),t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),description:(0,Ie.getInitialFederatedDescription)(t)}}copyEnumValueData(t){return{appearances:t.appearances,configureDescriptionDataBySubgraphName:(0,Ee.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),federatedCoords:t.federatedCoords,directivesByDirectiveName:(0,Ee.copyArrayValueMap)(t.directivesByDirectiveName),kind:t.kind,name:t.name,node:{directives:[],kind:t.kind,name:(0,Mr.stringToNameNode)(t.name)},parentTypeName:t.parentTypeName,persistedDirectivesData:(0,Ie.extractPersistedDirectives)((0,Ie.newPersistedDirectivesData)(),t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),subgraphNames:new Set(t.subgraphNames),description:(0,Ie.getInitialFederatedDescription)(t)}}copyInputValueData(t){return{configureDescriptionDataBySubgraphName:(0,Ee.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByDirectiveName:(0,Ee.copyArrayValueMap)(t.directivesByDirectiveName),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:Pe.Kind.INPUT_VALUE_DEFINITION,name:(0,Mr.stringToNameNode)(t.name),type:t.type},originalCoords:t.originalCoords,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:(0,Ie.extractPersistedDirectives)((0,Ie.newPersistedDirectivesData)(),t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),renamedParentTypeName:t.renamedParentTypeName,requiredSubgraphNames:new Set(t.requiredSubgraphNames),subgraphNames:new Set(t.subgraphNames),type:t.type,defaultValue:t.defaultValue,description:(0,Ie.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,Ee.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 t.directivesByDirectiveName.has(_e.SEMANTIC_NON_NULL)&&this.referencedPersistedDirectiveNames.add(_e.SEMANTIC_NON_NULL),{argumentDataByName:this.copyInputValueDataByValueName(t.argumentDataByName,n,t.federatedCoords),configureDescriptionDataBySubgraphName:(0,Ee.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByDirectiveName:(0,Ee.copyArrayValueMap)(t.directivesByDirectiveName),externalFieldDataBySubgraphName:(0,Ee.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,Mr.stringToNameNode)(t.name),type:t.type},nullLevelsBySubgraphName:t.nullLevelsBySubgraphName,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:(0,Ie.extractPersistedDirectives)((0,Ie.newPersistedDirectivesData)(),t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),renamedParentTypeName:t.renamedParentTypeName,subgraphNames:new Set(t.subgraphNames),type:t.type,description:(0,Ie.getInitialFederatedDescription)(t)}}copyEnumValueDataByValueName(t,n){let r=new Map;for(let[i,a]of t){let o=this.copyEnumValueData(a);this.recordTagNamesByCoords(o,o.federatedCoords),(n||(0,Ie.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,Ie.isNodeDataInaccessible)(a),c=this.copyFieldData(a,o);this.handleSubscriptionFilterDirective(c),(0,Ee.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 Pe.Kind.ENUM_TYPE_DEFINITION:return Q(x({},n),{appearances:t.appearances,enumValueDataByValueName:this.copyEnumValueDataByValueName(t.enumValueDataByValueName,t.isInaccessible),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,Mr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:return Q(x({},n),{inputValueDataByName:this.copyInputValueDataByValueName(t.inputValueDataByName,t.isInaccessible,t.name),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,Mr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Pe.Kind.INTERFACE_TYPE_DEFINITION:return Q(x({},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,Mr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Pe.Kind.OBJECT_TYPE_DEFINITION:return Q(x({},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,Mr.stringToNameNode)(t.renamedTypeName||t.name)},requireFetchReasonsFieldNames:new Set,renamedTypeName:t.renamedTypeName,subgraphNames:new Set(t.subgraphNames)});case Pe.Kind.SCALAR_TYPE_DEFINITION:return Q(x({},n),{kind:t.kind,node:{kind:t.kind,name:(0,Mr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Pe.Kind.UNION_TYPE_DEFINITION:return Q(x({},n),{kind:t.kind,node:{kind:t.kind,name:(0,Mr.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,Ie.isParentDataRootType)(r)&&(r.extensionType=IV.ExtensionType.NONE),r}return(0,Ie.extractPersistedDirectives)(t.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),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,Ie.isNodeDataInaccessible)(a);if(o&&this.inaccessibleCoords.add(a.name),r&&r.interfaceObjectSubgraphs.has(n)&&(a.kind=Pe.Kind.INTERFACE_TYPE_DEFINITION,a.node.kind=Pe.Kind.INTERFACE_TYPE_DEFINITION),!i){this.parentDefinitionDataByTypeName.set(a.name,a);return}if(a.kind!==t.kind&&(!r||!r.interfaceObjectSubgraphs.has(n)||a.kind!==Pe.Kind.INTERFACE_TYPE_DEFINITION||t.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION)){this.errors.push((0,Fe.incompatibleParentKindMergeError)(a.name,(0,Ee.kindToNodeType)(a.kind),(0,Ee.kindToNodeType)(t.kind)));return}switch((0,Ee.addNewObjectValueMapEntries)(t.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,Ie.setLongestDescription)(a,t),(0,Ie.setParentDataExtensionType)(a,t),a.kind){case Pe.Kind.ENUM_TYPE_DEFINITION:if(!(0,Ie.areKindsEqual)(a,t))return;a.appearances+=1,a.isInaccessible||(a.isInaccessible=o),(0,Ee.addIterableValuesToSet)(t.subgraphNames,a.subgraphNames);for(let l of t.enumValueDataByValueName.values())this.upsertEnumValueData(a.enumValueDataByValueName,l,o);return;case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:if(!(0,Ie.areKindsEqual)(a,t))return;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ee.addIterableValuesToSet)(t.subgraphNames,a.subgraphNames);for(let l of t.inputValueDataByName.values())this.upsertInputValueData(a.inputValueDataByName,l,a.name,a.isInaccessible);return;case Pe.Kind.INTERFACE_TYPE_DEFINITION:case Pe.Kind.OBJECT_TYPE_DEFINITION:let c=t;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ee.addIterableValuesToSet)(c.implementedInterfaceTypeNames,a.implementedInterfaceTypeNames),(0,Ee.addIterableValuesToSet)(c.subgraphNames,a.subgraphNames);for(let l of c.fieldDataByName.values())this.upsertFieldData(a.fieldDataByName,l,a.isInaccessible);return;case Pe.Kind.UNION_TYPE_DEFINITION:if(!(0,Ie.areKindsEqual)(a,t))return;(0,Ee.addMapEntries)(t.memberByMemberTypeName,a.memberByMemberTypeName),(0,Ee.addIterableValuesToSet)(t.subgraphNames,a.subgraphNames);return;default:(0,Ee.addIterableValuesToSet)(t.subgraphNames,a.subgraphNames);return}}propagateInaccessibilityToExistingChildren(t){switch(t.kind){case Pe.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.argumentDataByArgumentName.values())this.namedInputValueTypeNames.add(o.namedTypeName),this.upsertInputValueData(a,o,`@${t.name}`,!1);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.set(r,{argumentDataByArgumentName: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,Ie.setMutualExecutableLocations)(i,t.executableLocations),i.executableLocations.size<1){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}for(let a of t.argumentDataByArgumentName.values())this.namedInputValueTypeNames.add((0,hV.getTypeNodeNamedTypeName)(a.type)),this.upsertInputValueData(i.argumentDataByArgumentName,a,`@${i.name}`,!1);(0,Ie.setLongestDescription)(i,t),i.repeatable&&(i.repeatable=t.repeatable),(0,Ee.addIterableValuesToSet)(t.subgraphNames,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,Fe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}break}case Pe.Kind.UNION_TYPE_DEFINITION:{if(l){this.errors.push((0,Fe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}l=f;break}default:{this.errors.push((0,Fe.incompatibleFederatedFieldNamedTypeError)(t,n));break}}}if(o.size<1&&!l){this.errors.push((0,Fe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}let d=l;if(o.size>0){if(l){this.errors.push((0,Fe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}for(let f of o.keys()){d=f;for(let[y,I]of o)if(f!==y&&!I.implementedInterfaceTypeNames.has(f)){d="";break}if(d)break}}if(!this.shouldUpdateFederatedFieldAbstractNamedType(d,c)){this.errors.push((0,Fe.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,ide.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 f of i.satisfiedFieldSets)c.satisfiedFieldSets.add(f),a.has(f)&&l.addTargetSubgraphByFieldSet(f,o);let d=r.fieldDatasBySubgraphName.get(o);for(let{name:f,namedTypeName:y}of d||[])this.internalGraph.addEdge(c,this.internalGraph.addOrUpdateNode(y),f);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,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,n,_e.PARENT_DEFINITION_DATA);if(i.kind===Pe.Kind.INTERFACE_TYPE_DEFINITION)for(let a of r.interfaceObjectSubgraphs){let o=(0,Ee.getOrThrowError)(this.internalSubgraphBySubgraphName,a,"internalSubgraphBySubgraphName"),c=o.configurationDataByTypeName,l=this.concreteTypeNamesByAbstractTypeName.get(n);if(!l)continue;let d=(0,Ee.getOrThrowError)(c,n,"configurationDataByTypeName"),f=d.keys;if(!f)continue;d.entityInterfaceConcreteTypeNames=new Set(r.concreteTypeNames),this.internalGraph.setSubgraphName(a);let y=this.internalGraph.addOrUpdateNode(n,{isAbstract:!0});for(let I of l){let v=(0,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,I,_e.PARENT_DEFINITION_DATA);if(!(0,xr.isObjectDefinitionData)(v))continue;let F=(0,Ee.getOrThrowError)(this.entityDataByTypeName,I,"entityDataByTypeName");F.subgraphNames.add(a);let k=c.get(I);if(k)if((0,Ee.addIterableValuesToSet)(d.fieldNames,k.fieldNames),!k.keys)k.keys=[...f];else e:for(let ie of f){for(let{selectionSet:Te}of k.keys)if(ie.selectionSet===Te)continue e;k.keys.push(ie)}else c.set(I,{fieldNames:new Set(d.fieldNames),isRootNode:!0,keys:[...f],typeName:I});let K=new Set;for(let ie of f.filter(Te=>!Te.disableEntityResolver))K.add(ie.selectionSet);let J=this.authorizationDataByParentTypeName.get(n),se=(0,Ee.getOrThrowError)(o.parentDefinitionDataByTypeName,n,"internalSubgraph.parentDefinitionDataByTypeName");if((0,xr.isObjectDefinitionData)(se)){for(let[ie,Te]of se.fieldDataByName){let de=`${I}.${ie}`;(0,Ee.getValueOrDefault)(this.fieldCoordsByNamedTypeName,Te.namedTypeName,()=>new Set).add(de);let Re=J==null?void 0:J.fieldAuthDataByFieldName.get(ie);if(Re){let ee=(0,Ee.getValueOrDefault)(this.authorizationDataByParentTypeName,I,()=>(0,xr.newAuthorizationData)(I));(0,xr.upsertFieldAuthorizationData)(ee.fieldAuthDataByFieldName,Re)||this.invalidORScopesCoords.add(de)}let xe=v.fieldDataByName.get(ie);if(xe){let ee=(t=Te.isShareableBySubgraphName.get(a))!=null?t:!1;xe.isShareableBySubgraphName.set(a,ee),xe.subgraphNames.add(a);let Se=Te.externalFieldDataBySubgraphName.get(a);if(!Se)continue;xe.externalFieldDataBySubgraphName.set(a,x({},Se));continue}let tt=i.isInaccessible||v.isInaccessible||Te.isInaccessible;v.fieldDataByName.set(ie,this.copyFieldData(Te,tt))}this.handleInterfaceObjectForInternalGraph({internalSubgraph:o,subgraphName:a,interfaceObjectData:r,interfaceObjectNode:y,resolvableKeyFieldSets:K,entityData:F})}}}}}fieldDataToGraphFieldData(t){var n;return{name:t.name,namedTypeName:t.namedTypeName,isLeaf:(0,xr.isNodeLeaf)((n=this.parentDefinitionDataByTypeName.get(t.namedTypeName))==null?void 0:n.kind),subgraphNames:t.subgraphNames}}getValidFlattenedPersistedDirectiveNodeArray(t){var i;let n=(0,xr.getNodeCoords)(t),r=[];for(let[a,o]of t.persistedDirectivesData.directivesByDirectiveName){if(a===_e.SEMANTIC_NON_NULL&&(0,Ie.isFieldData)(t)){r.push((0,Ee.generateSemanticNonNullDirective)((i=(0,Ee.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,Fe.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}r.push(...o)}}return r}getRouterPersistedDirectiveNodes(t){let n=[...t.persistedDirectivesData.tagDirectiveByName.values()];return t.persistedDirectivesData.isDeprecated&&n.push((0,Ie.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,Ac.getDescriptionFromString)(r);if(n.length<1)return t.description;this.errors.push((0,Fe.configureDescriptionPropagationError)((0,Ie.getDefinitionDataCoords)(t,!0),n))}getNodeForRouterSchemaByData(t){return t.node.name=(0,Mr.stringToNameNode)(t.name),t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.node}getNodeWithPersistedDirectivesByInputValueData(t){return t.node.name=(0,Mr.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,Ie.isTypeRequired)(c.type)&&i.push({inputValueName:o,missingSubgraphs:(0,Ee.getEntriesNotInHashSet)(t.subgraphNames,c.subgraphNames),requiredSubgraphs:[...c.requiredSubgraphNames]});return i.length>0?this.errors.push((0,Fe.invalidRequiredInputValueError)(_e.FIELD,a,i)):r.length>0&&((0,Ee.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,Mr.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,Fe.semanticNonNullInconsistentLevelsError)(t));return}for(let i of r)if(!n.has(i)){this.errors.push((0,Fe.semanticNonNullInconsistentLevelsError)(t));return}}}validateOneOfDirective({data:t,inputValueNodes:n,requiredFieldNames:r}){return t.directivesByDirectiveName.has(_e.ONE_OF)?r.size>0?(this.errors.push((0,Fe.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(r),typeName:t.name})),!1):(n.length===1&&this.warnings.push((0,ade.singleFederatedInputFieldOneOfWarning)({fieldName:n[0].name.value,typeName:t.name})),!0):!0}pushParentDefinitionDataToDocumentDefinitions(t){for(let[n,r]of this.parentDefinitionDataByTypeName)switch(r.extensionType!==IV.ExtensionType.NONE&&this.errors.push((0,Fe.noBaseDefinitionForExtensionError)((0,Ee.kindToNodeType)(r.kind),n)),r.kind){case Pe.Kind.ENUM_TYPE_DEFINITION:{let i=[],a=[],o=this.getEnumValueMergeMethod(n);(0,Ie.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n));for(let c of r.enumValueDataByValueName.values()){let l=(0,Ie.getNodeForRouterSchemaByData)(c,this.persistedDirectiveDefinitionByDirectiveName,this.errors),d=(0,Ie.isNodeDataInaccessible)(c),f=Q(x({},c.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(c)});switch(o){case Ie.MergeMethod.CONSISTENT:!d&&r.appearances>c.appearances&&this.errors.push((0,Fe.incompatibleSharedEnumError)(n)),i.push(l),d||a.push(f);break;case Ie.MergeMethod.INTERSECTION:r.appearances===c.appearances&&(i.push(l),d||a.push(f));break;default:i.push(l),d||a.push(f);break}}if(r.node.values=i,this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,Ie.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){this.errors.push((0,Fe.allChildDefinitionsAreInaccessibleError)((0,Ee.kindToNodeType)(r.kind),n,_e.ENUM_VALUE));break}this.clientDefinitions.push(Q(x({},r.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(r),values:a}));break}case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:{let i=new Array,a=new Array,o=new Array,c=new Set;for(let[l,d]of r.inputValueDataByName)if((0,Ie.isTypeRequired)(d.type)&&c.add(l),r.subgraphNames.size===d.subgraphNames.size){if(a.push(this.getNodeWithPersistedDirectivesByInputValueData(d)),(0,Ie.isNodeDataInaccessible)(d))continue;o.push(Q(x({},d.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(d)}))}else(0,Ie.isTypeRequired)(d.type)&&i.push({inputValueName:l,missingSubgraphs:(0,Ee.getEntriesNotInHashSet)(r.subgraphNames,d.subgraphNames),requiredSubgraphs:[...d.requiredSubgraphNames]});if(i.length>0){this.errors.push((0,Fe.invalidRequiredInputValueError)(_e.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,Ie.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r);break}if(o.length<1){this.errors.push((0,Fe.allChildDefinitionsAreInaccessibleError)((0,Ee.kindToNodeType)(r.kind),n,"Input field"));break}this.clientDefinitions.push(Q(x({},r.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(r),fields:o}));break}case Pe.Kind.INTERFACE_TYPE_DEFINITION:case Pe.Kind.OBJECT_TYPE_DEFINITION:{let i=[],a=[],o=new Map,c=(0,Ie.newInvalidFieldNames)(),l=r.kind===Pe.Kind.OBJECT_TYPE_DEFINITION,d=this.authorizationDataByParentTypeName.get(n);(0,Ie.propagateAuthDirectives)(r,d);for(let[y,I]of r.fieldDataByName){(0,Ie.propagateFieldAuthDirectives)(I,d);let v=this.getValidFieldArgumentNodes(I);l&&(0,Ie.validateExternalAndShareable)(I,c),this.validateSemanticNonNull(I),i.push(this.getNodeWithPersistedDirectivesByFieldData(I,v)),!(0,Ie.isNodeDataInaccessible)(I)&&(a.push((0,Ie.getClientSchemaFieldNodeByFieldData)(I)),o.set(y,this.fieldDataToGraphFieldData(I)))}if(l&&(c.byShareable.size>0&&this.errors.push((0,Fe.invalidFieldShareabilityError)(r,c.byShareable)),c.subgraphNamesByExternalFieldName.size>0&&this.errors.push((0,Fe.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 f=(0,rde.isNodeQuery)(n);if((0,Ie.isNodeDataInaccessible)(r)){if(f){this.errors.push(Fe.inaccessibleQueryRootTypeError);break}this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){let y=f?(0,Fe.noQueryRootTypeError)(!1):(0,Fe.allChildDefinitionsAreInaccessibleError)((0,Ee.kindToNodeType)(r.kind),n,_e.FIELD);this.errors.push(y);break}this.clientDefinitions.push(Q(x({},r.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(r),fields:a}));break}case Pe.Kind.SCALAR_TYPE_DEFINITION:{if(Bt.BASE_SCALARS.has(n))break;if((0,Ie.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n)),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,Ie.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}this.clientDefinitions.push(Q(x({},r.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(r)}));break}case Pe.Kind.UNION_TYPE_DEFINITION:{if(r.node.types=(0,xr.mapToArrayOfValues)(r.memberByMemberTypeName),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,Ie.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}let i=this.getClientSchemaUnionMembers(r);if(i.length<1){this.errors.push((0,Fe.allChildDefinitionsAreInaccessibleError)(_e.UNION,n,"union member type"));break}this.clientDefinitions.push(Q(x({},r.node),{directives:(0,Ie.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(_e.PERIOD);switch(o.length){case 2:{let c=(0,Ee.getValueOrDefault)(this.authorizationDataByParentTypeName,o[0],()=>(0,xr.newAuthorizationData)(o[0])),l=(0,Ee.getValueOrDefault)(c.fieldAuthDataByFieldName,o[1],()=>(0,xr.newFieldAuthorizationData)(o[1]));(t=l.inheritedData).requiresAuthentication||(t.requiresAuthentication=r.requiresAuthentication),l.inheritedData.requiredScopes.length*r.requiredScopes.length>Bt.MAX_OR_SCOPES?this.invalidORScopesCoords.add(a):(l.inheritedData.requiredScopesByOR=(0,xr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopesByOR,r.requiredScopesByOR),l.inheritedData.requiredScopes=(0,xr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopes,r.requiredScopes));break}default:break}}}}federateSubgraphData(){this.federateInternalSubgraphData(),this.handleEntityInterfaces(),this.generateTagData(),this.pushVersionTwoDirectiveDefinitionsToDocumentDefinitions(),this.pushNamedTypeAuthDataToFields()}validateInterfaceImplementationsAndPushToDocumentDefinitions(t){for(let{data:n,clientSchemaFieldNodes:r}of t){if(n.node.interfaces=this.getValidImplementedInterfaces(n),this.routerDefinitions.push((0,Ie.getNodeForRouterSchemaByData)(n,this.persistedDirectiveDefinitionByDirectiveName,this.errors)),(0,Ie.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,Mr.stringToNamedTypeNode)(a));this.clientDefinitions.push(Q(x({},n.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(n),fields:r,interfaces:i}))}}pushVersionTwoDirectiveDefinitionsToDocumentDefinitions(){if(!this.isVersionTwo){this.referencedPersistedDirectiveNames.has(_e.SEMANTIC_NON_NULL)&&(this.clientDefinitions.push(Bt.SEMANTIC_NON_NULL_DEFINITION),this.routerDefinitions=[Bt.DEPRECATED_DEFINITION,Bt.SEMANTIC_NON_NULL_DEFINITION,Bt.TAG_DEFINITION]);return}if(this.referencedPersistedDirectiveNames.has(_e.SEMANTIC_NON_NULL)){this.clientDefinitions.push(Bt.SEMANTIC_NON_NULL_DEFINITION),this.routerDefinitions=[Bt.AUTHENTICATED_DEFINITION,Bt.DEPRECATED_DEFINITION,Bt.INACCESSIBLE_DEFINITION,Bt.REQUIRES_SCOPES_DEFINITION,Bt.SEMANTIC_NON_NULL_DEFINITION,Bt.TAG_DEFINITION,Bt.SCOPE_SCALAR_DEFINITION];return}this.routerDefinitions=[Bt.AUTHENTICATED_DEFINITION,Bt.DEPRECATED_DEFINITION,Bt.INACCESSIBLE_DEFINITION,Bt.REQUIRES_SCOPES_DEFINITION,Bt.TAG_DEFINITION,Bt.SCOPE_SCALAR_DEFINITION]}validatePathSegmentInaccessibility(t){if(!t)return!1;let r=t.split(_e.LEFT_PARENTHESIS)[0].split(_e.PERIOD),i=r[0];for(let a=0;a0&&this.errors.push((0,Fe.invalidReferencesOfInaccessibleTypeError)((0,Ee.kindToNodeType)(t.kind),t.name,r))}validateQueryRootType(){let t=this.parentDefinitionDataByTypeName.get(_e.QUERY);if(!t||t.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size<1){this.errors.push((0,Fe.noQueryRootTypeError)());return}for(let n of t.fieldDataByName.values())if(!(0,Ie.isNodeDataInaccessible)(n))return;this.errors.push((0,Fe.noQueryRootTypeError)())}validateSubscriptionFieldConditionFieldPath(t,n,r,i,a){let o=t.split(_e.PERIOD);if(o.length<1)return a.push((0,Fe.invalidSubscriptionFieldConditionFieldPathErrorMessage)(r,t)),[];let c=n;if(this.inaccessibleCoords.has(c.renamedTypeName))return a.push((0,Fe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,o[0],c.renamedTypeName)),[];let l="";for(let d=0;d0?`.${f}`:f,c.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION)return a.push((0,Fe.invalidSubscriptionFieldConditionFieldPathParentErrorMessage)(r,t,l)),[];let y=c.fieldDataByName.get(f);if(!y)return a.push((0,Fe.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,f,c.renamedTypeName)),[];let I=`${c.renamedTypeName}.${f}`;if(!y.subgraphNames.has(i))return a.push((0,Fe.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I,i)),[];if(this.inaccessibleCoords.has(I))return a.push((0,Fe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I)),[];if(Bt.BASE_SCALARS.has(y.namedTypeName)){c={kind:Pe.Kind.SCALAR_TYPE_DEFINITION,name:y.namedTypeName};continue}c=(0,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,y.namedTypeName,_e.PARENT_DEFINITION_DATA)}return(0,Ie.isLeafKind)(c.kind)?o:(a.push((0,Fe.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage)(r,t,o[o.length-1],(0,Ee.kindToNodeType)(c.kind),c.name)),[])}validateSubscriptionFieldCondition(t,n,r,i,a,o,c){if(i>GE.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return c.push((0,Fe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;let l=!1,d=new Set([_e.FIELD_PATH,_e.VALUES]),f=new Set,y=new Set,I=[];for(let v of t.fields){let F=v.name.value,k=a+`.${F}`;switch(F){case _e.FIELD_PATH:{if(d.has(_e.FIELD_PATH))d.delete(_e.FIELD_PATH);else{l=!0,f.add(_e.FIELD_PATH);break}if(v.value.kind!==Pe.Kind.STRING){I.push((0,Fe.invalidInputFieldTypeErrorMessage)(k,_e.STRING,(0,Ee.kindToNodeType)(v.value.kind))),l=!0;break}let K=this.validateSubscriptionFieldConditionFieldPath(v.value.value,r,k,o,I);if(K.length<1){l=!0;break}n.fieldPath=K;break}case _e.VALUES:{if(d.has(_e.VALUES))d.delete(_e.VALUES);else{l=!0,f.add(_e.VALUES);break}let K=v.value.kind;if(K==Pe.Kind.NULL||K==Pe.Kind.OBJECT){I.push((0,Fe.invalidInputFieldTypeErrorMessage)(k,_e.LIST,(0,Ee.kindToNodeType)(v.value.kind))),l=!0;break}if(K!==Pe.Kind.LIST){n.values=[(0,Ie.getSubscriptionFilterValue)(v.value)];break}let J=new Set,se=[];for(let ie=0;ie0){I.push((0,Fe.subscriptionFieldConditionInvalidValuesArrayErrorMessage)(k,se));continue}if(J.size<1){l=!0,I.push((0,Fe.subscriptionFieldConditionEmptyValuesArrayErrorMessage)(k));continue}n.values=[...J];break}default:l=!0,y.add(F)}}return l?(c.push((0,Fe.subscriptionFieldConditionInvalidInputFieldErrorMessage)(a,[...d],[...f],[...y],I)),!1):!0}validateSubscriptionFilterCondition(t,n,r,i,a,o,c){if(i>GE.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return c.push((0,Fe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;if(i+=1,t.fields.length!==1)return c.push((0,Fe.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage)(a,t.fields.length)),!1;let l=t.fields[0],d=l.name.value;if(!yV.SUBSCRIPTION_FILTER_INPUT_NAMES.has(d))return c.push((0,Fe.subscriptionFilterConditionInvalidInputFieldErrorMessage)(a,d)),!1;let f=a+`.${d}`;switch(l.value.kind){case Pe.Kind.OBJECT:switch(d){case _e.IN_UPPER:return n.in={fieldPath:[],values:[]},this.validateSubscriptionFieldCondition(l.value,n.in,r,i,a+".IN",o,c);case _e.NOT_UPPER:return n.not={},this.validateSubscriptionFilterCondition(l.value,n.not,r,i,a+".NOT",o,c);default:return c.push((0,Fe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(f,_e.LIST,_e.OBJECT)),!1}case Pe.Kind.LIST:{let y=[];switch(d){case _e.AND_UPPER:{n.and=y;break}case _e.OR_UPPER:{n.or=y;break}default:return c.push((0,Fe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(f,_e.OBJECT,_e.LIST)),!1}let I=l.value.values.length;if(I<1||I>5)return c.push((0,Fe.subscriptionFilterArrayConditionInvalidLengthErrorMessage)(f,I)),!1;let v=!0,F=[];for(let k=0;k0?(c.push((0,Fe.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage)(f,F)),!1):v}default:{let y=yV.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES.has(d)?_e.LIST:_e.OBJECT;return c.push((0,Fe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(f,y,(0,Ee.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!==Pe.Kind.OBJECT){this.errors.push((0,Fe.invalidSubscriptionFilterDirectiveError)(r,[(0,Fe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(_e.CONDITION,_e.OBJECT,(0,Ee.kindToNodeType)(c.value.kind))]));return}let l={},d=[];if(!this.validateSubscriptionFilterCondition(c.value,l,n,0,_e.CONDITION,o,d)){this.errors.push((0,Fe.invalidSubscriptionFilterDirectiveError)(r,d)),this.isMaxDepth=!1;return}(0,Ee.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,Fe.invalidSubscriptionFilterDirectiveError)(t,[(0,Fe.subscriptionFilterNamedTypeErrorMessage)(n.fieldData.namedTypeName)]));continue}(0,Ie.isNodeDataInaccessible)(r)||r.kind===Pe.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,Fe.orScopesLimitError)(Bt.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));for(let a of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,Ie.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:Pe.Kind.DOCUMENT,definitions:this.routerDefinitions},r=(0,Pe.buildASTSchema)({kind:Pe.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),i=new Map;for(let a of this.internalSubgraphBySubgraphName.values())i.set(a.name,{configurationDataByTypeName:a.configurationDataByTypeName,isVersionTwo:a.isVersionTwo,parentDefinitionDataByTypeName:a.parentDefinitionDataByTypeName,schema:a.schema});for(let a of this.authorizationDataByParentTypeName.values())(0,xr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,a);return x({fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),subgraphConfigBySubgraphName:i,federatedGraphAST:n,federatedGraphSchema:(0,Pe.buildASTSchema)(n,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:r,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,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,Ee.getOrThrowError)(n,o,`${t.name}.childDataByChildName`);if((0,Ie.isNodeDataInaccessible)(l)){a-=1;continue}i.isDisjointFrom(c.tagNames)||((0,Ee.getValueOrDefault)(l.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}handleChildTagInclusions(t,n,r,i){let a=n.size;for(let[o,c]of n){if((0,Ie.isNodeDataInaccessible)(c)){a-=1;continue}let l=r.get(o);(!l||i.isDisjointFrom(l.tagNames))&&((0,Ee.getValueOrDefault)(c.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}buildFederationContractResult(t){if(this.isVersionTwo||this.routerDefinitions.push(Bt.INACCESSIBLE_DEFINITION),t.tagNamesToExclude.size>0)for(let[o,c]of this.parentTagDataByTypeName){let l=(0,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,o,_e.PARENT_DEFINITION_DATA);if(!(0,Ie.isNodeDataInaccessible)(l)){if(!t.tagNamesToExclude.isDisjointFrom(c.tagNames)){l.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(!(c.childTagDataByChildName.size<1))switch(l.kind){case Pe.Kind.SCALAR_TYPE_DEFINITION:case Pe.Kind.UNION_TYPE_DEFINITION:break;case Pe.Kind.ENUM_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.enumValueDataByValueName,c.childTagDataByChildName,t.tagNamesToExclude);break}case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.inputValueDataByName,c.childTagDataByChildName,t.tagNamesToExclude);break}default:{let d=l.fieldDataByName.size;for(let[f,y]of c.childTagDataByChildName){let I=(0,Ee.getOrThrowError)(l.fieldDataByName,f,`${o}.fieldDataByFieldName`);if((0,Ie.isNodeDataInaccessible)(I)){d-=1;continue}if(!t.tagNamesToExclude.isDisjointFrom(y.tagNames)){(0,Ee.getValueOrDefault)(I.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(I.federatedCoords),d-=1;continue}for(let[v,F]of y.tagNamesByArgumentName){let k=(0,Ee.getOrThrowError)(I.argumentDataByName,v,`${f}.argumentDataByArgumentName`);(0,Ie.isNodeDataInaccessible)(k)||t.tagNamesToExclude.isDisjointFrom(F)||((0,Ee.getValueOrDefault)(k.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(k.federatedCoords))}}d<1&&(l.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}}else if(t.tagNamesToInclude.size>0)for(let[o,c]of this.parentDefinitionDataByTypeName){if((0,Ie.isNodeDataInaccessible)(c))continue;let l=this.parentTagDataByTypeName.get(o);if(!l){c.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(t.tagNamesToInclude.isDisjointFrom(l.tagNames)){if(l.childTagDataByChildName.size<1){c.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}switch(c.kind){case Pe.Kind.SCALAR_TYPE_DEFINITION:case Pe.Kind.UNION_TYPE_DEFINITION:continue;case Pe.Kind.ENUM_TYPE_DEFINITION:this.handleChildTagInclusions(c,c.enumValueDataByValueName,l.childTagDataByChildName,t.tagNamesToInclude);break;case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:this.handleChildTagInclusions(c,c.inputValueDataByName,l.childTagDataByChildName,t.tagNamesToInclude);break;default:let d=c.fieldDataByName.size;for(let[f,y]of c.fieldDataByName){if((0,Ie.isNodeDataInaccessible)(y)){d-=1;continue}let I=l.childTagDataByChildName.get(f);(!I||t.tagNamesToInclude.isDisjointFrom(I.tagNames))&&((0,Ee.getValueOrDefault)(y.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(y.federatedCoords),d-=1)}d<1&&(c.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration();for(let o of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,Ie.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:Pe.Kind.DOCUMENT,definitions:this.routerDefinitions},i=(0,Pe.buildASTSchema)({kind:Pe.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),a=new Map;for(let o of this.internalSubgraphBySubgraphName.values())a.set(o.name,{configurationDataByTypeName:o.configurationDataByTypeName,isVersionTwo:o.isVersionTwo,parentDefinitionDataByTypeName:o.parentDefinitionDataByTypeName,schema:o.schema});for(let o of this.authorizationDataByParentTypeName.values())(0,xr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,o);return x({fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),subgraphConfigBySubgraphName:a,federatedGraphAST:r,federatedGraphSchema:(0,Pe.buildASTSchema)(r,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:i,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,success:!0,warnings:this.warnings},this.getClientSchemaObjectBoolean())}federateSubgraphsInternal(){return this.federateSubgraphData(),this.buildFederationResult()}};Rc.FederationFactory=$E;function _D({disableResolvabilityValidation:e,subgraphs:t}){if(t.length<1)return{errors:[Fe.minimumSubgraphRequirementError],success:!1,warnings:[]};let n=(0,nde.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,f]of l.entityInterfaces){let y=r.get(d);if(!y){r.set(d,(0,xr.newEntityInterfaceFederationData)(f,c));continue}(0,xr.upsertEntityInterfaceFederationData)(y,f,c)}let a=new Array,o=new Map;for(let[c,l]of r){let d=l.concreteTypeNames.size;for(let[f,y]of l.subgraphDataByTypeName){let I=(0,Ee.getValueOrDefault)(o,f,()=>new Set);if((0,Ee.addIterableValuesToSet)(y.concreteTypeNames,I),!y.isInterfaceObject){y.resolvable&&y.concreteTypeNames.size!==d&&(0,Ee.getValueOrDefault)(i,c,()=>new Array).push({subgraphName:f,definedConcreteTypeNames:new Set(y.concreteTypeNames),requiredConcreteTypeNames:new Set(l.concreteTypeNames)});continue}(0,Ee.addIterableValuesToSet)(l.concreteTypeNames,I);let{parentDefinitionDataByTypeName:v}=(0,Ee.getOrThrowError)(n.internalSubgraphBySubgraphName,f,"internalSubgraphBySubgraphName"),F=[];for(let k of l.concreteTypeNames)v.has(k)&&F.push(k);F.length>0&&a.push((0,Fe.invalidInterfaceObjectImplementationDefinitionsError)(c,f,F))}}for(let[c,l]of i){let d=new Array;for(let f of l){let y=o.get(f.subgraphName);if(!y){d.push(f);continue}let I=f.requiredConcreteTypeNames.intersection(y);f.requiredConcreteTypeNames.size!==I.size&&(f.definedConcreteTypeNames=I,d.push(f))}if(d.length>0){i.set(c,d);continue}i.delete(c)}return i.size>0&&a.push((0,Fe.undefinedEntityInterfaceImplementationsError)(i,r)),a.length>0?{errors:a,success:!1,warnings:n.warnings}:{federationFactory:new $E({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 sde({disableResolvabilityValidation:e,subgraphs:t}){let n=_D({subgraphs:t,disableResolvabilityValidation:e});return n.success?n.federationFactory.federateSubgraphsInternal():{errors:n.errors,success:!1,warnings:n.warnings}}function ode({subgraphs:e,tagOptionsByContractName:t,disableResolvabilityValidation:n}){let r=_D({subgraphs:e,disableResolvabilityValidation:n});if(!r.success)return{errors:r.errors,success:!1,warnings:r.warnings};r.federationFactory.federateSubgraphData();let i=[(0,gV.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,f]of t){l!==o&&i.push((0,gV.cloneDeep)(i[l]));let y=i[l].buildFederationContractResult(f);c.set(d,y),l++}return Q(x({},a),{federationResultByContractName:c})}function ude({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n}){let r=_D({subgraphs:n,disableResolvabilityValidation:t});return r.success?(r.federationFactory.federateSubgraphData(),r.federationFactory.buildFederationContractResult(e)):{errors:r.errors,success:!1,warnings:r.warnings}}});var QE=w(As=>{"use strict";m();T();N();Object.defineProperty(As,"__esModule",{value:!0});As.LATEST_ROUTER_COMPATIBILITY_VERSION=As.ROUTER_COMPATIBILITY_VERSIONS=As.ROUTER_COMPATIBILITY_VERSION_ONE=void 0;As.ROUTER_COMPATIBILITY_VERSION_ONE="1";As.ROUTER_COMPATIBILITY_VERSIONS=new Set([As.ROUTER_COMPATIBILITY_VERSION_ONE]);As.LATEST_ROUTER_COMPATIBILITY_VERSION="1"});var vV=w(tf=>{"use strict";m();T();N();Object.defineProperty(tf,"__esModule",{value:!0});tf.federateSubgraphs=cde;tf.federateSubgraphsWithContracts=lde;tf.federateSubgraphsContract=dde;var vD=_V(),SD=QE();function cde({disableResolvabilityValidation:e,subgraphs:t,version:n=SD.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(n){default:return(0,vD.federateSubgraphs)({disableResolvabilityValidation:e,subgraphs:t})}}function lde({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n,version:r=SD.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,vD.federateSubgraphsWithContracts)({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n})}}function dde({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n,version:r=SD.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,vD.federateSubgraphsContract)({disableResolvabilityValidation:t,subgraphs:n,contractTagOptions:e})}}});var OV=w(SV=>{"use strict";m();T();N();Object.defineProperty(SV,"__esModule",{value:!0})});var DV=w(nf=>{"use strict";m();T();N();Object.defineProperty(nf,"__esModule",{value:!0});nf.normalizeSubgraphFromString=pde;nf.normalizeSubgraph=fde;nf.batchNormalize=mde;var OD=hD(),DD=QE();function pde(e,t=!0,n=DD.ROUTER_COMPATIBILITY_VERSION_ONE){switch(n){default:return(0,OD.normalizeSubgraphFromString)(e,t)}}function fde(e,t,n,r=DD.ROUTER_COMPATIBILITY_VERSION_ONE){switch(r){default:return(0,OD.normalizeSubgraph)(e,t,n)}}function mde(e,t=DD.ROUTER_COMPATIBILITY_VERSION_ONE){switch(t){default:return(0,OD.batchNormalize)(e)}}});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 MV=w(kV=>{"use strict";m();T();N();Object.defineProperty(kV,"__esModule",{value:!0})});var xV=w(YE=>{"use strict";m();T();N();Object.defineProperty(YE,"__esModule",{value:!0});YE.COMPOSITION_VERSION=void 0;YE.COMPOSITION_VERSION="{{$COMPOSITION__VERSION}}"});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 JE=w(ot=>{"use strict";m();T();N();var Nde=ot&&ot.__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]}),yt=ot&&ot.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Nde(t,e,n)};Object.defineProperty(ot,"__esModule",{value:!0});yt(Hr(),ot);yt(Dv(),ot);yt(Mi(),ot);yt(Xk(),ot);yt(vV(),ot);yt(OV(),ot);yt(DV(),ot);yt(AV(),ot);yt(ND(),ot);yt(iD(),ot);yt(LE(),ot);yt(PV(),ot);yt(wV(),ot);yt(cD(),ot);yt(QE(),ot);yt(CV(),ot);yt(TD(),ot);yt(du(),ot);yt(Sp(),ot);yt(vl(),ot);yt(UV(),ot);yt(MV(),ot);yt(xV(),ot);yt(vr(),ot);yt(VV(),ot);yt(Sr(),ot);yt(zO(),ot);yt(VN(),ot);yt(gD(),ot);yt(KV(),ot);yt($O(),ot);yt(Hp(),ot);yt($V(),ot);yt(ZO(),ot);yt(jE(),ot);yt(JO(),ot);yt(Ss(),ot);yt(Jp(),ot);yt(jp(),ot);yt(zp(),ot)});var upe={};pm(upe,{buildRouterConfiguration:()=>ope,federateSubgraphs:()=>spe});m();T();N();var Uc=fs(JE());m();T();N();m();T();N();function bD(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=fs(Ae(),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 e1(e){return HE(e,[])}function HE(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Tde(e,t);default:return String(e)}}function zV(e){return e instanceof XV.GraphQLError?e.toString():`${e.name}: ${e.message}; +}`;var Et=YA(function(){return Yt(L,Ke+"return "+he).apply(e,M)});if(Et.source=he,_y(Et))throw Et;return Et}function CY(s){return Wt(s).toLowerCase()}function BY(s){return Wt(s).toUpperCase()}function UY(s,u,p){if(s=Wt(s),s&&(p||u===e))return n0(s);if(!s||!(u=ai(u)))return s;var E=zi(s),S=zi(u),L=r0(E,S),M=i0(E,S)+1;return zo(E,L,M).join("")}function kY(s,u,p){if(s=Wt(s),s&&(p||u===e))return s.slice(0,s0(s)+1);if(!s||!(u=ai(u)))return s;var E=zi(s),S=i0(E,zi(u))+1;return zo(E,0,S).join("")}function MY(s,u,p){if(s=Wt(s),s&&(p||u===e))return s.replace(_h,"");if(!s||!(u=ai(u)))return s;var E=zi(s),S=r0(E,zi(u));return zo(E,S).join("")}function xY(s,u){var p=tt,E=ee;if(vn(u)){var S="separator"in u?u.separator:S;p="length"in u?Nt(u.length):p,E="omission"in u?ai(u.omission):E}s=Wt(s);var L=s.length;if(jc(s)){var M=zi(s);L=M.length}if(p>=L)return s;var j=p-Kc(E);if(j<1)return E;var H=M?zo(M,0,j).join(""):s.slice(0,j);if(S===e)return H+E;if(M&&(j+=H.length-j),vy(S)){if(s.slice(j).search(S)){var fe,me=H;for(S.global||(S=xh(S.source,Wt(Sb.exec(S))+"g")),S.lastIndex=0;fe=S.exec(me);)var he=fe.index;H=H.slice(0,he===e?j:he)}}else if(s.indexOf(ai(S),j)!=j){var be=H.lastIndexOf(S);be>-1&&(H=H.slice(0,be))}return H+E}function qY(s){return s=Wt(s),s&&W1.test(s)?s.replace(gb,NK):s}var VY=Hc(function(s,u,p){return s+(p?" ":"")+u.toUpperCase()}),Dy=J0("toUpperCase");function QA(s,u,p){return s=Wt(s),u=p?e:u,u===e?lK(s)?hK(s):tK(s):s.match(u)||[]}var YA=It(function(s,u){try{return ri(s,e,u)}catch(p){return _y(p)?p:new ut(p)}}),jY=us(function(s,u){return yi(u,function(p){p=Oa(p),ss(s,p,Iy(s[p],s))}),s});function KY(s){var u=s==null?0:s.length,p=We();return s=u?In(s,function(E){if(typeof E[1]!="function")throw new Ii(i);return[p(E[0]),E[1]]}):[],It(function(E){for(var S=-1;++Smn)return[];var p=kn,E=Er(s,kn);u=We(u),s-=kn;for(var S=Uh(E,u);++p0||u<0)?new Ot(p):(s<0?p=p.takeRight(-s):s&&(p=p.drop(s)),u!==e&&(u=Nt(u),p=u<0?p.dropRight(-u):p.take(u-s)),p)},Ot.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Ot.prototype.toArray=function(){return this.take(kn)},va(Ot.prototype,function(s,u){var p=/^(?:filter|find|map|reject)|While$/.test(u),E=/^(?:head|last)$/.test(u),S=P[E?"take"+(u=="last"?"Right":""):u],L=E||/^find/.test(u);S&&(P.prototype[u]=function(){var M=this.__wrapped__,j=E?[1]:arguments,H=M instanceof Ot,fe=j[0],me=H||dt(M),he=function(St){var Pt=S.apply(P,Ko([St],j));return E&&be?Pt[0]:Pt};me&&p&&typeof fe=="function"&&fe.length!=1&&(H=me=!1);var be=this.__chain__,Ke=!!this.__actions__.length,Ze=L&&!be,Et=H&&!Ke;if(!L&&me){M=Et?M:new Ot(this);var et=s.apply(M,j);return et.__actions__.push({func:im,args:[he],thisArg:e}),new gi(et,be)}return Ze&&Et?s.apply(this,j):(et=this.thru(he),Ze?E?et.value()[0]:et.value():et)})}),yi(["pop","push","shift","sort","splice","unshift"],function(s){var u=Pf[s],p=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",E=/^(?:pop|shift)$/.test(s);P.prototype[s]=function(){var S=arguments;if(E&&!this.__chain__){var L=this.value();return u.apply(dt(L)?L:[],S)}return this[p](function(M){return u.apply(dt(M)?M:[],S)})}}),va(Ot.prototype,function(s,u){var p=P[u];if(p){var E=p.name+"";rn.call(Qc,E)||(Qc[E]=[]),Qc[E].push({name:u,func:p})}}),Qc[Wf(e,k).name]=[{name:"wrapper",func:e}],Ot.prototype.clone=qK,Ot.prototype.reverse=VK,Ot.prototype.value=jK,P.prototype.at=EQ,P.prototype.chain=hQ,P.prototype.commit=yQ,P.prototype.next=IQ,P.prototype.plant=_Q,P.prototype.reverse=vQ,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=SQ,P.prototype.first=P.prototype.head,dd&&(P.prototype[dd]=gQ),P},$o=yK();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ar._=$o,define(function(){return $o})):Au?((Au.exports=$o)._=$o,Ah._=$o):ar._=$o}).call(Xl)});var _V=w(Pc=>{"use strict";m();T();N();Object.defineProperty(Pc,"__esModule",{value:!0});Pc.FederationFactory=void 0;Pc.federateSubgraphs=sde;Pc.federateSubgraphsWithContracts=ode;Pc.federateSubgraphsContract=ude;var Pe=Ae(),hV=du(),Mr=Hr(),Fe=Mi(),Rc=VN(),yV=jp(),xr=Jp(),KE=iE(),Bt=Ss(),nde=hD(),rde=Hp(),IV=Sp(),Ie=Sl(),ide=gD(),gV=EV(),Zl=jE(),_e=vr(),GE=gl(),Ee=Sr(),ade=zp(),$E=class{constructor({authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,disableResolvabilityValidation:r,entityDataByTypeName:i,entityInterfaceFederationDataByTypeName:a,fieldCoordsByNamedTypeName:o,internalGraph:c,internalSubgraphBySubgraphName:l,warnings:d}){_(this,"authorizationDataByParentTypeName");_(this,"coordsByNamedTypeName",new Map);_(this,"disableResolvabilityValidation",!1);_(this,"clientDefinitions",[Bt.DEPRECATED_DEFINITION]);_(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([[_e.AUTHENTICATED,Bt.AUTHENTICATED_DEFINITION],[_e.DEPRECATED,Bt.DEPRECATED_DEFINITION],[_e.INACCESSIBLE,Bt.INACCESSIBLE_DEFINITION],[_e.ONE_OF,Bt.ONE_OF_DEFINITION],[_e.REQUIRES_SCOPES,Bt.REQUIRES_SCOPES_DEFINITION],[_e.SEMANTIC_NON_NULL,Bt.SEMANTIC_NON_NULL_DEFINITION],[_e.TAG,Bt.TAG_DEFINITION]]));_(this,"persistedDirectiveDefinitions",new Set([_e.AUTHENTICATED,_e.DEPRECATED,_e.INACCESSIBLE,_e.TAG,_e.REQUIRES_SCOPES]));_(this,"potentialPersistedDirectiveDefinitionDataByDirectiveName",new Map);_(this,"referencedPersistedDirectiveNames",new Set);_(this,"routerDefinitions",[Bt.DEPRECATED_DEFINITION,Bt.TAG_DEFINITION]);_(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}getValidImplementedInterfaces(t){var o;let n=[];if(t.implementedInterfaceTypeNames.size<1)return n;let r=(0,Ie.isNodeDataInaccessible)(t),i=new Map,a=new Map;for(let c of t.implementedInterfaceTypeNames){n.push((0,Mr.stringToNamedTypeNode)(c));let l=(0,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,c,_e.PARENT_DEFINITION_DATA);if(l.kind!==Pe.Kind.INTERFACE_TYPE_DEFINITION){a.set(l.name,(0,Ee.kindToNodeType)(l.kind));continue}let d={invalidFieldImplementations:new Map,unimplementedFields:[]},f=!1;for(let[y,I]of l.fieldDataByName){let v=!1,F=t.fieldDataByName.get(y);if(!F){f=!0,d.unimplementedFields.push(y);continue}let k={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,KE.printTypeNode)(I.node.type),unimplementedArguments:new Set};(0,Ie.isTypeValidImplementation)(I.node.type,F.node.type,this.concreteTypeNamesByAbstractTypeName)||(f=!0,v=!0,k.implementedResponseType=(0,KE.printTypeNode)(F.node.type));let K=new Set;for(let[J,se]of I.argumentDataByName){let ie=se.node;K.add(J);let Te=(o=F.argumentDataByName.get(J))==null?void 0:o.node;if(!Te){f=!0,v=!0,k.unimplementedArguments.add(J);continue}let de=(0,KE.printTypeNode)(Te.type),Re=(0,KE.printTypeNode)(ie.type);Re!==de&&(f=!0,v=!0,k.invalidImplementedArguments.push({actualType:de,argumentName:J,expectedType:Re}))}for(let[J,se]of F.argumentDataByName){let ie=se.node;K.has(J)||ie.type.kind===Pe.Kind.NON_NULL_TYPE&&(f=!0,v=!0,k.invalidAdditionalArguments.add(J))}!r&&F.isInaccessible&&!I.isInaccessible&&(f=!0,v=!0,k.isInaccessible=!0),v&&d.invalidFieldImplementations.set(y,k)}f&&i.set(c,d)}return a.size>0&&this.errors.push((0,Fe.invalidImplementedTypeError)(t.name,a)),i.size>0&&this.errors.push((0,Fe.invalidInterfaceImplementationError)(t.node.name.value,(0,Ee.kindToNodeType)(t.kind),i)),n}addValidPrimaryKeyTargetsToEntityData(t){var f;let n=this.entityDataByTypeName.get(t);if(!n)return;let r=(0,Ee.getOrThrowError)(this.internalSubgraphBySubgraphName,this.currentSubgraphName,"internalSubgraphBySubgraphName"),i=r.parentDefinitionDataByTypeName,a=i.get(n.typeName);if(!a||a.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION)throw(0,Fe.incompatibleParentKindFatalError)(n.typeName,Pe.Kind.OBJECT_TYPE_DEFINITION,(a==null?void 0:a.kind)||Pe.Kind.NULL);let o=r.configurationDataByTypeName.get(n.typeName);if(!o)return;let c=[],l=this.internalGraph.nodeByNodeName.get(`${this.currentSubgraphName}.${n.typeName}`);(0,Rc.validateImplicitFieldSets)({conditionalFieldDataByCoords:r.conditionalFieldDataByCoordinates,currentSubgraphName:this.currentSubgraphName,entityData:n,implicitKeys:c,objectData:a,parentDefinitionDataByTypeName:i,graphNode:l});for(let[y,I]of this.entityInterfaceFederationDataByTypeName){if(!((f=I.concreteTypeNames)!=null&&f.has(n.typeName)))continue;let v=this.entityDataByTypeName.get(y);v&&(0,Rc.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(y=>y.selectionSet));for(let y of c)d.has(y.selectionSet)||(o.keys.push(y),d.add(y.selectionSet))}addValidPrimaryKeyTargetsFromInterfaceObject(t,n,r,i){let a=t.parentDefinitionDataByTypeName,o=a.get(n);if(!o||!(0,Ie.isParentDataCompositeOutputType)(o))throw(0,Fe.incompatibleParentKindFatalError)(n,Pe.Kind.INTERFACE_TYPE_DEFINITION,(o==null?void 0:o.kind)||Pe.Kind.NULL);let c=(0,Ee.getOrThrowError)(t.configurationDataByTypeName,r.typeName,"internalSubgraph.configurationDataByTypeName"),l=[];if((0,Rc.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(f=>f.selectionSet));for(let f of l)d.has(f.selectionSet)||(c.keys.push(f),d.add(f.selectionSet))}getEnumValueMergeMethod(t){return this.namedInputValueTypeNames.has(t)?this.namedOutputTypeNames.has(t)?Ie.MergeMethod.CONSISTENT:Ie.MergeMethod.INTERSECTION:Ie.MergeMethod.UNION}generateTagData(){for(let[t,n]of this.tagNamesByCoords){let r=t.split(_e.PERIOD);if(r.length<1)continue;let i=(0,Ee.getValueOrDefault)(this.parentTagDataByTypeName,r[0],()=>(0,Rc.newParentTagData)(r[0]));switch(r.length){case 1:for(let l of n)i.tagNames.add(l);break;case 2:let a=(0,Ee.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Rc.newChildTagData)(r[1]));for(let l of n)a.tagNames.add(l);break;case 3:let o=(0,Ee.getValueOrDefault)(i.childTagDataByChildName,r[1],()=>(0,Rc.newChildTagData)(r[1])),c=(0,Ee.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);(0,Ie.extractPersistedDirectives)(a.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName);let o=(0,Ie.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,Ee.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,Ie.setLongestDescription)(a,n),(0,Ee.addIterableValuesToSet)(n.subgraphNames,a.subgraphNames)}upsertInputValueData(t,n,r,i){let a=t.get(n.name),o=a||this.copyInputValueData(n);if((0,Ie.extractPersistedDirectives)(o.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),this.recordTagNamesByCoords(o,`${r}.${o.name}`),this.namedInputValueTypeNames.add(o.namedTypeName),(0,Ee.getValueOrDefault)(this.coordsByNamedTypeName,o.namedTypeName,()=>new Set).add(o.federatedCoords),!a){t.set(o.name,o);return}(0,Ee.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,o.configureDescriptionDataBySubgraphName),(0,Ie.setLongestDescription)(o,n),(0,Ee.addIterableValuesToSet)(n.requiredSubgraphNames,o.requiredSubgraphNames),(0,Ee.addIterableValuesToSet)(n.subgraphNames,o.subgraphNames),this.handleInputValueInaccessibility(i,o,r);let c=(0,Zl.getMostRestrictiveMergedTypeNode)(o.type,n.type,o.originalCoords,this.errors);c.success?o.type=c.typeNode:this.errors.push((0,Fe.incompatibleMergedTypesError)({actualType:c.actualType,isArgument:a.isArgument,coords:a.federatedCoords,expectedType:c.expectedType})),(0,Ie.compareAndValidateInputValueDefaultValues)(o,n,this.errors)}handleInputValueInaccessibility(t,n,r){if(t){this.inaccessibleRequiredInputValueErrorByCoords.delete(n.federatedCoords),this.inaccessibleCoords.add(n.federatedCoords);return}if((0,Ie.isNodeDataInaccessible)(n)){if((0,Ie.isTypeRequired)(n.type)){this.inaccessibleRequiredInputValueErrorByCoords.set(n.federatedCoords,(0,Fe.inaccessibleRequiredInputValueError)(n,r));return}this.inaccessibleCoords.add(n.federatedCoords)}}handleSubscriptionFilterDirective(t,n){let r=t.directivesByDirectiveName.get(_e.SUBSCRIPTION_FILTER);if(!r)return;let i=(0,Ee.getFirstEntry)(t.subgraphNames);if(i===void 0){this.errors.push((0,Fe.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,hV.getMutableTypeNode)(n,r,this.errors);let a={kind:t.kind},o=Zl.DivergentType.NONE,c=a;for(let l=0;lnew Set))}upsertFieldData(t,n,r){n.directivesByDirectiveName.has(_e.SEMANTIC_NON_NULL)&&this.referencedPersistedDirectiveNames.add(_e.SEMANTIC_NON_NULL);let i=t.get(n.name),a=i||this.copyFieldData(n,r||(0,Ie.isNodeDataInaccessible)(n));(0,Ee.getValueOrDefault)(this.coordsByNamedTypeName,n.namedTypeName,()=>new Set).add(a.federatedCoords),this.namedOutputTypeNames.add(n.namedTypeName),this.handleSubscriptionFilterDirective(n,a),(0,Ie.extractPersistedDirectives)(a.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName);let o=r||(0,Ie.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,Ee.getValueOrDefault)(this.subgraphNamesByNamedTypeNameByFieldCoords,a.federatedCoords,()=>new Map),d=(0,Ee.getValueOrDefault)(l,a.namedTypeName,()=>new Set);if(d.size<1)for(let f of a.subgraphNames)n.subgraphNames.has(f)||d.add(f);(0,Ee.addIterableValuesToSet)(n.subgraphNames,(0,Ee.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,Ee.addNewObjectValueMapEntries)(n.configureDescriptionDataBySubgraphName,i.configureDescriptionDataBySubgraphName),(0,Ie.setLongestDescription)(a,n),a.isInaccessible||(a.isInaccessible=n.isInaccessible),(0,Ee.addNewObjectValueMapEntries)(n.externalFieldDataBySubgraphName,a.externalFieldDataBySubgraphName),(0,Ee.addMapEntries)(n.isShareableBySubgraphName,a.isShareableBySubgraphName),(0,Ee.addMapEntries)(n.nullLevelsBySubgraphName,a.nullLevelsBySubgraphName),(0,Ee.addIterableValuesToSet)(n.subgraphNames,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,Ee.getValueOrDefault)(this.tagNamesByCoords,r,()=>new Set);for(let a of t.persistedDirectivesData.tagDirectiveByName.keys())i.add(a)}copyMutualParentDefinitionData(t){return{configureDescriptionDataBySubgraphName:(0,Ee.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByDirectiveName:(0,Ee.copyArrayValueMap)(t.directivesByDirectiveName),extensionType:t.extensionType,name:t.name,persistedDirectivesData:(0,Ie.extractPersistedDirectives)((0,Ie.newPersistedDirectivesData)(),t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),description:(0,Ie.getInitialFederatedDescription)(t)}}copyEnumValueData(t){return{appearances:t.appearances,configureDescriptionDataBySubgraphName:(0,Ee.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),federatedCoords:t.federatedCoords,directivesByDirectiveName:(0,Ee.copyArrayValueMap)(t.directivesByDirectiveName),kind:t.kind,name:t.name,node:{directives:[],kind:t.kind,name:(0,Mr.stringToNameNode)(t.name)},parentTypeName:t.parentTypeName,persistedDirectivesData:(0,Ie.extractPersistedDirectives)((0,Ie.newPersistedDirectivesData)(),t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),subgraphNames:new Set(t.subgraphNames),description:(0,Ie.getInitialFederatedDescription)(t)}}copyInputValueData(t){return{configureDescriptionDataBySubgraphName:(0,Ee.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByDirectiveName:(0,Ee.copyArrayValueMap)(t.directivesByDirectiveName),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:Pe.Kind.INPUT_VALUE_DEFINITION,name:(0,Mr.stringToNameNode)(t.name),type:t.type},originalCoords:t.originalCoords,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:(0,Ie.extractPersistedDirectives)((0,Ie.newPersistedDirectivesData)(),t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),renamedParentTypeName:t.renamedParentTypeName,requiredSubgraphNames:new Set(t.requiredSubgraphNames),subgraphNames:new Set(t.subgraphNames),type:t.type,defaultValue:t.defaultValue,description:(0,Ie.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,Ee.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 t.directivesByDirectiveName.has(_e.SEMANTIC_NON_NULL)&&this.referencedPersistedDirectiveNames.add(_e.SEMANTIC_NON_NULL),{argumentDataByName:this.copyInputValueDataByValueName(t.argumentDataByName,n,t.federatedCoords),configureDescriptionDataBySubgraphName:(0,Ee.copyObjectValueMap)(t.configureDescriptionDataBySubgraphName),directivesByDirectiveName:(0,Ee.copyArrayValueMap)(t.directivesByDirectiveName),externalFieldDataBySubgraphName:(0,Ee.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,Mr.stringToNameNode)(t.name),type:t.type},nullLevelsBySubgraphName:t.nullLevelsBySubgraphName,originalParentTypeName:t.originalParentTypeName,persistedDirectivesData:(0,Ie.extractPersistedDirectives)((0,Ie.newPersistedDirectivesData)(),t.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),renamedParentTypeName:t.renamedParentTypeName,subgraphNames:new Set(t.subgraphNames),type:t.type,description:(0,Ie.getInitialFederatedDescription)(t)}}copyEnumValueDataByValueName(t,n){let r=new Map;for(let[i,a]of t){let o=this.copyEnumValueData(a);this.recordTagNamesByCoords(o,o.federatedCoords),(n||(0,Ie.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,Ie.isNodeDataInaccessible)(a),c=this.copyFieldData(a,o);this.handleSubscriptionFilterDirective(c),(0,Ee.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 Pe.Kind.ENUM_TYPE_DEFINITION:return Q(x({},n),{appearances:t.appearances,enumValueDataByValueName:this.copyEnumValueDataByValueName(t.enumValueDataByValueName,t.isInaccessible),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,Mr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:return Q(x({},n),{inputValueDataByName:this.copyInputValueDataByValueName(t.inputValueDataByName,t.isInaccessible,t.name),isInaccessible:t.isInaccessible,kind:t.kind,node:{kind:t.kind,name:(0,Mr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Pe.Kind.INTERFACE_TYPE_DEFINITION:return Q(x({},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,Mr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Pe.Kind.OBJECT_TYPE_DEFINITION:return Q(x({},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,Mr.stringToNameNode)(t.renamedTypeName||t.name)},requireFetchReasonsFieldNames:new Set,renamedTypeName:t.renamedTypeName,subgraphNames:new Set(t.subgraphNames)});case Pe.Kind.SCALAR_TYPE_DEFINITION:return Q(x({},n),{kind:t.kind,node:{kind:t.kind,name:(0,Mr.stringToNameNode)(t.name)},subgraphNames:new Set(t.subgraphNames)});case Pe.Kind.UNION_TYPE_DEFINITION:return Q(x({},n),{kind:t.kind,node:{kind:t.kind,name:(0,Mr.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,Ie.isParentDataRootType)(r)&&(r.extensionType=IV.ExtensionType.NONE),r}return(0,Ie.extractPersistedDirectives)(t.persistedDirectivesData,n.directivesByDirectiveName,this.persistedDirectiveDefinitionByDirectiveName),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,Ie.isNodeDataInaccessible)(a);if(o&&this.inaccessibleCoords.add(a.name),r&&r.interfaceObjectSubgraphs.has(n)&&(a.kind=Pe.Kind.INTERFACE_TYPE_DEFINITION,a.node.kind=Pe.Kind.INTERFACE_TYPE_DEFINITION),!i){this.parentDefinitionDataByTypeName.set(a.name,a);return}if(a.kind!==t.kind&&(!r||!r.interfaceObjectSubgraphs.has(n)||a.kind!==Pe.Kind.INTERFACE_TYPE_DEFINITION||t.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION)){this.errors.push((0,Fe.incompatibleParentKindMergeError)(a.name,(0,Ee.kindToNodeType)(a.kind),(0,Ee.kindToNodeType)(t.kind)));return}switch((0,Ee.addNewObjectValueMapEntries)(t.configureDescriptionDataBySubgraphName,a.configureDescriptionDataBySubgraphName),(0,Ie.setLongestDescription)(a,t),(0,Ie.setParentDataExtensionType)(a,t),a.kind){case Pe.Kind.ENUM_TYPE_DEFINITION:if(!(0,Ie.areKindsEqual)(a,t))return;a.appearances+=1,a.isInaccessible||(a.isInaccessible=o),(0,Ee.addIterableValuesToSet)(t.subgraphNames,a.subgraphNames);for(let l of t.enumValueDataByValueName.values())this.upsertEnumValueData(a.enumValueDataByValueName,l,o);return;case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:if(!(0,Ie.areKindsEqual)(a,t))return;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ee.addIterableValuesToSet)(t.subgraphNames,a.subgraphNames);for(let l of t.inputValueDataByName.values())this.upsertInputValueData(a.inputValueDataByName,l,a.name,a.isInaccessible);return;case Pe.Kind.INTERFACE_TYPE_DEFINITION:case Pe.Kind.OBJECT_TYPE_DEFINITION:let c=t;o&&!a.isInaccessible&&this.propagateInaccessibilityToExistingChildren(a),a.isInaccessible||(a.isInaccessible=o),(0,Ee.addIterableValuesToSet)(c.implementedInterfaceTypeNames,a.implementedInterfaceTypeNames),(0,Ee.addIterableValuesToSet)(c.subgraphNames,a.subgraphNames);for(let l of c.fieldDataByName.values())this.upsertFieldData(a.fieldDataByName,l,a.isInaccessible);return;case Pe.Kind.UNION_TYPE_DEFINITION:if(!(0,Ie.areKindsEqual)(a,t))return;(0,Ee.addMapEntries)(t.memberByMemberTypeName,a.memberByMemberTypeName),(0,Ee.addIterableValuesToSet)(t.subgraphNames,a.subgraphNames);return;default:(0,Ee.addIterableValuesToSet)(t.subgraphNames,a.subgraphNames);return}}propagateInaccessibilityToExistingChildren(t){switch(t.kind){case Pe.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.argumentDataByArgumentName.values())this.namedInputValueTypeNames.add(o.namedTypeName),this.upsertInputValueData(a,o,`@${t.name}`,!1);this.potentialPersistedDirectiveDefinitionDataByDirectiveName.set(r,{argumentDataByArgumentName: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,Ie.setMutualExecutableLocations)(i,t.executableLocations),i.executableLocations.size<1){this.potentialPersistedDirectiveDefinitionDataByDirectiveName.delete(r);return}for(let a of t.argumentDataByArgumentName.values())this.namedInputValueTypeNames.add((0,hV.getTypeNodeNamedTypeName)(a.type)),this.upsertInputValueData(i.argumentDataByArgumentName,a,`@${i.name}`,!1);(0,Ie.setLongestDescription)(i,t),i.repeatable&&(i.repeatable=t.repeatable),(0,Ee.addIterableValuesToSet)(t.subgraphNames,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,Fe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}break}case Pe.Kind.UNION_TYPE_DEFINITION:{if(l){this.errors.push((0,Fe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}l=f;break}default:{this.errors.push((0,Fe.incompatibleFederatedFieldNamedTypeError)(t,n));break}}}if(o.size<1&&!l){this.errors.push((0,Fe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}let d=l;if(o.size>0){if(l){this.errors.push((0,Fe.incompatibleFederatedFieldNamedTypeError)(t,n));continue}for(let f of o.keys()){d=f;for(let[y,I]of o)if(f!==y&&!I.implementedInterfaceTypeNames.has(f)){d="";break}if(d)break}}if(!this.shouldUpdateFederatedFieldAbstractNamedType(d,c)){this.errors.push((0,Fe.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,ide.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 f of i.satisfiedFieldSets)c.satisfiedFieldSets.add(f),a.has(f)&&l.addTargetSubgraphByFieldSet(f,o);let d=r.fieldDatasBySubgraphName.get(o);for(let{name:f,namedTypeName:y}of d||[])this.internalGraph.addEdge(c,this.internalGraph.addOrUpdateNode(y),f);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,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,n,_e.PARENT_DEFINITION_DATA);if(i.kind===Pe.Kind.INTERFACE_TYPE_DEFINITION)for(let a of r.interfaceObjectSubgraphs){let o=(0,Ee.getOrThrowError)(this.internalSubgraphBySubgraphName,a,"internalSubgraphBySubgraphName"),c=o.configurationDataByTypeName,l=this.concreteTypeNamesByAbstractTypeName.get(n);if(!l)continue;let d=(0,Ee.getOrThrowError)(c,n,"configurationDataByTypeName"),f=d.keys;if(!f)continue;d.entityInterfaceConcreteTypeNames=new Set(r.concreteTypeNames),this.internalGraph.setSubgraphName(a);let y=this.internalGraph.addOrUpdateNode(n,{isAbstract:!0});for(let I of l){let v=(0,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,I,_e.PARENT_DEFINITION_DATA);if(!(0,xr.isObjectDefinitionData)(v))continue;let F=(0,Ee.getOrThrowError)(this.entityDataByTypeName,I,"entityDataByTypeName");F.subgraphNames.add(a);let k=c.get(I);if(k)if((0,Ee.addIterableValuesToSet)(d.fieldNames,k.fieldNames),!k.keys)k.keys=[...f];else e:for(let ie of f){for(let{selectionSet:Te}of k.keys)if(ie.selectionSet===Te)continue e;k.keys.push(ie)}else c.set(I,{fieldNames:new Set(d.fieldNames),isRootNode:!0,keys:[...f],typeName:I});let K=new Set;for(let ie of f.filter(Te=>!Te.disableEntityResolver))K.add(ie.selectionSet);let J=this.authorizationDataByParentTypeName.get(n),se=(0,Ee.getOrThrowError)(o.parentDefinitionDataByTypeName,n,"internalSubgraph.parentDefinitionDataByTypeName");if((0,xr.isObjectDefinitionData)(se)){for(let[ie,Te]of se.fieldDataByName){let de=`${I}.${ie}`;(0,Ee.getValueOrDefault)(this.fieldCoordsByNamedTypeName,Te.namedTypeName,()=>new Set).add(de);let Re=J==null?void 0:J.fieldAuthDataByFieldName.get(ie);if(Re){let ee=(0,Ee.getValueOrDefault)(this.authorizationDataByParentTypeName,I,()=>(0,xr.newAuthorizationData)(I));(0,xr.upsertFieldAuthorizationData)(ee.fieldAuthDataByFieldName,Re)||this.invalidORScopesCoords.add(de)}let xe=v.fieldDataByName.get(ie);if(xe){let ee=(t=Te.isShareableBySubgraphName.get(a))!=null?t:!1;xe.isShareableBySubgraphName.set(a,ee),xe.subgraphNames.add(a);let Se=Te.externalFieldDataBySubgraphName.get(a);if(!Se)continue;xe.externalFieldDataBySubgraphName.set(a,x({},Se));continue}let tt=i.isInaccessible||v.isInaccessible||Te.isInaccessible;v.fieldDataByName.set(ie,this.copyFieldData(Te,tt))}this.handleInterfaceObjectForInternalGraph({internalSubgraph:o,subgraphName:a,interfaceObjectData:r,interfaceObjectNode:y,resolvableKeyFieldSets:K,entityData:F})}}}}}fieldDataToGraphFieldData(t){var n;return{name:t.name,namedTypeName:t.namedTypeName,isLeaf:(0,xr.isNodeLeaf)((n=this.parentDefinitionDataByTypeName.get(t.namedTypeName))==null?void 0:n.kind),subgraphNames:t.subgraphNames}}getValidFlattenedPersistedDirectiveNodeArray(t){var i;let n=(0,xr.getNodeCoords)(t),r=[];for(let[a,o]of t.persistedDirectivesData.directivesByDirectiveName){if(a===_e.SEMANTIC_NON_NULL&&(0,Ie.isFieldData)(t)){r.push((0,Ee.generateSemanticNonNullDirective)((i=(0,Ee.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,Fe.invalidRepeatedFederatedDirectiveErrorMessage)(a,n));continue}r.push(...o)}}return r}getRouterPersistedDirectiveNodes(t){let n=[...t.persistedDirectivesData.tagDirectiveByName.values()];return t.persistedDirectivesData.isDeprecated&&n.push((0,Ie.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,Rc.getDescriptionFromString)(r);if(n.length<1)return t.description;this.errors.push((0,Fe.configureDescriptionPropagationError)((0,Ie.getDefinitionDataCoords)(t,!0),n))}getNodeForRouterSchemaByData(t){return t.node.name=(0,Mr.stringToNameNode)(t.name),t.node.description=this.getFederatedGraphNodeDescription(t),t.node.directives=this.getRouterPersistedDirectiveNodes(t),t.node}getNodeWithPersistedDirectivesByInputValueData(t){return t.node.name=(0,Mr.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,Ie.isTypeRequired)(c.type)&&i.push({inputValueName:o,missingSubgraphs:(0,Ee.getEntriesNotInHashSet)(t.subgraphNames,c.subgraphNames),requiredSubgraphs:[...c.requiredSubgraphNames]});return i.length>0?this.errors.push((0,Fe.invalidRequiredInputValueError)(_e.FIELD,a,i)):r.length>0&&((0,Ee.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,Mr.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,Fe.semanticNonNullInconsistentLevelsError)(t));return}for(let i of r)if(!n.has(i)){this.errors.push((0,Fe.semanticNonNullInconsistentLevelsError)(t));return}}}validateOneOfDirective({data:t,inputValueNodes:n,requiredFieldNames:r}){return t.directivesByDirectiveName.has(_e.ONE_OF)?r.size>0?(this.errors.push((0,Fe.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(r),typeName:t.name})),!1):(n.length===1&&this.warnings.push((0,ade.singleFederatedInputFieldOneOfWarning)({fieldName:n[0].name.value,typeName:t.name})),!0):!0}pushParentDefinitionDataToDocumentDefinitions(t){for(let[n,r]of this.parentDefinitionDataByTypeName)switch(r.extensionType!==IV.ExtensionType.NONE&&this.errors.push((0,Fe.noBaseDefinitionForExtensionError)((0,Ee.kindToNodeType)(r.kind),n)),r.kind){case Pe.Kind.ENUM_TYPE_DEFINITION:{let i=[],a=[],o=this.getEnumValueMergeMethod(n);(0,Ie.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n));for(let c of r.enumValueDataByValueName.values()){let l=(0,Ie.getNodeForRouterSchemaByData)(c,this.persistedDirectiveDefinitionByDirectiveName,this.errors),d=(0,Ie.isNodeDataInaccessible)(c),f=Q(x({},c.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(c)});switch(o){case Ie.MergeMethod.CONSISTENT:!d&&r.appearances>c.appearances&&this.errors.push((0,Fe.incompatibleSharedEnumError)(n)),i.push(l),d||a.push(f);break;case Ie.MergeMethod.INTERSECTION:r.appearances===c.appearances&&(i.push(l),d||a.push(f));break;default:i.push(l),d||a.push(f);break}}if(r.node.values=i,this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,Ie.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){this.errors.push((0,Fe.allChildDefinitionsAreInaccessibleError)((0,Ee.kindToNodeType)(r.kind),n,_e.ENUM_VALUE));break}this.clientDefinitions.push(Q(x({},r.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(r),values:a}));break}case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:{let i=new Array,a=new Array,o=new Array,c=new Set;for(let[l,d]of r.inputValueDataByName)if((0,Ie.isTypeRequired)(d.type)&&c.add(l),r.subgraphNames.size===d.subgraphNames.size){if(a.push(this.getNodeWithPersistedDirectivesByInputValueData(d)),(0,Ie.isNodeDataInaccessible)(d))continue;o.push(Q(x({},d.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(d)}))}else(0,Ie.isTypeRequired)(d.type)&&i.push({inputValueName:l,missingSubgraphs:(0,Ee.getEntriesNotInHashSet)(r.subgraphNames,d.subgraphNames),requiredSubgraphs:[...d.requiredSubgraphNames]});if(i.length>0){this.errors.push((0,Fe.invalidRequiredInputValueError)(_e.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,Ie.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r);break}if(o.length<1){this.errors.push((0,Fe.allChildDefinitionsAreInaccessibleError)((0,Ee.kindToNodeType)(r.kind),n,"Input field"));break}this.clientDefinitions.push(Q(x({},r.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(r),fields:o}));break}case Pe.Kind.INTERFACE_TYPE_DEFINITION:case Pe.Kind.OBJECT_TYPE_DEFINITION:{let i=[],a=[],o=new Map,c=(0,Ie.newInvalidFieldNames)(),l=r.kind===Pe.Kind.OBJECT_TYPE_DEFINITION,d=this.authorizationDataByParentTypeName.get(n);(0,Ie.propagateAuthDirectives)(r,d);for(let[y,I]of r.fieldDataByName){(0,Ie.propagateFieldAuthDirectives)(I,d);let v=this.getValidFieldArgumentNodes(I);l&&(0,Ie.validateExternalAndShareable)(I,c),this.validateSemanticNonNull(I),i.push(this.getNodeWithPersistedDirectivesByFieldData(I,v)),!(0,Ie.isNodeDataInaccessible)(I)&&(a.push((0,Ie.getClientSchemaFieldNodeByFieldData)(I)),o.set(y,this.fieldDataToGraphFieldData(I)))}if(l&&(c.byShareable.size>0&&this.errors.push((0,Fe.invalidFieldShareabilityError)(r,c.byShareable)),c.subgraphNamesByExternalFieldName.size>0&&this.errors.push((0,Fe.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 f=(0,rde.isNodeQuery)(n);if((0,Ie.isNodeDataInaccessible)(r)){if(f){this.errors.push(Fe.inaccessibleQueryRootTypeError);break}this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}if(a.length<1){let y=f?(0,Fe.noQueryRootTypeError)(!1):(0,Fe.allChildDefinitionsAreInaccessibleError)((0,Ee.kindToNodeType)(r.kind),n,_e.FIELD);this.errors.push(y);break}this.clientDefinitions.push(Q(x({},r.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(r),fields:a}));break}case Pe.Kind.SCALAR_TYPE_DEFINITION:{if(Bt.BASE_SCALARS.has(n))break;if((0,Ie.propagateAuthDirectives)(r,this.authorizationDataByParentTypeName.get(n)),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,Ie.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}this.clientDefinitions.push(Q(x({},r.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(r)}));break}case Pe.Kind.UNION_TYPE_DEFINITION:{if(r.node.types=(0,xr.mapToArrayOfValues)(r.memberByMemberTypeName),this.routerDefinitions.push(this.getNodeForRouterSchemaByData(r)),(0,Ie.isNodeDataInaccessible)(r)){this.validateReferencesOfInaccessibleType(r),this.internalGraph.setNodeInaccessible(r.name);break}let i=this.getClientSchemaUnionMembers(r);if(i.length<1){this.errors.push((0,Fe.allChildDefinitionsAreInaccessibleError)(_e.UNION,n,"union member type"));break}this.clientDefinitions.push(Q(x({},r.node),{directives:(0,Ie.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(_e.PERIOD);switch(o.length){case 2:{let c=(0,Ee.getValueOrDefault)(this.authorizationDataByParentTypeName,o[0],()=>(0,xr.newAuthorizationData)(o[0])),l=(0,Ee.getValueOrDefault)(c.fieldAuthDataByFieldName,o[1],()=>(0,xr.newFieldAuthorizationData)(o[1]));(t=l.inheritedData).requiresAuthentication||(t.requiresAuthentication=r.requiresAuthentication),l.inheritedData.requiredScopes.length*r.requiredScopes.length>Bt.MAX_OR_SCOPES?this.invalidORScopesCoords.add(a):(l.inheritedData.requiredScopesByOR=(0,xr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopesByOR,r.requiredScopesByOR),l.inheritedData.requiredScopes=(0,xr.mergeRequiredScopesByAND)(l.inheritedData.requiredScopes,r.requiredScopes));break}default:break}}}}federateSubgraphData(){this.federateInternalSubgraphData(),this.handleEntityInterfaces(),this.generateTagData(),this.pushVersionTwoDirectiveDefinitionsToDocumentDefinitions(),this.pushNamedTypeAuthDataToFields()}validateInterfaceImplementationsAndPushToDocumentDefinitions(t){for(let{data:n,clientSchemaFieldNodes:r}of t){if(n.node.interfaces=this.getValidImplementedInterfaces(n),this.routerDefinitions.push((0,Ie.getNodeForRouterSchemaByData)(n,this.persistedDirectiveDefinitionByDirectiveName,this.errors)),(0,Ie.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,Mr.stringToNamedTypeNode)(a));this.clientDefinitions.push(Q(x({},n.node),{directives:(0,Ie.getClientPersistedDirectiveNodes)(n),fields:r,interfaces:i}))}}pushVersionTwoDirectiveDefinitionsToDocumentDefinitions(){if(!this.isVersionTwo){this.referencedPersistedDirectiveNames.has(_e.SEMANTIC_NON_NULL)&&(this.clientDefinitions.push(Bt.SEMANTIC_NON_NULL_DEFINITION),this.routerDefinitions=[Bt.DEPRECATED_DEFINITION,Bt.SEMANTIC_NON_NULL_DEFINITION,Bt.TAG_DEFINITION]);return}if(this.referencedPersistedDirectiveNames.has(_e.SEMANTIC_NON_NULL)){this.clientDefinitions.push(Bt.SEMANTIC_NON_NULL_DEFINITION),this.routerDefinitions=[Bt.AUTHENTICATED_DEFINITION,Bt.DEPRECATED_DEFINITION,Bt.INACCESSIBLE_DEFINITION,Bt.REQUIRES_SCOPES_DEFINITION,Bt.SEMANTIC_NON_NULL_DEFINITION,Bt.TAG_DEFINITION,Bt.SCOPE_SCALAR_DEFINITION];return}this.routerDefinitions=[Bt.AUTHENTICATED_DEFINITION,Bt.DEPRECATED_DEFINITION,Bt.INACCESSIBLE_DEFINITION,Bt.REQUIRES_SCOPES_DEFINITION,Bt.TAG_DEFINITION,Bt.SCOPE_SCALAR_DEFINITION]}validatePathSegmentInaccessibility(t){if(!t)return!1;let r=t.split(_e.LEFT_PARENTHESIS)[0].split(_e.PERIOD),i=r[0];for(let a=0;a0&&this.errors.push((0,Fe.invalidReferencesOfInaccessibleTypeError)((0,Ee.kindToNodeType)(t.kind),t.name,r))}validateQueryRootType(){let t=this.parentDefinitionDataByTypeName.get(_e.QUERY);if(!t||t.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size<1){this.errors.push((0,Fe.noQueryRootTypeError)());return}for(let n of t.fieldDataByName.values())if(!(0,Ie.isNodeDataInaccessible)(n))return;this.errors.push((0,Fe.noQueryRootTypeError)())}validateSubscriptionFieldConditionFieldPath(t,n,r,i,a){let o=t.split(_e.PERIOD);if(o.length<1)return a.push((0,Fe.invalidSubscriptionFieldConditionFieldPathErrorMessage)(r,t)),[];let c=n;if(this.inaccessibleCoords.has(c.renamedTypeName))return a.push((0,Fe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,o[0],c.renamedTypeName)),[];let l="";for(let d=0;d0?`.${f}`:f,c.kind!==Pe.Kind.OBJECT_TYPE_DEFINITION)return a.push((0,Fe.invalidSubscriptionFieldConditionFieldPathParentErrorMessage)(r,t,l)),[];let y=c.fieldDataByName.get(f);if(!y)return a.push((0,Fe.undefinedSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,f,c.renamedTypeName)),[];let I=`${c.renamedTypeName}.${f}`;if(!y.subgraphNames.has(i))return a.push((0,Fe.invalidSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I,i)),[];if(this.inaccessibleCoords.has(I))return a.push((0,Fe.inaccessibleSubscriptionFieldConditionFieldPathFieldErrorMessage)(r,t,l,I)),[];if(Bt.BASE_SCALARS.has(y.namedTypeName)){c={kind:Pe.Kind.SCALAR_TYPE_DEFINITION,name:y.namedTypeName};continue}c=(0,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,y.namedTypeName,_e.PARENT_DEFINITION_DATA)}return(0,Ie.isLeafKind)(c.kind)?o:(a.push((0,Fe.nonLeafSubscriptionFieldConditionFieldPathFinalFieldErrorMessage)(r,t,o[o.length-1],(0,Ee.kindToNodeType)(c.kind),c.name)),[])}validateSubscriptionFieldCondition(t,n,r,i,a,o,c){if(i>GE.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return c.push((0,Fe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;let l=!1,d=new Set([_e.FIELD_PATH,_e.VALUES]),f=new Set,y=new Set,I=[];for(let v of t.fields){let F=v.name.value,k=a+`.${F}`;switch(F){case _e.FIELD_PATH:{if(d.has(_e.FIELD_PATH))d.delete(_e.FIELD_PATH);else{l=!0,f.add(_e.FIELD_PATH);break}if(v.value.kind!==Pe.Kind.STRING){I.push((0,Fe.invalidInputFieldTypeErrorMessage)(k,_e.STRING,(0,Ee.kindToNodeType)(v.value.kind))),l=!0;break}let K=this.validateSubscriptionFieldConditionFieldPath(v.value.value,r,k,o,I);if(K.length<1){l=!0;break}n.fieldPath=K;break}case _e.VALUES:{if(d.has(_e.VALUES))d.delete(_e.VALUES);else{l=!0,f.add(_e.VALUES);break}let K=v.value.kind;if(K==Pe.Kind.NULL||K==Pe.Kind.OBJECT){I.push((0,Fe.invalidInputFieldTypeErrorMessage)(k,_e.LIST,(0,Ee.kindToNodeType)(v.value.kind))),l=!0;break}if(K!==Pe.Kind.LIST){n.values=[(0,Ie.getSubscriptionFilterValue)(v.value)];break}let J=new Set,se=[];for(let ie=0;ie0){I.push((0,Fe.subscriptionFieldConditionInvalidValuesArrayErrorMessage)(k,se));continue}if(J.size<1){l=!0,I.push((0,Fe.subscriptionFieldConditionEmptyValuesArrayErrorMessage)(k));continue}n.values=[...J];break}default:l=!0,y.add(F)}}return l?(c.push((0,Fe.subscriptionFieldConditionInvalidInputFieldErrorMessage)(a,[...d],[...f],[...y],I)),!1):!0}validateSubscriptionFilterCondition(t,n,r,i,a,o,c){if(i>GE.MAX_SUBSCRIPTION_FILTER_DEPTH||this.isMaxDepth)return c.push((0,Fe.subscriptionFilterConditionDepthExceededErrorMessage)(a)),this.isMaxDepth=!0,!1;if(i+=1,t.fields.length!==1)return c.push((0,Fe.subscriptionFilterConditionInvalidInputFieldNumberErrorMessage)(a,t.fields.length)),!1;let l=t.fields[0],d=l.name.value;if(!yV.SUBSCRIPTION_FILTER_INPUT_NAMES.has(d))return c.push((0,Fe.subscriptionFilterConditionInvalidInputFieldErrorMessage)(a,d)),!1;let f=a+`.${d}`;switch(l.value.kind){case Pe.Kind.OBJECT:switch(d){case _e.IN_UPPER:return n.in={fieldPath:[],values:[]},this.validateSubscriptionFieldCondition(l.value,n.in,r,i,a+".IN",o,c);case _e.NOT_UPPER:return n.not={},this.validateSubscriptionFilterCondition(l.value,n.not,r,i,a+".NOT",o,c);default:return c.push((0,Fe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(f,_e.LIST,_e.OBJECT)),!1}case Pe.Kind.LIST:{let y=[];switch(d){case _e.AND_UPPER:{n.and=y;break}case _e.OR_UPPER:{n.or=y;break}default:return c.push((0,Fe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(f,_e.OBJECT,_e.LIST)),!1}let I=l.value.values.length;if(I<1||I>5)return c.push((0,Fe.subscriptionFilterArrayConditionInvalidLengthErrorMessage)(f,I)),!1;let v=!0,F=[];for(let k=0;k0?(c.push((0,Fe.subscriptionFilterArrayConditionInvalidItemTypeErrorMessage)(f,F)),!1):v}default:{let y=yV.SUBSCRIPTION_FILTER_LIST_INPUT_NAMES.has(d)?_e.LIST:_e.OBJECT;return c.push((0,Fe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(f,y,(0,Ee.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!==Pe.Kind.OBJECT){this.errors.push((0,Fe.invalidSubscriptionFilterDirectiveError)(r,[(0,Fe.subscriptionFilterConditionInvalidInputFieldTypeErrorMessage)(_e.CONDITION,_e.OBJECT,(0,Ee.kindToNodeType)(c.value.kind))]));return}let l={},d=[];if(!this.validateSubscriptionFilterCondition(c.value,l,n,0,_e.CONDITION,o,d)){this.errors.push((0,Fe.invalidSubscriptionFilterDirectiveError)(r,d)),this.isMaxDepth=!1;return}(0,Ee.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,Fe.invalidSubscriptionFilterDirectiveError)(t,[(0,Fe.subscriptionFilterNamedTypeErrorMessage)(n.fieldData.namedTypeName)]));continue}(0,Ie.isNodeDataInaccessible)(r)||r.kind===Pe.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,Fe.orScopesLimitError)(Bt.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));for(let a of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,Ie.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:Pe.Kind.DOCUMENT,definitions:this.routerDefinitions},r=(0,Pe.buildASTSchema)({kind:Pe.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),i=new Map;for(let a of this.internalSubgraphBySubgraphName.values())i.set(a.name,{configurationDataByTypeName:a.configurationDataByTypeName,isVersionTwo:a.isVersionTwo,parentDefinitionDataByTypeName:a.parentDefinitionDataByTypeName,schema:a.schema});for(let a of this.authorizationDataByParentTypeName.values())(0,xr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,a);return x({fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),subgraphConfigBySubgraphName:i,federatedGraphAST:n,federatedGraphSchema:(0,Pe.buildASTSchema)(n,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:r,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,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,Ee.getOrThrowError)(n,o,`${t.name}.childDataByChildName`);if((0,Ie.isNodeDataInaccessible)(l)){a-=1;continue}i.isDisjointFrom(c.tagNames)||((0,Ee.getValueOrDefault)(l.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}handleChildTagInclusions(t,n,r,i){let a=n.size;for(let[o,c]of n){if((0,Ie.isNodeDataInaccessible)(c)){a-=1;continue}let l=r.get(o);(!l||i.isDisjointFrom(l.tagNames))&&((0,Ee.getValueOrDefault)(c.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(`${t.name}.${o}`),a-=1)}a<1&&(t.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(t.name))}buildFederationContractResult(t){if(this.isVersionTwo||this.routerDefinitions.push(Bt.INACCESSIBLE_DEFINITION),t.tagNamesToExclude.size>0)for(let[o,c]of this.parentTagDataByTypeName){let l=(0,Ee.getOrThrowError)(this.parentDefinitionDataByTypeName,o,_e.PARENT_DEFINITION_DATA);if(!(0,Ie.isNodeDataInaccessible)(l)){if(!t.tagNamesToExclude.isDisjointFrom(c.tagNames)){l.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(!(c.childTagDataByChildName.size<1))switch(l.kind){case Pe.Kind.SCALAR_TYPE_DEFINITION:case Pe.Kind.UNION_TYPE_DEFINITION:break;case Pe.Kind.ENUM_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.enumValueDataByValueName,c.childTagDataByChildName,t.tagNamesToExclude);break}case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:{this.handleChildTagExclusions(l,l.inputValueDataByName,c.childTagDataByChildName,t.tagNamesToExclude);break}default:{let d=l.fieldDataByName.size;for(let[f,y]of c.childTagDataByChildName){let I=(0,Ee.getOrThrowError)(l.fieldDataByName,f,`${o}.fieldDataByFieldName`);if((0,Ie.isNodeDataInaccessible)(I)){d-=1;continue}if(!t.tagNamesToExclude.isDisjointFrom(y.tagNames)){(0,Ee.getValueOrDefault)(I.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(I.federatedCoords),d-=1;continue}for(let[v,F]of y.tagNamesByArgumentName){let k=(0,Ee.getOrThrowError)(I.argumentDataByName,v,`${f}.argumentDataByArgumentName`);(0,Ie.isNodeDataInaccessible)(k)||t.tagNamesToExclude.isDisjointFrom(F)||((0,Ee.getValueOrDefault)(k.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(k.federatedCoords))}}d<1&&(l.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}}else if(t.tagNamesToInclude.size>0)for(let[o,c]of this.parentDefinitionDataByTypeName){if((0,Ie.isNodeDataInaccessible)(c))continue;let l=this.parentTagDataByTypeName.get(o);if(!l){c.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}if(t.tagNamesToInclude.isDisjointFrom(l.tagNames)){if(l.childTagDataByChildName.size<1){c.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o);continue}switch(c.kind){case Pe.Kind.SCALAR_TYPE_DEFINITION:case Pe.Kind.UNION_TYPE_DEFINITION:continue;case Pe.Kind.ENUM_TYPE_DEFINITION:this.handleChildTagInclusions(c,c.enumValueDataByValueName,l.childTagDataByChildName,t.tagNamesToInclude);break;case Pe.Kind.INPUT_OBJECT_TYPE_DEFINITION:this.handleChildTagInclusions(c,c.inputValueDataByName,l.childTagDataByChildName,t.tagNamesToInclude);break;default:let d=c.fieldDataByName.size;for(let[f,y]of c.fieldDataByName){if((0,Ie.isNodeDataInaccessible)(y)){d-=1;continue}let I=l.childTagDataByChildName.get(f);(!I||t.tagNamesToInclude.isDisjointFrom(I.tagNames))&&((0,Ee.getValueOrDefault)(y.persistedDirectivesData.directivesByDirectiveName,_e.INACCESSIBLE,()=>[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(y.federatedCoords),d-=1)}d<1&&(c.persistedDirectivesData.directivesByDirectiveName.set(_e.INACCESSIBLE,[(0,Ee.generateSimpleDirective)(_e.INACCESSIBLE)]),this.inaccessibleCoords.add(o))}}}this.subscriptionFilterDataByFieldPath.size>0&&this.validateSubscriptionFiltersAndGenerateConfiguration();for(let o of this.potentialPersistedDirectiveDefinitionDataByDirectiveName.values())(0,Ie.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:Pe.Kind.DOCUMENT,definitions:this.routerDefinitions},i=(0,Pe.buildASTSchema)({kind:Pe.Kind.DOCUMENT,definitions:this.clientDefinitions},{assumeValid:!0,assumeValidSDL:!0}),a=new Map;for(let o of this.internalSubgraphBySubgraphName.values())a.set(o.name,{configurationDataByTypeName:o.configurationDataByTypeName,isVersionTwo:o.isVersionTwo,parentDefinitionDataByTypeName:o.parentDefinitionDataByTypeName,schema:o.schema});for(let o of this.authorizationDataByParentTypeName.values())(0,xr.upsertAuthorizationConfiguration)(this.fieldConfigurationByFieldCoords,o);return x({fieldConfigurations:Array.from(this.fieldConfigurationByFieldCoords.values()),subgraphConfigBySubgraphName:a,federatedGraphAST:r,federatedGraphSchema:(0,Pe.buildASTSchema)(r,{assumeValid:!0,assumeValidSDL:!0}),federatedGraphClientSchema:i,parentDefinitionDataByTypeName:this.parentDefinitionDataByTypeName,success:!0,warnings:this.warnings},this.getClientSchemaObjectBoolean())}federateSubgraphsInternal(){return this.federateSubgraphData(),this.buildFederationResult()}};Pc.FederationFactory=$E;function _D({disableResolvabilityValidation:e,subgraphs:t}){if(t.length<1)return{errors:[Fe.minimumSubgraphRequirementError],success:!1,warnings:[]};let n=(0,nde.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,f]of l.entityInterfaces){let y=r.get(d);if(!y){r.set(d,(0,xr.newEntityInterfaceFederationData)(f,c));continue}(0,xr.upsertEntityInterfaceFederationData)(y,f,c)}let a=new Array,o=new Map;for(let[c,l]of r){let d=l.concreteTypeNames.size;for(let[f,y]of l.subgraphDataByTypeName){let I=(0,Ee.getValueOrDefault)(o,f,()=>new Set);if((0,Ee.addIterableValuesToSet)(y.concreteTypeNames,I),!y.isInterfaceObject){y.resolvable&&y.concreteTypeNames.size!==d&&(0,Ee.getValueOrDefault)(i,c,()=>new Array).push({subgraphName:f,definedConcreteTypeNames:new Set(y.concreteTypeNames),requiredConcreteTypeNames:new Set(l.concreteTypeNames)});continue}(0,Ee.addIterableValuesToSet)(l.concreteTypeNames,I);let{parentDefinitionDataByTypeName:v}=(0,Ee.getOrThrowError)(n.internalSubgraphBySubgraphName,f,"internalSubgraphBySubgraphName"),F=[];for(let k of l.concreteTypeNames)v.has(k)&&F.push(k);F.length>0&&a.push((0,Fe.invalidInterfaceObjectImplementationDefinitionsError)(c,f,F))}}for(let[c,l]of i){let d=new Array;for(let f of l){let y=o.get(f.subgraphName);if(!y){d.push(f);continue}let I=f.requiredConcreteTypeNames.intersection(y);f.requiredConcreteTypeNames.size!==I.size&&(f.definedConcreteTypeNames=I,d.push(f))}if(d.length>0){i.set(c,d);continue}i.delete(c)}return i.size>0&&a.push((0,Fe.undefinedEntityInterfaceImplementationsError)(i,r)),a.length>0?{errors:a,success:!1,warnings:n.warnings}:{federationFactory:new $E({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 sde({disableResolvabilityValidation:e,subgraphs:t}){let n=_D({subgraphs:t,disableResolvabilityValidation:e});return n.success?n.federationFactory.federateSubgraphsInternal():{errors:n.errors,success:!1,warnings:n.warnings}}function ode({subgraphs:e,tagOptionsByContractName:t,disableResolvabilityValidation:n}){let r=_D({subgraphs:e,disableResolvabilityValidation:n});if(!r.success)return{errors:r.errors,success:!1,warnings:r.warnings};r.federationFactory.federateSubgraphData();let i=[(0,gV.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,f]of t){l!==o&&i.push((0,gV.cloneDeep)(i[l]));let y=i[l].buildFederationContractResult(f);c.set(d,y),l++}return Q(x({},a),{federationResultByContractName:c})}function ude({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n}){let r=_D({subgraphs:n,disableResolvabilityValidation:t});return r.success?(r.federationFactory.federateSubgraphData(),r.federationFactory.buildFederationContractResult(e)):{errors:r.errors,success:!1,warnings:r.warnings}}});var QE=w(As=>{"use strict";m();T();N();Object.defineProperty(As,"__esModule",{value:!0});As.LATEST_ROUTER_COMPATIBILITY_VERSION=As.ROUTER_COMPATIBILITY_VERSIONS=As.ROUTER_COMPATIBILITY_VERSION_ONE=void 0;As.ROUTER_COMPATIBILITY_VERSION_ONE="1";As.ROUTER_COMPATIBILITY_VERSIONS=new Set([As.ROUTER_COMPATIBILITY_VERSION_ONE]);As.LATEST_ROUTER_COMPATIBILITY_VERSION="1"});var vV=w(tf=>{"use strict";m();T();N();Object.defineProperty(tf,"__esModule",{value:!0});tf.federateSubgraphs=cde;tf.federateSubgraphsWithContracts=lde;tf.federateSubgraphsContract=dde;var vD=_V(),SD=QE();function cde({disableResolvabilityValidation:e,subgraphs:t,version:n=SD.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(n){default:return(0,vD.federateSubgraphs)({disableResolvabilityValidation:e,subgraphs:t})}}function lde({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n,version:r=SD.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,vD.federateSubgraphsWithContracts)({disableResolvabilityValidation:e,subgraphs:t,tagOptionsByContractName:n})}}function dde({contractTagOptions:e,disableResolvabilityValidation:t,subgraphs:n,version:r=SD.ROUTER_COMPATIBILITY_VERSION_ONE}){switch(r){default:return(0,vD.federateSubgraphsContract)({disableResolvabilityValidation:t,subgraphs:n,contractTagOptions:e})}}});var OV=w(SV=>{"use strict";m();T();N();Object.defineProperty(SV,"__esModule",{value:!0})});var DV=w(nf=>{"use strict";m();T();N();Object.defineProperty(nf,"__esModule",{value:!0});nf.normalizeSubgraphFromString=pde;nf.normalizeSubgraph=fde;nf.batchNormalize=mde;var OD=hD(),DD=QE();function pde(e,t=!0,n=DD.ROUTER_COMPATIBILITY_VERSION_ONE){switch(n){default:return(0,OD.normalizeSubgraphFromString)(e,t)}}function fde(e,t,n,r=DD.ROUTER_COMPATIBILITY_VERSION_ONE){switch(r){default:return(0,OD.normalizeSubgraph)(e,t,n)}}function mde(e,t=DD.ROUTER_COMPATIBILITY_VERSION_ONE){switch(t){default:return(0,OD.batchNormalize)(e)}}});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 MV=w(kV=>{"use strict";m();T();N();Object.defineProperty(kV,"__esModule",{value:!0})});var xV=w(YE=>{"use strict";m();T();N();Object.defineProperty(YE,"__esModule",{value:!0});YE.COMPOSITION_VERSION=void 0;YE.COMPOSITION_VERSION="{{$COMPOSITION__VERSION}}"});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 JE=w(ot=>{"use strict";m();T();N();var Nde=ot&&ot.__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]}),yt=ot&&ot.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Nde(t,e,n)};Object.defineProperty(ot,"__esModule",{value:!0});yt(Hr(),ot);yt(Dv(),ot);yt(Mi(),ot);yt(Xk(),ot);yt(vV(),ot);yt(OV(),ot);yt(DV(),ot);yt(AV(),ot);yt(ND(),ot);yt(iD(),ot);yt(LE(),ot);yt(PV(),ot);yt(wV(),ot);yt(cD(),ot);yt(QE(),ot);yt(CV(),ot);yt(TD(),ot);yt(du(),ot);yt(Sp(),ot);yt(Sl(),ot);yt(UV(),ot);yt(MV(),ot);yt(xV(),ot);yt(vr(),ot);yt(VV(),ot);yt(Sr(),ot);yt(zO(),ot);yt(VN(),ot);yt(gD(),ot);yt(KV(),ot);yt($O(),ot);yt(Hp(),ot);yt($V(),ot);yt(ZO(),ot);yt(jE(),ot);yt(JO(),ot);yt(Ss(),ot);yt(Jp(),ot);yt(jp(),ot);yt(zp(),ot)});var upe={};pm(upe,{buildRouterConfiguration:()=>ope,federateSubgraphs:()=>spe});m();T();N();var kc=fs(JE());m();T();N();m();T();N();function bD(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=fs(Ae(),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 e1(e){return HE(e,[])}function HE(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Tde(e,t);default:return String(e)}}function zV(e){return e instanceof XV.GraphQLError?e.toString():`${e.name}: ${e.message}; ${e.stack}`}function Tde(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(Ede(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:HE(r,n)}else if(Array.isArray(e))return WV(e,n);return hde(e,n)}function Ede(e){return typeof e.toJSON=="function"}function hde(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>ZV?"["+yde(e)+"]":"{ "+n.map(([i,a])=>i+": "+HE(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 we=fs(Ae(),1);m();T();N();var Xa=fs(Ae(),1);function Za(e){if((0,Xa.isNonNullType)(e)){let t=Za(e.ofType);if(t.kind===Xa.Kind.NON_NULL_TYPE)throw new Error(`Invalid type node ${e1(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:Xa.Kind.NON_NULL_TYPE,type:t}}else if((0,Xa.isListType)(e))return{kind:Xa.Kind.LIST_TYPE,type:Za(e.ofType)};return{kind:Xa.Kind.NAMED_TYPE,name:{kind:Xa.Kind.NAME,value:e.name}}}m();T();N();var es=fs(Ae(),1);function WE(e){if(e===null)return{kind:es.Kind.NULL};if(e===void 0)return null;if(Array.isArray(e)){let t=[];for(let n of e){let r=WE(n);r!=null&&t.push(r)}return{kind:es.Kind.LIST,values:t}}if(typeof e=="object"){let t=[];for(let n in e){let r=e[n],i=WE(r);i&&t.push({kind:es.Kind.OBJECT_FIELD,name:{kind:es.Kind.NAME,value:n},value:i})}return{kind:es.Kind.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:es.Kind.BOOLEAN,value:e};if(typeof e=="number"&&isFinite(e)){let t=String(e);return Ide.test(t)?{kind:es.Kind.INT,value:t}:{kind:es.Kind.FLOAT,value:t}}if(typeof e=="string")return{kind:es.Kind.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}var Ide=/^-?(?:0|[1-9][0-9]*)$/;m();T();N();m();T();N();function XE(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 pMe=XE(function(t){let n=gde(t);return new Set([...n].map(r=>r.name))}),gde=XE(function(t){let n=AD(t);return new Set(n.values())}),AD=XE(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 _de(e,t={}){let n=t.pathToDirectivesInExtensions,r=e.getTypeMap(),i=vde(e,n),a=i!=null?[i]:[],o=e.getDirectives();for(let c of o)(0,we.isSpecifiedDirective)(c)||a.push(Sde(c,e,n));for(let c in r){let l=r[c],d=(0,we.isSpecifiedScalarType)(l),f=(0,we.isIntrospectionType)(l);if(!(d||f))if((0,we.isObjectType)(l))a.push(Ode(l,e,n));else if((0,we.isInterfaceType)(l))a.push(Dde(l,e,n));else if((0,we.isUnionType)(l))a.push(bde(l,e,n));else if((0,we.isInputObjectType)(l))a.push(Ade(l,e,n));else if((0,we.isEnumType)(l))a.push(Rde(l,e,n));else if((0,we.isScalarType)(l))a.push(Pde(l,e,n));else throw new Error(`Unknown type ${l}.`)}return{kind:we.Kind.DOCUMENT,definitions:a}}function t1(e,t={}){let n=_de(e,t);return(0,we.print)(n)}function vde(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 f of e.extensionASTNodes)a.push(f);for(let f of a)if(f.operationTypes)for(let y of f.operationTypes)i.set(y.operation,y);let o=AD(e);for(let[f,y]of i){let I=o.get(f);if(I!=null){let v=Za(I);y!=null?y.type=v:i.set(f,{kind:we.Kind.OPERATION_TYPE_DEFINITION,operation:f,type:v})}}let c=[...i.values()].filter(YV),l=ed(e,e,t);if(!c.length&&!l.length)return null;let d={kind:c!=null?we.Kind.SCHEMA_DEFINITION:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,d}function Sde(e,t,n){var r,i,a,o;return{kind:we.Kind.DIRECTIVE_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:we.Kind.STRING,value:e.description}:void 0,name:{kind:we.Kind.NAME,value:e.name},arguments:(a=e.args)===null||a===void 0?void 0:a.map(c=>n1(c,t,n)),repeatable:e.isRepeatable,locations:((o=e.locations)===null||o===void 0?void 0:o.map(c=>({kind:we.Kind.NAME,value:c})))||[]}}function ed(e,t,n){let r=zE(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=RD(t,r);else{a=[];for(let o of i)o.directives&&a.push(...o.directives)}return a}function eh(e,t,n){var r,i;let a=[],o=null,c=zE(e,n),l;return c!=null?l=RD(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=Lde(e.deprecationReason)),o==null?a:[o].concat(a)}function n1(e,t,n){var r,i,a;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},type:Za(e.type),defaultValue:e.defaultValue!==void 0&&(a=(0,we.astFromValue)(e.defaultValue,e.type))!==null&&a!==void 0?a:void 0,directives:eh(e,t,n)}}function Ode(e,t,n){var r,i;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(a=>r1(a,t,n)),interfaces:Object.values(e.getInterfaces()).map(a=>Za(a)),directives:ed(e,t,n)}}function Dde(e,t,n){var r,i;let a={kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(o=>r1(o,t,n)),directives:ed(e,t,n)};return"getInterfaces"in e&&(a.interfaces=Object.values(e.getInterfaces()).map(o=>Za(o))),a}function bde(e,t,n){var r,i;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},directives:ed(e,t,n),types:e.getTypes().map(a=>Za(a))}}function Ade(e,t,n){var r,i;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},fields:Object.values(e.getFields()).map(a=>Fde(a,t,n)),directives:ed(e,t,n)}}function Rde(e,t,n){var r,i;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},values:Object.values(e.getValues()).map(a=>wde(a,t,n)),directives:ed(e,t,n)}}function Pde(e,t,n){var r,i,a;let o=zE(e,n),c=o?RD(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(ZE("specifiedBy",d))}return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},directives:c}}function r1(e,t,n){var r,i;return{kind:we.Kind.FIELD_DEFINITION,description:(i=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&i!==void 0?i:e.description?{kind:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},arguments:e.args.map(a=>n1(a,t,n)),type:Za(e.type),directives:eh(e,t,n)}}function Fde(e,t,n){var r,i,a;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},type:Za(e.type),directives:eh(e,t,n),defaultValue:(a=(0,we.astFromValue)(e.defaultValue,e.type))!==null&&a!==void 0?a:void 0}}function wde(e,t,n){var r,i;return{kind:we.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:we.Kind.STRING,value:e.description,block:!0}:void 0,name:{kind:we.Kind.NAME,value:e.name},directives:eh(e,t,n)}}function Lde(e){return ZE("deprecated",{reason:e},we.GraphQLDeprecatedDirective)}function ZE(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,we.astFromValue)(o,i.type);c&&r.push({kind:we.Kind.ARGUMENT,name:{kind:we.Kind.NAME,value:a},value:c})}}else for(let i in t){let a=t[i],o=WE(a);o&&r.push({kind:we.Kind.ARGUMENT,name:{kind:we.Kind.NAME,value:i},value:o})}return{kind:we.Kind.DIRECTIVE,name:{kind:we.Kind.NAME,value:e},arguments:r}}function RD(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(ZE(r,o,a));else n.push(ZE(r,i,a))}return n}var cd=fs(JE(),1);m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();m();T();N();function ln(e,t){if(!e)throw new Error(t)}var Cde=34028234663852886e22,Bde=-34028234663852886e22,Ude=4294967295,kde=2147483647,Mde=-2147483648;function td(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>kde||eUde||e<0)throw new Error("invalid uint 32: "+e)}function th(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>Cde||e({no:i.no,name:i.name,localName:e[i.no]})),r)}function FD(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let o of t){let c=o1(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 s1(e,t,n){let r={};for(let i of t){let a=o1(i);r[a.localName]=a.no,r[a.no]=a.localName}return PD(r,e,t,n),r}function o1(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}m();T();N();m();T();N();var Le=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 u1(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 Le),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 l1(){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 nh=4294967296;function wD(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>=nh&&(i=i+(r/nh|0),r=r%nh)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?p1(r,i):CD(r,i)}function d1(e,t){let n=CD(e,t),r=n.hi&2147483648;r&&(n=p1(n.lo,n.hi));let i=LD(n.lo,n.hi);return r?"-"+i:i}function LD(e,t){if({lo:e,hi:t}=xde(e,t),t<=2097151)return String(nh*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()+c1(o)+c1(a)}function xde(e,t){return{lo:e>>>0,hi:t>>>0}}function CD(e,t){return{lo:e|0,hi:t|0}}function p1(e,t){return t=~t,e?e=~e+1:t+=1,CD(e,t)}var c1=e=>{let t=String(e);return"0000000".slice(t.length)+t};function BD(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 f1(){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 qde(){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 O!="object"||typeof O.env!="object"||O.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||dln(/^-?[0-9]+$/.test(i),`int64 invalid: ${i}`),r=i=>ln(/^[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),wD(i)},uEnc(i){return typeof i!="string"&&(i=i.toString()),r(i),wD(i)},dec(i,a){return d1(i,a)},uDec(i,a){return LD(i,a)}}}var Gn=qde();m();T();N();var Ne;(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"})(Ne||(Ne={}));var ha;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING"})(ha||(ha={}));function Rs(e,t,n){if(t===n)return!0;if(e==Ne.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(rf(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return td(t),BD(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){th(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){rf(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){td(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return td(t),t=(t<<1^t>>31)>>>0,BD(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),i=Gn.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=Gn.uEnc(t);return r.setInt32(0,i.lo,!0),r.setInt32(4,i.hi,!0),this.raw(n)}int64(t){let n=Gn.enc(t);return rh(n.lo,n.hi,this.buf),this}sint64(t){let n=Gn.enc(t),r=n.hi>>31,i=n.lo<<1^r,a=(n.hi<<1|n.lo>>>31)^r;return rh(i,a,this.buf),this}uint64(t){let n=Gn.uEnc(t);return rh(n.lo,n.hi,this.buf),this}},sh=class{constructor(t,n){this.varint64=l1,this.uint32=f1,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 Un.Varint:for(;this.buf[this.pos++]&128;);break;case Un.Bit64:this.pos+=4;case Un.Bit32:this.pos+=4;break;case Un.LengthDelimited:let r=this.uint32();this.pos+=r;break;case Un.StartGroup:let i;for(;(i=this.tag()[1])!==Un.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 Gn.dec(...this.varint64())}uint64(){return Gn.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),r=-(t&1);return t=(t>>>1|(n&1)<<31)^r,n=n>>>1^r,Gn.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 Gn.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Gn.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 m1(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 oh(e){let t=e.field.localName,n=Object.create(null);return n[t]=Vde(e),[n,()=>n[t]]}function Vde(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 ya(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 N1(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 Ps="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),uh=[];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+=Ps[i|r>>4],i=(r&15)<<2,n=2;break;case 2:t+=Ps[i|r>>6],t+=Ps[r&63],n=0;break}return n&&(t+=Ps[i],t+="=",n==1&&(t+="=")),t}};m();T();N();function T1(e,t,n){h1(t,e);let r=t.runtime.bin.makeReadOptions(n),i=N1(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,o]=oh(t);for(let c of i)t.runtime.bin.readField(a,r.readerFactory(c.data),t.field,c.wireType,r);return o()}function E1(e,t,n,r){h1(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(kD(e,t)){let d=e.getType().runtime.bin.listUnknownFields(e).filter(f=>f.no!=t.field.no);e.getType().runtime.bin.discardUnknownFields(e);for(let f of d)e.getType().runtime.bin.onUnknownField(e,f.no,f.wireType,f.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 h1(e,t){ln(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}m();T();N();function ch(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:!ih(e.T,t[n]);case"message":return t[n]!==void 0;case"map":return Object.keys(t[n]).length>0}}function MD(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?ya(e.T,e.L):void 0;break;case"message":t[n]=void 0;break}}m();T();N();m();T();N();function Ia(e,t){if(e===null||typeof e!="object"||!Object.getOwnPropertyNames(Le.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 lh(e,t){return Ia(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}var $xe={"google.protobuf.DoubleValue":Ne.DOUBLE,"google.protobuf.FloatValue":Ne.FLOAT,"google.protobuf.Int64Value":Ne.INT64,"google.protobuf.UInt64Value":Ne.UINT64,"google.protobuf.Int32Value":Ne.INT32,"google.protobuf.UInt32Value":Ne.UINT32,"google.protobuf.BoolValue":Ne.BOOL,"google.protobuf.StringValue":Ne.STRING,"google.protobuf.BytesValue":Ne.BYTES};var y1={ignoreUnknownFields:!1},I1={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function jde(e){return e?Object.assign(Object.assign({},y1),e):y1}function Kde(e){return e?Object.assign(Object.assign({},I1),e):I1}var fh=Symbol(),dh=Symbol();function v1(){return{makeReadOptions:jde,makeWriteOptions:Kde,readMessage(e,t,n,r){if(t==null||Array.isArray(t)||typeof t!="object")throw new Error(`cannot decode message ${e.typeName} from JSON: ${ts(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)}g1(r,c,l,n,e)}else{let d=!1;if(a!=null&&a.findExtension&&o.startsWith("[")&&o.endsWith("]")){let f=a.findExtension(o.substring(1,o.length-1));if(f&&f.extendee.typeName==e.typeName){d=!0;let[y,I]=oh(f);g1(y,c,f.field,n,f),E1(r,f,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(!ch(i,e)){if(i.req)throw"required field not set";if(!t.emitDefaultValues||!$de(i))continue}let o=i.oneof?e[i.oneof.localName].value:e[i.localName],c=_1(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&&kD(e,c)){let l=T1(e,c,t),d=_1(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 af(e,t,n!=null?n:ha.BIGINT,!0)},writeScalar(e,t,n){if(t!==void 0&&(n||ih(e,t)))return ph(e,t)},debug:ts}}function ts(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 g1(e,t,n,r,i){let a=n.localName;if(n.repeated){if(ln(n.kind!="map"),t===null)return;if(!Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${ts(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: ${ts(c)}`);switch(n.kind){case"message":o.push(n.T.fromJson(c,r));break;case"enum":let l=xD(n.T,c,r.ignoreUnknownFields,!0);l!==dh&&o.push(l);break;case"scalar":try{o.push(af(n.T,c,n.L,!0))}catch(d){let f=`cannot decode field ${i.typeName}.${n.name} from JSON: ${ts(c)}`;throw d instanceof Error&&d.message.length>0&&(f+=`: ${d.message}`),new Error(f)}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: ${ts(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=Gde(n.K,c)}catch(f){let y=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${ts(t)}`;throw f instanceof Error&&f.message.length>0&&(y+=`: ${f.message}`),new Error(y)}switch(n.V.kind){case"message":o[d]=n.V.T.fromJson(l,r);break;case"enum":let f=xD(n.V.T,l,r.ignoreUnknownFields,!0);f!==dh&&(o[d]=f);break;case"scalar":try{o[d]=af(n.V.T,l,ha.BIGINT,!0)}catch(y){let I=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${ts(t)}`;throw y instanceof Error&&y.message.length>0&&(I+=`: ${y.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];Ia(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=xD(n.T,t,r.ignoreUnknownFields,!1);switch(l){case fh:MD(n,e);break;case dh:break;default:e[a]=l;break}break;case"scalar":try{let d=af(n.T,t,n.L,!1);switch(d){case fh:MD(n,e);break;default:e[a]=d;break}}catch(d){let f=`cannot decode field ${i.typeName}.${n.name} from JSON: ${ts(t)}`;throw d instanceof Error&&d.message.length>0&&(f+=`: ${d.message}`),new Error(f)}break}}function Gde(e,t){if(e===Ne.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1;break}return af(e,t,ha.BIGINT,!0).toString()}function af(e,t,n,r){if(t===null)return r?ya(e,n):fh;switch(e){case Ne.DOUBLE:case Ne.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==Ne.FLOAT&&th(i),i;case Ne.INT32:case Ne.FIXED32:case Ne.SFIXED32:case Ne.SINT32:case Ne.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==Ne.UINT32||e==Ne.FIXED32?rf(a):td(a),a;case Ne.INT64:case Ne.SFIXED64:case Ne.SINT64:if(typeof t!="number"&&typeof t!="string")break;let o=Gn.parse(t);return n?o.toString():o;case Ne.FIXED64:case Ne.UINT64:if(typeof t!="number"&&typeof t!="string")break;let c=Gn.uParse(t);return n?c.toString():c;case Ne.BOOL:if(typeof t!="boolean")break;return t;case Ne.STRING:if(typeof t!="string")break;try{encodeURIComponent(t)}catch(l){throw new Error("invalid UTF8")}return t;case Ne.BYTES:if(t==="")return new Uint8Array(0);if(typeof t!="string")break;return UD.dec(t)}throw new Error}function xD(e,t,n,r){if(t===null)return e.typeName=="google.protobuf.NullValue"?0:r?e.values[0].no:fh;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 dh;break}throw new Error(`cannot decode enum ${e.typeName} from JSON: ${ts(t)}`)}function $de(e){return e.repeated||e.kind=="map"?!0:!(e.oneof||e.kind=="message"||e.opt||e.req)}function _1(e,t,n){if(e.kind=="map"){ln(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()]=ph(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()]=qD(a,c,n.enumAsInteger);break}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){ln(Array.isArray(t));let r=[];switch(e.kind){case"scalar":for(let i=0;i0?r:void 0}switch(e.kind){case"scalar":return ph(e.T,t);case"enum":return qD(e.T,t,n.enumAsInteger);case"message":return lh(e.T,t).toJson(n)}}function qD(e,t,n){var r;if(ln(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 ph(e,t){switch(e){case Ne.INT32:case Ne.SFIXED32:case Ne.SINT32:case Ne.FIXED32:case Ne.UINT32:return ln(typeof t=="number"),t;case Ne.FLOAT:case Ne.DOUBLE:return ln(typeof t=="number"),Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":t;case Ne.STRING:return ln(typeof t=="string"),t;case Ne.BOOL:return ln(typeof t=="boolean"),t;case Ne.UINT64:case Ne.FIXED64:case Ne.INT64:case Ne.SFIXED64:case Ne.SINT64:return ln(typeof t=="bigint"||typeof t=="string"||typeof t=="number"),t.toString();case Ne.BYTES:return ln(t instanceof Uint8Array),UD.enc(t)}}m();T();N();var nd=Symbol("@bufbuild/protobuf/unknown-fields"),S1={readUnknownFields:!0,readerFactory:e=>new sh(e)},O1={writeUnknownFields:!0,writerFactory:()=>new ah};function Qde(e){return e?Object.assign(Object.assign({},S1),e):S1}function Yde(e){return e?Object.assign(Object.assign({},O1),e):O1}function R1(){return{makeReadOptions:Qde,makeWriteOptions:Yde,listUnknownFields(e){var t;return(t=e[nd])!==null&&t!==void 0?t:[]},discardUnknownFields(e){delete e[nd]},writeUnknownFields(e,t){let r=e[nd];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[nd])||(i[nd]=[]),i[nd].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=Hde),a){let I=e[o];if(r==Un.LengthDelimited&&c!=Ne.STRING&&c!=Ne.BYTES){let F=t.uint32()+t.pos;for(;t.posIa(I,y)?I:new y(I));else{let I=o[i];y.fieldWrapper?y.typeName==="google.protobuf.BytesValue"?a[i]=of(I):a[i]=I:a[i]=Ia(I,y)?I:new y(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)=>Rs(r.T,o,a[c]));case"enum":return i.every((o,c)=>Rs(Ne.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 Rs(Ne.INT32,i,a);case"scalar":return Rs(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 Rs(Ne.INT32,i.value,a.value);case"scalar":return Rs(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(f=>l.equals(i[f],a[f]));case"enum":return c.every(f=>Rs(Ne.INT32,i[f],a[f]));case"scalar":let d=r.V.T;return c.every(f=>Rs(d,i[f],a[f]))}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(Th);else if(i.kind=="map"){o=r[i.localName];for(let[c,l]of Object.entries(a))o[c]=Th(l)}else i.kind=="oneof"?o=i.findField(a.case)?{case:a.case,value:Th(a.value)}:{case:void 0}:o=Th(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 Th(e){if(e===void 0)return e;if(Ia(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function of(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function w1(e,t,n){return{syntax:e,json:v1(),bin:R1(),util:Object.assign(Object.assign({},F1()),{newFieldList:t,initFields:n}),makeMessageType(r,i,a){return u1(this,r,i,a)},makeEnum:s1,makeEnumType:FD,getEnumType:a1,makeExtension(r,i,a){return m1(this,r,i,a)}}}m();T();N();var Eh=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 VD(e,t){let n=B1(e);return t?n:tpe(epe(n))}function L1(e){return VD(e,!1)}var C1=B1;function B1(e){let t=!1,n=[];for(let r=0;r`${e}$`,epe=e=>Zde.has(e)?U1(e):e,tpe=e=>Xde.has(e)?U1(e):e;var hh=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=L1(t)}addField(t){ln(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 Eh(e,t=>k1(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]=ya(t.T,t.L);break;case"message":break}}});var rd;(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"})(rd||(rd={}));B.util.setEnumType(rd,"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 Fs;(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"})(Fs||(Fs={}));B.util.setEnumType(Fs,"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 ws;(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"})(ws||(ws={}));B.util.setEnumType(ws,"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 Y1=fs(Ae(),1);m();T();N();var jD;(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"})(jD||(jD={}));B.util.setEnumType(jD,"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 Fc;(function(e){e[e.OBJECT_FIELD=0]="OBJECT_FIELD",e[e.FIELD_ARGUMENT=1]="FIELD_ARGUMENT"})(Fc||(Fc={}));B.util.setEnumType(Fc,"wg.cosmo.node.v1.ArgumentSource",[{no:0,name:"OBJECT_FIELD"},{no:1,name:"FIELD_ARGUMENT"}]);var vu;(function(e){e[e.STATIC=0]="STATIC",e[e.GRAPHQL=1]="GRAPHQL",e[e.PUBSUB=2]="PUBSUB"})(vu||(vu={}));B.util.setEnumType(vu,"wg.cosmo.node.v1.DataSourceKind",[{no:0,name:"STATIC"},{no:1,name:"GRAPHQL"},{no:2,name:"PUBSUB"}]);var uf;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.QUERY=1]="QUERY",e[e.MUTATION=2]="MUTATION",e[e.SUBSCRIPTION=3]="SUBSCRIPTION"})(uf||(uf={}));B.util.setEnumType(uf,"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 qo;(function(e){e[e.PUBLISH=0]="PUBLISH",e[e.REQUEST=1]="REQUEST",e[e.SUBSCRIBE=2]="SUBSCRIBE"})(qo||(qo={}));B.util.setEnumType(qo,"wg.cosmo.node.v1.EventType",[{no:0,name:"PUBLISH"},{no:1,name:"REQUEST"},{no:2,name:"SUBSCRIBE"}]);var Su;(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"})(Su||(Su={}));B.util.setEnumType(Su,"wg.cosmo.node.v1.ConfigurationVariableKind",[{no:0,name:"STATIC_CONFIGURATION_VARIABLE"},{no:1,name:"ENV_CONFIGURATION_VARIABLE"},{no:2,name:"PLACEHOLDER_CONFIGURATION_VARIABLE"}]);var wc;(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"})(wc||(wc={}));B.util.setEnumType(wc,"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 Ls=class Ls extends Le{constructor(n){super();_(this,"id","");_(this,"name","");_(this,"routingUrl","");B.util.initPartial(n,this)}static fromBinary(n,r){return new Ls().fromBinary(n,r)}static fromJson(n,r){return new Ls().fromJson(n,r)}static fromJsonString(n,r){return new Ls().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Ls,n,r)}};_(Ls,"runtime",B),_(Ls,"typeName","wg.cosmo.node.v1.Subgraph"),_(Ls,"fields",B.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 yh=Ls,Cs=class Cs extends Le{constructor(n){super();_(this,"configByFeatureFlagName",{});B.util.initPartial(n,this)}static fromBinary(n,r){return new Cs().fromBinary(n,r)}static fromJson(n,r){return new Cs().fromJson(n,r)}static fromJsonString(n,r){return new Cs().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Cs,n,r)}};_(Cs,"runtime",B),_(Cs,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs"),_(Cs,"fields",B.util.newFieldList(()=>[{no:1,name:"config_by_feature_flag_name",kind:"map",K:9,V:{kind:"message",T:GD}}]));var KD=Cs,Bs=class Bs extends Le{constructor(n){super();_(this,"engineConfig");_(this,"version","");_(this,"subgraphs",[]);B.util.initPartial(n,this)}static fromBinary(n,r){return new Bs().fromBinary(n,r)}static fromJson(n,r){return new Bs().fromJson(n,r)}static fromJsonString(n,r){return new Bs().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Bs,n,r)}};_(Bs,"runtime",B),_(Bs,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig"),_(Bs,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:id},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:yh,repeated:!0}]));var GD=Bs,Us=class Us extends Le{constructor(n){super();_(this,"engineConfig");_(this,"version","");_(this,"subgraphs",[]);_(this,"featureFlagConfigs");_(this,"compatibilityVersion","");B.util.initPartial(n,this)}static fromBinary(n,r){return new Us().fromBinary(n,r)}static fromJson(n,r){return new Us().fromJson(n,r)}static fromJsonString(n,r){return new Us().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Us,n,r)}};_(Us,"runtime",B),_(Us,"typeName","wg.cosmo.node.v1.RouterConfig"),_(Us,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:id},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:yh,repeated:!0},{no:4,name:"feature_flag_configs",kind:"message",T:KD,opt:!0},{no:5,name:"compatibility_version",kind:"scalar",T:9}]));var cf=Us,ks=class ks extends Le{constructor(n){super();_(this,"code",rd.OK);_(this,"details");B.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 B.util.equals(ks,n,r)}};_(ks,"runtime",B),_(ks,"typeName","wg.cosmo.node.v1.Response"),_(ks,"fields",B.util.newFieldList(()=>[{no:1,name:"code",kind:"enum",T:B.getEnumType(rd)},{no:2,name:"details",kind:"scalar",T:9,opt:!0}]));var $D=ks,Ms=class Ms extends Le{constructor(n){super();_(this,"code",0);_(this,"message","");B.util.initPartial(n,this)}static fromBinary(n,r){return new Ms().fromBinary(n,r)}static fromJson(n,r){return new Ms().fromJson(n,r)}static fromJsonString(n,r){return new Ms().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Ms,n,r)}};_(Ms,"runtime",B),_(Ms,"typeName","wg.cosmo.node.v1.ResponseStatus"),_(Ms,"fields",B.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9}]));var M1=Ms,xs=class xs extends Le{constructor(n){super();_(this,"accountLimits");_(this,"graphPublicKey","");B.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 B.util.equals(xs,n,r)}};_(xs,"runtime",B),_(xs,"typeName","wg.cosmo.node.v1.RegistrationInfo"),_(xs,"fields",B.util.newFieldList(()=>[{no:1,name:"account_limits",kind:"message",T:YD},{no:2,name:"graph_public_key",kind:"scalar",T:9}]));var QD=xs,qs=class qs extends Le{constructor(n){super();_(this,"traceSamplingRate",0);B.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 B.util.equals(qs,n,r)}};_(qs,"runtime",B),_(qs,"typeName","wg.cosmo.node.v1.AccountLimits"),_(qs,"fields",B.util.newFieldList(()=>[{no:1,name:"trace_sampling_rate",kind:"scalar",T:2}]));var YD=qs,Vs=class Vs extends Le{constructor(t){super(),B.util.initPartial(t,this)}static fromBinary(t,n){return new Vs().fromBinary(t,n)}static fromJson(t,n){return new Vs().fromJson(t,n)}static fromJsonString(t,n){return new Vs().fromJsonString(t,n)}static equals(t,n){return B.util.equals(Vs,t,n)}};_(Vs,"runtime",B),_(Vs,"typeName","wg.cosmo.node.v1.SelfRegisterRequest"),_(Vs,"fields",B.util.newFieldList(()=>[]));var x1=Vs,js=class js extends Le{constructor(n){super();_(this,"response");_(this,"registrationInfo");B.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 B.util.equals(js,n,r)}};_(js,"runtime",B),_(js,"typeName","wg.cosmo.node.v1.SelfRegisterResponse"),_(js,"fields",B.util.newFieldList(()=>[{no:1,name:"response",kind:"message",T:$D},{no:2,name:"registrationInfo",kind:"message",T:QD,opt:!0}]));var q1=js,Ks=class Ks extends Le{constructor(n){super();_(this,"defaultFlushInterval",Gn.zero);_(this,"datasourceConfigurations",[]);_(this,"fieldConfigurations",[]);_(this,"graphqlSchema","");_(this,"typeConfigurations",[]);_(this,"stringStorage",{});_(this,"graphqlClientSchema");B.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 B.util.equals(Ks,n,r)}};_(Ks,"runtime",B),_(Ks,"typeName","wg.cosmo.node.v1.EngineConfiguration"),_(Ks,"fields",B.util.newFieldList(()=>[{no:1,name:"defaultFlushInterval",kind:"scalar",T:3},{no:2,name:"datasource_configurations",kind:"message",T:lf,repeated:!0},{no:3,name:"field_configurations",kind:"message",T:ff,repeated:!0},{no:4,name:"graphqlSchema",kind:"scalar",T:9},{no:5,name:"type_configurations",kind:"message",T:JD,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 id=Ks,Gs=class Gs extends Le{constructor(n){super();_(this,"kind",vu.STATIC);_(this,"rootNodes",[]);_(this,"childNodes",[]);_(this,"overrideFieldPathFromAlias",!1);_(this,"customGraphql");_(this,"customStatic");_(this,"directives",[]);_(this,"requestTimeoutSeconds",Gn.zero);_(this,"id","");_(this,"keys",[]);_(this,"provides",[]);_(this,"requires",[]);_(this,"customEvents");_(this,"entityInterfaces",[]);_(this,"interfaceObjects",[]);B.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 B.util.equals(Gs,n,r)}};_(Gs,"runtime",B),_(Gs,"typeName","wg.cosmo.node.v1.DataSourceConfiguration"),_(Gs,"fields",B.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:B.getEnumType(vu)},{no:2,name:"root_nodes",kind:"message",T:ad,repeated:!0},{no:3,name:"child_nodes",kind:"message",T:ad,repeated:!0},{no:4,name:"override_field_path_from_alias",kind:"scalar",T:8},{no:5,name:"custom_graphql",kind:"message",T:Tf},{no:6,name:"custom_static",kind:"message",T:ab},{no:7,name:"directives",kind:"message",T:sb,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:Pc,repeated:!0},{no:11,name:"provides",kind:"message",T:Pc,repeated:!0},{no:12,name:"requires",kind:"message",T:Pc,repeated:!0},{no:13,name:"custom_events",kind:"message",T:Cc},{no:14,name:"entity_interfaces",kind:"message",T:sd,repeated:!0},{no:15,name:"interface_objects",kind:"message",T:sd,repeated:!0}]));var lf=Gs,$s=class $s extends Le{constructor(n){super();_(this,"name","");_(this,"sourceType",Fc.OBJECT_FIELD);B.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 B.util.equals($s,n,r)}};_($s,"runtime",B),_($s,"typeName","wg.cosmo.node.v1.ArgumentConfiguration"),_($s,"fields",B.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"source_type",kind:"enum",T:B.getEnumType(Fc)}]));var df=$s,Qs=class Qs extends Le{constructor(n){super();_(this,"requiredAndScopes",[]);B.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 B.util.equals(Qs,n,r)}};_(Qs,"runtime",B),_(Qs,"typeName","wg.cosmo.node.v1.Scopes"),_(Qs,"fields",B.util.newFieldList(()=>[{no:1,name:"required_and_scopes",kind:"scalar",T:9,repeated:!0}]));var Lc=Qs,Ys=class Ys extends Le{constructor(n){super();_(this,"requiresAuthentication",!1);_(this,"requiredOrScopes",[]);_(this,"requiredOrScopesByOr",[]);B.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 B.util.equals(Ys,n,r)}};_(Ys,"runtime",B),_(Ys,"typeName","wg.cosmo.node.v1.AuthorizationConfiguration"),_(Ys,"fields",B.util.newFieldList(()=>[{no:1,name:"requires_authentication",kind:"scalar",T:8},{no:2,name:"required_or_scopes",kind:"message",T:Lc,repeated:!0},{no:3,name:"required_or_scopes_by_or",kind:"message",T:Lc,repeated:!0}]));var pf=Ys,Js=class Js extends Le{constructor(n){super();_(this,"typeName","");_(this,"fieldName","");_(this,"argumentsConfiguration",[]);_(this,"authorizationConfiguration");_(this,"subscriptionFilterCondition");B.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 B.util.equals(Js,n,r)}};_(Js,"runtime",B),_(Js,"typeName","wg.cosmo.node.v1.FieldConfiguration"),_(Js,"fields",B.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:df,repeated:!0},{no:4,name:"authorization_configuration",kind:"message",T:pf},{no:5,name:"subscription_filter_condition",kind:"message",T:Ou,opt:!0}]));var ff=Js,Hs=class Hs extends Le{constructor(n){super();_(this,"typeName","");_(this,"renameTo","");B.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 B.util.equals(Hs,n,r)}};_(Hs,"runtime",B),_(Hs,"typeName","wg.cosmo.node.v1.TypeConfiguration"),_(Hs,"fields",B.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var JD=Hs,zs=class zs extends Le{constructor(n){super();_(this,"typeName","");_(this,"fieldNames",[]);_(this,"externalFieldNames",[]);_(this,"requireFetchReasonsFieldNames",[]);B.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 B.util.equals(zs,n,r)}};_(zs,"runtime",B),_(zs,"typeName","wg.cosmo.node.v1.TypeField"),_(zs,"fields",B.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 ad=zs,Ws=class Ws extends Le{constructor(n){super();_(this,"fieldName","");_(this,"typeName","");B.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 B.util.equals(Ws,n,r)}};_(Ws,"runtime",B),_(Ws,"typeName","wg.cosmo.node.v1.FieldCoordinates"),_(Ws,"fields",B.util.newFieldList(()=>[{no:1,name:"field_name",kind:"scalar",T:9},{no:2,name:"type_name",kind:"scalar",T:9}]));var mf=Ws,Xs=class Xs extends Le{constructor(n){super();_(this,"fieldCoordinatesPath",[]);_(this,"fieldPath",[]);B.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 B.util.equals(Xs,n,r)}};_(Xs,"runtime",B),_(Xs,"typeName","wg.cosmo.node.v1.FieldSetCondition"),_(Xs,"fields",B.util.newFieldList(()=>[{no:1,name:"field_coordinates_path",kind:"message",T:mf,repeated:!0},{no:2,name:"field_path",kind:"scalar",T:9,repeated:!0}]));var Nf=Xs,Zs=class Zs extends Le{constructor(n){super();_(this,"typeName","");_(this,"fieldName","");_(this,"selectionSet","");_(this,"disableEntityResolver",!1);_(this,"conditions",[]);B.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 B.util.equals(Zs,n,r)}};_(Zs,"runtime",B),_(Zs,"typeName","wg.cosmo.node.v1.RequiredField"),_(Zs,"fields",B.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:Nf,repeated:!0}]));var Pc=Zs,eo=class eo extends Le{constructor(n){super();_(this,"interfaceTypeName","");_(this,"concreteTypeNames",[]);B.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 B.util.equals(eo,n,r)}};_(eo,"runtime",B),_(eo,"typeName","wg.cosmo.node.v1.EntityInterfaceConfiguration"),_(eo,"fields",B.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 sd=eo,to=class to extends Le{constructor(n){super();_(this,"url");_(this,"method",wc.GET);_(this,"header",{});_(this,"body");_(this,"query",[]);_(this,"urlEncodeBody",!1);_(this,"mtls");_(this,"baseUrl");_(this,"path");_(this,"httpProxyUrl");B.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 B.util.equals(to,n,r)}};_(to,"runtime",B),_(to,"typeName","wg.cosmo.node.v1.FetchConfiguration"),_(to,"fields",B.util.newFieldList(()=>[{no:1,name:"url",kind:"message",T:qr},{no:2,name:"method",kind:"enum",T:B.getEnumType(wc)},{no:3,name:"header",kind:"map",K:9,V:{kind:"message",T:ub}},{no:4,name:"body",kind:"message",T:qr},{no:5,name:"query",kind:"message",T:ob,repeated:!0},{no:7,name:"url_encode_body",kind:"scalar",T:8},{no:8,name:"mtls",kind:"message",T:cb},{no:9,name:"base_url",kind:"message",T:qr},{no:10,name:"path",kind:"message",T:qr},{no:11,name:"http_proxy_url",kind:"message",T:qr,opt:!0}]));var HD=to,no=class no extends Le{constructor(n){super();_(this,"statusCode",Gn.zero);_(this,"typeName","");_(this,"injectStatusCodeIntoBody",!1);B.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 B.util.equals(no,n,r)}};_(no,"runtime",B),_(no,"typeName","wg.cosmo.node.v1.StatusCodeTypeMapping"),_(no,"fields",B.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 V1=no,ro=class ro extends Le{constructor(n){super();_(this,"fetch");_(this,"subscription");_(this,"federation");_(this,"upstreamSchema");_(this,"customScalarTypeFields",[]);_(this,"grpc");B.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 B.util.equals(ro,n,r)}};_(ro,"runtime",B),_(ro,"typeName","wg.cosmo.node.v1.DataSourceCustom_GraphQL"),_(ro,"fields",B.util.newFieldList(()=>[{no:1,name:"fetch",kind:"message",T:HD},{no:2,name:"subscription",kind:"message",T:lb},{no:3,name:"federation",kind:"message",T:db},{no:4,name:"upstream_schema",kind:"message",T:_f},{no:6,name:"custom_scalar_type_fields",kind:"message",T:pb,repeated:!0},{no:7,name:"grpc",kind:"message",T:od}]));var Tf=ro,io=class io extends Le{constructor(n){super();_(this,"mapping");_(this,"protoSchema","");_(this,"plugin");B.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 B.util.equals(io,n,r)}};_(io,"runtime",B),_(io,"typeName","wg.cosmo.node.v1.GRPCConfiguration"),_(io,"fields",B.util.newFieldList(()=>[{no:1,name:"mapping",kind:"message",T:WD},{no:2,name:"proto_schema",kind:"scalar",T:9},{no:3,name:"plugin",kind:"message",T:Ef}]));var od=io,ao=class ao extends Le{constructor(n){super();_(this,"repository","");_(this,"reference","");B.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 B.util.equals(ao,n,r)}};_(ao,"runtime",B),_(ao,"typeName","wg.cosmo.node.v1.ImageReference"),_(ao,"fields",B.util.newFieldList(()=>[{no:1,name:"repository",kind:"scalar",T:9},{no:2,name:"reference",kind:"scalar",T:9}]));var zD=ao,so=class so extends Le{constructor(n){super();_(this,"name","");_(this,"version","");_(this,"imageReference");B.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 B.util.equals(so,n,r)}};_(so,"runtime",B),_(so,"typeName","wg.cosmo.node.v1.PluginConfiguration"),_(so,"fields",B.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:zD,opt:!0}]));var Ef=so,oo=class oo extends Le{constructor(n){super();_(this,"enabled",!1);B.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 B.util.equals(oo,n,r)}};_(oo,"runtime",B),_(oo,"typeName","wg.cosmo.node.v1.SSLConfiguration"),_(oo,"fields",B.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8}]));var j1=oo,uo=class uo extends Le{constructor(n){super();_(this,"version",0);_(this,"service","");_(this,"operationMappings",[]);_(this,"entityMappings",[]);_(this,"typeFieldMappings",[]);_(this,"enumMappings",[]);B.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 B.util.equals(uo,n,r)}};_(uo,"runtime",B),_(uo,"typeName","wg.cosmo.node.v1.GRPCMapping"),_(uo,"fields",B.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:XD,repeated:!0},{no:4,name:"entity_mappings",kind:"message",T:ZD,repeated:!0},{no:5,name:"type_field_mappings",kind:"message",T:eb,repeated:!0},{no:6,name:"enum_mappings",kind:"message",T:rb,repeated:!0}]));var WD=uo,co=class co extends Le{constructor(n){super();_(this,"type",uf.UNSPECIFIED);_(this,"original","");_(this,"mapped","");_(this,"request","");_(this,"response","");B.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 B.util.equals(co,n,r)}};_(co,"runtime",B),_(co,"typeName","wg.cosmo.node.v1.OperationMapping"),_(co,"fields",B.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:B.getEnumType(uf)},{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 XD=co,lo=class lo extends Le{constructor(n){super();_(this,"typeName","");_(this,"kind","");_(this,"key","");_(this,"rpc","");_(this,"request","");_(this,"response","");B.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 B.util.equals(lo,n,r)}};_(lo,"runtime",B),_(lo,"typeName","wg.cosmo.node.v1.EntityMapping"),_(lo,"fields",B.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 ZD=lo,po=class po extends Le{constructor(n){super();_(this,"type","");_(this,"fieldMappings",[]);B.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 B.util.equals(po,n,r)}};_(po,"runtime",B),_(po,"typeName","wg.cosmo.node.v1.TypeFieldMapping"),_(po,"fields",B.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"field_mappings",kind:"message",T:tb,repeated:!0}]));var eb=po,fo=class fo extends Le{constructor(n){super();_(this,"original","");_(this,"mapped","");_(this,"argumentMappings",[]);B.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 B.util.equals(fo,n,r)}};_(fo,"runtime",B),_(fo,"typeName","wg.cosmo.node.v1.FieldMapping"),_(fo,"fields",B.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:nb,repeated:!0}]));var tb=fo,mo=class mo extends Le{constructor(n){super();_(this,"original","");_(this,"mapped","");B.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 B.util.equals(mo,n,r)}};_(mo,"runtime",B),_(mo,"typeName","wg.cosmo.node.v1.ArgumentMapping"),_(mo,"fields",B.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var nb=mo,No=class No extends Le{constructor(n){super();_(this,"type","");_(this,"values",[]);B.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 B.util.equals(No,n,r)}};_(No,"runtime",B),_(No,"typeName","wg.cosmo.node.v1.EnumMapping"),_(No,"fields",B.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"values",kind:"message",T:ib,repeated:!0}]));var rb=No,To=class To extends Le{constructor(n){super();_(this,"original","");_(this,"mapped","");B.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 B.util.equals(To,n,r)}};_(To,"runtime",B),_(To,"typeName","wg.cosmo.node.v1.EnumValueMapping"),_(To,"fields",B.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var ib=To,Eo=class Eo extends Le{constructor(n){super();_(this,"consumerName","");_(this,"streamName","");_(this,"consumerInactiveThreshold",0);B.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 B.util.equals(Eo,n,r)}};_(Eo,"runtime",B),_(Eo,"typeName","wg.cosmo.node.v1.NatsStreamConfiguration"),_(Eo,"fields",B.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 hf=Eo,ho=class ho extends Le{constructor(n){super();_(this,"engineEventConfiguration");_(this,"subjects",[]);_(this,"streamConfiguration");B.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 B.util.equals(ho,n,r)}};_(ho,"runtime",B),_(ho,"typeName","wg.cosmo.node.v1.NatsEventConfiguration"),_(ho,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:Vo},{no:2,name:"subjects",kind:"scalar",T:9,repeated:!0},{no:3,name:"stream_configuration",kind:"message",T:hf}]));var yf=ho,yo=class yo extends Le{constructor(n){super();_(this,"engineEventConfiguration");_(this,"topics",[]);B.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 B.util.equals(yo,n,r)}};_(yo,"runtime",B),_(yo,"typeName","wg.cosmo.node.v1.KafkaEventConfiguration"),_(yo,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:Vo},{no:2,name:"topics",kind:"scalar",T:9,repeated:!0}]));var If=yo,Io=class Io extends Le{constructor(n){super();_(this,"engineEventConfiguration");_(this,"channels",[]);B.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 B.util.equals(Io,n,r)}};_(Io,"runtime",B),_(Io,"typeName","wg.cosmo.node.v1.RedisEventConfiguration"),_(Io,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:Vo},{no:2,name:"channels",kind:"scalar",T:9,repeated:!0}]));var gf=Io,go=class go extends Le{constructor(n){super();_(this,"providerId","");_(this,"type",qo.PUBLISH);_(this,"typeName","");_(this,"fieldName","");B.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 B.util.equals(go,n,r)}};_(go,"runtime",B),_(go,"typeName","wg.cosmo.node.v1.EngineEventConfiguration"),_(go,"fields",B.util.newFieldList(()=>[{no:1,name:"provider_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:B.getEnumType(qo)},{no:3,name:"type_name",kind:"scalar",T:9},{no:4,name:"field_name",kind:"scalar",T:9}]));var Vo=go,_o=class _o extends Le{constructor(n){super();_(this,"nats",[]);_(this,"kafka",[]);_(this,"redis",[]);B.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 B.util.equals(_o,n,r)}};_(_o,"runtime",B),_(_o,"typeName","wg.cosmo.node.v1.DataSourceCustomEvents"),_(_o,"fields",B.util.newFieldList(()=>[{no:1,name:"nats",kind:"message",T:yf,repeated:!0},{no:2,name:"kafka",kind:"message",T:If,repeated:!0},{no:3,name:"redis",kind:"message",T:gf,repeated:!0}]));var Cc=_o,vo=class vo extends Le{constructor(n){super();_(this,"data");B.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 B.util.equals(vo,n,r)}};_(vo,"runtime",B),_(vo,"typeName","wg.cosmo.node.v1.DataSourceCustom_Static"),_(vo,"fields",B.util.newFieldList(()=>[{no:1,name:"data",kind:"message",T:qr}]));var ab=vo,So=class So extends Le{constructor(n){super();_(this,"kind",Su.STATIC_CONFIGURATION_VARIABLE);_(this,"staticVariableContent","");_(this,"environmentVariableName","");_(this,"environmentVariableDefaultValue","");_(this,"placeholderVariableName","");B.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 B.util.equals(So,n,r)}};_(So,"runtime",B),_(So,"typeName","wg.cosmo.node.v1.ConfigurationVariable"),_(So,"fields",B.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:B.getEnumType(Su)},{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 qr=So,Oo=class Oo extends Le{constructor(n){super();_(this,"directiveName","");_(this,"renameTo","");B.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 B.util.equals(Oo,n,r)}};_(Oo,"runtime",B),_(Oo,"typeName","wg.cosmo.node.v1.DirectiveConfiguration"),_(Oo,"fields",B.util.newFieldList(()=>[{no:1,name:"directive_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var sb=Oo,Do=class Do extends Le{constructor(n){super();_(this,"name","");_(this,"value","");B.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 B.util.equals(Do,n,r)}};_(Do,"runtime",B),_(Do,"typeName","wg.cosmo.node.v1.URLQueryConfiguration"),_(Do,"fields",B.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]));var ob=Do,bo=class bo extends Le{constructor(n){super();_(this,"values",[]);B.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 B.util.equals(bo,n,r)}};_(bo,"runtime",B),_(bo,"typeName","wg.cosmo.node.v1.HTTPHeader"),_(bo,"fields",B.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:qr,repeated:!0}]));var ub=bo,Ao=class Ao extends Le{constructor(n){super();_(this,"key");_(this,"cert");_(this,"insecureSkipVerify",!1);B.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 B.util.equals(Ao,n,r)}};_(Ao,"runtime",B),_(Ao,"typeName","wg.cosmo.node.v1.MTLSConfiguration"),_(Ao,"fields",B.util.newFieldList(()=>[{no:1,name:"key",kind:"message",T:qr},{no:2,name:"cert",kind:"message",T:qr},{no:3,name:"insecureSkipVerify",kind:"scalar",T:8}]));var cb=Ao,Ro=class Ro extends Le{constructor(n){super();_(this,"enabled",!1);_(this,"url");_(this,"useSSE");_(this,"protocol");_(this,"websocketSubprotocol");B.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 B.util.equals(Ro,n,r)}};_(Ro,"runtime",B),_(Ro,"typeName","wg.cosmo.node.v1.GraphQLSubscriptionConfiguration"),_(Ro,"fields",B.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"url",kind:"message",T:qr},{no:3,name:"useSSE",kind:"scalar",T:8,opt:!0},{no:4,name:"protocol",kind:"enum",T:B.getEnumType(Fs),opt:!0},{no:5,name:"websocketSubprotocol",kind:"enum",T:B.getEnumType(ws),opt:!0}]));var lb=Ro,Po=class Po extends Le{constructor(n){super();_(this,"enabled",!1);_(this,"serviceSdl","");B.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 B.util.equals(Po,n,r)}};_(Po,"runtime",B),_(Po,"typeName","wg.cosmo.node.v1.GraphQLFederationConfiguration"),_(Po,"fields",B.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"serviceSdl",kind:"scalar",T:9}]));var db=Po,Fo=class Fo extends Le{constructor(n){super();_(this,"key","");B.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 B.util.equals(Fo,n,r)}};_(Fo,"runtime",B),_(Fo,"typeName","wg.cosmo.node.v1.InternedString"),_(Fo,"fields",B.util.newFieldList(()=>[{no:1,name:"key",kind:"scalar",T:9}]));var _f=Fo,wo=class wo extends Le{constructor(n){super();_(this,"typeName","");_(this,"fieldName","");B.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 B.util.equals(wo,n,r)}};_(wo,"runtime",B),_(wo,"typeName","wg.cosmo.node.v1.SingleTypeField"),_(wo,"fields",B.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9}]));var pb=wo,Lo=class Lo extends Le{constructor(n){super();_(this,"fieldPath",[]);_(this,"json","");B.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 B.util.equals(Lo,n,r)}};_(Lo,"runtime",B),_(Lo,"typeName","wg.cosmo.node.v1.SubscriptionFieldCondition"),_(Lo,"fields",B.util.newFieldList(()=>[{no:1,name:"field_path",kind:"scalar",T:9,repeated:!0},{no:2,name:"json",kind:"scalar",T:9}]));var vf=Lo,Hi=class Hi extends Le{constructor(n){super();_(this,"and",[]);_(this,"in");_(this,"not");_(this,"or",[]);B.util.initPartial(n,this)}static fromBinary(n,r){return new Hi().fromBinary(n,r)}static fromJson(n,r){return new Hi().fromJson(n,r)}static fromJsonString(n,r){return new Hi().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Hi,n,r)}};_(Hi,"runtime",B),_(Hi,"typeName","wg.cosmo.node.v1.SubscriptionFilterCondition"),_(Hi,"fields",B.util.newFieldList(()=>[{no:1,name:"and",kind:"message",T:Hi,repeated:!0},{no:2,name:"in",kind:"message",T:vf,opt:!0},{no:3,name:"not",kind:"message",T:Hi,opt:!0},{no:4,name:"or",kind:"message",T:Hi,repeated:!0}]));var Ou=Hi,Co=class Co extends Le{constructor(n){super();_(this,"operations",[]);B.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 B.util.equals(Co,n,r)}};_(Co,"runtime",B),_(Co,"typeName","wg.cosmo.node.v1.CacheWarmerOperations"),_(Co,"fields",B.util.newFieldList(()=>[{no:1,name:"operations",kind:"message",T:fb,repeated:!0}]));var K1=Co,Bo=class Bo extends Le{constructor(n){super();_(this,"request");_(this,"client");B.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 B.util.equals(Bo,n,r)}};_(Bo,"runtime",B),_(Bo,"typeName","wg.cosmo.node.v1.Operation"),_(Bo,"fields",B.util.newFieldList(()=>[{no:1,name:"request",kind:"message",T:mb},{no:2,name:"client",kind:"message",T:Eb}]));var fb=Bo,Uo=class Uo extends Le{constructor(n){super();_(this,"operationName","");_(this,"query","");_(this,"extensions");B.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 B.util.equals(Uo,n,r)}};_(Uo,"runtime",B),_(Uo,"typeName","wg.cosmo.node.v1.OperationRequest"),_(Uo,"fields",B.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:Nb}]));var mb=Uo,ko=class ko extends Le{constructor(n){super();_(this,"persistedQuery");B.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 B.util.equals(ko,n,r)}};_(ko,"runtime",B),_(ko,"typeName","wg.cosmo.node.v1.Extension"),_(ko,"fields",B.util.newFieldList(()=>[{no:1,name:"persisted_query",kind:"message",T:Tb}]));var Nb=ko,Mo=class Mo extends Le{constructor(n){super();_(this,"sha256Hash","");_(this,"version",0);B.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 B.util.equals(Mo,n,r)}};_(Mo,"runtime",B),_(Mo,"typeName","wg.cosmo.node.v1.PersistedQuery"),_(Mo,"fields",B.util.newFieldList(()=>[{no:1,name:"sha256_hash",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:5}]));var Tb=Mo,xo=class xo extends Le{constructor(n){super();_(this,"name","");_(this,"version","");B.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 B.util.equals(xo,n,r)}};_(xo,"runtime",B),_(xo,"typeName","wg.cosmo.node.v1.ClientInfo"),_(xo,"fields",B.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9}]));var Eb=xo;m();T();N();function hb(e){return new Error(`Normalization failed to return a ${e}.`)}function G1(e){return new Error(`Invalid router compatibility version "${e}".`)}m();T();N();var ud=fs(JE(),1);function npe(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 mf({fieldName:a[1],typeName:a[0]}))}t.push(new Nf({fieldCoordinatesPath:r,fieldPath:n.fieldPath}))}return t}function yb(e,t,n){if(e)for(let r of e){let i=npe(r);t.push(new Pc(x(x({typeName:n,fieldName:r.fieldName,selectionSet:r.selectionSet},r.disableEntityResolver?{disableEntityResolver:!0}:{}),i?{conditions:i}:{})))}}function Ib(e){switch(e){case"publish":return qo.PUBLISH;case"request":return qo.REQUEST;case"subscribe":return qo.SUBSCRIBE}}function $1(e){var n;let t={rootNodes:[],childNodes:[],keys:[],provides:[],events:new Cc({nats:[],kafka:[],redis:[]}),requires:[],entityInterfaces:[],interfaceObjects:[]};for(let r of e.values()){let i=r.typeName,a=[...r.fieldNames],o=new ad({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 f=new sd({interfaceTypeName:i,concreteTypeNames:[...r.entityInterfaceConcreteTypeNames]});r.isInterfaceObject?t.interfaceObjects.push(f):t.entityInterfaces.push(f)}yb(r.keys,t.keys,i),yb(r.provides,t.provides,i),yb(r.requires,t.requires,i);let c=[],l=[],d=[];for(let f of(n=r.events)!=null?n:[])switch(f.providerType){case ud.PROVIDER_TYPE_KAFKA:{l.push(new If({engineEventConfiguration:new Vo({fieldName:f.fieldName,providerId:f.providerId,type:Ib(f.type),typeName:i}),topics:f.topics}));break}case ud.PROVIDER_TYPE_NATS:{c.push(new yf(x({engineEventConfiguration:new Vo({fieldName:f.fieldName,providerId:f.providerId,type:Ib(f.type),typeName:i}),subjects:f.subjects},f.streamConfiguration?{streamConfiguration:new hf({consumerInactiveThreshold:f.streamConfiguration.consumerInactiveThreshold,consumerName:f.streamConfiguration.consumerName,streamName:f.streamConfiguration.streamName})}:{})));break}case ud.PROVIDER_TYPE_REDIS:{d.push(new gf({engineEventConfiguration:new Vo({fieldName:f.fieldName,providerId:f.providerId,type:Ib(f.type),typeName:i}),channels:f.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 Q1(e){var n,r;let t=[];for(let i of e){let a=i.argumentNames.map(f=>new df({name:f,sourceType:Fc.FIELD_ARGUMENT})),o=new ff({argumentsConfiguration:a,fieldName:i.fieldName,typeName:i.typeName}),c=((n=i.requiredScopes)==null?void 0:n.map(f=>new Lc({requiredAndScopes:f})))||[],l=((r=i.requiredScopesByOR)==null?void 0:r.map(f=>new Lc({requiredAndScopes:f})))||[],d=c.length>0;if((i.requiresAuthentication||d)&&(o.authorizationConfiguration=new pf({requiresAuthentication:i.requiresAuthentication||d,requiredOrScopes:c,requiredOrScopesByOr:l})),i.subscriptionFilterCondition){let f=new Ou;Ih(f,i.subscriptionFilterCondition),o.subscriptionFilterCondition=f}t.push(o)}return t}function Ih(e,t){if(t.and!==void 0){let n=[];for(let r of t.and){let i=new Ou;Ih(i,r),n.push(i)}e.and=n;return}if(t.in!==void 0){e.in=new vf({fieldPath:t.in.fieldPath,json:JSON.stringify(t.in.values)});return}if(t.not!==void 0){e.not=new Ou,Ih(e.not,t.not);return}if(t.or!==void 0){let n=[];for(let r of t.or){let i=new Ou;Ih(i,r),n.push(i)}e.or=n;return}throw new Error("Fatal: Incoming SubscriptionCondition object was malformed.")}var Bc;(function(e){e[e.Plugin=0]="Plugin",e[e.Standard=1]="Standard",e[e.GRPC=2]="GRPC"})(Bc||(Bc={}));var rpe=(e,t)=>{let n=stringHash(t);return e.stringStorage[n]=t,new _f({key:n})},ipe=e=>{switch(e){case"ws":return Fs.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS;case"sse":return Fs.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE;case"sse_post":return Fs.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST}},ape=e=>{switch(e){case"auto":return ws.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO;case"graphql-ws":return ws.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS;case"graphql-transport-ws":return ws.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS}},J1=function(e){if(!cd.ROUTER_COMPATIBILITY_VERSIONS.has(e.routerCompatibilityVersion))throw G1(e.routerCompatibilityVersion);let t=new id({defaultFlushInterval:BigInt(500),datasourceConfigurations:[],fieldConfigurations:[],graphqlSchema:"",stringStorage:{},typeConfigurations:[]});for(let n of e.subgraphs){if(!n.configurationDataByTypeName)throw hb("ConfigurationDataByTypeName");if(!n.schema)throw hb("GraphQLSchema");let r={enabled:!0},i=rpe(t,t1((0,Y1.lexicographicSortSchema)(n.schema))),{childNodes:a,entityInterfaces:o,events:c,interfaceObjects:l,keys:d,provides:f,requires:y,rootNodes:I}=$1(n.configurationDataByTypeName),v;switch(n.kind){case Bc.Standard:{r.enabled=!0,r.protocol=ipe(n.subscriptionProtocol||"ws"),r.websocketSubprotocol=ape(n.websocketSubprotocol||"auto"),r.url=new qr({kind:Su.STATIC_CONFIGURATION_VARIABLE,staticVariableContent:n.subscriptionUrl||n.url});break}case Bc.Plugin:{v=new od({mapping:n.mapping,protoSchema:n.protoSchema,plugin:new Ef({name:n.name,version:n.version,imageReference:n.imageReference})});break}case Bc.GRPC:{v=new od({mapping:n.mapping,protoSchema:n.protoSchema});break}}let F,k,K;if(c.kafka.length>0||c.nats.length>0||c.redis.length>0){F=vu.PUBSUB,K=new Cc({kafka:c.kafka,nats:c.nats,redis:c.redis});let se=de=>cd.ROOT_TYPE_NAMES.has(de.typeName),ie=0,Te=0;for(;ie({id:n.id,name:n.name,routingUrl:n.url})),compatibilityVersion:`${e.routerCompatibilityVersion}:${cd.COMPOSITION_VERSION}`})};m();T();N();var kc=fs(Ae());function H1(e){let t;try{t=(0,kc.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 spe(e){let t=(0,Uc.federateSubgraphs)({subgraphs:e.map(H1),version:Uc.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,kc.print)(t.federatedGraphAST)}}function ope(e){let t=(0,Uc.federateSubgraphs)({subgraphs:e.map(H1),version:Uc.LATEST_ROUTER_COMPATIBILITY_VERSION});if(!t.success)throw new Error(`could not federate schema: ${t.errors.map(r=>r.message).join(", ")}`);return J1({federatedClientSDL:(0,kc.printSchema)(t.federatedGraphClientSchema),federatedSDL:(0,kc.printSchema)(t.federatedGraphSchema),fieldConfigurations:t.fieldConfigurations,routerCompatibilityVersion:Uc.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:Bc.Standard,id:`${i}`,name:r.name,url:bD(r.url),sdl:r.schema,subscriptionUrl:bD((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 fm(upe);})(); +`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:o=a,i=1;break;case 1:n[r++]=o<<2|(a&48)>>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+=Ps[i|r>>4],i=(r&15)<<2,n=2;break;case 2:t+=Ps[i|r>>6],t+=Ps[r&63],n=0;break}return n&&(t+=Ps[i],t+="=",n==1&&(t+="=")),t}};m();T();N();function T1(e,t,n){h1(t,e);let r=t.runtime.bin.makeReadOptions(n),i=N1(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,o]=oh(t);for(let c of i)t.runtime.bin.readField(a,r.readerFactory(c.data),t.field,c.wireType,r);return o()}function E1(e,t,n,r){h1(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(kD(e,t)){let d=e.getType().runtime.bin.listUnknownFields(e).filter(f=>f.no!=t.field.no);e.getType().runtime.bin.discardUnknownFields(e);for(let f of d)e.getType().runtime.bin.onUnknownField(e,f.no,f.wireType,f.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 h1(e,t){ln(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}m();T();N();function ch(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:!ih(e.T,t[n]);case"message":return t[n]!==void 0;case"map":return Object.keys(t[n]).length>0}}function MD(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?ya(e.T,e.L):void 0;break;case"message":t[n]=void 0;break}}m();T();N();m();T();N();function Ia(e,t){if(e===null||typeof e!="object"||!Object.getOwnPropertyNames(Le.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 lh(e,t){return Ia(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}var $xe={"google.protobuf.DoubleValue":Ne.DOUBLE,"google.protobuf.FloatValue":Ne.FLOAT,"google.protobuf.Int64Value":Ne.INT64,"google.protobuf.UInt64Value":Ne.UINT64,"google.protobuf.Int32Value":Ne.INT32,"google.protobuf.UInt32Value":Ne.UINT32,"google.protobuf.BoolValue":Ne.BOOL,"google.protobuf.StringValue":Ne.STRING,"google.protobuf.BytesValue":Ne.BYTES};var y1={ignoreUnknownFields:!1},I1={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function jde(e){return e?Object.assign(Object.assign({},y1),e):y1}function Kde(e){return e?Object.assign(Object.assign({},I1),e):I1}var fh=Symbol(),dh=Symbol();function v1(){return{makeReadOptions:jde,makeWriteOptions:Kde,readMessage(e,t,n,r){if(t==null||Array.isArray(t)||typeof t!="object")throw new Error(`cannot decode message ${e.typeName} from JSON: ${ts(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)}g1(r,c,l,n,e)}else{let d=!1;if(a!=null&&a.findExtension&&o.startsWith("[")&&o.endsWith("]")){let f=a.findExtension(o.substring(1,o.length-1));if(f&&f.extendee.typeName==e.typeName){d=!0;let[y,I]=oh(f);g1(y,c,f.field,n,f),E1(r,f,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(!ch(i,e)){if(i.req)throw"required field not set";if(!t.emitDefaultValues||!$de(i))continue}let o=i.oneof?e[i.oneof.localName].value:e[i.localName],c=_1(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&&kD(e,c)){let l=T1(e,c,t),d=_1(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 af(e,t,n!=null?n:ha.BIGINT,!0)},writeScalar(e,t,n){if(t!==void 0&&(n||ih(e,t)))return ph(e,t)},debug:ts}}function ts(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 g1(e,t,n,r,i){let a=n.localName;if(n.repeated){if(ln(n.kind!="map"),t===null)return;if(!Array.isArray(t))throw new Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${ts(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: ${ts(c)}`);switch(n.kind){case"message":o.push(n.T.fromJson(c,r));break;case"enum":let l=xD(n.T,c,r.ignoreUnknownFields,!0);l!==dh&&o.push(l);break;case"scalar":try{o.push(af(n.T,c,n.L,!0))}catch(d){let f=`cannot decode field ${i.typeName}.${n.name} from JSON: ${ts(c)}`;throw d instanceof Error&&d.message.length>0&&(f+=`: ${d.message}`),new Error(f)}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: ${ts(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=Gde(n.K,c)}catch(f){let y=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${ts(t)}`;throw f instanceof Error&&f.message.length>0&&(y+=`: ${f.message}`),new Error(y)}switch(n.V.kind){case"message":o[d]=n.V.T.fromJson(l,r);break;case"enum":let f=xD(n.V.T,l,r.ignoreUnknownFields,!0);f!==dh&&(o[d]=f);break;case"scalar":try{o[d]=af(n.V.T,l,ha.BIGINT,!0)}catch(y){let I=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${ts(t)}`;throw y instanceof Error&&y.message.length>0&&(I+=`: ${y.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];Ia(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=xD(n.T,t,r.ignoreUnknownFields,!1);switch(l){case fh:MD(n,e);break;case dh:break;default:e[a]=l;break}break;case"scalar":try{let d=af(n.T,t,n.L,!1);switch(d){case fh:MD(n,e);break;default:e[a]=d;break}}catch(d){let f=`cannot decode field ${i.typeName}.${n.name} from JSON: ${ts(t)}`;throw d instanceof Error&&d.message.length>0&&(f+=`: ${d.message}`),new Error(f)}break}}function Gde(e,t){if(e===Ne.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1;break}return af(e,t,ha.BIGINT,!0).toString()}function af(e,t,n,r){if(t===null)return r?ya(e,n):fh;switch(e){case Ne.DOUBLE:case Ne.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==Ne.FLOAT&&th(i),i;case Ne.INT32:case Ne.FIXED32:case Ne.SFIXED32:case Ne.SINT32:case Ne.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==Ne.UINT32||e==Ne.FIXED32?rf(a):td(a),a;case Ne.INT64:case Ne.SFIXED64:case Ne.SINT64:if(typeof t!="number"&&typeof t!="string")break;let o=Gn.parse(t);return n?o.toString():o;case Ne.FIXED64:case Ne.UINT64:if(typeof t!="number"&&typeof t!="string")break;let c=Gn.uParse(t);return n?c.toString():c;case Ne.BOOL:if(typeof t!="boolean")break;return t;case Ne.STRING:if(typeof t!="string")break;try{encodeURIComponent(t)}catch(l){throw new Error("invalid UTF8")}return t;case Ne.BYTES:if(t==="")return new Uint8Array(0);if(typeof t!="string")break;return UD.dec(t)}throw new Error}function xD(e,t,n,r){if(t===null)return e.typeName=="google.protobuf.NullValue"?0:r?e.values[0].no:fh;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 dh;break}throw new Error(`cannot decode enum ${e.typeName} from JSON: ${ts(t)}`)}function $de(e){return e.repeated||e.kind=="map"?!0:!(e.oneof||e.kind=="message"||e.opt||e.req)}function _1(e,t,n){if(e.kind=="map"){ln(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()]=ph(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()]=qD(a,c,n.enumAsInteger);break}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){ln(Array.isArray(t));let r=[];switch(e.kind){case"scalar":for(let i=0;i0?r:void 0}switch(e.kind){case"scalar":return ph(e.T,t);case"enum":return qD(e.T,t,n.enumAsInteger);case"message":return lh(e.T,t).toJson(n)}}function qD(e,t,n){var r;if(ln(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 ph(e,t){switch(e){case Ne.INT32:case Ne.SFIXED32:case Ne.SINT32:case Ne.FIXED32:case Ne.UINT32:return ln(typeof t=="number"),t;case Ne.FLOAT:case Ne.DOUBLE:return ln(typeof t=="number"),Number.isNaN(t)?"NaN":t===Number.POSITIVE_INFINITY?"Infinity":t===Number.NEGATIVE_INFINITY?"-Infinity":t;case Ne.STRING:return ln(typeof t=="string"),t;case Ne.BOOL:return ln(typeof t=="boolean"),t;case Ne.UINT64:case Ne.FIXED64:case Ne.INT64:case Ne.SFIXED64:case Ne.SINT64:return ln(typeof t=="bigint"||typeof t=="string"||typeof t=="number"),t.toString();case Ne.BYTES:return ln(t instanceof Uint8Array),UD.enc(t)}}m();T();N();var nd=Symbol("@bufbuild/protobuf/unknown-fields"),S1={readUnknownFields:!0,readerFactory:e=>new sh(e)},O1={writeUnknownFields:!0,writerFactory:()=>new ah};function Qde(e){return e?Object.assign(Object.assign({},S1),e):S1}function Yde(e){return e?Object.assign(Object.assign({},O1),e):O1}function R1(){return{makeReadOptions:Qde,makeWriteOptions:Yde,listUnknownFields(e){var t;return(t=e[nd])!==null&&t!==void 0?t:[]},discardUnknownFields(e){delete e[nd]},writeUnknownFields(e,t){let r=e[nd];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[nd])||(i[nd]=[]),i[nd].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=Hde),a){let I=e[o];if(r==Un.LengthDelimited&&c!=Ne.STRING&&c!=Ne.BYTES){let F=t.uint32()+t.pos;for(;t.posIa(I,y)?I:new y(I));else{let I=o[i];y.fieldWrapper?y.typeName==="google.protobuf.BytesValue"?a[i]=of(I):a[i]=I:a[i]=Ia(I,y)?I:new y(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)=>Rs(r.T,o,a[c]));case"enum":return i.every((o,c)=>Rs(Ne.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 Rs(Ne.INT32,i,a);case"scalar":return Rs(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 Rs(Ne.INT32,i.value,a.value);case"scalar":return Rs(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(f=>l.equals(i[f],a[f]));case"enum":return c.every(f=>Rs(Ne.INT32,i[f],a[f]));case"scalar":let d=r.V.T;return c.every(f=>Rs(d,i[f],a[f]))}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(Th);else if(i.kind=="map"){o=r[i.localName];for(let[c,l]of Object.entries(a))o[c]=Th(l)}else i.kind=="oneof"?o=i.findField(a.case)?{case:a.case,value:Th(a.value)}:{case:void 0}:o=Th(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 Th(e){if(e===void 0)return e;if(Ia(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function of(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function w1(e,t,n){return{syntax:e,json:v1(),bin:R1(),util:Object.assign(Object.assign({},F1()),{newFieldList:t,initFields:n}),makeMessageType(r,i,a){return u1(this,r,i,a)},makeEnum:s1,makeEnumType:FD,getEnumType:a1,makeExtension(r,i,a){return m1(this,r,i,a)}}}m();T();N();var Eh=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 VD(e,t){let n=B1(e);return t?n:tpe(epe(n))}function L1(e){return VD(e,!1)}var C1=B1;function B1(e){let t=!1,n=[];for(let r=0;r`${e}$`,epe=e=>Zde.has(e)?U1(e):e,tpe=e=>Xde.has(e)?U1(e):e;var hh=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=L1(t)}addField(t){ln(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 Eh(e,t=>k1(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]=ya(t.T,t.L);break;case"message":break}}});var rd;(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"})(rd||(rd={}));B.util.setEnumType(rd,"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 Fs;(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"})(Fs||(Fs={}));B.util.setEnumType(Fs,"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 ws;(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"})(ws||(ws={}));B.util.setEnumType(ws,"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 Y1=fs(Ae(),1);m();T();N();var jD;(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"})(jD||(jD={}));B.util.setEnumType(jD,"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 wc;(function(e){e[e.OBJECT_FIELD=0]="OBJECT_FIELD",e[e.FIELD_ARGUMENT=1]="FIELD_ARGUMENT"})(wc||(wc={}));B.util.setEnumType(wc,"wg.cosmo.node.v1.ArgumentSource",[{no:0,name:"OBJECT_FIELD"},{no:1,name:"FIELD_ARGUMENT"}]);var vu;(function(e){e[e.STATIC=0]="STATIC",e[e.GRAPHQL=1]="GRAPHQL",e[e.PUBSUB=2]="PUBSUB"})(vu||(vu={}));B.util.setEnumType(vu,"wg.cosmo.node.v1.DataSourceKind",[{no:0,name:"STATIC"},{no:1,name:"GRAPHQL"},{no:2,name:"PUBSUB"}]);var uf;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.QUERY=1]="QUERY",e[e.MUTATION=2]="MUTATION",e[e.SUBSCRIPTION=3]="SUBSCRIPTION"})(uf||(uf={}));B.util.setEnumType(uf,"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 qo;(function(e){e[e.PUBLISH=0]="PUBLISH",e[e.REQUEST=1]="REQUEST",e[e.SUBSCRIBE=2]="SUBSCRIBE"})(qo||(qo={}));B.util.setEnumType(qo,"wg.cosmo.node.v1.EventType",[{no:0,name:"PUBLISH"},{no:1,name:"REQUEST"},{no:2,name:"SUBSCRIBE"}]);var Su;(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"})(Su||(Su={}));B.util.setEnumType(Su,"wg.cosmo.node.v1.ConfigurationVariableKind",[{no:0,name:"STATIC_CONFIGURATION_VARIABLE"},{no:1,name:"ENV_CONFIGURATION_VARIABLE"},{no:2,name:"PLACEHOLDER_CONFIGURATION_VARIABLE"}]);var Lc;(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"})(Lc||(Lc={}));B.util.setEnumType(Lc,"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 Ls=class Ls extends Le{constructor(n){super();_(this,"id","");_(this,"name","");_(this,"routingUrl","");B.util.initPartial(n,this)}static fromBinary(n,r){return new Ls().fromBinary(n,r)}static fromJson(n,r){return new Ls().fromJson(n,r)}static fromJsonString(n,r){return new Ls().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Ls,n,r)}};_(Ls,"runtime",B),_(Ls,"typeName","wg.cosmo.node.v1.Subgraph"),_(Ls,"fields",B.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 yh=Ls,Cs=class Cs extends Le{constructor(n){super();_(this,"configByFeatureFlagName",{});B.util.initPartial(n,this)}static fromBinary(n,r){return new Cs().fromBinary(n,r)}static fromJson(n,r){return new Cs().fromJson(n,r)}static fromJsonString(n,r){return new Cs().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Cs,n,r)}};_(Cs,"runtime",B),_(Cs,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfigs"),_(Cs,"fields",B.util.newFieldList(()=>[{no:1,name:"config_by_feature_flag_name",kind:"map",K:9,V:{kind:"message",T:GD}}]));var KD=Cs,Bs=class Bs extends Le{constructor(n){super();_(this,"engineConfig");_(this,"version","");_(this,"subgraphs",[]);B.util.initPartial(n,this)}static fromBinary(n,r){return new Bs().fromBinary(n,r)}static fromJson(n,r){return new Bs().fromJson(n,r)}static fromJsonString(n,r){return new Bs().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Bs,n,r)}};_(Bs,"runtime",B),_(Bs,"typeName","wg.cosmo.node.v1.FeatureFlagRouterExecutionConfig"),_(Bs,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:id},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:yh,repeated:!0}]));var GD=Bs,Us=class Us extends Le{constructor(n){super();_(this,"engineConfig");_(this,"version","");_(this,"subgraphs",[]);_(this,"featureFlagConfigs");_(this,"compatibilityVersion","");B.util.initPartial(n,this)}static fromBinary(n,r){return new Us().fromBinary(n,r)}static fromJson(n,r){return new Us().fromJson(n,r)}static fromJsonString(n,r){return new Us().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Us,n,r)}};_(Us,"runtime",B),_(Us,"typeName","wg.cosmo.node.v1.RouterConfig"),_(Us,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_config",kind:"message",T:id},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"subgraphs",kind:"message",T:yh,repeated:!0},{no:4,name:"feature_flag_configs",kind:"message",T:KD,opt:!0},{no:5,name:"compatibility_version",kind:"scalar",T:9}]));var cf=Us,ks=class ks extends Le{constructor(n){super();_(this,"code",rd.OK);_(this,"details");B.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 B.util.equals(ks,n,r)}};_(ks,"runtime",B),_(ks,"typeName","wg.cosmo.node.v1.Response"),_(ks,"fields",B.util.newFieldList(()=>[{no:1,name:"code",kind:"enum",T:B.getEnumType(rd)},{no:2,name:"details",kind:"scalar",T:9,opt:!0}]));var $D=ks,Ms=class Ms extends Le{constructor(n){super();_(this,"code",0);_(this,"message","");B.util.initPartial(n,this)}static fromBinary(n,r){return new Ms().fromBinary(n,r)}static fromJson(n,r){return new Ms().fromJson(n,r)}static fromJsonString(n,r){return new Ms().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Ms,n,r)}};_(Ms,"runtime",B),_(Ms,"typeName","wg.cosmo.node.v1.ResponseStatus"),_(Ms,"fields",B.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9}]));var M1=Ms,xs=class xs extends Le{constructor(n){super();_(this,"accountLimits");_(this,"graphPublicKey","");B.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 B.util.equals(xs,n,r)}};_(xs,"runtime",B),_(xs,"typeName","wg.cosmo.node.v1.RegistrationInfo"),_(xs,"fields",B.util.newFieldList(()=>[{no:1,name:"account_limits",kind:"message",T:YD},{no:2,name:"graph_public_key",kind:"scalar",T:9}]));var QD=xs,qs=class qs extends Le{constructor(n){super();_(this,"traceSamplingRate",0);B.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 B.util.equals(qs,n,r)}};_(qs,"runtime",B),_(qs,"typeName","wg.cosmo.node.v1.AccountLimits"),_(qs,"fields",B.util.newFieldList(()=>[{no:1,name:"trace_sampling_rate",kind:"scalar",T:2}]));var YD=qs,Vs=class Vs extends Le{constructor(t){super(),B.util.initPartial(t,this)}static fromBinary(t,n){return new Vs().fromBinary(t,n)}static fromJson(t,n){return new Vs().fromJson(t,n)}static fromJsonString(t,n){return new Vs().fromJsonString(t,n)}static equals(t,n){return B.util.equals(Vs,t,n)}};_(Vs,"runtime",B),_(Vs,"typeName","wg.cosmo.node.v1.SelfRegisterRequest"),_(Vs,"fields",B.util.newFieldList(()=>[]));var x1=Vs,js=class js extends Le{constructor(n){super();_(this,"response");_(this,"registrationInfo");B.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 B.util.equals(js,n,r)}};_(js,"runtime",B),_(js,"typeName","wg.cosmo.node.v1.SelfRegisterResponse"),_(js,"fields",B.util.newFieldList(()=>[{no:1,name:"response",kind:"message",T:$D},{no:2,name:"registrationInfo",kind:"message",T:QD,opt:!0}]));var q1=js,Ks=class Ks extends Le{constructor(n){super();_(this,"defaultFlushInterval",Gn.zero);_(this,"datasourceConfigurations",[]);_(this,"fieldConfigurations",[]);_(this,"graphqlSchema","");_(this,"typeConfigurations",[]);_(this,"stringStorage",{});_(this,"graphqlClientSchema");B.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 B.util.equals(Ks,n,r)}};_(Ks,"runtime",B),_(Ks,"typeName","wg.cosmo.node.v1.EngineConfiguration"),_(Ks,"fields",B.util.newFieldList(()=>[{no:1,name:"defaultFlushInterval",kind:"scalar",T:3},{no:2,name:"datasource_configurations",kind:"message",T:lf,repeated:!0},{no:3,name:"field_configurations",kind:"message",T:ff,repeated:!0},{no:4,name:"graphqlSchema",kind:"scalar",T:9},{no:5,name:"type_configurations",kind:"message",T:JD,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 id=Ks,Gs=class Gs extends Le{constructor(n){super();_(this,"kind",vu.STATIC);_(this,"rootNodes",[]);_(this,"childNodes",[]);_(this,"overrideFieldPathFromAlias",!1);_(this,"customGraphql");_(this,"customStatic");_(this,"directives",[]);_(this,"requestTimeoutSeconds",Gn.zero);_(this,"id","");_(this,"keys",[]);_(this,"provides",[]);_(this,"requires",[]);_(this,"customEvents");_(this,"entityInterfaces",[]);_(this,"interfaceObjects",[]);B.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 B.util.equals(Gs,n,r)}};_(Gs,"runtime",B),_(Gs,"typeName","wg.cosmo.node.v1.DataSourceConfiguration"),_(Gs,"fields",B.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:B.getEnumType(vu)},{no:2,name:"root_nodes",kind:"message",T:ad,repeated:!0},{no:3,name:"child_nodes",kind:"message",T:ad,repeated:!0},{no:4,name:"override_field_path_from_alias",kind:"scalar",T:8},{no:5,name:"custom_graphql",kind:"message",T:Tf},{no:6,name:"custom_static",kind:"message",T:ab},{no:7,name:"directives",kind:"message",T:sb,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:Fc,repeated:!0},{no:11,name:"provides",kind:"message",T:Fc,repeated:!0},{no:12,name:"requires",kind:"message",T:Fc,repeated:!0},{no:13,name:"custom_events",kind:"message",T:Bc},{no:14,name:"entity_interfaces",kind:"message",T:sd,repeated:!0},{no:15,name:"interface_objects",kind:"message",T:sd,repeated:!0}]));var lf=Gs,$s=class $s extends Le{constructor(n){super();_(this,"name","");_(this,"sourceType",wc.OBJECT_FIELD);B.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 B.util.equals($s,n,r)}};_($s,"runtime",B),_($s,"typeName","wg.cosmo.node.v1.ArgumentConfiguration"),_($s,"fields",B.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"source_type",kind:"enum",T:B.getEnumType(wc)}]));var df=$s,Qs=class Qs extends Le{constructor(n){super();_(this,"requiredAndScopes",[]);B.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 B.util.equals(Qs,n,r)}};_(Qs,"runtime",B),_(Qs,"typeName","wg.cosmo.node.v1.Scopes"),_(Qs,"fields",B.util.newFieldList(()=>[{no:1,name:"required_and_scopes",kind:"scalar",T:9,repeated:!0}]));var Cc=Qs,Ys=class Ys extends Le{constructor(n){super();_(this,"requiresAuthentication",!1);_(this,"requiredOrScopes",[]);_(this,"requiredOrScopesByOr",[]);B.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 B.util.equals(Ys,n,r)}};_(Ys,"runtime",B),_(Ys,"typeName","wg.cosmo.node.v1.AuthorizationConfiguration"),_(Ys,"fields",B.util.newFieldList(()=>[{no:1,name:"requires_authentication",kind:"scalar",T:8},{no:2,name:"required_or_scopes",kind:"message",T:Cc,repeated:!0},{no:3,name:"required_or_scopes_by_or",kind:"message",T:Cc,repeated:!0}]));var pf=Ys,Js=class Js extends Le{constructor(n){super();_(this,"typeName","");_(this,"fieldName","");_(this,"argumentsConfiguration",[]);_(this,"authorizationConfiguration");_(this,"subscriptionFilterCondition");B.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 B.util.equals(Js,n,r)}};_(Js,"runtime",B),_(Js,"typeName","wg.cosmo.node.v1.FieldConfiguration"),_(Js,"fields",B.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:df,repeated:!0},{no:4,name:"authorization_configuration",kind:"message",T:pf},{no:5,name:"subscription_filter_condition",kind:"message",T:Ou,opt:!0}]));var ff=Js,Hs=class Hs extends Le{constructor(n){super();_(this,"typeName","");_(this,"renameTo","");B.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 B.util.equals(Hs,n,r)}};_(Hs,"runtime",B),_(Hs,"typeName","wg.cosmo.node.v1.TypeConfiguration"),_(Hs,"fields",B.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var JD=Hs,zs=class zs extends Le{constructor(n){super();_(this,"typeName","");_(this,"fieldNames",[]);_(this,"externalFieldNames",[]);_(this,"requireFetchReasonsFieldNames",[]);B.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 B.util.equals(zs,n,r)}};_(zs,"runtime",B),_(zs,"typeName","wg.cosmo.node.v1.TypeField"),_(zs,"fields",B.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 ad=zs,Ws=class Ws extends Le{constructor(n){super();_(this,"fieldName","");_(this,"typeName","");B.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 B.util.equals(Ws,n,r)}};_(Ws,"runtime",B),_(Ws,"typeName","wg.cosmo.node.v1.FieldCoordinates"),_(Ws,"fields",B.util.newFieldList(()=>[{no:1,name:"field_name",kind:"scalar",T:9},{no:2,name:"type_name",kind:"scalar",T:9}]));var mf=Ws,Xs=class Xs extends Le{constructor(n){super();_(this,"fieldCoordinatesPath",[]);_(this,"fieldPath",[]);B.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 B.util.equals(Xs,n,r)}};_(Xs,"runtime",B),_(Xs,"typeName","wg.cosmo.node.v1.FieldSetCondition"),_(Xs,"fields",B.util.newFieldList(()=>[{no:1,name:"field_coordinates_path",kind:"message",T:mf,repeated:!0},{no:2,name:"field_path",kind:"scalar",T:9,repeated:!0}]));var Nf=Xs,Zs=class Zs extends Le{constructor(n){super();_(this,"typeName","");_(this,"fieldName","");_(this,"selectionSet","");_(this,"disableEntityResolver",!1);_(this,"conditions",[]);B.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 B.util.equals(Zs,n,r)}};_(Zs,"runtime",B),_(Zs,"typeName","wg.cosmo.node.v1.RequiredField"),_(Zs,"fields",B.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:Nf,repeated:!0}]));var Fc=Zs,eo=class eo extends Le{constructor(n){super();_(this,"interfaceTypeName","");_(this,"concreteTypeNames",[]);B.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 B.util.equals(eo,n,r)}};_(eo,"runtime",B),_(eo,"typeName","wg.cosmo.node.v1.EntityInterfaceConfiguration"),_(eo,"fields",B.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 sd=eo,to=class to extends Le{constructor(n){super();_(this,"url");_(this,"method",Lc.GET);_(this,"header",{});_(this,"body");_(this,"query",[]);_(this,"urlEncodeBody",!1);_(this,"mtls");_(this,"baseUrl");_(this,"path");_(this,"httpProxyUrl");B.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 B.util.equals(to,n,r)}};_(to,"runtime",B),_(to,"typeName","wg.cosmo.node.v1.FetchConfiguration"),_(to,"fields",B.util.newFieldList(()=>[{no:1,name:"url",kind:"message",T:qr},{no:2,name:"method",kind:"enum",T:B.getEnumType(Lc)},{no:3,name:"header",kind:"map",K:9,V:{kind:"message",T:ub}},{no:4,name:"body",kind:"message",T:qr},{no:5,name:"query",kind:"message",T:ob,repeated:!0},{no:7,name:"url_encode_body",kind:"scalar",T:8},{no:8,name:"mtls",kind:"message",T:cb},{no:9,name:"base_url",kind:"message",T:qr},{no:10,name:"path",kind:"message",T:qr},{no:11,name:"http_proxy_url",kind:"message",T:qr,opt:!0}]));var HD=to,no=class no extends Le{constructor(n){super();_(this,"statusCode",Gn.zero);_(this,"typeName","");_(this,"injectStatusCodeIntoBody",!1);B.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 B.util.equals(no,n,r)}};_(no,"runtime",B),_(no,"typeName","wg.cosmo.node.v1.StatusCodeTypeMapping"),_(no,"fields",B.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 V1=no,ro=class ro extends Le{constructor(n){super();_(this,"fetch");_(this,"subscription");_(this,"federation");_(this,"upstreamSchema");_(this,"customScalarTypeFields",[]);_(this,"grpc");B.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 B.util.equals(ro,n,r)}};_(ro,"runtime",B),_(ro,"typeName","wg.cosmo.node.v1.DataSourceCustom_GraphQL"),_(ro,"fields",B.util.newFieldList(()=>[{no:1,name:"fetch",kind:"message",T:HD},{no:2,name:"subscription",kind:"message",T:lb},{no:3,name:"federation",kind:"message",T:db},{no:4,name:"upstream_schema",kind:"message",T:_f},{no:6,name:"custom_scalar_type_fields",kind:"message",T:pb,repeated:!0},{no:7,name:"grpc",kind:"message",T:od}]));var Tf=ro,io=class io extends Le{constructor(n){super();_(this,"mapping");_(this,"protoSchema","");_(this,"plugin");B.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 B.util.equals(io,n,r)}};_(io,"runtime",B),_(io,"typeName","wg.cosmo.node.v1.GRPCConfiguration"),_(io,"fields",B.util.newFieldList(()=>[{no:1,name:"mapping",kind:"message",T:WD},{no:2,name:"proto_schema",kind:"scalar",T:9},{no:3,name:"plugin",kind:"message",T:Ef}]));var od=io,ao=class ao extends Le{constructor(n){super();_(this,"repository","");_(this,"reference","");B.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 B.util.equals(ao,n,r)}};_(ao,"runtime",B),_(ao,"typeName","wg.cosmo.node.v1.ImageReference"),_(ao,"fields",B.util.newFieldList(()=>[{no:1,name:"repository",kind:"scalar",T:9},{no:2,name:"reference",kind:"scalar",T:9}]));var zD=ao,so=class so extends Le{constructor(n){super();_(this,"name","");_(this,"version","");_(this,"imageReference");B.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 B.util.equals(so,n,r)}};_(so,"runtime",B),_(so,"typeName","wg.cosmo.node.v1.PluginConfiguration"),_(so,"fields",B.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:zD,opt:!0}]));var Ef=so,oo=class oo extends Le{constructor(n){super();_(this,"enabled",!1);B.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 B.util.equals(oo,n,r)}};_(oo,"runtime",B),_(oo,"typeName","wg.cosmo.node.v1.SSLConfiguration"),_(oo,"fields",B.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8}]));var j1=oo,uo=class uo extends Le{constructor(n){super();_(this,"version",0);_(this,"service","");_(this,"operationMappings",[]);_(this,"entityMappings",[]);_(this,"typeFieldMappings",[]);_(this,"enumMappings",[]);B.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 B.util.equals(uo,n,r)}};_(uo,"runtime",B),_(uo,"typeName","wg.cosmo.node.v1.GRPCMapping"),_(uo,"fields",B.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:XD,repeated:!0},{no:4,name:"entity_mappings",kind:"message",T:ZD,repeated:!0},{no:5,name:"type_field_mappings",kind:"message",T:eb,repeated:!0},{no:6,name:"enum_mappings",kind:"message",T:rb,repeated:!0}]));var WD=uo,co=class co extends Le{constructor(n){super();_(this,"type",uf.UNSPECIFIED);_(this,"original","");_(this,"mapped","");_(this,"request","");_(this,"response","");B.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 B.util.equals(co,n,r)}};_(co,"runtime",B),_(co,"typeName","wg.cosmo.node.v1.OperationMapping"),_(co,"fields",B.util.newFieldList(()=>[{no:1,name:"type",kind:"enum",T:B.getEnumType(uf)},{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 XD=co,lo=class lo extends Le{constructor(n){super();_(this,"typeName","");_(this,"kind","");_(this,"key","");_(this,"rpc","");_(this,"request","");_(this,"response","");B.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 B.util.equals(lo,n,r)}};_(lo,"runtime",B),_(lo,"typeName","wg.cosmo.node.v1.EntityMapping"),_(lo,"fields",B.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 ZD=lo,po=class po extends Le{constructor(n){super();_(this,"type","");_(this,"fieldMappings",[]);B.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 B.util.equals(po,n,r)}};_(po,"runtime",B),_(po,"typeName","wg.cosmo.node.v1.TypeFieldMapping"),_(po,"fields",B.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"field_mappings",kind:"message",T:tb,repeated:!0}]));var eb=po,fo=class fo extends Le{constructor(n){super();_(this,"original","");_(this,"mapped","");_(this,"argumentMappings",[]);B.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 B.util.equals(fo,n,r)}};_(fo,"runtime",B),_(fo,"typeName","wg.cosmo.node.v1.FieldMapping"),_(fo,"fields",B.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:nb,repeated:!0}]));var tb=fo,mo=class mo extends Le{constructor(n){super();_(this,"original","");_(this,"mapped","");B.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 B.util.equals(mo,n,r)}};_(mo,"runtime",B),_(mo,"typeName","wg.cosmo.node.v1.ArgumentMapping"),_(mo,"fields",B.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var nb=mo,No=class No extends Le{constructor(n){super();_(this,"type","");_(this,"values",[]);B.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 B.util.equals(No,n,r)}};_(No,"runtime",B),_(No,"typeName","wg.cosmo.node.v1.EnumMapping"),_(No,"fields",B.util.newFieldList(()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"values",kind:"message",T:ib,repeated:!0}]));var rb=No,To=class To extends Le{constructor(n){super();_(this,"original","");_(this,"mapped","");B.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 B.util.equals(To,n,r)}};_(To,"runtime",B),_(To,"typeName","wg.cosmo.node.v1.EnumValueMapping"),_(To,"fields",B.util.newFieldList(()=>[{no:1,name:"original",kind:"scalar",T:9},{no:2,name:"mapped",kind:"scalar",T:9}]));var ib=To,Eo=class Eo extends Le{constructor(n){super();_(this,"consumerName","");_(this,"streamName","");_(this,"consumerInactiveThreshold",0);B.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 B.util.equals(Eo,n,r)}};_(Eo,"runtime",B),_(Eo,"typeName","wg.cosmo.node.v1.NatsStreamConfiguration"),_(Eo,"fields",B.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 hf=Eo,ho=class ho extends Le{constructor(n){super();_(this,"engineEventConfiguration");_(this,"subjects",[]);_(this,"streamConfiguration");B.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 B.util.equals(ho,n,r)}};_(ho,"runtime",B),_(ho,"typeName","wg.cosmo.node.v1.NatsEventConfiguration"),_(ho,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:Vo},{no:2,name:"subjects",kind:"scalar",T:9,repeated:!0},{no:3,name:"stream_configuration",kind:"message",T:hf}]));var yf=ho,yo=class yo extends Le{constructor(n){super();_(this,"engineEventConfiguration");_(this,"topics",[]);B.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 B.util.equals(yo,n,r)}};_(yo,"runtime",B),_(yo,"typeName","wg.cosmo.node.v1.KafkaEventConfiguration"),_(yo,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:Vo},{no:2,name:"topics",kind:"scalar",T:9,repeated:!0}]));var If=yo,Io=class Io extends Le{constructor(n){super();_(this,"engineEventConfiguration");_(this,"channels",[]);B.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 B.util.equals(Io,n,r)}};_(Io,"runtime",B),_(Io,"typeName","wg.cosmo.node.v1.RedisEventConfiguration"),_(Io,"fields",B.util.newFieldList(()=>[{no:1,name:"engine_event_configuration",kind:"message",T:Vo},{no:2,name:"channels",kind:"scalar",T:9,repeated:!0}]));var gf=Io,go=class go extends Le{constructor(n){super();_(this,"providerId","");_(this,"type",qo.PUBLISH);_(this,"typeName","");_(this,"fieldName","");B.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 B.util.equals(go,n,r)}};_(go,"runtime",B),_(go,"typeName","wg.cosmo.node.v1.EngineEventConfiguration"),_(go,"fields",B.util.newFieldList(()=>[{no:1,name:"provider_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:B.getEnumType(qo)},{no:3,name:"type_name",kind:"scalar",T:9},{no:4,name:"field_name",kind:"scalar",T:9}]));var Vo=go,_o=class _o extends Le{constructor(n){super();_(this,"nats",[]);_(this,"kafka",[]);_(this,"redis",[]);B.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 B.util.equals(_o,n,r)}};_(_o,"runtime",B),_(_o,"typeName","wg.cosmo.node.v1.DataSourceCustomEvents"),_(_o,"fields",B.util.newFieldList(()=>[{no:1,name:"nats",kind:"message",T:yf,repeated:!0},{no:2,name:"kafka",kind:"message",T:If,repeated:!0},{no:3,name:"redis",kind:"message",T:gf,repeated:!0}]));var Bc=_o,vo=class vo extends Le{constructor(n){super();_(this,"data");B.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 B.util.equals(vo,n,r)}};_(vo,"runtime",B),_(vo,"typeName","wg.cosmo.node.v1.DataSourceCustom_Static"),_(vo,"fields",B.util.newFieldList(()=>[{no:1,name:"data",kind:"message",T:qr}]));var ab=vo,So=class So extends Le{constructor(n){super();_(this,"kind",Su.STATIC_CONFIGURATION_VARIABLE);_(this,"staticVariableContent","");_(this,"environmentVariableName","");_(this,"environmentVariableDefaultValue","");_(this,"placeholderVariableName","");B.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 B.util.equals(So,n,r)}};_(So,"runtime",B),_(So,"typeName","wg.cosmo.node.v1.ConfigurationVariable"),_(So,"fields",B.util.newFieldList(()=>[{no:1,name:"kind",kind:"enum",T:B.getEnumType(Su)},{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 qr=So,Oo=class Oo extends Le{constructor(n){super();_(this,"directiveName","");_(this,"renameTo","");B.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 B.util.equals(Oo,n,r)}};_(Oo,"runtime",B),_(Oo,"typeName","wg.cosmo.node.v1.DirectiveConfiguration"),_(Oo,"fields",B.util.newFieldList(()=>[{no:1,name:"directive_name",kind:"scalar",T:9},{no:2,name:"rename_to",kind:"scalar",T:9}]));var sb=Oo,Do=class Do extends Le{constructor(n){super();_(this,"name","");_(this,"value","");B.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 B.util.equals(Do,n,r)}};_(Do,"runtime",B),_(Do,"typeName","wg.cosmo.node.v1.URLQueryConfiguration"),_(Do,"fields",B.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]));var ob=Do,bo=class bo extends Le{constructor(n){super();_(this,"values",[]);B.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 B.util.equals(bo,n,r)}};_(bo,"runtime",B),_(bo,"typeName","wg.cosmo.node.v1.HTTPHeader"),_(bo,"fields",B.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:qr,repeated:!0}]));var ub=bo,Ao=class Ao extends Le{constructor(n){super();_(this,"key");_(this,"cert");_(this,"insecureSkipVerify",!1);B.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 B.util.equals(Ao,n,r)}};_(Ao,"runtime",B),_(Ao,"typeName","wg.cosmo.node.v1.MTLSConfiguration"),_(Ao,"fields",B.util.newFieldList(()=>[{no:1,name:"key",kind:"message",T:qr},{no:2,name:"cert",kind:"message",T:qr},{no:3,name:"insecureSkipVerify",kind:"scalar",T:8}]));var cb=Ao,Ro=class Ro extends Le{constructor(n){super();_(this,"enabled",!1);_(this,"url");_(this,"useSSE");_(this,"protocol");_(this,"websocketSubprotocol");B.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 B.util.equals(Ro,n,r)}};_(Ro,"runtime",B),_(Ro,"typeName","wg.cosmo.node.v1.GraphQLSubscriptionConfiguration"),_(Ro,"fields",B.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"url",kind:"message",T:qr},{no:3,name:"useSSE",kind:"scalar",T:8,opt:!0},{no:4,name:"protocol",kind:"enum",T:B.getEnumType(Fs),opt:!0},{no:5,name:"websocketSubprotocol",kind:"enum",T:B.getEnumType(ws),opt:!0}]));var lb=Ro,Po=class Po extends Le{constructor(n){super();_(this,"enabled",!1);_(this,"serviceSdl","");B.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 B.util.equals(Po,n,r)}};_(Po,"runtime",B),_(Po,"typeName","wg.cosmo.node.v1.GraphQLFederationConfiguration"),_(Po,"fields",B.util.newFieldList(()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"serviceSdl",kind:"scalar",T:9}]));var db=Po,Fo=class Fo extends Le{constructor(n){super();_(this,"key","");B.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 B.util.equals(Fo,n,r)}};_(Fo,"runtime",B),_(Fo,"typeName","wg.cosmo.node.v1.InternedString"),_(Fo,"fields",B.util.newFieldList(()=>[{no:1,name:"key",kind:"scalar",T:9}]));var _f=Fo,wo=class wo extends Le{constructor(n){super();_(this,"typeName","");_(this,"fieldName","");B.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 B.util.equals(wo,n,r)}};_(wo,"runtime",B),_(wo,"typeName","wg.cosmo.node.v1.SingleTypeField"),_(wo,"fields",B.util.newFieldList(()=>[{no:1,name:"type_name",kind:"scalar",T:9},{no:2,name:"field_name",kind:"scalar",T:9}]));var pb=wo,Lo=class Lo extends Le{constructor(n){super();_(this,"fieldPath",[]);_(this,"json","");B.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 B.util.equals(Lo,n,r)}};_(Lo,"runtime",B),_(Lo,"typeName","wg.cosmo.node.v1.SubscriptionFieldCondition"),_(Lo,"fields",B.util.newFieldList(()=>[{no:1,name:"field_path",kind:"scalar",T:9,repeated:!0},{no:2,name:"json",kind:"scalar",T:9}]));var vf=Lo,Hi=class Hi extends Le{constructor(n){super();_(this,"and",[]);_(this,"in");_(this,"not");_(this,"or",[]);B.util.initPartial(n,this)}static fromBinary(n,r){return new Hi().fromBinary(n,r)}static fromJson(n,r){return new Hi().fromJson(n,r)}static fromJsonString(n,r){return new Hi().fromJsonString(n,r)}static equals(n,r){return B.util.equals(Hi,n,r)}};_(Hi,"runtime",B),_(Hi,"typeName","wg.cosmo.node.v1.SubscriptionFilterCondition"),_(Hi,"fields",B.util.newFieldList(()=>[{no:1,name:"and",kind:"message",T:Hi,repeated:!0},{no:2,name:"in",kind:"message",T:vf,opt:!0},{no:3,name:"not",kind:"message",T:Hi,opt:!0},{no:4,name:"or",kind:"message",T:Hi,repeated:!0}]));var Ou=Hi,Co=class Co extends Le{constructor(n){super();_(this,"operations",[]);B.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 B.util.equals(Co,n,r)}};_(Co,"runtime",B),_(Co,"typeName","wg.cosmo.node.v1.CacheWarmerOperations"),_(Co,"fields",B.util.newFieldList(()=>[{no:1,name:"operations",kind:"message",T:fb,repeated:!0}]));var K1=Co,Bo=class Bo extends Le{constructor(n){super();_(this,"request");_(this,"client");B.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 B.util.equals(Bo,n,r)}};_(Bo,"runtime",B),_(Bo,"typeName","wg.cosmo.node.v1.Operation"),_(Bo,"fields",B.util.newFieldList(()=>[{no:1,name:"request",kind:"message",T:mb},{no:2,name:"client",kind:"message",T:Eb}]));var fb=Bo,Uo=class Uo extends Le{constructor(n){super();_(this,"operationName","");_(this,"query","");_(this,"extensions");B.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 B.util.equals(Uo,n,r)}};_(Uo,"runtime",B),_(Uo,"typeName","wg.cosmo.node.v1.OperationRequest"),_(Uo,"fields",B.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:Nb}]));var mb=Uo,ko=class ko extends Le{constructor(n){super();_(this,"persistedQuery");B.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 B.util.equals(ko,n,r)}};_(ko,"runtime",B),_(ko,"typeName","wg.cosmo.node.v1.Extension"),_(ko,"fields",B.util.newFieldList(()=>[{no:1,name:"persisted_query",kind:"message",T:Tb}]));var Nb=ko,Mo=class Mo extends Le{constructor(n){super();_(this,"sha256Hash","");_(this,"version",0);B.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 B.util.equals(Mo,n,r)}};_(Mo,"runtime",B),_(Mo,"typeName","wg.cosmo.node.v1.PersistedQuery"),_(Mo,"fields",B.util.newFieldList(()=>[{no:1,name:"sha256_hash",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:5}]));var Tb=Mo,xo=class xo extends Le{constructor(n){super();_(this,"name","");_(this,"version","");B.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 B.util.equals(xo,n,r)}};_(xo,"runtime",B),_(xo,"typeName","wg.cosmo.node.v1.ClientInfo"),_(xo,"fields",B.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9}]));var Eb=xo;m();T();N();function hb(e){return new Error(`Normalization failed to return a ${e}.`)}function G1(e){return new Error(`Invalid router compatibility version "${e}".`)}m();T();N();var ud=fs(JE(),1);function npe(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 mf({fieldName:a[1],typeName:a[0]}))}t.push(new Nf({fieldCoordinatesPath:r,fieldPath:n.fieldPath}))}return t}function yb(e,t,n){if(e)for(let r of e){let i=npe(r);t.push(new Fc(x(x({typeName:n,fieldName:r.fieldName,selectionSet:r.selectionSet},r.disableEntityResolver?{disableEntityResolver:!0}:{}),i?{conditions:i}:{})))}}function Ib(e){switch(e){case"publish":return qo.PUBLISH;case"request":return qo.REQUEST;case"subscribe":return qo.SUBSCRIBE}}function $1(e){var n;let t={rootNodes:[],childNodes:[],keys:[],provides:[],events:new Bc({nats:[],kafka:[],redis:[]}),requires:[],entityInterfaces:[],interfaceObjects:[]};for(let r of e.values()){let i=r.typeName,a=[...r.fieldNames],o=new ad({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 f=new sd({interfaceTypeName:i,concreteTypeNames:[...r.entityInterfaceConcreteTypeNames]});r.isInterfaceObject?t.interfaceObjects.push(f):t.entityInterfaces.push(f)}yb(r.keys,t.keys,i),yb(r.provides,t.provides,i),yb(r.requires,t.requires,i);let c=[],l=[],d=[];for(let f of(n=r.events)!=null?n:[])switch(f.providerType){case ud.PROVIDER_TYPE_KAFKA:{l.push(new If({engineEventConfiguration:new Vo({fieldName:f.fieldName,providerId:f.providerId,type:Ib(f.type),typeName:i}),topics:f.topics}));break}case ud.PROVIDER_TYPE_NATS:{c.push(new yf(x({engineEventConfiguration:new Vo({fieldName:f.fieldName,providerId:f.providerId,type:Ib(f.type),typeName:i}),subjects:f.subjects},f.streamConfiguration?{streamConfiguration:new hf({consumerInactiveThreshold:f.streamConfiguration.consumerInactiveThreshold,consumerName:f.streamConfiguration.consumerName,streamName:f.streamConfiguration.streamName})}:{})));break}case ud.PROVIDER_TYPE_REDIS:{d.push(new gf({engineEventConfiguration:new Vo({fieldName:f.fieldName,providerId:f.providerId,type:Ib(f.type),typeName:i}),channels:f.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 Q1(e){var n,r;let t=[];for(let i of e){let a=i.argumentNames.map(f=>new df({name:f,sourceType:wc.FIELD_ARGUMENT})),o=new ff({argumentsConfiguration:a,fieldName:i.fieldName,typeName:i.typeName}),c=((n=i.requiredScopes)==null?void 0:n.map(f=>new Cc({requiredAndScopes:f})))||[],l=((r=i.requiredScopesByOR)==null?void 0:r.map(f=>new Cc({requiredAndScopes:f})))||[],d=c.length>0;if((i.requiresAuthentication||d)&&(o.authorizationConfiguration=new pf({requiresAuthentication:i.requiresAuthentication||d,requiredOrScopes:c,requiredOrScopesByOr:l})),i.subscriptionFilterCondition){let f=new Ou;Ih(f,i.subscriptionFilterCondition),o.subscriptionFilterCondition=f}t.push(o)}return t}function Ih(e,t){if(t.and!==void 0){let n=[];for(let r of t.and){let i=new Ou;Ih(i,r),n.push(i)}e.and=n;return}if(t.in!==void 0){e.in=new vf({fieldPath:t.in.fieldPath,json:JSON.stringify(t.in.values)});return}if(t.not!==void 0){e.not=new Ou,Ih(e.not,t.not);return}if(t.or!==void 0){let n=[];for(let r of t.or){let i=new Ou;Ih(i,r),n.push(i)}e.or=n;return}throw new Error("Fatal: Incoming SubscriptionCondition object was malformed.")}var Uc;(function(e){e[e.Plugin=0]="Plugin",e[e.Standard=1]="Standard",e[e.GRPC=2]="GRPC"})(Uc||(Uc={}));var rpe=(e,t)=>{let n=stringHash(t);return e.stringStorage[n]=t,new _f({key:n})},ipe=e=>{switch(e){case"ws":return Fs.GRAPHQL_SUBSCRIPTION_PROTOCOL_WS;case"sse":return Fs.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE;case"sse_post":return Fs.GRAPHQL_SUBSCRIPTION_PROTOCOL_SSE_POST}},ape=e=>{switch(e){case"auto":return ws.GRAPHQL_WEBSOCKET_SUBPROTOCOL_AUTO;case"graphql-ws":return ws.GRAPHQL_WEBSOCKET_SUBPROTOCOL_WS;case"graphql-transport-ws":return ws.GRAPHQL_WEBSOCKET_SUBPROTOCOL_TRANSPORT_WS}},J1=function(e){if(!cd.ROUTER_COMPATIBILITY_VERSIONS.has(e.routerCompatibilityVersion))throw G1(e.routerCompatibilityVersion);let t=new id({defaultFlushInterval:BigInt(500),datasourceConfigurations:[],fieldConfigurations:[],graphqlSchema:"",stringStorage:{},typeConfigurations:[]});for(let n of e.subgraphs){if(!n.configurationDataByTypeName)throw hb("ConfigurationDataByTypeName");if(!n.schema)throw hb("GraphQLSchema");let r={enabled:!0},i=rpe(t,t1((0,Y1.lexicographicSortSchema)(n.schema))),{childNodes:a,entityInterfaces:o,events:c,interfaceObjects:l,keys:d,provides:f,requires:y,rootNodes:I}=$1(n.configurationDataByTypeName),v;switch(n.kind){case Uc.Standard:{r.enabled=!0,r.protocol=ipe(n.subscriptionProtocol||"ws"),r.websocketSubprotocol=ape(n.websocketSubprotocol||"auto"),r.url=new qr({kind:Su.STATIC_CONFIGURATION_VARIABLE,staticVariableContent:n.subscriptionUrl||n.url});break}case Uc.Plugin:{v=new od({mapping:n.mapping,protoSchema:n.protoSchema,plugin:new Ef({name:n.name,version:n.version,imageReference:n.imageReference})});break}case Uc.GRPC:{v=new od({mapping:n.mapping,protoSchema:n.protoSchema});break}}let F,k,K;if(c.kafka.length>0||c.nats.length>0||c.redis.length>0){F=vu.PUBSUB,K=new Bc({kafka:c.kafka,nats:c.nats,redis:c.redis});let se=de=>cd.ROOT_TYPE_NAMES.has(de.typeName),ie=0,Te=0;for(;ie({id:n.id,name:n.name,routingUrl:n.url})),compatibilityVersion:`${e.routerCompatibilityVersion}:${cd.COMPOSITION_VERSION}`})};m();T();N();var Mc=fs(Ae());function H1(e){let t;try{t=(0,Mc.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 spe(e){let t=(0,kc.federateSubgraphs)({subgraphs:e.map(H1),version:kc.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,Mc.print)(t.federatedGraphAST)}}function ope(e){let t=(0,kc.federateSubgraphs)({subgraphs:e.map(H1),version:kc.LATEST_ROUTER_COMPATIBILITY_VERSION});if(!t.success)throw new Error(`could not federate schema: ${t.errors.map(r=>r.message).join(", ")}`);return J1({federatedClientSDL:(0,Mc.printSchema)(t.federatedGraphClientSchema),federatedSDL:(0,Mc.printSchema)(t.federatedGraphSchema),fieldConfigurations:t.fieldConfigurations,routerCompatibilityVersion:kc.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:Uc.Standard,id:`${i}`,name:r.name,url:bD(r.url),sdl:r.schema,subscriptionUrl:bD((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 fm(upe);})(); /*! Bundled license information: @jspm/core/nodelibs/browser/buffer.js: diff --git a/composition/src/resolvability-graph/graph-nodes.ts b/composition/src/resolvability-graph/graph-nodes.ts index 98dccf63a4..06262cb87f 100644 --- a/composition/src/resolvability-graph/graph-nodes.ts +++ b/composition/src/resolvability-graph/graph-nodes.ts @@ -1,6 +1,6 @@ import { add, getEntriesNotInHashSet, getValueOrDefault } from '../utils/utils'; import { GraphFieldData } from '../utils/types'; -import { SubgraphName, TypeName } from './types/types'; +import { FieldName, NodeName, SubgraphName, TypeName } from './types/types'; export class Edge { edgeName: string; @@ -24,20 +24,20 @@ export type GraphNodeOptions = { }; export class GraphNode { - fieldDataByName = new Map(); + fieldDataByName = new Map(); headToTailEdges = new Map(); entityEdges = new Array(); - nodeName: `${SubgraphName}.${TypeName}`; + nodeName: NodeName; hasEntitySiblings = false; isAbstract: boolean; isInaccessible = false; isLeaf = false; isRootNode = false; satisfiedFieldSets = new Set(); - subgraphName: string; - typeName: string; + subgraphName: SubgraphName; + typeName: TypeName; - constructor(subgraphName: string, typeName: string, options?: GraphNodeOptions) { + constructor(subgraphName: SubgraphName, typeName: TypeName, options?: GraphNodeOptions) { this.isAbstract = !!options?.isAbstract; this.isLeaf = !!options?.isLeaf; this.nodeName = `${subgraphName}.${typeName}`; @@ -59,8 +59,8 @@ export class GraphNode { } } - getAllAccessibleEntityNodeNames(): Set { - const accessibleEntityNodeNames = new Set([this.nodeName]); + getAllAccessibleEntityNodeNames(): Set { + const accessibleEntityNodeNames = new Set([this.nodeName]); this.getAccessibleEntityNodeNames(this, accessibleEntityNodeNames); accessibleEntityNodeNames.delete(this.nodeName); return accessibleEntityNodeNames; @@ -77,18 +77,18 @@ export class GraphNode { } export class RootNode { - fieldDataByName = new Map(); + fieldDataByName = new Map(); headToSharedTailEdges = new Map>(); // It is used isAbstract = false; isRootNode = true; - typeName: string; + typeName: TypeName; - constructor(typeName: string) { + constructor(typeName: TypeName) { this.typeName = typeName; } - removeInaccessibleEdges(fieldDataByFieldName: Map) { + removeInaccessibleEdges(fieldDataByFieldName: Map) { for (const [fieldName, edges] of this.headToSharedTailEdges) { if (fieldDataByFieldName.has(fieldName)) { continue; @@ -101,16 +101,18 @@ export class RootNode { } export class EntityDataNode { - fieldSetsByTargetSubgraphName = new Map>(); - targetSubgraphNamesByFieldSet = new Map>(); + fieldSetsByTargetSubgraphName = new Map>(); + targetSubgraphNamesByFieldSet = new Map>(); typeName: string; constructor(typeName: string) { this.typeName = typeName; } - addTargetSubgraphByFieldSet(fieldSet: string, targetSubgraphName: string) { - getValueOrDefault(this.targetSubgraphNamesByFieldSet, fieldSet, () => new Set()).add(targetSubgraphName); + addTargetSubgraphByFieldSet(fieldSet: string, targetSubgraphName: SubgraphName) { + getValueOrDefault(this.targetSubgraphNamesByFieldSet, fieldSet, () => new Set()).add( + targetSubgraphName, + ); getValueOrDefault(this.fieldSetsByTargetSubgraphName, targetSubgraphName, () => new Set()).add(fieldSet); } } diff --git a/composition/src/resolvability-graph/graph.ts b/composition/src/resolvability-graph/graph.ts index 69177e4713..cd87f0d7e6 100644 --- a/composition/src/resolvability-graph/graph.ts +++ b/composition/src/resolvability-graph/graph.ts @@ -8,7 +8,7 @@ import { } from './utils/utils'; import { GraphFieldData, RootTypeName } from '../utils/types'; import { getFirstEntry, getOrThrowError, getValueOrDefault } from '../utils/utils'; -import { NodeName, SelectionPath, SubgraphName, TypeName, ValidationResult } from './types/types'; +import { FieldName, NodeName, SelectionPath, SubgraphName, TypeName, ValidationResult } from './types/types'; import { ConsolidateUnresolvablePathsParams, ValidateEntitiesParams, VisitEntityParams } from './types/params'; import { NodeResolutionData } from './node-resolution-data/node-resolution-data'; import { LITERAL_PERIOD, NOT_APPLICABLE, ROOT_TYPE_NAMES } from './constants/string-constants'; @@ -23,7 +23,7 @@ export class Graph { nodesByTypeName = new Map>(); resolvedRootFieldNodeNames = new Set(); rootNodeByTypeName = new Map(); - subgraphName = NOT_APPLICABLE; + subgraphName: SubgraphName = NOT_APPLICABLE; resDataByNodeName = new Map(); resDataByRelativePathByEntity = new Map>(); visitedEntitiesByOriginEntity = new Map>(); @@ -35,7 +35,7 @@ export class Graph { return getValueOrDefault(this.rootNodeByTypeName, typeName, () => new RootNode(typeName)); } - addOrUpdateNode(typeName: string, options?: GraphNodeOptions): GraphNode { + addOrUpdateNode(typeName: TypeName, options?: GraphNodeOptions): GraphNode { const nodeName: NodeName = `${this.subgraphName}.${typeName}`; const node = this.nodeByNodeName.get(nodeName); if (node) { @@ -68,7 +68,7 @@ export class Graph { return headToTailEdge; } - addEntityDataNode(typeName: string): EntityDataNode { + addEntityDataNode(typeName: TypeName): EntityDataNode { const node = this.entityDataNodeByTypeName.get(typeName); if (node) { return node; @@ -86,7 +86,7 @@ export class Graph { return (this.walkerIndex += 1); } - setNodeInaccessible(typeName: string) { + setNodeInaccessible(typeName: TypeName) { const nodes = this.nodesByTypeName.get(typeName); if (!nodes) { return; @@ -96,12 +96,12 @@ export class Graph { } } - initializeNode(typeName: string, fieldDataByFieldName: Map) { + initializeNode(typeName: TypeName, fieldDataByName: Map) { const entityDataNode = this.entityDataNodeByTypeName.get(typeName); if (ROOT_TYPE_NAMES.has(typeName)) { const rootNode = this.getRootNode(typeName as RootTypeName); - rootNode.removeInaccessibleEdges(fieldDataByFieldName); - rootNode.fieldDataByName = fieldDataByFieldName; + rootNode.removeInaccessibleEdges(fieldDataByName); + rootNode.fieldDataByName = fieldDataByName; return; } const nodes = this.nodesByTypeName.get(typeName); @@ -109,7 +109,7 @@ export class Graph { return; } for (const node of nodes) { - node.fieldDataByName = fieldDataByFieldName; + node.fieldDataByName = fieldDataByName; node.handleInaccessibleEdges(); node.isLeaf = false; if (!entityDataNode) { @@ -132,7 +132,7 @@ export class Graph { } } - setSubgraphName(subgraphName: string) { + setSubgraphName(subgraphName: SubgraphName) { this.subgraphName = subgraphName; } @@ -263,7 +263,7 @@ export class Graph { if (!unresolvableRootPath.startsWith(pathFromRoot)) { continue; } - const relativePath = unresolvableRootPath.split(pathFromRoot)[1]; + const relativePath = unresolvableRootPath.slice(pathFromRoot.length); const rootResData = getOrThrowError( walker.resDataByPath, unresolvableRootPath, @@ -325,15 +325,18 @@ export class Graph { visitedEntities: new Set(), }); } - if (subgraphNameByUnresolvablePath.size < 1) { - continue; - } + /* There might be root errors that rely on entity data propagation. + * Always propagate entity resolution data to the root data before moving on. + * */ this.consolidateUnresolvableRootWithEntityPaths({ pathFromRoot, resDataByRelativeOriginPath, subgraphNameByUnresolvablePath, walker, }); + if (subgraphNameByUnresolvablePath.size < 1) { + continue; + } this.consolidateUnresolvableEntityWithRootPaths({ pathFromRoot, resDataByRelativeOriginPath, @@ -369,6 +372,16 @@ export class Graph { success: false, }; } + if (walker.unresolvablePaths.size > 0) { + return { + errors: generateRootResolvabilityErrors({ + resDataByPath: walker.resDataByPath, + rootFieldData, + unresolvablePaths: walker.unresolvablePaths, + }), + success: false, + }; + } return { success: true, }; diff --git a/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts b/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts index 4f7bf46c86..d05560aa94 100644 --- a/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts +++ b/composition/src/resolvability-graph/node-resolution-data/node-resolution-data.ts @@ -1,11 +1,11 @@ import { GraphFieldData } from '../../utils/types'; import { unexpectedEdgeFatalError } from '../../errors/errors'; -import { FieldName, SubgraphName } from '../types/types'; +import { FieldName } from '../types/types'; import { NodeResolutionDataParams } from './types/params'; export class NodeResolutionData { #isResolved = false; - fieldDataByName: Map; + readonly fieldDataByName: ReadonlyMap; resolvedDescendantNames: Set; resolvedFieldNames: Set; typeName: string; @@ -41,16 +41,8 @@ export class NodeResolutionData { } copy(): NodeResolutionData { - const fieldDataByName = new Map(); - for (const [fieldName, data] of this.fieldDataByName) { - fieldDataByName.set(fieldName, { - isLeaf: data.isLeaf, - name: data.name, - namedTypeName: data.namedTypeName, - subgraphNames: new Set(data.subgraphNames), - }); - } return new NodeResolutionData({ + // Only used for reading, so just a shallow copy. fieldDataByName: this.fieldDataByName, isResolved: this.#isResolved, resolvedDescendantNames: this.resolvedDescendantNames, diff --git a/composition/src/resolvability-graph/node-resolution-data/types/params.ts b/composition/src/resolvability-graph/node-resolution-data/types/params.ts index 870c82d1e7..83f144a185 100644 --- a/composition/src/resolvability-graph/node-resolution-data/types/params.ts +++ b/composition/src/resolvability-graph/node-resolution-data/types/params.ts @@ -2,7 +2,7 @@ import { FieldName, TypeName } from '../../types/types'; import { GraphFieldData } from '../../../utils/types'; export type NodeResolutionDataParams = { - fieldDataByName: Map; + readonly fieldDataByName: ReadonlyMap; typeName: TypeName; isResolved?: boolean; resolvedDescendantNames?: Set; diff --git a/composition/src/resolvability-graph/utils/utils.ts b/composition/src/resolvability-graph/utils/utils.ts index a8e92c25c0..c9dfa73385 100644 --- a/composition/src/resolvability-graph/utils/utils.ts +++ b/composition/src/resolvability-graph/utils/utils.ts @@ -142,7 +142,7 @@ export function generateSharedResolvabilityErrorReasons({ reasons.push( `The type "${typeName}" is not a descendant of any other entity ancestors that can provide a shared route to access "${fieldName}".`, ); - if (typeName !== entityAncestors?.typeName) { + if (typeName !== entityAncestors.typeName) { reasons.push( `The type "${typeName}" has no accessible target entities (resolvable @key directives) in any other subgraph, so accessing other subgraphs is not possible.`, ); @@ -196,15 +196,15 @@ export function generateRootResolvabilityErrors({ const unresolvableFieldDatas = new Array(); for (const path of unresolvablePaths) { const nodeResolutionData = getOrThrowError(resDataByPath, path, 'resDataByPath'); - const fieldDataByFieldName = new Map(); + const fieldDataByName = new Map(); for (const [fieldName, fieldData] of nodeResolutionData.fieldDataByName) { if (nodeResolutionData.resolvedFieldNames.has(fieldName)) { continue; } - fieldDataByFieldName.set(fieldName, fieldData); + fieldDataByName.set(fieldName, fieldData); } const selectionSetSegments = generateSelectionSetSegments(path); - for (const [fieldName, fieldData] of fieldDataByFieldName) { + for (const [fieldName, fieldData] of fieldDataByName) { unresolvableFieldDatas.push({ fieldName, selectionSet: renderSelectionSet(selectionSetSegments, fieldData), @@ -236,16 +236,16 @@ export function generateEntityResolvabilityErrors({ for (const [path, subgraphName] of subgraphNameByUnresolvablePath) { const unresolvableFieldDatas = new Array(); const nodeResolutionData = getOrThrowError(resDataByPath, path, 'resDataByPath'); - const fieldDataByFieldName = new Map(); + const fieldDataByName = new Map(); for (const [fieldName, fieldData] of nodeResolutionData.fieldDataByName) { if (nodeResolutionData.resolvedFieldNames.has(fieldName)) { continue; } - fieldDataByFieldName.set(fieldName, fieldData); + fieldDataByName.set(fieldName, fieldData); } const fullPath = getUnresolvablePath(path, pathFromRoot); const selectionSetSegments = generateSelectionSetSegments(fullPath); - for (const [fieldName, fieldData] of fieldDataByFieldName) { + for (const [fieldName, fieldData] of fieldDataByName) { unresolvableFieldDatas.push({ fieldName, selectionSet: renderSelectionSet(selectionSetSegments, fieldData), @@ -278,16 +278,16 @@ export function generateSharedEntityResolvabilityErrors({ for (const path of subgraphNameByUnresolvablePath.keys()) { const unresolvableFieldDatas = new Array(); const nodeResolutionData = getOrThrowError(resDataByPath, path, 'resDataByPath'); - const fieldDataByFieldName = new Map(); + const fieldDataByName = new Map(); for (const [fieldName, fieldData] of nodeResolutionData.fieldDataByName) { if (nodeResolutionData.resolvedFieldNames.has(fieldName)) { continue; } - fieldDataByFieldName.set(fieldName, fieldData); + fieldDataByName.set(fieldName, fieldData); } const fullPath = getUnresolvablePath(path, pathFromRoot); const selectionSetSegments = generateSelectionSetSegments(fullPath); - for (const [fieldName, fieldData] of fieldDataByFieldName) { + for (const [fieldName, fieldData] of fieldDataByName) { unresolvableFieldDatas.push({ fieldName, selectionSet: renderSelectionSet(selectionSetSegments, fieldData), diff --git a/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts b/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts index e604b145be..140b1bd273 100644 --- a/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts +++ b/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts @@ -19,7 +19,7 @@ export class EntityWalker { resDataByRelativeOriginPath: Map; selectionPathByEntityNodeName = new Map(); // The subgraph name is so the propagated errors accurately reflect which subgraph cannot reach the node. - subgraphNameByUnresolvablePath: Map; + subgraphNameByUnresolvablePath: Map; visitedEntities: Set; relativeOriginPaths?: Set; @@ -120,13 +120,13 @@ export class EntityWalker { return { visited: true, areDescendantsResolved: true }; } } - let removeChildPaths: boolean | undefined = undefined; + let removeDescendantPaths: boolean | undefined = undefined; for (const [fieldName, edge] of node.headToTailEdges) { const { visited, areDescendantsResolved, isRevisitedNode } = this.visitEntityDescendantEdge({ edge, selectionPath, }); - removeChildPaths &&= isRevisitedNode; + removeDescendantPaths &&= isRevisitedNode; this.propagateVisitedField({ areDescendantsResolved, fieldName, @@ -137,7 +137,7 @@ export class EntityWalker { }); } if (data.isResolved()) { - this.removeUnresolvablePaths({ selectionPath }); + this.removeUnresolvablePaths({ removeDescendantPaths, selectionPath }); } else { this.addUnresolvablePaths({ selectionPath, subgraphName: node.subgraphName }); } @@ -176,8 +176,10 @@ export class EntityWalker { data.addResolvedFieldName(fieldName); dataByNodeName.addResolvedFieldName(fieldName); if (areDescendantsResolved) { + /* Cannot propagate`areDescendantsResolved` to `dataByNodeName` because the context + * of `data` is not isolated to the graph being walked only. + */ data.resolvedDescendantNames.add(fieldName); - dataByNodeName.addResolvedFieldName(fieldName); } if (this.relativeOriginPaths) { for (const originPath of this.relativeOriginPaths) { diff --git a/composition/src/resolvability-graph/walker/entity-walker/types/params.ts b/composition/src/resolvability-graph/walker/entity-walker/types/params.ts index 25fa58099d..b1b136e4dc 100644 --- a/composition/src/resolvability-graph/walker/entity-walker/types/params.ts +++ b/composition/src/resolvability-graph/walker/entity-walker/types/params.ts @@ -8,7 +8,7 @@ export type EntityWalkerParams = { resDataByNodeName: Map; resDataByRelativeOriginPath: Map; relativeOriginPaths?: Set; - subgraphNameByUnresolvablePath: Map; + subgraphNameByUnresolvablePath: Map; visitedEntities: Set; }; diff --git a/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts b/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts index 048a0e8fad..5f2d5802ef 100644 --- a/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts +++ b/composition/src/resolvability-graph/walker/root-field-walkers/root-field-walker.ts @@ -48,7 +48,7 @@ export class RootFieldWalker { if (this.resDataByNodeName.has(edge.node.nodeName)) { return { visited: true, areDescendantsResolved: true }; } - getValueOrDefault(this.pathsByEntityNodeName, edge.node.nodeName, () => new Set()).add( + getValueOrDefault(this.pathsByEntityNodeName, edge.node.nodeName, () => new Set()).add( `${selectionPath}.${edge.edgeName}`, ); return { visited: true, areDescendantsResolved: false }; @@ -203,13 +203,29 @@ export class RootFieldWalker { }; } getNodeResolutionData({ node, selectionPath }: GetNodeResolutionDataParams): NodeResolutionData { - const data = getValueOrDefault(this.resDataByNodeName, node.nodeName, () => new NodeResolutionData(node)); + const data = getValueOrDefault( + this.resDataByNodeName, + node.nodeName, + () => + new NodeResolutionData({ + fieldDataByName: node.fieldDataByName, + typeName: node.typeName, + }), + ); getValueOrDefault(this.resDataByPath, selectionPath, () => data.copy()); return data; } getSharedNodeResolutionData({ node, selectionPath }: GetNodeResolutionDataParams): NodeResolutionData { - const dataByNodeName = getValueOrDefault(this.resDataByNodeName, node.nodeName, () => new NodeResolutionData(node)); + const dataByNodeName = getValueOrDefault( + this.resDataByNodeName, + node.nodeName, + () => + new NodeResolutionData({ + fieldDataByName: node.fieldDataByName, + typeName: node.typeName, + }), + ); return getValueOrDefault(this.resDataByPath, selectionPath, () => dataByNodeName.copy()); } @@ -228,7 +244,11 @@ export class RootFieldWalker { const dataBySelectionPath = getValueOrDefault( this.resDataByPath, selectionPath, - () => new NodeResolutionData(node), + () => + new NodeResolutionData({ + fieldDataByName: node.fieldDataByName, + typeName: node.typeName, + }), ); dataBySelectionPath.addResolvedFieldName(fieldName); if (!areDescendantsResolved) { @@ -249,7 +269,15 @@ export class RootFieldWalker { return; } data.addResolvedFieldName(fieldName); - const dataByNodeName = getValueOrDefault(this.resDataByNodeName, node.nodeName, () => new NodeResolutionData(node)); + const dataByNodeName = getValueOrDefault( + this.resDataByNodeName, + node.nodeName, + () => + new NodeResolutionData({ + fieldDataByName: node.fieldDataByName, + typeName: node.typeName, + }), + ); dataByNodeName.addResolvedFieldName(fieldName); if (!areDescendantsResolved) { return; diff --git a/composition/src/v1/federation/federation-factory.ts b/composition/src/v1/federation/federation-factory.ts index dc76448467..45355463b7 100644 --- a/composition/src/v1/federation/federation-factory.ts +++ b/composition/src/v1/federation/federation-factory.ts @@ -552,7 +552,7 @@ export class FederationFactory { generateTagData() { for (const [path, tagNames] of this.tagNamesByCoords) { - const paths = path.split('.'); + const paths = path.split(PERIOD); if (paths.length < 1) { continue; } From 69c92f51d0d9cfef908b5c1a85d3601365c64895 Mon Sep 17 00:00:00 2001 From: Aenimus Date: Wed, 1 Oct 2025 03:33:14 +0100 Subject: [PATCH 5/5] chore: respond to PR feedback --- composition-go/index.global.js | 2 +- composition/src/resolvability-graph/graph-nodes.ts | 6 +++--- composition/src/resolvability-graph/types/types.ts | 2 +- .../walker/entity-walker/entity-walker.ts | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/composition-go/index.global.js b/composition-go/index.global.js index 5ba76ee5ce..1e5357ab23 100644 --- a/composition-go/index.global.js +++ b/composition-go/index.global.js @@ -451,7 +451,7 @@ Although "${e}" is declared "@external", it is part of a "@key" directive on an `+Ya.LITERAL_SPACE.repeat(t+2)+`} `}function uD({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(Ya.QUOTATION_JOIN)}".`];if(e){let c=!1;for(let[l,d]of e.fieldSetsByTargetSubgraphName)if(a.has(l)){c=!0;for(let f of d)o.push(`The entity ancestor "${e.typeName}" in subgraph "${e.subgraphName}" does not satisfy the key field set "${f}" 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 oV({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(Ya.QUOTATION_JOIN)}".`],c=!1;for(let[l,d]of e.fieldSetsByTargetSubgraphName){if(!a.has(l))continue;let f=e.subgraphNames.filter(I=>I!==l),y=f.length>1;c=!0;for(let I of d)o.push(`The entity ancestor "${e.typeName}" in subgraph${y?"s":""} "${f.join(Ya.QUOTATION_JOIN)}" do${y?"":"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(Ya.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 PE(e){let t=e.split(new RegExp("(?<=\\w)\\.")),n="",r="";for(let i=0;i{"use strict";m();T();N();Object.defineProperty(wE,"__esModule",{value:!0});wE.NodeResolutionData=void 0;var Mle=Mi(),_c,dD=class dD{constructor({fieldDataByName:t,isResolved:n=!1,resolvedDescendantNames:r,resolvedFieldNames:i,typeName:a}){eR(this,_c,!1);_(this,"fieldDataByName");_(this,"resolvedDescendantNames");_(this,"resolvedFieldNames");_(this,"typeName");By(this,_c,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,Mle.unexpectedEdgeFatalError)(this.typeName,[t]);this.resolvedFieldNames.add(t)}copy(){return new dD({fieldDataByName:this.fieldDataByName,isResolved:Cy(this,_c),resolvedDescendantNames:this.resolvedDescendantNames,resolvedFieldNames:this.resolvedFieldNames,typeName:this.typeName})}areDescendantsResolved(){return this.fieldDataByName.size===this.resolvedDescendantNames.size}isResolved(){if(Cy(this,_c))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 By(this,_c,!0),!0}};_c=new WeakMap;var lD=dD;wE.NodeResolutionData=lD});var cV=w(CE=>{"use strict";m();T();N();Object.defineProperty(CE,"__esModule",{value:!0});CE.EntityWalker=void 0;var xle=LE(),Ja=Sr(),pD=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,Ja.getValueOrDefault)(this.resDataByNodeName,n,()=>new xle.NodeResolutionData({fieldDataByName:t,typeName:r}));if(!this.relativeOriginPaths||this.relativeOriginPaths.size<1)return(0,Ja.getValueOrDefault)(this.resDataByRelativeOriginPath,i,()=>a.copy());let o;for(let c of this.relativeOriginPaths){let l=(0,Ja.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,Ja.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,Ja.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&&(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,Ja.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 f=(0,Ja.getValueOrDefault)(this.resDataByRelativeOriginPath,`${d}${a}`,()=>n.copy());f.addResolvedFieldName(r),t&&f.resolvedDescendantNames.add(r)}return}let l=(0,Ja.getValueOrDefault)(this.resDataByRelativeOriginPath,a,()=>n.copy());l.addResolvedFieldName(r),t&&l.resolvedDescendantNames.add(r)}addUnresolvablePaths({selectionPath:t,subgraphName:n}){if(!this.relativeOriginPaths){(0,Ja.getValueOrDefault)(this.subgraphNameByUnresolvablePath,t,()=>n);return}for(let r of this.relativeOriginPaths)(0,Ja.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)}}};CE.EntityWalker=pD});var lV=w(UE=>{"use strict";m();T();N();Object.defineProperty(UE,"__esModule",{value:!0});UE.RootFieldWalker=void 0;var Ha=Sr(),BE=LE(),fD=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,Ha.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.resDataByNodeName.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:((0,Ha.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,Ha.add)(t.visitedIndices,this.index)?(t.node.hasEntitySiblings&&(0,Ha.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,Ha.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new BE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,Ha.getValueOrDefault)(this.resDataByPath,n,()=>r.copy()),r}getSharedNodeResolutionData({node:t,selectionPath:n}){let r=(0,Ha.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new BE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,Ha.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,Ha.getValueOrDefault)(this.resDataByPath,a,()=>new BE.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,Ha.getValueOrDefault)(this.resDataByNodeName,i.nodeName,()=>new BE.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}}};UE.RootFieldWalker=fD});var ND=w(ME=>{"use strict";m();T();N();Object.defineProperty(ME,"__esModule",{value:!0});ME.Graph=void 0;var Wl=iD(),vc=cD(),Ti=Sr(),kE=aD(),qle=cV(),Vle=lV(),mD=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",kE.NOT_APPLICABLE);_(this,"resDataByNodeName",new Map);_(this,"resDataByRelativePathByEntity",new Map);_(this,"visitedEntitiesByOriginEntity",new Map);_(this,"walkerIndex",-1)}getRootNode(t){return(0,Ti.getValueOrDefault)(this.rootNodeByTypeName,t,()=>new Wl.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 Wl.GraphNode(this.subgraphName,t,n);return this.nodeByNodeName.set(r,a),(0,Ti.getValueOrDefault)(this.nodesByTypeName,t,()=>[]).push(a),a}addEdge(t,n,r,i=!1){if(t.isRootNode){let c=new Wl.Edge(this.getNextEdgeId(),n,r);return(0,Ti.getValueOrDefault)(t.headToSharedTailEdges,r,()=>[]).push(c),c}let a=t,o=new Wl.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 Wl.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 Wl.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 qle.EntityWalker({encounteredEntityNodeNames:t,index:this.getNextWalkerIndex(),relativeOriginPaths:r,resDataByNodeName:this.resDataByNodeName,resDataByRelativeOriginPath:i,subgraphNameByUnresolvablePath:a,visitedEntities:o}),f=c.getAllAccessibleEntityNodeNames();for(let y of l){if(y.nodeName!==c.nodeName&&!f.has(y.nodeName))continue;let{areDescendantsResolved:I}=d.visitEntityDescendantConcreteNode({node:y,selectionPath:""});if(I)return}for(let[y,I]of d.selectionPathByEntityNodeName)this.visitEntity({encounteredEntityNodeNames:t,entityNodeName:y,relativeOriginPaths:(0,vc.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 f=r[0].node.nodeName;if(this.resolvedRootFieldNodeNames.has(f))continue;this.resolvedRootFieldNodeNames.add(f)}let a=new Vle.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,Ti.getOrThrowError)(t.fieldDataByName,n,"fieldDataByName"),l=(0,vc.newRootFieldData)(t.typeName,n,c.subgraphNames);if(!o)return{errors:(0,vc.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,Ti.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,Ti.getOrThrowError)(n,a,"resDataByRelativeOriginPath"),c=`${t}${a}`,l=(0,Ti.getOrThrowError)(i.resDataByPath,c,"rootFieldWalker.resDataByPath");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,vc.generateRootResolvabilityErrors)({unresolvablePaths:n.unresolvablePaths,resDataByPath:n.resDataByPath,rootFieldData:t})),!(c.length<1))return{errors:c,success:!1}}return n.unresolvablePaths.size>0?{errors:(0,vc.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,Ti.getValueOrDefault)(this.resDataByRelativePathByEntity,i,()=>new Map);if(this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:i,resDataByRelativeOriginPath:c,subgraphNameByUnresolvablePath:o,visitedEntities:(0,Ti.getValueOrDefault)(this.visitedEntitiesByOriginEntity,i,()=>new Set)}),!(o.size<1))return{errors:this.getEntityResolvabilityErrors({entityNodeName:i,pathFromRoot:(r=(0,Ti.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,Ti.getOrThrowError)(this.resDataByRelativePathByEntity,t,"resDataByRelativePathByEntity"),o=t.split(kE.LITERAL_PERIOD)[1],{fieldSetsByTargetSubgraphName:c}=(0,Ti.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,vc.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 f=d.split(kE.LITERAL_PERIOD);o!=null||(o=f[1]),c.push(f[0])}let{fieldSetsByTargetSubgraphName:l}=(0,Ti.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,vc.generateSharedEntityResolvabilityErrors)({entityAncestors:{fieldSetsByTargetSubgraphName:l,subgraphNames:c,typeName:o},pathFromRoot:n,resDataByPath:i,rootFieldData:r,subgraphNameByUnresolvablePath:a})}};ME.Graph=mD});var TD=w(xE=>{"use strict";m();T();N();Object.defineProperty(xE,"__esModule",{value:!0});xE.newFieldSetConditionData=jle;xE.newConfigurationData=Kle;function jle({fieldCoordinatesPath:e,fieldPath:t}){return{fieldCoordinatesPath:e,fieldPath:t}}function Kle(e,t){return{fieldNames:new Set,isRootNode:e,typeName:t}}});var hD=w(Sc=>{"use strict";m();T();N();Object.defineProperty(Sc,"__esModule",{value:!0});Sc.NormalizationFactory=void 0;Sc.normalizeSubgraphFromString=Yle;Sc.normalizeSubgraph=pV;Sc.batchNormalize=Jle;var Z=Ae(),Dn=Hr(),ti=Hp(),qt=Ss(),ir=Jp(),le=Mi(),qE=jp(),Gle=Dv(),Ei=iE(),$le=JO(),Wa=zp(),dV=ZO(),za=Sp(),sn=Sl(),rr=du(),ED=ND(),VE=Rv(),W=vr(),Qle=gl(),je=Sr(),Xp=TD();function Yle(e,t=!0){let{error:n,documentNode:r}=(0,Dn.safeParse)(e,t);return n||!r?{errors:[(0,le.subgraphInvalidSyntaxError)(n)],success:!1,warnings:[]}:new Zp(new ED.Graph).normalize(r)}function pV(e,t,n){return new Zp(n||new ED.Graph,t).normalize(e)}var Zp=class{constructor(t,n){_(this,"argumentName","");_(this,"authorizationDataByParentTypeName",new Map);_(this,"concreteTypeNamesByAbstractTypeName",new Map);_(this,"conditionalFieldDataByCoords",new Map);_(this,"configurationDataByTypeName",new Map);_(this,"customDirectiveDefinitions",new Map);_(this,"definedDirectiveNames",new Set);_(this,"directiveDefinitionByDirectiveName",new Map);_(this,"directiveDefinitionDataByDirectiveName",(0,ti.initializeDirectiveDefinitionDatas)());_(this,"doesParentObjectRequireFetchReasons",!1);_(this,"edfsDirectiveReferences",new Set);_(this,"errors",[]);_(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,"isCurrentParentExtension",!1);_(this,"isParentObjectExternal",!1);_(this,"isParentObjectShareable",!1);_(this,"isSubgraphEventDrivenGraph",!1);_(this,"isSubgraphVersionTwo",!1);_(this,"keyFieldSetDatasByTypeName",new Map);_(this,"lastParentNodeKind",Z.Kind.NULL);_(this,"lastChildNodeKind",Z.Kind.NULL);_(this,"parentTypeNamesWithAuthDirectives",new Set);_(this,"keyFieldSetDataByTypeName",new Map);_(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",[]);for(let[r,i]of qt.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME)this.directiveDefinitionByDirectiveName.set(r,i);this.subgraphName=n||W.NOT_APPLICABLE,this.internalGraph=t,this.internalGraph.setSubgraphName(this.subgraphName),this.schemaData={directivesByDirectiveName:new Map,kind:Z.Kind.SCHEMA_DEFINITION,name:W.SCHEMA,operationTypes:new Map}}validateArguments(t,n){for(let r of t.argumentDataByName.values()){let i=(0,rr.getTypeNodeNamedTypeName)(r.type);if(qt.BASE_SCALARS.has(i)){r.namedTypeKind=Z.Kind.SCALAR_TYPE_DEFINITION;continue}let a=this.parentDefinitionDataByTypeName.get(i);if(a){if((0,sn.isInputNodeKind)(a.kind)){r.namedTypeKind=a.kind;continue}this.errors.push((0,le.invalidNamedTypeError)({data:r,namedTypeData:a,nodeType:`${(0,je.kindToNodeType)(n)} field argument`}))}}}isTypeNameRootType(t){return W.ROOT_TYPE_NAMES.has(t)||this.operationTypeNodeByTypeName.has(t)}isArgumentValueValid(t,n){if(n.kind===Z.Kind.NULL)return t.kind!==Z.Kind.NON_NULL_TYPE;switch(t.kind){case Z.Kind.LIST_TYPE:{if(n.kind!==Z.Kind.LIST)return this.isArgumentValueValid((0,rr.getNamedTypeNode)(t.type),n);for(let r of n.values)if(!this.isArgumentValueValid(t.type,r))return!1;return!0}case Z.Kind.NAMED_TYPE:switch(t.name.value){case W.BOOLEAN_SCALAR:return n.kind===Z.Kind.BOOLEAN;case W.FLOAT_SCALAR:return n.kind===Z.Kind.FLOAT||n.kind===Z.Kind.INT;case W.ID_SCALAR:return n.kind===Z.Kind.STRING||n.kind===Z.Kind.INT;case W.INT_SCALAR:return n.kind===Z.Kind.INT;case W.FIELD_SET_SCALAR:case W.SCOPE_SCALAR:case W.STRING_SCALAR:return n.kind===Z.Kind.STRING;case W.LINK_IMPORT:return!0;case W.LINK_PURPOSE:return n.kind!==Z.Kind.ENUM?!1:n.value===W.SECURITY||n.value===W.EXECUTION;case W.SUBSCRIPTION_FIELD_CONDITION:case W.SUBSCRIPTION_FILTER_CONDITION:return n.kind===Z.Kind.OBJECT;default:{let r=this.parentDefinitionDataByTypeName.get(t.name.value);if(!r)return!1;if(r.kind===Z.Kind.SCALAR_TYPE_DEFINITION)return!0;if(r.kind===Z.Kind.ENUM_TYPE_DEFINITION){if(n.kind!==Z.Kind.ENUM)return!1;let i=r.enumValueDataByValueName.get(n.value);return i?!i.directivesByDirectiveName.has(W.INACCESSIBLE):!1}return r.kind!==Z.Kind.INPUT_OBJECT_TYPE_DEFINITION?!1:n.kind===Z.Kind.OBJECT}}default:return this.isArgumentValueValid(t.type,n)}}addInheritedDirectivesToFieldData(t,n){return this.isParentObjectExternal&&!t.has(W.EXTERNAL)&&(t.set(W.EXTERNAL,[(0,je.generateSimpleDirective)(W.EXTERNAL)]),n.add(W.EXTERNAL)),this.doesParentObjectRequireFetchReasons&&!t.has(W.REQUIRE_FETCH_REASONS)&&(t.set(W.REQUIRE_FETCH_REASONS,[(0,je.generateSimpleDirective)(W.REQUIRE_FETCH_REASONS)]),n.add(W.REQUIRE_FETCH_REASONS)),this.isParentObjectShareable&&!t.has(W.SHAREABLE)&&(t.set(W.SHAREABLE,[(0,je.generateSimpleDirective)(W.SHAREABLE)]),n.add(W.SHAREABLE)),t}extractDirectives(t,n){if(!t.directives)return n;for(let r of t.directives){let i=r.name.value;i===W.SHAREABLE?(0,je.getValueOrDefault)(n,i,()=>[r]):(0,je.getValueOrDefault)(n,i,()=>[]).push(r),(0,ir.isNodeKindObject)(t.kind)&&(this.isParentObjectExternal||(this.isParentObjectExternal=i===W.EXTERNAL),this.doesParentObjectRequireFetchReasons||(this.doesParentObjectRequireFetchReasons=i===W.REQUIRE_FETCH_REASONS),this.isParentObjectShareable||(this.isParentObjectShareable=i===W.SHAREABLE))}return n}validateDirective({data:t,definitionData:n,directiveCoords:r,directiveNode:i,errorMessages:a,requiredArgumentNames:o}){let c=i.name.value,l=t.kind===Z.Kind.FIELD_DEFINITION?t.renamedParentTypeName||t.originalParentTypeName:t.name,d=c===W.AUTHENTICATED,f=(0,sn.isFieldData)(t),y=c===W.OVERRIDE,I=c===W.REQUIRES_SCOPES,v=c===W.SEMANTIC_NON_NULL;if(!i.arguments||i.arguments.length<1)return n.requiredArgumentNames.size>0&&a.push((0,le.undefinedRequiredArgumentsErrorMessage)(c,o,[])),d&&this.handleAuthenticatedDirective(t,l),v&&f&&((0,sn.isTypeRequired)(t.type)?a.push((0,le.semanticNonNullLevelsNonNullErrorMessage)({typeString:(0,Ei.printTypeNode)(t.type),value:"0"})):t.nullLevelsBySubgraphName.set(this.subgraphName,new Set([0]))),a;let F=new Set,k=new Set,K=new Set,J=[];for(let Te of i.arguments){let de=Te.name.value;if(F.has(de)){k.add(de);continue}F.add(de);let Re=n.argumentTypeNodeByArgumentName.get(de);if(!Re){K.add(de);continue}if(!this.isArgumentValueValid(Re.typeNode,Te.value)){a.push((0,le.invalidArgumentValueErrorMessage)((0,Z.print)(Te.value),`@${c}`,de,(0,Ei.printTypeNode)(Re.typeNode)));continue}if(y&&f){this.handleOverrideDirective({data:t,directiveCoords:r,errorMessages:a,targetSubgraphName:Te.value.value});continue}if(v&&f){this.handleSemanticNonNullDirective({data:t,directiveNode:i,errorMessages:a});continue}!I||de!==W.SCOPES||this.extractRequiredScopes({directiveCoords:r,orScopes:Te.value.values,requiredScopes:J})}k.size>0&&a.push((0,le.duplicateDirectiveArgumentDefinitionsErrorMessage)([...k])),K.size>0&&a.push((0,le.unexpectedDirectiveArgumentErrorMessage)(c,[...K]));let se=(0,je.getEntriesNotInHashSet)(o,F);if(se.length>0&&a.push((0,le.undefinedRequiredArgumentsErrorMessage)(c,o,se)),a.length>0||!I)return a;let ie=(0,je.getValueOrDefault)(this.authorizationDataByParentTypeName,l,()=>(0,ir.newAuthorizationData)(l));if(t.kind!==Z.Kind.FIELD_DEFINITION)this.parentTypeNamesWithAuthDirectives.add(l),ie.requiredScopes.push(...J);else{let Te=(0,je.getValueOrDefault)(ie.fieldAuthDataByFieldName,t.name,()=>(0,ir.newFieldAuthorizationData)(t.name));Te.inheritedData.requiredScopes.push(...J),Te.originalData.requiredScopes.push(...J)}return a}validateDirectives(t,n){let r=new Set;for(let[i,a]of t.directivesByDirectiveName){let o=this.directiveDefinitionDataByDirectiveName.get(i);if(!o){r.has(i)||(this.errors.push((0,le.undefinedDirectiveError)(i,n)),r.add(i));continue}let c=[],l=(0,Dn.nodeKindToDirectiveLocation)(t.kind);if(o.locations.has(l)||c.push((0,le.invalidDirectiveLocationErrorMessage)(i,l)),a.length>1&&!o.isRepeatable){let f=(0,je.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);f.has(i)||(f.add(i),c.push((0,le.invalidRepeatedDirectiveErrorMessage)(i)))}let d=[...o.requiredArgumentNames];for(let f=0;f0&&this.errors.push((0,le.invalidDirectiveError)(i,n,(0,je.numberToOrdinal)(f+1),y))}}switch(t.kind){case Z.Kind.ENUM_TYPE_DEFINITION:{for(let[i,a]of t.enumValueDataByValueName)this.validateDirectives(a,`${t.name}.${i}`);return}case Z.Kind.FIELD_DEFINITION:{for(let[i,a]of t.argumentDataByName)this.validateDirectives(a,`${t.originalParentTypeName}.${t.name}(${i}: ...)`);return}case Z.Kind.INPUT_OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.inputValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case Z.Kind.INTERFACE_TYPE_DEFINITION:case Z.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?za.ExtensionType.REAL:r||!n.has(W.EXTENDS)?za.ExtensionType.NONE:za.ExtensionType.EXTENDS}setParentDataExtensionType(t,n){switch(t.extensionType){case za.ExtensionType.EXTENDS:case za.ExtensionType.NONE:{if(n===za.ExtensionType.REAL)return;this.errors.push((0,le.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 W.PROPAGATE:{if(o.value.kind!=Z.Kind.BOOLEAN)return;r.propagate=o.value.value;break}case W.DESCRIPTION_OVERRIDE:{if(o.value.kind!=Z.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.directivesByDirectiveName.get(W.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,le.duplicateImplementedInterfaceError)((0,ir.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.directivesByDirectiveName.has(W.KEY)),n.isInaccessible||(n.isInaccessible=n.directivesByDirectiveName.has(W.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,le.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,{argumentDataByArgumentName: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(!W.EXECUTABLE_DIRECTIVE_LOCATIONS.has(o)&&!qE.TYPE_SYSTEM_DIRECTIVE_LOCATIONS.has(o)){n.push((0,le.invalidDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}if(r.has(o)){n.push((0,le.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={argumentTypeNodeByArgumentName: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,sn.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,le.duplicateDirectiveDefinitionArgumentErrorMessage)([...c])),o}addDirectiveDefinitionDataByNode(t){let n=t.name.value;if(this.definedDirectiveNames.has(n))return this.errors.push((0,le.duplicateDirectiveDefinitionError)(n)),!1;if(this.definedDirectiveNames.add(n),this.directiveDefinitionByDirectiveName.set(n,t),qt.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(n))return this.isSubgraphVersionTwo=!0,!1;if(qt.ALL_IN_BUILT_DIRECTIVE_NAMES.has(n))return!1;let r=[],{argumentTypeNodeByArgumentName:i,optionalArgumentNames:a,requiredArgumentNames:o}=this.extractArgumentData(t.arguments,r);return this.directiveDefinitionDataByDirectiveName.set(n,{argumentTypeNodeByArgumentName:i,isRepeatable:t.repeatable,locations:this.extractDirectiveLocations(t,r),name:n,node:t,optionalArgumentNames:a,requiredArgumentNames:o}),r.length>0&&this.errors.push((0,le.invalidDirectiveDefinitionError)(n,r)),!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:f}=(0,sn.isNodeExternalOrShareable)(n,!this.isSubgraphVersionTwo,i),y=(0,rr.getTypeNodeNamedTypeName)(n.type),I={argumentDataByName:r,configureDescriptionDataBySubgraphName:new Map,externalFieldDataBySubgraphName:new Map([[this.subgraphName,(0,sn.newExternalFieldData)(d)]]),federatedCoords:`${c}.${o}`,inheritedDirectiveNames:a,isInaccessible:i.has(W.INACCESSIBLE),isShareableBySubgraphName:new Map([[this.subgraphName,f]]),kind:Z.Kind.FIELD_DEFINITION,name:o,namedTypeKind:qt.BASE_SCALARS.has(y)?Z.Kind.SCALAR_TYPE_DEFINITION:Z.Kind.NULL,namedTypeName:y,node:(0,rr.getMutableFieldNode)(n,l,this.errors),nullLevelsBySubgraphName:new Map,originalParentTypeName:this.originalParentTypeName,persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),renamedParentTypeName:c,subgraphNames:new Set([this.subgraphName]),type:(0,rr.getMutableTypeNode)(n.type,l,this.errors),directivesByDirectiveName:i,description:(0,Dn.formatDescription)(n.description)};return qt.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,sn.areDefaultValuesCompatible)(i.type,i.defaultValue)&&this.errors.push((0,le.incompatibleInputValueDefaultValueTypeError)((r?W.ARGUMENT:W.INPUT_FIELD)+` "${l}"`,d,(0,Ei.printTypeNode)(i.type),(0,Z.print)(i.defaultValue)));let f=r?`${c}${t?`.${t}`:""}(${l}: ...)`:`${c}.${l}`,y=(0,rr.getTypeNodeNamedTypeName)(i.type),I={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:this.extractDirectives(i,new Map),federatedCoords:f,fieldName:t,includeDefaultValue:!!i.defaultValue,isArgument:r,kind:r?Z.Kind.ARGUMENT:Z.Kind.INPUT_VALUE_DEFINITION,name:l,namedTypeKind:qt.BASE_SCALARS.has(y)?Z.Kind.SCALAR_TYPE_DEFINITION:Z.Kind.NULL,namedTypeName:y,node:(0,rr.getMutableInputValueNode)(i,a,this.errors),originalCoords:d,originalParentTypeName:a,persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),renamedParentTypeName:c,requiredSubgraphNames:new Set((0,sn.isTypeRequired)(i.type)?[this.subgraphName]:[]),subgraphNames:new Set([this.subgraphName]),type:(0,rr.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.directivesByDirectiveName)||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!==Z.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,o);return}let l={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:o,fieldDataByName:new Map,implementedInterfaceTypeNames:this.extractImplementedInterfaceTypeNames(t,new Set),isEntity:a.has(W.KEY),isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.INTERFACE_TYPE_DEFINITION,name:r,node:(0,rr.getMutableInterfaceNode)(t.name),persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),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 Z.OperationTypeNode.MUTATION:return W.MUTATION;case Z.OperationTypeNode.SUBSCRIPTION:return W.SUBSCRIPTION;default:return W.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 f;let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(f=i==null?void 0:i.directivesByDirectiveName)!=null?f:new Map),o=this.isTypeNameRootType(r),c=this.getNodeExtensionType(n,a,o);if(this.addInterfaceObjectFieldsByNode(t),i){if(i.kind!==Z.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,c),a.has(W.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(i.implementedInterfaceTypeNames,r);return}let l=this.extractImplementedInterfaceTypeNames(t,new Set);a.has(W.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(l,r);let d={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:c,fieldDataByName:new Map,implementedInterfaceTypeNames:l,isEntity:a.has(W.KEY),isInaccessible:a.has(W.INACCESSIBLE),isRootType:o,kind:Z.Kind.OBJECT_TYPE_DEFINITION,name:r,node:(0,rr.getMutableObjectNode)(t.name),persistedDirectivesData:(0,sn.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.ENUM_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(W.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,directivesByDirectiveName:a,extensionType:o,enumValueDataByValueName:new Map,isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.ENUM_TYPE_DEFINITION,name:r,node:(0,rr.getMutableEnumNode)(t.name),persistedDirectivesData:(0,sn.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.INPUT_OBJECT_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(W.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={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:o,inputValueDataByName:new Map,isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:r,node:(0,rr.getMutableInputObjectNode)(t.name),persistedDirectivesData:(0,sn.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)}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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.SCALAR_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.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,directivesByDirectiveName:a,extensionType:o,kind:Z.Kind.SCALAR_TYPE_DEFINITION,name:r,node:(0,rr.getMutableScalarNode)(t.name),persistedDirectivesData:(0,sn.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,le.duplicateUnionMemberDefinitionError)(r,a));continue}(0,je.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(a),qt.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(this.addConcreteTypeNamesForUnion(t),i){if(i.kind!==Z.Kind.UNION_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.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,directivesByDirectiveName:a,extensionType:o,kind:Z.Kind.UNION_TYPE_DEFINITION,memberByMemberTypeName:this.extractUnionMembers(t,new Map),name:r,node:(0,rr.getMutableUnionNode)(t.name),persistedDirectivesData:(0,sn.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,le.expectedEntityError)(r));return}let i=0;for(let o of t.directives){if(o.name.value!==W.KEY||(i+=1,!o.arguments||o.arguments.length<1))continue;let c,l=!1;for(let v of o.arguments){if(v.name.value===W.RESOLVABLE){v.value.kind===Z.Kind.BOOLEAN&&!v.value.value&&(l=!0);continue}if(v.name.value!==W.FIELDS){c=void 0;break}if(v.value.kind!==Z.Kind.STRING){c=void 0;break}c=v.value.value}if(c===void 0)continue;let{error:d,documentNode:f}=(0,Dn.safeParse)("{"+c+"}");if(d||!f){this.errors.push((0,le.invalidDirectiveError)(W.KEY,r,(0,je.numberToOrdinal)(i),[(0,le.unparsableFieldSetErrorMessage)(c,d)]));continue}let y=(0,ti.getNormalizedFieldSet)(f),I=n.get(y);I?I.isUnresolvable||(I.isUnresolvable=l):n.set(y,{documentNode:f,isUnresolvable:l,normalizedFieldSet:y,rawFieldSet:c})}}getFieldSetParent(t,n,r,i){if(!t)return{fieldSetParentData:n};let a=(0,je.getOrThrowError)(n.fieldDataByName,r,`${i}.fieldDataByFieldName`),o=(0,rr.getTypeNodeNamedTypeName)(a.node.type),c=this.parentDefinitionDataByTypeName.get(o);return c?c.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION&&c.kind!==Z.Kind.OBJECT_TYPE_DEFINITION?{errorString:(0,le.incompatibleTypeWithProvidesErrorMessage)(`${i}.${r}`,o)}:{fieldSetParentData:c}:{errorString:(0,le.unknownNamedTypeErrorMessage)(`${i}.${r}`,o)}}validateConditionalFieldSet(t,n,r,i,a){let{error:o,documentNode:c}=(0,Dn.safeParse)("{"+n+"}");if(o||!c)return{errorMessages:[(0,le.unparsableFieldSetErrorMessage)(n,o)]};let l=this,d=[t],f=(0,ti.getConditionalFieldSetDirectiveName)(i),y=[],I=`${a}.${r}`,v=(0,ti.getInitialFieldCoordsPath)(i,I),F=[r],k=new Set,K=[],J=-1,se=!0,ie=r,Te=!1;return(0,Z.visit)(c,{Argument:{enter(){return!1}},Field:{enter(de){let Re=d[J],xe=Re.name;if(Re.kind===Z.Kind.UNION_TYPE_DEFINITION)return K.push((0,le.invalidSelectionOnUnionErrorMessage)(n,v,xe)),Z.BREAK;let tt=de.name.value,ee=`${xe}.${tt}`;if(l.unvalidatedExternalFieldCoords.delete(ee),se)return K.push((0,le.invalidSelectionSetErrorMessage)(n,v,xe,(0,je.kindToNodeType)(Re.kind))),Z.BREAK;v.push(ee),F.push(tt),ie=tt;let Se=Re.fieldDataByName.get(tt);if(!Se)return K.push((0,le.undefinedFieldInFieldSetErrorMessage)(n,xe,tt)),Z.BREAK;if(y[J].has(tt))return K.push((0,le.duplicateFieldInFieldSetErrorMessage)(n,ee)),Z.BREAK;y[J].add(tt);let{isDefinedExternal:_t,isUnconditionallyProvided:en}=(0,je.getOrThrowError)(Se.externalFieldDataBySubgraphName,l.subgraphName,`${ee}.externalFieldDataBySubgraphName`),tn=_t&&!en;en||(Te=!0);let bn=(0,rr.getTypeNodeNamedTypeName)(Se.node.type),Qt=l.parentDefinitionDataByTypeName.get(bn);if(qt.BASE_SCALARS.has(bn)||(Qt==null?void 0:Qt.kind)===Z.Kind.SCALAR_TYPE_DEFINITION||(Qt==null?void 0:Qt.kind)===Z.Kind.ENUM_TYPE_DEFINITION){if(k.size<1&&!_t){if(l.isSubgraphVersionTwo){l.errors.push((0,le.nonExternalConditionalFieldError)(I,l.subgraphName,ee,n,f));return}l.warnings.push((0,Wa.nonExternalConditionalFieldWarning)(I,l.subgraphName,ee,n,f));return}if(k.size<1&&en){l.isSubgraphVersionTwo?K.push((0,le.fieldAlreadyProvidedErrorMessage)(ee,l.subgraphName,f)):l.warnings.push((0,Wa.fieldAlreadyProvidedWarning)(ee,f,I,l.subgraphName));return}if(!tn&&!i)return;let mn=(0,je.getValueOrDefault)(l.conditionalFieldDataByCoords,ee,sn.newConditionalFieldData),Pr=(0,Xp.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...F]});i?mn.providedBy.push(Pr):mn.requiredBy.push(Pr);return}if(!Qt)return K.push((0,le.unknownTypeInFieldSetErrorMessage)(n,ee,bn)),Z.BREAK;if(_t&&(i&&(0,je.getValueOrDefault)(l.conditionalFieldDataByCoords,ee,sn.newConditionalFieldData).providedBy.push((0,Xp.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...F]})),k.add(ee)),Qt.kind===Z.Kind.OBJECT_TYPE_DEFINITION||Qt.kind===Z.Kind.INTERFACE_TYPE_DEFINITION||Qt.kind===Z.Kind.UNION_TYPE_DEFINITION){se=!0,d.push(Qt);return}},leave(){k.delete(v.pop()||""),F.pop()}},InlineFragment:{enter(de){let Re=d[J],xe=Re.name,tt=v.length<1?t.name:v[v.length-1];if(!de.typeCondition)return K.push((0,le.inlineFragmentWithoutTypeConditionErrorMessage)(n,tt)),Z.BREAK;let ee=de.typeCondition.name.value;if(ee===xe){d.push(Re),se=!0;return}if(!(0,Dn.isKindAbstract)(Re.kind))return K.push((0,le.invalidInlineFragmentTypeErrorMessage)(n,v,ee,xe)),Z.BREAK;let Se=l.parentDefinitionDataByTypeName.get(ee);if(!Se)return K.push((0,le.unknownInlineFragmentTypeConditionErrorMessage)(n,v,xe,ee)),Z.BREAK;switch(se=!0,Se.kind){case Z.Kind.INTERFACE_TYPE_DEFINITION:{if(!Se.implementedInterfaceTypeNames.has(xe))break;d.push(Se);return}case Z.Kind.OBJECT_TYPE_DEFINITION:{let _t=l.concreteTypeNamesByAbstractTypeName.get(xe);if(!_t||!_t.has(ee))break;d.push(Se);return}case Z.Kind.UNION_TYPE_DEFINITION:{d.push(Se);return}default:return K.push((0,le.invalidInlineFragmentTypeConditionTypeErrorMessage)(n,v,xe,ee,(0,je.kindToNodeType)(Se.kind))),Z.BREAK}return K.push((0,le.invalidInlineFragmentTypeConditionErrorMessage)(n,v,ee,(0,je.kindToNodeType)(Re.kind),xe)),Z.BREAK}},SelectionSet:{enter(){if(!se){let de=d[J];if(de.kind===Z.Kind.UNION_TYPE_DEFINITION)return K.push((0,le.unparsableFieldSetSelectionErrorMessage)(n,ie)),Z.BREAK;let Re=de.fieldDataByName.get(ie);if(!Re)return K.push((0,le.undefinedFieldInFieldSetErrorMessage)(n,de.name,ie)),Z.BREAK;let xe=(0,rr.getTypeNodeNamedTypeName)(Re.node.type),tt=l.parentDefinitionDataByTypeName.get(xe),ee=tt?tt.kind:Z.Kind.SCALAR_TYPE_DEFINITION;return K.push((0,le.invalidSelectionSetDefinitionErrorMessage)(n,v,xe,(0,je.kindToNodeType)(ee))),Z.BREAK}if(J+=1,se=!1,J<0||J>=d.length)return K.push((0,le.unparsableFieldSetSelectionErrorMessage)(n,ie)),Z.BREAK;y.push(new Set)},leave(){if(se){let de=d[J+1];K.push((0,le.invalidSelectionSetErrorMessage)(n,v,de.name,(0,je.kindToNodeType)(de.kind))),se=!1}J-=1,d.pop(),y.pop()}}}),K.length>0||!Te?{errorMessages:K}:{configuration:{fieldName:r,selectionSet:(0,ti.getNormalizedFieldSet)(c)},errorMessages:K}}validateProvidesOrRequires(t,n,r){let i=[],a=[],o=(0,sn.getParentTypeName)(t);for(let[c,l]of n){let{fieldSetParentData:d,errorString:f}=this.getFieldSetParent(r,t,c,o),y=`${o}.${c}`;if(f){i.push(f);continue}if(!d)continue;let{errorMessages:I,configuration:v}=this.validateConditionalFieldSet(d,l,c,r,o);if(I.length>0){i.push(` On field "${y}": +`+r;return{outputEnd:r,outputStart:n,pathNodes:t}}function FE({outputEnd:e,outputStart:t,pathNodes:n},r){return t+Ya.LITERAL_SPACE.repeat(n.length+1)+Lle(r,n.length)+e}function uV(e,t){return t?e?`${t}${e}`:t:e}function Cle({resDataByPath:e,rootFieldData:t,unresolvablePaths:n}){let r=new Array;for(let a of n){let o=(0,oD.getOrThrowError)(e,a,"resDataByPath"),c=new Map;for(let[d,f]of o.fieldDataByName)o.resolvedFieldNames.has(d)||c.set(d,f);let l=PE(a);for(let[d,f]of c)r.push({fieldName:d,selectionSet:FE(l,f),subgraphNames:f.subgraphNames,typeName:o.typeName})}let i=new Array;for(let a of r)i.push((0,sD.unresolvablePathError)(a,uD({rootFieldData:t,unresolvableFieldData:a})));return i}function Ble({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,oD.getOrThrowError)(t,o,"resDataByPath"),f=new Map;for(let[v,F]of d.fieldDataByName)d.resolvedFieldNames.has(v)||f.set(v,F);let y=uV(o,n),I=PE(y);for(let[v,F]of f)l.push({fieldName:v,selectionSet:FE(I,F),subgraphNames:F.subgraphNames,typeName:d.typeName});e.subgraphName=c;for(let v of l)a.push((0,sD.unresolvablePathError)(v,uD({rootFieldData:r,unresolvableFieldData:v,entityAncestorData:e})))}return a}function Ule({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,oD.getOrThrowError)(t,o,"resDataByPath"),d=new Map;for(let[I,v]of l.fieldDataByName)l.resolvedFieldNames.has(I)||d.set(I,v);let f=uV(o,n),y=PE(f);for(let[I,v]of d)c.push({fieldName:I,selectionSet:FE(y,v),subgraphNames:v.subgraphNames,typeName:l.typeName});for(let I of c)a.push((0,sD.unresolvablePathError)(I,oV({rootFieldData:r,unresolvableFieldData:I,entityAncestors:e})))}return a}function kle({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 LE=w(wE=>{"use strict";m();T();N();Object.defineProperty(wE,"__esModule",{value:!0});wE.NodeResolutionData=void 0;var Mle=Mi(),_c,dD=class dD{constructor({fieldDataByName:t,isResolved:n=!1,resolvedDescendantNames:r,resolvedFieldNames:i,typeName:a}){eR(this,_c,!1);_(this,"fieldDataByName");_(this,"resolvedDescendantNames");_(this,"resolvedFieldNames");_(this,"typeName");By(this,_c,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,Mle.unexpectedEdgeFatalError)(this.typeName,[t]);this.resolvedFieldNames.add(t)}copy(){return new dD({fieldDataByName:this.fieldDataByName,isResolved:Cy(this,_c),resolvedDescendantNames:this.resolvedDescendantNames,resolvedFieldNames:this.resolvedFieldNames,typeName:this.typeName})}areDescendantsResolved(){return this.fieldDataByName.size===this.resolvedDescendantNames.size}isResolved(){if(Cy(this,_c))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 By(this,_c,!0),!0}};_c=new WeakMap;var lD=dD;wE.NodeResolutionData=lD});var cV=w(CE=>{"use strict";m();T();N();Object.defineProperty(CE,"__esModule",{value:!0});CE.EntityWalker=void 0;var xle=LE(),Ja=Sr(),pD=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,Ja.getValueOrDefault)(this.resDataByNodeName,n,()=>new xle.NodeResolutionData({fieldDataByName:t,typeName:r}));if(!this.relativeOriginPaths||this.relativeOriginPaths.size<1)return(0,Ja.getValueOrDefault)(this.resDataByRelativeOriginPath,i,()=>a.copy());let o;for(let c of this.relativeOriginPaths){let l=(0,Ja.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,Ja.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,Ja.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,Ja.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 f=(0,Ja.getValueOrDefault)(this.resDataByRelativeOriginPath,`${d}${a}`,()=>n.copy());f.addResolvedFieldName(r),t&&f.resolvedDescendantNames.add(r)}return}let l=(0,Ja.getValueOrDefault)(this.resDataByRelativeOriginPath,a,()=>n.copy());l.addResolvedFieldName(r),t&&l.resolvedDescendantNames.add(r)}addUnresolvablePaths({selectionPath:t,subgraphName:n}){if(!this.relativeOriginPaths){(0,Ja.getValueOrDefault)(this.subgraphNameByUnresolvablePath,t,()=>n);return}for(let r of this.relativeOriginPaths)(0,Ja.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)}}};CE.EntityWalker=pD});var lV=w(UE=>{"use strict";m();T();N();Object.defineProperty(UE,"__esModule",{value:!0});UE.RootFieldWalker=void 0;var Ha=Sr(),BE=LE(),fD=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,Ha.add)(t.visitedIndices,this.index)?t.node.hasEntitySiblings?this.resDataByNodeName.has(t.node.nodeName)?{visited:!0,areDescendantsResolved:!0}:((0,Ha.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,Ha.add)(t.visitedIndices,this.index)?(t.node.hasEntitySiblings&&(0,Ha.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,Ha.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new BE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,Ha.getValueOrDefault)(this.resDataByPath,n,()=>r.copy()),r}getSharedNodeResolutionData({node:t,selectionPath:n}){let r=(0,Ha.getValueOrDefault)(this.resDataByNodeName,t.nodeName,()=>new BE.NodeResolutionData({fieldDataByName:t.fieldDataByName,typeName:t.typeName}));return(0,Ha.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,Ha.getValueOrDefault)(this.resDataByPath,a,()=>new BE.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,Ha.getValueOrDefault)(this.resDataByNodeName,i.nodeName,()=>new BE.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}}};UE.RootFieldWalker=fD});var ND=w(ME=>{"use strict";m();T();N();Object.defineProperty(ME,"__esModule",{value:!0});ME.Graph=void 0;var Wl=iD(),vc=cD(),Ti=Sr(),kE=aD(),qle=cV(),Vle=lV(),mD=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",kE.NOT_APPLICABLE);_(this,"resDataByNodeName",new Map);_(this,"resDataByRelativePathByEntity",new Map);_(this,"visitedEntitiesByOriginEntity",new Map);_(this,"walkerIndex",-1)}getRootNode(t){return(0,Ti.getValueOrDefault)(this.rootNodeByTypeName,t,()=>new Wl.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 Wl.GraphNode(this.subgraphName,t,n);return this.nodeByNodeName.set(r,a),(0,Ti.getValueOrDefault)(this.nodesByTypeName,t,()=>[]).push(a),a}addEdge(t,n,r,i=!1){if(t.isRootNode){let c=new Wl.Edge(this.getNextEdgeId(),n,r);return(0,Ti.getValueOrDefault)(t.headToSharedTailEdges,r,()=>[]).push(c),c}let a=t,o=new Wl.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 Wl.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 Wl.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 qle.EntityWalker({encounteredEntityNodeNames:t,index:this.getNextWalkerIndex(),relativeOriginPaths:r,resDataByNodeName:this.resDataByNodeName,resDataByRelativeOriginPath:i,subgraphNameByUnresolvablePath:a,visitedEntities:o}),f=c.getAllAccessibleEntityNodeNames();for(let y of l){if(y.nodeName!==c.nodeName&&!f.has(y.nodeName))continue;let{areDescendantsResolved:I}=d.visitEntityDescendantConcreteNode({node:y,selectionPath:""});if(I)return}for(let[y,I]of d.selectionPathByEntityNodeName)this.visitEntity({encounteredEntityNodeNames:t,entityNodeName:y,relativeOriginPaths:(0,vc.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 f=r[0].node.nodeName;if(this.resolvedRootFieldNodeNames.has(f))continue;this.resolvedRootFieldNodeNames.add(f)}let a=new Vle.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,Ti.getOrThrowError)(t.fieldDataByName,n,"fieldDataByName"),l=(0,vc.newRootFieldData)(t.typeName,n,c.subgraphNames);if(!o)return{errors:(0,vc.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,Ti.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,Ti.getOrThrowError)(n,a,"resDataByRelativeOriginPath"),c=`${t}${a}`,l=(0,Ti.getOrThrowError)(i.resDataByPath,c,"rootFieldWalker.resDataByPath");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,vc.generateRootResolvabilityErrors)({unresolvablePaths:n.unresolvablePaths,resDataByPath:n.resDataByPath,rootFieldData:t})),!(c.length<1))return{errors:c,success:!1}}return n.unresolvablePaths.size>0?{errors:(0,vc.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,Ti.getValueOrDefault)(this.resDataByRelativePathByEntity,i,()=>new Map);if(this.visitEntity({encounteredEntityNodeNames:new Set,entityNodeName:i,resDataByRelativeOriginPath:c,subgraphNameByUnresolvablePath:o,visitedEntities:(0,Ti.getValueOrDefault)(this.visitedEntitiesByOriginEntity,i,()=>new Set)}),!(o.size<1))return{errors:this.getEntityResolvabilityErrors({entityNodeName:i,pathFromRoot:(r=(0,Ti.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,Ti.getOrThrowError)(this.resDataByRelativePathByEntity,t,"resDataByRelativePathByEntity"),o=t.split(kE.LITERAL_PERIOD)[1],{fieldSetsByTargetSubgraphName:c}=(0,Ti.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,vc.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 f=d.split(kE.LITERAL_PERIOD);o!=null||(o=f[1]),c.push(f[0])}let{fieldSetsByTargetSubgraphName:l}=(0,Ti.getOrThrowError)(this.entityDataNodeByTypeName,o,"entityDataNodeByTypeName");return(0,vc.generateSharedEntityResolvabilityErrors)({entityAncestors:{fieldSetsByTargetSubgraphName:l,subgraphNames:c,typeName:o},pathFromRoot:n,resDataByPath:i,rootFieldData:r,subgraphNameByUnresolvablePath:a})}};ME.Graph=mD});var TD=w(xE=>{"use strict";m();T();N();Object.defineProperty(xE,"__esModule",{value:!0});xE.newFieldSetConditionData=jle;xE.newConfigurationData=Kle;function jle({fieldCoordinatesPath:e,fieldPath:t}){return{fieldCoordinatesPath:e,fieldPath:t}}function Kle(e,t){return{fieldNames:new Set,isRootNode:e,typeName:t}}});var hD=w(Sc=>{"use strict";m();T();N();Object.defineProperty(Sc,"__esModule",{value:!0});Sc.NormalizationFactory=void 0;Sc.normalizeSubgraphFromString=Yle;Sc.normalizeSubgraph=pV;Sc.batchNormalize=Jle;var Z=Ae(),Dn=Hr(),ti=Hp(),qt=Ss(),ir=Jp(),le=Mi(),qE=jp(),Gle=Dv(),Ei=iE(),$le=JO(),Wa=zp(),dV=ZO(),za=Sp(),sn=Sl(),rr=du(),ED=ND(),VE=Rv(),W=vr(),Qle=gl(),je=Sr(),Xp=TD();function Yle(e,t=!0){let{error:n,documentNode:r}=(0,Dn.safeParse)(e,t);return n||!r?{errors:[(0,le.subgraphInvalidSyntaxError)(n)],success:!1,warnings:[]}:new Zp(new ED.Graph).normalize(r)}function pV(e,t,n){return new Zp(n||new ED.Graph,t).normalize(e)}var Zp=class{constructor(t,n){_(this,"argumentName","");_(this,"authorizationDataByParentTypeName",new Map);_(this,"concreteTypeNamesByAbstractTypeName",new Map);_(this,"conditionalFieldDataByCoords",new Map);_(this,"configurationDataByTypeName",new Map);_(this,"customDirectiveDefinitions",new Map);_(this,"definedDirectiveNames",new Set);_(this,"directiveDefinitionByDirectiveName",new Map);_(this,"directiveDefinitionDataByDirectiveName",(0,ti.initializeDirectiveDefinitionDatas)());_(this,"doesParentObjectRequireFetchReasons",!1);_(this,"edfsDirectiveReferences",new Set);_(this,"errors",[]);_(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,"isCurrentParentExtension",!1);_(this,"isParentObjectExternal",!1);_(this,"isParentObjectShareable",!1);_(this,"isSubgraphEventDrivenGraph",!1);_(this,"isSubgraphVersionTwo",!1);_(this,"keyFieldSetDatasByTypeName",new Map);_(this,"lastParentNodeKind",Z.Kind.NULL);_(this,"lastChildNodeKind",Z.Kind.NULL);_(this,"parentTypeNamesWithAuthDirectives",new Set);_(this,"keyFieldSetDataByTypeName",new Map);_(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",[]);for(let[r,i]of qt.BASE_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME)this.directiveDefinitionByDirectiveName.set(r,i);this.subgraphName=n||W.NOT_APPLICABLE,this.internalGraph=t,this.internalGraph.setSubgraphName(this.subgraphName),this.schemaData={directivesByDirectiveName:new Map,kind:Z.Kind.SCHEMA_DEFINITION,name:W.SCHEMA,operationTypes:new Map}}validateArguments(t,n){for(let r of t.argumentDataByName.values()){let i=(0,rr.getTypeNodeNamedTypeName)(r.type);if(qt.BASE_SCALARS.has(i)){r.namedTypeKind=Z.Kind.SCALAR_TYPE_DEFINITION;continue}let a=this.parentDefinitionDataByTypeName.get(i);if(a){if((0,sn.isInputNodeKind)(a.kind)){r.namedTypeKind=a.kind;continue}this.errors.push((0,le.invalidNamedTypeError)({data:r,namedTypeData:a,nodeType:`${(0,je.kindToNodeType)(n)} field argument`}))}}}isTypeNameRootType(t){return W.ROOT_TYPE_NAMES.has(t)||this.operationTypeNodeByTypeName.has(t)}isArgumentValueValid(t,n){if(n.kind===Z.Kind.NULL)return t.kind!==Z.Kind.NON_NULL_TYPE;switch(t.kind){case Z.Kind.LIST_TYPE:{if(n.kind!==Z.Kind.LIST)return this.isArgumentValueValid((0,rr.getNamedTypeNode)(t.type),n);for(let r of n.values)if(!this.isArgumentValueValid(t.type,r))return!1;return!0}case Z.Kind.NAMED_TYPE:switch(t.name.value){case W.BOOLEAN_SCALAR:return n.kind===Z.Kind.BOOLEAN;case W.FLOAT_SCALAR:return n.kind===Z.Kind.FLOAT||n.kind===Z.Kind.INT;case W.ID_SCALAR:return n.kind===Z.Kind.STRING||n.kind===Z.Kind.INT;case W.INT_SCALAR:return n.kind===Z.Kind.INT;case W.FIELD_SET_SCALAR:case W.SCOPE_SCALAR:case W.STRING_SCALAR:return n.kind===Z.Kind.STRING;case W.LINK_IMPORT:return!0;case W.LINK_PURPOSE:return n.kind!==Z.Kind.ENUM?!1:n.value===W.SECURITY||n.value===W.EXECUTION;case W.SUBSCRIPTION_FIELD_CONDITION:case W.SUBSCRIPTION_FILTER_CONDITION:return n.kind===Z.Kind.OBJECT;default:{let r=this.parentDefinitionDataByTypeName.get(t.name.value);if(!r)return!1;if(r.kind===Z.Kind.SCALAR_TYPE_DEFINITION)return!0;if(r.kind===Z.Kind.ENUM_TYPE_DEFINITION){if(n.kind!==Z.Kind.ENUM)return!1;let i=r.enumValueDataByValueName.get(n.value);return i?!i.directivesByDirectiveName.has(W.INACCESSIBLE):!1}return r.kind!==Z.Kind.INPUT_OBJECT_TYPE_DEFINITION?!1:n.kind===Z.Kind.OBJECT}}default:return this.isArgumentValueValid(t.type,n)}}addInheritedDirectivesToFieldData(t,n){return this.isParentObjectExternal&&!t.has(W.EXTERNAL)&&(t.set(W.EXTERNAL,[(0,je.generateSimpleDirective)(W.EXTERNAL)]),n.add(W.EXTERNAL)),this.doesParentObjectRequireFetchReasons&&!t.has(W.REQUIRE_FETCH_REASONS)&&(t.set(W.REQUIRE_FETCH_REASONS,[(0,je.generateSimpleDirective)(W.REQUIRE_FETCH_REASONS)]),n.add(W.REQUIRE_FETCH_REASONS)),this.isParentObjectShareable&&!t.has(W.SHAREABLE)&&(t.set(W.SHAREABLE,[(0,je.generateSimpleDirective)(W.SHAREABLE)]),n.add(W.SHAREABLE)),t}extractDirectives(t,n){if(!t.directives)return n;for(let r of t.directives){let i=r.name.value;i===W.SHAREABLE?(0,je.getValueOrDefault)(n,i,()=>[r]):(0,je.getValueOrDefault)(n,i,()=>[]).push(r),(0,ir.isNodeKindObject)(t.kind)&&(this.isParentObjectExternal||(this.isParentObjectExternal=i===W.EXTERNAL),this.doesParentObjectRequireFetchReasons||(this.doesParentObjectRequireFetchReasons=i===W.REQUIRE_FETCH_REASONS),this.isParentObjectShareable||(this.isParentObjectShareable=i===W.SHAREABLE))}return n}validateDirective({data:t,definitionData:n,directiveCoords:r,directiveNode:i,errorMessages:a,requiredArgumentNames:o}){let c=i.name.value,l=t.kind===Z.Kind.FIELD_DEFINITION?t.renamedParentTypeName||t.originalParentTypeName:t.name,d=c===W.AUTHENTICATED,f=(0,sn.isFieldData)(t),y=c===W.OVERRIDE,I=c===W.REQUIRES_SCOPES,v=c===W.SEMANTIC_NON_NULL;if(!i.arguments||i.arguments.length<1)return n.requiredArgumentNames.size>0&&a.push((0,le.undefinedRequiredArgumentsErrorMessage)(c,o,[])),d&&this.handleAuthenticatedDirective(t,l),v&&f&&((0,sn.isTypeRequired)(t.type)?a.push((0,le.semanticNonNullLevelsNonNullErrorMessage)({typeString:(0,Ei.printTypeNode)(t.type),value:"0"})):t.nullLevelsBySubgraphName.set(this.subgraphName,new Set([0]))),a;let F=new Set,k=new Set,K=new Set,J=[];for(let Te of i.arguments){let de=Te.name.value;if(F.has(de)){k.add(de);continue}F.add(de);let Re=n.argumentTypeNodeByArgumentName.get(de);if(!Re){K.add(de);continue}if(!this.isArgumentValueValid(Re.typeNode,Te.value)){a.push((0,le.invalidArgumentValueErrorMessage)((0,Z.print)(Te.value),`@${c}`,de,(0,Ei.printTypeNode)(Re.typeNode)));continue}if(y&&f){this.handleOverrideDirective({data:t,directiveCoords:r,errorMessages:a,targetSubgraphName:Te.value.value});continue}if(v&&f){this.handleSemanticNonNullDirective({data:t,directiveNode:i,errorMessages:a});continue}!I||de!==W.SCOPES||this.extractRequiredScopes({directiveCoords:r,orScopes:Te.value.values,requiredScopes:J})}k.size>0&&a.push((0,le.duplicateDirectiveArgumentDefinitionsErrorMessage)([...k])),K.size>0&&a.push((0,le.unexpectedDirectiveArgumentErrorMessage)(c,[...K]));let se=(0,je.getEntriesNotInHashSet)(o,F);if(se.length>0&&a.push((0,le.undefinedRequiredArgumentsErrorMessage)(c,o,se)),a.length>0||!I)return a;let ie=(0,je.getValueOrDefault)(this.authorizationDataByParentTypeName,l,()=>(0,ir.newAuthorizationData)(l));if(t.kind!==Z.Kind.FIELD_DEFINITION)this.parentTypeNamesWithAuthDirectives.add(l),ie.requiredScopes.push(...J);else{let Te=(0,je.getValueOrDefault)(ie.fieldAuthDataByFieldName,t.name,()=>(0,ir.newFieldAuthorizationData)(t.name));Te.inheritedData.requiredScopes.push(...J),Te.originalData.requiredScopes.push(...J)}return a}validateDirectives(t,n){let r=new Set;for(let[i,a]of t.directivesByDirectiveName){let o=this.directiveDefinitionDataByDirectiveName.get(i);if(!o){r.has(i)||(this.errors.push((0,le.undefinedDirectiveError)(i,n)),r.add(i));continue}let c=[],l=(0,Dn.nodeKindToDirectiveLocation)(t.kind);if(o.locations.has(l)||c.push((0,le.invalidDirectiveLocationErrorMessage)(i,l)),a.length>1&&!o.isRepeatable){let f=(0,je.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);f.has(i)||(f.add(i),c.push((0,le.invalidRepeatedDirectiveErrorMessage)(i)))}let d=[...o.requiredArgumentNames];for(let f=0;f0&&this.errors.push((0,le.invalidDirectiveError)(i,n,(0,je.numberToOrdinal)(f+1),y))}}switch(t.kind){case Z.Kind.ENUM_TYPE_DEFINITION:{for(let[i,a]of t.enumValueDataByValueName)this.validateDirectives(a,`${t.name}.${i}`);return}case Z.Kind.FIELD_DEFINITION:{for(let[i,a]of t.argumentDataByName)this.validateDirectives(a,`${t.originalParentTypeName}.${t.name}(${i}: ...)`);return}case Z.Kind.INPUT_OBJECT_TYPE_DEFINITION:{for(let[i,a]of t.inputValueDataByName)this.validateDirectives(a,`${t.name}.${i}`);return}case Z.Kind.INTERFACE_TYPE_DEFINITION:case Z.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?za.ExtensionType.REAL:r||!n.has(W.EXTENDS)?za.ExtensionType.NONE:za.ExtensionType.EXTENDS}setParentDataExtensionType(t,n){switch(t.extensionType){case za.ExtensionType.EXTENDS:case za.ExtensionType.NONE:{if(n===za.ExtensionType.REAL)return;this.errors.push((0,le.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 W.PROPAGATE:{if(o.value.kind!=Z.Kind.BOOLEAN)return;r.propagate=o.value.value;break}case W.DESCRIPTION_OVERRIDE:{if(o.value.kind!=Z.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.directivesByDirectiveName.get(W.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,le.duplicateImplementedInterfaceError)((0,ir.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.directivesByDirectiveName.has(W.KEY)),n.isInaccessible||(n.isInaccessible=n.directivesByDirectiveName.has(W.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,le.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,{argumentDataByArgumentName: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(!W.EXECUTABLE_DIRECTIVE_LOCATIONS.has(o)&&!qE.TYPE_SYSTEM_DIRECTIVE_LOCATIONS.has(o)){n.push((0,le.invalidDirectiveDefinitionLocationErrorMessage)(o)),i.add(o);continue}if(r.has(o)){n.push((0,le.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={argumentTypeNodeByArgumentName: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,sn.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,le.duplicateDirectiveDefinitionArgumentErrorMessage)([...c])),o}addDirectiveDefinitionDataByNode(t){let n=t.name.value;if(this.definedDirectiveNames.has(n))return this.errors.push((0,le.duplicateDirectiveDefinitionError)(n)),!1;if(this.definedDirectiveNames.add(n),this.directiveDefinitionByDirectiveName.set(n,t),qt.V2_DIRECTIVE_DEFINITION_BY_DIRECTIVE_NAME.has(n))return this.isSubgraphVersionTwo=!0,!1;if(qt.ALL_IN_BUILT_DIRECTIVE_NAMES.has(n))return!1;let r=[],{argumentTypeNodeByArgumentName:i,optionalArgumentNames:a,requiredArgumentNames:o}=this.extractArgumentData(t.arguments,r);return this.directiveDefinitionDataByDirectiveName.set(n,{argumentTypeNodeByArgumentName:i,isRepeatable:t.repeatable,locations:this.extractDirectiveLocations(t,r),name:n,node:t,optionalArgumentNames:a,requiredArgumentNames:o}),r.length>0&&this.errors.push((0,le.invalidDirectiveDefinitionError)(n,r)),!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:f}=(0,sn.isNodeExternalOrShareable)(n,!this.isSubgraphVersionTwo,i),y=(0,rr.getTypeNodeNamedTypeName)(n.type),I={argumentDataByName:r,configureDescriptionDataBySubgraphName:new Map,externalFieldDataBySubgraphName:new Map([[this.subgraphName,(0,sn.newExternalFieldData)(d)]]),federatedCoords:`${c}.${o}`,inheritedDirectiveNames:a,isInaccessible:i.has(W.INACCESSIBLE),isShareableBySubgraphName:new Map([[this.subgraphName,f]]),kind:Z.Kind.FIELD_DEFINITION,name:o,namedTypeKind:qt.BASE_SCALARS.has(y)?Z.Kind.SCALAR_TYPE_DEFINITION:Z.Kind.NULL,namedTypeName:y,node:(0,rr.getMutableFieldNode)(n,l,this.errors),nullLevelsBySubgraphName:new Map,originalParentTypeName:this.originalParentTypeName,persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),renamedParentTypeName:c,subgraphNames:new Set([this.subgraphName]),type:(0,rr.getMutableTypeNode)(n.type,l,this.errors),directivesByDirectiveName:i,description:(0,Dn.formatDescription)(n.description)};return qt.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,sn.areDefaultValuesCompatible)(i.type,i.defaultValue)&&this.errors.push((0,le.incompatibleInputValueDefaultValueTypeError)((r?W.ARGUMENT:W.INPUT_FIELD)+` "${l}"`,d,(0,Ei.printTypeNode)(i.type),(0,Z.print)(i.defaultValue)));let f=r?`${c}${t?`.${t}`:""}(${l}: ...)`:`${c}.${l}`,y=(0,rr.getTypeNodeNamedTypeName)(i.type),I={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:this.extractDirectives(i,new Map),federatedCoords:f,fieldName:t,includeDefaultValue:!!i.defaultValue,isArgument:r,kind:r?Z.Kind.ARGUMENT:Z.Kind.INPUT_VALUE_DEFINITION,name:l,namedTypeKind:qt.BASE_SCALARS.has(y)?Z.Kind.SCALAR_TYPE_DEFINITION:Z.Kind.NULL,namedTypeName:y,node:(0,rr.getMutableInputValueNode)(i,a,this.errors),originalCoords:d,originalParentTypeName:a,persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),renamedParentTypeName:c,requiredSubgraphNames:new Set((0,sn.isTypeRequired)(i.type)?[this.subgraphName]:[]),subgraphNames:new Set([this.subgraphName]),type:(0,rr.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.directivesByDirectiveName)||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!==Z.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,o);return}let l={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:o,fieldDataByName:new Map,implementedInterfaceTypeNames:this.extractImplementedInterfaceTypeNames(t,new Set),isEntity:a.has(W.KEY),isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.INTERFACE_TYPE_DEFINITION,name:r,node:(0,rr.getMutableInterfaceNode)(t.name),persistedDirectivesData:(0,sn.newPersistedDirectivesData)(),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 Z.OperationTypeNode.MUTATION:return W.MUTATION;case Z.OperationTypeNode.SUBSCRIPTION:return W.SUBSCRIPTION;default:return W.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 f;let r=t.name.value,i=this.parentDefinitionDataByTypeName.get(r),a=this.extractDirectives(t,(f=i==null?void 0:i.directivesByDirectiveName)!=null?f:new Map),o=this.isTypeNameRootType(r),c=this.getNodeExtensionType(n,a,o);if(this.addInterfaceObjectFieldsByNode(t),i){if(i.kind!==Z.Kind.OBJECT_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.updateCompositeOutputDataByNode(t,i,c),a.has(W.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(i.implementedInterfaceTypeNames,r);return}let l=this.extractImplementedInterfaceTypeNames(t,new Set);a.has(W.INTERFACE_OBJECT)||this.addConcreteTypeNamesForImplementedInterfaces(l,r);let d={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:c,fieldDataByName:new Map,implementedInterfaceTypeNames:l,isEntity:a.has(W.KEY),isInaccessible:a.has(W.INACCESSIBLE),isRootType:o,kind:Z.Kind.OBJECT_TYPE_DEFINITION,name:r,node:(0,rr.getMutableObjectNode)(t.name),persistedDirectivesData:(0,sn.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.ENUM_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(W.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,directivesByDirectiveName:a,extensionType:o,enumValueDataByValueName:new Map,isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.ENUM_TYPE_DEFINITION,name:r,node:(0,rr.getMutableEnumNode)(t.name),persistedDirectivesData:(0,sn.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.INPUT_OBJECT_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.kindToConvertedTypeString)(t.kind)));return}this.setParentDataExtensionType(i,o),i.isInaccessible||(i.isInaccessible=a.has(W.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={configureDescriptionDataBySubgraphName:new Map,directivesByDirectiveName:a,extensionType:o,inputValueDataByName:new Map,isInaccessible:a.has(W.INACCESSIBLE),kind:Z.Kind.INPUT_OBJECT_TYPE_DEFINITION,name:r,node:(0,rr.getMutableInputObjectNode)(t.name),persistedDirectivesData:(0,sn.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)}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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(i){if(i.kind!==Z.Kind.SCALAR_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.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,directivesByDirectiveName:a,extensionType:o,kind:Z.Kind.SCALAR_TYPE_DEFINITION,name:r,node:(0,rr.getMutableScalarNode)(t.name),persistedDirectivesData:(0,sn.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,le.duplicateUnionMemberDefinitionError)(r,a));continue}(0,je.getValueOrDefault)(this.concreteTypeNamesByAbstractTypeName,r,()=>new Set).add(a),qt.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.directivesByDirectiveName)||new Map),o=this.getNodeExtensionType(n,a);if(this.addConcreteTypeNamesForUnion(t),i){if(i.kind!==Z.Kind.UNION_TYPE_DEFINITION){this.errors.push((0,le.multipleNamedTypeDefinitionError)(r,(0,je.kindToNodeType)(i.kind),(0,ir.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,directivesByDirectiveName:a,extensionType:o,kind:Z.Kind.UNION_TYPE_DEFINITION,memberByMemberTypeName:this.extractUnionMembers(t,new Map),name:r,node:(0,rr.getMutableUnionNode)(t.name),persistedDirectivesData:(0,sn.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,le.expectedEntityError)(r));return}let i=0;for(let o of t.directives){if(o.name.value!==W.KEY||(i+=1,!o.arguments||o.arguments.length<1))continue;let c,l=!1;for(let v of o.arguments){if(v.name.value===W.RESOLVABLE){v.value.kind===Z.Kind.BOOLEAN&&!v.value.value&&(l=!0);continue}if(v.name.value!==W.FIELDS){c=void 0;break}if(v.value.kind!==Z.Kind.STRING){c=void 0;break}c=v.value.value}if(c===void 0)continue;let{error:d,documentNode:f}=(0,Dn.safeParse)("{"+c+"}");if(d||!f){this.errors.push((0,le.invalidDirectiveError)(W.KEY,r,(0,je.numberToOrdinal)(i),[(0,le.unparsableFieldSetErrorMessage)(c,d)]));continue}let y=(0,ti.getNormalizedFieldSet)(f),I=n.get(y);I?I.isUnresolvable||(I.isUnresolvable=l):n.set(y,{documentNode:f,isUnresolvable:l,normalizedFieldSet:y,rawFieldSet:c})}}getFieldSetParent(t,n,r,i){if(!t)return{fieldSetParentData:n};let a=(0,je.getOrThrowError)(n.fieldDataByName,r,`${i}.fieldDataByFieldName`),o=(0,rr.getTypeNodeNamedTypeName)(a.node.type),c=this.parentDefinitionDataByTypeName.get(o);return c?c.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION&&c.kind!==Z.Kind.OBJECT_TYPE_DEFINITION?{errorString:(0,le.incompatibleTypeWithProvidesErrorMessage)(`${i}.${r}`,o)}:{fieldSetParentData:c}:{errorString:(0,le.unknownNamedTypeErrorMessage)(`${i}.${r}`,o)}}validateConditionalFieldSet(t,n,r,i,a){let{error:o,documentNode:c}=(0,Dn.safeParse)("{"+n+"}");if(o||!c)return{errorMessages:[(0,le.unparsableFieldSetErrorMessage)(n,o)]};let l=this,d=[t],f=(0,ti.getConditionalFieldSetDirectiveName)(i),y=[],I=`${a}.${r}`,v=(0,ti.getInitialFieldCoordsPath)(i,I),F=[r],k=new Set,K=[],J=-1,se=!0,ie=r,Te=!1;return(0,Z.visit)(c,{Argument:{enter(){return!1}},Field:{enter(de){let Re=d[J],xe=Re.name;if(Re.kind===Z.Kind.UNION_TYPE_DEFINITION)return K.push((0,le.invalidSelectionOnUnionErrorMessage)(n,v,xe)),Z.BREAK;let tt=de.name.value,ee=`${xe}.${tt}`;if(l.unvalidatedExternalFieldCoords.delete(ee),se)return K.push((0,le.invalidSelectionSetErrorMessage)(n,v,xe,(0,je.kindToNodeType)(Re.kind))),Z.BREAK;v.push(ee),F.push(tt),ie=tt;let Se=Re.fieldDataByName.get(tt);if(!Se)return K.push((0,le.undefinedFieldInFieldSetErrorMessage)(n,xe,tt)),Z.BREAK;if(y[J].has(tt))return K.push((0,le.duplicateFieldInFieldSetErrorMessage)(n,ee)),Z.BREAK;y[J].add(tt);let{isDefinedExternal:_t,isUnconditionallyProvided:en}=(0,je.getOrThrowError)(Se.externalFieldDataBySubgraphName,l.subgraphName,`${ee}.externalFieldDataBySubgraphName`),tn=_t&&!en;en||(Te=!0);let bn=(0,rr.getTypeNodeNamedTypeName)(Se.node.type),Qt=l.parentDefinitionDataByTypeName.get(bn);if(qt.BASE_SCALARS.has(bn)||(Qt==null?void 0:Qt.kind)===Z.Kind.SCALAR_TYPE_DEFINITION||(Qt==null?void 0:Qt.kind)===Z.Kind.ENUM_TYPE_DEFINITION){if(k.size<1&&!_t){if(l.isSubgraphVersionTwo){l.errors.push((0,le.nonExternalConditionalFieldError)(I,l.subgraphName,ee,n,f));return}l.warnings.push((0,Wa.nonExternalConditionalFieldWarning)(I,l.subgraphName,ee,n,f));return}if(k.size<1&&en){l.isSubgraphVersionTwo?K.push((0,le.fieldAlreadyProvidedErrorMessage)(ee,l.subgraphName,f)):l.warnings.push((0,Wa.fieldAlreadyProvidedWarning)(ee,f,I,l.subgraphName));return}if(!tn&&!i)return;let mn=(0,je.getValueOrDefault)(l.conditionalFieldDataByCoords,ee,sn.newConditionalFieldData),Pr=(0,Xp.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...F]});i?mn.providedBy.push(Pr):mn.requiredBy.push(Pr);return}if(!Qt)return K.push((0,le.unknownTypeInFieldSetErrorMessage)(n,ee,bn)),Z.BREAK;if(_t&&(i&&(0,je.getValueOrDefault)(l.conditionalFieldDataByCoords,ee,sn.newConditionalFieldData).providedBy.push((0,Xp.newFieldSetConditionData)({fieldCoordinatesPath:[...v],fieldPath:[...F]})),k.add(ee)),Qt.kind===Z.Kind.OBJECT_TYPE_DEFINITION||Qt.kind===Z.Kind.INTERFACE_TYPE_DEFINITION||Qt.kind===Z.Kind.UNION_TYPE_DEFINITION){se=!0,d.push(Qt);return}},leave(){k.delete(v.pop()||""),F.pop()}},InlineFragment:{enter(de){let Re=d[J],xe=Re.name,tt=v.length<1?t.name:v[v.length-1];if(!de.typeCondition)return K.push((0,le.inlineFragmentWithoutTypeConditionErrorMessage)(n,tt)),Z.BREAK;let ee=de.typeCondition.name.value;if(ee===xe){d.push(Re),se=!0;return}if(!(0,Dn.isKindAbstract)(Re.kind))return K.push((0,le.invalidInlineFragmentTypeErrorMessage)(n,v,ee,xe)),Z.BREAK;let Se=l.parentDefinitionDataByTypeName.get(ee);if(!Se)return K.push((0,le.unknownInlineFragmentTypeConditionErrorMessage)(n,v,xe,ee)),Z.BREAK;switch(se=!0,Se.kind){case Z.Kind.INTERFACE_TYPE_DEFINITION:{if(!Se.implementedInterfaceTypeNames.has(xe))break;d.push(Se);return}case Z.Kind.OBJECT_TYPE_DEFINITION:{let _t=l.concreteTypeNamesByAbstractTypeName.get(xe);if(!_t||!_t.has(ee))break;d.push(Se);return}case Z.Kind.UNION_TYPE_DEFINITION:{d.push(Se);return}default:return K.push((0,le.invalidInlineFragmentTypeConditionTypeErrorMessage)(n,v,xe,ee,(0,je.kindToNodeType)(Se.kind))),Z.BREAK}return K.push((0,le.invalidInlineFragmentTypeConditionErrorMessage)(n,v,ee,(0,je.kindToNodeType)(Re.kind),xe)),Z.BREAK}},SelectionSet:{enter(){if(!se){let de=d[J];if(de.kind===Z.Kind.UNION_TYPE_DEFINITION)return K.push((0,le.unparsableFieldSetSelectionErrorMessage)(n,ie)),Z.BREAK;let Re=de.fieldDataByName.get(ie);if(!Re)return K.push((0,le.undefinedFieldInFieldSetErrorMessage)(n,de.name,ie)),Z.BREAK;let xe=(0,rr.getTypeNodeNamedTypeName)(Re.node.type),tt=l.parentDefinitionDataByTypeName.get(xe),ee=tt?tt.kind:Z.Kind.SCALAR_TYPE_DEFINITION;return K.push((0,le.invalidSelectionSetDefinitionErrorMessage)(n,v,xe,(0,je.kindToNodeType)(ee))),Z.BREAK}if(J+=1,se=!1,J<0||J>=d.length)return K.push((0,le.unparsableFieldSetSelectionErrorMessage)(n,ie)),Z.BREAK;y.push(new Set)},leave(){if(se){let de=d[J+1];K.push((0,le.invalidSelectionSetErrorMessage)(n,v,de.name,(0,je.kindToNodeType)(de.kind))),se=!1}J-=1,d.pop(),y.pop()}}}),K.length>0||!Te?{errorMessages:K}:{configuration:{fieldName:r,selectionSet:(0,ti.getNormalizedFieldSet)(c)},errorMessages:K}}validateProvidesOrRequires(t,n,r){let i=[],a=[],o=(0,sn.getParentTypeName)(t);for(let[c,l]of n){let{fieldSetParentData:d,errorString:f}=this.getFieldSetParent(r,t,c,o),y=`${o}.${c}`;if(f){i.push(f);continue}if(!d)continue;let{errorMessages:I,configuration:v}=this.validateConditionalFieldSet(d,l,c,r,o);if(I.length>0){i.push(` On field "${y}": -`+I.join(W.HYPHEN_JOIN));continue}v&&a.push(v)}if(i.length>0){this.errors.push((0,le.invalidProvidesOrRequiresDirectivesError)((0,ti.getConditionalFieldSetDirectiveName)(r),i));return}if(a.length>0)return a}validateInterfaceImplementations(t){if(t.implementedInterfaceTypeNames.size<1)return;let n=t.directivesByDirectiveName.has(W.INACCESSIBLE),r=new Map,i=new Map,a=!1;for(let o of t.implementedInterfaceTypeNames){let c=this.parentDefinitionDataByTypeName.get(o);if(qt.BASE_SCALARS.has(o)&&this.referencedTypeNames.add(o),!c)continue;if(c.kind!==Z.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[f,y]of c.fieldDataByName){this.unvalidatedExternalFieldCoords.delete(`${t.name}.${f}`);let I=!1,v=t.fieldDataByName.get(f);if(!v){d=!0,l.unimplementedFields.push(f);continue}let F={invalidAdditionalArguments:new Set,invalidImplementedArguments:[],isInaccessible:!1,originalResponseType:(0,Ei.printTypeNode)(y.node.type),unimplementedArguments:new Set};(0,sn.isTypeValidImplementation)(y.node.type,v.node.type,this.concreteTypeNamesByAbstractTypeName)||(d=!0,I=!0,F.implementedResponseType=(0,Ei.printTypeNode)(v.node.type));let k=new Set;for(let[K,J]of y.argumentDataByName){k.add(K);let se=v.argumentDataByName.get(K);if(!se){d=!0,I=!0,F.unimplementedArguments.add(K);continue}let ie=(0,Ei.printTypeNode)(se.type),Te=(0,Ei.printTypeNode)(J.type);Te!==ie&&(d=!0,I=!0,F.invalidImplementedArguments.push({actualType:ie,argumentName:K,expectedType:Te}))}for(let[K,J]of v.argumentDataByName)k.has(K)||J.type.kind===Z.Kind.NON_NULL_TYPE&&(d=!0,I=!0,F.invalidAdditionalArguments.add(K));!n&&v.isInaccessible&&!y.isInaccessible&&(d=!0,I=!0,F.isInaccessible=!0),I&&l.invalidFieldImplementations.set(f,F)}d&&r.set(o,l)}i.size>0&&this.errors.push((0,le.invalidImplementedTypeError)(t.name,i)),a&&this.errors.push((0,le.selfImplementationError)(t.name)),r.size>0&&this.errors.push((0,le.invalidInterfaceImplementationError)(t.name,(0,je.kindToNodeType)(t.kind),r))}handleAuthenticatedDirective(t,n){let r=(0,je.getValueOrDefault)(this.authorizationDataByParentTypeName,n,()=>(0,ir.newAuthorizationData)(n));if(t.kind===Z.Kind.FIELD_DEFINITION){let i=(0,je.getValueOrDefault)(r.fieldAuthDataByFieldName,t.name,()=>(0,ir.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,le.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 y;let i=new Set,a=t.node.type,o=0;for(;a;)switch(a.kind){case Z.Kind.LIST_TYPE:{o+=1,a=a.type;break}case Z.Kind.NON_NULL_TYPE:{i.add(o),a=a.type;break}default:{a=null;break}}let c=(y=n.arguments)==null?void 0:y.find(I=>I.name.value===W.LEVELS);if(!c||c.value.kind!==Z.Kind.LIST){r.push(le.semanticNonNullArgumentErrorMessage);return}let l=c.value.values,d=(0,Ei.printTypeNode)(t.type),f=new Set;for(let{value:I}of l){let v=parseInt(I,10);if(Number.isNaN(v)){r.push((0,le.semanticNonNullLevelsNaNIndexErrorMessage)(I));continue}if(v<0||v>o){r.push((0,le.semanticNonNullLevelsIndexOutOfBoundsErrorMessage)({maxIndex:o,typeString:d,value:I}));continue}if(!i.has(v)){f.add(v);continue}r.push((0,le.semanticNonNullLevelsNonNullErrorMessage)({typeString:d,value:I}))}t.nullLevelsBySubgraphName.set(this.subgraphName,f)}extractRequiredScopes({directiveCoords:t,orScopes:n,requiredScopes:r}){if(n.length>qt.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,ir.addScopes)(r,a)}}getKafkaPublishConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.TOPIC:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push((0,le.invalidEventSubjectErrorMessage)(W.TOPIC));continue}(0,ti.validateArgumentTemplateReferences)(c.value.value,n,i),a.push(c.value.value);break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_KAFKA,topics:a,type:W.PUBLISH}}getKafkaSubscribeConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.TOPICS:{if(c.value.kind!==Z.Kind.LIST){i.push((0,le.invalidEventSubjectsErrorMessage)(W.TOPICS));continue}for(let l of c.value.values){if(l.kind!==Z.Kind.STRING||l.value.length<1){i.push((0,le.invalidEventSubjectsItemErrorMessage)(W.TOPICS));break}(0,ti.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_KAFKA,topics:a,type:W.SUBSCRIBE}}getNatsPublishAndRequestConfiguration(t,n,r,i,a){let o=[],c=W.DEFAULT_EDFS_PROVIDER_ID;for(let l of n.arguments||[])switch(l.name.value){case W.SUBJECT:{if(l.value.kind!==Z.Kind.STRING||l.value.value.length<1){a.push((0,le.invalidEventSubjectErrorMessage)(W.SUBJECT));continue}(0,ti.validateArgumentTemplateReferences)(l.value.value,r,a),o.push(l.value.value);break}case W.PROVIDER_ID:{if(l.value.kind!==Z.Kind.STRING||l.value.value.length<1){a.push(le.invalidEventProviderIdErrorMessage);continue}c=l.value.value;break}}if(!(a.length>0))return{fieldName:i,providerId:c,providerType:W.PROVIDER_TYPE_NATS,subjects:o,type:t}}getNatsSubscribeConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID,c=VE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,l="",d="";for(let f of t.arguments||[])switch(f.name.value){case W.SUBJECTS:{if(f.value.kind!==Z.Kind.LIST){i.push((0,le.invalidEventSubjectsErrorMessage)(W.SUBJECTS));continue}for(let y of f.value.values){if(y.kind!==Z.Kind.STRING||y.value.length<1){i.push((0,le.invalidEventSubjectsItemErrorMessage)(W.SUBJECTS));break}(0,ti.validateArgumentTemplateReferences)(y.value,n,i),a.push(y.value)}break}case W.PROVIDER_ID:{if(f.value.kind!==Z.Kind.STRING||f.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=f.value.value;break}case W.STREAM_CONFIGURATION:{if(this.usesEdfsNatsStreamConfiguration=!0,f.value.kind!==Z.Kind.OBJECT||f.value.fields.length<1){i.push(le.invalidNatsStreamInputErrorMessage);continue}let y=!0,I=new Set,v=new Set(qE.STREAM_CONFIGURATION_FIELD_NAMES),F=new Set([W.CONSUMER_NAME,W.STREAM_NAME]),k=new Set,K=new Set;for(let J of f.value.fields){let se=J.name.value;if(!qE.STREAM_CONFIGURATION_FIELD_NAMES.has(se)){I.add(se),y=!1;continue}if(v.has(se))v.delete(se);else{k.add(se),y=!1;continue}switch(F.has(se)&&F.delete(se),se){case W.CONSUMER_NAME:if(J.value.kind!=Z.Kind.STRING||J.value.value.length<1){K.add(se),y=!1;continue}l=J.value.value;break;case W.STREAM_NAME:if(J.value.kind!=Z.Kind.STRING||J.value.value.length<1){K.add(se),y=!1;continue}d=J.value.value;break;case W.CONSUMER_INACTIVE_THRESHOLD:if(J.value.kind!=Z.Kind.INT){i.push((0,le.invalidArgumentValueErrorMessage)((0,Z.print)(J.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",W.INT_SCALAR)),y=!1;continue}try{c=parseInt(J.value.value,10)}catch(ie){i.push((0,le.invalidArgumentValueErrorMessage)((0,Z.print)(J.value),"edfs__NatsStreamConfiguration","consumerInactiveThreshold",W.INT_SCALAR)),y=!1}break}}(!y||F.size>0)&&i.push((0,le.invalidNatsStreamInputFieldsErrorMessage)([...F],[...k],[...K],[...I]))}}if(!(i.length>0))return c<0?(c=VE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD,this.warnings.push((0,Wa.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,`The value has been set to ${VE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}.`))):c>Qle.MAX_INT32&&(c=0,this.warnings.push((0,Wa.consumerInactiveThresholdInvalidValueWarning)(this.subgraphName,"The value has been set to 0. This means the consumer will remain indefinitely active until its manual deletion."))),x({fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_NATS,subjects:a,type:W.SUBSCRIBE},l&&d?{streamConfiguration:{consumerInactiveThreshold:c,consumerName:l,streamName:d}}:{})}getRedisPublishConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.CHANNEL:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push((0,le.invalidEventSubjectErrorMessage)(W.CHANNEL));continue}(0,ti.validateArgumentTemplateReferences)(c.value.value,n,i),a.push(c.value.value);break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_REDIS,channels:a,type:W.PUBLISH}}getRedisSubscribeConfiguration(t,n,r,i){let a=[],o=W.DEFAULT_EDFS_PROVIDER_ID;for(let c of t.arguments||[])switch(c.name.value){case W.CHANNELS:{if(c.value.kind!==Z.Kind.LIST){i.push((0,le.invalidEventSubjectsErrorMessage)(W.CHANNELS));continue}for(let l of c.value.values){if(l.kind!==Z.Kind.STRING||l.value.length<1){i.push((0,le.invalidEventSubjectsItemErrorMessage)(W.CHANNELS));break}(0,ti.validateArgumentTemplateReferences)(l.value,n,i),a.push(l.value)}break}case W.PROVIDER_ID:{if(c.value.kind!==Z.Kind.STRING||c.value.value.length<1){i.push(le.invalidEventProviderIdErrorMessage);continue}o=c.value.value;break}}if(!(i.length>0))return{fieldName:r,providerId:o,providerType:W.PROVIDER_TYPE_REDIS,channels:a,type:W.SUBSCRIBE}}validateSubscriptionFilterDirectiveLocation(t){if(!t.directives)return;let n=this.renamedParentTypeName||this.originalParentTypeName,r=`${n}.${t.name.value}`,i=this.getOperationTypeNodeForRootTypeName(n)===Z.OperationTypeNode.SUBSCRIPTION;for(let a of t.directives)if(a.name.value===W.SUBSCRIPTION_FILTER&&!i){this.errors.push((0,le.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 W.EDFS_KAFKA_PUBLISH:c=this.getKafkaPublishConfiguration(a,n,r,o);break;case W.EDFS_KAFKA_SUBSCRIBE:c=this.getKafkaSubscribeConfiguration(a,n,r,o);break;case W.EDFS_NATS_PUBLISH:{c=this.getNatsPublishAndRequestConfiguration(W.PUBLISH,a,n,r,o);break}case W.EDFS_NATS_REQUEST:{c=this.getNatsPublishAndRequestConfiguration(W.REQUEST,a,n,r,o);break}case W.EDFS_NATS_SUBSCRIBE:{c=this.getNatsSubscribeConfiguration(a,n,r,o);break}case W.EDFS_REDIS_PUBLISH:{c=this.getRedisPublishConfiguration(a,n,r,o);break}case W.EDFS_REDIS_SUBSCRIBE:{c=this.getRedisSubscribeConfiguration(a,n,r,o);break}default:continue}if(o.length>0){this.errors.push((0,le.invalidEventDirectiveError)(a.name.value,i,o));continue}c&&(0,je.getValueOrDefault)(this.eventsConfigurations,this.renamedParentTypeName||this.originalParentTypeName,()=>[]).push(c)}}getValidEventsDirectiveNamesForOperationTypeNode(t){switch(t){case Z.OperationTypeNode.MUTATION:return new Set([W.EDFS_KAFKA_PUBLISH,W.EDFS_NATS_PUBLISH,W.EDFS_NATS_REQUEST,W.EDFS_REDIS_PUBLISH]);case Z.OperationTypeNode.QUERY:return new Set([W.EDFS_NATS_REQUEST]);case Z.OperationTypeNode.SUBSCRIPTION:return new Set([W.EDFS_KAFKA_SUBSCRIBE,W.EDFS_NATS_SUBSCRIBE,W.EDFS_REDIS_SUBSCRIBE])}}getOperationTypeNodeForRootTypeName(t){let n=this.operationTypeNodeByTypeName.get(t);if(n)return n;switch(t){case W.MUTATION:return Z.OperationTypeNode.MUTATION;case W.QUERY:return Z.OperationTypeNode.QUERY;case W.SUBSCRIPTION:return Z.OperationTypeNode.SUBSCRIPTION;default:return}}validateEventDrivenRootType(t,n,r,i){let a=this.getOperationTypeNodeForRootTypeName(t.name);if(!a){this.errors.push((0,le.invalidRootTypeError)(t.name));return}let o=this.getValidEventsDirectiveNamesForOperationTypeNode(a);for(let[c,l]of t.fieldDataByName){let d=`${l.originalParentTypeName}.${c}`,f=new Set;for(let K of qE.EVENT_DIRECTIVE_NAMES)l.directivesByDirectiveName.has(K)&&f.add(K);let y=new Set;for(let K of f)o.has(K)||y.add(K);if((f.size<1||y.size>0)&&n.set(d,{definesDirectives:f.size>0,invalidDirectiveNames:[...y]}),a===Z.OperationTypeNode.MUTATION){let K=(0,Ei.printTypeNode)(l.type);K!==W.NON_NULLABLE_EDFS_PUBLISH_EVENT_RESULT&&i.set(d,K);continue}let I=(0,Ei.printTypeNode)(l.type),v=l.namedTypeName+"!",F=!1,k=this.concreteTypeNamesByAbstractTypeName.get(l.namedTypeName)||new Set([l.namedTypeName]);for(let K of k)if(F||(F=this.entityDataByTypeName.has(K)),F)break;(!F||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(W.EDFS_PUBLISH_RESULT);if(!t)return!0;if(t.kind!==Z.Kind.OBJECT_TYPE_DEFINITION||t.fieldDataByName.size!=1)return!1;for(let[n,r]of t.fieldDataByName)if(r.argumentDataByName.size>0||n!==W.SUCCESS||(0,Ei.printTypeNode)(r.type)!==W.NON_NULLABLE_BOOLEAN)return!1;return!0}isNatsStreamConfigurationInputObjectValid(t){if(t.kind!==Z.Kind.INPUT_OBJECT_TYPE_DEFINITION||t.inputValueDataByName.size!=3)return!1;for(let[n,r]of t.inputValueDataByName)switch(n){case W.CONSUMER_INACTIVE_THRESHOLD:{if((0,Ei.printTypeNode)(r.type)!==W.NON_NULLABLE_INT||!r.defaultValue||r.defaultValue.kind!==Z.Kind.INT||r.defaultValue.value!==`${VE.DEFAULT_CONSUMER_INACTIVE_THRESHOLD}`)return!1;break}case W.CONSUMER_NAME:case W.STREAM_NAME:{if((0,Ei.printTypeNode)(r.type)!==W.NON_NULLABLE_STRING)return!1;break}default:return!1}return!0}validateEventDrivenSubgraph(t){let n=[],r=new Map,i=new Map,a=new Map,o=new Map,c=new Map,l=new Map,d=new Set,f=new Set;for(let[y,I]of this.parentDefinitionDataByTypeName){if(y===W.EDFS_PUBLISH_RESULT||y===W.EDFS_NATS_STREAM_CONFIGURATION||I.kind!==Z.Kind.OBJECT_TYPE_DEFINITION)continue;if(I.isRootType){this.validateEventDrivenRootType(I,r,i,a);continue}let v=this.keyFieldNamesByParentTypeName.get(y);if(!v){f.add(y);continue}this.validateEventDrivenKeyDefinition(y,o),this.validateEventDrivenObjectFields(I.fieldDataByName,v,c,l)}if(this.isEdfsPublishResultValid()||n.push(le.invalidEdfsPublishResultObjectErrorMessage),this.edfsDirectiveReferences.has(W.EDFS_NATS_SUBSCRIBE)){let y=this.parentDefinitionDataByTypeName.get(W.EDFS_NATS_STREAM_CONFIGURATION);y&&this.usesEdfsNatsStreamConfiguration&&!this.isNatsStreamConfigurationInputObjectValid(y)&&n.push(le.invalidNatsStreamConfigurationDefinitionErrorMessage),this.parentDefinitionDataByTypeName.delete(W.EDFS_NATS_STREAM_CONFIGURATION),t.push(qt.EDFS_NATS_STREAM_CONFIGURATION_DEFINITION)}r.size>0&&n.push((0,le.invalidRootTypeFieldEventsDirectivesErrorMessage)(r)),a.size>0&&n.push((0,le.invalidEventDrivenMutationResponseTypeErrorMessage)(a)),i.size>0&&n.push((0,le.invalidRootTypeFieldResponseTypesEventDrivenErrorMessage)(i)),o.size>0&&n.push((0,le.invalidKeyFieldSetsEventDrivenErrorMessage)(o)),c.size>0&&n.push((0,le.nonExternalKeyFieldNamesEventDrivenErrorMessage)(c)),l.size>0&&n.push((0,le.nonKeyFieldNamesEventDrivenErrorMessage)(l)),d.size>0&&n.push((0,le.nonEntityObjectExtensionsEventDrivenErrorMessage)([...d])),f.size>0&&n.push((0,le.nonKeyComposingObjectTypeNamesEventDrivenErrorMessage)([...f])),n.length>0&&this.errors.push((0,le.invalidEventDrivenGraphError)(n))}validateUnionMembers(t){if(t.memberByMemberTypeName.size<1){this.errors.push((0,le.noDefinedUnionMembersError)(t.name));return}let n=[];for(let r of t.memberByMemberTypeName.keys()){let i=this.parentDefinitionDataByTypeName.get(r);i&&i.kind!==Z.Kind.OBJECT_TYPE_DEFINITION&&n.push(`"${r}", which is type "${(0,je.kindToNodeType)(i.kind)}"`)}n.length>0&&this.errors.push((0,le.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!==Z.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,le.undefinedCompositeOutputTypeError)(t));continue}let i=(0,sn.getParentTypeName)(r),a=(0,je.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Xp.newConfigurationData)(!0,i)),o=(0,ti.validateKeyFieldSets)(this,r,n);o&&(a.keys=o)}}getValidFlattenedDirectiveArray(t,n,r=!1){let i=[];for(let[a,o]of t){if(r&&W.INHERITABLE_DIRECTIVE_NAMES.has(a))continue;let c=this.directiveDefinitionDataByDirectiveName.get(a);if(!c)continue;if(!c.isRepeatable&&o.length>1){let f=(0,je.getValueOrDefault)(this.invalidRepeatedDirectiveNameByCoords,n,()=>new Set);f.has(a)||(f.add(a),this.errors.push((0,le.invalidDirectiveError)(a,n,"1st",[(0,le.invalidRepeatedDirectiveErrorMessage)(a)])));continue}if(a!==W.KEY){i.push(...o);continue}let l=[],d=new Set;for(let f=0;fnew Set).add(k)),(0,je.getValueOrDefault)(a.keyFieldNamesByParentTypeName,v,()=>new Set).add(F);let se=(0,rr.getTypeNodeNamedTypeName)(K.node.type);if(qt.BASE_SCALARS.has(se))return;let ie=a.parentDefinitionDataByTypeName.get(se);if(!ie)return Z.BREAK;if(ie.kind===Z.Kind.OBJECT_TYPE_DEFINITION){f=!0,c.push(ie);return}if((0,Dn.isKindAbstract)(ie.kind))return Z.BREAK}},InlineFragment:{enter(){return Z.BREAK}},SelectionSet:{enter(){if(!f||(d+=1,f=!1,d<0||d>=c.length))return Z.BREAK},leave(){f&&(f=!1),d-=1,c.pop()}}}),!(l.size<1))for(let[y,I]of l)this.warnings.push((0,Wa.externalEntityExtensionKeyFieldWarning)(i.name,y,[...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!==Z.Kind.OBJECT_TYPE_DEFINITION&&r.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION){this.errors.push((0,le.undefinedCompositeOutputTypeError)(t));continue}let i=(0,sn.getParentTypeName)(r),a=(0,je.getValueOrDefault)(this.configurationDataByTypeName,i,()=>(0,Xp.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.directivesByDirectiveName.has(W.ONE_OF)?n.size>0?(this.errors.push((0,le.oneOfRequiredFieldsError)({requiredFieldNames:Array.from(n),typeName:t.name})),!1):(t.inputValueDataByName.size===1&&this.warnings.push((0,Wa.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 a;(0,dV.upsertDirectiveSchemaAndEntityDefinitions)(this,t),(0,dV.upsertParentsAndChildren)(this,t),this.validateDirectives(this.schemaData,W.SCHEMA);for(let[o,c]of this.parentDefinitionDataByTypeName)this.validateDirectives(c,o);this.invalidORScopesCoords.size>0&&this.errors.push((0,le.orScopesLimitError)(qt.MAX_OR_SCOPES,[...this.invalidORScopesCoords]));let n=[];for(let o of qt.BASE_DIRECTIVE_DEFINITIONS)n.push(o);if(n.push(qt.FIELD_SET_SCALAR_DEFINITION),this.isSubgraphVersionTwo){for(let o of qt.VERSION_TWO_DIRECTIVE_DEFINITIONS)n.push(o),this.directiveDefinitionByDirectiveName.set(o.name.value,o);n.push(qt.SCOPE_SCALAR_DEFINITION)}for(let o of this.edfsDirectiveReferences){let c=qt.EVENT_DRIVEN_DIRECTIVE_DEFINITIONS_BY_DIRECTIVE_NAME.get(o);if(!c){this.errors.push((0,le.invalidEdfsDirectiveName)(o));continue}n.push(c)}this.edfsDirectiveReferences.size>0&&this.referencedDirectiveNames.has(W.SUBSCRIPTION_FILTER)&&(n.push(qt.SUBSCRIPTION_FILTER_DEFINITION),n.push(qt.SUBSCRIPTION_FILTER_CONDITION_DEFINITION),n.push(qt.SUBSCRIPTION_FIELD_CONDITION_DEFINITION),n.push(qt.SUBSCRIPTION_FILTER_VALUE_DEFINITION)),this.referencedDirectiveNames.has(W.CONFIGURE_DESCRIPTION)&&n.push(qt.CONFIGURE_DESCRIPTION_DEFINITION),this.referencedDirectiveNames.has(W.CONFIGURE_CHILD_DESCRIPTIONS)&&n.push(qt.CONFIGURE_CHILD_DESCRIPTIONS_DEFINITION),this.referencedDirectiveNames.has(W.LINK)&&(n.push(qt.LINK_DEFINITION),n.push(qt.LINK_IMPORT_DEFINITION),n.push(qt.LINK_PURPOSE_DEFINITION)),this.referencedDirectiveNames.has(W.ONE_OF)&&n.push(qt.ONE_OF_DEFINITION),this.referencedDirectiveNames.has(W.REQUIRE_FETCH_REASONS)&&n.push(qt.REQUIRE_FETCH_REASONS_DEFINITION),this.referencedDirectiveNames.has(W.SEMANTIC_NON_NULL)&&n.push(qt.SEMANTIC_NON_NULL_DEFINITION);for(let o of this.customDirectiveDefinitions.values())n.push(o);this.schemaData.operationTypes.size>0&&n.push(this.getSchemaNodeByData(this.schemaData));for(let o of this.invalidConfigureDescriptionNodeDatas)o.description||this.errors.push((0,le.configureDescriptionNoDescriptionError)((0,je.kindToNodeType)(o.kind),o.name));this.evaluateExternalKeyFields();for(let[o,c]of this.parentDefinitionDataByTypeName)switch(c.kind){case Z.Kind.ENUM_TYPE_DEFINITION:{if(c.enumValueDataByValueName.size<1){this.errors.push((0,le.noDefinedEnumValuesError)(o));break}n.push(this.getEnumNodeByData(c));break}case Z.Kind.INPUT_OBJECT_TYPE_DEFINITION:{if(c.inputValueDataByName.size<1){this.errors.push((0,le.noInputValueDefinitionsError)(o));break}let l=new Set;for(let d of c.inputValueDataByName.values()){if((0,sn.isTypeRequired)(d.type)&&l.add(d.name),d.namedTypeKind!==Z.Kind.NULL)continue;let f=this.parentDefinitionDataByTypeName.get(d.namedTypeName);if(f){if(!(0,sn.isInputNodeKind)(f.kind)){this.errors.push((0,le.invalidNamedTypeError)({data:d,namedTypeData:f,nodeType:`${(0,je.kindToNodeType)(c.kind)} field`}));continue}d.namedTypeKind=f.kind}}if(!this.validateOneOfDirective({data:c,requiredFieldNames:l}))break;n.push(this.getInputObjectNodeByData(c));break}case Z.Kind.INTERFACE_TYPE_DEFINITION:case Z.Kind.OBJECT_TYPE_DEFINITION:{let l=this.entityDataByTypeName.has(o),d=this.operationTypeNodeByTypeName.get(o),f=c.kind===Z.Kind.OBJECT_TYPE_DEFINITION;this.isSubgraphVersionTwo&&c.extensionType===za.ExtensionType.EXTENDS&&(c.extensionType=za.ExtensionType.NONE),d&&(c.fieldDataByName.delete(W.SERVICE_FIELD),c.fieldDataByName.delete(W.ENTITIES_FIELD));let y=[];for(let[K,J]of c.fieldDataByName){if(!f&&((a=J.externalFieldDataBySubgraphName.get(this.subgraphName))!=null&&a.isDefinedExternal)&&y.push(K),this.validateArguments(J,c.kind),J.namedTypeKind!==Z.Kind.NULL)continue;let se=this.parentDefinitionDataByTypeName.get(J.namedTypeName);if(se){if(!(0,sn.isOutputNodeKind)(se.kind)){this.errors.push((0,le.invalidNamedTypeError)({data:J,namedTypeData:se,nodeType:`${(0,je.kindToNodeType)(c.kind)} field`}));continue}J.namedTypeKind=this.entityInterfaceDataByTypeName.get(se.name)?Z.Kind.INTERFACE_TYPE_DEFINITION:se.kind}}y.length>0&&(this.isSubgraphVersionTwo?this.errors.push((0,le.externalInterfaceFieldsError)(o,y)):this.warnings.push((0,Wa.externalInterfaceFieldsWarning)(this.subgraphName,o,y)));let I=(0,sn.getParentTypeName)(c),v=(0,je.getValueOrDefault)(this.configurationDataByTypeName,I,()=>(0,Xp.newConfigurationData)(l,o)),F=this.entityInterfaceDataByTypeName.get(o);if(F){F.fieldDatas=(0,ir.fieldDatasToSimpleFieldDatas)(c.fieldDataByName.values());let K=this.concreteTypeNamesByAbstractTypeName.get(o);K&&(0,je.addIterableValuesToSet)(K,F.concreteTypeNames),v.isInterfaceObject=F.isInterfaceObject,v.entityInterfaceConcreteTypeNames=F.concreteTypeNames}let k=this.eventsConfigurations.get(I);k&&(v.events=k),this.addFieldNamesToConfigurationData(c.fieldDataByName,v),this.validateInterfaceImplementations(c),n.push(this.getCompositeOutputNodeByData(c)),c.fieldDataByName.size<1&&!(0,ti.isNodeQuery)(o,d)&&this.errors.push((0,le.noFieldDefinitionsError)((0,je.kindToNodeType)(c.kind),o)),f&&c.requireFetchReasonsFieldNames.size>0&&(v.requireFetchReasonsFieldNames=[...c.requireFetchReasonsFieldNames]);break}case Z.Kind.SCALAR_TYPE_DEFINITION:{if(c.extensionType===za.ExtensionType.REAL){this.errors.push((0,le.noBaseScalarDefinitionError)(o));break}n.push(this.getScalarNodeByData(c));break}case Z.Kind.UNION_TYPE_DEFINITION:{n.push(this.getUnionNodeByData(c)),this.validateUnionMembers(c);break}default:throw(0,le.unexpectedKindFatalError)(o)}this.addValidConditionalFieldSetConfigurations(),this.addValidKeyFieldSetConfigurations();for(let o of Object.values(Z.OperationTypeNode)){let c=this.schemaData.operationTypes.get(o),l=(0,je.getOrThrowError)(Dn.operationTypeNodeToDefaultType,o,W.OPERATION_TO_DEFAULT),d=c?(0,rr.getTypeNodeNamedTypeName)(c.type):l;if(qt.BASE_SCALARS.has(d)&&this.referencedTypeNames.add(d),d!==l&&this.parentDefinitionDataByTypeName.has(l)){this.errors.push((0,le.invalidRootTypeDefinitionError)(o,d,l));continue}let f=this.parentDefinitionDataByTypeName.get(d);if(c){if(!f)continue;this.operationTypeNodeByTypeName.set(d,o)}if(!f)continue;let y=this.configurationDataByTypeName.get(l);y&&(y.isRootNode=!0,y.typeName=l),f.kind!==Z.Kind.OBJECT_TYPE_DEFINITION&&this.errors.push((0,le.operationDefinitionError)(d,o,f.kind))}for(let o of this.referencedTypeNames){let c=this.parentDefinitionDataByTypeName.get(o);if(!c){this.errors.push((0,le.undefinedTypeError)(o));continue}if(c.kind!==Z.Kind.INTERFACE_TYPE_DEFINITION)continue;let l=this.concreteTypeNamesByAbstractTypeName.get(o);(!l||l.size<1)&&this.warnings.push((0,Wa.unimplementedInterfaceOutputTypeWarning)(this.subgraphName,o))}let r=new Map;for(let o of this.directiveDefinitionByDirectiveName.values()){let c=(0,Dn.extractExecutableDirectiveLocations)(o.locations,new Set);c.size<1||this.addPersistedDirectiveDefinitionDataByNode(r,o,c)}this.isSubgraphEventDrivenGraph=this.edfsDirectiveReferences.size>0,this.isSubgraphEventDrivenGraph&&this.validateEventDrivenSubgraph(n);for(let o of this.unvalidatedExternalFieldCoords)this.isSubgraphVersionTwo?this.errors.push((0,le.invalidExternalDirectiveError)(o)):this.warnings.push((0,Wa.invalidExternalFieldWarning)(o,this.subgraphName));if(this.errors.length>0)return{success:!1,errors:this.errors,warnings:this.warnings};let i={kind:Z.Kind.DOCUMENT,definitions:n};return{authorizationDataByParentTypeName:this.authorizationDataByParentTypeName,concreteTypeNamesByAbstractTypeName:this.concreteTypeNamesByAbstractTypeName,conditionalFieldDataByCoordinates:this.conditionalFieldDataByCoords,configurationDataByTypeName:this.configurationDataByTypeName,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:r,subgraphAST:i,subgraphString:(0,Z.print)(i),schema:(0,Gle.buildASTSchema)(i,{assumeValid:!0,assumeValidSDL:!0}),success:!0,warnings:this.warnings}}};Sc.NormalizationFactory=Zp;function Jle(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,f=new Set,y=[],I=new Set,v=new Map,F=[],k=[];for(let se of e)se.name&&(0,$le.recordSubgraphName)(se.name,d,f);let K=new ED.Graph;for(let se=0;se0&&F.push(...de.warnings),!de.success){k.push((0,le.subgraphValidationError)(Te,de.errors));continue}if(!de){k.push((0,le.subgraphValidationError)(Te,[le.subgraphValidationFailureError]));continue}l.set(Te,de.parentDefinitionDataByTypeName);for(let Re of de.authorizationDataByParentTypeName.values())(0,ir.upsertAuthorizationData)(t,Re,I);for(let[Re,xe]of de.fieldCoordsByNamedTypeName)(0,je.addIterableValuesToSet)(xe,(0,je.getValueOrDefault)(v,Re,()=>new Set));for(let[Re,xe]of de.concreteTypeNamesByAbstractTypeName){let tt=n.get(Re);if(!tt){n.set(Re,new Set(xe));continue}(0,je.addIterableValuesToSet)(xe,tt)}for(let[Re,xe]of de.entityDataByTypeName){let tt=xe.keyFieldSetDatasBySubgraphName.get(Te);tt&&(0,ir.upsertEntityData)({entityDataByTypeName:r,keyFieldSetDataByFieldSet:tt,typeName:Re,subgraphName:Te})}if(ie.name&&i.set(Te,{conditionalFieldDataByCoordinates:de.conditionalFieldDataByCoordinates,configurationDataByTypeName:de.configurationDataByTypeName,definitions:de.subgraphAST,entityInterfaces:de.entityInterfaces,isVersionTwo:de.isVersionTwo,keyFieldNamesByParentTypeName:de.keyFieldNamesByParentTypeName,name:Te,operationTypes:de.operationTypes,overriddenFieldNamesByParentTypeName:new Map,parentDefinitionDataByTypeName:de.parentDefinitionDataByTypeName,persistedDirectiveDefinitionDataByDirectiveName:de.persistedDirectiveDefinitionDataByDirectiveName,schema:de.schema,url:ie.url}),!(de.overridesByTargetSubgraphName.size<1))for(let[Re,xe]of de.overridesByTargetSubgraphName){let tt=d.has(Re);for(let[ee,Se]of xe){let _t=de.originalTypeNameByRenamedTypeName.get(ee)||ee;if(!tt)F.push((0,Wa.invalidOverrideTargetSubgraphNameWarning)(Re,_t,[...Se],ie.name));else{let en=(0,je.getValueOrDefault)(a,Re,()=>new Map),tn=(0,je.getValueOrDefault)(en,ee,()=>new Set(Se));(0,je.addIterableValuesToSet)(Se,tn)}for(let en of Se){let tn=`${_t}.${en}`,bn=o.get(tn);if(!bn){o.set(tn,[Te]);continue}bn.push(Te),c.add(tn)}}}}let J=[];if(I.size>0&&J.push((0,le.orScopesLimitError)(qt.MAX_OR_SCOPES,[...I])),(y.length>0||f.size>0)&&J.push((0,le.invalidSubgraphNamesError)([...f],y)),c.size>0){let se=[];for(let ie of c){let Te=(0,je.getOrThrowError)(o,ie,"overrideSourceSubgraphNamesByFieldPath");se.push((0,le.duplicateOverriddenFieldErrorMessage)(ie,Te))}J.push((0,le.duplicateOverriddenFieldsError)(se))}if(J.push(...k),J.length>0)return{errors:J,success:!1,warnings:F};for(let[se,ie]of a){let Te=(0,je.getOrThrowError)(i,se,"internalSubgraphBySubgraphName");Te.overriddenFieldNamesByParentTypeName=ie;for(let[de,Re]of ie){let xe=Te.configurationDataByTypeName.get(de);xe&&((0,ir.subtractSet)(Re,xe.fieldNames),xe.fieldNames.size<1&&Te.configurationDataByTypeName.delete(de))}}return{authorizationDataByParentTypeName:t,concreteTypeNamesByAbstractTypeName:n,entityDataByTypeName:r,fieldCoordsByNamedTypeName:v,internalSubgraphBySubgraphName:i,internalGraph:K,success:!0,warnings:F}}});var jE=w(bc=>{"use strict";m();T();N();Object.defineProperty(bc,"__esModule",{value:!0});bc.DivergentType=void 0;bc.getLeastRestrictiveMergedTypeNode=zle;bc.getMostRestrictiveMergedTypeNode=Wle;bc.renameNamedTypeName=Xle;var Oc=Ae(),mV=Mi(),Hle=du(),fV=Hr(),NV=gl(),Dc;(function(e){e[e.NONE=0]="NONE",e[e.CURRENT=1]="CURRENT",e[e.OTHER=2]="OTHER"})(Dc||(bc.DivergentType=Dc={}));function TV(e,t,n,r,i){t=(0,Hle.getMutableTypeNode)(t,n,i);let a={kind:e.kind},o=Dc.NONE,c=a;for(let l=0;l{"use strict";m();T();N();Object.defineProperty(ID,"__esModule",{value:!0});ID.renameRootTypes=tde;var Zle=Ae(),yD=Hr(),ede=jE(),_u=vr(),Ac=Sr();function tde(e,t){let n,r=!1,i;(0,Zle.visit)(t.definitions,{FieldDefinition:{enter(a){let o=a.name.value;if(r&&(o===_u.SERVICE_FIELD||o===_u.ENTITIES_FIELD))return n.fieldDataByName.delete(o),!1;let c=n.name,l=(0,Ac.getOrThrowError)(n.fieldDataByName,o,`${c}.fieldDataByFieldName`),d=t.operationTypes.get(l.namedTypeName);if(d){let f=(0,Ac.getOrThrowError)(yD.operationTypeNodeToDefaultType,d,_u.OPERATION_TO_DEFAULT);l.namedTypeName!==f&&(0,ede.renameNamedTypeName)(l,f,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,Ac.getOrThrowError)(t.parentDefinitionDataByTypeName,o,_u.PARENT_DEFINITION_DATA)},leave(){n=void 0}},ObjectTypeDefinition:{enter(a){let o=a.name.value,c=t.operationTypes.get(o),l=c?(0,Ac.getOrThrowError)(yD.operationTypeNodeToDefaultType,c,_u.OPERATION_TO_DEFAULT):o;n=(0,Ac.getOrThrowError)(t.parentDefinitionDataByTypeName,o,_u.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,Ac.getOrThrowError)(yD.operationTypeNodeToDefaultType,c,_u.OPERATION_TO_DEFAULT):o;n=(0,Ac.getOrThrowError)(t.parentDefinitionDataByTypeName,o,_u.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 EV=w((Xl,ef)=>{"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,f=2,y=4,I=1,v=2,F=1,k=2,K=4,J=8,se=16,ie=32,Te=64,de=128,Re=256,xe=512,tt=30,ee="...",Se=800,_t=16,en=1,tn=2,bn=3,Qt=1/0,mn=9007199254740991,Pr=17976931348623157e292,Fr=NaN,kn=4294967295,zt=kn-1,An=kn>>>1,ue=[["ary",de],["bind",F],["bindKey",k],["curry",J],["curryRight",se],["flip",xe],["partial",ie],["partialRight",Te],["rearg",Re]],De="[object Arguments]",ve="[object Array]",Ce="[object AsyncFunction]",vt="[object Boolean]",Y="[object Date]",oe="[object DOMException]",qe="[object Error]",Ye="[object Function]",Ut="[object GeneratorFunction]",nt="[object Map]",Rt="[object Number]",ns="[object Null]",Vr="[object Object]",rs="[object Promise]",xc="[object Proxy]",ga="[object RegExp]",mr="[object Set]",ni="[object String]",Vt="[object Symbol]",Nr="[object Undefined]",Du="[object WeakMap]",_a="[object WeakSet]",bu="[object ArrayBuffer]",R="[object DataView]",h="[object Float32Array]",g="[object Float64Array]",C="[object Int8Array]",G="[object Int16Array]",te="[object Int32Array]",pe="[object Uint8Array]",ft="[object Uint8ClampedArray]",Nn="[object Uint16Array]",on="[object Uint32Array]",yn=/\b__p \+= '';/g,nn=/\b(__p \+=) '' \+/g,z1=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gb=/&(?:amp|lt|gt|quot|#39);/g,_b=/[&<>"']/g,W1=RegExp(gb.source),X1=RegExp(_b.source),Z1=/<%-([\s\S]+?)%>/g,ej=/<%([\s\S]+?)%>/g,vb=/<%=([\s\S]+?)%>/g,tj=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nj=/^\w*$/,rj=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gh=/[\\^$.*+?()[\]{}|]/g,ij=RegExp(gh.source),_h=/^\s+/,aj=/\s/,sj=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oj=/\{\n\/\* \[wrapped with (.+)\] \*/,uj=/,? & /,cj=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lj=/[()=,{}\[\]\/\s]/,dj=/\\(\\)?/g,pj=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Sb=/\w*$/,fj=/^[-+]0x[0-9a-f]+$/i,mj=/^0b[01]+$/i,Nj=/^\[object .+?Constructor\]$/,Tj=/^0o[0-7]+$/i,Ej=/^(?:0|[1-9]\d*)$/,hj=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Sf=/($^)/,yj=/['\n\r\u2028\u2029\\]/g,Of="\\ud800-\\udfff",Ij="\\u0300-\\u036f",gj="\\ufe20-\\ufe2f",_j="\\u20d0-\\u20ff",Ob=Ij+gj+_j,Db="\\u2700-\\u27bf",bb="a-z\\xdf-\\xf6\\xf8-\\xff",vj="\\xac\\xb1\\xd7\\xf7",Sj="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Oj="\\u2000-\\u206f",Dj=" \\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",Ab="A-Z\\xc0-\\xd6\\xd8-\\xde",Rb="\\ufe0e\\ufe0f",Pb=vj+Sj+Oj+Dj,vh="['\u2019]",bj="["+Of+"]",Fb="["+Pb+"]",Df="["+Ob+"]",wb="\\d+",Aj="["+Db+"]",Lb="["+bb+"]",Cb="[^"+Of+Pb+wb+Db+bb+Ab+"]",Sh="\\ud83c[\\udffb-\\udfff]",Rj="(?:"+Df+"|"+Sh+")",Bb="[^"+Of+"]",Oh="(?:\\ud83c[\\udde6-\\uddff]){2}",Dh="[\\ud800-\\udbff][\\udc00-\\udfff]",qc="["+Ab+"]",Ub="\\u200d",kb="(?:"+Lb+"|"+Cb+")",Pj="(?:"+qc+"|"+Cb+")",Mb="(?:"+vh+"(?:d|ll|m|re|s|t|ve))?",xb="(?:"+vh+"(?:D|LL|M|RE|S|T|VE))?",qb=Rj+"?",Vb="["+Rb+"]?",Fj="(?:"+Ub+"(?:"+[Bb,Oh,Dh].join("|")+")"+Vb+qb+")*",wj="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Lj="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",jb=Vb+qb+Fj,Cj="(?:"+[Aj,Oh,Dh].join("|")+")"+jb,Bj="(?:"+[Bb+Df+"?",Df,Oh,Dh,bj].join("|")+")",Uj=RegExp(vh,"g"),kj=RegExp(Df,"g"),bh=RegExp(Sh+"(?="+Sh+")|"+Bj+jb,"g"),Mj=RegExp([qc+"?"+Lb+"+"+Mb+"(?="+[Fb,qc,"$"].join("|")+")",Pj+"+"+xb+"(?="+[Fb,qc+kb,"$"].join("|")+")",qc+"?"+kb+"+"+Mb,qc+"+"+xb,Lj,wj,wb,Cj].join("|"),"g"),xj=RegExp("["+Ub+Of+Ob+Rb+"]"),qj=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Vj=["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"],jj=-1,En={};En[h]=En[g]=En[C]=En[G]=En[te]=En[pe]=En[ft]=En[Nn]=En[on]=!0,En[De]=En[ve]=En[bu]=En[vt]=En[R]=En[Y]=En[qe]=En[Ye]=En[nt]=En[Rt]=En[Vr]=En[ga]=En[mr]=En[ni]=En[Du]=!1;var Tn={};Tn[De]=Tn[ve]=Tn[bu]=Tn[R]=Tn[vt]=Tn[Y]=Tn[h]=Tn[g]=Tn[C]=Tn[G]=Tn[te]=Tn[nt]=Tn[Rt]=Tn[Vr]=Tn[ga]=Tn[mr]=Tn[ni]=Tn[Vt]=Tn[pe]=Tn[ft]=Tn[Nn]=Tn[on]=!0,Tn[qe]=Tn[Ye]=Tn[Du]=!1;var Kj={\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"},Gj={"&":"&","<":"<",">":">",'"':""","'":"'"},$j={"&":"&","<":"<",">":">",""":'"',"'":"'"},Qj={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Yj=parseFloat,Jj=parseInt,Kb=typeof global=="object"&&global&&global.Object===Object&&global,Hj=typeof self=="object"&&self&&self.Object===Object&&self,ar=Kb||Hj||Function("return this")(),Ah=typeof Xl=="object"&&Xl&&!Xl.nodeType&&Xl,Au=Ah&&typeof ef=="object"&&ef&&!ef.nodeType&&ef,Gb=Au&&Au.exports===Ah,Rh=Gb&&Kb.process,hi=function(){try{var $=Au&&Au.require&&Au.require("util").types;return $||Rh&&Rh.binding&&Rh.binding("util")}catch(ce){}}(),$b=hi&&hi.isArrayBuffer,Qb=hi&&hi.isDate,Yb=hi&&hi.isMap,Jb=hi&&hi.isRegExp,Hb=hi&&hi.isSet,zb=hi&&hi.isTypedArray;function ri($,ce,ne){switch(ne.length){case 0:return $.call(ce);case 1:return $.call(ce,ne[0]);case 2:return $.call(ce,ne[0],ne[1]);case 3:return $.call(ce,ne[0],ne[1],ne[2])}return $.apply(ce,ne)}function zj($,ce,ne,Be){for(var ut=-1,Yt=$==null?0:$.length;++ut-1}function Ph($,ce,ne){for(var Be=-1,ut=$==null?0:$.length;++Be-1;);return ne}function i0($,ce){for(var ne=$.length;ne--&&Vc(ce,$[ne],0)>-1;);return ne}function aK($,ce){for(var ne=$.length,Be=0;ne--;)$[ne]===ce&&++Be;return Be}var sK=Ch(Kj),oK=Ch(Gj);function uK($){return"\\"+Qj[$]}function cK($,ce){return $==null?e:$[ce]}function jc($){return xj.test($)}function lK($){return qj.test($)}function dK($){for(var ce,ne=[];!(ce=$.next()).done;)ne.push(ce.value);return ne}function Mh($){var ce=-1,ne=Array($.size);return $.forEach(function(Be,ut){ne[++ce]=[ut,Be]}),ne}function a0($,ce){return function(ne){return $(ce(ne))}}function Go($,ce){for(var ne=-1,Be=$.length,ut=0,Yt=[];++ne-1}function XK(s,u){var p=this.__data__,E=Gf(p,s);return E<0?(++this.size,p.push([s,u])):p[E][1]=u,this}is.prototype.clear=JK,is.prototype.delete=HK,is.prototype.get=zK,is.prototype.has=WK,is.prototype.set=XK;function as(s){var u=-1,p=s==null?0:s.length;for(this.clear();++u=u?s:u)),s}function _i(s,u,p,E,S,L){var M,j=u&d,H=u&f,fe=u&y;if(p&&(M=S?p(s,E,S,L):p(s)),M!==e)return M;if(!vn(s))return s;var me=dt(s);if(me){if(M=n$(s),!j)return jr(s,M)}else{var he=hr(s),be=he==Ye||he==Ut;if(Wo(s))return V0(s,j);if(he==Vr||he==De||be&&!S){if(M=H||be?{}:sA(s),!j)return H?$G(s,mG(M,s)):GG(s,E0(M,s))}else{if(!Tn[he])return S?s:{};M=r$(s,he,j)}}L||(L=new Wi);var Ke=L.get(s);if(Ke)return Ke;L.set(s,M),BA(s)?s.forEach(function(et){M.add(_i(et,u,p,et,s,L))}):LA(s)&&s.forEach(function(et,St){M.set(St,_i(et,u,p,St,s,L))});var Ze=fe?H?ly:cy:H?Gr:sr,Et=me?e:Ze(s);return yi(Et||s,function(et,St){Et&&(St=et,et=s[St]),Td(M,St,_i(et,u,p,St,s,L))}),M}function NG(s){var u=sr(s);return function(p){return h0(p,s,u)}}function h0(s,u,p){var E=p.length;if(s==null)return!E;for(s=dn(s);E--;){var S=p[E],L=u[S],M=s[S];if(M===e&&!(S in s)||!L(M))return!1}return!0}function y0(s,u,p){if(typeof s!="function")throw new Ii(i);return vd(function(){s.apply(e,p)},u)}function Ed(s,u,p,E){var S=-1,L=bf,M=!0,j=s.length,H=[],fe=u.length;if(!j)return H;p&&(u=In(u,ii(p))),E?(L=Ph,M=!1):u.length>=n&&(L=ld,M=!1,u=new Fu(u));e:for(;++SS?0:S+p),E=E===e||E>S?S:Nt(E),E<0&&(E+=S),E=p>E?0:kA(E);p0&&p(j)?u>1?Tr(j,u-1,p,E,S):Ko(S,j):E||(S[S.length]=j)}return S}var $h=Y0(),_0=Y0(!0);function va(s,u){return s&&$h(s,u,sr)}function Qh(s,u){return s&&_0(s,u,sr)}function Qf(s,u){return jo(u,function(p){return ls(s[p])})}function Lu(s,u){u=Ho(u,s);for(var p=0,E=u.length;s!=null&&pu}function hG(s,u){return s!=null&&rn.call(s,u)}function yG(s,u){return s!=null&&u in dn(s)}function IG(s,u,p){return s>=Er(u,p)&&s=120&&me.length>=120)?new Fu(M&&me):e}me=s[0];var he=-1,be=j[0];e:for(;++he-1;)j!==s&&kf.call(j,H,1),kf.call(s,H,1);return s}function L0(s,u){for(var p=s?u.length:0,E=p-1;p--;){var S=u[p];if(p==E||S!==L){var L=S;cs(S)?kf.call(s,S,1):ny(s,S)}}return s}function Zh(s,u){return s+qf(f0()*(u-s+1))}function LG(s,u,p,E){for(var S=-1,L=zn(xf((u-s)/(p||1)),0),M=ne(L);L--;)M[E?L:++S]=s,s+=p;return M}function ey(s,u){var p="";if(!s||u<1||u>mn)return p;do u%2&&(p+=s),u=qf(u/2),u&&(s+=s);while(u);return p}function It(s,u){return Ey(cA(s,u,$r),s+"")}function CG(s){return T0(Xc(s))}function BG(s,u){var p=Xc(s);return rm(p,wu(u,0,p.length))}function Id(s,u,p,E){if(!vn(s))return s;u=Ho(u,s);for(var S=-1,L=u.length,M=L-1,j=s;j!=null&&++SS?0:S+u),p=p>S?S:p,p<0&&(p+=S),S=u>p?0:p-u>>>0,u>>>=0;for(var L=ne(S);++E>>1,M=s[L];M!==null&&!si(M)&&(p?M<=u:M=n){var fe=u?null:HG(s);if(fe)return Rf(fe);M=!1,S=ld,H=new Fu}else H=u?[]:j;e:for(;++E=E?s:vi(s,u,p)}var q0=DK||function(s){return ar.clearTimeout(s)};function V0(s,u){if(u)return s.slice();var p=s.length,E=u0?u0(p):new s.constructor(p);return s.copy(E),E}function sy(s){var u=new s.constructor(s.byteLength);return new Bf(u).set(new Bf(s)),u}function qG(s,u){var p=u?sy(s.buffer):s.buffer;return new s.constructor(p,s.byteOffset,s.byteLength)}function VG(s){var u=new s.constructor(s.source,Sb.exec(s));return u.lastIndex=s.lastIndex,u}function jG(s){return Nd?dn(Nd.call(s)):{}}function j0(s,u){var p=u?sy(s.buffer):s.buffer;return new s.constructor(p,s.byteOffset,s.length)}function K0(s,u){if(s!==u){var p=s!==e,E=s===null,S=s===s,L=si(s),M=u!==e,j=u===null,H=u===u,fe=si(u);if(!j&&!fe&&!L&&s>u||L&&M&&H&&!j&&!fe||E&&M&&H||!p&&H||!S)return 1;if(!E&&!L&&!fe&&s=j)return H;var fe=p[E];return H*(fe=="desc"?-1:1)}}return s.index-u.index}function G0(s,u,p,E){for(var S=-1,L=s.length,M=p.length,j=-1,H=u.length,fe=zn(L-M,0),me=ne(H+fe),he=!E;++j1?p[S-1]:e,M=S>2?p[2]:e;for(L=s.length>3&&typeof L=="function"?(S--,L):e,M&&Lr(p[0],p[1],M)&&(L=S<3?e:L,S=1),u=dn(u);++E-1?S[L?u[M]:M]:e}}function z0(s){return us(function(u){var p=u.length,E=p,S=gi.prototype.thru;for(s&&u.reverse();E--;){var L=u[E];if(typeof L!="function")throw new Ii(i);if(S&&!M&&tm(L)=="wrapper")var M=new gi([],!0)}for(E=M?E:p;++E1&&Pt.reverse(),me&&Hj))return!1;var fe=L.get(s),me=L.get(u);if(fe&&me)return fe==u&&me==s;var he=-1,be=!0,Ke=p&v?new Fu:e;for(L.set(s,u),L.set(u,s);++he1?"& ":"")+u[E],u=u.join(p>2?", ":" "),s.replace(sj,`{ /* [wrapped with `+u+`] */ `)}function a$(s){return dt(s)||Uu(s)||!!(d0&&s&&s[d0])}function cs(s,u){var p=typeof s;return u=u==null?mn:u,!!u&&(p=="number"||p!="symbol"&&Ej.test(s))&&s>-1&&s%1==0&&s0){if(++u>=Se)return arguments[0]}else u=0;return s.apply(e,arguments)}}function rm(s,u){var p=-1,E=s.length,S=E-1;for(u=u===e?E:u;++p1?s[u-1]:e;return p=typeof p=="function"?(s.pop(),p):e,gA(s,p)});function _A(s){var u=P(s);return u.__chain__=!0,u}function TQ(s,u){return u(s),s}function im(s,u){return u(s)}var EQ=us(function(s){var u=s.length,p=u?s[0]:0,E=this.__wrapped__,S=function(L){return Gh(L,s)};return u>1||this.__actions__.length||!(E instanceof Ot)||!cs(p)?this.thru(S):(E=E.slice(p,+p+(u?1:0)),E.__actions__.push({func:im,args:[S],thisArg:e}),new gi(E,this.__chain__).thru(function(L){return u&&!L.length&&L.push(e),L}))});function hQ(){return _A(this)}function yQ(){return new gi(this.value(),this.__chain__)}function IQ(){this.__values__===e&&(this.__values__=UA(this.value()));var s=this.__index__>=this.__values__.length,u=s?e:this.__values__[this.__index__++];return{done:s,value:u}}function gQ(){return this}function _Q(s){for(var u,p=this;p instanceof Kf;){var E=NA(p);E.__index__=0,E.__values__=e,u?S.__wrapped__=E:u=E;var S=E;p=p.__wrapped__}return S.__wrapped__=s,u}function vQ(){var s=this.__wrapped__;if(s instanceof Ot){var u=s;return this.__actions__.length&&(u=new Ot(this)),u=u.reverse(),u.__actions__.push({func:im,args:[hy],thisArg:e}),new gi(u,this.__chain__)}return this.thru(hy)}function SQ(){return M0(this.__wrapped__,this.__actions__)}var OQ=zf(function(s,u,p){rn.call(s,p)?++s[p]:ss(s,p,1)});function DQ(s,u,p){var E=dt(s)?Wb:TG;return p&&Lr(s,u,p)&&(u=e),E(s,We(u,3))}function bQ(s,u){var p=dt(s)?jo:g0;return p(s,We(u,3))}var AQ=H0(TA),RQ=H0(EA);function PQ(s,u){return Tr(am(s,u),1)}function FQ(s,u){return Tr(am(s,u),Qt)}function wQ(s,u,p){return p=p===e?1:Nt(p),Tr(am(s,u),p)}function vA(s,u){var p=dt(s)?yi:Yo;return p(s,We(u,3))}function SA(s,u){var p=dt(s)?Wj:I0;return p(s,We(u,3))}var LQ=zf(function(s,u,p){rn.call(s,p)?s[p].push(u):ss(s,p,[u])});function CQ(s,u,p,E){s=Kr(s)?s:Xc(s),p=p&&!E?Nt(p):0;var S=s.length;return p<0&&(p=zn(S+p,0)),lm(s)?p<=S&&s.indexOf(u,p)>-1:!!S&&Vc(s,u,p)>-1}var BQ=It(function(s,u,p){var E=-1,S=typeof u=="function",L=Kr(s)?ne(s.length):[];return Yo(s,function(M){L[++E]=S?ri(u,M,p):hd(M,u,p)}),L}),UQ=zf(function(s,u,p){ss(s,p,u)});function am(s,u){var p=dt(s)?In:b0;return p(s,We(u,3))}function kQ(s,u,p,E){return s==null?[]:(dt(u)||(u=u==null?[]:[u]),p=E?e:p,dt(p)||(p=p==null?[]:[p]),F0(s,u,p))}var MQ=zf(function(s,u,p){s[p?0:1].push(u)},function(){return[[],[]]});function xQ(s,u,p){var E=dt(s)?Fh:t0,S=arguments.length<3;return E(s,We(u,4),p,S,Yo)}function qQ(s,u,p){var E=dt(s)?Xj:t0,S=arguments.length<3;return E(s,We(u,4),p,S,I0)}function VQ(s,u){var p=dt(s)?jo:g0;return p(s,um(We(u,3)))}function jQ(s){var u=dt(s)?T0:CG;return u(s)}function KQ(s,u,p){(p?Lr(s,u,p):u===e)?u=1:u=Nt(u);var E=dt(s)?dG:BG;return E(s,u)}function GQ(s){var u=dt(s)?pG:kG;return u(s)}function $Q(s){if(s==null)return 0;if(Kr(s))return lm(s)?Kc(s):s.length;var u=hr(s);return u==nt||u==mr?s.size:zh(s).length}function QQ(s,u,p){var E=dt(s)?wh:MG;return p&&Lr(s,u,p)&&(u=e),E(s,We(u,3))}var YQ=It(function(s,u){if(s==null)return[];var p=u.length;return p>1&&Lr(s,u[0],u[1])?u=[]:p>2&&Lr(u[0],u[1],u[2])&&(u=[u[0]]),F0(s,Tr(u,1),[])}),sm=bK||function(){return ar.Date.now()};function JQ(s,u){if(typeof u!="function")throw new Ii(i);return s=Nt(s),function(){if(--s<1)return u.apply(this,arguments)}}function OA(s,u,p){return u=p?e:u,u=s&&u==null?s.length:u,os(s,de,e,e,e,e,u)}function DA(s,u){var p;if(typeof u!="function")throw new Ii(i);return s=Nt(s),function(){return--s>0&&(p=u.apply(this,arguments)),s<=1&&(u=e),p}}var Iy=It(function(s,u,p){var E=F;if(p.length){var S=Go(p,zc(Iy));E|=ie}return os(s,E,u,p,S)}),bA=It(function(s,u,p){var E=F|k;if(p.length){var S=Go(p,zc(bA));E|=ie}return os(u,E,s,p,S)});function AA(s,u,p){u=p?e:u;var E=os(s,J,e,e,e,e,e,u);return E.placeholder=AA.placeholder,E}function RA(s,u,p){u=p?e:u;var E=os(s,se,e,e,e,e,e,u);return E.placeholder=RA.placeholder,E}function PA(s,u,p){var E,S,L,M,j,H,fe=0,me=!1,he=!1,be=!0;if(typeof s!="function")throw new Ii(i);u=Oi(u)||0,vn(p)&&(me=!!p.leading,he="maxWait"in p,L=he?zn(Oi(p.maxWait)||0,u):L,be="trailing"in p?!!p.trailing:be);function Ke(xn){var Zi=E,ps=S;return E=S=e,fe=xn,M=s.apply(ps,Zi),M}function Ze(xn){return fe=xn,j=vd(St,u),me?Ke(xn):M}function Et(xn){var Zi=xn-H,ps=xn-fe,HA=u-Zi;return he?Er(HA,L-ps):HA}function et(xn){var Zi=xn-H,ps=xn-fe;return H===e||Zi>=u||Zi<0||he&&ps>=L}function St(){var xn=sm();if(et(xn))return Pt(xn);j=vd(St,Et(xn))}function Pt(xn){return j=e,be&&E?Ke(xn):(E=S=e,M)}function oi(){j!==e&&q0(j),fe=0,E=H=S=j=e}function Cr(){return j===e?M:Pt(sm())}function ui(){var xn=sm(),Zi=et(xn);if(E=arguments,S=this,H=xn,Zi){if(j===e)return Ze(H);if(he)return q0(j),j=vd(St,u),Ke(H)}return j===e&&(j=vd(St,u)),M}return ui.cancel=oi,ui.flush=Cr,ui}var HQ=It(function(s,u){return y0(s,1,u)}),zQ=It(function(s,u,p){return y0(s,Oi(u)||0,p)});function WQ(s){return os(s,xe)}function om(s,u){if(typeof s!="function"||u!=null&&typeof u!="function")throw new Ii(i);var p=function(){var E=arguments,S=u?u.apply(this,E):E[0],L=p.cache;if(L.has(S))return L.get(S);var M=s.apply(this,E);return p.cache=L.set(S,M)||L,M};return p.cache=new(om.Cache||as),p}om.Cache=as;function um(s){if(typeof s!="function")throw new Ii(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 XQ(s){return DA(2,s)}var ZQ=xG(function(s,u){u=u.length==1&&dt(u[0])?In(u[0],ii(We())):In(Tr(u,1),ii(We()));var p=u.length;return It(function(E){for(var S=-1,L=Er(E.length,p);++S=u}),Uu=S0(function(){return arguments}())?S0:function(s){return Rn(s)&&rn.call(s,"callee")&&!l0.call(s,"callee")},dt=ne.isArray,m2=$b?ii($b):_G;function Kr(s){return s!=null&&cm(s.length)&&!ls(s)}function Mn(s){return Rn(s)&&Kr(s)}function N2(s){return s===!0||s===!1||Rn(s)&&wr(s)==vt}var Wo=RK||wy,T2=Qb?ii(Qb):vG;function E2(s){return Rn(s)&&s.nodeType===1&&!Sd(s)}function h2(s){if(s==null)return!0;if(Kr(s)&&(dt(s)||typeof s=="string"||typeof s.splice=="function"||Wo(s)||Wc(s)||Uu(s)))return!s.length;var u=hr(s);if(u==nt||u==mr)return!s.size;if(_d(s))return!zh(s).length;for(var p in s)if(rn.call(s,p))return!1;return!0}function y2(s,u){return yd(s,u)}function I2(s,u,p){p=typeof p=="function"?p:e;var E=p?p(s,u):e;return E===e?yd(s,u,e,p):!!E}function _y(s){if(!Rn(s))return!1;var u=wr(s);return u==qe||u==oe||typeof s.message=="string"&&typeof s.name=="string"&&!Sd(s)}function g2(s){return typeof s=="number"&&p0(s)}function ls(s){if(!vn(s))return!1;var u=wr(s);return u==Ye||u==Ut||u==Ce||u==xc}function wA(s){return typeof s=="number"&&s==Nt(s)}function cm(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=mn}function vn(s){var u=typeof s;return s!=null&&(u=="object"||u=="function")}function Rn(s){return s!=null&&typeof s=="object"}var LA=Yb?ii(Yb):OG;function _2(s,u){return s===u||Hh(s,u,py(u))}function v2(s,u,p){return p=typeof p=="function"?p:e,Hh(s,u,py(u),p)}function S2(s){return CA(s)&&s!=+s}function O2(s){if(u$(s))throw new ut(r);return O0(s)}function D2(s){return s===null}function b2(s){return s==null}function CA(s){return typeof s=="number"||Rn(s)&&wr(s)==Rt}function Sd(s){if(!Rn(s)||wr(s)!=Vr)return!1;var u=Uf(s);if(u===null)return!0;var p=rn.call(u,"constructor")&&u.constructor;return typeof p=="function"&&p instanceof p&&wf.call(p)==vK}var vy=Jb?ii(Jb):DG;function A2(s){return wA(s)&&s>=-mn&&s<=mn}var BA=Hb?ii(Hb):bG;function lm(s){return typeof s=="string"||!dt(s)&&Rn(s)&&wr(s)==ni}function si(s){return typeof s=="symbol"||Rn(s)&&wr(s)==Vt}var Wc=zb?ii(zb):AG;function R2(s){return s===e}function P2(s){return Rn(s)&&hr(s)==Du}function F2(s){return Rn(s)&&wr(s)==_a}var w2=em(Wh),L2=em(function(s,u){return s<=u});function UA(s){if(!s)return[];if(Kr(s))return lm(s)?zi(s):jr(s);if(dd&&s[dd])return dK(s[dd]());var u=hr(s),p=u==nt?Mh:u==mr?Rf:Xc;return p(s)}function ds(s){if(!s)return s===0?s:0;if(s=Oi(s),s===Qt||s===-Qt){var u=s<0?-1:1;return u*Pr}return s===s?s:0}function Nt(s){var u=ds(s),p=u%1;return u===u?p?u-p:u:0}function kA(s){return s?wu(Nt(s),0,kn):0}function Oi(s){if(typeof s=="number")return s;if(si(s))return Fr;if(vn(s)){var u=typeof s.valueOf=="function"?s.valueOf():s;s=vn(u)?u+"":u}if(typeof s!="string")return s===0?s:+s;s=n0(s);var p=mj.test(s);return p||Tj.test(s)?Jj(s.slice(2),p?2:8):fj.test(s)?Fr:+s}function MA(s){return Sa(s,Gr(s))}function C2(s){return s?wu(Nt(s),-mn,mn):s===0?s:0}function Wt(s){return s==null?"":ai(s)}var B2=Jc(function(s,u){if(_d(u)||Kr(u)){Sa(u,sr(u),s);return}for(var p in u)rn.call(u,p)&&Td(s,p,u[p])}),xA=Jc(function(s,u){Sa(u,Gr(u),s)}),dm=Jc(function(s,u,p,E){Sa(u,Gr(u),s,E)}),U2=Jc(function(s,u,p,E){Sa(u,sr(u),s,E)}),k2=us(Gh);function M2(s,u){var p=Yc(s);return u==null?p:E0(p,u)}var x2=It(function(s,u){s=dn(s);var p=-1,E=u.length,S=E>2?u[2]:e;for(S&&Lr(u[0],u[1],S)&&(E=1);++p1),L}),Sa(s,ly(s),p),E&&(p=_i(p,d|f|y,zG));for(var S=u.length;S--;)ny(p,u[S]);return p});function rY(s,u){return VA(s,um(We(u)))}var iY=us(function(s,u){return s==null?{}:FG(s,u)});function VA(s,u){if(s==null)return{};var p=In(ly(s),function(E){return[E]});return u=We(u),w0(s,p,function(E,S){return u(E,S[0])})}function aY(s,u,p){u=Ho(u,s);var E=-1,S=u.length;for(S||(S=1,s=e);++Eu){var E=s;s=u,u=E}if(p||s%1||u%1){var S=f0();return Er(s+S*(u-s+Yj("1e-"+((S+"").length-1))),u)}return Zh(s,u)}var TY=Hc(function(s,u,p){return u=u.toLowerCase(),s+(p?GA(u):u)});function GA(s){return Dy(Wt(s).toLowerCase())}function $A(s){return s=Wt(s),s&&s.replace(hj,sK).replace(kj,"")}function EY(s,u,p){s=Wt(s),u=ai(u);var E=s.length;p=p===e?E:wu(Nt(p),0,E);var S=p;return p-=u.length,p>=0&&s.slice(p,S)==u}function hY(s){return s=Wt(s),s&&X1.test(s)?s.replace(_b,oK):s}function yY(s){return s=Wt(s),s&&ij.test(s)?s.replace(gh,"\\$&"):s}var IY=Hc(function(s,u,p){return s+(p?"-":"")+u.toLowerCase()}),gY=Hc(function(s,u,p){return s+(p?" ":"")+u.toLowerCase()}),_Y=J0("toLowerCase");function vY(s,u,p){s=Wt(s),u=Nt(u);var E=u?Kc(s):0;if(!u||E>=u)return s;var S=(u-E)/2;return Zf(qf(S),p)+s+Zf(xf(S),p)}function SY(s,u,p){s=Wt(s),u=Nt(u);var E=u?Kc(s):0;return u&&E>>0,p?(s=Wt(s),s&&(typeof u=="string"||u!=null&&!vy(u))&&(u=ai(u),!u&&jc(s))?zo(zi(s),0,p):s.split(u,p)):[]}var FY=Hc(function(s,u,p){return s+(p?" ":"")+Dy(u)});function wY(s,u,p){return s=Wt(s),p=p==null?0:wu(Nt(p),0,s.length),u=ai(u),s.slice(p,p+u.length)==u}function LY(s,u,p){var E=P.templateSettings;p&&Lr(s,u,p)&&(u=e),s=Wt(s),u=dm({},u,E,tA);var S=dm({},u.imports,E.imports,tA),L=sr(S),M=kh(S,L),j,H,fe=0,me=u.interpolate||Sf,he="__p += '",be=xh((u.escape||Sf).source+"|"+me.source+"|"+(me===vb?pj:Sf).source+"|"+(u.evaluate||Sf).source+"|$","g"),Ke="//# sourceURL="+(rn.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++jj+"]")+` diff --git a/composition/src/resolvability-graph/graph-nodes.ts b/composition/src/resolvability-graph/graph-nodes.ts index 06262cb87f..86c4d649ae 100644 --- a/composition/src/resolvability-graph/graph-nodes.ts +++ b/composition/src/resolvability-graph/graph-nodes.ts @@ -66,7 +66,7 @@ export class GraphNode { return accessibleEntityNodeNames; } - getAccessibleEntityNodeNames(node: GraphNode, accessibleEntityNodeNames: Set) { + getAccessibleEntityNodeNames(node: GraphNode, accessibleEntityNodeNames: Set) { for (const edge of node.entityEdges) { if (!add(accessibleEntityNodeNames, edge.node.nodeName)) { continue; @@ -88,9 +88,9 @@ export class RootNode { this.typeName = typeName; } - removeInaccessibleEdges(fieldDataByFieldName: Map) { + removeInaccessibleEdges(fieldDataByName: Map) { for (const [fieldName, edges] of this.headToSharedTailEdges) { - if (fieldDataByFieldName.has(fieldName)) { + if (fieldDataByName.has(fieldName)) { continue; } for (const edge of edges) { diff --git a/composition/src/resolvability-graph/types/types.ts b/composition/src/resolvability-graph/types/types.ts index cfbd2eafe2..d35afb2453 100644 --- a/composition/src/resolvability-graph/types/types.ts +++ b/composition/src/resolvability-graph/types/types.ts @@ -1,7 +1,7 @@ export type VisitNodeResult = { visited: boolean; areDescendantsResolved: boolean; - isRevisitedNode?: boolean; + isRevisitedNode?: true; }; export type FieldName = string; diff --git a/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts b/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts index 140b1bd273..354de4213e 100644 --- a/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts +++ b/composition/src/resolvability-graph/walker/entity-walker/entity-walker.ts @@ -120,13 +120,13 @@ export class EntityWalker { return { visited: true, areDescendantsResolved: true }; } } - let removeDescendantPaths: boolean | undefined = undefined; + let removeDescendantPaths: true | undefined = undefined; for (const [fieldName, edge] of node.headToTailEdges) { const { visited, areDescendantsResolved, isRevisitedNode } = this.visitEntityDescendantEdge({ edge, selectionPath, }); - removeDescendantPaths &&= isRevisitedNode; + removeDescendantPaths ??= isRevisitedNode; this.propagateVisitedField({ areDescendantsResolved, fieldName,