1!(function (e, t) { 2 "object" == typeof exports && "undefined" != typeof module 3 ? (module.exports = t()) 4 : "function" == typeof define && define.amd 5 ? define(t) 6 : ((e = 7 "undefined" != typeof globalThis ? globalThis : e || self).firebase = 8 t()); 9})(this, function () { 10 "use strict"; 11 var r = function (e, t) { 12 return (r = 13 Object.setPrototypeOf || 14 ({ __proto__: [] } instanceof Array && 15 function (e, t) { 16 e.__proto__ = t; 17 }) || 18 function (e, t) { 19 for (var n in t) 20 Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]); 21 })(e, t); 22 }; 23 var n = function () { 24 return (n = 25 Object.assign || 26 function (e) { 27 for (var t, n = 1, r = arguments.length; n < r; n++) 28 for (var i in (t = arguments[n])) 29 Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]); 30 return e; 31 }).apply(this, arguments); 32 }; 33 function e(e, a, s, l) { 34 return new (s = s || Promise)(function (n, t) { 35 function r(e) { 36 try { 37 o(l.next(e)); 38 } catch (e) { 39 t(e); 40 } 41 } 42 function i(e) { 43 try { 44 o(l.throw(e)); 45 } catch (e) { 46 t(e); 47 } 48 } 49 function o(e) { 50 var t; 51 e.done 52 ? n(e.value) 53 : ((t = e.value) instanceof s 54 ? t 55 : new s(function (e) { 56 e(t); 57 }) 58 ).then(r, i); 59 } 60 o((l = l.apply(e, a || [])).next()); 61 }); 62 } 63 function i(n, r) { 64 var i, 65 o, 66 a, 67 s = { 68 label: 0, 69 sent: function () { 70 if (1 & a[0]) throw a[1]; 71 return a[1]; 72 }, 73 trys: [], 74 ops: [], 75 }, 76 e = { next: t(0), throw: t(1), return: t(2) }; 77 return ( 78 "function" == typeof Symbol && 79 (e[Symbol.iterator] = function () { 80 return this; 81 }), 82 e 83 ); 84 function t(t) { 85 return function (e) { 86 return (function (t) { 87 if (i) throw new TypeError("Generator is already executing."); 88 for (; s;) 89 try { 90 if ( 91 ((i = 1), 92 o && 93 (a = 94 2 & t[0] 95 ? o.return 96 : t[0] 97 ? o.throw || ((a = o.return) && a.call(o), 0) 98 : o.next) && 99 !(a = a.call(o, t[1])).done) 100 ) 101 return a; 102 switch (((o = 0), (t = a ? [2 & t[0], a.value] : t)[0])) { 103 case 0: 104 case 1: 105 a = t; 106 break; 107 case 4: 108 return (s.label++, { value: t[1], done: !1 }); 109 case 5: 110 (s.label++, (o = t[1]), (t = [0])); 111 continue; 112 case 7: 113 ((t = s.ops.pop()), s.trys.pop()); 114 continue; 115 default: 116 if ( 117 !(a = 0 < (a = s.trys).length && a[a.length - 1]) && 118 (6 === t[0] || 2 === t[0]) 119 ) { 120 s = 0; 121 continue; 122 } 123 if (3 === t[0] && (!a || (t[1] > a[0] && t[1] < a[3]))) { 124 s.label = t[1]; 125 break; 126 } 127 if (6 === t[0] && s.label < a[1]) { 128 ((s.label = a[1]), (a = t)); 129 break; 130 } 131 if (a && s.label < a[2]) { 132 ((s.label = a[2]), s.ops.push(t)); 133 break; 134 } 135 (a[2] && s.ops.pop(), s.trys.pop()); 136 continue; 137 } 138 t = r.call(n, s); 139 } catch (e) { 140 ((t = [6, e]), (o = 0)); 141 } finally { 142 i = a = 0; 143 } 144 if (5 & t[0]) throw t[1]; 145 return { value: t[0] ? t[1] : void 0, done: !0 }; 146 })([t, e]); 147 }; 148 } 149 } 150 function p(e) { 151 var t = "function" == typeof Symbol && Symbol.iterator, 152 n = t && e[t], 153 r = 0; 154 if (n) return n.call(e); 155 if (e && "number" == typeof e.length) 156 return { 157 next: function () { 158 return { 159 value: (e = e && r >= e.length ? void 0 : e) && e[r++], 160 done: !e, 161 }; 162 }, 163 }; 164 throw new TypeError( 165 t ? "Object is not iterable." : "Symbol.iterator is not defined.", 166 ); 167 } 168 function f(e, t) { 169 var n = "function" == typeof Symbol && e[Symbol.iterator]; 170 if (!n) return e; 171 var r, 172 i, 173 o = n.call(e), 174 a = []; 175 try { 176 for (; (void 0 === t || 0 < t--) && !(r = o.next()).done;) 177 a.push(r.value); 178 } catch (e) { 179 i = { error: e }; 180 } finally { 181 try { 182 r && !r.done && (n = o.return) && n.call(o); 183 } finally { 184 if (i) throw i.error; 185 } 186 } 187 return a; 188 } 189 function a(e, t) { 190 for (var n = 0, r = t.length, i = e.length; n < r; n++, i++) e[i] = t[n]; 191 return e; 192 } 193 function h(e, t) { 194 if (!(t instanceof Object)) return t; 195 switch (t.constructor) { 196 case Date: 197 return new Date(t.getTime()); 198 case Object: 199 void 0 === e && (e = {}); 200 break; 201 case Array: 202 e = []; 203 break; 204 default: 205 return t; 206 } 207 for (var n in t) 208 t.hasOwnProperty(n) && "__proto__" !== n && (e[n] = h(e[n], t[n])); 209 return e; 210 } 211 var o = 212 ((t.prototype.wrapCallback = function (n) { 213 var r = this; 214 return function (e, t) { 215 (e ? r.reject(e) : r.resolve(t), 216 "function" == typeof n && 217 (r.promise.catch(function () { }), 1 === n.length ? n(e) : n(e, t))); 218 }; 219 }), 220 t); 221 function t() { 222 var n = this; 223 ((this.reject = function () { }), 224 (this.resolve = function () { }), 225 (this.promise = new Promise(function (e, t) { 226 ((n.resolve = e), (n.reject = t)); 227 }))); 228 } 229 var s, 230 l = "FirebaseError", 231 c = 232 ((function (e, t) { 233 if ("function" != typeof t && null !== t) 234 throw new TypeError( 235 "Class extends value " + 236 String(t) + 237 " is not a constructor or null", 238 ); 239 function n() { 240 this.constructor = e; 241 } 242 (r(e, t), 243 (e.prototype = 244 null === t 245 ? Object.create(t) 246 : ((n.prototype = t.prototype), new n()))); 247 })(u, (s = Error)), 248 u); 249 function u(e, t, n) { 250 t = s.call(this, t) || this; 251 return ( 252 (t.code = e), 253 (t.customData = n), 254 (t.name = l), 255 Object.setPrototypeOf(t, u.prototype), 256 Error.captureStackTrace && Error.captureStackTrace(t, d.prototype.create), 257 t 258 ); 259 } 260 var d = 261 ((v.prototype.create = function (e) { 262 for (var t = [], n = 1; n < arguments.length; n++) 263 t[n - 1] = arguments[n]; 264 var r, 265 i = t[0] || {},
266 o = this.service + "/" + e, 267 e = this.errors[e], 268 e = e 269 ? ((r = i), 270 e.replace(m, function (e, t) { 271 var n = r[t]; 272 return null != n ? String(n) : "<" + t + "?>"; 273 })) 274 : "Error", 275 e = this.serviceName + ": " + e + " (" + o + ")."; 276 return new c(o, e, i); 277 }), 278 v); 279 function v(e, t, n) { 280 ((this.service = e), (this.serviceName = t), (this.errors = n)); 281 } 282 var m = /\{\$([^}]+)}/g; 283 function y(e, t) { 284 return Object.prototype.hasOwnProperty.call(e, t); 285 } 286 function b(e, t) { 287 t = new g(e, t); 288 return t.subscribe.bind(t); 289 } 290 var g = 291 ((I.prototype.next = function (t) { 292 this.forEachObserver(function (e) { 293 e.next(t); 294 }); 295 }), 296 (I.prototype.error = function (t) { 297 (this.forEachObserver(function (e) { 298 e.error(t); 299 }), 300 this.close(t)); 301 }), 302 (I.prototype.complete = function () { 303 (this.forEachObserver(function (e) { 304 e.complete(); 305 }), 306 this.close()); 307 }), 308 (I.prototype.subscribe = function (e, t, n) { 309 var r, 310 i = this; 311 if (void 0 === e && void 0 === t && void 0 === n) 312 throw new Error("Missing Observer."); 313 (void 0 === 314 (r = (function (e, t) { 315 if ("object" != typeof e || null === e) return !1; 316 for (var n = 0, r = t; n < r.length; n++) { 317 var i = r[n]; 318 if (i in e && "function" == typeof e[i]) return !0; 319 } 320 return !1; 321 })(e, ["next", "error", "complete"]) 322 ? e 323 : { next: e, error: t, complete: n }).next && (r.next = w), 324 void 0 === r.error && (r.error = w), 325 void 0 === r.complete && (r.complete = w)); 326 n = this.unsubscribeOne.bind(this, this.observers.length); 327 return ( 328 this.finalized && 329 this.task.then(function () { 330 try { 331 i.finalError ? r.error(i.finalError) : r.complete(); 332 } catch (e) { } 333 }), 334 this.observers.push(r), 335 n 336 ); 337 }), 338 (I.prototype.unsubscribeOne = function (e) { 339 void 0 !== this.observers && 340 void 0 !== this.observers[e] && 341 (delete this.observers[e], 342 --this.observerCount, 343 0 === this.observerCount && 344 void 0 !== this.onNoObservers && 345 this.onNoObservers(this)); 346 }), 347 (I.prototype.forEachObserver = function (e) { 348 if (!this.finalized) 349 for (var t = 0; t < this.observers.length; t++) this.sendOne(t, e); 350 }), 351 (I.prototype.sendOne = function (e, t) { 352 var n = this; 353 this.task.then(function () { 354 if (void 0 !== n.observers && void 0 !== n.observers[e]) 355 try { 356 t(n.observers[e]); 357 } catch (e) { 358 "undefined" != typeof console && console.error && console.error(e); 359 } 360 }); 361 }), 362 (I.prototype.close = function (e) { 363 var t = this; 364 this.finalized || 365 ((this.finalized = !0), 366 void 0 !== e && (this.finalError = e), 367 this.task.then(function () { 368 ((t.observers = void 0), (t.onNoObservers = void 0)); 369 })); 370 }), 371 I); 372 function I(e, t) { 373 var n = this; 374 ((this.observers = []), 375 (this.unsubscribes = []), 376 (this.observerCount = 0), 377 (this.task = Promise.resolve()), 378 (this.finalized = !1), 379 (this.onNoObservers = t), 380 this.task 381 .then(function () { 382 e(n); 383 }) 384 .catch(function (e) { 385 n.error(e); 386 })); 387 } 388 function w() { } 389 var E = 390 ((O.prototype.setInstantiationMode = function (e) { 391 return ((this.instantiationMode = e), this); 392 }), 393 (O.prototype.setMultipleInstances = function (e) { 394 return ((this.multipleInstances = e), this); 395 }), 396 (O.prototype.setServiceProps = function (e) { 397 return ((this.serviceProps = e), this); 398 }), 399 (O.prototype.setInstanceCreatedCallback = function (e) { 400 return ((this.onInstanceCreated = e), this); 401 }), 402 O); 403 function O(e, t, n) { 404 ((this.name = e), 405 (this.instanceFactory = t),
406 (this.type = n), 407 (this.multipleInstances = !1), 408 (this.serviceProps = {}), 409 (this.instantiationMode = "LAZY"), 410 (this.onInstanceCreated = null)); 411 } 412 var _ = "[DEFAULT]", 413 N = 414 ((C.prototype.get = function (e) { 415 var t = this.normalizeInstanceIdentifier(e); 416 if (!this.instancesDeferred.has(t)) { 417 e = new o(); 418 if ( 419 (this.instancesDeferred.set(t, e), 420 this.isInitialized(t) || this.shouldAutoInitialize()) 421 ) 422 try { 423 var n = this.getOrInitializeService({ instanceIdentifier: t }); 424 n && e.resolve(n); 425 } catch (e) { } 426 } 427 return this.instancesDeferred.get(t).promise; 428 }), 429 (C.prototype.getImmediate = function (t) { 430 var e = this.normalizeInstanceIdentifier( 431 null == t ? void 0 : t.identifier, 432 ), 433 t = 434 null !== (t = null == t ? void 0 : t.optional) && void 0 !== t && t; 435 if (!this.isInitialized(e) && !this.shouldAutoInitialize()) { 436 if (t) return null; 437 throw Error("Service " + this.name + " is not available"); 438 } 439 try { 440 return this.getOrInitializeService({ instanceIdentifier: e }); 441 } catch (e) { 442 if (t) return null; 443 throw e; 444 } 445 }), 446 (C.prototype.getComponent = function () { 447 return this.component; 448 }), 449 (C.prototype.setComponent = function (e) { 450 var t, n; 451 if (e.name !== this.name) 452 throw Error( 453 "Mismatching Component " + 454 e.name + 455 " for Provider " + 456 this.name + 457 ".", 458 ); 459 if (this.component) 460 throw Error( 461 "Component for " + this.name + " has already been provided", 462 ); 463 if (((this.component = e), this.shouldAutoInitialize())) { 464 if ("EAGER" === e.instantiationMode) 465 try { 466 this.getOrInitializeService({ instanceIdentifier: _ }); 467 } catch (e) { } 468 try { 469 for ( 470 var r = p(this.instancesDeferred.entries()), i = r.next(); 471 !i.done; 472 i = r.next() 473 ) { 474 var o = f(i.value, 2), 475 a = o[0], 476 s = o[1], 477 l = this.normalizeInstanceIdentifier(a); 478 try { 479 var c = this.getOrInitializeService({ instanceIdentifier: l }); 480 s.resolve(c); 481 } catch (e) { } 482 } 483 } catch (e) { 484 t = { error: e }; 485 } finally { 486 try { 487 i && !i.done && (n = r.return) && n.call(r); 488 } finally { 489 if (t) throw t.error; 490 } 491 } 492 } 493 }), 494 (C.prototype.clearInstance = function (e) { 495 (this.instancesDeferred.delete((e = void 0 === e ? _ : e)), 496 this.instances.delete(e)); 497 }), 498 (C.prototype.delete = function () { 499 return e(this, void 0, void 0, function () { 500 var t; 501 return i(this, function (e) { 502 switch (e.label) { 503 case 0: 504 return ( 505 (t = Array.from(this.instances.values())
505), 506 [ 507 4, 508 Promise.all( 509 a( 510 a( 511 [], 512 f( 513 t 514 .filter(function (e) { 515 return "INTERNAL" in e; 516 }) 517 .map(function (e) { 518 return e.INTERNAL.delete(); 519 }), 520 ), 521 ), 522 f( 523 t 524 .filter(function (e) { 525 return "_delete" in e; 526 }) 527 .map(function (e) { 528 return e._delete(); 529 }), 530 ), 531 ), 532 ), 533 ] 534 ); 535 case 1: 536 return (e.sent(), [2]); 537 } 538 }); 539 }); 540 }), 541 (C.prototype.isComponentSet = function () { 542 return null != this.component; 543 }), 544 (C.prototype.isInitialized = function (e) { 545 return this.instances.has((e = void 0 === e ? _ : e)); 546 }), 547 (C.prototype.initialize = function (e) { 548 var t, 549 n, 550 r = (e = void 0 === e ? {} : e).options, 551 r = void 0 === r ? {} : r, 552 i = this.normalizeInstanceIdentifier(e.instanceIdentifier); 553 if (this.isInitialized(i)) 554 throw Error(this.name + "(" + i + ") has already been initialized"); 555 if (!this.isComponentSet()) 556 throw Error( 557 "Component " + this.name + " has not been registered yet", 558 ); 559 var o = this.getOrInitializeService({ 560 instanceIdentifier: i, 561 options: r, 562 }); 563 try { 564 for ( 565 var a = p(this.instancesDeferred.entries()), s = a.next(); 566 !s.done; 567 s = a.next() 568 ) { 569 var l = f(s.value, 2), 570 c = l[0], 571 u = l[1]; 572 i === this.normalizeInstanceIdentifier(c) && u.resolve(o); 573 } 574 } catch (e) { 575 t = { error: e }; 576 } finally { 577 try { 578 s && !s.done && (n = a.return) && n.call(a); 579 } finally { 580 if (t) throw t.error; 581 } 582 } 583 return o; 584 }), 585 (C.prototype.onInit = function (e, t) { 586 var n = this.normalizeInstanceIdentifier(t), 587 r = 588 null !== (t = this.onInitCallbacks.get(n)) && void 0 !== t 589 ? t 590 : new Set(); 591 (r.add(e), this.onInitCallbacks.set(n, r)); 592 t = this.instances.get(n); 593 return ( 594 t && e(t, n), 595 function () { 596 r.delete(e); 597 } 598 ); 599 }), 600 (C.prototype.invokeOnInitCallbacks = function (e, t) { 601 var n, 602 r, 603 i = this.onInitCallbacks.get(t); 604 if (i) 605 try { 606 for (var o = p(i), a = o.next(); !a.done; a = o.next()) { 607 var s = a.value; 608 try { 609 s(e, t); 610 } catch (e) { } 611 } 612 } catch (e) { 613 n = { error: e }; 614 } finally { 615 try { 616 a && !a.done && (r = o.return) && r.call(o); 617 } finally { 618 if (n) throw n.error; 619 } 620 } 621 }), 622 (C.prototype.getOrInitializeService = function (e) { 623 var t = e.instanceIdentifier, 624 n = e.options, 625 r = void 0 === n ? {} : n, 626 e = this.instances.get(t); 627 if ( 628 !e && 629 this.component && 630 ((e = this.component.instanceFactory(this.container, { 631 instanceIdentifier: (n = t) === _ ? void 0 : n, 632 options: r, 633 })), 634 this.instances.set(t, e), 635 this.invokeOnInitCallbacks(e, t), 636 this.component.onInstanceCreated) 637 ) 638 try { 639 this.component.onInstanceCreated(this.container, t, e); 640 } catch (e) { } 641 return e || null; 642 }), 643 (C.prototype.normalizeInstanceIdentifier = function (e) { 644 return ( 645 void 0 === e && (e = _), 646 !this.component || this.component.multipleInstances ? e : _ 647 ); 648 }), 649 (C.prototype.shouldAutoInitialize = function () { 650 return ( 651 !!this.component && "EXPLICIT" !== this.component.instantiationMode 652 ); 653 }), 654 C); 655 function C(e, t) { 656 ((this.name = e), 657 (this.container = t), 658 (this.component = null),
659 (this.instances = new Map()), 660 (this.instancesDeferred = new Map()), 661 (this.onInitCallbacks = new Map())); 662 } 663 var S = 664 ((L.prototype.addComponent = function (e) { 665 var t = this.getProvider(e.name); 666 if (t.isComponentSet()) 667 throw new Error( 668 "Component " + 669 e.name + 670 " has already been registered with " + 671 this.name, 672 ); 673 t.setComponent(e); 674 }), 675 (L.prototype.addOrOverwriteComponent = function (e) { 676 (this.getProvider(e.name).isComponentSet() && 677 this.providers.delete(e.name), 678 this.addComponent(e)); 679 }), 680 (L.prototype.getProvider = function (e) { 681 if (this.providers.has(e)) return this.providers.get(e); 682 var t = new N(e, this); 683 return (this.providers.set(e, t), t); 684 }), 685 (L.prototype.getProviders = function () { 686 return Array.from(this.providers.values()); 687 }), 688 L); 689 function L(e) { 690 ((this.name = e), (this.providers = new Map())); 691 } 692 var R, 693 A = []; 694 (((z = R = R || {})[(z.DEBUG = 0)] = "DEBUG"), 695 (z[(z.VERBOSE = 1)] = "VERBOSE"), 696 (z[(z.INFO = 2)] = "INFO"), 697 (z[(z.WARN = 3)] = "WARN"), 698 (z[(z.ERROR = 4)] = "ERROR"), 699 (z[(z.SILENT = 5)] = "SILENT")); 700 function P(e, t) { 701 for (var n = [], r = 2; r < arguments.length; r++) n[r - 2] = arguments[r]; 702 if (!(t < e.logLevel)) { 703 var i = new Date().toISOString(), 704 o = j[t]; 705 if (!o) 706 throw new Error( 707 "Attempted to log a message with an invalid logType (value: " + 708 t + 709 ")", 710 ); 711 console[o].apply(console, a(["[" + i + "] " + e.name + ":"], n)); 712 } 713 } 714 var k = { 715 debug: R.DEBUG, 716 verbose: R.VERBOSE, 717 info: R.INFO, 718 warn: R.WARN, 719 error: R.ERROR, 720 silent: R.SILENT, 721 }, 722 D = R.INFO, 723 j = 724 (((H = {})[R.DEBUG] = "log"), 725 (H[R.VERBOSE] = "log"), 726 (H[R.INFO] = "info"), 727 (H[R.WARN] = "warn"), 728 (H[R.ERROR] = "error"), 729 H), 730 z = 731 (Object.defineProperty(F.prototype, "logLevel", { 732 get: function () { 733 return this._logLevel; 734 }, 735 set: function (e) { 736 if (!(e in R)) 737 throw new TypeError( 738 'Invalid value "' + e + '" assigned to `logLevel`', 739 ); 740 this._logLevel = e; 741 }, 742 enumerable: !1, 743 configurable: !0, 744 }), 745 (F.prototype.setLogLevel = function (e) { 746 this._logLevel = "string" == typeof e ? k[e] : e; 747 }), 748 Object.defineProperty(F.prototype, "logHandler", { 749 get: function () { 750 return this._logHandler; 751 }, 752 set: function (e) { 753 if ("function" != typeof e) 754 throw new TypeError( 755 "Value assigned to `logHandler` must be a function", 756 ); 757 this._logHandler = e; 758 }, 759 enumerable: !1, 760 configurable: !0, 761 }), 762 Object.defineProperty(F.prototype, "userLogHandler", { 763 get: function () { 764 return this._userLogHandler; 765 }, 766 set: function (e) { 767 this._userLogHandler = e; 768 }, 769 enumerable: !1, 770 configurable: !0, 771 }), 772 (F.prototype.debug = function () { 773 for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; 774 (this._userLogHandler && 775 this._userLogHandler.apply(this, a([this, R.DEBUG], e)), 776 this._logHandler.apply(this, a([this, R.DEBUG], e))); 777 }), 778 (F.prototype.log = function () { 779 for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; 780 (this._userLogHandler && 781 this._userLogHandler.apply(this, a([this, R.VERBOSE], e)), 782 this._logHandler.apply(this, a([this, R.VERBOSE], e))); 783 }), 784 (F.prototype.info = function () { 785 for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; 786 (this._userLogHandler && 787 this._userLogHandler.apply(this, a([this, R.INFO], e)), 788 this._logHandler.apply(this, a([this, R.INFO], e))); 789 }), 790 (F.prototype.warn = function () { 791 for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; 792 (this._userLogHandler && 793 this._userLogHandler.apply(this, a([this, R.WARN], e)), 794 this._logHandler.apply(this, a([this, R.WARN], e))); 795 }), 796 (F.prototype.error = function () { 797 for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; 798 (this._userLogHandler && 799 this._userLogHandler.apply(this, a([this, R.ERROR], e)), 800 this._logHandler.apply(this, a([this, R.ERROR], e))); 801 }), 802 F); 803 function F(e) { 804 ((this.name = e), 805 (this._logLevel = D), 806 (this._logHandler = P), 807 (this._userLogHandler = null),
808 A.push(this)); 809 } 810 function T(t) { 811 A.forEach(function (e) { 812 e.setLogLevel(t); 813 }); 814 } 815 function x(a, t) { 816 for (var e = 0, n = A; e < n.length; e++) 817 !(function (e) { 818 var o = null; 819 (t && t.level && (o = k[t.level]), 820 (e.userLogHandler = 821 null === a 822 ? null 823 : function (e, t) { 824 for (var n = [], r = 2; r < arguments.length; r++) 825 n[r - 2] = arguments[r]; 826 var i = n 827 .map(function (e) { 828 if (null == e) return null; 829 if ("string" == typeof e) return e; 830 if ("number" == typeof e || "boolean" == typeof e) 831 return e.toString(); 832 if (e instanceof Error) return e.message; 833 try { 834 return JSON.stringify(e); 835 } catch (e) { 836 return null; 837 } 838 }) 839 .filter(function (e) { 840 return e; 841 }) 842 .join(" "); 843 t >= (null != o ? o : e.logLevel) && 844 a({ 845 level: R[t].toLowerCase(), 846 message: i, 847 args: n, 848 type: e.name, 849 }); 850 })); 851 })(n[e]); 852 } 853 var H = 854 (((H = {})["no-app"] = 855 "No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()"), 856 (H["bad-app-name"] = "Illegal App name: '{$appName}"), 857 (H["duplicate-app"] = "Firebase App named '{$appName}' already exists"), 858 (H["app-deleted"] = "Firebase App named '{$appName}' already deleted"), 859 (H["invalid-app-argument"] = 860 "firebase.{$appName}() takes either no argument or a Firebase App instance."), 861 (H["invalid-log-argument"] = 862 "First argument to `onLog` must be null or a function."), 863 H), 864 V = new d("app", "Firebase", H), 865 B = "@firebase/app", 866 M = "[DEFAULT]", 867 U = 868 (((H = {})[B] = "fire-core"), 869 (H["@firebase/analytics"] = "fire-analytics"), 870 (H["@firebase/app-check"] = "fire-app-check"), 871 (H["@firebase/auth"] = "fire-auth"), 872 (H["@firebase/database"] = "fire-rtdb"), 873 (H["@firebase/functions"] = "fire-fn"),
874 (H["@firebase/installations"] = "fire-iid"), 875 (H["@firebase/messaging"] = "fire-fcm"), 876 (H["@firebase/performance"] = "fire-perf"), 877 (H["@firebase/remote-config"] = "fire-rc"), 878 (H["@firebase/storage"] = "fire-gcs"), 879 (H["@firebase/firestore"] = "fire-fst"), 880 (H["fire-js"] = "fire-js"), 881 (H["firebase-wrapper"] = "fire-js-all"), 882 H), 883 W = new z("@firebase/app"), 884 G = 885 (Object.defineProperty($.prototype, "automaticDataCollectionEnabled", { 886 get: function () { 887 return (this.checkDestroyed_(), this.automaticDataCollectionEnabled_); 888 }, 889 set: function (e) { 890 (this.checkDestroyed_(), (this.automaticDataCollectionEnabled_ = e)); 891 }, 892 enumerable: !1, 893 configurable: !0, 894 }), 895 Object.defineProperty($.prototype, "name", { 896 get: function () { 897 return (this.checkDestroyed_(), this.name_); 898 }, 899 enumerable: !1, 900 configurable: !0, 901 }), 902 Object.defineProperty($.prototype, "options", { 903 get: function () { 904 return (this.checkDestroyed_(), this.options_); 905 }, 906 enumerable: !1, 907 configurable: !0, 908 }), 909 ($.prototype.delete = function () { 910 var t = this; 911 return new Promise(function (e) { 912 (t.checkDestroyed_(), e()); 913 }) 914 .then(function () { 915 return ( 916 t.firebase_.INTERNAL.removeApp(t.name_), 917 Promise.all( 918 t.container.getProviders().map(function (e) { 919 return e.delete(); 920 }), 921 ) 922 ); 923 }) 924 .then(function () { 925 t.isDeleted_ = !0; 926 }); 927 }), 928 ($.prototype._getService = function (e, t) { 929 (void 0 === t && (t = M), this.checkDestroyed_()); 930 var n = this.container.getProvider(e); 931 return ( 932 n.isInitialized() || 933 "EXPLICIT" !== 934 (null === (e = n.getComponent()) || void 0 === e 935 ? void 0 936 : e.instantiationMode) || 937 n.initialize(), 938 n.getImmediate({ identifier: t }) 939 ); 940 }), 941 ($.prototype._removeServiceInstance = function (e, t) { 942 (void 0 === t && (t = M), 943 this.container.getProvider(e).clearInstance(t)); 944 }), 945 ($.prototype._addComponent = function (t) { 946 try { 947 this.container.addComponent(t); 948 } catch (e) { 949 W.debug( 950 "Component " + 951 t.name + 952 " failed to register with FirebaseApp " + 953 this.name, 954 e, 955 ); 956 } 957 }), 958 ($.prototype._addOrOverwriteComponent = function (e) { 959 this.container.addOrOverwriteComponent(e); 960 }), 961 ($.prototype.toJSON = function () { 962 return { 963 name: this.name, 964 automaticDataCollectionEnabled: this.automaticDataCollectionEnabled, 965 options: this.options, 966 }; 967 }), 968 ($.prototype.checkDestroyed_ = function () { 969 if (this.isDeleted_) 970 throw V.create("app-deleted", { appName: this.name_ }); 971 }), 972 $); 973 function $(e, t, n) { 974 var r = this; 975 ((this.firebase_ = n), 976 (this.isDeleted_ = !1), 977 (this.name_ = t.name), 978 (this.automaticDataCollectionEnabled_ = 979 t.automaticDataCollectionEnabled || !1), 980 (this.options_ = h(void 0, e)), 981 (this.container = new S(t.name)), 982 this._addComponent( 983 new E( 984 "app", 985 function () { 986 return r; 987 }, 988 "PUBLIC", 989 ), 990 ),
991 this.firebase_.INTERNAL.components.forEach(function (e) { 992 return r._addComponent(e); 993 })); 994 } 995 (G.prototype.name && G.prototype.options) || 996 G.prototype.delete || 997 console.log("dc"); 998 var K = "8.9.1"; 999 function Y(a) { 1000 var s = {}, 1001 l = new Map(), 1002 c = { 1003 __esModule: !0, 1004 initializeApp: function (e, t) { 1005 void 0 === t && (t = {}); 1006 ("object" == typeof t && null !== t) || (t = { name: t }); 1007 var n = t; 1008 void 0 === n.name && (n.name = M); 1009 t = n.name; 1010 if ("string" != typeof t || !t) 1011 throw V.create("bad-app-name", { appName: String(t) }); 1012 if (y(s, t)) throw V.create("duplicate-app", { appName: t }); 1013 n = new a(e, n, c); 1014 return (s[t] = n); 1015 }, 1016 app: u, 1017 registerVersion: function (e, t, n) { 1018 var r = null !== (i = U[e]) && void 0 !== i ? i : e; 1019 n && (r += "-" + n); 1020 var i = r.match(/\s|\//), 1021 e = t.match(/\s|\//); 1022 i || e 1023 ? ((n = [ 1024 'Unable to register library "' + 1025 r + 1026 '" with version "' + 1027 t + 1028 '":', 1029 ]), 1030 i && 1031 n.push( 1032 'library name "' + 1033 r + 1034 '" contains illegal characters (whitespace or "/")', 1035 ), 1036 i && e && n.push("and"), 1037 e && 1038 n.push( 1039 'version name "' + 1040 t + 1041 '" contains illegal characters (whitespace or "/")', 1042 ), 1043 W.warn(n.join(" "))) 1044 : o( 1045 new E( 1046 r + "-version", 1047 function () { 1048 return { library: r, version: t }; 1049 }, 1050 "VERSION", 1051 ), 1052 ); 1053 }, 1054 setLogLevel: T, 1055 onLog: function (e, t) { 1056 if (null !== e && "function" != typeof e) 1057 throw V.create("invalid-log-argument"); 1058 x(e, t); 1059 }, 1060 apps: null, 1061 SDK_VERSION: K, 1062 INTERNAL: { 1063 registerComponent: o, 1064 removeApp: function (e) { 1065 delete s[e]; 1066 }, 1067 components: l, 1068 useAsService: function (e, t) { 1069 return "serverAuth" !== t ? t : null; 1070 }, 1071 }, 1072 }; 1073 function u(e) { 1074 if (!y(s, (e = e || M))) throw V.create("no-app", { appName: e }); 1075 return s[e]; 1076 } 1077 function o(n) { 1078 var e, 1079 r = n.name; 1080 if (l.has(r)) 1081 return ( 1082 W.debug( 1083 "There were multiple attempts to register component " + r + ".", 1084 ), 1085 "PUBLIC" === n.type ? c[r] : null 1086 ); 1087 (l.set(r, n), 1088 "PUBLIC" === n.type && 1089 ((e = function (e) { 1090 if ("function" != typeof (e = void 0 === e ? u() : e)[r]) 1091 throw V.create("invalid-app-argument", { appName: r }); 1092 return e[r](); 1093 }), 1094 void 0 !== n.serviceProps && h(e, n.serviceProps), 1095 (c[r] = e), 1096 (a.prototype[r] = function () { 1097 for (var e = [], t = 0; t < arguments.length; t++) 1098 e[t] = arguments[t]; 1099 return this._getService 1100 .bind(this, r) 1101 .apply(this, n.multipleInstances ? e : []); 1102 }))); 1103 for (var t = 0, i = Object.keys(s); t < i.length; t++) { 1104 var o = i[t]; 1105 s[o]._addComponent(n); 1106 } 1107 return "PUBLIC" === n.type ? c[r] : null; 1108 } 1109 return ( 1110 (c.default = c), 1111 Object.defineProperty(c, "apps", { 1112 get: function () { 1113 return Object.keys(s).map(function (e) { 1114 return s[e]; 1115 }); 1116 }, 1117 }), 1118 (u.App = a), 1119 c 1120 ); 1121 } 1122 var H = (function e() { 1123 var t = Y(G); 1124 return ( 1125 (t.INTERNAL = n(n({}, t.INTERNAL), { 1126 createFirebaseNamespace: e, 1127 extendNamespace: function (e) { 1128 h(t, e); 1129 }, 1130 createSubscribe: b, 1131 ErrorFactory: d, 1132 deepExtend: h, 1133 })), 1134 t 1135 ); 1136 })(), 1137 J = 1138 ((X.prototype.getPlatformInfoString = function () { 1139 return this.container 1140 .getProviders() 1141 .map(function (e) { 1142 if ( 1143 (function (e) { 1144 e = e.getComponent(); 1145 return "VERSION" === (null == e ? void 0 : e.type); 1146 })(e) 1147 ) { 1148 e = e.getImmediate(); 1149 return e.library + "/" + e.version; 1150 } 1151 return null; 1152 }) 1153 .filter(function (e) { 1154 return e; 1155 }) 1156 .join(" "); 1157 }), 1158 X); 1159 function X(e) { 1160 this.container = e; 1161 } 1162 "object" == typeof self && 1163 self.self === self && 1164 void 0 !== self.firebase && 1165 (W.warn( 1166 "\n Warning: Firebase is already defined in the global scope. Please make sure\n Firebase library is only loaded once.\n ", 1167 ), 1168 (z = self.firebase.SDK_VERSION) && 1169 0 <= z.indexOf("LITE") && 1170 W.warn( 1171 "\n Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n ", 1172 )); 1173 var Z = H.initializeApp; 1174 H.initializeApp = function () { 1175 for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; 1176 return ( 1177 (function () { 1178 try { 1179 return ( 1180 "[object process]" === 1181 Object.prototype.toString.call(global.process) 1182 ); 1183 } catch (e) { 1184 return; 1185 } 1186 })() && 1187 W.warn( 1188 '\n Warning: This is a browser-targeted Firebase bundle but it appears it is being\n run in a Node environment. If running in a Node environment, make sure you\n are using the bundle specified by the "main" field in package.json.\n \n If you are using Webpack, you can specify "main" as the first item in\n "resolve.mainFields":\n https://webpack.js.org/configuration/resolve/#resolvemainfields\n \n If using Rollup, use the @rollup/plugin-node-resolve plugin and specify "main"\n as the first item in "mainFields", e.g. [\'main\', \'module\'].\n https://github.com/rollup/@rollup/plugin-node-resolve\n ', 1189 ), 1190 Z.apply(void 0, e) 1191 ); 1192 }; 1193 var q, 1194 Q, 1195 ee = H; 1196 ((q = ee).INTERNAL.registerComponent( 1197 new E( 1198 "platform-logger", 1199 function (e) {
1200 return new J(e); 1201 }, 1202 "PRIVATE", 1203 ), 1204 ), 1205 q.registerVersion(B, "0.6.29", Q), 1206 q.registerVersion("fire-js", "")); 1207 return ( 1208 ee.registerVersion("firebase", "8.9.1", "app"), 1209 (ee.SDK_VERSION = "8.9.1"), 1210 ee 1211 ); 1212});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.