firebase 13.3.0 → 13.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/dist/esm/index.esm.js +1 -1
- package/app/dist/index.cjs.js +1 -1
- package/app/dist/index.mjs +1 -1
- package/compat/app/dist/esm/index.esm.js +1 -1
- package/compat/app/dist/index.cjs.js +1 -1
- package/compat/app/dist/index.mjs +1 -1
- package/compat/dist/esm/index.esm.js +2 -2
- package/compat/dist/index.node.cjs +2 -2
- package/compat/dist/index.rn.cjs.js +2 -2
- package/firebase-ai.js +1 -1
- package/firebase-analytics-compat.js +1 -1
- package/firebase-analytics-compat.js.map +1 -1
- package/firebase-analytics.js +1 -1
- package/firebase-analytics.js.map +1 -1
- package/firebase-app-check-compat.js +1 -1
- package/firebase-app-check-compat.js.map +1 -1
- package/firebase-app-check.js +1 -1
- package/firebase-app-check.js.map +1 -1
- package/firebase-app-compat.js +3 -3
- package/firebase-app-compat.js.map +1 -1
- package/firebase-app.js +134 -6
- package/firebase-app.js.map +1 -1
- package/firebase-auth-compat.js +1 -1
- package/firebase-auth-compat.js.map +1 -1
- package/firebase-auth-cordova.js +1 -1
- package/firebase-auth-web-extension.js +1 -1
- package/firebase-auth.js +1 -1
- package/firebase-auth.js.map +1 -1
- package/firebase-compat.js +11 -11
- package/firebase-compat.js.map +1 -1
- package/firebase-crashlytics.js +1 -1
- package/firebase-crashlytics.js.map +1 -1
- package/firebase-data-connect.js +1 -1
- package/firebase-database.js +1 -1
- package/firebase-firestore-compat.js +1 -1
- package/firebase-firestore-lite-pipelines.js +1 -1
- package/firebase-firestore-lite.js +1 -1
- package/firebase-firestore-pipelines.js +1 -1
- package/firebase-firestore.js +1 -1
- package/firebase-functions.js +1 -1
- package/firebase-installations.js +1 -1
- package/firebase-messaging-sw.js +1 -1
- package/firebase-messaging.js +1 -1
- package/firebase-performance-standalone-compat.js +64 -46
- package/firebase-performance-standalone-compat.js.map +1 -1
- package/firebase-performance.js +1 -1
- package/firebase-remote-config.js +1 -1
- package/firebase-storage.js +1 -1
- package/package.json +10 -10
|
@@ -144,7 +144,7 @@ function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window
|
|
|
144
144
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
145
145
|
* See the License for the specific language governing permissions and
|
|
146
146
|
* limitations under the License.
|
|
147
|
-
*/class
|
|
147
|
+
*/class w{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){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new l;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){const t=this.normalizeInstanceIdentifier(e?.identifier),n=e?.optional??!1;if(!this.isInitialized(t)&&!this.shouldAutoInitialize()){if(n)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:t})}catch(e){if(n)return null;throw e}}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(function(e){return"EAGER"===e.instantiationMode}
|
|
148
148
|
/**
|
|
149
149
|
* @license
|
|
150
150
|
* Copyright 2019 Google LLC
|
|
@@ -160,7 +160,7 @@ function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window
|
|
|
160
160
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
161
161
|
* See the License for the specific language governing permissions and
|
|
162
162
|
* limitations under the License.
|
|
163
|
-
*/(e))try{this.getOrInitializeService({instanceIdentifier:y})}catch(e){}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(e){}}}}clearInstance(e=y){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=y){return this.instances.has(e)}getOptions(e=y){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[e,t]of this.instancesDeferred.entries()){n===this.normalizeInstanceIdentifier(e)&&t.resolve(r)}return r}onInit(e,t){const n=this.normalizeInstanceIdentifier(t),r=this.onInitCallbacks.get(n)??new Set;r.add(e),this.onInitCallbacks.set(n,r);const i=this.instances.get(n);return i&&e(i,n),()=>{r.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const r of n)try{r(e,t)}catch{}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(r=e,r===y?void 0:r),options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch{}var r;return n||null}normalizeInstanceIdentifier(e=y){return this.component?this.component.multipleInstances?e:y:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class
|
|
163
|
+
*/(e))try{this.getOrInitializeService({instanceIdentifier:y})}catch(e){}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(e){}}}}clearInstance(e=y){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=y){return this.instances.has(e)}getOptions(e=y){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[e,t]of this.instancesDeferred.entries()){n===this.normalizeInstanceIdentifier(e)&&t.resolve(r)}return r}onInit(e,t){const n=this.normalizeInstanceIdentifier(t),r=this.onInitCallbacks.get(n)??new Set;r.add(e),this.onInitCallbacks.set(n,r);const i=this.instances.get(n);return i&&e(i,n),()=>{r.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const r of n)try{r(e,t)}catch{}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(r=e,r===y?void 0:r),options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch{}var r;return n||null}normalizeInstanceIdentifier(e=y){return this.component?this.component.multipleInstances?e:y:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class _{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){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new w(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}
|
|
164
164
|
/**
|
|
165
165
|
* @license
|
|
166
166
|
* Copyright 2019 Google LLC
|
|
@@ -193,7 +193,7 @@ function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window
|
|
|
193
193
|
* See the License for the specific language governing permissions and
|
|
194
194
|
* limitations under the License.
|
|
195
195
|
*/
|
|
196
|
-
const I=[];var T;!function(e){e[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"}(T||(T={}));const C={debug:T.DEBUG,verbose:T.VERBOSE,info:T.INFO,warn:T.WARN,error:T.ERROR,silent:T.SILENT},A=T.INFO,D={[T.DEBUG]:"log",[T.VERBOSE]:"log",[T.INFO]:"info",[T.WARN]:"warn",[T.ERROR]:"error"},N=(e,t,...n)=>{if(t<e.logLevel)return;const r=(new Date).toISOString(),i=D[t];if(!i)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[i](`[${r}] ${e.name}:`,...n)};class k{constructor(e){this.name=e,this._logLevel=A,this._logHandler=N,this._userLogHandler=null,I.push(this)}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?C[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)}}let O,
|
|
196
|
+
const I=[];var T;!function(e){e[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"}(T||(T={}));const C={debug:T.DEBUG,verbose:T.VERBOSE,info:T.INFO,warn:T.WARN,error:T.ERROR,silent:T.SILENT},A=T.INFO,D={[T.DEBUG]:"log",[T.VERBOSE]:"log",[T.INFO]:"info",[T.WARN]:"warn",[T.ERROR]:"error"},N=(e,t,...n)=>{if(t<e.logLevel)return;const r=(new Date).toISOString(),i=D[t];if(!i)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[i](`[${r}] ${e.name}:`,...n)};class k{constructor(e){this.name=e,this._logLevel=A,this._logHandler=N,this._userLogHandler=null,I.push(this)}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?C[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)}}let O,L;const M=new WeakMap,P=new WeakMap,R=new WeakMap,B=new WeakMap,F=new WeakMap;let $={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return P.get(e);if("objectStoreNames"===t)return e.objectStoreNames||R.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return x(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function U(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(L||(L=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(V(this),t),x(M.get(this))}:function(...t){return x(e.apply(V(this),t))}:function(t,...n){const r=e.call(V(this),t,...n);return R.set(r,t.sort?t.sort():[t]),x(r)}}function j(e){return"function"==typeof e?U(e):(e instanceof IDBTransaction&&function(e){if(P.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=()=>{t(),r()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)}));P.set(e,t)}(e),t=e,(O||(O=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>t instanceof e))?new Proxy(e,$):e);var t}function x(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",a)},i=()=>{t(x(e.result)),r()},a=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",a)}));return t.then((t=>{t instanceof IDBCursor&&M.set(t,e)})).catch((()=>{})),F.set(t,e),t}(e);if(B.has(e))return B.get(e);const t=j(e);return t!==e&&(B.set(e,t),F.set(t,e)),t}const V=e=>F.get(e);function z(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=x(o);return r&&o.addEventListener("upgradeneeded",(e=>{r(x(o.result),e.oldVersion,e.newVersion,x(o.transaction),e)})),n&&o.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),s.then((e=>{a&&e.addEventListener("close",(()=>a())),i&&e.addEventListener("versionchange",(e=>i(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),s}const H=["get","getKey","getAll","getAllKeys","count"],q=["put","add","delete","clear"],W=new Map;function J(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(W.get(t))return W.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=q.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!H.includes(n))return;const a=async function(e,...t){const a=this.transaction(e,i?"readwrite":"readonly");let o=a.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&a.done]))[0]};return W.set(t,a),a}$=(e=>({...e,get:(t,n,r)=>J(t,n)||e.get(t,n,r),has:(t,n)=>!!J(t,n)||e.has(t,n)}))($);
|
|
197
197
|
/**
|
|
198
198
|
* @license
|
|
199
199
|
* Copyright 2019 Google LLC
|
|
@@ -210,7 +210,7 @@ const I=[];var T;!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.
|
|
|
210
210
|
* See the License for the specific language governing permissions and
|
|
211
211
|
* limitations under the License.
|
|
212
212
|
*/
|
|
213
|
-
class K{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===t?.type}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const G="@firebase/app",X="0.16.
|
|
213
|
+
class K{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===t?.type}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const G="@firebase/app",X="0.16.7",Y=new k("@firebase/app"),Z="@firebase/app-compat",Q="@firebase/analytics-compat",ee="@firebase/analytics",te="@firebase/app-check-compat",ne="@firebase/app-check",re="@firebase/auth",ie="@firebase/auth-compat",ae="@firebase/crashlytics",oe="@firebase/database",se="@firebase/data-connect",ce="@firebase/database-compat",le="@firebase/functions",ue="@firebase/functions-compat",fe="@firebase/installations",de="@firebase/installations-compat",pe="@firebase/messaging",he="@firebase/messaging-compat",ge="@firebase/performance",me="@firebase/performance-compat",be="@firebase/remote-config",ve="@firebase/remote-config-compat",ye="@firebase/storage",we="@firebase/storage-compat",_e="@firebase/firestore",Ee="@firebase/ai",Se="@firebase/firestore-compat",Ie="firebase",Te="[DEFAULT]",Ce={[G]:"fire-core",[Z]:"fire-core-compat",[ee]:"fire-analytics",[Q]:"fire-analytics-compat",[ne]:"fire-app-check",[te]:"fire-app-check-compat",[re]:"fire-auth",[ie]:"fire-auth-compat",[ae]:"fire-cls",[oe]:"fire-rtdb",[se]:"fire-data-connect",[ce]:"fire-rtdb-compat",[le]:"fire-fn",[ue]:"fire-fn-compat",[fe]:"fire-iid",[de]:"fire-iid-compat",[pe]:"fire-fcm",[he]:"fire-fcm-compat",[ge]:"fire-perf",[me]:"fire-perf-compat",[be]:"fire-rc",[ve]:"fire-rc-compat",[ye]:"fire-gcs",[we]:"fire-gcs-compat",[_e]:"fire-fst",[Se]:"fire-fst-compat",[Ee]:"fire-vertex","fire-js":"fire-js",[Ie]:"fire-js-all"},Ae=new Map,De=new Map,Ne=new Map;function ke(e,t){try{e.container.addComponent(t)}catch(n){Y.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function Oe(e){const t=e.name;if(Ne.has(t))return Y.debug(`There were multiple attempts to register component ${t}.`),!1;Ne.set(t,e);for(const t of Ae.values())ke(t,e);for(const t of De.values())ke(t,e);return!0}function Le(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function Me(e){return void 0!==e.options}function Pe(e){return!Me(e)&&("authIdToken"in e||"appCheckToken"in e||"releaseOnDeref"in e||"automaticDataCollectionEnabled"in e)}
|
|
214
214
|
/**
|
|
215
215
|
* @license
|
|
216
216
|
* Copyright 2019 Google LLC
|
|
@@ -260,7 +260,7 @@ class Be{constructor(e,t,n){this._isDeleted=!1,this._options={...e},this._config
|
|
|
260
260
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
261
261
|
* See the License for the specific language governing permissions and
|
|
262
262
|
* limitations under the License.
|
|
263
|
-
*/function Fe(e,t){const n=i(e.split(".")[1]);if(null===n)return void console.error(`FirebaseServerApp ${t} is invalid: second part could not be parsed.`);if(void 0===JSON.parse(n).exp)return void console.error(`FirebaseServerApp ${t} is invalid: expiration claim could not be parsed`);1e3*JSON.parse(n).exp-(new Date).getTime()<=0&&console.error(`FirebaseServerApp ${t} is invalid: the token has expired.`)}class $e extends Be{constructor(e,t,n,r){const i=void 0===t.automaticDataCollectionEnabled||t.automaticDataCollectionEnabled,a={name:n,automaticDataCollectionEnabled:i};if(void 0!==e.apiKey)super(e,a,r);else{super(e.options,a,r)}this._serverConfig={automaticDataCollectionEnabled:i,...t},this._serverConfig.authIdToken&&Fe(this._serverConfig.authIdToken,"authIdToken"),this._serverConfig.appCheckToken&&Fe(this._serverConfig.appCheckToken,"appCheckToken"),this._finalizationRegistry=null,"undefined"!=typeof FinalizationRegistry&&(this._finalizationRegistry=new FinalizationRegistry((()=>{this.automaticCleanup()}))),this._refCount=0,this.incRefCount(this._serverConfig.releaseOnDeref),this._serverConfig.releaseOnDeref=void 0,t.releaseOnDeref=void 0,Ve(G,X,"serverapp")}toJSON(){}get refCount(){return this._refCount}incRefCount(e){this.isDeleted||(this._refCount++,void 0!==e&&null!==this._finalizationRegistry&&this._finalizationRegistry.register(e,this))}decRefCount(){return this.isDeleted?0:--this._refCount}automaticCleanup(){this.isDeleted||
|
|
263
|
+
*/function Fe(e,t){const n=i(e.split(".")[1]);if(null===n)return void console.error(`FirebaseServerApp ${t} is invalid: second part could not be parsed.`);if(void 0===JSON.parse(n).exp)return void console.error(`FirebaseServerApp ${t} is invalid: expiration claim could not be parsed`);1e3*JSON.parse(n).exp-(new Date).getTime()<=0&&console.error(`FirebaseServerApp ${t} is invalid: the token has expired.`)}class $e extends Be{constructor(e,t,n,r){const i=void 0===t.automaticDataCollectionEnabled||t.automaticDataCollectionEnabled,a={name:n,automaticDataCollectionEnabled:i};if(void 0!==e.apiKey)super(e,a,r);else{super(e.options,a,r)}this._serverConfig={automaticDataCollectionEnabled:i,...t},this._serverConfig.authIdToken&&Fe(this._serverConfig.authIdToken,"authIdToken"),this._serverConfig.appCheckToken&&Fe(this._serverConfig.appCheckToken,"appCheckToken"),this._finalizationRegistry=null,"undefined"!=typeof FinalizationRegistry&&(this._finalizationRegistry=new FinalizationRegistry((()=>{this.automaticCleanup()}))),this._refCount=0,this.incRefCount(this._serverConfig.releaseOnDeref),this._serverConfig.releaseOnDeref=void 0,t.releaseOnDeref=void 0,Ve(G,X,"serverapp")}toJSON(){}get refCount(){return this._refCount}incRefCount(e){this.isDeleted||(this._refCount++,void 0!==e&&null!==this._finalizationRegistry&&this._finalizationRegistry.register(e,this))}decRefCount(){return this.isDeleted?0:--this._refCount}automaticCleanup(){this.isDeleted||xe(this)}get settings(){return this.checkDestroyed(),this._serverConfig}checkDestroyed(){if(this.isDeleted)throw Re.create("server-app-deleted")}}
|
|
264
264
|
/**
|
|
265
265
|
* @license
|
|
266
266
|
* Copyright 2019 Google LLC
|
|
@@ -276,7 +276,7 @@ class Be{constructor(e,t,n){this._isDeleted=!1,this._options={...e},this._config
|
|
|
276
276
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
277
277
|
* See the License for the specific language governing permissions and
|
|
278
278
|
* limitations under the License.
|
|
279
|
-
*/const Ue="13.
|
|
279
|
+
*/const Ue="13.4.0";function je(e,t={}){let n=e;if("object"!=typeof t){t={name:t}}const r={name:Te,automaticDataCollectionEnabled:!0,...t},i=r.name;if("string"!=typeof i||!i)throw Re.create("bad-app-name",{appName:String(i)});if(n||(n=c()),!n)throw Re.create("no-options");const a=Ae.get(i);if(a){if(m(n,a.options)){if(m(r,a.config))return a;throw Re.create("duplicate-app",{appName:i,mismatchedParam:"config",oldValue:JSON.stringify(a.config),newValue:JSON.stringify(r)})}throw Re.create("duplicate-app",{appName:i,mismatchedParam:"options",oldValue:JSON.stringify(a.options),newValue:JSON.stringify(n)})}const o=new _(i);for(const e of Ne.values())o.addComponent(e);const s=new Be(n,r,o);return Ae.set(i,s),s}async function xe(e){let t=!1;const n=e.name;if(Ae.has(n))t=!0,Ae.delete(n);else if(De.has(n)){e.decRefCount()<=0&&(De.delete(n),t=!0)}t&&(await Promise.all(e.container.getProviders().map((e=>e.delete()))),e.isDeleted=!0)}function Ve(e,t,n){let r=Ce[e]??e;n&&(r+=`-${n}`);const i=r.match(/\s|\//),a=t.match(/\s|\//);if(i||a){const e=[`Unable to register library "${r}" with version "${t}":`];return i&&e.push(`library name "${r}" contains illegal characters (whitespace or "/")`),i&&a&&e.push("and"),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void Y.warn(e.join(" "))}Oe(new v(`${r}-version`,(()=>({library:r,version:t})),"VERSION"))}function ze(e,t){if(null!==e&&"function"!=typeof e)throw Re.create("invalid-log-argument");!function(e,t){for(const n of I){let r=null;t&&t.level&&(r=C[t.level]),n.userLogHandler=null===e?null:(t,n,...i)=>{const a=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(" ");n>=(r??t.logLevel)&&e({level:T[n].toLowerCase(),message:a,args:i,type:t.name})}}}(e,t)}function He(e){var t;t=e,I.forEach((e=>{e.setLogLevel(t)}))}
|
|
280
280
|
/**
|
|
281
281
|
* @license
|
|
282
282
|
* Copyright 2021 Google LLC
|
|
@@ -324,7 +324,24 @@ class Be{constructor(e,t,n){this._isDeleted=!1,this._options={...e},this._config
|
|
|
324
324
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
325
325
|
* See the License for the specific language governing permissions and
|
|
326
326
|
* limitations under the License.
|
|
327
|
-
*/(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(e,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(e){Y.warn(e)}}async getHeartbeatsHeader(){try{if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null==this._heartbeatsCache?.heartbeats||0===this._heartbeatsCache.heartbeats.length)return"";const e=Ye(),{heartbeatsToSend:t,unsentEntries:n}=function(e,t=1024){const n=[];let r=e.slice();for(const i of e){const e=n.find((e=>e.agent===i.agent));if(e){if(e.dates.push(i.date),Qe(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),Qe(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),i=r(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}catch(e){return Y.warn(e),""}}}function Ye(){return(new Date).toISOString().substring(0,10)}class Ze{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!f()&&d().then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){const e=await async function(e){try{const t=(await Je()).transaction(qe),n=await t.objectStore(qe).get(Ge(e));return await t.done,n}catch(e){if(e instanceof p)Y.warn(e.message);else{const t=Re.create("idb-get",{originalErrorMessage:e?.message});Y.warn(t.message)}}}(this.app);return e?.heartbeats?e:{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){if(await this._canUseIndexedDBPromise){const t=await this.read();return Ke(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){if(await this._canUseIndexedDBPromise){const t=await this.read();return Ke(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:[...t.heartbeats,...e.heartbeats]})}}}function Qe(e){return r(JSON.stringify({version:2,heartbeats:e})).length}
|
|
327
|
+
*/(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(e,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(e){Y.warn(e)}}async getHeartbeatsHeader(){try{if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null==this._heartbeatsCache?.heartbeats||0===this._heartbeatsCache.heartbeats.length)return"";const e=Ye(),{heartbeatsToSend:t,unsentEntries:n}=function(e,t=1024){const n=[];let r=e.slice();for(const i of e){const e=n.find((e=>e.agent===i.agent));if(e){if(e.dates.push(i.date),Qe(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),Qe(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),i=r(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}catch(e){return Y.warn(e),""}}}function Ye(){return(new Date).toISOString().substring(0,10)}class Ze{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!f()&&d().then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){const e=await async function(e){try{const t=(await Je()).transaction(qe),n=await t.objectStore(qe).get(Ge(e));return await t.done,n}catch(e){if(e instanceof p)Y.warn(e.message);else{const t=Re.create("idb-get",{originalErrorMessage:e?.message});Y.warn(t.message)}}}(this.app);return e?.heartbeats?e:{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){if(await this._canUseIndexedDBPromise){const t=await this.read();return Ke(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){if(await this._canUseIndexedDBPromise){const t=await this.read();return Ke(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:[...t.heartbeats,...e.heartbeats]})}}}function Qe(e){return r(JSON.stringify({version:2,heartbeats:e})).length}
|
|
328
|
+
/**
|
|
329
|
+
* @license
|
|
330
|
+
* Copyright 2026 Google LLC
|
|
331
|
+
*
|
|
332
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
333
|
+
* you may not use this file except in compliance with the License.
|
|
334
|
+
* You may obtain a copy of the License at
|
|
335
|
+
*
|
|
336
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
337
|
+
*
|
|
338
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
339
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
340
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
341
|
+
* See the License for the specific language governing permissions and
|
|
342
|
+
* limitations under the License.
|
|
343
|
+
*/
|
|
344
|
+
const et="firebase-js-sdk-policy",tt=["https://www.googletagmanager.com/gtag/js","https://apis.google.com/js/api.js","https://www.google.com/recaptcha/api.js","https://www.google.com/recaptcha/enterprise.js"];let nt,rt=!1;function it(e){if(!tt.some((t=>e.startsWith(t)&&(e.length===t.length||"?"===e.charAt(t.length)))))throw new TypeError(`Firebase: Refusing to load untrusted script URL: ${e}`);return e}var at;
|
|
328
345
|
/**
|
|
329
346
|
* @license
|
|
330
347
|
* Copyright 2019 Google LLC
|
|
@@ -340,7 +357,8 @@ class Be{constructor(e,t,n){this._isDeleted=!1,this._options={...e},this._config
|
|
|
340
357
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
341
358
|
* See the License for the specific language governing permissions and
|
|
342
359
|
* limitations under the License.
|
|
343
|
-
*/
|
|
360
|
+
*/
|
|
361
|
+
at="",Oe(new v("platform-logger",(e=>new K(e)),"PRIVATE")),Oe(new v("heartbeat",(e=>new Xe(e)),"PRIVATE")),Ve(G,X,at),Ve(G,X,"esm2020"),Ve("fire-js","");var ot=Object.freeze({__proto__:null,FirebaseError:p,SDK_VERSION:Ue,_DEFAULT_ENTRY_NAME:Te,_addComponent:ke,_addOrOverwriteComponent:function(e,t){e.container.addOrOverwriteComponent(t)},_apps:Ae,_clearComponents:function(){Ne.clear()},_components:Ne,_getProvider:Le,_isFirebaseApp:Me,_isFirebaseServerApp:function(e){return null!=e&&void 0!==e.settings},_isFirebaseServerAppSettings:Pe,_registerComponent:Oe,_removeServiceInstance:function(e,t,n=Te){Le(e,t).clearInstance(n)},_serverApps:De,_setTrustedScriptSrc:function(e,t){it(t);const n=function(){if(void 0===nt){nt=null;const e="undefined"!=typeof window?window.trustedTypes:void 0;if(e?.createPolicy)try{nt=e.createPolicy(et,{createScriptURL:it})}catch{rt=!0}}return nt}();if(n)e.src=n.createScriptURL(t);else try{e.src=t}catch(e){throw rt&&Y.error(`Unable to load ${t} because this page requires Trusted Types for scripts but does not allow the "${et}" Trusted Types policy. To fix this, add "${et}" to the trusted-types directive of the page's Content-Security-Policy.`),e}},deleteApp:xe,getApp:function(e=Te){const t=Ae.get(e);if(!t&&e===Te&&c())return je();if(!t)throw Re.create("no-app",{appName:e});return t},getApps:function(){return Array.from(Ae.values())},initializeApp:je,initializeServerApp:function(e,t={}){if(("undefined"!=typeof window||u())&&!u())throw Re.create("invalid-server-app-environment");let n,r=t||{};if(e&&(Me(e)?n=e.options:Pe(e)?r=e:n=e),void 0===r.automaticDataCollectionEnabled&&(r.automaticDataCollectionEnabled=!0),n||(n=c()),!n)throw Re.create("no-options");const i={...r,...n};if(void 0!==i.releaseOnDeref&&delete i.releaseOnDeref,void 0!==r.releaseOnDeref&&"undefined"==typeof FinalizationRegistry)throw Re.create("finalization-registry-not-supported",{});const a=""+(e=>[...e].reduce(((e,t)=>Math.imul(31,e)+t.charCodeAt(0)|0),0))(JSON.stringify(i)),o=De.get(a);if(o)return o.incRefCount(r.releaseOnDeref),o;const s=new _(a);for(const e of Ne.values())s.addComponent(e);const l=new $e(n,r,a,s);return De.set(a,l),l},onLog:ze,registerVersion:Ve,setLogLevel:He});
|
|
344
362
|
/**
|
|
345
363
|
* @license
|
|
346
364
|
* Copyright 2019 Google LLC
|
|
@@ -356,7 +374,7 @@ class Be{constructor(e,t,n){this._isDeleted=!1,this._options={...e},this._config
|
|
|
356
374
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
357
375
|
* See the License for the specific language governing permissions and
|
|
358
376
|
* limitations under the License.
|
|
359
|
-
*/class
|
|
377
|
+
*/class st{constructor(e,t){this._delegate=e,this.firebase=t,ke(e,new v("app-compat",(()=>this),"PUBLIC"))}get automaticDataCollectionEnabled(){return this._delegate.automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.automaticDataCollectionEnabled=e}get name(){return this._delegate.name}get options(){return this._delegate.options}delete(){return this.firebase.INTERNAL.removeApp(this.name),xe(this._delegate)}_getService(e,t=Te){return this._delegate.checkDestroyed(),this._delegate.container.getProvider(e).getImmediate({identifier:t})}}
|
|
360
378
|
/**
|
|
361
379
|
* @license
|
|
362
380
|
* Copyright 2019 Google LLC
|
|
@@ -372,7 +390,7 @@ class Be{constructor(e,t,n){this._isDeleted=!1,this._options={...e},this._config
|
|
|
372
390
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
373
391
|
* See the License for the specific language governing permissions and
|
|
374
392
|
* limitations under the License.
|
|
375
|
-
*/const
|
|
393
|
+
*/const ct=new h("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."});
|
|
376
394
|
/**
|
|
377
395
|
* @license
|
|
378
396
|
* Copyright 2019 Google LLC
|
|
@@ -389,7 +407,7 @@ class Be{constructor(e,t,n){this._isDeleted=!1,this._options={...e},this._config
|
|
|
389
407
|
* See the License for the specific language governing permissions and
|
|
390
408
|
* limitations under the License.
|
|
391
409
|
*/
|
|
392
|
-
function
|
|
410
|
+
function lt(e){const t={},n={__esModule:!0,initializeApp:function(r,i={}){const a=je(r,i);if(g(t,a.name))return t[a.name];const o=new e(a,n);return t[a.name]=o,o},app:r,registerVersion:Ve,setLogLevel:He,onLog:ze,apps:null,SDK_VERSION:Ue,INTERNAL:{registerComponent:function(t){const i=t.name,o=i.replace("-compat","");if(Oe(t)&&"PUBLIC"===t.type){const s=(e=r())=>{if("function"!=typeof e[o])throw ct.create("invalid-app-argument",{appName:i});return e[o]()};void 0!==t.serviceProps&&a(s,t.serviceProps),n[o]=s,e.prototype[o]=function(...e){return this._getService.bind(this,i).apply(this,t.multipleInstances?e:[])}}return"PUBLIC"===t.type?n[o]:null},removeApp:function(e){delete t[e]},useAsService:function(e,t){if("serverAuth"===t)return null;return t},modularAPIs:ot}};function r(e){if(!g(t,e=e||Te))throw ct.create("no-app",{appName:e});return t[e]}return n.default=n,Object.defineProperty(n,"apps",{get:function(){return Object.keys(t).map((e=>t[e]))}}),r.App=e,n}
|
|
393
411
|
/**
|
|
394
412
|
* @license
|
|
395
413
|
* Copyright 2019 Google LLC
|
|
@@ -422,7 +440,7 @@ function it(e){const t={},n={__esModule:!0,initializeApp:function(r,i={}){const
|
|
|
422
440
|
* See the License for the specific language governing permissions and
|
|
423
441
|
* limitations under the License.
|
|
424
442
|
*/
|
|
425
|
-
const
|
|
443
|
+
const ut=function(){const e=lt(st);e.SDK_VERSION=`${e.SDK_VERSION}_LITE`;const t=e.INTERNAL.registerComponent;return e.INTERNAL.registerComponent=function(e){if("PUBLIC"===e.type&&!e.name.includes("performance")&&!e.name.includes("installations"))throw Error(`${name} cannot register with the standalone perf instance`);return t(e)},e}();!
|
|
426
444
|
/**
|
|
427
445
|
* @license
|
|
428
446
|
* Copyright 2019 Google LLC
|
|
@@ -439,7 +457,7 @@ const at=function(){const e=it(nt);e.SDK_VERSION=`${e.SDK_VERSION}_LITE`;const t
|
|
|
439
457
|
* See the License for the specific language governing permissions and
|
|
440
458
|
* limitations under the License.
|
|
441
459
|
*/
|
|
442
|
-
function(e){Ve("@firebase/app-compat","0.5.
|
|
460
|
+
function(e){Ve("@firebase/app-compat","0.5.23",e)}("lite");
|
|
443
461
|
/**
|
|
444
462
|
* @license
|
|
445
463
|
* Copyright 2020 Google LLC
|
|
@@ -456,7 +474,7 @@ function(e){Ve("@firebase/app-compat","0.5.22",e)}("lite");
|
|
|
456
474
|
* See the License for the specific language governing permissions and
|
|
457
475
|
* limitations under the License.
|
|
458
476
|
*/
|
|
459
|
-
at.registerVersion("firebase","13.3.0","app-compat");var ot,st,ct=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},lt=function(e){if("loading"===document.readyState)return"loading";var t=ct();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},ut=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},ft=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:ut(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},dt=-1,pt=function(e){addEventListener("pageshow",(function(t){t.persisted&&(dt=t.timeStamp,e(t))}),!0)},ht=function(){var e=ct();return e&&e.activationStart||0},gt=function(e,t){var n=ct(),r="navigate";return dt>=0?r="back-forward-cache":n&&(document.prerendering||ht()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},mt=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},bt=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},vt=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},yt=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},_t=function(e){var t=!1;return function(){t||(e(),t=!0)}},wt=-1,Et=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},St=function(e){"hidden"===document.visibilityState&&wt>-1&&(wt="visibilitychange"===e.type?e.timeStamp:0,Tt())},It=function(){addEventListener("visibilitychange",St,!0),addEventListener("prerenderingchange",St,!0)},Tt=function(){removeEventListener("visibilitychange",St,!0),removeEventListener("prerenderingchange",St,!0)},Ct=function(){return wt<0&&(wt=Et(),It(),pt((function(){setTimeout((function(){wt=Et(),It()}),0)}))),{get firstHiddenTime(){return wt}}},At=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},Dt=[1800,3e3],Nt=[.1,.25],kt=function(e,t){!function(e,t){t=t||{},function(e,t){t=t||{},At((function(){var n,r=Ct(),i=gt("FCP"),a=mt("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(a.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-ht(),0),i.entries.push(e),n(!0)))}))}));a&&(n=bt(e,i,Dt,t.reportAllChanges),pt((function(r){i=gt("FCP"),n=bt(e,i,Dt,t.reportAllChanges),vt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(_t((function(){var n,r=gt("CLS",0),i=0,a=[],o=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=a[0],n=a[a.length-1];i&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,a.push(e)):(i=e.value,a=[e])}})),i>r.value&&(r.value=i,r.entries=a,n())},s=mt("layout-shift",o);s&&(n=bt(e,r,Nt,t.reportAllChanges),yt((function(){o(s.takeRecords()),n(!0)})),pt((function(){i=0,r=gt("CLS",0),n=bt(e,r,Nt,t.reportAllChanges),vt((function(){return n()}))})),setTimeout(n,0))})))}((function(t){var n=function(e){var t,n={};if(e.entries.length){var r=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(r&&r.sources&&r.sources.length){var i=(t=r.sources).find((function(e){return e.node&&1===e.node.nodeType}))||t[0];i&&(n={largestShiftTarget:ft(i.node),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:i,largestShiftEntry:r,loadState:lt(r.startTime)})}}return Object.assign(e,{attribution:n})}(t);e(n)}),t)},Ot=0,Mt=1/0,Lt=0,Pt=function(e){e.forEach((function(e){e.interactionId&&(Mt=Math.min(Mt,e.interactionId),Lt=Math.max(Lt,e.interactionId),Ot=Lt?(Lt-Mt)/7+1:0)}))},Rt=function(){return ot?Ot:performance.interactionCount||0},Bt=function(){"interactionCount"in performance||ot||(ot=mt("event",Pt,{type:"event",buffered:!0,durationThreshold:0}))},Ft=[],$t=new Map,Ut=0,xt=[],jt=function(e){if(xt.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=Ft[Ft.length-1],n=$t.get(e.interactionId);if(n||Ft.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};$t.set(r.id,r),Ft.push(r)}Ft.sort((function(e,t){return t.latency-e.latency})),Ft.length>10&&Ft.splice(10).forEach((function(e){return $t.delete(e.id)}))}}},Vt=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=_t(e),"hidden"===document.visibilityState?e():(n=t(e),yt(e)),n},zt=[200,500],Ht=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},At((function(){var n;Bt();var r,i=gt("INP"),a=function(e){Vt((function(){e.forEach(jt);var t=function(){var e=Math.min(Ft.length-1,Math.floor((Rt()-Ut)/50));return Ft[e]}();t&&t.latency!==i.value&&(i.value=t.latency,i.entries=t.entries,r())}))},o=mt("event",a,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=bt(e,i,zt,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),yt((function(){a(o.takeRecords()),r(!0)})),pt((function(){Ut=Rt(),Ft.length=0,$t.clear(),i=gt("INP"),r=bt(e,i,zt,t.reportAllChanges)})))})))},qt=[],Wt=[],Jt=0,Kt=new WeakMap,Gt=new Map,Xt=-1,Yt=function(e){qt=qt.concat(e),Zt()},Zt=function(){Xt<0&&(Xt=Vt(Qt))},Qt=function(){Gt.size>10&&Gt.forEach((function(e,t){$t.has(t)||Gt.delete(t)}));var e=Ft.map((function(e){return Kt.get(e.entries[0])})),t=Wt.length-50;Wt=Wt.filter((function(n,r){return r>=t||e.includes(n)}));for(var n=new Set,r=0;r<Wt.length;r++){var i=Wt[r];en(i.startTime,i.processingEnd).forEach((function(e){n.add(e)}))}var a=qt.length-1-50;qt=qt.filter((function(e,t){return e.startTime>Jt&&t>a||n.has(e)})),Xt=-1};xt.push((function(e){e.interactionId&&e.target&&!Gt.has(e.interactionId)&&Gt.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;Jt=Math.max(Jt,e.processingEnd);for(var r=Wt.length-1;r>=0;r--){var i=Wt[r];if(Math.abs(n-i.renderTime)<=8){(t=i).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:n,entries:[e]},Wt.push(t)),(e.interactionId||"first-input"===e.entryType)&&Kt.set(e,t),Zt()}));var en=function(e,t){for(var n,r=[],i=0;n=qt[i];i++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},tn=function(e,t){st||(st=mt("long-animation-frame",Yt)),Ht((function(t){var n=function(e){var t=e.entries[0],n=Kt.get(t),r=t.processingStart,i=n.processingEnd,a=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),o=en(t.startTime,i),s=e.entries.find((function(e){return e.target})),c=s&&s.target||Gt.get(t.interactionId),l=[t.startTime+t.duration,i].concat(o.map((function(e){return e.startTime+e.duration}))),u=Math.max.apply(Math,l),f={interactionTarget:ft(c),interactionTargetElement:c,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:u,processedEventEntries:a,longAnimationFrameEntries:o,inputDelay:r-t.startTime,processingDuration:i-r,presentationDelay:Math.max(u-i,0),loadState:lt(t.startTime)};return Object.assign(e,{attribution:f})}(t);e(n)}),t)},nn=[2500,4e3],rn={},an=function(e,t){!function(e,t){t=t||{},At((function(){var n,r=Ct(),i=gt("LCP"),a=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-ht(),0),i.entries=[e],n())}))},o=mt("largest-contentful-paint",a);if(o){n=bt(e,i,nn,t.reportAllChanges);var s=_t((function(){rn[i.id]||(a(o.takeRecords()),o.disconnect(),rn[i.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return Vt(s)}),{once:!0,capture:!0})})),yt(s),pt((function(r){i=gt("LCP"),n=bt(e,i,nn,t.reportAllChanges),vt((function(){i.value=performance.now()-r.timeStamp,rn[i.id]=!0,n(!0)}))}))}}))}((function(t){var n=function(e){var t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){var n=ct();if(n){var r=n.activationStart||0,i=e.entries[e.entries.length-1],a=i.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===i.url}))[0],o=Math.max(0,n.responseStart-r),s=Math.max(o,a?(a.requestStart||a.startTime)-r:0),c=Math.max(s,a?a.responseEnd-r:0),l=Math.max(c,i.startTime-r);t={element:ft(i.element),timeToFirstByte:o,resourceLoadDelay:s-o,resourceLoadDuration:c-s,elementRenderDelay:l-c,navigationEntry:n,lcpEntry:i},i.url&&(t.url=i.url),a&&(t.lcpResourceEntry=a)}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)};const on="@firebase/installations",sn="0.6.24",cn=1e4,ln=`w:${sn}`,un="FIS_v2",fn=36e5,dn=new h("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 pn(e){return e instanceof p&&e.code.includes("request-failed")}
|
|
477
|
+
ut.registerVersion("firebase","13.4.0","app-compat");var ft,dt,pt=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},ht=function(e){if("loading"===document.readyState)return"loading";var t=pt();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},gt=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},mt=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:gt(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},bt=-1,vt=function(e){addEventListener("pageshow",(function(t){t.persisted&&(bt=t.timeStamp,e(t))}),!0)},yt=function(){var e=pt();return e&&e.activationStart||0},wt=function(e,t){var n=pt(),r="navigate";return bt>=0?r="back-forward-cache":n&&(document.prerendering||yt()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},_t=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},Et=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},St=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},It=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},Tt=function(e){var t=!1;return function(){t||(e(),t=!0)}},Ct=-1,At=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Dt=function(e){"hidden"===document.visibilityState&&Ct>-1&&(Ct="visibilitychange"===e.type?e.timeStamp:0,kt())},Nt=function(){addEventListener("visibilitychange",Dt,!0),addEventListener("prerenderingchange",Dt,!0)},kt=function(){removeEventListener("visibilitychange",Dt,!0),removeEventListener("prerenderingchange",Dt,!0)},Ot=function(){return Ct<0&&(Ct=At(),Nt(),vt((function(){setTimeout((function(){Ct=At(),Nt()}),0)}))),{get firstHiddenTime(){return Ct}}},Lt=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},Mt=[1800,3e3],Pt=[.1,.25],Rt=function(e,t){!function(e,t){t=t||{},function(e,t){t=t||{},Lt((function(){var n,r=Ot(),i=wt("FCP"),a=_t("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(a.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-yt(),0),i.entries.push(e),n(!0)))}))}));a&&(n=Et(e,i,Mt,t.reportAllChanges),vt((function(r){i=wt("FCP"),n=Et(e,i,Mt,t.reportAllChanges),St((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(Tt((function(){var n,r=wt("CLS",0),i=0,a=[],o=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=a[0],n=a[a.length-1];i&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,a.push(e)):(i=e.value,a=[e])}})),i>r.value&&(r.value=i,r.entries=a,n())},s=_t("layout-shift",o);s&&(n=Et(e,r,Pt,t.reportAllChanges),It((function(){o(s.takeRecords()),n(!0)})),vt((function(){i=0,r=wt("CLS",0),n=Et(e,r,Pt,t.reportAllChanges),St((function(){return n()}))})),setTimeout(n,0))})))}((function(t){var n=function(e){var t,n={};if(e.entries.length){var r=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(r&&r.sources&&r.sources.length){var i=(t=r.sources).find((function(e){return e.node&&1===e.node.nodeType}))||t[0];i&&(n={largestShiftTarget:mt(i.node),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:i,largestShiftEntry:r,loadState:ht(r.startTime)})}}return Object.assign(e,{attribution:n})}(t);e(n)}),t)},Bt=0,Ft=1/0,$t=0,Ut=function(e){e.forEach((function(e){e.interactionId&&(Ft=Math.min(Ft,e.interactionId),$t=Math.max($t,e.interactionId),Bt=$t?($t-Ft)/7+1:0)}))},jt=function(){return ft?Bt:performance.interactionCount||0},xt=function(){"interactionCount"in performance||ft||(ft=_t("event",Ut,{type:"event",buffered:!0,durationThreshold:0}))},Vt=[],zt=new Map,Ht=0,qt=[],Wt=function(e){if(qt.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=Vt[Vt.length-1],n=zt.get(e.interactionId);if(n||Vt.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};zt.set(r.id,r),Vt.push(r)}Vt.sort((function(e,t){return t.latency-e.latency})),Vt.length>10&&Vt.splice(10).forEach((function(e){return zt.delete(e.id)}))}}},Jt=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=Tt(e),"hidden"===document.visibilityState?e():(n=t(e),It(e)),n},Kt=[200,500],Gt=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},Lt((function(){var n;xt();var r,i=wt("INP"),a=function(e){Jt((function(){e.forEach(Wt);var t=function(){var e=Math.min(Vt.length-1,Math.floor((jt()-Ht)/50));return Vt[e]}();t&&t.latency!==i.value&&(i.value=t.latency,i.entries=t.entries,r())}))},o=_t("event",a,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=Et(e,i,Kt,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),It((function(){a(o.takeRecords()),r(!0)})),vt((function(){Ht=jt(),Vt.length=0,zt.clear(),i=wt("INP"),r=Et(e,i,Kt,t.reportAllChanges)})))})))},Xt=[],Yt=[],Zt=0,Qt=new WeakMap,en=new Map,tn=-1,nn=function(e){Xt=Xt.concat(e),rn()},rn=function(){tn<0&&(tn=Jt(an))},an=function(){en.size>10&&en.forEach((function(e,t){zt.has(t)||en.delete(t)}));var e=Vt.map((function(e){return Qt.get(e.entries[0])})),t=Yt.length-50;Yt=Yt.filter((function(n,r){return r>=t||e.includes(n)}));for(var n=new Set,r=0;r<Yt.length;r++){var i=Yt[r];on(i.startTime,i.processingEnd).forEach((function(e){n.add(e)}))}var a=Xt.length-1-50;Xt=Xt.filter((function(e,t){return e.startTime>Zt&&t>a||n.has(e)})),tn=-1};qt.push((function(e){e.interactionId&&e.target&&!en.has(e.interactionId)&&en.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;Zt=Math.max(Zt,e.processingEnd);for(var r=Yt.length-1;r>=0;r--){var i=Yt[r];if(Math.abs(n-i.renderTime)<=8){(t=i).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:n,entries:[e]},Yt.push(t)),(e.interactionId||"first-input"===e.entryType)&&Qt.set(e,t),rn()}));var on=function(e,t){for(var n,r=[],i=0;n=Xt[i];i++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},sn=function(e,t){dt||(dt=_t("long-animation-frame",nn)),Gt((function(t){var n=function(e){var t=e.entries[0],n=Qt.get(t),r=t.processingStart,i=n.processingEnd,a=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),o=on(t.startTime,i),s=e.entries.find((function(e){return e.target})),c=s&&s.target||en.get(t.interactionId),l=[t.startTime+t.duration,i].concat(o.map((function(e){return e.startTime+e.duration}))),u=Math.max.apply(Math,l),f={interactionTarget:mt(c),interactionTargetElement:c,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:u,processedEventEntries:a,longAnimationFrameEntries:o,inputDelay:r-t.startTime,processingDuration:i-r,presentationDelay:Math.max(u-i,0),loadState:ht(t.startTime)};return Object.assign(e,{attribution:f})}(t);e(n)}),t)},cn=[2500,4e3],ln={},un=function(e,t){!function(e,t){t=t||{},Lt((function(){var n,r=Ot(),i=wt("LCP"),a=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-yt(),0),i.entries=[e],n())}))},o=_t("largest-contentful-paint",a);if(o){n=Et(e,i,cn,t.reportAllChanges);var s=Tt((function(){ln[i.id]||(a(o.takeRecords()),o.disconnect(),ln[i.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return Jt(s)}),{once:!0,capture:!0})})),It(s),vt((function(r){i=wt("LCP"),n=Et(e,i,cn,t.reportAllChanges),St((function(){i.value=performance.now()-r.timeStamp,ln[i.id]=!0,n(!0)}))}))}}))}((function(t){var n=function(e){var t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){var n=pt();if(n){var r=n.activationStart||0,i=e.entries[e.entries.length-1],a=i.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===i.url}))[0],o=Math.max(0,n.responseStart-r),s=Math.max(o,a?(a.requestStart||a.startTime)-r:0),c=Math.max(s,a?a.responseEnd-r:0),l=Math.max(c,i.startTime-r);t={element:mt(i.element),timeToFirstByte:o,resourceLoadDelay:s-o,resourceLoadDuration:c-s,elementRenderDelay:l-c,navigationEntry:n,lcpEntry:i},i.url&&(t.url=i.url),a&&(t.lcpResourceEntry=a)}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)};const fn="@firebase/installations",dn="0.6.24",pn=1e4,hn=`w:${dn}`,gn="FIS_v2",mn=36e5,bn=new h("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 vn(e){return e instanceof p&&e.code.includes("request-failed")}
|
|
460
478
|
/**
|
|
461
479
|
* @license
|
|
462
480
|
* Copyright 2019 Google LLC
|
|
@@ -472,7 +490,7 @@ at.registerVersion("firebase","13.3.0","app-compat");var ot,st,ct=function(){var
|
|
|
472
490
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
473
491
|
* See the License for the specific language governing permissions and
|
|
474
492
|
* limitations under the License.
|
|
475
|
-
*/function
|
|
493
|
+
*/function yn({projectId:e}){return`https://firebaseinstallations.googleapis.com/v1/projects/${e}/installations`}function wn(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}async function _n(e,t){const n=(await t.json()).error;return bn.create("request-failed",{requestName:e,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function En({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function Sn(e,{refreshToken:t}){const n=En(e);return n.append("Authorization",function(e){return`${gn} ${e}`}
|
|
476
494
|
/**
|
|
477
495
|
* @license
|
|
478
496
|
* Copyright 2019 Google LLC
|
|
@@ -488,7 +506,7 @@ at.registerVersion("firebase","13.3.0","app-compat");var ot,st,ct=function(){var
|
|
|
488
506
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
489
507
|
* See the License for the specific language governing permissions and
|
|
490
508
|
* limitations under the License.
|
|
491
|
-
*/(t)),n}async function
|
|
509
|
+
*/(t)),n}async function In(e){const t=await e();return t.status>=500&&t.status<600?e():t}
|
|
492
510
|
/**
|
|
493
511
|
* @license
|
|
494
512
|
* Copyright 2019 Google LLC
|
|
@@ -505,7 +523,7 @@ at.registerVersion("firebase","13.3.0","app-compat");var ot,st,ct=function(){var
|
|
|
505
523
|
* See the License for the specific language governing permissions and
|
|
506
524
|
* limitations under the License.
|
|
507
525
|
*/
|
|
508
|
-
function
|
|
526
|
+
function Tn(e){return new Promise((t=>{setTimeout(t,e)}))}
|
|
509
527
|
/**
|
|
510
528
|
* @license
|
|
511
529
|
* Copyright 2019 Google LLC
|
|
@@ -538,7 +556,7 @@ function _n(e){return new Promise((t=>{setTimeout(t,e)}))}
|
|
|
538
556
|
* See the License for the specific language governing permissions and
|
|
539
557
|
* limitations under the License.
|
|
540
558
|
*/
|
|
541
|
-
const
|
|
559
|
+
const Cn=/^[cdef][\w-]{21}$/;function An(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const t=function(e){const t=(n=e,btoa(String.fromCharCode(...n)).replace(/\+/g,"-").replace(/\//g,"_"));var n;return t.substr(0,22)}
|
|
542
560
|
/**
|
|
543
561
|
* @license
|
|
544
562
|
* Copyright 2019 Google LLC
|
|
@@ -554,7 +572,7 @@ const wn=/^[cdef][\w-]{21}$/;function En(){try{const e=new Uint8Array(17);(self.
|
|
|
554
572
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
555
573
|
* See the License for the specific language governing permissions and
|
|
556
574
|
* limitations under the License.
|
|
557
|
-
*/(e);return
|
|
575
|
+
*/(e);return Cn.test(t)?t:""}catch{return""}}function Dn(e){return`${e.appName}!${e.appId}`}
|
|
558
576
|
/**
|
|
559
577
|
* @license
|
|
560
578
|
* Copyright 2019 Google LLC
|
|
@@ -570,7 +588,7 @@ const wn=/^[cdef][\w-]{21}$/;function En(){try{const e=new Uint8Array(17);(self.
|
|
|
570
588
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
571
589
|
* See the License for the specific language governing permissions and
|
|
572
590
|
* limitations under the License.
|
|
573
|
-
*/const
|
|
591
|
+
*/const Nn=new Map;function kn(e,t){const n=Dn(e);On(n,t),function(e,t){const n=function(){!Ln&&"BroadcastChannel"in self&&(Ln=new BroadcastChannel("[Firebase] FID Change"),Ln.onmessage=e=>{On(e.data.key,e.data.fid)});return Ln}();n&&n.postMessage({key:e,fid:t});0===Nn.size&&Ln&&(Ln.close(),Ln=null)}(n,t)}function On(e,t){const n=Nn.get(e);if(n)for(const e of n)e(t)}let Ln=null;
|
|
574
592
|
/**
|
|
575
593
|
* @license
|
|
576
594
|
* Copyright 2019 Google LLC
|
|
@@ -587,7 +605,7 @@ const wn=/^[cdef][\w-]{21}$/;function En(){try{const e=new Uint8Array(17);(self.
|
|
|
587
605
|
* See the License for the specific language governing permissions and
|
|
588
606
|
* limitations under the License.
|
|
589
607
|
*/
|
|
590
|
-
const
|
|
608
|
+
const Mn="firebase-installations-store";let Pn=null;function Rn(){return Pn||(Pn=z("firebase-installations-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(Mn)}})),Pn}async function Bn(e,t){const n=Dn(e),r=(await Rn()).transaction(Mn,"readwrite"),i=r.objectStore(Mn),a=await i.get(n);return await i.put(t,n),await r.done,a&&a.fid===t.fid||kn(e,t.fid),t}async function Fn(e){const t=Dn(e),n=(await Rn()).transaction(Mn,"readwrite");await n.objectStore(Mn).delete(t),await n.done}async function $n(e,t){const n=Dn(e),r=(await Rn()).transaction(Mn,"readwrite"),i=r.objectStore(Mn),a=await i.get(n),o=t(a);return void 0===o?await i.delete(n):await i.put(o,n),await r.done,!o||a&&a.fid===o.fid||kn(e,o.fid),o}
|
|
591
609
|
/**
|
|
592
610
|
* @license
|
|
593
611
|
* Copyright 2019 Google LLC
|
|
@@ -603,7 +621,7 @@ const Dn="firebase-installations-store";let Nn=null;function kn(){return Nn||(Nn
|
|
|
603
621
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
604
622
|
* See the License for the specific language governing permissions and
|
|
605
623
|
* limitations under the License.
|
|
606
|
-
*/async function
|
|
624
|
+
*/async function Un(e){let t;const n=await $n(e.appConfig,(n=>{const r=function(e){const t=e||{fid:An(),registrationStatus:0};return Vn(t)}(n),i=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine){return{installationEntry:t,registrationPromise:Promise.reject(bn.create("app-offline"))}}const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=async function(e,t){try{const n=await async function({appConfig:e,heartbeatServiceProvider:t},{fid:n}){const r=yn(e),i=En(e),a=t.getImmediate({optional:!0});if(a){const e=await a.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}const o={fid:n,authVersion:gn,appId:e.appId,sdkVersion:hn},s={method:"POST",headers:i,body:JSON.stringify(o)},c=await In((()=>fetch(r,s)));if(c.ok){const e=await c.json();return{fid:e.fid||n,registrationStatus:2,refreshToken:e.refreshToken,authToken:wn(e.authToken)}}throw await _n("Create Installation",c)}(e,t);return Bn(e.appConfig,n)}catch(n){throw vn(n)&&409===n.customData.serverCode?await Fn(e.appConfig):await Bn(e.appConfig,{fid:t.fid,registrationStatus:0}),n}}(e,n);return{installationEntry:n,registrationPromise:r}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:jn(e)}:{installationEntry:t}}(e,r);return t=i.registrationPromise,i.installationEntry}));return""===n.fid?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}async function jn(e){let t=await xn(e.appConfig);for(;1===t.registrationStatus;)await Tn(100),t=await xn(e.appConfig);if(0===t.registrationStatus){const{installationEntry:t,registrationPromise:n}=await Un(e);return n||t}return t}function xn(e){return $n(e,(e=>{if(!e)throw bn.create("installation-not-found");return Vn(e)}))}function Vn(e){return 1===(t=e).registrationStatus&&t.registrationTime+pn<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t;
|
|
607
625
|
/**
|
|
608
626
|
* @license
|
|
609
627
|
* Copyright 2019 Google LLC
|
|
@@ -619,7 +637,7 @@ const Dn="firebase-installations-store";let Nn=null;function kn(){return Nn||(Nn
|
|
|
619
637
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
620
638
|
* See the License for the specific language governing permissions and
|
|
621
639
|
* limitations under the License.
|
|
622
|
-
*/}async function
|
|
640
|
+
*/}async function zn({appConfig:e,heartbeatServiceProvider:t},n){const r=function(e,{fid:t}){return`${yn(e)}/${t}/authTokens:generate`}
|
|
623
641
|
/**
|
|
624
642
|
* @license
|
|
625
643
|
* Copyright 2019 Google LLC
|
|
@@ -635,7 +653,7 @@ const Dn="firebase-installations-store";let Nn=null;function kn(){return Nn||(Nn
|
|
|
635
653
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
636
654
|
* See the License for the specific language governing permissions and
|
|
637
655
|
* limitations under the License.
|
|
638
|
-
*/(e,n),i=
|
|
656
|
+
*/(e,n),i=Sn(e,n),a=t.getImmediate({optional:!0});if(a){const e=await a.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}const o={installation:{sdkVersion:hn,appId:e.appId}},s={method:"POST",headers:i,body:JSON.stringify(o)},c=await In((()=>fetch(r,s)));if(c.ok){return wn(await c.json())}throw await _n("Generate Auth Token",c)}async function Hn(e,t=!1){let n;const r=await $n(e.appConfig,(r=>{if(!Wn(r))throw bn.create("not-registered");const i=r.authToken;if(!t&&function(e){return 2===e.requestStatus&&!function(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+mn}(e)}(i))return r;if(1===i.requestStatus)return n=async function(e,t){let n=await qn(e.appConfig);for(;1===n.authToken.requestStatus;)await Tn(100),n=await qn(e.appConfig);const r=n.authToken;return 0===r.requestStatus?Hn(e,t):r}(e,t),r;{if(!navigator.onLine)throw bn.create("app-offline");const t=function(e){const t={requestStatus:1,requestTime:Date.now()};return{...e,authToken:t}}(r);return n=async function(e,t){try{const n=await zn(e,t),r={...t,authToken:n};return await Bn(e.appConfig,r),n}catch(n){if(!vn(n)||401!==n.customData.serverCode&&404!==n.customData.serverCode){const n={...t,authToken:{requestStatus:0}};await Bn(e.appConfig,n)}else await Fn(e.appConfig);throw n}}(e,t),t}}));return n?await n:r.authToken}function qn(e){return $n(e,(e=>{if(!Wn(e))throw bn.create("not-registered");const t=e.authToken;return 1===(n=t).requestStatus&&n.requestTime+pn<Date.now()?{...e,authToken:{requestStatus:0}}:e;var n;
|
|
639
657
|
/**
|
|
640
658
|
* @license
|
|
641
659
|
* Copyright 2019 Google LLC
|
|
@@ -651,7 +669,7 @@ const Dn="firebase-installations-store";let Nn=null;function kn(){return Nn||(Nn
|
|
|
651
669
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
652
670
|
* See the License for the specific language governing permissions and
|
|
653
671
|
* limitations under the License.
|
|
654
|
-
*/}))}function
|
|
672
|
+
*/}))}function Wn(e){return void 0!==e&&2===e.registrationStatus}
|
|
655
673
|
/**
|
|
656
674
|
* @license
|
|
657
675
|
* Copyright 2019 Google LLC
|
|
@@ -668,7 +686,7 @@ const Dn="firebase-installations-store";let Nn=null;function kn(){return Nn||(Nn
|
|
|
668
686
|
* See the License for the specific language governing permissions and
|
|
669
687
|
* limitations under the License.
|
|
670
688
|
*/
|
|
671
|
-
async function
|
|
689
|
+
async function Jn(e,t=!1){const n=e;await async function(e){const{registrationPromise:t}=await Un(e);t&&await t}
|
|
672
690
|
/**
|
|
673
691
|
* @license
|
|
674
692
|
* Copyright 2019 Google LLC
|
|
@@ -684,7 +702,7 @@ async function Vn(e,t=!1){const n=e;await async function(e){const{registrationPr
|
|
|
684
702
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
685
703
|
* See the License for the specific language governing permissions and
|
|
686
704
|
* limitations under the License.
|
|
687
|
-
*/(n);return(await
|
|
705
|
+
*/(n);return(await Hn(n,t)).token}function Kn(e){return bn.create("missing-app-config-values",{valueName:e})}
|
|
688
706
|
/**
|
|
689
707
|
* @license
|
|
690
708
|
* Copyright 2020 Google LLC
|
|
@@ -700,7 +718,7 @@ async function Vn(e,t=!1){const n=e;await async function(e){const{registrationPr
|
|
|
700
718
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
701
719
|
* See the License for the specific language governing permissions and
|
|
702
720
|
* limitations under the License.
|
|
703
|
-
*/const
|
|
721
|
+
*/const Gn="installations",Xn=e=>{const t=Le(e.getProvider("app").getImmediate(),Gn).getImmediate();return{getId:()=>async function(e){const t=e,{installationEntry:n,registrationPromise:r}=await Un(t);return r?r.catch(console.error):Hn(t).catch(console.error),n.fid}(t),getToken:e=>Jn(t,e)}};Oe(new v(Gn,(e=>{const t=e.getProvider("app").getImmediate(),n=function(e){if(!e||!e.options)throw Kn("App Configuration");if(!e.name)throw Kn("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw Kn(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:n,heartbeatServiceProvider:Le(t,"heartbeat"),_delete:()=>Promise.resolve()}}),"PUBLIC")),Oe(new v("installations-internal",Xn,"PRIVATE")),Ve(fn,dn),Ve(fn,dn,"esm2020");const Yn="@firebase/performance",Zn="0.7.14",Qn=Zn,er="FB-PERF-TRACE-MEASURE",tr="_wt_",nr="_fcp",rr="_fid",ir="_lcp",ar="_inp",or="_cls",sr="@firebase/performance/config",cr="@firebase/performance/configexpire",lr="Performance",ur=new h("performance",lr,{"trace started":"Trace {$traceName} was started before.","trace stopped":"Trace {$traceName} is not running.","nonpositive trace startTime":"Trace {$traceName} startTime should be positive.","nonpositive trace duration":"Trace {$traceName} duration should be positive.","no window":"Window is not available.","no app id":"App id is not available.","no project id":"Project id is not available.","no api key":"Api key is not available.","invalid cc log":"Attempted to queue invalid cc event","FB not default":"Performance can only start when Firebase app instance is the default one.","RC response not ok":"RC response is not ok","invalid attribute name":"Attribute name {$attributeName} is invalid.","invalid attribute value":"Attribute value {$attributeValue} is invalid.","invalid custom metric name":"Custom metric name {$customMetricName} is invalid","invalid String merger input":"Input for String merger is invalid, contact support team to resolve.","already initialized":"initializePerformance() has already been called with different options. To avoid this error, call initializePerformance() with the same options as when it was originally called, or call getPerformance() to return the already initialized instance."}),fr=new k(lr);
|
|
704
722
|
/**
|
|
705
723
|
* @license
|
|
706
724
|
* Copyright 2020 Google LLC
|
|
@@ -717,7 +735,7 @@ async function Vn(e,t=!1){const n=e;await async function(e){const{registrationPr
|
|
|
717
735
|
* See the License for the specific language governing permissions and
|
|
718
736
|
* limitations under the License.
|
|
719
737
|
*/
|
|
720
|
-
let
|
|
738
|
+
let dr,pr,hr,gr;fr.logLevel=T.INFO;class mr{constructor(e){if(this.window=e,!e)throw ur.create("no window");this.performance=e.performance,this.PerformanceObserver=e.PerformanceObserver,this.windowLocation=e.location,this.navigator=e.navigator,this.document=e.document,this.navigator&&this.navigator.cookieEnabled&&(this.localStorage=e.localStorage),e.perfMetrics&&e.perfMetrics.onFirstInputDelay&&(this.onFirstInputDelay=e.perfMetrics.onFirstInputDelay),this.onLCP=un,this.onINP=sn,this.onCLS=Rt}getUrl(){return this.windowLocation.href.split("?")[0]}mark(e){this.performance&&this.performance.mark&&this.performance.mark(e)}measure(e,t,n){this.performance&&this.performance.measure&&this.performance.measure(e,t,n)}getEntriesByType(e){return this.performance&&this.performance.getEntriesByType?this.performance.getEntriesByType(e):[]}getEntriesByName(e){return this.performance&&this.performance.getEntriesByName?this.performance.getEntriesByName(e):[]}getTimeOrigin(){return this.performance&&(this.performance.timeOrigin||this.performance.timing.navigationStart)}requiredApisAvailable(){return fetch&&Promise&&"undefined"!=typeof navigator&&navigator.cookieEnabled?!!f()||(fr.info("IndexedDB is not supported by current browser"),!1):(fr.info("Firebase Performance cannot start if browser does not support fetch and Promise or cookie is disabled."),!1)}setupObserver(e,t){if(!this.PerformanceObserver)return;new this.PerformanceObserver((e=>{for(const n of e.getEntries())t(n)})).observe({entryTypes:[e]})}static getInstance(){return void 0===dr&&(dr=new mr(pr)),dr}}function br(){return hr}
|
|
721
739
|
/**
|
|
722
740
|
* @license
|
|
723
741
|
* Copyright 2020 Google LLC
|
|
@@ -734,7 +752,7 @@ let sr,cr,lr,ur;or.logLevel=T.INFO;class fr{constructor(e){if(this.window=e,!e)t
|
|
|
734
752
|
* See the License for the specific language governing permissions and
|
|
735
753
|
* limitations under the License.
|
|
736
754
|
*/
|
|
737
|
-
function
|
|
755
|
+
function vr(e,t){const n=e.length-t.length;if(n<0||n>1)throw ur.create("invalid String merger input");const r=[];for(let n=0;n<e.length;n++)r.push(e.charAt(n)),t.length>n&&r.push(t.charAt(n));return r.join("")}
|
|
738
756
|
/**
|
|
739
757
|
* @license
|
|
740
758
|
* Copyright 2019 Google LLC
|
|
@@ -750,7 +768,7 @@ function pr(e,t){const n=e.length-t.length;if(n<0||n>1)throw ar.create("invalid
|
|
|
750
768
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
751
769
|
* See the License for the specific language governing permissions and
|
|
752
770
|
* limitations under the License.
|
|
753
|
-
*/class
|
|
771
|
+
*/class yr{constructor(){this.instrumentationEnabled=!0,this.dataCollectionEnabled=!0,this.loggingEnabled=!1,this.tracesSamplingRate=1,this.networkRequestsSamplingRate=1,this.logEndPointUrl="https://firebaselogging.googleapis.com/v0cc/log?format=json_proto",this.flTransportEndpointUrl=vr("hts/frbslgigp.ogepscmv/ieo/eaylg","tp:/ieaeogn-agolai.o/1frlglgc/o"),this.transportKey=vr("AzSC8r6ReiGqFMyfvgow","Iayx0u-XT3vksVM-pIV"),this.logSource=462,this.logTraceAfterSampling=!1,this.logNetworkAfterSampling=!1,this.configTimeToLive=12,this.logMaxFlushSize=40}getFlTransportFullUrl(){return this.flTransportEndpointUrl.concat("?key=",this.transportKey)}static getInstance(){return void 0===gr&&(gr=new yr),gr}}
|
|
754
772
|
/**
|
|
755
773
|
* @license
|
|
756
774
|
* Copyright 2020 Google LLC
|
|
@@ -766,7 +784,7 @@ function pr(e,t){const n=e.length-t.length;if(n<0||n>1)throw ar.create("invalid
|
|
|
766
784
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
767
785
|
* See the License for the specific language governing permissions and
|
|
768
786
|
* limitations under the License.
|
|
769
|
-
*/var
|
|
787
|
+
*/var wr;!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.VISIBLE=1]="VISIBLE",e[e.HIDDEN=2]="HIDDEN"}(wr||(wr={}));const _r=["firebase_","google_","ga_"],Er=new RegExp("^[a-zA-Z]\\w*$");function Sr(){const e=mr.getInstance().navigator;return e?.serviceWorker?e.serviceWorker.controller?2:3:1}function Ir(){switch(mr.getInstance().document.visibilityState){case"visible":return wr.VISIBLE;case"hidden":return wr.HIDDEN;default:return wr.UNKNOWN}}function Tr(){const e=mr.getInstance().navigator.connection;switch(e&&e.effectiveType){case"slow-2g":return 1;case"2g":return 2;case"3g":return 3;case"4g":return 4;default:return 0}}
|
|
770
788
|
/**
|
|
771
789
|
* @license
|
|
772
790
|
* Copyright 2020 Google LLC
|
|
@@ -783,7 +801,7 @@ function pr(e,t){const n=e.length-t.length;if(n<0||n>1)throw ar.create("invalid
|
|
|
783
801
|
* See the License for the specific language governing permissions and
|
|
784
802
|
* limitations under the License.
|
|
785
803
|
*/
|
|
786
|
-
function
|
|
804
|
+
function Cr(e){const t=e.options?.appId;if(!t)throw ur.create("no app id");return t}
|
|
787
805
|
/**
|
|
788
806
|
* @license
|
|
789
807
|
* Copyright 2020 Google LLC
|
|
@@ -800,7 +818,7 @@ function wr(e){const t=e.options?.appId;if(!t)throw ar.create("no app id");retur
|
|
|
800
818
|
* See the License for the specific language governing permissions and
|
|
801
819
|
* limitations under the License.
|
|
802
820
|
*/
|
|
803
|
-
const
|
|
821
|
+
const Ar="0.0.1",Dr={loggingEnabled:!0},Nr="FIREBASE_INSTALLATIONS_AUTH";function kr(e,t){const n=function(){const e=mr.getInstance().localStorage;if(!e)return;const t=e.getItem(cr);if(!(t&&(n=t,Number(n)>Date.now())))return;var n;const r=e.getItem(sr);if(!r)return;try{return JSON.parse(r)}catch{return}}();return n?(Lr(n),Promise.resolve()):function(e,t){return function(e){const t=e.getToken();return t.then((e=>{})),t}(e.installations).then((n=>{const r=function(e){const t=e.options?.projectId;if(!t)throw ur.create("no project id");return t}(e.app),i=function(e){const t=e.options?.apiKey;if(!t)throw ur.create("no api key");return t}(e.app),a=new Request(`https://firebaseremoteconfig.googleapis.com/v1/projects/${r}/namespaces/fireperf:fetch?key=${i}`,{method:"POST",headers:{Authorization:`${Nr} ${n}`},body:JSON.stringify({app_instance_id:t,app_instance_id_token:n,app_id:Cr(e.app),app_version:Qn,sdk_version:Ar})});return fetch(a).then((e=>{if(e.ok)return e.json();throw ur.create("RC response not ok")}))})).catch((()=>{fr.info(Or)}))}(e,t).then(Lr).then((e=>function(e){const t=mr.getInstance().localStorage;if(!e||!t)return;t.setItem(sr,JSON.stringify(e)),t.setItem(cr,String(Date.now()+60*yr.getInstance().configTimeToLive*60*1e3))}(e)),(()=>{}))}const Or="Could not fetch config, will use default configs";function Lr(e){if(!e)return e;const t=yr.getInstance(),n=e.entries||{};return void 0!==n.fpr_enabled?t.loggingEnabled="true"===String(n.fpr_enabled):t.loggingEnabled=Dr.loggingEnabled,n.fpr_log_source?t.logSource=Number(n.fpr_log_source):Dr.logSource&&(t.logSource=Dr.logSource),n.fpr_log_endpoint_url?t.logEndPointUrl=n.fpr_log_endpoint_url:Dr.logEndPointUrl&&(t.logEndPointUrl=Dr.logEndPointUrl),n.fpr_log_transport_key?t.transportKey=n.fpr_log_transport_key:Dr.transportKey&&(t.transportKey=Dr.transportKey),void 0!==n.fpr_vc_network_request_sampling_rate?t.networkRequestsSamplingRate=Number(n.fpr_vc_network_request_sampling_rate):void 0!==Dr.networkRequestsSamplingRate&&(t.networkRequestsSamplingRate=Dr.networkRequestsSamplingRate),void 0!==n.fpr_vc_trace_sampling_rate?t.tracesSamplingRate=Number(n.fpr_vc_trace_sampling_rate):void 0!==Dr.tracesSamplingRate&&(t.tracesSamplingRate=Dr.tracesSamplingRate),n.fpr_log_max_flush_size?t.logMaxFlushSize=Number(n.fpr_log_max_flush_size):Dr.logMaxFlushSize&&(t.logMaxFlushSize=Dr.logMaxFlushSize),t.logTraceAfterSampling=Mr(t.tracesSamplingRate),t.logNetworkAfterSampling=Mr(t.networkRequestsSamplingRate),e}function Mr(e){return Math.random()<=e}
|
|
804
822
|
/**
|
|
805
823
|
* @license
|
|
806
824
|
* Copyright 2020 Google LLC
|
|
@@ -816,7 +834,7 @@ const Er="0.0.1",Sr={loggingEnabled:!0},Ir="FIREBASE_INSTALLATIONS_AUTH";functio
|
|
|
816
834
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
817
835
|
* See the License for the specific language governing permissions and
|
|
818
836
|
* limitations under the License.
|
|
819
|
-
*/let
|
|
837
|
+
*/let Pr,Rr=1;function Br(e){return Rr=2,Pr=Pr||function(e){return function(){const e=mr.getInstance().document;return new Promise((t=>{if(e&&"complete"!==e.readyState){const n=()=>{"complete"===e.readyState&&(e.removeEventListener("readystatechange",n),t())};e.addEventListener("readystatechange",n)}else t()}))}().then((()=>function(e){const t=e.getId();return t.then((e=>{hr=e})),t}(e.installations))).then((t=>kr(e,t))).then((()=>Fr()),(()=>Fr()))}(e),Pr}function Fr(){Rr=3}
|
|
820
838
|
/**
|
|
821
839
|
* @license
|
|
822
840
|
* Copyright 2020 Google LLC
|
|
@@ -832,7 +850,7 @@ const Er="0.0.1",Sr={loggingEnabled:!0},Ir="FIREBASE_INSTALLATIONS_AUTH";functio
|
|
|
832
850
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
833
851
|
* See the License for the specific language governing permissions and
|
|
834
852
|
* limitations under the License.
|
|
835
|
-
*/const
|
|
853
|
+
*/const $r=1e4,Ur=new TextEncoder;let jr,xr=3,Vr=[],zr=!1;function Hr(e){setTimeout((()=>{xr<=0||(Vr.length>0&&function(){const e=Vr.splice(0,1e3);(function(e){const t=yr.getInstance().getFlTransportFullUrl();return Ur.encode(e).length<=65536&&navigator.sendBeacon&&navigator.sendBeacon(t,e)?Promise.resolve():fetch(t,{method:"POST",body:e})})(qr(e)).then((()=>{xr=3})).catch((()=>{Vr=[...e,...Vr],xr--,fr.info(`Tries left: ${xr}.`),Hr($r)}))}(),Hr($r))}),e)}function qr(e){const t=e.map((e=>({source_extension_json_proto3:e.message,event_time_ms:String(e.eventTime)}))),n={request_time_ms:String(Date.now()),client_info:{client_type:1,js_client_info:{}},log_source:yr.getInstance().logSource,log_event:t};return JSON.stringify(n)}function Wr(e){return(...t)=>{!function(e){if(!e.eventTime||!e.message)throw ur.create("invalid cc log");Vr=[...Vr,e]}({message:e(...t),eventTime:Date.now()})}}function Jr(){const e=yr.getInstance().getFlTransportFullUrl();for(;Vr.length>0;){const t=Vr.splice(-yr.getInstance().logMaxFlushSize),n=qr(t);if(!navigator.sendBeacon||!navigator.sendBeacon(e,n)){Vr=[...Vr,...t];break}}if(Vr.length>0){const t=qr(Vr);fetch(e,{method:"POST",body:t}).catch((()=>{fr.info("Failed flushing queued events.")}))}}
|
|
836
854
|
/**
|
|
837
855
|
* @license
|
|
838
856
|
* Copyright 2020 Google LLC
|
|
@@ -848,7 +866,7 @@ const Er="0.0.1",Sr={loggingEnabled:!0},Ir="FIREBASE_INSTALLATIONS_AUTH";functio
|
|
|
848
866
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
849
867
|
* See the License for the specific language governing permissions and
|
|
850
868
|
* limitations under the License.
|
|
851
|
-
*/function
|
|
869
|
+
*/function Kr(e,t){jr||(jr={send:Wr(Yr),flush:Jr}),jr.send(e,t)}function Gr(e){const t=yr.getInstance();!t.instrumentationEnabled&&e.isAuto||(t.dataCollectionEnabled||e.isAuto)&&mr.getInstance().requiredApisAvailable()&&(3===Rr?Xr(e):Br(e.performanceController).then((()=>Xr(e)),(()=>Xr(e))))}function Xr(e){if(!br())return;const t=yr.getInstance();t.loggingEnabled&&t.logTraceAfterSampling&&Kr(e,1)}function Yr(e,t){return 0===t?function(e){const t={url:e.url,http_method:e.httpMethod||0,http_response_code:200,response_payload_bytes:e.responsePayloadBytes,client_start_time_us:e.startTimeUs,time_to_response_initiated_us:e.timeToResponseInitiatedUs,time_to_response_completed_us:e.timeToResponseCompletedUs},n={application_info:Zr(e.performanceController.app),network_request_metric:t};return JSON.stringify(n)}(e):function(e){const t={name:e.name,is_auto:e.isAuto,client_start_time_us:e.startTimeUs,duration_us:e.durationUs};0!==Object.keys(e.counters).length&&(t.counters=e.counters);const n=e.getAttributes();0!==Object.keys(n).length&&(t.custom_attributes=n);const r={application_info:Zr(e.performanceController.app),trace_metric:t};return JSON.stringify(r)}(e)}function Zr(e){return{google_app_id:Cr(e),app_instance_id:br(),web_app_info:{sdk_version:Qn,page_url:mr.getInstance().getUrl(),service_worker_status:Sr(),visibility_state:Ir(),effective_connection_type:Tr()},application_process_state:0}}
|
|
852
870
|
/**
|
|
853
871
|
* @license
|
|
854
872
|
* Copyright 2020 Google LLC
|
|
@@ -864,7 +882,7 @@ const Er="0.0.1",Sr={loggingEnabled:!0},Ir="FIREBASE_INSTALLATIONS_AUTH";functio
|
|
|
864
882
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
865
883
|
* See the License for the specific language governing permissions and
|
|
866
884
|
* limitations under the License.
|
|
867
|
-
*/function
|
|
885
|
+
*/function Qr(e,t){const n=t;if(!n||void 0===n.responseStart)return;const r=mr.getInstance().getTimeOrigin(),i=Math.floor(1e3*(n.startTime+r)),a=n.responseStart?Math.floor(1e3*(n.responseStart-n.startTime)):void 0,o=Math.floor(1e3*(n.responseEnd-n.startTime));!function(e){const t=yr.getInstance();if(!t.instrumentationEnabled)return;const n=e.url,r=t.logEndPointUrl.split("?")[0],i=t.flTransportEndpointUrl.split("?")[0];n!==r&&n!==i&&t.loggingEnabled&&t.logNetworkAfterSampling&&Kr(e,0)}({performanceController:e,url:n.name&&n.name.split("?")[0],responsePayloadBytes:n.transferSize,startTimeUs:i,timeToResponseInitiatedUs:a,timeToResponseCompletedUs:o})}
|
|
868
886
|
/**
|
|
869
887
|
* @license
|
|
870
888
|
* Copyright 2020 Google LLC
|
|
@@ -880,7 +898,7 @@ const Er="0.0.1",Sr={loggingEnabled:!0},Ir="FIREBASE_INSTALLATIONS_AUTH";functio
|
|
|
880
898
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
881
899
|
* See the License for the specific language governing permissions and
|
|
882
900
|
* limitations under the License.
|
|
883
|
-
*/const
|
|
901
|
+
*/const ei=["_fp",nr,rr,ir,or,ar];
|
|
884
902
|
/**
|
|
885
903
|
* @license
|
|
886
904
|
* Copyright 2020 Google LLC
|
|
@@ -897,7 +915,7 @@ const Er="0.0.1",Sr={loggingEnabled:!0},Ir="FIREBASE_INSTALLATIONS_AUTH";functio
|
|
|
897
915
|
* See the License for the specific language governing permissions and
|
|
898
916
|
* limitations under the License.
|
|
899
917
|
*/
|
|
900
|
-
class
|
|
918
|
+
class ti{constructor(e,t,n=!1,r){this.performanceController=e,this.name=t,this.isAuto=n,this.state=1,this.customAttributes={},this.counters={},this.api=mr.getInstance(),this.randomId=Math.floor(1e6*Math.random()),this.isAuto||(this.traceStartMark=`FB-PERF-TRACE-START-${this.randomId}-${this.name}`,this.traceStopMark=`FB-PERF-TRACE-STOP-${this.randomId}-${this.name}`,this.traceMeasure=r||`${er}-${this.randomId}-${this.name}`,r&&this.calculateTraceMetrics())}start(){if(1!==this.state)throw ur.create("trace started",{traceName:this.name});this.api.mark(this.traceStartMark),this.state=2}stop(){if(2!==this.state)throw ur.create("trace stopped",{traceName:this.name});this.state=3,this.api.mark(this.traceStopMark),this.api.measure(this.traceMeasure,this.traceStartMark,this.traceStopMark),this.calculateTraceMetrics(),Gr(this)}record(e,t,n){if(e<=0)throw ur.create("nonpositive trace startTime",{traceName:this.name});if(t<=0)throw ur.create("nonpositive trace duration",{traceName:this.name});if(this.durationUs=Math.floor(1e3*t),this.startTimeUs=Math.floor(1e3*e),n&&n.attributes&&(this.customAttributes={...n.attributes}),n&&n.metrics)for(const e of Object.keys(n.metrics))isNaN(Number(n.metrics[e]))||(this.counters[e]=Math.floor(Number(n.metrics[e])));Gr(this)}incrementMetric(e,t=1){void 0===this.counters[e]?this.putMetric(e,t):this.putMetric(e,this.counters[e]+t)}putMetric(e,t){if(!function(e,t){return!(0===e.length||e.length>100)&&(t&&t.startsWith(tr)&&ei.indexOf(e)>-1||!e.startsWith("_"))}(e,this.name))throw ur.create("invalid custom metric name",{customMetricName:e});this.counters[e]=function(e){const t=Math.floor(e);return t<e&&fr.info(`Metric value should be an Integer, setting the value as : ${t}.`),t}(t??0)}getMetric(e){return this.counters[e]||0}putAttribute(e,t){const n=function(e){return!(0===e.length||e.length>40)&&(!_r.some((t=>e.startsWith(t)))&&!!e.match(Er))}(e),r=function(e){return 0!==e.length&&e.length<=100}(t);if(n&&r)this.customAttributes[e]=t;else{if(!n)throw ur.create("invalid attribute name",{attributeName:e});if(!r)throw ur.create("invalid attribute value",{attributeValue:t})}}getAttribute(e){return this.customAttributes[e]}removeAttribute(e){void 0!==this.customAttributes[e]&&delete this.customAttributes[e]}getAttributes(){return{...this.customAttributes}}setStartTime(e){this.startTimeUs=e}setDuration(e){this.durationUs=e}calculateTraceMetrics(){const e=this.api.getEntriesByName(this.traceMeasure),t=e&&e[0];t&&(this.durationUs=Math.floor(1e3*t.duration),this.startTimeUs=Math.floor(1e3*(t.startTime+this.api.getTimeOrigin())))}static createOobTrace(e,t,n,r,i){const a=mr.getInstance().getUrl();if(!a)return;const o=new ti(e,tr+a,!0),s=Math.floor(1e3*mr.getInstance().getTimeOrigin());o.setStartTime(s),t&&t[0]&&(o.setDuration(Math.floor(1e3*t[0].duration)),o.putMetric("domInteractive",Math.floor(1e3*t[0].domInteractive)),o.putMetric("domContentLoadedEventEnd",Math.floor(1e3*t[0].domContentLoadedEventEnd)),o.putMetric("loadEventEnd",Math.floor(1e3*t[0].loadEventEnd)));if(n){const e=n.find((e=>"first-paint"===e.name));e&&e.startTime&&o.putMetric("_fp",Math.floor(1e3*e.startTime));const t=n.find((e=>"first-contentful-paint"===e.name));t&&t.startTime&&o.putMetric(nr,Math.floor(1e3*t.startTime)),i&&o.putMetric(rr,Math.floor(1e3*i))}this.addWebVitalMetric(o,ir,"lcp_element",r.lcp),this.addWebVitalMetric(o,or,"cls_largestShiftTarget",r.cls),this.addWebVitalMetric(o,ar,"inp_interactionTarget",r.inp),Gr(o),jr&&jr.flush()}static addWebVitalMetric(e,t,n,r){r&&(e.putMetric(t,Math.floor(1e3*r.value)),r.elementAttribution&&(r.elementAttribution.length>100?e.putAttribute(n,r.elementAttribution.substring(0,100)):e.putAttribute(n,r.elementAttribution)))}static createUserTimingTrace(e,t){Gr(new ti(e,t,!1,t))}}
|
|
901
919
|
/**
|
|
902
920
|
* @license
|
|
903
921
|
* Copyright 2020 Google LLC
|
|
@@ -913,7 +931,7 @@ class Xr{constructor(e,t,n=!1,r){this.performanceController=e,this.name=t,this.i
|
|
|
913
931
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
914
932
|
* See the License for the specific language governing permissions and
|
|
915
933
|
* limitations under the License.
|
|
916
|
-
*/let
|
|
934
|
+
*/let ni,ri={},ii=!1;function ai(e){br()&&(setTimeout((()=>function(e){const t=mr.getInstance();"onpagehide"in window?t.document.addEventListener("pagehide",(()=>si(e))):t.document.addEventListener("unload",(()=>si(e)));t.document.addEventListener("visibilitychange",(()=>{"hidden"===t.document.visibilityState&&si(e)})),t.onFirstInputDelay&&t.onFirstInputDelay((e=>{ni=e}));t.onLCP((e=>{ri.lcp={value:e.value,elementAttribution:e.attribution?.element}})),t.onCLS((e=>{ri.cls={value:e.value,elementAttribution:e.attribution?.largestShiftTarget}})),t.onINP((e=>{ri.inp={value:e.value,elementAttribution:e.attribution?.interactionTarget}}))}(e)),0),setTimeout((()=>function(e){const t=mr.getInstance(),n=t.getEntriesByType("resource");for(const t of n)Qr(e,t);t.setupObserver("resource",(t=>Qr(e,t)))}(e)),0),setTimeout((()=>function(e){const t=mr.getInstance(),n=t.getEntriesByType("measure");for(const t of n)oi(e,t);t.setupObserver("measure",(t=>oi(e,t)))}(e)),0))}function oi(e,t){const n=t.name;n.substring(0,21)!==er&&ti.createUserTimingTrace(e,n)}function si(e){if(!ii){ii=!0;const t=mr.getInstance(),n=t.getEntriesByType("navigation"),r=t.getEntriesByType("paint");setTimeout((()=>{ti.createOobTrace(e,n,r,ri,ni)}),0)}}
|
|
917
935
|
/**
|
|
918
936
|
* @license
|
|
919
937
|
* Copyright 2020 Google LLC
|
|
@@ -929,7 +947,7 @@ class Xr{constructor(e,t,n=!1,r){this.performanceController=e,this.name=t,this.i
|
|
|
929
947
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
930
948
|
* See the License for the specific language governing permissions and
|
|
931
949
|
* limitations under the License.
|
|
932
|
-
*/class
|
|
950
|
+
*/class ci{constructor(e,t){this.app=e,this.installations=t,this.initialized=!1}_init(e){this.initialized||(void 0!==e?.dataCollectionEnabled&&(this.dataCollectionEnabled=e.dataCollectionEnabled),void 0!==e?.instrumentationEnabled&&(this.instrumentationEnabled=e.instrumentationEnabled),mr.getInstance().requiredApisAvailable()?d().then((e=>{e&&(zr||(Hr(5500),zr=!0),Br(this).then((()=>ai(this)),(()=>ai(this))),this.initialized=!0)})).catch((e=>{fr.info(`Environment doesn't support IndexedDB: ${e}`)})):fr.info('Firebase Performance cannot start if the browser does not support "Fetch" and "Promise", or cookies are disabled.'))}set instrumentationEnabled(e){yr.getInstance().instrumentationEnabled=e}get instrumentationEnabled(){return yr.getInstance().instrumentationEnabled}set dataCollectionEnabled(e){yr.getInstance().dataCollectionEnabled=e}get dataCollectionEnabled(){return yr.getInstance().dataCollectionEnabled}}Oe(new v("performance",((e,{options:t})=>{const n=e.getProvider("app").getImmediate(),r=e.getProvider("installations-internal").getImmediate();if("[DEFAULT]"!==n.name)throw ur.create("FB not default");if("undefined"==typeof window)throw ur.create("no window");!function(e){pr=e}
|
|
933
951
|
/**
|
|
934
952
|
* @license
|
|
935
953
|
* Copyright 2020 Google LLC
|
|
@@ -945,7 +963,7 @@ class Xr{constructor(e,t,n=!1,r){this.performanceController=e,this.name=t,this.i
|
|
|
945
963
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
946
964
|
* See the License for the specific language governing permissions and
|
|
947
965
|
* limitations under the License.
|
|
948
|
-
*/(window);const i=new
|
|
966
|
+
*/(window);const i=new ci(n,r);return i._init(t),i}),"PUBLIC")),Ve(Yn,Zn),Ve(Yn,Zn,"esm2020");
|
|
949
967
|
/**
|
|
950
968
|
* @license
|
|
951
969
|
* Copyright 2020 Google LLC
|
|
@@ -962,7 +980,7 @@ class Xr{constructor(e,t,n=!1,r){this.performanceController=e,this.name=t,this.i
|
|
|
962
980
|
* See the License for the specific language governing permissions and
|
|
963
981
|
* limitations under the License.
|
|
964
982
|
*/
|
|
965
|
-
class
|
|
983
|
+
class li{constructor(e,t){this.app=e,this._delegate=t}get instrumentationEnabled(){return this._delegate.instrumentationEnabled}set instrumentationEnabled(e){this._delegate.instrumentationEnabled=e}get dataCollectionEnabled(){return this._delegate.dataCollectionEnabled}set dataCollectionEnabled(e){this._delegate.dataCollectionEnabled=e}trace(e){return function(e,t){var n;return e=(n=e)&&n._delegate?n._delegate:n,new ti(e,t)}(this._delegate,e)}}function ui(e){const t=e.getProvider("app-compat").getImmediate(),n=e.getProvider("performance").getImmediate();return new li(t,n)}
|
|
966
984
|
/**
|
|
967
985
|
* @license
|
|
968
986
|
* Copyright 2020 Google LLC
|
|
@@ -979,7 +997,7 @@ class ii{constructor(e,t){this.app=e,this._delegate=t}get instrumentationEnabled
|
|
|
979
997
|
* See the License for the specific language governing permissions and
|
|
980
998
|
* limitations under the License.
|
|
981
999
|
*/
|
|
982
|
-
var
|
|
1000
|
+
var fi;(fi=ut).INTERNAL.registerComponent(new v("performance-compat",ui,"PUBLIC")),fi.registerVersion("@firebase/performance-compat","0.2.27");
|
|
983
1001
|
/**
|
|
984
1002
|
* @license
|
|
985
1003
|
* Copyright 2019 Google LLC
|
|
@@ -996,5 +1014,5 @@ var oi;(oi=at).INTERNAL.registerComponent(new v("performance-compat",ai,"PUBLIC"
|
|
|
996
1014
|
* See the License for the specific language governing permissions and
|
|
997
1015
|
* limitations under the License.
|
|
998
1016
|
*/
|
|
999
|
-
return
|
|
1017
|
+
return ut.registerVersion("firebase","13.4.0","compat-lite"),ut}));
|
|
1000
1018
|
//# sourceMappingURL=firebase-performance-standalone-compat.js.map
|