@laboratoria/sdk-js 7.0.0-beta.1 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,7 +30,7 @@
30
30
  * See the License for the specific language governing permissions and
31
31
  * limitations under the License.
32
32
  */
33
- const Vt = function(n) {
33
+ const Wt = function(n) {
34
34
  const e = [];
35
35
  let t = 0;
36
36
  for (let r = 0; r < n.length; r++) {
@@ -57,7 +57,7 @@ const Vt = function(n) {
57
57
  }
58
58
  }
59
59
  return e.join("");
60
- }, Wt = {
60
+ }, xt = {
61
61
  /**
62
62
  * Maps bytes to characters.
63
63
  */
@@ -116,9 +116,9 @@ const Vt = function(n) {
116
116
  this.init_();
117
117
  const t = e ? this.byteToCharMapWebSafe_ : this.byteToCharMap_, r = [];
118
118
  for (let i = 0; i < n.length; i += 3) {
119
- const s = n[i], o = i + 1 < n.length, c = o ? n[i + 1] : 0, a = i + 2 < n.length, u = a ? n[i + 2] : 0, y = s >> 2, v = (s & 3) << 4 | c >> 4;
119
+ const s = n[i], o = i + 1 < n.length, c = o ? n[i + 1] : 0, a = i + 2 < n.length, u = a ? n[i + 2] : 0, y = s >> 2, b = (s & 3) << 4 | c >> 4;
120
120
  let A = (c & 15) << 2 | u >> 6, P = u & 63;
121
- a || (P = 64, o || (A = 64)), r.push(t[y], t[v], t[A], t[P]);
121
+ a || (P = 64, o || (A = 64)), r.push(t[y], t[b], t[A], t[P]);
122
122
  }
123
123
  return r.join("");
124
124
  },
@@ -131,7 +131,7 @@ const Vt = function(n) {
131
131
  * @return The base64 encoded string.
132
132
  */
133
133
  encodeString(n, e) {
134
- return this.HAS_NATIVE_SUPPORT && !e ? btoa(n) : this.encodeByteArray(Vt(n), e);
134
+ return this.HAS_NATIVE_SUPPORT && !e ? btoa(n) : this.encodeByteArray(Wt(n), e);
135
135
  },
136
136
  /**
137
137
  * Base64-decode a string.
@@ -167,14 +167,14 @@ const Vt = function(n) {
167
167
  ++i;
168
168
  const u = i < n.length ? t[n.charAt(i)] : 64;
169
169
  ++i;
170
- const v = i < n.length ? t[n.charAt(i)] : 64;
171
- if (++i, s == null || c == null || u == null || v == null)
170
+ const b = i < n.length ? t[n.charAt(i)] : 64;
171
+ if (++i, s == null || c == null || u == null || b == null)
172
172
  throw new $n();
173
173
  const A = s << 2 | c >> 4;
174
174
  if (r.push(A), u !== 64) {
175
175
  const P = c << 4 & 240 | u >> 2;
176
- if (r.push(P), v !== 64) {
177
- const k = u << 6 & 192 | v;
176
+ if (r.push(P), b !== 64) {
177
+ const k = u << 6 & 192 | b;
178
178
  r.push(k);
179
179
  }
180
180
  }
@@ -200,13 +200,13 @@ class $n extends Error {
200
200
  }
201
201
  }
202
202
  const Mn = function(n) {
203
- const e = Vt(n);
204
- return Wt.encodeByteArray(e, !0);
205
- }, xt = function(n) {
206
- return Mn(n).replace(/\./g, "");
203
+ const e = Wt(n);
204
+ return xt.encodeByteArray(e, !0);
207
205
  }, zt = function(n) {
206
+ return Mn(n).replace(/\./g, "");
207
+ }, qt = function(n) {
208
208
  try {
209
- return Wt.decodeString(n, !0);
209
+ return xt.decodeString(n, !0);
210
210
  } catch (e) {
211
211
  console.error("base64Decode failed: ", e);
212
212
  }
@@ -268,9 +268,9 @@ const jn = () => Un().__FIREBASE_DEFAULTS__, Fn = () => {
268
268
  } catch {
269
269
  return;
270
270
  }
271
- const e = n && zt(n[1]);
271
+ const e = n && qt(n[1]);
272
272
  return e && JSON.parse(e);
273
- }, tt = () => {
273
+ }, nt = () => {
274
274
  try {
275
275
  return jn() || Fn() || Bn();
276
276
  } catch (n) {
@@ -279,13 +279,13 @@ const jn = () => Un().__FIREBASE_DEFAULTS__, Fn = () => {
279
279
  }
280
280
  }, Hn = (n) => {
281
281
  var e, t;
282
- return (t = (e = tt()) === null || e === void 0 ? void 0 : e.emulatorHosts) === null || t === void 0 ? void 0 : t[n];
283
- }, qt = () => {
282
+ return (t = (e = nt()) === null || e === void 0 ? void 0 : e.emulatorHosts) === null || t === void 0 ? void 0 : t[n];
283
+ }, Jt = () => {
284
284
  var n;
285
- return (n = tt()) === null || n === void 0 ? void 0 : n.config;
286
- }, Jt = (n) => {
285
+ return (n = nt()) === null || n === void 0 ? void 0 : n.config;
286
+ }, Gt = (n) => {
287
287
  var e;
288
- return (e = tt()) === null || e === void 0 ? void 0 : e[`_${n}`];
288
+ return (e = nt()) === null || e === void 0 ? void 0 : e[`_${n}`];
289
289
  };
290
290
  /**
291
291
  * @license
@@ -400,9 +400,9 @@ function Gn() {
400
400
  * limitations under the License.
401
401
  */
402
402
  const Kn = "FirebaseError";
403
- class G extends Error {
403
+ class K extends Error {
404
404
  constructor(e, t, r) {
405
- super(t), this.code = e, this.customData = r, this.name = Kn, Object.setPrototypeOf(this, G.prototype), Error.captureStackTrace && Error.captureStackTrace(this, _e.prototype.create);
405
+ super(t), this.code = e, this.customData = r, this.name = Kn, Object.setPrototypeOf(this, K.prototype), Error.captureStackTrace && Error.captureStackTrace(this, _e.prototype.create);
406
406
  }
407
407
  }
408
408
  class _e {
@@ -411,7 +411,7 @@ class _e {
411
411
  }
412
412
  create(e, ...t) {
413
413
  const r = t[0] || {}, i = `${this.service}/${e}`, s = this.errors[e], o = s ? Yn(s, r) : "Error", c = `${this.serviceName}: ${o} (${i}).`;
414
- return new G(i, c, r);
414
+ return new K(i, c, r);
415
415
  }
416
416
  }
417
417
  function Yn(n, e) {
@@ -435,7 +435,7 @@ function Pe(n, e) {
435
435
  if (!r.includes(i))
436
436
  return !1;
437
437
  const s = n[i], o = e[i];
438
- if (ft(s) && ft(o)) {
438
+ if (pt(s) && pt(o)) {
439
439
  if (!Pe(s, o))
440
440
  return !1;
441
441
  } else if (s !== o)
@@ -446,7 +446,7 @@ function Pe(n, e) {
446
446
  return !1;
447
447
  return !0;
448
448
  }
449
- function ft(n) {
449
+ function pt(n) {
450
450
  return n !== null && typeof n == "object";
451
451
  }
452
452
  /**
@@ -465,7 +465,7 @@ function ft(n) {
465
465
  * See the License for the specific language governing permissions and
466
466
  * limitations under the License.
467
467
  */
468
- function be(n) {
468
+ function ve(n) {
469
469
  const e = [];
470
470
  for (const [t, r] of Object.entries(n))
471
471
  Array.isArray(r) ? r.forEach((i) => {
@@ -645,7 +645,7 @@ class ae {
645
645
  * See the License for the specific language governing permissions and
646
646
  * limitations under the License.
647
647
  */
648
- const Q = "[DEFAULT]";
648
+ const X = "[DEFAULT]";
649
649
  /**
650
650
  * @license
651
651
  * Copyright 2019 Google LLC
@@ -715,7 +715,7 @@ class nr {
715
715
  if (this.component = e, !!this.shouldAutoInitialize()) {
716
716
  if (ir(e))
717
717
  try {
718
- this.getOrInitializeService({ instanceIdentifier: Q });
718
+ this.getOrInitializeService({ instanceIdentifier: X });
719
719
  } catch {
720
720
  }
721
721
  for (const [t, r] of this.instancesDeferred.entries()) {
@@ -730,7 +730,7 @@ class nr {
730
730
  }
731
731
  }
732
732
  }
733
- clearInstance(e = Q) {
733
+ clearInstance(e = X) {
734
734
  this.instancesDeferred.delete(e), this.instancesOptions.delete(e), this.instances.delete(e);
735
735
  }
736
736
  // app.delete() will call this method on every provider to delete the services
@@ -745,10 +745,10 @@ class nr {
745
745
  isComponentSet() {
746
746
  return this.component != null;
747
747
  }
748
- isInitialized(e = Q) {
748
+ isInitialized(e = X) {
749
749
  return this.instances.has(e);
750
750
  }
751
- getOptions(e = Q) {
751
+ getOptions(e = X) {
752
752
  return this.instancesOptions.get(e) || {};
753
753
  }
754
754
  initialize(e = {}) {
@@ -809,15 +809,15 @@ class nr {
809
809
  }
810
810
  return r || null;
811
811
  }
812
- normalizeInstanceIdentifier(e = Q) {
813
- return this.component ? this.component.multipleInstances ? e : Q : e;
812
+ normalizeInstanceIdentifier(e = X) {
813
+ return this.component ? this.component.multipleInstances ? e : X : e;
814
814
  }
815
815
  shouldAutoInitialize() {
816
816
  return !!this.component && this.component.instantiationMode !== "EXPLICIT";
817
817
  }
818
818
  }
819
819
  function rr(n) {
820
- return n === Q ? void 0 : n;
820
+ return n === X ? void 0 : n;
821
821
  }
822
822
  function ir(n) {
823
823
  return n.instantiationMode === "EAGER";
@@ -919,7 +919,7 @@ const or = {
919
919
  else
920
920
  throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`);
921
921
  };
922
- class Gt {
922
+ class Kt {
923
923
  /**
924
924
  * Gives you an instance of a Logger to capture messages according to
925
925
  * Firebase's logging scheme.
@@ -975,9 +975,9 @@ class Gt {
975
975
  }
976
976
  }
977
977
  const dr = (n, e) => e.some((t) => n instanceof t);
978
- let pt, gt;
978
+ let gt, mt;
979
979
  function ur() {
980
- return pt || (pt = [
980
+ return gt || (gt = [
981
981
  IDBDatabase,
982
982
  IDBObjectStore,
983
983
  IDBIndex,
@@ -986,28 +986,28 @@ function ur() {
986
986
  ]);
987
987
  }
988
988
  function hr() {
989
- return gt || (gt = [
989
+ return mt || (mt = [
990
990
  IDBCursor.prototype.advance,
991
991
  IDBCursor.prototype.continue,
992
992
  IDBCursor.prototype.continuePrimaryKey
993
993
  ]);
994
994
  }
995
- const Kt = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap();
995
+ const Yt = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), rt = /* @__PURE__ */ new WeakMap();
996
996
  function fr(n) {
997
997
  const e = new Promise((t, r) => {
998
998
  const i = () => {
999
999
  n.removeEventListener("success", s), n.removeEventListener("error", o);
1000
1000
  }, s = () => {
1001
- t(q(n.result)), i();
1001
+ t(J(n.result)), i();
1002
1002
  }, o = () => {
1003
1003
  r(n.error), i();
1004
1004
  };
1005
1005
  n.addEventListener("success", s), n.addEventListener("error", o);
1006
1006
  });
1007
1007
  return e.then((t) => {
1008
- t instanceof IDBCursor && Kt.set(t, n);
1008
+ t instanceof IDBCursor && Yt.set(t, n);
1009
1009
  }).catch(() => {
1010
- }), nt.set(e, n), e;
1010
+ }), rt.set(e, n), e;
1011
1011
  }
1012
1012
  function pr(n) {
1013
1013
  if (Ge.has(n))
@@ -1030,11 +1030,11 @@ let Ke = {
1030
1030
  if (e === "done")
1031
1031
  return Ge.get(n);
1032
1032
  if (e === "objectStoreNames")
1033
- return n.objectStoreNames || Yt.get(n);
1033
+ return n.objectStoreNames || Qt.get(n);
1034
1034
  if (e === "store")
1035
1035
  return t.objectStoreNames[1] ? void 0 : t.objectStore(t.objectStoreNames[0]);
1036
1036
  }
1037
- return q(n[e]);
1037
+ return J(n[e]);
1038
1038
  },
1039
1039
  set(n, e, t) {
1040
1040
  return n[e] = t, !0;
@@ -1049,29 +1049,29 @@ function gr(n) {
1049
1049
  function mr(n) {
1050
1050
  return n === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(e, ...t) {
1051
1051
  const r = n.call(We(this), e, ...t);
1052
- return Yt.set(r, e.sort ? e.sort() : [e]), q(r);
1052
+ return Qt.set(r, e.sort ? e.sort() : [e]), J(r);
1053
1053
  } : hr().includes(n) ? function(...e) {
1054
- return n.apply(We(this), e), q(Kt.get(this));
1054
+ return n.apply(We(this), e), J(Yt.get(this));
1055
1055
  } : function(...e) {
1056
- return q(n.apply(We(this), e));
1056
+ return J(n.apply(We(this), e));
1057
1057
  };
1058
1058
  }
1059
1059
  function yr(n) {
1060
1060
  return typeof n == "function" ? mr(n) : (n instanceof IDBTransaction && pr(n), dr(n, ur()) ? new Proxy(n, Ke) : n);
1061
1061
  }
1062
- function q(n) {
1062
+ function J(n) {
1063
1063
  if (n instanceof IDBRequest)
1064
1064
  return fr(n);
1065
1065
  if (Ve.has(n))
1066
1066
  return Ve.get(n);
1067
1067
  const e = yr(n);
1068
- return e !== n && (Ve.set(n, e), nt.set(e, n)), e;
1068
+ return e !== n && (Ve.set(n, e), rt.set(e, n)), e;
1069
1069
  }
1070
- const We = (n) => nt.get(n);
1070
+ const We = (n) => rt.get(n);
1071
1071
  function _r(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
1072
- const o = indexedDB.open(n, e), c = q(o);
1072
+ const o = indexedDB.open(n, e), c = J(o);
1073
1073
  return r && o.addEventListener("upgradeneeded", (a) => {
1074
- r(q(o.result), a.oldVersion, a.newVersion, q(o.transaction), a);
1074
+ r(J(o.result), a.oldVersion, a.newVersion, J(o.transaction), a);
1075
1075
  }), t && o.addEventListener("blocked", (a) => t(
1076
1076
  // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
1077
1077
  a.oldVersion,
@@ -1082,16 +1082,16 @@ function _r(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
1082
1082
  }).catch(() => {
1083
1083
  }), c;
1084
1084
  }
1085
- const br = ["get", "getKey", "getAll", "getAllKeys", "count"], vr = ["put", "add", "delete", "clear"], xe = /* @__PURE__ */ new Map();
1086
- function mt(n, e) {
1085
+ const vr = ["get", "getKey", "getAll", "getAllKeys", "count"], br = ["put", "add", "delete", "clear"], xe = /* @__PURE__ */ new Map();
1086
+ function yt(n, e) {
1087
1087
  if (!(n instanceof IDBDatabase && !(e in n) && typeof e == "string"))
1088
1088
  return;
1089
1089
  if (xe.get(e))
1090
1090
  return xe.get(e);
1091
- const t = e.replace(/FromIndex$/, ""), r = e !== t, i = vr.includes(t);
1091
+ const t = e.replace(/FromIndex$/, ""), r = e !== t, i = br.includes(t);
1092
1092
  if (
1093
1093
  // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
1094
- !(t in (r ? IDBIndex : IDBObjectStore).prototype) || !(i || br.includes(t))
1094
+ !(t in (r ? IDBIndex : IDBObjectStore).prototype) || !(i || vr.includes(t))
1095
1095
  )
1096
1096
  return;
1097
1097
  const s = async function(o, ...c) {
@@ -1106,8 +1106,8 @@ function mt(n, e) {
1106
1106
  }
1107
1107
  gr((n) => ({
1108
1108
  ...n,
1109
- get: (e, t, r) => mt(e, t) || n.get(e, t, r),
1110
- has: (e, t) => !!mt(e, t) || n.has(e, t)
1109
+ get: (e, t, r) => yt(e, t) || n.get(e, t, r),
1110
+ has: (e, t) => !!yt(e, t) || n.has(e, t)
1111
1111
  }));
1112
1112
  /**
1113
1113
  * @license
@@ -1145,7 +1145,7 @@ function wr(n) {
1145
1145
  const e = n.getComponent();
1146
1146
  return (e == null ? void 0 : e.type) === "VERSION";
1147
1147
  }
1148
- const Ye = "@firebase/app", yt = "0.9.22";
1148
+ const Ye = "@firebase/app", _t = "0.9.23";
1149
1149
  /**
1150
1150
  * @license
1151
1151
  * Copyright 2019 Google LLC
@@ -1162,7 +1162,7 @@ const Ye = "@firebase/app", yt = "0.9.22";
1162
1162
  * See the License for the specific language governing permissions and
1163
1163
  * limitations under the License.
1164
1164
  */
1165
- const Z = new Gt("@firebase/app"), Er = "@firebase/app-compat", Tr = "@firebase/analytics-compat", Ar = "@firebase/analytics", Sr = "@firebase/app-check-compat", Cr = "@firebase/app-check", Rr = "@firebase/auth", Pr = "@firebase/auth-compat", Or = "@firebase/database", kr = "@firebase/database-compat", Nr = "@firebase/functions", Dr = "@firebase/functions-compat", Lr = "@firebase/installations", $r = "@firebase/installations-compat", Mr = "@firebase/messaging", Ur = "@firebase/messaging-compat", jr = "@firebase/performance", Fr = "@firebase/performance-compat", Br = "@firebase/remote-config", Hr = "@firebase/remote-config-compat", Vr = "@firebase/storage", Wr = "@firebase/storage-compat", xr = "@firebase/firestore", zr = "@firebase/firestore-compat", qr = "firebase", Jr = "10.5.2";
1165
+ const ee = new Kt("@firebase/app"), Er = "@firebase/app-compat", Tr = "@firebase/analytics-compat", Ar = "@firebase/analytics", Sr = "@firebase/app-check-compat", Cr = "@firebase/app-check", Rr = "@firebase/auth", Pr = "@firebase/auth-compat", Or = "@firebase/database", kr = "@firebase/database-compat", Nr = "@firebase/functions", Dr = "@firebase/functions-compat", Lr = "@firebase/installations", $r = "@firebase/installations-compat", Mr = "@firebase/messaging", Ur = "@firebase/messaging-compat", jr = "@firebase/performance", Fr = "@firebase/performance-compat", Br = "@firebase/remote-config", Hr = "@firebase/remote-config-compat", Vr = "@firebase/storage", Wr = "@firebase/storage-compat", xr = "@firebase/firestore", zr = "@firebase/firestore-compat", qr = "firebase", Jr = "10.6.0";
1166
1166
  /**
1167
1167
  * @license
1168
1168
  * Copyright 2019 Google LLC
@@ -1228,19 +1228,19 @@ function Kr(n, e) {
1228
1228
  try {
1229
1229
  n.container.addComponent(e);
1230
1230
  } catch (t) {
1231
- Z.debug(`Component ${e.name} failed to register with FirebaseApp ${n.name}`, t);
1231
+ ee.debug(`Component ${e.name} failed to register with FirebaseApp ${n.name}`, t);
1232
1232
  }
1233
1233
  }
1234
1234
  function fe(n) {
1235
1235
  const e = n.name;
1236
1236
  if (Xe.has(e))
1237
- return Z.debug(`There were multiple attempts to register component ${e}.`), !1;
1237
+ return ee.debug(`There were multiple attempts to register component ${e}.`), !1;
1238
1238
  Xe.set(e, n);
1239
1239
  for (const t of Oe.values())
1240
1240
  Kr(t, n);
1241
1241
  return !0;
1242
1242
  }
1243
- function Qt(n, e) {
1243
+ function Xt(n, e) {
1244
1244
  const t = n.container.getProvider("heartbeat").getImmediate({ optional: !0 });
1245
1245
  return t && t.triggerHeartbeat(), n.container.getProvider(e);
1246
1246
  }
@@ -1272,7 +1272,7 @@ const Yr = {
1272
1272
  "idb-get": "Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",
1273
1273
  "idb-set": "Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",
1274
1274
  "idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."
1275
- }, J = new _e("app", "Firebase", Yr);
1275
+ }, G = new _e("app", "Firebase", Yr);
1276
1276
  /**
1277
1277
  * @license
1278
1278
  * Copyright 2019 Google LLC
@@ -1328,7 +1328,7 @@ class Qr {
1328
1328
  */
1329
1329
  checkDestroyed() {
1330
1330
  if (this.isDeleted)
1331
- throw J.create("app-deleted", { appName: this._name });
1331
+ throw G.create("app-deleted", { appName: this._name });
1332
1332
  }
1333
1333
  }
1334
1334
  /**
@@ -1347,17 +1347,17 @@ class Qr {
1347
1347
  * See the License for the specific language governing permissions and
1348
1348
  * limitations under the License.
1349
1349
  */
1350
- const ve = Jr;
1351
- function Xt(n, e = {}) {
1350
+ const be = Jr;
1351
+ function Zt(n, e = {}) {
1352
1352
  let t = n;
1353
1353
  typeof e != "object" && (e = { name: e });
1354
1354
  const r = Object.assign({ name: Qe, automaticDataCollectionEnabled: !1 }, e), i = r.name;
1355
1355
  if (typeof i != "string" || !i)
1356
- throw J.create("bad-app-name", {
1356
+ throw G.create("bad-app-name", {
1357
1357
  appName: String(i)
1358
1358
  });
1359
- if (t || (t = qt()), !t)
1360
- throw J.create(
1359
+ if (t || (t = Jt()), !t)
1360
+ throw G.create(
1361
1361
  "no-options"
1362
1362
  /* AppError.NO_OPTIONS */
1363
1363
  );
@@ -1365,7 +1365,7 @@ function Xt(n, e = {}) {
1365
1365
  if (s) {
1366
1366
  if (Pe(t, s.options) && Pe(r, s.config))
1367
1367
  return s;
1368
- throw J.create("duplicate-app", { appName: i });
1368
+ throw G.create("duplicate-app", { appName: i });
1369
1369
  }
1370
1370
  const o = new sr(i);
1371
1371
  for (const a of Xe.values())
@@ -1375,10 +1375,10 @@ function Xt(n, e = {}) {
1375
1375
  }
1376
1376
  function Xr(n = Qe) {
1377
1377
  const e = Oe.get(n);
1378
- if (!e && n === Qe && qt())
1379
- return Xt();
1378
+ if (!e && n === Qe && Jt())
1379
+ return Zt();
1380
1380
  if (!e)
1381
- throw J.create("no-app", { appName: n });
1381
+ throw G.create("no-app", { appName: n });
1382
1382
  return e;
1383
1383
  }
1384
1384
  function ie(n, e, t) {
@@ -1390,7 +1390,7 @@ function ie(n, e, t) {
1390
1390
  const c = [
1391
1391
  `Unable to register library "${i}" with version "${e}":`
1392
1392
  ];
1393
- s && c.push(`library name "${i}" contains illegal characters (whitespace or "/")`), s && o && c.push("and"), o && c.push(`version name "${e}" contains illegal characters (whitespace or "/")`), Z.warn(c.join(" "));
1393
+ s && c.push(`library name "${i}" contains illegal characters (whitespace or "/")`), s && o && c.push("and"), o && c.push(`version name "${e}" contains illegal characters (whitespace or "/")`), ee.warn(c.join(" "));
1394
1394
  return;
1395
1395
  }
1396
1396
  fe(new ae(
@@ -1418,7 +1418,7 @@ function ie(n, e, t) {
1418
1418
  */
1419
1419
  const Zr = "firebase-heartbeat-database", ei = 1, pe = "firebase-heartbeat-store";
1420
1420
  let ze = null;
1421
- function Zt() {
1421
+ function en() {
1422
1422
  return ze || (ze = _r(Zr, ei, {
1423
1423
  upgrade: (n, e) => {
1424
1424
  switch (e) {
@@ -1427,41 +1427,41 @@ function Zt() {
1427
1427
  }
1428
1428
  }
1429
1429
  }).catch((n) => {
1430
- throw J.create("idb-open", {
1430
+ throw G.create("idb-open", {
1431
1431
  originalErrorMessage: n.message
1432
1432
  });
1433
1433
  })), ze;
1434
1434
  }
1435
1435
  async function ti(n) {
1436
1436
  try {
1437
- return await (await Zt()).transaction(pe).objectStore(pe).get(en(n));
1437
+ return await (await en()).transaction(pe).objectStore(pe).get(tn(n));
1438
1438
  } catch (e) {
1439
- if (e instanceof G)
1440
- Z.warn(e.message);
1439
+ if (e instanceof K)
1440
+ ee.warn(e.message);
1441
1441
  else {
1442
- const t = J.create("idb-get", {
1442
+ const t = G.create("idb-get", {
1443
1443
  originalErrorMessage: e == null ? void 0 : e.message
1444
1444
  });
1445
- Z.warn(t.message);
1445
+ ee.warn(t.message);
1446
1446
  }
1447
1447
  }
1448
1448
  }
1449
- async function _t(n, e) {
1449
+ async function vt(n, e) {
1450
1450
  try {
1451
- const r = (await Zt()).transaction(pe, "readwrite");
1452
- await r.objectStore(pe).put(e, en(n)), await r.done;
1451
+ const r = (await en()).transaction(pe, "readwrite");
1452
+ await r.objectStore(pe).put(e, tn(n)), await r.done;
1453
1453
  } catch (t) {
1454
- if (t instanceof G)
1455
- Z.warn(t.message);
1454
+ if (t instanceof K)
1455
+ ee.warn(t.message);
1456
1456
  else {
1457
- const r = J.create("idb-set", {
1457
+ const r = G.create("idb-set", {
1458
1458
  originalErrorMessage: t == null ? void 0 : t.message
1459
1459
  });
1460
- Z.warn(r.message);
1460
+ ee.warn(r.message);
1461
1461
  }
1462
1462
  }
1463
1463
  }
1464
- function en(n) {
1464
+ function tn(n) {
1465
1465
  return `${n.name}!${n.options.appId}`;
1466
1466
  }
1467
1467
  /**
@@ -1495,11 +1495,12 @@ class ii {
1495
1495
  * already logged, subsequent calls to this function in the same day will be ignored.
1496
1496
  */
1497
1497
  async triggerHeartbeat() {
1498
- const t = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), r = bt();
1499
- if (this._heartbeatsCache === null && (this._heartbeatsCache = await this._heartbeatsCachePromise), !(this._heartbeatsCache.lastSentHeartbeatDate === r || this._heartbeatsCache.heartbeats.some((i) => i.date === r)))
1500
- return this._heartbeatsCache.heartbeats.push({ date: r, agent: t }), this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter((i) => {
1501
- const s = new Date(i.date).valueOf();
1502
- return Date.now() - s <= ri;
1498
+ var e;
1499
+ const r = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), i = bt();
1500
+ if (((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null && (this._heartbeatsCache = await this._heartbeatsCachePromise), !(this._heartbeatsCache.lastSentHeartbeatDate === i || this._heartbeatsCache.heartbeats.some((s) => s.date === i)))
1501
+ return this._heartbeatsCache.heartbeats.push({ date: i, agent: r }), this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter((s) => {
1502
+ const o = new Date(s.date).valueOf();
1503
+ return Date.now() - o <= ri;
1503
1504
  }), this._storage.overwrite(this._heartbeatsCache);
1504
1505
  }
1505
1506
  /**
@@ -1510,10 +1511,11 @@ class ii {
1510
1511
  * returns an empty string.
1511
1512
  */
1512
1513
  async getHeartbeatsHeader() {
1513
- if (this._heartbeatsCache === null && await this._heartbeatsCachePromise, this._heartbeatsCache === null || this._heartbeatsCache.heartbeats.length === 0)
1514
+ var e;
1515
+ if (this._heartbeatsCache === null && await this._heartbeatsCachePromise, ((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null || this._heartbeatsCache.heartbeats.length === 0)
1514
1516
  return "";
1515
- const e = bt(), { heartbeatsToSend: t, unsentEntries: r } = si(this._heartbeatsCache.heartbeats), i = xt(JSON.stringify({ version: 2, heartbeats: t }));
1516
- return this._heartbeatsCache.lastSentHeartbeatDate = e, r.length > 0 ? (this._heartbeatsCache.heartbeats = r, await this._storage.overwrite(this._heartbeatsCache)) : (this._heartbeatsCache.heartbeats = [], this._storage.overwrite(this._heartbeatsCache)), i;
1517
+ const t = bt(), { heartbeatsToSend: r, unsentEntries: i } = si(this._heartbeatsCache.heartbeats), s = zt(JSON.stringify({ version: 2, heartbeats: r }));
1518
+ return this._heartbeatsCache.lastSentHeartbeatDate = t, i.length > 0 ? (this._heartbeatsCache.heartbeats = i, await this._storage.overwrite(this._heartbeatsCache)) : (this._heartbeatsCache.heartbeats = [], this._storage.overwrite(this._heartbeatsCache)), s;
1517
1519
  }
1518
1520
  }
1519
1521
  function bt() {
@@ -1525,14 +1527,14 @@ function si(n, e = ni) {
1525
1527
  for (const i of n) {
1526
1528
  const s = t.find((o) => o.agent === i.agent);
1527
1529
  if (s) {
1528
- if (s.dates.push(i.date), vt(t) > e) {
1530
+ if (s.dates.push(i.date), It(t) > e) {
1529
1531
  s.dates.pop();
1530
1532
  break;
1531
1533
  }
1532
1534
  } else if (t.push({
1533
1535
  agent: i.agent,
1534
1536
  dates: [i.date]
1535
- }), vt(t) > e) {
1537
+ }), It(t) > e) {
1536
1538
  t.pop();
1537
1539
  break;
1538
1540
  }
@@ -1561,7 +1563,7 @@ class oi {
1561
1563
  var t;
1562
1564
  if (await this._canUseIndexedDBPromise) {
1563
1565
  const i = await this.read();
1564
- return _t(this.app, {
1566
+ return vt(this.app, {
1565
1567
  lastSentHeartbeatDate: (t = e.lastSentHeartbeatDate) !== null && t !== void 0 ? t : i.lastSentHeartbeatDate,
1566
1568
  heartbeats: e.heartbeats
1567
1569
  });
@@ -1573,7 +1575,7 @@ class oi {
1573
1575
  var t;
1574
1576
  if (await this._canUseIndexedDBPromise) {
1575
1577
  const i = await this.read();
1576
- return _t(this.app, {
1578
+ return vt(this.app, {
1577
1579
  lastSentHeartbeatDate: (t = e.lastSentHeartbeatDate) !== null && t !== void 0 ? t : i.lastSentHeartbeatDate,
1578
1580
  heartbeats: [
1579
1581
  ...i.heartbeats,
@@ -1584,8 +1586,8 @@ class oi {
1584
1586
  return;
1585
1587
  }
1586
1588
  }
1587
- function vt(n) {
1588
- return xt(
1589
+ function It(n) {
1590
+ return zt(
1589
1591
  // heartbeatsCache wrapper properties
1590
1592
  JSON.stringify({ version: 2, heartbeats: n })
1591
1593
  ).length;
@@ -1617,10 +1619,10 @@ function ai(n) {
1617
1619
  (e) => new ii(e),
1618
1620
  "PRIVATE"
1619
1621
  /* ComponentType.PRIVATE */
1620
- )), ie(Ye, yt, n), ie(Ye, yt, "esm2017"), ie("fire-js", "");
1622
+ )), ie(Ye, _t, n), ie(Ye, _t, "esm2017"), ie("fire-js", "");
1621
1623
  }
1622
1624
  ai("");
1623
- var ci = "firebase", li = "10.5.2";
1625
+ var ci = "firebase", li = "10.6.0";
1624
1626
  /**
1625
1627
  * @license
1626
1628
  * Copyright 2020 Google LLC
@@ -1638,7 +1640,7 @@ var ci = "firebase", li = "10.5.2";
1638
1640
  * limitations under the License.
1639
1641
  */
1640
1642
  ie(ci, li, "app");
1641
- function rt(n, e) {
1643
+ function it(n, e) {
1642
1644
  var t = {};
1643
1645
  for (var r in n)
1644
1646
  Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
@@ -1647,12 +1649,12 @@ function rt(n, e) {
1647
1649
  e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(n, r[i]) && (t[r[i]] = n[r[i]]);
1648
1650
  return t;
1649
1651
  }
1650
- function tn() {
1652
+ function nn() {
1651
1653
  return {
1652
1654
  "dependent-sdk-initialized-before-auth": "Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."
1653
1655
  };
1654
1656
  }
1655
- const di = tn, nn = new _e("auth", "Firebase", tn());
1657
+ const di = nn, rn = new _e("auth", "Firebase", nn());
1656
1658
  /**
1657
1659
  * @license
1658
1660
  * Copyright 2020 Google LLC
@@ -1669,12 +1671,12 @@ const di = tn, nn = new _e("auth", "Firebase", tn());
1669
1671
  * See the License for the specific language governing permissions and
1670
1672
  * limitations under the License.
1671
1673
  */
1672
- const ke = new Gt("@firebase/auth");
1674
+ const ke = new Kt("@firebase/auth");
1673
1675
  function ui(n, ...e) {
1674
- ke.logLevel <= T.WARN && ke.warn(`Auth (${ve}): ${n}`, ...e);
1676
+ ke.logLevel <= T.WARN && ke.warn(`Auth (${be}): ${n}`, ...e);
1675
1677
  }
1676
1678
  function Ae(n, ...e) {
1677
- ke.logLevel <= T.ERROR && ke.error(`Auth (${ve}): ${n}`, ...e);
1679
+ ke.logLevel <= T.ERROR && ke.error(`Auth (${be}): ${n}`, ...e);
1678
1680
  }
1679
1681
  /**
1680
1682
  * @license
@@ -1693,10 +1695,10 @@ function Ae(n, ...e) {
1693
1695
  * limitations under the License.
1694
1696
  */
1695
1697
  function N(n, ...e) {
1696
- throw it(n, ...e);
1698
+ throw st(n, ...e);
1697
1699
  }
1698
1700
  function L(n, ...e) {
1699
- return it(n, ...e);
1701
+ return st(n, ...e);
1700
1702
  }
1701
1703
  function hi(n, e, t) {
1702
1704
  const r = Object.assign(Object.assign({}, di()), { [e]: t });
@@ -1704,16 +1706,16 @@ function hi(n, e, t) {
1704
1706
  appName: n.name
1705
1707
  });
1706
1708
  }
1707
- function it(n, ...e) {
1709
+ function st(n, ...e) {
1708
1710
  if (typeof n != "string") {
1709
1711
  const t = e[0], r = [...e.slice(1)];
1710
1712
  return r[0] && (r[0].appName = n.name), n._errorFactory.create(t, ...r);
1711
1713
  }
1712
- return nn.create(n, ...e);
1714
+ return rn.create(n, ...e);
1713
1715
  }
1714
1716
  function _(n, e, ...t) {
1715
1717
  if (!n)
1716
- throw it(e, ...t);
1718
+ throw st(e, ...t);
1717
1719
  }
1718
1720
  function M(n) {
1719
1721
  const e = "INTERNAL ASSERTION FAILED: " + n;
@@ -1743,9 +1745,9 @@ function Ze() {
1743
1745
  return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
1744
1746
  }
1745
1747
  function fi() {
1746
- return It() === "http:" || It() === "https:";
1748
+ return wt() === "http:" || wt() === "https:";
1747
1749
  }
1748
- function It() {
1750
+ function wt() {
1749
1751
  var n;
1750
1752
  return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.protocol) || null;
1751
1753
  }
@@ -1825,7 +1827,7 @@ class Ie {
1825
1827
  * See the License for the specific language governing permissions and
1826
1828
  * limitations under the License.
1827
1829
  */
1828
- function st(n, e) {
1830
+ function ot(n, e) {
1829
1831
  j(n.emulator, "Emulator should always be set here");
1830
1832
  const { url: t } = n.emulator;
1831
1833
  return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
@@ -1846,7 +1848,7 @@ function st(n, e) {
1846
1848
  * See the License for the specific language governing permissions and
1847
1849
  * limitations under the License.
1848
1850
  */
1849
- class rn {
1851
+ class sn {
1850
1852
  static initialize(e, t, r) {
1851
1853
  this.fetchImpl = e, t && (this.headersImpl = t), r && (this.responseImpl = r);
1852
1854
  }
@@ -1989,34 +1991,34 @@ const mi = {
1989
1991
  * limitations under the License.
1990
1992
  */
1991
1993
  const yi = new Ie(3e4, 6e4);
1992
- function te(n, e) {
1994
+ function Y(n, e) {
1993
1995
  return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
1994
1996
  }
1995
- async function K(n, e, t, r, i = {}) {
1996
- return sn(n, i, async () => {
1997
+ async function B(n, e, t, r, i = {}) {
1998
+ return on(n, i, async () => {
1997
1999
  let s = {}, o = {};
1998
2000
  r && (e === "GET" ? o = r : s = {
1999
2001
  body: JSON.stringify(r)
2000
2002
  });
2001
- const c = be(Object.assign({ key: n.config.apiKey }, o)).slice(1), a = await n._getAdditionalHeaders();
2003
+ const c = ve(Object.assign({ key: n.config.apiKey }, o)).slice(1), a = await n._getAdditionalHeaders();
2002
2004
  return a[
2003
2005
  "Content-Type"
2004
2006
  /* HttpHeader.CONTENT_TYPE */
2005
2007
  ] = "application/json", n.languageCode && (a[
2006
2008
  "X-Firebase-Locale"
2007
2009
  /* HttpHeader.X_FIREBASE_LOCALE */
2008
- ] = n.languageCode), rn.fetch()(on(n, n.config.apiHost, t, c), Object.assign({
2010
+ ] = n.languageCode), sn.fetch()(an(n, n.config.apiHost, t, c), Object.assign({
2009
2011
  method: e,
2010
2012
  headers: a,
2011
2013
  referrerPolicy: "no-referrer"
2012
2014
  }, s));
2013
2015
  });
2014
2016
  }
2015
- async function sn(n, e, t) {
2017
+ async function on(n, e, t) {
2016
2018
  n._canInitEmulator = !1;
2017
2019
  const r = Object.assign(Object.assign({}, mi), e);
2018
2020
  try {
2019
- const i = new bi(n), s = await Promise.race([
2021
+ const i = new vi(n), s = await Promise.race([
2020
2022
  t(),
2021
2023
  i.promise
2022
2024
  ]);
@@ -2040,20 +2042,20 @@ async function sn(n, e, t) {
2040
2042
  N(n, y);
2041
2043
  }
2042
2044
  } catch (i) {
2043
- if (i instanceof G)
2045
+ if (i instanceof K)
2044
2046
  throw i;
2045
2047
  N(n, "network-request-failed", { message: String(i) });
2046
2048
  }
2047
2049
  }
2048
2050
  async function Ue(n, e, t, r, i = {}) {
2049
- const s = await K(n, e, t, r, i);
2051
+ const s = await B(n, e, t, r, i);
2050
2052
  return "mfaPendingCredential" in s && N(n, "multi-factor-auth-required", {
2051
2053
  _serverResponse: s
2052
2054
  }), s;
2053
2055
  }
2054
- function on(n, e, t, r) {
2056
+ function an(n, e, t, r) {
2055
2057
  const i = `${e}${t}?${r}`;
2056
- return n.config.emulator ? st(n.config, i) : `${n.config.apiScheme}://${i}`;
2058
+ return n.config.emulator ? ot(n.config, i) : `${n.config.apiScheme}://${i}`;
2057
2059
  }
2058
2060
  function _i(n) {
2059
2061
  switch (n) {
@@ -2067,7 +2069,7 @@ function _i(n) {
2067
2069
  return "ENFORCEMENT_STATE_UNSPECIFIED";
2068
2070
  }
2069
2071
  }
2070
- class bi {
2072
+ class vi {
2071
2073
  constructor(e) {
2072
2074
  this.auth = e, this.timer = null, this.promise = new Promise((t, r) => {
2073
2075
  this.timer = setTimeout(() => r(L(
@@ -2089,10 +2091,10 @@ function Te(n, e, t) {
2089
2091
  const i = L(n, e, r);
2090
2092
  return i.customData._tokenResponse = t, i;
2091
2093
  }
2092
- function wt(n) {
2094
+ function Et(n) {
2093
2095
  return n !== void 0 && n.enterprise !== void 0;
2094
2096
  }
2095
- class vi {
2097
+ class bi {
2096
2098
  constructor(e) {
2097
2099
  if (this.siteKey = "", this.recaptchaEnforcementState = [], e.recaptchaKey === void 0)
2098
2100
  throw new Error("recaptchaKey undefined");
@@ -2123,7 +2125,7 @@ class vi {
2123
2125
  }
2124
2126
  }
2125
2127
  async function Ii(n, e) {
2126
- return K(n, "GET", "/v2/recaptchaConfig", te(n, e));
2128
+ return B(n, "GET", "/v2/recaptchaConfig", Y(n, e));
2127
2129
  }
2128
2130
  /**
2129
2131
  * @license
@@ -2142,10 +2144,10 @@ async function Ii(n, e) {
2142
2144
  * limitations under the License.
2143
2145
  */
2144
2146
  async function wi(n, e) {
2145
- return K(n, "POST", "/v1/accounts:delete", e);
2147
+ return B(n, "POST", "/v1/accounts:delete", e);
2146
2148
  }
2147
2149
  async function Ei(n, e) {
2148
- return K(n, "POST", "/v1/accounts:lookup", e);
2150
+ return B(n, "POST", "/v1/accounts:lookup", e);
2149
2151
  }
2150
2152
  /**
2151
2153
  * @license
@@ -2173,7 +2175,7 @@ function he(n) {
2173
2175
  }
2174
2176
  }
2175
2177
  async function Ti(n, e = !1) {
2176
- const t = F(n), r = await t.getIdToken(e), i = ot(r);
2178
+ const t = F(n), r = await t.getIdToken(e), i = at(r);
2177
2179
  _(
2178
2180
  i && i.exp && i.auth_time && i.iat,
2179
2181
  t.auth,
@@ -2194,19 +2196,19 @@ async function Ti(n, e = !1) {
2194
2196
  function qe(n) {
2195
2197
  return Number(n) * 1e3;
2196
2198
  }
2197
- function ot(n) {
2199
+ function at(n) {
2198
2200
  const [e, t, r] = n.split(".");
2199
2201
  if (e === void 0 || t === void 0 || r === void 0)
2200
2202
  return Ae("JWT malformed, contained fewer than 3 sections"), null;
2201
2203
  try {
2202
- const i = zt(t);
2204
+ const i = qt(t);
2203
2205
  return i ? JSON.parse(i) : (Ae("Failed to decode base64 JWT payload"), null);
2204
2206
  } catch (i) {
2205
2207
  return Ae("Caught error parsing JWT payload as JSON", i == null ? void 0 : i.toString()), null;
2206
2208
  }
2207
2209
  }
2208
2210
  function Ai(n) {
2209
- const e = ot(n);
2211
+ const e = at(n);
2210
2212
  return _(
2211
2213
  e,
2212
2214
  "internal-error"
@@ -2243,7 +2245,7 @@ async function ge(n, e, t = !1) {
2243
2245
  try {
2244
2246
  return await e;
2245
2247
  } catch (r) {
2246
- throw r instanceof G && Si(r) && n.auth.currentUser === n && await n.auth.signOut(), r;
2248
+ throw r instanceof K && Si(r) && n.auth.currentUser === n && await n.auth.signOut(), r;
2247
2249
  }
2248
2250
  }
2249
2251
  function Si({ code: n }) {
@@ -2327,7 +2329,7 @@ class Ci {
2327
2329
  * See the License for the specific language governing permissions and
2328
2330
  * limitations under the License.
2329
2331
  */
2330
- class an {
2332
+ class cn {
2331
2333
  constructor(e, t) {
2332
2334
  this.createdAt = e, this.lastLoginAt = t, this._initializeTime();
2333
2335
  }
@@ -2371,7 +2373,7 @@ async function Ne(n) {
2371
2373
  );
2372
2374
  const s = i.users[0];
2373
2375
  n._notifyReloadListener(s);
2374
- const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? Oi(s.providerUserInfo) : [], c = Pi(n.providerData, o), a = n.isAnonymous, u = !(n.email && s.passwordHash) && !(c != null && c.length), y = a ? u : !1, v = {
2376
+ const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? Oi(s.providerUserInfo) : [], c = Pi(n.providerData, o), a = n.isAnonymous, u = !(n.email && s.passwordHash) && !(c != null && c.length), y = a ? u : !1, b = {
2375
2377
  uid: s.localId,
2376
2378
  displayName: s.displayName || null,
2377
2379
  photoURL: s.photoUrl || null,
@@ -2380,10 +2382,10 @@ async function Ne(n) {
2380
2382
  phoneNumber: s.phoneNumber || null,
2381
2383
  tenantId: s.tenantId || null,
2382
2384
  providerData: c,
2383
- metadata: new an(s.createdAt, s.lastLoginAt),
2385
+ metadata: new cn(s.createdAt, s.lastLoginAt),
2384
2386
  isAnonymous: y
2385
2387
  };
2386
- Object.assign(n, v);
2388
+ Object.assign(n, b);
2387
2389
  }
2388
2390
  async function Ri(n) {
2389
2391
  const e = F(n);
@@ -2394,7 +2396,7 @@ function Pi(n, e) {
2394
2396
  }
2395
2397
  function Oi(n) {
2396
2398
  return n.map((e) => {
2397
- var { providerId: t } = e, r = rt(e, ["providerId"]);
2399
+ var { providerId: t } = e, r = it(e, ["providerId"]);
2398
2400
  return {
2399
2401
  providerId: t,
2400
2402
  uid: r.rawId || "",
@@ -2422,15 +2424,15 @@ function Oi(n) {
2422
2424
  * limitations under the License.
2423
2425
  */
2424
2426
  async function ki(n, e) {
2425
- const t = await sn(n, {}, async () => {
2426
- const r = be({
2427
+ const t = await on(n, {}, async () => {
2428
+ const r = ve({
2427
2429
  grant_type: "refresh_token",
2428
2430
  refresh_token: e
2429
- }).slice(1), { tokenApiHost: i, apiKey: s } = n.config, o = on(n, i, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
2431
+ }).slice(1), { tokenApiHost: i, apiKey: s } = n.config, o = an(n, i, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
2430
2432
  return c[
2431
2433
  "Content-Type"
2432
2434
  /* HttpHeader.CONTENT_TYPE */
2433
- ] = "application/x-www-form-urlencoded", rn.fetch()(o, {
2435
+ ] = "application/x-www-form-urlencoded", sn.fetch()(o, {
2434
2436
  method: "POST",
2435
2437
  headers: c,
2436
2438
  body: r
@@ -2442,6 +2444,9 @@ async function ki(n, e) {
2442
2444
  refreshToken: t.refresh_token
2443
2445
  };
2444
2446
  }
2447
+ async function Ni(n, e) {
2448
+ return B(n, "POST", "/v2/accounts:revokeToken", Y(n, e));
2449
+ }
2445
2450
  /**
2446
2451
  * @license
2447
2452
  * Copyright 2020 Google LLC
@@ -2543,13 +2548,13 @@ class me {
2543
2548
  * See the License for the specific language governing permissions and
2544
2549
  * limitations under the License.
2545
2550
  */
2546
- function H(n, e) {
2551
+ function V(n, e) {
2547
2552
  _(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
2548
2553
  }
2549
- class X {
2554
+ class Z {
2550
2555
  constructor(e) {
2551
- var { uid: t, auth: r, stsTokenManager: i } = e, s = rt(e, ["uid", "auth", "stsTokenManager"]);
2552
- this.providerId = "firebase", this.proactiveRefresh = new Ci(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = r, this.stsTokenManager = i, this.accessToken = i.accessToken, this.displayName = s.displayName || null, this.email = s.email || null, this.emailVerified = s.emailVerified || !1, this.phoneNumber = s.phoneNumber || null, this.photoURL = s.photoURL || null, this.isAnonymous = s.isAnonymous || !1, this.tenantId = s.tenantId || null, this.providerData = s.providerData ? [...s.providerData] : [], this.metadata = new an(s.createdAt || void 0, s.lastLoginAt || void 0);
2556
+ var { uid: t, auth: r, stsTokenManager: i } = e, s = it(e, ["uid", "auth", "stsTokenManager"]);
2557
+ this.providerId = "firebase", this.proactiveRefresh = new Ci(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = r, this.stsTokenManager = i, this.accessToken = i.accessToken, this.displayName = s.displayName || null, this.email = s.email || null, this.emailVerified = s.emailVerified || !1, this.phoneNumber = s.phoneNumber || null, this.photoURL = s.photoURL || null, this.isAnonymous = s.isAnonymous || !1, this.tenantId = s.tenantId || null, this.providerData = s.providerData ? [...s.providerData] : [], this.metadata = new cn(s.createdAt || void 0, s.lastLoginAt || void 0);
2553
2558
  }
2554
2559
  async getIdToken(e) {
2555
2560
  const t = await ge(this, this.stsTokenManager.getToken(this.auth, e));
@@ -2575,7 +2580,7 @@ class X {
2575
2580
  ), this.displayName = e.displayName, this.photoURL = e.photoURL, this.email = e.email, this.emailVerified = e.emailVerified, this.phoneNumber = e.phoneNumber, this.isAnonymous = e.isAnonymous, this.tenantId = e.tenantId, this.providerData = e.providerData.map((t) => Object.assign({}, t)), this.metadata._copy(e.metadata), this.stsTokenManager._assign(e.stsTokenManager));
2576
2581
  }
2577
2582
  _clone(e) {
2578
- const t = new X(Object.assign(Object.assign({}, this), { auth: e, stsTokenManager: this.stsTokenManager._clone() }));
2583
+ const t = new Z(Object.assign(Object.assign({}, this), { auth: e, stsTokenManager: this.stsTokenManager._clone() }));
2579
2584
  return t.metadata._copy(this.metadata), t;
2580
2585
  }
2581
2586
  _onReload(e) {
@@ -2629,21 +2634,21 @@ class X {
2629
2634
  }
2630
2635
  static _fromJSON(e, t) {
2631
2636
  var r, i, s, o, c, a, u, y;
2632
- const v = (r = t.displayName) !== null && r !== void 0 ? r : void 0, A = (i = t.email) !== null && i !== void 0 ? i : void 0, P = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, k = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, b = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, I = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, D = (u = t.createdAt) !== null && u !== void 0 ? u : void 0, C = (y = t.lastLoginAt) !== null && y !== void 0 ? y : void 0, { uid: Y, emailVerified: B, isAnonymous: l, providerData: m, stsTokenManager: d } = t;
2637
+ const b = (r = t.displayName) !== null && r !== void 0 ? r : void 0, A = (i = t.email) !== null && i !== void 0 ? i : void 0, P = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, k = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, v = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, I = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, D = (u = t.createdAt) !== null && u !== void 0 ? u : void 0, C = (y = t.lastLoginAt) !== null && y !== void 0 ? y : void 0, { uid: Q, emailVerified: H, isAnonymous: l, providerData: m, stsTokenManager: d } = t;
2633
2638
  _(
2634
- Y && d,
2639
+ Q && d,
2635
2640
  e,
2636
2641
  "internal-error"
2637
2642
  /* AuthErrorCode.INTERNAL_ERROR */
2638
2643
  );
2639
2644
  const w = me.fromJSON(this.name, d);
2640
2645
  _(
2641
- typeof Y == "string",
2646
+ typeof Q == "string",
2642
2647
  e,
2643
2648
  "internal-error"
2644
2649
  /* AuthErrorCode.INTERNAL_ERROR */
2645
- ), H(v, e.name), H(A, e.name), _(
2646
- typeof B == "boolean",
2650
+ ), V(b, e.name), V(A, e.name), _(
2651
+ typeof H == "boolean",
2647
2652
  e,
2648
2653
  "internal-error"
2649
2654
  /* AuthErrorCode.INTERNAL_ERROR */
@@ -2652,17 +2657,17 @@ class X {
2652
2657
  e,
2653
2658
  "internal-error"
2654
2659
  /* AuthErrorCode.INTERNAL_ERROR */
2655
- ), H(P, e.name), H(k, e.name), H(b, e.name), H(I, e.name), H(D, e.name), H(C, e.name);
2656
- const E = new X({
2657
- uid: Y,
2660
+ ), V(P, e.name), V(k, e.name), V(v, e.name), V(I, e.name), V(D, e.name), V(C, e.name);
2661
+ const E = new Z({
2662
+ uid: Q,
2658
2663
  auth: e,
2659
2664
  email: A,
2660
- emailVerified: B,
2661
- displayName: v,
2665
+ emailVerified: H,
2666
+ displayName: b,
2662
2667
  isAnonymous: l,
2663
2668
  photoURL: k,
2664
2669
  phoneNumber: P,
2665
- tenantId: b,
2670
+ tenantId: v,
2666
2671
  stsTokenManager: w,
2667
2672
  createdAt: D,
2668
2673
  lastLoginAt: C
@@ -2677,7 +2682,7 @@ class X {
2677
2682
  static async _fromIdTokenResponse(e, t, r = !1) {
2678
2683
  const i = new me();
2679
2684
  i.updateFromServerResponse(t);
2680
- const s = new X({
2685
+ const s = new Z({
2681
2686
  uid: t.localId,
2682
2687
  auth: e,
2683
2688
  stsTokenManager: i,
@@ -2702,11 +2707,11 @@ class X {
2702
2707
  * See the License for the specific language governing permissions and
2703
2708
  * limitations under the License.
2704
2709
  */
2705
- const Et = /* @__PURE__ */ new Map();
2710
+ const Tt = /* @__PURE__ */ new Map();
2706
2711
  function U(n) {
2707
2712
  j(n instanceof Function, "Expected a class definition");
2708
- let e = Et.get(n);
2709
- return e ? (j(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), Et.set(n, e), e);
2713
+ let e = Tt.get(n);
2714
+ return e ? (j(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), Tt.set(n, e), e);
2710
2715
  }
2711
2716
  /**
2712
2717
  * @license
@@ -2724,7 +2729,7 @@ function U(n) {
2724
2729
  * See the License for the specific language governing permissions and
2725
2730
  * limitations under the License.
2726
2731
  */
2727
- class cn {
2732
+ class ln {
2728
2733
  constructor() {
2729
2734
  this.type = "NONE", this.storage = {};
2730
2735
  }
@@ -2746,8 +2751,8 @@ class cn {
2746
2751
  _removeListener(e, t) {
2747
2752
  }
2748
2753
  }
2749
- cn.type = "NONE";
2750
- const Tt = cn;
2754
+ ln.type = "NONE";
2755
+ const At = ln;
2751
2756
  /**
2752
2757
  * @license
2753
2758
  * Copyright 2019 Google LLC
@@ -2778,7 +2783,7 @@ class se {
2778
2783
  }
2779
2784
  async getCurrentUser() {
2780
2785
  const e = await this.persistence._get(this.fullUserKey);
2781
- return e ? X._fromJSON(this.auth, e) : null;
2786
+ return e ? Z._fromJSON(this.auth, e) : null;
2782
2787
  }
2783
2788
  removeCurrentUser() {
2784
2789
  return this.persistence._remove(this.fullUserKey);
@@ -2798,20 +2803,20 @@ class se {
2798
2803
  }
2799
2804
  static async create(e, t, r = "authUser") {
2800
2805
  if (!t.length)
2801
- return new se(U(Tt), e, r);
2806
+ return new se(U(At), e, r);
2802
2807
  const i = (await Promise.all(t.map(async (u) => {
2803
2808
  if (await u._isAvailable())
2804
2809
  return u;
2805
2810
  }))).filter((u) => u);
2806
- let s = i[0] || U(Tt);
2811
+ let s = i[0] || U(At);
2807
2812
  const o = Se(r, e.config.apiKey, e.name);
2808
2813
  let c = null;
2809
2814
  for (const u of t)
2810
2815
  try {
2811
2816
  const y = await u._get(o);
2812
2817
  if (y) {
2813
- const v = X._fromJSON(e, y);
2814
- u !== s && (c = v), s = u;
2818
+ const b = Z._fromJSON(e, y);
2819
+ u !== s && (c = b), s = u;
2815
2820
  break;
2816
2821
  }
2817
2822
  } catch {
@@ -2842,29 +2847,29 @@ class se {
2842
2847
  * See the License for the specific language governing permissions and
2843
2848
  * limitations under the License.
2844
2849
  */
2845
- function At(n) {
2850
+ function St(n) {
2846
2851
  const e = n.toLowerCase();
2847
2852
  if (e.includes("opera/") || e.includes("opr/") || e.includes("opios/"))
2848
2853
  return "Opera";
2849
- if (un(e))
2854
+ if (hn(e))
2850
2855
  return "IEMobile";
2851
2856
  if (e.includes("msie") || e.includes("trident/"))
2852
2857
  return "IE";
2853
2858
  if (e.includes("edge/"))
2854
2859
  return "Edge";
2855
- if (ln(e))
2860
+ if (dn(e))
2856
2861
  return "Firefox";
2857
2862
  if (e.includes("silk/"))
2858
2863
  return "Silk";
2859
- if (fn(e))
2860
- return "Blackberry";
2861
2864
  if (pn(e))
2865
+ return "Blackberry";
2866
+ if (gn(e))
2862
2867
  return "Webos";
2863
- if (at(e))
2868
+ if (ct(e))
2864
2869
  return "Safari";
2865
- if ((e.includes("chrome/") || dn(e)) && !e.includes("edge/"))
2870
+ if ((e.includes("chrome/") || un(e)) && !e.includes("edge/"))
2866
2871
  return "Chrome";
2867
- if (hn(e))
2872
+ if (fn(e))
2868
2873
  return "Android";
2869
2874
  {
2870
2875
  const t = /([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/, r = n.match(t);
@@ -2873,42 +2878,42 @@ function At(n) {
2873
2878
  }
2874
2879
  return "Other";
2875
2880
  }
2876
- function ln(n = R()) {
2881
+ function dn(n = R()) {
2877
2882
  return /firefox\//i.test(n);
2878
2883
  }
2879
- function at(n = R()) {
2884
+ function ct(n = R()) {
2880
2885
  const e = n.toLowerCase();
2881
2886
  return e.includes("safari/") && !e.includes("chrome/") && !e.includes("crios/") && !e.includes("android");
2882
2887
  }
2883
- function dn(n = R()) {
2888
+ function un(n = R()) {
2884
2889
  return /crios\//i.test(n);
2885
2890
  }
2886
- function un(n = R()) {
2891
+ function hn(n = R()) {
2887
2892
  return /iemobile/i.test(n);
2888
2893
  }
2889
- function hn(n = R()) {
2894
+ function fn(n = R()) {
2890
2895
  return /android/i.test(n);
2891
2896
  }
2892
- function fn(n = R()) {
2897
+ function pn(n = R()) {
2893
2898
  return /blackberry/i.test(n);
2894
2899
  }
2895
- function pn(n = R()) {
2900
+ function gn(n = R()) {
2896
2901
  return /webos/i.test(n);
2897
2902
  }
2898
2903
  function je(n = R()) {
2899
2904
  return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
2900
2905
  }
2901
- function Ni(n = R()) {
2906
+ function Di(n = R()) {
2902
2907
  var e;
2903
2908
  return je(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
2904
2909
  }
2905
- function Di() {
2910
+ function Li() {
2906
2911
  return qn() && document.documentMode === 10;
2907
2912
  }
2908
- function gn(n = R()) {
2909
- return je(n) || hn(n) || pn(n) || fn(n) || /windows phone/i.test(n) || un(n);
2913
+ function mn(n = R()) {
2914
+ return je(n) || fn(n) || gn(n) || pn(n) || /windows phone/i.test(n) || hn(n);
2910
2915
  }
2911
- function Li() {
2916
+ function $i() {
2912
2917
  try {
2913
2918
  return !!(window && window !== window.top);
2914
2919
  } catch {
@@ -2931,20 +2936,20 @@ function Li() {
2931
2936
  * See the License for the specific language governing permissions and
2932
2937
  * limitations under the License.
2933
2938
  */
2934
- function mn(n, e = []) {
2939
+ function yn(n, e = []) {
2935
2940
  let t;
2936
2941
  switch (n) {
2937
2942
  case "Browser":
2938
- t = At(R());
2943
+ t = St(R());
2939
2944
  break;
2940
2945
  case "Worker":
2941
- t = `${At(R())}-${n}`;
2946
+ t = `${St(R())}-${n}`;
2942
2947
  break;
2943
2948
  default:
2944
2949
  t = n;
2945
2950
  }
2946
2951
  const r = e.length ? e.join(",") : "FirebaseCore-web";
2947
- return `${t}/JsCore/${ve}/${r}`;
2952
+ return `${t}/JsCore/${be}/${r}`;
2948
2953
  }
2949
2954
  /**
2950
2955
  * @license
@@ -2962,7 +2967,7 @@ function mn(n, e = []) {
2962
2967
  * See the License for the specific language governing permissions and
2963
2968
  * limitations under the License.
2964
2969
  */
2965
- class $i {
2970
+ class Mi {
2966
2971
  constructor(e) {
2967
2972
  this.auth = e, this.queue = [];
2968
2973
  }
@@ -3017,8 +3022,8 @@ class $i {
3017
3022
  * See the License for the specific language governing permissions and
3018
3023
  * limitations under the License.
3019
3024
  */
3020
- async function Mi(n, e = {}) {
3021
- return K(n, "GET", "/v2/passwordPolicy", te(n, e));
3025
+ async function Ui(n, e = {}) {
3026
+ return B(n, "GET", "/v2/passwordPolicy", Y(n, e));
3022
3027
  }
3023
3028
  /**
3024
3029
  * @license
@@ -3036,12 +3041,12 @@ async function Mi(n, e = {}) {
3036
3041
  * See the License for the specific language governing permissions and
3037
3042
  * limitations under the License.
3038
3043
  */
3039
- const Ui = 6;
3040
- class ji {
3044
+ const ji = 6;
3045
+ class Fi {
3041
3046
  constructor(e) {
3042
3047
  var t, r, i, s;
3043
3048
  const o = e.customStrengthOptions;
3044
- this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : Ui, o.maxPasswordLength && (this.customStrengthOptions.maxPasswordLength = o.maxPasswordLength), o.containsLowercaseCharacter !== void 0 && (this.customStrengthOptions.containsLowercaseLetter = o.containsLowercaseCharacter), o.containsUppercaseCharacter !== void 0 && (this.customStrengthOptions.containsUppercaseLetter = o.containsUppercaseCharacter), o.containsNumericCharacter !== void 0 && (this.customStrengthOptions.containsNumericCharacter = o.containsNumericCharacter), o.containsNonAlphanumericCharacter !== void 0 && (this.customStrengthOptions.containsNonAlphanumericCharacter = o.containsNonAlphanumericCharacter), this.enforcementState = e.enforcementState, this.enforcementState === "ENFORCEMENT_STATE_UNSPECIFIED" && (this.enforcementState = "OFF"), this.allowedNonAlphanumericCharacters = (i = (r = e.allowedNonAlphanumericCharacters) === null || r === void 0 ? void 0 : r.join("")) !== null && i !== void 0 ? i : "", this.forceUpgradeOnSignin = (s = e.forceUpgradeOnSignin) !== null && s !== void 0 ? s : !1, this.schemaVersion = e.schemaVersion;
3049
+ this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : ji, o.maxPasswordLength && (this.customStrengthOptions.maxPasswordLength = o.maxPasswordLength), o.containsLowercaseCharacter !== void 0 && (this.customStrengthOptions.containsLowercaseLetter = o.containsLowercaseCharacter), o.containsUppercaseCharacter !== void 0 && (this.customStrengthOptions.containsUppercaseLetter = o.containsUppercaseCharacter), o.containsNumericCharacter !== void 0 && (this.customStrengthOptions.containsNumericCharacter = o.containsNumericCharacter), o.containsNonAlphanumericCharacter !== void 0 && (this.customStrengthOptions.containsNonAlphanumericCharacter = o.containsNonAlphanumericCharacter), this.enforcementState = e.enforcementState, this.enforcementState === "ENFORCEMENT_STATE_UNSPECIFIED" && (this.enforcementState = "OFF"), this.allowedNonAlphanumericCharacters = (i = (r = e.allowedNonAlphanumericCharacters) === null || r === void 0 ? void 0 : r.join("")) !== null && i !== void 0 ? i : "", this.forceUpgradeOnSignin = (s = e.forceUpgradeOnSignin) !== null && s !== void 0 ? s : !1, this.schemaVersion = e.schemaVersion;
3045
3050
  }
3046
3051
  validatePassword(e) {
3047
3052
  var t, r, i, s, o, c;
@@ -3124,9 +3129,9 @@ class ji {
3124
3129
  * See the License for the specific language governing permissions and
3125
3130
  * limitations under the License.
3126
3131
  */
3127
- class Fi {
3132
+ class Bi {
3128
3133
  constructor(e, t, r, i) {
3129
- this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = r, this.config = i, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new St(this), this.idTokenSubscription = new St(this), this.beforeStateQueue = new $i(this), this.redirectUser = null, this.isProactiveRefreshEnabled = !1, this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1, this._canInitEmulator = !0, this._isInitialized = !1, this._deleted = !1, this._initializationPromise = null, this._popupRedirectResolver = null, this._errorFactory = nn, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = i.sdkClientVersion;
3134
+ this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = r, this.config = i, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new Ct(this), this.idTokenSubscription = new Ct(this), this.beforeStateQueue = new Mi(this), this.redirectUser = null, this.isProactiveRefreshEnabled = !1, this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1, this._canInitEmulator = !0, this._isInitialized = !1, this._deleted = !1, this._initializationPromise = null, this._popupRedirectResolver = null, this._errorFactory = rn, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = i.sdkClientVersion;
3130
3135
  }
3131
3136
  _initializeWithPersistence(e, t) {
3132
3137
  return t && (this._popupRedirectResolver = U(t)), this._initializationPromise = this.queue(async () => {
@@ -3255,7 +3260,7 @@ class Fi {
3255
3260
  return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
3256
3261
  }
3257
3262
  async _updatePasswordPolicy() {
3258
- const e = await Mi(this), t = new ji(e);
3263
+ const e = await Ui(this), t = new Fi(e);
3259
3264
  this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
3260
3265
  }
3261
3266
  _getPersistence() {
@@ -3284,6 +3289,20 @@ class Fi {
3284
3289
  }
3285
3290
  });
3286
3291
  }
3292
+ /**
3293
+ * Revokes the given access token. Currently only supports Apple OAuth access tokens.
3294
+ */
3295
+ async revokeAccessToken(e) {
3296
+ if (this.currentUser) {
3297
+ const t = await this.currentUser.getIdToken(), r = {
3298
+ providerId: "apple.com",
3299
+ tokenType: "ACCESS_TOKEN",
3300
+ token: e,
3301
+ idToken: t
3302
+ };
3303
+ this.tenantId != null && (r.tenantId = this.tenantId), await Ni(this, r);
3304
+ }
3305
+ }
3287
3306
  toJSON() {
3288
3307
  var e;
3289
3308
  return {
@@ -3394,7 +3413,7 @@ class Fi {
3394
3413
  ), this.persistenceManager;
3395
3414
  }
3396
3415
  _logFramework(e) {
3397
- !e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = mn(this.config.clientPlatform, this._getFrameworks()));
3416
+ !e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = yn(this.config.clientPlatform, this._getFrameworks()));
3398
3417
  }
3399
3418
  _getFrameworks() {
3400
3419
  return this.frameworks;
@@ -3430,7 +3449,7 @@ class Fi {
3430
3449
  function ne(n) {
3431
3450
  return F(n);
3432
3451
  }
3433
- class St {
3452
+ class Ct {
3434
3453
  constructor(e) {
3435
3454
  this.auth = e, this.observer = null, this.addObserver = Zn((t) => this.observer = t);
3436
3455
  }
@@ -3459,11 +3478,11 @@ class St {
3459
3478
  * See the License for the specific language governing permissions and
3460
3479
  * limitations under the License.
3461
3480
  */
3462
- function Bi() {
3481
+ function Hi() {
3463
3482
  var n, e;
3464
3483
  return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
3465
3484
  }
3466
- function yn(n) {
3485
+ function _n(n) {
3467
3486
  return new Promise((e, t) => {
3468
3487
  const r = document.createElement("script");
3469
3488
  r.setAttribute("src", n), r.onload = e, r.onerror = (i) => {
@@ -3472,21 +3491,21 @@ function yn(n) {
3472
3491
  /* AuthErrorCode.INTERNAL_ERROR */
3473
3492
  );
3474
3493
  s.customData = i, t(s);
3475
- }, r.type = "text/javascript", r.charset = "UTF-8", Bi().appendChild(r);
3494
+ }, r.type = "text/javascript", r.charset = "UTF-8", Hi().appendChild(r);
3476
3495
  });
3477
3496
  }
3478
- function Hi(n) {
3497
+ function Vi(n) {
3479
3498
  return `__${n}${Math.floor(Math.random() * 1e6)}`;
3480
3499
  }
3481
- const Vi = "https://www.google.com/recaptcha/enterprise.js?render=", Wi = "recaptcha-enterprise", xi = "NO_RECAPTCHA";
3482
- class zi {
3500
+ const Wi = "https://www.google.com/recaptcha/enterprise.js?render=", xi = "recaptcha-enterprise", zi = "NO_RECAPTCHA";
3501
+ class qi {
3483
3502
  /**
3484
3503
  *
3485
3504
  * @param authExtern - The corresponding Firebase {@link Auth} instance.
3486
3505
  *
3487
3506
  */
3488
3507
  constructor(e) {
3489
- this.type = Wi, this.auth = ne(e);
3508
+ this.type = xi, this.auth = ne(e);
3490
3509
  }
3491
3510
  /**
3492
3511
  * Executes the verification process.
@@ -3510,7 +3529,7 @@ class zi {
3510
3529
  if (a.recaptchaKey === void 0)
3511
3530
  c(new Error("recaptcha Enterprise site key undefined"));
3512
3531
  else {
3513
- const u = new vi(a);
3532
+ const u = new bi(a);
3514
3533
  return s.tenantId == null ? s._agentRecaptchaConfig = u : s._tenantRecaptchaConfigs[s.tenantId] = u, o(u.siteKey);
3515
3534
  }
3516
3535
  }).catch((a) => {
@@ -3520,24 +3539,24 @@ class zi {
3520
3539
  }
3521
3540
  function i(s, o, c) {
3522
3541
  const a = window.grecaptcha;
3523
- wt(a) ? a.enterprise.ready(() => {
3542
+ Et(a) ? a.enterprise.ready(() => {
3524
3543
  a.enterprise.execute(s, { action: e }).then((u) => {
3525
3544
  o(u);
3526
3545
  }).catch(() => {
3527
- o(xi);
3546
+ o(zi);
3528
3547
  });
3529
3548
  }) : c(Error("No reCAPTCHA enterprise script loaded."));
3530
3549
  }
3531
3550
  return new Promise((s, o) => {
3532
3551
  r(this.auth).then((c) => {
3533
- if (!t && wt(window.grecaptcha))
3552
+ if (!t && Et(window.grecaptcha))
3534
3553
  i(c, s, o);
3535
3554
  else {
3536
3555
  if (typeof window > "u") {
3537
3556
  o(new Error("RecaptchaVerifier is only supported in browser"));
3538
3557
  return;
3539
3558
  }
3540
- yn(Vi + c).then(() => {
3559
+ _n(Wi + c).then(() => {
3541
3560
  i(c, s, o);
3542
3561
  }).catch((a) => {
3543
3562
  o(a);
@@ -3549,8 +3568,8 @@ class zi {
3549
3568
  });
3550
3569
  }
3551
3570
  }
3552
- async function Ct(n, e, t, r = !1) {
3553
- const i = new zi(n);
3571
+ async function Rt(n, e, t, r = !1) {
3572
+ const i = new qi(n);
3554
3573
  let s;
3555
3574
  try {
3556
3575
  s = await i.verify(t);
@@ -3566,13 +3585,13 @@ async function Ct(n, e, t, r = !1) {
3566
3585
  /* RecaptchaVersion.ENTERPRISE */
3567
3586
  }), o;
3568
3587
  }
3569
- async function _n(n, e, t, r) {
3588
+ async function et(n, e, t, r) {
3570
3589
  var i;
3571
3590
  if (!((i = n._getRecaptchaConfig()) === null || i === void 0) && i.isProviderEnabled(
3572
3591
  "EMAIL_PASSWORD_PROVIDER"
3573
3592
  /* RecaptchaProvider.EMAIL_PASSWORD_PROVIDER */
3574
3593
  )) {
3575
- const s = await Ct(
3594
+ const s = await Rt(
3576
3595
  n,
3577
3596
  e,
3578
3597
  t,
@@ -3584,7 +3603,7 @@ async function _n(n, e, t, r) {
3584
3603
  return r(n, e).catch(async (s) => {
3585
3604
  if (s.code === "auth/missing-recaptcha-token") {
3586
3605
  console.log(`${t} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);
3587
- const o = await Ct(
3606
+ const o = await Rt(
3588
3607
  n,
3589
3608
  e,
3590
3609
  t,
@@ -3612,8 +3631,8 @@ async function _n(n, e, t, r) {
3612
3631
  * See the License for the specific language governing permissions and
3613
3632
  * limitations under the License.
3614
3633
  */
3615
- function qi(n, e) {
3616
- const t = Qt(n, "auth");
3634
+ function Ji(n, e) {
3635
+ const t = Xt(n, "auth");
3617
3636
  if (t.isInitialized()) {
3618
3637
  const i = t.getImmediate(), s = t.getOptions();
3619
3638
  if (Pe(s, e ?? {}))
@@ -3626,11 +3645,11 @@ function qi(n, e) {
3626
3645
  }
3627
3646
  return t.initialize({ options: e });
3628
3647
  }
3629
- function Ji(n, e) {
3648
+ function Gi(n, e) {
3630
3649
  const t = (e == null ? void 0 : e.persistence) || [], r = (Array.isArray(t) ? t : [t]).map(U);
3631
3650
  e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(r, e == null ? void 0 : e.popupRedirectResolver);
3632
3651
  }
3633
- function Gi(n, e, t) {
3652
+ function Ki(n, e, t) {
3634
3653
  const r = ne(n);
3635
3654
  _(
3636
3655
  r._canInitEmulator,
@@ -3643,38 +3662,38 @@ function Gi(n, e, t) {
3643
3662
  "invalid-emulator-scheme"
3644
3663
  /* AuthErrorCode.INVALID_EMULATOR_SCHEME */
3645
3664
  );
3646
- const i = !!(t != null && t.disableWarnings), s = bn(e), { host: o, port: c } = Ki(e), a = c === null ? "" : `:${c}`;
3665
+ const i = !!(t != null && t.disableWarnings), s = vn(e), { host: o, port: c } = Yi(e), a = c === null ? "" : `:${c}`;
3647
3666
  r.config.emulator = { url: `${s}//${o}${a}/` }, r.settings.appVerificationDisabledForTesting = !0, r.emulatorConfig = Object.freeze({
3648
3667
  host: o,
3649
3668
  port: c,
3650
3669
  protocol: s.replace(":", ""),
3651
3670
  options: Object.freeze({ disableWarnings: i })
3652
- }), i || Yi();
3671
+ }), i || Qi();
3653
3672
  }
3654
- function bn(n) {
3673
+ function vn(n) {
3655
3674
  const e = n.indexOf(":");
3656
3675
  return e < 0 ? "" : n.substr(0, e + 1);
3657
3676
  }
3658
- function Ki(n) {
3659
- const e = bn(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
3677
+ function Yi(n) {
3678
+ const e = vn(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
3660
3679
  if (!t)
3661
3680
  return { host: "", port: null };
3662
3681
  const r = t[2].split("@").pop() || "", i = /^(\[[^\]]+\])(:|$)/.exec(r);
3663
3682
  if (i) {
3664
3683
  const s = i[1];
3665
- return { host: s, port: Rt(r.substr(s.length + 1)) };
3684
+ return { host: s, port: Pt(r.substr(s.length + 1)) };
3666
3685
  } else {
3667
3686
  const [s, o] = r.split(":");
3668
- return { host: s, port: Rt(o) };
3687
+ return { host: s, port: Pt(o) };
3669
3688
  }
3670
3689
  }
3671
- function Rt(n) {
3690
+ function Pt(n) {
3672
3691
  if (!n)
3673
3692
  return null;
3674
3693
  const e = Number(n);
3675
3694
  return isNaN(e) ? null : e;
3676
3695
  }
3677
- function Yi() {
3696
+ function Qi() {
3678
3697
  function n() {
3679
3698
  const e = document.createElement("p"), t = e.style;
3680
3699
  e.innerText = "Running in emulator mode. Do not use with production credentials.", t.position = "fixed", t.width = "100%", t.backgroundColor = "#ffffff", t.border = ".1em solid #000000", t.color = "#b50000", t.bottom = "0px", t.left = "0px", t.margin = "0px", t.zIndex = "10000", t.textAlign = "center", e.classList.add("firebase-emulator-warning"), document.body.appendChild(e);
@@ -3697,7 +3716,7 @@ function Yi() {
3697
3716
  * See the License for the specific language governing permissions and
3698
3717
  * limitations under the License.
3699
3718
  */
3700
- class ct {
3719
+ class lt {
3701
3720
  /** @internal */
3702
3721
  constructor(e, t) {
3703
3722
  this.providerId = e, this.signInMethod = t;
@@ -3723,8 +3742,8 @@ class ct {
3723
3742
  return M("not implemented");
3724
3743
  }
3725
3744
  }
3726
- async function Qi(n, e) {
3727
- return K(n, "POST", "/v1/accounts:update", e);
3745
+ async function Xi(n, e) {
3746
+ return B(n, "POST", "/v1/accounts:signUp", e);
3728
3747
  }
3729
3748
  /**
3730
3749
  * @license
@@ -3742,14 +3761,14 @@ async function Qi(n, e) {
3742
3761
  * See the License for the specific language governing permissions and
3743
3762
  * limitations under the License.
3744
3763
  */
3745
- async function Xi(n, e) {
3746
- return Ue(n, "POST", "/v1/accounts:signInWithPassword", te(n, e));
3747
- }
3748
3764
  async function Zi(n, e) {
3749
- return K(n, "POST", "/v1/accounts:sendOobCode", te(n, e));
3765
+ return Ue(n, "POST", "/v1/accounts:signInWithPassword", Y(n, e));
3750
3766
  }
3751
3767
  async function es(n, e) {
3752
- return Zi(n, e);
3768
+ return B(n, "POST", "/v1/accounts:sendOobCode", Y(n, e));
3769
+ }
3770
+ async function ts(n, e) {
3771
+ return es(n, e);
3753
3772
  }
3754
3773
  /**
3755
3774
  * @license
@@ -3767,11 +3786,11 @@ async function es(n, e) {
3767
3786
  * See the License for the specific language governing permissions and
3768
3787
  * limitations under the License.
3769
3788
  */
3770
- async function ts(n, e) {
3771
- return Ue(n, "POST", "/v1/accounts:signInWithEmailLink", te(n, e));
3772
- }
3773
3789
  async function ns(n, e) {
3774
- return Ue(n, "POST", "/v1/accounts:signInWithEmailLink", te(n, e));
3790
+ return Ue(n, "POST", "/v1/accounts:signInWithEmailLink", Y(n, e));
3791
+ }
3792
+ async function rs(n, e) {
3793
+ return Ue(n, "POST", "/v1/accounts:signInWithEmailLink", Y(n, e));
3775
3794
  }
3776
3795
  /**
3777
3796
  * @license
@@ -3789,7 +3808,7 @@ async function ns(n, e) {
3789
3808
  * See the License for the specific language governing permissions and
3790
3809
  * limitations under the License.
3791
3810
  */
3792
- class ye extends ct {
3811
+ class ye extends lt {
3793
3812
  /** @internal */
3794
3813
  constructor(e, t, r, i = null) {
3795
3814
  super("password", r), this._email = e, this._password = t, this._tenantId = i;
@@ -3845,9 +3864,9 @@ class ye extends ct {
3845
3864
  clientType: "CLIENT_TYPE_WEB"
3846
3865
  /* RecaptchaClientType.WEB */
3847
3866
  };
3848
- return _n(e, t, "signInWithPassword", Xi);
3867
+ return et(e, t, "signInWithPassword", Zi);
3849
3868
  case "emailLink":
3850
- return ts(e, {
3869
+ return ns(e, {
3851
3870
  email: this._email,
3852
3871
  oobCode: this._password
3853
3872
  });
@@ -3863,14 +3882,17 @@ class ye extends ct {
3863
3882
  async _linkToIdToken(e, t) {
3864
3883
  switch (this.signInMethod) {
3865
3884
  case "password":
3866
- return Qi(e, {
3885
+ const r = {
3867
3886
  idToken: t,
3868
3887
  returnSecureToken: !0,
3869
3888
  email: this._email,
3870
- password: this._password
3871
- });
3889
+ password: this._password,
3890
+ clientType: "CLIENT_TYPE_WEB"
3891
+ /* RecaptchaClientType.WEB */
3892
+ };
3893
+ return et(e, r, "signUpPassword", Xi);
3872
3894
  case "emailLink":
3873
- return ns(e, {
3895
+ return rs(e, {
3874
3896
  idToken: t,
3875
3897
  email: this._email,
3876
3898
  oobCode: this._password
@@ -3905,7 +3927,7 @@ class ye extends ct {
3905
3927
  * limitations under the License.
3906
3928
  */
3907
3929
  async function oe(n, e) {
3908
- return Ue(n, "POST", "/v1/accounts:signInWithIdp", te(n, e));
3930
+ return Ue(n, "POST", "/v1/accounts:signInWithIdp", Y(n, e));
3909
3931
  }
3910
3932
  /**
3911
3933
  * @license
@@ -3923,14 +3945,14 @@ async function oe(n, e) {
3923
3945
  * See the License for the specific language governing permissions and
3924
3946
  * limitations under the License.
3925
3947
  */
3926
- const rs = "http://localhost";
3927
- class ee extends ct {
3948
+ const is = "http://localhost";
3949
+ class te extends lt {
3928
3950
  constructor() {
3929
3951
  super(...arguments), this.pendingToken = null;
3930
3952
  }
3931
3953
  /** @internal */
3932
3954
  static _fromParams(e) {
3933
- const t = new ee(e.providerId, e.signInMethod);
3955
+ const t = new te(e.providerId, e.signInMethod);
3934
3956
  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) : N(
3935
3957
  "argument-error"
3936
3958
  /* AuthErrorCode.ARGUMENT_ERROR */
@@ -3958,10 +3980,10 @@ class ee extends ct {
3958
3980
  * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.
3959
3981
  */
3960
3982
  static fromJSON(e) {
3961
- const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: r, signInMethod: i } = t, s = rt(t, ["providerId", "signInMethod"]);
3983
+ const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: r, signInMethod: i } = t, s = it(t, ["providerId", "signInMethod"]);
3962
3984
  if (!r || !i)
3963
3985
  return null;
3964
- const o = new ee(r, i);
3986
+ const o = new te(r, i);
3965
3987
  return o.idToken = s.idToken || void 0, o.accessToken = s.accessToken || void 0, o.secret = s.secret, o.nonce = s.nonce, o.pendingToken = s.pendingToken || null, o;
3966
3988
  }
3967
3989
  /** @internal */
@@ -3981,14 +4003,14 @@ class ee extends ct {
3981
4003
  }
3982
4004
  buildRequest() {
3983
4005
  const e = {
3984
- requestUri: rs,
4006
+ requestUri: is,
3985
4007
  returnSecureToken: !0
3986
4008
  };
3987
4009
  if (this.pendingToken)
3988
4010
  e.pendingToken = this.pendingToken;
3989
4011
  else {
3990
4012
  const t = {};
3991
- this.idToken && (t.id_token = this.idToken), this.accessToken && (t.access_token = this.accessToken), this.secret && (t.oauth_token_secret = this.secret), t.providerId = this.providerId, this.nonce && !this.pendingToken && (t.nonce = this.nonce), e.postBody = be(t);
4013
+ this.idToken && (t.id_token = this.idToken), this.accessToken && (t.access_token = this.accessToken), this.secret && (t.oauth_token_secret = this.secret), t.providerId = this.providerId, this.nonce && !this.pendingToken && (t.nonce = this.nonce), e.postBody = ve(t);
3992
4014
  }
3993
4015
  return e;
3994
4016
  }
@@ -4009,7 +4031,7 @@ class ee extends ct {
4009
4031
  * See the License for the specific language governing permissions and
4010
4032
  * limitations under the License.
4011
4033
  */
4012
- function is(n) {
4034
+ function ss(n) {
4013
4035
  switch (n) {
4014
4036
  case "recoverEmail":
4015
4037
  return "RECOVER_EMAIL";
@@ -4027,11 +4049,11 @@ function is(n) {
4027
4049
  return null;
4028
4050
  }
4029
4051
  }
4030
- function ss(n) {
4052
+ function os(n) {
4031
4053
  const e = de(ue(n)).link, t = e ? de(ue(e)).deep_link_id : null, r = de(ue(n)).deep_link_id;
4032
4054
  return (r ? de(ue(r)).link : null) || r || t || e || n;
4033
4055
  }
4034
- class lt {
4056
+ class dt {
4035
4057
  /**
4036
4058
  * @param actionLink - The link from which to extract the URL.
4037
4059
  * @returns The {@link ActionCodeURL} object, or null if the link is invalid.
@@ -4040,12 +4062,12 @@ class lt {
4040
4062
  */
4041
4063
  constructor(e) {
4042
4064
  var t, r, i, s, o, c;
4043
- const a = de(ue(e)), u = (t = a.apiKey) !== null && t !== void 0 ? t : null, y = (r = a.oobCode) !== null && r !== void 0 ? r : null, v = is((i = a.mode) !== null && i !== void 0 ? i : null);
4065
+ const a = de(ue(e)), u = (t = a.apiKey) !== null && t !== void 0 ? t : null, y = (r = a.oobCode) !== null && r !== void 0 ? r : null, b = ss((i = a.mode) !== null && i !== void 0 ? i : null);
4044
4066
  _(
4045
- u && y && v,
4067
+ u && y && b,
4046
4068
  "argument-error"
4047
4069
  /* AuthErrorCode.ARGUMENT_ERROR */
4048
- ), this.apiKey = u, this.operation = v, this.code = y, this.continueUrl = (s = a.continueUrl) !== null && s !== void 0 ? s : null, this.languageCode = (o = a.languageCode) !== null && o !== void 0 ? o : null, this.tenantId = (c = a.tenantId) !== null && c !== void 0 ? c : null;
4070
+ ), this.apiKey = u, this.operation = b, this.code = y, this.continueUrl = (s = a.continueUrl) !== null && s !== void 0 ? s : null, this.languageCode = (o = a.languageCode) !== null && o !== void 0 ? o : null, this.tenantId = (c = a.tenantId) !== null && c !== void 0 ? c : null;
4049
4071
  }
4050
4072
  /**
4051
4073
  * Parses the email action link string and returns an {@link ActionCodeURL} if the link is valid,
@@ -4057,9 +4079,9 @@ class lt {
4057
4079
  * @public
4058
4080
  */
4059
4081
  static parseLink(e) {
4060
- const t = ss(e);
4082
+ const t = os(e);
4061
4083
  try {
4062
- return new lt(t);
4084
+ return new dt(t);
4063
4085
  } catch {
4064
4086
  return null;
4065
4087
  }
@@ -4129,7 +4151,7 @@ class le {
4129
4151
  * @returns - The auth provider credential.
4130
4152
  */
4131
4153
  static credentialWithLink(e, t) {
4132
- const r = lt.parseLink(t);
4154
+ const r = dt.parseLink(t);
4133
4155
  return _(
4134
4156
  r,
4135
4157
  "argument-error"
@@ -4156,7 +4178,7 @@ le.EMAIL_LINK_SIGN_IN_METHOD = "emailLink";
4156
4178
  * See the License for the specific language governing permissions and
4157
4179
  * limitations under the License.
4158
4180
  */
4159
- class vn {
4181
+ class bn {
4160
4182
  /**
4161
4183
  * Constructor for generic OAuth providers.
4162
4184
  *
@@ -4209,7 +4231,7 @@ class vn {
4209
4231
  * See the License for the specific language governing permissions and
4210
4232
  * limitations under the License.
4211
4233
  */
4212
- class we extends vn {
4234
+ class we extends bn {
4213
4235
  constructor() {
4214
4236
  super(...arguments), this.scopes = [];
4215
4237
  }
@@ -4244,7 +4266,7 @@ class we extends vn {
4244
4266
  * See the License for the specific language governing permissions and
4245
4267
  * limitations under the License.
4246
4268
  */
4247
- class V extends we {
4269
+ class W extends we {
4248
4270
  constructor() {
4249
4271
  super(
4250
4272
  "facebook.com"
@@ -4264,9 +4286,9 @@ class V extends we {
4264
4286
  * @param accessToken - Facebook access token.
4265
4287
  */
4266
4288
  static credential(e) {
4267
- return ee._fromParams({
4268
- providerId: V.PROVIDER_ID,
4269
- signInMethod: V.FACEBOOK_SIGN_IN_METHOD,
4289
+ return te._fromParams({
4290
+ providerId: W.PROVIDER_ID,
4291
+ signInMethod: W.FACEBOOK_SIGN_IN_METHOD,
4270
4292
  accessToken: e
4271
4293
  });
4272
4294
  }
@@ -4276,7 +4298,7 @@ class V extends we {
4276
4298
  * @param userCredential - The user credential.
4277
4299
  */
4278
4300
  static credentialFromResult(e) {
4279
- return V.credentialFromTaggedObject(e);
4301
+ return W.credentialFromTaggedObject(e);
4280
4302
  }
4281
4303
  /**
4282
4304
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -4285,20 +4307,20 @@ class V extends we {
4285
4307
  * @param userCredential - The user credential.
4286
4308
  */
4287
4309
  static credentialFromError(e) {
4288
- return V.credentialFromTaggedObject(e.customData || {});
4310
+ return W.credentialFromTaggedObject(e.customData || {});
4289
4311
  }
4290
4312
  static credentialFromTaggedObject({ _tokenResponse: e }) {
4291
4313
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
4292
4314
  return null;
4293
4315
  try {
4294
- return V.credential(e.oauthAccessToken);
4316
+ return W.credential(e.oauthAccessToken);
4295
4317
  } catch {
4296
4318
  return null;
4297
4319
  }
4298
4320
  }
4299
4321
  }
4300
- V.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
4301
- V.PROVIDER_ID = "facebook.com";
4322
+ W.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
4323
+ W.PROVIDER_ID = "facebook.com";
4302
4324
  /**
4303
4325
  * @license
4304
4326
  * Copyright 2020 Google LLC
@@ -4315,7 +4337,7 @@ V.PROVIDER_ID = "facebook.com";
4315
4337
  * See the License for the specific language governing permissions and
4316
4338
  * limitations under the License.
4317
4339
  */
4318
- class W extends we {
4340
+ class x extends we {
4319
4341
  constructor() {
4320
4342
  super(
4321
4343
  "google.com"
@@ -4336,9 +4358,9 @@ class W extends we {
4336
4358
  * @param accessToken - Google access token.
4337
4359
  */
4338
4360
  static credential(e, t) {
4339
- return ee._fromParams({
4340
- providerId: W.PROVIDER_ID,
4341
- signInMethod: W.GOOGLE_SIGN_IN_METHOD,
4361
+ return te._fromParams({
4362
+ providerId: x.PROVIDER_ID,
4363
+ signInMethod: x.GOOGLE_SIGN_IN_METHOD,
4342
4364
  idToken: e,
4343
4365
  accessToken: t
4344
4366
  });
@@ -4349,7 +4371,7 @@ class W extends we {
4349
4371
  * @param userCredential - The user credential.
4350
4372
  */
4351
4373
  static credentialFromResult(e) {
4352
- return W.credentialFromTaggedObject(e);
4374
+ return x.credentialFromTaggedObject(e);
4353
4375
  }
4354
4376
  /**
4355
4377
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -4358,7 +4380,7 @@ class W extends we {
4358
4380
  * @param userCredential - The user credential.
4359
4381
  */
4360
4382
  static credentialFromError(e) {
4361
- return W.credentialFromTaggedObject(e.customData || {});
4383
+ return x.credentialFromTaggedObject(e.customData || {});
4362
4384
  }
4363
4385
  static credentialFromTaggedObject({ _tokenResponse: e }) {
4364
4386
  if (!e)
@@ -4367,14 +4389,14 @@ class W extends we {
4367
4389
  if (!t && !r)
4368
4390
  return null;
4369
4391
  try {
4370
- return W.credential(t, r);
4392
+ return x.credential(t, r);
4371
4393
  } catch {
4372
4394
  return null;
4373
4395
  }
4374
4396
  }
4375
4397
  }
4376
- W.GOOGLE_SIGN_IN_METHOD = "google.com";
4377
- W.PROVIDER_ID = "google.com";
4398
+ x.GOOGLE_SIGN_IN_METHOD = "google.com";
4399
+ x.PROVIDER_ID = "google.com";
4378
4400
  /**
4379
4401
  * @license
4380
4402
  * Copyright 2020 Google LLC
@@ -4391,7 +4413,7 @@ W.PROVIDER_ID = "google.com";
4391
4413
  * See the License for the specific language governing permissions and
4392
4414
  * limitations under the License.
4393
4415
  */
4394
- class x extends we {
4416
+ class z extends we {
4395
4417
  constructor() {
4396
4418
  super(
4397
4419
  "github.com"
@@ -4404,9 +4426,9 @@ class x extends we {
4404
4426
  * @param accessToken - Github access token.
4405
4427
  */
4406
4428
  static credential(e) {
4407
- return ee._fromParams({
4408
- providerId: x.PROVIDER_ID,
4409
- signInMethod: x.GITHUB_SIGN_IN_METHOD,
4429
+ return te._fromParams({
4430
+ providerId: z.PROVIDER_ID,
4431
+ signInMethod: z.GITHUB_SIGN_IN_METHOD,
4410
4432
  accessToken: e
4411
4433
  });
4412
4434
  }
@@ -4416,7 +4438,7 @@ class x extends we {
4416
4438
  * @param userCredential - The user credential.
4417
4439
  */
4418
4440
  static credentialFromResult(e) {
4419
- return x.credentialFromTaggedObject(e);
4441
+ return z.credentialFromTaggedObject(e);
4420
4442
  }
4421
4443
  /**
4422
4444
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -4425,20 +4447,20 @@ class x extends we {
4425
4447
  * @param userCredential - The user credential.
4426
4448
  */
4427
4449
  static credentialFromError(e) {
4428
- return x.credentialFromTaggedObject(e.customData || {});
4450
+ return z.credentialFromTaggedObject(e.customData || {});
4429
4451
  }
4430
4452
  static credentialFromTaggedObject({ _tokenResponse: e }) {
4431
4453
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
4432
4454
  return null;
4433
4455
  try {
4434
- return x.credential(e.oauthAccessToken);
4456
+ return z.credential(e.oauthAccessToken);
4435
4457
  } catch {
4436
4458
  return null;
4437
4459
  }
4438
4460
  }
4439
4461
  }
4440
- x.GITHUB_SIGN_IN_METHOD = "github.com";
4441
- x.PROVIDER_ID = "github.com";
4462
+ z.GITHUB_SIGN_IN_METHOD = "github.com";
4463
+ z.PROVIDER_ID = "github.com";
4442
4464
  /**
4443
4465
  * @license
4444
4466
  * Copyright 2020 Google LLC
@@ -4455,7 +4477,7 @@ x.PROVIDER_ID = "github.com";
4455
4477
  * See the License for the specific language governing permissions and
4456
4478
  * limitations under the License.
4457
4479
  */
4458
- class z extends we {
4480
+ class q extends we {
4459
4481
  constructor() {
4460
4482
  super(
4461
4483
  "twitter.com"
@@ -4469,9 +4491,9 @@ class z extends we {
4469
4491
  * @param secret - Twitter secret.
4470
4492
  */
4471
4493
  static credential(e, t) {
4472
- return ee._fromParams({
4473
- providerId: z.PROVIDER_ID,
4474
- signInMethod: z.TWITTER_SIGN_IN_METHOD,
4494
+ return te._fromParams({
4495
+ providerId: q.PROVIDER_ID,
4496
+ signInMethod: q.TWITTER_SIGN_IN_METHOD,
4475
4497
  oauthToken: e,
4476
4498
  oauthTokenSecret: t
4477
4499
  });
@@ -4482,7 +4504,7 @@ class z extends we {
4482
4504
  * @param userCredential - The user credential.
4483
4505
  */
4484
4506
  static credentialFromResult(e) {
4485
- return z.credentialFromTaggedObject(e);
4507
+ return q.credentialFromTaggedObject(e);
4486
4508
  }
4487
4509
  /**
4488
4510
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -4491,7 +4513,7 @@ class z extends we {
4491
4513
  * @param userCredential - The user credential.
4492
4514
  */
4493
4515
  static credentialFromError(e) {
4494
- return z.credentialFromTaggedObject(e.customData || {});
4516
+ return q.credentialFromTaggedObject(e.customData || {});
4495
4517
  }
4496
4518
  static credentialFromTaggedObject({ _tokenResponse: e }) {
4497
4519
  if (!e)
@@ -4500,14 +4522,14 @@ class z extends we {
4500
4522
  if (!t || !r)
4501
4523
  return null;
4502
4524
  try {
4503
- return z.credential(t, r);
4525
+ return q.credential(t, r);
4504
4526
  } catch {
4505
4527
  return null;
4506
4528
  }
4507
4529
  }
4508
4530
  }
4509
- z.TWITTER_SIGN_IN_METHOD = "twitter.com";
4510
- z.PROVIDER_ID = "twitter.com";
4531
+ q.TWITTER_SIGN_IN_METHOD = "twitter.com";
4532
+ q.PROVIDER_ID = "twitter.com";
4511
4533
  /**
4512
4534
  * @license
4513
4535
  * Copyright 2020 Google LLC
@@ -4529,7 +4551,7 @@ class ce {
4529
4551
  this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
4530
4552
  }
4531
4553
  static async _fromIdTokenResponse(e, t, r, i = !1) {
4532
- const s = await X._fromIdTokenResponse(e, r, i), o = Pt(r);
4554
+ const s = await Z._fromIdTokenResponse(e, r, i), o = Ot(r);
4533
4555
  return new ce({
4534
4556
  user: s,
4535
4557
  providerId: o,
@@ -4543,7 +4565,7 @@ class ce {
4543
4565
  /* reload */
4544
4566
  !0
4545
4567
  );
4546
- const i = Pt(r);
4568
+ const i = Ot(r);
4547
4569
  return new ce({
4548
4570
  user: e,
4549
4571
  providerId: i,
@@ -4552,7 +4574,7 @@ class ce {
4552
4574
  });
4553
4575
  }
4554
4576
  }
4555
- function Pt(n) {
4577
+ function Ot(n) {
4556
4578
  return n.providerId ? n.providerId : "phoneNumber" in n ? "phone" : null;
4557
4579
  }
4558
4580
  /**
@@ -4571,7 +4593,7 @@ function Pt(n) {
4571
4593
  * See the License for the specific language governing permissions and
4572
4594
  * limitations under the License.
4573
4595
  */
4574
- class De extends G {
4596
+ class De extends K {
4575
4597
  constructor(e, t, r, i) {
4576
4598
  var s;
4577
4599
  super(t.code, t.message), this.operationType = r, this.user = i, Object.setPrototypeOf(this, De.prototype), this.customData = {
@@ -4590,7 +4612,7 @@ function In(n, e, t, r) {
4590
4612
  throw s.code === "auth/multi-factor-auth-required" ? De._fromErrorAndOperation(n, s, e, r) : s;
4591
4613
  });
4592
4614
  }
4593
- async function os(n, e, t = !1) {
4615
+ async function as(n, e, t = !1) {
4594
4616
  const r = await ge(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
4595
4617
  return ce._forOperation(n, "link", r);
4596
4618
  }
@@ -4610,7 +4632,7 @@ async function os(n, e, t = !1) {
4610
4632
  * See the License for the specific language governing permissions and
4611
4633
  * limitations under the License.
4612
4634
  */
4613
- async function as(n, e, t = !1) {
4635
+ async function cs(n, e, t = !1) {
4614
4636
  const { auth: r } = n, i = "reauthenticate";
4615
4637
  try {
4616
4638
  const s = await ge(n, In(r, i, e, n), t);
@@ -4620,7 +4642,7 @@ async function as(n, e, t = !1) {
4620
4642
  "internal-error"
4621
4643
  /* AuthErrorCode.INTERNAL_ERROR */
4622
4644
  );
4623
- const o = ot(s.idToken);
4645
+ const o = at(s.idToken);
4624
4646
  _(
4625
4647
  o,
4626
4648
  r,
@@ -4662,7 +4684,7 @@ async function wn(n, e, t = !1) {
4662
4684
  const r = "signIn", i = await In(n, r, e), s = await ce._fromIdTokenResponse(n, r, i);
4663
4685
  return t || await n._updateCurrentUser(s.user), s;
4664
4686
  }
4665
- async function cs(n, e) {
4687
+ async function ls(n, e) {
4666
4688
  return wn(ne(n), e);
4667
4689
  }
4668
4690
  /**
@@ -4681,7 +4703,7 @@ async function cs(n, e) {
4681
4703
  * See the License for the specific language governing permissions and
4682
4704
  * limitations under the License.
4683
4705
  */
4684
- function ls(n, e, t) {
4706
+ function ds(n, e, t) {
4685
4707
  var r;
4686
4708
  _(
4687
4709
  ((r = t.url) === null || r === void 0 ? void 0 : r.length) > 0,
@@ -4721,34 +4743,34 @@ function ls(n, e, t) {
4721
4743
  * See the License for the specific language governing permissions and
4722
4744
  * limitations under the License.
4723
4745
  */
4724
- async function ds(n) {
4746
+ async function us(n) {
4725
4747
  const e = ne(n);
4726
4748
  e._getPasswordPolicyInternal() && await e._updatePasswordPolicy();
4727
4749
  }
4728
- async function us(n, e, t) {
4750
+ async function hs(n, e, t) {
4729
4751
  const r = ne(n), i = {
4730
4752
  requestType: "PASSWORD_RESET",
4731
4753
  email: e,
4732
4754
  clientType: "CLIENT_TYPE_WEB"
4733
4755
  /* RecaptchaClientType.WEB */
4734
4756
  };
4735
- t && ls(r, i, t), await _n(r, i, "getOobCode", es);
4757
+ t && ds(r, i, t), await et(r, i, "getOobCode", ts);
4736
4758
  }
4737
- function hs(n, e, t) {
4738
- return cs(F(n), le.credential(e, t)).catch(async (r) => {
4739
- throw r.code === "auth/password-does-not-meet-requirements" && ds(n), r;
4759
+ function fs(n, e, t) {
4760
+ return ls(F(n), le.credential(e, t)).catch(async (r) => {
4761
+ throw r.code === "auth/password-does-not-meet-requirements" && us(n), r;
4740
4762
  });
4741
4763
  }
4742
- function fs(n, e, t, r) {
4764
+ function ps(n, e, t, r) {
4743
4765
  return F(n).onIdTokenChanged(e, t, r);
4744
4766
  }
4745
- function ps(n, e, t) {
4767
+ function gs(n, e, t) {
4746
4768
  return F(n).beforeAuthStateChanged(e, t);
4747
4769
  }
4748
- function gs(n, e, t, r) {
4770
+ function ms(n, e, t, r) {
4749
4771
  return F(n).onAuthStateChanged(e, t, r);
4750
4772
  }
4751
- function ms(n) {
4773
+ function ys(n) {
4752
4774
  return F(n).signOut();
4753
4775
  }
4754
4776
  const Le = "__sak";
@@ -4809,18 +4831,18 @@ class En {
4809
4831
  * See the License for the specific language governing permissions and
4810
4832
  * limitations under the License.
4811
4833
  */
4812
- function ys() {
4834
+ function _s() {
4813
4835
  const n = R();
4814
- return at(n) || je(n);
4836
+ return ct(n) || je(n);
4815
4837
  }
4816
- const _s = 1e3, bs = 10;
4838
+ const vs = 1e3, bs = 10;
4817
4839
  class Tn extends En {
4818
4840
  constructor() {
4819
4841
  super(
4820
4842
  () => window.localStorage,
4821
4843
  "LOCAL"
4822
4844
  /* PersistenceType.LOCAL */
4823
- ), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = ys() && Li(), this.fallbackToPolling = gn(), this._shouldAllowMigration = !0;
4845
+ ), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = _s() && $i(), this.fallbackToPolling = mn(), this._shouldAllowMigration = !0;
4824
4846
  }
4825
4847
  forAllChangedKeys(e) {
4826
4848
  for (const t of Object.keys(this.listeners)) {
@@ -4847,7 +4869,7 @@ class Tn extends En {
4847
4869
  const o = this.storage.getItem(r);
4848
4870
  !t && this.localCache[r] === o || this.notifyListeners(r, o);
4849
4871
  }, s = this.storage.getItem(r);
4850
- Di() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(i, bs) : i();
4872
+ Li() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(i, bs) : i();
4851
4873
  }
4852
4874
  notifyListeners(e, t) {
4853
4875
  this.localCache[e] = t;
@@ -4869,7 +4891,7 @@ class Tn extends En {
4869
4891
  !0
4870
4892
  );
4871
4893
  });
4872
- }, _s);
4894
+ }, vs);
4873
4895
  }
4874
4896
  stopPolling() {
4875
4897
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -4899,7 +4921,7 @@ class Tn extends En {
4899
4921
  }
4900
4922
  }
4901
4923
  Tn.type = "LOCAL";
4902
- const vs = Tn;
4924
+ const Is = Tn;
4903
4925
  /**
4904
4926
  * @license
4905
4927
  * Copyright 2020 Google LLC
@@ -4947,7 +4969,7 @@ const Sn = An;
4947
4969
  * See the License for the specific language governing permissions and
4948
4970
  * limitations under the License.
4949
4971
  */
4950
- function Is(n) {
4972
+ function ws(n) {
4951
4973
  return Promise.all(n.map(async (e) => {
4952
4974
  try {
4953
4975
  return {
@@ -5017,7 +5039,7 @@ class Fe {
5017
5039
  eventId: r,
5018
5040
  eventType: i
5019
5041
  });
5020
- const c = Array.from(o).map(async (u) => u(t.origin, s)), a = await Is(c);
5042
+ const c = Array.from(o).map(async (u) => u(t.origin, s)), a = await ws(c);
5021
5043
  t.ports[0].postMessage({
5022
5044
  status: "done",
5023
5045
  eventId: r,
@@ -5063,7 +5085,7 @@ Fe.receivers = [];
5063
5085
  * See the License for the specific language governing permissions and
5064
5086
  * limitations under the License.
5065
5087
  */
5066
- function dt(n = "", e = 10) {
5088
+ function ut(n = "", e = 10) {
5067
5089
  let t = "";
5068
5090
  for (let r = 0; r < e; r++)
5069
5091
  t += Math.floor(Math.random() * 10);
@@ -5085,7 +5107,7 @@ function dt(n = "", e = 10) {
5085
5107
  * See the License for the specific language governing permissions and
5086
5108
  * limitations under the License.
5087
5109
  */
5088
- class ws {
5110
+ class Es {
5089
5111
  constructor(e) {
5090
5112
  this.target = e, this.handlers = /* @__PURE__ */ new Set();
5091
5113
  }
@@ -5119,7 +5141,7 @@ class ws {
5119
5141
  );
5120
5142
  let s, o;
5121
5143
  return new Promise((c, a) => {
5122
- const u = dt("", 20);
5144
+ const u = ut("", 20);
5123
5145
  i.port1.start();
5124
5146
  const y = setTimeout(() => {
5125
5147
  a(new Error(
@@ -5129,8 +5151,8 @@ class ws {
5129
5151
  }, r);
5130
5152
  o = {
5131
5153
  messageChannel: i,
5132
- onMessage(v) {
5133
- const A = v;
5154
+ onMessage(b) {
5155
+ const A = b;
5134
5156
  if (A.data.eventId === u)
5135
5157
  switch (A.data.status) {
5136
5158
  case "ack":
@@ -5185,7 +5207,7 @@ class ws {
5185
5207
  function $() {
5186
5208
  return window;
5187
5209
  }
5188
- function Es(n) {
5210
+ function Ts(n) {
5189
5211
  $().location.href = n;
5190
5212
  }
5191
5213
  /**
@@ -5207,7 +5229,7 @@ function Es(n) {
5207
5229
  function Cn() {
5208
5230
  return typeof $().WorkerGlobalScope < "u" && typeof $().importScripts == "function";
5209
5231
  }
5210
- async function Ts() {
5232
+ async function As() {
5211
5233
  if (!(navigator != null && navigator.serviceWorker))
5212
5234
  return null;
5213
5235
  try {
@@ -5216,11 +5238,11 @@ async function Ts() {
5216
5238
  return null;
5217
5239
  }
5218
5240
  }
5219
- function As() {
5241
+ function Ss() {
5220
5242
  var n;
5221
5243
  return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
5222
5244
  }
5223
- function Ss() {
5245
+ function Cs() {
5224
5246
  return Cn() ? self : null;
5225
5247
  }
5226
5248
  /**
@@ -5239,7 +5261,7 @@ function Ss() {
5239
5261
  * See the License for the specific language governing permissions and
5240
5262
  * limitations under the License.
5241
5263
  */
5242
- const Rn = "firebaseLocalStorageDb", Cs = 1, $e = "firebaseLocalStorage", Pn = "fbase_key";
5264
+ const Rn = "firebaseLocalStorageDb", Rs = 1, $e = "firebaseLocalStorage", Pn = "fbase_key";
5243
5265
  class Ee {
5244
5266
  constructor(e) {
5245
5267
  this.request = e;
@@ -5257,12 +5279,12 @@ class Ee {
5257
5279
  function Be(n, e) {
5258
5280
  return n.transaction([$e], e ? "readwrite" : "readonly").objectStore($e);
5259
5281
  }
5260
- function Rs() {
5282
+ function Ps() {
5261
5283
  const n = indexedDB.deleteDatabase(Rn);
5262
5284
  return new Ee(n).toPromise();
5263
5285
  }
5264
- function et() {
5265
- const n = indexedDB.open(Rn, Cs);
5286
+ function tt() {
5287
+ const n = indexedDB.open(Rn, Rs);
5266
5288
  return new Promise((e, t) => {
5267
5289
  n.addEventListener("error", () => {
5268
5290
  t(n.error);
@@ -5275,26 +5297,26 @@ function et() {
5275
5297
  }
5276
5298
  }), n.addEventListener("success", async () => {
5277
5299
  const r = n.result;
5278
- r.objectStoreNames.contains($e) ? e(r) : (r.close(), await Rs(), e(await et()));
5300
+ r.objectStoreNames.contains($e) ? e(r) : (r.close(), await Ps(), e(await tt()));
5279
5301
  });
5280
5302
  });
5281
5303
  }
5282
- async function Ot(n, e, t) {
5304
+ async function kt(n, e, t) {
5283
5305
  const r = Be(n, !0).put({
5284
5306
  [Pn]: e,
5285
5307
  value: t
5286
5308
  });
5287
5309
  return new Ee(r).toPromise();
5288
5310
  }
5289
- async function Ps(n, e) {
5311
+ async function Os(n, e) {
5290
5312
  const t = Be(n, !1).get(e), r = await new Ee(t).toPromise();
5291
5313
  return r === void 0 ? null : r.value;
5292
5314
  }
5293
- function kt(n, e) {
5315
+ function Nt(n, e) {
5294
5316
  const t = Be(n, !0).delete(e);
5295
5317
  return new Ee(t).toPromise();
5296
5318
  }
5297
- const Os = 800, ks = 3;
5319
+ const ks = 800, Ns = 3;
5298
5320
  class On {
5299
5321
  constructor() {
5300
5322
  this.type = "LOCAL", this._shouldAllowMigration = !0, this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.pendingWrites = 0, this.receiver = null, this.sender = null, this.serviceWorkerReceiverAvailable = !1, this.activeServiceWorker = null, this._workerInitializationPromise = this.initializeServiceWorkerMessaging().then(() => {
@@ -5302,7 +5324,7 @@ class On {
5302
5324
  });
5303
5325
  }
5304
5326
  async _openDb() {
5305
- return this.db ? this.db : (this.db = await et(), this.db);
5327
+ return this.db ? this.db : (this.db = await tt(), this.db);
5306
5328
  }
5307
5329
  async _withRetries(e) {
5308
5330
  let t = 0;
@@ -5311,7 +5333,7 @@ class On {
5311
5333
  const r = await this._openDb();
5312
5334
  return await e(r);
5313
5335
  } catch (r) {
5314
- if (t++ > ks)
5336
+ if (t++ > Ns)
5315
5337
  throw r;
5316
5338
  this.db && (this.db.close(), this.db = void 0);
5317
5339
  }
@@ -5327,7 +5349,7 @@ class On {
5327
5349
  * As the worker we should listen to events from the main window.
5328
5350
  */
5329
5351
  async initializeReceiver() {
5330
- this.receiver = Fe._getInstance(Ss()), this.receiver._subscribe("keyChanged", async (e, t) => ({
5352
+ this.receiver = Fe._getInstance(Cs()), this.receiver._subscribe("keyChanged", async (e, t) => ({
5331
5353
  keyProcessed: (await this._poll()).includes(t.key)
5332
5354
  })), this.receiver._subscribe("ping", async (e, t) => [
5333
5355
  "keyChanged"
@@ -5343,9 +5365,9 @@ class On {
5343
5365
  */
5344
5366
  async initializeSender() {
5345
5367
  var e, t;
5346
- if (this.activeServiceWorker = await Ts(), !this.activeServiceWorker)
5368
+ if (this.activeServiceWorker = await As(), !this.activeServiceWorker)
5347
5369
  return;
5348
- this.sender = new ws(this.activeServiceWorker);
5370
+ this.sender = new Es(this.activeServiceWorker);
5349
5371
  const r = await this.sender._send(
5350
5372
  "ping",
5351
5373
  {},
@@ -5367,7 +5389,7 @@ class On {
5367
5389
  * @param key - Storage key which changed.
5368
5390
  */
5369
5391
  async notifyServiceWorker(e) {
5370
- if (!(!this.sender || !this.activeServiceWorker || As() !== this.activeServiceWorker))
5392
+ if (!(!this.sender || !this.activeServiceWorker || Ss() !== this.activeServiceWorker))
5371
5393
  try {
5372
5394
  await this.sender._send(
5373
5395
  "keyChanged",
@@ -5383,8 +5405,8 @@ class On {
5383
5405
  try {
5384
5406
  if (!indexedDB)
5385
5407
  return !1;
5386
- const e = await et();
5387
- return await Ot(e, Le, "1"), await kt(e, Le), !0;
5408
+ const e = await tt();
5409
+ return await kt(e, Le, "1"), await Nt(e, Le), !0;
5388
5410
  } catch {
5389
5411
  }
5390
5412
  return !1;
@@ -5398,14 +5420,14 @@ class On {
5398
5420
  }
5399
5421
  }
5400
5422
  async _set(e, t) {
5401
- return this._withPendingWrite(async () => (await this._withRetries((r) => Ot(r, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
5423
+ return this._withPendingWrite(async () => (await this._withRetries((r) => kt(r, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
5402
5424
  }
5403
5425
  async _get(e) {
5404
- const t = await this._withRetries((r) => Ps(r, e));
5426
+ const t = await this._withRetries((r) => Os(r, e));
5405
5427
  return this.localCache[e] = t, t;
5406
5428
  }
5407
5429
  async _remove(e) {
5408
- return this._withPendingWrite(async () => (await this._withRetries((t) => kt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
5430
+ return this._withPendingWrite(async () => (await this._withRetries((t) => Nt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
5409
5431
  }
5410
5432
  async _poll() {
5411
5433
  const e = await this._withRetries((i) => {
@@ -5431,7 +5453,7 @@ class On {
5431
5453
  i(t);
5432
5454
  }
5433
5455
  startPolling() {
5434
- this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Os);
5456
+ this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), ks);
5435
5457
  }
5436
5458
  stopPolling() {
5437
5459
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -5444,7 +5466,7 @@ class On {
5444
5466
  }
5445
5467
  }
5446
5468
  On.type = "LOCAL";
5447
- const Ns = On;
5469
+ const Ds = On;
5448
5470
  new Ie(3e4, 6e4);
5449
5471
  /**
5450
5472
  * @license
@@ -5462,7 +5484,7 @@ new Ie(3e4, 6e4);
5462
5484
  * See the License for the specific language governing permissions and
5463
5485
  * limitations under the License.
5464
5486
  */
5465
- function Ds(n, e) {
5487
+ function Ls(n, e) {
5466
5488
  return e ? U(e) : (_(
5467
5489
  n._popupRedirectResolver,
5468
5490
  n,
@@ -5486,7 +5508,7 @@ function Ds(n, e) {
5486
5508
  * See the License for the specific language governing permissions and
5487
5509
  * limitations under the License.
5488
5510
  */
5489
- class ut extends ct {
5511
+ class ht extends lt {
5490
5512
  constructor(e) {
5491
5513
  super(
5492
5514
  "custom",
@@ -5516,26 +5538,26 @@ class ut extends ct {
5516
5538
  return e && (t.idToken = e), t;
5517
5539
  }
5518
5540
  }
5519
- function Ls(n) {
5520
- return wn(n.auth, new ut(n), n.bypassAuthState);
5521
- }
5522
5541
  function $s(n) {
5542
+ return wn(n.auth, new ht(n), n.bypassAuthState);
5543
+ }
5544
+ function Ms(n) {
5523
5545
  const { auth: e, user: t } = n;
5524
5546
  return _(
5525
5547
  t,
5526
5548
  e,
5527
5549
  "internal-error"
5528
5550
  /* AuthErrorCode.INTERNAL_ERROR */
5529
- ), as(t, new ut(n), n.bypassAuthState);
5551
+ ), cs(t, new ht(n), n.bypassAuthState);
5530
5552
  }
5531
- async function Ms(n) {
5553
+ async function Us(n) {
5532
5554
  const { auth: e, user: t } = n;
5533
5555
  return _(
5534
5556
  t,
5535
5557
  e,
5536
5558
  "internal-error"
5537
5559
  /* AuthErrorCode.INTERNAL_ERROR */
5538
- ), os(t, new ut(n), n.bypassAuthState);
5560
+ ), as(t, new ht(n), n.bypassAuthState);
5539
5561
  }
5540
5562
  /**
5541
5563
  * @license
@@ -5595,13 +5617,13 @@ class kn {
5595
5617
  switch (e) {
5596
5618
  case "signInViaPopup":
5597
5619
  case "signInViaRedirect":
5598
- return Ls;
5620
+ return $s;
5599
5621
  case "linkViaPopup":
5600
5622
  case "linkViaRedirect":
5601
- return Ms;
5623
+ return Us;
5602
5624
  case "reauthViaPopup":
5603
5625
  case "reauthViaRedirect":
5604
- return $s;
5626
+ return Ms;
5605
5627
  default:
5606
5628
  N(
5607
5629
  this.auth,
@@ -5636,7 +5658,7 @@ class kn {
5636
5658
  * See the License for the specific language governing permissions and
5637
5659
  * limitations under the License.
5638
5660
  */
5639
- const Us = new Ie(2e3, 1e4);
5661
+ const js = new Ie(2e3, 1e4);
5640
5662
  class re extends kn {
5641
5663
  constructor(e, t, r, i, s) {
5642
5664
  super(e, t, i, s), this.provider = r, this.authWindow = null, this.pollId = null, re.currentPopupAction && re.currentPopupAction.cancel(), re.currentPopupAction = this;
@@ -5652,7 +5674,7 @@ class re extends kn {
5652
5674
  }
5653
5675
  async onExecution() {
5654
5676
  j(this.filter.length === 1, "Popup operations only handle one event");
5655
- const e = dt();
5677
+ const e = ut();
5656
5678
  this.authWindow = await this.resolver._openPopup(
5657
5679
  this.auth,
5658
5680
  this.provider,
@@ -5700,7 +5722,7 @@ class re extends kn {
5700
5722
  );
5701
5723
  return;
5702
5724
  }
5703
- this.pollId = window.setTimeout(e, Us.get());
5725
+ this.pollId = window.setTimeout(e, js.get());
5704
5726
  };
5705
5727
  e();
5706
5728
  }
@@ -5722,8 +5744,8 @@ re.currentPopupAction = null;
5722
5744
  * See the License for the specific language governing permissions and
5723
5745
  * limitations under the License.
5724
5746
  */
5725
- const js = "pendingRedirect", Ce = /* @__PURE__ */ new Map();
5726
- class Fs extends kn {
5747
+ const Fs = "pendingRedirect", Ce = /* @__PURE__ */ new Map();
5748
+ class Bs extends kn {
5727
5749
  constructor(e, t, r = !1) {
5728
5750
  super(e, [
5729
5751
  "signInViaRedirect",
@@ -5741,7 +5763,7 @@ class Fs extends kn {
5741
5763
  let e = Ce.get(this.auth._key());
5742
5764
  if (!e) {
5743
5765
  try {
5744
- const r = await Bs(this.resolver, this.auth) ? await super.execute() : null;
5766
+ const r = await Hs(this.resolver, this.auth) ? await super.execute() : null;
5745
5767
  e = () => Promise.resolve(r);
5746
5768
  } catch (t) {
5747
5769
  e = () => Promise.reject(t);
@@ -5769,24 +5791,24 @@ class Fs extends kn {
5769
5791
  cleanUp() {
5770
5792
  }
5771
5793
  }
5772
- async function Bs(n, e) {
5773
- const t = Ws(e), r = Vs(n);
5794
+ async function Hs(n, e) {
5795
+ const t = xs(e), r = Ws(n);
5774
5796
  if (!await r._isAvailable())
5775
5797
  return !1;
5776
5798
  const i = await r._get(t) === "true";
5777
5799
  return await r._remove(t), i;
5778
5800
  }
5779
- function Hs(n, e) {
5801
+ function Vs(n, e) {
5780
5802
  Ce.set(n._key(), e);
5781
5803
  }
5782
- function Vs(n) {
5804
+ function Ws(n) {
5783
5805
  return U(n._redirectPersistence);
5784
5806
  }
5785
- function Ws(n) {
5786
- return Se(js, n.config.apiKey, n.name);
5807
+ function xs(n) {
5808
+ return Se(Fs, n.config.apiKey, n.name);
5787
5809
  }
5788
- async function xs(n, e, t = !1) {
5789
- const r = ne(n), i = Ds(r, e), o = await new Fs(r, i, t).execute();
5810
+ async function zs(n, e, t = !1) {
5811
+ const r = ne(n), i = Ls(r, e), o = await new Bs(r, i, t).execute();
5790
5812
  return o && !t && (delete o.user._redirectEventId, await r._persistUserIfCurrent(o.user), await r._setRedirectUser(null, e)), o;
5791
5813
  }
5792
5814
  /**
@@ -5805,8 +5827,8 @@ async function xs(n, e, t = !1) {
5805
5827
  * See the License for the specific language governing permissions and
5806
5828
  * limitations under the License.
5807
5829
  */
5808
- const zs = 10 * 60 * 1e3;
5809
- class qs {
5830
+ const qs = 10 * 60 * 1e3;
5831
+ class Js {
5810
5832
  constructor(e) {
5811
5833
  this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
5812
5834
  }
@@ -5822,7 +5844,7 @@ class qs {
5822
5844
  let t = !1;
5823
5845
  return this.consumers.forEach((r) => {
5824
5846
  this.isEventForConsumer(e, r) && (t = !0, this.sendToConsumer(e, r), this.saveEventToCache(e));
5825
- }), this.hasHandledPotentialRedirect || !Js(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
5847
+ }), this.hasHandledPotentialRedirect || !Gs(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
5826
5848
  }
5827
5849
  sendToConsumer(e, t) {
5828
5850
  var r;
@@ -5837,19 +5859,19 @@ class qs {
5837
5859
  return t.filter.includes(e.type) && r;
5838
5860
  }
5839
5861
  hasEventBeenHandled(e) {
5840
- return Date.now() - this.lastProcessedEventTime >= zs && this.cachedEventUids.clear(), this.cachedEventUids.has(Nt(e));
5862
+ return Date.now() - this.lastProcessedEventTime >= qs && this.cachedEventUids.clear(), this.cachedEventUids.has(Dt(e));
5841
5863
  }
5842
5864
  saveEventToCache(e) {
5843
- this.cachedEventUids.add(Nt(e)), this.lastProcessedEventTime = Date.now();
5865
+ this.cachedEventUids.add(Dt(e)), this.lastProcessedEventTime = Date.now();
5844
5866
  }
5845
5867
  }
5846
- function Nt(n) {
5868
+ function Dt(n) {
5847
5869
  return [n.type, n.eventId, n.sessionId, n.tenantId].filter((e) => e).join("-");
5848
5870
  }
5849
5871
  function Nn({ type: n, error: e }) {
5850
5872
  return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
5851
5873
  }
5852
- function Js(n) {
5874
+ function Gs(n) {
5853
5875
  switch (n.type) {
5854
5876
  case "signInViaRedirect":
5855
5877
  case "linkViaRedirect":
@@ -5877,8 +5899,8 @@ function Js(n) {
5877
5899
  * See the License for the specific language governing permissions and
5878
5900
  * limitations under the License.
5879
5901
  */
5880
- async function Gs(n, e = {}) {
5881
- return K(n, "GET", "/v1/projects", e);
5902
+ async function Ks(n, e = {}) {
5903
+ return B(n, "GET", "/v1/projects", e);
5882
5904
  }
5883
5905
  /**
5884
5906
  * @license
@@ -5896,14 +5918,14 @@ async function Gs(n, e = {}) {
5896
5918
  * See the License for the specific language governing permissions and
5897
5919
  * limitations under the License.
5898
5920
  */
5899
- const Ks = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Ys = /^https?/;
5900
- async function Qs(n) {
5921
+ const Ys = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Qs = /^https?/;
5922
+ async function Xs(n) {
5901
5923
  if (n.config.emulator)
5902
5924
  return;
5903
- const { authorizedDomains: e } = await Gs(n);
5925
+ const { authorizedDomains: e } = await Ks(n);
5904
5926
  for (const t of e)
5905
5927
  try {
5906
- if (Xs(t))
5928
+ if (Zs(t))
5907
5929
  return;
5908
5930
  } catch {
5909
5931
  }
@@ -5913,15 +5935,15 @@ async function Qs(n) {
5913
5935
  /* AuthErrorCode.INVALID_ORIGIN */
5914
5936
  );
5915
5937
  }
5916
- function Xs(n) {
5938
+ function Zs(n) {
5917
5939
  const e = Ze(), { protocol: t, hostname: r } = new URL(e);
5918
5940
  if (n.startsWith("chrome-extension://")) {
5919
5941
  const o = new URL(n);
5920
5942
  return o.hostname === "" && r === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && o.hostname === r;
5921
5943
  }
5922
- if (!Ys.test(t))
5944
+ if (!Qs.test(t))
5923
5945
  return !1;
5924
- if (Ks.test(n))
5946
+ if (Ys.test(n))
5925
5947
  return r === n;
5926
5948
  const i = n.replace(/\./g, "\\.");
5927
5949
  return new RegExp("^(.+\\." + i + "|" + i + ")$", "i").test(r);
@@ -5942,8 +5964,8 @@ function Xs(n) {
5942
5964
  * See the License for the specific language governing permissions and
5943
5965
  * limitations under the License.
5944
5966
  */
5945
- const Zs = new Ie(3e4, 6e4);
5946
- function Dt() {
5967
+ const eo = new Ie(3e4, 6e4);
5968
+ function Lt() {
5947
5969
  const n = $().___jsl;
5948
5970
  if (n != null && n.H) {
5949
5971
  for (const e of Object.keys(n.H))
@@ -5952,22 +5974,22 @@ function Dt() {
5952
5974
  n.CP[t] = null;
5953
5975
  }
5954
5976
  }
5955
- function eo(n) {
5977
+ function to(n) {
5956
5978
  return new Promise((e, t) => {
5957
5979
  var r, i, s;
5958
5980
  function o() {
5959
- Dt(), gapi.load("gapi.iframes", {
5981
+ Lt(), gapi.load("gapi.iframes", {
5960
5982
  callback: () => {
5961
5983
  e(gapi.iframes.getContext());
5962
5984
  },
5963
5985
  ontimeout: () => {
5964
- Dt(), t(L(
5986
+ Lt(), t(L(
5965
5987
  n,
5966
5988
  "network-request-failed"
5967
5989
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
5968
5990
  ));
5969
5991
  },
5970
- timeout: Zs.get()
5992
+ timeout: eo.get()
5971
5993
  });
5972
5994
  }
5973
5995
  if (!((i = (r = $().gapi) === null || r === void 0 ? void 0 : r.iframes) === null || i === void 0) && i.Iframe)
@@ -5975,22 +5997,22 @@ function eo(n) {
5975
5997
  else if (!((s = $().gapi) === null || s === void 0) && s.load)
5976
5998
  o();
5977
5999
  else {
5978
- const c = Hi("iframefcb");
6000
+ const c = Vi("iframefcb");
5979
6001
  return $()[c] = () => {
5980
6002
  gapi.load ? o() : t(L(
5981
6003
  n,
5982
6004
  "network-request-failed"
5983
6005
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
5984
6006
  ));
5985
- }, yn(`https://apis.google.com/js/api.js?onload=${c}`).catch((a) => t(a));
6007
+ }, _n(`https://apis.google.com/js/api.js?onload=${c}`).catch((a) => t(a));
5986
6008
  }
5987
6009
  }).catch((e) => {
5988
6010
  throw Re = null, e;
5989
6011
  });
5990
6012
  }
5991
6013
  let Re = null;
5992
- function to(n) {
5993
- return Re = Re || eo(n), Re;
6014
+ function no(n) {
6015
+ return Re = Re || to(n), Re;
5994
6016
  }
5995
6017
  /**
5996
6018
  * @license
@@ -6008,7 +6030,7 @@ function to(n) {
6008
6030
  * See the License for the specific language governing permissions and
6009
6031
  * limitations under the License.
6010
6032
  */
6011
- const no = new Ie(5e3, 15e3), ro = "__/auth/iframe", io = "emulator/auth/iframe", so = {
6033
+ const ro = new Ie(5e3, 15e3), io = "__/auth/iframe", so = "emulator/auth/iframe", oo = {
6012
6034
  style: {
6013
6035
  position: "absolute",
6014
6036
  top: "-100px",
@@ -6017,13 +6039,13 @@ const no = new Ie(5e3, 15e3), ro = "__/auth/iframe", io = "emulator/auth/iframe"
6017
6039
  },
6018
6040
  "aria-hidden": "true",
6019
6041
  tabindex: "-1"
6020
- }, oo = /* @__PURE__ */ new Map([
6042
+ }, ao = /* @__PURE__ */ new Map([
6021
6043
  ["identitytoolkit.googleapis.com", "p"],
6022
6044
  ["staging-identitytoolkit.sandbox.googleapis.com", "s"],
6023
6045
  ["test-identitytoolkit.sandbox.googleapis.com", "t"]
6024
6046
  // test
6025
6047
  ]);
6026
- function ao(n) {
6048
+ function co(n) {
6027
6049
  const e = n.config;
6028
6050
  _(
6029
6051
  e.authDomain,
@@ -6031,17 +6053,17 @@ function ao(n) {
6031
6053
  "auth-domain-config-required"
6032
6054
  /* AuthErrorCode.MISSING_AUTH_DOMAIN */
6033
6055
  );
6034
- const t = e.emulator ? st(e, io) : `https://${n.config.authDomain}/${ro}`, r = {
6056
+ const t = e.emulator ? ot(e, so) : `https://${n.config.authDomain}/${io}`, r = {
6035
6057
  apiKey: e.apiKey,
6036
6058
  appName: n.name,
6037
- v: ve
6038
- }, i = oo.get(n.config.apiHost);
6059
+ v: be
6060
+ }, i = ao.get(n.config.apiHost);
6039
6061
  i && (r.eid = i);
6040
6062
  const s = n._getFrameworks();
6041
- return s.length && (r.fw = s.join(",")), `${t}?${be(r).slice(1)}`;
6063
+ return s.length && (r.fw = s.join(",")), `${t}?${ve(r).slice(1)}`;
6042
6064
  }
6043
- async function co(n) {
6044
- const e = await to(n), t = $().gapi;
6065
+ async function lo(n) {
6066
+ const e = await no(n), t = $().gapi;
6045
6067
  return _(
6046
6068
  t,
6047
6069
  n,
@@ -6049,9 +6071,9 @@ async function co(n) {
6049
6071
  /* AuthErrorCode.INTERNAL_ERROR */
6050
6072
  ), e.open({
6051
6073
  where: document.body,
6052
- url: ao(n),
6074
+ url: co(n),
6053
6075
  messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
6054
- attributes: so,
6076
+ attributes: oo,
6055
6077
  dontclear: !0
6056
6078
  }, (r) => new Promise(async (i, s) => {
6057
6079
  await r.restyle({
@@ -6064,7 +6086,7 @@ async function co(n) {
6064
6086
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
6065
6087
  ), c = $().setTimeout(() => {
6066
6088
  s(o);
6067
- }, no.get());
6089
+ }, ro.get());
6068
6090
  function a() {
6069
6091
  $().clearTimeout(c), i(r);
6070
6092
  }
@@ -6089,13 +6111,13 @@ async function co(n) {
6089
6111
  * See the License for the specific language governing permissions and
6090
6112
  * limitations under the License.
6091
6113
  */
6092
- const lo = {
6114
+ const uo = {
6093
6115
  location: "yes",
6094
6116
  resizable: "yes",
6095
6117
  statusbar: "yes",
6096
6118
  toolbar: "no"
6097
- }, uo = 500, ho = 600, fo = "_blank", po = "http://localhost";
6098
- class Lt {
6119
+ }, ho = 500, fo = 600, po = "_blank", go = "http://localhost";
6120
+ class $t {
6099
6121
  constructor(e) {
6100
6122
  this.window = e, this.associatedEvent = null;
6101
6123
  }
@@ -6107,33 +6129,33 @@ class Lt {
6107
6129
  }
6108
6130
  }
6109
6131
  }
6110
- function go(n, e, t, r = uo, i = ho) {
6132
+ function mo(n, e, t, r = ho, i = fo) {
6111
6133
  const s = Math.max((window.screen.availHeight - i) / 2, 0).toString(), o = Math.max((window.screen.availWidth - r) / 2, 0).toString();
6112
6134
  let c = "";
6113
- const a = Object.assign(Object.assign({}, lo), {
6135
+ const a = Object.assign(Object.assign({}, uo), {
6114
6136
  width: r.toString(),
6115
6137
  height: i.toString(),
6116
6138
  top: s,
6117
6139
  left: o
6118
6140
  }), u = R().toLowerCase();
6119
- t && (c = dn(u) ? fo : t), ln(u) && (e = e || po, a.scrollbars = "yes");
6141
+ t && (c = un(u) ? po : t), dn(u) && (e = e || go, a.scrollbars = "yes");
6120
6142
  const y = Object.entries(a).reduce((A, [P, k]) => `${A}${P}=${k},`, "");
6121
- if (Ni(u) && c !== "_self")
6122
- return mo(e || "", c), new Lt(null);
6123
- const v = window.open(e || "", c, y);
6143
+ if (Di(u) && c !== "_self")
6144
+ return yo(e || "", c), new $t(null);
6145
+ const b = window.open(e || "", c, y);
6124
6146
  _(
6125
- v,
6147
+ b,
6126
6148
  n,
6127
6149
  "popup-blocked"
6128
6150
  /* AuthErrorCode.POPUP_BLOCKED */
6129
6151
  );
6130
6152
  try {
6131
- v.focus();
6153
+ b.focus();
6132
6154
  } catch {
6133
6155
  }
6134
- return new Lt(v);
6156
+ return new $t(b);
6135
6157
  }
6136
- function mo(n, e) {
6158
+ function yo(n, e) {
6137
6159
  const t = document.createElement("a");
6138
6160
  t.href = n, t.target = e;
6139
6161
  const r = document.createEvent("MouseEvent");
@@ -6155,8 +6177,8 @@ function mo(n, e) {
6155
6177
  * See the License for the specific language governing permissions and
6156
6178
  * limitations under the License.
6157
6179
  */
6158
- const yo = "__/auth/handler", _o = "emulator/auth/handler", bo = encodeURIComponent("fac");
6159
- async function $t(n, e, t, r, i, s) {
6180
+ const _o = "__/auth/handler", vo = "emulator/auth/handler", bo = encodeURIComponent("fac");
6181
+ async function Mt(n, e, t, r, i, s) {
6160
6182
  _(
6161
6183
  n.config.authDomain,
6162
6184
  n,
@@ -6173,16 +6195,16 @@ async function $t(n, e, t, r, i, s) {
6173
6195
  appName: n.name,
6174
6196
  authType: t,
6175
6197
  redirectUrl: r,
6176
- v: ve,
6198
+ v: be,
6177
6199
  eventId: i
6178
6200
  };
6179
- if (e instanceof vn) {
6201
+ if (e instanceof bn) {
6180
6202
  e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", Xn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
6181
- for (const [y, v] of Object.entries(s || {}))
6182
- o[y] = v;
6203
+ for (const [y, b] of Object.entries(s || {}))
6204
+ o[y] = b;
6183
6205
  }
6184
6206
  if (e instanceof we) {
6185
- const y = e.getScopes().filter((v) => v !== "");
6207
+ const y = e.getScopes().filter((b) => b !== "");
6186
6208
  y.length > 0 && (o.scopes = y.join(","));
6187
6209
  }
6188
6210
  n.tenantId && (o.tid = n.tenantId);
@@ -6190,10 +6212,10 @@ async function $t(n, e, t, r, i, s) {
6190
6212
  for (const y of Object.keys(c))
6191
6213
  c[y] === void 0 && delete c[y];
6192
6214
  const a = await n._getAppCheckToken(), u = a ? `#${bo}=${encodeURIComponent(a)}` : "";
6193
- return `${vo(n)}?${be(c).slice(1)}${u}`;
6215
+ return `${Io(n)}?${ve(c).slice(1)}${u}`;
6194
6216
  }
6195
- function vo({ config: n }) {
6196
- return n.emulator ? st(n, _o) : `https://${n.authDomain}/${yo}`;
6217
+ function Io({ config: n }) {
6218
+ return n.emulator ? ot(n, vo) : `https://${n.authDomain}/${_o}`;
6197
6219
  }
6198
6220
  /**
6199
6221
  * @license
@@ -6212,22 +6234,22 @@ function vo({ config: n }) {
6212
6234
  * limitations under the License.
6213
6235
  */
6214
6236
  const Je = "webStorageSupport";
6215
- class Io {
6237
+ class wo {
6216
6238
  constructor() {
6217
- this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Sn, this._completeRedirectFn = xs, this._overrideRedirectResult = Hs;
6239
+ this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Sn, this._completeRedirectFn = zs, this._overrideRedirectResult = Vs;
6218
6240
  }
6219
6241
  // Wrapping in async even though we don't await anywhere in order
6220
6242
  // to make sure errors are raised as promise rejections
6221
6243
  async _openPopup(e, t, r, i) {
6222
6244
  var s;
6223
6245
  j((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
6224
- const o = await $t(e, t, r, Ze(), i);
6225
- return go(e, o, dt());
6246
+ const o = await Mt(e, t, r, Ze(), i);
6247
+ return mo(e, o, ut());
6226
6248
  }
6227
6249
  async _openRedirect(e, t, r, i) {
6228
6250
  await this._originValidation(e);
6229
- const s = await $t(e, t, r, Ze(), i);
6230
- return Es(s), new Promise(() => {
6251
+ const s = await Mt(e, t, r, Ze(), i);
6252
+ return Ts(s), new Promise(() => {
6231
6253
  });
6232
6254
  }
6233
6255
  _initialize(e) {
@@ -6242,7 +6264,7 @@ class Io {
6242
6264
  }), r;
6243
6265
  }
6244
6266
  async initAndGetManager(e) {
6245
- const t = await co(e), r = new qs(e);
6267
+ const t = await lo(e), r = new Js(e);
6246
6268
  return t.register("authEvent", (i) => (_(
6247
6269
  i == null ? void 0 : i.authEvent,
6248
6270
  e,
@@ -6266,14 +6288,14 @@ class Io {
6266
6288
  }
6267
6289
  _originValidation(e) {
6268
6290
  const t = e._key();
6269
- return this.originValidationPromises[t] || (this.originValidationPromises[t] = Qs(e)), this.originValidationPromises[t];
6291
+ return this.originValidationPromises[t] || (this.originValidationPromises[t] = Xs(e)), this.originValidationPromises[t];
6270
6292
  }
6271
6293
  get _shouldInitProactively() {
6272
- return gn() || at() || je();
6294
+ return mn() || ct() || je();
6273
6295
  }
6274
6296
  }
6275
- const wo = Io;
6276
- var Mt = "@firebase/auth", Ut = "1.3.2";
6297
+ const Eo = wo;
6298
+ var Ut = "@firebase/auth", jt = "1.4.0";
6277
6299
  /**
6278
6300
  * @license
6279
6301
  * Copyright 2020 Google LLC
@@ -6290,7 +6312,7 @@ var Mt = "@firebase/auth", Ut = "1.3.2";
6290
6312
  * See the License for the specific language governing permissions and
6291
6313
  * limitations under the License.
6292
6314
  */
6293
- class Eo {
6315
+ class To {
6294
6316
  constructor(e) {
6295
6317
  this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
6296
6318
  }
@@ -6341,7 +6363,7 @@ class Eo {
6341
6363
  * See the License for the specific language governing permissions and
6342
6364
  * limitations under the License.
6343
6365
  */
6344
- function To(n) {
6366
+ function Ao(n) {
6345
6367
  switch (n) {
6346
6368
  case "Node":
6347
6369
  return "node";
@@ -6355,7 +6377,7 @@ function To(n) {
6355
6377
  return;
6356
6378
  }
6357
6379
  }
6358
- function Ao(n) {
6380
+ function So(n) {
6359
6381
  fe(new ae(
6360
6382
  "auth",
6361
6383
  (e, { options: t }) => {
@@ -6368,9 +6390,9 @@ function Ao(n) {
6368
6390
  apiHost: "identitytoolkit.googleapis.com",
6369
6391
  tokenApiHost: "securetoken.googleapis.com",
6370
6392
  apiScheme: "https",
6371
- sdkClientVersion: mn(n)
6372
- }, u = new Fi(r, i, s, a);
6373
- return Ji(u, t), u;
6393
+ sdkClientVersion: yn(n)
6394
+ }, u = new Bi(r, i, s, a);
6395
+ return Gi(u, t), u;
6374
6396
  },
6375
6397
  "PUBLIC"
6376
6398
  /* ComponentType.PUBLIC */
@@ -6389,14 +6411,14 @@ function Ao(n) {
6389
6411
  "auth"
6390
6412
  /* _ComponentName.AUTH */
6391
6413
  ).getImmediate());
6392
- return ((r) => new Eo(r))(t);
6414
+ return ((r) => new To(r))(t);
6393
6415
  },
6394
6416
  "PRIVATE"
6395
6417
  /* ComponentType.PRIVATE */
6396
6418
  ).setInstantiationMode(
6397
6419
  "EXPLICIT"
6398
6420
  /* InstantiationMode.EXPLICIT */
6399
- )), ie(Mt, Ut, To(n)), ie(Mt, Ut, "esm2017");
6421
+ )), ie(Ut, jt, Ao(n)), ie(Ut, jt, "esm2017");
6400
6422
  }
6401
6423
  /**
6402
6424
  * @license
@@ -6414,45 +6436,45 @@ function Ao(n) {
6414
6436
  * See the License for the specific language governing permissions and
6415
6437
  * limitations under the License.
6416
6438
  */
6417
- const So = 5 * 60, Co = Jt("authIdTokenMaxAge") || So;
6418
- let jt = null;
6419
- const Ro = (n) => async (e) => {
6439
+ const Co = 5 * 60, Ro = Gt("authIdTokenMaxAge") || Co;
6440
+ let Ft = null;
6441
+ const Po = (n) => async (e) => {
6420
6442
  const t = e && await e.getIdTokenResult(), r = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
6421
- if (r && r > Co)
6443
+ if (r && r > Ro)
6422
6444
  return;
6423
6445
  const i = t == null ? void 0 : t.token;
6424
- jt !== i && (jt = i, await fetch(n, {
6446
+ Ft !== i && (Ft = i, await fetch(n, {
6425
6447
  method: i ? "POST" : "DELETE",
6426
6448
  headers: i ? {
6427
6449
  Authorization: `Bearer ${i}`
6428
6450
  } : {}
6429
6451
  }));
6430
6452
  };
6431
- function Po(n = Xr()) {
6432
- const e = Qt(n, "auth");
6453
+ function Oo(n = Xr()) {
6454
+ const e = Xt(n, "auth");
6433
6455
  if (e.isInitialized())
6434
6456
  return e.getImmediate();
6435
- const t = qi(n, {
6436
- popupRedirectResolver: wo,
6457
+ const t = Ji(n, {
6458
+ popupRedirectResolver: Eo,
6437
6459
  persistence: [
6438
- Ns,
6439
- vs,
6460
+ Ds,
6461
+ Is,
6440
6462
  Sn
6441
6463
  ]
6442
- }), r = Jt("authTokenSyncURL");
6464
+ }), r = Gt("authTokenSyncURL");
6443
6465
  if (r) {
6444
- const s = Ro(r);
6445
- ps(t, s, () => s(t.currentUser)), fs(t, (o) => s(o));
6466
+ const s = Po(r);
6467
+ gs(t, s, () => s(t.currentUser)), ps(t, (o) => s(o));
6446
6468
  }
6447
6469
  const i = Hn("auth");
6448
- return i && Gi(t, `http://${i}`), t;
6470
+ return i && Ki(t, `http://${i}`), t;
6449
6471
  }
6450
- Ao(
6472
+ So(
6451
6473
  "Browser"
6452
6474
  /* ClientPlatform.BROWSER */
6453
6475
  );
6454
- var Oo = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
6455
- function ko(n) {
6476
+ var ko = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
6477
+ function No(n) {
6456
6478
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
6457
6479
  }
6458
6480
  var Dn = { exports: {} };
@@ -6493,7 +6515,7 @@ var Dn = { exports: {} };
6493
6515
  d += String.fromCharCode(l[m >> 5] >>> m % 32 & 255);
6494
6516
  return d;
6495
6517
  }
6496
- function v(l) {
6518
+ function b(l) {
6497
6519
  var m, d = [];
6498
6520
  for (d[(l.length >> 2) - 1] = void 0, m = 0; m < d.length; m += 1)
6499
6521
  d[m] = 0;
@@ -6503,13 +6525,13 @@ var Dn = { exports: {} };
6503
6525
  return d;
6504
6526
  }
6505
6527
  function A(l) {
6506
- return y(u(v(l), l.length * 8));
6528
+ return y(u(b(l), l.length * 8));
6507
6529
  }
6508
6530
  function P(l, m) {
6509
- var d, w = v(l), E = [], S = [], O;
6531
+ var d, w = b(l), E = [], S = [], O;
6510
6532
  for (E[15] = S[15] = void 0, w.length > 16 && (w = u(w, l.length * 8)), d = 0; d < 16; d += 1)
6511
6533
  E[d] = w[d] ^ 909522486, S[d] = w[d] ^ 1549556828;
6512
- return O = u(E.concat(v(m)), 512 + m.length * 8), y(u(S.concat(O), 512 + 128));
6534
+ return O = u(E.concat(b(m)), 512 + m.length * 8), y(u(S.concat(O), 640));
6513
6535
  }
6514
6536
  function k(l) {
6515
6537
  var m = "0123456789abcdef", d = "", w, E;
@@ -6517,29 +6539,29 @@ var Dn = { exports: {} };
6517
6539
  w = l.charCodeAt(E), d += m.charAt(w >>> 4 & 15) + m.charAt(w & 15);
6518
6540
  return d;
6519
6541
  }
6520
- function b(l) {
6542
+ function v(l) {
6521
6543
  return unescape(encodeURIComponent(l));
6522
6544
  }
6523
6545
  function I(l) {
6524
- return A(b(l));
6546
+ return A(v(l));
6525
6547
  }
6526
6548
  function D(l) {
6527
6549
  return k(I(l));
6528
6550
  }
6529
6551
  function C(l, m) {
6530
- return P(b(l), b(m));
6552
+ return P(v(l), v(m));
6531
6553
  }
6532
- function Y(l, m) {
6554
+ function Q(l, m) {
6533
6555
  return k(C(l, m));
6534
6556
  }
6535
- function B(l, m, d) {
6536
- return m ? d ? C(m, l) : Y(m, l) : d ? I(l) : D(l);
6557
+ function H(l, m, d) {
6558
+ return m ? d ? C(m, l) : Q(m, l) : d ? I(l) : D(l);
6537
6559
  }
6538
- n.exports ? n.exports = B : e.md5 = B;
6539
- })(Oo);
6560
+ n.exports ? n.exports = H : e.md5 = H;
6561
+ })(ko);
6540
6562
  })(Dn);
6541
- var No = Dn.exports;
6542
- const Do = /* @__PURE__ */ ko(No), ht = (n, e) => async (t, r = {}) => {
6563
+ var Do = Dn.exports;
6564
+ const Lo = /* @__PURE__ */ No(Do), ft = (n, e) => async (t, r = {}) => {
6543
6565
  const i = e ? await e.getIdToken() : null, s = await fetch(`${n}${t}`, {
6544
6566
  mode: "cors",
6545
6567
  ...r,
@@ -6557,7 +6579,7 @@ const Do = /* @__PURE__ */ ko(No), ht = (n, e) => async (t, r = {}) => {
6557
6579
  body: o
6558
6580
  });
6559
6581
  return o;
6560
- }, Lo = (n) => {
6582
+ }, $o = (n) => {
6561
6583
  const e = n.properties || {}, t = n.inputProps || Object.keys(e), r = (i, s) => {
6562
6584
  const o = e[i] || {};
6563
6585
  if ([null, void 0].includes(s))
@@ -6594,13 +6616,13 @@ const Do = /* @__PURE__ */ ko(No), ht = (n, e) => async (t, r = {}) => {
6594
6616
  ),
6595
6617
  validateAttr: r
6596
6618
  };
6597
- }, $o = (n = {}) => Object.keys(n).length ? `?q=${JSON.stringify(n)}` : "", Mo = (n) => [...n].reduce(
6619
+ }, Mo = (n = {}) => Object.keys(n).length ? `?q=${JSON.stringify(n)}` : "", Uo = (n) => [...n].reduce(
6598
6620
  (e, t) => t === t.toUpperCase() ? `${e}-${t.toLowerCase()}` : `${e}${t}`,
6599
6621
  ""
6600
- ), Uo = (n) => `${n[0].toLowerCase()}${n.slice(1)}`, jo = (n) => {
6601
- const e = Mo(n);
6602
- return (t, r) => `/${e}${t ? `/${encodeURIComponent(t)}` : ""}${$o(r)}`;
6603
- }, Ft = (n, e) => {
6622
+ ), jo = (n) => `${n[0].toLowerCase()}${n.slice(1)}`, Fo = (n) => {
6623
+ const e = Uo(n);
6624
+ return (t, r) => `/${e}${t ? `/${encodeURIComponent(t)}` : ""}${Mo(r)}`;
6625
+ }, Bt = (n, e) => {
6604
6626
  const t = Array.isArray(e.inputProps);
6605
6627
  return Object.keys(n).reduce(
6606
6628
  (r, i) => {
@@ -6614,12 +6636,12 @@ const Do = /* @__PURE__ */ ko(No), ht = (n, e) => async (t, r = {}) => {
6614
6636
  },
6615
6637
  {}
6616
6638
  );
6617
- }, Fo = ({ primaryKey: n, properties: e, ...t }) => ({
6639
+ }, Bo = ({ primaryKey: n, properties: e, ...t }) => ({
6618
6640
  primaryKey: n || "id",
6619
6641
  properties: Object.keys(e || {}).reduce(
6620
6642
  (r, i) => {
6621
- var v, A;
6622
- const s = e[i] || {}, { type: o, isScalar: c, isRequired: a, isRef: u = !1 } = typeof s.type == "string" ? s.type === "array" ? s.enum ? { type: "string", isScalar: !1, isRequired: !1 } : (v = s.items) != null && v.$ref ? { type: s.items.$ref.split("/").pop(), isScalar: !1, isRequired: !1, isRef: !0 } : { type: (A = s.items) == null ? void 0 : A.type, isScalar: !1, isRequired: !1 } : { type: s.format === "date-time" ? "date" : s.type, isScalar: !0, isRequired: !0 } : Array.isArray(s.type) ? s.type.length === 2 ? { type: s.format === "date-time" ? "date" : s.type[0], isScalar: !0, isRequired: !1 } : { type: "json", isScalar: !0, isRequired: s.type.includes("null") } : s.$ref ? { type: s.$ref.split("/").pop(), isScalar: !0, isRequired: !0, isRef: !0 } : { type: s.anyOf[0].$ref.split("/").pop(), isScalar: !0, isRequired: !1, isRef: !0 }, y = s.inputType || (o === "integer" ? "number" : o);
6643
+ var b, A;
6644
+ const s = e[i] || {}, { type: o, isScalar: c, isRequired: a, isRef: u = !1 } = typeof s.type == "string" ? s.type === "array" ? s.enum ? { type: "string", isScalar: !1, isRequired: !1 } : (b = s.items) != null && b.$ref ? { type: s.items.$ref.split("/").pop(), isScalar: !1, isRequired: !1, isRef: !0 } : { type: (A = s.items) == null ? void 0 : A.type, isScalar: !1, isRequired: !1 } : { type: s.format === "date-time" ? "date" : s.type, isScalar: !0, isRequired: !0 } : Array.isArray(s.type) ? s.type.length === 2 ? { type: s.format === "date-time" ? "date" : s.type[0], isScalar: !0, isRequired: !1 } : { type: "json", isScalar: !0, isRequired: s.type.includes("null") } : s.$ref ? { type: s.$ref.split("/").pop(), isScalar: !0, isRequired: !0, isRef: !0 } : { type: s.anyOf[0].$ref.split("/").pop(), isScalar: !0, isRequired: !1, isRef: !0 }, y = s.inputType || (o === "integer" ? "number" : o);
6623
6645
  return {
6624
6646
  ...r,
6625
6647
  [i]: {
@@ -6635,54 +6657,54 @@ const Do = /* @__PURE__ */ ko(No), ht = (n, e) => async (t, r = {}) => {
6635
6657
  {}
6636
6658
  ),
6637
6659
  ...t
6638
- }), Bo = (n, e, t, r = {}, i = {}) => {
6639
- const s = Fo(r), { primaryKey: o, properties: c } = s, a = Lo(s), u = jo(t), y = (...b) => ht(n, e.authUser)(...b), v = ({ data: b, ...I }) => y(u(null, I), {
6660
+ }), Ho = (n, e, t, r = {}, i = {}) => {
6661
+ const s = Bo(r), { primaryKey: o, properties: c } = s, a = $o(s), u = Fo(t), y = (...v) => ft(n, e.authUser)(...v), b = ({ data: v, ...I }) => y(u(null, I), {
6640
6662
  method: "POST",
6641
- body: Ft(b, s)
6642
- }), A = ({ data: b, ...I }) => {
6663
+ body: Bt(v, s)
6664
+ }), A = ({ data: v, ...I }) => {
6643
6665
  const { where: D, ...C } = I;
6644
6666
  return y(u(D[o], C), {
6645
6667
  method: "PUT",
6646
- body: Ft(b, s)
6668
+ body: Bt(v, s)
6647
6669
  });
6648
- }, P = (b) => {
6649
- if (!b)
6650
- return b;
6651
- const I = Object.keys(b).reduce(
6670
+ }, P = (v) => {
6671
+ if (!v)
6672
+ return v;
6673
+ const I = Object.keys(v).reduce(
6652
6674
  (D, C) => {
6653
6675
  var E;
6654
- const Y = c[C] || {}, { type: B, isScalar: l, isRef: m, format: d, items: w } = Y;
6676
+ const Q = c[C] || {}, { type: H, isScalar: l, isRef: m, format: d, items: w } = Q;
6655
6677
  if (m) {
6656
- const S = Uo(B);
6678
+ const S = jo(H);
6657
6679
  return l ? {
6658
6680
  ...D,
6659
- [C]: i[S].parse(b[C])
6681
+ [C]: i[S].parse(v[C])
6660
6682
  } : {
6661
6683
  ...D,
6662
- [C]: typeof ((E = i[S]) == null ? void 0 : E.parse) == "function" ? b[C].map((O) => i[S].parse(O)) : b[C]
6684
+ [C]: typeof ((E = i[S]) == null ? void 0 : E.parse) == "function" ? v[C].map((O) => i[S].parse(O)) : v[C]
6663
6685
  };
6664
6686
  }
6665
6687
  return {
6666
6688
  ...D,
6667
- [C]: B === "date" && b[C] ? new Date(b[C]) : b[C]
6689
+ [C]: H === "date" && v[C] ? new Date(v[C]) : v[C]
6668
6690
  };
6669
6691
  },
6670
6692
  {}
6671
6693
  );
6672
6694
  return typeof s.parse == "function" ? s.parse(I) : I;
6673
6695
  }, k = Object.keys(c || {}).reduce(
6674
- (b, I) => c[I].isRef && c[I].isScalar && c[I].isRequired ? Object.assign(b, {
6675
- all: b.all.concat(I),
6676
- oneToOne: b.oneToOne.concat(I),
6677
- requiredOneToOne: b.requiredOneToOne.concat(I)
6678
- }) : c[I].isRef && c[I].isScalar ? Object.assign(b, {
6679
- all: b.all.concat(I),
6680
- oneToOne: b.oneToOne.concat(I),
6681
- optionalOneToOne: b.optionalOneToOne.concat(I)
6682
- }) : c[I].isRef ? Object.assign(b, {
6683
- all: b.all.concat(I),
6684
- oneToMany: b.oneToMany.concat(I)
6685
- }) : b,
6696
+ (v, I) => c[I].isRef && c[I].isScalar && c[I].isRequired ? Object.assign(v, {
6697
+ all: v.all.concat(I),
6698
+ oneToOne: v.oneToOne.concat(I),
6699
+ requiredOneToOne: v.requiredOneToOne.concat(I)
6700
+ }) : c[I].isRef && c[I].isScalar ? Object.assign(v, {
6701
+ all: v.all.concat(I),
6702
+ oneToOne: v.oneToOne.concat(I),
6703
+ optionalOneToOne: v.optionalOneToOne.concat(I)
6704
+ }) : c[I].isRef ? Object.assign(v, {
6705
+ all: v.all.concat(I),
6706
+ oneToMany: v.oneToMany.concat(I)
6707
+ }) : v,
6686
6708
  {
6687
6709
  all: [],
6688
6710
  oneToOne: [],
@@ -6701,19 +6723,19 @@ const Do = /* @__PURE__ */ ko(No), ht = (n, e) => async (t, r = {}) => {
6701
6723
  parse: P,
6702
6724
  validateAttr: a.validateAttr,
6703
6725
  validate: a.validate,
6704
- findMany: (b) => y(u(null, b)).then((I) => I.map(P)),
6705
- findById: (b, I) => y(u(b, I)).then(P),
6706
- create: v,
6726
+ findMany: (v) => y(u(null, v)).then((I) => I.map(P)),
6727
+ findById: (v, I) => y(u(v, I)).then(P),
6728
+ create: b,
6707
6729
  update: A,
6708
- upsert: (b) => b.where[o] ? A({ where: b.where, data: b.update }) : v({ data: b.create }),
6709
- delete: (b) => y(u(b), { method: "DELETE" }),
6730
+ upsert: (v) => v.where[o] ? A({ where: v.where, data: v.update }) : b({ data: v.create }),
6731
+ delete: (v) => y(u(v), { method: "DELETE" }),
6710
6732
  stats: () => y(u("_stats"))
6711
6733
  };
6712
- }, Ho = (n, e, t) => Object.keys(t.properties).reduce(
6734
+ }, Vo = (n, e, t) => Object.keys(t.properties).reduce(
6713
6735
  (r, i) => {
6714
6736
  const s = t.properties[i].$ref.split("/").pop();
6715
6737
  return Object.assign(r, {
6716
- [i]: Bo(
6738
+ [i]: Ho(
6717
6739
  n,
6718
6740
  e,
6719
6741
  t.definitions[s].plural || `${i}s`,
@@ -6723,7 +6745,7 @@ const Do = /* @__PURE__ */ ko(No), ht = (n, e) => async (t, r = {}) => {
6723
6745
  });
6724
6746
  },
6725
6747
  {}
6726
- ), Vo = (n, e) => Object.keys(n.definitions).reduce(
6748
+ ), Wo = (n, e) => Object.keys(n.definitions).reduce(
6727
6749
  (t, r) => ({
6728
6750
  ...t,
6729
6751
  [r]: e[r] ? {
@@ -6742,7 +6764,7 @@ const Do = /* @__PURE__ */ ko(No), ht = (n, e) => async (t, r = {}) => {
6742
6764
  } : n.definitions[r]
6743
6765
  }),
6744
6766
  {}
6745
- ), Wo = "http://json-schema.org/draft-07/schema#", xo = {
6767
+ ), xo = "http://json-schema.org/draft-07/schema#", zo = {
6746
6768
  Country: {
6747
6769
  type: "object",
6748
6770
  properties: {
@@ -8927,7 +8949,7 @@ const Do = /* @__PURE__ */ ko(No), ht = (n, e) => async (t, r = {}) => {
8927
8949
  }
8928
8950
  }
8929
8951
  }
8930
- }, zo = "object", qo = {
8952
+ }, qo = "object", Jo = {
8931
8953
  country: {
8932
8954
  $ref: "#/definitions/Country"
8933
8955
  },
@@ -9033,12 +9055,12 @@ const Do = /* @__PURE__ */ ko(No), ht = (n, e) => async (t, r = {}) => {
9033
9055
  jobCrawlerLocation: {
9034
9056
  $ref: "#/definitions/JobCrawlerLocation"
9035
9057
  }
9036
- }, Bt = {
9037
- $schema: Wo,
9038
- definitions: xo,
9039
- type: zo,
9040
- properties: qo
9041
- }, Jo = 60 * 60 * 1e3, Ht = 24 * Jo, Go = {
9058
+ }, Ht = {
9059
+ $schema: xo,
9060
+ definitions: zo,
9061
+ type: qo,
9062
+ properties: Jo
9063
+ }, Go = 60 * 60 * 1e3, Vt = 24 * Go, Ko = {
9042
9064
  Country: {
9043
9065
  primaryKey: "code",
9044
9066
  plural: "countries",
@@ -9086,7 +9108,7 @@ const Do = /* @__PURE__ */ ko(No), ht = (n, e) => async (t, r = {}) => {
9086
9108
  }
9087
9109
  },
9088
9110
  parse: (n) => {
9089
- const e = n.github ? `https://github.com/${n.github}.png?size=` : `https://www.gravatar.com/avatar/${Do(n.email)}?s=`;
9111
+ const e = n.github ? `https://github.com/${n.github}.png?size=` : `https://www.gravatar.com/avatar/${Lo(n.email)}?s=`;
9090
9112
  return {
9091
9113
  ...n,
9092
9114
  fullName: `${n.firstName || ""}${n.lastName ? ` ${n.lastName}` : ""}`,
@@ -9150,7 +9172,7 @@ const Do = /* @__PURE__ */ ko(No), ht = (n, e) => async (t, r = {}) => {
9150
9172
  ) < e ? t = "placement_ended" : n.placementStart < e && (t = "placement_started");
9151
9173
  }
9152
9174
  !t && n.end < e && (t = "ended"), !t && n.start < e && (t = "started");
9153
- const r = n.admissionEnd ? +n.admissionEnd + Ht : !1;
9175
+ const r = n.admissionEnd ? +n.admissionEnd + Vt : !1;
9154
9176
  !t && r && r < e && (t = "admission_ended"), !t && n.admissionStart && n.admissionStart < e && (t = "admission_started"), !t && n.admissionStart && n.admissionEnd && (t = "planned"), t || (t = "draft");
9155
9177
  const i = n.start > e && n.vacancies ? n.vacancies : ((s = n._count) == null ? void 0 : s.students) || ((o = n.students) == null ? void 0 : o.length) || 0;
9156
9178
  return {
@@ -9286,7 +9308,7 @@ const Do = /* @__PURE__ */ ko(No), ht = (n, e) => async (t, r = {}) => {
9286
9308
  return n;
9287
9309
  const t = Date.now();
9288
9310
  let r;
9289
- return n.isReady ? r = "ready" : e && !n.bypassFilters ? r = "rejected" : n.createdAt < t - 90 * Ht ? r = "expired" : ((o = n.cohort) == null ? void 0 : o.status) !== "admission_started" ? r = "admission_ended" : r = "active", {
9311
+ return n.isReady ? r = "ready" : e && !n.bypassFilters ? r = "rejected" : n.createdAt < t - 90 * Vt ? r = "expired" : ((o = n.cohort) == null ? void 0 : o.status) !== "admission_started" ? r = "admission_ended" : r = "active", {
9290
9312
  ...n,
9291
9313
  status: r
9292
9314
  };
@@ -9320,16 +9342,16 @@ const Do = /* @__PURE__ */ ko(No), ht = (n, e) => async (t, r = {}) => {
9320
9342
  JobCrawlerQuery: {
9321
9343
  plural: "jobCrawlerQueries"
9322
9344
  }
9323
- }, Ko = (n, e) => ({
9324
- ...Ho(n, e, {
9325
- ...Bt,
9326
- definitions: Vo(Bt, Go)
9345
+ }, Yo = (n, e) => ({
9346
+ ...Vo(n, e, {
9347
+ ...Ht,
9348
+ definitions: Wo(Ht, Ko)
9327
9349
  }),
9328
9350
  gcpLog: {
9329
- getEntries: async (t) => await ht(n, e.authUser)(`/gcp-logs?q=${JSON.stringify(t)}`)
9351
+ getEntries: async (t) => await ft(n, e.authUser)(`/gcp-logs?q=${JSON.stringify(t)}`)
9330
9352
  }
9331
- }), Yo = (n, e) => {
9332
- const t = ht(n, e.authUser);
9353
+ }), Qo = (n, e) => {
9354
+ const t = ft(n, e.authUser);
9333
9355
  return {
9334
9356
  project: {
9335
9357
  findMany: (r = {}) => t(`/projects?q=${JSON.stringify(r)}`),
@@ -9343,76 +9365,76 @@ const Do = /* @__PURE__ */ ko(No), ht = (n, e) => async (t, r = {}) => {
9343
9365
  findMany: (r = {}) => t(`/learning-objectives?q=${JSON.stringify(r)}`)
9344
9366
  }
9345
9367
  };
9346
- }, Me = (n) => n > 9 ? `${n}` : `0${n}`, Qo = (n) => `${Me(n.getUTCDate())}/${Me(n.getUTCMonth() + 1)}/${n.getUTCFullYear()}`, Xo = (n) => `${Me(n.getUTCHours())}:${Me(n.getUTCMinutes())}:${n.getUTCSeconds()} UTC`, ta = (n) => `${Qo(n)} ${Xo(n)}`, Zo = {
9368
+ }, Me = (n) => n > 9 ? `${n}` : `0${n}`, Xo = (n) => `${Me(n.getUTCDate())}/${Me(n.getUTCMonth() + 1)}/${n.getUTCFullYear()}`, Zo = (n) => `${Me(n.getUTCHours())}:${Me(n.getUTCMinutes())}:${n.getUTCSeconds()} UTC`, na = (n) => `${Xo(n)} ${Zo(n)}`, ea = {
9347
9369
  es: "es-ES",
9348
9370
  pt: "pt-BR"
9349
- }, na = (n, e = "es", t = !1) => new Intl.DateTimeFormat(Zo[e], {
9371
+ }, ra = (n, e = "es", t = !1) => new Intl.DateTimeFormat(ea[e], {
9350
9372
  ...t && {
9351
9373
  year: "numeric"
9352
9374
  },
9353
9375
  month: "long",
9354
9376
  day: "numeric",
9355
9377
  timeZone: "UTC"
9356
- }).format(new Date(n)), ra = (n, e) => {
9378
+ }).format(new Date(n)), ia = (n, e) => {
9357
9379
  let t = e.getFullYear() - n.getFullYear();
9358
9380
  const r = e.getMonth() - n.getMonth();
9359
9381
  return (r < 0 || r === 0 && e.getDate() < n.getDate()) && t--, t;
9360
- }, ea = (n, e, t) => new Intl.NumberFormat(
9382
+ }, ta = (n, e, t) => new Intl.NumberFormat(
9361
9383
  `${n}-${e}`,
9362
9384
  { currency: t }
9363
- ), ia = (n, e, t, r) => ea(
9385
+ ), sa = (n, e, t, r) => ta(
9364
9386
  e,
9365
9387
  t,
9366
9388
  r
9367
- ).format(n), sa = (n) => parseInt(n.replace(/[,\.]/g, ""), 10), oa = (n) => {
9389
+ ).format(n), oa = (n) => parseInt(n.replace(/[,\.]/g, ""), 10), aa = (n) => {
9368
9390
  try {
9369
9391
  return JSON.parse(window.localStorage.getItem(n));
9370
9392
  } catch {
9371
9393
  return null;
9372
9394
  }
9373
- }, aa = ({
9395
+ }, ca = ({
9374
9396
  firebaseApiKey: n = "AIzaSyAXbaEbpq8NOfn0r8mIrcoHvoGRkJThwdc",
9375
9397
  firebaseProject: e = "laboratoria-la",
9376
9398
  coreApiUrl: t = "https://us-central1-outpost-272720.cloudfunctions.net/core-api"
9377
9399
  } = {}) => {
9378
- const r = Xt({
9400
+ const r = Zt({
9379
9401
  apiKey: n,
9380
9402
  authDomain: `${e}.firebaseapp.com`,
9381
9403
  databaseURL: `https://${e}.firebaseio.com`,
9382
9404
  projectId: e
9383
- }), i = Po(r), s = { authUser: void 0, user: void 0 }, o = Ko(t, s);
9405
+ }), i = Oo(r), s = { authUser: void 0, user: void 0 }, o = Yo(t, s);
9384
9406
  return {
9385
- ...Yo(t, s),
9407
+ ...Qo(t, s),
9386
9408
  ...o,
9387
9409
  auth: {
9388
- onChange: (u) => gs(i, (y) => {
9410
+ onChange: (u) => ms(i, (y) => {
9389
9411
  if (!y)
9390
9412
  return Object.assign(s, { authUser: null, user: null }), u(s);
9391
- Object.assign(s, { authUser: y }), o.user.findById(y.uid).then((v) => {
9392
- Object.assign(s, { user: v }), u(s);
9393
- }).catch((v) => {
9394
- console.error(v), Object.assign(s, { authUser: null, user: null }), u(s);
9413
+ Object.assign(s, { authUser: y }), o.user.findById(y.uid).then((b) => {
9414
+ Object.assign(s, { user: b }), u(s);
9415
+ }).catch((b) => {
9416
+ console.error(b), Object.assign(s, { authUser: null, user: null }), u(s);
9395
9417
  });
9396
9418
  }),
9397
- signIn: (u, y) => hs(
9419
+ signIn: (u, y) => fs(
9398
9420
  i,
9399
9421
  u,
9400
9422
  y
9401
9423
  ),
9402
- signOut: () => ms(i),
9403
- sendPasswordResetEmail: (u) => us(i, u)
9424
+ signOut: () => ys(i),
9425
+ sendPasswordResetEmail: (u) => hs(i, u)
9404
9426
  },
9405
9427
  firebaseApp: r
9406
9428
  };
9407
9429
  };
9408
9430
  export {
9409
- aa as createApp,
9410
- ia as formatCurrency,
9411
- Qo as formatDate,
9412
- ta as formatDateTime,
9413
- na as formatMonth,
9414
- Xo as formatTime,
9415
- ra as getAgeAt,
9416
- oa as loadFromLocalStorage,
9417
- sa as parseCurrency
9431
+ ca as createApp,
9432
+ sa as formatCurrency,
9433
+ Xo as formatDate,
9434
+ na as formatDateTime,
9435
+ ra as formatMonth,
9436
+ Zo as formatTime,
9437
+ ia as getAgeAt,
9438
+ aa as loadFromLocalStorage,
9439
+ oa as parseCurrency
9418
9440
  };