firebase 9.2.0-canary.2322b6023 → 9.2.0-canary.dbfe09e9d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/dist/index.cjs.js +1 -1
- package/app/dist/index.esm.js +1 -1
- package/app/dist/index.mjs +1 -1
- package/compat/app/dist/index.cjs.js +1 -1
- package/compat/app/dist/index.esm.js +1 -1
- package/compat/app/dist/index.mjs +1 -1
- package/compat/dist/index.esm.js +2 -2
- package/compat/dist/index.node.cjs +2 -2
- package/compat/dist/index.rn.cjs.js +2 -2
- package/firebase-analytics-compat.js +1 -1
- package/firebase-analytics.js +5 -5
- package/firebase-app-check-compat.js +1 -1
- package/firebase-app-check.js +5 -5
- package/firebase-app-compat.js +2 -2
- package/firebase-app.js +9 -9
- package/firebase-auth-compat.js +1 -1
- package/firebase-auth.js +3 -3
- package/firebase-compat.js +4 -4
- package/firebase-compat.js.map +1 -1
- package/firebase-database-compat.js +1 -1
- package/firebase-database.js +5 -5
- package/firebase-firestore-compat.js +1 -1
- package/firebase-firestore-compat.js.map +1 -1
- package/firebase-firestore-lite.js +1089 -1089
- package/firebase-firestore-lite.js.map +1 -1
- package/firebase-firestore.js +8 -8
- package/firebase-firestore.js.map +1 -1
- package/firebase-functions-compat.js +1 -1
- package/firebase-functions.js +3 -3
- package/firebase-messaging-compat.js +1 -1
- package/firebase-messaging-sw.js +2 -2
- package/firebase-messaging.js +3 -3
- package/firebase-performance-compat.js +1 -1
- package/firebase-performance-standalone-compat.es2017.js +7 -7
- package/firebase-performance-standalone-compat.js +2 -2
- package/firebase-performance.js +5 -5
- package/firebase-remote-config-compat.js +1 -1
- package/firebase-remote-config.js +4 -4
- package/firebase-storage-compat.js +1 -1
- package/firebase-storage.js +2 -2
- package/package.json +26 -26
package/app/dist/index.cjs.js
CHANGED
package/app/dist/index.esm.js
CHANGED
package/app/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
7
7
|
var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
|
|
8
8
|
|
|
9
9
|
var name = "firebase";
|
|
10
|
-
var version = "9.2.0-canary.
|
|
10
|
+
var version = "9.2.0-canary.dbfe09e9d";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
package/compat/dist/index.esm.js
CHANGED
|
@@ -12,7 +12,7 @@ import '@firebase/performance-compat';
|
|
|
12
12
|
import '@firebase/remote-config-compat';
|
|
13
13
|
|
|
14
14
|
var name$1 = "firebase";
|
|
15
|
-
var version$1 = "9.2.0-canary.
|
|
15
|
+
var version$1 = "9.2.0-canary.dbfe09e9d";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @license
|
|
@@ -33,7 +33,7 @@ var version$1 = "9.2.0-canary.2322b6023";
|
|
|
33
33
|
firebase.registerVersion(name$1, version$1, 'app-compat');
|
|
34
34
|
|
|
35
35
|
var name = "firebase";
|
|
36
|
-
var version = "9.2.0-canary.
|
|
36
|
+
var version = "9.2.0-canary.dbfe09e9d";
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* @license
|
|
@@ -12,7 +12,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
|
|
13
13
|
|
|
14
14
|
var name$1 = "firebase";
|
|
15
|
-
var version$1 = "9.2.0-canary.
|
|
15
|
+
var version$1 = "9.2.0-canary.dbfe09e9d";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @license
|
|
@@ -33,7 +33,7 @@ var version$1 = "9.2.0-canary.2322b6023";
|
|
|
33
33
|
firebase__default["default"].registerVersion(name$1, version$1, 'app-compat');
|
|
34
34
|
|
|
35
35
|
var name = "firebase";
|
|
36
|
-
var version = "9.2.0-canary.
|
|
36
|
+
var version = "9.2.0-canary.dbfe09e9d";
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* @license
|
|
@@ -10,7 +10,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
|
|
11
11
|
|
|
12
12
|
var name$1 = "firebase";
|
|
13
|
-
var version$1 = "9.2.0-canary.
|
|
13
|
+
var version$1 = "9.2.0-canary.dbfe09e9d";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @license
|
|
@@ -31,7 +31,7 @@ var version$1 = "9.2.0-canary.2322b6023";
|
|
|
31
31
|
firebase__default["default"].registerVersion(name$1, version$1, 'app-compat');
|
|
32
32
|
|
|
33
33
|
var name = "firebase";
|
|
34
|
-
var version = "9.2.0-canary.
|
|
34
|
+
var version = "9.2.0-canary.dbfe09e9d";
|
|
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(ct,ut){"use strict";try{!(function(){function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t,n=e(ct);(at=t=t||{})[at.DEBUG=0]="DEBUG",at[at.VERBOSE=1]="VERBOSE",at[at.INFO=2]="INFO",at[at.WARN=3]="WARN",at[at.ERROR=4]="ERROR",at[at.SILENT=5]="SILENT";const r={debug:t.DEBUG,verbose:t.VERBOSE,info:t.INFO,warn:t.WARN,error:t.ERROR,silent:t.SILENT},a=t.INFO,i={[t.DEBUG]:"log",[t.VERBOSE]:"log",[t.INFO]:"info",[t.WARN]:"warn",[t.ERROR]:"error"},o=(e,t,...n)=>{if(!(t<e.logLevel)){var r=(new Date).toISOString(),a=i[t];if(!a)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[a](`[${r}] ${e.name}:`,...n)}};function s(){var e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function p(){return"object"==typeof indexedDB}function f(){return new Promise((t,n)=>{try{let e=!0;const r="validate-browser-context-for-indexeddb-analytics-module",a=self.indexedDB.open(r);a.onsuccess=()=>{a.result.close(),e||self.indexedDB.deleteDatabase(r),t(!0)},a.onupgradeneeded=()=>{e=!1},a.onerror=()=>{var e;n((null===(e=a.error)||void 0===e?void 0:e.message)||"")}}catch(e){n(e)}})}function c(){return!("undefined"==typeof navigator||!navigator.cookieEnabled)}class u extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,u.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,l.prototype.create)}}class l{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){var r,n=t[0]||{},a=`${this.service}/${e}`,i=this.errors[e],i=i?(r=n,i.replace(d,(e,t)=>{var n=r[t];return null!=n?String(n):`<${t}?>`})):"Error",i=`${this.serviceName}: ${i} (${a}).`;return new u(a,i,n)}}const d=/\{\$([^}]+)}/g,h=1e3,g=2,m=144e5,y=.5;function w(e,t=h,n=g){var r=t*Math.pow(n,e),a=Math.round(y*r*(Math.random()-.5)*2);return Math.min(m,r+a)}function v(e){return e&&e._delegate?e._delegate:e}class I{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}function b(n){return new Promise(function(e,t){n.onsuccess=function(){e(n.result)},n.onerror=function(){t(n.error)}})}function _(n,r,a){var i,e=new Promise(function(e,t){b(i=n[r].apply(n,a)).then(e,t)});return e.request=i,e}function E(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 T(t,n,r,e){e.forEach(function(e){e in r.prototype&&(t.prototype[e]=function(){return _(this[n],e,arguments)})})}function S(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 C(e,r,t,n){n.forEach(function(n){n in t.prototype&&(e.prototype[n]=function(){return e=this[r],(t=_(e,n,arguments)).then(function(e){if(e)return new P(e,t.request)});var e,t})})}function O(e){this._index=e}function P(e,t){this._cursor=e,this._request=t}function D(e){this._store=e}function A(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 N(e,t,n){this._db=e,this.oldVersion=t,this.transaction=new A(n)}function j(e){this._db=e}E(O,"_index",["name","keyPath","multiEntry","unique"]),T(O,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),C(O,"_index",IDBIndex,["openCursor","openKeyCursor"]),E(P,"_cursor",["direction","key","primaryKey","value"]),T(P,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach(function(n){n in IDBCursor.prototype&&(P.prototype[n]=function(){var t=this,e=arguments;return Promise.resolve().then(function(){return t._cursor[n].apply(t._cursor,e),b(t._request).then(function(e){if(e)return new P(e,t._request)})})})}),D.prototype.createIndex=function(){return new O(this._store.createIndex.apply(this._store,arguments))},D.prototype.index=function(){return new O(this._store.index.apply(this._store,arguments))},E(D,"_store",["name","keyPath","indexNames","autoIncrement"]),T(D,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),C(D,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),S(D,"_store",IDBObjectStore,["deleteIndex"]),A.prototype.objectStore=function(){return new D(this._tx.objectStore.apply(this._tx,arguments))},E(A,"_tx",["objectStoreNames","mode"]),S(A,"_tx",IDBTransaction,["abort"]),N.prototype.createObjectStore=function(){return new D(this._db.createObjectStore.apply(this._db,arguments))},E(N,"_db",["name","version","objectStoreNames"]),S(N,"_db",IDBDatabase,["deleteObjectStore","close"]),j.prototype.transaction=function(){return new A(this._db.transaction.apply(this._db,arguments))},E(j,"_db",["name","version","objectStoreNames"]),S(j,"_db",IDBDatabase,["close"]),["openCursor","openKeyCursor"].forEach(function(i){[D,O].forEach(function(e){i in e.prototype&&(e.prototype[i.replace("open","iterate")]=function(){var e,t=(e=arguments,Array.prototype.slice.call(e)),n=t[t.length-1],r=this._store||this._index,a=r[i].apply(r,t.slice(0,-1));a.onsuccess=function(){n(a.result)}})})}),[O,D].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 k="@firebase/installations",L="0.5.2-canary.2322b6023";const R=1e4,x=`w:${L}`,$="FIS_v2",M="https://firebaseinstallations.googleapis.com/v1",F=36e5;const H=new l("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 B(e){return e instanceof u&&e.code.includes("request-failed")}function q({projectId:e}){return`${M}/projects/${e}/installations`}function V(e){return{token:e.token,requestStatus:2,expiresIn:(e=e.expiresIn,Number(e.replace("s","000"))),creationTime:Date.now()}}async function K(e,t){var n=(await t.json()).error;return H.create("request-failed",{requestName:e,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function U({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function G(e,{refreshToken:t}){const n=U(e);return n.append("Authorization",(t=t,`${$} ${t}`)),n}async function W(e){var t=await e();return 500<=t.status&&t.status<600?e():t}function z(t){return new Promise(e=>{setTimeout(e,t)})}const J=/^[cdef][\w-]{21}$/,Y="";function X(){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 J.test(e)?e:Y}catch(e){return Y}}function Z(e){return`${e.appName}!${e.appId}`}const Q=new Map;function ee(e,t){var n=Z(e);te(n,t),function(e,t){const n=function(){!ne&&"BroadcastChannel"in self&&(ne=new BroadcastChannel("[Firebase] FID Change"),ne.onmessage=e=>{te(e.data.key,e.data.fid)});return ne}();n&&n.postMessage({key:e,fid:t});0===Q.size&&ne&&(ne.close(),ne=null)}(n,t)}function te(e,t){var n=Q.get(e);if(n)for(const r of n)r(t)}let ne=null;const re="firebase-installations-store";let ae=null;function ie(){var t,e,n;return ae=ae||(t=e=>{0===e.oldVersion&&e.createObjectStore(re)},e=_(indexedDB,"open",["firebase-installations-database",1]),(n=e.request)&&(n.onupgradeneeded=function(e){t&&t(new N(n.result,e.oldVersion,n.transaction))}),e.then(function(e){return new j(e)})),ae}async function oe(e,t){var n=Z(e);const r=await ie(),a=r.transaction(re,"readwrite"),i=a.objectStore(re);var o=await i.get(n);return await i.put(t,n),await a.complete,o&&o.fid===t.fid||ee(e,t.fid),t}async function se(e){var t=Z(e);const n=await ie(),r=n.transaction(re,"readwrite");await r.objectStore(re).delete(t),await r.complete}async function ce(e,t){var n=Z(e);const r=await ie(),a=r.transaction(re,"readwrite"),i=a.objectStore(re);var o=await i.get(n),s=t(o);return void 0===s?await i.delete(n):await i.put(s,n),await a.complete,!s||o&&o.fid===s.fid||ee(e,s.fid),s}async function ue(n){let r;var e=await ce(n,e=>{var t=de(e||{fid:X(),registrationStatus:0}),t=function(e,t){{if(0!==t.registrationStatus)return 1===t.registrationStatus?{installationEntry:t,registrationPromise:async function(e){let t=await le(e);for(;1===t.registrationStatus;)await z(100),t=await le(e);if(0!==t.registrationStatus)return t;{var{installationEntry:n,registrationPromise:r}=await ue(e);return r||n}}(e)}:{installationEntry:t};if(!navigator.onLine){var n=Promise.reject(H.create("app-offline"));return{installationEntry:t,registrationPromise:n}}var r={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},n=async function(t,n){try{var e=await async function(e,{fid:t}){const n=q(e);var r=U(e),a={fid:t,authVersion:$,appId:e.appId,sdkVersion:x};const i={method:"POST",headers:r,body:JSON.stringify(a)},o=await W(()=>fetch(n,i));if(o.ok){a=await o.json();return{fid:a.fid||t,registrationStatus:2,refreshToken:a.refreshToken,authToken:V(a.authToken)}}throw await K("Create Installation",o)}(t,n);return oe(t,e)}catch(e){throw B(e)&&409===e.customData.serverCode?await se(t):await oe(t,{fid:n.fid,registrationStatus:0}),e}}(e,r);return{installationEntry:r,registrationPromise:n}}}(n,t);return r=t.registrationPromise,t.installationEntry});return e.fid===Y?{installationEntry:await r}:{installationEntry:e,registrationPromise:r}}function le(e){return ce(e,e=>{if(!e)throw H.create("installation-not-found");return de(e)})}function de(e){return 1===(t=e).registrationStatus&&t.registrationTime+R<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}async function pe({appConfig:e,platformLoggerProvider:t},n){const r=([a,i]=[e,n["fid"]],`${q(a)}/${i}/authTokens:generate`);var a,i;const o=G(e,n),s=t.getImmediate({optional:!0});s&&o.append("x-firebase-client",s.getPlatformInfoString());var c={installation:{sdkVersion:x}};const u={method:"POST",headers:o,body:JSON.stringify(c)},l=await W(()=>fetch(r,u));if(l.ok)return V(await l.json());throw await K("Generate Auth Token",l)}async function fe(r,a=!1){let i;var e=await ce(r.appConfig,e=>{if(!ge(e))throw H.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+F}(t)){if(1===n.requestStatus)return i=async function(e,t){let n=await he(e.appConfig);for(;1===n.authToken.requestStatus;)await z(100),n=await he(e.appConfig);var r=n.authToken;return 0===r.requestStatus?fe(e,t):r}(r,a),e;if(!navigator.onLine)throw H.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 r=await pe(t,n),e=Object.assign(Object.assign({},n),{authToken:r});return await oe(t.appConfig,e),r}catch(e){throw!B(e)||401!==e.customData.serverCode&&404!==e.customData.serverCode?(r=Object.assign(Object.assign({},n),{authToken:{requestStatus:0}}),await oe(t.appConfig,r)):await se(t.appConfig),e}}(r,n),n}return e});return i?await i:e.authToken}function he(e){return ce(e,e=>{if(!ge(e))throw H.create("not-registered");var t,n=e.authToken;return 1===(t=n).requestStatus&&t.requestTime+R<Date.now()?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e})}function ge(e){return void 0!==e&&2===e.registrationStatus}async function me(e,t=!1){var n,r=e;return e=r.appConfig,await((n=(await ue(e)).registrationPromise)&&await n),(await fe(r,t)).token}function ye(e){return H.create("missing-app-config-values",{valueName:e})}const we="installations",ve=e=>{var t=e.getProvider("app").getImmediate();return{app:t,appConfig:function(e){if(!e||!e.options)throw ye("App Configuration");if(!e.name)throw ye("App Name");for(const t of["projectId","apiKey","appId"])if(!e.options[t])throw ye(t);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t),platformLoggerProvider:ut._getProvider(t,"platform-logger"),_delete:()=>Promise.resolve()}},Ie=e=>{var t=e.getProvider("app").getImmediate();const n=ut._getProvider(t,we).getImmediate();return{getId:()=>async function(e){var t=e;const{installationEntry:n,registrationPromise:r}=await ue(t.appConfig);return(r||fe(t)).catch(console.error),n.fid}(n),getToken:e=>me(n,e)}};ut._registerComponent(new I(we,ve,"PUBLIC")),ut._registerComponent(new I("installations-internal",Ie,"PRIVATE")),ut.registerVersion(k,L),ut.registerVersion(k,L,"esm2017");const be="analytics",_e="firebase_id",Ee="origin",Te="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",Se="https://www.googletagmanager.com/gtag/js",Ce=new class{constructor(e){this.name=e,this._logLevel=a,this._logHandler=o,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in t))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?r[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,t.DEBUG,...e),this._logHandler(this,t.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,t.VERBOSE,...e),this._logHandler(this,t.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,t.INFO,...e),this._logHandler(this,t.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,t.WARN,...e),this._logHandler(this,t.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,t.ERROR,...e),this._logHandler(this,t.ERROR,...e)}}("@firebase/analytics");function Oe(e){return Promise.all(e.map(e=>e.catch(e=>e)))}function Pe(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 Oe(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){Ce.error(e)}}(r,a,i,t,n):"config"===e?await async function(e,t,n,r,a,i){var o=r[a];try{if(o)await t[o];else{const c=await Oe(n);var s=c.find(e=>e.measurementId===a);s&&await t[s.appId]}}catch(e){Ce.error(e)}e("config",a,i)}(r,a,i,o,t,n):r("set",t)}catch(e){Ce.error(e)}}}const De=new l("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.'}),Ae=30;const Ne=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 je(e){var t,{appId:n,apiKey:r}=e,r={method:"GET",headers:new Headers({Accept:"application/json","x-goog-api-key":r})},n=Te.replace("{app-id}",n);const a=await fetch(n,r);if(200===a.status||304===a.status)return a.json();{let e="";try{var i=await a.json();null!==(t=i.error)&&void 0!==t&&t.message&&(e=i.error.message)}catch(e){}throw De.create("config-fetch-failed",{httpStatus:a.status,responseMessage:e})}}async function ke(e,t=Ne,n){var{appId:r,apiKey:a,measurementId:i}=e.options;if(!r)throw De.create("no-app-id");if(!a){if(i)return{measurementId:i,appId:r};throw De.create("no-api-key")}var o=t.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()};const s=new xe;return setTimeout(async()=>{s.abort()},void 0!==n?n:6e4),async function t(n,{throttleEndTimeMillis:e,backoffCount:r},a,i=Ne){const{appId:o,measurementId:s}=n;try{await Le(a,e)}catch(e){if(s)return Ce.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 je(n);return i.deleteThrottleMetadata(o),c}catch(e){if(!Re(e)){if(i.deleteThrottleMetadata(o),s)return Ce.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)?w(r,i.intervalMillis,Ae):w(r,i.intervalMillis),l={throttleEndTimeMillis:Date.now()+u,backoffCount:r+1};return i.setThrottleMetadata(o,l),Ce.debug(`Calling attemptFetch again in ${u} millis`),t(n,l,a,i)}}({appId:r,apiKey:a,measurementId:i},o,s,t)}function Le(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(De.create("fetch-throttle",{throttleEndTimeMillis:i}))})})}function Re(e){if(!(e instanceof u&&e.customData))return!1;var t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}class xe{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}async function $e(t,e,n,r,a,i,o){const s=ke(t);s.then(e=>{n[e.measurementId]=e.appId,t.options.measurementId&&e.measurementId!==t.options.measurementId&&Ce.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=>Ce.error(e)),e.push(s);var c=async function(){if(!p())return Ce.warn(De.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await f()}catch(e){return Ce.warn(De.create("indexeddb-unavailable",{errorInfo:e}).message),!1}return!0}().then(e=>{if(e)return r.getId()}),[u,l]=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(Se))return t}()&&function(e,t){const n=document.createElement("script");n.src=`${Se}?l=${e}&id=${t}`,n.async=!0,document.head.appendChild(n)}(i,u.measurementId),a("js",new Date);const d=null!==(c=null==o?void 0:o.config)&&void 0!==c?c:{};return d[Ee]="firebase",d.update=!0,null!=l&&(d[_e]=l),a("config",u.measurementId,d),u.measurementId}class Me{constructor(e){this.app=e}_delete(){return delete Fe[this.app.options.appId],Promise.resolve()}}let Fe={},He=[];const Be={};let qe="dataLayer",Ve="gtag",Ke,Ue,Ge=!1;function We(e){if(Ge)throw De.create("already-initialized");e.dataLayerName&&(qe=e.dataLayerName),e.gtagName&&(Ve=e.gtagName)}function ze(e,t,n){!function(){const e=[];var t;s()&&e.push("This is a browser extension environment."),c()||e.push("Cookies are not available."),0<e.length&&(t=e.map((e,t)=>`(${t+1}) ${e}`).join(" "),t=De.create("invalid-analytics-context",{errorInfo:t}),Ce.warn(t.message))}();var r,a,i=e.options.appId;if(!i)throw De.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw De.create("no-api-key");Ce.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!=Fe[i])throw De.create("already-exists",{id:i});return Ge||(function(e){let t=[];Array.isArray(window[e])?t=window[e]:window[e]=t,t}(qe),{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]=Pe(i,e,t,n),{gtagCore:i,wrappedGtag:window[a]}}(Fe,He,Be,qe,Ve),Ue=r,Ke=a,Ge=!0),Fe[i]=$e(e,He,Be,t,Ke,qe,n),new Me(e)}async function Je(){if(s())return!1;if(!c())return!1;if(!p())return!1;try{return await f()}catch(e){return!1}}function Ye(e,t,n){e=v(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})}(Ue,Fe[e.app.options.appId],t,n).catch(e=>Ce.error(e))}function Xe(e,t,n){e=v(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})}(Ue,Fe[e.app.options.appId],t,n).catch(e=>Ce.error(e))}function Ze(e,t,n){e=v(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})}(Ue,Fe[e.app.options.appId],t,n).catch(e=>Ce.error(e))}function Qe(e,t){e=v(e),async function(e,t){var n=await e;window[`ga-disable-${n}`]=!t}(Fe[e.app.options.appId],t).catch(e=>Ce.error(e))}function et(e,t,n,r){e=v(e),async function(e,t,n,r,a){var i;a&&a.global?e("event",n,r):(i=await t,e("event",n,Object.assign(Object.assign({},r),{send_to:i})))}(Ue,Fe[e.app.options.appId],t,n,r).catch(e=>Ce.error(e))}const tt="@firebase/analytics",nt="0.7.2-canary.2322b6023";ut._registerComponent(new I(be,(e,{options:t})=>{return ze(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t)},"PUBLIC")),ut._registerComponent(new I("analytics-internal",function(e){try{const r=e.getProvider(be).getImmediate();return{logEvent:(e,t,n)=>et(r,e,t,n)}}catch(e){throw De.create("interop-component-reg-failed",{reason:e})}},"PRIVATE")),ut.registerVersion(tt,nt),ut.registerVersion(tt,nt,"esm2017");var rt,at,it;class ot{constructor(e,t){this.app=e,this._delegate=t}logEvent(e,t,n){et(this._delegate,e,t,n)}setCurrentScreen(e,t){Ye(this._delegate,e,t)}setUserId(e,t){Xe(this._delegate,e,t)}setUserProperties(e,t){Ze(this._delegate,e,t)}setAnalyticsCollectionEnabled(e){Qe(this._delegate,e)}}(at=rt=rt||{}).ADD_SHIPPING_INFO="add_shipping_info",at.ADD_PAYMENT_INFO="add_payment_info",at.ADD_TO_CART="add_to_cart",at.ADD_TO_WISHLIST="add_to_wishlist",at.BEGIN_CHECKOUT="begin_checkout",at.CHECKOUT_PROGRESS="checkout_progress",at.EXCEPTION="exception",at.GENERATE_LEAD="generate_lead",at.LOGIN="login",at.PAGE_VIEW="page_view",at.PURCHASE="purchase",at.REFUND="refund",at.REMOVE_FROM_CART="remove_from_cart",at.SCREEN_VIEW="screen_view",at.SEARCH="search",at.SELECT_CONTENT="select_content",at.SELECT_ITEM="select_item",at.SELECT_PROMOTION="select_promotion",at.SET_CHECKOUT_OPTION="set_checkout_option",at.SHARE="share",at.SIGN_UP="sign_up",at.TIMING_COMPLETE="timing_complete",at.VIEW_CART="view_cart",at.VIEW_ITEM="view_item",at.VIEW_ITEM_LIST="view_item_list",at.VIEW_PROMOTION="view_promotion",at.VIEW_SEARCH_RESULTS="view_search_results";const st=e=>{var t=e.getProvider("app-compat").getImmediate(),n=e.getProvider("analytics").getImmediate();return new ot(t,n)};it={Analytics:ot,settings:We,isSupported:Je,EventName:rt},n.default.INTERNAL.registerComponent(new I("analytics-compat",st,"PUBLIC").setServiceProps(it).setMultipleInstances(!0)),n.default.registerVersion("@firebase/analytics-compat","0.1.3-canary.2322b6023")}).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(ct,ut){"use strict";try{!(function(){function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t,n=e(ct);(at=t=t||{})[at.DEBUG=0]="DEBUG",at[at.VERBOSE=1]="VERBOSE",at[at.INFO=2]="INFO",at[at.WARN=3]="WARN",at[at.ERROR=4]="ERROR",at[at.SILENT=5]="SILENT";const r={debug:t.DEBUG,verbose:t.VERBOSE,info:t.INFO,warn:t.WARN,error:t.ERROR,silent:t.SILENT},a=t.INFO,i={[t.DEBUG]:"log",[t.VERBOSE]:"log",[t.INFO]:"info",[t.WARN]:"warn",[t.ERROR]:"error"},o=(e,t,...n)=>{if(!(t<e.logLevel)){var r=(new Date).toISOString(),a=i[t];if(!a)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[a](`[${r}] ${e.name}:`,...n)}};function s(){var e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function p(){return"object"==typeof indexedDB}function f(){return new Promise((t,n)=>{try{let e=!0;const r="validate-browser-context-for-indexeddb-analytics-module",a=self.indexedDB.open(r);a.onsuccess=()=>{a.result.close(),e||self.indexedDB.deleteDatabase(r),t(!0)},a.onupgradeneeded=()=>{e=!1},a.onerror=()=>{var e;n((null===(e=a.error)||void 0===e?void 0:e.message)||"")}}catch(e){n(e)}})}function c(){return!("undefined"==typeof navigator||!navigator.cookieEnabled)}class u extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,u.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,l.prototype.create)}}class l{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){var r,n=t[0]||{},a=`${this.service}/${e}`,i=this.errors[e],i=i?(r=n,i.replace(d,(e,t)=>{var n=r[t];return null!=n?String(n):`<${t}?>`})):"Error",i=`${this.serviceName}: ${i} (${a}).`;return new u(a,i,n)}}const d=/\{\$([^}]+)}/g,h=1e3,g=2,m=144e5,y=.5;function w(e,t=h,n=g){var r=t*Math.pow(n,e),a=Math.round(y*r*(Math.random()-.5)*2);return Math.min(m,r+a)}function v(e){return e&&e._delegate?e._delegate:e}class I{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}function b(n){return new Promise(function(e,t){n.onsuccess=function(){e(n.result)},n.onerror=function(){t(n.error)}})}function _(n,r,a){var i,e=new Promise(function(e,t){b(i=n[r].apply(n,a)).then(e,t)});return e.request=i,e}function E(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 T(t,n,r,e){e.forEach(function(e){e in r.prototype&&(t.prototype[e]=function(){return _(this[n],e,arguments)})})}function S(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 C(e,r,t,n){n.forEach(function(n){n in t.prototype&&(e.prototype[n]=function(){return e=this[r],(t=_(e,n,arguments)).then(function(e){if(e)return new P(e,t.request)});var e,t})})}function O(e){this._index=e}function P(e,t){this._cursor=e,this._request=t}function D(e){this._store=e}function A(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 N(e,t,n){this._db=e,this.oldVersion=t,this.transaction=new A(n)}function j(e){this._db=e}E(O,"_index",["name","keyPath","multiEntry","unique"]),T(O,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),C(O,"_index",IDBIndex,["openCursor","openKeyCursor"]),E(P,"_cursor",["direction","key","primaryKey","value"]),T(P,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach(function(n){n in IDBCursor.prototype&&(P.prototype[n]=function(){var t=this,e=arguments;return Promise.resolve().then(function(){return t._cursor[n].apply(t._cursor,e),b(t._request).then(function(e){if(e)return new P(e,t._request)})})})}),D.prototype.createIndex=function(){return new O(this._store.createIndex.apply(this._store,arguments))},D.prototype.index=function(){return new O(this._store.index.apply(this._store,arguments))},E(D,"_store",["name","keyPath","indexNames","autoIncrement"]),T(D,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),C(D,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),S(D,"_store",IDBObjectStore,["deleteIndex"]),A.prototype.objectStore=function(){return new D(this._tx.objectStore.apply(this._tx,arguments))},E(A,"_tx",["objectStoreNames","mode"]),S(A,"_tx",IDBTransaction,["abort"]),N.prototype.createObjectStore=function(){return new D(this._db.createObjectStore.apply(this._db,arguments))},E(N,"_db",["name","version","objectStoreNames"]),S(N,"_db",IDBDatabase,["deleteObjectStore","close"]),j.prototype.transaction=function(){return new A(this._db.transaction.apply(this._db,arguments))},E(j,"_db",["name","version","objectStoreNames"]),S(j,"_db",IDBDatabase,["close"]),["openCursor","openKeyCursor"].forEach(function(i){[D,O].forEach(function(e){i in e.prototype&&(e.prototype[i.replace("open","iterate")]=function(){var e,t=(e=arguments,Array.prototype.slice.call(e)),n=t[t.length-1],r=this._store||this._index,a=r[i].apply(r,t.slice(0,-1));a.onsuccess=function(){n(a.result)}})})}),[O,D].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 k="@firebase/installations",L="0.5.2-canary.dbfe09e9d";const R=1e4,x=`w:${L}`,$="FIS_v2",M="https://firebaseinstallations.googleapis.com/v1",F=36e5;const H=new l("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 B(e){return e instanceof u&&e.code.includes("request-failed")}function q({projectId:e}){return`${M}/projects/${e}/installations`}function V(e){return{token:e.token,requestStatus:2,expiresIn:(e=e.expiresIn,Number(e.replace("s","000"))),creationTime:Date.now()}}async function K(e,t){var n=(await t.json()).error;return H.create("request-failed",{requestName:e,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function U({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function G(e,{refreshToken:t}){const n=U(e);return n.append("Authorization",(t=t,`${$} ${t}`)),n}async function W(e){var t=await e();return 500<=t.status&&t.status<600?e():t}function z(t){return new Promise(e=>{setTimeout(e,t)})}const J=/^[cdef][\w-]{21}$/,Y="";function X(){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 J.test(e)?e:Y}catch(e){return Y}}function Z(e){return`${e.appName}!${e.appId}`}const Q=new Map;function ee(e,t){var n=Z(e);te(n,t),function(e,t){const n=function(){!ne&&"BroadcastChannel"in self&&(ne=new BroadcastChannel("[Firebase] FID Change"),ne.onmessage=e=>{te(e.data.key,e.data.fid)});return ne}();n&&n.postMessage({key:e,fid:t});0===Q.size&&ne&&(ne.close(),ne=null)}(n,t)}function te(e,t){var n=Q.get(e);if(n)for(const r of n)r(t)}let ne=null;const re="firebase-installations-store";let ae=null;function ie(){var t,e,n;return ae=ae||(t=e=>{0===e.oldVersion&&e.createObjectStore(re)},e=_(indexedDB,"open",["firebase-installations-database",1]),(n=e.request)&&(n.onupgradeneeded=function(e){t&&t(new N(n.result,e.oldVersion,n.transaction))}),e.then(function(e){return new j(e)})),ae}async function oe(e,t){var n=Z(e);const r=await ie(),a=r.transaction(re,"readwrite"),i=a.objectStore(re);var o=await i.get(n);return await i.put(t,n),await a.complete,o&&o.fid===t.fid||ee(e,t.fid),t}async function se(e){var t=Z(e);const n=await ie(),r=n.transaction(re,"readwrite");await r.objectStore(re).delete(t),await r.complete}async function ce(e,t){var n=Z(e);const r=await ie(),a=r.transaction(re,"readwrite"),i=a.objectStore(re);var o=await i.get(n),s=t(o);return void 0===s?await i.delete(n):await i.put(s,n),await a.complete,!s||o&&o.fid===s.fid||ee(e,s.fid),s}async function ue(n){let r;var e=await ce(n,e=>{var t=de(e||{fid:X(),registrationStatus:0}),t=function(e,t){{if(0!==t.registrationStatus)return 1===t.registrationStatus?{installationEntry:t,registrationPromise:async function(e){let t=await le(e);for(;1===t.registrationStatus;)await z(100),t=await le(e);if(0!==t.registrationStatus)return t;{var{installationEntry:n,registrationPromise:r}=await ue(e);return r||n}}(e)}:{installationEntry:t};if(!navigator.onLine){var n=Promise.reject(H.create("app-offline"));return{installationEntry:t,registrationPromise:n}}var r={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},n=async function(t,n){try{var e=await async function(e,{fid:t}){const n=q(e);var r=U(e),a={fid:t,authVersion:$,appId:e.appId,sdkVersion:x};const i={method:"POST",headers:r,body:JSON.stringify(a)},o=await W(()=>fetch(n,i));if(o.ok){a=await o.json();return{fid:a.fid||t,registrationStatus:2,refreshToken:a.refreshToken,authToken:V(a.authToken)}}throw await K("Create Installation",o)}(t,n);return oe(t,e)}catch(e){throw B(e)&&409===e.customData.serverCode?await se(t):await oe(t,{fid:n.fid,registrationStatus:0}),e}}(e,r);return{installationEntry:r,registrationPromise:n}}}(n,t);return r=t.registrationPromise,t.installationEntry});return e.fid===Y?{installationEntry:await r}:{installationEntry:e,registrationPromise:r}}function le(e){return ce(e,e=>{if(!e)throw H.create("installation-not-found");return de(e)})}function de(e){return 1===(t=e).registrationStatus&&t.registrationTime+R<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}async function pe({appConfig:e,platformLoggerProvider:t},n){const r=([a,i]=[e,n["fid"]],`${q(a)}/${i}/authTokens:generate`);var a,i;const o=G(e,n),s=t.getImmediate({optional:!0});s&&o.append("x-firebase-client",s.getPlatformInfoString());var c={installation:{sdkVersion:x}};const u={method:"POST",headers:o,body:JSON.stringify(c)},l=await W(()=>fetch(r,u));if(l.ok)return V(await l.json());throw await K("Generate Auth Token",l)}async function fe(r,a=!1){let i;var e=await ce(r.appConfig,e=>{if(!ge(e))throw H.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+F}(t)){if(1===n.requestStatus)return i=async function(e,t){let n=await he(e.appConfig);for(;1===n.authToken.requestStatus;)await z(100),n=await he(e.appConfig);var r=n.authToken;return 0===r.requestStatus?fe(e,t):r}(r,a),e;if(!navigator.onLine)throw H.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 r=await pe(t,n),e=Object.assign(Object.assign({},n),{authToken:r});return await oe(t.appConfig,e),r}catch(e){throw!B(e)||401!==e.customData.serverCode&&404!==e.customData.serverCode?(r=Object.assign(Object.assign({},n),{authToken:{requestStatus:0}}),await oe(t.appConfig,r)):await se(t.appConfig),e}}(r,n),n}return e});return i?await i:e.authToken}function he(e){return ce(e,e=>{if(!ge(e))throw H.create("not-registered");var t,n=e.authToken;return 1===(t=n).requestStatus&&t.requestTime+R<Date.now()?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e})}function ge(e){return void 0!==e&&2===e.registrationStatus}async function me(e,t=!1){var n,r=e;return e=r.appConfig,await((n=(await ue(e)).registrationPromise)&&await n),(await fe(r,t)).token}function ye(e){return H.create("missing-app-config-values",{valueName:e})}const we="installations",ve=e=>{var t=e.getProvider("app").getImmediate();return{app:t,appConfig:function(e){if(!e||!e.options)throw ye("App Configuration");if(!e.name)throw ye("App Name");for(const t of["projectId","apiKey","appId"])if(!e.options[t])throw ye(t);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t),platformLoggerProvider:ut._getProvider(t,"platform-logger"),_delete:()=>Promise.resolve()}},Ie=e=>{var t=e.getProvider("app").getImmediate();const n=ut._getProvider(t,we).getImmediate();return{getId:()=>async function(e){var t=e;const{installationEntry:n,registrationPromise:r}=await ue(t.appConfig);return(r||fe(t)).catch(console.error),n.fid}(n),getToken:e=>me(n,e)}};ut._registerComponent(new I(we,ve,"PUBLIC")),ut._registerComponent(new I("installations-internal",Ie,"PRIVATE")),ut.registerVersion(k,L),ut.registerVersion(k,L,"esm2017");const be="analytics",_e="firebase_id",Ee="origin",Te="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",Se="https://www.googletagmanager.com/gtag/js",Ce=new class{constructor(e){this.name=e,this._logLevel=a,this._logHandler=o,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in t))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?r[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,t.DEBUG,...e),this._logHandler(this,t.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,t.VERBOSE,...e),this._logHandler(this,t.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,t.INFO,...e),this._logHandler(this,t.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,t.WARN,...e),this._logHandler(this,t.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,t.ERROR,...e),this._logHandler(this,t.ERROR,...e)}}("@firebase/analytics");function Oe(e){return Promise.all(e.map(e=>e.catch(e=>e)))}function Pe(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 Oe(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){Ce.error(e)}}(r,a,i,t,n):"config"===e?await async function(e,t,n,r,a,i){var o=r[a];try{if(o)await t[o];else{const c=await Oe(n);var s=c.find(e=>e.measurementId===a);s&&await t[s.appId]}}catch(e){Ce.error(e)}e("config",a,i)}(r,a,i,o,t,n):r("set",t)}catch(e){Ce.error(e)}}}const De=new l("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.'}),Ae=30;const Ne=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 je(e){var t,{appId:n,apiKey:r}=e,r={method:"GET",headers:new Headers({Accept:"application/json","x-goog-api-key":r})},n=Te.replace("{app-id}",n);const a=await fetch(n,r);if(200===a.status||304===a.status)return a.json();{let e="";try{var i=await a.json();null!==(t=i.error)&&void 0!==t&&t.message&&(e=i.error.message)}catch(e){}throw De.create("config-fetch-failed",{httpStatus:a.status,responseMessage:e})}}async function ke(e,t=Ne,n){var{appId:r,apiKey:a,measurementId:i}=e.options;if(!r)throw De.create("no-app-id");if(!a){if(i)return{measurementId:i,appId:r};throw De.create("no-api-key")}var o=t.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()};const s=new xe;return setTimeout(async()=>{s.abort()},void 0!==n?n:6e4),async function t(n,{throttleEndTimeMillis:e,backoffCount:r},a,i=Ne){const{appId:o,measurementId:s}=n;try{await Le(a,e)}catch(e){if(s)return Ce.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 je(n);return i.deleteThrottleMetadata(o),c}catch(e){if(!Re(e)){if(i.deleteThrottleMetadata(o),s)return Ce.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)?w(r,i.intervalMillis,Ae):w(r,i.intervalMillis),l={throttleEndTimeMillis:Date.now()+u,backoffCount:r+1};return i.setThrottleMetadata(o,l),Ce.debug(`Calling attemptFetch again in ${u} millis`),t(n,l,a,i)}}({appId:r,apiKey:a,measurementId:i},o,s,t)}function Le(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(De.create("fetch-throttle",{throttleEndTimeMillis:i}))})})}function Re(e){if(!(e instanceof u&&e.customData))return!1;var t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}class xe{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}async function $e(t,e,n,r,a,i,o){const s=ke(t);s.then(e=>{n[e.measurementId]=e.appId,t.options.measurementId&&e.measurementId!==t.options.measurementId&&Ce.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=>Ce.error(e)),e.push(s);var c=async function(){if(!p())return Ce.warn(De.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await f()}catch(e){return Ce.warn(De.create("indexeddb-unavailable",{errorInfo:e}).message),!1}return!0}().then(e=>{if(e)return r.getId()}),[u,l]=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(Se))return t}()&&function(e,t){const n=document.createElement("script");n.src=`${Se}?l=${e}&id=${t}`,n.async=!0,document.head.appendChild(n)}(i,u.measurementId),a("js",new Date);const d=null!==(c=null==o?void 0:o.config)&&void 0!==c?c:{};return d[Ee]="firebase",d.update=!0,null!=l&&(d[_e]=l),a("config",u.measurementId,d),u.measurementId}class Me{constructor(e){this.app=e}_delete(){return delete Fe[this.app.options.appId],Promise.resolve()}}let Fe={},He=[];const Be={};let qe="dataLayer",Ve="gtag",Ke,Ue,Ge=!1;function We(e){if(Ge)throw De.create("already-initialized");e.dataLayerName&&(qe=e.dataLayerName),e.gtagName&&(Ve=e.gtagName)}function ze(e,t,n){!function(){const e=[];var t;s()&&e.push("This is a browser extension environment."),c()||e.push("Cookies are not available."),0<e.length&&(t=e.map((e,t)=>`(${t+1}) ${e}`).join(" "),t=De.create("invalid-analytics-context",{errorInfo:t}),Ce.warn(t.message))}();var r,a,i=e.options.appId;if(!i)throw De.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw De.create("no-api-key");Ce.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!=Fe[i])throw De.create("already-exists",{id:i});return Ge||(function(e){let t=[];Array.isArray(window[e])?t=window[e]:window[e]=t,t}(qe),{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]=Pe(i,e,t,n),{gtagCore:i,wrappedGtag:window[a]}}(Fe,He,Be,qe,Ve),Ue=r,Ke=a,Ge=!0),Fe[i]=$e(e,He,Be,t,Ke,qe,n),new Me(e)}async function Je(){if(s())return!1;if(!c())return!1;if(!p())return!1;try{return await f()}catch(e){return!1}}function Ye(e,t,n){e=v(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})}(Ue,Fe[e.app.options.appId],t,n).catch(e=>Ce.error(e))}function Xe(e,t,n){e=v(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})}(Ue,Fe[e.app.options.appId],t,n).catch(e=>Ce.error(e))}function Ze(e,t,n){e=v(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})}(Ue,Fe[e.app.options.appId],t,n).catch(e=>Ce.error(e))}function Qe(e,t){e=v(e),async function(e,t){var n=await e;window[`ga-disable-${n}`]=!t}(Fe[e.app.options.appId],t).catch(e=>Ce.error(e))}function et(e,t,n,r){e=v(e),async function(e,t,n,r,a){var i;a&&a.global?e("event",n,r):(i=await t,e("event",n,Object.assign(Object.assign({},r),{send_to:i})))}(Ue,Fe[e.app.options.appId],t,n,r).catch(e=>Ce.error(e))}const tt="@firebase/analytics",nt="0.7.2-canary.dbfe09e9d";ut._registerComponent(new I(be,(e,{options:t})=>{return ze(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t)},"PUBLIC")),ut._registerComponent(new I("analytics-internal",function(e){try{const r=e.getProvider(be).getImmediate();return{logEvent:(e,t,n)=>et(r,e,t,n)}}catch(e){throw De.create("interop-component-reg-failed",{reason:e})}},"PRIVATE")),ut.registerVersion(tt,nt),ut.registerVersion(tt,nt,"esm2017");var rt,at,it;class ot{constructor(e,t){this.app=e,this._delegate=t}logEvent(e,t,n){et(this._delegate,e,t,n)}setCurrentScreen(e,t){Ye(this._delegate,e,t)}setUserId(e,t){Xe(this._delegate,e,t)}setUserProperties(e,t){Ze(this._delegate,e,t)}setAnalyticsCollectionEnabled(e){Qe(this._delegate,e)}}(at=rt=rt||{}).ADD_SHIPPING_INFO="add_shipping_info",at.ADD_PAYMENT_INFO="add_payment_info",at.ADD_TO_CART="add_to_cart",at.ADD_TO_WISHLIST="add_to_wishlist",at.BEGIN_CHECKOUT="begin_checkout",at.CHECKOUT_PROGRESS="checkout_progress",at.EXCEPTION="exception",at.GENERATE_LEAD="generate_lead",at.LOGIN="login",at.PAGE_VIEW="page_view",at.PURCHASE="purchase",at.REFUND="refund",at.REMOVE_FROM_CART="remove_from_cart",at.SCREEN_VIEW="screen_view",at.SEARCH="search",at.SELECT_CONTENT="select_content",at.SELECT_ITEM="select_item",at.SELECT_PROMOTION="select_promotion",at.SET_CHECKOUT_OPTION="set_checkout_option",at.SHARE="share",at.SIGN_UP="sign_up",at.TIMING_COMPLETE="timing_complete",at.VIEW_CART="view_cart",at.VIEW_ITEM="view_item",at.VIEW_ITEM_LIST="view_item_list",at.VIEW_PROMOTION="view_promotion",at.VIEW_SEARCH_RESULTS="view_search_results";const st=e=>{var t=e.getProvider("app-compat").getImmediate(),n=e.getProvider("analytics").getImmediate();return new ot(t,n)};it={Analytics:ot,settings:We,isSupported:Je,EventName:rt},n.default.INTERNAL.registerComponent(new I("analytics-compat",st,"PUBLIC").setServiceProps(it).setMultipleInstances(!0)),n.default.registerVersion("@firebase/analytics-compat","0.1.3-canary.dbfe09e9d")}).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
|
package/firebase-analytics.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { registerVersion, _registerComponent, _getProvider, getApp } from 'https://www.gstatic.com/firebasejs/9.2.0-canary.
|
|
1
|
+
import { registerVersion, _registerComponent, _getProvider, getApp } from 'https://www.gstatic.com/firebasejs/9.2.0-canary.dbfe09e9d/firebase-app.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
@@ -798,7 +798,7 @@ function openDb(name, version, upgradeCallback) {
|
|
|
798
798
|
}
|
|
799
799
|
|
|
800
800
|
const name$1 = "@firebase/installations";
|
|
801
|
-
const version$1 = "0.5.2-canary.
|
|
801
|
+
const version$1 = "0.5.2-canary.dbfe09e9d";
|
|
802
802
|
|
|
803
803
|
/**
|
|
804
804
|
* @license
|
|
@@ -2699,7 +2699,7 @@ async function setAnalyticsCollectionEnabled$1(initializationPromise, enabled) {
|
|
|
2699
2699
|
*
|
|
2700
2700
|
* @public
|
|
2701
2701
|
*
|
|
2702
|
-
* @param app - The {@link https://www.gstatic.com/firebasejs/9.2.0-canary.
|
|
2702
|
+
* @param app - The {@link https://www.gstatic.com/firebasejs/9.2.0-canary.dbfe09e9d/firebase-app.js#FirebaseApp} to use.
|
|
2703
2703
|
*/
|
|
2704
2704
|
function getAnalytics(app = getApp()) {
|
|
2705
2705
|
app = getModularInstance(app);
|
|
@@ -2715,7 +2715,7 @@ function getAnalytics(app = getApp()) {
|
|
|
2715
2715
|
*
|
|
2716
2716
|
* @public
|
|
2717
2717
|
*
|
|
2718
|
-
* @param app - The {@link https://www.gstatic.com/firebasejs/9.2.0-canary.
|
|
2718
|
+
* @param app - The {@link https://www.gstatic.com/firebasejs/9.2.0-canary.dbfe09e9d/firebase-app.js#FirebaseApp} to use.
|
|
2719
2719
|
*/
|
|
2720
2720
|
function initializeAnalytics(app, options = {}) {
|
|
2721
2721
|
// Dependencies
|
|
@@ -2824,7 +2824,7 @@ function logEvent(analyticsInstance, eventName, eventParams, options) {
|
|
|
2824
2824
|
}
|
|
2825
2825
|
|
|
2826
2826
|
const name = "@firebase/analytics";
|
|
2827
|
-
const version = "0.7.2-canary.
|
|
2827
|
+
const version = "0.7.2-canary.dbfe09e9d";
|
|
2828
2828
|
|
|
2829
2829
|
/**
|
|
2830
2830
|
* 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(fe,ve){"use strict";try{!(function(){function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t,r,n=e(fe);const c={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(r,e){if(!Array.isArray(r))throw Error("encodeByteArray takes an array as a parameter");this.init_();var n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_;const o=[];for(let l=0;l<r.length;l+=3){var i=r[l],a=l+1<r.length,s=a?r[l+1]:0,c=l+2<r.length,h=c?r[l+2]:0;let e=(15&s)<<2|h>>6,t=63&h;c||(t=64,a||(e=64)),o.push(n[i>>2],n[(3&i)<<4|s>>4],n[e],n[t])}return o.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(function(t){const r=[];let n=0;for(let o=0;o<t.length;o++){let e=t.charCodeAt(o);e<128?r[n++]=e:(e<2048?r[n++]=e>>6|192:(55296==(64512&e)&&o+1<t.length&&56320==(64512&t.charCodeAt(o+1))?(e=65536+((1023&e)<<10)+(1023&t.charCodeAt(++o)),r[n++]=e>>18|240,r[n++]=e>>12&63|128):r[n++]=e>>12|224,r[n++]=e>>6&63|128),r[n++]=63&e|128)}return r}(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let r=0,n=0;for(;r<e.length;){var o,i,a=e[r++];a<128?t[n++]=String.fromCharCode(a):191<a&&a<224?(o=e[r++],t[n++]=String.fromCharCode((31&a)<<6|63&o)):239<a&&a<365?(i=((7&a)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536,t[n++]=String.fromCharCode(55296+(i>>10)),t[n++]=String.fromCharCode(56320+(1023&i))):(o=e[r++],i=e[r++],t[n++]=String.fromCharCode((15&a)<<12|(63&o)<<6|63&i))}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();var r=t?this.charToByteMapWebSafe_:this.charToByteMap_;const n=[];for(let c=0;c<e.length;){var o=r[e.charAt(c++)],i=c<e.length?r[e.charAt(c)]:0;++c;var a=c<e.length?r[e.charAt(c)]:64;++c;var s=c<e.length?r[e.charAt(c)]:64;if(++c,null==o||null==i||null==a||null==s)throw Error();n.push(o<<2|i>>4),64!==a&&(n.push(i<<4&240|a>>2),64!==s&&n.push(a<<6&192|s))}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let 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,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},a=function(e){try{return c.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};class i{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(r){return(e,t)=>{e?this.reject(e):this.resolve(t),"function"==typeof r&&(this.promise.catch(()=>{}),1===r.length?r(e):r(e,t))}}}function o(){return"object"==typeof indexedDB}class s extends Error{constructor(e,t,r){super(t),this.code=e,this.customData=r,this.name="FirebaseError",Object.setPrototypeOf(this,s.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,h.prototype.create)}}class h{constructor(e,t,r){this.service=e,this.serviceName=t,this.errors=r}create(e,...t){var n,r=t[0]||{},o=`${this.service}/${e}`,i=this.errors[e],i=i?(n=r,i.replace(l,(e,t)=>{var r=n[t];return null!=r?String(r):`<${t}?>`})):"Error",i=`${this.serviceName}: ${i} (${o}).`;return new s(o,i,r)}}const l=/\{\$([^}]+)}/g;function p(e){return JSON.parse(e)}function u(e){const t=function(e){let t={},r={},n={},o="";try{var i=e.split(".");t=p(a(i[0])||""),r=p(a(i[1])||""),o=i[2],n=r.d||{},delete r.d}catch(e){}return{header:t,claims:r,data:n,signature:o}}(e).claims;return"object"==typeof t&&t.hasOwnProperty("iat")?t.iat:null}class d{constructor(e,t,r){this.name=e,this.instanceFactory=t,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}(r=t=t||{})[r.DEBUG=0]="DEBUG",r[r.VERBOSE=1]="VERBOSE",r[r.INFO=2]="INFO",r[r.WARN=3]="WARN",r[r.ERROR=4]="ERROR",r[r.SILENT=5]="SILENT";const g={debug:t.DEBUG,verbose:t.VERBOSE,info:t.INFO,warn:t.WARN,error:t.ERROR,silent:t.SILENT},f=t.INFO,v={[t.DEBUG]:"log",[t.VERBOSE]:"log",[t.INFO]:"info",[t.WARN]:"warn",[t.ERROR]:"error"},E=(e,t,...r)=>{if(!(t<e.logLevel)){var n=(new Date).toISOString(),o=v[t];if(!o)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[o](`[${n}] ${e.name}:`,...r)}};const b=new Map,_={activated:!1,tokenObservers:[]},m={initialized:!1,enabled:!1};function y(e){return b.get(e)||_}function k(e,t){b.set(e,t)}const w="https://content-firebaseappcheck.googleapis.com/v1beta",A="exchangeDebugToken",T={OFFSET_DURATION:3e5,RETRIAL_MIN_WAIT:3e4,RETRIAL_MAX_WAIT:96e4};class C{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 i,t=this.getNextRun(e),await new Promise(e=>{setTimeout(e,t)}),this.pending.resolve(),await this.pending.promise,this.pending=new i,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();var t=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),t}}const O=new h("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 S(e=!1){var t;return e?null===(t=self.grecaptcha)||void 0===t?void 0:t.enterprise:self.grecaptcha}function R(e){if(!y(e).activated)throw O.create("use-before-activation",{appName:e.name})}async function I({url:e,body:t},r){const n={"Content-Type":"application/json"},o=r.getImmediate({optional:!0});o&&(n["X-Firebase-Client"]=o.getPlatformInfoString());var i={method:"POST",body:JSON.stringify(t),headers:n};let a;try{a=await fetch(e,i)}catch(e){throw O.create("fetch-network-error",{originalErrorMessage:e.message})}if(200!==a.status)throw O.create("fetch-status-error",{httpStatus:a.status});let s;try{s=await a.json()}catch(e){throw O.create("fetch-parse-error",{originalErrorMessage:e.message})}var c=s.ttl.match(/^([\d.]+)(s)$/);if(!c||!c[2]||isNaN(Number(c[1])))throw O.create("fetch-parse-error",{originalErrorMessage:"ttl field (timeToLive) is not in standard Protobuf Duration "+`format: ${s.ttl}`});i=1e3*Number(c[1]),c=Date.now();return{token:s.attestationToken,expireTimeMillis:c+i,issuedAtTimeMillis:c}}const P="firebase-app-check-database",N=1,x="firebase-app-check-store",L="debug-token";let B=null;function M(){return B||(B=new Promise((t,r)=>{try{const e=indexedDB.open(P,N);e.onsuccess=e=>{t(e.target.result)},e.onerror=e=>{var t;r(O.create("storage-open",{originalErrorMessage:null===(t=e.target.error)||void 0===t?void 0:t.message}))},e.onupgradeneeded=e=>{const t=e.target.result;0===e.oldVersion&&t.createObjectStore(x,{keyPath:"compositeKey"})}}catch(e){r(O.create("storage-open",{originalErrorMessage:e.message}))}}),B)}async function j(e,t){const r=await M(),n=r.transaction(x,"readwrite"),o=n.objectStore(x),i=o.put({compositeKey:e,value:t});return new Promise((t,r)=>{i.onsuccess=e=>{t()},n.onerror=e=>{var t;r(O.create("storage-set",{originalErrorMessage:null===(t=e.target.error)||void 0===t?void 0:t.message}))}})}async function D(e){const t=await M(),o=t.transaction(x,"readonly"),r=o.objectStore(x),i=r.get(e);return new Promise((r,n)=>{i.onsuccess=e=>{var t=e.target.result;r(t?t.value:void 0)},o.onerror=e=>{var t;n(O.create("storage-get",{originalErrorMessage:null===(t=e.target.error)||void 0===t?void 0:t.message}))}})}function H(e){return`${e.options.appId}-${e.name}`}const $=new class{constructor(e){this.name=e,this._logLevel=f,this._logHandler=E,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in t))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?g[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,t.DEBUG,...e),this._logHandler(this,t.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,t.VERBOSE,...e),this._logHandler(this,t.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,t.INFO,...e),this._logHandler(this,t.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,t.WARN,...e),this._logHandler(this,t.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,t.ERROR,...e),this._logHandler(this,t.ERROR,...e)}}("@firebase/app-check");async function W(t){if(o()){let e=void 0;try{e=await D(H(t))}catch(e){$.warn(`Failed to read token from IndexedDB. Error: ${e}`)}return e}}function F(e,t){return o()?j(H(e),t).catch(e=>{$.warn(`Failed to write token to IndexedDB. Error: ${e}`)}):Promise.resolve()}async function V(){let e=void 0;try{e=await D(L)}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,j(L,t).catch(e=>$.warn(`Failed to persist debug token to IndexedDB. Error: ${e}`)),r}function K(){return m.enabled}async function z(){var e=m;if(e.enabled&&e.token)return e.token.promise;throw Error(`
|
|
2
2
|
Can't get debug token in production mode.
|
|
3
|
-
`)}function U(){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.")}();const t=m;if(t.initialized=!0,"string"==typeof e.FIREBASE_APPCHECK_DEBUG_TOKEN||!0===e.FIREBASE_APPCHECK_DEBUG_TOKEN){t.enabled=!0;const r=new i;t.token=r,"string"==typeof e.FIREBASE_APPCHECK_DEBUG_TOKEN?r.resolve(e.FIREBASE_APPCHECK_DEBUG_TOKEN):r.resolve(V())}}const G={error:"UNKNOWN_ERROR"};async function X(e,t=!1){var r=e.app;R(r);const n=y(r);let o=n.token,i=void 0;if(o||(a=await n.cachedTokenPromise)&&Z(a)&&(o=a,k(r,Object.assign(Object.assign({},n),{token:o})),Y(r,{token:o.token})),!t&&o&&Z(o))return{token:o.token};if(K()){var a=await I(function(e,t){var{projectId:r,appId:n,apiKey:o}=e.options;return{url:`${w}/projects/${r}/apps/${n}:${A}?key=${o}`,body:{debug_token:t}}}(r,await z()),e.platformLoggerProvider);return await F(r,a),k(r,Object.assign(Object.assign({},n),{token:a})),{token:a.token}}try{o=await n.provider.getToken()}catch(e){$.error(e),i=e}let s;return o?(s={token:o.token},k(r,Object.assign(Object.assign({},n),{token:o})),await F(r,o)):s=(e=i,{token:function(e){return c.encodeString(JSON.stringify(e),!1)}(G),error:e}),Y(r,s),s}function q(e,t,r,n){var o=e["app"];const i=y(o);var a={next:r,error:n,type:t};const s=Object.assign(Object.assign({},i),{tokenObservers:[...i.tokenObservers,a]});if(s.tokenRefresher||(a=function(r){const n=r["app"];return new C(async()=>{var e=y(n);let t;if(t=e.token?await X(r,!0):await X(r),t.error)throw t.error},()=>!0,()=>{var e=y(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},T.RETRIAL_MIN_WAIT,T.RETRIAL_MAX_WAIT)}(e),s.tokenRefresher=a),!s.tokenRefresher.isRunning()&&i.isTokenAutoRefreshEnabled&&s.tokenRefresher.start(),i.token&&Z(i.token)){const c=i.token;Promise.resolve().then(()=>r({token:c.token})).catch(()=>{})}else null==i.token&&i.cachedTokenPromise.then(e=>{e&&Z(e)&&r({token:e.token})}).catch(()=>{});k(o,s)}function J(e,t){const r=y(e);var n=r.tokenObservers.filter(e=>e.next!==t);0===n.length&&r.tokenRefresher&&r.tokenRefresher.isRunning()&&r.tokenRefresher.stop(),k(e,Object.assign(Object.assign({},r),{tokenObservers:n}))}function Y(e,t){for(const r of y(e).tokenObservers)try{"EXTERNAL"===r.type&&null!=t.error?r.error(t.error):r.next(t)}catch(e){}}function Z(e){return 0<e.expireTimeMillis-Date.now()}class Q{constructor(e,t){this.app=e,this.platformLoggerProvider=t}_delete(){var e=y(this.app)["tokenObservers"];for(const t of e)J(this.app,t.next);return Promise.resolve()}}const ee="https://www.google.com/recaptcha/api.js",te="https://www.google.com/recaptcha/enterprise.js";function re(t,r){var e=y(t);const n=new i;k(t,Object.assign(Object.assign({},e),{reCAPTCHAState:{initialized:n}}));const o=ie(t);e=S(!1);return e?oe(t,r,e,o,n):function(e){const t=document.createElement("script");t.src=ee,t.onload=e,document.head.appendChild(t)}(()=>{var e=S(!1);if(!e)throw new Error("no recaptcha");oe(t,r,e,o,n)}),n.promise}function ne(t,r){var e=y(t);const n=new i;k(t,Object.assign(Object.assign({},e),{reCAPTCHAState:{initialized:n}}));const o=ie(t);e=S(!0);return e?oe(t,r,e,o,n):function(e){const t=document.createElement("script");t.src=te,t.onload=e,document.head.appendChild(t)}(()=>{var e=S(!0);if(!e)throw new Error("no recaptcha");oe(t,r,e,o,n)}),n.promise}function oe(n,o,i,a,s){i.ready(()=>{var e,t,r;e=n,t=i.render(a,{sitekey:o,size:"invisible"}),r=y(e),k(e,Object.assign(Object.assign({},r),{reCAPTCHAState:Object.assign(Object.assign({},r.reCAPTCHAState),{widgetId:t})})),s.resolve(i)})}function ie(e){var t=`fire_app_check_${e.name}`;const r=document.createElement("div");return r.id=t,r.style.display="none",document.body.appendChild(r),t}async function ae(n){R(n);const o=await y(n).reCAPTCHAState.initialized.promise;return new Promise((e,t)=>{const r=y(n).reCAPTCHAState;o.ready(()=>{e(o.execute(r.widgetId,{action:"fire_app_check"}))})})}class se{constructor(e){this._siteKey=e}async getToken(){var e=await ae(this._app).catch(e=>{throw O.create("recaptcha-error")});return I(function(e,t){var{projectId:r,appId:n,apiKey:o}=e.options;return{url:`${w}/projects/${r}/apps/${n}:exchangeRecaptchaToken?key=${o}`,body:{recaptcha_token:t}}}(this._app,e),this._platformLoggerProvider)}initialize(e){this._app=e,this._platformLoggerProvider=ve._getProvider(e,"platform-logger"),re(e,this._siteKey).catch(()=>{})}isEqual(e){return e instanceof se&&this._siteKey===e._siteKey}}class ce{constructor(e){this._siteKey=e}async getToken(){var e=await ae(this._app).catch(e=>{throw O.create("recaptcha-error")});return I(function(e,t){var{projectId:r,appId:n,apiKey:o}=e.options;return{url:`${w}/projects/${r}/apps/${n}:exchangeRecaptchaEnterpriseToken?key=${o}`,body:{recaptcha_enterprise_token:t}}}(this._app,e),this._platformLoggerProvider)}initialize(e){this._app=e,this._platformLoggerProvider=ve._getProvider(e,"platform-logger"),ne(e,this._siteKey).catch(()=>{})}isEqual(e){return e instanceof ce&&this._siteKey===e._siteKey}}class he{constructor(e){this._customProviderOptions=e}async getToken(){var e=await this._customProviderOptions.getToken(),t=u(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 he&&this._customProviderOptions.getToken.toString()===e._customProviderOptions.getToken.toString()}}function le(e=ve.getApp(),t){var r;e=(r=e)&&r._delegate?r._delegate:r;const n=ve._getProvider(e,"app-check");if(m.initialized||U(),K()&&z().then(e=>console.log(`App Check debug token: ${e}. You will need to add it to your app's App Check settings in the Firebase console for it to work.`)),n.isInitialized()){var o=n.getImmediate();const i=n.getOptions();if(i.isTokenAutoRefreshEnabled===t.isTokenAutoRefreshEnabled&&i.provider.isEqual(t.provider))return o;throw O.create("already-initialized",{appName:e.name})}o=n.initialize({options:t});return function(t,e,r){const n=y(t),o=Object.assign(Object.assign({},n),{activated:!0});o.provider=e,o.cachedTokenPromise=W(t).then(e=>(e&&Z(e)&&k(t,Object.assign(Object.assign({},y(t)),{token:e})),e)),o.isTokenAutoRefreshEnabled=void 0===r?t.automaticDataCollectionEnabled:r,k(t,o),o.provider.initialize(t)}(e,t.provider,t.isTokenAutoRefreshEnabled),o}const pe="app-check-internal";ve._registerComponent(new d("app-check",e=>{var t,r=e.getProvider("app").getImmediate(),n=e.getProvider("platform-logger");return t=r,e=n,new Q(t,e)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,r)=>{e.getProvider(pe).initialize()})),ve._registerComponent(new d(pe,e=>{var t,r=e.getProvider("app-check").getImmediate();return t=r,{getToken:e=>X(t,e),addTokenListener:e=>q(t,"INTERNAL",e),removeTokenListener:e=>J(t.app,e)}},"PUBLIC").setInstantiationMode("EXPLICIT")),ve.registerVersion("@firebase/app-check","0.4.2-canary.
|
|
3
|
+
`)}function U(){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.")}();const t=m;if(t.initialized=!0,"string"==typeof e.FIREBASE_APPCHECK_DEBUG_TOKEN||!0===e.FIREBASE_APPCHECK_DEBUG_TOKEN){t.enabled=!0;const r=new i;t.token=r,"string"==typeof e.FIREBASE_APPCHECK_DEBUG_TOKEN?r.resolve(e.FIREBASE_APPCHECK_DEBUG_TOKEN):r.resolve(V())}}const G={error:"UNKNOWN_ERROR"};async function X(e,t=!1){var r=e.app;R(r);const n=y(r);let o=n.token,i=void 0;if(o||(a=await n.cachedTokenPromise)&&Z(a)&&(o=a,k(r,Object.assign(Object.assign({},n),{token:o})),Y(r,{token:o.token})),!t&&o&&Z(o))return{token:o.token};if(K()){var a=await I(function(e,t){var{projectId:r,appId:n,apiKey:o}=e.options;return{url:`${w}/projects/${r}/apps/${n}:${A}?key=${o}`,body:{debug_token:t}}}(r,await z()),e.platformLoggerProvider);return await F(r,a),k(r,Object.assign(Object.assign({},n),{token:a})),{token:a.token}}try{o=await n.provider.getToken()}catch(e){$.error(e),i=e}let s;return o?(s={token:o.token},k(r,Object.assign(Object.assign({},n),{token:o})),await F(r,o)):s=(e=i,{token:function(e){return c.encodeString(JSON.stringify(e),!1)}(G),error:e}),Y(r,s),s}function q(e,t,r,n){var o=e["app"];const i=y(o);var a={next:r,error:n,type:t};const s=Object.assign(Object.assign({},i),{tokenObservers:[...i.tokenObservers,a]});if(s.tokenRefresher||(a=function(r){const n=r["app"];return new C(async()=>{var e=y(n);let t;if(t=e.token?await X(r,!0):await X(r),t.error)throw t.error},()=>!0,()=>{var e=y(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},T.RETRIAL_MIN_WAIT,T.RETRIAL_MAX_WAIT)}(e),s.tokenRefresher=a),!s.tokenRefresher.isRunning()&&i.isTokenAutoRefreshEnabled&&s.tokenRefresher.start(),i.token&&Z(i.token)){const c=i.token;Promise.resolve().then(()=>r({token:c.token})).catch(()=>{})}else null==i.token&&i.cachedTokenPromise.then(e=>{e&&Z(e)&&r({token:e.token})}).catch(()=>{});k(o,s)}function J(e,t){const r=y(e);var n=r.tokenObservers.filter(e=>e.next!==t);0===n.length&&r.tokenRefresher&&r.tokenRefresher.isRunning()&&r.tokenRefresher.stop(),k(e,Object.assign(Object.assign({},r),{tokenObservers:n}))}function Y(e,t){for(const r of y(e).tokenObservers)try{"EXTERNAL"===r.type&&null!=t.error?r.error(t.error):r.next(t)}catch(e){}}function Z(e){return 0<e.expireTimeMillis-Date.now()}class Q{constructor(e,t){this.app=e,this.platformLoggerProvider=t}_delete(){var e=y(this.app)["tokenObservers"];for(const t of e)J(this.app,t.next);return Promise.resolve()}}const ee="https://www.google.com/recaptcha/api.js",te="https://www.google.com/recaptcha/enterprise.js";function re(t,r){var e=y(t);const n=new i;k(t,Object.assign(Object.assign({},e),{reCAPTCHAState:{initialized:n}}));const o=ie(t);e=S(!1);return e?oe(t,r,e,o,n):function(e){const t=document.createElement("script");t.src=ee,t.onload=e,document.head.appendChild(t)}(()=>{var e=S(!1);if(!e)throw new Error("no recaptcha");oe(t,r,e,o,n)}),n.promise}function ne(t,r){var e=y(t);const n=new i;k(t,Object.assign(Object.assign({},e),{reCAPTCHAState:{initialized:n}}));const o=ie(t);e=S(!0);return e?oe(t,r,e,o,n):function(e){const t=document.createElement("script");t.src=te,t.onload=e,document.head.appendChild(t)}(()=>{var e=S(!0);if(!e)throw new Error("no recaptcha");oe(t,r,e,o,n)}),n.promise}function oe(n,o,i,a,s){i.ready(()=>{var e,t,r;e=n,t=i.render(a,{sitekey:o,size:"invisible"}),r=y(e),k(e,Object.assign(Object.assign({},r),{reCAPTCHAState:Object.assign(Object.assign({},r.reCAPTCHAState),{widgetId:t})})),s.resolve(i)})}function ie(e){var t=`fire_app_check_${e.name}`;const r=document.createElement("div");return r.id=t,r.style.display="none",document.body.appendChild(r),t}async function ae(n){R(n);const o=await y(n).reCAPTCHAState.initialized.promise;return new Promise((e,t)=>{const r=y(n).reCAPTCHAState;o.ready(()=>{e(o.execute(r.widgetId,{action:"fire_app_check"}))})})}class se{constructor(e){this._siteKey=e}async getToken(){var e=await ae(this._app).catch(e=>{throw O.create("recaptcha-error")});return I(function(e,t){var{projectId:r,appId:n,apiKey:o}=e.options;return{url:`${w}/projects/${r}/apps/${n}:exchangeRecaptchaToken?key=${o}`,body:{recaptcha_token:t}}}(this._app,e),this._platformLoggerProvider)}initialize(e){this._app=e,this._platformLoggerProvider=ve._getProvider(e,"platform-logger"),re(e,this._siteKey).catch(()=>{})}isEqual(e){return e instanceof se&&this._siteKey===e._siteKey}}class ce{constructor(e){this._siteKey=e}async getToken(){var e=await ae(this._app).catch(e=>{throw O.create("recaptcha-error")});return I(function(e,t){var{projectId:r,appId:n,apiKey:o}=e.options;return{url:`${w}/projects/${r}/apps/${n}:exchangeRecaptchaEnterpriseToken?key=${o}`,body:{recaptcha_enterprise_token:t}}}(this._app,e),this._platformLoggerProvider)}initialize(e){this._app=e,this._platformLoggerProvider=ve._getProvider(e,"platform-logger"),ne(e,this._siteKey).catch(()=>{})}isEqual(e){return e instanceof ce&&this._siteKey===e._siteKey}}class he{constructor(e){this._customProviderOptions=e}async getToken(){var e=await this._customProviderOptions.getToken(),t=u(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 he&&this._customProviderOptions.getToken.toString()===e._customProviderOptions.getToken.toString()}}function le(e=ve.getApp(),t){var r;e=(r=e)&&r._delegate?r._delegate:r;const n=ve._getProvider(e,"app-check");if(m.initialized||U(),K()&&z().then(e=>console.log(`App Check debug token: ${e}. You will need to add it to your app's App Check settings in the Firebase console for it to work.`)),n.isInitialized()){var o=n.getImmediate();const i=n.getOptions();if(i.isTokenAutoRefreshEnabled===t.isTokenAutoRefreshEnabled&&i.provider.isEqual(t.provider))return o;throw O.create("already-initialized",{appName:e.name})}o=n.initialize({options:t});return function(t,e,r){const n=y(t),o=Object.assign(Object.assign({},n),{activated:!0});o.provider=e,o.cachedTokenPromise=W(t).then(e=>(e&&Z(e)&&k(t,Object.assign(Object.assign({},y(t)),{token:e})),e)),o.isTokenAutoRefreshEnabled=void 0===r?t.automaticDataCollectionEnabled:r,k(t,o),o.provider.initialize(t)}(e,t.provider,t.isTokenAutoRefreshEnabled),o}const pe="app-check-internal";ve._registerComponent(new d("app-check",e=>{var t,r=e.getProvider("app").getImmediate(),n=e.getProvider("platform-logger");return t=r,e=n,new Q(t,e)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,r)=>{e.getProvider(pe).initialize()})),ve._registerComponent(new d(pe,e=>{var t,r=e.getProvider("app-check").getImmediate();return t=r,{getToken:e=>X(t,e),addTokenListener:e=>q(t,"INTERNAL",e),removeTokenListener:e=>J(t.app,e)}},"PUBLIC").setInstantiationMode("EXPLICIT")),ve.registerVersion("@firebase/app-check","0.4.2-canary.dbfe09e9d");const ue=new h("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 de{constructor(e){this.app=e}activate(e,t){let r;r="string"==typeof e?new se(e):e instanceof ce||e instanceof se||e instanceof he?e:new he({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){var r=e.app;const n=y(r);n.tokenRefresher&&(!0===t?n.tokenRefresher.start():n.tokenRefresher.stop()),k(r,Object.assign(Object.assign({},n),{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){var r=await X(e,t);if(r.error)throw r.error;return{token:r.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),q(e,"EXTERNAL",n,o),()=>J(e.app,n)}(this._delegate,e,t)}}const ge=e=>{var t=e.getProvider("app-compat").getImmediate();return new de(t)};n.default.INTERNAL.registerComponent(new d("appCheck-compat",ge,"PUBLIC").setServiceProps({ReCaptchaEnterpriseProvider:ce,ReCaptchaV3Provider:se,CustomProvider:he})),n.default.registerVersion("@firebase/app-check-compat","0.1.3-canary.dbfe09e9d")}).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
|
package/firebase-app-check.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _getProvider, getApp, _registerComponent, registerVersion } from 'https://www.gstatic.com/firebasejs/9.2.0-canary.
|
|
1
|
+
import { _getProvider, getApp, _registerComponent, registerVersion } from 'https://www.gstatic.com/firebasejs/9.2.0-canary.dbfe09e9d/firebase-app.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
@@ -1284,7 +1284,7 @@ function computeKey(app) {
|
|
|
1284
1284
|
* See the License for the specific language governing permissions and
|
|
1285
1285
|
* limitations under the License.
|
|
1286
1286
|
*/
|
|
1287
|
-
const logger = new Logger('https://www.gstatic.com/firebasejs/9.2.0-canary.
|
|
1287
|
+
const logger = new Logger('https://www.gstatic.com/firebasejs/9.2.0-canary.dbfe09e9d/firebase-app.js-check');
|
|
1288
1288
|
|
|
1289
1289
|
/**
|
|
1290
1290
|
* @license
|
|
@@ -1691,8 +1691,8 @@ function internalFactory(appCheck) {
|
|
|
1691
1691
|
};
|
|
1692
1692
|
}
|
|
1693
1693
|
|
|
1694
|
-
const name = "https://www.gstatic.com/firebasejs/9.2.0-canary.
|
|
1695
|
-
const version = "0.4.2-canary.
|
|
1694
|
+
const name = "https://www.gstatic.com/firebasejs/9.2.0-canary.dbfe09e9d/firebase-app.js-check";
|
|
1695
|
+
const version = "0.4.2-canary.dbfe09e9d";
|
|
1696
1696
|
|
|
1697
1697
|
/**
|
|
1698
1698
|
* @license
|
|
@@ -1999,7 +1999,7 @@ class CustomProvider {
|
|
|
1999
1999
|
*/
|
|
2000
2000
|
/**
|
|
2001
2001
|
* Activate App Check for the given app. Can be called only once per app.
|
|
2002
|
-
* @param app - the {@link https://www.gstatic.com/firebasejs/9.2.0-canary.
|
|
2002
|
+
* @param app - the {@link https://www.gstatic.com/firebasejs/9.2.0-canary.dbfe09e9d/firebase-app.js#FirebaseApp} to activate App Check for
|
|
2003
2003
|
* @param options - App Check initialization options
|
|
2004
2004
|
* @public
|
|
2005
2005
|
*/
|
package/firebase-app-compat.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).firebase=t()}(this,function(){"use strict";function c(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:const i=t;return new Date(i.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(const r in t)t.hasOwnProperty(r)&&"__proto__"!==r&&(e[r]=c(e[r],t[r]));return e}class n{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(i){return(e,t)=>{e?this.reject(e):this.resolve(t),"function"==typeof i&&(this.promise.catch(()=>{}),1===i.length?i(e):i(e,t))}}}class a extends Error{constructor(e,t,i){super(t),this.code=e,this.customData=i,this.name="FirebaseError",Object.setPrototypeOf(this,a.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,r.prototype.create)}}class r{constructor(e,t,i){this.service=e,this.serviceName=t,this.errors=i}create(e,...t){var r,i=t[0]||{},n=`${this.service}/${e}`,s=this.errors[e],s=s?(r=i,s.replace(o,(e,t)=>{var i=r[t];return null!=i?String(i):`<${t}?>`})):"Error",s=`${this.serviceName}: ${s} (${n}).`;return new a(n,s,i)}}const o=/\{\$([^}]+)}/g;function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h(e,t){if(e===t)return 1;const i=Object.keys(e),r=Object.keys(t);for(const a of i){if(!r.includes(a))return;var n=e[a],s=t[a];if(p(n)&&p(s)){if(!h(n,s))return}else if(n!==s)return}for(const o of r)if(!i.includes(o))return;return 1}function p(e){return null!==e&&"object"==typeof e}function i(e,t){const i=new s(e,t);return i.subscribe.bind(i)}class s{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(t){this.forEachObserver(e=>{e.next(t)})}error(t){this.forEachObserver(e=>{e.error(t)}),this.close(t)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,i){let r;if(void 0===e&&void 0===t&&void 0===i)throw new Error("Missing Observer.");r=function(e,t){if("object"!=typeof e||null===e)return!1;for(const i of t)if(i in e&&"function"==typeof e[i])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:i},void 0===r.next&&(r.next=f),void 0===r.error&&(r.error=f),void 0===r.complete&&(r.complete=f);var n=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(e){}}),this.observers.push(r),n}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],--this.observerCount,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let e=0;e<this.observers.length;e++)this.sendOne(e,t)}sendOne(e,t){this.task.then(()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function f(){}class d{constructor(e,t,i){this.name=e,this.instanceFactory=t,this.type=i,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}const u="[DEFAULT]";class m{constructor(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}get(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const r=new n;if(this.instancesDeferred.set(t,r),this.isInitialized(t)||this.shouldAutoInitialize())try{var i=this.getOrInitializeService({instanceIdentifier:t});i&&r.resolve(i)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),i=null!==(i=null==e?void 0:e.optional)&&void 0!==i&&i;if(!this.isInitialized(t)&&!this.shouldAutoInitialize()){if(i)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:t})}catch(e){if(i)return null;throw e}}getComponent(){return this.component}setComponent(e){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:u})}catch(e){}for(var[t,i]of this.instancesDeferred.entries()){t=this.normalizeInstanceIdentifier(t);try{var r=this.getOrInitializeService({instanceIdentifier:t});i.resolve(r)}catch(e){}}}}clearInstance(e=u){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...e.filter(e=>"_delete"in e).map(e=>e._delete())])}isComponentSet(){return null!=this.component}isInitialized(e=u){return this.instances.has(e)}getOptions(e=u){return this.instancesOptions.get(e)||{}}initialize(e={}){var{options:t={}}=e,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 r,n,s=this.getOrInitializeService({instanceIdentifier:i,options:t});for([r,n]of this.instancesDeferred.entries())i===this.normalizeInstanceIdentifier(r)&&n.resolve(s);return s}onInit(e,t){var i=this.normalizeInstanceIdentifier(t);const r=null!==(n=this.onInitCallbacks.get(i))&&void 0!==n?n:new Set;r.add(e),this.onInitCallbacks.set(i,r);var n=this.instances.get(i);return n&&e(n,i),()=>{r.delete(e)}}invokeOnInitCallbacks(e,t){var i=this.onInitCallbacks.get(t);if(i)for(const r of i)try{r(e,t)}catch(e){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let i=this.instances.get(e);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:(r=e)===u?void 0:r,options:t}),this.instances.set(e,i),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(i,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,i)}catch(e){}var r;return i||null}normalizeInstanceIdentifier(e=u){return!this.component||this.component.multipleInstances?e:u}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class g{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){const t=this.getProvider(e.name);t.isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);var t=new m(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}const v=[];var b,e;(e=b=b||{})[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT";const I={debug:b.DEBUG,verbose:b.VERBOSE,info:b.INFO,warn:b.WARN,error:b.ERROR,silent:b.SILENT},t=b.INFO,y={[b.DEBUG]:"log",[b.VERBOSE]:"log",[b.INFO]:"info",[b.WARN]:"warn",[b.ERROR]:"error"},E=(e,t,...i)=>{if(!(t<e.logLevel)){var r=(new Date).toISOString(),n=y[t];if(!n)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[n](`[${r}] ${e.name}:`,...i)}};class _{constructor(e){this.name=e,this._logLevel=t,this._logHandler=E,this._userLogHandler=null,v.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in b))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?I[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,b.DEBUG,...e),this._logHandler(this,b.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,b.VERBOSE,...e),this._logHandler(this,b.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,b.INFO,...e),this._logHandler(this,b.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,b.WARN,...e),this._logHandler(this,b.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,b.ERROR,...e),this._logHandler(this,b.ERROR,...e)}}class O{constructor(e){this.container=e}getPlatformInfoString(){const e=this.container.getProviders();return e.map(e=>{if("VERSION"!==(null==(t=e.getComponent())?void 0:t.type))return null;var t,t=e.getImmediate();return`${t.library}/${t.version}`}).filter(e=>e).join(" ")}}const w="@firebase/app",C="0.7.5-canary.2322b6023",N=new _("@firebase/app");var L;const A="[DEFAULT]",D={"@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"},S=new Map,R=new Map;function $(t,i){try{t.container.addComponent(i)}catch(e){N.debug(`Component ${i.name} failed to register with FirebaseApp ${t.name}`,e)}}function k(e,t){e.container.addOrOverwriteComponent(t)}function P(e){var t=e.name;if(R.has(t))return N.debug(`There were multiple attempts to register component ${t}.`),!1;R.set(t,e);for(const i of S.values())$(i,e);return!0}function z(e,t){return e.container.getProvider(t)}const F=new r("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function."});class j{constructor(e,t,i){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=i,this.container.addComponent(new d("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 F.create("app-deleted",{appName:this._name})}}const H="9.2.0-canary.2322b6023";function T(e,t={}){if("object"!=typeof t){const r=t;t={name:r}}var i=Object.assign({name:A,automaticDataCollectionEnabled:!1},t);const r=i.name;if("string"!=typeof r||!r)throw F.create("bad-app-name",{appName:String(r)});var n=S.get(r);if(n){if(h(e,n.options)&&h(i,n.config))return n;throw F.create("duplicate-app",{appName:r})}const s=new g(r);for(const a of R.values())s.addComponent(a);i=new j(e,i,s);return S.set(r,i),i}async function M(e){var t=e.name;S.has(t)&&(S.delete(t),await Promise.all(e.container.getProviders().map(e=>e.delete())),e.isDeleted=!0)}function B(e,t,i){let r=null!==(s=D[e])&&void 0!==s?s:e;i&&(r+=`-${i}`);var n=r.match(/\s|\//),s=t.match(/\s|\//);if(n||s){const a=[`Unable to register library "${r}" with version "${t}":`];return n&&a.push(`library name "${r}" contains illegal characters (whitespace or "/")`),n&&s&&a.push("and"),s&&a.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void N.warn(a.join(" "))}P(new d(`${r}-version`,()=>({library:r,version:t}),"VERSION"))}function V(e,t){if(null!==e&&"function"!=typeof e)throw F.create("invalid-log-argument");!function(s,e){for(const t of v){let n=null;e&&e.level&&(n=I[e.level]),t.userLogHandler=null===s?null:(e,t,...i)=>{var r=i.map(e=>{if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}}).filter(e=>e).join(" ");t>=(null!==n&&void 0!==n?n:e.logLevel)&&s({level:b[t].toLowerCase(),message:r,args:i,type:e.name})}}}(e,t)}function U(e){var t;t=e,v.forEach(e=>{e.setLogLevel(t)})}L="",P(new d("platform-logger",e=>new O(e),"PRIVATE")),B(w,C,L),B(w,C,"esm2017"),B("fire-js","");var x=Object.freeze({__proto__:null,SDK_VERSION:H,_DEFAULT_ENTRY_NAME:A,_addComponent:$,_addOrOverwriteComponent:k,_apps:S,_clearComponents:function(){R.clear()},_components:R,_getProvider:z,_registerComponent:P,_removeServiceInstance:function(e,t,i=A){z(e,t).clearInstance(i)},deleteApp:M,getApp:function(e=A){var t=S.get(e);if(!t)throw F.create("no-app",{appName:e});return t},getApps:function(){return Array.from(S.values())},initializeApp:T,onLog:V,registerVersion:B,setLogLevel:U,FirebaseError:a});class W{constructor(e,t){this._delegate=e,this.firebase=t,$(e,new d("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),M(this._delegate)))}_getService(e,t=A){var i;this._delegate.checkDestroyed();const r=this._delegate.container.getProvider(e);return r.isInitialized()||"EXPLICIT"!==(null===(i=r.getComponent())||void 0===i?void 0:i.instantiationMode)||r.initialize(),r.getImmediate({identifier:t})}_removeServiceInstance(e,t=A){this._delegate.container.getProvider(e).clearInstance(t)}_addComponent(e){$(this._delegate,e)}_addOrOverwriteComponent(e){k(this._delegate,e)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}}const G=new r("app-compat","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance."});function Y(n){const s={},a={__esModule:!0,initializeApp:function(e,t={}){var i=T(e,t);if(l(s,i.name))return s[i.name];var r=new n(i,a);return s[i.name]=r},app:o,registerVersion:B,setLogLevel:U,onLog:V,apps:null,SDK_VERSION:H,INTERNAL:{registerComponent:function(i){const r=i.name,t=r.replace("-compat","");{var e;P(i)&&"PUBLIC"===i.type&&(e=(e=o())=>{if("function"!=typeof e[t])throw G.create("invalid-app-argument",{appName:r});return e[t]()},void 0!==i.serviceProps&&c(e,i.serviceProps),a[t]=e,n.prototype[t]=function(...e){const t=this._getService.bind(this,r);return t.apply(this,i.multipleInstances?e:[])})}return"PUBLIC"===i.type?a[t]:null},removeApp:function(e){delete s[e]},useAsService:function(e,t){if("serverAuth"===t)return null;var i=t;return i},modularAPIs:x}};function o(e){if(e=e||A,!l(s,e))throw G.create("no-app",{appName:e});return s[e]}return a.default=a,Object.defineProperty(a,"apps",{get:function(){return Object.keys(s).map(e=>s[e])}}),o.App=n,a}var K=function e(){const t=Y(W);return t.INTERNAL=Object.assign(Object.assign({},t.INTERNAL),{createFirebaseNamespace:e,extendNamespace:function(e){c(t,e)},createSubscribe:i,ErrorFactory:r,deepExtend:c}),t}();const J=new _("@firebase/app-compat");if("object"==typeof self&&self.self===self&&void 0!==self.firebase){J.warn(`
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).firebase=t()}(this,function(){"use strict";function c(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:const i=t;return new Date(i.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(const r in t)t.hasOwnProperty(r)&&"__proto__"!==r&&(e[r]=c(e[r],t[r]));return e}class n{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(i){return(e,t)=>{e?this.reject(e):this.resolve(t),"function"==typeof i&&(this.promise.catch(()=>{}),1===i.length?i(e):i(e,t))}}}class a extends Error{constructor(e,t,i){super(t),this.code=e,this.customData=i,this.name="FirebaseError",Object.setPrototypeOf(this,a.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,r.prototype.create)}}class r{constructor(e,t,i){this.service=e,this.serviceName=t,this.errors=i}create(e,...t){var r,i=t[0]||{},n=`${this.service}/${e}`,s=this.errors[e],s=s?(r=i,s.replace(o,(e,t)=>{var i=r[t];return null!=i?String(i):`<${t}?>`})):"Error",s=`${this.serviceName}: ${s} (${n}).`;return new a(n,s,i)}}const o=/\{\$([^}]+)}/g;function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h(e,t){if(e===t)return 1;const i=Object.keys(e),r=Object.keys(t);for(const a of i){if(!r.includes(a))return;var n=e[a],s=t[a];if(p(n)&&p(s)){if(!h(n,s))return}else if(n!==s)return}for(const o of r)if(!i.includes(o))return;return 1}function p(e){return null!==e&&"object"==typeof e}function i(e,t){const i=new s(e,t);return i.subscribe.bind(i)}class s{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(t){this.forEachObserver(e=>{e.next(t)})}error(t){this.forEachObserver(e=>{e.error(t)}),this.close(t)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,i){let r;if(void 0===e&&void 0===t&&void 0===i)throw new Error("Missing Observer.");r=function(e,t){if("object"!=typeof e||null===e)return!1;for(const i of t)if(i in e&&"function"==typeof e[i])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:i},void 0===r.next&&(r.next=d),void 0===r.error&&(r.error=d),void 0===r.complete&&(r.complete=d);var n=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(e){}}),this.observers.push(r),n}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],--this.observerCount,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let e=0;e<this.observers.length;e++)this.sendOne(e,t)}sendOne(e,t){this.task.then(()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function d(){}class f{constructor(e,t,i){this.name=e,this.instanceFactory=t,this.type=i,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}const u="[DEFAULT]";class m{constructor(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}get(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const r=new n;if(this.instancesDeferred.set(t,r),this.isInitialized(t)||this.shouldAutoInitialize())try{var i=this.getOrInitializeService({instanceIdentifier:t});i&&r.resolve(i)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),i=null!==(i=null==e?void 0:e.optional)&&void 0!==i&&i;if(!this.isInitialized(t)&&!this.shouldAutoInitialize()){if(i)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:t})}catch(e){if(i)return null;throw e}}getComponent(){return this.component}setComponent(e){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:u})}catch(e){}for(var[t,i]of this.instancesDeferred.entries()){t=this.normalizeInstanceIdentifier(t);try{var r=this.getOrInitializeService({instanceIdentifier:t});i.resolve(r)}catch(e){}}}}clearInstance(e=u){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...e.filter(e=>"_delete"in e).map(e=>e._delete())])}isComponentSet(){return null!=this.component}isInitialized(e=u){return this.instances.has(e)}getOptions(e=u){return this.instancesOptions.get(e)||{}}initialize(e={}){var{options:t={}}=e,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 r,n,s=this.getOrInitializeService({instanceIdentifier:i,options:t});for([r,n]of this.instancesDeferred.entries())i===this.normalizeInstanceIdentifier(r)&&n.resolve(s);return s}onInit(e,t){var i=this.normalizeInstanceIdentifier(t);const r=null!==(n=this.onInitCallbacks.get(i))&&void 0!==n?n:new Set;r.add(e),this.onInitCallbacks.set(i,r);var n=this.instances.get(i);return n&&e(n,i),()=>{r.delete(e)}}invokeOnInitCallbacks(e,t){var i=this.onInitCallbacks.get(t);if(i)for(const r of i)try{r(e,t)}catch(e){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let i=this.instances.get(e);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:(r=e)===u?void 0:r,options:t}),this.instances.set(e,i),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(i,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,i)}catch(e){}var r;return i||null}normalizeInstanceIdentifier(e=u){return!this.component||this.component.multipleInstances?e:u}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class g{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){const t=this.getProvider(e.name);t.isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);var t=new m(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}const v=[];var b,e;(e=b=b||{})[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT";const I={debug:b.DEBUG,verbose:b.VERBOSE,info:b.INFO,warn:b.WARN,error:b.ERROR,silent:b.SILENT},t=b.INFO,y={[b.DEBUG]:"log",[b.VERBOSE]:"log",[b.INFO]:"info",[b.WARN]:"warn",[b.ERROR]:"error"},E=(e,t,...i)=>{if(!(t<e.logLevel)){var r=(new Date).toISOString(),n=y[t];if(!n)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[n](`[${r}] ${e.name}:`,...i)}};class _{constructor(e){this.name=e,this._logLevel=t,this._logHandler=E,this._userLogHandler=null,v.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in b))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?I[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,b.DEBUG,...e),this._logHandler(this,b.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,b.VERBOSE,...e),this._logHandler(this,b.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,b.INFO,...e),this._logHandler(this,b.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,b.WARN,...e),this._logHandler(this,b.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,b.ERROR,...e),this._logHandler(this,b.ERROR,...e)}}class O{constructor(e){this.container=e}getPlatformInfoString(){const e=this.container.getProviders();return e.map(e=>{if("VERSION"!==(null==(t=e.getComponent())?void 0:t.type))return null;var t,t=e.getImmediate();return`${t.library}/${t.version}`}).filter(e=>e).join(" ")}}const w="@firebase/app",C="0.7.5-canary.dbfe09e9d",N=new _("@firebase/app");var L;const A="[DEFAULT]",D={"@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"},S=new Map,R=new Map;function $(t,i){try{t.container.addComponent(i)}catch(e){N.debug(`Component ${i.name} failed to register with FirebaseApp ${t.name}`,e)}}function k(e,t){e.container.addOrOverwriteComponent(t)}function P(e){var t=e.name;if(R.has(t))return N.debug(`There were multiple attempts to register component ${t}.`),!1;R.set(t,e);for(const i of S.values())$(i,e);return!0}function z(e,t){return e.container.getProvider(t)}const F=new r("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function."});class j{constructor(e,t,i){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=i,this.container.addComponent(new f("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 F.create("app-deleted",{appName:this._name})}}const H="9.2.0-canary.dbfe09e9d";function T(e,t={}){if("object"!=typeof t){const r=t;t={name:r}}var i=Object.assign({name:A,automaticDataCollectionEnabled:!1},t);const r=i.name;if("string"!=typeof r||!r)throw F.create("bad-app-name",{appName:String(r)});var n=S.get(r);if(n){if(h(e,n.options)&&h(i,n.config))return n;throw F.create("duplicate-app",{appName:r})}const s=new g(r);for(const a of R.values())s.addComponent(a);i=new j(e,i,s);return S.set(r,i),i}async function M(e){var t=e.name;S.has(t)&&(S.delete(t),await Promise.all(e.container.getProviders().map(e=>e.delete())),e.isDeleted=!0)}function B(e,t,i){let r=null!==(s=D[e])&&void 0!==s?s:e;i&&(r+=`-${i}`);var n=r.match(/\s|\//),s=t.match(/\s|\//);if(n||s){const a=[`Unable to register library "${r}" with version "${t}":`];return n&&a.push(`library name "${r}" contains illegal characters (whitespace or "/")`),n&&s&&a.push("and"),s&&a.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void N.warn(a.join(" "))}P(new f(`${r}-version`,()=>({library:r,version:t}),"VERSION"))}function V(e,t){if(null!==e&&"function"!=typeof e)throw F.create("invalid-log-argument");!function(s,e){for(const t of v){let n=null;e&&e.level&&(n=I[e.level]),t.userLogHandler=null===s?null:(e,t,...i)=>{var r=i.map(e=>{if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}}).filter(e=>e).join(" ");t>=(null!==n&&void 0!==n?n:e.logLevel)&&s({level:b[t].toLowerCase(),message:r,args:i,type:e.name})}}}(e,t)}function U(e){var t;t=e,v.forEach(e=>{e.setLogLevel(t)})}L="",P(new f("platform-logger",e=>new O(e),"PRIVATE")),B(w,C,L),B(w,C,"esm2017"),B("fire-js","");var x=Object.freeze({__proto__:null,SDK_VERSION:H,_DEFAULT_ENTRY_NAME:A,_addComponent:$,_addOrOverwriteComponent:k,_apps:S,_clearComponents:function(){R.clear()},_components:R,_getProvider:z,_registerComponent:P,_removeServiceInstance:function(e,t,i=A){z(e,t).clearInstance(i)},deleteApp:M,getApp:function(e=A){var t=S.get(e);if(!t)throw F.create("no-app",{appName:e});return t},getApps:function(){return Array.from(S.values())},initializeApp:T,onLog:V,registerVersion:B,setLogLevel:U,FirebaseError:a});class W{constructor(e,t){this._delegate=e,this.firebase=t,$(e,new f("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),M(this._delegate)))}_getService(e,t=A){var i;this._delegate.checkDestroyed();const r=this._delegate.container.getProvider(e);return r.isInitialized()||"EXPLICIT"!==(null===(i=r.getComponent())||void 0===i?void 0:i.instantiationMode)||r.initialize(),r.getImmediate({identifier:t})}_removeServiceInstance(e,t=A){this._delegate.container.getProvider(e).clearInstance(t)}_addComponent(e){$(this._delegate,e)}_addOrOverwriteComponent(e){k(this._delegate,e)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}}const G=new r("app-compat","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance."});function Y(n){const s={},a={__esModule:!0,initializeApp:function(e,t={}){var i=T(e,t);if(l(s,i.name))return s[i.name];var r=new n(i,a);return s[i.name]=r},app:o,registerVersion:B,setLogLevel:U,onLog:V,apps:null,SDK_VERSION:H,INTERNAL:{registerComponent:function(i){const r=i.name,t=r.replace("-compat","");{var e;P(i)&&"PUBLIC"===i.type&&(e=(e=o())=>{if("function"!=typeof e[t])throw G.create("invalid-app-argument",{appName:r});return e[t]()},void 0!==i.serviceProps&&c(e,i.serviceProps),a[t]=e,n.prototype[t]=function(...e){const t=this._getService.bind(this,r);return t.apply(this,i.multipleInstances?e:[])})}return"PUBLIC"===i.type?a[t]:null},removeApp:function(e){delete s[e]},useAsService:function(e,t){if("serverAuth"===t)return null;var i=t;return i},modularAPIs:x}};function o(e){if(e=e||A,!l(s,e))throw G.create("no-app",{appName:e});return s[e]}return a.default=a,Object.defineProperty(a,"apps",{get:function(){return Object.keys(s).map(e=>s[e])}}),o.App=n,a}var K=function e(){const t=Y(W);return t.INTERNAL=Object.assign(Object.assign({},t.INTERNAL),{createFirebaseNamespace:e,extendNamespace:function(e){c(t,e)},createSubscribe:i,ErrorFactory:r,deepExtend:c}),t}();const J=new _("@firebase/app-compat");if("object"==typeof self&&self.self===self&&void 0!==self.firebase){J.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 Z=self.firebase.SDK_VERSION;Z&&0<=Z.indexOf("LITE")&&J.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 X=K;B("@firebase/app-compat","0.1.6-canary.
|
|
7
|
+
`)}const X=K;B("@firebase/app-compat","0.1.6-canary.dbfe09e9d",void 0);return X.registerVersion("firebase","9.2.0-canary.dbfe09e9d","app-compat-cdn"),X});
|
|
8
8
|
//# sourceMappingURL=firebase-app-compat.js.map
|
package/firebase-app.js
CHANGED
|
@@ -879,8 +879,8 @@ function isVersionServiceProvider(provider) {
|
|
|
879
879
|
return (component === null || component === void 0 ? void 0 : component.type) === "VERSION" /* VERSION */;
|
|
880
880
|
}
|
|
881
881
|
|
|
882
|
-
const name$o = "https://www.gstatic.com/firebasejs/9.2.0-canary.
|
|
883
|
-
const version$1 = "0.7.5-canary.
|
|
882
|
+
const name$o = "https://www.gstatic.com/firebasejs/9.2.0-canary.dbfe09e9d/firebase-app.js";
|
|
883
|
+
const version$1 = "0.7.5-canary.dbfe09e9d";
|
|
884
884
|
|
|
885
885
|
/**
|
|
886
886
|
* @license
|
|
@@ -898,17 +898,17 @@ const version$1 = "0.7.5-canary.2322b6023";
|
|
|
898
898
|
* See the License for the specific language governing permissions and
|
|
899
899
|
* limitations under the License.
|
|
900
900
|
*/
|
|
901
|
-
const logger = new Logger('https://www.gstatic.com/firebasejs/9.2.0-canary.
|
|
901
|
+
const logger = new Logger('https://www.gstatic.com/firebasejs/9.2.0-canary.dbfe09e9d/firebase-app.js');
|
|
902
902
|
|
|
903
|
-
const name$n = "https://www.gstatic.com/firebasejs/9.2.0-canary.
|
|
903
|
+
const name$n = "https://www.gstatic.com/firebasejs/9.2.0-canary.dbfe09e9d/firebase-app.js-compat";
|
|
904
904
|
|
|
905
905
|
const name$m = "@firebase/analytics-compat";
|
|
906
906
|
|
|
907
907
|
const name$l = "@firebase/analytics";
|
|
908
908
|
|
|
909
|
-
const name$k = "https://www.gstatic.com/firebasejs/9.2.0-canary.
|
|
909
|
+
const name$k = "https://www.gstatic.com/firebasejs/9.2.0-canary.dbfe09e9d/firebase-app.js-check-compat";
|
|
910
910
|
|
|
911
|
-
const name$j = "https://www.gstatic.com/firebasejs/9.2.0-canary.
|
|
911
|
+
const name$j = "https://www.gstatic.com/firebasejs/9.2.0-canary.dbfe09e9d/firebase-app.js-check";
|
|
912
912
|
|
|
913
913
|
const name$i = "@firebase/auth";
|
|
914
914
|
|
|
@@ -947,7 +947,7 @@ const name$2 = "@firebase/firestore";
|
|
|
947
947
|
const name$1 = "@firebase/firestore-compat";
|
|
948
948
|
|
|
949
949
|
const name$p = "firebase";
|
|
950
|
-
const version$2 = "9.2.0-canary.
|
|
950
|
+
const version$2 = "9.2.0-canary.dbfe09e9d";
|
|
951
951
|
|
|
952
952
|
/**
|
|
953
953
|
* @license
|
|
@@ -1248,7 +1248,7 @@ function initializeApp(options, rawConfig = {}) {
|
|
|
1248
1248
|
return newApp;
|
|
1249
1249
|
}
|
|
1250
1250
|
/**
|
|
1251
|
-
* Retrieves a {@link https://www.gstatic.com/firebasejs/9.2.0-canary.
|
|
1251
|
+
* Retrieves a {@link https://www.gstatic.com/firebasejs/9.2.0-canary.dbfe09e9d/firebase-app.js#FirebaseApp} instance.
|
|
1252
1252
|
*
|
|
1253
1253
|
* When called with no arguments, the default app is returned. When an app name
|
|
1254
1254
|
* is provided, the app corresponding to that name is returned.
|
|
@@ -1414,7 +1414,7 @@ function registerCoreComponents(variant) {
|
|
|
1414
1414
|
registerCoreComponents('');
|
|
1415
1415
|
|
|
1416
1416
|
var name = "firebase";
|
|
1417
|
-
var version = "9.2.0-canary.
|
|
1417
|
+
var version = "9.2.0-canary.dbfe09e9d";
|
|
1418
1418
|
|
|
1419
1419
|
/**
|
|
1420
1420
|
* @license
|