reactfire 4.2.3-exp.c7357da → 4.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,122 +1,4 @@
1
- (function(l,W){typeof exports=="object"&&typeof module<"u"?W(exports,require("react"),require("firebase/auth"),require("firebase/database"),require("firebase/app"),require("firebase/firestore"),require("firebase/functions"),require("firebase/storage"),require("firebase/remote-config")):typeof define=="function"&&define.amd?define(["exports","react","firebase/auth","firebase/database","firebase/app","firebase/firestore","firebase/functions","firebase/storage","firebase/remote-config"],W):(l=typeof globalThis<"u"?globalThis:l||self,W(l.ReactFire={},l.React,l.auth,l.database,l.app,l.firestore,l.functions,l.storage,l.remoteConfig))})(this,function(l,W,Wt,T,Z,He,Qt,Ye,V){"use strict";function Kt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const d=Kt(W);var we=function(e,t){return we=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},we(e,t)};function k(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");we(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Ht(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Se(e,t,n,r){function i(o){return o instanceof n?o:new n(function(u){u(o)})}return new(n||(n=Promise))(function(o,u){function a(f){try{c(r.next(f))}catch(v){u(v)}}function s(f){try{c(r.throw(f))}catch(v){u(v)}}function c(f){f.done?o(f.value):i(f.value).then(a,s)}c((r=r.apply(e,t||[])).next())})}function Ge(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(c){return function(f){return s([c,f])}}function s(c){if(r)throw new TypeError("Generator is already executing.");for(;u&&(u=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(f){c=[6,f],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function M(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function R(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],u;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){u={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(u)throw u.error}}return o}function x(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function L(e){return this instanceof L?(this.v=e,this):new L(e)}function Yt(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i={},u("next"),u("throw"),u("return"),i[Symbol.asyncIterator]=function(){return this},i;function u(h){r[h]&&(i[h]=function(y){return new Promise(function(C,p){o.push([h,y,C,p])>1||a(h,y)})})}function a(h,y){try{s(r[h](y))}catch(C){v(o[0][3],C)}}function s(h){h.value instanceof L?Promise.resolve(h.value.v).then(c,f):v(o[0][2],h)}function c(h){a("next",h)}function f(h){a("throw",h)}function v(h,y){h(y),o.shift(),o.length&&a(o[0][0],o[0][1])}}function Gt(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof M=="function"?M(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(u){return new Promise(function(a,s){u=e[o](u),i(a,s,u.done,u.value)})}}function i(o,u,a,s){Promise.resolve(s).then(function(c){o({value:c,done:a})},u)}}typeof SuppressedError=="function"&&SuppressedError;function b(e){return typeof e=="function"}function _e(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Ce=_e(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
2
- `+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
3
- `):"",this.name="UnsubscriptionError",this.errors=n}});function B(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Q=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var a=M(u),s=a.next();!s.done;s=a.next()){var c=s.value;c.remove(this)}}catch(p){t={error:p}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else u.remove(this);var f=this.initialTeardown;if(b(f))try{f()}catch(p){o=p instanceof Ce?p.errors:[p]}var v=this._finalizers;if(v){this._finalizers=null;try{for(var h=M(v),y=h.next();!y.done;y=h.next()){var C=y.value;try{Ze(C)}catch(p){o=o??[],p instanceof Ce?o=x(x([],R(o)),R(p.errors)):o.push(p)}}}catch(p){r={error:p}}finally{try{y&&!y.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new Ce(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Ze(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&B(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&B(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),ze=Q.EMPTY;function Je(e){return e instanceof Q||e&&"closed"in e&&b(e.remove)&&b(e.add)&&b(e.unsubscribe)}function Ze(e){b(e)?e():e.unsubscribe()}var Be={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ee={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=Ee.delegate;return i!=null&&i.setTimeout?i.setTimeout.apply(i,x([e,t],R(n))):setTimeout.apply(void 0,x([e,t],R(n)))},clearTimeout:function(e){var t=Ee.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Xe(e){Ee.setTimeout(function(){throw e})}function Ie(){}function X(e){e()}var ke=function(e){k(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Je(n)&&n.add(r)):r.destination=Bt,r}return t.create=function(n,r,i){return new K(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Q),zt=Function.prototype.bind;function Oe(e,t){return zt.call(e,t)}var Jt=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){ee(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){ee(r)}else ee(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){ee(n)}},e}(),K=function(e){k(t,e);function t(n,r,i){var o=e.call(this)||this,u;if(b(n)||!n)u={next:n??void 0,error:r??void 0,complete:i??void 0};else{var a;o&&Be.useDeprecatedNextContext?(a=Object.create(n),a.unsubscribe=function(){return o.unsubscribe()},u={next:n.next&&Oe(n.next,a),error:n.error&&Oe(n.error,a),complete:n.complete&&Oe(n.complete,a)}):u=n}return o.destination=new Jt(u),o}return t}(ke);function ee(e){Xe(e)}function Zt(e){throw e}var Bt={closed:!0,next:Ie,error:Zt,complete:Ie},Fe=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function H(e){return e}function Xt(e){return e.length===0?H:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var g=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,o=tn(t)?t:new K(t,n,r);return X(function(){var u=i,a=u.operator,s=u.source;o.add(a?a.call(o,s):s?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=et(n),new n(function(i,o){var u=new K({next:function(a){try{t(a)}catch(s){o(s),u.unsubscribe()}},error:o,complete:i});r.subscribe(u)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[Fe]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Xt(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=et(t),new t(function(r,i){var o;n.subscribe(function(u){return o=u},function(u){return i(u)},function(){return r(o)})})},e.create=function(t){return new e(t)},e}();function et(e){var t;return(t=e??Be.Promise)!==null&&t!==void 0?t:Promise}function en(e){return e&&b(e.next)&&b(e.error)&&b(e.complete)}function tn(e){return e&&e instanceof ke||en(e)&&Je(e)}function nn(e){return b(e==null?void 0:e.lift)}function S(e){return function(t){if(nn(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function _(e,t,n,r,i){return new rn(e,t,n,r,i)}var rn=function(e){k(t,e);function t(n,r,i,o,u,a){var s=e.call(this,n)||this;return s.onFinalize=u,s.shouldUnsubscribe=a,s._next=r?function(c){try{r(c)}catch(f){n.error(f)}}:e.prototype._next,s._error=o?function(c){try{o(c)}catch(f){n.error(f)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t}(ke),on=_e(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),te=function(e){k(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new tt(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new on},t.prototype.next=function(n){var r=this;X(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var u=M(r.currentObservers),a=u.next();!a.done;a=u.next()){var s=a.value;s.next(n)}}catch(c){i={error:c}}finally{try{a&&!a.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;X(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;X(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,u=i.isStopped,a=i.observers;return o||u?ze:(this.currentObservers=null,a.push(n),new Q(function(){r.currentObservers=null,B(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,u=r.isStopped;i?n.error(o):u&&n.complete()},t.prototype.asObservable=function(){var n=new g;return n.source=this,n},t.create=function(n,r){return new tt(n,r)},t}(g),tt=function(e){k(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:ze},t}(te),Ae={now:function(){return(Ae.delegate||Date).now()},delegate:void 0},un=function(e){k(t,e);function t(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=Ae);var o=e.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return t.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,u=r._infiniteTimeWindow,a=r._timestampProvider,s=r._windowTime;i||(o.push(n),!u&&o.push(a.now()+s)),this._trimBuffer(),e.prototype.next.call(this,n)},t.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,u=i._buffer,a=u.slice(),s=0;s<a.length&&!n.closed;s+=o?1:2)n.next(a[s]);return this._checkFinalizedStatuses(n),r},t.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,u=n._infiniteTimeWindow,a=(u?1:2)*r;if(r<1/0&&a<o.length&&o.splice(0,o.length-a),!u){for(var s=i.now(),c=0,f=1;f<o.length&&o[f]<=s;f+=2)c=f;c&&o.splice(0,c+1)}},t}(te),an=function(e){k(t,e);function t(n,r){return e.call(this)||this}return t.prototype.schedule=function(n,r){return this},t}(Q),ne={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=ne.delegate;return i!=null&&i.setInterval?i.setInterval.apply(i,x([e,t],R(n))):setInterval.apply(void 0,x([e,t],R(n)))},clearInterval:function(e){var t=ne.delegate;return((t==null?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},sn=function(e){k(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,u=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(u,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(u,this.id,r),this},t.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),ne.setInterval(n.flush.bind(n,this),i)},t.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&ne.clearInterval(r)},t.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(u){i=!0,o=u||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,B(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(an),nt=function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(t,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,t).schedule(r,n)},e.now=Ae.now,e}(),cn=function(e){k(t,e);function t(n,r){r===void 0&&(r=nt.now);var i=e.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},t}(nt),Pe=new cn(sn),ln=Pe,De=new g(function(e){return e.complete()});function fn(e){return e?dn(e):De}function dn(e){return new g(function(t){return e.schedule(function(){return t.complete()})})}function rt(e){return e&&b(e.schedule)}function it(e){return e[e.length-1]}function $e(e){return rt(it(e))?e.pop():void 0}function vn(e,t){return typeof it(e)=="number"?e.pop():t}var ot=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function ut(e){return b(e==null?void 0:e.then)}function at(e){return b(e[Fe])}function st(e){return Symbol.asyncIterator&&b(e==null?void 0:e[Symbol.asyncIterator])}function ct(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function hn(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var lt=hn();function ft(e){return b(e==null?void 0:e[lt])}function dt(e){return Yt(this,arguments,function(){var n,r,i,o;return Ge(this,function(u){switch(u.label){case 0:n=e.getReader(),u.label=1;case 1:u.trys.push([1,,9,10]),u.label=2;case 2:return[4,L(n.read())];case 3:return r=u.sent(),i=r.value,o=r.done,o?[4,L(void 0)]:[3,5];case 4:return[2,u.sent()];case 5:return[4,L(i)];case 6:return[4,u.sent()];case 7:return u.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function vt(e){return b(e==null?void 0:e.getReader)}function E(e){if(e instanceof g)return e;if(e!=null){if(at(e))return pn(e);if(ot(e))return bn(e);if(ut(e))return mn(e);if(st(e))return ht(e);if(ft(e))return yn(e);if(vt(e))return gn(e)}throw ct(e)}function pn(e){return new g(function(t){var n=e[Fe]();if(b(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function bn(e){return new g(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function mn(e){return new g(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,Xe)})}function yn(e){return new g(function(t){var n,r;try{for(var i=M(e),o=i.next();!o.done;o=i.next()){var u=o.value;if(t.next(u),t.closed)return}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function ht(e){return new g(function(t){wn(e,t).catch(function(n){return t.error(n)})})}function gn(e){return ht(dt(e))}function wn(e,t){var n,r,i,o;return Se(this,void 0,void 0,function(){var u,a;return Ge(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),n=Gt(e),s.label=1;case 1:return[4,n.next()];case 2:if(r=s.sent(),!!r.done)return[3,4];if(u=r.value,t.next(u),t.closed)return[2];s.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=s.sent(),i={error:a},[3,11];case 6:return s.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function $(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function pt(e,t){return t===void 0&&(t=0),S(function(n,r){n.subscribe(_(r,function(i){return $(r,e,function(){return r.next(i)},t)},function(){return $(r,e,function(){return r.complete()},t)},function(i){return $(r,e,function(){return r.error(i)},t)}))})}function bt(e,t){return t===void 0&&(t=0),S(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function Sn(e,t){return E(e).pipe(bt(t),pt(t))}function _n(e,t){return E(e).pipe(bt(t),pt(t))}function Cn(e,t){return new g(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function En(e,t){return new g(function(n){var r;return $(n,t,function(){r=e[lt](),$(n,t,function(){var i,o,u;try{i=r.next(),o=i.value,u=i.done}catch(a){n.error(a);return}u?n.complete():n.next(o)},0,!0)}),function(){return b(r==null?void 0:r.return)&&r.return()}})}function mt(e,t){if(!e)throw new Error("Iterable cannot be null");return new g(function(n){$(n,t,function(){var r=e[Symbol.asyncIterator]();$(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function In(e,t){return mt(dt(e),t)}function kn(e,t){if(e!=null){if(at(e))return Sn(e,t);if(ot(e))return Cn(e,t);if(ut(e))return _n(e,t);if(st(e))return mt(e,t);if(ft(e))return En(e,t);if(vt(e))return In(e,t)}throw ct(e)}function O(e,t){return t?kn(e,t):E(e)}function re(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=$e(e);return O(e,n)}var yt=_e(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function On(e){return e instanceof Date&&!isNaN(e)}function I(e,t){return S(function(n,r){var i=0;n.subscribe(_(r,function(o){r.next(e.call(t,o,i++))}))})}function Fn(e,t,n,r,i,o,u,a){var s=[],c=0,f=0,v=!1,h=function(){v&&!s.length&&!c&&t.complete()},y=function(p){return c<r?C(p):s.push(p)},C=function(p){o&&t.next(p),c++;var U=!1;E(n(p,f++)).subscribe(_(t,function(D){i==null||i(D),o?y(D):t.next(D)},function(){U=!0},void 0,function(){if(U)try{c--;for(var D=function(){var q=s.shift();u?$(t,u,function(){return C(q)}):C(q)};s.length&&c<r;)D();h()}catch(q){t.error(q)}}))};return e.subscribe(_(t,y,function(){v=!0,h()})),function(){a==null||a()}}function Te(e,t,n){return n===void 0&&(n=1/0),b(t)?Te(function(r,i){return I(function(o,u){return t(r,o,i,u)})(E(e(r,i)))},n):(typeof t=="number"&&(n=t),S(function(r,i){return Fn(r,i,e,n)}))}function gt(e){return e===void 0&&(e=1/0),Te(H,e)}function An(){return gt(1)}function Pn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return An()(O(e,$e(e)))}function Dn(e,t,n){e===void 0&&(e=0),n===void 0&&(n=ln);var r=-1;return t!=null&&(rt(t)?n=t:r=t),new g(function(i){var o=On(e)?+e-n.now():e;o<0&&(o=0);var u=0;return n.schedule(function(){i.closed||(i.next(u++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function $n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=$e(e),r=vn(e,1/0),i=e;return i.length?i.length===1?E(i[0]):gt(r)(O(i,n)):De}function Tn(e,t){return S(function(n,r){var i=0;n.subscribe(_(r,function(o){return e.call(t,o,i++)&&r.next(o)}))})}function wt(e){return S(function(t,n){var r=null,i=!1,o;r=t.subscribe(_(n,void 0,void 0,function(u){o=E(e(u,wt(e)(t))),r?(r.unsubscribe(),r=null,o.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,o.subscribe(n))})}function Rn(e,t,n,r,i){return function(o,u){var a=n,s=t,c=0;o.subscribe(_(u,function(f){var v=c++;s=a?e(s,f,v):(a=!0,f),r&&u.next(s)},i&&function(){a&&u.next(s),u.complete()}))}}function xn(e,t){return t===void 0&&(t=Pe),S(function(n,r){var i=null,o=null,u=null,a=function(){if(i){i.unsubscribe(),i=null;var c=o;o=null,r.next(c)}};function s(){var c=u+e,f=t.now();if(f<c){i=this.schedule(void 0,c-f),r.add(i);return}a()}n.subscribe(_(r,function(c){o=c,u=t.now(),i||(i=t.schedule(s,e),r.add(i))},function(){a(),r.complete()},void 0,function(){o=i=null}))})}function jn(e){return S(function(t,n){var r=!1;t.subscribe(_(n,function(i){r=!0,n.next(i)},function(){r||n.next(e),n.complete()}))})}function Re(e){return e<=0?function(){return De}:S(function(t,n){var r=0;t.subscribe(_(n,function(i){++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function Un(){return S(function(e,t){e.subscribe(_(t,Ie))})}function Vn(e){return I(function(){return e})}function St(e,t){return t?function(n){return Pn(t.pipe(Re(1),Un()),n.pipe(St(e)))}:Te(function(n,r){return E(e(n,r)).pipe(Re(1),Vn(n))})}function Mn(e,t){t===void 0&&(t=Pe);var n=Dn(e,t);return St(function(){return n})}function Ln(e,t){return t===void 0&&(t=H),e=e??Nn,S(function(n,r){var i,o=!0;n.subscribe(_(r,function(u){var a=t(u);(o||!e(i,a))&&(o=!1,i=a,r.next(u))}))})}function Nn(e,t){return e===t}function qn(e){return e===void 0&&(e=Wn),S(function(t,n){var r=!1;t.subscribe(_(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(e())}))})}function Wn(){return new yt}function _t(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?Tn(function(i,o){return e(i,o,r)}):H,Re(1),n?jn(t):qn(function(){return new yt}))}}function Qn(e,t){return S(Rn(e,t,arguments.length>=2,!0))}function Kn(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new te}:t,r=e.resetOnError,i=r===void 0?!0:r,o=e.resetOnComplete,u=o===void 0?!0:o,a=e.resetOnRefCountZero,s=a===void 0?!0:a;return function(c){var f,v,h,y=0,C=!1,p=!1,U=function(){v==null||v.unsubscribe(),v=void 0},D=function(){U(),f=h=void 0,C=p=!1},q=function(){var J=f;D(),J==null||J.unsubscribe()};return S(function(J,qt){y++,!p&&!C&&U();var ye=h=h??n();qt.add(function(){y--,y===0&&!p&&!C&&(v=xe(q,s))}),ye.subscribe(qt),!f&&y>0&&(f=new K({next:function(ge){return ye.next(ge)},error:function(ge){p=!0,U(),v=xe(D,i,ge),ye.error(ge)},complete:function(){C=!0,U(),v=xe(D,u),ye.complete()}}),E(J).subscribe(f))})(c)}}function xe(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t===!0){e();return}if(t!==!1){var i=new K({next:function(){i.unsubscribe(),e()}});return E(t.apply(void 0,x([],R(n)))).subscribe(i)}}function Hn(e,t,n){var r,i,o,u,a=!1;return e&&typeof e=="object"?(r=e.bufferSize,u=r===void 0?1/0:r,i=e.windowTime,t=i===void 0?1/0:i,o=e.refCount,a=o===void 0?!1:o,n=e.scheduler):u=e??1/0,Kn({connector:function(){return new un(u,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}function Ct(e,t){return S(function(n,r){var i=null,o=0,u=!1,a=function(){return u&&!i&&r.complete()};n.subscribe(_(r,function(s){i==null||i.unsubscribe();var c=0,f=o++;E(e(s,f)).subscribe(i=_(r,function(v){return r.next(t?t(s,v,f,c++):v)},function(){i=null,a()}))},function(){u=!0,a()}))})}function Yn(e,t,n){var r=b(e)||t||n?{next:e,error:t,complete:n}:e;return r?S(function(i,o){var u;(u=r.subscribe)===null||u===void 0||u.call(r);var a=!0;i.subscribe(_(o,function(s){var c;(c=r.next)===null||c===void 0||c.call(r,s),o.next(s)},function(){var s;a=!1,(s=r.complete)===null||s===void 0||s.call(r),o.complete()},function(s){var c;a=!1,(c=r.error)===null||c===void 0||c.call(r,s),o.error(s)},function(){var s,c;a&&((s=r.unsubscribe)===null||s===void 0||s.call(r)),(c=r.finalize)===null||c===void 0||c.call(r)}))}):H}function je(e){return new g(function(t){var n=Wt.onIdTokenChanged(e,t.next.bind(t),t.error.bind(t),t.complete.bind(t));return{unsubscribe:n}})}const Gn="[DEFAULT]",Et=d.createContext(void 0),Ue=d.createContext(!1),It="4.2.3-exp.c7357da",zn=(e,t)=>e===t||[...Object.keys(e),...Object.keys(t)].every(n=>e[n]===t[n]);function Jn(e){const{firebaseConfig:t,appName:n,suspense:r}=e,i=d.useMemo(()=>{if(e.firebaseApp)return e.firebaseApp;const o=Z.getApps().find(u=>u.name===(n||Gn));if(o){if(t&&zn(o.options,t))return o;throw new Error(`Does not match the options already provided to the ${n||"default"} firebase app instance, give this new instance a different appName.`)}else{if(!t)throw new Error("No firebaseConfig provided");const u=d.version||"unknown";return Z.registerVersion("react",u),Z.registerVersion("reactfire",It),Z.initializeApp(t,n)}},[e.firebaseApp,t,n]);return d.createElement(Et.Provider,{value:i},d.createElement(Ue.Provider,Object.assign({value:r??!1},e)))}function Zn(){const e=d.useContext(Ue);return e??!1}function Y(e){const t=d.useContext(Ue);return e!==void 0?e:t}function Ve(){const e=d.useContext(Et);if(!e)throw new Error("Cannot call useFirebaseApp unless your component is within a FirebaseAppProvider");return e}function Bn(e){return Se(this,void 0,void 0,function*(){const t=yield e();return ae(je(t),`auth:user:${t.name}`).toPromise()})}function kt(e){const t=Qe(),n=`auth:user:${t.name}`,r=je(t);return w(n,r,e)}function Ot(e,t=!1,n){if(!e)throw new Error("you must provide a user");const r=`auth:idTokenResult:${e.uid}:forceRefresh=${t}`,i=O(e.getIdTokenResult(t));return w(r,i,n)}function Xn(e){if(e!=null&&e.hasOwnProperty("requiredClaims")&&(e!=null&&e.hasOwnProperty("validateCustomClaims")))throw new Error('Cannot have both "requiredClaims" and "validateCustomClaims". Use one or the other.');const t=Qe();let n=`auth:signInCheck:${t.name}::forceRefresh:${!!(e!=null&&e.forceRefresh)}`;e!=null&&e.forceRefresh&&(n=`${n}:forceRefresh:${e.forceRefresh}`),e!=null&&e.hasOwnProperty("requiredClaims")?n=`${n}:requiredClaims:${JSON.stringify(e.requiredClaims)}`:e!=null&&e.hasOwnProperty("validateCustomClaims")&&(n=`${n}:validateCustomClaims:${JSON.stringify(e.validateCustomClaims)}`);const r=je(t).pipe(Ct(i=>{var o;return i?e&&(e.hasOwnProperty("requiredClaims")||e.hasOwnProperty("validateCustomClaims"))?O(i.getIdTokenResult((o=e==null?void 0:e.forceRefresh)!==null&&o!==void 0?o:!1)).pipe(I(u=>{let a;e.hasOwnProperty("requiredClaims")?a=er(e.requiredClaims):a=e.validateCustomClaims;const{hasRequiredClaims:s,errors:c}=a(u.claims);return{signedIn:!0,hasRequiredClaims:s,errors:c,user:i}})):re({signedIn:!0,hasRequiredClaims:!0,errors:{},user:i}):re({signedIn:!1,hasRequiredClaims:!1,errors:{},user:null})}));return w(n,r,e)}function er(e){return function(n){const r={};return Object.keys(e).forEach(i=>{e[i]!==n[i]&&(r[i]=[new me("auth/missing-claim",`Expected "${e[i]}", but user has "${n[i]}" instead`)])}),{hasRequiredClaims:Object.keys(r).length===0,errors:r}}}function Ft({user:e,fallback:t,children:n,requiredClaims:r}){const{data:i}=Ot(e,!1),{claims:o}=i,u={};return Y()||console.warn("ClaimsCheck is deprecated and only works when ReactFire is in experimental Suspense Mode. Use useSigninCheck or set suspense={true} in FirebaseAppProvider if you want to use this component."),r&&Object.keys(r).forEach(s=>{var c;r[s]!==o[s]&&(u[s]={expected:r[s],actual:(c=o[s])===null||c===void 0?void 0:c.toString()})}),Object.keys(u).length===0?d.createElement(d.Fragment,null,n):d.createElement(d.Fragment,null,t)}function tr({fallback:e,children:t,requiredClaims:n}){const{data:r}=kt();return Y()||console.warn("AuthCheck is deprecated and only works when ReactFire is in experimental Suspense Mode. Use useSigninCheck or set suspense={true} in FirebaseAppProvider if you want to use this component."),r?n?d.createElement(Ft,{user:r,fallback:e,requiredClaims:n},t):d.createElement(d.Fragment,null,t):d.createElement(d.Fragment,null,e)}/*! *****************************************************************************
4
- Copyright (c) Microsoft Corporation.
5
-
6
- Permission to use, copy, modify, and/or distribute this software for any
7
- purpose with or without fee is hereby granted.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
- PERFORMANCE OF THIS SOFTWARE.
16
- ***************************************************************************** */var ie=function(){return ie=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ie.apply(this,arguments)};function Me(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}/**
17
- * @license
18
- * Copyright 2021 Google LLC
19
- *
20
- * Licensed under the Apache License, Version 2.0 (the "License");
21
- * you may not use this file except in compliance with the License.
22
- * You may obtain a copy of the License at
23
- *
24
- * http://www.apache.org/licenses/LICENSE-2.0
25
- *
26
- * Unless required by applicable law or agreed to in writing, software
27
- * distributed under the License is distributed on an "AS IS" BASIS,
28
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29
- * See the License for the specific language governing permissions and
30
- * limitations under the License.
31
- */var j,m;(function(e){e.added="child_added",e.removed="child_removed",e.changed="child_changed",e.moved="child_moved",e.value="value"})(m||(m={}));var nr=Object.freeze((j={},j[m.added]=T.onChildAdded,j[m.removed]=T.onChildRemoved,j[m.changed]=T.onChildChanged,j[m.moved]=T.onChildMoved,j[m.value]=T.onValue,j));/**
32
- * @license
33
- * Copyright 2021 Google LLC
34
- *
35
- * Licensed under the Apache License, Version 2.0 (the "License");
36
- * you may not use this file except in compliance with the License.
37
- * You may obtain a copy of the License at
38
- *
39
- * http://www.apache.org/licenses/LICENSE-2.0
40
- *
41
- * Unless required by applicable law or agreed to in writing, software
42
- * distributed under the License is distributed on an "AS IS" BASIS,
43
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44
- * See the License for the specific language governing permissions and
45
- * limitations under the License.
46
- */function Le(e,t){return new g(function(n){var r=nr[t](e,function(i,o){n.next({snapshot:i,prevKey:o,event:t})},n.error.bind(n));return{unsubscribe:function(){T.off(e,t,r)}}}).pipe(Mn(0))}/**
47
- * @license
48
- * Copyright 2021 Google LLC
49
- *
50
- * Licensed under the Apache License, Version 2.0 (the "License");
51
- * you may not use this file except in compliance with the License.
52
- * You may obtain a copy of the License at
53
- *
54
- * http://www.apache.org/licenses/LICENSE-2.0
55
- *
56
- * Unless required by applicable law or agreed to in writing, software
57
- * distributed under the License is distributed on an "AS IS" BASIS,
58
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59
- * See the License for the specific language governing permissions and
60
- * limitations under the License.
61
- */function rr(e){return(e==null||e.length===0)&&(e=[m.added,m.removed,m.changed,m.moved]),e}/**
62
- * @license
63
- * Copyright 2021 Google LLC
64
- *
65
- * Licensed under the Apache License, Version 2.0 (the "License");
66
- * you may not use this file except in compliance with the License.
67
- * You may obtain a copy of the License at
68
- *
69
- * http://www.apache.org/licenses/LICENSE-2.0
70
- *
71
- * Unless required by applicable law or agreed to in writing, software
72
- * distributed under the License is distributed on an "AS IS" BASIS,
73
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
74
- * See the License for the specific language governing permissions and
75
- * limitations under the License.
76
- */function ir(e){return Le(e,m.value)}function or(e,t){return t===void 0&&(t={}),Le(e,m.value).pipe(I(function(n){return At(n,t)}))}function At(e,t){var n;t===void 0&&(t={});var r=e.snapshot.val();return!e.snapshot.exists()||typeof r!="object"?r:ie(ie({},r),t.keyField?(n={},n[t.keyField]=e.snapshot.key,n):null)}function ur(e){return O(T.get(e)).pipe(I(function(t){var n=m.value;return{snapshot:t,prevKey:null,event:n}}))}function Pt(e,t){t===void 0&&(t={});var n=rr(t.events);return ur(e).pipe(Ct(function(r){if(!r.snapshot.exists())return re([]);var i=[re(r)];return n.forEach(function(o){i.push(Le(e,o))}),$n.apply(void 0,i).pipe(Qn(cr,[]))}),Ln())}function ar(e,t){return t===void 0&&(t={}),Pt(e).pipe(I(function(n){return n.map(function(r){return At(r,t)})}))}function Dt(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].snapshot.key===t)return r;return-1}function sr(e,t){if(t==null)return 0;var n=Dt(e,t);return n===-1?e.length:n+1}function cr(e,t){var n=t.snapshot,r=t.prevKey,i=t.event,o=n.key,u=Dt(e,o),a=sr(e,r||void 0);switch(i){case m.value:if(t.snapshot&&t.snapshot.exists()){var s=null;t.snapshot.forEach(function(v){var h={snapshot:v,event:m.value,prevKey:s};return s=v.key,e=Me(Me([],e),[h]),!1})}return e;case m.added:if(u>-1){var c=e[u-1];(c&&c.snapshot.key||null)!==r&&(e=e.filter(function(v){return v.snapshot.key!==n.key}),e.splice(a,0,t))}else{if(r==null)return Me([t],e);e=e.slice(),e.splice(a,0,t)}return e;case m.removed:return e.filter(function(v){return v.snapshot.key!==n.key});case m.changed:return e.map(function(v){return v.snapshot.key===o?t:v});case m.moved:if(u>-1){var f=e.splice(u,1)[0];return e=e.slice(),e.splice(a,0,f),e}return e;default:return e}}const Ne=globalThis._reactFireDatabaseCachedQueries||[];globalThis._reactFireDatabaseCachedQueries||(globalThis._reactFireDatabaseCachedQueries=Ne);function $t(e){const t=Ne.findIndex(n=>n.isEqual(e));return t>-1?t:Ne.push(e)-1}function lr(e,t){const n=`database:object:${e.toString()}`,r=ir(e);return w(n,r,t)}function fr(e,t){const n=t?N(t):"NO_ID_FIELD",r=`database:objectVal:${e.toString()}:idField=${n}`,i=or(e,{keyField:n});return w(r,i,t)}function dr(e,t){const n=`database:list:${$t(e)}`,r=Pt(e);return w(n,r,t)}function vr(e,t){const n=t?N(t):"NO_ID_FIELD",r=`database:listVal:${$t(e)}:idField=${n}`,i=ar(e,{keyField:n});return w(r,i,t)}/**
77
- * @license
78
- * Copyright 2018 Google LLC
79
- *
80
- * Licensed under the Apache License, Version 2.0 (the "License");
81
- * you may not use this file except in compliance with the License.
82
- * You may obtain a copy of the License at
83
- *
84
- * http://www.apache.org/licenses/LICENSE-2.0
85
- *
86
- * Unless required by applicable law or agreed to in writing, software
87
- * distributed under the License is distributed on an "AS IS" BASIS,
88
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
89
- * See the License for the specific language governing permissions and
90
- * limitations under the License.
91
- */var hr={includeMetadataChanges:!1};function qe(e,t){return t===void 0&&(t=hr),new g(function(n){var r=He.onSnapshot(e,t,{next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return{unsubscribe:r}})}/**
92
- * @license
93
- * Copyright 2018 Google LLC
94
- *
95
- * Licensed under the Apache License, Version 2.0 (the "License");
96
- * you may not use this file except in compliance with the License.
97
- * You may obtain a copy of the License at
98
- *
99
- * http://www.apache.org/licenses/LICENSE-2.0
100
- *
101
- * Unless required by applicable law or agreed to in writing, software
102
- * distributed under the License is distributed on an "AS IS" BASIS,
103
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
104
- * See the License for the specific language governing permissions and
105
- * limitations under the License.
106
- */function oe(e){return qe(e,{includeMetadataChanges:!0})}function Tt(e,t){return t===void 0&&(t={}),oe(e).pipe(I(function(n){return Rt(n,t)}))}function Rt(e,t){t===void 0&&(t={});var n=e.data();return!e.exists()||typeof n!="object"||n===null||t.idField&&(n[t.idField]=e.id),n}function pr(e){return qe(e,{includeMetadataChanges:!0}).pipe(I(function(t){return t.docs}))}function br(e,t){return t===void 0&&(t={}),pr(e).pipe(I(function(n){return n.map(function(r){return Rt(r,t)})}))}class mr extends te{constructor(t,n,r){super(),this._timeoutWindow=n,this._suspenseEnabled=r,this._hasValue=!1,this._error=void 0,this._firstEmission=new Promise(i=>this._resolveFirstEmission=i),this._innerObservable=t.pipe(Yn({next:i=>{this._next(i)},error:i=>{this._error=i,this._resolveFirstEmission()}}),wt(()=>fn()),Hn(1)),this._warmupSubscription=this._innerObservable.subscribe(),this._suspenseEnabled?this._timeoutHandler=setTimeout(()=>{},this._timeoutWindow):this._timeoutHandler=setTimeout(this._reset.bind(this),this._timeoutWindow)}get hasValue(){return this._hasValue||!!this._error}get value(){if(this._error)throw this._error;if(!this.hasValue)throw Error("Can only get value if SuspenseSubject has a value");return this._value}get firstEmission(){return this._firstEmission}_next(t){this._hasValue=!0,this._value=t,this._resolveFirstEmission()}_reset(){this._warmupSubscription&&this._warmupSubscription.unsubscribe(),this._hasValue=!1,this._value=void 0,this._error=void 0,this._firstEmission=new Promise(t=>this._resolveFirstEmission=t)}_subscribe(t){return this._timeoutHandler&&clearTimeout(this._timeoutHandler),this._innerSubscriber=this._innerObservable.subscribe(t),this._innerSubscriber}get ourError(){return this._error}}const yr=3e4,ue=globalThis._reactFirePreloadedObservables||new Map;globalThis._reactFirePreloadedObservables||(globalThis._reactFirePreloadedObservables=ue);function ae(e,t,n=!1){if(ue.has(t))return ue.get(t);{const r=new mr(e,yr,n);return ue.set(t,r),r}}function gr(e){return function(n,r){const i=Object.assign(Object.assign({},n),{hasEmitted:n.hasEmitted||e.hasValue,error:e.ourError,firstValuePromise:e.firstEmission});switch(e.hasValue&&(i.data=e.value),r){case"value":return i.status="success",i;case"error":return i.status="error",i;case"complete":return i.isComplete=!0,i;default:throw new Error(`invalid action "${r}"`)}}}function w(e,t,n={}){var r;if(!e)throw new Error("cannot call useObservable without an observableId");const i=Y(n.suspense),o=ae(t,e,i),u=n.hasOwnProperty("initialData")||n.hasOwnProperty("startWithValue"),a=o.hasValue||u;if(i===!0&&!a)throw o.firstEmission;const s={status:a?"success":"loading",hasEmitted:a,isComplete:!1,data:o.hasValue?o.value:(r=n==null?void 0:n.initialData)!==null&&r!==void 0?r:n==null?void 0:n.startWithValue,error:o.ourError,firstValuePromise:o.firstEmission},[c,f]=d.useReducer(gr(o),s);return d.useEffect(()=>{const v=o.subscribe({next:()=>{f("value")},error:h=>{throw f("error"),h},complete:()=>{f("complete")}});return()=>v.unsubscribe()},[o]),c}const We=globalThis._reactFireFirestoreQueryCache||[];globalThis._reactFireFirestoreQueryCache||(globalThis._reactFireFirestoreQueryCache=We);function xt(e){const t=We.findIndex(n=>He.queryEqual(n,e));return t>-1?t:We.push(e)-1}function wr(e){return Se(this,void 0,void 0,function*(){const t=yield e();return ae(oe(t),jt(t))})}function jt(e){return`firestore:doc:${e.firestore.app.name}:${e.path}`}function Sr(e,t){const n=jt(e),r=oe(e);return w(n,r,t)}function _r(e,t){const n=`firestore:docOnce:${e.firestore.app.name}:${e.path}`,r=oe(e).pipe(_t());return w(n,r,t)}function Cr(e,t){const n=t?N(t):"NO_ID_FIELD",r=`firestore:docData:${e.firestore.app.name}:${e.path}:idField=${n}`,i=Tt(e,{idField:n});return w(r,i,t)}function Er(e,t){const n=t?N(t):"NO_ID_FIELD",r=`firestore:docDataOnce:${e.firestore.app.name}:${e.path}:idField=${n}`,i=Tt(e,{idField:n}).pipe(_t());return w(r,i,t)}function Ir(e,t){const n=`firestore:collection:${xt(e)}`,r=qe(e);return w(n,r,t)}function kr(e,t){const n=t?N(t):"NO_ID_FIELD",r=`firestore:collectionData:${xt(e)}:idField=${n}`,i=br(e,{idField:n});return w(r,i,t)}/**
107
- * @license
108
- * Copyright 2021 Google LLC
109
- *
110
- * Licensed under the Apache License, Version 2.0 (the "License");
111
- * you may not use this file except in compliance with the License.
112
- * You may obtain a copy of the License at
113
- *
114
- * http://www.apache.org/licenses/LICENSE-2.0
115
- *
116
- * Unless required by applicable law or agreed to in writing, software
117
- * distributed under the License is distributed on an "AS IS" BASIS,
118
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
119
- * See the License for the specific language governing permissions and
120
- * limitations under the License.
121
- */function Or(e,t,n){var r=Qt.httpsCallable(e,t,n);return function(i){return O(r(i)).pipe(I(function(o){return o.data}))}}function Fr(e,t){const n=Mt(),r=`functions:callableResponse:${e}:${JSON.stringify(t==null?void 0:t.data)}:${JSON.stringify(t==null?void 0:t.httpsCallableOptions)}`,o=Or(n,e,t==null?void 0:t.httpsCallableOptions)(t==null?void 0:t.data);return w(r,o,t)}function Ar({children:e,traceId:t,fallback:n}){var r;const i=((r=performance==null?void 0:performance.getEntriesByName)===null||r===void 0?void 0:r.call(performance,t,"measure"))||[],o=`_${t}Start[${i.length}]`,u=`_${t}End[${i.length}]`,a=()=>(d.useLayoutEffect(()=>{var s;return(s=performance==null?void 0:performance.mark)===null||s===void 0||s.call(performance,o),()=>{var c,f;(c=performance==null?void 0:performance.mark)===null||c===void 0||c.call(performance,u),(f=performance==null?void 0:performance.measure)===null||f===void 0||f.call(performance,t,o,u)}},[]),d.createElement(d.Fragment,null,n));return d.createElement(d.Suspense,{fallback:d.createElement(a,null)},e)}function G(e){var t=e.remoteConfig,n=e.key,r=e.getter;return new g(function(i){V.ensureInitialized(t).then(function(){var o=r.bind(t);i.next(o(t,n))})})}function Pr(e,t){var n=V.getValue;return G({remoteConfig:e,key:t,getter:n})}function Dr(e,t){var n=V.getString;return G({remoteConfig:e,key:t,getter:n})}function $r(e,t){var n=V.getNumber;return G({remoteConfig:e,key:t,getter:n})}function Tr(e,t){var n=V.getBoolean;return G({remoteConfig:e,key:t,getter:n})}function Rr(e){var t=V.getAll;return G({remoteConfig:e,key:"",getter:t})}function z(e,t){const n=Nt(),r=n.app.name,i=t(n,e),o=`remoteConfig:${e}:${t.name}:${r}`;return w(o,i)}function xr(e){return z(e,Pr)}function jr(e){return z(e,Dr)}function Ur(e){return z(e,$r)}function Vr(e){return z(e,Tr)}function Mr(e){return z(e,Rr)}function Lr(e){return new g(function(t){var n=function(u){return t.next(u)},r=function(u){return t.error(u)},i=function(){return t.complete()};n(e.snapshot);var o=e.on("state_changed",n);return e.then(function(u){n(u),setTimeout(function(){return i()},0)},function(u){n(e.snapshot),setTimeout(function(){return r(u)},0)}),function(){o()}}).pipe(xn(0))}function Nr(e){return O(Ye.getDownloadURL(e))}function qr(e,t,n){const r=`storage:task:${t.toString()}`,i=Lr(e);return w(r,i,n)}function Ut(e,t){const n=`storage:downloadUrl:${e.toString()}`,r=Nr(e);return w(n,r,t)}function Wr(e){const t=Lt();return e=Object.assign(Object.assign({},e),{storage:t}),d.createElement(Vt,Object.assign({},e))}function Vt(e){const{storage:t,storagePath:n,suspense:r,placeHolder:i}=e,o=Ht(e,["storage","storagePath","suspense","placeHolder"]),u={suspense:Y(r)};if(!t)throw new Error("Storage was not passed to component INTERNALStorageImage. This should not be possible");const{status:a,data:s}=Ut(Ye.ref(t,n),u);return a==="success"?(o.alt||o.alt===""||console.warn(`No alt prop provided for StorageImage with storagePath "${n}"`,"img elements must have an alt prop, either with meaningful text, or an empty string for decorative images"),d.createElement("img",Object.assign({src:s,alt:o.alt},o))):i??d.createElement(d.Fragment,null,"''")}function Qr(e){const{storage:t}=e;return t?d.createElement(Vt,Object.assign({},e)):d.createElement(Wr,Object.assign({},e))}const se=d.createContext(void 0),ce=d.createContext(void 0),le=d.createContext(void 0),fe=d.createContext(void 0),de=d.createContext(void 0),ve=d.createContext(void 0),he=d.createContext(void 0),pe=d.createContext(void 0),be=d.createContext(void 0);function F(e){return function(n){var r,i;if(!n.sdk)throw new Error("no sdk provided");const o=Ve().name;if(((i=(r=n==null?void 0:n.sdk)===null||r===void 0?void 0:r.app)===null||i===void 0?void 0:i.name)!==o)throw new Error("sdk was initialized with a different firebase app");return d.createElement(e.Provider,Object.assign({value:n.sdk},n))}}function A(e){const t=d.useContext(e);if(!t)throw new Error("SDK not found. useSdk must be called from within a provider");return t}function P(e,t,n,r){const i=Ve();if(d.useContext(t))throw new Error(`Cannot initialize SDK ${e} because it already exists in Context`);const o=d.useMemo(()=>n(i),[i]);return w(`firebase-sdk:${e}:${i.name}`,O(o),r)}const Kr=F(se),Hr=F(ce),Yr=F(le),Gr=F(fe),zr=F(de),Jr=F(ve),Zr=F(pe),Br=F(he),Xr=F(be),ei=()=>A(se),Qe=()=>A(ce),ti=()=>A(le),ni=()=>A(fe),ri=()=>A(de),Mt=()=>A(ve),ii=()=>A(pe),Lt=()=>A(he),Nt=()=>A(be),oi=(e,t)=>P("appcheck",se,e,t),ui=(e,t)=>P("auth",ce,e,t),ai=(e,t)=>P("analytics",le,e,t),si=(e,t)=>P("database",fe,e,t),ci=(e,t)=>P("firestore",de,e,t),li=(e,t)=>P("functions",ve,e,t),fi=(e,t)=>P("performance",pe,e,t),di=(e,t)=>P("remoteconfig",be,e,t),vi=(e,t)=>P("storage",he,e,t);class me extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name="ReactFireError",Object.setPrototypeOf(this,me.prototype)}}function Ke(e,t){if(t==="idField"||t==="initialData"||t==="suspense")return e?e[t]:void 0;throw new Error(`Field "${t}" is not a valid key in ReactFireOptions`)}function hi(e){return Ke(e,"initialData")}function N(e){return Ke(e,"idField")}l.AnalyticsProvider=Yr,l.AnalyticsSdkContext=le,l.AppCheckProvider=Kr,l.AppCheckSdkContext=se,l.AuthCheck=tr,l.AuthProvider=Hr,l.AuthSdkContext=ce,l.ClaimsCheck=Ft,l.DatabaseProvider=Gr,l.DatabaseSdkContext=fe,l.FirebaseAppProvider=Jn,l.FirestoreProvider=zr,l.FirestoreSdkContext=de,l.FunctionsProvider=Jr,l.FunctionsSdkContext=ve,l.PerformanceProvider=Zr,l.PerformanceSdkContext=pe,l.ReactFireError=me,l.RemoteConfigProvider=Xr,l.RemoteConfigSdkContext=be,l.StorageImage=Qr,l.StorageProvider=Br,l.StorageSdkContext=he,l.SuspenseWithPerf=Ar,l.checkIdField=N,l.checkOptions=Ke,l.checkinitialData=hi,l.preloadFirestoreDoc=wr,l.preloadObservable=ae,l.preloadUser=Bn,l.useAnalytics=ti,l.useAppCheck=ei,l.useAuth=Qe,l.useCallableFunctionResponse=Fr,l.useDatabase=ni,l.useDatabaseList=dr,l.useDatabaseListData=vr,l.useDatabaseObject=lr,l.useDatabaseObjectData=fr,l.useFirebaseApp=Ve,l.useFirestore=ri,l.useFirestoreCollection=Ir,l.useFirestoreCollectionData=kr,l.useFirestoreDoc=Sr,l.useFirestoreDocData=Cr,l.useFirestoreDocDataOnce=Er,l.useFirestoreDocOnce=_r,l.useFunctions=Mt,l.useIdTokenResult=Ot,l.useInitAnalytics=ai,l.useInitAppCheck=oi,l.useInitAuth=ui,l.useInitDatabase=si,l.useInitFirestore=ci,l.useInitFunctions=li,l.useInitPerformance=fi,l.useInitRemoteConfig=di,l.useInitStorage=vi,l.useIsSuspenseEnabled=Zn,l.useObservable=w,l.usePerformance=ii,l.useRemoteConfig=Nt,l.useRemoteConfigAll=Mr,l.useRemoteConfigBoolean=Vr,l.useRemoteConfigNumber=Ur,l.useRemoteConfigString=jr,l.useRemoteConfigValue=xr,l.useSigninCheck=Xn,l.useStorage=Lt,l.useStorageDownloadURL=Ut,l.useStorageTask=qr,l.useSuspenseEnabledFromConfigAndContext=Y,l.useUser=kt,l.version=It,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
122
- //# sourceMappingURL=index.umd.cjs.map
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react"),require("firebase/auth"),require("firebase/app"),require("firebase/database"),require("firebase/firestore"),require("firebase/functions"),require("firebase/remote-config"),require("firebase/storage")):typeof define==`function`&&define.amd?define([`exports`,`react`,`firebase/auth`,`firebase/app`,`firebase/database`,`firebase/firestore`,`firebase/functions`,`firebase/remote-config`,`firebase/storage`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.ReactFire={},e.React,e.firebase_auth,e.firebase_app,e.firebase_database,e.firebase_firestore,e.firebase_functions,e.firebase_remote_config,e.firebase_storage))})(this,function(e,t,n,r,i,a,o,s,c){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var l=Object.create,u=Object.defineProperty,d=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,p=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty,h=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),g=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=f(t),a=0,o=i.length,s;a<o;a++)s=i[a],!m.call(e,s)&&s!==n&&u(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=d(t,s))||r.enumerable});return e};t=((e,t,n)=>(n=e==null?{}:l(p(e)),g(t||!e||!e.__esModule?u(n,`default`,{value:e,enumerable:!0}):n,e)))(t,1);var ee=function(e,t){return ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ee(e,t)};function _(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);ee(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function te(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ne(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function re(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function v(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function y(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function b(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function x(e){return this instanceof x?(this.v=e,this):new x(e)}function ie(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i={},o(`next`),o(`throw`),o(`return`),i[Symbol.asyncIterator]=function(){return this},i;function o(e){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||s(e,t)})})}function s(e,t){try{c(r[e](t))}catch(e){d(a[0][3],e)}}function c(e){e.value instanceof x?Promise.resolve(e.value.v).then(l,u):d(a[0][2],e)}function l(e){s(`next`,e)}function u(e){s(`throw`,e)}function d(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function ae(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof v==`function`?v(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}function S(e){return typeof e==`function`}function oe(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var se=oe(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription:
2
+ `+t.map(function(e,t){return t+1+`) `+e.toString()}).join(`
3
+ `):``,this.name=`UnsubscriptionError`,this.errors=t}});function C(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var w=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=v(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this);var c=this.initialTeardown;if(S(c))try{c()}catch(e){i=e instanceof se?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=v(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{ue(f)}catch(e){i??=[],e instanceof se?i=b(b([],y(i)),y(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new se(i)}},e.prototype.add=function(t){if(t&&t!==this)if(this.closed)ue(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&C(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&C(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),ce=w.EMPTY;function le(e){return e instanceof w||e&&`closed`in e&&S(e.remove)&&S(e.add)&&S(e.unsubscribe)}function ue(e){S(e)?e():e.unsubscribe()}var T={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},E={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=E.delegate;return i?.setTimeout?i.setTimeout.apply(i,b([e,t],y(n))):setTimeout.apply(void 0,b([e,t],y(n)))},clearTimeout:function(e){return(E.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function de(e){E.setTimeout(function(){var t=T.onUnhandledError;if(t)t(e);else throw e})}function fe(){}var pe=(function(){return ge(`C`,void 0,void 0)})();function me(e){return ge(`E`,void 0,e)}function he(e){return ge(`N`,e,void 0)}function ge(e,t,n){return{kind:e,value:t,error:n}}var D=null;function _e(e){if(T.useDeprecatedSynchronousErrorHandling){var t=!D;if(t&&(D={errorThrown:!1,error:null}),e(),t){var n=D,r=n.errorThrown,i=n.error;if(D=null,r)throw i}}else e()}function ve(e){T.useDeprecatedSynchronousErrorHandling&&D&&(D.errorThrown=!0,D.error=e)}var ye=function(e){_(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,le(t)&&t.add(n)):n.destination=Te,n}return t.create=function(e,t,n){return new O(e,t,n)},t.prototype.next=function(e){this.isStopped?we(he(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?we(me(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?we(pe,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(w),be=Function.prototype.bind;function xe(e,t){return be.call(e,t)}var Se=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){k(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){k(e)}else k(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){k(e)}},e}(),O=function(e){_(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(S(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&T.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&xe(t.next,o),error:t.error&&xe(t.error,o),complete:t.complete&&xe(t.complete,o)}):a=t}return i.destination=new Se(a),i}return t}(ye);function k(e){T.useDeprecatedSynchronousErrorHandling?ve(e):de(e)}function Ce(e){throw e}function we(e,t){var n=T.onStoppedNotification;n&&E.setTimeout(function(){return n(e,t)})}var Te={closed:!0,next:fe,error:Ce,complete:fe},Ee=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function A(e){return e}function De(e){return e.length===0?A:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var j=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=Ae(e)?e:new O(e,t,n);return _e(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=Oe(t),new t(function(t,r){var i=new O({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[Ee]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return De(e)(this)},e.prototype.toPromise=function(e){var t=this;return e=Oe(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function Oe(e){return e??T.Promise??Promise}function ke(e){return e&&S(e.next)&&S(e.error)&&S(e.complete)}function Ae(e){return e&&e instanceof ye||ke(e)&&le(e)}function je(e){return S(e?.lift)}function M(e){return function(t){if(je(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function N(e,t,n,r,i){return new Me(e,t,n,r,i)}var Me=function(e){_(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(ye),Ne=oe(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Pe=function(e){_(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new Fe(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Ne},t.prototype.next=function(e){var t=this;_e(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=v(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;_e(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;_e(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?ce:(this.currentObservers=null,a.push(e),new w(function(){t.currentObservers=null,C(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new j;return e.source=this,e},t.create=function(e,t){return new Fe(e,t)},t}(j),Fe=function(e){_(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??ce},t}(Pe),Ie={now:function(){return(Ie.delegate||Date).now()},delegate:void 0},Le=function(e){_(t,e);function t(t,n,r){t===void 0&&(t=1/0),n===void 0&&(n=1/0),r===void 0&&(r=Ie);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this,r=n._infiniteTimeWindow,i=n._buffer.slice(),a=0;a<i.length&&!e.closed;a+=r?1:2)e.next(i[a]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,a=(i?1:2)*t;if(t<1/0&&a<r.length&&r.splice(0,r.length-a),!i){for(var o=n.now(),s=0,c=1;c<r.length&&r[c]<=o;c+=2)s=c;s&&r.splice(0,s+1)}},t}(Pe),Re=function(e){_(t,e);function t(t,n){return e.call(this)||this}return t.prototype.schedule=function(e,t){return t===void 0&&(t=0),this},t}(w),ze={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=ze.delegate;return i?.setInterval?i.setInterval.apply(i,b([e,t],y(n))):setInterval.apply(void 0,b([e,t],y(n)))},clearInterval:function(e){return(ze.delegate?.clearInterval||clearInterval)(e)},delegate:void 0},Be=function(e){_(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return t.prototype.schedule=function(e,t){if(t===void 0&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id??this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return n===void 0&&(n=0),ze.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(n===void 0&&(n=0),n!=null&&this.delay===n&&this.pending===!1)return t;t!=null&&ze.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error(`executing a cancelled action`);this.pending=!1;var n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r;try{this.work(e)}catch(e){n=!0,r=e||Error(`Scheduled action threw falsy error`)}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this,n=t.id,r=t.scheduler,i=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,C(i,this),n!=null&&(this.id=this.recycleAsyncId(r,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(Re),Ve=function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=Ie.now,e}(),He=new(function(e){_(t,e);function t(t,n){n===void 0&&(n=Ve.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return t.prototype.flush=function(e){var t=this.actions;if(this._active){t.push(e);return}var n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}},t}(Ve))(Be),Ue=He,We=new j(function(e){return e.complete()});function Ge(e){return e?Ke(e):We}function Ke(e){return new j(function(t){return e.schedule(function(){return t.complete()})})}function qe(e){return e&&S(e.schedule)}function Je(e){return e[e.length-1]}function Ye(e){return qe(Je(e))?e.pop():void 0}function Xe(e,t){return typeof Je(e)==`number`?e.pop():t}var Ze=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function Qe(e){return S(e?.then)}function $e(e){return S(e[Ee])}function et(e){return Symbol.asyncIterator&&S(e?.[Symbol.asyncIterator])}function tt(e){return TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function nt(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var rt=nt();function it(e){return S(e?.[rt])}function at(e){return ie(this,arguments,function(){var t,n,r,i;return re(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,x(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,x(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,x(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function ot(e){return S(e?.getReader)}function P(e){if(e instanceof j)return e;if(e!=null){if($e(e))return st(e);if(Ze(e))return ct(e);if(Qe(e))return lt(e);if(et(e))return dt(e);if(it(e))return ut(e);if(ot(e))return ft(e)}throw tt(e)}function st(e){return new j(function(t){var n=e[Ee]();if(S(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function ct(e){return new j(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function lt(e){return new j(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,de)})}function ut(e){return new j(function(t){var n,r;try{for(var i=v(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function dt(e){return new j(function(t){pt(e,t).catch(function(e){return t.error(e)})})}function ft(e){return dt(at(e))}function pt(e,t){var n,r,i,a;return ne(this,void 0,void 0,function(){var o,s;return re(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=ae(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function F(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function mt(e,t){return t===void 0&&(t=0),M(function(n,r){n.subscribe(N(r,function(n){return F(r,e,function(){return r.next(n)},t)},function(){return F(r,e,function(){return r.complete()},t)},function(n){return F(r,e,function(){return r.error(n)},t)}))})}function ht(e,t){return t===void 0&&(t=0),M(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function gt(e,t){return P(e).pipe(ht(t),mt(t))}function _t(e,t){return P(e).pipe(ht(t),mt(t))}function vt(e,t){return new j(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function yt(e,t){return new j(function(n){var r;return F(n,t,function(){r=e[rt](),F(n,t,function(){var e,t,i;try{e=r.next(),t=e.value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return S(r?.return)&&r.return()}})}function bt(e,t){if(!e)throw Error(`Iterable cannot be null`);return new j(function(n){F(n,t,function(){var r=e[Symbol.asyncIterator]();F(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function xt(e,t){return bt(at(e),t)}function St(e,t){if(e!=null){if($e(e))return gt(e,t);if(Ze(e))return vt(e,t);if(Qe(e))return _t(e,t);if(et(e))return bt(e,t);if(it(e))return yt(e,t);if(ot(e))return xt(e,t)}throw tt(e)}function I(e,t){return t?St(e,t):P(e)}function Ct(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return I(e,Ye(e))}var wt=oe(function(e){return function(){e(this),this.name=`EmptyError`,this.message=`no elements in sequence`}});function Tt(e){return e instanceof Date&&!isNaN(e)}function L(e,t){return M(function(n,r){var i=0;n.subscribe(N(r,function(n){r.next(e.call(t,n,i++))}))})}function Et(e,t,n,r,i,a,o,s){var c=[],l=0,u=0,d=!1,f=function(){d&&!c.length&&!l&&t.complete()},p=function(e){return l<r?m(e):c.push(e)},m=function(e){a&&t.next(e),l++;var s=!1;P(n(e,u++)).subscribe(N(t,function(e){i?.(e),a?p(e):t.next(e)},function(){s=!0},void 0,function(){if(s)try{l--;for(var e=function(){var e=c.shift();o?F(t,o,function(){return m(e)}):m(e)};c.length&&l<r;)e();f()}catch(e){t.error(e)}}))};return e.subscribe(N(t,p,function(){d=!0,f()})),function(){s?.()}}function Dt(e,t,n){return n===void 0&&(n=1/0),S(t)?Dt(function(n,r){return L(function(e,i){return t(n,e,r,i)})(P(e(n,r)))},n):(typeof t==`number`&&(n=t),M(function(t,r){return Et(t,r,e,n)}))}function Ot(e){return e===void 0&&(e=1/0),Dt(A,e)}function kt(){return Ot(1)}function At(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return kt()(I(e,Ye(e)))}function jt(e,t,n){e===void 0&&(e=0),n===void 0&&(n=Ue);var r=-1;return t!=null&&(qe(t)?n=t:r=t),new j(function(t){var i=Tt(e)?+e-n.now():e;i<0&&(i=0);var a=0;return n.schedule(function(){t.closed||(t.next(a++),0<=r?this.schedule(void 0,r):t.complete())},i)})}function Mt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Ye(e),r=Xe(e,1/0),i=e;return i.length?i.length===1?P(i[0]):Ot(r)(I(i,n)):We}function Nt(e,t){return M(function(n,r){var i=0;n.subscribe(N(r,function(n){return e.call(t,n,i++)&&r.next(n)}))})}function Pt(e){return M(function(t,n){var r=null,i=!1,a;r=t.subscribe(N(n,void 0,void 0,function(o){a=P(e(o,Pt(e)(t))),r?(r.unsubscribe(),r=null,a.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,a.subscribe(n))})}function Ft(e,t,n,r,i){return function(a,o){var s=n,c=t,l=0;a.subscribe(N(o,function(t){var n=l++;c=s?e(c,t,n):(s=!0,t),r&&o.next(c)},i&&(function(){s&&o.next(c),o.complete()})))}}function It(e){return M(function(t,n){var r=!1;t.subscribe(N(n,function(e){r=!0,n.next(e)},function(){r||n.next(e),n.complete()}))})}function Lt(e){return e<=0?function(){return We}:M(function(t,n){var r=0;t.subscribe(N(n,function(t){++r<=e&&(n.next(t),e<=r&&n.complete())}))})}function Rt(){return M(function(e,t){e.subscribe(N(t,fe))})}function zt(e){return L(function(){return e})}function Bt(e,t){return t?function(n){return At(t.pipe(Lt(1),Rt()),n.pipe(Bt(e)))}:Dt(function(t,n){return P(e(t,n)).pipe(Lt(1),zt(t))})}function Vt(e,t){t===void 0&&(t=He);var n=jt(e,t);return Bt(function(){return n})}function Ht(e,t){return t===void 0&&(t=A),e??=Ut,M(function(n,r){var i,a=!0;n.subscribe(N(r,function(n){var o=t(n);(a||!e(i,o))&&(a=!1,i=o,r.next(n))}))})}function Ut(e,t){return e===t}function Wt(e){return e===void 0&&(e=Gt),M(function(t,n){var r=!1;t.subscribe(N(n,function(e){r=!0,n.next(e)},function(){return r?n.complete():n.error(e())}))})}function Gt(){return new wt}function Kt(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?Nt(function(t,n){return e(t,n,r)}):A,Lt(1),n?It(t):Wt(function(){return new wt}))}}function qt(e,t){return M(Ft(e,t,arguments.length>=2,!0))}function Jt(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new Pe}:t,r=e.resetOnError,i=r===void 0?!0:r,a=e.resetOnComplete,o=a===void 0?!0:a,s=e.resetOnRefCountZero,c=s===void 0?!0:s;return function(e){var t,r,a,s=0,l=!1,u=!1,d=function(){r?.unsubscribe(),r=void 0},f=function(){d(),t=a=void 0,l=u=!1},p=function(){var e=t;f(),e?.unsubscribe()};return M(function(e,m){s++,!u&&!l&&d();var h=a??=n();m.add(function(){s--,s===0&&!u&&!l&&(r=Yt(p,c))}),h.subscribe(m),!t&&s>0&&(t=new O({next:function(e){return h.next(e)},error:function(e){u=!0,d(),r=Yt(f,i,e),h.error(e)},complete:function(){l=!0,d(),r=Yt(f,o),h.complete()}}),P(e).subscribe(t))})(e)}}function Yt(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t===!0){e();return}if(t!==!1){var i=new O({next:function(){i.unsubscribe(),e()}});return P(t.apply(void 0,b([],y(n)))).subscribe(i)}}function Xt(e,t,n){var r,i,a,o,s=!1;return e&&typeof e==`object`?(r=e.bufferSize,o=r===void 0?1/0:r,i=e.windowTime,t=i===void 0?1/0:i,a=e.refCount,s=a===void 0?!1:a,n=e.scheduler):o=e??1/0,Jt({connector:function(){return new Le(o,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:s})}function Zt(e,t){return M(function(n,r){var i=null,a=0,o=!1,s=function(){return o&&!i&&r.complete()};n.subscribe(N(r,function(n){i?.unsubscribe();var o=0,c=a++;P(e(n,c)).subscribe(i=N(r,function(e){return r.next(t?t(n,e,c,o++):e)},function(){i=null,s()}))},function(){o=!0,s()}))})}function Qt(e,t,n){var r=S(e)||t||n?{next:e,error:t,complete:n}:e;return r?M(function(e,t){var n;(n=r.subscribe)==null||n.call(r);var i=!0;e.subscribe(N(t,function(e){var n;(n=r.next)==null||n.call(r,e),t.next(e)},function(){var e;i=!1,(e=r.complete)==null||e.call(r),t.complete()},function(e){var n;i=!1,(n=r.error)==null||n.call(r,e),t.error(e)},function(){var e,t;i&&((e=r.unsubscribe)==null||e.call(r)),(t=r.finalize)==null||t.call(r)}))}):A}function $t(e){return new j(function(t){return{unsubscribe:(0,n.onIdTokenChanged)(e,t.next.bind(t),t.error.bind(t),t.complete.bind(t))}})}var en=`[DEFAULT]`,tn=t.createContext(void 0),nn=t.createContext(!1),rn=`4.2.4`,an=(e,t)=>e===t||[...Object.keys(e),...Object.keys(t)].every(n=>e[n]===t[n]);function on(e){let{firebaseConfig:n,appName:i,suspense:a}=e,o=t.useMemo(()=>{if(e.firebaseApp)return e.firebaseApp;let a=(0,r.getApps)().find(e=>e.name===(i||en));if(a){if(n&&an(a.options,n))return a;throw Error(`Does not match the options already provided to the ${i||`default`} firebase app instance, give this new instance a different appName.`)}else{if(!n)throw Error(`No firebaseConfig provided`);return(0,r.registerVersion)(`react`,t.version||`unknown`),(0,r.registerVersion)(`reactfire`,rn),(0,r.initializeApp)(n,i)}},[e.firebaseApp,n,i]);return t.createElement(tn.Provider,{value:o},t.createElement(nn.Provider,Object.assign({value:a??!1},e)))}function sn(){return t.useContext(nn)??!1}function R(e){let n=t.useContext(nn);return e===void 0?n:e}function cn(){let e=t.useContext(tn);if(!e)throw Error(`Cannot call useFirebaseApp unless your component is within a FirebaseAppProvider`);return e}function ln(e){return ne(this,void 0,void 0,function*(){let t=yield e();return G($t(t),`auth:user:${t.name}`).toPromise()})}function un(e){let t=Br(),n=`auth:user:${t.name}`,r=$t(t),i=Object.assign({},e);return t.currentUser&&!(`initialData`in i)&&!(`startWithValue`in i)&&(i.initialData=t.currentUser),K(n,r,i)}function dn(e,t=!1,n){if(!e)throw Error(`you must provide a user`);return K(`auth:idTokenResult:${e.uid}:forceRefresh=${t}`,I(e.getIdTokenResult(t)),n)}function fn(e){if(e?.hasOwnProperty(`requiredClaims`)&&e?.hasOwnProperty(`validateCustomClaims`))throw Error(`Cannot have both "requiredClaims" and "validateCustomClaims". Use one or the other.`);let t=Br(),n=`auth:signInCheck:${t.name}::forceRefresh:${!!e?.forceRefresh}`;e?.forceRefresh&&(n=`${n}:forceRefresh:${e.forceRefresh}`),e?.hasOwnProperty(`requiredClaims`)?n=`${n}:requiredClaims:${JSON.stringify(e.requiredClaims)}`:e?.hasOwnProperty(`validateCustomClaims`)&&(n=`${n}:validateCustomClaims:${JSON.stringify(e.validateCustomClaims)}`);let r=$t(t).pipe(Zt(t=>t?e&&(e.hasOwnProperty(`requiredClaims`)||e.hasOwnProperty(`validateCustomClaims`))?I(t.getIdTokenResult(e?.forceRefresh??!1)).pipe(L(n=>{let r;r=e.hasOwnProperty(`requiredClaims`)?pn(e.requiredClaims):e.validateCustomClaims;let{hasRequiredClaims:i,errors:a}=r(n.claims);return{signedIn:!0,hasRequiredClaims:i,errors:a,user:t}})):Ct({signedIn:!0,hasRequiredClaims:!0,errors:{},user:t}):Ct({signedIn:!1,hasRequiredClaims:!1,errors:{},user:null})));return K(n,r,e)}function pn(e){return function(t){let n={};return Object.keys(e).forEach(r=>{e[r]!==t[r]&&(n[r]=[new ri(`auth/missing-claim`,`Expected "${e[r]}", but user has "${t[r]}" instead`)])}),{hasRequiredClaims:Object.keys(n).length===0,errors:n}}}function mn({user:e,fallback:n,children:r,requiredClaims:i}){let{data:a,status:o,error:s}=dn(e,!1);if(o===`loading`)throw Error(`ClaimsCheck must be run in Suspense mode`);if(o===`error`)throw s;let{claims:c}=a,l={};return R()||console.warn(`ClaimsCheck is deprecated and only works when ReactFire is in experimental Suspense Mode. Use useSigninCheck or set suspense={true} in FirebaseAppProvider if you want to use this component.`),i&&Object.keys(i).forEach(e=>{i[e]!==c[e]&&(l[e]={expected:i[e],actual:c[e]?.toString()})}),Object.keys(l).length===0?t.createElement(t.Fragment,null,r):t.createElement(t.Fragment,null,n)}function hn({fallback:e,children:n,requiredClaims:r}){let{data:i}=un();return R()||console.warn(`AuthCheck is deprecated and only works when ReactFire is in experimental Suspense Mode. Use useSigninCheck or set suspense={true} in FirebaseAppProvider if you want to use this component.`),i?r?t.createElement(mn,{user:i,fallback:e,requiredClaims:r},n):t.createElement(t.Fragment,null,n):t.createElement(t.Fragment,null,e)}var z,B;(function(e){e.added=`child_added`,e.removed=`child_removed`,e.changed=`child_changed`,e.moved=`child_moved`,e.value=`value`})(B||={});var gn=Object.freeze((z={},z[B.added]=i.onChildAdded,z[B.removed]=i.onChildRemoved,z[B.changed]=i.onChildChanged,z[B.moved]=i.onChildMoved,z[B.value]=i.onValue,z));function _n(e,t){return new j(function(n){var r=gn[t](e,function(e,r){n.next({snapshot:e,prevKey:r,event:t})},n.error.bind(n));return{unsubscribe:function(){(0,i.off)(e,t,r)}}}).pipe(Vt(0))}var V=function(){return V=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},V.apply(this,arguments)};function vn(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function yn(e){return(e==null||e.length===0)&&(e=[B.added,B.removed,B.changed,B.moved]),e}function bn(e){return _n(e,B.value)}function xn(e,t){return t===void 0&&(t={}),_n(e,B.value).pipe(L(function(e){return Sn(e,t)}))}function Sn(e,t){var n;t===void 0&&(t={});var r=e.snapshot.val();return!e.snapshot.exists()||typeof r!=`object`?r:V(V({},r),t.keyField?(n={},n[t.keyField]=e.snapshot.key,n):null)}function Cn(e){return I((0,i.get)(e)).pipe(L(function(e){return{snapshot:e,prevKey:null,event:B.value}}))}function wn(e,t){t===void 0&&(t={});var n=yn(t.events);return Cn(e).pipe(Zt(function(t){var r=[Ct(t)];return n.forEach(function(t){r.push(_n(e,t))}),Mt.apply(void 0,r).pipe(qt(On,[]))}),Ht())}function Tn(e,t){return t===void 0&&(t={}),wn(e).pipe(L(function(e){return e.map(function(e){return Sn(e,t)})}))}function En(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].snapshot.key===t)return r;return-1}function Dn(e,t){if(t==null)return 0;var n=En(e,t);return n===-1?e.length:n+1}function On(e,t){var n=t.snapshot,r=t.prevKey,i=t.event,a=n.key,o=En(e,a),s=Dn(e,r||void 0);switch(i){case B.value:if(t.snapshot&&t.snapshot.exists()){var c=null;t.snapshot.forEach(function(t){var n={snapshot:t,event:B.value,prevKey:c};return c=t.key,e=vn(vn([],e,!0),[n],!1),!1})}return e;case B.added:if(o>-1){var l=e[o-1];(l&&l.snapshot.key||null)!==r&&(e=e.filter(function(e){return e.snapshot.key!==n.key}),e.splice(s,0,t))}else if(r==null)return vn([t],e,!0);else e=e.slice(),e.splice(s,0,t);return e;case B.removed:return e.filter(function(e){return e.snapshot.key!==n.key});case B.changed:return e.map(function(e){return e.snapshot.key===a?t:e});case B.moved:if(o>-1){var u=e.splice(o,1)[0];return e=e.slice(),e.splice(s,0,u),e}return e;default:return e}}var kn=globalThis._reactFireDatabaseCachedQueries||[];globalThis._reactFireDatabaseCachedQueries||(globalThis._reactFireDatabaseCachedQueries=kn);function An(e){let t=kn.findIndex(t=>t.isEqual(e));return t>-1?t:kn.push(e)-1}function jn(e,t){return K(`database:object:${e.toString()}`,bn(e),t)}function Mn(e,t){let n=t?$(t):`NO_ID_FIELD`;return K(`database:objectVal:${e.toString()}:idField=${n}`,xn(e,{keyField:n}),t)}function Nn(e,t){return K(`database:list:${An(e)}`,wn(e),t)}function Pn(e,t){let n=t?$(t):`NO_ID_FIELD`;return K(`database:listVal:${An(e)}:idField=${n}`,Tn(e,{keyField:n}),t)}var H=function(){return H=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},H.apply(this,arguments)},Fn={includeMetadataChanges:!1};function In(e,t){return t===void 0&&(t=Fn),new j(function(n){return{unsubscribe:(0,a.onSnapshot)(e,t,{next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)})}})}function U(e){return In(e,{includeMetadataChanges:!0})}function Ln(e,t){return t===void 0&&(t={}),U(e).pipe(L(function(e){return Rn(e,t)}))}function Rn(e,t){var n;t===void 0&&(t={});var r=e.data(t);return!e.exists()||typeof r!=`object`||!r||!t.idField?r:H(H({},r),(n={},n[t.idField]=e.id,n))}function zn(e){return In(e,{includeMetadataChanges:!0}).pipe(L(function(e){return e.docs}))}function Bn(e,t){return t===void 0&&(t={}),zn(e).pipe(L(function(e){return e.map(function(e){return Rn(e,t)})}))}var Vn=h((e=>{var t=require("react");function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Hn=h((e=>{process.env.NODE_ENV!==`production`&&(function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=require("react"),n=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(e){i(`error`,e,[...arguments].slice(1))}function i(e,t,r){var i=n.ReactDebugCurrentFrame.getStackAddendum();i!==``&&(t+=`%s`,r=r.concat([i]));var a=r.map(function(e){return String(e)});a.unshift(`Warning: `+t),Function.prototype.apply.call(console[e],console,a)}function a(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var o=typeof Object.is==`function`?Object.is:a,s=t.useState,c=t.useEffect,l=t.useLayoutEffect,u=t.useDebugValue,d=!1,f=!1;function p(e,n,i){d||t.startTransition!==void 0&&(d=!0,r(`You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.`));var a=n();f||o(a,n())||(r(`The result of getSnapshot should be cached to avoid an infinite loop`),f=!0);var p=s({inst:{value:a,getSnapshot:n}}),h=p[0].inst,g=p[1];return l(function(){h.value=a,h.getSnapshot=n,m(h)&&g({inst:h})},[e,a,n]),c(function(){return m(h)&&g({inst:h}),e(function(){m(h)&&g({inst:h})})},[e]),u(a),a}function m(e){var t=e.getSnapshot,n=e.value;try{return!o(n,t())}catch{return!0}}function h(e,t,n){return t()}var g=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?p:h;e.useSyncExternalStore=t.useSyncExternalStore===void 0?g:t.useSyncExternalStore,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),Un=h(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=Vn():t.exports=Hn()}))(),Wn=class extends Pe{constructor(e,t,n){super(),this._timeoutWindow=t,this._suspenseEnabled=n,this._hasValue=!1,this._error=void 0,this._isComplete=!1,this._firstEmission=new Promise(e=>this._resolveFirstEmission=e),this._immutableStatus={status:`loading`,hasEmitted:!1,isComplete:!1,data:void 0,error:void 0,firstValuePromise:this._firstEmission},this._innerObservable=e.pipe(Qt({next:e=>{this._next(e)},error:e=>{this._error=e,this._resolveFirstEmission(),this._updateImmutableStatus()},complete:()=>{this._isComplete=!0,this._updateImmutableStatus()}}),Pt(()=>Ge()),Xt(1)),this._warmupSubscription=this._innerObservable.subscribe(),this._suspenseEnabled?this._timeoutHandler=setTimeout(()=>{},this._timeoutWindow):this._timeoutHandler=setTimeout(this._reset.bind(this),this._timeoutWindow)}get hasValue(){return this._hasValue||!!this._error}get value(){if(this._error)throw this._error;if(!this.hasValue)throw Error(`Can only get value if SuspenseSubject has a value`);return this._value}get firstEmission(){return this._firstEmission}_updateImmutableStatus(){this._immutableStatus={status:this._error?`error`:this._hasValue?`success`:`loading`,hasEmitted:this._hasValue,isComplete:this._isComplete,data:this._value,error:this._error,firstValuePromise:this._firstEmission}}_next(e){this._hasValue=!0,this._value=e,this._resolveFirstEmission(),this._updateImmutableStatus()}_reset(){this._warmupSubscription&&this._warmupSubscription.unsubscribe(),this._hasValue=!1,this._value=void 0,this._error=void 0,this._firstEmission=new Promise(e=>this._resolveFirstEmission=e),this._updateImmutableStatus()}_subscribe(e){return this._timeoutHandler&&clearTimeout(this._timeoutHandler),this._innerSubscriber=this._innerObservable.subscribe(e),this._innerSubscriber}get ourError(){return this._error}get immutableStatus(){return this._immutableStatus}},Gn=3e4,W=globalThis._reactFirePreloadedObservables||new Map;globalThis._reactFirePreloadedObservables||(globalThis._reactFirePreloadedObservables=W);function G(e,t,n=!1){if(W.has(t))return W.get(t);{let r=new Wn(e,Gn,n);return W.set(t,r),r}}function K(e,n,r={}){if(!e)throw Error(`cannot call useObservable without an observableId`);let i=R(r.suspense),a=G(n,e,i),o=r.hasOwnProperty(`initialData`)||r.hasOwnProperty(`startWithValue`),s=a.hasValue||o;if(i===!0&&!s)throw a.firstEmission;let c=(0,Un.useSyncExternalStore)(t.useCallback(e=>{let t=a.subscribe({next:()=>{e()},error:t=>{throw e(),t},complete:()=>{e()}});return()=>{t.unsubscribe()}},[a]),t.useCallback(()=>a.immutableStatus,[a]));if(!a.hasValue&&s){let e=r?.initialData??r?.startWithValue;if(i&&c.error)throw c.error;return Object.assign(Object.assign({},c),{data:e,status:`success`,hasEmitted:!0})}if(c.error)throw c.error;return c}var Kn=globalThis._reactFireFirestoreQueryCache||[];globalThis._reactFireFirestoreQueryCache||(globalThis._reactFireFirestoreQueryCache=Kn);function qn(e){let t=Kn.findIndex(t=>(0,a.queryEqual)(t,e));return t>-1?t:Kn.push(e)-1}function Jn(e){return ne(this,void 0,void 0,function*(){let t=yield e();return G(U(t),Yn(t))})}function Yn(e){return`firestore:doc:${e.firestore.app.name}:${e.path}`}function Xn(e,t){return K(Yn(e),U(e),t)}function Zn(e,t){return K(`firestore:docOnce:${e.firestore.app.name}:${e.path}`,U(e).pipe(Kt()),t)}function Qn(e,t){let n=t?$(t):`NO_ID_FIELD`;return K(`firestore:docData:${e.firestore.app.name}:${e.path}:idField=${n}`,Ln(e,{idField:n}),t)}function $n(e,t){let n=t?$(t):`NO_ID_FIELD`;return K(`firestore:docDataOnce:${e.firestore.app.name}:${e.path}:idField=${n}`,Ln(e,{idField:n}).pipe(Kt()),t)}function er(e,t){return K(`firestore:collection:${qn(e)}`,In(e),t)}function tr(e,t){let n=t?$(t):`NO_ID_FIELD`;return K(`firestore:collectionData:${qn(e)}:idField=${n}`,Bn(e,{idField:n}),t)}function nr(e,t,n){var r=(0,o.httpsCallable)(e,t,n);return function(e){return I(r(e)).pipe(L(function(e){return e.data}))}}function rr(e,t){let n=Wr();return K(`functions:callableResponse:${e}:${JSON.stringify(t?.data)}:${JSON.stringify(t?.httpsCallableOptions)}`,nr(n,e,t?.httpsCallableOptions)(t?.data),t)}function ir({children:e,traceId:n,fallback:r}){let i=typeof globalThis<`u`?globalThis.performance:void 0,a=(i?.getEntriesByName)?.call(i,n,`measure`)||[],o=`_${n}Start[${a.length}]`,s=`_${n}End[${a.length}]`;return t.createElement(t.Suspense,{fallback:t.createElement(()=>(t.useEffect(()=>{var e;return(e=i?.mark)==null||e.call(i,o),()=>{var e,t;(e=i?.mark)==null||e.call(i,s),(t=i?.measure)==null||t.call(i,n,o,s)}},[]),t.createElement(t.Fragment,null,r)),null)},e)}function q(e){var t=e.remoteConfig,n=e.key,r=e.getter;return new j(function(e){(0,s.ensureInitialized)(t).then(function(){var i=r.bind(t);e.next(i(t,n))})})}function ar(e,t){return q({remoteConfig:e,key:t,getter:s.getValue})}function or(e,t){return q({remoteConfig:e,key:t,getter:s.getString})}function sr(e,t){return q({remoteConfig:e,key:t,getter:s.getNumber})}function cr(e,t){return q({remoteConfig:e,key:t,getter:s.getBoolean})}function lr(e){return q({remoteConfig:e,key:``,getter:s.getAll})}function J(e,t){let n=qr(),r=n.app.name,i=t(n,e);return K(`remoteConfig:${e}:${t.name}:${r}`,i)}function ur(e){return J(e,ar)}function dr(e){return J(e,or)}function fr(e){return J(e,sr)}function pr(e){return J(e,cr)}function mr(e){return J(e,lr)}function hr(e){return new j(function(t){var n=null,r=!1,i=!1,a=null,o=function(e){n=e,c()},s=null,c=function(){s||=setTimeout(function(){s=null,n&&t.next(n),r&&t.complete(),i&&t.error(a)})};t.add(function(){s&&clearTimeout(s)}),o(e.snapshot),t.add(e.on(`state_changed`,o)),t.add(I(e).subscribe({next:o,error:function(e){i=!0,a=e,c()},complete:function(){r=!0,c()}}))})}function gr(e){return I((0,c.getDownloadURL)(e))}function _r(e,t,n){return K(`storage:task:${t.toString()}`,hr(e),n)}function vr(e,t){return K(`storage:downloadUrl:${e.toString()}`,gr(e),t)}function yr(e){let n=Kr();return e=Object.assign(Object.assign({},e),{storage:n}),t.createElement(br,Object.assign({},e))}function br(e){let{storage:n,storagePath:r,suspense:i,placeHolder:a}=e,o=te(e,[`storage`,`storagePath`,`suspense`,`placeHolder`]),s={suspense:R(i)};if(!n)throw Error(`Storage was not passed to component INTERNALStorageImage. This should not be possible`);let{status:l,data:u}=vr((0,c.ref)(n,r),s);return l===`success`?(o.alt||o.alt===``||console.warn(`No alt prop provided for StorageImage with storagePath "${r}"`,`img elements must have an alt prop, either with meaningful text, or an empty string for decorative images`),t.createElement(`img`,Object.assign({src:u,alt:o.alt},o))):a??t.createElement(t.Fragment,null,`''`)}function xr(e){let{storage:n}=e;return n?t.createElement(br,Object.assign({},e)):t.createElement(yr,Object.assign({},e))}var Y=t.createContext(void 0),Sr=t.createContext(void 0),Cr=t.createContext(void 0),wr=t.createContext(void 0),Tr=t.createContext(void 0),Er=t.createContext(void 0),Dr=t.createContext(void 0),Or=t.createContext(void 0),kr=t.createContext(void 0);function X(e){return function(n){if(!n.sdk)throw Error(`no sdk provided`);let r=cn().name;if(n?.sdk?.app?.name!==r)throw Error(`sdk was initialized with a different firebase app`);return t.createElement(e.Provider,Object.assign({value:n.sdk},n))}}function Z(e){let n=t.useContext(e);if(!n)throw Error(`SDK not found. useSdk must be called from within a provider`);return n}function Q(e,n,r,i){let a=cn();if(t.useContext(n))throw Error(`Cannot initialize SDK ${e} because it already exists in Context`);let o=t.useMemo(()=>r(a),[a]);return K(`firebase-sdk:${e}:${a.name}`,I(o),i)}var Ar=X(Y),jr=X(Sr),Mr=X(Cr),Nr=X(wr),Pr=X(Tr),Fr=X(Er),Ir=X(Or),Lr=X(Dr),Rr=X(kr),zr=()=>Z(Y),Br=()=>Z(Sr),Vr=()=>Z(Cr),Hr=()=>Z(wr),Ur=()=>Z(Tr),Wr=()=>Z(Er),Gr=()=>Z(Or),Kr=()=>Z(Dr),qr=()=>Z(kr),Jr=(e,t)=>Q(`appcheck`,Y,e,t),Yr=(e,t)=>Q(`auth`,Sr,e,t),Xr=(e,t)=>Q(`analytics`,Cr,e,t),Zr=(e,t)=>Q(`database`,wr,e,t),Qr=(e,t)=>Q(`firestore`,Tr,e,t),$r=(e,t)=>Q(`functions`,Er,e,t),ei=(e,t)=>Q(`performance`,Or,e,t),ti=(e,t)=>Q(`remoteconfig`,kr,e,t),ni=(e,t)=>Q(`storage`,Dr,e,t),ri=class e extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name=`ReactFireError`,Object.setPrototypeOf(this,e.prototype)}};function ii(e,t){if(t===`idField`||t===`initialData`||t===`suspense`)return e?e[t]:void 0;throw Error(`Field "${t}" is not a valid key in ReactFireOptions`)}function ai(e){return ii(e,`initialData`)}function $(e){return ii(e,`idField`)}e.AnalyticsProvider=Mr,e.AnalyticsSdkContext=Cr,e.AppCheckProvider=Ar,e.AppCheckSdkContext=Y,e.AuthCheck=hn,e.AuthProvider=jr,e.AuthSdkContext=Sr,e.ClaimsCheck=mn,e.DatabaseProvider=Nr,e.DatabaseSdkContext=wr,e.FirebaseAppProvider=on,e.FirestoreProvider=Pr,e.FirestoreSdkContext=Tr,e.FunctionsProvider=Fr,e.FunctionsSdkContext=Er,e.PerformanceProvider=Ir,e.PerformanceSdkContext=Or,e.ReactFireError=ri,e.RemoteConfigProvider=Rr,e.RemoteConfigSdkContext=kr,e.StorageImage=xr,e.StorageProvider=Lr,e.StorageSdkContext=Dr,e.SuspenseWithPerf=ir,e.checkIdField=$,e.checkOptions=ii,e.checkinitialData=ai,e.preloadFirestoreDoc=Jn,e.preloadObservable=G,e.preloadUser=ln,e.useAnalytics=Vr,e.useAppCheck=zr,e.useAuth=Br,e.useCallableFunctionResponse=rr,e.useDatabase=Hr,e.useDatabaseList=Nn,e.useDatabaseListData=Pn,e.useDatabaseObject=jn,e.useDatabaseObjectData=Mn,e.useFirebaseApp=cn,e.useFirestore=Ur,e.useFirestoreCollection=er,e.useFirestoreCollectionData=tr,e.useFirestoreDoc=Xn,e.useFirestoreDocData=Qn,e.useFirestoreDocDataOnce=$n,e.useFirestoreDocOnce=Zn,e.useFunctions=Wr,e.useIdTokenResult=dn,e.useInitAnalytics=Xr,e.useInitAppCheck=Jr,e.useInitAuth=Yr,e.useInitDatabase=Zr,e.useInitFirestore=Qr,e.useInitFunctions=$r,e.useInitPerformance=ei,e.useInitRemoteConfig=ti,e.useInitStorage=ni,e.useIsSuspenseEnabled=sn,e.useObservable=K,e.usePerformance=Gr,e.useRemoteConfig=qr,e.useRemoteConfigAll=mr,e.useRemoteConfigBoolean=pr,e.useRemoteConfigNumber=fr,e.useRemoteConfigString=dr,e.useRemoteConfigValue=ur,e.useSigninCheck=fn,e.useStorage=Kr,e.useStorageDownloadURL=vr,e.useStorageTask=_r,e.useSuspenseEnabledFromConfigAndContext=R,e.useUser=un,e.version=rn});
4
+ //# sourceMappingURL=index.umd.cjs.map