((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).firebase=t()})(this,function(){var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}))(e,t)},o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;rs[0]&&t[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||0"})):"Error",e=this.serviceName+": "+e+" ("+i+").";return new H(i,e,o)};var c=u;function u(e,t,r){this.service=e,this.serviceName=t,this.errors=r}var z=/\{\$([^}]+)}/g;function v(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function V(e,t){t=new B(e,t);return t.subscribe.bind(t)}f.prototype.next=function(t){this.forEachObserver(function(e){e.next(t)})},f.prototype.error=function(t){this.forEachObserver(function(e){e.error(t)}),this.close(t)},f.prototype.complete=function(){this.forEachObserver(function(e){e.complete()}),this.close()},f.prototype.subscribe=function(e,t,r){var n,o=this;if(void 0===e&&void 0===t&&void 0===r)throw new Error("Missing Observer.");void 0===(n=((e,t)=>{if("object"==typeof e&&null!==e)for(var r=0,n=t;r{var i=null;r&&r.level&&(i=N[r.level]),e.userLogHandler=null===a?null:function(e,t){for(var r=[],n=2;n=(null!=i?i:e.logLevel)&&a({level:_[t].toLowerCase(),message:o,args:r,type:e.name})}})(o[n])},apps:null,SDK_VERSION:J,INTERNAL:{registerComponent:i,removeApp:function(e){delete c[e]},components:p,useAsService:function(e,t){return"serverAuth"===t?null:t}}};function f(e){if(v(c,e=e||P))return c[e];throw R.create("no-app",{appName:e})}function i(r){var e,t,n,o=r.name;if(p.has(o))j.debug("There were multiple attempts to register component "+o+".");else{p.set(o,r),"PUBLIC"===r.type&&(n=function(e){if(void 0===e&&(e=f()),"function"!=typeof e[o])throw R.create("invalid-app-argument",{appName:o});return e[o]()},void 0!==r.serviceProps&&d(n,r.serviceProps),u[o]=n,l.prototype[o]=function(){for(var e=[],t=0;t{e=e.getComponent();return"VERSION"===(null==e?void 0:e.type)})(e))return e=e.getImmediate(),e.library+"/"+e.version;return null}).filter(function(e){return e}).join(" ")},T);function T(e){this.container=e}"object"==typeof self&&self.self===self&&void 0!==self.firebase&&(j.warn("\n Warning: Firebase is already defined in the global scope. Please make sure\n Firebase library is only loaded once.\n "),L=self.firebase.SDK_VERSION)&&0<=L.indexOf("LITE")&&j.warn("\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 ");var Q=F.initializeApp;F.initializeApp=function(){for(var e=[],t=0;t{try{return"[object process]"===Object.prototype.toString.call(global.process)}catch(e){}})()&&j.warn('\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 '),Q.apply(void 0,e)};var X,L=F;(F=L).INTERNAL.registerComponent(new y("platform-logger",function(e){return new q(e)},"PRIVATE")),F.registerVersion(A,"0.6.13",X),F.registerVersion("fire-js","");return L.registerVersion("firebase","8.0.1","app"),L});