import { Observable as l } from "./index-Observable.js";
import { iterator as m } from "./index-iterator.js";
import { isFunction as v } from "./index-isFunction.js";
import { executeSchedule as a } from "./index-executeSchedule.js";
function h(i, n) {
  return new l(function(t) {
    var r;
    return a(t, n, function() {
      r = i[m](), a(t, n, function() {
        var e, o, u;
        try {
          e = r.next(), o = e.value, u = e.done;
        } catch (f) {
          t.error(f);
          return;
        }
        u ? t.complete() : t.next(o);
      }, 0, !0);
    }), function() {
      return v(r == null ? void 0 : r.return) && r.return();
    };
  });
}
export {
  h as scheduleIterable
};
