{
  "definitions": [
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/converters/reason.reference.converter.ts",
          "name": "describedRecords",
          "source": {
            "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-reason-reference-converter-ts",
            "json": "https://banes-lab.com/json/source/build-scripts/core/converters/reason.reference.converter.ts",
            "label": "core/converters/reason.reference.converter.ts",
            "markdown": "https://banes-lab.com/source/build-scripts/core/converters/reason.reference.converter.ts.md",
            "ref": "anatomy:file-build-scripts-core-converters-reason-reference-converter-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 59,
      "name": "describedNode",
      "signature": "const describedNode = function describedNode(record: ReferenceRecord, node: ReasonNodeView): ReferenceRecord {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/converters/reason.reference.converter.ts",
          "name": "describedRecords",
          "source": {
            "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-reason-reference-converter-ts",
            "json": "https://banes-lab.com/json/source/build-scripts/core/converters/reason.reference.converter.ts",
            "label": "core/converters/reason.reference.converter.ts",
            "markdown": "https://banes-lab.com/source/build-scripts/core/converters/reason.reference.converter.ts.md",
            "ref": "anatomy:file-build-scripts-core-converters-reason-reference-converter-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 68,
      "name": "describedLoop",
      "signature": "const describedLoop = function describedLoop(record: ReferenceRecord, loop: DerivationLoopView): ReferenceRecord {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/converters/reference.converter.ts",
          "name": "referencesOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-reference-converter-ts",
            "json": "https://banes-lab.com/json/source/build-scripts/core/converters/reference.converter.ts",
            "label": "core/converters/reference.converter.ts",
            "markdown": "https://banes-lab.com/source/build-scripts/core/converters/reference.converter.ts.md",
            "ref": "anatomy:file-build-scripts-core-converters-reference-converter-ts"
          }
        }
      ],
      "exported": true,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 115,
      "name": "reasonReferencesOf",
      "signature": "export const reasonReferencesOf = function reasonReferencesOf(reason: ReasonView): ReferenceIndex {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/converters/reference.converter.ts",
          "name": "referencesOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-reference-converter-ts",
            "json": "https://banes-lab.com/json/source/build-scripts/core/converters/reference.converter.ts",
            "label": "core/converters/reference.converter.ts",
            "markdown": "https://banes-lab.com/source/build-scripts/core/converters/reference.converter.ts.md",
            "ref": "anatomy:file-build-scripts-core-converters-reference-converter-ts"
          }
        }
      ],
      "exported": true,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 143,
      "name": "stageReferencesOf",
      "signature": "export const stageReferencesOf = function stageReferencesOf(reason: ReasonView): ReferenceIndex {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/converters/reason.reference.converter.ts",
          "name": "describedLoop",
          "source": {
            "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-reason-reference-converter-ts",
            "json": "https://banes-lab.com/json/source/build-scripts/core/converters/reason.reference.converter.ts",
            "label": "core/converters/reason.reference.converter.ts",
            "markdown": "https://banes-lab.com/source/build-scripts/core/converters/reason.reference.converter.ts.md",
            "ref": "anatomy:file-build-scripts-core-converters-reason-reference-converter-ts"
          }
        },
        {
          "file": "core/converters/reason.reference.converter.ts",
          "name": "describedNode",
          "source": {
            "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-reason-reference-converter-ts",
            "json": "https://banes-lab.com/json/source/build-scripts/core/converters/reason.reference.converter.ts",
            "label": "core/converters/reason.reference.converter.ts",
            "markdown": "https://banes-lab.com/source/build-scripts/core/converters/reason.reference.converter.ts.md",
            "ref": "anatomy:file-build-scripts-core-converters-reason-reference-converter-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 82,
      "name": "describedRecords",
      "signature": "const describedRecords = function describedRecords("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 10,
      "name": "HYPHEN",
      "signature": "const HYPHEN = \"-\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 11,
      "name": "MODEL_KIND",
      "signature": "const MODEL_KIND = \"model\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 12,
      "name": "STAGES_RELATION",
      "signature": "const STAGES_RELATION = \"stages\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 13,
      "name": "STAGE_KIND",
      "signature": "const STAGE_KIND = \"stage\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "interface_declaration",
      "line": 15,
      "name": "Anchored",
      "signature": "interface Anchored {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 20,
      "name": "kindOfAnchor",
      "signature": "const kindOfAnchor = function kindOfAnchor(anchor: string, id: string): string {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 24,
      "name": "reasonCollections",
      "signature": "const reasonCollections = function reasonCollections(reason: ReasonView): readonly (readonly Anchored[])[] {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 46,
      "name": "inboundOf",
      "signature": "const inboundOf = function inboundOf(records: ReadonlyMap<string, ReferenceRecord>): ReadonlyMap<string, EdgeRef[]> {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 49,
      "name": "targets",
      "signature": "const targets = record.relations.flatMap((relation) => relation.edges.map((edge) => edge.ref));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 69,
      "name": "stages",
      "signature": "const stages = loop.stages.map((stage) => ({ label: titleOf(stage.id), ref: refOf(STAGE_FACE, stage.id) }));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 86,
      "name": "nodes",
      "signature": "const nodes = new Map(reason.nodes.map((node) => [refOf(REASON_FACE, node.anchor), node]));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 87,
      "name": "loopRef",
      "signature": "const loopRef = refOf(REASON_FACE, reason.derivationLoop.anchor);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 90,
      "name": "node",
      "signature": "const node = nodes.get(ref);"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 99,
      "name": "describeSubstrate",
      "signature": "const describeSubstrate = function describeSubstrate("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 107,
      "name": "models",
      "signature": "const models = (inbound.get(ref) ?? [])"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 116,
      "name": "built",
      "signature": "const built = new Map("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 124,
      "name": "outbound",
      "signature": "const outbound = describedRecords(reason, built);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 125,
      "name": "inbound",
      "signature": "const inbound = inboundOf(outbound);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 126,
      "name": "substrate",
      "signature": "const substrate = describeSubstrate(reason, outbound, inbound);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 129,
      "name": "referencedBy",
      "signature": "const referencedBy = inbound.get(ref) ?? [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 144,
      "name": "index",
      "signature": "const index: Record<string, ReferenceRecord> = {};"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 145,
      "name": "questions",
      "signature": "const questions = new Map(reason.axes.map((axis) => [refOf(REASON_FACE, axis.anchor), axis.question]));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 147,
      "name": "ref",
      "signature": "const ref = refOf(STAGE_FACE, stage.id);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 148,
      "name": "summary",
      "signature": "const summary = stage.axis.ref === null ? null : (questions.get(stage.axis.ref) ?? null);"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-reason-reference-converter-ts",
  "language": "typescript",
  "layer": "processing",
  "name": "reason.reference.converter.ts",
  "path": "core/converters/reason.reference.converter.ts",
  "ref": "anatomy:file-build-scripts-core-converters-reason-reference-converter-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/build-scripts#folder-build-scripts-core-converters",
          "json": "https://banes-lab.com/json/anatomy/build-scripts/folder-build-scripts-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-converters.md",
          "ref": "chapter:/anatomy/build-scripts#folder-build-scripts-core-converters"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-reference-converter-ts",
          "json": "https://banes-lab.com/json/source/build-scripts/core/converters/reference.converter.ts",
          "label": "core/converters/reference.converter.ts",
          "markdown": "https://banes-lab.com/source/build-scripts/core/converters/reference.converter.ts.md",
          "ref": "anatomy:file-build-scripts-core-converters-reference-converter-ts"
        }
      ],
      "relation": "used-by"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/build-scripts#folder-build-scripts-core-converters",
          "json": "https://banes-lab.com/json/anatomy/build-scripts/folder-build-scripts-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-converters.md",
          "ref": "chapter:/anatomy/build-scripts#folder-build-scripts-core-converters"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "converter",
    "subject": "reason",
    "variant": "reference"
  },
  "stats": {
    "bytes": 6027,
    "callable": 9,
    "definitions": 29,
    "edges": 2,
    "exported": 11,
    "files": 1,
    "findings": {},
    "flows": {
      "leaf": 4,
      "entry": 1,
      "isolated": 24
    },
    "lines": {
      "blank": 11,
      "code": 141,
      "total": 152
    }
  },
  "summary": "141 lines of code and 29 definitions.",
  "text": "https://banes-lab.com/source/build-scripts/core/converters/reason.reference.converter.ts.txt",
  "tree": "build-scripts",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-record-converter-ts",
      "json": "https://banes-lab.com/json/source/build-scripts/core/converters/record.converter.ts",
      "label": "core/converters/record.converter.ts",
      "markdown": "https://banes-lab.com/source/build-scripts/core/converters/record.converter.ts.md",
      "ref": "anatomy:file-build-scripts-core-converters-record-converter-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/build-scripts#file-build-scripts-core-converters-reason-loop-converter-ts",
      "json": "https://banes-lab.com/json/source/build-scripts/core/converters/reason.loop.converter.ts",
      "label": "core/converters/reason.loop.converter.ts",
      "markdown": "https://banes-lab.com/source/build-scripts/core/converters/reason.loop.converter.ts.md",
      "ref": "anatomy:file-build-scripts-core-converters-reason-loop-converter-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/build-scripts/core/converters",
    "label": "core/converters",
    "markdown": "https://banes-lab.com/api/source/build-scripts/core/converters.md",
    "ref": "api:source/build-scripts/core/converters"
  }
}
