"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CachingElementIdsContainer = void 0;
/** @internal */
class CachingElementIdsContainer {
    constructor(_generator) {
        this._generator = _generator;
        this._ids = new Array();
    }
    async next() { return (await this._generator.next()).value; }
    async *getElementIds() {
        for (const id of this._ids) {
            yield id;
        }
        let nextId;
        while (nextId = await this.next()) {
            this._ids.push(nextId);
            yield nextId;
        }
    }
}
exports.CachingElementIdsContainer = CachingElementIdsContainer;
//# sourceMappingURL=Utils.js.map