@byomakase/omakase-player
Version:
## Omakase Player - Open source JavaScript framework for building frame accurate video experiences
1,825 lines • 4.16 MB
JavaScript
import e, { ErrorDetails as t, Events as n } from "hls.js";
//#region \0rolldown/runtime.js
var r = Object.create, i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, o = Object.getOwnPropertyNames, s = Object.getPrototypeOf, c = Object.prototype.hasOwnProperty, l = (e, t) => () => (e && (t = e(e = 0)), t), u = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), d = (e, t) => {
let n = {};
for (var r in e) i(n, r, {
get: e[r],
enumerable: !0
});
return t || i(n, Symbol.toStringTag, { value: "Module" }), n;
}, f = (e, t, n, r) => {
if (t && typeof t == "object" || typeof t == "function") for (var s = o(t), l = 0, u = s.length, d; l < u; l++) d = s[l], !c.call(e, d) && d !== n && i(e, d, {
get: ((e) => t[e]).bind(null, d),
enumerable: !(r = a(t, d)) || r.enumerable
});
return e;
}, p = (e, t, n) => (n = e == null ? {} : r(s(e)), f(t || !e || !e.__esModule ? i(n, "default", {
value: e,
enumerable: !0
}) : n, e)), m = (e) => c.call(e, "module.exports") ? e["module.exports"] : f(i({}, "__esModule", { value: !0 }), e), h = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
if (typeof require < "u") return require.apply(this, arguments);
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
}), g = function(e, t) {
return g = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
}, g(e, t);
};
function _(e, t) {
if (typeof t != "function" && t !== null) throw TypeError("Class extends value " + String(t) + " is not a constructor or null");
g(e, t);
function n() {
this.constructor = e;
}
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
}
function v(e, t, n, r) {
function i(e) {
return e instanceof n ? e : new n(function(t) {
t(e);
});
}
return new (n ||= Promise)(function(n, a) {
function o(e) {
try {
c(r.next(e));
} catch (e) {
a(e);
}
}
function s(e) {
try {
c(r.throw(e));
} catch (e) {
a(e);
}
}
function c(e) {
e.done ? n(e.value) : i(e.value).then(o, s);
}
c((r = r.apply(e, t || [])).next());
});
}
function y(e, t) {
var n = {
label: 0,
sent: function() {
if (a[0] & 1) throw a[1];
return a[1];
},
trys: [],
ops: []
}, r, i, a, o = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
return o.next = s(0), o.throw = s(1), o.return = s(2), typeof Symbol == "function" && (o[Symbol.iterator] = function() {
return this;
}), o;
function s(e) {
return function(t) {
return c([e, t]);
};
}
function c(s) {
if (r) throw TypeError("Generator is already executing.");
for (; o && (o = 0, s[0] && (n = 0)), n;) try {
if (r = 1, i && (a = s[0] & 2 ? i.return : s[0] ? i.throw || ((a = i.return) && a.call(i), 0) : i.next) && !(a = a.call(i, s[1])).done) return a;
switch (i = 0, a && (s = [s[0] & 2, a.value]), s[0]) {
case 0:
case 1:
a = s;
break;
case 4: return n.label++, {
value: s[1],
done: !1
};
case 5:
n.label++, i = s[1], s = [0];
continue;
case 7:
s = n.ops.pop(), n.trys.pop();
continue;
default:
if ((a = n.trys, !(a = a.length > 0 && a[a.length - 1])) && (s[0] === 6 || s[0] === 2)) {
n = 0;
continue;
}
if (s[0] === 3 && (!a || s[1] > a[0] && s[1] < a[3])) {
n.label = s[1];
break;
}
if (s[0] === 6 && n.label < a[1]) {
n.label = a[1], a = s;
break;
}
if (a && n.label < a[2]) {
n.label = a[2], n.ops.push(s);
break;
}
a[2] && n.ops.pop(), n.trys.pop();
continue;
}
s = t.call(e, n);
} catch (e) {
s = [6, e], i = 0;
} finally {
r = a = 0;
}
if (s[0] & 5) throw s[1];
return {
value: s[0] ? s[1] : void 0,
done: !0
};
}
}
function b(e) {
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
if (n) return n.call(e);
if (e && typeof e.length == "number") return { next: function() {
return e && r >= e.length && (e = void 0), {
value: e && e[r++],
done: !e
};
} };
throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function x(e, t) {
var n = typeof Symbol == "function" && e[Symbol.iterator];
if (!n) return e;
var r = n.call(e), i, a = [], o;
try {
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
} catch (e) {
o = { error: e };
} finally {
try {
i && !i.done && (n = r.return) && n.call(r);
} finally {
if (o) throw o.error;
}
}
return a;
}
function S(e, t, n) {
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
return e.concat(a || Array.prototype.slice.call(t));
}
function C(e) {
return this instanceof C ? (this.v = e, this) : new C(e);
}
function w(e, t, n) {
if (!Symbol.asyncIterator) throw TypeError("Symbol.asyncIterator is not defined.");
var r = n.apply(e, t || []), i, a = [];
return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), s("next"), s("throw"), s("return", o), i[Symbol.asyncIterator] = function() {
return this;
}, i;
function o(e) {
return function(t) {
return Promise.resolve(t).then(e, d);
};
}
function s(e, t) {
r[e] && (i[e] = function(t) {
return new Promise(function(n, r) {
a.push([
e,
t,
n,
r
]) > 1 || c(e, t);
});
}, t && (i[e] = t(i[e])));
}
function c(e, t) {
try {
l(r[e](t));
} catch (e) {
f(a[0][3], e);
}
}
function l(e) {
e.value instanceof C ? Promise.resolve(e.value.v).then(u, d) : f(a[0][2], e);
}
function u(e) {
c("next", e);
}
function d(e) {
c("throw", e);
}
function f(e, t) {
e(t), a.shift(), a.length && c(a[0][0], a[0][1]);
}
}
function T(e) {
if (!Symbol.asyncIterator) throw TypeError("Symbol.asyncIterator is not defined.");
var t = e[Symbol.asyncIterator], n;
return t ? t.call(e) : (e = typeof b == "function" ? b(e) : e[Symbol.iterator](), n = {}, r("next"), r("throw"), r("return"), n[Symbol.asyncIterator] = function() {
return this;
}, n);
function r(t) {
n[t] = e[t] && function(n) {
return new Promise(function(r, a) {
n = e[t](n), i(r, a, n.done, n.value);
});
};
}
function i(e, t, n, r) {
Promise.resolve(r).then(function(t) {
e({
value: t,
done: n
});
}, t);
}
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/isFunction.js
function E(e) {
return typeof e == "function";
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js
function D(e) {
var t = e(function(e) {
Error.call(e), e.stack = (/* @__PURE__ */ Error()).stack;
});
return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t;
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js
var O = D(function(e) {
return function(t) {
e(this), this.message = t ? t.length + " errors occurred during unsubscription:\n" + t.map(function(e, t) {
return t + 1 + ") " + e.toString();
}).join("\n ") : "", this.name = "UnsubscriptionError", this.errors = t;
};
});
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/arrRemove.js
function k(e, t) {
if (e) {
var n = e.indexOf(t);
0 <= n && e.splice(n, 1);
}
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/Subscription.js
var A = function() {
function e(e) {
this.initialTeardown = e, this.closed = !1, this._parentage = null, this._finalizers = null;
}
return e.prototype.unsubscribe = function() {
var e, t, n, r, i;
if (!this.closed) {
this.closed = !0;
var a = this._parentage;
if (a) if (this._parentage = null, Array.isArray(a)) try {
for (var o = b(a), s = o.next(); !s.done; s = o.next()) s.value.remove(this);
} catch (t) {
e = { error: t };
} finally {
try {
s && !s.done && (t = o.return) && t.call(o);
} finally {
if (e) throw e.error;
}
}
else a.remove(this);
var c = this.initialTeardown;
if (E(c)) try {
c();
} catch (e) {
i = e instanceof O ? e.errors : [e];
}
var l = this._finalizers;
if (l) {
this._finalizers = null;
try {
for (var u = b(l), d = u.next(); !d.done; d = u.next()) {
var f = d.value;
try {
ee(f);
} catch (e) {
i ??= [], e instanceof O ? i = S(S([], x(i)), x(e.errors)) : i.push(e);
}
}
} catch (e) {
n = { error: e };
} finally {
try {
d && !d.done && (r = u.return) && r.call(u);
} finally {
if (n) throw n.error;
}
}
}
if (i) throw new O(i);
}
}, e.prototype.add = function(t) {
if (t && t !== this) if (this.closed) ee(t);
else {
if (t instanceof e) {
if (t.closed || t._hasParent(this)) return;
t._addParent(this);
}
(this._finalizers = this._finalizers ?? []).push(t);
}
}, e.prototype._hasParent = function(e) {
var t = this._parentage;
return t === e || Array.isArray(t) && t.includes(e);
}, e.prototype._addParent = function(e) {
var t = this._parentage;
this._parentage = Array.isArray(t) ? (t.push(e), t) : t ? [t, e] : e;
}, e.prototype._removeParent = function(e) {
var t = this._parentage;
t === e ? this._parentage = null : Array.isArray(t) && k(t, e);
}, e.prototype.remove = function(t) {
var n = this._finalizers;
n && k(n, t), t instanceof e && t._removeParent(this);
}, e.EMPTY = (function() {
var t = new e();
return t.closed = !0, t;
})(), e;
}(), j = A.EMPTY;
function M(e) {
return e instanceof A || e && "closed" in e && E(e.remove) && E(e.add) && E(e.unsubscribe);
}
function ee(e) {
E(e) ? e() : e.unsubscribe();
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/config.js
var N = {
onUnhandledError: null,
onStoppedNotification: null,
Promise: void 0,
useDeprecatedSynchronousErrorHandling: !1,
useDeprecatedNextContext: !1
}, P = {
setTimeout: function(e, t) {
var n = [...arguments].slice(2), r = P.delegate;
return r?.setTimeout ? r.setTimeout.apply(r, S([e, t], x(n))) : setTimeout.apply(void 0, S([e, t], x(n)));
},
clearTimeout: function(e) {
return (P.delegate?.clearTimeout || clearTimeout)(e);
},
delegate: void 0
};
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js
function te(e) {
P.setTimeout(function() {
var t = N.onUnhandledError;
if (t) t(e);
else throw e;
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/noop.js
function ne() {}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/NotificationFactories.js
var re = (function() {
return ae("C", void 0, void 0);
})();
function F(e) {
return ae("E", void 0, e);
}
function ie(e) {
return ae("N", e, void 0);
}
function ae(e, t, n) {
return {
kind: e,
value: t,
error: n
};
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/errorContext.js
var oe = null;
function se(e) {
if (N.useDeprecatedSynchronousErrorHandling) {
var t = !oe;
if (t && (oe = {
errorThrown: !1,
error: null
}), e(), t) {
var n = oe, r = n.errorThrown, i = n.error;
if (oe = null, r) throw i;
}
} else e();
}
function ce(e) {
N.useDeprecatedSynchronousErrorHandling && oe && (oe.errorThrown = !0, oe.error = e);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/Subscriber.js
var le = function(e) {
_(t, e);
function t(t) {
var n = e.call(this) || this;
return n.isStopped = !1, t ? (n.destination = t, M(t) && t.add(n)) : n.destination = _e, n;
}
return t.create = function(e, t, n) {
return new pe(e, t, n);
}, t.prototype.next = function(e) {
this.isStopped ? ge(ie(e), this) : this._next(e);
}, t.prototype.error = function(e) {
this.isStopped ? ge(F(e), this) : (this.isStopped = !0, this._error(e));
}, t.prototype.complete = function() {
this.isStopped ? ge(re, this) : (this.isStopped = !0, this._complete());
}, t.prototype.unsubscribe = function() {
this.closed || (this.isStopped = !0, e.prototype.unsubscribe.call(this), this.destination = null);
}, t.prototype._next = function(e) {
this.destination.next(e);
}, t.prototype._error = function(e) {
try {
this.destination.error(e);
} finally {
this.unsubscribe();
}
}, t.prototype._complete = function() {
try {
this.destination.complete();
} finally {
this.unsubscribe();
}
}, t;
}(A), ue = Function.prototype.bind;
function de(e, t) {
return ue.call(e, t);
}
var fe = function() {
function e(e) {
this.partialObserver = e;
}
return e.prototype.next = function(e) {
var t = this.partialObserver;
if (t.next) try {
t.next(e);
} catch (e) {
me(e);
}
}, e.prototype.error = function(e) {
var t = this.partialObserver;
if (t.error) try {
t.error(e);
} catch (e) {
me(e);
}
else me(e);
}, e.prototype.complete = function() {
var e = this.partialObserver;
if (e.complete) try {
e.complete();
} catch (e) {
me(e);
}
}, e;
}(), pe = function(e) {
_(t, e);
function t(t, n, r) {
var i = e.call(this) || this, a;
if (E(t) || !t) a = {
next: t ?? void 0,
error: n ?? void 0,
complete: r ?? void 0
};
else {
var o;
i && N.useDeprecatedNextContext ? (o = Object.create(t), o.unsubscribe = function() {
return i.unsubscribe();
}, a = {
next: t.next && de(t.next, o),
error: t.error && de(t.error, o),
complete: t.complete && de(t.complete, o)
}) : a = t;
}
return i.destination = new fe(a), i;
}
return t;
}(le);
function me(e) {
N.useDeprecatedSynchronousErrorHandling ? ce(e) : te(e);
}
function he(e) {
throw e;
}
function ge(e, t) {
var n = N.onStoppedNotification;
n && P.setTimeout(function() {
return n(e, t);
});
}
var _e = {
closed: !0,
next: ne,
error: he,
complete: ne
}, ve = (function() {
return typeof Symbol == "function" && Symbol.observable || "@@observable";
})();
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/identity.js
function ye(e) {
return e;
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/pipe.js
function be(e) {
return e.length === 0 ? ye : e.length === 1 ? e[0] : function(t) {
return e.reduce(function(e, t) {
return t(e);
}, t);
};
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/Observable.js
var I = function() {
function e(e) {
e && (this._subscribe = e);
}
return e.prototype.lift = function(t) {
var n = new e();
return n.source = this, n.operator = t, n;
}, e.prototype.subscribe = function(e, t, n) {
var r = this, i = Ce(e) ? e : new pe(e, t, n);
return se(function() {
var e = r, t = e.operator, n = e.source;
i.add(t ? t.call(i, n) : n ? r._subscribe(i) : r._trySubscribe(i));
}), i;
}, e.prototype._trySubscribe = function(e) {
try {
return this._subscribe(e);
} catch (t) {
e.error(t);
}
}, e.prototype.forEach = function(e, t) {
var n = this;
return t = xe(t), new t(function(t, r) {
var i = new pe({
next: function(t) {
try {
e(t);
} catch (e) {
r(e), i.unsubscribe();
}
},
error: r,
complete: t
});
n.subscribe(i);
});
}, e.prototype._subscribe = function(e) {
return this.source?.subscribe(e);
}, e.prototype[ve] = function() {
return this;
}, e.prototype.pipe = function() {
return be([...arguments])(this);
}, e.prototype.toPromise = function(e) {
var t = this;
return e = xe(e), new e(function(e, n) {
var r;
t.subscribe(function(e) {
return r = e;
}, function(e) {
return n(e);
}, function() {
return e(r);
});
});
}, e.create = function(t) {
return new e(t);
}, e;
}();
function xe(e) {
return e ?? N.Promise ?? Promise;
}
function Se(e) {
return e && E(e.next) && E(e.error) && E(e.complete);
}
function Ce(e) {
return e && e instanceof le || Se(e) && M(e);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/lift.js
function we(e) {
return E(e?.lift);
}
function Te(e) {
return function(t) {
if (we(t)) return t.lift(function(t) {
try {
return e(t, this);
} catch (e) {
this.error(e);
}
});
throw TypeError("Unable to lift unknown Observable type");
};
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js
function Ee(e, t, n, r, i) {
return new De(e, t, n, r, i);
}
var De = function(e) {
_(t, e);
function t(t, n, r, i, a, o) {
var s = e.call(this, t) || this;
return s.onFinalize = a, s.shouldUnsubscribe = o, s._next = n ? function(e) {
try {
n(e);
} catch (e) {
t.error(e);
}
} : e.prototype._next, s._error = i ? function(e) {
try {
i(e);
} catch (e) {
t.error(e);
} finally {
this.unsubscribe();
}
} : e.prototype._error, s._complete = r ? function() {
try {
r();
} catch (e) {
t.error(e);
} finally {
this.unsubscribe();
}
} : e.prototype._complete, s;
}
return t.prototype.unsubscribe = function() {
var t;
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
var n = this.closed;
e.prototype.unsubscribe.call(this), !n && ((t = this.onFinalize) == null || t.call(this));
}
}, t;
}(le), Oe = D(function(e) {
return function() {
e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
};
}), L = function(e) {
_(t, e);
function t() {
var t = e.call(this) || this;
return t.closed = !1, t.currentObservers = null, t.observers = [], t.isStopped = !1, t.hasError = !1, t.thrownError = null, t;
}
return t.prototype.lift = function(e) {
var t = new ke(this, this);
return t.operator = e, t;
}, t.prototype._throwIfClosed = function() {
if (this.closed) throw new Oe();
}, t.prototype.next = function(e) {
var t = this;
se(function() {
var n, r;
if (t._throwIfClosed(), !t.isStopped) {
t.currentObservers ||= Array.from(t.observers);
try {
for (var i = b(t.currentObservers), a = i.next(); !a.done; a = i.next()) a.value.next(e);
} catch (e) {
n = { error: e };
} finally {
try {
a && !a.done && (r = i.return) && r.call(i);
} finally {
if (n) throw n.error;
}
}
}
});
}, t.prototype.error = function(e) {
var t = this;
se(function() {
if (t._throwIfClosed(), !t.isStopped) {
t.hasError = t.isStopped = !0, t.thrownError = e;
for (var n = t.observers; n.length;) n.shift().error(e);
}
});
}, t.prototype.complete = function() {
var e = this;
se(function() {
if (e._throwIfClosed(), !e.isStopped) {
e.isStopped = !0;
for (var t = e.observers; t.length;) t.shift().complete();
}
});
}, t.prototype.unsubscribe = function() {
this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
}, Object.defineProperty(t.prototype, "observed", {
get: function() {
return this.observers?.length > 0;
},
enumerable: !1,
configurable: !0
}), t.prototype._trySubscribe = function(t) {
return this._throwIfClosed(), e.prototype._trySubscribe.call(this, t);
}, t.prototype._subscribe = function(e) {
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
}, t.prototype._innerSubscribe = function(e) {
var t = this, n = this, r = n.hasError, i = n.isStopped, a = n.observers;
return r || i ? j : (this.currentObservers = null, a.push(e), new A(function() {
t.currentObservers = null, k(a, e);
}));
}, t.prototype._checkFinalizedStatuses = function(e) {
var t = this, n = t.hasError, r = t.thrownError, i = t.isStopped;
n ? e.error(r) : i && e.complete();
}, t.prototype.asObservable = function() {
var e = new I();
return e.source = this, e;
}, t.create = function(e, t) {
return new ke(e, t);
}, t;
}(I), ke = function(e) {
_(t, e);
function t(t, n) {
var r = e.call(this) || this;
return r.destination = t, r.source = n, r;
}
return t.prototype.next = function(e) {
var t, n;
(n = (t = this.destination)?.next) == null || n.call(t, e);
}, t.prototype.error = function(e) {
var t, n;
(n = (t = this.destination)?.error) == null || n.call(t, e);
}, t.prototype.complete = function() {
var e, t;
(t = (e = this.destination)?.complete) == null || t.call(e);
}, t.prototype._subscribe = function(e) {
return this.source?.subscribe(e) ?? j;
}, t;
}(L), Ae = function(e) {
_(t, e);
function t(t) {
var n = e.call(this) || this;
return n._value = t, n;
}
return Object.defineProperty(t.prototype, "value", {
get: function() {
return this.getValue();
},
enumerable: !1,
configurable: !0
}), t.prototype._subscribe = function(t) {
var n = e.prototype._subscribe.call(this, t);
return !n.closed && t.next(this._value), n;
}, t.prototype.getValue = function() {
var e = this, t = e.hasError, n = e.thrownError, r = e._value;
if (t) throw n;
return this._throwIfClosed(), r;
}, t.prototype.next = function(t) {
e.prototype.next.call(this, this._value = t);
}, t;
}(L), je = {
now: function() {
return (je.delegate || Date).now();
},
delegate: void 0
}, Me = function(e) {
_(t, e);
function t(t, n, r) {
t === void 0 && (t = Infinity), n === void 0 && (n = Infinity), r === void 0 && (r = je);
var i = e.call(this) || this;
return i._bufferSize = t, i._windowTime = n, i._timestampProvider = r, i._buffer = [], i._infiniteTimeWindow = !0, i._infiniteTimeWindow = n === Infinity, i._bufferSize = Math.max(1, t), i._windowTime = Math.max(1, n), i;
}
return t.prototype.next = function(t) {
var n = this, r = n.isStopped, i = n._buffer, a = n._infiniteTimeWindow, o = n._timestampProvider, s = n._windowTime;
r || (i.push(t), !a && i.push(o.now() + s)), this._trimBuffer(), e.prototype.next.call(this, t);
}, t.prototype._subscribe = function(e) {
this._throwIfClosed(), this._trimBuffer();
for (var t = this._innerSubscribe(e), n = this, r = n._infiniteTimeWindow, i = n._buffer.slice(), a = 0; a < i.length && !e.closed; a += r ? 1 : 2) e.next(i[a]);
return this._checkFinalizedStatuses(e), t;
}, t.prototype._trimBuffer = function() {
var e = this, t = e._bufferSize, n = e._timestampProvider, r = e._buffer, i = e._infiniteTimeWindow, a = (i ? 1 : 2) * t;
if (t < Infinity && a < r.length && r.splice(0, r.length - a), !i) {
for (var o = n.now(), s = 0, c = 1; c < r.length && r[c] <= o; c += 2) s = c;
s && r.splice(0, s + 1);
}
}, t;
}(L), Ne = function(e) {
_(t, e);
function t(t, n) {
return e.call(this) || this;
}
return t.prototype.schedule = function(e, t) {
return t === void 0 && (t = 0), this;
}, t;
}(A), Pe = {
setInterval: function(e, t) {
var n = [...arguments].slice(2), r = Pe.delegate;
return r?.setInterval ? r.setInterval.apply(r, S([e, t], x(n))) : setInterval.apply(void 0, S([e, t], x(n)));
},
clearInterval: function(e) {
return (Pe.delegate?.clearInterval || clearInterval)(e);
},
delegate: void 0
}, Fe = function(e) {
_(t, e);
function t(t, n) {
var r = e.call(this, t, n) || this;
return r.scheduler = t, r.work = n, r.pending = !1, r;
}
return t.prototype.schedule = function(e, t) {
if (t === void 0 && (t = 0), this.closed) return this;
this.state = e;
var n = this.id, r = this.scheduler;
return n != null && (this.id = this.recycleAsyncId(r, n, t)), this.pending = !0, this.delay = t, this.id = this.id ?? this.requestAsyncId(r, this.id, t), this;
}, t.prototype.requestAsyncId = function(e, t, n) {
return n === void 0 && (n = 0), Pe.setInterval(e.flush.bind(e, this), n);
}, t.prototype.recycleAsyncId = function(e, t, n) {
if (n === void 0 && (n = 0), n != null && this.delay === n && this.pending === !1) return t;
t != null && Pe.clearInterval(t);
}, t.prototype.execute = function(e, t) {
if (this.closed) return /* @__PURE__ */ Error("executing a cancelled action");
this.pending = !1;
var n = this._execute(e, t);
if (n) return n;
this.pending === !1 && this.id != null && (this.id = this.recycleAsyncId(this.scheduler, this.id, null));
}, t.prototype._execute = function(e, t) {
var n = !1, r;
try {
this.work(e);
} catch (e) {
n = !0, r = e || /* @__PURE__ */ Error("Scheduled action threw falsy error");
}
if (n) return this.unsubscribe(), r;
}, t.prototype.unsubscribe = function() {
if (!this.closed) {
var t = this, n = t.id, r = t.scheduler, i = r.actions;
this.work = this.state = this.scheduler = null, this.pending = !1, k(i, this), n != null && (this.id = this.recycleAsyncId(r, n, null)), this.delay = null, e.prototype.unsubscribe.call(this);
}
}, t;
}(Ne), Ie = function() {
function e(t, n) {
n === void 0 && (n = e.now), this.schedulerActionCtor = t, this.now = n;
}
return e.prototype.schedule = function(e, t, n) {
return t === void 0 && (t = 0), new this.schedulerActionCtor(this, e).schedule(n, t);
}, e.now = je.now, e;
}(), Le = function(e) {
_(t, e);
function t(t, n) {
n === void 0 && (n = Ie.now);
var r = e.call(this, t, n) || this;
return r.actions = [], r._active = !1, r;
}
return t.prototype.flush = function(e) {
var t = this.actions;
if (this._active) {
t.push(e);
return;
}
var n;
this._active = !0;
do
if (n = e.execute(e.state, e.delay)) break;
while (e = t.shift());
if (this._active = !1, n) {
for (; e = t.shift();) e.unsubscribe();
throw n;
}
}, t;
}(Ie), Re = new Le(Fe), ze = Re, Be = function(e) {
_(t, e);
function t(t, n) {
var r = e.call(this, t, n) || this;
return r.scheduler = t, r.work = n, r;
}
return t.prototype.schedule = function(t, n) {
return n === void 0 && (n = 0), n > 0 ? e.prototype.schedule.call(this, t, n) : (this.delay = n, this.state = t, this.scheduler.flush(this), this);
}, t.prototype.execute = function(t, n) {
return n > 0 || this.closed ? e.prototype.execute.call(this, t, n) : this._execute(t, n);
}, t.prototype.requestAsyncId = function(t, n, r) {
return r === void 0 && (r = 0), r != null && r > 0 || r == null && this.delay > 0 ? e.prototype.requestAsyncId.call(this, t, n, r) : (t.flush(this), 0);
}, t;
}(Fe), Ve = new (function(e) {
_(t, e);
function t() {
return e !== null && e.apply(this, arguments) || this;
}
return t;
}(Le))(Be), He = new I(function(e) {
return e.complete();
});
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/isScheduler.js
function Ue(e) {
return e && E(e.schedule);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/args.js
function We(e) {
return e[e.length - 1];
}
function Ge(e) {
return E(We(e)) ? e.pop() : void 0;
}
function Ke(e) {
return Ue(We(e)) ? e.pop() : void 0;
}
function qe(e, t) {
return typeof We(e) == "number" ? e.pop() : t;
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js
var Je = (function(e) {
return e && typeof e.length == "number" && typeof e != "function";
});
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/isPromise.js
function Ye(e) {
return E(e?.then);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js
function Xe(e) {
return E(e[ve]);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js
function Ze(e) {
return Symbol.asyncIterator && E(e?.[Symbol.asyncIterator]);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js
function Qe(e) {
return /* @__PURE__ */ TypeError("You provided " + (typeof e == "object" && e ? "an invalid object" : "'" + e + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/symbol/iterator.js
function $e() {
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
}
var et = $e();
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/isIterable.js
function tt(e) {
return E(e?.[et]);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js
function nt(e) {
return w(this, arguments, function() {
var t, n, r, i;
return y(this, function(a) {
switch (a.label) {
case 0: t = e.getReader(), a.label = 1;
case 1: a.trys.push([
1,
,
9,
10
]), a.label = 2;
case 2: return [4, C(t.read())];
case 3: return n = a.sent(), r = n.value, i = n.done, i ? [4, C(void 0)] : [3, 5];
case 4: return [2, a.sent()];
case 5: return [4, C(r)];
case 6: return [4, a.sent()];
case 7: return a.sent(), [3, 2];
case 8: return [3, 10];
case 9: return t.releaseLock(), [7];
case 10: return [2];
}
});
});
}
function rt(e) {
return E(e?.getReader);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js
function it(e) {
if (e instanceof I) return e;
if (e != null) {
if (Xe(e)) return at(e);
if (Je(e)) return ot(e);
if (Ye(e)) return st(e);
if (Ze(e)) return lt(e);
if (tt(e)) return ct(e);
if (rt(e)) return ut(e);
}
throw Qe(e);
}
function at(e) {
return new I(function(t) {
var n = e[ve]();
if (E(n.subscribe)) return n.subscribe(t);
throw TypeError("Provided object does not correctly implement Symbol.observable");
});
}
function ot(e) {
return new I(function(t) {
for (var n = 0; n < e.length && !t.closed; n++) t.next(e[n]);
t.complete();
});
}
function st(e) {
return new I(function(t) {
e.then(function(e) {
t.closed || (t.next(e), t.complete());
}, function(e) {
return t.error(e);
}).then(null, te);
});
}
function ct(e) {
return new I(function(t) {
var n, r;
try {
for (var i = b(e), a = i.next(); !a.done; a = i.next()) {
var o = a.value;
if (t.next(o), t.closed) return;
}
} catch (e) {
n = { error: e };
} finally {
try {
a && !a.done && (r = i.return) && r.call(i);
} finally {
if (n) throw n.error;
}
}
t.complete();
});
}
function lt(e) {
return new I(function(t) {
dt(e, t).catch(function(e) {
return t.error(e);
});
});
}
function ut(e) {
return lt(nt(e));
}
function dt(e, t) {
var n, r, i, a;
return v(this, void 0, void 0, function() {
var o, s;
return y(this, function(c) {
switch (c.label) {
case 0: c.trys.push([
0,
5,
6,
11
]), n = T(e), c.label = 1;
case 1: return [4, n.next()];
case 2:
if (r = c.sent(), r.done) return [3, 4];
if (o = r.value, t.next(o), t.closed) return [2];
c.label = 3;
case 3: return [3, 1];
case 4: return [3, 11];
case 5: return s = c.sent(), i = { error: s }, [3, 11];
case 6: return c.trys.push([
6,
,
9,
10
]), r && !r.done && (a = n.return) ? [4, a.call(n)] : [3, 8];
case 7: c.sent(), c.label = 8;
case 8: return [3, 10];
case 9:
if (i) throw i.error;
return [7];
case 10: return [7];
case 11: return t.complete(), [2];
}
});
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js
function ft(e, t, n, r, i) {
r === void 0 && (r = 0), i === void 0 && (i = !1);
var a = t.schedule(function() {
n(), i ? e.add(this.schedule(null, r)) : this.unsubscribe();
}, r);
if (e.add(a), !i) return a;
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/observeOn.js
function pt(e, t) {
return t === void 0 && (t = 0), Te(function(n, r) {
n.subscribe(Ee(r, function(n) {
return ft(r, e, function() {
return r.next(n);
}, t);
}, function() {
return ft(r, e, function() {
return r.complete();
}, t);
}, function(n) {
return ft(r, e, function() {
return r.error(n);
}, t);
}));
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js
function mt(e, t) {
return t === void 0 && (t = 0), Te(function(n, r) {
r.add(e.schedule(function() {
return n.subscribe(r);
}, t));
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js
function ht(e, t) {
return it(e).pipe(mt(t), pt(t));
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js
function gt(e, t) {
return it(e).pipe(mt(t), pt(t));
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js
function _t(e, t) {
return new I(function(n) {
var r = 0;
return t.schedule(function() {
r === e.length ? n.complete() : (n.next(e[r++]), n.closed || this.schedule());
});
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js
function vt(e, t) {
return new I(function(n) {
var r;
return ft(n, t, function() {
r = e[et](), ft(n, t, function() {
var e, t, i;
try {
e = r.next(), t = e.value, i = e.done;
} catch (e) {
n.error(e);
return;
}
i ? n.complete() : n.next(t);
}, 0, !0);
}), function() {
return E(r?.return) && r.return();
};
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js
function yt(e, t) {
if (!e) throw Error("Iterable cannot be null");
return new I(function(n) {
ft(n, t, function() {
var r = e[Symbol.asyncIterator]();
ft(n, t, function() {
r.next().then(function(e) {
e.done ? n.complete() : n.next(e.value);
});
}, 0, !0);
});
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js
function bt(e, t) {
return yt(nt(e), t);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js
function xt(e, t) {
if (e != null) {
if (Xe(e)) return ht(e, t);
if (Je(e)) return _t(e, t);
if (Ye(e)) return gt(e, t);
if (Ze(e)) return yt(e, t);
if (tt(e)) return vt(e, t);
if (rt(e)) return bt(e, t);
}
throw Qe(e);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/observable/from.js
function St(e, t) {
return t ? xt(e, t) : it(e);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/observable/of.js
function Ct() {
var e = [...arguments];
return St(e, Ke(e));
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/observable/throwError.js
function wt(e, t) {
var n = E(e) ? e : function() {
return e;
}, r = function(e) {
return e.error(n());
};
return new I(t ? function(e) {
return t.schedule(r, 0, e);
} : r);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/isObservable.js
function Tt(e) {
return !!e && (e instanceof I || E(e.lift) && E(e.subscribe));
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/EmptyError.js
var Et = D(function(e) {
return function() {
e(this), this.name = "EmptyError", this.message = "no elements in sequence";
};
});
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/firstValueFrom.js
function Dt(e, t) {
var n = typeof t == "object";
return new Promise(function(r, i) {
var a = new pe({
next: function(e) {
r(e), a.unsubscribe();
},
error: i,
complete: function() {
n ? r(t.defaultValue) : i(new Et());
}
});
e.subscribe(a);
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/isDate.js
function Ot(e) {
return e instanceof Date && !isNaN(e);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/timeout.js
var eee = D(function(e) {
return function(t) {
t === void 0 && (t = null), e(this), this.message = "Timeout has occurred", this.name = "TimeoutError", this.info = t;
};
});
function kt(e, t) {
var n = Ot(e) ? { first: e } : typeof e == "number" ? { each: e } : e, r = n.first, i = n.each, a = n.with, o = a === void 0 ? tee : a, s = n.scheduler, c = s === void 0 ? t ?? Re : s, l = n.meta, u = l === void 0 ? null : l;
if (r == null && i == null) throw TypeError("No timeout provided.");
return Te(function(e, t) {
var n, a, s = null, l = 0, d = function(e) {
a = ft(t, c, function() {
try {
n.unsubscribe(), it(o({
meta: u,
lastValue: s,
seen: l
})).subscribe(t);
} catch (e) {
t.error(e);
}
}, e);
};
n = e.subscribe(Ee(t, function(e) {
a?.unsubscribe(), l++, t.next(s = e), i > 0 && d(i);
}, void 0, void 0, function() {
a?.closed || a?.unsubscribe(), s = null;
})), !l && d(r == null ? i : typeof r == "number" ? r : +r - c.now());
});
}
function tee(e) {
throw new eee(e);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/map.js
function At(e, t) {
return Te(function(n, r) {
var i = 0;
n.subscribe(Ee(r, function(n) {
r.next(e.call(t, n, i++));
}));
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js
var nee = Array.isArray;
function jt(e, t) {
return nee(t) ? e.apply(void 0, S([], x(t))) : e(t);
}
function Mt(e) {
return At(function(t) {
return jt(e, t);
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js
var Nt = Array.isArray, Pt = Object.getPrototypeOf, Ft = Object.prototype, It = Object.keys;
function Lt(e) {
if (e.length === 1) {
var t = e[0];
if (Nt(t)) return {
args: t,
keys: null
};
if (Rt(t)) {
var n = It(t);
return {
args: n.map(function(e) {
return t[e];
}),
keys: n
};
}
}
return {
args: e,
keys: null
};
}
function Rt(e) {
return e && typeof e == "object" && Pt(e) === Ft;
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/createObject.js
function zt(e, t) {
return e.reduce(function(e, n, r) {
return e[n] = t[r], e;
}, {});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js
function Bt() {
var e = [...arguments], t = Ke(e), n = Ge(e), r = Lt(e), i = r.args, a = r.keys;
if (i.length === 0) return St([], t);
var o = new I(Vt(i, t, a ? function(e) {
return zt(a, e);
} : ye));
return n ? o.pipe(Mt(n)) : o;
}
function Vt(e, t, n) {
return n === void 0 && (n = ye), function(r) {
Ht(t, function() {
for (var i = e.length, a = Array(i), o = i, s = i, c = function(i) {
Ht(t, function() {
var c = St(e[i], t), l = !1;
c.subscribe(Ee(r, function(e) {
a[i] = e, l || (l = !0, s--), s || r.next(n(a.slice()));
}, function() {
--o || r.complete();
}));
}, r);
}, l = 0; l < i; l++) c(l);
}, r);
};
}
function Ht(e, t, n) {
e ? ft(n, e, t) : t();
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js
function Ut(e, t, n, r, i, a, o, s) {
var c = [], l = 0, u = 0, d = !1, f = function() {
d && !c.length && !l && t.complete();
}, p = function(e) {
return l < r ? m(e) : c.push(e);
}, m = function(e) {
a && t.next(e), l++;
var s = !1;
it(n(e, u++)).subscribe(Ee(t, function(e) {
i?.(e), a ? p(e) : t.next(e);
}, function() {
s = !0;
}, void 0, function() {
if (s) try {
l--;
for (var e = function() {
var e = c.shift();
o ? ft(t, o, function() {
return m(e);
}) : m(e);
}; c.length && l < r;) e();
f();
} catch (e) {
t.error(e);
}
}));
};
return e.subscribe(Ee(t, p, function() {
d = !0, f();
})), function() {
s?.();
};
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js
function Wt(e, t, n) {
return n === void 0 && (n = Infinity), E(t) ? Wt(function(n, r) {
return At(function(e, i) {
return t(n, e, r, i);
})(it(e(n, r)));
}, n) : (typeof t == "number" && (n = t), Te(function(t, r) {
return Ut(t, r, e, n);
}));
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js
function Gt(e) {
return e === void 0 && (e = Infinity), Wt(ye, e);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/concatAll.js
function Kt() {
return Gt(1);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/observable/concat.js
function qt() {
var e = [...arguments];
return Kt()(St(e, Ke(e)));
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/observable/defer.js
function Jt(e) {
return new I(function(t) {
it(e()).subscribe(t);
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js
function Yt() {
var e = [...arguments], t = Ge(e), n = Lt(e), r = n.args, i = n.keys, a = new I(function(e) {
var t = r.length;
if (!t) {
e.complete();
return;
}
for (var n = Array(t), a = t, o = t, s = function(t) {
var s = !1;
it(r[t]).subscribe(Ee(e, function(e) {
s || (s = !0, o--), n[t] = e;
}, function() {
return a--;
}, void 0, function() {
(!a || !s) && (o || e.next(i ? zt(i, n) : n), e.complete());
}));
}, c = 0; c < t; c++) s(c);
});
return t ? a.pipe(Mt(t)) : a;
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js
var Xt = ["addListener", "removeListener"], Zt = ["addEventListener", "removeEventListener"], Qt = ["on", "off"];
function $t(e, t, n, r) {
if (E(n) && (r = n, n = void 0), r) return $t(e, t, n).pipe(Mt(r));
var i = x(rn(e) ? Zt.map(function(r) {
return function(i) {
return e[r](t, i, n);
};
}) : tn(e) ? Xt.map(en(e, t)) : nn(e) ? Qt.map(en(e, t)) : [], 2), a = i[0], o = i[1];
if (!a && Je(e)) return Wt(function(e) {
return $t(e, t, n);
})(it(e));
if (!a) throw TypeError("Invalid event target");
return new I(function(e) {
var t = function() {
var t = [...arguments];
return e.next(1 < t.length ? t : t[0]);
};
return a(t), function() {
return o(t);
};
});
}
function en(e, t) {
return function(n) {
return function(r) {
return e[n](t, r);
};
};
}
function tn(e) {
return E(e.addListener) && E(e.removeListener);
}
function nn(e) {
return E(e.on) && E(e.off);
}
function rn(e) {
return E(e.addEventListener) && E(e.removeEventListener);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/observable/timer.js
function an(e, t, n) {
e === void 0 && (e = 0), n === void 0 && (n = ze);
var r = -1;
return t != null && (Ue(t) ? n = t : r = t), new I(function(t) {
var i = Ot(e) ? +e - n.now() : e;
i < 0 && (i = 0);
var a = 0;
return n.schedule(function() {
t.closed || (t.next(a++), 0 <= r ? this.schedule(void 0, r) : t.complete());
}, i);
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/observable/interval.js
function on(e, t) {
return e === void 0 && (e = 0), t === void 0 && (t = Re), e < 0 && (e = 0), an(e, e, t);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/observable/merge.js
function sn() {
var e = [...arguments], t = Ke(e), n = qe(e, Infinity), r = e;
return r.length ? r.length === 1 ? it(r[0]) : Gt(n)(St(r, t)) : He;
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js
var ree = Array.isArray;
function iee(e) {
return e.length === 1 && ree(e[0]) ? e[0] : e;
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/filter.js
function R(e, t) {
return Te(function(n, r) {
var i = 0;
n.subscribe(Ee(r, function(n) {
return e.call(t, n, i++) && r.next(n);
}));
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/observable/race.js
function aee() {
var e = [...arguments];
return e = iee(e), e.length === 1 ? it(e[0]) : new I(oee(e));
}
function oee(e) {
return function(t) {
for (var n = [], r = function(r) {
n.push(it(e[r]).subscribe(Ee(t, function(e) {
if (n) {
for (var i = 0; i < n.length; i++) i !== r && n[i].unsubscribe();
n = null;
}
t.next(e);
})));
}, i = 0; n && !t.closed && i < e.length; i++) r(i);
};
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/audit.js
function see(e) {
return Te(function(t, n) {
var r = !1, i = null, a = null, o = !1, s = function() {
if (a?.unsubscribe(), a = null, r) {
r = !1;
var e = i;
i = null, n.next(e);
}
o && n.complete();
}, c = function() {
a = null, o && n.complete();
};
t.subscribe(Ee(n, function(t) {
r = !0, i = t, a || it(e(t)).subscribe(a = Ee(n, s, c));
}, function() {
o = !0, (!r || !a || a.closed) && n.complete();
}));
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/auditTime.js
function cee(e, t) {
return t === void 0 && (t = Re), see(function() {
return an(e, t);
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/catchError.js
function cn(e) {
return Te(function(t, n) {
var r = null, i = !1, a;
r = t.subscribe(Ee(n, void 0, void 0, function(o) {
a = it(e(o, cn(e)(t))), r ? (r.unsubscribe(), r = null, a.subscribe(n)) : i = !0;
})), i && (r.unsubscribe(), r = null, a.subscribe(n));
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js
function ln(e, t, n, r, i) {
return function(a, o) {
var s = n, c = t, l = 0;
a.subscribe(Ee(o, function(t) {
var n = l++;
c = s ? e(c, t, n) : (s = !0, t), r && o.next(c);
}, i && (function() {
s && o.next(c), o.complete();
})));
};
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/reduce.js
function lee(e, t) {
return Te(ln(e, t, arguments.length >= 2, !1, !0));
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/toArray.js
var uee = function(e, t) {
return e.push(t), e;
};
function dee() {
return Te(function(e, t) {
lee(uee, [])(e).subscribe(t);
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/concatMap.js
function un(e, t) {
return E(t) ? Wt(e, t, 1) : Wt(e, 1);
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js
function dn(e, t) {
return t === void 0 && (t = Re), Te(function(n, r) {
var i = null, a = null, o = null, s = function() {
if (i) {
i.unsubscribe(), i = null;
var e = a;
a = null, r.next(e);
}
};
function c() {
var n = o + e, a = t.now();
if (a < n) {
i = this.schedule(void 0, n - a), r.add(i);
return;
}
s();
}
n.subscribe(Ee(r, function(n) {
a = n, o = t.now(), i || (i = t.schedule(c, e), r.add(i));
}, function() {
s(), r.complete();
}, void 0, function() {
a = i = null;
}));
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js
function fee(e) {
return Te(function(t, n) {
var r = !1;
t.subscribe(Ee(n, function(e) {
r = !0, n.next(e);
}, function() {
r || n.next(e), n.complete();
}));
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/take.js
function fn(e) {
return e <= 0 ? function() {
return He;
} : Te(function(t, n) {
var r = 0;
t.subscribe(Ee(n, function(t) {
++r <= e && (n.next(t), e <= r && n.complete());
}));
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js
function pee() {
return Te(function(e, t) {
e.subscribe(Ee(t, ne));
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/mapTo.js
function mee(e) {
return At(function() {
return e;
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js
function pn(e, t) {
return t ? function(n) {
return qt(t.pipe(fn(1), pee()), n.pipe(pn(e)));
} : Wt(function(t, n) {
return it(e(t, n)).pipe(fn(1), mee(t));
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/delay.js
function mn(e, t) {
t === void 0 && (t = Re);
var n = an(e, t);
return pn(function() {
return n;
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js
function hn(e, t) {
return t === void 0 && (t = ye), e ??= gn, Te(function(n, r) {
var i, a = !0;
n.subscribe(Ee(r, function(n) {
var o = t(n);
(a || !e(i, o)) && (a = !1, i = o, r.next(n));
}));
});
}
function gn(e, t) {
return e === t;
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js
function _n(e) {
return e === void 0 && (e = vn), Te(function(t, n) {
var r = !1;
t.subscribe(Ee(n, function(e) {
r = !0, n.next(e);
}, function() {
return r ? n.complete() : n.error(e());
}));
});
}
function vn() {
return new Et();
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/finalize.js
function yn(e) {
return Te(function(t, n) {
try {
t.subscribe(n);
} finally {
n.add(e);
}
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/first.js
function bn(e, t) {
var n = arguments.length >= 2;
return function(r) {
return r.pipe(e ? R(function(t, n) {
return e(t, n, r);
}) : ye, fn(1), n ? fee(t) : _n(function() {
return new Et();
}));
};
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/sample.js
function xn(e) {
return Te(function(t, n) {
var r = !1, i = null;
t.subscribe(Ee(n, function(e) {
r = !0, i = e;
})), it(e).subscribe(Ee(n, function() {
if (r) {
r = !1;
var e = i;
i = null, n.next(e);
}
}, ne));
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js
function Sn(e, t) {
return t === void 0 && (t = Re), xn(on(e, t));
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/scan.js
function Cn(e, t) {
return Te(ln(e, t, arguments.length >= 2, !0));
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/skip.js
function wn(e) {
return R(function(t, n) {
return e <= n;
});
}
//#endregion
//#region node_modules/rxjs/dist/esm5/internal/operators/switchMap.js
function Tn(e, t) {
return Te(function(n, r) {
var i = null, a = 0, o = !1, s = function() {
return o && !i && r.complete();
};
n.subscribe(Ee(r, function(n) {
i?.unsubscribe();
var o = 0, c = a++;
it(e(n, c)).subscribe(i = Ee(r, function(e) {
return r.next(t ? t(n, e, c, o++)