addVertex(i, a, n, u, l, f, c = {}, A) {
    var U, T;
    if (!i || i.trim().length === 0)
      return;
    let r;
    if (A !== void 0) {
      let d;
      A.includes(`
`) ? d = A + `
` : d = `{
` + A + `
}`, r = te(d, { schema: ee });
    }
    const b = this.edges.find((d) => d.id === i);
    if (b) {
      const d = r;
      (d == null ? void 0 : d.animate) !== void 0 && (b.animate = d.animate), (d == null ? void 0 : d.animation) !== void 0 && (b.animation = d.animation);
      return;
    }
    let F, k = this.vertices.get(i);
    if (k === void 0 && (k = {
      id: i,
      labelType: "text",
      domId: he + i + "-" + this.vertexCounter,
      styles: [],
      classes: []
    }, this.vertices.set(i, k)), this.vertexCounter++, a !== void 0 ? (this.config = G1(), F = this.sanitizeText(a.text.trim()), k.labelType = a.type, F.startsWith('"') && F.endsWith('"') && (F = F.substring(1, F.length - 1)), k.text = F) : k.text === void 0 && (k.text = i), n !== void 0 && (k.type = n), u != null && u.forEach((d) => {
      k.styles.push(d);
    }), l != null && l.forEach((d) => {
      k.classes.push(d);
    }), f !== void 0 && (k.dir = f), k.props === void 0 ? k.props = c : c !== void 0 && Object.assign(k.props, c), r !== void 0) {
      if (r.shape) {
        if (r.shape !== r.shape.toLowerCase() || r.shape.includes("_"))
          throw new Error(`No such shape: ${r.shape}. Shape names should be lowercase.`);
        if (!se(r.shape))
          throw new Error(`No such shape: ${r.shape}.`);
        k.type = r == null ? void 0 : r.shape;
      }
      r != null && r.label && (k.text = r == null ? void 0 : r.label), r != null && r.icon && (k.icon = r == null ? void 0 : r.icon, !((U = r.label) != null && U.trim()) && k.text === i && (k.text = "")), r != null && r.form && (k.form = r == null ? void 0 : r.form), r != null && r.pos && (k.pos = r == null ? void 0 : r.pos), r != null && r.img && (k.img = r == null ? void 0 : r.img, !((T = r.label) != null && T.trim()) && k.text === i && (k.text = "")), r != null && r.constraint && (k.constraint = r.constraint), r.w && (k.assetWidth = Number(r.w)), r.h && (k.assetHeight = Number(r.h));
    }
  }
Function called by parser when a node definition has been found