async capture(instance, list, depth) {
    var _a, _b;

    if (!instance) return null;
    const id = this.captureId(instance);
    const name = (0, util_1.getInstanceName)(instance);
    const children = this.getInternalInstanceChildrenByInstance(instance).filter(child => !(0, util_1.isBeingDestroyed)(child));
    const parents = this.getComponentParents(instance) || [];
    const inactive = !!instance.isDeactivated || parents.some(parent => parent.isDeactivated);
    const treeNode = {
      uid: instance.uid,
      id,
      name,
      renderKey: (0, util_1.getRenderKey)(instance.vnode ? instance.vnode.key : null),
      inactive,
      hasChildren: !!children.length,
      children: [],
      isFragment: (0, util_1.isFragment)(instance),
      tags: typeof instance.type !== 'function' ? [] : [{
        label: 'functional',
        textColor: 0x555555,
        backgroundColor: 0xeeeeee
      }],
      autoOpen: this.recursively
    };

    if (false) {}

    if (true) {
      treeNode.route = instance.attrs.__pagePath || '';
    }

    if (false) {} // capture children


    if (depth < this.maxDepth || instance.type.__isKeepAlive || parents.some(parent => parent.type.__isKeepAlive)) {
      treeNode.children = await Promise.all(children.map((child, index, list) => this.capture(child, list, depth + 1)).filter(Boolean));
    } // keep-alive


    if (this.isKeepAlive(instance)) {
      const cachedComponents = this.getKeepAliveCachedInstances(instance);
      const childrenIds = children.map(child => child.__VUE_DEVTOOLS_UID__);

      for (const cachedChild of cachedComponents) {
        if (!childrenIds.includes(cachedChild.__VUE_DEVTOOLS_UID__)) {
          const node = await this.capture({ ...cachedChild,
            isDeactivated: true
          }, null, depth + 1);

          if (node) {
            treeNode.children.push(node);
          }
        }
      }
    } // ensure correct ordering


    const rootElements = (0, el_1.getRootElementsFromComponentInstance)(instance);
    const firstElement = rootElements[0];

    if (firstElement === null || firstElement === void 0 ? void 0 : firstElement.parentElement) {
      const parentInstance = instance.parent;
      const parentRootElements = parentInstance ? (0, el_1.getRootElementsFromComponentInstance)(parentInstance) : [];
      let el = firstElement;
      const indexList = [];

      do {
        indexList.push(Array.from(el.parentElement.childNodes).indexOf(el));
        el = el.parentElement;
      } while (el.parentElement && parentRootElements.length && !parentRootElements.includes(el));

      treeNode.domOrder = indexList.reverse();
    } else {
      treeNode.domOrder = [-1];
    }

    if ((_b = instance.suspense) === null || _b === void 0 ? void 0 : _b.suspenseKey) {
      treeNode.tags.push({
        label: instance.suspense.suspenseKey,
        backgroundColor: 0xe492e4,
        textColor: 0xffffff
      }); // update instanceMap

      this.mark(instance, true);
    }

    return this.api.visitComponentTree(instance, treeNode, this.componentFilter.filter, this.ctx.currentAppRecord.options.app);
  }
Capture the meta information of an instance. (recursive)

@param {Vue} instance
@return {Object}