firebase 9.0.2-canary.f5b5efe95 → 9.0.2-canary.ff9baf70c

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.
Files changed (45) hide show
  1. package/app/dist/index.cjs.js +1 -1
  2. package/app/dist/index.esm.js +1 -1
  3. package/app/dist/index.mjs +1 -1
  4. package/compat/app/dist/index.cjs.js +1 -1
  5. package/compat/app/dist/index.esm.js +1 -1
  6. package/compat/app/dist/index.mjs +1 -1
  7. package/compat/dist/index.esm.js +2 -2
  8. package/compat/dist/index.node.cjs +2 -2
  9. package/compat/dist/index.rn.cjs.js +2 -2
  10. package/firebase-analytics-compat.js +1 -1
  11. package/firebase-analytics.js +5 -5
  12. package/firebase-app-check-compat.js +1 -1
  13. package/firebase-app-check.js +5 -5
  14. package/firebase-app-compat.js +2 -2
  15. package/firebase-app.js +9 -9
  16. package/firebase-auth-compat.js +1 -1
  17. package/firebase-auth-compat.js.map +1 -1
  18. package/firebase-auth-cordova.js +4 -3
  19. package/firebase-auth-cordova.js.map +1 -1
  20. package/firebase-auth-react-native.js +105 -104
  21. package/firebase-auth-react-native.js.map +1 -1
  22. package/firebase-auth.js +10 -5
  23. package/firebase-auth.js.map +1 -1
  24. package/firebase-compat.js +3 -3
  25. package/firebase-compat.js.map +1 -1
  26. package/firebase-database-compat.js +1 -1
  27. package/firebase-database-compat.js.map +1 -1
  28. package/firebase-database.js +5 -5
  29. package/firebase-firestore-compat.js +1 -1
  30. package/firebase-firestore-lite.js +7 -7
  31. package/firebase-firestore.js +7 -7
  32. package/firebase-functions-compat.js +1 -1
  33. package/firebase-functions.js +3 -3
  34. package/firebase-messaging-compat.js +1 -1
  35. package/firebase-messaging-sw.js +2 -2
  36. package/firebase-messaging.js +2 -2
  37. package/firebase-performance-compat.js +1 -1
  38. package/firebase-performance-standalone-compat.es2017.js +7 -7
  39. package/firebase-performance-standalone-compat.js +1 -1
  40. package/firebase-performance.js +5 -5
  41. package/firebase-remote-config-compat.js +1 -1
  42. package/firebase-remote-config.js +4 -4
  43. package/firebase-storage-compat.js +1 -1
  44. package/firebase-storage.js +2 -2
  45. package/package.json +26 -26
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var app = require('@firebase/app');
6
6
 
7
7
  var name = "firebase";
8
- var version = "9.0.2-canary.f5b5efe95";
8
+ var version = "9.0.2-canary.ff9baf70c";
9
9
 
10
10
  /**
11
11
  * @license
@@ -2,7 +2,7 @@ import { registerVersion } from '@firebase/app';
2
2
  export * from '@firebase/app';
3
3
 
4
4
  var name = "firebase";
5
- var version = "9.0.2-canary.f5b5efe95";
5
+ var version = "9.0.2-canary.ff9baf70c";
6
6
 
7
7
  /**
8
8
  * @license
@@ -2,7 +2,7 @@ import { registerVersion } from '@firebase/app';
2
2
  export * from '@firebase/app';
3
3
 
4
4
  var name = "firebase";
5
- var version = "9.0.2-canary.f5b5efe95";
5
+ var version = "9.0.2-canary.ff9baf70c";
6
6
 
7
7
  /**
8
8
  * @license
@@ -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.0.2-canary.f5b5efe95";
10
+ var version = "9.0.2-canary.ff9baf70c";
11
11
 
12
12
  /**
13
13
  * @license
@@ -2,7 +2,7 @@ import firebase from '@firebase/app-compat';
2
2
  export { default } from '@firebase/app-compat';
3
3
 
4
4
  var name = "firebase";
5
- var version = "9.0.2-canary.f5b5efe95";
5
+ var version = "9.0.2-canary.ff9baf70c";
6
6
 
7
7
  /**
8
8
  * @license
@@ -2,7 +2,7 @@ import firebase from '@firebase/app-compat';
2
2
  export { default } from '@firebase/app-compat';
3
3
 
4
4
  var name = "firebase";
5
- var version = "9.0.2-canary.f5b5efe95";
5
+ var version = "9.0.2-canary.ff9baf70c";
6
6
 
7
7
  /**
8
8
  * @license
@@ -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.0.2-canary.f5b5efe95";
15
+ var version$1 = "9.0.2-canary.ff9baf70c";
16
16
 
17
17
  /**
18
18
  * @license
@@ -33,7 +33,7 @@ var version$1 = "9.0.2-canary.f5b5efe95";
33
33
  firebase.registerVersion(name$1, version$1, 'app-compat');
34
34
 
35
35
  var name = "firebase";
36
- var version = "9.0.2-canary.f5b5efe95";
36
+ var version = "9.0.2-canary.ff9baf70c";
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.0.2-canary.f5b5efe95";
15
+ var version$1 = "9.0.2-canary.ff9baf70c";
16
16
 
17
17
  /**
18
18
  * @license
@@ -33,7 +33,7 @@ var version$1 = "9.0.2-canary.f5b5efe95";
33
33
  firebase__default['default'].registerVersion(name$1, version$1, 'app-compat');
34
34
 
35
35
  var name = "firebase";
36
- var version = "9.0.2-canary.f5b5efe95";
36
+ var version = "9.0.2-canary.ff9baf70c";
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.0.2-canary.f5b5efe95";
13
+ var version$1 = "9.0.2-canary.ff9baf70c";
14
14
 
15
15
  /**
16
16
  * @license
@@ -31,7 +31,7 @@ var version$1 = "9.0.2-canary.f5b5efe95";
31
31
  firebase__default['default'].registerVersion(name$1, version$1, 'app-compat');
32
32
 
33
33
  var name = "firebase";
34
- var version = "9.0.2-canary.f5b5efe95";
34
+ var version = "9.0.2-canary.ff9baf70c";
35
35
 
36
36
  /**
37
37
  * @license
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("@firebase/app-compat"),require("@firebase/app")):"function"==typeof define&&define.amd?define(["@firebase/app-compat","@firebase/app"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).firebase,e.firebase.INTERNAL.modularAPIs)}(this,function(ft,dt){"use strict";try{!function(){function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n,t=e(ft),r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function o(e,t,n){if(n||2===arguments.length)for(var r,a=0,i=t.length;a<i;a++)!r&&a in t||((r=r||Array.prototype.slice.call(t,0,a))[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}(u=n=n||{})[u.DEBUG=0]="DEBUG",u[u.VERBOSE=1]="VERBOSE",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.SILENT=5]="SILENT";function a(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!(t<e.logLevel)){var a=(new Date).toISOString(),i=c[t];if(!i)throw new Error("Attempted to log a message with an invalid logType (value: "+t+")");console[i].apply(console,o(["["+a+"] "+e.name+":"],n))}}var i={debug:n.DEBUG,verbose:n.VERBOSE,info:n.INFO,warn:n.WARN,error:n.ERROR,silent:n.SILENT},s=n.INFO,c=((H={})[n.DEBUG]="log",H[n.VERBOSE]="log",H[n.INFO]="info",H[n.WARN]="warn",H[n.ERROR]="error",H),u=(Object.defineProperty(l.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in n))throw new TypeError('Invalid value "'+e+'" assigned to `logLevel`');this._logLevel=e},enumerable:!1,configurable:!0}),l.prototype.setLogLevel=function(e){this._logLevel="string"==typeof e?i[e]:e},Object.defineProperty(l.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e},enumerable:!1,configurable:!0}),l.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,o([this,n.DEBUG],e)),this._logHandler.apply(this,o([this,n.DEBUG],e))},l.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,o([this,n.VERBOSE],e)),this._logHandler.apply(this,o([this,n.VERBOSE],e))},l.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,o([this,n.INFO],e)),this._logHandler.apply(this,o([this,n.INFO],e))},l.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,o([this,n.WARN],e)),this._logHandler.apply(this,o([this,n.WARN],e))},l.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,o([this,n.ERROR],e)),this._logHandler.apply(this,o([this,n.ERROR],e))},l);function l(e){this.name=e,this._logLevel=s,this._logHandler=a,this._userLogHandler=null}function p(){var e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function f(){return"indexedDB"in self&&null!=indexedDB}function d(){return new Promise(function(e,t){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",a=self.indexedDB.open(r);a.onsuccess=function(){a.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},a.onupgradeneeded=function(){n=!1},a.onerror=function(){var e;t((null===(e=a.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}})}function h(){return!(!navigator||!navigator.cookieEnabled)}var g,m=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(y,g=Error),y);function y(e,t,n){t=g.call(this,t)||this;return t.code=e,t.customData=n,t.name="FirebaseError",Object.setPrototypeOf(t,y.prototype),Error.captureStackTrace&&Error.captureStackTrace(t,w.prototype.create),t}var w=(v.prototype.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,a=t[0]||{},i=this.service+"/"+e,e=this.errors[e],e=e?(r=a,e.replace(I,function(e,t){var n=r[t];return null!=n?String(n):"<"+t+"?>"})):"Error",e=this.serviceName+": "+e+" ("+i+").";return new m(i,e,a)},v);function v(e,t,n){this.service=e,this.serviceName=t,this.errors=n}var I=/\{\$([^}]+)}/g,b=1e3,_=2,E=144e5,T=.5;function S(e,t,n){void 0===n&&(n=_);n=(t=void 0===t?b:t)*Math.pow(n,e),e=Math.round(T*n*(Math.random()-.5)*2);return Math.min(E,n+e)}function C(e){return e&&e._delegate?e._delegate:e}var O=(P.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},P.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},P.prototype.setServiceProps=function(e){return this.serviceProps=e,this},P.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},P);function P(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}function D(n){return new Promise(function(e,t){n.onsuccess=function(){e(n.result)},n.onerror=function(){t(n.error)}})}function A(n,r,a){var i,e=new Promise(function(e,t){D(i=n[r].apply(n,a)).then(e,t)});return e.request=i,e}function j(e,n,t){t.forEach(function(t){Object.defineProperty(e.prototype,t,{get:function(){return this[n][t]},set:function(e){this[n][t]=e}})})}function N(t,n,r,e){e.forEach(function(e){e in r.prototype&&(t.prototype[e]=function(){return A(this[n],e,arguments)})})}function k(t,n,r,e){e.forEach(function(e){e in r.prototype&&(t.prototype[e]=function(){return this[n][e].apply(this[n],arguments)})})}function R(e,r,t,n){n.forEach(function(n){n in t.prototype&&(e.prototype[n]=function(){return e=this[r],(t=A(e,n,arguments)).then(function(e){if(e)return new x(e,t.request)});var e,t})})}function L(e){this._index=e}function x(e,t){this._cursor=e,this._request=t}function M(e){this._store=e}function F(n){this._tx=n,this.complete=new Promise(function(e,t){n.oncomplete=function(){e()},n.onerror=function(){t(n.error)},n.onabort=function(){t(n.error)}})}function $(e,t,n){this._db=e,this.oldVersion=t,this.transaction=new F(n)}function B(e){this._db=e}j(L,"_index",["name","keyPath","multiEntry","unique"]),N(L,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),R(L,"_index",IDBIndex,["openCursor","openKeyCursor"]),j(x,"_cursor",["direction","key","primaryKey","value"]),N(x,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach(function(n){n in IDBCursor.prototype&&(x.prototype[n]=function(){var t=this,e=arguments;return Promise.resolve().then(function(){return t._cursor[n].apply(t._cursor,e),D(t._request).then(function(e){if(e)return new x(e,t._request)})})})}),M.prototype.createIndex=function(){return new L(this._store.createIndex.apply(this._store,arguments))},M.prototype.index=function(){return new L(this._store.index.apply(this._store,arguments))},j(M,"_store",["name","keyPath","indexNames","autoIncrement"]),N(M,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),R(M,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),k(M,"_store",IDBObjectStore,["deleteIndex"]),F.prototype.objectStore=function(){return new M(this._tx.objectStore.apply(this._tx,arguments))},j(F,"_tx",["objectStoreNames","mode"]),k(F,"_tx",IDBTransaction,["abort"]),$.prototype.createObjectStore=function(){return new M(this._db.createObjectStore.apply(this._db,arguments))},j($,"_db",["name","version","objectStoreNames"]),k($,"_db",IDBDatabase,["deleteObjectStore","close"]),B.prototype.transaction=function(){return new F(this._db.transaction.apply(this._db,arguments))},j(B,"_db",["name","version","objectStoreNames"]),k(B,"_db",IDBDatabase,["close"]),["openCursor","openKeyCursor"].forEach(function(a){[M,L].forEach(function(e){a in e.prototype&&(e.prototype[a.replace("open","iterate")]=function(){var e=(n=arguments,Array.prototype.slice.call(n)),t=e[e.length-1],n=this._store||this._index,r=n[a].apply(n,e.slice(0,-1));r.onsuccess=function(){t(r.result)}})})}),[L,M].forEach(function(e){e.prototype.getAll||(e.prototype.getAll=function(e,n){var r=this,a=[];return new Promise(function(t){r.iterateCursor(e,function(e){e?(a.push(e.value),void 0===n||a.length!=n?e.continue():t(a)):t(a)})})})});var H="0.5.0-canary.f5b5efe95";const q=1e4,V=`w:${H}`,K="FIS_v2",U="https://firebaseinstallations.googleapis.com/v1",G=36e5;const W=new w("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function z(e){return e instanceof m&&e.code.includes("request-failed")}function J({projectId:e}){return`${U}/projects/${e}/installations`}function Y(e){return{token:e.token,requestStatus:2,expiresIn:(e=e.expiresIn,Number(e.replace("s","000"))),creationTime:Date.now()}}async function X(e,t){t=(await t.json()).error;return W.create("request-failed",{requestName:e,serverCode:t.code,serverMessage:t.message,serverStatus:t.status})}function Z({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function Q(e,{refreshToken:t}){const n=Z(e);return n.append("Authorization",(t=t,`${K} ${t}`)),n}async function ee(e){var t=await e();return 500<=t.status&&t.status<600?e():t}function te(t){return new Promise(e=>{setTimeout(e,t)})}const ne=/^[cdef][\w-]{21}$/,re="";function ae(){try{const t=new Uint8Array(17),n=self.crypto||self.msCrypto;n.getRandomValues(t),t[0]=112+t[0]%16;var e=function(e){const t=function(e){const t=btoa(String.fromCharCode(...e));return t.replace(/\+/g,"-").replace(/\//g,"_")}(e);return t.substr(0,22)}(t);return ne.test(e)?e:re}catch(e){return re}}function ie(e){return`${e.appName}!${e.appId}`}const oe=new Map;function se(e,t){e=ie(e);ce(e,t),function(e,t){const n=function(){!ue&&"BroadcastChannel"in self&&(ue=new BroadcastChannel("[Firebase] FID Change"),ue.onmessage=e=>{ce(e.data.key,e.data.fid)});return ue}();n&&n.postMessage({key:e,fid:t});0===oe.size&&ue&&(ue.close(),ue=null)}(e,t)}function ce(e,t){e=oe.get(e);if(e)for(const n of e)n(t)}let ue=null;const le="firebase-installations-store";let pe=null;function fe(){var e,t,n;return pe=pe||(e=1,t=e=>{0===e.oldVersion&&e.createObjectStore(le)},(n=(e=A(indexedDB,"open",["firebase-installations-database",e])).request)&&(n.onupgradeneeded=function(e){t&&t(new $(n.result,e.oldVersion,n.transaction))}),e.then(function(e){return new B(e)})),pe}async function de(e,t){var n=ie(e);const r=await fe(),a=r.transaction(le,"readwrite"),i=a.objectStore(le);var o=await i.get(n);return await i.put(t,n),await a.complete,o&&o.fid===t.fid||se(e,t.fid),t}async function he(e){e=ie(e);const t=await fe(),n=t.transaction(le,"readwrite");await n.objectStore(le).delete(e),await n.complete}async function ge(e,t){var n=ie(e);const r=await fe(),a=r.transaction(le,"readwrite"),i=a.objectStore(le);var o=await i.get(n),t=t(o);return void 0===t?await i.delete(n):await i.put(t,n),await a.complete,!t||o&&o.fid===t.fid||se(e,t.fid),t}async function me(t){let n;var e=await ge(t,e=>{e=function(e){e=e||{fid:ae(),registrationStatus:0};return we(e)}(e),e=function(e,t){{if(0!==t.registrationStatus)return 1===t.registrationStatus?{installationEntry:t,registrationPromise:async function(e){let t=await ye(e);for(;1===t.registrationStatus;)await te(100),t=await ye(e);if(0!==t.registrationStatus)return t;{var{installationEntry:n,registrationPromise:r}=await me(e);return r||n}}(e)}:{installationEntry:t};if(!navigator.onLine){var n=Promise.reject(W.create("app-offline"));return{installationEntry:t,registrationPromise:n}}t={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},e=async function(t,n){try{var e=await async function(e,{fid:t}){const n=J(e);var r=Z(e),e={fid:t,authVersion:K,appId:e.appId,sdkVersion:V};const a={method:"POST",headers:r,body:JSON.stringify(e)},i=await ee(()=>fetch(n,a));if(i.ok){e=await i.json();return{fid:e.fid||t,registrationStatus:2,refreshToken:e.refreshToken,authToken:Y(e.authToken)}}throw await X("Create Installation",i)}(t,n);return de(t,e)}catch(e){throw z(e)&&409===e.customData.serverCode?await he(t):await de(t,{fid:n.fid,registrationStatus:0}),e}}(e,t);return{installationEntry:t,registrationPromise:e}}}(t,e);return n=e.registrationPromise,e.installationEntry});return e.fid===re?{installationEntry:await n}:{installationEntry:e,registrationPromise:n}}function ye(e){return ge(e,e=>{if(!e)throw W.create("installation-not-found");return we(e)})}function we(e){return 1===(t=e).registrationStatus&&t.registrationTime+q<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}async function ve({appConfig:e,platformLoggerProvider:t},n){const r=([a,i]=[e,n["fid"]],`${J(a)}/${i}/authTokens:generate`);var a,i;const o=Q(e,n),s=t.getImmediate({optional:!0});s&&o.append("x-firebase-client",s.getPlatformInfoString());t={installation:{sdkVersion:V}};const c={method:"POST",headers:o,body:JSON.stringify(t)},u=await ee(()=>fetch(r,c));if(u.ok)return Y(await u.json());throw await X("Generate Auth Token",u)}async function Ie(r,a=!1){let i;var e=await ge(r.appConfig,e=>{if(!_e(e))throw W.create("not-registered");var t,n=e.authToken;if(a||2!==(t=n).requestStatus||function(e){var t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+G}(t)){if(1===n.requestStatus)return i=async function(e,t){let n=await be(e.appConfig);for(;1===n.authToken.requestStatus;)await te(100),n=await be(e.appConfig);var r=n.authToken;return 0===r.requestStatus?Ie(e,t):r}(r,a),e;if(!navigator.onLine)throw W.create("app-offline");n=(t=e,n={requestStatus:1,requestTime:Date.now()},Object.assign(Object.assign({},t),{authToken:n}));return i=async function(t,n){try{var e=await ve(t,n),r=Object.assign(Object.assign({},n),{authToken:e});return await de(t.appConfig,r),e}catch(e){throw!z(e)||401!==e.customData.serverCode&&404!==e.customData.serverCode?(n=Object.assign(Object.assign({},n),{authToken:{requestStatus:0}}),await de(t.appConfig,n)):await he(t.appConfig),e}}(r,n),n}return e});return i?await i:e.authToken}function be(e){return ge(e,e=>{if(!_e(e))throw W.create("not-registered");var t=e.authToken;return 1===(t=t).requestStatus&&t.requestTime+q<Date.now()?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e})}function _e(e){return void 0!==e&&2===e.registrationStatus}async function Ee(e,t=!1){var n=e;return await((e=(await me(e=n.appConfig)).registrationPromise)&&await e),(await Ie(n,t)).token}function Te(e){return W.create("missing-app-config-values",{valueName:e})}const Se="installations",Ce=e=>{e=e.getProvider("app").getImmediate();return{app:e,appConfig:function(e){if(!e||!e.options)throw Te("App Configuration");if(!e.name)throw Te("App Name");for(const t of["projectId","apiKey","appId"])if(!e.options[t])throw Te(t);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(e),platformLoggerProvider:dt._getProvider(e,"platform-logger"),_delete:()=>Promise.resolve()}},Oe=e=>{e=e.getProvider("app").getImmediate();const t=dt._getProvider(e,Se).getImmediate();return{getId:()=>async function(e){const{installationEntry:t,registrationPromise:n}=await me(e.appConfig);return(n||Ie(e)).catch(console.error),t.fid}(t),getToken:e=>Ee(t,e)}};dt._registerComponent(new O(Se,Ce,"PUBLIC")),dt._registerComponent(new O("installations-internal",Oe,"PRIVATE")),dt.registerVersion("@firebase/installations",H);const Pe="analytics",De="firebase_id",Ae="origin",je="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",Ne="https://www.googletagmanager.com/gtag/js",ke=new u("@firebase/analytics");function Re(e){return Promise.all(e.map(e=>e.catch(e=>e)))}function Le(r,a,i,o){return async function(e,t,n){try{"event"===e?await async function(e,n,r,a,i){try{let t=[];if(i&&i.send_to){let e=i.send_to;Array.isArray(e)||(e=[e]);const c=await Re(r);for(const u of e){var o=c.find(e=>e.measurementId===u),s=o&&n[o.appId];if(!s){t=[];break}t.push(s)}}0===t.length&&(t=Object.values(n)),await Promise.all(t),e("event",a,i||{})}catch(e){ke.error(e)}}(r,a,i,t,n):"config"===e?await async function(e,t,n,r,a,i){r=r[a];try{if(r)await t[r];else{const s=await Re(n);var o=s.find(e=>e.measurementId===a);o&&await t[o.appId]}}catch(e){ke.error(e)}e("config",a,i)}(r,a,i,o,t,n):r("set",t)}catch(e){ke.error(e)}}}const xe=new w("analytics","Analytics",{"already-exists":"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-intialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.'}),Me=30;const Fe=new class{constructor(e={},t=1e3){this.throttleMetadata=e,this.intervalMillis=t}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,t){this.throttleMetadata[e]=t}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}};async function $e(e){var t,{appId:n,apiKey:e}=e,e={method:"GET",headers:new Headers({Accept:"application/json","x-goog-api-key":e})},n=je.replace("{app-id}",n);const r=await fetch(n,e);if(200===r.status||304===r.status)return r.json();{let e="";try{var a=await r.json();null!==(t=a.error)&&void 0!==t&&t.message&&(e=a.error.message)}catch(e){}throw xe.create("config-fetch-failed",{httpStatus:r.status,responseMessage:e})}}async function Be(e,t=Fe,n){var{appId:r,apiKey:a,measurementId:i}=e.options;if(!r)throw xe.create("no-app-id");if(!a){if(i)return{measurementId:i,appId:r};throw xe.create("no-api-key")}e=t.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()};const o=new Ve;return setTimeout(async()=>{o.abort()},void 0!==n?n:6e4),async function t(n,{throttleEndTimeMillis:e,backoffCount:r},a,i=Fe){const{appId:o,measurementId:s}=n;try{await He(a,e)}catch(e){if(s)return ke.warn("Timed out fetching this Firebase app's measurement ID from the server."+` Falling back to the measurement ID ${s}`+` provided in the "measurementId" field in the local Firebase config. [${e.message}]`),{appId:o,measurementId:s};throw e}try{const c=await $e(n);return i.deleteThrottleMetadata(o),c}catch(e){if(!qe(e)){if(i.deleteThrottleMetadata(o),s)return ke.warn("Failed to fetch this Firebase app's measurement ID from the server."+` Falling back to the measurement ID ${s}`+` provided in the "measurementId" field in the local Firebase config. [${e.message}]`),{appId:o,measurementId:s};throw e}const u=503===Number(e.customData.httpStatus)?S(r,i.intervalMillis,Me):S(r,i.intervalMillis),l={throttleEndTimeMillis:Date.now()+u,backoffCount:r+1};return i.setThrottleMetadata(o,l),ke.debug(`Calling attemptFetch again in ${u} millis`),t(n,l,a,i)}}({appId:r,apiKey:a,measurementId:i},e,o,t)}function He(a,i){return new Promise((e,t)=>{var n=Math.max(i-Date.now(),0);const r=setTimeout(e,n);a.addEventListener(()=>{clearTimeout(r),t(xe.create("fetch-throttle",{throttleEndTimeMillis:i}))})})}function qe(e){if(!(e instanceof m&&e.customData))return!1;e=Number(e.customData.httpStatus);return 429===e||500===e||503===e||504===e}class Ve{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}async function Ke(t,e,n,r,a,i,o){const s=Be(t);s.then(e=>{n[e.measurementId]=e.appId,t.options.measurementId&&e.measurementId!==t.options.measurementId&&ke.warn(`The measurement ID in the local Firebase config (${t.options.measurementId})`+` does not match the measurement ID fetched from the server (${e.measurementId}).`+" To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.")}).catch(e=>ke.error(e)),e.push(s);var c=async function(){if(!f())return ke.warn(xe.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await d()}catch(e){return ke.warn(xe.create("indexeddb-unavailable",{errorInfo:e}).message),!1}return!0}().then(e=>{if(e)return r.getId()}),[e,c]=await Promise.all([s,c]);!function(){var e=window.document.getElementsByTagName("script");for(const t of Object.values(e))if(t.src&&t.src.includes(Ne))return t}()&&function(e,t){const n=document.createElement("script");n.src=`${Ne}?l=${e}&id=${t}`,n.async=!0,document.head.appendChild(n)}(i,e.measurementId),a("js",new Date);const u=null!==(o=null==o?void 0:o.config)&&void 0!==o?o:{};return u[Ae]="firebase",u.update=!0,null!=c&&(u[De]=c),a("config",e.measurementId,u),e.measurementId}class Ue{constructor(e){this.app=e}_delete(){return delete Ge[this.app.options.appId],Promise.resolve()}}let Ge={},We=[];const ze={};let Je="dataLayer",Ye="gtag",Xe,Ze,Qe=!1;function et(e){if(Qe)throw xe.create("already-initialized");e.dataLayerName&&(Je=e.dataLayerName),e.gtagName&&(Ye=e.gtagName)}function tt(e,t,n){!function(){const e=[];var t;p()&&e.push("This is a browser extension environment."),h()||e.push("Cookies are not available."),0<e.length&&(t=e.map((e,t)=>`(${t+1}) ${e}`).join(" "),t=xe.create("invalid-analytics-context",{errorInfo:t}),ke.warn(t.message))}();var r,a,i=e.options.appId;if(!i)throw xe.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw xe.create("no-api-key");ke.warn('The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest'+` measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId}`+' provided in the "measurementId" field in the local Firebase config.')}if(null!=Ge[i])throw xe.create("already-exists",{id:i});return Qe||(function(e){let t=[];Array.isArray(window[e])?t=window[e]:window[e]=t,t}(Je),{wrappedGtag:r,gtagCore:a}=function(e,t,n,r,a){let i=function(){window[r].push(arguments)};return window[a]&&"function"==typeof window[a]&&(i=window[a]),window[a]=Le(i,e,t,n),{gtagCore:i,wrappedGtag:window[a]}}(Ge,We,ze,Je,Ye),Ze=r,Xe=a,Qe=!0),Ge[i]=Ke(e,We,ze,t,Xe,Je,n),new Ue(e)}async function nt(){if(p())return!1;if(!h())return!1;if(!f())return!1;try{return await d()}catch(e){return!1}}function rt(e,t,n){e=C(e),async function(e,t,n,r){if(r&&r.global)return e("set",{screen_name:n}),Promise.resolve();e("config",await t,{update:!0,screen_name:n})}(Ze,Ge[e.app.options.appId],t,n).catch(e=>ke.error(e))}function at(e,t,n){e=C(e),async function(e,t,n,r){if(r&&r.global)return e("set",{user_id:n}),Promise.resolve();e("config",await t,{update:!0,user_id:n})}(Ze,Ge[e.app.options.appId],t,n).catch(e=>ke.error(e))}function it(e,t,n){e=C(e),async function(e,t,n,r){if(r&&r.global){const a={};for(const i of Object.keys(n))a[`user_properties.${i}`]=n[i];return e("set",a),Promise.resolve()}e("config",await t,{update:!0,user_properties:n})}(Ze,Ge[e.app.options.appId],t,n).catch(e=>ke.error(e))}function ot(e,t){e=C(e),async function(e,t){e=await e,window[`ga-disable-${e}`]=!t}(Ge[e.app.options.appId],t).catch(e=>ke.error(e))}function st(e,t,n,r){e=C(e),async function(e,t,n,r,a){a&&a.global?e("event",n,r):(t=await t,e("event",n,Object.assign(Object.assign({},r),{send_to:t})))}(Ze,Ge[e.app.options.appId],t,n,r).catch(e=>ke.error(e))}dt._registerComponent(new O(Pe,(e,{options:t})=>{return tt(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t)},"PUBLIC")),dt._registerComponent(new O("analytics-internal",function(e){try{const r=e.getProvider(Pe).getImmediate();return{logEvent:(e,t,n)=>st(r,e,t,n)}}catch(e){throw xe.create("interop-component-reg-failed",{reason:e})}},"PRIVATE")),dt.registerVersion("@firebase/analytics","0.7.0-canary.f5b5efe95");var ct,ut;class lt{constructor(e,t){this.app=e,this._delegate=t}logEvent(e,t,n){st(this._delegate,e,t,n)}setCurrentScreen(e,t){rt(this._delegate,e,t)}setUserId(e,t){at(this._delegate,e,t)}setUserProperties(e,t){it(this._delegate,e,t)}setAnalyticsCollectionEnabled(e){ot(this._delegate,e)}}(u=ct=ct||{}).ADD_SHIPPING_INFO="add_shipping_info",u.ADD_PAYMENT_INFO="add_payment_info",u.ADD_TO_CART="add_to_cart",u.ADD_TO_WISHLIST="add_to_wishlist",u.BEGIN_CHECKOUT="begin_checkout",u.CHECKOUT_PROGRESS="checkout_progress",u.EXCEPTION="exception",u.GENERATE_LEAD="generate_lead",u.LOGIN="login",u.PAGE_VIEW="page_view",u.PURCHASE="purchase",u.REFUND="refund",u.REMOVE_FROM_CART="remove_from_cart",u.SCREEN_VIEW="screen_view",u.SEARCH="search",u.SELECT_CONTENT="select_content",u.SELECT_ITEM="select_item",u.SELECT_PROMOTION="select_promotion",u.SET_CHECKOUT_OPTION="set_checkout_option",u.SHARE="share",u.SIGN_UP="sign_up",u.TIMING_COMPLETE="timing_complete",u.VIEW_CART="view_cart",u.VIEW_ITEM="view_item",u.VIEW_ITEM_LIST="view_item_list",u.VIEW_PROMOTION="view_promotion",u.VIEW_SEARCH_RESULTS="view_search_results";const pt=e=>{var t=e.getProvider("app-compat").getImmediate(),e=e.getProvider("analytics").getImmediate();return new lt(t,e)};ut={Analytics:lt,settings:et,isSupported:nt,EventName:ct},t.default.INTERNAL.registerComponent(new O("analytics-compat",pt,"PUBLIC").setServiceProps(ut).setMultipleInstances(!0)),t.default.registerVersion("@firebase/analytics-compat","0.1.1-canary.f5b5efe95")}.apply(this,arguments)}catch(e){throw console.error(e),new Error("Cannot instantiate firebase-analytics-compat.js - be sure to load firebase-app.js first.")}});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("@firebase/app-compat"),require("@firebase/app")):"function"==typeof define&&define.amd?define(["@firebase/app-compat","@firebase/app"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).firebase,e.firebase.INTERNAL.modularAPIs)}(this,function(ft,dt){"use strict";try{!function(){function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n,t=e(ft),r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function o(e,t,n){if(n||2===arguments.length)for(var r,a=0,i=t.length;a<i;a++)!r&&a in t||((r=r||Array.prototype.slice.call(t,0,a))[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}(u=n=n||{})[u.DEBUG=0]="DEBUG",u[u.VERBOSE=1]="VERBOSE",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.SILENT=5]="SILENT";function a(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!(t<e.logLevel)){var a=(new Date).toISOString(),i=c[t];if(!i)throw new Error("Attempted to log a message with an invalid logType (value: "+t+")");console[i].apply(console,o(["["+a+"] "+e.name+":"],n))}}var i={debug:n.DEBUG,verbose:n.VERBOSE,info:n.INFO,warn:n.WARN,error:n.ERROR,silent:n.SILENT},s=n.INFO,c=((H={})[n.DEBUG]="log",H[n.VERBOSE]="log",H[n.INFO]="info",H[n.WARN]="warn",H[n.ERROR]="error",H),u=(Object.defineProperty(l.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in n))throw new TypeError('Invalid value "'+e+'" assigned to `logLevel`');this._logLevel=e},enumerable:!1,configurable:!0}),l.prototype.setLogLevel=function(e){this._logLevel="string"==typeof e?i[e]:e},Object.defineProperty(l.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e},enumerable:!1,configurable:!0}),l.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,o([this,n.DEBUG],e)),this._logHandler.apply(this,o([this,n.DEBUG],e))},l.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,o([this,n.VERBOSE],e)),this._logHandler.apply(this,o([this,n.VERBOSE],e))},l.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,o([this,n.INFO],e)),this._logHandler.apply(this,o([this,n.INFO],e))},l.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,o([this,n.WARN],e)),this._logHandler.apply(this,o([this,n.WARN],e))},l.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,o([this,n.ERROR],e)),this._logHandler.apply(this,o([this,n.ERROR],e))},l);function l(e){this.name=e,this._logLevel=s,this._logHandler=a,this._userLogHandler=null}function p(){var e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function f(){return"indexedDB"in self&&null!=indexedDB}function d(){return new Promise(function(e,t){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",a=self.indexedDB.open(r);a.onsuccess=function(){a.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},a.onupgradeneeded=function(){n=!1},a.onerror=function(){var e;t((null===(e=a.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}})}function h(){return!(!navigator||!navigator.cookieEnabled)}var g,m=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(y,g=Error),y);function y(e,t,n){t=g.call(this,t)||this;return t.code=e,t.customData=n,t.name="FirebaseError",Object.setPrototypeOf(t,y.prototype),Error.captureStackTrace&&Error.captureStackTrace(t,w.prototype.create),t}var w=(v.prototype.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,a=t[0]||{},i=this.service+"/"+e,e=this.errors[e],e=e?(r=a,e.replace(I,function(e,t){var n=r[t];return null!=n?String(n):"<"+t+"?>"})):"Error",e=this.serviceName+": "+e+" ("+i+").";return new m(i,e,a)},v);function v(e,t,n){this.service=e,this.serviceName=t,this.errors=n}var I=/\{\$([^}]+)}/g,b=1e3,_=2,E=144e5,T=.5;function S(e,t,n){void 0===n&&(n=_);n=(t=void 0===t?b:t)*Math.pow(n,e),e=Math.round(T*n*(Math.random()-.5)*2);return Math.min(E,n+e)}function C(e){return e&&e._delegate?e._delegate:e}var O=(P.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},P.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},P.prototype.setServiceProps=function(e){return this.serviceProps=e,this},P.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},P);function P(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}function D(n){return new Promise(function(e,t){n.onsuccess=function(){e(n.result)},n.onerror=function(){t(n.error)}})}function A(n,r,a){var i,e=new Promise(function(e,t){D(i=n[r].apply(n,a)).then(e,t)});return e.request=i,e}function j(e,n,t){t.forEach(function(t){Object.defineProperty(e.prototype,t,{get:function(){return this[n][t]},set:function(e){this[n][t]=e}})})}function N(t,n,r,e){e.forEach(function(e){e in r.prototype&&(t.prototype[e]=function(){return A(this[n],e,arguments)})})}function k(t,n,r,e){e.forEach(function(e){e in r.prototype&&(t.prototype[e]=function(){return this[n][e].apply(this[n],arguments)})})}function R(e,r,t,n){n.forEach(function(n){n in t.prototype&&(e.prototype[n]=function(){return e=this[r],(t=A(e,n,arguments)).then(function(e){if(e)return new x(e,t.request)});var e,t})})}function L(e){this._index=e}function x(e,t){this._cursor=e,this._request=t}function M(e){this._store=e}function F(n){this._tx=n,this.complete=new Promise(function(e,t){n.oncomplete=function(){e()},n.onerror=function(){t(n.error)},n.onabort=function(){t(n.error)}})}function $(e,t,n){this._db=e,this.oldVersion=t,this.transaction=new F(n)}function B(e){this._db=e}j(L,"_index",["name","keyPath","multiEntry","unique"]),N(L,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),R(L,"_index",IDBIndex,["openCursor","openKeyCursor"]),j(x,"_cursor",["direction","key","primaryKey","value"]),N(x,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach(function(n){n in IDBCursor.prototype&&(x.prototype[n]=function(){var t=this,e=arguments;return Promise.resolve().then(function(){return t._cursor[n].apply(t._cursor,e),D(t._request).then(function(e){if(e)return new x(e,t._request)})})})}),M.prototype.createIndex=function(){return new L(this._store.createIndex.apply(this._store,arguments))},M.prototype.index=function(){return new L(this._store.index.apply(this._store,arguments))},j(M,"_store",["name","keyPath","indexNames","autoIncrement"]),N(M,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),R(M,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),k(M,"_store",IDBObjectStore,["deleteIndex"]),F.prototype.objectStore=function(){return new M(this._tx.objectStore.apply(this._tx,arguments))},j(F,"_tx",["objectStoreNames","mode"]),k(F,"_tx",IDBTransaction,["abort"]),$.prototype.createObjectStore=function(){return new M(this._db.createObjectStore.apply(this._db,arguments))},j($,"_db",["name","version","objectStoreNames"]),k($,"_db",IDBDatabase,["deleteObjectStore","close"]),B.prototype.transaction=function(){return new F(this._db.transaction.apply(this._db,arguments))},j(B,"_db",["name","version","objectStoreNames"]),k(B,"_db",IDBDatabase,["close"]),["openCursor","openKeyCursor"].forEach(function(a){[M,L].forEach(function(e){a in e.prototype&&(e.prototype[a.replace("open","iterate")]=function(){var e=(n=arguments,Array.prototype.slice.call(n)),t=e[e.length-1],n=this._store||this._index,r=n[a].apply(n,e.slice(0,-1));r.onsuccess=function(){t(r.result)}})})}),[L,M].forEach(function(e){e.prototype.getAll||(e.prototype.getAll=function(e,n){var r=this,a=[];return new Promise(function(t){r.iterateCursor(e,function(e){e?(a.push(e.value),void 0===n||a.length!=n?e.continue():t(a)):t(a)})})})});var H="0.5.0-canary.ff9baf70c";const q=1e4,V=`w:${H}`,K="FIS_v2",U="https://firebaseinstallations.googleapis.com/v1",G=36e5;const W=new w("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function z(e){return e instanceof m&&e.code.includes("request-failed")}function J({projectId:e}){return`${U}/projects/${e}/installations`}function Y(e){return{token:e.token,requestStatus:2,expiresIn:(e=e.expiresIn,Number(e.replace("s","000"))),creationTime:Date.now()}}async function X(e,t){t=(await t.json()).error;return W.create("request-failed",{requestName:e,serverCode:t.code,serverMessage:t.message,serverStatus:t.status})}function Z({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function Q(e,{refreshToken:t}){const n=Z(e);return n.append("Authorization",(t=t,`${K} ${t}`)),n}async function ee(e){var t=await e();return 500<=t.status&&t.status<600?e():t}function te(t){return new Promise(e=>{setTimeout(e,t)})}const ne=/^[cdef][\w-]{21}$/,re="";function ae(){try{const t=new Uint8Array(17),n=self.crypto||self.msCrypto;n.getRandomValues(t),t[0]=112+t[0]%16;var e=function(e){const t=function(e){const t=btoa(String.fromCharCode(...e));return t.replace(/\+/g,"-").replace(/\//g,"_")}(e);return t.substr(0,22)}(t);return ne.test(e)?e:re}catch(e){return re}}function ie(e){return`${e.appName}!${e.appId}`}const oe=new Map;function se(e,t){e=ie(e);ce(e,t),function(e,t){const n=function(){!ue&&"BroadcastChannel"in self&&(ue=new BroadcastChannel("[Firebase] FID Change"),ue.onmessage=e=>{ce(e.data.key,e.data.fid)});return ue}();n&&n.postMessage({key:e,fid:t});0===oe.size&&ue&&(ue.close(),ue=null)}(e,t)}function ce(e,t){e=oe.get(e);if(e)for(const n of e)n(t)}let ue=null;const le="firebase-installations-store";let pe=null;function fe(){var e,t,n;return pe=pe||(e=1,t=e=>{0===e.oldVersion&&e.createObjectStore(le)},(n=(e=A(indexedDB,"open",["firebase-installations-database",e])).request)&&(n.onupgradeneeded=function(e){t&&t(new $(n.result,e.oldVersion,n.transaction))}),e.then(function(e){return new B(e)})),pe}async function de(e,t){var n=ie(e);const r=await fe(),a=r.transaction(le,"readwrite"),i=a.objectStore(le);var o=await i.get(n);return await i.put(t,n),await a.complete,o&&o.fid===t.fid||se(e,t.fid),t}async function he(e){e=ie(e);const t=await fe(),n=t.transaction(le,"readwrite");await n.objectStore(le).delete(e),await n.complete}async function ge(e,t){var n=ie(e);const r=await fe(),a=r.transaction(le,"readwrite"),i=a.objectStore(le);var o=await i.get(n),t=t(o);return void 0===t?await i.delete(n):await i.put(t,n),await a.complete,!t||o&&o.fid===t.fid||se(e,t.fid),t}async function me(t){let n;var e=await ge(t,e=>{e=function(e){e=e||{fid:ae(),registrationStatus:0};return we(e)}(e),e=function(e,t){{if(0!==t.registrationStatus)return 1===t.registrationStatus?{installationEntry:t,registrationPromise:async function(e){let t=await ye(e);for(;1===t.registrationStatus;)await te(100),t=await ye(e);if(0!==t.registrationStatus)return t;{var{installationEntry:n,registrationPromise:r}=await me(e);return r||n}}(e)}:{installationEntry:t};if(!navigator.onLine){var n=Promise.reject(W.create("app-offline"));return{installationEntry:t,registrationPromise:n}}t={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},e=async function(t,n){try{var e=await async function(e,{fid:t}){const n=J(e);var r=Z(e),e={fid:t,authVersion:K,appId:e.appId,sdkVersion:V};const a={method:"POST",headers:r,body:JSON.stringify(e)},i=await ee(()=>fetch(n,a));if(i.ok){e=await i.json();return{fid:e.fid||t,registrationStatus:2,refreshToken:e.refreshToken,authToken:Y(e.authToken)}}throw await X("Create Installation",i)}(t,n);return de(t,e)}catch(e){throw z(e)&&409===e.customData.serverCode?await he(t):await de(t,{fid:n.fid,registrationStatus:0}),e}}(e,t);return{installationEntry:t,registrationPromise:e}}}(t,e);return n=e.registrationPromise,e.installationEntry});return e.fid===re?{installationEntry:await n}:{installationEntry:e,registrationPromise:n}}function ye(e){return ge(e,e=>{if(!e)throw W.create("installation-not-found");return we(e)})}function we(e){return 1===(t=e).registrationStatus&&t.registrationTime+q<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}async function ve({appConfig:e,platformLoggerProvider:t},n){const r=([a,i]=[e,n["fid"]],`${J(a)}/${i}/authTokens:generate`);var a,i;const o=Q(e,n),s=t.getImmediate({optional:!0});s&&o.append("x-firebase-client",s.getPlatformInfoString());t={installation:{sdkVersion:V}};const c={method:"POST",headers:o,body:JSON.stringify(t)},u=await ee(()=>fetch(r,c));if(u.ok)return Y(await u.json());throw await X("Generate Auth Token",u)}async function Ie(r,a=!1){let i;var e=await ge(r.appConfig,e=>{if(!_e(e))throw W.create("not-registered");var t,n=e.authToken;if(a||2!==(t=n).requestStatus||function(e){var t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+G}(t)){if(1===n.requestStatus)return i=async function(e,t){let n=await be(e.appConfig);for(;1===n.authToken.requestStatus;)await te(100),n=await be(e.appConfig);var r=n.authToken;return 0===r.requestStatus?Ie(e,t):r}(r,a),e;if(!navigator.onLine)throw W.create("app-offline");n=(t=e,n={requestStatus:1,requestTime:Date.now()},Object.assign(Object.assign({},t),{authToken:n}));return i=async function(t,n){try{var e=await ve(t,n),r=Object.assign(Object.assign({},n),{authToken:e});return await de(t.appConfig,r),e}catch(e){throw!z(e)||401!==e.customData.serverCode&&404!==e.customData.serverCode?(n=Object.assign(Object.assign({},n),{authToken:{requestStatus:0}}),await de(t.appConfig,n)):await he(t.appConfig),e}}(r,n),n}return e});return i?await i:e.authToken}function be(e){return ge(e,e=>{if(!_e(e))throw W.create("not-registered");var t=e.authToken;return 1===(t=t).requestStatus&&t.requestTime+q<Date.now()?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e})}function _e(e){return void 0!==e&&2===e.registrationStatus}async function Ee(e,t=!1){var n=e;return await((e=(await me(e=n.appConfig)).registrationPromise)&&await e),(await Ie(n,t)).token}function Te(e){return W.create("missing-app-config-values",{valueName:e})}const Se="installations",Ce=e=>{e=e.getProvider("app").getImmediate();return{app:e,appConfig:function(e){if(!e||!e.options)throw Te("App Configuration");if(!e.name)throw Te("App Name");for(const t of["projectId","apiKey","appId"])if(!e.options[t])throw Te(t);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(e),platformLoggerProvider:dt._getProvider(e,"platform-logger"),_delete:()=>Promise.resolve()}},Oe=e=>{e=e.getProvider("app").getImmediate();const t=dt._getProvider(e,Se).getImmediate();return{getId:()=>async function(e){const{installationEntry:t,registrationPromise:n}=await me(e.appConfig);return(n||Ie(e)).catch(console.error),t.fid}(t),getToken:e=>Ee(t,e)}};dt._registerComponent(new O(Se,Ce,"PUBLIC")),dt._registerComponent(new O("installations-internal",Oe,"PRIVATE")),dt.registerVersion("@firebase/installations",H);const Pe="analytics",De="firebase_id",Ae="origin",je="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",Ne="https://www.googletagmanager.com/gtag/js",ke=new u("@firebase/analytics");function Re(e){return Promise.all(e.map(e=>e.catch(e=>e)))}function Le(r,a,i,o){return async function(e,t,n){try{"event"===e?await async function(e,n,r,a,i){try{let t=[];if(i&&i.send_to){let e=i.send_to;Array.isArray(e)||(e=[e]);const c=await Re(r);for(const u of e){var o=c.find(e=>e.measurementId===u),s=o&&n[o.appId];if(!s){t=[];break}t.push(s)}}0===t.length&&(t=Object.values(n)),await Promise.all(t),e("event",a,i||{})}catch(e){ke.error(e)}}(r,a,i,t,n):"config"===e?await async function(e,t,n,r,a,i){r=r[a];try{if(r)await t[r];else{const s=await Re(n);var o=s.find(e=>e.measurementId===a);o&&await t[o.appId]}}catch(e){ke.error(e)}e("config",a,i)}(r,a,i,o,t,n):r("set",t)}catch(e){ke.error(e)}}}const xe=new w("analytics","Analytics",{"already-exists":"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-intialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.'}),Me=30;const Fe=new class{constructor(e={},t=1e3){this.throttleMetadata=e,this.intervalMillis=t}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,t){this.throttleMetadata[e]=t}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}};async function $e(e){var t,{appId:n,apiKey:e}=e,e={method:"GET",headers:new Headers({Accept:"application/json","x-goog-api-key":e})},n=je.replace("{app-id}",n);const r=await fetch(n,e);if(200===r.status||304===r.status)return r.json();{let e="";try{var a=await r.json();null!==(t=a.error)&&void 0!==t&&t.message&&(e=a.error.message)}catch(e){}throw xe.create("config-fetch-failed",{httpStatus:r.status,responseMessage:e})}}async function Be(e,t=Fe,n){var{appId:r,apiKey:a,measurementId:i}=e.options;if(!r)throw xe.create("no-app-id");if(!a){if(i)return{measurementId:i,appId:r};throw xe.create("no-api-key")}e=t.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()};const o=new Ve;return setTimeout(async()=>{o.abort()},void 0!==n?n:6e4),async function t(n,{throttleEndTimeMillis:e,backoffCount:r},a,i=Fe){const{appId:o,measurementId:s}=n;try{await He(a,e)}catch(e){if(s)return ke.warn("Timed out fetching this Firebase app's measurement ID from the server."+` Falling back to the measurement ID ${s}`+` provided in the "measurementId" field in the local Firebase config. [${e.message}]`),{appId:o,measurementId:s};throw e}try{const c=await $e(n);return i.deleteThrottleMetadata(o),c}catch(e){if(!qe(e)){if(i.deleteThrottleMetadata(o),s)return ke.warn("Failed to fetch this Firebase app's measurement ID from the server."+` Falling back to the measurement ID ${s}`+` provided in the "measurementId" field in the local Firebase config. [${e.message}]`),{appId:o,measurementId:s};throw e}const u=503===Number(e.customData.httpStatus)?S(r,i.intervalMillis,Me):S(r,i.intervalMillis),l={throttleEndTimeMillis:Date.now()+u,backoffCount:r+1};return i.setThrottleMetadata(o,l),ke.debug(`Calling attemptFetch again in ${u} millis`),t(n,l,a,i)}}({appId:r,apiKey:a,measurementId:i},e,o,t)}function He(a,i){return new Promise((e,t)=>{var n=Math.max(i-Date.now(),0);const r=setTimeout(e,n);a.addEventListener(()=>{clearTimeout(r),t(xe.create("fetch-throttle",{throttleEndTimeMillis:i}))})})}function qe(e){if(!(e instanceof m&&e.customData))return!1;e=Number(e.customData.httpStatus);return 429===e||500===e||503===e||504===e}class Ve{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}async function Ke(t,e,n,r,a,i,o){const s=Be(t);s.then(e=>{n[e.measurementId]=e.appId,t.options.measurementId&&e.measurementId!==t.options.measurementId&&ke.warn(`The measurement ID in the local Firebase config (${t.options.measurementId})`+` does not match the measurement ID fetched from the server (${e.measurementId}).`+" To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.")}).catch(e=>ke.error(e)),e.push(s);var c=async function(){if(!f())return ke.warn(xe.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await d()}catch(e){return ke.warn(xe.create("indexeddb-unavailable",{errorInfo:e}).message),!1}return!0}().then(e=>{if(e)return r.getId()}),[e,c]=await Promise.all([s,c]);!function(){var e=window.document.getElementsByTagName("script");for(const t of Object.values(e))if(t.src&&t.src.includes(Ne))return t}()&&function(e,t){const n=document.createElement("script");n.src=`${Ne}?l=${e}&id=${t}`,n.async=!0,document.head.appendChild(n)}(i,e.measurementId),a("js",new Date);const u=null!==(o=null==o?void 0:o.config)&&void 0!==o?o:{};return u[Ae]="firebase",u.update=!0,null!=c&&(u[De]=c),a("config",e.measurementId,u),e.measurementId}class Ue{constructor(e){this.app=e}_delete(){return delete Ge[this.app.options.appId],Promise.resolve()}}let Ge={},We=[];const ze={};let Je="dataLayer",Ye="gtag",Xe,Ze,Qe=!1;function et(e){if(Qe)throw xe.create("already-initialized");e.dataLayerName&&(Je=e.dataLayerName),e.gtagName&&(Ye=e.gtagName)}function tt(e,t,n){!function(){const e=[];var t;p()&&e.push("This is a browser extension environment."),h()||e.push("Cookies are not available."),0<e.length&&(t=e.map((e,t)=>`(${t+1}) ${e}`).join(" "),t=xe.create("invalid-analytics-context",{errorInfo:t}),ke.warn(t.message))}();var r,a,i=e.options.appId;if(!i)throw xe.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw xe.create("no-api-key");ke.warn('The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest'+` measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId}`+' provided in the "measurementId" field in the local Firebase config.')}if(null!=Ge[i])throw xe.create("already-exists",{id:i});return Qe||(function(e){let t=[];Array.isArray(window[e])?t=window[e]:window[e]=t,t}(Je),{wrappedGtag:r,gtagCore:a}=function(e,t,n,r,a){let i=function(){window[r].push(arguments)};return window[a]&&"function"==typeof window[a]&&(i=window[a]),window[a]=Le(i,e,t,n),{gtagCore:i,wrappedGtag:window[a]}}(Ge,We,ze,Je,Ye),Ze=r,Xe=a,Qe=!0),Ge[i]=Ke(e,We,ze,t,Xe,Je,n),new Ue(e)}async function nt(){if(p())return!1;if(!h())return!1;if(!f())return!1;try{return await d()}catch(e){return!1}}function rt(e,t,n){e=C(e),async function(e,t,n,r){if(r&&r.global)return e("set",{screen_name:n}),Promise.resolve();e("config",await t,{update:!0,screen_name:n})}(Ze,Ge[e.app.options.appId],t,n).catch(e=>ke.error(e))}function at(e,t,n){e=C(e),async function(e,t,n,r){if(r&&r.global)return e("set",{user_id:n}),Promise.resolve();e("config",await t,{update:!0,user_id:n})}(Ze,Ge[e.app.options.appId],t,n).catch(e=>ke.error(e))}function it(e,t,n){e=C(e),async function(e,t,n,r){if(r&&r.global){const a={};for(const i of Object.keys(n))a[`user_properties.${i}`]=n[i];return e("set",a),Promise.resolve()}e("config",await t,{update:!0,user_properties:n})}(Ze,Ge[e.app.options.appId],t,n).catch(e=>ke.error(e))}function ot(e,t){e=C(e),async function(e,t){e=await e,window[`ga-disable-${e}`]=!t}(Ge[e.app.options.appId],t).catch(e=>ke.error(e))}function st(e,t,n,r){e=C(e),async function(e,t,n,r,a){a&&a.global?e("event",n,r):(t=await t,e("event",n,Object.assign(Object.assign({},r),{send_to:t})))}(Ze,Ge[e.app.options.appId],t,n,r).catch(e=>ke.error(e))}dt._registerComponent(new O(Pe,(e,{options:t})=>{return tt(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t)},"PUBLIC")),dt._registerComponent(new O("analytics-internal",function(e){try{const r=e.getProvider(Pe).getImmediate();return{logEvent:(e,t,n)=>st(r,e,t,n)}}catch(e){throw xe.create("interop-component-reg-failed",{reason:e})}},"PRIVATE")),dt.registerVersion("@firebase/analytics","0.7.0-canary.ff9baf70c");var ct,ut;class lt{constructor(e,t){this.app=e,this._delegate=t}logEvent(e,t,n){st(this._delegate,e,t,n)}setCurrentScreen(e,t){rt(this._delegate,e,t)}setUserId(e,t){at(this._delegate,e,t)}setUserProperties(e,t){it(this._delegate,e,t)}setAnalyticsCollectionEnabled(e){ot(this._delegate,e)}}(u=ct=ct||{}).ADD_SHIPPING_INFO="add_shipping_info",u.ADD_PAYMENT_INFO="add_payment_info",u.ADD_TO_CART="add_to_cart",u.ADD_TO_WISHLIST="add_to_wishlist",u.BEGIN_CHECKOUT="begin_checkout",u.CHECKOUT_PROGRESS="checkout_progress",u.EXCEPTION="exception",u.GENERATE_LEAD="generate_lead",u.LOGIN="login",u.PAGE_VIEW="page_view",u.PURCHASE="purchase",u.REFUND="refund",u.REMOVE_FROM_CART="remove_from_cart",u.SCREEN_VIEW="screen_view",u.SEARCH="search",u.SELECT_CONTENT="select_content",u.SELECT_ITEM="select_item",u.SELECT_PROMOTION="select_promotion",u.SET_CHECKOUT_OPTION="set_checkout_option",u.SHARE="share",u.SIGN_UP="sign_up",u.TIMING_COMPLETE="timing_complete",u.VIEW_CART="view_cart",u.VIEW_ITEM="view_item",u.VIEW_ITEM_LIST="view_item_list",u.VIEW_PROMOTION="view_promotion",u.VIEW_SEARCH_RESULTS="view_search_results";const pt=e=>{var t=e.getProvider("app-compat").getImmediate(),e=e.getProvider("analytics").getImmediate();return new lt(t,e)};ut={Analytics:lt,settings:et,isSupported:nt,EventName:ct},t.default.INTERNAL.registerComponent(new O("analytics-compat",pt,"PUBLIC").setServiceProps(ut).setMultipleInstances(!0)),t.default.registerVersion("@firebase/analytics-compat","0.1.1-canary.ff9baf70c")}.apply(this,arguments)}catch(e){throw console.error(e),new Error("Cannot instantiate firebase-analytics-compat.js - be sure to load firebase-app.js first.")}});
2
2
  //# sourceMappingURL=firebase-analytics-compat.js.map
@@ -1,4 +1,4 @@
1
- import { registerVersion, _registerComponent, _getProvider, getApp } from 'https://www.gstatic.com/firebasejs/9.0.2-canary.f5b5efe95/firebase-app.js';
1
+ import { registerVersion, _registerComponent, _getProvider, getApp } from 'https://www.gstatic.com/firebasejs/9.0.2-canary.ff9baf70c/firebase-app.js';
2
2
 
3
3
  /*! *****************************************************************************
4
4
  Copyright (c) Microsoft Corporation.
@@ -833,7 +833,7 @@ function openDb(name, version, upgradeCallback) {
833
833
  }
834
834
 
835
835
  const name$1 = "@firebase/installations";
836
- const version$1 = "0.5.0-canary.f5b5efe95";
836
+ const version$1 = "0.5.0-canary.ff9baf70c";
837
837
 
838
838
  /**
839
839
  * @license
@@ -2732,7 +2732,7 @@ async function setAnalyticsCollectionEnabled$1(initializationPromise, enabled) {
2732
2732
  *
2733
2733
  * @public
2734
2734
  *
2735
- * @param app - The {@link https://www.gstatic.com/firebasejs/9.0.2-canary.f5b5efe95/firebase-app.js#FirebaseApp} to use.
2735
+ * @param app - The {@link https://www.gstatic.com/firebasejs/9.0.2-canary.ff9baf70c/firebase-app.js#FirebaseApp} to use.
2736
2736
  */
2737
2737
  function getAnalytics(app = getApp()) {
2738
2738
  app = getModularInstance(app);
@@ -2748,7 +2748,7 @@ function getAnalytics(app = getApp()) {
2748
2748
  *
2749
2749
  * @public
2750
2750
  *
2751
- * @param app - The {@link https://www.gstatic.com/firebasejs/9.0.2-canary.f5b5efe95/firebase-app.js#FirebaseApp} to use.
2751
+ * @param app - The {@link https://www.gstatic.com/firebasejs/9.0.2-canary.ff9baf70c/firebase-app.js#FirebaseApp} to use.
2752
2752
  */
2753
2753
  function initializeAnalytics(app, options = {}) {
2754
2754
  // Dependencies
@@ -2857,7 +2857,7 @@ function logEvent(analyticsInstance, eventName, eventParams, options) {
2857
2857
  }
2858
2858
 
2859
2859
  const name = "@firebase/analytics";
2860
- const version = "0.7.0-canary.f5b5efe95";
2860
+ const version = "0.7.0-canary.ff9baf70c";
2861
2861
 
2862
2862
  /**
2863
2863
  * Firebase Analytics
@@ -1,4 +1,4 @@
1
1
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("@firebase/app-compat"),require("@firebase/app")):"function"==typeof define&&define.amd?define(["@firebase/app-compat","@firebase/app"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).firebase,e.firebase.INTERNAL.modularAPIs)}(this,function(ge,ye){"use strict";try{!function(){function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=e(ge),n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function a(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var p={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var r=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[],o=0;o<e.length;o+=3){var i=e[o],a=o+1<e.length,s=a?e[o+1]:0,c=o+2<e.length,p=c?e[o+2]:0,l=(15&s)<<2|p>>6,p=63&p;c||(p=64,a||(l=64)),n.push(r[i>>2],r[(3&i)<<4|s>>4],r[l],r[p])}return n.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(function(e){for(var t=[],r=0,n=0;n<e.length;n++){var o=e.charCodeAt(n);o<128?t[r++]=o:(o<2048?t[r++]=o>>6|192:(55296==(64512&o)&&n+1<e.length&&56320==(64512&e.charCodeAt(n+1))?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n)),t[r++]=o>>18|240,t[r++]=o>>12&63|128):t[r++]=o>>12|224,t[r++]=o>>6&63|128),t[r++]=63&o|128)}return t}(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],r=0,n=0;r<e.length;){var o,i,a,s=e[r++];s<128?t[n++]=String.fromCharCode(s):191<s&&s<224?(i=e[r++],t[n++]=String.fromCharCode((31&s)<<6|63&i)):239<s&&s<365?(o=((7&s)<<18|(63&(i=e[r++]))<<12|(63&(a=e[r++]))<<6|63&e[r++])-65536,t[n++]=String.fromCharCode(55296+(o>>10)),t[n++]=String.fromCharCode(56320+(1023&o))):(i=e[r++],a=e[r++],t[n++]=String.fromCharCode((15&s)<<12|(63&i)<<6|63&a))}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var r=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[],o=0;o<e.length;){var i=r[e.charAt(o++)],a=o<e.length?r[e.charAt(o)]:0,s=++o<e.length?r[e.charAt(o)]:64,c=++o<e.length?r[e.charAt(o)]:64;if(++o,null==i||null==a||null==s||null==c)throw Error();n.push(i<<2|a>>4),64!==s&&(n.push(a<<4&240|s>>2),64!==c&&n.push(s<<6&192|c))}return n},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),(this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e)>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},s=function(e){try{return p.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null},c=(r.prototype.wrapCallback=function(r){var n=this;return function(e,t){e?n.reject(e):n.resolve(t),"function"==typeof r&&(n.promise.catch(function(){}),1===r.length?r(e):r(e,t))}},r);function r(){var r=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise(function(e,t){r.resolve=e,r.reject=t})}function o(){return"indexedDB"in self&&null!=indexedDB}var i,l=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(h,i=Error),h);function h(e,t,r){t=i.call(this,t)||this;return t.code=e,t.customData=r,t.name="FirebaseError",Object.setPrototypeOf(t,h.prototype),Error.captureStackTrace&&Error.captureStackTrace(t,u.prototype.create),t}var u=(f.prototype.create=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n,o=t[0]||{},i=this.service+"/"+e,e=this.errors[e],e=e?(n=o,e.replace(d,function(e,t){var r=n[t];return null!=r?String(r):"<"+t+"?>"})):"Error",e=this.serviceName+": "+e+" ("+i+").";return new l(i,e,o)},f);function f(e,t,r){this.service=e,this.serviceName=t,this.errors=r}var d=/\{\$([^}]+)}/g;function g(e){return JSON.parse(e)}function y(e){return"object"==typeof(e=function(e){var t={},r={},n={},o="";try{var i=e.split("."),t=g(s(i[0])||""),r=g(s(i[1])||""),o=i[2],n=r.d||{};delete r.d}catch(e){}return{header:t,claims:r,data:n,signature:o}}(e).claims)&&e.hasOwnProperty("iat")?e.iat:null}var b,v=(E.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},E.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},E.prototype.setServiceProps=function(e){return this.serviceProps=e,this},E.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},E);function E(e,t,r){this.name=e,this.instanceFactory=t,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}(A=b=b||{})[A.DEBUG=0]="DEBUG",A[A.VERBOSE=1]="VERBOSE",A[A.INFO=2]="INFO",A[A.WARN=3]="WARN",A[A.ERROR=4]="ERROR",A[A.SILENT=5]="SILENT";function _(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!(t<e.logLevel)){var o=(new Date).toISOString(),i=w[t];if(!i)throw new Error("Attempted to log a message with an invalid logType (value: "+t+")");console[i].apply(console,a(["["+o+"] "+e.name+":"],r))}}var m={debug:b.DEBUG,verbose:b.VERBOSE,info:b.INFO,warn:b.WARN,error:b.ERROR,silent:b.SILENT},k=b.INFO,w=((A={})[b.DEBUG]="log",A[b.VERBOSE]="log",A[b.INFO]="info",A[b.WARN]="warn",A[b.ERROR]="error",A),A=(Object.defineProperty(T.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in b))throw new TypeError('Invalid value "'+e+'" assigned to `logLevel`');this._logLevel=e},enumerable:!1,configurable:!0}),T.prototype.setLogLevel=function(e){this._logLevel="string"==typeof e?m[e]:e},Object.defineProperty(T.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e},enumerable:!1,configurable:!0}),T.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,a([this,b.DEBUG],e)),this._logHandler.apply(this,a([this,b.DEBUG],e))},T.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,a([this,b.VERBOSE],e)),this._logHandler.apply(this,a([this,b.VERBOSE],e))},T.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,a([this,b.INFO],e)),this._logHandler.apply(this,a([this,b.INFO],e))},T.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,a([this,b.WARN],e)),this._logHandler.apply(this,a([this,b.WARN],e))},T.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,a([this,b.ERROR],e)),this._logHandler.apply(this,a([this,b.ERROR],e))},T);function T(e){this.name=e,this._logLevel=k,this._logHandler=_,this._userLogHandler=null}const O=new Map,C={activated:!1,tokenObservers:[]},S={enabled:!1};function R(e){return O.get(e)||C}function I(e,t){O.set(e,t)}const P="https://content-firebaseappcheck.googleapis.com/v1beta",N="exchangeDebugToken",x={OFFSET_DURATION:3e5,RETRIAL_MIN_WAIT:3e4,RETRIAL_MAX_WAIT:96e4};class L{constructor(e,t,r,n,o){if(this.operation=e,this.retryPolicy=t,this.getWaitDuration=r,this.lowerBound=n,this.upperBound=o,this.pending=null,o<(this.nextErrorWaitInterval=n))throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}async process(e){this.stop();try{this.pending=new c,t=this.getNextRun(e),await new Promise(e=>{setTimeout(e,t)}),this.pending.resolve(),await this.pending.promise,this.pending=new c,await this.operation(),this.pending.resolve(),await this.pending.promise,this.process(!0).catch(()=>{})}catch(e){this.retryPolicy(e)?this.process(!1).catch(()=>{}):this.stop()}var t}getNextRun(e){if(e)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();e=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),e}}const B=new u("appCheck","AppCheck",{"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error."});function M(){return self.grecaptcha}function j(e){if(!R(e).activated)throw B.create("use-before-activation",{appName:e.name})}async function D({url:e,body:t},r){const n={"Content-Type":"application/json"},o=r.getImmediate({optional:!0});o&&(n["X-Firebase-Client"]=o.getPlatformInfoString());t={method:"POST",body:JSON.stringify(t),headers:n};let i;try{i=await fetch(e,t)}catch(e){throw B.create("fetch-network-error",{originalErrorMessage:e.message})}if(200!==i.status)throw B.create("fetch-status-error",{httpStatus:i.status});let a;try{a=await i.json()}catch(e){throw B.create("fetch-parse-error",{originalErrorMessage:e.message})}e=a.ttl.match(/^([\d.]+)(s)$/);if(!e||!e[2]||isNaN(Number(e[1])))throw B.create("fetch-parse-error",{originalErrorMessage:"ttl field (timeToLive) is not in standard Protobuf Duration "+`format: ${a.ttl}`});t=1e3*Number(e[1]),e=Date.now();return{token:a.attestationToken,expireTimeMillis:e+t,issuedAtTimeMillis:e}}const H="firebase-app-check-database",W=1,F="firebase-app-check-store",$="debug-token";let V=null;function U(){return V||(V=new Promise((t,r)=>{try{const e=indexedDB.open(H,W);e.onsuccess=e=>{t(e.target.result)},e.onerror=e=>{r(B.create("storage-open",{originalErrorMessage:null===(e=e.target.error)||void 0===e?void 0:e.message}))},e.onupgradeneeded=e=>{const t=e.target.result;0===e.oldVersion&&t.createObjectStore(F,{keyPath:"compositeKey"})}}catch(e){r(B.create("storage-open",{originalErrorMessage:e.message}))}}),V)}async function K(e,t){const r=await U(),n=r.transaction(F,"readwrite"),o=n.objectStore(F),i=o.put({compositeKey:e,value:t});return new Promise((t,r)=>{i.onsuccess=e=>{t()},n.onerror=e=>{r(B.create("storage-set",{originalErrorMessage:null===(e=e.target.error)||void 0===e?void 0:e.message}))}})}async function z(e){const t=await U(),n=t.transaction(F,"readonly"),r=n.objectStore(F),o=r.get(e);return new Promise((t,r)=>{o.onsuccess=e=>{e=e.target.result;t(e?e.value:void 0)},n.onerror=e=>{r(B.create("storage-get",{originalErrorMessage:null===(e=e.target.error)||void 0===e?void 0:e.message}))}})}function G(e){return`${e.options.appId}-${e.name}`}const X=new A("@firebase/app-check");async function q(t){if(o()){let e=void 0;try{e=await z(G(t))}catch(e){X.warn(`Failed to read token from IndexedDB. Error: ${e}`)}return e}}function J(e,t){return o()?K(G(e),t).catch(e=>{X.warn(`Failed to write token to IndexedDB. Error: ${e}`)}):Promise.resolve()}async function Y(){let e=void 0;try{e=await z($)}catch(e){}if(e)return e;var t,r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0,r="x"===e?t:3&t|8;return r.toString(16)});return t=r,K($,t).catch(e=>X.warn(`Failed to persist debug token to IndexedDB. Error: ${e}`)),console.log(`App Check debug token: ${r}. You will need to add it to your app's App Check settings in the Firebase console for it to work`),r}const Z={error:"UNKNOWN_ERROR"};async function Q(e,t=!1){var r,n=e.app;j(n);const o=R(n);let i=o.token,a=void 0;if(i||(r=await o.cachedTokenPromise)&&ne(r)&&(i=r,I(n,Object.assign(Object.assign({},o),{token:i})),re(n,{token:i.token})),!t&&i&&ne(i))return{token:i.token};if(S.enabled){var s=await D(function(e,t){var{projectId:r,appId:n,apiKey:e}=e.options;return{url:`${P}/projects/${r}/apps/${n}:${N}?key=${e}`,body:{debug_token:t}}}(n,await async function(){var e=S;if(e.enabled&&e.token)return e.token.promise;throw Error(`
2
2
  Can't get debug token in production mode.
3
- `)}()),e.platformLoggerProvider);return await J(n,s),I(n,Object.assign(Object.assign({},o),{token:s})),{token:s.token}}try{i=await o.provider.getToken()}catch(e){X.error(e),a=e}let c;return i?(c={token:i.token},I(n,Object.assign(Object.assign({},o),{token:i})),await J(n,i)):c=(s=a,{token:function(e){return p.encodeString(JSON.stringify(e),!1)}(Z),error:s}),re(n,c),c}function ee(e,t,r,n){var o=e["app"];const i=R(o);t={next:r,error:n,type:t};const a=Object.assign(Object.assign({},i),{tokenObservers:[...i.tokenObservers,t]});if(a.tokenRefresher||(e=function(r){const n=r["app"];return new L(async()=>{var e=R(n);let t;if(t=e.token?await Q(r,!0):await Q(r),t.error)throw t.error},()=>!0,()=>{var e=R(n);if(e.token){var t=e.token.issuedAtTimeMillis+.5*(e.token.expireTimeMillis-e.token.issuedAtTimeMillis)+3e5,e=e.token.expireTimeMillis-3e5,t=Math.min(t,e);return Math.max(0,t-Date.now())}return 0},x.RETRIAL_MIN_WAIT,x.RETRIAL_MAX_WAIT)}(e),a.tokenRefresher=e),!a.tokenRefresher.isRunning()&&i.isTokenAutoRefreshEnabled&&a.tokenRefresher.start(),i.token&&ne(i.token)){const s=i.token;Promise.resolve().then(()=>r({token:s.token})).catch(()=>{})}else null==i.token&&i.cachedTokenPromise.then(e=>{e&&ne(e)&&r({token:e.token})}).catch(()=>{});I(o,a)}function te(e,t){const r=R(e);var n=r.tokenObservers.filter(e=>e.next!==t);0===n.length&&r.tokenRefresher&&r.tokenRefresher.isRunning()&&r.tokenRefresher.stop(),I(e,Object.assign(Object.assign({},r),{tokenObservers:n}))}function re(e,t){for(const r of R(e).tokenObservers)try{"EXTERNAL"===r.type&&null!=t.error?r.error(t.error):r.next(t)}catch(e){}}function ne(e){return 0<e.expireTimeMillis-Date.now()}class oe{constructor(e,t){this.app=e,this.platformLoggerProvider=t}_delete(){var e=R(this.app)["tokenObservers"];for(const t of e)te(this.app,t.next);return Promise.resolve()}}const ie="https://www.google.com/recaptcha/api.js";function ae(t,r){var e=R(t);const n=new c;I(t,Object.assign(Object.assign({},e),{reCAPTCHAState:{initialized:n}}));const o=`fire_app_check_${t.name}`,i=document.createElement("div");i.id=o,i.style.display="none",document.body.appendChild(i);const a=M();return a?a.ready(()=>{se(t,r,a,o),n.resolve(a)}):function(e){const t=document.createElement("script");t.src=`${ie}`,t.onload=e,document.head.appendChild(t)}(()=>{const e=M();if(!e)throw new Error("no recaptcha");e.ready(()=>{se(t,r,e,o),n.resolve(e)})}),n.promise}function se(e,t,r,n){n=r.render(n,{sitekey:t,size:"invisible"}),t=R(e);I(e,Object.assign(Object.assign({},t),{reCAPTCHAState:Object.assign(Object.assign({},t.reCAPTCHAState),{widgetId:n})}))}class ce{constructor(e){this._siteKey=e}async getToken(){if(!this._app||!this._platformLoggerProvider)throw B.create("use-before-activation",{appName:""});var e=await async function(n){j(n);const o=await R(n).reCAPTCHAState.initialized.promise;return new Promise((e,t)=>{const r=R(n).reCAPTCHAState;o.ready(()=>{e(o.execute(r.widgetId,{action:"fire_app_check"}))})})}(this._app).catch(e=>{throw B.create("recaptcha-error")});return D(function(e,t){var{projectId:r,appId:n,apiKey:e}=e.options;return{url:`${P}/projects/${r}/apps/${n}:exchangeRecaptchaToken?key=${e}`,body:{recaptcha_token:t}}}(this._app,e),this._platformLoggerProvider)}initialize(e){this._app=e,this._platformLoggerProvider=ye._getProvider(e,"platform-logger"),ae(e,this._siteKey).catch(()=>{})}isEqual(e){return e instanceof ce&&this._siteKey===e._siteKey}}class pe{constructor(e){this._customProviderOptions=e}async getToken(){if(!this._app)throw B.create("use-before-activation",{appName:""});var e=await this._customProviderOptions.getToken(),t=y(e.token),t=null!==t&&t<Date.now()&&0<t?1e3*t:Date.now();return Object.assign(Object.assign({},e),{issuedAtTimeMillis:t})}initialize(e){this._app=e}isEqual(e){return e instanceof pe&&this._customProviderOptions.getToken.toString()===e._customProviderOptions.getToken.toString()}}function le(e=ye.getApp(),t){var r;e=(r=e)&&r._delegate?r._delegate:r;const n=ye._getProvider(e,"app-check");if(n.isInitialized()){var o=n.getImmediate();const i=n.getOptions();if(i.isTokenAutoRefreshEnabled===t.isTokenAutoRefreshEnabled&&i.provider.isEqual(t.provider))return o;throw B.create("already-initialized",{appName:e.name})}o=n.initialize({options:t});return function(t,e,r){const n=R(t),o=Object.assign(Object.assign({},n),{activated:!0});o.provider=e,o.cachedTokenPromise=q(t).then(e=>(e&&ne(e)&&I(t,Object.assign(Object.assign({},R(t)),{token:e})),e)),o.isTokenAutoRefreshEnabled=void 0===r?t.automaticDataCollectionEnabled:r,I(t,o),o.provider.initialize(t)}(e,t.provider,t.isTokenAutoRefreshEnabled),o}const he="app-check-internal";ye._registerComponent(new v("app-check",e=>{var t=e.getProvider("app").getImmediate(),e=e.getProvider("platform-logger");return t=t,e=e,new oe(t,e)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,r)=>{e.getProvider(he).initialize()})),ye._registerComponent(new v(he,e=>{var t,e=e.getProvider("app-check").getImmediate();return t=e,{getToken:e=>Q(t,e),addTokenListener:e=>ee(t,"INTERNAL",e),removeTokenListener:e=>te(t.app,e)}},"PUBLIC").setInstantiationMode("EXPLICIT")),ye.registerVersion("@firebase/app-check","0.4.0-canary.f5b5efe95"),function(){var e=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}();if("string"==typeof e.FIREBASE_APPCHECK_DEBUG_TOKEN||!0===e.FIREBASE_APPCHECK_DEBUG_TOKEN){const t=S;t.enabled=!0;const r=new c;t.token=r,"string"==typeof e.FIREBASE_APPCHECK_DEBUG_TOKEN?r.resolve(e.FIREBASE_APPCHECK_DEBUG_TOKEN):r.resolve(Y())}}();const ue=new u("appCheck","AppCheck",{"use-before-activation":"App Check is being used before activate() is called for FirebaseApp {$appName}. Call activate() before instantiating other Firebase services."});class fe{constructor(e){this.app=e}activate(e,t){let r;r="string"==typeof e?new ce(e):new pe({getToken:e.getToken}),this._delegate=le(this.app,{provider:r,isTokenAutoRefreshEnabled:t})}setTokenAutoRefreshEnabled(e){if(!this._delegate)throw ue.create("use-before-activation",{appName:this.app.name});!function(e,t){const r=R(e=e.app);r.tokenRefresher&&(!0===t?r.tokenRefresher.start():r.tokenRefresher.stop()),I(e,Object.assign(Object.assign({},r),{isTokenAutoRefreshEnabled:t}))}(this._delegate,e)}getToken(e){if(!this._delegate)throw ue.create("use-before-activation",{appName:this.app.name});return async function(e,t){if((t=await Q(e,t)).error)throw t.error;return{token:t.token}}(this._delegate,e)}onTokenChanged(e,t,r){if(!this._delegate)throw ue.create("use-before-activation",{appName:this.app.name});return function(e,t,r){let n=()=>{},o=()=>{};return n=null!=t.next?t.next.bind(t):t,null!=t.error?o=t.error.bind(t):r&&(o=r),ee(e,"EXTERNAL",n,o),()=>te(e.app,n)}(this._delegate,e,t)}}const de=e=>{e=e.getProvider("app-compat").getImmediate();return new fe(e)};t.default.INTERNAL.registerComponent(new v("appCheck-compat",de,"PUBLIC")),t.default.registerVersion("@firebase/app-check-compat","0.1.1-canary.f5b5efe95")}.apply(this,arguments)}catch(e){throw console.error(e),new Error("Cannot instantiate firebase-app-check-compat.js - be sure to load firebase-app.js first.")}});
3
+ `)}()),e.platformLoggerProvider);return await J(n,s),I(n,Object.assign(Object.assign({},o),{token:s})),{token:s.token}}try{i=await o.provider.getToken()}catch(e){X.error(e),a=e}let c;return i?(c={token:i.token},I(n,Object.assign(Object.assign({},o),{token:i})),await J(n,i)):c=(s=a,{token:function(e){return p.encodeString(JSON.stringify(e),!1)}(Z),error:s}),re(n,c),c}function ee(e,t,r,n){var o=e["app"];const i=R(o);t={next:r,error:n,type:t};const a=Object.assign(Object.assign({},i),{tokenObservers:[...i.tokenObservers,t]});if(a.tokenRefresher||(e=function(r){const n=r["app"];return new L(async()=>{var e=R(n);let t;if(t=e.token?await Q(r,!0):await Q(r),t.error)throw t.error},()=>!0,()=>{var e=R(n);if(e.token){var t=e.token.issuedAtTimeMillis+.5*(e.token.expireTimeMillis-e.token.issuedAtTimeMillis)+3e5,e=e.token.expireTimeMillis-3e5,t=Math.min(t,e);return Math.max(0,t-Date.now())}return 0},x.RETRIAL_MIN_WAIT,x.RETRIAL_MAX_WAIT)}(e),a.tokenRefresher=e),!a.tokenRefresher.isRunning()&&i.isTokenAutoRefreshEnabled&&a.tokenRefresher.start(),i.token&&ne(i.token)){const s=i.token;Promise.resolve().then(()=>r({token:s.token})).catch(()=>{})}else null==i.token&&i.cachedTokenPromise.then(e=>{e&&ne(e)&&r({token:e.token})}).catch(()=>{});I(o,a)}function te(e,t){const r=R(e);var n=r.tokenObservers.filter(e=>e.next!==t);0===n.length&&r.tokenRefresher&&r.tokenRefresher.isRunning()&&r.tokenRefresher.stop(),I(e,Object.assign(Object.assign({},r),{tokenObservers:n}))}function re(e,t){for(const r of R(e).tokenObservers)try{"EXTERNAL"===r.type&&null!=t.error?r.error(t.error):r.next(t)}catch(e){}}function ne(e){return 0<e.expireTimeMillis-Date.now()}class oe{constructor(e,t){this.app=e,this.platformLoggerProvider=t}_delete(){var e=R(this.app)["tokenObservers"];for(const t of e)te(this.app,t.next);return Promise.resolve()}}const ie="https://www.google.com/recaptcha/api.js";function ae(t,r){var e=R(t);const n=new c;I(t,Object.assign(Object.assign({},e),{reCAPTCHAState:{initialized:n}}));const o=`fire_app_check_${t.name}`,i=document.createElement("div");i.id=o,i.style.display="none",document.body.appendChild(i);const a=M();return a?a.ready(()=>{se(t,r,a,o),n.resolve(a)}):function(e){const t=document.createElement("script");t.src=`${ie}`,t.onload=e,document.head.appendChild(t)}(()=>{const e=M();if(!e)throw new Error("no recaptcha");e.ready(()=>{se(t,r,e,o),n.resolve(e)})}),n.promise}function se(e,t,r,n){n=r.render(n,{sitekey:t,size:"invisible"}),t=R(e);I(e,Object.assign(Object.assign({},t),{reCAPTCHAState:Object.assign(Object.assign({},t.reCAPTCHAState),{widgetId:n})}))}class ce{constructor(e){this._siteKey=e}async getToken(){if(!this._app||!this._platformLoggerProvider)throw B.create("use-before-activation",{appName:""});var e=await async function(n){j(n);const o=await R(n).reCAPTCHAState.initialized.promise;return new Promise((e,t)=>{const r=R(n).reCAPTCHAState;o.ready(()=>{e(o.execute(r.widgetId,{action:"fire_app_check"}))})})}(this._app).catch(e=>{throw B.create("recaptcha-error")});return D(function(e,t){var{projectId:r,appId:n,apiKey:e}=e.options;return{url:`${P}/projects/${r}/apps/${n}:exchangeRecaptchaToken?key=${e}`,body:{recaptcha_token:t}}}(this._app,e),this._platformLoggerProvider)}initialize(e){this._app=e,this._platformLoggerProvider=ye._getProvider(e,"platform-logger"),ae(e,this._siteKey).catch(()=>{})}isEqual(e){return e instanceof ce&&this._siteKey===e._siteKey}}class pe{constructor(e){this._customProviderOptions=e}async getToken(){if(!this._app)throw B.create("use-before-activation",{appName:""});var e=await this._customProviderOptions.getToken(),t=y(e.token),t=null!==t&&t<Date.now()&&0<t?1e3*t:Date.now();return Object.assign(Object.assign({},e),{issuedAtTimeMillis:t})}initialize(e){this._app=e}isEqual(e){return e instanceof pe&&this._customProviderOptions.getToken.toString()===e._customProviderOptions.getToken.toString()}}function le(e=ye.getApp(),t){var r;e=(r=e)&&r._delegate?r._delegate:r;const n=ye._getProvider(e,"app-check");if(n.isInitialized()){var o=n.getImmediate();const i=n.getOptions();if(i.isTokenAutoRefreshEnabled===t.isTokenAutoRefreshEnabled&&i.provider.isEqual(t.provider))return o;throw B.create("already-initialized",{appName:e.name})}o=n.initialize({options:t});return function(t,e,r){const n=R(t),o=Object.assign(Object.assign({},n),{activated:!0});o.provider=e,o.cachedTokenPromise=q(t).then(e=>(e&&ne(e)&&I(t,Object.assign(Object.assign({},R(t)),{token:e})),e)),o.isTokenAutoRefreshEnabled=void 0===r?t.automaticDataCollectionEnabled:r,I(t,o),o.provider.initialize(t)}(e,t.provider,t.isTokenAutoRefreshEnabled),o}const he="app-check-internal";ye._registerComponent(new v("app-check",e=>{var t=e.getProvider("app").getImmediate(),e=e.getProvider("platform-logger");return t=t,e=e,new oe(t,e)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,r)=>{e.getProvider(he).initialize()})),ye._registerComponent(new v(he,e=>{var t,e=e.getProvider("app-check").getImmediate();return t=e,{getToken:e=>Q(t,e),addTokenListener:e=>ee(t,"INTERNAL",e),removeTokenListener:e=>te(t.app,e)}},"PUBLIC").setInstantiationMode("EXPLICIT")),ye.registerVersion("@firebase/app-check","0.4.0-canary.ff9baf70c"),function(){var e=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}();if("string"==typeof e.FIREBASE_APPCHECK_DEBUG_TOKEN||!0===e.FIREBASE_APPCHECK_DEBUG_TOKEN){const t=S;t.enabled=!0;const r=new c;t.token=r,"string"==typeof e.FIREBASE_APPCHECK_DEBUG_TOKEN?r.resolve(e.FIREBASE_APPCHECK_DEBUG_TOKEN):r.resolve(Y())}}();const ue=new u("appCheck","AppCheck",{"use-before-activation":"App Check is being used before activate() is called for FirebaseApp {$appName}. Call activate() before instantiating other Firebase services."});class fe{constructor(e){this.app=e}activate(e,t){let r;r="string"==typeof e?new ce(e):new pe({getToken:e.getToken}),this._delegate=le(this.app,{provider:r,isTokenAutoRefreshEnabled:t})}setTokenAutoRefreshEnabled(e){if(!this._delegate)throw ue.create("use-before-activation",{appName:this.app.name});!function(e,t){const r=R(e=e.app);r.tokenRefresher&&(!0===t?r.tokenRefresher.start():r.tokenRefresher.stop()),I(e,Object.assign(Object.assign({},r),{isTokenAutoRefreshEnabled:t}))}(this._delegate,e)}getToken(e){if(!this._delegate)throw ue.create("use-before-activation",{appName:this.app.name});return async function(e,t){if((t=await Q(e,t)).error)throw t.error;return{token:t.token}}(this._delegate,e)}onTokenChanged(e,t,r){if(!this._delegate)throw ue.create("use-before-activation",{appName:this.app.name});return function(e,t,r){let n=()=>{},o=()=>{};return n=null!=t.next?t.next.bind(t):t,null!=t.error?o=t.error.bind(t):r&&(o=r),ee(e,"EXTERNAL",n,o),()=>te(e.app,n)}(this._delegate,e,t)}}const de=e=>{e=e.getProvider("app-compat").getImmediate();return new fe(e)};t.default.INTERNAL.registerComponent(new v("appCheck-compat",de,"PUBLIC")),t.default.registerVersion("@firebase/app-check-compat","0.1.1-canary.ff9baf70c")}.apply(this,arguments)}catch(e){throw console.error(e),new Error("Cannot instantiate firebase-app-check-compat.js - be sure to load firebase-app.js first.")}});
4
4
  //# sourceMappingURL=firebase-app-check-compat.js.map
@@ -1,4 +1,4 @@
1
- import { _getProvider, getApp, _registerComponent, registerVersion } from 'https://www.gstatic.com/firebasejs/9.0.2-canary.f5b5efe95/firebase-app.js';
1
+ import { _getProvider, getApp, _registerComponent, registerVersion } from 'https://www.gstatic.com/firebasejs/9.0.2-canary.ff9baf70c/firebase-app.js';
2
2
 
3
3
  /*! *****************************************************************************
4
4
  Copyright (c) Microsoft Corporation.
@@ -1303,7 +1303,7 @@ function computeKey(app) {
1303
1303
  * See the License for the specific language governing permissions and
1304
1304
  * limitations under the License.
1305
1305
  */
1306
- const logger = new Logger('https://www.gstatic.com/firebasejs/9.0.2-canary.f5b5efe95/firebase-app.js-check');
1306
+ const logger = new Logger('https://www.gstatic.com/firebasejs/9.0.2-canary.ff9baf70c/firebase-app.js-check');
1307
1307
 
1308
1308
  /**
1309
1309
  * @license
@@ -1709,8 +1709,8 @@ function internalFactory(appCheck) {
1709
1709
  };
1710
1710
  }
1711
1711
 
1712
- const name = "https://www.gstatic.com/firebasejs/9.0.2-canary.f5b5efe95/firebase-app.js-check";
1713
- const version = "0.4.0-canary.f5b5efe95";
1712
+ const name = "https://www.gstatic.com/firebasejs/9.0.2-canary.ff9baf70c/firebase-app.js-check";
1713
+ const version = "0.4.0-canary.ff9baf70c";
1714
1714
 
1715
1715
  /**
1716
1716
  * @license
@@ -1942,7 +1942,7 @@ class CustomProvider {
1942
1942
  */
1943
1943
  /**
1944
1944
  * Activate App Check for the given app. Can be called only once per app.
1945
- * @param app - the {@link https://www.gstatic.com/firebasejs/9.0.2-canary.f5b5efe95/firebase-app.js#FirebaseApp} to activate App Check for
1945
+ * @param app - the {@link https://www.gstatic.com/firebasejs/9.0.2-canary.ff9baf70c/firebase-app.js#FirebaseApp} to activate App Check for
1946
1946
  * @param options - App Check initialization options
1947
1947
  * @public
1948
1948
  */
@@ -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";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};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 n(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 f(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 u(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 a(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))}function s(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var n in t)t.hasOwnProperty(n)&&"__proto__"!==n&&(e[n]=s(e[n],t[n]));return e}var i=(t.prototype.wrapCallback=function(n){var r=this;return function(e,t){e?r.reject(e):r.resolve(t),"function"==typeof n&&(r.promise.catch(function(){}),1===n.length?n(e):n(e,t))}},t);function t(){var n=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise(function(e,t){n.resolve=e,n.reject=t})}var o,c=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(l,o=Error),l);function l(e,t,n){t=o.call(this,t)||this;return t.code=e,t.customData=n,t.name="FirebaseError",Object.setPrototypeOf(t,l.prototype),Error.captureStackTrace&&Error.captureStackTrace(t,p.prototype.create),t}var p=(h.prototype.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,i=t[0]||{},o=this.service+"/"+e,e=this.errors[e],e=e?(r=i,e.replace(d,function(e,t){var n=r[t];return null!=n?String(n):"<"+t+"?>"})):"Error",e=this.serviceName+": "+e+" ("+o+").";return new c(o,e,i)},h);function h(e,t,n){this.service=e,this.serviceName=t,this.errors=n}var d=/\{\$([^}]+)}/g;function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function v(e,t){if(e===t)return 1;for(var n=Object.keys(e),r=Object.keys(t),i=0,o=n;i<o.length;i++){var a=o[i];if(!r.includes(a))return;var s=e[a],c=t[a];if(g(s)&&g(c)){if(!v(s,c))return}else if(s!==c)return}for(var l=0,p=r;l<p.length;l++){a=p[l];if(!n.includes(a))return}return 1}function g(e){return null!==e&&"object"==typeof e}function b(e,t){t=new y(e,t);return t.subscribe.bind(t)}var y=(I.prototype.next=function(t){this.forEachObserver(function(e){e.next(t)})},I.prototype.error=function(t){this.forEachObserver(function(e){e.error(t)}),this.close(t)},I.prototype.complete=function(){this.forEachObserver(function(e){e.complete()}),this.close()},I.prototype.subscribe=function(e,t,n){var r,i=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(e,t){if("object"!=typeof e||null===e)return!1;for(var n=0,r=t;n<r.length;n++){var i=r[n];if(i in e&&"function"==typeof e[i])return!0}return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n}).next&&(r.next=w),void 0===r.error&&(r.error=w),void 0===r.complete&&(r.complete=w);n=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(e){}}),this.observers.push(r),n},I.prototype.unsubscribeOne=function(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))},I.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},I.prototype.sendOne=function(e,t){var n=this;this.task.then(function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})},I.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(function(){t.observers=void 0,t.onNoObservers=void 0}))},I);function I(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(function(){e(n)}).catch(function(e){n.error(e)})}function w(){}var E=(_.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},_.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},_.prototype.setServiceProps=function(e){return this.serviceProps=e,this},_.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},_);function _(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}var O="[DEFAULT]",C=(N.prototype.get=function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){e=new i;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{var n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise},N.prototype.getImmediate=function(t){var e=this.normalizeInstanceIdentifier(null==t?void 0:t.identifier),t=null!==(t=null==t?void 0:t.optional)&&void 0!==t&&t;if(!this.isInitialized(e)&&!this.shouldAutoInitialize()){if(t)return null;throw Error("Service "+this.name+" is not available")}try{return this.getOrInitializeService({instanceIdentifier:e})}catch(e){if(t)return null;throw e}},N.prototype.getComponent=function(){return this.component},N.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:O})}catch(e){}try{for(var r=f(this.instancesDeferred.entries()),i=r.next();!i.done;i=r.next()){var o=u(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}}}},N.prototype.clearInstance=function(e){this.instancesDeferred.delete(e=void 0===e?O:e),this.instancesOptions.delete(e),this.instances.delete(e)},N.prototype.delete=function(){return e(this,void 0,void 0,function(){var t;return n(this,function(e){switch(e.label){case 0:return t=Array.from(this.instances.values()),[4,Promise.all(a(a([],u(t.filter(function(e){return"INTERNAL"in e}).map(function(e){return e.INTERNAL.delete()}))),u(t.filter(function(e){return"_delete"in e}).map(function(e){return e._delete()}))))];case 1:return e.sent(),[2]}})})},N.prototype.isComponentSet=function(){return null!=this.component},N.prototype.isInitialized=function(e){return this.instances.has(e=void 0===e?O:e)},N.prototype.getOptions=function(e){return this.instancesOptions.get(e=void 0===e?O:e)||{}},N.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=f(this.instancesDeferred.entries()),s=a.next();!s.done;s=a.next()){var c=u(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},N.prototype.onInit=function(e,t){var n=this.normalizeInstanceIdentifier(t),r=null!==(t=this.onInitCallbacks.get(n))&&void 0!==t?t:new Set;r.add(e),this.onInitCallbacks.set(n,r);t=this.instances.get(n);return t&&e(t,n),function(){r.delete(e)}},N.prototype.invokeOnInitCallbacks=function(e,t){var n,r,i=this.onInitCallbacks.get(t);if(i)try{for(var o=f(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}}},N.prototype.getOrInitializeService=function(e){var t=e.instanceIdentifier,n=e.options,r=void 0===n?{}:n,e=this.instances.get(t);if(!e&&this.component&&(e=this.component.instanceFactory(this.container,{instanceIdentifier:(n=t)===O?void 0:n,options:r}),this.instances.set(t,e),this.instancesOptions.set(t,r),this.invokeOnInitCallbacks(e,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,e)}catch(e){}return e||null},N.prototype.normalizeInstanceIdentifier=function(e){return void 0===e&&(e=O),!this.component||this.component.multipleInstances?e:O},N.prototype.shouldAutoInitialize=function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode},N);function N(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 L=(A.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)},A.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},A.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new C(e,this);return this.providers.set(e,t),t},A.prototype.getProviders=function(){return Array.from(this.providers.values())},A);function A(e){this.name=e,this.providers=new Map}var S,D=[];(z=S=S||{})[z.DEBUG=0]="DEBUG",z[z.VERBOSE=1]="VERBOSE",z[z.INFO=2]="INFO",z[z.WARN=3]="WARN",z[z.ERROR=4]="ERROR",z[z.SILENT=5]="SILENT";function R(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!(t<e.logLevel)){var i=(new Date).toISOString(),o=j[t];if(!o)throw new Error("Attempted to log a message with an invalid logType (value: "+t+")");console[o].apply(console,a(["["+i+"] "+e.name+":"],n))}}var P={debug:S.DEBUG,verbose:S.VERBOSE,info:S.INFO,warn:S.WARN,error:S.ERROR,silent:S.SILENT},k=S.INFO,j=((ce={})[S.DEBUG]="log",ce[S.VERBOSE]="log",ce[S.INFO]="info",ce[S.WARN]="warn",ce[S.ERROR]="error",ce),z=(Object.defineProperty(F.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in S))throw new TypeError('Invalid value "'+e+'" assigned to `logLevel`');this._logLevel=e},enumerable:!1,configurable:!0}),F.prototype.setLogLevel=function(e){this._logLevel="string"==typeof e?P[e]:e},Object.defineProperty(F.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e},enumerable:!1,configurable:!0}),F.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,a([this,S.DEBUG],e)),this._logHandler.apply(this,a([this,S.DEBUG],e))},F.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,a([this,S.VERBOSE],e)),this._logHandler.apply(this,a([this,S.VERBOSE],e))},F.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,a([this,S.INFO],e)),this._logHandler.apply(this,a([this,S.INFO],e))},F.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,a([this,S.WARN],e)),this._logHandler.apply(this,a([this,S.WARN],e))},F.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,a([this,S.ERROR],e)),this._logHandler.apply(this,a([this,S.ERROR],e))},F);function F(e){this.name=e,this._logLevel=k,this._logHandler=R,this._userLogHandler=null,D.push(this)}function T(a,t){for(var e=0,n=D;e<n.length;e++)!function(e){var o=null;t&&t.level&&(o=P[t.level]),e.userLogHandler=null===a?null:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n.map(function(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(function(e){return e}).join(" ");t>=(null!=o?o:e.logLevel)&&a({level:S[t].toLowerCase(),message:i,args:n,type:e.name})}}(n[e])}class x{constructor(e){this.container=e}getPlatformInfoString(){const e=this.container.getProviders();return e.map(e=>{if(function(e){e=e.getComponent();return"VERSION"===(null==e?void 0:e.type)}(e)){e=e.getImmediate();return`${e.library}/${e.version}`}return null}).filter(e=>e).join(" ")}}const H="@firebase/app",$=new z("@firebase/app");var M;const B="[DEFAULT]",V={"@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"},U=new Map,G=new Map;function W(t,n){try{t.container.addComponent(n)}catch(e){$.debug(`Component ${n.name} failed to register with FirebaseApp ${t.name}`,e)}}function Y(e,t){e.container.addOrOverwriteComponent(t)}function K(e){var t=e.name;if(G.has(t))return $.debug(`There were multiple attempts to register component ${t}.`),!1;G.set(t,e);for(const n of U.values())W(n,e);return!0}function J(e,t){return e.container.getProvider(t)}const X=new p("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 Z{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 E("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 X.create("app-deleted",{appName:this._name})}}const q="9.0.2-canary.f5b5efe95";function Q(e,t={}){if("object"!=typeof t){const r=t;t={name:r}}var n=Object.assign({name:B,automaticDataCollectionEnabled:!1},t);const r=n.name;if("string"!=typeof r||!r)throw X.create("bad-app-name",{appName:String(r)});t=U.get(r);if(t){if(v(e,t.options)&&v(n,t.config))return t;throw X.create("duplicate-app",{appName:r})}const i=new L(r);for(const o of G.values())i.addComponent(o);n=new Z(e,n,i);return U.set(r,n),n}async function ee(e){var t=e.name;U.has(t)&&(U.delete(t),await Promise.all(e.container.getProviders().map(e=>e.delete())),e.isDeleted=!0)}function te(e,t,n){var r;let i=null!==(r=V[e])&&void 0!==r?r:e;n&&(i+=`-${n}`);e=i.match(/\s|\//),n=t.match(/\s|\//);if(e||n){const o=[`Unable to register library "${i}" with version "${t}":`];return e&&o.push(`library name "${i}" contains illegal characters (whitespace or "/")`),e&&n&&o.push("and"),n&&o.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void $.warn(o.join(" "))}K(new E(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}function ne(e,t){if(null!==e&&"function"!=typeof e)throw X.create("invalid-log-argument");T(e,t)}function re(e){var t;t=e,D.forEach(function(e){e.setLogLevel(t)})}K(new E("platform-logger",e=>new x(e),"PRIVATE")),te(H,"0.7.0-canary.f5b5efe95",M),te("fire-js","");var ie=Object.freeze({__proto__:null,SDK_VERSION:q,_DEFAULT_ENTRY_NAME:B,_addComponent:W,_addOrOverwriteComponent:Y,_apps:U,_clearComponents:function(){G.clear()},_components:G,_getProvider:J,_registerComponent:K,_removeServiceInstance:function(e,t,n=B){J(e,t).clearInstance(n)},deleteApp:ee,getApp:function(e=B){var t=U.get(e);if(!t)throw X.create("no-app",{appName:e});return t},getApps:function(){return Array.from(U.values())},initializeApp:Q,onLog:ne,registerVersion:te,setLogLevel:re,FirebaseError:c});class oe{constructor(e,t){this._delegate=e,this.firebase=t,W(e,new E("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),ee(this._delegate)))}_getService(e,t=B){this._delegate.checkDestroyed();const n=this._delegate.container.getProvider(e);return n.isInitialized()||"EXPLICIT"!==(null===(e=n.getComponent())||void 0===e?void 0:e.instantiationMode)||n.initialize(),n.getImmediate({identifier:t})}_removeServiceInstance(e,t=B){this._delegate.container.getProvider(e).clearInstance(t)}_addComponent(e){W(this._delegate,e)}_addOrOverwriteComponent(e){Y(this._delegate,e)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}}const ae=new p("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 se(i){const n={},o={__esModule:!0,initializeApp:function(e,t={}){e=Q(e,t);if(m(n,e.name))return n[e.name];t=new i(e,o);return n[e.name]=t},app:a,registerVersion:te,setLogLevel:re,onLog:ne,apps:null,SDK_VERSION:q,INTERNAL:{registerComponent:function(n){const r=n.name,t=r.replace("-compat","");{var e;K(n)&&"PUBLIC"===n.type&&(e=(e=a())=>{if("function"!=typeof e[t])throw ae.create("invalid-app-argument",{appName:r});return e[t]()},void 0!==n.serviceProps&&s(e,n.serviceProps),o[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?o[t]:null},removeApp:function(e){delete n[e]},useAsService:function(e,t){if("serverAuth"===t)return null;return t},modularAPIs:ie}};function a(e){if(e=e||B,!m(n,e))throw ae.create("no-app",{appName:e});return n[e]}return o.default=o,Object.defineProperty(o,"apps",{get:function(){return Object.keys(n).map(e=>n[e])}}),a.App=i,o}var ce=function e(){const t=se(oe);return t.INTERNAL=Object.assign(Object.assign({},t.INTERNAL),{createFirebaseNamespace:e,extendNamespace:function(e){s(t,e)},createSubscribe:b,ErrorFactory:p,deepExtend:s}),t}();const le=new z("@firebase/app-compat");if("object"==typeof self&&self.self===self&&void 0!==self.firebase){le.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";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};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 n(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 f(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 u(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 a(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))}function s(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var n in t)t.hasOwnProperty(n)&&"__proto__"!==n&&(e[n]=s(e[n],t[n]));return e}var i=(t.prototype.wrapCallback=function(n){var r=this;return function(e,t){e?r.reject(e):r.resolve(t),"function"==typeof n&&(r.promise.catch(function(){}),1===n.length?n(e):n(e,t))}},t);function t(){var n=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise(function(e,t){n.resolve=e,n.reject=t})}var o,c=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(l,o=Error),l);function l(e,t,n){t=o.call(this,t)||this;return t.code=e,t.customData=n,t.name="FirebaseError",Object.setPrototypeOf(t,l.prototype),Error.captureStackTrace&&Error.captureStackTrace(t,p.prototype.create),t}var p=(h.prototype.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r,i=t[0]||{},o=this.service+"/"+e,e=this.errors[e],e=e?(r=i,e.replace(d,function(e,t){var n=r[t];return null!=n?String(n):"<"+t+"?>"})):"Error",e=this.serviceName+": "+e+" ("+o+").";return new c(o,e,i)},h);function h(e,t,n){this.service=e,this.serviceName=t,this.errors=n}var d=/\{\$([^}]+)}/g;function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function v(e,t){if(e===t)return 1;for(var n=Object.keys(e),r=Object.keys(t),i=0,o=n;i<o.length;i++){var a=o[i];if(!r.includes(a))return;var s=e[a],c=t[a];if(g(s)&&g(c)){if(!v(s,c))return}else if(s!==c)return}for(var l=0,p=r;l<p.length;l++){a=p[l];if(!n.includes(a))return}return 1}function g(e){return null!==e&&"object"==typeof e}function b(e,t){t=new y(e,t);return t.subscribe.bind(t)}var y=(I.prototype.next=function(t){this.forEachObserver(function(e){e.next(t)})},I.prototype.error=function(t){this.forEachObserver(function(e){e.error(t)}),this.close(t)},I.prototype.complete=function(){this.forEachObserver(function(e){e.complete()}),this.close()},I.prototype.subscribe=function(e,t,n){var r,i=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(e,t){if("object"!=typeof e||null===e)return!1;for(var n=0,r=t;n<r.length;n++){var i=r[n];if(i in e&&"function"==typeof e[i])return!0}return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n}).next&&(r.next=w),void 0===r.error&&(r.error=w),void 0===r.complete&&(r.complete=w);n=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(e){}}),this.observers.push(r),n},I.prototype.unsubscribeOne=function(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))},I.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},I.prototype.sendOne=function(e,t){var n=this;this.task.then(function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})},I.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(function(){t.observers=void 0,t.onNoObservers=void 0}))},I);function I(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(function(){e(n)}).catch(function(e){n.error(e)})}function w(){}var E=(_.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},_.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},_.prototype.setServiceProps=function(e){return this.serviceProps=e,this},_.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},_);function _(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}var O="[DEFAULT]",C=(N.prototype.get=function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){e=new i;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{var n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise},N.prototype.getImmediate=function(t){var e=this.normalizeInstanceIdentifier(null==t?void 0:t.identifier),t=null!==(t=null==t?void 0:t.optional)&&void 0!==t&&t;if(!this.isInitialized(e)&&!this.shouldAutoInitialize()){if(t)return null;throw Error("Service "+this.name+" is not available")}try{return this.getOrInitializeService({instanceIdentifier:e})}catch(e){if(t)return null;throw e}},N.prototype.getComponent=function(){return this.component},N.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:O})}catch(e){}try{for(var r=f(this.instancesDeferred.entries()),i=r.next();!i.done;i=r.next()){var o=u(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}}}},N.prototype.clearInstance=function(e){this.instancesDeferred.delete(e=void 0===e?O:e),this.instancesOptions.delete(e),this.instances.delete(e)},N.prototype.delete=function(){return e(this,void 0,void 0,function(){var t;return n(this,function(e){switch(e.label){case 0:return t=Array.from(this.instances.values()),[4,Promise.all(a(a([],u(t.filter(function(e){return"INTERNAL"in e}).map(function(e){return e.INTERNAL.delete()}))),u(t.filter(function(e){return"_delete"in e}).map(function(e){return e._delete()}))))];case 1:return e.sent(),[2]}})})},N.prototype.isComponentSet=function(){return null!=this.component},N.prototype.isInitialized=function(e){return this.instances.has(e=void 0===e?O:e)},N.prototype.getOptions=function(e){return this.instancesOptions.get(e=void 0===e?O:e)||{}},N.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=f(this.instancesDeferred.entries()),s=a.next();!s.done;s=a.next()){var c=u(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},N.prototype.onInit=function(e,t){var n=this.normalizeInstanceIdentifier(t),r=null!==(t=this.onInitCallbacks.get(n))&&void 0!==t?t:new Set;r.add(e),this.onInitCallbacks.set(n,r);t=this.instances.get(n);return t&&e(t,n),function(){r.delete(e)}},N.prototype.invokeOnInitCallbacks=function(e,t){var n,r,i=this.onInitCallbacks.get(t);if(i)try{for(var o=f(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}}},N.prototype.getOrInitializeService=function(e){var t=e.instanceIdentifier,n=e.options,r=void 0===n?{}:n,e=this.instances.get(t);if(!e&&this.component&&(e=this.component.instanceFactory(this.container,{instanceIdentifier:(n=t)===O?void 0:n,options:r}),this.instances.set(t,e),this.instancesOptions.set(t,r),this.invokeOnInitCallbacks(e,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,e)}catch(e){}return e||null},N.prototype.normalizeInstanceIdentifier=function(e){return void 0===e&&(e=O),!this.component||this.component.multipleInstances?e:O},N.prototype.shouldAutoInitialize=function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode},N);function N(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 L=(A.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)},A.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},A.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new C(e,this);return this.providers.set(e,t),t},A.prototype.getProviders=function(){return Array.from(this.providers.values())},A);function A(e){this.name=e,this.providers=new Map}var S,D=[];(z=S=S||{})[z.DEBUG=0]="DEBUG",z[z.VERBOSE=1]="VERBOSE",z[z.INFO=2]="INFO",z[z.WARN=3]="WARN",z[z.ERROR=4]="ERROR",z[z.SILENT=5]="SILENT";function R(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!(t<e.logLevel)){var i=(new Date).toISOString(),o=j[t];if(!o)throw new Error("Attempted to log a message with an invalid logType (value: "+t+")");console[o].apply(console,a(["["+i+"] "+e.name+":"],n))}}var P={debug:S.DEBUG,verbose:S.VERBOSE,info:S.INFO,warn:S.WARN,error:S.ERROR,silent:S.SILENT},k=S.INFO,j=((ce={})[S.DEBUG]="log",ce[S.VERBOSE]="log",ce[S.INFO]="info",ce[S.WARN]="warn",ce[S.ERROR]="error",ce),z=(Object.defineProperty(F.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in S))throw new TypeError('Invalid value "'+e+'" assigned to `logLevel`');this._logLevel=e},enumerable:!1,configurable:!0}),F.prototype.setLogLevel=function(e){this._logLevel="string"==typeof e?P[e]:e},Object.defineProperty(F.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e},enumerable:!1,configurable:!0}),F.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,a([this,S.DEBUG],e)),this._logHandler.apply(this,a([this,S.DEBUG],e))},F.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,a([this,S.VERBOSE],e)),this._logHandler.apply(this,a([this,S.VERBOSE],e))},F.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,a([this,S.INFO],e)),this._logHandler.apply(this,a([this,S.INFO],e))},F.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,a([this,S.WARN],e)),this._logHandler.apply(this,a([this,S.WARN],e))},F.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,a([this,S.ERROR],e)),this._logHandler.apply(this,a([this,S.ERROR],e))},F);function F(e){this.name=e,this._logLevel=k,this._logHandler=R,this._userLogHandler=null,D.push(this)}function T(a,t){for(var e=0,n=D;e<n.length;e++)!function(e){var o=null;t&&t.level&&(o=P[t.level]),e.userLogHandler=null===a?null:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n.map(function(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(function(e){return e}).join(" ");t>=(null!=o?o:e.logLevel)&&a({level:S[t].toLowerCase(),message:i,args:n,type:e.name})}}(n[e])}class x{constructor(e){this.container=e}getPlatformInfoString(){const e=this.container.getProviders();return e.map(e=>{if(function(e){e=e.getComponent();return"VERSION"===(null==e?void 0:e.type)}(e)){e=e.getImmediate();return`${e.library}/${e.version}`}return null}).filter(e=>e).join(" ")}}const H="@firebase/app",$=new z("@firebase/app");var M;const B="[DEFAULT]",V={"@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"},U=new Map,G=new Map;function W(t,n){try{t.container.addComponent(n)}catch(e){$.debug(`Component ${n.name} failed to register with FirebaseApp ${t.name}`,e)}}function Y(e,t){e.container.addOrOverwriteComponent(t)}function K(e){var t=e.name;if(G.has(t))return $.debug(`There were multiple attempts to register component ${t}.`),!1;G.set(t,e);for(const n of U.values())W(n,e);return!0}function J(e,t){return e.container.getProvider(t)}const X=new p("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 Z{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 E("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 X.create("app-deleted",{appName:this._name})}}const q="9.0.2-canary.ff9baf70c";function Q(e,t={}){if("object"!=typeof t){const r=t;t={name:r}}var n=Object.assign({name:B,automaticDataCollectionEnabled:!1},t);const r=n.name;if("string"!=typeof r||!r)throw X.create("bad-app-name",{appName:String(r)});t=U.get(r);if(t){if(v(e,t.options)&&v(n,t.config))return t;throw X.create("duplicate-app",{appName:r})}const i=new L(r);for(const o of G.values())i.addComponent(o);n=new Z(e,n,i);return U.set(r,n),n}async function ee(e){var t=e.name;U.has(t)&&(U.delete(t),await Promise.all(e.container.getProviders().map(e=>e.delete())),e.isDeleted=!0)}function te(e,t,n){var r;let i=null!==(r=V[e])&&void 0!==r?r:e;n&&(i+=`-${n}`);e=i.match(/\s|\//),n=t.match(/\s|\//);if(e||n){const o=[`Unable to register library "${i}" with version "${t}":`];return e&&o.push(`library name "${i}" contains illegal characters (whitespace or "/")`),e&&n&&o.push("and"),n&&o.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void $.warn(o.join(" "))}K(new E(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}function ne(e,t){if(null!==e&&"function"!=typeof e)throw X.create("invalid-log-argument");T(e,t)}function re(e){var t;t=e,D.forEach(function(e){e.setLogLevel(t)})}K(new E("platform-logger",e=>new x(e),"PRIVATE")),te(H,"0.7.0-canary.ff9baf70c",M),te("fire-js","");var ie=Object.freeze({__proto__:null,SDK_VERSION:q,_DEFAULT_ENTRY_NAME:B,_addComponent:W,_addOrOverwriteComponent:Y,_apps:U,_clearComponents:function(){G.clear()},_components:G,_getProvider:J,_registerComponent:K,_removeServiceInstance:function(e,t,n=B){J(e,t).clearInstance(n)},deleteApp:ee,getApp:function(e=B){var t=U.get(e);if(!t)throw X.create("no-app",{appName:e});return t},getApps:function(){return Array.from(U.values())},initializeApp:Q,onLog:ne,registerVersion:te,setLogLevel:re,FirebaseError:c});class oe{constructor(e,t){this._delegate=e,this.firebase=t,W(e,new E("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),ee(this._delegate)))}_getService(e,t=B){this._delegate.checkDestroyed();const n=this._delegate.container.getProvider(e);return n.isInitialized()||"EXPLICIT"!==(null===(e=n.getComponent())||void 0===e?void 0:e.instantiationMode)||n.initialize(),n.getImmediate({identifier:t})}_removeServiceInstance(e,t=B){this._delegate.container.getProvider(e).clearInstance(t)}_addComponent(e){W(this._delegate,e)}_addOrOverwriteComponent(e){Y(this._delegate,e)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}}const ae=new p("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 se(i){const n={},o={__esModule:!0,initializeApp:function(e,t={}){e=Q(e,t);if(m(n,e.name))return n[e.name];t=new i(e,o);return n[e.name]=t},app:a,registerVersion:te,setLogLevel:re,onLog:ne,apps:null,SDK_VERSION:q,INTERNAL:{registerComponent:function(n){const r=n.name,t=r.replace("-compat","");{var e;K(n)&&"PUBLIC"===n.type&&(e=(e=a())=>{if("function"!=typeof e[t])throw ae.create("invalid-app-argument",{appName:r});return e[t]()},void 0!==n.serviceProps&&s(e,n.serviceProps),o[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?o[t]:null},removeApp:function(e){delete n[e]},useAsService:function(e,t){if("serverAuth"===t)return null;return t},modularAPIs:ie}};function a(e){if(e=e||B,!m(n,e))throw ae.create("no-app",{appName:e});return n[e]}return o.default=o,Object.defineProperty(o,"apps",{get:function(){return Object.keys(n).map(e=>n[e])}}),a.App=i,o}var ce=function e(){const t=se(oe);return t.INTERNAL=Object.assign(Object.assign({},t.INTERNAL),{createFirebaseNamespace:e,extendNamespace:function(e){s(t,e)},createSubscribe:b,ErrorFactory:p,deepExtend:s}),t}();const le=new z("@firebase/app-compat");if("object"==typeof self&&self.self===self&&void 0!==self.firebase){le.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 fe=self.firebase.SDK_VERSION;fe&&0<=fe.indexOf("LITE")&&le.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 pe=ce;te("@firebase/app-compat","0.1.1-canary.f5b5efe95",void 0);return pe.registerVersion("firebase","9.0.2-canary.f5b5efe95","app-compat-cdn"),pe});
7
+ `)}const pe=ce;te("@firebase/app-compat","0.1.1-canary.ff9baf70c",void 0);return pe.registerVersion("firebase","9.0.2-canary.ff9baf70c","app-compat-cdn"),pe});
8
8
  //# sourceMappingURL=firebase-app-compat.js.map
package/firebase-app.js CHANGED
@@ -1038,8 +1038,8 @@ function isVersionServiceProvider(provider) {
1038
1038
  return (component === null || component === void 0 ? void 0 : component.type) === "VERSION" /* VERSION */;
1039
1039
  }
1040
1040
 
1041
- const name$o = "https://www.gstatic.com/firebasejs/9.0.2-canary.f5b5efe95/firebase-app.js";
1042
- const version$1 = "0.7.0-canary.f5b5efe95";
1041
+ const name$o = "https://www.gstatic.com/firebasejs/9.0.2-canary.ff9baf70c/firebase-app.js";
1042
+ const version$1 = "0.7.0-canary.ff9baf70c";
1043
1043
 
1044
1044
  /**
1045
1045
  * @license
@@ -1057,17 +1057,17 @@ const version$1 = "0.7.0-canary.f5b5efe95";
1057
1057
  * See the License for the specific language governing permissions and
1058
1058
  * limitations under the License.
1059
1059
  */
1060
- const logger = new Logger('https://www.gstatic.com/firebasejs/9.0.2-canary.f5b5efe95/firebase-app.js');
1060
+ const logger = new Logger('https://www.gstatic.com/firebasejs/9.0.2-canary.ff9baf70c/firebase-app.js');
1061
1061
 
1062
- const name$n = "https://www.gstatic.com/firebasejs/9.0.2-canary.f5b5efe95/firebase-app.js-compat";
1062
+ const name$n = "https://www.gstatic.com/firebasejs/9.0.2-canary.ff9baf70c/firebase-app.js-compat";
1063
1063
 
1064
1064
  const name$m = "@firebase/analytics-compat";
1065
1065
 
1066
1066
  const name$l = "@firebase/analytics";
1067
1067
 
1068
- const name$k = "https://www.gstatic.com/firebasejs/9.0.2-canary.f5b5efe95/firebase-app.js-check-compat";
1068
+ const name$k = "https://www.gstatic.com/firebasejs/9.0.2-canary.ff9baf70c/firebase-app.js-check-compat";
1069
1069
 
1070
- const name$j = "https://www.gstatic.com/firebasejs/9.0.2-canary.f5b5efe95/firebase-app.js-check";
1070
+ const name$j = "https://www.gstatic.com/firebasejs/9.0.2-canary.ff9baf70c/firebase-app.js-check";
1071
1071
 
1072
1072
  const name$i = "@firebase/auth";
1073
1073
 
@@ -1106,7 +1106,7 @@ const name$2 = "@firebase/firestore";
1106
1106
  const name$1 = "@firebase/firestore-compat";
1107
1107
 
1108
1108
  const name$p = "firebase";
1109
- const version$2 = "9.0.2-canary.f5b5efe95";
1109
+ const version$2 = "9.0.2-canary.ff9baf70c";
1110
1110
 
1111
1111
  /**
1112
1112
  * @license
@@ -1407,7 +1407,7 @@ function initializeApp(options, rawConfig = {}) {
1407
1407
  return newApp;
1408
1408
  }
1409
1409
  /**
1410
- * Retrieves a {@link https://www.gstatic.com/firebasejs/9.0.2-canary.f5b5efe95/firebase-app.js#FirebaseApp} instance.
1410
+ * Retrieves a {@link https://www.gstatic.com/firebasejs/9.0.2-canary.ff9baf70c/firebase-app.js#FirebaseApp} instance.
1411
1411
  *
1412
1412
  * When called with no arguments, the default app is returned. When an app name
1413
1413
  * is provided, the app corresponding to that name is returned.
@@ -1571,7 +1571,7 @@ function registerCoreComponents(variant) {
1571
1571
  registerCoreComponents();
1572
1572
 
1573
1573
  var name = "firebase";
1574
- var version = "9.0.2-canary.f5b5efe95";
1574
+ var version = "9.0.2-canary.ff9baf70c";
1575
1575
 
1576
1576
  /**
1577
1577
  * @license