mobileapplicationPassvault/node_modules/firebase/firebase-analytics-compat.js

3 lines
26 KiB
JavaScript
Raw Permalink Normal View History

2024-04-12 05:23:32 +00:00
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("@firebase/app-compat"),require("@firebase/app")):"function"==typeof define&&define.amd?define(["@firebase/app-compat","@firebase/app"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).firebase,e.firebase.INTERNAL.modularAPIs)}(this,function(ht,mt){"use strict";try{!(function(){function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t,a,n=e(ht);(dt=t=t||{})[dt.DEBUG=0]="DEBUG",dt[dt.VERBOSE=1]="VERBOSE",dt[dt.INFO=2]="INFO",dt[dt.WARN=3]="WARN",dt[dt.ERROR=4]="ERROR",dt[dt.SILENT=5]="SILENT";const r={debug:t.DEBUG,verbose:t.VERBOSE,info:t.INFO,warn:t.WARN,error:t.ERROR,silent:t.SILENT},i=t.INFO,o={[t.DEBUG]:"log",[t.VERBOSE]:"log",[t.INFO]:"info",[t.WARN]:"warn",[t.ERROR]:"error"},s=(e,t,...n)=>{if(!(t<e.logLevel)){var a=(new Date).toISOString(),r=o[t];if(!r)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[r](`[${a}] ${e.name}:`,...n)}};function c(){var e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function p(){try{return"object"==typeof indexedDB}catch(e){return}}function f(){return new Promise((t,n)=>{try{let e=!0;const a="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(a);r.onsuccess=()=>{r.result.close(),e||self.indexedDB.deleteDatabase(a),t(!0)},r.onupgradeneeded=()=>{e=!1},r.onerror=()=>{var e;n((null===(e=r.error)||void 0===e?void 0:e.message)||"")}}catch(e){n(e)}})}function l(){return!("undefined"==typeof navigator||!navigator.cookieEnabled)}class u extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,u.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,d.prototype.create)}}class d{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){var a,n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],i=i?(a=n,i.replace(g,(e,t)=>{var n=a[t];return null!=n?String(n):`<${t}?>`})):"Error",i=`${this.serviceName}: ${i} (${r}).`;return new u(r,i,n)}}const g=/\{\$([^}]+)}/g,h=1e3,m=2,v=144e5,w=.5;function y(e,t=h,n=m){var a=t*Math.pow(n,e),r=Math.round(w*a*(Math.random()-.5)*2);return Math.min(v,a+r)}function I(e){return e&&e._delegate?e._delegate:e}class b{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}const E=(t,e)=>e.some(e=>t instanceof e);let _,T;const S=new WeakMap,C=new WeakMap,D=new WeakMap,L=new WeakMap,O=new WeakMap;let P={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return C.get(e);if("objectStoreNames"===t)return e.objectStoreNames||D.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return k(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e}};function N(a){return a!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(T=T||[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey]).includes(a)?function(...e){return a.apply(R(this),e),k(S.get(this))}:function(...e){return k(a.apply(R(this),e))}:function(e,...t){var n=a.call(R(this),e,...t);return D.set(n,e.sort?e.sort():[e]),k(n)}}function A(e){return"function"==typeof e?N(e):(e instanceof IDBTransaction&&(i=e,C.has(i)||(t=new Promise((e,t)=>{const n=()=>{i.removeEventListener("complete",a),i.removeEventListener("error",r),i.removeEventListener("abort",r)},a=()=>{e(),n()},r=()=>{t(i.error||new DOMException("AbortError","AbortError")),n()};i.addEventListener("complete",a),i.addEventListener("error",r),i.addEventListener("abort",r)}),C.set(i,t))),E(e
//# sourceMappingURL=firebase-analytics-compat.js.map