@entropic-bond/firebase 1.13.21 → 1.13.23
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.
|
@@ -87,8 +87,8 @@ const ih = function(n) {
|
|
|
87
87
|
const t = e ? this.byteToCharMapWebSafe_ : this.byteToCharMap_, r = [];
|
|
88
88
|
for (let s = 0; s < n.length; s += 3) {
|
|
89
89
|
const i = n[s], a = s + 1 < n.length, c = a ? n[s + 1] : 0, l = s + 2 < n.length, d = l ? n[s + 2] : 0, f = i >> 2, m = (i & 3) << 4 | c >> 4;
|
|
90
|
-
let
|
|
91
|
-
l || (R = 64, a || (
|
|
90
|
+
let _ = (c & 15) << 2 | d >> 6, R = d & 63;
|
|
91
|
+
l || (R = 64, a || (_ = 64)), r.push(t[f], t[m], t[_], t[R]);
|
|
92
92
|
}
|
|
93
93
|
return r.join("");
|
|
94
94
|
},
|
|
@@ -140,12 +140,12 @@ const ih = function(n) {
|
|
|
140
140
|
const m = s < n.length ? t[n.charAt(s)] : 64;
|
|
141
141
|
if (++s, i == null || c == null || d == null || m == null)
|
|
142
142
|
throw new Wp();
|
|
143
|
-
const
|
|
144
|
-
if (r.push(
|
|
143
|
+
const _ = i << 2 | c >> 4;
|
|
144
|
+
if (r.push(_), d !== 64) {
|
|
145
145
|
const R = c << 4 & 240 | d >> 2;
|
|
146
146
|
if (r.push(R), m !== 64) {
|
|
147
|
-
const
|
|
148
|
-
r.push(
|
|
147
|
+
const S = d << 6 & 192 | m;
|
|
148
|
+
r.push(S);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
}
|
|
@@ -288,14 +288,14 @@ function hh(n, e) {
|
|
|
288
288
|
""
|
|
289
289
|
].join(".");
|
|
290
290
|
}
|
|
291
|
-
const
|
|
291
|
+
const Sr = {};
|
|
292
292
|
function Zp() {
|
|
293
293
|
const n = {
|
|
294
294
|
prod: [],
|
|
295
295
|
emulator: []
|
|
296
296
|
};
|
|
297
|
-
for (const e of Object.keys(
|
|
298
|
-
|
|
297
|
+
for (const e of Object.keys(Sr))
|
|
298
|
+
Sr[e] ? n.emulator.push(e) : n.prod.push(e);
|
|
299
299
|
return n;
|
|
300
300
|
}
|
|
301
301
|
function em(n) {
|
|
@@ -304,42 +304,42 @@ function em(n) {
|
|
|
304
304
|
}
|
|
305
305
|
let hu = !1;
|
|
306
306
|
function pi(n, e) {
|
|
307
|
-
if (typeof window > "u" || typeof document > "u" || !ft(window.location.host) ||
|
|
307
|
+
if (typeof window > "u" || typeof document > "u" || !ft(window.location.host) || Sr[n] === e || Sr[n] || // If already set to use emulator, can't go back to prod.
|
|
308
308
|
hu)
|
|
309
309
|
return;
|
|
310
|
-
|
|
311
|
-
function t(
|
|
312
|
-
return `__firebase__banner__${
|
|
310
|
+
Sr[n] = e;
|
|
311
|
+
function t(_) {
|
|
312
|
+
return `__firebase__banner__${_}`;
|
|
313
313
|
}
|
|
314
314
|
const r = "__firebase__banner", i = Zp().prod.length > 0;
|
|
315
315
|
function a() {
|
|
316
|
-
const
|
|
317
|
-
|
|
316
|
+
const _ = document.getElementById(r);
|
|
317
|
+
_ && _.remove();
|
|
318
318
|
}
|
|
319
|
-
function c(
|
|
320
|
-
|
|
319
|
+
function c(_) {
|
|
320
|
+
_.style.display = "flex", _.style.background = "#7faaf0", _.style.position = "fixed", _.style.bottom = "5px", _.style.left = "5px", _.style.padding = ".5em", _.style.borderRadius = "5px", _.style.alignItems = "center";
|
|
321
321
|
}
|
|
322
|
-
function l(
|
|
323
|
-
|
|
322
|
+
function l(_, R) {
|
|
323
|
+
_.setAttribute("width", "24"), _.setAttribute("id", R), _.setAttribute("height", "24"), _.setAttribute("viewBox", "0 0 24 24"), _.setAttribute("fill", "none"), _.style.marginLeft = "-6px";
|
|
324
324
|
}
|
|
325
325
|
function d() {
|
|
326
|
-
const
|
|
327
|
-
return
|
|
326
|
+
const _ = document.createElement("span");
|
|
327
|
+
return _.style.cursor = "pointer", _.style.marginLeft = "16px", _.style.fontSize = "24px", _.innerHTML = " ×", _.onclick = () => {
|
|
328
328
|
hu = !0, a();
|
|
329
|
-
},
|
|
329
|
+
}, _;
|
|
330
330
|
}
|
|
331
|
-
function f(
|
|
332
|
-
|
|
331
|
+
function f(_, R) {
|
|
332
|
+
_.setAttribute("id", R), _.innerText = "Learn more", _.href = "https://firebase.google.com/docs/studio/preview-apps#preview-backend", _.setAttribute("target", "__blank"), _.style.paddingLeft = "5px", _.style.textDecoration = "underline";
|
|
333
333
|
}
|
|
334
334
|
function m() {
|
|
335
|
-
const
|
|
336
|
-
if (
|
|
337
|
-
const j =
|
|
335
|
+
const _ = em(r), R = t("text"), S = document.getElementById(R) || document.createElement("span"), N = t("learnmore"), k = document.getElementById(N) || document.createElement("a"), U = t("preprendIcon"), $ = document.getElementById(U) || document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
336
|
+
if (_.created) {
|
|
337
|
+
const j = _.element;
|
|
338
338
|
c(j), f(k, N);
|
|
339
|
-
const
|
|
340
|
-
l($, U), j.append($,
|
|
339
|
+
const K = d();
|
|
340
|
+
l($, U), j.append($, S, k, K), document.body.appendChild(j);
|
|
341
341
|
}
|
|
342
|
-
i ? (
|
|
342
|
+
i ? (S.innerText = "Preview backend disconnected.", $.innerHTML = `<g clip-path="url(#clip0_6013_33858)">
|
|
343
343
|
<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/>
|
|
344
344
|
</g>
|
|
345
345
|
<defs>
|
|
@@ -353,17 +353,17 @@ function pi(n, e) {
|
|
|
353
353
|
<clipPath id="clip0_6083_34804">
|
|
354
354
|
<rect width="24" height="24" fill="white"/>
|
|
355
355
|
</clipPath>
|
|
356
|
-
</defs>`,
|
|
356
|
+
</defs>`, S.innerText = "Preview backend running in this workspace."), S.setAttribute("id", R);
|
|
357
357
|
}
|
|
358
358
|
document.readyState === "loading" ? window.addEventListener("DOMContentLoaded", m) : m();
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Ce() {
|
|
361
361
|
return typeof navigator < "u" && typeof navigator.userAgent == "string" ? navigator.userAgent : "";
|
|
362
362
|
}
|
|
363
363
|
function tm() {
|
|
364
364
|
return typeof window < "u" && // @ts-ignore Setting up an broadly applicable index signature for Window
|
|
365
365
|
// just to deal with this case would probably be a bad idea.
|
|
366
|
-
!!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(
|
|
366
|
+
!!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Ce());
|
|
367
367
|
}
|
|
368
368
|
function nm() {
|
|
369
369
|
const n = di()?.forceEnvironment;
|
|
@@ -388,7 +388,7 @@ function im() {
|
|
|
388
388
|
return typeof navigator == "object" && navigator.product === "ReactNative";
|
|
389
389
|
}
|
|
390
390
|
function om() {
|
|
391
|
-
const n =
|
|
391
|
+
const n = Ce();
|
|
392
392
|
return n.indexOf("MSIE ") >= 0 || n.indexOf("Trident/") >= 0;
|
|
393
393
|
}
|
|
394
394
|
function am() {
|
|
@@ -914,7 +914,7 @@ function Pm() {
|
|
|
914
914
|
]);
|
|
915
915
|
}
|
|
916
916
|
const dh = /* @__PURE__ */ new WeakMap(), Do = /* @__PURE__ */ new WeakMap(), fh = /* @__PURE__ */ new WeakMap(), ho = /* @__PURE__ */ new WeakMap(), oa = /* @__PURE__ */ new WeakMap();
|
|
917
|
-
function
|
|
917
|
+
function Cm(n) {
|
|
918
918
|
const e = new Promise((t, r) => {
|
|
919
919
|
const s = () => {
|
|
920
920
|
n.removeEventListener("success", i), n.removeEventListener("error", a);
|
|
@@ -930,7 +930,7 @@ function Sm(n) {
|
|
|
930
930
|
}).catch(() => {
|
|
931
931
|
}), oa.set(e, n), e;
|
|
932
932
|
}
|
|
933
|
-
function
|
|
933
|
+
function Sm(n) {
|
|
934
934
|
if (Do.has(n))
|
|
935
935
|
return;
|
|
936
936
|
const e = new Promise((t, r) => {
|
|
@@ -978,11 +978,11 @@ function Nm(n) {
|
|
|
978
978
|
};
|
|
979
979
|
}
|
|
980
980
|
function Dm(n) {
|
|
981
|
-
return typeof n == "function" ? Nm(n) : (n instanceof IDBTransaction &&
|
|
981
|
+
return typeof n == "function" ? Nm(n) : (n instanceof IDBTransaction && Sm(n), Rm(n, bm()) ? new Proxy(n, Oo) : n);
|
|
982
982
|
}
|
|
983
983
|
function Ut(n) {
|
|
984
984
|
if (n instanceof IDBRequest)
|
|
985
|
-
return
|
|
985
|
+
return Cm(n);
|
|
986
986
|
if (ho.has(n))
|
|
987
987
|
return ho.get(n);
|
|
988
988
|
const e = Dm(n);
|
|
@@ -1049,8 +1049,8 @@ class Mm {
|
|
|
1049
1049
|
function xm(n) {
|
|
1050
1050
|
return n.getComponent()?.type === "VERSION";
|
|
1051
1051
|
}
|
|
1052
|
-
const Vo = "@firebase/app", gu = "0.14.
|
|
1053
|
-
const Tt = new ia("@firebase/app"), Um = "@firebase/app-compat", Fm = "@firebase/analytics-compat", Bm = "@firebase/analytics", qm = "@firebase/app-check-compat", jm = "@firebase/app-check", $m = "@firebase/auth", zm = "@firebase/auth-compat", Hm = "@firebase/database", Wm = "@firebase/data-connect", Gm = "@firebase/database-compat", Km = "@firebase/functions", Qm = "@firebase/functions-compat", Ym = "@firebase/installations", Jm = "@firebase/installations-compat", Xm = "@firebase/messaging", Zm = "@firebase/messaging-compat", eg = "@firebase/performance", tg = "@firebase/performance-compat", ng = "@firebase/remote-config", rg = "@firebase/remote-config-compat", sg = "@firebase/storage", ig = "@firebase/storage-compat", og = "@firebase/firestore", ag = "@firebase/ai", cg = "@firebase/firestore-compat", ug = "firebase", lg = "12.
|
|
1052
|
+
const Vo = "@firebase/app", gu = "0.14.9";
|
|
1053
|
+
const Tt = new ia("@firebase/app"), Um = "@firebase/app-compat", Fm = "@firebase/analytics-compat", Bm = "@firebase/analytics", qm = "@firebase/app-check-compat", jm = "@firebase/app-check", $m = "@firebase/auth", zm = "@firebase/auth-compat", Hm = "@firebase/database", Wm = "@firebase/data-connect", Gm = "@firebase/database-compat", Km = "@firebase/functions", Qm = "@firebase/functions-compat", Ym = "@firebase/installations", Jm = "@firebase/installations-compat", Xm = "@firebase/messaging", Zm = "@firebase/messaging-compat", eg = "@firebase/performance", tg = "@firebase/performance-compat", ng = "@firebase/remote-config", rg = "@firebase/remote-config-compat", sg = "@firebase/storage", ig = "@firebase/storage-compat", og = "@firebase/firestore", ag = "@firebase/ai", cg = "@firebase/firestore-compat", ug = "firebase", lg = "12.10.0";
|
|
1054
1054
|
const Lo = "[DEFAULT]", hg = {
|
|
1055
1055
|
[Vo]: "fire-core",
|
|
1056
1056
|
[Um]: "fire-core-compat",
|
|
@@ -1166,7 +1166,7 @@ class pg {
|
|
|
1166
1166
|
throw Ft.create("app-deleted", { appName: this._name });
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
const
|
|
1169
|
+
const Tn = lg;
|
|
1170
1170
|
function ph(n, e = {}) {
|
|
1171
1171
|
let t = n;
|
|
1172
1172
|
typeof e != "object" && (e = { name: e });
|
|
@@ -1423,12 +1423,12 @@ var wu = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
1423
1423
|
var Bt, _h;
|
|
1424
1424
|
(function() {
|
|
1425
1425
|
var n;
|
|
1426
|
-
function e(w,
|
|
1426
|
+
function e(w, g) {
|
|
1427
1427
|
function E() {
|
|
1428
1428
|
}
|
|
1429
|
-
E.prototype =
|
|
1429
|
+
E.prototype = g.prototype, w.F = g.prototype, w.prototype = new E(), w.prototype.constructor = w, w.D = function(I, T, A) {
|
|
1430
1430
|
for (var y = Array(arguments.length - 2), Oe = 2; Oe < arguments.length; Oe++) y[Oe - 2] = arguments[Oe];
|
|
1431
|
-
return
|
|
1431
|
+
return g.prototype[T].apply(I, y);
|
|
1432
1432
|
};
|
|
1433
1433
|
}
|
|
1434
1434
|
function t() {
|
|
@@ -1440,208 +1440,208 @@ var Bt, _h;
|
|
|
1440
1440
|
e(r, t), r.prototype.u = function() {
|
|
1441
1441
|
this.g[0] = 1732584193, this.g[1] = 4023233417, this.g[2] = 2562383102, this.g[3] = 271733878, this.o = this.h = 0;
|
|
1442
1442
|
};
|
|
1443
|
-
function s(w,
|
|
1443
|
+
function s(w, g, E) {
|
|
1444
1444
|
E || (E = 0);
|
|
1445
1445
|
const I = Array(16);
|
|
1446
|
-
if (typeof
|
|
1447
|
-
else for (T = 0; T < 16; ++T) I[T] =
|
|
1448
|
-
|
|
1446
|
+
if (typeof g == "string") for (var T = 0; T < 16; ++T) I[T] = g.charCodeAt(E++) | g.charCodeAt(E++) << 8 | g.charCodeAt(E++) << 16 | g.charCodeAt(E++) << 24;
|
|
1447
|
+
else for (T = 0; T < 16; ++T) I[T] = g[E++] | g[E++] << 8 | g[E++] << 16 | g[E++] << 24;
|
|
1448
|
+
g = w.g[0], E = w.g[1], T = w.g[2];
|
|
1449
1449
|
let A = w.g[3], y;
|
|
1450
|
-
y =
|
|
1450
|
+
y = g + (A ^ E & (T ^ A)) + I[0] + 3614090360 & 4294967295, g = E + (y << 7 & 4294967295 | y >>> 25), y = A + (T ^ g & (E ^ T)) + I[1] + 3905402710 & 4294967295, A = g + (y << 12 & 4294967295 | y >>> 20), y = T + (E ^ A & (g ^ E)) + I[2] + 606105819 & 4294967295, T = A + (y << 17 & 4294967295 | y >>> 15), y = E + (g ^ T & (A ^ g)) + I[3] + 3250441966 & 4294967295, E = T + (y << 22 & 4294967295 | y >>> 10), y = g + (A ^ E & (T ^ A)) + I[4] + 4118548399 & 4294967295, g = E + (y << 7 & 4294967295 | y >>> 25), y = A + (T ^ g & (E ^ T)) + I[5] + 1200080426 & 4294967295, A = g + (y << 12 & 4294967295 | y >>> 20), y = T + (E ^ A & (g ^ E)) + I[6] + 2821735955 & 4294967295, T = A + (y << 17 & 4294967295 | y >>> 15), y = E + (g ^ T & (A ^ g)) + I[7] + 4249261313 & 4294967295, E = T + (y << 22 & 4294967295 | y >>> 10), y = g + (A ^ E & (T ^ A)) + I[8] + 1770035416 & 4294967295, g = E + (y << 7 & 4294967295 | y >>> 25), y = A + (T ^ g & (E ^ T)) + I[9] + 2336552879 & 4294967295, A = g + (y << 12 & 4294967295 | y >>> 20), y = T + (E ^ A & (g ^ E)) + I[10] + 4294925233 & 4294967295, T = A + (y << 17 & 4294967295 | y >>> 15), y = E + (g ^ T & (A ^ g)) + I[11] + 2304563134 & 4294967295, E = T + (y << 22 & 4294967295 | y >>> 10), y = g + (A ^ E & (T ^ A)) + I[12] + 1804603682 & 4294967295, g = E + (y << 7 & 4294967295 | y >>> 25), y = A + (T ^ g & (E ^ T)) + I[13] + 4254626195 & 4294967295, A = g + (y << 12 & 4294967295 | y >>> 20), y = T + (E ^ A & (g ^ E)) + I[14] + 2792965006 & 4294967295, T = A + (y << 17 & 4294967295 | y >>> 15), y = E + (g ^ T & (A ^ g)) + I[15] + 1236535329 & 4294967295, E = T + (y << 22 & 4294967295 | y >>> 10), y = g + (T ^ A & (E ^ T)) + I[1] + 4129170786 & 4294967295, g = E + (y << 5 & 4294967295 | y >>> 27), y = A + (E ^ T & (g ^ E)) + I[6] + 3225465664 & 4294967295, A = g + (y << 9 & 4294967295 | y >>> 23), y = T + (g ^ E & (A ^ g)) + I[11] + 643717713 & 4294967295, T = A + (y << 14 & 4294967295 | y >>> 18), y = E + (A ^ g & (T ^ A)) + I[0] + 3921069994 & 4294967295, E = T + (y << 20 & 4294967295 | y >>> 12), y = g + (T ^ A & (E ^ T)) + I[5] + 3593408605 & 4294967295, g = E + (y << 5 & 4294967295 | y >>> 27), y = A + (E ^ T & (g ^ E)) + I[10] + 38016083 & 4294967295, A = g + (y << 9 & 4294967295 | y >>> 23), y = T + (g ^ E & (A ^ g)) + I[15] + 3634488961 & 4294967295, T = A + (y << 14 & 4294967295 | y >>> 18), y = E + (A ^ g & (T ^ A)) + I[4] + 3889429448 & 4294967295, E = T + (y << 20 & 4294967295 | y >>> 12), y = g + (T ^ A & (E ^ T)) + I[9] + 568446438 & 4294967295, g = E + (y << 5 & 4294967295 | y >>> 27), y = A + (E ^ T & (g ^ E)) + I[14] + 3275163606 & 4294967295, A = g + (y << 9 & 4294967295 | y >>> 23), y = T + (g ^ E & (A ^ g)) + I[3] + 4107603335 & 4294967295, T = A + (y << 14 & 4294967295 | y >>> 18), y = E + (A ^ g & (T ^ A)) + I[8] + 1163531501 & 4294967295, E = T + (y << 20 & 4294967295 | y >>> 12), y = g + (T ^ A & (E ^ T)) + I[13] + 2850285829 & 4294967295, g = E + (y << 5 & 4294967295 | y >>> 27), y = A + (E ^ T & (g ^ E)) + I[2] + 4243563512 & 4294967295, A = g + (y << 9 & 4294967295 | y >>> 23), y = T + (g ^ E & (A ^ g)) + I[7] + 1735328473 & 4294967295, T = A + (y << 14 & 4294967295 | y >>> 18), y = E + (A ^ g & (T ^ A)) + I[12] + 2368359562 & 4294967295, E = T + (y << 20 & 4294967295 | y >>> 12), y = g + (E ^ T ^ A) + I[5] + 4294588738 & 4294967295, g = E + (y << 4 & 4294967295 | y >>> 28), y = A + (g ^ E ^ T) + I[8] + 2272392833 & 4294967295, A = g + (y << 11 & 4294967295 | y >>> 21), y = T + (A ^ g ^ E) + I[11] + 1839030562 & 4294967295, T = A + (y << 16 & 4294967295 | y >>> 16), y = E + (T ^ A ^ g) + I[14] + 4259657740 & 4294967295, E = T + (y << 23 & 4294967295 | y >>> 9), y = g + (E ^ T ^ A) + I[1] + 2763975236 & 4294967295, g = E + (y << 4 & 4294967295 | y >>> 28), y = A + (g ^ E ^ T) + I[4] + 1272893353 & 4294967295, A = g + (y << 11 & 4294967295 | y >>> 21), y = T + (A ^ g ^ E) + I[7] + 4139469664 & 4294967295, T = A + (y << 16 & 4294967295 | y >>> 16), y = E + (T ^ A ^ g) + I[10] + 3200236656 & 4294967295, E = T + (y << 23 & 4294967295 | y >>> 9), y = g + (E ^ T ^ A) + I[13] + 681279174 & 4294967295, g = E + (y << 4 & 4294967295 | y >>> 28), y = A + (g ^ E ^ T) + I[0] + 3936430074 & 4294967295, A = g + (y << 11 & 4294967295 | y >>> 21), y = T + (A ^ g ^ E) + I[3] + 3572445317 & 4294967295, T = A + (y << 16 & 4294967295 | y >>> 16), y = E + (T ^ A ^ g) + I[6] + 76029189 & 4294967295, E = T + (y << 23 & 4294967295 | y >>> 9), y = g + (E ^ T ^ A) + I[9] + 3654602809 & 4294967295, g = E + (y << 4 & 4294967295 | y >>> 28), y = A + (g ^ E ^ T) + I[12] + 3873151461 & 4294967295, A = g + (y << 11 & 4294967295 | y >>> 21), y = T + (A ^ g ^ E) + I[15] + 530742520 & 4294967295, T = A + (y << 16 & 4294967295 | y >>> 16), y = E + (T ^ A ^ g) + I[2] + 3299628645 & 4294967295, E = T + (y << 23 & 4294967295 | y >>> 9), y = g + (T ^ (E | ~A)) + I[0] + 4096336452 & 4294967295, g = E + (y << 6 & 4294967295 | y >>> 26), y = A + (E ^ (g | ~T)) + I[7] + 1126891415 & 4294967295, A = g + (y << 10 & 4294967295 | y >>> 22), y = T + (g ^ (A | ~E)) + I[14] + 2878612391 & 4294967295, T = A + (y << 15 & 4294967295 | y >>> 17), y = E + (A ^ (T | ~g)) + I[5] + 4237533241 & 4294967295, E = T + (y << 21 & 4294967295 | y >>> 11), y = g + (T ^ (E | ~A)) + I[12] + 1700485571 & 4294967295, g = E + (y << 6 & 4294967295 | y >>> 26), y = A + (E ^ (g | ~T)) + I[3] + 2399980690 & 4294967295, A = g + (y << 10 & 4294967295 | y >>> 22), y = T + (g ^ (A | ~E)) + I[10] + 4293915773 & 4294967295, T = A + (y << 15 & 4294967295 | y >>> 17), y = E + (A ^ (T | ~g)) + I[1] + 2240044497 & 4294967295, E = T + (y << 21 & 4294967295 | y >>> 11), y = g + (T ^ (E | ~A)) + I[8] + 1873313359 & 4294967295, g = E + (y << 6 & 4294967295 | y >>> 26), y = A + (E ^ (g | ~T)) + I[15] + 4264355552 & 4294967295, A = g + (y << 10 & 4294967295 | y >>> 22), y = T + (g ^ (A | ~E)) + I[6] + 2734768916 & 4294967295, T = A + (y << 15 & 4294967295 | y >>> 17), y = E + (A ^ (T | ~g)) + I[13] + 1309151649 & 4294967295, E = T + (y << 21 & 4294967295 | y >>> 11), y = g + (T ^ (E | ~A)) + I[4] + 4149444226 & 4294967295, g = E + (y << 6 & 4294967295 | y >>> 26), y = A + (E ^ (g | ~T)) + I[11] + 3174756917 & 4294967295, A = g + (y << 10 & 4294967295 | y >>> 22), y = T + (g ^ (A | ~E)) + I[2] + 718787259 & 4294967295, T = A + (y << 15 & 4294967295 | y >>> 17), y = E + (A ^ (T | ~g)) + I[9] + 3951481745 & 4294967295, w.g[0] = w.g[0] + g & 4294967295, w.g[1] = w.g[1] + (T + (y << 21 & 4294967295 | y >>> 11)) & 4294967295, w.g[2] = w.g[2] + T & 4294967295, w.g[3] = w.g[3] + A & 4294967295;
|
|
1451
1451
|
}
|
|
1452
|
-
r.prototype.v = function(w,
|
|
1453
|
-
|
|
1454
|
-
const E =
|
|
1452
|
+
r.prototype.v = function(w, g) {
|
|
1453
|
+
g === void 0 && (g = w.length);
|
|
1454
|
+
const E = g - this.blockSize, I = this.C;
|
|
1455
1455
|
let T = this.h, A = 0;
|
|
1456
|
-
for (; A <
|
|
1456
|
+
for (; A < g; ) {
|
|
1457
1457
|
if (T == 0) for (; A <= E; ) s(this, w, A), A += this.blockSize;
|
|
1458
1458
|
if (typeof w == "string") {
|
|
1459
|
-
for (; A <
|
|
1459
|
+
for (; A < g; )
|
|
1460
1460
|
if (I[T++] = w.charCodeAt(A++), T == this.blockSize) {
|
|
1461
1461
|
s(this, I), T = 0;
|
|
1462
1462
|
break;
|
|
1463
1463
|
}
|
|
1464
|
-
} else for (; A <
|
|
1464
|
+
} else for (; A < g; ) if (I[T++] = w[A++], T == this.blockSize) {
|
|
1465
1465
|
s(this, I), T = 0;
|
|
1466
1466
|
break;
|
|
1467
1467
|
}
|
|
1468
1468
|
}
|
|
1469
|
-
this.h = T, this.o +=
|
|
1469
|
+
this.h = T, this.o += g;
|
|
1470
1470
|
}, r.prototype.A = function() {
|
|
1471
1471
|
var w = Array((this.h < 56 ? this.blockSize : this.blockSize * 2) - this.h);
|
|
1472
1472
|
w[0] = 128;
|
|
1473
|
-
for (var
|
|
1474
|
-
|
|
1475
|
-
for (var E = w.length - 8; E < w.length; ++E) w[E] =
|
|
1476
|
-
for (this.v(w), w = Array(16),
|
|
1473
|
+
for (var g = 1; g < w.length - 8; ++g) w[g] = 0;
|
|
1474
|
+
g = this.o * 8;
|
|
1475
|
+
for (var E = w.length - 8; E < w.length; ++E) w[E] = g & 255, g /= 256;
|
|
1476
|
+
for (this.v(w), w = Array(16), g = 0, E = 0; E < 4; ++E) for (let I = 0; I < 32; I += 8) w[g++] = this.g[E] >>> I & 255;
|
|
1477
1477
|
return w;
|
|
1478
1478
|
};
|
|
1479
|
-
function i(w,
|
|
1479
|
+
function i(w, g) {
|
|
1480
1480
|
var E = c;
|
|
1481
|
-
return Object.prototype.hasOwnProperty.call(E, w) ? E[w] : E[w] =
|
|
1481
|
+
return Object.prototype.hasOwnProperty.call(E, w) ? E[w] : E[w] = g(w);
|
|
1482
1482
|
}
|
|
1483
|
-
function a(w,
|
|
1484
|
-
this.h =
|
|
1483
|
+
function a(w, g) {
|
|
1484
|
+
this.h = g;
|
|
1485
1485
|
const E = [];
|
|
1486
1486
|
let I = !0;
|
|
1487
1487
|
for (let T = w.length - 1; T >= 0; T--) {
|
|
1488
1488
|
const A = w[T] | 0;
|
|
1489
|
-
I && A ==
|
|
1489
|
+
I && A == g || (E[T] = A, I = !1);
|
|
1490
1490
|
}
|
|
1491
1491
|
this.g = E;
|
|
1492
1492
|
}
|
|
1493
1493
|
var c = {};
|
|
1494
1494
|
function l(w) {
|
|
1495
|
-
return -128 <= w && w < 128 ? i(w, function(
|
|
1496
|
-
return new a([
|
|
1495
|
+
return -128 <= w && w < 128 ? i(w, function(g) {
|
|
1496
|
+
return new a([g | 0], g < 0 ? -1 : 0);
|
|
1497
1497
|
}) : new a([w | 0], w < 0 ? -1 : 0);
|
|
1498
1498
|
}
|
|
1499
1499
|
function d(w) {
|
|
1500
1500
|
if (isNaN(w) || !isFinite(w)) return m;
|
|
1501
1501
|
if (w < 0) return k(d(-w));
|
|
1502
|
-
const
|
|
1502
|
+
const g = [];
|
|
1503
1503
|
let E = 1;
|
|
1504
|
-
for (let I = 0; w >= E; I++)
|
|
1505
|
-
return new a(
|
|
1504
|
+
for (let I = 0; w >= E; I++) g[I] = w / E | 0, E *= 4294967296;
|
|
1505
|
+
return new a(g, 0);
|
|
1506
1506
|
}
|
|
1507
|
-
function f(w,
|
|
1507
|
+
function f(w, g) {
|
|
1508
1508
|
if (w.length == 0) throw Error("number format error: empty string");
|
|
1509
|
-
if (
|
|
1510
|
-
if (w.charAt(0) == "-") return k(f(w.substring(1),
|
|
1509
|
+
if (g = g || 10, g < 2 || 36 < g) throw Error("radix out of range: " + g);
|
|
1510
|
+
if (w.charAt(0) == "-") return k(f(w.substring(1), g));
|
|
1511
1511
|
if (w.indexOf("-") >= 0) throw Error('number format error: interior "-" character');
|
|
1512
|
-
const E = d(Math.pow(
|
|
1512
|
+
const E = d(Math.pow(g, 8));
|
|
1513
1513
|
let I = m;
|
|
1514
1514
|
for (let A = 0; A < w.length; A += 8) {
|
|
1515
1515
|
var T = Math.min(8, w.length - A);
|
|
1516
|
-
const y = parseInt(w.substring(A, A + T),
|
|
1517
|
-
T < 8 ? (T = d(Math.pow(
|
|
1516
|
+
const y = parseInt(w.substring(A, A + T), g);
|
|
1517
|
+
T < 8 ? (T = d(Math.pow(g, T)), I = I.j(T).add(d(y))) : (I = I.j(E), I = I.add(d(y)));
|
|
1518
1518
|
}
|
|
1519
1519
|
return I;
|
|
1520
1520
|
}
|
|
1521
|
-
var m = l(0),
|
|
1521
|
+
var m = l(0), _ = l(1), R = l(16777216);
|
|
1522
1522
|
n = a.prototype, n.m = function() {
|
|
1523
1523
|
if (N(this)) return -k(this).m();
|
|
1524
|
-
let w = 0,
|
|
1524
|
+
let w = 0, g = 1;
|
|
1525
1525
|
for (let E = 0; E < this.g.length; E++) {
|
|
1526
1526
|
const I = this.i(E);
|
|
1527
|
-
w += (I >= 0 ? I : 4294967296 + I) *
|
|
1527
|
+
w += (I >= 0 ? I : 4294967296 + I) * g, g *= 4294967296;
|
|
1528
1528
|
}
|
|
1529
1529
|
return w;
|
|
1530
1530
|
}, n.toString = function(w) {
|
|
1531
1531
|
if (w = w || 10, w < 2 || 36 < w) throw Error("radix out of range: " + w);
|
|
1532
|
-
if (
|
|
1532
|
+
if (S(this)) return "0";
|
|
1533
1533
|
if (N(this)) return "-" + k(this).toString(w);
|
|
1534
|
-
const
|
|
1534
|
+
const g = d(Math.pow(w, 6));
|
|
1535
1535
|
var E = this;
|
|
1536
1536
|
let I = "";
|
|
1537
1537
|
for (; ; ) {
|
|
1538
|
-
const T =
|
|
1539
|
-
E = U(E, T.j(
|
|
1538
|
+
const T = K(E, g).g;
|
|
1539
|
+
E = U(E, T.j(g));
|
|
1540
1540
|
let A = ((E.g.length > 0 ? E.g[0] : E.h) >>> 0).toString(w);
|
|
1541
|
-
if (E = T,
|
|
1541
|
+
if (E = T, S(E)) return A + I;
|
|
1542
1542
|
for (; A.length < 6; ) A = "0" + A;
|
|
1543
1543
|
I = A + I;
|
|
1544
1544
|
}
|
|
1545
1545
|
}, n.i = function(w) {
|
|
1546
1546
|
return w < 0 ? 0 : w < this.g.length ? this.g[w] : this.h;
|
|
1547
1547
|
};
|
|
1548
|
-
function
|
|
1548
|
+
function S(w) {
|
|
1549
1549
|
if (w.h != 0) return !1;
|
|
1550
|
-
for (let
|
|
1550
|
+
for (let g = 0; g < w.g.length; g++) if (w.g[g] != 0) return !1;
|
|
1551
1551
|
return !0;
|
|
1552
1552
|
}
|
|
1553
1553
|
function N(w) {
|
|
1554
1554
|
return w.h == -1;
|
|
1555
1555
|
}
|
|
1556
1556
|
n.l = function(w) {
|
|
1557
|
-
return w = U(this, w), N(w) ? -1 :
|
|
1557
|
+
return w = U(this, w), N(w) ? -1 : S(w) ? 0 : 1;
|
|
1558
1558
|
};
|
|
1559
1559
|
function k(w) {
|
|
1560
|
-
const
|
|
1561
|
-
for (let I = 0; I <
|
|
1562
|
-
return new a(E, ~w.h).add(
|
|
1560
|
+
const g = w.g.length, E = [];
|
|
1561
|
+
for (let I = 0; I < g; I++) E[I] = ~w.g[I];
|
|
1562
|
+
return new a(E, ~w.h).add(_);
|
|
1563
1563
|
}
|
|
1564
1564
|
n.abs = function() {
|
|
1565
1565
|
return N(this) ? k(this) : this;
|
|
1566
1566
|
}, n.add = function(w) {
|
|
1567
|
-
const
|
|
1567
|
+
const g = Math.max(this.g.length, w.g.length), E = [];
|
|
1568
1568
|
let I = 0;
|
|
1569
|
-
for (let T = 0; T <=
|
|
1569
|
+
for (let T = 0; T <= g; T++) {
|
|
1570
1570
|
let A = I + (this.i(T) & 65535) + (w.i(T) & 65535), y = (A >>> 16) + (this.i(T) >>> 16) + (w.i(T) >>> 16);
|
|
1571
1571
|
I = y >>> 16, A &= 65535, y &= 65535, E[T] = y << 16 | A;
|
|
1572
1572
|
}
|
|
1573
1573
|
return new a(E, E[E.length - 1] & -2147483648 ? -1 : 0);
|
|
1574
1574
|
};
|
|
1575
|
-
function U(w,
|
|
1576
|
-
return w.add(k(
|
|
1575
|
+
function U(w, g) {
|
|
1576
|
+
return w.add(k(g));
|
|
1577
1577
|
}
|
|
1578
1578
|
n.j = function(w) {
|
|
1579
|
-
if (
|
|
1579
|
+
if (S(this) || S(w)) return m;
|
|
1580
1580
|
if (N(this)) return N(w) ? k(this).j(k(w)) : k(k(this).j(w));
|
|
1581
1581
|
if (N(w)) return k(this.j(k(w)));
|
|
1582
1582
|
if (this.l(R) < 0 && w.l(R) < 0) return d(this.m() * w.m());
|
|
1583
|
-
const
|
|
1584
|
-
for (var I = 0; I < 2 *
|
|
1583
|
+
const g = this.g.length + w.g.length, E = [];
|
|
1584
|
+
for (var I = 0; I < 2 * g; I++) E[I] = 0;
|
|
1585
1585
|
for (I = 0; I < this.g.length; I++) for (let T = 0; T < w.g.length; T++) {
|
|
1586
1586
|
const A = this.i(I) >>> 16, y = this.i(I) & 65535, Oe = w.i(T) >>> 16, Zt = w.i(T) & 65535;
|
|
1587
1587
|
E[2 * I + 2 * T] += y * Zt, $(E, 2 * I + 2 * T), E[2 * I + 2 * T + 1] += A * Zt, $(E, 2 * I + 2 * T + 1), E[2 * I + 2 * T + 1] += y * Oe, $(E, 2 * I + 2 * T + 1), E[2 * I + 2 * T + 2] += A * Oe, $(E, 2 * I + 2 * T + 2);
|
|
1588
1588
|
}
|
|
1589
|
-
for (w = 0; w <
|
|
1590
|
-
for (w =
|
|
1589
|
+
for (w = 0; w < g; w++) E[w] = E[2 * w + 1] << 16 | E[2 * w];
|
|
1590
|
+
for (w = g; w < 2 * g; w++) E[w] = 0;
|
|
1591
1591
|
return new a(E, 0);
|
|
1592
1592
|
};
|
|
1593
|
-
function $(w,
|
|
1594
|
-
for (; (w[
|
|
1593
|
+
function $(w, g) {
|
|
1594
|
+
for (; (w[g] & 65535) != w[g]; ) w[g + 1] += w[g] >>> 16, w[g] &= 65535, g++;
|
|
1595
1595
|
}
|
|
1596
|
-
function j(w,
|
|
1597
|
-
this.g = w, this.h =
|
|
1596
|
+
function j(w, g) {
|
|
1597
|
+
this.g = w, this.h = g;
|
|
1598
1598
|
}
|
|
1599
|
-
function
|
|
1600
|
-
if (
|
|
1601
|
-
if (
|
|
1602
|
-
if (N(w)) return
|
|
1603
|
-
if (N(
|
|
1599
|
+
function K(w, g) {
|
|
1600
|
+
if (S(g)) throw Error("division by zero");
|
|
1601
|
+
if (S(w)) return new j(m, m);
|
|
1602
|
+
if (N(w)) return g = K(k(w), g), new j(k(g.g), k(g.h));
|
|
1603
|
+
if (N(g)) return g = K(w, k(g)), new j(k(g.g), g.h);
|
|
1604
1604
|
if (w.g.length > 30) {
|
|
1605
|
-
if (N(w) || N(
|
|
1606
|
-
for (var E =
|
|
1605
|
+
if (N(w) || N(g)) throw Error("slowDivide_ only works with positive integers.");
|
|
1606
|
+
for (var E = _, I = g; I.l(w) <= 0; ) E = ge(E), I = ge(I);
|
|
1607
1607
|
var T = re(E, 1), A = re(I, 1);
|
|
1608
|
-
for (I = re(I, 2), E = re(E, 2); !
|
|
1608
|
+
for (I = re(I, 2), E = re(E, 2); !S(I); ) {
|
|
1609
1609
|
var y = A.add(I);
|
|
1610
1610
|
y.l(w) <= 0 && (T = T.add(E), A = y), I = re(I, 1), E = re(E, 1);
|
|
1611
1611
|
}
|
|
1612
|
-
return
|
|
1612
|
+
return g = U(w, T.j(g)), new j(T, g);
|
|
1613
1613
|
}
|
|
1614
|
-
for (T = m; w.l(
|
|
1615
|
-
for (E = Math.max(1, Math.floor(w.m() /
|
|
1616
|
-
|
|
1614
|
+
for (T = m; w.l(g) >= 0; ) {
|
|
1615
|
+
for (E = Math.max(1, Math.floor(w.m() / g.m())), I = Math.ceil(Math.log(E) / Math.LN2), I = I <= 48 ? 1 : Math.pow(2, I - 48), A = d(E), y = A.j(g); N(y) || y.l(w) > 0; ) E -= I, A = d(E), y = A.j(g);
|
|
1616
|
+
S(A) && (A = _), T = T.add(A), w = U(w, y);
|
|
1617
1617
|
}
|
|
1618
1618
|
return new j(T, w);
|
|
1619
1619
|
}
|
|
1620
1620
|
n.B = function(w) {
|
|
1621
|
-
return
|
|
1621
|
+
return K(this, w).h;
|
|
1622
1622
|
}, n.and = function(w) {
|
|
1623
|
-
const
|
|
1624
|
-
for (let I = 0; I <
|
|
1623
|
+
const g = Math.max(this.g.length, w.g.length), E = [];
|
|
1624
|
+
for (let I = 0; I < g; I++) E[I] = this.i(I) & w.i(I);
|
|
1625
1625
|
return new a(E, this.h & w.h);
|
|
1626
1626
|
}, n.or = function(w) {
|
|
1627
|
-
const
|
|
1628
|
-
for (let I = 0; I <
|
|
1627
|
+
const g = Math.max(this.g.length, w.g.length), E = [];
|
|
1628
|
+
for (let I = 0; I < g; I++) E[I] = this.i(I) | w.i(I);
|
|
1629
1629
|
return new a(E, this.h | w.h);
|
|
1630
1630
|
}, n.xor = function(w) {
|
|
1631
|
-
const
|
|
1632
|
-
for (let I = 0; I <
|
|
1631
|
+
const g = Math.max(this.g.length, w.g.length), E = [];
|
|
1632
|
+
for (let I = 0; I < g; I++) E[I] = this.i(I) ^ w.i(I);
|
|
1633
1633
|
return new a(E, this.h ^ w.h);
|
|
1634
1634
|
};
|
|
1635
1635
|
function ge(w) {
|
|
1636
|
-
const
|
|
1637
|
-
for (let I = 0; I <
|
|
1636
|
+
const g = w.g.length + 1, E = [];
|
|
1637
|
+
for (let I = 0; I < g; I++) E[I] = w.i(I) << 1 | w.i(I - 1) >>> 31;
|
|
1638
1638
|
return new a(E, w.h);
|
|
1639
1639
|
}
|
|
1640
|
-
function re(w,
|
|
1641
|
-
const E =
|
|
1642
|
-
|
|
1640
|
+
function re(w, g) {
|
|
1641
|
+
const E = g >> 5;
|
|
1642
|
+
g %= 32;
|
|
1643
1643
|
const I = w.g.length - E, T = [];
|
|
1644
|
-
for (let A = 0; A < I; A++) T[A] =
|
|
1644
|
+
for (let A = 0; A < I; A++) T[A] = g > 0 ? w.i(A + E) >>> g | w.i(A + E + 1) << 32 - g : w.i(A + E);
|
|
1645
1645
|
return new a(T, w.h);
|
|
1646
1646
|
}
|
|
1647
1647
|
r.prototype.digest = r.prototype.A, r.prototype.reset = r.prototype.u, r.prototype.update = r.prototype.v, _h = r, a.prototype.add = a.prototype.add, a.prototype.multiply = a.prototype.j, a.prototype.modulo = a.prototype.B, a.prototype.compare = a.prototype.l, a.prototype.toNumber = a.prototype.m, a.prototype.toString = a.prototype.toString, a.prototype.getBits = a.prototype.i, a.fromNumber = d, a.fromString = f, Bt = a;
|
|
@@ -1710,7 +1710,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
1710
1710
|
return u.prototype[v].apply(p, O);
|
|
1711
1711
|
};
|
|
1712
1712
|
}
|
|
1713
|
-
var
|
|
1713
|
+
var _ = typeof AsyncContext < "u" && typeof AsyncContext.Snapshot == "function" ? (o) => o && AsyncContext.Snapshot.wrap(o) : (o) => o;
|
|
1714
1714
|
function R(o) {
|
|
1715
1715
|
const u = o.length;
|
|
1716
1716
|
if (u > 0) {
|
|
@@ -1720,7 +1720,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
1720
1720
|
}
|
|
1721
1721
|
return [];
|
|
1722
1722
|
}
|
|
1723
|
-
function
|
|
1723
|
+
function S(o, u) {
|
|
1724
1724
|
for (let p = 1; p < arguments.length; p++) {
|
|
1725
1725
|
const v = arguments[p];
|
|
1726
1726
|
var h = typeof v;
|
|
@@ -1760,8 +1760,8 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
1760
1760
|
p.set(u, h), this.h ? this.h.next = p : this.g = p, this.h = p;
|
|
1761
1761
|
}
|
|
1762
1762
|
}
|
|
1763
|
-
var j = new N(() => new
|
|
1764
|
-
class
|
|
1763
|
+
var j = new N(() => new K(), (o) => o.reset());
|
|
1764
|
+
class K {
|
|
1765
1765
|
constructor() {
|
|
1766
1766
|
this.next = this.g = this.h = null;
|
|
1767
1767
|
}
|
|
@@ -1772,7 +1772,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
1772
1772
|
this.next = this.g = this.h = null;
|
|
1773
1773
|
}
|
|
1774
1774
|
}
|
|
1775
|
-
let ge, re = !1, w = new $(),
|
|
1775
|
+
let ge, re = !1, w = new $(), g = () => {
|
|
1776
1776
|
const o = Promise.resolve(void 0);
|
|
1777
1777
|
ge = () => {
|
|
1778
1778
|
o.then(E);
|
|
@@ -1950,7 +1950,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
1950
1950
|
m(ve, I), ve.prototype[Zt] = !0, ve.prototype.removeEventListener = function(o, u, h, p) {
|
|
1951
1951
|
pc(this, o, u, h, p);
|
|
1952
1952
|
};
|
|
1953
|
-
function
|
|
1953
|
+
function Se(o, u) {
|
|
1954
1954
|
var h, p = o.G;
|
|
1955
1955
|
if (p) for (h = []; p; p = p.G) h.push(p);
|
|
1956
1956
|
if (o = o.M, p = u.type || u, typeof u == "string") u = new T(u, o);
|
|
@@ -2062,7 +2062,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2062
2062
|
m(vc, T);
|
|
2063
2063
|
function ar(o) {
|
|
2064
2064
|
const u = ls();
|
|
2065
|
-
|
|
2065
|
+
Se(u, new vc(u));
|
|
2066
2066
|
}
|
|
2067
2067
|
en.STAT_EVENT = "statevent";
|
|
2068
2068
|
function Ac(o, u) {
|
|
@@ -2071,7 +2071,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2071
2071
|
m(Ac, T);
|
|
2072
2072
|
function ke(o) {
|
|
2073
2073
|
const u = ls();
|
|
2074
|
-
|
|
2074
|
+
Se(u, new Ac(u, o));
|
|
2075
2075
|
}
|
|
2076
2076
|
en.Ja = "timingevent";
|
|
2077
2077
|
function Rc(o, u) {
|
|
@@ -2117,7 +2117,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2117
2117
|
` + b + " " + O;
|
|
2118
2118
|
});
|
|
2119
2119
|
}
|
|
2120
|
-
function
|
|
2120
|
+
function Rn(o, u, h, p) {
|
|
2121
2121
|
o.info(function() {
|
|
2122
2122
|
return "XMLHTTP TEXT (" + u + "): " + Rp(o, h) + (p ? " " + p : "");
|
|
2123
2123
|
});
|
|
@@ -2168,19 +2168,19 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2168
2168
|
return o.length && h.push(o.join(":")), h;
|
|
2169
2169
|
}
|
|
2170
2170
|
function bt(o, u, h, p) {
|
|
2171
|
-
this.j = o, this.i = u, this.l = h, this.S = p || 1, this.V = new ir(this), this.H = 45e3, this.J = null, this.o = !1, this.u = this.B = this.A = this.M = this.F = this.T = this.D = null, this.G = [], this.g = null, this.C = 0, this.m = this.v = null, this.X = -1, this.K = !1, this.P = 0, this.O = null, this.W = this.L = this.U = this.R = !1, this.h = new
|
|
2171
|
+
this.j = o, this.i = u, this.l = h, this.S = p || 1, this.V = new ir(this), this.H = 45e3, this.J = null, this.o = !1, this.u = this.B = this.A = this.M = this.F = this.T = this.D = null, this.G = [], this.g = null, this.C = 0, this.m = this.v = null, this.X = -1, this.K = !1, this.P = 0, this.O = null, this.W = this.L = this.U = this.R = !1, this.h = new Cc();
|
|
2172
2172
|
}
|
|
2173
|
-
function
|
|
2173
|
+
function Cc() {
|
|
2174
2174
|
this.i = null, this.g = "", this.h = !1;
|
|
2175
2175
|
}
|
|
2176
|
-
var
|
|
2176
|
+
var Sc = {}, Ji = {};
|
|
2177
2177
|
function Xi(o, u, h) {
|
|
2178
2178
|
o.M = 1, o.A = fs(et(u)), o.u = h, o.R = !0, kc(o, null);
|
|
2179
2179
|
}
|
|
2180
2180
|
function kc(o, u) {
|
|
2181
2181
|
o.F = Date.now(), ds(o), o.B = et(o.A);
|
|
2182
2182
|
var h = o.B, p = o.S;
|
|
2183
|
-
Array.isArray(p) || (p = [String(p)]), $c(h.i, "t", p), o.C = 0, h = o.j.L, o.h = new
|
|
2183
|
+
Array.isArray(p) || (p = [String(p)]), $c(h.i, "t", p), o.C = 0, h = o.j.L, o.h = new Cc(), o.g = au(o.j, h ? u : null, !o.u), o.P > 0 && (o.O = new Ep(d(o.Y, o, o.g), o.P)), u = o.V, h = o.g, p = o.ba;
|
|
2184
2184
|
var v = "readystatechange";
|
|
2185
2185
|
Array.isArray(v) || (v && (yc[0] = v.toString()), v = yc);
|
|
2186
2186
|
for (let b = 0; b < v.length; b++) {
|
|
@@ -2198,11 +2198,11 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2198
2198
|
bt.prototype.ba = function(o) {
|
|
2199
2199
|
o = o.target;
|
|
2200
2200
|
const u = this.O;
|
|
2201
|
-
u &&
|
|
2201
|
+
u && St(o) == 3 ? u.j() : this.Y(o);
|
|
2202
2202
|
}, bt.prototype.Y = function(o) {
|
|
2203
2203
|
try {
|
|
2204
2204
|
if (o == this.g) e: {
|
|
2205
|
-
const z =
|
|
2205
|
+
const z = St(this.g), fe = this.g.ya(), X = this.g.ca();
|
|
2206
2206
|
if (!(z < 3) && (z != 3 || this.g && (this.h.h || this.g.la() || Yc(this.g)))) {
|
|
2207
2207
|
this.K || z != 4 || fe == 7 || (fe == 8 || X <= 0 ? ar(3) : ar(2)), Zi(this);
|
|
2208
2208
|
var u = this.g.ca();
|
|
@@ -2220,7 +2220,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2220
2220
|
}
|
|
2221
2221
|
b = null;
|
|
2222
2222
|
}
|
|
2223
|
-
if (o = b)
|
|
2223
|
+
if (o = b) Rn(this.i, this.l, o, "Initial handshake response via X-HTTP-Initial-Response"), this.L = !0, eo(this, o);
|
|
2224
2224
|
else {
|
|
2225
2225
|
this.o = !1, this.m = 3, ke(12), tn(this), hr(this);
|
|
2226
2226
|
break e;
|
|
@@ -2229,14 +2229,14 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2229
2229
|
if (this.R) {
|
|
2230
2230
|
o = !0;
|
|
2231
2231
|
let _e;
|
|
2232
|
-
for (; !this.K && this.C < h.length; ) if (_e =
|
|
2233
|
-
z == 4 && (this.m = 4, ke(14), o = !1),
|
|
2232
|
+
for (; !this.K && this.C < h.length; ) if (_e = Cp(this, h), _e == Ji) {
|
|
2233
|
+
z == 4 && (this.m = 4, ke(14), o = !1), Rn(this.i, this.l, null, "[Incomplete Response]");
|
|
2234
2234
|
break;
|
|
2235
|
-
} else if (_e ==
|
|
2236
|
-
this.m = 4, ke(15),
|
|
2235
|
+
} else if (_e == Sc) {
|
|
2236
|
+
this.m = 4, ke(15), Rn(this.i, this.l, h, "[Invalid Chunk]"), o = !1;
|
|
2237
2237
|
break;
|
|
2238
|
-
} else
|
|
2239
|
-
if (Nc(this) && this.C != 0 && (this.h.g = this.h.g.slice(this.C), this.C = 0), z != 4 || h.length != 0 || this.h.h || (this.m = 1, ke(16), o = !1), this.o = this.o && o, !o)
|
|
2238
|
+
} else Rn(this.i, this.l, _e, null), eo(this, _e);
|
|
2239
|
+
if (Nc(this) && this.C != 0 && (this.h.g = this.h.g.slice(this.C), this.C = 0), z != 4 || h.length != 0 || this.h.h || (this.m = 1, ke(16), o = !1), this.o = this.o && o, !o) Rn(
|
|
2240
2240
|
this.i,
|
|
2241
2241
|
this.l,
|
|
2242
2242
|
h,
|
|
@@ -2247,7 +2247,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2247
2247
|
var O = this.j;
|
|
2248
2248
|
O.g == this && O.aa && !O.P && (O.j.info("Great, no buffering proxy detected. Bytes received: " + h.length), co(O), O.P = !0, ke(11));
|
|
2249
2249
|
}
|
|
2250
|
-
} else
|
|
2250
|
+
} else Rn(this.i, this.l, h, null), eo(this, h);
|
|
2251
2251
|
z == 4 && tn(this), this.o && !this.K && (z == 4 ? ru(this.j, this) : (this.o = !1, ds(this)));
|
|
2252
2252
|
} else jp(this.g), u == 400 && h.indexOf("Unknown SID") > 0 ? (this.m = 3, ke(12)) : (this.m = 0, ke(13)), tn(this), hr(this);
|
|
2253
2253
|
}
|
|
@@ -2261,7 +2261,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2261
2261
|
const u = Yc(o.g);
|
|
2262
2262
|
if (u === "") return "";
|
|
2263
2263
|
let h = "";
|
|
2264
|
-
const p = u.length, v =
|
|
2264
|
+
const p = u.length, v = St(o.g) == 4;
|
|
2265
2265
|
if (!o.h.i) {
|
|
2266
2266
|
if (typeof TextDecoder > "u") return tn(o), hr(o), "";
|
|
2267
2267
|
o.h.i = new a.TextDecoder();
|
|
@@ -2272,10 +2272,10 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2272
2272
|
function Nc(o) {
|
|
2273
2273
|
return o.g ? o.v == "GET" && o.M != 2 && o.j.Aa : !1;
|
|
2274
2274
|
}
|
|
2275
|
-
function
|
|
2275
|
+
function Cp(o, u) {
|
|
2276
2276
|
var h = o.C, p = u.indexOf(`
|
|
2277
2277
|
`, h);
|
|
2278
|
-
return p == -1 ? Ji : (h = Number(u.substring(h, p)), isNaN(h) ?
|
|
2278
|
+
return p == -1 ? Ji : (h = Number(u.substring(h, p)), isNaN(h) ? Sc : (p += 1, p + h > u.length ? Ji : (u = u.slice(p, p + h), o.C = p + h, u)));
|
|
2279
2279
|
}
|
|
2280
2280
|
bt.prototype.cancel = function() {
|
|
2281
2281
|
this.K = !0, tn(this);
|
|
@@ -2364,7 +2364,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2364
2364
|
} catch {
|
|
2365
2365
|
}
|
|
2366
2366
|
}
|
|
2367
|
-
var
|
|
2367
|
+
var Sp = class {
|
|
2368
2368
|
constructor(o, u) {
|
|
2369
2369
|
this.g = o, this.map = u;
|
|
2370
2370
|
}
|
|
@@ -2490,15 +2490,15 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2490
2490
|
}));
|
|
2491
2491
|
}
|
|
2492
2492
|
n = gr.prototype, n.add = function(o, u) {
|
|
2493
|
-
nn(this), this.i = null, o =
|
|
2493
|
+
nn(this), this.i = null, o = bn(this, o);
|
|
2494
2494
|
let h = this.g.get(o);
|
|
2495
2495
|
return h || this.g.set(o, h = []), h.push(u), this.h += 1, this;
|
|
2496
2496
|
};
|
|
2497
2497
|
function Bc(o, u) {
|
|
2498
|
-
nn(o), u =
|
|
2498
|
+
nn(o), u = bn(o, u), o.g.has(u) && (o.i = null, o.h -= o.g.get(u).length, o.g.delete(u));
|
|
2499
2499
|
}
|
|
2500
2500
|
function qc(o, u) {
|
|
2501
|
-
return nn(o), u =
|
|
2501
|
+
return nn(o), u = bn(o, u), o.g.has(u);
|
|
2502
2502
|
}
|
|
2503
2503
|
n.forEach = function(o, u) {
|
|
2504
2504
|
nn(this), this.g.forEach(function(h, p) {
|
|
@@ -2510,17 +2510,17 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2510
2510
|
function jc(o, u) {
|
|
2511
2511
|
nn(o);
|
|
2512
2512
|
let h = [];
|
|
2513
|
-
if (typeof u == "string") qc(o, u) && (h = h.concat(o.g.get(
|
|
2513
|
+
if (typeof u == "string") qc(o, u) && (h = h.concat(o.g.get(bn(o, u))));
|
|
2514
2514
|
else for (o = Array.from(o.g.values()), u = 0; u < o.length; u++) h = h.concat(o[u]);
|
|
2515
2515
|
return h;
|
|
2516
2516
|
}
|
|
2517
2517
|
n.set = function(o, u) {
|
|
2518
|
-
return nn(this), this.i = null, o =
|
|
2518
|
+
return nn(this), this.i = null, o = bn(this, o), qc(this, o) && (this.h -= this.g.get(o).length), this.g.set(o, [u]), this.h += 1, this;
|
|
2519
2519
|
}, n.get = function(o, u) {
|
|
2520
2520
|
return o ? (o = jc(this, o), o.length > 0 ? String(o[0]) : u) : u;
|
|
2521
2521
|
};
|
|
2522
2522
|
function $c(o, u, h) {
|
|
2523
|
-
Bc(o, u), h.length > 0 && (o.i = null, o.g.set(
|
|
2523
|
+
Bc(o, u), h.length > 0 && (o.i = null, o.g.set(bn(o, u), R(h)), o.h += h.length);
|
|
2524
2524
|
}
|
|
2525
2525
|
n.toString = function() {
|
|
2526
2526
|
if (this.i) return this.i;
|
|
@@ -2541,7 +2541,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2541
2541
|
const u = new gr();
|
|
2542
2542
|
return u.i = o.i, o.g && (u.g = new Map(o.g), u.h = o.h), u;
|
|
2543
2543
|
}
|
|
2544
|
-
function
|
|
2544
|
+
function bn(o, u) {
|
|
2545
2545
|
return u = String(u), o.j && (u = u.toLowerCase()), u;
|
|
2546
2546
|
}
|
|
2547
2547
|
function Mp(o, u) {
|
|
@@ -2554,22 +2554,22 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2554
2554
|
const h = new ur();
|
|
2555
2555
|
if (a.Image) {
|
|
2556
2556
|
const p = new Image();
|
|
2557
|
-
p.onload = f(
|
|
2557
|
+
p.onload = f(Ct, h, "TestLoadImage: loaded", !0, u, p), p.onerror = f(Ct, h, "TestLoadImage: error", !1, u, p), p.onabort = f(Ct, h, "TestLoadImage: abort", !1, u, p), p.ontimeout = f(Ct, h, "TestLoadImage: timeout", !1, u, p), a.setTimeout(function() {
|
|
2558
2558
|
p.ontimeout && p.ontimeout();
|
|
2559
2559
|
}, 1e4), p.src = o;
|
|
2560
2560
|
} else u(!1);
|
|
2561
2561
|
}
|
|
2562
2562
|
function Up(o, u) {
|
|
2563
2563
|
const h = new ur(), p = new AbortController(), v = setTimeout(() => {
|
|
2564
|
-
p.abort(),
|
|
2564
|
+
p.abort(), Ct(h, "TestPingServer: timeout", !1, u);
|
|
2565
2565
|
}, 1e4);
|
|
2566
2566
|
fetch(o, { signal: p.signal }).then((b) => {
|
|
2567
|
-
clearTimeout(v), b.ok ?
|
|
2567
|
+
clearTimeout(v), b.ok ? Ct(h, "TestPingServer: ok", !0, u) : Ct(h, "TestPingServer: server error", !1, u);
|
|
2568
2568
|
}).catch(() => {
|
|
2569
|
-
clearTimeout(v),
|
|
2569
|
+
clearTimeout(v), Ct(h, "TestPingServer: error", !1, u);
|
|
2570
2570
|
});
|
|
2571
2571
|
}
|
|
2572
|
-
function
|
|
2572
|
+
function Ct(o, u, h, p, v) {
|
|
2573
2573
|
try {
|
|
2574
2574
|
v && (v.onload = null, v.onerror = null, v.onabort = null, v.ontimeout = null), p(h);
|
|
2575
2575
|
} catch {
|
|
@@ -2676,7 +2676,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2676
2676
|
this.H = o;
|
|
2677
2677
|
}, n.ea = function(o, u, h, p) {
|
|
2678
2678
|
if (this.g) throw Error("[goog.net.XhrIo] Object is active with another request=" + this.D + "; newUri=" + o);
|
|
2679
|
-
u = u ? u.toUpperCase() : "GET", this.D = o, this.l = "", this.o = 0, this.A = !1, this.h = !0, this.g = this.L ? this.L.g() : Pc.g(), this.g.onreadystatechange =
|
|
2679
|
+
u = u ? u.toUpperCase() : "GET", this.D = o, this.l = "", this.o = 0, this.A = !1, this.h = !0, this.g = this.L ? this.L.g() : Pc.g(), this.g.onreadystatechange = _(d(this.Ca, this));
|
|
2680
2680
|
try {
|
|
2681
2681
|
this.B = !0, this.g.open(u, String(o), !0), this.B = !1;
|
|
2682
2682
|
} catch (b) {
|
|
@@ -2699,10 +2699,10 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2699
2699
|
o.h = !1, o.g && (o.j = !0, o.g.abort(), o.j = !1), o.l = u, o.o = 5, Kc(o), ms(o);
|
|
2700
2700
|
}
|
|
2701
2701
|
function Kc(o) {
|
|
2702
|
-
o.A || (o.A = !0,
|
|
2702
|
+
o.A || (o.A = !0, Se(o, "complete"), Se(o, "error"));
|
|
2703
2703
|
}
|
|
2704
2704
|
n.abort = function(o) {
|
|
2705
|
-
this.g && this.h && (this.h = !1, this.j = !0, this.g.abort(), this.j = !1, this.o = o || 7,
|
|
2705
|
+
this.g && this.h && (this.h = !1, this.j = !0, this.g.abort(), this.j = !1, this.o = o || 7, Se(this, "complete"), Se(this, "abort"), ms(this));
|
|
2706
2706
|
}, n.N = function() {
|
|
2707
2707
|
this.g && (this.h && (this.h = !1, this.j = !0, this.g.abort(), this.j = !1), ms(this, !0)), oe.Z.N.call(this);
|
|
2708
2708
|
}, n.Ca = function() {
|
|
@@ -2712,8 +2712,8 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2712
2712
|
};
|
|
2713
2713
|
function Qc(o) {
|
|
2714
2714
|
if (o.h && typeof i < "u") {
|
|
2715
|
-
if (o.v &&
|
|
2716
|
-
else if (
|
|
2715
|
+
if (o.v && St(o) == 4) setTimeout(o.Ca.bind(o), 0);
|
|
2716
|
+
else if (Se(o, "readystatechange"), St(o) == 4) {
|
|
2717
2717
|
o.h = !1;
|
|
2718
2718
|
try {
|
|
2719
2719
|
const b = o.ca();
|
|
@@ -2739,11 +2739,11 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2739
2739
|
}
|
|
2740
2740
|
h = p;
|
|
2741
2741
|
}
|
|
2742
|
-
if (h)
|
|
2742
|
+
if (h) Se(o, "complete"), Se(o, "success");
|
|
2743
2743
|
else {
|
|
2744
2744
|
o.o = 6;
|
|
2745
2745
|
try {
|
|
2746
|
-
var v =
|
|
2746
|
+
var v = St(o) > 2 ? o.g.statusText : "";
|
|
2747
2747
|
} catch {
|
|
2748
2748
|
v = "";
|
|
2749
2749
|
}
|
|
@@ -2759,7 +2759,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2759
2759
|
if (o.g) {
|
|
2760
2760
|
o.m && (clearTimeout(o.m), o.m = null);
|
|
2761
2761
|
const h = o.g;
|
|
2762
|
-
o.g = null, u ||
|
|
2762
|
+
o.g = null, u || Se(o, "ready");
|
|
2763
2763
|
try {
|
|
2764
2764
|
h.onreadystatechange = null;
|
|
2765
2765
|
} catch {
|
|
@@ -2769,12 +2769,12 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2769
2769
|
n.isActive = function() {
|
|
2770
2770
|
return !!this.g;
|
|
2771
2771
|
};
|
|
2772
|
-
function
|
|
2772
|
+
function St(o) {
|
|
2773
2773
|
return o.g ? o.g.readyState : 0;
|
|
2774
2774
|
}
|
|
2775
2775
|
n.ca = function() {
|
|
2776
2776
|
try {
|
|
2777
|
-
return
|
|
2777
|
+
return St(this) > 2 ? this.g.status : -1;
|
|
2778
2778
|
} catch {
|
|
2779
2779
|
return -1;
|
|
2780
2780
|
}
|
|
@@ -2808,7 +2808,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2808
2808
|
}
|
|
2809
2809
|
function jp(o) {
|
|
2810
2810
|
const u = {};
|
|
2811
|
-
o = (o.g &&
|
|
2811
|
+
o = (o.g && St(o) >= 2 && o.g.getAllResponseHeaders() || "").split(`\r
|
|
2812
2812
|
`);
|
|
2813
2813
|
for (let p = 0; p < o.length; p++) {
|
|
2814
2814
|
if (y(o[p])) continue;
|
|
@@ -2858,7 +2858,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2858
2858
|
if (!Vc(o.h) && !o.m) {
|
|
2859
2859
|
o.m = !0;
|
|
2860
2860
|
var u = o.Ea;
|
|
2861
|
-
ge ||
|
|
2861
|
+
ge || g(), re || (ge(), re = !0), w.add(u, o), o.D = 0;
|
|
2862
2862
|
}
|
|
2863
2863
|
}
|
|
2864
2864
|
function $p(o, u) {
|
|
@@ -2952,7 +2952,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2952
2952
|
if (!o.g && !o.v) {
|
|
2953
2953
|
o.Y = 1;
|
|
2954
2954
|
var u = o.Da;
|
|
2955
|
-
ge ||
|
|
2955
|
+
ge || g(), re || (ge(), re = !0), w.add(u, o), o.A = 0;
|
|
2956
2956
|
}
|
|
2957
2957
|
}
|
|
2958
2958
|
function ao(o) {
|
|
@@ -2993,7 +2993,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
2993
2993
|
if (u.o) if (p == 1) {
|
|
2994
2994
|
h = u.u ? u.u.length : 0, u = Date.now() - u.F;
|
|
2995
2995
|
var v = o.D;
|
|
2996
|
-
p = ls(),
|
|
2996
|
+
p = ls(), Se(p, new Rc(p, h)), _s(o);
|
|
2997
2997
|
} else tu(o);
|
|
2998
2998
|
else if (v = u.m, v == 3 || v == 0 && u.X > 0 || !(p == 1 && $p(o, u) || p == 2 && ao(o))) switch (h && h.length > 0 && (u = o.h, u.i = u.i.concat(h)), v) {
|
|
2999
2999
|
case 1:
|
|
@@ -3028,7 +3028,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
3028
3028
|
function iu(o) {
|
|
3029
3029
|
if (o.I = 0, o.ja = [], o.l) {
|
|
3030
3030
|
const u = xc(o.h);
|
|
3031
|
-
(u.length != 0 || o.i.length != 0) && (
|
|
3031
|
+
(u.length != 0 || o.i.length != 0) && (S(o.ja, u), S(o.ja, o.i), o.h.i.length = 0, R(o.i), o.i.length = 0), o.l.oa();
|
|
3032
3032
|
}
|
|
3033
3033
|
}
|
|
3034
3034
|
function ou(o, u, h) {
|
|
@@ -3065,7 +3065,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
3065
3065
|
return new Ue(o, u);
|
|
3066
3066
|
};
|
|
3067
3067
|
function Ue(o, u) {
|
|
3068
|
-
ve.call(this), this.g = new Jc(u), this.l = o, this.h = u && u.messageUrlParams || null, o = u && u.messageHeaders || null, u && u.clientProtocolHeaderRequired && (o ? o["X-Client-Protocol"] = "webchannel" : o = { "X-Client-Protocol": "webchannel" }), this.g.o = o, o = u && u.initMessageHeaders || null, u && u.messageContentType && (o ? o["X-WebChannel-Content-Type"] = u.messageContentType : o = { "X-WebChannel-Content-Type": u.messageContentType }), u && u.sa && (o ? o["X-WebChannel-Client-Profile"] = u.sa : o = { "X-WebChannel-Client-Profile": u.sa }), this.g.U = o, (o = u && u.Qb) && !y(o) && (this.g.u = o), this.A = u && u.supportsCrossDomainXhr || !1, this.v = u && u.sendRawJson || !1, (u = u && u.httpSessionIdParam) && !y(u) && (this.g.G = u, o = this.h, o !== null && u in o && (o = this.h, u in o && delete o[u])), this.j = new
|
|
3068
|
+
ve.call(this), this.g = new Jc(u), this.l = o, this.h = u && u.messageUrlParams || null, o = u && u.messageHeaders || null, u && u.clientProtocolHeaderRequired && (o ? o["X-Client-Protocol"] = "webchannel" : o = { "X-Client-Protocol": "webchannel" }), this.g.o = o, o = u && u.initMessageHeaders || null, u && u.messageContentType && (o ? o["X-WebChannel-Content-Type"] = u.messageContentType : o = { "X-WebChannel-Content-Type": u.messageContentType }), u && u.sa && (o ? o["X-WebChannel-Client-Profile"] = u.sa : o = { "X-WebChannel-Client-Profile": u.sa }), this.g.U = o, (o = u && u.Qb) && !y(o) && (this.g.u = o), this.A = u && u.supportsCrossDomainXhr || !1, this.v = u && u.sendRawJson || !1, (u = u && u.httpSessionIdParam) && !y(u) && (this.g.G = u, o = this.h, o !== null && u in o && (o = this.h, u in o && delete o[u])), this.j = new Pn(this);
|
|
3069
3069
|
}
|
|
3070
3070
|
m(Ue, ve), Ue.prototype.m = function() {
|
|
3071
3071
|
this.g.l = this.j, this.A && (this.g.L = !0), this.g.connect(this.l, this.h || void 0);
|
|
@@ -3077,7 +3077,7 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
3077
3077
|
var h = {};
|
|
3078
3078
|
h.__data__ = o, o = h;
|
|
3079
3079
|
} else this.v && (h = {}, h.__data__ = Gi(o), o = h);
|
|
3080
|
-
u.i.push(new
|
|
3080
|
+
u.i.push(new Sp(u.Ya++, o)), u.I == 3 && _s(u);
|
|
3081
3081
|
}, Ue.prototype.N = function() {
|
|
3082
3082
|
this.g.l = null, delete this.j, oo(this.g), delete this.g, Ue.Z.N.call(this);
|
|
3083
3083
|
};
|
|
@@ -3100,17 +3100,17 @@ var yh, Rr, Eh, Ns, xo, Th, wh, Ih;
|
|
|
3100
3100
|
Qi.call(this), this.status = 1;
|
|
3101
3101
|
}
|
|
3102
3102
|
m(lu, Qi);
|
|
3103
|
-
function
|
|
3103
|
+
function Pn(o) {
|
|
3104
3104
|
this.g = o;
|
|
3105
3105
|
}
|
|
3106
|
-
m(
|
|
3107
|
-
|
|
3108
|
-
},
|
|
3109
|
-
|
|
3110
|
-
},
|
|
3111
|
-
|
|
3112
|
-
},
|
|
3113
|
-
|
|
3106
|
+
m(Pn, cu), Pn.prototype.ra = function() {
|
|
3107
|
+
Se(this.g, "a");
|
|
3108
|
+
}, Pn.prototype.qa = function(o) {
|
|
3109
|
+
Se(this.g, new uu(o));
|
|
3110
|
+
}, Pn.prototype.pa = function(o) {
|
|
3111
|
+
Se(this.g, new lu());
|
|
3112
|
+
}, Pn.prototype.oa = function() {
|
|
3113
|
+
Se(this.g, "b");
|
|
3114
3114
|
}, Es.prototype.createWebChannel = Es.prototype.g, Ue.prototype.send = Ue.prototype.o, Ue.prototype.open = Ue.prototype.m, Ue.prototype.close = Ue.prototype.close, Ih = function() {
|
|
3115
3115
|
return new Es();
|
|
3116
3116
|
}, wh = function() {
|
|
@@ -3138,7 +3138,7 @@ class Re {
|
|
|
3138
3138
|
Re.UNAUTHENTICATED = new Re(null), // TODO(mikelehen): Look into getting a proper uid-equivalent for
|
|
3139
3139
|
// non-FirebaseAuth providers.
|
|
3140
3140
|
Re.GOOGLE_CREDENTIALS = new Re("google-credentials-uid"), Re.FIRST_PARTY = new Re("first-party-uid"), Re.MOCK_USER = new Re("mock-user");
|
|
3141
|
-
let Qn = "12.
|
|
3141
|
+
let Qn = "12.10.0";
|
|
3142
3142
|
function Rg(n) {
|
|
3143
3143
|
Qn = n;
|
|
3144
3144
|
}
|
|
@@ -3158,7 +3158,7 @@ function wt(n, ...e) {
|
|
|
3158
3158
|
fn.error(`Firestore (${Qn}): ${n}`, ...t);
|
|
3159
3159
|
}
|
|
3160
3160
|
}
|
|
3161
|
-
function
|
|
3161
|
+
function pn(n, ...e) {
|
|
3162
3162
|
if (fn.logLevel <= H.WARN) {
|
|
3163
3163
|
const t = e.map(aa);
|
|
3164
3164
|
fn.warn(`Firestore (${Qn}): ${n}`, ...t);
|
|
@@ -3361,7 +3361,7 @@ class Pg {
|
|
|
3361
3361
|
this.changeListener = null;
|
|
3362
3362
|
}
|
|
3363
3363
|
}
|
|
3364
|
-
class
|
|
3364
|
+
class Cg {
|
|
3365
3365
|
constructor(e) {
|
|
3366
3366
|
this.t = e, /** Tracks the current User. */
|
|
3367
3367
|
this.currentUser = Re.UNAUTHENTICATED, /**
|
|
@@ -3429,7 +3429,7 @@ class Sg {
|
|
|
3429
3429
|
}), new Re(e);
|
|
3430
3430
|
}
|
|
3431
3431
|
}
|
|
3432
|
-
class
|
|
3432
|
+
class Sg {
|
|
3433
3433
|
constructor(e, t, r) {
|
|
3434
3434
|
this.P = e, this.T = t, this.I = r, this.type = "FirstParty", this.user = Re.FIRST_PARTY, this.R = /* @__PURE__ */ new Map();
|
|
3435
3435
|
}
|
|
@@ -3451,7 +3451,7 @@ class kg {
|
|
|
3451
3451
|
this.P = e, this.T = t, this.I = r;
|
|
3452
3452
|
}
|
|
3453
3453
|
getToken() {
|
|
3454
|
-
return Promise.resolve(new
|
|
3454
|
+
return Promise.resolve(new Sg(this.P, this.T, this.I));
|
|
3455
3455
|
}
|
|
3456
3456
|
start(e, t) {
|
|
3457
3457
|
e.enqueueRetryable(() => t(Re.FIRST_PARTY));
|
|
@@ -4055,7 +4055,7 @@ async function Yn(n) {
|
|
|
4055
4055
|
if (n.code !== P.FAILED_PRECONDITION || n.message !== qg) throw n;
|
|
4056
4056
|
V("LocalStore", "Unexpectedly lost primary lease");
|
|
4057
4057
|
}
|
|
4058
|
-
class
|
|
4058
|
+
class C {
|
|
4059
4059
|
constructor(e) {
|
|
4060
4060
|
this.nextCallback = null, this.catchCallback = null, // When the operation resolves, we'll set result or error and mark isDone.
|
|
4061
4061
|
this.result = void 0, this.error = void 0, this.isDone = !1, // Set to true when .then() or .catch() are called and prevents additional
|
|
@@ -4072,7 +4072,7 @@ class S {
|
|
|
4072
4072
|
return this.next(void 0, e);
|
|
4073
4073
|
}
|
|
4074
4074
|
next(e, t) {
|
|
4075
|
-
return this.callbackAttached && x(59440), this.callbackAttached = !0, this.isDone ? this.error ? this.wrapFailure(t, this.error) : this.wrapSuccess(e, this.result) : new
|
|
4075
|
+
return this.callbackAttached && x(59440), this.callbackAttached = !0, this.isDone ? this.error ? this.wrapFailure(t, this.error) : this.wrapSuccess(e, this.result) : new C((r, s) => {
|
|
4076
4076
|
this.nextCallback = (i) => {
|
|
4077
4077
|
this.wrapSuccess(e, i).next(r, s);
|
|
4078
4078
|
}, this.catchCallback = (i) => {
|
|
@@ -4088,29 +4088,29 @@ class S {
|
|
|
4088
4088
|
wrapUserFunction(e) {
|
|
4089
4089
|
try {
|
|
4090
4090
|
const t = e();
|
|
4091
|
-
return t instanceof
|
|
4091
|
+
return t instanceof C ? t : C.resolve(t);
|
|
4092
4092
|
} catch (t) {
|
|
4093
|
-
return
|
|
4093
|
+
return C.reject(t);
|
|
4094
4094
|
}
|
|
4095
4095
|
}
|
|
4096
4096
|
wrapSuccess(e, t) {
|
|
4097
|
-
return e ? this.wrapUserFunction(() => e(t)) :
|
|
4097
|
+
return e ? this.wrapUserFunction(() => e(t)) : C.resolve(t);
|
|
4098
4098
|
}
|
|
4099
4099
|
wrapFailure(e, t) {
|
|
4100
|
-
return e ? this.wrapUserFunction(() => e(t)) :
|
|
4100
|
+
return e ? this.wrapUserFunction(() => e(t)) : C.reject(t);
|
|
4101
4101
|
}
|
|
4102
4102
|
static resolve(e) {
|
|
4103
|
-
return new
|
|
4103
|
+
return new C((t, r) => {
|
|
4104
4104
|
t(e);
|
|
4105
4105
|
});
|
|
4106
4106
|
}
|
|
4107
4107
|
static reject(e) {
|
|
4108
|
-
return new
|
|
4108
|
+
return new C((t, r) => {
|
|
4109
4109
|
r(e);
|
|
4110
4110
|
});
|
|
4111
4111
|
}
|
|
4112
4112
|
static waitFor(e) {
|
|
4113
|
-
return new
|
|
4113
|
+
return new C((t, r) => {
|
|
4114
4114
|
let s = 0, i = 0, a = !1;
|
|
4115
4115
|
e.forEach((c) => {
|
|
4116
4116
|
++s, c.next(() => {
|
|
@@ -4126,8 +4126,8 @@ class S {
|
|
|
4126
4126
|
* result will be whether any of them returned `true`.
|
|
4127
4127
|
*/
|
|
4128
4128
|
static or(e) {
|
|
4129
|
-
let t =
|
|
4130
|
-
for (const r of e) t = t.next((s) => s ?
|
|
4129
|
+
let t = C.resolve(!1);
|
|
4130
|
+
for (const r of e) t = t.next((s) => s ? C.resolve(s) : r());
|
|
4131
4131
|
return t;
|
|
4132
4132
|
}
|
|
4133
4133
|
static forEach(e, t) {
|
|
@@ -4140,7 +4140,7 @@ class S {
|
|
|
4140
4140
|
* Concurrently map all array elements through asynchronous function.
|
|
4141
4141
|
*/
|
|
4142
4142
|
static mapArray(e, t) {
|
|
4143
|
-
return new
|
|
4143
|
+
return new C((r, s) => {
|
|
4144
4144
|
const i = e.length, a = new Array(i);
|
|
4145
4145
|
let c = 0;
|
|
4146
4146
|
for (let l = 0; l < i; l++) {
|
|
@@ -4158,7 +4158,7 @@ class S {
|
|
|
4158
4158
|
* The `action` will be called repeatedly while `condition` is true.
|
|
4159
4159
|
*/
|
|
4160
4160
|
static doWhile(e, t) {
|
|
4161
|
-
return new
|
|
4161
|
+
return new C((r, s) => {
|
|
4162
4162
|
const i = () => {
|
|
4163
4163
|
e() === !0 ? t().next(() => {
|
|
4164
4164
|
i();
|
|
@@ -4201,8 +4201,8 @@ function zg(n) {
|
|
|
4201
4201
|
const Ph = "";
|
|
4202
4202
|
function Hg(n) {
|
|
4203
4203
|
let e = "";
|
|
4204
|
-
for (let t = 0; t < n.length; t++) e.length > 0 && (e =
|
|
4205
|
-
return
|
|
4204
|
+
for (let t = 0; t < n.length; t++) e.length > 0 && (e = Cu(e)), e = Wg(n.get(t), e);
|
|
4205
|
+
return Cu(e);
|
|
4206
4206
|
}
|
|
4207
4207
|
function Wg(n, e) {
|
|
4208
4208
|
let t = e;
|
|
@@ -4222,10 +4222,10 @@ function Wg(n, e) {
|
|
|
4222
4222
|
}
|
|
4223
4223
|
return t;
|
|
4224
4224
|
}
|
|
4225
|
-
function
|
|
4225
|
+
function Cu(n) {
|
|
4226
4226
|
return n + Ph + "";
|
|
4227
4227
|
}
|
|
4228
|
-
function
|
|
4228
|
+
function Su(n) {
|
|
4229
4229
|
let e = 0;
|
|
4230
4230
|
for (const t in n) Object.prototype.hasOwnProperty.call(n, t) && e++;
|
|
4231
4231
|
return e;
|
|
@@ -4238,7 +4238,7 @@ function Gg(n, e) {
|
|
|
4238
4238
|
for (const r in n) Object.prototype.hasOwnProperty.call(n, r) && t.push(e(n[r], r, n));
|
|
4239
4239
|
return t;
|
|
4240
4240
|
}
|
|
4241
|
-
function
|
|
4241
|
+
function Ch(n) {
|
|
4242
4242
|
for (const e in n) if (Object.prototype.hasOwnProperty.call(n, e)) return !1;
|
|
4243
4243
|
return !0;
|
|
4244
4244
|
}
|
|
@@ -4671,7 +4671,7 @@ class Fe {
|
|
|
4671
4671
|
return qn(this.fields, e.fields, (t, r) => t.isEqual(r));
|
|
4672
4672
|
}
|
|
4673
4673
|
}
|
|
4674
|
-
class
|
|
4674
|
+
class Sh extends Error {
|
|
4675
4675
|
constructor() {
|
|
4676
4676
|
super(...arguments), this.name = "Base64DecodeError";
|
|
4677
4677
|
}
|
|
@@ -4685,7 +4685,7 @@ class Ie {
|
|
|
4685
4685
|
try {
|
|
4686
4686
|
return atob(s);
|
|
4687
4687
|
} catch (i) {
|
|
4688
|
-
throw typeof DOMException < "u" && i instanceof DOMException ? new
|
|
4688
|
+
throw typeof DOMException < "u" && i instanceof DOMException ? new Sh("Invalid base64 string: " + i) : i;
|
|
4689
4689
|
}
|
|
4690
4690
|
}(e);
|
|
4691
4691
|
return new Ie(t);
|
|
@@ -4874,7 +4874,7 @@ function dt(n, e) {
|
|
|
4874
4874
|
case 11:
|
|
4875
4875
|
return function(s, i) {
|
|
4876
4876
|
const a = s.mapValue.fields || {}, c = i.mapValue.fields || {};
|
|
4877
|
-
if (
|
|
4877
|
+
if (Su(a) !== Su(c)) return !1;
|
|
4878
4878
|
for (const l in a) if (a.hasOwnProperty(l) && (c[l] === void 0 || !dt(a[l], c[l]))) return !1;
|
|
4879
4879
|
return !0;
|
|
4880
4880
|
}(n, e);
|
|
@@ -4945,8 +4945,8 @@ function jn(n, e) {
|
|
|
4945
4945
|
const c = i.fields || {}, l = Object.keys(c), d = a.fields || {}, f = Object.keys(d);
|
|
4946
4946
|
l.sort(), f.sort();
|
|
4947
4947
|
for (let m = 0; m < l.length && m < f.length; ++m) {
|
|
4948
|
-
const
|
|
4949
|
-
if (
|
|
4948
|
+
const _ = Uo(l[m], f[m]);
|
|
4949
|
+
if (_ !== 0) return _;
|
|
4950
4950
|
const R = jn(c[l[m]], d[f[m]]);
|
|
4951
4951
|
if (R !== 0) return R;
|
|
4952
4952
|
}
|
|
@@ -5574,7 +5574,7 @@ function da(n, e) {
|
|
|
5574
5574
|
function jo(n) {
|
|
5575
5575
|
return L.isDocumentKey(n.path) && n.collectionGroup === null && n.filters.length === 0;
|
|
5576
5576
|
}
|
|
5577
|
-
class
|
|
5577
|
+
class wn {
|
|
5578
5578
|
/**
|
|
5579
5579
|
* Initializes a Query with a path and optional additional query constraints.
|
|
5580
5580
|
* Path must currently be empty if this is a collection group query.
|
|
@@ -5590,10 +5590,10 @@ class Tn {
|
|
|
5590
5590
|
}
|
|
5591
5591
|
}
|
|
5592
5592
|
function l_(n, e, t, r, s, i, a, c) {
|
|
5593
|
-
return new
|
|
5593
|
+
return new wn(n, e, t, r, s, i, a, c);
|
|
5594
5594
|
}
|
|
5595
5595
|
function wi(n) {
|
|
5596
|
-
return new
|
|
5596
|
+
return new wn(n);
|
|
5597
5597
|
}
|
|
5598
5598
|
function Uu(n) {
|
|
5599
5599
|
return n.filters.length === 0 && n.limit === null && n.startAt == null && n.endAt == null && (n.explicitOrderBy.length === 0 || n.explicitOrderBy.length === 1 && n.explicitOrderBy[0].field.isKeyField());
|
|
@@ -5604,7 +5604,7 @@ function h_(n) {
|
|
|
5604
5604
|
function fa(n) {
|
|
5605
5605
|
return n.collectionGroup !== null;
|
|
5606
5606
|
}
|
|
5607
|
-
function
|
|
5607
|
+
function Vn(n) {
|
|
5608
5608
|
const e = F(n);
|
|
5609
5609
|
if (e.Ie === null) {
|
|
5610
5610
|
e.Ie = [];
|
|
@@ -5627,7 +5627,7 @@ function On(n) {
|
|
|
5627
5627
|
}
|
|
5628
5628
|
function at(n) {
|
|
5629
5629
|
const e = F(n);
|
|
5630
|
-
return e.Ee || (e.Ee = $h(e,
|
|
5630
|
+
return e.Ee || (e.Ee = $h(e, Vn(n))), e.Ee;
|
|
5631
5631
|
}
|
|
5632
5632
|
function d_(n) {
|
|
5633
5633
|
const e = F(n);
|
|
@@ -5647,17 +5647,17 @@ function $h(n, e) {
|
|
|
5647
5647
|
}
|
|
5648
5648
|
function $o(n, e) {
|
|
5649
5649
|
const t = n.filters.concat([e]);
|
|
5650
|
-
return new
|
|
5650
|
+
return new wn(n.path, n.collectionGroup, n.explicitOrderBy.slice(), t, n.limit, n.limitType, n.startAt, n.endAt);
|
|
5651
5651
|
}
|
|
5652
5652
|
function f_(n, e) {
|
|
5653
5653
|
const t = n.explicitOrderBy.concat([e]);
|
|
5654
|
-
return new
|
|
5654
|
+
return new wn(n.path, n.collectionGroup, t, n.filters.slice(), n.limit, n.limitType, n.startAt, n.endAt);
|
|
5655
5655
|
}
|
|
5656
5656
|
function Gs(n, e, t) {
|
|
5657
|
-
return new
|
|
5657
|
+
return new wn(n.path, n.collectionGroup, n.explicitOrderBy.slice(), n.filters.slice(), e, t, n.startAt, n.endAt);
|
|
5658
5658
|
}
|
|
5659
5659
|
function p_(n, e) {
|
|
5660
|
-
return new
|
|
5660
|
+
return new wn(n.path, n.collectionGroup, n.explicitOrderBy.slice(), n.filters.slice(), n.limit, n.limitType, e, n.endAt);
|
|
5661
5661
|
}
|
|
5662
5662
|
function Ii(n, e) {
|
|
5663
5663
|
return da(at(n), at(e)) && n.limitType === e.limitType;
|
|
@@ -5665,7 +5665,7 @@ function Ii(n, e) {
|
|
|
5665
5665
|
function zh(n) {
|
|
5666
5666
|
return `${ha(at(n))}|lt:${n.limitType}`;
|
|
5667
5667
|
}
|
|
5668
|
-
function
|
|
5668
|
+
function kn(n) {
|
|
5669
5669
|
return `Query(target=${function(t) {
|
|
5670
5670
|
let r = t.path.canonicalString();
|
|
5671
5671
|
return t.collectionGroup !== null && (r += " collectionGroup=" + t.collectionGroup), t.filters.length > 0 && (r += `, filters: [${t.filters.map((s) => qh(s)).join(", ")}]`), yi(t.limit) || (r += ", limit: " + t.limit), t.orderBy.length > 0 && (r += `, orderBy: [${t.orderBy.map((s) => function(a) {
|
|
@@ -5678,7 +5678,7 @@ function vi(n, e) {
|
|
|
5678
5678
|
const i = s.key.path;
|
|
5679
5679
|
return r.collectionGroup !== null ? s.key.hasCollectionId(r.collectionGroup) && r.path.isPrefixOf(i) : L.isDocumentKey(r.path) ? r.path.isEqual(i) : r.path.isImmediateParentOf(i);
|
|
5680
5680
|
}(n, e) && function(r, s) {
|
|
5681
|
-
for (const i of
|
|
5681
|
+
for (const i of Vn(r))
|
|
5682
5682
|
if (!i.field.isKeyField() && s.data.field(i.field) === null) return !1;
|
|
5683
5683
|
return !0;
|
|
5684
5684
|
}(n, e) && function(r, s) {
|
|
@@ -5692,10 +5692,10 @@ function vi(n, e) {
|
|
|
5692
5692
|
function(a, c, l) {
|
|
5693
5693
|
const d = Lu(a, c, l);
|
|
5694
5694
|
return a.inclusive ? d <= 0 : d < 0;
|
|
5695
|
-
}(r.startAt,
|
|
5695
|
+
}(r.startAt, Vn(r), s) || r.endAt && !function(a, c, l) {
|
|
5696
5696
|
const d = Lu(a, c, l);
|
|
5697
5697
|
return a.inclusive ? d >= 0 : d > 0;
|
|
5698
|
-
}(r.endAt,
|
|
5698
|
+
}(r.endAt, Vn(r), s));
|
|
5699
5699
|
}(n, e);
|
|
5700
5700
|
}
|
|
5701
5701
|
function m_(n) {
|
|
@@ -5704,7 +5704,7 @@ function m_(n) {
|
|
|
5704
5704
|
function Hh(n) {
|
|
5705
5705
|
return (e, t) => {
|
|
5706
5706
|
let r = !1;
|
|
5707
|
-
for (const s of
|
|
5707
|
+
for (const s of Vn(n)) {
|
|
5708
5708
|
const i = g_(s, e, t);
|
|
5709
5709
|
if (i !== 0) return i;
|
|
5710
5710
|
r = r || s.field.isKeyField();
|
|
@@ -5728,7 +5728,7 @@ function g_(n, e, t) {
|
|
|
5728
5728
|
});
|
|
5729
5729
|
}
|
|
5730
5730
|
}
|
|
5731
|
-
class
|
|
5731
|
+
class In {
|
|
5732
5732
|
constructor(e, t) {
|
|
5733
5733
|
this.mapKeyFn = e, this.equalsFn = t, /**
|
|
5734
5734
|
* The inner map for a key/value pair. Due to the possibility of collisions we
|
|
@@ -5772,7 +5772,7 @@ class wn {
|
|
|
5772
5772
|
});
|
|
5773
5773
|
}
|
|
5774
5774
|
isEmpty() {
|
|
5775
|
-
return
|
|
5775
|
+
return Ch(this.inner);
|
|
5776
5776
|
}
|
|
5777
5777
|
size() {
|
|
5778
5778
|
return this.innerSize;
|
|
@@ -5799,7 +5799,7 @@ function Kh() {
|
|
|
5799
5799
|
return Nr();
|
|
5800
5800
|
}
|
|
5801
5801
|
function Nr() {
|
|
5802
|
-
return new
|
|
5802
|
+
return new In((n) => n.toString(), (n, e) => n.isEqual(e));
|
|
5803
5803
|
}
|
|
5804
5804
|
const y_ = new se(L.comparator), E_ = new me(L.comparator);
|
|
5805
5805
|
function G(...n) {
|
|
@@ -5998,7 +5998,7 @@ function Dr(n, e, t, r) {
|
|
|
5998
5998
|
return Vs(i.precondition, a) ? (a.convertToNoDocument(a.version).setHasLocalMutations(), null) : c;
|
|
5999
5999
|
}(n, e, t);
|
|
6000
6000
|
}
|
|
6001
|
-
function
|
|
6001
|
+
function C_(n, e) {
|
|
6002
6002
|
let t = null;
|
|
6003
6003
|
for (const r of n.fieldTransforms) {
|
|
6004
6004
|
const s = e.data.field(r.field), i = Yh(r.transform, s || null);
|
|
@@ -6064,7 +6064,7 @@ class bi extends Ri {
|
|
|
6064
6064
|
return null;
|
|
6065
6065
|
}
|
|
6066
6066
|
}
|
|
6067
|
-
class
|
|
6067
|
+
class S_ extends Ri {
|
|
6068
6068
|
constructor(e, t) {
|
|
6069
6069
|
super(), this.key = e, this.precondition = t, this.type = 3, this.fieldTransforms = [];
|
|
6070
6070
|
}
|
|
@@ -6186,7 +6186,7 @@ class O_ {
|
|
|
6186
6186
|
this.count = e, this.unchangedNames = t;
|
|
6187
6187
|
}
|
|
6188
6188
|
}
|
|
6189
|
-
var ue,
|
|
6189
|
+
var ue, Q;
|
|
6190
6190
|
function V_(n) {
|
|
6191
6191
|
switch (n) {
|
|
6192
6192
|
case P.OK:
|
|
@@ -6264,7 +6264,7 @@ function nd(n) {
|
|
|
6264
6264
|
});
|
|
6265
6265
|
}
|
|
6266
6266
|
}
|
|
6267
|
-
(
|
|
6267
|
+
(Q = ue || (ue = {}))[Q.OK = 0] = "OK", Q[Q.CANCELLED = 1] = "CANCELLED", Q[Q.UNKNOWN = 2] = "UNKNOWN", Q[Q.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT", Q[Q.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", Q[Q.NOT_FOUND = 5] = "NOT_FOUND", Q[Q.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", Q[Q.PERMISSION_DENIED = 7] = "PERMISSION_DENIED", Q[Q.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", Q[Q.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED", Q[Q.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", Q[Q.ABORTED = 10] = "ABORTED", Q[Q.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", Q[Q.UNIMPLEMENTED = 12] = "UNIMPLEMENTED", Q[Q.INTERNAL = 13] = "INTERNAL", Q[Q.UNAVAILABLE = 14] = "UNAVAILABLE", Q[Q.DATA_LOSS = 15] = "DATA_LOSS";
|
|
6268
6268
|
function L_() {
|
|
6269
6269
|
return new TextEncoder();
|
|
6270
6270
|
}
|
|
@@ -6588,13 +6588,13 @@ class x_ {
|
|
|
6588
6588
|
try {
|
|
6589
6589
|
a = Wt(r).toUint8Array();
|
|
6590
6590
|
} catch (l) {
|
|
6591
|
-
if (l instanceof
|
|
6591
|
+
if (l instanceof Sh) return pn("Decoding the base64 bloom filter in existence filter failed (" + l.message + "); ignoring the bloom filter and falling back to full re-query."), null;
|
|
6592
6592
|
throw l;
|
|
6593
6593
|
}
|
|
6594
6594
|
try {
|
|
6595
6595
|
c = new ga(a, s, i);
|
|
6596
6596
|
} catch (l) {
|
|
6597
|
-
return
|
|
6597
|
+
return pn(l instanceof Pr ? "BloomFilter error: " : "Applying bloom filter failed: ", l), null;
|
|
6598
6598
|
}
|
|
6599
6599
|
return c.ge === 0 ? null : c;
|
|
6600
6600
|
}
|
|
@@ -6916,7 +6916,7 @@ function H_(n, e) {
|
|
|
6916
6916
|
updateMask: ey(e.fieldMask)
|
|
6917
6917
|
};
|
|
6918
6918
|
else {
|
|
6919
|
-
if (!(e instanceof
|
|
6919
|
+
if (!(e instanceof S_)) return x(16599, {
|
|
6920
6920
|
dt: e.type
|
|
6921
6921
|
});
|
|
6922
6922
|
t = {
|
|
@@ -6996,10 +6996,10 @@ function ud(n, e) {
|
|
|
6996
6996
|
if (d.length !== 0)
|
|
6997
6997
|
return d.map((f) => (
|
|
6998
6998
|
// visible for testing
|
|
6999
|
-
function(
|
|
6999
|
+
function(_) {
|
|
7000
7000
|
return {
|
|
7001
|
-
field: Ot(
|
|
7002
|
-
direction: J_(
|
|
7001
|
+
field: Ot(_.field),
|
|
7002
|
+
direction: J_(_.dir)
|
|
7003
7003
|
};
|
|
7004
7004
|
}(f)
|
|
7005
7005
|
));
|
|
@@ -7063,14 +7063,14 @@ function Q_(n) {
|
|
|
7063
7063
|
}
|
|
7064
7064
|
let i = [];
|
|
7065
7065
|
t.where && (i = function(m) {
|
|
7066
|
-
const
|
|
7067
|
-
return
|
|
7066
|
+
const _ = ld(m);
|
|
7067
|
+
return _ instanceof Je && Fh(_) ? _.getFilters() : [_];
|
|
7068
7068
|
}(t.where));
|
|
7069
7069
|
let a = [];
|
|
7070
7070
|
t.orderBy && (a = function(m) {
|
|
7071
|
-
return m.map((
|
|
7071
|
+
return m.map((_) => function(S) {
|
|
7072
7072
|
return new Br(
|
|
7073
|
-
|
|
7073
|
+
Nn(S.field),
|
|
7074
7074
|
// visible for testing
|
|
7075
7075
|
function(k) {
|
|
7076
7076
|
switch (k) {
|
|
@@ -7081,24 +7081,24 @@ function Q_(n) {
|
|
|
7081
7081
|
default:
|
|
7082
7082
|
return;
|
|
7083
7083
|
}
|
|
7084
|
-
}(
|
|
7084
|
+
}(S.direction)
|
|
7085
7085
|
);
|
|
7086
|
-
}(
|
|
7086
|
+
}(_));
|
|
7087
7087
|
}(t.orderBy));
|
|
7088
7088
|
let c = null;
|
|
7089
7089
|
t.limit && (c = function(m) {
|
|
7090
|
-
let
|
|
7091
|
-
return
|
|
7090
|
+
let _;
|
|
7091
|
+
return _ = typeof m == "object" ? m.value : m, yi(_) ? null : _;
|
|
7092
7092
|
}(t.limit));
|
|
7093
7093
|
let l = null;
|
|
7094
7094
|
t.startAt && (l = function(m) {
|
|
7095
|
-
const
|
|
7096
|
-
return new zn(R,
|
|
7095
|
+
const _ = !!m.before, R = m.values || [];
|
|
7096
|
+
return new zn(R, _);
|
|
7097
7097
|
}(t.startAt));
|
|
7098
7098
|
let d = null;
|
|
7099
7099
|
return t.endAt && (d = function(m) {
|
|
7100
|
-
const
|
|
7101
|
-
return new zn(R,
|
|
7100
|
+
const _ = !m.before, R = m.values || [];
|
|
7101
|
+
return new zn(R, _);
|
|
7102
7102
|
}(t.endAt)), l_(e, s, a, i, c, "F", l, d);
|
|
7103
7103
|
}
|
|
7104
7104
|
function Y_(n, e) {
|
|
@@ -7126,22 +7126,22 @@ function ld(n) {
|
|
|
7126
7126
|
return n.unaryFilter !== void 0 ? function(t) {
|
|
7127
7127
|
switch (t.unaryFilter.op) {
|
|
7128
7128
|
case "IS_NAN":
|
|
7129
|
-
const r =
|
|
7129
|
+
const r = Nn(t.unaryFilter.field);
|
|
7130
7130
|
return le.create(r, "==", {
|
|
7131
7131
|
doubleValue: NaN
|
|
7132
7132
|
});
|
|
7133
7133
|
case "IS_NULL":
|
|
7134
|
-
const s =
|
|
7134
|
+
const s = Nn(t.unaryFilter.field);
|
|
7135
7135
|
return le.create(s, "==", {
|
|
7136
7136
|
nullValue: "NULL_VALUE"
|
|
7137
7137
|
});
|
|
7138
7138
|
case "IS_NOT_NAN":
|
|
7139
|
-
const i =
|
|
7139
|
+
const i = Nn(t.unaryFilter.field);
|
|
7140
7140
|
return le.create(i, "!=", {
|
|
7141
7141
|
doubleValue: NaN
|
|
7142
7142
|
});
|
|
7143
7143
|
case "IS_NOT_NULL":
|
|
7144
|
-
const a =
|
|
7144
|
+
const a = Nn(t.unaryFilter.field);
|
|
7145
7145
|
return le.create(a, "!=", {
|
|
7146
7146
|
nullValue: "NULL_VALUE"
|
|
7147
7147
|
});
|
|
@@ -7151,7 +7151,7 @@ function ld(n) {
|
|
|
7151
7151
|
return x(60726);
|
|
7152
7152
|
}
|
|
7153
7153
|
}(n) : n.fieldFilter !== void 0 ? function(t) {
|
|
7154
|
-
return le.create(
|
|
7154
|
+
return le.create(Nn(t.fieldFilter.field), function(s) {
|
|
7155
7155
|
switch (s) {
|
|
7156
7156
|
case "EQUAL":
|
|
7157
7157
|
return "==";
|
|
@@ -7208,7 +7208,7 @@ function Ot(n) {
|
|
|
7208
7208
|
fieldPath: n.canonicalString()
|
|
7209
7209
|
};
|
|
7210
7210
|
}
|
|
7211
|
-
function
|
|
7211
|
+
function Nn(n) {
|
|
7212
7212
|
return we.fromServerFormat(n.fieldPath);
|
|
7213
7213
|
}
|
|
7214
7214
|
function hd(n) {
|
|
@@ -7332,49 +7332,49 @@ class ry {
|
|
|
7332
7332
|
this.Sn = new sy();
|
|
7333
7333
|
}
|
|
7334
7334
|
addToCollectionParentIndex(e, t) {
|
|
7335
|
-
return this.Sn.add(t),
|
|
7335
|
+
return this.Sn.add(t), C.resolve();
|
|
7336
7336
|
}
|
|
7337
7337
|
getCollectionParents(e, t) {
|
|
7338
|
-
return
|
|
7338
|
+
return C.resolve(this.Sn.getEntries(t));
|
|
7339
7339
|
}
|
|
7340
7340
|
addFieldIndex(e, t) {
|
|
7341
|
-
return
|
|
7341
|
+
return C.resolve();
|
|
7342
7342
|
}
|
|
7343
7343
|
deleteFieldIndex(e, t) {
|
|
7344
|
-
return
|
|
7344
|
+
return C.resolve();
|
|
7345
7345
|
}
|
|
7346
7346
|
deleteAllFieldIndexes(e) {
|
|
7347
|
-
return
|
|
7347
|
+
return C.resolve();
|
|
7348
7348
|
}
|
|
7349
7349
|
createTargetIndexes(e, t) {
|
|
7350
|
-
return
|
|
7350
|
+
return C.resolve();
|
|
7351
7351
|
}
|
|
7352
7352
|
getDocumentsMatchingTarget(e, t) {
|
|
7353
|
-
return
|
|
7353
|
+
return C.resolve(null);
|
|
7354
7354
|
}
|
|
7355
7355
|
getIndexType(e, t) {
|
|
7356
|
-
return
|
|
7356
|
+
return C.resolve(
|
|
7357
7357
|
0
|
|
7358
7358
|
/* IndexType.NONE */
|
|
7359
7359
|
);
|
|
7360
7360
|
}
|
|
7361
7361
|
getFieldIndexes(e, t) {
|
|
7362
|
-
return
|
|
7362
|
+
return C.resolve([]);
|
|
7363
7363
|
}
|
|
7364
7364
|
getNextCollectionGroupToUpdate(e) {
|
|
7365
|
-
return
|
|
7365
|
+
return C.resolve(null);
|
|
7366
7366
|
}
|
|
7367
7367
|
getMinOffset(e, t) {
|
|
7368
|
-
return
|
|
7368
|
+
return C.resolve(zt.min());
|
|
7369
7369
|
}
|
|
7370
7370
|
getMinOffsetFromCollectionGroup(e, t) {
|
|
7371
|
-
return
|
|
7371
|
+
return C.resolve(zt.min());
|
|
7372
7372
|
}
|
|
7373
7373
|
updateCollectionGroup(e, t, r) {
|
|
7374
|
-
return
|
|
7374
|
+
return C.resolve();
|
|
7375
7375
|
}
|
|
7376
7376
|
updateIndexEntries(e, t) {
|
|
7377
|
-
return
|
|
7377
|
+
return C.resolve();
|
|
7378
7378
|
}
|
|
7379
7379
|
}
|
|
7380
7380
|
class sy {
|
|
@@ -7480,7 +7480,7 @@ class cy {
|
|
|
7480
7480
|
return this.Vr.dr(e).next((r) => Math.floor(t / 100 * r));
|
|
7481
7481
|
}
|
|
7482
7482
|
nthSequenceNumber(e, t) {
|
|
7483
|
-
if (t === 0) return
|
|
7483
|
+
if (t === 0) return C.resolve(_i.ce);
|
|
7484
7484
|
const r = new oy(t);
|
|
7485
7485
|
return this.Vr.forEachTarget(e, (s) => r.Er(s.sequenceNumber)).next(() => this.Vr.mr(e, (s) => r.Er(s))).next(() => r.maxValue);
|
|
7486
7486
|
}
|
|
@@ -7491,7 +7491,7 @@ class cy {
|
|
|
7491
7491
|
return this.Vr.removeOrphanedDocuments(e, t);
|
|
7492
7492
|
}
|
|
7493
7493
|
collect(e, t) {
|
|
7494
|
-
return this.params.cacheSizeCollectionThreshold === -1 ? (V("LruGarbageCollector", "Garbage collection skipped; disabled"),
|
|
7494
|
+
return this.params.cacheSizeCollectionThreshold === -1 ? (V("LruGarbageCollector", "Garbage collection skipped; disabled"), C.resolve(Ku)) : this.getCacheSize(e).next((r) => r < this.params.cacheSizeCollectionThreshold ? (V("LruGarbageCollector", `Garbage collection skipped; Cache size ${r} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`), Ku) : this.gr(e, t));
|
|
7495
7495
|
}
|
|
7496
7496
|
getCacheSize(e) {
|
|
7497
7497
|
return this.Vr.getCacheSize(e);
|
|
@@ -7507,7 +7507,7 @@ class cy {
|
|
|
7507
7507
|
Determined least recently used ${s} in ` + (c - a) + `ms
|
|
7508
7508
|
Removed ${i} targets in ` + (l - c) + `ms
|
|
7509
7509
|
Removed ${m} documents in ` + (d - l) + `ms
|
|
7510
|
-
Total Duration: ${d - f}ms`),
|
|
7510
|
+
Total Duration: ${d - f}ms`), C.resolve({
|
|
7511
7511
|
didRun: !0,
|
|
7512
7512
|
sequenceNumbersCollected: s,
|
|
7513
7513
|
targetsRemoved: i,
|
|
@@ -7520,7 +7520,7 @@ function uy(n, e) {
|
|
|
7520
7520
|
}
|
|
7521
7521
|
class ly {
|
|
7522
7522
|
constructor() {
|
|
7523
|
-
this.changes = new
|
|
7523
|
+
this.changes = new In((e) => e.toString(), (e, t) => e.isEqual(t)), this.changesApplied = !1;
|
|
7524
7524
|
}
|
|
7525
7525
|
/**
|
|
7526
7526
|
* Buffers a `RemoteDocumentCache.addEntry()` call.
|
|
@@ -7554,7 +7554,7 @@ class ly {
|
|
|
7554
7554
|
getEntry(e, t) {
|
|
7555
7555
|
this.assertNotApplied();
|
|
7556
7556
|
const r = this.changes.get(t);
|
|
7557
|
-
return r !== void 0 ?
|
|
7557
|
+
return r !== void 0 ? C.resolve(r) : this.getFromCache(e, t);
|
|
7558
7558
|
}
|
|
7559
7559
|
/**
|
|
7560
7560
|
* Looks up several entries in the cache, forwarding to
|
|
@@ -7692,14 +7692,14 @@ class dy {
|
|
|
7692
7692
|
const a = [], c = s.getReverseIterator();
|
|
7693
7693
|
for (; c.hasNext(); ) {
|
|
7694
7694
|
const l = c.getNext(), d = l.key, f = l.value, m = Kh();
|
|
7695
|
-
f.forEach((
|
|
7696
|
-
if (!i.has(
|
|
7697
|
-
const R = ed(t.get(
|
|
7698
|
-
R !== null && m.set(
|
|
7695
|
+
f.forEach((_) => {
|
|
7696
|
+
if (!i.has(_)) {
|
|
7697
|
+
const R = ed(t.get(_), r.get(_));
|
|
7698
|
+
R !== null && m.set(_, R), i = i.add(_);
|
|
7699
7699
|
}
|
|
7700
7700
|
}), a.push(this.documentOverlayCache.saveOverlays(e, d, m));
|
|
7701
7701
|
}
|
|
7702
|
-
return
|
|
7702
|
+
return C.waitFor(a);
|
|
7703
7703
|
}).next(() => r);
|
|
7704
7704
|
}
|
|
7705
7705
|
/**
|
|
@@ -7738,10 +7738,10 @@ class dy {
|
|
|
7738
7738
|
*/
|
|
7739
7739
|
getNextDocuments(e, t, r, s) {
|
|
7740
7740
|
return this.remoteDocumentCache.getAllFromCollectionGroup(e, t, r, s).next((i) => {
|
|
7741
|
-
const a = s - i.size > 0 ? this.documentOverlayCache.getOverlaysForCollectionGroup(e, t, r.largestBatchId, s - i.size) :
|
|
7741
|
+
const a = s - i.size > 0 ? this.documentOverlayCache.getOverlaysForCollectionGroup(e, t, r.largestBatchId, s - i.size) : C.resolve(cn());
|
|
7742
7742
|
let c = Mr, l = i;
|
|
7743
|
-
return a.next((d) =>
|
|
7744
|
-
l = l.insert(f,
|
|
7743
|
+
return a.next((d) => C.forEach(d, (f, m) => (c < m.largestBatchId && (c = m.largestBatchId), i.get(f) ? C.resolve() : this.remoteDocumentCache.getEntry(e, f).next((_) => {
|
|
7744
|
+
l = l.insert(f, _);
|
|
7745
7745
|
}))).next(() => this.populateOverlays(e, d, i)).next(() => this.computeViews(e, l, d, G())).next((f) => ({
|
|
7746
7746
|
batchId: c,
|
|
7747
7747
|
changes: Gh(f)
|
|
@@ -7757,10 +7757,10 @@ class dy {
|
|
|
7757
7757
|
getDocumentsMatchingCollectionGroupQuery(e, t, r, s) {
|
|
7758
7758
|
const i = t.collectionGroup;
|
|
7759
7759
|
let a = br();
|
|
7760
|
-
return this.indexManager.getCollectionParents(e, i).next((c) =>
|
|
7761
|
-
const d = function(m,
|
|
7762
|
-
return new
|
|
7763
|
-
|
|
7760
|
+
return this.indexManager.getCollectionParents(e, i).next((c) => C.forEach(c, (l) => {
|
|
7761
|
+
const d = function(m, _) {
|
|
7762
|
+
return new wn(
|
|
7763
|
+
_,
|
|
7764
7764
|
/*collectionGroup=*/
|
|
7765
7765
|
null,
|
|
7766
7766
|
m.explicitOrderBy.slice(),
|
|
@@ -7772,8 +7772,8 @@ class dy {
|
|
|
7772
7772
|
);
|
|
7773
7773
|
}(t, l.child(i));
|
|
7774
7774
|
return this.getDocumentsMatchingCollectionQuery(e, d, r, s).next((f) => {
|
|
7775
|
-
f.forEach((m,
|
|
7776
|
-
a = a.insert(m,
|
|
7775
|
+
f.forEach((m, _) => {
|
|
7776
|
+
a = a.insert(m, _);
|
|
7777
7777
|
});
|
|
7778
7778
|
});
|
|
7779
7779
|
}).next(() => a));
|
|
@@ -7799,7 +7799,7 @@ class fy {
|
|
|
7799
7799
|
this.serializer = e, this.Nr = /* @__PURE__ */ new Map(), this.Br = /* @__PURE__ */ new Map();
|
|
7800
7800
|
}
|
|
7801
7801
|
getBundleMetadata(e, t) {
|
|
7802
|
-
return
|
|
7802
|
+
return C.resolve(this.Nr.get(t));
|
|
7803
7803
|
}
|
|
7804
7804
|
saveBundleMetadata(e, t) {
|
|
7805
7805
|
return this.Nr.set(
|
|
@@ -7812,10 +7812,10 @@ class fy {
|
|
|
7812
7812
|
createTime: ct(s.createTime)
|
|
7813
7813
|
};
|
|
7814
7814
|
}(t)
|
|
7815
|
-
),
|
|
7815
|
+
), C.resolve();
|
|
7816
7816
|
}
|
|
7817
7817
|
getNamedQuery(e, t) {
|
|
7818
|
-
return
|
|
7818
|
+
return C.resolve(this.Br.get(t));
|
|
7819
7819
|
}
|
|
7820
7820
|
saveNamedQuery(e, t) {
|
|
7821
7821
|
return this.Br.set(t.name, function(s) {
|
|
@@ -7824,7 +7824,7 @@ class fy {
|
|
|
7824
7824
|
query: ny(s.bundledQuery),
|
|
7825
7825
|
readTime: ct(s.readTime)
|
|
7826
7826
|
};
|
|
7827
|
-
}(t)),
|
|
7827
|
+
}(t)), C.resolve();
|
|
7828
7828
|
}
|
|
7829
7829
|
}
|
|
7830
7830
|
class py {
|
|
@@ -7832,22 +7832,22 @@ class py {
|
|
|
7832
7832
|
this.overlays = new se(L.comparator), this.Lr = /* @__PURE__ */ new Map();
|
|
7833
7833
|
}
|
|
7834
7834
|
getOverlay(e, t) {
|
|
7835
|
-
return
|
|
7835
|
+
return C.resolve(this.overlays.get(t));
|
|
7836
7836
|
}
|
|
7837
7837
|
getOverlays(e, t) {
|
|
7838
7838
|
const r = cn();
|
|
7839
|
-
return
|
|
7839
|
+
return C.forEach(t, (s) => this.getOverlay(e, s).next((i) => {
|
|
7840
7840
|
i !== null && r.set(s, i);
|
|
7841
7841
|
})).next(() => r);
|
|
7842
7842
|
}
|
|
7843
7843
|
saveOverlays(e, t, r) {
|
|
7844
7844
|
return r.forEach((s, i) => {
|
|
7845
7845
|
this.bt(e, t, i);
|
|
7846
|
-
}),
|
|
7846
|
+
}), C.resolve();
|
|
7847
7847
|
}
|
|
7848
7848
|
removeOverlaysForBatchId(e, t, r) {
|
|
7849
7849
|
const s = this.Lr.get(r);
|
|
7850
|
-
return s !== void 0 && (s.forEach((i) => this.overlays = this.overlays.remove(i)), this.Lr.delete(r)),
|
|
7850
|
+
return s !== void 0 && (s.forEach((i) => this.overlays = this.overlays.remove(i)), this.Lr.delete(r)), C.resolve();
|
|
7851
7851
|
}
|
|
7852
7852
|
getOverlaysForCollection(e, t, r) {
|
|
7853
7853
|
const s = cn(), i = t.length + 1, a = new L(t.child("")), c = this.overlays.getIteratorFrom(a);
|
|
@@ -7856,7 +7856,7 @@ class py {
|
|
|
7856
7856
|
if (!t.isPrefixOf(d.path)) break;
|
|
7857
7857
|
d.path.length === i && l.largestBatchId > r && s.set(l.getKey(), l);
|
|
7858
7858
|
}
|
|
7859
|
-
return
|
|
7859
|
+
return C.resolve(s);
|
|
7860
7860
|
}
|
|
7861
7861
|
getOverlaysForCollectionGroup(e, t, r, s) {
|
|
7862
7862
|
let i = new se((d, f) => d - f);
|
|
@@ -7871,7 +7871,7 @@ class py {
|
|
|
7871
7871
|
const c = cn(), l = i.getIterator();
|
|
7872
7872
|
for (; l.hasNext() && (l.getNext().value.forEach((d, f) => c.set(d, f)), !(c.size() >= s)); )
|
|
7873
7873
|
;
|
|
7874
|
-
return
|
|
7874
|
+
return C.resolve(c);
|
|
7875
7875
|
}
|
|
7876
7876
|
bt(e, t, r) {
|
|
7877
7877
|
const s = this.overlays.get(r.key);
|
|
@@ -7889,10 +7889,10 @@ class my {
|
|
|
7889
7889
|
this.sessionToken = Ie.EMPTY_BYTE_STRING;
|
|
7890
7890
|
}
|
|
7891
7891
|
getSessionToken(e) {
|
|
7892
|
-
return
|
|
7892
|
+
return C.resolve(this.sessionToken);
|
|
7893
7893
|
}
|
|
7894
7894
|
setSessionToken(e, t) {
|
|
7895
|
-
return this.sessionToken = t,
|
|
7895
|
+
return this.sessionToken = t, C.resolve();
|
|
7896
7896
|
}
|
|
7897
7897
|
}
|
|
7898
7898
|
class ya {
|
|
@@ -7975,7 +7975,7 @@ class gy {
|
|
|
7975
7975
|
this.Jr = new me(ye.Kr);
|
|
7976
7976
|
}
|
|
7977
7977
|
checkEmpty(e) {
|
|
7978
|
-
return
|
|
7978
|
+
return C.resolve(this.mutationQueue.length === 0);
|
|
7979
7979
|
}
|
|
7980
7980
|
addMutationBatch(e, t, r, s) {
|
|
7981
7981
|
const i = this.Yn;
|
|
@@ -7983,27 +7983,27 @@ class gy {
|
|
|
7983
7983
|
const a = new k_(i, t, r, s);
|
|
7984
7984
|
this.mutationQueue.push(a);
|
|
7985
7985
|
for (const c of s) this.Jr = this.Jr.add(new ye(c.key, i)), this.indexManager.addToCollectionParentIndex(e, c.key.path.popLast());
|
|
7986
|
-
return
|
|
7986
|
+
return C.resolve(a);
|
|
7987
7987
|
}
|
|
7988
7988
|
lookupMutationBatch(e, t) {
|
|
7989
|
-
return
|
|
7989
|
+
return C.resolve(this.Zr(t));
|
|
7990
7990
|
}
|
|
7991
7991
|
getNextMutationBatchAfterBatchId(e, t) {
|
|
7992
7992
|
const r = t + 1, s = this.Xr(r), i = s < 0 ? 0 : s;
|
|
7993
|
-
return
|
|
7993
|
+
return C.resolve(this.mutationQueue.length > i ? this.mutationQueue[i] : null);
|
|
7994
7994
|
}
|
|
7995
7995
|
getHighestUnacknowledgedBatchId() {
|
|
7996
|
-
return
|
|
7996
|
+
return C.resolve(this.mutationQueue.length === 0 ? ua : this.Yn - 1);
|
|
7997
7997
|
}
|
|
7998
7998
|
getAllMutationBatches(e) {
|
|
7999
|
-
return
|
|
7999
|
+
return C.resolve(this.mutationQueue.slice());
|
|
8000
8000
|
}
|
|
8001
8001
|
getAllMutationBatchesAffectingDocumentKey(e, t) {
|
|
8002
8002
|
const r = new ye(t, 0), s = new ye(t, Number.POSITIVE_INFINITY), i = [];
|
|
8003
8003
|
return this.Jr.forEachInRange([r, s], (a) => {
|
|
8004
8004
|
const c = this.Zr(a.Hr);
|
|
8005
8005
|
i.push(c);
|
|
8006
|
-
}),
|
|
8006
|
+
}), C.resolve(i);
|
|
8007
8007
|
}
|
|
8008
8008
|
getAllMutationBatchesAffectingDocumentKeys(e, t) {
|
|
8009
8009
|
let r = new me(W);
|
|
@@ -8012,7 +8012,7 @@ class gy {
|
|
|
8012
8012
|
this.Jr.forEachInRange([i, a], (c) => {
|
|
8013
8013
|
r = r.add(c.Hr);
|
|
8014
8014
|
});
|
|
8015
|
-
}),
|
|
8015
|
+
}), C.resolve(this.Yr(r));
|
|
8016
8016
|
}
|
|
8017
8017
|
getAllMutationBatchesAffectingQuery(e, t) {
|
|
8018
8018
|
const r = t.path, s = r.length + 1;
|
|
@@ -8028,7 +8028,7 @@ class gy {
|
|
|
8028
8028
|
// TODO(mcg): we'll need a different scanner when we implement
|
|
8029
8029
|
// ancestor queries.
|
|
8030
8030
|
(d.length === s && (c = c.add(l.Hr)), !0);
|
|
8031
|
-
}, a),
|
|
8031
|
+
}, a), C.resolve(this.Yr(c));
|
|
8032
8032
|
}
|
|
8033
8033
|
Yr(e) {
|
|
8034
8034
|
const t = [];
|
|
@@ -8040,7 +8040,7 @@ class gy {
|
|
|
8040
8040
|
removeMutationBatch(e, t) {
|
|
8041
8041
|
Y(this.ei(t.batchId, "removed") === 0, 55003), this.mutationQueue.shift();
|
|
8042
8042
|
let r = this.Jr;
|
|
8043
|
-
return
|
|
8043
|
+
return C.forEach(t.mutations, (s) => {
|
|
8044
8044
|
const i = new ye(s.key, t.batchId);
|
|
8045
8045
|
return r = r.delete(i), this.referenceDelegate.markPotentiallyOrphaned(e, s.key);
|
|
8046
8046
|
}).next(() => {
|
|
@@ -8051,10 +8051,10 @@ class gy {
|
|
|
8051
8051
|
}
|
|
8052
8052
|
containsKey(e, t) {
|
|
8053
8053
|
const r = new ye(t, 0), s = this.Jr.firstAfterOrEqual(r);
|
|
8054
|
-
return
|
|
8054
|
+
return C.resolve(t.isEqual(s && s.key));
|
|
8055
8055
|
}
|
|
8056
8056
|
performConsistencyCheck(e) {
|
|
8057
|
-
return this.mutationQueue.length,
|
|
8057
|
+
return this.mutationQueue.length, C.resolve();
|
|
8058
8058
|
}
|
|
8059
8059
|
/**
|
|
8060
8060
|
* Finds the index of the given batchId in the mutation queue and asserts that
|
|
@@ -8129,14 +8129,14 @@ class _y {
|
|
|
8129
8129
|
}
|
|
8130
8130
|
getEntry(e, t) {
|
|
8131
8131
|
const r = this.docs.get(t);
|
|
8132
|
-
return
|
|
8132
|
+
return C.resolve(r ? r.document.mutableCopy() : be.newInvalidDocument(t));
|
|
8133
8133
|
}
|
|
8134
8134
|
getEntries(e, t) {
|
|
8135
8135
|
let r = It();
|
|
8136
8136
|
return t.forEach((s) => {
|
|
8137
8137
|
const i = this.docs.get(s);
|
|
8138
8138
|
r = r.insert(s, i ? i.document.mutableCopy() : be.newInvalidDocument(s));
|
|
8139
|
-
}),
|
|
8139
|
+
}), C.resolve(r);
|
|
8140
8140
|
}
|
|
8141
8141
|
getDocumentsMatchingQuery(e, t, r, s) {
|
|
8142
8142
|
let i = It();
|
|
@@ -8146,19 +8146,19 @@ class _y {
|
|
|
8146
8146
|
if (!a.isPrefixOf(d.path)) break;
|
|
8147
8147
|
d.path.length > a.length + 1 || Bg(Fg(f), r) <= 0 || (s.has(f.key) || vi(t, f)) && (i = i.insert(f.key, f.mutableCopy()));
|
|
8148
8148
|
}
|
|
8149
|
-
return
|
|
8149
|
+
return C.resolve(i);
|
|
8150
8150
|
}
|
|
8151
8151
|
getAllFromCollectionGroup(e, t, r, s) {
|
|
8152
8152
|
x(9500);
|
|
8153
8153
|
}
|
|
8154
8154
|
ni(e, t) {
|
|
8155
|
-
return
|
|
8155
|
+
return C.forEach(this.docs, (r) => t(r));
|
|
8156
8156
|
}
|
|
8157
8157
|
newChangeBuffer(e) {
|
|
8158
8158
|
return new yy(this);
|
|
8159
8159
|
}
|
|
8160
8160
|
getSize(e) {
|
|
8161
|
-
return
|
|
8161
|
+
return C.resolve(this.size);
|
|
8162
8162
|
}
|
|
8163
8163
|
}
|
|
8164
8164
|
class yy extends ly {
|
|
@@ -8169,7 +8169,7 @@ class yy extends ly {
|
|
|
8169
8169
|
const t = [];
|
|
8170
8170
|
return this.changes.forEach((r, s) => {
|
|
8171
8171
|
s.isValidDocument() ? t.push(this.Mr.addEntry(e, s)) : this.Mr.removeEntry(r);
|
|
8172
|
-
}),
|
|
8172
|
+
}), C.waitFor(t);
|
|
8173
8173
|
}
|
|
8174
8174
|
getFromCache(e, t) {
|
|
8175
8175
|
return this.Mr.getEntry(e, t);
|
|
@@ -8183,7 +8183,7 @@ class Ey {
|
|
|
8183
8183
|
this.persistence = e, /**
|
|
8184
8184
|
* Maps a target to the data about that target
|
|
8185
8185
|
*/
|
|
8186
|
-
this.ri = new
|
|
8186
|
+
this.ri = new In((t) => ha(t), da), /** The last received snapshot version. */
|
|
8187
8187
|
this.lastRemoteSnapshotVersion = B.min(), /** The highest numbered target ID encountered. */
|
|
8188
8188
|
this.highestTargetId = 0, /** The highest sequence number encountered. */
|
|
8189
8189
|
this.ii = 0, /**
|
|
@@ -8193,19 +8193,19 @@ class Ey {
|
|
|
8193
8193
|
this.si = new ya(), this.targetCount = 0, this.oi = Hn._r();
|
|
8194
8194
|
}
|
|
8195
8195
|
forEachTarget(e, t) {
|
|
8196
|
-
return this.ri.forEach((r, s) => t(s)),
|
|
8196
|
+
return this.ri.forEach((r, s) => t(s)), C.resolve();
|
|
8197
8197
|
}
|
|
8198
8198
|
getLastRemoteSnapshotVersion(e) {
|
|
8199
|
-
return
|
|
8199
|
+
return C.resolve(this.lastRemoteSnapshotVersion);
|
|
8200
8200
|
}
|
|
8201
8201
|
getHighestSequenceNumber(e) {
|
|
8202
|
-
return
|
|
8202
|
+
return C.resolve(this.ii);
|
|
8203
8203
|
}
|
|
8204
8204
|
allocateTargetId(e) {
|
|
8205
|
-
return this.highestTargetId = this.oi.next(),
|
|
8205
|
+
return this.highestTargetId = this.oi.next(), C.resolve(this.highestTargetId);
|
|
8206
8206
|
}
|
|
8207
8207
|
setTargetsMetadata(e, t, r) {
|
|
8208
|
-
return r && (this.lastRemoteSnapshotVersion = r), t > this.ii && (this.ii = t),
|
|
8208
|
+
return r && (this.lastRemoteSnapshotVersion = r), t > this.ii && (this.ii = t), C.resolve();
|
|
8209
8209
|
}
|
|
8210
8210
|
lr(e) {
|
|
8211
8211
|
this.ri.set(e.target, e);
|
|
@@ -8213,47 +8213,47 @@ class Ey {
|
|
|
8213
8213
|
t > this.highestTargetId && (this.oi = new Hn(t), this.highestTargetId = t), e.sequenceNumber > this.ii && (this.ii = e.sequenceNumber);
|
|
8214
8214
|
}
|
|
8215
8215
|
addTargetData(e, t) {
|
|
8216
|
-
return this.lr(t), this.targetCount += 1,
|
|
8216
|
+
return this.lr(t), this.targetCount += 1, C.resolve();
|
|
8217
8217
|
}
|
|
8218
8218
|
updateTargetData(e, t) {
|
|
8219
|
-
return this.lr(t),
|
|
8219
|
+
return this.lr(t), C.resolve();
|
|
8220
8220
|
}
|
|
8221
8221
|
removeTargetData(e, t) {
|
|
8222
|
-
return this.ri.delete(t.target), this.si.Gr(t.targetId), this.targetCount -= 1,
|
|
8222
|
+
return this.ri.delete(t.target), this.si.Gr(t.targetId), this.targetCount -= 1, C.resolve();
|
|
8223
8223
|
}
|
|
8224
8224
|
removeTargets(e, t, r) {
|
|
8225
8225
|
let s = 0;
|
|
8226
8226
|
const i = [];
|
|
8227
8227
|
return this.ri.forEach((a, c) => {
|
|
8228
8228
|
c.sequenceNumber <= t && r.get(c.targetId) === null && (this.ri.delete(a), i.push(this.removeMatchingKeysForTargetId(e, c.targetId)), s++);
|
|
8229
|
-
}),
|
|
8229
|
+
}), C.waitFor(i).next(() => s);
|
|
8230
8230
|
}
|
|
8231
8231
|
getTargetCount(e) {
|
|
8232
|
-
return
|
|
8232
|
+
return C.resolve(this.targetCount);
|
|
8233
8233
|
}
|
|
8234
8234
|
getTargetData(e, t) {
|
|
8235
8235
|
const r = this.ri.get(t) || null;
|
|
8236
|
-
return
|
|
8236
|
+
return C.resolve(r);
|
|
8237
8237
|
}
|
|
8238
8238
|
addMatchingKeys(e, t, r) {
|
|
8239
|
-
return this.si.$r(t, r),
|
|
8239
|
+
return this.si.$r(t, r), C.resolve();
|
|
8240
8240
|
}
|
|
8241
8241
|
removeMatchingKeys(e, t, r) {
|
|
8242
8242
|
this.si.Qr(t, r);
|
|
8243
8243
|
const s = this.persistence.referenceDelegate, i = [];
|
|
8244
8244
|
return s && t.forEach((a) => {
|
|
8245
8245
|
i.push(s.markPotentiallyOrphaned(e, a));
|
|
8246
|
-
}),
|
|
8246
|
+
}), C.waitFor(i);
|
|
8247
8247
|
}
|
|
8248
8248
|
removeMatchingKeysForTargetId(e, t) {
|
|
8249
|
-
return this.si.Gr(t),
|
|
8249
|
+
return this.si.Gr(t), C.resolve();
|
|
8250
8250
|
}
|
|
8251
8251
|
getMatchingKeysForTargetId(e, t) {
|
|
8252
8252
|
const r = this.si.jr(t);
|
|
8253
|
-
return
|
|
8253
|
+
return C.resolve(r);
|
|
8254
8254
|
}
|
|
8255
8255
|
containsKey(e, t) {
|
|
8256
|
-
return
|
|
8256
|
+
return C.resolve(this.si.containsKey(t));
|
|
8257
8257
|
}
|
|
8258
8258
|
}
|
|
8259
8259
|
class md {
|
|
@@ -8310,7 +8310,7 @@ class md {
|
|
|
8310
8310
|
return this.referenceDelegate.Ti(), r(s).next((i) => this.referenceDelegate.Ii(s).next(() => i)).toPromise().then((i) => (s.raiseOnCommittedEvent(), i));
|
|
8311
8311
|
}
|
|
8312
8312
|
Ei(e, t) {
|
|
8313
|
-
return
|
|
8313
|
+
return C.or(Object.values(this._i).map((r) => () => r.containsKey(e, t)));
|
|
8314
8314
|
}
|
|
8315
8315
|
}
|
|
8316
8316
|
class Ty extends jg {
|
|
@@ -8332,13 +8332,13 @@ class Ea {
|
|
|
8332
8332
|
throw x(60996);
|
|
8333
8333
|
}
|
|
8334
8334
|
addReference(e, t, r) {
|
|
8335
|
-
return this.Ri.addReference(r, t), this.di.delete(r.toString()),
|
|
8335
|
+
return this.Ri.addReference(r, t), this.di.delete(r.toString()), C.resolve();
|
|
8336
8336
|
}
|
|
8337
8337
|
removeReference(e, t, r) {
|
|
8338
|
-
return this.Ri.removeReference(r, t), this.di.add(r.toString()),
|
|
8338
|
+
return this.Ri.removeReference(r, t), this.di.add(r.toString()), C.resolve();
|
|
8339
8339
|
}
|
|
8340
8340
|
markPotentiallyOrphaned(e, t) {
|
|
8341
|
-
return this.di.add(t.toString()),
|
|
8341
|
+
return this.di.add(t.toString()), C.resolve();
|
|
8342
8342
|
}
|
|
8343
8343
|
removeTarget(e, t) {
|
|
8344
8344
|
this.Ri.Gr(t.targetId).forEach((s) => this.di.add(s.toString()));
|
|
@@ -8352,7 +8352,7 @@ class Ea {
|
|
|
8352
8352
|
}
|
|
8353
8353
|
Ii(e) {
|
|
8354
8354
|
const t = this.persistence.getRemoteDocumentCache().newChangeBuffer();
|
|
8355
|
-
return
|
|
8355
|
+
return C.forEach(this.di, (r) => {
|
|
8356
8356
|
const s = L.fromPath(r);
|
|
8357
8357
|
return this.mi(e, s).next((i) => {
|
|
8358
8358
|
i || t.removeEntry(s, B.min());
|
|
@@ -8368,12 +8368,12 @@ class Ea {
|
|
|
8368
8368
|
return 0;
|
|
8369
8369
|
}
|
|
8370
8370
|
mi(e, t) {
|
|
8371
|
-
return
|
|
8371
|
+
return C.or([() => C.resolve(this.Ri.containsKey(t)), () => this.persistence.getTargetCache().containsKey(e, t), () => this.persistence.Ei(e, t)]);
|
|
8372
8372
|
}
|
|
8373
8373
|
}
|
|
8374
8374
|
class Js {
|
|
8375
8375
|
constructor(e, t) {
|
|
8376
|
-
this.persistence = e, this.fi = new
|
|
8376
|
+
this.persistence = e, this.fi = new In((r) => Hg(r.path), (r, s) => r.isEqual(s)), this.garbageCollector = uy(this, t);
|
|
8377
8377
|
}
|
|
8378
8378
|
static Vi(e, t) {
|
|
8379
8379
|
return new Js(e, t);
|
|
@@ -8383,7 +8383,7 @@ class Js {
|
|
|
8383
8383
|
Ti() {
|
|
8384
8384
|
}
|
|
8385
8385
|
Ii(e) {
|
|
8386
|
-
return
|
|
8386
|
+
return C.resolve();
|
|
8387
8387
|
}
|
|
8388
8388
|
forEachTarget(e, t) {
|
|
8389
8389
|
return this.persistence.getTargetCache().forEachTarget(e, t);
|
|
@@ -8399,7 +8399,7 @@ class Js {
|
|
|
8399
8399
|
}).next(() => t);
|
|
8400
8400
|
}
|
|
8401
8401
|
mr(e, t) {
|
|
8402
|
-
return
|
|
8402
|
+
return C.forEach(this.fi, (r, s) => this.wr(e, r, s).next((i) => i ? C.resolve() : t(s)));
|
|
8403
8403
|
}
|
|
8404
8404
|
removeTargets(e, t, r) {
|
|
8405
8405
|
return this.persistence.getTargetCache().removeTargets(e, t, r);
|
|
@@ -8412,29 +8412,29 @@ class Js {
|
|
|
8412
8412
|
})).next(() => i.apply(e)).next(() => r);
|
|
8413
8413
|
}
|
|
8414
8414
|
markPotentiallyOrphaned(e, t) {
|
|
8415
|
-
return this.fi.set(t, e.currentSequenceNumber),
|
|
8415
|
+
return this.fi.set(t, e.currentSequenceNumber), C.resolve();
|
|
8416
8416
|
}
|
|
8417
8417
|
removeTarget(e, t) {
|
|
8418
8418
|
const r = t.withSequenceNumber(e.currentSequenceNumber);
|
|
8419
8419
|
return this.persistence.getTargetCache().updateTargetData(e, r);
|
|
8420
8420
|
}
|
|
8421
8421
|
addReference(e, t, r) {
|
|
8422
|
-
return this.fi.set(r, e.currentSequenceNumber),
|
|
8422
|
+
return this.fi.set(r, e.currentSequenceNumber), C.resolve();
|
|
8423
8423
|
}
|
|
8424
8424
|
removeReference(e, t, r) {
|
|
8425
|
-
return this.fi.set(r, e.currentSequenceNumber),
|
|
8425
|
+
return this.fi.set(r, e.currentSequenceNumber), C.resolve();
|
|
8426
8426
|
}
|
|
8427
8427
|
updateLimboDocument(e, t) {
|
|
8428
|
-
return this.fi.set(t, e.currentSequenceNumber),
|
|
8428
|
+
return this.fi.set(t, e.currentSequenceNumber), C.resolve();
|
|
8429
8429
|
}
|
|
8430
8430
|
hi(e) {
|
|
8431
8431
|
let t = e.key.toString().length;
|
|
8432
8432
|
return e.isFoundDocument() && (t += Ds(e.data.value)), t;
|
|
8433
8433
|
}
|
|
8434
8434
|
wr(e, t, r) {
|
|
8435
|
-
return
|
|
8435
|
+
return C.or([() => this.persistence.Ei(e, t), () => this.persistence.getTargetCache().containsKey(e, t), () => {
|
|
8436
8436
|
const s = this.fi.get(t);
|
|
8437
|
-
return
|
|
8437
|
+
return C.resolve(s !== void 0 && s > r);
|
|
8438
8438
|
}]);
|
|
8439
8439
|
}
|
|
8440
8440
|
getCacheSize(e) {
|
|
@@ -8481,7 +8481,7 @@ class Iy {
|
|
|
8481
8481
|
* experiment [enter PR experiment URL here].
|
|
8482
8482
|
*/
|
|
8483
8483
|
function() {
|
|
8484
|
-
return am() ? 8 : $g(
|
|
8484
|
+
return am() ? 8 : $g(Ce()) > 0 ? 6 : 4;
|
|
8485
8485
|
}();
|
|
8486
8486
|
}
|
|
8487
8487
|
/** Sets the document view to query against. */
|
|
@@ -8508,7 +8508,7 @@ class Iy {
|
|
|
8508
8508
|
}).next(() => i.result);
|
|
8509
8509
|
}
|
|
8510
8510
|
ws(e, t, r, s) {
|
|
8511
|
-
return r.documentReadCount < this.Vs ? (Sn() <= H.DEBUG && V("QueryEngine", "SDK will not create cache indexes for query:",
|
|
8511
|
+
return r.documentReadCount < this.Vs ? (Sn() <= H.DEBUG && V("QueryEngine", "SDK will not create cache indexes for query:", kn(t), "since it only creates cache indexes for collection contains", "more than or equal to", this.Vs, "documents"), C.resolve()) : (Sn() <= H.DEBUG && V("QueryEngine", "Query:", kn(t), "scans", r.documentReadCount, "local documents and returns", s, "documents as results."), r.documentReadCount > this.ds * s ? (Sn() <= H.DEBUG && V("QueryEngine", "The SDK decides to create cache indexes for query:", kn(t), "as using cache indexes may help improve performance."), this.indexManager.createTargetIndexes(e, at(t))) : C.resolve());
|
|
8512
8512
|
}
|
|
8513
8513
|
/**
|
|
8514
8514
|
* Performs an indexed query that evaluates the query based on a collection's
|
|
@@ -8516,7 +8516,7 @@ class Iy {
|
|
|
8516
8516
|
*/
|
|
8517
8517
|
gs(e, t) {
|
|
8518
8518
|
if (Uu(t))
|
|
8519
|
-
return
|
|
8519
|
+
return C.resolve(null);
|
|
8520
8520
|
let r = at(t);
|
|
8521
8521
|
return this.indexManager.getIndexType(e, r).next((s) => s === 0 ? null : (t.limit !== null && s === 1 && // We cannot apply a limit for targets that are served using a partial
|
|
8522
8522
|
// index. If a partial index will be used to serve the target, the
|
|
@@ -8548,9 +8548,9 @@ class Iy {
|
|
|
8548
8548
|
* `null` if the mapping is not available or cannot be used.
|
|
8549
8549
|
*/
|
|
8550
8550
|
ps(e, t, r, s) {
|
|
8551
|
-
return Uu(t) || s.isEqual(B.min()) ?
|
|
8551
|
+
return Uu(t) || s.isEqual(B.min()) ? C.resolve(null) : this.fs.getDocuments(e, r).next((i) => {
|
|
8552
8552
|
const a = this.bs(t, i);
|
|
8553
|
-
return this.Ss(t, a, r, s) ?
|
|
8553
|
+
return this.Ss(t, a, r, s) ? C.resolve(null) : (Sn() <= H.DEBUG && V("QueryEngine", "Re-using previous result from %s to execute query: %s", s.toString(), kn(t)), this.Ds(e, a, t, Ug(s, Mr)).next((c) => c));
|
|
8554
8554
|
});
|
|
8555
8555
|
}
|
|
8556
8556
|
/** Applies the query filter and sorting to the provided documents. */
|
|
@@ -8581,7 +8581,7 @@ class Iy {
|
|
|
8581
8581
|
return !!i && (i.hasPendingWrites || i.version.compareTo(s) > 0);
|
|
8582
8582
|
}
|
|
8583
8583
|
ys(e, t, r) {
|
|
8584
|
-
return Sn() <= H.DEBUG && V("QueryEngine", "Using full collection scan to execute query:",
|
|
8584
|
+
return Sn() <= H.DEBUG && V("QueryEngine", "Using full collection scan to execute query:", kn(t)), this.fs.getDocumentsMatchingQuery(e, t, zt.min(), r);
|
|
8585
8585
|
}
|
|
8586
8586
|
/**
|
|
8587
8587
|
* Combines the results from an indexed execution with the remaining documents
|
|
@@ -8607,7 +8607,7 @@ class Ay {
|
|
|
8607
8607
|
*/
|
|
8608
8608
|
this.vs = new se(W), /** Maps a target to its targetID. */
|
|
8609
8609
|
// TODO(wuandy): Evaluate if TargetId can be part of Target.
|
|
8610
|
-
this.Fs = new
|
|
8610
|
+
this.Fs = new In((i) => ha(i), da), /**
|
|
8611
8611
|
* A per collection group index of the last read time processed by
|
|
8612
8612
|
* `getNewDocumentChanges()`.
|
|
8613
8613
|
*
|
|
@@ -8655,11 +8655,11 @@ function by(n, e) {
|
|
|
8655
8655
|
trackRemovals: !0
|
|
8656
8656
|
});
|
|
8657
8657
|
return function(c, l, d, f) {
|
|
8658
|
-
const m = d.batch,
|
|
8659
|
-
let R =
|
|
8660
|
-
return
|
|
8661
|
-
R = R.next(() => f.getEntry(l,
|
|
8662
|
-
const k = d.docVersions.get(
|
|
8658
|
+
const m = d.batch, _ = m.keys();
|
|
8659
|
+
let R = C.resolve();
|
|
8660
|
+
return _.forEach((S) => {
|
|
8661
|
+
R = R.next(() => f.getEntry(l, S)).next((N) => {
|
|
8662
|
+
const k = d.docVersions.get(S);
|
|
8663
8663
|
Y(k !== null, 48541), N.version.compareTo(k) < 0 && (m.applyToRemoteDocument(N, d), N.isValidDocument() && // We use the commitVersion as the readTime rather than the
|
|
8664
8664
|
// document's updateTime since the updateTime is not advanced
|
|
8665
8665
|
// for updates that do not modify the underlying document.
|
|
@@ -8688,10 +8688,10 @@ function Py(n, e) {
|
|
|
8688
8688
|
s = t.vs;
|
|
8689
8689
|
const c = [];
|
|
8690
8690
|
e.targetChanges.forEach((f, m) => {
|
|
8691
|
-
const
|
|
8692
|
-
if (!
|
|
8691
|
+
const _ = s.get(m);
|
|
8692
|
+
if (!_) return;
|
|
8693
8693
|
c.push(t.li.removeMatchingKeys(i, f.removedDocuments, m).next(() => t.li.addMatchingKeys(i, f.addedDocuments, m)));
|
|
8694
|
-
let R =
|
|
8694
|
+
let R = _.withSequenceNumber(i.currentSequenceNumber);
|
|
8695
8695
|
e.targetMismatches.get(m) !== null ? R = R.withResumeToken(Ie.EMPTY_BYTE_STRING, B.min()).withLastLimboFreeSnapshotVersion(B.min()) : f.resumeToken.approximateByteSize() > 0 && (R = R.withResumeToken(f.resumeToken, r)), s = s.insert(m, R), // Update the target data if there are target changes (or if
|
|
8696
8696
|
// sufficient time has passed since the last update).
|
|
8697
8697
|
/**
|
|
@@ -8707,23 +8707,23 @@ function Py(n, e) {
|
|
|
8707
8707
|
*/
|
|
8708
8708
|
function(N, k, U) {
|
|
8709
8709
|
return N.resumeToken.approximateByteSize() === 0 || k.snapshotVersion.toMicroseconds() - N.snapshotVersion.toMicroseconds() >= vy ? !0 : U.addedDocuments.size + U.modifiedDocuments.size + U.removedDocuments.size > 0;
|
|
8710
|
-
}(
|
|
8710
|
+
}(_, R, f) && c.push(t.li.updateTargetData(i, R));
|
|
8711
8711
|
});
|
|
8712
8712
|
let l = It(), d = G();
|
|
8713
8713
|
if (e.documentUpdates.forEach((f) => {
|
|
8714
8714
|
e.resolvedLimboDocuments.has(f) && c.push(t.persistence.referenceDelegate.updateLimboDocument(i, f));
|
|
8715
8715
|
}), // Each loop iteration only affects its "own" doc, so it's safe to get all
|
|
8716
8716
|
// the remote documents in advance in a single call.
|
|
8717
|
-
c.push(
|
|
8717
|
+
c.push(Cy(i, a, e.documentUpdates).next((f) => {
|
|
8718
8718
|
l = f.Bs, d = f.Ls;
|
|
8719
8719
|
})), !r.isEqual(B.min())) {
|
|
8720
8720
|
const f = t.li.getLastRemoteSnapshotVersion(i).next((m) => t.li.setTargetsMetadata(i, i.currentSequenceNumber, r));
|
|
8721
8721
|
c.push(f);
|
|
8722
8722
|
}
|
|
8723
|
-
return
|
|
8723
|
+
return C.waitFor(c).next(() => a.apply(i)).next(() => t.localDocuments.getLocalViewOfDocuments(i, l, d)).next(() => l);
|
|
8724
8724
|
}).then((i) => (t.vs = s, i));
|
|
8725
8725
|
}
|
|
8726
|
-
function
|
|
8726
|
+
function Cy(n, e, t) {
|
|
8727
8727
|
let r = G(), s = G();
|
|
8728
8728
|
return t.forEach((i) => r = r.add(i)), e.getEntries(n, r).next((i) => {
|
|
8729
8729
|
let a = It();
|
|
@@ -8745,7 +8745,7 @@ function Sy(n, e, t) {
|
|
|
8745
8745
|
};
|
|
8746
8746
|
});
|
|
8747
8747
|
}
|
|
8748
|
-
function
|
|
8748
|
+
function Sy(n, e) {
|
|
8749
8749
|
const t = F(n);
|
|
8750
8750
|
return t.persistence.runTransaction("Get next mutation batch", "readonly", (r) => (e === void 0 && (e = ua), t.mutationQueue.getNextMutationBatchAfterBatchId(r, e)));
|
|
8751
8751
|
}
|
|
@@ -8757,7 +8757,7 @@ function ky(n, e) {
|
|
|
8757
8757
|
// This target has been listened to previously, so reuse the
|
|
8758
8758
|
// previous targetID.
|
|
8759
8759
|
// TODO(mcg): freshen last accessed date?
|
|
8760
|
-
(s = i,
|
|
8760
|
+
(s = i, C.resolve(s))
|
|
8761
8761
|
) : t.li.allocateTargetId(r).next((a) => (s = new Mt(e, a, "TargetPurposeListen", r.currentSequenceNumber), t.li.addTargetData(r, s).next(() => s))));
|
|
8762
8762
|
}).then((r) => {
|
|
8763
8763
|
const s = t.vs.get(r.targetId);
|
|
@@ -8783,8 +8783,8 @@ function Ju(n, e, t) {
|
|
|
8783
8783
|
// Use readwrite instead of readonly so indexes can be created
|
|
8784
8784
|
// Use readwrite instead of readonly so indexes can be created
|
|
8785
8785
|
(a) => function(l, d, f) {
|
|
8786
|
-
const m = F(l),
|
|
8787
|
-
return
|
|
8786
|
+
const m = F(l), _ = m.Fs.get(f);
|
|
8787
|
+
return _ !== void 0 ? C.resolve(m.vs.get(_)) : m.li.getTargetData(d, f);
|
|
8788
8788
|
}(r, a, at(e)).next((c) => {
|
|
8789
8789
|
if (c) return s = c.lastLimboFreeSnapshotVersion, r.li.getMatchingKeysForTargetId(a, c.targetId).next((l) => {
|
|
8790
8790
|
i = l;
|
|
@@ -8939,7 +8939,7 @@ class Ly {
|
|
|
8939
8939
|
this.Go(l, s, i);
|
|
8940
8940
|
const { host: d } = new URL(c), f = ft(d);
|
|
8941
8941
|
return this.zo(e, c, l, r, f).then((m) => (V(yo, `Received RPC '${e}' ${a}: `, m), m), (m) => {
|
|
8942
|
-
throw
|
|
8942
|
+
throw pn(yo, `RPC '${e}' ${a} failed with error: `, m, "url: ", c, "request:", r), m;
|
|
8943
8943
|
});
|
|
8944
8944
|
}
|
|
8945
8945
|
jo(e, t, r, s, i, a) {
|
|
@@ -9019,7 +9019,7 @@ const Ae = "WebChannelConnection", wr = (n, e, t) => {
|
|
|
9019
9019
|
}
|
|
9020
9020
|
});
|
|
9021
9021
|
};
|
|
9022
|
-
class
|
|
9022
|
+
class Ln extends Ly {
|
|
9023
9023
|
constructor(e) {
|
|
9024
9024
|
super(e), /** A collection of open WebChannel instances */
|
|
9025
9025
|
this.a_ = [], this.forceLongPolling = e.forceLongPolling, this.autoDetectLongPolling = e.autoDetectLongPolling, this.useFetchStreams = e.useFetchStreams, this.longPollingOptions = e.longPollingOptions;
|
|
@@ -9029,11 +9029,11 @@ class Vn extends Ly {
|
|
|
9029
9029
|
* getStatEventTarget() returns the same target every time.
|
|
9030
9030
|
*/
|
|
9031
9031
|
static u_() {
|
|
9032
|
-
if (!
|
|
9032
|
+
if (!Ln.c_) {
|
|
9033
9033
|
const e = wh();
|
|
9034
9034
|
wr(e, Th.STAT_EVENT, (t) => {
|
|
9035
9035
|
t.stat === xo.PROXY ? V(Ae, "STAT_EVENT: detected buffering proxy") : t.stat === xo.NOPROXY && V(Ae, "STAT_EVENT: detected no buffering proxy");
|
|
9036
|
-
}),
|
|
9036
|
+
}), Ln.c_ = !0;
|
|
9037
9037
|
}
|
|
9038
9038
|
}
|
|
9039
9039
|
zo(e, t, r, s, i) {
|
|
@@ -9051,17 +9051,17 @@ class Vn extends Ly {
|
|
|
9051
9051
|
V(Ae, `RPC '${e}' ${a} timed out`), l(new D(P.DEADLINE_EXCEEDED, "Request time out"));
|
|
9052
9052
|
break;
|
|
9053
9053
|
case Ns.HTTP_ERROR:
|
|
9054
|
-
const
|
|
9055
|
-
if (V(Ae, `RPC '${e}' ${a} failed with status:`,
|
|
9054
|
+
const _ = d.getStatus();
|
|
9055
|
+
if (V(Ae, `RPC '${e}' ${a} failed with status:`, _, "response text:", d.getResponseText()), _ > 0) {
|
|
9056
9056
|
let R = d.getResponseJson();
|
|
9057
9057
|
Array.isArray(R) && (R = R[0]);
|
|
9058
|
-
const
|
|
9059
|
-
if (
|
|
9058
|
+
const S = R?.error;
|
|
9059
|
+
if (S && S.status && S.message) {
|
|
9060
9060
|
const N = function(U) {
|
|
9061
9061
|
const $ = U.toLowerCase().replace(/_/g, "-");
|
|
9062
9062
|
return Object.values(P).indexOf($) >= 0 ? $ : P.UNKNOWN;
|
|
9063
|
-
}(
|
|
9064
|
-
l(new D(N,
|
|
9063
|
+
}(S.status);
|
|
9064
|
+
l(new D(N, S.message));
|
|
9065
9065
|
} else l(new D(P.UNKNOWN, "Server responded with status " + d.getStatus()));
|
|
9066
9066
|
} else
|
|
9067
9067
|
l(new D(P.UNAVAILABLE, "Connection failed."));
|
|
@@ -9121,22 +9121,22 @@ class Vn extends Ly {
|
|
|
9121
9121
|
V(Ae, `Creating RPC '${e}' stream ${s}: ${d}`, c);
|
|
9122
9122
|
const f = a.createWebChannel(d, c);
|
|
9123
9123
|
this.I_(f);
|
|
9124
|
-
let m = !1,
|
|
9124
|
+
let m = !1, _ = !1;
|
|
9125
9125
|
const R = new My({
|
|
9126
|
-
Ho: (
|
|
9127
|
-
|
|
9126
|
+
Ho: (S) => {
|
|
9127
|
+
_ ? V(Ae, `Not sending because RPC '${e}' stream ${s} is closed:`, S) : (m || (V(Ae, `Opening RPC '${e}' stream ${s} transport.`), f.open(), m = !0), V(Ae, `RPC '${e}' stream ${s} sending:`, S), f.send(S));
|
|
9128
9128
|
},
|
|
9129
9129
|
Jo: () => f.close()
|
|
9130
9130
|
});
|
|
9131
9131
|
return wr(f, Rr.EventType.OPEN, () => {
|
|
9132
|
-
|
|
9132
|
+
_ || (V(Ae, `RPC '${e}' stream ${s} transport opened.`), R.i_());
|
|
9133
9133
|
}), wr(f, Rr.EventType.CLOSE, () => {
|
|
9134
|
-
|
|
9135
|
-
}), wr(f, Rr.EventType.ERROR, (
|
|
9136
|
-
|
|
9137
|
-
}), wr(f, Rr.EventType.MESSAGE, (
|
|
9138
|
-
if (!
|
|
9139
|
-
const N =
|
|
9134
|
+
_ || (_ = !0, V(Ae, `RPC '${e}' stream ${s} transport closed`), R.o_(), this.E_(f));
|
|
9135
|
+
}), wr(f, Rr.EventType.ERROR, (S) => {
|
|
9136
|
+
_ || (_ = !0, pn(Ae, `RPC '${e}' stream ${s} transport errored. Name:`, S.name, "Message:", S.message), R.o_(new D(P.UNAVAILABLE, "The operation could not be completed")));
|
|
9137
|
+
}), wr(f, Rr.EventType.MESSAGE, (S) => {
|
|
9138
|
+
if (!_) {
|
|
9139
|
+
const N = S.data[0];
|
|
9140
9140
|
Y(!!N, 16349);
|
|
9141
9141
|
const k = N, U = k?.error || k[0]?.error;
|
|
9142
9142
|
if (U) {
|
|
@@ -9153,13 +9153,13 @@ class Vn extends Ly {
|
|
|
9153
9153
|
const w = ue[re];
|
|
9154
9154
|
if (w !== void 0) return nd(w);
|
|
9155
9155
|
}($)
|
|
9156
|
-
),
|
|
9157
|
-
j === void 0 && (j = P.INTERNAL,
|
|
9158
|
-
|
|
9156
|
+
), K = U.message;
|
|
9157
|
+
$ === "NOT_FOUND" && K.includes("database") && K.includes("does not exist") && K.includes(this.databaseId.database) && pn(`Database '${this.databaseId.database}' not found. Please check your project configuration.`), j === void 0 && (j = P.INTERNAL, K = "Unknown error status: " + $ + " with message " + U.message), // Mark closed so no further events are propagated
|
|
9158
|
+
_ = !0, R.o_(new D(j, K)), f.close();
|
|
9159
9159
|
} else V(Ae, `RPC '${e}' stream ${s} received:`, N), R.__(N);
|
|
9160
9160
|
}
|
|
9161
9161
|
}), // Ensure that event listeners are configured for STAT_EVENTs.
|
|
9162
|
-
|
|
9162
|
+
Ln.u_(), setTimeout(() => {
|
|
9163
9163
|
R.s_();
|
|
9164
9164
|
}, 0), R;
|
|
9165
9165
|
}
|
|
@@ -9200,19 +9200,19 @@ class Vn extends Ly {
|
|
|
9200
9200
|
}
|
|
9201
9201
|
}
|
|
9202
9202
|
function xy(n) {
|
|
9203
|
-
return new
|
|
9203
|
+
return new Ln(n);
|
|
9204
9204
|
}
|
|
9205
9205
|
function Eo() {
|
|
9206
9206
|
return typeof document < "u" ? document : null;
|
|
9207
9207
|
}
|
|
9208
|
-
function
|
|
9208
|
+
function Ci(n) {
|
|
9209
9209
|
return new q_(
|
|
9210
9210
|
n,
|
|
9211
9211
|
/* useProto3Json= */
|
|
9212
9212
|
!0
|
|
9213
9213
|
);
|
|
9214
9214
|
}
|
|
9215
|
-
|
|
9215
|
+
Ln.c_ = !1;
|
|
9216
9216
|
class yd {
|
|
9217
9217
|
constructor(e, t, r = 1e3, s = 1.5, i = 6e4) {
|
|
9218
9218
|
this.Ci = e, this.timerId = t, this.R_ = r, this.A_ = s, this.V_ = i, this.d_ = 0, this.m_ = null, /** The last backoff attempt, as epoch milliseconds. */
|
|
@@ -9653,7 +9653,7 @@ This typically indicates that your device does not have a healthy Internet conne
|
|
|
9653
9653
|
this._a !== null && (this._a.cancel(), this._a = null);
|
|
9654
9654
|
}
|
|
9655
9655
|
}
|
|
9656
|
-
const
|
|
9656
|
+
const mn = "RemoteStore";
|
|
9657
9657
|
class zy {
|
|
9658
9658
|
constructor(e, t, r, s, i) {
|
|
9659
9659
|
this.localStore = e, this.datastore = t, this.asyncQueue = r, this.remoteSyncer = {}, /**
|
|
@@ -9695,7 +9695,7 @@ class zy {
|
|
|
9695
9695
|
*/
|
|
9696
9696
|
this.Ra = [], this.Aa = i, this.Aa.Mo((a) => {
|
|
9697
9697
|
r.enqueueAndForget(async () => {
|
|
9698
|
-
|
|
9698
|
+
vn(this) && (V(mn, "Restarting streams for network reachability change."), await async function(l) {
|
|
9699
9699
|
const d = F(l);
|
|
9700
9700
|
d.Ea.add(
|
|
9701
9701
|
4
|
|
@@ -9706,14 +9706,14 @@ class zy {
|
|
|
9706
9706
|
), d.Ea.delete(
|
|
9707
9707
|
4
|
|
9708
9708
|
/* OfflineCause.ConnectivityChange */
|
|
9709
|
-
), await
|
|
9709
|
+
), await Si(d);
|
|
9710
9710
|
}(this));
|
|
9711
9711
|
});
|
|
9712
9712
|
}), this.Va = new $y(r, s);
|
|
9713
9713
|
}
|
|
9714
9714
|
}
|
|
9715
|
-
async function
|
|
9716
|
-
if (
|
|
9715
|
+
async function Si(n) {
|
|
9716
|
+
if (vn(n)) for (const e of n.Ra) await e(
|
|
9717
9717
|
/* enabled= */
|
|
9718
9718
|
!0
|
|
9719
9719
|
);
|
|
@@ -9734,7 +9734,7 @@ function Td(n, e) {
|
|
|
9734
9734
|
}
|
|
9735
9735
|
function Ia(n, e) {
|
|
9736
9736
|
const t = F(n), r = Xn(t);
|
|
9737
|
-
t.Ia.delete(e), r.O_() && wd(t, e), t.Ia.size === 0 && (r.O_() ? r.L_() :
|
|
9737
|
+
t.Ia.delete(e), r.O_() && wd(t, e), t.Ia.size === 0 && (r.O_() ? r.L_() : vn(t) && // Revert to OnlineState.Unknown if the watch stream is not open and we
|
|
9738
9738
|
// have no listeners, since without any listens to send we cannot
|
|
9739
9739
|
// confirm if the stream is healthy and upgrade to OnlineState.Online.
|
|
9740
9740
|
t.Va.set(
|
|
@@ -9760,9 +9760,9 @@ function Aa(n) {
|
|
|
9760
9760
|
}), Xn(n).start(), n.Va.ua();
|
|
9761
9761
|
}
|
|
9762
9762
|
function Ra(n) {
|
|
9763
|
-
return
|
|
9763
|
+
return vn(n) && !Xn(n).x_() && n.Ia.size > 0;
|
|
9764
9764
|
}
|
|
9765
|
-
function
|
|
9765
|
+
function vn(n) {
|
|
9766
9766
|
return F(n).Ea.size === 0;
|
|
9767
9767
|
}
|
|
9768
9768
|
function Id(n) {
|
|
@@ -9806,7 +9806,7 @@ async function Ky(n, e, t) {
|
|
|
9806
9806
|
s.Ia.has(c) && (await s.remoteSyncer.rejectListen(c, a), s.Ia.delete(c), s.da.removeTarget(c));
|
|
9807
9807
|
}(n, e);
|
|
9808
9808
|
} catch (r) {
|
|
9809
|
-
V(
|
|
9809
|
+
V(mn, "Failed to remove targets %s: %s ", e.targetIds.join(","), r), await Xs(n, r);
|
|
9810
9810
|
}
|
|
9811
9811
|
else if (e instanceof Ls ? n.da.Xe(e) : e instanceof rd ? n.da.st(e) : n.da.tt(e), !t.isEqual(B.min())) try {
|
|
9812
9812
|
const r = await _d(n.localStore);
|
|
@@ -9838,7 +9838,7 @@ async function Ky(n, e, t) {
|
|
|
9838
9838
|
}), i.remoteSyncer.applyRemoteEvent(c);
|
|
9839
9839
|
}(n, t);
|
|
9840
9840
|
} catch (r) {
|
|
9841
|
-
V(
|
|
9841
|
+
V(mn, "Failed to raise snapshot:", r), await Xs(n, r);
|
|
9842
9842
|
}
|
|
9843
9843
|
}
|
|
9844
9844
|
async function Xs(n, e, t) {
|
|
@@ -9855,10 +9855,10 @@ async function Xs(n, e, t) {
|
|
|
9855
9855
|
// RemoteStore only has access to persistence through LocalStore.
|
|
9856
9856
|
(t = () => _d(n.localStore)), // Probe IndexedDB periodically and re-enable network
|
|
9857
9857
|
n.asyncQueue.enqueueRetryable(async () => {
|
|
9858
|
-
V(
|
|
9858
|
+
V(mn, "Retrying IndexedDB access"), await t(), n.Ea.delete(
|
|
9859
9859
|
1
|
|
9860
9860
|
/* OfflineCause.IndexedDbFailed */
|
|
9861
|
-
), await
|
|
9861
|
+
), await Si(n);
|
|
9862
9862
|
});
|
|
9863
9863
|
}
|
|
9864
9864
|
function vd(n, e) {
|
|
@@ -9868,7 +9868,7 @@ async function ki(n) {
|
|
|
9868
9868
|
const e = F(n), t = Kt(e);
|
|
9869
9869
|
let r = e.Ta.length > 0 ? e.Ta[e.Ta.length - 1].batchId : ua;
|
|
9870
9870
|
for (; Qy(e); ) try {
|
|
9871
|
-
const s = await
|
|
9871
|
+
const s = await Sy(e.localStore, r);
|
|
9872
9872
|
if (s === null) {
|
|
9873
9873
|
e.Ta.length === 0 && t.L_();
|
|
9874
9874
|
break;
|
|
@@ -9880,7 +9880,7 @@ async function ki(n) {
|
|
|
9880
9880
|
Ad(e) && Rd(e);
|
|
9881
9881
|
}
|
|
9882
9882
|
function Qy(n) {
|
|
9883
|
-
return
|
|
9883
|
+
return vn(n) && n.Ta.length < 10;
|
|
9884
9884
|
}
|
|
9885
9885
|
function Yy(n, e) {
|
|
9886
9886
|
n.Ta.push(e);
|
|
@@ -9888,7 +9888,7 @@ function Yy(n, e) {
|
|
|
9888
9888
|
t.O_() && t.Y_ && t.ea(e.mutations);
|
|
9889
9889
|
}
|
|
9890
9890
|
function Ad(n) {
|
|
9891
|
-
return
|
|
9891
|
+
return vn(n) && !Kt(n).x_() && n.Ta.length > 0;
|
|
9892
9892
|
}
|
|
9893
9893
|
function Rd(n) {
|
|
9894
9894
|
Kt(n).start();
|
|
@@ -9923,8 +9923,8 @@ async function eE(n, e) {
|
|
|
9923
9923
|
}
|
|
9924
9924
|
async function nl(n, e) {
|
|
9925
9925
|
const t = F(n);
|
|
9926
|
-
t.asyncQueue.verifyOperationInProgress(), V(
|
|
9927
|
-
const r =
|
|
9926
|
+
t.asyncQueue.verifyOperationInProgress(), V(mn, "RemoteStore received new credentials");
|
|
9927
|
+
const r = vn(t);
|
|
9928
9928
|
t.Ea.add(
|
|
9929
9929
|
3
|
|
9930
9930
|
/* OfflineCause.CredentialChange */
|
|
@@ -9935,14 +9935,14 @@ async function nl(n, e) {
|
|
|
9935
9935
|
), await t.remoteSyncer.handleCredentialChange(e), t.Ea.delete(
|
|
9936
9936
|
3
|
|
9937
9937
|
/* OfflineCause.CredentialChange */
|
|
9938
|
-
), await
|
|
9938
|
+
), await Si(t);
|
|
9939
9939
|
}
|
|
9940
9940
|
async function tE(n, e) {
|
|
9941
9941
|
const t = F(n);
|
|
9942
9942
|
e ? (t.Ea.delete(
|
|
9943
9943
|
2
|
|
9944
9944
|
/* OfflineCause.IsSecondary */
|
|
9945
|
-
), await
|
|
9945
|
+
), await Si(t)) : e || (t.Ea.add(
|
|
9946
9946
|
2
|
|
9947
9947
|
/* OfflineCause.IsSecondary */
|
|
9948
9948
|
), await Jr(t), t.Va.set(
|
|
@@ -9980,7 +9980,7 @@ function Kt(n) {
|
|
|
9980
9980
|
na: Zy.bind(null, n)
|
|
9981
9981
|
}), n.Ra.push(async (e) => {
|
|
9982
9982
|
e ? (n.fa.B_(), // This will start the write stream if necessary.
|
|
9983
|
-
await ki(n)) : (await n.fa.stop(), n.Ta.length > 0 && (V(
|
|
9983
|
+
await ki(n)) : (await n.fa.stop(), n.Ta.length > 0 && (V(mn, `Stopping write stream with ${n.Ta.length} pending writes`), n.Ta = []));
|
|
9984
9984
|
})), n.fa;
|
|
9985
9985
|
}
|
|
9986
9986
|
class ba {
|
|
@@ -10047,13 +10047,13 @@ function Pa(n, e) {
|
|
|
10047
10047
|
if (wt("AsyncQueue", `${e}: ${n}`), Jn(n)) return new D(P.UNAVAILABLE, `${e}: ${n}`);
|
|
10048
10048
|
throw n;
|
|
10049
10049
|
}
|
|
10050
|
-
class
|
|
10050
|
+
class Mn {
|
|
10051
10051
|
/**
|
|
10052
10052
|
* Returns an empty copy of the existing DocumentSet, using the same
|
|
10053
10053
|
* comparator.
|
|
10054
10054
|
*/
|
|
10055
10055
|
static emptySet(e) {
|
|
10056
|
-
return new
|
|
10056
|
+
return new Mn(e.comparator);
|
|
10057
10057
|
}
|
|
10058
10058
|
/** The default ordering is by key if the comparator is omitted */
|
|
10059
10059
|
constructor(e) {
|
|
@@ -10100,7 +10100,7 @@ class Ln {
|
|
|
10100
10100
|
return t ? this.copy(this.keyedMap.remove(e), this.sortedSet.remove(t)) : this;
|
|
10101
10101
|
}
|
|
10102
10102
|
isEqual(e) {
|
|
10103
|
-
if (!(e instanceof
|
|
10103
|
+
if (!(e instanceof Mn) || this.size !== e.size) return !1;
|
|
10104
10104
|
const t = this.sortedSet.getIterator(), r = e.sortedSet.getIterator();
|
|
10105
10105
|
for (; t.hasNext(); ) {
|
|
10106
10106
|
const s = t.getNext().key, i = r.getNext().key;
|
|
@@ -10118,7 +10118,7 @@ class Ln {
|
|
|
10118
10118
|
)`;
|
|
10119
10119
|
}
|
|
10120
10120
|
copy(e, t) {
|
|
10121
|
-
const r = new
|
|
10121
|
+
const r = new Mn();
|
|
10122
10122
|
return r.comparator = this.comparator, r.keyedMap = e, r.sortedSet = t, r;
|
|
10123
10123
|
}
|
|
10124
10124
|
}
|
|
@@ -10182,7 +10182,7 @@ class Wn {
|
|
|
10182
10182
|
}), new Wn(
|
|
10183
10183
|
e,
|
|
10184
10184
|
t,
|
|
10185
|
-
|
|
10185
|
+
Mn.emptySet(t),
|
|
10186
10186
|
a,
|
|
10187
10187
|
r,
|
|
10188
10188
|
s,
|
|
@@ -10227,9 +10227,9 @@ class rE {
|
|
|
10227
10227
|
}
|
|
10228
10228
|
}
|
|
10229
10229
|
function sl() {
|
|
10230
|
-
return new
|
|
10230
|
+
return new In((n) => zh(n), Ii);
|
|
10231
10231
|
}
|
|
10232
|
-
async function
|
|
10232
|
+
async function Ca(n, e) {
|
|
10233
10233
|
const t = F(n);
|
|
10234
10234
|
let r = 3;
|
|
10235
10235
|
const s = e.query;
|
|
@@ -10256,13 +10256,13 @@ async function Sa(n, e) {
|
|
|
10256
10256
|
await t.onFirstRemoteStoreListen(s);
|
|
10257
10257
|
}
|
|
10258
10258
|
} catch (a) {
|
|
10259
|
-
const c = Pa(a, `Initialization of query '${
|
|
10259
|
+
const c = Pa(a, `Initialization of query '${kn(e.query)}' failed`);
|
|
10260
10260
|
return void e.onError(c);
|
|
10261
10261
|
}
|
|
10262
10262
|
t.queries.set(s, i), i.ba.push(e), // Run global snapshot listeners if a consistent snapshot has been emitted.
|
|
10263
10263
|
e.va(t.onlineState), i.wa && e.Fa(i.wa) && ka(t);
|
|
10264
10264
|
}
|
|
10265
|
-
async function
|
|
10265
|
+
async function Sa(n, e) {
|
|
10266
10266
|
const t = F(n), r = e.query;
|
|
10267
10267
|
let s = 3;
|
|
10268
10268
|
const i = t.queries.get(r);
|
|
@@ -10395,7 +10395,7 @@ class oE {
|
|
|
10395
10395
|
*/
|
|
10396
10396
|
this.current = !1, /** Documents in the view but not in the remote target */
|
|
10397
10397
|
this.Ya = G(), /** Document Keys that have local changes */
|
|
10398
|
-
this.mutatedKeys = G(), this.eu = Hh(e), this.tu = new
|
|
10398
|
+
this.mutatedKeys = G(), this.eu = Hh(e), this.tu = new Mn(this.eu);
|
|
10399
10399
|
}
|
|
10400
10400
|
/**
|
|
10401
10401
|
* The set of remote documents that the server has told us belongs to the target associated with
|
|
@@ -10419,25 +10419,25 @@ class oE {
|
|
|
10419
10419
|
let i = t ? t.mutatedKeys : this.mutatedKeys, a = s, c = !1;
|
|
10420
10420
|
const l = this.query.limitType === "F" && s.size === this.query.limit ? s.last() : null, d = this.query.limitType === "L" && s.size === this.query.limit ? s.first() : null;
|
|
10421
10421
|
if (e.inorderTraversal((f, m) => {
|
|
10422
|
-
const
|
|
10422
|
+
const _ = s.get(f), R = vi(this.query, m) ? m : null, S = !!_ && this.mutatedKeys.has(_.key), N = !!R && (R.hasLocalMutations || // We only consider committed mutations for documents that were
|
|
10423
10423
|
// mutated during the lifetime of the view.
|
|
10424
10424
|
this.mutatedKeys.has(R.key) && R.hasCommittedMutations);
|
|
10425
10425
|
let k = !1;
|
|
10426
|
-
|
|
10426
|
+
_ && R ? _.data.isEqual(R.data) ? S !== N && (r.track({
|
|
10427
10427
|
type: 3,
|
|
10428
10428
|
doc: R
|
|
10429
|
-
}), k = !0) : this.su(
|
|
10429
|
+
}), k = !0) : this.su(_, R) || (r.track({
|
|
10430
10430
|
type: 2,
|
|
10431
10431
|
doc: R
|
|
10432
10432
|
}), k = !0, (l && this.eu(R, l) > 0 || d && this.eu(R, d) < 0) && // This doc moved from inside the limit to outside the limit.
|
|
10433
10433
|
// That means there may be some other doc in the local cache
|
|
10434
10434
|
// that should be included instead.
|
|
10435
|
-
(c = !0)) : !
|
|
10435
|
+
(c = !0)) : !_ && R ? (r.track({
|
|
10436
10436
|
type: 0,
|
|
10437
10437
|
doc: R
|
|
10438
|
-
}), k = !0) :
|
|
10438
|
+
}), k = !0) : _ && !R && (r.track({
|
|
10439
10439
|
type: 1,
|
|
10440
|
-
doc:
|
|
10440
|
+
doc: _
|
|
10441
10441
|
}), k = !0, (l || d) && // A doc was removed from a full limit query. We'll need to
|
|
10442
10442
|
// requery from the local cache to see if we know about some other
|
|
10443
10443
|
// doc that should be in the results.
|
|
@@ -10477,7 +10477,7 @@ class oE {
|
|
|
10477
10477
|
const i = this.tu;
|
|
10478
10478
|
this.tu = e.tu, this.mutatedKeys = e.mutatedKeys;
|
|
10479
10479
|
const a = e.iu.ya();
|
|
10480
|
-
a.sort((f, m) => function(R,
|
|
10480
|
+
a.sort((f, m) => function(R, S) {
|
|
10481
10481
|
const N = (k) => {
|
|
10482
10482
|
switch (k) {
|
|
10483
10483
|
case 0:
|
|
@@ -10493,7 +10493,7 @@ class oE {
|
|
|
10493
10493
|
});
|
|
10494
10494
|
}
|
|
10495
10495
|
};
|
|
10496
|
-
return N(R) - N(
|
|
10496
|
+
return N(R) - N(S);
|
|
10497
10497
|
}(f.type, m.type) || this.eu(f.doc, m.doc)), this.ou(r), s = s ?? !1;
|
|
10498
10498
|
const c = t && !s ? this._u() : [], l = this.Ya.size === 0 && this.current && !s ? 1 : 0, d = l !== this.Xa;
|
|
10499
10499
|
return this.Xa = l, a.length !== 0 || d ? {
|
|
@@ -10624,7 +10624,7 @@ class cE {
|
|
|
10624
10624
|
}
|
|
10625
10625
|
class uE {
|
|
10626
10626
|
constructor(e, t, r, s, i, a) {
|
|
10627
|
-
this.localStore = e, this.remoteStore = t, this.eventManager = r, this.sharedClientState = s, this.currentUser = i, this.maxConcurrentLimboResolutions = a, this.Pu = {}, this.Tu = new
|
|
10627
|
+
this.localStore = e, this.remoteStore = t, this.eventManager = r, this.sharedClientState = s, this.currentUser = i, this.maxConcurrentLimboResolutions = a, this.Pu = {}, this.Tu = new In((c) => zh(c), Ii), this.Iu = /* @__PURE__ */ new Map(), /**
|
|
10628
10628
|
* The keys of documents that are in limbo for which we haven't yet started a
|
|
10629
10629
|
* limbo resolution query. The strings in this set are the result of calling
|
|
10630
10630
|
* `key.path.canonicalString()` where `key` is a `DocumentKey` object.
|
|
@@ -10664,7 +10664,7 @@ async function lE(n, e, t = !0) {
|
|
|
10664
10664
|
// to the query. EventManager will not have an assigned target ID in this
|
|
10665
10665
|
// case and calls `listen` to obtain this ID.
|
|
10666
10666
|
(r.sharedClientState.addLocalQueryTarget(i.targetId), s = i.view.lu())
|
|
10667
|
-
) : s = await
|
|
10667
|
+
) : s = await Cd(
|
|
10668
10668
|
r,
|
|
10669
10669
|
e,
|
|
10670
10670
|
t,
|
|
@@ -10674,7 +10674,7 @@ async function lE(n, e, t = !0) {
|
|
|
10674
10674
|
}
|
|
10675
10675
|
async function hE(n, e) {
|
|
10676
10676
|
const t = Od(n);
|
|
10677
|
-
await
|
|
10677
|
+
await Cd(
|
|
10678
10678
|
t,
|
|
10679
10679
|
e,
|
|
10680
10680
|
/** shouldListenToRemote= */
|
|
@@ -10683,13 +10683,13 @@ async function hE(n, e) {
|
|
|
10683
10683
|
!1
|
|
10684
10684
|
);
|
|
10685
10685
|
}
|
|
10686
|
-
async function
|
|
10686
|
+
async function Cd(n, e, t, r) {
|
|
10687
10687
|
const s = await ky(n.localStore, at(e)), i = s.targetId, a = n.sharedClientState.addLocalQueryTarget(i, t);
|
|
10688
10688
|
let c;
|
|
10689
10689
|
return r && (c = await dE(n, e, i, a === "current", s.resumeToken)), n.isPrimaryClient && t && Td(n.remoteStore, s), c;
|
|
10690
10690
|
}
|
|
10691
10691
|
async function dE(n, e, t, r, s) {
|
|
10692
|
-
n.pu = (m,
|
|
10692
|
+
n.pu = (m, _, R) => async function(N, k, U, $) {
|
|
10693
10693
|
let j = k.view.ru(U);
|
|
10694
10694
|
j.Ss && // The query has a limit and some docs were removed, so we need
|
|
10695
10695
|
// to re-run the query against the local store to make sure we
|
|
@@ -10700,15 +10700,15 @@ async function dE(n, e, t, r, s) {
|
|
|
10700
10700
|
/* usePreviousResults= */
|
|
10701
10701
|
!1
|
|
10702
10702
|
).then(({ documents: w }) => k.view.ru(w, j)));
|
|
10703
|
-
const
|
|
10703
|
+
const K = $ && $.targetChanges.get(k.targetId), ge = $ && $.targetMismatches.get(k.targetId) != null, re = k.view.applyChanges(
|
|
10704
10704
|
j,
|
|
10705
10705
|
/* limboResolutionEnabled= */
|
|
10706
10706
|
N.isPrimaryClient,
|
|
10707
|
-
|
|
10707
|
+
K,
|
|
10708
10708
|
ge
|
|
10709
10709
|
);
|
|
10710
10710
|
return al(N, k.targetId, re.au), re.snapshot;
|
|
10711
|
-
}(n, m,
|
|
10711
|
+
}(n, m, _, R);
|
|
10712
10712
|
const i = await Ju(
|
|
10713
10713
|
n.localStore,
|
|
10714
10714
|
e,
|
|
@@ -10751,19 +10751,19 @@ async function mE(n, e, t) {
|
|
|
10751
10751
|
const r = IE(n);
|
|
10752
10752
|
try {
|
|
10753
10753
|
const s = await function(a, c) {
|
|
10754
|
-
const l = F(a), d = te.now(), f = c.reduce((R,
|
|
10755
|
-
let m,
|
|
10754
|
+
const l = F(a), d = te.now(), f = c.reduce((R, S) => R.add(S.key), G());
|
|
10755
|
+
let m, _;
|
|
10756
10756
|
return l.persistence.runTransaction("Locally write mutations", "readwrite", (R) => {
|
|
10757
|
-
let
|
|
10757
|
+
let S = It(), N = G();
|
|
10758
10758
|
return l.xs.getEntries(R, f).next((k) => {
|
|
10759
|
-
|
|
10759
|
+
S = k, S.forEach((U, $) => {
|
|
10760
10760
|
$.isValidDocument() || (N = N.add(U));
|
|
10761
10761
|
});
|
|
10762
|
-
}).next(() => l.localDocuments.getOverlayedDocuments(R,
|
|
10762
|
+
}).next(() => l.localDocuments.getOverlayedDocuments(R, S)).next((k) => {
|
|
10763
10763
|
m = k;
|
|
10764
10764
|
const U = [];
|
|
10765
10765
|
for (const $ of c) {
|
|
10766
|
-
const j =
|
|
10766
|
+
const j = C_($, m.get($.key).overlayedDocument);
|
|
10767
10767
|
j != null && // NOTE: The base state should only be applied if there's some
|
|
10768
10768
|
// existing document to override, so use a Precondition of
|
|
10769
10769
|
// exists=true
|
|
@@ -10771,12 +10771,12 @@ async function mE(n, e, t) {
|
|
|
10771
10771
|
}
|
|
10772
10772
|
return l.mutationQueue.addMutationBatch(R, d, U, c);
|
|
10773
10773
|
}).next((k) => {
|
|
10774
|
-
|
|
10774
|
+
_ = k;
|
|
10775
10775
|
const U = k.applyToLocalDocumentSet(m, N);
|
|
10776
10776
|
return l.documentOverlayCache.saveOverlays(R, k.batchId, U);
|
|
10777
10777
|
});
|
|
10778
10778
|
}).then(() => ({
|
|
10779
|
-
batchId:
|
|
10779
|
+
batchId: _.batchId,
|
|
10780
10780
|
changes: Gh(m)
|
|
10781
10781
|
}));
|
|
10782
10782
|
}(r.localStore, e);
|
|
@@ -10789,7 +10789,7 @@ async function mE(n, e, t) {
|
|
|
10789
10789
|
t.reject(i);
|
|
10790
10790
|
}
|
|
10791
10791
|
}
|
|
10792
|
-
async function
|
|
10792
|
+
async function Sd(n, e) {
|
|
10793
10793
|
const t = F(n);
|
|
10794
10794
|
try {
|
|
10795
10795
|
const r = await Py(t.localStore, e);
|
|
@@ -10815,8 +10815,8 @@ function ol(n, e, t) {
|
|
|
10815
10815
|
l.onlineState = c;
|
|
10816
10816
|
let d = !1;
|
|
10817
10817
|
l.queries.forEach((f, m) => {
|
|
10818
|
-
for (const
|
|
10819
|
-
|
|
10818
|
+
for (const _ of m.ba)
|
|
10819
|
+
_.va(c) && (d = !0);
|
|
10820
10820
|
}), d && ka(l);
|
|
10821
10821
|
}(r.eventManager, e), s.length && r.Pu.J_(s), r.onlineState = e, r.isPrimaryClient && r.sharedClientState.setOnlineState(e);
|
|
10822
10822
|
}
|
|
@@ -10837,7 +10837,7 @@ async function gE(n, e, t) {
|
|
|
10837
10837
|
a,
|
|
10838
10838
|
c
|
|
10839
10839
|
);
|
|
10840
|
-
await
|
|
10840
|
+
await Sd(r, l), // Since this query failed, we won't want to manually unlisten to it.
|
|
10841
10841
|
// We only remove it from bookkeeping after we successfully applied the
|
|
10842
10842
|
// RemoteEvent. If `applyRemoteEvent()` throws, we want to re-listen to
|
|
10843
10843
|
// this query when the RemoteStore restarts the Watch stream, which should
|
|
@@ -10940,16 +10940,16 @@ async function Xr(n, e, t) {
|
|
|
10940
10940
|
}), await Promise.all(a), r.Pu.J_(s), await async function(l, d) {
|
|
10941
10941
|
const f = F(l);
|
|
10942
10942
|
try {
|
|
10943
|
-
await f.persistence.runTransaction("notifyLocalViewChanges", "readwrite", (m) =>
|
|
10943
|
+
await f.persistence.runTransaction("notifyLocalViewChanges", "readwrite", (m) => C.forEach(d, (_) => C.forEach(_.Ts, (R) => f.persistence.referenceDelegate.addReference(m, _.targetId, R)).next(() => C.forEach(_.Is, (R) => f.persistence.referenceDelegate.removeReference(m, _.targetId, R)))));
|
|
10944
10944
|
} catch (m) {
|
|
10945
10945
|
if (!Jn(m)) throw m;
|
|
10946
10946
|
V(wa, "Failed to update sequence numbers: " + m);
|
|
10947
10947
|
}
|
|
10948
10948
|
for (const m of d) {
|
|
10949
|
-
const
|
|
10949
|
+
const _ = m.targetId;
|
|
10950
10950
|
if (!m.fromCache) {
|
|
10951
|
-
const R = f.vs.get(
|
|
10952
|
-
f.vs = f.vs.insert(
|
|
10951
|
+
const R = f.vs.get(_), S = R.snapshotVersion, N = R.withLastLimboFreeSnapshotVersion(S);
|
|
10952
|
+
f.vs = f.vs.insert(_, N);
|
|
10953
10953
|
}
|
|
10954
10954
|
}
|
|
10955
10955
|
}(r.localStore, i));
|
|
@@ -10986,7 +10986,7 @@ function wE(n, e) {
|
|
|
10986
10986
|
}
|
|
10987
10987
|
function Od(n) {
|
|
10988
10988
|
const e = F(n);
|
|
10989
|
-
return e.remoteStore.remoteSyncer.applyRemoteEvent =
|
|
10989
|
+
return e.remoteStore.remoteSyncer.applyRemoteEvent = Sd.bind(null, e), e.remoteStore.remoteSyncer.getRemoteKeysForTarget = wE.bind(null, e), e.remoteStore.remoteSyncer.rejectListen = gE.bind(null, e), e.Pu.J_ = sE.bind(null, e.eventManager), e.Pu.yu = iE.bind(null, e.eventManager), e;
|
|
10990
10990
|
}
|
|
10991
10991
|
function IE(n) {
|
|
10992
10992
|
const e = F(n);
|
|
@@ -10997,7 +10997,7 @@ class Zs {
|
|
|
10997
10997
|
this.kind = "memory", this.synchronizeTabs = !1;
|
|
10998
10998
|
}
|
|
10999
10999
|
async initialize(e) {
|
|
11000
|
-
this.serializer =
|
|
11000
|
+
this.serializer = Ci(e.databaseInfo.databaseId), this.sharedClientState = this.Du(e), this.persistence = this.Cu(e), await this.persistence.start(), this.localStore = this.vu(e), this.gcScheduler = this.Fu(e, this.localStore), this.indexBackfillerScheduler = this.Mu(e, this.localStore);
|
|
11001
11001
|
}
|
|
11002
11002
|
Fu(e, t) {
|
|
11003
11003
|
return null;
|
|
@@ -11054,7 +11054,7 @@ class Xo {
|
|
|
11054
11054
|
}();
|
|
11055
11055
|
}
|
|
11056
11056
|
createDatastore(e) {
|
|
11057
|
-
const t =
|
|
11057
|
+
const t = Ci(e.databaseInfo.databaseId), r = xy(e.databaseInfo);
|
|
11058
11058
|
return jy(e.authCredentials, e.appCheckCredentials, r, t);
|
|
11059
11059
|
}
|
|
11060
11060
|
createRemoteStore(e) {
|
|
@@ -11078,7 +11078,7 @@ class Xo {
|
|
|
11078
11078
|
async terminate() {
|
|
11079
11079
|
await async function(t) {
|
|
11080
11080
|
const r = F(t);
|
|
11081
|
-
V(
|
|
11081
|
+
V(mn, "RemoteStore shutting down."), r.Ea.add(
|
|
11082
11082
|
5
|
|
11083
11083
|
/* OfflineCause.Shutdown */
|
|
11084
11084
|
), await Jr(r), r.Aa.shutdown(), // Set the OnlineState to Unknown (rather than Offline) to avoid potentially
|
|
@@ -11189,7 +11189,7 @@ async function RE(n) {
|
|
|
11189
11189
|
// INVALID_STATE for any usage.
|
|
11190
11190
|
s.code === 11;
|
|
11191
11191
|
}(t)) throw t;
|
|
11192
|
-
|
|
11192
|
+
pn("Error using user provided cache. Falling back to memory cache: " + t), await To(n, new Zs());
|
|
11193
11193
|
}
|
|
11194
11194
|
} else V(Qt, "Using default OfflineComponentProvider"), await To(n, new vE(void 0));
|
|
11195
11195
|
return n._offlineComponents;
|
|
@@ -11207,20 +11207,20 @@ async function ei(n) {
|
|
|
11207
11207
|
const e = await La(n), t = e.eventManager;
|
|
11208
11208
|
return t.onListen = lE.bind(null, e.syncEngine), t.onUnlisten = fE.bind(null, e.syncEngine), t.onFirstRemoteStoreListen = hE.bind(null, e.syncEngine), t.onLastRemoteStoreUnlisten = pE.bind(null, e.syncEngine), t;
|
|
11209
11209
|
}
|
|
11210
|
-
function
|
|
11210
|
+
function CE(n, e, t, r) {
|
|
11211
11211
|
const s = new Va(r), i = new Na(e, s, t);
|
|
11212
|
-
return n.asyncQueue.enqueueAndForget(async () =>
|
|
11213
|
-
s.Nu(), n.asyncQueue.enqueueAndForget(async () =>
|
|
11212
|
+
return n.asyncQueue.enqueueAndForget(async () => Ca(await ei(n), i)), () => {
|
|
11213
|
+
s.Nu(), n.asyncQueue.enqueueAndForget(async () => Sa(await ei(n), i));
|
|
11214
11214
|
};
|
|
11215
11215
|
}
|
|
11216
|
-
function
|
|
11216
|
+
function SE(n, e, t = {}) {
|
|
11217
11217
|
const r = new ot();
|
|
11218
11218
|
return n.asyncQueue.enqueueAndForget(async () => function(i, a, c, l, d) {
|
|
11219
11219
|
const f = new Va({
|
|
11220
|
-
next: (
|
|
11221
|
-
f.Nu(), a.enqueueAndForget(() =>
|
|
11222
|
-
const R =
|
|
11223
|
-
!R &&
|
|
11220
|
+
next: (_) => {
|
|
11221
|
+
f.Nu(), a.enqueueAndForget(() => Sa(i, m));
|
|
11222
|
+
const R = _.docs.has(c);
|
|
11223
|
+
!R && _.fromCache ? (
|
|
11224
11224
|
// TODO(dimond): If we're online and the document doesn't
|
|
11225
11225
|
// exist then we resolve with a doc.exists set to false. If
|
|
11226
11226
|
// we're offline however, we reject the Promise in this
|
|
@@ -11229,29 +11229,29 @@ function CE(n, e, t = {}) {
|
|
|
11229
11229
|
// offline 2) Actually reject the Promise in the online case
|
|
11230
11230
|
// if the document doesn't exist.
|
|
11231
11231
|
d.reject(new D(P.UNAVAILABLE, "Failed to get document because the client is offline."))
|
|
11232
|
-
) : R &&
|
|
11232
|
+
) : R && _.fromCache && l && l.source === "server" ? d.reject(new D(P.UNAVAILABLE, 'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')) : d.resolve(_);
|
|
11233
11233
|
},
|
|
11234
|
-
error: (
|
|
11234
|
+
error: (_) => d.reject(_)
|
|
11235
11235
|
}), m = new Na(wi(c.path), f, {
|
|
11236
11236
|
includeMetadataChanges: !0,
|
|
11237
11237
|
Ka: !0
|
|
11238
11238
|
});
|
|
11239
|
-
return
|
|
11239
|
+
return Ca(i, m);
|
|
11240
11240
|
}(await ei(n), n.asyncQueue, e, t, r)), r.promise;
|
|
11241
11241
|
}
|
|
11242
11242
|
function kE(n, e, t = {}) {
|
|
11243
11243
|
const r = new ot();
|
|
11244
11244
|
return n.asyncQueue.enqueueAndForget(async () => function(i, a, c, l, d) {
|
|
11245
11245
|
const f = new Va({
|
|
11246
|
-
next: (
|
|
11247
|
-
f.Nu(), a.enqueueAndForget(() =>
|
|
11246
|
+
next: (_) => {
|
|
11247
|
+
f.Nu(), a.enqueueAndForget(() => Sa(i, m)), _.fromCache && l.source === "server" ? d.reject(new D(P.UNAVAILABLE, 'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')) : d.resolve(_);
|
|
11248
11248
|
},
|
|
11249
|
-
error: (
|
|
11249
|
+
error: (_) => d.reject(_)
|
|
11250
11250
|
}), m = new Na(c, f, {
|
|
11251
11251
|
includeMetadataChanges: !0,
|
|
11252
11252
|
Ka: !0
|
|
11253
11253
|
});
|
|
11254
|
-
return
|
|
11254
|
+
return Ca(i, m);
|
|
11255
11255
|
}(await ei(n), n.asyncQueue, e, t, r)), r.promise;
|
|
11256
11256
|
}
|
|
11257
11257
|
function NE(n, e, t) {
|
|
@@ -11260,19 +11260,19 @@ function NE(n, e, t) {
|
|
|
11260
11260
|
try {
|
|
11261
11261
|
const s = await PE(n);
|
|
11262
11262
|
r.resolve(async function(a, c, l) {
|
|
11263
|
-
const d = F(a), { request: f, gt: m, parent:
|
|
11263
|
+
const d = F(a), { request: f, gt: m, parent: _ } = K_(d.serializer, d_(c), l);
|
|
11264
11264
|
d.connection.Ko || delete f.parent;
|
|
11265
11265
|
const R = (await d.jo(
|
|
11266
11266
|
"RunAggregationQuery",
|
|
11267
11267
|
d.serializer.databaseId,
|
|
11268
|
-
|
|
11268
|
+
_,
|
|
11269
11269
|
f,
|
|
11270
11270
|
/*expectedResponseCount=*/
|
|
11271
11271
|
1
|
|
11272
11272
|
)).filter((N) => !!N.result);
|
|
11273
11273
|
Y(R.length === 1, 64727);
|
|
11274
|
-
const
|
|
11275
|
-
return Object.keys(
|
|
11274
|
+
const S = R[0].result?.aggregateFields;
|
|
11275
|
+
return Object.keys(S).reduce((N, k) => (N[m[k]] = S[k], N), {});
|
|
11276
11276
|
}(s, e, t));
|
|
11277
11277
|
} catch (s) {
|
|
11278
11278
|
r.reject(s);
|
|
@@ -11405,7 +11405,7 @@ function Md(n, e, t, r = {}) {
|
|
|
11405
11405
|
...i,
|
|
11406
11406
|
emulatorOptions: n._getEmulatorOptions()
|
|
11407
11407
|
}, c = `${e}:${t}`;
|
|
11408
|
-
s && (fi(`https://${c}`), pi("Firestore", !0)), i.host !== Ld && i.host !== c &&
|
|
11408
|
+
s && (fi(`https://${c}`), pi("Firestore", !0)), i.host !== Ld && i.host !== c && pn("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.");
|
|
11409
11409
|
const l = {
|
|
11410
11410
|
...i,
|
|
11411
11411
|
host: c,
|
|
@@ -12095,7 +12095,7 @@ class Ua {
|
|
|
12095
12095
|
}
|
|
12096
12096
|
class FE {
|
|
12097
12097
|
constructor(e, t, r) {
|
|
12098
|
-
this.databaseId = e, this.ignoreUndefinedProperties = t, this.serializer = r ||
|
|
12098
|
+
this.databaseId = e, this.ignoreUndefinedProperties = t, this.serializer = r || Ci(e);
|
|
12099
12099
|
}
|
|
12100
12100
|
/** Creates a new top-level parse context. */
|
|
12101
12101
|
createContext(e, t, r, s = !1) {
|
|
@@ -12110,7 +12110,7 @@ class FE {
|
|
|
12110
12110
|
}
|
|
12111
12111
|
}
|
|
12112
12112
|
function Fa(n) {
|
|
12113
|
-
const e = n._freezeSettings(), t =
|
|
12113
|
+
const e = n._freezeSettings(), t = Ci(n._databaseId);
|
|
12114
12114
|
return new FE(n._databaseId, !!e.ignoreUndefinedProperties, t);
|
|
12115
12115
|
}
|
|
12116
12116
|
function BE(n, e, t, r, s, i = {}) {
|
|
@@ -12122,9 +12122,9 @@ function BE(n, e, t, r, s, i = {}) {
|
|
|
12122
12122
|
else if (i.mergeFields) {
|
|
12123
12123
|
const f = [];
|
|
12124
12124
|
for (const m of i.mergeFields) {
|
|
12125
|
-
const
|
|
12126
|
-
if (!a.contains(
|
|
12127
|
-
$d(f,
|
|
12125
|
+
const _ = gn(e, m, t);
|
|
12126
|
+
if (!a.contains(_)) throw new D(P.INVALID_ARGUMENT, `Field '${_}' is specified in your field mask but missing from your input data.`);
|
|
12127
|
+
$d(f, _) || f.push(_);
|
|
12128
12128
|
}
|
|
12129
12129
|
l = new Fe(f), d = a.fieldTransforms.filter((m) => l.covers(m.field));
|
|
12130
12130
|
} else l = null, d = a.fieldTransforms;
|
|
@@ -12150,27 +12150,27 @@ function qE(n, e, t, r) {
|
|
|
12150
12150
|
if (d instanceof Di)
|
|
12151
12151
|
i.push(f);
|
|
12152
12152
|
else {
|
|
12153
|
-
const
|
|
12154
|
-
|
|
12153
|
+
const _ = Zr(d, m);
|
|
12154
|
+
_ != null && (i.push(f), a.set(f, _));
|
|
12155
12155
|
}
|
|
12156
12156
|
});
|
|
12157
12157
|
const c = new Fe(i);
|
|
12158
12158
|
return new xd(a, c, s.fieldTransforms);
|
|
12159
12159
|
}
|
|
12160
12160
|
function jE(n, e, t, r, s, i) {
|
|
12161
|
-
const a = n.createContext(1, e, t), c = [
|
|
12161
|
+
const a = n.createContext(1, e, t), c = [gn(e, r, t)], l = [s];
|
|
12162
12162
|
if (i.length % 2 != 0) throw new D(P.INVALID_ARGUMENT, `Function ${e}() needs to be called with an even number of arguments that alternate between field names and values.`);
|
|
12163
|
-
for (let
|
|
12163
|
+
for (let _ = 0; _ < i.length; _ += 2) c.push(gn(e, i[_])), l.push(i[_ + 1]);
|
|
12164
12164
|
const d = [], f = De.empty();
|
|
12165
|
-
for (let
|
|
12166
|
-
const R = c[
|
|
12167
|
-
let
|
|
12168
|
-
|
|
12165
|
+
for (let _ = c.length - 1; _ >= 0; --_) if (!$d(d, c[_])) {
|
|
12166
|
+
const R = c[_];
|
|
12167
|
+
let S = l[_];
|
|
12168
|
+
S = J(S);
|
|
12169
12169
|
const N = a.childContextForFieldPath(R);
|
|
12170
|
-
if (
|
|
12170
|
+
if (S instanceof Di)
|
|
12171
12171
|
d.push(R);
|
|
12172
12172
|
else {
|
|
12173
|
-
const k = Zr(
|
|
12173
|
+
const k = Zr(S, N);
|
|
12174
12174
|
k != null && (d.push(R), f.set(R, k));
|
|
12175
12175
|
}
|
|
12176
12176
|
}
|
|
@@ -12285,7 +12285,7 @@ function Zr(n, e) {
|
|
|
12285
12285
|
}
|
|
12286
12286
|
function Bd(n, e) {
|
|
12287
12287
|
const t = {};
|
|
12288
|
-
return
|
|
12288
|
+
return Ch(n) ? (
|
|
12289
12289
|
// If we encounter an empty object, we explicitly add it to the update
|
|
12290
12290
|
// mask to ensure that the server creates a map entry.
|
|
12291
12291
|
e.path && e.path.length > 0 && e.fieldMask.push(e.path)
|
|
@@ -12307,7 +12307,7 @@ function Ba(n, e, t) {
|
|
|
12307
12307
|
throw r === "an object" ? e.createError(n + " a custom object") : e.createError(n + " " + r);
|
|
12308
12308
|
}
|
|
12309
12309
|
}
|
|
12310
|
-
function
|
|
12310
|
+
function gn(n, e, t) {
|
|
12311
12311
|
if (
|
|
12312
12312
|
// If required, replace the FieldPath Compat class with the firestore-exp
|
|
12313
12313
|
// FieldPath.
|
|
@@ -12459,7 +12459,7 @@ class Oi extends zE {
|
|
|
12459
12459
|
);
|
|
12460
12460
|
}
|
|
12461
12461
|
}
|
|
12462
|
-
const gl = "@firebase/firestore", _l = "4.
|
|
12462
|
+
const gl = "@firebase/firestore", _l = "4.12.0";
|
|
12463
12463
|
function yl(n) {
|
|
12464
12464
|
return function(t, r) {
|
|
12465
12465
|
if (typeof t != "object" || t === null) return !1;
|
|
@@ -12592,7 +12592,7 @@ class qa {
|
|
|
12592
12592
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12593
12593
|
get(e) {
|
|
12594
12594
|
if (this._document) {
|
|
12595
|
-
const t = this._document.data.field(
|
|
12595
|
+
const t = this._document.data.field(gn("DocumentSnapshot.get", e));
|
|
12596
12596
|
if (t !== null) return this._userDataWriter.convertValue(t);
|
|
12597
12597
|
}
|
|
12598
12598
|
}
|
|
@@ -12642,32 +12642,32 @@ class es extends Vi {
|
|
|
12642
12642
|
_parse(e) {
|
|
12643
12643
|
const t = Fa(e.firestore);
|
|
12644
12644
|
return function(i, a, c, l, d, f, m) {
|
|
12645
|
-
let
|
|
12645
|
+
let _;
|
|
12646
12646
|
if (d.isKeyField()) {
|
|
12647
12647
|
if (f === "array-contains" || f === "array-contains-any") throw new D(P.INVALID_ARGUMENT, `Invalid Query. You can't perform '${f}' queries on documentId().`);
|
|
12648
12648
|
if (f === "in" || f === "not-in") {
|
|
12649
12649
|
vl(m, f);
|
|
12650
|
-
const
|
|
12651
|
-
for (const N of m)
|
|
12652
|
-
|
|
12650
|
+
const S = [];
|
|
12651
|
+
for (const N of m) S.push(Il(l, i, N));
|
|
12652
|
+
_ = {
|
|
12653
12653
|
arrayValue: {
|
|
12654
|
-
values:
|
|
12654
|
+
values: S
|
|
12655
12655
|
}
|
|
12656
12656
|
};
|
|
12657
|
-
} else
|
|
12658
|
-
} else f !== "in" && f !== "not-in" && f !== "array-contains-any" || vl(m, f),
|
|
12657
|
+
} else _ = Il(l, i, m);
|
|
12658
|
+
} else f !== "in" && f !== "not-in" && f !== "array-contains-any" || vl(m, f), _ = Fd(
|
|
12659
12659
|
c,
|
|
12660
12660
|
a,
|
|
12661
12661
|
m,
|
|
12662
12662
|
/* allowArrays= */
|
|
12663
12663
|
f === "in" || f === "not-in"
|
|
12664
12664
|
);
|
|
12665
|
-
return le.create(d, f,
|
|
12665
|
+
return le.create(d, f, _);
|
|
12666
12666
|
}(e._query, "where", t, e.firestore._databaseId, this._field, this._op, this._value);
|
|
12667
12667
|
}
|
|
12668
12668
|
}
|
|
12669
12669
|
function Tl(n, e, t) {
|
|
12670
|
-
const r = e, s =
|
|
12670
|
+
const r = e, s = gn("where", n);
|
|
12671
12671
|
return es._create(s, r, t);
|
|
12672
12672
|
}
|
|
12673
12673
|
class er extends ja {
|
|
@@ -12726,7 +12726,7 @@ class $a extends Vi {
|
|
|
12726
12726
|
}
|
|
12727
12727
|
}
|
|
12728
12728
|
function YE(n, e = "asc") {
|
|
12729
|
-
const t = e, r =
|
|
12729
|
+
const t = e, r = gn("orderBy", n);
|
|
12730
12730
|
return $a._create(r, t);
|
|
12731
12731
|
}
|
|
12732
12732
|
class za extends Vi {
|
|
@@ -12778,27 +12778,27 @@ function XE(n, e, t, r) {
|
|
|
12778
12778
|
if (t[0] = J(t[0]), t[0] instanceof qa) return function(i, a, c, l, d) {
|
|
12779
12779
|
if (!l) throw new D(P.NOT_FOUND, `Can't use a DocumentSnapshot that doesn't exist for ${c}().`);
|
|
12780
12780
|
const f = [];
|
|
12781
|
-
for (const m of
|
|
12781
|
+
for (const m of Vn(i)) if (m.field.isKeyField()) f.push(Ws(a, l.key));
|
|
12782
12782
|
else {
|
|
12783
|
-
const
|
|
12784
|
-
if (Ei(
|
|
12785
|
-
if (
|
|
12783
|
+
const _ = l.data.field(m.field);
|
|
12784
|
+
if (Ei(_)) throw new D(P.INVALID_ARGUMENT, 'Invalid query. You are trying to start or end a query using a document for which the field "' + m.field + '" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');
|
|
12785
|
+
if (_ === null) {
|
|
12786
12786
|
const R = m.field.canonicalString();
|
|
12787
12787
|
throw new D(P.INVALID_ARGUMENT, `Invalid query. You are trying to start or end a query using a document for which the field '${R}' (used as the orderBy) does not exist.`);
|
|
12788
12788
|
}
|
|
12789
|
-
f.push(
|
|
12789
|
+
f.push(_);
|
|
12790
12790
|
}
|
|
12791
12791
|
return new zn(f, d);
|
|
12792
12792
|
}(n._query, n.firestore._databaseId, e, t[0]._document, r);
|
|
12793
12793
|
{
|
|
12794
12794
|
const s = Fa(n.firestore);
|
|
12795
12795
|
return function(a, c, l, d, f, m) {
|
|
12796
|
-
const
|
|
12797
|
-
if (f.length >
|
|
12796
|
+
const _ = a.explicitOrderBy;
|
|
12797
|
+
if (f.length > _.length) throw new D(P.INVALID_ARGUMENT, `Too many arguments provided to ${d}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);
|
|
12798
12798
|
const R = [];
|
|
12799
|
-
for (let
|
|
12800
|
-
const N = f[
|
|
12801
|
-
if (
|
|
12799
|
+
for (let S = 0; S < f.length; S++) {
|
|
12800
|
+
const N = f[S];
|
|
12801
|
+
if (_[S].field.isKeyField()) {
|
|
12802
12802
|
if (typeof N != "string") throw new D(P.INVALID_ARGUMENT, `Invalid query. Expected a string for document ID in ${d}(), but got a ${typeof N}`);
|
|
12803
12803
|
if (!fa(a) && N.indexOf("/") !== -1) throw new D(P.INVALID_ARGUMENT, `Invalid query. When querying a collection and ordering by documentId(), the value passed to ${d}() must be a plain document ID, but '${N}' contains a slash.`);
|
|
12804
12804
|
const k = a.path.child(Z.fromString(N));
|
|
@@ -12892,7 +12892,7 @@ function nT(n, e) {
|
|
|
12892
12892
|
}(t, n, i)
|
|
12893
12893
|
));
|
|
12894
12894
|
}
|
|
12895
|
-
class
|
|
12895
|
+
class Cr {
|
|
12896
12896
|
/** @hideconstructor */
|
|
12897
12897
|
constructor(e, t) {
|
|
12898
12898
|
this.hasPendingWrites = e, this.fromCache = t;
|
|
@@ -12969,7 +12969,7 @@ class un extends qa {
|
|
|
12969
12969
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12970
12970
|
get(e, t = {}) {
|
|
12971
12971
|
if (this._document) {
|
|
12972
|
-
const r = this._document.data.field(
|
|
12972
|
+
const r = this._document.data.field(gn("DocumentSnapshot.get", e));
|
|
12973
12973
|
if (r !== null) return this._userDataWriter.convertValue(r, t.serverTimestamps);
|
|
12974
12974
|
}
|
|
12975
12975
|
}
|
|
@@ -13012,7 +13012,7 @@ class Ms extends un {
|
|
|
13012
13012
|
class ln {
|
|
13013
13013
|
/** @hideconstructor */
|
|
13014
13014
|
constructor(e, t, r, s) {
|
|
13015
|
-
this._firestore = e, this._userDataWriter = t, this._snapshot = s, this.metadata = new
|
|
13015
|
+
this._firestore = e, this._userDataWriter = t, this._snapshot = s, this.metadata = new Cr(s.hasPendingWrites, s.fromCache), this.query = r;
|
|
13016
13016
|
}
|
|
13017
13017
|
/** An array of all the documents in the `QuerySnapshot`. */
|
|
13018
13018
|
get docs() {
|
|
@@ -13036,7 +13036,7 @@ class ln {
|
|
|
13036
13036
|
*/
|
|
13037
13037
|
forEach(e, t) {
|
|
13038
13038
|
this._snapshot.docs.forEach((r) => {
|
|
13039
|
-
e.call(t, new Ms(this._firestore, this._userDataWriter, r.key, r, new
|
|
13039
|
+
e.call(t, new Ms(this._firestore, this._userDataWriter, r.key, r, new Cr(this._snapshot.mutatedKeys.has(r.key), this._snapshot.fromCache), this.query.converter));
|
|
13040
13040
|
});
|
|
13041
13041
|
}
|
|
13042
13042
|
/**
|
|
@@ -13056,7 +13056,7 @@ class ln {
|
|
|
13056
13056
|
if (s._snapshot.oldDocs.isEmpty()) {
|
|
13057
13057
|
let a = 0;
|
|
13058
13058
|
return s._snapshot.docChanges.map((c) => {
|
|
13059
|
-
const l = new Ms(s._firestore, s._userDataWriter, c.doc.key, c.doc, new
|
|
13059
|
+
const l = new Ms(s._firestore, s._userDataWriter, c.doc.key, c.doc, new Cr(s._snapshot.mutatedKeys.has(c.doc.key), s._snapshot.fromCache), s.query.converter);
|
|
13060
13060
|
return c.doc, {
|
|
13061
13061
|
type: "added",
|
|
13062
13062
|
doc: l,
|
|
@@ -13068,7 +13068,7 @@ class ln {
|
|
|
13068
13068
|
{
|
|
13069
13069
|
let a = s._snapshot.oldDocs;
|
|
13070
13070
|
return s._snapshot.docChanges.filter((c) => i || c.type !== 3).map((c) => {
|
|
13071
|
-
const l = new Ms(s._firestore, s._userDataWriter, c.doc.key, c.doc, new
|
|
13071
|
+
const l = new Ms(s._firestore, s._userDataWriter, c.doc.key, c.doc, new Cr(s._snapshot.mutatedKeys.has(c.doc.key), s._snapshot.fromCache), s.query.converter);
|
|
13072
13072
|
let d = -1, f = -1;
|
|
13073
13073
|
return c.type !== 0 && (d = a.indexOf(c.doc.key), a = a.delete(c.doc.key)), c.type !== 1 && (a = a.add(c.doc), f = a.indexOf(c.doc.key)), {
|
|
13074
13074
|
type: rT(c.type),
|
|
@@ -13170,7 +13170,7 @@ function wo(n, e) {
|
|
|
13170
13170
|
function iT(n) {
|
|
13171
13171
|
n = Ke(n, de);
|
|
13172
13172
|
const e = Ke(n.firestore, Yt), t = Zn(e);
|
|
13173
|
-
return
|
|
13173
|
+
return SE(t, n._key).then((r) => Kd(e, n, r));
|
|
13174
13174
|
}
|
|
13175
13175
|
function oT(n) {
|
|
13176
13176
|
n = Ke(n, pt);
|
|
@@ -13216,7 +13216,7 @@ function Al(n, ...e) {
|
|
|
13216
13216
|
}, zd(n._query);
|
|
13217
13217
|
}
|
|
13218
13218
|
const l = Zn(a);
|
|
13219
|
-
return
|
|
13219
|
+
return CE(l, c, s, i);
|
|
13220
13220
|
}
|
|
13221
13221
|
function Gd(n, e) {
|
|
13222
13222
|
const t = Zn(n);
|
|
@@ -13224,14 +13224,14 @@ function Gd(n, e) {
|
|
|
13224
13224
|
}
|
|
13225
13225
|
function Kd(n, e, t) {
|
|
13226
13226
|
const r = t.docs.get(e._key), s = new Oi(n);
|
|
13227
|
-
return new un(n, s, e._key, r, new
|
|
13227
|
+
return new un(n, s, e._key, r, new Cr(t.hasPendingWrites, t.fromCache), e.converter);
|
|
13228
13228
|
}
|
|
13229
13229
|
function cT(n) {
|
|
13230
13230
|
return n = Ke(n, Yt), Zn(n), new sT(n, (e) => Gd(n, e));
|
|
13231
13231
|
}
|
|
13232
13232
|
(function(e, t = !0) {
|
|
13233
|
-
Rg(
|
|
13234
|
-
const a = r.getProvider("app").getImmediate(), c = new Yt(new
|
|
13233
|
+
Rg(Tn), $t(new Et("firestore", (r, { instanceIdentifier: s, options: i }) => {
|
|
13234
|
+
const a = r.getProvider("app").getImmediate(), c = new Yt(new Cg(r.getProvider("auth-internal")), new Ng(a, r.getProvider("app-check-internal")), Yg(a, s), a);
|
|
13235
13235
|
return i = {
|
|
13236
13236
|
useFetchStreams: t,
|
|
13237
13237
|
...i
|
|
@@ -14036,8 +14036,11 @@ class ET {
|
|
|
14036
14036
|
getQueryObject() {
|
|
14037
14037
|
return this.queryObject;
|
|
14038
14038
|
}
|
|
14039
|
+
getQueryModel() {
|
|
14040
|
+
return this.model;
|
|
14041
|
+
}
|
|
14039
14042
|
}
|
|
14040
|
-
const Zd = class
|
|
14043
|
+
const Zd = class Dn {
|
|
14041
14044
|
constructor() {
|
|
14042
14045
|
}
|
|
14043
14046
|
/**
|
|
@@ -14053,7 +14056,7 @@ const Zd = class Nn {
|
|
|
14053
14056
|
* @returns the data source
|
|
14054
14057
|
*/
|
|
14055
14058
|
static get dataSource() {
|
|
14056
|
-
return
|
|
14059
|
+
return Dn._dataSource;
|
|
14057
14060
|
}
|
|
14058
14061
|
/**
|
|
14059
14062
|
* Retrieves a model for a collection
|
|
@@ -14061,8 +14064,8 @@ const Zd = class Nn {
|
|
|
14061
14064
|
* @returns the model for the collection
|
|
14062
14065
|
*/
|
|
14063
14066
|
static getModel(e) {
|
|
14064
|
-
if (!
|
|
14065
|
-
return new ni(
|
|
14067
|
+
if (!Dn._dataSource) throw new Error(this.error.shouldBeRegistered);
|
|
14068
|
+
return new ni(Dn._dataSource, e);
|
|
14066
14069
|
}
|
|
14067
14070
|
/**
|
|
14068
14071
|
* Retrieves a model for a subcollection
|
|
@@ -14071,8 +14074,8 @@ const Zd = class Nn {
|
|
|
14071
14074
|
* @returns the model for the subcollection
|
|
14072
14075
|
*/
|
|
14073
14076
|
static getModelForSubCollection(e, t) {
|
|
14074
|
-
if (!
|
|
14075
|
-
return new ni(
|
|
14077
|
+
if (!Dn._dataSource) throw new Error(this.error.shouldBeRegistered);
|
|
14078
|
+
return new ni(Dn._dataSource, e, t);
|
|
14076
14079
|
}
|
|
14077
14080
|
/**
|
|
14078
14081
|
* Populates property references with actual data from the store.
|
|
@@ -14108,77 +14111,108 @@ Zd.error = { shouldBeRegistered: "You should register a data source before using
|
|
|
14108
14111
|
let TT = Zd;
|
|
14109
14112
|
class Wa {
|
|
14110
14113
|
constructor(e) {
|
|
14111
|
-
this.
|
|
14112
|
-
throw new Error("The method subscribeToDocumentChangeListener has not been implemented in the concrete data source");
|
|
14113
|
-
}, this.collectionsMatchingTemplate = () => {
|
|
14114
|
+
this._resolveCollectionPaths = () => {
|
|
14114
14115
|
throw new Error("The method collectionsMatchingTemplate has not been implemented in the concrete data source");
|
|
14115
|
-
}, e && (this.
|
|
14116
|
-
}
|
|
14117
|
-
|
|
14118
|
-
const e = pe.getSystemRegisteredReferencesWithCachedProps()
|
|
14119
|
-
|
|
14120
|
-
|
|
14121
|
-
|
|
14122
|
-
|
|
14116
|
+
}, this._disabledChangeListeners = /* @__PURE__ */ new Set(), this._collectionsToWatch = {}, e && (this._beforeUpdate = e.beforeUpdateDocument, this._afterUpdate = e.afterUpdateDocument, this._afterDocumentChange = e.afterDocumentChange, this._beforeDocumentChange = e.beforeDocumentChange, this._beforeQueryOwnerCollection = e.beforeQueryOwnerCollection), this.installUpdaters();
|
|
14117
|
+
}
|
|
14118
|
+
installUpdaters() {
|
|
14119
|
+
const e = pe.getSystemRegisteredReferencesWithCachedProps();
|
|
14120
|
+
this._collectionsToWatch = {}, Object.entries(e).forEach(([t, r]) => {
|
|
14121
|
+
r.forEach((s) => {
|
|
14122
|
+
s.typeName && (Array.isArray(s.typeName) ? s.typeName : [s?.typeName ?? t]).map((i) => pe.collectionPath(pe.createInstance(i), s)).forEach((i) => {
|
|
14123
|
+
this._collectionsToWatch[i] || (this._collectionsToWatch[i] = []), this._collectionsToWatch[i].find((a) => a.name === s.name && a.ownerClassName() === s.ownerClassName()) || this._collectionsToWatch[i].push(s);
|
|
14123
14124
|
});
|
|
14124
14125
|
});
|
|
14125
|
-
})
|
|
14126
|
-
const i = await this.subscribeToDocumentChangeListener(
|
|
14127
|
-
r,
|
|
14128
|
-
(a) => this.onDocumentChange(a, s)
|
|
14129
|
-
);
|
|
14130
|
-
if (i) this.handlers.push(i);
|
|
14131
|
-
else throw new Error("The method documentChangeListener has not been implemented in the concrete data source");
|
|
14132
|
-
})), this.handlers;
|
|
14126
|
+
});
|
|
14133
14127
|
}
|
|
14134
|
-
|
|
14135
|
-
|
|
14128
|
+
/**
|
|
14129
|
+
* Set a callback to be executed before updating each document that has a cached prop to update.
|
|
14130
|
+
* The callback receives the document to update and the prop that triggered the update as parameters.
|
|
14131
|
+
* @param callback The callback to be executed before updating each document that has a cached prop to update.
|
|
14132
|
+
*/
|
|
14133
|
+
set beforeDocumentChange(e) {
|
|
14134
|
+
this._beforeDocumentChange = e;
|
|
14136
14135
|
}
|
|
14137
|
-
|
|
14138
|
-
|
|
14136
|
+
/**
|
|
14137
|
+
* Set a callback to be executed after updating each document that has a cached prop to update.
|
|
14138
|
+
* The callback receives the document that was updated and the prop that triggered the update as parameters.
|
|
14139
|
+
* @param callback The callback to be executed after updating each document that has a cached prop to update.
|
|
14140
|
+
*/
|
|
14141
|
+
set afterDocumentChange(e) {
|
|
14142
|
+
this._afterDocumentChange = e;
|
|
14139
14143
|
}
|
|
14144
|
+
/**
|
|
14145
|
+
* Set a callback to be executed before updating each document that has a cached prop to update.
|
|
14146
|
+
* The callback receives the document to update and the prop that triggered the update as parameters.
|
|
14147
|
+
* @param callback The callback to be executed before updating each document that has a cached prop to update.
|
|
14148
|
+
*/
|
|
14140
14149
|
set beforeUpdateDocument(e) {
|
|
14141
|
-
this.
|
|
14150
|
+
this._beforeUpdate = e;
|
|
14142
14151
|
}
|
|
14152
|
+
/**
|
|
14153
|
+
* Set a callback to be executed after updating each document that has a cached prop to update.
|
|
14154
|
+
* The callback receives the document that was updated and the prop that triggered the update as parameters.
|
|
14155
|
+
* @param callback The callback to be executed after updating each document that has a cached prop to update.
|
|
14156
|
+
*/
|
|
14143
14157
|
set afterUpdateDocument(e) {
|
|
14144
|
-
this.
|
|
14158
|
+
this._afterUpdate = e;
|
|
14159
|
+
}
|
|
14160
|
+
set beforeQueryOwnerCollection(e) {
|
|
14161
|
+
this._beforeQueryOwnerCollection = e;
|
|
14145
14162
|
}
|
|
14146
|
-
set
|
|
14147
|
-
this.
|
|
14163
|
+
set resolveCollectionPaths(e) {
|
|
14164
|
+
this._resolveCollectionPaths = e;
|
|
14148
14165
|
}
|
|
14149
|
-
|
|
14150
|
-
this.
|
|
14166
|
+
get collectionsToWatch() {
|
|
14167
|
+
return this._collectionsToWatch;
|
|
14168
|
+
}
|
|
14169
|
+
updateProps(e, t) {
|
|
14170
|
+
const r = this._collectionsToWatch[e];
|
|
14171
|
+
if (r)
|
|
14172
|
+
return this.onDocumentChange(t, r);
|
|
14151
14173
|
}
|
|
14152
14174
|
async onDocumentChange(e, t) {
|
|
14153
14175
|
const r = jt.toPersistentDocumentChange(e);
|
|
14154
|
-
|
|
14155
|
-
|
|
14156
|
-
|
|
14157
|
-
|
|
14158
|
-
|
|
14159
|
-
|
|
14160
|
-
|
|
14161
|
-
|
|
14162
|
-
|
|
14163
|
-
|
|
14164
|
-
|
|
14165
|
-
|
|
14166
|
-
|
|
14167
|
-
|
|
14168
|
-
|
|
14169
|
-
|
|
14170
|
-
|
|
14171
|
-
|
|
14172
|
-
|
|
14173
|
-
|
|
14176
|
+
this._beforeDocumentChange?.(r, t);
|
|
14177
|
+
const s = {};
|
|
14178
|
+
r.before && (r.after?.id && this._disabledChangeListeners.has(r.after?.id) || (await Promise.all(t.map(async (i) => {
|
|
14179
|
+
const a = Wa.ownerCollectionPath(pe.createInstance(i.ownerClassName()), i, r.params), c = await this._resolveCollectionPaths(a);
|
|
14180
|
+
await Promise.all(c.map(async (l) => {
|
|
14181
|
+
const d = TT.getModel(l);
|
|
14182
|
+
let f = d.find(), m = !1;
|
|
14183
|
+
i.cachedProps?.forEach((R) => {
|
|
14184
|
+
const S = r.before[R], N = r.after[R];
|
|
14185
|
+
S !== N && (m = !0);
|
|
14186
|
+
}), m && (i.searchableArray ? f = f.where(i.name, "contains", r.before) : f = f.where(i.name, "==", r.before)), f = this._beforeQueryOwnerCollection?.(f) ?? f;
|
|
14187
|
+
const _ = await f.get();
|
|
14188
|
+
return s[l] = {
|
|
14189
|
+
totalDocumentsToUpdate: _.length,
|
|
14190
|
+
updatedDocuments: [],
|
|
14191
|
+
documentsToUpdate: _.map((R) => R.name ?? R.id)
|
|
14192
|
+
}, Promise.all([
|
|
14193
|
+
_.map(async (R) => {
|
|
14194
|
+
let S = !1;
|
|
14195
|
+
if (i.cachedProps?.forEach((N) => {
|
|
14196
|
+
const k = r.before[N], U = r.after[N];
|
|
14197
|
+
k !== U && (S = !0);
|
|
14198
|
+
}), S) {
|
|
14199
|
+
if (i.searchableArray) {
|
|
14200
|
+
const N = R[i.name].findIndex((k) => k.id === r.before.id);
|
|
14201
|
+
R[i.name][N] = r.after;
|
|
14174
14202
|
} else
|
|
14175
|
-
|
|
14176
|
-
this.
|
|
14177
|
-
} else
|
|
14203
|
+
R[`_${i.name}`] = r.after;
|
|
14204
|
+
this._beforeUpdate?.(R, i), this.disableChangeListener(R), await d.save(R), this.enableChangeListener(R), s[l]?.updatedDocuments.push(R.id), this._afterUpdate?.(R, i);
|
|
14205
|
+
} else return Promise.resolve();
|
|
14178
14206
|
})
|
|
14179
14207
|
]);
|
|
14180
14208
|
}));
|
|
14181
|
-
})), this.
|
|
14209
|
+
})), this._afterDocumentChange?.(s, t)));
|
|
14210
|
+
}
|
|
14211
|
+
disableChangeListener(e) {
|
|
14212
|
+
this._disabledChangeListeners.add(e.id);
|
|
14213
|
+
}
|
|
14214
|
+
enableChangeListener(e) {
|
|
14215
|
+
this._disabledChangeListeners.delete(e.id);
|
|
14182
14216
|
}
|
|
14183
14217
|
static ownerCollectionPath(e, t, r) {
|
|
14184
14218
|
let s;
|
|
@@ -14189,11 +14223,8 @@ class jt {
|
|
|
14189
14223
|
constructor() {
|
|
14190
14224
|
this._cachedPropsUpdater = void 0;
|
|
14191
14225
|
}
|
|
14192
|
-
|
|
14193
|
-
return this._cachedPropsUpdater = new Wa(e), this._cachedPropsUpdater.
|
|
14194
|
-
}
|
|
14195
|
-
uninstallCachedPropsUpdater() {
|
|
14196
|
-
this._cachedPropsUpdater?.uninstallUpdaters(), this._cachedPropsUpdater = void 0;
|
|
14226
|
+
installCachedPropsUpdater(e) {
|
|
14227
|
+
return this._cachedPropsUpdater = new Wa(e), this._cachedPropsUpdater.resolveCollectionPaths = this.resolveCollectionPaths.bind(this), this._cachedPropsUpdater;
|
|
14197
14228
|
}
|
|
14198
14229
|
get cachedPropsUpdater() {
|
|
14199
14230
|
return this._cachedPropsUpdater;
|
|
@@ -14256,12 +14287,12 @@ class jt {
|
|
|
14256
14287
|
}), c;
|
|
14257
14288
|
}
|
|
14258
14289
|
}
|
|
14259
|
-
const ef = class
|
|
14290
|
+
const ef = class On {
|
|
14260
14291
|
static registerCloudStorage(e, t) {
|
|
14261
|
-
|
|
14292
|
+
On._cloudStorageFactoryMap[e] = t;
|
|
14262
14293
|
}
|
|
14263
14294
|
static createInstance(e) {
|
|
14264
|
-
const t =
|
|
14295
|
+
const t = On._cloudStorageFactoryMap[e];
|
|
14265
14296
|
if (!t)
|
|
14266
14297
|
throw new Error(`You should register the ${e} cloud storage provider prior to use it`);
|
|
14267
14298
|
return t();
|
|
@@ -14270,18 +14301,18 @@ const ef = class Dn {
|
|
|
14270
14301
|
return this.__className;
|
|
14271
14302
|
}
|
|
14272
14303
|
static useCloudStorage(e) {
|
|
14273
|
-
|
|
14304
|
+
On._defaultCloudStorage = e;
|
|
14274
14305
|
}
|
|
14275
14306
|
static get defaultCloudStorage() {
|
|
14276
|
-
if (!
|
|
14307
|
+
if (!On._defaultCloudStorage)
|
|
14277
14308
|
throw new Error("You should define a default cloud storage provider prior to use it");
|
|
14278
|
-
return
|
|
14309
|
+
return On._defaultCloudStorage;
|
|
14279
14310
|
}
|
|
14280
14311
|
};
|
|
14281
14312
|
ef._cloudStorageFactoryMap = {};
|
|
14282
|
-
let
|
|
14313
|
+
let xn = ef;
|
|
14283
14314
|
function tf(n, e) {
|
|
14284
|
-
return
|
|
14315
|
+
return xn.registerCloudStorage(n, e), (t) => {
|
|
14285
14316
|
t.prototype.__className = n;
|
|
14286
14317
|
};
|
|
14287
14318
|
}
|
|
@@ -14290,7 +14321,7 @@ var wT = (n, e, t, r) => {
|
|
|
14290
14321
|
(a = n[i]) && (s = a(s) || s);
|
|
14291
14322
|
return s;
|
|
14292
14323
|
};
|
|
14293
|
-
let vo = class extends
|
|
14324
|
+
let vo = class extends xn {
|
|
14294
14325
|
constructor(n = "") {
|
|
14295
14326
|
super(), this._simulateDelay = 0, this._pendingPromises = [], this.mockFileSystem = {}, this._pathToMockFiles = n;
|
|
14296
14327
|
}
|
|
@@ -14346,13 +14377,13 @@ var IT = Object.defineProperty, vT = Object.getOwnPropertyDescriptor, nr = (n, e
|
|
|
14346
14377
|
(a = n[i]) && (s = (r ? a(e, t, s) : a(s)) || s);
|
|
14347
14378
|
return r && s && IT(e, t, s), s;
|
|
14348
14379
|
};
|
|
14349
|
-
let
|
|
14380
|
+
let _n = class extends pe {
|
|
14350
14381
|
constructor() {
|
|
14351
14382
|
super(...arguments), this._onChange = new Qd();
|
|
14352
14383
|
}
|
|
14353
14384
|
async save({ data: n, fileName: e, progress: t, cloudStorageProvider: r } = {}) {
|
|
14354
14385
|
const s = n || this._pendingData;
|
|
14355
|
-
s && (this._reference && await this.delete(), this.provider = r ||
|
|
14386
|
+
s && (this._reference && await this.delete(), this.provider = r || xn.defaultCloudStorage, this._originalFileName = e || (s instanceof File ? s.name : void 0), this._reference = await this.provider.save(this.id, s, t), this._url = await this.provider.getUrl(this._reference), this._pendingData = void 0, this._onChange.notify({ event: 0, storedFile: this }));
|
|
14356
14387
|
}
|
|
14357
14388
|
uploadControl() {
|
|
14358
14389
|
return this.provider.uploadControl();
|
|
@@ -14367,9 +14398,9 @@ let gn = class extends pe {
|
|
|
14367
14398
|
get provider() {
|
|
14368
14399
|
if (!this._provider)
|
|
14369
14400
|
try {
|
|
14370
|
-
this._provider =
|
|
14401
|
+
this._provider = xn.createInstance(this._cloudStorageProviderName);
|
|
14371
14402
|
} catch {
|
|
14372
|
-
this._provider =
|
|
14403
|
+
this._provider = xn.defaultCloudStorage;
|
|
14373
14404
|
}
|
|
14374
14405
|
return this._provider;
|
|
14375
14406
|
}
|
|
@@ -14395,22 +14426,22 @@ let gn = class extends pe {
|
|
|
14395
14426
|
};
|
|
14396
14427
|
nr([
|
|
14397
14428
|
tr
|
|
14398
|
-
],
|
|
14429
|
+
], _n.prototype, "_reference", 2);
|
|
14399
14430
|
nr([
|
|
14400
14431
|
tr
|
|
14401
|
-
],
|
|
14432
|
+
], _n.prototype, "_url", 2);
|
|
14402
14433
|
nr([
|
|
14403
14434
|
tr
|
|
14404
|
-
],
|
|
14435
|
+
], _n.prototype, "_cloudStorageProviderName", 2);
|
|
14405
14436
|
nr([
|
|
14406
14437
|
tr
|
|
14407
|
-
],
|
|
14438
|
+
], _n.prototype, "_originalFileName", 2);
|
|
14408
14439
|
nr([
|
|
14409
14440
|
tr
|
|
14410
|
-
],
|
|
14411
|
-
|
|
14441
|
+
], _n.prototype, "_mimeType", 2);
|
|
14442
|
+
_n = nr([
|
|
14412
14443
|
yT("StoredFile")
|
|
14413
|
-
],
|
|
14444
|
+
], _n);
|
|
14414
14445
|
class nf {
|
|
14415
14446
|
}
|
|
14416
14447
|
const bl = class Ve extends nf {
|
|
@@ -14545,7 +14576,7 @@ function Ps(n) {
|
|
|
14545
14576
|
(e) => e.toUpperCase().replace("-", "").replace("_", "").replace(" ", "")
|
|
14546
14577
|
) : "";
|
|
14547
14578
|
}
|
|
14548
|
-
var AT = "firebase", RT = "12.
|
|
14579
|
+
var AT = "firebase", RT = "12.10.0";
|
|
14549
14580
|
je(AT, RT, "app");
|
|
14550
14581
|
function rf() {
|
|
14551
14582
|
return {
|
|
@@ -14555,10 +14586,10 @@ function rf() {
|
|
|
14555
14586
|
const bT = rf, sf = new Hr("auth", "Firebase", rf());
|
|
14556
14587
|
const ri = new ia("@firebase/auth");
|
|
14557
14588
|
function PT(n, ...e) {
|
|
14558
|
-
ri.logLevel <= H.WARN && ri.warn(`Auth (${
|
|
14589
|
+
ri.logLevel <= H.WARN && ri.warn(`Auth (${Tn}): ${n}`, ...e);
|
|
14559
14590
|
}
|
|
14560
14591
|
function xs(n, ...e) {
|
|
14561
|
-
ri.logLevel <= H.ERROR && ri.error(`Auth (${
|
|
14592
|
+
ri.logLevel <= H.ERROR && ri.error(`Auth (${Tn}): ${n}`, ...e);
|
|
14562
14593
|
}
|
|
14563
14594
|
function ze(n, ...e) {
|
|
14564
14595
|
throw Ka(n, ...e);
|
|
@@ -14608,19 +14639,19 @@ function vt(n, e) {
|
|
|
14608
14639
|
function Zo() {
|
|
14609
14640
|
return typeof self < "u" && self.location?.href || "";
|
|
14610
14641
|
}
|
|
14611
|
-
function
|
|
14642
|
+
function CT() {
|
|
14612
14643
|
return Pl() === "http:" || Pl() === "https:";
|
|
14613
14644
|
}
|
|
14614
14645
|
function Pl() {
|
|
14615
14646
|
return typeof self < "u" && self.location?.protocol || null;
|
|
14616
14647
|
}
|
|
14617
|
-
function
|
|
14648
|
+
function ST() {
|
|
14618
14649
|
return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
|
|
14619
14650
|
// This is especially true for Cordova apps which have unreliable
|
|
14620
14651
|
// navigator.onLine behavior unless cordova-plugin-network-information is
|
|
14621
14652
|
// installed which overwrites the native navigator.onLine value and
|
|
14622
14653
|
// defines navigator.connection.
|
|
14623
|
-
(
|
|
14654
|
+
(CT() || sm() || "connection" in navigator) ? navigator.onLine : !0;
|
|
14624
14655
|
}
|
|
14625
14656
|
function kT() {
|
|
14626
14657
|
if (typeof navigator > "u")
|
|
@@ -14639,7 +14670,7 @@ class ts {
|
|
|
14639
14670
|
this.shortDelay = e, this.longDelay = t, vt(t > e, "Short delay should be less than long delay!"), this.isMobile = tm() || im();
|
|
14640
14671
|
}
|
|
14641
14672
|
get() {
|
|
14642
|
-
return
|
|
14673
|
+
return ST() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
|
14643
14674
|
}
|
|
14644
14675
|
}
|
|
14645
14676
|
function Qa(n, e) {
|
|
@@ -14811,17 +14842,17 @@ async function cf(n, e, t) {
|
|
|
14811
14842
|
s.clearNetworkTimeout();
|
|
14812
14843
|
const a = await i.json();
|
|
14813
14844
|
if ("needConfirmation" in a)
|
|
14814
|
-
throw
|
|
14845
|
+
throw Cs(n, "account-exists-with-different-credential", a);
|
|
14815
14846
|
if (i.ok && !("errorMessage" in a))
|
|
14816
14847
|
return a;
|
|
14817
14848
|
{
|
|
14818
14849
|
const c = i.ok ? a.errorMessage : a.error.message, [l, d] = c.split(" : ");
|
|
14819
14850
|
if (l === "FEDERATED_USER_ID_ALREADY_LINKED")
|
|
14820
|
-
throw
|
|
14851
|
+
throw Cs(n, "credential-already-in-use", a);
|
|
14821
14852
|
if (l === "EMAIL_EXISTS")
|
|
14822
|
-
throw
|
|
14853
|
+
throw Cs(n, "email-already-in-use", a);
|
|
14823
14854
|
if (l === "USER_DISABLED")
|
|
14824
|
-
throw
|
|
14855
|
+
throw Cs(n, "user-disabled", a);
|
|
14825
14856
|
const f = r[l] || l.toLowerCase().replace(/[_\s]+/g, "-");
|
|
14826
14857
|
if (d)
|
|
14827
14858
|
throw Ga(n, f, d);
|
|
@@ -14869,7 +14900,7 @@ class LT {
|
|
|
14869
14900
|
});
|
|
14870
14901
|
}
|
|
14871
14902
|
}
|
|
14872
|
-
function
|
|
14903
|
+
function Cs(n, e, t) {
|
|
14873
14904
|
const r = {
|
|
14874
14905
|
appName: n.name
|
|
14875
14906
|
};
|
|
@@ -14877,7 +14908,7 @@ function Ss(n, e, t) {
|
|
|
14877
14908
|
const s = Ye(n, e, r);
|
|
14878
14909
|
return s.customData._tokenResponse = t, s;
|
|
14879
14910
|
}
|
|
14880
|
-
function
|
|
14911
|
+
function Cl(n) {
|
|
14881
14912
|
return n !== void 0 && n.enterprise !== void 0;
|
|
14882
14913
|
}
|
|
14883
14914
|
class MT {
|
|
@@ -14979,7 +15010,7 @@ function Ya(n) {
|
|
|
14979
15010
|
return xs("Caught error parsing JWT payload as JSON", s?.toString()), null;
|
|
14980
15011
|
}
|
|
14981
15012
|
}
|
|
14982
|
-
function
|
|
15013
|
+
function Sl(n) {
|
|
14983
15014
|
const e = Ya(n);
|
|
14984
15015
|
return M(
|
|
14985
15016
|
e,
|
|
@@ -15136,7 +15167,7 @@ async function HT(n, e) {
|
|
|
15136
15167
|
async function WT(n, e) {
|
|
15137
15168
|
return Ze(n, "POST", "/v2/accounts:revokeToken", Rt(n, e));
|
|
15138
15169
|
}
|
|
15139
|
-
class
|
|
15170
|
+
class Un {
|
|
15140
15171
|
constructor() {
|
|
15141
15172
|
this.refreshToken = null, this.accessToken = null, this.expirationTime = null;
|
|
15142
15173
|
}
|
|
@@ -15157,7 +15188,7 @@ class xn {
|
|
|
15157
15188
|
"internal-error"
|
|
15158
15189
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
15159
15190
|
);
|
|
15160
|
-
const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) :
|
|
15191
|
+
const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : Sl(e.idToken);
|
|
15161
15192
|
this.updateTokensAndExpiration(e.idToken, e.refreshToken, t);
|
|
15162
15193
|
}
|
|
15163
15194
|
updateFromIdToken(e) {
|
|
@@ -15166,7 +15197,7 @@ class xn {
|
|
|
15166
15197
|
"internal-error"
|
|
15167
15198
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
15168
15199
|
);
|
|
15169
|
-
const t =
|
|
15200
|
+
const t = Sl(e);
|
|
15170
15201
|
this.updateTokensAndExpiration(e, null, t);
|
|
15171
15202
|
}
|
|
15172
15203
|
async getToken(e, t = !1) {
|
|
@@ -15188,7 +15219,7 @@ class xn {
|
|
|
15188
15219
|
this.refreshToken = t || null, this.accessToken = e || null, this.expirationTime = Date.now() + r * 1e3;
|
|
15189
15220
|
}
|
|
15190
15221
|
static fromJSON(e, t) {
|
|
15191
|
-
const { refreshToken: r, accessToken: s, expirationTime: i } = t, a = new
|
|
15222
|
+
const { refreshToken: r, accessToken: s, expirationTime: i } = t, a = new Un();
|
|
15192
15223
|
return r && (M(typeof r == "string", "internal-error", {
|
|
15193
15224
|
appName: e
|
|
15194
15225
|
}), a.refreshToken = r), s && (M(typeof s == "string", "internal-error", {
|
|
@@ -15208,7 +15239,7 @@ class xn {
|
|
|
15208
15239
|
this.accessToken = e.accessToken, this.refreshToken = e.refreshToken, this.expirationTime = e.expirationTime;
|
|
15209
15240
|
}
|
|
15210
15241
|
_clone() {
|
|
15211
|
-
return Object.assign(new
|
|
15242
|
+
return Object.assign(new Un(), this.toJSON());
|
|
15212
15243
|
}
|
|
15213
15244
|
_performRefresh() {
|
|
15214
15245
|
return gt("not implemented");
|
|
@@ -15306,21 +15337,21 @@ class Ge {
|
|
|
15306
15337
|
return this.stsTokenManager.refreshToken || "";
|
|
15307
15338
|
}
|
|
15308
15339
|
static _fromJSON(e, t) {
|
|
15309
|
-
const r = t.displayName ?? void 0, s = t.email ?? void 0, i = t.phoneNumber ?? void 0, a = t.photoURL ?? void 0, c = t.tenantId ?? void 0, l = t._redirectEventId ?? void 0, d = t.createdAt ?? void 0, f = t.lastLoginAt ?? void 0, { uid: m, emailVerified:
|
|
15340
|
+
const r = t.displayName ?? void 0, s = t.email ?? void 0, i = t.phoneNumber ?? void 0, a = t.photoURL ?? void 0, c = t.tenantId ?? void 0, l = t._redirectEventId ?? void 0, d = t.createdAt ?? void 0, f = t.lastLoginAt ?? void 0, { uid: m, emailVerified: _, isAnonymous: R, providerData: S, stsTokenManager: N } = t;
|
|
15310
15341
|
M(
|
|
15311
15342
|
m && N,
|
|
15312
15343
|
e,
|
|
15313
15344
|
"internal-error"
|
|
15314
15345
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
15315
15346
|
);
|
|
15316
|
-
const k =
|
|
15347
|
+
const k = Un.fromJSON(this.name, N);
|
|
15317
15348
|
M(
|
|
15318
15349
|
typeof m == "string",
|
|
15319
15350
|
e,
|
|
15320
15351
|
"internal-error"
|
|
15321
15352
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
15322
15353
|
), Dt(r, e.name), Dt(s, e.name), M(
|
|
15323
|
-
typeof
|
|
15354
|
+
typeof _ == "boolean",
|
|
15324
15355
|
e,
|
|
15325
15356
|
"internal-error"
|
|
15326
15357
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
@@ -15334,7 +15365,7 @@ class Ge {
|
|
|
15334
15365
|
uid: m,
|
|
15335
15366
|
auth: e,
|
|
15336
15367
|
email: s,
|
|
15337
|
-
emailVerified:
|
|
15368
|
+
emailVerified: _,
|
|
15338
15369
|
displayName: r,
|
|
15339
15370
|
isAnonymous: R,
|
|
15340
15371
|
photoURL: a,
|
|
@@ -15344,7 +15375,7 @@ class Ge {
|
|
|
15344
15375
|
createdAt: d,
|
|
15345
15376
|
lastLoginAt: f
|
|
15346
15377
|
});
|
|
15347
|
-
return
|
|
15378
|
+
return S && Array.isArray(S) && (U.providerData = S.map(($) => ({ ...$ }))), l && (U._redirectEventId = l), U;
|
|
15348
15379
|
}
|
|
15349
15380
|
/**
|
|
15350
15381
|
* Initialize a User from an idToken server response
|
|
@@ -15352,7 +15383,7 @@ class Ge {
|
|
|
15352
15383
|
* @param idTokenResponse
|
|
15353
15384
|
*/
|
|
15354
15385
|
static async _fromIdTokenResponse(e, t, r = !1) {
|
|
15355
|
-
const s = new
|
|
15386
|
+
const s = new Un();
|
|
15356
15387
|
s.updateFromServerResponse(t);
|
|
15357
15388
|
const i = new Ge({
|
|
15358
15389
|
uid: t.localId,
|
|
@@ -15374,7 +15405,7 @@ class Ge {
|
|
|
15374
15405
|
"internal-error"
|
|
15375
15406
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
15376
15407
|
);
|
|
15377
|
-
const i = s.providerUserInfo !== void 0 ? lf(s.providerUserInfo) : [], a = !(s.email && s.passwordHash) && !i?.length, c = new
|
|
15408
|
+
const i = s.providerUserInfo !== void 0 ? lf(s.providerUserInfo) : [], a = !(s.email && s.passwordHash) && !i?.length, c = new Un();
|
|
15378
15409
|
c.updateFromIdToken(r);
|
|
15379
15410
|
const l = new Ge({
|
|
15380
15411
|
uid: s.localId,
|
|
@@ -15429,7 +15460,7 @@ const Nl = hf;
|
|
|
15429
15460
|
function Us(n, e, t) {
|
|
15430
15461
|
return `firebase:${n}:${e}:${t}`;
|
|
15431
15462
|
}
|
|
15432
|
-
class
|
|
15463
|
+
class Fn {
|
|
15433
15464
|
constructor(e, t, r) {
|
|
15434
15465
|
this.persistence = e, this.auth = t, this.userKey = r;
|
|
15435
15466
|
const { config: s, name: i } = this.auth;
|
|
@@ -15467,7 +15498,7 @@ class Un {
|
|
|
15467
15498
|
}
|
|
15468
15499
|
static async create(e, t, r = "authUser") {
|
|
15469
15500
|
if (!t.length)
|
|
15470
|
-
return new
|
|
15501
|
+
return new Fn(_t(Nl), e, r);
|
|
15471
15502
|
const s = (await Promise.all(t.map(async (d) => {
|
|
15472
15503
|
if (await d._isAvailable())
|
|
15473
15504
|
return d;
|
|
@@ -15481,13 +15512,13 @@ class Un {
|
|
|
15481
15512
|
if (f) {
|
|
15482
15513
|
let m;
|
|
15483
15514
|
if (typeof f == "string") {
|
|
15484
|
-
const
|
|
15515
|
+
const _ = await si(e, {
|
|
15485
15516
|
idToken: f
|
|
15486
15517
|
}).catch(() => {
|
|
15487
15518
|
});
|
|
15488
|
-
if (!
|
|
15519
|
+
if (!_)
|
|
15489
15520
|
break;
|
|
15490
|
-
m = await Ge._fromGetAccountInfoResponse(e,
|
|
15521
|
+
m = await Ge._fromGetAccountInfoResponse(e, _, f);
|
|
15491
15522
|
} else
|
|
15492
15523
|
m = Ge._fromJSON(e, f);
|
|
15493
15524
|
d !== i && (c = m), i = d;
|
|
@@ -15496,13 +15527,13 @@ class Un {
|
|
|
15496
15527
|
} catch {
|
|
15497
15528
|
}
|
|
15498
15529
|
const l = s.filter((d) => d._shouldAllowMigration);
|
|
15499
|
-
return !i._shouldAllowMigration || !l.length ? new
|
|
15530
|
+
return !i._shouldAllowMigration || !l.length ? new Fn(i, e, r) : (i = l[0], c && await i._set(a, c.toJSON()), await Promise.all(t.map(async (d) => {
|
|
15500
15531
|
if (d !== i)
|
|
15501
15532
|
try {
|
|
15502
15533
|
await d._remove(a);
|
|
15503
15534
|
} catch {
|
|
15504
15535
|
}
|
|
15505
|
-
})), new
|
|
15536
|
+
})), new Fn(i, e, r));
|
|
15506
15537
|
}
|
|
15507
15538
|
}
|
|
15508
15539
|
function Dl(n) {
|
|
@@ -15536,54 +15567,54 @@ function Dl(n) {
|
|
|
15536
15567
|
}
|
|
15537
15568
|
return "Other";
|
|
15538
15569
|
}
|
|
15539
|
-
function df(n =
|
|
15570
|
+
function df(n = Ce()) {
|
|
15540
15571
|
return /firefox\//i.test(n);
|
|
15541
15572
|
}
|
|
15542
|
-
function ff(n =
|
|
15573
|
+
function ff(n = Ce()) {
|
|
15543
15574
|
const e = n.toLowerCase();
|
|
15544
15575
|
return e.includes("safari/") && !e.includes("chrome/") && !e.includes("crios/") && !e.includes("android");
|
|
15545
15576
|
}
|
|
15546
|
-
function pf(n =
|
|
15577
|
+
function pf(n = Ce()) {
|
|
15547
15578
|
return /crios\//i.test(n);
|
|
15548
15579
|
}
|
|
15549
|
-
function mf(n =
|
|
15580
|
+
function mf(n = Ce()) {
|
|
15550
15581
|
return /iemobile/i.test(n);
|
|
15551
15582
|
}
|
|
15552
|
-
function gf(n =
|
|
15583
|
+
function gf(n = Ce()) {
|
|
15553
15584
|
return /android/i.test(n);
|
|
15554
15585
|
}
|
|
15555
|
-
function _f(n =
|
|
15586
|
+
function _f(n = Ce()) {
|
|
15556
15587
|
return /blackberry/i.test(n);
|
|
15557
15588
|
}
|
|
15558
|
-
function yf(n =
|
|
15589
|
+
function yf(n = Ce()) {
|
|
15559
15590
|
return /webos/i.test(n);
|
|
15560
15591
|
}
|
|
15561
|
-
function Ja(n =
|
|
15592
|
+
function Ja(n = Ce()) {
|
|
15562
15593
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
|
15563
15594
|
}
|
|
15564
|
-
function GT(n =
|
|
15595
|
+
function GT(n = Ce()) {
|
|
15565
15596
|
return Ja(n) && !!window.navigator?.standalone;
|
|
15566
15597
|
}
|
|
15567
15598
|
function KT() {
|
|
15568
15599
|
return om() && document.documentMode === 10;
|
|
15569
15600
|
}
|
|
15570
|
-
function Ef(n =
|
|
15601
|
+
function Ef(n = Ce()) {
|
|
15571
15602
|
return Ja(n) || gf(n) || yf(n) || _f(n) || /windows phone/i.test(n) || mf(n);
|
|
15572
15603
|
}
|
|
15573
15604
|
function Tf(n, e = []) {
|
|
15574
15605
|
let t;
|
|
15575
15606
|
switch (n) {
|
|
15576
15607
|
case "Browser":
|
|
15577
|
-
t = Dl(
|
|
15608
|
+
t = Dl(Ce());
|
|
15578
15609
|
break;
|
|
15579
15610
|
case "Worker":
|
|
15580
|
-
t = `${Dl(
|
|
15611
|
+
t = `${Dl(Ce())}-${n}`;
|
|
15581
15612
|
break;
|
|
15582
15613
|
default:
|
|
15583
15614
|
t = n;
|
|
15584
15615
|
}
|
|
15585
15616
|
const r = e.length ? e.join(",") : "FirebaseCore-web";
|
|
15586
|
-
return `${t}/JsCore/${
|
|
15617
|
+
return `${t}/JsCore/${Tn}/${r}`;
|
|
15587
15618
|
}
|
|
15588
15619
|
class QT {
|
|
15589
15620
|
constructor(e) {
|
|
@@ -15703,7 +15734,7 @@ class ZT {
|
|
|
15703
15734
|
}
|
|
15704
15735
|
_initializeWithPersistence(e, t) {
|
|
15705
15736
|
return t && (this._popupRedirectResolver = _t(t)), this._initializationPromise = this.queue(async () => {
|
|
15706
|
-
if (!this._deleted && (this.persistenceManager = await
|
|
15737
|
+
if (!this._deleted && (this.persistenceManager = await Fn.create(this, e), this._resolvePersistenceManagerAvailable?.(), !this._deleted)) {
|
|
15707
15738
|
if (this._popupRedirectResolver?._shouldInitProactively)
|
|
15708
15739
|
try {
|
|
15709
15740
|
await this._popupRedirectResolver._initialize(this);
|
|
@@ -15908,7 +15939,7 @@ class ZT {
|
|
|
15908
15939
|
this,
|
|
15909
15940
|
"argument-error"
|
|
15910
15941
|
/* AuthErrorCode.ARGUMENT_ERROR */
|
|
15911
|
-
), this.redirectPersistenceManager = await
|
|
15942
|
+
), this.redirectPersistenceManager = await Fn.create(
|
|
15912
15943
|
this,
|
|
15913
15944
|
[_t(t._redirectPersistence)],
|
|
15914
15945
|
"redirectUser"
|
|
@@ -16134,7 +16165,7 @@ class aw {
|
|
|
16134
16165
|
}
|
|
16135
16166
|
function s(i, a, c) {
|
|
16136
16167
|
const l = window.grecaptcha;
|
|
16137
|
-
|
|
16168
|
+
Cl(l) ? l.enterprise.ready(() => {
|
|
16138
16169
|
l.enterprise.execute(i, { action: e }).then((d) => {
|
|
16139
16170
|
a(d);
|
|
16140
16171
|
}).catch(() => {
|
|
@@ -16144,7 +16175,7 @@ class aw {
|
|
|
16144
16175
|
}
|
|
16145
16176
|
return this.auth.settings.appVerificationDisabledForTesting ? new sw().execute("siteKey", { action: "verify" }) : new Promise((i, a) => {
|
|
16146
16177
|
r(this.auth).then((c) => {
|
|
16147
|
-
if (!t &&
|
|
16178
|
+
if (!t && Cl(window.grecaptcha))
|
|
16148
16179
|
s(c, i, a);
|
|
16149
16180
|
else {
|
|
16150
16181
|
if (typeof window > "u") {
|
|
@@ -16467,17 +16498,17 @@ class zr extends Xa {
|
|
|
16467
16498
|
return this._getIdTokenResponse(e);
|
|
16468
16499
|
}
|
|
16469
16500
|
}
|
|
16470
|
-
async function
|
|
16501
|
+
async function Bn(n, e) {
|
|
16471
16502
|
return ns(n, "POST", "/v1/accounts:signInWithIdp", Rt(n, e));
|
|
16472
16503
|
}
|
|
16473
16504
|
const yw = "http://localhost";
|
|
16474
|
-
class
|
|
16505
|
+
class yn extends Xa {
|
|
16475
16506
|
constructor() {
|
|
16476
16507
|
super(...arguments), this.pendingToken = null;
|
|
16477
16508
|
}
|
|
16478
16509
|
/** @internal */
|
|
16479
16510
|
static _fromParams(e) {
|
|
16480
|
-
const t = new
|
|
16511
|
+
const t = new yn(e.providerId, e.signInMethod);
|
|
16481
16512
|
return e.idToken || e.accessToken ? (e.idToken && (t.idToken = e.idToken), e.accessToken && (t.accessToken = e.accessToken), e.nonce && !e.pendingToken && (t.nonce = e.nonce), e.pendingToken && (t.pendingToken = e.pendingToken)) : e.oauthToken && e.oauthTokenSecret ? (t.accessToken = e.oauthToken, t.secret = e.oauthTokenSecret) : ze(
|
|
16482
16513
|
"argument-error"
|
|
16483
16514
|
/* AuthErrorCode.ARGUMENT_ERROR */
|
|
@@ -16508,23 +16539,23 @@ class _n extends Xa {
|
|
|
16508
16539
|
const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: r, signInMethod: s, ...i } = t;
|
|
16509
16540
|
if (!r || !s)
|
|
16510
16541
|
return null;
|
|
16511
|
-
const a = new
|
|
16542
|
+
const a = new yn(r, s);
|
|
16512
16543
|
return a.idToken = i.idToken || void 0, a.accessToken = i.accessToken || void 0, a.secret = i.secret, a.nonce = i.nonce, a.pendingToken = i.pendingToken || null, a;
|
|
16513
16544
|
}
|
|
16514
16545
|
/** @internal */
|
|
16515
16546
|
_getIdTokenResponse(e) {
|
|
16516
16547
|
const t = this.buildRequest();
|
|
16517
|
-
return
|
|
16548
|
+
return Bn(e, t);
|
|
16518
16549
|
}
|
|
16519
16550
|
/** @internal */
|
|
16520
16551
|
_linkToIdToken(e, t) {
|
|
16521
16552
|
const r = this.buildRequest();
|
|
16522
|
-
return r.idToken = t,
|
|
16553
|
+
return r.idToken = t, Bn(e, r);
|
|
16523
16554
|
}
|
|
16524
16555
|
/** @internal */
|
|
16525
16556
|
_getReauthenticationResolver(e) {
|
|
16526
16557
|
const t = this.buildRequest();
|
|
16527
|
-
return t.autoCreate = !1,
|
|
16558
|
+
return t.autoCreate = !1, Bn(e, t);
|
|
16528
16559
|
}
|
|
16529
16560
|
buildRequest() {
|
|
16530
16561
|
const e = {
|
|
@@ -16730,7 +16761,7 @@ class rt extends rs {
|
|
|
16730
16761
|
* @param accessToken - Facebook access token.
|
|
16731
16762
|
*/
|
|
16732
16763
|
static credential(e) {
|
|
16733
|
-
return
|
|
16764
|
+
return yn._fromParams({
|
|
16734
16765
|
providerId: rt.PROVIDER_ID,
|
|
16735
16766
|
signInMethod: rt.FACEBOOK_SIGN_IN_METHOD,
|
|
16736
16767
|
accessToken: e
|
|
@@ -16786,7 +16817,7 @@ class st extends rs {
|
|
|
16786
16817
|
* @param accessToken - Google access token.
|
|
16787
16818
|
*/
|
|
16788
16819
|
static credential(e, t) {
|
|
16789
|
-
return
|
|
16820
|
+
return yn._fromParams({
|
|
16790
16821
|
providerId: st.PROVIDER_ID,
|
|
16791
16822
|
signInMethod: st.GOOGLE_SIGN_IN_METHOD,
|
|
16792
16823
|
idToken: e,
|
|
@@ -16838,7 +16869,7 @@ class Vt extends rs {
|
|
|
16838
16869
|
* @param accessToken - GitHub access token.
|
|
16839
16870
|
*/
|
|
16840
16871
|
static credential(e) {
|
|
16841
|
-
return
|
|
16872
|
+
return yn._fromParams({
|
|
16842
16873
|
providerId: Vt.PROVIDER_ID,
|
|
16843
16874
|
signInMethod: Vt.GITHUB_SIGN_IN_METHOD,
|
|
16844
16875
|
accessToken: e
|
|
@@ -16887,7 +16918,7 @@ class We extends rs {
|
|
|
16887
16918
|
* @param secret - Twitter secret.
|
|
16888
16919
|
*/
|
|
16889
16920
|
static credential(e, t) {
|
|
16890
|
-
return
|
|
16921
|
+
return yn._fromParams({
|
|
16891
16922
|
providerId: We.PROVIDER_ID,
|
|
16892
16923
|
signInMethod: We.TWITTER_SIGN_IN_METHOD,
|
|
16893
16924
|
oauthToken: e,
|
|
@@ -16994,7 +17025,7 @@ function Pf(n, e, t, r) {
|
|
|
16994
17025
|
throw i.code === "auth/multi-factor-auth-required" ? oi._fromErrorAndOperation(n, i, e, r) : i;
|
|
16995
17026
|
});
|
|
16996
17027
|
}
|
|
16997
|
-
function
|
|
17028
|
+
function Cf(n) {
|
|
16998
17029
|
return new Set(n.map(({ providerId: e }) => e).filter((e) => !!e));
|
|
16999
17030
|
}
|
|
17000
17031
|
async function Iw(n, e) {
|
|
@@ -17003,7 +17034,7 @@ async function Iw(n, e) {
|
|
|
17003
17034
|
const { providerUserInfo: r } = await FT(t.auth, {
|
|
17004
17035
|
idToken: await t.getIdToken(),
|
|
17005
17036
|
deleteProvider: [e]
|
|
17006
|
-
}), s =
|
|
17037
|
+
}), s = Cf(r || []);
|
|
17007
17038
|
return t.providerData = t.providerData.filter((i) => s.has(i.providerId)), s.has(
|
|
17008
17039
|
"phone"
|
|
17009
17040
|
/* ProviderId.PHONE */
|
|
@@ -17015,7 +17046,7 @@ async function vw(n, e, t = !1) {
|
|
|
17015
17046
|
}
|
|
17016
17047
|
async function Aw(n, e, t) {
|
|
17017
17048
|
await $r(e);
|
|
17018
|
-
const r =
|
|
17049
|
+
const r = Cf(e.providerData);
|
|
17019
17050
|
M(r.has(t) === n, e.auth, "no-such-provider");
|
|
17020
17051
|
}
|
|
17021
17052
|
async function Rw(n, e, t = !1) {
|
|
@@ -17053,14 +17084,14 @@ async function Rw(n, e, t = !1) {
|
|
|
17053
17084
|
), i;
|
|
17054
17085
|
}
|
|
17055
17086
|
}
|
|
17056
|
-
async function
|
|
17087
|
+
async function Sf(n, e, t = !1) {
|
|
17057
17088
|
if (Pe(n.app))
|
|
17058
17089
|
return Promise.reject(lt(n));
|
|
17059
17090
|
const r = "signIn", s = await Pf(n, r, e), i = await At._fromIdTokenResponse(n, r, s);
|
|
17060
17091
|
return t || await n._updateCurrentUser(i.user), i;
|
|
17061
17092
|
}
|
|
17062
17093
|
async function bw(n, e) {
|
|
17063
|
-
return
|
|
17094
|
+
return Sf(mt(n), e);
|
|
17064
17095
|
}
|
|
17065
17096
|
function Pw(n, e, t) {
|
|
17066
17097
|
M(
|
|
@@ -17094,7 +17125,7 @@ async function kf(n) {
|
|
|
17094
17125
|
const e = mt(n);
|
|
17095
17126
|
e._getPasswordPolicyInternal() && await e._updatePasswordPolicy();
|
|
17096
17127
|
}
|
|
17097
|
-
async function
|
|
17128
|
+
async function Cw(n, e, t) {
|
|
17098
17129
|
const r = mt(n);
|
|
17099
17130
|
await ii(r, {
|
|
17100
17131
|
requestType: "PASSWORD_RESET",
|
|
@@ -17103,7 +17134,7 @@ async function Sw(n, e, t) {
|
|
|
17103
17134
|
/* RecaptchaClientType.WEB */
|
|
17104
17135
|
}, "getOobCode", mw);
|
|
17105
17136
|
}
|
|
17106
|
-
async function
|
|
17137
|
+
async function Sw(n, e, t) {
|
|
17107
17138
|
if (Pe(n.app))
|
|
17108
17139
|
return Promise.reject(lt(n));
|
|
17109
17140
|
const r = mt(n), a = await ii(r, {
|
|
@@ -17413,9 +17444,9 @@ class Uw {
|
|
|
17413
17444
|
a = {
|
|
17414
17445
|
messageChannel: s,
|
|
17415
17446
|
onMessage(m) {
|
|
17416
|
-
const
|
|
17417
|
-
if (
|
|
17418
|
-
switch (
|
|
17447
|
+
const _ = m;
|
|
17448
|
+
if (_.data.eventId === d)
|
|
17449
|
+
switch (_.data.status) {
|
|
17419
17450
|
case "ack":
|
|
17420
17451
|
clearTimeout(f), i = setTimeout(
|
|
17421
17452
|
() => {
|
|
@@ -17429,7 +17460,7 @@ class Uw {
|
|
|
17429
17460
|
);
|
|
17430
17461
|
break;
|
|
17431
17462
|
case "done":
|
|
17432
|
-
clearTimeout(i), c(
|
|
17463
|
+
clearTimeout(i), c(_.data.response);
|
|
17433
17464
|
break;
|
|
17434
17465
|
default:
|
|
17435
17466
|
clearTimeout(f), clearTimeout(i), l(new Error(
|
|
@@ -17697,13 +17728,13 @@ class nc extends Xa {
|
|
|
17697
17728
|
), this.params = e;
|
|
17698
17729
|
}
|
|
17699
17730
|
_getIdTokenResponse(e) {
|
|
17700
|
-
return
|
|
17731
|
+
return Bn(e, this._buildIdpRequest());
|
|
17701
17732
|
}
|
|
17702
17733
|
_linkToIdToken(e, t) {
|
|
17703
|
-
return
|
|
17734
|
+
return Bn(e, this._buildIdpRequest(t));
|
|
17704
17735
|
}
|
|
17705
17736
|
_getReauthenticationResolver(e) {
|
|
17706
|
-
return
|
|
17737
|
+
return Bn(e, this._buildIdpRequest());
|
|
17707
17738
|
}
|
|
17708
17739
|
_buildIdpRequest(e) {
|
|
17709
17740
|
const t = {
|
|
@@ -17719,7 +17750,7 @@ class nc extends Xa {
|
|
|
17719
17750
|
}
|
|
17720
17751
|
}
|
|
17721
17752
|
function Qw(n) {
|
|
17722
|
-
return
|
|
17753
|
+
return Sf(n.auth, new nc(n), n.bypassAuthState);
|
|
17723
17754
|
}
|
|
17724
17755
|
function Yw(n) {
|
|
17725
17756
|
const { auth: e, user: t } = n;
|
|
@@ -18126,7 +18157,7 @@ function II(n) {
|
|
|
18126
18157
|
const t = e.emulator ? Qa(e, EI) : `https://${n.config.authDomain}/${yI}`, r = {
|
|
18127
18158
|
apiKey: e.apiKey,
|
|
18128
18159
|
appName: n.name,
|
|
18129
|
-
v:
|
|
18160
|
+
v: Tn
|
|
18130
18161
|
}, s = wI.get(n.config.apiHost);
|
|
18131
18162
|
s && (r.eid = s);
|
|
18132
18163
|
const i = n._getFrameworks();
|
|
@@ -18170,7 +18201,7 @@ const AI = {
|
|
|
18170
18201
|
resizable: "yes",
|
|
18171
18202
|
statusbar: "yes",
|
|
18172
18203
|
toolbar: "no"
|
|
18173
|
-
}, RI = 500, bI = 600, PI = "_blank",
|
|
18204
|
+
}, RI = 500, bI = 600, PI = "_blank", CI = "http://localhost";
|
|
18174
18205
|
class zl {
|
|
18175
18206
|
constructor(e) {
|
|
18176
18207
|
this.window = e, this.associatedEvent = null;
|
|
@@ -18183,7 +18214,7 @@ class zl {
|
|
|
18183
18214
|
}
|
|
18184
18215
|
}
|
|
18185
18216
|
}
|
|
18186
|
-
function
|
|
18217
|
+
function SI(n, e, t, r = RI, s = bI) {
|
|
18187
18218
|
const i = Math.max((window.screen.availHeight - s) / 2, 0).toString(), a = Math.max((window.screen.availWidth - r) / 2, 0).toString();
|
|
18188
18219
|
let c = "";
|
|
18189
18220
|
const l = {
|
|
@@ -18192,9 +18223,9 @@ function CI(n, e, t, r = RI, s = bI) {
|
|
|
18192
18223
|
height: s.toString(),
|
|
18193
18224
|
top: i,
|
|
18194
18225
|
left: a
|
|
18195
|
-
}, d =
|
|
18196
|
-
t && (c = pf(d) ? PI : t), df(d) && (e = e ||
|
|
18197
|
-
const f = Object.entries(l).reduce((
|
|
18226
|
+
}, d = Ce().toLowerCase();
|
|
18227
|
+
t && (c = pf(d) ? PI : t), df(d) && (e = e || CI, l.scrollbars = "yes");
|
|
18228
|
+
const f = Object.entries(l).reduce((_, [R, S]) => `${_}${R}=${S},`, "");
|
|
18198
18229
|
if (GT(d) && c !== "_self")
|
|
18199
18230
|
return kI(e || "", c), new zl(null);
|
|
18200
18231
|
const m = window.open(e || "", c, f);
|
|
@@ -18234,7 +18265,7 @@ async function Hl(n, e, t, r, s, i) {
|
|
|
18234
18265
|
appName: n.name,
|
|
18235
18266
|
authType: t,
|
|
18236
18267
|
redirectUrl: r,
|
|
18237
|
-
v:
|
|
18268
|
+
v: Tn,
|
|
18238
18269
|
eventId: s
|
|
18239
18270
|
};
|
|
18240
18271
|
if (e instanceof Mi) {
|
|
@@ -18266,7 +18297,7 @@ class LI {
|
|
|
18266
18297
|
async _openPopup(e, t, r, s) {
|
|
18267
18298
|
vt(this.eventManagers[e._key()]?.manager, "_initialize() not called before _openPopup()");
|
|
18268
18299
|
const i = await Hl(e, t, r, Zo(), s);
|
|
18269
|
-
return
|
|
18300
|
+
return SI(e, i, ec());
|
|
18270
18301
|
}
|
|
18271
18302
|
async _openRedirect(e, t, r, s) {
|
|
18272
18303
|
await this._originValidation(e);
|
|
@@ -18316,7 +18347,7 @@ class LI {
|
|
|
18316
18347
|
}
|
|
18317
18348
|
}
|
|
18318
18349
|
const MI = LI;
|
|
18319
|
-
var Wl = "@firebase/auth", Gl = "1.12.
|
|
18350
|
+
var Wl = "@firebase/auth", Gl = "1.12.1";
|
|
18320
18351
|
class xI {
|
|
18321
18352
|
constructor(e) {
|
|
18322
18353
|
this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
|
|
@@ -18604,18 +18635,18 @@ class Be {
|
|
|
18604
18635
|
static makeFromUrl(e, t) {
|
|
18605
18636
|
let r = null;
|
|
18606
18637
|
const s = "([A-Za-z0-9.\\-_]+)";
|
|
18607
|
-
function i(
|
|
18608
|
-
|
|
18638
|
+
function i(K) {
|
|
18639
|
+
K.path.charAt(K.path.length - 1) === "/" && (K.path_ = K.path_.slice(0, -1));
|
|
18609
18640
|
}
|
|
18610
18641
|
const a = "(/(.*))?$", c = new RegExp("^gs://" + s + a, "i"), l = { bucket: 1, path: 3 };
|
|
18611
|
-
function d(
|
|
18612
|
-
|
|
18642
|
+
function d(K) {
|
|
18643
|
+
K.path_ = decodeURIComponent(K.path);
|
|
18613
18644
|
}
|
|
18614
|
-
const f = "v[A-Za-z0-9_]+", m = t.replace(/[.]/g, "\\."),
|
|
18645
|
+
const f = "v[A-Za-z0-9_]+", m = t.replace(/[.]/g, "\\."), _ = "(/([^?#]*).*)?$", R = new RegExp(`^https?://${m}/${f}/b/${s}/o${_}`, "i"), S = { bucket: 1, path: 3 }, N = t === qf ? "(?:storage.googleapis.com|storage.cloud.google.com)" : t, k = "([^?#]*)", U = new RegExp(`^https?://${N}/${s}/${k}`, "i"), j = [
|
|
18615
18646
|
{ regex: c, indices: l, postModify: i },
|
|
18616
18647
|
{
|
|
18617
18648
|
regex: R,
|
|
18618
|
-
indices:
|
|
18649
|
+
indices: S,
|
|
18619
18650
|
postModify: d
|
|
18620
18651
|
},
|
|
18621
18652
|
{
|
|
@@ -18624,12 +18655,12 @@ class Be {
|
|
|
18624
18655
|
postModify: d
|
|
18625
18656
|
}
|
|
18626
18657
|
];
|
|
18627
|
-
for (let
|
|
18628
|
-
const ge = j[
|
|
18658
|
+
for (let K = 0; K < j.length; K++) {
|
|
18659
|
+
const ge = j[K], re = ge.regex.exec(e);
|
|
18629
18660
|
if (re) {
|
|
18630
18661
|
const w = re[ge.indices.bucket];
|
|
18631
|
-
let
|
|
18632
|
-
|
|
18662
|
+
let g = re[ge.indices.path];
|
|
18663
|
+
g || (g = ""), r = new Be(w, g), ge.postModify(r);
|
|
18633
18664
|
break;
|
|
18634
18665
|
}
|
|
18635
18666
|
}
|
|
@@ -18664,29 +18695,29 @@ function av(n, e, t) {
|
|
|
18664
18695
|
s = null, n(R, l());
|
|
18665
18696
|
}, k);
|
|
18666
18697
|
}
|
|
18667
|
-
function
|
|
18698
|
+
function _() {
|
|
18668
18699
|
i && clearTimeout(i);
|
|
18669
18700
|
}
|
|
18670
18701
|
function R(k, ...U) {
|
|
18671
18702
|
if (d) {
|
|
18672
|
-
|
|
18703
|
+
_();
|
|
18673
18704
|
return;
|
|
18674
18705
|
}
|
|
18675
18706
|
if (k) {
|
|
18676
|
-
|
|
18707
|
+
_(), f.call(null, k, ...U);
|
|
18677
18708
|
return;
|
|
18678
18709
|
}
|
|
18679
18710
|
if (l() || a) {
|
|
18680
|
-
|
|
18711
|
+
_(), f.call(null, k, ...U);
|
|
18681
18712
|
return;
|
|
18682
18713
|
}
|
|
18683
18714
|
r < 64 && (r *= 2);
|
|
18684
18715
|
let j;
|
|
18685
18716
|
c === 1 ? (c = 2, j = 0) : j = (r + Math.random()) * 1e3, m(j);
|
|
18686
18717
|
}
|
|
18687
|
-
let
|
|
18718
|
+
let S = !1;
|
|
18688
18719
|
function N(k) {
|
|
18689
|
-
|
|
18720
|
+
S || (S = !0, _(), !d && (s !== null ? (k || (c = 2), clearTimeout(s), m(0)) : k || (c = 1)));
|
|
18690
18721
|
}
|
|
18691
18722
|
return m(0), i = setTimeout(() => {
|
|
18692
18723
|
a = !0, N(!0);
|
|
@@ -18747,9 +18778,9 @@ function Kf(n, e) {
|
|
|
18747
18778
|
return t || s || i;
|
|
18748
18779
|
}
|
|
18749
18780
|
class dv {
|
|
18750
|
-
constructor(e, t, r, s, i, a, c, l, d, f, m,
|
|
18751
|
-
this.url_ = e, this.method_ = t, this.headers_ = r, this.body_ = s, this.successCodes_ = i, this.additionalRetryCodes_ = a, this.callback_ = c, this.errorCallback_ = l, this.timeout_ = d, this.progressCallback_ = f, this.connectionFactory_ = m, this.retry =
|
|
18752
|
-
this.resolve_ =
|
|
18781
|
+
constructor(e, t, r, s, i, a, c, l, d, f, m, _ = !0, R = !1) {
|
|
18782
|
+
this.url_ = e, this.method_ = t, this.headers_ = r, this.body_ = s, this.successCodes_ = i, this.additionalRetryCodes_ = a, this.callback_ = c, this.errorCallback_ = l, this.timeout_ = d, this.progressCallback_ = f, this.connectionFactory_ = m, this.retry = _, this.isUsingEmulator = R, this.pendingConnection_ = null, this.backoffId_ = null, this.canceled_ = !1, this.appDelete_ = !1, this.promise_ = new Promise((S, N) => {
|
|
18783
|
+
this.resolve_ = S, this.reject_ = N, this.start_();
|
|
18753
18784
|
});
|
|
18754
18785
|
}
|
|
18755
18786
|
/**
|
|
@@ -18758,7 +18789,7 @@ class dv {
|
|
|
18758
18789
|
start_() {
|
|
18759
18790
|
const e = (r, s) => {
|
|
18760
18791
|
if (s) {
|
|
18761
|
-
r(!1, new
|
|
18792
|
+
r(!1, new Ss(!1, null, !0));
|
|
18762
18793
|
return;
|
|
18763
18794
|
}
|
|
18764
18795
|
const i = this.connectionFactory_();
|
|
@@ -18772,11 +18803,11 @@ class dv {
|
|
|
18772
18803
|
const c = i.getErrorCode() === hn.NO_ERROR, l = i.getStatus();
|
|
18773
18804
|
if (!c || Kf(l, this.additionalRetryCodes_) && this.retry) {
|
|
18774
18805
|
const f = i.getErrorCode() === hn.ABORT;
|
|
18775
|
-
r(!1, new
|
|
18806
|
+
r(!1, new Ss(!1, null, f));
|
|
18776
18807
|
return;
|
|
18777
18808
|
}
|
|
18778
18809
|
const d = this.successCodes_.indexOf(l) !== -1;
|
|
18779
|
-
r(!0, new
|
|
18810
|
+
r(!0, new Ss(d, i));
|
|
18780
18811
|
});
|
|
18781
18812
|
}, t = (r, s) => {
|
|
18782
18813
|
const i = this.resolve_, a = this.reject_, c = s.connection;
|
|
@@ -18798,7 +18829,7 @@ class dv {
|
|
|
18798
18829
|
a(l);
|
|
18799
18830
|
}
|
|
18800
18831
|
};
|
|
18801
|
-
this.canceled_ ? t(!1, new
|
|
18832
|
+
this.canceled_ ? t(!1, new Ss(!1, null, !0)) : this.backoffId_ = av(e, t, this.timeout_);
|
|
18802
18833
|
}
|
|
18803
18834
|
/** @inheritDoc */
|
|
18804
18835
|
getPromise() {
|
|
@@ -18809,7 +18840,7 @@ class dv {
|
|
|
18809
18840
|
this.canceled_ = !0, this.appDelete_ = e || !1, this.backoffId_ !== null && cv(this.backoffId_), this.pendingConnection_ !== null && this.pendingConnection_.abort();
|
|
18810
18841
|
}
|
|
18811
18842
|
}
|
|
18812
|
-
class
|
|
18843
|
+
class Ss {
|
|
18813
18844
|
constructor(e, t, r) {
|
|
18814
18845
|
this.wasSuccessCode = e, this.connection = t, this.canceled = !!r;
|
|
18815
18846
|
}
|
|
@@ -18888,7 +18919,7 @@ const it = {
|
|
|
18888
18919
|
*/
|
|
18889
18920
|
DATA_URL: "data_url"
|
|
18890
18921
|
};
|
|
18891
|
-
class
|
|
18922
|
+
class Co {
|
|
18892
18923
|
constructor(e, t) {
|
|
18893
18924
|
this.data = e, this.contentType = t || null;
|
|
18894
18925
|
}
|
|
@@ -18896,12 +18927,12 @@ class So {
|
|
|
18896
18927
|
function Iv(n, e) {
|
|
18897
18928
|
switch (n) {
|
|
18898
18929
|
case it.RAW:
|
|
18899
|
-
return new
|
|
18930
|
+
return new Co(Qf(e));
|
|
18900
18931
|
case it.BASE64:
|
|
18901
18932
|
case it.BASE64URL:
|
|
18902
|
-
return new
|
|
18933
|
+
return new Co(Yf(n, e));
|
|
18903
18934
|
case it.DATA_URL:
|
|
18904
|
-
return new
|
|
18935
|
+
return new Co(Av(e), Rv(e));
|
|
18905
18936
|
}
|
|
18906
18937
|
throw rc();
|
|
18907
18938
|
}
|
|
@@ -19038,7 +19069,7 @@ function Pv(n) {
|
|
|
19038
19069
|
const e = n.lastIndexOf("/");
|
|
19039
19070
|
return e === -1 ? "" : n.slice(0, e);
|
|
19040
19071
|
}
|
|
19041
|
-
function
|
|
19072
|
+
function Cv(n, e) {
|
|
19042
19073
|
const t = e.split("/").filter((r) => r.length > 0).join("/");
|
|
19043
19074
|
return n.length === 0 ? t : n + "/" + t;
|
|
19044
19075
|
}
|
|
@@ -19046,12 +19077,12 @@ function Zf(n) {
|
|
|
19046
19077
|
const e = n.lastIndexOf("/", n.length - 2);
|
|
19047
19078
|
return e === -1 ? n : n.slice(e + 1);
|
|
19048
19079
|
}
|
|
19049
|
-
function
|
|
19080
|
+
function Sv(n, e) {
|
|
19050
19081
|
return e;
|
|
19051
19082
|
}
|
|
19052
19083
|
class Ne {
|
|
19053
19084
|
constructor(e, t, r, s) {
|
|
19054
|
-
this.server = e, this.local = t || e, this.writable = !!r, this.xform = s ||
|
|
19085
|
+
this.server = e, this.local = t || e, this.writable = !!r, this.xform = s || Sv;
|
|
19055
19086
|
}
|
|
19056
19087
|
}
|
|
19057
19088
|
let ks = null;
|
|
@@ -19104,11 +19135,11 @@ function Ov(n, e, t, r) {
|
|
|
19104
19135
|
return null;
|
|
19105
19136
|
const a = encodeURIComponent;
|
|
19106
19137
|
return i.split(",").map((d) => {
|
|
19107
|
-
const f = n.bucket, m = n.fullPath,
|
|
19138
|
+
const f = n.bucket, m = n.fullPath, _ = "/b/" + a(f) + "/o/" + a(m), R = sr(_, t, r), S = Gf({
|
|
19108
19139
|
alt: "media",
|
|
19109
19140
|
token: d
|
|
19110
19141
|
});
|
|
19111
|
-
return R +
|
|
19142
|
+
return R + S;
|
|
19112
19143
|
})[0];
|
|
19113
19144
|
}
|
|
19114
19145
|
function np(n, e) {
|
|
@@ -19119,7 +19150,7 @@ function np(n, e) {
|
|
|
19119
19150
|
}
|
|
19120
19151
|
return JSON.stringify(t);
|
|
19121
19152
|
}
|
|
19122
|
-
class
|
|
19153
|
+
class An {
|
|
19123
19154
|
constructor(e, t, r, s) {
|
|
19124
19155
|
this.url = e, this.method = t, this.handler = r, this.timeout = s, this.urlParams = {}, this.headers = {}, this.body = null, this.errorHandler = null, this.progressCallback = null, this.successCodes = [200], this.additionalRetryCodes = [];
|
|
19125
19156
|
}
|
|
@@ -19158,18 +19189,18 @@ function oc(n) {
|
|
|
19158
19189
|
return t;
|
|
19159
19190
|
}
|
|
19160
19191
|
function Lv(n, e, t) {
|
|
19161
|
-
const r = e.fullServerUrl(), s = sr(r, n.host, n._protocol), i = "GET", a = n.maxOperationRetryTime, c = new
|
|
19192
|
+
const r = e.fullServerUrl(), s = sr(r, n.host, n._protocol), i = "GET", a = n.maxOperationRetryTime, c = new An(s, i, ic(n, t), a);
|
|
19162
19193
|
return c.errorHandler = oc(e), c;
|
|
19163
19194
|
}
|
|
19164
19195
|
function Mv(n, e, t) {
|
|
19165
|
-
const r = e.fullServerUrl(), s = sr(r, n.host, n._protocol), i = "GET", a = n.maxOperationRetryTime, c = new
|
|
19196
|
+
const r = e.fullServerUrl(), s = sr(r, n.host, n._protocol), i = "GET", a = n.maxOperationRetryTime, c = new An(s, i, Vv(n, t), a);
|
|
19166
19197
|
return c.errorHandler = oc(e), c;
|
|
19167
19198
|
}
|
|
19168
19199
|
function xv(n, e) {
|
|
19169
19200
|
const t = e.fullServerUrl(), r = sr(t, n.host, n._protocol), s = "DELETE", i = n.maxOperationRetryTime;
|
|
19170
19201
|
function a(l, d) {
|
|
19171
19202
|
}
|
|
19172
|
-
const c = new
|
|
19203
|
+
const c = new An(r, s, a, i);
|
|
19173
19204
|
return c.successCodes = [200, 204], c.errorHandler = oc(e), c;
|
|
19174
19205
|
}
|
|
19175
19206
|
function Uv(n, e) {
|
|
@@ -19185,7 +19216,7 @@ function Fv(n, e, t, r, s) {
|
|
|
19185
19216
|
};
|
|
19186
19217
|
function c() {
|
|
19187
19218
|
let j = "";
|
|
19188
|
-
for (let
|
|
19219
|
+
for (let K = 0; K < 2; K++)
|
|
19189
19220
|
j = j + Math.random().toString().slice(2);
|
|
19190
19221
|
return j;
|
|
19191
19222
|
}
|
|
@@ -19198,12 +19229,12 @@ Content-Type: application/json; charset=utf-8\r
|
|
|
19198
19229
|
--` + l + `\r
|
|
19199
19230
|
Content-Type: ` + d.contentType + `\r
|
|
19200
19231
|
\r
|
|
19201
|
-
`,
|
|
19202
|
-
--` + l + "--", R = Lt.getBlob(m, r,
|
|
19232
|
+
`, _ = `\r
|
|
19233
|
+
--` + l + "--", R = Lt.getBlob(m, r, _);
|
|
19203
19234
|
if (R === null)
|
|
19204
19235
|
throw Hf();
|
|
19205
|
-
const
|
|
19206
|
-
return $.urlParams =
|
|
19236
|
+
const S = { name: d.fullPath }, N = sr(i, n.host, n._protocol), k = "POST", U = n.maxUploadRetryTime, $ = new An(N, k, ic(n, t), U);
|
|
19237
|
+
return $.urlParams = S, $.headers = a, $.body = R.uploadData(), $.errorHandler = is(e), $;
|
|
19207
19238
|
}
|
|
19208
19239
|
class ui {
|
|
19209
19240
|
constructor(e, t, r, s) {
|
|
@@ -19226,7 +19257,7 @@ function Bv(n, e, t, r, s) {
|
|
|
19226
19257
|
"X-Goog-Upload-Header-Content-Length": `${r.size()}`,
|
|
19227
19258
|
"X-Goog-Upload-Header-Content-Type": a.contentType,
|
|
19228
19259
|
"Content-Type": "application/json; charset=utf-8"
|
|
19229
|
-
}, m = np(a, t),
|
|
19260
|
+
}, m = np(a, t), _ = n.maxUploadRetryTime;
|
|
19230
19261
|
function R(N) {
|
|
19231
19262
|
ac(N);
|
|
19232
19263
|
let k;
|
|
@@ -19237,8 +19268,8 @@ function Bv(n, e, t, r, s) {
|
|
|
19237
19268
|
}
|
|
19238
19269
|
return yt(Fi(k)), k;
|
|
19239
19270
|
}
|
|
19240
|
-
const
|
|
19241
|
-
return
|
|
19271
|
+
const S = new An(l, d, R, _);
|
|
19272
|
+
return S.urlParams = c, S.headers = f, S.body = m, S.errorHandler = is(e), S;
|
|
19242
19273
|
}
|
|
19243
19274
|
function qv(n, e, t, r) {
|
|
19244
19275
|
const s = { "X-Goog-Upload-Command": "query" };
|
|
@@ -19251,10 +19282,10 @@ function qv(n, e, t, r) {
|
|
|
19251
19282
|
yt(!1);
|
|
19252
19283
|
}
|
|
19253
19284
|
m || yt(!1);
|
|
19254
|
-
const
|
|
19255
|
-
return yt(!isNaN(
|
|
19285
|
+
const _ = Number(m);
|
|
19286
|
+
return yt(!isNaN(_)), new ui(_, r.size(), f === "final");
|
|
19256
19287
|
}
|
|
19257
|
-
const a = "POST", c = n.maxUploadRetryTime, l = new
|
|
19288
|
+
const a = "POST", c = n.maxUploadRetryTime, l = new An(t, a, i, c);
|
|
19258
19289
|
return l.headers = s, l.errorHandler = is(e), l;
|
|
19259
19290
|
}
|
|
19260
19291
|
const Jl = 256 * 1024;
|
|
@@ -19265,22 +19296,22 @@ function jv(n, e, t, r, s, i, a, c) {
|
|
|
19265
19296
|
const d = l.total - l.current;
|
|
19266
19297
|
let f = d;
|
|
19267
19298
|
s > 0 && (f = Math.min(f, s));
|
|
19268
|
-
const m = l.current,
|
|
19299
|
+
const m = l.current, _ = m + f;
|
|
19269
19300
|
let R = "";
|
|
19270
19301
|
f === 0 ? R = "finalize" : d === f ? R = "upload, finalize" : R = "upload";
|
|
19271
|
-
const
|
|
19302
|
+
const S = {
|
|
19272
19303
|
"X-Goog-Upload-Command": R,
|
|
19273
19304
|
"X-Goog-Upload-Offset": `${l.current}`
|
|
19274
|
-
}, N = r.slice(m,
|
|
19305
|
+
}, N = r.slice(m, _);
|
|
19275
19306
|
if (N === null)
|
|
19276
19307
|
throw Hf();
|
|
19277
|
-
function k(
|
|
19278
|
-
const re = ac(
|
|
19308
|
+
function k(K, ge) {
|
|
19309
|
+
const re = ac(K, ["active", "final"]), w = l.current + f, g = r.size();
|
|
19279
19310
|
let E;
|
|
19280
|
-
return re === "final" ? E = ic(e, i)(
|
|
19311
|
+
return re === "final" ? E = ic(e, i)(K, ge) : E = null, new ui(w, g, re === "final", E);
|
|
19281
19312
|
}
|
|
19282
|
-
const U = "POST", $ = e.maxUploadRetryTime, j = new
|
|
19283
|
-
return j.headers =
|
|
19313
|
+
const U = "POST", $ = e.maxUploadRetryTime, j = new An(t, U, k, $);
|
|
19314
|
+
return j.headers = S, j.body = N.uploadData(), j.progressCallback = c || null, j.errorHandler = is(n), j;
|
|
19284
19315
|
}
|
|
19285
19316
|
const Me = {
|
|
19286
19317
|
/** The task is currently transferring data. */
|
|
@@ -19294,7 +19325,7 @@ const Me = {
|
|
|
19294
19325
|
/** The task failed with an error. */
|
|
19295
19326
|
ERROR: "error"
|
|
19296
19327
|
};
|
|
19297
|
-
function
|
|
19328
|
+
function So(n) {
|
|
19298
19329
|
switch (n) {
|
|
19299
19330
|
case "running":
|
|
19300
19331
|
case "pausing":
|
|
@@ -19322,7 +19353,7 @@ class $v {
|
|
|
19322
19353
|
}
|
|
19323
19354
|
}
|
|
19324
19355
|
}
|
|
19325
|
-
function
|
|
19356
|
+
function Cn(n) {
|
|
19326
19357
|
return (...e) => {
|
|
19327
19358
|
Promise.resolve().then(() => n(...e));
|
|
19328
19359
|
};
|
|
@@ -19591,7 +19622,7 @@ class Wv {
|
|
|
19591
19622
|
* A snapshot of the current task state.
|
|
19592
19623
|
*/
|
|
19593
19624
|
get snapshot() {
|
|
19594
|
-
const e =
|
|
19625
|
+
const e = So(this._state);
|
|
19595
19626
|
return {
|
|
19596
19627
|
bytesTransferred: this._transferred,
|
|
19597
19628
|
totalBytes: this._blob.size(),
|
|
@@ -19660,14 +19691,14 @@ class Wv {
|
|
|
19660
19691
|
_finishPromise() {
|
|
19661
19692
|
if (this._resolve !== void 0) {
|
|
19662
19693
|
let e = !0;
|
|
19663
|
-
switch (
|
|
19694
|
+
switch (So(this._state)) {
|
|
19664
19695
|
case Me.SUCCESS:
|
|
19665
|
-
|
|
19696
|
+
Cn(this._resolve.bind(null, this.snapshot))();
|
|
19666
19697
|
break;
|
|
19667
19698
|
case Me.CANCELED:
|
|
19668
19699
|
case Me.ERROR:
|
|
19669
19700
|
const t = this._reject;
|
|
19670
|
-
|
|
19701
|
+
Cn(t.bind(null, this._error))();
|
|
19671
19702
|
break;
|
|
19672
19703
|
default:
|
|
19673
19704
|
e = !1;
|
|
@@ -19677,20 +19708,20 @@ class Wv {
|
|
|
19677
19708
|
}
|
|
19678
19709
|
}
|
|
19679
19710
|
_notifyObserver(e) {
|
|
19680
|
-
switch (
|
|
19711
|
+
switch (So(this._state)) {
|
|
19681
19712
|
case Me.RUNNING:
|
|
19682
19713
|
case Me.PAUSED:
|
|
19683
|
-
e.next &&
|
|
19714
|
+
e.next && Cn(e.next.bind(e, this.snapshot))();
|
|
19684
19715
|
break;
|
|
19685
19716
|
case Me.SUCCESS:
|
|
19686
|
-
e.complete &&
|
|
19717
|
+
e.complete && Cn(e.complete.bind(e))();
|
|
19687
19718
|
break;
|
|
19688
19719
|
case Me.CANCELED:
|
|
19689
19720
|
case Me.ERROR:
|
|
19690
|
-
e.error &&
|
|
19721
|
+
e.error && Cn(e.error.bind(e, this._error))();
|
|
19691
19722
|
break;
|
|
19692
19723
|
default:
|
|
19693
|
-
e.error &&
|
|
19724
|
+
e.error && Cn(e.error.bind(e, this._error))();
|
|
19694
19725
|
}
|
|
19695
19726
|
}
|
|
19696
19727
|
/**
|
|
@@ -19728,7 +19759,7 @@ class Wv {
|
|
|
19728
19759
|
), e;
|
|
19729
19760
|
}
|
|
19730
19761
|
}
|
|
19731
|
-
class
|
|
19762
|
+
class En {
|
|
19732
19763
|
constructor(e, t) {
|
|
19733
19764
|
this._service = e, t instanceof Be ? this._location = t : this._location = Be.makeFromUrl(t, e.host);
|
|
19734
19765
|
}
|
|
@@ -19741,7 +19772,7 @@ class yn {
|
|
|
19741
19772
|
return "gs://" + this._location.bucket + "/" + this._location.path;
|
|
19742
19773
|
}
|
|
19743
19774
|
_newRef(e, t) {
|
|
19744
|
-
return new
|
|
19775
|
+
return new En(e, t);
|
|
19745
19776
|
}
|
|
19746
19777
|
/**
|
|
19747
19778
|
* A reference to the root of this object's bucket.
|
|
@@ -19784,7 +19815,7 @@ class yn {
|
|
|
19784
19815
|
if (e === null)
|
|
19785
19816
|
return null;
|
|
19786
19817
|
const t = new Be(this._location.bucket, e);
|
|
19787
|
-
return new
|
|
19818
|
+
return new En(this._service, t);
|
|
19788
19819
|
}
|
|
19789
19820
|
/**
|
|
19790
19821
|
* Utility function to throw an error in methods that do not accept a root reference.
|
|
@@ -19812,21 +19843,21 @@ function Qv(n) {
|
|
|
19812
19843
|
return n.storage.makeRequestWithTokens(e, an);
|
|
19813
19844
|
}
|
|
19814
19845
|
function Yv(n, e) {
|
|
19815
|
-
const t =
|
|
19816
|
-
return new
|
|
19846
|
+
const t = Cv(n._location.path, e), r = new Be(n._location.bucket, t);
|
|
19847
|
+
return new En(n.storage, r);
|
|
19817
19848
|
}
|
|
19818
19849
|
function Jv(n) {
|
|
19819
19850
|
return /^[A-Za-z]+:\/\//.test(n);
|
|
19820
19851
|
}
|
|
19821
19852
|
function Xv(n, e) {
|
|
19822
|
-
return new
|
|
19853
|
+
return new En(n, e);
|
|
19823
19854
|
}
|
|
19824
19855
|
function sp(n, e) {
|
|
19825
19856
|
if (n instanceof cc) {
|
|
19826
19857
|
const t = n;
|
|
19827
19858
|
if (t._bucket == null)
|
|
19828
19859
|
throw tv();
|
|
19829
|
-
const r = new
|
|
19860
|
+
const r = new En(t, t._bucket);
|
|
19830
19861
|
return e != null ? sp(r, e) : r;
|
|
19831
19862
|
} else
|
|
19832
19863
|
return e !== void 0 ? Yv(n, e) : n;
|
|
@@ -19925,7 +19956,7 @@ class cc {
|
|
|
19925
19956
|
* at the given Location.
|
|
19926
19957
|
*/
|
|
19927
19958
|
_makeStorageReference(e) {
|
|
19928
|
-
return new
|
|
19959
|
+
return new En(this, e);
|
|
19929
19960
|
}
|
|
19930
19961
|
/**
|
|
19931
19962
|
* @param requestInfo - HTTP RequestInfo object
|
|
@@ -19947,7 +19978,7 @@ class cc {
|
|
|
19947
19978
|
return this._makeRequest(e, t, r, s).getPromise();
|
|
19948
19979
|
}
|
|
19949
19980
|
}
|
|
19950
|
-
const Zl = "@firebase/storage", eh = "0.14.
|
|
19981
|
+
const Zl = "@firebase/storage", eh = "0.14.1";
|
|
19951
19982
|
const ip = "storage";
|
|
19952
19983
|
function tA(n, e, t) {
|
|
19953
19984
|
return n = J(n), Gv(n, e, t);
|
|
@@ -19973,7 +20004,7 @@ function op(n, e, t, r = {}) {
|
|
|
19973
20004
|
}
|
|
19974
20005
|
function iA(n, { instanceIdentifier: e }) {
|
|
19975
20006
|
const t = n.getProvider("app").getImmediate(), r = n.getProvider("auth-internal"), s = n.getProvider("app-check-internal");
|
|
19976
|
-
return new cc(t, r, s, e,
|
|
20007
|
+
return new cc(t, r, s, e, Tn);
|
|
19977
20008
|
}
|
|
19978
20009
|
function oA() {
|
|
19979
20010
|
$t(new Et(
|
|
@@ -20262,16 +20293,16 @@ async function TA(n, e, t, r) {
|
|
|
20262
20293
|
signal: r?.signal,
|
|
20263
20294
|
credentials: cp(n)
|
|
20264
20295
|
});
|
|
20265
|
-
} catch (
|
|
20266
|
-
if (
|
|
20267
|
-
const
|
|
20296
|
+
} catch (_) {
|
|
20297
|
+
if (_ instanceof Error && _.name === "AbortError") {
|
|
20298
|
+
const S = new xe("cancelled", "Request was cancelled.");
|
|
20268
20299
|
return {
|
|
20269
|
-
data: Promise.reject(
|
|
20300
|
+
data: Promise.reject(S),
|
|
20270
20301
|
stream: {
|
|
20271
20302
|
[Symbol.asyncIterator]() {
|
|
20272
20303
|
return {
|
|
20273
20304
|
next() {
|
|
20274
|
-
return Promise.reject(
|
|
20305
|
+
return Promise.reject(S);
|
|
20275
20306
|
}
|
|
20276
20307
|
};
|
|
20277
20308
|
}
|
|
@@ -20294,25 +20325,25 @@ async function TA(n, e, t, r) {
|
|
|
20294
20325
|
};
|
|
20295
20326
|
}
|
|
20296
20327
|
let c, l;
|
|
20297
|
-
const d = new Promise((
|
|
20298
|
-
c =
|
|
20328
|
+
const d = new Promise((_, R) => {
|
|
20329
|
+
c = _, l = R;
|
|
20299
20330
|
});
|
|
20300
20331
|
r?.signal?.addEventListener("abort", () => {
|
|
20301
|
-
const
|
|
20302
|
-
l(
|
|
20332
|
+
const _ = new xe("cancelled", "Request was cancelled.");
|
|
20333
|
+
l(_);
|
|
20303
20334
|
});
|
|
20304
20335
|
const f = a.body.getReader(), m = wA(f, c, l, r?.signal);
|
|
20305
20336
|
return {
|
|
20306
20337
|
stream: {
|
|
20307
20338
|
[Symbol.asyncIterator]() {
|
|
20308
|
-
const
|
|
20339
|
+
const _ = m.getReader();
|
|
20309
20340
|
return {
|
|
20310
20341
|
async next() {
|
|
20311
|
-
const { value: R, done:
|
|
20312
|
-
return { value: R, done:
|
|
20342
|
+
const { value: R, done: S } = await _.read();
|
|
20343
|
+
return { value: R, done: S };
|
|
20313
20344
|
},
|
|
20314
20345
|
async return() {
|
|
20315
|
-
return await
|
|
20346
|
+
return await _.cancel(), { done: !0, value: void 0 };
|
|
20316
20347
|
}
|
|
20317
20348
|
};
|
|
20318
20349
|
}
|
|
@@ -20364,16 +20395,16 @@ function wA(n, e, t, r) {
|
|
|
20364
20395
|
return;
|
|
20365
20396
|
}
|
|
20366
20397
|
if (r?.aborted) {
|
|
20367
|
-
const
|
|
20368
|
-
a.error(
|
|
20398
|
+
const _ = new xe("cancelled", "Request was cancelled");
|
|
20399
|
+
a.error(_), t(_), await n.cancel();
|
|
20369
20400
|
return;
|
|
20370
20401
|
}
|
|
20371
20402
|
c += i.decode(d, { stream: !0 });
|
|
20372
20403
|
const m = c.split(`
|
|
20373
20404
|
`);
|
|
20374
20405
|
c = m.pop() || "";
|
|
20375
|
-
for (const
|
|
20376
|
-
|
|
20406
|
+
for (const _ of m)
|
|
20407
|
+
_.trim() && s(_.trim(), a);
|
|
20377
20408
|
return l();
|
|
20378
20409
|
} catch (d) {
|
|
20379
20410
|
const f = d instanceof xe ? d : hi(0, null);
|
|
@@ -20386,7 +20417,7 @@ function wA(n, e, t, r) {
|
|
|
20386
20417
|
}
|
|
20387
20418
|
});
|
|
20388
20419
|
}
|
|
20389
|
-
const nh = "@firebase/functions", rh = "0.13.
|
|
20420
|
+
const nh = "@firebase/functions", rh = "0.13.2";
|
|
20390
20421
|
const IA = "auth-internal", vA = "app-check-internal", AA = "messaging-internal";
|
|
20391
20422
|
function RA(n) {
|
|
20392
20423
|
const e = (t, { instanceIdentifier: r }) => {
|
|
@@ -20568,19 +20599,16 @@ class NA extends jt {
|
|
|
20568
20599
|
this._lastDocRetrieved = r.docs[r.docs.length - 1], t(r.docs.map((s) => s.data()));
|
|
20569
20600
|
});
|
|
20570
20601
|
}
|
|
20571
|
-
|
|
20572
|
-
throw new Error("Method not implemented.");
|
|
20573
|
-
}
|
|
20574
|
-
collectionsMatchingTemplate(e) {
|
|
20602
|
+
resolveCollectionPaths(e) {
|
|
20575
20603
|
throw new Error("Method not implemented.");
|
|
20576
20604
|
}
|
|
20577
20605
|
}
|
|
20578
|
-
var
|
|
20579
|
-
for (var s = r > 1 ? void 0 : r ?
|
|
20606
|
+
var CA = Object.getOwnPropertyDescriptor, SA = (n, e, t, r) => {
|
|
20607
|
+
for (var s = r > 1 ? void 0 : r ? CA(e, t) : e, i = n.length - 1, a; i >= 0; i--)
|
|
20580
20608
|
(a = n[i]) && (s = a(s) || s);
|
|
20581
20609
|
return s;
|
|
20582
20610
|
};
|
|
20583
|
-
let No = class extends
|
|
20611
|
+
let No = class extends xn {
|
|
20584
20612
|
constructor(n) {
|
|
20585
20613
|
if (super(), n && q.useEmulator(n), q.emulator?.emulate) {
|
|
20586
20614
|
const { host: e, storagePort: t } = q.emulator;
|
|
@@ -20623,7 +20651,7 @@ let No = class extends Mn {
|
|
|
20623
20651
|
return rA(ko(e, n));
|
|
20624
20652
|
}
|
|
20625
20653
|
};
|
|
20626
|
-
No =
|
|
20654
|
+
No = SA([
|
|
20627
20655
|
tf("FirebaseCloudStorage", () => new No())
|
|
20628
20656
|
], No);
|
|
20629
20657
|
const sh = {
|
|
@@ -20682,7 +20710,7 @@ class hp extends nf {
|
|
|
20682
20710
|
resetEmailPassword(e) {
|
|
20683
20711
|
return new Promise(async (t, r) => {
|
|
20684
20712
|
try {
|
|
20685
|
-
await
|
|
20713
|
+
await Cw(q.instance.auth(), e), t();
|
|
20686
20714
|
} catch (s) {
|
|
20687
20715
|
r({
|
|
20688
20716
|
code: Ps(s.code.slice(5)),
|
|
@@ -20756,7 +20784,7 @@ class hp extends nf {
|
|
|
20756
20784
|
registerCredentialProviders() {
|
|
20757
20785
|
this.registerCredentialProvider("email-sign-up", (e) => {
|
|
20758
20786
|
if (!e.email || !e.password) throw new Error("Email and password are required");
|
|
20759
|
-
return
|
|
20787
|
+
return Sw(q.instance.auth(), e.email, e.password);
|
|
20760
20788
|
}), this.registerCredentialProvider("email", (e) => {
|
|
20761
20789
|
if (!e.email || !e.password) throw new Error("Email and password are required");
|
|
20762
20790
|
return xl(q.instance.auth(), e.email, e.password);
|