{"version":3,"file":"withLoadingIndicator.cjs","sources":["../../../src/utils/withLoadingIndicator.ts"],"sourcesContent":["import { merge, Observable, timer } from 'rxjs';\nimport { mapTo, takeUntil } from 'rxjs/operators';\n\n/**\n * @internal\n */\nexport type WithLoadingIndicatorOptions<T> = {\n  whileLoading: T;\n  source: Observable<T>;\n};\n\n/**\n * @internal\n */\nexport function withLoadingIndicator<T>({ whileLoading, source }: WithLoadingIndicatorOptions<T>): Observable<T> {\n  return merge(timer(200).pipe(mapTo(whileLoading), takeUntil(source)), source);\n}\n"],"names":["merge","timer","mapTo","takeUntil"],"mappings":";;;;;;;;AAcO,SAAS,oBAAA,CAAwB,EAAE,YAAA,EAAc,MAAA,EAAO,EAAkD;AAC/G,EAAA,OAAOA,UAAA,CAAMC,UAAA,CAAM,GAAG,CAAA,CAAE,IAAA,CAAKC,eAAA,CAAM,YAAY,CAAA,EAAGC,mBAAA,CAAU,MAAM,CAAC,CAAA,EAAG,MAAM,CAAA;AAC9E;;;;"}