voicebot-react-native-expo
Version:
This is a voicebot-react-native package of Kipps AI voice bot for React Native Expo
1,820 lines • 100 kB
JavaScript
import { RoomEvent as b, ParticipantEvent as y, setLogLevel as Fn, LogLevel as mt, setLogExtension as jn, LocalParticipant as ot, Track as R, Room as gt, TrackEvent as Ft, compareVersions as Wn } from "livekit-client";
import * as D from "react";
const Ke = Math.min, ue = Math.max, ke = Math.round, te = (e) => ({
x: e,
y: e
}), Bn = {
left: "right",
right: "left",
bottom: "top",
top: "bottom"
}, Vn = {
start: "end",
end: "start"
};
function bt(e, t, n) {
return ue(e, Ke(t, n));
}
function Ne(e, t) {
return typeof e == "function" ? e(t) : e;
}
function oe(e) {
return e.split("-")[0];
}
function $e(e) {
return e.split("-")[1];
}
function jt(e) {
return e === "x" ? "y" : "x";
}
function Wt(e) {
return e === "y" ? "height" : "width";
}
function Ue(e) {
return ["top", "bottom"].includes(oe(e)) ? "y" : "x";
}
function Bt(e) {
return jt(Ue(e));
}
function Hn(e, t, n) {
n === void 0 && (n = !1);
const r = $e(e), i = Bt(e), o = Wt(i);
let s = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
return t.reference[o] > t.floating[o] && (s = Oe(s)), [s, Oe(s)];
}
function zn(e) {
const t = Oe(e);
return [Qe(e), t, Qe(t)];
}
function Qe(e) {
return e.replace(/start|end/g, (t) => Vn[t]);
}
function Yn(e, t, n) {
const r = ["left", "right"], i = ["right", "left"], o = ["top", "bottom"], s = ["bottom", "top"];
switch (e) {
case "top":
case "bottom":
return n ? t ? i : r : t ? r : i;
case "left":
case "right":
return t ? o : s;
default:
return [];
}
}
function Gn(e, t, n, r) {
const i = $e(e);
let o = Yn(oe(e), n === "start", r);
return i && (o = o.map((s) => s + "-" + i), t && (o = o.concat(o.map(Qe)))), o;
}
function Oe(e) {
return e.replace(/left|right|bottom|top/g, (t) => Bn[t]);
}
function Kn(e) {
return {
top: 0,
right: 0,
bottom: 0,
left: 0,
...e
};
}
function Qn(e) {
return typeof e != "number" ? Kn(e) : {
top: e,
right: e,
bottom: e,
left: e
};
}
function Le(e) {
const {
x: t,
y: n,
width: r,
height: i
} = e;
return {
width: r,
height: i,
top: n,
left: t,
right: t + r,
bottom: n + i,
x: t,
y: n
};
}
function yt(e, t, n) {
let {
reference: r,
floating: i
} = e;
const o = Ue(t), s = Bt(t), a = Wt(s), c = oe(t), u = o === "y", l = r.x + r.width / 2 - i.width / 2, f = r.y + r.height / 2 - i.height / 2, h = r[a] / 2 - i[a] / 2;
let d;
switch (c) {
case "top":
d = {
x: l,
y: r.y - i.height
};
break;
case "bottom":
d = {
x: l,
y: r.y + r.height
};
break;
case "right":
d = {
x: r.x + r.width,
y: f
};
break;
case "left":
d = {
x: r.x - i.width,
y: f
};
break;
default:
d = {
x: r.x,
y: r.y
};
}
switch ($e(t)) {
case "start":
d[s] -= h * (n && u ? -1 : 1);
break;
case "end":
d[s] += h * (n && u ? -1 : 1);
break;
}
return d;
}
const Jn = async (e, t, n) => {
const {
placement: r = "bottom",
strategy: i = "absolute",
middleware: o = [],
platform: s
} = n, a = o.filter(Boolean), c = await (s.isRTL == null ? void 0 : s.isRTL(t));
let u = await s.getElementRects({
reference: e,
floating: t,
strategy: i
}), {
x: l,
y: f
} = yt(u, r, c), h = r, d = {}, m = 0;
for (let p = 0; p < a.length; p++) {
const {
name: g,
fn: v
} = a[p], {
x: E,
y: P,
data: L,
reset: C
} = await v({
x: l,
y: f,
initialPlacement: r,
placement: h,
strategy: i,
middlewareData: d,
rects: u,
platform: s,
elements: {
reference: e,
floating: t
}
});
l = E ?? l, f = P ?? f, d = {
...d,
[g]: {
...d[g],
...L
}
}, C && m <= 50 && (m++, typeof C == "object" && (C.placement && (h = C.placement), C.rects && (u = C.rects === !0 ? await s.getElementRects({
reference: e,
floating: t,
strategy: i
}) : C.rects), {
x: l,
y: f
} = yt(u, h, c)), p = -1);
}
return {
x: l,
y: f,
placement: h,
strategy: i,
middlewareData: d
};
};
async function Vt(e, t) {
var n;
t === void 0 && (t = {});
const {
x: r,
y: i,
platform: o,
rects: s,
elements: a,
strategy: c
} = e, {
boundary: u = "clippingAncestors",
rootBoundary: l = "viewport",
elementContext: f = "floating",
altBoundary: h = !1,
padding: d = 0
} = Ne(t, e), m = Qn(d), g = a[h ? f === "floating" ? "reference" : "floating" : f], v = Le(await o.getClippingRect({
element: (n = await (o.isElement == null ? void 0 : o.isElement(g))) == null || n ? g : g.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(a.floating)),
boundary: u,
rootBoundary: l,
strategy: c
})), E = f === "floating" ? {
...s.floating,
x: r,
y: i
} : s.reference, P = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(a.floating)), L = await (o.isElement == null ? void 0 : o.isElement(P)) ? await (o.getScale == null ? void 0 : o.getScale(P)) || {
x: 1,
y: 1
} : {
x: 1,
y: 1
}, C = Le(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
elements: a,
rect: E,
offsetParent: P,
strategy: c
}) : E);
return {
top: (v.top - C.top + m.top) / L.y,
bottom: (C.bottom - v.bottom + m.bottom) / L.y,
left: (v.left - C.left + m.left) / L.x,
right: (C.right - v.right + m.right) / L.x
};
}
const qn = function(e) {
return e === void 0 && (e = {}), {
name: "flip",
options: e,
async fn(t) {
var n, r;
const {
placement: i,
middlewareData: o,
rects: s,
initialPlacement: a,
platform: c,
elements: u
} = t, {
mainAxis: l = !0,
crossAxis: f = !0,
fallbackPlacements: h,
fallbackStrategy: d = "bestFit",
fallbackAxisSideDirection: m = "none",
flipAlignment: p = !0,
...g
} = Ne(e, t);
if ((n = o.arrow) != null && n.alignmentOffset)
return {};
const v = oe(i), E = oe(a) === a, P = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), L = h || (E || !p ? [Oe(a)] : zn(a));
!h && m !== "none" && L.push(...Gn(a, p, m, P));
const C = [a, ...L], ie = await Vt(t, g), K = [];
let T = ((r = o.flip) == null ? void 0 : r.overflows) || [];
if (l && K.push(ie[v]), f) {
const S = Hn(i, s, P);
K.push(ie[S[0]], ie[S[1]]);
}
if (T = [...T, {
placement: i,
overflows: K
}], !K.every((S) => S <= 0)) {
var x, I;
const S = (((x = o.flip) == null ? void 0 : x.index) || 0) + 1, V = C[S];
if (V)
return {
data: {
index: S,
overflows: T
},
reset: {
placement: V
}
};
let X = (I = T.filter((Z) => Z.overflows[0] <= 0).sort((Z, ce) => Z.overflows[1] - ce.overflows[1])[0]) == null ? void 0 : I.placement;
if (!X)
switch (d) {
case "bestFit": {
var w;
const Z = (w = T.map((ce) => [ce.placement, ce.overflows.filter((ge) => ge > 0).reduce((ge, Un) => ge + Un, 0)]).sort((ce, ge) => ce[1] - ge[1])[0]) == null ? void 0 : w[0];
Z && (X = Z);
break;
}
case "initialPlacement":
X = a;
break;
}
if (i !== X)
return {
reset: {
placement: X
}
};
}
return {};
}
};
};
async function Xn(e, t) {
const {
placement: n,
platform: r,
elements: i
} = e, o = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), s = oe(n), a = $e(n), c = Ue(n) === "y", u = ["left", "top"].includes(s) ? -1 : 1, l = o && c ? -1 : 1, f = Ne(t, e);
let {
mainAxis: h,
crossAxis: d,
alignmentAxis: m
} = typeof f == "number" ? {
mainAxis: f,
crossAxis: 0,
alignmentAxis: null
} : {
mainAxis: 0,
crossAxis: 0,
alignmentAxis: null,
...f
};
return a && typeof m == "number" && (d = a === "end" ? m * -1 : m), c ? {
x: d * l,
y: h * u
} : {
x: h * u,
y: d * l
};
}
const Zn = function(e) {
return e === void 0 && (e = 0), {
name: "offset",
options: e,
async fn(t) {
var n, r;
const {
x: i,
y: o,
placement: s,
middlewareData: a
} = t, c = await Xn(t, e);
return s === ((n = a.offset) == null ? void 0 : n.placement) && (r = a.arrow) != null && r.alignmentOffset ? {} : {
x: i + c.x,
y: o + c.y,
data: {
...c,
placement: s
}
};
}
};
}, er = function(e) {
return e === void 0 && (e = {}), {
name: "shift",
options: e,
async fn(t) {
const {
x: n,
y: r,
placement: i
} = t, {
mainAxis: o = !0,
crossAxis: s = !1,
limiter: a = {
fn: (g) => {
let {
x: v,
y: E
} = g;
return {
x: v,
y: E
};
}
},
...c
} = Ne(e, t), u = {
x: n,
y: r
}, l = await Vt(t, c), f = Ue(oe(i)), h = jt(f);
let d = u[h], m = u[f];
if (o) {
const g = h === "y" ? "top" : "left", v = h === "y" ? "bottom" : "right", E = d + l[g], P = d - l[v];
d = bt(E, d, P);
}
if (s) {
const g = f === "y" ? "top" : "left", v = f === "y" ? "bottom" : "right", E = m + l[g], P = m - l[v];
m = bt(E, m, P);
}
const p = a.fn({
...t,
[h]: d,
[f]: m
});
return {
...p,
data: {
x: p.x - n,
y: p.y - r
}
};
}
};
};
function Fe() {
return typeof window < "u";
}
function ve(e) {
return Ht(e) ? (e.nodeName || "").toLowerCase() : "#document";
}
function U(e) {
var t;
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
}
function J(e) {
var t;
return (t = (Ht(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
}
function Ht(e) {
return Fe() ? e instanceof Node || e instanceof U(e).Node : !1;
}
function H(e) {
return Fe() ? e instanceof Element || e instanceof U(e).Element : !1;
}
function G(e) {
return Fe() ? e instanceof HTMLElement || e instanceof U(e).HTMLElement : !1;
}
function wt(e) {
return !Fe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
}
function Ee(e) {
const {
overflow: t,
overflowX: n,
overflowY: r,
display: i
} = z(e);
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(i);
}
function tr(e) {
return ["table", "td", "th"].includes(ve(e));
}
function je(e) {
return [":popover-open", ":modal"].some((t) => {
try {
return e.matches(t);
} catch {
return !1;
}
});
}
function st(e) {
const t = at(), n = H(e) ? z(e) : e;
return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
}
function nr(e) {
let t = ne(e);
for (; G(t) && !de(t); ) {
if (st(t))
return t;
if (je(t))
return null;
t = ne(t);
}
return null;
}
function at() {
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
}
function de(e) {
return ["html", "body", "#document"].includes(ve(e));
}
function z(e) {
return U(e).getComputedStyle(e);
}
function We(e) {
return H(e) ? {
scrollLeft: e.scrollLeft,
scrollTop: e.scrollTop
} : {
scrollLeft: e.scrollX,
scrollTop: e.scrollY
};
}
function ne(e) {
if (ve(e) === "html")
return e;
const t = (
// Step into the shadow DOM of the parent of a slotted node.
e.assignedSlot || // DOM Element detected.
e.parentNode || // ShadowRoot detected.
wt(e) && e.host || // Fallback.
J(e)
);
return wt(t) ? t.host : t;
}
function zt(e) {
const t = ne(e);
return de(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : G(t) && Ee(t) ? t : zt(t);
}
function Je(e, t, n) {
var r;
t === void 0 && (t = []), n === void 0 && (n = !0);
const i = zt(e), o = i === ((r = e.ownerDocument) == null ? void 0 : r.body), s = U(i);
if (o) {
const a = qe(s);
return t.concat(s, s.visualViewport || [], Ee(i) ? i : [], a && n ? Je(a) : []);
}
return t.concat(i, Je(i, [], n));
}
function qe(e) {
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
}
function Yt(e) {
const t = z(e);
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
const i = G(e), o = i ? e.offsetWidth : n, s = i ? e.offsetHeight : r, a = ke(n) !== o || ke(r) !== s;
return a && (n = o, r = s), {
width: n,
height: r,
$: a
};
}
function Gt(e) {
return H(e) ? e : e.contextElement;
}
function le(e) {
const t = Gt(e);
if (!G(t))
return te(1);
const n = t.getBoundingClientRect(), {
width: r,
height: i,
$: o
} = Yt(t);
let s = (o ? ke(n.width) : n.width) / r, a = (o ? ke(n.height) : n.height) / i;
return (!s || !Number.isFinite(s)) && (s = 1), (!a || !Number.isFinite(a)) && (a = 1), {
x: s,
y: a
};
}
const rr = /* @__PURE__ */ te(0);
function Kt(e) {
const t = U(e);
return !at() || !t.visualViewport ? rr : {
x: t.visualViewport.offsetLeft,
y: t.visualViewport.offsetTop
};
}
function ir(e, t, n) {
return t === void 0 && (t = !1), !n || t && n !== U(e) ? !1 : t;
}
function we(e, t, n, r) {
t === void 0 && (t = !1), n === void 0 && (n = !1);
const i = e.getBoundingClientRect(), o = Gt(e);
let s = te(1);
t && (r ? H(r) && (s = le(r)) : s = le(e));
const a = ir(o, n, r) ? Kt(o) : te(0);
let c = (i.left + a.x) / s.x, u = (i.top + a.y) / s.y, l = i.width / s.x, f = i.height / s.y;
if (o) {
const h = U(o), d = r && H(r) ? U(r) : r;
let m = h, p = qe(m);
for (; p && r && d !== m; ) {
const g = le(p), v = p.getBoundingClientRect(), E = z(p), P = v.left + (p.clientLeft + parseFloat(E.paddingLeft)) * g.x, L = v.top + (p.clientTop + parseFloat(E.paddingTop)) * g.y;
c *= g.x, u *= g.y, l *= g.x, f *= g.y, c += P, u += L, m = U(p), p = qe(m);
}
}
return Le({
width: l,
height: f,
x: c,
y: u
});
}
function or(e) {
let {
elements: t,
rect: n,
offsetParent: r,
strategy: i
} = e;
const o = i === "fixed", s = J(r), a = t ? je(t.floating) : !1;
if (r === s || a && o)
return n;
let c = {
scrollLeft: 0,
scrollTop: 0
}, u = te(1);
const l = te(0), f = G(r);
if ((f || !f && !o) && ((ve(r) !== "body" || Ee(s)) && (c = We(r)), G(r))) {
const h = we(r);
u = le(r), l.x = h.x + r.clientLeft, l.y = h.y + r.clientTop;
}
return {
width: n.width * u.x,
height: n.height * u.y,
x: n.x * u.x - c.scrollLeft * u.x + l.x,
y: n.y * u.y - c.scrollTop * u.y + l.y
};
}
function sr(e) {
return Array.from(e.getClientRects());
}
function Xe(e, t) {
const n = We(e).scrollLeft;
return t ? t.left + n : we(J(e)).left + n;
}
function ar(e) {
const t = J(e), n = We(e), r = e.ownerDocument.body, i = ue(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), o = ue(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
let s = -n.scrollLeft + Xe(e);
const a = -n.scrollTop;
return z(r).direction === "rtl" && (s += ue(t.clientWidth, r.clientWidth) - i), {
width: i,
height: o,
x: s,
y: a
};
}
function cr(e, t) {
const n = U(e), r = J(e), i = n.visualViewport;
let o = r.clientWidth, s = r.clientHeight, a = 0, c = 0;
if (i) {
o = i.width, s = i.height;
const u = at();
(!u || u && t === "fixed") && (a = i.offsetLeft, c = i.offsetTop);
}
return {
width: o,
height: s,
x: a,
y: c
};
}
function ur(e, t) {
const n = we(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, o = G(e) ? le(e) : te(1), s = e.clientWidth * o.x, a = e.clientHeight * o.y, c = i * o.x, u = r * o.y;
return {
width: s,
height: a,
x: c,
y: u
};
}
function St(e, t, n) {
let r;
if (t === "viewport")
r = cr(e, n);
else if (t === "document")
r = ar(J(e));
else if (H(t))
r = ur(t, n);
else {
const i = Kt(e);
r = {
...t,
x: t.x - i.x,
y: t.y - i.y
};
}
return Le(r);
}
function Qt(e, t) {
const n = ne(e);
return n === t || !H(n) || de(n) ? !1 : z(n).position === "fixed" || Qt(n, t);
}
function lr(e, t) {
const n = t.get(e);
if (n)
return n;
let r = Je(e, [], !1).filter((a) => H(a) && ve(a) !== "body"), i = null;
const o = z(e).position === "fixed";
let s = o ? ne(e) : e;
for (; H(s) && !de(s); ) {
const a = z(s), c = st(s);
!c && a.position === "fixed" && (i = null), (o ? !c && !i : !c && a.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || Ee(s) && !c && Qt(e, s)) ? r = r.filter((l) => l !== s) : i = a, s = ne(s);
}
return t.set(e, r), r;
}
function fr(e) {
let {
element: t,
boundary: n,
rootBoundary: r,
strategy: i
} = e;
const s = [...n === "clippingAncestors" ? je(t) ? [] : lr(t, this._c) : [].concat(n), r], a = s[0], c = s.reduce((u, l) => {
const f = St(t, l, i);
return u.top = ue(f.top, u.top), u.right = Ke(f.right, u.right), u.bottom = Ke(f.bottom, u.bottom), u.left = ue(f.left, u.left), u;
}, St(t, a, i));
return {
width: c.right - c.left,
height: c.bottom - c.top,
x: c.left,
y: c.top
};
}
function dr(e) {
const {
width: t,
height: n
} = Yt(e);
return {
width: t,
height: n
};
}
function pr(e, t, n) {
const r = G(t), i = J(t), o = n === "fixed", s = we(e, !0, o, t);
let a = {
scrollLeft: 0,
scrollTop: 0
};
const c = te(0);
if (r || !r && !o)
if ((ve(t) !== "body" || Ee(i)) && (a = We(t)), r) {
const d = we(t, !0, o, t);
c.x = d.x + t.clientLeft, c.y = d.y + t.clientTop;
} else i && (c.x = Xe(i));
let u = 0, l = 0;
if (i && !r && !o) {
const d = i.getBoundingClientRect();
l = d.top + a.scrollTop, u = d.left + a.scrollLeft - // RTL <body> scrollbar.
Xe(i, d);
}
const f = s.left + a.scrollLeft - c.x - u, h = s.top + a.scrollTop - c.y - l;
return {
x: f,
y: h,
width: s.width,
height: s.height
};
}
function He(e) {
return z(e).position === "static";
}
function xt(e, t) {
if (!G(e) || z(e).position === "fixed")
return null;
if (t)
return t(e);
let n = e.offsetParent;
return J(e) === n && (n = n.ownerDocument.body), n;
}
function Jt(e, t) {
const n = U(e);
if (je(e))
return n;
if (!G(e)) {
let i = ne(e);
for (; i && !de(i); ) {
if (H(i) && !He(i))
return i;
i = ne(i);
}
return n;
}
let r = xt(e, t);
for (; r && tr(r) && He(r); )
r = xt(r, t);
return r && de(r) && He(r) && !st(r) ? n : r || nr(e) || n;
}
const hr = async function(e) {
const t = this.getOffsetParent || Jt, n = this.getDimensions, r = await n(e.floating);
return {
reference: pr(e.reference, await t(e.floating), e.strategy),
floating: {
x: 0,
y: 0,
width: r.width,
height: r.height
}
};
};
function vr(e) {
return z(e).direction === "rtl";
}
const mr = {
convertOffsetParentRelativeRectToViewportRelativeRect: or,
getDocumentElement: J,
getClippingRect: fr,
getOffsetParent: Jt,
getElementRects: hr,
getClientRects: sr,
getDimensions: dr,
getScale: le,
isElement: H,
isRTL: vr
}, gr = Zn, br = er, yr = qn, wr = (e, t, n) => {
const r = /* @__PURE__ */ new Map(), i = {
platform: mr,
...n
}, o = {
...i.platform,
_c: r
};
return Jn(e, t, {
...i,
platform: o
});
};
var Sr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function xr(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var qt = { exports: {} };
(function(e) {
(function(t, n) {
e.exports ? e.exports = n() : t.log = n();
})(Sr, function() {
var t = function() {
}, n = "undefined", r = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), i = [
"trace",
"debug",
"info",
"warn",
"error"
], o = {}, s = null;
function a(p, g) {
var v = p[g];
if (typeof v.bind == "function")
return v.bind(p);
try {
return Function.prototype.bind.call(v, p);
} catch {
return function() {
return Function.prototype.apply.apply(v, [p, arguments]);
};
}
}
function c() {
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
}
function u(p) {
return p === "debug" && (p = "log"), typeof console === n ? !1 : p === "trace" && r ? c : console[p] !== void 0 ? a(console, p) : console.log !== void 0 ? a(console, "log") : t;
}
function l() {
for (var p = this.getLevel(), g = 0; g < i.length; g++) {
var v = i[g];
this[v] = g < p ? t : this.methodFactory(v, p, this.name);
}
if (this.log = this.debug, typeof console === n && p < this.levels.SILENT)
return "No console available for logging";
}
function f(p) {
return function() {
typeof console !== n && (l.call(this), this[p].apply(this, arguments));
};
}
function h(p, g, v) {
return u(p) || f.apply(this, arguments);
}
function d(p, g) {
var v = this, E, P, L, C = "loglevel";
typeof p == "string" ? C += ":" + p : typeof p == "symbol" && (C = void 0);
function ie(w) {
var S = (i[w] || "silent").toUpperCase();
if (!(typeof window === n || !C)) {
try {
window.localStorage[C] = S;
return;
} catch {
}
try {
window.document.cookie = encodeURIComponent(C) + "=" + S + ";";
} catch {
}
}
}
function K() {
var w;
if (!(typeof window === n || !C)) {
try {
w = window.localStorage[C];
} catch {
}
if (typeof w === n)
try {
var S = window.document.cookie, V = encodeURIComponent(C), X = S.indexOf(V + "=");
X !== -1 && (w = /^([^;]+)/.exec(
S.slice(X + V.length + 1)
)[1]);
} catch {
}
return v.levels[w] === void 0 && (w = void 0), w;
}
}
function T() {
if (!(typeof window === n || !C)) {
try {
window.localStorage.removeItem(C);
} catch {
}
try {
window.document.cookie = encodeURIComponent(C) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
} catch {
}
}
}
function x(w) {
var S = w;
if (typeof S == "string" && v.levels[S.toUpperCase()] !== void 0 && (S = v.levels[S.toUpperCase()]), typeof S == "number" && S >= 0 && S <= v.levels.SILENT)
return S;
throw new TypeError("log.setLevel() called with invalid level: " + w);
}
v.name = p, v.levels = {
TRACE: 0,
DEBUG: 1,
INFO: 2,
WARN: 3,
ERROR: 4,
SILENT: 5
}, v.methodFactory = g || h, v.getLevel = function() {
return L ?? P ?? E;
}, v.setLevel = function(w, S) {
return L = x(w), S !== !1 && ie(L), l.call(v);
}, v.setDefaultLevel = function(w) {
P = x(w), K() || v.setLevel(w, !1);
}, v.resetLevel = function() {
L = null, T(), l.call(v);
}, v.enableAll = function(w) {
v.setLevel(v.levels.TRACE, w);
}, v.disableAll = function(w) {
v.setLevel(v.levels.SILENT, w);
}, v.rebuild = function() {
if (s !== v && (E = x(s.getLevel())), l.call(v), s === v)
for (var w in o)
o[w].rebuild();
}, E = x(
s ? s.getLevel() : "WARN"
);
var I = K();
I != null && (L = x(I)), l.call(v);
}
s = new d(), s.getLogger = function(g) {
if (typeof g != "symbol" && typeof g != "string" || g === "")
throw new TypeError("You must supply a name when creating a logger.");
var v = o[g];
return v || (v = o[g] = new d(
g,
s.methodFactory
)), v;
};
var m = typeof window !== n ? window.log : void 0;
return s.noConflict = function() {
return typeof window !== n && window.log === s && (window.log = m), s;
}, s.getLoggers = function() {
return o;
}, s.default = s, s;
});
})(qt);
var Er = qt.exports;
const Tr = /* @__PURE__ */ xr(Er);
var Ze = function(e, t) {
return Ze = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
n.__proto__ = r;
} || function(n, r) {
for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
}, Ze(e, t);
};
function q(e, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
Ze(e, t);
function n() {
this.constructor = e;
}
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
}
function Cr(e, t, n, r) {
function i(o) {
return o instanceof n ? o : new n(function(s) {
s(o);
});
}
return new (n || (n = Promise))(function(o, s) {
function a(l) {
try {
u(r.next(l));
} catch (f) {
s(f);
}
}
function c(l) {
try {
u(r.throw(l));
} catch (f) {
s(f);
}
}
function u(l) {
l.done ? o(l.value) : i(l.value).then(a, c);
}
u((r = r.apply(e, t || [])).next());
});
}
function Xt(e, t) {
var n = { label: 0, sent: function() {
if (o[0] & 1) throw o[1];
return o[1];
}, trys: [], ops: [] }, r, i, o, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
return s.next = a(0), s.throw = a(1), s.return = a(2), typeof Symbol == "function" && (s[Symbol.iterator] = function() {
return this;
}), s;
function a(u) {
return function(l) {
return c([u, l]);
};
}
function c(u) {
if (r) throw new TypeError("Generator is already executing.");
for (; s && (s = 0, u[0] && (n = 0)), n; ) try {
if (r = 1, i && (o = u[0] & 2 ? i.return : u[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, u[1])).done) return o;
switch (i = 0, o && (u = [u[0] & 2, o.value]), u[0]) {
case 0:
case 1:
o = u;
break;
case 4:
return n.label++, { value: u[1], done: !1 };
case 5:
n.label++, i = u[1], u = [0];
continue;
case 7:
u = n.ops.pop(), n.trys.pop();
continue;
default:
if (o = n.trys, !(o = o.length > 0 && o[o.length - 1]) && (u[0] === 6 || u[0] === 2)) {
n = 0;
continue;
}
if (u[0] === 3 && (!o || u[1] > o[0] && u[1] < o[3])) {
n.label = u[1];
break;
}
if (u[0] === 6 && n.label < o[1]) {
n.label = o[1], o = u;
break;
}
if (o && n.label < o[2]) {
n.label = o[2], n.ops.push(u);
break;
}
o[2] && n.ops.pop(), n.trys.pop();
continue;
}
u = t.call(e, n);
} catch (l) {
u = [6, l], i = 0;
} finally {
r = o = 0;
}
if (u[0] & 5) throw u[1];
return { value: u[0] ? u[1] : void 0, done: !0 };
}
}
function pe(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 new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function he(e, t) {
var n = typeof Symbol == "function" && e[Symbol.iterator];
if (!n) return e;
var r = n.call(e), i, o = [], s;
try {
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done; ) o.push(i.value);
} catch (a) {
s = { error: a };
} finally {
try {
i && !i.done && (n = r.return) && n.call(r);
} finally {
if (s) throw s.error;
}
}
return o;
}
function Se(e, t, n) {
if (n || arguments.length === 2) for (var r = 0, i = t.length, o; r < i; r++)
(o || !(r in t)) && (o || (o = Array.prototype.slice.call(t, 0, r)), o[r] = t[r]);
return e.concat(o || Array.prototype.slice.call(t));
}
function fe(e) {
return this instanceof fe ? (this.v = e, this) : new fe(e);
}
function Pr(e, t, n) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var r = n.apply(e, t || []), i, o = [];
return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), a("next"), a("throw"), a("return", s), i[Symbol.asyncIterator] = function() {
return this;
}, i;
function s(d) {
return function(m) {
return Promise.resolve(m).then(d, f);
};
}
function a(d, m) {
r[d] && (i[d] = function(p) {
return new Promise(function(g, v) {
o.push([d, p, g, v]) > 1 || c(d, p);
});
}, m && (i[d] = m(i[d])));
}
function c(d, m) {
try {
u(r[d](m));
} catch (p) {
h(o[0][3], p);
}
}
function u(d) {
d.value instanceof fe ? Promise.resolve(d.value.v).then(l, f) : h(o[0][2], d);
}
function l(d) {
c("next", d);
}
function f(d) {
c("throw", d);
}
function h(d, m) {
d(m), o.shift(), o.length && c(o[0][0], o[0][1]);
}
}
function Ar(e) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var t = e[Symbol.asyncIterator], n;
return t ? t.call(e) : (e = typeof pe == "function" ? pe(e) : e[Symbol.iterator](), n = {}, r("next"), r("throw"), r("return"), n[Symbol.asyncIterator] = function() {
return this;
}, n);
function r(o) {
n[o] = e[o] && function(s) {
return new Promise(function(a, c) {
s = e[o](s), i(a, c, s.done, s.value);
});
};
}
function i(o, s, a, c) {
Promise.resolve(c).then(function(u) {
o({ value: u, done: a });
}, s);
}
}
function A(e) {
return typeof e == "function";
}
function ct(e) {
var t = function(r) {
Error.call(r), r.stack = new Error().stack;
}, n = e(t);
return n.prototype = Object.create(Error.prototype), n.prototype.constructor = n, n;
}
var ze = ct(function(e) {
return function(n) {
e(this), this.message = n ? n.length + ` errors occurred during unsubscription:
` + n.map(function(r, i) {
return i + 1 + ") " + r.toString();
}).join(`
`) : "", this.name = "UnsubscriptionError", this.errors = n;
};
});
function _e(e, t) {
if (e) {
var n = e.indexOf(t);
0 <= n && e.splice(n, 1);
}
}
var Te = function() {
function e(t) {
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
}
return e.prototype.unsubscribe = function() {
var t, n, r, i, o;
if (!this.closed) {
this.closed = !0;
var s = this._parentage;
if (s)
if (this._parentage = null, Array.isArray(s))
try {
for (var a = pe(s), c = a.next(); !c.done; c = a.next()) {
var u = c.value;
u.remove(this);
}
} catch (p) {
t = { error: p };
} finally {
try {
c && !c.done && (n = a.return) && n.call(a);
} finally {
if (t) throw t.error;
}
}
else
s.remove(this);
var l = this.initialTeardown;
if (A(l))
try {
l();
} catch (p) {
o = p instanceof ze ? p.errors : [p];
}
var f = this._finalizers;
if (f) {
this._finalizers = null;
try {
for (var h = pe(f), d = h.next(); !d.done; d = h.next()) {
var m = d.value;
try {
Et(m);
} catch (p) {
o = o ?? [], p instanceof ze ? o = Se(Se([], he(o)), he(p.errors)) : o.push(p);
}
}
} catch (p) {
r = { error: p };
} finally {
try {
d && !d.done && (i = h.return) && i.call(h);
} finally {
if (r) throw r.error;
}
}
}
if (o)
throw new ze(o);
}
}, e.prototype.add = function(t) {
var n;
if (t && t !== this)
if (this.closed)
Et(t);
else {
if (t instanceof e) {
if (t.closed || t._hasParent(this))
return;
t._addParent(this);
}
(this._finalizers = (n = this._finalizers) !== null && n !== void 0 ? n : []).push(t);
}
}, e.prototype._hasParent = function(t) {
var n = this._parentage;
return n === t || Array.isArray(n) && n.includes(t);
}, e.prototype._addParent = function(t) {
var n = this._parentage;
this._parentage = Array.isArray(n) ? (n.push(t), n) : n ? [n, t] : t;
}, e.prototype._removeParent = function(t) {
var n = this._parentage;
n === t ? this._parentage = null : Array.isArray(n) && _e(n, t);
}, e.prototype.remove = function(t) {
var n = this._finalizers;
n && _e(n, t), t instanceof e && t._removeParent(this);
}, e.EMPTY = function() {
var t = new e();
return t.closed = !0, t;
}(), e;
}(), Zt = Te.EMPTY;
function en(e) {
return e instanceof Te || e && "closed" in e && A(e.remove) && A(e.add) && A(e.unsubscribe);
}
function Et(e) {
A(e) ? e() : e.unsubscribe();
}
var tn = {
onUnhandledError: null,
onStoppedNotification: null,
Promise: void 0,
useDeprecatedSynchronousErrorHandling: !1,
useDeprecatedNextContext: !1
}, nn = {
setTimeout: function(e, t) {
for (var n = [], r = 2; r < arguments.length; r++)
n[r - 2] = arguments[r];
return setTimeout.apply(void 0, Se([e, t], he(n)));
},
clearTimeout: function(e) {
var t = nn.delegate;
return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(e);
},
delegate: void 0
};
function rn(e) {
nn.setTimeout(function() {
throw e;
});
}
function Ie() {
}
function Ae(e) {
e();
}
var ut = function(e) {
q(t, e);
function t(n) {
var r = e.call(this) || this;
return r.isStopped = !1, n ? (r.destination = n, en(n) && n.add(r)) : r.destination = _r, r;
}
return t.create = function(n, r, i) {
return new et(n, r, i);
}, t.prototype.next = function(n) {
this.isStopped || this._next(n);
}, t.prototype.error = function(n) {
this.isStopped || (this.isStopped = !0, this._error(n));
}, t.prototype.complete = function() {
this.isStopped || (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(n) {
this.destination.next(n);
}, t.prototype._error = function(n) {
try {
this.destination.error(n);
} finally {
this.unsubscribe();
}
}, t.prototype._complete = function() {
try {
this.destination.complete();
} finally {
this.unsubscribe();
}
}, t;
}(Te), kr = Function.prototype.bind;
function Ye(e, t) {
return kr.call(e, t);
}
var Or = function() {
function e(t) {
this.partialObserver = t;
}
return e.prototype.next = function(t) {
var n = this.partialObserver;
if (n.next)
try {
n.next(t);
} catch (r) {
Ce(r);
}
}, e.prototype.error = function(t) {
var n = this.partialObserver;
if (n.error)
try {
n.error(t);
} catch (r) {
Ce(r);
}
else
Ce(t);
}, e.prototype.complete = function() {
var t = this.partialObserver;
if (t.complete)
try {
t.complete();
} catch (n) {
Ce(n);
}
}, e;
}(), et = function(e) {
q(t, e);
function t(n, r, i) {
var o = e.call(this) || this, s;
if (A(n) || !n)
s = {
next: n ?? void 0,
error: r ?? void 0,
complete: i ?? void 0
};
else {
var a;
o && tn.useDeprecatedNextContext ? (a = Object.create(n), a.unsubscribe = function() {
return o.unsubscribe();
}, s = {
next: n.next && Ye(n.next, a),
error: n.error && Ye(n.error, a),
complete: n.complete && Ye(n.complete, a)
}) : s = n;
}
return o.destination = new Or(s), o;
}
return t;
}(ut);
function Ce(e) {
rn(e);
}
function Lr(e) {
throw e;
}
var _r = {
closed: !0,
next: Ie,
error: Lr,
complete: Ie
}, lt = function() {
return typeof Symbol == "function" && Symbol.observable || "@@observable";
}();
function ft(e) {
return e;
}
function Ir(e) {
return e.length === 0 ? ft : e.length === 1 ? e[0] : function(n) {
return e.reduce(function(r, i) {
return i(r);
}, n);
};
}
var O = function() {
function e(t) {
t && (this._subscribe = t);
}
return e.prototype.lift = function(t) {
var n = new e();
return n.source = this, n.operator = t, n;
}, e.prototype.subscribe = function(t, n, r) {
var i = this, o = Mr(t) ? t : new et(t, n, r);
return Ae(function() {
var s = i, a = s.operator, c = s.source;
o.add(a ? a.call(o, c) : c ? i._subscribe(o) : i._trySubscribe(o));
}), o;
}, e.prototype._trySubscribe = function(t) {
try {
return this._subscribe(t);
} catch (n) {
t.error(n);
}
}, e.prototype.forEach = function(t, n) {
var r = this;
return n = Tt(n), new n(function(i, o) {
var s = new et({
next: function(a) {
try {
t(a);
} catch (c) {
o(c), s.unsubscribe();
}
},
error: o,
complete: i
});
r.subscribe(s);
});
}, e.prototype._subscribe = function(t) {
var n;
return (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(t);
}, e.prototype[lt] = function() {
return this;
}, e.prototype.pipe = function() {
for (var t = [], n = 0; n < arguments.length; n++)
t[n] = arguments[n];
return Ir(t)(this);
}, e.prototype.toPromise = function(t) {
var n = this;
return t = Tt(t), new t(function(r, i) {
var o;
n.subscribe(function(s) {
return o = s;
}, function(s) {
return i(s);
}, function() {
return r(o);
});
});
}, e.create = function(t) {
return new e(t);
}, e;
}();
function Tt(e) {
var t;
return (t = e ?? tn.Promise) !== null && t !== void 0 ? t : Promise;
}
function Dr(e) {
return e && A(e.next) && A(e.error) && A(e.complete);
}
function Mr(e) {
return e && e instanceof ut || Dr(e) && en(e);
}
function Rr(e) {
return A(e == null ? void 0 : e.lift);
}
function B(e) {
return function(t) {
if (Rr(t))
return t.lift(function(n) {
try {
return e(n, this);
} catch (r) {
this.error(r);
}
});
throw new TypeError("Unable to lift unknown Observable type");
};
}
function j(e, t, n, r, i) {
return new Nr(e, t, n, r, i);
}
var Nr = function(e) {
q(t, e);
function t(n, r, i, o, s, a) {
var c = e.call(this, n) || this;
return c.onFinalize = s, c.shouldUnsubscribe = a, c._next = r ? function(u) {
try {
r(u);
} catch (l) {
n.error(l);
}
} : e.prototype._next, c._error = o ? function(u) {
try {
o(u);
} catch (l) {
n.error(l);
} finally {
this.unsubscribe();
}
} : e.prototype._error, c._complete = i ? function() {
try {
i();
} catch (u) {
n.error(u);
} finally {
this.unsubscribe();
}
} : e.prototype._complete, c;
}
return t.prototype.unsubscribe = function() {
var n;
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
var r = this.closed;
e.prototype.unsubscribe.call(this), !r && ((n = this.onFinalize) === null || n === void 0 || n.call(this));
}
}, t;
}(ut), $r = ct(function(e) {
return function() {
e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
};
}), re = function(e) {
q(t, e);
function t() {
var n = e.call(this) || this;
return n.closed = !1, n.currentObservers = null, n.observers = [], n.isStopped = !1, n.hasError = !1, n.thrownError = null, n;
}
return t.prototype.lift = function(n) {
var r = new Ct(this, this);
return r.operator = n, r;
}, t.prototype._throwIfClosed = function() {
if (this.closed)
throw new $r();
}, t.prototype.next = function(n) {
var r = this;
Ae(function() {
var i, o;
if (r._throwIfClosed(), !r.isStopped) {
r.currentObservers || (r.currentObservers = Array.from(r.observers));
try {
for (var s = pe(r.currentObservers), a = s.next(); !a.done; a = s.next()) {
var c = a.value;
c.next(n);
}
} catch (u) {
i = { error: u };
} finally {
try {
a && !a.done && (o = s.return) && o.call(s);
} finally {
if (i) throw i.error;
}
}
}
});
}, t.prototype.error = function(n) {
var r = this;
Ae(function() {
if (r._throwIfClosed(), !r.isStopped) {
r.hasError = r.isStopped = !0, r.thrownError = n;
for (var i = r.observers; i.length; )
i.shift().error(n);
}
});
}, t.prototype.complete = function() {
var n = this;
Ae(function() {
if (n._throwIfClosed(), !n.isStopped) {
n.isStopped = !0;
for (var r = n.observers; r.length; )
r.shift().complete();
}
});
}, t.prototype.unsubscribe = function() {
this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
}, Object.defineProperty(t.prototype, "observed", {
get: function() {
var n;
return ((n = this.observers) === null || n === void 0 ? void 0 : n.length) > 0;
},
enumerable: !1,
configurable: !0
}), t.prototype._trySubscribe = function(n) {
return this._throwIfClosed(), e.prototype._trySubscribe.call(this, n);
}, t.prototype._subscribe = function(n) {
return this._throwIfClosed(), this._checkFinalizedStatuses(n), this._innerSubscribe(n);
}, t.prototype._innerSubscribe = function(n) {
var r = this, i = this, o = i.hasError, s = i.isStopped, a = i.observers;
return o || s ? Zt : (this.currentObservers = null, a.push(n), new Te(function() {
r.currentObservers = null, _e(a, n);
}));
}, t.prototype._checkFinalizedStatuses = function(n) {
var r = this, i = r.hasError, o = r.thrownError, s = r.isStopped;
i ? n.error(o) : s && n.complete();
}, t.prototype.asObservable = function() {
var n = new O();
return n.source = this, n;
}, t.create = function(n, r) {
return new Ct(n, r);
}, t;
}(O), Ct = function(e) {
q(t, e);
function t(n, r) {
var i = e.call(this) || this;
return i.destination = n, i.source = r, i;
}
return t.prototype.next = function(n) {
var r, i;
(i = (r = this.destination) === null || r === void 0 ? void 0 : r.next) === null || i === void 0 || i.call(r, n);
}, t.prototype.error = function(n) {
var r, i;
(i = (r = this.destination) === null || r === void 0 ? void 0 : r.error) === null || i === void 0 || i.call(r, n);
}, t.prototype.complete = function() {
var n, r;
(r = (n = this.destination) === null || n === void 0 ? void 0 : n.complete) === null || r === void 0 || r.call(n);
}, t.prototype._subscribe = function(n) {
var r, i;
return (i = (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(n)) !== null && i !== void 0 ? i : Zt;
}, t;
}(re), on = function(e) {
q(t, e);
function t(n) {
var r = e.call(this) || this;
return r._value = n, r;
}
return Object.defineProperty(t.prototype, "value", {
get: function() {
return this.getValue();
},
enumerable: !1,
configurable: !0
}), t.prototype._subscribe = function(n) {
var r = e.prototype._subscribe.call(this, n);
return !r.closed && n.next(this._value), r;
}, t.prototype.getValue = function() {
var n = this, r = n.hasError, i = n.thrownError, o = n._value;
if (r)
throw i;
return this._throwIfClosed(), o;
}, t.prototype.next = function(n) {
e.prototype.next.call(this, this._value = n);
}, t;
}(re), Ur = {
now: function() {
return Date.now();
},
delegate: void 0
}, Fr = function(e) {
q(t, e);
function t(n, r) {
return e.call(this) || this;
}
return t.prototype.schedule = function(n, r) {
return this;
}, t;
}(Te), Pt = {
setInterval: function(e, t) {
for (var n = [], r = 2; r < arguments.length; r++)
n[r - 2] = arguments[r];
return setInterval.apply(void 0, Se([e, t], he(n)));
},
clearInterval: function(e) {
return clearInterval(e);
},
delegate: void 0
}, jr = function(e) {
q(t, e);
function t(n, r) {
var i = e.call(this, n, r) || this;
return i.scheduler = n, i.work = r, i.pending = !1, i;
}
return t.prototype.schedule = function(n, r) {
var i;
if (r === void 0 && (r = 0), this.closed)
return this;
this.state = n;
var o = this.id, s = this.scheduler;
return o != null && (this.id = this.recycleAsyncId(s, o, r)), this.pending = !0, this.delay = r, this.id = (i = this.id) !== null && i !== void 0 ? i : this.requestAsyncId(s, this.id, r), this;
}, t.prototype.requestAsyncId = function(n, r, i) {
return i === void 0 && (i = 0), Pt.setInterval(n.flush.bind(n, this), i);
}, t.prototype.recycleAsyncId = function(n, r, i) {
if (i === void 0 && (i = 0), i != null && this.delay === i && this.pending === !1)
return r;
r != null && Pt.clearInterval(r);
}, t.prototype.execute = function(n, r) {
if (this.closed)
return new Error("executing a cancelled action");
this.pending = !1;
var i = this._execute(n, r);
if (i)
return i;
this.pending === !1 && this.id != null && (this.id = this.recycleAsyncId(this.scheduler, this.id, null));
}, t.prototype._execute = function(n, r) {
var i = !1, o;
try {
this.work(n);
} catch (s) {
i = !0, o = s || new Error("Scheduled action threw falsy error");
}
if (i)
return this.unsubscribe(), o;
}, t.prototype.unsubscribe = function() {
if (!this.closed) {
var n = this, r = n.id, i = n.scheduler, o = i.actions;
this.work = this.state = this.scheduler = null, this.pending = !1, _e(o, this), r != null && (this.id = this.recycleAsyncId(i, r, null)), this.delay = null, e.prototype.unsubscribe.call(this);
}
}, t;
}(Fr), At = function() {
function e(t, n) {
n === void 0 && (n = e.now), this.schedulerActionCtor = t, this.now = n;
}
return e.prototype.schedule = function(t, n, r) {
return n === void 0 && (n = 0), new this.schedulerActionCtor(this, t).schedule(r, n);
}, e.now = Ur.now, e;
}(), Wr = function(e) {
q(t, e);
function t(n, r) {
r === void 0 && (r = At.now);
var i = e.call(this, n, r) || this;
return i.actions = [], i._active = !1, i;
}
return t.prototype.flush = function(n) {
var r = this.actions;
if (this._active) {
r.push(n);
return;
}
var i;
this._active = !0;
do
if (i = n.execute(n.state, n.delay))
break;
while (n = r.shift());
if (this._active = !1, i) {
for (; n = r.shift(); )
n.unsubscribe();
throw i;
}
}, t;
}(At), Br = new Wr(jr), Vr = new O(function(e) {
return e.complete();
});
function Hr(e) {
return e && A(e.schedule);
}
function sn(e) {
return e[e.length - 1];
}
function Be(e) {
return Hr(sn(e)) ? e.pop() : void 0;
}
function zr(e, t) {
return typeof sn(e) == "number" ? e.pop() : t;
}
var dt = function(e) {
return e && typeof e.length == "number" && typeof e != "function";
};
function an(e) {
return A(e == null ? void 0 : e.then);
}
function cn(e) {
return A(e[lt]);
}
function un(e) {
return Symbol.asyncIterator && A(e == null ? void 0 : e[Symbol.asyncIterator]);
}
function ln(e) {
return new TypeError("You provided " + (e !== null && typeof e == "object" ? "an invalid object" : "'" + e + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
}
function Yr() {
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
}
var fn = Yr();
function dn(e) {
return A(e == null ?