var FBA=function(e){"use strict";const P=function(n){const r=[];let i=0;for(let t=0;t>6|192;r[i++]=e&63|128}else if((e&64512)===55296&&t+1>18|240;r[i++]=e>>12&63|128;r[i++]=e>>6&63|128;r[i++]=e&63|128}else{r[i++]=e>>12|224;r[i++]=e>>6&63|128;r[i++]=e&63|128}}return r};const R=function(t){const n=[];let r=0,i=0;while(r191&&a<224){const s=t[r++];n[i++]=String.fromCharCode((a&31)<<6|s&63)}else if(a>239&&a<365){const s=t[r++];const o=t[r++];const c=t[r++];const e=((a&7)<<18|(s&63)<<12|(o&63)<<6|c&63)-65536;n[i++]=String.fromCharCode(55296+(e>>10));n[i++]=String.fromCharCode(56320+(e&1023))}else{const s=t[r++];const o=t[r++];n[i++]=String.fromCharCode((a&15)<<12|(s&63)<<6|o&63)}}return n.join("")};const H={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZ"+"abcdefghijklmnopqrstuvwxyz"+"0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob==="function",encodeByteArray(r,e){if(!Array.isArray(r)){throw Error("encodeByteArray takes an array as a parameter")}this.init_();const i=e?this.byteToCharMapWebSafe_:this.byteToCharMap_;const a=[];for(let n=0;n>2;const h=(s&3)<<4|c>>4;let e=(c&15)<<2|u>>6;let t=u&63;if(!l){t=64;if(!o){e=64}}a.push(i[d],i[h],i[e],i[t])}return a.join("")},encodeString(e,t){if(this.HAS_NATIVE_SUPPORT&&!t){return btoa(e)}return this.encodeByteArray(P(e),t)},decodeString(e,t){if(this.HAS_NATIVE_SUPPORT&&!t){return atob(e)}return R(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_;const r=[];for(let e=0;e>4;r.push(d);if(c!==64){const h=s<<4&240|c>>2;r.push(h);if(u!==64){const f=c<<6&192|u;r.push(f)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={};this.charToByteMap_={};this.byteToCharMapWebSafe_={};this.charToByteMapWebSafe_={};for(let e=0;e=this.ENCODED_VALS_BASE.length){this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e;this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e}}}}};class F extends Error{constructor(){super(...arguments);this.name="DecodeBase64StringError"}}const x=function(e){const t=P(e);return H.encodeByteArray(t,true)};const V=function(e){return x(e).replace(/\./g,"")};const z=function(e){try{return H.decodeString(e,true)}catch(e){console.error("base64Decode failed: ",e)}return null};function U(){if(typeof self!=="undefined"){return self}if(typeof window!=="undefined"){return window}if(typeof global!=="undefined"){return global}throw new Error("Unable to locate global object.")}const W=()=>U().__FIREBASE_DEFAULTS__;const q=()=>{if(typeof process==="undefined"||typeof process.env==="undefined"){return}const e=process.env.__FIREBASE_DEFAULTS__;if(e){return JSON.parse(e)}};const G=()=>{if(typeof document==="undefined"){return}let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}const t=e&&z(e[1]);return t&&JSON.parse(t)};const K=()=>{try{return W()||q()||G()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}};const J=()=>{var e;return(e=K())===null||e===void 0?void 0:e.config};class Z{constructor(){this.reject=()=>{};this.resolve=()=>{};this.promise=new Promise((e,t)=>{this.resolve=e;this.reject=t})}wrapCallback(n){return(e,t)=>{if(e){this.reject(e)}else{this.resolve(t)}if(typeof n==="function"){this.promise.catch(()=>{});if(n.length===1){n(e)}else{n(e,t)}}}}}function Y(){try{return typeof indexedDB==="object"}catch(e){return false}}function X(){return new Promise((t,n)=>{try{let e=true;const r="validate-browser-context-for-indexeddb-analytics-module";const i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close();if(!e){self.indexedDB.deleteDatabase(r)}t(true)};i.onupgradeneeded=()=>{e=false};i.onerror=()=>{var e;n(((e=i.error)===null||e===void 0?void 0:e.message)||"")}}catch(e){n(e)}})}const Q="FirebaseError";let c=class D extends Error{constructor(e,t,n){super(t);this.code=e;this.customData=n;this.name=Q;Object.setPrototypeOf(this,D.prototype);if(Error.captureStackTrace){Error.captureStackTrace(this,ee.prototype.create)}}};let ee=class _{constructor(e,t,n){this.service=e;this.serviceName=t;this.errors=n}create(e,...t){const n=t[0]||{};const r=`${this.service}/${e}`;const i=this.errors[e];const a=i?te(i,n):"Error";const s=`${this.serviceName}: ${a} (${r}).`;const o=new c(r,s,n);return o}};function te(e,r){return e.replace(ne,(e,t)=>{const n=r[t];return n!=null?String(n):`<${t}?>`})}const ne=/\{\$([^}]+)}/g;function l(t,n){if(t===n){return true}const r=Object.keys(t);const i=Object.keys(n);for(const e of r){if(!i.includes(e)){return false}const a=t[e];const s=n[e];if(re(a)&&re(s)){if(!l(a,s)){return false}}else if(a!==s){return false}}for(const e of i){if(!r.includes(e)){return false}}return true}function re(e){return e!==null&&typeof e==="object"}let u=class C{constructor(e,t,n){this.name=e;this.instanceFactory=t;this.type=n;this.multipleInstances=false;this.serviceProps={};this.instantiationMode="LAZY";this.onInstanceCreated=null}setInstantiationMode(e){this.instantiationMode=e;return this}setMultipleInstances(e){this.multipleInstances=e;return this}setServiceProps(e){this.serviceProps=e;return this}setInstanceCreatedCallback(e){this.onInstanceCreated=e;return this}};const a="[DEFAULT]";class ie{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 n=new Z;this.instancesDeferred.set(t,n);if(this.isInitialized(t)||this.shouldAutoInitialize()){try{const r=this.getOrInitializeService({instanceIdentifier:t});if(r){n.resolve(r)}}catch(e){}}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const n=this.normalizeInstanceIdentifier(e===null||e===void 0?void 0:e.identifier);const r=(t=e===null||e===void 0?void 0:e.optional)!==null&&t!==void 0?t:false;if(this.isInitialized(n)||this.shouldAutoInitialize()){try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(r){return null}else{throw e}}}else{if(r){return null}else{throw Error(`Service ${this.name} is not available`)}}}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`)}this.component=e;if(!this.shouldAutoInitialize()){return}if(se(e)){try{this.getOrInitializeService({instanceIdentifier:a})}catch(e){}}for(const[t,n]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(t);try{const i=this.getOrInitializeService({instanceIdentifier:r});n.resolve(i)}catch(e){}}}clearInstance(e=a){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 this.component!=null}isInitialized(e=a){return this.instances.has(e)}getOptions(e=a){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e;const 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[i,a]of this.instancesDeferred.entries()){const s=this.normalizeInstanceIdentifier(i);if(n===s){a.resolve(r)}}return r}onInit(e,t){var n;const r=this.normalizeInstanceIdentifier(t);const i=(n=this.onInitCallbacks.get(r))!==null&&n!==void 0?n:new Set;i.add(e);this.onInitCallbacks.set(r,i);const a=this.instances.get(r);if(a){e(a,r)}return()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(!n){return}for(const r of n){try{r(e,t)}catch(e){}}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component){n=this.component.instanceFactory(this.container,{instanceIdentifier:ae(e),options:t});this.instances.set(e,n);this.instancesOptions.set(e,t);this.invokeOnInitCallbacks(n,e);if(this.component.onInstanceCreated){try{this.component.onInstanceCreated(this.container,e,n)}catch(e){}}}return n||null}normalizeInstanceIdentifier(e=a){if(this.component){return this.component.multipleInstances?e:a}else{return e}}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function ae(e){return e===a?undefined:e}function se(e){return e.instantiationMode==="EAGER"}class oe{constructor(e){this.name=e;this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet()){throw new Error(`Component ${e.name} has already been registered with ${this.name}`)}t.setComponent(e)}addOrOverwriteComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet()){this.providers.delete(e.name)}this.addComponent(e)}getProvider(e){if(this.providers.has(e)){return this.providers.get(e)}const t=new ie(e,this);this.providers.set(e,t);return t}getProviders(){return Array.from(this.providers.values())}}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 ce={debug:t.DEBUG,verbose:t.VERBOSE,info:t.INFO,warn:t.WARN,error:t.ERROR,silent:t.SILENT};const le=t.INFO;const ue={[t.DEBUG]:"log",[t.VERBOSE]:"log",[t.INFO]:"info",[t.WARN]:"warn",[t.ERROR]:"error"};const de=(e,t,...n)=>{if(te.some(e=>t instanceof e);let pe;let ge;function me(){return pe||(pe=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function be(){return ge||(ge=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const we=new WeakMap;const r=new WeakMap;const ye=new WeakMap;const n=new WeakMap;const i=new WeakMap;function ve(a){const e=new Promise((e,t)=>{const n=()=>{a.removeEventListener("success",r);a.removeEventListener("error",i)};const r=()=>{e(d(a.result));n()};const i=()=>{t(a.error);n()};a.addEventListener("success",r);a.addEventListener("error",i)});e.then(e=>{if(e instanceof IDBCursor){we.set(e,a)}}).catch(()=>{});i.set(e,a);return e}function Ie(a){if(r.has(a))return;const e=new Promise((e,t)=>{const n=()=>{a.removeEventListener("complete",r);a.removeEventListener("error",i);a.removeEventListener("abort",i)};const r=()=>{e();n()};const i=()=>{t(a.error||new DOMException("AbortError","AbortError"));n()};a.addEventListener("complete",r);a.addEventListener("error",i);a.addEventListener("abort",i)});r.set(a,e)}let s={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return r.get(e);if(t==="objectStoreNames"){return e.objectStoreNames||ye.get(e)}if(t==="store"){return n.objectStoreNames[1]?undefined:n.objectStore(n.objectStoreNames[0])}}return d(e[t])},set(e,t,n){e[t]=n;return true},has(e,t){if(e instanceof IDBTransaction&&(t==="done"||t==="store")){return true}return t in e}};function Ee(e){s=e(s)}function Se(r){if(r===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)){return function(e,...t){const n=r.call(o(this),e,...t);ye.set(n,e.sort?e.sort():[e]);return d(n)}}if(be().includes(r)){return function(...e){r.apply(o(this),e);return d(we.get(this))}}return function(...e){return d(r.apply(o(this),e))}}function De(e){if(typeof e==="function")return Se(e);if(e instanceof IDBTransaction)Ie(e);if(fe(e,me()))return new Proxy(e,s);return e}function d(e){if(e instanceof IDBRequest)return ve(e);if(n.has(e))return n.get(e);const t=De(e);if(t!==e){n.set(e,t);i.set(t,e)}return t}const o=e=>i.get(e);function _e(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const s=indexedDB.open(e,t);const o=d(s);if(r){s.addEventListener("upgradeneeded",e=>{r(d(s.result),e.oldVersion,e.newVersion,d(s.transaction),e)})}if(n){s.addEventListener("blocked",e=>n(e.oldVersion,e.newVersion,e))}o.then(e=>{if(a)e.addEventListener("close",()=>a());if(i){e.addEventListener("versionchange",e=>i(e.oldVersion,e.newVersion,e))}}).catch(()=>{});return o}const Ce=["get","getKey","getAll","getAllKeys","count"];const Te=["put","add","delete","clear"];const h=new Map;function Ae(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t==="string")){return}if(h.get(t))return h.get(t);const i=t.replace(/FromIndex$/,"");const a=t!==i;const s=Te.includes(i);if(!(i in(a?IDBIndex:IDBObjectStore).prototype)||!(s||Ce.includes(i))){return}const n=async function(e,...t){const n=this.transaction(e,s?"readwrite":"readonly");let r=n.store;if(a)r=r.index(t.shift());return(await Promise.all([r[i](...t),s&&n.done]))[0]};h.set(t,n);return n}Ee(r=>({...r,get:(e,t,n)=>Ae(e,t)||r.get(e,t,n),has:(e,t)=>!!Ae(e,t)||r.has(e,t)}));class Le{constructor(e){this.container=e}getPlatformInfoString(){const e=this.container.getProviders();return e.map(e=>{if(Be(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}else{return null}}).filter(e=>e).join(" ")}}function Be(e){const t=e.getComponent();return(t===null||t===void 0?void 0:t.type)==="VERSION"}const f="https://www.gstatic.com/firebasejs/10.4.0/firebase-app.js";const Oe="0.9.19";const p=new he("https://www.gstatic.com/firebasejs/10.4.0/firebase-app.js");const ke="@firebase/app-compat";const Ne="@firebase/analytics-compat";const Me="@firebase/analytics";const je="@firebase/app-check-compat";const $e="@firebase/app-check";const Pe="@firebase/auth";const Re="@firebase/auth-compat";const He="@firebase/database";const Fe="@firebase/database-compat";const xe="@firebase/functions";const Ve="@firebase/functions-compat";const ze="@firebase/installations";const Ue="@firebase/installations-compat";const We="@firebase/messaging";const qe="@firebase/messaging-compat";const Ge="@firebase/performance";const Ke="@firebase/performance-compat";const Je="@firebase/remote-config";const Ze="@firebase/remote-config-compat";const Ye="@firebase/storage";const Xe="@firebase/storage-compat";const Qe="@firebase/firestore";const et="@firebase/firestore-compat";const tt="firebase";const g="[DEFAULT]";const nt={[f]:"fire-core",[ke]:"fire-core-compat",[Me]:"fire-analytics",[Ne]:"fire-analytics-compat",[$e]:"fire-app-check",[je]:"fire-app-check-compat",[Pe]:"fire-auth",[Re]:"fire-auth-compat",[He]:"fire-rtdb",[Fe]:"fire-rtdb-compat",[xe]:"fire-fn",[Ve]:"fire-fn-compat",[ze]:"fire-iid",[Ue]:"fire-iid-compat",[We]:"fire-fcm",[qe]:"fire-fcm-compat",[Ge]:"fire-perf",[Ke]:"fire-perf-compat",[Je]:"fire-rc",[Ze]:"fire-rc-compat",[Ye]:"fire-gcs",[Xe]:"fire-gcs-compat",[Qe]:"fire-fst",[et]:"fire-fst-compat","fire-js":"fire-js",[tt]:"fire-js-all"};const m=new Map;const b=new Map;function rt(t,n){try{t.container.addComponent(n)}catch(e){p.debug(`Component ${n.name} failed to register with FirebaseApp ${t.name}`,e)}}function w(t){const e=t.name;if(b.has(e)){p.debug(`There were multiple attempts to register component ${e}.`);return false}b.set(e,t);for(const e of m.values()){rt(e,t)}return true}function y(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:true});if(n){void n.triggerHeartbeat()}return e.container.getProvider(t)}const it={["no-app"]:"No Firebase App '{$appName}' has been created - "+"call initializeApp() first",["bad-app-name"]:"Illegal App name: '{$appName}",["duplicate-app"]:"Firebase App named '{$appName}' already exists with different options or config",["app-deleted"]:"Firebase App named '{$appName}' already deleted",["no-options"]:"Need to provide options, when not being deployed to hosting via source.",["invalid-app-argument"]:"firebase.{$appName}() takes either no argument or a "+"Firebase App instance.",["invalid-log-argument"]:"First argument to `onLog` must be null or a function.",["idb-open"]:"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",["idb-get"]:"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",["idb-set"]:"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",["idb-delete"]:"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."};const v=new ee("app","Firebase",it);class at{constructor(e,t,n){this._isDeleted=false;this._options=Object.assign({},e);this._config=Object.assign({},t);this._name=t.name;this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled;this._container=n;this.container.addComponent(new u("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){this.checkDestroyed();return this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed();this._automaticDataCollectionEnabled=e}get name(){this.checkDestroyed();return this._name}get options(){this.checkDestroyed();return this._options}get config(){this.checkDestroyed();return this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted){throw v.create("app-deleted",{appName:this._name})}}}function st(e,t={}){let n=e;if(typeof t!=="object"){const i=t;t={name:i}}const r=Object.assign({name:g,automaticDataCollectionEnabled:false},t);const i=r.name;if(typeof i!=="string"||!i){throw v.create("bad-app-name",{appName:String(i)})}n||(n=J());if(!n){throw v.create("no-options")}const a=m.get(i);if(a){if(l(n,a.options)&&l(r,a.config)){return a}else{throw v.create("duplicate-app",{appName:i})}}const s=new oe(i);for(const c of b.values()){s.addComponent(c)}const o=new at(n,r,s);m.set(i,o);return o}function ot(e=g){const t=m.get(e);if(!t&&e===g&&J()){return st()}if(!t){throw v.create("no-app",{appName:e})}return t}function I(e,t,n){var r;let i=(r=nt[e])!==null&&r!==void 0?r:e;if(n){i+=`-${n}`}const a=i.match(/\s|\//);const s=t.match(/\s|\//);if(a||s){const o=[`Unable to register library "${i}" with version "${t}":`];if(a){o.push(`library name "${i}" contains illegal characters (whitespace or "/")`)}if(a&&s){o.push("and")}if(s){o.push(`version name "${t}" contains illegal characters (whitespace or "/")`)}p.warn(o.join(" "));return}w(new u(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}const ct="firebase-heartbeat-database";const lt=1;const E="firebase-heartbeat-store";let ut=null;function dt(){if(!ut){ut=_e(ct,lt,{upgrade:(e,t)=>{switch(t){case 0:e.createObjectStore(E)}}}).catch(e=>{throw v.create("idb-open",{originalErrorMessage:e.message})})}return ut}async function ht(e){try{const t=await dt();const n=await t.transaction(E).objectStore(E).get(pt(e));return n}catch(e){if(e instanceof c){p.warn(e.message)}else{const r=v.create("idb-get",{originalErrorMessage:e===null||e===void 0?void 0:e.message});p.warn(r.message)}}}async function ft(e,t){try{const n=await dt();const r=n.transaction(E,"readwrite");const i=r.objectStore(E);await i.put(t,pt(e));await r.done}catch(e){if(e instanceof c){p.warn(e.message)}else{const a=v.create("idb-set",{originalErrorMessage:e===null||e===void 0?void 0:e.message});p.warn(a.message)}}}function pt(e){return`${e.name}!${e.options.appId}`}const gt=1024;const mt=30*24*60*60*1e3;class bt{constructor(e){this.container=e;this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new vt(t);this._heartbeatsCachePromise=this._storage.read().then(e=>{this._heartbeatsCache=e;return e})}async triggerHeartbeat(){const e=this.container.getProvider("platform-logger").getImmediate();const t=e.getPlatformInfoString();const n=wt();if(this._heartbeatsCache===null){this._heartbeatsCache=await this._heartbeatsCachePromise}if(this._heartbeatsCache.lastSentHeartbeatDate===n||this._heartbeatsCache.heartbeats.some(e=>e.date===n)){return}else{this._heartbeatsCache.heartbeats.push({date:n,agent:t})}this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(e=>{const t=new Date(e.date).valueOf();const n=Date.now();return n-t<=mt});return this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(this._heartbeatsCache===null){await this._heartbeatsCachePromise}if(this._heartbeatsCache===null||this._heartbeatsCache.heartbeats.length===0){return""}const e=wt();const{heartbeatsToSend:t,unsentEntries:n}=yt(this._heartbeatsCache.heartbeats);const r=V(JSON.stringify({version:2,heartbeats:t}));this._heartbeatsCache.lastSentHeartbeatDate=e;if(n.length>0){this._heartbeatsCache.heartbeats=n;await this._storage.overwrite(this._heartbeatsCache)}else{this._heartbeatsCache.heartbeats=[];void this._storage.overwrite(this._heartbeatsCache)}return r}}function wt(){const e=new Date;return e.toISOString().substring(0,10)}function yt(e,t=gt){const n=[];let r=e.slice();for(const i of e){const a=n.find(e=>e.agent===i.agent);if(!a){n.push({agent:i.agent,dates:[i.date]});if(It(n)>t){n.pop();break}}else{a.dates.push(i.date);if(It(n)>t){a.dates.pop();break}}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class vt{constructor(e){this.app=e;this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){if(!Y()){return false}else{return X().then(()=>true).catch(()=>false)}}async read(){const e=await this._canUseIndexedDBPromise;if(!e){return{heartbeats:[]}}else{const t=await ht(this.app);return t||{heartbeats:[]}}}async overwrite(e){var t;const n=await this._canUseIndexedDBPromise;if(!n){return}else{const r=await this.read();return ft(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;const n=await this._canUseIndexedDBPromise;if(!n){return}else{const r=await this.read();return ft(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}}}function It(e){return V(JSON.stringify({version:2,heartbeats:e})).length}function Et(e){w(new u("platform-logger",e=>new Le(e),"PRIVATE"));w(new u("heartbeat",e=>new bt(e),"PRIVATE"));I(f,Oe,e);I(f,Oe,"esm2017");I("fire-js","")}Et("");var St="firebase";var Dt="10.4.0";I(St,Dt,"cdn");var S;!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"}(S||(S={}));const _t={debug:S.DEBUG,verbose:S.VERBOSE,info:S.INFO,warn:S.WARN,error:S.ERROR,silent:S.SILENT},Ct=S.INFO,Tt={[S.DEBUG]:"log",[S.VERBOSE]:"log",[S.INFO]:"info",[S.WARN]:"warn",[S.ERROR]:"error"},At=(e,t,...n)=>{if(t{try{let e=!0;const t="validate-browser-context-for-indexeddb-analytics-module",n=self.indexedDB.open(t);n.onsuccess=()=>{n.result.close(),e||self.indexedDB.deleteDatabase(t),r(!0)},n.onupgradeneeded=()=>{e=!1},n.onerror=()=>{var e;i((null===(e=n.error)||void 0===e?void 0:e.message)||"")}}catch(r){i(r)}})}function kt(){return!("undefined"==typeof navigator||!navigator.cookieEnabled)}class D extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,D.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,_.prototype.create)}}class _{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){const n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],a=i?function e(t,r){return t.replace(Nt,(e,t)=>{const n=r[t];return null!=n?String(n):`<${t}?>`})}(i,n):"Error",s=`${this.serviceName}: ${a} (${r}).`;return new D(r,s,n)}}const Nt=/\{\$([^}]+)}/g;function Mt(n,r){if(n===r)return!0;const i=Object.keys(n),a=Object.keys(r);for(const t of i){if(!a.includes(t))return!1;const i=n[t],e=r[t];if(jt(i)&&jt(e)){if(!Mt(i,e))return!1}else if(i!==e)return!1}for(const n of a)if(!i.includes(n))return!1;return!0}function jt(e){return null!==e&&"object"==typeof e}function $t(e,t=1e3,n=2){const r=t*Math.pow(n,e),i=Math.round(.5*r*(Math.random()-.5)*2);return Math.min(144e5,r+i)}function Pt(e){return e&&e._delegate?e._delegate:e}class C{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}}let Rt,Ht;const Ft=new WeakMap,xt=new WeakMap,Vt=new WeakMap,zt=new WeakMap,Ut=new WeakMap;let Wt={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return xt.get(e);if("objectStoreNames"===t)return e.objectStoreNames||Vt.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return T(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function qt(r){return r!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?function e(){return Ht||(Ht=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}().includes(r)?function(...e){return r.apply(Kt(this),e),T(Ft.get(this))}:function(...e){return T(r.apply(Kt(this),e))}:function(e,...t){const n=r.call(Kt(this),e,...t);return Vt.set(n,e.sort?e.sort():[e]),T(n)}}function Gt(e){return"function"==typeof e?qt(e):(e instanceof IDBTransaction&&function e(a){if(xt.has(a))return;const t=new Promise((e,t)=>{const n=()=>{a.removeEventListener("complete",r),a.removeEventListener("error",i),a.removeEventListener("abort",i)},r=()=>{e(),n()},i=()=>{t(a.error||new DOMException("AbortError","AbortError")),n()};a.addEventListener("complete",r),a.addEventListener("error",i),a.addEventListener("abort",i)});xt.set(a,t)}(e),t=e,function e(){return Rt||(Rt=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}().some(e=>t instanceof e)?new Proxy(e,Wt):e);var t}function T(e){if(e instanceof IDBRequest)return function e(a){const t=new Promise((e,t)=>{const n=()=>{a.removeEventListener("success",r),a.removeEventListener("error",i)},r=()=>{e(T(a.result)),n()},i=()=>{t(a.error),n()};a.addEventListener("success",r),a.addEventListener("error",i)});return t.then(e=>{e instanceof IDBCursor&&Ft.set(e,a)}).catch(()=>{}),Ut.set(t,a),t}(e);if(zt.has(e))return zt.get(e);const t=Gt(e);return t!==e&&(zt.set(e,t),Ut.set(t,e)),t}const Kt=e=>Ut.get(e);const Jt=["get","getKey","getAll","getAllKeys","count"],Zt=["put","add","delete","clear"],Yt=new Map;function Xt(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Yt.get(t))return Yt.get(t);const i=t.replace(/FromIndex$/,""),a=t!==i,s=Zt.includes(i);if(!(i in(a?IDBIndex:IDBObjectStore).prototype)||!s&&!Jt.includes(i))return;const n=async function(e,...t){const n=this.transaction(e,s?"readwrite":"readonly");let r=n.store;return a&&(r=r.index(t.shift())),(await Promise.all([r[i](...t),s&&n.done]))[0]};return Yt.set(t,n),n}!function e(t){Wt=t(Wt)}(r=>({...r,get:(e,t,n)=>Xt(e,t)||r.get(e,t,n),has:(e,t)=>!!Xt(e,t)||r.has(e,t)}));const Qt="@firebase/installations",A=new _("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 en(e){return e instanceof D&&e.code.includes("request-failed")}function tn({projectId:e}){return`https://firebaseinstallations.googleapis.com/v1/projects/${e}/installations`}function nn(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}async function rn(e,t){const n=(await t.json()).error;return A.create("request-failed",{requestName:e,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function an({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function sn(e,{refreshToken:t}){const n=an(e);return n.append("Authorization",function e(t){return`FIS_v2 ${t}`}(t)),n}async function on(e){const t=await e();return t.status>=500&&t.status<600?e():t}function cn(t){return new Promise(e=>{setTimeout(e,t)})}const ln=/^[cdef][\w-]{21}$/;function un(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const t=function e(t){return function e(t){return btoa(String.fromCharCode(...t)).replace(/\+/g,"-").replace(/\//g,"_")}(t).substr(0,22)}(e);return ln.test(t)?t:""}catch(e){return""}}function L(e){return`${e.appName}!${e.appId}`}const dn=new Map;function hn(e,t){const n=L(e);fn(n,t),function e(t,n){const r=function e(){!B&&"BroadcastChannel"in self&&(B=new BroadcastChannel("[Firebase] FID Change"),B.onmessage=e=>{fn(e.data.key,e.data.fid)});return B}();r&&r.postMessage({key:t,fid:n});!function e(){0===dn.size&&B&&(B.close(),B=null)}()}(n,t)}function fn(e,t){const n=dn.get(e);if(n)for(const e of n)e(t)}let B=null;const O="firebase-installations-store";let pn=null;function gn(){return pn||(pn=function e(t,n,{blocked:r,upgrade:i,blocking:a,terminated:s}={}){const o=indexedDB.open(t,n),c=T(o);return i&&o.addEventListener("upgradeneeded",e=>{i(T(o.result),e.oldVersion,e.newVersion,T(o.transaction),e)}),r&&o.addEventListener("blocked",e=>r(e.oldVersion,e.newVersion,e)),c.then(e=>{s&&e.addEventListener("close",()=>s()),a&&e.addEventListener("versionchange",e=>a(e.oldVersion,e.newVersion,e))}).catch(()=>{}),c}("firebase-installations-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(O)}})),pn}async function k(e,t){const n=L(e),r=(await gn()).transaction(O,"readwrite"),i=r.objectStore(O),a=await i.get(n);return await i.put(t,n),await r.done,a&&a.fid===t.fid||hn(e,t.fid),t}async function mn(e){const t=L(e),n=(await gn()).transaction(O,"readwrite");await n.objectStore(O).delete(t),await n.done}async function N(e,t){const n=L(e),r=(await gn()).transaction(O,"readwrite"),i=r.objectStore(O),a=await i.get(n),s=t(a);return void 0===s?await i.delete(n):await i.put(s,n),await r.done,!s||a&&a.fid===s.fid||hn(e,s.fid),s}async function bn(r){let i;const e=await N(r.appConfig,e=>{const t=function e(t){return vn(t||{fid:un(),registrationStatus:0})}(e),n=function e(n,r){if(0===r.registrationStatus){if(!navigator.onLine){return{installationEntry:r,registrationPromise:Promise.reject(A.create("app-offline"))}}const e={fid:r.fid,registrationStatus:1,registrationTime:Date.now()},t=async function e(t,n){try{const e=await async function e({appConfig:t,heartbeatServiceProvider:n},{fid:r}){const i=tn(t),a=an(t),s=n.getImmediate({optional:!0});if(s){const t=await s.getHeartbeatsHeader();t&&a.append("x-firebase-client",t)}const o={fid:r,authVersion:"FIS_v2",appId:t.appId,sdkVersion:"w:0.6.4"},c={method:"POST",headers:a,body:JSON.stringify(o)},l=await on(()=>fetch(i,c));if(l.ok){const t=await l.json();return{fid:t.fid||r,registrationStatus:2,refreshToken:t.refreshToken,authToken:nn(t.authToken)}}throw await rn("Create Installation",l)}(t,n);return k(t.appConfig,e)}catch(e){throw en(e)&&409===e.customData.serverCode?await mn(t.appConfig):await k(t.appConfig,{fid:n.fid,registrationStatus:0}),e}}(n,e);return{installationEntry:e,registrationPromise:t}}return 1===r.registrationStatus?{installationEntry:r,registrationPromise:wn(n)}:{installationEntry:r}}(r,t);return i=n.registrationPromise,n.installationEntry});return""===e.fid?{installationEntry:await i}:{installationEntry:e,registrationPromise:i}}async function wn(e){let t=await yn(e.appConfig);for(;1===t.registrationStatus;)await cn(100),t=await yn(e.appConfig);if(0===t.registrationStatus){const{installationEntry:t,registrationPromise:n}=await bn(e);return n||t}return t}function yn(e){return N(e,e=>{if(!e)throw A.create("installation-not-found");return vn(e)})}function vn(e){return function e(t){return 1===t.registrationStatus&&t.registrationTime+1e4fetch(r,o));if(c.ok){return nn(await c.json())}throw await rn("Generate Auth Token",c)}async function En(n,r=!1){let i;const e=await N(n.appConfig,e=>{if(!Dn(e))throw A.create("not-registered");const t=e.authToken;if(!r&&function e(t){return 2===t.requestStatus&&!function e(t){const n=Date.now();return n{if(!Dn(e))throw A.create("not-registered");return function e(t){return 1===t.requestStatus&&t.requestTime+1e4{const t=e.getProvider("app").getImmediate(),n=function e(t){if(!t||!t.options)throw Cn("App Configuration");if(!t.name)throw Cn("App Name");const n=["projectId","apiKey","appId"];for(const e of n)if(!t.options[e])throw Cn(e);return{appName:t.name,projectId:t.options.projectId,apiKey:t.options.apiKey,appId:t.options.appId}}(t);return{app:t,appConfig:n,heartbeatServiceProvider:y(t,"heartbeat"),_delete:()=>Promise.resolve()}},An=e=>{const t=e.getProvider("app").getImmediate(),n=y(t,"installations").getImmediate();return{getId:()=>async function e(t){const n=t,{installationEntry:r,registrationPromise:i}=await bn(n);return i?i.catch(console.error):En(n).catch(console.error),r.fid}(n),getToken:e=>_n(n,e)}};!function e(){w(new C("installations",Tn,"PUBLIC")),w(new C("installations-internal",An,"PRIVATE"))}(),I(Qt,"0.6.4"),I(Qt,"0.6.4","esm2017");const Ln="./js.js",M=new class he{constructor(e){this.name=e,this._logLevel=Ct,this._logHandler=At,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in S))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?_t[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,S.DEBUG,...e),this._logHandler(this,S.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,S.VERBOSE,...e),this._logHandler(this,S.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,S.INFO,...e),this._logHandler(this,S.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,S.WARN,...e),this._logHandler(this,S.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,S.ERROR,...e),this._logHandler(this,S.ERROR,...e)}}("@firebase/analytics"),j=new _("analytics","Analytics",{"already-exists":"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-intialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."});function Bn(e){if(!e.startsWith(Ln)){const t=j.create("invalid-gtag-resource",{gtagURL:e});return M.warn(t.message),""}return e}function On(e){return Promise.all(e.map(e=>e.catch(e=>e)))}function kn(e,t){const n=function e(t,n){let r;return window.trustedTypes&&(r=window.trustedTypes.createPolicy(t,n)),r}("firebase-js-sdk-policy",{createScriptURL:Bn}),r=document.createElement("script"),i=`${Ln}?l=${e}&id=${t}`;r.src=n?null==n?void 0:n.createScriptURL(i):i,r.async=!0,document.head.appendChild(r)}function Nn(r,i,a,s){return async function e(t,...n){try{if("event"===t){const[s,t]=n;await async function e(n,r,i,a,s){try{let t=[];if(s&&s.send_to){let e=s.send_to;Array.isArray(e)||(e=[e]);const a=await On(i);for(const i of e){const n=a.find(e=>e.measurementId===i),s=n&&r[n.appId];if(!s){t=[];break}t.push(s)}}0===t.length&&(t=Object.values(r)),await Promise.all(t),n("event",a,s||{})}catch(n){M.error(n)}}(r,i,a,s,t)}else if("config"===t){const[t,e]=n;await async function e(t,n,r,i,a,s){const o=i[a];try{if(o)await n[o];else{const t=(await On(r)).find(e=>e.measurementId===a);t&&await n[t.appId]}}catch(t){M.error(t)}t("config",a,s)}(r,i,a,s,t,e)}else if("consent"===t){const[i]=n;r("consent","update",i)}else if("get"===t){const[i,a,s]=n;r("get",i,a,s)}else if("set"===t){const[i]=n;r("set",i)}else r(t,...n)}catch(e){M.error(e)}}}const Mn=new class rr{constructor(e={},t=1e3){this.throttleMetadata=e,this.intervalMillis=t}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,t){this.throttleMetadata[e]=t}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}};function jn(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}async function $n(e,t=Mn,n){const{appId:r,apiKey:i,measurementId:a}=e.options;if(!r)throw j.create("no-app-id");if(!i){if(a)return{measurementId:a,appId:r};throw j.create("no-api-key")}const s=t.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()},o=new Rn;return setTimeout(async()=>{o.abort()},void 0!==n?n:6e4),Pn({appId:r,apiKey:i,measurementId:a},s,o,t)}async function Pn(r,{throttleEndTimeMillis:i,backoffCount:a},s,o=Mn){var c;const{appId:l,measurementId:u}=r;try{await function e(i,a){return new Promise((e,t)=>{const n=Math.max(a-Date.now(),0),r=setTimeout(e,n);i.addEventListener(()=>{clearTimeout(r),t(j.create("fetch-throttle",{throttleEndTimeMillis:a}))})})}(s,i)}catch(r){if(u)return M.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${u} provided in the "measurementId" field in the local Firebase config. [${null==r?void 0:r.message}]`),{appId:l,measurementId:u};throw r}try{const i=await async function e(t){var n;const{appId:r,apiKey:i}=t,a={method:"GET",headers:jn(i)},s="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",r),o=await fetch(s,a);if(200!==o.status&&304!==o.status){let e="";try{const r=await o.json();(null===(n=r.error)||void 0===n?void 0:n.message)&&(e=r.error.message)}catch(t){}throw j.create("config-fetch-failed",{httpStatus:o.status,responseMessage:e})}return o.json()}(r);return o.deleteThrottleMetadata(l),i}catch(i){const e=i;if(!function e(t){if(!(t instanceof D&&t.customData))return!1;const n=Number(t.customData.httpStatus);return 429===n||500===n||503===n||504===n}(e)){if(o.deleteThrottleMetadata(l),u)return M.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${u} provided in the "measurementId" field in the local Firebase config. [${null==e?void 0:e.message}]`),{appId:l,measurementId:u};throw i}const t=503===Number(null===(c=null==e?void 0:e.customData)||void 0===c?void 0:c.httpStatus)?$t(a,o.intervalMillis,30):$t(a,o.intervalMillis),n={throttleEndTimeMillis:Date.now()+t,backoffCount:a+1};return o.setThrottleMetadata(l,n),M.debug(`Calling attemptFetch again in ${t} millis`),Pn(r,n,s,o)}}class Rn{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}async function Hn(t,e,n,r,i,a,s){var o;const c=$n(t);c.then(e=>{n[e.measurementId]=e.appId,t.options.measurementId&&e.measurementId!==t.options.measurementId&&M.warn(`The measurement ID in the local Firebase config (${t.options.measurementId}) does not match the measurement ID fetched from the server (${e.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(e=>M.error(e)),e.push(c);const l=async function e(){if(!Bt())return M.warn(j.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await Ot()}catch(e){return M.warn(j.create("indexeddb-unavailable",{errorInfo:null==e?void 0:e.toString()}).message),!1}return!0}().then(e=>e?r.getId():void 0),[u,d]=await Promise.all([c,l]);(function e(t){const n=window.document.getElementsByTagName("script");for(const e of Object.values(n))if(e.src&&e.src.includes(Ln)&&e.src.includes(t))return e;return null})(a)||kn(a,u.measurementId),i("js",new Date);const h=null!==(o=null==s?void 0:s.config)&&void 0!==o?o:{};return h.origin="firebase",h.update=!0,null!=d&&(h.firebase_id=d),i("config",u.measurementId,h),u.measurementId}class Fn{constructor(e){this.app=e}_delete(){return delete $[this.app.options.appId],Promise.resolve()}}let $={},xn=[];const Vn={};let zn,Un,Wn="dataLayer",qn="gtag",Gn=!1;function Kn(e,t,n){!function e(){const n=[];if(Lt()&&n.push("This is a browser extension environment."),kt()||n.push("Cookies are not available."),n.length>0){const e=n.map((e,t)=>`(${t+1}) ${e}`).join(" "),t=j.create("invalid-analytics-context",{errorInfo:e});M.warn(t.message)}}();const r=e.options.appId;if(!r)throw j.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw j.create("no-api-key");M.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`)}if(null!=$[r])throw j.create("already-exists",{id:r});if(!Gn){!function e(t){let n=[];return Array.isArray(window[t])?n=window[t]:window[t]=n,n}(Wn);const{wrappedGtag:e,gtagCore:t}=function e(t,n,r,i,a){let s=function(...e){window[i].push(arguments)};return window[a]&&"function"==typeof window[a]&&(s=window[a]),window[a]=Nn(s,t,n,r),{gtagCore:s,wrappedGtag:window[a]}}($,xn,Vn,Wn,qn);Un=e,zn=t,Gn=!0}$[r]=Hn(e,xn,Vn,t,zn,Wn,n);return new Fn(e)}function Jn(e=ot()){e=Pt(e);const t=y(e,"analytics");return t.isInitialized()?t.getImmediate():Zn(e)}function Zn(e,t={}){const n=y(e,"analytics");if(n.isInitialized()){const e=n.getImmediate();if(Mt(t,n.getOptions()))return e;throw j.create("already-initialized")}return n.initialize({options:t})}function Yn(e,t,n,r){e=Pt(e),async function e(t,n,r,i,a){if(a&&a.global)t("event",r,i);else{const a=await n;t("event",r,Object.assign(Object.assign({},i),{send_to:a}))}}(Un,$[e.app.options.appId],t,n,r).catch(e=>M.error(e))}const Xn="@firebase/analytics";!function e(){w(new C("analytics",(e,{options:t})=>Kn(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t),"PUBLIC")),w(new C("analytics-internal",function e(t){try{const r=t.getProvider("analytics").getImmediate();return{logEvent:(e,t,n)=>Yn(r,e,t,n)}}catch(t){throw j.create("interop-component-reg-failed",{reason:t})}},"PRIVATE")),I(Xn,"0.10.0"),I(Xn,"0.10.0","esm2017")}();const Qn={apiKey:"{{.FGA_apiKey}}",authDomain:"{{.FGA_authDomain}}",databaseURL:"{{.FGA_databaseURL}}",projectId:"{{.FGA_projectId}}",storageBucket:"{{.FGA_storageBucket}}",messagingSenderId:"{{.FGA_messagingSenderId}}",appId:"{{.FGA_appId}}",measurementId:"{{.FGA_measurementId}}"};const er=st(Qn);const tr=Jn(er);function nr(e){if(arguments.length==1){Yn(tr,arguments[0])}else{Yn(tr,arguments[0],arguments[1])}}e.TrackLogEvent=nr;return e}({});