firebase 9.2.0-2021927221742 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -7
- package/app/dist/index.cjs.js +1 -1
- package/app/dist/index.esm.js +1 -1
- package/app/dist/index.mjs +1 -1
- package/compat/app/dist/index.cjs.js +1 -1
- package/compat/app/dist/index.esm.js +1 -1
- package/compat/app/dist/index.mjs +1 -1
- package/compat/dist/index.esm.js +2 -2
- package/compat/dist/index.node.cjs +2 -2
- package/compat/dist/index.rn.cjs.js +2 -2
- package/firebase-analytics.js +3 -3
- package/firebase-app-check.js +4 -4
- package/firebase-app-compat.js +2 -2
- package/firebase-app-compat.js.map +1 -1
- package/firebase-app.js +9 -9
- package/firebase-auth-compat.js +1 -1
- package/firebase-auth-compat.js.map +1 -1
- package/firebase-auth-cordova.js +2 -2
- package/firebase-auth-react-native.js +114 -114
- package/firebase-auth.js +3 -3
- package/firebase-compat.js +4 -4
- package/firebase-compat.js.map +1 -1
- package/firebase-database.js +4 -4
- package/firebase-firestore-compat.js +1 -1
- package/firebase-firestore-compat.js.map +1 -1
- package/firebase-firestore-lite.js +7 -7
- package/firebase-firestore-lite.js.map +1 -1
- package/firebase-firestore.js +8 -8
- package/firebase-firestore.js.map +1 -1
- package/firebase-functions.js +2 -2
- package/firebase-messaging-sw.js +1 -1
- package/firebase-messaging.js +1 -1
- package/firebase-performance-standalone-compat.es2017.js +5 -5
- package/firebase-performance-standalone-compat.es2017.js.map +1 -1
- package/firebase-performance-standalone-compat.js +1 -1
- package/firebase-performance-standalone-compat.js.map +1 -1
- package/firebase-performance.js +3 -3
- package/firebase-remote-config.js +2 -2
- package/firebase-storage-compat.js +1 -1
- package/firebase-storage-compat.js.map +1 -1
- package/firebase-storage.js +2 -2
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# firebase
|
|
2
2
|
|
|
3
|
-
## 9.2.0
|
|
3
|
+
## 9.2.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
- [`f0f6d74b5`](https://github.com/firebase/firebase-js-sdk/commit/f0f6d74b58312f7e577743e58abb030ffe38c295) [#5664](https://github.com/firebase/firebase-js-sdk/pull/5664) (fixes [#5644](https://github.com/firebase/firebase-js-sdk/issues/5644)) - Fix compatability layer errors that were being thrown in Safari
|
|
14
14
|
|
|
15
15
|
- Updated dependencies [[`4d3640481`](https://github.com/firebase/firebase-js-sdk/commit/4d36404812a7ca24ced5e1aabf6d8aa03de4e08a), [`b6f30c24f`](https://github.com/firebase/firebase-js-sdk/commit/b6f30c24fdf096ac4e8bdba32b9c1380903a7507), [`69ff8eb54`](https://github.com/firebase/firebase-js-sdk/commit/69ff8eb549e49de51cae11a04bce023bb6e1fc02), [`2429ac105`](https://github.com/firebase/firebase-js-sdk/commit/2429ac105b0aeb15eb8c362665448c209887bada), [`4594d3fd6`](https://github.com/firebase/firebase-js-sdk/commit/4594d3fd6c7f7680b877aa2017ba35084ef6af96), [`6dacc2400`](https://github.com/firebase/firebase-js-sdk/commit/6dacc2400fdcf4432ed1977ca1eb148da6db3fc5), [`f48527617`](https://github.com/firebase/firebase-js-sdk/commit/f485276173ac0f6fb212328d00334892f4b33a9a), [`c75bbe957`](https://github.com/firebase/firebase-js-sdk/commit/c75bbe9574133ce6d1487a601c7acb4204e417aa)]:
|
|
16
|
-
- @firebase/firestore@3.2.0
|
|
17
|
-
- @firebase/
|
|
18
|
-
- @firebase/auth@0.
|
|
19
|
-
- @firebase/
|
|
20
|
-
- @firebase/
|
|
21
|
-
- @firebase/
|
|
16
|
+
- @firebase/firestore@3.2.0
|
|
17
|
+
- @firebase/app@0.7.5
|
|
18
|
+
- @firebase/auth-compat@0.2.0
|
|
19
|
+
- @firebase/auth@0.19.0
|
|
20
|
+
- @firebase/firestore-compat@0.1.5
|
|
21
|
+
- @firebase/app-compat@0.1.6
|
|
22
22
|
|
|
23
23
|
## 9.1.3
|
|
24
24
|
|
package/app/dist/index.cjs.js
CHANGED
package/app/dist/index.esm.js
CHANGED
package/app/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
7
7
|
var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
|
|
8
8
|
|
|
9
9
|
var name = "firebase";
|
|
10
|
-
var version = "9.2.0
|
|
10
|
+
var version = "9.2.0";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
package/compat/dist/index.esm.js
CHANGED
|
@@ -12,7 +12,7 @@ import '@firebase/performance-compat';
|
|
|
12
12
|
import '@firebase/remote-config-compat';
|
|
13
13
|
|
|
14
14
|
var name$1 = "firebase";
|
|
15
|
-
var version$1 = "9.2.0
|
|
15
|
+
var version$1 = "9.2.0";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @license
|
|
@@ -33,7 +33,7 @@ var version$1 = "9.2.0-2021927221742";
|
|
|
33
33
|
firebase.registerVersion(name$1, version$1, 'app-compat');
|
|
34
34
|
|
|
35
35
|
var name = "firebase";
|
|
36
|
-
var version = "9.2.0
|
|
36
|
+
var version = "9.2.0";
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* @license
|
|
@@ -12,7 +12,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
|
|
13
13
|
|
|
14
14
|
var name$1 = "firebase";
|
|
15
|
-
var version$1 = "9.2.0
|
|
15
|
+
var version$1 = "9.2.0";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @license
|
|
@@ -33,7 +33,7 @@ var version$1 = "9.2.0-2021927221742";
|
|
|
33
33
|
firebase__default["default"].registerVersion(name$1, version$1, 'app-compat');
|
|
34
34
|
|
|
35
35
|
var name = "firebase";
|
|
36
|
-
var version = "9.2.0
|
|
36
|
+
var version = "9.2.0";
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* @license
|
|
@@ -10,7 +10,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
|
|
11
11
|
|
|
12
12
|
var name$1 = "firebase";
|
|
13
|
-
var version$1 = "9.2.0
|
|
13
|
+
var version$1 = "9.2.0";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @license
|
|
@@ -31,7 +31,7 @@ var version$1 = "9.2.0-2021927221742";
|
|
|
31
31
|
firebase__default["default"].registerVersion(name$1, version$1, 'app-compat');
|
|
32
32
|
|
|
33
33
|
var name = "firebase";
|
|
34
|
-
var version = "9.2.0
|
|
34
|
+
var version = "9.2.0";
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* @license
|
package/firebase-analytics.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { registerVersion, _registerComponent, _getProvider, getApp } from 'https://www.gstatic.com/firebasejs/9.2.0
|
|
1
|
+
import { registerVersion, _registerComponent, _getProvider, getApp } from 'https://www.gstatic.com/firebasejs/9.2.0/firebase-app.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
@@ -2700,7 +2700,7 @@ async function setAnalyticsCollectionEnabled$1(initializationPromise, enabled) {
|
|
|
2700
2700
|
*
|
|
2701
2701
|
* @public
|
|
2702
2702
|
*
|
|
2703
|
-
* @param app - The {@link https://www.gstatic.com/firebasejs/9.2.0
|
|
2703
|
+
* @param app - The {@link https://www.gstatic.com/firebasejs/9.2.0/firebase-app.js#FirebaseApp} to use.
|
|
2704
2704
|
*/
|
|
2705
2705
|
function getAnalytics(app = getApp()) {
|
|
2706
2706
|
app = getModularInstance(app);
|
|
@@ -2716,7 +2716,7 @@ function getAnalytics(app = getApp()) {
|
|
|
2716
2716
|
*
|
|
2717
2717
|
* @public
|
|
2718
2718
|
*
|
|
2719
|
-
* @param app - The {@link https://www.gstatic.com/firebasejs/9.2.0
|
|
2719
|
+
* @param app - The {@link https://www.gstatic.com/firebasejs/9.2.0/firebase-app.js#FirebaseApp} to use.
|
|
2720
2720
|
*/
|
|
2721
2721
|
function initializeAnalytics(app, options = {}) {
|
|
2722
2722
|
// Dependencies
|
package/firebase-app-check.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _getProvider, getApp, _registerComponent, registerVersion } from 'https://www.gstatic.com/firebasejs/9.2.0
|
|
1
|
+
import { _getProvider, getApp, _registerComponent, registerVersion } from 'https://www.gstatic.com/firebasejs/9.2.0/firebase-app.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
@@ -1272,7 +1272,7 @@ function computeKey(app) {
|
|
|
1272
1272
|
* See the License for the specific language governing permissions and
|
|
1273
1273
|
* limitations under the License.
|
|
1274
1274
|
*/
|
|
1275
|
-
const logger = new Logger('https://www.gstatic.com/firebasejs/9.2.0
|
|
1275
|
+
const logger = new Logger('https://www.gstatic.com/firebasejs/9.2.0/firebase-app.js-check');
|
|
1276
1276
|
|
|
1277
1277
|
/**
|
|
1278
1278
|
* @license
|
|
@@ -1679,7 +1679,7 @@ function internalFactory(appCheck) {
|
|
|
1679
1679
|
};
|
|
1680
1680
|
}
|
|
1681
1681
|
|
|
1682
|
-
const name = "https://www.gstatic.com/firebasejs/9.2.0
|
|
1682
|
+
const name = "https://www.gstatic.com/firebasejs/9.2.0/firebase-app.js-check";
|
|
1683
1683
|
const version = "0.4.2";
|
|
1684
1684
|
|
|
1685
1685
|
/**
|
|
@@ -1912,7 +1912,7 @@ class CustomProvider {
|
|
|
1912
1912
|
*/
|
|
1913
1913
|
/**
|
|
1914
1914
|
* Activate App Check for the given app. Can be called only once per app.
|
|
1915
|
-
* @param app - the {@link https://www.gstatic.com/firebasejs/9.2.0
|
|
1915
|
+
* @param app - the {@link https://www.gstatic.com/firebasejs/9.2.0/firebase-app.js#FirebaseApp} to activate App Check for
|
|
1916
1916
|
* @param options - App Check initialization options
|
|
1917
1917
|
* @public
|
|
1918
1918
|
*/
|
package/firebase-app-compat.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
!function(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(){"use strict";function c(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:const n=t;return new Date(n.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(const r in t)t.hasOwnProperty(r)&&"__proto__"!==r&&(e[r]=c(e[r],t[r]));return e}class i{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(n){return(e,t)=>{e?this.reject(e):this.resolve(t),"function"==typeof n&&(this.promise.catch(()=>{}),1===n.length?n(e):n(e,t))}}}class a extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,a.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,r.prototype.create)}}class r{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){var r,n=t[0]||{},i=`${this.service}/${e}`,o=this.errors[e],o=o?(r=n,o.replace(s,(e,t)=>{var n=r[t];return null!=n?String(n):`<${t}?>`})):"Error",o=`${this.serviceName}: ${o} (${i}).`;return new a(i,o,n)}}const s=/\{\$([^}]+)}/g;function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function p(e,t){if(e===t)return 1;const n=Object.keys(e),r=Object.keys(t);for(const a of n){if(!r.includes(a))return;var i=e[a],o=t[a];if(f(i)&&f(o)){if(!p(i,o))return}else if(i!==o)return}for(const s of r)if(!n.includes(s))return;return 1}function f(e){return null!==e&&"object"==typeof e}function n(e,t){const n=new o(e,t);return n.subscribe.bind(n)}class o{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(t){this.forEachObserver(e=>{e.next(t)})}error(t){this.forEachObserver(e=>{e.error(t)}),this.close(t)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,n){let r;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");r=function(e,t){if("object"!=typeof e||null===e)return!1;for(const n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===r.next&&(r.next=u),void 0===r.error&&(r.error=u),void 0===r.complete&&(r.complete=u);var i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(e){}}),this.observers.push(r),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],--this.observerCount,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let e=0;e<this.observers.length;e++)this.sendOne(e,t)}sendOne(e,t){this.task.then(()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function u(){}function e(e,a,s,c){return new(s=s||Promise)(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((c=c.apply(e,a||[])).next())})}function h(n,r){var i,o,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,o&&(a=2&t[0]?o.return:t[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,t[1])).done)return a;switch(o=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,o=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=r.call(n,s)}catch(e){t=[6,e],o=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}function d(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||((r=r||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var g=(t.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},t.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},t.prototype.setServiceProps=function(e){return this.serviceProps=e,this},t.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},t);function t(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}var b="[DEFAULT]",y=(I.prototype.get=function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new i;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{var r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise},I.prototype.getImmediate=function(e){var t=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),n=null!==(n=null==e?void 0:e.optional)&&void 0!==n&&n;if(!this.isInitialized(t)&&!this.shouldAutoInitialize()){if(n)return null;throw Error("Service "+this.name+" is not available")}try{return this.getOrInitializeService({instanceIdentifier:t})}catch(e){if(n)return null;throw e}},I.prototype.getComponent=function(){return this.component},I.prototype.setComponent=function(e){var t,n;if(e.name!==this.name)throw Error("Mismatching Component "+e.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");if(this.component=e,this.shouldAutoInitialize()){if("EAGER"===e.instantiationMode)try{this.getOrInitializeService({instanceIdentifier:b})}catch(e){}try{for(var r=d(this.instancesDeferred.entries()),i=r.next();!i.done;i=r.next()){var o=m(i.value,2),a=o[0],s=o[1],c=this.normalizeInstanceIdentifier(a);try{var l=this.getOrInitializeService({instanceIdentifier:c});s.resolve(l)}catch(e){}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}}},I.prototype.clearInstance=function(e){this.instancesDeferred.delete(e=void 0===e?b:e),this.instancesOptions.delete(e),this.instances.delete(e)},I.prototype.delete=function(){return e(this,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return t=Array.from(this.instances.values()),[4,Promise.all(v(v([],m(t.filter(function(e){return"INTERNAL"in e}).map(function(e){return e.INTERNAL.delete()}))),m(t.filter(function(e){return"_delete"in e}).map(function(e){return e._delete()}))))];case 1:return e.sent(),[2]}})})},I.prototype.isComponentSet=function(){return null!=this.component},I.prototype.isInitialized=function(e){return this.instances.has(e=void 0===e?b:e)},I.prototype.getOptions=function(e){return this.instancesOptions.get(e=void 0===e?b:e)||{}},I.prototype.initialize=function(e){var t,n,r=(e=void 0===e?{}:e).options,r=void 0===r?{}:r,i=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(i))throw Error(this.name+"("+i+") has already been initialized");if(!this.isComponentSet())throw Error("Component "+this.name+" has not been registered yet");var o=this.getOrInitializeService({instanceIdentifier:i,options:r});try{for(var a=d(this.instancesDeferred.entries()),s=a.next();!s.done;s=a.next()){var c=m(s.value,2),l=c[0],p=c[1];i===this.normalizeInstanceIdentifier(l)&&p.resolve(o)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o},I.prototype.onInit=function(e,t){var n=this.normalizeInstanceIdentifier(t),r=null!==(i=this.onInitCallbacks.get(n))&&void 0!==i?i:new Set;r.add(e),this.onInitCallbacks.set(n,r);var i=this.instances.get(n);return i&&e(i,n),function(){r.delete(e)}},I.prototype.invokeOnInitCallbacks=function(e,t){var n,r,i=this.onInitCallbacks.get(t);if(i)try{for(var o=d(i),a=o.next();!a.done;a=o.next()){var s=a.value;try{s(e,t)}catch(e){}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},I.prototype.getOrInitializeService=function(e){var t=e.instanceIdentifier,n=e.options,r=void 0===n?{}:n,n=this.instances.get(t);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(e=t)===b?void 0:e,options:r}),this.instances.set(t,n),this.instancesOptions.set(t,r),this.invokeOnInitCallbacks(n,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,n)}catch(e){}return n||null},I.prototype.normalizeInstanceIdentifier=function(e){return void 0===e&&(e=b),!this.component||this.component.multipleInstances?e:b},I.prototype.shouldAutoInitialize=function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode},I);function I(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}var w,E,_=(O.prototype.addComponent=function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component "+e.name+" has already been registered with "+this.name);t.setComponent(e)},O.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},O.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new y(e,this);return this.providers.set(e,t),t},O.prototype.getProviders=function(){return Array.from(this.providers.values())},O);function O(e){this.name=e,this.providers=new Map}const C=[];(E=w=w||{})[E.DEBUG=0]="DEBUG",E[E.VERBOSE=1]="VERBOSE",E[E.INFO=2]="INFO",E[E.WARN=3]="WARN",E[E.ERROR=4]="ERROR",E[E.SILENT=5]="SILENT";const N={debug:w.DEBUG,verbose:w.VERBOSE,info:w.INFO,warn:w.WARN,error:w.ERROR,silent:w.SILENT},L=w.INFO,A={[w.DEBUG]:"log",[w.VERBOSE]:"log",[w.INFO]:"info",[w.WARN]:"warn",[w.ERROR]:"error"},S=(e,t,...n)=>{if(!(t<e.logLevel)){var r=(new Date).toISOString(),i=A[t];if(!i)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[i](`[${r}] ${e.name}:`,...n)}};class D{constructor(e){this.name=e,this._logLevel=L,this._logHandler=S,this._userLogHandler=null,C.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in w))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?N[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,w.DEBUG,...e),this._logHandler(this,w.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,w.VERBOSE,...e),this._logHandler(this,w.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,w.INFO,...e),this._logHandler(this,w.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,w.WARN,...e),this._logHandler(this,w.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,w.ERROR,...e),this._logHandler(this,w.ERROR,...e)}}class R{constructor(e){this.container=e}getPlatformInfoString(){const e=this.container.getProviders();return e.map(e=>{if("VERSION"!==(null==(t=e.getComponent())?void 0:t.type))return null;var t,t=e.getImmediate();return`${t.library}/${t.version}`}).filter(e=>e).join(" ")}}const k="@firebase/app",P="0.7.4",z=new D("@firebase/app");var F;const j="[DEFAULT]",$={"@firebase/app":"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},T=new Map,H=new Map;function x(t,n){try{t.container.addComponent(n)}catch(e){z.debug(`Component ${n.name} failed to register with FirebaseApp ${t.name}`,e)}}function M(e,t){e.container.addOrOverwriteComponent(t)}function B(e){var t=e.name;if(H.has(t))return z.debug(`There were multiple attempts to register component ${t}.`),!1;H.set(t,e);for(const n of T.values())x(n,e);return!0}function V(e,t){return e.container.getProvider(t)}const U=new r("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function."});class G{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new g("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw U.create("app-deleted",{appName:this._name})}}const W="9.2.0-2021927221742";function Y(e,t={}){if("object"!=typeof t){const r=t;t={name:r}}var n=Object.assign({name:j,automaticDataCollectionEnabled:!1},t);const r=n.name;if("string"!=typeof r||!r)throw U.create("bad-app-name",{appName:String(r)});var i=T.get(r);if(i){if(p(e,i.options)&&p(n,i.config))return i;throw U.create("duplicate-app",{appName:r})}const o=new _(r);for(const a of H.values())o.addComponent(a);n=new G(e,n,o);return T.set(r,n),n}async function K(e){var t=e.name;T.has(t)&&(T.delete(t),await Promise.all(e.container.getProviders().map(e=>e.delete())),e.isDeleted=!0)}function J(e,t,n){let r=null!==(o=$[e])&&void 0!==o?o:e;n&&(r+=`-${n}`);var i=r.match(/\s|\//),o=t.match(/\s|\//);if(i||o){const a=[`Unable to register library "${r}" with version "${t}":`];return i&&a.push(`library name "${r}" contains illegal characters (whitespace or "/")`),i&&o&&a.push("and"),o&&a.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void z.warn(a.join(" "))}B(new g(`${r}-version`,()=>({library:r,version:t}),"VERSION"))}function X(e,t){if(null!==e&&"function"!=typeof e)throw U.create("invalid-log-argument");!function(o,e){for(const t of C){let i=null;e&&e.level&&(i=N[e.level]),t.userLogHandler=null===o?null:(e,t,...n)=>{var r=n.map(e=>{if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}}).filter(e=>e).join(" ");t>=(null!==i&&void 0!==i?i:e.logLevel)&&o({level:w[t].toLowerCase(),message:r,args:n,type:e.name})}}}(e,t)}function Z(e){var t;t=e,C.forEach(e=>{e.setLogLevel(t)})}F="",B(new g("platform-logger",e=>new R(e),"PRIVATE")),J(k,P,F),J(k,P,"esm2017"),J("fire-js","");var q=Object.freeze({__proto__:null,SDK_VERSION:W,_DEFAULT_ENTRY_NAME:j,_addComponent:x,_addOrOverwriteComponent:M,_apps:T,_clearComponents:function(){H.clear()},_components:H,_getProvider:V,_registerComponent:B,_removeServiceInstance:function(e,t,n=j){V(e,t).clearInstance(n)},deleteApp:K,getApp:function(e=j){var t=T.get(e);if(!t)throw U.create("no-app",{appName:e});return t},getApps:function(){return Array.from(T.values())},initializeApp:Y,onLog:X,registerVersion:J,setLogLevel:Z,FirebaseError:a});class Q{constructor(e,t){this._delegate=e,this.firebase=t,x(e,new g("app-compat",()=>this,"PUBLIC")),this.container=e.container}get automaticDataCollectionEnabled(){return this._delegate.automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this._delegate.automaticDataCollectionEnabled=e}get name(){return this._delegate.name}get options(){return this._delegate.options}delete(){return new Promise(e=>{this._delegate.checkDestroyed(),e()}).then(()=>(this.firebase.INTERNAL.removeApp(this.name),K(this._delegate)))}_getService(e,t=j){var n;this._delegate.checkDestroyed();const r=this._delegate.container.getProvider(e);return r.isInitialized()||"EXPLICIT"!==(null===(n=r.getComponent())||void 0===n?void 0:n.instantiationMode)||r.initialize(),r.getImmediate({identifier:t})}_removeServiceInstance(e,t=j){this._delegate.container.getProvider(e).clearInstance(t)}_addComponent(e){x(this._delegate,e)}_addOrOverwriteComponent(e){M(this._delegate,e)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}}const ee=new r("app-compat","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance."});function te(i){const o={},a={__esModule:!0,initializeApp:function(e,t={}){var n=Y(e,t);if(l(o,n.name))return o[n.name];var r=new i(n,a);return o[n.name]=r},app:s,registerVersion:J,setLogLevel:Z,onLog:X,apps:null,SDK_VERSION:W,INTERNAL:{registerComponent:function(n){const r=n.name,t=r.replace("-compat","");{var e;B(n)&&"PUBLIC"===n.type&&(e=(e=s())=>{if("function"!=typeof e[t])throw ee.create("invalid-app-argument",{appName:r});return e[t]()},void 0!==n.serviceProps&&c(e,n.serviceProps),a[t]=e,i.prototype[t]=function(...e){const t=this._getService.bind(this,r);return t.apply(this,n.multipleInstances?e:[])})}return"PUBLIC"===n.type?a[t]:null},removeApp:function(e){delete o[e]},useAsService:function(e,t){if("serverAuth"===t)return null;var n=t;return n},modularAPIs:q}};function s(e){if(e=e||j,!l(o,e))throw ee.create("no-app",{appName:e});return o[e]}return a.default=a,Object.defineProperty(a,"apps",{get:function(){return Object.keys(o).map(e=>o[e])}}),s.App=i,a}var ne=function e(){const t=te(Q);return t.INTERNAL=Object.assign(Object.assign({},t.INTERNAL),{createFirebaseNamespace:e,extendNamespace:function(e){c(t,e)},createSubscribe:n,ErrorFactory:r,deepExtend:c}),t}();const re=new D("@firebase/app-compat");if("object"==typeof self&&self.self===self&&void 0!==self.firebase){re.warn(`
|
|
1
|
+
!function(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(){"use strict";function c(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:const n=t;return new Date(n.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(const r in t)t.hasOwnProperty(r)&&"__proto__"!==r&&(e[r]=c(e[r],t[r]));return e}class i{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(n){return(e,t)=>{e?this.reject(e):this.resolve(t),"function"==typeof n&&(this.promise.catch(()=>{}),1===n.length?n(e):n(e,t))}}}class a extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,a.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,r.prototype.create)}}class r{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){var r,n=t[0]||{},i=`${this.service}/${e}`,o=this.errors[e],o=o?(r=n,o.replace(s,(e,t)=>{var n=r[t];return null!=n?String(n):`<${t}?>`})):"Error",o=`${this.serviceName}: ${o} (${i}).`;return new a(i,o,n)}}const s=/\{\$([^}]+)}/g;function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function p(e,t){if(e===t)return 1;const n=Object.keys(e),r=Object.keys(t);for(const a of n){if(!r.includes(a))return;var i=e[a],o=t[a];if(f(i)&&f(o)){if(!p(i,o))return}else if(i!==o)return}for(const s of r)if(!n.includes(s))return;return 1}function f(e){return null!==e&&"object"==typeof e}function n(e,t){const n=new o(e,t);return n.subscribe.bind(n)}class o{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(t){this.forEachObserver(e=>{e.next(t)})}error(t){this.forEachObserver(e=>{e.error(t)}),this.close(t)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,n){let r;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");r=function(e,t){if("object"!=typeof e||null===e)return!1;for(const n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===r.next&&(r.next=u),void 0===r.error&&(r.error=u),void 0===r.complete&&(r.complete=u);var i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(e){}}),this.observers.push(r),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],--this.observerCount,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let e=0;e<this.observers.length;e++)this.sendOne(e,t)}sendOne(e,t){this.task.then(()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function u(){}function e(e,a,s,c){return new(s=s||Promise)(function(n,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((c=c.apply(e,a||[])).next())})}function h(n,r){var i,o,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,o&&(a=2&t[0]?o.return:t[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,t[1])).done)return a;switch(o=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,o=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=r.call(n,s)}catch(e){t=[6,e],o=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}function d(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function v(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||((r=r||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var g=(t.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},t.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},t.prototype.setServiceProps=function(e){return this.serviceProps=e,this},t.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},t);function t(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}var b="[DEFAULT]",y=(I.prototype.get=function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new i;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{var r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise},I.prototype.getImmediate=function(e){var t=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),n=null!==(n=null==e?void 0:e.optional)&&void 0!==n&&n;if(!this.isInitialized(t)&&!this.shouldAutoInitialize()){if(n)return null;throw Error("Service "+this.name+" is not available")}try{return this.getOrInitializeService({instanceIdentifier:t})}catch(e){if(n)return null;throw e}},I.prototype.getComponent=function(){return this.component},I.prototype.setComponent=function(e){var t,n;if(e.name!==this.name)throw Error("Mismatching Component "+e.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");if(this.component=e,this.shouldAutoInitialize()){if("EAGER"===e.instantiationMode)try{this.getOrInitializeService({instanceIdentifier:b})}catch(e){}try{for(var r=d(this.instancesDeferred.entries()),i=r.next();!i.done;i=r.next()){var o=m(i.value,2),a=o[0],s=o[1],c=this.normalizeInstanceIdentifier(a);try{var l=this.getOrInitializeService({instanceIdentifier:c});s.resolve(l)}catch(e){}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}}},I.prototype.clearInstance=function(e){this.instancesDeferred.delete(e=void 0===e?b:e),this.instancesOptions.delete(e),this.instances.delete(e)},I.prototype.delete=function(){return e(this,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return t=Array.from(this.instances.values()),[4,Promise.all(v(v([],m(t.filter(function(e){return"INTERNAL"in e}).map(function(e){return e.INTERNAL.delete()}))),m(t.filter(function(e){return"_delete"in e}).map(function(e){return e._delete()}))))];case 1:return e.sent(),[2]}})})},I.prototype.isComponentSet=function(){return null!=this.component},I.prototype.isInitialized=function(e){return this.instances.has(e=void 0===e?b:e)},I.prototype.getOptions=function(e){return this.instancesOptions.get(e=void 0===e?b:e)||{}},I.prototype.initialize=function(e){var t,n,r=(e=void 0===e?{}:e).options,r=void 0===r?{}:r,i=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(i))throw Error(this.name+"("+i+") has already been initialized");if(!this.isComponentSet())throw Error("Component "+this.name+" has not been registered yet");var o=this.getOrInitializeService({instanceIdentifier:i,options:r});try{for(var a=d(this.instancesDeferred.entries()),s=a.next();!s.done;s=a.next()){var c=m(s.value,2),l=c[0],p=c[1];i===this.normalizeInstanceIdentifier(l)&&p.resolve(o)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o},I.prototype.onInit=function(e,t){var n=this.normalizeInstanceIdentifier(t),r=null!==(i=this.onInitCallbacks.get(n))&&void 0!==i?i:new Set;r.add(e),this.onInitCallbacks.set(n,r);var i=this.instances.get(n);return i&&e(i,n),function(){r.delete(e)}},I.prototype.invokeOnInitCallbacks=function(e,t){var n,r,i=this.onInitCallbacks.get(t);if(i)try{for(var o=d(i),a=o.next();!a.done;a=o.next()){var s=a.value;try{s(e,t)}catch(e){}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},I.prototype.getOrInitializeService=function(e){var t=e.instanceIdentifier,n=e.options,r=void 0===n?{}:n,n=this.instances.get(t);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(e=t)===b?void 0:e,options:r}),this.instances.set(t,n),this.instancesOptions.set(t,r),this.invokeOnInitCallbacks(n,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,n)}catch(e){}return n||null},I.prototype.normalizeInstanceIdentifier=function(e){return void 0===e&&(e=b),!this.component||this.component.multipleInstances?e:b},I.prototype.shouldAutoInitialize=function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode},I);function I(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}var w,E,_=(O.prototype.addComponent=function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component "+e.name+" has already been registered with "+this.name);t.setComponent(e)},O.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},O.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new y(e,this);return this.providers.set(e,t),t},O.prototype.getProviders=function(){return Array.from(this.providers.values())},O);function O(e){this.name=e,this.providers=new Map}const C=[];(E=w=w||{})[E.DEBUG=0]="DEBUG",E[E.VERBOSE=1]="VERBOSE",E[E.INFO=2]="INFO",E[E.WARN=3]="WARN",E[E.ERROR=4]="ERROR",E[E.SILENT=5]="SILENT";const N={debug:w.DEBUG,verbose:w.VERBOSE,info:w.INFO,warn:w.WARN,error:w.ERROR,silent:w.SILENT},L=w.INFO,A={[w.DEBUG]:"log",[w.VERBOSE]:"log",[w.INFO]:"info",[w.WARN]:"warn",[w.ERROR]:"error"},S=(e,t,...n)=>{if(!(t<e.logLevel)){var r=(new Date).toISOString(),i=A[t];if(!i)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[i](`[${r}] ${e.name}:`,...n)}};class D{constructor(e){this.name=e,this._logLevel=L,this._logHandler=S,this._userLogHandler=null,C.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in w))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?N[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,w.DEBUG,...e),this._logHandler(this,w.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,w.VERBOSE,...e),this._logHandler(this,w.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,w.INFO,...e),this._logHandler(this,w.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,w.WARN,...e),this._logHandler(this,w.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,w.ERROR,...e),this._logHandler(this,w.ERROR,...e)}}class R{constructor(e){this.container=e}getPlatformInfoString(){const e=this.container.getProviders();return e.map(e=>{if("VERSION"!==(null==(t=e.getComponent())?void 0:t.type))return null;var t,t=e.getImmediate();return`${t.library}/${t.version}`}).filter(e=>e).join(" ")}}const k="@firebase/app",P="0.7.5",z=new D("@firebase/app");var F;const j="[DEFAULT]",$={"@firebase/app":"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},T=new Map,H=new Map;function x(t,n){try{t.container.addComponent(n)}catch(e){z.debug(`Component ${n.name} failed to register with FirebaseApp ${t.name}`,e)}}function M(e,t){e.container.addOrOverwriteComponent(t)}function B(e){var t=e.name;if(H.has(t))return z.debug(`There were multiple attempts to register component ${t}.`),!1;H.set(t,e);for(const n of T.values())x(n,e);return!0}function V(e,t){return e.container.getProvider(t)}const U=new r("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function."});class G{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new g("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw U.create("app-deleted",{appName:this._name})}}const W="9.2.0";function Y(e,t={}){if("object"!=typeof t){const r=t;t={name:r}}var n=Object.assign({name:j,automaticDataCollectionEnabled:!1},t);const r=n.name;if("string"!=typeof r||!r)throw U.create("bad-app-name",{appName:String(r)});var i=T.get(r);if(i){if(p(e,i.options)&&p(n,i.config))return i;throw U.create("duplicate-app",{appName:r})}const o=new _(r);for(const a of H.values())o.addComponent(a);n=new G(e,n,o);return T.set(r,n),n}async function K(e){var t=e.name;T.has(t)&&(T.delete(t),await Promise.all(e.container.getProviders().map(e=>e.delete())),e.isDeleted=!0)}function J(e,t,n){let r=null!==(o=$[e])&&void 0!==o?o:e;n&&(r+=`-${n}`);var i=r.match(/\s|\//),o=t.match(/\s|\//);if(i||o){const a=[`Unable to register library "${r}" with version "${t}":`];return i&&a.push(`library name "${r}" contains illegal characters (whitespace or "/")`),i&&o&&a.push("and"),o&&a.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void z.warn(a.join(" "))}B(new g(`${r}-version`,()=>({library:r,version:t}),"VERSION"))}function X(e,t){if(null!==e&&"function"!=typeof e)throw U.create("invalid-log-argument");!function(o,e){for(const t of C){let i=null;e&&e.level&&(i=N[e.level]),t.userLogHandler=null===o?null:(e,t,...n)=>{var r=n.map(e=>{if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}}).filter(e=>e).join(" ");t>=(null!==i&&void 0!==i?i:e.logLevel)&&o({level:w[t].toLowerCase(),message:r,args:n,type:e.name})}}}(e,t)}function Z(e){var t;t=e,C.forEach(e=>{e.setLogLevel(t)})}F="",B(new g("platform-logger",e=>new R(e),"PRIVATE")),J(k,P,F),J(k,P,"esm2017"),J("fire-js","");var q=Object.freeze({__proto__:null,SDK_VERSION:W,_DEFAULT_ENTRY_NAME:j,_addComponent:x,_addOrOverwriteComponent:M,_apps:T,_clearComponents:function(){H.clear()},_components:H,_getProvider:V,_registerComponent:B,_removeServiceInstance:function(e,t,n=j){V(e,t).clearInstance(n)},deleteApp:K,getApp:function(e=j){var t=T.get(e);if(!t)throw U.create("no-app",{appName:e});return t},getApps:function(){return Array.from(T.values())},initializeApp:Y,onLog:X,registerVersion:J,setLogLevel:Z,FirebaseError:a});class Q{constructor(e,t){this._delegate=e,this.firebase=t,x(e,new g("app-compat",()=>this,"PUBLIC")),this.container=e.container}get automaticDataCollectionEnabled(){return this._delegate.automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this._delegate.automaticDataCollectionEnabled=e}get name(){return this._delegate.name}get options(){return this._delegate.options}delete(){return new Promise(e=>{this._delegate.checkDestroyed(),e()}).then(()=>(this.firebase.INTERNAL.removeApp(this.name),K(this._delegate)))}_getService(e,t=j){var n;this._delegate.checkDestroyed();const r=this._delegate.container.getProvider(e);return r.isInitialized()||"EXPLICIT"!==(null===(n=r.getComponent())||void 0===n?void 0:n.instantiationMode)||r.initialize(),r.getImmediate({identifier:t})}_removeServiceInstance(e,t=j){this._delegate.container.getProvider(e).clearInstance(t)}_addComponent(e){x(this._delegate,e)}_addOrOverwriteComponent(e){M(this._delegate,e)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}}const ee=new r("app-compat","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance."});function te(i){const o={},a={__esModule:!0,initializeApp:function(e,t={}){var n=Y(e,t);if(l(o,n.name))return o[n.name];var r=new i(n,a);return o[n.name]=r},app:s,registerVersion:J,setLogLevel:Z,onLog:X,apps:null,SDK_VERSION:W,INTERNAL:{registerComponent:function(n){const r=n.name,t=r.replace("-compat","");{var e;B(n)&&"PUBLIC"===n.type&&(e=(e=s())=>{if("function"!=typeof e[t])throw ee.create("invalid-app-argument",{appName:r});return e[t]()},void 0!==n.serviceProps&&c(e,n.serviceProps),a[t]=e,i.prototype[t]=function(...e){const t=this._getService.bind(this,r);return t.apply(this,n.multipleInstances?e:[])})}return"PUBLIC"===n.type?a[t]:null},removeApp:function(e){delete o[e]},useAsService:function(e,t){if("serverAuth"===t)return null;var n=t;return n},modularAPIs:q}};function s(e){if(e=e||j,!l(o,e))throw ee.create("no-app",{appName:e});return o[e]}return a.default=a,Object.defineProperty(a,"apps",{get:function(){return Object.keys(o).map(e=>o[e])}}),s.App=i,a}var ne=function e(){const t=te(Q);return t.INTERNAL=Object.assign(Object.assign({},t.INTERNAL),{createFirebaseNamespace:e,extendNamespace:function(e){c(t,e)},createSubscribe:n,ErrorFactory:r,deepExtend:c}),t}();const re=new D("@firebase/app-compat");if("object"==typeof self&&self.self===self&&void 0!==self.firebase){re.warn(`
|
|
2
2
|
Warning: Firebase is already defined in the global scope. Please make sure
|
|
3
3
|
Firebase library is only loaded once.
|
|
4
4
|
`);const oe=self.firebase.SDK_VERSION;oe&&0<=oe.indexOf("LITE")&&re.warn(`
|
|
5
5
|
Warning: You are trying to load Firebase while using Firebase Performance standalone script.
|
|
6
6
|
You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.
|
|
7
|
-
`)}const ie=ne;J("@firebase/app-compat","0.1.
|
|
7
|
+
`)}const ie=ne;J("@firebase/app-compat","0.1.6",void 0);return ie.registerVersion("firebase","9.2.0","app-compat-cdn"),ie});
|
|
8
8
|
//# sourceMappingURL=firebase-app-compat.js.map
|