{"version":3,"sources":["asynciterable/operators/skipuntil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,MAAM,OAAO,sBAAgC,SAAQ,cAAuB;IAI1E,YAAY,MAA8B,EAAE,KAAyB;QACnE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QAC3B,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC;QAC7C,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE;YACrC,IAAI,SAAS,EAAE;gBACb,MAAM,IAAI,CAAC;aACZ;SACF;IACH,CAAC;CACF;AAED,MAAM,UAAU,SAAS,CACvB,KAAyB;IAEzB,OAAO,SAAS,yBAAyB,CACvC,MAA8B;QAE9B,OAAO,IAAI,sBAAsB,CAAU,MAAM,EAAE,KAAK,CAAC,CAAC;IAC5D,CAAC,CAAC;AACJ,CAAC","file":"skipuntil.js","sourcesContent":["import { AsyncIterableX } from '../asynciterablex';\nimport { MonoTypeOperatorAsyncFunction } from '../../interfaces';\n\nexport class SkipUntilAsyncIterable<TSource> extends AsyncIterableX<TSource> {\n  private _source: AsyncIterable<TSource>;\n  private _other: () => Promise<any>;\n\n  constructor(source: AsyncIterable<TSource>, other: () => Promise<any>) {\n    super();\n    this._source = source;\n    this._other = other;\n  }\n\n  async *[Symbol.asyncIterator]() {\n    let otherDone = false;\n    this._other().then(() => (otherDone = true));\n    for await (const item of this._source) {\n      if (otherDone) {\n        yield item;\n      }\n    }\n  }\n}\n\nexport function skipUntil<TSource>(\n  other: () => Promise<any>\n): MonoTypeOperatorAsyncFunction<TSource> {\n  return function skipUntilOperatorFunction(\n    source: AsyncIterable<TSource>\n  ): AsyncIterableX<TSource> {\n    return new SkipUntilAsyncIterable<TSource>(source, other);\n  };\n}\n"]}