PageSourceSearch

https://userforge.com/_next/static/chunks/08iug7ykccc4o.js

js userforge.com collected 2026-10-03 19:04:07 UTC 152,542 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,51718,97427,8070,83877,92953,76494,58556,e=>{"use strict";let t,r,i;e.i(47167);let n=function(e){let t=[],r=0;for(let i=0;i<e.length;i++){let n=e.charCodeAt(i);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:((64512&n)==55296&&i+1<e.length&&(64512&e.charCodeAt(i+1))==56320?(n=65536+((1023&n)<<10)+(1023&e.charCodeAt(++i)),t[r++]=n>>18|240,t[r++]=n>>12&63|128):t[r++]=n>>12|224,t[r++]=n>>6&63|128),t[r++]=63&n|128)}return t},s=function(e){let t=[],r=0,i=0;for(;r<e.length;){let n=e[r++];if(n<128)t[i++]=String.fromCharCode(n);else if(n>191&&n<224){let s=e[r++];t[i++]=String.fromCharCode((31&n)<<6|63&s)}else if(n>239&&n<365){let s=((7&n)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536;t[i++]=String.fromCharCode(55296+(s>>10)),t[i++]=String.fromCharCode(56320+(1023&s))}else{let s=e[r++],a=e[r++];t[i++]=String.fromCharCode((15&n)<<12|(63&s)<<6|63&a)}}return t.join("")},a={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();let r=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,i=[];for(let t=0;t<e.length;t+=3){let n=e[t],s=t+1<e.length,a=s?e[t+1]:0,o=t+2<e.length,c=o?e[t+2]:0,l=n>>2,u=(3&n)<<4|a>>4,h=(15&a)<<2|c>>6,d=63&c;!o&&(d=64,s||(h=64)),i.push(r[l],r[u],r[h],r[d])}return i.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(n(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):s(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let r=t?this.charToByteMapWebSafe_:this.charToByteMap_,i=[];for(let t=0;t<e.length;){let n=r[e.charAt(t++)],s=t<e.length?r[e.charAt(t)]:0,a=++t<e.length?r[e.charAt(t)]:64,c=++t<e.length?r[e.charAt(t)]:64;if(++t,null==n||null==s||null==a||null==c)throw new o;let l=n<<2|s>>4;if(i.push(l),64!==a){let e=s<<4&240|a>>2;if(i.push(e),64!==c){let e=a<<6&192|c;i.push(e)}}}return i},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class o extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}let c=function(e){let t=n(e);return a.encodeByteArray(t,!0)},l=function(e){return c(e).replace(/\./g,"")},u=function(e){try{return a.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null},h=()=>{try{return{config:{apiKey:"AIzaSyCjbkrdJNS3K3_bI0GXBIYJP804KqBtH84",appId:"1:299327858709:web:83b297d6218876fac2c61c",authDomain:"userforge.firebaseapp.com",databaseURL:"https://userforge.firebaseio.com",messagingSenderId:"299327858709",projectId:"userforge",storageBucket:"userforge.appspot.com"},emulatorHosts:{}}}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},d=e=>h()?.emulatorHosts?.[e],p=()=>h()?.config,f=e=>h()?.[`_${e}`];class m{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,r)=>{t?this.reject(t):this.resolve(r),"function"==typeof e&&(this.promise.catch(()=>{}),1===e.length?e(t):e(t,r))}}}function g(){return"u">typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function I(){return"u">typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(g())}function _(){let t=h()?.forceEnvironment;if("node"===t)return!0;
1if("browser"===t)return!1;try{return"[object process]"===Object.prototype.toString.call(e.g.process)}catch(e){return!1}}function v(){return"u">typeof WorkerGlobalScope&&"u">typeof self&&self instanceof WorkerGlobalScope}function E(){return"u">typeof navigator&&"Cloudflare-Workers"===navigator.userAgent}function y(){let e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function w(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function T(){let e=g();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function b(){try{return"object"==typeof indexedDB}catch(e){return!1}}function S(){return new Promise((e,t)=>{try{let r=!0,i="validate-browser-context-for-indexeddb-analytics-module",n=self.indexedDB.open(i);n.onsuccess=()=>{n.result.close(),r||self.indexedDB.deleteDatabase(i),e(!0)},n.onupgradeneeded=()=>{r=!1},n.onerror=()=>{t(n.error?.message||"")}}catch(e){t(e)}})}class A extends Error{constructor(e,t,r){super(t),this.code=e,this.customData=r,this.name="FirebaseError",Object.setPrototypeOf(this,A.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,R.prototype.create)}}class R{constructor(e,t,r){this.service=e,this.serviceName=t,this.errors=r}create(e,...t){var r,i;let n=t[0]||{},s=`${this.service}/${e}`,a=this.errors[e],o=a?(r=a,i=n,r.replace(k,(e,t)=>{let r=i[t];return null!=r?String(r):`<${t}?>`})):"Error",c=`${this.serviceName}: ${o} (${s}).`;return new A(s,c,n)}}let k=/\{\$([^}]+)}/g;function C(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function P(e,t){if(e===t)return!0;let r=Object.keys(e),i=Object.keys(t);for(let n of r){if(!i.includes(n))return!1;let r=e[n],s=t[n];if(N(r)&&N(s)){if(!P(r,s))return!1}else if(r!==s)return!1}for(let e of i)if(!r.includes(e))return!1;return!0}function N(e){return null!==e&&"object"==typeof e}function O(e){let t=[];for(let[r,i]of Object.entries(e))Array.isArray(i)?i.forEach(e=>{t.push(encodeURIComponent(r)+"="+encodeURIComponent(e))}):t.push(encodeURIComponent(r)+"="+encodeURIComponent(i));return t.length?"&"+t.join("&"):""}function D(e){let t={};return e.replace(/^\?/,"").split("&").forEach(e=>{if(e){let[r,i]=e.split("=");
1t[decodeURIComponent(r)]=decodeURIComponent(i)}}),t}function L(e){let t=e.indexOf("?");if(!t)return"";let r=e.indexOf("#",t);return e.substring(t,r>0?r:void 0)}function M(e,t){let r=new U(e,t);return r.subscribe.bind(r)}class U{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,r){let i;if(void 0===e&&void 0===t&&void 0===r)throw Error("Missing Observer.");void 0===(i=!function(e,t){if("object"!=typeof e||null===e)return!1;for(let r of t)if(r in e&&"function"==typeof e[r])return!0;return!1}(e,["next","error","complete"])?{next:e,error:t,complete:r}:e).next&&(i.next=V),void 0===i.error&&(i.error=V),void 0===i.complete&&(i.complete=V);let n=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch(e){}}),this.observers.push(i),n}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(e){"u">typeof console&&console.error&&console.error(e)}})}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function V(){}function F(e){return e&&e._delegate?e._delegate:e}function x(e){try{return(e.startsWith("http://")||e.startsWith("https://")?new URL(e).hostname:e).endsWith(".cloudworkstations.dev")}catch{return!1}}async function H(e){return(await fetch(e,{credentials:"include"})).ok}e.s(["Deferred",0,m,"ErrorFactory",0,R,"FirebaseError",0,A,"base64Decode",0,u,"base64urlEncodeWithoutPadding",0,l,"createMockUserToken",0,function(e,t){if(e.uid)throw Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let r=t||"demo-project",i=e.iat||0,n=e.sub||e.user_id;if(!n)throw Error("mockUserToken must contain 'sub' or 'user_id' field!");let s={iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:n,user_id:n,firebase:{sign_in_provider:"custom",identities:{}},...e};return[l(JSON.stringify({alg:"none",type:"JWT"})),l(JSON.stringify(s)),""].join(".")},"createSubscribe",0,M,"deepEqual",0,P,"extractQuerystring",0,L,"getDefaultAppConfig",0,p,"getDefaultEmulatorHost",0,d,"getDefaultEmulatorHostnameAndPort",0,e=>{let t=d(e);if(!t)return;let r=t.lastIndexOf(":");if(r<=0||r+1===t.length)throw Error(`Invalid host ${t} with no separate hostname and port!`);let i=parseInt(t.substring(r+1),10);return"["===t[0]?[t.substring(1,r-1),i]:[t.substring(0,r),i]},"getExperimentalSetting",0,f,"getGlobal",0,function(){return"u">typeof self?self:"u">typeof window?window:e.g},"getModularInstance",0,F,"getUA",0,g,"isBrowser",0,function(){return"u">typeof window||v()},"isBrowserExtension",0,y,"isCloudWorkstation",0,x,"isCloudflareWorker",0,E,"isEmpty",0,C,"isIE",0,T,"isIndexedDBAvailable",0,b,"isMobileCordova",0,I,"isReactNative",0,w,"isSafari",0,function(){return!_()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")},"isSafariOrWebkit",0,function(){return!_()&&!!navigator.userAgent&&(navigator.userAgent.includes("Safari")||navigator.userAgent.includes("WebKit"))&&!navigator.userAgent.includes("Chrome")},"isWebWorker",0,v,"pingServer",0,H,"querystring",0,O,"querystringDecode",0,D,"validateIndexedDBOpenable",0,S],97427);class j{constructor(e,t,r){this.name=e,this.instanceFactory=t,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}let W="[DEFAULT]";class B{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){let t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){let e=new m;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{let r=this.getOrInitializeService({instanceIdentifier:t});r&&e.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){let t=this.normalizeInstanceIdentifier(e?.identifier),r=e?.optional??!1;if(this.isInitialized(t)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:t})}catch(e){if(r)return null;throw e}if(r)return null;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`);if(this.component=e,this.shouldAutoInitialize()){if("EAGER"===e.instantiationMode)try{this.getOrInitializeService({instanceIdentifier:W})}catch(e){}for(let[e,t]of this.instancesDeferred.entries()){let r=this.normalizeInstanceIdentifier(e);try{let e=this.getOrInitializeService({instanceIdentifier:r});t.resolve(e)}catch(e){}}}}clearInstance(e=W){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){let 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=W){return this.instances.has(e)}getOptions(e=W){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:t={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let i=this.getOrInitializeService({instanceIdentifier:r,options:t});for(let[e,t]of this.instancesDeferred.entries())r===this.normalizeInstanceIdentifier(e)&&t.resolve(i);return i}onInit(e,t){let r=this.normalizeInstanceIdentifier(t),i=this.onInitCallbacks.get(r)??new Set;i.add(e),this.onInitCallbacks.set(r,i);let n=this.instances.get(r);return n&&e(n,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){let r=this.onInitCallbacks.get(t);if(r)for(let i of r)try{i(e,t)}catch{}}getOrInitializeService({instanceIdentifier:e,options:t={}}){var r;let i=this.instances.get(e);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:(r=e)===W?void 0:r,options:t}),this.instances.set(e,i),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(i,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,i)}catch{}return i||null}normalizeInstanceIdentifier(e=W){return this.component?this.component.multipleInstances?e:W:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class z{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let t=this.getProvider(e.name);if(t.isComponentSet())throw 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);let t=new B(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}e.s(["Component",0,j,"ComponentContainer",0,z],8070);let q=[];(n$=nK||(nK={}))[n$.DEBUG=0]="DEBUG",n$[n$.VERBOSE=1]="VERBOSE",n$[n$.INFO=2]="INFO",n$[n$.WARN=3]="WARN",n$[n$.ERROR=4]="ERROR",n$[n$.SILENT=5]="SILENT";let $={debug:nK.DEBUG,verbose:nK.VERBOSE,info:nK.INFO,warn:nK.WARN,error:nK.ERROR,silent:nK.SILENT},G=nK.INFO,K={[nK.DEBUG]:"log",[nK.VERBOSE]:"log",[nK.INFO]:"info",[nK.WARN]:"warn",[nK.ERROR]:"error"},J=(e,t,...r)=>{if(t<e.logLevel)return;let i=new Date().toISOString(),n=K[t];if(n)console[n](`[${i}]  ${e.name}:`,...r);
1else throw Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class Y{constructor(e){this.name=e,this._logLevel=G,this._logHandler=J,this._userLogHandler=null,q.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in nK))throw TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?$[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw 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,nK.DEBUG,...e),this._logHandler(this,nK.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,nK.VERBOSE,...e),this._logHandler(this,nK.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,nK.INFO,...e),this._logHandler(this,nK.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,nK.WARN,...e),this._logHandler(this,nK.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,nK.ERROR,...e),this._logHandler(this,nK.ERROR,...e)}}e.s(["LogLevel",0,nK,"Logger",0,Y,"setLogLevel",0,function(e){q.forEach(t=>{t.setLogLevel(e)})},"setUserLogHandler",0,function(e,t){for(let r of q){let i=null;t&&t.level&&(i=$[t.level]),null===e?r.userLogHandler=null:r.userLogHandler=(t,r,...n)=>{let s=n.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(" ");r>=(i??t.logLevel)&&e({level:nK[r].toLowerCase(),message:s,args:n,type:t.name})}}}],83877);let X=new WeakMap,Q=new WeakMap,Z=new WeakMap,ee=new WeakMap,et=new WeakMap,er={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return Q.get(e);if("objectStoreNames"===t)return e.objectStoreNames||Z.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return ei(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function ei(e){if(e instanceof IDBRequest){let t;return(t=new Promise((t,r)=>{let i=()=>{e.removeEventListener("success",n),e.removeEventListener("error",s)},n=()=>{t(ei(e.result)),i()},s=()=>{r(e.error),i()};e.addEventListener("success",n),e.addEventListener("error",s)})).then(t=>{t instanceof IDBCursor&&X.set(t,e)}).catch(()=>{}),et.set(t,e),t}if(ee.has(e))return ee.get(e);let i=function(e){if("function"==typeof e)return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(r||(r=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(en(this),t),ei(X.get(this))}:function(...t){return ei(e.apply(en(this),t))}:function(t,...r){let i=e.call(en(this),t,...r);return Z.set(i,t.sort?t.sort():[t]),ei(i)};return e instanceof IDBTransaction&&function(e){if(Q.has(e))return;let t=new Promise((t,r)=>{let i=()=>{e.removeEventListener("complete",n),e.removeEventListener("error",s),e.removeEventListener("abort",s)},n=()=>{t(),i()},s=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",n),e.addEventListener("error",s),e.addEventListener("abort",s)});Q.set(e,t)}(e),(t||(t=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(t=>e instanceof t)?new Proxy(e,er):e}(e);return i!==e&&(ee.set(e,i),et.set(i,e)),i}let en=e=>et.get(e),es=["get","getKey","getAll","getAllKeys","count"],ea=["put","add","delete","clear"],eo=new Map;function ec(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t))return;if(eo.get(t))return eo.get(t);let r=t.replace(/FromIndex$/,""),i=t!==r,n=ea.includes(r);if(!(r in(i?IDBIndex:IDBObjectStore).prototype)||!(n||es.includes(r)))return;let s=async function(e,...t){let s=this.transaction(e,n?"readwrite":"readonly"),a=s.store;
1return i&&(a=a.index(t.shift())),(await Promise.all([a[r](...t),n&&s.done]))[0]};return eo.set(t,s),s}er={...i=er,get:(e,t,r)=>ec(e,t)||i.get(e,t,r),has:(e,t)=>!!ec(e,t)||i.has(e,t)};class el{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(e=>{let t;if(t=e.getComponent(),t?.type!=="VERSION")return null;{let t=e.getImmediate();return`${t.library}/${t.version}`}}).filter(e=>e).join(" ")}}let eu="@firebase/app",eh="0.14.13",ed=new Y("@firebase/app"),ep="[DEFAULT]",ef={[eu]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/data-connect":"fire-data-connect","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","@firebase/ai":"fire-vertex","fire-js":"fire-js",firebase:"fire-js-all"},em=new Map,eg=new Map,eI=new Map;function e_(e,t){try{e.container.addComponent(t)}catch(r){ed.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,r)}}function ev(e){let t=e.name;if(eI.has(t))return ed.debug(`There were multiple attempts to register component ${t}.`),!1;
1for(let r of(eI.set(t,e),em.values()))e_(r,e);for(let t of eg.values())e_(t,e);return!0}function eE(e,t){let r=e.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),e.container.getProvider(t)}function ey(e){return null!=e&&void 0!==e.settings}let ew=new R("app","Firebase",{"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","server-app-deleted":"Firebase Server App has been 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}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."});class eT{constructor(e,t,r){this._isDeleted=!1,this._options={...e},this._config={...t},this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new j("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw ew.create("app-deleted",{appName:this._name})}}let eb="12.14.0";function eS(e,t={}){let r=e;"object"!=typeof t&&(t={name:t});let i={name:ep,automaticDataCollectionEnabled:!0,...t},n=i.name;if("string"!=typeof n||!n)throw ew.create("bad-app-name",{appName:String(n)});if(r||(r=p()),!r)throw ew.create("no-options");let s=em.get(n);if(s)if(P(r,s.options)&&P(i,s.config))return s;else throw ew.create("duplicate-app",{appName:n});let a=new z(n);for(let e of eI.values())a.addComponent(e);let o=new eT(r,i,a);return em.set(n,o),o}function eA(e=ep){let t=em.get(e);if(!t&&e===ep&&p())return eS();if(!t)throw ew.create("no-app",{appName:e});return t}function eR(e,t,r){let i=ef[e]??e;r&&(i+=`-${r}`);let n=i.match(/\s|\//),s=t.match(/\s|\//);if(n||s){let e=[`Unable to register library "${i}" with version "${t}":`];n&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),n&&s&&e.push("and"),s&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),ed.warn(e.join(" "));return}ev(new j(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}let ek="firebase-heartbeat-store",eC=null;function eP(){return eC||(eC=(function(e,{blocked:t,upgrade:r,blocking:i,terminated:n}={}){let s=indexedDB.open(e,1),a=ei(s);return r&&s.addEventListener("upgradeneeded",e=>{r(ei(s.result),e.oldVersion,e.newVersion,ei(s.transaction),e)}),t&&s.addEventListener("blocked",e=>t(e.oldVersion,e.newVersion,e)),a.then(e=>{n&&e.addEventListener("close",()=>n()),i&&e.addEventListener("versionchange",e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),a})("firebase-heartbeat-database",{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(ek)}catch(e){console.warn(e)}}}).catch(e=>{throw ew.create("idb-open",{originalErrorMessage:e.message})})),eC}async function eN(e){try{let t=(await eP()).transaction(ek),r=await t.objectStore(ek).get(eD(e));return await t.done,r}catch(e){if(e instanceof A)ed.warn(e.message);else{let t=ew.create("idb-get",{originalErrorMessage:e?.message});ed.warn(t.message)}}}async function eO(e,t){try{let r=(await eP()).transaction(ek,"readwrite"),i=r.objectStore(ek);await i.put(t,eD(e)),await r.done}catch(e){if(e instanceof A)ed.warn(e.message);else{let t=ew.create("idb-set",{originalErrorMessage:e?.message});ed.warn(t.message)}}}function eD(e){return`${e.name}!${e.options.appId}`}class eL{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new eU(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){try{let e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=eM();if(this._heartbeatsCache?.heartbeats==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null)||this._heartbeatsCache.lastSentHeartbeatDate===t||this._heartbeatsCache.heartbeats.some(e=>e.date===t))return;if(this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats.length>30){let e=function(e){if(0===e.length)return -1;let t=0,r=e[0].date;for(let i=1;i<e.length;i++)e[i].date<r&&(r=e[i].date,t=i);return t}(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(e,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(e){ed.warn(e)}}async getHeartbeatsHeader(){try{if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null||0===this._heartbeatsCache.heartbeats.length)return"";let e=eM(),{heartbeatsToSend:t,unsentEntries:r}=function(e,t=1024){let r=[],i=e.slice();for(let n of e){let e=r.find(e=>e.agent===n.agent);if(e){if(e.dates.push(n.date),eV(r)>t){e.dates.pop();break}}else if(r.push({agent:n.agent,dates:[n.date]}),eV(r)>t){r.pop();break}i=i.slice(1)}return{heartbeatsToSend:r,unsentEntries:i}}(this._heartbeatsCache.heartbeats),i=l(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}catch(e){return ed.warn(e),""}}}function eM(){return new Date().toISOString().substring(0,10)}class eU{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!b()&&S().then(()=>!0).catch(()=>!1)}async read(){if(!await this._canUseIndexedDBPromise)return{heartbeats:[]};{let e=await eN(this.app);return e?.heartbeats?e:{heartbeats:[]}}}async overwrite(e){if(await this._canUseIndexedDBPromise){let t=await this.read();return eO(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){if(await this._canUseIndexedDBPromise){let t=await this.read();return eO(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:[...t.heartbeats,...e.heartbeats]})}}}function eV(e){return l(JSON.stringify({version:2,heartbeats:e})).length}function eF(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}ev(new j("platform-logger",e=>new el(e),"PRIVATE")),ev(new j("heartbeat",e=>new eL(e),"PRIVATE")),eR(eu,eh,""),eR(eu,eh,"esm2020"),eR("fire-js",""),e.s(["SDK_VERSION",0,eb,"_getProvider",0,eE,"_isFirebaseServerApp",0,ey,"_registerComponent",0,ev,"_removeServiceInstance",0,function(e,t,r=ep){eE(e,t).clearInstance(r)},"getApp",0,eA,"getApps",0,function(){return Array.from(em.values())},"initializeApp",0,eS,"registerVersion",0,eR],92953);let ex=new R("auth","Firebase",eF()),eH=new Y("@firebase/auth");function ej(e,...t){eH.logLevel<=nK.ERROR&&eH.error(`Auth (${eb}): ${e}`,...t)}function eW(e,...t){throw eG(e,...t)}function eB(e,...t){return eG(e,...t)}function ez(e,t,r){return new R("auth","Firebase",{...eF(),[t]:r}
1).create(t,{appName:e.name})}function eq(e){return ez(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function e$(e,t,r){if(!(t instanceof r))throw r.name!==t.constructor.name&&eW(e,"argument-error"),ez(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function eG(e,...t){if("string"!=typeof e){let r=t[0],i=[...t.slice(1)];return i[0]&&(i[0].appName=e.name),e._errorFactory.create(r,...i)}return ex.create(e,...t)}function eK(e,t,...r){if(!e)throw eG(t,...r)}function eJ(e){let t="INTERNAL ASSERTION FAILED: "+e;throw ej(t),Error(t)}function eY(){return"u">typeof self&&self.location?.href||""}function eX(){return"http:"===eQ()||"https:"===eQ()}function eQ(){return"u">typeof self&&self.location?.protocol||null}class eZ{constructor(e,t){this.shortDelay=e,this.longDelay=t,function(e,t){e||eJ(t)}(t>e,"Short delay should be less than long delay!"),this.isMobile=I()||w()}get(){return!("u">typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(eX()||y()||"connection"in navigator))||navigator.onLine?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function e0(e,t){var r,i;r=e.emulator,i="Emulator should always be set here",r||eJ(i);let{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}class e1{static initialize(e,t,r){this.fetchImpl=e,t&&(this.headersImpl=t),r&&(this.responseImpl=r)}static fetch(){return this.fetchImpl?this.fetchImpl:"u">typeof self&&"fetch"in self?self.fetch:"u">typeof globalThis&&globalThis.fetch?globalThis.fetch:"u">typeof fetch?fetch:void eJ("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"u">typeof self&&"Headers"in self?self.Headers:"u">typeof globalThis&&globalThis.Headers?globalThis.Headers:"u">typeof Headers?Headers:void eJ("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"u">typeof self&&"Response"in self?self.Response:"u">typeof globalThis&&globalThis.Response?globalThis.Response:"u">typeof Response?Response:void eJ("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}let e2={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-rec
1aptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},e3=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],e6=new eZ(3e4,6e4);function e4(e,t){return e.tenantId&&!t.tenantId?{...t,tenantId:e.tenantId}:t}async function e5(e,t,r,i,n={}){return e8(e,n,async()=>{let n={},s={};i&&("GET"===t?s=i:n={body:JSON.stringify(i)});let a=O({key:e.config.apiKey,...s}).slice(1),o=await e._getAdditionalHeaders();o["Content-Type"]="application/json",e.languageCode&&(o["X-Firebase-Locale"]=e.languageCode);let c={method:t,headers:o,...n};return E()||(c.referrerPolicy="no-referrer"),e.emulatorConfig&&x(e.emulatorConfig.host)&&(c.credentials="include"),e1.fetch()(await e7(e,e.config.apiHost,r,a),c)})}async function e8(e,t,r){e._canInitEmulator=!1;let i={...e2,...t};try{let t=new te(e),n=await Promise.race([r(),t.promise]);t.clearNetworkTimeout();let s=await n.json();if("needConfirmation"in s)throw tt(e,"account-exists-with-different-credential",s);if(n.ok&&!("errorMessage"in s))return s;{let[t,r]=(n.ok?s.errorMessage:s.error.message).split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===t)throw tt(e,"credential-already-in-use",s);if("EMAIL_EXISTS"===t)throw tt(e,"email-already-in-use",s);if("USER_DISABLED"===t)throw tt(e,"user-disabled",s);let a=i[t]||t.toLowerCase().replace(/[_\s]+/g,"-");if(r)throw ez(e,a,r);eW(e,a)}}catch(t){if(t instanceof A)throw t;eW(e,"network-request-failed",{message:String(t)})}}async function e9(e,t,r,i,n={}){let s=await e5(e,t,r,i,n);return"mfaPendingCredential"in s&&eW(e,"multi-factor-auth-required",{_serverResponse:s}),s}async function e7(e,t,r,i){let n=`${t}${r}?${i}`,s=e.config.emulator?e0(e.config,n):`${e.config.apiScheme}://${n}`;return e3.includes(r)&&(await e._persistenceManagerAvailable,"COOKIE"===e._getPersistenceType())?e._getPersistence()._getFinalTarget(s).toString():s}class te{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(eB(this.auth,"network-request-failed")),e6.get())})}}function tt(e,t,r){let i={appName:e.name};r.email&&(i.email=r.email),r.phoneNumber&&(i.phoneNumber=r.phoneNumber);let n=eB(e,t,i);return n.customData._tokenResponse=r,n}function tr(e){return void 0!==e&&void 0!==e.getResponse}function ti(e){return void 0!==e&&void 0!==e.enterprise}class tn{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(let t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)switch(t.enforcementState){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PROVIDER")}}async function ts(e){return(await e5(e,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""}async function ta(e,t){return e5(e,"GET","/v2/recaptchaConfig",e4(e,t))}async function to(e,t){return e5(e,"POST","/v1/accounts:delete",t)}async function tc(e,t){return e5(e,"POST","/v1/accounts:update",t)}async function tl(e,t){return e5(e,"POST","/v1/accounts:lookup",t)}function tu(e){if(e)try{let t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}async function th(e,t=!1){let r=F(e),i=await r.getIdToken(t),n=tp(i);eK(n&&n.exp&&n.auth_time&&n.iat,r.auth,"internal-error");let s="object"==typeof n.firebase?n.firebase:void 0,a=s?.sign_in_provider;return{claims:n,token:i,authTime:tu(td(n.auth_time)),issuedAtTime:tu(td(n.iat)),expirationTime:tu(td(n.exp
1)),signInProvider:a||null,signInSecondFactor:s?.sign_in_second_factor||null}}function td(e){return 1e3*Number(e)}function tp(e){let[t,r,i]=e.split(".");if(void 0===t||void 0===r||void 0===i)return ej("JWT malformed, contained fewer than 3 sections"),null;try{let e=u(r);if(!e)return ej("Failed to decode base64 JWT payload"),null;return JSON.parse(e)}catch(e){return ej("Caught error parsing JWT payload as JSON",e?.toString()),null}}function tf(e){let t=tp(e);return eK(t,"internal-error"),eK(void 0!==t.exp,"internal-error"),eK(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}async function tm(e,t,r=!1){if(r)return t;try{return await t}catch(t){throw t instanceof A&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}class tg{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){if(!e)return this.errorBackoff=3e4,Math.max(0,(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5);{let e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}}schedule(e=!1){if(!this.isRunning)return;let t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){e?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}class tI{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=tu(this.lastLoginAt),this.creationTime=tu(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function t_(e){var t,r;let i=e.auth,n=await e.getIdToken(),s=await tm(e,tl(i,{idToken:n}));eK(s?.users.length,i,"internal-error");let a=s.users[0];e._notifyReloadListener(a);let o=a.providerUserInfo?.length?tE(a.providerUserInfo):[],c=(t=e.providerData,r=o,[...t.filter(e=>!r.some(t=>t.providerId===e.providerId)),...r]),l=e.isAnonymous,u=!(e.email&&a.passwordHash)&&!c?.length;Object.assign(e,{uid:a.localId,displayName:a.displayName||null,photoURL:a.photoUrl||null,email:a.email||null,emailVerified:a.emailVerified||!1,phoneNumber:a.phoneNumber||null,tenantId:a.tenantId||null,providerData:c,metadata:new tI(a.createdAt,a.lastLoginAt),isAnonymous:!!l&&u})}async function tv(e){let t=F(e);await t_(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function tE(e){return e.map(({providerId:e,...t})=>({providerId:e,uid:t.rawId||"",displayName:t.displayName||null,email:t.email||null,phoneNumber:t.phoneNumber||null,photoURL:t.photoUrl||null}))}async function ty(e,t){let r=await e8(e,{},async()=>{let r=O({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:i,apiKey:n}=e.config,s=await e7(e,i,"/v1/token",`key=${n}`),a=await e._getAdditionalHeaders();a["Content-Type"]="application/x-www-form-urlencoded";let o={method:"POST",headers:a,body:r};return e.emulatorConfig&&x(e.emulatorConfig.host)&&(o.credentials="include"),e1.fetch()(s,o)});return{accessToken:r.access_token,expiresIn:r.expires_in,refreshToken:r.refresh_token}}async function tw(e,t){return e5(e,"POST","/v2/accounts:revokeToken",e4(e,t))}class tT{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){eK(e.idToken,"internal-error"),eK(void 0!==e.idToken,"internal-error"),eK(void 0!==e.refreshToken,"internal-error");let t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):tf(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){eK(0!==e.length,"internal-error");let t=tf(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e,t=!1){return t||!this.accessToken||this.isExpired?(eK(this.refreshToken,e,"user-token-expired"),this.refreshToken)?(await this.refresh(e,this.refreshToken),this.accessToken):null:this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){let{accessToken:r,refreshToken:i,expiresIn:n}=await ty(e,t);this.updateTokensAndExpiration(r,i,Number(n))}updateTokensAndExpiration(e,t,r){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*r}static fromJSON(e,t){let{refreshToken:r,accessToken:i,expirationTime:n}=t,s=new tT;return r&&(eK("string"==typeof r,"internal-error",{appName:e}),s.refreshToken=r),i&&(eK("string"==typeof i,"internal-error",{appName:e}),s.accessToken=i),n&&(eK("number"==typeof n,"internal-error",{appName:e}),s.expirationTime=n),s}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new tT,this.toJSON())}_performRefresh(){return eJ("not implemented")}}function tb(e,t){eK("string"==typeof e||void 0===e,"internal-error",{appName:t})}class tS{constructor({uid:e,auth:t,stsTokenManager:r,...i}){this.providerId="firebase",this.proactiveRefresh=new tg(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=e,this.auth=t,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new tI(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){let t=await tm(this,this.stsTokenManager.getToken(this.auth,e));return eK(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return th(this,e)}reload(){return tv(this)}_assign(e){this!==e&&(eK(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.ph
1otoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(e=>({...e})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let t=new tS({...this,auth:e,stsTokenManager:this.stsTokenManager._clone()});return t.metadata._copy(this.metadata),t}_onReload(e){eK(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let r=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),r=!0),t&&await t_(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(ey(this.auth.app))return Promise.reject(eq(this.auth));let e=await this.getIdToken();return await tm(this,to(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>({...e})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId,...this.metadata.toJSON(),apiKey:this.auth.config.apiKey,appName:this.auth.name}}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){let r=t.displayName??void 0,i=t.email??void 0,n=t.phoneNumber??void 0,s=t.photoURL??void 0,a=t.tenantId??void 0,o=t._redirectEventId??void 0,c=t.createdAt??void 0,l=t.lastLoginAt??void 0,{uid:u,emailVerified:h,isAnonymous:d,providerData:p,stsTokenManager:f}=t;eK(u&&f,e,"internal-error");let m=tT.fromJSON(this.name,f);eK("string"==typeof u,e,"internal-error"),tb(r,e.name),tb(i,e.name),eK("boolean"==typeof h,e,"internal-error"),eK("boolean"==typeof d,e,"internal-error"),tb(n,e.name),tb(s,e.name),tb(a,e.name),tb(o,e.name),tb(c,e.name),tb(l,e.name);let g=new tS({uid:u,auth:e,email:i,emailVerified:h,displayName:r,isAnonymous:d,photoURL:s,phoneNumber:n,tenantId:a,stsTokenManager:m,createdAt:c,lastLoginAt:l});return p&&Array.isArray(p)&&(g.providerData=p.map(e=>({...e}))),o&&(g._redirectEventId=o),g}static async _fromIdTokenResponse(e,t,r=!1){let i=new tT;i.updateFromServerResponse(t);let n=new tS({uid:t.localId,auth:e,stsTokenManager:i,isAnonymous:r});return await t_(n),n}static async _fromGetAccountInfoResponse(e,t,r){let i=t.users[0];eK(void 0!==i.localId,"internal-error");let n=void 0!==i.providerUserInfo?tE(i.providerUserInfo):[],s=!(i.email&&i.passwordHash)&&!n?.length,a=new tT;a.updateFromIdToken(r);let o=new tS({uid:i.localId,auth:e,stsTokenManager:a,isAnonymous:s});return Object.assign(o,{uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:n,metadata:new tI(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!n?.length}),o}}let tA=new Map;function tR(e){var t,r;t="Expected a class definition",e instanceof Function||eJ(t);let i=tA.get(e);return i?(r="Instance stored in cache mismatched with class",i instanceof e||eJ(r)):(i=new e,tA.set(e,i)),i}class tk{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){let t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}function tC(e,t,r){return`firebase:${e}:${t}:${r}`}tk.type="NONE";class tP{constructor(e,t,r){this.persistence=e,this.auth=t,this.userKey=r;const{config:i,name:n}=this.auth;this.fullUserKey=tC(this.userKey,i.apiKey,n),this.fullPersistenceKey=tC("persistence",i.apiKey,n),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){let e=await this.persistence._get(this.fullUserKey);if(!e)return null;if("string"==typeof e){let t=await tl(this.auth,{idToken:e}).catch(()=>void 0);return t?tS._fromGetAccountInfoResponse(this.auth,t,e):null}return tS._fromJSON(this.auth,e)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;let t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,r="authUser"){if(!t.length)return new tP(tR(tk),e,r);let i=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e),n=i[0]||tR(tk),s=tC(r,e.config.apiKey,e.name),a=null;for(let r of t)try{let t=await r._get(s);if(t){let i;if("string"==typeof t){let r=await tl(e,{idToken:t}).catch(()=>void 0);if(!r)break;
1i=await tS._fromGetAccountInfoResponse(e,r,t)}else i=tS._fromJSON(e,t);r!==n&&(a=i),n=r;break}}catch{}let o=i.filter(e=>e._shouldAllowMigration);return n._shouldAllowMigration&&o.length&&(n=o[0],a&&await n._set(s,a.toJSON()),await Promise.all(t.map(async e=>{if(e!==n)try{await e._remove(s)}catch{}}))),new tP(n,e,r)}}function tN(e){let t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";{if(tM(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(tO(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(tV(t))return"Blackberry";if(tF(t))return"Webos";if(tD(t))return"Safari";if((t.includes("chrome/")||tL(t))&&!t.includes("edge/"))return"Chrome";if(tU(t))return"Android";let r=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if(r?.length===2)return r[1]}return"Other"}function tO(e=g()){return/firefox\//i.test(e)}function tD(e=g()){let t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function tL(e=g()){return/crios\//i.test(e)}function tM(e=g()){return/iemobile/i.test(e)}function tU(e=g()){return/android/i.test(e)}function tV(e=g()){return/blackberry/i.test(e)}function tF(e=g()){return/webos/i.test(e)}function tx(e=g()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function tH(e=g()){return tx(e)||tU(e)||tF(e)||tV(e)||/windows phone/i.test(e)||tM(e)}function tj(e,t=[]){let r;switch(e){case"Browser":r=tN(g());break;case"Worker":r=`${tN(g())}-${e}`;break;default:r=e}let i=t.length?t.join(","):"FirebaseCore-web";return`${r}/JsCore/${eb}/${i}`}class tW{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let r=t=>new Promise((r,i)=>{try{let i=e(t);r(i)}catch(e){i(e)}});r.onAbort=t,this.queue.push(r);let i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;let t=[];try{for(let r of this.queue)await r(e),r.onAbort&&t.push(r.onAbort)}catch(e){for(let e of(t.reverse(),t))try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:e?.message})}}}async function tB(e,t={}){return e5(e,"GET","/v2/passwordPolicy",e4(e,t))}class tz{constructor(e){const t=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=t.minPasswordLength??6,t.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=t.maxPasswordLength),void 0!==t.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=t.containsLowercaseCharacter),void 0!==t.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=t.containsUppercaseCharacter),void 0!==t.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=t.containsNumericCharacter),void 0!==t.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=t.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=e.allowedNonAlphanumericCharacters?.join("")??"",this.forceUpgradeOnSignin=e.forceUpgradeOnSignin??!1,this.schemaVersion=e.schemaVersion}validatePassword(e){let t={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,t),this.validatePasswordCharacterOptions(e,t),t.isValid&&(t.isValid=t.meetsMinPasswordLength??!0),t.isValid&&(t.isValid=t.meetsMaxPasswordLength??!0),t.isValid&&(t.isValid=t.containsLowercaseLetter??!0),t.isValid&&(t.isValid=t.containsUppercaseLetter??!0),t.isValid&&(t.isValid=t.containsNumericCharacter??!0),t.isValid&&(t.isValid=t.containsNonAlphanumericCharacter??!0),t}validatePasswordLengthOptions(e,t){let r=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;r&&(t.meetsMinPasswordLength=e.length>=r),i&&(t.meetsMaxPasswordLength=e.length<=i)}validatePasswordCharacterOptions(e,t){let r;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let i=0;i<e.length;i++)r=e.charAt(i),this.updatePasswordCharacterOptionsStatuses(t,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(e,t,r,i,n){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=n))}}
1class tq{constructor(e,t,r,i){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=r,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new t$(this),this.idTokenSubscription=new t$(this),this.beforeStateQueue=new tW(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=ex,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=i.sdkClientVersion,this._persistenceManagerAvailable=new Promise(e=>this._resolvePersistenceManagerAvailable=e)}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=tR(t)),this._initializationPromise=this.queue(async()=>{if(!this._deleted){if(this.persistenceManager=await tP.create(this,e),this._resolvePersistenceManagerAvailable?.(),!this._deleted){if(this._popupRedirectResolver?._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(e){}await this.initializeCurrentUser(t),this.lastNotifiedUid=this.currentUser?.uid||null,this._deleted||(this._isInitialized=!0)}}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;let e=await this.assertedPersistence.getCurrentUser();if(this.currentUser||e){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUserFromIdToken(e){try{let t=await tl(this,{idToken:e}),r=await tS._fromGetAccountInfoResponse(this,t,e);await this.directlySetCurrentUser(r)}catch(e){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",e),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){if(ey(this.app)){let e=this.app.settings.authIdToken;return e?new Promise(t=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(e).then(t,t))}):this.directlySetCurrentUser(null)}let t=await this.assertedPersistence.getCurrentUser(),r=t,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let t=this.redirectUser?._redirectEventId,n=r?._redirectEventId,s=await this.tryRedirectSignIn(e);(!t||t===n)&&s?.user&&(r=s.user,i=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(r)}catch(e){r=t,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(e))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return(eK(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId)?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(e){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await t_(e)}catch(e){if(e?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("u"<typeof navigator)return null;let e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if(ey(this.app))return Promise.reject(eq(this));let t=e?F(e):null;return t&&eK(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&eK(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return ey(this.app)?Promise.reject(eq(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return ey(this.app)?Promise.reject(eq(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(tR(e))})}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();let t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){let e=new tz(await tB(this));null===this.tenantId?this._projectPasswordPolicy=e:this._tenantPasswordPolicies[this.tenantId]=e}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new R("auth","Firebase",e())}onAuthStateChanged(e,t,r){return this.registerStateListener(this.authStateSubscription,e,t,r)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,r){return this.registerStateListener(this.idTokenSubscription,e,t,r)}authStateReady(){return new Promise((e,t)=>
1{if(this.currentUser)e();else{let r=this.onAuthStateChanged(()=>{r(),e()},t)}})}async revokeAccessToken(e){if(this.currentUser){let t={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:await this.currentUser.getIdToken()};null!=this.tenantId&&(t.tenantId=this.tenantId),await tw(this,t)}}toJSON(){return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:this._currentUser?.toJSON()}}async _setRedirectUser(e,t){let r=await this.getOrInitRedirectPersistenceManager(t);return null===e?r.removeCurrentUser():r.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let t=e&&tR(e)||this._popupRedirectResolver;eK(t,this,"argument-error"),this.redirectPersistenceManager=await tP.create(this,[tR(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){return(this._isInitialized&&await this.queue(async()=>{}),this._currentUser?._redirectEventId===e)?this._currentUser:this.redirectUser?._redirectEventId===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let e=this.currentUser?.uid??null;this.lastNotifiedUid!==e&&(this.lastNotifiedUid=e,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,r,i){if(this._deleted)return()=>{};let n="function"==typeof t?t:t.next.bind(t),s=!1,a=this._isInitialized?Promise.resolve():this._initializationPromise;if(eK(a,this,"internal-error"),a.then(()=>{s||n(this.currentUser)}),"function"==typeof t){let n=e.addObserver(t,r,i);return()=>{s=!0,n()}}{let r=e.addObserver(t);return()=>{s=!0,r()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return eK(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=tj(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){let e={"X-Client-Version":this.clientVersion};this.app.options.appId&&(e["X-Firebase-gmpid"]=this.app.options.appId);let t=await this.heartbeatServiceProvider.getImmediate({optional:!0})?.getHeartbeatsHeader();t&&(e["X-Firebase-Client"]=t);let r=await this._getAppCheckToken();return r&&(e["X-Firebase-AppCheck"]=r),e}async _getAppCheckToken(){if(ey(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let e=await this.appCheckServiceProvider.getImmediate({optional:!0})?.getToken();return e?.error&&function(e,...t){eH.logLevel<=nK.WARN&&eH.warn(`Auth (${eb}): ${e}`,...t)}(`Error while retrieving App Check token: ${e.error}`),e?.token}}class t${constructor(e){this.auth=e,this.observer=null,this.addObserver=M(e=>this.observer=e)}get next(){return eK(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let tG={async loadJS(){throw Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function tK(e){return tG.loadJS(e)}function tJ(e){return`__${e}${Math.floor(1e6*Math.random())}`}class tY{constructor(e){this.auth=e,this.counter=1e12,this._widgets=new Map}render(e,t){let r=this.counter;return this._widgets.set(r,new tZ(e,this.auth.name,t||{})),this.counter++,r}reset(e){let t=e||1e12;this._widgets.get(t)?.delete(),this._widgets.delete(t)}getResponse(e){return this._widgets.get(e||1e12)?.getResponse()||""}async execute(e){return this._widgets.get(e||1e12)?.execute(),""}}class tX{constructor(){this.enterprise=new tQ}ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}class tQ{ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}class tZ{constructor(e,t,r){this.params=r,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};const i="string"==typeof e?document.getElementById(e):e;eK(i,"argument-error",{appName:t}),this.container=i,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}getResponse(){return this.checkIfDeleted(),this.responseToken}delete(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)}execute(){this.checkIfDeleted(),this.timerId||(this.timerId=window.setTimeout(()=>{this.responseToken=function(){let e=[],t="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let r=0;r<50;r++)e.push(t.charAt(Math.floor(Math.random()*t.length)));return e.join("")}();let{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(e){}this.timerId=window.setTimeout(()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(e){}this.isVisible&&this.execute()},6e4)},500))}checkIfDeleted(){if(this.deleted)throw Error("reCAPTCHA mock was already deleted!")}}let t0="NO_RECAPTCHA";class t1{constructor(e){this.type="recaptcha-enterprise",this.auth=function(e){return F(e)}(e)}async verify(e="verify",t=!1){async function r(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,r)=>
1{ta(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(i=>{if(void 0===i.recaptchaKey)r(Error("recaptcha Enterprise site key undefined"));else{let r=new tn(i);return null==e.tenantId?e._agentRecaptchaConfig=r:e._tenantRecaptchaConfigs[e.tenantId]=r,t(r.siteKey)}}).catch(e=>{r(e)})})}function i(t,r,i){let n=window.grecaptcha;ti(n)?n.enterprise.ready(()=>{n.enterprise.execute(t,{action:e}).then(e=>{r(e)}).catch(()=>{r(t0)})}):i(Error("No reCAPTCHA enterprise script loaded."))}return this.auth.settings.appVerificationDisabledForTesting?new tX().execute("siteKey",{action:"verify"}):new Promise((e,n)=>{r(this.auth).then(r=>{if(!t&&ti(window.grecaptcha))i(r,e,n);else{if("u"<typeof window)return void n(Error("RecaptchaVerifier is only supported in browser"));let t=tG.recaptchaEnterpriseScript;0!==t.length&&(t+=r),tK(t).then(()=>{i(r,e,n)}).catch(e=>{n(e)})}}).catch(e=>{n(e)})})}}async function t2(e,t,r,i=!1,n=!1){let s,a=new t1(e);if(n)s=t0;else try{s=await a.verify(r)}catch(e){s=await a.verify(r,!0)}let o={...t};if("mfaSmsEnrollment"===r||"mfaSmsSignIn"===r){if("phoneEnrollmentInfo"in o){let e=o.phoneEnrollmentInfo.phoneNumber,t=o.phoneEnrollmentInfo.recaptchaToken;Object.assign(o,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:t,captchaResponse:s,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in o){let e=o.phoneSignInInfo.recaptchaToken;Object.assign(o,{phoneSignInInfo:{recaptchaToken:e,captchaResponse:s,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return o}return i?Object.assign(o,{captchaResp:s}):Object.assign(o,{captchaResponse:s}),Object.assign(o,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(o,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),o}async function t3(e,t,r,i,n){if("EMAIL_PASSWORD_PROVIDER"===n)if(!e._getRecaptchaConfig()?.isProviderEnabled("EMAIL_PASSWORD_PROVIDER"))return i(e,t).catch(async n=>{if("auth/missing-recaptcha-token"!==n.code)return Promise.reject(n);{console.log(`${r} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let n=await t2(e,t,r,"getOobCode"===r);return i(e,n)}});else{let n=await t2(e,t,r,"getOobCode"===r);return i(e,n)}if("PHONE_PROVIDER"!==n)return Promise.reject(n+" provider is not supported.");if(e._getRecaptchaConfig()?.isProviderEnabled("PHONE_PROVIDER")){let n=await t2(e,t,r);return i(e,n).catch(async n=>{if(e._getRecaptchaConfig()?.getProviderEnforcementState("PHONE_PROVIDER")==="AUDIT"&&("auth/missing-recaptcha-token"===n.code||"auth/invalid-app-credential"===n.code)){console.log(`Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ${r} flow.`);let n=await t2(e,t,r,!1,!0);return i(e,n)}return Promise.reject(n)})}{let n=await t2(e,t,r,!1,!0);return i(e,n)}}async function t6(e){let t=F(e),r=new tn(await ta(t,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}));null==t.tenantId?t._agentRecaptchaConfig=r:t._tenantRecaptchaConfigs[t.tenantId]=r,r.isAnyProviderEnabled()&&new t1(t).verify()}function t4(e,t){let r=eE(e,"auth");if(r.isInitialized()){let e=r.getImmediate();if(P(r.getOptions(),t??{}))return e;eW(e,"already-initialized")}return r.initialize({options:t})}function t5(e,t,r){let i=F(e);eK(/^https?:\/\//.test(t),i,"invalid-emulator-scheme");let n=!!r?.disableWarnings,s=t8(t),{host:a,port:o}=function(e){let t=t8(e),r=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!r)return{host:"",port:null};let i=r[2].split("@").pop()||"",n=/^(\[[^\]]+\])(:|$)/.exec(i);if(n){let e=n[1];return{host:e,port:t9(i.substr(e.length+1))}}{let[e,t]=i.split(":");return{host:e,port:t9(t)}}}(t),c=null===o?"":`:${o}`,l={url:`${s}//${a}${c}/`},u=Object.freeze({host:a,port:o,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:n})});if(!i._canInitEmulator){eK(i.config.emulator&&i.emulatorConfig,i,"emulator-config-failed"),eK(P(l,i.config.emulator)&&P(u,i.emulatorConfig),i,"emulator-config-failed");return}i.config.emulator=l,i.emulatorConfig=u,i.settings.appVerificationDisabledForTesting=!0,x(a)?H(`${s}//${a}${c}`):n||function(){function e(){let e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"u">typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials."),"u">typeof window&&"u">typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}function t8(e){let t=e.indexOf(":");
1return t<0?"":e.substr(0,t+1)}function t9(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}class t7{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return eJ("not implemented")}_getIdTokenResponse(e){return eJ("not implemented")}_linkToIdToken(e,t){return eJ("not implemented")}_getReauthenticationResolver(e){return eJ("not implemented")}}async function re(e,t){return e5(e,"POST","/v1/accounts:resetPassword",e4(e,t))}async function rt(e,t){return e5(e,"POST","/v1/accounts:update",t)}async function rr(e,t){return e5(e,"POST","/v1/accounts:signUp",t)}async function ri(e,t){return e5(e,"POST","/v1/accounts:update",e4(e,t))}async function rn(e,t){return e9(e,"POST","/v1/accounts:signInWithPassword",e4(e,t))}async function rs(e,t){return e5(e,"POST","/v1/accounts:sendOobCode",e4(e,t))}async function ra(e,t){return rs(e,t)}async function ro(e,t){return rs(e,t)}async function rc(e,t){return rs(e,t)}async function rl(e,t){return rs(e,t)}async function ru(e,t){return e9(e,"POST","/v1/accounts:signInWithEmailLink",e4(e,t))}async function rh(e,t){return e9(e,"POST","/v1/accounts:signInWithEmailLink",e4(e,t))}class rd extends t7{constructor(e,t,r,i=null){super("password",r),this._email=e,this._password=t,this._tenantId=i}static _fromEmailAndPassword(e,t){return new rd(e,t,"password")}static _fromEmailAndCode(e,t,r=null){return new rd(e,t,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e;if(t?.email&&t?.password){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);else if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return t3(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",rn,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return ru(e,{email:this._email,oobCode:this._password});default:eW(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return t3(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",rr,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return rh(e,{idToken:t,email:this._email,oobCode:this._password});default:eW(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function rp(e,t){return e9(e,"POST","/v1/accounts:signInWithIdp",e4(e,t))}class rf extends t7{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let t=new rf(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):eW("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
1once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){let{providerId:t,signInMethod:r,...i}="string"==typeof e?JSON.parse(e):e;if(!t||!r)return null;let n=new rf(t,r);return n.idToken=i.idToken||void 0,n.accessToken=i.accessToken||void 0,n.secret=i.secret,n.nonce=i.nonce,n.pendingToken=i.pendingToken||null,n}_getIdTokenResponse(e){return rp(e,this.buildRequest())}_linkToIdToken(e,t){let r=this.buildRequest();return r.idToken=t,rp(e,r)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,rp(e,t)}buildRequest(){let e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=O(t)}return e}}async function rm(e,t){return e5(e,"POST","/v1/accounts:sendVerificationCode",e4(e,t))}async function rg(e,t){return e9(e,"POST","/v1/accounts:signInWithPhoneNumber",e4(e,t))}async function rI(e,t){let r=await e9(e,"POST","/v1/accounts:signInWithPhoneNumber",e4(e,t));if(r.temporaryProof)throw tt(e,"account-exists-with-different-credential",r);return r}let r_={USER_NOT_FOUND:"user-not-found"};async function rv(e,t){return e9(e,"POST","/v1/accounts:signInWithPhoneNumber",e4(e,{...t,operation:"REAUTH"}),r_)}class rE extends t7{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new rE({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new rE({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return rg(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return rI(e,{idToken:t,...this._makeVerificationRequest()})}_getReauthenticationResolver(e){return rv(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:t,verificationId:r,verificationCode:i}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:r,code:i}}toJSON(){let e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"==typeof e&&(e=JSON.parse(e));let{verificationId:t,verificationCode:r,phoneNumber:i,temporaryProof:n}=e;return r||t||i||n?new rE({verificationId:t,verificationCode:r,phoneNumber:i,temporaryProof:n}):null}}class ry{constructor(e){const t=D(L(e)),r=t.apiKey??null,i=t.oobCode??null,n=function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(t.mode??null);eK(r&&i&&n,"argument-error"),this.apiKey=r,this.operation=n,this.code=i,this.continueUrl=t.continueUrl??null,this.languageCode=t.lang??null,this.tenantId=t.tenantId??null}static parseLink(e){let t,r,i,n=(r=(t=D(L(e)).link)?D(L(t)).deep_link_id:null,((i=D(L(e)).deep_link_id)?D(L(i)).link:null)||i||r||t||e);try{return new ry(n)}catch{return null}}}class rw{constructor(){this.providerId=rw.PROVIDER_ID}static credential(e,t){return rd._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){let r=ry.parseLink(t);return eK(r,"argument-error"),rd._fromEmailAndCode(e,r.code,r.tenantId)}}rw.PROVIDER_ID="password",rw.EMAIL_PASSWORD_SIGN_IN_METHOD="password",rw.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class rT{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}class rb extends rT{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class rS extends rb{static credentialFromJSON(e){let t="string"==typeof e?JSON.parse(e):e;return eK("providerId"in t&&"signInMethod"in t,"argument-error"),rf._fromParams(t)}credential(e){return this._credential({...e,nonce:e.rawNonce})}_credential(e){return eK(e.idToken||e.accessToken,"argument-error"),rf._fromParams({...e,providerId:this.providerId,sign
1InMethod:this.providerId})}static credentialFromResult(e){return rS.oauthCredentialFromTaggedObject(e)}static credentialFromError(e){return rS.oauthCredentialFromTaggedObject(e.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:r,oauthTokenSecret:i,pendingToken:n,nonce:s,providerId:a}=e;if(!r&&!i&&!t&&!n||!a)return null;try{return new rS(a)._credential({idToken:t,accessToken:r,nonce:s,pendingToken:n})}catch(e){return null}}}class rA extends rb{constructor(){super("facebook.com")}static credential(e){return rf._fromParams({providerId:rA.PROVIDER_ID,signInMethod:rA.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return rA.credentialFromTaggedObject(e)}static credentialFromError(e){return rA.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return rA.credential(e.oauthAccessToken)}catch{return null}}}rA.FACEBOOK_SIGN_IN_METHOD="facebook.com",rA.PROVIDER_ID="facebook.com";class rR extends rb{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return rf._fromParams({providerId:rR.PROVIDER_ID,signInMethod:rR.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return rR.credentialFromTaggedObject(e)}static credentialFromError(e){return rR.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:r}=e;if(!t&&!r)return null;try{return rR.credential(t,r)}catch{return null}}}rR.GOOGLE_SIGN_IN_METHOD="google.com",rR.PROVIDER_ID="google.com";class rk extends rb{constructor(){super("github.com")}static credential(e){return rf._fromParams({providerId:rk.PROVIDER_ID,signInMethod:rk.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return rk.credentialFromTaggedObject(e)}static credentialFromError(e){return rk.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return rk.credential(e.oauthAccessToken)}catch{return null}}}rk.GITHUB_SIGN_IN_METHOD="github.com",rk.PROVIDER_ID="github.com";class rC extends t7{constructor(e,t){super(e,e),this.pendingToken=t}_getIdTokenResponse(e){return rp(e,this.buildRequest())}_linkToIdToken(e,t){let r=this.buildRequest();return r.idToken=t,rp(e,r)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,rp(e,t)}toJSON(){return{signInMethod:this.signInMethod,providerId:this.providerId,pendingToken:this.pendingToken}}static fromJSON(e){let{providerId:t,signInMethod:r,pendingToken:i}="string"==typeof e?JSON.parse(e):e;return t&&r&&i&&t===r?new rC(t,i):null}static _create(e,t){return new rC(e,t)}buildRequest(){return{requestUri:"http://localhost",returnSecureToken:!0,pendingToken:this.pendingToken}}}class rP extends rT{constructor(e){eK(e.startsWith("saml."),"argument-error"),super(e)}static credentialFromResult(e){return rP.samlCredentialFromTaggedObject(e)}static credentialFromError(e){return rP.samlCredentialFromTaggedObject(e.customData||{})}static credentialFromJSON(e){let t=rC.fromJSON(e);return eK(t,"argument-error"),t}static samlCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{pendingToken:t,providerId:r}=e;if(!t||!r)return null;try{return rC._create(r,t)}catch(e){return null}}}class rN extends rb{constructor(){super("twitter.com")}static credential(e,t){return rf._fromParams({providerId:rN.PROVIDER_ID,signInMethod:rN.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return rN.credentialFromTaggedObject(e)}static credentialFromError(e){return rN.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthAccessToken:t,oauthTokenSecret:r}=e;if(!t||!r)return null;try{return rN.credential(t,r)}catch{return null}}}async function rO(e,t){return e9(e,"POST","/v1/accounts:signUp",e4(e,t))}rN.TWITTER_SIGN_IN_METHOD="twitter.com",rN.PROVIDER_ID="twitter.com";class rD{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,r,i=!1){return new rD({user:await tS._fromIdTokenResponse(e,r,i),providerId:rL(r),_tokenResponse:r,operationType:t})}static async _forOperation(e,t,r){return await e._updateTokensIfNecessary(r,!0),new rD({user:e,providerId:rL(r),_tokenResponse:r,operationType:t})}}function rL(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}async function rM(e){if(ey(e.app))return Promise.reject(eq(e));let t=F(e);if(await t._initializationPromise,t.currentUser?.isAnonymous)return new rD({user:t.currentUser,providerId:null,operationType:"signIn"});let r=await rO(t,{returnSecureToken:!0}),i=await rD._fromIdTokenResponse(t,"signIn",r,!0);return await t._updateCurrentUser(i.user),i}
1class rU extends A{constructor(e,t,r,i){super(t.code,t.message),this.operationType=r,this.user=i,Object.setPrototypeOf(this,rU.prototype),this.customData={appName:e.name,tenantId:e.tenantId??void 0,_serverResponse:t.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(e,t,r,i){return new rU(e,t,r,i)}}function rV(e,t,r,i){return("reauthenticate"===t?r._getReauthenticationResolver(e):r._getIdTokenResponse(e)).catch(r=>{if("auth/multi-factor-auth-required"===r.code)throw rU._fromErrorAndOperation(e,r,t,i);throw r})}function rF(e){return new Set(e.map(({providerId:e})=>e).filter(e=>!!e))}async function rx(e,t){let r=F(e);await rj(!0,r,t);let{providerUserInfo:i}=await tc(r.auth,{idToken:await r.getIdToken(),deleteProvider:[t]}),n=rF(i||[]);return r.providerData=r.providerData.filter(e=>n.has(e.providerId)),n.has("phone")||(r.phoneNumber=null),await r.auth._persistUserIfCurrent(r),r}async function rH(e,t,r=!1){let i=await tm(e,t._linkToIdToken(e.auth,await e.getIdToken()),r);return rD._forOperation(e,"link",i)}async function rj(e,t,r){await t_(t),eK(rF(t.providerData).has(r)===e,t.auth,!1===e?"provider-already-linked":"no-such-provider")}async function rW(e,t,r=!1){let{auth:i}=e;if(ey(i.app))return Promise.reject(eq(i));let n="reauthenticate";try{let s=await tm(e,rV(i,n,t,e),r);eK(s.idToken,i,"internal-error");let a=tp(s.idToken);eK(a,i,"internal-error");let{sub:o}=a;return eK(e.uid===o,i,"user-mismatch"),rD._forOperation(e,n,s)}catch(e){throw e?.code==="auth/user-not-found"&&eW(i,"user-mismatch"),e}}async function rB(e,t,r=!1){if(ey(e.app))return Promise.reject(eq(e));let i="signIn",n=await rV(e,i,t),s=await rD._fromIdTokenResponse(e,i,n);return r||await e._updateCurrentUser(s.user),s}async function rz(e,t){return rB(F(e),t)}async function rq(e,t){let r=F(e);return await rj(!1,r,t.providerId),rH(r,t)}async function r$(e,t){return rW(F(e),t)}async function rG(e,t){return e9(e,"POST","/v1/accounts:signInWithCustomToken",e4(e,t))}async function rK(e,t){if(ey(e.app))return Promise.reject(eq(e));let r=F(e),i=await rG(r,{token:t,returnSecureToken:!0}),n=await rD._fromIdTokenResponse(r,"signIn",i);return await r._updateCurrentUser(n.user),n}class rJ{constructor(e,t){this.factorId=e,this.uid=t.mfaEnrollmentId,this.enrollmentTime=new Date(t.enrolledAt).toUTCString(),this.displayName=t.displayName}static _fromServerResponse(e,t){return"phoneInfo"in t?rY._fromServerResponse(e,t):"totpInfo"in t?rX._fromServerResponse(e,t):eW(e,"internal-error")}}class rY extends rJ{constructor(e){super("phone",e),this.phoneNumber=e.phoneInfo}static _fromServerResponse(e,t){return new rY(t)}}class rX extends rJ{constructor(e){super("totp",e)}static _fromServerResponse(e,t){return new rX(t)}}function rQ(e,t,r){eK(r.url?.length>0,e,"invalid-continue-uri"),eK(void 0===r.dynamicLinkDomain||r.dynamicLinkDomain.length>0,e,"invalid-dynamic-link-domain"),eK(void 0===r.linkDomain||r.linkDomain.length>0,e,"invalid-hosting-link-domain"),t.continueUrl=r.url,t.dynamicLinkDomain=r.dynamicLinkDomain,t.linkDomain=r.linkDomain,t.canHandleCodeInApp=r.handleCodeInApp,r.iOS&&(eK(r.iOS.bundleId.length>0,e,"missing-ios-bundle-id"),t.iOSBundleId=r.iOS.bundleId),r.android&&(eK(r.android.packageName.length>0,e,"missing-android-pkg-name"),t.androidInstallApp=r.android.installApp,t.androidMinimumVersionCode=r.android.minimumVersion,t.androidPackageName=r.android.packageName)}async function rZ(e){let t=F(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}async function r0(e,t,r){let i=F(e),n={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};r&&rQ(i,n,r),await t3(i,n,"getOobCode",ro,"EMAIL_PASSWORD_PROVIDER")}async function r1(e,t,r){await re(F(e),{oobCode:t,newPassword:r}).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&rZ(e),t})}async function r2(e,t){await ri(F(e),{oobCode:t})}async function r3(e,t){let r=F(e),i=await re(r,{oobCode:t}),n=i.requestType;switch(eK(n,r,"internal-error"),n){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":eK(i.newEmail,r,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":eK(i.mfaInfo,r,"internal-error");default:eK(i.email,r,"internal-error")}let s=null;return i.mfaInfo&&(s=rJ._fromServerResponse(F(r),i.mfaInfo)),{data:{email:("VERIFY_AND_CHANGE_EMAIL"===i.requestType?i.newEmail:i.email)||null,previousEmail:("VERIFY_AND_CHANGE_EMAIL"===i.requestType?i.email:i.newEmail)||null,multiFactorInfo:s},operation:n}}async function r6(e,t){let{data:r}=await r3(F(e),t);return r.email}async function r4(e,t,r){if(ey(e.app))return Promise.reject(eq(e));let i=F(e),n=t3(i,{returnSecureToken:!0,email:t,password:r,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",rO,"EMAIL_PASSWORD_PROVIDER"),s=await n.catch(t=>{throw"auth/password-does-not-meet-requirements"===t.code&&rZ(e),t}),a=await rD._fromIdTokenResponse(i,"signIn",s);return await i._updateCurrentUser(a.user),a}async function r5(e,t,r){let i=F(e),n={requestType:"EMAIL_SIGNIN",email:t,clientType:"CLIENT_TYPE_WEB"};eK(r.handleCodeInApp,i,"argument-error"),r&&rQ(i,n,r),await t3(i,n,"getOobCode",rc,"EMAIL_PASSWORD_PROVIDER")}async function r8(e,t,r){if(ey(e.app))return Promise.reject(eq(e));let i=F(e),n=rw.credentialWithLink(t,r||eY());return eK(n._tenantId===(i.tenantId||null),i,"tenant-id-mismatch"),rz(i,n)}async function r9(e,t){return e5(e,"POST","/v1/accounts:createAuthUri",e4(e,t))}async function r7(e,t){let r=eX()?eY():"http://localhost",{signinMethods:i}=await r9(F(e),{identifier:t,continueUri:r});return i||[]}async function ie(e,t){let r=F(e),i={requestType:"VERIFY_EMAIL",idToken:await e.getIdToken()};t&&rQ(r.auth,i,t);let{email:n}=await ra(r.auth,i);n!==e.email&&await e.reload()}async function it(e,t,r){let i=F(e),n={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:await e.getIdToken(),newEmail:t};r&&rQ(i.auth,n,r);let{email:s}=await rl(i.auth,n);s!==e.email&&await e.reload()}async function ir(e,t){return e5(e,"POST","/v1/accounts:update",t)}async function ii(e,{displayName:t,photoURL:r}
1){if(void 0===t&&void 0===r)return;let i=F(e),n=await i.getIdToken(),s=await tm(i,ir(i.auth,{idToken:n,displayName:t,photoUrl:r,returnSecureToken:!0}));i.displayName=s.displayName||null,i.photoURL=s.photoUrl||null;let a=i.providerData.find(({providerId:e})=>"password"===e);a&&(a.displayName=i.displayName,a.photoURL=i.photoURL),await i._updateTokensIfNecessary(s)}async function is(e,t,r){let{auth:i}=e,n={idToken:await e.getIdToken(),returnSecureToken:!0};t&&(n.email=t),r&&(n.password=r);let s=await tm(e,rt(i,n));await e._updateTokensIfNecessary(s,!0)}class ia{constructor(e,t,r={}){this.isNewUser=e,this.providerId=t,this.profile=r}}class io extends ia{constructor(e,t,r,i){super(e,t,r),this.username=i}}class ic extends ia{constructor(e,t){super(e,"facebook.com",t)}}class il extends io{constructor(e,t){super(e,"github.com",t,"string"==typeof t?.login?t?.login:null)}}class iu extends ia{constructor(e,t){super(e,"google.com",t)}}class ih extends io{constructor(e,t,r){super(e,"twitter.com",t,r)}}async function id(e,t){return F(e).validatePassword(t)}function ip(e,t,r,i){return F(e).onIdTokenChanged(t,r,i)}function im(e,t,r){return F(e).beforeAuthStateChanged(t,r)}async function ig(e){return F(e).delete()}class iI{constructor(e,t,r){this.type=e,this.credential=t,this.user=r}static _fromIdtoken(e,t){return new iI("enroll",e,t)}static _fromMfaPendingCredential(e){return new iI("signin",e)}toJSON(){return{multiFactorSession:{["enroll"===this.type?"idToken":"pendingCredential"]:this.credential}}}static fromJSON(e){if(e?.multiFactorSession){if(e.multiFactorSession?.pendingCredential)return iI._fromMfaPendingCredential(e.multiFactorSession.pendingCredential);else if(e.multiFactorSession?.idToken)return iI._fromIdtoken(e.multiFactorSession.idToken)}return null}}class i_{constructor(e,t,r){this.session=e,this.hints=t,this.signInResolver=r}static _fromError(e,t){let r=F(e),i=t.customData._serverResponse,n=(i.mfaInfo||[]).map(e=>rJ._fromServerResponse(r,e));eK(i.mfaPendingCredential,r,"internal-error");let s=iI._fromMfaPendingCredential(i.mfaPendingCredential);return new i_(s,n,async e=>{let n=await e._process(r,s);delete i.mfaInfo,delete i.mfaPendingCredential;let a={...i,idToken:n.idToken,refreshToken:n.refreshToken};switch(t.operationType){case"signIn":let o=await rD._fromIdTokenResponse(r,t.operationType,a);return await r._updateCurrentUser(o.user),o;case"reauthenticate":return eK(t.user,r,"internal-error"),rD._forOperation(t.user,t.operationType,a);default:eW(r,"internal-error")}})}async resolveSignIn(e){return this.signInResolver(e)}}function iv(e,t){return e5(e,"POST","/v2/accounts/mfaEnrollment:start",e4(e,t))}class iE{constructor(e){this.user=e,this.enrolledFactors=[],e._onReload(t=>{t.mfaInfo&&(this.enrolledFactors=t.mfaInfo.map(t=>rJ._fromServerResponse(e.auth,t)))})}static _fromUser(e){return new iE(e)}async getSession(){return iI._fromIdtoken(await this.user.getIdToken(),this.user)}
1async enroll(e,t){let r=await this.getSession(),i=await tm(this.user,e._process(this.user.auth,r,t));return await this.user._updateTokensIfNecessary(i),this.user.reload()}async unenroll(e){let t="string"==typeof e?e:e.uid,r=await this.user.getIdToken();try{var i,n;let e=await tm(this.user,(i=this.user.auth,n={idToken:r,mfaEnrollmentId:t},e5(i,"POST","/v2/accounts/mfaEnrollment:withdraw",e4(i,n))));this.enrolledFactors=this.enrolledFactors.filter(({uid:e})=>e!==t),await this.user._updateTokensIfNecessary(e),await this.user.reload()}catch(e){throw e}}}let iy=new WeakMap,iw="__sak";class iT{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{if(!this.storage)return Promise.resolve(!1);return this.storage.setItem(iw,"1"),this.storage.removeItem(iw),Promise.resolve(!0)}catch{return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){let t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class ib extends iT{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=tH(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let t of Object.keys(this.listeners)){let r=this.storage.getItem(t),i=this.localCache[t];r!==i&&e(t,i,r)}}onStorageEvent(e,t=!1){if(!e.key)return void this.forAllChangedKeys((e,t,r)=>{this.notifyListeners(e,r)});let r=e.key;t?this.detachListener():this.stopPolling();let i=()=>{let e=this.storage.getItem(r);(t||this.localCache[r]!==e)&&this.notifyListeners(r,e)},n=this.storage.getItem(r);T()&&10===document.documentMode&&n!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,10):i()}notifyListeners(e,t){this.localCache[e]=t;let r=this.listeners[e];if(r)for(let e of Array.from(r))e(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:r}),!0)})},1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){let t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}function iS(e){let t=e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),r=RegExp(`${t}=([^;]+)`);return document.cookie.match(r)?.[1]??null}function iA(e){let t="http:"===window.location.protocol;return`${t?"__dev_":"__HOST-"}FIREBASE_${e.split(":")[3]}`}ib.type="LOCAL";class iR{constructor(){this.type="COOKIE",this.listenerUnsubscribes=new Map}_getFinalTarget(e){let t=new URL(`${window.location.origin}/__cookies__`);return t.searchParams.set("finalTarget",e),t}async _isAvailable(){return!("boolean"==typeof isSecureContext&&!isSecureContext||"u"<typeof navigator||"u"<typeof document)&&(navigator.cookieEnabled??!0)}async _set(e,t){}async _get(e){if(!this._isAvailable())return null;let t=iA(e);if(window.cookieStore){let e=await window.cookieStore.get(t);return e?.value}return iS(t)}async _remove(e){if(!this._isAvailable()||!await this._get(e))return;let t=iA(e);document.cookie=`${t}=;Max-Age=34560000;Partitioned;Secure;SameSite=Strict;Path=/;Priority=High`,await fetch("/__cookies__",{method:"DELETE"}).catch(()=>void 0)}_addListener(e,t){if(!this._isAvailable())return;let r=iA(e);if(window.cookieStore){let e=e=>{let i=e.changed.find(e=>e.name===r);i&&t(i.value),e.deleted.find(e=>e.name===r)&&t(null)};return this.listenerUnsubscribes.set(t,()=>window.cookieStore.removeEventListener("change",e)),window.cookieStore.addEventListener("change",e)}let i=iS(r),n=setInterval(()=>{let e=iS(r);
1e!==i&&(t(e),i=e)},1e3);this.listenerUnsubscribes.set(t,()=>clearInterval(n))}_removeListener(e,t){let r=this.listenerUnsubscribes.get(t);r&&(r(),this.listenerUnsubscribes.delete(t))}}iR.type="COOKIE";class ik extends iT{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}ik.type="SESSION";class iC{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let t=this.receivers.find(t=>t.isListeningto(e));if(t)return t;let r=new iC(e);return this.receivers.push(r),r}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let{eventId:t,eventType:r,data:i}=e.data,n=this.handlersMap[r];if(!n?.size)return;e.ports[0].postMessage({status:"ack",eventId:t,eventType:r});let s=Array.from(n).map(async t=>t(e.origin,i)),a=await Promise.all(s.map(async e=>{try{let t=await e;return{fulfilled:!0,value:t}}catch(e){return{fulfilled:!1,reason:e}}}));e.ports[0].postMessage({status:"done",eventId:t,eventType:r,response:a})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}function iP(e="",t=10){let r="";for(let e=0;e<t;e++)r+=Math.floor(10*Math.random());return e+r}iC.receivers=[];class iN{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t,r=50){let i,n,s="u">typeof MessageChannel?new MessageChannel:null;if(!s)throw Error("connection_unavailable");return new Promise((a,o)=>{let c=iP("",20);s.port1.start();let l=setTimeout(()=>{o(Error("unsupported_event"))},r);n={messageChannel:s,onMessage(e){if(e.data.eventId===c)switch(e.data.status){case"ack":clearTimeout(l),i=setTimeout(()=>{o(Error("timeout"))},3e3);break;case"done":clearTimeout(i),a(e.data.response);break;default:clearTimeout(l),clearTimeout(i),o(Error("invalid_response"))}}},this.handlers.add(n),s.port1.addEventListener("message",n.onMessage),this.target.postMessage({eventType:e,eventId:c,data:t},[s.port2])}).finally(()=>{n&&this.removeMessageHandler(n)})}}function iO(){return window}function iD(){return void 0!==iO().WorkerGlobalScope&&"function"==typeof iO().importScripts}async function iL(){if(!navigator?.serviceWorker)return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}let iM="firebaseLocalStorageDb",iU="firebaseLocalStorage",iV="fbase_key";class iF{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function ix(e,t){return e.transaction([iU],t?"readwrite":"readonly").objectStore(iU)}async function iH(e,t,r){return new iF(ix(e,!0).put({[iV]:t,value:r})).toPromise()}async function ij(e,t){let r=ix(e,!1).get(t),i=await new iF(r).toPromise();return void 0===i?null:i.value}function iW(e,t){return new iF(ix(e,!0).delete(t)).toPromise()}class iB{constructor(){this.type="LOCAL",this.dbPromise=null,this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.dbPromise||(this.dbPromise=function e(){let t=indexedDB.open(iM,1);return new Promise((r,i)=>{t.addEventListener("error",()=>{i(t.error)}),t.addEventListener("upgradeneeded",()=>{let e=t.result;try{e.createObjectStore(iU,{keyPath:iV})}catch(e){i(e)}}),t.addEventListener("success",async()=>{let i=t.result;i.objectStoreNames.contains(iU)?r(i):(i.close(),await new iF(indexedDB.deleteDatabase(iM)).toPromise(),r(await e()))})})}(),this.dbPromise.catch(()=>{this.dbPromise=null})),this.dbPromise}async _withRetries(e){let t=0;for(;;)try{let t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.dbPromise&&((await this.dbPromise).close(),this.dbPromise=null)}}async initializeServiceWorkerMessaging(){return iD()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=iC._getInstance(iD()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}
1async initializeSender(){if(this.activeServiceWorker=await iL(),!this.activeServiceWorker)return;this.sender=new iN(this.activeServiceWorker);let e=await this.sender._send("ping",{},800);e&&e[0]?.fulfilled&&e[0]?.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(this.sender&&this.activeServiceWorker&&(navigator?.serviceWorker?.controller||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;return await this._withRetries(async e=>{await iH(e,iw,"1"),await iW(e,iw)}),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(r=>iH(r,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>ij(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>iW(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>new iF(ix(e,!1).getAll()).toPromise());if(!e||0!==this.pendingWrites)return[];let t=[],r=new Set;if(0!==e.length)for(let{fbase_key:i,value:n}of e)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(n)&&(this.notifyListeners(i,n),t.push(i));for(let e of Object.keys(this.localCache))this.localCache[e]&&!r.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let r=this.listeners[e];if(r)for(let e of Array.from(r))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}function iz(e,t){return e5(e,"POST","/v2/accounts/mfaSignIn:start",e4(e,t))}iB.type="LOCAL";let iq=tJ("rcb"),i$=new eZ(3e4,6e4);class iG{constructor(){this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!iO().grecaptcha?.render}load(e,t=""){var r;return(eK((r=t).length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(r),e,"argument-error"),this.shouldResolveImmediately(t)&&tr(iO().grecaptcha))?Promise.resolve(iO().grecaptcha):new Promise((r,i)=>{let n=iO().setTimeout(()=>{i(eB(e,"network-request-failed"))},i$.get());iO()[iq]=()=>{iO().clearTimeout(n),delete iO()[iq];let s=iO().grecaptcha;if(!s||!tr(s))return void i(eB(e,"internal-error"));let a=s.render;s.render=(e,t)=>{let r=a(e,t);return this.counter++,r},this.hostLanguage=t,r(s)},tK(`${tG.recaptchaV2Script}?${O({onload:iq,render:"explicit",hl:t})}`).catch(()=>{clearTimeout(n),i(eB(e,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){return!!iO().grecaptcha?.render&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}}class iK{async load(e){return new tY(e)}clearedOneInstance(){}}let iJ="recaptcha",iY={theme:"light",type:"image"};class iX{constructor(e,t){this.verificationId=e,this.onConfirmation=t}confirm(e){let t=rE._fromVerification(this.verificationId,e);return this.onConfirmation(t)}}async function iQ(e,t,r){if(ey(e.app))return Promise.reject(eq(e));let i=F(e);return new iX(await i1(i,t,F(r)),e=>rz(i,e))}async function iZ(e,t,r){let i=F(e);return await rj(!1,i,"phone"),new iX(await i1(i.auth,t,F(r)),e=>rq(i,e))}async function i0(e,t,r){let i=F(e);return ey(i.auth.app)?Promise.reject(eq(i.auth)):new iX(await i1(i.auth,t,F(r)),e=>r$(i,e))}async function i1(e,t,r){if(!e._getRecaptchaConfig())try{await t6(e)}catch(e){console.log("Failed to initialize reCAPTCHA Enterprise config. Triggering the reCAPTCHA v2 verification.")}try{let i;if(i="string"==typeof t?{phoneNumber:t}:t,"session"in i){let t=i.session;if("phoneNumber"in i){eK("enroll"===t.type,e,"internal-error");let n={idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:i.phoneNumber,clientType:"CLIENT_TYPE_WEB"}},s=async(e,t)=>{if(t.phoneEnrollmentInfo.captchaResponse===t0){eK(r?.type===iJ,e,"argument-error");let i=await i3(e,t,r);return iv(e,i)}return iv(e,t)}
1,a=t3(e,n,"mfaSmsEnrollment",s,"PHONE_PROVIDER");return(await a.catch(e=>Promise.reject(e))).phoneSessionInfo.sessionInfo}{eK("signin"===t.type,e,"internal-error");let n=i.multiFactorHint?.uid||i.multiFactorUid;eK(n,e,"missing-multi-factor-info");let s={mfaPendingCredential:t.credential,mfaEnrollmentId:n,phoneSignInInfo:{clientType:"CLIENT_TYPE_WEB"}},a=async(e,t)=>{if(t.phoneSignInInfo.captchaResponse===t0){eK(r?.type===iJ,e,"argument-error");let i=await i3(e,t,r);return iz(e,i)}return iz(e,t)},o=t3(e,s,"mfaSmsSignIn",a,"PHONE_PROVIDER");return(await o.catch(e=>Promise.reject(e))).phoneResponseInfo.sessionInfo}}{let t={phoneNumber:i.phoneNumber,clientType:"CLIENT_TYPE_WEB"},n=async(e,t)=>{if(t.captchaResponse===t0){eK(r?.type===iJ,e,"argument-error");let i=await i3(e,t,r);return rm(e,i)}return rm(e,t)},s=t3(e,t,"sendVerificationCode",n,"PHONE_PROVIDER");return(await s.catch(e=>Promise.reject(e))).sessionInfo}}finally{r?._reset()}}async function i2(e,t){let r=F(e);if(ey(r.auth.app))return Promise.reject(eq(r.auth));await rH(r,t)}async function i3(e,t,r){eK(r.type===iJ,e,"argument-error");let i=await r.verify();eK("string"==typeof i,e,"argument-error");let n={...t};if("phoneEnrollmentInfo"in n){let e=n.phoneEnrollmentInfo.phoneNumber,t=n.phoneEnrollmentInfo.captchaResponse,r=n.phoneEnrollmentInfo.clientType,s=n.phoneEnrollmentInfo.recaptchaVersion;return Object.assign(n,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:i,captchaResponse:t,clientType:r,recaptchaVersion:s}}),n}if(!("phoneSignInInfo"in n))return Object.assign(n,{recaptchaToken:i}),n;{let e=n.phoneSignInInfo.captchaResponse,t=n.phoneSignInInfo.clientType,r=n.phoneSignInInfo.recaptchaVersion;return Object.assign(n,{phoneSignInInfo:{recaptchaToken:i,captchaResponse:e,clientType:t,recaptchaVersion:r}}),n}}class i6{constructor(e){this.providerId=i6.PROVIDER_ID,this.auth=function(e){return F(e)}(e)}verifyPhoneNumber(e,t){return i1(this.auth,e,F(t))}static credential(e,t){return rE._fromVerification(e,t)}static credentialFromResult(e){return i6.credentialFromTaggedObject(e)}static credentialFromError(e){return i6.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:t,temporaryProof:r}=e;return t&&r?rE._fromTokenResponse(t,r):null}}function i4(e,t){return t?tR(t):(eK(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}i6.PROVIDER_ID="phone",i6.PHONE_SIGN_IN_METHOD="phone";class i5 extends t7{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return rp(e,this._buildIdpRequest())}_linkToIdToken(e,t){return rp(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return rp(e,this._buildIdpRequest())}_buildIdpRequest(e){let t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function i8(e){return rB(e.auth,new i5(e),e.bypassAuthState)}function i9(e){let{auth:t,user:r}=e;return eK(r,t,"internal-error"),rW(r,new i5(e),e.bypassAuthState)}async function i7(e){let{auth:t,user:r}=e;return eK(r,t,"internal-error"),rH(r,new i5(e),e.bypassAuthState)}class ne{constructor(e,t,r,i,n=!1){this.auth=e,this.resolver=r,this.user=i,this.bypassAuthState=n,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(e){this.reject(e)}})}async onAuthEvent(e){let{urlResponse:t,sessionId:r,postBody:i,tenantId:n,error:s,type:a}=e;if(s)return void this.reject(s);let o={auth:this.auth,requestUri:t,sessionId:r,tenantId:n||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(a)(o))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return i8;case"linkViaPopup":case"linkViaRedirect":return i7;case"reauthViaPopup":case"reauthViaRedirect":return i9;default:eW(this.auth,"internal-error")}}resolve(e){var t,r;t=this.pendingPromise,r="Pending promise was never set",t||eJ(r),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){var t,r;t=this.pendingPromise,r="Pending promise was never set",t||eJ(r),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}
1let nt=new eZ(2e3,1e4);async function nr(e,t,r){if(ey(e.app))return Promise.reject(eB(e,"operation-not-supported-in-this-environment"));let i=F(e);e$(e,t,rT);let n=i4(i,r);return new ns(i,"signInViaPopup",t,n).executeNotNull()}async function ni(e,t,r){let i=F(e);if(ey(i.auth.app))return Promise.reject(eB(i.auth,"operation-not-supported-in-this-environment"));e$(i.auth,t,rT);let n=i4(i.auth,r);return new ns(i.auth,"reauthViaPopup",t,n,i).executeNotNull()}async function nn(e,t,r){let i=F(e);e$(i.auth,t,rT);let n=i4(i.auth,r);return new ns(i.auth,"linkViaPopup",t,n,i).executeNotNull()}class ns extends ne{constructor(e,t,r,i,n){super(e,t,i,n),this.provider=r,this.authWindow=null,this.pollId=null,ns.currentPopupAction&&ns.currentPopupAction.cancel(),ns.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return eK(e,this.auth,"internal-error"),e}async onExecution(){var e,t;e=1===this.filter.length,t="Popup operations only handle one event",e||eJ(t);let r=iP();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],r),this.authWindow.associatedEvent=r,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(eB(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){return this.authWindow?.associatedEvent||null}cancel(){this.reject(eB(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,ns.currentPopupAction=null}pollUserCancellation(){let e=()=>{if(this.authWindow?.window?.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(eB(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,nt.get())};e()}}ns.currentPopupAction=null;let na=new Map;class no extends ne{constructor(e,t,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,r),this.eventId=null}async execute(){let e=na.get(this.auth._key());if(!e){try{let t=await nc(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}na.set(this.auth._key(),e)}return this.bypassAuthState||na.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("unknown"===e.type)return void this.resolve(null);if(e.eventId){let t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function nc(e,t){let r=nd(t),i=nh(e);if(!await i._isAvailable())return!1;let n=await i._get(r)==="true";return await i._remove(r),n}async function nl(e,t){return nh(e)._set(nd(t),"true")}function nu(e,t){na.set(e._key(),t)}function nh(e){return tR(e._redirectPersistence)}function nd(e){return tC("pendingRedirect",e.config.apiKey,e.name)}async function np(e,t,r){if(ey(e.app))return Promise.reject(eq(e));let i=F(e);e$(e,t,rT),await i._initializationPromise;let n=i4(i,r);return await nl(n,i),n._openRedirect(i,t,"signInViaRedirect")}async function nf(e,t,r){let i=F(e);if(e$(i.auth,t,rT),ey(i.auth.app))return Promise.reject(eq(i.auth));await i.auth._initializationPromise;let n=i4(i.auth,r);await nl(n,i.auth);let s=await n_(i);return n._openRedirect(i.auth,t,"reauthViaRedirect",s)}async function nm(e,t,r){let i=F(e);e$(i.auth,t,rT),await i.auth._initializationPromise;let n=i4(i.auth,r);await rj(!1,i,t.providerId),await nl(n,i.auth);let s=await n_(i);return n._openRedirect(i.auth,t,"linkViaRedirect",s)}async function ng(e,t){return await F(e)._initializationPromise,nI(e,t,!1)}async function nI(e,t,r=!1){if(ey(e.app))return Promise.reject(eq(e));let i=F(e),n=i4(i,t),s=new no(i,n,r),a=await s.execute();return a&&!r&&(delete a.user._redirectEventId,await i._persistUserIfCurrent(a.user),await i._setRedirectUser(null,t)),a}async function n_(e){let t=iP(`${e.uid}:::`);return e._redirectEventId=t,await e.auth._setRedirectUser(e),await e.auth._persistUserIfCurrent(e),t}class nv{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=
1Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(e,r)&&(t=!0,this.sendToConsumer(e,r),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return ny(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){if(e.error&&!ny(e)){let r=e.error.code?.split("auth/")[1]||"internal-error";t.onError(eB(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let r=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&r}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(nE(e))}saveEventToCache(e){this.cachedEventUids.add(nE(e)),this.lastProcessedEventTime=Date.now()}}function nE(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function ny({type:e,error:t}){return"unknown"===e&&t?.code==="auth/no-auth-event"}async function nw(e,t={}){return e5(e,"GET","/v1/projects",t)}let nT=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,nb=/^https?/;async function nS(e){if(e.config.emulator)return;let{authorizedDomains:t}=await nw(e);for(let e of t)try{if(function(e){let t=eY(),{protocol:r,hostname:i}=new URL(t);if(e.startsWith("chrome-extension://")){let n=new URL(e);return""===n.hostname&&""===i?"chrome-extension:"===r&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===r&&n.hostname===i}if(!nb.test(r))return!1;if(nT.test(e))return i===e;let n=e.replace(/\./g,"\\.");return RegExp("^(.+\\."+n+"|"+n+")$","i").test(i)}(e))return}catch{}eW(e,"unauthorized-domain")}let nA=new eZ(3e4,6e4);function nR(){let e=iO().___jsl;if(e?.H){for(let t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let t=0;t<e.CP.length;t++)e.CP[t]=null}}let nk=null,nC=new eZ(5e3,15e3),nP={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},nN=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);async function nO(e){let t,r,i,n,s,a=await (nk=nk||new Promise((t,r)=>{function i(){nR(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{nR(),r(eB(e,"network-request-failed"))},timeout:nA.get()})}if(iO().gapi?.iframes?.Iframe)t(gapi.iframes.getContext());else if(iO().gapi?.load)i();else{let t=tJ("iframefcb");return iO()[t]=()=>{gapi.load?i():r(eB(e,"network-request-failed"))},tK(`${tG.gapiScript}?onload=${t}`).catch(e=>r(e))}}).catch(e=>{throw nk=null,e})),o=iO().gapi;return eK(o,e,"internal-error"),a.open({where:document.body,url:(eK((t=e.config).authDomain,e,"auth-domain-config-required"),r=t.emulator?e0(t,"emulator/auth/iframe"):`https://${e.config.authDomain}/__/auth/iframe`,i={apiKey:t.apiKey,appName:e.name,v:eb},(n=nN.get(e.config.apiHost))&&(i.eid=n),(s=e._getFrameworks()).length&&(i.fw=s.join(",")),`${r}?${O(i).slice(1)}`),messageHandlersFilter:o.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:nP,dontclear:!0},t=>new Promise(async(r,i)=>{await t.restyle({setHideOnLeave:!1});let n=eB(e,"network-request-failed"),s=iO().setTimeout(()=>{i(n)},nC.get());function a(){iO().clearTimeout(s),r(t)}t.ping(a).then(a,()=>{i(n)})}))}let nD={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class nL{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}let nM=encodeURIComponent("fac");async function nU(e,t,r,i,n,s){eK(e.config.authDomain,e,"auth-domain-config-required"),eK(e.config.apiKey,e,"invali
1d-api-key");let a={apiKey:e.config.apiKey,appName:e.name,authType:r,redirectUrl:i,v:eb,eventId:n};if(t instanceof rT)for(let[r,i]of(t.setDefaultLanguage(e.languageCode),a.providerId=t.providerId||"",C(t.getCustomParameters())||(a.customParameters=JSON.stringify(t.getCustomParameters())),Object.entries(s||{})))a[r]=i;if(t instanceof rb){let e=t.getScopes().filter(e=>""!==e);e.length>0&&(a.scopes=e.join(","))}for(let t of(e.tenantId&&(a.tid=e.tenantId),Object.keys(a)))void 0===a[t]&&delete a[t];let o=await e._getAppCheckToken(),c=o?`#${nM}=${encodeURIComponent(o)}`:"";return`${function({config:e}){return e.emulator?e0(e,"emulator/auth/handler"):`https://${e.authDomain}/__/auth/handler`}(e)}?${O(a).slice(1)}${c}`}let nV="webStorageSupport",nF=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=ik,this._completeRedirectFn=nI,this._overrideRedirectResult=nu}async _openPopup(e,t,r,i){var n,s;n=this.eventManagers[e._key()]?.manager,s="_initialize() not called before _openPopup()",n||eJ(s);let a=await nU(e,t,r,eY(),i);return function(e,t,r,i=500,n=600){let s=Math.max((window.screen.availHeight-n)/2,0).toString(),a=Math.max((window.screen.availWidth-i)/2,0).toString(),o="",c={...nD,width:i.toString(),height:n.toString(),top:s,left:a},l=g().toLowerCase();r&&(o=tL(l)?"_blank":r),tO(l)&&(t=t||"http://localhost",c.scrollbars="yes");let u=Object.entries(c).reduce((e,[t,r])=>`${e}${t}=${r},`,"");if(function(e=g()){return tx(e)&&!!window.navigator?.standalone}(l)&&"_self"!==o){var h,d;let e,r;return h=t||"",d=o,(e=document.createElement("a")).href=h,e.target=d,(r=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),e.dispatchEvent(r),new nL(null)}let p=window.open(t||"",o,u);eK(p,e,"popup-blocked");try{p.focus()}catch(e){}return new nL(p)}(e,a,iP())}
1async _openRedirect(e,t,r,i){var n;return await this._originValidation(e),n=await nU(e,t,r,eY(),i),iO().location.href=n,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){var r;let{manager:e,promise:i}=this.eventManagers[t];return e?Promise.resolve(e):(r="If manager is not set, promise should be",i||eJ(r),i)}let i=this.initAndGetManager(e);return this.eventManagers[t]={promise:i},i.catch(()=>{delete this.eventManagers[t]}),i}async initAndGetManager(e){let t=await nO(e),r=new nv(e);return t.register("authEvent",t=>(eK(t?.authEvent,e,"invalid-auth-event"),{status:r.onEvent(t.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=t,r}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(nV,{type:nV},r=>{let i=r?.[0]?.[nV];void 0!==i&&t(!!i),eW(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=nS(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return tH()||tD()||tx()}};class nx{constructor(e){this.factorId=e}_process(e,t,r){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,r);case"signin":return this._finalizeSignIn(e,t.credential);default:return eJ("unexpected MultiFactorSessionType")}}}class nH extends nx{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new nH(e)}_finalizeEnroll(e,t,r){return e5(e,"POST","/v2/accounts/mfaEnrollment:finalize",e4(e,{idToken:t,displayName:r,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn(e,t){return e5(e,"POST","/v2/accounts/mfaSignIn:finalize",e4(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}}class nj{static assertion(e){return nH._fromCredential(e)}}nj.FACTOR_ID="phone";class nW{static assertionForEnrollment(e,t){return nB._fromSecret(e,t)}static assertionForSignIn(e,t){return nB._fromEnrollmentId(e,t)}static async generateSecret(e){var t;eK(void 0!==e.user?.auth,"internal-error");let r=await e5(t=e.user.auth,"POST","/v2/accounts/mfaEnrollment:start",e4(t,{idToken:e.credential,totpEnrollmentInfo:{}}));return nz._fromStartTotpMfaEnrollmentResponse(r,e.user.auth)}}nW.FACTOR_ID="totp";class nB extends nx{constructor(e,t,r){super("totp"),this.otp=e,this.enrollmentId=t,this.secret=r}static _fromSecret(e,t){return new nB(t,void 0,e)}static _fromEnrollmentId(e,t){return new nB(t,e)}async _finalizeEnroll(e,t,r){return eK(void 0!==this.secret,e,"argument-error"),e5(e,"POST","/v2/accounts/mfaEnrollment:finalize",e4(e,{idToken:t,displayName:r,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}))}async _finalizeSignIn(e,t){eK(void 0!==this.enrollmentId&&void 0!==this.otp,e,"argument-error");let r={verificationCode:this.otp};return e5(e,"POST","/v2/accounts/mfaSignIn:finalize",e4(e,{mfaPendingCredential:t,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:r}))}}class nz{constructor(e,t,r,i,n,s,a){this.sessionInfo=s,this.auth=a,this.secretKey=e,this.hashingAlgorithm=t,this.codeLength=r,this.codeIntervalSeconds=i,this.enrollmentCompletionDeadline=n}static _fromStartTotpMfaEnrollmentResponse(e,t){return new nz(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,t)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,t){let r=!1;return(nq(e)||nq(t))&&(r=!0),r&&(nq(e)&&(e=this.auth.currentUser?.email||"unknownuser"),nq(t)&&(t=this.auth.name)),`otpauth://totp/${t}:${e}?secret=${this.secretKey}&issuer=${t}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}}function nq(e){return void 0===e||e?.length===0}var n$,nG,nK,nJ="@firebase/auth",nY="1.13.2";class nX{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){return this.assertAuthConfigured(),this.auth.currentUser?.uid||null}async getToken(e){return(this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser)?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e(t?.stsTokenManager.accessToken||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){eK(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let nQ=f("authIdTokenMaxAge")||300,nZ=null;tG={loadJS:e=>
1new Promise((t,r)=>{let i=document.createElement("script");i.setAttribute("src",e),i.onload=t,i.onerror=e=>{let t=eB("internal-error");t.customData=e,r(t)},i.type="text/javascript",i.charset="UTF-8",(document.getElementsByTagName("head")?.[0]??document).appendChild(i)}),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="},nG="Browser",ev(new j("auth",(e,{options:t})=>{let r,i,n=e.getProvider("app").getImmediate(),s=e.getProvider("heartbeat"),a=e.getProvider("app-check-internal"),{apiKey:o,authDomain:c}=n.options;eK(o&&!o.includes(":"),"invalid-api-key",{appName:n.name});let l=new tq(n,s,a,{apiKey:o,authDomain:c,clientPlatform:nG,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:tj(nG)});return i=(Array.isArray(r=t?.persistence||[])?r:[r]).map(tR),t?.errorMap&&l._updateErrorMap(t.errorMap),l._initializeWithPersistence(i,t?.popupRedirectResolver),l},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,r)=>{e.getProvider("auth-internal").initialize()})),ev(new j("auth-internal",e=>new nX(F(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),eR(nJ,nY,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(nG)),eR(nJ,nY,"esm2020"),e.s(["$",0,rP,"A",0,{EMAIL_SIGNIN:"EMAIL_SIGNIN",PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:"REVERT_SECOND_FACTOR_ADDITION",VERIFY_AND_CHANGE_EMAIL:"VERIFY_AND_CHANGE_EMAIL",VERIFY_EMAIL:"VERIFY_EMAIL"},"B",0,function(e){F(e).useDeviceLanguage()},"C",0,function(e,t){return F(e).updateCurrentUser(t)},"D",0,function(e){return F(e).signOut()},"E",0,function(e,t){return F(e).revokeAccessToken(t)},"F",0,{PHONE:"phone",TOTP:"totp"},"G",0,ig,"H",0,function
vendor: 12,062 bytes, line 1
1(){return{"admin-restricted-operation":"This operation is restricted to administrators only.","argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-change-needs-verification":"Multi-factor users must always have a verified email.","email-already-in-use":"The email address is already in use by another account.","emulator-config-failed":'Auth instance has already been used to make a network call. Auth can no longer be configured to use the emulator. Try calling "connectAuthEmulator()" sooner.',"expired-action-code":"The action code has expired.","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal AuthError has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registered for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal AuthError has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure to use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-dynamic-link-domain":"The provided dynamic link domain is not configured or authorized for the current project.","invalid-email":"The email address is badly formatted.","invalid-emulator-scheme":"Emulator URL must start with a valid scheme (http:// or https://).","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is incorrect, malformed or has expired.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-multi-factor-session":"The request does not contain a valid proof of first factor successful sign-in.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-provider-id":"The specified provider ID is invalid.","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","invalid-tenant-id":"The Auth instance's tenant ID is invalid.","login-blocked":"Login blocked by user-provided method: {$originalMessage}","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal AuthError has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-or-invalid-nonce":"The request does not contain a valid nonce. This can occur if the SHA-256 hash of the provided raw nonce does not match the hashed nonce in the ID token payload.","missing-password":"A non-empty password must be provided","missing-multi-factor-info":"No second factor identifier is provided.","missing-multi-factor-session":"The request is missing proof of first factor successful sign-in.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","multi-factor-info-not-found":"The user does not have a second factor matching the identifier provided.","multi-factor-auth-required":"Proof of ownership of a second factor is required to complete sign-in.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network AuthError (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal AuthError has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.","rejected-credential":"The request contains malformed or mismatching credentials.","second-factor-already-in-use":"The second factor is already enrolled on this account.","maximum-second-factor-count-exceeded":"The maximum allowed number of second factors on a user has been exceeded.","tenant-id-mismatch":"The provided tenant ID does not match the Auth instance's tenant ID",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted.  Please whitelist the domain in the Firebase console.","unsupported-first-factor":"Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","unsupported-tenant-operation":"This operation is not supported in a multi-tenant context.","unverified-email":"The operation requires a verified email.","user-cancelled":"The user did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled.","already-initialized":"initializeAuth() has already been called with different options. To avoid this error, call initializeAuth() with the same options as when it was originally called, or call getAuth() to return the already initialized instance.","missing-recaptcha-token":"The reCAPTCHA token is missing when sending request to the backend.","invalid-recaptcha-token":"The reCAPTCHA token is invalid when sending request to the backend.","invalid-recaptcha-action":"The reCAPTCHA action is invalid when sending request to the backend.","recaptcha-not-enabled":"reCAPTCHA Enterprise integration is not enabled for this project.","missing-client-type":"The reCAPTCHA client type is missing when sending request to the backend.","missing-recaptcha-version":"The reCAPTCHA version is missing when sending request to the backend.","invalid-req-type":"Invalid request parameters.","invalid-recaptcha-version":"The reCAPTCHA version is invalid when sending request to the backend.","unsupported-password-policy-schema-version":"The password policy received from the backend uses a schema version that is not supported by this version of the Firebase SDK.","password-does-not-meet-requirements":"The password does not meet the requirements.","invalid-hosting-link-domain":"The provided Hosting link domain is not configured in Firebase Hosting or is not owned by the current project. This cannot be a default Hosting domain (`web.app` or `firebaseapp.com`)."}},
1"I",0,eF,"J",0,{ADMIN_ONLY_OPERATION:"auth/admin-restricted-operation",ARGUMENT_ERROR:"auth/argument-error",APP_NOT_AUTHORIZED:"auth/app-not-authorized",APP_NOT_INSTALLED:"auth/app-not-installed",CAPTCHA_CHECK_FAILED:"auth/captcha-check-failed",CODE_EXPIRED:"auth/code-expired",CORDOVA_NOT_READY:"auth/cordova-not-ready",CORS_UNSUPPORTED:"auth/cors-unsupported",CREDENTIAL_ALREADY_IN_USE:"auth/credential-already-in-use",CREDENTIAL_MISMATCH:"auth/custom-token-mismatch",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"auth/requires-recent-login",DEPENDENT_SDK_INIT_BEFORE_AUTH:"auth/dependent-sdk-initialized-before-auth",DYNAMIC_LINK_NOT_ACTIVATED:"auth/dynamic-link-not-activated",EMAIL_CHANGE_NEEDS_VERIFICATION:"auth/email-change-needs-verification",EMAIL_EXISTS:"auth/email-already-in-use",EMULATOR_CONFIG_FAILED:"auth/emulator-config-failed",EXPIRED_OOB_CODE:"auth/expired-action-code",EXPIRED_POPUP_REQUEST:"auth/cancelled-popup-request",INTERNAL_ERROR:"auth/internal-error",INVALID_API_KEY:"auth/invalid-api-key",INVALID_APP_CREDENTIAL:"auth/invalid-app-credential",INVALID_APP_ID:"auth/invalid-app-id",INVALID_AUTH:"auth/invalid-user-token",INVALID_AUTH_EVENT:"auth/invalid-auth-event",INVALID_CERT_HASH:"auth/invalid-cert-hash",INVALID_CODE:"auth/invalid-verification-code",INVALID_CONTINUE_URI:"auth/invalid-continue-uri",INVALID_CORDOVA_CONFIGURATION:"auth/invalid-cordova-configuration",INVALID_CUSTOM_TOKEN:"auth/invalid-custom-token",INVALID_DYNAMIC_LINK_DOMAIN:"auth/invalid-dynamic-link-domain",INVALID_EMAIL:"auth/invalid-email",INVALID_EMULATOR_SCHEME:"auth/invalid-emulator-scheme",INVALID_IDP_RESPONSE:"auth/invalid-credential",INVALID_LOGIN_CREDENTIALS:"auth/invalid-credential",INVALID_MESSAGE_PAYLOAD:"auth/invalid-message-payload",INVALID_MFA_SESSION:"auth/invalid-multi-factor-session",INVALID_OAUTH_CLIENT_ID:"auth/invalid-oauth-client-id",INVALID_OAUTH_PROVIDER:"auth/invalid-oauth-provider",INVALID_OOB_CODE:"auth/invalid-action-code",INVALID_ORIGIN:"auth/unauthorized-domain",INVALID_PASSWORD:"auth/wrong-password",INVALID_PERSISTENCE:"auth/invalid-persistence-type",INVALID_PHONE_NUMBER:"auth/invalid-phone-number",INVALID_PROVIDER_ID:"auth/invalid-provider-id",INVALID_RECIPIENT_EMAIL:"auth/invalid-recipient-email",INVALID_SENDER:"auth/invalid-sender",INVALID_SESSION_INFO:"auth/invalid-verification-id",INVALID_TENANT_ID:"auth/invalid-tenant-id",MFA_INFO_NOT_FOUND:"auth/multi-factor-info-not-found",MFA_REQUIRED:"auth/multi-factor-auth-required",MISSING_ANDROID_PACKAGE_NAME:"auth/missing-android-pkg-name",MISSING_APP_CREDENTIAL:"auth/missing-app-credential",MISSING_AUTH_DOMAIN:"auth/auth-domain-config-required",MISSING_CODE:"auth/missing-verification-code",MISSING_CONTINUE_URI:"auth/missing-continue-uri",MISSING_IFRAME_START:"auth/missing-iframe-start",MISSING_IOS_BUNDLE_ID:"auth/missing-ios-bundle-id",MISSING_OR_INVALID_
1NONCE:"auth/missing-or-invalid-nonce",MISSING_MFA_INFO:"auth/missing-multi-factor-info",MISSING_MFA_SESSION:"auth/missing-multi-factor-session",MISSING_PHONE_NUMBER:"auth/missing-phone-number",MISSING_PASSWORD:"auth/missing-password",MISSING_SESSION_INFO:"auth/missing-verification-id",MODULE_DESTROYED:"auth/app-deleted",NEED_CONFIRMATION:"auth/account-exists-with-different-credential",NETWORK_REQUEST_FAILED:"auth/network-request-failed",NULL_USER:"auth/null-user",NO_AUTH_EVENT:"auth/no-auth-event",NO_SUCH_PROVIDER:"auth/no-such-provider",OPERATION_NOT_ALLOWED:"auth/operation-not-allowed",OPERATION_NOT_SUPPORTED:"auth/operation-not-supported-in-this-environment",POPUP_BLOCKED:"auth/popup-blocked",POPUP_CLOSED_BY_USER:"auth/popup-closed-by-user",PROVIDER_ALREADY_LINKED:"auth/provider-already-linked",QUOTA_EXCEEDED:"auth/quota-exceeded",REDIRECT_CANCELLED_BY_USER:"auth/redirect-cancelled-by-user",REDIRECT_OPERATION_PENDING:"auth/redirect-operation-pending",REJECTED_CREDENTIAL:"auth/rejected-credential",SECOND_FACTOR_ALREADY_ENROLLED:"auth/second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"auth/maximum-second-factor-count-exceeded",TENANT_ID_MISMATCH:"auth/tenant-id-mismatch",TIMEOUT:"auth/timeout",TOKEN_EXPIRED:"auth/user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"auth/too-many-requests",UNAUTHORIZED_DOMAIN:"auth/unauthorized-continue-uri",UNSUPPORTED_FIRST_FACTOR:"auth/unsupported-first-factor",UNSUPPORTED_PERSISTENCE:"auth/unsupported-persistence-type",UNSUPPORTED_TENANT_OPERATION:"auth/unsupported-tenant-operation",UNVERIFIED_EMAIL:"auth/unverified-email",USER_CANCELLED:"auth/user-cancelled",USER_DELETED:"auth/user-not-found",USER_DISABLED:"auth/user-disabled",USER_MISMATCH:"auth/user-mismatch",USER_SIGNED_OUT:"auth/user-signed-out",WEAK_PASSWORD:"auth/weak-password",WEB_STORAGE_UNSUPPORTED:"auth/web-storage-unsupported",ALREADY_INITIALIZED:"auth/already-initialized",RECAPTCHA_NOT_ENABLED:"auth/recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"auth/missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"auth/invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"auth/invalid-recaptcha-action",MISSING_CLIENT_TYPE:"auth/missing-client-type",MISSING_RECAPTCHA_VERSION:"auth/missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"auth/invalid-recaptcha-version",INVALID_REQ_TYPE:"auth/invalid-req-type",INVALID_HOSTING_LINK_DOMAIN:"auth/invalid-hosting-link-domain"},"K",0,t4,"L",0,t5,"M",0,t7,"N",0,rd,"O",0,{LINK:"link",REAUTHENTICATE:"reauthenticate",SIGN_IN:"signIn"},"P",0,i6,"Q",0,rf,"R",0,class{constructor(e,t,r={...iY}){this.parameters=r,this.type=iJ,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=function(e){return F(e)}(e),this.isInvisible="invisible"===this.parameters.size,eK("u">typeof document,this.auth,"operation-not-supported-in-this-environment");const i="string"==typeof t?document.getElementById(t):t;eK(i,this.auth,"argument-error"),this.container=i,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new iK:new iG,this.validateStartingState()}async verify(){this.assertNotDestroyed();let e=await this.render(),t=this.getAssertedRecaptcha(),r=t.getResponse(e);return r||new Promise(r=>{let i=e=>{e&&(this.tokenChangeListeners.delete(i),r(e))};this.tokenChangeListeners.add(i),this.isInvisible&&t.execute(e)})}render(){try{this.assertNotDestroyed()}catch(e){return Promise.reject(e)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch(e=>{throw this.renderPromise=null,e})),this.renderPromise}_reset(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach(e=>{this.container.removeChild(e)})}validateStartingState(){eK(!this.parameters.sitekey,this.auth,"argument-error"),eK(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),eK("u">typeof document,this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return t=>
1{if(this.tokenChangeListeners.forEach(e=>e(t)),"function"==typeof e)e(t);else if("string"==typeof e){let r=iO()[e];"function"==typeof r&&r(t)}}}assertNotDestroyed(){eK(!this.destroyed,this.auth,"internal-error")}async makeRenderPromise(){if(await this.init(),!this.widgetId){let e=this.container;if(!this.isInvisible){let t=document.createElement("div");e.appendChild(t),e=t}this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)}return this.widgetId}async init(){let e;eK(eX()&&!iD(),this.auth,"internal-error"),await (e=null,new Promise(t=>{"complete"===document.readyState?t():(e=()=>t(),window.addEventListener("load",e))}).catch(t=>{throw e&&window.removeEventListener("load",e),t})),this.recaptcha=await this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);let t=await ts(this.auth);eK(t,this.auth,"internal-error"),this.parameters.sitekey=t}getAssertedRecaptcha(){return eK(this.recaptcha,this.auth,"internal-error"),this.recaptcha}},"S",0,{EMAIL_LINK:"emailLink",EMAIL_PASSWORD:"password",FACEBOOK:"facebook.com",GITHUB:"github.com",GOOGLE:"google.com",PHONE:"phone",TWITTER:"twitter.com"},"T",0,nW,"U",0,rE,"V",0,tk,"W",0,rw,"X",0,rA,"Y",0,rR,"Z",0,rk,"_",0,rS,"a",0,iR,"a0",0,rN,"a1",0,rM,"a2",0,rz,"a3",0,rq,"a4",0,r$,"a5",0,rK,"a6",0,r0,"a7",0,r1,"a8",0,r2,"a9",0,r3,"aa",0,r6,"ab",0,r4,"ac",0,function(e,t,r){return ey(e.app)?Promise.reject(eq(e)):rz(F(e),rw.credential(t,r)).catch(async t=>{throw"auth/password-does-not-meet-requirements"===t.code&&rZ(e),t})},"ad",0,r5,"ae",0,function(e,t){let r=ry.parseLink(t);return r?.operation==="EMAIL_SIGNIN"},"af",0,r8,"ag",0,r7,"ah",0,ie,"ai",0,it,"aj",0,ry,"ak",0,function(e){return ry.parseLink(e)},"al",0,ii,"am",0,function(e,t){let r=F(e);return ey(r.auth.app)?Promise.reject(eq(r.auth)):is(r,t,null)},"an",0,function(e,t){return is(F(e),null,t)},"ao",0,function(e,t=!1){return F(e).getIdToken(t)},"ap",0,th,"aq",0,rx,"ar",0,function(e){let{user:t,_tokenResponse:r}=e;return t.isAnonymous&&!r?{providerId:null,isNewUser:!1,profile:null}:function(e){if(!e)return null;let{providerId:t}=e,r=e.rawUserInfo?JSON.parse(e.rawUserInfo):{},i=e.isNewUser||"identitytoolkit#SignupNewUserResponse"===e.kind;if(!t&&e?.idToken){let t=tp(e.idToken)?.firebase?.sign_in_provider;if(t)return new ia(i,"anonymous"!==t&&"custom"!==t?t:null)}if(!t)return null;switch(t){case"facebook.com":return new ic(i,r);case"github.com":return new il(i,r);case"google.com":return new iu(i,r);case"twitter.com":return new ih(i,r,e.screenName||null);case"custom":case"anonymous":return new ia(i,null);default:return new ia(i,t,r)}}(r)},"as",0,tv,"at",0,function(e,t){let r=F(e);return eK(t.customData.operationType,r,"argument-error"),eK(t.customData._serverResponse?.mfaPendingCredential,r,"argument-error"),i_._fromError(r,t)},"au",0,function(e){let t=F(e);return iy.has(t)||iy.set(t,iE._fromUser(t)),iy.get(t)},"b",0,ib,"c",0,ik,"d",0,nr,"e",0,nn,"f",0,ni,"g",0,function(e,t,r){return np(e,t,r)},"h",0,function(e,t,r){return nm(e,t,r)},"i",0,iB,"j",0,function(e,t,r){return nf(e,t,r)},"k",0,ng,"l",0,iZ,"m",0,nF,"n",0,nj,"o",0,nz,"p",0,function(e=eA()){let t=eE(e,"auth");if(t.isInitialized())return t.getImmediate();let r=t4(e,{popupRedirectResolver:nF,persistence:[iB,ib,ik]}),i=f("authTokenSyncURL");if(i&&"boolean"==typeof isSecureContext&&isSecureContext){let e=new URL(i,location.origin);if(location.origin===e.origin){let t,i=(t=e.toString(),async e=>{let r=e&&await e.getIdTokenResult(),i=r&&(new Date().getTime()-Date.parse(r.issuedAtTime))/1e3;if(i&&i>nQ)return;let n=r?.token;nZ!==n&&(nZ=n,await fetch(t,{method:n?"POST":"DELETE",headers:n?{Authorization:`Bearer ${n}`}:{}}))});im(r,i,()=>i(r.currentUser)),ip(r,e=>i(e))}}let n=d("auth");return n&&t5(r,`http://${n}`),r},"q",0,{FACEBOOK:"facebook.com",GITHUB:"github.com",GOOGLE:"google.com",PASSWORD:"password",PHONE:"phone",TWITTER:"twitter.com"},"r",0,i0,"s",0,iQ,"t",0,function(e,t){return F(e).setPersistence(t)},"u",0,i2,"v",0,function(e){return t6(e)},"w",0,id,"x",0,ip,"y",0,im,"z",0,function(e,t,r,i){return F(e).onAuthStateChanged(t,r,i)}],76494),e.s([],58556),e.s([],51718)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.