<section class="team">
<div class="container">
<div class="team__text">
<div class="team__title"></div>
<div class="team__sup-title"></div>
</div>
<div class="team__cards">
<div class="team__card team__card--type">
<img src="" alt="">
<div class="team__name"></div>
<div class="team__position"></div>
<div class="team__socials">
<img src="" alt="" class="team__icon">
<img src="" alt="" class="team__icon">
<img src="" alt="" class="team__icon">
<img src="" alt="" class="team__icon">
</div>
</div>
</div>
</div>
</section>
let pending$ = new BehaviorSubject(false);
let cachedValue$ = new BehaviorSubject(null);
let observable$ = subject$.pipe(
withLatestFrom(pending$),
filter(([value, pending]) => !pending),
exhaustMap(([value]) => {
pending$.next(true);
return timer(1000).pipe(
mapTo(value),
tap(result => {
pending$.next(false);
cachedValue$.next(result);
})
);
}),
shareReplay(1)
);