import { set } from "./schedule.js";
function end_default() {
	var t, n, r = this, i = r._id, a = r.size();
	return new Promise(function(o, s) {
		var c = { value: s }, l = { value: function() {
			--a === 0 && o();
		} };
		r.each(function() {
			var r = set(this, i), a = r.on;
			a !== t && (n = (t = a).copy(), n._.cancel.push(c), n._.interrupt.push(c), n._.end.push(l)), r.on = n;
		}), a === 0 && o();
	});
}
export { end_default as default };
