PageSourceSearch

https://shishi-bc69b.web.app/chunk-CC5VWTKN.js

js shishi-bc69b.web.app collected 2026-10-03 12:35:29 UTC 190,372 bytes, 21 lines download raw bytes

vendor: 9,806 bytes, lines 1-9
1var Uo=Object.create;var At=Object.defineProperty,Fo=Object.defineProperties,Vo=Object.getOwnPropertyDescriptor,Wo=Object.getOwnPropertyDescriptors,Ho=Object.getOwnPropertyNames,Tt=Object.getOwnPropertySymbols,Lr=Object.getPrototypeOf,yn=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable,Bo=Reflect.get;var Dr=(n,e,t)=>e in n?At(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,xr=(n,e)=>{for(var t in e||={})yn.call(e,t)&&Dr(n,t,e[t]);if(Tt)for(var t of Tt(e))Mr.call(e,t)&&Dr(n,t,e[t]);return n},Ur=(n,e)=>Fo(n,Wo(e));var ld=(n,e)=>{var t={};for(var i in n)yn.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&Tt)for(var i of Tt(n))e.indexOf(i)<0&&Mr.call(n,i)&&(t[i]=n[i]);return t};var ud=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),jo=(n,e)=>{for(var t in e)At(n,t,{get:e[t],enumerable:!0})},$o=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Ho(e))!yn.call(n,r)&&r!==t&&At(n,r,{get:()=>e[r],enumerable:!(i=Vo(e,r))||i.enumerable});return n};var dd=(n,e,t)=>(t=n!=null?Uo(Lr(n)):{},$o(e||!n||!n.__esModule?At(t,"default",{value:n,enumerable:!0}):t,n));var ge=(n,e,t)=>Bo(Lr(n),t,e);var a=(n,e,t)=>new Promise((i,r)=>{var s=l=>{try{c(t.next(l))}catch(u){r(u)}},o=l=>{try{c(t.throw(l))}catch(u){r(u)}},c=l=>l.done?i(l.value):Promise.resolve(l.value).then(s,o);c((t=t.apply(n,e)).next())});var Fr=()=>{};var wn={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"};var zo=function(n,e){if(!n)throw Go(e)},Go=function(n){return new Error("Firebase Database ("+wn.SDK_VERSION+") INTERNAL ASSERT FAILED: "+n)};var jr=function(n){let e=[],t=0;for(let i=0;i<n.length;i++){let r=n.charCodeAt(i);r<128?e[t++]=r:r<2048?(e[t++]=r>>6|192,e[t++]=r&63|128):(r&64512)===55296&&i+1<n.length&&(n.charCodeAt(i+1)&64512)===56320?(r=65536+((r&1023)<<10)+(n.charCodeAt(++i)&1023),e[t++]=r>>18|240,e[t++]=r>>12&63|128,e[t++]=r>>6&63|128,e[t++]=r&63|128):(e[t++]=r>>12|224,e[t++]=r>>6&63|128,e[t++]=r&63|128)}return e},qo=function(n){let e=[],t=0,i=0;for(;t<n.length;){let r=n[t++];if(r<128)e[i++]=String.fromCharCode(r);else if(r>191&&r<224){let s=n[t++];e[i++]=String.fromCharCode((r&31)<<6|s&63)}else if(r>239&&r<365){let s=n[t++],o=n[t++],c=n[t++],l=((r&7)<<18|(s&63)<<12|(o&63)<<6|c&63)-65536;e[i++]=String.fromCharCode(55296+(l>>10)),e[i++]=String.fromCharCode(56320+(l&1023))}else{let s=n[t++],o=n[t++];e[i++]=String.fromCharCode((r&15)<<12|(s&63)<<6|o&63)}}return e.join("")},$r={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:typeof atob=="function",encodeByteArray(n,e){if(!Array.isArray(n))throw Error("encodeByteArray takes an array as a parameter");this.init_();let t=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,i=[];for(let r=0;r<n.length;r+=3){let s=n[r],o=r+1<n.length,c=o?n[r+1]:0,l=r+2<n.length,u=l?n[r+2]:0,h=s>>2,d=(s&3)<<4|c>>4,p=(c&15)<<2|u>>6,m=u&63;l||(m=64,o||(p=64)),i.push(t[h],t[d],t[p],t[m])}return i.join("")},encodeString(n,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(n):this.encodeByteArray(jr(n),e)},decodeString(n,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(n):qo(this.decodeStringToByteArray(n,e))},decodeStringToByteArray(n,e){this.init_();let t=e?this.charToByteMapWebSafe_:this.charToByteMap_,i=[];for(let r=0;r<n.length;){let s=t[n.charAt(r++)],c=r<n.length?t[n.charAt(r)]:0;++r;let u=r<n.length?t[n.charAt(r)]:64;++r;let d=r<n.length?t[n.charAt(r)]:64;if(++r,s==null||c==null||u==null||d==null)throw new bn;let p=s<<2|c>>4;if(i.push(p),u!==64){let m=c<<4&240|u>>2;if(i.push(m),d!==64){let w=u<<6&192|d;i.push(w)}}}return i},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let n=0;n<this.ENCODED_VALS.length;n++)this.byteToCharMap_[n]=this.ENCODED_VALS.charAt(n),this.charToByteMap_[this.byteToCharMap_[n]]=n,this.byteToCharMapWebSafe_[n]=this.ENCODED_VALS_WEBSAFE.charAt(n),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[n]]=n,n>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(n)]=n,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(n)]=n)}}},bn=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}},Ko=function(n){let e=jr(n);return $r.encodeByteArray(e,!0)},Ge=function(n){return Ko(n).replace(/\./g,"")},_e=function(n){try{return $r.decodeString(n,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function md(n){return ke(void 0,n)}function ke(n,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:let t=e;return new Date(t.getTime());case Object:n===void 0&&(n={});break;case Array:n=[];break;default:return e}for(let t in e)!e.hasOwnProperty(t)||!Yo(t)||(n[t]=ke(n[t],e[t]));return n}function Yo(n){return n!=="__proto__"}function An(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}var Jo=()=>An().__FIREBASE_DEFAULTS__,Xo=()=>{if(typeof process>"u"||typeof process.env>"u")return;let n=process.env.__FIREBASE_DEFAULTS__;if(n)return JSON.parse(n)},Qo=()=>{if(typeof document>"u")return;let n;try{n=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(t){return}let e=n&&_e(n[1]);return e&&JSON.parse(e)},Pt=()=>{try{return Fr()||Jo()||Xo()||Qo()}catch(n){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${n}`);return}},Sn=n=>{var e,t;return(t=(e=Pt())===null||e===void 0?void 0:e.emulatorHosts)===null||t===void 0?void 0:t[n]},gd=n=>{let e=Sn(n);if(!e)return;let t=e.lastIndexOf(":");if(t<=0||t+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);let i=parseInt(e.substring(t+1),10);return e[0]==="["?[e.substring(1,t-1),i]:[e.substring(0,t),i]},Pn=()=>{var n;return(n=Pt())===null||n===void 0?void 0:n.config},Rn=n=>{var e;return(e=Pt())===null||e===void 0?void 0:e[`_${n}`]};var St=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,i)=>{t?this.reject(t):this.resolve(i),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(t):e(t,i))}}};function qe(n){try{return(n.startsWith("http://")||n.startsWith("https://")?new URL(n).hostname:n).endsWith(".cloudworkstations.dev")}catch(e){return!1}}function zr(n){return a(this,null,function*(){return(yield fetch(n,{credentials:"include"})).ok})}function _d(n,e){if(n.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let t={alg:"none",type:"JWT"},i=e||"demo-project",r=n.iat||0,s=n.sub||n.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");let o=Object.assign({iss:`https://securetoken.google.com/${i}`,aud:i,iat:r,exp:r+3600,auth_time:r,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},n);return[Ge(JSON.stringify(t)),Ge(JSON.stringify(o)),""].join(".")}var ze={};function Zo(){let n={prod:[],emulator:[]};for(let e of Object.keys(ze))ze[e]?n.emulator.push(e):n.prod.push(e);return n}function ea(n){let e=document.getElementById(n),t=!1;return e||(e=document.createElement("div"),e.setAttribute("id",n),t=!0),{created:t,element:e}}var Vr=!1;function Gr(n,e){if(typeof window>"u"||typeof document>"u"||!qe(window.location.host)||ze[n]===e||ze[n]||Vr)return;ze[n]=e;function t(p){return`__firebase__banner__${p}`}let i="__firebase__banner",s=Zo().prod.length>0;function o(){let p=document.getElementById(i);p&&p.remove()}function c(p){p.style.display="flex",p.style.background="#7faaf0",p.style.position="fixed",p.style.bottom="5px",p.style.left="5px",p.style.padding=".5em",p.style.borderRadius="5px",p.style.alignItems="center"}function l(p,m){p.setAttribute("width","24"),p.setAttribute("id",m),p.setAttribute("height","24"),p.setAttribute("viewBox","0 0 24 24"),p.setAttribute("fill","none"),p.style.marginLeft="-6px"}function u(){let p=document.createElement("span");return p.style.cursor="pointer",p.style.marginLeft="16px",p.style.fontSize="24px",p.innerHTML=" &times;",p.onclick=()=>{Vr=!0,o()},p}function h(p,m){p.setAttribute("id",m),p.innerText="Learn more",p.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",p.setAttribute("target","__blank"),p.style.paddingLeft="5px",p.style.textDecoration="underline"}function d(){let p=ea(i),m=t("text"),w=document.getElementById(m)||document.createElement("span"),H=t("learnmore"),te=document.getElementById(H)||document.createElement("a"),fe=t("preprendIcon"),pe=document.getElementById(fe)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(p.created){let me=p.element;c(me),h(te,H);let bt=u();l(pe,fe),me.append(pe,w,te,bt),document.body.appendChild(me)}s?(w.innerText="Preview backend disconnected.",pe.innerHTML=`<g clip-path="url(#clip0_6013_33858)">
2<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/>
3</g>
4<defs>
5<clipPath id="clip0_6013_33858">
6<rect width="24" height="24" fill="white"/>
7</clipPath>
8</defs>`):(pe.innerHTML=`<g clip-path="url(#clip0_6083_34804)">
9<path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 
912.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/>
10</g>
11<defs>
12<clipPath id="clip0_6083_34804">
13<rect width="24" height="24" fill="white"/>
14</clipPath>
15</defs>`,w.innerText="Preview backend running in this workspace."),w.setAttribute("id",m)}document.readyState==="loading"?window.addEventListener("DOMContentLoaded",d):d()}function b(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function qr(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(b())}function Cn(){var n;let e=(n=Pt())===null||n===void 0?void 0:n.forceEnvironment;if(e==="node")return!0;if(e==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch(t){return!1}}function Kr(){return typeof window<"u"||On()}function On(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function Yr(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function Rt(){let n=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof n=="object"&&n.id!==void 0}function Ke(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function Ct(){let n=b();return n.indexOf("MSIE ")>=0||n.indexOf("Trident/")>=0}function vd(){return wn.NODE_CLIENT===!0||wn.NODE_ADMIN===!0}function Ne(){try{return typeof indexedDB=="object"}catch(n){return!1}}function Jr(){return new Promise((n,e)=>{try{let t=!0,i="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(i);r.onsuccess=()=>{r.result.close(),t||self.indexedDB.deleteDatabase(i),n(!0)},r.onupgradeneeded=()=>{t=!1},r.onerror=()=>{var s;e(((s=r.error)===null||s===void 0?void 0:s.message)||"")}}catch(t){e(t)}})}var ta="FirebaseError",P=class n extends Error{constructor(e,t,i){super(t),this.code=e,this.customData=i,this.name=ta,Object.setPrototypeOf(this,n.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,D.prototype.create)}},D=class{constructor(e,t,i){this.service=e,this.serviceName=t,this.errors=i}create(e,...t){let i=t[0]||{},r=`${this.service}/${e}`,s=this.errors[e],o=s?na(s,i):"Error",c=`${this.serviceName}: ${o} (${r}).`;return new P(r,c,i)}};function na(n,e){return n.replace(ia,(t,i)=>{let r=e[i];return r!=null?String(r):`<${i}?>`})}var ia=/\{\$([^}]+)}/g;function Wr(n){return JSON.parse(n)}function Id(n){return JSON.stringify(n)}var Xr=function(n){let e={},t={},i={},r="";try{let s=n.split(".");e=Wr(_e(s[0])||""),t=Wr(_e(s[1])||""),r=s[2],i=t.d||{},delete t.d}catch(s){}return{header:e,claims:t,data:i,signature:r}};var yd=function(n){let e=Xr(n),t=e.claims;return!!t&&typeof t=="object"&&t.hasOwnProperty("iat")},Ed=function(n){let e=Xr(n).claims;return typeof e=="object"&&e.admin===!0};function kn(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function wd(n,e){if(Object.prototype.hasOwnProperty.call(n,e))return n[e]}function Qr(n){for(let e in n)if(Object.prototype.hasOwnProperty.call(n,e))return!1;return!0}function bd(n,e,t){let i={};for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[r]=e.call(t,n[r],r,n));return i}function ne(n,e){if(n===e)return!0;let t=Object.keys(n),i=Object.keys(e);for(let r of t){if(!i.includes(r))return!1;let s=n[r],o=e[r];if(Hr(s)&&Hr(o)){if(!ne(s,o))return!1}else if(s!==o)return!1}for(let r of i)if(!t.includes(r))return!1;return!0}function Hr(n){return n!==null&&typeof n=="object"}function ve(n){let e=[];
15for(let[t,i]of Object.entries(n))Array.isArray(i)?i.forEach(r=>{e.push(encodeURIComponent(t)+"="+encodeURIComponent(r))}):e.push(encodeURIComponent(t)+"="+encodeURIComponent(i));return e.length?"&"+e.join("&"):""}function ie(n){let e={};return n.replace(/^\?/,"").split("&").forEach(i=>{if(i){let[r,s]=i.split("=");e[decodeURIComponent(r)]=decodeURIComponent(s)}}),e}function De(n){let e=n.indexOf("?");if(!e)return"";let t=n.indexOf("#",e);return n.substring(e,t>0?t:void 0)}var Br=class{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=512/8,this.pad_[0]=128;for(let e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}reset(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0}compress_(e,t){t||(t=0);let i=this.W_;if(typeof e=="string")for(let d=0;d<16;d++)i[d]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(let d=0;d<16;d++)i[d]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(let d=16;d<80;d++){let p=i[d-3]^i[d-8]^i[d-14]^i[d-16];i[d]=(p<<1|p>>>31)&4294967295}let r=this.chain_[0],s=this.chain_[1],o=this.chain_[2],c=this.chain_[3],l=this.chain_[4],u,h;for(let d=0;d<80;d++){d<40?d<20?(u=c^s&(o^c),h=1518500249):(u=s^o^c,h=1859775393):d<60?(u=s&o|c&(s|o),h=2400959708):(u=s^o^c,h=3395469782);let p=(r<<5|r>>>27)+u+l+h+i[d]&4294967295;l=c,c=o,o=(s<<30|s>>>2)&4294967295,s=r,r=p}this.chain_[0]=this.chain_[0]+r&4294967295,this.chain_[1]=this.chain_[1]+s&4294967295,this.chain_[2]=this.chain_[2]+o&4294967295,this.chain_[3]=this.chain_[3]+c&4294967295,this.chain_[4]=this.chain_[4]+l&4294967295}update(e,t){if(e==null)return;t===void 0&&(t=e.length);let i=t-this.blockSize,r=0,s=this.buf_,o=this.inbuf_;for(;r<t;){if(o===0)for(;r<=i;)this.compress_(e,r),r+=this.blockSize;if(typeof e=="string"){for(;r<t;)if(s[o]=e.charCodeAt(r),++o,++r,o===this.blockSize){this.compress_(s),o=0;break}}else for(;r<t;)if(s[o]=e[r],++o,++r,o===this.blockSize){this.compress_(s),o=0;break}}this.inbuf_=o,this.total_+=t}digest(){let e=[],t=this.total_*8;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(let r=this.blockSize-1;r>=56;r--)this.buf_[r]=t&255,t/=256;this.compress_(this.buf_);let i=0;for(let r=0;r<5;r++)for(let s=24;s>=0;s-=8)e[i]=this.chain_[r]>>s&255,++i;return e}};function Ot(n,e){let t=new Tn(n,e);return t.subscribe.bind(t)}var Tn=class{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(i=>{this.error(i)})}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,i){let r;if(e===void 0&&t===void 0&&i===void 0)throw new Error("Missing Observer.");ra(e,["next","error","complete"])?r=e:r={next:e,error:t,complete:i},r.next===void 0&&(r.next=En),r.error===void 0&&(r.error=En),r.complete===void 0&&(r.complete=En);let s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(o){}}),this.observers.push(r),s}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&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(this.observers!==void 0&&this.observers[e]!==void 0)try{t(this.observers[e])}catch(i){typeof console<"u"&&console.error&&console.error(i)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function ra(n,e){if(typeof n!="object"||n===null)return!1;for(let t of e)if(t in n&&typeof n[t]=="function")return!0;return!1}function En(){}var Td=function(n,e,t,i){let r;if(i<e?r="at least "+e:i>t&&(r=t===0?"none":"no more than "+t),r){let s=n+" failed: Was called with "+i+(i===1?" argument.":" arguments.")+" Expects "+r+".";throw new Error(s)}};function Zr(n,e){return`${n} failed: ${e} argument `}function Ad(n,e,t,i){if(!(i&&!t)&&typeof t!="function")throw new Error(Zr(n,e)+"must be a valid function.")}function Sd(n,e,t,i){if(!(i&&!t)&&(typeof t!="object"||t===null))throw new Error(Zr(n,e)+"must be a valid context object.")}var Pd=function(n){let e=[],t=0;for(let i=0;i<n.length;i++){let r=n.charCodeAt(i);if(r>=55296&&r<=56319){let s=r-55296;i++,zo(i<n.length,"Surrogate pair missing trail surrogate.");let o=n.charCodeAt(i)-56320;r=65536+(s<<10)+o}r<128?e[t++]=r:r<2048?(e[t++]=r>>6|192,e[t++]=r&63|128):r<65536?(e[t++]=r>>12|224,e[t++]=r>>6&63|128,e[t++]=r&63|128):(e[t++]=r>>18|240,e[t++]=r>>12&63|128,e[t++]=r>>6&63|128,e[t++]=r&63|128)}return e},Rd=function(n){let e=0;for(let t=0;t<n.length;t++){let i=n.charCodeAt(t);
vendor: 11,213 bytes, line 15
15i<128?e++:i<2048?e+=2:i>=55296&&i<=56319?(e+=4,t++):e+=3}return e};var Cd=14400*1e3;function g(n){return n&&n._delegate?n._delegate:n}var O=class{constructor(e,t,i){this.name=e,this.instanceFactory=t,this.type=i,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}};var Ie="[DEFAULT]";var Nn=class{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 i=new St;if(this.instancesDeferred.set(t,i),this.isInitialized(t)||this.shouldAutoInitialize())try{let r=this.getOrInitializeService({instanceIdentifier:t});r&&i.resolve(r)}catch(r){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;let i=this.normalizeInstanceIdentifier(e?.identifier),r=(t=e?.optional)!==null&&t!==void 0?t:!1;if(this.isInitialized(i)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:i})}catch(s){if(r)return null;throw s}else{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(oa(e))try{this.getOrInitializeService({instanceIdentifier:Ie})}catch(t){}for(let[t,i]of this.instancesDeferred.entries()){let r=this.normalizeInstanceIdentifier(t);try{let s=this.getOrInitializeService({instanceIdentifier:r});i.resolve(s)}catch(s){}}}}clearInstance(e=Ie){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}delete(){return a(this,null,function*(){let e=Array.from(this.instances.values());yield Promise.all([...e.filter(t=>"INTERNAL"in t).map(t=>t.INTERNAL.delete()),...e.filter(t=>"_delete"in t).map(t=>t._delete())])})}isComponentSet(){return this.component!=null}isInitialized(e=Ie){return this.instances.has(e)}getOptions(e=Ie){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:t={}}=e,i=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(i))throw Error(`${this.name}(${i}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:i,options:t});for(let[s,o]of this.instancesDeferred.entries()){let c=this.normalizeInstanceIdentifier(s);i===c&&o.resolve(r)}return r}onInit(e,t){var i;let r=this.normalizeInstanceIdentifier(t),s=(i=this.onInitCallbacks.get(r))!==null&&i!==void 0?i:new Set;s.add(e),this.onInitCallbacks.set(r,s);let o=this.instances.get(r);return o&&e(o,r),()=>{s.delete(e)}}invokeOnInitCallbacks(e,t){let i=this.onInitCallbacks.get(t);if(i)for(let r of i)try{r(e,t)}catch(s){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let i=this.instances.get(e);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:sa(e),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(r){}return i||null}normalizeInstanceIdentifier(e=Ie){return this.component?this.component.multipleInstances?e:Ie:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function sa(n){return n===Ie?void 0:n}function oa(n){return n.instantiationMode==="EAGER"}var Ye=class{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let t=new Nn(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}};var Yn={};jo(Yn,{FirebaseError:()=>P,SDK_VERSION:()=>J,_DEFAULT_ENTRY_NAME:()=>j,_addComponent:()=>xe,_addOrOverwriteComponent:()=>zn,_apps:()=>se,_clearComponents:()=>Ya,_components:()=>Me,_getProvider:()=>Xe,_isFirebaseApp:()=>ps,_isFirebaseServerApp:()=>I,_registerComponent:()=>Y,_removeServiceInstance:()=>Ka,_serverApps:()=>Le,deleteApp:()=>Mt,getApp:()=>Gn,getApps:()=>Qa,initializeApp:()=>Lt,initializeServerApp:()=>Xa,onLog:()=>qn,registerVersion:()=>M,setLogLevel:()=>Kn});var Dn=[],_=(function(n){return n[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",n})(_||{}),es={debug:_.DEBUG,verbose:_.VERBOSE,info:_.INFO,warn:_.WARN,error:_.ERROR,silent:_.SILENT},aa=_.INFO,ca={[_.DEBUG]:"log",[_.VERBOSE]:"log",[_.INFO]:"info",[_.WARN]:"warn",[_.ERROR]:"error"},la=(n,e,...t)=>{if(e<n.logLevel)return;let i=new Date().toISOString(),r=ca[e];if(r)console[r](`[${i}]  ${n.name}:`,...t);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)},re=class{constructor(e){this.name=e,this._logLevel=aa,this._logHandler=la,this._userLogHandler=null,Dn.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in _))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?es[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,_.DEBUG,...e),this._logHandler(this,_.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,_.VERBOSE,...e),this._logHandler(this,_.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,_.INFO,...e),this._logHandler(this,_.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,_.WARN,...e),this._logHandler(this,_.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,_.ERROR,...e),this._logHandler(this,_.ERROR,...e)}};function ts(n){Dn.forEach(e=>{e.setLogLevel(n)})}function ns(n,e){for(let t of Dn){let i=null;e&&e.level&&(i=es[e.level]),n===null?t.userLogHandler=null:t.userLogHandler=(r,s,...o)=>{let c=o.map(l=>{if(l==null)return null;if(typeof l=="string")return l;if(typeof l=="number"||typeof l=="boolean")return l.toString();if(l instanceof Error)return l.message;try{return JSON.stringify(l)}catch(u){return null}}).filter(l=>l).join(" ");s>=(i??r.logLevel)&&n({level:_[s].toLowerCase(),message:c,args:o,type:r.name})}}}var ua=(n,e)=>e.some(t=>n instanceof t),is,rs;function da(){return is||(is=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ha(){return rs||(rs=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var ss=new WeakMap,Mn=new WeakMap,os=new WeakMap,Ln=new WeakMap,Un=new WeakMap;function fa(n){let e=new Promise((t,i)=>{let r=()=>{n.removeEventListener("success",s),n.removeEventListener("error",o)},s=()=>{t(B(n.result)),r()},o=()=>{i(n.error),r()};n.addEventListener("success",s),n.addEventListener("error",o)});return e.then(t=>{t instanceof IDBCursor&&ss.set(t,n)}).catch(()=>{}),Un.set(e,n),e}function pa(n){if(Mn.has(n))return;let e=new Promise((t,i)=>{let r=()=>{n.removeEventListener("complete",s),n.removeEventListener("error",o),n.removeEventListener("abort",o)},s=()=>{t(),r()},o=()=>{i(n.error||new DOMException("AbortError","AbortError")),r()};n.addEventListener("complete",s),n.addEventListener("error",o),n.addEventListener("abort",o)});Mn.set(n,e)}var xn={get(n,e,t){if(n instanceof IDBTransaction){if(e==="done")return Mn.get(n);if(e==="objectStoreNames")return n.objectStoreNames||os.get(n);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return B(n[e])},set(n,e,t){return n[e]=t,!0},has(n,e){return n instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in n}};function as(n){xn=n(xn)}function ma(n){return n===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){let i=n.call(kt(this),e,...t);return os.set(i,e.sort?e.sort():[e]),B(i)}:ha().includes(n)?function(...e){return n.apply(kt(this),e),B(ss.get(this))}:function(...e){return B(n.apply(kt(this),e))}}function ga(n){return typeof n=="function"?ma(n):(n instanceof IDBTransaction&&pa(n),ua(n,da())?new Proxy(n,xn):n)}function B(n){if(n instanceof IDBRequest)return fa(n);if(Ln.has(n))return Ln.get(n);let e=ga(n);return e!==n&&(Ln.set(n,e),Un.set(e,n)),e}var kt=n=>Un.get(n);function ls(n,e,{blocked:t,upgrade:i,blocking:r,terminated:s}={}){let o=indexedDB.open(n,e),c=B(o);return i&&o.addEventListener("upgradeneeded",l=>{i(B(o.result),l.oldVersion,l.newVersion,B(o.transaction),l)}),t&&o.addEventListener("blocked",l=>t(l.oldVersion,l.newVersion,l)),c.then(l=>{s&&l.addEventListener("close",()=>s()),r&&l.addEventListener("versionchange",u=>r(u.oldVersion,u.newVersion,u))}).catch(()=>{}),c}var _a=["get","getKey","getAll","getAllKeys","count"],va=["put","add","delete","clear"],Fn=new Map;function cs(n,e){if(!(n instanceof IDBDatabase&&!(e in n)&&typeof e=="string"))return;if(Fn.get(e))return Fn.get(e);let t=e.replace(/FromIndex$/,""),i=e!==t,r=va.includes(t);if(!(t in(i?IDBIndex:IDBObjectStore).prototype)||!(r||_a.includes(t)))return;let s=function(o,...c){return a(this,null,function*(){let l=this.transaction(o,r?"readwrite":"readonly"),u=l.store;return i&&(u=u.index(c.shift())),(yield Promise.all([u[t](...c),r&&l.done]))[0]})};return Fn.set(e,s),s}as(n=>Ur(xr({},n),{get:(e,t,i)=>cs(e,t)||n.get(e,t,i),has:(e,t)=>!!cs(e,t)||n.has(e,t)}));var Wn=class{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(t=>{if(Ia(t)){let i=t.getImmediate();return`${i.library}/${i.version}`}else return null}).filter(t=>t).join(" ")}};function Ia(n){let e=n.getComponent();return e?.type==="VERSION"}var Nt="@firebase/app",Hn="0.13.2";var K=new re("@firebase/app"),ya="@firebase/app-compat",Ea="@firebase/analytics-compat",wa="@firebase/analytics",ba="@firebase/app-check-compat",Ta="@firebase/app-check",Aa="@firebase/auth",Sa="@firebase/auth-compat",Pa="@firebase/database",Ra="@firebase/data-connect",Ca="@firebase/database-compat",Oa="@firebase/functions",ka="@firebase/functions-compat",Na="@firebase/installations",Da="@firebase/installations-compat",La="@firebase/messaging",Ma="@firebase/messaging-compat",xa="@firebase/performance",Ua="@firebase/performance-compat",Fa="@firebase/remote-config",Va="@firebase/remote-config-compat",Wa="@firebase/storage",Ha="@f
15irebase/storage-compat",Ba="@firebase/firestore",ja="@firebase/ai",$a="@firebase/firestore-compat",za="firebase",Ga="11.10.0";var j="[DEFAULT]",qa={[Nt]:"fire-core",[ya]:"fire-core-compat",[wa]:"fire-analytics",[Ea]:"fire-analytics-compat",[Ta]:"fire-app-check",[ba]:"fire-app-check-compat",[Aa]:"fire-auth",[Sa]:"fire-auth-compat",[Pa]:"fire-rtdb",[Ra]:"fire-data-connect",[Ca]:"fire-rtdb-compat",[Oa]:"fire-fn",[ka]:"fire-fn-compat",[Na]:"fire-iid",[Da]:"fire-iid-compat",[La]:"fire-fcm",[Ma]:"fire-fcm-compat",[xa]:"fire-perf",[Ua]:"fire-perf-compat",[Fa]:"fire-rc",[Va]:"fire-rc-compat",[Wa]:"fire-gcs",[Ha]:"fire-gcs-compat",[Ba]:"fire-fst",[$a]:"fire-fst-compat",[ja]:"fire-vertex","fire-js":"fire-js",[za]:"fire-js-all"};var se=new Map,Le=new Map,Me=new Map;function xe(n,e){try{n.container.addComponent(e)}catch(t){K.debug(`Component ${e.name} failed to register with FirebaseApp ${n.name}`,t)}}function zn(n,e){n.container.addOrOverwriteComponent(e)}function Y(n){let e=n.name;if(Me.has(e))return K.debug(`There were multiple attempts to register component ${e}.`),!1;Me.set(e,n);for(let t of se.values())xe(t,n);for(let t of Le.values())xe(t,n);return!0}function Xe(n,e){let t=n.container.getProvider("heartbeat").getImmediate({optional:!0});return t&&t.triggerHeartbeat(),n.container.getProvider(e)}function Ka(n,e,t=j){Xe(n,e).clearInstance(t)}function ps(n){return n.options!==void 0}function I(n){return n==null?!1:n.settings!==void 0}function Ya(){Me.clear()}var Ja={"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.","invali
15d-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."},L=new D("app","Firebase",Ja);var Dt=class{constructor(e,t,i){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=i,this.container.addComponent(new O("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 L.create("app-deleted",{appName:this._name})}};function us(n,e){let t=_e(n.split(".")[1]);if(t===null){console.error(`FirebaseServerApp ${e} is invalid: second part could not be parsed.`);return}if(JSON.parse(t).exp===void 0){console.error(`FirebaseServerApp ${e} is invalid: expiration claim could not be parsed`);return}let r=JSON.parse(t).exp*1e3,s=new Date().getTime();r-s<=0&&console.error(`FirebaseServerApp ${e} is invalid: the token has expired.`)}var Bn=class extends Dt{constructor(e,t,i,r){let s=t.automaticDataCollectionEnabled!==void 0?t.automaticDataCollectionEnabled:!0,o={name:i,automaticDataCollectionEnabled:s};if(e.apiKey!==void 0)super(e,o,r);else{let c=e;super(c.options,o,r)}this._serverConfig=Object.assign({automaticDataCollectionEnabled:s},t),this._serverConfig.authIdToken&&us(this._serverConfig.authIdToken,"authIdToken"),this._serverConfig.appCheckToken&&us(this._serverConfig.appCheckToken,"appCheckToken"),this._finalizationRegistry=null,typeof FinalizationRegistry<"u"&&(this._finalizationRegistry=new FinalizationRegistry(()=>{this.automaticCleanup()})),this._refCount=0,this.incRefCount(this._serverConfig.releaseOnDeref),this._serverConfig.releaseOnDeref=void 0,t.releaseOnDeref=void 0,M(Nt,Hn,"serverapp")}toJSON(){}get refCount(){return this._refCount}incRefCount(e){this.isDeleted||(this._refCount++,e!==void 0&&this._finalizationRegistry!==null&&this._finalizationRegistry.register(e,this))}decRefCount(){return this.isDeleted?0:--this._refCount}automaticCleanup(){Mt(this)}get settings(){return this.checkDestroyed(),this._serverConfig}checkDestroyed(){if(this.isDeleted)throw L.create("server-app-deleted")}};var J=Ga;function Lt(n,e={}){let t=n;typeof e!="object"&&(e={name:e});let i=Object.assign({name:j,automaticDataCollectionEnabled:!0},e),r=i.name;if(typeof r!="string"||!r)throw L.create("bad-app-name",{appName:String(r)});if(t||(t=Pn()),!t)throw L.create("no-options");let s=se.get(r);if(s){if(ne(t,s.options)&&ne(i,s.config))return s;throw L.create("duplicate-app",{appName:r})}let o=new Ye(r);for(let l of Me.values())o.addComponent(l);let c=new Dt(t,i,o);return se.set(r,c),c}function Xa(n,e){if(Kr()&&!On())throw L.create("invalid-server-app-environment");e.automaticDataCollectionEnabled===void 0&&(e.automaticDataCollectionEnabled=!0);let t;ps(n)?t=n.options:t=n;let i=Object.assign(Object.assign({},e),t);i.releaseOnDeref!==void 0&&delete i.releaseOnDeref;let r=u=>[...u].reduce((h,d)=>Math.imul(31,h)+d.charCodeAt(0)|0,0);if(e.releaseOnDeref!==void 0&&typeof FinalizationRegistry>"u")throw L.create("finalization-registry-not-supported",{});let s=""+r(JSON.stringify(i)),o=Le.get(s);if(o)return o.incRefCount(e.releaseOnDeref),o;let c=new Ye(s);for(let u of Me.values())c.addComponent(u);let l=new Bn(t,e,s,c);return Le.set(s,l),l}function Gn(n=j){let e=se.get(n);if(!e&&n===j&&Pn())return Lt();if(!e)throw L.create("no-app",{appName:n});return e}function Qa(){return Array.from(se.values())}function Mt(n){return a(this,null,function*(){let e=!1,t=n.name;se.has(t)?(e=!0,se.delete(t)):Le.has(t)&&n.decRefCount()<=0&&(Le.delete(t),e=!0),e&&(yield Promise.all(n.container.getProviders().map(i=>i.delete())),n.isDeleted=!0)})}function M(n,e,t){var i;let r=(i=qa[n])!==null&&i!==void 0?i:n;t&&(r+=`-${t}`);let s=r.match(/\s|\//),o=e.match(/\s|\//);if(s||o){let c=[`Unable to register library "${r}" with version "${e}":`];s&&c.push(`library name "${r}" contains illegal characters (whitespace or "/")`),s&&o&&c.push("and"),o&&c.push(`version name "${e}" contains illegal characters (whitespace or "/")`),K.warn(c.join(" "));return}Y(new O(`${r}-version`,()=>({library:r,version:e}),"VERSION"))}function qn(n,e){if(n!==null&&typeof n!="function")throw L.create("invalid-log-argument");ns(n,e)}function Kn(n){ts(n)}var Za="firebase-heartbeat-database",ec=1,Je="firebase-heartbeat-store",Vn=null;function ms(){return Vn||(Vn=ls(Za,ec,{upgrade:(n,e)=>{switch(e){case 0:try{n.createObjectStore(Je)}catch(t){console.warn(t)}}}}).catch(n=>{throw L.create("idb-open",{originalErrorMessage:n.message})})),Vn}function tc(n){return a(this,null,function*(){try{let t=(yield ms()).transaction(Je),i=yield t.objectStore(Je).get(gs(n));return yield t.done,i}catch(e){if(e instanceof P)K.warn(e.message);else{let t=L.create("idb-get",{originalErrorMessage:e?.message});K.warn(t.message)}}})}function ds(n,e){return a(this,null,function*(){try{let i=(yield ms()).transaction(Je,"readwrite");yield i.objectStore(Je).put(e,gs(n)),yield i.done}catch(t){if(t instanceof P)K.warn(t.message);else{let i=L.create("idb-set",{originalErrorMessage:t?.message});K.warn(i.message)}}})}function gs(n){return`${n.name}!${n.options.appId}`}var nc=1024,ic=30,jn=class{constructor(e){this.container=e,this._heartbeatsCache=null;let t=this.container.getProvider("app").getImmediate();this._storage=new $n(t),this._heartbeatsCachePromise=this._storage.read().then(i=>(this._heartbeatsCache=i,i))}triggerHeartbeat(){return a(this,null,function*(){var e,t;try{let r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=hs();if(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=yield this._heartbeatsCachePromise,((t=this._heartbeatsCache)===null||t===void 0?void 0:t.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(o=>o.date===s))return;if(this._heartbeatsCache.heartbeats.push({date:s,agent:r}),this._heartbeatsCache.heartbeats.length>ic){let o=sc(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(o,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(i){K.warn(i)}})}getHeartbeatsHeader(){return a(this,null,function*(){var e;try{if(this._heartbeatsCache===null&&(yield this._heartbeatsCachePromise),((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";let t=hs(),{heartbeatsToSend:i,unsentEntries:r}=rc(this._heartbeatsCache.heartbeats),s=Ge(JSON.stringify({version:2,heartbeats:i}));return this._heartbeatsCache.lastSentHeartbeatDate=t,r.length>0?(this._heartbeatsCache.heartbeats=r,yield this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}catch(t){return K.warn(t),""}})}};function hs(){return new Date().toISOString().substring(0,10)}function rc(n,e=nc){let t=[],i=n.slice();for(let r of n){let s=t.find(o=>o.agent===r.agent);if(s){if(s.dates.push(r.date),fs(t)>e){s.dates.pop();break}}else if(t.push({agent:r.agent,dates:[r.date]}),fs(t)>e){t.pop();break}i=i.slice(1)}return{heartbeatsToSend:t,unsentEntries:i}}var $n=class{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return a(this,null,function*(){return Ne()?Jr().then(()=>!0).catch(()=>!1):!1})}read(){return a(this,null,function*(){if(yield this._canUseIndexedDBPromise){let t=yield tc(this.app);return t?.heartbeats?t:{heartbeats:[]}}else return{heartbeats:[]}})}overwrite(e){return a(this,null,function*(){var t;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return ds(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return})}add(e){return a(this,null,function*(){var t;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return ds(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}else return})}};function fs(n){return Ge(JSON.stringify({version:2,heartbeats:n})).length}function sc(n){if(n.length===0)return-1;let e=0,t=n[0].date;for(let i=1;i<n.length;i++)n[i].date<t&&(t=n[i].date,e=i);return e}function oc(n){Y(new O("platform-logger",e=>new Wn(e),"PRIVATE")),Y(new O("heartbeat",e=>new jn(e),"PRIVATE")),M(Nt,Hn,n),M(Nt,Hn,"esm2017"),M("fire-js","")}oc("");var Jn=class{constructor(e,t){this._delegate=e,this.firebase=t,xe(e,new O("app-compat",()=>this,"PUBLIC")),this.container=e.container}get automaticDataCollectionEnabled(){return this._delegate.automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this._delegate.automaticDataCollectionEnabled=e}get name(){return this._delegate.name}get options(){return this._delegate.options}delete(){return new Promise(e=>{this._delegate.checkDestroyed(),e()}).then(()=>(this.firebase.INTERNAL.removeApp(this.name),Mt(this._delegate)))}_getService(e,t=j){var i;this._delegate.checkDestroyed();let r=this._delegate.container.getProvider(e);return!r.isInitialized()&&((i=r.getComponent())===null||i===void 0?void 0:i.instantiationMode)==="EXPLICIT"&&r.initialize(),r.getImmediate({identifier:t})}_removeServiceInstance(e,t=j){this._delegate.container.getProvider(e).
15clearInstance(t)}_addComponent(e){xe(this._delegate,e)}_addOrOverwriteComponent(e){zn(this._delegate,e)}toJSON(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}}};var ac={"no-app":"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance."},_s=new D("app-compat","Firebase",ac);function cc(n){let e={},t={__esModule:!0,initializeApp:s,app:r,registerVersion:M,setLogLevel:Kn,onLog:qn,apps:null,SDK_VERSION:J,INTERNAL:{registerComponent:c,removeApp:i,useAsService:l,modularAPIs:Yn}};t.default=t,Object.defineProperty(t,"apps",{get:o});function i(u){delete e[u]}function r(u){if(u=u||j,!kn(e,u))throw _s.create("no-app",{appName:u});return e[u]}r.App=n;function s(u,h={}){let d=Lt(u,h);if(kn(e,d.name))return e[d.name];let p=new n(d,t);return e[d.name]=p,p}function o(){return Object.keys(e).map(u=>e[u])}function c(u){let h=u.name,d=h.replace("-compat","");if(Y(u)&&u.type==="PUBLIC"){let p=(m=r())=>{if(typeof m[d]!="function")throw _s.create("invalid-app-argument",{appName:h});return m[d]()};u.serviceProps!==void 0&&ke(p,u.serviceProps),t[d]=p,n.prototype[d]=function(...m){return this._getService.bind(this,h).apply(this,u.multipleInstances?m:[])}}return u.type==="PUBLIC"?t[d]:null}function l(u,h){return h==="serverAuth"?null:h}return t}function Is(){let n=cc(Jn);n.INTERNAL=Object.assign(Object.assign({},n.INTERNAL),{createFirebaseNamespace:Is,extendNamespace:e,createSubscribe:Ot,ErrorFactory:D,deepExtend:ke});function e(t){ke(n,t)}return n}var lc=Is();var vs=new re("@firebase/app-compat"),uc="@firebase/app-compat",dc="0.4.2";function hc(n){M(uc,dc,n)}try{let n=An();if(n.firebase!==void 0){vs.warn(`
16      Warning: Firebase is already defined in the global scope. Please make sure
17      Firebase library is only loaded once.
18    `);let e=n.firebase.SDK_VERSION;e&&e.indexOf("LITE")>=0&&vs.warn(`
19        Warning: You are trying to load Firebase while using Firebase Performance standalone script.
20        You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.
21        `)}}catch(n){}var xt=lc;hc();function Ut(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(n);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(n,i[r])&&(t[i[r]]=n[i[r]]);return t}function Qd(n,e,t,i){function r(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function c(h){try{u(i.next(h))}catch(d){o(d)}}function l(h){try{u(i.throw(h))}catch(d){o(d)}}function u(h){h.done?s(h.value):r(h.value).then(c,l)}u((i=i.apply(n,e||[])).next())})}function ys(n){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&n[e],i=0;if(t)return t.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xn(n){return this instanceof Xn?(this.v=n,this):new Xn(n)}function Zd(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=t.apply(n,e||[]),r,s=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),c("next"),c("throw"),c("return",o),r[Symbol.asyncIterator]=function(){return this},r;function o(m){return function(w){return Promise.resolve(w).then(m,d)}}function c(m,w){i[m]&&(r[m]=function(H){return new Promise(function(te,fe){s.push([m,H,te,fe])>1||l(m,H)})},w&&(r[m]=w(r[m])))}function l(m,w){try{u(i[m](w))}catch(H){p(s[0][3],H)}}function u(m){m.value instanceof Xn?Promise.resolve(m.value.v).then(h,d):p(s[0][2],m)}function h(m){l("next",m)}function d(m){l("throw",m)}function p(m,w){m(w),s.shift(),s.length&&l(s[0][0],s[0][1])}}function eh(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof ys=="function"?ys(n):n[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(s){t[s]=n[s]&&function(o){return new Promise(function(c,l){o=n[s](o),r(c,l,o.done,o.value)})}}function r(s,o,c,l){Promise.resolve(l).then(function(u){s({value:u,done:c})},o)}}var Te={FACEBOOK:"facebook.com",GITHUB:"github.com",GOOGLE:"google.com",PASSWORD:"password",PHONE:"phone",TWITTER:"twitter.com"};var de={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"};function fc
vendor: 12,061 bytes, line 21
21(){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`)."}}
21function Vs(){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."}}var Ci=fc,Ws=Vs,Hs=new D("auth","Firebase",Vs());var Ht=new re("@firebase/auth");function pc(n,...e){Ht.logLevel<=_.WARN&&Ht.warn(`Auth (${J}): ${n}`,...e)}function Vt(n,...e){Ht.logLevel<=_.ERROR&&Ht.error(`Auth (${J}): ${n}`,...e)}function T(n,...e){throw ki(n,...e)}function S(n,...e){return ki(n,...e)}function Oi(n,e,t){let i=Object.assign(Object.assign({},Ws()),{[e]:t});return new D("auth","Firebase",i).create(e,{appName:n.name})}function R(n){return Oi(n,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Ve(n,e,t){let i=t;if(!(e instanceof i))throw i.name!==e.constructor.name&&T(n,"argument-error"),Oi(n,"argument-error",`Type of ${e.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function ki(n,...e){if(typeof n!="string"){let t=e[0],i=[...e.slice(1)];return i[0]&&(i[0].appName=n.name),n._errorFactory.create(t,...i)}return Hs.create(n,...e)}function f(n,e,...t){if(!n)throw ki(e,...t)}function $(n){let e="INTERNAL ASSERTION FAILED: "+n;throw Vt(e),new Error(e)}function x(n,e){n||$(e)}function st(){var n;return typeof self<"u"&&((n=self.location)===null||n===void 0?void 0:n.href)||""}function Ni(){return Es()==="http:"||Es()==="https:"}function Es(){var n;return typeof self<"u"&&((n=self.location)===null||n===void 0?void 0:n.protocol)||null}function mc(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(Ni()||Rt()||"connection"in navigator)?navigator.onLine:!0}function gc(){if(typeof navigator>"u")return null;let n=navigator;return n.languages&&n.languages[0]||n.language||null}var ye=class{constructor(e,t){this.shortDelay=e,this.longDelay=t,x(t>e,"Short delay should be less than long delay!"),this.isMobile=qr()||Ke()}get(){return mc()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}};function Di(n,e){x(n.emulator,"Emulator should always be set here");let{url:t}=n.emulator;return e?`${t}${e.startsWith("/")?e.slice(1):e}`:t}var ot=class{static initialize(e,t,i){this.fetchImpl=e,t&&(this.headersImpl=t),i&&(this.responseImpl=i)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;$("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;$("Could not find Headers implementation, make sure you call FetchProvi
21der.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;$("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}};var _c={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-recaptcha-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"};var vc=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],Ic=new ye(3e4,6e4);function y(n,e){return n.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:n.tenantId}):e}function E(s,o,c,l){return a(this,arguments,function*(n,e,t,i,r={}){return Bs(n,r,()=>a(null,null,function*(){let u={},h={};i&&(e==="GET"?h=i:u={body:JSON.stringify(i)});let d=ve(Object.assign({key:n.config.apiKey},h)).slice(1),p=yield n._getAdditionalHeaders();p["Content-Type"]="application/json",n.languageCode&&(p["X-Firebase-Locale"]=n.languageCode);let m=Object.assign({method:e,headers:p},u);return Yr()||(m.referrerPolicy="no-referrer"),n.emulatorConfig&&qe(n.emulatorConfig.host)&&(m.credentials="include"),ot.fetch()(yield js(n,n.config.apiHost,t,d),m)}))})}function Bs(n,e,t){return a(this,null,function*(){n._canInitEmulator=!1;let i=Object.assign(Object.assign({},_c),e);try{let r=new ii(n),s=yield Promise.race([t(),r.promise]);r.clearNetworkTimeout();let o=yield s.json();if("needConfirmation"in o)throw Ze(n,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{let c=s.ok?o.errorMessage:o.error.message,[l,u]=c.split(" : ");if(l==="FEDERATED_USER_ID_ALREADY_LINKED")throw Ze(n,"credential-already-in-use",o);if(l==="EMAIL_EXISTS")throw Ze(n,"email-already-in-use",o);if(l==="USER_DISABLED")throw Ze(n,"user-disabled",o);let h=i[l]||l.toLowerCase().replace(/[_\s]+/g,"-");if(u)throw Oi(n,h,u);T(n,h)}}catch(r){if(r instanceof P)throw r;T(n,"network-request-failed",{message:String(r)})}})}function ee(s,o,c,l){return a(this,arguments,function*(n,e,t,i,r={}){let u=yield E(n,e,t,i,r);return"mfaPendingCredential"in u&&T(n,"multi-factor-auth-required",{_serverResponse:u}),u})}function js(n,e,t,i){return a(this,null,function*(){let r=`${e}${t}?${i}`,s=n,o=s.config.emulator?Di(n.config,r):`${n.config.apiScheme}://${r}`;
21return vc.includes(t)&&(yield s._persistenceManagerAvailable,s._getPersistenceType()==="COOKIE")?s._getPersistence()._getFinalTarget(o).toString():o})}function yc(n){switch(n){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}var ii=class{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((t,i)=>{this.timer=setTimeout(()=>i(S(this.auth,"network-request-failed")),Ic.get())})}};function Ze(n,e,t){let i={appName:n.name};t.email&&(i.email=t.email),t.phoneNumber&&(i.phoneNumber=t.phoneNumber);let r=S(n,e,i);return r.customData._tokenResponse=t,r}function ws(n){return n!==void 0&&n.getResponse!==void 0}function bs(n){return n!==void 0&&n.enterprise!==void 0}var Bt=class{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],e.recaptchaKey===void 0)throw new Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||this.recaptchaEnforcementState.length===0)return null;for(let t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return yc(t.enforcementState);return null}isProviderEnabled(e){return this.getProviderEnforcementState(e)==="ENFORCE"||this.getProviderEnforcementState(e)==="AUDIT"}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PROVIDER")}};function Ec(n){return a(this,null,function*(){return(yield E(n,"GET","/v1/recaptchaParams")).recaptchaSiteKey||""})}function $s(n,e){return a(this,null,function*(){return E(n,"GET","/v2/recaptchaConfig",y(n,e))})}function wc(n,e){return a(this,null,function*(){return E(n,"POST","/v1/accounts:delete",e)})}function bc(n,e){return a(this,null,function*(){return E(n,"POST","/v1/accounts:update",e)})}function jt(n,e){return a(this,null,function*(){return E(n,"POST","/v1/accounts:lookup",e)})}function et(n){if(n)try{let e=new Date(Number(n));if(!isNaN(e.getTime()))return e.toUTCString()}catch(e){}}function zs(n,e=!1){return a(this,null,function*(){let t=g(n),i=yield t.getIdToken(e),r=tn(i);f(r&&r.exp&&r.auth_time&&r.iat,t.auth,"internal-error");let s=typeof r.firebase=="object"?r.firebase:void 0,o=s?.sign_in_provider;return{claims:r,token:i,authTime:et(Qn(r.auth_time)),issuedAtTime:et(Qn(r.iat)),expirationTime:et(Qn(r.exp)),signInProvider:o||null,signInSecondFactor:s?.sign_in_second_factor||null}})}function Qn(n){return Number(n)*1e3}function tn(n){let[e,t,i]=n.split(".");if(e===void 0||t===void 0||i===void 0)return Vt("JWT malformed, contained fewer than 3 sections"),null;try{let r=_e(t);return r?JSON.parse(r):(Vt("Failed to decode base64 JWT payload"),null)}catch(r){return Vt("Caught error parsing JWT payload as JSON",r?.toString()),null}}function Ts(n){let e=tn(n);return f(e,"internal-error"),f(typeof e.exp<"u","internal-error"),f(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}function Z(n,e,t=!1){return a(this,null,function*(){if(t)return e;try{return yield e}catch(i){throw i instanceof P&&Tc(i)&&n.auth.currentUser===n&&(yield n.auth.signOut()),i}})}function Tc({code:n}){return n==="auth/user-disabled"||n==="auth/user-token-expired"}var ri=class{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,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){var t;if(e){let i=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),i}else{this.errorBackoff=3e4;let r=((t=this.user.stsTokenManager.expirationTime)!==null&&t!==void 0?t:0)-Date.now()-3e5;return Math.max(0,r)}}schedule(e=!1){if(!this.isRunning)return;let t=this.getInterval(e);this.timerId=setTimeout(()=>a(this,null,function*(){yield this.iteration()}),t)}iteration(){return a(this,null,function*(){try{yield this.user.getIdToken(!0)}catch(e){e?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()})}};var at=class{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=et(this.lastLoginAt),this.creationTime=et(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}};function ct(n){return a(this,null,function*(){var e;let t=n.auth,i=yield n.getIdToken(),r=yield Z(n,jt(t,{idToken:i}));f(r?.users.length,t,"internal-error");let s=r.users[0];n._notifyReloadListener(s);let o=!((e=s.providerUserInfo)===null||e===void 0)&&e.length?qs(s.providerUserInfo):[],c=Ac(n.providerData,o),l=n.isAnonymous,u=!(n.email&&s.passwordHash)&&!c?.length,h=l?u:!1,d={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:c,metadata:new at(s.createdAt,s.lastLoginAt),isAnonymous:h};Object.assign(n,d)})}function Gs(n){return a(this,null,function*(){let e=g(n);yield ct(e),yield e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)})}function Ac(n,e){return[...n.filter(i=>
vendor: 18,351 bytes, line 21
21!e.some(r=>r.providerId===i.providerId)),...e]}function qs(n){return n.map(e=>{var{providerId:t}=e,i=Ut(e,["providerId"]);return{providerId:t,uid:i.rawId||"",displayName:i.displayName||null,email:i.email||null,phoneNumber:i.phoneNumber||null,photoURL:i.photoUrl||null}})}function Sc(n,e){return a(this,null,function*(){let t=yield Bs(n,{},()=>a(null,null,function*(){let i=ve({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:r,apiKey:s}=n.config,o=yield js(n,r,"/v1/token",`key=${s}`),c=yield n._getAdditionalHeaders();c["Content-Type"]="application/x-www-form-urlencoded";let l={method:"POST",headers:c,body:i};return n.emulatorConfig&&qe(n.emulatorConfig.host)&&(l.credentials="include"),ot.fetch()(o,l)}));return{accessToken:t.access_token,expiresIn:t.expires_in,refreshToken:t.refresh_token}})}function Pc(n,e){return a(this,null,function*(){return E(n,"POST","/v2/accounts:revokeToken",y(n,e))})}var tt=class n{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){f(e.idToken,"internal-error"),f(typeof e.idToken<"u","internal-error"),f(typeof e.refreshToken<"u","internal-error");let t="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):Ts(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){f(e.length!==0,"internal-error");let t=Ts(e);this.updateTokensAndExpiration(e,null,t)}getToken(e,t=!1){return a(this,null,function*(){return!t&&this.accessToken&&!this.isExpired?this.accessToken:(f(this.refreshToken,e,"user-token-expired"),this.refreshToken?(yield this.refresh(e,this.refreshToken),this.accessToken):null)})}clearRefreshToken(){this.refreshToken=null}refresh(e,t){return a(this,null,function*(){let{accessToken:i,refreshToken:r,expiresIn:s}=yield Sc(e,t);this.updateTokensAndExpiration(i,r,Number(s))})}updateTokensAndExpiration(e,t,i){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+i*1e3}static fromJSON(e,t){let{refreshToken:i,accessToken:r,expirationTime:s}=t,o=new n;return i&&(f(typeof i=="string","internal-error",{appName:e}),o.refreshToken=i),r&&(f(typeof r=="string","internal-error",{appName:e}),o.accessToken=r),s&&(f(typeof s=="number","internal-error",{appName:e}),o.expirationTime=s),o}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 n,this.toJSON())}_performRefresh(){return $("not implemented")}};function oe(n,e){f(typeof n=="string"||typeof n>"u","internal-error",{appName:e})}var X=class n{constructor(e){var{uid:t,auth:i,stsTokenManager:r}=e,s=Ut(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new ri(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=i,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=s.displayName||null,this.email=s.email||null,this.emailVerified=s.emailVerified||!1,this.phoneNumber=s.phoneNumber||null,this.photoURL=s.photoURL||null,this.isAnonymous=s.isAnonymous||!1,this.tenantId=s.tenantId||null,this.providerData=s.providerData?[...s.providerData]:[],this.metadata=new at(s.createdAt||void 0,s.lastLoginAt||void 0)}getIdToken(e){return a(this,null,function*(){let t=yield Z(this,this.stsTokenManager.getToken(this.auth,e));return f(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t})}getIdTokenResult(e){return zs(this,e)}reload(){return Gs(this)}_assign(e){this!==e&&(f(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,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(t=>Object.assign({},t)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let t=new n(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){f(!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()}_updateTokensIfNecessary(e,t=!1){return a(this,null,function*(){let i=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),i=!0),t&&(yield ct(this)),yield this.auth._persistUserIfCurrent(this),i&&this.auth._notifyListenersIfCurrent(this)})}delete(){return a(this,null,function*(){if(I(this.auth.app))return Promise.reject(R(this.auth));let e=yield this.getIdToken();return yield Z(this,wc(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()})}toJSON(){return Object.assign(Object.assign({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=>Object.assign({},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){var i,r,s,o,c,l,u,h;let d=(i=t.displayName)!==null&&i!==void 0?i:void 0,p=(r=t.email)!==null&&r!==void 0?r:void 0,m=(s=t.phoneNumber)!==null&&s!==void 0?s:void 0,w=(o=t.photoURL)!==null&&o!==void 0?o:void 0,H=(c=t.tenantId)!==null&&c!==void 0?c:void 0,te=(l=t._redirectEventId)!==null&&l!==void 0?l:void 0,fe=(u=t.createdAt)!==null&&u!==void 0?u:void 0,pe=(h=t.lastLoginAt)!==null&&h!==void 0?h:void 0,{uid:me,emailVerified:bt,isAnonymous:kr,providerData:vn,stsTokenManager:Nr}=t;f(me&&Nr,e,"internal-error");let Mo=tt.fromJSON(this.name,Nr);f(typeof me=="string",e,"internal-error"),oe(d,e.name),oe(p,e.name),f(typeof bt=="boolean",e,"internal-error"),f(typeof kr=="boolean",e,"internal-error"),oe(m,e.name),oe(w,e.name),oe(H,e.name),oe(te,e.name),oe(fe,e.name),oe(pe,e.name);let In=new n({uid:me,auth:e,email:p,emailVerified:bt,displayName:d,isAnonymous:kr,photoURL:w,phoneNumber:m,tenantId:H,stsTokenManager:Mo,createdAt:fe,lastLoginAt:pe});return vn&&Array.isArray(vn)&&(In.providerData=vn.map(xo=>Object.assign({},xo))),te&&(In._redirectEventId=te),In}static _fromIdTokenResponse(e,t,i=!1){return a(this,null,function*(){let r=new tt;r.updateFromServerResponse(t);let s=new n({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:i});return yield ct(s),s})}static _fromGetAccountInfoResponse(e,t,i){return a(this,null,function*(){let r=t.users[0];f(r.localId!==void 0,"internal-error");let s=r.providerUserInfo!==void 0?qs(r.providerUserInfo):[],o=!(r.email&&r.passwordHash)&&!s?.length,c=new tt;c.updateFromIdToken(i);let l=new n({uid:r.localId,auth:e,stsTokenManager:c,isAnonymous:o}),u={uid:r.localId,displayName:r.displayName||null,photoURL:r.photoUrl||null,email:r.email||null,emailVerified:r.emailVerified||!1,phoneNumber:r.phoneNumber||null,tenantId:r.tenantId||null,providerData:s,metadata:new at(r.createdAt,r.lastLoginAt),isAnonymous:!(r.email&&r.passwordHash)&&!s?.length};return Object.assign(l,u),l})}};var As=new Map;function C(n){x(n instanceof Function,"Expected a class definition");let e=As.get(n);return e?(x(e instanceof n,"Instance stored in cache mismatched with class"),e):(e=new n,As.set(n,e),e)}var Rc=(()=>{class n{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return a(this,null,function*(){return!0})}_set(t,i){return a(this,null,function*(){this.storage[t]=i})}_get(t){return a(this,null,function*(){let i=this.storage[t];return i===void 0?null:i})}_remove(t){return a(this,null,function*(){delete this.storage[t]})}_addListener(t,i){}_removeListener(t,i){}}return n.type="NONE",n})(),le=Rc;function z(n,e,t){return`firebase:${n}:${e}:${t}`}var $t=class n{constructor(e,t,i){this.persistence=e,this.auth=t,this.userKey=i;let{config:r,name:s}=this.auth;this.fullUserKey=z(this.userKey,r.apiKey,s),this.fullPersistenceKey=z("persistence",r.apiKey,s),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}getCurrentUser(){return a(this,null,function*(){let e=yield this.persistence._get(this.fullUserKey);if(!e)return null;if(typeof e=="string"){let t=yield jt(this.auth,{idToken:e}).catch(()=>{});return t?X._fromGetAccountInfoResponse(this.auth,t,e):null}return X._fromJSON(this.auth,e)})}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(e){return a(this,null,function*(){if(this.persistence===e)return;let t=yield this.getCurrentUser();if(yield this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)})}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(e,t,i="authUser"){return a(this,null,function*(){if(!t.length)return new n(C(le),e,i);let r=(yield Promise.all(t.map(u=>a(null,null,function*(){if(yield u._isAvailable())return u})))).filter(u=>u),s=r[0]||C(le),o=z(i,e.config.apiKey,e.name),c=null;for(let u of t)try{let h=yield u._get(o);if(h){let d;if(typeof h=="string"){let p=yield jt(e,{idToken:h}).catch(()=>{});if(!p)break;d=yield X._fromGetAccountInfoResponse(e,p,h)}else d=X._fromJSON(e,h);u!==s&&(c=d),s=u;break}}catch(h){}let l=r.filter(u=>u._shouldAllowMigration);return!s._shouldAllowMigration||!l.length?new n(s,e,i):(s=l[0],c&&(yield s._set(o,c.toJSON())),yield Promise.all(t.map(u=>a(null,null,function*(){if(u!==s)try{yield u._remove(o)}catch(h){}}))),new n(s,e,i))})}};function Ss(n){let e=n.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(Xs(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(Ks(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(Qs(e))return"Blackberry";if(Zs(e))return"Webos";if(Ys(e))return"Safari";if((e.includes("chrome/")||Js(e))&&!e.includes("edge/"))return"Chrome";if(We(e))return"Android";{let t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,i=n.match(t);if(i?.length===2)return i[1]}return"Other"}function Ks(n=b()){return/firefox\//i.test(n)}function Ys(n=b()){let e=n.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function Js(n=b()){return/crios\//i.test(n)}function Xs(n=b()){return/iemobile/i.test(n)}function We(n=b()){return/android/i.test(n)}function Qs(n=b()){return/blackberry/i.test(n)}function Zs(n=b()){return/webos/i.test(n)}function He(n=b()){return/iphone|ipad|ipod/i.test(n)||/macintosh/i.test(n)&&/mobile/i.test(n)}function eo(n=b()){return/(iPad|iPhone|iPod).*OS 7_\d/i.test(n)||/(iPad|iPhone|iPod).*OS 8_\d/i.test(n)}function Cc(n=b()){var e;return He(n)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function Oc(){return Ct()&&document.documentMode===10}function to(n=b()){return He(n)||We(n)||Zs(n)||Qs(n)||/windows phone/i.test(n)||Xs(n)}function Li(n,e=[]){let t;switch(n){case"Browser":t=Ss(b());break;case"Worker":t=`${Ss(b())}-${n}`;break;default:t=n}let i=e.length?e.join(","):"FirebaseCore-web";return`${t}/JsCore/${J}/${i}`}var si=class{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let i=s=>new Promise((o,c)=>{try{let l=e(s);o(l)}catch(l){c(l)}});i.onAbort=t,this.queue.push(i);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}runMiddleware(e){return a(this,null,function*(){if(this.auth.currentUser===e)return;let t=[];try{for(let i of this.queue)yield i(e),i.onAbort&&t.push(i.onAbort)}catch(i){t.reverse();for(let r of t)try{r()}catch(s){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:i?.message})}})}};function kc(t){return a(this,arguments,function*(n,e={}){return E(n,"GET","/v2/passwordPolicy",y(n,e))})}var Nc=6,oi=class{constructor(e){var t,i,r,s;let o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=(t=o.minPasswordLength)!==null&&t!==void 0?t:Nc,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),o.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),o.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),o.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),o.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=(r=(i=e.allowedNonAlphanumericCharacters)===null||i===void 0?void 0:i.join(""))!==null&&r!==void 0?r:"",this.forceUpgradeOnSignin=(s=e.forceUpgradeOnSignin)!==null&&s!==void 0?s:!1,this.schemaVersion=e.schemaVersion}validatePassword(e){var t,i,r,s,o,c;let l={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,l),this.validatePasswordCharacterOptions(e,l),l.isValid&&(l.isValid=(t=l.meetsMinPasswordLength)!==null&&t!==void 0?t:!0),l.isValid&&(l.isValid=(i=l.meetsMaxPasswordLength)!==null&&i!==void 0?i:!0),l.isValid&&(l.isValid=(r=l.containsLowercaseLetter)!==null&&r!==void 0?r:!0),l.isValid&&(l.isValid=(s=l.containsUppercaseLetter)!==null&&s!==void 0?s:!0),l.isValid&&(l.isValid=(o=l.containsNumericCharacter)!==null&&o!==void 0?o:!0),l.isValid&&(l.isValid=(c=l.containsNonAlphanumericCharacter)!==null&&c!==void 0?c:!0),l}validatePasswordLengthOptions(e,t){let i=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;i&&(t.meetsMinPasswordLength=e.length>=i),r&&(t.meetsMaxPasswordLength=e.length<=r)}validatePasswordCharacterOptions(e,t){this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);let i;for(let r=0;r<e.length;r++)i=e.charAt(r),this.updatePasswordCharacterOptionsStatuses(t,i>="a"&&i<="z",i>="A"&&i<="Z",i>="0"&&i<="9",this.allowedNonAlphanumericCharacters.includes(i))}updatePasswordCharacterOptionsStatuses(e,t,i,r,s){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=i)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=r)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=s))}};var zt=class{constructor(e,t,i,r){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=i,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Gt(this),this.idTokenSubscription=new Gt(this),this.beforeStateQueue=new si(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=Hs,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=r.sdkClientVersion,this._persistenceManagerAvailable=new Promise(s=>this._resolvePersistenceManagerAvailable=s)}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=C(t)),this._initializationPromise=this.queue(()=>a(this,null,function*(){var i,r,s;if(!this._deleted&&(this.persistenceManager=yield $t.create(this,e),(i=this._resolvePersistenceManagerAvailable)===null||i===void 0||i.call(this),!this._deleted)){if(!((r=this._popupRedirectResolver)===null||r===void 0)&&r._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch(o){}yield this.initializeCurrentUser(t),this.lastNotifiedUid=((s=this.currentUser)===null||s===void 0?void 0:s.uid)||null,!this._deleted&&(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return a(this,null,function*(){if(this._deleted)return;let e=yield this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),yield this.currentUser.getIdToken();return}yield this._updateCurrentUser(e,!0)}})}initializeCurrentUserFromIdToken(e){return a(this,null,function*(){try{let t=yield jt(this,{idToken:e}),i=yield X._fromGetAccountInfoResponse(this,t,e);yield this.directlySetCurrentUser(i)}catch(t){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",t),yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(e){return a(this,null,function*(){var t;if(I(this.app)){let o=this.app.settings.authIdToken;return o?new Promise(c=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(o).then(c,c))}):this.directlySetCurrentUser(null)}let i=yield this.assertedPersistence.getCurrentUser(),r=i,s=!1;if(e&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();let o=(t=this.redirectUser)===null||t===void 0?void 0:t._redirectEventId,c=r?._redirectEventId,l=yield this.tryRedirectSignIn(e);(!o||o===c)&&l?.user&&(r=l.user,s=!0)}if(!r)return this.directlySetCurrentUser(null);
21if(!r._redirectEventId){if(s)try{yield this.beforeStateQueue.runMiddleware(r)}catch(o){r=i,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return f(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)})}tryRedirectSignIn(e){return a(this,null,function*(){let t=null;try{t=yield this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(i){yield this._setRedirectUser(null)}return t})}reloadAndSetCurrentUserOrClear(e){return a(this,null,function*(){try{yield ct(e)}catch(t){if(t?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)})}useDeviceLanguage(){this.languageCode=gc()}_delete(){return a(this,null,function*(){this._deleted=!0})}updateCurrentUser(e){return a(this,null,function*(){if(I(this.app))return Promise.reject(R(this));let t=e?g(e):null;return t&&f(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))})}_updateCurrentUser(e,t=!1){return a(this,null,function*(){if(!this._deleted)return e&&f(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||(yield this.beforeStateQueue.runMiddleware(e)),this.queue(()=>a(this,null,function*(){yield this.directlySetCurrentUser(e),this.notifyAuthListeners()}))})}signOut(){return a(this,null,function*(){return I(this.app)?Promise.reject(R(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(e){return I(this.app)?Promise.reject(R(this)):this.queue(()=>a(this,null,function*(){yield this.assertedPersistence.setPersistence(C(e))}))}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(e){return a(this,null,function*(){this._getPasswordPolicyInternal()||(yield 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 this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}_updatePasswordPolicy(){return a(this,null,function*(){let e=yield kc(this),t=new oi(e);this.tenantId===null?this._projectPasswordPolicy=t:this._tenantPasswordPolicies[this.tenantId]=t})}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new D("auth","Firebase",e())}onAuthStateChanged(e,t,i){return this.registerStateListener(this.authStateSubscription,e,t,i)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,i){return this.registerStateListener(this.idTokenSubscription,e,t,i)}authStateReady(){return new Promise((e,t)=>{if(this.currentUser)e();else{let i=this.onAuthStateChanged(()=>{i(),e()},t)}})}revokeAccessToken(e){return a(this,null,function*(){if(this.currentUser){let t=yield this.currentUser.getIdToken(),i={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:t};this.tenantId!=null&&(i.tenantId=this.tenantId),yield Pc(this,i)}})}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)===null||e===void 0?void 0:e.toJSON()}}_setRedirectUser(e,t){return a(this,null,function*(){let i=yield this.getOrInitRedirectPersistenceManager(t);return e===null?i.removeCurrentUser():i.setCurrentUser(e)})}getOrInitRedirectPersistenceManager(e){return a(this,null,function*(){if(!this.redirectPersistenceManager){let t=e&&C(e)||this._popupRedirectResolver;f(t,this,"argument-error"),this.redirectPersistenceManager=yield $t.create(this,[C(t._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(e){return a(this,null,function*(){var t,i;return this._isInitialized&&(yield this.queue(()=>a(this,null,function*(){}))),((t=this._currentUser)===null||t===void 0?void 0:t._redirectEventId)===e?this._currentUser:((i=this.redirectUser)===null||i===void 0?void 0:i._redirectEventId)===e?this.redirectUser:null})}_persistUserIfCurrent(e){return a(this,null,function*(){if(e===this.currentUser)return this.queue(()=>a(this,null,function*(){return 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(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let i=(t=(e=this.currentUser)===null||e===void 0?void 0:e.uid)!==null&&t!==void 0?t:null;this.lastNotifiedUid!==i&&(this.lastNotifiedUid=i,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,i,r){if(this._deleted)return()=>{};let s=typeof t=="function"?t:t.next.bind(t),o=!1,c=this._isInitialized?Promise.resolve():this._initializationPromise;if(f(c,this,"internal-error"),c.then(()=>{o||s(this.currentUser)}),typeof t=="function"){let l=e.addObserver(t,i,r);return()=>{o=!0,l()}}else{let l=e.addObserver(t);return()=>{o=!0,l()}}}directlySetCurrentUser(e){return a(this,null,function*(){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?yield this.assertedPersistence.setCurrentUser(e):yield this.assertedPersistence.removeCurrentUser()})}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return f(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Li(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return a(this,null,function*(){var e;let t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);let i=yield(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getHeartbeatsHeader();i&&(t["X-Firebase-Client"]=i);let r=yield this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),t})}_getAppCheckToken(){return a(this,null,function*(){var e;if(I(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;let t=yield(e=this.appCheckServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getToken();return t?.error&&pc(`Error while retrieving App Check token: ${t.error}`),t?.token})}};function v(n){return g(n)}var Gt=class{constructor(e){this.auth=e,this.observer=null,this.addObserver=Ot(t=>this.observer=t)}get next(){return f(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}};var _t={loadJS(){return a(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Dc(n){_t=n}function Mi(n){return _t.loadJS(n)}function Lc(){return _t.recaptchaV2Script}function Mc(){return _t.recaptchaEnterpriseScript}function xc(){return _t.gapiScript}function no(n){return`__${n}${Math.floor(Math.random()*1e6)}`}var Uc=500,Fc=6e4,Ft=1e12,ai=class{constructor(e){this.auth=e,this.counter=Ft,this._widgets=new Map}render(e,t){let i=this.counter;return this._widgets.set(i,new ui(e,this.auth.name,t||{})),this.counter++,i}reset(e){var t;let i=e||Ft;(t=this._widgets.get(i))===null||t===void 0||t.delete(),this._widgets.delete(i)}getResponse(e){var t;let i=e||Ft;return((t=this._widgets.get(i))===null||t===void 0?void 0:t.getResponse())||""}execute(e){return a(this,null,function*(){var t;let i=e||Ft;return(t=this._widgets.get(i))===null||t===void 0||t.execute(),""})}},ci=class{constructor(){this.enterprise=new li}ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}},li=class{ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}},ui=class{constructor(e,t,i){this.params=i,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=()=>{this.execute()};let r=typeof e=="string"?document.getElementById(e):e;f(r,"argument-error",{appName:t}),this.container=r,this.isVisible=this.params.size!=="invisible",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=Vc(50);let{callback:e,"expired-callback":t}=this.params;if(e)try{e(this.responseToken)}catch(i){}this.timerId=window.setTimeout(()=>{if(this.timerId=null,this.responseToken=null,t)try{t()}catch(i){}this.isVisible&&this.execute()},Fc)},Uc))}checkIfDeleted(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")}};function Vc(n){let e=[],t="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let i=0;i<n;i++)e.push(t.charAt(Math.floor(Math.random()*t.length)));return e.join("")}var Wc="recaptcha-enterprise",nt="NO_RECAPTCHA",qt=class{constructor(e){this.type=Wc,this.auth=v(e)}verify(e="verify",t=!1){return a(this,null,function*(){function i(s){return a(this,null,function*(){if(!t){if(s.tenantId==null&&s._agentRecaptchaConfig!=null)return s._agentRecaptchaConfig.siteKey;if(s.tenantId!=null&&s._tenantRecaptchaConfigs[s.tenantId]!==void 0)return s._tenantRecaptchaConfigs[s.tenantId].siteKey}return new Promise((o,c)=>
21a(null,null,function*(){$s(s,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(l=>{if(l.recaptchaKey===void 0)c(new Error("recaptcha Enterprise site key undefined"));else{let u=new Bt(l);return s.tenantId==null?s._agentRecaptchaConfig=u:s._tenantRecaptchaConfigs[s.tenantId]=u,o(u.siteKey)}}).catch(l=>{c(l)})}))})}function r(s,o,c){let l=window.grecaptcha;bs(l)?l.enterprise.ready(()=>{l.enterprise.execute(s,{action:e}).then(u=>{o(u)}).catch(()=>{o(nt)})}):c(Error("No reCAPTCHA enterprise script loaded."))}return this.auth.settings.appVerificationDisabledForTesting?new ci().execute("siteKey",{action:"verify"}):new Promise((s,o)=>{i(this.auth).then(c=>{if(!t&&bs(window.grecaptcha))r(c,s,o);else{if(typeof window>"u"){o(new Error("RecaptchaVerifier is only supported in browser"));return}let l=Mc();l.length!==0&&(l+=c),Mi(l).then(()=>{r(c,s,o)}).catch(u=>{o(u)})}}).catch(c=>{o(c)})})})}};function Qe(n,e,t,i=!1,r=!1){return a(this,null,function*(){let s=new qt(n),o;if(r)o=nt;else try{o=yield s.verify(t)}catch(l){o=yield s.verify(t,!0)}let c=Object.assign({},e);if(t==="mfaSmsEnrollment"||t==="mfaSmsSignIn"){if("phoneEnrollmentInfo"in c){let l=c.phoneEnrollmentInfo.phoneNumber,u=c.phoneEnrollmentInfo.recaptchaToken;Object.assign(c,{phoneEnrollmentInfo:{phoneNumber:l,recaptchaToken:u,captchaResponse:o,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in c){let l=c.phoneSignInInfo.recaptchaToken;Object.assign(c,{phoneSignInInfo:{recaptchaToken:l,captchaResponse:o,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return c}return i?Object.assign(c,{captchaResp:o}):Object.assign(c,{captchaResponse:o}),Object.assign(c,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(c,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),c})}function ae(n,e,t,i,r){return a(this,null,function*(){var s,o;if(r==="EMAIL_PASSWORD_PROVIDER")if(!((s=n._getRecaptchaConfig())===null||s===void 0)&&s.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){let c=yield Qe(n,e,t,t==="getOobCode");return i(n,c)}else return i(n,e).catch(c=>a(null,null,function*(){if(c.code==="auth/missing-recaptcha-token"){console.log(`${t} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);let l=yield Qe(n,e,t,t==="getOobCode");return i(n,l)}else return Promise.reject(c)}));else if(r==="PHONE_PROVIDER")if(!((o=n._getRecaptchaConfig())===null||o===void 0)&&o.isProviderEnabled("PHONE_PROVIDER")){let c=yield Qe(n,e,t);return i(n,c).catch(l=>a(null,null,function*(){var u;if(((u=n._getRecaptchaConfig())===null||u===void 0?void 0:u.getProviderEnforcementState("PHONE_PROVIDER"))==="AUDIT"&&(l.code==="auth/missing-recaptcha-token"||l.code==="auth/invalid-app-credential")){console.log(`Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ${t} flow.`);let h=yield Qe(n,e,t,!1,!0);return i(n,h)}return Promise.reject(l)}))}else{let c=yield Qe(n,e,t,!1,!0);return i(n,c)}else return Promise.reject(r+" provider is not supported.")})}function Hc(n){return a(this,null,function*(){let e=v(n),t=yield $s(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}),i=new Bt(t);e.tenantId==null?e._agentRecaptchaConfig=i:e._tenantRecaptchaConfigs[e.tenantId]=i,i.isAnyProviderEnabled()&&new qt(e).verify()})}function io(n,e){let t=Xe(n,"auth");if(t.isInitialized()){let r=t.getImmediate(),s=t.getOptions();if(ne(s,e??{}))return r;T(r,"already-initialized")}return t.initialize({options:e})}function Bc(n,e){let t=e?.persistence||[],i=(Array.isArray(t)?t:[t]).map(C);e?.errorMap&&n._updateErrorMap(e.errorMap),n._initializeWithPersistence(i,e?.popupRedirectResolver)}function nn(n,e,t){let i=v(n);f(/^https?:\/\//.test(e),i,"invalid-emulator-scheme");let r=!!t?.disableWarnings,s=ro(e),{host:o,port:c}=jc(e),l=c===null?"":`:${c}`,u={url:`${s}//${o}${l}/`},h=Object.freeze({host:o,port:c,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:r})});if(!i._canInitEmulator){f(i.config.emulator&&i.emulatorConfig,i,"emulator-config-failed"),f(ne(u,i.config.emulator)&&ne(h,i.emulatorConfig),i,"emulator-config-failed");return}i.config.emulator=u,i.emulatorConfig=h,i.settings.appVerificationDisabledForTesting=!0,qe(o)?(zr(`${s}//${o}${l}`),Gr("Auth",!0)):r||$c()}function ro(n){let e=n.indexOf(":");return e<0?"":n.substr(0,e+1)}function jc(n){let e=ro(n),t=/(\/\/)?([^?#/]+)/.exec(n.substr(e.length));if(!t)return{host:"",port:null};let i=t[2].split("@").pop()||"",r=/^(\[[^\]]+\])(:|$)/.exec(i);if(r){let s=r[1];return{host:s,port:Ps(i.substr(s.length+1))}}else{let[s,o]=i.split(":");return{host:s,port:Ps(o)}}}
21function Ps(n){if(!n)return null;let e=Number(n);return isNaN(e)?null:e}function $c(){function n(){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)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",n):n())}var G=class{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return $("not implemented")}_getIdTokenResponse(e){return $("not implemented")}_linkToIdToken(e,t){return $("not implemented")}_getReauthenticationResolver(e){return $("not implemented")}};function so(n,e){return a(this,null,function*(){return E(n,"POST","/v1/accounts:resetPassword",y(n,e))})}function zc(n,e){return a(this,null,function*(){return E(n,"POST","/v1/accounts:update",e)})}function Gc(n,e){return a(this,null,function*(){return E(n,"POST","/v1/accounts:signUp",e)})}function qc(n,e){return a(this,null,function*(){return E(n,"POST","/v1/accounts:update",y(n,e))})}function Kc(n,e){return a(this,null,function*(){return ee(n,"POST","/v1/accounts:signInWithPassword",y(n,e))})}function rn(n,e){return a(this,null,function*(){return E(n,"POST","/v1/accounts:sendOobCode",y(n,e))})}function Yc(n,e){return a(this,null,function*(){return rn(n,e)})}function Jc(n,e){return a(this,null,function*(){return rn(n,e)})}function Xc(n,e){return a(this,null,function*(){return rn(n,e)})}function Qc(n,e){return a(this,null,function*(){return rn(n,e)})}function Zc(n,e){return a(this,null,function*(){return ee(n,"POST","/v1/accounts:signInWithEmailLink",y(n,e))})}function el(n,e){return a(this,null,function*(){return ee(n,"POST","/v1/accounts:signInWithEmailLink",y(n,e))})}var lt=class n extends G{constructor(e,t,i,r=null){super("password",i),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new n(e,t,"password")}static _fromEmailAndCode(e,t,i=null){return new n(e,t,"emailLink",i)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let t=typeof e=="string"?JSON.parse(e):e;if(t?.email&&t?.password){if(t.signInMethod==="password")return this._fromEmailAndPassword(t.email,t.password);if(t.signInMethod==="emailLink")return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}_getIdTokenResponse(e){return a(this,null,function*(){switch(this.signInMethod){case"password":let t={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return ae(e,t,"signInWithPassword",Kc,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return Zc(e,{email:this._email,oobCode:this._password});default:T(e,"internal-error")}})}_linkToIdToken(e,t){return a(this,null,function*(){switch(this.signInMethod){case"password":let i={idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return ae(e,i,"signUpPassword",Gc,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return el(e,{idToken:t,email:this._email,oobCode:this._password});default:T(e,"internal-error")}})}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}};function Q(n,e){return a(this,null,function*(){return ee(n,"POST","/v1/accounts:signInWithIdp",y(n,e))})}var tl="http://localhost",U=class n extends G{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let t=new n(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):T("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
21once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){let t=typeof e=="string"?JSON.parse(e):e,{providerId:i,signInMethod:r}=t,s=Ut(t,["providerId","signInMethod"]);if(!i||!r)return null;let o=new n(i,r);return o.idToken=s.idToken||void 0,o.accessToken=s.accessToken||void 0,o.secret=s.secret,o.nonce=s.nonce,o.pendingToken=s.pendingToken||null,o}_getIdTokenResponse(e){let t=this.buildRequest();return Q(e,t)}_linkToIdToken(e,t){let i=this.buildRequest();return i.idToken=t,Q(e,i)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,Q(e,t)}buildRequest(){let e={requestUri:tl,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=ve(t)}return e}};function Rs(n,e){return a(this,null,function*(){return E(n,"POST","/v1/accounts:sendVerificationCode",y(n,e))})}function nl(n,e){return a(this,null,function*(){return ee(n,"POST","/v1/accounts:signInWithPhoneNumber",y(n,e))})}function il(n,e){return a(this,null,function*(){let t=yield ee(n,"POST","/v1/accounts:signInWithPhoneNumber",y(n,e));if(t.temporaryProof)throw Ze(n,"account-exists-with-different-credential",t);return t})}var rl={USER_NOT_FOUND:"user-not-found"};function sl(n,e){return a(this,null,function*(){let t=Object.assign(Object.assign({},e),{operation:"REAUTH"});return ee(n,"POST","/v1/accounts:signInWithPhoneNumber",y(n,t),rl)})}var Ue=class n extends G{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new n({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new n({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return nl(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return il(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return sl(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:t,verificationId:i,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:i,code:r}}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){typeof e=="string"&&(e=JSON.parse(e));let{verificationId:t,verificationCode:i,phoneNumber:r,temporaryProof:s}=e;return!i&&!t&&!r&&!s?null:new n({verificationId:t,verificationCode:i,phoneNumber:r,temporaryProof:s})}};function ol(n){switch(n){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}}function al(n){let e=ie(De(n)).link,t=e?ie(De(e)).deep_link_id:null,i=ie(De(n)).deep_link_id;return(i?ie(De(i)).link:null)||i||t||e||n}var ut=class n{constructor(e){var t,i,r,s,o,c;let l=ie(De(e)),u=(t=l.apiKey)!==null&&t!==void 0?t:null,h=(i=l.oobCode)!==null&&i!==void 0?i:null,d=ol((r=l.mode)!==null&&r!==void 0?r:null);f(u&&h&&d,"argument-error"),this.apiKey=u,this.operation=d,this.code=h,this.continueUrl=(s=l.continueUrl)!==null&&s!==void 0?s:null,this.languageCode=(o=l.lang)!==null&&o!==void 0?o:null,this.tenantId=(c=l.tenantId)!==null&&c!==void 0?c:null}static parseLink(e){let t=al(e);try{return new n(t)}catch(i){return null}}};var vt=(()=>{class n{constructor(){this.providerId=n.PROVIDER_ID}static credential(t,i){return lt._fromEmailAndPassword(t,i)}static credentialWithLink(t,i){let r=ut.parseLink(i);return f(r,"argument-error"),lt._fromEmailAndCode(t,r.code,r.tenantId)}}n.PROVIDER_ID="password",n.EMAIL_PASSWORD_SIGN_IN_METHOD="password",n.EMAIL_LINK_SIGN_IN_METHOD="emailLink";return n})(),F=class{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}};var ue=class extends F{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}},Fe=class n extends ue{static credentialFromJSON(e){let t=typeof e=="string"?JSON.parse(e):e;return f("providerId"in t&&"signInMethod"in t,"argument-error"),U._fromParams(t)}credential(e){return this._credential(Object.assign(Object.assign({},e),{nonce:e.rawNonce}))}_credential(e){return f(e.idToken||e.accessToken,"argument-error"),U._fromParams(Object.assign(Object.assign({}
21,e),{providerId:this.providerId,signInMethod:this.providerId}))}static credentialFromResult(e){return n.oauthCredentialFromTaggedObject(e)}static credentialFromError(e){return n.oauthCredentialFromTaggedObject(e.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:i,oauthTokenSecret:r,pendingToken:s,nonce:o,providerId:c}=e;if(!i&&!r&&!t&&!s||!c)return null;try{return new n(c)._credential({idToken:t,accessToken:i,nonce:o,pendingToken:s})}catch(l){return null}}};var sn=(()=>{class n extends ue{constructor(){super("facebook.com")}static credential(t){return U._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.FACEBOOK_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return n.credentialFromTaggedObject(t)}static credentialFromError(t){return n.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return n.credential(t.oauthAccessToken)}catch(i){return null}}}n.FACEBOOK_SIGN_IN_METHOD="facebook.com",n.PROVIDER_ID="facebook.com";return n})(),on=(()=>{class n extends ue{constructor(){super("google.com"),this.addScope("profile")}static credential(t,i){return U._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.GOOGLE_SIGN_IN_METHOD,idToken:t,accessToken:i})}static credentialFromResult(t){return n.credentialFromTaggedObject(t)}static credentialFromError(t){return n.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;let{oauthIdToken:i,oauthAccessToken:r}=t;if(!i&&!r)return null;try{return n.credential(i,r)}catch(s){return null}}}n.GOOGLE_SIGN_IN_METHOD="google.com",n.PROVIDER_ID="google.com";return n})(),an=(()=>{class n extends ue{constructor(){super("github.com")}static credential(t){return U._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.GITHUB_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return n.credentialFromTaggedObject(t)}static credentialFromError(t){return n.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return n.credential(t.oauthAccessToken)}catch(i){return null}}}n.GITHUB_SIGN_IN_METHOD="github.com",n.PROVIDER_ID="github.com";return n})(),cl="http://localhost",Ee=class n extends G{constructor(e,t){super(e,e),this.pendingToken=t}_getIdTokenResponse(e){let t=this.buildRequest();return Q(e,t)}_linkToIdToken(e,t){let i=this.buildRequest();return i.idToken=t,Q(e,i)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,Q(e,t)}toJSON(){return{signInMethod:this.signInMethod,providerId:this.providerId,pendingToken:this.pendingToken}}static fromJSON(e){let t=typeof e=="string"?JSON.parse(e):e,{providerId:i,signInMethod:r,pendingToken:s}=t;return!i||!r||!s||i!==r?null:new n(i,s)}static _create(e,t){return new n(e,t)}buildRequest(){return{requestUri:cl,returnSecureToken:!0,pendingToken:this.pendingToken}}};var ll="saml.",dt=class n extends F{constructor(e){f(e.startsWith(ll),"argument-error"),super(e)}static credentialFromResult(e){return n.samlCredentialFromTaggedObject(e)}static credentialFromError(e){return n.samlCredentialFromTaggedObject(e.customData||{})}static credentialFromJSON(e){let t=Ee.fromJSON(e);return f(t,"argument-error"),t}static samlCredentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{pendingToken:t,providerId:i}=e;if(!t||!i)return null;try{return Ee._create(i,t)}catch(r){return null}}};var cn=(()=>{class n extends ue{constructor(){super("twitter.com")}static credential(t,i){return U._fromParams({providerId:n.PROVIDER_ID,signInMethod:n.TWITTER_SIGN_IN_METHOD,oauthToken:t,oauthTokenSecret:i})}static credentialFromResult(t){return n.credentialFromTaggedObject(t)}static credentialFromError(t){return n.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;let{oauthAccessToken:i,oauthTokenSecret:r}=t;if(!i||!r)return null;try{return n.credential(i,r)}catch(s){return null}}}n.TWITTER_SIGN_IN_METHOD="twitter.com",n.PROVIDER_ID="twitter.com";return n})();function oo(n,e){return a(this,null,function*(){return ee(n,"POST","/v1/accounts:signUp",y(n,e))})}var V=class n{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static _fromIdTokenResponse(e,t,i,r=!1){return a(this,null,function*(){let s=yield X._fromIdTokenResponse(e,i,r),o=Cs(i);return new n({user:s,providerId:o,_tokenResponse:i,operationType:t})})}static _forOperation(e,t,i){return a(this,null,function*(){yield e._updateTokensIfNecessary(i,!0);let r=Cs(i);
21return new n({user:e,providerId:r,_tokenResponse:i,operationType:t})})}};function Cs(n){return n.providerId?n.providerId:"phoneNumber"in n?"phone":null}function xi(n){return a(this,null,function*(){var e;if(I(n.app))return Promise.reject(R(n));let t=v(n);if(yield t._initializationPromise,!((e=t.currentUser)===null||e===void 0)&&e.isAnonymous)return new V({user:t.currentUser,providerId:null,operationType:"signIn"});let i=yield oo(t,{returnSecureToken:!0}),r=yield V._fromIdTokenResponse(t,"signIn",i,!0);return yield t._updateCurrentUser(r.user),r})}var di=class n extends P{constructor(e,t,i,r){var s;super(t.code,t.message),this.operationType=i,this.user=r,Object.setPrototypeOf(this,n.prototype),this.customData={appName:e.name,tenantId:(s=e.tenantId)!==null&&s!==void 0?s:void 0,_serverResponse:t.customData._serverResponse,operationType:i}}static _fromErrorAndOperation(e,t,i,r){return new n(e,t,i,r)}};function ao(n,e,t,i){return(e==="reauthenticate"?t._getReauthenticationResolver(n):t._getIdTokenResponse(n)).catch(s=>{throw s.code==="auth/multi-factor-auth-required"?di._fromErrorAndOperation(n,s,e,i):s})}function co(n){return new Set(n.map(({providerId:e})=>e).filter(e=>!!e))}function Ui(n,e){return a(this,null,function*(){let t=g(n);yield ln(!0,t,e);let{providerUserInfo:i}=yield bc(t.auth,{idToken:yield t.getIdToken(),deleteProvider:[e]}),r=co(i||[]);return t.providerData=t.providerData.filter(s=>r.has(s.providerId)),r.has("phone")||(t.phoneNumber=null),yield t.auth._persistUserIfCurrent(t),t})}function Fi(n,e,t=!1){return a(this,null,function*(){let i=yield Z(n,e._linkToIdToken(n.auth,yield n.getIdToken()),t);return V._forOperation(n,"link",i)})}function ln(n,e,t){return a(this,null,function*(){yield ct(e);let i=co(e.providerData),r=n===!1?"provider-already-linked":"no-such-provider";f(i.has(t)===n,e.auth,r)})}function lo(n,e,t=!1){return a(this,null,function*(){let{auth:i}=n;if(I(i.app))return Promise.reject(R(i));let r="reauthenticate";try{let s=yield Z(n,ao(i,r,e,n),t);f(s.idToken,i,"internal-error");let o=tn(s.idToken);f(o,i,"internal-error");let{sub:c}=o;return f(n.uid===c,i,"user-mismatch"),V._forOperation(n,r,s)}catch(s){throw s?.code==="auth/user-not-found"&&T(i,"user-mismatch"),s}})}function uo(n,e,t=!1){return a(this,null,function*(){if(I(n.app))return Promise.reject(R(n));let i="signIn",r=yield ao(n,i,e),s=yield V._fromIdTokenResponse(n,i,r);return t||(yield n._updateCurrentUser(s.user)),s})}function Be(n,e){return a(this,null,function*(){return uo(v(n),e)})}function un(n,e){return a(this,null,function*(){let t=g(n);return yield ln(!1,t,e.providerId),Fi(t,e)})}function dn(n,e){return a(this,null,function*(){return lo(g(n),e)})}function ul(n,e){return a(this,null,function*(){return ee(n,"POST","/v1/accounts:signInWithCustomToken",y(n,e))})}function Vi(n,e){return a(this,null,function*(){if(I(n.app))return Promise.reject(R(n));let t=v(n),i=yield ul(t,{token:e,returnSecureToken:!0}),r=yield V._fromIdTokenResponse(t,"signIn",i);return yield t._updateCurrentUser(r.user),r})}var we=class{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?hi._fromServerResponse(e,t):"totpInfo"in t?fi._fromServerResponse(e,t):T(e,"internal-error")}},hi=class n extends we{constructor(e){super("phone",e),this.phoneNumber=e.phoneInfo}static _fromServerResponse(e,t){return new n(t)}},fi=class n extends we{constructor(e){super("totp",e)}static _fromServerResponse(e,t){return new n(t)}};function hn(n,e,t){var i;f(((i=t.url)===null||i===void 0?void 0:i.length)>0,n,"invalid-continue-uri"),f(typeof t.dynamicLinkDomain>"u"||t.dynamicLinkDomain.length>0,n,"invalid-dynamic-link-domain"),f(typeof t.linkDomain>"u"||t.linkDomain.length>0,n,"invalid-hosting-link-domain"),e.continueUrl=t.url,e.dynamicLinkDomain=t.dynamicLinkDomain,e.linkDomain=t.linkDomain,e.canHandleCodeInApp=t.handleCodeInApp,t.iOS&&(f(t.iOS.bundleId.length>0,n,"missing-ios-bundle-id"),e.iOSBundleId=t.iOS.bundleId),t.android&&(f(t.android.packageName.length>0,n,"missing-android-pkg-name"),e.androidInstallApp=t.android.installApp,e.androidMinimumVersionCode=t.android.minimumVersion,e.androidPackageName=t.android.packageName)}function Wi(n){return a(this,null,function*(){let e=v(n);e._getPasswordPolicyInternal()&&(yield e._updatePasswordPolicy())})}function Hi(n,e,t){return a(this,null,function*(){let i=v(n),r={requestType:"PASSWORD_RESET",email:e,clientType:"CLIENT_TYPE_WEB"};t&&hn(i,r,t),yield ae(i,r,"getOobCode",Jc,"EMAIL_PASSWORD_PROVIDER")})}function Bi(n,e,t){return a(this,null,function*(){yield so(g(n),{oobCode:e,newPassword:t}).catch(i=>a(null,null,function*(){throw i.code==="auth/password-does-not-meet-requirements"&&Wi(n),i}))})}function ji(n,e){return a(this,null,function*(){yield qc(g(n),{oobCode:e})})}function fn(n,e){return a(this,null,function*(){let t=g(n),i=yield so(t,{oobCode:e}),r=i.requestType;switch(f(r,t,"internal-error"),r){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":f(i.newEmail,t,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":f(i.mfaInfo,t,"internal-error");default:f(i.email,t,"internal-error")}let s=null;return i.mfaInfo&&(s=we._fromServerResponse(v(t),i.mfaInfo)),{data:{email:(i.requestType==="VERIFY_AND_CHANGE_EMAIL"?i.newEmail:i.email)||null,previousEmail:(i.requestType==="VERIFY_AND_CHANGE_EMAIL"?i.email:i.newEmail)||null,multiFactorInfo:s},operation:r}})}function $i(n,e){return a(this,null,function*(){let{data:t}=yield fn(g(n),e);return t.email})}function zi(n,e,t){return a(this,null,function*(){if(I(n.app))return Promise.reject(R(n));let i=v(n),o=yield ae(i,{returnSecureToken:!0,email:e,password:t,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",oo,"EMAIL_PASSWORD_PROVIDER").catch(l=>{throw l.code==="auth/password-does-not-meet-requirements"&&Wi(n),l}),c=yield V._fromIdTokenResponse(i,"signIn",o);return yield i._updateCurrentUser(c.user),c})}function Gi(n,e,t){return I(n.app)?Promise.reject(R(n)):Be(g(n),vt.credential(e,t)).catch(i=>a(null,null,function*(){throw i.code==="auth/password-does-not-meet-requirements"&&Wi(n),i}))}function qi(n,e,t){return a(this,null,function*(){let i=v(n),r={requestType:"EMAIL_SIGNIN",email:e,clientType:"CLIENT_TYPE_WEB"};function s(o,c){f(c.handleCodeInApp,i,"argument-error"),c&&hn(i,o,c)}s(r,t),yield ae(i,r,"getOobCode",Xc,"EMAIL_PASSWORD_PROVIDER")})}function Ki(n,e){let t=ut.parseLink(e);return t?.operation==="EMAIL_SIGNIN"}function Yi(n,e,t){return a(this,null,function*(){if(I(n.app))return Promise.reject(R(n));let i=g(n),r=vt.credentialWithLink(e,t||st());return f(r._tenantId===(i.tenantId||null),i,"tenant-id-mismatch"),Be(i,r)})}function dl(n,e){return a(this,null,function*(){return E(n,"POST","/v1/accounts:createAuthUri",y(n,e))})}function Ji(n,e){return a(this,null,function*(){let t=Ni()?st():"http://localhost",i={identifier:e,continueUri:t},{signinMethods:r}=yield dl(g(n),i);return r||[]})}function Xi(n,e){return a(this,null,function*(){let t=g(n),r={requestType:"VERIFY_EMAIL",idToken:yield n.getIdToken()};e&&hn(t.auth,r,e);let{email:s}=yield Yc(t.auth,r);s!==n.email&&(yield n.reload())})}function Qi(n,e,t){return a(this,null,function*(){let i=g(n),s={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:yield n.getIdToken(),newEmail:e};t&&hn(i.auth,s,t);let{email:o}=yield Qc(i.auth,s);o!==n.email&&(yield n.reload())})}function hl(n,e){return a(this,null,function*(){return E(n,"POST","/v1/accounts:update",e)})}function Zi(i,r){return a(this,arguments,function*(n,{displayName:e,photoURL:t}){if(e===void 0&&t===void 0)return;let s=g(n),c={idToken:yield s.getIdToken(),displayName:e,photoUrl:t,returnSecureToken:!0},l=yield Z(s,hl(s.auth,c));s.displayName=l.displayName||null,s.photoURL=l.photoUrl||null;let u=s.providerData.find(({providerId:h})=>h==="password");u&&(u.displayName=s.displayName,u.photoURL=s.photoURL),yield s._updateTokensIfNecessary(l)})}function er(n,e){let t=g(n);return I(t.auth.app)?Promise.reject(R(t.auth)):ho(t,e,null)}function tr(n,e){return ho(g(n),null,e)}function ho(n,e,t){return a(this,null,function*(){let{auth:i}=n,s={idToken:yield n.getIdToken(),returnSecureToken:!0};e&&(s.email=e),t&&(s.password=t);let o=yield Z(n,zc(i,s));yield n._updateTokensIfNecessary(o,!0)})}function fl(n){var e,t;if(!n)return null;let{providerId:i}=n,r=n.rawUserInfo?JSON.parse(n.rawUserInfo):{},s=n.isNewUser||n.kind==="identitytoolkit#SignupNewUserResponse";if(!i&&n?.idToken){let o=(t=(e=tn(n.idToken))===null||e===void 0?void 0:e.firebase)===null||t===void 0?void 0:t.sign_in_provider;if(o){let c=o!=="anonymous"&&o!=="custom"?o:null;return new ce(s,c)}}if(!i)return null;switch(i){case"facebook.com":return new pi(s,r);case"github.com":return new mi(s,r);case"google.com":return new gi(s,r);case"twitter.com":return new _i(s,r,n.screenName||null);
21case"custom":case"anonymous":return new ce(s,null);default:return new ce(s,i,r)}}var ce=class{constructor(e,t,i={}){this.isNewUser=e,this.providerId=t,this.profile=i}},Kt=class extends ce{constructor(e,t,i,r){super(e,t,i),this.username=r}},pi=class extends ce{constructor(e,t){super(e,"facebook.com",t)}},mi=class extends Kt{constructor(e,t){super(e,"github.com",t,typeof t?.login=="string"?t?.login:null)}},gi=class extends ce{constructor(e,t){super(e,"google.com",t)}},_i=class extends Kt{constructor(e,t,i){super(e,"twitter.com",t,i)}};function nr(n){let{user:e,_tokenResponse:t}=n;return e.isAnonymous&&!t?{providerId:null,isNewUser:!1,profile:null}:fl(t)}function fo(n,e,t,i){return g(n).onIdTokenChanged(e,t,i)}function po(n,e,t){return g(n).beforeAuthStateChanged(e,t)}var Yt=class n{constructor(e,t,i){this.type=e,this.credential=t,this.user=i}static _fromIdtoken(e,t){return new n("enroll",e,t)}static _fromMfaPendingCredential(e){return new n("signin",e)}toJSON(){return{multiFactorSession:{[this.type==="enroll"?"idToken":"pendingCredential"]:this.credential}}}static fromJSON(e){var t,i;if(e?.multiFactorSession){if(!((t=e.multiFactorSession)===null||t===void 0)&&t.pendingCredential)return n._fromMfaPendingCredential(e.multiFactorSession.pendingCredential);if(!((i=e.multiFactorSession)===null||i===void 0)&&i.idToken)return n._fromIdtoken(e.multiFactorSession.idToken)}return null}};var vi=class n{constructor(e,t,i){this.session=e,this.hints=t,this.signInResolver=i}static _fromError(e,t){let i=v(e),r=t.customData._serverResponse,s=(r.mfaInfo||[]).map(c=>we._fromServerResponse(i,c));f(r.mfaPendingCredential,i,"internal-error");let o=Yt._fromMfaPendingCredential(r.mfaPendingCredential);return new n(o,s,c=>a(null,null,function*(){let l=yield c._process(i,o);delete r.mfaInfo,delete r.mfaPendingCredential;let u=Object.assign(Object.assign({},r),{idToken:l.idToken,refreshToken:l.refreshToken});switch(t.operationType){case"signIn":let h=yield V._fromIdTokenResponse(i,t.operationType,u);return yield i._updateCurrentUser(h.user),h;case"reauthenticate":return f(t.user,i,"internal-error"),V._forOperation(t.user,t.operationType,u);default:T(i,"internal-error")}}))}resolveSignIn(e){return a(this,null,function*(){let t=e;return this.signInResolver(t)})}};function ir(n,e){var t;let i=g(n),r=e;return f(e.customData.operationType,i,"argument-error"),f((t=r.customData._serverResponse)===null||t===void 0?void 0:t.mfaPendingCredential,i,"argument-error"),vi._fromError(i,r)}function Os(n,e){return E(n,"POST","/v2/accounts/mfaEnrollment:start",y(n,e))}function pl(n,e){return E(n,"POST","/v2/accounts/mfaEnrollment:finalize",y(n,e))}function ml(n,e){return E(n,"POST","/v2/accounts/mfaEnrollment:withdraw",y(n,e))}var Ii=class n{constructor(e){this.user=e,this.enrolledFactors=[],e._onReload(t=>{t.mfaInfo&&(this.enrolledFactors=t.mfaInfo.map(i=>we._fromServerResponse(e.auth,i)))})}static _fromUser(e){return new n(e)}getSession(){return a(this,null,function*(){return Yt._fromIdtoken(yield this.user.getIdToken(),this.user)})}enroll(e,t){return a(this,null,function*(){let i=e,r=yield this.getSession(),s=yield Z(this.user,i._process(this.user.auth,r,t));return yield this.user._updateTokensIfNecessary(s),this.user.reload()})}unenroll(e){return a(this,null,function*(){let t=typeof e=="string"?e:e.uid,i=yield this.user.getIdToken();try{let r=yield Z(this.user,ml(this.user.auth,{idToken:i,mfaEnrollmentId:t}));this.enrolledFactors=this.enrolledFactors.filter(({uid:s})=>s!==t),yield this.user._updateTokensIfNecessary(r),yield this.user.reload()}catch(r){throw r}})}},Zn=new WeakMap;function rr(n){let e=g(n);return Zn.has(e)||Zn.set(e,Ii._fromUser(e)),Zn.get(e)}var Jt="__sak";var Xt=class{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(Jt,"1"),this.storage.removeItem(Jt),Promise.resolve(!0)):Promise.resolve(!1)}catch(e){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()}};var gl=1e3,_l=10,vl=(()=>{class n extends Xt{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(t,i)=>this.onStorageEvent(t,i),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=to(),this._shouldAllowMigration=!0}forAllChangedKeys(t){for(let i of Object.keys(this.listeners)){let r=this.storage.getItem(i),s=this.localCache[i];r!==s&&t(i,s,r)}}onStorageEvent(t,i=!1){if(!t.key){this.forAllChangedKeys((c,l,u)=>{this.notifyListeners(c,u)});return}let r=t.key;i?this.detachListener():this.stopPolling();let s=()=>{let c=this.storage.getItem(r);!i&&this.localCache[r]===c||this.notifyListeners(r,c)},o=this.storage.getItem(r);Oc()&&o!==t.newValue&&t.newValue!==t.oldValue?setTimeout(s,_l):s()}notifyListeners(t,i){this.localCache[t]=i;let r=this.listeners[t];if(r)for(let s of Array.from(r))s(i&&JSON.parse(i))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((t,i,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:i,newValue:r}),!0)})},gl)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(t,i){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[t]||(this.listeners[t]=new Set,this.localCache[t]=this.storage.getItem(t)),this.listeners[t].add(i)}_removeListener(t,i){this.listeners[t]&&(this.listeners[t].delete(i),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}_set(t,i){return a(this,null,function*(){yield ge(n.prototype,this,"_set").call(this,t,i),this.localCache[t]=JSON.stringify(i)})}_get(t){return a(this,null,function*(){let i=yield ge(n.prototype,this,"_get").call(this,t);return this.localCache[t]=JSON.stringify(i),i})}_remove(t){return a(this,null,function*(){yield ge(n.prototype,this,"_remove").call(this,t),delete this.localCache[t]})}}return n.type="LOCAL",n})(),Ae=vl;var Il=(()=>{class n extends Xt{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(t,i){}_removeListener(t,i){}}return n.type="SESSION",n})(),W=Il;function yl(n){return Promise.all(n.map(e=>a(null,null,function*(){try{return{fulfilled:!0,value:yield e}}catch(t){return{fulfilled:!1,reason:t}}})))}var El=(()=>{class n{constructor(t){this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){let i=this.receivers.find(s=>s.isListeningto(t));if(i)return i;let r=new n(t);return this.receivers.push(r),r}isListeningto(t){return this.eventTarget===t}handleEvent(t){return a(this,null,function*(){let i=t,{eventId:r,eventType:s,data:o}=i.data,c=this.handlersMap[s];if(!c?.size)return;i.ports[0].postMessage({status:"ack",eventId:r,eventType:s});let l=Array.from(c).map(h=>a(this,null,function*(){return h(i.origin,o)})),u=yield yl(l);i.ports[0].postMessage({status:"done",eventId:r,eventType:s,response:u})})}_subscribe(t,i){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[t]||(this.handlersMap[t]=new Set),this.handlersMap[t].add(i)}_unsubscribe(t,i){this.handlersMap[t]&&i&&this.handlersMap[t].delete(i),(!i||this.handlersMap[t].size===0)&&delete this.handlersMap[t],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}n.receivers=[];return n})();function Se(n="",e=10){let t="";for(let i=0;i<e;i++)t+=Math.floor(Math.random()*10);return n+t}var yi=class{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)}_send(e,t,i=50){return a(this,null,function*(){let r=typeof MessageChannel<"u"?new MessageChannel:null;if(!r)throw new Error("connection_unavailable");let s,o;return new Promise((c,l)=>{let u=Se("",20);r.port1.start();let h=setTimeout(()=>{l(new Error("unsupported_event"))},i);o={messageChannel:r,onMessage(d){let p=d;if(p.data.eventId===u)switch(p.data.status){case"ack":clearTimeout(h),s=setTimeout(()=>{l(new Error("timeout"))},3e3);break;case"done":clearTimeout(s),c(p.data.response);break;default:clearTimeout(h),clearTimeout(s),l(new Error("invalid_response"));break}}},this.handlers.add(o),r.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:u,data:t},[r.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})})}};function A(){return window}
21function wl(n){A().location.href=n}function sr(){return typeof A().WorkerGlobalScope<"u"&&typeof A().importScripts=="function"}function bl(){return a(this,null,function*(){if(!navigator?.serviceWorker)return null;try{return(yield navigator.serviceWorker.ready).active}catch(n){return null}})}function Tl(){var n;return((n=navigator?.serviceWorker)===null||n===void 0?void 0:n.controller)||null}function Al(){return sr()?self:null}var mo="firebaseLocalStorageDb",Sl=1,Qt="firebaseLocalStorage",go="fbase_key",be=class{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 pn(n,e){return n.transaction([Qt],e?"readwrite":"readonly").objectStore(Qt)}function Pl(){let n=indexedDB.deleteDatabase(mo);return new be(n).toPromise()}function Ei(){let n=indexedDB.open(mo,Sl);return new Promise((e,t)=>{n.addEventListener("error",()=>{t(n.error)}),n.addEventListener("upgradeneeded",()=>{let i=n.result;try{i.createObjectStore(Qt,{keyPath:go})}catch(r){t(r)}}),n.addEventListener("success",()=>a(null,null,function*(){let i=n.result;i.objectStoreNames.contains(Qt)?e(i):(i.close(),yield Pl(),e(yield Ei()))}))})}function ks(n,e,t){return a(this,null,function*(){let i=pn(n,!0).put({[go]:e,value:t});return new be(i).toPromise()})}function Rl(n,e){return a(this,null,function*(){let t=pn(n,!1).get(e),i=yield new be(t).toPromise();return i===void 0?null:i.value})}function Ns(n,e){let t=pn(n,!0).delete(e);return new be(t).toPromise()}var Cl=800,Ol=3,kl=(()=>{class n{constructor(){this.type="LOCAL",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(()=>{},()=>{})}_openDb(){return a(this,null,function*(){return this.db?this.db:(this.db=yield Ei(),this.db)})}_withRetries(t){return a(this,null,function*(){let i=0;for(;;)try{let r=yield this._openDb();return yield t(r)}catch(r){if(i++>Ol)throw r;this.db&&(this.db.close(),this.db=void 0)}})}initializeServiceWorkerMessaging(){return a(this,null,function*(){return sr()?this.initializeReceiver():this.initializeSender()})}initializeReceiver(){return a(this,null,function*(){this.receiver=El._getInstance(Al()),this.receiver._subscribe("keyChanged",(t,i)=>a(this,null,function*(){return{keyProcessed:(yield this._poll()).includes(i.key)}})),this.receiver._subscribe("ping",(t,i)=>a(this,null,function*(){return["keyChanged"]}))})}initializeSender(){return a(this,null,function*(){var t,i;if(this.activeServiceWorker=yield bl(),!this.activeServiceWorker)return;this.sender=new yi(this.activeServiceWorker);let r=yield this.sender._send("ping",{},800);r&&!((t=r[0])===null||t===void 0)&&t.fulfilled&&!((i=r[0])===null||i===void 0)&&i.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)})}notifyServiceWorker(t){return a(this,null,function*(){if(!(!this.sender||!this.activeServiceWorker||Tl()!==this.activeServiceWorker))try{yield this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50)}catch(i){}})}_isAvailable(){return a(this,null,function*(){try{if(!indexedDB)return!1;let t=yield Ei();return yield ks(t,Jt,"1"),yield Ns(t,Jt),!0}catch(t){}return!1})}_withPendingWrite(t){return a(this,null,function*(){this.pendingWrites++;try{yield t()}finally{this.pendingWrites--}})}_set(t,i){return a(this,null,function*(){return this._withPendingWrite(()=>a(this,null,function*(){return yield this._withRetries(r=>ks(r,t,i)),this.localCache[t]=i,this.notifyServiceWorker(t)}))})}_get(t){return a(this,null,function*(){let i=yield this._withRetries(r=>Rl(r,t));return this.localCache[t]=i,i})}_remove(t){return a(this,null,function*(){return this._withPendingWrite(()=>a(this,null,function*(){return yield this._withRetries(i=>Ns(i,t)),delete this.localCache[t],this.notifyServiceWorker(t)}))})}_poll(){return a(this,null,function*(){let t=yield this._withRetries(s=>{let o=pn(s,!1).getAll();return new be(o).toPromise()});if(!t)return[];if(this.pendingWrites!==0)return[];let i=[],r=new Set;if(t.length!==0)for(let{fbase_key:s,value:o}of t)r.add(s),JSON.stringify(this.localCache[s])!==JSON.stringify(o)&&(this.notifyListeners(s,o),i.push(s));for(let s of Object.keys(this.localCache))this.localCache[s]&&!r.has(s)&&(this.notifyListeners(s,null),i.push(s));return i})}notifyListeners(t,i){this.localCache[t]=i;let r=this.listeners[t];if(r)for(let s of Array.from(r))s(i)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>a(this,null,function*(){return this._poll()}),Cl)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(t,i){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[t]||(this.listeners[t]=new Set,this._get(t)),this.listeners[t].add(i)}_removeListener(t,i){this.listeners[t]&&(this.listeners[t].delete(i),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&this.stopPolling()}}return n.type="LOCAL",n})(),he=kl;function Ds(n,e){return E(n,"POST","/v2/accounts/mfaSignIn:start",y(n,e))}function Nl(n,e){return E(n,"POST","/v2/accounts/mfaSignIn:finalize",y(n,e))}var ei=no("rcb"),Dl=new ye(3e4,6e4),wi=class{constructor(){var e;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(!((e=A().grecaptcha)===null||e===void 0)&&e.render)}load(e,t=""){return f(Ll(t),e,"argument-error"),this.shouldResolveImmediately(t)&&ws(A().grecaptcha)?Promise.resolve(A().grecaptcha):new Promise((i,r)=>{let s=A().setTimeout(()=>{r(S(e,"network-request-failed"))},Dl.get());A()[ei]=()=>{A().clearTimeout(s),delete A()[ei];let c=A().grecaptcha;if(!c||!ws(c)){r(S(e,"internal-error"));return}let l=c.render;c.render=(u,h)=>{let d=l(u,h);return this.counter++,d},this.hostLanguage=t,i(c)};let o=`${Lc()}?${ve({onload:ei,render:"explicit",hl:t})}`;Mi(o).catch(()=>{clearTimeout(s),r(S(e,"internal-error"))})})}clearedOneInstance(){this.counter--}shouldResolveImmediately(e){var t;return!!(!((t=A().grecaptcha)===null||t===void 0)&&t.render)&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)}};function Ll(n){return n.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(n)}var bi=class{load(e){return a(this,null,function*(){return new ai(e)})}clearedOneInstance(){}};var it="recaptcha",Ml={theme:"light",type:"image"},ht=class{constructor(e,t,i=Object.assign({},Ml)){this.parameters=i,this.type=it,this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=v(e),this.isInvisible=this.parameters.size==="invisible",f(typeof document<"u",this.auth,"operation-not-supported-in-this-environment");let r=typeof t=="string"?document.getElementById(t):t;f(r,this.auth,"argument-error"),this.container=r,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new bi:new wi,this.validateStartingState()}verify(){return a(this,null,function*(){this.assertNotDestroyed();let e=yield this.render(),t=this.getAssertedRecaptcha(),i=t.getResponse(e);return i||new Promise(r=>{let s=o=>{o&&(this.tokenChangeListeners.delete(s),r(o))};this.tokenChangeListeners.add(s),this.isInvisible&&t.execute(e)})})}render(){try{this.assertNotDestroyed()}catch(e){return Promise.reject(e)}return this.renderPromise?this.renderPromise:(this.renderPromise=this.makeRenderPromise().catch(e=>{throw this.renderPromise=null,e}),this.renderPromise)}_reset(){this.assertNotDestroyed(),this.widgetId!==null&&this.getAssertedRecaptcha().reset(this.widgetId)}clear(){this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEac
21h(e=>{this.container.removeChild(e)})}validateStartingState(){f(!this.parameters.sitekey,this.auth,"argument-error"),f(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),f(typeof document<"u",this.auth,"operation-not-supported-in-this-environment")}makeTokenCallback(e){return t=>{if(this.tokenChangeListeners.forEach(i=>i(t)),typeof e=="function")e(t);else if(typeof e=="string"){let i=A()[e];typeof i=="function"&&i(t)}}}assertNotDestroyed(){f(!this.destroyed,this.auth,"internal-error")}makeRenderPromise(){return a(this,null,function*(){if(yield 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})}init(){return a(this,null,function*(){f(Ni()&&!sr(),this.auth,"internal-error"),yield xl(),this.recaptcha=yield this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0);let e=yield Ec(this.auth);f(e,this.auth,"internal-error"),this.parameters.sitekey=e})}getAssertedRecaptcha(){return f(this.recaptcha,this.auth,"internal-error"),this.recaptcha}};function xl(){let n=null;return new Promise(e=>{if(document.readyState==="complete"){e();return}n=()=>e(),window.addEventListener("load",n)}).catch(e=>{throw n&&window.removeEventListener("load",n),e})}var ft=class{constructor(e,t){this.verificationId=e,this.onConfirmation=t}confirm(e){let t=Ue._fromVerification(this.verificationId,e);return this.onConfirmation(t)}};function or(n,e,t){return a(this,null,function*(){if(I(n.app))return Promise.reject(R(n));let i=v(n),r=yield mn(i,e,g(t));return new ft(r,s=>Be(i,s))})}function ar(n,e,t){return a(this,null,function*(){let i=g(n);yield ln(!1,i,"phone");let r=yield mn(i.auth,e,g(t));return new ft(r,s=>un(i,s))})}function cr(n,e,t){return a(this,null,function*(){let i=g(n);if(I(i.auth.app))return Promise.reject(R(i.auth));let r=yield mn(i.auth,e,g(t));return new ft(r,s=>dn(i,s))})}function mn(n,e,t){return a(this,null,function*(){var i;if(!n._getRecaptchaConfig())try{yield Hc(n)}catch(r){console.log("Failed to initialize reCAPTCHA Enterprise config. Triggering the reCAPTCHA v2 verification.")}try{let r;if(typeof e=="string"?r={phoneNumber:e}:r=e,"session"in r){let s=r.session;if("phoneNumber"in r){f(s.type==="enroll",n,"internal-error");let o={idToken:s.credential,phoneEnrollmentInfo:{phoneNumber:r.phoneNumber,clientType:"CLIENT_TYPE_WEB"}};return(yield ae(n,o,"mfaSmsEnrollment",(h,d)=>a(null,null,function*(){if(d.phoneEnrollmentInfo.captchaResponse===nt){f(t?.type===it,h,"argument-error");let p=yield ti(h,d,t);return Os(h,p)}return Os(h,d)}),"PHONE_PROVIDER").catch(h=>Promise.reject(h))).phoneSessionInfo.sessionInfo}else{f(s.type==="signin",n,"internal-error");let o=((i=r.multiFactorHint)===null||i===void 0?void 0:i.uid)||r.multiFactorUid;f(o,n,"missing-multi-factor-info");let c={mfaPendingCredential:s.credential,mfaEnrollmentId:o,phoneSignInInfo:{clientType:"CLIENT_TYPE_WEB"}};return(yield ae(n,c,"mfaSmsSignIn",(d,p)=>a(null,null,function*(){if(p.phoneSignInInfo.captchaResponse===nt){f(t?.type===it,d,"argument-error");let m=yield ti(d,p,t);return Ds(d,m)}return Ds(d,p)}),"PHONE_PROVIDER").catch(d=>Promise.reject(d))).phoneResponseInfo.sessionInfo}}else{let s={phoneNumber:r.phoneNumber,clientType:"CLIENT_TYPE_WEB"};return(yield ae(n,s,"sendVerificationCode",(u,h)=>a(null,null,function*(){if(h.captchaResponse===nt){f(t?.type===it,u,"argument-error");let d=yield ti(u,h,t);return Rs(u,d)}return Rs(u,h)}),"PHONE_PROVIDER").catch(u=>Promise.reject(u))).sessionInfo}}finally{t?._reset()}})}function lr(n,e){return a(this,null,function*(){let t=g(n);if(I(t.auth.app))return Promise.reject(R(t.auth));yield Fi(t,e)})}function ti(n,e,t){return a(this,null,function*(){f(t.type===it,n,"argument-error");let i=yield t.verify();f(typeof i=="string",n,"argument-error");let r=Object.assign({},e);if("phoneEnrollmentInfo"in r){let s=r.phoneEnrollmentInfo.phoneNumber,o=r.phoneEnrollmentInfo.captchaResponse,c=r.phoneEnrollmentInfo.clientType,l=r.phoneEnrollmentInfo.recaptchaVersion;return Object.assign(r,{phoneEnrollmentInfo:{phoneNumber:s,recaptchaToken:i,captchaResponse:o,clientType:c,recaptchaVersion:l}}),r}else if("phoneSignInInfo"in r){let s=r.phoneSignInInfo.captchaResponse,o=r.phoneSignInInfo.clientType,c=r.phoneSignInInfo.recaptchaVersion;return Object.assign(r,{phoneSignInInfo:{recaptchaToken:i,captchaResponse:s,clientType:o,recaptchaVersion:c}}),r}else return Object.assign(r,{recaptchaToken:i}),r})}var Pe=(()=>{class n{constructor(t){this.providerId=n.PROVIDER_ID,this.auth=v(t)}
21verifyPhoneNumber(t,i){return mn(this.auth,t,g(i))}static credential(t,i){return Ue._fromVerification(t,i)}static credentialFromResult(t){let i=t;return n.credentialFromTaggedObject(i)}static credentialFromError(t){return n.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;let{phoneNumber:i,temporaryProof:r}=t;return i&&r?Ue._fromTokenResponse(i,r):null}}n.PROVIDER_ID="phone",n.PHONE_SIGN_IN_METHOD="phone";return n})();function Re(n,e){return e?C(e):(f(n._popupRedirectResolver,n,"argument-error"),n._popupRedirectResolver)}var pt=class extends G{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return Q(e,this._buildIdpRequest())}_linkToIdToken(e,t){return Q(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return Q(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 Ul(n){return uo(n.auth,new pt(n),n.bypassAuthState)}function Fl(n){let{auth:e,user:t}=n;return f(t,e,"internal-error"),lo(t,new pt(n),n.bypassAuthState)}function Vl(n){return a(this,null,function*(){let{auth:e,user:t}=n;return f(t,e,"internal-error"),Fi(t,new pt(n),n.bypassAuthState)})}var Zt=class{constructor(e,t,i,r,s=!1){this.auth=e,this.resolver=i,this.user=r,this.bypassAuthState=s,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise((e,t)=>a(this,null,function*(){this.pendingPromise={resolve:e,reject:t};try{this.eventManager=yield this.resolver._initialize(this.auth),yield this.onExecution(),this.eventManager.registerConsumer(this)}catch(i){this.reject(i)}}))}onAuthEvent(e){return a(this,null,function*(){let{urlResponse:t,sessionId:i,postBody:r,tenantId:s,error:o,type:c}=e;if(o){this.reject(o);return}let l={auth:this.auth,requestUri:t,sessionId:i,tenantId:s||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(yield this.getIdpTask(c)(l))}catch(u){this.reject(u)}})}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return Ul;case"linkViaPopup":case"linkViaRedirect":return Vl;case"reauthViaPopup":case"reauthViaRedirect":return Fl;default:T(this.auth,"internal-error")}}resolve(e){x(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){x(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}};var Wl=new ye(2e3,1e4);function ur(n,e,t){return a(this,null,function*(){if(I(n.app))return Promise.reject(S(n,"operation-not-supported-in-this-environment"));let i=v(n);Ve(n,e,F);let r=Re(i,t);return new fr(i,"signInViaPopup",e,r).executeNotNull()})}function dr(n,e,t){return a(this,null,function*(){let i=g(n);if(I(i.auth.app))return Promise.reject(S(i.auth,"operation-not-supported-in-this-environment"));Ve(i.auth,e,F);let r=Re(i.auth,t);return new fr(i.auth,"reauthViaPopup",e,r,i).executeNotNull()})}function hr(n,e,t){return a(this,null,function*(){let i=g(n);Ve(i.auth,e,F);let r=Re(i.auth,t);return new fr(i.auth,"linkViaPopup",e,r,i).executeNotNull()})}var fr=(()=>{class n extends Zt{constructor(t,i,r,s,o){super(t,i,s,o),this.provider=r,this.authWindow=null,this.pollId=null,n.currentPopupAction&&n.currentPopupAction.cancel(),n.currentPopupAction=this}executeNotNull(){return a(this,null,function*(){let t=yield this.execute();return f(t,this.auth,"internal-error"),t})}onExecution(){return a(this,null,function*(){x(this.filter.length===1,"Popup operations only handle one event");let t=Se();this.authWindow=yield this.resolver._openPopup(this.auth,this.provider,this.filter[0],t),this.authWindow.associatedEvent=t,this.resolver._originValidation(this.auth).catch(i=>{this.reject(i)}),this.resolver._isIframeWebStorageSupported(this.auth,i=>{i||this.reject(S(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()})}get eventId(){var t;return((t=this.authWindow)===null||t===void 0?void 0:t.associatedEvent)||null}cancel(){this.reject(S(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,n.currentPopupAction=null}pollUserCancellation(){let t=()=>{var i,r;if(!((r=(i=this.authWindow)===null||i===void 0?void 0:i.window)===null||r===void 0)&&r.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(S(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(t,Wl.get())};t()}}n.currentPopupAction=null;return n})(),Hl="pendingRedirect",rt=new Map,Ti=class n extends Zt{constructor(e,t,i=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,i),this.eventId=null}execute(){return a(this,null,function*(){let e=rt.get(this.auth._key());if(!e){try{let i=(yield Bl(this.resolver,this.auth))?yield ge(n.prototype,this,"execute").call(this):null;e=()=>Promise.resolve(i)}catch(t){e=()=>Promise.reject(t)}rt.set(this.auth._key(),e)}return this.bypassAuthState||rt.set(this.auth._key(),()=>Promise.resolve(null)),e()})}
21onAuthEvent(e){return a(this,null,function*(){if(e.type==="signInViaRedirect")return ge(n.prototype,this,"onAuthEvent").call(this,e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){let t=yield this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,ge(n.prototype,this,"onAuthEvent").call(this,e);this.resolve(null)}})}onExecution(){return a(this,null,function*(){})}cleanUp(){}};function Bl(n,e){return a(this,null,function*(){let t=Io(e),i=vo(n);if(!(yield i._isAvailable()))return!1;let r=(yield i._get(t))==="true";return yield i._remove(t),r})}function pr(n,e){return a(this,null,function*(){return vo(n)._set(Io(e),"true")})}function _o(){rt.clear()}function je(n,e){rt.set(n._key(),e)}function vo(n){return C(n._redirectPersistence)}function Io(n){return z(Hl,n.config.apiKey,n.name)}function mr(n,e,t){return jl(n,e,t)}function jl(n,e,t){return a(this,null,function*(){if(I(n.app))return Promise.reject(R(n));let i=v(n);Ve(n,e,F),yield i._initializationPromise;let r=Re(i,t);return yield pr(r,i),r._openRedirect(i,e,"signInViaRedirect")})}function gr(n,e,t){return $l(n,e,t)}function $l(n,e,t){return a(this,null,function*(){let i=g(n);if(Ve(i.auth,e,F),I(i.auth.app))return Promise.reject(R(i.auth));yield i.auth._initializationPromise;let r=Re(i.auth,t);yield pr(r,i.auth);let s=yield yo(i);return r._openRedirect(i.auth,e,"reauthViaRedirect",s)})}function _r(n,e,t){return zl(n,e,t)}function zl(n,e,t){return a(this,null,function*(){let i=g(n);Ve(i.auth,e,F),yield i.auth._initializationPromise;let r=Re(i.auth,t);yield ln(!1,i,e.providerId),yield pr(r,i.auth);let s=yield yo(i);return r._openRedirect(i.auth,e,"linkViaRedirect",s)})}function vr(n,e){return a(this,null,function*(){return yield v(n)._initializationPromise,Ce(n,e,!1)})}function Ce(n,e,t=!1){return a(this,null,function*(){if(I(n.app))return Promise.reject(R(n));let i=v(n),r=Re(i,e),o=yield new Ti(i,r,t).execute();return o&&!t&&(delete o.user._redirectEventId,yield i._persistUserIfCurrent(o.user),yield i._setRedirectUser(null,e)),o})}function yo(n){return a(this,null,function*(){let e=Se(`${n.uid}:::`);return n._redirectEventId=e,yield n.auth._setRedirectUser(n),yield n.auth._persistUserIfCurrent(n),e})}var Gl=600*1e3,mt=class{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.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(i=>{this.isEventForConsumer(e,i)&&(t=!0,this.sendToConsumer(e,i),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!ql(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var i;if(e.error&&!Eo(e)){let r=((i=e.error.code)===null||i===void 0?void 0:i.split("auth/")[1])||"internal-error";t.onError(S(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let i=t.eventId===null||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&i}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=Gl&&this.cachedEventUids.clear(),this.cachedEventUids.has(Ls(e))}saveEventToCache(e){this.cachedEventUids.add(Ls(e)),this.lastProcessedEventTime=Date.now()}};function Ls(n){return[n.type,n.eventId,n.sessionId,n.tenantId].filter(e=>e).join("-")}function Eo({type:n,error:e}){return n==="unknown"&&e?.code==="auth/no-auth-event"}function ql(n){switch(n.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Eo(n);default:return!1}}function Ir(t){return a(this,arguments,function*(n,e={}){return E(n,"GET","/v1/projects",e)})}var Kl=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Yl=/^https?/;function Jl(n){return a(this,null,function*(){if(n.config.emulator)return;let{authorizedDomains:e}=yield Ir(n);for(let t of e)try{if(Xl(t))return}catch(i){}T(n,"unauthorized-domain")})}function Xl(n){let e=st(),{protocol:t,hostname:i}=new URL(e);if(n.startsWith("chrome-extension://")){let o=new URL(n);return o.hostname===""&&i===""?t==="chrome-extension:"&&n.replace("chrome-extension://","")===e.replace("chrome-extension://",""):t==="chrome-extension:"&&o.hostname===i}if(!Yl.test(t))return!1;if(Kl.test(n))return i===n;let r=n.replace(/\./g,"\\.");return new RegExp("^(.+\\."+r+"|"+r+")$","i").test(i)}var Ql=new ye(3e4,6e4);function Ms(){let n=A().___jsl;if(n?.H){for(let e of Object.keys(n.H))if(n.H[e].r=n.H[e].r||[],n.H[e].L=n.H[e].L||[],n.H[e].r=[...n.H[e].L],n.CP)for(let t=0;t<n.CP.length;t++)n.CP[t]=null}}function Zl(n){return new Promise((e,t)=>
21{var i,r,s;function o(){Ms(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{Ms(),t(S(n,"network-request-failed"))},timeout:Ql.get()})}if(!((r=(i=A().gapi)===null||i===void 0?void 0:i.iframes)===null||r===void 0)&&r.Iframe)e(gapi.iframes.getContext());else if(!((s=A().gapi)===null||s===void 0)&&s.load)o();else{let c=no("iframefcb");return A()[c]=()=>{gapi.load?o():t(S(n,"network-request-failed"))},Mi(`${xc()}?onload=${c}`).catch(l=>t(l))}}).catch(e=>{throw Wt=null,e})}var Wt=null;function eu(n){return Wt=Wt||Zl(n),Wt}var tu=new ye(5e3,15e3),nu="__/auth/iframe",iu="emulator/auth/iframe",ru={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},su=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function ou(n){let e=n.config;f(e.authDomain,n,"auth-domain-config-required");let t=e.emulator?Di(e,iu):`https://${n.config.authDomain}/${nu}`,i={apiKey:e.apiKey,appName:n.name,v:J},r=su.get(n.config.apiHost);r&&(i.eid=r);let s=n._getFrameworks();return s.length&&(i.fw=s.join(",")),`${t}?${ve(i).slice(1)}`}function au(n){return a(this,null,function*(){let e=yield eu(n),t=A().gapi;return f(t,n,"internal-error"),e.open({where:document.body,url:ou(n),messageHandlersFilter:t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:ru,dontclear:!0},i=>new Promise((r,s)=>a(null,null,function*(){yield i.restyle({setHideOnLeave:!1});let o=S(n,"network-request-failed"),c=A().setTimeout(()=>{s(o)},tu.get());function l(){A().clearTimeout(c),r(i)}i.ping(l).then(l,()=>{s(o)})})))})}var cu={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},lu=500,uu=600,du="_blank",hu="http://localhost",gt=class{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}};function fu(n,e,t,i=lu,r=uu){let s=Math.max((window.screen.availHeight-r)/2,0).toString(),o=Math.max((window.screen.availWidth-i)/2,0).toString(),c="",l=Object.assign(Object.assign({},cu),{width:i.toString(),height:r.toString(),top:s,left:o}),u=b().toLowerCase();t&&(c=Js(u)?du:t),Ks(u)&&(e=e||hu,l.scrollbars="yes");let h=Object.entries(l).reduce((p,[m,w])=>`${p}${m}=${w},`,"");if(Cc(u)&&c!=="_self")return pu(e||"",c),new gt(null);let d=window.open(e||"",c,h);f(d,n,"popup-blocked");try{d.focus()}catch(p){}return new gt(d)}function pu(n,e){let t=document.createElement("a");t.href=n,t.target=e;let i=document.createEvent("MouseEvent");i.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),t.dispatchEvent(i)}var mu="__/auth/handler",gu="emulator/auth/handler",_u=encodeURIComponent("fac");function en(n,e,t,i,r,s){return a(this,null,function*(){f(n.config.authDomain,n,"auth-domain-config-required"),f(n.config.apiKey,n,"invalid-api-key");let o={apiKey:n.config.apiKey,appName:n.name,authType:t,redirectUrl:i,v:J,eventId:r};if(e instanceof F){e.setDefaultLanguage(n.languageCode),o.providerId=e.providerId||"",Qr(e.getCustomParameters())||(o.customParameters=JSON.stringify(e.getCustomParameters()));for(let[h,d]of Object.entries(s||{}))o[h]=d}if(e instanceof ue){let h=e.getScopes().filter(d=>d!=="");h.length>0&&(o.scopes=h.join(","))}n.tenantId&&(o.tid=n.tenantId);let c=o;for(let h of Object.keys(c))c[h]===void 0&&delete c[h];let l=yield n._getAppCheckToken(),u=l?`#${_u}=${encodeURIComponent(l)}`:"";return`${vu(n)}?${ve(c).slice(1)}${u}`})}function vu({config:n}){return n.emulator?Di(n,gu):`https://${n.authDomain}/${mu}`}var ni="webStorageSupport",Ai=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=W,this._completeRedirectFn=Ce,this._overrideRedirectResult=je}_openPopup(e,t,i,r){return a(this,null,function*(){var s;x((s=this.eventManagers[e._key()])===null||s===void 0?void 0:s.manager,"_initialize() not called before _openPopup()");let o=yield en(e,t,i,st(),r);return fu(e,o,Se())})}_openRedirect(e,t,i,r){return a(this,null,function*(){yield this._originValidation(e);let s=yield en(e,t,i,st(),r);return wl(s),new Promise(()=>{})})}_initialize(e){let t=e._key();if(this.eventManagers[t]){let{manager:r,promise:s}=this.eventManagers[t];return r?Promise.resolve(r):(x(s,"If manager is not set, promise should be"),s)}let i=this.initAndGetManager(e);return this.eventManagers[t]={promise:i},i.catch(()=>{delete this.eventManagers[t]}),i}initAndGetManager(e){return a(this,null,function*(){let t=yield au(e),i=new mt(e);return t.register("authEvent",r=>
21(f(r?.authEvent,e,"invalid-auth-event"),{status:i.onEvent(r.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:i},this.iframes[e._key()]=t,i})}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(ni,{type:ni},r=>{var s;let o=(s=r?.[0])===null||s===void 0?void 0:s[ni];o!==void 0&&t(!!o),T(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=Jl(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return to()||Ys()||He()}},gn=Ai,Si=class{constructor(e){this.factorId=e}_process(e,t,i){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,i);case"signin":return this._finalizeSignIn(e,t.credential);default:return $("unexpected MultiFactorSessionType")}}},Pi=class n extends Si{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new n(e)}_finalizeEnroll(e,t,i){return pl(e,{idToken:t,displayName:i,phoneVerificationInfo:this.credential._makeVerificationRequest()})}_finalizeSignIn(e,t){return Nl(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()})}},yr=(()=>{class n{constructor(){}static assertion(t){return Pi._fromCredential(t)}}return n.FACTOR_ID="phone",n})();var xs="@firebase/auth",Us="1.10.8";var Ri=class{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)===null||e===void 0?void 0:e.uid)||null}getToken(e){return a(this,null,function*(){return this.assertAuthConfigured(),yield this.auth._initializationPromise,this.auth.currentUser?{accessToken:yield this.auth.currentUser.getIdToken(e)}:null})}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(i=>{e(i?.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(){f(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}};function Iu(n){switch(n){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function yu(n){Y(new O("auth",(e,{options:t})=>{let i=e.getProvider("app").getImmediate(),r=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:o,authDomain:c}=i.options;f(o&&!o.includes(":"),"invalid-api-key",{appName:i.name});let l={apiKey:o,authDomain:c,clientPlatform:n,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Li(n)},u=new zt(i,r,s,l);return Bc(u,t),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,i)=>{e.getProvider("auth-internal").initialize()})),Y(new O("auth-internal",e=>{let t=v(e.getProvider("auth").getImmediate());return(i=>new Ri(i))(t)},"PRIVATE").setInstantiationMode("EXPLICIT")),M(xs,Us,Iu(n)),M(xs,Us,"esm2017")}var Eu=300,wu=Rn("authIdTokenMaxAge")||Eu,Fs=null,bu=n=>e=>a(null,null,function*(){let t=e&&(yield e.getIdTokenResult()),i=t&&(new Date().getTime()-Date.parse(t.issuedAtTime))/1e3;if(i&&i>wu)return;let r=t?.token;Fs!==r&&(Fs=r,yield fetch(n,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))});function Tu(n=Gn()){let e=Xe(n,"auth");if(e.isInitialized())return e.getImmediate();let t=io(n,{popupRedirectResolver:gn,persistence:[he,Ae,W]}),i=Rn("authTokenSyncURL");if(i&&typeof isSecureContext=="boolean"&&isSecureContext){let s=new URL(i,location.origin);if(location.origin===s.origin){let o=bu(s.toString());po(t,o,()=>o(t.currentUser)),fo(t,c=>o(c))}}let r=Sn("auth");return r&&nn(t,`http://${r}`),t}function Au(){var n,e;return(e=(n=document.getElementsByTagName("head"))===null||n===void 0?void 0:n[0])!==null&&e!==void 0?e:document}Dc({loadJS(n){return new Promise((e,t)=>
21{let i=document.createElement("script");i.setAttribute("src",n),i.onload=e,i.onerror=r=>{let s=S("internal-error");s.customData=r,t(s)},i.type="text/javascript",i.charset="UTF-8",Au().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="});yu("Browser");function Oe(){return window}var Su=2e3;function Pu(n,e,t){return a(this,null,function*(){var i;let{BuildInfo:r}=Oe();x(e.sessionId,"AuthEvent did not contain a session ID");let s=yield Nu(e.sessionId),o={};return He()?o.ibi=r.packageName:We()?o.apn=r.packageName:T(n,"operation-not-supported-in-this-environment"),r.displayName&&(o.appDisplayName=r.displayName),o.sessionId=s,en(n,t,e.type,void 0,(i=e.eventId)!==null&&i!==void 0?i:void 0,o)})}function Ru(n){return a(this,null,function*(){let{BuildInfo:e}=Oe(),t={};He()?t.iosBundleId=e.packageName:We()?t.androidPackageName=e.packageName:T(n,"operation-not-supported-in-this-environment"),yield Ir(n,t)})}function Cu(n){let{cordova:e}=Oe();return new Promise(t=>{e.plugins.browsertab.isAvailable(i=>{let r=null;i?e.plugins.browsertab.openUrl(n):r=e.InAppBrowser.open(n,eo()?"_blank":"_system","location=yes"),t(r)})})}function Ou(n,e,t){return a(this,null,function*(){let{cordova:i}=Oe(),r=()=>{};try{yield new Promise((s,o)=>{let c=null;function l(){var d;s();let p=(d=i.plugins.browsertab)===null||d===void 0?void 0:d.close;typeof p=="function"&&p(),typeof t?.close=="function"&&t.close()}function u(){c||(c=window.setTimeout(()=>{o(S(n,"redirect-cancelled-by-user"))},Su))}function h(){document?.visibilityState==="visible"&&u()}e.addPassiveListener(l),document.addEventListener("resume",u,!1),We()&&document.addEventListener("visibilitychange",h,!1),r=()=>{e.removePassiveListener(l),document.removeEventListener("resume",u,!1),document.removeEventListener("visibilitychange",h,!1),c&&window.clearTimeout(c)}})}finally{r()}})}function ku(n){var e,t,i,r,s,o,c,l,u,h;let d=Oe();f(typeof((e=d?.universalLinks)===null||e===void 0?void 0:e.subscribe)=="function",n,"invalid-cordova-configuration",{missingPlugin:"cordova-universal-links-plugin-fix"}),f(typeof((t=d?.BuildInfo)===null||t===void 0?void 0:t.packageName)<"u",n,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-buildInfo"}),f(typeof((s=(r=(i=d?.cordova)===null||i===void 0?void 0:i.plugins)===null||r===void 0?void 0:r.browsertab)===null||s===void 0?void 0:s.openUrl)=="function",n,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-browsertab"}),f(typeof((l=(c=(o=d?.cordova)===null||o===void 0?void 0:o.plugins)===null||c===void 0?void 0:c.browsertab)===null||l===void 0?void 0:l.isAvailable)=="function",n,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-browsertab"}),f(typeof((h=(u=d?.cordova)===null||u===void 0?void 0:u.InAppBrowser)===null||h===void 0?void 0:h.open)=="function",n,"invalid-cordova-configuration",{missingPlugin:"cordova-plugin-inappbrowser"})}function Nu(n){return a(this,null,function*(){let e=Du(n),t=yield crypto.subtle.digest("SHA-256",e);return Array.from(new Uint8Array(t)).map(r=>r.toString(16).padStart(2,"0")).join("")})}function Du(n){if(x(/[0-9a-zA-Z]+/.test(n),"Can only convert alpha-numeric strings"),typeof TextEncoder<"u")return new TextEncoder().encode(n);let e=new ArrayBuffer(n.length),t=new Uint8Array(e);for(let i=0;i<n.length;i++)t[i]=n.charCodeAt(i);return t}var Lu=20,Er=class extends mt{constructor(){super(...arguments),this.passiveListeners=new Set,this.initPromise=new Promise(e=>{this.resolveInitialized=e})}addPassiveListener(e){this.passiveListeners.add(e)}removePassiveListener(e){this.passiveListeners.delete(e)}resetRedirect(){this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1}onEvent(e){return this.resolveInitialized(),this.passiveListeners.forEach(t=>t(e)),super.onEvent(e)}initialized(){return a(this,null,function*(){yield this.initPromise})}};function Mu(n,e,t=null){return{type:e,eventId:t,urlResponse:null,sessionId:Fu(),postBody:null,tenantId:n.tenantId,error:S(n,"no-auth-event")}}function xu(n,e){return wr()._set(br(n),e)}function wo(n){return a(this,null,function*(){let e=yield wr()._get(br(n));return e&&(yield wr()._remove(br(n))),e})}function Uu(n,e){var t,i;let r=Wu(e);if(r.includes("/__/auth/callback")){let s=_n(r),o=s.firebaseError?Vu(decodeURIComponent(s.firebaseError)):null,c=(i=(t=o?.code)===null||t===void 0?void 0:t.split("auth/"))===null||i===void 0?void 0:i[1],l=c?S(c):null;return l?{type:n.type,eventId:n.eventId,tenantId:n.tenantId,error:l,urlResponse:null,sessionId:null,postBody:null}:{type:n.type,eventId:n.eventId,tenantId:n.tenantId,sessionId:n.sessionId,urlResponse:r,postBody:null}}return null}function Fu(){let n=[],e="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let t=0;t<Lu;t++){let i=Math.floor(Math.random()*e.length);n.push(e.charAt(i))}return n.join("")}function wr(){return C(Ae)}function br(n){return z("authEvent",n.config.apiKey,n.name)}function Vu(n){try{return JSON.parse(n)}catch(e){return null}}
21function Wu(n){let e=_n(n),t=e.link?decodeURIComponent(e.link):void 0,i=_n(t).link,r=e.deep_link_id?decodeURIComponent(e.deep_link_id):void 0;return _n(r).link||r||i||t||n}function _n(n){if(!n?.includes("?"))return{};let[e,...t]=n.split("?");return ie(t.join("?"))}var Hu=500,Tr=class{constructor(){this._redirectPersistence=W,this._shouldInitProactively=!0,this.eventManagers=new Map,this.originValidationPromises={},this._completeRedirectFn=Ce,this._overrideRedirectResult=je}_initialize(e){return a(this,null,function*(){let t=e._key(),i=this.eventManagers.get(t);return i||(i=new Er(e),this.eventManagers.set(t,i),this.attachCallbackListeners(e,i)),i})}_openPopup(e){T(e,"operation-not-supported-in-this-environment")}_openRedirect(e,t,i,r){return a(this,null,function*(){ku(e);let s=yield this._initialize(e);yield s.initialized(),s.resetRedirect(),_o(),yield this._originValidation(e);let o=Mu(e,i,r);yield xu(e,o);let c=yield Pu(e,o,t),l=yield Cu(c);return Ou(e,s,l)})}_isIframeWebStorageSupported(e,t){throw new Error("Method not implemented.")}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=Ru(e)),this.originValidationPromises[t]}attachCallbackListeners(e,t){let{universalLinks:i,handleOpenURL:r,BuildInfo:s}=Oe(),o=setTimeout(()=>a(null,null,function*(){yield wo(e),t.onEvent(bo())}),Hu),c=h=>a(null,null,function*(){clearTimeout(o);let d=yield wo(e),p=null;d&&h?.url&&(p=Uu(d,h.url)),t.onEvent(p||bo())});typeof i<"u"&&typeof i.subscribe=="function"&&i.subscribe(null,c);let l=r,u=`${s.packageName.toLowerCase()}://`;Oe().handleOpenURL=h=>a(null,null,function*(){if(h.toLowerCase().startsWith(u)&&c({url:h}),typeof l=="function")try{l(h)}catch(d){console.error(d)}})}},To=Tr;function bo(){return{type:"unknown",eventId:null,sessionId:null,urlResponse:null,postBody:null,tenantId:null,error:S("no-auth-event")}}function Ao(n,e){v(n)._logFramework(e)}var ju="@firebase/auth-compat",$u="0.5.28";var zu=1e3;function Et(){var n;return((n=self?.location)===null||n===void 0?void 0:n.protocol)||null}function Gu(){return Et()==="http:"||Et()==="https:"}function Ro(n=b()){return!!((Et()==="file:"||Et()==="ionic:"||Et()==="capacitor:")&&n.toLowerCase().match(/iphone|ipad|ipod|android/))}function qu(){return Ke()||Cn()}function Ku(){return Ct()&&document?.documentMode===11}function Yu(n=b()){return/Edge\/\d+/.test(n)}function Ju(n=b()){return Ku()||Yu(n)}function Co(){try{let n=self.localStorage,e=Se();if(n)return n.setItem(e,"1"),n.removeItem(e),Ju()?Ne():!0}catch(n){return Or()&&Ne()}return!1}function Or(){return typeof global<"u"&&"WorkerGlobalScope"in global&&"importScripts"in global}function Ar(){return(Gu()||Rt()||Ro())&&!qu()&&Co()&&!Or()}function Oo(){return Ro()&&typeof document<"u"}function Xu(){return a(this,null,function*(){return Oo()?new Promise(n=>{let e=setTimeout(()=>{n(!1)},zu);document.addEventListener("deviceready",()=>{clearTimeout(e),n(!0)})}):!1})}function Qu(){return typeof window<"u"?window:null}var N={LOCAL:"local",NONE:"none",SESSION:"session"},It=f,ko="persistence";function Zu(n,e){if(It(Object.values(N).includes(e),n,"invalid-persistence-type"),Ke()){It(e!==N.SESSION,n,"unsupported-persistence-type");return}if(Cn()){It(e===N.NONE,n,"unsupported-persistence-type");return}if(Or()){It(e===N.NONE||e===N.LOCAL&&Ne(),n,"unsupported-persistence-type");return}It(e===N.NONE||Co(),n,"unsupported-persistence-type")}function Sr(n){return a(this,null,function*(){yield n._initializationPromise;let e=No(),t=z(ko,n.config.apiKey,n.name);e&&e.setItem(t,n._getPersistenceType())})}function ed(n,e){let t=No();if(!t)return[];let i=z(ko,n,e);switch(t.getItem(i)){case N.NONE:return[le];case N.LOCAL:return[he,W];case N.SESSION:return[W];default:return[]}}function No(){var n;try{return((n=Qu())===null||n===void 0?void 0:n.sessionStorage)||null}catch(e){return null}}var td=f,q=class{constructor(){this.browserResolver=C(gn),this.cordovaResolver=C(To),this.underlyingResolver=null,this._redirectPersistence=W,this._completeRedirectFn=Ce,this._overrideRedirectResult=je}_initialize(e){return a(this,null,function*(){return yield this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._initialize(e)})}_openPopup(e,t,i,r){return a(this,null,function*(){return yield this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._openPopup(e,t,i,r)})}_openRedirect(e,t,i,r){return a(this,null,function*(){return yield this.selectUnderlyingResolver(),this.assertedUnderlyingResolver._openRedirect(e,t,i,r)})}_isIframeWebStorageSupported(e,t){this.assertedUnderlyingResolver._isIframeWebStorageSupported(e,t)}_originValidation(e){return this.assertedUnderlyingResolver._originValidation(e)}get _shouldInitProactively(){return Oo()||this.browserResolver._shouldInitProactively}get assertedUnderlyingResolver(){return td(this.underlyingResolver,"internal-error"),this.underlyingResolver}selectUnderlyingResolver(){return a(this,null,function*(){if(this.underlyingResolver)return;let e=yield Xu();this.underlyingResolver=e?this.cordovaResolver:this.browserResolver})}};function Do(n){return n.unwrap()}
21function nd(n){return n.wrapped()}function id(n){return Lo(n)}function rd(n,e){var t;let i=(t=e.customData)===null||t===void 0?void 0:t._tokenResponse;if(e?.code==="auth/multi-factor-auth-required"){let r=e;r.resolver=new Rr(n,ir(n,e))}else if(i){let r=Lo(e),s=e;r&&(s.credential=r,s.tenantId=i.tenantId||void 0,s.email=i.email||void 0,s.phoneNumber=i.phoneNumber||void 0)}}function Lo(n){let{_tokenResponse:e}=n instanceof P?n.customData:n;if(!e)return null;if(!(n instanceof P)&&"temporaryProof"in e&&"phoneNumber"in e)return Pe.credentialFromResult(n);let t=e.providerId;if(!t||t===Te.PASSWORD)return null;let i;switch(t){case Te.GOOGLE:i=on;break;case Te.FACEBOOK:i=sn;break;case Te.GITHUB:i=an;break;case Te.TWITTER:i=cn;break;default:let{oauthIdToken:r,oauthAccessToken:s,oauthTokenSecret:o,pendingToken:c,nonce:l}=e;return!s&&!o&&!r&&!c?null:c?t.startsWith("saml.")?Ee._create(t,c):U._fromParams({providerId:t,signInMethod:t,pendingToken:c,idToken:r,accessToken:s}):new Fe(t).credential({idToken:r,accessToken:s,rawNonce:l})}return n instanceof P?i.credentialFromError(n):i.credentialFromResult(n)}function k(n,e){return e.catch(t=>{throw t instanceof P&&rd(n,t),t}).then(t=>{let i=t.operationType,r=t.user;return{operationType:i,credential:id(t),additionalUserInfo:nr(t),user:$e.getOrCreate(r)}})}function Pr(n,e){return a(this,null,function*(){let t=yield e;return{verificationId:t.verificationId,confirm:i=>k(n,t.confirm(i))}})}var Rr=class{constructor(e,t){this.resolver=t,this.auth=nd(e)}get session(){return this.resolver.session}get hints(){return this.resolver.hints}resolveSignIn(e){return k(Do(this.auth),this.resolver.resolveSignIn(e))}};var $e=class n{constructor(e){this._delegate=e,this.multiFactor=rr(e)}static getOrCreate(e){return n.USER_MAP.has(e)||n.USER_MAP.set(e,new n(e)),n.USER_MAP.get(e)}delete(){return this._delegate.delete()}reload(){return this._delegate.reload()}toJSON(){return this._delegate.toJSON()}getIdTokenResult(e){return this._delegate.getIdTokenResult(e)}getIdToken(e){return this._delegate.getIdToken(e)}linkAndRetrieveDataWithCredential(e){return this.linkWithCredential(e)}linkWithCredential(e){return a(this,null,function*(){return k(this.auth,un(this._delegate,e))})}linkWithPhoneNumber(e,t){return a(this,null,function*(){return Pr(this.auth,ar(this._delegate,e,t))})}linkWithPopup(e){return a(this,null,function*(){return k(this.auth,hr(this._delegate,e,q))})}linkWithRedirect(e){return a(this,null,function*(){return yield Sr(v(this.auth)),_r(this._delegate,e,q)})}reauthenticateAndRetrieveDataWithCredential(e){return this.reauthenticateWithCredential(e)}reauthenticateWithCredential(e){return a(this,null,function*(){return k(this.auth,dn(this._delegate,e))})}reauthenticateWithPhoneNumber(e,t){return Pr(this.auth,cr(this._delegate,e,t))}reauthenticateWithPopup(e){return k(this.auth,dr(this._delegate,e,q))}reauthenticateWithRedirect(e){return a(this,null,function*(){return yield Sr(v(this.auth)),gr(this._delegate,e,q)})}sendEmailVerification(e){return Xi(this._delegate,e)}unlink(e){return a(this,null,function*(){return yield Ui(this._delegate,e),this})}updateEmail(e){return er(this._delegate,e)}updatePassword(e){return tr(this._delegate,e)}updatePhoneNumber(e){return lr(this._delegate,e)}updateProfile(e){return Zi(this._delegate,e)}verifyBeforeUpdateEmail(e,t){return Qi(this._delegate,e,t)}get emailVerified(){return this._delegate.emailVerified}get isAnonymous(){return this._delegate.isAnonymous}get metadata(){return this._delegate.metadata}get phoneNumber(){return this._delegate.phoneNumber}get providerData(){return this._delegate.providerData}get refreshToken(){return this._delegate.refreshToken}get tenantId(){return this._delegate.tenantId}get displayName(){return this._delegate.displayName}get email(){return this._delegate.email}get photoURL(){return this._delegate.photoURL}get providerId(){return this._delegate.providerId}get uid(){return this._delegate.uid}get auth(){return this._delegate.auth}};$e.USER_MAP=new WeakMap;var yt=f,So=(()=>{class n{constructor(t,i){if(this.app=t,i.isInitialized()){this._delegate=i.getImmediate(),this.linkUnderlyingAuth();return}let{apiKey:r}=t.options;
21yt(r,"invalid-api-key",{appName:t.name}),yt(r,"invalid-api-key",{appName:t.name});let s=typeof window<"u"?q:void 0;this._delegate=i.initialize({options:{persistence:sd(r,t.name),popupRedirectResolver:s}}),this._delegate._updateErrorMap(Ci),this.linkUnderlyingAuth()}get emulatorConfig(){return this._delegate.emulatorConfig}get currentUser(){return this._delegate.currentUser?$e.getOrCreate(this._delegate.currentUser):null}get languageCode(){return this._delegate.languageCode}set languageCode(t){this._delegate.languageCode=t}get settings(){return this._delegate.settings}get tenantId(){return this._delegate.tenantId}set tenantId(t){this._delegate.tenantId=t}useDeviceLanguage(){this._delegate.useDeviceLanguage()}signOut(){return this._delegate.signOut()}useEmulator(t,i){nn(this._delegate,t,i)}applyActionCode(t){return ji(this._delegate,t)}checkActionCode(t){return fn(this._delegate,t)}confirmPasswordReset(t,i){return Bi(this._delegate,t,i)}createUserWithEmailAndPassword(t,i){return a(this,null,function*(){return k(this._delegate,zi(this._delegate,t,i))})}fetchProvidersForEmail(t){return this.fetchSignInMethodsForEmail(t)}fetchSignInMethodsForEmail(t){return Ji(this._delegate,t)}isSignInWithEmailLink(t){return Ki(this._delegate,t)}getRedirectResult(){return a(this,null,function*(){yt(Ar(),this._delegate,"operation-not-supported-in-this-environment");let t=yield vr(this._delegate,q);return t?k(this._delegate,Promise.resolve(t)):{credential:null,user:null}})}addFrameworkForLogging(t){Ao(this._delegate,t)}onAuthStateChanged(t,i,r){let{next:s,error:o,complete:c}=Po(t,i,r);return this._delegate.onAuthStateChanged(s,o,c)}onIdTokenChanged(t,i,r){let{next:s,error:o,complete:c}=Po(t,i,r);return this._delegate.onIdTokenChanged(s,o,c)}sendSignInLinkToEmail(t,i){return qi(this._delegate,t,i)}sendPasswordResetEmail(t,i){return Hi(this._delegate,t,i||void 0)}setPersistence(t){return a(this,null,function*(){Zu(this._delegate,t);let i;switch(t){case N.SESSION:i=W;break;case N.LOCAL:i=(yield C(he)._isAvailable())?he:Ae;break;case N.NONE:i=le;break;default:return T("argument-error",{appName:this._delegate.name})}return this._delegate.setPersistence(i)})}signInAndRetrieveDataWithCredential(t){return this.signInWithCredential(t)}signInAnonymously(){return k(this._delegate,xi(this._delegate))}signInWithCredential(t){return k(this._delegate,Be(this._delegate,t))}signInWithCustomToken(t){return k(this._delegate,Vi(this._delegate,t))}signInWithEmailAndPassword(t,i){return k(this._delegate,Gi(this._delegate,t,i))}signInWithEmailLink(t,i){return k(this._delegate,Yi(this._delegate,t,i))}signInWithPhoneNumber(t,i){return Pr(this._delegate,or(this._delegate,t,i))}signInWithPopup(t){return a(this,null,function*(){return yt(Ar(),this._delegate,"operation-not-supported-in-this-environment"),k(this._delegate,ur(this._delegate,t,q))})}signInWithRedirect(t){return a(this,null,function*(){return yt(Ar(),this._delegate,"operation-not-supported-in-this-environment"),yield Sr(this._delegate),mr(this._delegate,t,q)})}updateCurrentUser(t){return this._delegate.updateCurrentUser(t)}verifyPasswordResetCode(t){return $i(this._delegate,t)}unwrap(){return this._delegate}_delete(){return this._delegate._delete()}linkUnderlyingAuth(){this._delegate.wrapped=()=>this}}return n.Persistence=N,n})();function Po(n,e,t){let i=n;typeof n!="function"&&({next:i,error:e,complete:t}=n);let r=i;return{next:o=>r(o&&$e.getOrCreate(o)),error:e,complete:t}}function sd(n,e){let t=ed(n,e);if(typeof self<"u"&&!t.includes(he)&&t.push(he),typeof window<"u")for(let i of[Ae,W])t.includes(i)||t.push(i);return t.includes(le)||t.push(le),t}var wt=class{static credential(e,t){return Pe.credential(e,t)}constructor(){this.providerId="phone",this._delegate=new Pe(Do(xt.auth()))}verifyPhoneNumber(e,t){return this._delegate.verifyPhoneNumber(e,t)}unwrap(){return this._delegate}};wt.PHONE_SIGN_IN_METHOD=Pe.PHONE_SIGN_IN_METHOD;wt.PROVIDER_ID=Pe.PROVIDER_ID;var od=f,Cr=class{constructor(e,t,i=xt.app()){var r;od((r=i.options)===null||r===void 0?void 0:r.apiKey,"invalid-api-key",{appName:i.name}),this._delegate=new ht(i.auth(),e,t),this.type=this._delegate.type}clear(){this._delegate.clear()}render(){return this._delegate.render()}verify(){return this._delegate.verify()}};var ad="auth-compat";function cd(n){n.INTERNAL.registerComponent(new O(ad,e=>{let t=e.getProvider("app-compat").getImmediate(),i=e.getProvider("auth");return new So(t,i)},"PUBLIC").setServiceProps({ActionCodeInfo:{Operation:{EMAIL_SIGNIN:de.EMAIL_SIGNIN,PASSWORD_RESET:
21de.PASSWORD_RESET,RECOVER_EMAIL:de.RECOVER_EMAIL,REVERT_SECOND_FACTOR_ADDITION:de.REVERT_SECOND_FACTOR_ADDITION,VERIFY_AND_CHANGE_EMAIL:de.VERIFY_AND_CHANGE_EMAIL,VERIFY_EMAIL:de.VERIFY_EMAIL}},EmailAuthProvider:vt,FacebookAuthProvider:sn,GithubAuthProvider:an,GoogleAuthProvider:on,OAuthProvider:Fe,SAMLAuthProvider:dt,PhoneAuthProvider:wt,PhoneMultiFactorGenerator:yr,RecaptchaVerifier:Cr,TwitterAuthProvider:cn,Auth:So,AuthCredential:G,Error:P}).setInstantiationMode("LAZY").setMultipleInstances(!1)),n.registerVersion(ju,$u)}cd(xt);export{xr as a,Ur as b,ld as c,ud as d,dd as e,a as f,Qd as g,Xn as h,Zd as i,eh as j,zo as k,Go as l,$r as m,Ko as n,md as o,gd as p,St as q,qe as r,zr as s,_d as t,Gr as u,qr as v,Ke as w,vd as x,Ne as y,D as z,Wr as A,Id as B,yd as C,Ed as D,kn as E,wd as F,Qr as G,bd as H,ne as I,ve as J,Br as K,Td as L,Zr as M,Ad as N,Sd as O,Pd as P,Rd as Q,g as R,O as S,Nn as T,Ye as U,_ as V,re as W,Y as X,Xe as Y,I as Z,J as _,Lt as $,Gn as aa,Qa as ba,M as ca,xt as da,Tu as ea};

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.