!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).firebase=e()}(this,function(){"use strict";!function(t){var e,n,s,r,i,o,a,u,c,h;function l(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function f(t){return t="string"!=typeof t?String(t):t}function p(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach(function(t,e){this.append(e,t)},this):Array.isArray(e)?e.forEach(function(t){this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function g(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function v(n){return new Promise(function(t,e){n.onload=function(){t(n.result)},n.onerror=function(){e(n.error)}})}function y(t){var e=new FileReader,n=v(e);return e.readAsArrayBuffer(t),n}function m(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t)if("string"==typeof t)this._bodyText=t;else if(s&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(r&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(i&&s&&a(t))this._bodyArrayBuffer=m(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!i||!ArrayBuffer.prototype.isPrototypeOf(t)&&!u(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=m(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var t=g(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?g(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,n=g(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=v(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;ri;)T(r,n=e[i++])&&(~mt(o,n)||o.push(n));return o}function ot(t,e){for(var n=Tt(e),r=R.f,i=A.f,o=0;o"+t+""}var ct,ht={set:q,get:V,has:B,enforce:function(t){return B(t)?V(t):q(t,{})},getterFor:function(n){return function(t){var e;if(!y(t)||(e=V(t)).type!==n)throw TypeError("Incompatible receiver, "+n+" required");return e}}},lt=e(function(t){var e=ht.get,a=ht.enforce,u=String(String).split("String");(t.exports=function(t,e,n,r){var i=!!r&&!!r.unsafe,o=!!r&&!!r.enumerable,s=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof e||T(n,"name")||P(n,"name",e),(r=a(n)).source||(r.source=u.join("string"==typeof e?e:""))),t!==b?(i?!s&&t[e]&&(o=!0):delete t[e],o?t[e]=n:P(t,e,n)):o?t[e]=n:c(e,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&e(this).source||W(this)})}),ft=b,pt=Math.ceil,dt=Math.floor,gt=Math.min,vt=Math.max,yt=Math.min,a=function(a){return function(t,e,n){var r,i=u(t),o=rt(i.length),s=function(t,e){t=nt(t);return t<0?vt(t+e,0):yt(t,e)}(n,o);if(a&&e!=e){for(;sn;){var r,i,o,s=p[n++],a=e?s.ok:s.fail,u=s.resolve,c=s.reject,h=s.domain;try{a?(e||(2===l.rejection&&An(l),l.rejection=1),!0===a?r=t:(h&&h.enter(),r=a(t),h&&(h.exit(),o=!0)),r===s.promise?c(yn("Promise-chain cycle")):(i=$e(r))?i.call(r,u,c):u(r)):c(t)}catch(t){h&&!o&&h.exit(),c(t)}}l.reactions=[],l.notified=!1,f&&!l.rejection&&kn(l)}))}function Ze(t,e,n){var r,i;In?((r=mn.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),b.dispatchEvent(r)):r={promise:e,reason:n},!Tn&&(i=b["on"+t])?i(r):t===En&&function(t,e){var n=b.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)}function tn(e,n,r){return function(t){e(n,t,r)}}function en(t,e,n){t.done||(t.done=!0,(t=n?n:t).value=e,t.state=2,Je(t,!0))}var nn,rn,on,sn,an=a||function(t){t={fn:t,next:void 0};Ue&&(Ue.next=t),je||(je=t,qe()),Ue=t},un={f:function(t){return new Qe(t)}},cn="object"==typeof window,hn=He.set,ln=Kt("species"),fn="Promise",pn=ht.get,dn=ht.set,gn=ht.getterFor(fn),Pe=de&&de.prototype,vn=de,Re=Pe,yn=b.TypeError,mn=b.document,bn=b.process,_n=un.f,wn=_n,In=!!(mn&&mn.createEvent&&b.dispatchEvent),Tn="function"==typeof PromiseRejectionEvent,En="unhandledrejection",Sn=!1,a=Nt(fn,function(){var t=W(vn)!==String(vn);if(!t&&66===Gt)return!0;if(51<=Gt&&/native code/.test(vn))return!1;function e(t){t(function(){},function(){})}var n=new vn(function(t){t(1)});return(n.constructor={})[ln]=e,!(Sn=n.then(function(){})instanceof e)||!t&&cn&&!Tn}),He=a||!Ie(function(t){vn.all(t).catch(function(){})}),kn=function(i){hn.call(b,function(){var t,e=i.facade,n=i.value,r=Cn(i);if(r&&(t=Xe(function(){Ae?bn.emit("unhandledRejection",n,e):Ze(En,e,n)}),i.rejection=Ae||Cn(i)?2:1,t.error))throw t.value})},Cn=function(t){return 1!==t.rejection&&!t.parent},An=function(e){hn.call(b,function(){var t=e.facade;Ae?bn.emit("rejectionHandled",t):Ze("rejectionhandled",t,e.value)})},Nn=function(n,t,e){if(!n.done){n.done=!0,e&&(n=e);try{if(n.facade===t)throw yn("Promise can't be resolved itself");var r=$e(t);r?an(function(){var e={done:!1};try{r.call(t,tn(Nn,e,n),tn(en,e,n))}catch(t){en(e,t,n)}}):(n.value=t,n.state=1,Je(n,!1))}catch(t){en({done:!1},t,n)}}};if(a&&(Re=(vn=function(t){pe(this,vn,fn),Ht(t),nn.call(this);var e=pn(this);try{t(tn(Nn,e),tn(en,e))}catch(t){en(e,t)}}).prototype,(nn=function(t){dn(this,{type:fn,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=he(Re,{then:function(t,e){var n=gn(this),r=_n(Te(this,vn));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=Ae?bn.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&Je(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),rn=function(){var t=new nn,e=pn(t);this.promise=t,this.resolve=tn(Nn,e),this.reject=tn(en,e)},un.f=_n=function(t){return t===vn||t===on?new rn:wn(t)},"function"==typeof de&&Pe!==Object.prototype)){sn=Pe.then,Sn||(lt(Pe,"then",function(t,e){var n=this;return new vn(function(t,e){sn.call(n,t,e)}).then(t,e)},{unsafe:!0}),lt(Pe,"catch",Re.catch,{unsafe:!0}));try{delete Pe.constructor}catch(js){}xt&&xt(Pe,Re)}st({global:!0,wrap:!0,forced:a},{Promise:vn}),le(vn,fn,!1),fe(fn),on=et(fn),st({target:fn,stat:!0,forced:a},{reject:function(t){var e=_n(this);return e.reject.call(void 0,t),e.promise}}),st({target:fn,stat:!0,forced:a},{resolve:function(t){return Ye(this,t)}}),st({target:fn,stat:!0,forced:He},{all:function(t){var a=this,e=_n(a),u=e.resolve,c=e.reject,n=Xe(function(){var r=Ht(a.resolve),i=[],o=0,s=1;ie(t,function(t){var e=o++,n=!1;i.push(void 0),s++,r.call(a,t).then(function(t){n||(n=!0,i[e]=t,--s||u(i))},c)}),--s||u(i)});return n.error&&c(n.value),e.promise},race:function(t){var n=this,r=_n(n),i=r.reject,e=Xe(function(){var e=Ht(n.resolve);ie(t,function(t){e.call(n,t).then(r.resolve,i)})});return e.error&&i(e.value),r.promise}}),st({target:"Promise",stat:!0},{allSettled:function(t){var a=this,e=un.f(a),u=e.resolve,n=e.reject,r=Xe(function(){var r=Ht(a.resolve),i=[],o=0,s=1;ie(t,function(t){var e=o++,n=!1;i.push(void 0),s++,r.call(a,t).then(function(t){n||(n=!0,i[e]={status:"fulfilled",value:t},--s||u(i))},function(t){n||(n=!0,i[e]={status:"rejected",reason:t},--s||u(i))})}),--s||u(i)});return r.error&&n(r.value),e.promise}});var Rn="No one promise resolved";st({target:"Promise",stat:!0},{any:function(t){var u=this,e=un.f(u),c=e.resolve,h=e.reject,n=Xe(function(){var r=Ht(u.resolve),i=[],o=0,s=1,a=!1;ie(t,function(t){var e=o++,n=!1;i.push(void 0),s++,r.call(u,t).then(function(t){n||a||(a=!0,c(t))},function(t){n||a||(n=!0,i[e]=t,--s||h(new(et("AggregateError"))(i,Rn)))})}),--s||h(new(et("AggregateError"))(i,Rn))});return n.error&&h(n.value),e.promise}});Pe=!!de&&v(function(){de.prototype.finally.call({then:function(){}},function(){})});st({target:"Promise",proto:!0,real:!0,forced:Pe},{finally:function(e){var n=Te(this,et("Promise")),t="function"==typeof e;return this.then(t?function(t){return Ye(n,e()).then(function(){return t})}:e,t?function(t){return Ye(n,e()).then(function(){throw t})}:e)}}),"function"==typeof de&&(Mn=et("Promise").prototype.finally,de.prototype.finally!==Mn&<(de.prototype,"finally",Mn,{unsafe:!0}));var Pn,Re=function(o){return function(t,e){var n,r=String(s(t)),i=nt(e),t=r.length;return i<0||t<=i?o?"":void 0:(e=r.charCodeAt(i))<55296||56319=e.length?{value:void 0,done:!0}:(n=Kn(e,n),t.index+=n.length,{value:n,done:!1})});var Gn={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Qn=Kt("unscopables"),Yn=Array.prototype;null==Yn[Qn]&&R.f(Yn,Qn,{configurable:!0,value:Bt(null)});var Re=function(t){Yn[Qn][t]=!0},Xn="Array Iterator",$n=ht.set,Jn=ht.getterFor(Xn),Zn=Ln(Array,"Array",function(t,e){$n(this,{type:Xn,target:u(t),index:0,kind:e})},function(){var t=Jn(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?{value:t.target=void 0,done:!0}:"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}},"values");Jt.Arguments=Jt.Array,Re("keys"),Re("values"),Re("entries");var tr,er=Kt("iterator"),nr=Kt("toStringTag"),rr=Zn.values;for(tr in Gn){var ir=b[tr],or=ir&&ir.prototype;if(or){if(or[er]!==rr)try{P(or,er,rr)}catch(js){or[er]=rr}if(or[nr]||P(or,nr,tr),Gn[tr])for(var sr in Zn)if(or[sr]!==Zn[sr])try{P(or,sr,Zn[sr])}catch(js){or[sr]=Zn[sr]}}}ft.Promise,st({target:"Promise",stat:!0},{try:function(t){var e=un.f(this),t=Xe(t);return(t.error?e.reject:e.resolve)(t.value),e.promise}});function ar(t,e){var n;return new(void 0===(n=ur(t)&&("function"==typeof(n=t.constructor)&&(n===Array||ur(n.prototype))||y(n)&&null===(n=n[cr]))?void 0:n)?Array:n)(0===e?0:e)}var ur=Array.isArray||function(t){return"Array"==r(t)},cr=Kt("species"),hr=[].push,lr=function(f){var p=1==f,d=2==f,g=3==f,v=4==f,y=6==f,m=7==f,b=5==f||y;return function(t,e,n,r){for(var i,o,s=_(t),a=w(s),u=zt(e,n,3),c=rt(a.length),h=0,r=r||ar,l=p?r(t,c):d||m?r(t,0):void 0;h>>=1)&&(e+=e))1&r&&(n+=e);return n}}),He("String","repeat");var zr,Gr=Kt("species"),Qr=Kt("isConcatSpreadable"),Yr=9007199254740991,Xr="Maximum allowed index exceeded",Pe=51<=Gt||!v(function(){var t=[];return t[Qr]=!1,t.concat()[0]!==t}),He=(zr="concat",51<=Gt||!v(function(){var t=[];return(t.constructor={})[Gr]=function(){return{foo:1}},1!==t[zr](Boolean).foo}));st({target:"Array",proto:!0,forced:!Pe||!He},{concat:function(t){for(var e,n,r,i=_(this),o=ar(i,0),s=0,a=-1,u=arguments.length;as[0]&&e[1]=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ji(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||0>6|192:(55296==(64512&i)&&r+1>18|240,e[n++]=i>>12&63|128):e[n++]=i>>12|224,e[n++]=i>>6&63|128),e[n++]=63&i|128)}return e}function eo(t){try{return oo.decodeString(t,!0)}catch(t){console.error("base64Decode failed: ",t)}return null}var no={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},ro=function(t,e){if(!t)throw io(e)},io=function(t){return new Error("Firebase Database ("+no.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)},oo={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i>6,c=63&c;u||(c=64,s||(h=64)),r.push(n[o>>2],n[(3&o)<<4|a>>4],n[h],n[c])}return r.join("")},encodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(to(t),e)},decodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):function(t){for(var e=[],n=0,r=0;n>10)),e[r++]=String.fromCharCode(56320+(1023&i))):(o=t[n++],s=t[n++],e[r++]=String.fromCharCode((15&a)<<12|(63&o)<<6|63&s))}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray:function(t,e){this.init_();for(var n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i>4),64!==a&&(r.push(s<<4&240|a>>2),64!==u&&r.push(a<<6&192|u))}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};function so(t){return ao(void 0,t)}function ao(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:return new Date(e.getTime());case Object:void 0===t&&(t={});break;case Array:t=[];break;default:return e}for(var n in e)e.hasOwnProperty(n)&&"__proto__"!==n&&(t[n]=ao(t[n],e[n]));return t}var uo=(co.prototype.wrapCallback=function(n){var r=this;return function(t,e){t?r.reject(t):r.resolve(e),"function"==typeof n&&(r.promise.catch(function(){}),1===n.length?n(t):n(t,e))}},co);function co(){var n=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise(function(t,e){n.resolve=t,n.reject=e})}function ho(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');var n=e||"demo-project",r=t.iat||0,e=t.sub||t.user_id;if(!e)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");t=Qi({iss:"https://securetoken.google.com/"+n,aud:n,iat:r,exp:r+3600,auth_time:r,sub:e,user_id:e,firebase:{sign_in_provider:"custom",identities:{}}},t);return[oo.encodeString(JSON.stringify({alg:"none",type:"JWT"}),!1),oo.encodeString(JSON.stringify(t),!1),""].join(".")}function lo(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function fo(){return"undefined"!=typeof window&&(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(lo())}function po(){try{return"[object process]"===Object.prototype.toString.call(global.process)}catch(t){return}}function go(){var t="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof t&&void 0!==t.id}function vo(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function yo(){return!0===no.NODE_ADMIN}function mo(){return"indexedDB"in self&&null!=indexedDB}function bo(){return new Promise(function(t,e){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=function(){i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=function(){n=!1},i.onerror=function(){var t;e((null===(t=i.error)||void 0===t?void 0:t.message)||"")}}catch(t){e(t)}})}function _o(){return!(!navigator||!navigator.cookieEnabled)}var wo,Io="FirebaseError",To=(Gi(Eo,wo=Error),Eo);function Eo(t,e,n){e=wo.call(this,e)||this;return e.code=t,e.customData=n,e.name=Io,Object.setPrototypeOf(e,Eo.prototype),Error.captureStackTrace&&Error.captureStackTrace(e,So.prototype.create),e}var So=(ko.prototype.create=function(t){for(var e=[],n=1;n"})):"Error",t=this.serviceName+": "+t+" ("+o+").";return new To(o,t,i)},ko);function ko(t,e,n){this.service=t,this.serviceName=e,this.errors=n}var Co=/\{\$([^}]+)}/g;function Ao(t){return JSON.parse(t)}function No(t){return JSON.stringify(t)}function Ro(t){var e={},n={},r={},i="";try{var o=t.split("."),e=Ao(eo(o[0])||""),n=Ao(eo(o[1])||""),i=o[2],r=n.d||{};delete n.d}catch(t){}return{header:e,claims:n,data:r,signature:i}}function Po(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Oo(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]}function Do(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function xo(t,e,n){var r,i={};for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=e.call(n,t[r],r,t));return i}function Lo(t){for(var n=[],e=0,r=Object.entries(t);e>>31)}for(var o,s=this.chain_[0],a=this.chain_[1],u=this.chain_[2],c=this.chain_[3],h=this.chain_[4],r=0;r<80;r++)var l=r<40?r<20?(o=c^a&(u^c),1518500249):(o=a^u^c,1859775393):r<60?(o=a&u|c&(a|u),2400959708):(o=a^u^c,3395469782),i=(s<<5|s>>>27)+o+h+l+n[r]&4294967295,h=c,c=u,u=4294967295&(a<<30|a>>>2),a=s,s=i;this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+a&4294967295,this.chain_[2]=this.chain_[2]+u&4294967295,this.chain_[3]=this.chain_[3]+c&4294967295,this.chain_[4]=this.chain_[4]+h&4294967295},Fo.prototype.update=function(t,e){if(null!=t){for(var n=(e=void 0===e?t.length:e)-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r>i&255,++r;return t},Fo);function Fo(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var t=1;t=(null!=o?o:t.logLevel)&&s({level:ss[e].toLowerCase(),message:i,args:n,type:t.name})}}(n[t])}var fr=((G={})["no-app"]="No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",G["bad-app-name"]="Illegal App name: '{$appName}",G["duplicate-app"]="Firebase App named '{$appName}' already exists",G["app-deleted"]="Firebase App named '{$appName}' already deleted",G["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",G["invalid-log-argument"]="First argument to `onLog` must be null or a function.",G),vs=new So("app","Firebase",fr),ys="@firebase/app",ms="[DEFAULT]",bs=((Q={})[ys]="fire-core",Q["@firebase/analytics"]="fire-analytics",Q["@firebase/app-check"]="fire-app-check",Q["@firebase/auth"]="fire-auth",Q["@firebase/database"]="fire-rtdb",Q["@firebase/functions"]="fire-fn",Q["@firebase/installations"]="fire-iid",Q["@firebase/messaging"]="fire-fcm",Q["@firebase/performance"]="fire-perf",Q["@firebase/remote-config"]="fire-rc",Q["@firebase/storage"]="fire-gcs",Q["@firebase/firestore"]="fire-fst",Q["fire-js"]="fire-js",Q["firebase-wrapper"]="fire-js-all",Q),_s=new fs("@firebase/app"),ws=(Object.defineProperty(Is.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(t){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=t},enumerable:!1,configurable:!0}),Object.defineProperty(Is.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!1,configurable:!0}),Object.defineProperty(Is.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!1,configurable:!0}),Is.prototype.delete=function(){var e=this;return new Promise(function(t){e.checkDestroyed_(),t()}).then(function(){return e.firebase_.INTERNAL.removeApp(e.name_),Promise.all(e.container.getProviders().map(function(t){return t.delete()}))}).then(function(){e.isDeleted_=!0})},Is.prototype._getService=function(t,e){void 0===e&&(e=ms),this.checkDestroyed_();var n=this.container.getProvider(t);return n.isInitialized()||"EXPLICIT"!==(null===(t=n.getComponent())||void 0===t?void 0:t.instantiationMode)||n.initialize(),n.getImmediate({identifier:e})},Is.prototype._removeServiceInstance=function(t,e){void 0===e&&(e=ms),this.container.getProvider(t).clearInstance(e)},Is.prototype._addComponent=function(e){try{this.container.addComponent(e)}catch(t){_s.debug("Component "+e.name+" failed to register with FirebaseApp "+this.name,t)}},Is.prototype._addOrOverwriteComponent=function(t){this.container.addOrOverwriteComponent(t)},Is.prototype.toJSON=function(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}},Is.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw vs.create("app-deleted",{appName:this.name_})},Is);function Is(t,e,n){var r=this;this.firebase_=n,this.isDeleted_=!1,this.name_=e.name,this.automaticDataCollectionEnabled_=e.automaticDataCollectionEnabled||!1,this.options_=so(t),this.container=new is(e.name),this._addComponent(new Zo("app",function(){return r},"PUBLIC")),this.firebase_.INTERNAL.components.forEach(function(t){return r._addComponent(t)})}ws.prototype.name&&ws.prototype.options||ws.prototype.delete||console.log("dc");var Ts="8.9.0";function Es(s){var a={},u=new Map,c={__esModule:!0,initializeApp:function(t,e){void 0===e&&(e={});"object"==typeof e&&null!==e||(e={name:e});var n=e;void 0===n.name&&(n.name=ms);e=n.name;if("string"!=typeof e||!e)throw vs.create("bad-app-name",{appName:String(e)});if(Po(a,e))throw vs.create("duplicate-app",{appName:e});n=new s(t,n,c);return a[e]=n},app:h,registerVersion:function(t,e,n){var r=null!==(i=bs[t])&&void 0!==i?i:t;n&&(r+="-"+n);var i=r.match(/\s|\//),t=e.match(/\s|\//);i||t?(n=['Unable to register library "'+r+'" with version "'+e+'":'],i&&n.push('library name "'+r+'" contains illegal characters (whitespace or "/")'),i&&t&&n.push("and"),t&&n.push('version name "'+e+'" contains illegal characters (whitespace or "/")'),_s.warn(n.join(" "))):o(new Zo(r+"-version",function(){return{library:r,version:e}},"VERSION"))},setLogLevel:ds,onLog:function(t,e){if(null!==t&&"function"!=typeof t)throw vs.create("invalid-log-argument");gs(t,e)},apps:null,SDK_VERSION:Ts,INTERNAL:{registerComponent:o,removeApp:function(t){delete a[t]},components:u,useAsService:function(t,e){return"serverAuth"!==e?e:null}}};function h(t){if(!Po(a,t=t||ms))throw vs.create("no-app",{appName:t});return a[t]}function o(n){var t,r=n.name;if(u.has(r))return _s.debug("There were multiple attempts to register component "+r+"."),"PUBLIC"===n.type?c[r]:null;u.set(r,n),"PUBLIC"===n.type&&(t=function(t){if("function"!=typeof(t=void 0===t?h():t)[r])throw vs.create("invalid-app-argument",{appName:r});return t[r]()},void 0!==n.serviceProps&&ao(t,n.serviceProps),c[r]=t,s.prototype[r]=function(){for(var t=[],e=0;e>>0),r=0;function i(t,e,n){return t.call.apply(t.bind,arguments)}function y(e,n,t){if(!e)throw Error();if(2/g,Z=/"/g,tt=/'/g,et=/\x00/g,nt=/[\x00&<>"']/;function rt(t,e){return-1!=t.indexOf(e)}function it(t,e){return t"}else o=void 0===t?"undefined":null===t?"null":typeof t;O("Argument is not a %s (or a non-Element, non-Location mock); got: %s",e,o)}}function pt(t,e){this.a=t===yt&&e||"",this.b=vt}function dt(t){return t instanceof pt&&t.constructor===pt&&t.b===vt?t.a:(O("expected object of type Const, got '"+t+"'"),"type_error:Const")}pt.prototype.ta=!0,pt.prototype.sa=function(){return this.a},pt.prototype.toString=function(){return"Const{"+this.a+"}"};var gt,vt={},yt={};function mt(){if(void 0===gt){var t=null,e=l.trustedTypes;if(e&&e.createPolicy){try{t=e.createPolicy("goog#html",{createHTML:w,createScript:w,createScriptURL:w})}catch(t){l.console&&l.console.error(t.message)}gt=t}else gt=t}return gt}function bt(t,e){this.a=e===Et?t:""}function _t(t){return t instanceof bt&&t.constructor===bt?t.a:(O("expected object of type TrustedResourceUrl, got '"+t+"' of type "+p(t)),"type_error:TrustedResourceUrl")}function wt(t,n){var e,r=dt(t);if(!Tt.test(r))throw Error("Invalid TrustedResourceUrl format: "+r);return t=r.replace(It,function(t,e){if(!Object.prototype.hasOwnProperty.call(n,e))throw Error('Found marker, "'+e+'", in format string, "'+r+'", but no valid label mapping found in args: '+JSON.stringify(n));return(t=n[e])instanceof pt?dt(t):encodeURIComponent(String(t))}),e=t,t=mt(),new bt(e=t?t.createScriptURL(e):e,Et)}bt.prototype.ta=!0,bt.prototype.sa=function(){return this.a.toString()},bt.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var It=/%{(\w+)}/g,Tt=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,Et={};function St(t,e){this.a=e===Ot?t:""}function kt(t){return t instanceof St&&t.constructor===St?t.a:(O("expected object of type SafeUrl, got '"+t+"' of type "+p(t)),"type_error:SafeUrl")}St.prototype.ta=!0,St.prototype.sa=function(){return this.a.toString()},St.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var Ct=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)|font\/\w+|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime|x-matroska))(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i,At=/^data:(.*);base64,[a-z0-9+\/]+=*$/i,Nt=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function Rt(t){return t instanceof St?t:(t="object"==typeof t&&t.ta?t.sa():String(t),t=Nt.test(t)||(e=(t=(t=String(t)).replace(/(%0A|%0D)/g,"")).match(At))&&Ct.test(e[1])?new St(t,Ot):null);var e}function Pt(t){return t instanceof St?t:(t="object"==typeof t&&t.ta?t.sa():String(t),new St(t=!Nt.test(t)?"about:invalid#zClosurez":t,Ot))}var Ot={},Dt=new St("about:invalid#zClosurez",Ot);function xt(t,e,n){this.a=n===Lt?t:""}xt.prototype.ta=!0,xt.prototype.sa=function(){return this.a.toString()},xt.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var Lt={};function Mt(t,e,n,r){return t=t instanceof St?t:Pt(t),e=e||l,n=n instanceof pt?dt(n):n||"",e.open(kt(t),n,r,void 0)}function Ft(t){for(var e=t.split("%s"),n="",r=Array.prototype.slice.call(arguments,1);r.length&&1")?t.replace(J,">"):t).indexOf('"')?t.replace(Z,"""):t).indexOf("'")?t.replace(tt,"'"):t).indexOf("\0")&&(t=t.replace(et,"�"))),t}function Ut(t){return Ut[" "](t),t}Ut[" "]=s;var qt,Vt=st("Opera"),Bt=st("Trident")||st("MSIE"),Kt=st("Edge"),Wt=Kt||Bt,Ht=st("Gecko")&&!(rt(Q.toLowerCase(),"webkit")&&!st("Edge"))&&!(st("Trident")||st("MSIE"))&&!st("Edge"),zt=rt(Q.toLowerCase(),"webkit")&&!st("Edge");function Gt(){var t=l.document;return t?t.documentMode:void 0}t:{var Qt="",Yt=(Yt=Q,Ht?/rv:([^\);]+)(\)|;)/.exec(Yt):Kt?/Edge\/([\d\.]+)/.exec(Yt):Bt?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(Yt):zt?/WebKit\/(\S+)/.exec(Yt):Vt?/(?:Version)[ \/]?(\S+)/.exec(Yt):void 0);if(Yt&&(Qt=Yt?Yt[1]:""),Bt){Yt=Gt();if(null!=Yt&&Yt>parseFloat(Qt)){qt=String(Yt);break t}}qt=Qt}var Xt={};function $t(a){return t=a,e=function(){for(var t=0,e=Y(String(qt)).split("."),n=Y(String(a)).split("."),r=Math.max(e.length,n.length),i=0;0==t&&i"),r=r.join("")),r=se(n,r),i&&("string"==typeof i?r.className=i:Array.isArray(i)?r.className=i.join(" "):ee(r,i)),2>>0);function ln(e){return g(e)?e:(e[hn]||(e[hn]=function(t){return e.handleEvent(t)}),e[hn])}function fn(){De.call(this),this.v=new Qe(this),(this.bc=this).hb=null}function pn(t,e,n,r,i){t.v.add(String(e),n,!1,r,i)}function dn(t,e,n,r,i){t.v.add(String(e),n,!0,r,i)}function gn(t,e,n,r){if(!(e=t.v.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o>4&15).toString(16)+(15&t).toString(16)}En.prototype.toString=function(){var t=[],e=this.c;e&&t.push(Dn(e,Ln,!0),":");var n=this.a;return!n&&"file"!=e||(t.push("//"),(e=this.l)&&t.push(Dn(e,Ln,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.g)&&t.push(":",String(n))),(n=this.f)&&(this.a&&"/"!=n.charAt(0)&&t.push("/"),t.push(Dn(n,"/"==n.charAt(0)?Fn:Mn,!0))),(n=this.b.toString())&&t.push("?",n),(n=this.h)&&t.push("#",Dn(n,Un)),t.join("")},En.prototype.resolve=function(t){var e=new En(this),n=!!t.c;n?Sn(e,t.c):n=!!t.l,n?e.l=t.l:n=!!t.a,n?e.a=t.a:n=null!=t.g;var r=t.f;if(n)kn(e,t.g);else if(n=!!t.f)if("/"!=r.charAt(0)&&(this.a&&!this.f?r="/"+r:-1!=(i=e.f.lastIndexOf("/"))&&(r=e.f.substr(0,i+1)+r)),".."==(i=r)||"."==i)r="";else if(rt(i,"./")||rt(i,"/.")){for(var r=0==i.lastIndexOf("/",0),i=i.split("/"),o=[],s=0;s2*t.c&&wn(t)))}function Wn(t,e){return Vn(t),e=Gn(t,e),In(t.a.b,e)}function Hn(t,e,n){Kn(t,e),0',t=new xt(t=(r=mt())?r.createHTML(t):t,0,Lt),r=s.document)&&(r.write((o=t)instanceof xt&&o.constructor===xt?o.a:(O("expected object of type SafeHtml, got '"+o+"' of type "+p(o)),"type_error:SafeHtml")),r.close())):(s=Mt(e,r,n,s))&&t.noopener&&(s.opener=null),s)try{s.focus()}catch(t){}return s}var or=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,sr=/^[^@]+@[^@]+$/;function ar(){var e=null;return new fe(function(t){"complete"==l.document.readyState?t():(e=function(){t()},en(window,"load",e))}).o(function(t){throw nn(window,"load",e),t})}function ur(t){return t=t||mr(),!("file:"!==Tr()&&"ionic:"!==Tr()||!t.toLowerCase().match(/iphone|ipad|ipod|android/))}function cr(){var t=l.window;try{return t&&t!=t.top}catch(t){return}}function hr(){return void 0!==l.WorkerGlobalScope&&"function"==typeof l.importScripts}function lr(){return Jl.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":Jl.INTERNAL.hasOwnProperty("node")?"Node":hr()?"Worker":"Browser"}function fr(){var t=lr();return"ReactNative"===t||"Node"===t}var pr="Firefox",dr="Chrome";function gr(t){var e=t.toLowerCase();return rt(e,"opera/")||rt(e,"opr/")||rt(e,"opios/")?"Opera":rt(e,"iemobile")?"IEMobile":rt(e,"msie")||rt(e,"trident/")?"IE":rt(e,"edge/")?"Edge":rt(e,"firefox/")?pr:rt(e,"silk/")?"Silk":rt(e,"blackberry")?"Blackberry":rt(e,"webos")?"Webos":!rt(e,"safari/")||rt(e,"chrome/")||rt(e,"crios/")||rt(e,"android")?!rt(e,"chrome/")&&!rt(e,"crios/")||rt(e,"edge/")?rt(e,"android")?"Android":(t=t.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==t.length?t[1]:"Other":dr:"Safari"}var vr={md:"FirebaseCore-web",od:"FirebaseUI-web"};function yr(t,e){e=e||[];var n,r=[],i={};for(n in vr)i[vr[n]]=!0;for(n=0;n>4),64!=s&&(t(o<<4&240|s>>2),64!=a&&t(s<<6&192|a))}}(t,function(t){e.push(t)}),e}function Di(t){var e=Li(t);if(!(e&&e.sub&&e.iss&&e.aud&&e.exp))throw Error("Invalid JWT");this.h=t,this.a=e.exp,this.i=e.sub,t=Date.now()/1e3,this.g=e.iat||(t>this.a?this.a:t),this.b=e.provider_id||e.firebase&&e.firebase.sign_in_provider||null,this.f=e.firebase&&e.firebase.tenant||null,this.c=!!e.is_anonymous||"anonymous"==this.b}function xi(t){try{return new Di(t)}catch(t){return null}}function Li(t){if(!t)return null;if(3!=(t=t.split(".")).length)return null;for(var e=(4-(t=t[1]).length%4)%4,n=0;n>10)),t[n++]=String.fromCharCode(56320+(1023&s))):(i=r[e++],o=r[e++],t[n++]=String.fromCharCode((15&a)<<12|(63&i)<<6|63&o))}return JSON.parse(t.join(""))}catch(t){}return null}Di.prototype.T=function(){return this.f},Di.prototype.l=function(){return this.c},Di.prototype.toString=function(){return this.h};var Mi="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),Fi=["client_id","response_type","scope","redirect_uri","state"],ji={nd:{Ja:"locale",va:700,ua:600,fa:"facebook.com",Ya:Fi},pd:{Ja:null,va:500,ua:750,fa:"github.com",Ya:Fi},qd:{Ja:"hl",va:515,ua:680,fa:"google.com",Ya:Fi},wd:{Ja:"lang",va:485,ua:705,fa:"twitter.com",Ya:Mi},kd:{Ja:"locale",va:640,ua:600,fa:"apple.com",Ya:[]}};function Ui(t){for(var e in ji)if(ji[e].fa==t)return ji[e];return null}function qi(t){var e={};e["facebook.com"]=Hi,e["google.com"]=Gi,e["github.com"]=zi,e["twitter.com"]=Qi;var n=t&&t[Bi];try{if(n)return new(e[n]||Wi)(t);if(void 0!==t[Vi])return new Ki(t)}catch(t){}return null}var Vi="idToken",Bi="providerId";function Ki(t){var e,n=t[Bi];if(n||!t[Vi]||(e=xi(t[Vi]))&&e.b&&(n=e.b),!n)throw Error("Invalid additional user info!");e=!1,void 0!==t.isNewUser?e=!!t.isNewUser:"identitytoolkit#SignupNewUserResponse"===t.kind&&(e=!0),qr(this,"providerId",n="anonymous"==n||"custom"==n?null:n),qr(this,"isNewUser",e)}function Wi(t){Ki.call(this,t),qr(this,"profile",Kr((t=Cr(t.rawUserInfo||"{}"))||{}))}function Hi(t){if(Wi.call(this,t),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function zi(t){if(Wi.call(this,t),"github.com"!=this.providerId)throw Error("Invalid provider ID!");qr(this,"username",this.profile&&this.profile.login||null)}function Gi(t){if(Wi.call(this,t),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function Qi(t){if(Wi.call(this,t),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");qr(this,"username",t.screenName||null)}function Yi(t){var e=Nn(r=Rn(t),"link"),n=Nn(Rn(e),"link"),r=Nn(r,"deep_link_id");return Nn(Rn(r),"link")||r||n||e||t}function Xi(t,e){if(!t&&!e)throw new I("internal-error","Internal assert: no raw session string available");if(t&&e)throw new I("internal-error","Internal assert: unable to determine the session type");this.a=t||null,this.b=e||null,this.type=this.a?$i:Ji}_(Wi,Ki),_(Hi,Wi),_(zi,Wi),_(Gi,Wi),_(Qi,Wi);var $i="enroll",Ji="signin";function Zi(){}function to(t,n){return t.then(function(t){if(t[Ks]){var e=xi(t[Ks]);if(!e||n!=e.i)throw new I("user-mismatch");return t}throw new I("user-mismatch")}).o(function(t){throw t&&t.code&&t.code==S+"user-not-found"?new I("user-mismatch"):t})}function eo(t,e){if(!e)throw new I("internal-error","failed to construct a credential");this.a=e,qr(this,"providerId",t),qr(this,"signInMethod",t)}function no(t){return{pendingToken:t.a,requestUri:"http://localhost"}}function ro(t){if(t&&t.providerId&&t.signInMethod&&0==t.providerId.indexOf("saml.")&&t.pendingToken)try{return new eo(t.providerId,t.pendingToken)}catch(t){}return null}function io(t,e,n){if(this.a=null,e.idToken||e.accessToken)e.idToken&&qr(this,"idToken",e.idToken),e.accessToken&&qr(this,"accessToken",e.accessToken),e.nonce&&!e.pendingToken&&qr(this,"nonce",e.nonce),e.pendingToken&&(this.a=e.pendingToken);else{if(!e.oauthToken||!e.oauthTokenSecret)throw new I("internal-error","failed to construct a credential");qr(this,"accessToken",e.oauthToken),qr(this,"secret",e.oauthTokenSecret)}qr(this,"providerId",t),qr(this,"signInMethod",n)}function oo(t){var e={};return t.idToken&&(e.id_token=t.idToken),t.accessToken&&(e.access_token=t.accessToken),t.secret&&(e.oauth_token_secret=t.secret),e.providerId=t.providerId,t.nonce&&!t.a&&(e.nonce=t.nonce),e={postBody:Bn(e).toString(),requestUri:"http://localhost"},t.a&&(delete e.postBody,e.pendingToken=t.a),e}function so(t){if(t&&t.providerId&&t.signInMethod){var e={idToken:t.oauthIdToken,accessToken:t.oauthTokenSecret?null:t.oauthAccessToken,oauthTokenSecret:t.oauthTokenSecret,oauthToken:t.oauthTokenSecret&&t.oauthAccessToken,nonce:t.nonce,pendingToken:t.pendingToken};try{return new io(t.providerId,e,t.signInMethod)}catch(t){}}return null}function ao(t,e){this.Qc=e||[],Vr(this,{providerId:t,isOAuthProvider:!0}),this.Jb={},this.qb=(Ui(t)||{}).Ja||null,this.pb=null}function uo(t){if("string"!=typeof t||0!=t.indexOf("saml."))throw new I("argument-error",'SAML provider IDs must be prefixed with "saml."');ao.call(this,t,[])}function co(t){ao.call(this,t,Fi),this.a=[]}function ho(){co.call(this,"facebook.com")}function lo(t){if(!t)throw new I("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return v(t)&&(e=t.accessToken),(new ho).credential({accessToken:e})}function fo(){co.call(this,"github.com")}function po(t){if(!t)throw new I("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return v(t)&&(e=t.accessToken),(new fo).credential({accessToken:e})}function go(){co.call(this,"google.com"),this.Ca("profile")}function vo(t,e){var n=t;return v(t)&&(n=t.idToken,e=t.accessToken),(new go).credential({idToken:n,accessToken:e})}function yo(){ao.call(this,"twitter.com",Mi)}function mo(t,e){var n=t;if(!(n=!v(n)?{oauthToken:t,oauthTokenSecret:e}:n).oauthToken||!n.oauthTokenSecret)throw new I("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new io("twitter.com",n,"twitter.com")}function bo(t,e,n){this.a=t,this.f=e,qr(this,"providerId","password"),qr(this,"signInMethod",n===wo.EMAIL_LINK_SIGN_IN_METHOD?wo.EMAIL_LINK_SIGN_IN_METHOD:wo.EMAIL_PASSWORD_SIGN_IN_METHOD)}function _o(t){return t&&t.email&&t.password?new bo(t.email,t.password,t.signInMethod):null}function wo(){Vr(this,{providerId:"password",isOAuthProvider:!1})}function Io(t,e){if(!(e=To(e)))throw new I("argument-error","Invalid email link!");return new bo(t,e.code,wo.EMAIL_LINK_SIGN_IN_METHOD)}function To(t){return(t=bi(t=Yi(t)))&&t.operation===Zr?t:null}function Eo(t){if(!(t.fb&&t.eb||t.La&&t.ea))throw new I("internal-error");this.a=t,qr(this,"providerId","phone"),this.fa="phone",qr(this,"signInMethod","phone")}function So(e){if(e&&"phone"===e.providerId&&(e.verificationId&&e.verificationCode||e.temporaryProof&&e.phoneNumber)){var n={};return U(["verificationId","verificationCode","temporaryProof","phoneNumber"],function(t){e[t]&&(n[t]=e[t])}),new Eo(n)}return null}function ko(t){return t.a.La&&t.a.ea?{temporaryProof:t.a.La,phoneNumber:t.a.ea}:{sessionInfo:t.a.fb,code:t.a.eb}}function Co(t){try{this.a=t||Jl.auth()}catch(t){throw new I("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}Vr(this,{providerId:"phone",isOAuthProvider:!1})}function Ao(t,e){if(!t)throw new I("missing-verification-id");if(!e)throw new I("missing-verification-code");return new Eo({fb:t,eb:e})}function No(t){if(t.temporaryProof&&t.phoneNumber)return new Eo({La:t.temporaryProof,ea:t.phoneNumber});var e=t&&t.providerId;if(!e||"password"===e)return null;var n=t&&t.oauthAccessToken,r=t&&t.oauthTokenSecret,i=t&&t.nonce,o=t&&t.oauthIdToken,s=t&&t.pendingToken;try{switch(e){case"google.com":return vo(o,n);case"facebook.com":return lo(n);case"github.com":return po(n);case"twitter.com":return mo(n,r);default:return n||r||o||s?s?0==e.indexOf("saml.")?new eo(e,s):new io(e,{pendingToken:s,idToken:t.oauthIdToken,accessToken:t.oauthAccessToken},e):new co(e).credential({idToken:o,accessToken:n,rawNonce:i}):null}}catch(t){return null}}function Ro(t){if(!t.isOAuthProvider)throw new I("invalid-oauth-provider")}function Po(t,e,n,r,i,o,s){if(this.c=t,this.b=e||null,this.g=n||null,this.f=r||null,this.i=o||null,this.h=s||null,this.a=i||null,!this.g&&!this.a)throw new I("invalid-auth-event");if(this.g&&this.a)throw new I("invalid-auth-event");if(this.g&&!this.f)throw new I("invalid-auth-event")}function Oo(t){return(t=t||{}).type?new Po(t.type,t.eventId,t.urlResponse,t.sessionId,t.error&&T(t.error),t.postBody,t.tenantId):null}function Do(){this.b=null,this.a=[]}Xi.prototype.Ha=function(){return this.a?be(this.a):be(this.b)},Xi.prototype.w=function(){return this.type==$i?{multiFactorSession:{idToken:this.a}}:{multiFactorSession:{pendingCredential:this.b}}},Zi.prototype.ka=function(){},Zi.prototype.b=function(){},Zi.prototype.c=function(){},Zi.prototype.w=function(){},eo.prototype.ka=function(t){return la(t,no(this))},eo.prototype.b=function(t,e){var n=no(this);return n.idToken=e,fa(t,n)},eo.prototype.c=function(t,e){return to(pa(t,no(this)),e)},eo.prototype.w=function(){return{providerId:this.providerId,signInMethod:this.signInMethod,pendingToken:this.a}},io.prototype.ka=function(t){return la(t,oo(this))},io.prototype.b=function(t,e){var n=oo(this);return n.idToken=e,fa(t,n)},io.prototype.c=function(t,e){return to(pa(t,oo(this)),e)},io.prototype.w=function(){var t={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(t.oauthIdToken=this.idToken),this.accessToken&&(t.oauthAccessToken=this.accessToken),this.secret&&(t.oauthTokenSecret=this.secret),this.nonce&&(t.nonce=this.nonce),this.a&&(t.pendingToken=this.a),t},ao.prototype.Ka=function(t){return this.Jb=ct(t),this},_(uo,ao),_(co,ao),co.prototype.Ca=function(t){return K(this.a,t)||this.a.push(t),this},co.prototype.Rb=function(){return G(this.a)},co.prototype.credential=function(t,e){e=v(t)?{idToken:t.idToken||null,accessToken:t.accessToken||null,nonce:t.rawNonce||null}:{idToken:t||null,accessToken:e||null};if(!e.idToken&&!e.accessToken)throw new I("argument-error","credential failed: must provide the ID token and/or the access token.");return new io(this.providerId,e,this.providerId)},_(ho,co),qr(ho,"PROVIDER_ID","facebook.com"),qr(ho,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),_(fo,co),qr(fo,"PROVIDER_ID","github.com"),qr(fo,"GITHUB_SIGN_IN_METHOD","github.com"),_(go,co),qr(go,"PROVIDER_ID","google.com"),qr(go,"GOOGLE_SIGN_IN_METHOD","google.com"),_(yo,ao),qr(yo,"PROVIDER_ID","twitter.com"),qr(yo,"TWITTER_SIGN_IN_METHOD","twitter.com"),bo.prototype.ka=function(t){return this.signInMethod==wo.EMAIL_LINK_SIGN_IN_METHOD?Qa(t,wa,{email:this.a,oobCode:this.f}):Qa(t,Ka,{email:this.a,password:this.f})},bo.prototype.b=function(t,e){return this.signInMethod==wo.EMAIL_LINK_SIGN_IN_METHOD?Qa(t,Ia,{idToken:e,email:this.a,oobCode:this.f}):Qa(t,La,{idToken:e,email:this.a,password:this.f})},bo.prototype.c=function(t,e){return to(this.ka(t),e)},bo.prototype.w=function(){return{email:this.a,password:this.f,signInMethod:this.signInMethod}},Vr(wo,{PROVIDER_ID:"password"}),Vr(wo,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Vr(wo,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Eo.prototype.ka=function(t){return t.gb(ko(this))},Eo.prototype.b=function(t,e){var n=ko(this);return n.idToken=e,Qa(t,Ha,n)},Eo.prototype.c=function(t,e){var n=ko(this);return n.operation="REAUTH",to(t=Qa(t,za,n),e)},Eo.prototype.w=function(){var t={providerId:"phone"};return this.a.fb&&(t.verificationId=this.a.fb),this.a.eb&&(t.verificationCode=this.a.eb),this.a.La&&(t.temporaryProof=this.a.La),this.a.ea&&(t.phoneNumber=this.a.ea),t},Co.prototype.gb=function(r,i){var o=this.a.a;return be(i.verify()).then(function(e){if("string"!=typeof e)throw new I("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");if("recaptcha"!==i.type)throw new I("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.');var t=v(r)?r.session:null,n=v(r)?r.phoneNumber:r,t=t&&t.type==$i?t.Ha().then(function(t){return Qa(o,Fa,{idToken:t,phoneEnrollmentInfo:{phoneNumber:n,recaptchaToken:e}}).then(function(t){return t.phoneSessionInfo.sessionInfo})}):t&&t.type==Ji?t.Ha().then(function(t){return t={mfaPendingCredential:t,mfaEnrollmentId:r.multiFactorHint&&r.multiFactorHint.uid||r.multiFactorUid,phoneSignInInfo:{recaptchaToken:e}},Qa(o,ja,t).then(function(t){return t.phoneResponseInfo.sessionInfo})}):Qa(o,Da,{phoneNumber:n,recaptchaToken:e});return t.then(function(t){return"function"==typeof i.reset&&i.reset(),t},function(t){throw"function"==typeof i.reset&&i.reset(),t})})},Vr(Co,{PROVIDER_ID:"phone"}),Vr(Co,{PHONE_SIGN_IN_METHOD:"phone"}),Po.prototype.getUid=function(){var t=[];return t.push(this.c),this.b&&t.push(this.b),this.f&&t.push(this.f),this.h&&t.push(this.h),t.join("-")},Po.prototype.T=function(){return this.h},Po.prototype.w=function(){return{type:this.c,eventId:this.b,urlResponse:this.g,sessionId:this.f,postBody:this.i,tenantId:this.h,error:this.a&&this.a.w()}};var xo,Lo=null;function Mo(t){var e="unauthorized-domain",n=void 0,r=Rn(t);t=r.a,"chrome-extension"==(r=r.c)?n=Ft("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):"http"==r||"https"==r?n=Ft("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):e="operation-not-supported-in-this-environment",I.call(this,e,n)}function Fo(t,e,n){I.call(this,t,n),(t=e||{}).Kb&&qr(this,"email",t.Kb),t.ea&&qr(this,"phoneNumber",t.ea),t.credential&&qr(this,"credential",t.credential),t.$b&&qr(this,"tenantId",t.$b)}function jo(t){if(t.code){var e=t.code||"";0==e.indexOf(S)&&(e=e.substring(S.length));var n={credential:No(t),$b:t.tenantId};if(t.email)n.Kb=t.email;else if(t.phoneNumber)n.ea=t.phoneNumber;else if(!n.credential)return new I(e,t.message||void 0);return new Fo(e,n,t.message)}return null}function Uo(){}function qo(t){return t.c||(t.c=t.b())}function Vo(){}function Bo(t){if(t.f||"undefined"!=typeof XMLHttpRequest||"undefined"==typeof ActiveXObject)return t.f;for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n=function t(e){return e.c||(e.a?t(e.a):(O("Root logger has no level set."),null))}(this).value)for(g(e)&&(e=e()),t=new zo(t,String(e),this.f),n&&(t.a=n),n=this;n;)n=n.a};var Zo,ts={},es=null;function ns(t){var e,n,r;return es||(es=new Go(""),(ts[""]=es).c=$o),(e=ts[t])||(e=new Go(t),r=t.lastIndexOf("."),n=t.substr(r+1),(r=ns(t.substr(0,r))).b||(r.b={}),(r.b[n]=e).a=r,ts[t]=e),e}function rs(t,e){t&&t.log(Jo,e,void 0)}function is(t){this.f=t}function os(t){fn.call(this),this.u=t,this.h=void 0,this.readyState=ss,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.l=new Headers,this.b=null,this.s="GET",this.f="",this.a=!1,this.i=ns("goog.net.FetchXmlHttp"),this.m=this.c=this.g=null}_(is,Uo),is.prototype.a=function(){return new os(this.f)},is.prototype.b=(Zo={},function(){return Zo}),_(os,fn);var ss=0;function as(t){t.c.read().then(t.pc.bind(t)).catch(t.Va.bind(t))}function us(t){t.readyState=4,t.g=null,t.c=null,t.m=null,cs(t)}function cs(t){t.onreadystatechange&&t.onreadystatechange.call(t)}function hs(t){fn.call(this),this.headers=new _n,this.D=t||null,this.c=!1,this.C=this.a=null,this.h=this.P=this.l="",this.f=this.N=this.i=this.J=!1,this.g=0,this.s=null,this.m=ls,this.u=this.S=!1}(t=os.prototype).open=function(t,e){if(this.readyState!=ss)throw this.abort(),Error("Error reopening a connection");this.s=t,this.f=e,this.readyState=1,cs(this)},t.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var e={headers:this.l,method:this.s,credentials:this.h,cache:void 0};t&&(e.body=t),this.u.fetch(new Request(this.f,e)).then(this.uc.bind(this),this.Va.bind(this))},t.abort=function(){this.response=this.responseText="",this.l=new Headers,this.status=0,this.c&&this.c.cancel("Request was aborted."),1<=this.readyState&&this.a&&4!=this.readyState&&(this.a=!1,us(this)),this.readyState=ss},t.uc=function(t){this.a&&(this.g=t,this.b||(this.status=this.g.status,this.statusText=this.g.statusText,this.b=t.headers,this.readyState=2,cs(this)),this.a&&(this.readyState=3,cs(this),this.a&&("arraybuffer"===this.responseType?t.arrayBuffer().then(this.sc.bind(this),this.Va.bind(this)):void 0!==l.ReadableStream&&"body"in t?(this.response=this.responseText="",this.c=t.body.getReader(),this.m=new TextDecoder,as(this)):t.text().then(this.tc.bind(this),this.Va.bind(this)))))},t.pc=function(t){var e;this.a&&((e=this.m.decode(t.value||new Uint8Array(0),{stream:!t.done}))&&(this.response=this.responseText+=e),(t.done?us:cs)(this),3==this.readyState&&as(this))},t.tc=function(t){this.a&&(this.response=this.responseText=t,us(this))},t.sc=function(t){this.a&&(this.response=t,us(this))},t.Va=function(t){var e=this.i;e&&e.log(Xo,"Failed to fetch url "+this.f,t instanceof Error?t:Error(t)),this.a&&us(this)},t.setRequestHeader=function(t,e){this.l.append(t,e)},t.getResponseHeader=function(t){return this.b?this.b.get(t.toLowerCase())||"":((t=this.i)&&t.log(Xo,"Attempting to get response header but no headers have been received for url: "+this.f,void 0),"")},t.getAllResponseHeaders=function(){if(!this.b){var t=this.i;return t&&t.log(Xo,"Attempting to get all response headers but no headers have been received for url: "+this.f,void 0),""}for(var t=[],e=this.b.entries(),n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join("\r\n")},Object.defineProperty(os.prototype,"withCredentials",{get:function(){return"include"===this.h},set:function(t){this.h=t?"include":"same-origin"}}),_(hs,fn);var ls="";hs.prototype.b=ns("goog.net.XhrIo");var fs=/^https?$/i,ps=["POST","PUT"];function ds(e,t,n,r,i){if(e.a)throw Error("[goog.net.XhrIo] Object is active with another request="+e.l+"; newUri="+t);n=n?n.toUpperCase():"GET",e.l=t,e.h="",e.P=n,e.J=!1,e.c=!0,e.a=(e.D||xo).a(),e.C=e.D?qo(e.D):qo(xo),e.a.onreadystatechange=m(e.Wb,e);try{rs(e.b,Ts(e,"Opening Xhr")),e.N=!0,e.a.open(n,String(t),!0),e.N=!1}catch(t){return rs(e.b,Ts(e,"Error opening Xhr: "+t.message)),void vs(e,t)}t=r||"";var o,s=new _n(e.headers);i&&function(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(d(t)||"string"==typeof t)U(t,e,void 0);else for(var n=bn(t),r=mn(t),i=r.length,o=0;o>>7|i<<25)^(i>>>18|i<<14)^i>>>3)|0,s=(0|n[e-7])+((r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)|0;n[e]=o+s|0}r=0|t.a[0],i=0|t.a[1];var a=0|t.a[2],u=0|t.a[3],c=0|t.a[4],h=0|t.a[5],l=0|t.a[6];for(o=0|t.a[7],e=0;e<64;e++){var f=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&a^i&a)|0;s=(o=o+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))|0)+((s=(s=c&h^~c&l)+(0|Ju[e])|0)+(0|n[e])|0)|0,o=l,l=h,h=c,c=u+s|0,u=a,a=i,i=r,r=s+f|0}t.a[0]=t.a[0]+r|0,t.a[1]=t.a[1]+i|0,t.a[2]=t.a[2]+a|0,t.a[3]=t.a[3]+u|0,t.a[4]=t.a[4]+c|0,t.a[5]=t.a[5]+h|0,t.a[6]=t.a[6]+l|0,t.a[7]=t.a[7]+o|0}function uc(t,e,n){void 0===n&&(n=e.length);var r=0,i=t.c;if("string"==typeof e)for(;r>i&255;return V(t,function(t){return 1<(t=t.toString(16)).length?t:"0"+t}).join("")}function gc(t,e){for(var n=0;nt.f&&(t.a=t.f),e)}function oh(t){this.f=t,this.b=this.a=null,this.c=Date.now()}function sh(t,e){void 0===e&&(e=t.b?(e=t.b).a-e.g:0),t.c=Date.now()+1e3*e}function ah(t,e){t.b=xi(e[Ks]||""),t.a=e.refreshToken,sh(t,void 0!==(e=e.expiresIn)?Number(e):void 0)}function uh(e,t){return r=e.f,i=t,new fe(function(e,n){"refresh_token"==i.grant_type&&i.refresh_token||"authorization_code"==i.grant_type&&i.code?Js(r,r.l+"?key="+encodeURIComponent(r.c),function(t){t?t.error?n(Xa(t)):t.access_token&&t.refresh_token?e(t):n(new I("internal-error")):n(new I("network-request-failed"))},"POST",Bn(i).toString(),r.g,r.m.get()):n(new I("internal-error"))}).then(function(t){return e.b=xi(t.access_token),e.a=t.refresh_token,sh(e,t.expires_in),{accessToken:e.b.toString(),refreshToken:e.a}}).o(function(t){throw"auth/user-token-expired"==t.code&&(e.a=null),t});var r,i}function ch(t,e){this.a=t||null,this.b=e||null,Vr(this,{lastSignInTime:xr(e||null),creationTime:xr(t||null)})}function hh(t,e,n,r,i,o){Vr(this,{uid:t,displayName:r||null,photoURL:i||null,email:n||null,phoneNumber:o||null,providerId:e})}function lh(t,e,n){this.N=[],this.l=t.apiKey,this.m=t.appName,this.s=t.authDomain||null;var r,i=Jl.SDK_VERSION?yr(Jl.SDK_VERSION):null;this.a=new Vs(this.l,A(E),i),(this.u=t.emulatorConfig||null)&&Ys(this.a,this.u),this.h=new oh(this.a),_h(this,e[Ks]),ah(this.h,e),qr(this,"refreshToken",this.h.a),Th(this,n||{}),fn.call(this),this.P=!1,this.s&&wr()&&(this.b=Lc(this.s,this.l,this.m,this.u)),this.W=[],this.i=null,this.D=(r=this,new rh(function(){return r.I(!0)},function(t){return!(!t||"auth/network-request-failed"!=t.code)},function(){var t=r.h.c-Date.now()-3e5;return 0this.c-3e4?this.a?uh(this,{grant_type:"refresh_token",refresh_token:this.a}):be(null):be({accessToken:this.b.toString(),refreshToken:this.a})},ch.prototype.w=function(){return{lastLoginAt:this.b,createdAt:this.a}},_(lh,fn),lh.prototype.xa=function(t){this.za=t,Qs(this.a,t)},lh.prototype.la=function(){return this.za},lh.prototype.Ga=function(){return G(this.aa)},lh.prototype.ib=function(){this.D.b&&(this.D.stop(),this.D.start())},qr(lh.prototype,"providerId","firebase"),(t=lh.prototype).reload=function(){var t=this;return Uh(this,Sh(this).then(function(){return Ph(t).then(function(){return wh(t)}).then(Eh)}))},t.oc=function(t){return this.I(t).then(function(t){return new Hc(t)})},t.I=function(t){var e=this;return Uh(this,Sh(this).then(function(){return e.h.getToken(t)}).then(function(t){if(!t)throw new I("internal-error");return t.accessToken!=e.Aa&&(_h(e,t.accessToken),e.dispatchEvent(new th("tokenChanged"))),Nh(e,"refreshToken",t.refreshToken),t.accessToken}))},t.Kc=function(t){if(!(t=t.users)||!t.length)throw new I("internal-error");Th(this,{uid:(t=t[0]).localId,displayName:t.displayName,photoURL:t.photoUrl,email:t.email,emailVerified:!!t.emailVerified,phoneNumber:t.phoneNumber,lastLoginAt:t.lastLoginAt,createdAt:t.createdAt,tenantId:t.tenantId});for(var e,n=(e=(e=t).providerUserInfo)&&e.length?V(e,function(t){return new hh(t.rawId,t.providerId,t.email,t.displayName,t.photoUrl,t.phoneNumber)}):[],r=0;r=Ll.length)throw new I("internal-error","Argument validator received an unsupported number of arguments.");n=Ll[i],r=(r?"":n+" argument ")+(e.name?'"'+e.name+'" ':"")+"must be "+e.K+".";break t}r=null}}if(r)throw new I("argument-error",t+" failed: "+r)}(t=Sl.prototype).Ia=function(){var e=this;return this.f||(this.f=Pl(this,be().then(function(){if(Ir()&&!hr())return ar();throw new I("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")}).then(function(){return e.m.g(e.u())}).then(function(t){return e.g=t,Qa(e.s,Pa,{})}).then(function(t){e.a[Al]=t.recaptchaSiteKey}).o(function(t){throw e.f=null,t})))},t.render=function(){Ol(this);var n=this;return Pl(this,this.Ia().then(function(){var t,e;return null===n.c&&(e=n.v,n.i||(t=te(e),e=oe("DIV"),t.appendChild(e)),n.c=n.g.render(e,n.a)),n.c}))},t.verify=function(){Ol(this);var i=this;return Pl(this,this.render().then(function(e){return new fe(function(n){var r,t=i.g.getResponse(e);t?n(t):(i.l.push(r=function(t){var e;t&&(e=r,H(i.l,function(t){return t==e}),n(t))}),i.i&&i.g.execute(i.c))})}))},t.reset=function(){Ol(this),null!==this.c&&this.g.reset(this.c)},t.clear=function(){Ol(this),this.J=!0,this.m.c();for(var t,e=0;e>6|192:(o<65536?e[n++]=o>>12|224:(e[n++]=o>>18|240,e[n++]=o>>12&63|128),e[n++]=o>>6&63|128),e[n++]=63&o|128)}return e}(t);return(t=new Mo).update(e),t=t.digest(),oo.encodeByteArray(t)}function Fs(t,e){ro(!e||!0===t||!1===t,"Can't turn on custom loggers persistently."),!0===t?(zs.logLevel=ss.VERBOSE,Ys=zs.log.bind(zs),e&&Hs.set("logging_enabled",!0)):"function"==typeof t?Ys=t:(Ys=null,Hs.remove("logging_enabled"))}function js(){for(var t=[],e=0;e=Math.pow(2,-1022)?(n=(i=Math.min(Math.floor(Math.log(t)/Math.LN2),1023))+1023,Math.round(t*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,Math.round(t/Math.pow(2,-1074))));for(var o=[],s=52;s;--s)o.push(r%2?1:0),r=Math.floor(r/2);for(s=11;s;--s)o.push(n%2?1:0),n=Math.floor(n/2);o.push(e?1:0),o.reverse();var a=o.join(""),u="";for(s=0;s<64;s+=8){var c=parseInt(a.substr(s,8),2).toString(16);u+=c=1===c.length?"0"+c:c}return u.toLowerCase()}function aa(t,e){return"object"==typeof(e=setTimeout(t,e))&&e.unref&&e.unref(),e}var ua=new RegExp("^-?(0*)\\d{1,10}$"),ca=-2147483648,ha=2147483647,la=function(t){if(ua.test(t)){t=Number(t);if(ca<=t&&t<=ha)return t}return null},fa=function(t){try{t()}catch(e){setTimeout(function(){var t=e.stack||"";throw ta("Exception was thrown by user callback.",t),e},Math.floor(0))}},pa=(da.prototype.getToken=function(n){var r=this;return this.appCheck?this.appCheck.getToken(n):new Promise(function(t,e){setTimeout(function(){r.appCheck?r.getToken(n).then(t,e):t(null)},0)})},da.prototype.addTokenChangeListener=function(e){var t;null!==(t=this.appCheckProvider)&&void 0!==t&&t.get().then(function(t){return t.addTokenListener(e)})},da.prototype.notifyForInvalidToken=function(){ta('Provided AppCheck credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly.')},da);function da(t,e){var n=this;this.appName_=t,this.appCheckProvider=e,this.appCheck=null==e?void 0:e.getImmediate({optional:!0}),this.appCheck||null!=e&&e.get().then(function(t){return n.appCheck=t})}var ga=(va.prototype.getToken=function(n){var r=this;return this.auth_?this.auth_.getToken(n).catch(function(t){return t&&"auth/token-not-initialized"===t.code?($s("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(t)}):new Promise(function(t,e){setTimeout(function(){r.auth_?r.getToken(n).then(t,e):t(null)},0)})},va.prototype.addTokenChangeListener=function(e){this.auth_?this.auth_.addAuthTokenListener(e):this.authProvider_.get().then(function(t){return t.addAuthTokenListener(e)})},va.prototype.removeTokenChangeListener=function(e){this.authProvider_.get().then(function(t){return t.removeAuthTokenListener(e)})},va.prototype.notifyForInvalidToken=function(){var t='Provided authentication credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.firebaseOptions_?t+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.firebaseOptions_?t+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':t+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',ta(t)},va);function va(t,e,n){var r=this;this.appName_=t,this.firebaseOptions_=e,this.authProvider_=n,this.auth_=null,this.auth_=n.getImmediate({optional:!0}),this.auth_||n.onInit(function(t){return r.auth_=t})}var ya=(ma.prototype.getToken=function(t){return Promise.resolve({accessToken:this.accessToken})},ma.prototype.addTokenChangeListener=function(t){t(this.accessToken)},ma.prototype.removeTokenChangeListener=function(t){},ma.prototype.notifyForInvalidToken=function(){},ma.OWNER="owner",ma);function ma(t){this.accessToken=t}var ba=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,_a="websocket",wa="long_polling",Ia=(Ta.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},Ta.prototype.isCustomHost=function(){return"firebaseio.com"!==this._domain&&"firebaseio-demo.com"!==this._domain},Object.defineProperty(Ta.prototype,"host",{get:function(){return this._host},set:function(t){t!==this.internalHost&&(this.internalHost=t,this.isCacheableHost()&&Ws.set("host:"+this._host,this.internalHost))},enumerable:!1,configurable:!0}),Ta.prototype.toString=function(){var t=this.toURLString();return this.persistenceKey&&(t+="<"+this.persistenceKey+">"),t},Ta.prototype.toURLString=function(){var t=this.secure?"https://":"http://",e=this.includeNamespaceInQueryParams?"?ns="+this.namespace:"";return t+this.host+"/"+e},Ta);function Ta(t,e,n,r,i,o,s){void 0===i&&(i=!1),void 0===o&&(o=""),void 0===s&&(s=!1),this.secure=e,this.namespace=n,this.webSocketOnly=r,this.nodeAdmin=i,this.persistenceKey=o,this.includeNamespaceInQueryParams=s,this._host=t.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=Ws.get("host:"+t)||this._host}function Ea(t,e,n){var r;if(ro("string"==typeof e,"typeof type must == string"),ro("object"==typeof n,"typeof params must == object"),e===_a)r=(t.secure?"wss://":"ws://")+t.internalHost+"/.ws?";else{if(e!==wa)throw new Error("Unknown connection type: "+e);r=(t.secure?"https://":"http://")+t.internalHost+"/.lp?"}((e=t).host!==e.internalHost||e.isCustomHost()||e.includeNamespaceInQueryParams)&&(n.ns=t.namespace);var i=[];return oa(n,function(t,e){i.push(t+"="+e)}),r+i.join("&")}var Sa=(ka.prototype.incrementCounter=function(t,e){void 0===e&&(e=1),Po(this.counters_,t)||(this.counters_[t]=0),this.counters_[t]+=e},ka.prototype.get=function(){return so(this.counters_)},ka);function ka(){this.counters_={}}var Ca={},Aa={};function Na(t){t=t.toString();return Ca[t]||(Ca[t]=new Sa),Ca[t]}var Ra=(Pa.prototype.closeAfter=function(t,e){this.closeAfterResponse=t,this.onClose=e,this.closeAfterResponse"+(e=this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,"javascript:".length)?'