package d0.f0; import d0.z.d.m; import java.util.Iterator; import java.util.NoSuchElementException; import kotlin.jvm.functions.Function1; import kotlin.sequences.Sequence; /* compiled from: Sequences.kt */ public final class h implements Sequence { public final Sequence a; public final Function1 b; /* renamed from: c reason: collision with root package name */ public final Function1> f2697c; /* compiled from: Sequences.kt */ public static final class a implements Iterator, d0.z.d.g0.a { public final Iterator i; public Iterator j; public final /* synthetic */ h k; public a(h hVar) { this.k = hVar; this.i = h.access$getSequence$p(hVar).iterator(); } public final boolean a() { Iterator it = this.j; if (it != null && !it.hasNext()) { this.j = null; } while (true) { if (this.j == null) { if (this.i.hasNext()) { Iterator it2 = (Iterator) h.access$getIterator$p(this.k).invoke(h.access$getTransformer$p(this.k).invoke(this.i.next())); if (it2.hasNext()) { this.j = it2; break; } } else { return false; } } else { break; } } return true; } @Override // java.util.Iterator public boolean hasNext() { return a(); } @Override // java.util.Iterator public E next() { if (a()) { Iterator it = this.j; m.checkNotNull(it); return (E) it.next(); } throw new NoSuchElementException(); } @Override // java.util.Iterator public void remove() { throw new UnsupportedOperationException("Operation is not supported for read-only collection"); } } /* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: kotlin.sequences.Sequence */ /* JADX DEBUG: Multi-variable search result rejected for r3v0, resolved type: kotlin.jvm.functions.Function1 */ /* JADX DEBUG: Multi-variable search result rejected for r4v0, resolved type: kotlin.jvm.functions.Function1> */ /* JADX WARN: Multi-variable type inference failed */ public h(Sequence sequence, Function1 function1, Function1> function12) { m.checkNotNullParameter(sequence, "sequence"); m.checkNotNullParameter(function1, "transformer"); m.checkNotNullParameter(function12, "iterator"); this.a = sequence; this.b = function1; this.f2697c = function12; } public static final /* synthetic */ Function1 access$getIterator$p(h hVar) { return hVar.f2697c; } public static final /* synthetic */ Sequence access$getSequence$p(h hVar) { return hVar.a; } public static final /* synthetic */ Function1 access$getTransformer$p(h hVar) { return hVar.b; } @Override // kotlin.sequences.Sequence public Iterator iterator() { return new a(this); } }