@acrobits/ipc-sdk 0.0.14 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/classes/IPCManager.html +20 -20
- package/docs/interfaces/BaseContactItem.html +3 -3
- package/docs/interfaces/CloudUsernameContactItem.html +4 -4
- package/docs/interfaces/DetailedContactItem.html +8 -8
- package/docs/interfaces/SipUriContactItem.html +4 -4
- package/docs/types/ContactItem.html +1 -1
- package/docs/types/ContactLabel.html +1 -1
- package/docs/types/HostType.html +1 -1
- package/docs/types/IpcProtocolVersion.html +2 -2
- package/lib/ipc-sdk.js +1245 -2287
- package/lib/ipc-sdk.js.map +1 -1
- package/lib/ipc-sdk.umd.cjs +5 -5
- package/lib/ipc-sdk.umd.cjs.map +1 -1
- package/package.json +3 -6
package/lib/ipc-sdk.js
CHANGED
|
@@ -1,1541 +1,413 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
if (!
|
|
5
|
-
throw TypeError("Cannot " +
|
|
1
|
+
var $e = Object.defineProperty;
|
|
2
|
+
var je = (r, t, e) => t in r ? $e(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
|
+
var _ = (r, t, e) => (je(r, typeof t != "symbol" ? t + "" : t, e), e), Ve = (r, t, e) => {
|
|
4
|
+
if (!t.has(r))
|
|
5
|
+
throw TypeError("Cannot " + e);
|
|
6
6
|
};
|
|
7
|
-
var
|
|
8
|
-
if (
|
|
7
|
+
var ue = (r, t, e) => {
|
|
8
|
+
if (t.has(r))
|
|
9
9
|
throw TypeError("Cannot add the same private member more than once");
|
|
10
|
-
|
|
10
|
+
t instanceof WeakSet ? t.add(r) : t.set(r, e);
|
|
11
11
|
};
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"premajor",
|
|
18
|
-
"minor",
|
|
19
|
-
"preminor",
|
|
20
|
-
"patch",
|
|
21
|
-
"prepatch",
|
|
22
|
-
"prerelease"
|
|
23
|
-
];
|
|
24
|
-
var xe = {
|
|
25
|
-
MAX_LENGTH: Zt,
|
|
26
|
-
MAX_SAFE_COMPONENT_LENGTH: Mr,
|
|
27
|
-
MAX_SAFE_BUILD_LENGTH: _r,
|
|
28
|
-
MAX_SAFE_INTEGER: Pr,
|
|
29
|
-
RELEASE_TYPES: Dr,
|
|
30
|
-
SEMVER_SPEC_VERSION: Lr,
|
|
31
|
-
FLAG_INCLUDE_PRERELEASE: 1,
|
|
32
|
-
FLAG_LOOSE: 2
|
|
33
|
-
};
|
|
34
|
-
const Ur = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...r) => console.error("SEMVER", ...r) : () => {
|
|
35
|
-
};
|
|
36
|
-
var Le = Ur;
|
|
37
|
-
(function(r, e) {
|
|
38
|
-
const {
|
|
39
|
-
MAX_SAFE_COMPONENT_LENGTH: t,
|
|
40
|
-
MAX_SAFE_BUILD_LENGTH: n,
|
|
41
|
-
MAX_LENGTH: i
|
|
42
|
-
} = xe, s = Le;
|
|
43
|
-
e = r.exports = {};
|
|
44
|
-
const a = e.re = [], c = e.safeRe = [], o = e.src = [], l = e.t = {};
|
|
45
|
-
let u = 0;
|
|
46
|
-
const p = "[a-zA-Z0-9-]", w = [
|
|
47
|
-
["\\s", 1],
|
|
48
|
-
["\\d", i],
|
|
49
|
-
[p, n]
|
|
50
|
-
], f = (R) => {
|
|
51
|
-
for (const [D, Q] of w)
|
|
52
|
-
R = R.split(`${D}*`).join(`${D}{0,${Q}}`).split(`${D}+`).join(`${D}{1,${Q}}`);
|
|
53
|
-
return R;
|
|
54
|
-
}, g = (R, D, Q) => {
|
|
55
|
-
const L = f(D), W = u++;
|
|
56
|
-
s(R, W, D), l[R] = W, o[W] = D, a[W] = new RegExp(D, Q ? "g" : void 0), c[W] = new RegExp(L, Q ? "g" : void 0);
|
|
57
|
-
};
|
|
58
|
-
g("NUMERICIDENTIFIER", "0|[1-9]\\d*"), g("NUMERICIDENTIFIERLOOSE", "\\d+"), g("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${p}*`), g("MAINVERSION", `(${o[l.NUMERICIDENTIFIER]})\\.(${o[l.NUMERICIDENTIFIER]})\\.(${o[l.NUMERICIDENTIFIER]})`), g("MAINVERSIONLOOSE", `(${o[l.NUMERICIDENTIFIERLOOSE]})\\.(${o[l.NUMERICIDENTIFIERLOOSE]})\\.(${o[l.NUMERICIDENTIFIERLOOSE]})`), g("PRERELEASEIDENTIFIER", `(?:${o[l.NUMERICIDENTIFIER]}|${o[l.NONNUMERICIDENTIFIER]})`), g("PRERELEASEIDENTIFIERLOOSE", `(?:${o[l.NUMERICIDENTIFIERLOOSE]}|${o[l.NONNUMERICIDENTIFIER]})`), g("PRERELEASE", `(?:-(${o[l.PRERELEASEIDENTIFIER]}(?:\\.${o[l.PRERELEASEIDENTIFIER]})*))`), g("PRERELEASELOOSE", `(?:-?(${o[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[l.PRERELEASEIDENTIFIERLOOSE]})*))`), g("BUILDIDENTIFIER", `${p}+`), g("BUILD", `(?:\\+(${o[l.BUILDIDENTIFIER]}(?:\\.${o[l.BUILDIDENTIFIER]})*))`), g("FULLPLAIN", `v?${o[l.MAINVERSION]}${o[l.PRERELEASE]}?${o[l.BUILD]}?`), g("FULL", `^${o[l.FULLPLAIN]}$`), g("LOOSEPLAIN", `[v=\\s]*${o[l.MAINVERSIONLOOSE]}${o[l.PRERELEASELOOSE]}?${o[l.BUILD]}?`), g("LOOSE", `^${o[l.LOOSEPLAIN]}$`), g("GTLT", "((?:<|>)?=?)"), g("XRANGEIDENTIFIERLOOSE", `${o[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), g("XRANGEIDENTIFIER", `${o[l.NUMERICIDENTIFIER]}|x|X|\\*`), g("XRANGEPLAIN", `[v=\\s]*(${o[l.XRANGEIDENTIFIER]})(?:\\.(${o[l.XRANGEIDENTIFIER]})(?:\\.(${o[l.XRANGEIDENTIFIER]})(?:${o[l.PRERELEASE]})?${o[l.BUILD]}?)?)?`), g("XRANGEPLAINLOOSE", `[v=\\s]*(${o[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[l.XRANGEIDENTIFIERLOOSE]})(?:${o[l.PRERELEASELOOSE]})?${o[l.BUILD]}?)?)?`), g("XRANGE", `^${o[l.GTLT]}\\s*${o[l.XRANGEPLAIN]}$`), g("XRANGELOOSE", `^${o[l.GTLT]}\\s*${o[l.XRANGEPLAINLOOSE]}$`), g("COERCE", `(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?(?:$|[^\\d])`), g("COERCERTL", o[l.COERCE], !0), g("LONETILDE", "(?:~>?)"), g("TILDETRIM", `(\\s*)${o[l.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", g("TILDE", `^${o[l.LONETILDE]}${o[l.XRANGEPLAIN]}$`), g("TILDELOOSE", `^${o[l.LONETILDE]}${o[l.XRANGEPLAINLOOSE]}$`), g("LONECARET", "(?:\\^)"), g("CARETTRIM", `(\\s*)${o[l.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", g("CARET", `^${o[l.LONECARET]}${o[l.XRANGEPLAIN]}$`), g("CARETLOOSE", `^${o[l.LONECARET]}${o[l.XRANGEPLAINLOOSE]}$`), g("COMPARATORLOOSE", `^${o[l.GTLT]}\\s*(${o[l.LOOSEPLAIN]})$|^$`), g("COMPARATOR", `^${o[l.GTLT]}\\s*(${o[l.FULLPLAIN]})$|^$`), g("COMPARATORTRIM", `(\\s*)${o[l.GTLT]}\\s*(${o[l.LOOSEPLAIN]}|${o[l.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", g("HYPHENRANGE", `^\\s*(${o[l.XRANGEPLAIN]})\\s+-\\s+(${o[l.XRANGEPLAIN]})\\s*$`), g("HYPHENRANGELOOSE", `^\\s*(${o[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[l.XRANGEPLAINLOOSE]})\\s*$`), g("STAR", "(<|>)?=?\\s*\\*"), g("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), g("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
59
|
-
})(We, We.exports);
|
|
60
|
-
var ve = We.exports;
|
|
61
|
-
const jr = Object.freeze({ loose: !0 }), Fr = Object.freeze({}), Gr = (r) => r ? typeof r != "object" ? jr : r : Fr;
|
|
62
|
-
var it = Gr;
|
|
63
|
-
const gt = /^[0-9]+$/, er = (r, e) => {
|
|
64
|
-
const t = gt.test(r), n = gt.test(e);
|
|
65
|
-
return t && n && (r = +r, e = +e), r === e ? 0 : t && !n ? -1 : n && !t ? 1 : r < e ? -1 : 1;
|
|
66
|
-
}, kr = (r, e) => er(e, r);
|
|
67
|
-
var tr = {
|
|
68
|
-
compareIdentifiers: er,
|
|
69
|
-
rcompareIdentifiers: kr
|
|
70
|
-
};
|
|
71
|
-
const me = Le, { MAX_LENGTH: mt, MAX_SAFE_INTEGER: Ee } = xe, { safeRe: Et, t: yt } = ve, Vr = it, { compareIdentifiers: ne } = tr;
|
|
72
|
-
let Hr = class k {
|
|
73
|
-
constructor(e, t) {
|
|
74
|
-
if (t = Vr(t), e instanceof k) {
|
|
75
|
-
if (e.loose === !!t.loose && e.includePrerelease === !!t.includePrerelease)
|
|
76
|
-
return e;
|
|
77
|
-
e = e.version;
|
|
78
|
-
} else if (typeof e != "string")
|
|
79
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);
|
|
80
|
-
if (e.length > mt)
|
|
81
|
-
throw new TypeError(
|
|
82
|
-
`version is longer than ${mt} characters`
|
|
83
|
-
);
|
|
84
|
-
me("SemVer", e, t), this.options = t, this.loose = !!t.loose, this.includePrerelease = !!t.includePrerelease;
|
|
85
|
-
const n = e.trim().match(t.loose ? Et[yt.LOOSE] : Et[yt.FULL]);
|
|
86
|
-
if (!n)
|
|
87
|
-
throw new TypeError(`Invalid Version: ${e}`);
|
|
88
|
-
if (this.raw = e, this.major = +n[1], this.minor = +n[2], this.patch = +n[3], this.major > Ee || this.major < 0)
|
|
89
|
-
throw new TypeError("Invalid major version");
|
|
90
|
-
if (this.minor > Ee || this.minor < 0)
|
|
91
|
-
throw new TypeError("Invalid minor version");
|
|
92
|
-
if (this.patch > Ee || this.patch < 0)
|
|
93
|
-
throw new TypeError("Invalid patch version");
|
|
94
|
-
n[4] ? this.prerelease = n[4].split(".").map((i) => {
|
|
95
|
-
if (/^[0-9]+$/.test(i)) {
|
|
96
|
-
const s = +i;
|
|
97
|
-
if (s >= 0 && s < Ee)
|
|
98
|
-
return s;
|
|
99
|
-
}
|
|
100
|
-
return i;
|
|
101
|
-
}) : this.prerelease = [], this.build = n[5] ? n[5].split(".") : [], this.format();
|
|
102
|
-
}
|
|
103
|
-
format() {
|
|
104
|
-
return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`), this.version;
|
|
105
|
-
}
|
|
106
|
-
toString() {
|
|
107
|
-
return this.version;
|
|
108
|
-
}
|
|
109
|
-
compare(e) {
|
|
110
|
-
if (me("SemVer.compare", this.version, this.options, e), !(e instanceof k)) {
|
|
111
|
-
if (typeof e == "string" && e === this.version)
|
|
112
|
-
return 0;
|
|
113
|
-
e = new k(e, this.options);
|
|
114
|
-
}
|
|
115
|
-
return e.version === this.version ? 0 : this.compareMain(e) || this.comparePre(e);
|
|
116
|
-
}
|
|
117
|
-
compareMain(e) {
|
|
118
|
-
return e instanceof k || (e = new k(e, this.options)), ne(this.major, e.major) || ne(this.minor, e.minor) || ne(this.patch, e.patch);
|
|
119
|
-
}
|
|
120
|
-
comparePre(e) {
|
|
121
|
-
if (e instanceof k || (e = new k(e, this.options)), this.prerelease.length && !e.prerelease.length)
|
|
122
|
-
return -1;
|
|
123
|
-
if (!this.prerelease.length && e.prerelease.length)
|
|
124
|
-
return 1;
|
|
125
|
-
if (!this.prerelease.length && !e.prerelease.length)
|
|
126
|
-
return 0;
|
|
127
|
-
let t = 0;
|
|
128
|
-
do {
|
|
129
|
-
const n = this.prerelease[t], i = e.prerelease[t];
|
|
130
|
-
if (me("prerelease compare", t, n, i), n === void 0 && i === void 0)
|
|
131
|
-
return 0;
|
|
132
|
-
if (i === void 0)
|
|
133
|
-
return 1;
|
|
134
|
-
if (n === void 0)
|
|
135
|
-
return -1;
|
|
136
|
-
if (n !== i)
|
|
137
|
-
return ne(n, i);
|
|
138
|
-
} while (++t);
|
|
139
|
-
}
|
|
140
|
-
compareBuild(e) {
|
|
141
|
-
e instanceof k || (e = new k(e, this.options));
|
|
142
|
-
let t = 0;
|
|
143
|
-
do {
|
|
144
|
-
const n = this.build[t], i = e.build[t];
|
|
145
|
-
if (me("prerelease compare", t, n, i), n === void 0 && i === void 0)
|
|
146
|
-
return 0;
|
|
147
|
-
if (i === void 0)
|
|
148
|
-
return 1;
|
|
149
|
-
if (n === void 0)
|
|
150
|
-
return -1;
|
|
151
|
-
if (n !== i)
|
|
152
|
-
return ne(n, i);
|
|
153
|
-
} while (++t);
|
|
154
|
-
}
|
|
155
|
-
// preminor will bump the version up to the next minor release, and immediately
|
|
156
|
-
// down to pre-release. premajor and prepatch work the same way.
|
|
157
|
-
inc(e, t, n) {
|
|
158
|
-
switch (e) {
|
|
159
|
-
case "premajor":
|
|
160
|
-
this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", t, n);
|
|
161
|
-
break;
|
|
162
|
-
case "preminor":
|
|
163
|
-
this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", t, n);
|
|
164
|
-
break;
|
|
165
|
-
case "prepatch":
|
|
166
|
-
this.prerelease.length = 0, this.inc("patch", t, n), this.inc("pre", t, n);
|
|
167
|
-
break;
|
|
168
|
-
case "prerelease":
|
|
169
|
-
this.prerelease.length === 0 && this.inc("patch", t, n), this.inc("pre", t, n);
|
|
170
|
-
break;
|
|
171
|
-
case "major":
|
|
172
|
-
(this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
|
|
173
|
-
break;
|
|
174
|
-
case "minor":
|
|
175
|
-
(this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = [];
|
|
176
|
-
break;
|
|
177
|
-
case "patch":
|
|
178
|
-
this.prerelease.length === 0 && this.patch++, this.prerelease = [];
|
|
179
|
-
break;
|
|
180
|
-
case "pre": {
|
|
181
|
-
const i = Number(n) ? 1 : 0;
|
|
182
|
-
if (!t && n === !1)
|
|
183
|
-
throw new Error("invalid increment argument: identifier is empty");
|
|
184
|
-
if (this.prerelease.length === 0)
|
|
185
|
-
this.prerelease = [i];
|
|
186
|
-
else {
|
|
187
|
-
let s = this.prerelease.length;
|
|
188
|
-
for (; --s >= 0; )
|
|
189
|
-
typeof this.prerelease[s] == "number" && (this.prerelease[s]++, s = -2);
|
|
190
|
-
if (s === -1) {
|
|
191
|
-
if (t === this.prerelease.join(".") && n === !1)
|
|
192
|
-
throw new Error("invalid increment argument: identifier already exists");
|
|
193
|
-
this.prerelease.push(i);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
if (t) {
|
|
197
|
-
let s = [t, i];
|
|
198
|
-
n === !1 && (s = [t]), ne(this.prerelease[0], t) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = s) : this.prerelease = s;
|
|
199
|
-
}
|
|
200
|
-
break;
|
|
201
|
-
}
|
|
202
|
-
default:
|
|
203
|
-
throw new Error(`invalid increment argument: ${e}`);
|
|
204
|
-
}
|
|
205
|
-
return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
var _ = Hr;
|
|
209
|
-
const bt = _, Xr = (r, e, t = !1) => {
|
|
210
|
-
if (r instanceof bt)
|
|
211
|
-
return r;
|
|
212
|
-
try {
|
|
213
|
-
return new bt(r, e);
|
|
214
|
-
} catch (n) {
|
|
215
|
-
if (!t)
|
|
216
|
-
return null;
|
|
217
|
-
throw n;
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
var oe = Xr;
|
|
221
|
-
const Br = oe, qr = (r, e) => {
|
|
222
|
-
const t = Br(r, e);
|
|
223
|
-
return t ? t.version : null;
|
|
224
|
-
};
|
|
225
|
-
var Yr = qr;
|
|
226
|
-
const zr = oe, Qr = (r, e) => {
|
|
227
|
-
const t = zr(r.trim().replace(/^[=v]+/, ""), e);
|
|
228
|
-
return t ? t.version : null;
|
|
229
|
-
};
|
|
230
|
-
var Wr = Qr;
|
|
231
|
-
const wt = _, Jr = (r, e, t, n, i) => {
|
|
232
|
-
typeof t == "string" && (i = n, n = t, t = void 0);
|
|
233
|
-
try {
|
|
234
|
-
return new wt(
|
|
235
|
-
r instanceof wt ? r.version : r,
|
|
236
|
-
t
|
|
237
|
-
).inc(e, n, i).version;
|
|
238
|
-
} catch {
|
|
239
|
-
return null;
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
|
-
var Kr = Jr;
|
|
243
|
-
const Rt = oe, Zr = (r, e) => {
|
|
244
|
-
const t = Rt(r, null, !0), n = Rt(e, null, !0), i = t.compare(n);
|
|
245
|
-
if (i === 0)
|
|
246
|
-
return null;
|
|
247
|
-
const s = i > 0, a = s ? t : n, c = s ? n : t, o = !!a.prerelease.length;
|
|
248
|
-
if (c.prerelease.length && !o)
|
|
249
|
-
return !c.patch && !c.minor ? "major" : a.patch ? "patch" : a.minor ? "minor" : "major";
|
|
250
|
-
const l = o ? "pre" : "";
|
|
251
|
-
return t.major !== n.major ? l + "major" : t.minor !== n.minor ? l + "minor" : t.patch !== n.patch ? l + "patch" : "prerelease";
|
|
252
|
-
};
|
|
253
|
-
var en = Zr;
|
|
254
|
-
const tn = _, rn = (r, e) => new tn(r, e).major;
|
|
255
|
-
var nn = rn;
|
|
256
|
-
const sn = _, on = (r, e) => new sn(r, e).minor;
|
|
257
|
-
var an = on;
|
|
258
|
-
const ln = _, cn = (r, e) => new ln(r, e).patch;
|
|
259
|
-
var un = cn;
|
|
260
|
-
const hn = oe, pn = (r, e) => {
|
|
261
|
-
const t = hn(r, e);
|
|
262
|
-
return t && t.prerelease.length ? t.prerelease : null;
|
|
263
|
-
};
|
|
264
|
-
var fn = pn;
|
|
265
|
-
const It = _, dn = (r, e, t) => new It(r, t).compare(new It(e, t));
|
|
266
|
-
var F = dn;
|
|
267
|
-
const vn = F, gn = (r, e, t) => vn(e, r, t);
|
|
268
|
-
var mn = gn;
|
|
269
|
-
const En = F, yn = (r, e) => En(r, e, !0);
|
|
270
|
-
var bn = yn;
|
|
271
|
-
const $t = _, wn = (r, e, t) => {
|
|
272
|
-
const n = new $t(r, t), i = new $t(e, t);
|
|
273
|
-
return n.compare(i) || n.compareBuild(i);
|
|
274
|
-
};
|
|
275
|
-
var st = wn;
|
|
276
|
-
const Rn = st, In = (r, e) => r.sort((t, n) => Rn(t, n, e));
|
|
277
|
-
var $n = In;
|
|
278
|
-
const Sn = st, On = (r, e) => r.sort((t, n) => Sn(n, t, e));
|
|
279
|
-
var An = On;
|
|
280
|
-
const Tn = F, Cn = (r, e, t) => Tn(r, e, t) > 0;
|
|
281
|
-
var Pe = Cn;
|
|
282
|
-
const Nn = F, xn = (r, e, t) => Nn(r, e, t) < 0;
|
|
283
|
-
var ot = xn;
|
|
284
|
-
const Ln = F, Pn = (r, e, t) => Ln(r, e, t) === 0;
|
|
285
|
-
var rr = Pn;
|
|
286
|
-
const Mn = F, _n = (r, e, t) => Mn(r, e, t) !== 0;
|
|
287
|
-
var nr = _n;
|
|
288
|
-
const Dn = F, Un = (r, e, t) => Dn(r, e, t) >= 0;
|
|
289
|
-
var at = Un;
|
|
290
|
-
const jn = F, Fn = (r, e, t) => jn(r, e, t) <= 0;
|
|
291
|
-
var lt = Fn;
|
|
292
|
-
const Gn = rr, kn = nr, Vn = Pe, Hn = at, Xn = ot, Bn = lt, qn = (r, e, t, n) => {
|
|
293
|
-
switch (e) {
|
|
294
|
-
case "===":
|
|
295
|
-
return typeof r == "object" && (r = r.version), typeof t == "object" && (t = t.version), r === t;
|
|
296
|
-
case "!==":
|
|
297
|
-
return typeof r == "object" && (r = r.version), typeof t == "object" && (t = t.version), r !== t;
|
|
298
|
-
case "":
|
|
299
|
-
case "=":
|
|
300
|
-
case "==":
|
|
301
|
-
return Gn(r, t, n);
|
|
302
|
-
case "!=":
|
|
303
|
-
return kn(r, t, n);
|
|
304
|
-
case ">":
|
|
305
|
-
return Vn(r, t, n);
|
|
306
|
-
case ">=":
|
|
307
|
-
return Hn(r, t, n);
|
|
308
|
-
case "<":
|
|
309
|
-
return Xn(r, t, n);
|
|
310
|
-
case "<=":
|
|
311
|
-
return Bn(r, t, n);
|
|
312
|
-
default:
|
|
313
|
-
throw new TypeError(`Invalid operator: ${e}`);
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
var ir = qn;
|
|
317
|
-
const Yn = _, zn = oe, { safeRe: ye, t: be } = ve, Qn = (r, e) => {
|
|
318
|
-
if (r instanceof Yn)
|
|
319
|
-
return r;
|
|
320
|
-
if (typeof r == "number" && (r = String(r)), typeof r != "string")
|
|
321
|
-
return null;
|
|
322
|
-
e = e || {};
|
|
323
|
-
let t = null;
|
|
324
|
-
if (!e.rtl)
|
|
325
|
-
t = r.match(ye[be.COERCE]);
|
|
326
|
-
else {
|
|
327
|
-
let n;
|
|
328
|
-
for (; (n = ye[be.COERCERTL].exec(r)) && (!t || t.index + t[0].length !== r.length); )
|
|
329
|
-
(!t || n.index + n[0].length !== t.index + t[0].length) && (t = n), ye[be.COERCERTL].lastIndex = n.index + n[1].length + n[2].length;
|
|
330
|
-
ye[be.COERCERTL].lastIndex = -1;
|
|
331
|
-
}
|
|
332
|
-
return t === null ? null : zn(`${t[2]}.${t[3] || "0"}.${t[4] || "0"}`, e);
|
|
333
|
-
};
|
|
334
|
-
var Wn = Qn, St, Ot;
|
|
335
|
-
function Jn() {
|
|
336
|
-
return Ot || (Ot = 1, St = function(r) {
|
|
337
|
-
r.prototype[Symbol.iterator] = function* () {
|
|
338
|
-
for (let e = this.head; e; e = e.next)
|
|
339
|
-
yield e.value;
|
|
340
|
-
};
|
|
341
|
-
}), St;
|
|
342
|
-
}
|
|
343
|
-
var Kn = $;
|
|
344
|
-
$.Node = ee;
|
|
345
|
-
$.create = $;
|
|
346
|
-
function $(r) {
|
|
347
|
-
var e = this;
|
|
348
|
-
if (e instanceof $ || (e = new $()), e.tail = null, e.head = null, e.length = 0, r && typeof r.forEach == "function")
|
|
349
|
-
r.forEach(function(i) {
|
|
350
|
-
e.push(i);
|
|
351
|
-
});
|
|
352
|
-
else if (arguments.length > 0)
|
|
353
|
-
for (var t = 0, n = arguments.length; t < n; t++)
|
|
354
|
-
e.push(arguments[t]);
|
|
355
|
-
return e;
|
|
356
|
-
}
|
|
357
|
-
$.prototype.removeNode = function(r) {
|
|
358
|
-
if (r.list !== this)
|
|
359
|
-
throw new Error("removing node which does not belong to this list");
|
|
360
|
-
var e = r.next, t = r.prev;
|
|
361
|
-
return e && (e.prev = t), t && (t.next = e), r === this.head && (this.head = e), r === this.tail && (this.tail = t), r.list.length--, r.next = null, r.prev = null, r.list = null, e;
|
|
362
|
-
};
|
|
363
|
-
$.prototype.unshiftNode = function(r) {
|
|
364
|
-
if (r !== this.head) {
|
|
365
|
-
r.list && r.list.removeNode(r);
|
|
366
|
-
var e = this.head;
|
|
367
|
-
r.list = this, r.next = e, e && (e.prev = r), this.head = r, this.tail || (this.tail = r), this.length++;
|
|
368
|
-
}
|
|
369
|
-
};
|
|
370
|
-
$.prototype.pushNode = function(r) {
|
|
371
|
-
if (r !== this.tail) {
|
|
372
|
-
r.list && r.list.removeNode(r);
|
|
373
|
-
var e = this.tail;
|
|
374
|
-
r.list = this, r.prev = e, e && (e.next = r), this.tail = r, this.head || (this.head = r), this.length++;
|
|
375
|
-
}
|
|
376
|
-
};
|
|
377
|
-
$.prototype.push = function() {
|
|
378
|
-
for (var r = 0, e = arguments.length; r < e; r++)
|
|
379
|
-
ei(this, arguments[r]);
|
|
380
|
-
return this.length;
|
|
381
|
-
};
|
|
382
|
-
$.prototype.unshift = function() {
|
|
383
|
-
for (var r = 0, e = arguments.length; r < e; r++)
|
|
384
|
-
ti(this, arguments[r]);
|
|
385
|
-
return this.length;
|
|
386
|
-
};
|
|
387
|
-
$.prototype.pop = function() {
|
|
388
|
-
if (this.tail) {
|
|
389
|
-
var r = this.tail.value;
|
|
390
|
-
return this.tail = this.tail.prev, this.tail ? this.tail.next = null : this.head = null, this.length--, r;
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
$.prototype.shift = function() {
|
|
394
|
-
if (this.head) {
|
|
395
|
-
var r = this.head.value;
|
|
396
|
-
return this.head = this.head.next, this.head ? this.head.prev = null : this.tail = null, this.length--, r;
|
|
397
|
-
}
|
|
398
|
-
};
|
|
399
|
-
$.prototype.forEach = function(r, e) {
|
|
400
|
-
e = e || this;
|
|
401
|
-
for (var t = this.head, n = 0; t !== null; n++)
|
|
402
|
-
r.call(e, t.value, n, this), t = t.next;
|
|
403
|
-
};
|
|
404
|
-
$.prototype.forEachReverse = function(r, e) {
|
|
405
|
-
e = e || this;
|
|
406
|
-
for (var t = this.tail, n = this.length - 1; t !== null; n--)
|
|
407
|
-
r.call(e, t.value, n, this), t = t.prev;
|
|
408
|
-
};
|
|
409
|
-
$.prototype.get = function(r) {
|
|
410
|
-
for (var e = 0, t = this.head; t !== null && e < r; e++)
|
|
411
|
-
t = t.next;
|
|
412
|
-
if (e === r && t !== null)
|
|
413
|
-
return t.value;
|
|
414
|
-
};
|
|
415
|
-
$.prototype.getReverse = function(r) {
|
|
416
|
-
for (var e = 0, t = this.tail; t !== null && e < r; e++)
|
|
417
|
-
t = t.prev;
|
|
418
|
-
if (e === r && t !== null)
|
|
419
|
-
return t.value;
|
|
420
|
-
};
|
|
421
|
-
$.prototype.map = function(r, e) {
|
|
422
|
-
e = e || this;
|
|
423
|
-
for (var t = new $(), n = this.head; n !== null; )
|
|
424
|
-
t.push(r.call(e, n.value, this)), n = n.next;
|
|
425
|
-
return t;
|
|
426
|
-
};
|
|
427
|
-
$.prototype.mapReverse = function(r, e) {
|
|
428
|
-
e = e || this;
|
|
429
|
-
for (var t = new $(), n = this.tail; n !== null; )
|
|
430
|
-
t.push(r.call(e, n.value, this)), n = n.prev;
|
|
431
|
-
return t;
|
|
432
|
-
};
|
|
433
|
-
$.prototype.reduce = function(r, e) {
|
|
434
|
-
var t, n = this.head;
|
|
435
|
-
if (arguments.length > 1)
|
|
436
|
-
t = e;
|
|
437
|
-
else if (this.head)
|
|
438
|
-
n = this.head.next, t = this.head.value;
|
|
439
|
-
else
|
|
440
|
-
throw new TypeError("Reduce of empty list with no initial value");
|
|
441
|
-
for (var i = 0; n !== null; i++)
|
|
442
|
-
t = r(t, n.value, i), n = n.next;
|
|
443
|
-
return t;
|
|
444
|
-
};
|
|
445
|
-
$.prototype.reduceReverse = function(r, e) {
|
|
446
|
-
var t, n = this.tail;
|
|
447
|
-
if (arguments.length > 1)
|
|
448
|
-
t = e;
|
|
449
|
-
else if (this.tail)
|
|
450
|
-
n = this.tail.prev, t = this.tail.value;
|
|
451
|
-
else
|
|
452
|
-
throw new TypeError("Reduce of empty list with no initial value");
|
|
453
|
-
for (var i = this.length - 1; n !== null; i--)
|
|
454
|
-
t = r(t, n.value, i), n = n.prev;
|
|
455
|
-
return t;
|
|
456
|
-
};
|
|
457
|
-
$.prototype.toArray = function() {
|
|
458
|
-
for (var r = new Array(this.length), e = 0, t = this.head; t !== null; e++)
|
|
459
|
-
r[e] = t.value, t = t.next;
|
|
460
|
-
return r;
|
|
461
|
-
};
|
|
462
|
-
$.prototype.toArrayReverse = function() {
|
|
463
|
-
for (var r = new Array(this.length), e = 0, t = this.tail; t !== null; e++)
|
|
464
|
-
r[e] = t.value, t = t.prev;
|
|
465
|
-
return r;
|
|
466
|
-
};
|
|
467
|
-
$.prototype.slice = function(r, e) {
|
|
468
|
-
e = e || this.length, e < 0 && (e += this.length), r = r || 0, r < 0 && (r += this.length);
|
|
469
|
-
var t = new $();
|
|
470
|
-
if (e < r || e < 0)
|
|
471
|
-
return t;
|
|
472
|
-
r < 0 && (r = 0), e > this.length && (e = this.length);
|
|
473
|
-
for (var n = 0, i = this.head; i !== null && n < r; n++)
|
|
474
|
-
i = i.next;
|
|
475
|
-
for (; i !== null && n < e; n++, i = i.next)
|
|
476
|
-
t.push(i.value);
|
|
477
|
-
return t;
|
|
478
|
-
};
|
|
479
|
-
$.prototype.sliceReverse = function(r, e) {
|
|
480
|
-
e = e || this.length, e < 0 && (e += this.length), r = r || 0, r < 0 && (r += this.length);
|
|
481
|
-
var t = new $();
|
|
482
|
-
if (e < r || e < 0)
|
|
483
|
-
return t;
|
|
484
|
-
r < 0 && (r = 0), e > this.length && (e = this.length);
|
|
485
|
-
for (var n = this.length, i = this.tail; i !== null && n > e; n--)
|
|
486
|
-
i = i.prev;
|
|
487
|
-
for (; i !== null && n > r; n--, i = i.prev)
|
|
488
|
-
t.push(i.value);
|
|
489
|
-
return t;
|
|
490
|
-
};
|
|
491
|
-
$.prototype.splice = function(r, e, ...t) {
|
|
492
|
-
r > this.length && (r = this.length - 1), r < 0 && (r = this.length + r);
|
|
493
|
-
for (var n = 0, i = this.head; i !== null && n < r; n++)
|
|
494
|
-
i = i.next;
|
|
495
|
-
for (var s = [], n = 0; i && n < e; n++)
|
|
496
|
-
s.push(i.value), i = this.removeNode(i);
|
|
497
|
-
i === null && (i = this.tail), i !== this.head && i !== this.tail && (i = i.prev);
|
|
498
|
-
for (var n = 0; n < t.length; n++)
|
|
499
|
-
i = Zn(this, i, t[n]);
|
|
500
|
-
return s;
|
|
501
|
-
};
|
|
502
|
-
$.prototype.reverse = function() {
|
|
503
|
-
for (var r = this.head, e = this.tail, t = r; t !== null; t = t.prev) {
|
|
504
|
-
var n = t.prev;
|
|
505
|
-
t.prev = t.next, t.next = n;
|
|
506
|
-
}
|
|
507
|
-
return this.head = e, this.tail = r, this;
|
|
508
|
-
};
|
|
509
|
-
function Zn(r, e, t) {
|
|
510
|
-
var n = e === r.head ? new ee(t, null, e, r) : new ee(t, e, e.next, r);
|
|
511
|
-
return n.next === null && (r.tail = n), n.prev === null && (r.head = n), r.length++, n;
|
|
512
|
-
}
|
|
513
|
-
function ei(r, e) {
|
|
514
|
-
r.tail = new ee(e, r.tail, null, r), r.head || (r.head = r.tail), r.length++;
|
|
515
|
-
}
|
|
516
|
-
function ti(r, e) {
|
|
517
|
-
r.head = new ee(e, null, r.head, r), r.tail || (r.tail = r.head), r.length++;
|
|
518
|
-
}
|
|
519
|
-
function ee(r, e, t, n) {
|
|
520
|
-
if (!(this instanceof ee))
|
|
521
|
-
return new ee(r, e, t, n);
|
|
522
|
-
this.list = n, this.value = r, e ? (e.next = this, this.prev = e) : this.prev = null, t ? (t.prev = this, this.next = t) : this.next = null;
|
|
523
|
-
}
|
|
524
|
-
try {
|
|
525
|
-
Jn()($);
|
|
526
|
-
} catch {
|
|
527
|
-
}
|
|
528
|
-
const ri = Kn, J = Symbol("max"), B = Symbol("length"), ie = Symbol("lengthCalculator"), he = Symbol("allowStale"), K = Symbol("maxAge"), X = Symbol("dispose"), At = Symbol("noDisposeOnSet"), x = Symbol("lruList"), j = Symbol("cache"), sr = Symbol("updateAgeOnGet"), Fe = () => 1;
|
|
529
|
-
class ni {
|
|
530
|
-
constructor(e) {
|
|
531
|
-
if (typeof e == "number" && (e = { max: e }), e || (e = {}), e.max && (typeof e.max != "number" || e.max < 0))
|
|
532
|
-
throw new TypeError("max must be a non-negative number");
|
|
533
|
-
this[J] = e.max || 1 / 0;
|
|
534
|
-
const t = e.length || Fe;
|
|
535
|
-
if (this[ie] = typeof t != "function" ? Fe : t, this[he] = e.stale || !1, e.maxAge && typeof e.maxAge != "number")
|
|
536
|
-
throw new TypeError("maxAge must be a number");
|
|
537
|
-
this[K] = e.maxAge || 0, this[X] = e.dispose, this[At] = e.noDisposeOnSet || !1, this[sr] = e.updateAgeOnGet || !1, this.reset();
|
|
538
|
-
}
|
|
539
|
-
// resize the cache when the max changes.
|
|
540
|
-
set max(e) {
|
|
541
|
-
if (typeof e != "number" || e < 0)
|
|
542
|
-
throw new TypeError("max must be a non-negative number");
|
|
543
|
-
this[J] = e || 1 / 0, le(this);
|
|
544
|
-
}
|
|
545
|
-
get max() {
|
|
546
|
-
return this[J];
|
|
547
|
-
}
|
|
548
|
-
set allowStale(e) {
|
|
549
|
-
this[he] = !!e;
|
|
550
|
-
}
|
|
551
|
-
get allowStale() {
|
|
552
|
-
return this[he];
|
|
553
|
-
}
|
|
554
|
-
set maxAge(e) {
|
|
555
|
-
if (typeof e != "number")
|
|
556
|
-
throw new TypeError("maxAge must be a non-negative number");
|
|
557
|
-
this[K] = e, le(this);
|
|
558
|
-
}
|
|
559
|
-
get maxAge() {
|
|
560
|
-
return this[K];
|
|
561
|
-
}
|
|
562
|
-
// resize the cache when the lengthCalculator changes.
|
|
563
|
-
set lengthCalculator(e) {
|
|
564
|
-
typeof e != "function" && (e = Fe), e !== this[ie] && (this[ie] = e, this[B] = 0, this[x].forEach((t) => {
|
|
565
|
-
t.length = this[ie](t.value, t.key), this[B] += t.length;
|
|
566
|
-
})), le(this);
|
|
567
|
-
}
|
|
568
|
-
get lengthCalculator() {
|
|
569
|
-
return this[ie];
|
|
570
|
-
}
|
|
571
|
-
get length() {
|
|
572
|
-
return this[B];
|
|
573
|
-
}
|
|
574
|
-
get itemCount() {
|
|
575
|
-
return this[x].length;
|
|
576
|
-
}
|
|
577
|
-
rforEach(e, t) {
|
|
578
|
-
t = t || this;
|
|
579
|
-
for (let n = this[x].tail; n !== null; ) {
|
|
580
|
-
const i = n.prev;
|
|
581
|
-
Tt(this, e, n, t), n = i;
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
forEach(e, t) {
|
|
585
|
-
t = t || this;
|
|
586
|
-
for (let n = this[x].head; n !== null; ) {
|
|
587
|
-
const i = n.next;
|
|
588
|
-
Tt(this, e, n, t), n = i;
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
keys() {
|
|
592
|
-
return this[x].toArray().map((e) => e.key);
|
|
593
|
-
}
|
|
594
|
-
values() {
|
|
595
|
-
return this[x].toArray().map((e) => e.value);
|
|
596
|
-
}
|
|
597
|
-
reset() {
|
|
598
|
-
this[X] && this[x] && this[x].length && this[x].forEach((e) => this[X](e.key, e.value)), this[j] = /* @__PURE__ */ new Map(), this[x] = new ri(), this[B] = 0;
|
|
599
|
-
}
|
|
600
|
-
dump() {
|
|
601
|
-
return this[x].map((e) => Oe(this, e) ? !1 : {
|
|
602
|
-
k: e.key,
|
|
603
|
-
v: e.value,
|
|
604
|
-
e: e.now + (e.maxAge || 0)
|
|
605
|
-
}).toArray().filter((e) => e);
|
|
606
|
-
}
|
|
607
|
-
dumpLru() {
|
|
608
|
-
return this[x];
|
|
609
|
-
}
|
|
610
|
-
set(e, t, n) {
|
|
611
|
-
if (n = n || this[K], n && typeof n != "number")
|
|
612
|
-
throw new TypeError("maxAge must be a number");
|
|
613
|
-
const i = n ? Date.now() : 0, s = this[ie](t, e);
|
|
614
|
-
if (this[j].has(e)) {
|
|
615
|
-
if (s > this[J])
|
|
616
|
-
return se(this, this[j].get(e)), !1;
|
|
617
|
-
const c = this[j].get(e).value;
|
|
618
|
-
return this[X] && (this[At] || this[X](e, c.value)), c.now = i, c.maxAge = n, c.value = t, this[B] += s - c.length, c.length = s, this.get(e), le(this), !0;
|
|
619
|
-
}
|
|
620
|
-
const a = new ii(e, t, s, i, n);
|
|
621
|
-
return a.length > this[J] ? (this[X] && this[X](e, t), !1) : (this[B] += a.length, this[x].unshift(a), this[j].set(e, this[x].head), le(this), !0);
|
|
622
|
-
}
|
|
623
|
-
has(e) {
|
|
624
|
-
if (!this[j].has(e))
|
|
625
|
-
return !1;
|
|
626
|
-
const t = this[j].get(e).value;
|
|
627
|
-
return !Oe(this, t);
|
|
628
|
-
}
|
|
629
|
-
get(e) {
|
|
630
|
-
return Ge(this, e, !0);
|
|
631
|
-
}
|
|
632
|
-
peek(e) {
|
|
633
|
-
return Ge(this, e, !1);
|
|
634
|
-
}
|
|
635
|
-
pop() {
|
|
636
|
-
const e = this[x].tail;
|
|
637
|
-
return e ? (se(this, e), e.value) : null;
|
|
638
|
-
}
|
|
639
|
-
del(e) {
|
|
640
|
-
se(this, this[j].get(e));
|
|
641
|
-
}
|
|
642
|
-
load(e) {
|
|
643
|
-
this.reset();
|
|
644
|
-
const t = Date.now();
|
|
645
|
-
for (let n = e.length - 1; n >= 0; n--) {
|
|
646
|
-
const i = e[n], s = i.e || 0;
|
|
647
|
-
if (s === 0)
|
|
648
|
-
this.set(i.k, i.v);
|
|
649
|
-
else {
|
|
650
|
-
const a = s - t;
|
|
651
|
-
a > 0 && this.set(i.k, i.v, a);
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
prune() {
|
|
656
|
-
this[j].forEach((e, t) => Ge(this, t, !1));
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
const Ge = (r, e, t) => {
|
|
660
|
-
const n = r[j].get(e);
|
|
661
|
-
if (n) {
|
|
662
|
-
const i = n.value;
|
|
663
|
-
if (Oe(r, i)) {
|
|
664
|
-
if (se(r, n), !r[he])
|
|
665
|
-
return;
|
|
666
|
-
} else
|
|
667
|
-
t && (r[sr] && (n.value.now = Date.now()), r[x].unshiftNode(n));
|
|
668
|
-
return i.value;
|
|
669
|
-
}
|
|
670
|
-
}, Oe = (r, e) => {
|
|
671
|
-
if (!e || !e.maxAge && !r[K])
|
|
672
|
-
return !1;
|
|
673
|
-
const t = Date.now() - e.now;
|
|
674
|
-
return e.maxAge ? t > e.maxAge : r[K] && t > r[K];
|
|
675
|
-
}, le = (r) => {
|
|
676
|
-
if (r[B] > r[J])
|
|
677
|
-
for (let e = r[x].tail; r[B] > r[J] && e !== null; ) {
|
|
678
|
-
const t = e.prev;
|
|
679
|
-
se(r, e), e = t;
|
|
680
|
-
}
|
|
681
|
-
}, se = (r, e) => {
|
|
682
|
-
if (e) {
|
|
683
|
-
const t = e.value;
|
|
684
|
-
r[X] && r[X](t.key, t.value), r[B] -= t.length, r[j].delete(t.key), r[x].removeNode(e);
|
|
685
|
-
}
|
|
686
|
-
};
|
|
687
|
-
class ii {
|
|
688
|
-
constructor(e, t, n, i, s) {
|
|
689
|
-
this.key = e, this.value = t, this.length = n, this.now = i, this.maxAge = s || 0;
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
const Tt = (r, e, t, n) => {
|
|
693
|
-
let i = t.value;
|
|
694
|
-
Oe(r, i) && (se(r, t), r[he] || (i = void 0)), i && e.call(n, i.value, i.key, r);
|
|
695
|
-
};
|
|
696
|
-
var si = ni, ke, Ct;
|
|
697
|
-
function G() {
|
|
698
|
-
if (Ct)
|
|
699
|
-
return ke;
|
|
700
|
-
Ct = 1;
|
|
701
|
-
class r {
|
|
702
|
-
constructor(h, y) {
|
|
703
|
-
if (y = n(y), h instanceof r)
|
|
704
|
-
return h.loose === !!y.loose && h.includePrerelease === !!y.includePrerelease ? h : new r(h.raw, y);
|
|
705
|
-
if (h instanceof i)
|
|
706
|
-
return this.raw = h.value, this.set = [[h]], this.format(), this;
|
|
707
|
-
if (this.options = y, this.loose = !!y.loose, this.includePrerelease = !!y.includePrerelease, this.raw = h.trim().split(/\s+/).join(" "), this.set = this.raw.split("||").map((m) => this.parseRange(m.trim())).filter((m) => m.length), !this.set.length)
|
|
708
|
-
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
709
|
-
if (this.set.length > 1) {
|
|
710
|
-
const m = this.set[0];
|
|
711
|
-
if (this.set = this.set.filter((E) => !g(E[0])), this.set.length === 0)
|
|
712
|
-
this.set = [m];
|
|
713
|
-
else if (this.set.length > 1) {
|
|
714
|
-
for (const E of this.set)
|
|
715
|
-
if (E.length === 1 && R(E[0])) {
|
|
716
|
-
this.set = [E];
|
|
717
|
-
break;
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
this.format();
|
|
722
|
-
}
|
|
723
|
-
format() {
|
|
724
|
-
return this.range = this.set.map((h) => h.join(" ").trim()).join("||").trim(), this.range;
|
|
725
|
-
}
|
|
726
|
-
toString() {
|
|
727
|
-
return this.range;
|
|
728
|
-
}
|
|
729
|
-
parseRange(h) {
|
|
730
|
-
const y = ((this.options.includePrerelease && w) | (this.options.loose && f)) + ":" + h, m = t.get(y);
|
|
731
|
-
if (m)
|
|
732
|
-
return m;
|
|
733
|
-
const E = this.options.loose, v = E ? c[o.HYPHENRANGELOOSE] : c[o.HYPHENRANGE];
|
|
734
|
-
h = h.replace(v, Sr(this.options.includePrerelease)), s("hyphen replace", h), h = h.replace(c[o.COMPARATORTRIM], l), s("comparator trim", h), h = h.replace(c[o.TILDETRIM], u), s("tilde trim", h), h = h.replace(c[o.CARETTRIM], p), s("caret trim", h);
|
|
735
|
-
let b = h.split(" ").map((A) => Q(A, this.options)).join(" ").split(/\s+/).map((A) => $r(A, this.options));
|
|
736
|
-
E && (b = b.filter((A) => (s("loose invalid filter", A, this.options), !!A.match(c[o.COMPARATORLOOSE])))), s("range list", b);
|
|
737
|
-
const S = /* @__PURE__ */ new Map(), I = b.map((A) => new i(A, this.options));
|
|
738
|
-
for (const A of I) {
|
|
739
|
-
if (g(A))
|
|
740
|
-
return [A];
|
|
741
|
-
S.set(A.value, A);
|
|
742
|
-
}
|
|
743
|
-
S.size > 1 && S.has("") && S.delete("");
|
|
744
|
-
const O = [...S.values()];
|
|
745
|
-
return t.set(y, O), O;
|
|
746
|
-
}
|
|
747
|
-
intersects(h, y) {
|
|
748
|
-
if (!(h instanceof r))
|
|
749
|
-
throw new TypeError("a Range is required");
|
|
750
|
-
return this.set.some((m) => D(m, y) && h.set.some((E) => D(E, y) && m.every((v) => E.every((b) => v.intersects(b, y)))));
|
|
751
|
-
}
|
|
752
|
-
// if ANY of the sets match ALL of its comparators, then pass
|
|
753
|
-
test(h) {
|
|
754
|
-
if (!h)
|
|
755
|
-
return !1;
|
|
756
|
-
if (typeof h == "string")
|
|
757
|
-
try {
|
|
758
|
-
h = new a(h, this.options);
|
|
759
|
-
} catch {
|
|
760
|
-
return !1;
|
|
761
|
-
}
|
|
762
|
-
for (let y = 0; y < this.set.length; y++)
|
|
763
|
-
if (Or(this.set[y], h, this.options))
|
|
764
|
-
return !0;
|
|
765
|
-
return !1;
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
ke = r;
|
|
769
|
-
const e = si, t = new e({ max: 1e3 }), n = it, i = Me(), s = Le, a = _, {
|
|
770
|
-
safeRe: c,
|
|
771
|
-
t: o,
|
|
772
|
-
comparatorTrimReplace: l,
|
|
773
|
-
tildeTrimReplace: u,
|
|
774
|
-
caretTrimReplace: p
|
|
775
|
-
} = ve, { FLAG_INCLUDE_PRERELEASE: w, FLAG_LOOSE: f } = xe, g = (d) => d.value === "<0.0.0-0", R = (d) => d.value === "", D = (d, h) => {
|
|
776
|
-
let y = !0;
|
|
777
|
-
const m = d.slice();
|
|
778
|
-
let E = m.pop();
|
|
779
|
-
for (; y && m.length; )
|
|
780
|
-
y = m.every((v) => E.intersects(v, h)), E = m.pop();
|
|
781
|
-
return y;
|
|
782
|
-
}, Q = (d, h) => (s("comp", d, h), d = yr(d, h), s("caret", d), d = W(d, h), s("tildes", d), d = wr(d, h), s("xrange", d), d = Ir(d, h), s("stars", d), d), L = (d) => !d || d.toLowerCase() === "x" || d === "*", W = (d, h) => d.trim().split(/\s+/).map((y) => Er(y, h)).join(" "), Er = (d, h) => {
|
|
783
|
-
const y = h.loose ? c[o.TILDELOOSE] : c[o.TILDE];
|
|
784
|
-
return d.replace(y, (m, E, v, b, S) => {
|
|
785
|
-
s("tilde", d, m, E, v, b, S);
|
|
786
|
-
let I;
|
|
787
|
-
return L(E) ? I = "" : L(v) ? I = `>=${E}.0.0 <${+E + 1}.0.0-0` : L(b) ? I = `>=${E}.${v}.0 <${E}.${+v + 1}.0-0` : S ? (s("replaceTilde pr", S), I = `>=${E}.${v}.${b}-${S} <${E}.${+v + 1}.0-0`) : I = `>=${E}.${v}.${b} <${E}.${+v + 1}.0-0`, s("tilde return", I), I;
|
|
788
|
-
});
|
|
789
|
-
}, yr = (d, h) => d.trim().split(/\s+/).map((y) => br(y, h)).join(" "), br = (d, h) => {
|
|
790
|
-
s("caret", d, h);
|
|
791
|
-
const y = h.loose ? c[o.CARETLOOSE] : c[o.CARET], m = h.includePrerelease ? "-0" : "";
|
|
792
|
-
return d.replace(y, (E, v, b, S, I) => {
|
|
793
|
-
s("caret", d, E, v, b, S, I);
|
|
794
|
-
let O;
|
|
795
|
-
return L(v) ? O = "" : L(b) ? O = `>=${v}.0.0${m} <${+v + 1}.0.0-0` : L(S) ? v === "0" ? O = `>=${v}.${b}.0${m} <${v}.${+b + 1}.0-0` : O = `>=${v}.${b}.0${m} <${+v + 1}.0.0-0` : I ? (s("replaceCaret pr", I), v === "0" ? b === "0" ? O = `>=${v}.${b}.${S}-${I} <${v}.${b}.${+S + 1}-0` : O = `>=${v}.${b}.${S}-${I} <${v}.${+b + 1}.0-0` : O = `>=${v}.${b}.${S}-${I} <${+v + 1}.0.0-0`) : (s("no pr"), v === "0" ? b === "0" ? O = `>=${v}.${b}.${S}${m} <${v}.${b}.${+S + 1}-0` : O = `>=${v}.${b}.${S}${m} <${v}.${+b + 1}.0-0` : O = `>=${v}.${b}.${S} <${+v + 1}.0.0-0`), s("caret return", O), O;
|
|
796
|
-
});
|
|
797
|
-
}, wr = (d, h) => (s("replaceXRanges", d, h), d.split(/\s+/).map((y) => Rr(y, h)).join(" ")), Rr = (d, h) => {
|
|
798
|
-
d = d.trim();
|
|
799
|
-
const y = h.loose ? c[o.XRANGELOOSE] : c[o.XRANGE];
|
|
800
|
-
return d.replace(y, (m, E, v, b, S, I) => {
|
|
801
|
-
s("xRange", d, m, E, v, b, S, I);
|
|
802
|
-
const O = L(v), A = O || L(b), te = A || L(S), ae = te;
|
|
803
|
-
return E === "=" && ae && (E = ""), I = h.includePrerelease ? "-0" : "", O ? E === ">" || E === "<" ? m = "<0.0.0-0" : m = "*" : E && ae ? (A && (b = 0), S = 0, E === ">" ? (E = ">=", A ? (v = +v + 1, b = 0, S = 0) : (b = +b + 1, S = 0)) : E === "<=" && (E = "<", A ? v = +v + 1 : b = +b + 1), E === "<" && (I = "-0"), m = `${E + v}.${b}.${S}${I}`) : A ? m = `>=${v}.0.0${I} <${+v + 1}.0.0-0` : te && (m = `>=${v}.${b}.0${I} <${v}.${+b + 1}.0-0`), s("xRange return", m), m;
|
|
804
|
-
});
|
|
805
|
-
}, Ir = (d, h) => (s("replaceStars", d, h), d.trim().replace(c[o.STAR], "")), $r = (d, h) => (s("replaceGTE0", d, h), d.trim().replace(c[h.includePrerelease ? o.GTE0PRE : o.GTE0], "")), Sr = (d) => (h, y, m, E, v, b, S, I, O, A, te, ae, mo) => (L(m) ? y = "" : L(E) ? y = `>=${m}.0.0${d ? "-0" : ""}` : L(v) ? y = `>=${m}.${E}.0${d ? "-0" : ""}` : b ? y = `>=${y}` : y = `>=${y}${d ? "-0" : ""}`, L(O) ? I = "" : L(A) ? I = `<${+O + 1}.0.0-0` : L(te) ? I = `<${O}.${+A + 1}.0-0` : ae ? I = `<=${O}.${A}.${te}-${ae}` : d ? I = `<${O}.${A}.${+te + 1}-0` : I = `<=${I}`, `${y} ${I}`.trim()), Or = (d, h, y) => {
|
|
806
|
-
for (let m = 0; m < d.length; m++)
|
|
807
|
-
if (!d[m].test(h))
|
|
808
|
-
return !1;
|
|
809
|
-
if (h.prerelease.length && !y.includePrerelease) {
|
|
810
|
-
for (let m = 0; m < d.length; m++)
|
|
811
|
-
if (s(d[m].semver), d[m].semver !== i.ANY && d[m].semver.prerelease.length > 0) {
|
|
812
|
-
const E = d[m].semver;
|
|
813
|
-
if (E.major === h.major && E.minor === h.minor && E.patch === h.patch)
|
|
814
|
-
return !0;
|
|
815
|
-
}
|
|
816
|
-
return !1;
|
|
817
|
-
}
|
|
818
|
-
return !0;
|
|
819
|
-
};
|
|
820
|
-
return ke;
|
|
821
|
-
}
|
|
822
|
-
var Ve, Nt;
|
|
823
|
-
function Me() {
|
|
824
|
-
if (Nt)
|
|
825
|
-
return Ve;
|
|
826
|
-
Nt = 1;
|
|
827
|
-
const r = Symbol("SemVer ANY");
|
|
828
|
-
class e {
|
|
829
|
-
static get ANY() {
|
|
830
|
-
return r;
|
|
831
|
-
}
|
|
832
|
-
constructor(u, p) {
|
|
833
|
-
if (p = t(p), u instanceof e) {
|
|
834
|
-
if (u.loose === !!p.loose)
|
|
835
|
-
return u;
|
|
836
|
-
u = u.value;
|
|
837
|
-
}
|
|
838
|
-
u = u.trim().split(/\s+/).join(" "), a("comparator", u, p), this.options = p, this.loose = !!p.loose, this.parse(u), this.semver === r ? this.value = "" : this.value = this.operator + this.semver.version, a("comp", this);
|
|
839
|
-
}
|
|
840
|
-
parse(u) {
|
|
841
|
-
const p = this.options.loose ? n[i.COMPARATORLOOSE] : n[i.COMPARATOR], w = u.match(p);
|
|
842
|
-
if (!w)
|
|
843
|
-
throw new TypeError(`Invalid comparator: ${u}`);
|
|
844
|
-
this.operator = w[1] !== void 0 ? w[1] : "", this.operator === "=" && (this.operator = ""), w[2] ? this.semver = new c(w[2], this.options.loose) : this.semver = r;
|
|
845
|
-
}
|
|
846
|
-
toString() {
|
|
847
|
-
return this.value;
|
|
848
|
-
}
|
|
849
|
-
test(u) {
|
|
850
|
-
if (a("Comparator.test", u, this.options.loose), this.semver === r || u === r)
|
|
851
|
-
return !0;
|
|
852
|
-
if (typeof u == "string")
|
|
853
|
-
try {
|
|
854
|
-
u = new c(u, this.options);
|
|
855
|
-
} catch {
|
|
856
|
-
return !1;
|
|
857
|
-
}
|
|
858
|
-
return s(u, this.operator, this.semver, this.options);
|
|
859
|
-
}
|
|
860
|
-
intersects(u, p) {
|
|
861
|
-
if (!(u instanceof e))
|
|
862
|
-
throw new TypeError("a Comparator is required");
|
|
863
|
-
return this.operator === "" ? this.value === "" ? !0 : new o(u.value, p).test(this.value) : u.operator === "" ? u.value === "" ? !0 : new o(this.value, p).test(u.semver) : (p = t(p), p.includePrerelease && (this.value === "<0.0.0-0" || u.value === "<0.0.0-0") || !p.includePrerelease && (this.value.startsWith("<0.0.0") || u.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && u.operator.startsWith(">") || this.operator.startsWith("<") && u.operator.startsWith("<") || this.semver.version === u.semver.version && this.operator.includes("=") && u.operator.includes("=") || s(this.semver, "<", u.semver, p) && this.operator.startsWith(">") && u.operator.startsWith("<") || s(this.semver, ">", u.semver, p) && this.operator.startsWith("<") && u.operator.startsWith(">")));
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
Ve = e;
|
|
867
|
-
const t = it, { safeRe: n, t: i } = ve, s = ir, a = Le, c = _, o = G();
|
|
868
|
-
return Ve;
|
|
869
|
-
}
|
|
870
|
-
const oi = G(), ai = (r, e, t) => {
|
|
871
|
-
try {
|
|
872
|
-
e = new oi(e, t);
|
|
873
|
-
} catch {
|
|
874
|
-
return !1;
|
|
875
|
-
}
|
|
876
|
-
return e.test(r);
|
|
877
|
-
};
|
|
878
|
-
var _e = ai;
|
|
879
|
-
const li = G(), ci = (r, e) => new li(r, e).set.map((t) => t.map((n) => n.value).join(" ").trim().split(" "));
|
|
880
|
-
var ui = ci;
|
|
881
|
-
const hi = _, pi = G(), fi = (r, e, t) => {
|
|
882
|
-
let n = null, i = null, s = null;
|
|
883
|
-
try {
|
|
884
|
-
s = new pi(e, t);
|
|
885
|
-
} catch {
|
|
886
|
-
return null;
|
|
887
|
-
}
|
|
888
|
-
return r.forEach((a) => {
|
|
889
|
-
s.test(a) && (!n || i.compare(a) === -1) && (n = a, i = new hi(n, t));
|
|
890
|
-
}), n;
|
|
891
|
-
};
|
|
892
|
-
var di = fi;
|
|
893
|
-
const vi = _, gi = G(), mi = (r, e, t) => {
|
|
894
|
-
let n = null, i = null, s = null;
|
|
895
|
-
try {
|
|
896
|
-
s = new gi(e, t);
|
|
897
|
-
} catch {
|
|
898
|
-
return null;
|
|
899
|
-
}
|
|
900
|
-
return r.forEach((a) => {
|
|
901
|
-
s.test(a) && (!n || i.compare(a) === 1) && (n = a, i = new vi(n, t));
|
|
902
|
-
}), n;
|
|
903
|
-
};
|
|
904
|
-
var Ei = mi;
|
|
905
|
-
const He = _, yi = G(), xt = Pe, bi = (r, e) => {
|
|
906
|
-
r = new yi(r, e);
|
|
907
|
-
let t = new He("0.0.0");
|
|
908
|
-
if (r.test(t) || (t = new He("0.0.0-0"), r.test(t)))
|
|
909
|
-
return t;
|
|
910
|
-
t = null;
|
|
911
|
-
for (let n = 0; n < r.set.length; ++n) {
|
|
912
|
-
const i = r.set[n];
|
|
913
|
-
let s = null;
|
|
914
|
-
i.forEach((a) => {
|
|
915
|
-
const c = new He(a.semver.version);
|
|
916
|
-
switch (a.operator) {
|
|
917
|
-
case ">":
|
|
918
|
-
c.prerelease.length === 0 ? c.patch++ : c.prerelease.push(0), c.raw = c.format();
|
|
919
|
-
case "":
|
|
920
|
-
case ">=":
|
|
921
|
-
(!s || xt(c, s)) && (s = c);
|
|
922
|
-
break;
|
|
923
|
-
case "<":
|
|
924
|
-
case "<=":
|
|
925
|
-
break;
|
|
926
|
-
default:
|
|
927
|
-
throw new Error(`Unexpected operation: ${a.operator}`);
|
|
928
|
-
}
|
|
929
|
-
}), s && (!t || xt(t, s)) && (t = s);
|
|
930
|
-
}
|
|
931
|
-
return t && r.test(t) ? t : null;
|
|
932
|
-
};
|
|
933
|
-
var wi = bi;
|
|
934
|
-
const Ri = G(), Ii = (r, e) => {
|
|
935
|
-
try {
|
|
936
|
-
return new Ri(r, e).range || "*";
|
|
937
|
-
} catch {
|
|
938
|
-
return null;
|
|
939
|
-
}
|
|
940
|
-
};
|
|
941
|
-
var $i = Ii;
|
|
942
|
-
const Si = _, or = Me(), { ANY: Oi } = or, Ai = G(), Ti = _e, Lt = Pe, Pt = ot, Ci = lt, Ni = at, xi = (r, e, t, n) => {
|
|
943
|
-
r = new Si(r, n), e = new Ai(e, n);
|
|
944
|
-
let i, s, a, c, o;
|
|
945
|
-
switch (t) {
|
|
946
|
-
case ">":
|
|
947
|
-
i = Lt, s = Ci, a = Pt, c = ">", o = ">=";
|
|
948
|
-
break;
|
|
949
|
-
case "<":
|
|
950
|
-
i = Pt, s = Ni, a = Lt, c = "<", o = "<=";
|
|
951
|
-
break;
|
|
952
|
-
default:
|
|
953
|
-
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
954
|
-
}
|
|
955
|
-
if (Ti(r, e, n))
|
|
956
|
-
return !1;
|
|
957
|
-
for (let l = 0; l < e.set.length; ++l) {
|
|
958
|
-
const u = e.set[l];
|
|
959
|
-
let p = null, w = null;
|
|
960
|
-
if (u.forEach((f) => {
|
|
961
|
-
f.semver === Oi && (f = new or(">=0.0.0")), p = p || f, w = w || f, i(f.semver, p.semver, n) ? p = f : a(f.semver, w.semver, n) && (w = f);
|
|
962
|
-
}), p.operator === c || p.operator === o || (!w.operator || w.operator === c) && s(r, w.semver) || w.operator === o && a(r, w.semver))
|
|
963
|
-
return !1;
|
|
964
|
-
}
|
|
965
|
-
return !0;
|
|
966
|
-
};
|
|
967
|
-
var ct = xi;
|
|
968
|
-
const Li = ct, Pi = (r, e, t) => Li(r, e, ">", t);
|
|
969
|
-
var Mi = Pi;
|
|
970
|
-
const _i = ct, Di = (r, e, t) => _i(r, e, "<", t);
|
|
971
|
-
var Ui = Di;
|
|
972
|
-
const Mt = G(), ji = (r, e, t) => (r = new Mt(r, t), e = new Mt(e, t), r.intersects(e, t));
|
|
973
|
-
var Fi = ji;
|
|
974
|
-
const Gi = _e, ki = F;
|
|
975
|
-
var Vi = (r, e, t) => {
|
|
976
|
-
const n = [];
|
|
977
|
-
let i = null, s = null;
|
|
978
|
-
const a = r.sort((u, p) => ki(u, p, t));
|
|
979
|
-
for (const u of a)
|
|
980
|
-
Gi(u, e, t) ? (s = u, i || (i = u)) : (s && n.push([i, s]), s = null, i = null);
|
|
981
|
-
i && n.push([i, null]);
|
|
982
|
-
const c = [];
|
|
983
|
-
for (const [u, p] of n)
|
|
984
|
-
u === p ? c.push(u) : !p && u === a[0] ? c.push("*") : p ? u === a[0] ? c.push(`<=${p}`) : c.push(`${u} - ${p}`) : c.push(`>=${u}`);
|
|
985
|
-
const o = c.join(" || "), l = typeof e.raw == "string" ? e.raw : String(e);
|
|
986
|
-
return o.length < l.length ? o : e;
|
|
987
|
-
};
|
|
988
|
-
const _t = G(), ut = Me(), { ANY: Xe } = ut, ce = _e, ht = F, Hi = (r, e, t = {}) => {
|
|
989
|
-
if (r === e)
|
|
990
|
-
return !0;
|
|
991
|
-
r = new _t(r, t), e = new _t(e, t);
|
|
992
|
-
let n = !1;
|
|
993
|
-
e:
|
|
994
|
-
for (const i of r.set) {
|
|
995
|
-
for (const s of e.set) {
|
|
996
|
-
const a = Bi(i, s, t);
|
|
997
|
-
if (n = n || a !== null, a)
|
|
998
|
-
continue e;
|
|
999
|
-
}
|
|
1000
|
-
if (n)
|
|
1001
|
-
return !1;
|
|
1002
|
-
}
|
|
1003
|
-
return !0;
|
|
1004
|
-
}, Xi = [new ut(">=0.0.0-0")], Dt = [new ut(">=0.0.0")], Bi = (r, e, t) => {
|
|
1005
|
-
if (r === e)
|
|
1006
|
-
return !0;
|
|
1007
|
-
if (r.length === 1 && r[0].semver === Xe) {
|
|
1008
|
-
if (e.length === 1 && e[0].semver === Xe)
|
|
1009
|
-
return !0;
|
|
1010
|
-
t.includePrerelease ? r = Xi : r = Dt;
|
|
1011
|
-
}
|
|
1012
|
-
if (e.length === 1 && e[0].semver === Xe) {
|
|
1013
|
-
if (t.includePrerelease)
|
|
1014
|
-
return !0;
|
|
1015
|
-
e = Dt;
|
|
1016
|
-
}
|
|
1017
|
-
const n = /* @__PURE__ */ new Set();
|
|
1018
|
-
let i, s;
|
|
1019
|
-
for (const f of r)
|
|
1020
|
-
f.operator === ">" || f.operator === ">=" ? i = Ut(i, f, t) : f.operator === "<" || f.operator === "<=" ? s = jt(s, f, t) : n.add(f.semver);
|
|
1021
|
-
if (n.size > 1)
|
|
1022
|
-
return null;
|
|
1023
|
-
let a;
|
|
1024
|
-
if (i && s && (a = ht(i.semver, s.semver, t), a > 0 || a === 0 && (i.operator !== ">=" || s.operator !== "<=")))
|
|
1025
|
-
return null;
|
|
1026
|
-
for (const f of n) {
|
|
1027
|
-
if (i && !ce(f, String(i), t) || s && !ce(f, String(s), t))
|
|
1028
|
-
return null;
|
|
1029
|
-
for (const g of e)
|
|
1030
|
-
if (!ce(f, String(g), t))
|
|
1031
|
-
return !1;
|
|
1032
|
-
return !0;
|
|
1033
|
-
}
|
|
1034
|
-
let c, o, l, u, p = s && !t.includePrerelease && s.semver.prerelease.length ? s.semver : !1, w = i && !t.includePrerelease && i.semver.prerelease.length ? i.semver : !1;
|
|
1035
|
-
p && p.prerelease.length === 1 && s.operator === "<" && p.prerelease[0] === 0 && (p = !1);
|
|
1036
|
-
for (const f of e) {
|
|
1037
|
-
if (u = u || f.operator === ">" || f.operator === ">=", l = l || f.operator === "<" || f.operator === "<=", i) {
|
|
1038
|
-
if (w && f.semver.prerelease && f.semver.prerelease.length && f.semver.major === w.major && f.semver.minor === w.minor && f.semver.patch === w.patch && (w = !1), f.operator === ">" || f.operator === ">=") {
|
|
1039
|
-
if (c = Ut(i, f, t), c === f && c !== i)
|
|
1040
|
-
return !1;
|
|
1041
|
-
} else if (i.operator === ">=" && !ce(i.semver, String(f), t))
|
|
1042
|
-
return !1;
|
|
1043
|
-
}
|
|
1044
|
-
if (s) {
|
|
1045
|
-
if (p && f.semver.prerelease && f.semver.prerelease.length && f.semver.major === p.major && f.semver.minor === p.minor && f.semver.patch === p.patch && (p = !1), f.operator === "<" || f.operator === "<=") {
|
|
1046
|
-
if (o = jt(s, f, t), o === f && o !== s)
|
|
1047
|
-
return !1;
|
|
1048
|
-
} else if (s.operator === "<=" && !ce(s.semver, String(f), t))
|
|
1049
|
-
return !1;
|
|
1050
|
-
}
|
|
1051
|
-
if (!f.operator && (s || i) && a !== 0)
|
|
1052
|
-
return !1;
|
|
1053
|
-
}
|
|
1054
|
-
return !(i && l && !s && a !== 0 || s && u && !i && a !== 0 || w || p);
|
|
1055
|
-
}, Ut = (r, e, t) => {
|
|
1056
|
-
if (!r)
|
|
1057
|
-
return e;
|
|
1058
|
-
const n = ht(r.semver, e.semver, t);
|
|
1059
|
-
return n > 0 ? r : n < 0 || e.operator === ">" && r.operator === ">=" ? e : r;
|
|
1060
|
-
}, jt = (r, e, t) => {
|
|
1061
|
-
if (!r)
|
|
1062
|
-
return e;
|
|
1063
|
-
const n = ht(r.semver, e.semver, t);
|
|
1064
|
-
return n < 0 ? r : n > 0 || e.operator === "<" && r.operator === "<=" ? e : r;
|
|
1065
|
-
};
|
|
1066
|
-
var qi = Hi;
|
|
1067
|
-
const Be = ve, Ft = xe, Yi = _, Gt = tr, zi = oe, Qi = Yr, Wi = Wr, Ji = Kr, Ki = en, Zi = nn, es = an, ts = un, rs = fn, ns = F, is = mn, ss = bn, os = st, as = $n, ls = An, cs = Pe, us = ot, hs = rr, ps = nr, fs = at, ds = lt, vs = ir, gs = Wn, ms = Me(), Es = G(), ys = _e, bs = ui, ws = di, Rs = Ei, Is = wi, $s = $i, Ss = ct, Os = Mi, As = Ui, Ts = Fi, Cs = Vi, Ns = qi;
|
|
1068
|
-
var C = {
|
|
1069
|
-
parse: zi,
|
|
1070
|
-
valid: Qi,
|
|
1071
|
-
clean: Wi,
|
|
1072
|
-
inc: Ji,
|
|
1073
|
-
diff: Ki,
|
|
1074
|
-
major: Zi,
|
|
1075
|
-
minor: es,
|
|
1076
|
-
patch: ts,
|
|
1077
|
-
prerelease: rs,
|
|
1078
|
-
compare: ns,
|
|
1079
|
-
rcompare: is,
|
|
1080
|
-
compareLoose: ss,
|
|
1081
|
-
compareBuild: os,
|
|
1082
|
-
sort: as,
|
|
1083
|
-
rsort: ls,
|
|
1084
|
-
gt: cs,
|
|
1085
|
-
lt: us,
|
|
1086
|
-
eq: hs,
|
|
1087
|
-
neq: ps,
|
|
1088
|
-
gte: fs,
|
|
1089
|
-
lte: ds,
|
|
1090
|
-
cmp: vs,
|
|
1091
|
-
coerce: gs,
|
|
1092
|
-
Comparator: ms,
|
|
1093
|
-
Range: Es,
|
|
1094
|
-
satisfies: ys,
|
|
1095
|
-
toComparators: bs,
|
|
1096
|
-
maxSatisfying: ws,
|
|
1097
|
-
minSatisfying: Rs,
|
|
1098
|
-
minVersion: Is,
|
|
1099
|
-
validRange: $s,
|
|
1100
|
-
outside: Ss,
|
|
1101
|
-
gtr: Os,
|
|
1102
|
-
ltr: As,
|
|
1103
|
-
intersects: Ts,
|
|
1104
|
-
simplifyRange: Cs,
|
|
1105
|
-
subset: Ns,
|
|
1106
|
-
SemVer: Yi,
|
|
1107
|
-
re: Be.re,
|
|
1108
|
-
src: Be.src,
|
|
1109
|
-
tokens: Be.t,
|
|
1110
|
-
SEMVER_SPEC_VERSION: Ft.SEMVER_SPEC_VERSION,
|
|
1111
|
-
RELEASE_TYPES: Ft.RELEASE_TYPES,
|
|
1112
|
-
compareIdentifiers: Gt.compareIdentifiers,
|
|
1113
|
-
rcompareIdentifiers: Gt.rcompareIdentifiers
|
|
1114
|
-
};
|
|
1115
|
-
class N extends Error {
|
|
1116
|
-
constructor(e) {
|
|
1117
|
-
super(`Incorrect context (${e}). Cannot perform the requested operation.`), q(this, "context"), this.context = e;
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
class $e extends Error {
|
|
1121
|
-
constructor(e, t, n) {
|
|
1122
|
-
super(`Invalid parameter (${e}). ${n}`), this.param = e, this.value = t, this.reason = n;
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
class xs extends Error {
|
|
1126
|
-
constructor(e, t) {
|
|
1127
|
-
super(
|
|
1128
|
-
`'streamId' value of "${e}" is different from what we expected ("${t}")`
|
|
1129
|
-
), this.streamId = e, this.expectedStreamId = t;
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
class kt extends Error {
|
|
1133
|
-
constructor(e) {
|
|
1134
|
-
super(`${e} needs to be initialized before it can be used.`);
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
|
-
class Vt extends Error {
|
|
1138
|
-
constructor(e, t) {
|
|
1139
|
-
let n = `Unsupported Protocol ${Array.isArray(e) ? "versions" : "version"}: (${e}).`;
|
|
1140
|
-
t && (n += ` Minimum version supported is ${t}.`), super(n), this.version = e;
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
var Je = function(r, e) {
|
|
1144
|
-
return Je = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
|
|
1145
|
-
t.__proto__ = n;
|
|
1146
|
-
} || function(t, n) {
|
|
12
|
+
var B = (r, t, e) => (Ve(r, t, "access private method"), e);
|
|
13
|
+
var C = /* @__PURE__ */ ((r) => (r.BadgeQuery = "BADGE QUERY", r.HostInForeground = "HOST IN FOREGROUND", r))(C || {}), G = function(r, t) {
|
|
14
|
+
return G = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
|
|
15
|
+
e.__proto__ = n;
|
|
16
|
+
} || function(e, n) {
|
|
1147
17
|
for (var i in n)
|
|
1148
|
-
Object.prototype.hasOwnProperty.call(n, i) && (
|
|
1149
|
-
},
|
|
18
|
+
Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
|
|
19
|
+
}, G(r, t);
|
|
1150
20
|
};
|
|
1151
|
-
function
|
|
1152
|
-
if (typeof
|
|
1153
|
-
throw new TypeError("Class extends value " + String(
|
|
1154
|
-
|
|
1155
|
-
function
|
|
21
|
+
function x(r, t) {
|
|
22
|
+
if (typeof t != "function" && t !== null)
|
|
23
|
+
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
24
|
+
G(r, t);
|
|
25
|
+
function e() {
|
|
1156
26
|
this.constructor = r;
|
|
1157
27
|
}
|
|
1158
|
-
r.prototype =
|
|
28
|
+
r.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
|
|
1159
29
|
}
|
|
1160
|
-
function
|
|
1161
|
-
var
|
|
1162
|
-
if (
|
|
1163
|
-
return
|
|
30
|
+
function Y(r) {
|
|
31
|
+
var t = typeof Symbol == "function" && Symbol.iterator, e = t && r[t], n = 0;
|
|
32
|
+
if (e)
|
|
33
|
+
return e.call(r);
|
|
1164
34
|
if (r && typeof r.length == "number")
|
|
1165
35
|
return {
|
|
1166
36
|
next: function() {
|
|
1167
37
|
return r && n >= r.length && (r = void 0), { value: r && r[n++], done: !r };
|
|
1168
38
|
}
|
|
1169
39
|
};
|
|
1170
|
-
throw new TypeError(
|
|
40
|
+
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1171
41
|
}
|
|
1172
|
-
function
|
|
1173
|
-
var
|
|
1174
|
-
if (!
|
|
42
|
+
function M(r, t) {
|
|
43
|
+
var e = typeof Symbol == "function" && r[Symbol.iterator];
|
|
44
|
+
if (!e)
|
|
1175
45
|
return r;
|
|
1176
|
-
var n =
|
|
46
|
+
var n = e.call(r), i, o = [], s;
|
|
1177
47
|
try {
|
|
1178
|
-
for (; (
|
|
1179
|
-
|
|
48
|
+
for (; (t === void 0 || t-- > 0) && !(i = n.next()).done; )
|
|
49
|
+
o.push(i.value);
|
|
1180
50
|
} catch (c) {
|
|
1181
|
-
|
|
51
|
+
s = { error: c };
|
|
1182
52
|
} finally {
|
|
1183
53
|
try {
|
|
1184
|
-
i && !i.done && (
|
|
54
|
+
i && !i.done && (e = n.return) && e.call(n);
|
|
1185
55
|
} finally {
|
|
1186
|
-
if (
|
|
1187
|
-
throw
|
|
56
|
+
if (s)
|
|
57
|
+
throw s.error;
|
|
1188
58
|
}
|
|
1189
59
|
}
|
|
1190
|
-
return
|
|
60
|
+
return o;
|
|
1191
61
|
}
|
|
1192
|
-
function
|
|
1193
|
-
if (
|
|
1194
|
-
for (var n = 0, i =
|
|
1195
|
-
(
|
|
1196
|
-
return r.concat(
|
|
62
|
+
function I(r, t, e) {
|
|
63
|
+
if (e || arguments.length === 2)
|
|
64
|
+
for (var n = 0, i = t.length, o; n < i; n++)
|
|
65
|
+
(o || !(n in t)) && (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
|
|
66
|
+
return r.concat(o || Array.prototype.slice.call(t));
|
|
1197
67
|
}
|
|
1198
|
-
function
|
|
68
|
+
function b(r) {
|
|
1199
69
|
return typeof r == "function";
|
|
1200
70
|
}
|
|
1201
|
-
function
|
|
1202
|
-
var
|
|
71
|
+
function re(r) {
|
|
72
|
+
var t = function(n) {
|
|
1203
73
|
Error.call(n), n.stack = new Error().stack;
|
|
1204
|
-
},
|
|
1205
|
-
return
|
|
74
|
+
}, e = r(t);
|
|
75
|
+
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
|
1206
76
|
}
|
|
1207
|
-
var
|
|
77
|
+
var N = re(function(r) {
|
|
1208
78
|
return function(e) {
|
|
1209
79
|
r(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
|
1210
|
-
` + e.map(function(
|
|
1211
|
-
return
|
|
80
|
+
` + e.map(function(n, i) {
|
|
81
|
+
return i + 1 + ") " + n.toString();
|
|
1212
82
|
}).join(`
|
|
1213
83
|
`) : "", this.name = "UnsubscriptionError", this.errors = e;
|
|
1214
84
|
};
|
|
1215
85
|
});
|
|
1216
|
-
function
|
|
86
|
+
function V(r, t) {
|
|
1217
87
|
if (r) {
|
|
1218
|
-
var
|
|
1219
|
-
0 <=
|
|
88
|
+
var e = r.indexOf(t);
|
|
89
|
+
0 <= e && r.splice(e, 1);
|
|
1220
90
|
}
|
|
1221
91
|
}
|
|
1222
|
-
var
|
|
1223
|
-
function r(
|
|
1224
|
-
this.initialTeardown =
|
|
92
|
+
var A = function() {
|
|
93
|
+
function r(t) {
|
|
94
|
+
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
1225
95
|
}
|
|
1226
96
|
return r.prototype.unsubscribe = function() {
|
|
1227
|
-
var
|
|
97
|
+
var t, e, n, i, o;
|
|
1228
98
|
if (!this.closed) {
|
|
1229
99
|
this.closed = !0;
|
|
1230
|
-
var
|
|
1231
|
-
if (
|
|
1232
|
-
if (this._parentage = null, Array.isArray(
|
|
100
|
+
var s = this._parentage;
|
|
101
|
+
if (s)
|
|
102
|
+
if (this._parentage = null, Array.isArray(s))
|
|
1233
103
|
try {
|
|
1234
|
-
for (var c =
|
|
1235
|
-
var
|
|
1236
|
-
|
|
104
|
+
for (var c = Y(s), u = c.next(); !u.done; u = c.next()) {
|
|
105
|
+
var a = u.value;
|
|
106
|
+
a.remove(this);
|
|
1237
107
|
}
|
|
1238
|
-
} catch (
|
|
1239
|
-
|
|
108
|
+
} catch (l) {
|
|
109
|
+
t = { error: l };
|
|
1240
110
|
} finally {
|
|
1241
111
|
try {
|
|
1242
|
-
|
|
112
|
+
u && !u.done && (e = c.return) && e.call(c);
|
|
1243
113
|
} finally {
|
|
1244
|
-
if (
|
|
1245
|
-
throw
|
|
114
|
+
if (t)
|
|
115
|
+
throw t.error;
|
|
1246
116
|
}
|
|
1247
117
|
}
|
|
1248
118
|
else
|
|
1249
|
-
|
|
1250
|
-
var
|
|
1251
|
-
if (
|
|
119
|
+
s.remove(this);
|
|
120
|
+
var d = this.initialTeardown;
|
|
121
|
+
if (b(d))
|
|
1252
122
|
try {
|
|
1253
|
-
|
|
1254
|
-
} catch (
|
|
1255
|
-
|
|
123
|
+
d();
|
|
124
|
+
} catch (l) {
|
|
125
|
+
o = l instanceof N ? l.errors : [l];
|
|
1256
126
|
}
|
|
1257
|
-
var
|
|
1258
|
-
if (
|
|
127
|
+
var f = this._finalizers;
|
|
128
|
+
if (f) {
|
|
1259
129
|
this._finalizers = null;
|
|
1260
130
|
try {
|
|
1261
|
-
for (var w =
|
|
1262
|
-
var
|
|
131
|
+
for (var w = Y(f), y = w.next(); !y.done; y = w.next()) {
|
|
132
|
+
var k = y.value;
|
|
1263
133
|
try {
|
|
1264
|
-
|
|
1265
|
-
} catch (
|
|
1266
|
-
|
|
134
|
+
ce(k);
|
|
135
|
+
} catch (l) {
|
|
136
|
+
o = o ?? [], l instanceof N ? o = I(I([], M(o)), M(l.errors)) : o.push(l);
|
|
1267
137
|
}
|
|
1268
138
|
}
|
|
1269
|
-
} catch (
|
|
1270
|
-
n = { error:
|
|
139
|
+
} catch (l) {
|
|
140
|
+
n = { error: l };
|
|
1271
141
|
} finally {
|
|
1272
142
|
try {
|
|
1273
|
-
|
|
143
|
+
y && !y.done && (i = w.return) && i.call(w);
|
|
1274
144
|
} finally {
|
|
1275
145
|
if (n)
|
|
1276
146
|
throw n.error;
|
|
1277
147
|
}
|
|
1278
148
|
}
|
|
1279
149
|
}
|
|
1280
|
-
if (
|
|
1281
|
-
throw new
|
|
150
|
+
if (o)
|
|
151
|
+
throw new N(o);
|
|
1282
152
|
}
|
|
1283
|
-
}, r.prototype.add = function(
|
|
1284
|
-
var
|
|
1285
|
-
if (
|
|
153
|
+
}, r.prototype.add = function(t) {
|
|
154
|
+
var e;
|
|
155
|
+
if (t && t !== this)
|
|
1286
156
|
if (this.closed)
|
|
1287
|
-
|
|
157
|
+
ce(t);
|
|
1288
158
|
else {
|
|
1289
|
-
if (
|
|
1290
|
-
if (
|
|
159
|
+
if (t instanceof r) {
|
|
160
|
+
if (t.closed || t._hasParent(this))
|
|
1291
161
|
return;
|
|
1292
|
-
|
|
162
|
+
t._addParent(this);
|
|
1293
163
|
}
|
|
1294
|
-
(this._finalizers = (
|
|
164
|
+
(this._finalizers = (e = this._finalizers) !== null && e !== void 0 ? e : []).push(t);
|
|
1295
165
|
}
|
|
1296
|
-
}, r.prototype._hasParent = function(
|
|
1297
|
-
var
|
|
1298
|
-
return
|
|
1299
|
-
}, r.prototype._addParent = function(
|
|
1300
|
-
var
|
|
1301
|
-
this._parentage = Array.isArray(
|
|
1302
|
-
}, r.prototype._removeParent = function(
|
|
1303
|
-
var
|
|
1304
|
-
|
|
1305
|
-
}, r.prototype.remove = function(
|
|
1306
|
-
var
|
|
1307
|
-
|
|
166
|
+
}, r.prototype._hasParent = function(t) {
|
|
167
|
+
var e = this._parentage;
|
|
168
|
+
return e === t || Array.isArray(e) && e.includes(t);
|
|
169
|
+
}, r.prototype._addParent = function(t) {
|
|
170
|
+
var e = this._parentage;
|
|
171
|
+
this._parentage = Array.isArray(e) ? (e.push(t), e) : e ? [e, t] : t;
|
|
172
|
+
}, r.prototype._removeParent = function(t) {
|
|
173
|
+
var e = this._parentage;
|
|
174
|
+
e === t ? this._parentage = null : Array.isArray(e) && V(e, t);
|
|
175
|
+
}, r.prototype.remove = function(t) {
|
|
176
|
+
var e = this._finalizers;
|
|
177
|
+
e && V(e, t), t instanceof r && t._removeParent(this);
|
|
1308
178
|
}, r.EMPTY = function() {
|
|
1309
|
-
var
|
|
1310
|
-
return
|
|
179
|
+
var t = new r();
|
|
180
|
+
return t.closed = !0, t;
|
|
1311
181
|
}(), r;
|
|
1312
|
-
}(),
|
|
1313
|
-
function
|
|
1314
|
-
return r instanceof
|
|
182
|
+
}(), Ce = A.EMPTY;
|
|
183
|
+
function Ee(r) {
|
|
184
|
+
return r instanceof A || r && "closed" in r && b(r.remove) && b(r.add) && b(r.unsubscribe);
|
|
1315
185
|
}
|
|
1316
|
-
function
|
|
1317
|
-
|
|
186
|
+
function ce(r) {
|
|
187
|
+
b(r) ? r() : r.unsubscribe();
|
|
1318
188
|
}
|
|
1319
|
-
var
|
|
189
|
+
var xe = {
|
|
1320
190
|
onUnhandledError: null,
|
|
1321
191
|
onStoppedNotification: null,
|
|
1322
192
|
Promise: void 0,
|
|
1323
193
|
useDeprecatedSynchronousErrorHandling: !1,
|
|
1324
194
|
useDeprecatedNextContext: !1
|
|
1325
|
-
},
|
|
1326
|
-
setTimeout: function(r,
|
|
1327
|
-
for (var
|
|
1328
|
-
|
|
1329
|
-
|
|
195
|
+
}, J = {
|
|
196
|
+
setTimeout: function(r, t) {
|
|
197
|
+
for (var e = [], n = 2; n < arguments.length; n++)
|
|
198
|
+
e[n - 2] = arguments[n];
|
|
199
|
+
var i = J.delegate;
|
|
200
|
+
return i != null && i.setTimeout ? i.setTimeout.apply(i, I([r, t], M(e))) : setTimeout.apply(void 0, I([r, t], M(e)));
|
|
1330
201
|
},
|
|
1331
202
|
clearTimeout: function(r) {
|
|
1332
|
-
|
|
203
|
+
var t = J.delegate;
|
|
204
|
+
return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(r);
|
|
1333
205
|
},
|
|
1334
206
|
delegate: void 0
|
|
1335
207
|
};
|
|
1336
|
-
function
|
|
1337
|
-
|
|
208
|
+
function Fe(r) {
|
|
209
|
+
J.setTimeout(function() {
|
|
1338
210
|
throw r;
|
|
1339
211
|
});
|
|
1340
212
|
}
|
|
1341
|
-
function
|
|
213
|
+
function ae() {
|
|
1342
214
|
}
|
|
1343
|
-
function
|
|
215
|
+
function $(r) {
|
|
1344
216
|
r();
|
|
1345
217
|
}
|
|
1346
|
-
var
|
|
1347
|
-
|
|
1348
|
-
function e
|
|
218
|
+
var ne = function(r) {
|
|
219
|
+
x(t, r);
|
|
220
|
+
function t(e) {
|
|
1349
221
|
var n = r.call(this) || this;
|
|
1350
|
-
return n.isStopped = !1,
|
|
1351
|
-
}
|
|
1352
|
-
return
|
|
1353
|
-
return new
|
|
1354
|
-
},
|
|
1355
|
-
this.isStopped || this._next(
|
|
1356
|
-
},
|
|
1357
|
-
this.isStopped || (this.isStopped = !0, this._error(
|
|
1358
|
-
},
|
|
222
|
+
return n.isStopped = !1, e ? (n.destination = e, Ee(e) && e.add(n)) : n.destination = ke, n;
|
|
223
|
+
}
|
|
224
|
+
return t.create = function(e, n, i) {
|
|
225
|
+
return new F(e, n, i);
|
|
226
|
+
}, t.prototype.next = function(e) {
|
|
227
|
+
this.isStopped || this._next(e);
|
|
228
|
+
}, t.prototype.error = function(e) {
|
|
229
|
+
this.isStopped || (this.isStopped = !0, this._error(e));
|
|
230
|
+
}, t.prototype.complete = function() {
|
|
1359
231
|
this.isStopped || (this.isStopped = !0, this._complete());
|
|
1360
|
-
},
|
|
232
|
+
}, t.prototype.unsubscribe = function() {
|
|
1361
233
|
this.closed || (this.isStopped = !0, r.prototype.unsubscribe.call(this), this.destination = null);
|
|
1362
|
-
},
|
|
1363
|
-
this.destination.next(
|
|
1364
|
-
},
|
|
234
|
+
}, t.prototype._next = function(e) {
|
|
235
|
+
this.destination.next(e);
|
|
236
|
+
}, t.prototype._error = function(e) {
|
|
1365
237
|
try {
|
|
1366
|
-
this.destination.error(
|
|
238
|
+
this.destination.error(e);
|
|
1367
239
|
} finally {
|
|
1368
240
|
this.unsubscribe();
|
|
1369
241
|
}
|
|
1370
|
-
},
|
|
242
|
+
}, t.prototype._complete = function() {
|
|
1371
243
|
try {
|
|
1372
244
|
this.destination.complete();
|
|
1373
245
|
} finally {
|
|
1374
246
|
this.unsubscribe();
|
|
1375
247
|
}
|
|
1376
|
-
},
|
|
1377
|
-
}(
|
|
1378
|
-
function
|
|
1379
|
-
return
|
|
248
|
+
}, t;
|
|
249
|
+
}(A), He = Function.prototype.bind;
|
|
250
|
+
function q(r, t) {
|
|
251
|
+
return He.call(r, t);
|
|
1380
252
|
}
|
|
1381
|
-
var
|
|
1382
|
-
function r(
|
|
1383
|
-
this.partialObserver =
|
|
253
|
+
var De = function() {
|
|
254
|
+
function r(t) {
|
|
255
|
+
this.partialObserver = t;
|
|
1384
256
|
}
|
|
1385
|
-
return r.prototype.next = function(
|
|
1386
|
-
var
|
|
1387
|
-
if (
|
|
257
|
+
return r.prototype.next = function(t) {
|
|
258
|
+
var e = this.partialObserver;
|
|
259
|
+
if (e.next)
|
|
1388
260
|
try {
|
|
1389
|
-
|
|
261
|
+
e.next(t);
|
|
1390
262
|
} catch (n) {
|
|
1391
|
-
|
|
263
|
+
T(n);
|
|
1392
264
|
}
|
|
1393
|
-
}, r.prototype.error = function(
|
|
1394
|
-
var
|
|
1395
|
-
if (
|
|
265
|
+
}, r.prototype.error = function(t) {
|
|
266
|
+
var e = this.partialObserver;
|
|
267
|
+
if (e.error)
|
|
1396
268
|
try {
|
|
1397
|
-
|
|
269
|
+
e.error(t);
|
|
1398
270
|
} catch (n) {
|
|
1399
|
-
|
|
271
|
+
T(n);
|
|
1400
272
|
}
|
|
1401
273
|
else
|
|
1402
|
-
|
|
274
|
+
T(t);
|
|
1403
275
|
}, r.prototype.complete = function() {
|
|
1404
|
-
var
|
|
1405
|
-
if (
|
|
276
|
+
var t = this.partialObserver;
|
|
277
|
+
if (t.complete)
|
|
1406
278
|
try {
|
|
1407
|
-
|
|
1408
|
-
} catch (
|
|
1409
|
-
|
|
279
|
+
t.complete();
|
|
280
|
+
} catch (e) {
|
|
281
|
+
T(e);
|
|
1410
282
|
}
|
|
1411
283
|
}, r;
|
|
1412
|
-
}(),
|
|
1413
|
-
|
|
1414
|
-
function e
|
|
1415
|
-
var
|
|
1416
|
-
if (
|
|
1417
|
-
|
|
1418
|
-
next:
|
|
284
|
+
}(), F = function(r) {
|
|
285
|
+
x(t, r);
|
|
286
|
+
function t(e, n, i) {
|
|
287
|
+
var o = r.call(this) || this, s;
|
|
288
|
+
if (b(e) || !e)
|
|
289
|
+
s = {
|
|
290
|
+
next: e ?? void 0,
|
|
1419
291
|
error: n ?? void 0,
|
|
1420
292
|
complete: i ?? void 0
|
|
1421
293
|
};
|
|
1422
294
|
else {
|
|
1423
295
|
var c;
|
|
1424
|
-
|
|
1425
|
-
return
|
|
1426
|
-
},
|
|
1427
|
-
next:
|
|
1428
|
-
error:
|
|
1429
|
-
complete:
|
|
1430
|
-
}) :
|
|
296
|
+
o && xe.useDeprecatedNextContext ? (c = Object.create(e), c.unsubscribe = function() {
|
|
297
|
+
return o.unsubscribe();
|
|
298
|
+
}, s = {
|
|
299
|
+
next: e.next && q(e.next, c),
|
|
300
|
+
error: e.error && q(e.error, c),
|
|
301
|
+
complete: e.complete && q(e.complete, c)
|
|
302
|
+
}) : s = e;
|
|
1431
303
|
}
|
|
1432
|
-
return
|
|
304
|
+
return o.destination = new De(s), o;
|
|
1433
305
|
}
|
|
1434
|
-
return
|
|
1435
|
-
}(
|
|
1436
|
-
function
|
|
1437
|
-
|
|
306
|
+
return t;
|
|
307
|
+
}(ne);
|
|
308
|
+
function T(r) {
|
|
309
|
+
Fe(r);
|
|
1438
310
|
}
|
|
1439
|
-
function
|
|
311
|
+
function Le(r) {
|
|
1440
312
|
throw r;
|
|
1441
313
|
}
|
|
1442
|
-
var
|
|
314
|
+
var ke = {
|
|
1443
315
|
closed: !0,
|
|
1444
|
-
next:
|
|
1445
|
-
error:
|
|
1446
|
-
complete:
|
|
1447
|
-
},
|
|
316
|
+
next: ae,
|
|
317
|
+
error: Le,
|
|
318
|
+
complete: ae
|
|
319
|
+
}, Be = function() {
|
|
1448
320
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
1449
321
|
}();
|
|
1450
|
-
function
|
|
322
|
+
function _e(r) {
|
|
1451
323
|
return r;
|
|
1452
324
|
}
|
|
1453
|
-
function
|
|
1454
|
-
return r.length === 0 ?
|
|
1455
|
-
return r.reduce(function(
|
|
1456
|
-
return n
|
|
325
|
+
function Ne(r) {
|
|
326
|
+
return r.length === 0 ? _e : r.length === 1 ? r[0] : function(e) {
|
|
327
|
+
return r.reduce(function(n, i) {
|
|
328
|
+
return i(n);
|
|
1457
329
|
}, e);
|
|
1458
330
|
};
|
|
1459
331
|
}
|
|
1460
|
-
var
|
|
1461
|
-
function r(
|
|
1462
|
-
|
|
332
|
+
var K = function() {
|
|
333
|
+
function r(t) {
|
|
334
|
+
t && (this._subscribe = t);
|
|
1463
335
|
}
|
|
1464
|
-
return r.prototype.lift = function(
|
|
1465
|
-
var
|
|
1466
|
-
return
|
|
1467
|
-
}, r.prototype.subscribe = function(
|
|
1468
|
-
var i = this,
|
|
1469
|
-
return
|
|
1470
|
-
var
|
|
1471
|
-
|
|
1472
|
-
}),
|
|
1473
|
-
}, r.prototype._trySubscribe = function(
|
|
336
|
+
return r.prototype.lift = function(t) {
|
|
337
|
+
var e = new r();
|
|
338
|
+
return e.source = this, e.operator = t, e;
|
|
339
|
+
}, r.prototype.subscribe = function(t, e, n) {
|
|
340
|
+
var i = this, o = ze(t) ? t : new F(t, e, n);
|
|
341
|
+
return $(function() {
|
|
342
|
+
var s = i, c = s.operator, u = s.source;
|
|
343
|
+
o.add(c ? c.call(o, u) : u ? i._subscribe(o) : i._trySubscribe(o));
|
|
344
|
+
}), o;
|
|
345
|
+
}, r.prototype._trySubscribe = function(t) {
|
|
1474
346
|
try {
|
|
1475
|
-
return this._subscribe(
|
|
1476
|
-
} catch (
|
|
1477
|
-
|
|
347
|
+
return this._subscribe(t);
|
|
348
|
+
} catch (e) {
|
|
349
|
+
t.error(e);
|
|
1478
350
|
}
|
|
1479
|
-
}, r.prototype.forEach = function(
|
|
351
|
+
}, r.prototype.forEach = function(t, e) {
|
|
1480
352
|
var n = this;
|
|
1481
|
-
return
|
|
1482
|
-
var
|
|
353
|
+
return e = le(e), new e(function(i, o) {
|
|
354
|
+
var s = new F({
|
|
1483
355
|
next: function(c) {
|
|
1484
356
|
try {
|
|
1485
|
-
|
|
1486
|
-
} catch (
|
|
1487
|
-
|
|
357
|
+
t(c);
|
|
358
|
+
} catch (u) {
|
|
359
|
+
o(u), s.unsubscribe();
|
|
1488
360
|
}
|
|
1489
361
|
},
|
|
1490
|
-
error:
|
|
362
|
+
error: o,
|
|
1491
363
|
complete: i
|
|
1492
364
|
});
|
|
1493
|
-
n.subscribe(
|
|
365
|
+
n.subscribe(s);
|
|
1494
366
|
});
|
|
1495
|
-
}, r.prototype._subscribe = function(
|
|
1496
|
-
var
|
|
1497
|
-
return (
|
|
1498
|
-
}, r.prototype[
|
|
367
|
+
}, r.prototype._subscribe = function(t) {
|
|
368
|
+
var e;
|
|
369
|
+
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
|
|
370
|
+
}, r.prototype[Be] = function() {
|
|
1499
371
|
return this;
|
|
1500
372
|
}, r.prototype.pipe = function() {
|
|
1501
|
-
for (var
|
|
1502
|
-
e
|
|
1503
|
-
return
|
|
1504
|
-
}, r.prototype.toPromise = function(
|
|
1505
|
-
var
|
|
1506
|
-
return
|
|
1507
|
-
var
|
|
1508
|
-
|
|
1509
|
-
return
|
|
1510
|
-
}, function(
|
|
1511
|
-
return i(
|
|
373
|
+
for (var t = [], e = 0; e < arguments.length; e++)
|
|
374
|
+
t[e] = arguments[e];
|
|
375
|
+
return Ne(t)(this);
|
|
376
|
+
}, r.prototype.toPromise = function(t) {
|
|
377
|
+
var e = this;
|
|
378
|
+
return t = le(t), new t(function(n, i) {
|
|
379
|
+
var o;
|
|
380
|
+
e.subscribe(function(s) {
|
|
381
|
+
return o = s;
|
|
382
|
+
}, function(s) {
|
|
383
|
+
return i(s);
|
|
1512
384
|
}, function() {
|
|
1513
|
-
return n(
|
|
385
|
+
return n(o);
|
|
1514
386
|
});
|
|
1515
387
|
});
|
|
1516
|
-
}, r.create = function(
|
|
1517
|
-
return new r(
|
|
388
|
+
}, r.create = function(t) {
|
|
389
|
+
return new r(t);
|
|
1518
390
|
}, r;
|
|
1519
391
|
}();
|
|
1520
|
-
function
|
|
1521
|
-
var
|
|
1522
|
-
return (
|
|
392
|
+
function le(r) {
|
|
393
|
+
var t;
|
|
394
|
+
return (t = r ?? xe.Promise) !== null && t !== void 0 ? t : Promise;
|
|
1523
395
|
}
|
|
1524
|
-
function
|
|
1525
|
-
return r &&
|
|
396
|
+
function qe(r) {
|
|
397
|
+
return r && b(r.next) && b(r.error) && b(r.complete);
|
|
1526
398
|
}
|
|
1527
|
-
function
|
|
1528
|
-
return r && r instanceof
|
|
399
|
+
function ze(r) {
|
|
400
|
+
return r && r instanceof ne || qe(r) && Ee(r);
|
|
1529
401
|
}
|
|
1530
|
-
function
|
|
1531
|
-
return
|
|
402
|
+
function Qe(r) {
|
|
403
|
+
return b(r == null ? void 0 : r.lift);
|
|
1532
404
|
}
|
|
1533
|
-
function
|
|
1534
|
-
return function(
|
|
1535
|
-
if (
|
|
1536
|
-
return
|
|
405
|
+
function Me(r) {
|
|
406
|
+
return function(t) {
|
|
407
|
+
if (Qe(t))
|
|
408
|
+
return t.lift(function(e) {
|
|
1537
409
|
try {
|
|
1538
|
-
return r(
|
|
410
|
+
return r(e, this);
|
|
1539
411
|
} catch (n) {
|
|
1540
412
|
this.error(n);
|
|
1541
413
|
}
|
|
@@ -1543,76 +415,76 @@ function De(r) {
|
|
|
1543
415
|
throw new TypeError("Unable to lift unknown Observable type");
|
|
1544
416
|
};
|
|
1545
417
|
}
|
|
1546
|
-
function
|
|
1547
|
-
return new
|
|
418
|
+
function Ie(r, t, e, n, i) {
|
|
419
|
+
return new Ge(r, t, e, n, i);
|
|
1548
420
|
}
|
|
1549
|
-
var
|
|
1550
|
-
|
|
1551
|
-
function e
|
|
1552
|
-
var
|
|
1553
|
-
return
|
|
421
|
+
var Ge = function(r) {
|
|
422
|
+
x(t, r);
|
|
423
|
+
function t(e, n, i, o, s, c) {
|
|
424
|
+
var u = r.call(this, e) || this;
|
|
425
|
+
return u.onFinalize = s, u.shouldUnsubscribe = c, u._next = n ? function(a) {
|
|
1554
426
|
try {
|
|
1555
|
-
n(
|
|
1556
|
-
} catch (
|
|
1557
|
-
|
|
427
|
+
n(a);
|
|
428
|
+
} catch (d) {
|
|
429
|
+
e.error(d);
|
|
1558
430
|
}
|
|
1559
|
-
} : r.prototype._next,
|
|
431
|
+
} : r.prototype._next, u._error = o ? function(a) {
|
|
1560
432
|
try {
|
|
1561
|
-
|
|
1562
|
-
} catch (
|
|
1563
|
-
|
|
433
|
+
o(a);
|
|
434
|
+
} catch (d) {
|
|
435
|
+
e.error(d);
|
|
1564
436
|
} finally {
|
|
1565
437
|
this.unsubscribe();
|
|
1566
438
|
}
|
|
1567
|
-
} : r.prototype._error,
|
|
439
|
+
} : r.prototype._error, u._complete = i ? function() {
|
|
1568
440
|
try {
|
|
1569
441
|
i();
|
|
1570
|
-
} catch (
|
|
1571
|
-
|
|
442
|
+
} catch (a) {
|
|
443
|
+
e.error(a);
|
|
1572
444
|
} finally {
|
|
1573
445
|
this.unsubscribe();
|
|
1574
446
|
}
|
|
1575
|
-
} : r.prototype._complete,
|
|
447
|
+
} : r.prototype._complete, u;
|
|
1576
448
|
}
|
|
1577
|
-
return
|
|
1578
|
-
var
|
|
449
|
+
return t.prototype.unsubscribe = function() {
|
|
450
|
+
var e;
|
|
1579
451
|
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
|
1580
452
|
var n = this.closed;
|
|
1581
|
-
r.prototype.unsubscribe.call(this), !n && ((
|
|
453
|
+
r.prototype.unsubscribe.call(this), !n && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
|
|
1582
454
|
}
|
|
1583
|
-
},
|
|
1584
|
-
}(
|
|
455
|
+
}, t;
|
|
456
|
+
}(ne), Ye = re(function(r) {
|
|
1585
457
|
return function() {
|
|
1586
458
|
r(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
1587
459
|
};
|
|
1588
|
-
}),
|
|
1589
|
-
|
|
1590
|
-
function
|
|
1591
|
-
var
|
|
1592
|
-
return
|
|
460
|
+
}), Oe = function(r) {
|
|
461
|
+
x(t, r);
|
|
462
|
+
function t() {
|
|
463
|
+
var e = r.call(this) || this;
|
|
464
|
+
return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
|
|
1593
465
|
}
|
|
1594
|
-
return
|
|
1595
|
-
var n = new
|
|
1596
|
-
return n.operator =
|
|
1597
|
-
},
|
|
466
|
+
return t.prototype.lift = function(e) {
|
|
467
|
+
var n = new he(this, this);
|
|
468
|
+
return n.operator = e, n;
|
|
469
|
+
}, t.prototype._throwIfClosed = function() {
|
|
1598
470
|
if (this.closed)
|
|
1599
|
-
throw new
|
|
1600
|
-
},
|
|
471
|
+
throw new Ye();
|
|
472
|
+
}, t.prototype.next = function(e) {
|
|
1601
473
|
var n = this;
|
|
1602
|
-
|
|
1603
|
-
var i,
|
|
474
|
+
$(function() {
|
|
475
|
+
var i, o;
|
|
1604
476
|
if (n._throwIfClosed(), !n.isStopped) {
|
|
1605
477
|
n.currentObservers || (n.currentObservers = Array.from(n.observers));
|
|
1606
478
|
try {
|
|
1607
|
-
for (var
|
|
1608
|
-
var
|
|
1609
|
-
|
|
479
|
+
for (var s = Y(n.currentObservers), c = s.next(); !c.done; c = s.next()) {
|
|
480
|
+
var u = c.value;
|
|
481
|
+
u.next(e);
|
|
1610
482
|
}
|
|
1611
|
-
} catch (
|
|
1612
|
-
i = { error:
|
|
483
|
+
} catch (a) {
|
|
484
|
+
i = { error: a };
|
|
1613
485
|
} finally {
|
|
1614
486
|
try {
|
|
1615
|
-
c && !c.done && (
|
|
487
|
+
c && !c.done && (o = s.return) && o.call(s);
|
|
1616
488
|
} finally {
|
|
1617
489
|
if (i)
|
|
1618
490
|
throw i.error;
|
|
@@ -1620,283 +492,789 @@ var Hs = function(r) {
|
|
|
1620
492
|
}
|
|
1621
493
|
}
|
|
1622
494
|
});
|
|
1623
|
-
},
|
|
495
|
+
}, t.prototype.error = function(e) {
|
|
1624
496
|
var n = this;
|
|
1625
|
-
|
|
497
|
+
$(function() {
|
|
1626
498
|
if (n._throwIfClosed(), !n.isStopped) {
|
|
1627
|
-
n.hasError = n.isStopped = !0, n.thrownError =
|
|
499
|
+
n.hasError = n.isStopped = !0, n.thrownError = e;
|
|
1628
500
|
for (var i = n.observers; i.length; )
|
|
1629
|
-
i.shift().error(
|
|
501
|
+
i.shift().error(e);
|
|
1630
502
|
}
|
|
1631
503
|
});
|
|
1632
|
-
},
|
|
1633
|
-
var
|
|
1634
|
-
|
|
1635
|
-
if (
|
|
1636
|
-
|
|
1637
|
-
for (var n =
|
|
504
|
+
}, t.prototype.complete = function() {
|
|
505
|
+
var e = this;
|
|
506
|
+
$(function() {
|
|
507
|
+
if (e._throwIfClosed(), !e.isStopped) {
|
|
508
|
+
e.isStopped = !0;
|
|
509
|
+
for (var n = e.observers; n.length; )
|
|
1638
510
|
n.shift().complete();
|
|
1639
511
|
}
|
|
1640
512
|
});
|
|
1641
|
-
},
|
|
513
|
+
}, t.prototype.unsubscribe = function() {
|
|
1642
514
|
this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
|
|
1643
|
-
}, Object.defineProperty(
|
|
515
|
+
}, Object.defineProperty(t.prototype, "observed", {
|
|
1644
516
|
get: function() {
|
|
1645
|
-
var
|
|
1646
|
-
return ((
|
|
517
|
+
var e;
|
|
518
|
+
return ((e = this.observers) === null || e === void 0 ? void 0 : e.length) > 0;
|
|
1647
519
|
},
|
|
1648
520
|
enumerable: !1,
|
|
1649
521
|
configurable: !0
|
|
1650
|
-
}),
|
|
1651
|
-
return this._throwIfClosed(), r.prototype._trySubscribe.call(this,
|
|
1652
|
-
},
|
|
1653
|
-
return this._throwIfClosed(), this._checkFinalizedStatuses(
|
|
1654
|
-
},
|
|
1655
|
-
var n = this, i = this,
|
|
1656
|
-
return
|
|
1657
|
-
n.currentObservers = null,
|
|
522
|
+
}), t.prototype._trySubscribe = function(e) {
|
|
523
|
+
return this._throwIfClosed(), r.prototype._trySubscribe.call(this, e);
|
|
524
|
+
}, t.prototype._subscribe = function(e) {
|
|
525
|
+
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
|
|
526
|
+
}, t.prototype._innerSubscribe = function(e) {
|
|
527
|
+
var n = this, i = this, o = i.hasError, s = i.isStopped, c = i.observers;
|
|
528
|
+
return o || s ? Ce : (this.currentObservers = null, c.push(e), new A(function() {
|
|
529
|
+
n.currentObservers = null, V(c, e);
|
|
1658
530
|
}));
|
|
1659
|
-
},
|
|
1660
|
-
var n = this, i = n.hasError,
|
|
1661
|
-
i ?
|
|
1662
|
-
},
|
|
1663
|
-
var
|
|
1664
|
-
return
|
|
1665
|
-
},
|
|
1666
|
-
return new
|
|
1667
|
-
},
|
|
1668
|
-
}(
|
|
1669
|
-
|
|
1670
|
-
function e
|
|
531
|
+
}, t.prototype._checkFinalizedStatuses = function(e) {
|
|
532
|
+
var n = this, i = n.hasError, o = n.thrownError, s = n.isStopped;
|
|
533
|
+
i ? e.error(o) : s && e.complete();
|
|
534
|
+
}, t.prototype.asObservable = function() {
|
|
535
|
+
var e = new K();
|
|
536
|
+
return e.source = this, e;
|
|
537
|
+
}, t.create = function(e, n) {
|
|
538
|
+
return new he(e, n);
|
|
539
|
+
}, t;
|
|
540
|
+
}(K), he = function(r) {
|
|
541
|
+
x(t, r);
|
|
542
|
+
function t(e, n) {
|
|
1671
543
|
var i = r.call(this) || this;
|
|
1672
|
-
return i.destination =
|
|
544
|
+
return i.destination = e, i.source = n, i;
|
|
1673
545
|
}
|
|
1674
|
-
return
|
|
546
|
+
return t.prototype.next = function(e) {
|
|
1675
547
|
var n, i;
|
|
1676
|
-
(i = (n = this.destination) === null || n === void 0 ? void 0 : n.next) === null || i === void 0 || i.call(n,
|
|
1677
|
-
},
|
|
548
|
+
(i = (n = this.destination) === null || n === void 0 ? void 0 : n.next) === null || i === void 0 || i.call(n, e);
|
|
549
|
+
}, t.prototype.error = function(e) {
|
|
1678
550
|
var n, i;
|
|
1679
|
-
(i = (n = this.destination) === null || n === void 0 ? void 0 : n.error) === null || i === void 0 || i.call(n,
|
|
1680
|
-
},
|
|
1681
|
-
var
|
|
1682
|
-
(n = (
|
|
1683
|
-
},
|
|
551
|
+
(i = (n = this.destination) === null || n === void 0 ? void 0 : n.error) === null || i === void 0 || i.call(n, e);
|
|
552
|
+
}, t.prototype.complete = function() {
|
|
553
|
+
var e, n;
|
|
554
|
+
(n = (e = this.destination) === null || e === void 0 ? void 0 : e.complete) === null || n === void 0 || n.call(e);
|
|
555
|
+
}, t.prototype._subscribe = function(e) {
|
|
1684
556
|
var n, i;
|
|
1685
|
-
return (i = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(
|
|
1686
|
-
},
|
|
1687
|
-
}(
|
|
557
|
+
return (i = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(e)) !== null && i !== void 0 ? i : Ce;
|
|
558
|
+
}, t;
|
|
559
|
+
}(Oe), Pe = {
|
|
1688
560
|
now: function() {
|
|
1689
|
-
return Date.now();
|
|
561
|
+
return (Pe.delegate || Date).now();
|
|
1690
562
|
},
|
|
1691
563
|
delegate: void 0
|
|
1692
|
-
},
|
|
1693
|
-
|
|
1694
|
-
function e
|
|
564
|
+
}, Je = function(r) {
|
|
565
|
+
x(t, r);
|
|
566
|
+
function t(e, n) {
|
|
1695
567
|
return r.call(this) || this;
|
|
1696
568
|
}
|
|
1697
|
-
return
|
|
569
|
+
return t.prototype.schedule = function(e, n) {
|
|
1698
570
|
return this;
|
|
1699
|
-
},
|
|
1700
|
-
}(
|
|
1701
|
-
setInterval: function(r,
|
|
1702
|
-
for (var
|
|
1703
|
-
|
|
1704
|
-
var i =
|
|
1705
|
-
return i != null && i.setInterval ? i.setInterval.apply(i,
|
|
571
|
+
}, t;
|
|
572
|
+
}(A), H = {
|
|
573
|
+
setInterval: function(r, t) {
|
|
574
|
+
for (var e = [], n = 2; n < arguments.length; n++)
|
|
575
|
+
e[n - 2] = arguments[n];
|
|
576
|
+
var i = H.delegate;
|
|
577
|
+
return i != null && i.setInterval ? i.setInterval.apply(i, I([r, t], M(e))) : setInterval.apply(void 0, I([r, t], M(e)));
|
|
1706
578
|
},
|
|
1707
579
|
clearInterval: function(r) {
|
|
1708
|
-
|
|
580
|
+
var t = H.delegate;
|
|
581
|
+
return ((t == null ? void 0 : t.clearInterval) || clearInterval)(r);
|
|
1709
582
|
},
|
|
1710
583
|
delegate: void 0
|
|
1711
|
-
},
|
|
1712
|
-
|
|
1713
|
-
function e
|
|
1714
|
-
var i = r.call(this,
|
|
1715
|
-
return i.scheduler =
|
|
584
|
+
}, Ke = function(r) {
|
|
585
|
+
x(t, r);
|
|
586
|
+
function t(e, n) {
|
|
587
|
+
var i = r.call(this, e, n) || this;
|
|
588
|
+
return i.scheduler = e, i.work = n, i.pending = !1, i;
|
|
1716
589
|
}
|
|
1717
|
-
return
|
|
590
|
+
return t.prototype.schedule = function(e, n) {
|
|
1718
591
|
var i;
|
|
1719
592
|
if (n === void 0 && (n = 0), this.closed)
|
|
1720
593
|
return this;
|
|
1721
|
-
this.state =
|
|
1722
|
-
var
|
|
1723
|
-
return
|
|
1724
|
-
},
|
|
1725
|
-
return i === void 0 && (i = 0),
|
|
1726
|
-
},
|
|
594
|
+
this.state = e;
|
|
595
|
+
var o = this.id, s = this.scheduler;
|
|
596
|
+
return o != null && (this.id = this.recycleAsyncId(s, o, n)), this.pending = !0, this.delay = n, this.id = (i = this.id) !== null && i !== void 0 ? i : this.requestAsyncId(s, this.id, n), this;
|
|
597
|
+
}, t.prototype.requestAsyncId = function(e, n, i) {
|
|
598
|
+
return i === void 0 && (i = 0), H.setInterval(e.flush.bind(e, this), i);
|
|
599
|
+
}, t.prototype.recycleAsyncId = function(e, n, i) {
|
|
1727
600
|
if (i === void 0 && (i = 0), i != null && this.delay === i && this.pending === !1)
|
|
1728
601
|
return n;
|
|
1729
|
-
n != null &&
|
|
1730
|
-
},
|
|
602
|
+
n != null && H.clearInterval(n);
|
|
603
|
+
}, t.prototype.execute = function(e, n) {
|
|
1731
604
|
if (this.closed)
|
|
1732
605
|
return new Error("executing a cancelled action");
|
|
1733
606
|
this.pending = !1;
|
|
1734
|
-
var i = this._execute(
|
|
607
|
+
var i = this._execute(e, n);
|
|
1735
608
|
if (i)
|
|
1736
609
|
return i;
|
|
1737
610
|
this.pending === !1 && this.id != null && (this.id = this.recycleAsyncId(this.scheduler, this.id, null));
|
|
1738
|
-
},
|
|
1739
|
-
var i = !1,
|
|
611
|
+
}, t.prototype._execute = function(e, n) {
|
|
612
|
+
var i = !1, o;
|
|
1740
613
|
try {
|
|
1741
|
-
this.work(
|
|
1742
|
-
} catch (
|
|
1743
|
-
i = !0,
|
|
614
|
+
this.work(e);
|
|
615
|
+
} catch (s) {
|
|
616
|
+
i = !0, o = s || new Error("Scheduled action threw falsy error");
|
|
1744
617
|
}
|
|
1745
618
|
if (i)
|
|
1746
|
-
return this.unsubscribe(),
|
|
1747
|
-
},
|
|
619
|
+
return this.unsubscribe(), o;
|
|
620
|
+
}, t.prototype.unsubscribe = function() {
|
|
1748
621
|
if (!this.closed) {
|
|
1749
|
-
var
|
|
1750
|
-
this.work = this.state = this.scheduler = null, this.pending = !1,
|
|
622
|
+
var e = this, n = e.id, i = e.scheduler, o = i.actions;
|
|
623
|
+
this.work = this.state = this.scheduler = null, this.pending = !1, V(o, this), n != null && (this.id = this.recycleAsyncId(i, n, null)), this.delay = null, r.prototype.unsubscribe.call(this);
|
|
1751
624
|
}
|
|
1752
|
-
},
|
|
1753
|
-
}(
|
|
1754
|
-
function r(
|
|
1755
|
-
|
|
1756
|
-
}
|
|
1757
|
-
return r.prototype.schedule = function(
|
|
1758
|
-
return
|
|
1759
|
-
}, r.now =
|
|
1760
|
-
}(),
|
|
1761
|
-
|
|
1762
|
-
function e
|
|
1763
|
-
n === void 0 && (n =
|
|
1764
|
-
var i = r.call(this,
|
|
625
|
+
}, t;
|
|
626
|
+
}(Je), pe = function() {
|
|
627
|
+
function r(t, e) {
|
|
628
|
+
e === void 0 && (e = r.now), this.schedulerActionCtor = t, this.now = e;
|
|
629
|
+
}
|
|
630
|
+
return r.prototype.schedule = function(t, e, n) {
|
|
631
|
+
return e === void 0 && (e = 0), new this.schedulerActionCtor(this, t).schedule(n, e);
|
|
632
|
+
}, r.now = Pe.now, r;
|
|
633
|
+
}(), We = function(r) {
|
|
634
|
+
x(t, r);
|
|
635
|
+
function t(e, n) {
|
|
636
|
+
n === void 0 && (n = pe.now);
|
|
637
|
+
var i = r.call(this, e, n) || this;
|
|
1765
638
|
return i.actions = [], i._active = !1, i;
|
|
1766
639
|
}
|
|
1767
|
-
return
|
|
640
|
+
return t.prototype.flush = function(e) {
|
|
1768
641
|
var n = this.actions;
|
|
1769
642
|
if (this._active) {
|
|
1770
|
-
n.push(
|
|
643
|
+
n.push(e);
|
|
1771
644
|
return;
|
|
1772
645
|
}
|
|
1773
646
|
var i;
|
|
1774
647
|
this._active = !0;
|
|
1775
648
|
do
|
|
1776
|
-
if (i =
|
|
649
|
+
if (i = e.execute(e.state, e.delay))
|
|
1777
650
|
break;
|
|
1778
|
-
while (
|
|
651
|
+
while (e = n.shift());
|
|
1779
652
|
if (this._active = !1, i) {
|
|
1780
|
-
for (;
|
|
1781
|
-
|
|
653
|
+
for (; e = n.shift(); )
|
|
654
|
+
e.unsubscribe();
|
|
1782
655
|
throw i;
|
|
1783
656
|
}
|
|
1784
|
-
},
|
|
1785
|
-
}(
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
657
|
+
}, t;
|
|
658
|
+
}(pe), Xe = new We(Ke), Ze = Xe;
|
|
659
|
+
function et(r) {
|
|
660
|
+
return r && b(r.schedule);
|
|
661
|
+
}
|
|
662
|
+
var tt = re(function(r) {
|
|
663
|
+
return function() {
|
|
664
|
+
r(this), this.name = "EmptyError", this.message = "no elements in sequence";
|
|
665
|
+
};
|
|
666
|
+
});
|
|
667
|
+
function O(r, t) {
|
|
668
|
+
var e = typeof t == "object";
|
|
669
|
+
return new Promise(function(n, i) {
|
|
670
|
+
var o = new F({
|
|
671
|
+
next: function(s) {
|
|
672
|
+
n(s), o.unsubscribe();
|
|
673
|
+
},
|
|
674
|
+
error: i,
|
|
675
|
+
complete: function() {
|
|
676
|
+
e ? n(t.defaultValue) : i(new tt());
|
|
677
|
+
}
|
|
678
|
+
});
|
|
679
|
+
r.subscribe(o);
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
function rt(r) {
|
|
683
|
+
return r instanceof Date && !isNaN(r);
|
|
684
|
+
}
|
|
685
|
+
function R(r, t) {
|
|
686
|
+
return Me(function(e, n) {
|
|
687
|
+
var i = 0;
|
|
688
|
+
e.subscribe(Ie(n, function(o) {
|
|
689
|
+
n.next(r.call(t, o, i++));
|
|
690
|
+
}));
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
function nt(r, t, e) {
|
|
694
|
+
r === void 0 && (r = 0), e === void 0 && (e = Ze);
|
|
695
|
+
var n = -1;
|
|
696
|
+
return t != null && (et(t) ? e = t : n = t), new K(function(i) {
|
|
697
|
+
var o = rt(r) ? +r - e.now() : r;
|
|
698
|
+
o < 0 && (o = 0);
|
|
699
|
+
var s = 0;
|
|
700
|
+
return e.schedule(function() {
|
|
701
|
+
i.closed || (i.next(s++), 0 <= n ? this.schedule(void 0, n) : i.complete());
|
|
702
|
+
}, o);
|
|
703
|
+
});
|
|
704
|
+
}
|
|
705
|
+
function it(r, t, e) {
|
|
706
|
+
var n = b(r) || t || e ? { next: r, error: t, complete: e } : r;
|
|
707
|
+
return n ? Me(function(i, o) {
|
|
708
|
+
var s;
|
|
709
|
+
(s = n.subscribe) === null || s === void 0 || s.call(n);
|
|
710
|
+
var c = !0;
|
|
711
|
+
i.subscribe(Ie(o, function(u) {
|
|
712
|
+
var a;
|
|
713
|
+
(a = n.next) === null || a === void 0 || a.call(n, u), o.next(u);
|
|
714
|
+
}, function() {
|
|
715
|
+
var u;
|
|
716
|
+
c = !1, (u = n.complete) === null || u === void 0 || u.call(n), o.complete();
|
|
717
|
+
}, function(u) {
|
|
718
|
+
var a;
|
|
719
|
+
c = !1, (a = n.error) === null || a === void 0 || a.call(n, u), o.error(u);
|
|
720
|
+
}, function() {
|
|
721
|
+
var u, a;
|
|
722
|
+
c && ((u = n.unsubscribe) === null || u === void 0 || u.call(n)), (a = n.finalize) === null || a === void 0 || a.call(n);
|
|
723
|
+
}));
|
|
724
|
+
}) : _e;
|
|
725
|
+
}
|
|
726
|
+
var ot = Object.defineProperty, st = (r, t, e) => t in r ? ot(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, E = (r, t, e) => (st(r, typeof t != "symbol" ? t + "" : t, e), e);
|
|
727
|
+
class p extends Error {
|
|
728
|
+
constructor(t) {
|
|
729
|
+
super(`Incorrect context (${t}). Cannot perform the requested operation.`), E(this, "context"), this.context = t;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
class j extends Error {
|
|
733
|
+
constructor(t, e, n) {
|
|
734
|
+
super(`Invalid parameter (${t}). ${n}`), this.param = t, this.value = e, this.reason = n;
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
class ut extends Error {
|
|
738
|
+
constructor(t, e) {
|
|
739
|
+
super(
|
|
740
|
+
`'streamId' value of "${t}" is different from what we expected ("${e}")`
|
|
741
|
+
), this.streamId = t, this.expectedStreamId = e;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
class ct extends Error {
|
|
745
|
+
constructor(t) {
|
|
746
|
+
super(`Invalid version format: ${t}`);
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
class de extends Error {
|
|
750
|
+
constructor(t) {
|
|
751
|
+
super(`${t} needs to be initialized before it can be used.`);
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
class fe extends Error {
|
|
755
|
+
constructor(t, e) {
|
|
756
|
+
let n = `Unsupported Protocol ${Array.isArray(t) ? "versions" : "version"}: (${t}).`;
|
|
757
|
+
e && (n += ` Minimum version supported is ${e}.`), super(n), this.version = t;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
function m(r) {
|
|
761
|
+
return typeof r == "function";
|
|
762
|
+
}
|
|
763
|
+
function at(r) {
|
|
764
|
+
return m(r == null ? void 0 : r.lift);
|
|
765
|
+
}
|
|
766
|
+
function D(r) {
|
|
767
|
+
return function(t) {
|
|
768
|
+
if (at(t))
|
|
769
|
+
return t.lift(function(e) {
|
|
770
|
+
try {
|
|
771
|
+
return r(e, this);
|
|
772
|
+
} catch (n) {
|
|
773
|
+
this.error(n);
|
|
774
|
+
}
|
|
775
|
+
});
|
|
776
|
+
throw new TypeError("Unable to lift unknown Observable type");
|
|
777
|
+
};
|
|
778
|
+
}
|
|
779
|
+
var W = function(r, t) {
|
|
780
|
+
return W = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
|
|
781
|
+
e.__proto__ = n;
|
|
782
|
+
} || function(e, n) {
|
|
783
|
+
for (var i in n)
|
|
784
|
+
Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
|
|
785
|
+
}, W(r, t);
|
|
786
|
+
};
|
|
787
|
+
function ie(r, t) {
|
|
788
|
+
if (typeof t != "function" && t !== null)
|
|
789
|
+
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
790
|
+
W(r, t);
|
|
791
|
+
function e() {
|
|
792
|
+
this.constructor = r;
|
|
793
|
+
}
|
|
794
|
+
r.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
|
|
795
|
+
}
|
|
796
|
+
function ve(r) {
|
|
797
|
+
var t = typeof Symbol == "function" && Symbol.iterator, e = t && r[t], n = 0;
|
|
798
|
+
if (e)
|
|
799
|
+
return e.call(r);
|
|
800
|
+
if (r && typeof r.length == "number")
|
|
801
|
+
return {
|
|
802
|
+
next: function() {
|
|
803
|
+
return r && n >= r.length && (r = void 0), { value: r && r[n++], done: !r };
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
807
|
+
}
|
|
808
|
+
function X(r, t) {
|
|
809
|
+
var e = typeof Symbol == "function" && r[Symbol.iterator];
|
|
810
|
+
if (!e)
|
|
811
|
+
return r;
|
|
812
|
+
var n = e.call(r), i, o = [], s;
|
|
813
|
+
try {
|
|
814
|
+
for (; (t === void 0 || t-- > 0) && !(i = n.next()).done; )
|
|
815
|
+
o.push(i.value);
|
|
816
|
+
} catch (c) {
|
|
817
|
+
s = { error: c };
|
|
818
|
+
} finally {
|
|
819
|
+
try {
|
|
820
|
+
i && !i.done && (e = n.return) && e.call(n);
|
|
821
|
+
} finally {
|
|
822
|
+
if (s)
|
|
823
|
+
throw s.error;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
return o;
|
|
827
|
+
}
|
|
828
|
+
function Z(r, t, e) {
|
|
829
|
+
if (e || arguments.length === 2)
|
|
830
|
+
for (var n = 0, i = t.length, o; n < i; n++)
|
|
831
|
+
(o || !(n in t)) && (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
|
|
832
|
+
return r.concat(o || Array.prototype.slice.call(t));
|
|
833
|
+
}
|
|
834
|
+
function lt(r) {
|
|
835
|
+
var t = function(n) {
|
|
836
|
+
Error.call(n), n.stack = new Error().stack;
|
|
837
|
+
}, e = r(t);
|
|
838
|
+
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
|
839
|
+
}
|
|
840
|
+
var z = lt(function(r) {
|
|
841
|
+
return function(t) {
|
|
842
|
+
r(this), this.message = t ? t.length + ` errors occurred during unsubscription:
|
|
843
|
+
` + t.map(function(e, n) {
|
|
844
|
+
return n + 1 + ") " + e.toString();
|
|
845
|
+
}).join(`
|
|
846
|
+
`) : "", this.name = "UnsubscriptionError", this.errors = t;
|
|
847
|
+
};
|
|
848
|
+
});
|
|
849
|
+
function ge(r, t) {
|
|
850
|
+
if (r) {
|
|
851
|
+
var e = r.indexOf(t);
|
|
852
|
+
0 <= e && r.splice(e, 1);
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
var oe = function() {
|
|
856
|
+
function r(t) {
|
|
857
|
+
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
858
|
+
}
|
|
859
|
+
return r.prototype.unsubscribe = function() {
|
|
860
|
+
var t, e, n, i, o;
|
|
861
|
+
if (!this.closed) {
|
|
862
|
+
this.closed = !0;
|
|
863
|
+
var s = this._parentage;
|
|
864
|
+
if (s)
|
|
865
|
+
if (this._parentage = null, Array.isArray(s))
|
|
866
|
+
try {
|
|
867
|
+
for (var c = ve(s), u = c.next(); !u.done; u = c.next()) {
|
|
868
|
+
var a = u.value;
|
|
869
|
+
a.remove(this);
|
|
870
|
+
}
|
|
871
|
+
} catch (l) {
|
|
872
|
+
t = { error: l };
|
|
873
|
+
} finally {
|
|
874
|
+
try {
|
|
875
|
+
u && !u.done && (e = c.return) && e.call(c);
|
|
876
|
+
} finally {
|
|
877
|
+
if (t)
|
|
878
|
+
throw t.error;
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
else
|
|
882
|
+
s.remove(this);
|
|
883
|
+
var d = this.initialTeardown;
|
|
884
|
+
if (m(d))
|
|
885
|
+
try {
|
|
886
|
+
d();
|
|
887
|
+
} catch (l) {
|
|
888
|
+
o = l instanceof z ? l.errors : [l];
|
|
889
|
+
}
|
|
890
|
+
var f = this._finalizers;
|
|
891
|
+
if (f) {
|
|
892
|
+
this._finalizers = null;
|
|
893
|
+
try {
|
|
894
|
+
for (var w = ve(f), y = w.next(); !y.done; y = w.next()) {
|
|
895
|
+
var k = y.value;
|
|
896
|
+
try {
|
|
897
|
+
be(k);
|
|
898
|
+
} catch (l) {
|
|
899
|
+
o = o ?? [], l instanceof z ? o = Z(Z([], X(o)), X(l.errors)) : o.push(l);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
} catch (l) {
|
|
903
|
+
n = { error: l };
|
|
904
|
+
} finally {
|
|
905
|
+
try {
|
|
906
|
+
y && !y.done && (i = w.return) && i.call(w);
|
|
907
|
+
} finally {
|
|
908
|
+
if (n)
|
|
909
|
+
throw n.error;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
if (o)
|
|
914
|
+
throw new z(o);
|
|
915
|
+
}
|
|
916
|
+
}, r.prototype.add = function(t) {
|
|
917
|
+
var e;
|
|
918
|
+
if (t && t !== this)
|
|
919
|
+
if (this.closed)
|
|
920
|
+
be(t);
|
|
921
|
+
else {
|
|
922
|
+
if (t instanceof r) {
|
|
923
|
+
if (t.closed || t._hasParent(this))
|
|
924
|
+
return;
|
|
925
|
+
t._addParent(this);
|
|
926
|
+
}
|
|
927
|
+
(this._finalizers = (e = this._finalizers) !== null && e !== void 0 ? e : []).push(t);
|
|
928
|
+
}
|
|
929
|
+
}, r.prototype._hasParent = function(t) {
|
|
930
|
+
var e = this._parentage;
|
|
931
|
+
return e === t || Array.isArray(e) && e.includes(t);
|
|
932
|
+
}, r.prototype._addParent = function(t) {
|
|
933
|
+
var e = this._parentage;
|
|
934
|
+
this._parentage = Array.isArray(e) ? (e.push(t), e) : e ? [e, t] : t;
|
|
935
|
+
}, r.prototype._removeParent = function(t) {
|
|
936
|
+
var e = this._parentage;
|
|
937
|
+
e === t ? this._parentage = null : Array.isArray(e) && ge(e, t);
|
|
938
|
+
}, r.prototype.remove = function(t) {
|
|
939
|
+
var e = this._finalizers;
|
|
940
|
+
e && ge(e, t), t instanceof r && t._removeParent(this);
|
|
941
|
+
}, r.EMPTY = function() {
|
|
942
|
+
var t = new r();
|
|
943
|
+
return t.closed = !0, t;
|
|
944
|
+
}(), r;
|
|
945
|
+
}();
|
|
946
|
+
oe.EMPTY;
|
|
947
|
+
function Ae(r) {
|
|
948
|
+
return r instanceof oe || r && "closed" in r && m(r.remove) && m(r.add) && m(r.unsubscribe);
|
|
949
|
+
}
|
|
950
|
+
function be(r) {
|
|
951
|
+
m(r) ? r() : r.unsubscribe();
|
|
952
|
+
}
|
|
953
|
+
var Te = {
|
|
954
|
+
onUnhandledError: null,
|
|
955
|
+
onStoppedNotification: null,
|
|
956
|
+
Promise: void 0,
|
|
957
|
+
useDeprecatedSynchronousErrorHandling: !1,
|
|
958
|
+
useDeprecatedNextContext: !1
|
|
959
|
+
}, ht = {
|
|
960
|
+
setTimeout: function(r, t) {
|
|
961
|
+
for (var e = [], n = 2; n < arguments.length; n++)
|
|
962
|
+
e[n - 2] = arguments[n];
|
|
963
|
+
return setTimeout.apply(void 0, Z([r, t], X(e)));
|
|
964
|
+
},
|
|
965
|
+
clearTimeout: function(r) {
|
|
966
|
+
return clearTimeout(r);
|
|
967
|
+
},
|
|
968
|
+
delegate: void 0
|
|
969
|
+
};
|
|
970
|
+
function pt(r) {
|
|
971
|
+
ht.setTimeout(function() {
|
|
972
|
+
throw r;
|
|
973
|
+
});
|
|
974
|
+
}
|
|
975
|
+
function ye() {
|
|
976
|
+
}
|
|
977
|
+
function dt(r) {
|
|
978
|
+
r();
|
|
979
|
+
}
|
|
980
|
+
var se = function(r) {
|
|
981
|
+
ie(t, r);
|
|
982
|
+
function t(e) {
|
|
983
|
+
var n = r.call(this) || this;
|
|
984
|
+
return n.isStopped = !1, e ? (n.destination = e, Ae(e) && e.add(n)) : n.destination = bt, n;
|
|
985
|
+
}
|
|
986
|
+
return t.create = function(e, n, i) {
|
|
987
|
+
return new ee(e, n, i);
|
|
988
|
+
}, t.prototype.next = function(e) {
|
|
989
|
+
this.isStopped || this._next(e);
|
|
990
|
+
}, t.prototype.error = function(e) {
|
|
991
|
+
this.isStopped || (this.isStopped = !0, this._error(e));
|
|
992
|
+
}, t.prototype.complete = function() {
|
|
993
|
+
this.isStopped || (this.isStopped = !0, this._complete());
|
|
994
|
+
}, t.prototype.unsubscribe = function() {
|
|
995
|
+
this.closed || (this.isStopped = !0, r.prototype.unsubscribe.call(this), this.destination = null);
|
|
996
|
+
}, t.prototype._next = function(e) {
|
|
997
|
+
this.destination.next(e);
|
|
998
|
+
}, t.prototype._error = function(e) {
|
|
999
|
+
try {
|
|
1000
|
+
this.destination.error(e);
|
|
1001
|
+
} finally {
|
|
1002
|
+
this.unsubscribe();
|
|
1003
|
+
}
|
|
1004
|
+
}, t.prototype._complete = function() {
|
|
1005
|
+
try {
|
|
1006
|
+
this.destination.complete();
|
|
1007
|
+
} finally {
|
|
1008
|
+
this.unsubscribe();
|
|
1009
|
+
}
|
|
1010
|
+
}, t;
|
|
1011
|
+
}(oe), ft = Function.prototype.bind;
|
|
1012
|
+
function Q(r, t) {
|
|
1013
|
+
return ft.call(r, t);
|
|
1014
|
+
}
|
|
1015
|
+
var vt = function() {
|
|
1016
|
+
function r(t) {
|
|
1017
|
+
this.partialObserver = t;
|
|
1018
|
+
}
|
|
1019
|
+
return r.prototype.next = function(t) {
|
|
1020
|
+
var e = this.partialObserver;
|
|
1021
|
+
if (e.next)
|
|
1022
|
+
try {
|
|
1023
|
+
e.next(t);
|
|
1024
|
+
} catch (n) {
|
|
1025
|
+
U(n);
|
|
1026
|
+
}
|
|
1027
|
+
}, r.prototype.error = function(t) {
|
|
1028
|
+
var e = this.partialObserver;
|
|
1029
|
+
if (e.error)
|
|
1030
|
+
try {
|
|
1031
|
+
e.error(t);
|
|
1032
|
+
} catch (n) {
|
|
1033
|
+
U(n);
|
|
1034
|
+
}
|
|
1035
|
+
else
|
|
1036
|
+
U(t);
|
|
1037
|
+
}, r.prototype.complete = function() {
|
|
1038
|
+
var t = this.partialObserver;
|
|
1039
|
+
if (t.complete)
|
|
1040
|
+
try {
|
|
1041
|
+
t.complete();
|
|
1042
|
+
} catch (e) {
|
|
1043
|
+
U(e);
|
|
1044
|
+
}
|
|
1045
|
+
}, r;
|
|
1046
|
+
}(), ee = function(r) {
|
|
1047
|
+
ie(t, r);
|
|
1048
|
+
function t(e, n, i) {
|
|
1049
|
+
var o = r.call(this) || this, s;
|
|
1050
|
+
if (m(e) || !e)
|
|
1051
|
+
s = {
|
|
1052
|
+
next: e ?? void 0,
|
|
1053
|
+
error: n ?? void 0,
|
|
1054
|
+
complete: i ?? void 0
|
|
1055
|
+
};
|
|
1056
|
+
else {
|
|
1057
|
+
var c;
|
|
1058
|
+
o && Te.useDeprecatedNextContext ? (c = Object.create(e), c.unsubscribe = function() {
|
|
1059
|
+
return o.unsubscribe();
|
|
1060
|
+
}, s = {
|
|
1061
|
+
next: e.next && Q(e.next, c),
|
|
1062
|
+
error: e.error && Q(e.error, c),
|
|
1063
|
+
complete: e.complete && Q(e.complete, c)
|
|
1064
|
+
}) : s = e;
|
|
1065
|
+
}
|
|
1066
|
+
return o.destination = new vt(s), o;
|
|
1067
|
+
}
|
|
1068
|
+
return t;
|
|
1069
|
+
}(se);
|
|
1070
|
+
function U(r) {
|
|
1071
|
+
pt(r);
|
|
1072
|
+
}
|
|
1073
|
+
function gt(r) {
|
|
1074
|
+
throw r;
|
|
1075
|
+
}
|
|
1076
|
+
var bt = {
|
|
1077
|
+
closed: !0,
|
|
1078
|
+
next: ye,
|
|
1079
|
+
error: gt,
|
|
1080
|
+
complete: ye
|
|
1081
|
+
}, yt = function() {
|
|
1082
|
+
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
1083
|
+
}();
|
|
1084
|
+
function Re(r) {
|
|
1085
|
+
return r;
|
|
1086
|
+
}
|
|
1087
|
+
function mt(r) {
|
|
1088
|
+
return r.length === 0 ? Re : r.length === 1 ? r[0] : function(t) {
|
|
1089
|
+
return r.reduce(function(e, n) {
|
|
1090
|
+
return n(e);
|
|
1091
|
+
}, t);
|
|
1092
|
+
};
|
|
1093
|
+
}
|
|
1094
|
+
var wt = function() {
|
|
1095
|
+
function r(t) {
|
|
1096
|
+
t && (this._subscribe = t);
|
|
1097
|
+
}
|
|
1098
|
+
return r.prototype.lift = function(t) {
|
|
1099
|
+
var e = new r();
|
|
1100
|
+
return e.source = this, e.operator = t, e;
|
|
1101
|
+
}, r.prototype.subscribe = function(t, e, n) {
|
|
1102
|
+
var i = this, o = Ct(t) ? t : new ee(t, e, n);
|
|
1103
|
+
return dt(function() {
|
|
1104
|
+
var s = i, c = s.operator, u = s.source;
|
|
1105
|
+
o.add(c ? c.call(o, u) : u ? i._subscribe(o) : i._trySubscribe(o));
|
|
1106
|
+
}), o;
|
|
1107
|
+
}, r.prototype._trySubscribe = function(t) {
|
|
1108
|
+
try {
|
|
1109
|
+
return this._subscribe(t);
|
|
1110
|
+
} catch (e) {
|
|
1111
|
+
t.error(e);
|
|
1112
|
+
}
|
|
1113
|
+
}, r.prototype.forEach = function(t, e) {
|
|
1114
|
+
var n = this;
|
|
1115
|
+
return e = me(e), new e(function(i, o) {
|
|
1116
|
+
var s = new ee({
|
|
1117
|
+
next: function(c) {
|
|
1118
|
+
try {
|
|
1119
|
+
t(c);
|
|
1120
|
+
} catch (u) {
|
|
1121
|
+
o(u), s.unsubscribe();
|
|
1122
|
+
}
|
|
1123
|
+
},
|
|
1124
|
+
error: o,
|
|
1125
|
+
complete: i
|
|
1126
|
+
});
|
|
1127
|
+
n.subscribe(s);
|
|
1128
|
+
});
|
|
1129
|
+
}, r.prototype._subscribe = function(t) {
|
|
1130
|
+
var e;
|
|
1131
|
+
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
|
|
1132
|
+
}, r.prototype[yt] = function() {
|
|
1133
|
+
return this;
|
|
1134
|
+
}, r.prototype.pipe = function() {
|
|
1135
|
+
for (var t = [], e = 0; e < arguments.length; e++)
|
|
1136
|
+
t[e] = arguments[e];
|
|
1137
|
+
return mt(t)(this);
|
|
1138
|
+
}, r.prototype.toPromise = function(t) {
|
|
1139
|
+
var e = this;
|
|
1140
|
+
return t = me(t), new t(function(n, i) {
|
|
1141
|
+
var o;
|
|
1142
|
+
e.subscribe(function(s) {
|
|
1143
|
+
return o = s;
|
|
1144
|
+
}, function(s) {
|
|
1145
|
+
return i(s);
|
|
1146
|
+
}, function() {
|
|
1147
|
+
return n(o);
|
|
1148
|
+
});
|
|
1149
|
+
});
|
|
1150
|
+
}, r.create = function(t) {
|
|
1151
|
+
return new r(t);
|
|
1152
|
+
}, r;
|
|
1153
|
+
}();
|
|
1154
|
+
function me(r) {
|
|
1155
|
+
var t;
|
|
1156
|
+
return (t = r ?? Te.Promise) !== null && t !== void 0 ? t : Promise;
|
|
1790
1157
|
}
|
|
1791
|
-
function
|
|
1792
|
-
return r
|
|
1158
|
+
function St(r) {
|
|
1159
|
+
return r && m(r.next) && m(r.error) && m(r.complete);
|
|
1793
1160
|
}
|
|
1794
|
-
function
|
|
1795
|
-
return
|
|
1796
|
-
var i = 0;
|
|
1797
|
-
t.subscribe(Ue(n, function(s) {
|
|
1798
|
-
n.next(r.call(e, s, i++));
|
|
1799
|
-
}));
|
|
1800
|
-
});
|
|
1161
|
+
function Ct(r) {
|
|
1162
|
+
return r && r instanceof se || St(r) && Ae(r);
|
|
1801
1163
|
}
|
|
1802
|
-
function
|
|
1803
|
-
|
|
1804
|
-
var n = -1;
|
|
1805
|
-
return e != null && (Ks(e) ? t = e : n = e), new Te(function(i) {
|
|
1806
|
-
var s = Zs(r) ? +r - t.now() : r;
|
|
1807
|
-
s < 0 && (s = 0);
|
|
1808
|
-
var a = 0;
|
|
1809
|
-
return t.schedule(function() {
|
|
1810
|
-
i.closed || (i.next(a++), 0 <= n ? this.schedule(void 0, n) : i.complete());
|
|
1811
|
-
}, s);
|
|
1812
|
-
});
|
|
1164
|
+
function L(r, t, e, n, i) {
|
|
1165
|
+
return new Et(r, t, e, n, i);
|
|
1813
1166
|
}
|
|
1814
|
-
function
|
|
1815
|
-
|
|
1167
|
+
var Et = function(r) {
|
|
1168
|
+
ie(t, r);
|
|
1169
|
+
function t(e, n, i, o, s, c) {
|
|
1170
|
+
var u = r.call(this, e) || this;
|
|
1171
|
+
return u.onFinalize = s, u.shouldUnsubscribe = c, u._next = n ? function(a) {
|
|
1172
|
+
try {
|
|
1173
|
+
n(a);
|
|
1174
|
+
} catch (d) {
|
|
1175
|
+
e.error(d);
|
|
1176
|
+
}
|
|
1177
|
+
} : r.prototype._next, u._error = o ? function(a) {
|
|
1178
|
+
try {
|
|
1179
|
+
o(a);
|
|
1180
|
+
} catch (d) {
|
|
1181
|
+
e.error(d);
|
|
1182
|
+
} finally {
|
|
1183
|
+
this.unsubscribe();
|
|
1184
|
+
}
|
|
1185
|
+
} : r.prototype._error, u._complete = i ? function() {
|
|
1186
|
+
try {
|
|
1187
|
+
i();
|
|
1188
|
+
} catch (a) {
|
|
1189
|
+
e.error(a);
|
|
1190
|
+
} finally {
|
|
1191
|
+
this.unsubscribe();
|
|
1192
|
+
}
|
|
1193
|
+
} : r.prototype._complete, u;
|
|
1194
|
+
}
|
|
1195
|
+
return t.prototype.unsubscribe = function() {
|
|
1196
|
+
var e;
|
|
1197
|
+
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
|
1198
|
+
var n = this.closed;
|
|
1199
|
+
r.prototype.unsubscribe.call(this), !n && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
|
|
1200
|
+
}
|
|
1201
|
+
}, t;
|
|
1202
|
+
}(se);
|
|
1203
|
+
function h(r, t) {
|
|
1204
|
+
return D(function(e, n) {
|
|
1816
1205
|
var i = 0;
|
|
1817
|
-
|
|
1818
|
-
|
|
1206
|
+
e.subscribe(L(n, function(o) {
|
|
1207
|
+
n.next(r.call(t, o, i++));
|
|
1819
1208
|
}));
|
|
1820
1209
|
});
|
|
1821
1210
|
}
|
|
1822
|
-
|
|
1211
|
+
var xt = new wt(function(r) {
|
|
1212
|
+
return r.complete();
|
|
1213
|
+
});
|
|
1214
|
+
function S(r) {
|
|
1823
1215
|
return r <= 0 ? function() {
|
|
1824
|
-
return
|
|
1825
|
-
} :
|
|
1216
|
+
return xt;
|
|
1217
|
+
} : D(function(t, e) {
|
|
1826
1218
|
var n = 0;
|
|
1827
|
-
|
|
1828
|
-
++n <= r && (
|
|
1219
|
+
t.subscribe(L(e, function(i) {
|
|
1220
|
+
++n <= r && (e.next(i), r <= n && e.complete());
|
|
1221
|
+
}));
|
|
1222
|
+
});
|
|
1223
|
+
}
|
|
1224
|
+
function g(r, t) {
|
|
1225
|
+
return D(function(e, n) {
|
|
1226
|
+
var i = 0;
|
|
1227
|
+
e.subscribe(L(n, function(o) {
|
|
1228
|
+
return r.call(t, o, i++) && n.next(o);
|
|
1829
1229
|
}));
|
|
1830
1230
|
});
|
|
1831
1231
|
}
|
|
1832
|
-
function
|
|
1833
|
-
var n =
|
|
1834
|
-
return n ?
|
|
1835
|
-
var
|
|
1836
|
-
(
|
|
1232
|
+
function v(r, t, e) {
|
|
1233
|
+
var n = m(r) || t || e ? { next: r, error: t, complete: e } : r;
|
|
1234
|
+
return n ? D(function(i, o) {
|
|
1235
|
+
var s;
|
|
1236
|
+
(s = n.subscribe) === null || s === void 0 || s.call(n);
|
|
1837
1237
|
var c = !0;
|
|
1838
|
-
i.subscribe(
|
|
1839
|
-
var
|
|
1840
|
-
(
|
|
1238
|
+
i.subscribe(L(o, function(u) {
|
|
1239
|
+
var a;
|
|
1240
|
+
(a = n.next) === null || a === void 0 || a.call(n, u), o.next(u);
|
|
1841
1241
|
}, function() {
|
|
1842
|
-
var
|
|
1843
|
-
c = !1, (
|
|
1844
|
-
}, function(
|
|
1845
|
-
var
|
|
1846
|
-
c = !1, (
|
|
1242
|
+
var u;
|
|
1243
|
+
c = !1, (u = n.complete) === null || u === void 0 || u.call(n), o.complete();
|
|
1244
|
+
}, function(u) {
|
|
1245
|
+
var a;
|
|
1246
|
+
c = !1, (a = n.error) === null || a === void 0 || a.call(n, u), o.error(u);
|
|
1847
1247
|
}, function() {
|
|
1848
|
-
var
|
|
1849
|
-
c && ((
|
|
1248
|
+
var u, a;
|
|
1249
|
+
c && ((u = n.unsubscribe) === null || u === void 0 || u.call(n)), (a = n.finalize) === null || a === void 0 || a.call(n);
|
|
1850
1250
|
}));
|
|
1851
|
-
}) :
|
|
1251
|
+
}) : Re;
|
|
1852
1252
|
}
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
}
|
|
1860
|
-
static gt(e, t) {
|
|
1861
|
-
return t === void 0 ? (n) => Z.gt(n, e) ? n : !1 : C.gt(C.coerce(e), C.coerce(t));
|
|
1862
|
-
}
|
|
1863
|
-
static lt(e, t) {
|
|
1864
|
-
return t === void 0 ? (n) => Z.lt(n, e) ? n : !1 : C.lt(C.coerce(e), C.coerce(t));
|
|
1865
|
-
}
|
|
1866
|
-
/**
|
|
1867
|
-
* Check if the two {@link IpcProtocolVersion} values are logically (==) equal.
|
|
1868
|
-
*
|
|
1869
|
-
* @param v1 - First version to compare
|
|
1870
|
-
* @param v2 - Second version to compare
|
|
1871
|
-
* @returns Return true if the versions are logically (==) equal.
|
|
1872
|
-
*/
|
|
1873
|
-
static eq(e, t) {
|
|
1874
|
-
return C.eq(C.coerce(e), C.coerce(t));
|
|
1875
|
-
}
|
|
1876
|
-
/**
|
|
1877
|
-
* Check if the two {@link IpcProtocolVersion} values are not equal.
|
|
1878
|
-
*
|
|
1879
|
-
* @param v1 - First version to compare
|
|
1880
|
-
* @param v2 - Second version to compare
|
|
1881
|
-
* @returns Return true if the versions are not equal.
|
|
1882
|
-
*/
|
|
1883
|
-
static neq(e, t) {
|
|
1884
|
-
return C.neq(C.coerce(e), C.coerce(t));
|
|
1885
|
-
}
|
|
1886
|
-
/**
|
|
1887
|
-
* Compare two {@link IpcProtocolVersion} values.
|
|
1888
|
-
*
|
|
1889
|
-
* @param v1 - First version to compare
|
|
1890
|
-
* @param v2 - Second version to compare
|
|
1891
|
-
* @returns Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if v2 is greater. Sorts in
|
|
1892
|
-
* ascending order if passed to Array.sort().
|
|
1893
|
-
*/
|
|
1894
|
-
static compare(e, t) {
|
|
1895
|
-
return C.compare(C.coerce(e), C.coerce(t));
|
|
1253
|
+
const _t = /^(\d+)\.(\d+)$/;
|
|
1254
|
+
function Mt(r) {
|
|
1255
|
+
if (typeof r == "string") {
|
|
1256
|
+
const t = r.match(_t);
|
|
1257
|
+
if (t)
|
|
1258
|
+
return `${t[1]}.${t[2]}`;
|
|
1896
1259
|
}
|
|
1260
|
+
throw new ct(r);
|
|
1261
|
+
}
|
|
1262
|
+
function we(r) {
|
|
1263
|
+
const t = Mt(r), [e, n] = t.split("."), [i, o] = [parseInt(e), parseInt(n)];
|
|
1264
|
+
return [i, o];
|
|
1265
|
+
}
|
|
1266
|
+
function Ue(r, t) {
|
|
1267
|
+
const [e, n] = we(r), [i, o] = we(t);
|
|
1268
|
+
return e < i ? -1 : e > i ? 1 : n < o ? -1 : n > o ? 1 : 0;
|
|
1897
1269
|
}
|
|
1898
|
-
|
|
1899
|
-
|
|
1270
|
+
function It(r, t) {
|
|
1271
|
+
return Ue(r, t) === 1;
|
|
1272
|
+
}
|
|
1273
|
+
function Ot(r, t) {
|
|
1274
|
+
return Ue(r, t) >= 0;
|
|
1275
|
+
}
|
|
1276
|
+
const Se = "2.0";
|
|
1277
|
+
class Pt {
|
|
1900
1278
|
/**
|
|
1901
1279
|
* Create a new instance of the {@link IpcHelper | IPC Protocol Helper}.
|
|
1902
1280
|
*
|
|
@@ -1906,9 +1284,9 @@ class to {
|
|
|
1906
1284
|
* @param supportedVersions - An array of supported protocol versions to choose from
|
|
1907
1285
|
* @param logService - An instance of a logging service or utility
|
|
1908
1286
|
*/
|
|
1909
|
-
constructor(
|
|
1910
|
-
if (
|
|
1911
|
-
throw new
|
|
1287
|
+
constructor(t, e) {
|
|
1288
|
+
if (E(this, "negotiatedProtocolVersion"), E(this, "currentContext"), E(this, "incomingMessages$"), E(this, "inIframe", !1), E(this, "embeddedResult"), E(this, "iframePort1"), E(this, "iframePort2"), this.supportedVersions = t, this.logService = e, this.incomingMessages$ = new Oe(), this.supportedVersions = t.filter((n) => Ot(n, Se)), !this.supportedVersions.length)
|
|
1289
|
+
throw new fe(t, Se);
|
|
1912
1290
|
this.negotiatedProtocolVersion = this.supportedVersions[0], this.embeddedResult = null, this.iframePort2 = null;
|
|
1913
1291
|
}
|
|
1914
1292
|
get parent() {
|
|
@@ -1923,18 +1301,18 @@ class to {
|
|
|
1923
1301
|
// only used by remote party, not used locally
|
|
1924
1302
|
// @ts-expect-error
|
|
1925
1303
|
get port1() {
|
|
1926
|
-
var
|
|
1927
|
-
return this.inIframe ? this.iframePort1 : (
|
|
1304
|
+
var t, e;
|
|
1305
|
+
return this.inIframe ? this.iframePort1 : (e = (t = window.Acrobits) == null ? void 0 : t.messageChannel) == null ? void 0 : e.port1;
|
|
1928
1306
|
}
|
|
1929
1307
|
get port2() {
|
|
1930
|
-
var
|
|
1308
|
+
var t, e, n, i;
|
|
1931
1309
|
if (this.inIframe) {
|
|
1932
1310
|
if (!this.iframePort2)
|
|
1933
|
-
throw new
|
|
1311
|
+
throw new de("port2");
|
|
1934
1312
|
return this.iframePort2;
|
|
1935
1313
|
} else {
|
|
1936
|
-
if (!((
|
|
1937
|
-
throw new
|
|
1314
|
+
if (!((e = (t = window.Acrobits) == null ? void 0 : t.messageChannel) != null && e.port2))
|
|
1315
|
+
throw new de("port2");
|
|
1938
1316
|
return (i = (n = window.Acrobits) == null ? void 0 : n.messageChannel) == null ? void 0 : i.port2;
|
|
1939
1317
|
}
|
|
1940
1318
|
}
|
|
@@ -1944,9 +1322,9 @@ class to {
|
|
|
1944
1322
|
* @returns Observable with the {@link AppContext} the app is running under. Emits once.
|
|
1945
1323
|
*/
|
|
1946
1324
|
determineContext() {
|
|
1947
|
-
return
|
|
1948
|
-
|
|
1949
|
-
|
|
1325
|
+
return nt(1e3).pipe(
|
|
1326
|
+
h(() => (this.isEmbedded() ? this.currentContext = "user" : this.currentContext = "guest", this.currentContext)),
|
|
1327
|
+
S(1)
|
|
1950
1328
|
);
|
|
1951
1329
|
}
|
|
1952
1330
|
/**
|
|
@@ -1957,26 +1335,26 @@ class to {
|
|
|
1957
1335
|
*/
|
|
1958
1336
|
openBridge() {
|
|
1959
1337
|
if (!this.isEmbedded())
|
|
1960
|
-
throw new
|
|
1961
|
-
const
|
|
1962
|
-
|
|
1338
|
+
throw new p(this.currentContext);
|
|
1339
|
+
const t = "HELLO", e = this.createMessage(t);
|
|
1340
|
+
e.protocolVersions = this.supportedVersions, this.logCreated(t, e);
|
|
1963
1341
|
const n = this.incomingMessages$.pipe(
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
if (this.supportedVersions.some(
|
|
1969
|
-
throw new
|
|
1342
|
+
g((i) => i.type === t && i.replyTo === e.id),
|
|
1343
|
+
h((i) => i),
|
|
1344
|
+
v(this.logReceived(t)),
|
|
1345
|
+
h((i) => {
|
|
1346
|
+
if (this.supportedVersions.some((o) => It(o, i.protocolVersion)))
|
|
1347
|
+
throw new fe(i.protocolVersion, this.supportedVersions[0]);
|
|
1970
1348
|
return i;
|
|
1971
1349
|
}),
|
|
1972
|
-
|
|
1350
|
+
v((i) => {
|
|
1973
1351
|
this.negotiatedProtocolVersion = i.protocolVersion, this.logService.info(
|
|
1974
1352
|
`[IPC] Negotiated IPC Protocol Version: ${this.negotiatedProtocolVersion}`
|
|
1975
1353
|
);
|
|
1976
1354
|
}),
|
|
1977
|
-
|
|
1355
|
+
S(1)
|
|
1978
1356
|
);
|
|
1979
|
-
return this.logService.debug(`Created ${
|
|
1357
|
+
return this.logService.debug(`Created ${t} Reply handler`), this.inIframe ? this.createIframeChannel().then(() => this.finishIpcSetup(e)) : this.finishIpcSetup(e), n;
|
|
1980
1358
|
}
|
|
1981
1359
|
/**
|
|
1982
1360
|
* Request an SSO Token from the Host app to authenticate the current user and make further API
|
|
@@ -1987,16 +1365,16 @@ class to {
|
|
|
1987
1365
|
*/
|
|
1988
1366
|
requestSSOToken() {
|
|
1989
1367
|
if (!this.isEmbedded())
|
|
1990
|
-
throw new
|
|
1991
|
-
const
|
|
1992
|
-
this.logCreated(
|
|
1368
|
+
throw new p(this.currentContext);
|
|
1369
|
+
const t = "TOKEN", e = this.createMessage(t);
|
|
1370
|
+
this.logCreated(t, e);
|
|
1993
1371
|
const n = this.incomingMessages$.pipe(
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1372
|
+
g((i) => i.type === t && i.replyTo === e.id),
|
|
1373
|
+
h((i) => i),
|
|
1374
|
+
v(this.logReceived(t)),
|
|
1375
|
+
S(1)
|
|
1998
1376
|
);
|
|
1999
|
-
return this.logService.debug(`Created ${
|
|
1377
|
+
return this.logService.debug(`Created ${t} Reply handler`), this.port2.postMessage(e), this.logSent(t, e), n;
|
|
2000
1378
|
}
|
|
2001
1379
|
/**
|
|
2002
1380
|
* Sends the {@link JoiningRoomMessage} lifecycle message to the Host application based on the
|
|
@@ -2011,20 +1389,20 @@ class to {
|
|
|
2011
1389
|
*
|
|
2012
1390
|
* @returns This method returns void.
|
|
2013
1391
|
*/
|
|
2014
|
-
sendJoiningRoomMessage(
|
|
1392
|
+
sendJoiningRoomMessage(t) {
|
|
2015
1393
|
if (!this.isEmbedded())
|
|
2016
|
-
throw new
|
|
1394
|
+
throw new p(this.currentContext);
|
|
2017
1395
|
const {
|
|
2018
|
-
roomName:
|
|
1396
|
+
roomName: e,
|
|
2019
1397
|
roomInvite: n,
|
|
2020
1398
|
displayName: i,
|
|
2021
|
-
jwtToken:
|
|
2022
|
-
serverUrl:
|
|
1399
|
+
jwtToken: o,
|
|
1400
|
+
serverUrl: s,
|
|
2023
1401
|
region: c,
|
|
2024
|
-
joinMicMuted:
|
|
2025
|
-
joinWithoutCamera:
|
|
2026
|
-
} =
|
|
2027
|
-
|
|
1402
|
+
joinMicMuted: u,
|
|
1403
|
+
joinWithoutCamera: a
|
|
1404
|
+
} = t, d = "JOINING ROOM", f = this.createMessage(d, !1);
|
|
1405
|
+
f.roomName = e, f.jwtToken = o, f.serverUrl = s, f.region = c, f.roomInvite = n, f.joinMicMuted = u ?? !1, f.joinWithoutCamera = a ?? !1, f.displayName = i, this.logCreated(d, f), this.port2.postMessage(f), this.logSent(d, f);
|
|
2028
1406
|
}
|
|
2029
1407
|
/**
|
|
2030
1408
|
* Sends a {@link LeavingRoomMessage} lifecycle message to the Host app.
|
|
@@ -2037,11 +1415,11 @@ class to {
|
|
|
2037
1415
|
*
|
|
2038
1416
|
* @returns This method returns void.
|
|
2039
1417
|
*/
|
|
2040
|
-
sendLeavingRoomMessage(
|
|
1418
|
+
sendLeavingRoomMessage(t) {
|
|
2041
1419
|
if (!this.isEmbedded())
|
|
2042
|
-
throw new
|
|
2043
|
-
const
|
|
2044
|
-
n.roomName =
|
|
1420
|
+
throw new p(this.currentContext);
|
|
1421
|
+
const e = "LEAVING ROOM", n = this.createMessage(e, !1);
|
|
1422
|
+
n.roomName = t, this.logCreated(e, n), this.port2.postMessage(n), this.logSent(e, n);
|
|
2045
1423
|
}
|
|
2046
1424
|
/**
|
|
2047
1425
|
* Setup listener for {@link JoinRoomMessage}, which can be sent by a host app to ask the client
|
|
@@ -2056,7 +1434,7 @@ class to {
|
|
|
2056
1434
|
* Here is an example of how a listener can be setup:
|
|
2057
1435
|
*
|
|
2058
1436
|
* ```ts
|
|
2059
|
-
* const ipcHelper = new IpcHelper(['
|
|
1437
|
+
* const ipcHelper = new IpcHelper(['2.0'], console);
|
|
2060
1438
|
*
|
|
2061
1439
|
* const joinRoomSubscription = ipcHelper.onJoinRoomMessage().subscribe((msg) => {
|
|
2062
1440
|
* // your logic for handling the message goes here
|
|
@@ -2071,13 +1449,13 @@ class to {
|
|
|
2071
1449
|
*/
|
|
2072
1450
|
onJoinRoomMessage() {
|
|
2073
1451
|
if (!this.isEmbedded())
|
|
2074
|
-
throw new
|
|
2075
|
-
const
|
|
1452
|
+
throw new p(this.currentContext);
|
|
1453
|
+
const t = "JOIN ROOM";
|
|
2076
1454
|
return this.incomingMessages$.pipe(
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
1455
|
+
g((e) => e.type === t && e.target === "client"),
|
|
1456
|
+
h((e) => e),
|
|
1457
|
+
v(this.logReceived(t)),
|
|
1458
|
+
h((e) => e)
|
|
2081
1459
|
);
|
|
2082
1460
|
}
|
|
2083
1461
|
/**
|
|
@@ -2092,7 +1470,7 @@ class to {
|
|
|
2092
1470
|
* Here is an example of how a listener can be setup:
|
|
2093
1471
|
*
|
|
2094
1472
|
* ```ts
|
|
2095
|
-
* const ipcHelper = new IpcHelper(['
|
|
1473
|
+
* const ipcHelper = new IpcHelper(['2.0'], console);
|
|
2096
1474
|
*
|
|
2097
1475
|
* const leaveRoomSubscription = ipcHelper.onLeaveRoomMessage().subscribe((msg) => {
|
|
2098
1476
|
* // your logic for handling the message goes here
|
|
@@ -2107,13 +1485,13 @@ class to {
|
|
|
2107
1485
|
*/
|
|
2108
1486
|
onLeaveRoomMessage() {
|
|
2109
1487
|
if (!this.isEmbedded())
|
|
2110
|
-
throw new
|
|
2111
|
-
const
|
|
1488
|
+
throw new p(this.currentContext);
|
|
1489
|
+
const t = "LEAVE ROOM";
|
|
2112
1490
|
return this.incomingMessages$.pipe(
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
1491
|
+
g((e) => e.type === t && e.target === "client"),
|
|
1492
|
+
h((e) => e),
|
|
1493
|
+
v(this.logReceived(t)),
|
|
1494
|
+
h((e) => e)
|
|
2117
1495
|
);
|
|
2118
1496
|
}
|
|
2119
1497
|
/**
|
|
@@ -2129,7 +1507,7 @@ class to {
|
|
|
2129
1507
|
* Here is an example of how a listener can be setup:
|
|
2130
1508
|
*
|
|
2131
1509
|
* ```ts
|
|
2132
|
-
* const ipcHelper = new IpcHelper(['
|
|
1510
|
+
* const ipcHelper = new IpcHelper(['2.0'], console);
|
|
2133
1511
|
*
|
|
2134
1512
|
* const configSubscription = ipcHelper.onConfigMessage().subscribe((msg) => {
|
|
2135
1513
|
* // your logic for handling the configuration goes here
|
|
@@ -2144,53 +1522,53 @@ class to {
|
|
|
2144
1522
|
*/
|
|
2145
1523
|
onConfigMessage() {
|
|
2146
1524
|
if (!this.isEmbedded())
|
|
2147
|
-
throw new
|
|
2148
|
-
const
|
|
1525
|
+
throw new p(this.currentContext);
|
|
1526
|
+
const t = "CONFIG";
|
|
2149
1527
|
return this.incomingMessages$.pipe(
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
preferredCameraType:
|
|
2155
|
-
preferredMicType:
|
|
2156
|
-
preferredOutputType:
|
|
2157
|
-
preferredCameraDeviceLabel:
|
|
2158
|
-
preferredMicDeviceLabel:
|
|
2159
|
-
preferredOutputDeviceLabel:
|
|
2160
|
-
performanceProfile:
|
|
2161
|
-
cloudUsername:
|
|
2162
|
-
configuredOAuthProviders:
|
|
2163
|
-
locales:
|
|
1528
|
+
g((e) => e.type === t && e.target === "client"),
|
|
1529
|
+
h((e) => e),
|
|
1530
|
+
v(this.logReceived(t)),
|
|
1531
|
+
h((e) => ({
|
|
1532
|
+
preferredCameraType: e.preferredCameraType,
|
|
1533
|
+
preferredMicType: e.preferredMicType,
|
|
1534
|
+
preferredOutputType: e.preferredOutputType,
|
|
1535
|
+
preferredCameraDeviceLabel: e.preferredCameraDeviceLabel,
|
|
1536
|
+
preferredMicDeviceLabel: e.preferredMicDeviceLabel,
|
|
1537
|
+
preferredOutputDeviceLabel: e.preferredOutputDeviceLabel,
|
|
1538
|
+
performanceProfile: e.performanceProfile,
|
|
1539
|
+
cloudUsername: e.cloudUsername,
|
|
1540
|
+
configuredOAuthProviders: e.configuredOAuthProviders,
|
|
1541
|
+
locales: e.locales ? [...e.locales] : []
|
|
2164
1542
|
}))
|
|
2165
1543
|
);
|
|
2166
1544
|
}
|
|
2167
|
-
sendScreenshareSourceMessage(
|
|
1545
|
+
sendScreenshareSourceMessage(t) {
|
|
2168
1546
|
if (!this.isEmbedded())
|
|
2169
|
-
throw new
|
|
2170
|
-
const
|
|
2171
|
-
n.sourceTypes =
|
|
1547
|
+
throw new p(this.currentContext);
|
|
1548
|
+
const e = "SCREENSHARE SOURCE", n = this.createMessage(e);
|
|
1549
|
+
n.sourceTypes = t, this.logCreated(e, n);
|
|
2172
1550
|
const i = this.incomingMessages$.pipe(
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
1551
|
+
g((o) => o.type === e && o.replyTo === n.id),
|
|
1552
|
+
h((o) => o),
|
|
1553
|
+
v(this.logReceived(e)),
|
|
1554
|
+
h((o) => o),
|
|
1555
|
+
S(1)
|
|
2178
1556
|
);
|
|
2179
|
-
return this.logService.debug(`Created ${
|
|
1557
|
+
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(n), this.logSent(e, n), i;
|
|
2180
1558
|
}
|
|
2181
|
-
layoutChange(
|
|
1559
|
+
layoutChange(t, e, n) {
|
|
2182
1560
|
if (!this.isEmbedded())
|
|
2183
|
-
throw new
|
|
1561
|
+
throw new p(this.currentContext);
|
|
2184
1562
|
const i = "LAYOUT CHANGE";
|
|
2185
|
-
let
|
|
2186
|
-
if (
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
), this.logService.debug(`Created ${i} Reply handler`)),
|
|
2193
|
-
return
|
|
1563
|
+
let o, s;
|
|
1564
|
+
if (e && n ? (o = this.createMessage(i, !1, n), o.result = e) : (o = this.createMessage(i), s = this.incomingMessages$.pipe(
|
|
1565
|
+
g((c) => c.type === i && c.replyTo === o.id),
|
|
1566
|
+
h((c) => c),
|
|
1567
|
+
v(this.logReceived(i)),
|
|
1568
|
+
h((c) => c),
|
|
1569
|
+
S(1)
|
|
1570
|
+
), this.logService.debug(`Created ${i} Reply handler`)), o.layout = t, this.logCreated(i, o), this.port2.postMessage(o), this.logSent(i, o), s)
|
|
1571
|
+
return s;
|
|
2194
1572
|
}
|
|
2195
1573
|
/**
|
|
2196
1574
|
* Setup listener for {@link LayoutChangeMessage}, which can be sent by a host app if it needs to
|
|
@@ -2207,7 +1585,7 @@ class to {
|
|
|
2207
1585
|
* Here is an example of how a listener can be setup:
|
|
2208
1586
|
*
|
|
2209
1587
|
* ```ts
|
|
2210
|
-
* const ipcHelper = new IpcHelper(['
|
|
1588
|
+
* const ipcHelper = new IpcHelper(['2.0'], console);
|
|
2211
1589
|
*
|
|
2212
1590
|
* const layoutChangeSubscription = ipcHelper.onLayoutChangeMessage().subscribe((msg) => {
|
|
2213
1591
|
* // your logic for handling the request goes here
|
|
@@ -2225,65 +1603,65 @@ class to {
|
|
|
2225
1603
|
*/
|
|
2226
1604
|
onLayoutChangeMessage() {
|
|
2227
1605
|
if (!this.isEmbedded())
|
|
2228
|
-
throw new
|
|
2229
|
-
const
|
|
1606
|
+
throw new p(this.currentContext);
|
|
1607
|
+
const t = "LAYOUT CHANGE";
|
|
2230
1608
|
return this.incomingMessages$.pipe(
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
1609
|
+
g((e) => e.type === t && e.target === "client" && e.replyTo === null),
|
|
1610
|
+
h((e) => e),
|
|
1611
|
+
v(this.logReceived(t)),
|
|
1612
|
+
h((e) => e)
|
|
2235
1613
|
);
|
|
2236
1614
|
}
|
|
2237
|
-
requestOAuthToken(
|
|
1615
|
+
requestOAuthToken(t) {
|
|
2238
1616
|
if (!this.isEmbedded())
|
|
2239
|
-
throw new
|
|
2240
|
-
Array.isArray(
|
|
2241
|
-
const
|
|
2242
|
-
n.providerTypes =
|
|
1617
|
+
throw new p(this.currentContext);
|
|
1618
|
+
Array.isArray(t) || (t = [t]);
|
|
1619
|
+
const e = "OAUTH TOKEN", n = this.createMessage(e);
|
|
1620
|
+
n.providerTypes = t, this.logCreated(e, n);
|
|
2243
1621
|
const i = this.incomingMessages$.pipe(
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
1622
|
+
g((o) => o.type === e && o.replyTo === n.id),
|
|
1623
|
+
h((o) => o),
|
|
1624
|
+
v(this.logReceived(e)),
|
|
1625
|
+
S(1)
|
|
2248
1626
|
);
|
|
2249
|
-
return this.logService.debug(`Created ${
|
|
1627
|
+
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(n), this.logSent(e, n), i;
|
|
2250
1628
|
}
|
|
2251
|
-
openUrl(
|
|
1629
|
+
openUrl(t, e) {
|
|
2252
1630
|
if (!this.isEmbedded())
|
|
2253
|
-
throw new
|
|
1631
|
+
throw new p(this.currentContext);
|
|
2254
1632
|
const n = "OPEN URL", i = this.createMessage(n, !1);
|
|
2255
|
-
i.url =
|
|
1633
|
+
i.url = t, i.data = e, this.logCreated(n, i), this.port2.postMessage(i), this.logSent(n, i);
|
|
2256
1634
|
}
|
|
2257
|
-
selectContacts(
|
|
1635
|
+
selectContacts(t, e, n) {
|
|
2258
1636
|
if (!this.isEmbedded())
|
|
2259
|
-
throw new
|
|
2260
|
-
if (
|
|
2261
|
-
throw new
|
|
1637
|
+
throw new p(this.currentContext);
|
|
1638
|
+
if (e === "group" && n === void 0)
|
|
1639
|
+
throw new j(
|
|
2262
1640
|
"currentContacts",
|
|
2263
1641
|
n,
|
|
2264
1642
|
"currentContacts is required for group streams"
|
|
2265
1643
|
);
|
|
2266
|
-
if (
|
|
2267
|
-
throw new
|
|
1644
|
+
if (e === "direct" && n !== void 0)
|
|
1645
|
+
throw new j(
|
|
2268
1646
|
"currentContacts",
|
|
2269
1647
|
n,
|
|
2270
1648
|
"currentContacts should not be passed for direct streams"
|
|
2271
1649
|
);
|
|
2272
|
-
const i = "SELECT CONTACTS",
|
|
2273
|
-
|
|
2274
|
-
const
|
|
2275
|
-
|
|
2276
|
-
|
|
1650
|
+
const i = "SELECT CONTACTS", o = this.createMessage(i, !0);
|
|
1651
|
+
o.streamType = e, o.streamId = t, o.currentContacts = n, this.logCreated(i, o);
|
|
1652
|
+
const s = this.incomingMessages$.pipe(
|
|
1653
|
+
g((c) => c.type === i && c.replyTo === o.id),
|
|
1654
|
+
v(this.logReceived(i)),
|
|
2277
1655
|
// validate if `streamId` is the same as we sent
|
|
2278
|
-
|
|
2279
|
-
const
|
|
2280
|
-
if (
|
|
2281
|
-
throw new
|
|
2282
|
-
return
|
|
1656
|
+
h((c) => {
|
|
1657
|
+
const u = c;
|
|
1658
|
+
if (u.streamId !== t)
|
|
1659
|
+
throw new ut(u.streamId, t);
|
|
1660
|
+
return e === "direct" && u.contacts.length > 1 && (u.contacts = [u.contacts[0]]), u;
|
|
2283
1661
|
}),
|
|
2284
|
-
|
|
1662
|
+
S(1)
|
|
2285
1663
|
);
|
|
2286
|
-
return this.logService.debug(`Created ${i} Reply handler`), this.port2.postMessage(
|
|
1664
|
+
return this.logService.debug(`Created ${i} Reply handler`), this.port2.postMessage(o), this.logSent(i, o), s;
|
|
2287
1665
|
}
|
|
2288
1666
|
/**
|
|
2289
1667
|
* Request detailed contact information for the given Cloud usernames.
|
|
@@ -2293,20 +1671,20 @@ class to {
|
|
|
2293
1671
|
* @returns Observable with a {@link MatchContactsMessageReply} instance containing the requested
|
|
2294
1672
|
* {@link ContactItem} information. Emits once.
|
|
2295
1673
|
*/
|
|
2296
|
-
matchContacts(
|
|
1674
|
+
matchContacts(t) {
|
|
2297
1675
|
if (!this.isEmbedded())
|
|
2298
|
-
throw new
|
|
2299
|
-
if (!
|
|
2300
|
-
throw new
|
|
2301
|
-
const
|
|
2302
|
-
n.contacts = [...
|
|
1676
|
+
throw new p(this.currentContext);
|
|
1677
|
+
if (!t.length)
|
|
1678
|
+
throw new j("contacts", t, "At least one contact is required");
|
|
1679
|
+
const e = "MATCH CONTACTS", n = this.createMessage(e);
|
|
1680
|
+
n.contacts = [...t], this.logCreated(e, n);
|
|
2303
1681
|
const i = this.incomingMessages$.pipe(
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
1682
|
+
g((o) => o.type === e && o.replyTo === n.id),
|
|
1683
|
+
v(this.logReceived(e)),
|
|
1684
|
+
h((o) => o),
|
|
1685
|
+
S(1)
|
|
2308
1686
|
);
|
|
2309
|
-
return this.logService.debug(`Created ${
|
|
1687
|
+
return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(n), this.logSent(e, n), i;
|
|
2310
1688
|
}
|
|
2311
1689
|
/**
|
|
2312
1690
|
* Setup listener for {@link PushMessageMessage}, which can be sent by a Host app to forward an
|
|
@@ -2320,7 +1698,7 @@ class to {
|
|
|
2320
1698
|
* Here is an example of how a listener can be setup:
|
|
2321
1699
|
*
|
|
2322
1700
|
* ```ts
|
|
2323
|
-
* const ipcHelper = new IpcHelper(['
|
|
1701
|
+
* const ipcHelper = new IpcHelper(['2.0'], console);
|
|
2324
1702
|
*
|
|
2325
1703
|
* const pushMessageSubscription = ipcHelper.onPushMessageMessage().subscribe((msg) => {
|
|
2326
1704
|
* // your logic for handling the incoming push message goes here
|
|
@@ -2335,12 +1713,12 @@ class to {
|
|
|
2335
1713
|
*/
|
|
2336
1714
|
onPushMessageMessage() {
|
|
2337
1715
|
if (!this.isEmbedded())
|
|
2338
|
-
throw new
|
|
2339
|
-
const
|
|
1716
|
+
throw new p(this.currentContext);
|
|
1717
|
+
const t = "PUSH MESSAGE";
|
|
2340
1718
|
return this.incomingMessages$.pipe(
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
1719
|
+
g((e) => e.type === t && e.target === "client"),
|
|
1720
|
+
h((e) => e),
|
|
1721
|
+
v(this.logReceived(t))
|
|
2344
1722
|
);
|
|
2345
1723
|
}
|
|
2346
1724
|
/**
|
|
@@ -2354,16 +1732,16 @@ class to {
|
|
|
2354
1732
|
*/
|
|
2355
1733
|
requestPushToken() {
|
|
2356
1734
|
if (!this.isEmbedded())
|
|
2357
|
-
throw new
|
|
2358
|
-
const
|
|
2359
|
-
this.logCreated(
|
|
1735
|
+
throw new p(this.currentContext);
|
|
1736
|
+
const t = "PUSH TOKEN", e = this.createMessage(t);
|
|
1737
|
+
this.logCreated(t, e);
|
|
2360
1738
|
const n = this.incomingMessages$.pipe(
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
1739
|
+
g((i) => i.type === t && i.replyTo === e.id),
|
|
1740
|
+
v(this.logReceived(t)),
|
|
1741
|
+
h((i) => i),
|
|
1742
|
+
S(1)
|
|
2365
1743
|
);
|
|
2366
|
-
return this.logService.debug(`Created ${
|
|
1744
|
+
return this.logService.debug(`Created ${t} Reply handler`), this.port2.postMessage(e), this.logSent(t, e), n;
|
|
2367
1745
|
}
|
|
2368
1746
|
/**
|
|
2369
1747
|
* Setup listener for {@link BadgeQueryMessage}, which can be sent by a `Host` app to request the
|
|
@@ -2374,12 +1752,12 @@ class to {
|
|
|
2374
1752
|
*/
|
|
2375
1753
|
onBadgeQueryMessage() {
|
|
2376
1754
|
if (!this.isEmbedded())
|
|
2377
|
-
throw new
|
|
2378
|
-
const
|
|
1755
|
+
throw new p(this.currentContext);
|
|
1756
|
+
const t = "BADGE QUERY";
|
|
2379
1757
|
return this.incomingMessages$.pipe(
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
1758
|
+
g((e) => e.type === t && e.target === "client"),
|
|
1759
|
+
h((e) => e),
|
|
1760
|
+
v(this.logReceived(t))
|
|
2383
1761
|
);
|
|
2384
1762
|
}
|
|
2385
1763
|
/**
|
|
@@ -2393,11 +1771,11 @@ class to {
|
|
|
2393
1771
|
* @param count - The counter's value
|
|
2394
1772
|
* @param replyTo - _Optional_. The message ID to which the reply should be sent
|
|
2395
1773
|
*/
|
|
2396
|
-
sendBadgeUpdateMessage(
|
|
1774
|
+
sendBadgeUpdateMessage(t, e) {
|
|
2397
1775
|
if (!this.isEmbedded())
|
|
2398
|
-
throw new
|
|
2399
|
-
const n = "BADGE UPDATE", i = this.createMessage(n, !1,
|
|
2400
|
-
i.count =
|
|
1776
|
+
throw new p(this.currentContext);
|
|
1777
|
+
const n = "BADGE UPDATE", i = this.createMessage(n, !1, e);
|
|
1778
|
+
i.count = t, this.logCreated(n, i), this.port2.postMessage(i), this.logSent(n, i);
|
|
2401
1779
|
}
|
|
2402
1780
|
/**
|
|
2403
1781
|
* Setup listener for {@link HostInForegroundMessage}, which can be sent by a `Host` app to
|
|
@@ -2412,12 +1790,12 @@ class to {
|
|
|
2412
1790
|
*/
|
|
2413
1791
|
onHostInForegroundMessage() {
|
|
2414
1792
|
if (!this.isEmbedded())
|
|
2415
|
-
throw new
|
|
2416
|
-
const
|
|
1793
|
+
throw new p(this.currentContext);
|
|
1794
|
+
const t = "HOST IN FOREGROUND";
|
|
2417
1795
|
return this.incomingMessages$.pipe(
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
1796
|
+
g((e) => e.type === t && e.target === "client"),
|
|
1797
|
+
h((e) => e),
|
|
1798
|
+
v(this.logReceived(t))
|
|
2421
1799
|
);
|
|
2422
1800
|
}
|
|
2423
1801
|
/**
|
|
@@ -2430,473 +1808,55 @@ class to {
|
|
|
2430
1808
|
isEmbedded() {
|
|
2431
1809
|
if (this.embeddedResult !== null)
|
|
2432
1810
|
return this.embeddedResult;
|
|
2433
|
-
let
|
|
2434
|
-
return this.logService.debug("Checking if running in iframe..."),
|
|
1811
|
+
let t = !1;
|
|
1812
|
+
return this.logService.debug("Checking if running in iframe..."), t = !!this.frameElement, t || (t = this.self !== this.parent), t ? (this.logService.debug("In iframe"), this.inIframe = !0, this.embeddedResult = !0, !0) : (this.logService.debug("Not in iframe"), this.logService.debug("Checking if running in native app..."), !t && (t = !!window.Acrobits, t) ? (this.logService.debug("In native app"), this.embeddedResult = !0, t) : (this.logService.debug("Not running in native app"), this.embeddedResult = !1, this.embeddedResult));
|
|
2435
1813
|
}
|
|
2436
|
-
logReceived(
|
|
2437
|
-
const n = (i) => this.logService.debug(`[IPC] Received ${
|
|
2438
|
-
return
|
|
1814
|
+
logReceived(t, e) {
|
|
1815
|
+
const n = (i) => this.logService.debug(`[IPC] Received ${t} message`, i);
|
|
1816
|
+
return e && n(e), n;
|
|
2439
1817
|
}
|
|
2440
|
-
logSent(
|
|
2441
|
-
this.logService.debug(`[IPC] Sent ${
|
|
1818
|
+
logSent(t, e) {
|
|
1819
|
+
this.logService.debug(`[IPC] Sent ${t} message`, e);
|
|
2442
1820
|
}
|
|
2443
|
-
logCreated(
|
|
2444
|
-
this.logService.debug(`[IPC] Created ${
|
|
1821
|
+
logCreated(t, e) {
|
|
1822
|
+
this.logService.debug(`[IPC] Created ${t} message`, e);
|
|
2445
1823
|
}
|
|
2446
1824
|
async createIframeChannel() {
|
|
2447
|
-
return new Promise((
|
|
2448
|
-
const
|
|
2449
|
-
n.data === "message channel port" && (this.iframePort2 = n.ports[0], this.self.removeEventListener("message",
|
|
1825
|
+
return new Promise((t) => {
|
|
1826
|
+
const e = (n) => {
|
|
1827
|
+
n.data === "message channel port" && (this.iframePort2 = n.ports[0], this.self.removeEventListener("message", e), t());
|
|
2450
1828
|
};
|
|
2451
|
-
this.self.addEventListener("message",
|
|
1829
|
+
this.self.addEventListener("message", e), this.parent.postMessage("get channel", "*");
|
|
2452
1830
|
});
|
|
2453
1831
|
}
|
|
2454
|
-
finishIpcSetup(
|
|
2455
|
-
this.logService.debug("Registering listener on port2..."), this.port2.addEventListener("message", this.handleIpcMessage.bind(this)), this.port2.start(), this.logService.debug("Started listening on port2"), this.port2.postMessage(
|
|
1832
|
+
finishIpcSetup(t) {
|
|
1833
|
+
this.logService.debug("Registering listener on port2..."), this.port2.addEventListener("message", this.handleIpcMessage.bind(this)), this.port2.start(), this.logService.debug("Started listening on port2"), this.port2.postMessage(t), this.logSent("HELLO", t);
|
|
2456
1834
|
}
|
|
2457
|
-
handleIpcMessage(
|
|
2458
|
-
const { data:
|
|
2459
|
-
!
|
|
1835
|
+
handleIpcMessage(t) {
|
|
1836
|
+
const { data: e } = t;
|
|
1837
|
+
!e.id || e.target !== "client" || this.incomingMessages$.next(e);
|
|
2460
1838
|
}
|
|
2461
|
-
createMessage(
|
|
1839
|
+
createMessage(t, e = !0, n) {
|
|
2462
1840
|
return {
|
|
2463
|
-
type:
|
|
1841
|
+
type: t,
|
|
2464
1842
|
id: this.generateId(),
|
|
2465
1843
|
target: "host",
|
|
2466
|
-
expectReply:
|
|
1844
|
+
expectReply: e,
|
|
2467
1845
|
replyTo: n ?? null
|
|
2468
1846
|
};
|
|
2469
1847
|
}
|
|
2470
|
-
generateId(
|
|
1848
|
+
generateId(t = 8, e = !1) {
|
|
2471
1849
|
let n = "1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
|
|
2472
1850
|
const i = [];
|
|
2473
|
-
|
|
2474
|
-
for (let
|
|
1851
|
+
e && (n = n.substr(0, n.indexOf("Q")));
|
|
1852
|
+
for (let o = 0; o < t; o++)
|
|
2475
1853
|
i.push(n[Math.floor(Math.random() * n.length)]);
|
|
2476
1854
|
return i.join("");
|
|
2477
1855
|
}
|
|
2478
1856
|
}
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
} || function(t, n) {
|
|
2483
|
-
for (var i in n)
|
|
2484
|
-
Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
2485
|
-
}, tt(r, e);
|
|
2486
|
-
};
|
|
2487
|
-
function ft(r, e) {
|
|
2488
|
-
if (typeof e != "function" && e !== null)
|
|
2489
|
-
throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
|
|
2490
|
-
tt(r, e);
|
|
2491
|
-
function t() {
|
|
2492
|
-
this.constructor = r;
|
|
2493
|
-
}
|
|
2494
|
-
r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
|
|
2495
|
-
}
|
|
2496
|
-
function Qt(r) {
|
|
2497
|
-
var e = typeof Symbol == "function" && Symbol.iterator, t = e && r[e], n = 0;
|
|
2498
|
-
if (t)
|
|
2499
|
-
return t.call(r);
|
|
2500
|
-
if (r && typeof r.length == "number")
|
|
2501
|
-
return {
|
|
2502
|
-
next: function() {
|
|
2503
|
-
return r && n >= r.length && (r = void 0), { value: r && r[n++], done: !r };
|
|
2504
|
-
}
|
|
2505
|
-
};
|
|
2506
|
-
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2507
|
-
}
|
|
2508
|
-
function Ce(r, e) {
|
|
2509
|
-
var t = typeof Symbol == "function" && r[Symbol.iterator];
|
|
2510
|
-
if (!t)
|
|
2511
|
-
return r;
|
|
2512
|
-
var n = t.call(r), i, s = [], a;
|
|
2513
|
-
try {
|
|
2514
|
-
for (; (e === void 0 || e-- > 0) && !(i = n.next()).done; )
|
|
2515
|
-
s.push(i.value);
|
|
2516
|
-
} catch (c) {
|
|
2517
|
-
a = { error: c };
|
|
2518
|
-
} finally {
|
|
2519
|
-
try {
|
|
2520
|
-
i && !i.done && (t = n.return) && t.call(n);
|
|
2521
|
-
} finally {
|
|
2522
|
-
if (a)
|
|
2523
|
-
throw a.error;
|
|
2524
|
-
}
|
|
2525
|
-
}
|
|
2526
|
-
return s;
|
|
2527
|
-
}
|
|
2528
|
-
function Ne(r, e, t) {
|
|
2529
|
-
if (t || arguments.length === 2)
|
|
2530
|
-
for (var n = 0, i = e.length, s; n < i; n++)
|
|
2531
|
-
(s || !(n in e)) && (s || (s = Array.prototype.slice.call(e, 0, n)), s[n] = e[n]);
|
|
2532
|
-
return r.concat(s || Array.prototype.slice.call(e));
|
|
2533
|
-
}
|
|
2534
|
-
function Y(r) {
|
|
2535
|
-
return typeof r == "function";
|
|
2536
|
-
}
|
|
2537
|
-
function fr(r) {
|
|
2538
|
-
var e = function(n) {
|
|
2539
|
-
Error.call(n), n.stack = new Error().stack;
|
|
2540
|
-
}, t = r(e);
|
|
2541
|
-
return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t;
|
|
2542
|
-
}
|
|
2543
|
-
var ze = fr(function(r) {
|
|
2544
|
-
return function(t) {
|
|
2545
|
-
r(this), this.message = t ? t.length + ` errors occurred during unsubscription:
|
|
2546
|
-
` + t.map(function(n, i) {
|
|
2547
|
-
return i + 1 + ") " + n.toString();
|
|
2548
|
-
}).join(`
|
|
2549
|
-
`) : "", this.name = "UnsubscriptionError", this.errors = t;
|
|
2550
|
-
};
|
|
2551
|
-
});
|
|
2552
|
-
function Wt(r, e) {
|
|
2553
|
-
if (r) {
|
|
2554
|
-
var t = r.indexOf(e);
|
|
2555
|
-
0 <= t && r.splice(t, 1);
|
|
2556
|
-
}
|
|
2557
|
-
}
|
|
2558
|
-
var dt = function() {
|
|
2559
|
-
function r(e) {
|
|
2560
|
-
this.initialTeardown = e, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
2561
|
-
}
|
|
2562
|
-
return r.prototype.unsubscribe = function() {
|
|
2563
|
-
var e, t, n, i, s;
|
|
2564
|
-
if (!this.closed) {
|
|
2565
|
-
this.closed = !0;
|
|
2566
|
-
var a = this._parentage;
|
|
2567
|
-
if (a)
|
|
2568
|
-
if (this._parentage = null, Array.isArray(a))
|
|
2569
|
-
try {
|
|
2570
|
-
for (var c = Qt(a), o = c.next(); !o.done; o = c.next()) {
|
|
2571
|
-
var l = o.value;
|
|
2572
|
-
l.remove(this);
|
|
2573
|
-
}
|
|
2574
|
-
} catch (R) {
|
|
2575
|
-
e = { error: R };
|
|
2576
|
-
} finally {
|
|
2577
|
-
try {
|
|
2578
|
-
o && !o.done && (t = c.return) && t.call(c);
|
|
2579
|
-
} finally {
|
|
2580
|
-
if (e)
|
|
2581
|
-
throw e.error;
|
|
2582
|
-
}
|
|
2583
|
-
}
|
|
2584
|
-
else
|
|
2585
|
-
a.remove(this);
|
|
2586
|
-
var u = this.initialTeardown;
|
|
2587
|
-
if (Y(u))
|
|
2588
|
-
try {
|
|
2589
|
-
u();
|
|
2590
|
-
} catch (R) {
|
|
2591
|
-
s = R instanceof ze ? R.errors : [R];
|
|
2592
|
-
}
|
|
2593
|
-
var p = this._finalizers;
|
|
2594
|
-
if (p) {
|
|
2595
|
-
this._finalizers = null;
|
|
2596
|
-
try {
|
|
2597
|
-
for (var w = Qt(p), f = w.next(); !f.done; f = w.next()) {
|
|
2598
|
-
var g = f.value;
|
|
2599
|
-
try {
|
|
2600
|
-
Jt(g);
|
|
2601
|
-
} catch (R) {
|
|
2602
|
-
s = s ?? [], R instanceof ze ? s = Ne(Ne([], Ce(s)), Ce(R.errors)) : s.push(R);
|
|
2603
|
-
}
|
|
2604
|
-
}
|
|
2605
|
-
} catch (R) {
|
|
2606
|
-
n = { error: R };
|
|
2607
|
-
} finally {
|
|
2608
|
-
try {
|
|
2609
|
-
f && !f.done && (i = w.return) && i.call(w);
|
|
2610
|
-
} finally {
|
|
2611
|
-
if (n)
|
|
2612
|
-
throw n.error;
|
|
2613
|
-
}
|
|
2614
|
-
}
|
|
2615
|
-
}
|
|
2616
|
-
if (s)
|
|
2617
|
-
throw new ze(s);
|
|
2618
|
-
}
|
|
2619
|
-
}, r.prototype.add = function(e) {
|
|
2620
|
-
var t;
|
|
2621
|
-
if (e && e !== this)
|
|
2622
|
-
if (this.closed)
|
|
2623
|
-
Jt(e);
|
|
2624
|
-
else {
|
|
2625
|
-
if (e instanceof r) {
|
|
2626
|
-
if (e.closed || e._hasParent(this))
|
|
2627
|
-
return;
|
|
2628
|
-
e._addParent(this);
|
|
2629
|
-
}
|
|
2630
|
-
(this._finalizers = (t = this._finalizers) !== null && t !== void 0 ? t : []).push(e);
|
|
2631
|
-
}
|
|
2632
|
-
}, r.prototype._hasParent = function(e) {
|
|
2633
|
-
var t = this._parentage;
|
|
2634
|
-
return t === e || Array.isArray(t) && t.includes(e);
|
|
2635
|
-
}, r.prototype._addParent = function(e) {
|
|
2636
|
-
var t = this._parentage;
|
|
2637
|
-
this._parentage = Array.isArray(t) ? (t.push(e), t) : t ? [t, e] : e;
|
|
2638
|
-
}, r.prototype._removeParent = function(e) {
|
|
2639
|
-
var t = this._parentage;
|
|
2640
|
-
t === e ? this._parentage = null : Array.isArray(t) && Wt(t, e);
|
|
2641
|
-
}, r.prototype.remove = function(e) {
|
|
2642
|
-
var t = this._finalizers;
|
|
2643
|
-
t && Wt(t, e), e instanceof r && e._removeParent(this);
|
|
2644
|
-
}, r.EMPTY = function() {
|
|
2645
|
-
var e = new r();
|
|
2646
|
-
return e.closed = !0, e;
|
|
2647
|
-
}(), r;
|
|
2648
|
-
}();
|
|
2649
|
-
dt.EMPTY;
|
|
2650
|
-
function ro(r) {
|
|
2651
|
-
return r instanceof dt || r && "closed" in r && Y(r.remove) && Y(r.add) && Y(r.unsubscribe);
|
|
2652
|
-
}
|
|
2653
|
-
function Jt(r) {
|
|
2654
|
-
Y(r) ? r() : r.unsubscribe();
|
|
2655
|
-
}
|
|
2656
|
-
var no = {
|
|
2657
|
-
onUnhandledError: null,
|
|
2658
|
-
onStoppedNotification: null,
|
|
2659
|
-
Promise: void 0,
|
|
2660
|
-
useDeprecatedSynchronousErrorHandling: !1,
|
|
2661
|
-
useDeprecatedNextContext: !1
|
|
2662
|
-
}, rt = {
|
|
2663
|
-
setTimeout: function(r, e) {
|
|
2664
|
-
for (var t = [], n = 2; n < arguments.length; n++)
|
|
2665
|
-
t[n - 2] = arguments[n];
|
|
2666
|
-
var i = rt.delegate;
|
|
2667
|
-
return i != null && i.setTimeout ? i.setTimeout.apply(i, Ne([r, e], Ce(t))) : setTimeout.apply(void 0, Ne([r, e], Ce(t)));
|
|
2668
|
-
},
|
|
2669
|
-
clearTimeout: function(r) {
|
|
2670
|
-
var e = rt.delegate;
|
|
2671
|
-
return ((e == null ? void 0 : e.clearTimeout) || clearTimeout)(r);
|
|
2672
|
-
},
|
|
2673
|
-
delegate: void 0
|
|
2674
|
-
};
|
|
2675
|
-
function io(r) {
|
|
2676
|
-
rt.setTimeout(function() {
|
|
2677
|
-
throw r;
|
|
2678
|
-
});
|
|
2679
|
-
}
|
|
2680
|
-
function Kt() {
|
|
2681
|
-
}
|
|
2682
|
-
var dr = function(r) {
|
|
2683
|
-
ft(e, r);
|
|
2684
|
-
function e(t) {
|
|
2685
|
-
var n = r.call(this) || this;
|
|
2686
|
-
return n.isStopped = !1, t ? (n.destination = t, ro(t) && t.add(n)) : n.destination = lo, n;
|
|
2687
|
-
}
|
|
2688
|
-
return e.create = function(t, n, i) {
|
|
2689
|
-
return new vr(t, n, i);
|
|
2690
|
-
}, e.prototype.next = function(t) {
|
|
2691
|
-
this.isStopped || this._next(t);
|
|
2692
|
-
}, e.prototype.error = function(t) {
|
|
2693
|
-
this.isStopped || (this.isStopped = !0, this._error(t));
|
|
2694
|
-
}, e.prototype.complete = function() {
|
|
2695
|
-
this.isStopped || (this.isStopped = !0, this._complete());
|
|
2696
|
-
}, e.prototype.unsubscribe = function() {
|
|
2697
|
-
this.closed || (this.isStopped = !0, r.prototype.unsubscribe.call(this), this.destination = null);
|
|
2698
|
-
}, e.prototype._next = function(t) {
|
|
2699
|
-
this.destination.next(t);
|
|
2700
|
-
}, e.prototype._error = function(t) {
|
|
2701
|
-
try {
|
|
2702
|
-
this.destination.error(t);
|
|
2703
|
-
} finally {
|
|
2704
|
-
this.unsubscribe();
|
|
2705
|
-
}
|
|
2706
|
-
}, e.prototype._complete = function() {
|
|
2707
|
-
try {
|
|
2708
|
-
this.destination.complete();
|
|
2709
|
-
} finally {
|
|
2710
|
-
this.unsubscribe();
|
|
2711
|
-
}
|
|
2712
|
-
}, e;
|
|
2713
|
-
}(dt), so = Function.prototype.bind;
|
|
2714
|
-
function Qe(r, e) {
|
|
2715
|
-
return so.call(r, e);
|
|
2716
|
-
}
|
|
2717
|
-
var oo = function() {
|
|
2718
|
-
function r(e) {
|
|
2719
|
-
this.partialObserver = e;
|
|
2720
|
-
}
|
|
2721
|
-
return r.prototype.next = function(e) {
|
|
2722
|
-
var t = this.partialObserver;
|
|
2723
|
-
if (t.next)
|
|
2724
|
-
try {
|
|
2725
|
-
t.next(e);
|
|
2726
|
-
} catch (n) {
|
|
2727
|
-
Re(n);
|
|
2728
|
-
}
|
|
2729
|
-
}, r.prototype.error = function(e) {
|
|
2730
|
-
var t = this.partialObserver;
|
|
2731
|
-
if (t.error)
|
|
2732
|
-
try {
|
|
2733
|
-
t.error(e);
|
|
2734
|
-
} catch (n) {
|
|
2735
|
-
Re(n);
|
|
2736
|
-
}
|
|
2737
|
-
else
|
|
2738
|
-
Re(e);
|
|
2739
|
-
}, r.prototype.complete = function() {
|
|
2740
|
-
var e = this.partialObserver;
|
|
2741
|
-
if (e.complete)
|
|
2742
|
-
try {
|
|
2743
|
-
e.complete();
|
|
2744
|
-
} catch (t) {
|
|
2745
|
-
Re(t);
|
|
2746
|
-
}
|
|
2747
|
-
}, r;
|
|
2748
|
-
}(), vr = function(r) {
|
|
2749
|
-
ft(e, r);
|
|
2750
|
-
function e(t, n, i) {
|
|
2751
|
-
var s = r.call(this) || this, a;
|
|
2752
|
-
if (Y(t) || !t)
|
|
2753
|
-
a = {
|
|
2754
|
-
next: t ?? void 0,
|
|
2755
|
-
error: n ?? void 0,
|
|
2756
|
-
complete: i ?? void 0
|
|
2757
|
-
};
|
|
2758
|
-
else {
|
|
2759
|
-
var c;
|
|
2760
|
-
s && no.useDeprecatedNextContext ? (c = Object.create(t), c.unsubscribe = function() {
|
|
2761
|
-
return s.unsubscribe();
|
|
2762
|
-
}, a = {
|
|
2763
|
-
next: t.next && Qe(t.next, c),
|
|
2764
|
-
error: t.error && Qe(t.error, c),
|
|
2765
|
-
complete: t.complete && Qe(t.complete, c)
|
|
2766
|
-
}) : a = t;
|
|
2767
|
-
}
|
|
2768
|
-
return s.destination = new oo(a), s;
|
|
2769
|
-
}
|
|
2770
|
-
return e;
|
|
2771
|
-
}(dr);
|
|
2772
|
-
function Re(r) {
|
|
2773
|
-
io(r);
|
|
2774
|
-
}
|
|
2775
|
-
function ao(r) {
|
|
2776
|
-
throw r;
|
|
2777
|
-
}
|
|
2778
|
-
var lo = {
|
|
2779
|
-
closed: !0,
|
|
2780
|
-
next: Kt,
|
|
2781
|
-
error: ao,
|
|
2782
|
-
complete: Kt
|
|
2783
|
-
};
|
|
2784
|
-
function co(r) {
|
|
2785
|
-
return r;
|
|
2786
|
-
}
|
|
2787
|
-
function uo(r) {
|
|
2788
|
-
return Y(r == null ? void 0 : r.lift);
|
|
2789
|
-
}
|
|
2790
|
-
function gr(r) {
|
|
2791
|
-
return function(e) {
|
|
2792
|
-
if (uo(e))
|
|
2793
|
-
return e.lift(function(t) {
|
|
2794
|
-
try {
|
|
2795
|
-
return r(t, this);
|
|
2796
|
-
} catch (n) {
|
|
2797
|
-
this.error(n);
|
|
2798
|
-
}
|
|
2799
|
-
});
|
|
2800
|
-
throw new TypeError("Unable to lift unknown Observable type");
|
|
2801
|
-
};
|
|
2802
|
-
}
|
|
2803
|
-
function mr(r, e, t, n, i) {
|
|
2804
|
-
return new ho(r, e, t, n, i);
|
|
2805
|
-
}
|
|
2806
|
-
var ho = function(r) {
|
|
2807
|
-
ft(e, r);
|
|
2808
|
-
function e(t, n, i, s, a, c) {
|
|
2809
|
-
var o = r.call(this, t) || this;
|
|
2810
|
-
return o.onFinalize = a, o.shouldUnsubscribe = c, o._next = n ? function(l) {
|
|
2811
|
-
try {
|
|
2812
|
-
n(l);
|
|
2813
|
-
} catch (u) {
|
|
2814
|
-
t.error(u);
|
|
2815
|
-
}
|
|
2816
|
-
} : r.prototype._next, o._error = s ? function(l) {
|
|
2817
|
-
try {
|
|
2818
|
-
s(l);
|
|
2819
|
-
} catch (u) {
|
|
2820
|
-
t.error(u);
|
|
2821
|
-
} finally {
|
|
2822
|
-
this.unsubscribe();
|
|
2823
|
-
}
|
|
2824
|
-
} : r.prototype._error, o._complete = i ? function() {
|
|
2825
|
-
try {
|
|
2826
|
-
i();
|
|
2827
|
-
} catch (l) {
|
|
2828
|
-
t.error(l);
|
|
2829
|
-
} finally {
|
|
2830
|
-
this.unsubscribe();
|
|
2831
|
-
}
|
|
2832
|
-
} : r.prototype._complete, o;
|
|
2833
|
-
}
|
|
2834
|
-
return e.prototype.unsubscribe = function() {
|
|
2835
|
-
var t;
|
|
2836
|
-
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
|
2837
|
-
var n = this.closed;
|
|
2838
|
-
r.prototype.unsubscribe.call(this), !n && ((t = this.onFinalize) === null || t === void 0 || t.call(this));
|
|
2839
|
-
}
|
|
2840
|
-
}, e;
|
|
2841
|
-
}(dr), po = fr(function(r) {
|
|
2842
|
-
return function() {
|
|
2843
|
-
r(this), this.name = "EmptyError", this.message = "no elements in sequence";
|
|
2844
|
-
};
|
|
2845
|
-
});
|
|
2846
|
-
function ue(r, e) {
|
|
2847
|
-
var t = typeof e == "object";
|
|
2848
|
-
return new Promise(function(n, i) {
|
|
2849
|
-
var s = new vr({
|
|
2850
|
-
next: function(a) {
|
|
2851
|
-
n(a), s.unsubscribe();
|
|
2852
|
-
},
|
|
2853
|
-
error: i,
|
|
2854
|
-
complete: function() {
|
|
2855
|
-
t ? n(e.defaultValue) : i(new po());
|
|
2856
|
-
}
|
|
2857
|
-
});
|
|
2858
|
-
r.subscribe(s);
|
|
2859
|
-
});
|
|
2860
|
-
}
|
|
2861
|
-
function Ie(r, e) {
|
|
2862
|
-
return gr(function(t, n) {
|
|
2863
|
-
var i = 0;
|
|
2864
|
-
t.subscribe(mr(n, function(s) {
|
|
2865
|
-
n.next(r.call(e, s, i++));
|
|
2866
|
-
}));
|
|
2867
|
-
});
|
|
2868
|
-
}
|
|
2869
|
-
function fo(r, e, t) {
|
|
2870
|
-
var n = Y(r) || e || t ? { next: r, error: e, complete: t } : r;
|
|
2871
|
-
return n ? gr(function(i, s) {
|
|
2872
|
-
var a;
|
|
2873
|
-
(a = n.subscribe) === null || a === void 0 || a.call(n);
|
|
2874
|
-
var c = !0;
|
|
2875
|
-
i.subscribe(mr(s, function(o) {
|
|
2876
|
-
var l;
|
|
2877
|
-
(l = n.next) === null || l === void 0 || l.call(n, o), s.next(o);
|
|
2878
|
-
}, function() {
|
|
2879
|
-
var o;
|
|
2880
|
-
c = !1, (o = n.complete) === null || o === void 0 || o.call(n), s.complete();
|
|
2881
|
-
}, function(o) {
|
|
2882
|
-
var l;
|
|
2883
|
-
c = !1, (l = n.error) === null || l === void 0 || l.call(n, o), s.error(o);
|
|
2884
|
-
}, function() {
|
|
2885
|
-
var o, l;
|
|
2886
|
-
c && ((o = n.unsubscribe) === null || o === void 0 || o.call(n)), (l = n.finalize) === null || l === void 0 || l.call(n);
|
|
2887
|
-
}));
|
|
2888
|
-
}) : co;
|
|
2889
|
-
}
|
|
2890
|
-
function vo() {
|
|
2891
|
-
try {
|
|
2892
|
-
return import("@acrobits/log-helper").then((r) => r.LogHelper.getLogger("IpcSDK"));
|
|
2893
|
-
} catch {
|
|
2894
|
-
return Promise.resolve(console);
|
|
2895
|
-
}
|
|
2896
|
-
}
|
|
2897
|
-
const go = ["1.0"];
|
|
2898
|
-
var de, nt;
|
|
2899
|
-
class yo {
|
|
1857
|
+
const At = ["2.0"];
|
|
1858
|
+
var P, te;
|
|
1859
|
+
class Rt {
|
|
2900
1860
|
/**
|
|
2901
1861
|
* A class that manages the IPC communication between the `Client` and the `Host`.
|
|
2902
1862
|
*
|
|
@@ -2907,29 +1867,27 @@ class yo {
|
|
|
2907
1867
|
* @param logger - An optional logger instance to use for logging. If not provided, a default logger
|
|
2908
1868
|
* will be used.
|
|
2909
1869
|
*/
|
|
2910
|
-
constructor(
|
|
2911
|
-
|
|
1870
|
+
constructor(t) {
|
|
1871
|
+
ue(this, P);
|
|
2912
1872
|
/**
|
|
2913
1873
|
* The type of the `Host` app the `Client` is embedded in.
|
|
2914
1874
|
*/
|
|
2915
|
-
|
|
1875
|
+
_(this, "host");
|
|
2916
1876
|
/**
|
|
2917
1877
|
* The cloud ID of the `Host` app the `Client` is embedded in.
|
|
2918
1878
|
*/
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
this.logger = t;
|
|
2925
|
-
})), this.helper = new to(go, this.logger), this.listeners = /* @__PURE__ */ new Map(), this.listeners.set(H.BadgeQuery, /* @__PURE__ */ new Set()), this.listeners.set(H.HostInForeground, /* @__PURE__ */ new Set());
|
|
1879
|
+
_(this, "cloudId");
|
|
1880
|
+
_(this, "logger");
|
|
1881
|
+
_(this, "helper");
|
|
1882
|
+
_(this, "listeners");
|
|
1883
|
+
this.logger = t ?? console, this.helper = new Pt(At, this.logger), this.listeners = /* @__PURE__ */ new Map(), this.listeners.set(C.BadgeQuery, /* @__PURE__ */ new Set()), this.listeners.set(C.HostInForeground, /* @__PURE__ */ new Set());
|
|
2926
1884
|
}
|
|
2927
1885
|
/**
|
|
2928
1886
|
* Returns whether the app is running inside a native WebView (`host` context) or as a
|
|
2929
1887
|
* `standalone` app.
|
|
2930
1888
|
*/
|
|
2931
1889
|
get context() {
|
|
2932
|
-
return
|
|
1890
|
+
return B(this, P, te).call(this, this.helper.currentContext);
|
|
2933
1891
|
}
|
|
2934
1892
|
/**
|
|
2935
1893
|
* Determines if the app is connected to a `Host` app.
|
|
@@ -2949,49 +1907,49 @@ class yo {
|
|
|
2949
1907
|
* @returns A promise with {@link IPCContext} the app is running under.
|
|
2950
1908
|
*/
|
|
2951
1909
|
async determineContext() {
|
|
2952
|
-
const
|
|
1910
|
+
const t = await O(this.helper.determineContext(), {
|
|
2953
1911
|
defaultValue: "guest"
|
|
2954
1912
|
});
|
|
2955
|
-
return
|
|
1913
|
+
return B(this, P, te).call(this, t);
|
|
2956
1914
|
}
|
|
2957
1915
|
/**
|
|
2958
1916
|
* Initiates the IPC handshake with the `Host` app.
|
|
2959
1917
|
*/
|
|
2960
1918
|
initiateConnection() {
|
|
2961
|
-
return
|
|
1919
|
+
return O(
|
|
2962
1920
|
this.helper.openBridge().pipe(
|
|
2963
|
-
|
|
2964
|
-
this.helper.onBadgeQueryMessage().subscribe((
|
|
1921
|
+
it((t) => {
|
|
1922
|
+
this.helper.onBadgeQueryMessage().subscribe((e) => {
|
|
2965
1923
|
var n;
|
|
2966
|
-
this.logger.debug("Received Badge Query: ",
|
|
2967
|
-
for (const i of ((n = this.listeners.get(
|
|
1924
|
+
this.logger.debug("Received Badge Query: ", e);
|
|
1925
|
+
for (const i of ((n = this.listeners.get(C.BadgeQuery)) == null ? void 0 : n.values()) ?? [])
|
|
2968
1926
|
i();
|
|
2969
|
-
}), this.helper.onHostInForegroundMessage().subscribe((
|
|
1927
|
+
}), this.helper.onHostInForegroundMessage().subscribe((e) => {
|
|
2970
1928
|
var n;
|
|
2971
|
-
this.logger.debug("Received Host In Foreground: ",
|
|
2972
|
-
for (const i of ((n = this.listeners.get(
|
|
1929
|
+
this.logger.debug("Received Host In Foreground: ", e);
|
|
1930
|
+
for (const i of ((n = this.listeners.get(C.HostInForeground)) == null ? void 0 : n.values()) ?? [])
|
|
2973
1931
|
i();
|
|
2974
|
-
}), this.cloudId =
|
|
1932
|
+
}), this.cloudId = t.cloudId, this.host = t.host;
|
|
2975
1933
|
}),
|
|
2976
|
-
|
|
1934
|
+
R(() => {
|
|
2977
1935
|
})
|
|
2978
1936
|
)
|
|
2979
1937
|
);
|
|
2980
1938
|
}
|
|
2981
|
-
selectContacts(
|
|
1939
|
+
selectContacts(t, e, n) {
|
|
2982
1940
|
this.logger.debug("Selecting Contacts: ", ...arguments);
|
|
2983
1941
|
let i;
|
|
2984
|
-
if (
|
|
1942
|
+
if (e === "multi") {
|
|
2985
1943
|
if (!n)
|
|
2986
|
-
throw new
|
|
1944
|
+
throw new j(
|
|
2987
1945
|
"currentContacts",
|
|
2988
1946
|
n,
|
|
2989
1947
|
"currentContacts is required for group streams"
|
|
2990
1948
|
);
|
|
2991
|
-
i = this.helper.selectContacts(
|
|
1949
|
+
i = this.helper.selectContacts(t.toString(), "group", n);
|
|
2992
1950
|
} else
|
|
2993
|
-
i = this.helper.selectContacts(
|
|
2994
|
-
return
|
|
1951
|
+
i = this.helper.selectContacts(t.toString(), "direct");
|
|
1952
|
+
return O(i.pipe(R((o) => o.contacts)));
|
|
2995
1953
|
}
|
|
2996
1954
|
/**
|
|
2997
1955
|
* Matches batch of {@link ContactItem} objects against the Host's contact list to fetch detailed
|
|
@@ -3002,8 +1960,8 @@ class yo {
|
|
|
3002
1960
|
* @returns A collection of {@link DetailedContactItem} objects which were matched against the
|
|
3003
1961
|
* Host's contact list.
|
|
3004
1962
|
*/
|
|
3005
|
-
matchContacts(
|
|
3006
|
-
return this.logger.debug("Match Contacts: ",
|
|
1963
|
+
matchContacts(t) {
|
|
1964
|
+
return this.logger.debug("Match Contacts: ", t), O(this.helper.matchContacts(t).pipe(R((e) => e.contacts)));
|
|
3007
1965
|
}
|
|
3008
1966
|
/**
|
|
3009
1967
|
* Requests the `Host` app to provide the Push Token for the current device.
|
|
@@ -3011,15 +1969,15 @@ class yo {
|
|
|
3011
1969
|
* @returns A promise with the Push Token as `string`.
|
|
3012
1970
|
*/
|
|
3013
1971
|
requestPushToken() {
|
|
3014
|
-
return this.logger.debug("Requesting Push Token"),
|
|
1972
|
+
return this.logger.debug("Requesting Push Token"), O(this.helper.requestPushToken().pipe(R((t) => t.pushToken)));
|
|
3015
1973
|
}
|
|
3016
1974
|
/**
|
|
3017
1975
|
* Sends the current badge count to the `Host` app.
|
|
3018
1976
|
*
|
|
3019
1977
|
* @param count - The count to update the badge to.
|
|
3020
1978
|
*/
|
|
3021
|
-
badgeUpdate(
|
|
3022
|
-
this.logger.debug("Sending Badge Update: ",
|
|
1979
|
+
badgeUpdate(t) {
|
|
1980
|
+
this.logger.debug("Sending Badge Update: ", t), this.helper.sendBadgeUpdateMessage(t);
|
|
3023
1981
|
}
|
|
3024
1982
|
/**
|
|
3025
1983
|
* Registers a callback to be invoked when a {@link IPCEvents.BadgeQuery} is received.
|
|
@@ -3028,11 +1986,11 @@ class yo {
|
|
|
3028
1986
|
* is received.
|
|
3029
1987
|
* @returns An unsubscribe callback to remove the listener.
|
|
3030
1988
|
*/
|
|
3031
|
-
onBadgeQueryRequest(
|
|
3032
|
-
var
|
|
3033
|
-
return this.logger.debug("Registering for Badge Query"), (
|
|
1989
|
+
onBadgeQueryRequest(t) {
|
|
1990
|
+
var e;
|
|
1991
|
+
return this.logger.debug("Registering for Badge Query"), (e = this.listeners.get(C.BadgeQuery)) == null || e.add(t), () => {
|
|
3034
1992
|
var n;
|
|
3035
|
-
return (n = this.listeners.get(
|
|
1993
|
+
return (n = this.listeners.get(C.BadgeQuery)) == null ? void 0 : n.delete(t);
|
|
3036
1994
|
};
|
|
3037
1995
|
}
|
|
3038
1996
|
/**
|
|
@@ -3042,21 +2000,21 @@ class yo {
|
|
|
3042
2000
|
* event is received.
|
|
3043
2001
|
* @returns An unsubscribe callback to remove the listener.
|
|
3044
2002
|
*/
|
|
3045
|
-
onHostInForeground(
|
|
3046
|
-
var
|
|
3047
|
-
return this.logger.debug("Registering for Host In Foreground"), (
|
|
2003
|
+
onHostInForeground(t) {
|
|
2004
|
+
var e;
|
|
2005
|
+
return this.logger.debug("Registering for Host In Foreground"), (e = this.listeners.get(C.HostInForeground)) == null || e.add(t), () => {
|
|
3048
2006
|
var n;
|
|
3049
|
-
return (n = this.listeners.get(
|
|
2007
|
+
return (n = this.listeners.get(C.HostInForeground)) == null ? void 0 : n.delete(t);
|
|
3050
2008
|
};
|
|
3051
2009
|
}
|
|
3052
2010
|
}
|
|
3053
|
-
|
|
3054
|
-
if (
|
|
2011
|
+
P = new WeakSet(), te = function(t) {
|
|
2012
|
+
if (t === "user")
|
|
3055
2013
|
return "host";
|
|
3056
|
-
if (
|
|
2014
|
+
if (t === "guest")
|
|
3057
2015
|
return "standalone";
|
|
3058
2016
|
};
|
|
3059
2017
|
export {
|
|
3060
|
-
|
|
3061
|
-
|
|
2018
|
+
C as IPCEvents,
|
|
2019
|
+
Rt as IPCManager
|
|
3062
2020
|
};
|