1/*! For license information please see 2.30aa20fc.chunk.js.LICENSE.txt */ 2(this["webpackJsonpe-com"]=this["webpackJsonpe-com"]||[]).push([[2],[function(t,e,n){"use strict";t.exports=n(40)},function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return i})),n.d(e,"__assign",(function(){return o})),n.d(e,"__rest",(function(){return a})),n.d(e,"__decorate",(function(){return s})),n.d(e,"__param",(function(){return u})),n.d(e,"__metadata",(function(){return c})),n.d(e,"__awaiter",(function(){return l})),n.d(e,"__generator",(function(){return h})),n.d(e,"__createBinding",(function(){return f})),n.d(e,"__exportStar",(function(){return p})),n.d(e,"__values",(function(){return d})),n.d(e,"__read",(function(){return v})),n.d(e,"__spread",(function(){return y})),n.d(e,"__spreadArrays",(function(){return g})),n.d(e,"__await",(function(){return m})),n.d(e,"__asyncGenerator",(function(){return b})),n.d(e,"__asyncDelegator",(function(){return _})),n.d(e,"__asyncValues",(function(){return w})),n.d(e,"__makeTemplateObject",(function(){return E})),n.d(e,"__importStar",(function(){return T})),n.d(e,"__importDefault",(function(){return S})),n.d(e,"__classPrivateFieldGet",(function(){return I})),n.d(e,"__classPrivateFieldSet",(function(){return C}));var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(e){o(e)}}function s(t){try{u(r.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function h(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function f(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}function p(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||(e[n]=t[n])}function d(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(t,e){var n="function"===typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(v(arguments[e]));return t}function g(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function m(t){return this instanceof m?(this.v=t,this):new m(t)}function b(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise((function(n,r){o.push([t,e,n,r])>1||s(t,e)}))})}function s(t,e){try{(n=i[t](e)).value instanceof m?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(r){l(o[0][3],r)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function _(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:m(t[r](e)),done:"return"===r}:i?i(e):e}:i}}function w(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=d(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,i,(e=t[n](e)).done,e.value)}))}}}function E(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function T(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function S(t){return t&&t.__esModule?t:{default:t}}function I(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function C(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return S})),n.d(e,"b",(function(){return _})),n.d(e,"c",(function(){return A})),n.d(e,"d",(function(){return b})),n.d(e,"e",(function(){return T})),n.d(e,"f",(function(){return P}));var r=n(5),i=n(0),o=n.n(i),a=(n(12),n(2)),s=n(22),u=(n(23),n(6));function c(t){var e=t.pathname,n=t.search,r=t.hash,i=e||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function l(t,e,n,r){var i;"string"===typeof t?(i=function(t){var e=t||"/",n="",r="",i=e.indexOf("#");-1!==i&&(r=e.substr(i),e=e.substr(0,i));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(i=Object(a.a)({},t)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==e&&void 0===i.state&&(i.state=e));try{i.pathname=decodeURI(i.pathname)}catch(o){throw o instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invali
2d percent-encoding.'):o}return n&&(i.key=n),r?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=Object(s.a)(i.pathname,r.pathname)):i.pathname=r.pathname:i.pathname||(i.pathname="/"),i}function h(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,i){if(null!=t){var o="function"===typeof t?t(e,n):t;"string"===typeof o?"function"===typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach((function(t){return t.apply(void 0,n)}))}}}"undefined"===typeof window||!window.document||window.document.createElement;function f(t,e,n){return Math.min(Math.max(t,e),n)}function p(t){void 0===t&&(t={});var e=t,n=e.getUserConfirmation,r=e.initialEntries,i=void 0===r?["/"]:r,o=e.initialIndex,s=void 0===o?0:o,u=e.keyLength,p=void 0===u?6:u,d=h();function v(t){Object(a.a)(w,t),w.length=w.entries.length,d.notifyListeners(w.location,w.action)}function y(){return Math.random().toString(36).substr(2,p)}var g=f(s,0,i.length-1),m=i.map((function(t){return l(t,void 0,"string"===typeof t?y():t.key||y())})),b=c;function _(t){var e=f(w.index+t,0,w.entries.length-1),r=w.entries[e];d.confirmTransitionTo(r,"POP",n,(function(t){t?v({action:"POP",location:r,index:e}):v()}))}var w={length:m.length,action:"POP",location:m[g],index:g,entries:m,createHref:b,push:function(t,e){var r=l(t,e,y(),w.location);d.confirmTransitionTo(r,"PUSH",n,(function(t){if(t){var e=w.index+1,n=w.entries.slice(0);n.length>e?n.splice(e,n.length-e,r):n.push(r),v({action:"PUSH",location:r,index:e,entries:n})}}))},replace:function(t,e){var r=l(t,e,y(),w.location);d.confirmTransitionTo(r,"REPLACE",n,(function(t){t&&(w.entries[w.index]=r,v({action:"REPLACE",location:r}))}))},go:_,goBack:function(){_(-1)},goForward:function(){_(1)},canGo:function(t){var e=w.index+t;return e>=0&&e<w.entries.length},block:function(t){return void 0===t&&(t=!1),d.setPrompt(t)},listen:function(t){return d.appendListener(t)}};return w}var d=n(27),v=n(28),y=n.n(v),g=(n(32),n(10)),m=(n(24),function(t){var e=Object(d.a)();return e.displayName=t,e}("Router-History")),b=function(t){var e=Object(d.a)();return e.displayName=t,e}("Router"),_=function(t){function e(e){var n;return(n=t.call(this,e)||this).state={location:e.history.location},n._isMounted=!1,n._pendingLocation=null,e.staticContext||(n.unlisten=e.history.listen((function(t){n._isMounted?n.setState({location:t}):n._pendingLocation=t}))),n}Object(r.a)(e,t),e.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var n=e.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return o.a.createElement(b.Provider,{value:{history:this.props.history,location:this.state.location,match:e.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.a.createElement(m.Provider,{children:this.props.children||null,value:this.props.history}))},e}(o.a.Component);o.a.Component;o.a.Component;var w={},E=0;function T(t,e){void 0===e&&(e={}),("string"===typeof e||Array.isArray(e))&&(e={path:e});var n=e,r=n.path,i=n.exact,o=void 0!==i&&i,a=n.strict,s=void 0!==a&&a,u=n.sensitive,c=void 0!==u&&u;return[].concat(r).reduce((function(e,n){if(!n&&""!==n)return null;if(e)return e;var r=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=w[n]||(w[n]={});if(r[t])return r[t];var i=[],o={regexp:y()(t,i,e),keys:i};return E<1e4&&(r[t]=o,E++),o}(n,{end:o,strict:s,sensitive:c}),i=r.regexp,a=r.keys,u=i.exec(t);if(!u)return null;var l=u[0],h=u.slice(1),f=t===l;return o&&!f?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:f,params:a.reduce((function(t,e,n){return t[e.name]=h[n],t}),{})}}),null)}var S=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.render=function(){var t=this;return o.a.createElement(b.Consumer,null,(function(e){e||Object(u.a)(!1);var n=t.props.location||e.location,r=t.props.computedMatch?t.props.computedMatch:t.props.path?T(n.pathname,t.props):e.match,i=Object(a.a)({},e,{location:n,match:r}),s=t.props,c=s.children,l=s.component,h=s.render;return Array.isArray(c)&&0===c.length&&(c=null),o.a.createElement(b.Provider,{value:i},i.match?c?"function"===typeof c?c(i):c:l?o.a.createElement(l,i):h?h(i):null:"function"===typeof c?c(i):null)}))},e}(o.a.Component);function I(t){return"/"===t.charAt(0)?t:"/"+t}function C(t,e){if(!t)return e;var n=I(t);return 0!==e.pathname.indexOf(n)?e:Object(a.a)({},e,{pathname:e.pathname.substr(n.length)})}function k(t){return"string"===typeof t?t:c(t)}function x(t){return function(){Object(u.a)(!1)}}function N(){}o.a.Component;var A=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.render=function(){var t=this;return o.a.createElement(b.Consumer,null,(function(e){e||Object(u.a)(!1);var n,r,i=t.props.location||e.location;
2return o.a.Children.forEach(t.props.children,(function(t){if(null==r&&o.a.isValidElement(t)){n=t;var s=t.props.path||t.props.from;r=s?T(i.pathname,Object(a.a)({},t.props,{path:s})):e.match}})),r?o.a.cloneElement(n,{location:i,computedMatch:r}):null}))},e}(o.a.Component);var O=o.a.useContext;function P(){return O(m)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i,o=n(1),a=n(9),s=n(7),u=n(15),c=((r={})["no-app"]="No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",r["bad-app-name"]="Illegal App name: '{$appName}",r["duplicate-app"]="Firebase App named '{$appName}' already exists",r["app-deleted"]="Firebase App named '{$appName}' already deleted",r["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",r["invalid-log-argument"]="First argument to `onLog` must be null or a function.",r),l=new a.ErrorFactory("app","Firebase",c),h=((i={})["@firebase/app"]="fire-core",i["@firebase/analytics"]="fire-analytics",i["@firebase/auth"]="fire-auth",i["@firebase/database"]="fire-rtdb",i["@firebase/functions"]="fire-fn",i["@firebase/installations"]="fire-iid",i["@firebase/messaging"]="fire-fcm",i["@firebase/performance"]="fire-perf",i["@firebase/remote-config"]="fire-rc",i["@firebase/storage"]="fire-gcs",i["@firebase/firestore"]="fire-fst",i["fire-js"]="fire-js",i["firebase-wrapper"]="fire-js-all",i),f=new u.Logger("@firebase/app"),p=function(){function t(t,e,n){var r,i,u=this;this.firebase_=n,this.isDeleted_=!1,this.name_=e.name,this.automaticDataCollectionEnabled_=e.automaticDataCollectionEnabled||!1,this.options_=a.deepCopy(t),this.container=new s.ComponentContainer(e.name),this._addComponent(new s.Component("app",(function(){return u}),"PUBLIC"));try{for(var c=o.__values(this.firebase_.INTERNAL.components.values()),l=c.next();!l.done;l=c.next()){var h=l.value;this._addComponent(h)}}catch(f){r={error:f}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}}return Object.defineProperty(t.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(t){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!1,configurable:!0}),t.prototype.delete=function(){var t=this;return new Promise((function(e){t.checkDestroyed_(),e()})).then((function(){return t.firebase_.INTERNAL.removeApp(t.name_),Promise.all(t.container.getProviders().map((function(t){return t.delete()})))})).then((function(){t.isDeleted_=!0}))},t.prototype._getService=function(t,e){return void 0===e&&(e="[DEFAULT]"),this.checkDestroyed_(),this.container.getProvider(t).getImmediate({identifier:e})},t.prototype._removeServiceInstance=function(t,e){void 0===e&&(e="[DEFAULT]"),this.container.getProvider(t).clearInstance(e)},t.prototype._addComponent=function(t){try{this.container.addComponent(t)}catch(e){f.debug("Component "+t.name+" failed to register with FirebaseApp "+this.name,e)}},t.prototype._addOrOverwriteComponent=function(t){this.container.addOrOverwriteComponent(t)},t.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw l.create("app-deleted",{appName:this.name_})},t}();p.prototype.name&&p.prototype.options||p.prototype.delete||console.log("dc");var d=function t(){var e=function(t){var e={},n=new Map,r={__esModule:!0,initializeApp:function(n,i){void 0===i&&(i={});if("object"!==typeof i||null===i){i={name:i}}var o=i;void 0===o.name&&(o.name="[DEFAULT]");var s=o.name;if("string"!==typeof s||!s)throw l.create("bad-app-name",{appName:String(s)});if(a.contains(e,s))throw l.create("duplicate-app",{appName:s});var u=new t(n,o,r);return e[s]=u,u},app:i,registerVersion:function(t,e,n){var r,i=null!==(r=h[t])&&void 0!==r?r:t;n&&(i+="-"+n);var o=i.match(/\s|\//),a=e.match(/\s|\//);if(o||a){var u=['Unable to register library "'+i+'" with version "'+e+'":'];return o&&u.push('library name "'+i+'" contains illegal characters (whitespace or "/")'),o&&a&&u.push("and"),a&&u.push('version name "'+e+'" contains illegal characters (whitespace or "/")'),void f.warn(u.join(" "))}c(new s.Component(i+"-version",(function(){return{library:i,version:e}}),"VERSION"))},setLogLevel:u.setLogLevel,onLog:function(t,e){if(null!==t&&"function"!==typeof t)throw l.create("invalid-log-argument",{appName:name});u.setUserLogHandler(t,e)}
2,apps:null,SDK_VERSION:"7.16.0",INTERNAL:{registerComponent:c,removeApp:function(t){delete e[t]},components:n,useAsService:function(t,e){if("serverAuth"===e)return null;return e}}};function i(t){if(t=t||"[DEFAULT]",!a.contains(e,t))throw l.create("no-app",{appName:t});return e[t]}function c(s){var u,c,h=s.name;if(n.has(h))return f.debug("There were multiple attempts to register component "+h+"."),"PUBLIC"===s.type?r[h]:null;if(n.set(h,s),"PUBLIC"===s.type){var p=function(t){if(void 0===t&&(t=i()),"function"!==typeof t[h])throw l.create("invalid-app-argument",{appName:h});return t[h]()};void 0!==s.serviceProps&&a.deepExtend(p,s.serviceProps),r[h]=p,t.prototype[h]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this._getService.bind(this,h);return n.apply(this,s.multipleInstances?t:[])}}try{for(var d=o.__values(Object.keys(e)),v=d.next();!v.done;v=d.next()){var y=v.value;e[y]._addComponent(s)}}catch(g){u={error:g}}finally{try{v&&!v.done&&(c=d.return)&&c.call(d)}finally{if(u)throw u.error}}return"PUBLIC"===s.type?r[h]:null}return r.default=r,Object.defineProperty(r,"apps",{get:function(){return Object.keys(e).map((function(t){return e[t]}))}}),i.App=t,r}(p);return e.INTERNAL=o.__assign(o.__assign({},e.INTERNAL),{createFirebaseNamespace:t,extendNamespace:function(t){a.deepExtend(e,t)},createSubscribe:a.createSubscribe,ErrorFactory:a.ErrorFactory,deepExtend:a.deepExtend}),e}(),v=function(){function t(t){this.container=t}return t.prototype.getPlatformInfoString=function(){return this.container.getProviders().map((function(t){if(function(t){var e=t.getComponent();return"VERSION"===(null===e||void 0===e?void 0:e.type)}(t)){var e=t.getImmediate();return e.library+"/"+e.version}return null})).filter((function(t){return t})).join(" ")},t}();if(a.isBrowser()&&void 0!==self.firebase){f.warn("\n Warning: Firebase is already defined in the global scope. Please make sure\n Firebase library is only loaded once.\n ");var y=self.firebase.SDK_VERSION;y&&y.indexOf("LITE")>=0&&f.warn("\n Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n ")}var g=d.initializeApp;d.initializeApp=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return a.isNode()&&f.warn('\n Warning: This is a browser-targeted Firebase bundle but it appears it is being\n run in a Node environment. If running in a Node environment, make sure you\n are using the bundle specified by the "main" field in package.json.\n \n If you are using Webpack, you can specify "main" as the first item in\n "resolve.mainFields":\n https://webpack.js.org/configuration/resolve/#resolvemainfields\n \n If using Rollup, use the rollup-plugin-node-resolve plugin and specify "main"\n as the first item in "mainFields", e.g. [\'main\', \'module\'].\n https://github.com/rollup/rollup-plugin-node-resolve\n '),g.apply(void 0,t)};var m=d;!function(t,e){t.INTERNAL.registerComponent(new s.Component("platform-logger",(function(t){return new v(t)}),"PRIVATE")),t.registerVersion("@firebase/app","0.6.8",e),t.registerVersion("fire-js","")}(m),e.default=m,e.firebase=m},function(t,e,n){"use strict";function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";e.a=function(t,e){if(!t)throw new Error("Invariant failed")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(9),o=function(){function t(t,e,n){this.name=t,this.instanceFactory=e,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY"}return t.prototype.setInstantiationMode=function(t){return this.instantiationMode=t,this},t.prototype.setMultipleInstances=function(t){return this.multipleInstances=t,this},t.prototype.setServiceProps=function(t){return this.serviceProps=t,this},t}(),a=function(){function t(t,e){this.name=t,this.container=e,this.component=null,this.instances=new Map,this.instancesDeferred=new Map}return t.prototype.get=function(t){void 0===t&&(t="[DEFAULT]");var e=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(e)){var n=new i.Deferred;this.instancesDeferred.set(e,n);try{var r=this.getOrInitializeService(e);r&&n.resolve(r)}catch(o){}}return this.instancesDeferred.get(e).promise},t.prototype.getImmediate=function(t){var e=r.__assign({identifier:"[DEFAULT]",optional:!1},t),n=e.identifier,i=e.optional,o=this.normalizeInstanceIdentifier(n);try{var a=this.getOrInitializeService(o);if(!a){if(i)return null;throw Error("Service "+this.name+" is not available")}return a}catch(s){if(i)return null;throw s}},t.prototype.getComponent=function(){return this.component},t.prototype.setComponent=function(t){var e,n;if(t.name!==this.name)throw Error("Mismatching Component "+t.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");
2if(this.component=t,function(t){return"EAGER"===t.instantiationMode}(t))try{this.getOrInitializeService("[DEFAULT]")}catch(h){}try{for(var i=r.__values(this.instancesDeferred.entries()),o=i.next();!o.done;o=i.next()){var a=r.__read(o.value,2),s=a[0],u=a[1],c=this.normalizeInstanceIdentifier(s);try{var l=this.getOrInitializeService(c);u.resolve(l)}catch(h){}}}catch(f){e={error:f}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}},t.prototype.clearInstance=function(t){void 0===t&&(t="[DEFAULT]"),this.instancesDeferred.delete(t),this.instances.delete(t)},t.prototype.delete=function(){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(e){switch(e.label){case 0:return t=Array.from(this.instances.values()),[4,Promise.all(t.filter((function(t){return"INTERNAL"in t})).map((function(t){return t.INTERNAL.delete()})))];case 1:return e.sent(),[2]}}))}))},t.prototype.isComponentSet=function(){return null!=this.component},t.prototype.getOrInitializeService=function(t){var e=this.instances.get(t);return!e&&this.component&&(e=this.component.instanceFactory(this.container,function(t){return"[DEFAULT]"===t?void 0:t}(t)),this.instances.set(t,e)),e||null},t.prototype.normalizeInstanceIdentifier=function(t){return this.component?this.component.multipleInstances?t:"[DEFAULT]":t},t}();var s=function(){function t(t){this.name=t,this.providers=new Map}return t.prototype.addComponent=function(t){var e=this.getProvider(t.name);if(e.isComponentSet())throw new Error("Component "+t.name+" has already been registered with "+this.name);e.setComponent(t)},t.prototype.addOrOverwriteComponent=function(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)},t.prototype.getProvider=function(t){if(this.providers.has(t))return this.providers.get(t);var e=new a(t,this);return this.providers.set(t,e),e},t.prototype.getProviders=function(){return Array.from(this.providers.values())},t}();e.Component=o,e.ComponentContainer=s,e.Provider=a},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(21);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(t,e)||Object(r.a)(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},o=function(t,e){if(!t)throw a(e)},a=function(t){return new Error("Firebase Database ("+i.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)},s=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):55296===(64512&i)&&r+1<t.length&&56320===(64512&t.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&t.charCodeAt(++r)),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e},u={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"===typeof atob,encodeByteArray:function(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<t.length;i+=3){var o=t[i],a=i+1<t.length,s=a?t[i+1]:0,u=i+2<t.length,c=u?t[i+2]:0,l=o>>2,h=(3&o)<<4|s>>4,f=(15&s)<<2|c>>6,p=63&c;u||(p=64,a||(f=64)),r.push(n[l],n[h],n[f],n[p])}return r.join("")},encodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(s(t),e)},decodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):function(t){for(var e=[],n=0,r=0;n<t.length;){var i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){var o=t[n++];e[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){var a=((7&i)<<18|(63&(o=t[n++]))<<12|(63&(s=t[n++]))<<6|63&t[n++])-65536;e[r++]=String.fromCharCode(55296+(a>>10)),e[r++]=String.fromCharCode(56320+(1023&a))}else{o=t[n++];var s=t[n++];
2e[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray:function(t,e){this.init_();for(var n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<t.length;){var o=n[t.charAt(i++)],a=i<t.length?n[t.charAt(i)]:0,s=++i<t.length?n[t.charAt(i)]:64,u=++i<t.length?n[t.charAt(i)]:64;if(++i,null==o||null==a||null==s||null==u)throw Error();var c=o<<2|a>>4;if(r.push(c),64!==s){var l=a<<4&240|s>>2;if(r.push(l),64!==u){var h=s<<6&192|u;r.push(h)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},c=function(t){try{return u.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function l(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:return new Date(e.getTime());case Object:void 0===t&&(t={});break;case Array:t=[];break;default:return e}for(var n in e)e.hasOwnProperty(n)&&(t[n]=l(t[n],e[n]));return t}var h=function(){function t(){var t=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))}return t.prototype.wrapCallback=function(t){var e=this;return function(n,r){n?e.reject(n):e.resolve(r),"function"===typeof t&&(e.promise.catch((function(){})),1===t.length?t(n):t(n,r))}},t}();function f(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function p(){try{return"[object process]"===Object.prototype.toString.call(t.process)}catch(e){return!1}}var d=function(t){function e(n,r){var i=t.call(this,r)||this;return i.code=n,i.name="FirebaseError",Object.setPrototypeOf(i,e.prototype),Error.captureStackTrace&&Error.captureStackTrace(i,v.prototype.create),i}return r.__extends(e,t),e}(Error),v=function(){function t(t,e,n){this.service=t,this.serviceName=e,this.errors=n}return t.prototype.create=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=e[0]||{},i=this.service+"/"+t,o=this.errors[t],a=o?y(o,r):"Error",s=this.serviceName+": "+a+" ("+i+").",u=new d(i,s),c=0,l=Object.keys(r);c<l.length;c++){var h=l[c];"_"!==h.slice(-1)&&(h in u&&console.warn('Overwriting FirebaseError base field "'+h+'" can cause unexpected behavior.'),u[h]=r[h])}return u},t}();function y(t,e){return t.replace(g,(function(t,n){var r=e[n];return null!=r?String(r):"<"+n+"?>"}))}var g=/\{\$([^}]+)}/g;function m(t){return JSON.parse(t)}var b=function(t){var e={},n={},r={},i="";try{var o=t.split(".");e=m(c(o[0])||""),n=m(c(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(a){}return{header:e,claims:n,data:r,signature:i}};var _=function(){function t(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var t=1;t<this.blockSize;++t)this.pad_[t]=0;this.reset()}return t.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},t.prototype.compress_=function(t,e){e||(e=0);var n=this.W_;if("string"===typeof t)for(var r=0;r<16;r++)n[r]=t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|t.charCodeAt(e+3),e+=4;else for(r=0;r<16;r++)n[r]=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3],e+=4;for(r=16;r<80;r++){var i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(i<<1|i>>>31)}var o,a,s=this.chain_[0],u=this.chain_[1],c=this.chain_[2],l=this.chain_[3],h=this.chain_[4];for(r=0;r<80;r++){r<40?r<20?(o=l^u&(c^l),a=1518500249):(o=u^c^l,a=1859775393):r<60?(o=u&c|l&(u|c),a=2400959708):(o=u^c^l,a=3395469782);i=(s<<5|s>>>27)+o+h+a+n[r]&4294967295;h=l,l=c,c=4294967295&(u<<30|u>>>2),u=s,s=i}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+u&4294967295,this.chain_[2]=this.chain_[2]+c&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+h&4294967295},t.prototype.update=function(t,e){if(null!=t){void 0===e&&(e=t.length);for(var n=e-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<e;){if(0===o)for(;r<=n;)this.compress_(t,r),r+=this.blockSize;if("string"===typeof t){for(;r<e;)if(i[o]=t.charCodeAt(r),++r,++o===this.blockSize){this.compress_(i),o=0;break}}else for(;r<e;)if(i[o]=t[r],++r,++o===this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=e}},t.prototype.digest=function(){var t=[],e=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&e,e/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var i=24;i>=0;i-=8)t[r]=this.chain_[n]>>i&255,++r;return t},t}();var w=function(){function t(t,e){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Prom
2ise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then((function(){t(n)})).catch((function(t){n.error(t)}))}return t.prototype.next=function(t){this.forEachObserver((function(e){e.next(t)}))},t.prototype.error=function(t){this.forEachObserver((function(e){e.error(t)})),this.close(t)},t.prototype.complete=function(){this.forEachObserver((function(t){t.complete()})),this.close()},t.prototype.subscribe=function(t,e,n){var r,i=this;if(void 0===t&&void 0===e&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(t,e){if("object"!==typeof t||null===t)return!1;for(var n=0,r=e;n<r.length;n++){var i=r[n];if(i in t&&"function"===typeof t[i])return!0}return!1}(t,["next","error","complete"])?t:{next:t,error:e,complete:n}).next&&(r.next=E),void 0===r.error&&(r.error=E),void 0===r.complete&&(r.complete=E);var o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(t){}})),this.observers.push(r),o},t.prototype.unsubscribeOne=function(t){void 0!==this.observers&&void 0!==this.observers[t]&&(delete this.observers[t],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},t.prototype.forEachObserver=function(t){if(!this.finalized)for(var e=0;e<this.observers.length;e++)this.sendOne(e,t)},t.prototype.sendOne=function(t,e){var n=this;this.task.then((function(){if(void 0!==n.observers&&void 0!==n.observers[t])try{e(n.observers[t])}catch(r){"undefined"!==typeof console&&console.error&&console.error(r)}}))},t.prototype.close=function(t){var e=this;this.finalized||(this.finalized=!0,void 0!==t&&(this.finalError=t),this.task.then((function(){e.observers=void 0,e.onNoObservers=void 0})))},t}();function E(){}function T(t,e,n){var r="";switch(e){case 1:r=n?"first":"First";break;case 2:r=n?"second":"Second";break;case 3:r=n?"third":"Third";break;case 4:r=n?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber > 4. Need to update it?")}var i=t+" failed: ";return i+=r+" argument "}e.CONSTANTS=i,e.Deferred=h,e.ErrorFactory=v,e.FirebaseError=d,e.Sha1=_,e.assert=o,e.assertionError=a,e.async=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];Promise.resolve(!0).then((function(){t.apply(void 0,n)})).catch((function(t){e&&e(t)}))}},e.base64=u,e.base64Decode=c,e.base64Encode=function(t){var e=s(t);return u.encodeByteArray(e,!0)},e.contains=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.createSubscribe=function(t,e){var n=new w(t,e);return n.subscribe.bind(n)},e.decode=b,e.deepCopy=function(t){return l(void 0,t)},e.deepExtend=l,e.errorPrefix=T,e.getUA=f,e.isAdmin=function(t){var e=b(t).claims;return"object"===typeof e&&!0===e.admin},e.isBrowser=function(){return"object"===typeof self&&self.self===self},e.isBrowserExtension=function(){var t="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof t&&void 0!==t.id},e.isElectron=function(){return f().indexOf("Electron/")>=0},e.isEmpty=function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0},e.isIE=function(){var t=f();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0},e.isMobileCordova=function(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(f())},e.isNode=p,e.isNodeSdk=function(){return!0===i.NODE_CLIENT||!0===i.NODE_ADMIN},e.isReactNative=function(){return"object"===typeof navigator&&"ReactNative"===navigator.product},e.isSafari=function(){return!p()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")},e.isUWP=function(){return f().indexOf("MSAppHost/")>=0},e.isValidFormat=function(t){var e=b(t).claims;return!!e&&"object"===typeof e&&e.hasOwnProperty("iat")},e.isValidTimestamp=function(t){var e=b(t).claims,n=Math.floor((new Date).getTime()/1e3),r=0,i=0;return"object"===typeof e&&(e.hasOwnProperty("nbf")?r=e.nbf:e.hasOwnProperty("iat")&&(r=e.iat),i=e.hasOwnProperty("exp")?e.exp:r+86400),!!n&&!!r&&!!i&&n>=r&&n<=i},e.issuedAtTime=function(t){var e=b(t).claims;return"object"===typeof e&&e.hasOwnProperty("iat")?e.iat:null},e.jsonEval=m,e.map=function(t,e,n){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=e.call(n,t[i],i,t));return r},e.querystring=function(t){for(var e=[],n=function(t,n){Array.isArray(n)?n.forEac
2h((function(n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))})):e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))},r=0,i=Object.entries(t);r<i.length;r++){var o=i[r];n(o[0],o[1])}return e.length?"&"+e.join("&"):""},e.querystringDecode=function(t){var e={};return t.replace(/^\?/,"").split("&").forEach((function(t){if(t){var n=t.split("=");e[n[0]]=n[1]}})),e},e.safeGet=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0},e.stringLength=function(t){for(var e=0,n=0;n<t.length;n++){var r=t.charCodeAt(n);r<128?e++:r<2048?e+=2:r>=55296&&r<=56319?(e+=4,n++):e+=3}return e},e.stringToByteArray=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);if(i>=55296&&i<=56319){var a=i-55296;r++,o(r<t.length,"Surrogate pair missing trail surrogate."),i=65536+(a<<10)+(t.charCodeAt(r)-56320)}i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):i<65536?(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e},e.stringify=function(t){return JSON.stringify(t)},e.validateArgCount=function(t,e,n,r){var i;if(r<e?i="at least "+e:r>n&&(i=0===n?"none":"no more than "+n),i)throw new Error(t+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")},e.validateCallback=function(t,e,n,r){if((!r||n)&&"function"!==typeof n)throw new Error(T(t,e,r)+"must be a valid function.")},e.validateContextObject=function(t,e,n,r){if((!r||n)&&("object"!==typeof n||null===n))throw new Error(T(t,e,r)+"must be a valid context object.")},e.validateNamespace=function(t,e,n,r){if((!r||n)&&"string"!==typeof n)throw new Error(T(t,e,r)+"must be a valid firebase namespace.")}}).call(this,n(19))},function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}n.d(e,"a",(function(){return r}))},,function(t,e,n){t.exports=n(57)()},function(t,e,n){"use strict";e.a=function(t,e){}},function(t,e,n){!function(t){"use strict";function e(t){return Array.prototype.slice.call(t)}function n(t){return new Promise((function(e,n){t.onsuccess=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function r(t,e,r){var i,o=new Promise((function(o,a){n(i=t[e].apply(t,r)).then(o,a)}));return o.request=i,o}function i(t,e,n){var i=r(t,e,n);return i.then((function(t){if(t)return new l(t,i.request)}))}function o(t,e,n){n.forEach((function(n){Object.defineProperty(t.prototype,n,{get:function(){return this[e][n]},set:function(t){this[e][n]=t}})}))}function a(t,e,n,i){i.forEach((function(i){i in n.prototype&&(t.prototype[i]=function(){return r(this[e],i,arguments)})}))}function s(t,e,n,r){r.forEach((function(r){r in n.prototype&&(t.prototype[r]=function(){return this[e][r].apply(this[e],arguments)})}))}function u(t,e,n,r){r.forEach((function(r){r in n.prototype&&(t.prototype[r]=function(){return i(this[e],r,arguments)})}))}function c(t){this._index=t}function l(t,e){this._cursor=t,this._request=e}function h(t){this._store=t}function f(t){this._tx=t,this.complete=new Promise((function(e,n){t.oncomplete=function(){e()},t.onerror=function(){n(t.error)},t.onabort=function(){n(t.error)}}))}function p(t,e,n){this._db=t,this.oldVersion=e,this.transaction=new f(n)}function d(t){this._db=t}o(c,"_index",["name","keyPath","multiEntry","unique"]),a(c,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),u(c,"_index",IDBIndex,["openCursor","o
2penKeyCursor"]),o(l,"_cursor",["direction","key","primaryKey","value"]),a(l,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach((function(t){t in IDBCursor.prototype&&(l.prototype[t]=function(){var e=this,r=arguments;return Promise.resolve().then((function(){return e._cursor[t].apply(e._cursor,r),n(e._request).then((function(t){if(t)return new l(t,e._request)}))}))})})),h.prototype.createIndex=function(){return new c(this._store.createIndex.apply(this._store,arguments))},h.prototype.index=function(){return new c(this._store.index.apply(this._store,arguments))},o(h,"_store",["name","keyPath","indexNames","autoIncrement"]),a(h,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),u(h,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),s(h,"_store",IDBObjectStore,["deleteIndex"]),f.prototype.objectStore=function(){return new h(this._tx.objectStore.apply(this._tx,arguments))},o(f,"_tx",["objectStoreNames","mode"]),s(f,"_tx",IDBTransaction,["abort"]),p.prototype.createObjectStore=function(){return new h(this._db.createObjectStore.apply(this._db,arguments))},o(p,"_db",["name","version","objectStoreNames"]),s(p,"_db",IDBDatabase,["deleteObjectStore","close"]),d.prototype.transaction=function(){return new f(this._db.transaction.apply(this._db,arguments))},o(d,"_db",["name","version","objectStoreNames"]),s(d,"_db",IDBDatabase,["close"]),["openCursor","o
2penKeyCursor"].forEach((function(t){[h,c].forEach((function(n){t in n.prototype&&(n.prototype[t.replace("open","iterate")]=function(){var n=e(arguments),r=n[n.length-1],i=this._store||this._index,o=i[t].apply(i,n.slice(0,-1));o.onsuccess=function(){r(o.result)}})}))})),[c,h].forEach((function(t){t.prototype.getAll||(t.prototype.getAll=function(t,e){var n=this,r=[];return new Promise((function(i){n.iterateCursor(t,(function(t){t?(r.push(t.value),void 0===e||r.length!=e?t.continue():i(r)):i(r)}))}))})})),t.openDb=function(t,e,n){var i=r(indexedDB,"open",[t,e]),o=i.request;return o&&(o.onupgradeneeded=function(t){n&&n(new p(o.result,t.oldVersion,o.transaction))}),i.then((function(t){return new d(t)}))},t.deleteDb=function(t){return r(indexedDB,"deleteDatabase",[t])},Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,n){"use strict";function r(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var i;n.r(e),n.d(e,"LogLevel",(function(){return o})),n.d(e,"Logger",(function(){return h})),n.d(e,"setLogLevel",(function(){return f})),n.d(e,"setUserLogHandler",(function(){return p}));var o,a=[];!function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"}(o||(o={}));var s={debug:o.DEBUG,verbose:o.VERBOSE,info:o.INFO,warn:o.WARN,error:o.ERROR,silent:o.SILENT},u=o.INFO,c=((i={})[o.DEBUG]="log",i[o.VERBOSE]="log",i[o.INFO]="info",i[o.WARN]="warn",i[o.ERROR]="error",i),l=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(!(e<t.logLevel)){var o=(new Date).toISOString(),a=c[e];if(!a)throw new Error("Attempted to log a message with an invalid logType (value: "+e+")");console[a].apply(console,r(["["+o+"] "+t.name+":"],n))}},h=function(){function t(t){this.name=t,this._logLevel=u,this._logHandler=l,this._userLogHandler=null,a.push(this)}return Object.defineProperty(t.prototype,"logLevel",{get:function(){return this._logLevel},set:function(t){if(!(t in o))throw new TypeError('Invalid value "'+t+'" assigned to `logLevel`');this._logLevel=t},enumerable:!1,configurable:!0}),t.prototype.setLogLevel=function(t){this._logLevel="string"===typeof t?s[t]:t},Object.defineProperty(t.prototype,"logHandler",{get:function(){return this._logHandler},set:function(t){if("function"!==typeof t)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(t){this._userLogHandler=t},enumerable:!1,configurable:!0}),t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.DEBUG],t)),this._logHandler.apply(this,r([this,o.DEBUG],t))},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.VERBOSE],t)),this._logHandler.apply(this,r([this,o.VERBOSE],t))},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.INFO],t)),this._logHandler.apply(this,r([this,o.INFO],t))},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.WARN],t)),this._logHandler.apply(this,r([this,o.WARN],t))},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.ERROR],t)),this._logHandler.apply(this,r([this,o.ERROR],t))},t}();function f(t){a.forEach((function(e){e.setLogLevel(t)}))}function p(t,e){for(var n=function(n){var r=null;e&&e.level&&(r=s[e.level]),n.userLogHandler=null===t?null:function(e,n){for(var i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=i.map((function(t){if(null==t)return null;if("string"===typeof t)return t;if("number"===typeof t||"boolean"===typeof t)return t.toString();if(t instanceof Error)return t.message;try{return JSON.stringify(t)}catch(e){return null}})).filter((function(t){return t})).join(" ");n>=(null!==r&&void 0!==r?r:e.logLevel)&&t({level:o[n].toLowerCase(),message:s,args:i,type:e.name})}},r=0,i=a;r<i.length;r++){n(i[r])}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return k})),n.d(e,"b",(function(){return R}));var r=n(3),i=n(5),o=n(0),a=n.n(o),s=n(2),u=n(22),c=(n(23),n(6));function l(t){return"/"===t.charAt(0)?t:"/"+t}function h(t){return"/"===t.charAt(0)?t.substr(1):t}function f(t,e){return function(t,e){return 0===t.toLowerCase().indexOf(e.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(e.length))}(t,e)?t.substr(e.length):t}function p(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function d(t){var e=t.pathname,n=t.search,r=t.hash,i=e||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function v(t,e,n,r){var i;"string"===typeof t?(i=function(t){var e=t||"/",n="",r="",i=e.indexOf("#");-1!==i&&(r=e.substr(i),e=e.substr(0,i));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(i=Object(s.a)({},t)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==e&&void 0===i.state&&(i.state=e));try{i.pathname=decodeURI(i.pathname)}catch(o){throw o instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invali
2d percent-encoding.'):o}return n&&(i.key=n),r?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=Object(u.a)(i.pathname,r.pathname)):i.pathname=r.pathname:i.pathname||(i.pathname="/"),i}function y(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,i){if(null!=t){var o="function"===typeof t?t(e,n):t;"string"===typeof o?"function"===typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach((function(t){return t.apply(void 0,n)}))}}}var g=!("undefined"===typeof window||!window.document||!window.document.createElement);function m(t,e){e(window.confirm(t))}function b(){try{return window.history.state||{}}catch(t){return{}}}function _(t){void 0===t&&(t={}),g||Object(c.a)(!1);var e=window.history,n=function(){var t=window.navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)}(),r=!(-1===window.navigator.userAgent.indexOf("Trident")),i=t,o=i.forceRefresh,a=void 0!==o&&o,u=i.getUserConfirmation,h=void 0===u?m:u,_=i.keyLength,w=void 0===_?6:_,E=t.basename?p(l(t.basename)):"";function T(t){var e=t||{},n=e.key,r=e.state,i=window.location,o=i.pathname+i.search+i.hash;return E&&(o=f(o,E)),v(o,r,n)}function S(){return Math.random().toString(36).substr(2,w)}var I=y();function C(t){Object(s.a)(F,t),F.length=e.length,I.notifyListeners(F.location,F.action)}function k(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||A(T(t.state))}function x(){A(T(b()))}var N=!1;function A(t){if(N)N=!1,C();else{I.confirmTransitionTo(t,"POP",h,(function(e){e?C({action:"POP",location:t}):function(t){var e=F.location,n=P.indexOf(e.key);-1===n&&(n=0);var r=P.indexOf(t.key);-1===r&&(r=0);var i=n-r;i&&(N=!0,D(i))}(t)}))}}var O=T(b()),P=[O.key];function R(t){return E+d(t)}function D(t){e.go(t)}var L=0;function M(t){1===(L+=t)&&1===t?(window.addEventListener("popstate",k),r&&window.addEventListener("hashchange",x)):0===L&&(window.removeEventListener("popstate",k),r&&window.removeEventListener("hashchange",x))}var j=!1;var F={length:e.length,action:"POP",location:O,createHref:R,push:function(t,r){var i=v(t,r,S(),F.location);I.confirmTransitionTo(i,"PUSH",h,(function(t){if(t){var r=R(i),o=i.key,s=i.state;if(n)if(e.pushState({key:o,state:s},null,r),a)window.location.href=r;else{var u=P.indexOf(F.location.key),c=P.slice(0,u+1);c.push(i.key),P=c,C({action:"PUSH",location:i})}else window.location.href=r}}))},replace:function(t,r){var i=v(t,r,S(),F.location);I.confirmTransitionTo(i,"REPLACE",h,(function(t){if(t){var r=R(i),o=i.key,s=i.state;if(n)if(e.replaceState({key:o,state:s},null,r),a)window.location.replace(r);else{var u=P.indexOf(F.location.key);-1!==u&&(P[u]=i.key),C({action:"REPLACE",location:i})}else window.location.replace(r)}}))},go:D,goBack:function(){D(-1)},goForward:function(){D(1)},block:function(t){void 0===t&&(t=!1);var e=I.setPrompt(t);return j||(M(1),j=!0),function(){return j&&(j=!1,M(-1)),e()}},listen:function(t){var e=I.appendListener(t);return M(1),function(){M(-1),e()}}};return F}var w={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+h(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:h,decodePath:l},slash:{encodePath:l,decodePath:l}};function E(t){var e=t.indexOf("#");return-1===e?t:t.slice(0,e)}function T(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)}function S(t){window.location.replace(E(window.location.href)+"#"+t)}function I(t){void 0===t&&(t={}),g||Object(c.a)(!1);var e=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),t),r=n.getUserConfirmation,i=void 0===r?m:r,o=n.hashType,a=void 0===o?"slash":o,u=t.basename?p(l(t.basename)):"",h=w[a],b=h.encodePath,_=h.decodePath;function I(){var t=_(T());return u&&(t=f(t,u)),v(t)}var C=y();function k(t){Object(s.a)(U,t),U.length=e.length,C.notifyListeners(U.location,U.action)}var x=!1,N=null;function A(){var t,e,n=T(),r=b(n);if(n!==r)S(r);else{var o=I(),a=U.location;if(!x&&(e=o,(t=a).pathname===e.pathname&&t.search===e.search&&t.hash===e.hash))return;if(N===d(o))return;N=null,function(t){if(x)x=!1,k();else{C.confirmTransitionTo(t,"POP",i,(function(e){e?k({action:"POP",location:t}):function(t){var e=U.location,n=D.lastIndexOf(d(e));-1===n&&(n=0);var r=D.lastIndexOf(d(t));-1===r&&(r=0);var i=n-r;i&&(x=!0,L(i))}(t)}))}}(o)}}var O=T(),P=b(O);O!==P&&S(P);var R=I(),D=[d(R)];function L(t){e.go(t)}var M=0;function j(t){1===(M+=t)&&1===t?window.addEventListener("hashchange",A):0===M&&window.removeEventListener("hashchange",A)}var F=!1;var U={length:e.length,action:"POP",location:R,createHref:function(t){var e=document.querySelector("base"),n="";return e&&e.getAttribute("href")&&(n=E(window.location.href)),n+"#"+b(u+d(t))},push:function(t,e){var n=v(t,void 0,void 0,U.location);C.confirmTransitionTo(n,"PUSH",i,(function(t){if(t){var e=d(n),r=b(u+e);if(T()!==r){N=e,function(t){window.location.hash=t}(r);var i=D.lastIndexOf(d(U.location)),o=D.slice(0,i+1);o.push(e),D=o,k({action:"PUSH",location:n})}else k()}}))},replace:function(t,e){var n=v(t,void 0,void 0,U.location);C.confirmTransitionTo(n,"REPLACE",i,(function(t){if(t){var e=d(n),r=b(u+e);T()!==r&&(N=e,S(r));var i=D.indexOf(d(U.location));-1!==i&&(D[i]=e),k({action:"REPLACE",location:n})}}))},go:L,goBack:function(){L(-1)},goForward:function(){L(1)},block:function(t){void 0===t&&(t=!1);var e=C.setPrompt(t);return F||(j(1),F=!0),function(){return F&&(F=!1,j(-1)),e()}},listen:function(t){var e=C.appendListener(t);return j(1),function(){j(-1),e()}}};return U}n(12);var C=n(10),k=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).history=_(e.props),e}return Object(i.a)(e,t),e.prototype.render=function(){return a.a.createElement(r.b,{history:this.history,children:this.props.children})},e}(a.a.Component);a.a.Component;var x=function(t,e){return"function"===typeof t?t(e):t},N=function(t,e){return"string"===typeof t?v(t,null,null,e):t},A=function(t){return t},O=a.a.forwardRef;"undefined"===typeof O&&(O=A);var P=O((function(t,e){var n=t.innerRef,r=t.navigate,i=t.onClick,o=Object(C.a)(t,["innerRef","navigate","onClick"]),u=o.target,c=Object(s.a)({},o,{onClick:function(t){try{i&&i(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||u&&"_self"!==u||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),r())}});return c.ref=A!==O&&e||n,a.a.createElement("a",c)}));var R=O((function(t,e){var n=t.component,i=void 0===n?P:n,o=t.replace,u=t.to,l=t.innerRef,h=Object(C.a)(t,["component","replace","to","innerRef"]);return a.a.createElement(r.d.Consumer,null,(function(t){t||Object(c.a)(!1);var n=t.history,r=N(x(u,t.location),t.location),f=r?n.createHref(r):"",p=Object(s.a)({},h,{href:f,navigate:function(){var e=x(u,t.location);(o?n.replace:n.push)(e)}});return A!==O?p.ref=e||l:p.innerRef=l,a.a.createElement(i,p)}))})),D=function(t){return t},L=a.a.forwardRef;"undefined"===typeof L&&(L=D);L((function(t,e){var n=t["aria-current"],i=void 0===n?"page":n,o=t.activeClassName,u=void 0===o?"active":o,l=t.activeStyle,h=t.className,f=t.exact,p=t.isActive,d=t.location,v=t.sensitive,y=t.strict,g=t.style,m=t.to,b=t.innerRef,_=Object(C.a)(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return a.a.createElement(r.d.Consumer,null,(function(t){t||Object(c.a)(!1);var n=d||t.location,o=N(x(m,n),n),w=o.pathname,E=w&&w.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),T=E?Object(r.e)(n.pathname,{path:E,exact:f,sensitive:v,strict:y}):null,S=!!(p?p(T,n):T),I=S?function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.filter((function(t){return t})).join(" ")}(h,u):h,C=S?Object(s.a)({},g,{},l):g,k=Object(s.a)({"aria-current":S&&i||null,className:I,style:C,to:o},_);return D!==L?k.ref=e||b:k.innerRef=b,a.a.createElement(R,k)}))}))},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
2e%2?i(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}n.d(e,"a",(function(){return o}))},function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,"a",(function(){return r}))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.r(e),n.d(e,"registerInstallations",(function(){return Q}));var r,i=n(4),o=n.n(i),a=n(7),s=n(1),u=n(9),c=n(14),l=((r={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',r["not-registered"]="Firebase Installation is not registered.",r["installation-not-found"]="Firebase Installation not found.",r["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',r["app-offline"]="Could not process request. Application offline.",r["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",r),h=new u.ErrorFactory("installations","Installations",l);function f(t){return t instanceof u.FirebaseError&&t.code.includes("request-failed")}function p(t){return"https://firebaseinstallations.googleapis.com/v1/projects/"+t.projectId+"/installations"}function d(t){return{token:t.token,requestStatus:2,expiresIn:(e=t.expiresIn,Number(e.replace("s","000"))),creationTime:Date.now()};var e}function v(t,e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return[4,e.json()];case 1:return n=i.sent(),r=n.error,[2,h.create("request-failed",{requestName:t,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})]}}))}))}function y(t){var e=t.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function g(t,e){var n=e.refreshToken,r=y(t);return r.append("Authorization",function(t){return"FIS_v2 "+t}(n)),r}function m(t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var e;return Object(s.__generator)(this,(function(n){switch(n.label){case 0:return[4,t()];case 1:return(e=n.sent()).status>=500&&e.status<600?[2,t()]:[2,e]}}))}))}function b(t,e){var n=e.fid;return Object(s.__awaiter)(this,void 0,void 0,(function(){var e,r,i,o,a,u;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return e=p(t),r=y(t),i={fid:n,authVersion:"FIS_v2",appId:t.appId,sdkVersion:"w:0.4.14"},o={method:"POST",headers:r,body:JSON.stringify(i)},[4,m((function(){return fetch(e,o)}))];case 1:return(a=s.sent()).ok?[4,a.json()]:[3,3];case 2:return u=s.sent(),[2,{fid:u.fid||n,registrationStatus:2,refreshToken:u.refreshToken,authToken:d(u.authToken)}];case 3:return[4,v("Create Installation",a)];case 4:throw s.sent()}}))}))}function _(t){return new Promise((function(e){setTimeout(e,t)}))}var w=/^[cdef][\w-]{21}$/;function E(){try{var t=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(t),t[0]=112+t[0]%16;var e=function(t){return(e=t,btoa(String.fromCharCode.apply(String,Object(s.__spread)(e))).replace(/\+/g,"-").replace(/\//g,"_")).substr(0,22);var e}(t);return w.test(e)?e:""}catch(r){return""}}function T(t){return t.appName+"!"+t.appId}var S=new Map;function I(t,e){var n=T(t);C(n,e),function(t,e){var n=x();n&&n.postMessage({key:t,fid:e});N()}(n,e)}function C(t,e){var n,r,i=S.get(t);if(i)try{for(var o=Object(s.__values)(i),a=o.next();!a.done;a=o.next()){(0,a.value)(e)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}var k=null;function x(){return!k&&"BroadcastChannel"in self&&((k=new BroadcastChannel("[Firebase] FID Change")).onmessage=function(t){C(t.data.key,t.data.fid)}),k}function N(){0===S.size&&k&&(k.close(),k=null)}var A="firebase-installations-store",O=null;function P(){return O||(O=Object(c.openDb)("firebase-installations-database",1,(function(t){switch(t.oldVersion){case 0:t.createObjectStore(A)}}))),O}function R(t,e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,a;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return n=T(t),[4,P()];case 1:return r=s.sent(),i=r.transaction(A,"readwrite"),[4,(o=i.objectStore(A)).get(n)];case 2:return a=s.sent(),[4,o.put(e,n)];case 3:return s.sent(),[4,i.complete];case 4:return s.sent(),a&&a.fid===e.fid||I(t,e.fid),[2,e]}}))}))}function D(t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var e,n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return e=T(t),[4,P()];case 1:return n=i.sent(),[4,(r=n.transaction(A,"readwrite")).objectStore(A).delete(e)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function L(t,e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,a,u;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return n=T(t),[4,P()];case 1:return r=s.sent(),i=r.transaction(A,"readwrite"),[4,(o=i.objectStore(A)).get(n)];case 2:return a=s.sent(),void 0!==(u=e(a))?[3,4]:[4,o.delete(n)];case 3:return s.sent(),[3,6];case 4:return[4,o.put(u,n)];case 5:s.sent(),s.label=6;case 6:return[4,i.complete];case 7:return s.sent(),!u||a&&a.fid===u.fid||I(t,u.fid),[2,u]}}))}))}function M(t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var e,n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return[4,L(t,(function(n){var r=function(t){return U(t||{fid:E(),registrationStatus:0})}(n),i=function(t,e){if(0===e.registrationStatus){if(!navigator.onLine){var n=Promise.reject(h.create("app-offline"));return{installationEntry:e,registrationPromise:n}}var r={fid:e.fid,registrationStatus:1,registrationTime:Date.now()},i=function(t,e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,b(t,e)];case 1:return n=i.sent(),[2,R(t,n)];case 2:return f(r=i.sent())&&409===r.serverCode?[4,D(t)]:[3,4];case 3:return i.sent(),[3,6];case 4:return[4,R(t,{fid:e.fid,registrationStatus:0})];case 5:i.sent(),i.label=6;case 6:throw r;case 7:return[2]}}
2))}))}(t,r);return{installationEntry:r,registrationPromise:i}}return 1===e.registrationStatus?{installationEntry:e,registrationPromise:j(t)}:{installationEntry:e}}(t,r);return e=i.registrationPromise,i.installationEntry}))];case 1:return""!==(n=i.sent()).fid?[3,3]:(r={},[4,e]);case 2:return[2,(r.installationEntry=i.sent(),r)];case 3:return[2,{installationEntry:n,registrationPromise:e}]}}))}))}function j(t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var e,n,r,i;return Object(s.__generator)(this,(function(o){switch(o.label){case 0:return[4,F(t)];case 1:e=o.sent(),o.label=2;case 2:return 1!==e.registrationStatus?[3,5]:[4,_(100)];case 3:return o.sent(),[4,F(t)];case 4:return e=o.sent(),[3,2];case 5:return 0!==e.registrationStatus?[3,7]:[4,M(t)];case 6:return n=o.sent(),r=n.installationEntry,(i=n.registrationPromise)?[2,i]:[2,r];case 7:return[2,e]}}))}))}function F(t){return L(t,(function(t){if(!t)throw h.create("installation-not-found");return U(t)}))}function U(t){return 1===(e=t).registrationStatus&&e.registrationTime+1e4<Date.now()?{fid:t.fid,registrationStatus:0}:t;var e}function V(t,e){var n=t.appConfig,r=t.platformLoggerProvider;return Object(s.__awaiter)(this,void 0,void 0,(function(){var t,i,o,a,u,c,l;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return t=function(t,e){var n=e.fid;return p(t)+"/"+n+"/authTokens:generate"}(n,e),i=g(n,e),(o=r.getImmediate({optional:!0}))&&i.append("x-firebase-client",o.getPlatformInfoString()),a={installation:{sdkVersion:"w:0.4.14"}},u={method:"POST",headers:i,body:JSON.stringify(a)},[4,m((function(){return fetch(t,u)}))];case 1:return(c=s.sent()).ok?[4,c.json()]:[3,3];case 2:return l=s.sent(),[2,d(l)];case 3:return[4,v("Generate Auth Token",c)];case 4:throw s.sent()}}))}))}function q(t,e){return void 0===e&&(e=!1),Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i;return Object(s.__generator)(this,(function(o){switch(o.label){case 0:return[4,L(t.appConfig,(function(r){if(!z(r))throw h.create("not-registered");var i=r.authToken;if(!e&&function(t){return 2===t.requestStatus&&!function(t){var e=Date.now();return e<t.creationTime||t.creationTime+t.expiresIn<e+36e5}(t)}(i))return r;if(1===i.requestStatus)return n=function(t,e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return[4,B(t.appConfig)];case 1:n=i.sent(),i.label=2;case 2:return 1!==n.authToken.requestStatus?[3,5]:[4,_(100)];case 3:return i.sent(),[4,B(t.appConfig)];case 4:return n=i.sent(),[3,2];case 5:return 0===(r=n.authToken).requestStatus?[2,q(t,e)]:[2,r]}}))}))}(t,e),r;if(!navigator.onLine)throw h.create("app-offline");var o=function(t){var e={requestStatus:1,requestTime:Date.now()};return Object(s.__assign)(Object(s.__assign)({},t),{authToken:e})}(r);return n=function(t,e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i;return Object(s.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,8]),[4,V(t,e)];case 1:return n=o.sent(),i=Object(s.__assign)(Object(s.__assign)({},e),{authToken:n}),[4,R(t.appConfig,i)];case 2:return o.sent(),[2,n];case 3:return!f(r=o.sent())||401!==r.serverCode&&404!==r.serverCode?[3,5]:[4,D(t.appConfig)];case 4:return o.sent(),[3,7];case 5:return i=Object(s.__assign)(Object(s.__assign)({},e),{authToken:{requestStatus:0}}),[4,R(t.appConfig,i)];case 6:o.sent(),o.label=7;case 7:throw r;case 8:return[2]}}
2))}))}(t,o),o}))];case 1:return r=o.sent(),n?[4,n]:[3,3];case 2:return i=o.sent(),[3,4];case 3:i=r.authToken,o.label=4;case 4:return[2,i]}}))}))}function B(t){return L(t,(function(t){if(!z(t))throw h.create("not-registered");var e,n=t.authToken;return 1===(e=n).requestStatus&&e.requestTime+1e4<Date.now()?Object(s.__assign)(Object(s.__assign)({},t),{authToken:{requestStatus:0}}):t}))}function z(t){return void 0!==t&&2===t.registrationStatus}function W(t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var e;return Object(s.__generator)(this,(function(n){switch(n.label){case 0:return[4,M(t)];case 1:return(e=n.sent().registrationPromise)?[4,e]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))}function H(t,e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o;return Object(s.__generator)(this,(function(a){switch(a.label){case 0:return n=function(t,e){var n=e.fid;return p(t)+"/"+n}(t,e),r=g(t,e),i={method:"DELETE",headers:r},[4,m((function(){return fetch(n,i)}))];case 1:return(o=a.sent()).ok?[3,3]:[4,v("Delete Installation",o)];case 2:throw a.sent();case 3:return[2]}}
2))}))}function K(t,e){var n=t.appConfig;return function(t,e){x();var n=T(t),r=S.get(n);r||(r=new Set,S.set(n,r)),r.add(e)}(n,e),function(){!function(t,e){var n=T(t),r=S.get(n);r&&(r.delete(e),0===r.size&&S.delete(n),N())}(n,e)}}function G(t){return h.create("missing-app-config-values",{valueName:t})}function Q(t){t.INTERNAL.registerComponent(new a.Component("installations",(function(t){var e=t.getProvider("app").getImmediate(),n={appConfig:function(t){var e,n;if(!t||!t.options)throw G("App Configuration");if(!t.name)throw G("App Name");try{for(var r=Object(s.__values)(["projectId","apiKey","appId"]),i=r.next();!i.done;i=r.next()){var o=i.value;if(!t.options[o])throw G(o)}}catch(a){e={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return{appName:t.name,projectId:t.options.projectId,apiKey:t.options.apiKey,appId:t.options.appId}}(e),platformLoggerProvider:t.getProvider("platform-logger")};return{app:e,getId:function(){return function(t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var e,n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return[4,M(t.appConfig)];case 1:return e=i.sent(),n=e.installationEntry,(r=e.registrationPromise)?r.catch(console.error):q(t).catch(console.error),[2,n.fid]}}))}))}(n)},getToken:function(t){return function(t,e){return void 0===e&&(e=!1),Object(s.__awaiter)(this,void 0,void 0,(function(){return Object(s.__generator)(this,(function(n){switch(n.label){case 0:return[4,W(t.appConfig)];case 1:return n.sent(),[4,q(t,e)];case 2:return[2,n.sent().token]}}))}))}(n,t)},delete:function(){return function(t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var e,n;return Object(s.__generator)(this,(function(r){switch(r.label){case 0:return[4,L(e=t.appConfig,(function(t){if(!t||0!==t.registrationStatus)return t}))];case 1:if(!(n=r.sent()))return[3,6];if(1!==n.registrationStatus)return[3,2];throw h.create("delete-pending-registration");case 2:if(2!==n.registrationStatus)return[3,6];if(navigator.onLine)return[3,3];throw h.create("app-offline");case 3:return[4,H(e,n)];case 4:return r.sent(),[4,D(e)];case 5:r.sent(),r.label=6;case 6:return[2]}}
2))}))}(n)},onIdChange:function(t){return K(n,t)}}}),"PUBLIC")),t.registerVersion("@firebase/installations","0.4.14")}Q(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(18);function i(t,e){if(t){if("string"===typeof t)return Object(r.a)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(t,e):void 0}}},function(t,e,n){"use strict";function r(t){return"/"===t.charAt(0)}function i(t,e){for(var n=e,r=n+1,i=t.length;r<i;n+=1,r+=1)t[n]=t[r];t.pop()}e.a=function(t,e){void 0===e&&(e="");var n,o=t&&t.split("/")||[],a=e&&e.split("/")||[],s=t&&r(t),u=e&&r(e),c=s||u;if(t&&r(t)?a=o:o.length&&(a.pop(),a=a.concat(o)),!a.length)return"/";if(a.length){var l=a[a.length-1];n="."===l||".."===l||""===l}else n=!1;for(var h=0,f=a.length;f>=0;f--){var p=a[f];"."===p?i(a,f):".."===p?(i(a,f),h++):h&&(i(a,f),h--)}if(!c)for(;h--;h)a.unshift("..");!c||""===a[0]||a[0]&&r(a[0])||a.unshift("");var d=a.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d}},function(t,e,n){"use strict";function r(t){return t.valueOf?t.valueOf():Object.prototype.valueOf.call(t)}e.a=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every((function(e,r){return t(e,n[r])}));if("object"===typeof e||"object"===typeof n){var i=r(e),o=r(n);return i!==e||o!==n?t(i,o):Object.keys(Object.assign({},e,n)).every((function(r){return t(e[r],n[r])}))}return!1}},function(t,e,n){"use strict";var r=n(32),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(t){return r.isMemo(t)?a:s[t.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!==typeof n){if(d){var i=p(n);i&&i!==d&&t(e,i,r)}var a=l(n);h&&(a=a.concat(h(n)));for(var s=u(e),v=u(n),y=0;y<a.length;++y){var g=a[y];if(!o[g]&&(!r||!r[g])&&(!v||!v[g])&&(!s||!s[g])){var m=f(n,g);try{c(e,g,m)}catch(b){}}}}return e}},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";var r,i=(r=n(4))&&"object"===typeof r&&"default"in r?r.default:r;n(47),n(48),n(49),n(51),n(52),n(53),n(54),n(55),n(56);i.registerVersion("firebase","7.16.1","app");console.warn("\nIt looks like you're using the development build of the Firebase JS SDK.\nWhen deploying Firebase apps to production, it is advisable to only import\nthe individual SDK components you intend to use.\n\nFor the module builds, these are available in the following manner\n(replace <PACKAGE> with the name of a component - i.e. auth, database, etc):\n\nCommonJS Modules:\nconst firebase = require('firebase/app');\nrequire('firebase/<PACKAGE>');\n\nES Modules:\nimport firebase from 'firebase/app';\nimport 'firebase/<PACKAGE>';\n\nTypescript:\nimport * as firebase from 'firebase/app';\nimport 'firebase/<PACKAGE>';\n"),i.registerVersion("firebase","7.16.1"),t.exports=i},function(t,e,n){"use strict";(function(t){var r=n(0),i=n.n(r),o=n(5),a=n(12),s=n.n(a),u="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:{};function c(t){var e=[];return{on:function(t){e.push(t)},off:function(t){e=e.filter((function(e){return e!==t}))},get:function(){return t},set:function(n,r){t=n,e.forEach((function(e){return e(t,r)}))}}}var l=i.a.createContext||function(t,e){var n,i,a="__create-react-context-"+function(){var t="__global_unique_id__";return u[t]=(u[t]||0)+1}()+"__",l=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).emitter=c(e.props.value),e}Object(o.a)(n,t);var r=n.prototype;return r.getChildContext=function(){var t;return(t={})[a]=this.emitter,t},r.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var n,r=this.props.value,i=t.value;((o=r)===(a=i)?0!==o||1/o===1/a:o!==o&&a!==a)?n=0:(n="function"===typeof e?e(r,i):1073741823,0!==(n|=0)&&this.emitter.set(t.value,n))}var o,a},r.render=function(){return this.props.children},n}(r.Component);l.childContextTypes=((n={})[a]=s.a.object.isRequired,n);var h=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={value:t.getValue()},t.onUpdate=function(e,n){0!==((0|t.observedBits)&n)&&t.setState({value:t.getValue()})},t}Object(o.a)(n,e);var r=n.prototype;return r.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=void 0===e||null===e?1073741823:e},r.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=void 0===t||null===t?1073741823:t},r.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},r.getValue=function(){return this.context[a]?this.context[a].get():t},r.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(r.Component);return h.contextTypes=((i={})[a]=s.a.object,i),{Provider:l,Consumer:h}};e.a=l}).call(this,n(19))},function(t,e,n){var r=n(59);t.exports=p,t.exports.parse=o,t.exports.compile=function(t,e){return s(o(t,e),e)},t.exports.tokensToFunction=s,t.exports.tokensToRegExp=f;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(t,e){for(var n,r=[],o=0,a=0,s="",l=e&&e.delimiter||"/";null!=(n=i.exec(t));){var h=n[0],f=n[1],p=n.index;if(s+=t.slice(a,p),a=p+h.length,f)s+=f[1];else{var d=t[a],v=n[2],y=n[3],g=n[4],m=n[5],b=n[6],_=n[7];s&&(r.push(s),s="");var w=null!=v&&null!=d&&d!==v,E="+"===b||"*"===b,T="?"===b||"*"===b,S=n[2]||l,I=g||m;r.push({name:y||o++,prefix:v||"",delimiter:S,optional:T,repeat:E,partial:w,asterisk:!!_,pattern:I?c(I):_?".*":"[^"+u(S)+"]+?"})}}return a<t.length&&(s+=t.substr(a)),s&&r.push(s),r}function a(t){return encodeURI(t).replace(/[\/?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}function s(t,e){for(var n=new Array(t.length),i=0;i<t.length;i++)"object"===typeof t[i]&&(n[i]=new RegExp("^(?:"+t[i].pattern+")$",h(e)));return function(e,i){for(var o="",s=e||{},u=(i||{}).pretty?a:encodeURIComponent,c=0;c<t.length;c++){var l=t[c];if("string"!==typeof l){var h,f=s[l.name];if(null==f){if(l.optional){l.partial&&(o+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(r(f)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(f)+"`");if(0===f.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var p=0;p<f.length;p++){if(h=u(f[p]),!n[c].test(h))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(h)+"`");o+=(0===p?l.prefix:l.delimiter)+h}}else{if(h=l.asterisk?encodeURI(f).replace(/[?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})):u(f),!n[c].test(h))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+h+'"');o+=l.prefix+h}}else o+=l}return o}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function l(t,e){return t.keys=e,t}function h(t){return t&&t.sensitive?"":"i"}function f(t,e,n){r(e)||(n=e||n,e=[]);for(var i=(n=n||{}).strict,o=!1!==n.end,a="",s=0;s<t.length;s++){var c=t[s];if("string"===typeof c)a+=u(c);else{var f=u(c.prefix),p="(?:"+c.pattern+")";e.push(c),c.repeat&&(p+="(?:"+f+p+")*"),a+=p=c.optional?c.partial?f+"("+p+")?":"(?:"+f+"("+p+"))?":f+"("+p+")"}}var d=u(n.delimiter||"/"),v=a.slice(-d.length)===d;
2return i||(a=(v?a.slice(0,-d.length):a)+"(?:"+d+"(?=$))?"),a+=o?"$":i&&v?"":"(?="+d+"|$)",l(new RegExp("^"+a,h(n)),e)}function p(t,e,n){return r(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(t,e)}(t,e):r(t)?function(t,e,n){for(var r=[],i=0;i<t.length;i++)r.push(p(t[i],e,n).source);return l(new RegExp("(?:"+r.join("|")+")",h(n)),e)}(t,e,n):function(t,e,n){return f(o(t,n),e,n)}(t,e,n)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(18);var i=n(21);function o(t){return function(t){if(Array.isArray(t))return Object(r.a)(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||Object(i.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(t,e,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(t,e){for(var n,s,u=a(t),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))i.call(n,l)&&(u[l]=n[l]);if(r){s=r(n);for(var h=0;h<s.length;h++)o.call(n,s[h])&&(u[s[h]]=n[s[h]])}}return u}},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],l=!1,h=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&p())}function p(){if(!l){var t=s(f);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function v(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||l||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";t.exports=n(60)},function(t,e,n){"use strict";var r=n(25);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){var n=o.default.memo(o.default.forwardRef((function(e,n){return o.default.createElement(a.default,(0,i.default)({ref:n},e),t)})));0;return n.muiName=a.default.muiName,n};var i=r(n(61)),o=r(n(0)),a=r(n(69))},function(t,e,n){"use strict";!function t(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}}(),t.exports=n(41)},function(t,e,n){"use strict";var r=n(25);
2Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(0)),o=(0,r(n(33)).default)(i.default.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");e.default=o},function(t,e,n){"use strict";var r=n(25);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(0)),o=(0,r(n(33)).default)(i.default.createElement("path",{d:"M17.21 9l-4.38-6.56c-.19-.28-.51-.42-.83-.42-.32 0-.64.14-.83.43L6.79 9H2c-.55 0-1 .45-1 1 0 .09.01.18.04.27l2.54 9.27c.23.84 1 1.46 1.92 1.46h13c.92 0 1.69-.62 1.93-1.46l2.54-9.27L23 10c0-.55-.45-1-1-1h-4.79zM9 9l3-4.4L15 9H9zm3 8c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}),"ShoppingBasket");e.default=o},function(t,e,n){"use strict";var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=u(n(12)),a=u(n(0)),s=n(67);function u(t){return t&&t.__esModule?t:{default:t}}var c={thousandSeparator:o.default.oneOfType([o.default.string,o.default.oneOf([
2!0])]),thousandSpacing:o.default.oneOf(["2","2s","3","4"]),decimalSeparator:o.default.string,decimalScale:o.default.number,fixedDecimalScale:o.default.bool,displayType:o.default.oneOf(["input","text"]),prefix:o.default.string,suffix:o.default.string,format:o.default.oneOfType([o.default.string,o.default.func]),removeFormatting:o.default.func,mask:o.default.oneOfType([o.default.string,o.default.arrayOf(o.default.string)]),value:o.default.oneOfType([o.default.number,o.default.string]),isNumericString:o.default.bool,customInput:o.default.func,allowNegative:o.default.bool,onValueChange:o.default.func,onKeyDown:o.default.func,onMouseUp:o.default.func,onChange:o.default.func,onFocus:o.default.func,onBlur:o.default.func,type:o.default.oneOf(["text","tel"]),isAllowed:o.default.func,renderText:o.default.func},l={displayType:"input",decimalSeparator:".",thousandSpacing:"3",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,isNumericString:!1,type:"text",onValueChange:s.noop,onChange:s.noop,onKeyDown:s.noop,onMouseUp:s.noop,onFocus:s.noop,onBlur:s.noop,isAllowed:s.returnTrue},h=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));n.validateProps();var r=n.formatValueProp();return n.state={value:r,numAsString:n.removeFormatting(r)},n.onChange=n.onChange.bind(n),n.onKeyDown=n.onKeyDown.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n.onFocus=n.onFocus.bind(n),n.onBlur=n.onBlur.bind(n),n}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"componentDidUpdate",value:function(t){this.updateValueIfRequired(t)}},{key:"updateValueIfRequired",value:function(t){var e=this.props,n=this.state;if(t!==e){this.validateProps();var r=n.value,i=n.numAsString||"",o=void 0===e.value?this.formatNumString(i):this.formatValueProp();o!==r&&this.setState({value:o,numAsString:this.removeFormatting(o)})}}},{key:"getFloatString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=this.getSeparators(),n=e.decimalSeparator,r=this.getNumberRegex(!0),i="-"===t[0];i&&(t=t.replace("-",""));var o=(t=(t.match(r)||[]).join("").replace(n,".")).indexOf(".");return-1!==o&&(t=t.substring(0,o)+"."+t.substring(o+1,t.length).replace(new RegExp((0,s.escapeRegExp)(n),"g"),"")),i&&(t="-"+t),t}},{key:"getNumberRegex",value:function(t,e){var n=this.props,r=n.format,i=n.decimalScale,o=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!o||0===i||e||r?"":"|"+(0,s.escapeRegExp)(o)),t?"g":void 0)}},{key:"getSeparators",value:function(){var t=this.props,e=t.decimalSeparator,n=t.thousandSpacing,r=this.props.thousandSeparator;return!0===r&&(r=","),{decimalSeparator:e,thousandSeparator:r,thousandSpacing:n}}},{key:"getMaskAtIndex",value:function(t){var e=this.props.mask,n=void 0===e?" ":e;return"string"===typeof n?n:n[t]||" "}},{key:"validateProps",value:function(){var t=this.props.mask,e=this.getSeparators(),n=e.decimalSeparator,r=e.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n\n thousandSeparator: "+r+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+n+" (default value for decimalSeparator is .)\n ");if(t&&("string"===t?t:t.toString()).match(/\d/g))throw new Error("\n Mask "+t+" should not contain numeric character;\n ")}},{key:"splitDecimal",value:function(t){var e=this.props.allowNegative,n="-"===t[0],r=n&&e,i=(t=t.replace("-","")).split(".");return{beforeDecimal:i[0],afterDecimal:i[1]||"",hasNagation:n,addNegation:r}}},{key:"setPatchedCaretPosition",value:function(t,e,n){(0,s.setCaretPosition)(t,e),setTimeout((function(){t.value===n&&(0,s.setCaretPosition)(t,e)}),0)}},{key:"correctCaretPosition",value:function(t,e,n){var r=this.props,i=r.prefix,o=r.suffix,a=r.format;if(!a){var u="-"===t[0];return Math.min(Math.max(e,i.length+(u?1:0)),t.length-o.length)}if("function"===typeof a)return e;if("#"===a[e]&&(0,s.charIsNumber)(t[e]))return e;if("#"===a[e-1]&&(0,s.charIsNumber)(t[e-1]))return e;var c=a.indexOf("#"),l=a.lastIndexOf("#");e=Math.min(Math.max(e,c),l+1);
2for(var h=a.substring(e,a.length).indexOf("#"),f=e,p=e+(-1===h?0:h);f>c&&("#"!==a[f]||!(0,s.charIsNumber)(t[f]));)f-=1;return!(0,s.charIsNumber)(t[p])||"left"===n&&e!==c||e-f<p-e?f+1:p}},{key:"getCaretPosition",value:function(t,e,n){var r=this.props.format,i=this.state.value,o=this.getNumberRegex(!0),a=(t.match(o)||[]).join(""),s=(e.match(o)||[]).join(""),u=void 0,c=void 0;for(u=0,c=0;c<n;c++){var l=t[c]||"",h=e[u]||"";if((l.match(o)||l===h)&&("0"!==l||!h.match(o)||"0"===h||a.length===s.length)){for(;l!==e[u]&&u<e.length;)u++;u++}}return"string"!==typeof r||i||(u=e.length),u=this.correctCaretPosition(e,u)}},{key:"removePrefixAndSuffix",value:function(t){var e=this.props,n=e.format,r=e.prefix,i=e.suffix;if(!n&&t){var o="-"===t[0];o&&(t=t.substring(1,t.length));var a=(t=r&&0===t.indexOf(r)?t.substring(r.length,t.length):t).lastIndexOf(i);t=i&&-1!==a&&a===t.length-i.length?t.substring(0,a):t,o&&(t="-"+t)}return t}},{key:"removePatternFormatting",value:function(t){for(var e=this.props.format.split("#").filter((function(t){return""!==t})),n=0,r="",i=0,o=e.length;i<=o;i++){var a=e[i]||"",s=i===o?t.length:t.indexOf(a,n);if(-1===s){r=t;break}r+=t.substring(n,s),n=s+a.length}return(r.match(/\d/g)||[]).join("")}},{key:"removeFormatting",value:function(t){var e=this.props,n=e.format,r=e.removeFormatting;return t?(n?t="string"===typeof n?this.removePatternFormatting(t):"function"===typeof r?r(t):(t.match(/\d/g)||[]).join(""):(t=this.removePrefixAndSuffix(t),t=this.getFloatString(t)),t):t}},{key:"formatWithPattern",value:function(t){for(var e=this.props.format,n=0,r=e.split(""),i=0,o=e.length;i<o;i++)"#"===e[i]&&(r[i]=t[n]||this.getMaskAtIndex(n),n+=1);return r.join("")}},{key:"formatThousand",value:function(t,e,n){var r=void 0;switch(n){case s.thousandGroupSpacing.two:r=/(\d)(?=(\d{2})+(?!\d))/g;break;case s.thousandGroupSpacing.twoScaled:r=/(\d)(?=(((\d{2})+)(\d{1})(?!\d)))/g;break;case s.thousandGroupSpacing.four:r=/(\d)(?=(\d{4})+(?!\d))/g;break;default:r=/(\d)(?=(\d{3})+(?!\d))/g}return t.replace(r,"$1"+e)}},{key:"formatAsNumber",value:function(t){var e=this.props,n=e.decimalScale,r=e.fixedDecimalScale,i=e.prefix,o=e.suffix,a=this.getSeparators(),u=a.thousandSeparator,c=a.decimalSeparator,l=a.thousandSpacing,h=-1!==t.indexOf(".")||n&&r,f=this.splitDecimal(t),p=f.beforeDecimal,d=f.afterDecimal,v=f.addNegation;return void 0!==n&&(d=(0,s.limitToScale)(d,n,r)),u&&(p=this.formatThousand(p,u,l)),i&&(p=i+p),o&&(d+=o),v&&(p="-"+p),t=p+(h&&c||"")+d}},{key:"formatNumString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=this.props.format,n=t;return""===t?n="":"-"!==t||e?n="string"===typeof e?this.formatWithPattern(n):"function"===typeof e?e(n):this.formatAsNumber(n):(n="-",t=""),n}},{key:"formatValueProp",value:function(){var t=this.props,e=t.format,n=t.decimalScale,r=t.fixedDecimalScale,i=this.props,o=i.value,a=i.isNumericString;return void 0===o?"":("number"===typeof o&&(o=o.toString(),a=!0),a&&!e&&"number"===typeof n&&(o=(0,s.roundToPrecision)(o,n,r)),a?this.formatNumString(o):this.formatInput(o))}},{key:"formatNegation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(t),o=r.test(t);return t=t.replace(/-/g,""),i&&!o&&e&&(t="-"+t),t}},{key:"formatInput",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=this.props.format;return e||(t=this.formatNegation(t)),t=this.removeFormatting(t),this.formatNumString(t)}},{key:"isCharacterAFormat",value:function(t,e){var n=this.props,r=n.format,i=n.prefix,o=n.suffix,a=n.decimalScale,s=n.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"===typeof r&&"#"!==r[t]||!(r||!(t<i.length||t>=e.length-o.length||a&&s&&e[t]===u))}},{key:"checkIfFormatGotDeleted",value:function(t,e,n){for(var r=t;r<e;r++)if(this.isCharacterAFormat(r,n))return!0;return!1}},{key:"correctInputValue",value:function(t,e,n){var r=this.props.format,i=this.state.numAsString||"";if(n.length>=e.length||!n.length)return n;var o=t,a=(0,s.splitString)(e,t),u=(0,s.splitString)(n,t),c=a[1].lastIndexOf(u[1]),l=o+(-1!==c?a[1].substring(0,c):"").length;if(this.checkIfFormatGotDeleted(o,l,e)&&(n=e),!r){var h=this.removeFormatting(n),f=this.splitDecimal(h),p=f.beforeDecimal,d=f.afterDecimal,v=f.addNegation;if(h.length<i.length&&""===p&&!parseFloat(d))return v?"-":""}return n}},{key:"onChange",value:function(t){t.persist();var e=t.target,n=e.value,r=this.state,i=this.props,o=i.isAllowed,a=r.value||"",s=Math.max(e.selectionStart,e.selectionEnd);n=this.correctInputValue(s,a,n);var u=this.formatInput(n)||"",c=this.removeFormatting(u),l={formattedValue:u,value:c,floatValue:parseFloat(c)};o(l)||(u=a),e.value=u;var h=this.getCaretPosition(n,u,s);this.setPatchedCaretPosition(e,h,u),u!==a?this.setState({value:u,numAsString:c},(function(){i.onValueChange(l),i.onChange(t)}
2)):i.onChange(t)}},{key:"onBlur",value:function(t){var e=this.props,n=this.state,r=e.format,i=e.onBlur,o=n.numAsString,a=n.value;if(!r){o=(0,s.fixLeadingZero)(o);var u=this.formatNumString(o),c={formattedValue:u,value:o,floatValue:parseFloat(o)};if(u!==a)return t.persist(),void this.setState({value:u,numAsString:o},(function(){e.onValueChange(c),i(t)}))}i(t)}},{key:"onKeyDown",value:function(t){var e=t.target,n=t.key,r=e.selectionEnd,i=e.value,o=e.selectionStart,a=void 0,s=this.props,u=s.decimalScale,c=s.fixedDecimalScale,l=s.prefix,h=s.suffix,f=s.format,p=s.onKeyDown,d=void 0!==u&&c,v=this.getNumberRegex(!1,d),y=new RegExp("-"),g="string"===typeof f;if("ArrowLeft"===n||"Backspace"===n?a=o-1:"ArrowRight"===n?a=o+1:"Delete"===n&&(a=o),void 0!==a&&o===r){var m=a,b=g?f.indexOf("#"):l.length,_=g?f.lastIndexOf("#")+1:i.length-h.length;if("ArrowLeft"===n||"ArrowRight"===n){var w="ArrowLeft"===n?"left":"right";m=this.correctCaretPosition(i,a,w)}else if("Delete"!==n||v.test(i[a])||y.test(i[a])){if("Backspace"===n&&!v.test(i[a])&&!y.test(i[a])){for(;!v.test(i[m-1])&&m>b;)m--;m=this.correctCaretPosition(i,m,"left")}}else for(;!v.test(i[m])&&m<_;)m++;(m!==a||a<b||a>_)&&(t.preventDefault(),this.setPatchedCaretPosition(e,m,i)),t.isUnitTestRun&&this.setPatchedCaretPosition(e,m,i),this.props.onKeyDown(t)}else p(t)}},{key:"onMouseUp",value:function(t){var e=t.target,n=e.selectionStart,r=e.selectionEnd,i=e.value;if(n===r){var o=this.correctCaretPosition(i,n);o!==n&&this.setPatchedCaretPosition(e,o,i)}this.props.onMouseUp(t)}},{key:"onFocus",value:function(t){var e=this;t.persist(),setTimeout((function(){var n=t.target,r=n.selectionStart,i=n.value,o=e.correctCaretPosition(i,r);o!==r&&e.setPatchedCaretPosition(n,o,i),e.props.onFocus(t)}))}},{key:"render",value:function(){var t=this.props,e=t.type,n=t.displayType,i=t.customInput,o=t.renderText,u=this.state.value,l=(0,s.omit)(this.props,c),h=r({},l,{type:e,value:u,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===n)return o?o(u)||null:a.default.createElement("span",l,u);if(i){var f=i;return a.default.createElement(f,h)}return a.default.createElement("input",h)}}]),e}(a.default.Component);h.propTypes=c,h.defaultProps=l,t.exports=h},,,function(t,e,n){"use strict";var r=n(30),i="function"===typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,l=i?Symbol.for("react.provider"):60109,h=i?Symbol.for("react.context"):60110,f=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,d=i?Symbol.for("react.memo"):60115,v=i?Symbol.for("react.lazy"):60116,y="function"===typeof Symbol&&Symbol.iterator;function g(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function _(t,e,n){this.props=t,this.context=e,this.refs=b,this.updater=n||m}function w(){}function E(t,e,n){this.props=t,this.context=e,this.refs=b,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(t,e){if("object"!==typeof t&&"function"!==typeof t&&null!=t)throw Error(g(85));this.updater.enqueueSetState(this,t,e,"setState")},_.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},w.prototype=_.prototype;var T=E.prototype=new w;T.constructor=E,r(T,_.prototype),T.isPureReactComponent=!0;var S={current:null},I=Object.prototype.hasOwnProperty,C={key:!0,ref:!0,__self:!0,__source:!0};function k(t,e,n){var r,i={},a=null,s=null;
vendor: 29,311 bytes, line 2
2if(null!=e)for(r in void 0!==e.ref&&(s=e.ref),void 0!==e.key&&(a=""+e.key),e)I.call(e,r)&&!C.hasOwnProperty(r)&&(i[r]=e[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];i.children=c}if(t&&t.defaultProps)for(r in u=t.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:t,key:a,ref:s,props:i,_owner:S.current}}function x(t){return"object"===typeof t&&null!==t&&t.$$typeof===o}var N=/\/+/g,A=[];function O(t,e,n,r){if(A.length){var i=A.pop();return i.result=t,i.keyPrefix=e,i.func=n,i.context=r,i.count=0,i}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function P(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>A.length&&A.push(t)}function R(t,e,n){return null==t?0:function t(e,n,r,i){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case a:u=!0}}if(u)return r(i,e,""===n?"."+D(e,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(e))for(var c=0;c<e.length;c++){var l=n+D(s=e[c],c);u+=t(s,l,r,i)}else if(null===e||"object"!==typeof e?l=null:l="function"===typeof(l=y&&e[y]||e["@@iterator"])?l:null,"function"===typeof l)for(e=l.call(e),c=0;!(s=e.next()).done;)u+=t(s=s.value,l=n+D(s,c++),r,i);else if("object"===s)throw r=""+e,Error(g(31,"[object Object]"===r?"object with keys {"+Object.keys(e).join(", ")+"}":r,""));return u}(t,"",e,n)}function D(t,e){return"object"===typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,(function(t){return e[t]}))}(t.key):e.toString(36)}function L(t,e){t.func.call(t.context,e,t.count++)}function M(t,e,n){var r=t.result,i=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?j(t,r,n,(function(t){return t})):null!=t&&(x(t)&&(t=function(t,e){return{$$typeof:o,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,i+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(N,"$&/")+"/")+n)),r.push(t))}function j(t,e,n,r,i){var o="";null!=n&&(o=(""+n).replace(N,"$&/")+"/"),R(t,M,e=O(e,o,r,i)),P(e)}var F={current:null};function U(){var t=F.current;if(null===t)throw Error(g(321));return t}var V={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:S,IsSomeRendererActing:{current:!1},assign:r};e.Children={map:function(t,e,n){if(null==t)return t;var r=[];return j(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;R(t,L,e=O(null,null,e,n)),P(e)},count:function(t){return R(t,(function(){return null}),null)},toArray:function(t){var e=[];return j(t,e,null,(function(t){return t})),e},only:function(t){if(!x(t))throw Error(g(143));return t}},e.Component=_,e.Fragment=s,e.Profiler=c,e.PureComponent=E,e.StrictMode=u,e.Suspense=p,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=V,e.cloneElement=function(t,e,n){if(null===t||void 0===t)throw Error(g(267,t));var i=r({},t.props),a=t.key,s=t.ref,u=t._owner;if(null!=e){if(void 0!==e.ref&&(s=e.ref,u=S.current),void 0!==e.key&&(a=""+e.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(l in e)I.call(e,l)&&!C.hasOwnProperty(l)&&(i[l]=void 0===e[l]&&void 0!==c?c[l]:e[l])}var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){c=Array(l);for(var h=0;h<l;h++)c[h]=arguments[h+2];i.children=c}return{$$typeof:o,type:t.type,key:a,ref:s,props:i,_owner:u}},e.createContext=function(t,e){return void 0===e&&(e=null),(t={$$typeof:h,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:t},t.Consumer=t},e.createElement=k,e.createFactory=function(t){var e=k.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:f,render:t}},e.isValidElement=x,e.lazy=function(t){return{$$typeof:v,_ctor:t,_status:-1,_result:null}},e.memo=function(t,e){return{$$typeof:d,type:t,compare:void 0===e?null:e}},e.useCallback=function(t,e){return U().useCallback(t,e)},e.useContext=function(t,e){return U().useContext(t,e)},e.useDebugValue=function(){},e.useEffect=function(t,e){return U().useEffect(t,e)},e.useImperativeHandle=function(t,e,n){return U().useImperativeHandle(t,e,n)},e.useLayoutEffect=function(t,e){return U().useLayoutEffect(t,e)},e.useMemo=function(t,e){return U().useMemo(t,e)},e.useReducer=function(t,e,n){return U().useReducer(t,e,n)},e.useRef=function(t){return U().useRef(t)},e.useState=function(t){return U().useState(t)},e.version="16.13.1"},function(t,e,n){"use strict";var r=n(0),i=n(30),o=n(42);function a(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function s(t,e,n,r,i,o,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(l){this.onError(l)}}var u=!1,c=null,l=!1,h=null,f={onError:function(t){u=!0,c=t}};function p(t,e,n,r,i,o,a,l,h){u=!1,c=null,s.apply(f,arguments)}var d=null,v=null,y=null;function g(t,e,n){var r=t.type||"unknown-event";t.currentTarget=y(n),function(t,e,n,r,i,o,s,f,d){if(p.apply(this,arguments),u){if(!u)throw Error(a(198));var v=c;u=!1,c=null,l||(l=!0,h=v)}}(r,e,void 0,t),t.currentTarget=null}var m=null,b={};function _(){if(m)for(var t in b){var e=b[t],n=m.indexOf(t);if(!(-1<n))throw Error(a(96,t));if(!E[n]){if(!e.extractEvents)throw Error(a(97,t));for(var r in E[n]=e,n=e.eventTypes){var i=void 0,o=n[r],s=e,u=r;if(T.hasOwnProperty(u))throw Error(a(99,u));T[u]=o;var c=o.phasedRegistrationNames;if(c){for(i in c)c.hasOwnProperty(i)&&w(c[i],s,u);i=!0}else o.registrationName?(w(o.registrationName,s,u),i=!0):i=!1;if(!i)throw Error(a(98,r,t))}}}}function w(t,e,n){if(S[t])throw Error(a(100,t));S[t]=e,I[t]=e.eventTypes[n].dependencies}var E=[],T={},S={},I={};function C(t){var e,n=!1;for(e in t)if(t.hasOwnProperty(e)){var r=t[e];if(!b.hasOwnProperty(e)||b[e]!==r){if(b[e])throw Error(a(102,e));b[e]=r,n=!0}}n&&_()}var k=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),x=null,N=null,A=null;function O(t){if(t=v(t)){if("function"!==typeof x)throw Error(a(280));var e=t.stateNode;e&&(e=d(e),x(t.stateNode,t.type,e))}}function P(t){N?A?A.push(t):A=[t]:N=t}function R(){if(N){var t=N,e=A;if(A=N=null,O(t),e)for(t=0;t<e.length;t++)O(e[t])}}function D(t,e){return t(e)}function L(t,e,n,r,i){return t(e,n,r,i)}function M(){}var j=D,F=!1,U=!1;function V(){null===N&&null===A||(M(),R())}function q(t,e,n){if(U)return t(e,n);U=!0;try{return j(t,e,n)}finally{U=!1,V()}}var B=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,z=Object.prototype.hasOwnProperty,W={},H={};function K(t,e,n,r,i,o){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o}var G={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(t){G[t]=new K(t,0,!1,t,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(t){var e=t[0];G[e]=new K(e,1,!1,t[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(t){G[t]=new K(t,2,!1,t.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(t){G[t]=new K(t,2,!1,t,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(t){G[t]=new K(t,3,!1,t.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(t){G[t]=new K(t,3,!0,t,null,!1)})),["capture","download"].forEach((function(t){G[t]=new K(t,4,!1,t,null,!1)})),["cols","rows","size","span"].forEach((function(t){G[t]=new K(t,6,!1,t,null,!1)})),["rowSpan","start"].forEach((function(t){G[t]=new K(t,5,!1,t.toLowerCase(),null,!1)}));var Q=/[\-:]([a-z])/g;function $(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(t){var e=t.replace(Q,$);G[e]=new K(e,1,!1,t,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(t){var e=t.replace(Q,$);G[e]=new K(e,1,!1,t,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(t){var e=t.replace(Q,$);G[e]=new K(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(t){G[t]=new K(t,1,!1,t.toLowerCase(),null,!1)})),G.xlinkHref=new K("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(t){G[t]=new K(t,1,!1,t.toLowerCase(),null,!0)}));var X=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Y(t,e,n,r){var i=G.hasOwnProperty(e)?G[e]:null;(null!==i?0===i.type:!r&&(2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])))||(function(t,e,n,r){if(null===e||"undefined"===typeof e||function(t,e,n,r){if(null!==n&&0===n.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}(t,e,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(e,n,i,r)&&(n=null),r||null===i?function(t){return!!z.call(H,t)||!z.call(W,t)&&(B.test(t)?H[t]=!0:(W[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=null===n?3!==i.type&&"":n:(e=i.attributeName,r=i.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}X.hasOwnProperty("ReactCurrentDispatcher")||(X.ReactCurrentDispatcher={current:null}),X.hasOwnProperty("ReactCurrentBatchConfig")||(X.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\/]/,Z="function"===typeof Symbol&&Symbol.for,tt=Z?Symbol.for("react.element"):60103,et=Z?Symbol.for("react.portal"):60106,nt=Z?Symbol.for("react.fragment"):60107,rt=Z?Symbol.for("react.strict_mode"):60108,it=Z?Symbol.for("react.profiler"):60114,ot=Z?Symbol.for("react.provider"):60109,at=Z?Symbol.for("react.context"):60110,st=Z?Symbol.for("react.concurrent_mode"):60111,ut=Z?Symbol.for("react.forward_ref"):60112,ct=Z?Symbol.for("react.suspense"):60113,lt=Z?Symbol.for("react.suspense_list"):60120,ht=Z?Symbol.for("react.memo"):60115,ft=Z?Symbol.for("react.lazy"):60116,pt=Z?Symbol.for("react.block"):60121,dt="function"===typeof Symbol&&Symbol.iterator;function vt(t){return null===t||"object"!==typeof t?null:"function"===typeof(t=dt&&t[dt]||t["@@iterator"])?t:null}function yt(t){if(null==t)return null;if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t;switch(t){case nt:return"Fragment";case et:return"Portal";case it:return"Profiler";case rt:return"StrictMode";case ct:return"Suspense";case lt:return"SuspenseList"}if("object"===typeof t)switch(t.$$typeof){case at:return"Context.Consumer";case ot:return"Context.Provider";case ut:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case ht:return yt(t.type);case pt:return yt(t.render);case ft:if(t=1===t._status?t._result:null)return yt(t)}return null}function gt(t){var e="";do{t:switch(t.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break t;default:var r=t._debugOwner,i=t._debugSource,o=yt(t.type);n=null,r&&(n=yt(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(J,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n in "+(r||"Unknown")+o}e+=n,t=t.return}while(t);return e}function mt(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function bt(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function _t(t){t._valueTracker||(t._valueTracker=function(t){var e=bt(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){r=""+t,o.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function wt(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=bt(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}function Et(t,e){var n=e.checked;return i({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function Tt(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=mt(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function St(t,e){null!=(e=e.checked)&&Y(t,"checked",e,!1)}function It(t,e){St(t,e);var n=mt(e.value),r=e.type;if(null!=n)"number"===r?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if("submit"===r||"reset"===r)return void t.removeAttribute("value");e.hasOwnProperty("value")?kt(t,e.type,n):e.hasOwnProperty("defaultValue")&&kt(t,e.type,mt(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function Ct(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!("submit"!==r&&"reset"!==r||void 0!==e.value&&null!==e.value))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,""!==n&&(t.name=n)}function kt(t,e,n){"number"===e&&t.ownerDocument.activeElement===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}function xt(t,e){return t=i({children:void 0},e),(e=function(t){var e="";return r.Children.forEach(t,(function(t){null!=t&&(e+=t)})),e}(e.children))&&(t.children=e),t}function Nt(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+mt(n),e=null,i=0;i<t.length;i++){if(t[i].value===n)return t[i].selected=!0,void(r&&(t[i].defaultSelected=!0));null!==e||t[i].disabled||(e=t[i])}null!==e&&(e.selected=!0)}}function At(t,e){if(null!=e.dangerouslySetInnerHTML)throw Error(a(91));return i({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Ot(t,e){var n=e.value;if(null==n){if(n=e.children,e=e.defaultValue,null!=n){if(null!=e)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}e=n}null==e&&(e=""),n=e}t._wrapperState={initialValue:mt(n)}}function Pt(t,e){var n=mt(e.value),r=mt(e.defaultValue);null!=n&&((n=""+n)!==t.value&&(t.value=n),null==e.defaultValue&&t.defaultValue!==n&&(t.defaultValue=n)),null!=r&&(t.defaultValue=""+r)}function Rt(t){var e=t.textContent;e===t._wrapperState.initialValue&&""!==e&&null!==e&&(t.value=e)}var Dt="http://www.w3.org/1999/xhtml",Lt="http://www.w3.org/2000/svg";function Mt(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function jt(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?Mt(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var Ft,Ut=function(t){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction((function(){return t(e,n)}))}:t}((function(t,e){if(t.namespaceURI!==Lt||"innerHTML"in t)t.innerHTML=e;else{for((Ft=Ft||document.createElement("div")).innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Ft.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}}));function Vt(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}function qt(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Bt={animationend:qt("Animation","AnimationEnd"),animationiteration:qt("Animation","AnimationIteration"),animationstart:qt("Animation","AnimationStart"),transitionend:qt("Transition","TransitionEnd")},zt={},Wt={};function Ht(t){if(zt[t])return zt[t];if(!Bt[t])return t;var e,n=Bt[t];for(e in n)if(n.hasOwnProperty(e)&&e in Wt)return zt[t]=n[e];return t}k&&(Wt=document.createElement("div").style,"AnimationEvent"in window||(delete Bt.animationend.animation,delete Bt.animationiteration.animation,delete Bt.animationstart.animation),"TransitionEvent"in window||delete Bt.transitionend.transition);var Kt=Ht("animationend"),Gt=Ht("animationiteration"),Qt=Ht("animationstart"),$t=Ht("transitionend"),Xt="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Yt=new("function"===typeof WeakMap?WeakMap:Map);function Jt(t){var e=Yt.get(t);return void 0===e&&(e=new Map,Yt.set(t,e)),e}function Zt(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do{0!==(1026&(e=t).effectTag)&&(n=e.return),t=e.return}while(t)}return 3===e.tag?n:null}function te(t){if(13===t.tag){var e=t.memoizedState;if(null===e&&(null!==(t=t.alternate)&&(e=t.memoizedState)),null!==e)return e.dehydrated}return null}function ee(t){if(Zt(t)!==t)throw Error(a(188))}function ne(t){if(!(t=function(t){var e=t.alternate;if(!e){if(null===(e=Zt(t)))throw Error(a(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return ee(i),t;if(o===r)return ee(i),e;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?t:e}(t)))return null;for(var e=t;;){if(5===e.tag||6===e.tag)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}function re(t,e){if(null==e)throw Error(a(30));return null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}function ie(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}var oe=null;function ae(t){if(t){var e=t._dispatchListeners,n=t._dispatchInstances;if(Array.isArray(e))for(var r=0;r<e.length&&!t.isPropagationStopped();r++)g(t,e[r],n[r]);else e&&g(t,e,n);t._dispatchListeners=null,t._dispatchInstances=null,t.isPersistent()||t.constructor.release(t)}}function se(t){if(null!==t&&(oe=re(oe,t)),t=oe,oe=null,t){if(ie(t,ae),oe)throw Error(a(95));if(l)throw t=h,l=!1,h=null,t}}function ue(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}function ce(t){if(!k)return!1;var e=(t="on"+t)in document;return e||((e=document.createElement("div")).setAttribute(t,"return;"),e="function"===typeof e[t]),e}var le=[];function he(t){t.topLevelType=null,t.nativeEvent=null,t.targetInst=null,t.ancestors.length=0,10>le.length&&le.push(t)}function fe(t,e,n,r){if(le.length){var i=le.pop();return i.topLevelType=t,i.eventSystemFlags=r,i.nativeEvent=e,i.targetInst=n,i}return{topLevelType:t,eventSystemFlags:r,nativeEvent:e,targetInst:n,ancestors:[]}}function pe(t){var e=t.targetInst,n=e;do{if(!n){t.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(e=n.tag)&&6!==e||t.ancestors.push(n),n=kn(r)}while(n);for(n=0;n<t.ancestors.length;n++){e=t.ancestors[n];var i=ue(t.nativeEvent);r=t.topLevelType;var o=t.nativeEvent,a=t.eventSystemFlags;0===n&&(a|=64);for(var s=null,u=0;u<E.length;u++){var c=E[u];c&&(c=c.extractEvents(r,e,o,i,a))&&(s=re(s,c))}se(s)}}function de(t,e,n){if(!n.has(t)){switch(t){case"scroll":Qe(e,"scroll",!0);break;case"focus":case"blur":Qe(e,"focus",!0),Qe(e,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":ce(t)&&Qe(e,t,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Xt.indexOf(t)&&Ge(t,e)}n.set(t,null)}}var ve,ye,ge,me=!1,be=[],_e=null,we=null,Ee=null,Te=new Map,Se=new Map,Ie=[],Ce="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),ke="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function xe(t,e,n,r,i){return{blockedOn:t,topLevelType:e,eventSystemFlags:32|n,nativeEvent:i,container:r}}function Ne(t,e){switch(t){case"focus":case"blur":_e=null;break;case"dragenter":case"dragleave":we=null;break;case"mouseover":case"mouseout":Ee=null;break;case"pointerover":case"pointerout":Te.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Se.delete(e.pointerId)}}function Ae(t,e,n,r,i,o){return null===t||t.nativeEvent!==o?(t=xe(e,n,r,i,o),null!==e&&(null!==(e=xn(e))&&ye(e)),t):(t.eventSystemFlags|=r,t)}function Oe(t){var e=kn(t.target);if(null!==e){var n=Zt(e);if(null!==n)if(13===(e=n.tag)){if(null!==(e=te(n)))return t.blockedOn=e,void o.unstable_runWithPriority(t.priority,(function(){ge(n)}))}else if(3===e&&n.stateNode.hydrate)return void(t.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}t.blockedOn=null}function Pe(t){if(null!==t.blockedOn)return!1;var e=Je(t.topLevelType,t.eventSystemFlags,t.container,t.nativeEvent);if(null!==e){var n=xn(e);return null!==n&&ye(n),t.blockedOn=e,!1}return!0}function Re(t,e,n){Pe(t)&&n.delete(e)}function De(){for(me=!1;0<be.length;){var t=be[0];if(null!==t.blockedOn){null!==(t=xn(t.blockedOn))&&ve(t);break}var e=Je(t.topLevelType,t.eventSystemFlags,t.container,t.nativeEvent);null!==e?t.blockedOn=e:be.shift()}null!==_e&&Pe(_e)&&(_e=null),null!==we&&Pe(we)&&(we=null),null!==Ee&&Pe(Ee)&&(Ee=null),Te.forEach(Re),Se.forEach(Re)}function Le(t,e){t.blockedOn===e&&(t.blockedOn=null,me||(me=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,De)))}function Me(t){function e(e){return Le(e,t)}if(0<be.length){Le(be[0],t);for(var n=1;n<be.length;n++){var r=be[n];r.blockedOn===t&&(r.blockedOn=null)}}for(null!==_e&&Le(_e,t),null!==we&&Le(we,t),null!==Ee&&Le(Ee,t),Te.forEach(e),Se.forEach(e),n=0;n<Ie.length;n++)(r=Ie[n]).blockedOn===t&&(r.blockedOn=null);for(;0<Ie.length&&null===(n=Ie[0]).blockedOn;)Oe(n),null===n.blockedOn&&Ie.shift()}var je={},Fe=new Map,Ue=new Map,Ve=["abort","abort",Kt,"animationEnd",Gt,"animationIteration",Qt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",$t,"transitionEnd","waiting","waiting"];function qe(t,e){for(var n=0;n<t.length;n+=2){var r=t[n],i=t[n+1],o="on"+(i[0].toUpperCase()+i.slice(1));o={phasedRegistrationNames:{bubbled:o,captured:o+"Capture"},dependencies:[r],eventPriority:e},Ue.set(r,e),Fe.set(r,o),je[i]=o}}qe("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),qe("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),qe(Ve,2);for(var Be="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),ze=0;ze<Be.length;ze++)Ue.set(Be[ze],0);var We=o.unstable_UserBlockingPriority,He=o.unstable_runWithPriority,Ke=!0;function Ge(t,e){Qe(e,t,!1)}function Qe(t,e,n){var r=Ue.get(e);switch(void 0===r?2:r){case 0:r=$e.bind(null,e,1,t);break;case 1:r=Xe.bind(null,e,1,t);break;default:r=Ye.bind(null,e,1,t)}n?t.addEventListener(e,r,!0):t.addEventListener(e,r,!1)}function $e(t,e,n,r){F||M();var i=Ye,o=F;F=!0;try{L(i,t,e,n,r)}finally{(F=o)||V()}}function Xe(t,e,n,r){He(We,Ye.bind(null,t,e,n,r))}function Ye(t,e,n,r){if(Ke)if(0<be.length&&-1<Ce.indexOf(t))t=xe(null,t,e,n,r),be.push(t);else{var i=Je(t,e,n,r);if(null===i)Ne(t,r);else if(-1<Ce.indexOf(t))t=xe(i,t,e,n,r),be.push(t);else if(!function(t,e,n,r,i){switch(e){case"focus":return _e=Ae(_e,t,e,n,r,i),!0;case"dragenter":return we=Ae(we,t,e,n,r,i),!0;case"mouseover":return Ee=Ae(Ee,t,e,n,r,i),!0;case"pointerover":var o=i.pointerId;return Te.set(o,Ae(Te.get(o)||null,t,e,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Se.set(o,Ae(Se.get(o)||null,t,e,n,r,i)),!0}return!1}(i,t,e,n,r)){Ne(t,r),t=fe(t,r,null,e);try{q(pe,t)}finally{he(t)}}}}function Je(t,e,n,r){if(null!==(n=kn(n=ue(r)))){var i=Zt(n);if(null===i)n=null;else{var o=i.tag;if(13===o){if(null!==(n=te(i)))return n;n=null}else if(3===o){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}t=fe(t,r,n,e);try{q(pe,t)}finally{he(t)}return null}var Ze={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},tn=["Webkit","ms","Moz","O"];function en(t,e,n){return null==e||"boolean"===typeof e||""===e?"":n||"number"!==typeof e||0===e||Ze.hasOwnProperty(t)&&Ze[t]?(""+e).trim():e+"px"}function nn(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=en(n,e[n],r);"float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}
2Object.keys(Ze).forEach((function(t){tn.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Ze[e]=Ze[t]}))}));var rn=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function on(t,e){if(e){if(rn[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML))throw Error(a(137,t,""));if(null!=e.dangerouslySetInnerHTML){if(null!=e.children)throw Error(a(60));if("object"!==typeof e.dangerouslySetInnerHTML||!("__html"in e.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=e.style&&"object"!==typeof e.style)throw Error(a(62,""))}}function an(t,e){if(-1===t.indexOf("-"))return"string"===typeof e.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sn=Dt;function un(t,e){var n=Jt(t=9===t.nodeType||11===t.nodeType?t:t.ownerDocument);e=I[e];for(var r=0;r<e.length;r++)de(e[r],t,n)}function cn(){}function ln(t){if("undefined"===typeof(t=t||("undefined"!==typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function hn(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function fn(t,e){var n,r=hn(t);for(t=0;r;){if(3===r.nodeType){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=hn(r)}}function pn(){for(var t=window,e=ln();e instanceof t.HTMLIFrameElement;){try{var n="string"===typeof e.contentWindow.location.href}catch(r){n=!1}if(!n)break;e=ln((t=e.contentWindow).document)}return e}function dn(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}var vn=null,yn=null;function gn(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function mn(t,e){return"textarea"===t||"option"===t||"noscript"===t||"string"===typeof e.children||"number"===typeof e.children||"object"===typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&null!=e.dangerouslySetInnerHTML.__html}var bn="function"===typeof setTimeout?setTimeout:void 0,_n="function"===typeof clearTimeout?clearTimeout:void 0;function wn(t){for(;null!=t;t=t.nextSibling){var e=t.nodeType;if(1===e||3===e)break}return t}function En(t){t=t.previousSibling;for(var e=0;t;){if(8===t.nodeType){var n=t.data;if("$"===n||"$!"===n||"$?"===n){if(0===e)return t;e--}else"/$"===n&&e++}t=t.previousSibling}return null}var Tn=Math.random().toString(36).slice(2),Sn="__reactInternalInstance$"+Tn,In="__reactEventHandlers$"+Tn,Cn="__reactContainere$"+Tn;function kn(t){var e=t[Sn];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Cn]||n[Sn]){if(n=e.alternate,null!==e.child||null!==n&&null!==n.child)for(t=En(t);null!==t;){if(n=t[Sn])return n;t=En(t)}return e}n=(t=n).parentNode}return null}function xn(t){return!(t=t[Sn]||t[Cn])||5!==t.tag&&6!==t.tag&&13!==t.tag&&3!==t.tag?null:t}function Nn(t){if(5===t.tag||6===t.tag)return t.stateNode;throw Error(a(33))}function An(t){return t[In]||null}function On(t){do{t=t.return}while(t&&5!==t.tag);return t||null}function Pn(t,e){var n=t.stateNode;if(!n)return null;var r=d(n);if(!r)return null;n=r[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!r;break t;default:t=!1}if(t)return null;if(n&&"function"!==typeof n)throw Error(a(231,e,typeof n));return n}
vendor: 3,018 bytes, line 2
2function Rn(t,e,n){(e=Pn(t,n.dispatchConfig.phasedRegistrationNames[e]))&&(n._dispatchListeners=re(n._dispatchListeners,e),n._dispatchInstances=re(n._dispatchInstances,t))}function Dn(t){if(t&&t.dispatchConfig.phasedRegistrationNames){for(var e=t._targetInst,n=[];e;)n.push(e),e=On(e);for(e=n.length;0<e--;)Rn(n[e],"captured",t);for(e=0;e<n.length;e++)Rn(n[e],"bubbled",t)}}function Ln(t,e,n){t&&n&&n.dispatchConfig.registrationName&&(e=Pn(t,n.dispatchConfig.registrationName))&&(n._dispatchListeners=re(n._dispatchListeners,e),n._dispatchInstances=re(n._dispatchInstances,t))}function Mn(t){t&&t.dispatchConfig.registrationName&&Ln(t._targetInst,null,t)}function jn(t){ie(t,Dn)}var Fn=null,Un=null,Vn=null;function qn(){if(Vn)return Vn;var t,e,n=Un,r=n.length,i="value"in Fn?Fn.value:Fn.textContent,o=i.length;for(t=0;t<r&&n[t]===i[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===i[o-e];e++);return Vn=i.slice(t,1<e?1-e:void 0)}function Bn(){return!0}function zn(){return!1}function Wn(t,e,n,r){for(var i in this.dispatchConfig=t,this._targetInst=e,this.nativeEvent=n,t=this.constructor.Interface)t.hasOwnProperty(i)&&((e=t[i])?this[i]=e(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Bn:zn,this.isPropagationStopped=zn,this}function Hn(t,e,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,t,e,n,r),i}return new this(t,e,n,r)}function Kn(t){if(!(t instanceof this))throw Error(a(279));t.destructor(),10>this.eventPool.length&&this.eventPool.push(t)}function Gn(t){t.eventPool=[],t.getPooled=Hn,t.release=Kn}i(Wn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!==typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=Bn)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!==typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=Bn)},persist:function(){this.isPersistent=Bn},isPersistent:zn,destructor:function(){var t,e=this.constructor.Interface;for(t in e)this[t]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=zn,this._dispatchInstances=this._dispatchListeners=null}}),Wn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Wn.extend=function(t){function e(){}function n(){return r.apply(this,arguments)}var r=this;e.prototype=r.prototype;var o=new e;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,t),n.extend=r.extend,Gn(n),n},Gn(Wn);var Qn=Wn.extend({data:null}),$n=Wn.extend({data:null}),Xn=[9,13,27,32],Yn=k&&"CompositionEvent"in window,Jn=null;k&&"documentMode"in document&&(Jn=document.documentMode);var Zn=k&&"TextEvent"in window&&!Jn,tr=k&&(!Yn||Jn&&8<Jn&&11>
vendor: 9,393 bytes, line 2
2=Jn),er=String.fromCharCode(32),nr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},rr=!1;function ir(t,e){switch(t){case"keyup":return-1!==Xn.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function or(t){return"object"===typeof(t=t.detail)&&"data"in t?t.data:null}var ar=!1;var sr={eventTypes:nr,extractEvents:function(t,e,n,r){var i;if(Yn)t:{switch(t){case"compositionstart":var o=nr.compositionStart;break t;case"compositionend":o=nr.compositionEnd;break t;case"compositionupdate":o=nr.compositionUpdate;break t}o=void 0}else ar?ir(t,n)&&(o=nr.compositionEnd):"keydown"===t&&229===n.keyCode&&(o=nr.compositionStart);return o?(tr&&"ko"!==n.locale&&(ar||o!==nr.compositionStart?o===nr.compositionEnd&&ar&&(i=qn()):(Un="value"in(Fn=r)?Fn.value:Fn.textContent,ar=!0)),o=Qn.getPooled(o,e,n,r),i?o.data=i:null!==(i=or(n))&&(o.data=i),jn(o),i=o):i=null,(t=Zn?function(t,e){switch(t){case"compositionend":return or(e);case"keypress":return 32!==e.which?null:(rr=!0,er);case"textInput":return(t=e.data)===er&&rr?null:t;default:return null}}(t,n):function(t,e){if(ar)return"compositionend"===t||!Yn&&ir(t,e)?(t=qn(),Vn=Un=Fn=null,ar=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return tr&&"ko"!==e.locale?null:e.data;default:return null}}(t,n))?((e=$n.getPooled(nr.beforeInput,e,n,r)).data=t,jn(e)):e=null,null===i?e:null===e?i:[i,e]}},ur={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function cr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!ur[t.type]:"textarea"===e}var lr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function hr(t,e,n){return(t=Wn.getPooled(lr.change,t,e,n)).type="change",P(n),jn(t),t}var fr=null,pr=null;function dr(t){se(t)}function vr(t){if(wt(Nn(t)))return t}function yr(t,e){if("change"===t)return e}var gr=!1;function mr(){fr&&(fr.detachEvent("onpropertychange",br),pr=fr=null)}function br(t){if("value"===t.propertyName&&vr(pr))if(t=hr(pr,t,ue(t)),F)se(t);else{F=!0;try{D(dr,t)}finally{F=!1,V()}}}function _r(t,e,n){"focus"===t?(mr(),pr=n,(fr=e).attachEvent("onpropertychange",br)):"blur"===t&&mr()}function wr(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return vr(pr)}function Er(t,e){if("click"===t)return vr(e)}function Tr(t,e){if("input"===t||"change"===t)return vr(e)}k&&(gr=ce("input")&&(!document.documentMode||9<document.documentMode));var Sr={eventTypes:lr,_isInputEventSupported:gr,extractEvents:function(t,e,n,r){var i=e?Nn(e):window,o=i.nodeName&&i.nodeName.toLowerCase();if("select"===o||"input"===o&&"file"===i.type)var a=yr;else if(cr(i))if(gr)a=Tr;else{a=wr;var s=_r}else(o=i.nodeName)&&"input"===o.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(a=Er);if(a&&(a=a(t,e)))return hr(a,n,r);s&&s(t,i,e),"blur"===t&&(t=i._wrapperState)&&t.controlled&&"number"===i.type&&kt(i,"number",i.value)}},Ir=Wn.extend({view:null,detail:null}),Cr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kr(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=Cr[t])&&!!e[t]}function xr(){return kr}var Nr=0,Ar=0,Or=!1,Pr=!1,Rr=Ir.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:xr,button:null,buttons:null,relatedTarget:function(t){return t.relatedTarget||(t.fromElement===t.srcElement?t.toElement:t.fromElement)},movementX:function(t){if("movementX"in t)return t.movementX;var e=Nr;return Nr=t.screenX,Or?"mousemove"===t.type?t.screenX-e:0:(Or=!0,0)},movementY:function(t){if("movementY"in t)return t.movementY;var e=Ar;return Ar=t.screenY,Pr?"mousemove"===t.type?t.screenY-e:0:(Pr=!0,0)}}),Dr=Rr.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Lr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Mr={eventTypes:Lr,extractEvents:function(t,e,n,r,i){var o="mouseover"===t||"pointerover"===t,a="mouseout"===t||"pointerout"===t;if(o&&0===(32&i)&&(n.relatedTarget||n.fromElement)||!a&&!o)return null;(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,a)?(a=e,null!==(e=(e=n.relatedTarget||n.toElement)?kn(e):null)&&(e!==Zt(e)||5!==e.tag&&6!==e.tag)&&(e=null)):a=null;if(a===e)return null;if("mouseout"===t||"mouseover"===t)var s=Rr,u=Lr.mouseLeave,c=Lr.mouseEnter,l="mouse";else"pointerout"!==t&&"pointerover"!==t||(s=Dr,u=Lr.pointerLeave,c=Lr.pointerEnter,l="pointer");if(t=null==a?o:Nn(a),o=null==e?o:Nn(e),(u=s.getPooled(u,a,n,r)).type=l+"leave",u.target=t,u.relatedTarget=o,(n=s.getPooled(c,e,n,r)).type=l+"enter",n.target=o,n.relatedTarget=t,l=e,(r=a)&&l)t:{for(c=l,a=0,t=s=r;t;t=On(t))a++;for(t=0,e=c;e;e=On(e))t++;for(;0<a-t;)s=On(s),a--;for(;0<t-a;)c=On(c),t--;for(;a--;){if(s===c||s===c.alternate)break t;s=On(s),c=On(c)}s=null}else s=null;for(c=s,s=[];r&&r!==c&&(null===(a=r.alternate)||a!==c);)s.push(r),r=On(r);for(r=[];l&&l!==c&&(null===(a=l.alternate)||a!==c);)r.push(l),l=On(l);for(l=0;l<s.length;l++)Ln(s[l],"bubbled",u);for(l=r.length;0<l--;)Ln(r[l],"captured",n);return 0===(64&i)?[u]:[u,n]}};var jr="function"===typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t===1/e)||t!==t&&e!==e},Fr=Object.prototype.hasOwnProperty;function Ur(t,e){if(jr(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Fr.call(e,n[r])||!jr(t[n[r]],e[n[r]]))return!1;return!0}var Vr=k&&"documentMode"in document&&11>=document.documentMode,qr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Br=null,zr=null,Wr=null,Hr=!1;function Kr(t,e){var n=e.window===e?e.document:9===e.nodeType?e:e.ownerDocument;return Hr||null==Br||Br!==ln(n)?null:("selectionStart"in(n=Br)&&dn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Wr&&Ur(Wr,n)?null:(Wr=n,(t=Wn.getPooled(qr.select,zr,t,e)).type="select",t.target=Br,jn(t),t))}var Gr={eventTypes:qr,extractEvents:function(t,e,n,r,i,o){if(!(o=!(i=o||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){t:{i=Jt(i),o=I.onSelect;for(var a=0;a<o.length;a++)if(!i.has(o[a])){i=!1;break t}i=!0}o=!i}if(o)return null;switch(i=e?Nn(e):window,t){case"focus":(cr(i)||"true"===i.contentEditable)&&(Br=i,zr=e,Wr=null);break;case"blur":Wr=zr=Br=null;break;case"mousedown":Hr=!0;break;case"contextmenu":case"mouseup":case"dragend":return Hr=!1,Kr(n,r);case"selectionchange":if(Vr)break;case"keydown":case"keyup":return Kr(n,r)}return null}},Qr=Wn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),$r=Wn.extend({clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Xr=Ir.extend({relatedTarget:null});function Yr(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}var Jr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ti=Ir.extend({key:function(t){if(t.key){var e=Jr[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=Yr(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"ke
2yup"===t.type?Zr[t.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:xr,charCode:function(t){return"keypress"===t.type?Yr(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?Yr(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}}),ei=Rr.extend({dataTransfer:null}),ni=Ir.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:xr}),ri=Wn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ii=Rr.extend({deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null}),oi={eventTypes:je,extractEvents:function(t,e,n,r){var i=Fe.get(t);if(!i)return null;switch(t){case"keypress":if(0===Yr(n))return null;case"keydown":case"keyup":t=ti;break;case"blur":case"focus":t=Xr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":t=Rr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":t=ei;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":t=ni;break;case Kt:case Gt:case Qt:t=Qr;break;case $t:t=ri;break;case"scroll":t=Ir;break;case"wheel":t=ii;break;case"copy":case"cut":case"paste":t=$r;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":t=Dr;break;default:t=Wn}return jn(e=t.getPooled(i,e,n,r)),e}};if(m)throw Error(a(101));m=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),_(),d=An,v=xn,y=Nn,C({SimpleEventPlugin:oi,EnterLeaveEventPlugin:Mr,ChangeEventPlugin:Sr,SelectEventPlugin:Gr,BeforeInputEventPlugin:sr});var ai=[],si=-1;function ui(t){0>si||(t.current=ai[si],ai[si]=null,si--)}function ci(t,e){si++,ai[si]=t.current,t.current=e}var li={},hi={current:li},fi={current:!1},pi=li;function di(t,e){var n=t.type.contextTypes;if(!n)return li;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function vi(t){return null!==(t=t.childContextTypes)&&void 0!==t}function yi(){ui(fi),ui(hi)}function gi(t,e,n){if(hi.current!==li)throw Error(a(168));ci(hi,e),ci(fi,n)}function mi(t,e,n){var r=t.stateNode;if(t=e.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(a(108,yt(e)||"Unknown",o));return i({},n,{},r)}function bi(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||li,pi=hi.current,ci(hi,t),ci(fi,fi.current),!0}function _i(t,e,n){var r=t.stateNode;if(!r)throw Error(a(169));n?(t=mi(t,e,pi),r.__reactInternalMemoizedMergedChildContext=t,ui(fi),ui(hi),ci(hi,t)):ui(fi),ci(fi,n)}var wi=o.unstable_runWithPriority,Ei=o.unstable_scheduleCallback,Ti=o.unstable_cancelCallback,Si=o.unstable_requestPaint,Ii=o.unstable_now,Ci=o.unstable_getCurrentPriorityLevel,ki=o.unstable_ImmediatePriority,xi=o.unstable_UserBlockingPriority,Ni=o.unstable_NormalPriority,Ai=o.unstable_LowPriority,Oi=o.unstable_IdlePriority,Pi={},Ri=o.unstable_shouldYield,Di=void 0!==Si?Si:function(){},Li=null,Mi=null,ji=!1,Fi=Ii(),Ui=1e4>Fi?Ii:function(){return Ii()-Fi};function Vi(){switch(Ci()){case ki:return 99;case xi:return 98;case Ni:return 97;case Ai:return 96;case Oi:return 95;default:throw Error(a(332))}}function qi(t){switch(t){case 99:return ki;case 98:return xi;case 97:return Ni;case 96:return Ai;case 95:return Oi;default:throw Error(a(332))}}function Bi(t,e){return t=qi(t),wi(t,e)}function zi(t,e,n){return t=qi(t),Ei(t,e,n)}function Wi(t){return null===Li?(Li=[t],Mi=Ei(ki,Ki)):Li.push(t),Pi}function Hi(){if(null!==Mi){var t=Mi;Mi=null,Ti(t)}Ki()}function Ki(){if(!ji&&null!==Li){ji=!0;var t=0;try{var e=Li;Bi(99,(function(){for(;t<e.length;t++){var n=e[t];do{n=n(!0)}while(null!==n)}})),Li=null}catch(n){throw null!==Li&&(Li=Li.slice(t+1)),Ei(ki,Hi),n}finally{ji=!1}}}function Gi(t,e,n){return 1073741821-(1+((1073741821-t+e/10)/(n/=10)|0))*n}function Qi(t,e){if(t&&t.defaultProps)for(var n in e=i({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}var $i={current:null},Xi=null,Yi=null,Ji=null;function Zi(){Ji=Yi=Xi=null}function to(t){var e=$i.current;
2ui($i),t.type._context._currentValue=e}function eo(t,e){for(;null!==t;){var n=t.alternate;if(t.childExpirationTime<e)t.childExpirationTime=e,null!==n&&n.childExpirationTime<e&&(n.childExpirationTime=e);else{if(!(null!==n&&n.childExpirationTime<e))break;n.childExpirationTime=e}t=t.return}}function no(t,e){Xi=t,Ji=Yi=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(t.expirationTime>=e&&(Aa=!0),t.firstContext=null)}function ro(t,e){if(Ji!==t&&!1!==e&&0!==e)if("number"===typeof e&&1073741823!==e||(Ji=t,e=1073741823),e={context:t,observedBits:e,next:null},null===Yi){if(null===Xi)throw Error(a(308));Yi=e,Xi.dependencies={expirationTime:0,firstContext:e,responders:null}}else Yi=Yi.next=e;return t._currentValue}var io=!1;function oo(t){t.updateQueue={baseState:t.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function ao(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,baseQueue:t.baseQueue,shared:t.shared,effects:t.effects})}function so(t,e){return(t={expirationTime:t,suspenseConfig:e,tag:0,payload:null,callback:null,next:null}).next=t}function uo(t,e){if(null!==(t=t.updateQueue)){var n=(t=t.shared).pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}}function co(t,e){var n=t.alternate;null!==n&&ao(n,t),null===(n=(t=t.updateQueue).baseQueue)?(t.baseQueue=e.next=e,e.next=e):(e.next=n.next,n.next=e)}function lo(t,e,n,r){var o=t.updateQueue;io=!1;var a=o.baseQueue,s=o.shared.pending;if(null!==s){if(null!==a){var u=a.next;a.next=s.next,s.next=u}a=s,o.shared.pending=null,null!==(u=t.alternate)&&(null!==(u=u.updateQueue)&&(u.baseQueue=s))}if(null!==a){u=a.next;var c=o.baseState,l=0,h=null,f=null,p=null;if(null!==u)for(var d=u;;){if((s=d.expirationTime)<r){var v={expirationTime:d.expirationTime,suspenseConfig:d.suspenseConfig,tag:d.tag,payload:d.payload,callback:d.callback,next:null};null===p?(f=p=v,h=c):p=p.next=v,s>l&&(l=s)}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:d.suspenseConfig,tag:d.tag,payload:d.payload,callback:d.callback,next:null}),ou(s,d.suspenseConfig);t:{var y=t,g=d;switch(s=e,v=n,g.tag){case 1:if("function"===typeof(y=g.payload)){c=y.call(v,c,s);break t}c=y;break t;case 3:y.effectTag=-4097&y.effectTag|64;case 0:if(null===(s="function"===typeof(y=g.payload)?y.call(v,c,s):y)||void 0===s)break t;c=i({},c,s);break t;case 2:io=!0}}null!==d.callback&&(t.effectTag|=32,null===(s=o.effects)?o.effects=[d]:s.push(d))}if(null===(d=d.next)||d===u){if(null===(s=o.shared.pending))break;d=a.next=s.next,s.next=u,o.baseQueue=a=s,o.shared.pending=null}}null===p?h=c:p.next=f,o.baseState=h,o.baseQueue=p,au(l),t.expirationTime=l,t.memoizedState=c}}function ho(t,e,n){if(t=e.effects,e.effects=null,null!==t)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(null!==i){if(r.callback=null,r=i,i=n,"function"!==typeof r)throw Error(a(191,r));r.call(i)}}}var fo=X.ReactCurrentBatchConfig,po=(new r.Component).refs;function vo(t,e,n,r){n=null===(n=n(r,e=t.memoizedState))||void 0===n?e:i({},e,n),t.memoizedState=n,0===t.expirationTime&&(t.updateQueue.baseState=n)}var yo={isMounted:function(t){return!!(t=t._reactInternalFiber)&&Zt(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternalFiber;var r=Ks(),i=fo.suspense;(i=so(r=Gs(r,t,i),i)).payload=e,void 0!==n&&null!==n&&(i.callback=n),uo(t,i),Qs(t,r)},enqueueReplaceState:function(t,e,n){t=t._reactInternalFiber;var r=Ks(),i=fo.suspense;(i=so(r=Gs(r,t,i),i)).tag=1,i.payload=e,void 0!==n&&null!==n&&(i.callback=n),uo(t,i),Qs(t,r)},enqueueForceUpdate:function(t,e){t=t._reactInternalFiber;var n=Ks(),r=fo.suspense;(r=so(n=Gs(n,t,r),r)).tag=2,void 0!==e&&null!==e&&(r.callback=e),uo(t,r),Qs(t,n)}};function go(t,e,n,r,i,o,a){return"function"===typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(r,o,a):!e.prototype||!e.prototype.isPureReactComponent||(!Ur(n,r)||!Ur(i,o))}function mo(t,e,n){var r=!1,i=li,o=e.contextType;return"object"===typeof o&&null!==o?o=ro(o):(i=vi(e)?pi:hi.current,o=(r=null!==(r=e.contextTypes)&&void 0!==r)?di(t,i):li),e=new e(n,o),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=yo,t.stateNode=e,e._reactInternalFiber=t,r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function bo(t,e,n,r){t=e.state,"function"===typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),"function"===typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&yo.enqueueReplaceState(e,e.state,null)}function _o(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=po,oo(t);var o=e.contextType;"object"===typeof o&&null!==o?i.context=ro(o):(o=vi(e)?pi:hi.current,i.context=di(t,o)),lo(t,n,i,r),i.state=t.memoizedState,"function"===typeof(o=e.getDerivedStateFromProps)&&(vo(t,e,o,n),i.state=t.memoizedState),"function"===typeof e.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(e=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),e!==i.state&&yo.enqueueReplaceState(i,i.state,null),lo(t,n,i,r),i.state=t.memoizedState),"function"===typeof i.componentDidMount&&(t.effectTag|=4)}var wo=Array.isArray;function Eo(t,e,n){if(null!==(t=n.ref)&&"function"!==typeof t&&"object"!==typeof t){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,t));var i=""+t;return null!==e&&null!==e.ref&&"function"===typeof e.ref&&e.ref._stringRef===i?e.ref:((e=function(t){var e=r.refs;e===po&&(e=r.refs={}),null===t?delete e[i]:e[i]=t})._stringRef=i,e)}if("string"!==typeof t)throw Error(a(284));if(!n._owner)throw Error(a(290,t))}return t}function To(t,e){if("textarea"!==t.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(e)?"object with keys {"+Object.keys(e).join(", ")+"}":e,""))}function So(t){function e(e,n){if(t){var r=e.lastEffect;null!==r?(r.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!t)return null;for(;null!==r;)e(n,r),r=r.sibling;return null}function r(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(t,e){return(t=Cu(t,e)).index=0,t.sibling=null,t}function o(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index)<n?(e.effectTag=2,n):r:(e.effectTag=2,n):n}function s(e){return t&&null===e.alternate&&(e.effectTag=2),e}function u(t,e,n,r){return null===e||6!==e.tag?((e=Nu(n,t.mode,r)).return=t,e):((e=i(e,n)).return=t,e)}function c(t,e,n,r){return null!==e&&e.elementType===n.type?((r=i(e,n.props)).ref=Eo(t,e,n),r.return=t,r):((r=ku(n.type,n.key,n.props,null,t.mode,r)).ref=Eo(t,e,n),r.return=t,r)}function l(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=Au(n,t.mode,r)).return=t,e):((e=i(e,n.children||[])).return=t,e)}function h(t,e,n,r,o){return null===e||7!==e.tag?((e=xu(n,t.mode,r,o)).return=t,e):((e=i(e,n)).return=t,e)}function f(t,e,n){if("string"===typeof e||"number"===typeof e)return(e=Nu(""+e,t.mode,n)).return=t,e;if("object"===typeof e&&null!==e){switch(e.$$typeof){case tt:return(n=ku(e.type,e.key,e.props,null,t.mode,n)).ref=Eo(t,null,e),n.return=t,n;case et:return(e=Au(e,t.mode,n)).return=t,e}if(wo(e)||vt(e))return(e=xu(e,t.mode,n,null)).return=t,e;To(t,e)}return null}function p(t,e,n,r){var i=null!==e?e.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:u(t,e,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case tt:return n.key===i?n.type===nt?h(t,e,n.props.children,r,i):c(t,e,n,r):null;case et:return n.key===i?l(t,e,n,r):null}if(wo(n)||vt(n))return null!==i?null:h(t,e,n,r,null);To(t,n)}return null}function d(t,e,n,r,i){if("string"===typeof r||"number"===typeof r)return u(e,t=t.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case tt:return t=t.get(null===r.key?n:r.key)||null,r.type===nt?h(e,t,r.props.children,i,r.key):c(e,t,r,i);case et:return l(e,t=t.get(null===r.key?n:r.key)||null,r,i)}if(wo(r)||vt(r))return h(e,t=t.get(n)||null,r,i,null);To(e,r)}return null}function v(i,a,s,u){for(var c=null,l=null,h=a,v=a=0,y=null;null!==h&&v<s.length;v++){h.index>v?(y=h,h=null):y=h.sibling;var g=p(i,h,s[v],u);
vendor: 30,422 bytes, line 2
2if(null===g){null===h&&(h=y);break}t&&h&&null===g.alternate&&e(i,h),a=o(g,a,v),null===l?c=g:l.sibling=g,l=g,h=y}if(v===s.length)return n(i,h),c;if(null===h){for(;v<s.length;v++)null!==(h=f(i,s[v],u))&&(a=o(h,a,v),null===l?c=h:l.sibling=h,l=h);return c}for(h=r(i,h);v<s.length;v++)null!==(y=d(h,i,v,s[v],u))&&(t&&null!==y.alternate&&h.delete(null===y.key?v:y.key),a=o(y,a,v),null===l?c=y:l.sibling=y,l=y);return t&&h.forEach((function(t){return e(i,t)})),c}function y(i,s,u,c){var l=vt(u);if("function"!==typeof l)throw Error(a(150));if(null==(u=l.call(u)))throw Error(a(151));for(var h=l=null,v=s,y=s=0,g=null,m=u.next();null!==v&&!m.done;y++,m=u.next()){v.index>y?(g=v,v=null):g=v.sibling;var b=p(i,v,m.value,c);if(null===b){null===v&&(v=g);break}t&&v&&null===b.alternate&&e(i,v),s=o(b,s,y),null===h?l=b:h.sibling=b,h=b,v=g}if(m.done)return n(i,v),l;if(null===v){for(;!m.done;y++,m=u.next())null!==(m=f(i,m.value,c))&&(s=o(m,s,y),null===h?l=m:h.sibling=m,h=m);return l}for(v=r(i,v);!m.done;y++,m=u.next())null!==(m=d(v,i,y,m.value,c))&&(t&&null!==m.alternate&&v.delete(null===m.key?y:m.key),s=o(m,s,y),null===h?l=m:h.sibling=m,h=m);return t&&v.forEach((function(t){return e(i,t)})),l}return function(t,r,o,u){var c="object"===typeof o&&null!==o&&o.type===nt&&null===o.key;c&&(o=o.props.children);var l="object"===typeof o&&null!==o;if(l)switch(o.$$typeof){case tt:t:{for(l=o.key,c=r;null!==c;){if(c.key===l){switch(c.tag){case 7:if(o.type===nt){n(t,c.sibling),(r=i(c,o.props.children)).return=t,t=r;break t}break;default:if(c.elementType===o.type){n(t,c.sibling),(r=i(c,o.props)).ref=Eo(t,c,o),r.return=t,t=r;break t}}n(t,c);break}e(t,c),c=c.sibling}o.type===nt?((r=xu(o.props.children,t.mode,u,o.key)).return=t,t=r):((u=ku(o.type,o.key,o.props,null,t.mode,u)).ref=Eo(t,r,o),u.return=t,t=u)}return s(t);case et:t:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(t,r.sibling),(r=i(r,o.children||[])).return=t,t=r;break t}n(t,r);break}e(t,r),r=r.sibling}(r=Au(o,t.mode,u)).return=t,t=r}return s(t)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(t,r.sibling),(r=i(r,o)).return=t,t=r):(n(t,r),(r=Nu(o,t.mode,u)).return=t,t=r),s(t);if(wo(o))return v(t,r,o,u);if(vt(o))return y(t,r,o,u);if(l&&To(t,o),"undefined"===typeof o&&!c)switch(t.tag){case 1:case 0:throw t=t.type,Error(a(152,t.displayName||t.name||"Component"))}return n(t,r)}}var Io=So(!0),Co=So(!1),ko={},xo={current:ko},No={current:ko},Ao={current:ko};function Oo(t){if(t===ko)throw Error(a(174));return t}function Po(t,e){switch(ci(Ao,e),ci(No,t),ci(xo,ko),t=e.nodeType){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:jt(null,"");break;default:e=jt(e=(t=8===t?e.parentNode:e).namespaceURI||null,t=t.tagName)}ui(xo),ci(xo,e)}function Ro(){ui(xo),ui(No),ui(Ao)}function Do(t){Oo(Ao.current);var e=Oo(xo.current),n=jt(e,t.type);e!==n&&(ci(No,t),ci(xo,n))}function Lo(t){No.current===t&&(ui(xo),ui(No))}var Mo={current:0};function jo(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!==(64&e.effectTag))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}function Fo(t,e){return{responder:t,props:e}}var Uo=X.ReactCurrentDispatcher,Vo=X.ReactCurrentBatchConfig,qo=0,Bo=null,zo=null,Wo=null,Ho=!1;function Ko(){throw Error(a(321))}function Go(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!jr(t[n],e[n]))return!1;return!0}function Qo(t,e,n,r,i,o){if(qo=o,Bo=e,e.memoizedState=null,e.updateQueue=null,e.expirationTime=0,Uo.current=null===t||null===t.memoizedState?ga:ma,t=n(r,i),e.expirationTime===qo){o=0;do{if(e.expirationTime=0,!(25>o))throw Error(a(301));o+=1,Wo=zo=null,e.updateQueue=null,Uo.current=ba,t=n(r,i)}while(e.expirationTime===qo)}if(Uo.current=ya,e=null!==zo&&null!==zo.next,qo=0,Wo=zo=Bo=null,Ho=!1,e)throw Error(a(300));return t}function $o(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Wo?Bo.memoizedState=Wo=t:Wo=Wo.next=t,Wo}function Xo(){if(null===zo){var t=Bo.alternate;t=null!==t?t.memoizedState:null}else t=zo.next;var e=null===Wo?Bo.memoizedState:Wo.next;if(null!==e)Wo=e,zo=t;else{if(null===t)throw Error(a(310));t={memoizedState:(zo=t).memoizedState,baseState:zo.baseState,baseQueue:zo.baseQueue,queue:zo.queue,next:null},null===Wo?Bo.memoizedState=Wo=t:Wo=Wo.next=t}return Wo}function Yo(t,e){return"function"===typeof e?e(t):e}function Jo(t){var e=Xo(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=zo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var u=s=o=null,c=i;do{var l=c.expirationTime;if(l<qo){var h={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(s=u=h,o=r):u=u.next=h,l>Bo.expirationTime&&(Bo.expirationTime=l,au(l))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),ou(l,c.suspenseConfig),r=c.eagerReducer===t?c.eagerState:t(r,c.action);c=c.next}while(null!==c&&c!==i);null===u?o=r:u.next=s,jr(r,e.memoizedState)||(Aa=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=u,n.lastRenderedState=r}return[e.memoizedState,n.dispatch]}function Zo(t){var e=Xo(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=t(o,s.action),s=s.next}while(s!==i);jr(o,e.memoizedState)||(Aa=!0),e.memoizedState=o,null===e.baseQueue&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function ta(t){var e=$o();return"function"===typeof t&&(t=t()),e.memoizedState=e.baseState=t,t=(t=e.queue={pending:null,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:t}).dispatch=va.bind(null,Bo,t),[e.memoizedState,t]}function ea(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===(e=Bo.updateQueue)?(e={lastEffect:null},Bo.updateQueue=e,e.lastEffect=t.next=t):null===(n=e.lastEffect)?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t),t}function na(){return Xo().memoizedState}function ra(t,e,n,r){var i=$o();Bo.effectTag|=t,i.memoizedState=ea(1|e,n,void 0,void 0===r?null:r)}function ia(t,e,n,r){var i=Xo();r=void 0===r?null:r;var o=void 0;if(null!==zo){var a=zo.memoizedState;if(o=a.destroy,null!==r&&Go(r,a.deps))return void ea(e,n,o,r)}Bo.effectTag|=t,i.memoizedState=ea(1|e,n,o,r)}function oa(t,e){return ra(516,4,t,e)}function aa(t,e){return ia(516,4,t,e)}function sa(t,e){return ia(4,2,t,e)}function ua(t,e){return"function"===typeof e?(t=t(),e(t),function(){e(null)}):null!==e&&void 0!==e?(t=t(),e.current=t,function(){e.current=null}):void 0}function ca(t,e,n){return n=null!==n&&void 0!==n?n.concat([t]):null,ia(4,2,ua.bind(null,e,t),n)}function la(){}function ha(t,e){return $o().memoizedState=[t,void 0===e?null:e],t}function fa(t,e){var n=Xo();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&Go(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function pa(t,e){var n=Xo();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&Go(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function da(t,e,n){var r=Vi();Bi(98>r?98:r,(function(){t(!0)})),Bi(97<r?97:r,(function(){var r=Vo.suspense;Vo.suspense=void 0===e?null:e;try{t(!1),n()}finally{Vo.suspense=r}}))}function va(t,e,n){var r=Ks(),i=fo.suspense;i={expirationTime:r=Gs(r,t,i),suspenseConfig:i,action:n,eagerReducer:null,eagerState:null,next:null};var o=e.pending;if(null===o?i.next=i:(i.next=o.next,o.next=i),e.pending=i,o=t.alternate,t===Bo||null!==o&&o===Bo)Ho=!0,i.expirationTime=qo,Bo.expirationTime=qo;else{if(0===t.expirationTime&&(null===o||0===o.expirationTime)&&null!==(o=e.lastRenderedReducer))try{var a=e.lastRenderedState,s=o(a,n);if(i.eagerReducer=o,i.eagerState=s,jr(s,a))return}catch(u){}Qs(t,r)}}var ya={readContext:ro,useCallback:Ko,useContext:Ko,useEffect:Ko,useImperativeHandle:Ko,useLayoutEffect:Ko,useMemo:Ko,useReducer:Ko,useRef:Ko,useState:Ko,useDebugValue:Ko,useResponder:Ko,useDeferredValue:Ko,useTransition:Ko},ga={readContext:ro,useCallback:ha,useContext:ro,useEffect:oa,useImperativeHandle:function(t,e,n){return n=null!==n&&void 0!==n?n.concat([t]):null,ra(4,2,ua.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ra(4,2,t,e)},useMemo:function(t,e){var n=$o();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=$o();return e=void 0!==n?n(e):e,r.memoizedState=r.baseState=e,t=(t=r.queue={pending:null,dispatch:null,lastRenderedReducer:t,lastRenderedState:e}).dispatch=va.bind(null,Bo,t),[r.memoizedState,t]},useRef:function(t){return t={current:t},$o().memoizedState=t},useState:ta,useDebugValue:la,useResponder:Fo,useDeferredValue:function(t,e){var n=ta(t),r=n[0],i=n[1];return oa((function(){var n=Vo.suspense;Vo.suspense=void 0===e?null:e;try{i(t)}finally{Vo.suspense=n}}),[t,e]),r},useTransition:function(t){var e=ta(!1),n=e[0];return e=e[1],[ha(da.bind(null,e,t),[e,t]),n]}},ma={readContext:ro,useCallback:fa,useContext:ro,useEffect:aa,useImperativeHandle:ca,useLayoutEffect:sa,useMemo:pa,useReducer:Jo,useRef:na,useState:function(){return Jo(Yo)},useDebugValue:la,useResponder:Fo,useDeferredValue:function(t,e){var n=Jo(Yo),r=n[0],i=n[1];return aa((function(){var n=Vo.suspense;Vo.suspense=void 0===e?null:e;try{i(t)}finally{Vo.suspense=n}}),[t,e]),r},useTransition:function(t){var e=Jo(Yo),n=e[0];return e=e[1],[fa(da.bind(null,e,t),[e,t]),n]}},ba={readContext:ro,useCallback:fa,useContext:ro,useEffect:aa,useImperativeHandle:ca,useLayoutEffect:sa,useMemo:pa,useReducer:Zo,useRef:na,useState:function(){return Zo(Yo)},useDebugValue:la,useResponder:Fo,useDeferredValue:function(t,e){var n=Zo(Yo),r=n[0],i=n[1];return aa((function(){var n=Vo.suspense;Vo.suspense=void 0===e?null:e;try{i(t)}finally{Vo.suspense=n}}),[t,e]),r},useTransition:function(t){var e=Zo(Yo),n=e[0];return e=e[1],[fa(da.bind(null,e,t),[e,t]),n]}},_a=null,wa=null,Ea=!1;function Ta(t,e){var n=Su(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=e,n.return=t,n.effectTag=8,null!==t.lastEffect?(t.lastEffect.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n}function Sa(t,e){switch(t.tag){case 5:var n=t.type;return null!==(e=1!==e.nodeType||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,!0);case 6:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,!0);case 13:default:return!1}}function Ia(t){if(Ea){var e=wa;if(e){var n=e;if(!Sa(t,e)){if(!(e=wn(n.nextSibling))||!Sa(t,e))return t.effectTag=-1025&t.effectTag|2,Ea=!1,void(_a=t);Ta(_a,n)}_a=t,wa=wn(e.firstChild)}else t.effectTag=-1025&t.effectTag|2,Ea=!1,_a=t}}function Ca(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;_a=t}function ka(t){if(t!==_a)return!1;if(!Ea)return Ca(t),Ea=!0,!1;var e=t.type;if(5!==t.tag||"head"!==e&&"body"!==e&&!mn(e,t.memoizedProps))for(e=wa;e;)Ta(t,e),e=wn(e.nextSibling);if(Ca(t),13===t.tag){if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(a(317));t:{for(t=t.nextSibling,e=0;t;){if(8===t.nodeType){var n=t.data;if("/$"===n){if(0===e){wa=wn(t.nextSibling);break t}e--}else"$"!==n&&"$!"!==n&&"$?"!==n||e++}t=t.nextSibling}wa=null}}else wa=_a?wn(t.stateNode.nextSibling):null;return!0}function xa(){wa=_a=null,Ea=!1}var Na=X.ReactCurrentOwner,Aa=!1;function Oa(t,e,n,r){e.child=null===t?Co(e,null,n,r):Io(e,t.child,n,r)}function Pa(t,e,n,r,i){n=n.render;var o=e.ref;return no(e,i),r=Qo(t,e,n,r,o,i),null===t||Aa?(e.effectTag|=1,Oa(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.effectTag&=-517,t.expirationTime<=i&&(t.expirationTime=0),Qa(t,e,i))}function Ra(t,e,n,r,i,o){if(null===t){var a=n.type;return"function"!==typeof a||Iu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=ku(n.type,null,r,null,e.mode,o)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=a,Da(t,e,a,r,i,o))}return a=t.child,i<o&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:Ur)(i,r)&&t.ref===e.ref)?Qa(t,e,o):(e.effectTag|=1,(t=Cu(a,r)).ref=e.ref,t.return=e,e.child=t)}function Da(t,e,n,r,i,o){return null!==t&&Ur(t.memoizedProps,r)&&t.ref===e.ref&&(Aa=!1,i<o)?(e.expirationTime=t.expirationTime,Qa(t,e,o)):Ma(t,e,n,r,o)}function La(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.effectTag|=128)}function Ma(t,e,n,r,i){var o=vi(n)?pi:hi.current;return o=di(e,o),no(e,i),n=Qo(t,e,n,r,o,i),null===t||Aa?(e.effectTag|=1,Oa(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.effectTag&=-517,t.expirationTime<=i&&(t.expirationTime=0),Qa(t,e,i))}function ja(t,e,n,r,i){if(vi(n)){var o=!0;bi(e)}else o=!1;if(no(e,i),null===e.stateNode)null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),mo(e,n,r),_o(e,n,r,i),r=!0;else if(null===t){var a=e.stateNode,s=e.memoizedProps;a.props=s;var u=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=ro(c):c=di(e,c=vi(n)?pi:hi.current);var l=n.getDerivedStateFromProps,h="function"===typeof l||"function"===typeof a.getSnapshotBeforeUpdate;h||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==c)&&bo(e,a,r,c),io=!1;var f=e.memoizedState;a.state=f,lo(e,r,a,i),u=e.memoizedState,s!==r||f!==u||fi.current||io?("function"===typeof l&&(vo(e,n,l,r),u=e.memoizedState),(s=io||go(e,n,s,r,f,u,c))?(h||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(e.effectTag|=4)):("function"===typeof a.componentDidMount&&(e.effectTag|=4),e.memoizedProps=r,e.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"===typeof a.componentDidMount&&(e.effectTag|=4),r=!1)}else a=e.stateNode,ao(t,e),s=e.memoizedProps,a.props=e.type===e.elementType?s:Qi(e.type,s),u=a.context,"object"===typeof(c=n.contextType)&&null!==c?c=ro(c):c=di(e,c=vi(n)?pi:hi.current),(h="function"===typeof(l=n.getDerivedStateFromProps)||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==c)&&bo(e,a,r,c),io=!1,u=e.memoizedState,a.state=u,lo(e,r,a,i),f=e.memoizedState,s!==r||u!==f||fi.current||io?("function"===typeof l&&(vo(e,n,l,r),f=e.memoizedState),(l=io||go(e,n,s,r,u,f,c))?(h||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,c),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,c)),"function"===typeof a.componentDidUpdate&&(e.effectTag|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(e.effectTag|=256)):("function"!==typeof a.componentDidUpdate||s===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=256),e.memoizedProps=r,e.memoizedState=f),a.props=r,a.state=f,a.context=c,r=l):("function"!==typeof a.componentDidUpdate||s===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=256),r=!1);return Fa(t,e,n,r,o,i)}function Fa(t,e,n,r,i,o){La(t,e);var a=0!==(64&e.effectTag);if(!r&&!a)return i&&_i(e,n,!1),Qa(t,e,o);r=e.stateNode,Na.current=e;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return e.effectTag|=1,null!==t&&a?(e.child=Io(e,t.child,null,o),e.child=Io(e,null,s,o)):Oa(t,e,s,o),e.memoizedState=r.state,i&&_i(e,n,!0),e.child}function Ua(t){var e=t.stateNode;e.pendingContext?gi(0,e.pendingContext,e.pendingContext!==e.context):e.context&&gi(0,e.context,!1),Po(t,e.containerInfo)}var Va,qa,Ba,za={dehydrated:null,retryTime:0};function Wa(t,e,n){var r,i=e.mode,o=e.pendingProps,a=Mo.current,s=!1;if((r=0!==(64&e.effectTag))||(r=0!==(2&a)&&(null===t||null!==t.memoizedState)),r?(s=!0,e.effectTag&=-65):null!==t&&null===t.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(a|=1),ci(Mo,1&a),null===t){if(void 0!==o.fallback&&Ia(e),s){if(s=o.fallback,(o=xu(null,i,0,null)).return=e,0===(2&e.mode))for(t=null!==e.memoizedState?e.child.child:e.child,o.child=t;null!==t;)t.return=o,t=t.sibling;return(n=xu(s,i,n,null)).return=e,o.sibling=n,e.memoizedState=za,e.child=o,n}return i=o.children,e.memoizedState=null,e.child=Co(e,null,i,n)}if(null!==t.memoizedState){if(i=(t=t.child).sibling,s){if(o=o.fallback,(n=Cu(t,t.pendingProps)).return=e,0===(2&e.mode)&&(s=null!==e.memoizedState?e.child.child:e.child)!==t.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(i=Cu(i,o)).return=e,n.sibling=i,n.childExpirationTime=0,e.memoizedState=za,e.child=n,i}return n=Io(e,t.child,o.children,n),e.memoizedState=null,e.child=n}if(t=t.child,s){if(s=o.fallback,(o=xu(null,i,0,null)).return=e,o.child=t,null!==t&&(t.return=o),0===(2&e.mode))for(t=null!==e.memoizedState?e.child.child:e.child,o.child=t;null!==t;)t.return=o,t=t.sibling;return(n=xu(s,i,n,null)).return=e,o.sibling=n,n.effectTag|=2,o.childExpirationTime=0,e.memoizedState=za,e.child=o,n}return e.memoizedState=null,e.child=Io(e,t,o.children,n)}function Ha(t,e){t.expirationTime<e&&(t.expirationTime=e);var n=t.alternate;null!==n&&n.expirationTime<e&&(n.expirationTime=e),eo(t.return,e)}function Ka(t,e,n,r,i,o){var a=t.memoizedState;null===a?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:i,lastEffect:o}:(a.isBackwards=e,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=i,a.lastEffect=o)}function Ga(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(Oa(t,e,r.children,n),0!==(2&(r=Mo.current)))r=1&r|2,e.effectTag|=64;else{if(null!==t&&0!==(64&t.effectTag))t:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&Ha(t,n);else if(19===t.tag)Ha(t,n);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;null===t.sibling;){if(null===t.return||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(ci(Mo,r),0===(2&e.mode))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;null!==n;)null!==(t=n.alternate)&&null===jo(t)&&(i=n),n=n.sibling;null===(n=i)?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Ka(e,!1,i,n,o,e.lastEffect);break;case"backwards":for(n=null,i=e.child,e.child=null;null!==i;){if(null!==(t=i.alternate)&&null===jo(t)){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Ka(e,!0,n,null,o,e.lastEffect);break;case"together":Ka(e,!1,null,null,void 0,e.lastEffect);break;default:e.memoizedState=null}return e.child}function Qa(t,e,n){null!==t&&(e.dependencies=t.dependencies);var r=e.expirationTime;if(0!==r&&au(r),e.childExpirationTime<n)return null;if(null!==t&&e.child!==t.child)throw Error(a(153));if(null!==e.child){for(n=Cu(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=Cu(t,t.pendingProps)).return=e;n.sibling=null}return e.child}function $a(t,e){switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;null!==e;)null!==e.alternate&&(n=e),e=e.sibling;null===n?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e||null===t.tail?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Xa(t,e,n){var r=e.pendingProps;switch(e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return vi(e.type)&&yi(),null;case 3:return Ro(),ui(fi),ui(hi),(n=e.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==t&&null!==t.child||!ka(e)||(e.effectTag|=4),null;case 5:Lo(e),n=Oo(Ao.current);var o=e.type;if(null!==t&&null!=e.stateNode)qa(t,e,o,r,n),t.ref!==e.ref&&(e.effectTag|=128);else{if(!r){if(null===e.stateNode)throw Error(a(166));return null}if(t=Oo(xo.current),ka(e)){r=e.stateNode,o=e.type;var s=e.memoizedProps;switch(r[Sn]=e,r[In]=s,o){case"iframe":case"object":case"embed":Ge("load",r);break;case"video":case"audio":for(t=0;t<Xt.length;t++)Ge(Xt[t],r);break;case"source":Ge("error",r);break;case"img":case"image":case"link":Ge("error",r),Ge("load",r);break;case"form":Ge("reset",r),Ge("submit",r);break;case"details":Ge("toggle",r);break;case"input":Tt(r,s),Ge("invalid",r),un(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ge("invalid",r),un(n,"onChange");break;case"textarea":Ot(r,s),Ge("invalid",r),un(n,"onChange")}for(var u in on(o,s),t=null,s)if(s.hasOwnProperty(u)){var c=s[u];"children"===u?"string"===typeof c?r.textContent!==c&&(t=["children",c]):"number"===typeof c&&r.textContent!==""+c&&(t=["children",""+c]):S.hasOwnProperty(u)&&null!=c&&un(n,u)}switch(o){case"input":_t(r),Ct(r,s,!0);break;case"textarea":_t(r),Rt(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=cn)}n=t,e.updateQueue=n,null!==n&&(e.effectTag|=4)}else{switch(u=9===n.nodeType?n:n.ownerDocument,t===sn&&(t=Mt(o)),t===sn?"script"===o?((t=u.createElement("div")).innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):"string"===typeof r.is?t=u.createElement(o,{is:r.is}):(t=u.createElement(o),"select"===o&&(u=t,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):t=u.createElementNS(t,o),t[Sn]=e,t[In]=r,Va(t,e),e.stateNode=t,u=an(o,r),o){case"iframe":case"object":case"embed":Ge("load",t),c=r;break;case"video":case"audio":for(c=0;c<Xt.length;c++)Ge(Xt[c],t);c=r;break;case"source":Ge("error",t),c=r;break;case"img":case"image":case"link":Ge("error",t),Ge("load",t),c=r;break;case"form":Ge("reset",t),Ge("submit",t),c=r;break;case"details":Ge("toggle",t),c=r;break;case"input":Tt(t,r),c=Et(t,r),Ge("invalid",t),un(n,"onChange");break;case"option":c=xt(t,r);break;case"select":t._wrapperState={wasMultiple:!!r.multiple},c=i({},r,{value:void 0}),Ge("invalid",t),un(n,"onChange");break;case"textarea":Ot(t,r),c=At(t,r),Ge("invalid",t),un(n,"onChange");break;default:c=r}on(o,c);var l=c;for(s in l)if(l.hasOwnProperty(s)){var h=l[s];"style"===s?nn(t,h):"dangerouslySetInnerHTML"===s?null!=(h=h?h.__html:void 0)&&Ut(t,h):"children"===s?"string"===typeof h?("textarea"!==o||""!==h)&&Vt(t,h):"number"===typeof h&&Vt(t,""+h):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(S.hasOwnProperty(s)?null!=h&&un(n,s):null!=h&&Y(t,s,h,u))}switch(o){case"input":_t(t),Ct(t,r,!1);break;case"textarea":_t(t),Rt(t);break;case"option":null!=r.value&&t.setAttribute("value",""+mt(r.value));break;case"select":t.multiple=!!r.multiple,null!=(n=r.value)?Nt(t,!!r.multiple,n,!1):null!=r.defaultValue&&Nt(t,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof c.onClick&&(t.onclick=cn)}gn(o,r)&&(e.effectTag|=4)}null!==e.ref&&(e.effectTag|=128)}return null;case 6:if(t&&null!=e.stateNode)Ba(0,e,t.memoizedProps,r);else{if("string"!==typeof r&&null===e.stateNode)throw Error(a(166));n=Oo(Ao.current),Oo(xo.current),ka(e)?(n=e.stateNode,r=e.memoizedProps,n[Sn]=e,n.nodeValue!==r&&(e.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Sn]=e,e.stateNode=n)}return null;case 13:return ui(Mo),r=e.memoizedState,0!==(64&e.effectTag)?(e.expirationTime=n,e):(n=null!==r,r=!1,null===t?void 0!==e.memoizedProps.fallback&&ka(e):(r=null!==(o=t.memoizedState),n||null===o||null!==(o=t.child.sibling)&&(null!==(s=e.firstEffect)?(e.firstEffect=o,o.nextEffect=s):(e.firstEffect=e.lastEffect=o,o.nextEffect=null),o.effectTag=8)),n&&!r&&0!==(2&e.mode)&&(null===t&&!0!==e.memoizedProps.unstable_avoidThisFallback||0!==(1&Mo.current)?ks===_s&&(ks=ws):(ks!==_s&&ks!==ws||(ks=Es),0!==Ps&&null!==Ss&&(Ru(Ss,Cs),Du(Ss,Ps)))),(n||r)&&(e.effectTag|=4),null);case 4:return Ro(),null;case 10:return to(e),null;case 17:return vi(e.type)&&yi(),null;case 19:if(ui(Mo),null===(r=e.memoizedState))return null;if(o=0!==(64&e.effectTag),null===(s=r.rendering)){if(o)$a(r,!1);else if(ks!==_s||null!==t&&0!==(64&t.effectTag))for(s=e.child;null!==s;){if(null!==(t=jo(s))){for(e.effectTag|=64,$a(r,!1),null!==(o=t.updateQueue)&&(e.updateQueue=o,e.effectTag|=4),null===r.lastEffect&&(e.firstEffect=null),e.lastEffect=r.lastEffect,r=e.child;null!==r;)s=n,(o=r).effectTag&=2,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null,null===(t=o.alternate)?(o.childExpirationTime=0,o.expirationTime=s,o.child=null,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null):(o.childExpirationTime=t.childExpirationTime,o.expirationTime=t.expirationTime,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,s=t.dependencies,o.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),r=r.sibling;return ci(Mo,1&Mo.current|2),e.child}s=s.sibling}}else{if(!o)if(null!==(t=jo(s))){if(e.effectTag|=64,o=!0,null!==(n=t.updateQueue)&&(e.updateQueue=n,e.effectTag|=4),$a(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate)return null!==(e=e.lastEffect=r.lastEffect)&&(e.nextEffect=null),null}else 2*Ui()-r.renderingStartTime>r.tailExpiration&&1<n&&(e.effectTag|=64,o=!0,$a(r,!1),e.expirationTime=e.childExpirationTime=n-1);r.isBackwards?(s.sibling=e.child,e.child=s):(null!==(n=r.last)?n.sibling=s:e.child=s,r.last=s)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=Ui()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=e.lastEffect,r.renderingStartTime=Ui(),n.sibling=null,e=Mo.current,ci(Mo,o?1&e|2:1&e),n):null}throw Error(a(156,e.tag))}function Ya(t){switch(t.tag){case 1:vi(t.type)&&yi();var e=t.effectTag;return 4096&e?(t.effectTag=-4097&e|64,t):null;case 3:if(Ro(),ui(fi),ui(hi),0!==(64&(e=t.effectTag)))throw Error(a(285));return t.effectTag=-4097&e|64,t;case 5:return Lo(t),null;case 13:return ui(Mo),4096&(e=t.effectTag)?(t.effectTag=-4097&e|64,t):null;case 19:return ui(Mo),null;case 4:return Ro(),null;case 10:return to(t),null;default:return null}}function Ja(t,e){return{value:t,source:e,stack:gt(e)}}Va=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)t.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},qa=function(t,e,n,r,o){var a=t.memoizedProps;if(a!==r){var s,u,c=e.stateNode;switch(Oo(xo.current),t=null,n){case"input":a=Et(c,a),r=Et(c,r),t=[];break;case"option":a=xt(c,a),r=xt(c,r),t=[];break;case"select":a=i({},a,{value:void 0}),r=i({},r,{value:void 0}),t=[];break;case"textarea":a=At(c,a),r=At(c,r),t=[];break;default:"function"!==typeof a.onClick&&"function"===typeof r.onClick&&(c.onclick=cn)}for(s in on(n,r),n=null,a)if(!r.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(u in c=a[s])c.hasOwnProperty(u)&&(n||(n={}),n[u]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(S.hasOwnProperty(s)?t||(t=[]):(t=t||[]).push(s,null));for(s in r){var l=r[s];if(c=null!=a?a[s]:void 0,r.hasOwnProperty(s)&&l!==c&&(null!=l||null!=c))if("style"===s)if(c){for(u in c)!c.hasOwnProperty(u)||l&&l.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in l)l.hasOwnProperty(u)&&c[u]!==l[u]&&(n||(n={}),n[u]=l[u])}else n||(t||(t=[]),t.push(s,n)),n=l;else"dangerouslySetInnerHTML"===s?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(t=t||[]).push(s,l)):"children"===s?c===l||"string"!==typeof l&&"number"!==typeof l||(t=t||[]).push(s,""+l):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&(S.hasOwnProperty(s)?(null!=l&&un(o,s),t||c===l||(t=[])):(t=t||[]).push(s,l))}n&&(t=t||[]).push("style",n),o=t,(e.updateQueue=o)&&(e.effectTag|=4)}},Ba=function(t,e,n,r){n!==r&&(e.effectTag|=4)};var Za="function"===typeof WeakSet?WeakSet:Set;function ts(t,e){var n=e.source,r=e.stack;null===r&&null!==n&&(r=gt(n)),null!==n&&yt(n.type),e=e.value,null!==t&&1===t.tag&&yt(t.type);try{console.error(e)}catch(i){setTimeout((function(){throw i}))}}function es(t){var e=t.ref;if(null!==e)if("function"===typeof e)try{e(null)}catch(n){mu(t,n)}else e.current=null}function ns(t,e){switch(e.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&e.effectTag&&null!==t){var n=t.memoizedProps,r=t.memoizedState;e=(t=e.stateNode).getSnapshotBeforeUpdate(e.elementType===e.type?n:Qi(e.type,n),r),t.__reactInternalSnapshotBeforeUpdate=e}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(a(163))}function rs(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var n=e=e.next;do{if((n.tag&t)===t){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==e)}}function is(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function os(t,e,n){switch(n.tag){case 0:case 11:case 15:case 22:return void is(3,n);case 1:if(t=n.stateNode,4&n.effectTag)if(null===e)t.componentDidMount();else{var r=n.elementType===n.type?e.memoizedProps:Qi(n.type,e.memoizedProps);t.componentDidUpdate(r,e.memoizedState,t.__reactInternalSnapshotBeforeUpdate)}return void(null!==(e=n.updateQueue)&&ho(n,e,t));case 3:if(null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}ho(n,e,t)}return;case 5:return t=n.stateNode,void(null===e&&4&n.effectTag&&gn(n.type,n.memoizedProps)&&t.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Me(n)))));case 19:case 17:case 20:case 21:return}throw Error(a(163))}function as(t,e,n){switch("function"===typeof Eu&&Eu(e),e.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(t=e.updateQueue)&&null!==(t=t.lastEffect)){var r=t.next;Bi(97<n?97:n,(function(){var t=r;do{var n=t.destroy;if(void 0!==n){var i=e;try{n()}catch(o){mu(i,o)}}t=t.next}
vendor: 7,764 bytes, line 2
2while(t!==r)}))}break;case 1:es(e),"function"===typeof(n=e.stateNode).componentWillUnmount&&function(t,e){try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(n){mu(t,n)}}(e,n);break;case 5:es(e);break;case 4:ls(t,e,n)}}function ss(t){var e=t.alternate;t.return=null,t.child=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.alternate=null,t.firstEffect=null,t.lastEffect=null,t.pendingProps=null,t.memoizedProps=null,t.stateNode=null,null!==e&&ss(e)}function us(t){return 5===t.tag||3===t.tag||4===t.tag}function cs(t){t:{for(var e=t.return;null!==e;){if(us(e)){var n=e;break t}e=e.return}throw Error(a(160))}switch(e=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:e=e.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(Vt(e,""),n.effectTag&=-17);t:e:for(n=t;;){for(;null===n.sibling;){if(null===n.return||us(n.return)){n=null;break t}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue e;if(null===n.child||4===n.tag)continue e;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break t}}r?function t(e,n,r){var i=e.tag,o=5===i||6===i;if(o)e=o?e.stateNode:e.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(e,n):r.insertBefore(e,n):(8===r.nodeType?(n=r.parentNode).insertBefore(e,r):(n=r).appendChild(e),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=cn));else if(4!==i&&null!==(e=e.child))for(t(e,n,r),e=e.sibling;null!==e;)t(e,n,r),e=e.sibling}(t,n,e):function t(e,n,r){var i=e.tag,o=5===i||6===i;if(o)e=o?e.stateNode:e.stateNode.instance,n?r.insertBefore(e,n):r.appendChild(e);else if(4!==i&&null!==(e=e.child))for(t(e,n,r),e=e.sibling;null!==e;)t(e,n,r),e=e.sibling}(t,n,e)}function ls(t,e,n){for(var r,i,o=e,s=!1;;){if(!s){s=o.return;t:for(;;){if(null===s)throw Error(a(160));switch(r=s.stateNode,s.tag){case 5:i=!1;break t;case 3:case 4:r=r.containerInfo,i=!0;break t}s=s.return}s=!0}if(5===o.tag||6===o.tag){t:for(var u=t,c=o,l=n,h=c;;)if(as(u,h,l),null!==h.child&&4!==h.tag)h.child.return=h,h=h.child;else{if(h===c)break t;for(;null===h.sibling;){if(null===h.return||h.return===c)break t;h=h.return}h.sibling.return=h.return,h=h.sibling}i?(u=r,c=o.stateNode,8===u.nodeType?u.parentNode.removeChild(c):u.removeChild(c)):r.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){r=o.stateNode.containerInfo,i=!0,o.child.return=o,o=o.child;continue}}else if(as(t,o,n),null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;4===(o=o.return).tag&&(s=!1)}o.sibling.return=o.return,o=o.sibling}}function hs(t,e){switch(e.tag){case 0:case 11:case 14:case 15:case 22:return void rs(3,e);case 1:return;case 5:var n=e.stateNode;if(null!=n){var r=e.memoizedProps,i=null!==t?t.memoizedProps:r;t=e.type;var o=e.updateQueue;if(e.updateQueue=null,null!==o){for(n[In]=r,"input"===t&&"radio"===r.type&&null!=r.name&&St(n,r),an(t,i),e=an(t,r),i=0;i<o.length;i+=2){var s=o[i],u=o[i+1];"style"===s?nn(n,u):"dangerouslySetInnerHTML"===s?Ut(n,u):"children"===s?Vt(n,u):Y(n,s,u,e)}switch(t){case"input":It(n,r);break;case"textarea":Pt(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(t=r.value)?Nt(n,!!r.multiple,t,!1):e!==!!r.multiple&&(null!=r.defaultValue?Nt(n,!!r.multiple,r.defaultValue,!0):Nt(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===e.stateNode)throw Error(a(162));return void(e.stateNode.nodeValue=e.memoizedProps);case 3:return void((e=e.stateNode).hydrate&&(e.hydrate=!1,Me(e.containerInfo)));case 12:return;case 13:if(n=e,null===e.memoizedState?r=!1:(r=!0,n=e.child,Ds=Ui()),null!==n)t:for(t=n;;){if(5===t.tag)o=t.stateNode,r?"function"===typeof(o=o.style).setProperty?o.setProperty("display","none","important"):o.display="none":(o=t.stateNode,i=void 0!==(i=t.memoizedProps.style)&&null!==i&&i.hasOwnProperty("display")?i.display:null,o.style.display=en("display",i));else if(6===t.tag)t.stateNode.nodeValue=r?"":t.memoizedProps;else{if(13===t.tag&&null!==t.memoizedState&&null===t.memoizedState.dehydrated){(o=t.child.sibling).return=t,t=o;continue}if(null!==t.child){t.child.return=t,t=t.child;continue}}if(t===n)break;for(;null===t.sibling;){if(null===t.return||t.return===n)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}return void fs(e);case 19:return void fs(e);case 17:return}throw Error(a(163))}function fs(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new Za),e.forEach((function(e){var r=_u.bind(null,t,e);n.has(e)||(n.add(e),e.then(r,r))}))}}var ps="function"===typeof WeakMap?WeakMap:Map;function ds(t,e,n){(n=so(n,null)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Ms||(Ms=!0,js=r),ts(t,e)},n}function vs(t,e,n){(n=so(n,null)).tag=3;var r=t.type.getDerivedStateFromError;if("function"===typeof r){var i=e.value;n.payload=function(){return ts(t,e),r(i)}}var o=t.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Fs?Fs=new Set([this]):Fs.add(this),ts(t,e));var n=e.stack;this.componentDidCatch(e.value,{componentStack:null!==n?n:""})}),n}var ys,gs=Math.ceil,ms=X.ReactCurrentDispatcher,bs=X.ReactCurrentOwner,_s=0,ws=3,Es=4,Ts=0,Ss=null,Is=null,Cs=0,ks=_s,xs=null,Ns=1073741823,As=1073741823,Os=null,Ps=0,Rs=!1,Ds=0,Ls=null,Ms=!1,js=null,Fs=null,Us=!1,Vs=null,qs=90,Bs=null,zs=0,Ws=null,Hs=0;function Ks(){return 0!==(48&Ts)?1073741821-(Ui()/10|0):0!==Hs?Hs:Hs=1073741821-(Ui()/10|0)}function Gs(t,e,n){if(0===(2&(e=e.mode)))return 1073741823;var r=Vi();if(0===(4&e))return 99===r?1073741823:1073741822;if(0!==(16&Ts))return Cs;if(null!==n)t=Gi(t,0|n.timeoutMs||5e3,250);else switch(r){case 99:t=1073741823;break;case 98:t=Gi(t,150,100);break;case 97:case 96:t=Gi(t,5e3,250);break;case 95:t=2;break;default:throw Error(a(326))}return null!==Ss&&t===Cs&&--t,t}function Qs(t,e){if(50<zs)throw zs=0,Ws=null,Error(a(185));if(null!==(t=$s(t,e))){var n=Vi();1073741823===e?0!==(8&Ts)&&0===(48&Ts)?Zs(t):(Ys(t),0===Ts&&Hi()):Ys(t),0===(4&Ts)||98!==n&&99!==n||(null===Bs?Bs=new Map([[t,e]]):(void 0===(n=Bs.get(t))||n>e)&&Bs.set(t,e))}}function $s(t,e){t.expirationTime<e&&(t.expirationTime=e);var n=t.alternate;null!==n&&n.expirationTime<e&&(n.expirationTime=e);var r=t.return,i=null;if(null===r&&3===t.tag)i=t.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<e&&(r.childExpirationTime=e),null!==n&&n.childExpirationTime<e&&(n.childExpirationTime=e),null===r.return&&3===r.tag){i=r.stateNode;break}r=r.return}return null!==i&&(Ss===i&&(au(e),ks===Es&&Ru(i,Cs)),Du(i,e)),i}function Xs(t){var e=t.lastExpiredTime;if(0!==e)return e;if(!Pu(t,e=t.firstPendingTime))return e;var n=t.lastPingedTime;return 2>=(t=n>(t=t.nextKnownPendingLevel)?n:t)&&e!==t?0:t}function Ys(t){if(0!==t.lastExpiredTime)t.callbackExpirationTime=1073741823,t.callbackPriority=99,t.callbackNode=Wi(Zs.bind(null,t));else{var e=Xs(t),n=t.callbackNode;if(0===e)null!==n&&(t.callbackNode=null,t.callbackExpirationTime=0,t.callbackPriority=90);else{var r=Ks();if(1073741823===e?r=99:1===e||2===e?r=95:r=0>=(r=10*(1073741821-e)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var i=t.callbackPriority;if(t.callbackExpirationTime===e&&i>=r)return;n!==Pi&&Ti(n)}t.callbackExpirationTime=e,t.callbackPriority=r,e=1073741823===e?Wi(Zs.bind(null,t)):zi(r,Js.bind(null,t),{timeout:10*(1073741821-e)-Ui()}),t.callbackNode=e}}}function Js(t,e){if(Hs=0,e)return Lu(t,e=Ks()),Ys(t),null;var n=Xs(t);if(0!==n){if(e=t.callbackNode,0!==(48&Ts))throw Error(a(327));if(vu(),t===Ss&&n===Cs||nu(t,n),null!==Is){var r=Ts;Ts|=16;for(var i=iu();;)try{uu();break}catch(u){ru(t,u)}
vendor: 20,125 bytes, line 2
2if(Zi(),Ts=r,ms.current=i,1===ks)throw e=xs,nu(t,n),Ru(t,n),Ys(t),e;if(null===Is)switch(i=t.finishedWork=t.current.alternate,t.finishedExpirationTime=n,r=ks,Ss=null,r){case _s:case 1:throw Error(a(345));case 2:Lu(t,2<n?2:n);break;case ws:if(Ru(t,n),n===(r=t.lastSuspendedTime)&&(t.nextKnownPendingLevel=hu(i)),1073741823===Ns&&10<(i=Ds+500-Ui())){if(Rs){var o=t.lastPingedTime;if(0===o||o>=n){t.lastPingedTime=n,nu(t,n);break}}if(0!==(o=Xs(t))&&o!==n)break;if(0!==r&&r!==n){t.lastPingedTime=r;break}t.timeoutHandle=bn(fu.bind(null,t),i);break}fu(t);break;case Es:if(Ru(t,n),n===(r=t.lastSuspendedTime)&&(t.nextKnownPendingLevel=hu(i)),Rs&&(0===(i=t.lastPingedTime)||i>=n)){t.lastPingedTime=n,nu(t,n);break}if(0!==(i=Xs(t))&&i!==n)break;if(0!==r&&r!==n){t.lastPingedTime=r;break}if(1073741823!==As?r=10*(1073741821-As)-Ui():1073741823===Ns?r=0:(r=10*(1073741821-Ns)-5e3,0>(r=(i=Ui())-r)&&(r=0),(n=10*(1073741821-n)-i)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*gs(r/1960))-r)&&(r=n)),10<r){t.timeoutHandle=bn(fu.bind(null,t),r);break}fu(t);break;case 5:if(1073741823!==Ns&&null!==Os){o=Ns;var s=Os;if(0>=(r=0|s.busyMinDurationMs)?r=0:(i=0|s.busyDelayMs,r=(o=Ui()-(10*(1073741821-o)-(0|s.timeoutMs||5e3)))<=i?0:i+r-o),10<r){Ru(t,n),t.timeoutHandle=bn(fu.bind(null,t),r);break}}fu(t);break;default:throw Error(a(329))}if(Ys(t),t.callbackNode===e)return Js.bind(null,t)}}return null}function Zs(t){var e=t.lastExpiredTime;if(e=0!==e?e:1073741823,0!==(48&Ts))throw Error(a(327));if(vu(),t===Ss&&e===Cs||nu(t,e),null!==Is){var n=Ts;Ts|=16;for(var r=iu();;)try{su();break}catch(i){ru(t,i)}if(Zi(),Ts=n,ms.current=r,1===ks)throw n=xs,nu(t,e),Ru(t,e),Ys(t),n;if(null!==Is)throw Error(a(261));t.finishedWork=t.current.alternate,t.finishedExpirationTime=e,Ss=null,fu(t),Ys(t)}return null}function tu(t,e){var n=Ts;Ts|=1;try{return t(e)}finally{0===(Ts=n)&&Hi()}}function eu(t,e){var n=Ts;Ts&=-2,Ts|=8;try{return t(e)}finally{0===(Ts=n)&&Hi()}}function nu(t,e){t.finishedWork=null,t.finishedExpirationTime=0;var n=t.timeoutHandle;if(-1!==n&&(t.timeoutHandle=-1,_n(n)),null!==Is)for(n=Is.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&yi();break;case 3:Ro(),ui(fi),ui(hi);break;case 5:Lo(r);break;case 4:Ro();break;case 13:case 19:ui(Mo);break;case 10:to(r)}n=n.return}Ss=t,Is=Cu(t.current,null),Cs=e,ks=_s,xs=null,As=Ns=1073741823,Os=null,Ps=0,Rs=!1}function ru(t,e){for(;;){try{if(Zi(),Uo.current=ya,Ho)for(var n=Bo.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(qo=0,Wo=zo=Bo=null,Ho=!1,null===Is||null===Is.return)return ks=1,xs=e,Is=null;t:{var i=t,o=Is.return,a=Is,s=e;if(e=Cs,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"===typeof s&&"function"===typeof s.then){var u=s;if(0===(2&a.mode)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.expirationTime=c.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var l=0!==(1&Mo.current),h=o;do{var f;if(f=13===h.tag){var p=h.memoizedState;if(null!==p)f=null!==p.dehydrated;else{var d=h.memoizedProps;f=void 0!==d.fallback&&(!0!==d.unstable_avoidThisFallback||!l)}}if(f){var v=h.updateQueue;if(null===v){var y=new Set;y.add(u),h.updateQueue=y}else v.add(u);if(0===(2&h.mode)){if(h.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var g=so(1073741823,null);g.tag=2,uo(a,g)}a.expirationTime=1073741823;break t}s=void 0,a=e;var m=i.pingCache;if(null===m?(m=i.pingCache=new ps,s=new Set,m.set(u,s)):void 0===(s=m.get(u))&&(s=new Set,m.set(u,s)),!s.has(a)){s.add(a);var b=bu.bind(null,i,u,a);u.then(b,b)}h.effectTag|=4096,h.expirationTime=e;break t}h=h.return}while(null!==h);s=Error((yt(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+gt(a))}5!==ks&&(ks=2),s=Ja(s,a),h=o;do{switch(h.tag){case 3:u=s,h.effectTag|=4096,h.expirationTime=e,co(h,ds(h,u,e));break t;case 1:u=s;var _=h.type,w=h.stateNode;if(0===(64&h.effectTag)&&("function"===typeof _.getDerivedStateFromError||null!==w&&"function"===typeof w.componentDidCatch&&(null===Fs||!Fs.has(w)))){h.effectTag|=4096,h.expirationTime=e,co(h,vs(h,u,e));break t}}h=h.return}while(null!==h)}Is=lu(Is)}catch(E){e=E;continue}break}}function iu(){var t=ms.current;return ms.current=ya,null===t?ya:t}function ou(t,e){t<Ns&&2<t&&(Ns=t),null!==e&&t<As&&2<t&&(As=t,Os=e)}function au(t){t>Ps&&(Ps=t)}function su(){for(;null!==Is;)Is=cu(Is)}function uu(){for(;null!==Is&&!Ri();)Is=cu(Is)}function cu(t){var e=ys(t.alternate,t,Cs);return t.memoizedProps=t.pendingProps,null===e&&(e=lu(t)),bs.current=null,e}function lu(t){Is=t;do{var e=Is.alternate;if(t=Is.return,0===(2048&Is.effectTag)){if(e=Xa(e,Is,Cs),1===Cs||1!==Is.childExpirationTime){for(var n=0,r=Is.child;null!==r;){var i=r.expirationTime,o=r.childExpirationTime;i>n&&(n=i),o>n&&(n=o),r=r.sibling}Is.childExpirationTime=n}if(null!==e)return e;null!==t&&0===(2048&t.effectTag)&&(null===t.firstEffect&&(t.firstEffect=Is.firstEffect),null!==Is.lastEffect&&(null!==t.lastEffect&&(t.lastEffect.nextEffect=Is.firstEffect),t.lastEffect=Is.lastEffect),1<Is.effectTag&&(null!==t.lastEffect?t.lastEffect.nextEffect=Is:t.firstEffect=Is,t.lastEffect=Is))}else{if(null!==(e=Ya(Is)))return e.effectTag&=2047,e;null!==t&&(t.firstEffect=t.lastEffect=null,t.effectTag|=2048)}if(null!==(e=Is.sibling))return e;Is=t}while(null!==Is);return ks===_s&&(ks=5),null}function hu(t){var e=t.expirationTime;return e>(t=t.childExpirationTime)?e:t}function fu(t){var e=Vi();return Bi(99,pu.bind(null,t,e)),null}function pu(t,e){do{vu()}while(null!==Vs);if(0!==(48&Ts))throw Error(a(327));var n=t.finishedWork,r=t.finishedExpirationTime;if(null===n)return null;if(t.finishedWork=null,t.finishedExpirationTime=0,n===t.current)throw Error(a(177));t.callbackNode=null,t.callbackExpirationTime=0,t.callbackPriority=90,t.nextKnownPendingLevel=0;var i=hu(n);if(t.firstPendingTime=i,r<=t.lastSuspendedTime?t.firstSuspendedTime=t.lastSuspendedTime=t.nextKnownPendingLevel=0:r<=t.firstSuspendedTime&&(t.firstSuspendedTime=r-1),r<=t.lastPingedTime&&(t.lastPingedTime=0),r<=t.lastExpiredTime&&(t.lastExpiredTime=0),t===Ss&&(Is=Ss=null,Cs=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var o=Ts;Ts|=32,bs.current=null,vn=Ke;var s=pn();if(dn(s)){if("selectionStart"in s)var u={start:s.selectionStart,end:s.selectionEnd};else t:{var c=(u=(u=s.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(c&&0!==c.rangeCount){u=c.anchorNode;var l=c.anchorOffset,h=c.focusNode;c=c.focusOffset;try{u.nodeType,h.nodeType}catch(C){u=null;break t}var f=0,p=-1,d=-1,v=0,y=0,g=s,m=null;e:for(;;){for(var b;g!==u||0!==l&&3!==g.nodeType||(p=f+l),g!==h||0!==c&&3!==g.nodeType||(d=f+c),3===g.nodeType&&(f+=g.nodeValue.length),null!==(b=g.firstChild);)m=g,g=b;for(;;){if(g===s)break e;if(m===u&&++v===l&&(p=f),m===h&&++y===c&&(d=f),null!==(b=g.nextSibling))break;m=(g=m).parentNode}g=b}u=-1===p||-1===d?null:{start:p,end:d}}else u=null}u=u||{start:0,end:0}}else u=null;yn={activeElementDetached:null,focusedElem:s,selectionRange:u},Ke=!1,Ls=i;do{try{du()}catch(C){if(null===Ls)throw Error(a(330));mu(Ls,C),Ls=Ls.nextEffect}}while(null!==Ls);Ls=i;do{try{for(s=t,u=e;null!==Ls;){var _=Ls.effectTag;if(16&_&&Vt(Ls.stateNode,""),128&_){var w=Ls.alternate;if(null!==w){var E=w.ref;null!==E&&("function"===typeof E?E(null):E.current=null)}}switch(1038&_){case 2:cs(Ls),Ls.effectTag&=-3;break;case 6:cs(Ls),Ls.effectTag&=-3,hs(Ls.alternate,Ls);break;case 1024:Ls.effectTag&=-1025;break;case 1028:Ls.effectTag&=-1025,hs(Ls.alternate,Ls);break;case 4:hs(Ls.alternate,Ls);break;case 8:ls(s,l=Ls,u),ss(l)}Ls=Ls.nextEffect}}catch(C){if(null===Ls)throw Error(a(330));mu(Ls,C),Ls=Ls.nextEffect}}while(null!==Ls);if(E=yn,w=pn(),_=E.focusedElem,u=E.selectionRange,w!==_&&_&&_.ownerDocument&&function t(e,n){return!(!e||!n)&&(e===n||(!e||3!==e.nodeType)&&(n&&3===n.nodeType?t(e,n.parentNode):"contains"in e?e.contains(n):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(n))))}(_.ownerDocument.documentElement,_)){null!==u&&dn(_)&&(w=u.start,void 0===(E=u.end)&&(E=w),"selectionStart"in _?(_.selectionStart=w,_.selectionEnd=Math.min(E,_.value.length)):(E=(w=_.ownerDocument||document)&&w.defaultView||window).getSelection&&(E=E.getSelection(),l=_.textContent.length,s=Math.min(u.start,l),u=void 0===u.end?s:Math.min(u.end,l),!E.extend&&s>u&&(l=u,u=s,s=l),l=fn(_,s),h=fn(_,u),l&&h&&(1!==E.rangeCount||E.anchorNode!==l.node||E.anchorOffset!==l.offset||E.focusNode!==h.node||E.focusOffset!==h.offset)&&((w=w.createRange()).setStart(l.node,l.offset),E.removeAllRanges(),s>u?(E.addRange(w),E.extend(h.node,h.offset)):(w.setEnd(h.node,h.offset),E.addRange(w))))),w=[];for(E=_;E=E.parentNode;)1===E.nodeType&&w.push({element:E,left:E.scrollLeft,top:E.scrollTop});for("function"===typeof _.focus&&_.focus(),_=0;_<w.length;_++)(E=w[_]).element.scrollLeft=E.left,E.element.scrollTop=E.top}Ke=!!vn,yn=vn=null,t.current=n,Ls=i;do{try{for(_=t;null!==Ls;){var T=Ls.effectTag;if(36&T&&os(_,Ls.alternate,Ls),128&T){w=void 0;var S=Ls.ref;if(null!==S){var I=Ls.stateNode;switch(Ls.tag){case 5:w=I;break;default:w=I}"function"===typeof S?S(w):S.current=w}}Ls=Ls.nextEffect}}catch(C){if(null===Ls)throw Error(a(330));mu(Ls,C),Ls=Ls.nextEffect}}while(null!==Ls);Ls=null,Di(),Ts=o}else t.current=n;if(Us)Us=!1,Vs=t,qs=e;else for(Ls=i;null!==Ls;)e=Ls.nextEffect,Ls.nextEffect=null,Ls=e;if(0===(e=t.firstPendingTime)&&(Fs=null),1073741823===e?t===Ws?zs++:(zs=0,Ws=t):zs=0,"function"===typeof wu&&wu(n.stateNode,r),Ys(t),Ms)throw Ms=!1,t=js,js=null,t;return 0!==(8&Ts)||Hi(),null}function du(){for(;null!==Ls;){var t=Ls.effectTag;0!==(256&t)&&ns(Ls.alternate,Ls),0===(512&t)||Us||(Us=!0,zi(97,(function(){return vu(),null}))),Ls=Ls.nextEffect}}function vu(){if(90!==qs){var t=97<qs?97:qs;return qs=90,Bi(t,yu)}}function yu(){if(null===Vs)return!1;var t=Vs;if(Vs=null,0!==(48&Ts))throw Error(a(331));var e=Ts;for(Ts|=32,t=t.current.firstEffect;null!==t;){try{var n=t;if(0!==(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:rs(5,n),is(5,n)}}catch(r){if(null===t)throw Error(a(330));mu(t,r)}n=t.nextEffect,t.nextEffect=null,t=n}return Ts=e,Hi(),!0}function gu(t,e,n){uo(t,e=ds(t,e=Ja(n,e),1073741823)),null!==(t=$s(t,1073741823))&&Ys(t)}function mu(t,e){if(3===t.tag)gu(t,t,e);else for(var n=t.return;null!==n;){if(3===n.tag){gu(n,t,e);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Fs||!Fs.has(r))){uo(n,t=vs(n,t=Ja(e,t),1073741823)),null!==(n=$s(n,1073741823))&&Ys(n);break}}n=n.return}}function bu(t,e,n){var r=t.pingCache;null!==r&&r.delete(e),Ss===t&&Cs===n?ks===Es||ks===ws&&1073741823===Ns&&Ui()-Ds<500?nu(t,Cs):Rs=!0:Pu(t,n)&&(0!==(e=t.lastPingedTime)&&e<n||(t.lastPingedTime=n,Ys(t)))}function _u(t,e){var n=t.stateNode;null!==n&&n.delete(e),0===(e=0)&&(e=Gs(e=Ks(),t,null)),null!==(t=$s(t,e))&&Ys(t)}ys=function(t,e,n){var r=e.expirationTime;if(null!==t){var i=e.pendingProps;if(t.memoizedProps!==i||fi.current)Aa=!0;else{if(r<n){switch(Aa=!1,e.tag){case 3:Ua(e),xa();break;case 5:if(Do(e),4&e.mode&&1!==n&&i.hidden)return e.expirationTime=e.childExpirationTime=1,null;break;case 1:vi(e.type)&&bi(e);break;case 4:Po(e,e.stateNode.containerInfo);break;case 10:r=e.memoizedProps.value,i=e.type._context,ci($i,i._currentValue),i._currentValue=r;break;case 13:if(null!==e.memoizedState)return 0!==(r=e.child.childExpirationTime)&&r>=n?Wa(t,e,n):(ci(Mo,1&Mo.current),null!==(e=Qa(t,e,n))?e.sibling:null);ci(Mo,1&Mo.current);break;case 19:if(r=e.childExpirationTime>=n,0!==(64&t.effectTag)){if(r)return Ga(t,e,n);e.effectTag|=64}if(null!==(i=e.memoizedState)&&(i.rendering=null,i.tail=null),ci(Mo,Mo.current),!r)return null}return Qa(t,e,n)}Aa=!1}}else Aa=!1;switch(e.expirationTime=0,e.tag){case 2:if(r=e.type,null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),t=e.pendingProps,i=di(e,hi.current),no(e,n),i=Qo(null,e,r,t,i,n),e.effectTag|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,vi(r)){var o=!0;bi(e)}else o=!1;e.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,oo(e);var s=r.getDerivedStateFromProps;"function"===typeof s&&vo(e,r,s,t),i.updater=yo,e.stateNode=i,i._reactInternalFiber=e,_o(e,r,t,n),e=Fa(null,e,r,!0,o,n)}else e.tag=0,Oa(null,e,i,n),e=e.child;return e;case 16:t:{if(i=e.elementType,null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),t=e.pendingProps,function(t){if(-1===t._status){t._status=0;var e=t._ctor;e=e(),t._result=e,e.then((function(e){0===t._status&&(e=e.default,t._status=1,t._result=e)}),(function(e){0===t._status&&(t._status=2,t._result=e)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,e.type=i,o=e.tag=function(t){if("function"===typeof t)return Iu(t)?1:0;if(void 0!==t&&null!==t){if((t=t.$$typeof)===ut)return 11;if(t===ht)return 14}return 2}(i),t=Qi(i,t),o){case 0:e=Ma(null,e,i,t,n);break t;case 1:e=ja(null,e,i,t,n);break t;case 11:e=Pa(null,e,i,t,n);break t;case 14:e=Ra(null,e,i,Qi(i.type,t),r,n);break t}throw Error(a(306,i,""))}return e;case 0:return r=e.type,i=e.pendingProps,Ma(t,e,r,i=e.elementType===r?i:Qi(r,i),n);case 1:return r=e.type,i=e.pendingProps,ja(t,e,r,i=e.elementType===r?i:Qi(r,i),n);case 3:if(Ua(e),r=e.updateQueue,null===t||null===r)throw Error(a(282));if(r=e.pendingProps,i=null!==(i=e.memoizedState)?i.element:null,ao(t,e),lo(e,r,null,n),(r=e.memoizedState.element)===i)xa(),e=Qa(t,e,n);else{if((i=e.stateNode.hydrate)&&(wa=wn(e.stateNode.containerInfo.firstChild),_a=e,i=Ea=!0),i)for(n=Co(e,null,r,n),e.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Oa(t,e,r,n),xa();e=e.child}return e;case 5:return Do(e),null===t&&Ia(e),r=e.type,i=e.pendingProps,o=null!==t?t.memoizedProps:null,s=i.children,mn(r,i)?s=null:null!==o&&mn(r,o)&&(e.effectTag|=16),La(t,e),4&e.mode&&1!==n&&i.hidden?(e.expirationTime=e.childExpirationTime=1,e=null):(Oa(t,e,s,n),e=e.child),e;case 6:return null===t&&Ia(e),null;case 13:return Wa(t,e,n);case 4:return Po(e,e.stateNode.containerInfo),r=e.pendingProps,null===t?e.child=Io(e,null,r,n):Oa(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,Pa(t,e,r,i=e.elementType===r?i:Qi(r,i),n);case 7:return Oa(t,e,e.pendingProps,n),e.child;case 8:case 12:return Oa(t,e,e.pendingProps.children,n),e.child;case 10:t:{r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value;var u=e.type._context;if(ci($i,u._currentValue),u._currentValue=o,null!==s)if(u=s.value,0===(o=jr(u,o)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,o):1073741823))){if(s.children===i.children&&!fi.current){e=Qa(t,e,n);break t}}else for(null!==(u=e.child)&&(u.return=e);null!==u;){var c=u.dependencies;if(null!==c){s=u.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!==(l.observedBits&o)){1===u.tag&&((l=so(n,null)).tag=2,uo(u,l)),u.expirationTime<n&&(u.expirationTime=n),null!==(l=u.alternate)&&l.expirationTime<n&&(l.expirationTime=n),eo(u.return,n),c.expirationTime<n&&(c.expirationTime=n);break}l=l.next}}else s=10===u.tag&&u.type===e.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===e){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}Oa(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=(o=e.pendingProps).children,no(e,n),r=r(i=ro(i,o.unstable_observedBits)),e.effectTag|=1,Oa(t,e,r,n),e.child;case 14:return o=Qi(i=e.type,e.pendingProps),Ra(t,e,i,o=Qi(i.type,o),r,n);case 15:return Da(t,e,e.type,e.pendingProps,r,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Qi(r,i),null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),e.tag=1,vi(r)?(t=!0,bi(e)):t=!1,no(e,n),mo(e,r,i),_o(e,r,i,n),Fa(null,e,r,!0,t,n);case 19:return Ga(t,e,n)}throw Error(a(156,e.tag))};var wu=null,Eu=null;function Tu(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Su(t,e,n,r){return new Tu(t,e,n,r)}function Iu(t){return!(!(t=t.prototype)||!t.isReactComponent)}function Cu(t,e){var n=t.alternate;return null===n?((n=Su(t.tag,e,t.key,t.mode)).elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=t.childExpirationTime,n.expirationTime=t.expirationTime,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=null===e?null:{expirationTime:e.expirationTime,firstContext:e.firstContext,responders:e.responders},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function ku(t,e,n,r,i,o){var s=2;if(r=t,"function"===typeof t)Iu(t)&&(s=1);else if("string"===typeof t)s=5;else t:switch(t){case nt:return xu(n.children,i,o,e);case st:s=8,i|=7;break;case rt:s=8,i|=1;break;case it:return(t=Su(12,n,e,8|i)).elementType=it,t.type=it,t.expirationTime=o,t;case ct:return(t=Su(13,n,e,i)).type=ct,t.elementType=ct,t.expirationTime=o,t;case lt:return(t=Su(19,n,e,i)).elementType=lt,t.expirationTime=o,t;default:if("object"===typeof t&&null!==t)switch(t.$$typeof){case ot:s=10;break t;case at:s=9;break t;case ut:s=11;break t;case ht:s=14;break t;case ft:s=16,r=null;break t;case pt:s=22;break t}throw Error(a(130,null==t?t:typeof t,""))}return(e=Su(s,n,e,i)).elementType=t,e.type=r,e.expirationTime=o,e}function xu(t,e,n,r){return(t=Su(7,t,r,e)).expirationTime=n,t}function Nu(t,e,n){return(t=Su(6,t,null,e)).expirationTime=n,t}function Au(t,e,n){return(e=Su(4,null!==t.children?t.children:[],t.key,e)).expirationTime=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Ou(t,e,n){this.tag=e,this.current=null,this.containerInfo=t,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Pu(t,e){var n=t.firstSuspendedTime;return t=t.lastSuspendedTime,0!==n&&n>=e&&t<=e}function Ru(t,e){var n=t.firstSuspendedTime,r=t.lastSuspendedTime;n<e&&(t.firstSuspendedTime=e),(r>e||0===n)&&(t.lastSuspendedTime=e),e<=t.lastPingedTime&&(t.lastPingedTime=0),e<=t.lastExpiredTime&&(t.lastExpiredTime=0)}function Du(t,e){e>t.firstPendingTime&&(t.firstPendingTime=e);var n=t.firstSuspendedTime;0!==n&&(e>=n?t.firstSuspendedTime=t.lastSuspendedTime=t.nextKnownPendingLevel=0:e>=t.lastSuspendedTime&&(t.lastSuspendedTime=e+1),e>t.nextKnownPendingLevel&&(t.nextKnownPendingLevel=e))}function Lu(t,e){var n=t.lastExpiredTime;(0===n||n>e)&&(t.lastExpiredTime=e)}function Mu(t,e,n,r){var i=e.current,o=Ks(),s=fo.suspense;o=Gs(o,i,s);t:if(n){e:{if(Zt(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(vi(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(vi(c)){n=mi(n,c,u);break t}}n=u}else n=li;return null===e.context?e.context=n:e.pendingContext=n,(e=so(o,s)).payload={element:t},null!==(r=void 0===r?null:r)&&(e.callback=r),uo(i,e),Qs(i,o),o}function ju(t){if(!(t=t.current).child)return null;switch(t.child.tag){case 5:default:return t.child.stateNode}}function Fu(t,e){null!==(t=t.memoizedState)&&null!==t.dehydrated&&t.retryTime<e&&(t.retryTime=e)}function Uu(t,e){Fu(t,e),(t=t.alternate)&&Fu(t,e)}
vendor: 4,530 bytes, line 2
2function Vu(t,e,n){var r=new Ou(t,e,n=null!=n&&!0===n.hydrate),i=Su(3,null,null,2===e?7:1===e?3:0);r.current=i,i.stateNode=r,oo(i),t[Cn]=r.current,n&&0!==e&&function(t,e){var n=Jt(e);Ce.forEach((function(t){de(t,e,n)})),ke.forEach((function(t){de(t,e,n)}))}(0,9===t.nodeType?t:t.ownerDocument),this._internalRoot=r}function qu(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function Bu(t,e,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var s=i;i=function(){var t=ju(a);s.call(t)}}Mu(e,a,t,i)}else{if(o=n._reactRootContainer=function(t,e){if(e||(e=!(!(e=t?9===t.nodeType?t.documentElement:t.firstChild:null)||1!==e.nodeType||!e.hasAttribute("data-reactroot"))),!e)for(var n;n=t.lastChild;)t.removeChild(n);return new Vu(t,0,e?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"===typeof i){var u=i;i=function(){var t=ju(a);u.call(t)}}eu((function(){Mu(e,a,t,i)}))}return ju(a)}function zu(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:et,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}}function Wu(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!qu(e))throw Error(a(200));return zu(t,e,null,n)}Vu.prototype.render=function(t){Mu(t,this._internalRoot,null,null)},Vu.prototype.unmount=function(){var t=this._internalRoot,e=t.containerInfo;Mu(null,t,null,(function(){e[Cn]=null}))},ve=function(t){if(13===t.tag){var e=Gi(Ks(),150,100);Qs(t,e),Uu(t,e)}},ye=function(t){13===t.tag&&(Qs(t,3),Uu(t,3))},ge=function(t){if(13===t.tag){var e=Ks();Qs(t,e=Gs(e,t,null)),Uu(t,e)}},x=function(t,e,n){switch(e){case"input":if(It(t,n),e=n.name,"radio"===n.type&&null!=e){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=An(r);if(!i)throw Error(a(90));wt(r),It(r,i)}}}break;case"textarea":Pt(t,n);break;case"select":null!=(e=n.value)&&Nt(t,!!n.multiple,e,!1)}},D=tu,L=function(t,e,n,r,i){var o=Ts;Ts|=4;try{return Bi(98,t.bind(null,e,n,r,i))}finally{0===(Ts=o)&&Hi()}},M=function(){0===(49&Ts)&&(function(){if(null!==Bs){var t=Bs;Bs=null,t.forEach((function(t,e){Lu(e,t),Ys(e)})),Hi()}}(),vu())},j=function(t,e){var n=Ts;Ts|=2;try{return t(e)}finally{0===(Ts=n)&&Hi()}};var Hu={Events:[xn,Nn,An,C,T,jn,function(t){ie(t,Mn)},P,R,Ye,se,vu,{current:!1}]};!function(t){var e=t.findFiberByHostInstance;(function(t){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var e=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(e.isDisabled||!e.supportsFiber)return!0;try{var n=e.inject(t);wu=function(t){try{e.onCommitFiberRoot(n,t,void 0,64===(64&t.current.effectTag))}catch(r){}},Eu=function(t){try{e.onCommitFiberUnmount(n,t)}catch(r){}}}catch(r){}})(i({},t,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:X.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return null===(t=ne(t))?null:t.stateNode},findFiberByHostInstance:function(t){return e?e(t):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:kn,bundleType:0,version:"16.13.1",rendererPackageName:"react-dom"}),e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Hu,e.createPortal=Wu,e.findDOMNode=function(t){if(null==t)return null;if(1===t.nodeType)return t;var e=t._reactInternalFiber;if(void 0===e){if("function"===typeof t.render)throw Error(a(188));throw Error(a(268,Object.keys(t)))}return t=null===(t=ne(e))?null:t.stateNode},e.flushSync=function(t,e){if(0!==(48&Ts))throw Error(a(187));var n=Ts;Ts|=1;try{return Bi(99,t.bind(null,e))}finally{Ts=n,Hi()}},e.hydrate=function(t,e,n){if(!qu(e))throw Error(a(200));return Bu(null,t,e,!0,n)},e.render=function(t,e,n){if(!qu(e))throw Error(a(200));return Bu(null,t,e,!1,n)},e.unmountComponentAtNode=function(t){if(!qu(t))throw Error(a(40));return!!t._reactRootContainer&&(eu((function(){Bu(null,null,t,!1,(function(){t._reactRootContainer=null,t[Cn]=null}))})),!0)},e.unstable_batchedUpdates=tu,e.unstable_createPortal=function(t,e){return Wu(t,e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},e.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!qu(n))throw Error(a(200));if(null==t||void 0===t._reactInternalFiber)throw Error(a(38));return Bu(t,e,n,!1,r)},e.version="16.13.1"},function(t,e,n){"use strict";
2t.exports=n(43)},function(t,e,n){"use strict";var r,i,o,a,s;if("undefined"===typeof window||"function"!==typeof MessageChannel){var u=null,c=null,l=function t(){if(null!==u)try{var n=e.unstable_now();u(!0,n),u=null}catch(r){throw setTimeout(t,0),r}},h=Date.now();e.unstable_now=function(){return Date.now()-h},r=function(t){null!==u?setTimeout(r,0,t):(u=t,setTimeout(l,0))},i=function(t,e){c=setTimeout(t,e)},o=function(){clearTimeout(c)},a=function(){return!1},s=e.unstable_forceFrameRate=function(){}}else{var f=window.performance,p=window.Date,d=window.setTimeout,v=window.clearTimeout;if("undefined"!==typeof console){var y=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof y&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"===typeof f&&"function"===typeof f.now)e.unstable_now=function(){return f.now()};else{var g=p.now();e.unstable_now=function(){return p.now()-g}}var m=!1,b=null,_=-1,w=5,E=0;a=function(){return e.unstable_now()>=E},s=function(){},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):w=0<t?Math.floor(1e3/t):5};var T=new MessageChannel,S=T.port2;T.port1.onmessage=function(){if(null!==b){var t=e.unstable_now();E=t+w;try{b(!0,t)?S.postMessage(null):(m=!1,b=null)}catch(n){throw S.postMessage(null),n}}else m=!1},r=function(t){b=t,m||(m=!0,S.postMessage(null))},i=function(t,n){_=d((function(){t(e.unstable_now())}),n)},o=function(){v(_),_=-1}}function I(t,e){var n=t.length;t.push(e);t:for(;;){var r=n-1>>>1,i=t[r];if(!(void 0!==i&&0<x(i,e)))break t;t[r]=e,t[n]=i,n=r}}function C(t){return void 0===(t=t[0])?null:t}function k(t){var e=t[0];if(void 0!==e){var n=t.pop();if(n!==e){t[0]=n;t:for(var r=0,i=t.length;r<i;){var o=2*(r+1)-1,a=t[o],s=o+1,u=t[s];if(void 0!==a&&0>x(a,n))void 0!==u&&0>x(u,a)?(t[r]=u,t[s]=n,r=s):(t[r]=a,t[o]=n,r=o);else{if(!(void 0!==u&&0>x(u,n)))break t;t[r]=u,t[s]=n,r=s}}}return e}return null}function x(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}var N=[],A=[],O=1,P=null,R=3,D=!1,L=!1,M=!1;function j(t){for(var e=C(A);null!==e;){if(null===e.callback)k(A);else{if(!(e.startTime<=t))break;k(A),e.sortIndex=e.expirationTime,I(N,e)}e=C(A)}}function F(t){if(M=!1,j(t),!L)if(null!==C(N))L=!0,r(U);else{var e=C(A);null!==e&&i(F,e.startTime-t)}}function U(t,n){L=!1,M&&(M=!1,o()),D=!0;var r=R;try{for(j(n),P=C(N);null!==P&&(!(P.expirationTime>n)||t&&!a());){var s=P.callback;if(null!==s){P.callback=null,R=P.priorityLevel;var u=s(P.expirationTime<=n);n=e.unstable_now(),"function"===typeof u?P.callback=u:P===C(N)&&k(N),j(n)}else k(N);P=C(N)}if(null!==P)var c=!0;else{var l=C(A);null!==l&&i(F,l.startTime-n),c=!1}return c}finally{P=null,R=r,D=!1}}function V(t){switch(t){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var q=s;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){L||D||(L=!0,r(U))},e.unstable_getCurrentPriorityLevel=function(){return R},e.unstable_getFirstCallbackNode=function(){return C(N)},e.unstable_next=function(t){switch(R){case 1:case 2:case 3:var e=3;break;default:e=R}var n=R;R=e;try{return t()}finally{R=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=q,e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=R;R=t;try{return e()}finally{R=n}},e.unstable_scheduleCallback=function(t,n,a){var s=e.unstable_now();if("object"===typeof a&&null!==a){var u=a.delay;u="number"===typeof u&&0<u?s+u:s,a="number"===typeof a.timeout?a.timeout:V(t)}else a=V(t),u=s;return t={id:O++,callback:n,priorityLevel:t,startTime:u,expirationTime:a=u+a,sortIndex:-1},u>s?(t.sortIndex=u,I(A,t),null===C(N)&&t===C(A)&&(M?o():M=!0,i(F,u-s))):(t.sortIndex=a,I(N,t),L||D||(L=!0,r(U))),t},e.unstable_shouldYield=function(){var t=e.unstable_now();j(t);var n=C(N);return n!==P&&null!==P&&null!==n&&null!==n.callback&&n.startTime<=t&&n.expirationTime<P.expirationTime||a()},e.unstable_wrapCallback=function(t){var e=R;return function(){var n=R;R=e;try{return t.apply(this,arguments)}finally{R=n}}}},,,,function(t,e,n){(function(t){(function(){var e,r=n(4).default,i="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)};var o=function(e){e=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof t&&t,e];for(var n=0;n<e.length;++n){var r=e[n];if(r&&r.Math==Math)return r}return globalThis}(this);function a(t){var e=0;return function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}}function s(t){var e="undefined"!=typeof Symbol&&Symbol.iterator&&t[Symbol.iterator];return e?e.call(t):{next:a(t)}}!function(t,e){if(e){var n=o;t=t.split(".");for(var r=0;r<t.length-1;r++){var a=t[r];a in n||(n[a]={}),n=n[a]}(e=e(r=n[t=t[t.length-1]]))!=r&&null!=e&&i(n,t,{configurable:!0,writable:!0,value:e})}}("Promise",(function(t){function e(t){this.b=0,this.c=void 0,this.a=[];var e=this.f();try{t(e.resolve,e.reject)}catch(n){e.reject(n)}}function n(){this.a=null}function r(t){return t instanceof e?t:new e((function(e){e(t)}))}if(t)return t;n.prototype.b=function(t){if(null==this.a){this.a=[];var e=this;this.c((function(){e.g()}))}this.a.push(t)};var i=o.setTimeout;n.prototype.c=function(t){i(t,0)},n.prototype.g=function(){for(;this.a&&this.a.length;){var t=this.a;this.a=[];for(var e=0;e<t.length;++e){var n=t[e];t[e]=null;try{n()}catch(r){this.f(r)}}}this.a=null},n.prototype.f=function(t){this.c((function(){throw t}))},e.prototype.f=function(){function t(t){return function(r){n||(n=!0,t.call(e,r))}}var e=this,n=!1;return{resolve:t(this.m),reject:t(this.g)}}
vendor: 1,338 bytes, line 2
2,e.prototype.m=function(t){if(t===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(t instanceof e)this.s(t);else{t:switch(typeof t){case"object":var n=null!=t;break t;case"function":n=!0;break t;default:n=!1}n?this.u(t):this.h(t)}},e.prototype.u=function(t){var e=void 0;try{e=t.then}catch(n){return void this.g(n)}"function"==typeof e?this.w(e,t):this.h(t)},e.prototype.g=function(t){this.i(2,t)},e.prototype.h=function(t){this.i(1,t)},e.prototype.i=function(t,e){if(0!=this.b)throw Error("Cannot settle("+t+", "+e+"): Promise already settled in state"+this.b);this.b=t,this.c=e,this.l()},e.prototype.l=function(){if(null!=this.a){for(var t=0;t<this.a.length;++t)a.b(this.a[t]);this.a=null}};var a=new n;return e.prototype.s=function(t){var e=this.f();t.Oa(e.resolve,e.reject)},e.prototype.w=function(t,e){var n=this.f();try{t.call(e,n.resolve,n.reject)}catch(r){n.reject(r)}},e.prototype.then=function(t,n){function r(t,e){return"function"==typeof t?function(e){try{i(t(e))}catch(n){o(n)}}:e}var i,o,a=new e((function(t,e){i=t,o=e}));return this.Oa(r(t,i),r(n,o)),a},e.prototype.catch=function(t){return this.then(void 0,t)},e.prototype.Oa=function(t,e){function n(){switch(r.b){case 1:t(r.c);break;case 2:e(r.c);break;default:throw Error("Unexpected state: "+r.b)}}var r=this;null==this.a?a.b(n):this.a.push(n)}
2,e.resolve=r,e.reject=function(t){return new e((function(e,n){n(t)}))},e.race=function(t){return new e((function(e,n){for(var i=s(t),o=i.next();!o.done;o=i.next())r(o.value).Oa(e,n)}))},e.all=function(t){var n=s(t),i=n.next();return i.done?r([]):new e((function(t,e){function o(e){return function(n){a[e]=n,0==--s&&t(a)}}var a=[],s=0;do{a.push(void 0),s++,r(i.value).Oa(o(a.length-1),e),i=n.next()}while(!i.done)}))},e}));var u=u||{},c=this||self,l=/^[\w+/_-]+[=]{0,2}$/,h=null;function f(){}function p(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var n=Object.prototype.toString.call(t);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof t.length&&"undefined"!=typeof t.splice&&"undefined"!=typeof t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||"undefined"!=typeof t.call&&"undefined"!=typeof t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&"undefined"==typeof t.call)return"object";return e}function d(t){var e=p(t);return"array"==e||"object"==e&&"number"==typeof t.length}function v(t){return"function"==p(t)}function y(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}function g(t){return Object.prototype.hasOwnProperty.call(t,m)&&t[m]||(t[m]=++b)}var m="closure_uid_"+(1e9*Math.random()>>>0),b=0;function _(t,e,n){return t.call.apply(t.bind,arguments)}function w(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function E(t,e,n){return(E=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?_:w).apply(null,arguments)}function T(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}var S=Date.now||function(){return+new Date};function I(t,e){function n(){}n.prototype=e.prototype,t.Za=e.prototype,t.prototype=new n,t.prototype.constructor=t}
2function C(t,e,n){this.code=N+t,this.message=e||A[t]||"",this.a=n||null}function k(t){var e=t&&t.code;return e?new C(e.substring(N.length),t.message,t.serverResponse):null}I(C,Error),C.prototype.v=function(){var t={code:this.code,message:this.message};return this.a&&(t.serverResponse=this.a),t},C.prototype.toJSON=function(){return this.v()};var x,N="auth/",A={"admin-restricted-operation":"This operation is restricted to administrators only.","argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-change-needs-verification":"Multi-factor users must al
2ways have a verified email.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-dynamic-link-domain":"The provided dynamic link domain is not configured or authorized for the current project.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-multi-factor-session":"The request does not contain a valid proof of first factor successful sign-in.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invali
2d-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-provider-id":"The specified provider ID is invalid.","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","invalid-tenant-id":"The Auth instance's tenant ID is invalid.","multi-factor-info-not-found":"The user does not have a second factor matching the identifier provided.","multi-factor-auth-required":"Proof of ownership of a second factor is required to complete sign-in.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-multi-factor-info":"No second factor identifier is provided.","missing-multi-factor-session":"The request is missing proof of first factor successful sign-in.","missing-or-invalid-nonce":"The request does not contain a valid nonce. This can occur if the SHA-256 hash of the provided raw nonce does not match the hashed nonce in the ID token payload.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.","rejected-credential":"The request contains malformed or mismatching credentials.","second-factor-already-in-use":"The second factor is already enrolled on this account.","maximum-second-factor-count-exceeded":"The maximum allowed number of second factors on a user has been exceeded.","tenant-id-mismatch":"The provided tenant ID does not match the Auth instance's tenant ID",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.","unsupported-first-factor":"Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","unsupported-tenant-operation":"This operation is not supported in a multi-tenant context.","unverified-email":"The operation requires a verified email.","user-cancelled":"The user did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."},O={hd:{Ra:"https://staging-identitytoolkit.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",Xa:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Ua:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"b"},pd:{Ra:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",Xa:"https://securetoken.googleapis.com/v1/token",Ua:"https://identitytoolkit.googleapis.com/v2/",id:"p"},rd:{Ra:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",Xa:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Ua:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"s"},sd:{Ra:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",Xa:"https://test-securetoken.sandbox.googleapis.com/v1/token",Ua:"https://test-identitytoolkit.sandbox.googleapis.com/v2/",id:"t"}};function P(t){for(var e in O)if(O[e].id===t)return{firebaseEndpoint:(t=O[e]).Ra,secureTokenEndpoint:t.Xa,identityPlatformEndpoint:t.Ua};return null}function R(t){if(!t)return!1;
2try{return!!t.$goog_Thenable}catch(e){return!1}}function D(t){if(Error.captureStackTrace)Error.captureStackTrace(this,D);else{var e=Error().stack;e&&(this.stack=e)}t&&(this.message=String(t))}function L(t,e){for(var n="",r=(t=t.split("%s")).length-1,i=0;i<r;i++)n+=t[i]+(i<e.length?e[i]:"%s");D.call(this,n+t[r])}function M(t,e){throw new L("Failure"+(t?": "+t:""),Array.prototype.slice.call(arguments,1))}function j(t,e){this.c=t,this.f=e,this.b=0,this.a=null}function F(t,e){t.f(e),100>t.b&&(t.b++,e.next=t.a,t.a=e)}function U(){this.b=this.a=null}x=P("__EID__")?"__EID__":void 0,I(D,Error),D.prototype.name="CustomError",I(L,D),L.prototype.name="AssertionError",j.prototype.get=function(){if(0<this.b){this.b--;var t=this.a;this.a=t.next,t.next=null}else t=this.c();return t};var V=new j((function(){return new B}),(function(t){t.reset()}));function q(){var t=me,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function B(){this.next=this.b=this.a=null}U.prototype.add=function(t,e){var n=V.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},B.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},B.prototype.reset=function(){this.next=this.b=this.a=null};var z=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if("string"===typeof t)return"string"!==typeof e||1!=e.length?-1:t.indexOf(e,0);for(var n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1},W=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,i="string"===typeof t?t.split(""):t,o=0;o<r;o++)o in i&&e.call(n,i[o],o,t)};var H=Array.prototype.filter?function(t,e){return Array.prototype.filter.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=[],i=0,o="string"===typeof t?t.split(""):t,a=0;a<n;a++)if(a in o){var s=o[a];e.call(void 0,s,a,t)&&(r[i++]=s)}return r},K=Array.prototype.map?function(t,e){return Array.prototype.map.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=Array(n),i="string"===typeof t?t.split(""):t,o=0;o<n;o++)o in i&&(r[o]=e.call(void 0,i[o],o,t));return r},G=Array.prototype.some?function(t,e){return Array.prototype.some.call(t,e,void 0)}:function(t,e){for(var n=t.length,r="string"===typeof t?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t))return!0;return!1};function Q(t,e){return 0<=z(t,e)}function $(t,e){var n;return(n=0<=(e=z(t,e)))&&Array.prototype.splice.call(t,e,1),n}function X(t,e){!function(t,e){for(var n="string"===typeof t?t.split(""):t,r=t.length-1;0<=r;--r)r in n&&e.call(void 0,n[r],r,t)}(t,(function(n,r){e.call(void 0,n,r,t)&&1==Array.prototype.splice.call(t,r,1).length&&0}))}function Y(t){return Array.prototype.concat.apply([],arguments)}function J(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}var Z,tt=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]},et=/&/g,nt=/</g,rt=/>/g,it=/"/g,ot=/'/g,at=/\x00/g,st=/[\x00&<>"']/;function ut(t,e){return-1!=t.indexOf(e)}function ct(t,e){return t<e?-1:t>e?1:0}t:{var lt=c.navigator;if(lt){var ht=lt.userAgent;if(ht){Z=ht;break t}}Z=""}function ft(t){return ut(Z,t)}function pt(t,e){for(var n in t)e.call(void 0,t[n],n,t)}function dt(t){for(var e in t)return!1;return!0}function vt(t){var e,n={};for(e in t)n[e]=t[e];return n}var yt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function gt(t,e){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o<yt.length;o++)n=yt[o],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function mt(t,e){t:{try{var n=t&&t.ownerDocument,r=n&&(n.defaultView||n.parentWindow);if((r=r||c).Element&&r.Location){var i=r;break t}}catch(a){}i=null}if(i&&"undefined"!=typeof i[e]&&(!t||!(t instanceof i[e])&&(t instanceof i.Location||t instanceof i.Element))){if(y(t))try{var o=t.constructor.displayName||t.constructor.name||Object.prototype.toString.call(t)}catch(a){o="<object could not be stringified>"}else o=void 0===t?"undefined":null===t?"null":typeof t;M("Argument is not a %s (or a non-Element, non-Location mock); got: %s",e,o)}}function bt(t,e){this.a=t===Et&&e||"",this.b=wt}function _t(t){return t instanceof bt&&t.constructor===bt&&t.b===wt?t.a:(M("expected object of type Const, got '"+t+"'"),"type_error:Const")}bt.prototype.ra=!0,bt.prototype.qa=function(){return this.a},bt.prototype.toString=function(){return"Const{"+this.a+"}"};var wt={},Et={},Tt=new bt(Et,"");function St(t,e){this.a=t===At&&e||"",this.b=Nt}function It(t){return t instanceof St&&t.constructor===St&&t.b===Nt?t.a:(M("expected object of type TrustedResourceUrl, got '"+t+"' of type "+p(t)),"type_error:TrustedResourceUrl")}function Ct(t,e){var n=_t(t);if(!xt.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return t=n.replace(kt,(function(t,r){if(!Object.prototype.hasOwnProperty.call(e,r))throw Error('Found marker, "'+r+'", in format str
2ing, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(e));return(t=e[r])instanceof bt?_t(t):encodeURIComponent(String(t))})),new St(At,t)}St.prototype.ra=!0,St.prototype.qa=function(){return this.a.toString()},St.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var kt=/%{(\w+)}/g,xt=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,Nt={},At={};function Ot(t,e){this.a=t===Mt&&e||"",this.b=Lt}function Pt(t){return t instanceof Ot&&t.constructor===Ot&&t.b===Lt?t.a:(M("expected object of type SafeUrl, got '"+t+"' of type "+p(t)),"type_error:SafeUrl")}Ot.prototype.ra=!0,Ot.prototype.qa=function(){return this.a.toString()},Ot.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var Rt=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function Dt(t){return t instanceof Ot?t:(t="object"==typeof t&&t.ra?t.qa():String(t),Rt.test(t)||(t="about:invalid#zClosurez"),new Ot(Mt,t))}var Lt={},Mt={};function jt(){this.a="",this.b=Ut}function Ft(t){return t instanceof jt&&t.constructor===jt&&t.b===Ut?t.a:(M("expected object of type SafeHtml, got '"+t+"' of type "+p(t)),"type_error:SafeHtml")}jt.prototype.ra=!0,jt.prototype.qa=function(){return this.a.toString()},jt.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var Ut={};function Vt(t){var e=new jt;return e.a=t,e}Vt("<!DOCTYPE html>");var qt=Vt("");function Bt(t,e){for(var n=t.split("%s"),r="",i=Array.prototype.slice.call(arguments,1);i.length&&1<n.length;)r+=n.shift()+i.shift();return r+n.join("%s")}function zt(t){return st.test(t)&&(-1!=t.indexOf("&")&&(t=t.replace(et,"&")),-1!=t.indexOf("<")&&(t=t.replace(nt,"<")),-1!=t.indexOf(">")&&(t=t.replace(rt,">")),-1!=t.indexOf('"')&&(t=t.replace(it,""")),-1!=t.indexOf("'")&&(t=t.replace(ot,"'")),-1!=t.indexOf("\0")&&(t=t.replace(at,"�"))),t}function Wt(t){return Wt[" "](t),t}Vt("<br>"),Wt[" "]=f;var Ht,Kt=ft("Opera"),Gt=ft("Trident")||ft("MSIE"),Qt=ft("Edge"),$t=Qt||Gt,Xt=ft("Gecko")&&!(ut(Z.toLowerCase(),"webkit")&&!ft("Edge"))&&!(ft("Trident")||ft("MSIE"))&&!ft("Edge"),Yt=ut(Z.toLowerCase(),"webkit")&&!ft("Edge");function Jt(){var t=c.document;return t?t.documentMode:void 0}t:{var Zt="",te=function(){var t=Z;return Xt?/rv:([^\);]+)(\)|;)/.exec(t):Qt?/Edge\/([\d\.]+)/.exec(t):Gt?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t):Yt?/WebKit\/(\S+)/.exec(t):Kt?/(?:Version)[ \/]?(\S+)/.exec(t):void 0}();if(te&&(Zt=te?te[1]:""),Gt){var ee=Jt();if(null!=ee&&ee>parseFloat(Zt)){Ht=String(ee);break t}}Ht=Zt}var ne,re={};function ie(t){return function(t,e){var n=re;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}(t,(function(){for(var e=0,n=tt(String(Ht)).split("."),r=tt(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&o<i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;e=ct(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||ct(0==a[2].length,0==s[2].length)||ct(a[2],s[2]),a=a[3],s=s[3]}while(0==e)}return 0<=e}))}ne=c.document&&Gt?Jt():void 0;try{new self.OffscreenCanvas(0,0).getContext("2d")}catch(aa){}var oe=!Gt||9<=Number(ne);function ae(t){var e=document;return"string"===typeof t?e.getElementById(t):t}function se(t,e){pt(e,(function(e,n){e&&"object"==typeof e&&e.ra&&(e=e.qa()),"style"==n?t.style.cssText=e:"class"==n?t.className=e:"for"==n?t.htmlFor=e:le.hasOwnProperty(n)?t.setAttribute(le[n],e):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?t.setAttribute(n,e):t[n]=e}))}var ue,ce,le={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function he(t,e,n){function r(n){n&&e.appendChild("string"===typeof n?t.createTextNode(n):n)}for(var i=2;i<n.length;i++){var o=n[i];!d(o)||y(o)&&0<o.nodeType?r(o):W(pe(o)?J(o):o,r)}}function fe(t,e){return e=String(e),"application/xhtml+xml"===t.contentType&&(e=e.toLowerCase()),t.createElement(e)}function pe(t){if(t&&"number"==typeof t.length){if(y(t))return"function"==typeof t.item||"string"==typeof t.item;if(v(t))return"function"==typeof t.item}return!1}function de(t){c.setTimeout((function(){throw t}),0)}function ve(){var t=c.MessageChannel;if("undefined"===typeof t&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!ft("Presto")&&(t=function(){var t=fe(document,"IFRAME");t.style.display="none",function(t){var e=new St(At,_t(Tt));mt(t,"HTMLIFrameElement"),t.src=It(e).toString()}(t),document.documentElement.appendChild(t);var e=t.contentWindow;(t=e.document).open(),t.write(Ft(qt)),t.close();
2var n="callImmediate"+Math.random(),r="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host;t=E((function(t){"*"!=r&&t.origin!=r||t.data!=n||this.port1.onmessage()}),this),e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(n,r)}}}),"undefined"!==typeof t&&!ft("Trident")&&!ft("MSIE")){var e=new t,n={},r=n;return e.port1.onmessage=function(){if(void 0!==n.next){var t=(n=n.next).Db;n.Db=null,t()}},function(t){r.next={Db:t},r=r.next,e.port2.postMessage(0)}}return function(t){c.setTimeout(t,0)}}function ye(t,e){ce||function(){if(c.Promise&&c.Promise.resolve){var t=c.Promise.resolve(void 0);ce=function(){t.then(be)}}else ce=function(){var t=be;!v(c.setImmediate)||c.Window&&c.Window.prototype&&!ft("Edge")&&c.Window.prototype.setImmediate==c.setImmediate?(ue||(ue=ve()),ue(t)):c.setImmediate(t)}}(),ge||(ce(),ge=!0),me.add(t,e)}var ge=!1,me=new U;function be(){for(var t;t=q();){try{t.a.call(t.b)}catch(e){de(e)}F(V,t)}ge=!1}function _e(t,e){if(this.a=we,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,t!=f)try{var n=this;t.call(e,(function(t){Re(n,Ee,t)}),(function(t){if(!(t instanceof Ve))try{if(t instanceof Error)throw t;throw Error("Promise rejected.")}catch(e){}Re(n,Te,t)}))}catch(r){Re(this,Te,r)}}var we=0,Ee=2,Te=3;function Se(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}Se.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var Ie=new j((function(){return new Se}),(function(t){t.reset()}));function Ce(t,e,n){var r=Ie.get();return r.g=t,r.b=e,r.f=n,r}function ke(t){if(t instanceof _e)return t;var e=new _e(f);return Re(e,Ee,t),e}
2function xe(t){return new _e((function(e,n){n(t)}))}function Ne(t,e,n){De(t,e,n,null)||ye(T(e,t))}function Ae(t){return new _e((function(e){var n=t.length,r=[];if(n)for(var i=function(t,i,o){n--,r[t]=i?{Mb:!0,value:o}:{Mb:!1,reason:o},0==n&&e(r)},o=0;o<t.length;o++)Ne(t[o],T(i,o,!0),T(i,o,!1));else e(r)}))}function Oe(t,e){t.b||t.a!=Ee&&t.a!=Te||Le(t),t.f?t.f.next=e:t.b=e,t.f=e}function Pe(t,e,n,r){var i=Ce(null,null,null);return i.a=new _e((function(t,o){i.g=e?function(n){try{var i=e.call(r,n);t(i)}catch(a){o(a)}}:t,i.b=n?function(e){try{var i=n.call(r,e);void 0===i&&e instanceof Ve?o(e):t(i)}catch(a){o(a)}}:o})),i.a.c=t,Oe(t,i),i.a}function Re(t,e,n){t.a==we&&(t===n&&(e=Te,n=new TypeError("Promise cannot resolve to itself")),t.a=1,De(n,t.Yc,t.Zc,t)||(t.i=n,t.a=e,t.c=null,Le(t),e!=Te||n instanceof Ve||function(t,e){t.g=!0,ye((function(){t.g&&Ue.call(null,e)}))}(t,n)))}function De(t,e,n,r){if(t instanceof _e)return Oe(t,Ce(e||f,n||null,r)),!0;if(R(t))return t.then(e,n,r),!0;if(y(t))try{var i=t.then;if(v(i))return function(t,e,n,r,i){function o(t){a||(a=!0,r.call(i,t))}var a=!1;try{e.call(t,(function(t){a||(a=!0,n.call(i,t))}),o)}catch(s){o(s)}}(t,i,e,n,r),!0}catch(o){return n.call(r,o),!0}return!1}function Le(t){t.h||(t.h=!0,ye(t.ec,t))}function Me(t){var e=null;return t.b&&(e=t.b,t.b=e.next,e.next=null),t.b||(t.f=null),e}function je(t,e,n,r){if(n==Te&&e.b&&!e.c)for(;t&&t.g;t=t.c)t.g=!1;if(e.a)e.a.c=null,Fe(e,n,r);else try{e.c?e.g.call(e.f):Fe(e,n,r)}catch(i){Ue.call(null,i)}F(Ie,e)}function Fe(t,e,n){e==Ee?t.g.call(t.f,n):t.b&&t.b.call(t.f,n)}_e.prototype.then=function(t,e,n){return Pe(this,v(t)?t:null,v(e)?e:null,n)},_e.prototype.$goog_Thenable=!0,(e=_e.prototype).ma=function(t,e){return(t=Ce(t,t,e)).c=!0,Oe(this,t),this},e.o=function(t,e){return Pe(this,null,t,e)},e.cancel=function(t){if(this.a==we){var e=new Ve(t);ye((function(){!function t(e,n){if(e.a==we)if(e.c){var r=e.c;if(r.b){for(var i=0,o=null,a=null,s=r.b;s&&(s.c||(i++,s.a==e&&(o=s),!(o&&1<i)));s=s.next)o||(a=s);o&&(r.a==we&&1==i?t(r,n):(a?((i=a).next==r.f&&(r.f=i),i.next=i.next.next):Me(r),je(r,o,Te,n)))}e.c=null}else Re(e,Te,n)}(this,e)}),this)}},e.Yc=function(t){this.a=we,Re(this,Ee,t)},e.Zc=function(t){this.a=we,Re(this,Te,t)},e.ec=function(){for(var t;t=Me(this);)je(this,t,this.a,this.i);this.h=!1};var Ue=de;function Ve(t){D.call(this,t)}function qe(){0!=Be&&(ze[g(this)]=this),this.wa=this.wa,this.na=this.na}I(Ve,D),Ve.prototype.name="cancel";var Be=0,ze={};function We(t){if(!t.wa&&(t.wa=!0,t.Ba(),0!=Be)){var e=g(t);if(0!=Be&&t.na&&0<t.na.length)throw Error(t+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete ze[e]}}qe.prototype.wa=!1,qe.prototype.Ba=function(){if(this.na)for(;this.na.length;)this.na.shift()()};var He=Object.freeze||function(t){return t},Ke=!Gt||9<=Number(ne),Ge=Gt&&!ie("9"),Qe=function(){if(!c.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});try{c.addEventListener("test",f,e),c.removeEventListener("test",f,e)}catch(n){}return t}();function $e(t,e){this.type=t,this.b=this.target=e,this.defaultPrevented=!1}function Xe(t,e){if($e.call(this,t?t.type:""),this.relatedTarget=this.b=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.a=null,t){var n=this.type=t.type,r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.b=e,e=t.relatedTarget){if(Xt){t:{try{Wt(e.nodeName);var i=!0;break t}catch(o){}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType="string"===typeof t.pointerType?t.pointerType:Ye[t.pointerType]||"",this.a=t,t.defaultPrevented&&this.preventDefault()}}$e.prototype.preventDefault=function(){this.defaultPrevented=!0},I(Xe,$e);var Ye=He({2:"touch",3:"pen",4:"mouse"});Xe.prototype.preventDefault=function(){Xe.Za.preventDefault.call(this);var t=this.a;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,Ge)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(e){}},Xe.prototype.f=function(){return this.a};var Je="closure_listenable_"+(1e6*Math.random()|0),Ze=0;function tn(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.Ta=i,this.key=++Ze,this.ua=this.Na=!1}function en(t){t.ua=!0,t.listener=null,t.proxy=null,t.src=null,t.Ta=null}function nn(t){this.src=t,this.a={},this.b=0}function rn(t,e){var n=e.type;n in t.a&&$(t.a[n],e)&&(en(e),0==t.a[n].length&&(delete t.a[n],t.b--))}function on(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.ua&&o.listener==e&&o.capture==!!n&&o.Ta==r)return i}return-1}nn.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=on(t,e,r,i);return-1<a?(e=t[a],n||(e.Na=!1)):((e=new tn(e,this.src,o,!!r,i)).Na=n,t.pu
2sh(e)),e};var an="closure_lm_"+(1e6*Math.random()|0),sn={};function un(t,e,n,r,i){if(r&&r.once)ln(t,e,n,r,i);else if(Array.isArray(e))for(var o=0;o<e.length;o++)un(t,e[o],n,r,i);else n=bn(n),t&&t[Je]?wn(t,e,n,y(r)?!!r.capture:!!r,i):cn(t,e,n,!1,r,i)}function cn(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var a=y(i)?!!i.capture:!!i,s=gn(t);if(s||(t[an]=s=new nn(t)),!(n=s.add(e,n,r,a,o)).proxy){if(r=function(){var t=yn,e=Ke?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)Qe||(i=a),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(pn(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}0}}function ln(t,e,n,r,i){if(Array.isArray(e))for(var o=0;o<e.length;o++)ln(t,e[o],n,r,i);else n=bn(n),t&&t[Je]?En(t,e,n,y(r)?!!r.capture:!!r,i):cn(t,e,n,!0,r,i)}function hn(t,e,n,r,i){if(Array.isArray(e))for(var o=0;o<e.length;o++)hn(t,e[o],n,r,i);else r=y(r)?!!r.capture:!!r,n=bn(n),t&&t[Je]?(t=t.u,(e=String(e).toString())in t.a&&(-1<(n=on(o=t.a[e],n,r,i))&&(en(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete t.a[e],t.b--)))):t&&(t=gn(t))&&(e=t.a[e.toString()],t=-1,e&&(t=on(e,n,r,i)),(n=-1<t?e[t]:null)&&fn(n))}function fn(t){if("number"!==typeof t&&t&&!t.ua){var e=t.src;if(e&&e[Je])rn(e.u,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(pn(n),r):e.addListener&&e.removeListener&&e.removeListener(r),(n=gn(e))?(rn(n,t),0==n.b&&(n.src=null,e[an]=null)):en(t)}}}function pn(t){return t in sn?sn[t]:sn[t]="on"+t}function dn(t,e,n,r){var i=!0;if((t=gn(t))&&(e=t.a[e.toString()]))for(e=e.concat(),t=0;t<e.length;t++){var o=e[t];o&&o.capture==n&&!o.ua&&(o=vn(o,r),i=i&&!1!==o)}return i}function vn(t,e){var n=t.listener,r=t.Ta||t.src;return t.Na&&fn(t),n.call(r,e)}function yn(t,e){if(t.ua)return!0;if(!Ke){if(!e)t:{e=["window","event"];for(var n=c,r=0;r<e.length;r++)if(null==(n=n[e[r]])){e=null;break t}e=n}if(e=new Xe(r=e,this),n=!0,!(0>r.keyCode||void 0!=r.returnValue)){t:{var i=!1;if(0==r.keyCode)try{r.keyCode=-1;break t}catch(a){i=!0}(i||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],i=e.b;i;i=i.parentNode)r.push(i);for(t=t.type,i=r.length-1;0<=i;i--){e.b=r[i];var o=dn(r[i],t,!0,e);n=n&&o}for(i=0;i<r.length;i++)e.b=r[i],o=dn(r[i],t,!1,e),n=n&&o}return n}return vn(t,new Xe(e,this))}function gn(t){return(t=t[an])instanceof nn?t:null}var mn="__closure_events_fn_"+(1e9*Math.random()>>>0);function bn(t){return v(t)?t:(t[mn]||(t[mn]=function(e){return t.handleEvent(e)}),t[mn])}function _n(){qe.call(this),this.u=new nn(this),this.Yb=this,this.eb=null}function wn(t,e,n,r,i){t.u.add(String(e),n,!1,r,i)}function En(t,e,n,r,i){t.u.add(String(e),n,!0,r,i)}function Tn(t,e,n,r){if(!(e=t.u.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var a=e[o];if(a&&!a.ua&&a.capture==n){var s=a.listener,u=a.Ta||a.src;a.Na&&rn(t.u,a),i=!1!==s.call(u,r)&&i}}return i&&!r.defaultPrevented}function Sn(t,e,n){if(v(t))n&&(t=E(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=E(t.handleEvent,t)}return 2147483647<Number(e)?-1:c.setTimeout(t,e||0)}function In(t){var e=null;return new _e((function(n,r){-1==(e=Sn((function(){n(void 0)}),t))&&r(Error("Failed to schedule timer."))})).o((function(t){throw c.clearTimeout(e),t}))}function Cn(t){if(t.V&&"function"==typeof t.V)return t.V();if("string"===typeof t)return t.split("");if(d(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}for(r in e=[],n=0,t)e[n++]=t[r];return e}function kn(t){if(t.X&&"function"==typeof t.X)return t.X();if(!t.V||"function"!=typeof t.V){if(d(t)||"string"===typeof t){var e=[];t=t.length;for(var n=0;n<t;n++)e.push(n);return e}for(var r in e=[],n=0,t)e[n++]=r;return e}}function xn(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof xn)for(n=t.X(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function Nn(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];An(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e<t.a.length;)An(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function An(t,e){return Object.prototype.hasOwnProperty.call(t,e)}I(_n,qe),_n.prototype[Je]=!0,_n.prototype.addEventListener=function(t,e,n,r){un(this,t,e,n,r)},_n.prototype.removeEventListener=function(t,e,n,r){hn(this,t,e,n,r)},_n.prototype.dispatchEvent=function(t){var e,n=this.eb;if(n)for(e=[];n;n=n.eb)e.push(n);n=this.Yb;var r=t.type||t;if("string"===typeof t)t=new $e(t,n);else if(t instanceof $e)t.target=t.target||n;else{var i=t;gt(t=new $e(r,n),i)}if(i=!0,e)for(var o=e.length-1;0<=o;o--){var a=t.b=e[o];i=Tn(a,r,!0,t)&&i}if(i=Tn(a=t.b=n,r,!0,t)&&i,i=Tn(a,r,!1,t)&&i,e)for(o=0;o<e.length;o++)i=Tn(a=t.b=e[o],r,!1,t)&&i;return i},_n.prototype.Ba=function(){if(_n.Za.Ba.call(this),this.u){var t,e=this.u;for(t in e.a){for(var n=e.a[t],r=0;r<n.length;r++)en(n[r]);delete e.a[t],e.b--}}this.eb=null},(e=xn.prototype).V=function(){Nn(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},e.X=function(){return Nn(this),this.a.concat()},e.clear=function(){this.b={},this.c=this.a.length=0},e.get=function(t,e){return An(this.b,t)?this.b[t]:e},e.set=function(t,e){An(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},e.forEach=function(t,e){for(var n=this.X(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var On=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/\\#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Pn(t,e){var n;this.b=this.i=this.f="",this.l=null,this.g=this.c="",this.h=!1,t instanceof Pn?(this.h=void 0!==e?e:t.h,Rn(this,t.f),this.i=t.i,this.b=t.b,Dn(this,t.l),this.c=t.c,Ln(this,tr(t.a)),this.g=t.g):t&&(n=String(t).match(On))?(this.h=!!e,Rn(this,n[1]||"",!0),this.i=Vn(n[2]||""),this.b=Vn(n[3]||"",!0),Dn(this,n[4]),this.c=Vn(n[5]||"",!0),Ln(this,n[6]||"",!0),this.g=Vn(n[7]||"")):(this.h=!!e,this.a=new Qn(null,this.h))}
2function Rn(t,e,n){t.f=n?Vn(e,!0):e,t.f&&(t.f=t.f.replace(/:$/,""))}function Dn(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.l=e}else t.l=null}function Ln(t,e,n){e instanceof Qn?(t.a=e,function(t,e){e&&!t.f&&($n(t),t.c=null,t.a.forEach((function(t,e){var n=e.toLowerCase();e!=n&&(Yn(this,e),Zn(this,n,t))}),t)),t.f=e}(t.a,t.h)):(n||(e=qn(e,Kn)),t.a=new Qn(e,t.h))}function Mn(t,e,n){t.a.set(e,n)}function jn(t,e){return t.a.get(e)}function Fn(t){return t instanceof Pn?new Pn(t):new Pn(t,void 0)}function Un(t,e){var n=new Pn(null,void 0);return Rn(n,"https"),t&&(n.b=t),e&&(n.c=e),n}function Vn(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function qn(t,e,n){return"string"===typeof t?(t=encodeURI(t).replace(e,Bn),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function Bn(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}Pn.prototype.toString=function(){var t=[],e=this.f;e&&t.push(qn(e,zn,!0),":");var n=this.b;return(n||"file"==e)&&(t.push("//"),(e=this.i)&&t.push(qn(e,zn,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.l)&&t.push(":",String(n))),(n=this.c)&&(this.b&&"/"!=n.charAt(0)&&t.push("/"),t.push(qn(n,"/"==n.charAt(0)?Hn:Wn,!0))),(n=this.a.toString())&&t.push("?",n),(n=this.g)&&t.push("#",qn(n,Gn)),t.join("")},Pn.prototype.resolve=function(t){var e=new Pn(this),n=!!t.f;n?Rn(e,t.f):n=!!t.i,n?e.i=t.i:n=!!t.b,n?e.b=t.b:n=null!=t.l;var r=t.c;if(n)Dn(e,t.l);else if(n=!!t.c){if("/"!=r.charAt(0))if(this.b&&!this.c)r="/"+r;else{var i=e.c.lastIndexOf("/");-1!=i&&(r=e.c.substr(0,i+1)+r)}if(".."==(i=r)||"."==i)r="";else if(ut(i,"./")||ut(i,"/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var o=[],a=0;a<i.length;){var s=i[a++];"."==s?r&&a==i.length&&o.push(""):".."==s?((1<o.length||1==o.length&&""!=o[0])&&o.pop(),r&&a==i.length&&o.push("")):(o.push(s),r=!0)}r=o.join("/")}else r=i}return n?e.c=r:n=""!==t.a.toString(),n?Ln(e,tr(t.a)):n=!!t.g,n&&(e.g=t.g),e};var zn=/[#\/\?@]/g,Wn=/[#\?:]/g,Hn=/[#\?]/g,Kn=/[#\?@]/g,Gn=/#/g;function Qn(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function $n(t){t.a||(t.a=new xn,t.b=0,t.c&&function(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(t.c,(function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)})))}function Xn(t){var e=kn(t);if("undefined"==typeof e)throw Error("Keys are undefined");var n=new Qn(null,void 0);t=Cn(t);for(var r=0;r<e.length;r++){var i=e[r],o=t[r];Array.isArray(o)?Zn(n,i,o):n.add(i,o)}return n}function Yn(t,e){$n(t),e=er(t,e),An(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,An((t=t.a).b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&Nn(t)))}function Jn(t,e){return $n(t),e=er(t,e),An(t.a.b,e)}function Zn(t,e,n){Yn(t,e),0<n.length&&(t.c=null,t.a.set(er(t,e),J(n)),t.b+=n.length)}function tr(t){var e=new Qn;return e.c=t.c,t.a&&(e.a=new xn(t.a),e.b=t.b),e}function er(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}function nr(t){var e=[];return function t(e,n,r){if(null==n)r.push("null");else{if("object"==typeof n){if(Array.isArray(n)){var i=n;n=i.length,r.push("[");for(var o="",a=0;a<n;a++)r.push(o),t(e,i[a],r),o=",";return void r.push("]")}if(!(n instanceof String||n instanceof Number||n instanceof Boolean)){for(i in r.push("{"),o="",n)Object.prototype.hasOwnProperty.call(n,i)&&("function"!=typeof(a=n[i])&&(r.push(o),ar(i,r),r.push(":"),t(e,a,r),o=","));return void r.push("}")}n=n.valueOf()}switch(typeof n){case"string":ar(n,r);break;case"number":r.push(isFinite(n)&&!isNaN(n)?String(n):"null");break;case"boolean":r.push(String(n));break;case"function":r.push("null");break;default:throw Error("Unknown type: "+typeof n)}}}(new rr,t,e),e.join("")}function rr(){}(e=Qn.prototype).add=function(t,e){$n(this),this.c=null,t=er(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},e.clear=function(){this.a=this.c=null,this.b=0},e.forEach=function(t,e){$n(this),this.a.forEach((function(n,r){W(n,(function(n){t.call(e,n,r,this)}),this)}),this)},e.X=function(){$n(this);for(var t=this.a.V(),e=this.a.X(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},e.V=function(t){$n(this);var e=[];
2if("string"===typeof t)Jn(this,t)&&(e=Y(e,this.a.get(er(this,t))));else{t=this.a.V();for(var n=0;n<t.length;n++)e=Y(e,t[n])}return e},e.set=function(t,e){return $n(this),this.c=null,Jn(this,t=er(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},e.get=function(t,e){return t&&0<(t=this.V(t)).length?String(t[0]):e},e.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.X(),n=0;n<e.length;n++){var r=e[n],i=encodeURIComponent(String(r));r=this.V(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),t.push(a)}}return this.c=t.join("&")};var ir={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},or=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function ar(t,e){e.push('"',t.replace(or,(function(t){var e=ir[t];return e||(e="\\u"+(65536|t.charCodeAt(0)).toString(16).substr(1),ir[t]=e),e})),'"')}function sr(){var t=Cr();return Gt&&!!ne&&11==ne||/Edge\/\d+/.test(t)}function ur(){return c.window&&c.window.location.href||self&&self.location&&self.location.href||""}function cr(t,e){e=e||c.window;var n="about:blank";t&&(n=Pt(Dt(t))),e.location.href=n}function lr(t){return!!((t=(t||Cr()).toLowerCase()).match(/android/)||t.match(/webos/)||t.match(/iphone|ipad|ipod/)||t.match(/blackberry/)||t.match(/windows phone/)||t.match(/iemobile/))}function hr(t){t=t||c.window;try{t.close()}catch(e){}}function fr(t,e,n){var r=Math.floor(1e9*Math.random()).toString();e=e||500,n=n||600;var i=(window.screen.availHeight-n)/2,o=(window.screen.availWidth-e)/2;for(a in e={width:e,height:n,top:0<i?i:0,left:0<o?o:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},n=Cr().toLowerCase(),r&&(e.target=r,ut(n,"crios/")&&(e.target="_blank")),Tr(Cr())==wr&&(t=t||"http://localhost",e.scrollbars=!0),n=t||"",(t=e)||(t={}),r=window,e=n instanceof Ot?n:Dt("undefined"!=typeof n.href?n.href:String(n)),n=t.target||n.target,i=[],t)switch(a){case"width":case"height":case"top":case"left":i.push(a+"="+t[a]);break;case"target":case"noopener":case"noreferrer":break;default:i.push(a+"="+(t[a]?1:0))}var a=i.join(",");if((ft("iPhone")&&!ft("iPod")&&!ft("iPad")||ft("iPad")||ft("iPod"))&&r.navigator&&r.navigator.standalone&&n&&"_self"!=n?(mt(a=fe(document,"A"),"HTMLAnchorElement"),e instanceof Ot||e instanceof Ot||(e="object"==typeof e&&e.ra?e.qa():String(e),Rt.test(e)||(e="about:invalid#zClosurez"),e=new Ot(Mt,e)),a.href=Pt(e),a.setAttribute("target",n),t.noreferrer&&a.setAttribute("rel","noreferrer"),(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,r,1),a.dispatchEvent(t),a={}):t.noreferrer?(a=r.open("",n,a),t=Pt(e),a&&($t&&ut(t,";")&&(t="'"+t.replace(/'/g,"%27")+"'"),a.opener=null,t=Vt('<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+zt(t)+'">'),r=a.document)&&(r.write(Ft(t)),r.close())):(a=r.open(Pt(e),n,a))&&t.noopener&&(a.opener=null),a)try{a.focus()}catch(s){}return a}var pr=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,dr=/^[^@]+@[^@]+$/;function vr(){var t=null;return new _e((function(e){"complete"==c.document.readyState?e():(t=function(){e()},ln(window,"load",t))})).o((function(e){throw hn(window,"load",t),e}))}function yr(t){return t=t||Cr(),!("file:"!==Or()&&"ionic:"!==Or()||!t.toLowerCase().match(/iphone|ipad|ipod|android/))}function gr(){var t=c.window;try{return!(!t||t==t.top)}catch(e){return!1}}function mr(){return"undefined"!==typeof c.WorkerGlobalScope&&"function"===typeof c.importScripts}function br(){return r.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":r.INTERNAL.hasOwnProperty("node")?"Node":mr()?"Worker":"Browser"}function _r(){var t=br();return"ReactNative"===t||"Node"===t}var wr="Firefox",Er="Chrome";function Tr(t){var e=t.toLowerCase();return ut(e,"opera/")||ut(e,"opr/")||ut(e,"opios/")?"Opera":ut(e,"iemobile")?"IEMobile":ut(e,"msie")||ut(e,"trident/")?"IE":ut(e,"edge/")?"Edge":ut(e,"firefox/")?wr:ut(e,"silk/")?"Silk":ut(e,"blackberry")?"Blackberry":ut(e,"webos")?"Webos":!ut(e,"safari/")||ut(e,"chrome/")||ut(e,"crios/")||ut(e,"android")?!ut(e,"chrome/")&&!ut(e,"crios/")||ut(e,"edge/")?ut(e,"android")?"Android":(t=t.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==t.length?t[1]:"Other":Er:"Safari"}var Sr={jd:"FirebaseCore-web",ld:"FirebaseUI-web"};function Ir(t,e){e=e||[];var n,r=[],i={};for(n in Sr)i[Sr[n]]=!0;for(n=0;n<e.length;n++)"undefined"!==typeof i[e[n]]&&(delete i[e[n]],r.push(e[n]));return r.sort(),(e=r).length||(e=["FirebaseCore-web"]),"Browser"===(r=br())?r=Tr(i=Cr()):"Worker"===r&&(r=Tr(i=Cr())+"-"+r),r+"/JsCore/"+t+"/"+e.join(",")}function Cr(){return c.navigator&&c.navigator.userAgent||""}function kr(t,e){t=t.split("."),e=e||c;for(var n=0;n<t.length&&"object"==typeof e&&null!=e;n++)e=e[t[n]];return n!=t.length&&(e=void 0),e}function xr(){try{var t=c.localStorage,e=Mr();if(t)return t.setItem(e,"1"),t.removeItem(e),!sr()||!!c.indexedDB}catch(n){return mr()&&!!c.indexedDB}return!1}function Nr(){return(Ar()||"chrome-extension:"===Or()||yr())&&!_r()&&xr()&&!mr()}function Ar(){return"http:"===Or()||"https:"===Or()}function Or(){return c.location&&c.location.protocol||null}function Pr(t){return!lr(t=t||Cr())&&Tr(t)!=wr}function Rr(t){return"undefined"===typeof t?null:nr(t)}function Dr(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&null!==t[e]&&void 0!==t[e]&&(n[e]=t[e]);return n}function Lr(t){if(null!==t)return JSON.parse(t)}function Mr(t){return t||Math.floor(1e9*Math.random()).toString()}function jr(t){return"Safari"!=Tr(t=t||Cr())&&!t.toLowerCase().match(/iphone|ipad|ipod/)}function Fr(){var t=c.___jsl;if(t&&t.H)for(var e in t.H)if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=t.H[e].L.concat(),t.CP)for(var n=0;n<t.CP.length;n++)t.CP[n]=null}function Ur(t,e){if(t>
2e)throw Error("Short delay should be less than long delay!");this.a=t,this.c=e,t=Cr(),e=br(),this.b=lr(t)||"ReactNative"===e}function Vr(){var t=c.document;return!t||"undefined"===typeof t.visibilityState||"visible"==t.visibilityState}function qr(t){try{var e=new Date(parseInt(t,10));if(!isNaN(e.getTime())&&!/[^0-9]/.test(t))return e.toUTCString()}catch(n){}return null}function Br(){return!(!kr("fireauth.oauthhelper",c)&&!kr("fireauth.iframe",c))}Ur.prototype.get=function(){var t=c.navigator;return!t||"boolean"!==typeof t.onLine||!Ar()&&"chrome-extension:"!==Or()&&"undefined"===typeof t.connection||t.onLine?this.b?this.c:this.a:Math.min(5e3,this.a)};var zr,Wr={};function Hr(t){Wr[t]||(Wr[t]=!0,"undefined"!==typeof console&&"function"===typeof console.warn&&console.warn(t))}try{var Kr={};Object.defineProperty(Kr,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Kr,"abcd",{configurable:!0,enumerable:!0,value:2}),zr=2==Kr.abcd}catch(aa){zr=!1}function Gr(t,e,n){zr?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n}):t[e]=n}function Qr(t,e){if(e)for(var n in e)e.hasOwnProperty(n)&&Gr(t,n,e[n])}function $r(t){var e={};return Qr(e,t),e}function Xr(t){var e=t;if("object"==typeof t&&null!=t)for(var n in e="length"in t?[]:{},t)Gr(e,n,Xr(t[n]));return e}function Yr(t){var e=t&&(t[ni]?"phone":null);if(!(e&&t&&t[ei]))throw new C("internal-error","Internal assert: invalid MultiFactorInfo object");Gr(this,"uid",t[ei]),Gr(this,"displayName",t[Zr]||null);var n=null;t[ti]&&(n=new Date(t[ti]).toUTCString()),Gr(this,"enrollmentTime",n),Gr(this,"factorId",e)}function Jr(t){try{var e=new ri(t)}catch(n){e=null}return e}Yr.prototype.v=function(){return{uid:this.uid,displayName:this.displayName,factorId:this.factorId,enrollmentTime:this.enrollmentTime}};var Zr="displayName",ti="enrolledAt",ei="mfaEnrollmentId",ni="phoneInfo";function ri(t){Yr.call(this,t),Gr(this,"phoneNumber",t[ni])}function ii(t){var e={},n=t[ui],r=t[li],i=t[hi];if(t=Jr(t[ci]),!i||i!=ai&&i!=si&&!n||i==si&&!r||i==oi&&!t)throw Error("Invalid checkActionCode response!");i==si?(e[pi]=n||null,e[vi]=n||null,e[fi]=r):(e[pi]=r||null,e[vi]=r||null,e[fi]=n||null),e[di]=t||null,Gr(this,gi,i),Gr(this,yi,Xr(e))}I(ri,Yr),ri.prototype.v=function(){var t=ri.Za.v.call(this);return t.phoneNumber=this.phoneNumber,t};var oi="REVERT_SECOND_FACTOR_ADDITION",ai="EMAIL_SIGNIN",si="VERIFY_AND_CHANGE_EMAIL",ui="email",ci="mfaInfo",li="newEmail",hi="requestType",fi="email",pi="fromEmail",di="multiFactorInfo",vi="previousEmail",yi="data",gi="operation";function mi(t){var e=jn(t=Fn(t),bi)||null,n=jn(t,_i)||null,r=jn(t,Ti)||null;if(r=r&&Ii[r]||null,!e||!n||!r)throw new C("argument-error",bi+", "+_i+"and "+Ti+" are required in a valid action code URL.");Qr(this,{apiKey:e,operation:r,code:n,continueUrl:jn(t,wi)||null,languageCode:jn(t,Ei)||null,tenantId:jn(t,Si)||null})}var bi="apiKey",_i="oobCode",wi="continueUrl",Ei="languageCode",Ti="mode",Si="tenantId",Ii={recoverEmail:"RECOVER_EMAIL",resetPassword:"PASSWORD_RESET",revertSecondFactorAddition:oi,signIn:ai,verifyAndChangeEmail:si,verifyEmail:"VERIFY_EMAIL"};function Ci(t){try{return new mi(t)}catch(e){return null}}function ki(t){var e=t[Pi];if("undefined"===typeof e)throw new C("missing-continue-uri");if("string"!==typeof e||"string"===typeof e&&!e.length)throw new C("invalid-continue-uri");this.h=e,this.b=this.a=null,this.g=!1;var n=t[xi];if(n&&"object"===typeof n){e=n[Li];var r=n[Ri];if(n=n[Di],"string"===typeof e&&e.length){if(this.a=e,"undefined"!==typeof r&&"boolean"!==typeof r)throw new C("argument-error",Ri+" property must be a boolean when specified.");if(this.g=!!r,"undefined"!==typeof n&&("string"!==typeof n||"string"===typeof n&&!n.length))throw new C("argument-error",Di+" property must be a non empty string when specified.");this.b=n||null}else{if("undefined"!==typeof e)throw new C("argument-error",Li+" property must be a non empty string when specified.");if("undefined"!==typeof r||"undefined"!==typeof n)throw new C("missing-android-pkg-name")}}else if("undefined"!==typeof n)throw new C("argument-error",xi+" property must be a non null object when specified.");if(this.f=null,(e=t[Oi])&&"object"===typeof e){if("string"===typeof(e=e[Mi])&&e.length)this.f=e;else if("undefined"!==typeof e)throw new C("argument-error",Mi+" property must be a non empty string when specified.")}else if("undefined"!==typeof e)throw new C("argument-error",Oi+" property must be a non null object when specified.");if("undefined"!==typeof(e=t[Ai])&&"boolean"!==typeof e)throw new C("argument-error",Ai+" property must be a boolean when specified.");if(this.c=!!e,"undefined"!==typeof(t=t[Ni])&&("string"!==typeof t||"string"===typeof t&&!t.length))throw new C("argument-error",Ni+" property must be a non empty string when specified.");this.i=t||null}var xi="android",Ni="dynamicLinkDomain",Ai="handleCodeInApp",Oi="iOS",Pi="url",Ri="installApp",Di="minimumVersion",Li="packageName",Mi="bundleId";function ji(t){var e={};for(var n in e.continueUrl=t.h,e.canHandleCodeInApp=t.c,(e.androidPackageName=t.a)&&(e.androidMinimumVersion=t.b,e.androidInstallApp=t.g),e.iOSBundleId=t.f,e.dynamicLinkDomain=t.i,e)null===e[n]&&delete e[n];return e}var Fi=null;function Ui(t){var e="";return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),i=Fi[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}!function(){if(!Fi){Fi={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++)for(var r=t.concat(e[n].split("")),i=0;i<r.length;i++){var o=r[i];void 0===Fi[o]&&(Fi[o]=i)}}}();for(var r=0;;){var i=n(-1),o=n(0),a=n(64),s=n(64);if(64===s&&-1===i)break;e(i<<2|o>>4),64!=a&&(e(o<<4&240|a>>2),64!=s&&e(a<<6&192|s))}}(t,(function(t){e+=String.fromCharCode(t)})),e}function Vi(t){var e=Bi(t);
2if(!(e&&e.sub&&e.iss&&e.aud&&e.exp))throw Error("Invalid JWT");this.g=t,this.c=e.exp,this.h=e.sub,S(),this.a=e.provider_id||e.firebase&&e.firebase.sign_in_provider||null,this.f=e.firebase&&e.firebase.tenant||null,this.b=!!e.is_anonymous||"anonymous"==this.a}function qi(t){try{return new Vi(t)}catch(e){return null}}function Bi(t){if(!t)return null;if(3!=(t=t.split(".")).length)return null;for(var e=(4-(t=t[1]).length%4)%4,n=0;n<e;n++)t+=".";try{return JSON.parse(Ui(t))}catch(r){}return null}Vi.prototype.S=function(){return this.f},Vi.prototype.i=function(){return this.b},Vi.prototype.toString=function(){return this.g};var zi="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),Wi=["client_id","response_type","scope","redirect_uri","state"],Hi={kd:{Ha:"locale",ta:700,sa:600,ea:"facebook.com",Va:Wi},md:{Ha:null,ta:500,sa:750,ea:"github.com",Va:Wi},nd:{Ha:"hl",ta:515,sa:680,ea:"google.com",Va:Wi},td:{Ha:"lang",ta:485,sa:705,ea:"twitter.com",Va:zi},gd:{Ha:"locale",ta:640,sa:600,ea:"apple.com",Va:[]}};function Ki(t){for(var e in Hi)if(Hi[e].ea==t)return Hi[e];return null}function Gi(t){var e={};e["facebook.com"]=Ji,e["google.com"]=to,e["github.com"]=Zi,e["twitter.com"]=eo;var n=t&&t[$i];try{if(n)return e[n]?new e[n](t):new Yi(t);if("undefined"!==typeof t[Qi])return new Xi(t)}catch(r){}return null}var Qi="idToken",$i="providerId";function Xi(t){var e=t[$i];if(!e&&t[Qi]){var n=qi(t[Qi]);n&&n.a&&(e=n.a)}if(!e)throw Error("Invalid additional user info!");"anonymous"!=e&&"custom"!=e||(e=null),n=!1,"undefined"!==typeof t.isNewUser?n=!!t.isNewUser:"identitytoolkit#SignupNewUserResponse"===t.kind&&(n=!0),Gr(this,"providerId",e),Gr(this,"isNewUser",n)}function Yi(t){Xi.call(this,t),Gr(this,"profile",Xr((t=Lr(t.rawUserInfo||"{}"))||{}))}function Ji(t){if(Yi.call(this,t),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function Zi(t){if(Yi.call(this,t),"github.com"!=this.providerId)throw Error("Invalid provider ID!");Gr(this,"username",this.profile&&this.profile.login||null)}function to(t){if(Yi.call(this,t),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function eo(t){if(Yi.call(this,t),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");Gr(this,"username",t.screenName||null)}function no(t){var e=Fn(t),n=jn(e,"link"),r=jn(Fn(n),"link");return e=jn(e,"deep_link_id"),jn(Fn(e),"link")||e||r||n||t}function ro(t,e){if(!t&&!e)throw new C("internal-error","Internal assert: no raw session string available");if(t&&e)throw new C("internal-error","Internal assert: unable to determine the session type");this.a=t||null,this.b=e||null,this.type=this.a?io:oo}I(Yi,Xi),I(Ji,Yi),I(Zi,Yi),I(to,Yi),I(eo,Yi);var io="enroll",oo="signin";function ao(){}function so(t,e){return t.then((function(t){if(t[Xa]){var n=qi(t[Xa]);if(!n||e!=n.h)throw new C("user-mismatch");return t}throw new C("user-mismatch")})).o((function(t){throw t&&t.code&&t.code==N+"user-not-found"?new C("user-mismatch"):t}))}function uo(t,e){if(!e)throw new C("internal-error","failed to construct a credential");this.a=e,Gr(this,"providerId",t),Gr(this,"signInMethod",t)}function co(t){return{pendingToken:t.a,requestUri:"http://localhost"}}function lo(t){if(t&&t.providerId&&t.signInMethod&&0==t.providerId.indexOf("saml.")&&t.pendingToken)try{return new uo(t.providerId,t.pendingToken)}catch(e){}return null}function ho(t,e,n){if(this.a=null,e.idToken||e.accessToken)e.idToken&&Gr(this,"idToken",e.idToken),e.accessToken&&Gr(this,"accessToken",e.accessToken),e.nonce&&!e.pendingToken&&Gr(this,"nonce",e.nonce),e.pendingToken&&(this.a=e.pendingToken);else{if(!e.oauthToken||!e.oauthTokenSecret)throw new C("internal-error","failed to construct a credential");Gr(this,"accessToken",e.oauthToken),Gr(this,"secret",e.oauthTokenSecret)}Gr(this,"providerId",t),Gr(this,"signInMethod",n)}function fo(t){var e={};return t.idToken&&(e.id_token=t.idToken),t.accessToken&&(e.access_token=t.accessToken),t.secret&&(e.oauth_token_secret=t.secret),e.providerId=t.providerId,t.nonce&&!t.a&&(e.nonce=t.nonce),e={postBody:Xn(e).toString(),requestUri:"http://localhost"},t.a&&(delete e.postBody,e.pendingToken=t.a),e}function po(t){if(t&&t.providerId&&t.signInMethod){var e={idToken:t.oauthIdToken,accessToken:t.oauthTokenSecret?null:t.oauthAccessToken,oauthTokenSecret:t.oauthTokenSecret,oauthToken:t.oauthTokenSecret&&t.oauthAccessToken,nonce:t.nonce,pendingToken:t.pendingToken};try{return new ho(t.providerId,e,t.signInMethod)}catch(n){}}return null}function vo(t,e){this.Oc=e||[],Qr(this,{providerId:t,isOAuthProvider:!0}),this.Fb={},this.lb=(Ki(t)||{}).Ha||null,this.kb=null}function yo(t){if("string"!==typeof t||0!=t.indexOf("saml."))throw new C("argument-error",'SAML provider IDs must be prefixed with "saml."');vo.call(this,t,[])}function go(t){vo.call(this,t,Wi),this.a=[]}function mo(){go.call(this,"facebook.com")}function bo(t){if(!t)throw new C("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return y(t)&&(e=t.accessToken),(new mo).credential({accessToken:e})}function _o(){go.call(this,"github.com")}function wo(t){if(!t)throw new C("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return y(t)&&(e=t.accessToken),(new _o).credential({accessToken:e})}function Eo(){go.call(this,"google.com"),this.Aa("profile")}function To(t,e){var n=t;return y(t)&&(n=t.idToken,e=t.accessToken),(new Eo).credential({idToken:n,accessToken:e})}function So(){vo.call(this,"twitter.com",zi)}function Io(t,e){var n=t;if(y(n)||(n={oauthToken:t,oauthTokenSecret:e}),!n.oauthToken||!n.oauthTokenSecret)throw new C("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new ho("twitter.com",n,"twitter.com")}function Co(t,e,n){this.a=t,this.f=e,Gr(this,"providerId","password"),Gr(this,"signInMethod",n===xo.EMAIL_LINK_SIGN_IN_METHOD?xo.EMAIL_LINK_SIGN_IN_METHOD:xo.EMAIL_PASSWORD_SIGN_IN_METHOD)}function ko(t){return t&&t.email&&t.password?new Co(t.email,t.password,t.signInMethod):null}function xo(){Qr(this,{providerId:"password",isOAuthProvider:!1})}function No(t,e){if(!(e=Ao(e)))throw new C("argument-error","Invalid email link!");return new Co(t,e.code,xo.EMAIL_LINK_SIGN_IN_METHOD)}function Ao(t){return(t=Ci(t=no(t)))&&t.operation===ai?t:null}function Oo(t){if(!(t.bb&&t.ab||t.Ja&&t.da))throw new C("internal-error");this.a=t,Gr(this,"providerId","phone"),this.ea="phone",Gr(this,"signInMethod","phone")}function Po(t){if(t&&"phone"===t.providerId&&(t.verificationId&&t.verificationCode||t.temporaryProof&&t.phoneNumber)){var e={};return W(["verificationId","verificationCode","temporaryProof","phoneNumber"],(function(n){t[n]&&(e[n]=t[n])})),new Oo(e)}return null}function Ro(t){return t.a.Ja&&t.a.da?{temporaryProof:t.a.Ja,phoneNumber:t.a.da}:{sessionInfo:t.a.bb,code:t.a.ab}}function Do(t){try{this.a=t||r.auth()}catch(e){throw new C("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}Qr(this,{providerId:"phone",isOAuthProvider:!1})}function Lo(t,e){if(!t)throw new C("missing-verification-id");if(!e)throw new C("missing-verification-code");return new Oo({bb:t,ab:e})}function Mo(t){if(t.temporaryProof&&t.phoneNumber)return new Oo({Ja:t.temporaryProof,da:t.phoneNumber});var e=t&&t.providerId;if(!e||"password"===e)return null;var n=t&&t.oauthAccessToken,r=t&&t.oauthTokenSecret,i=t&&t.nonce,o=t&&t.oauthIdToken,a=t&&t.pendingToken;try{switch(e){case"google.com":return To(o,n);case"facebook.com":return bo(n);case"github.com":return wo(n);case"twitter.com":return Io(n,r);default:return n||r||o||a?a?0==e.indexOf("saml.")?new uo(e,a):new ho(e,{pendingToken:a,idToken:t.oauthIdToken,accessToken:t.oauthAccessToken},e):new go(e).credential({idToken:o,accessToken:n,rawNonce:i}):null}}catch(s){return null}}function jo(t){if(!t.isOAuthProvider)throw new C("invalid-oauth-provider")}function Fo(t,e,n,r,i,o,a){if(this.c=t,this.b=e||null,this.g=n||null,this.f=r||null,this.i=o||null,this.h=a||null,this.a=i||null,!this.g&&!this.a)throw new C("invalid-auth-event");
2if(this.g&&this.a)throw new C("invalid-auth-event");if(this.g&&!this.f)throw new C("invalid-auth-event")}function Uo(t){return(t=t||{}).type?new Fo(t.type,t.eventId,t.urlResponse,t.sessionId,t.error&&k(t.error),t.postBody,t.tenantId):null}function Vo(){this.b=null,this.a=[]}ro.prototype.Fa=function(){return this.a?ke(this.a):ke(this.b)},ro.prototype.v=function(){return this.type==io?{multiFactorSession:{idToken:this.a}}:{multiFactorSession:{pendingCredential:this.b}}},ao.prototype.ia=function(){},ao.prototype.b=function(){},ao.prototype.c=function(){},ao.prototype.v=function(){},uo.prototype.ia=function(t){return ys(t,co(this))},uo.prototype.b=function(t,e){var n=co(this);return n.idToken=e,gs(t,n)},uo.prototype.c=function(t,e){return so(ms(t,co(this)),e)},uo.prototype.v=function(){return{providerId:this.providerId,signInMethod:this.signInMethod,pendingToken:this.a}},ho.prototype.ia=function(t){return ys(t,fo(this))},ho.prototype.b=function(t,e){var n=fo(this);return n.idToken=e,gs(t,n)},ho.prototype.c=function(t,e){return so(ms(t,fo(this)),e)},ho.prototype.v=function(){var t={providerId:this.providerId,sign
2InMethod:this.signInMethod};return this.idToken&&(t.oauthIdToken=this.idToken),this.accessToken&&(t.oauthAccessToken=this.accessToken),this.secret&&(t.oauthTokenSecret=this.secret),this.nonce&&(t.nonce=this.nonce),this.a&&(t.pendingToken=this.a),t},vo.prototype.Ia=function(t){return this.Fb=vt(t),this},I(yo,vo),I(go,vo),go.prototype.Aa=function(t){return Q(this.a,t)||this.a.push(t),this},go.prototype.Nb=function(){return J(this.a)},go.prototype.credential=function(t,e){var n;if(!(n=y(t)?{idToken:t.idToken||null,accessToken:t.accessToken||null,nonce:t.rawNonce||null}:{idToken:t||null,accessToken:e||null}).idToken&&!n.accessToken)throw new C("argument-error","credential failed: must provide the ID token and/or the access token.");return new ho(this.providerId,n,this.providerId)},I(mo,go),Gr(mo,"PROVIDER_ID","facebook.com"),Gr(mo,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),I(_o,go),Gr(_o,"PROVIDER_ID","github.com"),Gr(_o,"GITHUB_SIGN_IN_METHOD","github.com"),I(Eo,go),Gr(Eo,"PROVIDER_ID","google.com"),Gr(Eo,"GOOGLE_SIGN_IN_METHOD","google.com"),I(So,vo),Gr(So,"PROVIDER_ID","twitter.com"),Gr(So,"TWITTER_SIGN_IN_METHOD","twitter.com"),Co.prototype.ia=function(t){return this.signInMethod==xo.EMAIL_LINK_SIGN_IN_METHOD?Zs(t,Cs,{email:this.a,oobCode:this.f}):Zs(t,Qs,{email:this.a,password:this.f})},Co.prototype.b=function(t,e){return this.signInMethod==xo.EMAIL_LINK_SIGN_IN_METHOD?Zs(t,ks,{idToken:e,email:this.a,oobCode:this.f}):Zs(t,Vs,{idToken:e,email:this.a,password:this.f})},Co.prototype.c=function(t,e){return so(this.ia(t),e)},Co.prototype.v=function(){return{email:this.a,password:this.f,signInMethod:this.signInMethod}},Qr(xo,{PROVIDER_ID:"password"}),Qr(xo,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Qr(xo,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Oo.prototype.ia=function(t){return t.cb(Ro(this))},Oo.prototype.b=function(t,e){var n=Ro(this);return n.idToken=e,Zs(t,Xs,n)},Oo.prototype.c=function(t,e){var n=Ro(this);return n.operation="REAUTH",so(t=Zs(t,Ys,n),e)},Oo.prototype.v=function(){var t={providerId:"phone"};return this.a.bb&&(t.verificationId=this.a.bb),this.a.ab&&(t.verificationCode=this.a.ab),this.a.Ja&&(t.temporaryProof=this.a.Ja),this.a.da&&(t.phoneNumber=this.a.da),t},Do.prototype.cb=function(t,e){var n=this.a.b;return ke(e.verify()).then((function(r){if("string"!==typeof r)throw new C("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(e.type){case"recaptcha":var i=y(t)?t.session:null,o=y(t)?t.phoneNumber:t;return(i&&i.type==io?i.Fa().then((function(t){return function(t,e){return Zs(t,Bs,e).then((function(t){return t.phoneSessionInfo.sessionInfo}))}(n,{idToken:t,phoneEnrollmentInfo:{phoneNumber:o,recaptchaToken:r}})})):i&&i.type==oo?i.Fa().then((function(e){return function(t,e){return Zs(t,zs,e).then((function(t){return t.phoneResponseInfo.sessionInfo}))}(n,{mfaPendingCredential:e,mfaEnrollmentId:t.multiFactorHint&&t.multiFactorHint.uid||t.multiFactorUid,phoneSignInInfo:{recaptchaToken:r}})})):function(t,e){return Zs(t,Fs,e)}(n,{phoneNumber:o,recaptchaToken:r})).then((function(t){return"function"===typeof e.reset&&e.reset(),t}),(function(t){throw"function"===typeof e.reset&&e.reset(),t}));default:throw new C("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}}))},Qr(Do,{PROVIDER_ID:"phone"}),Qr(Do,{PHONE_SIGN_IN_METHOD:"phone"}),Fo.prototype.getUid=function(){var t=[];return t.push(this.c),this.b&&t.push(this.b),this.f&&t.push(this.f),this.h&&t.push(this.h),t.join("-")},Fo.prototype.S=function(){return this.h},Fo.prototype.v=function(){return{type:this.c,eventId:this.b,urlResponse:this.g,sessionId:this.f,postBody:this.i,tenantId:this.h,error:this.a&&this.a.v()}};var qo,Bo=null;function zo(t){var e="unauthorized-domain",n=void 0,r=Fn(t);t=r.b,"chrome-extension"==(r=r.f)?n=Bt("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):"http"==r||"https"==r?n=Bt("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):e="operation-not-supported-in-this-environment",C.call(this,e,n)}function Wo(t,e,n){C.call(this,t,n),(t=e||{}).Gb&&Gr(this,"email",t.Gb),t.da&&Gr(this,"phoneNumber",t.da),t.credential&&Gr(this,"credential",t.credential),t.Wb&&Gr(this,"tenantId",t.Wb)}function Ho(t){if(t.code){var e=t.code||"";0==e.indexOf(N)&&(e=e.substring(N.length));var n={credential:Mo(t),Wb:t.tenantId};if(t.email)n.Gb=t.email;else if(t.phoneNumber)n.da=t.phoneNumber;else if(!n.credential)return new C(e,t.message||void 0);return new Wo(e,n,t.message)}return null}function Ko(){}function Go(t){return t.c||(t.c=t.b())}function Qo(){}function $o(t){if(!t.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n<e.length;n++){var r=e[n];try{return new ActiveXObject(r),t.f=r}catch(i){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return t.f}function Xo(){}function Yo(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseType=this.responseText=this.response="",this.status=-1,this.statusText="",this.a.onload=E(this.oc,this),this.a.onerror=E(this.Pb,this),this.a.onprogress=E(this.pc,this),this.a.ontimeout=E(this.tc,this)}function Jo(t,e){t.readyState=e,t.onreadystatechange&&t.onreadystatechange()}function Zo(t,e,n){this.reset(t,e,n,void 0,void 0)}I(zo,C),I(Wo,C),Wo.prototype.v=function(){var t={code:this.code,message:this.message};this.email&&(t.email=this.email),this.phoneNumber&&(t.phoneNumber=this.phoneNumber),this.tenantId&&(t.tenantId=this.tenantId);var e=this.credential&&this.credential.v();return e&>(t,e),t},Wo.prototype.toJSON=function(){return this.v()},Ko.prototype.c=null,I(Qo,Ko),Qo.prototype.a=function(){var t=$o(this);return t?new ActiveXObject(t):new XMLHttpRequest},Qo.prototype.b=function(){var t={};return $o(this)&&(t[0]=!0,t[1]=!0),t}
2,qo=new Qo,I(Xo,Ko),Xo.prototype.a=function(){var t=new XMLHttpRequest;if("withCredentials"in t)return t;if("undefined"!=typeof XDomainRequest)return new Yo;throw Error("Unsupported browser")},Xo.prototype.b=function(){return{}},(e=Yo.prototype).open=function(t,e,n){if(null!=n&&!n)throw Error("Only async requests are supported.");this.a.open(t,e)},e.send=function(t){if(t){if("string"!=typeof t)throw Error("Only string data is supported");this.a.send(t)}else this.a.send()},e.abort=function(){this.a.abort()},e.setRequestHeader=function(){},e.getResponseHeader=function(t){return"content-type"==t.toLowerCase()?this.a.contentType:""},e.oc=function(){this.status=200,this.response=this.responseText=this.a.responseText,Jo(this,4)},e.Pb=function(){this.status=500,this.response=this.responseText="",Jo(this,4)},e.tc=function(){this.Pb()},e.pc=function(){this.status=200,Jo(this,1)},e.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType},Zo.prototype.a=null;function ta(t){this.f=t,this.b=this.c=this.a=null}function ea(t,e){this.name=t,this.value=e}Zo.prototype.reset=function(t,e,n,r,i){"number"==typeof i||0,r||S(),delete this.a},ea.prototype.toString=function(){return this.name};var na=new ea("SEVERE",1e3),ra=new ea("WARNING",900),ia=new ea("CONFIG",700),oa=new ea("FINE",500);ta.prototype.log=function(t,e,n){if(t.value>=function t(e){return e.c?e.c:e.a?t(e.a):(M("Root logger has no level set."),null)}(this).value)for(v(e)&&(e=e()),t=new Zo(t,String(e),this.f),n&&(t.a=n),n=this;n;)n=n.a};var aa,sa={},ua=null;function ca(t){var e;if(ua||(ua=new ta(""),sa[""]=ua,ua.c=ia),!(e=sa[t])){e=new ta(t);var n=t.lastIndexOf("."),r=t.substr(n+1);(n=ca(t.substr(0,n))).b||(n.b={}),n.b[r]=e,e.a=n,sa[t]=e}return e}function la(t,e){t&&t.log(oa,e,void 0)}function ha(t){this.f=t}function fa(t){_n.call(this),this.s=t,this.readyState=pa,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.i=new Headers,this.b=null,this.m="GET",this.g="",this.a=!1,this.h=ca("goog.net.FetchXmlHttp"),this.l=this.c=this.f=null}I(ha,Ko),ha.prototype.a=function(){return new fa(this.f)},ha.prototype.b=(aa={},function(){return aa}),I(fa,_n);var pa=0;function da(t){t.c.read().then(t.nc.bind(t)).catch(t.Sa.bind(t))}function va(t,e){e&&t.f&&(t.status=t.f.status,t.statusText=t.f.statusText),t.readyState=4,t.f=null,t.c=null,t.l=null,ya(t)}function ya(t){t.onreadystatechange&&t.onreadystatechange.call(t)}function ga(t){_n.call(this),this.headers=new xn,this.D=t||null,this.c=!1,this.B=this.a=null,this.h=this.P=this.l="",this.f=this.O=this.i=this.N=!1,this.g=0,this.s=null,this.m=ma,this.w=this.R=!1}(e=fa.prototype).open=function(t,e){if(this.readyState!=pa)throw this.abort(),Error("Error reopening a connection");this.m=t,this.g=e,this.readyState=1,ya(this)},e.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var e={headers:this.i,method:this.m,credentials:void 0,cache:void 0};t&&(e.body=t),this.s.fetch(new Request(this.g,e)).then(this.sc.bind(this),this.Sa.bind(this))},e.abort=function(){this.response=this.responseText="",this.i=new Headers,this.status=0,this.c&&this.c.cancel("Request was aborted."),1<=this.readyState&&this.a&&4!=this.readyState&&(this.a=!1,va(this,!1)),this.readyState=pa},e.sc=function(t){this.a&&(this.f=t,this.b||(this.b=t.headers,this.readyState=2,ya(this)),this.a&&(this.readyState=3,ya(this),this.a&&("arraybuffer"===this.responseType?t.arrayBuffer().then(this.qc.bind(this),this.Sa.bind(this)):"undefined"!==typeof c.ReadableStream&&"body"in t?(this.response=this.responseText="",this.c=t.body.getReader(),this.l=new TextDecoder,da(this)):t.text().then(this.rc.bind(this),this.Sa.bind(this)))))},e.nc=function(t){if(this.a){var e=this.l.decode(t.value?t.value:new Uint8Array(0),{stream:!t.done});e&&(this.response=this.responseText+=e),t.done?va(this,!0):ya(this),3==this.readyState&&da(this)}},e.rc=function(t){this.a&&(this.response=this.responseText=t,va(this,!0))},e.qc=function(t){this.a&&(this.response=t,va(this,!0))},e.Sa=function(t){var e=this.h;e&&e.log(ra,"Failed to fetch url "+this.g,t instanceof Error?t:Error(t)),this.a&&va(this,!0)},e.setRequestHeader=function(t,e){this.i.append(t,e)},e.getResponseHeader=function(t){return this.b?this.b.get(t.toLowerCase())||"":((t=this.h)&&t.log(ra,"Attempting to get response header but no headers have been received for url: "+this.g,void 0),"")},e.getAllResponseHeaders=function(){if(!this.b){var t=this.h;return t&&t.log(ra,"Attempting to get all response headers but no headers have been received for url: "+this.g,void 0),""}t=[];for(var e=this.b.entries(),n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join("\r\n")},I(ga,_n);var ma="";ga.prototype.b=ca("goog.net.XhrIo");var ba=/^https?$/i,_a=["POST","PUT"];function wa(t,e,n,r,i){if(t.a)throw Error("[goog.net.XhrIo] Object is active with another request="+t.l+"; newUri="+e);n=n?n.toUpperCase():"GET",t.l=e,t.h="",t.P=n,t.N=!1,t.c=!0,t.a=t.D?t.D.a():qo.a(),t.B=t.D?Go(t.D):Go(qo),t.a.onreadystatechange=E(t.Sb,t);try{la(t.b,Aa(t,"Opening Xhr")),t.O=!0,t.a.open(n,String(e),!0),t.O=!1}catch(a){return la(t.b,Aa(t,"Error opening Xhr: "+a.message)),void Ta(t,a)}e=r||"";var o=new xn(t.headers);i&&function(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(d(t)||"string"===typeof t)W(t,e,void 0);else for(var n=kn(t),r=Cn(t),i=r.length,o=0;o<i;o++)e.call(void 0,r[o],n&&n[o],t)}(i,(function(t,e){o.set(e,t)})),i=function(t){t:{for(var e=Ea,n=t.length,r="string"===typeof t?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t)){e=i;break t}e=-1}return 0>e?null:"string"===typeof t?t.charAt(e):t[e]}(o.X()),r=c.FormData&&e instanceof c.FormData,!Q(_a,n)||i||r||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach((function(t,e){this.a.setRequestHeader(e,t)}),t),t.m&&(t.a.responseType=t.m),"withCredentials"in t.a&&t.a.withCredentials!==t.R&&(t.a.withCredentials=t.R);try{ka(t),0<t.g&&(t.w=function(t){return Gt&&ie(9)&&"number"===typeof t.timeout&&void 0!==t.ontimeout}(t.a),la(t.b,Aa(t,"Will abort after "+t.g+"ms if incomplete, xhr2 "+t.w)),t.w?(t.a.timeout=t.g,t.a.ontimeout=E(t.Ka,t)):t.s=Sn(t.Ka,t.g,t)),la(t.b,Aa(t,"Sending request")),t.i=!0,t.a.send(e),t.i=!1}catch(a){la(t.b,Aa(t,"Send error: "+a.message)),Ta(t,a)}}function Ea(t){return"content-type"==t.toLowerCase()}function Ta(t,e){t.c=!1,t.a&&(t.f=!0,t.a.abort(),t.f=!1),t.h=e,Sa(t),Ca(t)}function Sa(t){t.N||(t.N=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function Ia(t){if(t.c&&"undefined"!=typeof u)if(t.B[1]&&4==xa(t)&&2==Na(t))la(t.b,Aa(t,"Local request error detected and ignored"));else if(t.i&&4==xa(t))Sn(t.Sb,0,t);else if(t.dispatchEvent("readystatechange"),4==xa(t)){la(t.b,Aa(t,"Request complete")),t.c=!1;try{var e,n=Na(t);t:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r
2=!0;break t;default:r=!1}if(!(e=r)){var i;if(i=0===n){var o=String(t.l).match(On)[1]||null;if(!o&&c.self&&c.self.location){var a=c.self.location.protocol;o=a.substr(0,a.length-1)}i=!ba.test(o?o.toLowerCase():"")}e=i}if(e)t.dispatchEvent("complete"),t.dispatchEvent("success");else{try{var s=2<xa(t)?t.a.statusText:""}catch(l){la(t.b,"Can not get status: "+l.message),s=""}t.h=s+" ["+Na(t)+"]",Sa(t)}}finally{Ca(t)}}}function Ca(t,e){if(t.a){ka(t);var n=t.a,r=t.B[0]?f:null;t.a=null,t.B=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(i){(t=t.b)&&t.log(na,"Problem encountered resetting onreadystatechange: "+i.message,void 0)}}}function ka(t){t.a&&t.w&&(t.a.ontimeout=null),t.s&&(c.clearTimeout(t.s),t.s=null)}function xa(t){return t.a?t.a.readyState:0}function Na(t){try{return 2<xa(t)?t.a.status:-1}catch(e){return-1}}function Aa(t,e){return e+" ["+t.P+" "+t.l+" "+Na(t)+"]"}function Oa(t){var e=Ba;this.g=[],this.w=e,this.s=t||null,this.f=this.a=!1,this.c=void 0,this.u=this.B=this.i=!1,this.h=0,this.b=null,this.l=0}function Pa(t,e,n){t.a=!0,t.c=n,t.f=!e,Ma(t)}function Ra(t){if(t.a){if(!t.u)throw new ja(t);t.u=!1}}function Da(t,e,n,r){t.g.push([e,n,r]),t.a&&Ma(t)}function La(t){return G(t.g,(function(t){return v(t[1])}))}function Ma(t){if(t.h&&t.a&&La(t)){var e=t.h,n=Va[e];n&&(c.clearTimeout(n.a),delete Va[e]),t.h=0}t.b&&(t.b.l--,delete t.b),e=t.c;for(var r=n=!1;t.g.length&&!t.i;){var i=t.g.shift(),o=i[0],a=i[1];if(i=i[2],o=t.f?a:o)try{var s=o.call(i||t.s,e);void 0!==s&&(t.f=t.f&&(s==e||s instanceof Error),t.c=e=s),(R(e)||"function"===typeof c.Promise&&e instanceof c.Promise)&&(r=!0,t.i=!0)}catch(u){e=u,t.f=!0,La(t)||(n=!0)}}t.c=e,r&&(s=E(t.m,t,!0),r=E(t.m,t,!1),e instanceof Oa?(Da(e,s,r),e.B=!0):e.then(s,r)),n&&(e=new Ua(e),Va[e.a]=e,t.h=e.a)}function ja(){D.call(this)}function Fa(){D.call(this)}function Ua(t){this.a=c.setTimeout(E(this.c,this),0),this.b=t}(e=ga.prototype).Ka=function(){"undefined"!=typeof u&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",la(this.b,Aa(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},e.abort=function(){this.a&&this.c&&(la(this.b,Aa(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Ca(this))},e.Ba=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),Ca(this,!0)),ga.Za.Ba.call(this)},e.Sb=function(){this.wa||(this.O||this.i||this.f?Ia(this):this.Hc())},e.Hc=function(){Ia(this)},e.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.m){case ma:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var t=this.b;return t&&t.log(na,"Response type "+this.m+" is not supported on this browser",void 0),null}catch(e){return la(this.b,"Can not get response: "+e.message),null}},Oa.prototype.cancel=function(t){if(this.a)this.c instanceof Oa&&this.c.cancel();else{if(this.b){var e=this.b;delete this.b,t?e.cancel(t):(e.l--,0>=e.l&&e.cancel())}this.w?this.w.call(this.s,this):this.u=!0,this.a||(t=new Fa(this),Ra(this),Pa(this,!1,t))}},Oa.prototype.m=function(t,e){this.i=!1,Pa(this,t,e)},Oa.prototype.then=function(t,e,n){var r,i,o=new _e((function(t,e){r=t,i=e}));return Da(this,r,(function(t){t instanceof Fa?o.cancel():i(t)})),o.then(t,e,n)},Oa.prototype.$goog_Thenable=!0,I(ja,D),ja.prototype.message="Deferred has already fired",ja.prototype.name="AlreadyCalledError",I(Fa,D),Fa.prototype.message="Deferred was canceled",Fa.prototype.name="CanceledError",Ua.prototype.c=function(){throw delete Va[this.a],this.b};var Va={};function qa(t){var e={},n=e.document||document,r=It(t).toString(),i=fe(document,"SCRIPT"),o={Tb:i,Ka:void 0},a=new Oa(o),s=null,u=null!=e.timeout?e.timeout:5e3;return 0<u&&(s=window.setTimeout((function(){za(i,!0);var t=new Ka(Ha,"Timeout reached for loading script "+r);Ra(a),Pa(a,!1,t)}),u),o.Ka=s),i.onload=i.onreadystatechange=function(){i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(za(i,e.ud||!1,s),Ra(a),Pa(a,!0,null))},i.onerror=function(){za(i,!0,s);var t=new Ka(Wa,"Error while loading script "+r);Ra(a),Pa(a,!1,t)},gt(o=e.attributes||{}
2,{type:"text/javascript",charset:"UTF-8"}),se(i,o),function(t,e){mt(t,"HTMLScriptElement"),t.src=It(e),null===h&&(h=(e=(e=c.document).querySelector&&e.querySelector("script[nonce]"))&&(e=e.nonce||e.getAttribute("nonce"))&&l.test(e)?e:""),(e=h)&&t.setAttribute("nonce",e)}(i,t),function(t){var e;return(e=(t||document).getElementsByTagName("HEAD"))&&0!=e.length?e[0]:t.documentElement}(n).appendChild(i),a}function Ba(){if(this&&this.Tb){var t=this.Tb;t&&"SCRIPT"==t.tagName&&za(t,!0,this.Ka)}}function za(t,e,n){null!=n&&c.clearTimeout(n),t.onload=f,t.onerror=f,t.onreadystatechange=f,e&&window.setTimeout((function(){t&&t.parentNode&&t.parentNode.removeChild(t)}),0)}var Wa=0,Ha=1;function Ka(t,e){var n="Jsloader error (code #"+t+")";e&&(n+=": "+e),D.call(this,n),this.code=t}function Ga(t){this.f=t}function Qa(t,e,n){if(this.c=t,t=e||{},this.u=t.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.m=t.secureTokenTimeout||Ya,this.g=vt(t.secureTokenHeaders||Ja),this.h=t.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.l=t.identityPlatformEndpoint||"https://identitytoolkit.googleapis.com/v2/",this.i=t.firebaseTimeout||Za,this.a=vt(t.firebaseHeaders||ts),n&&(this.a["X-Client-Version"]=n,this.g["X-Client-Version"]=n),n="Node"==br(),!(n=c.XMLHttpRequest||n&&r.INTERNAL.node&&r.INTERNAL.node.XMLHttpRequest)&&!mr())throw new C("internal-error","The XMLHttpRequest compatibility library was not found.");this.f=void 0,mr()?this.f=new ha(self):_r()?this.f=new Ga(n):this.f=new Xo,this.b=null}
2I(Ka,D),I(Ga,Ko),Ga.prototype.a=function(){return new this.f},Ga.prototype.b=function(){return{}};var $a,Xa="idToken",Ya=new Ur(3e4,6e4),Ja={"Content-Type":"application/x-www-form-urlencoded"},Za=new Ur(3e4,6e4),ts={"Content-Type":"application/json"};function es(t,e){e?t.a["X-Firebase-Locale"]=e:delete t.a["X-Firebase-Locale"]}function ns(t,e){e?(t.a["X-Client-Version"]=e,t.g["X-Client-Version"]=e):(delete t.a["X-Client-Version"],delete t.g["X-Client-Version"])}function rs(t,e,n,r,i,o,a){(function(){var t=Cr();return!((t=Tr(t)!=Er?null:(t=t.match(/\sChrome\/(\d+)/i))&&2==t.length?parseInt(t[1],10):null)&&30>t)&&(!Gt||!ne||9<ne)})()||mr()?t=E(t.w,t):($a||($a=new _e((function(t,e){!function(t,e){if(((window.gapi||{}).client||{}).request)t();else{c[os]=function(){((window.gapi||{}).client||{}).request?t():e(Error("CORS_UNSUPPORTED"))},function(t,e){Da(t,null,e,void 0)}(qa(Ct(is,{onload:os})),(function(){e(Error("CORS_UNSUPPORTED"))}))}}(t,e)}))),t=E(t.s,t)),t(e,n,r,i,o,a)}Qa.prototype.S=function(){return this.b},Qa.prototype.w=function(t,e,n,r,i,o){if(mr()&&("undefined"===typeof c.fetch||"undefined"===typeof c.Headers||"undefined"===typeof c.Request))throw new C("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var a=new ga(this.f);if(o){a.g=Math.max(0,o);var s=setTimeout((function(){a.dispatchEvent("timeout")}),o)}wn(a,"complete",(function(){s&&clearTimeout(s);var t=null;try{t=JSON.parse(function(t){try{return t.a?t.a.responseText:""}catch(e){return la(t.b,"Can not get responseText: "+e.message),""}}(this))||null}catch(n){t=null}e&&e(t)})),En(a,"ready",(function(){s&&clearTimeout(s),We(this)})),En(a,"timeout",(function(){s&&clearTimeout(s),We(this),e&&e(null)})),wa(a,t,n,r,i)};var is=new bt(Et,"https://apis.google.com/js/client.js?onload=%{onload}"),os="__fcb"+Math.floor(1e6*Math.random()).toString();function as(t,e,n,r,i,o,a){var s=Fn(e+n);Mn(s,"key",t.c),a&&Mn(s,"cb",S().toString());var u="GET"==r;if(u)for(var c in i)i.hasOwnProperty(c)&&Mn(s,c,i[c]);return new _e((function(e,n){rs(t,s.toString(),(function(t){t?t.error?n(eu(t,o||{})):e(t):n(new C("network-request-failed"))}),r,u?void 0:nr(Dr(i)),t.a,t.i.get())}))}function ss(t){if("string"!==typeof(t=t.email)||!dr.test(t))throw new C("invalid-email")}function us(t){"email"in t&&ss(t)}function cs(t){if(!t[Xa]){if(t.mfaPendingCredential)throw new C("multi-factor-auth-required",null,vt(t));throw new C("internal-error")}}function ls(t){if(t.phoneNumber||t.temporaryProof){if(!t.phoneNumber||!t.temporaryProof)throw new C("internal-error")}else{if(!t.sessionInfo)throw new C("missing-verification-id");if(!t.code)throw new C("missing-verification-code")}}Qa.prototype.s=function(t,e,n,r,i){var o=this;$a.then((function(){window.gapi.client.setApiKey(o.c);var a=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:t,method:n,body:r,headers:i,authType:"none",callback:function(t){window.gapi.auth.setToken(a),e&&e(t)}})})).o((function(t){e&&e({error:{message:t&&t.message||"CORS_UNSUPPORTED"}})}))},Qa.prototype.vb=function(){return Zs(this,qs,{})},Qa.prototype.xb=function(t,e){return Zs(this,Us,{idToken:t,email:e})},Qa.prototype.yb=function(t,e){return Zs(this,Vs,{idToken:t,password:e})};var hs={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};function fs(t){if(!t.phoneVerificationInfo)throw new C("internal-error");if(!t.phoneVerificationInfo.sessionInfo)throw new C("missing-verification-id");if(!t.phoneVerificationInfo.code)throw new C("missing-verification-code")}function ps(t){if(!t.requestUri||!t.sessionId&&!t.postBody&&!t.pendingToken)throw new C("internal-error")}function ds(t,e){return e.oauthIdToken&&e.providerId&&0==e.providerId.indexOf("oidc.")&&!e.pendingToken&&(t.sessionId?e.nonce=t.sessionId:t.postBody&&(Jn(t=new Qn(t.postBody),"nonce")&&(e.nonce=t.get("nonce")))),e}function vs(t){var e=null;if(t.needConfirmation?(t.code="account-exists-with-different-credential",e=Ho(t)):"FEDERATED_USER_ID_ALREADY_LINKED"==t.errorMessage?(t.code="credential-already-in-use",e=Ho(t)):"EMAIL_EXISTS"==t.errorMessage?(t.code="email-already-in-use",e=Ho(t)):t.errorMessage&&(e=tu(t.errorMessage)),e)throw e;cs(t)}function ys(t,e){return e.returnIdpCredential=!0,Zs(t,Ws,e)}function gs(t,e){return e.returnIdpCredential=!0,Zs(t,Ks,e)}function ms(t,e){return e.returnIdpCredential=!0,e.autoCreate=!1,Zs(t,Hs,e)}function bs(t){if(!t.oobCode)throw new C("invalid-action-code")}(e=Qa.prototype).zb=function(t,e){var n={idToken:t},r=[];return pt(hs,(function(t,i){var o=e[i];null===o?r.push(t):i in e&&(n[i]=o)})),r.length&&(n.deleteAttribute=r),Zs(this,Us,n)},e.rb=function(t,e){return gt(t={requestType:"PASSWORD_RESET",email:t},e),Zs(this,Ds,t)},e.sb=function(t,e){return gt(t={requestType:"EMAIL_SIGNIN",email:t},e),Zs(this,Os,t)},e.qb=function(t,e){return gt(t={requestType:"VERIFY_EMAIL",idToken:t},e),Zs(this,Ps,t)},e.Ab=function(t,e,n){return gt(t={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:t,newEmail:e},n),Zs(this,Rs,t)},e.cb=function(t){return Zs(this,$s,t)},e.jb=function(t,e){return Zs(this,js,{oobCode:t,newPassword:e})},e.Pa=function(t){return Zs(this,ws,{oobCode:t})},e.fb=function(t){return Zs(this,_s,{oobCode:t})};var _s={endpoint:"setAccountInfo",A:bs,Y:"email",C:!0},ws={endpoint:"resetPassword",A:bs,G:function(t){var e=t.requestType;if(!e||!t.email&&"EMAIL_SIGNIN"!=e&&"VERIFY_AND_CHANGE_EMAIL"!=e)throw new C("internal-error")},C:!0},Es={endpoint:"signupNewUser",A:function(t){if(ss(t),!t.password)throw new C("weak-password")},G:cs,U:!0,C:!0},Ts={endpoint:"createAuthUri",C:!0},Ss={endpoint:"deleteAccount",M:["idToken"]},Is={endpoint:"setAccountInfo",M:["idToken","deleteProvider"],A:function(t){if("array"!=p(t.deleteProvider))throw new C("internal-error")}},Cs={endpoint:"emailLinkSignin",M:["email","oobCode"],A:ss,G:cs,U:!0,C:!0},ks={endpoint:"emailLinkSignin",M:["idToken","email","oobCode"],A:ss,G:cs,U:!0},xs={endpoint:"accounts/mfaEnrollment:finalize",M:["idToken","phoneVerificationInfo"],A:fs,G:cs,C:!0,La:!0},Ns={endpoint:"accounts/mfaSignIn:finalize",M:["mfaPendingCredential","phoneVerificationInfo"],A:fs,G:cs,C:!0,La:!0},As={endpoint:"getAccountInfo"},Os={endpoint:"getOobConfirmationCode",M:["requestType"],A:function(t){if("EMAIL_SIGNIN"!=t.requestType)throw new C("internal-error");ss(t)},Y:"email",C:!0},Ps={endpoint:"getOobConfirmationCode",M:["idToken","requestType"],A:function(t){if("VERIFY_EMAIL"!=t.requestType)throw new C("internal-error")},Y:"email",C:!0},Rs={endpoint:"getOobConfirmationCode",M:["idToken","newEmail","requestType"],A:function(t){if("VERIFY_AND_CHANGE_EMAIL"!=t.requestType)throw new C("internal-error")},Y:"email",C:!0},Ds={endpoint:"getOobConfirmationCode",M:["requestType"],A:function(t){if("PASSWORD_RESET"!=t.requestType)throw new C("internal-error");ss(t)},Y:"email",C:!0},Ls={hb:!0,endpoint:"getProjectConfig",Rb:"GET"},Ms={hb:!0,endpoint:"getRecaptchaParam",Rb:"GET",G:function(t){if(!t.recaptchaSiteKey)throw new C("internal-error")}},js={endpoint:"resetPassword",A:bs,Y:"email",C:!0},Fs={endpoint:"sendVerificationCode",M:["phoneNumber","recaptchaToken"],Y:"sessionInfo",C:!0},Us={endpoint:"setAccountInfo",M:["idToken"],A:us,U:!0},Vs={endpoint:"setAccountInfo",M:["idToken"],A:function(t){if(us(t),!t.password)throw new C("weak-password")},G:cs,U:!0},qs={endpoint:"signupNewUser",G:cs,U:!0,C:!0},Bs={endpoint:"accounts/mfaEnrollment:start",M:["idToken","phoneEnrollmentInfo"],A:function(t){if(!t.phone
2EnrollmentInfo)throw new C("internal-error");if(!t.phoneEnrollmentInfo.phoneNumber)throw new C("missing-phone-number");if(!t.phoneEnrollmentInfo.recaptchaToken)throw new C("missing-app-credential")},G:function(t){if(!t.phoneSessionInfo||!t.phoneSessionInfo.sessionInfo)throw new C("internal-error")},C:!0,La:!0},zs={endpoint:"accounts/mfaSignIn:start",M:["mfaPendingCredential","mfaEnrollmentId","phoneSignInInfo"],A:function(t){if(!t.phoneSignInInfo||!t.phoneSignInInfo.recaptchaToken)throw new C("missing-app-credential")},G:function(t){if(!t.phoneResponseInfo||!t.phoneResponseInfo.sessionInfo)throw new C("internal-error")},C:!0,La:!0},Ws={endpoint:"verifyAssertion",A:ps,Wa:ds,G:vs,U:!0,C:!0},Hs={endpoint:"verifyAssertion",A:ps,Wa:ds,G:function(t){if(t.errorMessage&&"USER_NOT_FOUND"==t.errorMessage)throw new C("user-not-found");if(t.errorMessage)throw tu(t.errorMessage);cs(t)},U:!0,C:!0},Ks={endpoint:"verifyAssertion",A:function(t){if(ps(t),!t.idToken)throw new C("internal-error")},Wa:ds,G:vs,U:!0},Gs={endpoint:"verifyCustomToken",A:function(t){if(!t.token)throw new C("invalid-custom-token")},G:cs,U:!0,C:!0},Qs={endpoint:"verifyPassword",A:function(t){if(ss(t),!t.password)throw new C("wrong-password")},G:cs,U:!0,C:!0},$s={endpoint:"verifyPhoneNumber",A:ls,G:cs,C:!0},Xs={endpoint:"verifyPhoneNumber",A:function(t){if(!t.idToken)throw new C("internal-error");ls(t)},G:function(t){if(t.temporaryProof)throw t.code="credential-already-in-use",Ho(t);cs(t)}},Ys={Eb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",A:ls,G:cs,C:!0},Js={endpoint:"accounts/mfaEnrollment:withdraw",M:["idToken","mfaEnrollmentId"],G:function(t){if(!!t[Xa]^!!t.refreshToken)throw new C("internal-error")},C:!0,La:!0};function Zs(t,e,n){if(!function(t,e){if(!e||!e.length)return!0;if(!t)return!1;for(var n=0;n<e.length;n++){var r=t[e[n]];if(void 0===r||null===r||""===r)return!1}return!0}(n,e.M))return xe(new C("internal-error"));var r,i=!!e.La,o=e.Rb||"POST";return ke(n).then(e.A).then((function(){return e.U&&(n.returnSecureToken=!0),e.C&&t.b&&"undefined"===typeof n.tenantId&&(n.tenantId=t.b),as(t,i?t.l:t.h,e.endpoint,o,n,e.Eb,e.hb||!1)})).then((function(t){return r=t,e.Wa?e.Wa(n,r):r})).then(e.G).then((function(){if(!e.Y)return r;if(!(e.Y in r))throw new C("internal-error");return r[e.Y]}))}function tu(t){return eu({error:{errors:[{message:t}],code:400,message:t}})}function eu(t,e){var n=(t.error&&t.error.errors&&t.error.errors[0]||{}).reason||"",r={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(n=r[n]?new C(r[n]):null)return n;for(var i in n=t.error&&t.error.message||"",gt(r={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_OR_INVALID_
2NONCE:"missing-or-invalid-nonce",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",INVALID_PROVIDER_ID:"invalid-provider-id",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",REJECTED_CREDENTIAL:"rejected-credential",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_DYNAMIC_LINK_DOMAIN:"invalid-dynamic-link-domain",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash",UNSUPPORTED_TENANT_OPERATION:"unsupported-tenant-operation",INVALID_TENANT_ID:"invalid-tenant-id",TENANT_ID_MISMATCH:"tenant-id-mismatch",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",EMAIL_CHANGE_NEEDS_VERIFICATION:"email-change-needs-verification",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",UNSUPPORTED_FIRST_FACTOR:"unsupported-first-factor",UNVERIFIED_EMAIL:"unverified-email"},e||{}),e=(e=n.match(/^[^\s]+\s*:\s*([\s\S]*)$/))&&1<e.length?e[1]:void 0,r)if(0===n.indexOf(i))return new C(r[i],e);return!e&&t&&(e=Rr(t)),new C("internal-error",e)}function nu(t){this.b=t,this.a=null,this.nb=function(t){return(au||(au=new _e((function(t,e){function n(){Fr(),kr("gapi.load")("gapi.iframes",{callback:t,ontimeout:function(){Fr(),e(Error("Network Error"))},timeout:iu.get()})}if(kr("gapi.iframes.Iframe"))t();else if(kr("gapi.load"))n();else{var r="__iframefcb"+Math.floor(1e6*Math.random()).toString();c[r]=function(){kr("gapi.load")?n():e(Error("Network Error"))},ke(qa(r=Ct(ru,{onload:r}))).o((function(){e(Error("Network Error"))}))}})).o((function(t){throw au=null,t})))).then((function(){return new _e((function(e,n){kr("gapi.iframes.getContext")().open({where:document.body,url:t.b,messageHandlersFilter:kr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},(function(r){function i(){clearTimeout(o),e()}t.a=r,t.a.restyle({setHideOnLeave:!1});var o=setTimeout((function(){n(Error("Network Error"))}),ou.get());r.ping(i).then(i,(function(){n(Error("Network Error"))}))}))}))}))}(this)}var ru=new bt(Et,"https://apis.google.com/js/api.js?onload=%{onload}"),iu=new Ur(3e4,6e4),ou=new Ur(5e3,15e3),au=null;function su(t,e,n){this.i=t,this.g=e,this.h=n,this.f=null,this.a=Un(this.i,"/__/auth/iframe"),Mn(this.a,"apiKey",this.g),Mn(this.a,"appName",this.h),this.b=null,this.c=[]}function uu(t,e,n,r,i){this.s=t,this.m=e,this.c=n,this.u=r,this.i=this.g=this.l=null,this.a=i,this.h=this.f=null}function cu(t){try{return r.app(t).auth().Ea()}catch(e){return[]}}function lu(t,e,n,r,i){this.u=t,this.f=e,this.b=n,this.c=r||null,this.h=i||null,this.m=this.s=this.w=null,this.g=[],this.l=this.a=null}function hu(t){var e=ur();return function(t){return Zs(t,Ls,{}).then((function(t){return t.authorizedDomains||[]}))}(t).then((function(t){t:{var n=Fn(e),r=n.f;n=n.b;for(var i=0;i<t.length;i++){var o=t[i],a=n,s=r;if(0==o.indexOf("chrome-extension://")?a=Fn(o).b==a&&"chrome-extension"==s:"http"!=s&&"https"!=s?a=!1:pr.test(o)?a=a==o:(o=o.split(".").join("\\."),a=new RegExp("^(.+\\."+o+"|"+o+")$","i").test(a)),a){t=!0;break t}}t=!1}if(!t)throw new zo(ur())}))}function fu(t){return t.l||(t.l=vr().then((function(){if(!t.s){var e=t.c,n=t.h,r=cu(t.b),i=new su(t.u,t.f,t.b);i.f=e,i.b=n,i.c=J(r||[]),t.s=i.toString()}t.i=new nu(t.s),function(t){if(!t.i)throw Error("IfcHandler must be initialized!");!function(t,e){t.nb.then((function(){t.a.register("authEvent",e,kr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}(t.i,(function(e){var n={};if(e&&e.authEvent){var r=!1;for(e=Uo(e.authEvent),n=0;n<t.g.length;n++)r=t.g[n](e)||r;return(n={}).status=r?"ACK":"ERROR",ke(n)}return n.status="ERROR",ke(n)}))}(t)}))),t.l}
2function pu(t){return t.m||(t.w=t.c?Ir(t.c,cu(t.b)):null,t.m=new Qa(t.f,P(t.h),t.w)),t.m}function du(t,e,n,r,i,o,a,s,u,c,l){return(t=new uu(t,e,n,r,i)).l=o,t.g=a,t.i=s,t.b=vt(u||null),t.f=c,t.ub(l).toString()}function vu(t){if(this.a=t||r.INTERNAL.reactNative&&r.INTERNAL.reactNative.AsyncStorage,!this.a)throw new C("internal-error","The React Native compatibility library was not found.");this.type="asyncStorage"}function yu(t){this.b=t,this.a={},this.f=E(this.c,this)}su.prototype.toString=function(){return this.f?Mn(this.a,"v",this.f):Yn(this.a.a,"v"),this.b?Mn(this.a,"eid",this.b):Yn(this.a.a,"eid"),this.c.length?Mn(this.a,"fw",this.c.join(",")):Yn(this.a.a,"fw"),this.a.toString()},uu.prototype.ub=function(t){return this.h=t,this},uu.prototype.toString=function(){var t=Un(this.s,"/__/auth/handler");if(Mn(t,"apiKey",this.m),Mn(t,"appName",this.c),Mn(t,"authType",this.u),this.a.isOAuthProvider){var e=this.a;try{var n=r.app(this.c).auth().ja()}catch(u){n=null}for(var i in e.kb=n,Mn(t,"providerId",this.a.providerId),n=Dr((e=this.a).Fb))n[i]=n[i].toString();i=e.Oc,n=vt(n);for(var o=0;o<i.length;o++){var a=i[o];a in n&&delete n[a]}e.lb&&e.kb&&!n[e.lb]&&(n[e.lb]=e.kb),dt(n)||Mn(t,"customParameters",Rr(n))}if("function"===typeof this.a.Nb&&((e=this.a.Nb()).length&&Mn(t,"scopes",e.join(","))),this.l?Mn(t,"redirectUrl",this.l):Yn(t.a,"redirectUrl"),this.g?Mn(t,"eventId",this.g):Yn(t.a,"eventId"),this.i?Mn(t,"v",this.i):Yn(t.a,"v"),this.b)for(var s in this.b)this.b.hasOwnProperty(s)&&!jn(t,s)&&Mn(t,s,this.b[s]);return this.h?Mn(t,"tid",this.h):Yn(t.a,"tid"),this.f?Mn(t,"eid",this.f):Yn(t.a,"eid"),(s=cu(this.c)).length&&Mn(t,"fw",s.join(",")),t.toString()},(e=lu.prototype).Lb=function(t,e,n){var r=new C("popup-closed-by-user"),i=new C("web-storage-unsupported"),o=this,a=!1;return this.ka().then((function(){(function(t){var e={type:"webStorageSupport"};return fu(t).then((function(){return function(t,e){return t.nb.then((function(){return new _e((function(n){t.a.send(e.type,e,n,kr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}))}(t.i,e)})).then((function(t){if(t&&t.length&&"undefined"!==typeof t[0].webStorageSupport)return t[0].webStorageSupport;throw Error()}))})(o).then((function(n){n||(t&&hr(t),e(i),a=!0)}))})).o((function(){})).then((function(){if(!a)return function(t){return new _e((function(e){return function n(){In(2e3).then((function(){if(t&&!t.closed)return n();e()}))}()}))}(t)})).then((function(){if(!a)return In(n).then((function(){e(r)}))}))},e.Ub=function(){var t=Cr();return!Pr(t)&&!jr(t)},e.Qb=function(){return!1}
2,e.Jb=function(t,e,n,r,i,o,a,s){if(!t)return xe(new C("popup-blocked"));if(a&&!Pr())return this.ka().o((function(e){hr(t),i(e)})),r(),ke();this.a||(this.a=hu(pu(this)));var u=this;return this.a.then((function(){var e=u.ka().o((function(e){throw hr(t),i(e),e}));return r(),e})).then((function(){(jo(n),a)||cr(du(u.u,u.f,u.b,e,n,null,o,u.c,void 0,u.h,s),t)})).o((function(t){throw"auth/network-request-failed"==t.code&&(u.a=null),t}))},e.Kb=function(t,e,n,r){this.a||(this.a=hu(pu(this)));var i=this;return this.a.then((function(){jo(e),cr(du(i.u,i.f,i.b,t,e,ur(),n,i.c,void 0,i.h,r))})).o((function(t){throw"auth/network-request-failed"==t.code&&(i.a=null),t}))},e.ka=function(){var t=this;return fu(this).then((function(){return t.i.nb})).o((function(){throw t.a=null,new C("network-request-failed")}))},e.Xb=function(){return!0},e.Ca=function(t){this.g.push(t)},e.Qa=function(t){X(this.g,(function(e){return e==t}))},(e=vu.prototype).get=function(t){return ke(this.a.getItem(t)).then((function(t){return t&&Lr(t)}))},e.set=function(t,e){return ke(this.a.setItem(t,Rr(e)))},e.T=function(t){return ke(this.a.removeItem(t))},e.ba=function(){},e.ha=function(){};var gu,mu=[];function bu(t,e,n){dt(t.a)&&t.b.addEventListener("message",t.f),"undefined"===typeof t.a[e]&&(t.a[e]=[]),t.a[e].push(n)}function _u(t){this.a=t}function wu(t){this.c=t,this.b=!1,this.a=[]}function Eu(t,e,n,r){var i,o,a,s,u=n||{},c=null;if(t.b)return xe(Error("connection_unavailable"));var l=r?800:50,h="undefined"!==typeof MessageChannel?new MessageChannel:null;return new _e((function(n,r){h?(i=Math.floor(Math.random()*Math.pow(10,20)).toString(),h.port1.start(),a=setTimeout((function(){r(Error("unsupported_event"))}),l),c={messageChannel:h,onMessage:o=function(t){t.data.eventId===i&&("ack"===t.data.status?(clearTimeout(a),s=setTimeout((function(){r(Error("timeout"))}),3e3)):"done"===t.data.status?(clearTimeout(s),"undefined"!==typeof t.data.response?n(t.data.response):r(Error("unknown_error"))):(clearTimeout(a),clearTimeout(s),r(Error("invalid_response"))))}},t.a.push(c),h.port1.addEventListener("message",o),t.c.postMessage({eventType:e,eventId:i,data:u},[h.port2])):r(Error("connection_unavailable"))})).then((function(e){return Tu(t,c),e})).o((function(e){throw Tu(t,c),e}))}function Tu(t,e){if(e){var n=e.messageChannel,r=e.onMessage;n&&(n.port1.removeEventListener("message",r),n.port1.close()),X(t.a,(function(t){return t==e}))}}function Su(){if(!ku())throw new C("web-storage-unsupported");this.c={},this.a=[],this.b=0,this.u=c.indexedDB,this.type="indexedDB",this.g=this.l=this.f=this.i=null,this.s=!1,this.h=null;var t=this;mr()&&self?(this.l=function(){var t=mr()?self:null;if(W(mu,(function(n){n.b==t&&(e=n)})),!e){var e=new yu(t);mu.push(e)}return e}(),bu(this.l,"keyChanged",(function(e,n){return Pu(t).then((function(e){return 0<e.length&&W(t.a,(function(t){t(e)})),{keyProcessed:Q(e,n.key)}}))})),bu(this.l,"ping",(function(){return ke(["keyChanged"])}))):function(){var t=c.navigator;return t&&t.serviceWorker?ke().then((function(){return t.serviceWorker.ready})).then((function(t){return t.active||null})).o((function(){return null})):ke(null)}().then((function(e){(t.h=e)&&(t.g=new wu(new _u(e)),Eu(t.g,"ping",null,!0).then((function(e){e[0].fulfilled&&Q(e[0].value,"keyChanged")&&(t.s=!0)})).o((function(){})))}))}function Iu(t){return new _e((function(e,n){var r=t.u.open("firebaseLocalStorageDb",1);r.onerror=function(t){try{t.preventDefault()}catch(e){}n(Error(t.target.error))},r.onupgradeneeded=function(t){t=t.target.result;try{t.createObjectStore("firebaseLocalStorage",{keyPath:"fbase_key"})}catch(e){n(e)}},r.onsuccess=function(r){(r=r.target.result).objectStoreNames.contains("firebaseLocalStorage")?e(r):function(t){return new _e((function(e,n){var r=t.u.deleteDatabase("firebaseLocalStorageDb");r.onsuccess=function(){e()},r.onerror=function(t){n(Error(t.target.error))}}))}(t).then((function(){return Iu(t)})).then((function(t){e(t)})).o((function(t){n(t)}))}}))}function Cu(t){return t.m||(t.m=Iu(t)),t.m}function ku(){try{return!!c.indexedDB}catch(aa){return!1}}function xu(t){return t.objectStore("firebaseLocalStorage")}function Nu(t,e){return t.transaction(["firebaseLocalStorage"],e?"readwrite":"readonly")}function Au(t){return new _e((function(e,n){t.onsuccess=function(t){t&&t.target?e(t.target.result):e()},t.onerror=function(t){n(t.target.error)}}))}function Ou(t,e){return t.g&&t.h&&function(){var t=c.navigator;return t&&t.serviceWorker&&t.serviceWorker.controller||null}()===t.h?Eu(t.g,"keyChanged",{key:e},t.s).then((function(){})).o((function(){})):ke()}function Pu(t){return Cu(t).then((function(t){var e=xu(Nu(t,!1));return e.getAll?Au(e.getAll()):new _e((function(t,n){var r=[],i=e.openCursor();i.onsuccess=function(e){(e=e.target.result)?(r.push(e.value),e.continue()):t(r)},i.onerror=function(t){n(t.target.error)}}))})).then((function(e){var n={},r=[];if(0==t.b){for(r=0;r<e.length;r++)n[e[r].fbase_key]=e[r].value;r=function t(e,n){var r,i=[];for(r in e)r in n?typeof e[r]!=typeof n[r]?i.push(r):"object"==typeof e[r]&&null!=e[r]&&null!=n[r]?0<t(e[r],n[r]).length&&i.push(r):e[r]!==n[r]&&i.push(r):i.push(r);for(r in n)r in e||i.push(r);return i}(t.c,n),t.c=n}return r}))}function Ru(t){t.i&&t.i.cancel("STOP_EVENT"),t.f&&(clearTimeout(t.f),t.f=null)}function Du(t){var e=this,n=null;this.a=[],this.type="indexedDB",this.c=t,this.b=ke().then((function(){if(ku()){var t=Mr(),r="__sak"+t;return gu||(gu=new Su),(n=gu).set(r,t).then((function(){return n.get(r)})).then((function(e){if(e!==t)throw Error("indexedDB not supported!");return n.T(r)})).then((function(){return n})).o((function(){return e.c}))}return e.c})).then((function(t){return e.type=t.type,t.ba((function(t){W(e.a,(function(e){e(t)}))}
2)),t}))}function Lu(){this.a={},this.type="inMemory"}function Mu(){if(!function(){var t="Node"==br();if(!(t=ju()||t&&r.INTERNAL.node&&r.INTERNAL.node.localStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(e){return!1}}()){if("Node"==br())throw new C("internal-error","The LocalStorage compatibility library was not found.");throw new C("web-storage-unsupported")}this.a=ju()||r.INTERNAL.node.localStorage,this.type="localStorage"}function ju(){try{var t=c.localStorage,e=Mr();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(n){return null}}function Fu(){this.type="nullStorage"}function Uu(){if(!function(){var t="Node"==br();if(!(t=Vu()||t&&r.INTERNAL.node&&r.INTERNAL.node.sessionStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(e){return!1}}()){if("Node"==br())throw new C("internal-error","The SessionStorage compatibility library was not found.");throw new C("web-storage-unsupported")}this.a=Vu()||r.INTERNAL.node.sessionStorage,this.type="sessionStorage"}function Vu(){try{var t=c.sessionStorage,e=Mr();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(n){return null}}function qu(){var t={};t.Browser=Wu,t.Node=Hu,t.ReactNative=Ku,t.Worker=Gu,this.a=t[br()]}yu.prototype.c=function(t){var e=t.data.eventType,n=t.data.eventId,r=this.a[e];if(r&&0<r.length){t.ports[0].postMessage({status:"ack",eventId:n,eventType:e,response:null});var i=[];W(r,(function(e){i.push(ke().then((function(){return e(t.origin,t.data.data)})))})),Ae(i).then((function(r){var i=[];W(r,(function(t){i.push({fulfilled:t.Mb,value:t.value,reason:t.reason?t.reason.message:void 0})})),W(i,(function(t){for(var e in t)"undefined"===typeof t[e]&&delete t[e]})),t.ports[0].postMessage({status:"done",eventId:n,eventType:e,response:i})}))}},_u.prototype.postMessage=function(t,e){this.a.postMessage(t,e)},wu.prototype.close=function(){for(;0<this.a.length;)Tu(this,this.a[0]);this.b=!0},(e=Su.prototype).set=function(t,e){var n,r=!1,i=this;return Cu(this).then((function(e){return Au((e=xu(Nu(n=e,!0))).get(t))})).then((function(o){var a=xu(Nu(n,!0));return o?(o.value=e,Au(a.put(o))):(i.b++,r=!0,(o={}).fbase_key=t,o.value=e,Au(a.add(o)))})).then((function(){return i.c[t]=e,Ou(i,t)})).ma((function(){r&&i.b--}))},e.get=function(t){return Cu(this).then((function(e){return Au(xu(Nu(e,!1)).get(t))})).then((function(t){return t&&t.value}))},e.T=function(t){var e=!1,n=this;return Cu(this).then((function(r){return e=!0,n.b++,Au(xu(Nu(r,!0)).delete(t))})).then((function(){return delete n.c[t],Ou(n,t)})).ma((function(){e&&n.b--}))},e.ba=function(t){0==this.a.length&&function(t){Ru(t),function e(){t.f=setTimeout((function(){t.i=Pu(t).then((function(e){0<e.length&&W(t.a,(function(t){t(e)}))})).then((function(){e()})).o((function(t){"STOP_EVENT"!=t.message&&e()}))}),800)}()}(this),this.a.push(t)},e.ha=function(t){X(this.a,(function(e){return e==t})),0==this.a.length&&Ru(this)},(e=Du.prototype).get=function(t){return this.b.then((function(e){return e.get(t)}))},e.set=function(t,e){return this.b.then((function(n){return n.set(t,e)}))},e.T=function(t){return this.b.then((function(e){return e.T(t)}))},e.ba=function(t){this.a.push(t)},e.ha=function(t){X(this.a,(function(e){return e==t}))},(e=Lu.prototype).get=function(t){return ke(this.a[t])},e.set=function(t,e){return this.a[t]=e,ke()},e.T=function(t){return delete this.a[t],ke()},e.ba=function(){},e.ha=function(){},(e=Mu.prototype).get=function(t){var e=this;return ke().then((function(){return Lr(e.a.getItem(t))}))},e.set=function(t,e){var n=this;return ke().then((function(){var r=Rr(e);null===r?n.T(t):n.a.setItem(t,r)}))},e.T=function(t){var e=this;return ke().then((function(){e.a.removeItem(t)}))},e.ba=function(t){c.window&&un(c.window,"storage",t)},e.ha=function(t){c.window&&hn(c.window,"storage",t)},(e=Fu.prototype).get=function(){return ke(null)},e.set=function(){return ke()},e.T=function(){return ke()},e.ba=function(){},e.ha=function(){},(e=Uu.prototype).get=function(t){var e=this;return ke().then((function(){return Lr(e.a.getItem(t))}))},e.set=function(t,e){var n=this;return ke().then((function(){var r=Rr(e);null===r?n.T(t):n.a.setItem(t,r)}))},e.T=function(t){var e=this;return ke().then((function(){e.a.removeItem(t)}))},e.ba=function(){},e.ha=function(){};var Bu,zu,Wu={F:Mu,$a:Uu},Hu={F:Mu,$a:Uu},Ku={F:vu,$a:Fu},Gu={F:Mu,$a:Fu},Qu={od:"local",NONE:"none",qd:"session"};function $u(){var t=!(jr(Cr())||!gr()),e=Pr(),n=xr();this.m=t,this.h=e,this.l=n,this.a={},Bu||(Bu=new qu),t=Bu;try{this.g=!sr()&&Br()||!c.indexedDB?new t.a.F:new Du(mr()?new Lu:new t.a.F)}catch(r){this.g=new Lu,this.h=!0}try{this.i=new t.a.$a}catch(r){this.i=new Lu}this.u=new Lu,this.f=E(this.Vb,this),this.b={}}function Xu(){return zu||(zu=new $u),zu}function Yu(t,e){switch(e){case"session":return t.i;case"none":return t.u;default:return t.g}}function Ju(t,e){return"firebase:"+t.name+(e?":"+e:"")}function Zu(t,e,n){return n=Ju(e,n),"local"==e.F&&(t.b[n]=null),Yu(t,e.F).T(n)}function tc(t){t.c&&(clearInterval(t.c),t.c=null)}function ec(t){this.a=t,this.b=Xu()}(e=$u.prototype).get=function(t,e){return Yu(this,t.F).get(Ju(t,e))},e.set=function(t,e,n){var r=Ju(t,n),i=this,o=Yu(this,t.F);return o.set(r,e).then((function(){return o.get(r)})).then((function(e){"local"==t.F&&(i.b[r]=e)}))},e.addListener=function(t,e,n){t=Ju(t,e),this.l&&(this.b[t]=c.localStorage.getItem(t)),dt(this.a)&&(Yu(this,"local").ba(this.f),this.h||(sr()||!Br())&&c.indexedDB||!this.l||function(t){tc(t),t.c=setInterval((function(){for(var e in t.a){var n=c.localStorage.getItem(e),r=t.b[e];n!=r&&(t.b[e]=n,n=new Xe({type:"storage",key:e,target:window,oldValue:r,newValue:n,a:!0}),t.Vb(n))}}),1e3)}(this)),this.a[t]||(this.a[t]=[]),this.a[t].push(n)},e.removeListener=function(t,e,n){t=Ju(t,e),this.a[t]&&(X(this.a[t],(function(t){return t==n})),0==this.a[t].length&&delete this.a[t]),dt(this.a)&&(Yu(this,"local").ha(this.f),tc(this))},e.Vb=function(t){if(t&&t.f){var e=t.a.key;if(null==e)for(var n in this.a){var r=this.b[n];"undefined"===typeof r&&(r=null);var i=c.localStorage.getItem(n);i!==r&&(this.b[n]=i,this.ib(n))}else if(0==e.indexOf("firebase:")&&this.a[e]){if("undefined"!==typeof t.a.a?Yu(this,"local").ha(this.f):tc(this),this.m)if(n=c.localStorage.getItem(e),(r=t.a.newValue)!==n)null!==r?c.localStorage.setItem(e,r):c.localStorage.removeItem(e);else if(this.b[e]===r&&"undefined"===typeof t.a.a)return;var o=this;n=function(){"undefined"===typeof t.a.a&&o.b[e]===c.localStorage.getItem(e)||(o.b[e]=c.localStorage.getItem(e),o.ib(e))},Gt&&ne&&10==ne&&c.localStorage.getItem(e)!==t.a.newValue&&t.a.newValue!==t.a.oldValue?setTimeout(n,10):n()}}else W(t,E(this.ib,this))},e.ib=function(t){this.a[t]&&W(this.a[t],(function(t){t()}))};var nc,rc={name:"authEvent",F:"local"};function ic(){this.a=Xu()}
2function oc(t,e){this.b=ac,this.f=c.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=t,this.h=e,this.l=c.Int32Array?new Int32Array(64):Array(64),void 0===nc&&(nc=c.Int32Array?new Int32Array(pc):pc),this.reset()}I(oc,(function(){this.b=-1}));for(var ac=64,sc=ac-1,uc=[],cc=0;cc<sc;cc++)uc[cc]=0;var lc=Y(128,uc);function hc(t){for(var e=t.f,n=t.l,r=0,i=0;i<e.length;)n[r++]=e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3],i=4*r;for(e=16;64>e;e++){i=0|n[e-15],r=0|n[e-2];var o=(0|n[e-16])+((i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3)|0,a=(0|n[e-7])+((r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)|0;n[e]=o+a|0}r=0|t.a[0],i=0|t.a[1];var s=0|t.a[2],u=0|t.a[3],c=0|t.a[4],l=0|t.a[5],h=0|t.a[6];for(o=0|t.a[7],e=0;64>e;e++){var f=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&s^i&s)|0;a=(o=o+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))|0)+((a=(a=c&l^~c&h)+(0|nc[e])|0)+(0|n[e])|0)|0,o=h,h=l,l=c,c=u+a|0,u=s,s=i,i=r,r=a+f|0}t.a[0]=t.a[0]+r|0,t.a[1]=t.a[1]+i|0,t.a[2]=t.a[2]+s|0,t.a[3]=t.a[3]+u|0,t.a[4]=t.a[4]+c|0,t.a[5]=t.a[5]+l|0,t.a[6]=t.a[6]+h|0,t.a[7]=t.a[7]+o|0}function fc(t,e,n){void 0===n&&(n=e.length);var r=0,i=t.c;if("string"===typeof e)for(;r<n;)t.f[i++]=e.charCodeAt(r++),i==t.b&&(hc(t),i=0);else{if(!d(e))throw Error("message must be string or array");for(;r<n;){var o=e[r++];if(!("number"==typeof o&&0<=o&&255>=o&&o==(0|o)))throw Error("message must be a byte array");t.f[i++]=o,i==t.b&&(hc(t),i=0)}}t.c=i,t.g+=n}oc.prototype.reset=function(){this.g=this.c=0,this.a=c.Int32Array?new Int32Array(this.h):J(this.h)};var pc=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function dc(){oc.call(this,8,vc)}I(dc,oc);var vc=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function yc(t,e,n,r,i){this.u=t,this.i=e,this.l=n,this.m=r||null,this.s=i||null,this.h=e+":"+n,this.w=new ic,this.g=new ec(this.h),this.f=null,this.b=[],this.a=this.c=null}function gc(t){return new C("invalid-cordova-configuration",t)}function mc(t){var e=new dc;fc(e,t),t=[];var n=8*e.g;56>e.c?fc(e,lc,56-e.c):fc(e,lc,e.b-(e.c-56));for(var r=63;56<=r;r--)e.f[r]=255&n,n/=256;for(hc(e),r=n=0;r<e.i;r++)for(var i=24;0<=i;i-=8)t[n++]=e.a[r]>>i&255;return function(t){return K(t,(function(t){return 1<(t=t.toString(16)).length?t:"0"+t})).join("")}(t)}function bc(t,e){for(var n=0;n<t.b.length;n++)try{t.b[n](e)}catch(r){}}function _c(t){return t.f||(t.f=t.ka().then((function(){return new _e((function(e){t.Ca((function n(r){return e(r),t.Qa(n),!1})),function(t){function e(e){r=!0,i&&i.cancel(),wc(t).then((function(r){var i=n;if(r&&e&&e.url){var o=null;-1!=(i=no(e.url)).indexOf("/__/auth/callback")&&(o=(o="object"===typeof(o=Lr(jn(o=Fn(i),"firebaseError")||null))?k(o):null)?new Fo(r.c,r.b,null,null,o,null,r.S()):new Fo(r.c,r.b,i,r.f,null,null,r.S())),i=o||n}bc(t,i)}))}var n=new Fo("unknown",null,null,null,new C("no-auth-event")),r=!1,i=In(500).then((function(){return wc(t).then((function(){r||bc(t,n)}))})),o=c.handleOpenURL;c.handleOpenURL=function(t){if(0==t.toLowerCase().indexOf(kr("BuildInfo.packageName",c).toLowerCase()+"://")&&e({url:t}),"function"===typeof o)try{o(t)}catch(n){console.error(n)}},Bo||(Bo=new Vo),function(t){var e=Bo;e.a.push(t),e.b||(e.b=function(t){for(var n=0;n<e.a.length;n++)e.a[n](t)},"function"===typeof(t=kr("universalLinks.subscribe",c))&&t(null,e.b))}(e)}(t)}))}))),t.f}function wc(t){var e=null;return function(t){return t.b.get(rc,t.a).then((function(t){return Uo(t)}))}(t.g).then((function(n){return e=n,Zu((n=t.g).b,rc,n.a)})).then((function(){return e}))}function Ec(t){this.a=t,this.b=Xu()}(e=yc.prototype).ka=function(){return this.Ga?this.Ga:this.Ga=(yr(void 0)?vr().then((function(){return new _e((function(t,e){var n=c.document,r=setTimeout((function(){e(Error("Cordova framework is not ready."))}),1e3);n.addEventListener("deviceready",(function(){clearTimeout(r),t()}),!1)}))})):xe(Error("Cordova must run in an Android or iOS file scheme."))).then((function(){if("function"!==typeof kr("universalLinks.subscribe",c))throw gc("cordova-universal-links-plugin-fix is not installed");if("undefined"===typeof kr("BuildInfo.packageName",c))throw gc("cordova-plugin-buildinfo is not installed");if("function"!==typeof kr("cordova.plugins.browsertab.openUrl",c))throw gc("cordova-plugin-browsertab is not installed");
2if("function"!==typeof kr("cordova.InAppBrowser.open",c))throw gc("cordova-plugin-inappbrowser is not installed")}),(function(){throw new C("cordova-not-ready")}))},e.Lb=function(t,e){return e(new C("operation-not-supported-in-this-environment")),ke()},e.Jb=function(){return xe(new C("operation-not-supported-in-this-environment"))},e.Xb=function(){return!1},e.Ub=function(){return!0},e.Qb=function(){return!0},e.Kb=function(t,e,n,r){if(this.c)return xe(new C("redirect-operation-pending"));var i=this,o=c.document,a=null,s=null,u=null,l=null;return this.c=ke().then((function(){return jo(e),_c(i)})).then((function(){return function(t,e,n,r,i){var o=function(){for(var t=20,e=[];0<t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}(),a=new Fo(e,r,null,o,new C("no-auth-event"),null,i),s=kr("BuildInfo.packageName",c);if("string"!==typeof s)throw new C("invalid-cordova-configuration");var u=kr("BuildInfo.displayName",c),l={};if(Cr().toLowerCase().match(/iphone|ipad|ipod/))l.ibi=s;else{if(!Cr().toLowerCase().match(/android/))return xe(new C("operation-not-supported-in-this-environment"));l.apn=s}u&&(l.appDisplayName=u),o=mc(o),l.sessionId=o;var h=du(t.u,t.i,t.l,e,n,null,r,t.m,l,t.s,i);return t.ka().then((function(){var e=t.h;return t.w.a.set(rc,a.v(),e)})).then((function(){var e=kr("cordova.plugins.browsertab.isAvailable",c);if("function"!==typeof e)throw new C("invalid-cordova-configuration");var n=null;e((function(e){if(e){if("function"!==typeof(n=kr("cordova.plugins.browsertab.openUrl",c)))throw new C("invalid-cordova-configuration");n(h)}else{if("function"!==typeof(n=kr("cordova.InAppBrowser.open",c)))throw new C("invalid-cordova-configuration");e=Cr(),t.a=n(h,e.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||e.match(/(iPad|iPhone|iPod).*OS 8_\d/i)?"_blank":"_system","location=yes")}}))}))}(i,t,e,n,r)})).then((function(){return new _e((function(t,e){s=function(){var e=kr("cordova.plugins.browsertab.close",c);return t(),"function"===typeof e&&e(),i.a&&"function"===typeof i.a.close&&(i.a.close(),i.a=null),!1},i.Ca(s),u=function(){a||(a=In(2e3).then((function(){e(new C("redirect-cancelled-by-user"))})))},l=function(){Vr()&&u()},o.addEventListener("resume",u,!1),Cr().toLowerCase().match(/android/)||o.addEventListener("visibilitychange",l,!1)})).o((function(t){return wc(i).then((function(){throw t}))}))})).ma((function(){u&&o.removeEventListener("resume",u,!1),l&&o.removeEventListener("visibilitychange",l,!1),a&&a.cancel(),s&&i.Qa(s),i.c=null}))},e.Ca=function(t){this.b.push(t),_c(this).o((function(e){"auth/invalid-cordova-configuration"===e.code&&(e=new Fo("unknown",null,null,null,new C("no-auth-event")),t(e))}))},e.Qa=function(t){X(this.b,(function(e){return e==t}))};var Tc={name:"pendingRedirect",F:"session"};function Sc(t){return Zu(t.b,Tc,t.a)}function Ic(t,e,n){this.i={},this.w=0,this.D=t,this.u=e,this.m=n,this.h=[],this.f=!1,this.l=E(this.s,this),this.b=new Uc,this.B=new Wc,this.g=new Ec(this.u+":"+this.m),this.c={},this.c.unknown=this.b,this.c.signInViaRedirect=this.b,this.c.linkViaRedirect=this.b,this.c.reauthViaRedirect=this.b,this.c.signInViaPopup=this.B,this.c.linkViaPopup=this.B,this.c.reauthViaPopup=this.B,this.a=Cc(this.D,this.u,this.m,x)}function Cc(t,e,n,i){var o=r.SDK_VERSION||null;return yr()?new yc(t,e,n,o,i):new lu(t,e,n,o,i)}function kc(t){t.f||(t.f=!0,t.a.Ca(t.l));var e=t.a;return t.a.ka().o((function(n){throw t.a==e&&t.reset(),n}))}function xc(t){t.a.Ub()&&kc(t).o((function(e){var n=new Fo("unknown",null,null,null,new C("operation-not-supported-in-this-environment"));Dc(e)&&t.s(n)})),t.a.Qb()||Vc(t.b)}function Nc(t,e){Q(t.h,e)||t.h.push(e),t.f||function(t){return t.b.get(Tc,t.a).then((function(t){return"pending"==t}))}(t.g).then((function(e){e?Sc(t.g).then((function(){kc(t).o((function(e){var n=new Fo("unknown",null,null,null,new C("operation-not-supported-in-this-environment"));Dc(e)&&t.s(n)}))})):xc(t)})).o((function(){xc(t)}))}function Ac(t,e){X(t.h,(function(t){return t==e}))}Ic.prototype.reset=function(){this.f=!1,this.a.Qa(this.l),this.a=Cc(this.D,this.u,this.m),this.i={}},Ic.prototype.s=function(t){if(!t)throw new C("invalid-auth-event");
2if(6e5<=S()-this.w&&(this.i={},this.w=0),t&&t.getUid()&&this.i.hasOwnProperty(t.getUid()))return!1;for(var e=!1,n=0;n<this.h.length;n++){var r=this.h[n];if(r.Cb(t.c,t.b)){(e=this.c[t.c])&&(e.h(t,r),t&&(t.f||t.b)&&(this.i[t.getUid()]=!0,this.w=S())),e=!0;break}}return Vc(this.b),e};var Oc=new Ur(2e3,1e4),Pc=new Ur(3e4,6e4);function Rc(t,e,n,r,i,o,a){return t.a.Jb(e,n,r,(function(){t.f||(t.f=!0,t.a.Ca(t.l))}),(function(){t.reset()}),i,o,a)}function Dc(t){return!(!t||"auth/cordova-not-ready"!=t.code)}function Lc(t,e,n,r,i){var o;return function(t){return t.b.set(Tc,"pending",t.a)}(t.g).then((function(){return t.a.Kb(e,n,r,i).o((function(e){if(Dc(e))throw new C("operation-not-supported-in-this-environment");return o=e,Sc(t.g).then((function(){throw o}))})).then((function(){return t.a.Xb()?new _e((function(){})):Sc(t.g).then((function(){return t.pa()})).then((function(){})).o((function(){}))}))}))}function Mc(t,e,n,r,i){return t.a.Lb(r,(function(t){e.la(n,null,t,i)}),Oc.get())}Ic.prototype.pa=function(){return this.b.pa()};var jc={};function Fc(t,e,n){var r=e+":"+n;return jc[r]||(jc[r]=new Ic(t,e,n)),jc[r]}function Uc(){this.b=null,this.f=[],this.c=[],this.a=null,this.i=this.g=!1}function Vc(t){t.g||(t.g=!0,zc(t,!1,null,null))}function qc(t){t.g&&!t.i&&zc(t,!1,null,null)}function Bc(t,e){if(t.b=function(){return ke(e)},t.f.length)for(var n=0;n<t.f.length;n++)t.f[n](e)}function zc(t,e,n,r){e?r?function(t,e){if(t.b=function(){return xe(e)},t.c.length)for(var n=0;n<t.c.length;n++)t.c[n](e)}(t,r):Bc(t,n):Bc(t,{user:null}),t.f=[],t.c=[]}function Wc(){}function Hc(){this.Bb=!1,Object.defineProperty(this,"appVerificationDisabled",{get:function(){return this.Bb},set:function(t){this.Bb=t},enumerable:!1})}function Kc(t,e){this.a=e,Gr(this,"verificationId",t)}function Gc(t,e,n,r){return new Do(t).cb(e,n).then((function(t){return new Kc(t,r)}))}function Qc(t){var e=Bi(t);if(!(e&&e.exp&&e.auth_time&&e.iat))throw new C("internal-error","An internal error occurred. The token obtained by Firebase appears to be malformed. Please retry the operation.");Qr(this,{token:t,expirationTime:qr(1e3*e.exp),authTime:qr(1e3*e.auth_time),issuedAtTime:qr(1e3*e.iat),signInProvider:e.firebase&&e.firebase.sign_in_provider?e.firebase.sign_in_provider:null,signInSecondFactor:e.firebase&&e.firebase.sign_in_second_factor?e.firebase.sign_in_second_factor:null,claims:e})}function $c(t,e,n){var r=e&&e[Yc];if(!r)throw new C("argument-error","Internal assert: Invalid MultiFactorResolver");this.a=t,this.f=vt(e),this.g=n,this.c=new ro(null,r),this.b=[];var i=this;W(e[Xc]||[],(function(t){(t=Jr(t))&&i.b.push(t)})),Gr(this,"auth",this.a),Gr(this,"session",this.c),Gr(this,"hints",this.b)}Uc.prototype.reset=function(){this.b=null,this.a&&(this.a.cancel(),this.a=null)},Uc.prototype.h=function(t,e){if(t){this.reset(),this.g=!0;var n=t.c,r=t.b,i=t.a&&"auth/web-storage-unsupported"==t.a.code,o=t.a&&"auth/operation-not-supported-in-this-environment"==t.a.code;this.i=!(!i&&!o),"unknown"!=n||i||o?t.a?(zc(this,!0,null,t.a),ke()):e.Da(n,r)?function(t,e,n){n=n.Da(e.c,e.b);var r=e.g,i=e.f,o=e.i,a=e.S(),s=!!e.c.match(/Redirect$/);n(r,i,a,o).then((function(e){zc(t,s,e,null)})).o((function(e){zc(t,s,null,e)}))}(this,t,e):xe(new C("invalid-auth-event")):(zc(this,!1,null,null),ke())}else xe(new C("invalid-auth-event"))},Uc.prototype.pa=function(){var t=this;return new _e((function(e,n){t.b?t.b().then(e,n):(t.f.push(e),t.c.push(n),function(t){var e=new C("timeout");t.a&&t.a.cancel(),t.a=In(Pc.get()).then((function(){t.b||(t.g=!0,zc(t,!0,null,e))}))}(t))}))},Wc.prototype.h=function(t,e){if(t){var n=t.c,r=t.b;t.a?(e.la(t.c,null,t.a,t.b),ke()):e.Da(n,r)?function(t,e){var n=t.b,r=t.c;e.Da(r,n)(t.g,t.f,t.S(),t.i).then((function(t){e.la(r,t,null,n)})).o((function(t){e.la(r,null,t,n)}))}(t,e):xe(new C("invalid-auth-event"))}else xe(new C("invalid-auth-event"))},Kc.prototype.confirm=function(t){return t=Lo(this.verificationId,t),this.a(t)};var Xc="mfaInfo",Yc="mfaPendingCredential";function Jc(t,e,n,r){C.call(this,"multi-factor-auth-required",r,e),this.b=new $c(t,e,n),Gr(this,"resolver",this.b)}function Zc(t,e,n){if(t&&y(t.serverResponse)&&"auth/multi-factor-auth-required"===t.code)try{return new Jc(e,t.serverResponse,n,t.message)}catch(r){}return null}function tl(){}function el(t){Gr(this,"factorId",t.ea),this.a=t}function nl(t){if(el.call(this,t),this.a.ea!=Do.PROVIDER_ID)throw new C("argument-error","firebase.auth.PhoneMultiFactorAssertion requires a valid firebase.auth.PhoneAuthCredential")}function rl(t,e){for(var n in $e.call(this,t),e)this[n]=e[n]}function il(t,e){this.a=t,this.b=[],this.c=E(this.wc,this),un(this.a,"userReloaded",this.c);var n=[];e&&e.multiFactor&&e.multiFactor.enrolledFactors&&W(e.multiFactor.enrolledFactors,(function(t){var e=null,r={};
2if(t){t.uid&&(r[ei]=t.uid),t.displayName&&(r[Zr]=t.displayName),t.enrollmentTime&&(r[ti]=new Date(t.enrollmentTime).toISOString()),t.phoneNumber&&(r[ni]=t.phoneNumber);try{e=new ri(r)}catch(i){}t=e}else t=null;t&&n.push(t)})),ol(this,n)}function ol(t,e){t.b=e,Gr(t,"enrolledFactors",e)}function al(t,e,n){if(this.h=t,this.i=e,this.g=n,this.c=3e4,this.f=96e4,this.b=null,this.a=this.c,this.f<this.c)throw Error("Proactive refresh lower bound greater than upper bound!")}function sl(t){this.c=t,this.b=this.a=null}function ul(t){return t.b&&1e3*t.b.c||0}function cl(t,e){var n=e.refreshToken;t.b=qi(e[Xa]||""),t.a=n}function ll(t,e){return function(t,e){return new _e((function(n,r){"refresh_token"==e.grant_type&&e.refresh_token||"authorization_code"==e.grant_type&&e.code?rs(t,t.u+"?key="+encodeURIComponent(t.c),(function(t){t?t.error?r(eu(t)):t.access_token&&t.refresh_token?n(t):r(new C("internal-error")):r(new C("network-request-failed"))}),"POST",Xn(e).toString(),t.g,t.m.get()):r(new C("internal-error"))}))}(t.c,e).then((function(e){return t.b=qi(e.access_token),t.a=e.refresh_token,{accessToken:t.b.toString(),refreshToken:t.a}})).o((function(e){throw"auth/user-token-expired"==e.code&&(t.a=null),e}))}function hl(t,e){this.a=t||null,this.b=e||null,Qr(this,{lastSignInTime:qr(e||null),creationTime:qr(t||null)})}function fl(t,e,n,r,i,o){Qr(this,{uid:t,displayName:r||null,photoURL:i||null,email:n||null,phoneNumber:o||null,providerId:e})}function pl(t,e,n){this.N=[],this.l=t.apiKey,this.m=t.appName,this.s=t.authDomain||null,t=r.SDK_VERSION?Ir(r.SDK_VERSION):null,this.a=new Qa(this.l,P(x),t),this.b=new sl(this.a),_l(this,e[Xa]),cl(this.b,e),Gr(this,"refreshToken",this.b.a),Tl(this,n||{}),_n.call(this),this.P=!1,this.s&&Nr()&&(this.i=Fc(this.s,this.l,this.m)),this.R=[],this.h=null,this.B=function(t){return new al((function(){return t.I(!0)}),(function(t){return!(!t||"auth/network-request-failed"!=t.code)}),(function(){var e=ul(t.b)-S()-3e5;return 0<e?e:0}))}(this),this.Z=E(this.Ma,this);var i=this;this.oa=null,this.za=function(t){i.va(t.g)},this.aa=null,this.W=[],this.ya=function(t){vl(i,t.c)},this.$=null,this.O=new il(this,n),Gr(this,"multiFactor",this.O)}function dl(t,e){t.aa&&hn(t.aa,"languageCodeChanged",t.za),(t.aa=e)&&un(e,"languageCodeChanged",t.za)}function vl(t,e){t.W=e,ns(t.a,r.SDK_VERSION?Ir(r.SDK_VERSION,t.W):null)}function yl(t,e){t.$&&hn(t.$,"frameworkChanged",t.ya),(t.$=e)&&un(e,"frameworkChanged",t.ya)}function gl(t){try{return r.app(t.m).auth()}catch(e){throw new C("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+t.m+"'!")}}function ml(t){t.D||t.B.b||(t.B.start(),hn(t,"tokenChanged",t.Z),un(t,"tokenChanged",t.Z))}function bl(t){hn(t,"tokenChanged",t.Z),t.B.stop()}function _l(t,e){t.xa=e,Gr(t,"_lat",e)}function wl(t){for(var e=[],n=0;n<t.R.length;n++)e.push(t.R[n](t));return Ae(e).then((function(){return t}))}function El(t){t.i&&!t.P&&(t.P=!0,Nc(t.i,t))}function Tl(t,e){Qr(t,{uid:e.uid,displayName:e.displayName||null,photoURL:e.photoURL||null,email:e.email||null,emailVerified:e.emailVerified||!1,phoneNumber:e.phoneNumber||null,isAnonymous:e.isAnonymous||!1,tenantId:e.tenantId||null,metadata:new hl(e.createdAt,e.lastLoginAt),providerData:[]}),t.a.b=t.tenantId}function Sl(){}function Il(t){return ke().then((function(){if(t.D)throw new C("app-deleted")}))}function Cl(t){return K(t.providerData,(function(t){return t.providerId}))}function kl(t,e){e&&(xl(t,e.providerId),t.providerData.push(e))}function xl(t,e){X(t.providerData,(function(t){return t.providerId==e}))}function Nl(t,e,n){("uid"!=e||n)&&t.hasOwnProperty(e)&&Gr(t,e,n)}function Al(t,e){t!=e&&(Qr(t,{uid:e.uid,displayName:e.displayName,photoURL:e.photoURL,email:e.email,emailVerified:e.emailVerified,phoneNumber:e.phoneNumber,isAnonymous:e.isAnonymous,tenantId:e.tenantId,providerData:[]}),e.metadata?Gr(t,"metadata",function(t){return new hl(t.a,t.b)}(e.metadata)):Gr(t,"metadata",new hl),W(e.providerData,(function(e){kl(t,e)})),function(t,e){t.b=e.b,t.a=e.a}(t.b,e.b),Gr(t,"refreshToken",t.b.a),ol(t.O,e.O.b))}function Ol(t){return t.I().then((function(e){var n=t.isAnonymous;return function(t,e){return Zs(t.a,As,{idToken:e}).then(E(t.Ic,t))}(t,e).then((function(){return n||Nl(t,"isAnonymous",!1),e}))}))}function Pl(t,e){e[Xa]&&t.xa!=e[Xa]&&(cl(t.b,e),t.dispatchEvent(new rl("tokenChanged")),_l(t,e[Xa]),Nl(t,"refreshToken",t.b.a))}function Rl(t,e){return Ol(t).then((function(){if(Q(Cl(t),e))return wl(t).then((function(){throw new C("provider-already-linked")}))}))}function Dl(t,e,n){return $r({user:t,credential:Mo(e),additionalUserInfo:e=Gi(e),operationType:n})}function Ll(t,e){return Pl(t,e),t.reload().then((function(){return t}))}function Ml(t,e,n,i,o){if(!Nr())return xe(new C("operation-not-supported-in-this-environment"));if(t.h&&!o)return xe(t.h);var a=Ki(n.providerId),s=Mr(t.uid+":::"),u=null;(!Pr()||gr())&&t.s&&n.isOAuthProvider&&(u=du(t.s,t.l,t.m,e,n,null,s,r.SDK_VERSION||null,null,null,t.tenantId));var c=fr(u,a&&a.ta,a&&a.sa);return i=i().then((function(){if(Fl(t),!o)return t.I().then((function(){}))})).then((function(){return Rc(t.i,c,e,n,s,!!u,t.tenantId)})).then((function(){return new _e((function(n,r){t.la(e,null,new C("cancelled-popup-request"),t.g||null),t.f=n,t.w=r,t.g=s,t.c=Mc(t.i,t,e,c,s)}))})).then((function(t){return c&&hr(c),t?$r(t):null})).o((function(t){throw c&&hr(c),t})),Ul(t,i,o)}function jl(t,e,n,r,i){if(!Nr())return xe(new C("operation-not-supported-in-this-environment"));if(t.h&&!i)return xe(t.h);var o=null,a=Mr(t.uid+":::");return r=r().then((function(){if(Fl(t),!i)return t.I().then((function(){}))})).then((function(){return t.fa=a,wl(t)})).then((function(e){return t.ga&&(e=(e=t.ga).b.set(Bl,t.v(),e.a)),e})).then((function(){return Lc(t.i,e,n,a,t.tenantId)})).o((function(e){if(o=e,t.ga)return zl(t.ga);throw o})).then((function(){if(o)throw o})),Ul(t,r,i)}function Fl(t){if(!t.i||!t.P){if(t.i&&!t.P)throw new C("internal-error");throw new C("auth-domain-config-required")}}function Ul(t,e,n){var r=function(t,e,n){return t.h&&!n?(e.cancel(),xe(t.h)):e.o((function(e){throw!e||"auth/user-disabled"!=e.code&&"auth/user-token-expired"!=e.code||(t.h||t.dispatchEvent(new rl("userInvalidated")),t.h=e),e}))}(t,e,n);return t.N.push(r),r.ma((function(){$(t.N,r)})),r.o((function(e){var n=null;throw e&&"auth/multi-factor-auth-required"===e.code&&(n=Zc(e.v(),gl(t),E(t.hc,t))),n||e}))}function Vl(t){if(!t.apiKey)return null;var e={apiKey:t.apiKey,authDomain:t.authDomain,appName:t.appName},n={};if(!t.stsTokenManager||!t.stsTokenManager.accessToken)return null;n[Xa]=t.stsTokenManager.accessToken,n.refreshToken=t.stsTokenManager.refreshToken||null;var r=new pl(e,n,t);return t.providerData&&W(t.providerData,(function(t){t&&kl(r,$r(t))})),t.redirectEventId&&(r.fa=t.redirectEventId),r}function ql(t){this.a=t,this.b=Xu()}$c.prototype.Pc=function(t){var e=this;return t.ob(this.a.b,this.c).then((function(t){var n=vt(e.f);return delete n[Xc],delete n[Yc],gt(n,t),e.g(n)}))},I(Jc,C),tl.prototype.ob=function(t,e,n){return e.type==io?function(t,e,n,r){return n.Fa().then((function(n){return n={idToken:n},"undefined"!==typeof r&&(n.displayName=r),gt(n,{phoneVerificationInfo:Ro(t.a)}),Zs(e,xs,n)}))}(this,t,e,n):function(t,e,n){return n.Fa().then((function(n){return gt(n={mfaPendingCredential:n},{phoneVerificationInfo:Ro(t.a)}),Zs(e,Ns,n)}))}(this,t,e)},I(el,tl),I(nl,el),I(rl,$e),(e=il.prototype).wc=function(t){ol(this,function(t){var e=[];return W(t.mfaInfo||[],(function(t){(t=Jr(t))&&e.push(t)})),e}(t.ed))},e.Ob=function(){return this.a.I().then((function(t){return new ro(t,null)}))},e.dc=function(t,e){var n=this,r=this.a.a;return this.Ob().then((function(n){return t.ob(r,n,e)})).then((function(t){return Pl(n.a,t),n.a.reload()}))},e.$c=function(t){var e=this,n="string"===typeof t?t:t.uid,r=this.a.a;return this.a.I().then((function(t){return Zs(r,Js,{idToken:t,mfaEnrollmentId:n})})).then((function(t){var r=H(e.b,(function(t){return t.uid!=n}));return ol(e,r),Pl(e.a,t),e.a.reload().o((function(t){if("auth/user-token-expired"!=t.code)throw t}))}))},e.v=function(){return{multiFactor:{enrolledFactors:K(this.b,(function(t){return t.v()}
2))}}},al.prototype.start=function(){this.a=this.c,function t(e,n){e.stop(),e.b=In(function(t,e){return e?(t.a=t.c,t.g()):(e=t.a,t.a*=2,t.a>t.f&&(t.a=t.f),e)}(e,n)).then((function(){return function(){var t=c.document,e=null;return Vr()||!t?ke():new _e((function(n){e=function(){Vr()&&(t.removeEventListener("visibilitychange",e,!1),n())},t.addEventListener("visibilitychange",e,!1)})).o((function(n){throw t.removeEventListener("visibilitychange",e,!1),n}))}()})).then((function(){return e.h()})).then((function(){t(e,!0)})).o((function(n){e.i(n)&&t(e,!1)}))}(this,!0)},al.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)},sl.prototype.v=function(){return{apiKey:this.c.c,refreshToken:this.a,accessToken:this.b&&this.b.toString(),expirationTime:ul(this)}},sl.prototype.getToken=function(t){return t=!!t,this.b&&!this.a?xe(new C("user-token-expired")):t||!this.b||S()>ul(this)-3e4?this.a?ll(this,{grant_type:"refresh_token",refresh_token:this.a}):ke(null):ke({accessToken:this.b.toString(),refreshToken:this.a})},hl.prototype.v=function(){return{lastLoginAt:this.b,createdAt:this.a}},I(pl,_n),pl.prototype.va=function(t){this.oa=t,es(this.a,t)},pl.prototype.ja=function(){return this.oa},pl.prototype.Ea=function(){return J(this.W)},pl.prototype.Ma=function(){this.B.b&&(this.B.stop(),this.B.start())},Gr(pl.prototype,"providerId","firebase"),(e=pl.prototype).reload=function(){var t=this;return Ul(this,Il(this).then((function(){return Ol(t).then((function(){return wl(t)})).then(Sl)})))},e.mc=function(t){return this.I(t).then((function(t){return new Qc(t)}))},e.I=function(t){var e=this;return Ul(this,Il(this).then((function(){return e.b.getToken(t)})).then((function(t){if(!t)throw new C("internal-error");return t.accessToken!=e.xa&&(_l(e,t.accessToken),e.dispatchEvent(new rl("tokenChanged"))),Nl(e,"refreshToken",t.refreshToken),t.accessToken})))},e.Ic=function(t){if(!(t=t.users)||!t.length)throw new C("internal-error");Tl(this,{uid:(t=t[0]).localId,displayName:t.displayName,photoURL:t.photoUrl,email:t.email,emailVerified:!!t.emailVerified,phoneNumber:t.phoneNumber,lastLoginAt:t.lastLoginAt,createdAt:t.createdAt,tenantId:t.tenantId});for(var e=function(t){return(t=t.providerUserInfo)&&t.length?K(t,(function(t){return new fl(t.rawId,t.providerId,t.email,t.displayName,t.photoUrl,t.phoneNumber)})):[]}(t),n=0;n<e.length;n++)kl(this,e[n]);Nl(this,"isAnonymous",!(this.email&&t.passwordHash)&&!(this.providerData&&this.providerData.length)),this.dispatchEvent(new rl("userReloaded",{ed:t}))},e.Jc=function(t){return Hr("firebase.User.prototype.reauthenticateAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.reauthenticateWithCredential instead."),this.pb(t)},e.pb=function(t){var e=this,n=null;return Ul(this,t.c(this.a,this.uid).then((function(t){return Pl(e,t),n=Dl(e,t,"reauthenticate"),e.h=null,e.reload()})).then((function(){return n})),!0)},e.Ac=function(t){return Hr("firebase.User.prototype.linkAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.linkWithCredential instead."),this.mb(t)},e.mb=function(t){var e=this,n=null;return Ul(this,Rl(this,t.providerId).then((function(){return e.I()})).then((function(n){return t.b(e.a,n)})).then((function(t){return n=Dl(e,t,"link"),Ll(e,t)})).then((function(){return n})))},e.Bc=function(t,e){var n=this;return Ul(this,Rl(this,"phone").then((function(){return Gc(gl(n),t,e,E(n.mb,n))})))},e.Kc=function(t,e){var n=this;return Ul(this,ke().then((function(){return Gc(gl(n),t,e,E(n.pb,n))})),!0)},e.xb=function(t){var e=this;return Ul(this,this.I().then((function(n){return e.a.xb(n,t)})).then((function(t){return Pl(e,t),e.reload()})))},e.cd=function(t){var e=this;return Ul(this,this.I().then((function(n){return t.b(e.a,n)})).then((function(t){return Pl(e,t),e.reload()})))},e.yb=function(t){var e=this;return Ul(this,this.I().then((function(n){return e.a.yb(n,t)})).then((function(t){return Pl(e,t),e.reload()})))},e.zb=function(t){if(void 0===t.displayName&&void 0===t.photoURL)return Il(this);var e=this;return Ul(this,this.I().then((function(n){return e.a.zb(n,{displayName:t.displayName,photoUrl:t.photoURL})}
2)).then((function(t){return Pl(e,t),Nl(e,"displayName",t.displayName||null),Nl(e,"photoURL",t.photoUrl||null),W(e.providerData,(function(t){"password"===t.providerId&&(Gr(t,"displayName",e.displayName),Gr(t,"photoURL",e.photoURL))})),wl(e)})).then(Sl))},e.ad=function(t){var e=this;return Ul(this,Ol(this).then((function(n){return Q(Cl(e),t)?function(t,e,n){return Zs(t,Is,{idToken:e,deleteProvider:n})}(e.a,n,[t]).then((function(t){var n={};return W(t.providerUserInfo||[],(function(t){n[t.providerId]=!0})),W(Cl(e),(function(t){n[t]||xl(e,t)})),n[Do.PROVIDER_ID]||Gr(e,"phoneNumber",null),wl(e)})):wl(e).then((function(){throw new C("no-such-provider")}))})))},e.delete=function(){var t=this;return Ul(this,this.I().then((function(e){return Zs(t.a,Ss,{idToken:e})})).then((function(){t.dispatchEvent(new rl("userDeleted"))}))).then((function(){for(var e=0;e<t.N.length;e++)t.N[e].cancel("app-deleted");dl(t,null),yl(t,null),t.N=[],t.D=!0,bl(t),Gr(t,"refreshToken",null),t.i&&Ac(t.i,t)}))},e.Cb=function(t,e){return!!("linkViaPopup"==t&&(this.g||null)==e&&this.f||"reauthViaPopup"==t&&(this.g||null)==e&&this.f||"linkViaRedirect"==t&&(this.fa||null)==e||"reauthViaRedirect"==t&&(this.fa||null)==e)},e.la=function(t,e,n,r){"linkViaPopup"!=t&&"reauthViaPopup"!=t||r!=(this.g||null)||(n&&this.w?this.w(n):e&&!n&&this.f&&this.f(e),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.w)},e.Da=function(t,e){return"linkViaPopup"==t&&e==(this.g||null)?E(this.Hb,this):"reauthViaPopup"==t&&e==(this.g||null)?E(this.Ib,this):"linkViaRedirect"==t&&(this.fa||null)==e?E(this.Hb,this):"reauthViaRedirect"==t&&(this.fa||null)==e?E(this.Ib,this):null},e.Cc=function(t){var e=this;return Ml(this,"linkViaPopup",t,(function(){return Rl(e,t.providerId).then((function(){return wl(e)}))}),!1)},e.Lc=function(t){return Ml(this,"reauthViaPopup",t,(function(){return ke()}),!0)},e.Dc=function(t){var e=this;return jl(this,"linkViaRedirect",t,(function(){return Rl(e,t.providerId)}),!1)},e.Mc=function(t){return jl(this,"reauthViaRedirect",t,(function(){return ke()}),!0)},e.Hb=function(t,e,n,r){var i=this;this.c&&(this.c.cancel(),this.c=null);var o=null;return Ul(this,this.I().then((function(n){return gs(i.a,{requestUri:t,postBody:r,sessionId:e,idToken:n})})).then((function(t){return o=Dl(i,t,"link"),Ll(i,t)})).then((function(){return o})))},e.Ib=function(t,e,n,r){var i=this;this.c&&(this.c.cancel(),this.c=null);var o=null;return Ul(this,ke().then((function(){return so(ms(i.a,{requestUri:t,sessionId:e,postBody:r,tenantId:n}),i.uid)})).then((function(t){return o=Dl(i,t,"reauthenticate"),Pl(i,t),i.h=null,i.reload()})).then((function(){return o})),!0)},e.qb=function(t){var e=this,n=null;return Ul(this,this.I().then((function(e){return n=e,"undefined"===typeof t||dt(t)?{}:ji(new ki(t))})).then((function(t){return e.a.qb(n,t)})).then((function(t){if(e.email!=t)return e.reload()})).then((function(){})))},e.Ab=function(t,e){var n=this,r=null;return Ul(this,this.I().then((function(t){return r=t,"undefined"===typeof e||dt(e)?{}:ji(new ki(e))})).then((function(e){return n.a.Ab(r,t,e)})).then((function(t){if(n.email!=t)return n.reload()})).then((function(){})))},e.hc=function(t){var e=null,n=this;return Ul(this,t=so(ke(t),n.uid).then((function(t){return e=Dl(n,t,"reauthenticate"),Pl(n,t),n.h=null,n.reload()})).then((function(){return e})),!0)},e.toJSON=function(){return this.v()},e.v=function(){var t={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,tenantId:this.tenantId,providerData:[],apiKey:this.l,appName:this.m,authDomain:this.s,stsTokenManager:this.b.v(),redirectEventId:this.fa||null};return this.metadata&>(t,this.metadata.v()),W(this.providerData,(function(e){t.providerData.push(function(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}(e))})),gt(t,this.O.v()),t};var Bl={name:"redirectUser",F:"session"};function zl(t){return Zu(t.b,Bl,t.a)}function Wl(t){this.a=t,this.b=Xu(),this.c=null,this.f=function(t){var e=Gl("local"),n=Gl("session"),r=Gl("none");return function(t,e,n){var r=Ju(e,n),i=Yu(t,e.F);return t.get(e,n).then((function(o){var a=null;try{a=Lr(c.localStorage.getItem(r))}catch(s){}if(a&&!o)return c.localStorage.removeItem(r),t.set(e,a,n);a&&o&&"localStorage"!=i.type&&c.localStorage.removeItem(r)}))}(t.b,e,t.a).then((function(){return t.b.get(n,t.a)})).then((function(i){return i?n:t.b.get(r,t.a).then((function(n){return n?r:t.b.get(e,t.a).then((function(n){return n?e:t.b.get(Kl,t.a).then((function(t){return t?Gl(t):e}))}))}))})).then((function(e){return t.c=e,Hl(t,e.F)})).o((function(){t.c||(t.c=e)}))}(this),this.b.addListener(Gl("local"),this.a,E(this.g,this))}function Hl(t,e){var n,r=[];for(n in Qu)Qu[n]!==e&&r.push(Zu(t.b,Gl(Qu[n]),t.a));return r.push(Zu(t.b,Kl,t.a)),function(t){return new _e((function(e,n){var r=t.length,i=[];if(r)for(var o=function(t,n){r--,i[t]=n,0==r&&e(i)},a=function(t){n(t)},s=0;s<t.length;s++)Ne(t[s],T(o,s),a);else e(i)}))}(r)}Wl.prototype.g=function(){var t=this,e=Gl("local");Yl(this,(function(){return ke().then((function(){return t.c&&"local"!=t.c.F?t.b.get(e,t.a):null})).then((function(n){if(n)return Hl(t,"local").then((function(){t.c=e}))}))}))};var Kl={name:"persistence",F:"session"};function Gl(t){return{name:"authUser",F:t}}function Ql(t,e){return Yl(t,(function(){return t.b.set(t.c,e.v(),t.a)}))}function $l(t){return Yl(t,(function(){return Zu(t.b,t.c,t.a)}))}function Xl(t,e){return Yl(t,(function(){return t.b.get(t.c,t.a).then((function(t){return t&&e&&(t.authDomain=e),Vl(t||{})}))}))}function Yl(t,e){return t.f=t.f.then(e,e),t.f}function Jl(t){if(this.l=!1,Gr(this,"settings",new Hc),Gr(this,"app",t),!ah(this).options||!ah(this).options.apiKey)throw new C("invalid-api-key");t=r.SDK_VERSION?Ir(r.SDK_VERSION):null,this.b=new Qa(ah(this).options&&ah(this).options.apiKey,P(x),t),this.P=[],this.m=[],this.O=[],this.$b=r.INTERNAL.createSubscribe(E(this.xc,this)),this.W=void 0,this.ac=r.INTERNAL.createSubscribe(E(this.yc,this)),ih(this,null),this.i=new Wl(ah(this).options.apiKey+":"+ah(this).name),this.B=new ql(ah(this).options.apiKey+":"+ah(this).name),this.Z=lh(this,function(t){var e=ah(t).options.authDomain,n=function(t){var e=function(t,e){return t.b.get(Bl,t.a).then((function(t){return t&&e&&(t.authDomain=e),Vl(t||{})}))}(t.B,ah(t).options.authDomain).then((function(e){return(t.D=e)&&(e.ga=t.B),zl(t.B)}));return lh(t,e)}(t).then((function(){return Xl(t.i,e)})).then((function(e){return e?(e.ga=t.B,t.D&&(t.D.fa||null)==(e.fa||null)?e:e.reload().then((function(){return Ql(t.i,e).then((function(){return e}))})).o((function(n){return"auth/network-request-failed"==n.code?e:$l(t.i)}
2))):null})).then((function(e){ih(t,e||null)}));return lh(t,n)}(this)),this.h=lh(this,function(t){return t.Z.then((function(){return nh(t)})).o((function(){})).then((function(){if(!t.l)return t.oa()})).o((function(){})).then((function(){if(!t.l){t.aa=!0;var e=t.i;e.b.addListener(Gl("local"),e.a,t.oa)}}))}(this)),this.aa=!1,this.oa=E(this.Xc,this),this.Ma=E(this.ca,this),this.xa=E(this.jc,this),this.ya=E(this.uc,this),this.za=E(this.vc,this),this.a=null,function(t){var e=ah(t).options.authDomain,n=ah(t).options.apiKey;e&&Nr()&&(t.Zb=t.Z.then((function(){if(!t.l){if(t.a=Fc(e,n,ah(t).name),Nc(t.a,t),sh(t)&&El(sh(t)),t.D){El(t.D);var r=t.D;r.va(t.ja()),dl(r,t),vl(r=t.D,t.N),yl(r,t),t.D=null}return t.a}})))}(this),this.INTERNAL={},this.INTERNAL.delete=E(this.delete,this),this.INTERNAL.logFramework=E(this.Ec,this),this.s=0,_n.call(this),function(t){Object.defineProperty(t,"lc",{get:function(){return this.ja()},set:function(t){this.va(t)},enumerable:!1}),t.$=null,Object.defineProperty(t,"ti",{get:function(){return this.S()},set:function(t){this.ub(t)},enumerable:!1}),t.R=null}(this),this.N=[]}function Zl(t){$e.call(this,"languageCodeChanged"),this.g=t}function th(t){$e.call(this,"frameworkChanged"),this.c=t}function eh(t){return t.Zb||xe(new C("auth-domain-config-required"))}function nh(t){if(!Nr())return xe(new C("operation-not-supported-in-this-environment"));var e=eh(t).then((function(){return t.a.pa()})).then((function(t){return t?$r(t):null}));return lh(t,e)}function rh(t,e){var n={};return n.apiKey=ah(t).options.apiKey,n.authDomain=ah(t).options.authDomain,n.appName=ah(t).name,t.Z.then((function(){return function(t,e,n,r){var i=new pl(t,e);return n&&(i.ga=n),r&&vl(i,r),i.reload().then((function(){return i}))}(n,e,t.B,t.Ea())})).then((function(e){return sh(t)&&e.uid==sh(t).uid?(Al(sh(t),e),t.ca(e)):(ih(t,e),El(e),t.ca(e))})).then((function(){ch(t)}))}function ih(t,e){sh(t)&&(function(t,e){X(t.R,(function(t){return t==e}))}(sh(t),t.Ma),hn(sh(t),"tokenChanged",t.xa),hn(sh(t),"userDeleted",t.ya),hn(sh(t),"userInvalidated",t.za),bl(sh(t))),e&&(e.R.push(t.Ma),un(e,"tokenChanged",t.xa),un(e,"userDeleted",t.ya),un(e,"userInvalidated",t.za),0<t.s&&ml(e)),Gr(t,"currentUser",e),e&&(e.va(t.ja()),dl(e,t),vl(e,t.N),yl(e,t))}function oh(t,e){var n=null,r=null;return lh(t,e.then((function(e){return n=Mo(e),r=Gi(e),rh(t,e)}),(function(e){var n=null;throw e&&"auth/multi-factor-auth-required"===e.code&&(n=Zc(e.v(),t,E(t.ic,t))),n||e})).then((function(){return $r({user:sh(t),credential:n,additionalUserInfo:r,operationType:"signIn"})})))}function ah(t){return t.app}function sh(t){return t.currentUser}function uh(t){return sh(t)&&sh(t)._lat||null}function ch(t){if(t.aa){for(var e=0;e<t.m.length;e++)t.m[e]&&t.m[e](uh(t));if(t.W!==t.getUid()&&t.O.length)for(t.W=t.getUid(),e=0;e<t.O.length;e++)t.O[e]&&t.O[e](uh(t))}}function lh(t,e){return t.P.push(e),e.ma((function(){$(t.P,e)})),e}function hh(){}function fh(){this.a={},this.b=1e12}Wl.prototype.tb=function(t){var e=null,n=this;return function(t){var e=new C("invalid-persistence-type"),n=new C("unsupported-persistence-type");t:{for(r in Qu)if(Qu[r]==t){var r=!0;break t}r=!1}if(!r||"string"!==typeof t)throw e;switch(br()){case"ReactNative":if("session"===t)throw n;break;case"Node":if("none"!==t)throw n;break;case"Worker":if("session"===t||!ku()&&"none"!==t)throw n;break;default:if(!xr()&&"none"!==t)throw n}}(t),Yl(this,(function(){return t!=n.c.F?n.b.get(n.c,n.a).then((function(r){return e=r,Hl(n,t)})).then((function(){if(n.c=Gl(t),e)return n.b.set(n.c,e,n.a)})):ke()}))},I(Jl,_n),I(Zl,$e),I(th,$e),(e=Jl.prototype).tb=function(t){return lh(this,t=this.i.tb(t))},e.va=function(t){this.$===t||this.l||(this.$=t,es(this.b,this.$),this.dispatchEvent(new Zl(this.ja())))},e.ja=function(){return this.$},e.dd=function(){var t=c.navigator;this.va(t&&(t.languages&&t.languages[0]||t.language||t.userLanguage)||null)},e.Ec=function(t){this.N.push(t),ns(this.b,r.SDK_VERSION?Ir(r.SDK_VERSION,this.N):null),this.dispatchEvent(new th(this.N))},e.Ea=function(){return J(this.N)},e.ub=function(t){this.R===t||this.l||(this.R=t,this.b.b=this.R)},e.S=function(){return this.R},e.toJSON=function(){return{apiKey:ah(this).options.apiKey,authDomain:ah(this).options.authDomain,appName:ah(this).name,currentUser:sh(this)&&sh(this).v()}},e.Cb=function(t,e){switch(t){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==e&&!!this.f;default:return!1}},e.la=function(t,e,n,r){"signInViaPopup"==t&&this.g==r&&(n&&this.w?this.w(n):e&&!n&&this.f&&this.f(e),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.w)},e.Da=function(t,e){return"signInViaRedirect"==t||"signInViaPopup"==t&&this.g==e&&this.f?E(this.gc,this):null},e.gc=function(t,e,n,r){var i=this,o={requestUri:t,postBody:r,sessionId:e,tenantId:n};return this.c&&(this.c.cancel(),this.c=null),i.Z.then((function(){return oh(i,ys(i.b,o))}))},e.Vc=function(t){if(!Nr())return xe(new C("operation-not-supported-in-this-environment"));var e=this,n=Ki(t.providerId),i=Mr(),o=null;(!Pr()||gr())&&ah(this).options.authDomain&&t.isOAuthProvider&&(o=du(ah(this).options.authDomain,ah(this).options.apiKey,ah(this).name,"signInViaPopup",t,null,i,r.SDK_VERSION||null,null,null,this.S()));var a=fr(o,n&&n.ta,n&&n.sa);return lh(this,n=eh(this).then((function(n){return Rc(n,a,"signInViaPopup",t,i,!!o,e.S())})).then((function(){return new _e((function(t,n){e.la("signInViaPopup",null,new C("cancelled-popup-request"),e.g),e.f=t,e.w=n,e.g=i,e.c=Mc(e.a,e,"signInViaPopup",a,i)}))})).then((function(t){return a&&hr(a),t?$r(t):null})).o((function(t){throw a&&hr(a),t})))},e.Wc=function(t){if(!Nr())return xe(new C("operation-not-supported-in-this-environment"));var e=this;return lh(this,eh(this).then((function(){return function(t){return Yl(t,(function(){return t.b.set(Kl,t.c.F,t.a)}))}(e.i)})).then((function(){return Lc(e.a,"signInViaRedirect",t,void 0,e.S())})))},e.pa=function(){var t=this;return nh(this).then((function(e){return t.a&&qc(t.a.b),e})).o((function(e){throw t.a&&qc(t.a.b),e}))},e.bd=function(t){if(!t)return xe(new C("null-user"));if(this.R!=t.tenantId)return xe(new C("tenant-id-mismatch"));var e=this,n={};n.apiKey=ah(this).options.apiKey,n.authDomain=ah(this).options.authDomain,n.appName=ah(this).name;var r=function(t,e,n,r){var i=t.b,o={};return o[Xa]=i.b&&i.b.toString(),o.refreshToken=i.a,e=new pl(e||{apiKey:t.l,authDomain:t.s,appName:t.m},o),n&&(e.ga=n),r&&vl(e,r),Al(e,t),e}(t,n,e.B,e.Ea());return lh(this,this.h.then((function(){if(ah(e).options.apiKey!=t.l)return r.reload()})).then((function(){return sh(e)&&t.uid==sh(e).uid?(Al(sh(e),t),e.ca(t)):(ih(e,r),El(r),e.ca(r))})).then((function(){ch(e)})))},e.wb=function(){var t=this;return lh(this,this.h.then((function(){return t.a&&qc(t.a.b),sh(t)?(ih(t,null),$l(t.i).then((function(){ch(t)}))):ke()})))},e.Xc=function(){var t=this;return Xl(this.i,ah(this).options.authDomain).then((function(e){if(!t.l){var n;if(n=sh(t)&&e){n=sh(t).uid;var r=e.uid;n=void 0!==n&&null!==n&&""!==n&&void 0!==r&&null!==r&&""!==r&&n==r}if(n)return Al(sh(t),e),sh(t).I();(sh(t)||e)&&(ih(t,e),e&&(El(e),e.ga=t.B),t.a&&Nc(t.a,t),ch(t))}}))},e.ca=function(t){return Ql(this.i,t)},e.jc=function(){ch(this),this.ca(sh(this))},e.uc=function(){this.wb()},e.vc=function(){this.wb()},e.ic=function(t){var e=this;return this.h.then((function(){return oh(e,ke(t))}))},e.xc=function(t){var e=this;this.addAuthTokenListener((function(){t.next(sh(e))}))},e.yc=function(t){var e=this;!function(t,e){t.O.push(e),lh(t,t.h.then((function(){!t.l&&Q(t.O,e)&&t.W!==t.getUid()&&(t.W
2=t.getUid(),e(uh(t)))})))}(this,(function(){t.next(sh(e))}))},e.Gc=function(t,e,n){var r=this;return this.aa&&Promise.resolve().then((function(){"function"===typeof t?t(sh(r)):"function"===typeof t.next&&t.next(sh(r))})),this.$b(t,e,n)},e.Fc=function(t,e,n){var r=this;return this.aa&&Promise.resolve().then((function(){r.W=r.getUid(),"function"===typeof t?t(sh(r)):"function"===typeof t.next&&t.next(sh(r))})),this.ac(t,e,n)},e.kc=function(t){var e=this;return lh(this,this.h.then((function(){return sh(e)?sh(e).I(t).then((function(t){return{accessToken:t}})):null})))},e.Rc=function(t){var e=this;return this.h.then((function(){return oh(e,Zs(e.b,Gs,{token:t}))})).then((function(t){var n=t.user;return Nl(n,"isAnonymous",!1),e.ca(n),t}))},e.Sc=function(t,e){var n=this;return this.h.then((function(){return oh(n,Zs(n.b,Qs,{email:t,password:e}))}))},e.cc=function(t,e){var n=this;return this.h.then((function(){return oh(n,Zs(n.b,Es,{email:t,password:e}))}))},e.Ya=function(t){var e=this;return this.h.then((function(){return oh(e,t.ia(e.b))}))},e.Qc=function(t){return Hr("firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential is deprecated. Please use firebase.auth.Auth.prototype.signInWithCredential instead."),this.Ya(t)},e.vb=function(){var t=this;return this.h.then((function(){var e=sh(t);if(e&&e.isAnonymous){var n=$r({providerId:null,isNewUser:!1});return $r({user:e,credential:null,additionalUserInfo:n,operationType:"signIn"})}return oh(t,t.b.vb()).then((function(e){var n=e.user;return Nl(n,"isAnonymous",!0),t.ca(n),e}))}))},e.getUid=function(){return sh(this)&&sh(this).uid||null},e.bc=function(t){this.addAuthTokenListener(t),this.s++,0<this.s&&sh(this)&&ml(sh(this))},e.Nc=function(t){var e=this;W(this.m,(function(n){n==t&&e.s--})),0>this.s&&(this.s=0),0==this.s&&sh(this)&&bl(sh(this)),this.removeAuthTokenListener(t)},e.addAuthTokenListener=function(t){var e=this;this.m.push(t),lh(this,this.h.then((function(){e.l||Q(e.m,t)&&t(uh(e))})))},e.removeAuthTokenListener=function(t){X(this.m,(function(e){return e==t}))},e.delete=function(){this.l=!0;for(var t=0;t<this.P.length;t++)this.P[t].cancel("app-deleted");return this.P=[],this.i&&(t=this.i).b.removeListener(Gl("local"),t.a,this.oa),this.a&&(Ac(this.a,this),qc(this.a.b)),Promise.resolve()},e.fc=function(t){return lh(this,function(t,e){return Zs(t,Ts,{identifier:e,continueUri:Ar()?ur():"http://localhost"}).then((function(t){return t.signinMethods||[]}))}(this.b,t))},e.zc=function(t){return!!Ao(t)},e.sb=function(t,e){var n=this;return lh(this,ke().then((function(){var t=new ki(e);if(!t.c)throw new C("argument-error",Ai+" must be true when sending sign in link to email");return ji(t)})).then((function(e){return n.b.sb(t,e)})).then((function(){})))},e.fd=function(t){return this.Pa(t).then((function(t){return t.data.email}))},e.jb=function(t,e){return lh(this,this.b.jb(t,e).then((function(){})))},e.Pa=function(t){return lh(this,this.b.Pa(t).then((function(t){return new ii(t)})))},e.fb=function(t){return lh(this,this.b.fb(t).then((function(){})))},e.rb=function(t,e){var n=this;return lh(this,ke().then((function(){return"undefined"===typeof e||dt(e)?{}:ji(new ki(e))})).then((function(e){return n.b.rb(t,e)})).then((function(){})))},e.Uc=function(t,e){return lh(this,Gc(this,t,e,E(this.Ya,this)))},e.Tc=function(t,e){var n=this;return lh(this,ke().then((function(){var r=e||ur(),i=No(t,r);if(!(r=Ao(r)))throw new C("argument-error","Invalid email link!");if(r.tenantId!==n.S())throw new C("tenant-id-mismatch");return n.Ya(i)})))},hh.prototype.render=function(){},hh.prototype.reset=function(){},hh.prototype.getResponse=function(){},hh.prototype.execute=function(){};var ph=null;function dh(t,e){return(e=vh(e))&&t.a[e]||null}function vh(t){return(t="undefined"===typeof t?1e12:t)?t.toString():null}function yh(t,e){this.g=!1,this.c=e,this.a=this.b=null,this.h="invisible"!==this.c.size,this.f=ae(t);var n=this;this.i=function(){n.execute()},this.h?this.execute():un(this.f,"click",this.i)}function gh(t){if(t.g)throw Error("reCAPTCHA mock was already deleted!")}function mh(){}function bh(){}fh.prototype.render=function(t,e){return this.a[this.b.toString()]=new yh(t,e),this.b++},fh.prototype.reset=function(t){var e=dh(this,t);t=vh(t),e&&t&&(e.delete(),delete this.a[t])},fh.prototype.getResponse=function(t){return(t=dh(this,t))?t.getResponse():null},fh.prototype.execute=function(t){(t=dh(this,t))&&t.execute()},yh.prototype.getResponse=function(){return gh(this),this.b},yh.prototype.execute=function(){gh(this);var t=this;this.a||(this.a=setTimeout((function(){t.b=function(){for(var t=50,e=[];0<t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}();var e=t.c.callback,n=t.c["expired-callback"];if(e)try{e(t.b)}catch(r){}t.a=setTimeout((function(){if(t.a=null,t.b=null,n)try{n()}catch(r){}t.h&&t.execute()}),6e4)}),500))},yh.prototype.delete=function(){gh(this),this.g=!0,clearTimeout(this.a),this.a=null,hn(this.f,"click",this.i)},Gr(mh,"FACTOR_ID","phone"),bh.prototype.g=function(){return ph||(ph=new fh),ke(ph)},bh.prototype.c=function(){};var _h=null;function wh(){this.b=c.grecaptcha?1/0:0,this.f=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}var Eh=new bt(Et,"https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),Th=new Ur(3e4,6e4);wh.prototype.g=function(t){var e=this;return new _e((function(n,r){var i=setTimeout((function(){r(new C("network-request-failed"))}),Th.get());!c.grecaptcha||t!==e.f&&!e.b?(c[e.a]=function(){if(c.grecaptcha){e.f=t;var o=c.grecaptcha.render;c.grecaptcha.render=function(t,n){return t=o(t,n),e.b++,t},clearTimeout(i),n(c.grecaptcha)}else clearTimeout(i),r(new C("internal-error"));delete c[e.a]},ke(qa(Ct(Eh,{onload:e.a,hl:t||""}))).o((function(){clearTimeout(i),r(new C("internal-error","Unable to load external reCAPTCHA dependencies!"))}))):(clearTimeout(i),n(c.grecaptcha))}))},wh.prototype.c=function(){this.b--};var Sh=null;function Ih(t,e,n,r,i,o,a){if(Gr(this,"type","recaptcha"),this.c=this.f=null,this.D=!1,this.u=e,this.g=null,a?(_h||(_h=new bh),a=_h):(Sh||(Sh=new wh),a=Sh),this.m=a,this.a=n||{theme:"light",type:"image"},this.h=[],this.a[xh])throw new C("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.i="invisible"===this.a[Nh],!c.document)throw new C("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!ae(e)||!this.i&&ae(e).hasChildNodes())throw new C("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.s=new Qa(t,o||null,i||null),this.w=r||function(){return null};var s=this;this.l=[];var u=this.a[Ch];this.a[Ch]=function(t){if(Ah(s,t),"function"===typeof u)u(t);else if("string"===typeof u){var e=kr(u,c);"function"===typeof e&&e(t)}};var l=this.a[kh];this.a[kh]=function(){if(Ah(s,null),"function"===typeof l)l();else if("string"===typeof l){var t=kr(l,c);"function"===typeof t&&t()}}}var Ch="callback",kh="expired-callback",xh="sitekey",Nh="size";function Ah(t,e){for(var n=0;n<t.l.length;n++)try{t.l[n](e)}catch(r){}}function Oh(t,e){return t.h.push(e),e.ma((function(){$(t.h,e)})),e}function Ph(t){if(t.D)throw new C("internal-error","RecaptchaVerifier instance has been destroyed.")}function Rh(t,e,n){var i=!1;try{this.b=n||r.app()}catch(s){throw new C("argument-error","No firebase.app.App instance is currently initialized.")}if(!this.b.options||!this.b.options.apiKey)throw new C("invalid-api-key");n=this.b.options.apiKey;var o=this,a=null;try{a=this.b.auth().Ea()}catch(s){}try{i=this.b.auth().settings.appVerificationDisabledForTesting}catch(s){}
2a=r.SDK_VERSION?Ir(r.SDK_VERSION,a):null,Ih.call(this,n,t,e,(function(){try{var t=o.b.auth().ja()}catch(e){t=null}return t}),a,P(x),i)}function Dh(t,e,n,r){t:{n=Array.prototype.slice.call(n);for(var i=0,o=!1,a=0;a<e.length;a++)if(e[a].optional)o=!0;else{if(o)throw new C("internal-error","Argument validator encountered a required argument after an optional argument.");i++}if(o=e.length,n.length<i||o<n.length)r="Expected "+(i==o?1==i?"1 argument":i+" arguments":i+"-"+o+" arguments")+" but got "+n.length+".";else{for(i=0;i<n.length;i++)if(o=e[i].optional&&void 0===n[i],!e[i].K(n[i])&&!o){if(e=e[i],0>i||i>=Lh.length)throw new C("internal-error","Argument validator received an unsupported number of arguments.");n=Lh[i],r=(r?"":n+" argument ")+(e.name?'"'+e.name+'" ':"")+"must be "+e.J+".";break t}r=null}}if(r)throw new C("argument-error",t+" failed: "+r)}(e=Ih.prototype).Ga=function(){var t=this;return this.f?this.f:this.f=Oh(this,ke().then((function(){if(Ar()&&!mr())return vr();throw new C("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")})).then((function(){return t.m.g(t.w())})).then((function(e){return t.g=e,Zs(t.s,Ms,{})})).then((function(e){t.a[xh]=e.recaptchaSiteKey})).o((function(e){throw t.f=null,e})))},e.render=function(){Ph(this);var t=this;return Oh(this,this.Ga().then((function(){if(null===t.c){var e=t.u;if(!t.i){var n=ae(e);e=function(t,e,n){var r=arguments,i=document,o=String(r[0]),a=r[1];if(!oe&&a&&(a.name||a.type)){if(o=["<",o],a.name&&o.push(' name="',zt(a.name),'"'),a.type){o.push(' type="',zt(a.type),'"');var s={};gt(s,a),delete s.type,a=s}o.push(">"),o=o.join("")}return o=fe(i,o),a&&("string"===typeof a?o.className=a:Array.isArray(a)?o.className=a.join(" "):se(o,a)),2<r.length&&he(i,o,r),o}("DIV"),n.appendChild(e)}t.c=t.g.render(e,t.a)}return t.c})))},e.verify=function(){Ph(this);var t=this;return Oh(this,this.render().then((function(e){return new _e((function(n){var r=t.g.getResponse(e);if(r)n(r);else{t.l.push((function e(r){r&&(function(t,e){X(t.l,(function(t){return t==e}))}(t,e),n(r))})),t.i&&t.g.execute(t.c)}}))})))},e.reset=function(){Ph(this),null!==this.c&&this.g.reset(this.c)},e.clear=function(){Ph(this),this.D=!0,this.m.c();for(var t=0;t<this.h.length;t++)this.h[t].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.i){t=ae(this.u);for(var e;e=t.firstChild;)t.removeChild(e)}},I(Rh,Ih);var Lh="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function Mh(t,e){return{name:t||"",J:"a valid string",optional:!!e,K:function(t){return"string"===typeof t}}}function jh(t,e){return{name:t||"",J:"a boolean",optional:!!e,K:function(t){return"boolean"===typeof t}}}function Fh(t,e){return{name:t||"",J:"a valid object",optional:!!e,K:y}}function Uh(t,e){return{name:t||"",J:"a function",optional:!!e,K:function(t){return"function"===typeof t}}}function Vh(t,e){return{name:t||"",J:"null",optional:!!e,K:function(t){return null===t}}}function qh(t){return{name:t?t+"Credential":"credential",J:t?"a valid "+t+" credential":"a valid credential",optional:!1,K:function(e){if(!e)return!1;var n=!t||e.providerId===t;return!(!e.ia||!n)}}}function Bh(t,e){return y(t)&&"string"===typeof t.type&&t.type===e&&"function"===typeof t.Fa}function zh(t){return y(t)&&"string"===typeof t.uid}function Wh(t,e,n,r){return{name:n||"",J:t.J+" or "+e.J,optional:!!r,K:function(n){return t.K(n)||e.K(n)}}}function Hh(t,e){for(var n in e){var r=e[n].name;t[r]=Qh(r,t[n],e[n].j)}}function Kh(t,e){for(var n in e){var r=e[n].name;r!==n&&Object.defineProperty(t,r,{get:T((function(t){return this[t]}),n),set:T((function(t,e,n,r){Dh(t,[n],[r],!0),this[e]=r}),r,n,e[n].gb),enumerable:!0})}}function Gh(t,e,n,r){t[e]=Qh(e,n,r)}function Qh(t,e,n){function r(){var t=Array.prototype.slice.call(arguments);return Dh(o,n,t),e.apply(this,t)}if(!n)return e;var i,o=function(t){return(t=t.split("."))[t.length-1]}(t);for(i in e)r[i]=e[i];for(i in e.prototype)r.prototype[i]=e.prototype[i];return r}Hh(Jl.prototype,{fb:{name:"applyActionCode",j:[Mh("code")]},Pa:{name:"checkActionCode",j:[Mh("code")]},jb:{name:"confirmPasswordReset",j:[Mh("code"),Mh("newPassword")]},cc:{name:"createUserWithEmailAndPassword",j:[Mh("email"),Mh("password")]}
2,fc:{name:"fetchSignInMethodsForEmail",j:[Mh("email")]},pa:{name:"getRedirectResult",j:[]},zc:{name:"isSignInWithEmailLink",j:[Mh("emailLink")]},Fc:{name:"onAuthStateChanged",j:[Wh(Fh(),Uh(),"nextOrObserver"),Uh("opt_error",!0),Uh("opt_completed",!0)]},Gc:{name:"onIdTokenChanged",j:[Wh(Fh(),Uh(),"nextOrObserver"),Uh("opt_error",!0),Uh("opt_completed",!0)]},rb:{name:"sendPasswordResetEmail",j:[Mh("email"),Wh(Fh("opt_actionCodeSettings",!0),Vh(null,!0),"opt_actionCodeSettings",!0)]},sb:{name:"sendSignInLinkToEmail",j:[Mh("email"),Fh("actionCodeSettings")]},tb:{name:"setPersistence",j:[Mh("persistence")]},Qc:{name:"signInAndRetrieveDataWithCredential",j:[qh()]},vb:{name:"signInAnonymously",j:[]},Ya:{name:"signInWithCredential",j:[qh()]},Rc:{name:"signInWithCustomToken",j:[Mh("token")]},Sc:{name:"signInWithEmailAndPassword",j:[Mh("email"),Mh("password")]},Tc:{name:"signInWithEmailLink",j:[Mh("email"),Mh("emailLink",!0)]},Uc:{name:"signInWithPhoneNumber",j:[Mh("phoneNumber"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(t){return!(!t||"string"!==typeof t.type||"function"!==typeof t.verify)}}]},Vc:{name:"signInWithPopup",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Wc:{name:"signInWithRedirect",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},bd:{name:"updateCurrentUser",j:[Wh({name:"user",J:"an instance of Firebase User",optional:!1,K:function(t){return!!(t&&t instanceof pl)}},Vh(),"user")]},wb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[Mh(null,!0)]},dd:{name:"useDeviceLanguage",j:[]},fd:{name:"verifyPasswordResetCode",j:[Mh("code")]}}),Kh(Jl.prototype,{lc:{name:"languageCode",gb:Wh(Mh(),Vh(),"languageCode")},ti:{name:"tenantId",gb:Wh(Mh(),Vh(),"tenantId")}}),Jl.Persistence=Qu,Jl.Persistence.LOCAL="local",Jl.Persistence.SESSION="session",Jl.Persistence.NONE="none",Hh(pl.prototype,{delete:{name:"delete",j:[]},mc:{name:"getIdTokenResult",j:[jh("opt_forceRefresh",!0)]},I:{name:"getIdToken",j:[jh("opt_forceRefresh",!0)]},Ac:{name:"linkAndRetrieveDataWithCredential",j:[qh()]},mb:{name:"linkWithCredential",j:[qh()]},Bc:{name:"linkWithPhoneNumber",j:[Mh("phoneNumber"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(t){return!(!t||"string"!==typeof t.type||"function"!==typeof t.verify)}}]},Cc:{name:"linkWithPopup",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Dc:{name:"linkWithRedirect",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Jc:{name:"reauthenticateAndRetrieveDataWithCredential",j:[qh()]},pb:{name:"reauthenticateWithCredential",j:[qh()]},Kc:{name:"reauthenticateWithPhoneNumber",j:[Mh("phoneNumber"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(t){return!(!t||"string"!==typeof t.type||"function"!==typeof t.verify)}}]},Lc:{name:"reauthenticateWithPopup",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Mc:{name:"reauthenticateWithRedirect",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},reload:{name:"reload",j:[]},qb:{name:"sendEmailVerification",j:[Wh(Fh("opt_actionCodeSettings",!0),Vh(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[Mh(null,!0)]},ad:{name:"unlink",j:[Mh("provider")]},xb:{name:"updateEmail",j:[Mh("email")]},yb:{name:"updatePassword",j:[Mh("password")]},cd:{name:"updatePhoneNumber",j:[qh("phone")]},zb:{name:"updateProfile",j:[Fh("profile")]},Ab:{name:"verifyBeforeUpdateEmail",j:[Mh("email"),Wh(Fh("opt_actionCodeSettings",!0),Vh(null,!0),"opt_actionCodeSettings",!0)]}}),Hh(fh.prototype,{execute:{name:"execute"},render:{name:"render"}
2,reset:{name:"reset"},getResponse:{name:"getResponse"}}),Hh(hh.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),Hh(_e.prototype,{ma:{name:"finally"},o:{name:"catch"},then:{name:"then"}}),Kh(Hc.prototype,{appVerificationDisabled:{name:"appVerificationDisabledForTesting",gb:jh("appVerificationDisabledForTesting")}}),Hh(Kc.prototype,{confirm:{name:"confirm",j:[Mh("verificationCode")]}}),Gh(ao,"fromJSON",(function(t){t="string"===typeof t?JSON.parse(t):t;for(var e,n=[po,ko,Po,lo],r=0;r<n.length;r++)if(e=n[r](t))return e;return null}),[Wh(Mh(),Fh(),"json")]),Gh(xo,"credential",(function(t,e){return new Co(t,e)}),[Mh("email"),Mh("password")]),Hh(Co.prototype,{v:{name:"toJSON",j:[Mh(null,!0)]}}),Hh(mo.prototype,{Aa:{name:"addScope",j:[Mh("scope")]},Ia:{name:"setCustomParameters",j:[Fh("customOAuthParameters")]}}),Gh(mo,"credential",bo,[Wh(Mh(),Fh(),"token")]),Gh(xo,"credentialWithLink",No,[Mh("email"),Mh("emailLink")]),Hh(_o.prototype,{Aa:{name:"addScope",j:[Mh("scope")]},Ia:{name:"setCustomParameters",j:[Fh("customOAuthParameters")]}}),Gh(_o,"credential",wo,[Wh(Mh(),Fh(),"token")]),Hh(Eo.prototype,{Aa:{name:"addScope",j:[Mh("scope")]},Ia:{name:"setCustomParameters",j:[Fh("customOAuthParameters")]}}),Gh(Eo,"credential",To,[Wh(Mh(),Wh(Fh(),Vh()),"idToken"),Wh(Mh(),Vh(),"accessToken",!0)]),Hh(So.prototype,{Ia:{name:"setCustomParameters",j:[Fh("customOAuthParameters")]}}),Gh(So,"credential",Io,[Wh(Mh(),Fh(),"token"),Mh("secret",!0)]),Hh(go.prototype,{Aa:{name:"addScope",j:[Mh("scope")]},credential:{name:"credential",j:[Wh(Mh(),Wh(Fh(),Vh()),"optionsOrIdToken"),Wh(Mh(),Vh(),"accessToken",!0)]},Ia:{name:"setCustomParameters",j:[Fh("customOAuthParameters")]}}),Hh(ho.prototype,{v:{name:"toJSON",j:[Mh(null,!0)]}}),Hh(uo.prototype,{v:{name:"toJSON",j:[Mh(null,!0)]}}),Gh(Do,"credential",Lo,[Mh("verificationId"),Mh("verificationCode")]),Hh(Do.prototype,{cb:{name:"verifyPhoneNumber",j:[Wh(Mh(),{name:"phoneInfoOptions",J:"valid phone info options",optional:!1,K:function(t){return!!t&&(t.session&&t.phoneNumber?Bh(t.session,io)&&"string"===typeof t.phoneNumber:t.session&&t.multiFactorHint?Bh(t.session,oo)&&zh(t.multiFactorHint):t.session&&t.multiFactorUid?Bh(t.session,oo)&&"string"===typeof t.multiFactorUid:!!t.phoneNumber&&"string"===typeof t.phoneNumber)}},"phoneInfoOptions"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(t){return!(!t||"string"!==typeof t.type||"function"!==typeof t.verify)}}]}}),Hh(Oo.prototype,{v:{name:"toJSON",j:[Mh(null,!0)]}}),Hh(C.prototype,{toJSON:{name:"toJSON",j:[Mh(null,!0)]}}),Hh(Wo.prototype,{toJSON:{name:"toJSON",j:[Mh(null,!0)]}}),Hh(zo.prototype,{toJSON:{name:"toJSON",j:[Mh(null,!0)]}}),Hh(Jc.prototype,{toJSON:{name:"toJSON",j:[Mh(null,!0)]}}),Hh($c.prototype,{Pc:{name:"resolveSignIn",j:[{name:"multiFactorAssertion",J:"a valid multiFactorAssertion",optional:!1,K:function(t){return!!t&&!!t.ob}}]}}),Hh(il.prototype,{Ob:{name:"getSession",j:[]},dc:{name:"enroll",j:[{name:"multiFactorAssertion",J:"a valid multiFactorAssertion",optional:!1,K:function(t){return!!t&&!!t.ob}},Mh("displayName",!0)]},$c:{name:"unenroll",j:[Wh({name:"multiFactorInfo",J:"a valid multiFactorInfo",optional:!1,K:zh},Mh(),"multiFactorInfoIdentifier")]}}),Hh(Rh.prototype,{clear:{name:"clear",j:[]},render:{name:"render",j:[]},verify:{name:"verify",j:[]}}),Gh(mi,"parseLink",Ci,[Mh("link")]),Gh(mh,"assertion",(function(t){return new nl(t)}),[qh("phone")]),function(){if("undefined"===typeof r||!r.INTERNAL||!r.INTERNAL.registerComponent)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var t={ActionCodeInfo:{Operation:{EMAIL_SIGNIN:ai,PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:oi,VERIFY_AND_CHANGE_EMAIL:si,VERIFY_EMAIL:"VERIFY_EMAIL"}},Auth:Jl,AuthCredential:ao,Error:C};Gh(t,"EmailAuthProvider",xo,[]),Gh(t,"FacebookAuthProvider",mo,[]),Gh(t,"GithubAuthProvider",_o,[]),Gh(t,"GoogleAuthProvider",Eo,[]),Gh(t,"TwitterAuthProvider",So,[]),Gh(t,"OAuthProvider",go,[Mh("providerId")]),Gh(t,"SAMLAuthProvider",yo,[Mh("providerId")]),Gh(t,"PhoneAuthProvider",Do,[{name:"auth",J:"an instance of Firebase Auth",optional:!0,K:function(t){return!!(t&&t instanceof Jl)}}]),Gh(t,"RecaptchaVerifier",Rh,[Wh(Mh(),{name:"",J:"an HTML element",optional:!1,K:function(t){return!!(t&&t instanceof Element)}},"recaptchaContainer"),Fh("recaptchaParameters",!0),{name:"app",J:"an instance of Firebase App",optional:!0,K:function(t){return!!(t&&t instanceof r.app.App)}}]),Gh(t,"ActionCodeURL",mi,[]),Gh(t,"PhoneMultiFactorGenerator",mh,[]),r.INTERNAL.registerComponent({name:"auth",instanceFactory:function(t){return new Jl(t=t.getProvider("app").getImmediate())},multipleInstances:!1,serviceProps:t,instantiationMode:"LAZY",type:"PUBLIC"}),r.INTERNAL.registerComponent({name:"auth-internal",instanceFactory:function(t){return{getUid:E((t=t.getProvider("auth").getImmediate()).getUid,t),getToken:E(t.kc,t),addAuthTokenListener:E(t.bc,t),removeAuthTokenListener:E(t.Nc,t)}},multipleInstances:!1,instantiationMode:"LAZY",type:"PRIVATE"}),r.registerVersion("@firebase/auth","0.14.9"),r.INTERNAL.extendNamespace({User:pl})}()}).apply("undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})}).call(this,n(19))},function(t,e,n){"use strict";
2(function(r){Object.defineProperty(e,"__esModule",{value:!0});var i,o=(i=n(4))&&"object"===typeof i&&"default"in i?i.default:i,a=n(1),s=n(9),u=n(15),c=n(7),l=function(){function t(t){this.domStorage_=t,this.prefix_="firebase:"}return t.prototype.set=function(t,e){null==e?this.domStorage_.removeItem(this.prefixedName_(t)):this.domStorage_.setItem(this.prefixedName_(t),s.stringify(e))},t.prototype.get=function(t){var e=this.domStorage_.getItem(this.prefixedName_(t));return null==e?null:s.jsonEval(e)},t.prototype.remove=function(t){this.domStorage_.removeItem(this.prefixedName_(t))},t.prototype.prefixedName_=function(t){return this.prefix_+t},t.prototype.toString=function(){return this.domStorage_.toString()},t}(),h=function(){function t(){this.cache_={},this.isInMemoryStorage=!0}return t.prototype.set=function(t,e){null==e?delete this.cache_[t]:this.cache_[t]=e},t.prototype.get=function(t){return s.contains(this.cache_,t)?this.cache_[t]:null},t.prototype.remove=function(t){delete this.cache_[t]},t}(),f=function(t){try{if("undefined"!==typeof window&&"undefined"!==typeof window[t]){var e=window[t];return e.setItem("firebase:sentinel","cache"),e.removeItem("firebase:sentinel"),new l(e)}}catch(n){}return new h},p=f("localStorage"),d=f("sessionStorage"),v=new u.Logger("@firebase/database"),y=function(){var t=1;return function(){return t++}}(),g=function(t){var e=s.stringToByteArray(t),n=new s.Sha1;n.update(e);var r=n.digest();return s.base64.encodeByteArray(r)},m=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var r="",i=0;i<e.length;i++){var o=e[i];Array.isArray(o)||o&&"object"===typeof o&&"number"===typeof o.length?r+=t.apply(null,o):r+="object"===typeof o?s.stringify(o):o,r+=" "}return r},b=null,_=!0,w=function(t,e){s.assert(!e||!0===t||!1===t,"Can't turn on custom loggers persistently."),!0===t?(v.logLevel=u.LogLevel.VERBOSE,b=v.log.bind(v),e&&d.set("logging_enabled",!0)):"function"===typeof t?b=t:(b=null,d.remove("logging_enabled"))},E=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!0===_&&(_=!1,null===b&&!0===d.get("logging_enabled")&&w(!0)),b){var n=m.apply(null,t);b(n)}},T=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];E.apply(void 0,a.__spread([t],e))}},S=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE INTERNAL ERROR: "+m.apply(void 0,a.__spread(t));v.error(n)},I=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE FATAL ERROR: "+m.apply(void 0,a.__spread(t));throw v.error(n),new Error(n)},C=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE WARNING: "+m.apply(void 0,a.__spread(t));v.warn(n)},k=function(t){return"number"===typeof t&&(t!==t||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY)},x="[MIN_NAME]",N="[MAX_NAME]",A=function(t,e){if(t===e)return 0;if(t===x||e===N)return-1;if(e===x||t===N)return 1;var n=F(t),r=F(e);return null!==n?null!==r?n-r===0?t.length-e.length:n-r:-1:null!==r?1:t<e?-1:1},O=function(t,e){return t===e?0:t<e?-1:1},P=function(t,e){if(e&&t in e)return e[t];throw new Error("Missing required key ("+t+") in object: "+s.stringify(e))},R=function t(e){if("object"!==typeof e||null===e)return s.stringify(e);var n=[];for(var r in e)n.push(r);n.sort();for(var i="{",o=0;o<n.length;o++)0!==o&&(i+=","),i+=s.stringify(n[o]),i+=":",i+=t(e[n[o]]);return i+="}"},D=function(t,e){var n=t.length;if(n<=e)return[t];for(var r=[],i=0;i<n;i+=e)i+e>n?r.push(t.substring(i,n)):r.push(t.substring(i,i+e));return r};function L(t,e){for(var n in t)t.hasOwnProperty(n)&&e(n,t[n])}var M=function(t){s.assert(!k(t),"Invalid JSON number");var e,n,r,i,o;0===t?(n=0,r=0,e=1/t===-1/0?1:0):(e=t<0,(t=Math.abs(t))>=Math.pow(2,-1022)?(n=(i=Math.min(Math.floor(Math.log(t)/Math.LN2),1023))+1023,r=Math.round(t*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,r=Math.round(t/Math.pow(2,-1074))));var a=[];for(o=52;o;o-=1)a.push(r%2?1:0),r=Math.floor(r/2);for(o=11;o;o-=1)a.push(n%2?1:0),n=Math.floor(n/2);a.push(e?1:0),a.reverse();var u=a.join(""),c="";for(o=0;o<64;o+=8){var l=parseInt(u.substr(o,8),2).toString(16);1===l.length&&(l="0"+l),c+=l}return c.toLowerCase()},j=new RegExp("^-?(0*)\\d{1,10}$"),F=function(t){if(j.test(t)){var e=Number(t);if(e>=-2147483648&&e<=2147483647)return e}return null},U=function(t){try{t()}catch(e){setTimeout((function(){var t=e.stack||"";throw C("Exception was thrown by user callback.",t),e}),Math.floor(0))}},V=function(t,e){var n=setTimeout(t,e);return"object"===typeof n&&n.unref&&n.unref(),n},q=function(){function t(t,e){if(void 0===e){this.pieces_=t.split("/");for(var n=0,r=0;r<this.pieces_.length;r++)this.pieces_[r].length>0&&(this.pieces_[n]=this.pieces_[r],n++);this.pieces_.length=n,this.pieceNum_=0}else this.pieces_=t,this.pieceNum_=e}return Object.defineProperty(t,"Empty",{get:function(){return new t("")}
2,enumerable:!1,configurable:!0}),t.prototype.getFront=function(){return this.pieceNum_>=this.pieces_.length?null:this.pieces_[this.pieceNum_]},t.prototype.getLength=function(){return this.pieces_.length-this.pieceNum_},t.prototype.popFront=function(){var e=this.pieceNum_;return e<this.pieces_.length&&e++,new t(this.pieces_,e)},t.prototype.getBack=function(){return this.pieceNum_<this.pieces_.length?this.pieces_[this.pieces_.length-1]:null},t.prototype.toString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+this.pieces_[e]);return t||"/"},t.prototype.toUrlEncodedString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+encodeURIComponent(String(this.pieces_[e])));return t||"/"},t.prototype.slice=function(t){return void 0===t&&(t=0),this.pieces_.slice(this.pieceNum_+t)},t.prototype.parent=function(){if(this.pieceNum_>=this.pieces_.length)return null;for(var e=[],n=this.pieceNum_;n<this.pieces_.length-1;n++)e.push(this.pieces_[n]);return new t(e,0)},t.prototype.child=function(e){for(var n=[],r=this.pieceNum_;r<this.pieces_.length;r++)n.push(this.pieces_[r]);if(e instanceof t)for(r=e.pieceNum_;r<e.pieces_.length;r++)n.push(e.pieces_[r]);else{var i=e.split("/");for(r=0;r<i.length;r++)i[r].length>0&&n.push(i[r])}return new t(n,0)},t.prototype.isEmpty=function(){return this.pieceNum_>=this.pieces_.length},t.relativePath=function(e,n){var r=e.getFront(),i=n.getFront();if(null===r)return n;if(r===i)return t.relativePath(e.popFront(),n.popFront());throw new Error("INTERNAL ERROR: innerPath ("+n+") is not within outerPath ("+e+")")},t.comparePaths=function(t,e){for(var n=t.slice(),r=e.slice(),i=0;i<n.length&&i<r.length;i++){var o=A(n[i],r[i]);if(0!==o)return o}return n.length===r.length?0:n.length<r.length?-1:1},t.prototype.equals=function(t){if(this.getLength()!==t.getLength())return!1;for(var e=this.pieceNum_,n=t.pieceNum_;e<=this.pieces_.length;e++,n++)if(this.pieces_[e]!==t.pieces_[n])return!1;return!0},t.prototype.contains=function(t){var e=this.pieceNum_,n=t.pieceNum_;if(this.getLength()>t.getLength())return!1;for(;e<this.pieces_.length;){if(this.pieces_[e]!==t.pieces_[n])return!1;++e,++n}return!0},t}(),B=function(){function t(t,e){this.errorPrefix_=e,this.parts_=t.slice(),this.byteLength_=Math.max(1,this.parts_.length);for(var n=0;n<this.parts_.length;n++)this.byteLength_+=s.stringLength(this.parts_[n]);this.checkValid_()}return Object.defineProperty(t,"MAX_PATH_DEPTH",{get:function(){return 32},enumerable:!1,configurable:!0}),Object.defineProperty(t,"MAX_PATH_LENGTH_BYTES",{get:function(){return 768},enumerable:!1,configurable:!0}),t.prototype.push=function(t){this.parts_.length>0&&(this.byteLength_+=1),this.parts_.push(t),this.byteLength_+=s.stringLength(t),this.checkValid_()},t.prototype.pop=function(){var t=this.parts_.pop();this.byteLength_-=s.stringLength(t),this.parts_.length>0&&(this.byteLength_-=1)},t.prototype.checkValid_=function(){if(this.byteLength_>t.MAX_PATH_LENGTH_BYTES)throw new Error(this.errorPrefix_+"has a key path longer than "+t.MAX_PATH_LENGTH_BYTES+" bytes ("+this.byteLength_+").");if(this.parts_.length>t.MAX_PATH_DEPTH)throw new Error(this.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+t.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString())},t.prototype.toErrorString=function(){return 0===this.parts_.length?"":"in property '"+this.parts_.join(".")+"'"},t}(),z=function(){function t(t,e,n,r,i,o){void 0===i&&(i=""),void 0===o&&(o=!1),this.secure=e,this.namespace=n,this.webSocketOnly=r,this.persistenceKey=i,this.includeNamespaceInQueryParams=o,this.host=t.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.internalHost=p.get("host:"+t)||this.host}return t.prototype.needsQueryParam=function(){return this.host!==this.internalHost||this.isCustomHost()||this.includeNamespaceInQueryParams},t.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},t.prototype.isDemoHost=function(){return"firebaseio-demo.com"===this.domain},t.prototype.isCustomHost=function(){return"firebaseio.com"!==this.domain&&"firebaseio-demo.com"!==this.domain},t.prototype.updateHost=function(t){t!==this.internalHost&&(this.internalHost=t,this.isCacheableHost()&&p.set("host:"+this.host,this.internalHost))},t.prototype.connectionURL=function(t,e){var n;if(s.assert("string"===typeof t,"typeof type must == string"),s.assert("object"===typeof e,"typeof params must == object"),"websocket"===t)n=(this.secure?"wss://":"ws://")+this.internalHost+"/.ws?";else{if("long_polling"!==t)throw new Error("Unknown connection type: "+t);n=(this.secure?"https://":"http://")+this.internalHost+"/.lp?"}this.needsQueryParam()&&(e.ns=this.namespace);var r=[];return L(e,(function(t,e){r.push(t+"="+e)}
2)),n+r.join("&")},t.prototype.toString=function(){var t=this.toURLString();return this.persistenceKey&&(t+="<"+this.persistenceKey+">"),t},t.prototype.toURLString=function(){return(this.secure?"https://":"http://")+this.host},t}();var W,H,K=function(t){var e=G(t),n=e.namespace;"firebase.com"===e.domain&&I(e.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),n&&"undefined"!==n||"localhost"===e.domain||I("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),e.secure||"undefined"!==typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&C("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().");var r="ws"===e.scheme||"wss"===e.scheme;return{repoInfo:new z(e.host,e.secure,n,r,"",n!==e.subdomain),path:new q(e.pathString)}},G=function(t){var e="",n="",r="",i="",o="",s=!0,u="https",c=443;if("string"===typeof t){var l=t.indexOf("//");l>=0&&(u=t.substring(0,l-1),t=t.substring(l+2));var h=t.indexOf("/");-1===h&&(h=t.length);var f=t.indexOf("?");-1===f&&(f=t.length),e=t.substring(0,Math.min(h,f)),h<f&&(i=function(t){for(var e="",n=t.split("/"),r=0;r<n.length;r++)if(n[r].length>0){var i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch(o){}e+="/"+i}return e}(t.substring(h,f)));var p=function(t){var e,n,r={};"?"===t.charAt(0)&&(t=t.substring(1));try{for(var i=a.__values(t.split("&")),o=i.next();!o.done;o=i.next()){var s=o.value;if(0!==s.length){var u=s.split("=");2===u.length?r[decodeURIComponent(u[0])]=decodeURIComponent(u[1]):C("Invalid query segment '"+s+"' in query '"+t+"'")}}}catch(c){e={error:c}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}(t.substring(Math.min(t.length,f)));(l=e.indexOf(":"))>=0?(s="https"===u||"wss"===u,c=parseInt(e.substring(l+1),10)):l=e.length;var d=e.slice(0,l);if("localhost"===d.toLowerCase())n="localhost";else if(d.split(".").length<=2)n=d;else{var v=e.indexOf(".");r=e.substring(0,v).toLowerCase(),n=e.substring(v+1),o=r}"ns"in p&&(o=p.ns)}return{host:e,port:c,domain:n,subdomain:r,secure:s,scheme:u,pathString:i,namespace:o}},Q=/[\[\].#$\/\u0000-\u001F\u007F]/,$=/[\[\].#$\u0000-\u001F\u007F]/,X=function(t){return"string"===typeof t&&0!==t.length&&!Q.test(t)},Y=function(t){return"string"===typeof t&&0!==t.length&&!$.test(t)},J=function(t){return null===t||"string"===typeof t||"number"===typeof t&&!k(t)||t&&"object"===typeof t&&s.contains(t,".sv")},Z=function(t,e,n,r,i){i&&void 0===n||tt(s.errorPrefix(t,e,i),n,r)},tt=function t(e,n,r){var i=r instanceof q?new B(r,e):r;if(void 0===n)throw new Error(e+"contains undefined "+i.toErrorString());if("function"===typeof n)throw new Error(e+"contains a function "+i.toErrorString()+" with contents = "+n.toString());if(k(n))throw new Error(e+"contains "+n.toString()+" "+i.toErrorString());if("string"===typeof n&&n.length>10485760/3&&s.stringLength(n)>10485760)throw new Error(e+"contains a string greater than 10485760 utf8 bytes "+i.toErrorString()+" ('"+n.substring(0,50)+"...')");if(n&&"object"===typeof n){var o=!1,a=!1;if(L(n,(function(n,r){if(".value"===n)o=!0;else if(".priority"!==n&&".sv"!==n&&(a=!0,!X(n)))throw new Error(e+" contains an invalid key ("+n+") "+i.toErrorString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');i.push(n),t(e,r,i),i.pop()})),o&&a)throw new Error(e+' contains ".value" child '+i.toErrorString()+" in addition to actual children.")}},et=function(t,e,n,r,i){if(!i||void 0!==n){var o=s.errorPrefix(t,e,i);if(!n||"object"!==typeof n||Array.isArray(n))throw new Error(o+" must be an object containing the children to replace.");var a=[];L(n,(function(t,e){var n=new q(t);if(tt(o,e,r.child(n)),".priority"===n.getBack()&&!J(e))throw new Error(o+"contains an invalid value for '"+n.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");a.push(n)})),function(t,e){var n,r;for(n=0;n<e.length;n++)for(var i=(r=e[n]).slice(),o=0;o<i.length;o++)if(".priority"===i[o]&&o===i.length-1);
2else if(!X(i[o]))throw new Error(t+"contains an invalid key ("+i[o]+") in path "+r.toString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');e.sort(q.comparePaths);var a=null;for(n=0;n<e.length;n++){if(r=e[n],null!==a&&a.contains(r))throw new Error(t+"contains a path "+a.toString()+" that is ancestor of another path "+r.toString());a=r}}(o,a)}},nt=function(t,e,n,r){if(!r||void 0!==n){if(k(n))throw new Error(s.errorPrefix(t,e,r)+"is "+n.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!J(n))throw new Error(s.errorPrefix(t,e,r)+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},rt=function(t,e,n,r){if(!r||void 0!==n)switch(n){case"value":case"child_added":case"child_removed":case"child_changed":case"child_moved":break;default:throw new Error(s.errorPrefix(t,e,r)+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}},it=function(t,e,n,r){if((!r||void 0!==n)&&!X(n))throw new Error(s.errorPrefix(t,e,r)+'was an invalid key = "'+n+'". Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").')},ot=function(t,e,n,r){if((!r||void 0!==n)&&!Y(n))throw new Error(s.errorPrefix(t,e,r)+'was an invalid path = "'+n+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},at=function(t,e,n,r){n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),ot(t,e,n,r)},st=function(t,e){if(".info"===e.getFront())throw new Error(t+" failed = Can't modify data under /.info/")},ut=function(t,e,n){var r=n.path.toString();if("string"!==typeof n.repoInfo.host||0===n.repoInfo.host.length||!X(n.repoInfo.namespace)&&"localhost"!==n.repoInfo.host.split(":")[0]||0!==r.length&&!function(t){return t&&(t=t.replace(/^\/*\.info(\/|$)/,"/")),Y(t)}(r))throw new Error(s.errorPrefix(t,e,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')},ct=function(t,e,n,r){if((!r||void 0!==n)&&"boolean"!==typeof n)throw new Error(s.errorPrefix(t,e,r)+"must be a boolean.")},lt=function(){function t(t,e){this.repo_=t,this.path_=e}return t.prototype.cancel=function(t){s.validateArgCount("OnDisconnect.cancel",0,1,arguments.length),s.validateCallback("OnDisconnect.cancel",1,t,!0);var e=new s.Deferred;return this.repo_.onDisconnectCancel(this.path_,e.wrapCallback(t)),e.promise},t.prototype.remove=function(t){s.validateArgCount("OnDisconnect.remove",0,1,arguments.length),st("OnDisconnect.remove",this.path_),s.validateCallback("OnDisconnect.remove",1,t,!0);var e=new s.Deferred;return this.repo_.onDisconnectSet(this.path_,null,e.wrapCallback(t)),e.promise},t.prototype.set=function(t,e){s.validateArgCount("OnDisconnect.set",1,2,arguments.length),st("OnDisconnect.set",this.path_),Z("OnDisconnect.set",1,t,this.path_,!1),s.validateCallback("OnDisconnect.set",2,e,!0);var n=new s.Deferred;return this.repo_.onDisconnectSet(this.path_,t,n.wrapCallback(e)),n.promise},t.prototype.setWithPriority=function(t,e,n){s.validateArgCount("OnDisconnect.setWithPriority",2,3,arguments.length),st("OnDisconnect.setWithPriority",this.path_),Z("OnDisconnect.setWithPriority",1,t,this.path_,!1),nt("OnDisconnect.setWithPriority",2,e,!1),s.validateCallback("OnDisconnect.setWithPriority",3,n,!0);var r=new s.Deferred;return this.repo_.onDisconnectSetWithPriority(this.path_,t,e,r.wrapCallback(n)),r.promise},t.prototype.update=function(t,e){if(s.validateArgCount("OnDisconnect.update",1,2,arguments.length),st("OnDisconnect.update",this.path_),Array.isArray(t)){for(var n={},r=0;r<t.length;++r)n[""+r]=t[r];t=n,C("Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}et("OnDisconnect.update",1,t,this.path_,!1),s.validateCallback("OnDisconnect.update",2,e,!0);var i=new s.Deferred;return this.repo_.onDisconnectUpdate(this.path_,t,i.wrapCallback(e)),i.promise},t}(),ht=function(){function t(t,e){this.committed=t,this.snapshot=e}return t.prototype.toJSON=function(){return s.validateArgCount("TransactionResult.toJSON",0,1,arguments.length),{committed:this.committed,snapshot:this.snapshot.toJSON()}},t}(),ft=function(){var t="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",e=0,n=[];return function(r){var i,o=r===e;e=r;var a=new Array(8);for(i=7;i>=0;i--)a[i]=t.charAt(r%64),r=Math.floor(r/64);s.assert(0===r,"Cannot push at time == 0");var u=a.join("");if(o){for(i=11;i>=0&&63===n[i];i--)n[i]=0;n[i]++}else for(i=0;i<12;i++)n[i]=Math.floor(64*Math.random());for(i=0;i<12;i++)u+=t.charAt(n[i]);return s.assert(20===u.length,"nextPushId: Length should be 20."),u}}(),pt=function(){function t(t,e){this.name=t,this.node=e}return t.Wrap=function(e,n){return new t(e,n)},t}(),dt=function(){function t(){}return t.prototype.getCompare=function(){return this.compare.bind(this)},t.prototype.indexedValueChanged=function(t,e){var n=new pt(x,t),r=new pt(x,e);return 0!==this.compare(n,r)},t.prototype.minPost=function(){return pt.MIN},t}(),vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a.__extends(e,t),Object.defineProperty(e,"__EMPTY_NODE",{get:function(){return W},set:function(t){W=t}
2,enumerable:!1,configurable:!0}),e.prototype.compare=function(t,e){return A(t.name,e.name)},e.prototype.isDefinedOn=function(t){throw s.assertionError("KeyIndex.isDefinedOn not expected to be called.")},e.prototype.indexedValueChanged=function(t,e){return!1},e.prototype.minPost=function(){return pt.MIN},e.prototype.maxPost=function(){return new pt(N,W)},e.prototype.makePost=function(t,e){return s.assert("string"===typeof t,"KeyIndex indexValue must always be a string."),new pt(t,W)},e.prototype.toString=function(){return".key"},e}(dt),yt=new vt;var gt,mt,bt,_t=function(t){return"number"===typeof t?"number:"+M(t):"string:"+t},wt=function(t){if(t.isLeafNode()){var e=t.val();s.assert("string"===typeof e||"number"===typeof e||"object"===typeof e&&s.contains(e,".sv"),"Priority must be a string or number.")}else s.assert(t===H||t.isEmpty(),"priority of unexpected type.");s.assert(t===H||t.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")},Et=function(){function t(e,n){void 0===n&&(n=t.__childrenNodeConstructor.EMPTY_NODE),this.value_=e,this.priorityNode_=n,this.lazyHash_=null,s.assert(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),wt(this.priorityNode_)}return Object.defineProperty(t,"__childrenNodeConstructor",{get:function(){return gt},set:function(t){gt=t},enumerable:!1,configurable:!0}),t.prototype.isLeafNode=function(){return!0},t.prototype.getPriority=function(){return this.priorityNode_},t.prototype.updatePriority=function(e){return new t(this.value_,e)},t.prototype.getImmediateChild=function(e){return".priority"===e?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.getChild=function(e){return e.isEmpty()?this:".priority"===e.getFront()?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.hasChild=function(){return!1},t.prototype.getPredecessorChildName=function(t,e){return null},t.prototype.updateImmediateChild=function(e,n){return".priority"===e?this.updatePriority(n):n.isEmpty()&&".priority"!==e?this:t.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,n).updatePriority(this.priorityNode_)},t.prototype.updateChild=function(e,n){var r=e.getFront();return null===r?n:n.isEmpty()&&".priority"!==r?this:(s.assert(".priority"!==r||1===e.getLength(),".priority must be the last token in a path"),this.updateImmediateChild(r,t.__childrenNodeConstructor.EMPTY_NODE.updateChild(e.popFront(),n)))},t.prototype.isEmpty=function(){return!1},t.prototype.numChildren=function(){return 0},t.prototype.forEachChild=function(t,e){return!1},t.prototype.val=function(t){return t&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.priorityNode_.isEmpty()||(t+="priority:"+_t(this.priorityNode_.val())+":");var e=typeof this.value_;t+=e+":",t+="number"===e?M(this.value_):this.value_,this.lazyHash_=g(t)}return this.lazyHash_},t.prototype.getValue=function(){return this.value_},t.prototype.compareTo=function(e){return e===t.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof t.__childrenNodeConstructor?-1:(s.assert(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))},t.prototype.compareToLeafNode_=function(e){var n=typeof e.value_,r=typeof this.value_,i=t.VALUE_TYPE_ORDER.indexOf(n),o=t.VALUE_TYPE_ORDER.indexOf(r);return s.assert(i>=0,"Unknown leaf type: "+n),s.assert(o>=0,"Unknown leaf type: "+r),i===o?"object"===r?0:this.value_<e.value_?-1:this.value_===e.value_?0:1:o-i},t.prototype.withIndex=function(){return this},t.prototype.isIndexed=function(){return!0},t.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode()){var e=t;return this.value_===e.value_&&this.priorityNode_.equals(e.priorityNode_)}return!1},t.VALUE_TYPE_ORDER=["object","boolean","number","string"],t}();var Tt,St,It=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a.__extends(e,t),e.prototype.compare=function(t,e){var n=t.node.getPriority(),r=e.node.getPriority(),i=n.compareTo(r);return 0===i?A(t.name,e.name):i},e.prototype.isDefinedOn=function(t){return!t.getPriority().isEmpty()},e.prototype.indexedValueChanged=function(t,e){return!t.getPriority().equals(e.getPriority())},e.prototype.minPost=function(){return pt.MIN},e.prototype.maxPost=function(){return new pt(N,new Et("[PRIORITY-POST]",bt))},e.prototype.makePost=function(t,e){var n=mt(t);return new pt(e,new Et("[PRIORITY-POST]",n))},e.prototype.toString=function(){return".priority"},e}(dt)),Ct=function(){function t(t,e,n,r,i){void 0===i&&(i=null),this.isReverse_=r,this.resultGenerator_=i,this.nodeStack_=[];for(var o=1;!t.isEmpty();)if(t=t,o=e?n(t.key,e):1,r&&(o*=-1),o<0)t=this.isReverse_?t.left:t.right;else{if(0===o){this.nodeStack_.push(t);break}this.nodeStack_.push(t),t=this.isReverse_?t.right:t.left}}return t.prototype.getNext=function(){if(0===this.nodeStack_.length)return null;var t,e=this.nodeStack_.pop();if(t=this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value},this.isReverse_)for(e=e.left;!e.isEmpty();)this.nodeStack_.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack_.push(e),e=e.left;return t},t.prototype.hasNext=function(){return this.nodeStack_.length>0},t.prototype.peek=function(){if(0===this.nodeStack_.length)return null;var t=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value}},t}(),kt=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:Nt.EMPTY_NODE,this.right=null!=o?o:Nt.EMPTY_NODE}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,
2null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.count=function(){return this.left.count()+1+this.right.count()},t.prototype.isEmpty=function(){return!1},t.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||!!t(this.key,this.value)||this.right.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},t.prototype.min_=function(){return this.left.isEmpty()?this:this.left.min_()},t.prototype.minKey=function(){return this.min_().key},t.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},t.prototype.insert=function(t,e,n){var r=this,i=n(t,r.key);return(r=i<0?r.copy(null,null,null,r.left.insert(t,e,n),null):0===i?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.insert(t,e,n))).fixUp_()},t.prototype.removeMin_=function(){if(this.left.isEmpty())return Nt.EMPTY_NODE;var t=this;return t.left.isRed_()||t.left.left.isRed_()||(t=t.moveRedLeft_()),(t=t.copy(null,null,null,t.left.removeMin_(),null)).fixUp_()},t.prototype.remove=function(t,e){var n,r;if(e(t,(n=this).key)<0)n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(t,e),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===e(t,n.key)){if(n.right.isEmpty())return Nt.EMPTY_NODE;r=n.right.min_(),n=n.copy(r.key,r.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(t,e))}return n.fixUp_()},t.prototype.isRed_=function(){return this.color},t.prototype.fixUp_=function(){var t=this;return t.right.isRed_()&&!t.left.isRed_()&&(t=t.rotateLeft_()),t.left.isRed_()&&t.left.left.isRed_()&&(t=t.rotateRight_()),t.left.isRed_()&&t.right.isRed_()&&(t=t.colorFlip_()),t},t.prototype.moveRedLeft_=function(){var t=this.colorFlip_();return t.right.left.isRed_()&&(t=(t=(t=t.copy(null,null,null,null,t.right.rotateRight_())).rotateLeft_()).colorFlip_()),t},t.prototype.moveRedRight_=function(){var t=this.colorFlip_();return t.left.left.isRed_()&&(t=(t=t.rotateRight_()).colorFlip_()),t},t.prototype.rotateLeft_=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.rotateRight_=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.colorFlip_=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.checkMaxDepth_=function(){var t=this.check_();return Math.pow(2,t)<=this.count()+1},t.prototype.check_=function(){if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");
2if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");var t=this.left.check_();if(t!==this.right.check_())throw new Error("Black depths differ");return t+(this.isRed_()?0:1)},t.RED=!0,t.BLACK=!1,t}(),xt=function(){function t(){}return t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.insert=function(t,e,n){return new kt(t,e,null)},t.prototype.remove=function(t,e){return this},t.prototype.count=function(){return 0},t.prototype.isEmpty=function(){return!0},t.prototype.inorderTraversal=function(t){return!1},t.prototype.reverseTraversal=function(t){return!1},t.prototype.minKey=function(){return null},t.prototype.maxKey=function(){return null},t.prototype.check_=function(){return 0},t.prototype.isRed_=function(){return!1},t}(),Nt=function(){function t(e,n){void 0===n&&(n=t.EMPTY_NODE),this.comparator_=e,this.root_=n}return t.prototype.insert=function(e,n){return new t(this.comparator_,this.root_.insert(e,n,this.comparator_).copy(null,null,kt.BLACK,null,null))},t.prototype.remove=function(e){return new t(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,kt.BLACK,null,null))},t.prototype.get=function(t){for(var e,n=this.root_;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key)))return n.value;e<0?n=n.left:e>0&&(n=n.right)}return null},t.prototype.getPredecessorKey=function(t){for(var e,n=this.root_,r=null;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}e<0?n=n.left:e>0&&(r=n,n=n.right)}throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")},t.prototype.isEmpty=function(){return this.root_.isEmpty()},t.prototype.count=function(){return this.root_.count()},t.prototype.minKey=function(){return this.root_.minKey()},t.prototype.maxKey=function(){return this.root_.maxKey()},t.prototype.inorderTraversal=function(t){return this.root_.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.root_.reverseTraversal(t)},t.prototype.getIterator=function(t){return new Ct(this.root_,null,this.comparator_,!1,t)},t.prototype.getIteratorFrom=function(t,e){return new Ct(this.root_,t,this.comparator_,!1,e)},t.prototype.getReverseIteratorFrom=function(t,e){return new Ct(this.root_,t,this.comparator_,!0,e)},t.prototype.getReverseIterator=function(t){return new Ct(this.root_,null,this.comparator_,!0,t)},t.EMPTY_NODE=new xt,t}(),At=Math.log(2),Ot=function(){function t(t){var e;this.count=(e=t+1,parseInt(Math.log(e)/At,10)),this.current_=this.count-1;var n,r=(n=this.count,parseInt(Array(n+1).join("1"),2));this.bits_=t+1&r}return t.prototype.nextBitIsOne=function(){var t=!(this.bits_&1<<this.current_);return this.current_--,t},t}(),Pt=function(t,e,n,r){t.sort(e);var i=function(e){for(var r=null,i=null,o=t.length,a=function(e,r){var i=o-e,a=o;o-=e;var u=function e(r,i){var o,a,s=i-r;if(0===s)return null;if(1===s)return o=t[r],a=n?n(o):o,new kt(a,o.node,kt.BLACK,null,null);var u=parseInt(s/2,10)+r,c=e(r,u),l=e(u+1,i);return o=t[u],a=n?n(o):o,new kt(a,o.node,kt.BLACK,c,l)}(i+1,a),c=t[i],l=n?n(c):c;s(new kt(l,c.node,r,null,u))},s=function(t){r?(r.left=t,r=t):(i=t,r=t)},u=0;u<e.count;++u){var c=e.nextBitIsOne(),l=Math.pow(2,e.count-(u+1));c?a(l,kt.BLACK):(a(l,kt.BLACK),a(l,kt.RED))}return i}(new Ot(t.length));return new Nt(r||e,i)},Rt={},Dt=function(){function t(t,e){this.indexes_=t,this.indexSet_=e}return Object.defineProperty(t,"Default",{get:function(){return s.assert(Rt&&It,"ChildrenNode.ts has not been loaded"),Tt=Tt||new t({".priority":Rt},{".priority":It})},enumerable:!1,configurable:!0}),t.prototype.get=function(t){var e=s.safeGet(this.indexes_,t);if(!e)throw new Error("No index defined for "+t);return e instanceof Nt?e:null},t.prototype.hasIndex=function(t){return s.contains(this.indexSet_,t.toString())},t.prototype.addIndex=function(e,n){s.assert(e!==yt,"KeyIndex always exists and isn't meant to be added to the IndexMap.");for(var r,i=[],o=!1,u=n.getIterator(pt.Wrap),c=u.getNext();c;)o=o||e.isDefinedOn(c.node),i.push(c),c=u.getNext();r=o?Pt(i,e.getCompare()):Rt;var l=e.toString(),h=a.__assign({},this.indexSet_);h[l]=e;var f=a.__assign({},this.indexes_);return f[l]=r,new t(f,h)},t.prototype.addToIndexes=function(e,n){var r=this;return new t(s.map(this.indexes_,(function(t,i){var o=s.safeGet(r.indexSet_,i);if(s.assert(o,"Missing index implementation for "+i),t===Rt){if(o.isDefinedOn(e.node)){for(var a=[],u=n.getIterator(pt.Wrap),c=u.getNext();c;)c.name!==e.name&&a.push(c),c=u.getNext();return a.push(e),Pt(a,o.getCompare())}return Rt}var l=n.get(e.name),h=t;return l&&(h=h.remove(new pt(e.name,l))),h.insert(e,e.node)})),this.indexSet_)}
2,t.prototype.removeFromIndexes=function(e,n){return new t(s.map(this.indexes_,(function(t){if(t===Rt)return t;var r=n.get(e.name);return r?t.remove(new pt(e.name,r)):t})),this.indexSet_)},t}();function Lt(t,e){return A(t.name,e.name)}function Mt(t,e){return A(t,e)}var jt=function(){function t(t,e,n){this.children_=t,this.priorityNode_=e,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&wt(this.priorityNode_),this.children_.isEmpty()&&s.assert(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(t,"EMPTY_NODE",{get:function(){return St||(St=new t(new Nt(Mt),null,Dt.Default))},enumerable:!1,configurable:!0}),t.prototype.isLeafNode=function(){return!1},t.prototype.getPriority=function(){return this.priorityNode_||St},t.prototype.updatePriority=function(e){return this.children_.isEmpty()?this:new t(this.children_,e,this.indexMap_)},t.prototype.getImmediateChild=function(t){if(".priority"===t)return this.getPriority();var e=this.children_.get(t);return null===e?St:e},t.prototype.getChild=function(t){var e=t.getFront();return null===e?this:this.getImmediateChild(e).getChild(t.popFront())},t.prototype.hasChild=function(t){return null!==this.children_.get(t)},t.prototype.updateImmediateChild=function(e,n){if(s.assert(n,"We should always be passing snapshot nodes"),".priority"===e)return this.updatePriority(n);var r=new pt(e,n),i=void 0,o=void 0;n.isEmpty()?(i=this.children_.remove(e),o=this.indexMap_.removeFromIndexes(r,this.children_)):(i=this.children_.insert(e,n),o=this.indexMap_.addToIndexes(r,this.children_));var a=i.isEmpty()?St:this.priorityNode_;return new t(i,a,o)},t.prototype.updateChild=function(t,e){var n=t.getFront();if(null===n)return e;s.assert(".priority"!==t.getFront()||1===t.getLength(),".priority must be the last token in a path");var r=this.getImmediateChild(n).updateChild(t.popFront(),e);return this.updateImmediateChild(n,r)},t.prototype.isEmpty=function(){return this.children_.isEmpty()},t.prototype.numChildren=function(){return this.children_.count()},t.prototype.val=function(e){if(this.isEmpty())return null;var n={},r=0,i=0,o=!0;if(this.forEachChild(It,(function(a,s){n[a]=s.val(e),r++,o&&t.INTEGER_REGEXP_.test(a)?i=Math.max(i,Number(a)):o=!1})),!e&&o&&i<2*r){var a=[];for(var s in n)a[s]=n[s];return a}return e&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.getPriority().isEmpty()||(t+="priority:"+_t(this.getPriority().val())+":"),this.forEachChild(It,(function(e,n){var r=n.hash();""!==r&&(t+=":"+e+":"+r)})),this.lazyHash_=""===t?"":g(t)}return this.lazyHash_},t.prototype.getPredecessorChildName=function(t,e,n){var r=this.resolveIndex_(n);if(r){var i=r.getPredecessorKey(new pt(t,e));return i?i.name:null}return this.children_.getPredecessorKey(t)},t.prototype.getFirstChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.minKey();return n&&n.name}return this.children_.minKey()},t.prototype.getFirstChild=function(t){var e=this.getFirstChildName(t);return e?new pt(e,this.children_.get(e)):null},t.prototype.getLastChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.maxKey();return n&&n.name}return this.children_.maxKey()},t.prototype.getLastChild=function(t){var e=this.getLastChildName(t);return e?new pt(e,this.children_.get(e)):null},t.prototype.forEachChild=function(t,e){var n=this.resolveIndex_(t);return n?n.inorderTraversal((function(t){return e(t.name,t.node)})):this.children_.inorderTraversal(e)},t.prototype.getIterator=function(t){return this.getIteratorFrom(t.minPost(),t)},t.prototype.getIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getIteratorFrom(t,(function(t){return t}));for(var r=this.children_.getIteratorFrom(t.name,pt.Wrap),i=r.peek();null!=i&&e.compare(i,t)<0;)r.getNext(),i=r.peek();return r},t.prototype.getReverseIterator=function(t){return this.getReverseIteratorFrom(t.maxPost(),t)},t.prototype.getReverseIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getReverseIteratorFrom(t,(function(t){return t}));for(var r=this.children_.getReverseIteratorFrom(t.name,pt.Wrap),i=r.peek();null!=i&&e.compare(i,t)>0;)r.getNext(),i=r.peek();return r},t.prototype.compareTo=function(t){return this.isEmpty()?t.isEmpty()?0:-1:t.isLeafNode()||t.isEmpty()?1:t===Ft?-1:0},t.prototype.withIndex=function(e){if(e===yt||this.indexMap_.hasIndex(e))return this;var n=this.indexMap_.addIndex(e,this.children_);return new t(this.children_,this.priorityNode_,n)},t.prototype.isIndexed=function(t){return t===yt||this.indexMap_.hasIndex(t)},t.prototype.equals=function(t){if(t===this)return!0;
2if(t.isLeafNode())return!1;var e=t;if(this.getPriority().equals(e.getPriority())){if(this.children_.count()===e.children_.count()){for(var n=this.getIterator(It),r=e.getIterator(It),i=n.getNext(),o=r.getNext();i&&o;){if(i.name!==o.name||!i.node.equals(o.node))return!1;i=n.getNext(),o=r.getNext()}return null===i&&null===o}return!1}return!1},t.prototype.resolveIndex_=function(t){return t===yt?null:this.indexMap_.get(t.toString())},t.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,t}(),Ft=new(function(t){function e(){return t.call(this,new Nt(Mt),jt.EMPTY_NODE,Dt.Default)||this}return a.__extends(e,t),e.prototype.compareTo=function(t){return t===this?0:1},e.prototype.equals=function(t){return t===this},e.prototype.getPriority=function(){return this},e.prototype.getImmediateChild=function(t){return jt.EMPTY_NODE},e.prototype.isEmpty=function(){return!1},e}(jt));Object.defineProperties(pt,{MIN:{value:new pt(x,jt.EMPTY_NODE)},MAX:{value:new pt(N,Ft)}}),vt.__EMPTY_NODE=jt.EMPTY_NODE,Et.__childrenNodeConstructor=jt,H=Ft,function(t){bt=t}(Ft);function Ut(t,e){if(void 0===e&&(e=null),null===t)return jt.EMPTY_NODE;if("object"===typeof t&&".priority"in t&&(e=t[".priority"]),s.assert(null===e||"string"===typeof e||"number"===typeof e||"object"===typeof e&&".sv"in e,"Invalid priority type found: "+typeof e),"object"===typeof t&&".value"in t&&null!==t[".value"]&&(t=t[".value"]),"object"!==typeof t||".sv"in t)return new Et(t,Ut(e));if(t instanceof Array){var n=jt.EMPTY_NODE;return L(t,(function(e,r){if(s.contains(t,e)&&"."!==e.substring(0,1)){var i=Ut(r);!i.isLeafNode()&&i.isEmpty()||(n=n.updateImmediateChild(e,i))}})),n.updatePriority(Ut(e))}var r=[],i=!1;if(L(t,(function(t,e){if("."!==t.substring(0,1)){var n=Ut(e);n.isEmpty()||(i=i||!n.getPriority().isEmpty(),r.push(new pt(t,n)))}})),0===r.length)return jt.EMPTY_NODE;var o=Pt(r,Lt,(function(t){return t.name}),Mt);if(i){var a=Pt(r,It.getCompare());return new jt(o,Ut(e),new Dt({".priority":a},{".priority":It}))}return new jt(o,Ut(e),Dt.Default)}!function(t){mt=t}(Ut);var Vt,qt=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a.__extends(e,t),e.prototype.compare=function(t,e){var n=t.node.compareTo(e.node);return 0===n?A(t.name,e.name):n},e.prototype.isDefinedOn=function(t){return!0},e.prototype.indexedValueChanged=function(t,e){return!t.equals(e)},e.prototype.minPost=function(){return pt.MIN},e.prototype.maxPost=function(){return pt.MAX},e.prototype.makePost=function(t,e){var n=Ut(t);return new pt(e,n)},e.prototype.toString=function(){return".value"},e}(dt)),Bt=function(t){function e(e){var n=t.call(this)||this;return n.indexPath_=e,s.assert(!e.isEmpty()&&".priority"!==e.getFront(),"Can't create PathIndex with empty path or .priority key"),n}return a.__extends(e,t),e.prototype.extractChild=function(t){return t.getChild(this.indexPath_)},e.prototype.isDefinedOn=function(t){return!t.getChild(this.indexPath_).isEmpty()},e.prototype.compare=function(t,e){var n=this.extractChild(t.node),r=this.extractChild(e.node),i=n.compareTo(r);return 0===i?A(t.name,e.name):i},e.prototype.makePost=function(t,e){var n=Ut(t),r=jt.EMPTY_NODE.updateChild(this.indexPath_,n);return new pt(e,r)},e.prototype.maxPost=function(){var t=jt.EMPTY_NODE.updateChild(this.indexPath_,Ft);return new pt(N,t)},e.prototype.toString=function(){return this.indexPath_.slice().join("/")},e}(dt),zt=function(){function t(t,e,n){this.node_=t,this.ref_=e,this.index_=n}return t.prototype.val=function(){return s.validateArgCount("DataSnapshot.val",0,0,arguments.length),this.node_.val()},t.prototype.exportVal=function(){return s.validateArgCount("DataSnapshot.exportVal",0,0,arguments.length),this.node_.val(!0)},t.prototype.toJSON=function(){return s.validateArgCount("DataSnapshot.toJSON",0,1,arguments.length),this.exportVal()},t.prototype.exists=function(){return s.validateArgCount("DataSnapshot.exists",0,0,arguments.length),!this.node_.isEmpty()},t.prototype.child=function(e){s.validateArgCount("DataSnapshot.child",0,1,arguments.length),e=String(e),ot("DataSnapshot.child",1,e,!1);var n=new q(e),r=this.ref_.child(n);return new t(this.node_.getChild(n),r,It)},t.prototype.hasChild=function(t){s.validateArgCount("DataSnapshot.hasChild",1,1,arguments.length),ot("DataSnapshot.hasChild",1,t,!1);var e=new q(t);return!this.node_.getChild(e).isEmpty()},t.prototype.getPriority=function(){return s.validateArgCount("DataSnapshot.getPriority",0,0,arguments.length),this.node_.getPriority().val()},t.prototype.forEach=function(e){var n=this;if(s.validateArgCount("DataSnapshot.forEach",1,1,arguments.length),s.validateCallback("DataSnapshot.forEach",1,e,!1),this.node_.isLeafNode())return!1;var r=this.node_;return!!r.forEachChild(this.index_,(function(r,i){return e(new t(i,n.ref_.child(r),It))}))},t.prototype.hasChildren=function(){return s.validateArgCount("DataSnapshot.hasChildren",0,0,arguments.length),!this.node_.isLeafNode()&&!this.node_.isEmpty()},Object.defineProperty(t.prototype,"key",{get:function(){return this.ref_.getKey()}
2,enumerable:!1,configurable:!0}),t.prototype.numChildren=function(){return s.validateArgCount("DataSnapshot.numChildren",0,0,arguments.length),this.node_.numChildren()},t.prototype.getRef=function(){return s.validateArgCount("DataSnapshot.ref",0,0,arguments.length),this.ref_},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!1,configurable:!0}),t}(),Wt=function(){function t(t,e,n,r){this.eventType=t,this.eventRegistration=e,this.snapshot=n,this.prevName=r}return t.prototype.getPath=function(){var t=this.snapshot.getRef();return"value"===this.eventType?t.path:t.getParent().path},t.prototype.getEventType=function(){return this.eventType},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.getPath().toString()+":"+this.eventType+":"+s.stringify(this.snapshot.exportVal())},t}(),Ht=function(){function t(t,e,n){this.eventRegistration=t,this.error=e,this.path=n}return t.prototype.getPath=function(){return this.path},t.prototype.getEventType=function(){return"cancel"},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.path.toString()+":cancel"},t}(),Kt=function(){function t(t,e,n){this.callback_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){return"value"===t},t.prototype.createEvent=function(t,e){var n=e.getQueryParams().getIndex();return new Wt("value",this,new zt(t.snapshotNode,e.getRef(),n))},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){s.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callback_;return function(){r.call(e,t.snapshot)}},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new Ht(this,t,e):null},t.prototype.matches=function(e){return e instanceof t&&(!e.callback_||!this.callback_||e.callback_===this.callback_&&e.context_===this.context_)},t.prototype.hasAnyCallback=function(){return null!==this.callback_},t}(),Gt=function(){function t(t,e,n){this.callbacks_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){var e="children_added"===t?"child_added":t;return e="children_removed"===e?"child_removed":e,s.contains(this.callbacks_,e)},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new Ht(this,t,e):null},t.prototype.createEvent=function(t,e){s.assert(null!=t.childName,"Child events should have a childName.");var n=e.getRef().child(t.childName),r=e.getQueryParams().getIndex();return new Wt(t.type,this,new zt(t.snapshotNode,n,r),t.prevName)},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){s.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callbacks_[t.eventType];return function(){r.call(e,t.snapshot,t.prevName)}},t.prototype.matches=function(e){var n=this;if(e instanceof t){if(!this.callbacks_||!e.callbacks_)return!0;if(this.context_===e.context_){var r=Object.keys(e.callbacks_),i=Object.keys(this.callbacks_),o=r.length;if(o===i.length){if(1===o){var a=r[0],s=i[0];return s===a&&(!e.callbacks_[a]||!this.callbacks_[s]||e.callbacks_[a]===this.callbacks_[s])}return i.every((function(t){return e.callbacks_[t]===n.callbacks_[t]}))}}}return!1},t.prototype.hasAnyCallback=function(){return null!==this.callbacks_},t}(),Qt=function(){function t(t,e,n,r){this.repo=t,this.path=e,this.queryParams_=n,this.orderByCalled_=r}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return s.assert(Vt,"Reference.ts has not been loaded"),Vt},set:function(t){Vt=t},enumerable:!1,configurable:!0}),t.validateQueryEndpoints_=function(t){var e=null,n=null;if(t.hasStart()&&(e=t.getIndexStartValue()),t.hasEnd()&&(n=t.getIndexEndValue()),t.getIndex()===yt){var r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",i="Query: When ordering by key, the argument passed to startAt(), endAt(),or equalTo() must be a string.";if(t.hasStart()){if(t.getIndexStartName()!==x)throw new Error(r);if("string"!==typeof e)throw new Error(i)}if(t.hasEnd()){if(t.getIndexEndName()!==N)throw new Error(r);if("string"!==typeof n)throw new Error(i)}}else if(t.getIndex()===It){if(null!=e&&!J(e)||null!=n&&!J(n))throw new Error("Query: When ordering by priority, the first argument passed to startAt(), endAt(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(s.assert(t.getIndex()instanceof Bt||t.getIndex()===qt,"unknown index type."),null!=e&&"object"===typeof e||null!=n&&"object"===typeof n)throw new Error("Query: First argument passed to startAt(), endAt(), or equalTo() cannot be an object.")},t.validateLimit_=function(t){if(t.hasStart()&&t.hasEnd()&&t.hasLimit()&&!t.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.")},t.prototype.validateNoPreviousOrderByCall_=function(t){if(!0===this.orderByCalled_)throw new Error(t+": You can't combine multiple orderBy calls.")},t.prototype.getQueryParams=function(){return this.queryParams_},t.prototype.getRef=function(){return s.validateArgCount("Query.ref",0,0,arguments.length),new t.__referenceConstructor(this.repo,this.path)},t.prototype.on=function(e,n,r,i){s.validateArgCount("Query.on",2,4,arguments.length),rt("Query.on",1,e,!1),s.validateCallback("Query.on",2,n,!1);var o=t.getCancelAndContextArgs_("Query.on",r,i);if("value"===e)this.onValueEvent(n,o.cancel,o.context);else{var a={};a[e]=n,this.onChildEvent(a,o.cancel,o.context)}return n},t.prototype.onValueEvent=function(t,e,n){var r=new Kt(t,e||null,n||null);this.repo.addEventCallbackForQuery(this,r)},t.prototype.onChildEvent=function(t,e,n){var r=new Gt(t,e,n);this.repo.addEventCallbackForQuery(this,r)},t.prototype.off=function(t,e,n){s.validateArgCount("Query.off",0,3,arguments.length),rt("Query.off",1,t,!0),s.validateCallback("Query.off",2,e,!0),s.validateContextObject("Query.off",3,n,!0);var r=null,i=null;if("value"===t){var o=e||null;r=new Kt(o,null,n||null)}else t&&(e&&((i={}
2)[t]=e),r=new Gt(i,null,n||null));this.repo.removeEventCallbackForQuery(this,r)},t.prototype.once=function(e,n,r,i){var o=this;s.validateArgCount("Query.once",1,4,arguments.length),rt("Query.once",1,e,!1),s.validateCallback("Query.once",2,n,!0);var a=t.getCancelAndContextArgs_("Query.once",r,i),u=!0,c=new s.Deferred;c.promise.catch((function(){}));var l=function t(r){u&&(u=!1,o.off(e,t),n&&n.bind(a.context)(r),c.resolve(r))};return this.on(e,l,(function(t){o.off(e,l),a.cancel&&a.cancel.bind(a.context)(t),c.reject(t)})),c.promise},t.prototype.limitToFirst=function(e){if(s.validateArgCount("Query.limitToFirst",1,1,arguments.length),"number"!==typeof e||Math.floor(e)!==e||e<=0)throw new Error("Query.limitToFirst: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,this.queryParams_.limitToFirst(e),this.orderByCalled_)},t.prototype.limitToLast=function(e){if(s.validateArgCount("Query.limitToLast",1,1,arguments.length),"number"!==typeof e||Math.floor(e)!==e||e<=0)throw new Error("Query.limitToLast: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,this.queryParams_.limitToLast(e),this.orderByCalled_)},t.prototype.orderByChild=function(e){if(s.validateArgCount("Query.orderByChild",1,1,arguments.length),"$key"===e)throw new Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===e)throw new Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');if("$value"===e)throw new Error('Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.');ot("Query.orderByChild",1,e,!1),this.validateNoPreviousOrderByCall_("Query.orderByChild");var n=new q(e);if(n.isEmpty())throw new Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.");var r=new Bt(n),i=this.queryParams_.orderBy(r);return t.validateQueryEndpoints_(i),new t(this.repo,this.path,i,!0)},t.prototype.orderByKey=function(){s.validateArgCount("Query.orderByKey",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByKey");var e=this.queryParams_.orderBy(yt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByPriority=function(){s.validateArgCount("Query.orderByPriority",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByPriority");var e=this.queryParams_.orderBy(It);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByValue=function(){s.validateArgCount("Query.orderByValue",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByValue");var e=this.queryParams_.orderBy(qt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.startAt=function(e,n){void 0===e&&(e=null),s.validateArgCount("Query.startAt",0,2,arguments.length),Z("Query.startAt",1,e,this.path,!0),it("Query.startAt",2,n,!0);var r=this.queryParams_.startAt(e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasStart())throw new Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return void 0===e&&(e=null,n=null),new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.endAt=function(e,n){void 0===e&&(e=null),s.validateArgCount("Query.endAt",0,2,arguments.length),Z("Query.endAt",1,e,this.path,!0),it("Query.endAt",2,n,!0);var r=this.queryParams_.endAt(e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasEnd())throw new Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.equalTo=function(t,e){if(s.validateArgCount("Query.equalTo",1,2,arguments.length),Z("Query.equalTo",1,t,this.path,!1),it("Query.equalTo",2,e,!0),this.queryParams_.hasStart())throw new Error("Query.equalTo: Starting point was already set
2(by another call to startAt or equalTo).");if(this.queryParams_.hasEnd())throw new Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.startAt(t,e).endAt(t,e)},t.prototype.toString=function(){return s.validateArgCount("Query.toString",0,0,arguments.length),this.repo.toString()+this.path.toUrlEncodedString()},t.prototype.toJSON=function(){return s.validateArgCount("Query.toJSON",0,1,arguments.length),this.toString()},t.prototype.queryObject=function(){return this.queryParams_.getQueryObject()},t.prototype.queryIdentifier=function(){var t=this.queryObject(),e=R(t);return"{}"===e?"default":e},t.prototype.isEqual=function(e){if(s.validateArgCount("Query.isEqual",1,1,arguments.length),!(e instanceof t)){var n="Query.isEqual failed: First argument must be an instance of firebase.database.Query.";throw new Error(n)}var r=this.repo===e.repo,i=this.path.equals(e.path),o=this.queryIdentifier()===e.queryIdentifier();return r&&i&&o},t.getCancelAndContextArgs_=function(t,e,n){var r={cancel:null,context:null};if(e&&n)r.cancel=e,s.validateCallback(t,3,r.cancel,!0),r.context=n,s.validateContextObject(t,4,r.context,!0);else if(e)if("object"===typeof e&&null!==e)r.context=e;else{if("function"!==typeof e)throw new Error(s.errorPrefix(t,3,!0)+" must either be a cancel callback or a context object.");r.cancel=e}return r},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!1,configurable:!0}),t}(),$t=function(){function t(t){this.node_=t}return t.prototype.getImmediateChild=function(e){return new t(this.node_.getImmediateChild(e))},t.prototype.node=function(){return this.node_},t}(),Xt=function(){function t(t,e){this.syncTree_=t,this.path_=e}return t.prototype.getImmediateChild=function(e){var n=this.path_.child(e);return new t(this.syncTree_,n)},t.prototype.node=function(){return this.syncTree_.calcCompleteEventCache(this.path_)},t}(),Yt=function(t,e,n){return t&&"object"===typeof t?(s.assert(".sv"in t,"Unexpected leaf node or priority contents"),"string"===typeof t[".sv"]?Jt(t[".sv"],e,n):"object"===typeof t[".sv"]?Zt(t[".sv"],e):void s.assert(!1,"Unexpected server value: "+JSON.stringify(t,null,2))):t},Jt=function(t,e,n){switch(t){case"timestamp":return n.timestamp;default:s.assert(!1,"Unexpected server value: "+t)}},Zt=function(t,e,n){t.hasOwnProperty("increment")||s.assert(!1,"Unexpected server value: "+JSON.stringify(t,null,2));var r=t.increment;"number"!==typeof r&&s.assert(!1,"Unexpected increment value: "+r);var i=e.node();if(s.assert(null!==i&&"undefined"!==typeof i,"Expected ChildrenNode.EMPTY_NODE for nulls"),!i.isLeafNode())return r;var o=i.getValue();return"number"!==typeof o?r:o+r},te=function(t,e,n,r){return ne(e,new Xt(n,t),r)},ee=function(t,e,n){return ne(t,new $t(e),n)};function ne(t,e,n){var r,i=t.getPriority().val(),o=Yt(i,e.getImmediateChild(".priority"),n);if(t.isLeafNode()){var a=t,s=Yt(a.getValue(),e,n);return s!==a.getValue()||o!==a.getPriority().val()?new Et(s,Ut(o)):t}var u=t;return r=u,o!==u.getPriority().val()&&(r=r.updatePriority(new Et(o))),u.forEachChild(It,(function(t,i){var o=ne(i,e.getImmediateChild(t),n);o!==i&&(r=r.updateImmediateChild(t,o))})),r}var re,ie=function(){function t(){this.value=null,this.children=new Map}return t.prototype.find=function(t){if(null!=this.value)return this.value.getChild(t);if(!t.isEmpty()&&this.children.size>0){var e=t.getFront();return t=t.popFront(),this.children.has(e)?this.children.get(e).find(t):null}return null},t.prototype.remember=function(e,n){if(e.isEmpty())this.value=n,this.children.clear();else if(null!==this.value)this.value=this.value.updateChild(e,n);else{var r=e.getFront();this.children.has(r)||this.children.set(r,new t);var i=this.children.get(r);e=e.popFront(),i.remember(e,n)}},t.prototype.forget=function(t){if(t.isEmpty())return this.value=null,this.children.clear(),!0;if(null!==this.value){if(this.value.isLeafNode())return!1;var e=this.value;this.value=null;var n=this;return e.forEachChild(It,(function(t,e){n.remember(new q(t),e)})),this.forget(t)}if(this.children.size>0){var r=t.getFront();if(t=t.popFront(),this.children.has(r))this.children.get(r).forget(t)&&this.children.delete(r);return 0===this.children.size}return!0},t.prototype.forEachTree=function(t,e){null!==this.value?e(t,this.value):this.forEachChild((function(n,r){var i=new q(t.toString()+"/"+n);r.forEachTree(i,e)}))}
2,t.prototype.forEachChild=function(t){this.children.forEach((function(e,n){t(n,e)}))},t}();!function(t){t[t.OVERWRITE=0]="OVERWRITE",t[t.MERGE=1]="MERGE",t[t.ACK_USER_WRITE=2]="ACK_USER_WRITE",t[t.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(re||(re={}));var oe,ae,se=function(){function t(t,e,n,r){this.fromUser=t,this.fromServer=e,this.queryId=n,this.tagged=r,s.assert(!r||e,"Tagged queries must be from server.")}return t.User=new t(!0,!1,null,!1),t.Server=new t(!1,!0,null,!1),t.forServerTaggedQuery=function(e){return new t(!1,!0,e,!0)},t}(),ue=function(){function t(t,e,n){this.path=t,this.affectedTree=e,this.revert=n,this.type=re.ACK_USER_WRITE,this.source=se.User}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){if(null!=this.affectedTree.value)return s.assert(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new q(e));return new t(q.Empty,n,this.revert)}return s.assert(this.path.getFront()===e,"operationForChild called for unrelated child."),new t(this.path.popFront(),this.affectedTree,this.revert)},t}(),ce=function(){function t(t,e){void 0===e&&(oe||(oe=new Nt(O)),e=oe),this.value=t,this.children=e}return t.fromObject=function(e){var n=t.Empty;return L(e,(function(t,e){n=n.set(new q(t),e)})),n},t.prototype.isEmpty=function(){return null===this.value&&this.children.isEmpty()},t.prototype.findRootMostMatchingPathAndValue=function(t,e){if(null!=this.value&&e(this.value))return{path:q.Empty,value:this.value};if(t.isEmpty())return null;var n=t.getFront(),r=this.children.get(n);if(null!==r){var i=r.findRootMostMatchingPathAndValue(t.popFront(),e);return null!=i?{path:new q(n).child(i.path),value:i.value}:null}return null},t.prototype.findRootMostValueAndPath=function(t){return this.findRootMostMatchingPathAndValue(t,(function(){return!0}))},t.prototype.subtree=function(e){if(e.isEmpty())return this;var n=e.getFront(),r=this.children.get(n);return null!==r?r.subtree(e.popFront()):t.Empty},t.prototype.set=function(e,n){if(e.isEmpty())return new t(n,this.children);var r=e.getFront(),i=(this.children.get(r)||t.Empty).set(e.popFront(),n),o=this.children.insert(r,i);return new t(this.value,o)},t.prototype.remove=function(e){if(e.isEmpty())return this.children.isEmpty()?t.Empty:new t(null,this.children);var n=e.getFront(),r=this.children.get(n);if(r){var i=r.remove(e.popFront()),o=void 0;return o=i.isEmpty()?this.children.remove(n):this.children.insert(n,i),null===this.value&&o.isEmpty()?t.Empty:new t(this.value,o)}return this},t.prototype.get=function(t){if(t.isEmpty())return this.value;var e=t.getFront(),n=this.children.get(e);return n?n.get(t.popFront()):null},t.prototype.setTree=function(e,n){if(e.isEmpty())return n;var r=e.getFront(),i=(this.children.get(r)||t.Empty).setTree(e.popFront(),n),o=void 0;return o=i.isEmpty()?this.children.remove(r):this.children.insert(r,i),new t(this.value,o)},t.prototype.fold=function(t){return this.fold_(q.Empty,t)},t.prototype.fold_=function(t,e){var n={};return this.children.inorderTraversal((function(r,i){n[r]=i.fold_(t.child(r),e)})),e(t,this.value,n)},t.prototype.findOnPath=function(t,e){return this.findOnPath_(t,q.Empty,e)},t.prototype.findOnPath_=function(t,e,n){var r=!!this.value&&n(e,this.value);if(r)return r;if(t.isEmpty())return null;var i=t.getFront(),o=this.children.get(i);return o?o.findOnPath_(t.popFront(),e.child(i),n):null},t.prototype.foreachOnPath=function(t,e){return this.foreachOnPath_(t,q.Empty,e)},t.prototype.foreachOnPath_=function(e,n,r){if(e.isEmpty())return this;this.value&&r(n,this.value);var i=e.getFront(),o=this.children.get(i);return o?o.foreachOnPath_(e.popFront(),n.child(i),r):t.Empty},t.prototype.foreach=function(t){this.foreach_(q.Empty,t)},t.prototype.foreach_=function(t,e){this.children.inorderTraversal((function(n,r){r.foreach_(t.child(n),e)})),this.value&&e(t,this.value)},t.prototype.foreachChild=function(t){this.children.inorderTraversal((function(e,n){
2n.value&&t(e,n.value)}))},t.Empty=new t(null),t}(),le=function(){function t(t,e){this.source=t,this.path=e,this.type=re.LISTEN_COMPLETE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,q.Empty):new t(this.source,this.path.popFront())},t}(),he=function(){function t(t,e,n){this.source=t,this.path=e,this.snap=n,this.type=re.OVERWRITE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,q.Empty,this.snap.getImmediateChild(e)):new t(this.source,this.path.popFront(),this.snap)},t}(),fe=function(){function t(t,e,n){this.source=t,this.path=e,this.children=n,this.type=re.MERGE}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){var n=this.children.subtree(new q(e));return n.isEmpty()?null:n.value?new he(this.source,q.Empty,n.value):new t(this.source,q.Empty,n)}return s.assert(this.path.getFront()===e,"Can't get a merge for a child not on the path of the operation"),new t(this.source,this.path.popFront(),this.children)},t.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"},t}(),pe=function(){function t(t,e,n){this.node_=t,this.fullyInitialized_=e,this.filtered_=n}return t.prototype.isFullyInitialized=function(){return this.fullyInitialized_},t.prototype.isFiltered=function(){return this.filtered_},t.prototype.isCompleteForPath=function(t){if(t.isEmpty())return this.isFullyInitialized()&&!this.filtered_;var e=t.getFront();return this.isCompleteForChild(e)},t.prototype.isCompleteForChild=function(t){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(t)},t.prototype.getNode=function(){return this.node_},t}(),de=function(){function t(t,e){this.eventCache_=t,this.serverCache_=e}return t.prototype.updateEventSnap=function(e,n,r){return new t(new pe(e,n,r),this.serverCache_)},t.prototype.updateServerSnap=function(e,n,r){return new t(this.eventCache_,new pe(e,n,r))},t.prototype.getEventCache=function(){return this.eventCache_},t.prototype.getCompleteEventSnap=function(){return this.eventCache_.isFullyInitialized()?this.eventCache_.getNode():null},t.prototype.getServerCache=function(){return this.serverCache_},t.prototype.getCompleteServerSnap=function(){return this.serverCache_.isFullyInitialized()?this.serverCache_.getNode():null},t.Empty=new t(new pe(jt.EMPTY_NODE,!1,!1),new pe(jt.EMPTY_NODE,!1,!1)),t}(),ve=function(){function t(t,e,n,r,i){this.type=t,this.snapshotNode=e,this.childName=n,this.oldSnap=r,this.prevName=i}return t.valueChange=function(e){return new t(t.VALUE,e)},t.childAddedChange=function(e,n){return new t(t.CHILD_ADDED,n,e)},t.childRemovedChange=function(e,n){return new t(t.CHILD_REMOVED,n,e)},t.childChangedChange=function(e,n,r){return new t(t.CHILD_CHANGED,n,e,r)},t.childMovedChange=function(e,n){return new t(t.CHILD_MOVED,n,e)},t.CHILD_ADDED="child_added",t.CHILD_REMOVED="child_removed",t.CHILD_CHANGED="child_changed",t.CHILD_MOVED="child_moved",t.VALUE="value",t}(),ye=function(){function t(t){this.index_=t}return t.prototype.updateChild=function(t,e,n,r,i,o){s.assert(t.isIndexed(this.index_),"A node must be indexed if only a child is updated");var a=t.getImmediateChild(e);return a.getChild(r).equals(n.getChild(r))&&a.isEmpty()===n.isEmpty()?t:(null!=o&&(n.isEmpty()?t.hasChild(e)?o.trackChildChange(ve.childRemovedChange(e,a)):s.assert(t.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):a.isEmpty()?o.trackChildChange(ve.childAddedChange(e,n)):o.trackChildChange(ve.childChangedChange(e,n,a))),t.isLeafNode()&&n.isEmpty()?t:t.updateImmediateChild(e,n).withIndex(this.index_))},t.prototype.updateFullNode=function(t,e,n){return null!=n&&(t.isLeafNode()||t.forEachChild(It,(function(t,r){e.hasChild(t)||n.trackChildChange(ve.childRemovedChange(t,r))})),e.isLeafNode()||e.forEachChild(It,(function(e,r){if(t.hasChild(e)){var i=t.getImmediateChild(e);i.equals(r)||n.trackChildChange(ve.childChangedChange(e,r,i))}else n.trackChildChange(ve.childAddedChange(e,r))}))),e.withIndex(this.index_)},t.prototype.updatePriority=function(t,e){return t.isEmpty()?jt.EMPTY_NODE:t.updatePriority(e)},t.prototype.filtersNodes=function(){return!1},t.prototype.getIndexedFilter=function(){return this},t.prototype.getIndex=function(){return this.index_},t}(),ge=function(){function t(){this.changeMap=new Map}return t.prototype.trackChildChange=function(t){var e=t.type,n=t.childName;s.assert(e===ve.CHILD_ADDED||e===ve.CHILD_CHANGED||e===ve.CHILD_REMOVED,"Only child changes supported for tracking"),s.assert(".priority"!==n,"Only non-priority child changes can be tracked.");var r=this.changeMap.get(n);if(r){var i=r.type;if(e===ve.CHILD_ADDED&&i===ve.CHILD_REMOVED)this.changeMap.set(n,ve.childChangedChange(n,t.snapshotNode,r.snapshotNode));else if(e===ve.CHILD_REMOVED&&i===ve.CHILD_ADDED)this.changeMap.delete(n);else if(e===ve.CHILD_REMOVED&&i===ve.CHILD_CHANGED)this.changeMap.set(n,ve.childRemovedChange(n,r.oldSnap));else if(e===ve.CHILD_CHANGED&&i===ve.CHILD_ADDED)this.changeMap.set(n,ve.childAddedChange(n,t.snapshotNode));else{if(e!==ve.CHILD_CHANGED||i!==ve.CHILD_CHANGED)throw s.assertionError("Illegal combination of changes: "+t+" occurred after "+r);this.changeMap.set(n,ve.childChangedChange(n,t.snapshotNode,r.oldSnap))}}else this.changeMap.set(n,t)},t.prototype.getChanges=function(){return Array.from(this.changeMap.values())},t}(),me=new(function(){function t(){}return t.prototype.getCompleteChild=function(t){return null},t.prototype.getChildAfterChild=function(t,e,n){return null},t}()),be=function(){function t(t,e,n){void 0===n&&(n=null),this.writes_=t,this.viewCache_=e,this.optCompleteServerCache_=n}return t.prototype.getCompleteChild=function(t){var e=this.viewCache_.getEventCache();if(e.isCompleteForChild(t))return e.getNode().getImmediateChild(t);var n=null!=this.optCompleteServerCache_?new pe(this.optCompleteServerCache_,!0,!1):this.viewCache_.getServerCache();return this.writes_.calcCompleteChild(t,n)},t.prototype.getChildAfterChild=function(t,e,n){var r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:this.viewCache_.getCompleteServerSnap(),i=this.writes_.calcIndexedSlice(r,e,1,n,t);return 0===i.length?null:i[0]},t}(),_e=function(t,e){this.viewCache=t,this.changes=e},we=function(){function t(t){this.filter_=t}return t.prototype.assertIndexed=function(t){s.assert(t.getEventCache().getNode().isIndexed(this.filter_.getIndex()),"Event snap not indexed"),s.assert(t.getServerCache().getNode().isIndexed(this.filter_.getIndex()),"Server snap not indexed")},t.prototype.applyOperation=function(e,n,r,i){var o,a,u=new ge;if(n.type===re.OVERWRITE){var c=n;c.source.fromUser?o=this.applyUserOverwrite_(e,c.path,c.snap,r,i,u):(s.assert(c.source.fromServer,"Unknown source."),a=c.source.tagged||e.getServerCache().isFiltered()&&!c.path.isEmpty(),o=this.applyServerOverwrite_(e,c.path,c.snap,r,i,a,u))}else if(n.type===re.MERGE){var l=n;l.source.fromUser?o=this.applyUserMerge_(e,l.path,l.children,r,i,u):(s.assert(l.source.fromServer,"Unknown source."),a=l.source.tagged||e.getServerCache().isFiltered(),o=this.applyServerMerge_(e,l.path,l.children,r,i,a,u))}else if(n.type===re.ACK_USER_WRITE){var h=n;o=h.revert?this.revertUserWrite_(e,h.path,r,i,u):this.ackUserWrite_(e,h.path,h.affectedTree,r,i,u)}else{if(n.type!==re.LISTEN_COMPLETE)throw s.assertionError("Unknown operation type: "+n.type);o=this.listenComplete_(e,n.path,r,u)}var f=u.getChanges();return t.maybeAddValueEvent_(e,o,f),new _e(o,f)},t.maybeAddValueEvent_=function(t,e,n){var r=e.getEventCache();if(r.isFullyInitialized()){var i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=t.getCompleteEventSnap();(n.length>
20||!t.getEventCache().isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(ve.valueChange(e.getCompleteEventSnap()))}},t.prototype.generateEventCacheAfterServerEvent_=function(t,e,n,r,i){var o=t.getEventCache();if(null!=n.shadowingWrite(e))return t;var a=void 0,u=void 0;if(e.isEmpty())if(s.assert(t.getServerCache().isFullyInitialized(),"If change path is empty, we must have complete server data"),t.getServerCache().isFiltered()){var c=t.getCompleteServerSnap(),l=c instanceof jt?c:jt.EMPTY_NODE,h=n.calcCompleteEventChildren(l);a=this.filter_.updateFullNode(t.getEventCache().getNode(),h,i)}else{var f=n.calcCompleteEventCache(t.getCompleteServerSnap());a=this.filter_.updateFullNode(t.getEventCache().getNode(),f,i)}else{var p=e.getFront();if(".priority"===p){s.assert(1===e.getLength(),"Can't have a priority with additional path components");var d=o.getNode();u=t.getServerCache().getNode();var v=n.calcEventCacheAfterServerOverwrite(e,d,u);a=null!=v?this.filter_.updatePriority(d,v):o.getNode()}else{var y=e.popFront(),g=void 0;if(o.isCompleteForChild(p)){u=t.getServerCache().getNode();var m=n.calcEventCacheAfterServerOverwrite(e,o.getNode(),u);g=null!=m?o.getNode().getImmediateChild(p).updateChild(y,m):o.getNode().getImmediateChild(p)}else g=n.calcCompleteChild(p,t.getServerCache());a=null!=g?this.filter_.updateChild(o.getNode(),p,g,y,r,i):o.getNode()}}return t.updateEventSnap(a,o.isFullyInitialized()||e.isEmpty(),this.filter_.filtersNodes())},t.prototype.applyServerOverwrite_=function(t,e,n,r,i,o,a){var s,u=t.getServerCache(),c=o?this.filter_:this.filter_.getIndexedFilter();if(e.isEmpty())s=c.updateFullNode(u.getNode(),n,null);else if(c.filtersNodes()&&!u.isFiltered()){var l=u.getNode().updateChild(e,n);s=c.updateFullNode(u.getNode(),l,null)}else{var h=e.getFront();if(!u.isCompleteForPath(e)&&e.getLength()>1)return t;var f=e.popFront(),p=u.getNode().getImmediateChild(h).updateChild(f,n);s=".priority"===h?c.updatePriority(u.getNode(),p):c.updateChild(u.getNode(),h,p,f,me,null)}var d=t.updateServerSnap(s,u.isFullyInitialized()||e.isEmpty(),c.filtersNodes()),v=new be(r,d,i);return this.generateEventCacheAfterServerEvent_(d,e,r,v,a)},t.prototype.applyUserOverwrite_=function(t,e,n,r,i,o){var a,s,u=t.getEventCache(),c=new be(r,t,i);if(e.isEmpty())s=this.filter_.updateFullNode(t.getEventCache().getNode(),n,o),a=t.updateEventSnap(s,!0,this.filter_.filtersNodes());else{var l=e.getFront();if(".priority"===l)s=this.filter_.updatePriority(t.getEventCache().getNode(),n),a=t.updateEventSnap(s,u.isFullyInitialized(),u.isFiltered());else{var h=e.popFront(),f=u.getNode().getImmediateChild(l),p=void 0;if(h.isEmpty())p=n;else{var d=c.getCompleteChild(l);p=null!=d?".priority"===h.getBack()&&d.getChild(h.parent()).isEmpty()?d:d.updateChild(h,n):jt.EMPTY_NODE}if(f.equals(p))a=t;else{var v=this.filter_.updateChild(u.getNode(),l,p,h,c,o);a=t.updateEventSnap(v,u.isFullyInitialized(),this.filter_.filtersNodes())}}}return a},t.cacheHasChild_=function(t,e){return t.getEventCache().isCompleteForChild(e)},t.prototype.applyUserMerge_=function(e,n,r,i,o,a){var s=this,u=e;return r.foreach((function(r,c){var l=n.child(r);t.cacheHasChild_(e,l.getFront())&&(u=s.applyUserOverwrite_(u,l,c,i,o,a))})),r.foreach((function(r,c){var l=n.child(r);t.cacheHasChild_(e,l.getFront())||(u=s.applyUserOverwrite_(u,l,c,i,o,a))})),u},t.prototype.applyMerge_=function(t,e){return e.foreach((function(e,n){t=t.updateChild(e,n)})),t},t.prototype.applyServerMerge_=function(t,e,n,r,i,o,a){var s=this;if(t.getServerCache().getNode().isEmpty()&&!t.getServerCache().isFullyInitialized())return t;var u,c=t;u=e.isEmpty()?n:ce.Empty.setTree(e,n);var l=t.getServerCache().getNode();return u.children.inorderTraversal((function(e,n){if(l.hasChild(e)){var u=t.getServerCache().getNode().getImmediateChild(e),h=s.applyMerge_(u,n);c=s.applyServerOverwrite_(c,new q(e),h,r,i,o,a)}})),u.children.inorderTraversal((function(e,n){var u=!t.getServerCache().isCompleteForChild(e)&&null==n.value;if(!l.hasChild(e)&&!u){var h=t.getServerCache().getNode().getImmediateChild(e),f=s.applyMerge_(h,n);c=s.applyServerOverwrite_(c,new q(e),f,r,i,o,a)}})),c},t.prototype.ackUserWrite_=function(t,e,n,r,i,o){if(null!=r.shadowingWrite(e))return t;var a=t.getServerCache().isFiltered(),s=t.getServerCache();if(null!=n.value){if(e.isEmpty()&&s.isFullyInitialized()||s.isCompleteForPath(e))return this.applyServerOverwrite_(t,e,s.getNode().getChild(e),r,i,a,o);if(e.isEmpty()){var u=ce.Empty;
2return s.getNode().forEachChild(yt,(function(t,e){u=u.set(new q(t),e)})),this.applyServerMerge_(t,e,u,r,i,a,o)}return t}var c=ce.Empty;return n.foreach((function(t,n){var r=e.child(t);s.isCompleteForPath(r)&&(c=c.set(t,s.getNode().getChild(r)))})),this.applyServerMerge_(t,e,c,r,i,a,o)},t.prototype.listenComplete_=function(t,e,n,r){var i=t.getServerCache(),o=t.updateServerSnap(i.getNode(),i.isFullyInitialized()||e.isEmpty(),i.isFiltered());return this.generateEventCacheAfterServerEvent_(o,e,n,me,r)},t.prototype.revertUserWrite_=function(t,e,n,r,i){var o;if(null!=n.shadowingWrite(e))return t;var a=new be(n,t,r),u=t.getEventCache().getNode(),c=void 0;if(e.isEmpty()||".priority"===e.getFront()){var l=void 0;if(t.getServerCache().isFullyInitialized())l=n.calcCompleteEventCache(t.getCompleteServerSnap());else{var h=t.getServerCache().getNode();s.assert(h instanceof jt,"serverChildren would be complete if leaf node"),l=n.calcCompleteEventChildren(h)}l=l,c=this.filter_.updateFullNode(u,l,i)}else{var f=e.getFront(),p=n.calcCompleteChild(f,t.getServerCache());null==p&&t.getServerCache().isCompleteForChild(f)&&(p=u.getImmediateChild(f)),(c=null!=p?this.filter_.updateChild(u,f,p,e.popFront(),a,i):t.getEventCache().getNode().hasChild(f)?this.filter_.updateChild(u,f,jt.EMPTY_NODE,e.popFront(),a,i):u).isEmpty()&&t.getServerCache().isFullyInitialized()&&(o=n.calcCompleteEventCache(t.getCompleteServerSnap())).isLeafNode()&&(c=this.filter_.updateFullNode(c,o,i))}return o=t.getServerCache().isFullyInitialized()||null!=n.shadowingWrite(q.Empty),t.updateEventSnap(c,o,this.filter_.filtersNodes())},t}(),Ee=function(){function t(t){this.query_=t,this.index_=this.query_.getQueryParams().getIndex()}return t.prototype.generateEventsForChanges=function(t,e,n){var r=this,i=[],o=[];return t.forEach((function(t){t.type===ve.CHILD_CHANGED&&r.index_.indexedValueChanged(t.oldSnap,t.snapshotNode)&&o.push(ve.childMovedChange(t.childName,t.snapshotNode))})),this.generateEventsForType_(i,ve.CHILD_REMOVED,t,n,e),this.generateEventsForType_(i,ve.CHILD_ADDED,t,n,e),this.generateEventsForType_(i,ve.CHILD_MOVED,o,n,e),this.generateEventsForType_(i,ve.CHILD_CHANGED,t,n,e),this.generateEventsForType_(i,ve.VALUE,t,n,e),i},t.prototype.generateEventsForType_=function(t,e,n,r,i){var o=this,a=n.filter((function(t){return t.type===e}));a.sort(this.compareChanges_.bind(this)),a.forEach((function(e){var n=o.materializeSingleChange_(e,i);r.forEach((function(r){r.respondsTo(e.type)&&t.push(r.createEvent(n,o.query_))}))}))},t.prototype.materializeSingleChange_=function(t,e){return"value"===t.type||"child_removed"===t.type||(t.prevName=e.getPredecessorChildName(t.childName,t.snapshotNode,this.index_)),t},t.prototype.compareChanges_=function(t,e){if(null==t.childName||null==e.childName)throw s.assertionError("Should only compare child_ events.");var n=new pt(t.childName,t.snapshotNode),r=new pt(e.childName,e.snapshotNode);return this.index_.compare(n,r)},t}(),Te=function(){function t(t,e){this.query_=t,this.eventRegistrations_=[];var n=this.query_.getQueryParams(),r=new ye(n.getIndex()),i=n.getNodeFilter();this.processor_=new we(i);var o=e.getServerCache(),a=e.getEventCache(),s=r.updateFullNode(jt.EMPTY_NODE,o.getNode(),null),u=i.updateFullNode(jt.EMPTY_NODE,a.getNode(),null),c=new pe(s,o.isFullyInitialized(),r.filtersNodes()),l=new pe(u,a.isFullyInitialized(),i.filtersNodes());this.viewCache_=new de(l,c),this.eventGenerator_=new Ee(this.query_)}return t.prototype.getQuery=function(){return this.query_},t.prototype.getServerCache=function(){return this.viewCache_.getServerCache().getNode()},t.prototype.getCompleteServerCache=function(t){var e=this.viewCache_.getCompleteServerSnap();return e&&(this.query_.getQueryParams().loadsAllData()||!t.isEmpty()&&!e.getImmediateChild(t.getFront()).isEmpty())?e.getChild(t):null},t.prototype.isEmpty=function(){return 0===this.eventRegistrations_.length},t.prototype.addEventRegistration=function(t){this.eventRegistrations_.push(t)},t.prototype.removeEventRegistration=function(t,e){var n=[];if(e){s.assert(null==t,"A cancel should cancel all event registrations.");var r=this.query_.path;this.eventRegistrations_.forEach((function(t){e=e;var i=t.createCancelEvent(e,r);i&&n.push(i)}))}if(t){for(var i=[],o=0;o<this.eventRegistrations_.length;++o){var a=this.eventRegistrations_[o];if(a.matches(t)){if(t.hasAnyCallback()){i=i.concat(this.eventRegistrations_.slice(o+1));break}}else i.push(a)}this.eventRegistrations_=i}else this.eventRegistrations_=[];return n},t.prototype.applyOperation=function(t,e,n){t.type===re.MERGE&&null!==t.source.queryId&&(s.assert(this.viewCache_.getCompleteServerSnap(),"We should always have a full c
2ache before handling merges"),s.assert(this.viewCache_.getCompleteEventSnap(),"Missing event cache, even though we have a server cache"));var r=this.viewCache_,i=this.processor_.applyOperation(r,t,e,n);return this.processor_.assertIndexed(i.viewCache),s.assert(i.viewCache.getServerCache().isFullyInitialized()||!r.getServerCache().isFullyInitialized(),"Once a server snap is complete, it should never go back"),this.viewCache_=i.viewCache,this.generateEventsForChanges_(i.changes,i.viewCache.getEventCache().getNode(),null)},t.prototype.getInitialEvents=function(t){var e=this.viewCache_.getEventCache(),n=[];e.getNode().isLeafNode()||e.getNode().forEachChild(It,(function(t,e){n.push(ve.childAddedChange(t,e))}));return e.isFullyInitialized()&&n.push(ve.valueChange(e.getNode())),this.generateEventsForChanges_(n,e.getNode(),t)},t.prototype.generateEventsForChanges_=function(t,e,n){var r=n?[n]:this.eventRegistrations_;return this.eventGenerator_.generateEventsForChanges(t,e,r)},t}(),Se=function(){function t(){this.views=new Map}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return s.assert(ae,"Reference.ts has not been loaded"),ae},set:function(t){s.assert(!ae,"__referenceConstructor has already been defined"),ae=t},enumerable:!1,configurable:!0}),t.prototype.isEmpty=function(){return 0===this.views.size},t.prototype.applyOperation=function(t,e,n){var r,i,o=t.source.queryId;if(null!==o){var u=this.views.get(o);return s.assert(null!=u,"SyncTree gave us an op for an invalid query."),u.applyOperation(t,e,n)}var c=[];try{for(var l=a.__values(this.views.values()),h=l.next();!h.done;h=l.next()){u=h.value;c=c.concat(u.applyOperation(t,e,n))}}catch(f){r={error:f}}finally{try{h&&!h.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}return c},t.prototype.addEventRegistration=function(t,e,n,r,i){var o=t.queryIdentifier(),a=this.views.get(o);if(!a){var s=n.calcCompleteEventCache(i?r:null),u=!1;s?u=!0:r instanceof jt?(s=n.calcCompleteEventChildren(r),u=!1):(s=jt.EMPTY_NODE,u=!1);var c=new de(new pe(s,u,!1),new pe(r,i,!1));a=new Te(t,c),this.views.set(o,a)}return a.addEventRegistration(e),a.getInitialEvents(e)},t.prototype.removeEventRegistration=function(e,n,r){var i,o,s=e.queryIdentifier(),u=[],c=[],l=this.hasCompleteView();if("default"===s)try{for(var h=a.__values(this.views.entries()),f=h.next();!f.done;f=h.next()){var p=a.__read(f.value,2),d=p[0],v=p[1];c=c.concat(v.removeEventRegistration(n,r)),v.isEmpty()&&(this.views.delete(d),v.getQuery().getQueryParams().loadsAllData()||u.push(v.getQuery()))}}catch(y){i={error:y}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}else(v=this.views.get(s))&&(c=c.concat(v.removeEventRegistration(n,r)),v.isEmpty()&&(this.views.delete(s),v.getQuery().getQueryParams().loadsAllData()||u.push(v.getQuery())));return l&&!this.hasCompleteView()&&u.push(new t.__referenceConstructor(e.repo,e.path)),{removed:u,events:c}},t.prototype.getQueryViews=function(){var t,e,n=[];try{for(var r=a.__values(this.views.values()),i=r.next();!i.done;i=r.next()){var o=i.value;o.getQuery().getQueryParams().loadsAllData()||n.push(o)}}catch(s){t={error:s}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},t.prototype.getCompleteServerCache=function(t){var e,n,r=null;try{for(var i=a.__values(this.views.values()),o=i.next();!o.done;o=i.next()){var s=o.value;r=r||s.getCompleteServerCache(t)}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r},t.prototype.viewForQuery=function(t){if(t.getQueryParams().loadsAllData())return this.getCompleteView();var e=t.queryIdentifier();return this.views.get(e)},t.prototype.viewExistsForQuery=function(t){return null!=this.viewForQuery(t)},t.prototype.hasCompleteView=function(){return null!=this.getCompleteView()},t.prototype.getCompleteView=function(){var t,e;try{for(var n=a.__values(this.views.values()),r=n.next();!r.done;r=n.next()){var i=r.value;if(i.getQuery().getQueryParams().loadsAllData())return i}}catch(o){t={error:o}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return null},t}(),Ie=function(){function t(t){this.writeTree_=t}return t.prototype.addWrite=function(e,n){if(e.isEmpty())return new t(new ce(n));var r=this.writeTree_.findRootMostValueAndPath(e);if(null!=r){var i=r.path,o=r.value,a=q.relativePath(i,e);return o=o.updateChild(a,n),new t(this.writeTree_.set(i,o))}var s=new ce(n);return new t(this.writeTree_.setTree(e,s))},t.prototype.addWrites=function(t,e){var n=this;return L(e,(function(e,r){n=n.addWrite(t.child(e),r)})),n},t.prototype.removeWrite=function(e){return e.isEmpty()?t.Empty:new t(this.writeTree_.setTree(e,ce.Empty))},t.prototype.hasCompleteWrite=function(t){return null!=this.getCompleteNode(t)},t.prototype.getCompleteNode=function(t){var e=this.writeTree_.findRootMostValueAndPath(t);return null!=e?this.writeTree_.get(e.path).getChild(q.relativePath(e.path,t)):null},t.prototype.getCompleteChildren=function(){var t=[],e=this.writeTree_.value;return null!=e?e.isLeafNode()||e.forEachChild(It,(function(e,n){t.push(new pt(e,n))}
2)):this.writeTree_.children.inorderTraversal((function(e,n){null!=n.value&&t.push(new pt(e,n.value))})),t},t.prototype.childCompoundWrite=function(e){if(e.isEmpty())return this;var n=this.getCompleteNode(e);return new t(null!=n?new ce(n):this.writeTree_.subtree(e))},t.prototype.isEmpty=function(){return this.writeTree_.isEmpty()},t.prototype.apply=function(t){return function t(e,n,r){if(null!=n.value)return r.updateChild(e,n.value);var i=null;return n.children.inorderTraversal((function(n,o){".priority"===n?(s.assert(null!==o.value,"Priority writes must always be leaf nodes"),i=o.value):r=t(e.child(n),o,r)})),r.getChild(e).isEmpty()||null===i||(r=r.updateChild(e.child(".priority"),i)),r}(q.Empty,this.writeTree_,t)},t.Empty=new t(new ce(null)),t}();var Ce=function(){function t(){this.visibleWrites_=Ie.Empty,this.allWrites_=[],this.lastWriteId_=-1}return t.prototype.childWrites=function(t){return new ke(t,this)},t.prototype.addOverwrite=function(t,e,n,r){s.assert(n>this.lastWriteId_,"Stacking an older write on top of newer ones"),void 0===r&&(r=!0),this.allWrites_.push({path:t,snap:e,writeId:n,visible:r}),r&&(this.visibleWrites_=this.visibleWrites_.addWrite(t,e)),this.lastWriteId_=n},t.prototype.addMerge=function(t,e,n){s.assert(n>this.lastWriteId_,"Stacking an older merge on top of newer ones"),this.allWrites_.push({path:t,children:e,writeId:n,visible:!0}),this.visibleWrites_=this.visibleWrites_.addWrites(t,e),this.lastWriteId_=n},t.prototype.getWrite=function(t){for(var e=0;e<this.allWrites_.length;e++){var n=this.allWrites_[e];if(n.writeId===t)return n}return null},t.prototype.removeWrite=function(t){var e=this,n=this.allWrites_.findIndex((function(e){return e.writeId===t}));s.assert(n>=0,"removeWrite called with nonexistent writeId.");var r=this.allWrites_[n];this.allWrites_.splice(n,1);for(var i=r.visible,o=!1,a=this.allWrites_.length-1;i&&a>=0;){var u=this.allWrites_[a];u.visible&&(a>=n&&this.recordContainsPath_(u,r.path)?i=!1:r.path.contains(u.path)&&(o=!0)),a--}if(i){if(o)return this.resetTree_(),!0;r.snap?this.visibleWrites_=this.visibleWrites_.removeWrite(r.path):L(r.children,(function(t){e.visibleWrites_=e.visibleWrites_.removeWrite(r.path.child(t))}));return!0}return!1},t.prototype.getCompleteWriteData=function(t){return this.visibleWrites_.getCompleteNode(t)},t.prototype.calcCompleteEventCache=function(e,n,r,i){if(r||i){var o=this.visibleWrites_.childCompoundWrite(e);if(!i&&o.isEmpty())return n;if(i||null!=n||o.hasCompleteWrite(q.Empty)){var a=t.layerTree_(this.allWrites_,(function(t){return(t.visible||i)&&(!r||!~r.indexOf(t.writeId))&&(t.path.contains(e)||e.contains(t.path))}),e);c=n||jt.EMPTY_NODE;return a.apply(c)}return null}var s=this.visibleWrites_.getCompleteNode(e);if(null!=s)return s;var u=this.visibleWrites_.childCompoundWrite(e);if(u.isEmpty())return n;if(null!=n||u.hasCompleteWrite(q.Empty)){var c=n||jt.EMPTY_NODE;return u.apply(c)}return null},t.prototype.calcCompleteEventChildren=function(t,e){var n=jt.EMPTY_NODE,r=this.visibleWrites_.getCompleteNode(t);if(r)return r.isLeafNode()||r.forEachChild(It,(function(t,e){n=n.updateImmediateChild(t,e)})),n;if(e){var i=this.visibleWrites_.childCompoundWrite(t);return e.forEachChild(It,(function(t,e){var r=i.childCompoundWrite(new q(t)).apply(e);n=n.updateImmediateChild(t,r)}
2)),i.getCompleteChildren().forEach((function(t){n=n.updateImmediateChild(t.name,t.node)})),n}return this.visibleWrites_.childCompoundWrite(t).getCompleteChildren().forEach((function(t){n=n.updateImmediateChild(t.name,t.node)})),n},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n,r){s.assert(n||r,"Either existingEventSnap or existingServerSnap must exist");var i=t.child(e);if(this.visibleWrites_.hasCompleteWrite(i))return null;var o=this.visibleWrites_.childCompoundWrite(i);return o.isEmpty()?r.getChild(e):o.apply(r.getChild(e))},t.prototype.calcCompleteChild=function(t,e,n){var r=t.child(e),i=this.visibleWrites_.getCompleteNode(r);return null!=i?i:n.isCompleteForChild(e)?this.visibleWrites_.childCompoundWrite(r).apply(n.getNode().getImmediateChild(e)):null},t.prototype.shadowingWrite=function(t){return this.visibleWrites_.getCompleteNode(t)},t.prototype.calcIndexedSlice=function(t,e,n,r,i,o){var a,s=this.visibleWrites_.childCompoundWrite(t),u=s.getCompleteNode(q.Empty);if(null!=u)a=u;else{if(null==e)return[];a=s.apply(e)}if((a=a.withIndex(o)).isEmpty()||a.isLeafNode())return[];for(var c=[],l=o.getCompare(),h=i?a.getReverseIteratorFrom(n,o):a.getIteratorFrom(n,o),f=h.getNext();f&&c.length<r;)0!==l(f,n)&&c.push(f),f=h.getNext();return c},t.prototype.recordContainsPath_=function(t,e){if(t.snap)return t.path.contains(e);for(var n in t.children)if(t.children.hasOwnProperty(n)&&t.path.child(n).contains(e))return!0;return!1},t.prototype.resetTree_=function(){this.visibleWrites_=t.layerTree_(this.allWrites_,t.DefaultFilter_,q.Empty),this.allWrites_.length>0?this.lastWriteId_=this.allWrites_[this.allWrites_.length-1].writeId:this.lastWriteId_=-1},t.DefaultFilter_=function(t){return t.visible},t.layerTree_=function(t,e,n){for(var r=Ie.Empty,i=0;i<t.length;++i){var o=t[i];if(e(o)){var a=o.path,u=void 0;if(o.snap)n.contains(a)?(u=q.relativePath(n,a),r=r.addWrite(u,o.snap)):a.contains(n)&&(u=q.relativePath(a,n),r=r.addWrite(q.Empty,o.snap.getChild(u)));else{if(!o.children)throw s.assertionError("WriteRecord should have .snap or .children");if(n.contains(a))u=q.relativePath(n,a),r=r.addWrites(u,o.children);else if(a.contains(n))if((u=q.relativePath(a,n)).isEmpty())r=r.addWrites(q.Empty,o.children);else{var c=s.safeGet(o.children,u.getFront());if(c){var l=c.getChild(u.popFront());r=r.addWrite(q.Empty,l)}}}}}return r},t}(),ke=function(){function t(t,e){this.treePath_=t,this.writeTree_=e}return t.prototype.calcCompleteEventCache=function(t,e,n){return this.writeTree_.calcCompleteEventCache(this.treePath_,t,e,n)},t.prototype.calcCompleteEventChildren=function(t){return this.writeTree_.calcCompleteEventChildren(this.treePath_,t)},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n){return this.writeTree_.calcEventCacheAfterServerOverwrite(this.treePath_,t,e,n)},t.prototype.shadowingWrite=function(t){return this.writeTree_.shadowingWrite(this.treePath_.child(t))},t.prototype.calcIndexedSlice=function(t,e,n,r,i){return this.writeTree_.calcIndexedSlice(this.treePath_,t,e,n,r,i)},t.prototype.calcCompleteChild=function(t,e){return this.writeTree_.calcCompleteChild(this.treePath_,t,e)},t.prototype.child=function(e){return new t(this.treePath_.child(e),this.writeTree_)},t}(),xe=function(){function t(t){this.listenProvider_=t,this.syncPointTree_=ce.Empty,this.pendingWriteTree_=new Ce,this.tagToQueryMap=new Map,this.queryToTagMap=new Map}return t.prototype.applyUserOverwrite=function(t,e,n,r){return this.pendingWriteTree_.addOverwrite(t,e,n,r),r?this.applyOperationToSyncPoints_(new he(se.User,t,e)):[]},t.prototype.applyUserMerge=function(t,e,n){this.pendingWriteTree_.addMerge(t,e,n);var r=ce.fromObject(e);return this.applyOperationToSyncPoints_(new fe(se.User,t,r))},t.prototype.ackUserWrite=function(t,e){void 0===e&&(e=!1);var n=this.pendingWriteTree_.getWrite(t);if(this.pendingWriteTree_.removeWrite(t)){var r=ce.Empty;return null!=n.snap?r=r.set(q.Empty,!0):L(n.children,(function(t,e){r=r.set(new q(t),e)})),this.applyOperationToSyncPoints_(new ue(n.path,r,e))}return[]},t.prototype.applyServerOverwrite=function(t,e){return this.applyOperationToSyncPoints_(new he(se.Server,t,e))},t.prototype.applyServerMerge=function(t,e){var n=ce.fromObject(e);return this.applyOperationToSyncPoints_(new fe(se.Server,t,n))},t.prototype.applyListenComplete=function(t){return this.applyOperationToSyncPoints_(new le(se.Server,t))},t.prototype.applyTaggedQueryOverwrite=function(e,n,r){var i=this.queryKeyForTag_(r);if(null!=i){var o=t.parseQueryKey_(i),a=o.path,s=o.queryId,u=q.relativePath(a,e),c=new he(se.forServerTaggedQuery(s),u,n);return this.applyTaggedOperation_(a,c)}return[]},t.prototype.applyTaggedQueryMerge=function(e,n,r){var i=this.queryKeyForTag_(r);if(i){var o=t.parseQueryKey_(i),a=o.path,s=o.queryId,u=q.relativePath(a,e),c=ce.fromObject(n),l=new fe(se.forServerTaggedQuery(s),u,c);return this.applyTaggedOperation_(a,l)}return[]},t.prototype.applyTaggedListenComplete=function(e,n){var r=this.queryKeyForTag_(n);if(r){var i=t.parseQueryKey_(r),o=i.path,a=i.queryId,s=q.relativePath(o,e),u=new le(se.forServerTaggedQuery(a),s);return this.applyTaggedOperation_(o,u)}return[]},t.prototype.addEventRegistration=function(e,n){var r=e.path,i=null,o=!1;this.syncPointTree_.foreachOnPath(r,(function(t,e){var n=q.relativePath(t,r);i=i||e.getCompleteServerCache(n),o=o||e.hasCompleteView()}));var a,u=this.syncPointTree_.get(r);(u?(o=o||u.hasCompleteView(),i=i||u.getCompleteServerCache(q.Empty)):(u=new Se,this.syncPointTree_=this.syncPointTree_.set(r,u)),null!=i)?a=!0:(a=!1,i=jt.
2EMPTY_NODE,this.syncPointTree_.subtree(r).foreachChild((function(t,e){var n=e.getCompleteServerCache(q.Empty);n&&(i=i.updateImmediateChild(t,n))})));var c=u.viewExistsForQuery(e);if(!c&&!e.getQueryParams().loadsAllData()){var l=t.makeQueryKey_(e);s.assert(!this.queryToTagMap.has(l),"View does not exist, but we have a tag");var h=t.getNextQueryTag_();this.queryToTagMap.set(l,h),this.tagToQueryMap.set(h,l)}var f=this.pendingWriteTree_.childWrites(r),p=u.addEventRegistration(e,n,f,i,a);if(!c&&!o){var d=u.viewForQuery(e);p=p.concat(this.setupListener_(e,d))}return p},t.prototype.removeEventRegistration=function(e,n,r){var i=this,o=e.path,a=this.syncPointTree_.get(o),s=[];if(a&&("default"===e.queryIdentifier()||a.viewExistsForQuery(e))){var u=a.removeEventRegistration(e,n,r);a.isEmpty()&&(this.syncPointTree_=this.syncPointTree_.remove(o));var c=u.removed;s=u.events;var l=-1!==c.findIndex((function(t){return t.getQueryParams().loadsAllData()})),h=this.syncPointTree_.findOnPath(o,(function(t,e){return e.hasCompleteView()}));if(l&&!h){var f=this.syncPointTree_.subtree(o);if(!f.isEmpty())for(var p=this.collectDistinctViewsForSubTree_(f),d=0;d<p.length;++d){var v=p[d],y=v.getQuery(),g=this.createListenerForView_(v);this.listenProvider_.startListening(t.queryForListening_(y),this.tagForQuery_(y),g.hashFn,g.onComplete)}}if(!h&&c.length>0&&!r)if(l){this.listenProvider_.stopListening(t.queryForListening_(e),null)}else c.forEach((function(e){var n=i.queryToTagMap.get(t.makeQueryKey_(e));i.listenProvider_.stopListening(t.queryForListening_(e),n)}));this.removeTags_(c)}return s},t.prototype.calcCompleteEventCache=function(t,e){var n=this.pendingWriteTree_,r=this.syncPointTree_.findOnPath(t,(function(e,n){var r=q.relativePath(e,t),i=n.getCompleteServerCache(r);if(i)return i}));return n.calcCompleteEventCache(t,r,e,!0)},t.prototype.collectDistinctViewsForSubTree_=function(t){return t.fold((function(t,e,n){if(e&&e.hasCompleteView())return[e.getCompleteView()];var r=[];return e&&(r=e.getQueryViews()),L(n,(function(t,e){r=r.concat(e)})),r}))},t.prototype.removeTags_=function(e){for(var n=0;n<e.length;++n){var r=e[n];if(!r.getQueryParams().loadsAllData()){var i=t.makeQueryKey_(r),o=this.queryToTagMap.get(i);this.queryToTagMap.delete(i),this.tagToQueryMap.delete(o)}}},t.queryForListening_=function(t){return t.getQueryParams().loadsAllData()&&
2!t.getQueryParams().isDefault()?t.getRef():t},t.prototype.setupListener_=function(e,n){var r=e.path,i=this.tagForQuery_(e),o=this.createListenerForView_(n),a=this.listenProvider_.startListening(t.queryForListening_(e),i,o.hashFn,o.onComplete),u=this.syncPointTree_.subtree(r);if(i)s.assert(!u.value.hasCompleteView(),"If we're adding a query, it shouldn't be shadowed");else for(var c=u.fold((function(t,e,n){if(!t.isEmpty()&&e&&e.hasCompleteView())return[e.getCompleteView().getQuery()];var r=[];return e&&(r=r.concat(e.getQueryViews().map((function(t){return t.getQuery()})))),L(n,(function(t,e){r=r.concat(e)})),r})),l=0;l<c.length;++l){var h=c[l];this.listenProvider_.stopListening(t.queryForListening_(h),this.tagForQuery_(h))}return a},t.prototype.createListenerForView_=function(t){var e=this,n=t.getQuery(),r=this.tagForQuery_(n);return{hashFn:function(){return(t.getServerCache()||jt.EMPTY_NODE).hash()},onComplete:function(t){if("ok"===t)return r?e.applyTaggedListenComplete(n.path,r):e.applyListenComplete(n.path);var i=function(t,e){var n="Unknown Error";"too_big"===t?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"===t?n="Client doesn't have permission to access the desired data.":"unavailable"===t&&(n="The service is unavailable");var r=new Error(t+" at "+e.path.toString()+": "+n);return r.code=t.toUpperCase(),r}(t,n);return e.removeEventRegistration(n,null,i)}}},t.makeQueryKey_=function(t){return t.path.toString()+"$"+t.queryIdentifier()},t.parseQueryKey_=function(t){var e=t.indexOf("$");return s.assert(-1!==e&&e<t.length-1,"Bad queryKey."),{queryId:t.substr(e+1),path:new q(t.substr(0,e))}},t.prototype.queryKeyForTag_=function(t){return this.tagToQueryMap.get(t)},t.prototype.tagForQuery_=function(e){var n=t.makeQueryKey_(e);return this.queryToTagMap.get(n)},t.getNextQueryTag_=function(){return t.nextQueryTag_++},t.prototype.applyTaggedOperation_=function(t,e){var n=this.syncPointTree_.get(t);s.assert(n,"Missing sync point for query tag that we're tracking");var r=this.pendingWriteTree_.childWrites(t);return n.applyOperation(e,r,null)},t.prototype.applyOperationToSyncPoints_=function(t){return this.applyOperationHelper_(t,this.syncPointTree_,null,this.pendingWriteTree_.childWrites(q.Empty))},t.prototype.applyOperationHelper_=function(t,e,n,r){if(t.path.isEmpty())return this.applyOperationDescendantsHelper_(t,e,n,r);var i=e.get(q.Empty);null==n&&null!=i&&(n=i.getCompleteServerCache(q.Empty));var o=[],a=t.path.getFront(),s=t.operationForChild(a),u=e.children.get(a);if(u&&s){var c=n?n.getImmediateChild(a):null,l=r.child(a);o=o.concat(this.applyOperationHelper_(s,u,c,l))}return i&&(o=o.concat(i.applyOperation(t,r,n))),o},t.prototype.applyOperationDescendantsHelper_=function(t,e,n,r){var i=this,o=e.get(q.Empty);null==n&&null!=o&&(n=o.getCompleteServerCache(q.Empty));var a=[];return e.children.inorderTraversal((function(e,o){var s=n?n.getImmediateChild(e):null,u=r.child(e),c=t.operationForChild(e);c&&(a=a.concat(i.applyOperationDescendantsHelper_(c,o,s,u)))})),o&&(a=a.concat(o.applyOperation(t,r,n))),a},t.nextQueryTag_=1,t}(),Ne=function(){function t(){this.rootNode_=jt.EMPTY_NODE}return t.prototype.getNode=function(t){return this.rootNode_.getChild(t)},t.prototype.updateSnapshot=function(t,e){this.rootNode_=this.rootNode_.updateChild(t,e)},t}(),Ae=function(){function t(){this.counters_={}}return t.prototype.incrementCounter=function(t,e){void 0===e&&(e=1),s.contains(this.counters_,t)||(this.counters_[t]=0),this.counters_[t]+=e},t.prototype.get=function(){return s.deepCopy(this.counters_)},t}(),Oe=function(){function t(){}return t.getCollection=function(t){var e=t.toString();return this.collections_[e]||(this.collections_[e]=new Ae),this.collections_[e]},t.getOrCreateReporter=function(t,e){var n=t.toString();return this.reporters_[n]||(this.reporters_[n]=e()),this.reporters_[n]},t.collections_={},t.reporters_={},t}(),Pe=function(){function t(t){this.collection_=t,this.last_=null}return t.prototype.get=function(){var t=this.collection_.get(),e=a.__assign({},t);return this.last_&&L(this.last_,(function(t,n){e[t]=e[t]-n})),this.last_=t,e},t}(),Re=function(){function t(t,e){this.server_=e,this.statsToReport_={},this.statsListener_=new Pe(t);var n=1e4+2e4*Math.random();V(this.reportStats_.bind(this),Math.floor(n))}return t.prototype.includeStat=function(t){this.statsToReport_[t]=!0},t.prototype.reportStats_=function(){var t=this,e=this.statsListener_.get(),n={},r=!1;L(e,(function(e,i){i>0&&s.contains(t.statsToReport_,e)&&(n[e]=i,r=!0)})),r&&this.server_.reportStats(n),V(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))},t}(),De=function(){function t(){this.eventLists_=[],this.recursionDepth_=0}return t.prototype.queueEvents=function(t){for(var e=null,n=0;n<t.length;n++){var r=t[n],i=r.getPath();null===e||i.equals(e.getPath())||(this.eventLists_.push(e),e=null),null===e&&(e=new Le(i)),e.add(r)}e&&this.eventLists_.push(e)},t.prototype.raiseEventsAtPath=function(t,e){this.queueEvents(e),this.raiseQueuedEventsMatchingPredicate_((function(e){return e.equals(t)}))},t.prototype.raiseEventsForChangedPath=function(t,e){this.queueEvents(e),this.raiseQueuedEventsMatchingPredicate_((function(e){return e.contains(t)||t.contains(e)}))},t.prototype.raiseQueuedEventsMatchingPredicate_=function(t){this.recursionDepth_++;for(var e=!0,n=0;n<this.eventLists_.length;n++){var r=this.eventLists_[n];if(r)t(r.getPath())?(this.eventLists_[n].raise(),this.eventLists_[n]=null):e=!1}e&&(this.eventLists_=[]),this.recursionDepth_--},t}(),Le=function(){function t(t){this.path_=t,this.events_=[]}
2return t.prototype.add=function(t){this.events_.push(t)},t.prototype.raise=function(){for(var t=0;t<this.events_.length;t++){var e=this.events_[t];if(null!==e){this.events_[t]=null;var n=e.getEventRunner();b&&E("event: "+e.toString()),U(n)}}},t.prototype.getPath=function(){return this.path_},t}(),Me=function(){function t(t){this.allowedEvents_=t,this.listeners_={},s.assert(Array.isArray(t)&&t.length>0,"Requires a non-empty array")}return t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(Array.isArray(this.listeners_[t]))for(var r=a.__spread(this.listeners_[t]),i=0;i<r.length;i++)r[i].callback.apply(r[i].context,e)},t.prototype.on=function(t,e,n){this.validateEventType_(t),this.listeners_[t]=this.listeners_[t]||[],this.listeners_[t].push({callback:e,context:n});var r=this.getInitialEvent(t);r&&e.apply(n,r)},t.prototype.off=function(t,e,n){this.validateEventType_(t);for(var r=this.listeners_[t]||[],i=0;i<r.length;i++)if(r[i].callback===e&&(!n||n===r[i].context))return void r.splice(i,1)},t.prototype.validateEventType_=function(t){s.assert(this.allowedEvents_.find((function(e){return e===t})),"Unknown event: "+t)},t}(),je=function(t){function e(){var e,n,r=t.call(this,["visible"])||this;return"undefined"!==typeof document&&"undefined"!==typeof document.addEventListener&&("undefined"!==typeof document.hidden?(n="visibilitychange",e="hidden"):"undefined"!==typeof document.mozHidden?(n="mozvisibilitychange",e="mozHidden"):"undefined"!==typeof document.msHidden?(n="msvisibilitychange",e="msHidden"):"undefined"!==typeof document.webkitHidden&&(n="webkitvisibilitychange",e="webkitHidden")),r.visible_=!0,n&&document.addEventListener(n,(function(){var t=!document[e];t!==r.visible_&&(r.visible_=t,r.trigger("visible",t))}),!1),r}return a.__extends(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return s.assert("visible"===t,"Unknown event type: "+t),[this.visible_]},e}(Me),Fe=function(t){function e(){var e=t.call(this,["online"])||this;return e.online_=!0,"undefined"===typeof window||"undefined"===typeof window.addEventListener||s.isMobileCordova()||(window.addEventListener("online",(function(){e.online_||(e.online_=!0,e.trigger("online",!0))}),!1),window.addEventListener("offline",(function(){e.online_&&(e.online_=!1,e.trigger("online",!1))}),!1)),e}return a.__extends(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return s.assert("online"===t,"Unknown event type: "+t),[this.online_]},e.prototype.currentlyOnline=function(){return this.online_},e}(Me),Ue=function(){function t(t){this.onMessage_=t,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return t.prototype.closeAfter=function(t,e){this.closeAfterResponse=t,this.onClose=e,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)},t.prototype.handleResponse=function(t,e){var n=this;this.pendingResponses[t]=e;for(var r=function(){var t=i.pendingResponses[i.currentResponseNum];delete i.pendingResponses[i.currentResponseNum];for(var e=function(e){t[e]&&U((function(){n.onMessage_(t[e])}))},r=0;r<t.length;++r)e(r);if(i.currentResponseNum===i.closeAfterResponse)return i.onClose&&(i.onClose(),i.onClose=null),"break";i.currentResponseNum++},i=this;this.pendingResponses[this.currentResponseNum];){if("break"===r())break}},t}(),Ve=function(){function t(t,e,n,r,i){this.connId=t,this.repoInfo=e,this.applicationId=n,this.transportSessionId=r,this.lastSessionId=i,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=T(t),this.stats_=Oe.getCollection(e),this.urlFn=function(t){return e.connectionURL("long_polling",t)}}return t.prototype.open=function(t,e){var n=this;this.curSegmentNum=0,this.onDisconnect_=e,this.myPacketOrderer=new Ue(t),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout((function(){n.log_("Timed out trying to connect."),n.onClosed_(),n.connectTimeoutTimer_=null}),Math.floor(3e4)),function(t){if(s.isNodeSdk()||"complete"===document.readyState)t();else{var e=!1,n=function n(){document.body?e||(e=!0,t()):setTimeout(n,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&n()})),window.attachEvent("onload",n))}}((function(){if(!n.isClosed_){n.scriptTagHolder=new qe((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=a.__read(t,5),i=r[0],o=r[1],s=r[2];r[3],r[4];if(n.incrementIncomingBytes_(t),n.scriptTagHolder)if(n.connectTimeoutTimer_&&(clearTimeout(n.connectTimeoutTimer_),n.connectTimeoutTimer_=null),n.everConnected_=!0,"start"===i)n.id=o,n.password=s;else{if("close"!==i)throw new Error("Unrecognized command received: "+i);o?(n.scriptTagHolder.sendNewPolls=!1,n.myPacketOrderer.closeAfter(o,(function(){n.onClosed_()}))):n.onClosed_()}}),(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=a.__read(t,2),i=r[0],o=r[1];n.incrementIncomingBytes_(t),n.myPacketOrderer.handleResponse(i,o)}),(function(){n.onClosed_()}),n.urlFn);var t={start:"t"};t.ser=Math.floor(1e8*Math.random()),n.scriptTagHolder.uniqueCallbackIdentifier&&(t.cb=n.scriptTagHolder.uniqueCallbackIdentifier),t.v="5",n.transportSessionId&&(t.s=n.transportSessionId),n.lastSessionId&&(t.ls=n.lastSessionId),n.applicationId&&(t.p=n.applicationId),"undefined"!==typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(t.r="f");var e=n.urlFn(t);n.log_("Connecting via long-poll to "+e),n.scriptTagHolder.addTag(e,(function(){}))}}))},t.prototype.start=function(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)},t.forceAllow=function(){t.forceAllow_=!0},t.forceDisallow=function(){t.forceDisallow_=!0},t.isAvailable=function(){return!s.isNodeSdk()&&(!!t.forceAllow_||!t.forceDisallow_&&"undefined"!==typeof document&&null!=document.createElement&&!("object"===typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"===typeof Windows&&"object"===typeof Windows.UI))},t.prototype.markConnectionHealthy=function(){},t.prototype.shutdown_=function(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)},t.prototype.onClosed_=function(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))},t.prototype.close=function(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())},t.prototype.send=function(t){var e=s.stringify(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);for(var n=s.base64Encode(e),r=D(n,1840),i=0;i<r.length;i++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,r.length,r[i]),this.curSegmentNum++},t.prototype.addDisconnectPingFrame=function(t,e){if(!s.isNodeSdk()){this.myDisconnFrame=document.createElement("iframe");var n={dframe:"t"};n.id=t,n.pw=e,this.myDisconnFrame.src=this.urlFn(n),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}},t.prototype.incrementIncomingBytes_=function(t){var e=s.stringify(t).length;this.bytesReceived+=e,this.stats_.incrementCounter("bytes_received",e)},t}(),qe=function(){function t(e,n,r,i){if(this.onDisconnect=r,this.urlFn=i,this.outstandingRequests=new Set,this.pendingSegs=[],this.currentSerial=Math.floor(1e8*Math.random()),this.sendNewPolls=!0,s.isNodeSdk())this.commandCB=e,this.onMessageCB=n;else{this.uniqueCallbackIdentifier=y(),window["pLPCommand"+this.uniqueCallbackIdentifier]=e,window["pRTLPCB"+this.uniqueCallbackIdentifier]=n,this.myIFrame=t.createI
2Frame_();var o="";if(this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,"javascript:".length))o='<script>document.domain="'+document.domain+'";<\/script>';var a="<html><body>"+o+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(a),this.myIFrame.doc.close()}catch(u){E("frame writing exception"),u.stack&&E(u.stack),E(u)}}}return t.createIFrame_=function(){var t=document.createElement("iframe");if(t.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(t);try{t.contentWindow.document||E("No IE domain setting required")}catch(n){var e=document.domain;t.src="javascript:void((function(){document.open();document.domain='"+e+"';document.close();})())"}return t.contentDocument?t.doc=t.contentDocument:t.contentWindow?t.doc=t.contentWindow.document:t.document&&(t.doc=t.document),t},t.prototype.close=function(){var t=this;this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout((function(){null!==t.myIFrame&&(document.body.removeChild(t.myIFrame),t.myIFrame=null)}),Math.floor(0)));var e=this.onDisconnect;e&&(this.onDisconnect=null,e())},t.prototype.startLongPoll=function(t,e){for(this.myID=t,this.myPW=e,this.alive=!0;this.newRequest_(););},t.prototype.newRequest_=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var t={};t.id=this.myID,t.pw=this.myPW,t.ser=this.currentSerial;for(var e=this.urlFn(t),n="",r=0;this.pendingSegs.length>0;){if(!(this.pendingSegs[0].d.length+30+n.length<=1870))break;var i=this.pendingSegs.shift();n=n+"&seg"+r+"="+i.seg+"&ts"+r+"="+i.ts+"&d"+r+"="+i.d,r++}return e+=n,this.addLongPollTag_(e,this.currentSerial),!0}return!1},t.prototype.enqueueSegment=function(t,e,n){this.pendingSegs.push({seg:t,ts:e,d:n}),this.alive&&this.newRequest_()},t.prototype.addLongPollTag_=function(t,e){var n=this;this.outstandingRequests.add(e);var r=function(){n.outstandingRequests.delete(e),n.newRequest_()},i=setTimeout(r,Math.floor(25e3));this.addTag(t,(function(){clearTimeout(i),r()}))},t.prototype.addTag=function(t,e){var n=this;s.isNodeSdk()?this.doNodeLongPoll(t,e):setTimeout((function(){try{if(!n.sendNewPolls)return;var r=n.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=t,r.onload=r.onreadystatechange=function(){var t=r.readyState;t&&"loaded"!==t&&"complete"!==t||(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),e())},r.onerror=function(){E("Long-poll script failed to load: "+t),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(r)}catch(i){}}),Math.floor(1))},t}(),Be="";var ze=null;"undefined"!==typeof MozWebSocket?ze=MozWebSocket:"undefined"!==typeof WebSocket&&(ze=WebSocket);var We=function(){function t(e,n,r,i,o){this.connId=e,this.applicationId=r,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=T(this.connId),this.stats_=Oe.getCollection(n),this.connURL=t.connectionURL_(n,i,o)}return t.connectionURL_=function(t,e,n){var r={v:"5"};return!s.isNodeSdk()&&"undefined"!==typeof location&&location.href&&-1!==location.href.indexOf("firebaseio.com")&&(r.r="f"),e&&(r.s=e),n&&(r.ls=n),t.connectionURL("websocket",r)},t.prototype.open=function(t,e){var n=this;this.onDisconnect=e,this.onMessage=t,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,p.set("previous_websocket_failure",!0);try{if(s.isNodeSdk()){var i=s.CONSTANTS.NODE_ADMIN?"AdminNode":"Node",o={headers:{"User-Agent":"Firebase/5/"+Be+"/"+r.platform+"/"+i,"X-Firebase-GMPID":this.applicationId||""}},a=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}),u=0===this.connURL.indexOf("wss://")?a.HTTPS_PROXY||a.https_proxy:a.HTTP_PROXY||a.http_proxy;u&&(o.proxy={origin:u}),this.mySock=new ze(this.connURL,[],o)}else{o={headers:{"X-Firebase-GMPID":this.applicationId||""}};this.mySock=new ze(this.connURL,[],o)}}catch(l){this.log_("Error instantiating WebSocket.");var c=l.message||l.data;return c&&this.log_(c),void this.onClosed_()}this.mySock.onopen=function(){n.log_("Websocket connected."),n.everConnected_=!0}
2,this.mySock.onclose=function(){n.log_("Websocket connection was disconnected."),n.mySock=null,n.onClosed_()},this.mySock.onmessage=function(t){n.handleIncomingFrame(t)},this.mySock.onerror=function(t){n.log_("WebSocket error. Closing connection.");var e=t.message||t.data;e&&n.log_(e),n.onClosed_()}},t.prototype.start=function(){},t.forceDisallow=function(){t.forceDisallow_=!0},t.isAvailable=function(){var e=!1;if("undefined"!==typeof navigator&&navigator.userAgent){var n=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);n&&n.length>1&&parseFloat(n[1])<4.4&&(e=!0)}return!e&&null!==ze&&!t.forceDisallow_},t.previouslyFailed=function(){return p.isInMemoryStorage||!0===p.get("previous_websocket_failure")},t.prototype.markConnectionHealthy=function(){p.remove("previous_websocket_failure")},t.prototype.appendFrame_=function(t){if(this.frames.push(t),this.frames.length===this.totalFrames){var e=this.frames.join("");this.frames=null;var n=s.jsonEval(e);this.onMessage(n)}},t.prototype.handleNewFrameCount_=function(t){this.totalFrames=t,this.frames=[]},t.prototype.extractFrameCount_=function(t){if(s.assert(null===this.frames,"We already have a frame buffer"),t.length<=6){var e=Number(t);if(!isNaN(e))return this.handleNewFrameCount_(e),null}return this.handleNewFrameCount_(1),t},t.prototype.handleIncomingFrame=function(t){if(null!==this.mySock){var e=t.data;if(this.bytesReceived+=e.length,this.stats_.incrementCounter("bytes_received",e.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(e);else{var n=this.extractFrameCount_(e);null!==n&&this.appendFrame_(n)}}},t.prototype.send=function(t){this.resetKeepAlive();var e=s.stringify(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);var n=D(e,16384);n.length>1&&this.sendString_(String(n.length));for(var r=0;r<n.length;r++)this.sendString_(n[r])},t.prototype.shutdown_=function(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)},t.prototype.onClosed_=function(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))},t.prototype.close=function(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())},t.prototype.resetKeepAlive=function(){var t=this;clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval((function(){t.mySock&&t.sendString_("0"),t.resetKeepAlive()}),Math.floor(45e3))},t.prototype.sendString_=function(t){try{this.mySock.send(t)}catch(e){this.log_("Exception thrown from WebSocket.send():",e.message||e.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}},t.responsesRequiredToBeHealthy=2,t.healthyTimeout=3e4,t}(),He=function(){function t(t){this.initTransports_(t)}return Object.defineProperty(t,"ALL_TRANSPORTS",{get:function(){return[Ve,We]},enumerable:!1,configurable:!0}),t.prototype.initTransports_=function(e){var n,r,i=We&&We.isAvailable(),o=i&&!We.previouslyFailed();if(e.webSocketOnly&&(i||C("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),o=!0),o)this.transports_=[We];else{var s=this.transports_=[];try{for(var u=a.__values(t.ALL_TRANSPORTS),c=u.next();!c.done;c=u.next()){var l=c.value;l&&l.isAvailable()&&s.push(l)}}catch(h){n={error:h}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}},t.prototype.initialTransport=function(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")},t.prototype.upgradeTransport=function(){return this.transports_.length>1?this.transports_[1]:null},t}(),Ke=function(){function t(t,e,n,r,i,o,a,s){this.id=t,this.repoInfo_=e,this.applicationId_=n,this.onMessage_=r,this.onReady_=i,this.onDisconnect_=o,this.onKill_=a,this.lastSessionId=s,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=T("c:"+this.id+":"),this.transportManager_=new He(e),this.log_("Connection created"),this.start_()}return t.prototype.start_=function(){var t=this,e=this.transportManager_.initialTransport();this.conn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,void 0,this.lastSessionId),this.primaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.conn_),r=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout((function(){t.conn_&&t.conn_.open(n,r)}),Math.floor(0));var i=e.healthyTimeout||0;i>0&&(this.healthyTimeout_=V((function(){t.healthyTimeout_=null,t.isHealthy_||(t.conn_&&t.conn_.bytesReceived>
2102400?(t.log_("Connection exceeded healthy timeout but has received "+t.conn_.bytesReceived+" bytes. Marking connection healthy."),t.isHealthy_=!0,t.conn_.markConnectionHealthy()):t.conn_&&t.conn_.bytesSent>10240?t.log_("Connection exceeded healthy timeout but has sent "+t.conn_.bytesSent+" bytes. Leaving connection alive."):(t.log_("Closing unhealthy connection after timeout."),t.close()))}),Math.floor(i)))},t.prototype.nextTransportId_=function(){return"c:"+this.id+":"+this.connectionCount++},t.prototype.disconnReceiver_=function(t){var e=this;return function(n){t===e.conn_?e.onConnectionLost_(n):t===e.secondaryConn_?(e.log_("Secondary connection lost."),e.onSecondaryConnectionLost_()):e.log_("closing an old connection")}},t.prototype.connReceiver_=function(t){var e=this;return function(n){2!==e.state_&&(t===e.rx_?e.onPrimaryMessageReceived_(n):t===e.secondaryConn_?e.onSecondaryMessageReceived_(n):e.log_("message on old connection"))}},t.prototype.sendRequest=function(t){var e={t:"d",d:t};this.sendData_(e)},t.prototype.tryCleanupConnection=function(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)},t.prototype.onSecondaryControl_=function(t){if("t"in t){var e=t.t;"a"===e?this.upgradeIfSecondaryHealthy_():"r"===e?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===e&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}},t.prototype.onSecondaryMessageReceived_=function(t){var e=P("t",t),n=P("d",t);if("c"===e)this.onSecondaryControl_(n);else{if("d"!==e)throw new Error("Unknown protocol layer: "+e);this.pendingDataMessages.push(n)}},t.prototype.upgradeIfSecondaryHealthy_=function(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:"p",d:{}}}))},t.prototype.proceedWithUpgrade_=function(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()},t.prototype.onPrimaryMessageReceived_=function(t){var e=P("t",t),n=P("d",t);"c"===e?this.onControl_(n):"d"===e&&this.onDataMessage_(n)},t.prototype.onDataMessage_=function(t){this.onPrimaryResponse_(),this.onMessage_(t)},t.prototype.onPrimaryResponse_=function(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))},t.prototype.onControl_=function(t){var e=P("t",t);if("d"in t){var n=t.d;if("h"===e)this.onHandshake_(n);else if("n"===e){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(var r=0;r<this.pendingDataMessages.length;++r)this.onDataMessage_(this.pendingDataMessages[r]);this.pendingDataMessages=[],this.tryCleanupConnection()}else"s"===e?this.onConnectionShutdown_(n):"r"===e?this.onReset_(n):"e"===e?S("Server Error: "+n):"o"===e?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):S("Unknown control packet command: "+e)}},t.prototype.onHandshake_=function(t){var e=t.ts,n=t.v,r=t.h;this.sessionId=t.s,this.repoInfo_.updateHost(r),0===this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,e),"5"!==n&&C("Protocol version mismatch detected"),this.tryStartUpgrade_())},t.prototype.tryStartUpgrade_=function(){var t=this.transportManager_.upgradeTransport();t&&this.startUpgrade_(t)},t.prototype.startUpgrade_=function(t){var e=this;this.secondaryConn_=new t(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.sessionId),this.secondaryResponsesRequired_=t.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.secondaryConn_),r=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,r),V((function(){e.secondaryConn_&&(e.log_("Timed out trying to upgrade."),e.secondaryConn_.close())}),Math.floor(6e4))},t.prototype.onReset_=function(t){this.log_("Reset packet received. New host: "+t),this.repoInfo_.updateHost(t),1===this.state_?this.close():(this.closeConnections_(),this.start_())},t.prototype.onConnectionEstablished_=function(t,e){var n=this;this.log_("Realtime connection established."),this.conn_=t,this.state_=1,this.onReady_&&(this.onReady_(e,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):V((function(){n.sendPingOnPrimaryIfNecessary_()}),Math.floor(5e3))},t.prototype.sendPingOnPrimaryIfNecessary_=function(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))},t.prototype.onSecondaryConnectionLost_=function(){var t=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==t&&this.rx_!==t||this.close()},t.prototype.onConnectionLost_=function(t){this.conn_=null,t||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(p.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()},t.prototype.onConnectionShutdown_=function(t){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(t),this.onKill_=null),this.onDisconnect_=null,this.close()},t.prototype.sendData_=function(t){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(t)},t.prototype.close=function(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))},t.prototype.closeConnections_=function(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)},t}(),Ge=function(){function t(){}return t.prototype.put=function(t,e,n,r){},t.prototype.merge=function(t,e,n,r){},t.prototype.refreshAuthToken=function(t){},t.prototype.onDisconnectPut=function(t,e,n){},t.prototype.onDisconnectMerge=function(t,e,n){},t.prototype.onDisconnectCancel=function(t,e){},t.prototype.reportStats=function(t){},t}(),Qe=function(t){function e(n,r,i,o,a,u,c){var l=t.call(this)||this;if(l.repoInfo_=n,l.applicationId_=r,l.onDataUpdate_=i,l.onConnectStatus_=o,l.onServerInfoUpdate_=a,l.authTokenProvider_=u,l.authOverride_=c,l.id=e.nextPersistentConnectionId_++,l.log_=T("p:"+l.id+":"),l.interruptReasons_={},l.listens=new Map,l.outstandingPuts_=[],l.outstandingPutCount_=0,l.onDisconnectRequestQueue_=[],l.connected_=!1,l.reconnectDelay_=1e3,l.maxReconnectDelay_=3e5,l.securityDebugCallback_=null,l.lastSessionId=null,l.establishConnectionTimer_=null,l.visible_=!1,l.requestCBHash_={},l.requestNumber_=0,l.realtime_=null,l.authToken_=null,l.forceTokenRefresh_=!1,l.invali
2dAuthTokenCount_=0,l.firstConnection_=!0,l.lastConnectionAttemptTime_=null,l.lastConnectionEstablishedTime_=null,c&&!s.isNodeSdk())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");return l.scheduleConnect_(0),je.getInstance().on("visible",l.onVisible_,l),-1===n.host.indexOf("fblocal")&&Fe.getInstance().on("online",l.onOnline_,l),l}return a.__extends(e,t),e.prototype.sendRequest=function(t,e,n){var r=++this.requestNumber_,i={r:r,a:t,b:e};this.log_(s.stringify(i)),s.assert(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)},e.prototype.listen=function(t,e,n,r){var i=t.queryIdentifier(),o=t.path.toString();this.log_("Listen called for "+o+" "+i),this.listens.has(o)||this.listens.set(o,new Map),s.assert(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"listen() called for non-default but complete query"),s.assert(!this.listens.get(o).has(i),"listen() called twice for same path/queryId.");var a={onComplete:r,hashFn:e,query:t,tag:n};this.listens.get(o).set(i,a),this.connected_&&this.sendListen_(a)},e.prototype.sendListen_=function(t){var n=this,r=t.query,i=r.path.toString(),o=r.queryIdentifier();this.log_("Listen on "+i+" for "+o);var a={p:i};t.tag&&(a.q=r.queryObject(),a.t=t.tag),a.h=t.hashFn(),this.sendRequest("q",a,(function(a){var s=a.d,u=a.s;e.warnOnListenWarnings_(s,r),(n.listens.get(i)&&n.listens.get(i).get(o))===t&&(n.log_("listen response",a),"ok"!==u&&n.removeListen_(i,o),t.onComplete&&t.onComplete(u,s))}))},e.warnOnListenWarnings_=function(t,e){if(t&&"object"===typeof t&&s.contains(t,"w")){var n=s.safeGet(t,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){var r='".indexOn": "'+e.getQueryParams().getIndex().toString()+'"',i=e.path.toString();C("Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding "+r+" at "+i+" to your security rules for better performance.")}}},e.prototype.refreshAuthToken=function(t){this.authToken_=t,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},(function(){})),this.reduceReconnectDelayIfAdminCredential_(t)},e.prototype.reduceReconnectDelayIfAdminCredential_=function(t){(t&&40===t.length||s.isAdmin(t))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=3e4)},e.prototype.tryAuth=function(){var t=this;if(this.connected_&&this.authToken_){var e=this.authToken_,n=s.isValidFormat(e)?"auth":"gauth",r={cred:e};null===this.authOverride_?r.noauth=!0:"object"===typeof this.authOverride_&&(r.authvar=this.authOverride_),this.sendRequest(n,r,(function(n){var r=n.s,i=n.d||"error";t.authToken_===e&&("ok"===r?t.invalidAuthTokenCount_=0:t.onAuthRevoked_(r,i))}))}},e.prototype.unlisten=function(t,e){var n=t.path.toString(),r=t.queryIdentifier();this.log_("Unlisten called for "+n+" "+r),s.assert(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,t.queryObject(),e)},e.prototype.sendUnlisten_=function(t,e,n,r){this.log_("Unlisten on "+t+" for "+e);var i={p:t};r&&(i.q=n,i.t=r),this.sendRequest("n",i)},e.prototype.onDisconnectPut=function(t,e,n){this.connected_?this.sendOnDisconnect_("o",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"o",data:e,onComplete:n})},e.prototype.onDisconnectMerge=function(t,e,n){this.connected_?this.sendOnDisconnect_("om",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"om",data:e,onComplete:n})},e.prototype.onDisconnectCancel=function(t,e){this.connected_?this.sendOnDisconnect_("oc",t,null,e):this.onDisconnectRequestQueue_.push({pathString:t,action:"oc",data:null,onComplete:e})},e.prototype.sendOnDisconnect_=function(t,e,n,r){var i={p:e,d:n};this.log_("onDisconnect "+t,i),this.sendRequest(t,i,(function(t){r&&setTimeout((function(){r(t.s,t.d)}),Math.floor(0))}))},e.prototype.put=function(t,e,n,r){this.putInternal("p",t,e,n,r)},e.prototype.merge=function(t,e,n,r){this.putInternal("m",t,e,n,r)},e.prototype.putInternal=function(t,e,n,r,i){var o={p:e,d:n};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:t,request:o,onComplete:r}),this.outstandingPutCount_++;var a=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(a):this.log_("Buffering put: "+e)},e.prototype.sendPut_=function(t){var e=this,n=this.outstandingPuts_[t].action,r=this.outstandingPuts_[t].request,i=this.outstandingPuts_[t].onComplete;this.outstandingPuts_[t].queued=this.connected_,this.sendRequest(n,r,(function(r){e.log_(n+" response",r),delete e.outstandingPuts_[t],e.outstandingPutCount_--,0===e.outstandingPutCount_&&(e.outstandingPuts_=[]),i&&i(r.s,r.d)}))},e.prototype.reportStats=function(t){var e=this;if(this.connected_){var n={c:t};this.log_("reportStats",n),this.sendRequest("s",n,(function(t){if("ok"!==t.s){var n=t.d;e.log_("reportStats","Error sending stats: "+n)}}))}},e.prototype.onDataMessage_=function(t){if("r"in t){this.log_("from server: "+s.stringify(t));var e=t.r,n=this.requestCBHash_[e];n&&(delete this.requestCBHash_[e],n(t.b))}else{if("error"in t)throw"A server-side error has occurred: "+t.error;"a"in t&&this.onDataPush_(t.a,t.b)}},e.prototype.onDataPush_=function(t,e){this.log_("handleServerMessage",t,e),"d"===t?this.onDataUpdate_(e.p,e.d,!1,e.t):"m"===t?this.onDataUpdate_(e.p,e.d,!0,e.t):"c"===t?this.onListenRevoked_(e.p,e.q):"ac"===t?this.onAuthRevoked_(e.s,e.d):"sd"===t?this.onSecurityDebugPacket_(e):S("Unrecognized action received from server: "+s.stringify(t)+"\nAre you using the latest client?")},e.prototype.onReady_=function(t,e){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(t),this.lastSessionId=e,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)},e.prototype.scheduleConnect_=function(t){var e=this;s.assert(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout((function(){e.establishConnectionTimer_=null,e.establishConnection_()}),Math.floor(t))},e.prototype.onVisible_=function(t){t&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=1e3,this.realtime_||this.scheduleConnect_(0)),this.visible_=t},e.prototype.onOnline_=function(t){t?(this.log_("Browser went online."),this.reconnectDelay_=1e3,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())},e.prototype.onRealtimeDisconnect_=function(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){if(this.visible_){if(this.lastConnectionEstablishedTime_){(new Date).getTime()-this.lastConnectionEstablishedTime_>3e4&&(this.reconnectDelay_=1e3),this.lastConnectionEstablishedTime_=null}}else this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime();var t=(new Date).getTime()-this.lastConnectionAttemptTime_,e=Math.max(0,this.reconnectDelay_-t);
2e=Math.random()*e,this.log_("Trying to reconnect in "+e+"ms"),this.scheduleConnect_(e),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)},e.prototype.establishConnection_=function(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=(new Date).getTime(),this.lastConnectionEstablishedTime_=null;var t=this.onDataMessage_.bind(this),n=this.onReady_.bind(this),r=this.onRealtimeDisconnect_.bind(this),i=this.id+":"+e.nextConnectionId_++,o=this,a=this.lastSessionId,u=!1,c=null,l=function(){c?c.close():(u=!0,r())};this.realtime_={close:l,sendRequest:function(t){s.assert(c,"sendRequest call when we're not connected not allowed."),c.sendRequest(t)}};var h=this.forceTokenRefresh_;this.forceTokenRefresh_=!1,this.authTokenProvider_.getToken(h).then((function(e){u?E("getToken() completed but was canceled"):(E("getToken() completed. Creating connection."),o.authToken_=e&&e.accessToken,c=new Ke(i,o.repoInfo_,o.applicationId_,t,n,r,(function(t){C(t+" ("+o.repoInfo_.toString()+")"),o.interrupt("server_kill")}),a))})).then(null,(function(t){o.log_("Failed to get token: "+t),u||(s.CONSTANTS.NODE_ADMIN&&C(t),l())}))}},e.prototype.interrupt=function(t){E("Interrupting connection for reason: "+t),this.interruptReasons_[t]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())},e.prototype.resume=function(t){E("Resuming connection for reason: "+t),delete this.interruptReasons_[t],s.isEmpty(this.interruptReasons_)&&(this.reconnectDelay_=1e3,this.realtime_||this.scheduleConnect_(0))},e.prototype.handleTimestamp_=function(t){var e=t-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:e})},e.prototype.cancelSentTransactions_=function(){for(var t=0;t<this.outstandingPuts_.length;t++){var e=this.outstandingPuts_[t];e&&"h"in e.request&&e.queued&&(e.onComplete&&e.onComplete("disconnect"),delete this.outstandingPuts_[t],this.outstandingPutCount_--)}0===this.outstandingPutCount_&&(this.outstandingPuts_=[])},e.prototype.onListenRevoked_=function(t,e){var n;n=e?e.map((function(t){return R(t)})).join("$"):"default";var r=this.removeListen_(t,n);r&&r.onComplete&&r.onComplete("permission_denied")},e.prototype.removeListen_=function(t,e){var n,r=new q(t).toString();if(this.listens.has(r)){var i=this.listens.get(r);n=i.get(e),i.delete(e),0===i.size&&this.listens.delete(r)}else n=void 0;return n},e.prototype.onAuthRevoked_=function(t,e){E("Auth token revoked: "+t+"/"+e),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==t&&"permission_denied"!==t||(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))},e.prototype.onSecurityDebugPacket_=function(t){this.securityDebugCallback_?this.securityDebugCallback_(t):"msg"in t&&console.log("FIREBASE: "+t.msg.replace("\n","\nFIREBASE: "))},e.prototype.restoreState_=function(){var t,e,n,r;this.tryAuth();try{for(var i=a.__values(this.listens.values()),o=i.next();!o.done;o=i.next()){var s=o.value;try{for(var u=(n=void 0,a.__values(s.values())),c=u.next();!c.done;c=u.next()){var l=c.value;this.sendListen_(l)}}catch(p){n={error:p}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(d){t={error:d}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}for(var h=0;h<this.outstandingPuts_.length;h++)this.outstandingPuts_[h]&&this.sendPut_(h);for(;this.onDisconnectRequestQueue_.length;){var f=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(f.action,f.pathString,f.data,f.onComplete)}},e.prototype.sendConnectStats_=function(){var t={},e="js";s.CONSTANTS.NODE_ADMIN?e="admin_node":s.CONSTANTS.NODE_CLIENT&&(e="node"),t["sdk."+e+"."+Be.replace(/\./g,"-")]=1,s.isMobileCordova()?t["framework.cordova"]=1:s.isReactNative()&&(t["framework.reactnative"]=1),this.reportStats(t)},e.prototype.shouldReconnect_=function(){var t=Fe.getInstance().currentlyOnline();return s.isEmpty(this.interruptReasons_)&&t},e.nextPersistentConnectionId_=0,e.nextConnectionId_=0,e}(Ge),$e=function(t){function e(e,n,r){var i=t.call(this)||this;return i.repoInfo_=e,i.onDataUpdate_=n,i.authTokenProvider_=r,i.log_=T("p:rest:"),i.listens_={},i}return a.__extends(e,t),e.prototype.reportStats=function(t){throw new Error("Method not implemented.")},e.getListenId_=function(t,e){return void 0!==e?"tag$"+e:(s.assert(t.getQueryParams().isDefault(),"should have a tag if it's not a default query."),t.path.toString())},e.prototype.listen=function(t,n,r,i){var o=this,a=t.path.toString();this.log_("Listen called for "+a+" "+t.queryIdentifier());var u=e.getListenId_(t,r),c={};this.listens_[u]=c;var l=t.getQueryParams().toRestQueryStringParameters();this.restRequest_(a+".json",l,(function(t,e){var n=e;(404===t&&(n=null,t=null),null===t&&o.onDataUpdate_(a,n,!1,r),s.safeGet(o.listens_,u)===c)&&i(t?401===t?"permission_denied":"rest_error:"+t:"ok",null)}))},e.prototype.unlisten=function(t,n){var r=e.getListenId_(t,n);delete this.listens_[r]},e.prototype.refreshAuthToken=function(t){},e.prototype.restRequest_=function(t,e,n){var r=this;void 0===e&&(e={}),e.format="export",this.authTokenProvider_.getToken(!1).then((function(i){var o=i&&i.accessToken;o&&(e.auth=o);var a=(r.repoInfo_.secure?"https://":"http://")+r.repoInfo_.host+t+"?ns="+r.repoInfo_.namespace+s.querystring(e);r.log_("Sending REST request for "+a);var u=new XMLHttpRequest;u.onreadystatechange=function(){if(n&&4===u.readyState){r.log_("REST Response for "+a+" received. status:",u.status,"response:",u.responseText);var t=null;if(u.status>=200&&u.status<300){try{t=s.jsonEval(u.responseText)}catch(e){C("Failed to parse JSON response for "+a+": "+u.responseText)}n(null,t)}else 401!==u.status&&404!==u.status&&C("Got unsuccessful REST response for "+a+" Status: "+u.status),n(u.status);n=null}},u.open("GET",a,!0),u.send()}))},e}(Ge),Xe=function(){function t(t,e,n,r){var i=this;if(this.repoInfo_=t,this.app=n,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new De,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=new ie,this.persistentConnection_=null,this.stats_=Oe.getCollection(t),e||("object"===typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0)this.server_=new $e(this.repoInfo_,this.onDataUpdate_.bind(this),r),setTimeout(this.onConnectStatus_.bind(this,!0),0);else{var o=n.options.databaseAuthVariableOverride;if("undefined"!==typeof o&&null!==o){if("object"!==typeof o)throw new Error("Only objects are supported for option databaseAuthVariableOverride");
2try{s.stringify(o)}catch(a){throw new Error("Invalid authOverride provided: "+a)}}this.persistentConnection_=new Qe(this.repoInfo_,n.options.appId,this.onDataUpdate_.bind(this),this.onConnectStatus_.bind(this),this.onServerInfoUpdate_.bind(this),r,o),this.server_=this.persistentConnection_}r.addTokenChangeListener((function(t){i.server_.refreshAuthToken(t)})),this.statsReporter_=Oe.getOrCreateReporter(t,(function(){return new Re(i.stats_,i.server_)})),this.transactionsInit_(),this.infoData_=new Ne,this.infoSyncTree_=new xe({startListening:function(t,e,n,r){var o=[],a=i.infoData_.getNode(t.path);return a.isEmpty()||(o=i.infoSyncTree_.applyServerOverwrite(t.path,a),setTimeout((function(){r("ok")}),0)),o},stopListening:function(){}}),this.updateInfo_("connected",!1),this.serverSyncTree_=new xe({startListening:function(t,e,n,r){return i.server_.listen(t,n,e,(function(e,n){var o=r(e,n);i.eventQueue_.raiseEventsForChangedPath(t.path,o)})),[]},stopListening:function(t,e){i.server_.unlisten(t,e)}})}return t.prototype.toString=function(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host},t.prototype.name=function(){return this.repoInfo_.namespace},t.prototype.serverTime=function(){var t=this.infoData_.getNode(new q(".info/serverTimeOffset")).val()||0;return(new Date).getTime()+t},t.prototype.generateServerValues=function(){return(t=(t={timestamp:this.serverTime()})||{}).timestamp=t.timestamp||(new Date).getTime(),t;var t},t.prototype.onDataUpdate_=function(t,e,n,r){this.dataUpdateCount++;var i=new q(t);e=this.interceptServerDataCallback_?this.interceptServerDataCallback_(t,e):e;var o=[];if(r)if(n){var a=s.map(e,(function(t){return Ut(t)}));o=this.serverSyncTree_.applyTaggedQueryMerge(i,a,r)}else{var u=Ut(e);o=this.serverSyncTree_.applyTaggedQueryOverwrite(i,u,r)}else if(n){var c=s.map(e,(function(t){return Ut(t)}));o=this.serverSyncTree_.applyServerMerge(i,c)}else{var l=Ut(e);o=this.serverSyncTree_.applyServerOverwrite(i,l)}var h=i;o.length>0&&(h=this.rerunTransactions_(i)),this.eventQueue_.raiseEventsForChangedPath(h,o)},t.prototype.interceptServerData_=function(t){this.interceptServerDataCallback_=t},t.prototype.onConnectStatus_=function(t){this.updateInfo_("connected",t),!1===t&&this.runOnDisconnectEvents_()},t.prototype.onServerInfoUpdate_=function(t){var e=this;L(t,(function(t,n){e.updateInfo_(t,n)}))},t.prototype.updateInfo_=function(t,e){var n=new q("/.info/"+t),r=Ut(e);this.infoData_.updateSnapshot(n,r);var i=this.infoSyncTree_.applyServerOverwrite(n,r);this.eventQueue_.raiseEventsForChangedPath(n,i)},t.prototype.getNextWriteId_=function(){return this.nextWriteId_++},t.prototype.setWithPriority=function(t,e,n,r){var i=this;this.log_("set",{path:t.toString(),value:e,priority:n});var o=this.generateServerValues(),a=Ut(e,n),s=this.serverSyncTree_.calcCompleteEventCache(t),u=ee(a,s,o),c=this.getNextWriteId_(),l=this.serverSyncTree_.applyUserOverwrite(t,u,c,!0);this.eventQueue_.queueEvents(l),this.server_.put(t.toString(),a.val(!0),(function(e,n){var o="ok"===e;o||C("set at "+t+" failed: "+e);var a=i.serverSyncTree_.ackUserWrite(c,!o);i.eventQueue_.raiseEventsForChangedPath(t,a),i.callOnCompleteCallback(r,e,n)}));var h=this.abortTransactions_(t);this.rerunTransactions_(h),this.eventQueue_.raiseEventsForChangedPath(h,[])},t.prototype.update=function(t,e,n){var r=this;this.log_("update",{path:t.toString(),value:e});var i=!0,o=this.generateServerValues(),a={};if(L(e,(function(e,n){i=!1,a[e]=te(t.child(e),Ut(n),r.serverSyncTree_,o)})),i)E("update() called with empty data. Don't do anything."),this.callOnCompleteCallback(n,"ok");else{var s=this.getNextWriteId_(),u=this.serverSyncTree_.applyUserMerge(t,a,s);this.eventQueue_.queueEvents(u),this.server_.merge(t.toString(),e,(function(e,i){var o="ok"===e;o||C("update at "+t+" failed: "+e);var a=r.serverSyncTree_.ackUserWrite(s,!o),u=a.length>0?r.rerunTransactions_(t):t;r.eventQueue_.raiseEventsForChangedPath(u,a),r.callOnCompleteCallback(n,e,i)})),L(e,(function(e){var n=r.abortTransactions_(t.child(e));r.rerunTransactions_(n)})),this.eventQueue_.raiseEventsForChangedPath(t,[])}},t.prototype.runOnDisconnectEvents_=function(){var t=this;this.log_("onDisconnectEvents");var e=this.generateServerValues(),n=new ie;this.onDisconnect_.forEachTree(q.Empty,(function(r,i){var o=te(r,i,t.serverSyncTree_,e);n.remember(r,o)}));var r=[];
2n.forEachTree(q.Empty,(function(e,n){r=r.concat(t.serverSyncTree_.applyServerOverwrite(e,n));var i=t.abortTransactions_(e);t.rerunTransactions_(i)})),this.onDisconnect_=new ie,this.eventQueue_.raiseEventsForChangedPath(q.Empty,r)},t.prototype.onDisconnectCancel=function(t,e){var n=this;this.server_.onDisconnectCancel(t.toString(),(function(r,i){"ok"===r&&n.onDisconnect_.forget(t),n.callOnCompleteCallback(e,r,i)}))},t.prototype.onDisconnectSet=function(t,e,n){var r=this,i=Ut(e);this.server_.onDisconnectPut(t.toString(),i.val(!0),(function(e,o){"ok"===e&&r.onDisconnect_.remember(t,i),r.callOnCompleteCallback(n,e,o)}))},t.prototype.onDisconnectSetWithPriority=function(t,e,n,r){var i=this,o=Ut(e,n);this.server_.onDisconnectPut(t.toString(),o.val(!0),(function(e,n){"ok"===e&&i.onDisconnect_.remember(t,o),i.callOnCompleteCallback(r,e,n)}))},t.prototype.onDisconnectUpdate=function(t,e,n){var r=this;if(s.isEmpty(e))return E("onDisconnect().update() called with empty data. Don't do anything."),void this.callOnCompleteCallback(n,"ok");this.server_.onDisconnectMerge(t.toString(),e,(function(i,o){"ok"===i&&L(e,(function(e,n){var i=Ut(n);r.onDisconnect_.remember(t.child(e),i)})),r.callOnCompleteCallback(n,i,o)}))},t.prototype.addEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.infoSyncTree_.addEventRegistration(t,e):this.serverSyncTree_.addEventRegistration(t,e),this.eventQueue_.raiseEventsAtPath(t.path,n)},t.prototype.removeEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.infoSyncTree_.removeEventRegistration(t,e):this.serverSyncTree_.removeEventRegistration(t,e),this.eventQueue_.raiseEventsAtPath(t.path,n)},t.prototype.interrupt=function(){this.persistentConnection_&&this.persistentConnection_.interrupt("repo_interrupt")},t.prototype.resume=function(){this.persistentConnection_&&this.persistentConnection_.resume("repo_interrupt")},t.prototype.stats=function(t){if(void 0===t&&(t=!1),"undefined"!==typeof console){var e;t?(this.statsListener_||(this.statsListener_=new Pe(this.stats_)),e=this.statsListener_.get()):e=this.stats_.get();var n=Object.keys(e).reduce((function(t,e){return Math.max(e.length,t)}),0);L(e,(function(t,e){for(var r=t,i=t.length;i<n+2;i++)r+=" ";console.log(r+e)}))}},t.prototype.statsIncrementCounter=function(t){this.stats_.incrementCounter(t),this.statsReporter_.includeStat(t)},t.prototype.log_=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="";this.persistentConnection_&&(n=this.persistentConnection_.id+":"),E.apply(void 0,a.__spread([n],t))},t.prototype.callOnCompleteCallback=function(t,e,n){t&&U((function(){if("ok"===e)t(null);else{var r=(e||"error").toUpperCase(),i=r;n&&(i+=": "+n);var o=new Error(i);o.code=r,t(o)}}))},Object.defineProperty(t.prototype,"database",{get:function(){return this.__database||(this.__database=new cn(this))},enumerable:!1,configurable:!0}),t}(),Ye=function(){function t(e){this.indexedFilter_=new ye(e.getIndex()),this.index_=e.getIndex(),this.startPost_=t.getStartPost_(e),this.endPost_=t.getEndPost_(e)}return t.prototype.getStartPost=function(){return this.startPost_},t.prototype.getEndPost=function(){return this.endPost_},t.prototype.matches=function(t){return this.index_.compare(this.getStartPost(),t)<=0&&this.index_.compare(t,this.getEndPost())<=0},t.prototype.updateChild=function(t,e,n,r,i,o){return this.matches(new pt(e,n))||(n=jt.EMPTY_NODE),this.indexedFilter_.updateChild(t,e,n,r,i,o)},t.prototype.updateFullNode=function(t,e,n){e.isLeafNode()&&(e=jt.EMPTY_NODE);var r=e.withIndex(this.index_);r=r.updatePriority(jt.EMPTY_NODE);var i=this;return e.forEachChild(It,(function(t,e){i.matches(new pt(t,e))||(r=r.updateImmediateChild(t,jt.EMPTY_NODE))})),this.indexedFilter_.updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.indexedFilter_},t.prototype.getIndex=function(){return this.index_},t.getStartPost_=function(t){if(t.hasStart()){var e=t.getIndexStartName();return t.getIndex().makePost(t.getIndexStartValue(),e)}return t.getIndex().minPost()},t.getEndPost_=function(t){if(t.hasEnd()){var e=t.getIndexEndName();return t.getIndex().makePost(t.getIndexEndValue(),e)}return t.getIndex().maxPost()},t}
2(),Je=function(){function t(t){this.rangedFilter_=new Ye(t),this.index_=t.getIndex(),this.limit_=t.getLimit(),this.reverse_=!t.isViewFromLeft()}return t.prototype.updateChild=function(t,e,n,r,i,o){return this.rangedFilter_.matches(new pt(e,n))||(n=jt.EMPTY_NODE),t.getImmediateChild(e).equals(n)?t:t.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(t,e,n,r,i,o):this.fullLimitUpdateChild_(t,e,n,i,o)},t.prototype.updateFullNode=function(t,e,n){var r;if(e.isLeafNode()||e.isEmpty())r=jt.EMPTY_NODE.withIndex(this.index_);else if(2*this.limit_<e.numChildren()&&e.isIndexed(this.index_)){r=jt.EMPTY_NODE.withIndex(this.index_);var i=void 0;i=this.reverse_?e.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):e.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);for(var o=0;i.hasNext()&&o<this.limit_;){var a=i.getNext();if(!(this.reverse_?this.index_.compare(this.rangedFilter_.getStartPost(),a)<=0:this.index_.compare(a,this.rangedFilter_.getEndPost())<=0))break;r=r.updateImmediateChild(a.name,a.node),o++}}else{r=(r=e.withIndex(this.index_)).updatePriority(jt.EMPTY_NODE);var s=void 0,u=void 0,c=void 0;i=void 0;if(this.reverse_){i=r.getReverseIterator(this.index_),s=this.rangedFilter_.getEndPost(),u=this.rangedFilter_.getStartPost();var l=this.index_.getCompare();c=function(t,e){return l(e,t)}}else i=r.getIterator(this.index_),s=this.rangedFilter_.getStartPost(),u=this.rangedFilter_.getEndPost(),c=this.index_.getCompare();o=0;for(var h=!1;i.hasNext();){a=i.getNext();!h&&c(s,a)<=0&&(h=!0),h&&o<this.limit_&&c(a,u)<=0?o++:r=r.updateImmediateChild(a.name,jt.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.rangedFilter_.getIndexedFilter()},t.prototype.getIndex=function(){return this.index_},t.prototype.fullLimitUpdateChild_=function(t,e,n,r,i){var o;if(this.reverse_){var a=this.index_.getCompare();o=function(t,e){return a(e,t)}}else o=this.index_.getCompare();var u=t;s.assert(u.numChildren()===this.limit_,"");var c=new pt(e,n),l=this.reverse_?u.getFirstChild(this.index_):u.getLastChild(this.index_),h=this.rangedFilter_.matches(c);if(u.hasChild(e)){for(var f=u.getImmediateChild(e),p=r.getChildAfterChild(this.index_,l,this.reverse_);null!=p&&(p.name===e||u.hasChild(p.name));)p=r.getChildAfterChild(this.index_,p,this.reverse_);var d=null==p?1:o(p,c);if(h&&!n.isEmpty()&&d>=0)return null!=i&&i.trackChildChange(ve.childChangedChange(e,n,f)),u.updateImmediateChild(e,n);null!=i&&i.trackChildChange(ve.childRemovedChange(e,f));var v=u.updateImmediateChild(e,jt.EMPTY_NODE);return null!=p&&this.rangedFilter_.matches(p)?(null!=i&&i.trackChildChange(ve.childAddedChange(p.name,p.node)),v.updateImmediateChild(p.name,p.node)):v}return n.isEmpty()?t:h&&o(l,c)>=0?(null!=i&&(i.trackChildChange(ve.childRemovedChange(l.name,l.node)),i.trackChildChange(ve.childAddedChange(e,n))),u.updateImmediateChild(e,n).updateImmediateChild(l.name,jt.EMPTY_NODE)):t},t}(),Ze=function(){function t(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=It}return t.prototype.hasStart=function(){return this.startSet_},t.prototype.isViewFromLeft=function(){return""===this.viewFrom_?this.startSet_:this.viewFrom_===t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT},t.prototype.getIndexStartValue=function(){return s.assert(this.startSet_,"Only valid if start has been set"),this.indexStartValue_},t.prototype.getIndexStartName=function(){return s.assert(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:x},t.prototype.hasEnd=function(){return this.endSet_},t.prototype.getIndexEndValue=function(){return s.assert(this.endSet_,"Only valid if end has been set"),this.indexEndValue_},t.prototype.getIndexEndName=function(){return s.assert(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:N},t.prototype.hasLimit=function(){return this.limitSet_},t.prototype.hasAnchoredLimit=function(){return this.limitSet_&&""!==this.viewFrom_},t.prototype.getLimit=function(){return s.assert(this.limitSet_,"Only valid if limit has been set"),this.limit_},t.prototype.getIndex=function(){return this.index_},t.prototype.copy_=function(){var e=new t;return e.limitSet_=this.limitSet_,e.limit_=this.limit_,e.startSet_=this.startSet_,e.indexStartValue_=this.indexStartValue_,e.startNameSet_=this.startNameSet_,e.indexStartName_=this.indexStartName_,e.endSet_=this.endSet_,e.indexEndValue_=this.indexEndValue_,e.endNameSet_=this.endNameSet_,e.indexEndName_=this.indexEndName_,e.index_=this.index_,e.viewFrom_=this.viewFrom_,e},t.prototype.limit=function(t){var e=this.copy_();return e.limitSet_=!0,e.limit_=t,e.viewFrom_="",e},t.prototype.limitToFirst=function(e){var n=this.copy_();return n.limitSet_=!0,n.limit_=e,n.viewFrom_=t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT,n},t.prototype.limitToLast=function(e){var n=this.copy_();return n.limitSet_=!0,n.limit_=e,n.viewFrom_=t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT,n},t.prototype.startAt=function(t,e){var n=this.copy_();return n.startSet_=!0,void 0===t&&(t=null),n.indexStartValue_=t,null!=e?(n.startNameSet_=!0,n.indexStartName_=e):(n.startNameSet_=!1,n.indexStartName_=""),n},t.prototype.endAt=function(t,e){var n=this.copy_();return n.endSet_=!0,void 0===t&&(t=null),n.indexEndValue_=t,void 0!==e?(n.endNameSet_=!0,n.indexEndName_=e):(n.endNameSet_=!1,n.indexEndName_=""),n},t.prototype.orderBy=function(t){var e=this.copy_();return e.index_=t,e},t.prototype.getQueryObject=function(){var e=t.WIRE_PROTOCOL_CONSTANTS_,n={};
2if(this.startSet_&&(n[e.INDEX_START_VALUE]=this.indexStartValue_,this.startNameSet_&&(n[e.INDEX_START_NAME]=this.indexStartName_)),this.endSet_&&(n[e.INDEX_END_VALUE]=this.indexEndValue_,this.endNameSet_&&(n[e.INDEX_END_NAME]=this.indexEndName_)),this.limitSet_){n[e.LIMIT]=this.limit_;var r=this.viewFrom_;""===r&&(r=this.isViewFromLeft()?e.VIEW_FROM_LEFT:e.VIEW_FROM_RIGHT),n[e.VIEW_FROM]=r}return this.index_!==It&&(n[e.INDEX]=this.index_.toString()),n},t.prototype.loadsAllData=function(){return!(this.startSet_||this.endSet_||this.limitSet_)},t.prototype.isDefault=function(){return this.loadsAllData()&&this.index_===It},t.prototype.getNodeFilter=function(){return this.loadsAllData()?new ye(this.getIndex()):this.hasLimit()?new Je(this):new Ye(this)},t.prototype.toRestQueryStringParameters=function(){var e,n=t.REST_QUERY_CONSTANTS_,r={};return this.isDefault()||(this.index_===It?e=n.PRIORITY_INDEX:this.index_===qt?e=n.VALUE_INDEX:this.index_===yt?e=n.KEY_INDEX:(s.assert(this.index_ instanceof Bt,"Unrecognized index type!"),e=this.index_.toString()),r[n.ORDER_BY]=s.stringify(e),this.startSet_&&(r[n.START_AT]=s.stringify(this.indexStartValue_),this.startNameSet_&&(r[n.START_AT]+=","+s.stringify(this.indexStartName_))),this.endSet_&&(r[n.END_AT]=s.stringify(this.indexEndValue_),this.endNameSet_&&(r[n.END_AT]+=","+s.stringify(this.indexEndName_))),this.limitSet_&&(this.isViewFromLeft()?r[n.LIMIT_TO_FIRST]=this.limit_:r[n.LIMIT_TO_LAST]=this.limit_)),r},t.WIRE_PROTOCOL_CONSTANTS_={INDEX_START_VALUE:"sp",INDEX_START_NAME:"sn",INDEX_END_VALUE:"ep",INDEX_END_NAME:"en",LIMIT:"l",VIEW_FROM:"vf",VIEW_FROM_LEFT:"l",VIEW_FROM_RIGHT:"r",INDEX:"i"},t.REST_QUERY_CONSTANTS_={ORDER_BY:"orderBy",PRIORITY_INDEX:"$priority",VALUE_INDEX:"$value",KEY_INDEX:"$key",START_AT:"startAt",END_AT:"endAt",LIMIT_TO_FIRST:"limitToFirst",LIMIT_TO_LAST:"limitToLast"},t.DEFAULT=new t,t}(),tn=function(t){function e(e,n){if(!(e instanceof Xe))throw new Error("new Reference() no longer supported - use app.database().");return t.call(this,e,n,Ze.DEFAULT,!1)||this}return a.__extends(e,t),e.prototype.getKey=function(){return s.validateArgCount("Reference.key",0,0,arguments.length),this.path.isEmpty()?null:this.path.getBack()},e.prototype.child=function(t){return s.validateArgCount("Reference.child",1,1,arguments.length),"number"===typeof t?t=String(t):t instanceof q||(null===this.path.getFront()?at("Reference.child",1,t,!1):ot("Reference.child",1,t,!1)),new e(this.repo,this.path.child(t))},e.prototype.getParent=function(){s.validateArgCount("Reference.parent",0,0,arguments.length);var t=this.path.parent();return null===t?null:new e(this.repo,t)},e.prototype.getRoot=function(){s.validateArgCount("Reference.root",0,0,arguments.length);for(var t=this;null!==t.getParent();)t=t.getParent();return t},e.prototype.databaseProp=function(){return this.repo.database},e.prototype.set=function(t,e){s.validateArgCount("Reference.set",1,2,arguments.length),st("Reference.set",this.path),Z("Reference.set",1,t,this.path,!1),s.validateCallback("Reference.set",2,e,!0);var n=new s.Deferred;return this.repo.setWithPriority(this.path,t,null,n.wrapCallback(e)),n.promise},e.prototype.update=function(t,e){if(s.validateArgCount("Reference.update",1,2,arguments.length),st("Reference.update",this.path),Array.isArray(t)){for(var n={},r=0;r<t.length;++r)n[""+r]=t[r];t=n,C("Passing an Array to Firebase.update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}et("Reference.update",1,t,this.path,!1),s.validateCallback("Reference.update",2,e,!0);var i=new s.Deferred;return this.repo.update(this.path,t,i.wrapCallback(e)),i.promise},e.prototype.setWithPriority=function(t,e,n){if(s.validateArgCount("Reference.setWithPriority",2,3,arguments.length),st("Reference.setWithPriority",this.path),Z("Reference.setWithPriority",1,t,this.path,!1),nt("Reference.setWithPriority",2,e,!1),s.validateCallback("Reference.setWithPriority",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.setWithPriority failed: "+this.getKey()+" is a read-only object.";var r=new s.Deferred;return this.repo.setWithPriority(this.path,t,e,r.wrapCallback(n)),r.promise},e.prototype.remove=function(t){return s.validateArgCount("Reference.remove",0,1,arguments.length),st("Reference.remove",this.path),s.validateCallback("Reference.remove",1,t,!0),this.set(null,t)},e.prototype.transaction=function(t,e,n){if(s.validateArgCount("Reference.transaction",1,3,arguments.length),st("Reference.transaction",this.path),s.validateCallback("Reference.transaction",1,t,!1),s.validateCallback("Reference.transaction",2,e,!0),ct("Reference.transaction",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.transaction failed: "+this.getKey()+" is a read-only object.";void 0===n&&(n=!0);var r=new s.Deferred;"function"===typeof e&&r.promise.catch((function(){}));var i=function(t,n,i){t?r.reject(t):r.resolve(new ht(n,i)),"function"===typeof e&&e(t,n,i)};return this.repo.startTransaction(this.path,t,i,n),r.promise},e.prototype.setPriority=function(t,e){s.validateArgCount("Reference.setPriority",1,2,arguments.length),st("Reference.setPriority",this.path),nt("Reference.setPriority",1,t,!1),s.validateCallback("Reference.setPriority",2,e,!0);var n=new s.Deferred;return this.repo.setWithPriority(this.path.child(".priority"),t,null,n.wrapCallback(e)),n.promise},e.prototype.push=function(t,e){s.validateArgCount("Reference.push",0,2,arguments.length),st("Reference.push",this.path),Z("Reference.push",1,t,this.path,!0),s.validateCallback("Reference.push",2,e,!0);var n,r=this.repo.serverTime(),i=ft(r),o=this.child(i),a=this.child(i);return n=null!=t?o.set(t,e).then((function(){return a})):Promise.resolve(a),o.then=n.then.bind(n),o.catch=n.then.bind(n,void 0),"function"===typeof e&&n.catch((function(){})),o},e.prototype.onDisconnect=function(){return st("Reference.onDisconnect",this.path),new lt(this.repo,this.path)},Object.defineProperty(e.prototype,"database",{get:function(){return this.databaseProp()}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"key",{get:function(){return this.getKey()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this.getParent()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this.getRoot()},enumerable:!1,configurable:!0}),e}(Qt);Qt.__referenceConstructor=tn,Se.__referenceConstructor=tn;var en,nn=function(){this.children={},this.childCount=0,this.value=null},rn=function(){function t(t,e,n){void 0===t&&(t=""),void 0===e&&(e=null),void 0===n&&(n=new nn),this.name_=t,this.parent_=e,this.node_=n}return t.prototype.subTree=function(e){for(var n=e instanceof q?e:new q(e),r=this,i=n.getFront();null!==i;){r=new t(i,r,s.safeGet(r.node_.children,i)||new nn),i=(n=n.popFront()).getFront()}return r},t.prototype.getValue=function(){return this.node_.value},t.prototype.setValue=function(t){s.assert("undefined"!==typeof t,"Cannot set value to undefined"),this.node_.value=t,this.updateParents_()},t.prototype.clear=function(){this.node_.value=null,this.node_.children={},this.node_.childCount=0,this.updateParents_()},t.prototype.hasChildren=function(){return this.node_.childCount>0},t.prototype.isEmpty=function(){return null===this.getValue()&&!this.hasChildren()},t.prototype.forEachChild=function(e){var n=this;L(this.node_.children,(function(r,i){e(new t(r,n,i))}))},t.prototype.forEachDescendant=function(t,e,n){e&&!n&&t(this),this.forEachChild((function(e){e.forEachDescendant(t,!0,n)})),e&&n&&t(this)},t.prototype.forEachAncestor=function(t,e){for(var n=e?this:this.parent();null!==n;){if(t(n))return!0;n=n.parent()}return!1},t.prototype.forEachImmediateDescendantWithValue=function(t){this.forEachChild((function(e){null!==e.getValue()?t(e):e.forEachImmediateDescendantWithValue(t)}))},t.prototype.path=function(){return new q(null===this.parent_?this.name_:this.parent_.path()+"/"+this.name_)},t.prototype.name=function(){return this.name_},t.prototype.parent=function(){return this.parent_},t.prototype.updateParents_=function(){null!==this.parent_&&this.parent_.updateChild_(this.name_,this)},t.prototype.updateChild_=function(t,e){var n=e.isEmpty(),r=s.contains(this.node_.children,t);n&&r?(delete this.node_.children[t],this.node_.childCount--,this.updateParents_()):n||r||(this.node_.children[t]=e.node_,this.node_.childCount++,this.updateParents_())},t}();!function(t){t[t.RUN=0]="RUN",t[t.SENT=1]="SENT",t[t.COMPLETED=2]="COMPLETED",t[t.SENT_NEEDS_ABORT=3]="SENT_NEEDS_ABORT",t[t.NEEDS_ABORT=4]="NEEDS_ABORT"}(en||(en={})),Xe.MAX_TRANSACTION_RETRIES_=25,Xe.prototype.transactionsInit_=function(){this.transactionQueueTree_=new rn},Xe.prototype.startTransaction=function(t,e,n,r){this.log_("transaction on "+t);var i=function(){},o=new tn(this,t);o.on("value",i);var a={path:t,update:e,onComplete:n,status:null,order:y(),applyLocally:r,retryCount:0,unwatcher:function(){o.off("value",i)},abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},u=this.getLatestState_(t);a.currentInputSnapshot=u;var c=a.update(u.val());if(void 0===c){if(a.unwatcher(),a.currentOutputSnapshotRaw=null,a.currentOutputSnapshotResolved=null,a.onComplete){var l=new zt(a.currentInputSnapshot,new tn(this,a.path),It);a.onComplete(null,!1,l)}}else{tt("transaction failed: Data returned ",c,a.path),a.status=en.RUN;var h=this.transactionQueueTree_.subTree(t),f=h.getValue()||[];f.push(a),h.setValue(f);var p=void 0;if("object"===typeof c&&null!==c&&s.contains(c,".priority"))p=s.safeGet(c,".priority"),s.assert(J(p),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.");else p=(this.serverSyncTree_.calcCompleteEventCache(t)||jt.EMPTY_NODE).getPriority().val();p=p;var d=this.generateServerValues(),v=Ut(c,p),g=ee(v,u,d);a.currentOutputSnapshotRaw=v,a.currentOutputSnapshotResolved=g,a.currentWriteId=this.getNextWriteId_();var m=this.serverSyncTree_.applyUserOverwrite(t,g,a.currentWriteId,a.applyLocally);this.eventQueue_.raiseEventsForChangedPath(t,m),this.sendReadyTransactions_()}},Xe.prototype.getLatestState_=function(t,e){return this.serverSyncTree_.calcCompleteEventCache(t,e)||jt.EMPTY_NODE},Xe.prototype.sendReadyTransactions_=function(t){var e=this;if(void 0===t&&(t=this.transactionQueueTree_),t||this.pruneCompletedTransactionsBelowNode_(t),null!==t.getValue()){var n=this.buildTransactionQueue_(t);s.assert(n.length>0,"Sending zero length transaction queue"),n.every((function(t){return t.status===e
2n.RUN}))&&this.sendTransactionQueue_(t.path(),n)}else t.hasChildren()&&t.forEachChild((function(t){e.sendReadyTransactions_(t)}))},Xe.prototype.sendTransactionQueue_=function(t,e){for(var n=this,r=e.map((function(t){return t.currentWriteId})),i=this.getLatestState_(t,r),o=i,a=i.hash(),u=0;u<e.length;u++){var c=e[u];s.assert(c.status===en.RUN,"tryToSendTransactionQueue_: items in queue should all be run."),c.status=en.SENT,c.retryCount++;var l=q.relativePath(t,c.path);o=o.updateChild(l,c.currentOutputSnapshotRaw)}var h=o.val(!0),f=t;this.server_.put(f.toString(),h,(function(r){n.log_("transaction put response",{path:f.toString(),status:r});var i=[];if("ok"===r){for(var o=[],a=0;a<e.length;a++){if(e[a].status=en.COMPLETED,i=i.concat(n.serverSyncTree_.ackUserWrite(e[a].currentWriteId)),e[a].onComplete){var s=e[a].currentOutputSnapshotResolved,u=new tn(n,e[a].path),c=new zt(s,u,It);o.push(e[a].onComplete.bind(null,null,!0,c))}e[a].unwatcher()}n.pruneCompletedTransactionsBelowNode_(n.transactionQueueTree_.subTree(t)),n.sendReadyTransactions_(),n.eventQueue_.raiseEventsForChangedPath(t,i);for(a=0;a<o.length;a++)U(o[a])}else{if("datastale"===r)for(a=0;a<e.length;a++)e[a].status===en.SENT_NEEDS_ABORT?e[a].status=en.NEEDS_ABORT:e[a].status=en.RUN;else{C("transaction at "+f.toString()+" failed: "+r);for(a=0;a<e.length;a++)e[a].status=en.NEEDS_ABORT,e[a].abortReason=r}n.rerunTransactions_(t)}}),a)},Xe.prototype.rerunTransactions_=function(t){var e=this.getAncestorTransactionNode_(t),n=e.path(),r=this.buildTransactionQueue_(e);return this.rerunTransactionQueue_(r,n),n},Xe.prototype.rerunTransactionQueue_=function(t,e){if(0!==t.length){for(var n,r=[],i=[],o=t.filter((function(t){return t.status===en.RUN})).map((function(t){return t.currentWriteId})),a=0;a<t.length;a++){var u=t[a],c=q.relativePath(e,u.path),l=!1,h=void 0;if(s.assert(null!==c,"rerunTransactionsUnderNode_: relativePath should not be null."),u.status===en.NEEDS_ABORT)l=!0,h=u.abortReason,i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else if(u.status===en.RUN)if(u.retryCount>=Xe.MAX_TRANSACTION_RETRIES_)l=!0,h="maxretry",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else{var f=this.getLatestState_(u.path,o);u.currentInputSnapshot=f;var p=t[a].update(f.val());if(void 0!==p){tt("transaction failed: Data returned ",p,u.path);var d=Ut(p);"object"===typeof p&&null!=p&&s.contains(p,".priority")||(d=d.updatePriority(f.getPriority()));var v=u.currentWriteId,y=this.generateServerValues(),g=ee(d,f,y);u.currentOutputSnapshotRaw=d,u.currentOutputSnapshotResolved=g,u.currentWriteId=this.getNextWriteId_(),o.splice(o.indexOf(v),1),i=(i=i.concat(this.serverSyncTree_.applyUserOverwrite(u.path,g,u.currentWriteId,u.applyLocally))).concat(this.serverSyncTree_.ackUserWrite(v,!0))}else l=!0,h="nodata",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0))}if(this.eventQueue_.raiseEventsForChangedPath(e,i),i=[],l&&(t[a].status=en.COMPLETED,n=t[a].unwatcher,setTimeout(n,Math.floor(0)),t[a].onComplete))if("nodata"===h){var m=new tn(this,t[a].path),b=t[a].currentInputSnapshot,_=new zt(b,m,It);r.push(t[a].onComplete.bind(null,null,!1,_))}else r.push(t[a].onComplete.bind(null,new Error(h),!1,null))}this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);for(a=0;a<r.length;a++)U(r[a]);this.sendReadyTransactions_()}},Xe.prototype.getAncestorTransactionNode_=function(t){var e,n=this.transactionQueueTree_;for(e=t.getFront();null!==e&&null===n.getValue();)n=n.subTree(e),e=(t=t.popFront()).getFront();return n},Xe.prototype.buildTransactionQueue_=function(t){var e=[];return this.aggregateTransactionQueuesForNode_(t,e),e.sort((function(t,e){return t.order-e.order})),e},Xe.prototype.aggregateTransactionQueuesForNode_=function(t,e){var n=this,r=t.getValue();if(null!==r)for(var i=0;i<r.length;i++)e.push(r[i]);t.forEachChild((function(t){n.aggregateTransactionQueuesForNode_(t,e)}))},Xe.prototype.pruneCompletedTransactionsBelowNode_=function(t){var e=this,n=t.getValue();if(n){for(var r=0,i=0;i<n.length;i++)n[i].status!==en.COMPLETED&&(n[r]=n[i],r++);n.length=r,t.setValue(n.length>0?n:null)}t.forEachChild((function(t){e.pruneCompletedTransactionsBelowNode_(t)}))},Xe.prototype.abortTransactions_=function(t){var e=this,n=this.getAncestorTransactionNode_(t).path(),r=this.transactionQueueTree_.subTree(t);return r.forEachAncestor((function(t){e.abortTransactionsOnNode_(t)})),this.abortTransactionsOnNode_(r),r.forEachDescendant((function(t){e.abortTransactionsOnNode_(t)})),n},Xe.prototype.abortTransactionsOnNode_=function(t){var e=t.getValue();if(null!==e){for(var n=[],r=[],i=-1,o=0;o<e.length;
2o++)if(e[o].status===en.SENT_NEEDS_ABORT);else if(e[o].status===en.SENT)s.assert(i===o-1,"All SENT items should be at beginning of queue."),i=o,e[o].status=en.SENT_NEEDS_ABORT,e[o].abortReason="set";else if(s.assert(e[o].status===en.RUN,"Unexpected transaction status in abort"),e[o].unwatcher(),r=r.concat(this.serverSyncTree_.ackUserWrite(e[o].currentWriteId,!0)),e[o].onComplete){n.push(e[o].onComplete.bind(null,new Error("set"),!1,null))}-1===i?t.setValue(null):e.length=i+1,this.eventQueue_.raiseEventsForChangedPath(t.path(),r);for(o=0;o<n.length;o++)U(n[o])}};var on,an=function(){function t(t,e){var n=this;this.app_=t,this.authProvider_=e,this.auth_=null,this.auth_=e.getImmediate({optional:!0}),this.auth_||e.get().then((function(t){return n.auth_=t}))}return t.prototype.getToken=function(t){return this.auth_?this.auth_.getToken(t).catch((function(t){return t&&"auth/token-not-initialized"===t.code?(E("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(t)})):Promise.resolve(null)},t.prototype.addTokenChangeListener=function(t){this.auth_?this.auth_.addAuthTokenListener(t):(setTimeout((function(){return t(null)}),0),this.authProvider_.get().then((function(e){return e.addAuthTokenListener(t)})))},t.prototype.removeTokenChangeListener=function(t){this.authProvider_.get().then((function(e){return e.removeAuthTokenListener(t)}))},t.prototype.notifyForInvalidToken=function(){var t='Provided authentication credentials for the app named "'+this.app_.name+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.app_.options?t+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.app_.options?t+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':t+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',C(t)},t}(),sn=function(){function t(){}return t.prototype.getToken=function(e){return Promise.resolve({accessToken:t.EMULATOR_AUTH_TOKEN})},t.prototype.addTokenChangeListener=function(e){e(t.EMULATOR_AUTH_TOKEN)},t.prototype.removeTokenChangeListener=function(t){},t.prototype.notifyForInvalidToken=function(){},t.EMULATOR_AUTH_TOKEN="owner",t}(),un=function(){function t(){this.repos_={},this.useRestClient_=!1}return t.getInstance=function(){return on||(on=new t),on},t.prototype.interrupt=function(){var t,e,n,r;try{for(var i=a.__values(Object.keys(this.repos_)),o=i.next();!o.done;o=i.next()){var s=o.value;try{for(var u=(n=void 0,a.__values(Object.keys(this.repos_[s]))),c=u.next();!c.done;c=u.next()){var l=c.value;this.repos_[s][l].interrupt()}}catch(h){n={error:h}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(f){t={error:f}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}},t.prototype.resume=function(){var t,e,n,r;try{for(var i=a.__values(Object.keys(this.repos_)),o=i.next();!o.done;o=i.next()){var s=o.value;try{for(var u=(n=void 0,a.__values(Object.keys(this.repos_[s]))),c=u.next();!c.done;c=u.next()){var l=c.value;this.repos_[s][l].resume()}}catch(h){n={error:h}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(f){t={error:f}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}},t.prototype.databaseFromApp=function(t,e,n){var i=n||t.options.databaseURL;void 0===i&&I("Can't determine Firebase Database URL. Be sure to include databaseURL option when calling firebase.initializeApp().");var o,a=K(i),u=a.repoInfo,c=void 0;"undefined"!==typeof r&&(c=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).FIREBASE_DATABASE_EMULATOR_HOST),c?(o=!0,i="http://"+c+"?ns="+u.namespace,u=(a=K(i)).repoInfo):o=!a.repoInfo.secure;var l=s.CONSTANTS.NODE_ADMIN&&o?new sn:new an(t,e);return ut("Invalid Firebase Database URL",1,a),a.path.isEmpty()||I("Database URL must point to the root of a Firebase Database (not including a child path)."),this.createRepo(u,t,l).database},t.prototype.deleteRepo=function(t){var e=s.safeGet(this.repos_,t.app.name);e&&s.safeGet(e,t.repoInfo_.toURLString())===t||I("Database "+t.app.name+"("+t.repoInfo_+") has already been deleted."),t.interrupt(),delete e[t.repoInfo_.toURLString()]},t.prototype.createRepo=function(t,e,n){var r=s.safeGet(this.repos_,e.name);r||(r={},this.repos_[e.name]=r);var i=s.safeGet(r,t.toURLString());return i&&I("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),i=new Xe(t,this.useRestClient_,e,n),r[t.toURLString()]=i,i},t.prototype.forceRestClient=function(t){this.useRestClient_=t},t}(),cn=function(){function t(t){this.repo_=t,t instanceof Xe||I("Don't call new Database() directly - please use firebase.database()."),this.root_=new tn(t,q.Empty),this.INTERNAL=new ln(this)}return Object.defineProperty(t.prototype,"app",{get:function(){return this.repo_.app}
2,enumerable:!1,configurable:!0}),t.prototype.ref=function(t){return this.checkDeleted_("ref"),s.validateArgCount("database.ref",0,1,arguments.length),t instanceof tn?this.refFromURL(t.toString()):void 0!==t?this.root_.child(t):this.root_},t.prototype.refFromURL=function(t){var e="database.refFromURL";this.checkDeleted_(e),s.validateArgCount(e,1,1,arguments.length);var n=K(t);ut(e,1,n);var r=n.repoInfo;return r.host!==this.repo_.repoInfo_.host&&I(e+": Host name does not match the current database: (found "+r.host+" but expected "+this.repo_.repoInfo_.host+")"),this.ref(n.path.toString())},t.prototype.checkDeleted_=function(t){null===this.repo_&&I("Cannot call "+t+" on a deleted database.")},t.prototype.goOffline=function(){s.validateArgCount("database.goOffline",0,0,arguments.length),this.checkDeleted_("goOffline"),this.repo_.interrupt()},t.prototype.goOnline=function(){s.validateArgCount("database.goOnline",0,0,arguments.length),this.checkDeleted_("goOnline"),this.repo_.resume()},t.ServerValue={TIMESTAMP:{".sv":"timestamp"},increment:function(t){return{".sv":{increment:t}}}},t}(),ln=function(){function t(t){this.database=t}return t.prototype.delete=function(){return a.__awaiter(this,void 0,void 0,(function(){return a.__generator(this,(function(t){return this.database.checkDeleted_("delete"),un.getInstance().deleteRepo(this.database.repo_),this.database.repo_=null,this.database.root_=null,this.database.INTERNAL=null,this.database=null,[2]}))}))},t}(),hn=Object.freeze({__proto__:null,forceLongPolling:function(){We.forceDisallow(),Ve.forceAllow()},forceWebSockets:function(){Ve.forceDisallow()},isWebSocketsAvailable:function(){return We.isAvailable()},setSecurityDebugCallback:function(t,e){t.repo.persistentConnection_.securityDebugCallback_=e},stats:function(t,e){t.repo.stats(e)},statsIncrementCounter:function(t,e){t.repo.statsIncrementCounter(e)},dataUpdateCount:function(t){return t.repo.dataUpdateCount},interceptServerData:function(t,e){return t.repo.interceptServerData_(e)}}),fn=Qe;Qe.prototype.simpleListen=function(t,e){this.sendRequest("q",{p:t},e)},Qe.prototype.echo=function(t,e){this.sendRequest("echo",{d:t},e)};var pn=Ke,dn=z,vn=Object.freeze({__proto__:null,DataConnection:fn,RealTimeConnection:pn,hijackHash:function(t){var e=Qe.prototype.put;return Qe.prototype.put=function(n,r,i,o){void 0!==o&&(o=t()),e.call(this,n,r,i,o)},function(){Qe.prototype.put=e}},ConnectionTarget:dn,queryIdentifier:function(t){return t.queryIdentifier()},forceRestClient:function(t){un.getInstance().forceRestClient(t)}}),yn=cn.ServerValue;function gn(e){!function(t){Be=t}(e.SDK_VERSION);var n=e.INTERNAL.registerComponent(new c.Component("database",(function(t,e){var n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal");return un.getInstance().databaseFromApp(n,r,e)}),"PUBLIC").setServiceProps({Reference:tn,Query:Qt,Database:cn,DataSnapshot:zt,enableLogging:w,INTERNAL:hn,ServerValue:yn,TEST_ACCESS:vn}).setMultipleInstances(!0));e.registerVersion("@firebase/database","0.6.8"),s.isNodeSdk()&&(t.exports=n)}gn(o),e.DataSnapshot=zt,e.Database=cn,e.OnDisconnect=lt,e.Query=Qt,e.Reference=tn,e.ServerValue=yn,e.enableLogging=w,e.registerDatabase=gn}).call(this,n(31))},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(1),o=(r=n(4))&&"object"==typeof r&&"default"in r?r.default:r,a=n(15),s=n(9),u=n(50),c=n(7),l=o.SDK_VERSION,h=new a.Logger("@firebase/firestore");function f(){return h.logLevel}function p(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(h.logLevel<=a.LogLevel.DEBUG){var r=e.map(v);h.debug.apply(h,i.__spreadArrays(["Firestore ("+l+"): "+t],r))}}function d(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(h.logLevel<=a.LogLevel.ERROR){var r=e.map(v);h.error.apply(h,i.__spreadArrays(["Firestore ("+l+"): "+t],r))}}function v(t){if("string"==typeof t)return t;try{return e=t,JSON.stringify(e)}catch(e){return t}var e}function y(t){void 0===t&&(t="Unexpected state");var e="FIRESTORE ("+l+") INTERNAL ASSERTION FAILED: "+t;throw d(e),new Error(e)}function g(t,e){t||y()}function m(t,e){return t}function b(t){var e="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e)e.getRandomValues(n);else for(var r=0;r<t;
2r++)n[r]=Math.floor(256*Math.random());return n}var _=function(){function t(){}return t.t=function(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e=Math.floor(256/t.length)*t.length,n="";n.length<20;)for(var r=b(40),i=0;i<r.length;++i)n.length<20&&r[i]<e&&(n+=t.charAt(r[i]%t.length));return n},t}();function w(t,e){return t<e?-1:t>e?1:0}function E(t,e,n){return t.length===e.length&&t.every((function(t,r){return n(t,e[r])}))}function T(t){return t+"\0"}var S=function(t,e,n,r,i){this.s=t,this.persistenceKey=e,this.host=n,this.ssl=r,this.forceLongPolling=i},I=function(){function t(t,e){this.projectId=t,this.database=e||"(default)"}return Object.defineProperty(t.prototype,"i",{get:function(){return"(default)"===this.database},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return e instanceof t&&e.projectId===this.projectId&&e.database===this.database},t.prototype.o=function(t){return w(this.projectId,t.projectId)||w(this.database,t.database)},t}();function C(t){var e=0;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function k(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function x(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}var N=function(){function t(t,e){this.h=t,this.u=e,this.l={}}return t.prototype.get=function(t){var e=this.h(t),n=this.l[e];if(void 0!==n)for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];if(this.u(a,t))return s}},t.prototype.has=function(t){return void 0!==this.get(t)},t.prototype.set=function(t,e){var n=this.h(t),r=this.l[n];if(void 0!==r){for(var i=0;i<r.length;i++)if(this.u(r[i][0],t))return void(r[i]=[t,e]);r.push([t,e])}else this.l[n]=[[t,e]]},t.prototype.delete=function(t){var e=this.h(t),n=this.l[e];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(this.u(n[r][0],t))return 1===n.length?delete this.l[e]:n.splice(r,1),!0;return!1},t.prototype.forEach=function(t){k(this.l,(function(e,n){for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];t(a,s)}}))},t.prototype._=function(){return x(this.l)},t}(),A={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},O=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).code=e,r.message=n,r.name="FirebaseError",r.toString=function(){return r.name+": [code="+r.code+"]: "+r.message},r}return i.__extends(e,t),e}(Error),P=function(){function t(t,e){if(this.seconds=t,this.nanoseconds=e,e<0)throw new O(A.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e>=1e9)throw new O(A.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(t<-62135596800)throw new O(A.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new O(A.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return t.now=function(){return t.fromMillis(Date.now())},t.fromDate=function(e){return t.fromMillis(e.getTime())},t.fromMillis=function(e){var n=Math.floor(e/1e3);return new t(n,1e6*(e-1e3*n))},t.prototype.toDate=function(){return new Date(this.toMillis())},t.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},t.prototype.T=function(t){return this.seconds===t.seconds?w(this.nanoseconds,t.nanoseconds):w(this.seconds,t.seconds)},t.prototype.isEqual=function(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds},t.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},t.prototype.valueOf=function(){var t=this.seconds- -62135596800;return String(t).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")},t}(),R=function(){function t(t){this.timestamp=t}return t.I=function(e){return new t(e)},t.min=function(){return new t(new P(0,0))},t.prototype.o=function(t){return this.timestamp.T(t.timestamp)},t.prototype.isEqual=function(t){return this.timestamp.isEqual(t.timestamp)},t.prototype.m=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},t.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},t.prototype.A=function(){return this.timestamp},t}(),D=function(){function t(t,e,n){void 0===e?e=0:e>t.length&&y(),void 0===n?n=t.length-e:n>t.length-e&&y(),this.segments=t,this.offset=e,this.R=n}return Object.defineProperty(t.prototype,"length",{get:function(){return this.R}
2,enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return 0===t.P(this,e)},t.prototype.child=function(e){var n=this.segments.slice(this.offset,this.limit());return e instanceof t?e.forEach((function(t){n.push(t)})):n.push(e),this.V(n)},t.prototype.limit=function(){return this.offset+this.length},t.prototype.g=function(t){return t=void 0===t?1:t,this.V(this.segments,this.offset+t,this.length-t)},t.prototype.p=function(){return this.V(this.segments,this.offset,this.length-1)},t.prototype.v=function(){return this.segments[this.offset]},t.prototype.S=function(){return this.get(this.length-1)},t.prototype.get=function(t){return this.segments[this.offset+t]},t.prototype._=function(){return 0===this.length},t.prototype.D=function(t){if(t.length<this.length)return!1;for(var e=0;e<this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},t.prototype.C=function(t){if(this.length+1!==t.length)return!1;for(var e=0;e<this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},t.prototype.forEach=function(t){for(var e=this.offset,n=this.limit();e<n;e++)t(this.segments[e])},t.prototype.F=function(){return this.segments.slice(this.offset,this.limit())},t.P=function(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++){var i=t.get(r),o=e.get(r);if(i<o)return-1;if(i>o)return 1}return t.length<e.length?-1:t.length>e.length?1:0},t}(),L=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.V=function(t,n,r){return new e(t,n,r)},e.prototype.N=function(){return this.F().join("/")},e.prototype.toString=function(){return this.N()},e.$=function(t){if(t.indexOf("//")>=0)throw new O(A.INVALID_ARGUMENT,"Invalid path ("+t+"). Paths must not contain // in them.");return new e(t.split("/").filter((function(t){return t.length>0})))},e.k=function(){return new e([])},e}(D),M=/^[_a-zA-Z][_a-zA-Z0-9]*$/,j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.V=function(t,n,r){return new e(t,n,r)},e.M=function(t){return M.test(t)},e.prototype.N=function(){return this.F().map((function(t){return t=t.replace("\\","\\\\").replace("`","\\`"),e.M(t)||(t="`"+t+"`"),t})).join(".")},e.prototype.toString=function(){return this.N()},e.prototype.O=function(){return 1===this.length&&"__name__"===this.get(0)},e.L=function(){return new e(["__name__"])},e.B=function(t){for(var n=[],r="",i=0,o=function(){if(0===r.length)throw new O(A.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");n.push(r),r=""},a=!1;i<t.length;){var s=t[i];if("\\"===s){if(i+1===t.length)throw new O(A.INVALID_ARGUMENT,"Path has trailing escape character: "+t);var u=t[i+1];if("\\"!==u&&"."!==u&&"`"!==u)throw new O(A.INVALID_ARGUMENT,"Path has invalid escape sequence: "+t);r+=u,i+=2}else"`"===s?(a=!a,i++):"."!==s||a?(r+=s,i++):(o(),i++)}if(o(),a)throw new O(A.INVALID_ARGUMENT,"Unterminated ` in path: "+t);return new e(n)},e.k=function(){return new e([])},e}(D),F=function(){function t(t){this.path=t}return t.q=function(e){return new t(L.$(e).g(5))},t.prototype.U=function(t){return this.path.length>=2&&this.path.get(this.path.length-2)===t},t.prototype.isEqual=function(t){return null!==t&&0===L.P(this.path,t.path)},t.prototype.toString=function(){return this.path.toString()},t.P=function(t,e){return L.P(t.path,e.path)},t.W=function(t){return t.length%2==0},t.j=function(e){return new t(new L(e.slice()))},t}();function U(t){return null==t}function V(t){return-0===t&&1/t==-1/0}function q(t){return"number"==typeof t&&Number.isInteger(t)&&!V(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}var B=function(t,e,n,r,i,o,a){void 0===e&&(e=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o=null),void 0===a&&(a=null),this.path=t,this.collectionGroup=e,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=o,this.endAt=a,this.K=null};function z(t,e,n,r,i,o,a){return void 0===e&&(e=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o=null),void 0===a&&(a=null),new B(t,e,n,r,i,o,a)}function W(t){var e=m(t);if(null===e.K){var n=e.path.N();null!==e.collectionGroup&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map((function(t){return function(t){return t.field.N()+t.op.toString()+Lt(t.value)}(t)})).join(","),n+="|ob:",n+=e.orderBy.map((function(t){return(e=t).field.N()+e.dir;var e})).join(","),U(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=_n(e.startAt)),e.endAt&&(n+="|ub:",n+=_n(e.endAt)),e.K=n}return e.K}function H(t,e){if(t.limit!==e.limit)return!1;if(t.orderBy.length!==e.orderBy.length)return!1;for(var n=0;n<t.orderBy.length;n++)if(!In(t.orderBy[n],e.orderBy[n]))return!1;if(t.filters.length!==e.filters.length)return!1;for(var r=0;r<t.filters.length;r++)if(i=t.filters[r],o=e.filters[r],!(i instanceof pn&&o instanceof pn&&i.op===o.op&&i.field.isEqual(o.field)&&Ot(i.value,o.value)))return!1;var i,o;return t.collectionGroup===e.collectionGroup&&!!t.path.isEqual(e.path)&&!!En(t.startAt,e.startAt)&&En(t.endAt,e.endAt)}function K(t){return F.W(t.path)&&null===t.collectionGroup&&0===t.filters.length}var G=function(){function t(t){this.G=t}return t.fromBase64String=function(e){return new t(atob(e))},t.fromUint8Array=function(e){return new t(function(t){for(var e="",n=0;n<t.length;++n)e+=String.fromCharCode(t[n]);return e}(e))},t.prototype.toBase64=function(){return t=this.G,btoa(t);var t},t.prototype.toUint8Array=function(){return function(t){for(var e=new Uint8Array(t.length),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}(this.G)},t.prototype.H=function(){return 2*this.G.length},t.prototype.o=function(t){return w(this.G,t.G)},t.prototype.isEqual=function(t){return this.G===t.G},t}();G.Y=new G("");var Q,$,X=function(){function t(t,e,n,r,i,o,a){void 0===i&&(i=R.min()),void 0===o&&(o=R.min()),void 0===a&&(a=G.Y),this.target=t,this.targetId=e,this.J=n,this.sequenceNumber=r,this.X=i,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=a}return t.prototype.Z=function(e){return new t(this.target,this.targetId,this.J,e,this.X,this.lastLimboFreeSnapshotVersion,this.resumeToken)},t.prototype.tt=function(e,n){return new t(this.target,this.targetId,this.J,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e)},t.prototype.et=function(e){return new t(this.target,this.targetId,this.J,this.sequenceNumber,this.X,e,this.resumeToken)},t}(),Y=function(t){this.count=t};function J(t){switch(t){case A.OK:return y();case A.CANCELLED:case A.UNKNOWN:case A.DEADLINE_EXCEEDED:case A.RESOURCE_EXHAUSTED:case A.INTERNAL:case A.UNAVAILABLE:case A.UNAUTHENTICATED:return!1;case A.INVALID_ARGUMENT:case A.NOT_FOUND:case A.ALREADY_EXISTS:case A.PERMISSION_DENIED:case A.FAILED_PRECONDITION:case A.ABORTED:case A.OUT_OF_RANGE:case A.UNIMPLEMENT
2ED:case A.DATA_LOSS:return!0;default:return y()}}function Z(t){if(void 0===t)return d("GRPC error has no .code"),A.UNKNOWN;switch(t){case Q.OK:return A.OK;case Q.CANCELLED:return A.CANCELLED;case Q.UNKNOWN:return A.UNKNOWN;case Q.DEADLINE_EXCEEDED:return A.DEADLINE_EXCEEDED;case Q.RESOURCE_EXHAUSTED:return A.RESOURCE_EXHAUSTED;case Q.INTERNAL:return A.INTERNAL;case Q.UNAVAILABLE:return A.UNAVAILABLE;case Q.UNAUTHENTICATED:return A.UNAUTHENTICATED;case Q.INVALID_ARGUMENT:return A.INVALID_ARGUMENT;case Q.NOT_FOUND:return A.NOT_FOUND;case Q.ALREADY_EXISTS:return A.ALREADY_EXISTS;case Q.PERMISSION_DENIED:return A.PERMISSION_DENIED;case Q.FAILED_PRECONDITION:return A.FAILED_PRECONDITION;case Q.ABORTED:return A.ABORTED;case Q.OUT_OF_RANGE:return A.OUT_OF_RANGE;case Q.UNIMPLEMENTED:return A.UNIMPLEMENTED;case Q.DATA_LOSS:return A.DATA_LOSS;default:return y()}}($=Q||(Q={}))[$.OK=0]="OK",$[$.CANCELLED=1]="CANCELLED",$[$.UNKNOWN=2]="UNKNOWN",$[$.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",$[$.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",$[$.NOT_FOUND=5]="NOT_FOUND",$[$.ALREADY_EXISTS=6]="ALREADY_EXISTS",$[$.PERMISSION_DENIED=7]="PERMISSION_DENIED",$[$.UNAUTHENTICATED=16]="UNAUTHENTICATED",$[$.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",$[$.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",$[$.ABORTED=10]="ABORTED",$[$.OUT_OF_RANGE=11]="OUT_OF_RANGE",$[$.UNIMPLEMENTED=12]="UNIMPLEMENTED",$[$.INTERNAL=13]="INTERNAL",$[$.UNAVAILABLE=14]="UNAVAILABLE",$[$.DATA_LOSS=15]="DATA_LOSS";var tt=function(){function t(t,e){this.P=t,this.root=e||nt.EMPTY}return t.prototype.nt=function(e,n){return new t(this.P,this.root.nt(e,n,this.P).copy(null,null,nt.st,null,null))},t.prototype.remove=function(e){return new t(this.P,this.root.remove(e,this.P).copy(null,null,nt.st,null,null))},t.prototype.get=function(t){for(var e=this.root;!e._();){var n=this.P(t,e.key);if(0===n)return e.value;n<0?e=e.left:n>0&&(e=e.right)}return null},t.prototype.indexOf=function(t){for(var e=0,n=this.root;!n._();){var r=this.P(t,n.key);if(0===r)return e+n.left.size;r<0?n=n.left:(e+=n.left.size+1,n=n.right)}return-1},t.prototype._=function(){return this.root._()},Object.defineProperty(t.prototype,"size",{get:function(){return this.root.size},enumerable:!1,configurable:!0}),t.prototype.it=function(){return this.root.it()},t.prototype.rt=function(){return this.root.rt()},t.prototype.ot=function(t){return this.root.ot(t)},t.prototype.forEach=function(t){this.ot((function(e,n){return t(e,n),!1}))},t.prototype.toString=function(){var t=[];return this.ot((function(e,n){return t.push(e+":"+n),!1})),"{"+t.join(", ")+"}"},t.prototype.ht=function(t){return this.root.ht(t)},t.prototype.at=function(){return new et(this.root,null,this.P,!1)},t.prototype.ut=function(t){return new et(this.root,t,this.P,!1)},t.prototype.ct=function(){return new et(this.root,null,this.P,!0)},t.prototype.lt=function(t){return new et(this.root,t,this.P,!0)},t}(),et=function(){function t(t,e,n,r){this._t=r,this.ft=[];for(var i=1;!t._();)if(i=e?n(t.key,e):1,r&&(i*=-1),i<0)t=this._t?t.left:t.right;else{if(0===i){this.ft.push(t);break}this.ft.push(t),t=this._t?t.right:t.left}}return t.prototype.dt=function(){var t=this.ft.pop(),e={key:t.key,value:t.value};if(this._t)for(t=t.left;!t._();)this.ft.push(t),t=t.right;else for(t=t.right;!t._();)this.ft.push(t),t=t.left;return e},t.prototype.wt=function(){return this.ft.length>0},t.prototype.Tt=function(){if(0===this.ft.length)return null;var t=this.ft[this.ft.length-1];return{key:t.key,value:t.value}},t}(),nt=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:t.EMPTY,this.right=null!=o?o:t.EMPTY,this.size=this.left.size+1+this.right.size}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype._=function(){return!1},t.prototype.ot=function(t){return this.left.ot(t)||t(this.key,this.value)||this.right.ot(t)},t.prototype.ht=function(t){return this.right.ht(t)||t(this.key,this.value)||this.left.ht(t)},t.prototype.min=function(){return this.left._()?this:this.left.min()},t.prototype.it=function(){return this.min().key},t.prototype.rt=function(){return this.right._()?this.key:this.right.rt()},t.prototype.nt=function(t,e,n){var r=this,i=n(t,r.key);return(r=i<0?r.copy(null,null,null,r.left.nt(t,e,n),null):0===i?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.nt(t,e,n))).Et()},t.prototype.It=function(){if(this.left._())return t.EMPTY;var e=this;return e.left.At()||e.left.left.At()||(e=e.Rt()),(e=e.copy(null,null,null,e.left.It(),null)).Et()},t.prototype.remove=function(e,n){var r,i=this;if(n(e,i.key)<0)i.left._()||i.left.At()||i.left.left.At()||(i=i.Rt()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.At()&&(i=i.Pt()),i.right._()||i.right.At()||i.right.left.At()||(i=i.Vt()),0===n(e,i.key)){if(i.right._())return t.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.It())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.Et()},t.prototype.At=function(){return this.color},t.prototype.Et=function(){var t=this;return t.right.At()&&!t.left.At()&&(t=t.gt()),t.left.At()&&t.left.left.At()&&(t=t.Pt()),t.left.At()&&t.right.At()&&(t=t.yt()),t},t.prototype.Rt=function(){var t=this.yt();return t.right.left.At()&&(t=(t=(t=t.copy(null,null,null,null,t.right.Pt())).gt()).yt()),t},t.prototype.Vt=function(){var t=this.yt();return t.left.left.At()&&(t=(t=t.Pt()).yt()),t},t.prototype.gt=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.Pt=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.yt=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.pt=function(){var t=this.bt();return Math.pow(2,t)<=this.size+1},t.prototype.bt=function(){if(this.At()&&this.left.At())throw y();if(this.right.At())throw y();var t=this.left.bt();if(t!==this.right.bt())throw y();return t+(this.At()?0:1)},t}();
2nt.EMPTY=null,nt.RED=!0,nt.st=!1,nt.EMPTY=new(function(){function t(){this.size=0}return Object.defineProperty(t.prototype,"key",{get:function(){throw y()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){throw y()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){throw y()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){throw y()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){throw y()},enumerable:!1,configurable:!0}),t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.nt=function(t,e,n){return new nt(t,e)},t.prototype.remove=function(t,e){return this},t.prototype._=function(){return!0},t.prototype.ot=function(t){return!1},t.prototype.ht=function(t){return!1},t.prototype.it=function(){return null},t.prototype.rt=function(){return null},t.prototype.At=function(){return!1},t.prototype.pt=function(){return!0},t.prototype.bt=function(){return 0},t}());var rt=function(){function t(t){this.P=t,this.data=new tt(this.P)}return t.prototype.has=function(t){return null!==this.data.get(t)},t.prototype.first=function(){return this.data.it()},t.prototype.last=function(){return this.data.rt()},Object.defineProperty(t.prototype,"size",{get:function(){return this.data.size},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){return this.data.indexOf(t)},t.prototype.forEach=function(t){this.data.ot((function(e,n){return t(e),!1}))},t.prototype.vt=function(t,e){for(var n=this.data.ut(t[0]);n.wt();){var r=n.dt();if(this.P(r.key,t[1])>=0)return;e(r.key)}},t.prototype.St=function(t,e){var n;for(n=void 0!==e?this.data.ut(e):this.data.at();n.wt();)if(!t(n.dt().key))return},t.prototype.Dt=function(t){var e=this.data.ut(t);return e.wt()?e.dt().key:null},t.prototype.at=function(){return new it(this.data.at())},t.prototype.ut=function(t){return new it(this.data.ut(t))},t.prototype.add=function(t){return this.copy(this.data.remove(t).nt(t,!0))},t.prototype.delete=function(t){return this.has(t)?this.copy(this.data.remove(t)):this},t.prototype._=function(){return this.data._()},t.prototype.Ct=function(t){var e=this;return e.size<t.size&&(e=t,t=this),t.forEach((function(t){e=e.add(t)})),e},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.data.at(),r=e.data.at();n.wt();){var i=n.dt().key,o=r.dt().key;if(0!==this.P(i,o))return!1}return!0},t.prototype.F=function(){var t=[];return this.forEach((function(e){t.push(e)})),t},t.prototype.toString=function(){var t=[];return this.forEach((function(e){return t.push(e)})),"SortedSet("+t.toString()+")"},t.prototype.copy=function(e){var n=new t(this.P);return n.data=e,n},t}(),it=function(){function t(t){this.Ft=t}return t.prototype.dt=function(){return this.Ft.dt().key},t.prototype.wt=function(){return this.Ft.wt()},t}(),ot=new tt(F.P);function at(){return ot}function st(){return at()}var ut=new tt(F.P);function ct(){return ut}var lt=new tt(F.P),ht=new rt(F.P);function ft(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=ht,r=0,i=t;r<i.length;r++){var o=i[r];n=n.add(o)}return n}var pt=new rt(w);function dt(){return pt}var vt=function(){function t(t){this.P=t?function(e,n){return t(e,n)||F.P(e.key,n.key)}:function(t,e){return F.P(t.key,e.key)},this.Nt=ct(),this.$t=new tt(this.P)}return t.kt=function(e){return new t(e.P)},t.prototype.has=function(t){return null!=this.Nt.get(t)},t.prototype.get=function(t){return this.Nt.get(t)},t.prototype.first=function(){return this.$t.it()},t.prototype.last=function(){return this.$t.rt()},t.prototype._=function(){return this.$t._()},t.prototype.indexOf=function(t){var e=this.Nt.get(t);return e?this.$t.indexOf(e):-1},Object.defineProperty(t.prototype,"size",{get:function(){return this.$t.size},enumerable:!1,configurable:!0}),t.prototype.forEach=function(t){this.$t.ot((function(e,n){return t(e),!1}))},t.prototype.add=function(t){var e=this.delete(t.key);return e.copy(e.Nt.nt(t.key,t),e.$t.nt(t,null))},t.prototype.delete=function(t){var e=this.get(t);return e?this.copy(this.Nt.remove(t),this.$t.remove(e)):this},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.$t.at(),r=e.$t.at();n.wt();){var i=n.dt().key,o=r.dt().key;if(!i.isEqual(o))return!1}return!0},t.prototype.toString=function(){var t=[];return this.forEach((function(e){t.push(e.toString())})),0===t.length?"DocumentSet ()":"DocumentSet (\n "+t.join(" \n")+"\n)"},t.prototype.copy=function(e,n){var r=new t;return r.P=this.P,r.Nt=e,r.$t=n,r},t}(),yt=function(){function t(){this.xt=new tt(F.P)}return t.prototype.track=function(t){var e=t.doc.key,n=this.xt.get(e);n?0!==t.type&&3===n.type?this.xt=this.xt.nt(e,t):3===t.type&&1!==n.type?this.xt=this.xt.nt(e,{type:n.type,doc:t.doc}):2===t.type&&2===n.type?this.xt=this.xt.nt(e,{type:2,doc:t.doc}):2===t.type&&0===n.type?this.xt=this.xt.nt(e,{type:0,doc:t.doc}):1===t.type&&0===n.type?this.xt=this.xt.remove(e):1===t.type&&2===n.type?this.xt=this.xt.nt(e,{type:1,doc:n.doc}):0===t.type&&1===n.type?this.xt=this.xt.nt(e,{type:2,doc:t.doc}):y():this.xt=this.xt.nt(e,t)},t.prototype.Mt=function(){var t=[];return this.xt.ot((function(e,n){t.push(n)})),t},t}
2(),gt=function(){function t(t,e,n,r,i,o,a,s){this.query=t,this.docs=e,this.Ot=n,this.docChanges=r,this.Lt=i,this.fromCache=o,this.Bt=a,this.qt=s}return t.Ut=function(e,n,r,i){var o=[];return n.forEach((function(t){o.push({type:0,doc:t})})),new t(e,n,vt.kt(n),o,r,i,!0,!1)},Object.defineProperty(t.prototype,"hasPendingWrites",{get:function(){return!this.Lt._()},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){if(!(this.fromCache===t.fromCache&&this.Bt===t.Bt&&this.Lt.isEqual(t.Lt)&&un(this.query,t.query)&&this.docs.isEqual(t.docs)&&this.Ot.isEqual(t.Ot)))return!1;var e=this.docChanges,n=t.docChanges;if(e.length!==n.length)return!1;for(var r=0;r<e.length;r++)if(e[r].type!==n[r].type||!e[r].doc.isEqual(n[r].doc))return!1;return!0},t}(),mt=function(){function t(t,e,n,r,i){this.X=t,this.Qt=e,this.Wt=n,this.jt=r,this.Kt=i}return t.Gt=function(e,n){var r=new Map;return r.set(e,bt.zt(e,n)),new t(R.min(),r,dt(),at(),ft())},t}(),bt=function(){function t(t,e,n,r,i){this.resumeToken=t,this.Ht=e,this.Yt=n,this.Jt=r,this.Xt=i}return t.zt=function(e,n){return new t(G.Y,n,ft(),ft(),ft())},t}(),_t=function(t,e,n,r){this.Zt=t,this.removedTargetIds=e,this.key=n,this.te=r},wt=function(t,e){this.targetId=t,this.ee=e},Et=function(t,e,n,r){void 0===n&&(n=G.Y),void 0===r&&(r=null),this.state=t,this.targetIds=e,this.resumeToken=n,this.cause=r},Tt=function(){function t(){this.ne=0,this.se=Ct(),this.ie=G.Y,this.re=!1,this.oe=!0}return Object.defineProperty(t.prototype,"Ht",{get:function(){return this.re},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resumeToken",{get:function(){return this.ie},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"he",{get:function(){return 0!==this.ne},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ae",{get:function(){return this.oe},enumerable:!1,configurable:!0}),t.prototype.ue=function(t){t.H()>0&&(this.oe=!0,this.ie=t)},t.prototype.ce=function(){var t=ft(),e=ft(),n=ft();return this.se.forEach((function(r,i){switch(i){case 0:t=t.add(r);break;case 2:e=e.add(r);break;case 1:n=n.add(r);break;default:y()}})),new bt(this.ie,this.re,t,e,n)},t.prototype.le=function(){this.oe=!1,this.se=Ct()},t.prototype._e=function(t,e){this.oe=!0,this.se=this.se.nt(t,e)},t.prototype.fe=function(t){this.oe=!0,this.se=this.se.remove(t)},t.prototype.de=function(){this.ne+=1},t.prototype.we=function(){this.ne-=1},t.prototype.Te=function(){this.oe=!0,this.re=!0},t}(),St=function(){function t(t){this.Ee=t,this.Ie=new Map,this.me=at(),this.Ae=It(),this.Re=new rt(w)}return t.prototype.Pe=function(t){for(var e=0,n=t.Zt;e<n.length;e++){var r=n[e];t.te instanceof rn?this.Ve(r,t.te):t.te instanceof on&&this.ge(r,t.key,t.te)}for(var i=0,o=t.removedTargetIds;i<o.length;i++){var a=o[i];this.ge(a,t.key,t.te)}},t.prototype.ye=function(t){var e=this;this.pe(t,(function(n){var r=e.be(n);switch(t.state){case 0:e.ve(n)&&r.ue(t.resumeToken);break;case 1:r.we(),r.he||r.le(),r.ue(t.resumeToken);break;case 2:r.we(),r.he||e.removeTarget(n);break;case 3:e.ve(n)&&(r.Te(),r.ue(t.resumeToken));break;case 4:e.ve(n)&&(e.Se(n),r.ue(t.resumeToken));break;default:y()}}))},t.prototype.pe=function(t,e){var n=this;t.targetIds.length>0?t.targetIds.forEach(e):this.Ie.forEach((function(t,r){n.ve(r)&&e(r)}))},t.prototype.De=function(t){var e=t.targetId,n=t.ee.count,r=this.Ce(e);if(r){var i=r.target;if(K(i))if(0===n){var o=new F(i.path);this.ge(e,o,new on(o,R.min()))}else g(1===n);else this.Fe(e)!==n&&(this.Se(e),this.Re=this.Re.add(e))}},t.prototype.Ne=function(t){var e=this,n=new Map;this.Ie.forEach((function(r,i){var o=e.Ce(i);if(o){if(r.Ht&&K(o.target)){var a=new F(o.target.path);null!==e.me.get(a)||e.$e(i,a)||e.ge(i,a,new on(a,t))}r.ae&&(n.set(i,r.ce()),r.le())}}));var r=ft();this.Ae.forEach((function(t,n){var i=!0;n.St((function(t){var n=e.Ce(t);return!n||2===n.J||(i=!1,!1)})),i&&(r=r.add(t))}));var i=new mt(t,n,this.Re,this.me,r);return this.me=at(),this.Ae=It(),this.Re=new rt(w),i},t.prototype.Ve=function(t,e){if(this.ve(t)){var n=this.$e(t,e.key)?2:0;this.be(t)._e(e.key,n),this.me=this.me.nt(e.key,e),this.Ae=this.Ae.nt(e.key,this.ke(e.key).add(t))}},t.prototype.ge=function(t,e,n){if(this.ve(t)){var r=this.be(t);this.$e(t,e)?r._e(e,1):r.fe(e),this.Ae=this.Ae.nt(e,this.ke(e).delete(t)),n&&(this.me=this.me.nt(e,n))}},t.prototype.removeTarget=function(t){this.Ie.delete(t)},t.prototype.Fe=function(t){var e=this.be(t).ce();return this.Ee.xe(t).size+e.Yt.size-e.Xt.size},t.prototype.de=function(t){this.be(t).de()},t.prototype.be=function(t){var e=this.Ie.get(t);return e||(e=new Tt,this.Ie.set(t,e)),e},t.prototype.ke=function(t){var e=this.Ae.get(t);return e||(e=new rt(w),this.Ae=this.Ae.nt(t,e)),e},t.prototype.ve=function(t){var e=null!==this.Ce(t);return e||p("WatchChangeAggregator","Detected inactive target",t),e},t.prototype.Ce=function(t){var e=this.Ie.get(t);return e&&e.he?null:this.Ee.Me(t)},t.prototype.Se=function(t){var e=this;this.Ie.set(t,new Tt),this.Ee.xe(t).forEach((function(n){e.ge(t,n,null)}))},t.prototype.$e=function(t,e){return this.Ee.xe(t).has(e)},t}();function It(){return new tt(F.P)}function Ct(){return new tt(F.P)}function kt(t){var e,n;return"server_timestamp"===(null===(n=((null===(e=null==t?void 0:t.mapValue)||void 0===e?void 0:e.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function xt(t){var e=Mt(t.mapValue.fields.__local_write_time__.timestampValue);return new P(e.seconds,e.nanos)}var Nt=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function At(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?kt(t)?4:10:y()}function Ot(t,e){var n=At(t);if(n!==At(e))return!1;switch(n){case 0:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return xt(t).isEqual(xt(e));case 3:return function(t,e){if("string"==typeof t.timestampValue&&"string"==typeof e.timestampValue&&t.timestampValue.length===e.timestampValue.length)return t.timestampValue===e.timestampValue;var n=Mt(t.timestampValue),r=Mt(e.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(t,e){return Ft(t.bytesValue).isEqual(Ft(e.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(t,e){return jt(t.geoPointValue.latitude)===jt(e.geoPointValue.latitude)&&jt(t.geoPointValue.longitude)===jt(e.geoPointValue.longitude)}(t,e);case 2:return function(t,e){if("integerValue"in t&&"integerValue"in e)return jt(t.integerValue)===jt(e.integerValue);if("doubleValue"in t&&"doubleValue"in e){var n=jt(t.doubleValue),r=jt(e.doubleValue);return n===r?V(n)===V(r):isNaN(n)&&isNaN(r)}return!1}(t,e);case 9:return E(t.arrayValue.values||[],e.arrayValue.values||[],Ot);case 10:return function(t,e){var n=t.mapValue.fields||{},r=e.mapValue.fields||{};if(C(n)!==C(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!Ot(n[i],r[i])))return!1;return!0}(t,e);default:return y()}}function Pt(t,e){return void 0!==(t.values||[]).find((function(t){return Ot(t,e)}))}function Rt(t,e){var n=At(t),r=At(e);if(n!==r)return w(n,r);switch(n){case 0:return 0;case 1:return w(t.booleanValue,e.booleanValue);case 2:return function(t,e){var n=jt(t.integerValue||t.doubleValue),r=jt(e.integerValue||e.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(t,e);case 3:return Dt(t.timestampValue,e.timestampValue);case 4:return Dt(xt(t),xt(e));case 5:return w(t.stringValue,e.stringValue);case 6:return function(t,e){var n=Ft(t),r=Ft(e);return n.o(r)}(t.bytesValue,e.bytesValue);case 7:return function(t,e){for(var n=t.split("/"),r=e.split("/"),i=0;i<n.length&&i<r.length;i++){var o=w(n[i],r[i]);if(0!==o)return o}return w(n.length,r.length)}(t.referenceValue,e.referenceValue);case 8:return function(t,e){var n=w(jt(t.latitude),jt(e.latitude));return 0!==n?n:w(jt(t.longitude),jt(e.longitude))}(t.geoPointValue,e.geoPointValue);case 9:return function(t,e){for(var n=t.values||[],r=e.values||[],i=0;i<n.length&&i<r.length;++i){var o=Rt(n[i],r[i]);if(o)return o}return w(n.length,r.length)}(t.arrayValue,e.arrayValue);case 10:return function(t,e){var n=t.fields||{},r=Object.keys(n),i=e.fields||{},o=Object.keys(i);r.sort(),o.sort();for(var a=0;a<r.length&&a<o.length;++a){var s=w(r[a],o[a]);if(0!==s)return s;var u=Rt(n[r[a]],i[o[a]]);if(0!==u)return u}return w(r.length,o.length)}(t.mapValue,e.mapValue);default:throw y()}}function Dt(t,e){if("string"==typeof t&&"string"==typeof e&&t.length===e.length)return w(t,e);var n=Mt(t),r=Mt(e),i=w(n.seconds,r.seconds);return 0!==i?i:w(n.nanos,r.nanos)}function Lt(t){return function t(e){return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(t){var e=Mt(t);return"time("+e.seconds+","+e.nanos+")"}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?Ft(e.bytesValue).toBase64():"referenceValue"in e?(r=e.referenceValue,F.q(r).toString()):"geoPointValue"in e?"geo("+(n=e.geoPointValue).latitude+","+n.longitude+")":"arrayValue"in e?function(e){for(var n="[",r=!0,i=0,o=e.values||[];i<o.length;i++){var a=o[i];r?r=!1:n+=",",n+=t(a)}return n+"]"}(e.arrayValue):"mapValue"in e?function(e){for(var n="{",r=!0,i=0,o=Object.keys(e.fields||{}).sort();i<o.length;i++){var a=o[i];r?r=!1:n+=",",n+=a+":"+t(e.fields[a])}return n+"}"}(e.mapValue):y();var n,r}(t)}function Mt(t){if(g(!!t),"string"==typeof t){var e=0,n=Nt.exec(t);
2if(g(!!n),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),e=Number(r)}var i=new Date(t);return{seconds:Math.floor(i.getTime()/1e3),nanos:e}}return{seconds:jt(t.seconds),nanos:jt(t.nanos)}}function jt(t){return"number"==typeof t?t:"string"==typeof t?Number(t):0}function Ft(t){return"string"==typeof t?G.fromBase64String(t):G.fromUint8Array(t)}function Ut(t,e){return{referenceValue:"projects/"+t.projectId+"/databases/"+t.database+"/documents/"+e.path.N()}}function Vt(t){return!!t&&"integerValue"in t}function qt(t){return!!t&&"arrayValue"in t}function Bt(t){return!!t&&"nullValue"in t}function zt(t){return!!t&&"doubleValue"in t&&isNaN(Number(t.doubleValue))}function Wt(t){return!!t&&"mapValue"in t}var Ht={asc:"ASCENDING",desc:"DESCENDING"},Kt={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","array-contains-any":"ARRAY_CONTAINS_ANY"},Gt=function(t,e){this.s=t,this.Oe=e};function Qt(t){return{integerValue:""+t}}function $t(t,e){if(t.Oe){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:V(e)?"-0":e}}function Xt(t,e){return q(e)?Qt(e):$t(t,e)}function Yt(t,e){return t.Oe?new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")+"."+("000000000"+e.nanoseconds).slice(-9)+"Z":{seconds:""+e.seconds,nanos:e.nanoseconds}}function Jt(t,e){return t.Oe?e.toBase64():e.toUint8Array()}function Zt(t,e){return Yt(t,e.A())}function te(t){return g(!!t),R.I(function(t){var e=Mt(t);return new P(e.seconds,e.nanos)}(t))}function ee(t,e){return function(t){return new L(["projects",t.projectId,"databases",t.database])}(t).child("documents").child(e).N()}function ne(t){var e=L.$(t);return g(we(e)),e}function re(t,e){return ee(t.s,e.path)}function ie(t,e){var n=ne(e);return g(n.get(1)===t.s.projectId),g(!n.get(3)&&!t.s.database||n.get(3)===t.s.database),new F(ue(n))}function oe(t,e){return ee(t.s,e)}function ae(t){var e=ne(t);return 4===e.length?L.k():ue(e)}function se(t){return new L(["projects",t.s.projectId,"databases",t.s.database]).N()}function ue(t){return g(t.length>4&&"documents"===t.get(4)),t.g(5)}function ce(t,e,n){return{name:re(t,e),fields:n.proto.mapValue.fields}}function le(t,e){var n;if(e instanceof He)n={update:ce(t,e.key,e.value)};else if(e instanceof Ye)n={delete:re(t,e.key)};else if(e instanceof Ke)n={update:ce(t,e.key,e.data),updateMask:_e(e.Le)};else if(e instanceof Qe)n={transform:{document:re(t,e.key),fieldTransforms:e.fieldTransforms.map((function(t){return function(t,e){var n=e.transform;if(n instanceof Ce)return{fieldPath:e.field.N(),setToServerValue:"REQUEST_TIME"};if(n instanceof ke)return{fieldPath:e.field.N(),appendMissingElements:{values:n.elements}};if(n instanceof Ne)return{fieldPath:e.field.N(),removeAllFromArray:{values:n.elements}};if(n instanceof Oe)return{fieldPath:e.field.N(),increment:n.Be};throw y()}(0,t)}))}};else{if(!(e instanceof Je))return y();n={verify:re(t,e.key)}}return e.Ue.qe||(n.currentDocument=function(t,e){return void 0!==e.updateTime?{updateTime:Zt(t,e.updateTime)}:void 0!==e.exists?{exists:e.exists}:y()}(t,e.Ue)),n}function he(t,e){var n=e.currentDocument?function(t){return void 0!==t.updateTime?je.updateTime(te(t.updateTime)):void 0!==t.exists?je.exists(t.exists):je.Qe()}(e.currentDocument):je.Qe();if(e.update){e.update.name;var r=ie(t,e.update.name),i=new Ze({mapValue:{fields:e.update.fields}});if(e.updateMask){var o=function(t){var e=t.fieldPaths||[];return new De(e.map((function(t){return j.B(t)})))}(e.updateMask);return new Ke(r,i,o,n)}return new He(r,i,n)}if(e.delete){var a=ie(t,e.delete);return new Ye(a,n)}if(e.transform){var s=ie(t,e.transform.document),u=e.transform.fieldTransforms.map((function(e){return function(t,e){var n=null;if("setToServerValue"in e)g("REQUEST_TIME"===e.setToServerValue),n=new Ce;else if("appendMissingElements"in e){var r=e.appendMissingElements.values||[];n=new ke(r)}else if("removeAllFromArray"in e){var i=e.removeAllFromArray.values||[];n=new Ne(i)}else"increment"in e?n=new Oe(t,e.increment):y();var o=j.B(e.fieldPath);return new Le(o,n)}(t,e)}));return g(!0===n.exists),new Qe(s,u)}if(e.verify){var c=ie(t,e.verify);return new Je(c,n)}return y()}function fe(t,e){return{documents:[oe(t,e.path)]}}function pe(t,e){var n={structuredQuery:{}},r=e.path;null!==e.collectionGroup?(n.parent=oe(t,r),n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(n.parent=oe(t,r.p()),n.structuredQuery.from=[{collectionId:r.S()}]);var i=function(t){if(0!==t.length){var e=t.map((function(t){return t instanceof pn?function(t){if("=="===t.op){if(zt(t.value))return{unaryFilter:{field:ye(t.field),op:"IS_NAN"}};if(Bt(t.value))return{unaryFilter:{field:ye(t.field),op:"IS_NULL"}}}return{fieldFilter:{field:ye(t.field),op:(e=t.op,Kt[e]),value:t.value}};var e}(t):y()}));return 1===e.length?e[0]:{compositeFilter:{op:"AND",filters:e}}}}(e.filters);i&&(n.structuredQuery.where=i);var o=function(t){if(0!==t.length)return t.map((function(t){return{field:ye((e=t).field),direction:(n=e.dir,Ht[n])};var e,n}))}(e.orderBy);o&&(n.structuredQuery.orderBy=o);var a=function(t,e){return t.Oe||U(e)?e:{value:e}}(t,e.limit);return null!==a&&(n.structuredQuery.limit=a),e.startAt&&(n.structuredQuery.startAt=de(e.startAt)),e.endAt&&(n.structuredQuery.endAt=de(e.endAt)),n}function de(t){return{before:t.before,values:t.position}}function ve(t){var e=!!t.before,n=t.values||[];return new bn(n,e)}function ye(t){return{fieldPath:t.N()}}function ge(t){return j.B(t.fieldPath)}function me(t){return pn.create(ge(t.fieldFilter.field),function(t){switch(t){case"EQUAL":return"==";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":default:return y()}}(t.fieldFilter.op),t.fieldFilter.value)}function be(t){switch(t.unaryFilter.op){case"IS_NAN":var e=ge(t.unaryFilter.field);return pn.create(e,"==",{doubleValue:NaN});case"IS_NULL":var n=ge(t.unaryFilter.field);return pn.create(n,"==",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":default:return y()}}function _e(t){var e=[];return t.fields.forEach((function(t){return e.push(t.N())})),{fieldPaths:e}}function we(t){return t.length>=4&&"projects"===t.get(0)&&"databases"===t.get(2)}var Ee=function(){this.je=void 0};function Te(t,e,n){return t instanceof Ce?function(t,e){var n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:t.seconds,nanos:t.nanoseconds}}}};return e&&(n.fields.__previous_value__=e),{mapValue:n}}(n,e):t instanceof ke?xe(t,e):t instanceof Ne?Ae(t,e):function(t,e){var n=Ie(t,e),r=Pe(n)+Pe(t.Be);return Vt(n)&&Vt(t.Be)?Qt(r):$t(t.serializer,r)}(t,e)}function Se(t,e,n){return t instanceof ke?xe(t,e):t instanceof Ne?Ae(t,e):n}function Ie(t,e){return t instanceof Oe?Vt(n=e)||function(t){return!!t&&"doubleValue"in t}(n)?e:{integerValue:0}:null;var n}var Ce=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e}(Ee),ke=function(t){function e(e){var n=this;return(n=t.call(this)||this).elements=e,n}return i.__extends(e,t),e}(Ee);function xe(t,e){for(var n=Re(e),r=function(t){n.some((function(e){return Ot(e,t)}))||n.push(t)},i=0,o=t.elements;i<o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var Ne=function(t){function e(e){var n=this;return(n=t.call(this)||this).elements=e,n}return i.__extends(e,t),e}(Ee);function Ae(t,e){for(var n=Re(e),r=function(t){n=n.filter((function(e){return!Ot(e,t)}))},i=0,o=t.elements;i<o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var Oe=function(t){function e(e,n){var r=this;
2return(r=t.call(this)||this).serializer=e,r.Be=n,r}return i.__extends(e,t),e}(Ee);function Pe(t){return jt(t.integerValue||t.doubleValue)}function Re(t){return qt(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}var De=function(){function t(t){this.fields=t,t.sort(j.P)}return t.prototype.Ke=function(t){for(var e=0,n=this.fields;e<n.length;e++)if(n[e].D(t))return!0;return!1},t.prototype.isEqual=function(t){return E(this.fields,t.fields,(function(t,e){return t.isEqual(e)}))},t}(),Le=function(t,e){this.field=t,this.transform=e},Me=function(t,e){this.version=t,this.transformResults=e},je=function(){function t(t,e){this.updateTime=t,this.exists=e}return t.Qe=function(){return new t},t.exists=function(e){return new t(void 0,e)},t.updateTime=function(e){return new t(e)},Object.defineProperty(t.prototype,"qe",{get:function(){return void 0===this.updateTime&&void 0===this.exists},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.exists===t.exists&&(this.updateTime?!!t.updateTime&&this.updateTime.isEqual(t.updateTime):!t.updateTime)},t}();function Fe(t,e){return void 0!==t.updateTime?e instanceof rn&&e.version.isEqual(t.updateTime):void 0===t.exists||t.exists===e instanceof rn}var Ue=function(){};function Ve(t,e,n){return t instanceof He?function(t,e,n){return new rn(t.key,n.version,t.value,{hasCommittedMutations:!0})}(t,0,n):t instanceof Ke?function(t,e,n){if(!Fe(t.Ue,e))return new an(t.key,n.version);var r=Ge(t,e);return new rn(t.key,n.version,r,{hasCommittedMutations:!0})}(t,e,n):t instanceof Qe?function(t,e,n){if(g(null!=n.transformResults),!Fe(t.Ue,e))return new an(t.key,n.version);var r=$e(t,e),i=function(t,e,n){var r=[];g(t.length===n.length);for(var i=0;i<n.length;i++){var o=t[i],a=o.transform,s=null;e instanceof rn&&(s=e.field(o.field)),r.push(Se(a,s,n[i]))}return r}(t.fieldTransforms,e,n.transformResults),o=n.version,a=Xe(t,r.data(),i);return new rn(t.key,o,a,{hasCommittedMutations:!0})}(t,e,n):function(t,e,n){return new on(t.key,n.version,{hasCommittedMutations:!0})}(t,0,n)}function qe(t,e,n,r){return t instanceof He?function(t,e){if(!Fe(t.Ue,e))return e;var n=We(e);return new rn(t.key,n,t.value,{Ge:!0})}(t,e):t instanceof Ke?function(t,e){if(!Fe(t.Ue,e))return e;var n=We(e),r=Ge(t,e);return new rn(t.key,n,r,{Ge:!0})}(t,e):t instanceof Qe?function(t,e,n,r){if(!Fe(t.Ue,e))return e;var i=$e(t,e),o=function(t,e,n,r){for(var i=[],o=0,a=t;o<a.length;o++){var s=a[o],u=s.transform,c=null;n instanceof rn&&(c=n.field(s.field)),null===c&&r instanceof rn&&(c=r.field(s.field)),i.push(Te(u,c,e))}return i}(t.fieldTransforms,n,e,r),a=Xe(t,i.data(),o);return new rn(t.key,i.version,a,{Ge:!0})}(t,e,r,n):function(t,e){return Fe(t.Ue,e)?new on(t.key,R.min()):e}(t,e)}function Be(t,e){return t instanceof Qe?function(t,e){for(var n=null,r=0,i=t.fieldTransforms;r<i.length;r++){var o=i[r],a=e instanceof rn?e.field(o.field):void 0,s=Ie(o.transform,a||null);null!=s&&(n=null==n?(new tn).set(o.field,s):n.set(o.field,s))}return n?n.ze():null}(t,e):null}function ze(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.Ue.isEqual(e.Ue)&&(0===t.type?t.value.isEqual(e.value):1===t.type?t.data.isEqual(e.data)&&t.Le.isEqual(e.Le):2!==t.type||E(t.fieldTransforms,t.fieldTransforms,(function(t,e){return function(t,e){return t.field.isEqual(e.field)&&function(t,e){return t instanceof ke&&e instanceof ke||t instanceof Ne&&e instanceof Ne?E(t.elements,e.elements,Ot):t instanceof Oe&&e instanceof Oe?Ot(t.Be,e.Be):t instanceof Ce&&e instanceof Ce}(t.transform,e.transform)}(t,e)})))}function We(t){return t instanceof rn?t.version:R.min()}var He=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).key=e,i.value=n,i.Ue=r,i.type=0,i}return i.__extends(e,t),e}(Ue),Ke=function(t){function e(e,n,r,i){var o=this;return(o=t.call(this)||this).key=e,o.data=n,o.Le=r,o.Ue=i,o.type=1,o}return i.__extends(e,t),e}(Ue);function Ge(t,e){return function(t,e){var n=new tn(e);return t.Le.fields.forEach((function(e){if(!e._()){var r=t.data.field(e);null!==r?n.set(e,r):n.delete(e)}})),n.ze()}(t,e instanceof rn?e.data():Ze.empty())}var Qe=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).key=e,r.fieldTransforms=n,r.type=2,r.Ue=je.exists(!0),r}return i.__extends(e,t),e}(Ue);function $e(t,e){return e}function Xe(t,e,n){for(var r=new tn(e),i=0;i<t.fieldTransforms.length;i++){var o=t.fieldTransforms[i];r.set(o.field,n[i])}return r.ze()}var Ye=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).key=e,r.Ue=n,r.type=3,r}return i.__extends(e,t),e}(Ue),Je=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).key=e,r.Ue=n,r.type=4,r}return i.__extends(e,t),e}(Ue),Ze=function(){function t(t){this.proto=t}return t.empty=function(){return new t({mapValue:{}})},t.prototype.field=function(t){if(t._())return this.proto;for(var e=this.proto,n=0;n<t.length-1;++n){if(!e.mapValue.fields)return null;if(!Wt(e=e.mapValue.fields[t.get(n)]))return null}return(e=(e.mapValue.fields||{})[t.S()])||null},t.prototype.isEqual=function(t){return Ot(this.proto,t.proto)},t}(),tn=function(){function t(t){void 0===t&&(t=Ze.empty()),this.He=t,this.Ye=new Map}return t.prototype.set=function(t,e){return this.Je(t,e),this},t.prototype.delete=function(t){return this.Je(t,null),this},t.prototype.Je=function(t,e){for(var n=this.Ye,r=0;r<t.length-1;++r){var i=t.get(r),o=n.get(i);
2o instanceof Map?n=o:o&&10===At(o)?(o=new Map(Object.entries(o.mapValue.fields||{})),n.set(i,o),n=o):(o=new Map,n.set(i,o),n=o)}n.set(t.S(),e)},t.prototype.ze=function(){var t=this.Xe(j.k(),this.Ye);return null!=t?new Ze(t):this.He},t.prototype.Xe=function(t,e){var n=this,r=!1,i=this.He.field(t),o=Wt(i)?Object.assign({},i.mapValue.fields):{};return e.forEach((function(e,i){if(e instanceof Map){var a=n.Xe(t.child(i),e);null!=a&&(o[i]=a,r=!0)}else null!==e?(o[i]=e,r=!0):o.hasOwnProperty(i)&&(delete o[i],r=!0)})),r?{mapValue:{fields:o}}:null},t}();function en(t){var e=[];return k(t.fields||{},(function(t,n){var r=new j([t]);if(Wt(n)){var i=en(n.mapValue).fields;if(0===i.length)e.push(r);else for(var o=0,a=i;o<a.length;o++){var s=a[o];e.push(r.child(s))}}else e.push(r)})),new De(e)}var nn=function(t,e){this.key=t,this.version=e},rn=function(t){function e(e,n,r,i){var o=this;return(o=t.call(this,e,n)||this).Ze=r,o.Ge=!!i.Ge,o.hasCommittedMutations=!!i.hasCommittedMutations,o}return i.__extends(e,t),e.prototype.field=function(t){return this.Ze.field(t)},e.prototype.data=function(){return this.Ze},e.prototype.tn=function(){return this.Ze.proto},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.Ge===t.Ge&&this.hasCommittedMutations===t.hasCommittedMutations&&this.Ze.isEqual(t.Ze)},e.prototype.toString=function(){return"Document("+this.key+", "+this.version+", "+this.Ze.toString()+", {hasLocalMutations: "+this.Ge+"}), {hasCommittedMutations: "+this.hasCommittedMutations+"})"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return this.Ge||this.hasCommittedMutations},enumerable:!1,configurable:!0}),e}(nn),on=function(t){function e(e,n,r){var i=this;return(i=t.call(this,e,n)||this).hasCommittedMutations=!(!r||!r.hasCommittedMutations),i}return i.__extends(e,t),e.prototype.toString=function(){return"NoDocument("+this.key+", "+this.version+")"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return this.hasCommittedMutations},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.hasCommittedMutations===this.hasCommittedMutations&&t.version.isEqual(this.version)&&t.key.isEqual(this.key)},e}(nn),an=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.toString=function(){return"UnknownDocument("+this.key+", "+this.version+")"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return!0},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.version.isEqual(this.version)&&t.key.isEqual(this.key)},e}(nn),sn=function(){function t(t,e,n,r,i,o,a,s){void 0===e&&(e=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o="F"),void 0===a&&(a=null),void 0===s&&(s=null),this.path=t,this.collectionGroup=e,this.en=n,this.filters=r,this.limit=i,this.nn=o,this.startAt=a,this.endAt=s,this.sn=null,this.rn=null,this.startAt&&this.on(this.startAt),this.endAt&&this.on(this.endAt)}return t.hn=function(e){return new t(e)},Object.defineProperty(t.prototype,"orderBy",{get:function(){if(null===this.sn){this.sn=[];var t=this.an(),e=this.un();if(null!==t&&null===e)t.O()||this.sn.push(new Tn(t)),this.sn.push(new Tn(j.L(),"asc"));else{for(var n=!1,r=0,i=this.en;r<i.length;r++){var o=i[r];this.sn.push(o),o.field.O()&&(n=!0)}if(!n){var a=this.en.length>0?this.en[this.en.length-1].dir:"asc";this.sn.push(new Tn(j.L(),a))}}}return this.sn},enumerable:!1,configurable:!0}),t.prototype.cn=function(e){var n=this.filters.concat([e]);return new t(this.path,this.collectionGroup,this.en.slice(),n,this.limit,this.nn,this.startAt,this.endAt)},t.prototype.ln=function(e){var n=this.en.concat([e]);return new t(this.path,this.collectionGroup,n,this.filters.slice(),this.limit,this.nn,this.startAt,this.endAt)},t.prototype._n=function(e){return new t(this.path,this.collectionGroup,this.en.slice(),this.filters.slice(),e,"F",this.startAt,this.endAt)},t.prototype.fn=function(e){return new t(this.path,this.collectionGroup,this.en.slice(),this.filters.slice(),e,"L",this.startAt,this.endAt)},t.prototype.dn=function(e){return new t(this.path,this.collectionGroup,this.en.slice(),this.filters.slice(),this.limit,this.nn,e,this.endAt)},t.prototype.wn=function(e){return new t(this.path,this.collectionGroup,this.en.slice(),this.filters.slice(),this.limit,this.nn,this.startAt,e)},t.prototype.Tn=function(e){return new t(e,null,this.en.slice(),this.filters.slice(),this.limit,this.nn,this.startAt,this.endAt)},t.prototype.En=function(){return 0===this.filters.length&&null===this.limit&&null==this.startAt&&null==this.endAt&&(0===this.en.length||1===this.en.length&&this.en[0].field.O())},t.prototype.In=function(){return!U(this.limit)&&"F"===this.nn},t.prototype.mn=function(){return!U(this.limit)&&"L"===this.nn},t.prototype.un=function(){return this.en.length>0?this.en[0].field:null},t.prototype.an=function(){for(var t=0,e=this.filters;t<e.length;t++){var n=e[t];if(n instanceof pn&&n.An())return n.field}return null},t.prototype.Rn=function(t){for(var e=0,n=this.filters;e<n.length;e++){var r=n[e];if(r instanceof pn&&t.indexOf(r.op)>=0)return r.op}return null},t.prototype.Pn=function(){return K(this.We())},t.prototype.Vn=function(){return null!==this.collectionGroup},t.prototype.We=function(){if(!this.rn)if("F"===this.nn)this.rn=z(this.path,this.collectionGroup,this.orderBy,this.filters,this.limit,this.startAt,this.endAt);else{for(var t=[],e=0,n=this.orderBy;e<n.length;e++){var r=n[e],i="desc"===r.dir?"asc":"desc";t.push(new Tn(r.field,i))}var o=this.endAt?new bn(this.endAt.position,!this.endAt.before):null,a=this.startAt?new bn(this.startAt.position,!this.startAt.before):null;this.rn=z(this.path,this.collectionGroup,t,this.filters,this.limit,o,a)}return this.rn},t.prototype.on=function(t){},t}();function un(t,e){return H(t.We(),e.We())&&t.nn===e.nn}function cn(t){return W(t.We())+"|lt:"+t.nn}function ln(t){return"Query(target="+function(t){var e=t.path.N();return null!==t.collectionGroup&&(e+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(e+=", filters: ["+t.filters.map((function(t){return(e=t).field.N()+" "+e.op+" "+Lt(e.value);var e})).join(", ")+"]"),U(t.limit)||(e+=", limit: "+t.limit),t.orderBy.length>0&&(e+=", orderBy: ["+t.orderBy.map((function(t){return(e=t).field.N()+" ("+e.dir+")";var e})).join(", ")+"]"),t.startAt&&(e+=", startAt: "+_n(t.startAt)),t.endAt&&(e+=", endAt: "+_n(t.endAt)),"Target("+e+")"}(t.We())+"; limitType="+t.nn+")"}function hn(t,e){return function(t,e){var n=e.key.path;return null!==t.collectionGroup?e.key.U(t.collectionGroup)&&t.path.D(n):F.W(t.path)?t.path.isEqual(n):t.path.C(n)}(t,e)&&function(t,e){for(var n=0,r=t.en;n<r.length;n++){var i=r[n];if(!i.field.O()&&null===e.field(i.field))return!1}return!0}(t,e)&&function(t,e){for(var n=0,r=t.filters;n<r.length;n++)if(!r[n].matches(e))return!1;return!0}(t,e)&&function(t,e){return!(t.startAt&&!wn(t.startAt,t.orderBy,e))&&(!t.endAt||!wn(t.endAt,t.orderBy,e))}(t,e)}function fn(t){return function(e,n){for(var r=!1,i=0,o=t.orderBy;i<o.length;i++){var a=o[i],s=Sn(a,e,n);if(0!==s)return s;r=r||a.field.O()}return 0}}var pn=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).field=e,i.op=n,i.value=r,i}return i.__extends(e,t),e.create=function(t,n,r){if(t.O())return"in"===n?new vn(t,r):new dn(t,n,r);if(Bt(r)){if("=="!==n)throw new O(A.INVALID_ARGUMENT,"Invalid query. Null supports only equality comparisons.");return new e(t,n,r)}if(zt(r)){if("=="!==n)throw new O(A.INVALID_ARGUMENT,"Invalid query. NaN supports only equality comparisons.");return new e(t,n,r)}return"array-contains"===n?new yn(t,r):"in"===n?new gn(t,r):"array-contains-any"===n?new mn(t,r):new e(t,n,r)},e.prototype.matches=function(t){var e=t.field(this.field);return null!==e&&At(this.value)===At(e)&&this.gn(Rt(e,this.value))},e.prototype.gn=function(t){switch(this.op){case"<":return t<0;case"<=":return t<=0;case"==":return 0===t;case">":return t>0;case">=":return t>=0;default:return y()}},e.prototype.An=function(){return["<","<=",">",">="].indexOf(this.op)>=0},e}((function(){})),dn=function(t){function e(e,n,r){var i=this;
2return(i=t.call(this,e,n,r)||this).key=F.q(r.referenceValue),i}return i.__extends(e,t),e.prototype.matches=function(t){var e=F.P(t.key,this.key);return this.gn(e)},e}(pn),vn=function(t){function e(e,n){var r=this;return(r=t.call(this,e,"in",n)||this).keys=(n.arrayValue.values||[]).map((function(t){return F.q(t.referenceValue)})),r}return i.__extends(e,t),e.prototype.matches=function(t){return this.keys.some((function(e){return e.isEqual(t.key)}))},e}(pn),yn=function(t){function e(e,n){return t.call(this,e,"array-contains",n)||this}return i.__extends(e,t),e.prototype.matches=function(t){var e=t.field(this.field);return qt(e)&&Pt(e.arrayValue,this.value)},e}(pn),gn=function(t){function e(e,n){return t.call(this,e,"in",n)||this}return i.__extends(e,t),e.prototype.matches=function(t){var e=t.field(this.field);return null!==e&&Pt(this.value.arrayValue,e)},e}(pn),mn=function(t){function e(e,n){return t.call(this,e,"array-contains-any",n)||this}return i.__extends(e,t),e.prototype.matches=function(t){var e=this,n=t.field(this.field);return!(!qt(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(t){return Pt(e.value.arrayValue,t)}))},e}(pn),bn=function(t,e){this.position=t,this.before=e};function _n(t){return(t.before?"b":"a")+":"+t.position.map((function(t){return Lt(t)})).join(",")}function wn(t,e,n){for(var r=0,i=0;i<t.position.length;i++){var o=e[i],a=t.position[i];if(r=o.field.O()?F.P(F.q(a.referenceValue),n.key):Rt(a,n.field(o.field)),"desc"===o.dir&&(r*=-1),0!==r)break}return t.before?r<=0:r<0}function En(t,e){if(null===t)return null===e;if(null===e)return!1;if(t.before!==e.before||t.position.length!==e.position.length)return!1;for(var n=0;n<t.position.length;n++)if(!Ot(t.position[n],e.position[n]))return!1;return!0}var Tn=function(t,e){void 0===e&&(e="asc"),this.field=t,this.dir=e};function Sn(t,e,n){var r=t.field.O()?F.P(e.key,n.key):function(t,e,n){var r=e.field(t),i=n.field(t);return null!==r&&null!==i?Rt(r,i):y()}(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return y()}}function In(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}var Cn=function(){function t(t,e,n,r){this.batchId=t,this.yn=e,this.baseMutations=n,this.mutations=r}return t.prototype.pn=function(t,e,n){for(var r=n.bn,i=0;i<this.mutations.length;i++){var o=this.mutations[i];o.key.isEqual(t)&&(e=Ve(o,e,r[i]))}return e},t.prototype.vn=function(t,e){for(var n=0,r=this.baseMutations;n<r.length;n++){var i=r[n];i.key.isEqual(t)&&(e=qe(i,e,e,this.yn))}for(var o=e,a=0,s=this.mutations;a<s.length;a++){var u=s[a];u.key.isEqual(t)&&(e=qe(u,e,o,this.yn))}return e},t.prototype.Sn=function(t){var e=this,n=t;return this.mutations.forEach((function(r){var i=e.vn(r.key,t.get(r.key));i&&(n=n.nt(r.key,i))})),n},t.prototype.keys=function(){return this.mutations.reduce((function(t,e){return t.add(e.key)}),ft())},t.prototype.isEqual=function(t){return this.batchId===t.batchId&&E(this.mutations,t.mutations,(function(t,e){return ze(t,e)}))&&E(this.baseMutations,t.baseMutations,(function(t,e){return ze(t,e)}))},t}(),kn=function(){function t(t,e,n,r){this.batch=t,this.Dn=e,this.bn=n,this.Cn=r}return t.from=function(e,n,r){g(e.mutations.length===r.length);for(var i=lt,o=e.mutations,a=0;a<o.length;a++)i=i.nt(o[a].key,r[a].version);return new t(e,n,r,i)},t}(),xn=function(){function t(t){var e=this;this.Fn=null,this.Nn=null,this.result=void 0,this.error=void 0,this.$n=!1,this.kn=!1,t((function(t){e.$n=!0,e.result=t,e.Fn&&e.Fn(t)}),(function(t){e.$n=!0,e.error=t,e.Nn&&e.Nn(t)}))}return t.prototype.catch=function(t){return this.next(void 0,t)},t.prototype.next=function(e,n){var r=this;return this.kn&&y(),this.kn=!0,this.$n?this.error?this.xn(n,this.error):this.Mn(e,this.result):new t((function(t,i){r.Fn=function(n){r.Mn(e,n).next(t,i)},r.Nn=function(e){r.xn(n,e).next(t,i)}}))},t.prototype.On=function(){var t=this;return new Promise((function(e,n){t.next(e,n)}))},t.prototype.Ln=function(e){try{var n=e();return n instanceof t?n:t.resolve(n)}catch(e){return t.reject(e)}},t.prototype.Mn=function(e,n){return e?this.Ln((function(){return e(n)})):t.resolve(n)},t.prototype.xn=function(e,n){return e?this.Ln((function(){return e(n)})):t.reject(n)},t.resolve=function(e){return new t((function(t,n){t(e)}))},t.reject=function(e){return new t((function(t,n){n(e)}))},t.Bn=function(e){return new t((function(t,n){var r=0,i=0,o=!1;e.forEach((function(e){++r,e.next((function(){++i,o&&i===r&&t()}),(function(t){return n(t)}))})),o=!0,i===r&&t()}))},t.qn=function(e){for(var n=t.resolve(!1),r=function(e){n=n.next((function(n){return n?t.resolve(n):e()}))},i=0,o=e;i<o.length;i++)r(o[i]);return n},t.forEach=function(t,e){var n=this,r=[];return t.forEach((function(t,i){r.push(e.call(n,t,i))})),this.Bn(r)},t}(),Nn=function(){function t(){this.Un=new N((function(t){return t.toString()}),(function(t,e){return t.isEqual(e)})),this.Qn=!1}
2return Object.defineProperty(t.prototype,"readTime",{get:function(){return this.Wn},set:function(t){this.Wn=t},enumerable:!1,configurable:!0}),t.prototype.jn=function(t,e){this.Kn(),this.readTime=e,this.Un.set(t.key,t)},t.prototype.Gn=function(t,e){this.Kn(),e&&(this.readTime=e),this.Un.set(t,null)},t.prototype.zn=function(t,e){this.Kn();var n=this.Un.get(e);return void 0!==n?xn.resolve(n):this.Hn(t,e)},t.prototype.getEntries=function(t,e){return this.Yn(t,e)},t.prototype.apply=function(t){return this.Kn(),this.Qn=!0,this.Jn(t)},t.prototype.Kn=function(){},t}(),An="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",On=function(){function t(){this.Xn=[]}return t.prototype.Zn=function(t){this.Xn.push(t)},t.prototype.ts=function(){this.Xn.forEach((function(t){return t()}))},t}(),Pn=function(){function t(t,e,n){this.es=t,this.ns=e,this.ss=n}return t.prototype.rs=function(t,e){var n=this;return this.ns.os(t,e).next((function(r){return n.hs(t,e,r)}))},t.prototype.hs=function(t,e,n){return this.es.zn(t,e).next((function(t){for(var r=0,i=n;r<i.length;r++)t=i[r].vn(e,t);return t}))},t.prototype.as=function(t,e,n){var r=st();return e.forEach((function(t,e){for(var i=0,o=n;i<o.length;i++)e=o[i].vn(t,e);r=r.nt(t,e)})),r},t.prototype.us=function(t,e){var n=this;return this.es.getEntries(t,e).next((function(e){return n.cs(t,e)}))},t.prototype.cs=function(t,e){var n=this;return this.ns.ls(t,e).next((function(r){var i=n.as(t,e,r),o=at();return i.forEach((function(t,e){e||(e=new on(t,R.min())),o=o.nt(t,e)})),o}))},t.prototype._s=function(t,e,n){return e.Pn()?this.fs(t,e.path):e.Vn()?this.ds(t,e,n):this.ws(t,e,n)},t.prototype.fs=function(t,e){return this.rs(t,new F(e)).next((function(t){var e=ct();return t instanceof rn&&(e=e.nt(t.key,t)),e}))},t.prototype.ds=function(t,e,n){var r=this,i=e.collectionGroup,o=ct();return this.ss.Ts(t,i).next((function(a){return xn.forEach(a,(function(a){var s=e.Tn(a.child(i));return r.ws(t,s,n).next((function(t){t.forEach((function(t,e){o=o.nt(t,e)}))}))})).next((function(){return o}))}))},t.prototype.ws=function(t,e,n){var r,i,o=this;return this.es._s(t,e,n).next((function(n){return r=n,o.ns.Es(t,e)})).next((function(e){return i=e,o.Is(t,i,r).next((function(t){r=t;for(var e=0,n=i;e<n.length;e++)for(var o=n[e],a=0,s=o.mutations;a<s.length;a++){var u=s[a],c=u.key,l=r.get(c),h=qe(u,l,l,o.yn);r=h instanceof rn?r.nt(c,h):r.remove(c)}}))})).next((function(){return r.forEach((function(t,n){hn(e,n)||(r=r.remove(t))})),r}))},t.prototype.Is=function(t,e,n){for(var r=ft(),i=0,o=e;i<o.length;i++)for(var a=0,s=o[i].mutations;a<s.length;a++){var u=s[a];u instanceof Ke&&null===n.get(u.key)&&(r=r.add(u.key))}var c=n;return this.es.getEntries(t,r).next((function(t){return t.forEach((function(t,e){null!==e&&e instanceof rn&&(c=c.nt(t,e))})),c}))},t}(),Rn=function(){function t(t,e,n,r){this.targetId=t,this.fromCache=e,this.ms=n,this.As=r}return t.Rs=function(e,n){for(var r=ft(),i=ft(),o=0,a=n.docChanges;o<a.length;o++){var s=a[o];switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}}return new t(e,n.fromCache,r,i)},t}(),Dn=function(){function t(t,e){var n=this;this.previousValue=t,e&&(e.Ps=function(t){return n.Vs(t)},this.gs=function(t){return e.ys(t)})}return t.prototype.Vs=function(t){return this.previousValue=Math.max(t,this.previousValue),this.previousValue},t.prototype.next=function(){var t=++this.previousValue;return this.gs&&this.gs(t),t},t}();Dn.ps=-1;var Ln=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},Mn=function(){function t(t,e,n,r,i){void 0===n&&(n=1e3),void 0===r&&(r=1.5),void 0===i&&(i=6e4),this.bs=t,this.vs=e,this.Ss=n,this.Ds=r,this.Cs=i,this.Fs=0,this.Ns=null,this.$s=Date.now(),this.reset()}return t.prototype.reset=function(){this.Fs=0},t.prototype.ks=function(){this.Fs=this.Cs},t.prototype.xs=function(t){var e=this;this.cancel();var n=Math.floor(this.Fs+this.Ms()),r=Math.max(0,Date.now()-this.$s),i=Math.max(0,n-r);i>0&&p("ExponentialBackoff","Backing off for "+i+" ms (base delay: "+this.Fs+" ms, delay with
2jitter: "+n+" ms, last attempt: "+r+" ms ago)"),this.Ns=this.bs.Os(this.vs,i,(function(){return e.$s=Date.now(),t()})),this.Fs*=this.Ds,this.Fs<this.Ss&&(this.Fs=this.Ss),this.Fs>this.Cs&&(this.Fs=this.Cs)},t.prototype.Ls=function(){null!==this.Ns&&(this.Ns.Bs(),this.Ns=null)},t.prototype.cancel=function(){null!==this.Ns&&(this.Ns.cancel(),this.Ns=null)},t.prototype.Ms=function(){return(Math.random()-.5)*this.Fs},t}();function jn(t){for(var e="",n=0;n<t.length;n++)e.length>0&&(e=Un(e)),e=Fn(t.get(n),e);return Un(e)}function Fn(t,e){for(var n=e,r=t.length,i=0;i<r;i++){var o=t.charAt(i);switch(o){case"\0":n+="\x01\x10";break;case"\x01":n+="\x01\x11";break;default:n+=o}}return n}function Un(t){return t+"\x01\x01"}function Vn(t){var e=t.length;if(g(e>=2),2===e)return g("\x01"===t.charAt(0)&&"\x01"===t.charAt(1)),L.k();for(var n=e-2,r=[],i="",o=0;o<e;){var a=t.indexOf("\x01",o);switch((a<0||a>n)&&y(),t.charAt(a+1)){case"\x01":var s=t.substring(o,a),u=void 0;0===i.length?u=s:(u=i+=s,i=""),r.push(u);break;case"\x10":i+=t.substring(o,a),i+="\0";break;case"\x11":i+=t.substring(o,a+1);break;default:y()}o=a+2}return new L(r)}var qn=function(){function t(){this.qs=new Bn}return t.prototype.Us=function(t,e){return this.qs.add(e),xn.resolve()},t.prototype.Ts=function(t,e){return xn.resolve(this.qs.getEntries(e))},t}(),Bn=function(){function t(){this.index={}}return t.prototype.add=function(t){var e=t.S(),n=t.p(),r=this.index[e]||new rt(L.P),i=!r.has(n);return this.index[e]=r.add(n),i},t.prototype.has=function(t){var e=t.S(),n=t.p(),r=this.index[e];return r&&r.has(n)},t.prototype.getEntries=function(t){return(this.index[t]||new rt(L.P)).F()},t}(),zn=function(){function t(){this.Qs=new Bn}return t.prototype.Us=function(t,e){var n=this;if(!this.Qs.has(e)){var r=e.S(),i=e.p();t.Zn((function(){n.Qs.add(e)}));var o={collectionId:r,parent:jn(i)};return Wn(t).put(o)}return xn.resolve()},t.prototype.Ts=function(t,e){var n=[],r=IDBKeyRange.bound([e,""],[T(e),""],!1,!0);return Wn(t).Ws(r).next((function(t){for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.collectionId!==e)break;n.push(Vn(o.parent))}return n}))},t}();function Wn(t){return pr.js(t,Ur.store)}var Hn=function(t){this.Ks=t};function Kn(t,e){if(e.document)return function(t,e,n){var r=ie(t,e.name),i=te(e.updateTime),o=new Ze({mapValue:{fields:e.fields}});return new rn(r,i,o,{hasCommittedMutations:!!n})}(t.Ks,e.document,!!e.hasCommittedMutations);if(e.noDocument){var n=F.j(e.noDocument.path),r=Yn(e.noDocument.readTime);return new on(n,r,{hasCommittedMutations:!!e.hasCommittedMutations})}if(e.unknownDocument){var i=F.j(e.unknownDocument.path),o=Yn(e.unknownDocument.version);return new an(i,o)}return y()}function Gn(t,e,n){var r=Qn(n),i=e.key.path.p().F();if(e instanceof rn){var o=function(t,e){return{name:re(t,e.key),fields:e.tn().mapValue.fields,updateTime:Yt(t,e.version.A())}}(t.Ks,e),a=e.hasCommittedMutations;return new Dr(null,null,o,a,r,i)}if(e instanceof on){var s=e.key.path.F(),u=Xn(e.version),c=e.hasCommittedMutations;return new Dr(null,new Pr(s,u),null,c,r,i)}if(e instanceof an){var l=e.key.path.F(),h=Xn(e.version);return new Dr(new Rr(l,h),null,null,!0,r,i)}return y()}function Qn(t){var e=t.A();return[e.seconds,e.nanoseconds]}function $n(t){var e=new P(t[0],t[1]);return R.I(e)}function Xn(t){var e=t.A();return new kr(e.seconds,e.nanoseconds)}function Yn(t){var e=new P(t.seconds,t.nanoseconds);return R.I(e)}function Jn(t,e){var n=(e.baseMutations||[]).map((function(e){return he(t.Ks,e)})),r=e.mutations.map((function(e){return he(t.Ks,e)})),i=P.fromMillis(e.localWriteTimeMs);return new Cn(e.batchId,i,n,r)}function Zn(t){var e,n=Yn(t.readTime),r=void 0!==t.lastLimboFreeSnapshotVersion?Yn(t.lastLimboFreeSnapshotVersion):R.min();return e=void 0!==t.query.documents?function(t){g(1===t.documents.length);var e=t.documents[0];return sn.hn(ae(e)).We()}(t.query):function(t){var e=ae(t.parent),n=t.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){g(1===r);var o=n.from[0];o.allDescendants?i=o.collectionId:e=e.child(o.collectionId)}var a=[];n.where&&(a=function t(e){return e?void 0!==e.unaryFilter?[be(e)
2]:void 0!==e.fieldFilter?[me(e)]:void 0!==e.compositeFilter?e.compositeFilter.filters.map((function(e){return t(e)})).reduce((function(t,e){return t.concat(e)})):y():[]}(n.where));var s=[];n.orderBy&&(s=n.orderBy.map((function(t){return new Tn(ge((e=t).field),function(t){switch(t){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction));var e})));var u=null;n.limit&&(u=function(t){var e;return U(e="object"==typeof t?t.value:t)?null:e}(n.limit));var c=null;n.startAt&&(c=ve(n.startAt));var l=null;return n.endAt&&(l=ve(n.endAt)),new sn(e,i,s,a,u,"F",c,l).We()}(t.query),new X(e,t.targetId,0,t.lastListenSequenceNumber,n,r,G.fromBase64String(t.resumeToken))}function tr(t,e){var n,r=Xn(e.X),i=Xn(e.lastLimboFreeSnapshotVersion);n=K(e.target)?fe(t.Ks,e.target):pe(t.Ks,e.target);var o=e.resumeToken.toBase64();return new Mr(e.targetId,W(e.target),r,o,e.sequenceNumber,i,n)}var er=function(){function t(t,e){this.serializer=t,this.ss=e}return t.prototype.jn=function(t,e,n){return rr(t).put(ir(e),n)},t.prototype.Gn=function(t,e){var n=rr(t),r=ir(e);return n.delete(r)},t.prototype.updateMetadata=function(t,e){var n=this;return this.getMetadata(t).next((function(r){return r.byteSize+=e,n.Gs(t,r)}))},t.prototype.zn=function(t,e){var n=this;return rr(t).get(ir(e)).next((function(t){return n.zs(t)}))},t.prototype.Hs=function(t,e){var n=this;return rr(t).get(ir(e)).next((function(t){var e=n.zs(t);return e?{Ys:e,size:or(t)}:null}))},t.prototype.getEntries=function(t,e){var n=this,r=st();return this.Js(t,e,(function(t,e){var i=n.zs(e);r=r.nt(t,i)})).next((function(){return r}))},t.prototype.Xs=function(t,e){var n=this,r=st(),i=new tt(F.P);return this.Js(t,e,(function(t,e){var o=n.zs(e);o?(r=r.nt(t,o),i=i.nt(t,or(e))):(r=r.nt(t,null),i=i.nt(t,0))})).next((function(){return{Zs:r,ti:i}}))},t.prototype.Js=function(t,e,n){if(e._())return xn.resolve();var r=IDBKeyRange.bound(e.first().path.F(),e.last().path.F()),i=e.at(),o=i.dt();return rr(t).ei({range:r},(function(t,e,r){for(var a=F.j(t);o&&F.P(o,a)<0;)n(o,null),o=i.dt();o&&o.isEqual(a)&&(n(o,e),o=i.wt()?i.dt():null),o?r.ni(o.path.F()):r.done()})).next((function(){for(;o;)n(o,null),o=i.wt()?i.dt():null}))},t.prototype._s=function(t,e,n){var r=this,i=ct(),o=e.path.length+1,a={};if(n.isEqual(R.min())){var s=e.path.F();a.range=IDBKeyRange.lowerBound(s)}else{var u=e.path.F(),c=Qn(n);a.range=IDBKeyRange.lowerBound([u,c],!0),a.index=Dr.collectionReadTimeIndex}return rr(t).ei(a,(function(t,n,a){if(t.length===o){var s=Kn(r.serializer,n);e.path.D(s.key.path)?s instanceof rn&&hn(e,s)&&(i=i.nt(s.key,s)):a.done()}})).next((function(){return i}))},t.prototype.si=function(t,e){var n=this,r=at(),i=Qn(e),o=rr(t),a=IDBKeyRange.lowerBound(i,!0);return o.ei({index:Dr.readTimeIndex,range:a},(function(t,e){var o=Kn(n.serializer,e);r=r.nt(o.key,o),i=e.readTime})).next((function(){return{ii:r,readTime:$n(i)}}))},t.prototype.ri=function(t){var e=rr(t),n=R.min();return e.ei({index:Dr.readTimeIndex,reverse:!0},(function(t,e,r){e.readTime&&(n=$n(e.readTime)),r.done()})).next((function(){return n}))},t.prototype.oi=function(e){return new t.hi(this,!!e&&e.ai)},t.prototype.ui=function(t){return this.getMetadata(t).next((function(t){return t.byteSize}))},t.prototype.getMetadata=function(t){return nr(t).get(Lr.key).next((function(t){return g(!!t),t}))},t.prototype.Gs=function(t,e){return nr(t).put(Lr.key,e)},t.prototype.zs=function(t){if(t){var e=Kn(this.serializer,t);return e instanceof on&&e.version.isEqual(R.min())?null:e}return null},t}();function nr(t){return pr.js(t,Lr.store)}function rr(t){return pr.js(t,Dr.store)}function ir(t){return t.path.F()}function or(t){var e;if(t.document)e=t.document;else if(t.unknownDocument)e=t.unknownDocument;else{if(!t.noDocument)throw y();e=t.noDocument}return JSON.stringify(e).length}er.hi=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).ci=e,r.ai=n,r.li=new N((function(t){return t.toString()}),(function(t,e){return t.isEqual(e)})),r}return i.__extends(e,t),e.prototype.Jn=function(t){var e=this,n=[],r=0,i=new rt((function(t,e){return w(t.N(),e.N())}));return this.Un.forEach((function(o,a){var s=e.li.get(o);if(a){var u=Gn(e.ci.serializer,a,e.readTime);i=i.add(o.path.p());var c=or(u);r+=c-s,n.push(e.ci.jn(t,o,u))}else if(r-=s,e.ai){var l=Gn(e.ci.serializer,new on(o,R.min()),e.readTime);n.push(e.ci.jn(t,o,l))}else n.push(e.ci.Gn(t,o))}
2)),i.forEach((function(r){n.push(e.ci.ss.Us(t,r))})),n.push(this.ci.updateMetadata(t,r)),xn.Bn(n)},e.prototype.Hn=function(t,e){var n=this;return this.ci.Hs(t,e).next((function(t){return null===t?(n.li.set(e,0),null):(n.li.set(e,t.size),t.Ys)}))},e.prototype.Yn=function(t,e){var n=this;return this.ci.Xs(t,e).next((function(t){var e=t.Zs;return t.ti.forEach((function(t,e){n.li.set(t,e)})),e}))},e}(Nn);var ar=function(){function t(t){this._i=t}return t.prototype.next=function(){return this._i+=2,this._i},t.fi=function(){return new t(0)},t.di=function(){return new t(-1)},t}(),sr=function(){function t(t,e){this.wi=t,this.serializer=e}return t.prototype.Ti=function(t){var e=this;return this.Ei(t).next((function(n){var r=new ar(n.highestTargetId);return n.highestTargetId=r.next(),e.Ii(t,n).next((function(){return n.highestTargetId}))}))},t.prototype.mi=function(t){return this.Ei(t).next((function(t){return R.I(new P(t.lastRemoteSnapshotVersion.seconds,t.lastRemoteSnapshotVersion.nanoseconds))}))},t.prototype.Ai=function(t){return this.Ei(t).next((function(t){return t.highestListenSequenceNumber}))},t.prototype.Ri=function(t,e,n){var r=this;return this.Ei(t).next((function(i){return i.highestListenSequenceNumber=e,n&&(i.lastRemoteSnapshotVersion=n.A()),e>i.highestListenSequenceNumber&&(i.highestListenSequenceNumber=e),r.Ii(t,i)}))},t.prototype.Pi=function(t,e){var n=this;return this.Vi(t,e).next((function(){return n.Ei(t).next((function(r){return r.targetCount+=1,n.gi(e,r),n.Ii(t,r)}))}))},t.prototype.yi=function(t,e){return this.Vi(t,e)},t.prototype.pi=function(t,e){var n=this;return this.bi(t,e.targetId).next((function(){return ur(t).delete(e.targetId)})).next((function(){return n.Ei(t)})).next((function(e){return g(e.targetCount>0),e.targetCount-=1,n.Ii(t,e)}))},t.prototype.vi=function(t,e,n){var r=this,i=0,o=[];return ur(t).ei((function(a,s){var u=Zn(s);u.sequenceNumber<=e&&null===n.get(u.targetId)&&(i++,o.push(r.pi(t,u)))})).next((function(){return xn.Bn(o)})).next((function(){return i}))},t.prototype.pe=function(t,e){return ur(t).ei((function(t,n){var r=Zn(n);e(r)}))},t.prototype.Ei=function(t){return cr(t).get(Fr.key).next((function(t){return g(null!==t),t}))},t.prototype.Ii=function(t,e){return cr(t).put(Fr.key,e)},t.prototype.Vi=function(t,e){return ur(t).put(tr(this.serializer,e))},t.prototype.gi=function(t,e){var n=!1;return t.targetId>e.highestTargetId&&(e.highestTargetId=t.targetId,n=!0),t.sequenceNumber>e.highestListenSequenceNumber&&(e.highestListenSequenceNumber=t.sequenceNumber,n=!0),n},t.prototype.Si=function(t){return this.Ei(t).next((function(t){return t.targetCount}))},t.prototype.Di=function(t,e){var n=W(e),r=IDBKeyRange.bound([n,Number.NEGATIVE_INFINITY],[n,Number.POSITIVE_INFINITY]),i=null;return ur(t).ei({range:r,index:Mr.queryTargetsIndexName},(function(t,n,r){var o=Zn(n);H(e,o.target)&&(i=o,r.done())})).next((function(){return i}))},t.prototype.Ci=function(t,e,n){var r=this,i=[],o=lr(t);return e.forEach((function(e){var a=jn(e.path);i.push(o.put(new jr(n,a))),i.push(r.wi.Fi(t,n,e))})),xn.Bn(i)},t.prototype.Ni=function(t,e,n){var r=this,i=lr(t);return xn.forEach(e,(function(e){var o=jn(e.path);return xn.Bn([i.delete([n,o]),r.wi.$i(t,n,e)])}))},t.prototype.bi=function(t,e){var n=lr(t),r=IDBKeyRange.bound([e],[e+1],!1,!0);return n.delete(r)},t.prototype.ki=function(t,e){var n=IDBKeyRange.bound([e],[e+1],!1,!0),r=lr(t),i=ft();return r.ei({range:n,xi:!0},(function(t,e,n){var r=Vn(t[1]),o=new F(r);i=i.add(o)})).next((function(){return i}))},t.prototype.Mi=function(t,e){var n=jn(e.path),r=IDBKeyRange.bound([n],[T(n)],!1,!0),i=0;return lr(t).ei({index:jr.documentTargetsIndex,xi:!0,range:r},(function(t,e,n){var r=t[0];t[1],0!==r&&(i++,n.done())})).next((function(){return i>0}))},t.prototype.Me=function(t,e){return ur(t).get(e).next((function(t){return t?Zn(t):null}))},t}();function ur(t){return pr.js(t,Mr.store)}function cr(t){return pr.js(t,Fr.store)}function lr(t){return pr.js(t,jr.store)}var hr="Failed to obtain exclusive access to the persistence layer. To allow shared access, make sure to invoke `enablePersistence()` with `synchronizeTabs:true` in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.",fr=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).Oi=e,r.Li=n,r}return i.__extends(e,t),e}(On),pr=function(){function t(e,n,r,i,o,a,s,u,c,l){if(this.allowTabSynchronization=e,this.persistenceKey=n,this.clientId=r,this.bs=o,this.window=a,this.document=s,this.Bi=c,this.qi=l,this.Ui=null,this.Qi=!1,this.isPrimary=!1,this.networkEnabled=!0,this.Wi=null,this.inForeground=!1,this.ji=null,this.Ki=null,this.Gi=Number.NEGATIVE_INFINITY,this.zi=function(t){return Promise.resolve()}
2,!t.Hi())throw new O(A.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.wi=new yr(this,i),this.Yi=n+"main",this.serializer=new Hn(u),this.Ji=new sr(this.wi,this.serializer),this.ss=new zn,this.es=new er(this.serializer,this.ss),this.window&&this.window.localStorage?this.Xi=this.window.localStorage:(this.Xi=null,!1===l&&d("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}return t.js=function(t,e){if(t instanceof fr)return zr.js(t.Oi,e);throw y()},t.prototype.start=function(){var t=this;return zr.Zi(this.Yi,Ir,new Cr(this.serializer)).then((function(e){return t.tr=e,t.er()})).then((function(){if(!t.isPrimary&&!t.allowTabSynchronization)throw new O(A.FAILED_PRECONDITION,hr);return t.nr(),t.sr(),t.ir(),t.runTransaction("getHighestListenSequenceNumber","readonly",(function(e){return t.Ji.Ai(e)}))})).then((function(e){t.Ui=new Dn(e,t.Bi)})).then((function(){t.Qi=!0})).catch((function(e){return t.tr&&t.tr.close(),Promise.reject(e)}))},t.prototype.rr=function(t){var e=this;return this.zi=function(n){return i.__awaiter(e,void 0,void 0,(function(){return i.__generator(this,(function(e){return this.or?[2,t(n)]:[2]}))}))},t(this.isPrimary)},t.prototype.hr=function(t){var e=this;this.tr.ar((function(n){return i.__awaiter(e,void 0,void 0,(function(){return i.__generator(this,(function(e){switch(e.label){case 0:return null===n.newVersion?[4,t()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}
2))}))}))},t.prototype.ur=function(t){var e=this;this.networkEnabled!==t&&(this.networkEnabled=t,this.bs.cr((function(){return i.__awaiter(e,void 0,void 0,(function(){return i.__generator(this,(function(t){switch(t.label){case 0:return this.or?[4,this.er()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))})))},t.prototype.er=function(){var t=this;return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(function(e){return vr(e).put(new qr(t.clientId,Date.now(),t.networkEnabled,t.inForeground)).next((function(){if(t.isPrimary)return t.lr(e).next((function(e){e||(t.isPrimary=!1,t.bs._r((function(){return t.zi(!1)})))}))})).next((function(){return t.dr(e)})).next((function(n){return t.isPrimary&&!n?t.wr(e).next((function(){return!1})):!!n&&t.Tr(e).next((function(){return!0}))}))})).catch((function(e){if(Kr(e))return p("IndexedDbPersistence","Failed to extend owner lease: ",e),t.isPrimary;if(!t.allowTabSynchronization)throw e;return p("IndexedDbPersistence","Releasing owner lease after error during lease refresh",e),!1})).then((function(e){t.isPrimary!==e&&t.bs._r((function(){return t.zi(e)})),t.isPrimary=e}))},t.prototype.lr=function(t){var e=this;return dr(t).get(xr.key).next((function(t){return xn.resolve(e.Er(t))}))},t.prototype.Ir=function(t){return vr(t).delete(this.clientId)},t.prototype.mr=function(){return i.__awaiter(this,void 0,void 0,(function(){var e,n,r,o,a=this;return i.__generator(this,(function(i){switch(i.label){case 0:return!this.isPrimary||this.Ar(this.Gi,18e5)?[3,2]:(this.Gi=Date.now(),[4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(function(e){var n=t.js(e,qr.store);return n.Ws().next((function(t){var e=a.Rr(t,18e5),r=t.filter((function(t){return-1===e.indexOf(t)}));return xn.forEach(r,(function(t){return n.delete(t.clientId)})).next((function(){return r}))}))})).catch((function(){return[]}))]);case 1:if(e=i.sent(),this.Xi)for(n=0,r=e;n<r.length;n++)o=r[n],this.Xi.removeItem(this.Pr(o.clientId));i.label=2;case 2:return[2]}}
2))}))},t.prototype.ir=function(){var t=this;this.Ki=this.bs.Os("client_metadata_refresh",4e3,(function(){return t.er().then((function(){return t.mr()})).then((function(){return t.ir()}))}))},t.prototype.Er=function(t){return!!t&&t.ownerId===this.clientId},t.prototype.dr=function(t){var e=this;return this.qi?xn.resolve(!0):dr(t).get(xr.key).next((function(n){if(null!==n&&e.Ar(n.leaseTimestampMs,5e3)&&!e.Vr(n.ownerId)){if(e.Er(n)&&e.networkEnabled)return!0;if(!e.Er(n)){if(!n.allowTabSynchronization)throw new O(A.FAILED_PRECONDITION,hr);return!1}}return!(!e.networkEnabled||!e.inForeground)||vr(t).Ws().next((function(t){return void 0===e.Rr(t,5e3).find((function(t){if(e.clientId!==t.clientId){var n=!e.networkEnabled&&t.networkEnabled,r=!e.inForeground&&t.inForeground,i=e.networkEnabled===t.networkEnabled;if(n||r&&i)return!0}return!1}))}))})).next((function(t){return e.isPrimary!==t&&p("IndexedDbPersistence","Client "+(t?"is":"is not")+" eligible for a primary lease."),t}))},t.prototype.gr=function(){return i.__awaiter(this,void 0,void 0,(function(){var t=this;return i.__generator(this,(function(e){switch(e.label){case 0:return this.Qi=!1,this.yr(),this.Ki&&(this.Ki.cancel(),this.Ki=null),this.pr(),this.br(),[4,this.runTransaction("shutdown","readwrite",(function(e){return t.wr(e).next((function(){return t.Ir(e)}))})).catch((function(t){p("IndexedDbPersistence","Proceeding with shutdown despite failure: ",t)}))];case 1:return e.sent(),this.tr.close(),this.vr(),[2]}}))}))},t.prototype.Rr=function(t,e){var n=this;return t.filter((function(t){return n.Ar(t.updateTimeMs,e)&&!n.Vr(t.clientId)}))},t.prototype.Sr=function(){var t=this;return this.runTransaction("getActiveClients","readonly",(function(e){return vr(e).Ws().next((function(e){return t.Rr(e,18e5).map((function(t){return t.clientId}))}))}))},Object.defineProperty(t.prototype,"or",{get:function(){return this.Qi},enumerable:!1,configurable:!0}),t.prototype.Dr=function(t){return br.Cr(t,this.serializer,this.ss,this.wi)},t.prototype.Fr=function(){return this.Ji},t.prototype.Nr=function(){return this.es},t.prototype.$r=function(){return this.ss},t.prototype.runTransaction=function(t,e,n){var r=this;p("IndexedDbPersistence","Starting transaction:",t);var i,o="readonly"===e?"readonly":"readwrite";return this.tr.runTransaction(o,Br,(function(o){return i=new fr(o,r.Ui?r.Ui.next():Dn.ps),"readwrite-primary"===e?r.lr(i).next((function(t){return!!t||r.dr(i)})).next((function(e){if(!e)throw d("Failed to obtain primary lease for action '"+t+"'."),r.isPrimary=!1,r.bs._r((function(){return r.zi(!1)})),new O(A.FAILED_PRECONDITION,An);return n(i)})).next((function(t){return r.Tr(i).next((function(){return t}))})):r.kr(i).next((function(){return n(i)}))})).then((function(t){return i.ts(),t}))},t.prototype.kr=function(t){var e=this;return dr(t).get(xr.key).next((function(t){if(null!==t&&e.Ar(t.leaseTimestampMs,5e3)&&!e.Vr(t.ownerId)&&!e.Er(t)&&!(e.qi||e.allowTabSynchronization&&t.allowTabSynchronization))throw new O(A.FAILED_PRECONDITION,hr)}))},t.prototype.Tr=function(t){var e=new xr(this.clientId,this.allowTabSynchronization,Date.now());return dr(t).put(xr.key,e)},t.Hi=function(){return zr.Hi()},t.prototype.wr=function(t){var e=this,n=dr(t);return n.get(xr.key).next((function(t){return e.Er(t)?(p("IndexedDbPersistence","Releasing primary lease."),n.delete(xr.key)):xn.resolve()}))},t.prototype.Ar=function(t,e){var n=Date.now();return!(t<n-e||t>n&&(d("Detected an update time that is in the future: "+t+" > "+n),1))},t.prototype.nr=function(){var t=this;null!==this.document&&"function"==typeof this.document.addEventListener&&(this.ji=function(){t.bs.cr((function(){return t.inForeground="visible"===t.document.visibilityState,t.er()}))},this.document.addEventListener("visibilitychange",this.ji),this.inForeground="visible"===this.document.visibilityState)},t.prototype.pr=function(){this.ji&&(this.document.removeEventListener("visibilitychange",this.ji),this.ji=null)},t.prototype.sr=function(){var t,e=this;"function"==typeof(null===(t=this.window)||void 0===t?void 0:t.addEventListener)&&(this.Wi=function(){e.yr(),e.bs.cr((function(){return e.gr()}))},this.window.addEventListener("unload",this.Wi))},t.prototype.br=function(){this.Wi&&(this.window.removeEventListener("unload",this.Wi),this.Wi=null)},t.prototype.Vr=function(t){var e;try{var n=null!==(null===(e=this.Xi)||void 0===e?void 0:e.getItem(this.Pr(t)));return p("IndexedDbPersistence","Client '"+t+"' "+(n?"is":"is not")+" zombied in LocalStorage"),n}catch(t){return d("IndexedDbPersistence","Failed to get zombied client id.",t),!1}},t.prototype.yr=function(){if(this.Xi)try{this.Xi.setItem(this.Pr(this.clientId),String(Date.now()))}catch(t){d("Failed to set zombie client id.",t)}},t.prototype.vr=function(){if(this.Xi)try{this.Xi.removeItem(this.Pr(this.clientId))}catch(t){}},t.prototype.Pr=function(t){return"firestore_zombie_"+this.persistenceKey+"_"+t},t}();function dr(t){return pr.js(t,xr.store)}function vr(t){return pr.js(t,qr.store)}var yr=function(){function t(t,e){this.db=t,this.xr=new si(this,e)}return t.prototype.Mr=function(t){var e=this.Or(t);return this.db.Fr().Si(t).next((function(t){return e.next((function(e){return t+e}))}))},t.prototype.Or=function(t){var e=0;return this.Lr(t,(function(t){e++})).next((function(){return e}))},t.prototype.pe=function(t,e){return this.db.Fr().pe(t,e)},t.prototype.Lr=function(t,e){return this.Br(t,(function(t,n){return e(n)}))},t.prototype.Fi=function(t,e,n){return gr(t,n)},t.prototype.$i=function(t,e,n){return gr(t,n)},t.prototype.vi=function(t,e,n){return this.db.Fr().vi(t,e,n)},t.prototype.qr=function(t,e){return gr(t,e)},t.prototype.Ur=function(t,e){return function(t,e){var n=!1;return Sr(t).Qr((function(r){return _r(t,r,e).next((function(t){return t&&(n=!0),xn.resolve(!t)}))})).next((function(){return n}))}(t,e)},t.prototype.Wr=function(t,e){var n=this,r=this.db.Nr().oi(),i=[],o=0;return this.Br(t,(function(a,s){if(s<=e){var u=n.Ur(t,a).next((function(e){if(!e)return o++,r.zn(t,a).next((function(){return r.Gn(a),lr(t).delete([0,jn(a.path)])}))}));i.push(u)}})).next((function(){return xn.Bn(i)})).next((function(){return r.apply(t)})).next((function(){return o}
2))},t.prototype.removeTarget=function(t,e){var n=e.Z(t.Li);return this.db.Fr().yi(t,n)},t.prototype.jr=function(t,e){return gr(t,e)},t.prototype.Br=function(t,e){var n,r=lr(t),i=Dn.ps;return r.ei({index:jr.documentTargetsIndex},(function(t,r){var o=t[0],a=(t[1],r.path),s=r.sequenceNumber;0===o?(i!==Dn.ps&&e(new F(Vn(n)),i),i=s,n=a):i=Dn.ps})).next((function(){i!==Dn.ps&&e(new F(Vn(n)),i)}))},t.prototype.Kr=function(t){return this.db.Nr().ui(t)},t}();function gr(t,e){return lr(t).put(function(t,e){return new jr(0,jn(t.path),e)}(e,t.Li))}function mr(t,e){var n=t.projectId;return t.i||(n+="."+t.database),"firestore/"+e+"/"+n+"/"}var br=function(){function t(t,e,n,r){this.userId=t,this.serializer=e,this.ss=n,this.wi=r,this.Gr={}}return t.Cr=function(e,n,r,i){return g(""!==e.uid),new t(e.zr()?e.uid:"",n,r,i)},t.prototype.Hr=function(t){var e=!0,n=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return Er(t).ei({index:Ar.userMutationsIndex,range:n},(function(t,n,r){e=!1,r.done()})).next((function(){return e}))},t.prototype.Yr=function(t,e,n,r){var i=this,o=Tr(t),a=Er(t);return a.add({}).next((function(s){g("number"==typeof s);for(var u=new Cn(s,e,n,r),c=function(t,e,n){var r=n.baseMutations.map((function(e){return le(t.Ks,e)})),i=n.mutations.map((function(e){return le(t.Ks,e)}));return new Ar(e,n.batchId,n.yn.toMillis(),r,i)}(i.serializer,i.userId,u),l=[],h=new rt((function(t,e){return w(t.N(),e.N())})),f=0,p=r;f<p.length;f++){var d=p[f],v=Or.key(i.userId,d.key.path,s);h=h.add(d.key.path.p()),l.push(a.put(c)),l.push(o.put(v,Or.PLACEHOLDER))}return h.forEach((function(e){l.push(i.ss.Us(t,e))})),t.Zn((function(){i.Gr[s]=u.keys()})),xn.Bn(l).next((function(){return u}))}))},t.prototype.Jr=function(t,e){var n=this;return Er(t).get(e).next((function(t){return t?(g(t.userId===n.userId),Jn(n.serializer,t)):null}))},t.prototype.Xr=function(t,e){var n=this;return this.Gr[e]?xn.resolve(this.Gr[e]):this.Jr(t,e).next((function(t){if(t){var r=t.keys();return n.Gr[e]=r,r}return null}))},t.prototype.Zr=function(t,e){var n=this,r=e+1,i=IDBKeyRange.lowerBound([this.userId,r]),o=null;return Er(t).ei({index:Ar.userMutationsIndex,range:i},(function(t,e,i){e.userId===n.userId&&(g(e.batchId>=r),o=Jn(n.serializer,e)),i.done()})).next((function(){return o}))},t.prototype.to=function(t){var e=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),n=-1;return Er(t).ei({index:Ar.userMutationsIndex,range:e,reverse:!0},(function(t,e,r){n=e.batchId,r.done()})).next((function(){return n}))},t.prototype.eo=function(t){var e=this,n=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return Er(t).Ws(Ar.userMutationsIndex,n).next((function(t){return t.map((function(t){return Jn(e.serializer,t)}))}))},t.prototype.os=function(t,e){var n=this,r=Or.prefixForPath(this.userId,e.path),i=IDBKeyRange.lowerBound(r),o=[];return Tr(t).ei({range:i},(function(r,i,a){var s=r[0],u=r[1],c=r[2],l=Vn(u);if(s===n.userId&&e.path.isEqual(l))return Er(t).get(c).next((function(t){if(!t)throw y();g(t.userId===n.userId),o.push(Jn(n.serializer,t))}));a.done()})).next((function(){return o}))},t.prototype.ls=function(t,e){var n=this,r=new rt(w),i=[];return e.forEach((function(e){var o=Or.prefixForPath(n.userId,e.path),a=IDBKeyRange.lowerBound(o),s=Tr(t).ei({range:a},(function(t,i,o){var a=t[0],s=t[1],u=t[2],c=Vn(s);a===n.userId&&e.path.isEqual(c)?r=r.add(u):o.done()}));i.push(s)})),xn.Bn(i).next((function(){return n.no(t,r)}))},t.prototype.Es=function(t,e){var n=this,r=e.path,i=r.length+1,o=Or.prefixForPath(this.userId,r),a=IDBKeyRange.lowerBound(o),s=new rt(w);return Tr(t).ei({range:a},(function(t,e,o){var a=t[0],u=t[1],c=t[2],l=Vn(u);a===n.userId&&r.D(l)?l.length===i&&(s=s.add(c)):o.done()})).next((function(){return n.no(t,s)}))},t.prototype.no=function(t,e){var n=this,r=[],i=[];return e.forEach((function(e){i.push(Er(t).get(e).next((function(t){if(null===t)throw y();g(t.userId===n.userId),r.push(Jn(n.serializer,t))})))})),xn.Bn(i).next((function(){return r}))},t.prototype.so=function(t,e){var n=this;return wr(t.Oi,this.userId,e).next((function(r){return t.Zn((function(){n.io(e.batchId)})),xn.forEach(r,(function(e){return n.wi.qr(t,e)}))}
2))},t.prototype.io=function(t){delete this.Gr[t]},t.prototype.ro=function(t){var e=this;return this.Hr(t).next((function(n){if(!n)return xn.resolve();var r=IDBKeyRange.lowerBound(Or.prefixForUser(e.userId)),i=[];return Tr(t).ei({range:r},(function(t,n,r){if(t[0]===e.userId){var o=Vn(t[1]);i.push(o)}else r.done()})).next((function(){g(0===i.length)}))}))},t.prototype.Mi=function(t,e){return _r(t,this.userId,e)},t.prototype.oo=function(t){var e=this;return Sr(t).get(this.userId).next((function(t){return t||new Nr(e.userId,-1,"")}))},t}();function _r(t,e,n){var r=Or.prefixForPath(e,n.path),i=r[1],o=IDBKeyRange.lowerBound(r),a=!1;return Tr(t).ei({range:o,xi:!0},(function(t,n,r){var o=t[0],s=t[1];t[2],o===e&&s===i&&(a=!0),r.done()})).next((function(){return a}))}function wr(t,e,n){var r=t.store(Ar.store),i=t.store(Or.store),o=[],a=IDBKeyRange.only(n.batchId),s=0,u=r.ei({range:a},(function(t,e,n){return s++,n.delete()}));o.push(u.next((function(){g(1===s)})));for(var c=[],l=0,h=n.mutations;l<h.length;l++){var f=h[l],p=Or.key(e,f.key.path,n.batchId);o.push(i.delete(p)),c.push(f.key)}return xn.Bn(o).next((function(){return c}))}function Er(t){return pr.js(t,Ar.store)}function Tr(t){return pr.js(t,Or.store)}function Sr(t){return pr.js(t,Nr.store)}var Ir=10,Cr=function(){function t(t){this.serializer=t}return t.prototype.createOrUpgrade=function(t,e,n,r){var i=this;g(n<r&&n>=0&&r<=Ir);var o=new Gr(e);n<1&&r>=1&&(function(t){t.createObjectStore(xr.store)}(t),function(t){t.createObjectStore(Nr.store,{keyPath:Nr.keyPath}),t.createObjectStore(Ar.store,{keyPath:Ar.keyPath,autoIncrement:!0}).createIndex(Ar.userMutationsIndex,Ar.userMutationsKeyPath,{unique:!0}),t.createObjectStore(Or.store)}(t),Vr(t),function(t){t.createObjectStore(Dr.store)}(t));var a=xn.resolve();return n<3&&r>=3&&(0!==n&&(function(t){t.deleteObjectStore(jr.store),t.deleteObjectStore(Mr.store),t.deleteObjectStore(Fr.store)}(t),Vr(t)),a=a.next((function(){return function(t){var e=t.store(Fr.store),n=new Fr(0,0,R.min().A(
2),0);return e.put(Fr.key,n)}(o)}))),n<4&&r>=4&&(0!==n&&(a=a.next((function(){return function(t,e){return e.store(Ar.store).Ws().next((function(n){t.deleteObjectStore(Ar.store),t.createObjectStore(Ar.store,{keyPath:Ar.keyPath,autoIncrement:!0}).createIndex(Ar.userMutationsIndex,Ar.userMutationsKeyPath,{unique:!0});var r=e.store(Ar.store),i=n.map((function(t){return r.put(t)}));return xn.Bn(i)}))}(t,o)}))),a=a.next((function(){!function(t){t.createObjectStore(qr.store,{keyPath:qr.keyPath})}(t)}))),n<5&&r>=5&&(a=a.next((function(){return i.removeAcknowledgedMutations(o)}))),n<6&&r>=6&&(a=a.next((function(){return function(t){t.createObjectStore(Lr.store)}(t),i.addDocumentGlobal(o)}))),n<7&&r>=7&&(a=a.next((function(){return i.ensureSequenceNumbers(o)}))),n<8&&r>=8&&(a=a.next((function(){return i.createCollectionParentIndex(t,o)}))),n<9&&r>=9&&(a=a.next((function(){!function(t){t.objectStoreNames.contains("remoteDocumentChanges")&&t.deleteObjectStore("remoteDocumentChanges")}(t),function(t){var e=t.objectStore(Dr.store);e.createIndex(Dr.readTimeIndex,Dr.readTimeIndexPath,{unique:!1}),e.createIndex(Dr.collectionReadTimeIndex,Dr.collectionReadTimeIndexPath,{unique:!1})}(e)}))),n<10&&r>=10&&(a=a.next((function(){return i.rewriteCanonicalIds(o)}))),a},t.prototype.addDocumentGlobal=function(t){var e=0;return t.store(Dr.store).ei((function(t,n){e+=or(n)})).next((function(){var n=new Lr(e);return t.store(Lr.store).put(Lr.key,n)}))},t.prototype.removeAcknowledgedMutations=function(t){var e=this,n=t.store(Nr.store),r=t.store(Ar.store);return n.Ws().next((function(n){return xn.forEach(n,(function(n){var i=IDBKeyRange.bound([n.userId,-1],[n.userId,n.lastAcknowledgedBatchId]);return r.Ws(Ar.userMutationsIndex,i).next((function(r){return xn.forEach(r,(function(r){g(r.userId===n.userId);var i=Jn(e.serializer,r);return wr(t,n.userId,i).next((function(){}))}))}))}))}))},t.prototype.ensureSequenceNumbers=function(t){var e=t.store(jr.store),n=t.store(Dr.store);return t.store(Fr.store).get(Fr.key).next((function(t){var r=[];return n.ei((function(n,i){var o=new L(n),a=function(t){return[0,jn(t)]}(o);r.push(e.get(a).next((function(n){return n?xn.resolve():function(n){return e.put(new jr(0,jn(n),t.highestListenSequenceNumber))}(o)})))})).next((function(){return xn.Bn(r)}))}))},t.prototype.createCollectionParentIndex=function(t,e){t.createObjectStore(Ur.store,{keyPath:Ur.keyPath});var n=e.store(Ur.store),r=new Bn,i=function(t){if(r.add(t)){var e=t.S(),i=t.p();return n.put({collectionId:e,parent:jn(i)})}};return e.store(Dr.store).ei({xi:!0},(function(t,e){var n=new L(t);return i(n.p())})).next((function(){return e.store(Or.store).ei({xi:!0},(function(t,e){t[0];var n=t[1],r=(t[2],Vn(n));return i(r.p())}))}))},t.prototype.rewriteCanonicalIds=function(t){var e=this,n=t.store(Mr.store);return n.ei((function(t,r){var i=Zn(r),o=tr(e.serializer,i);return n.put(o)}))},t}(),kr=function(t,e){this.seconds=t,this.nanoseconds=e},xr=function(t,e,n){this.ownerId=t,this.allowTabSynchronization=e,this.leaseTimestampMs=n};xr.store="owner",xr.key="owner";var Nr=function(t,e,n){this.userId=t,this.lastAcknowledgedBatchId=e,this.lastStreamToken=n};Nr.store="mutationQueues",Nr.keyPath="userId";var Ar=function(t,e,n,r,i){this.userId=t,this.batchId=e,this.localWriteTimeMs=n,this.baseMutations=r,this.mutations=i};Ar.store="mutations",Ar.keyPath="batchId",Ar.userMutationsIndex="userMutationsIndex",Ar.userMutationsKeyPath=["userId","batchId"];var Or=function(){function t(){}return t.prefixForUser=function(t){return[t]},t.prefixForPath=function(t,e){return[t,jn(e)]},t.key=function(t,e,n){return[t,jn(e),n]},t}();Or.store="documentMutations",Or.PLACEHOLDER=new Or;var Pr=function(t,e){this.path=t,this.readTime=e},Rr=function(t,e){this.path=t,this.version=e},Dr=function(t,e,n,r,i,o){this.unknownDocument=t,this.noDocument=e,this.document=n,this.hasCommittedMutations=r,this.readTime=i,this.parentPath=o};Dr.store="remoteDocuments",Dr.readTimeIndex="readTimeIndex",Dr.readTimeIndexPath="readTime",Dr.collectionReadTimeIndex="collectionReadTimeIndex",Dr.collectionReadTimeIndexPath=["parentPath","readTime"];var Lr=function(t){this.byteSize=t};Lr.store="remoteDocumentGlobal",Lr.key="remoteDocumentGlobalKey";var Mr=function(t,e,n,r,i,o,a){this.targetId=t,this.canonicalId=e,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=i,this.lastLimboFreeSnapshotVersion=o,this.query=a};Mr.store="targets",Mr.keyPath="targetId",Mr.queryTargetsIndexName="queryTargetsIndex",Mr.queryTargetsKeyPath=["canonicalId","targetId"];var jr=function(t,e,n){this.targetId=t,this.path=e,this.sequenceNumber=n};jr.store="targetDocuments",jr.keyPath=["targetId","path"],jr.documentTargetsIndex="documentTargetsIndex",jr.documentTargetsKeyPath=["path","targetId"];var Fr=function(t,e,n,r){this.highestTargetId=t,this.highestListenSequenceNumber=e,this.lastRemoteSnapshotVersion=n,this.targetCount=r};Fr.key="targetGlobalKey",Fr.store="targetGlobal";var Ur=function(t,e){this.collectionId=t,this.parent=e};function Vr(t){t.createObjectStore(jr.store,{keyPath:jr.keyPath}).createIndex(jr.documentTargetsIndex,jr.documentTargetsKeyPath,{unique:!0}),t.createObjectStore(Mr.store,{keyPath:Mr.keyPath}).createIndex(Mr.queryTargetsIndexName,Mr.queryTargetsKeyPath,{unique:!0}),t.createObjectStore(Fr.store)}Ur.store="collectionParents",Ur.keyPath=["collectionId","parent"];var qr=function(t,e,n,r){this.clientId=t,this.updateTimeMs=e,this.networkEnabled=n,this.inForeground=r};qr.store="clientMetadata",qr.keyPath="clientId";var Br=i.__spreadArrays(i.__spreadArrays(i.__spreadArrays([Nr.store,Ar.store,Or.store,Dr.store,Mr.store,xr.store,Fr.store,jr.store],[qr.store]),[Lr.store]),[Ur.store]),zr=function(){function e(t){this.db=t,12.2===e.ho(s.getUA())&&d("Firestore persistence suffers from a bug in
2iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}return e.Zi=function(t,n,r){return p("SimpleDb","Opening database:",t),new xn((function(i,o){var a=indexedDB.open(t,n);a.onsuccess=function(t){var n=t.target.result;i(new e(n))},a.onblocked=function(){o(new O(A.FAILED_PRECONDITION,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},a.onerror=function(t){var e=t.target.error;"VersionError"===e.name?o(new O(A.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):o(e)},a.onupgradeneeded=function(e){p("SimpleDb",'Database "'+t+'" requires upgrade from version:',e.oldVersion);var n=e.target.result;r.createOrUpgrade(n,a.transaction,e.oldVersion,Ir).next((function(){p("SimpleDb","Database upgrade to version "+Ir+" complete")}))}})).On()},e.delete=function(t){return p("SimpleDb","Removing database:",t),$r(window.indexedDB.deleteDatabase(t)).On()},e.Hi=function(){if("undefined"==typeof indexedDB)return!1;if(e.ao())return!0;var t=s.getUA(),n=e.ho(t),r=0<n&&n<10,i=e.uo(t),o=0<i&&i<4.5;return!(t.indexOf("MSIE ")>0||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||r||o)},e.ao=function(){var e;return"undefined"!=typeof t&&"YES"===(null===(e=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}))||void 0===e?void 0:e.co)},e.js=function(t,e){return t.store(e)},e.ho=function(t){var e=t.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=e?e[1].split("_").slice(0,2).join("."):"-1";return Number(n)},e.uo=function(t){var e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)},e.prototype.ar=function(t){this.db.onversionchange=function(e){return t(e)}},e.prototype.runTransaction=function(t,e,n){return i.__awaiter(this,void 0,void 0,(function(){var r,o,a,s,u;return i.__generator(this,(function(c){switch(c.label){case 0:r="readonly"===t,o=0,a=function(){var t,a,u,c,l;return i.__generator(this,(function(i){switch(i.label){case 0:++o,t=Gr.open(s.db,r?"readonly":"readwrite",e),i.label=1;case 1:return i.trys.push([1,3,,4]),a=n(t).catch((function(e){return t.abort(e),xn.reject(e)})).On(),u={},a.catch((function(){})),[4,t.lo];case 2:return[2,(u.value=(i.sent(),a),u)];case 3:return c=i.sent(),l="FirebaseError"!==c.name&&o<3,p("SimpleDb","Transaction failed with error: %s. Retrying: %s.",c.message,l),l?[3,4]:[2,{value:Promise.reject(c)}];case 4:return[2]}}
2))},s=this,c.label=1;case 1:return[5,a()];case 2:if("object"==typeof(u=c.sent()))return[2,u.value];c.label=3;case 3:return[3,1];case 4:return[2]}}))}))},e.prototype.close=function(){this.db.close()},e}(),Wr=function(){function t(t){this._o=t,this.fo=!1,this.do=null}return Object.defineProperty(t.prototype,"$n",{get:function(){return this.fo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wo",{get:function(){return this.do},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cursor",{set:function(t){this._o=t},enumerable:!1,configurable:!0}),t.prototype.done=function(){this.fo=!0},t.prototype.ni=function(t){this.do=t},t.prototype.delete=function(){return $r(this._o.delete())},t}(),Hr=function(t){function e(e){var n=this;return(n=t.call(this,A.UNAVAILABLE,"IndexedDB transaction failed: "+e)||this).name="IndexedDbTransactionError",n}return i.__extends(e,t),e}(O);function Kr(t){return"IndexedDbTransactionError"===t.name}var Gr=function(){function t(t){var e=this;this.transaction=t,this.aborted=!1,this.To=new Ln,this.transaction.oncomplete=function(){e.To.resolve()},this.transaction.onabort=function(){t.error?e.To.reject(new Hr(t.error)):e.To.resolve()},this.transaction.onerror=function(t){var n=Yr(t.target.error);e.To.reject(new Hr(n))}}return t.open=function(e,n,r){return new t(e.transaction(r,n))},Object.defineProperty(t.prototype,"lo",{get:function(){return this.To.promise},enumerable:!1,configurable:!0}),t.prototype.abort=function(t){t&&this.To.reject(t),this.aborted||(p("SimpleDb","Aborting transaction:",t?t.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())},t.prototype.store=function(t){var e=this.transaction.objectStore(t);return new Qr(e)},t}(),Qr=function(){function t(t){this.store=t}return t.prototype.put=function(t,e){var n;return void 0!==e?(p("SimpleDb","PUT",this.store.name,t,e),n=this.store.put(e,t)):(p("SimpleDb","PUT",this.store.name,"<auto-key>",t),n=this.store.put(t)),$r(n)},t.prototype.add=function(t){return p("SimpleDb","ADD",this.store.name,t,t),$r(this.store.add(t))},t.prototype.get=function(t){var e=this;return $r(this.store.get(t)).next((function(n){return void 0===n&&(n=null),p("SimpleDb","GET",e.store.name,t,n),n}))},t.prototype.delete=function(t){return p("SimpleDb","DELETE",this.store.name,t),$r(this.store.delete(t))},t.prototype.count=function(){return p("SimpleDb","COUNT",this.store.name),$r(this.store.count())},t.prototype.Ws=function(t,e){var n=this.cursor(this.options(t,e)),r=[];return this.Eo(n,(function(t,e){r.push(e)})).next((function(){return r}))},t.prototype.Io=function(t,e){p("SimpleDb","DELETE ALL",this.store.name);var n=this.options(t,e);n.xi=!1;var r=this.cursor(n);return this.Eo(r,(function(t,e,n){return n.delete()}))},t.prototype.ei=function(t,e){var n;e?n=t:(n={},e=t);var r=this.cursor(n);return this.Eo(r,e)},t.prototype.Qr=function(t){var e=this.cursor({});return new xn((function(n,r){e.onerror=function(t){var e=Yr(t.target.error);r(e)},e.onsuccess=function(e){var r=e.target.result;r?t(r.primaryKey,r.value).next((function(t){t?r.continue():n()})):n()}}))},t.prototype.Eo=function(t,e){var n=[];return new xn((function(r,i){t.onerror=function(t){i(t.target.error)},t.onsuccess=function(t){var i=t.target.result;if(i){var o=new Wr(i),a=e(i.primaryKey,i.value,o);if(a instanceof xn){var s=a.catch((function(t){return o.done(),xn.reject(t)}));n.push(s)}o.$n?r():null===o.wo?i.continue():i.continue(o.wo)}else r()}})).next((function(){return xn.Bn(n)}))},t.prototype.options=function(t,e){var n=void 0;return void 0!==t&&("string"==typeof t?n=t:e=t),{index:n,range:e}},t.prototype.cursor=function(t){var e="next";if(t.reverse&&(e="prev"),t.index){var n=this.store.index(t.index);return t.xi?n.openKeyCursor(t.range,e):n.openCursor(t.range,e)}return this.store.openCursor(t.range,e)},t}();function $r(t){return new xn((function(e,n){t.onsuccess=function(t){var n=t.target.result;e(n)},t.onerror=function(t){var e=Yr(t.target.error);n(e)}}))}var Xr=!1;function Yr(t){var e=zr.ho(s.getUA());if(e>=12.2&&e<13){var n="An internal error was encountered in the Indexed Database server";if(t.message.indexOf(n)>=0){var r=new O("internal","IOS_INDEXEDDB_BUG1: IndexedDb has thrown '"+n+"'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.");return Xr||(Xr=!0,setTimeout((function(){throw r}),0)),r}}return t}function Jr(){return"undefined"!=typeof window?window:null}var Zr=function(){function t(t,e,n,r,i){this.mo=t,this.vs=e,this.Ao=n,this.op=r,this.Ro=i,this.Po=new Ln,this.then=this.Po.promise.then.bind(this.Po.promise),this.Po.promise.catch((function(t){}))}return t.Vo=function(e,n,r,i,o){var a=new t(e,n,Date.now()+r,i,o);return a.start(r),a},t.prototype.start=function(t){var e=this;this.yo=setTimeout((function(){return e.po()}),t)},t.prototype.Bs=function(){return this.po()},t.prototype.cancel=function(t){null!==this.yo&&(this.clearTimeout(),this.Po.reject(new O(A.CANCELLED,"Operation cancelled"+(t?": "+t:"")))
2)},t.prototype.po=function(){var t=this;this.mo.cr((function(){return null!==t.yo?(t.clearTimeout(),t.op().then((function(e){return t.Po.resolve(e)}))):Promise.resolve()}))},t.prototype.clearTimeout=function(){null!==this.yo&&(this.Ro(this),clearTimeout(this.yo),this.yo=null)},t}(),ti=function(){function t(){var t=this;this.bo=Promise.resolve(),this.vo=[],this.So=!1,this.Do=[],this.Co=null,this.Fo=!1,this.No=[],this.$o=new Mn(this,"async_queue_retry"),this.ko=function(){return t.$o.Ls()};var e=Jr();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.ko)}return Object.defineProperty(t.prototype,"xo",{get:function(){return this.So},enumerable:!1,configurable:!0}),t.prototype.cr=function(t){this.enqueue(t)},t.prototype.Mo=function(t){this.Oo(),this.Lo(t)},t.prototype.Bo=function(t){return this.Oo(),this.Lo(t)},t.prototype.qo=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e;return i.__generator(this,(function(n){switch(n.label){case 0:return this.Oo(),this.So?[3,2]:(this.So=!0,(e=Jr())&&e.removeEventListener("visibilitychange",this.ko),[4,this.Bo(t)]);case 1:n.sent(),n.label=2;case 2:return[2]}}
2))}))},t.prototype.enqueue=function(t){return this.Oo(),this.So?new Promise((function(t){})):this.Lo(t)},t.prototype._r=function(t){var e=this;this.vo.push(t),this.cr((function(){return e.Uo()}))},t.prototype.Uo=function(){return i.__awaiter(this,void 0,void 0,(function(){var t,e=this;return i.__generator(this,(function(n){switch(n.label){case 0:if(0===this.vo.length)return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.vo[0]()];case 2:return n.sent(),this.vo.shift(),this.$o.reset(),[3,4];case 3:if(!Kr(t=n.sent()))throw t;return p("AsyncQueue","Operation failed with retryable error: "+t),[3,4];case 4:this.vo.length>0&&this.$o.xs((function(){return e.Uo()})),n.label=5;case 5:return[2]}}))}))},t.prototype.Lo=function(t){var e=this,n=this.bo.then((function(){return e.Fo=!0,t().catch((function(t){throw e.Co=t,e.Fo=!1,d("INTERNAL UNHANDLED ERROR: ",function(t){var e=t.message||"";return t.stack&&(e=t.stack.includes(t.message)?t.stack:t.message+"\n"+t.stack),e}(t)),t})).then((function(t){return e.Fo=!1,t}))}));return this.bo=n,n},t.prototype.Os=function(t,e,n){var r=this;this.Oo(),this.No.indexOf(t)>-1&&(e=0);var i=Zr.Vo(this,t,e,n,(function(t){return r.Qo(t)}));return this.Do.push(i),i},t.prototype.Oo=function(){this.Co&&y()},t.prototype.Wo=function(){},t.prototype.jo=function(){return i.__awaiter(this,void 0,void 0,(function(){var t;return i.__generator(this,(function(e){switch(e.label){case 0:return[4,t=this.bo];case 1:e.sent(),e.label=2;case 2:if(t!==this.bo)return[3,0];e.label=3;case 3:return[2]}}
2))}))},t.prototype.Ko=function(t){for(var e=0,n=this.Do;e<n.length;e++)if(n[e].vs===t)return!0;return!1},t.prototype.Go=function(t){var e=this;return this.jo().then((function(){e.Do.sort((function(t,e){return t.Ao-e.Ao}));for(var n=0,r=e.Do;n<r.length;n++){var i=r[n];if(i.Bs(),"all"!==t&&i.vs===t)break}return e.jo()}))},t.prototype.zo=function(t){this.No.push(t)},t.prototype.Qo=function(t){var e=this.Do.indexOf(t);this.Do.splice(e,1)},t}();function ei(t,e){if(d("AsyncQueue",e+": "+t),Kr(t))return new O(A.UNAVAILABLE,e+": "+t);throw t}function ni(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=w(n,i);return 0===a?w(r,o):a}var ri=function(){function t(t){this.Ho=t,this.buffer=new rt(ni),this.Yo=0}return t.prototype.Jo=function(){return++this.Yo},t.prototype.Xo=function(t){var e=[t,this.Jo()];if(this.buffer.size<this.Ho)this.buffer=this.buffer.add(e);else{var n=this.buffer.last();ni(e,n)<0&&(this.buffer=this.buffer.delete(n).add(e))}},Object.defineProperty(t.prototype,"maxValue",{get:function(){return this.buffer.last()[0]},enumerable:!1,configurable:!0}),t}(),ii={Zo:!1,th:0,eh:0,nh:0},oi=function(){function t(t,e,n){this.sh=t,this.ih=e,this.rh=n}return t.oh=function(e){return new t(e,t.hh,t.ah)},t}();oi.uh=-1,oi.lh=1048576,oi._h=41943040,oi.hh=10,oi.ah=1e3,oi.fh=new oi(oi._h,oi.hh,oi.ah),oi.dh=new oi(oi.uh,0,0);var ai=function(){function t(t,e){this.xr=t,this.mo=e,this.wh=!1,this.Th=null}return t.prototype.start=function(t){this.xr.params.sh!==oi.uh&&this.Eh(t)},t.prototype.stop=function(){this.Th&&(this.Th.cancel(),this.Th=null)},Object.defineProperty(t.prototype,"or",{get:function(){return null!==this.Th},enumerable:!1,configurable:!0}),t.prototype.Eh=function(t){var e=this,n=this.wh?3e5:6e4;p("LruGarbageCollector","Garbage collection scheduled in "+n+"ms"),this.Th=this.mo.Os("lru_garbage_collection",n,(function(){return i.__awaiter(e,void 0,void 0,(function(){var e;return i.__generator(this,(function(n){switch(n.label){case 0:this.Th=null,this.wh=!0,n.label=1;case 1:return n.trys.push([1,3,,7]),[4,t.Ih(this.xr)];case 2:return n.sent(),[3,7];case 3:return Kr(e=n.sent())?(p("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",e),[3,6]):[3,4];case 4:return[4,hi(e)];case 5:n.sent(),n.label=6;case 6:return[3,7];case 7:return[4,this.Eh(t)];case 8:return n.sent(),[2]}}))}))}))},t}(),si=function(){function t(t,e){this.mh=t,this.params=e}return t.prototype.Ah=function(t,e){return this.mh.Mr(t).next((function(t){return Math.floor(e/100*t)}))},t.prototype.Rh=function(t,e){var n=this;if(0===e)return xn.resolve(Dn.ps);var r=new ri(e);return this.mh.pe(t,(function(t){return r.Xo(t.sequenceNumber)})).next((function(){return n.mh.Lr(t,(function(t){return r.Xo(t)}))})).next((function(){return r.maxValue}))},t.prototype.vi=function(t,e,n){return this.mh.vi(t,e,n)},t.prototype.Wr=function(t,e){return this.mh.Wr(t,e)},t.prototype.Ph=function(t,e){var n=this;return this.params.sh===oi.uh?(p("LruGarbageCollector","Garbage collection skipped; disabled"),xn.resolve(ii)):this.Kr(t).next((function(r){return r<n.params.sh?(p("LruGarbageCollector","Garbage collection skipped; Cache size "+r+" is lower than threshold "+n.params.sh),ii):n.Vh(t,e)}))},t.prototype.Kr=function(t){return this.mh.Kr(t)},t.prototype.Vh=function(t,e){var n,r,i,o,s,u,c,l=this,h=Date.now();return this.Ah(t,this.params.ih).next((function(e){return e>l.params.rh?(p("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of "+l.params.rh+" from "+e),r=l.params.rh):r=e,o=Date.now(),l.Rh(t,r)})).next((function(r){return n=r,s=Date.now(),l.vi(t,n,e)})).next((function(e){return i=e,u=Date.now(),l.Wr(t,n)})).next((function(t){return c=Date.now(),f()<=a.LogLevel.DEBUG&&p("LruGarbageCollector","LRU Garbage Collection\n\tCounted targets in "+(o-h)+"ms\n\tDetermined least recently used "+r+" in "+(s-o)+"ms\n\tRemoved "+i+" targets in "+(u-s)+"ms\n\tRemoved "+t+" documents in "+(c-u)+"ms\nTotal Duration: "+(c-h)+"ms"),xn.resolve({Zo:!0,th:r,eh:i,nh:t})}))},t}(),ui=function(){function t(t,e,n){this.persistence=t,this.gh=e,this.yh=new tt(w),this.ph=new N((function(t){return W(t)}),H),this.bh=R.min(),this.ns=t.Dr(n),this.vh=t.Nr(),this.Ji=t.Fr(),this.Sh=new Pn(this.vh,this.ns,this.persistence.$r()),this.gh.Dh(this.Sh)}return t.prototype.start=function(){return Promise.resolve()},t.prototype.Ch=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,n,r,o=this;return i.__generator(this,(function(i){switch(i.label){case 0:return e=this.ns,n=this.Sh,[4,this.persistence.runTransaction("Handle user change","readonly",(function(r){var i;return o.ns.eo(r).next((function(a){return i=a,e=o.persistence.Dr(t),n=new Pn(o.vh,e,o.persistence.$r()),e.eo(r)})).next((function(t){for(var e=[],o=[],a=ft(),s=0,u=i;s<u.length;s++){var c=u[s];e.push(c.batchId);for(var l=0,h=c.mutations;l<h.length;l++){var f=h[l];a=a.add(f.key)}}for(var p=0,d=t;p<d.length;p++){var v=d[p];o.push(v.batchId);for(var y=0,g=v.mutations;y<g.length;y++){var m=g[y];a=a.add(m.key)}}return n.us(r,a).next((function(t){return{Fh:t,Nh:e,$h:o}}))}))}))];case 1:return r=i.sent(),[2,(this.ns=e,this.Sh=n,this.gh.Dh(this.Sh),r)]}}))}))},t.prototype.kh=function(t){var e,n=this,r=P.now(),i=t.reduce((function(t,e){return t.add(e.key)}),ft());return this.persistence.runTransaction("Locally write mutations","readwrite",(function(o){return n.Sh.us(o,i).next((function(i){e=i;for(var a=[],s=0,u=t;s<u.length;s++){var c=u[s],l=Be(c,e.get(c.key));null!=l&&a.push(new Ke(c.key,l,en(l.proto.mapValue),je.exists(!0)))}return n.ns.Yr(o,r,a,t)}))})).then((function(t){var n=t.Sn(e);return{batchId:t.batchId,Un:n}}))},t.prototype.xh=function(t){var e=this;return this.persistence.runTransaction("Acknowledge batch","readwrite-primary",(function(n){var r=t.batch.keys(),i=e.vh.oi({ai:!0});return e.Mh(n,t,i).next((function(){return i.apply(n)})).next((function(){return e.ns.ro(n)})).next((function(){return e.Sh.us(n,r)}))}))},t.prototype.Oh=function(t){var e=this;return this.persistence.runTransaction("Reject batch","readwrite-primary",(function(n){var r;return e.ns.Jr(n,t).next((function(t){return g(null!==t),r=t.keys(),e.ns.so(n,t)})).next((function(){return e.ns.ro(n)})).next((function(){return e.Sh.us(n,r)}))}))},t.prototype.to=function(){var t=this;return this.persistence.runTransaction("Get highest unacknowledged batch id","readonly",(function(e){return t.ns.to(e)}))},t.prototype.mi=function(){var t=this;return this.persistence.runTransaction("Get last remote snapshot version","readonly",(function(e){return t.Ji.mi(e)}))},t.prototype.Lh=function(e){var n=this,r=e.X,i=this.yh;return this.persistence.runTransaction("Apply remote event","readwrite-primary",(function(o){var a=n.vh.oi({ai:!0});i=n.yh;var s=[];e.Qt.forEach((function(e,a){var u=i.get(a);
2if(u){s.push(n.Ji.Ni(o,e.Xt,a).next((function(){return n.Ji.Ci(o,e.Yt,a)})));var c=e.resumeToken;if(c.H()>0){var l=u.tt(c,r).Z(o.Li);i=i.nt(a,l),t.Bh(u,l,e)&&s.push(n.Ji.yi(o,l))}}}));var u=at(),c=ft();if(e.jt.forEach((function(t,e){c=c.add(t)})),s.push(a.getEntries(o,c).next((function(t){e.jt.forEach((function(i,c){var l=t.get(i);c instanceof on&&c.version.isEqual(R.min())?(a.Gn(i,r),u=u.nt(i,c)):null==l||c.version.o(l.version)>0||0===c.version.o(l.version)&&l.hasPendingWrites?(a.jn(c,r),u=u.nt(i,c)):p("LocalStore","Ignoring outdated watch update for ",i,". Current version:",l.version," Watch version:",c.version),e.Kt.has(i)&&s.push(n.persistence.wi.jr(o,i))}))}))),!r.isEqual(R.min())){var l=n.Ji.mi(o).next((function(t){return n.Ji.Ri(o,o.Li,r)}));s.push(l)}return xn.Bn(s).next((function(){return a.apply(o)})).next((function(){return n.Sh.cs(o,u)}))})).then((function(t){return n.yh=i,t}))},t.Bh=function(t,e,n){return g(e.resumeToken.H()>0),0===t.resumeToken.H()||e.X.m()-t.X.m()>=this.qh||n.Yt.size+n.Jt.size+n.Xt.size>0},t.prototype.Uh=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,n,r,o,a,s,u,c,l=this;return i.__generator(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(e){return xn.forEach(t,(function(t){return xn.forEach(t.ms,(function(n){return l.persistence.wi.Fi(e,t.targetId,n)})).next((function(){return xn.forEach(t.As,(function(n){return l.persistence.wi.$i(e,t.targetId,n)}))}))}))}))];case 1:return i.sent(),[3,3];case 2:if(!Kr(e=i.sent()))throw e;return p("LocalStore","Failed to update sequence numbers: "+e),[3,3];case 3:for(n=0,r=t;n<r.length;n++)o=r[n],a=o.targetId,o.fromCache||(s=this.yh.get(a),u=s.X,c=s.et(u),this.yh=this.yh.nt(a,c));return[2]}}))}))},t.prototype.Qh=function(t){var e=this;return this.persistence.runTransaction("Get next mutation batch","readonly",(function(n){return void 0===t&&(t=-1),e.ns.Zr(n,t)}))},t.prototype.Wh=function(t){var e=this;return this.persistence.runTransaction("read document","readonly",(function(n){return e.Sh.rs(n,t)}))},t.prototype.jh=function(t){var e=this;return this.persistence.runTransaction("Allocate target","readwrite",(function(n){var r;return e.Ji.Di(n,t).next((function(i){return i?(r=i,xn.resolve(r)):e.Ji.Ti(n).next((function(i){return r=new X(t,i,0,n.Li),e.Ji.Pi(n,r).next((function(){return r}))}))}))})).then((function(n){var r=e.yh.get(n.targetId);return(null===r||n.X.o(r.X)>0)&&(e.yh=e.yh.nt(n.targetId,n),e.ph.set(t,n.targetId)),n}))},t.prototype.Di=function(t,e){var n=this.ph.get(e);return void 0!==n?xn.resolve(this.yh.get(n)):this.Ji.Di(t,e)},t.prototype.Kh=function(t,e){return i.__awaiter(this,void 0,void 0,(function(){var n,r,o,a=this;return i.__generator(this,(function(i){switch(i.label){case 0:n=this.yh.get(t),r=e?"readwrite":"readwrite-primary",i.label=1;case 1:return i.trys.push([1,4,,5]),e?[3,3]:[4,this.persistence.runTransaction("Release target",r,(function(t){return a.persistence.wi.removeTarget(t,n)}))];case 2:i.sent(),i.label=3;case 3:return[3,5];case 4:if(!Kr(o=i.sent()))throw o;return p("LocalStore","Failed to update sequence numbers for target "+t+": "+o),[3,5];case 5:return this.yh=this.yh.remove(t),this.ph.delete(n.target),[2]}}))}))},t.prototype.Gh=function(t,e){var n=this,r=R.min(),i=ft();return this.persistence.runTransaction("Execute query","readonly",(function(o){return n.Di(o,t.We()).next((function(t){if(t)return r=t.lastLimboFreeSnapshotVersion,n.Ji.ki(o,t.targetId).next((function(t){i=t}))})).next((function(){return n.gh._s(o,t,e?r:R.min(),e?i:ft())})).next((function(t){return{documents:t,zh:i}}))}))},t.prototype.Mh=function(t,e,n){var r=this,i=e.batch,o=i.keys(),a=xn.resolve();return o.forEach((function(r){a=a.next((function(){return n.zn(t,r)})).next((function(t){var o=t,a=e.Cn.get(r);g(null!==a),(!o||o.version.o(a)<0)&&(o=i.pn(r,o,e))&&n.jn(o,e.Dn)}))})),a.next((function(){return r.ns.so(t,i)}))},t.prototype.Ih=function(t){var e=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",(function(n){return t.Ph(n,e.yh)}))},t}();function ci(t,e,n){return new ui(t,e,n)}ui.qh=3e8;var li=function(t){function e(e,n,r){var i=this;return(i=t.call(this,e,n,r)||this).persistence=e,i.ns=e.Dr(r),i.vh=e.Nr(),i.Ji=e.Fr(),i}return i.__extends(e,t),e.prototype.start=function(){return this.Hh()},e.prototype.Yh=function(t){var e=this;return this.persistence.runTransaction("Lookup mutation documents","readonly",(function(n){return e.ns.Xr(n,t).next((function(t){return t?e.Sh.us(n,t):xn.resolve(null)}))}))},e.prototype.Jh=function(t){this.ns.io(t)},e.prototype.ur=function(t){this.persistence.ur(t)}
2,e.prototype.Sr=function(){return this.persistence.Sr()},e.prototype.Xh=function(t){var e=this,n=this.yh.get(t);return n?Promise.resolve(n.target):this.persistence.runTransaction("Get target data","readonly",(function(n){return e.Ji.Me(n,t).next((function(t){return t?t.target:null}))}))},e.prototype.si=function(){var t=this;return this.persistence.runTransaction("Get new document changes","readonly",(function(e){return t.vh.si(e,t.bh)})).then((function(e){var n=e.ii,r=e.readTime;return t.bh=r,n}))},e.prototype.Hh=function(){return i.__awaiter(this,void 0,void 0,(function(){var t,e=this;return i.__generator(this,(function(n){switch(n.label){case 0:return t=this,[4,this.persistence.runTransaction("Synchronize last document change read time","readonly",(function(t){return e.vh.ri(t)}))];case 1:return t.bh=n.sent(),[2]}}))}))},e}(ui);function hi(t){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(e){if(t.code!==A.FAILED_PRECONDITION||t.message!==An)throw t;return p("LocalStore","Unexpectedly lost primary lease"),[2]}))}))}var fi=function(){function t(){this.Zh=new rt(pi.ta),this.ea=new rt(pi.na)}return t.prototype._=function(){return this.Zh._()},t.prototype.Fi=function(t,e){var n=new pi(t,e);this.Zh=this.Zh.add(n),this.ea=this.ea.add(n)},t.prototype.sa=function(t,e){var n=this;t.forEach((function(t){return n.Fi(t,e)}))},t.prototype.$i=function(t,e){this.ia(new pi(t,e))},t.prototype.ra=function(t,e){var n=this;t.forEach((function(t){return n.$i(t,e)}))},t.prototype.oa=function(t){var e=this,n=new F(new L([])),r=new pi(n,t),i=new pi(n,t+1),o=[];return this.ea.vt([r,i],(function(t){e.ia(t),o.push(t.key)})),o},t.prototype.ha=function(){var t=this;this.Zh.forEach((function(e){return t.ia(e)}))},t.prototype.ia=function(t){this.Zh=this.Zh.delete(t),this.ea=this.ea.delete(t)},t.prototype.aa=function(t){var e=new F(new L([])),n=new pi(e,t),r=new pi(e,t+1),i=ft();return this.ea.vt([n,r],(function(t){i=i.add(t.key)})),i},t.prototype.Mi=function(t){var e=new pi(t,0),n=this.Zh.Dt(e);return null!==n&&t.isEqual(n.key)},t}(),pi=function(){function t(t,e){this.key=t,this.ua=e}return t.ta=function(t,e){return F.P(t.key,e.key)||w(t.ua,e.ua)},t.na=function(t,e){return w(t.ua,e.ua)||F.P(t.key,e.key)},t}();function di(t,e){if(0!==e.length)throw new O(A.INVALID_ARGUMENT,"Function "+t+"() does not support arguments, but was called with "+Pi(e.length,"argument")+".")}function vi(t,e,n){if(e.length!==n)throw new O(A.INVALID_ARGUMENT,"Function "+t+"() requires "+Pi(n,"argument")+", but was called with "+Pi(e.length,"argument")+".")}function yi(t,e,n){if(e.length<n)throw new O(A.INVALID_ARGUMENT,"Function "+t+"() requires at least "+Pi(n,"argument")+", but was called with "+Pi(e.length,"argument")+".")}function gi(t,e,n,r){if(e.length<n||e.length>r)throw new O(A.INVALID_ARGUMENT,"Function "+t+"() requires between "+n+" and "+r+" arguments, but was called with "+Pi(e.length,"argument")+".")}function mi(t,e,n,r){Si(t,e,Oi(n)+" argument",r)}function bi(t,e,n,r){void 0!==r&&mi(t,e,n,r)}function _i(t,e,n,r){Si(t,e,n+" option",r)}function wi(t,e,n,r){void 0!==r&&_i(t,e,n,r)}function Ei(t,e,n,r,i){void 0!==r&&function(t,e,n,r,i){for(var o=[],a=0,s=i;a<s.length;a++){var u=s[a];if(u===r)return;o.push(Ci(u))}var c=Ci(r);throw new O(A.INVALID_ARGUMENT,"Invalid value "+c+" provided to function "+t+'() for option "'+n+'". Acceptable values: '+o.join(", "))}(t,0,n,r,i)}function Ti(t,e,n,r){if(!e.some((function(t){return t===r})))throw new O(A.INVALID_ARGUMENT,"Invalid value "+Ci(r)+" provided to function "+t+"() for its "+Oi(n)+" argument. Acceptable values: "+e.join(", "));return r}function Si(t,e,n,r){if(!("object"===e?Ii(r):"non-empty string"===e?"string"==typeof r&&""!==r:typeof r===e)){var i=Ci(r);throw new O(A.INVALID_ARGUMENT,"Function "+t+"() requires its "+n+" to be of type "+e+", but it was: "+i)}}function Ii(t){return"object"==typeof t&&null!==t&&(Object.getPrototypeOf(t)===Object.prototype||null===Object.getPrototypeOf(t))}function Ci(t){if(void 0===t)return"undefined";if(null===t)return"null";if("string"==typeof t)return t.length>20&&(t=t.substring(0,20)+"..."),JSON.stringify(t);if("number"==typeof t||"boolean"==typeof t)return""+t;if("object"==typeof t){if(t instanceof Array)return"an array";var e=function(t){if(t.constructor){var e=/function\s+([^\s(]+)\s*\(/.exec(t.constructor.toString());if(e&&e.length>1)return e[1]}return null}(t);return e?"a custom "+e+" object":"an object"}return"function"==typeof t?"a function":y()}function ki(t,e,n){if(void 0===n)throw new O(A.INVALID_ARGUMENT,"Function "+t+"() requires a valid "+Oi(e)+" argument, but it was undefined.")}function xi(t,e,n){k(e,(function(e,r){if(n.indexOf(e)<0)throw new O(A.INVALID_ARGUMENT,"Unknown option '"+e+"' passed to function "+t+"(). Available options: "+n.join(", "))}))}function Ni(t,e,n,r){var i=Ci(r);return new O(A.INVALID_ARGUMENT,"Function "+t+"() requires its "+Oi(n)+" argument to be a "+e+", but it was: "+i)}function Ai(t,e,n){if(n<=0)throw new O(A.INVALID_ARGUMENT,"Function "+t+"() requires its "+Oi(e)+" argument to be a positive number, but it was: "+n+".")}function Oi(t){switch(t){case 1:return"first";
2case 2:return"second";case 3:return"third";default:return t+"th"}}function Pi(t,e){return t+" "+e+(1===t?"":"s")}function Ri(){if("undefined"==typeof Uint8Array)throw new O(A.UNIMPLEMENTED,"Uint8Arrays are not available in this environment.")}function Di(){if("undefined"==typeof atob)throw new O(A.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var Li=function(){function t(t){Di(),this.ca=t}return t.fromBase64String=function(e){vi("Blob.fromBase64String",arguments,1),mi("Blob.fromBase64String","string",1,e),Di();try{return new t(G.fromBase64String(e))}catch(e){throw new O(A.INVALID_ARGUMENT,"Failed to construct Blob from Base64 string: "+e)}},t.fromUint8Array=function(e){if(vi("Blob.fromUint8Array",arguments,1),Ri(),!(e instanceof Uint8Array))throw Ni("Blob.fromUint8Array","Uint8Array",1,e);return new t(G.fromUint8Array(e))},t.prototype.toBase64=function(){return vi("Blob.toBase64",arguments,0),Di(),this.ca.toBase64()},t.prototype.toUint8Array=function(){return vi("Blob.toUint8Array",arguments,0),Ri(),this.ca.toUint8Array()},t.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},t.prototype.isEqual=function(t){return this.ca.isEqual(t.ca)},t}(),Mi=function(t){!function(t,e,n,r){if(!(e instanceof Array)||e.length<1)throw new O(A.INVALID_ARGUMENT,"Function FieldPath() requires its fieldNames argument to be an array with at least "+Pi(1,"element")+".")}(0,t);for(var e=0;e<t.length;++e)if(mi("FieldPath","string",e,t[e]),0===t[e].length)throw new O(A.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this.la=new j(t)},ji=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.call(this,e)||this}return i.__extends(e,t),e.documentId=function(){return new e(j.L().N())},e.prototype.isEqual=function(t){if(!(t instanceof e))throw Ni("isEqual","FieldPath",1,t);return this.la.isEqual(t.la)},e}(Mi),Fi=new RegExp("[~\\*/\\[\\]]"),Ui=function(){this._a=this},Vi=function(t){function e(e){var n=this;return(n=t.call(this)||this).fa=e,n}return i.__extends(e,t),e.prototype.da=function(t){if(2!==t.wa)throw 1===t.wa?t.Ta(this.fa+"() can only appear at the top level of your update data"):t.Ta(this.fa+"() cannot be used with set() unless you pass {merge:true}");return t.Le.push(t.path),null},e.prototype.isEqual=function(t){return t instanceof e},e}(Ui);function qi(t,e,n){return new eo({wa:3,Ea:e.settings.Ea,methodName:t.fa,Ia:n},e.s,e.serializer,e.ignoreUndefinedProperties)}var Bi=function(t){function e(e){var n=this;return(n=t.call(this)||this).fa=e,n}return i.__extends(e,t),e.prototype.da=function(t){return new Le(t.path,new Ce)},e.prototype.isEqual=function(t){return t instanceof e},e}(Ui),zi=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).fa=e,r.ma=n,r}return i.__extends(e,t),e.prototype.da=function(t){var e=qi(this,t,!0),n=this.ma.map((function(t){return so(t,e)})),r=new ke(n);return new Le(t.path,r)},e.prototype.isEqual=function(t){return this===t},e}(Ui),Wi=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).fa=e,r.ma=n,r}return i.__extends(e,t),e.prototype.da=function(t){var e=qi(this,t,!0),n=this.ma.map((function(t){return so(t,e)})),r=new Ne(n);return new Le(t.path,r)},e.prototype.isEqual=function(t){return this===t},e}(Ui),Hi=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).fa=e,r.Aa=n,r}return i.__extends(e,t),e.prototype.da=function(t){var e=new Oe(t.serializer,Xt(t.serializer,this.Aa));return new Le(t.path,e)},e.prototype.isEqual=function(t){return this===t},e}(Ui),Ki=function(t){function e(){return t.call(this)||this}return i.__extends(e,t),e.delete=function(){return di("FieldValue.delete",arguments),new Gi(new Vi("FieldValue.delete"))},e.serverTimestamp=function(){return di("FieldValue.serverTimestamp",arguments),new Gi(new Bi("FieldValue.serverTimestamp"))},e.arrayUnion=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return yi("FieldValue.arrayUnion",arguments,1),new Gi(new zi("FieldValue.arrayUnion",t))},e.arrayRemove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];
2return yi("FieldValue.arrayRemove",arguments,1),new Gi(new Wi("FieldValue.arrayRemove",t))},e.increment=function(t){return mi("FieldValue.increment","number",1,t),vi("FieldValue.increment",arguments,1),new Gi(new Hi("FieldValue.increment",t))},e}(Ui),Gi=function(t){function e(e){var n=this;return(n=t.call(this)||this)._a=e,n.fa=e.fa,n}return i.__extends(e,t),e.prototype.da=function(t){return this._a.da(t)},e.prototype.isEqual=function(t){return t instanceof e&&this._a.isEqual(t._a)},e}(Ki),Qi=function(){function t(t,e){if(vi("GeoPoint",arguments,2),mi("GeoPoint","number",1,t),mi("GeoPoint","number",2,e),!isFinite(t)||t<-90||t>90)throw new O(A.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e<-180||e>180)throw new O(A.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this.Ra=t,this.Pa=e}return Object.defineProperty(t.prototype,"latitude",{get:function(){return this.Ra},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"longitude",{get:function(){return this.Pa},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.Ra===t.Ra&&this.Pa===t.Pa},t.prototype.T=function(t){return w(this.Ra,t.Ra)||w(this.Pa,t.Pa)},t}();function $i(t){return new Gt(t,!0)}var Xi=/^__.*__$/,Yi=function(t,e,n){this.Va=t,this.ga=e,this.ya=n},Ji=function(){function t(t,e,n){this.data=t,this.Le=e,this.fieldTransforms=n}return t.prototype.pa=function(t,e){var n=[];return null!==this.Le?n.push(new Ke(t,this.data,this.Le,e)):n.push(new He(t,this.data,e)),this.fieldTransforms.length>0&&n.push(new Qe(t,this.fieldTransforms)),n},t}(),Zi=function(){function t(t,e,n){this.data=t,this.Le=e,this.fieldTransforms=n}return t.prototype.pa=function(t,e){var n=[new Ke(t,this.data,this.Le,e)];return this.fieldTransforms.length>0&&n.push(new Qe(t,this.fieldTransforms)),n},t}();function to(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw y()}}var eo=function(){function t(t,e,n,r,i,o){this.settings=t,this.s=e,this.serializer=n,this.ignoreUndefinedProperties=r,void 0===i&&this.ba(),this.fieldTransforms=i||[],this.Le=o||[]}return Object.defineProperty(t.prototype,"path",{get:function(){return this.settings.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wa",{get:function(){return this.settings.wa},enumerable:!1,configurable:!0}),t.prototype.va=function(e){return new t(Object.assign(Object.assign({},this.settings),e),this.s,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.Le)},t.prototype.Sa=function(t){var e,n=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.va({path:n,Ia:!1});return r.Da(t),r},t.prototype.Ca=function(t){var e,n=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.va({path:n,Ia:!1});return r.ba(),r},t.prototype.Fa=function(t){return this.va({path:void 0,Ia:!0})},t.prototype.Ta=function(t){return po(t,this.settings.methodName,this.settings.Na||!1,this.path,this.settings.Ea)},t.prototype.contains=function(t){return void 0!==this.Le.find((function(e){return t.D(e)}))||void 0!==this.fieldTransforms.find((function(e){return t.D(e.field)}))},t.prototype.ba=function(){if(this.path)for(var t=0;t<this.path.length;t++)this.Da(this.path.get(t))},t.prototype.Da=function(t){if(0===t.length)throw this.Ta("Document fields must not be empty");if(to(this.wa)&&Xi.test(t))throw this.Ta('Document fields cannot begin and end with "__"')},t}(),no=function(){function t(t,e,n){this.s=t,this.ignoreUndefinedProperties=e,this.serializer=n||$i(t)}return t.prototype.$a=function(t,e,n,r){return void 0===r&&(r=!1),new eo({wa:t,methodName:e,Ea:n,path:j.k(),Ia:!1,Na:r},this.s,this.serializer,this.ignoreUndefinedProperties)},t}();function ro(t,e,n,r,i,o){void 0===o&&(o={});var a=t.$a(o.merge||o.mergeFields?2:0,e,n,i);lo("Data must be an object, but it was:",a,r);var s,u,c=uo(r,a);if(o.merge)s=new De(a.Le),u=a.fieldTransforms;else if(o.mergeFields){for(var l=[],h=0,f=o.mergeFields;h<f.length;h++){var p=f[h],d=void 0;if(p instanceof Mi)d=p.la;else{if("string"!=typeof p)throw y();d=fo(e,p,n)}if(!a.contains(d))throw new O(A.INVALID_ARGUMENT,"Field '"+d+"' is specified in your field mask but missing from your input data.");vo(l,d)||l.push(d)}s=new De(l),u=a.fieldTransforms.filter((function(t){return s.Ke(t.field)}))}else s=null,u=a.fieldTransforms;return new Ji(new Ze(c),s,u)}function io(t,e,n,r){var i=t.$a(1,e,n);lo("Data must be an object, but it was:",i,r);var o=[],a=new tn;k(r,(function(t,r){var s=fo(e,t,n),u=i.Ca(s);if(r instanceof Ui&&r._a instanceof Vi)o.push(s);else{var c=so(r,u);null!=c&&(o.push(s),a.set(s,c))}}));var s=new De(o);return new Zi(a.ze(),s,i.fieldTransforms)}function oo(t,e,n,r,i,o){var a=t.$a(1,e,n),s=[ho(e,r,n)],u=[i];if(o.length%2!=0)throw new O(A.INVALID_ARGUMENT,"Function "+e+"() needs to be called with an even number of arguments that alternate between field names and values.");for(var c=0;c<o.length;c+=2)s.push(ho(e,o[c])),u.push(o[c+1]);for(var l=[],h=new tn,f=s.length-1;f>=0;--f)if(!vo(l,s[f])){var p=s[f],d=u[f],v=a.Ca(p);
2if(d instanceof Ui&&d._a instanceof Vi)l.push(p);else{var y=so(d,v);null!=y&&(l.push(p),h.set(p,y))}}var g=new De(l);return new Zi(h.ze(),g,a.fieldTransforms)}function ao(t,e,n,r){return void 0===r&&(r=!1),so(n,t.$a(r?4:3,e))}function so(t,e){if(co(t))return lo("Unsupported field value:",e,t),uo(t,e);if(t instanceof Ui)return function(t,e){if(!to(e.wa))throw e.Ta(t.fa+"() can only be used with update() and set()");if(!e.path)throw e.Ta(t.fa+"() is not currently supported inside arrays");var n=t.da(e);n&&e.fieldTransforms.push(n)}(t,e),null;if(e.path&&e.Le.push(e.path),t instanceof Array){if(e.settings.Ia&&4!==e.wa)throw e.Ta("Nested arrays are not supported");return function(t,e){for(var n=[],r=0,i=0,o=t;i<o.length;i++){var a=so(o[i],e.Fa(r));null==a&&(a={nullValue:"NULL_VALUE"}),n.push(a),r++}return{arrayValue:{values:n}}}(t,e)}return function(t,e){if(null===t)return{nullValue:"NULL_VALUE"};if("number"==typeof t)return Xt(e.serializer,t);if("boolean"==typeof t)return{booleanValue:t};if("string"==typeof t)return{stringValue:t};if(t instanceof Date){var n=P.fromDate(t);return{timestampValue:Yt(e.serializer,n)}}if(t instanceof P){var r=new P(t.seconds,1e3*Math.floor(t.nanoseconds/1e3));return{timestampValue:Yt(e.serializer,r)}}if(t instanceof Qi)return{geoPointValue:{latitude:t.latitude,longitude:t.longitude}};if(t instanceof Li)return{bytesValue:Jt(e.serializer,t)};if(t instanceof Yi){var i=e.s,o=t.Va;if(!o.isEqual(i))throw e.Ta("Document reference is for database "+o.projectId+"/"+o.database+" but should be for database "+i.projectId+"/"+i.database);return{referenceValue:ee(t.Va||e.s,t.ga.path)}}if(void 0===t&&e.ignoreUndefinedProperties)return null;throw e.Ta("Unsupported field value: "+Ci(t))}(t,e)}function uo(t,e){var n={};return x(t)?e.path&&e.path.length>0&&e.Le.push(e.path):k(t,(function(t,r){var i=so(r,e.Sa(t));null!=i&&(n[t]=i)})),{mapValue:{fields:n}}}function co(t){return!("object"!=typeof t||null===t||t instanceof Array||t instanceof Date||t instanceof P||t instanceof Qi||t instanceof Li||t instanceof Yi||t instanceof Ui)}function lo(t,e,n){if(!co(n)||!Ii(n)){var r=Ci(n);throw"an object"===r?e.Ta(t+" a custom object"):e.Ta(t+" "+r)}}function ho(t,e,n){if(e instanceof Mi)return e.la;if("string"==typeof e)return fo(t,e);throw po("Field path arguments must be of type string or FieldPath.",t,!1,void 0,n)}function fo(t,e,n){try{return function(t){if(t.search(Fi)>=0)throw new O(A.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not contain '~', '*', '/', '[', or ']'");try{return new(ji.bind.apply(ji,i.__spreadArrays([void 0],t.split("."))))}catch(i){throw new O(A.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'")}}(e).la}catch(e){throw po((r=e)instanceof Error?r.message:r.toString(),t,!1,void 0,n)}var r}function po(t,e,n,r,i){var o=r&&!r._(),a=void 0!==i,s="Function "+e+"() called with invalid data";n&&(s+=" (via `toFirestore()`)");var u="";return(o||a)&&(u+=" (found",o&&(u+=" in field "+r),a&&(u+=" in document "+i),u+=")"),new O(A.INVALID_ARGUMENT,(s+=". ")+t+u)}function vo(t,e){return t.some((function(t){return t.isEqual(e)}))}var yo=function(){function t(t){this.uid=t}return t.prototype.zr=function(){return null!=this.uid},t.prototype.ka=function(){return this.zr()?"uid:"+this.uid:"anonymous-user"},t.prototype.isEqual=function(t){return t.uid===this.uid},t}();yo.UNAUTHENTICATED=new yo(null),yo.xa=new yo("google-credentials-uid"),yo.Ma=new yo("first-party-uid");var go=function(t,e){this.user=e,this.type="OAuth",this.Oa={},this.Oa.Authorization="Bearer "+t},mo=function(){function t(){this.La=null}return t.prototype.getToken=function(){return Promise.resolve(null)},t.prototype.Ba=function(){},t.prototype.qa=function(t){this.La=t,t(yo.UNAUTHENTICATED)},t.prototype.Ua=function(){this.La=null},t}(),bo=function(){function t(t){var e=this;this.Qa=null,this.currentUser=yo.UNAUTHENTICATED,this.Wa=!1,this.ja=0,this.La=null,this.forceRefresh=!1,this.Qa=function(){e.ja++,e.currentUser=e.Ka(),e.Wa=!0,e.La&&e.La(e.currentUser)},this.ja=0,this.auth=t.getImmediate({optional:!0}),this.auth?this.auth.addAuthTokenListener(this.Qa):(this.Qa(null),t.get().then((function(t){e.auth=t,e.Qa&&e.auth.addAuthTokenListener(e.Qa)}),(function(){})))}return t.prototype.getToken=function(){var t=this,e=this.ja,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((function(n){return t.ja!==e?(p("FirebaseCredentialsProvider","getToken aborted due to token change."),t.getToken()):n?(g("string"==typeof n.accessToken),new go(n.accessToken,t.currentUser)):null})):Promise.resolve(null)},t.prototype.Ba=function(){this.forceRefresh=!0},t.prototype.qa=function(t){this.La=t,this.Wa&&t(this.currentUser)},t.prototype.Ua=function(){this.auth&&this.auth.removeAuthTokenListener(this.Qa),this.Qa=null,this.La=null},t.prototype.Ka=function(){var t=this.auth&&this.auth.getUid();return g(null===t||"string"==typeof t),new yo(t)},t}(),_o=function(){function t(t,e){this.Ga=t,this.za=e,this.type="FirstParty",this.user=yo.Ma}return Object.defineProperty(t.prototype,"Oa",{get:function(){var t={"X-Goog-AuthUser":this.za},e=this.Ga.auth.Ha([]);return e&&(t.Authorization=e),t}
2,enumerable:!1,configurable:!0}),t}(),wo=function(){function t(t,e){this.Ga=t,this.za=e}return t.prototype.getToken=function(){return Promise.resolve(new _o(this.Ga,this.za))},t.prototype.qa=function(t){t(yo.Ma)},t.prototype.Ua=function(){},t.prototype.Ba=function(){},t}(),Eo=function(){function t(t,e,n,r,i,o){this.bs=t,this.Ya=n,this.Ja=r,this.Xa=i,this.listener=o,this.state=0,this.Za=0,this.tu=null,this.stream=null,this.$o=new Mn(t,e)}return t.prototype.eu=function(){return 1===this.state||2===this.state||4===this.state},t.prototype.nu=function(){return 2===this.state},t.prototype.start=function(){3!==this.state?this.auth():this.su()},t.prototype.stop=function(){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(t){switch(t.label){case 0:return this.eu()?[4,this.close(0)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t.prototype.iu=function(){this.state=0,this.$o.reset()},t.prototype.ru=function(){var t=this;this.nu()&&null===this.tu&&(this.tu=this.bs.Os(this.Ya,6e4,(function(){return t.ou()})))},t.prototype.hu=function(t){this.au(),this.stream.send(t)},t.prototype.ou=function(){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(t){return this.nu()?[2,this.close(0)]:[2]}))}))},t.prototype.au=function(){this.tu&&(this.tu.cancel(),this.tu=null)},t.prototype.close=function(t,e){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(n){switch(n.label){case 0:return this.au(),this.$o.cancel(),this.Za++,3!==t?this.$o.reset():e&&e.code===A.RESOURCE_EXHAUSTED?(d(e.toString()),d("Using maximum backoff delay to prevent overloading the backend."),this.$o.ks()):e&&e.code===A.UNAUTHENTICATED&&this.Xa.Ba(),null!==this.stream&&(this.uu(),this.stream.close(),this.stream=null),this.state=t,[4,this.listener.cu(e)];case 1:return n.sent(),[2]}}))}))},t.prototype.uu=function(){},t.prototype.auth=function(){var t=this;this.state=1;var e=this.lu(this.Za),n=this.Za;this.Xa.getToken().then((function(e){t.Za===n&&t._u(e)}),(function(n){e((function(){var e=new O(A.UNKNOWN,"Fetching auth token failed: "+n.message);return t.fu(e)}))}))},t.prototype._u=function(t){var e=this,n=this.lu(this.Za);this.stream=this.du(t),this.stream.wu((function(){n((function(){return e.state=2,e.listener.wu()}))})),this.stream.cu((function(t){n((function(){return e.fu(t)}))})),this.stream.onMessage((function(t){n((function(){return e.onMessage(t)}))}))},t.prototype.su=function(){var t=this;this.state=4,this.$o.xs((function(){return i.__awaiter(t,void 0,void 0,(function(){return i.__generator(this,(function(t){return this.state=0,this.start(),[2]}))}))}))},t.prototype.fu=function(t){return p("PersistentStream","close with error: "+t),this.stream=null,this.close(3,t)},t.prototype.lu=function(t){var e=this;return function(n){e.bs.cr((function(){return e.Za===t?n():(p("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}},t}(),To=function(t){function e(e,n,r,i,o){var a=this;return(a=t.call(this,e,"listen_stream_connection_backoff","listen_stream_idle",n,r,o)||this).serializer=i,a}return i.__extends(e,t),e.prototype.du=function(t){return this.Ja.Tu("Listen",t)},e.prototype.onMessage=function(t){this.$o.reset();var e=function(t,e){var n;if("targetChange"in e){e.targetChange;var r=function(t){return"NO_CHANGE"===t?0:"ADD"===t?1:"REMOVE"===t?2:"CURRENT"===t?3:"RESET"===t?4:y()}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],o=function(t,e){return t.Oe?(g(void 0===e||"string"==typeof e),G.fromBase64String(e||"")):(g(void 0===e||e instanceof Uint8Array),G.fromUint8Array(e||new Uint8Array))}(t,e.targetChange.resumeToken),a=e.targetChange.cause,s=a&&function(t){var e=void 0===t.code?A.UNKNOWN:Z(t.code);return new O(e,t.message||"")}(a);n=new Et(r,i,o,s||null)}else if("documentChange"in e){e.documentChange;var u=e.documentChange;u.document,u.document.name,u.document.updateTime;var c=ie(t,u.document.name),l=te(u.document.updateTime),h=new Ze({mapValue:{fields:u.document.fields}}),f=new rn(c,l,h,{}),p=u.targetIds||[],d=u.removedTargetIds||[];n=new _t(p,d,f.key,f)}else if("documentDelete"in e){e.documentDelete;var v=e.documentDelete;v.document;var m=ie(t,v.document),b=v.readTime?te(v.readTime):R.min(),_=new on(m,b),w=v.removedTargetIds||[];n=new _t([],w,_.key,_)}else if("documentRemove"in e){e.documentRemove;var E=e.documentRemove;E.document;var T=ie(t,E.document),S=E.removedTargetIds||[];n=new _t([],S,T,null)}else{if(!("filter"in e))return y();e.filter;var I=e.filter;I.targetId;
2var C=I.count||0,k=new Y(C),x=I.targetId;n=new wt(x,k)}return n}(this.serializer,t),n=function(t){if(!("targetChange"in t))return R.min();var e=t.targetChange;return e.targetIds&&e.targetIds.length?R.min():e.readTime?te(e.readTime):R.min()}(t);return this.listener.Eu(e,n)},e.prototype.Iu=function(t){var e={};e.database=se(this.serializer),e.addTarget=function(t,e){var n,r=e.target;return(n=K(r)?{documents:fe(t,r)}:{query:pe(t,r)}).targetId=e.targetId,e.resumeToken.H()>0&&(n.resumeToken=Jt(t,e.resumeToken)),n}(this.serializer,t);var n=function(t,e){var n=function(t,e){switch(e){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return y()}}(0,e.J);return null==n?null:{"goog-listen-tags":n}}(this.serializer,t);n&&(e.labels=n),this.hu(e)},e.prototype.mu=function(t){var e={};e.database=se(this.serializer),e.removeTarget=t,this.hu(e)},e}(Eo),So=function(t){function e(e,n,r,i,o){var a=this;return(a=t.call(this,e,"write_stream_connection_backoff","write_stream_idle",n,r,o)||this).serializer=i,a.Au=!1,a}return i.__extends(e,t),Object.defineProperty(e.prototype,"Ru",{get:function(){return this.Au},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.Au=!1,this.lastStreamToken=void 0,t.prototype.start.call(this)}
2,e.prototype.uu=function(){this.Au&&this.Pu([])},e.prototype.du=function(t){return this.Ja.Tu("Write",t)},e.prototype.onMessage=function(t){if(g(!!t.streamToken),this.lastStreamToken=t.streamToken,this.Au){this.$o.reset();var e=function(t,e){return t&&t.length>0?(g(void 0!==e),t.map((function(t){return function(t,e){var n=t.updateTime?te(t.updateTime):te(e);n.isEqual(R.min())&&(n=te(e));var r=null;return t.transformResults&&t.transformResults.length>0&&(r=t.transformResults),new Me(n,r)}(t,e)}))):[]}(t.writeResults,t.commitTime),n=te(t.commitTime);return this.listener.Vu(n,e)}return g(!t.writeResults||0===t.writeResults.length),this.Au=!0,this.listener.gu()},e.prototype.yu=function(){var t={};t.database=se(this.serializer),this.hu(t)},e.prototype.Pu=function(t){var e=this,n={streamToken:this.lastStreamToken,writes:t.map((function(t){return le(e.serializer,t)}))};this.hu(n)},e}(Eo),Io=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).Ja=e,i.credentials=n,i.serializer=r,i.pu=!1,i}return i.__extends(e,t),e.prototype.bu=function(){if(this.pu)throw new O(A.FAILED_PRECONDITION,"The client has already been terminated.")},e.prototype.vu=function(t,e){var n=this;return this.bu(),this.credentials.getToken().then((function(r){return n.Ja.vu(t,e,r)})).catch((function(t){throw t.code===A.UNAUTHENTICATED&&n.credentials.Ba(),t}))},e.prototype.Su=function(t,e){var n=this;return this.bu(),this.credentials.getToken().then((function(r){return n.Ja.Su(t,e,r)})).catch((function(t){throw t.code===A.UNAUTHENTICATED&&n.credentials.Ba(),t}))},e}((function(){this.je=void 0})),Co=function(){function t(t){this.Du=t,this.Cu=new Map,this.mutations=[],this.Fu=!1,this.Nu=null,this.$u=new Set}return t.prototype.ku=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,n=this;return i.__generator(this,(function(r){switch(r.label){case 0:if(this.xu(),this.mutations.length>0)throw new O(A.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");return[4,function(t,e){return i.__awaiter(this,void 0,void 0,(function(){var n,r,o,a,s;return i.__generator(this,(function(i){switch(i.label){case 0:return n=m(t),r={database:se(n.serializer),documents:e.map((function(t){return re(n.serializer,t)}))},[4,n.Su("BatchGetDocuments",r)];case 1:return o=i.sent(),a=new Map,o.forEach((function(t){var e=function(t,e){return"found"in e?function(t,e){g(!!e.found),e.found.name,e.found.updateTime;var n=ie(t,e.found.name),r=te(e.found.updateTime),i=new Ze({mapValue:{fields:e.found.fields}});return new rn(n,r,i,{})}(t,e):"missing"in e?function(t,e){g(!!e.missing),g(!!e.readTime);var n=ie(t,e.missing),r=te(e.readTime);return new on(n,r)}(t,e):y()}(n.serializer,t);a.set(e.key.toString(),e)})),s=[],[2,(e.forEach((function(t){var e=a.get(t.toString());g(!!e),s.push(e)})),s)]}}))}))}(this.Du,t)];case 1:return[2,((e=r.sent()).forEach((function(t){t instanceof on||t instanceof rn?n.Mu(t):y()})),e)]}}))}))},t.prototype.set=function(t,e){this.write(e.pa(t,this.Ue(t))),this.$u.add(t)},t.prototype.update=function(t,e){try{this.write(e.pa(t,this.Ou(t)))}catch(t){this.Nu=t}this.$u.add(t)},t.prototype.delete=function(t){this.write([new Ye(t,this.Ue(t))]),this.$u.add(t)},t.prototype.commit=function(){return i.__awaiter(this,void 0,void 0,(function(){var t,e=this;return i.__generator(this,(function(n){switch(n.label){case 0:if(this.xu(),this.Nu)throw this.Nu;return t=this.Cu,this.mutations.forEach((function(e){t.delete(e.key.toString())})),t.forEach((function(t,n){var r=new F(L.$(n));e.mutations.push(new Je(r,e.Ue(r)))})),[4,function(t,e){return i.__awaiter(this,void 0,void 0,(function(){var n,r;return i.__generator(this,(function(i){switch(i.label){case 0:return n=m(t),r={database:se(n.serializer),writes:e.map((function(t){return le(n.serializer,t)}))},[4,n.vu("Commit",r)];case 1:return i.sent(),[2]}}))}))}(this.Du,this.mutations)];case 1:return n.sent(),this.Fu=!0,[2]}}))}))},t.prototype.Mu=function(t){var e;if(t instanceof rn)e=t.version;else{if(!(t instanceof on))throw y();e=R.min()}var n=this.Cu.get(t.key.toString());if(n){if(!e.isEqual(n))throw new O(A.ABORTED,"Document version changed between two reads.")}else this.Cu.set(t.key.toString(),e)},t.prototype.Ue=function(t){var e=this.Cu.get(t.toString());return!this.$u.has(t)&&e?je.updateTime(e):je.Qe()},t.prototype.Ou=function(t){var e=this.Cu.get(t.toString());if(!this.$u.has(t)&&e){if(e.isEqual(R.min()))throw new O(A.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return je.updateTime(e)}return je.exists(!0)},t.prototype.write=function(t){this.xu(),this.mutations=this.mutations.concat(t)},t.prototype.xu=function(){},t}(),ko=function(){function t(t,e){this.mo=t,this.Lu=e,this.state="Unknown",this.Bu=0,this.qu=null,this.Uu=!0}return t.prototype.Qu=function(){var t=this;0===this.Bu&&(this.Wu("Unknown"),this.qu=this.mo.Os("online_state_timeout",1e4,(function(){return t.qu=null,t.ju("Backend didn't respond within 10 seconds."),t.Wu("Offline"),Promise.resolve()})))},t.prototype.Ku=function(t){"Online"===this.state?this.Wu("Unknown"):(this.Bu++,this.Bu>=1&&(this.Gu(),this.ju("Connection failed 1 times. Most recent error: "+t.toString()),this.Wu("Offline")))},t.prototype.set=function(t){this.Gu(),this.Bu=0,"Online"===t&&(this.Uu=!1),this.Wu(t)},t.prototype.Wu=function(t){t!==this.state&&(this.state=t,this.Lu(t))},t.prototype.ju=function(t){var e="Could not reach Cloud Firestore backend. "+t+"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";this.Uu?(d(e),this.Uu=!1):p("OnlineStateTracker",e)},t.prototype.Gu=function(){null!==this.qu&&(this.qu.cancel(),this.qu=null)},t}(),xo=function(){function t(t,e,n,r,o){var a=this;this.zu=t,this.Du=e,this.mo=n,this.Hu=[],this.Yu=new Map,this.Ju=null,this.Xu=new Set,this.Zu=o,this.Zu.tc((function(t){n.cr((function(){return i.__awaiter(a,void 0,void 0,(function(){return i.__generator(this,(function(t){switch(t.label){case 0:return this.ec()?(p("RemoteStore","Restarting streams for network reach
2ability change."),[4,this.nc()]):[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))}))})),this.sc=new ko(n,r),this.ic=function(t,e,n){var r=m(t);return new To(e,r.Ja,r.credentials,r.serializer,n)}(this.Du,n,{wu:this.rc.bind(this),cu:this.oc.bind(this),Eu:this.hc.bind(this)}),this.ac=function(t,e,n){var r=m(t);return new So(e,r.Ja,r.credentials,r.serializer,n)}(this.Du,n,{wu:this.uc.bind(this),cu:this.cc.bind(this),gu:this.lc.bind(this),Vu:this.Vu.bind(this)})}return t.prototype.start=function(){return this.enableNetwork()},t.prototype.enableNetwork=function(){return this.Xu.delete(0),this._c()},t.prototype._c=function(){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(t){switch(t.label){case 0:return this.ec()?(this.fc()?this.dc():this.sc.set("Unknown"),[4,this.wc()]):[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t.prototype.disableNetwork=function(){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(t){switch(t.label){case 0:return this.Xu.add(0),[4,this.Tc()];case 1:return t.sent(),this.sc.set("Offline"),[2]}}))}))},t.prototype.Tc=function(){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(t){switch(t.label){case 0:return[4,this.ac.stop()];case 1:return t.sent(),[4,this.ic.stop()];case 2:return t.sent(),this.Hu.length>0&&(p("RemoteStore","Stopping write stream with "+this.Hu.length+" pending writes"),this.Hu=[]),this.Ec(),[2]}}))}))},t.prototype.gr=function(){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(t){switch(t.label){case 0:return p("RemoteStore","RemoteStore shutting down."),this.Xu.add(5),[4,this.Tc()];case 1:return t.sent(),this.Zu.gr(),this.sc.set("Unknown"),[2]}}))}))},t.prototype.listen=function(t){this.Yu.has(t.targetId)||(this.Yu.set(t.targetId,t),this.fc()?this.dc():this.ic.nu()&&this.Ic(t))},t.prototype.mc=function(t){this.Yu.delete(t),this.ic.nu()&&this.Ac(t),0===this.Yu.size&&(this.ic.nu()?this.ic.ru():this.ec()&&this.sc.set("Unknown"))},t.prototype.Me=function(t){return this.Yu.get(t)||null},t.prototype.xe=function(t){return this.Rc.xe(t)},t.prototype.Ic=function(t){this.Ju.de(t.targetId),this.ic.Iu(t)},t.prototype.Ac=function(t){this.Ju.de(t),this.ic.mu(t)},t.prototype.dc=function(){this.Ju=new St(this),this.ic.start(),this.sc.Qu()},t.prototype.fc=function(){return this.ec()&&!this.ic.eu()&&this.Yu.size>0},t.prototype.ec=function(){return 0===this.Xu.size},t.prototype.Ec=function(){this.Ju=null},t.prototype.rc=function(){return i.__awaiter(this,void 0,void 0,(function(){var t=this;return i.__generator(this,(function(e){return this.Yu.forEach((function(e,n){t.Ic(e)})),[2]}))}))},t.prototype.oc=function(t){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(e){return this.Ec(),this.fc()?(this.sc.Ku(t),this.dc()):this.sc.set("Unknown"),[2]}))}))},t.prototype.hc=function(t,e){return i.__awaiter(this,void 0,void 0,(function(){var n,r,o;return i.__generator(this,(function(i){switch(i.label){case 0:if(this.sc.set("Online"),!(t instanceof Et&&2===t.state&&t.cause))return[3,6];i.label=1;case 1:return i.trys.push([1,3,,5]),[4,this.Pc(t)];case 2:return i.sent(),[3,5];case 3:return n=i.sent(),p("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),n),[4,this.Vc(n)];case 4:return i.sent(),[3,5];case 5:return[3,13];case 6:if(t instanceof _t?this.Ju.Pe(t):t instanceof wt?this.Ju.De(t):this.Ju.ye(t),e.isEqual(R.min()))return[3,13];i.label=7;case 7:return i.trys.push([7,11,,13]),[4,this.zu.mi()];case 8:return r=i.sent(),e.o(r)>=0?[4,this.gc(e)]:[3,10];case 9:i.sent(),i.label=10;case 10:return[3,13];case 11:return p("RemoteStore","Failed to raise snapshot:",o=i.sent()),[4,this.Vc(o)];case 12:return i.sent(),[3,13];case 13:return[2]}}
2))}))},t.prototype.Vc=function(t,e){return i.__awaiter(this,void 0,void 0,(function(){var n=this;return i.__generator(this,(function(r){switch(r.label){case 0:if(!Kr(t))throw t;return this.Xu.add(1),[4,this.Tc()];case 1:return r.sent(),this.sc.set("Offline"),e||(e=function(){return n.zu.mi()}),this.mo._r((function(){return i.__awaiter(n,void 0,void 0,(function(){return i.__generator(this,(function(t){switch(t.label){case 0:return p("RemoteStore","Retrying IndexedDB access"),[4,e()];case 1:return t.sent(),this.Xu.delete(1),[4,this._c()];case 2:return t.sent(),[2]}}))}))})),[2]}}))}))},t.prototype.yc=function(t){var e=this;return t().catch((function(n){return e.Vc(n,t)}))},t.prototype.gc=function(t){var e=this,n=this.Ju.Ne(t);return n.Qt.forEach((function(n,r){if(n.resumeToken.H()>0){var i=e.Yu.get(r);i&&e.Yu.set(r,i.tt(n.resumeToken,t))}})),n.Wt.forEach((function(t){var n=e.Yu.get(t);if(n){e.Yu.set(t,n.tt(G.Y,n.X)),e.Ac(t);var r=new X(n.target,t,1,n.sequenceNumber);e.Ic(r)}})),this.Rc.Lh(n)},t.prototype.Pc=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,n,r,o;return i.__generator(this,(function(i){switch(i.label){case 0:e=t.cause,n=0,r=t.targetIds,i.label=1;case 1:return n<r.length?(o=r[n],this.Yu.has(o)?[4,this.Rc.pc(o,e)]:[3,3]):[3,5];case 2:i.sent(),this.Yu.delete(o),this.Ju.removeTarget(o),i.label=3;case 3:i.label=4;case 4:return n++,[3,1];case 5:return[2]}}
2))}))},t.prototype.wc=function(){return i.__awaiter(this,void 0,void 0,(function(){var t,e,n;return i.__generator(this,(function(r){switch(r.label){case 0:t=this.Hu.length>0?this.Hu[this.Hu.length-1].batchId:-1,r.label=1;case 1:if(!this.bc())return[3,7];r.label=2;case 2:return r.trys.push([2,4,,6]),[4,this.zu.Qh(t)];case 3:return null===(e=r.sent())?(0===this.Hu.length&&this.ac.ru(),[3,7]):(t=e.batchId,this.vc(e),[3,6]);case 4:return n=r.sent(),[4,this.Vc(n)];case 5:return r.sent(),[3,6];case 6:return[3,1];case 7:return this.Sc()&&this.Dc(),[2]}}))}))},t.prototype.bc=function(){return this.ec()&&this.Hu.length<10},t.prototype.Cc=function(){return this.Hu.length},t.prototype.vc=function(t){this.Hu.push(t),this.ac.nu()&&this.ac.Ru&&this.ac.Pu(t.mutations)},t.prototype.Sc=function(){return this.ec()&&!this.ac.eu()&&this.Hu.length>0},t.prototype.Dc=function(){this.ac.start()},t.prototype.uc=function(){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(t){return this.ac.yu(),[2]}))}))},t.prototype.lc=function(){return i.__awaiter(this,void 0,void 0,(function(){var t,e,n;return i.__generator(this,(function(r){for(t=0,e=this.Hu;t<e.length;t++)n=e[t],this.ac.Pu(n.mutations);return[2]}))}))},t.prototype.Vu=function(t,e){return i.__awaiter(this,void 0,void 0,(function(){var n,r,o=this;return i.__generator(this,(function(i){switch(i.label){case 0:return n=this.Hu.shift(),r=kn.from(n,t,e),[4,this.yc((function(){return o.Rc.Fc(r)}))];case 1:return i.sent(),[4,this.wc()];case 2:return i.sent(),[2]}}))}))},t.prototype.cc=function(t){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(e){switch(e.label){case 0:return t&&this.ac.Ru?[4,this.Nc(t)]:[3,2];case 1:e.sent(),e.label=2;case 2:return this.Sc()&&this.Dc(),[2]}}))}))},t.prototype.Nc=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,n,r=this;return i.__generator(this,(function(i){switch(i.label){case 0:return J(n=t.code)&&n!==A.ABORTED?(e=this.Hu.shift(),this.ac.iu(),[4,this.yc((function(){return r.Rc.$c(e.batchId,t)}))]):[3,3];case 1:return i.sent(),[4,this.wc()];case 2:i.sent(),i.label=3;case 3:return[2]}}
2))}))},t.prototype.kc=function(){return new Co(this.Du)},t.prototype.nc=function(){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(t){switch(t.label){case 0:return this.Xu.add(4),[4,this.Tc()];case 1:return t.sent(),this.sc.set("Unknown"),this.ac.iu(),this.ic.iu(),this.Xu.delete(4),[4,this._c()];case 2:return t.sent(),[2]}}))}))},t.prototype.xc=function(t){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(e){switch(e.label){case 0:return this.mo.Wo(),p("RemoteStore","RemoteStore received new credentials"),this.Xu.add(3),[4,this.Tc()];case 1:return e.sent(),this.sc.set("Unknown"),[4,this.Rc.xc(t)];case 2:return e.sent(),this.Xu.delete(3),[4,this._c()];case 3:return e.sent(),[2]}}))}))},t.prototype.Mc=function(t){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(e){switch(e.label){case 0:return t?(this.Xu.delete(2),[4,this._c()]):[3,2];case 1:return e.sent(),[3,5];case 2:return t?[3,4]:(this.Xu.add(2),[4,this.Tc()]);case 3:e.sent(),this.sc.set("Unknown"),e.label=4;case 4:e.label=5;case 5:return[2]}}
2))}))},t}();function No(t,e){return"firestore_clients_"+t+"_"+e}function Ao(t,e,n){var r="firestore_mutations_"+t+"_"+n;return e.zr()&&(r+="_"+e.uid),r}function Oo(t,e){return"firestore_targets_"+t+"_"+e}var Po=function(){function t(t,e,n,r){this.user=t,this.batchId=e,this.state=n,this.error=r}return t.Oc=function(e,n,r){var i=JSON.parse(r),o="object"==typeof i&&-1!==["pending","acknowledged","rejected"].indexOf(i.state)&&(void 0===i.error||"object"==typeof i.error),a=void 0;return o&&i.error&&(o="string"==typeof i.error.message&&"string"==typeof i.error.code)&&(a=new O(i.error.code,i.error.message)),o?new t(e,n,i.state,a):(d("SharedClientState","Failed to parse mutation state for ID '"+n+"': "+r),null)},t.prototype.Lc=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},t}(),Ro=function(){function t(t,e,n){this.targetId=t,this.state=e,this.error=n}return t.Oc=function(e,n){var r=JSON.parse(n),i="object"==typeof r&&-1!==["not-current","current","rejected"].indexOf(r.state)&&(void 0===r.error||"object"==typeof r.error),o=void 0;return i&&r.error&&(i="string"==typeof r.error.message&&"string"==typeof r.error.code)&&(o=new O(r.error.code,r.error.message)),i?new t(e,r.state,o):(d("SharedClientState","Failed to parse target state for ID '"+e+"': "+n),null)},t.prototype.Lc=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},t}(),Do=function(){function t(t,e){this.clientId=t,this.activeTargetIds=e}return t.Oc=function(e,n){for(var r=JSON.parse(n),i="object"==typeof r&&r.activeTargetIds instanceof Array,o=dt(),a=0;i&&a<r.activeTargetIds.length;++a)i=q(r.activeTargetIds[a]),o=o.add(r.activeTargetIds[a]);return i?new t(e,o):(d("SharedClientState","Failed to parse client data for instance '"+e+"': "+n),null)},t}(),Lo=function(){function t(t,e){this.clientId=t,this.onlineState=e}return t.Oc=function(e){var n=JSON.parse(e);return"object"==typeof n&&-1!==["Unknown","Online","Offline"].indexOf(n.onlineState)&&"string"==typeof n.clientId?new t(n.clientId,n.onlineState):(d("SharedClientState","Failed to parse online state: "+e),null)},t}(),Mo=function(){function t(){this.activeTargetIds=dt()}return t.prototype.Bc=function(t){this.activeTargetIds=this.activeTargetIds.add(t)},t.prototype.qc=function(t){this.activeTargetIds=this.activeTargetIds.delete(t)},t.prototype.Lc=function(){var t={activeTargetIds:this.activeTargetIds.F(),updateTimeMs:Date.now()};return JSON.stringify(t)},t}(),jo=function(){function t(t,e,n,r,i){this.window=t,this.bs=e,this.persistenceKey=n,this.Uc=r,this.Rc=null,this.Lu=null,this.Ps=null,this.Qc=this.Wc.bind(this),this.jc=new tt(w),this.or=!1,this.Kc=[];var o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=i,this.Gc=No(this.persistenceKey,this.Uc),this.zc=function(t){return"firestore_sequence_number_"+t}(this.persistenceKey),this.jc=this.jc.nt(this.Uc,new Mo),this.Hc=new RegExp("^firestore_clients_"+o+"_([^_]*)$"),this.Yc=new RegExp("^firestore_mutations_"+o+"_(\\d+)(?:_(.*))?$"),this.Jc=new RegExp("^firestore_targets_"+o+"_(\\d+)$"),this.Xc=function(t){return"firestore_online_state_"+t}(this.persistenceKey),this.window.addEventListener("storage",this.Qc)}return t.Hi=function(t){return!(!t||!t.localStorage)},t.prototype.start=function(){return i.__awaiter(this,void 0,void 0,(function(){var t,e,n,r,o,a,s,u,c,l,h,f=this;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,this.Rc.Sr()];case 1:for(t=i.sent(),e=0,n=t;e<n.length;e++)(r=n[e])!==this.Uc&&(o=this.getItem(No(this.persistenceKey,r)))&&(a=Do.Oc(r,o))&&(this.jc=this.jc.nt(a.clientId,a));for(this.Zc(),(s=this.storage.getItem(this.Xc))&&(u=this.tl(s))&&this.el(u),c=0,l=this.Kc;c<l.length;c++)h=l[c],this.Wc(h);return this.Kc=[],this.window.addEventListener("unload",(function(){return f.gr()})),this.or=!0,[2]}}))}))},t.prototype.ys=function(t){this.setItem(this.zc,JSON.stringify(t))},t.prototype.nl=function(){return this.sl(this.jc)},t.prototype.il=function(t){var e=!1;return this.jc.forEach((function(n,r){r.activeTargetIds.has(t)&&(e=!0)})),e},t.prototype.rl=function(t){this.ol(t,"pending")},t.prototype.hl=function(t,e,n){this.ol(t,e,n),this.al(t)},t.prototype.ul=function(t){var e="not-current";if(this.il(t)){var n=this.storage.getItem(Oo(this.persistenceKey,t));
2if(n){var r=Ro.Oc(t,n);r&&(e=r.state)}}return this.cl.Bc(t),this.Zc(),e},t.prototype.ll=function(t){this.cl.qc(t),this.Zc()},t.prototype._l=function(t){return this.cl.activeTargetIds.has(t)},t.prototype.fl=function(t){this.removeItem(Oo(this.persistenceKey,t))},t.prototype.dl=function(t,e,n){this.wl(t,e,n)},t.prototype.Ch=function(t,e,n){var r=this;e.forEach((function(t){r.al(t)})),this.currentUser=t,n.forEach((function(t){r.rl(t)}))},t.prototype.Tl=function(t){this.El(t)},t.prototype.gr=function(){this.or&&(this.window.removeEventListener("storage",this.Qc),this.removeItem(this.Gc),this.or=!1)},t.prototype.getItem=function(t){var e=this.storage.getItem(t);return p("SharedClientState","READ",t,e),e},t.prototype.setItem=function(t,e){p("SharedClientState","SET",t,e),this.storage.setItem(t,e)},t.prototype.removeItem=function(t){p("SharedClientState","REMOVE",t),this.storage.removeItem(t)},t.prototype.Wc=function(t){var e=this,n=t;if(n.storageArea===this.storage){if(p("SharedClientState","EVENT",n.key,n.newValue),n.key===this.Gc)return void d("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.bs._r((function(){return i.__awaiter(e,void 0,void 0,(function(){var t,e,r,o,a,s;return i.__generator(this,(function(i){if(this.or){if(null!==n.key)if(this.Hc.test(n.key)){if(null==n.newValue)return t=this.Il(n.key),[2,this.ml(t,null)];if(e=this.Al(n.key,n.newValue))return[2,this.ml(e.clientId,e)]}else if(this.Yc.test(n.key)){if(null!==n.newValue&&(r=this.Rl(n.key,n.newValue)))return[2,this.Pl(r)]}else if(this.Jc.test(n.key)){if(null!==n.newValue&&(o=this.Vl(n.key,n.newValue)))return[2,this.gl(o)]}else if(n.key===this.Xc){if(null!==n.newValue&&(a=this.tl(n.newValue)))return[2,this.el(a)]}else n.key===this.zc&&(s=function(t){var e=Dn.ps;if(null!=t)try{var n=JSON.parse(t);g("number"==typeof n),e=n}catch(t){d("SharedClientState","Failed to read sequence number from WebStorage",t)}return e}(n.newValue))!==Dn.ps&&this.Ps(s)}else this.Kc.push(n);return[2]}))}))}))}},Object.defineProperty(t.prototype,"cl",{get:function(){return this.jc.get(this.Uc)},enumerable:!1,configurable:!0}),t.prototype.Zc=function(){this.setItem(this.Gc,this.cl.Lc())},t.prototype.ol=function(t,e,n){var r=new Po(this.currentUser,t,e,n),i=Ao(this.persistenceKey,this.currentUser,t);this.setItem(i,r.Lc())},t.prototype.al=function(t){var e=Ao(this.persistenceKey,this.currentUser,t);this.removeItem(e)},t.prototype.El=function(t){var e={clientId:this.Uc,onlineState:t};this.storage.setItem(this.Xc,JSON.stringify(e))},t.prototype.wl=function(t,e,n){var r=Oo(this.persistenceKey,t),i=new Ro(t,e,n);this.setItem(r,i.Lc())},t.prototype.Il=function(t){var e=this.Hc.exec(t);return e?e[1]:null},t.prototype.Al=function(t,e){var n=this.Il(t);return Do.Oc(n,e)},t.prototype.Rl=function(t,e){var n=this.Yc.exec(t),r=Number(n[1]),i=void 0!==n[2]?n[2]:null;return Po.Oc(new yo(i),r,e)},t.prototype.Vl=function(t,e){var n=this.Jc.exec(t),r=Number(n[1]);return Ro.Oc(r,e)},t.prototype.tl=function(t){return Lo.Oc(t)},t.prototype.Pl=function(t){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(e){return t.user.uid===this.currentUser.uid?[2,this.Rc.yl(t.batchId,t.state,t.error)]:(p("SharedClientState","Ignoring mutation for non-active user "+t.user.uid),[2])}))}))},t.prototype.gl=function(t){return this.Rc.pl(t.targetId,t.state,t.error)},t.prototype.ml=function(t,e){var n=this,r=e?this.jc.nt(t,e):this.jc.remove(t),i=this.sl(this.jc),o=this.sl(r),a=[],s=[];return o.forEach((function(t){i.has(t)||a.push(t)})),i.forEach((function(t){o.has(t)||s.push(t)})),this.Rc.bl(a,s).then((function(){n.jc=r}))},t.prototype.el=function(t){this.jc.get(t.clientId)&&this.Lu(t.onlineState)},t.prototype.sl=function(t){var e=dt();return t.forEach((function(t,n){e=e.Ct(n.activeTargetIds)})),e},t}(),Fo=function(){function t(){this.vl=new Mo,this.Sl={},this.Rc=null,this.Lu=null,this.Ps=null}return t.prototype.rl=function(t){},t.prototype.hl=function(t,e,n){},t.prototype.ul=function(t){return this.vl.Bc(t),this.Sl[t]||"not-current"},t.prototype.dl=function(t,e,n){this.Sl[t]=e},t.prototype.ll=function(t){this.vl.qc(t)},t.prototype._l=function(t){return this.vl.activeTargetIds.has(t)},t.prototype.fl=function(t){delete this.Sl[t]},t.prototype.nl=function(){return this.vl.activeTargetIds},t.prototype.il=function(t){return this.vl.activeTargetIds.has(t)},t.prototype.start=function(){return this.vl=new Mo,Promise.resolve()},t.prototype.Ch=function(t,e,n){},t.prototype.Tl=function(t){},t.prototype.gr=function(){},t.prototype.ys=function(t){},t}(),Uo=function(t){this.key=t},Vo=function(t){this.key=t},qo=function(){function t(t,e){this.query=t,this.Dl=e,this.Cl=null,this.Ht=!1,this.Fl=ft(),this.Lt=ft(),this.Nl=fn(t),this.$l=new vt(this.Nl)}return Object.defineProperty(t.prototype,"kl",{get:function(){return this.Dl}
2,enumerable:!1,configurable:!0}),t.prototype.xl=function(t,e){var n=this,r=e?e.Ml:new yt,i=e?e.$l:this.$l,o=e?e.Lt:this.Lt,a=i,s=!1,u=this.query.In()&&i.size===this.query.limit?i.last():null,c=this.query.mn()&&i.size===this.query.limit?i.first():null;if(t.ot((function(t,e){var l=i.get(t),h=e instanceof rn?e:null;h&&(h=hn(n.query,h)?h:null);var f=!!l&&n.Lt.has(l.key),p=!!h&&(h.Ge||n.Lt.has(h.key)&&h.hasCommittedMutations),d=!1;l&&h?l.data().isEqual(h.data())?f!==p&&(r.track({type:3,doc:h}),d=!0):n.Ol(l,h)||(r.track({type:2,doc:h}),d=!0,(u&&n.Nl(h,u)>0||c&&n.Nl(h,c)<0)&&(s=!0)):!l&&h?(r.track({type:0,doc:h}),d=!0):l&&!h&&(r.track({type:1,doc:l}),d=!0,(u||c)&&(s=!0)),d&&(h?(a=a.add(h),o=p?o.add(t):o.delete(t)):(a=a.delete(t),o=o.delete(t)))})),this.query.In()||this.query.mn())for(;a.size>this.query.limit;){var l=this.query.In()?a.last():a.first();a=a.delete(l.key),o=o.delete(l.key),r.track({type:1,doc:l})}return{$l:a,Ml:r,Ll:s,Lt:o}},t.prototype.Ol=function(t,e){return t.Ge&&e.hasCommittedMutations&&!e.Ge},t.prototype.Jn=function(t,e,n){var r=this,i=this.$l;this.$l=t.$l,this.Lt=t.Lt;var o=t.Ml.Mt();o.sort((function(t,e){return function(t,e){var n=function(t){switch(t){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return y()}};return n(t)-n(e)}(t.type,e.type)||r.Nl(t.doc,e.doc)})),this.Bl(n);var a=e?this.ql():[],s=0===this.Fl.size&&this.Ht?1:0,u=s!==this.Cl;return this.Cl=s,0!==o.length||u?{snapshot:new gt(this.query,t.$l,i,o,t.Lt,0===s,u,!1),Ul:a}:{Ul:a}},t.prototype.Ql=function(t){return this.Ht&&"Offline"===t?(this.Ht=!1,this.Jn({$l:this.$l,Ml:new yt,Lt:this.Lt,Ll:!1},!1)):{Ul:[]}},t.prototype.Wl=function(t){return!this.Dl.has(t)&&!!this.$l.has(t)&&!this.$l.get(t).Ge},t.prototype.Bl=function(t){var e=this;t&&(t.Yt.forEach((function(t){return e.Dl=e.Dl.add(t)})),t.Jt.forEach((function(t){})),t.Xt.forEach((function(t){return e.Dl=e.Dl.delete(t)})),this.Ht=t.Ht)},t.prototype.ql=function(){var t=this;if(!this.Ht)return[];var e=this.Fl;
2this.Fl=ft(),this.$l.forEach((function(e){t.Wl(e.key)&&(t.Fl=t.Fl.add(e.key))}));var n=[];return e.forEach((function(e){t.Fl.has(e)||n.push(new Vo(e))})),this.Fl.forEach((function(t){e.has(t)||n.push(new Uo(t))})),n},t.prototype.jl=function(t){this.Dl=t.zh,this.Fl=ft();var e=this.xl(t.documents);return this.Jn(e,!0)},t.prototype.Kl=function(){return gt.Ut(this.query,this.$l,this.Lt,0===this.Cl)},t}(),Bo=function(){function t(t,e,n,r){this.mo=t,this.Du=e,this.updateFunction=n,this.Po=r,this.Gl=5,this.$o=new Mn(this.mo,"transaction_retry")}return t.prototype.run=function(){this.zl()},t.prototype.zl=function(){var t=this;this.$o.xs((function(){return i.__awaiter(t,void 0,void 0,(function(){var t,e,n=this;return i.__generator(this,(function(r){return t=new Co(this.Du),(e=this.Hl(t))&&e.then((function(e){n.mo.cr((function(){return t.commit().then((function(){n.Po.resolve(e)})).catch((function(t){n.Yl(t)}))}))})).catch((function(t){n.Yl(t)})),[2]}))}))}))},t.prototype.Hl=function(t){try{var e=this.updateFunction(t);return!U(e)&&e.catch&&e.then?e:(this.Po.reject(Error("Transaction callback must return a Promise")),null)}catch(t){return this.Po.reject(t),null}},t.prototype.Yl=function(t){var e=this;this.Gl>0&&this.Jl(t)?(this.Gl-=1,this.mo.cr((function(){return e.zl(),Promise.resolve()}))):this.Po.reject(t)},t.prototype.Jl=function(t){if("FirebaseError"===t.name){var e=t.code;return"aborted"===e||"failed-precondition"===e||!J(e)}return!1},t}(),zo=function(t,e,n){this.query=t,this.targetId=e,this.view=n},Wo=function(t){this.key=t,this.Xl=!1},Ho=function(){function t(t,e,n,r,i,o){this.zu=t,this.Zl=e,this.Du=n,this.t_=r,this.currentUser=i,this.e_=o,this.n_=null,this.s_=new N((function(t){return cn(t)}),un),this.i_=new Map,this.r_=[],this.o_=new tt(F.P),this.h_=new Map,this.a_=new fi,this.u_={},this.c_=new Map,this.l_=ar.di(),this.onlineState="Unknown"}return Object.defineProperty(t.prototype,"__",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.subscribe=function(t){this.n_=t},t.prototype.listen=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,n,r,o,a;return i.__generator(this,(function(i){switch(i.label){case 0:return this.f_("listen()"),(r=this.s_.get(t))?(e=r.targetId,this.t_.ul(e),n=r.view.Kl(),[3,4]):[3,1];case 1:return[4,this.zu.jh(t.We())];case 2:return o=i.sent(),a=this.t_.ul(o.targetId),e=o.targetId,[4,this.d_(t,e,"current"===a)];case 3:n=i.sent(),this.__&&this.Zl.listen(o),i.label=4;case 4:return[2,n]}}))}))},t.prototype.d_=function(t,e,n){return i.__awaiter(this,void 0,void 0,(function(){var r,o,a,s,u,c;return i.__generator(this,(function(i){switch(i.label){case 0:return[4,this.zu.Gh(t,!0)];case 1:return r=i.sent(),o=new qo(t,r.zh),a=o.xl(r.documents),s=bt.zt(e,n&&"Offline"!==this.onlineState),u=o.Jn(a,this.__,s),this.w_(e,u.Ul),c=new zo(t,e,o),[2,(this.s_.set(t,c),this.i_.has(e)?this.i_.get(e).push(t):this.i_.set(e,[t]),u.snapshot)]}}))}))},t.prototype.mc=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,n,r=this;return i.__generator(this,(function(i){switch(i.label){case 0:return this.f_("unlisten()"),e=this.s_.get(t),(n=this.i_.get(e.targetId)).length>1?[2,(this.i_.set(e.targetId,n.filter((function(e){return!un(e,t)}))),void this.s_.delete(t))]:this.__?(this.t_.ll(e.targetId),this.t_.il(e.targetId)?[3,2]:[4,this.zu.Kh(e.targetId,!1).then((function(){r.t_.fl(e.targetId),r.Zl.mc(e.targetId),r.T_(e.targetId)})).catch(hi)]):[3,3];case 1:i.sent(),i.label=2;case 2:return[3,5];case 3:return this.T_(e.targetId),[4,this.zu.Kh(e.targetId,!0)];case 4:i.sent(),i.label=5;case 5:return[2]}}
2))}))},t.prototype.write=function(t,e){return i.__awaiter(this,void 0,void 0,(function(){var n,r,o;return i.__generator(this,(function(i){switch(i.label){case 0:this.f_("write()"),i.label=1;case 1:return i.trys.push([1,5,,6]),[4,this.zu.kh(t)];case 2:return n=i.sent(),this.t_.rl(n.batchId),this.E_(n.batchId,e),[4,this.I_(n.Un)];case 3:return i.sent(),[4,this.Zl.wc()];case 4:return i.sent(),[3,6];case 5:return r=i.sent(),o=ei(r,"Failed to persist write"),e.reject(o),[3,6];case 6:return[2]}}))}))},t.prototype.runTransaction=function(t,e,n){new Bo(t,this.Du,e,n).run()},t.prototype.Lh=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,n=this;return i.__generator(this,(function(r){switch(r.label){case 0:this.f_("applyRemoteEvent()"),r.label=1;case 1:return r.trys.push([1,4,,6]),[4,this.zu.Lh(t)];case 2:return e=r.sent(),t.Qt.forEach((function(t,e){var r=n.h_.get(e);r&&(g(t.Yt.size+t.Jt.size+t.Xt.size<=1),t.Yt.size>0?r.Xl=!0:t.Jt.size>0?g(r.Xl):t.Xt.size>0&&(g(r.Xl),r.Xl=!1))})),[4,this.I_(e,t)];case 3:return r.sent(),[3,6];case 4:return[4,hi(r.sent())];case 5:return r.sent(),[3,6];case 6:return[2]}}
2))}))},t.prototype.Ql=function(t,e){this.f_("applyOnlineStateChange()");var n=[];this.s_.forEach((function(e,r){var i=r.view.Ql(t);i.snapshot&&n.push(i.snapshot)})),this.n_.m_(t),this.n_.Eu(n),this.onlineState=t},t.prototype.pc=function(t,e){return i.__awaiter(this,void 0,void 0,(function(){var n,r,o,a,s,u=this;return i.__generator(this,(function(i){switch(i.label){case 0:return this.f_("rejectListens()"),this.t_.dl(t,"rejected",e),n=this.h_.get(t),(r=n&&n.key)?(o=(o=new tt(F.P)).nt(r,new on(r,R.min())),a=ft().add(r),s=new mt(R.min(),new Map,new rt(w),o,a),[4,this.Lh(s)]):[3,2];case 1:return i.sent(),this.o_=this.o_.remove(r),this.h_.delete(t),this.A_(),[3,4];case 2:return[4,this.zu.Kh(t,!1).then((function(){return u.T_(t,e)})).catch(hi)];case 3:i.sent(),i.label=4;case 4:return[2]}}))}))},t.prototype.Fc=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,n;return i.__generator(this,(function(r){switch(r.label){case 0:this.f_("applySuccessfulWrite()"),e=t.batch.batchId,r.label=1;case 1:return r.trys.push([1,4,,6]),[4,this.zu.xh(t)];case 2:return n=r.sent(),this.R_(e,null),this.P_(e),this.t_.hl(e,"acknowledged"),[4,this.I_(n)];case 3:return r.sent(),[3,6];case 4:return[4,hi(r.sent())];case 5:return r.sent(),[3,6];case 6:return[2]}}
2))}))},t.prototype.$c=function(t,e){return i.__awaiter(this,void 0,void 0,(function(){var n;return i.__generator(this,(function(r){switch(r.label){case 0:this.f_("rejectFailedWrite()"),r.label=1;case 1:return r.trys.push([1,4,,6]),[4,this.zu.Oh(t)];case 2:return n=r.sent(),this.R_(t,e),this.P_(t),this.t_.hl(t,"rejected",e),[4,this.I_(n)];case 3:return r.sent(),[3,6];case 4:return[4,hi(r.sent())];case 5:return r.sent(),[3,6];case 6:return[2]}}))}))},t.prototype.V_=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,n,r,o;return i.__generator(this,(function(i){switch(i.label){case 0:this.Zl.ec()||p("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled."),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.zu.to()];case 2:return-1===(e=i.sent())?[2,void t.resolve()]:((n=this.c_.get(e)||[]).push(t),this.c_.set(e,n),[3,4]);case 3:return r=i.sent(),o=ei(r,"Initialization of waitForPendingWrites() operation failed"),t.reject(o),[3,4];case 4:return[2]}}
2))}))},t.prototype.P_=function(t){(this.c_.get(t)||[]).forEach((function(t){t.resolve()})),this.c_.delete(t)},t.prototype.g_=function(t){this.c_.forEach((function(e){e.forEach((function(e){e.reject(new O(A.CANCELLED,t))}))})),this.c_.clear()},t.prototype.E_=function(t,e){var n=this.u_[this.currentUser.ka()];n||(n=new tt(w)),n=n.nt(t,e),this.u_[this.currentUser.ka()]=n},t.prototype.R_=function(t,e){var n=this.u_[this.currentUser.ka()];if(n){var r=n.get(t);r&&(e?r.reject(e):r.resolve(),n=n.remove(t)),this.u_[this.currentUser.ka()]=n}},t.prototype.T_=function(t,e){var n=this;void 0===e&&(e=null),this.t_.ll(t);for(var r=0,i=this.i_.get(t);r<i.length;r++){var o=i[r];this.s_.delete(o),e&&this.n_.y_(o,e)}this.i_.delete(t),this.__&&this.a_.oa(t).forEach((function(t){n.a_.Mi(t)||n.p_(t)}))},t.prototype.p_=function(t){var e=this.o_.get(t);null!==e&&(this.Zl.mc(e),this.o_=this.o_.remove(t),this.h_.delete(e),this.A_())},t.prototype.w_=function(t,e){for(var n=0,r=e;n<r.length;n++){var i=r[n];i instanceof Uo?(this.a_.Fi(i.key,t),this.b_(i)):i instanceof Vo?(p("SyncEngine","Document no longer in limbo: "+i.key),this.a_.$i(i.key,t),this.a_.Mi(i.key)||this.p_(i.key)):y()}},t.prototype.b_=function(t){var e=t.key;this.o_.get(e)||(p("SyncEngine","New document in limbo: "+e),this.r_.push(e),this.A_())},t.prototype.A_=function(){for(;this.r_.length>0&&this.o_.size<this.e_;){var t=this.r_.shift(),e=this.l_.next();this.h_.set(e,new Wo(t)),this.o_=this.o_.nt(t,e),this.Zl.listen(new X(sn.hn(t.path).We(),e,2,Dn.ps))}},t.prototype.v_=function(){return this.o_},t.prototype.S_=function(){return this.r_},t.prototype.I_=function(t,e){return i.__awaiter(this,void 0,void 0,(function(){var n,r,o,a=this;return i.__generator(this,(function(i){switch(i.label){case 0:return n=[],r=[],o=[],this.s_.forEach((function(i,s){o.push(Promise.resolve().then((function(){var e=s.view.xl(t);return e.Ll?a.zu.Gh(s.query,!1).then((function(t){var n=t.documents;return s.view.xl(n,e)})):e})).then((function(t){var i=e&&e.Qt.get(s.targetId),o=s.view.Jn(t,a.__,i);if(a.w_(s.targetId,o.Ul),o.snapshot){a.__&&a.t_.dl(s.targetId,o.snapshot.fromCache?"not-current":"current"),n.push(o.snapshot);var u=Rn.Rs(s.targetId,o.snapshot);r.push(u)}})))})),[4,Promise.all(o)];case 1:return i.sent(),this.n_.Eu(n),[4,this.zu.Uh(r)];case 2:return i.sent(),[2]}}))}))},t.prototype.f_=function(t){},t.prototype.xc=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e;return i.__generator(this,(function(n){switch(n.label){case 0:return this.currentUser.isEqual(t)?[3,3]:(p("SyncEngine","User change. New user:",t.ka()),[4,this.zu.Ch(t)]);case 1:return e=n.sent(),this.currentUser=t,this.g_("'waitForPendingWrites' promise is rejected due to a user change."),this.t_.Ch(t,e.Nh,e.$h),[4,this.I_(e.Fh)];case 2:n.sent(),n.label=3;case 3:return[2]}}
2))}))},t.prototype.enableNetwork=function(){return this.Zl.enableNetwork()},t.prototype.disableNetwork=function(){return this.Zl.disableNetwork()},t.prototype.xe=function(t){var e=this.h_.get(t);if(e&&e.Xl)return ft().add(e.key);var n=ft(),r=this.i_.get(t);if(!r)return n;for(var i=0,o=r;i<o.length;i++){var a=o[i],s=this.s_.get(a);n=n.Ct(s.view.kl)}return n},t}();function Ko(t,e,n,r,i,o){return new Ho(t,e,n,r,i,o)}var Go=function(t){function e(e,n,r,i,o,a){var s=this;return(s=t.call(this,e,n,r,i,o,a)||this).zu=e,s.D_=void 0,s}return i.__extends(e,t),Object.defineProperty(e.prototype,"__",{get:function(){return!0===this.D_},enumerable:!1,configurable:!0}),e.prototype.enableNetwork=function(){return this.zu.ur(!0),t.prototype.enableNetwork.call(this)},e.prototype.disableNetwork=function(){return this.zu.ur(!1),t.prototype.disableNetwork.call(this)},e.prototype.C_=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,n;return i.__generator(this,(function(r){switch(r.label){case 0:return[4,this.zu.Gh(t.query,!0)];case 1:return e=r.sent(),n=t.view.jl(e),[2,(this.D_&&this.w_(t.targetId,n.Ul),n)]}}))}))},e.prototype.Ql=function(e,n){this.__&&0===n&&(t.prototype.Ql.call(this,e,n),this.t_.Tl(e)),this.__||1!==n||t.prototype.Ql.call(this,e,n)},e.prototype.yl=function(t,e,n){return i.__awaiter(this,void 0,void 0,(function(){var r;return i.__generator(this,(function(i){switch(i.label){case 0:return this.f_("applyBatchState()"),[4,this.zu.Yh(t)];case 1:return null===(r=i.sent())?[3,6]:"pending"!==e?[3,3]:[4,this.Zl.wc()];case 2:return i.sent(),[3,4];case 3:"acknowledged"===e||"rejected"===e?(this.R_(t,n||null),this.zu.Jh(t)):y(),i.label=4;case 4:return[4,this.I_(r)];case 5:return i.sent(),[3,7];case 6:p("SyncEngine","Cannot apply mutation batch with id: "+t),i.label=7;case 7:return[2]}}
2))}))},e.prototype.Mc=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,n,r,o,a,s,u,c=this;return i.__generator(this,(function(i){switch(i.label){case 0:return!0!==t||!0===this.D_?[3,3]:(e=this.t_.nl(),[4,this.F_(e.F(),!0)]);case 1:return n=i.sent(),this.D_=!0,[4,this.Zl.Mc(!0)];case 2:for(i.sent(),r=0,o=n;r<o.length;r++)a=o[r],this.Zl.listen(a);return[3,7];case 3:return!1!==t||!1===this.D_?[3,7]:(s=[],u=Promise.resolve(),this.i_.forEach((function(t,e){c.t_._l(e)?s.push(e):u=u.then((function(){return c.T_(e),c.zu.Kh(e,!0)})),c.Zl.mc(e)})),[4,u]);case 4:return i.sent(),[4,this.F_(s,!1)];case 5:return i.sent(),this.N_(),this.D_=!1,[4,this.Zl.Mc(!1)];case 6:i.sent(),i.label=7;case 7:return[2]}}))}))},e.prototype.N_=function(){var t=this;this.h_.forEach((function(e,n){t.Zl.mc(n)})),this.a_.ha(),this.h_=new Map,this.o_=new tt(F.P)},e.prototype.F_=function(t,e){return i.__awaiter(this,void 0,void 0,(function(){var e,n,r,o,a,s,u,c,l,h,f,p,d;return i.__generator(this,(function(i){switch(i.label){case 0:e=[],n=[],r=0,o=t,i.label=1;case 1:return r<o.length?(a=o[r],s=void 0,(u=this.i_.get(a))&&0!==u.length?[4,this.zu.jh(u[0].We())]:[3,7]):[3,13];case 2:s=i.sent(),c=0,l=u,i.label=3;case 3:return c<l.length?(h=l[c],f=this.s_.get(h),[4,this.C_(f)]):[3,6];case 4:(p=i.sent()).snapshot&&n.push(p.snapshot),i.label=5;case 5:return c++,[3,3];case 6:return[3,11];case 7:return[4,this.zu.Xh(a)];case 8:return d=i.sent(),[4,this.zu.jh(d)];case 9:return s=i.sent(),[4,this.d_(this.k_(d),a,!1)];case 10:i.sent(),i.label=11;case 11:e.push(s),i.label=12;case 12:return r++,[3,1];case 13:return[2,(this.n_.Eu(n),e)]}}))}))},e.prototype.k_=function(t){return new sn(t.path,t.collectionGroup,t.orderBy,t.filters,t.limit,"F",t.startAt,t.endAt)},e.prototype.Sr=function(){return this.zu.Sr()},e.prototype.pl=function(t,e,n){return i.__awaiter(this,void 0,void 0,(function(){var r,o;return i.__generator(this,(function(i){switch(i.label){case 0:return this.D_?(p("SyncEngine","Ignoring unexpected query state notification."),[3,8]):[3,1];case 1:if(!this.i_.has(t))return[3,8];switch(e){case"current":case"not-current":return[3,2];case"rejected":return[3,5]}return[3,7];case 2:return[4,this.zu.si()];case 3:return r=i.sent(),o=mt.Gt(t,"current"===e),[4,this.I_(r,o)];case 4:return i.sent(),[3,8];case 5:return[4,this.zu.Kh(t,!0)];case 6:return i.sent(),this.T_(t,n),[3,8];case 7:y(),i.label=8;case 8:return[2]}}
2))}))},e.prototype.bl=function(t,e){return i.__awaiter(this,void 0,void 0,(function(){var n,r,o,a,s,u,c,l,h,f,d=this;return i.__generator(this,(function(v){switch(v.label){case 0:if(!this.D_)return[3,10];n=0,r=t,v.label=1;case 1:return n<r.length?(o=r[n],this.i_.has(o)?(p("SyncEngine","Adding an already active target "+o),[3,5]):[4,this.zu.Xh(o)]):[3,6];case 2:return a=v.sent(),[4,this.zu.jh(a)];case 3:return s=v.sent(),[4,this.d_(this.k_(a),s.targetId,!1)];case 4:v.sent(),this.Zl.listen(s),v.label=5;case 5:return n++,[3,1];case 6:u=function(t){return i.__generator(this,(function(e){switch(e.label){case 0:return c.i_.has(t)?[4,c.zu.Kh(t,!1).then((function(){d.Zl.mc(t),d.T_(t)})).catch(hi)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))},c=this,l=0,h=e,v.label=7;case 7:return l<h.length?(f=h[l],[5,u(f)]):[3,10];case 8:v.sent(),v.label=9;case 9:return l++,[3,7];case 10:return[2]}}))}))},e}(Ho),Qo=function(){this.x_=void 0,this.listeners=[]},$o=function(){function t(t){this.Rc=t,this.M_=new N((function(t){return cn(t)}),un),this.onlineState="Unknown",this.O_=new Set,this.Rc.subscribe(this)}return t.prototype.listen=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,n,r,o,a,s;return i.__generator(this,(function(i){switch(i.label){case 0:if(e=t.query,n=!1,(r=this.M_.get(e))||(n=!0,r=new Qo),!n)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),o=r,[4,this.Rc.listen(e)];case 2:return o.x_=i.sent(),[3,4];case 3:return a=i.sent(),s=ei(a,"Initialization of query '"+ln(t.query)+"' failed"),[2,void t.onError(s)];case 4:return this.M_.set(e,r),r.listeners.push(t),t.Ql(this.onlineState),r.x_&&t.L_(r.x_)&&this.B_(),[2]}}))}))},t.prototype.mc=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,n,r,o;return i.__generator(this,(function(i){return e=t.query,n=!1,(r=this.M_.get(e))&&(o=r.listeners.indexOf(t))>=0&&(r.listeners.splice(o,1),n=0===r.listeners.length),n?[2,(this.M_.delete(e),this.Rc.mc(e))]:[2]}))}))},t.prototype.Eu=function(t){for(var e=!1,n=0,r=t;n<r.length;n++){var i=r[n],o=i.query,a=this.M_.get(o);if(a){for(var s=0,u=a.listeners;s<u.length;s++)u[s].L_(i)&&(e=!0);a.x_=i}}e&&this.B_()},t.prototype.y_=function(t,e){var n=this.M_.get(t);if(n)for(var r=0,i=n.listeners;r<i.length;r++)i[r].onError(e);this.M_.delete(t)},t.prototype.m_=function(t){this.onlineState=t;var e=!1;this.M_.forEach((function(n,r){for(var i=0,o=r.listeners;i<o.length;i++)o[i].Ql(t)&&(e=!0)})),e&&this.B_()},t.prototype.q_=function(t){this.O_.add(t),t.next()},t.prototype.U_=function(t){this.O_.delete(t)},t.prototype.B_=function(){this.O_.forEach((function(t){t.next()}))},t}(),Xo=function(){function t(t,e,n){this.query=t,this.Q_=e,this.W_=!1,this.j_=null,this.onlineState="Unknown",this.options=n||{}}return t.prototype.L_=function(t){if(!this.options.includeMetadataChanges){for(var e=[],n=0,r=t.docChanges;n<r.length;n++){var i=r[n];3!==i.type&&e.push(i)}t=new gt(t.query,t.docs,t.Ot,e,t.Lt,t.fromCache,t.Bt,!0)}var o=!1;return this.W_?this.K_(t)&&(this.Q_.next(t),o=!0):this.G_(t,this.onlineState)&&(this.z_(t),o=!0),this.j_=t,o},t.prototype.onError=function(t){this.Q_.error(t)},t.prototype.Ql=function(t){this.onlineState=t;var e=!1;return this.j_&&!this.W_&&this.G_(this.j_,t)&&(this.z_(this.j_),e=!0),e},t.prototype.G_=function(t,e){if(!t.fromCache)return!0;var n="Offline"!==e;return!(this.options.H_&&n||t.docs._()&&"Offline"!==e)},t.prototype.K_=function(t){if(t.docChanges.length>0)return!0;var e=this.j_&&this.j_.hasPendingWrites!==t.hasPendingWrites;return!(!t.Bt&&!e)&&!0===this.options.includeMetadataChanges},t.prototype.z_=function(t){t=gt.Ut(t.query,t.docs,t.Lt,t.fromCache),this.W_=!0,this.Q_.next(t)},t}(),Yo=function(){function t(){}return t.prototype.Dh=function(t){this.Y_=t},t.prototype._s=function(t,e,n,r){var i=this;return e.En()||n.isEqual(R.min())?this.J_(t,e):this.Y_.us(t,r).next((function(o){var s=i.X_(e,o);return(e.In()||e.mn())&&i.Ll(e.nn,s,r,n)?i.J_(t,e):(f()<=a.LogLevel.DEBUG&&p("IndexFreeQueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),ln(e)),i.Y_._s(t,e,n).next((function(t){return s.forEac
2h((function(e){t=t.nt(e.key,e)})),t})))}))},t.prototype.X_=function(t,e){var n=new rt(fn(t));return e.forEach((function(e,r){r instanceof rn&&hn(t,r)&&(n=n.add(r))})),n},t.prototype.Ll=function(t,e,n,r){if(n.size!==e.size)return!0;var i="F"===t?e.last():e.first();return!!i&&(i.hasPendingWrites||i.version.o(r)>0)},t.prototype.J_=function(t,e){return f()<=a.LogLevel.DEBUG&&p("IndexFreeQueryEngine","Using full collection scan to execute query:",ln(e)),this.Y_._s(t,e,R.min())},t}(),Jo=function(){function t(t,e){this.ss=t,this.wi=e,this.ns=[],this.Z_=1,this.tf=new rt(pi.ta)}return t.prototype.Hr=function(t){return xn.resolve(0===this.ns.length)},t.prototype.Yr=function(t,e,n,r){var i=this.Z_;this.Z_++,this.ns.length>0&&this.ns[this.ns.length-1];var o=new Cn(i,e,n,r);this.ns.push(o);for(var a=0,s=r;a<s.length;a++){var u=s[a];this.tf=this.tf.add(new pi(u.key,i)),this.ss.Us(t,u.key.path.p())}return xn.resolve(o)},t.prototype.Jr=function(t,e){return xn.resolve(this.ef(e))},t.prototype.Zr=function(t,e){var n=e+1,r=this.nf(n),i=r<0?0:r;return xn.resolve(this.ns.length>i?this.ns[i]:null)},t.prototype.to=function(){return xn.resolve(0===this.ns.length?-1:this.Z_-1)},t.prototype.eo=function(t){return xn.resolve(this.ns.slice())},t.prototype.os=function(t,e){var n=this,r=new pi(e,0),i=new pi(e,Number.POSITIVE_INFINITY),o=[];return this.tf.vt([r,i],(function(t){var e=n.ef(t.ua);o.push(e)})),xn.resolve(o)},t.prototype.ls=function(t,e){var n=this,r=new rt(w);return e.forEach((function(t){var e=new pi(t,0),i=new pi(t,Number.POSITIVE_INFINITY);n.tf.vt([e,i],(function(t){r=r.add(t.ua)}))})),xn.resolve(this.sf(r))},t.prototype.Es=function(t,e){var n=e.path,r=n.length+1,i=n;F.W(i)||(i=i.child(""));var o=new pi(new F(i),0),a=new rt(w);return this.tf.St((function(t){var e=t.key.path;return!!n.D(e)&&(e.length===r&&(a=a.add(t.ua)),!0)}),o),xn.resolve(this.sf(a))},t.prototype.sf=function(t){var e=this,n=[];return t.forEach((function(t){var r=e.ef(t);null!==r&&n.push(r)})),n},t.prototype.so=function(t,e){var n=this;g(0===this.if(e.batchId,"removed")),this.ns.shift();var r=this.tf;return xn.forEach(e.mutations,(function(i){var o=new pi(i.key,e.batchId);return r=r.delete(o),n.wi.qr(t,i.key)})).next((function(){n.tf=r}))},t.prototype.io=function(t){},t.prototype.Mi=function(t,e){var n=new pi(e,0),r=this.tf.Dt(n);return xn.resolve(e.isEqual(r&&r.key))},t.prototype.ro=function(t){return this.ns.length,xn.resolve()},t.prototype.if=function(t,e){return this.nf(t)},t.prototype.nf=function(t){return 0===this.ns.length?0:t-this.ns[0].batchId},t.prototype.ef=function(t){var e=this.nf(t);return e<0||e>=this.ns.length?null:this.ns[e]},t}(),Zo=function(){function t(t,e){this.ss=t,this.rf=e,this.docs=new tt(F.P),this.size=0}return t.prototype.jn=function(t,e,n){var r=e.key,i=this.docs.get(r),o=i?i.size:0,a=this.rf(e);return this.docs=this.docs.nt(r,{Ys:e,size:a,readTime:n}),this.size+=a-o,this.ss.Us(t,r.path.p())},t.prototype.Gn=function(t){var e=this.docs.get(t);e&&(this.docs=this.docs.remove(t),this.size-=e.size)},t.prototype.zn=function(t,e){var n=this.docs.get(e);return xn.resolve(n?n.Ys:null)},t.prototype.getEntries=function(t,e){var n=this,r=st();return e.forEach((function(t){var e=n.docs.get(t);r=r.nt(t,e?e.Ys:null)})),xn.resolve(r)},t.prototype._s=function(t,e,n){for(var r=ct(),i=new F(e.path.child("")),o=this.docs.ut(i);o.wt();){var a=o.dt(),s=a.key,u=a.value,c=u.Ys,l=u.readTime;if(!e.path.D(s.path))break;l.o(n)<=0||c instanceof rn&&hn(e,c)&&(r=r.nt(c.key,c))}return xn.resolve(r)},t.prototype.hf=function(t,e){return xn.forEach(this.docs,(function(t){return e(t)}))},t.prototype.oi=function(e){return new t.hi(this)},t.prototype.ui=function(t){return xn.resolve(this.size)},t}();Zo.hi=function(t){function e(e){var n=this;return(n=t.call(this)||this).ci=e,n}return i.__extends(e,t),e.prototype.Jn=function(t){var e=this,n=[];return this.Un.forEach((function(r,i){i?n.push(e.ci.jn(t,i,e.readTime)):e.ci.Gn(r)})),xn.Bn(n)},e.prototype.Hn=function(t,e){return this.ci.zn(t,e)},e.prototype.Yn=function(t,e){return this.ci.getEntries(t,e)},e}(Nn);var ta=function(){function t(t){this.persistence=t,this.af=new N((function(t){return W(t)}),H),this.lastRemoteSnapshotVersion=R.min(),this.highestTargetId=0,this.uf=0,this.cf=new fi,this.targetCount=0,this.lf=ar.fi()}return t.prototype.pe=function(t,e){return this.af.forEach((function(t,n){return e(n)})),xn.resolve()},t.prototype.mi=function(t){return xn.resolve(this.lastRemoteSnapshotVersion)},t.prototype.Ai=function(t){return xn.resolve(this.uf)},t.prototype.Ti=function(t){return this.highestTargetId=this.lf.next(),xn.resolve(this.highestTargetId)},t.prototype.Ri=function(t,e,n){return n&&(this.lastRemoteSnapshotVersion=n),e>this.uf&&(this.uf=e),xn.resolve()},t.prototype.Vi=function(t){this.af.set(t.target,t);var e=t.targetId;e>this.highestTargetId&&(this.lf=new ar(e),this.highestTargetId=e),t.sequenceNumber>this.uf&&(this.uf=t.sequenceNumber)},t.prototype.Pi=function(t,e){return this.Vi(e),this.targetCount+=1,xn.resolve()},t.prototype.yi=function(t,e){return this.Vi(e),xn.resolve()},t.prototype.pi=function(t,e){return this.af.delete(e.target),this.cf.oa(e.targetId),this.targetCount-=1,xn.resolve()},t.prototype.vi=function(t,e,n){var r=this,i=0,o=[];return this.af.forEach((function(a,s){s.sequenceNumber<=e&&null===n.get(s.targetId)&&(r.af.delete(a),o.push(r.bi(t,
2s.targetId)),i++)})),xn.Bn(o).next((function(){return i}))},t.prototype.Si=function(t){return xn.resolve(this.targetCount)},t.prototype.Di=function(t,e){var n=this.af.get(e)||null;return xn.resolve(n)},t.prototype.Ci=function(t,e,n){return this.cf.sa(e,n),xn.resolve()},t.prototype.Ni=function(t,e,n){this.cf.ra(e,n);var r=this.persistence.wi,i=[];return r&&e.forEach((function(e){i.push(r.qr(t,e))})),xn.Bn(i)},t.prototype.bi=function(t,e){return this.cf.oa(e),xn.resolve()},t.prototype.ki=function(t,e){var n=this.cf.aa(e);return xn.resolve(n)},t.prototype.Mi=function(t,e){return xn.resolve(this.cf.Mi(e))},t}(),ea=function(){function t(t){var e=this;this._f={},this.Ui=new Dn(0),this.Qi=!1,this.Qi=!0,this.wi=t(this),this.Ji=new ta(this),this.ss=new qn,this.es=new Zo(this.ss,(function(t){return e.wi.ff(t)}))}return t.prototype.start=function(){return Promise.resolve()},t.prototype.gr=function(){return this.Qi=!1,Promise.resolve()},Object.defineProperty(t.prototype,"or",{get:function(){return this.Qi},enumerable:!1,configurable:!0}),t.prototype.hr=function(){},t.prototype.$r=function(){return this.ss},t.prototype.Dr=function(t){var e=this._f[t.ka()];return e||(e=new Jo(this.ss,this.wi),this._f[t.ka()]=e),e},t.prototype.Fr=function(){return this.Ji},t.prototype.Nr=function(){return this.es},t.prototype.runTransaction=function(t,e,n){var r=this;p("MemoryPersistence","Starting transaction:",t);var i=new na(this.Ui.next());return this.wi.df(),n(i).next((function(t){return r.wi.wf(i).next((function(){return t}))})).On().then((function(t){return i.ts(),t}))},t.prototype.Tf=function(t,e){return xn.qn(Object.values(this._f).map((function(n){return function(){return n.Mi(t,e)}})))},t}(),na=function(t){function e(e){var n=this;return(n=t.call(this)||this).Li=e,n}return i.__extends(e,t),e}(On),ra=function(){function t(t){this.persistence=t,this.Ef=new fi,this.If=null}return t.mf=function(e){return new t(e)},Object.defineProperty(t.prototype,"Af",{get:function(){if(this.If)return this.If;throw y()},enumerable:!1,configurable:!0}),t.prototype.Fi=function(t,e,n){return this.Ef.Fi(n,e),this.Af.delete(n),xn.resolve()},t.prototype.$i=function(t,e,n){return this.Ef.$i(n,e),this.Af.add(n),xn.resolve()},t.prototype.qr=function(t,e){return this.Af.add(e),xn.resolve()},t.prototype.removeTarget=function(t,e){var n=this;this.Ef.oa(e.targetId).forEach((function(t){return n.Af.add(t)}));var r=this.persistence.Fr();return r.ki(t,e.targetId).next((function(t){t.forEach((function(t){return n.Af.add(t)}))})).next((function(){return r.pi(t,e)}))},t.prototype.df=function(){this.If=new Set},t.prototype.wf=function(t){var e=this,n=this.persistence.Nr().oi();return xn.forEach(this.Af,(function(r){return e.Rf(t,r).next((function(t){t||n.Gn(r)}))})).next((function(){return e.If=null,n.apply(t)}))},t.prototype.jr=function(t,e){var n=this;return this.Rf(t,e).next((function(t){t?n.Af.delete(e):n.Af.add(e)}))},t.prototype.ff=function(t){return 0},t.prototype.Rf=function(t,e){var n=this;return xn.qn([function(){return xn.resolve(n.Ef.Mi(e))},function(){return n.persistence.Fr().Mi(t,e)},function(){return n.persistence.Tf(t,e)}])},t}(),ia=function(){function t(t){this.Pf=t.Pf,this.Vf=t.Vf}return t.prototype.wu=function(t){this.gf=t},t.prototype.cu=function(t){this.yf=t},t.prototype.onMessage=function(t){this.pf=t},t.prototype.close=function(){this.Vf()},t.prototype.send=function(t){this.Pf(t)},t.prototype.bf=function(){this.gf()},t.prototype.vf=function(t){this.yf(t)},t.prototype.Sf=function(t){this.pf(t)},t}(),oa={BatchGetDocuments:"batchGet",Commit:"commit"},aa="gl-js/ fire/"+l,sa=function(){function t(t){this.s=t.s;var e=t.ssl?"https":"http";this.Df=e+"://"+t.host,this.forceLongPolling=t.forceLongPolling}return t.prototype.Cf=function(t,e){if(e)for(var n in e.Oa)e.Oa.hasOwnProperty(n)&&(t[n]=e.Oa[n]);t["X-Goog-Api-Client"]=aa},t.prototype.vu=function(t,e,n){var r=this,i=this.Ff(t);return new Promise((function(o,a){var s=new u.XhrIo;s.listenOnce(u.EventType.COMPLETE,(function(){try{switch(s.getLastErrorCode()){case u.ErrorCode.NO_ERROR:var e=s.getResponseJson();p("Connection","XHR received:",JSON.stringify(e)),o(e);break;case u.ErrorCode.TIMEOUT:p("Connection",'RPC "'+t+'" timed out'),a(new O(A.DEADLINE_EXCEEDED,"Request time out"));break;case u.ErrorCode.HTTP_ERROR:var n=s.getStatus();if(p("Connection",'RPC "'+t+'" failed with status:',n,"response text:",s.getResponseText()),n>0){var r=s.getResponseJson().error;if(r&&r.status&&r.message){var i=function(t){var e=t.toLowerCase().replace("_","-");return Object.values(A).indexOf(e)>=0?e:A.UNKNOWN}(r.status);a(new O(i,r.message))}else a(new O(A.UNKNOWN,"Server responded with status "+s.getStatus()))}else p("Connection",'RPC "'+t+'" failed'),a(new O(A.UNAVAILABLE,"Connection failed."));break;default:y()}}finally{p("Connection",'RPC "'+t+'" completed.')}}));var c=Object.assign({},e);delete c.database;var l=JSON.stringify(c);p("Connection","XHR sending: ",i+" "+l);var h={"Content-Type":"text/plain"};r.Cf(h,n),s.send(i,"POST",l,h,15)}))},t.prototype.Su=function(t,e,n){return this.vu(t,e,n)},t.prototype.Tu=function(t,e){var n=[this.Df,"/","google.firestore.v1.Firestore","/",t,"/channel"],r=u.createWebChannelTransport(),o={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.s.projectId+"/databases/"+this.s.database}
2,sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling};this.Cf(o.initMessageHeaders,e),s.isMobileCordova()||s.isReactNative()||s.isElectron()||s.isIE()||s.isUWP()||s.isBrowserExtension()||(o.httpHeadersOverwriteParam="$httpHeaders");var c=n.join("");p("Connection","Creating WebChannel: "+c+" "+o);var f=r.createWebChannel(c,o),d=!1,y=!1,m=new ia({Pf:function(t){y?p("Connection","Not sending because WebChannel is closed:",t):(d||(p("Connection","Opening WebChannel transport."),f.open(),d=!0),p("Connection","WebChannel sending:",t),f.send(t))},Vf:function(){return f.close()}}),b=function(t,e){f.listen(t,(function(t){try{e(t)}catch(t){setTimeout((function(){throw t}),0)}}))};return b(u.WebChannel.EventType.OPEN,(function(){y||p("Connection","WebChannel transport opened.")})),b(u.WebChannel.EventType.CLOSE,(function(){y||(y=!0,p("Connection","WebChannel transport closed"),m.vf())})),b(u.WebChannel.EventType.ERROR,(function(t){y||(y=!0,function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(h.logLevel<=a.LogLevel.WARN){var r=e.map(v);h.warn.apply(h,i.__spreadArrays(["Firestore ("+l+"): "+t],r))}}("Connection","WebChannel transport errored:",t),m.vf(new O(A.UNAVAILABLE,"The operation could not be completed")))})),b(u.WebChannel.EventType.MESSAGE,(function(t){var e;if(!y){var n=t.data[0];g(!!n);var r=n,i=r.error||(null===(e=r[0])||void 0===e?void 0:e.error);if(i){p("Connection","WebChannel received error:",i);var o=i.status,a=function(t){var e=Q[t];if(void 0!==e)return Z(e)}(o),s=i.message;void 0===a&&(a=A.INTERNAL,s="Unknown error status: "+o+" with message "+i.message),y=!0,m.vf(new O(a,s)),f.close()}else p("Connection","WebChannel received:",n),m.Sf(n)}})),setTimeout((function(){m.bf()}),0),m},t.prototype.Ff=function(t){var e=oa[t];return this.Df+"/v1/projects/"+this.s.projectId+"/databases/"+this.s.database+"/documents:"+e},t}(),ua=function(){function t(){var t=this;this.Nf=function(){return t.$f()},this.kf=function(){return t.xf()},this.Mf=[],this.Of()}return t.prototype.tc=function(t){this.Mf.push(t)},t.prototype.gr=function(){window.removeEventListener("online",this.Nf),window.removeEventListener("offline",this.kf)},t.prototype.Of=function(){window.addEventListener("online",this.Nf),window.addEventListener("offline",this.kf)},t.prototype.$f=function(){p("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(var t=0,e=this.Mf;t<e.length;t++)(0,e[t])(0)},t.prototype.xf=function(){p("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(var t=0,e=this.Mf;t<e.length;t++)(0,e[t])(1)},t.Hi=function(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener},t}(),ca=function(){function t(){}return t.prototype.tc=function(t){},t.prototype.gr=function(){},t}(),la="You are using the memory-only build of Firestore. Persistence support is only available via the @firebase/firestore bundle or the firebase-firestore.js build.",ha=function(){function t(){}return t.prototype.initialize=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e=this;return i.__generator(this,(function(n){switch(n.label){case 0:return this.t_=this.Lf(t),this.persistence=this.Bf(t),[4,this.persistence.start()];case 1:return n.sent(),this.qf=this.Uf(t),this.zu=this.Qf(t),this.Zl=this.Wf(t),this.Rc=this.jf(t),this.Kf=this.Gf(t),this.t_.Lu=function(t){return e.Rc.Ql(t,1)},this.Zl.Rc=this.Rc,[4,this.zu.start()];case 2:return n.sent(),[4,this.t_.start()];case 3:return n.sent(),[4,this.Zl.start()];case 4:return n.sent(),[4,this.Zl.Mc(this.Rc.__)];case 5:return n.sent(),[2]}}))}))},t.prototype.Gf=function(t){return new $o(this.Rc)},t.prototype.Uf=function(t){return null},t.prototype.Qf=function(t){return ci(this.persistence,new Yo,t.zf)},t.prototype.Bf=function(t){if(t.Yf.Hf)throw new O(A.FAILED_PRECONDITION,la);return new ea(ra.mf)},t.prototype.Wf=function(t){var e=this;return new xo(this.zu,t.Du,t.mo,(function(t){return e.Rc.Ql(t,0)}),ua.Hi()?new ua:new ca)},t.prototype.Lf=function(t){return new Fo},t.prototype.jf=function(t){return Ko(this.zu,this.Zl,t.Du,this.t_,t.zf,t.e_)},t.prototype.clearPersistence=function(t,e){throw new O(A.FAILED_PRECONDITION,la)},t}(),fa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.initialize=function(e){return i.__awaiter(this,void 0,void 0,(function(){var n=this;return i.__generator(this,(function(r){switch(r.label){case 0:return[4,t.prototype.initialize.call(this,e)];case 1:return r.sent(),[4,this.persistence.rr((function(t){return i.__awaiter(n,void 0,void 0,(function(){return i.__generator(this,(function(e){switch(e.label){case 0:return[4,this.Rc.Mc(t)];case 1:return e.sent(),this.qf&&(t&&!this.qf.or?this.qf.start(this.zu):t||this.qf.stop()),[2]}}))}))}))];case 2:return r.sent(),[2]}}))}))},e.prototype.Qf=function(t){return e=this.persistence,n=new Yo,r=t.zf,new li(e,n,r);var e,n,r},e.prototype.jf=function(t){var e,n,r,i,o,a,s=(e=this.zu,n=this.Zl,r=t.Du,i=this.t_,o=t.zf,a=t.e_,new Go(e,n,r,i,o,a));return this.t_ instanceof jo&&(this.t_.Rc=s),s},e.prototype.Lf=function(t){if(t.Yf.Hf&&t.Yf.synchronizeTabs){var e=Jr();
2if(!jo.Hi(e))throw new O(A.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");var n=mr(t.Jf.s,t.Jf.persistenceKey);return new jo(e,t.mo,n,t.clientId,t.zf)}return new Fo},e}(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.Qf=function(t){return ci(this.persistence,new Yo,t.zf)},e.prototype.jf=function(t){return Ko(this.zu,this.Zl,t.Du,this.t_,t.zf,t.e_)},e.prototype.Uf=function(t){var e=this.persistence.wi.xr;return new ai(e,t.mo)},e.prototype.Bf=function(t){var e=mr(t.Jf.s,t.Jf.persistenceKey),n=$i(t.Jf.s);return new pr(t.Yf.synchronizeTabs,e,t.clientId,oi.oh(t.Yf.cacheSizeBytes),t.mo,Jr(),"undefined"!=typeof document?document:null,n,this.t_,t.Yf.qi)},e.prototype.Lf=function(t){return new Fo},e.prototype.clearPersistence=function(t,e){return function(t){return i.__awaiter(this,void 0,void 0,(function(){var e;return i.__generator(this,(function(n){switch(n.label){case 0:return zr.Hi()?(e=t+"main",[4,zr.delete(e)]):[2,Promise.resolve()];case 1:return n.sent(),[2]}}))}))}(mr(t,e))},e}(ha)),pa=function(){function t(t,e){this.credentials=t,this.mo=e,this.clientId=_.t()}return t.prototype.start=function(t,e,n){var r=this;this.bu(),this.Jf=t;var i=new Ln,o=new Ln,a=!1;return this.credentials.qa((function(t){if(!a)return a=!0,p("FirestoreClient","Initializing. user=",t.uid),r.Xf(e,n,t,o).then(i.resolve,i.reject);r.mo._r((function(){return r.Zl.xc(t)}))})),this.mo.cr((function(){return i.promise})),o.promise},t.prototype.enableNetwork=function(){var t=this;return this.bu(),this.mo.enqueue((function(){return t.Rc.enableNetwork()}))},t.prototype.Xf=function(t,e,n,r){return i.__awaiter(this,void 0,void 0,(function(){var o,a,s,u,c,l=this;return i.__generator(this,(function(h){switch(h.label){case 0:return h.trys.push([0,3,,4]),[4,(c=this.Jf,Promise.resolve(new sa(c)))];case 1:return o=h.sent(),a=$i(this.Jf.s),s=function(t,e,n){return new Io(t,e,n)}(o,this.credentials,a),[4,t.initialize({mo:this.mo,Jf:this.Jf,Du:s,clientId:this.clientId,zf:n,e_:100,Yf:e})];case 2:return h.sent(),this.persistence=t.persistence,this.t_=t.t_,this.zu=t.zu,this.Zl=t.Zl,this.Rc=t.Rc,this.qf=t.qf,this.Zf=t.Kf,this.persistence.hr((function(){return i.__awaiter(l,void 0,void 0,(function(){return i.__generator(this,(function(t){switch(t.label){case 0:return[4,this.terminate()];case 1:return t.sent(),[2]}}))}))})),r.resolve(),[3,4];case 3:if(u=h.sent(),r.reject(u),!this.td(u))throw u;return[2,(console.warn("Error enabling offline persistence. Falling back to persistence disabled: "+u),this.Xf(new ha,{Hf:!1},n,r))];case 4:return[2]}}
2))}))},t.prototype.td=function(t){return"FirebaseError"===t.name?t.code===A.FAILED_PRECONDITION||t.code===A.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&t instanceof DOMException)||22===t.code||20===t.code||11===t.code},t.prototype.bu=function(){if(this.mo.xo)throw new O(A.FAILED_PRECONDITION,"The client has already been terminated.")},t.prototype.disableNetwork=function(){var t=this;return this.bu(),this.mo.enqueue((function(){return t.Rc.disableNetwork()}))},t.prototype.terminate=function(){var t=this;return this.mo.qo((function(){return i.__awaiter(t,void 0,void 0,(function(){return i.__generator(this,(function(t){switch(t.label){case 0:return this.qf&&this.qf.stop(),[4,this.Zl.gr()];case 1:return t.sent(),[4,this.t_.gr()];case 2:return t.sent(),[4,this.persistence.gr()];case 3:return t.sent(),this.credentials.Ua(),[2]}}))}))}))},t.prototype.waitForPendingWrites=function(){var t=this;this.bu();var e=new Ln;return this.mo.cr((function(){return t.Rc.V_(e)})),e.promise},t.prototype.listen=function(t,e,n){var r=this;this.bu();var i=new Xo(t,e,n);return this.mo.cr((function(){return r.Zf.listen(i)})),i},t.prototype.mc=function(t){var e=this;this.ed||this.mo.cr((function(){return e.Zf.mc(t)}))},t.prototype.nd=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,n=this;return i.__generator(this,(function(r){switch(r.label){case 0:return this.bu(),e=new Ln,[4,this.mo.enqueue((function(){return i.__awaiter(n,void 0,void 0,(function(){var n,r,o;return i.__generator(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.zu.Wh(t)];case 1:return(n=i.sent())instanceof rn?e.resolve(n):n instanceof on?e.resolve(null):e.reject(new O(A.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)")),[3,3];case 2:return r=i.sent(),o=ei(r,"Failed to get document '"+t+" from cache"),e.reject(o),[3,3];case 3:return[2]}}
2))}))}))];case 1:return[2,(r.sent(),e.promise)]}}))}))},t.prototype.sd=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,n=this;return i.__generator(this,(function(r){switch(r.label){case 0:return this.bu(),e=new Ln,[4,this.mo.enqueue((function(){return i.__awaiter(n,void 0,void 0,(function(){var n,r,o,a,s,u;return i.__generator(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.zu.Gh(t,!0)];case 1:return n=i.sent(),r=new qo(t,n.zh),o=r.xl(n.documents),a=r.Jn(o,!1),e.resolve(a.snapshot),[3,3];case 2:return s=i.sent(),u=ei(s,"Failed to execute query '"+t+" against cache"),e.reject(u),[3,3];case 3:return[2]}}))}))}))];case 1:return[2,(r.sent(),e.promise)]}}))}))},t.prototype.write=function(t){var e=this;this.bu();var n=new Ln;return this.mo.cr((function(){return e.Rc.write(t,n)})),n.promise},t.prototype.s=function(){return this.Jf.s},t.prototype.q_=function(t){var e=this;this.bu(),this.mo.cr((function(){return e.Zf.q_(t),Promise.resolve()}))},t.prototype.U_=function(t){var e=this;this.ed||this.mo.cr((function(){return e.Zf.U_(t),Promise.resolve()}))},Object.defineProperty(t.prototype,"ed",{get:function(){return this.mo.xo},enumerable:!1,configurable:!0}),t.prototype.transaction=function(t){var e=this;this.bu();var n=new Ln;return this.mo.cr((function(){return e.Rc.runTransaction(e.mo,t,n),Promise.resolve()})),n.promise},t}(),da=function(){function t(t){this.observer=t,this.muted=!1}return t.prototype.next=function(t){this.rd(this.observer.next,t)},t.prototype.error=function(t){this.rd(this.observer.error,t)},t.prototype.od=function(){this.muted=!0},t.prototype.rd=function(t,e){var n=this;this.muted||setTimeout((function(){n.muted||t(e)}),0)},t}();function va(t){return function(t,e){if("object"!=typeof t||null===t)return!1;for(var n=t,r=0,i=["next","error","complete"];r<i.length;r++){var o=i[r];if(o in n&&"function"==typeof n[o])return!0}return!1}(t)}var ya=function(){function t(t,e,n,r){this.s=t,this.timestampsInSnapshots=e,this.hd=n,this.ad=r}return t.prototype.ud=function(t){switch(At(t)){case 0:return null;case 1:return t.booleanValue;case 2:return jt(t.integerValue||t.doubleValue);case 3:return this.ld(t.timestampValue);case 4:return this._d(t);case 5:return t.stringValue;case 6:return new Li(Ft(t.bytesValue));case 7:return this.fd(t.referenceValue);case 8:return this.dd(t.geoPointValue);case 9:return this.wd(t.arrayValue);case 10:return this.Td(t.mapValue);default:throw y()}},t.prototype.Td=function(t){var e=this,n={};return k(t.fields||{},(function(t,r){n[t]=e.ud(r)})),n},t.prototype.dd=function(t){return new Qi(jt(t.latitude),jt(t.longitude))},t.prototype.wd=function(t){var e=this;return(t.values||[]).map((function(t){return e.ud(t)}))},t.prototype._d=function(t){switch(this.hd){case"previous":var e=function t(e){var n=e.mapValue.fields.__previous_value__;return kt(n)?t(n):n}(t);return null==e?null:this.ud(e);case"estimate":return this.ld(xt(t));default:return null}},t.prototype.ld=function(t){var e=Mt(t),n=new P(e.seconds,e.nanos);return this.timestampsInSnapshots?n:n.toDate()},t.prototype.fd=function(t){var e=L.$(t);g(we(e));var n=new I(e.get(1),e.get(3)),r=new F(e.g(5));return n.isEqual(this.s)||d("Document "+r+" contains a document reference within a different database ("+n.projectId+"/"+n.database+") which is not supported. It will be treated as a reference in the current database ("+this.s.projectId+"/"+this.s.database+") instead."),this.ad(r)},t}(),ga=oi.uh,ma=function(){function t(t){var e,n,r,i;if(void 0===t.host){if(void 0!==t.ssl)throw new O(A.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else _i("settings","non-empty string","host",t.host),this.host=t.host,wi("settings","boolean","ssl",t.ssl),this.ssl=null===(e=t.ssl)||void 0===e||e;if(xi("settings",t,["host","ssl","credentials","timestampsInSnapshots","cacheSizeBytes","experimentalForceLongPolling","ignoreUndefinedProperties"]),wi("settings","object","credentials",t.credentials),this.credentials=t.credentials,wi("settings","boolean","timestampsInSnapshots",t.timestampsInSnapshots),wi("settings","boolean","ignoreUndefinedProperties",t.ignoreUndefinedProperties),!0===t.timestampsInSnapshots?d("The setting 'timestampsInSnapshots: true' is no longer required and should be removed."):!1===t.timestampsInSnapshots&&d("Support for 'timestampsInSnapshots: false' will be removed soon. You must update your co
2de to handle Timestamp objects."),this.timestampsInSnapshots=null===(n=t.timestampsInSnapshots)||void 0===n||n,this.ignoreUndefinedProperties=null!==(r=t.ignoreUndefinedProperties)&&void 0!==r&&r,wi("settings","number","cacheSizeBytes",t.cacheSizeBytes),void 0===t.cacheSizeBytes)this.cacheSizeBytes=oi._h;else{if(t.cacheSizeBytes!==ga&&t.cacheSizeBytes<oi.lh)throw new O(A.INVALID_ARGUMENT,"cacheSizeBytes must be at least "+oi.lh);this.cacheSizeBytes=t.cacheSizeBytes}wi("settings","boolean","experimentalForceLongPolling",t.experimentalForceLongPolling),this.forceLongPolling=null!==(i=t.experimentalForceLongPolling)&&void 0!==i&&i}return t.prototype.isEqual=function(t){return this.host===t.host&&this.ssl===t.ssl&&this.timestampsInSnapshots===t.timestampsInSnapshots&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.forceLongPolling===t.forceLongPolling&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties},t}(),ba=function(){function t(e,n,r){var o=this;if(void 0===r&&(r=new ha),this.Ed=null,this.Id=new ti,this.INTERNAL={delete:function(){return i.__awaiter(o,void 0,void 0,(function(){return i.__generator(this,(function(t){switch(t.label){case 0:return this.md(),[4,this.Ad.terminate()];case 1:return t.sent(),[2]}}))}))}},"object"==typeof e.options){var a=e;this.Ed=a,this.Va=t.Rd(a),this.Pd=a.name,this.Vd=new bo(n)}else{var s=e;if(!s.projectId)throw new O(A.INVALID_ARGUMENT,"Must provide projectId");this.Va=new I(s.projectId,s.database),this.Pd="[DEFAULT]",this.Vd=new mo}this.gd=r,this.yd=new ma({})}return Object.defineProperty(t.prototype,"pd",{get:function(){return this.bd||(this.bd=new no(this.Va,this.yd.ignoreUndefinedProperties)),this.bd},enumerable:!1,configurable:!0}),t.prototype.settings=function(t){vi("Firestore.settings",arguments,1),mi("Firestore.settings","object",1,t);var e=new ma(t);if(this.Ad&&!this.yd.isEqual(e))throw new O(A.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only call settings() before calling any other methods on a Firestore object.");this.yd=e,void 0!==e.credentials&&(this.Vd=function(t){if(!t)return new mo;switch(t.type){case"gapi":var e=t.vd;return g(!("object"!=typeof e||null===e||!e.auth||!e.auth.getAuthHeaderValueForFirstParty)),new wo(e,t.za||"0");case"provider":return t.vd;default:throw new O(A.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(e.credentials))},t.prototype.enableNetwork=function(){return this.md(),this.Ad.enableNetwork()},t.prototype.disableNetwork=function(){return this.md(),this.Ad.disableNetwork()},t.prototype.enablePersistence=function(t){var e,n;if(this.Ad)throw new O(A.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only call enablePersistence() before calling any other methods on a Firestore object.");var r=!1,i=!1;if(t&&(void 0!==t.experimentalTabSynchronization&&d("The 'experimentalTabSynchronization' setting will be removed. Use 'synchronizeTabs' instead."),r=null!==(n=null!==(e=t.synchronizeTabs)&&void 0!==e?e:t.experimentalTabSynchronization)&&void 0!==n&&n,i=!!t.experimentalForceOwningTab&&t.experimentalForceOwningTab,r&&i))throw new O(A.INVALID_ARGUMENT,"The 'experimentalForceOwningTab' setting cannot be used with 'synchronizeTabs'.");return this.Sd(this.gd,{Hf:!0,cacheSizeBytes:this.yd.cacheSizeBytes,synchronizeTabs:r,qi:i})},t.prototype.clearPersistence=function(){return i.__awaiter(this,void 0,void 0,(function(){var t,e=this;return i.__generator(this,(function(n){if(void 0!==this.Ad&&!this.Ad.ed)throw new O(A.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");return t=new Ln,[2,(this.Id.Mo((function(){return i.__awaiter(e,void 0,void 0,(function(){var e;return i.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.gd.clearPersistence(this.Va,this.Pd)];case 1:return n.sent(),t.resolve(),[3,3];case 2:return e=n.sent(),t.reject(e),[3,3];case 3:return[2]}}
2))}))})),t.promise)]}))}))},t.prototype.terminate=function(){return this.app._removeServiceInstance("firestore"),this.INTERNAL.delete()},Object.defineProperty(t.prototype,"Dd",{get:function(){return this.md(),this.Ad.ed},enumerable:!1,configurable:!0}),t.prototype.waitForPendingWrites=function(){return this.md(),this.Ad.waitForPendingWrites()},t.prototype.onSnapshotsInSync=function(t){if(this.md(),va(t))return _a(this.Ad,t);mi("Firestore.onSnapshotsInSync","function",1,t);var e={next:t};return _a(this.Ad,e)},t.prototype.md=function(){return this.Ad||this.Sd(new ha,{Hf:!1}),this.Ad},t.prototype.Cd=function(){return new S(this.Va,this.Pd,this.yd.host,this.yd.ssl,this.yd.forceLongPolling)},t.prototype.Sd=function(t,e){var n=this.Cd();return this.Ad=new pa(this.Vd,this.Id),this.Ad.start(n,t,e)},t.Rd=function(t){if(e=t.options,!Object.prototype.hasOwnProperty.call(e,"projectId"))throw new O(A.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');var e,n=t.options.projectId;if(!n||"string"!=typeof n)throw new O(A.INVALID_ARGUMENT,"projectId must be a string in FirebaseApp.options");return new I(n)},Object.defineProperty(t.prototype,"app",{get:function(){if(!this.Ed)throw new O(A.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.Ed},enumerable:!1,configurable:!0}),t.prototype.collection=function(t){return vi("Firestore.collection",arguments,1),mi("Firestore.collection","non-empty string",1,t),this.md(),new Pa(L.$(t),this,null)},t.prototype.doc=function(t){return vi("Firestore.doc",arguments,1),mi("Firestore.doc","non-empty string",1,t),this.md(),Ta.Fd(L.$(t),this,null)},t.prototype.collectionGroup=function(t){if(vi("Firestore.collectionGroup",arguments,1),mi("Firestore.collectionGroup","non-empty string",1,t),t.indexOf("/")>=0)throw new O(A.INVALID_ARGUMENT,"Invalid collection ID '"+t+"' passed to function Firestore.collectionGroup(). Collection IDs must not contain '/'.");return this.md(),new Na(new sn(L.k(),t),this,null)},t.prototype.runTransaction=function(t){var e=this;return vi("Firestore.runTransaction",arguments,1),mi("Firestore.runTransaction","function",1,t),this.md().transaction((function(n){return t(new wa(e,n))}))},t.prototype.batch=function(){return this.md(),new Ea(this)},Object.defineProperty(t,"logLevel",{get:function(){switch(f()){case a.LogLevel.DEBUG:return"debug";case a.LogLevel.ERROR:return"error";case a.LogLevel.SILENT:return"silent";case a.LogLevel.WARN:return"warn";case a.LogLevel.INFO:return"info";case a.LogLevel.VERBOSE:return"verbose";default:return"error"}},enumerable:!1,configurable:!0}),t.setLogLevel=function(t){var e;vi("Firestore.setLogLevel",arguments,1),Ti("setLogLevel",["debug","error","silent","warn","info","verbose"],1,t),e=t,h.setLogLevel(e)},t.prototype.Nd=function(){return this.yd.timestampsInSnapshots},t}();function _a(t,e){var n=new da({next:function(){e.next&&e.next()},error:function(t){throw y()}});return t.q_(n),function(){n.od(),t.U_(n)}}var wa=function(){function t(t,e){this.$d=t,this.kd=e}return t.prototype.get=function(t){var e=this;vi("Transaction.get",arguments,1);var n=Ma("Transaction.get",t,this.$d);return this.kd.ku([n.ga]).then((function(t){if(!t||1!==t.length)return y();var r=t[0];if(r instanceof on)return new Ca(e.$d,n.ga,null,!1,!1,n.ya);if(r instanceof rn)return new Ca(e.$d,n.ga,r,!1,!1,n.ya);throw y()}))},t.prototype.set=function(t,e,n){gi("Transaction.set",arguments,2,3);var r=Ma("Transaction.set",t,this.$d);n=Ra("Transaction.set",n);var i=Fa(r.ya,e,n),o=ro(this.$d.pd,"Transaction.set",r.ga,i,null!==r.ya,n);return this.kd.set(r.ga,o),this},t.prototype.update=function(t,e,n){for(var r,i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return"string"==typeof e||e instanceof ji?(yi("Transaction.update",arguments,3),r=Ma("Transaction.update",t,this.$d),i=oo(this.$d.pd,"Transaction.update",r.ga,e,n,o)):(vi("Transaction.update",arguments,2),r=Ma("Transaction.update",t,this.$d),i=io(this.$d.pd,"Transaction.update",r.ga,e)),this.kd.update(r.ga,i),this},t.prototype.delete=function(t){vi("Transaction.delete",arguments,1
2);var e=Ma("Transaction.delete",t,this.$d);return this.kd.delete(e.ga),this},t}(),Ea=function(){function t(t){this.$d=t,this.xd=[],this.Md=!1}return t.prototype.set=function(t,e,n){gi("WriteBatch.set",arguments,2,3),this.Od();var r=Ma("WriteBatch.set",t,this.$d);n=Ra("WriteBatch.set",n);var i=Fa(r.ya,e,n),o=ro(this.$d.pd,"WriteBatch.set",r.ga,i,null!==r.ya,n);return this.xd=this.xd.concat(o.pa(r.ga,je.Qe())),this},t.prototype.update=function(t,e,n){for(var r,i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return this.Od(),"string"==typeof e||e instanceof ji?(yi("WriteBatch.update",arguments,3),r=Ma("WriteBatch.update",t,this.$d),i=oo(this.$d.pd,"WriteBatch.update",r.ga,e,n,o)):(vi("WriteBatch.update",arguments,2),r=Ma("WriteBatch.update",t,this.$d),i=io(this.$d.pd,"WriteBatch.update",r.ga,e)),this.xd=this.xd.concat(i.pa(r.ga,je.exists(!0))),this},t.prototype.delete=function(t){vi("WriteBatch.delete",arguments,1),this.Od();var e=Ma("WriteBatch.delete",t,this.$d);return this.xd=this.xd.concat(new Ye(e.ga,je.Qe())),this},t.prototype.commit=function(){return this.Od(),this.Md=!0,this.xd.length>0?this.$d.md().write(this.xd):Promise.resolve()},t.prototype.Od=function(){if(this.Md)throw new O(A.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},t}(),Ta=function(t){function e(e,n,r){var i=this;return(i=t.call(this,n.Va,e,r)||this).ga=e,i.firestore=n,i.ya=r,i.Ad=i.firestore.md(),i}return i.__extends(e,t),e.Fd=function(t,n,r){if(t.length%2!=0)throw new O(A.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+t.N()+" has "+t.length);return new e(new F(t),n,r)},Object.defineProperty(e.prototype,"id",{get:function(){return this.ga.path.S()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return new Pa(this.ga.path.p(),this.firestore,this.ya)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.ga.path.N()},enumerable:!1,configurable:!0}),e.prototype.collection=function(t){if(vi("DocumentReference.collection",arguments,1),mi("DocumentReference.collection","non-empty string",1,t),!t)throw new O(A.INVALID_ARGUMENT,"Must provide a non-empty collection name to collection()");var e=L.$(t);return new Pa(this.ga.path.child(e),this.firestore,null)},e.prototype.isEqual=function(t){if(!(t instanceof e))throw Ni("isEqual","DocumentReference",1,t);return this.firestore===t.firestore&&this.ga.isEqual(t.ga)&&this.ya===t.ya},e.prototype.set=function(t,e){gi("DocumentReference.set",arguments,1,2),e=Ra("DocumentReference.set",e);var n=Fa(this.ya,t,e),r=ro(this.firestore.pd,"DocumentReference.set",this.ga,n,null!==this.ya,e);return this.Ad.write(r.pa(this.ga,je.Qe()))},e.prototype.update=function(t,e){for(var n,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return"string"==typeof t||t instanceof ji?(yi("DocumentReference.update",arguments,2),n=oo(this.firestore.pd,"DocumentReference.update",this.ga,t,e,r)):(vi("DocumentReference.update",arguments,1),n=io(this.firestore.pd,"DocumentReference.update",this.ga,t)),this.Ad.write(n.pa(this.ga,je.exists(!0)))},e.prototype.delete=function(){return vi("DocumentReference.delete",arguments,0),this.Ad.write([new Ye(this.ga,je.Qe())])},e.prototype.onSnapshot=function(){for(var t,e,n,r=this,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];gi("DocumentReference.onSnapshot",arguments,1,4);var a={includeMetadataChanges:!1},s=0;"object"!=typeof i[s]||va(i[s])||(xi("DocumentReference.onSnapshot",a=i[s],["includeMetadataChanges"]),wi("DocumentReference.onSnapshot","boolean","includeMetadataChanges",a.includeMetadataChanges),s++);var u={includeMetadataChanges:a.includeMetadataChanges};if(va(i[s])){var c=i[s];i[s]=null===(t=c.next)||void 0===t?void 0:t.bind(c),i[s+1]=null===(e=c.error)||void 0===e?void 0:e.bind(c),i[s+2]=null===(n=c.complete)||void 0===n?void 0:n.bind(c)}else mi("DocumentReference.onSnapshot","function",s,i[s]),bi("DocumentReference.onSnapshot","function",s+1,i[s+1]),bi("DocumentReference.onSnapshot","function",s+2,i[s+2]);var l={next:function(t){i[s]&&i[s](r.Ld(t))}
2,error:i[s+1],complete:i[s+2]};return Sa(this.Ad,this.ga,u,l)},e.prototype.get=function(t){var e=this;return gi("DocumentReference.get",arguments,0,1),La("DocumentReference.get",t),t&&"cache"===t.source?this.firestore.md().nd(this.ga).then((function(t){return new Ca(e.firestore,e.ga,t,!0,t instanceof rn&&t.Ge,e.ya)})):function(t,e,n){var r=new Ln,i=Sa(t,e,{includeMetadataChanges:!0,H_:!0},{next:function(t){i();var o=t.docs.has(e);!o&&t.fromCache?r.reject(new O(A.UNAVAILABLE,"Failed to get document because the client is offline.")):o&&t.fromCache&&n&&"server"===n.source?r.reject(new O(A.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):r.resolve(t)},error:function(t){return r.reject(t)}});return r.promise}(this.Ad,this.ga,t).then((function(t){return e.Ld(t)}))},e.prototype.withConverter=function(t){return new e(this.ga,this.firestore,t)},e.prototype.Ld=function(t){var e=t.docs.get(this.ga);return new Ca(this.firestore,this.ga,e,t.fromCache,t.hasPendingWrites,this.ya)},e}(Yi);function Sa(t,e,n,r){var i=function(t){console.error("Uncaught Error in onSnapshot:",t)};r.error&&(i=r.error.bind(r));var o=new da({next:function(t){r.next&&r.next(t)},error:i}),a=t.listen(sn.hn(e.path),o,n);return function(){o.od(),t.mc(a)}}var Ia=function(){function t(t,e){this.hasPendingWrites=t,this.fromCache=e}return t.prototype.isEqual=function(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache},t}(),Ca=function(){function t(t,e,n,r,i,o){this.$d=t,this.ga=e,this.Bd=n,this.qd=r,this.Ud=i,this.ya=o}return t.prototype.data=function(t){var e=this;if(gi("DocumentSnapshot.data",arguments,0,1),t=Da("DocumentSnapshot.data",t),this.Bd){if(this.ya){var n=new ka(this.$d,this.ga,this.Bd,this.qd,this.Ud,null);return this.ya.fromFirestore(n,t)}return new ya(this.$d.Va,this.$d.Nd(),t.serverTimestamps||"none",(function(t){return new Ta(t,e.$d,null)})).ud(this.Bd.tn())}},t.prototype.get=function(t,e){var n=this;if(gi("DocumentSnapshot.get",arguments,1,2),e=Da("DocumentSnapshot.get",e),this.Bd){var r=this.Bd.data().field(ho("DocumentSnapshot.get",t,this.ga));if(null!==r)return new ya(this.$d.Va,this.$d.Nd(),e.serverTimestamps||"none",(function(t){return new Ta(t,n.$d,n.ya)})).ud(r)}},Object.defineProperty(t.prototype,"id",{get:function(){return this.ga.path.S()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ref",{get:function(){return new Ta(this.ga,this.$d,this.ya)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"exists",{get:function(){return null!==this.Bd},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"metadata",{get:function(){return new Ia(this.Ud,this.qd)},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){if(!(e instanceof t))throw Ni("isEqual","DocumentSnapshot",1,e);return this.$d===e.$d&&this.qd===e.qd&&this.ga.isEqual(e.ga)&&(null===this.Bd?null===e.Bd:this.Bd.isEqual(e.Bd))&&this.ya===e.ya},t}(),ka=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.data=function(e){return t.prototype.data.call(this,e)},e}(Ca);function xa(t){if(t.mn()&&0===t.en.length)throw new O(A.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var Na=function(t){function e(e,n,r){var i=this;return(i=t.call(this,n.Va,n.pd,e)||this).Qd=e,i.firestore=n,i.ya=r,i}return i.__extends(e,t),e.prototype.where=function(t,n,r){vi("Query.where",arguments,3),ki("Query.where",3,r);var i=Ti("Query.where",["<","<=","==",">=",">","array-contains","in","array-contains-any"],2,n),o=ho("Query.where",t),a=this.Wd(o,i,r);return new e(this.Qd.cn(a),this.firestore,this.ya)},e.prototype.orderBy=function(t,n){var r;if(gi("Query.orderBy",arguments,1,2),bi("Query.orderBy","non-empty string",2,n),void 0===n||"asc"===n)r="asc";else{if("desc"!==n)throw new O(A.INVALID_ARGUMENT,"Function Query.orderBy() has unknown direction '"+n+"', expected 'asc' or 'desc'.");r="desc"}var i=ho("Query.orderBy",t),o=this.zd(i,r);return new e(this.Qd.ln(o),this.firestore,this.ya)},e.prototype.limit=function(t){return vi("Query.limit",arguments,1
2),mi("Query.limit","number",1,t),Ai("Query.limit",1,t),new e(this.Qd._n(t),this.firestore,this.ya)},e.prototype.limitToLast=function(t){return vi("Query.limitToLast",arguments,1),mi("Query.limitToLast","number",1,t),Ai("Query.limitToLast",1,t),new e(this.Qd.fn(t),this.firestore,this.ya)},e.prototype.startAt=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];yi("Query.startAt",arguments,1);var i=this.Zd("Query.startAt",t,n,!0);return new e(this.Qd.dn(i),this.firestore,this.ya)},e.prototype.startAfter=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];yi("Query.startAfter",arguments,1);var i=this.Zd("Query.startAfter",t,n,!1);return new e(this.Qd.dn(i),this.firestore,this.ya)},e.prototype.endBefore=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];yi("Query.endBefore",arguments,1);var i=this.Zd("Query.endBefore",t,n,!0);return new e(this.Qd.wn(i),this.firestore,this.ya)},e.prototype.endAt=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];yi("Query.endAt",arguments,1);var i=this.Zd("Query.endAt",t,n,!1);return new e(this.Qd.wn(i),this.firestore,this.ya)},e.prototype.isEqual=function(t){if(!(t instanceof e))throw Ni("isEqual","Query",1,t);return this.firestore===t.firestore&&un(this.Qd,t.Qd)&&this.ya===t.ya},e.prototype.withConverter=function(t){return new e(this.Qd,this.firestore,t)},e.prototype.Zd=function(t,e,n,r){if(ki(t,1,e),e instanceof Ca)return vi(t,i.__spreadArrays([e],n),1),this.Yd(t,e.Bd,r);var o=[e].concat(n);return this.Jd(t,o,r)},e.prototype.onSnapshot=function(){for(var t,e,n,r=this,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];gi("Query.onSnapshot",arguments,1,4);var a={},s=0;if("object"!=typeof i[s]||va(i[s])||(xi("Query.onSnapshot",a=i[s],["includeMetadataChanges"]),wi("Query.onSnapshot","boolean","includeMetadataChanges",a.includeMetadataChanges),s++),va(i[s])){var u=i[s];i[s]=null===(t=u.next)||void 0===t?void 0:t.bind(u),i[s+1]=null===(e=u.error)||void 0===e?void 0:e.bind(u),i[s+2]=null===(n=u.complete)||void 0===n?void 0:n.bind(u)}else mi("Query.onSnapshot","function",s,i[s]),bi("Query.onSnapshot","function",s+1,i[s+1]),bi("Query.onSnapshot","function",s+2,i[s+2]);var c={next:function(t){i[s]&&i[s](new Oa(r.firestore,r.Qd,t,r.ya))},error:i[s+1],complete:i[s+2]};return xa(this.Qd),Aa(this.firestore.md(),this.Qd,a,c)},e.prototype.get=function(t){var e=this;gi("Query.get",arguments,0,1),La("Query.get",t),xa(this.Qd);var n=this.firestore.md();return(t&&"cache"===t.source?n.sd(this.Qd):function(t,e,n){var r=new Ln,i=Aa(t,e,{includeMetadataChanges:!0,H_:!0},{next:function(t){i(),t.fromCache&&n&&"server"===n.source?r.reject(new O(A.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):r.resolve(t)},error:function(t){return r.reject(t)}});return r.promise}(n,this.Qd,t)).then((function(t){return new Oa(e.firestore,e.Qd,t,e.ya)}))},e}(function(){function t(t,e,n){this.Va=t,this.pd=e,this.Qd=n}return t.prototype.Wd=function(t,e,n){var r;if(t.O()){if("array-contains"===e||"array-contains-any"===e)throw new O(A.INVALID_ARGUMENT,"Invalid Query. You can't perform '"+e+"' queries on FieldPath.documentId().");if("in"===e){this.jd(n,e);for(var i=[],o=0,a=n;o<a.length;o++){var s=a[o];i.push(this.Kd(s))}r={arrayValue:{values:i}}}else r=this.Kd(n)}else"in"!==e&&"array-contains-any"!==e||this.jd(n,e),r=ao(this.pd,"Query.where",n,"in"===e);var u=pn.create(t,e,r);return this.Gd(u),u},t.prototype.zd=function(t,e){if(null!==this.Qd.startAt)throw new O(A.INVALID_ARGUMENT,"Invalid query. You must not call Query.startAt() or Query.startAfter() before calling Query.orderBy().");if(null!==this.Qd.endAt)throw new O(A.INVALID_ARGUMENT,"Invalid query. You must not call Query.endAt() or Query.endBefore() before calling Query.orderBy().");var n=new Tn(t,e);return this.Hd(n),n},t.prototype.Yd=function(t,e,n){if(!e)throw new O(A.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+t+"().");for(var r=[],i=0,o=this.Qd.orderBy;i<o.length;i++){var a=o[i];if(a.field.O())r.push(Ut(this.Va,e.key));else{var s=e.field(a.field);if(kt(s))throw new O(A.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+a.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===s){var u=a.field.N();throw new O(A.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '"+u+"' (used as the orderBy) does not exist.")}r.push(s)}}return new bn(r,n)},t.prototype.Jd=function(t,e,n){var r=this.Qd.en;if(e.length>r.length)throw new O(A.INVALID_ARGUMENT,"Too many arguments provided to "+t+"(). The number of arguments must be less than or equal to the number of Query.orderBy() clauses");for(var i=[],o=0;o<e.length;o++){var a=e[o];if(r[o].field.O()){if("string"!=typeof a)throw new O(A.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in "+t+"(), but got a "+typeof a);if(!this.Qd.Vn()&&-1!==a.indexOf("/"))throw new O(A.INVALID_ARGUMENT,"Invalid query. When querying a collection and ordering by FieldPath.documentId(), the value passed to "+t+"() must be a plain document ID, but '"+a+"' contains a slash.");var s=this.Qd.path.child(L.$(a));if(!F.W(s))throw new O(A.INVALID_ARGUMENT,"Invalid query. When querying a collection group and ordering by FieldPath.documentId(), the value passed to "+t+"() must result in a valid document path, but '"+s+"' is not because it c
2ontains an odd number of segments.");var u=new F(s);i.push(Ut(this.Va,u))}else{var c=ao(this.pd,t,a);i.push(c)}}return new bn(i,n)},t.prototype.Kd=function(t){if("string"==typeof t){if(""===t)throw new O(A.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid document ID, but it was an empty string.");if(!this.Qd.Vn()&&-1!==t.indexOf("/"))throw new O(A.INVALID_ARGUMENT,"Invalid query. When querying a collection by FieldPath.documentId(), you must provide a plain document ID, but '"+t+"' contains a '/' character.");var e=this.Qd.path.child(L.$(t));if(!F.W(e))throw new O(A.INVALID_ARGUMENT,"Invalid query. When querying a collection group by FieldPath.documentId(), the value provided must result in a valid document path, but '"+e+"' is not because it has an odd number of segments ("+e.length+").");return Ut(this.Va,new F(e))}if(t instanceof Yi)return Ut(this.Va,t.ga);throw new O(A.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid string or a DocumentReference, but it was: "+Ci(t)+".")},t.prototype.jd=function(t,e){if(!Array.isArray(t)||0===t.length)throw new O(A.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '"+e.toString()+"' filters.");if(t.length>10)throw new O(A.INVALID_ARGUMENT,"Invalid Query. '"+e.toString()+"' filters support a maximum of 10 elements in the value array.");if(t.indexOf(null)>=0)throw new O(A.INVALID_ARGUMENT,"Invalid Query. '"+e.toString()+"' filters cannot contain 'null' in the value array.");if(t.filter((function(t){return Number.isNaN(t)})).length>0)throw new O(A.INVALID_ARGUMENT,"Invalid Query. '"+e.toString()+"' filters cannot contain 'NaN' in the value array.")},t.prototype.Gd=function(t){if(t instanceof pn){var e=["array-contains","array-contains-any"],n=["in","array-contains-any"],r=e.indexOf(t.op)>=0,i=n.indexOf(t.op)>=0;if(t.An()){var o=this.Qd.an();if(null!==o&&!o.isEqual(t.field))throw new O(A.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (<, <=, >, or >=) must be on the same field. But you have inequality filters on '"+o.toString()+"' and '"+t.field.toString()+"'");var a=this.Qd.un();null!==a&&this.Xd(t.field,a)}else if(i||r){var s=null;if(i&&(s=this.Qd.Rn(n)),null===s&&r&&(s=this.Qd.Rn(e)),null!==s)throw s===t.op?new O(A.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '"+t.op.toString()+"' filter."):new O(A.INVALID_ARGUMENT,"Invalid query. You cannot use '"+t.op.toString()+"' filters with '"+s.toString()+"' filters.")}}},t.prototype.Hd=function(t){if(null===this.Qd.un()){var e=this.Qd.an();null!==e&&this.Xd(e,t.field)}},t.prototype.Xd=function(t,e){if(!e.isEqual(t))throw new O(A.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, >, or >=) on field '"+t.toString()+"' and so you must also use '"+t.toString()+"' as your first Query.orderBy(), but your first Query.orderBy() is on field '"+e.toString()+"' instead.")},t}());function Aa(t,e,n,r){var i=function(t){console.error("Uncaught Error in onSnapshot:",t)};r.error&&(i=r.error.bind(r));var o=new da({next:function(t){r.next&&r.next(t)},error:i}),a=t.listen(e,o,n);return function(){o.od(),t.mc(a)}}var Oa=function(){function t(t,e,n,r){this.$d=t,this.tw=e,this.ew=n,this.ya=r,this.nw=null,this.sw=null,this.metadata=new Ia(n.hasPendingWrites,n.fromCache)}return Object.defineProperty(t.prototype,"docs",{get:function(){var t=[];return this.forEach((function(e){return t.push(e)})),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return this.ew.docs._()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.ew.docs.size},enumerable:!1,configurable:!0}),t.prototype.forEach=function(t,e){var n=this;gi("QuerySnapshot.forEach",arguments,1,2),mi("QuerySnapshot.forEach","function",1,t),this.ew.docs.forEach((function(r){t.call(e,n.iw(r,n.metadata.fromCache,n.ew.Lt.has(r.key)))}))},Object.defineProperty(t.prototype,"query",{get:function(){return new Na(this.tw,this.$d,this.ya)}
2,enumerable:!1,configurable:!0}),t.prototype.docChanges=function(t){t&&(xi("QuerySnapshot.docChanges",t,["includeMetadataChanges"]),wi("QuerySnapshot.docChanges","boolean","includeMetadataChanges",t.includeMetadataChanges));var e=!(!t||!t.includeMetadataChanges);if(e&&this.ew.qt)throw new O(A.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this.nw&&this.sw===e||(this.nw=function(t,e,n){if(t.Ot._()){var r=0;return t.docChanges.map((function(e){var i=n(e.doc,t.fromCache,t.Lt.has(e.doc.key));return e.doc,{type:"added",doc:i,oldIndex:-1,newIndex:r++}}))}var i=t.Ot;return t.docChanges.filter((function(t){return e||3!==t.type})).map((function(e){var r=n(e.doc,t.fromCache,t.Lt.has(e.doc.key)),o=-1,a=-1;return 0!==e.type&&(o=i.indexOf(e.doc.key),i=i.delete(e.doc.key)),1!==e.type&&(a=(i=i.add(e.doc)).indexOf(e.doc.key)),{type:ja(e.type),doc:r,oldIndex:o,newIndex:a}}))}(this.ew,e,this.iw.bind(this)),this.sw=e),this.nw},t.prototype.isEqual=function(e){if(!(e instanceof t))throw Ni("isEqual","QuerySnapshot",1,e);return this.$d===e.$d&&un(this.tw,e.tw)&&this.ew.isEqual(e.ew)&&this.ya===e.ya},t.prototype.iw=function(t,e,n){return new ka(this.$d,t.key,t,e,n,this.ya)},t}(),Pa=function(t){function e(e,n,r){var i=this;if((i=t.call(this,sn.hn(e),n,r)||this).rw=e,e.length%2!=1)throw new O(A.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+e.N()+" has "+e.length);return i}return i.__extends(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.Qd.path.S()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this.Qd.path.p();return t._()?null:new Ta(new F(t),this.firestore,null)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.Qd.path.N()},enumerable:!1,configurable:!0}),e.prototype.doc=function(t){gi("CollectionReference.doc",arguments,0,1),0===arguments.length&&(t=_.t()),mi("CollectionReference.doc","non-empty string",1,t);var e=L.$(t);return Ta.Fd(this.Qd.path.child(e),this.firestore,this.ya)},e.prototype.add=function(t){vi("CollectionReference.add",arguments,1),mi("CollectionReference.add","object",1,this.ya?this.ya.toFirestore(t):t);var e=this.doc();return e.set(t).then((function(){return e}))},e.prototype.withConverter=function(t){return new e(this.rw,this.firestore,t)},e}(Na);function Ra(t,e){if(void 0===e)return{merge:!1};if(xi(t,e,["merge","mergeFields"]),wi(t,"boolean","merge",e.merge),function(t,e,n,r,i){void 0!==r&&function(t,e,n,r,i){if(!(r instanceof Array))throw new O(A.INVALID_ARGUMENT,"Function "+t+"() requires its "+e+" option to be an array, but it was: "+Ci(r));for(var o=0;o<r.length;++o)if(!i(r[o]))throw new O(A.INVALID_ARGUMENT,"Function "+t+"() requires all "+e+" elements to be a string or a FieldPath, but the value at index "+o+" was: "+Ci(r[o]))}(t,"mergeFields",0,r,(function(t){return"string"==typeof t||t instanceof ji}))}(t,0,0,e.mergeFields),void 0!==e.mergeFields&&void 0!==e.merge)throw new O(A.INVALID_ARGUMENT,"Invalid options passed to function "+t+'(): You cannot specify both "merge" and "mergeFields".');return e}function Da(t,e){return void 0===e?{}:(xi(t,e,["serverTimestamps"]),Ei(t,0,"serverTimestamps",e.serverTimestamps,["estimate","previous","none"]),e)}function La(t,e){bi(t,"object",1,e),e&&(xi(t,e,["source"]),Ei(t,0,"source",e.source,["default","server","cache"]))}function Ma(t,e,n){if(e instanceof Yi){if(e.firestore!==n)throw new O(A.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return e}throw Ni(t,"DocumentReference",1,e)}function ja(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return y()}}function Fa(t,e,n){return t?n&&(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e}var Ua={Firestore:ba,GeoPoint:Qi,Timestamp:P,Blob:Li,Transaction:wa,WriteBatch:Ea,DocumentReference:Ta,DocumentSnapshot:Ca,Query:Na,QueryDocumentSnapshot:ka,QuerySnapsh
2ot:Oa,CollectionReference:Pa,FieldPath:ji,FieldValue:Ki,setLogLevel:ba.setLogLevel,CACHE_SIZE_UNLIMITED:ga};function Va(t){!function(t,e){t.INTERNAL.registerComponent(new c.Component("firestore",(function(t){return function(t,e){return new ba(t,e,new fa)}(t.getProvider("app").getImmediate(),t.getProvider("auth-internal"))}),"PUBLIC").setServiceProps(Object.assign({},Ua)))}(t),t.registerVersion("@firebase/firestore","1.16.1")}Va(o),e.__PRIVATE_registerFirestore=Va}).call(this,n(31))},function(t,e,n){"use strict";n.r(e),function(t){function r(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}n.d(e,"ErrorCode",(function(){return Xn})),n.d(e,"EventType",(function(){return Yn})),n.d(e,"WebChannel",(function(){return Jn})),n.d(e,"XhrIo",(function(){return Zn})),n.d(e,"createWebChannelTransport",(function(){return $n}));var i,o="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},a=a||{},s=o||self;function u(){}function c(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var n=Object.prototype.toString.call(t);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof t.length&&"undefined"!=typeof t.splice&&"undefined"!=typeof t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||"undefined"!=typeof t.call&&"undefined"!=typeof t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&"undefined"==typeof t.call)return"object";return e}function l(t){var e=c(t);return"array"==e||"object"==e&&"number"==typeof t.length}function h(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}var f="closure_uid_"+(1e9*Math.random()>>>0),p=0;function d(t,e,n){return t.call.apply(t.bind,arguments)}function v(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function y(t,e,n){return(y=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?d:v).apply(null,arguments)}function g(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}var m=Date.now||function(){return+new Date};function b(t,e){function n(){}n.prototype=e.prototype,t.M=e.prototype,t.prototype=new n,t.prototype.constructor=t}function _(){this.j=this.j,this.i=this.i}_.prototype.j=!1,_.prototype.da=function(){if(!this.j&&(this.j=!0,this.C(),0))(function(t){Object.prototype.hasOwnProperty.call(t,f)&&t[f]||(t[f]=++p)})(this)},_.prototype.C=function(){if(this.i)for(;this.i.length;)this.i.shift()()};var w=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if("string"===typeof t)return"string"!==typeof e||1!=e.length?-1:t.indexOf(e,0);for(var n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1},E=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,i="string"===typeof t?t.split(""):t,o=0;o<r;o++)o in i&&e.call(n,i[o],o,t)};function T(t){return Array.prototype.concat.apply([],arguments)}function S(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}function I(t){return/^[\s\xa0]*$/.test(t)}var C,k=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]};function x(t,e){return-1!=t.indexOf(e)}function N(t,e){return t<e?-1:t>e?1:0}t:{var A=s.navigator;if(A){var O=A.userAgent;if(O){C=O;break t}}C=""}function P(t,e,n){for(var r in t)e.call(n,t[r],r,t)}function R(t){var e={};for(var n in t)e[n]=t[n];return e}var D="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
2ing toString valueOf".split(" ");function L(t,e){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o<D.length;o++)n=D[o],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function M(t){return M[" "](t),t}M[" "]=u;var j,F=x(C,"Opera"),U=x(C,"Trident")||x(C,"MSIE"),V=x(C,"Edge"),q=V||U,B=x(C,"Gecko")&&!(x(C.toLowerCase(),"webkit")&&!x(C,"Edge"))&&!(x(C,"Trident")||x(C,"MSIE"))&&!x(C,"Edge"),z=x(C.toLowerCase(),"webkit")&&!x(C,"Edge");function W(){var t=s.document;return t?t.documentMode:void 0}t:{var H="",K=function(){var t=C;return B?/rv:([^\);]+)(\)|;)/.exec(t):V?/Edge\/([\d\.]+)/.exec(t):U?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t):z?/WebKit\/(\S+)/.exec(t):F?/(?:Version)[ \/]?(\S+)/.exec(t):void 0}();if(K&&(H=K?K[1]:""),U){var G=W();if(null!=G&&G>parseFloat(H)){j=String(G);break t}}j=H}var Q,$={};function X(t){return function(t,e){var n=$;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}(t,(function(){for(var e=0,n=k(String(j)).split("."),r=k(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&o<i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;e=N(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||N(0==a[2].length,0==s[2].length)||N(a[2],s[2]),a=a[3],s=s[3]}while(0==e)}return 0<=e}))}if(s.document&&U){var Y=W();Q=Y||(parseInt(j,10)||void 0)}else Q=void 0;var J=Q,Z=!U||9<=Number(J),tt=U&&!X("9"),et=function(){if(!s.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});try{s.addEventListener("test",u,e),s.removeEventListener("test",u,e)}catch(n){}return t}();function nt(t,e){this.type=t,this.a=this.target=e,this.defaultPrevented=!1}function rt(t,e){if(nt.call(this,t?t.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,t){var n=this.type=t.type,r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.a=e,e=t.relatedTarget){if(B){t:{try{M(e.nodeName);var i=!0;break t}catch(o){}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType="string"===typeof t.pointerType?t.pointerType:it[t.pointerType]||"",this.c=t,t.defaultPrevented&&this.b()}}nt.prototype.b=function(){this.defaultPrevented=!0},b(rt,nt);var it={2:"touch",3:"pen",4:"mouse"};rt.prototype.b=function(){rt.M.b.call(this);var t=this.c;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,tt)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(e){}};var ot="closure_listenable_"+(1e6*Math.random()|0),at=0;function st(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.aa=i,this.key=++at,this.V=this.X=!1}function ut(t){t.V=!0,t.listener=null,t.proxy=null,t.src=null,t.aa=null}function ct(t){this.src=t,this.a={},this.b=0}function lt(t,e){var n=e.type;if(n in t.a){var r,i=t.a[n],o=w(i,e);(r=0<=o)&&Array.prototype.splice.call(i,o,1),r&&(ut(e),0==t.a[n].length&&(delete t.a[n],t.b--))}}function ht(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.V&&o.listener==e&&o.capture==!!n&&o.aa==r)return i}return-1}ct.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=ht(t,e,r,i);return-1<a?(e=t[a],n||(e.X=!1)):((e=new st(e,this.src,o,!!r,i)).X=n,t.pu
2sh(e)),e};var ft="closure_lm_"+(1e6*Math.random()|0),pt={};function dt(t,e,n,r,i){if(r&&r.once)return function t(e,n,r,i,o){if(Array.isArray(n)){for(var a=0;a<n.length;a++)t(e,n[a],r,i,o);return null}return r=Et(r),e&&e[ot]?e.sa(n,r,h(i)?!!i.capture:!!i,o):vt(e,n,r,!0,i,o)}(t,e,n,r,i);if(Array.isArray(e)){for(var o=0;o<e.length;o++)dt(t,e[o],n,r,i);return null}return n=Et(n),t&&t[ot]?t.ra(e,n,h(r)?!!r.capture:!!r,i):vt(t,e,n,!1,r,i)}function vt(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var a=h(i)?!!i.capture:!!i;if(a&&!Z)return null;var s=_t(t);if(s||(t[ft]=s=new ct(t)),(n=s.add(e,n,r,a,o)).proxy)return n;if(r=function(){var t=bt,e=Z?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)et||(i=a),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(gt(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}return n}function yt(t){if("number"!==typeof t&&t&&!t.V){var e=t.src;if(e&&e[ot])lt(e.c,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(gt(n),r):e.addListener&&e.removeListener&&e.removeListener(r),(n=_t(e))?(lt(n,t),0==n.b&&(n.src=null,e[ft]=null)):ut(t)}}}function gt(t){return t in pt?pt[t]:pt[t]="on"+t}function mt(t,e){var n=t.listener,r=t.aa||t.src;return t.X&&yt(t),n.call(r,e)}function bt(t,e){if(t.V)return!0;if(!Z){if(!e)t:{e=["window","event"];for(var n=s,r=0;r<e.length;r++)if(null==(n=n[e[r]])){e=null;break t}e=n}return mt(t,e=new rt(e,this))}return mt(t,new rt(e,this))}function _t(t){return(t=t[ft])instanceof ct?t:null}var wt="__closure_events_fn_"+(1e9*Math.random()>>>0);function Et(t){return"function"==c(t)?t:(t[wt]||(t[wt]=function(e){return t.handleEvent(e)}),t[wt])}function Tt(){_.call(this),this.c=new ct(this),this.J=this,this.A=null}function St(t,e,n,r){if(!(e=t.c.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var a=e[o];if(a&&!a.V&&a.capture==n){var s=a.listener,u=a.aa||a.src;a.X&<(t.c,a),i=!1!==s.call(u,r)&&i}}return i&&!r.defaultPrevented}b(Tt,_),Tt.prototype[ot]=!0,(i=Tt.prototype).addEventListener=function(t,e,n,r){dt(this,t,e,n,r)},i.removeEventListener=function(t,e,n,r){!function t(e,n,r,i,o){if(Array.isArray(n))for(var a=0;a<n.length;a++)t(e,n[a],r,i,o);else i=h(i)?!!i.capture:!!i,r=Et(r),e&&e[ot]?(e=e.c,(n=String(n).toString())in e.a&&(-1<(r=ht(a=e.a[n],r,i,o))&&(ut(a[r]),Array.prototype.splice.call(a,r,1),0==a.length&&(delete e.a[n],e.b--)))):e&&(e=_t(e))&&(n=e.a[n.toString()],e=-1,n&&(e=ht(n,r,i,o)),(r=-1<e?n[e]:null)&&yt(r))}(this,t,e,n,r)},i.dispatchEvent=function(t){var e,n=this.A;if(n)for(e=[];n;n=n.A)e.push(n);n=this.J;var r=t.type||t;if("string"===typeof t)t=new nt(t,n);else if(t instanceof nt)t.target=t.target||n;else{var i=t;L(t=new nt(r,n),i)}if(i=!0,e)for(var o=e.length-1;0<=o;o--){var a=t.a=e[o];i=St(a,r,!0,t)&&i}if(i=St(a=t.a=n,r,!0,t)&&i,i=St(a,r,!1,t)&&i,e)for(o=0;o<e.length;o++)i=St(a=t.a=e[o],r,!1,t)&&i;return i},i.C=function(){if(Tt.M.C.call(this),this.c){var t,e=this.c;for(t in e.a){for(var n=e.a[t],r=0;r<n.length;r++)ut(n[r]);delete e.a[t],e.b--}}this.A=null},i.ra=function(t,e,n,r){return this.c.add(String(t),e,!1,n,r)},i.sa=function(t,e,n,r){return this.c.add(String(t),e,!0,n,r)};var It=s.JSON.stringify;function Ct(){this.b=this.a=null}var kt,xt=new(function(){function t(t,e,n){this.f=n,this.c=t,this.g=e,this.b=0,this.a=null}return t.prototype.get=function(){var t;return 0<this.b?(this.b--,t=this.a,this.a=t.next,t.next=null):t=this.c(),t},t}())((function(){return new At}),(function(t){t.reset()}),100);function Nt(){var t=Dt,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function At(){this.next=this.b=this.a=null}function Ot(t){s.setTimeout((function(){throw t}),0)}function Pt(t,e){kt||function(){var t=s.Promise.resolve(void 0);kt=function(){t.then(Lt)}}(),Rt||(kt(),Rt=!0),Dt.add(t,e)}Ct.prototype.add=function(t,e){var n=xt.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},At.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},At.prototype.reset=function(){this.next=this.b=this.a=null};var Rt=!1,Dt=new Ct;function Lt(){for(var t;t=Nt();
2){try{t.a.call(t.b)}catch(n){Ot(n)}var e=xt;e.g(t),e.b<e.f&&(e.b++,t.next=e.a,e.a=t)}Rt=!1}function Mt(t,e){Tt.call(this),this.b=t||1,this.a=e||s,this.f=y(this.Ua,this),this.g=m()}function jt(t){t.Z=!1,t.L&&(t.a.clearTimeout(t.L),t.L=null)}function Ft(t,e,n){if("function"==c(t))n&&(t=y(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=y(t.handleEvent,t)}return 2147483647<Number(e)?-1:s.setTimeout(t,e||0)}function Ut(t,e,n){_.call(this),this.f=null!=n?y(t,n):t,this.c=e,this.b=y(this.Pa,this),this.a=[]}function Vt(t){t.T=Ft(t.b,t.c),t.f.apply(null,t.a)}function qt(t){_.call(this),this.b=t,this.a={}}b(Mt,Tt),(i=Mt.prototype).Z=!1,i.L=null,i.Ua=function(){if(this.Z){var t=m()-this.g;0<t&&t<.8*this.b?this.L=this.a.setTimeout(this.f,this.b-t):(this.L&&(this.a.clearTimeout(this.L),this.L=null),this.dispatchEvent("tick"),this.Z&&(jt(this),this.start()))}},i.start=function(){this.Z=!0,this.L||(this.L=this.a.setTimeout(this.f,this.b),this.g=m())},i.C=function(){Mt.M.C.call(this),jt(this),delete this.a},b(Ut,_),(i=Ut.prototype).ba=!1,i.T=null,i.Ia=function(t){this.a=arguments,this.T?this.ba=!0:Vt(this)},i.C=function(){Ut.M.C.call(this),this.T&&(s.clearTimeout(this.T),this.T=null,this.ba=!1,this.a=[])},i.Pa=function(){this.T=null,this.ba&&(this.ba=!1,Vt(this))},b(qt,_);var Bt=[];function zt(t,e,n,r){Array.isArray(n)||(n&&(Bt[0]=n.toString()),n=Bt);for(var i=0;i<n.length;i++){var o=dt(e,n[i],r||t.handleEvent,!1,t.b||t);if(!o)break;t.a[o.key]=o}}function Wt(t){P(t.a,(function(t,e){this.a.hasOwnProperty(e)&&yt(t)}),t),t.a={}}function Ht(){}qt.prototype.C=function(){qt.M.C.call(this),Wt(this)},qt.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Kt=null;function Gt(){return Kt=Kt||new Tt}function Qt(t){nt.call(this,"serverreachability",t)}function $t(t){var e=Gt();e.dispatchEvent(new Qt(e,t))}function Xt(t){nt.call(this,"statevent",t)}function Yt(t){var e=Gt();e.dispatchEvent(new Xt(e,t))}function Jt(t){nt.call(this,"timingevent",t)}function Zt(t,e){if("function"!=c(t))throw Error("Fn must not be null and must be a function");return s.setTimeout((function(){t()}),e)}b(Qt,nt),b(Xt,nt),b(Jt,nt);var te={NO_ERROR:0,Va:1,bb:2,ab:3,Ya:4,$a:5,cb:6,za:7,TIMEOUT:8,gb:9},ee={Xa:"complete",kb:"success",Aa:"error",za:"abort",ib:"ready",jb:"readystatechange",TIMEOUT:"timeout",eb:"incrementaldata",hb:"progress",Za:"downloadprogress",lb:"uploadprogress"};function ne(){}function re(t){var e;return(e=t.a)||(e=t.a={}),e}function ie(){}ne.prototype.a=null;var oe,ae={OPEN:"a",Wa:"b",Aa:"c",fb:"d"};function se(){nt.call(this,"d")}function ue(){nt.call(this,"c")}function ce(){}function le(t,e,n){this.g=t,this.W=e,this.U=n||1,this.G=new qt(this),this.N=he,t=q?125:void 0,this.O=new Mt(t),this.m=null,this.b=!1,this.j=this.A=this.f=this.B=this.s=this.P=this.h=null,this.i=[],this.a=null,this.w=0,this.c=this.v=null,this.H=-1,this.l=!1,this.J=0,this.D=null,this.o=this.R=this.F=!1}b(se,nt),b(ue,nt),b(ce,ne),oe=new ce;var he=45e3,fe={},pe={};function de(t,e,n){t.B=1,t.f=Me(Ae(e)),t.j=n,t.F=!0,ve(t,null)}function ve(t,e){t.s=m(),me(t),t.A=Ae(t.f);var n=t.A,r=t.U;Array.isArray(r)||(r=[String(r)]),$e(n.b,"t",r),t.w=0,t.a=qn(t.g,t.g.w?e:null),0<t.J&&(t.D=new Ut(y(t.ya,t,t.a),t.J)),zt(t.G,t.a,"readystatechange",t.Sa),e=t.m?R(t.m):{},t.j?(t.v||(t.v="POST"),e["Content-Type"]="application/x-www-form-urlencoded",t.a.$(t.A,t.v,t.j,e)):(t.v="GET",t.a.$(t.A,t.v,null,e)),$t(1)}function ye(t,e,n){for(var r=!0;!t.l&&t.w<n.length;){var i=ge(t,n);if(i==pe){4==e&&(t.c=4,Yt(14),r=!1);break}if(i==fe){t.c=4,Yt(15),r=!1;break}Te(t,i)}4==e&&0==n.length&&(t.c=1,Yt(16),r=!1),t.b=t.b&&r,r||(Ee(t),we(t))}function ge(t,e){var n=t.w,r=e.indexOf("\n",n);return-1==r?pe:(n=Number(e.substring(n,r)),isNaN(n)?fe:(r+=1)+n>e.length?pe:(e=e.substr(r,n),t.w=r+n,e))}function me(t){t.P=m()+t.N,be(t,t.N)}function be(t,e){if(null!=t.h)throw Error("WatchDog timer not null");t.h=Zt(y(t.Qa,t),e)}function _e(t){t.h&&(s.clearTimeout(t.h),t.h=null)}function we(t){0==t.g.u||t.l||Mn(t.g,t)}function Ee(t){_e(t);var e=t.D;e&&"function"==typeof e.da&&e.da(),t.D=null,jt(t.O),Wt(t.G),t.a&&(e=t.a,t.a=null,e.abort(),e.da())}function Te(t,e){try{var n=t.g;if(0!=n.u&&(n.a==t||nn(n.b,t)))if(n.A=t.H,!t.o&&nn(n.b,t)&&3==n.u){try{var r=n.ja.a.parse(e)}catch(v){r=null}if(Array.isArray(r)&&3==r.length){var i=r;if(0==i[0]){t:if(!n.i){if(n.a){if(!(n.a.s+3e3<t.s))break t;Ln(n),n.a.cancel(),n.a=null}Dn(n),Yt(18)}}else n.ia=i[1],0<n.ia-n.G&&37500>i[2]&&n.U&&0==n.m&&!n.l&&(n.l=Zt(y(n.Na,n),6e3));if(1>=en(n.b)&&n.O){try{n.O()}catch(v){}n.O=void 0}}else Fn(n,11)}else if((t.o||n.a==t)&&Ln(n),!I(e))for(e=r=n.ja.a.parse(e),r=0;r<e.length;r++)if(i=e[r],n.G=i[0],i=i[1],2==n.u)if("c"==i[0]){n.B=i[1],n.R=i[2];var o=i[3];null!=o&&(n.oa=o);var a=i[5];null!=a&&"number"===typeof a&&0<a&&(n.D=1.5*a);var s=n,u=t.a;if(u){var c=u.a?u.a.getResponseHeader("X-Client-Wire-Protocol"):null;if(c){var l=s.b;!l.a&&(x(c,"spdy")||x(c,"quic")||x(c,"h2"))&&(l.f=l.g,l.a=new Set,l.b&&(rn(l,l.b),l.b=null))}if(s.s){var h=u.a?u.a.getResponseHeader("X-HTTP-Session-Id"):null;h&&(s.ha=h,Le(s.v,s.s,h))}}n.u=3,n.c&&n.c.na();var f=t;if((s=n).ea=Vn(s,s.w?s.R:null,s.P),f.o){on(s.b,f);var p=f,d=s.D;d&&p.setTimeout(d),p.h&&(_e(p),me(p)),s.a=f}else Rn(s);0<n.f.length&&Nn(n)}else"stop"!=i[0]&&"close"!=i[0]||Fn(n,7);else 3==n.u&&("stop"==i[0]||"close"==i[0]?"stop"==i[0]?Fn(n,7):Cn(n):"noop"!=i[0]&&n.c&&n.c.ma(i),n.m=0);$t(4)}catch(v){}}function Se(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(l(t)||"string"===typeof t)E(t,e,void 0);else{if(t.K&&"function"==typeof t.K)var n=t.K();else if(t.I&&"function"==typeof t.I)n=void 0;else if(l(t)||"string"===typeof t){n=[];for(var r=t.length,i=0;i<r;i++)n.push(i)}else for(i in n=[],r=0,t)n[r++]=i;i=(r=function(t){if(t.I&&"function"==typeof t.I)return t.I();if("string"===typeof t)return t.split("");
vendor: 5,615 bytes, line 2
2if(l(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}for(r in e=[],n=0,t)e[n++]=t[r];return e}(t)).length;for(var o=0;o<i;o++)e.call(void 0,r[o],n&&n[o],t)}}function Ie(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof Ie)for(n=t.K(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function Ce(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];ke(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e<t.a.length;)ke(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function ke(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(i=le.prototype).setTimeout=function(t){this.N=t},i.Sa=function(t){t=t.target;var e=this.D;e&&3==En(t)?e.Ia():this.ya(t)},i.ya=function(t){try{if(t==this.a)t:{var e=En(this.a),n=this.a.qa(),r=this.a.S();if(!(3>e||3==e&&!q&&!this.a.Y())){this.l||4!=e||7==n||$t(8==n||0>=r?3:2),_e(this);var i=this.a.S();this.H=i;var o=this.a.Y();if(this.b=200==i){if(this.R&&!this.o){e:{if(this.a){var a,s=this.a;if((a=s.a?s.a.getResponseHeader("X-HTTP-Initial-Response"):null)&&!I(a)){var u=a;break e}}u=null}if(!u){this.b=!1,this.c=3,Yt(12),Ee(this),we(this);break t}this.o=!0,Te(this,u)}this.F?(ye(this,e,o),q&&this.b&&3==e&&(zt(this.G,this.O,"tick",this.Ra),this.O.start())):Te(this,o),4==e&&Ee(this),this.b&&!this.l&&(4==e?Mn(this.g,this):(this.b=!1,me(this)))}else 400==i&&0<o.indexOf("Unknown SID")?(this.c=3,Yt(12)):(this.c=0,Yt(13)),Ee(this),we(this)}}}catch(c){}},i.Ra=function(){if(this.a){var t=En(this.a),e=this.a.Y();this.w<e.length&&(_e(this),ye(this,t,e),this.b&&4!=t&&me(this))}},i.cancel=function(){this.l=!0,Ee(this)},i.Qa=function(){this.h=null;var t=m();0<=t-this.P?(2!=this.B&&($t(3),Yt(17)),Ee(this),this.c=2,we(this)):be(this,this.P-t)},(i=Ie.prototype).I=function(){Ce(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},i.K=function(){return Ce(this),this.a.concat()},i.get=function(t,e){return ke(this.b,t)?this.b[t]:e},i.set=function(t,e){ke(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},i.forEach=function(t,e){for(var n=this.K(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var xe=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Ne(t,e){if(this.c=this.j=this.f="",this.h=null,this.i=this.g="",this.a=!1,t instanceof Ne){this.a=void 0!==e?e:t.a,Oe(this,t.f),this.j=t.j,Pe(this,t.c),Re(this,t.h),this.g=t.g,e=t.b;var n=new He;n.c=e.c,e.a&&(n.a=new Ie(e.a),n.b=e.b),De(this,n),this.i=t.i}else t&&(n=String(t).match(xe))?(this.a=!!e,Oe(this,n[1]||"",!0),this.j=je(n[2]||""),Pe(this,n[3]||"",!0),Re(this,n[4]),this.g=je(n[5]||"",!0),De(this,n[6]||"",!0),this.i=je(n[7]||"")):(this.a=!!e,this.b=new He(null,this.a))}function Ae(t){return new Ne(t)}function Oe(t,e,n){t.f=n?je(e,!0):e,t.f&&(t.f=t.f.replace(/:$/,""))}function Pe(t,e,n){t.c=n?je(e,!0):e}function Re(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.h=e}else t.h=null}function De(t,e,n){e instanceof He?(t.b=e,function(t,e){e&&!t.f&&(Ke(t),t.c=null,t.a.forEach((function(t,e){var n=e.toLowerCase();e!=n&&(Ge(this,e),$e(this,n,t))}),t)),t.f=e}(t.b,t.a)):(n||(e=Fe(e,ze)),t.b=new He(e,t.a))}function Le(t,e,n){t.b.set(e,n)}function Me(t){return Le(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^m()).toString(36)),t}function je(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function Fe(t,e,n){return"string"===typeof t?(t=encodeURI(t).replace(e,Ue),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function Ue(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}Ne.prototype.toString=function(){var t=[],e=this.f;e&&t.push(Fe(e,Ve,!0),":");var n=this.c;return(n||"file"==e)&&(t.push("//"),(e=this.j)&&t.push(Fe(e,Ve,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.h)&&t.push(":",String(n))),(n=this.g)&&(this.c&&"/"!=n.charAt(0)&&t.push("/"),t.push(Fe(n,"/"==n.charAt(0)?Be:qe,!0))),(n=this.b.toString())&&t.push("?",n),(n=this.i)&&t.push("#",Fe(n,We)),t.join("")};var Ve=/[#\/\?@]/g,qe=/[#\?:]/g,Be=/[#\?]/g,ze=/[#\?@]/g,We=/#/g;function He(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function Ke(t){t.a||(t.a=new Ie,t.b=0,t.c&&function(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(t.c,(function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)})))}function Ge(t,e){Ke(t),e=Xe(t,e),ke(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,ke((t=t.a).b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&Ce(t)))}function Qe(t,e){return Ke(t),e=Xe(t,e),ke(t.a.b,e)}function $e(t,e,n){Ge(t,e),0<n.length&&(t.c=null,t.a.set(Xe(t,e),S(n)),t.b+=n.length)}function Xe(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}function Ye(t,e){this.b=t,this.a=e}function Je(t){this.g=t||Ze,s.PerformanceNavigationTiming?t=0<(t=s.performance.getEntriesByType("navigation")).length&&("hq"==t[0].nextHopProtocol||"h2"==t[0].nextHopProtocol):t=!!(s.ca&&s.ca.ua&&s.ca.ua()&&s.ca.ua().mb),this.f=t?this.g:1,this.a=null,1<this.f&&(this.a=new Set),this.b=null,this.c=[]}(i=He.prototype).add=function(t,e){Ke(this),this.c=null,t=Xe(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this}
2,i.forEach=function(t,e){Ke(this),this.a.forEach((function(n,r){E(n,(function(n){t.call(e,n,r,this)}),this)}),this)},i.K=function(){Ke(this);for(var t=this.a.I(),e=this.a.K(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},i.I=function(t){Ke(this);var e=[];if("string"===typeof t)Qe(this,t)&&(e=T(e,this.a.get(Xe(this,t))));else{t=this.a.I();for(var n=0;n<t.length;n++)e=T(e,t[n])}return e},i.set=function(t,e){return Ke(this),this.c=null,Qe(this,t=Xe(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},i.get=function(t,e){return t&&0<(t=this.I(t)).length?String(t[0]):e},i.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.K(),n=0;n<e.length;n++){var r=e[n],i=encodeURIComponent(String(r));r=this.I(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),t.push(a)}}return this.c=t.join("&")};var Ze=10;function tn(t){return!!t.b||!!t.a&&t.a.size>=t.f}function en(t){return t.b?1:t.a?t.a.size:0}function nn(t,e){return t.b?t.b==e:!!t.a&&t.a.has(e)}function rn(t,e){t.a?t.a.add(e):t.b=e}function on(t,e){t.b&&t.b==e?t.b=null:t.a&&t.a.has(e)&&t.a.delete(e)}function an(t){var e,n;if(null!=t.b)return t.c.concat(t.b.i);if(null!=t.a&&0!==t.a.size){var i=t.c;try{for(var o=r(t.a.values()),a=o.next();!a.done;a=o.next()){var s=a.value;i=i.concat(s.i)}}catch(u){e={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return i}return S(t.c)}function sn(){}function un(){this.a=new sn}function cn(t,e,n){var r=n||"";try{Se(t,(function(t,n){var i=t;h(t)&&(i=It(t)),e.push(r+n+"="+encodeURIComponent(i))}))}catch(i){throw e.push(r+"type="+encodeURIComponent("_badmap")),i}}function ln(t,e,n,r,i){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch(o){}}Je.prototype.cancel=function(){var t,e;if(this.c=an(this),this.b)this.b.cancel(),this.b=null;else if(this.a&&0!==this.a.size){try{for(var n=r(this.a.values()),i=n.next();!i.done;i=n.next()){i.value.cancel()}}catch(o){t={error:o}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}this.a.clear()}},sn.prototype.stringify=function(t){return s.JSON.stringify(t,void 0)},sn.prototype.parse=function(t){return s.JSON.parse(t,void 0)};var hn=s.JSON.parse;function fn(t){Tt.call(this),this.headers=new Ie,this.G=t||null,this.b=!1,this.s=this.a=null,this.D="",this.h=0,this.f="",this.g=this.w=this.l=this.v=!1,this.o=0,this.m=null,this.H=pn,this.B=this.F=!1}b(fn,Tt);var pn="",dn=/^https?$/i,vn=["POST","PUT"];function yn(t){return"content-type"==t.toLowerCase()}function gn(t,e){t.b=!1,t.a&&(t.g=!0,t.a.abort(),t.g=!1),t.f=e,t.h=5,mn(t),_n(t)}function mn(t){t.v||(t.v=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function bn(t){if(t.b&&"undefined"!=typeof a&&(!t.s[1]||4!=En(t)||2!=t.S()))if(t.l&&4==En(t))Ft(t.va,0,t);else if(t.dispatchEvent("readystatechange"),4==En(t)){t.b=!1;try{var e,n=t.S();t:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break t;default:r=!1}if(!(e=r)){var i;if(i=0===n){var o=String(t.D).match(xe)[1]||null;if(!o&&s.self&&s.self.location){var u=s.self.location.protocol;o=u.substr(0,u.length-1)}i=!dn.test(o?o.toLowerCase():"")}e=i}if(e)t.dispatchEvent("complete"),t.dispatchEvent("success");else{t.h=6;try{var c=2<En(t)?t.a.statusText:""}catch(l){c=""}t.f=c+" ["+t.S()+"]",mn(t)}}finally{_n(t)}}}function _n(t,e){if(t.a){wn(t);var n=t.a,r=t.s[0]?u:null;t.a=null,t.s=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(i){}}}function wn(t){t.a&&t.B&&(t.a.ontimeout=null),t.m&&(s.clearTimeout(t.m),t.m=null)}function En(t){return t.a?t.a.readyState:0}function Tn(t,e,n){t:{for(r in n){var r=!1;break t}r=!0}r||(n=function(t){var e="";return P(t,(function(t,n){e+=n,e+=":",e+=t,e+="\r\n"})),e}(n),"string"===typeof t?null!=n&&encodeURIComponent(String(n)):Le(t,e,n))}function Sn(t,e,n){return n&&n.internalChannelParams&&n.internalChannelParams[t]||e}function In(t){this.f=[],this.R=this.ea=this.v=this.P=this.a=this.ha=this.s=this.N=this.h=this.F=this.j=null,this.Fa=this.H=0,this.Ca=Sn("failFast",!1,t),this.U=this.l=this.i=this.g=this.c=null,this.W=!0,this.A=this.ia=this.G=-1,this.J=this.m=this.o=0,this.Ba=Sn("baseRetryDelayMs",5e3,t),this.Ga=Sn("retryDelaySeedMs",1e4,t),this.Da=Sn("forwardChannelMaxRetries",2,t),this.ga=Sn("forwardChannelRequestTimeoutMs",2e4,t),this.Ea=t&&t.nb||void 0,this.D=void 0,this.w=t&&t.supportsCrossDomainXhr||!1,this.B="",this.b=new Je(t&&t.concurrentRequestLimit),this.ja=new un,this.fa=t&&t.fastHandshake||!1,t&&t.forceLongPolling&&(this.W=!1),this.O=void 0}function Cn(t){if(kn(t),3==t.u){var e=t.H++,n=Ae(t.v);Le(n,"SID",t.B),Le(n,"RID",e),Le(n,"TYPE","terminate"),On(t,n),(e=new le(t,e,void 0)).B=2,e.f=Me(Ae(n)),n=!1,s.navigator&&s.navigator.sendBeacon&&(n=s.navigator.sendBeacon(e.f.toString(),"")),!n&&s.Image&&((new Image).src=e.f,n=!0),n||(e.a=qn(e.g,null),e.a.$(e.f)),e.s=m(),me(e)}Un(t)}function kn(t){t.a&&(t.a.cancel(),t.a=null),t.i&&(s.clearTimeout(t.i),t.i=null),Ln(t),t.b.cancel(),t.g&&("number"===typeof t.g&&s.clearTimeout(t.g),t.g=null)}function xn(t,e){t.f.push(new Ye(t.Fa++,e)),3==t.u&&Nn(t)}function Nn(t){tn(t.b)||t.g||(t.g=!0,Pt(t.xa,t),t.o=0)}function An(t,e){var n;n=e?e.W:t.H++;var r=Ae(t.v);Le(r,"SID",t.B),Le(r,"RID",n),Le(r,"AID",t.G),On(t,r),t.h&&t.j&&Tn(r,t.h,t.j),n=new le(t,n,t.o+1),null===t.h&&(n.m=t.j),e&&(t.f=e.i.concat(t.f)),e=Pn(t,n,1e3),n.setTimeout(
2Math.round(.5*t.ga)+Math.round(.5*t.ga*Math.random())),rn(t.b,n),de(n,r,e)}function On(t,e){t.c&&Se({},(function(t,n){Le(e,n,t)}))}function Pn(t,e,n){n=Math.min(t.f.length,n);var r=t.c?y(t.c.Ha,t.c,t):null;t:for(var i=t.f,o=-1;;){var a=["count="+n];-1==o?0<n?(o=i[0].b,a.push("ofs="+o)):o=0:a.push("ofs="+o);for(var s=!0,u=0;u<n;u++){var c=i[u].b,l=i[u].a;if(0>(c-=o))o=Math.max(0,i[u].b-100),s=!1;else try{cn(l,a,"req"+c+"_")}catch(h){r&&r(l)}}if(s){r=a.join("&");break t}}return t=t.f.splice(0,n),e.i=t,r}function Rn(t){t.a||t.i||(t.J=1,Pt(t.wa,t),t.m=0)}function Dn(t){return!(t.a||t.i||3<=t.m)&&(t.J++,t.i=Zt(y(t.wa,t),jn(t,t.m)),t.m++,!0)}function Ln(t){null!=t.l&&(s.clearTimeout(t.l),t.l=null)}function Mn(t,e){var n=null;if(t.a==e){Ln(t),t.a=null;var r=2}else{if(!nn(t.b,e))return;n=e.i,on(t.b,e),r=1}if(t.A=e.H,0!=t.u)if(e.b)if(1==r){n=e.j?e.j.length:0,e=m()-e.s;var i=t.o;(r=Gt()).dispatchEvent(new Jt(r,n,e,i)),Nn(t)}else Rn(t);else if(3==(i=e.c)||0==i&&0<t.A||!(1==r&&function(t,e){return!(en(t.b)>=t.b.f-(t.g?1:0))&&(t.g?(t.f=e.i.concat(t.f),!0):!(1==t.u||2==t.u||t.o>=(t.Ca?0:t.Da))&&(t.g=Zt(y(t.xa,t,e),jn(t,t.o)),t.o++,!0))}(t,e)||2==r&&Dn(t)))switch(n&&0<n.length&&(e=t.b,e.c=e.c.concat(n)),i){case 1:Fn(t,5);break;case 4:Fn(t,10);break;case 3:Fn(t,6);break;default:Fn(t,2)}}function jn(t,e){var n=t.Ba+Math.floor(Math.random()*t.Ga);return t.c||(n*=2),n*e}function Fn(t,e){if(2==e){var n=null;t.c&&(n=null);var r=y(t.Ta,t);n||(n=new Ne("//www.google.com/images/cleardot.gif"),s.location&&"http"==s.location.protocol||Oe(n,"https"),Me(n)),function(t,e){var n=new Ht;if(s.Image){var r=new Image;r.onload=g(ln,n,r,"TestLoadImage: loaded",!0,e),r.onerror=g(ln,n,r,"TestLoadImage: error",!1,e),r.onabort=g(ln,n,r,"TestLoadImage: abort",!1,e),r.ontimeout=g(ln,n,r,"TestLoadImage: timeout",!1,e),s.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=t}else e(!1)}(n.toString(),r)}else Yt(2);t.u=0,t.c&&t.c.la(e),Un(t),kn(t)}function Un(t){t.u=0,t.A=-1,t.c&&(0==an(t.b).length&&0==t.f.length||(t.b.c.length=0,S(t.f),t.f.length=0),t.c.ka())}function Vn(t,e,n){var r=function(t){return t instanceof Ne?Ae(t):new Ne(t,void 0)}(n);if(""!=r.c)e&&Pe(r,e+"."+r.c),Re(r,r.h);else{var i=s.location;r=function(t,e,n,r){var i=new Ne(null,void 0);return t&&Oe(i,t),e&&Pe(i,e),n&&Re(i,n),r&&(i.g=r),i}(i.protocol,e?e+"."+i.hostname:i.hostname,+i.port,n)}return t.N&&P(t.N,(function(t,e){Le(r,e,t)})),e=t.s,n=t.ha,e&&n&&Le(r,e,n),Le(r,"VER",t.oa),On(t,r),r}function qn(t,e){if(e&&!t.w)throw Error("Can't create secondary domain capable XhrIo object.");return(e=new fn(t.Ea)).F=t.w,e}function Bn(){}function zn(){if(U&&!(10<=Number(J)))throw Error("Environmental error: no available transport.")}function Wn(t,e){Tt.call(this),this.a=new In(e),this.l=t,this.b=e&&e.messageUrlParams||null,t=e&&e.messageHeaders||null,e&&e.clientProtocolHeaderRequired&&(t?t["X-Client-Protocol"]="webchannel":t={"X-Client-Protocol":"webchannel"}),this.a.j=t,t=e&&e.initMessageHeaders||null,e&&e.messageContentType&&(t?t["X-WebChannel-Content-Type"]=e.messageContentType:t={"X-WebChannel-Content-Type":e.messageContentType}),e&&e.pa&&(t?t["X-WebChannel-Client-Profile"]=e.pa:t={"X-WebChannel-Client-Profile":e.pa}),this.a.F=t,(t=e&&e.httpHeadersOverwriteParam)&&!I(t)&&(this.a.h=t),this.h=e&&e.supportsCrossDomainXhr||!1,this.g=e&&e.sendRawJson||!1,(e=e&&e.httpSessionIdParam)&&!I(e)&&(this.a.s=e,null!==(t=this.b)&&e in t&&(e in(t=this.b)&&delete t[e])),this.f=new Gn(this)}function Hn(t){se.call(this);var e=t.__sm__;if(e){t:{for(var n in e){t=n;break t}t=void 0}(this.c=t)?(t=this.c,this.data=null!==e&&t in e?e[t]:void 0):this.data=e}else this.data=t}function Kn(){ue.call(this),this.status=1}function Gn(t){this.a=t}(i=fn.prototype).$=function(t,e,n,r){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+t);e=e?e.toUpperCase():"GET",this.D=t,this.f="",this.h=0,this.v=!1,this.b=!0,this.a=new XMLHttpRequest,this.s=this.G?re(this.G):re(oe),this.a.onreadystatechange=y(this.va,this);try{this.w=!0,this.a.open(e,String(t),!0),this.w=!1}catch(o){return void gn(this,o)}t=n||"";var i=new Ie(this.headers);r&&Se(r,(function(t,e){i.set(e,t)})),r=function(t){t:{for(var e=yn,n=t.length,r="string"===typeof t?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t)){e=i;break t}e=-1}return 0>e?null:"string"===typeof t?t.charAt(e):t[e]}(i.K()),n=s.FormData&&t instanceof s.FormData,!(0<=w(vn,e))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;
2charset=utf-8"),i.forEach((function(t,e){this.a.setRequestHeader(e,t)}),this),this.H&&(this.a.responseType=this.H),"withCredentials"in this.a&&this.a.withCredentials!==this.F&&(this.a.withCredentials=this.F);try{wn(this),0<this.o&&((this.B=function(t){return U&&X(9)&&"number"===typeof t.timeout&&void 0!==t.ontimeout}(this.a))?(this.a.timeout=this.o,this.a.ontimeout=y(this.ta,this)):this.m=Ft(this.ta,this.o,this)),this.l=!0,this.a.send(t),this.l=!1}catch(o){gn(this,o)}},i.ta=function(){"undefined"!=typeof a&&this.a&&(this.f="Timed out after "+this.o+"ms, aborting",this.h=8,this.dispatchEvent("timeout"),this.abort(8))},i.abort=function(t){this.a&&this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.h=t||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),_n(this))},i.C=function(){this.a&&(this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),_n(this,!0)),fn.M.C.call(this)},i.va=function(){this.j||(this.w||this.l||this.g?bn(this):this.Oa())},i.Oa=function(){bn(this)},i.S=function(){try{return 2<En(this)?this.a.status:-1}catch(t){return-1}},i.Y=function(){try{return this.a?this.a.responseText:""}catch(t){return""}},i.Ja=function(t){if(this.a){var e=this.a.responseText;return t&&0==e.indexOf(t)&&(e=e.substring(t.length)),hn(e)}},i.qa=function(){return this.h},i.Ma=function(){return"string"===typeof this.f?this.f:String(this.f)},(i=In.prototype).oa=8,i.u=1,i.xa=function(t){if(this.g)if(this.g=null,1==this.u){if(!t){this.H=Math.floor(1e5*Math.random());var e,n=new le(this,t=this.H++,void 0),r=this.j;if(this.F&&(r?L(r=R(r),this.F):r=this.F),null===this.h&&(n.m=r),this.fa)t:{for(var i=e=0;i<this.f.length;i++){var o=this.f[i];if(void 0===(o="__data__"in o.a&&"string"===typeof(o=o.a.__data__)?o.length:void 0))break;if(4096<(e+=o)){e=i;break t}if(4096===e||i===this.f.length-1){e=i+1;break t}}e=1e3}else e=1e3;e=Pn(this,n,e),Le(i=Ae(this.v),"RID",t),Le(i,"CVER",22),this.s&&Le(i,"X-HTTP-Session-Id",this.s),On(this,i),this.h&&r&&Tn(i,this.h,r),rn(this.b,n),this.fa?(Le(i,"$req",e),Le(i,"SID","null"),n.R=!0,de(n,i,null)):de(n,i,e),this.u=2}}else 3==this.u&&(t?An(this,t):0==this.f.length||tn(this.b)||An(this))},i.wa=function(){this.i=null,this.a=new le(this,"rpc",this.J),null===this.h&&(this.a.m=this.j),this.a.J=0;var t=Ae(this.ea);Le(t,"RID","rpc"),Le(t,"SID",this.B),Le(t,"CI",this.U?"0":"1"),Le(t,"AID",this.G),On(this,t),Le(t,"TYPE","xmlhttp"),this.h&&this.j&&Tn(t,this.h,this.j),this.D&&this.a.setTimeout(this.D);var e=this.a,n=this.R;e.B=1,e.f=Me(Ae(t)),e.j=null,e.F=!0,ve(e,n)},i.Na=function(){null!=this.l&&(this.l=null,this.a.cancel(),this.a=null,Dn(this),Yt(19))},i.Ta=function(t){Yt(t?2:1)},(i=Bn.prototype).na=function(){},i.ma=function(){},i.la=function(){},i.ka=function(){},i.Ha=function(){},zn.prototype.a=function(t,e){return new Wn(t,e)},b(Wn,Tt),(i=Wn.prototype).addEventListener=function(t,e,n,r){Wn.M.addEventListener.call(this,t,e,n,r)},i.removeEventListener=function(t,e,n,r){Wn.M.removeEventListener.call(this,t,e,n,r)},i.Ka=function(){this.a.c=this.f,this.h&&(this.a.w=!0);var t=this.a,e=this.l,n=this.b||void 0;Yt(0),t.P=e,t.N=n||{},t.U=t.W,t.v=Vn(t,null,t.P),Nn(t)},i.close=function(){Cn(this.a)},i.La=function(t){if("string"===typeof t){var e={};e.__data__=t,xn(this.a,e)}else this.g?((e={}).__data__=It(t),xn(this.a,e)):xn(this.a,t)},i.C=function(){this.a.c=null,delete this.f,Cn(this.a),delete this.a,Wn.M.C.call(this)},b(Hn,se),b(Kn,ue),b(Gn,Bn),Gn.prototype.na=function(){this.a.dispatchEvent("a")},Gn.prototype.ma=function(t){this.a.dispatchEvent(new Hn(t))},Gn.prototype.la=function(t){this.a.dispatchEvent(new Kn(t))},Gn.prototype.ka=function(){this.a.dispatchEvent("b")},zn.prototype.createWebChannel=zn.prototype.a,Wn.prototype.send=Wn.prototype.La,Wn.prototype.open=Wn.prototype.Ka,Wn.prototype.close=Wn.prototype.close,te.NO_ERROR=0,te.TIMEOUT=8,te.HTTP_ERROR=6,ee.COMPLETE="complete",ie.EventType=ae,ae.OPEN="a",ae.CLOSE="b",ae.ERROR="c",ae.MESSAGE="d",Tt.prototype.listen=Tt.prototype.ra,fn.prototype.listenOnce=fn.prototype.sa,fn.prototype.getLastError=fn.prototype.Ma,fn.prototype.getLastErrorCode=fn.prototype.qa,fn.prototype.getStatus=fn.prototype.S,fn.prototype.getResponseJson=fn.prototype.Ja,fn.prototype.getResponseText=fn.prototype.Y,fn.prototype.send=fn.prototype.$;var Qn={createWebChannelTransport:function(){return new zn},ErrorCode:te,EventType:ee,WebChannel:ie,XhrIo:fn},$n=Qn.createWebChannelTransport,Xn=Qn.ErrorCode,Yn=Qn.EventType,Jn=Qn.WebChannel,Zn=Qn.XhrIo;e.default=Qn}.call(this,n(19))},function(t,e,n){"use strict";var r,i=(r=n(4))&&"object"===typeof r&&"default"in r?r.default:r,o=n(1),a=n(7),s={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENT
2ED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},u=function(t){function e(n,r,i){var o=t.call(this,r)||this;return Object.setPrototypeOf(o,e.prototype),o.code=n,o.details=i,o}return o.__extends(e,t),e}(Error);var c=function(){function t(t,e){var n=this;this.auth=null,this.messaging=null,this.auth=t.getImmediate({optional:!0}),this.messaging=e.getImmediate({optional:!0}),this.auth||t.get().then((function(t){return n.auth=t}),(function(){})),this.messaging||e.get().then((function(t){return n.messaging=t}),(function(){}))}return t.prototype.getAuthToken=function(){return o.__awaiter(this,void 0,void 0,(function(){var t;return o.__generator(this,(function(e){switch(e.label){case 0:if(!this.auth)return[2,void 0];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.auth.getToken()];case 2:return(t=e.sent())?[2,t.accessToken]:[2,void 0];case 3:return e.sent(),[2,void 0];case 4:return[2]}}))}))},t.prototype.getInstanceIdToken=function(){return o.__awaiter(this,void 0,void 0,(function(){return o.__generator(this,(function(t){if(!this.messaging||!("Notification"in self)||"granted"!==Notification.permission)return[2,void 0];try{return[2,this.messaging.getToken()]}catch(e){return[2,void 0]}return[2]}))}))},t.prototype.getContext=function(){return o.__awaiter(this,void 0,void 0,(function(){var t,e;return o.__generator(this,(function(n){switch(n.label){case 0:return[4,this.getAuthToken()];case 1:return t=n.sent(),[4,this.getInstanceIdToken()];case 2:return e=n.sent(),[2,{authToken:t,instanceIdToken:e}]}}))}))},t}();function l(t,e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r]));return n}var h=function(){function t(){}return t.prototype.encode=function(t){var e=this;if(null==t)return null;if(t instanceof Number&&(t=t.valueOf()),"number"===typeof t&&isFinite(t))return t;if(!0===t||!1===t)return t;if("[object String]"===Object.prototype.toString.call(t))return t;if(Array.isArray(t))return t.map((function(t){return e.encode(t)}));if("function"===typeof t||"object"===typeof t)return l(t,(function(t){return e.encode(t)}));throw new Error("Data cannot be encoded in JSON: "+t)},t.prototype.decode=function(t){var e=this;if(null==t)return t;if(t["@type"])switch(t["@type"]){case"type.googleapis.com/google.protobuf.Int64Value":case"type.googleapis.com/google.protobuf.UInt64Value":var n=Number(t.value);if(isNaN(n))throw new Error("Data cannot be decoded from JSON: "+t);return n;default:throw new Error("Data cannot be decoded from JSON: "+t)}return Array.isArray(t)?t.map((function(t){return e.decode(t)})):"function"===typeof t||"object"===typeof t?l(t,(function(t){return e.decode(t)})):t},t}();var f=function(){function t(t,e,n,r){var i=this;void 0===r&&(r="us-central1"),this.app_=t,this.region_=r,this.serializer=new h,this.emulatorOrigin=null,this.INTERNAL={delete:function(){return i.deleteService()}},this.contextProvider=new c(e,n),this.cancelAllRequests=new Promise((function(t){i.deleteService=function(){return t()}}))}return Object.defineProperty(t.prototype,"app",{get:function(){return this.app_},enumerable:!1,configurable:!0}),t.prototype._url=function(t){var e=this.app_.options.projectId,n=this.region_;return null!==this.emulatorOrigin?this.emulatorOrigin+"/"+e+"/"+n+"/"+t:"https://"+n+"-"+e+".cloudfunctions.net/"+t},t.prototype.useFunctionsEmulator=function(t){this.emulatorOrigin=t},t.prototype.httpsCallable=function(t,e){var n=this;return function(r){return n.call(t,r,e||{})}},t.prototype.postJSON=function(t,e,n){return o.__awaiter(this,void 0,void 0,(function(){var r,i;return o.__generator(this,(function(o){switch(o.label){case 0:n.append("Content-Type","application/json"),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,fetch(t,{method:"POST",body:JSON.stringify(e),headers:n})];case 2:return r=o.sent(),[3,4];case 3:return o.sent(),[2,{status:0,json:null}];case 4:i=null,o.label=5;case 5:return o.trys.push([5,7,,8]),[4,r.json()];case 6:return i=o.sent(),[3,8];case 7:return o.sent(),[3,8];case 8:return[2,{status:r.status,json:i}]}}))}))},t.prototype.call=function(t,e,n){return o.__awaiter(this,void 0,void 0,(function(){var r,i,a,c,l,h,f,d,v,y,g;return o.__generator(this,(function(o){switch(o.label){case 0:return r=this._url(t),e=this.serializer.encode(e),i={data:e},a=new Headers,[4,this.contextProvider.getContext()];case 1:return(c=o.sent()).authToken&&a.append("Authorization","Bearer "+c.authToken),c.instanceIdToken&&a.append("Firebase-Instance-ID-Token",c.instanceIdToken),l=n.timeout||7e4,h=function(t){var e,n=new Promise((function(n,r){e=setTimeout((function(){r(new u("deadline-exceeded","deadline-exceeded"))}),t)}));return{timer:e,promise:n}}(l),f=h.timer,d=h.promise,[4,Promise.race([p(f,this.postJSON(r,i,a)),d,p(f,this.cancelAllRequests)])];case 2:if(!(v=o.sent()))throw new u("cancelled","Firebase Functions instance was deleted.");
2if(y=function(t,e,n){var r=function(t){if(t>=200&&t<300)return"ok";switch(t){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}(t),i=r,o=void 0;try{var a=e&&e.error;if(a){var c=a.status;if("string"===typeof c){if(!s[c])return new u("internal","internal");r=s[c],i=c}var l=a.message;"string"===typeof l&&(i=l),void 0!==(o=a.details)&&(o=n.decode(o))}}catch(h){}return"ok"===r?null:new u(r,i,o)}(v.status,v.json,this.serializer))throw y;if(!v.json)throw new u("internal","Response is not valid JSON object.");if("undefined"===typeof(g=v.json.data)&&(g=v.json.result),"undefined"===typeof g)throw new u("internal","Response is missing data field.");return[2,{data:this.serializer.decode(g)}]}}))}))},t}();function p(t,e){return o.__awaiter(this,void 0,void 0,(function(){var n;return o.__generator(this,(function(r){switch(r.label){case 0:return[4,e];case 1:return n=r.sent(),clearTimeout(t),[2,n]}}))}))}function d(t,e){var n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal"),i=t.getProvider("messaging");return new f(n,r,i,e)}!function(t){var e={Functions:f};t.INTERNAL.registerComponent(new a.Component("functions",d,"PUBLIC").setServiceProps(e).setMultipleInstances(!0))}(i),i.registerVersion("@firebase/functions","0.4.48")},function(t,e,n){"use strict";n.r(e);var r,i=n(4),o=n.n(i),a=(n(20),n(7)),s=n(1),u=n(9),c=n(14),l=((r={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',r["only-available-in-window"]="This method is available in a Window context.",r["only-available-in-sw"]="This method is available in a service worker context.",r["permission-default"]="The notification permission was not granted and dismissed instead.",r["permission-blocked"]="The notification permission was not granted and blocked instead.",r["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",r["failed-service-worker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",r["token-subscribe-failed"]="A problem occured while subscribing the user to FCM: {$errorInfo}",r["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",r["token-unsubscribe-failed"]="A problem occured while unsubscribing the user from FCM: {$errorInfo}",r["token-update-failed"]="A problem occured while updating the user from FCM: {$errorInfo}",r["token-update-no-token"]="FCM returned no token when updating the user to push.",r["use-sw-after-get-token"]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",r["invalid-sw-registration"]="The input to useServiceWorker() must be a ServiceWorkerRegistration.",r["invalid-bg-handler"]="The input to setBackgroundMessageHandler() must be a function.",r["invalid-vapid-key"]="The public VAPID key must be a string.",r["use-vapid-key-after-get-token"]="The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used.",r),h=new u.ErrorFactory("messaging","Messaging",l);function f(t){return h.create("missing-app-config-values",{valueName:t})}var p,d="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4";function v(t){var e=new Uint8Array(t);return btoa(String.fromCharCode.apply(String,Object(s.__spread)(e))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function y(t){for(var e=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(e),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}!function(t){t.PUSH_RECEIVED="push-received",t.NOTIFICATION_CLICKED="notification-clicked"}(p||(p={}));function g(t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var e,n,r=this;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return"databases"in indexedDB?[4,indexedDB.databases()]:[3,2];case 1:if(e=i.sent(),!e.map((function(t){return t.name})).includes("fcm_token_details_db"))return[2,null];i.label=2;case 2:return n=null,[4,Object(c.openDb)("fcm_token_details_db",5,(function(e){return Object(s.__awaiter)(r,void 0,void 0,(function(){var r,i,o,a;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return e.oldVersion<2?[2]:e.objectStoreNames.contains("fcm_token_object_Store")?[4,(r=e.transaction.objectStore("fcm_token_object_Store")).index("fcmSenderId").get(t)]:[2];case 1:return i=s.sent(),[4,r.clear()];case 2:if(s.sent(),!i)return[2];if(2===e.oldVersion){if(!(o=i).auth||!o.p256dh||!o.endpoint)return[2];n={token:o.fcmToken,createTime:null!==(a=o.createTime)&&void 0!==a?a:Date.now(),subscriptionOptions:{auth:o.auth,p256dh:o.p256dh,endpoint:o.endpoint,swScope:o.swScope,vapidKey:"string"===typeof o.vapidKey?o.vapidKey:v(o.vapidKey)}}}else(3===e.oldVersion||4===e.oldVersion)&&(n={token:(o=i).fcmToken,createTime:o.createTime,subscriptionOptions:{auth:v(o.auth),p256dh:v(o.p256dh),endpoint:o.endpoint,swScope:o.swScope,vapidKey:v(o.vapidKey)}});return[2]}}
2))}))}))];case 3:return i.sent().close(),[4,Object(c.deleteDb)("fcm_token_details_db")];case 4:return i.sent(),[4,Object(c.deleteDb)("fcm_vapid_details_db")];case 5:return i.sent(),[4,Object(c.deleteDb)("undefined")];case 6:return i.sent(),[2,m(n)?n:null]}}))}))}function m(t){if(!t||!t.subscriptionOptions)return!1;var e=t.subscriptionOptions;return"number"===typeof t.createTime&&t.createTime>0&&"string"===typeof t.token&&t.token.length>0&&"string"===typeof e.auth&&e.auth.length>0&&"string"===typeof e.p256dh&&e.p256dh.length>0&&"string"===typeof e.endpoint&&e.endpoint.length>0&&"string"===typeof e.swScope&&e.swScope.length>0&&"string"===typeof e.vapidKey&&e.vapidKey.length>0}var b="firebase-messaging-store",_=null;function w(){return _||(_=Object(c.openDb)("firebase-messaging-database",1,(function(t){switch(t.oldVersion){case 0:t.createObjectStore(b)}}))),_}function E(t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var e,n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return e=I(t),[4,w()];case 1:return[4,i.sent().transaction(b).objectStore(b).get(e)];case 2:return(n=i.sent())?[2,n]:[3,3];case 3:return[4,g(t.appConfig.senderId)];
2case 4:return(r=i.sent())?[4,T(t,r)]:[3,6];case 5:return i.sent(),[2,r];case 6:return[2]}}))}))}function T(t,e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i;return Object(s.__generator)(this,(function(o){switch(o.label){case 0:return n=I(t),[4,w()];case 1:return r=o.sent(),[4,(i=r.transaction(b,"readwrite")).objectStore(b).put(e,n)];case 2:return o.sent(),[4,i.complete];case 3:return o.sent(),[2,e]}}))}))}function S(t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var e,n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return e=I(t),[4,w()];case 1:return n=i.sent(),[4,(r=n.transaction(b,"readwrite")).objectStore(b).delete(e)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function I(t){return t.appConfig.appId}function C(t,e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,a,u;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return[4,A(t)];case 1:n=s.sent(),r=O(e),i={method:"POST",headers:n,body:JSON.stringify(r)},s.label=2;case 2:return s.trys.push([2,5,,6]),[4,fetch(N(t.appConfig),i)];case 3:return[4,s.sent().json()];case 4:return o=s.sent(),[3,6];case 5:throw a=s.sent(),h.create("token-subscribe-failed",{errorInfo:a});case 6:if(o.error)throw u=o.error.message,h.create("token-subscribe-failed",{errorInfo:u});if(!o.token)throw h.create("token-subscribe-no-token");return[2,o.token]}}))}))}function k(t,e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,a,u;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return[4,A(t)];case 1:n=s.sent(),r=O(e.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)},s.label=2;case 2:return s.trys.push([2,5,,6]),[4,fetch(N(t.appConfig)+"/"+e.token,i)];case 3:return[4,s.sent().json()];case 4:return o=s.sent(),[3,6];case 5:throw a=s.sent(),h.create("token-update-failed",{errorInfo:a});case 6:if(o.error)throw u=o.error.message,h.create("token-update-failed",{errorInfo:u});if(!o.token)throw h.create("token-update-no-token");return[2,o.token]}}))}))}function x(t,e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,a;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return[4,A(t)];case 1:n=s.sent(),r={method:"DELETE",headers:n},s.label=2;case 2:return s.trys.push([2,5,,6]),[4,fetch(N(t.appConfig)+"/"+e,r)];case 3:return[4,s.sent().json()];case 4:if((i=s.sent()).error)throw o=i.error.message,h.create("token-unsubscribe-failed",{errorInfo:o});return[3,6];case 5:throw a=s.sent(),h.create("token-unsubscribe-failed",{errorInfo:a});case 6:return[2]}}
2))}))}function N(t){return"https://fcmregistrations.googleapis.com/v1/projects/"+t.projectId+"/registrations"}function A(t){var e=t.appConfig,n=t.installations;return Object(s.__awaiter)(this,void 0,void 0,(function(){var t;return Object(s.__generator)(this,(function(r){switch(r.label){case 0:return[4,n.getToken()];case 1:return t=r.sent(),[2,new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e.apiKey,"x-goog-firebase-installations-auth":"FIS "+t})]}}))}))}function O(t){var e=t.p256dh,n=t.auth,r=t.endpoint,i=t.vapidKey,o={web:{endpoint:r,auth:n,p256dh:e}};return i!==d&&(o.web.applicationPubKey=i),o}function P(t,e,n){return Object(s.__awaiter)(this,void 0,void 0,(function(){var r,i,o,a;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:if("granted"!==Notification.permission)throw h.create("permission-blocked");return[4,M(e,n)];case 1:return r=s.sent(),[4,E(t)];case 2:return i=s.sent(),o={vapidKey:n,swScope:e.scope,endpoint:r.endpoint,auth:v(r.getKey("auth")),p256dh:v(r.getKey("p256dh"))},i?[3,3]:[2,L(t,o)];case 3:if(function(t,e){var n=e.vapidKey===t.vapidKey,r=e.endpoint===t.endpoint,i=e.auth===t.auth,o=e.p256dh===t.p256dh;return n&&r&&i&&o}(i.subscriptionOptions,o))return[3,8];s.label=4;case 4:return s.trys.push([4,6,,7]),[4,x(t,i.token)];case 5:return s.sent(),[3,7];case 6:return a=s.sent(),console.warn(a),[3,7];case 7:return[2,L(t,o)];case 8:return Date.now()>=i.createTime+6048e5?[2,D({token:i.token,createTime:Date.now(),subscriptionOptions:o},t,e)]:[2,i.token];case 9:return[2]}}
2))}))}function R(t,e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return[4,E(t)];case 1:return(n=i.sent())?[4,x(t,n.token)]:[3,4];case 2:return i.sent(),[4,S(t)];case 3:i.sent(),i.label=4;case 4:return[4,e.pushManager.getSubscription()];case 5:return(r=i.sent())?[2,r.unsubscribe()]:[2,!0]}}))}))}function D(t,e,n){return Object(s.__awaiter)(this,void 0,void 0,(function(){var r,i,o;return Object(s.__generator)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,5]),[4,k(e,t)];case 1:return r=a.sent(),i=Object(s.__assign)(Object(s.__assign)({},t),{token:r,createTime:Date.now()}),[4,T(e,i)];case 2:return a.sent(),[2,r];case 3:return o=a.sent(),[4,R(e,n)];case 4:throw a.sent(),o;case 5:return[2]}}))}))}function L(t,e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return[4,C(t,e)];case 1:return n=i.sent(),r={token:n,createTime:Date.now(),subscriptionOptions:e},[4,T(t,r)];case 2:return i.sent(),[2,r.token]}}))}))}function M(t,e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n;return Object(s.__generator)(this,(function(r){switch(r.label){case 0:return[4,t.pushManager.getSubscription()];case 1:return(n=r.sent())?[2,n]:[2,t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:y(e)})]}}))}))}function j(t){return"object"===typeof t&&!!t&&"google.c.a.c_id"in t}var F=function(){function t(t){var e=this;this.firebaseDependencies=t,this.vapidKey=null,this.onMessageCallback=null,navigator.serviceWorker.addEventListener("message",(function(t){return e.messageEventListener(t)}))}return Object.defineProperty(t.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),t.prototype.getToken=function(){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t;return Object(s.__generator)(this,(function(e){switch(e.label){case 0:return this.vapidKey||(this.vapidKey=d),[4,this.getServiceWorkerRegistration()];case 1:return t=e.sent(),"default"!==Notification.permission?[3,3]:[4,Notification.requestPermission()];case 2:e.sent(),e.label=3;case 3:if("granted"!==Notification.permission)throw h.create("permission-blocked");return[2,P(this.firebaseDependencies,t,this.vapidKey)]}}))}))},t.prototype.deleteToken=function(){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t;return Object(s.__generator)(this,(function(e){switch(e.label){case 0:return[4,this.getServiceWorkerRegistration()];case 1:return t=e.sent(),[2,R(this.firebaseDependencies,t)]}}))}))},t.prototype.requestPermission=function(){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t;return Object(s.__generator)(this,(function(e){switch(e.label){case 0:return"granted"===Notification.permission?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(t=e.sent()))return[2];throw"denied"===t?h.create("permission-blocked"):h.create("permission-default")}}))}))},t.prototype.usePublicVapidKey=function(t){if(null!==this.vapidKey)throw h.create("use-vapid-key-after-get-token");if("string"!==typeof t||0===t.length)throw h.create("invalid-vapid-key");this.vapidKey=t},t.prototype.useServiceWorker=function(t){if(!(t instanceof ServiceWorkerRegistration))throw h.create("invalid-sw-registration");if(this.swRegistration)throw h.create("use-sw-after-get-token");this.swRegistration=t},t.prototype.onMessage=function(t){var e=this;return this.onMessageCallback=t,function(){e.onMessageCallback=null}},t.prototype.setBackgroundMessageHandler=function(){throw h.create("only-available-in-sw")},t.prototype.onTokenRefresh=function(){return function(){}},t.prototype.getServiceWorkerRegistration=function(){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t,e;return Object(s.__generator)(this,(function(n){switch(n.label){case 0:if(this.swRegistration)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),t=this,[4,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"})];case 2:return t.swRegistration=n.sent(),this.swRegistration.update().catch((function(){})),[3,4];case 3:throw e=n.sent(),h.create("failed-service-worker-registration",{browserErrorMessage:e.message});case 4:return[2,this.swRegistration]}}))}))},t.prototype.messageEventListener=function(t){var e;return Object(s.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o;return Object(s.__generator)(this,(function(a){switch(a.label){case 0:return(null===(e=t.data)||void 0===e?void 0:e.firebaseMessaging)?(n=t.data.firebaseMessaging,r=n.type,i=n.payload,this.onMessageCallback&&r===p.PUSH_RECEIVED&&("function"===typeof this.onMessageCallback?this.onMessageCallback(i):this.onMessageCallback.next(i)),j(o=i.data)&&"1"===o["google.c.a.e"]?[4,this.logEvent(r,o)]:[3,2]):[2];case 1:a.sent(),a.label=2;case 2:return[2]}}
2))}))},t.prototype.logEvent=function(t,e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var n;return Object(s.__generator)(this,(function(r){switch(r.label){case 0:return n=function(t){switch(t){case p.NOTIFICATION_CLICKED:return"notification_open";case p.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}(t),[4,this.firebaseDependencies.analyticsProvider.get()];case 1:return r.sent().logEvent(n,{message_id:e["google.c.a.c_id"],message_name:e["google.c.a.c_l"],message_time:e["google.c.a.ts"],message_device_time:Math.floor(Date.now()/1e3)}),[2]}}))}))},t}();var U=function(){function t(t){var e=this;this.firebaseDependencies=t,this.vapidKey=null,this.bgMessageHandler=null,self.addEventListener("push",(function(t){t.waitUntil(e.onPush(t))})),self.addEventListener("pushsubscriptionchange",(function(t){t.waitUntil(e.onSubChange(t))})),self.addEventListener("notificationclick",(function(t){t.waitUntil(e.onNotificationClick(t))}))}return Object.defineProperty(t.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),t.prototype.setBackgroundMessageHandler=function(t){if(!t||"function"!==typeof t)throw h.create("invalid-bg-handler");this.bgMessageHandler=t},t.prototype.getToken=function(){var t,e;return Object(s.__awaiter)(this,void 0,void 0,(function(){var n;return Object(s.__generator)(this,(function(r){switch(r.label){case 0:return this.vapidKey?[3,2]:[4,E(this.firebaseDependencies)];case 1:n=r.sent(),this.vapidKey=null!==(e=null===(t=null===n||void 0===n?void 0:n.subscriptionOptions)||void 0===t?void 0:t.vapidKey)&&void 0!==e?e:d,r.label=2;case 2:return[2,P(this.firebaseDependencies,self.registration,this.vapidKey)]}}))}))},t.prototype.deleteToken=function(){return R(this.firebaseDependencies,self.registration)},t.prototype.requestPermission=function(){throw h.create("only-available-in-window")},t.prototype.usePublicVapidKey=function(t){if(null!==this.vapidKey)throw h.create("use-vapid-key-after-get-token");if("string"!==typeof t||0===t.length)throw h.create("invalid-vapid-key");this.vapidKey=t},t.prototype.useServiceWorker=function(){throw h.create("only-available-in-window")},t.prototype.onMessage=function(){throw h.create("only-available-in-window")},t.prototype.onTokenRefresh=function(){throw h.create("only-available-in-window")},t.prototype.onPush=function(t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var e,n,r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return(e=function(t){var e=t.data;if(!e)return null;try{return e.json()}catch(n){return null}}(t))?[4,B()]:[2];case 1:return function(t){return t.some((function(t){return"visible"===t.visibilityState&&!t.url.startsWith("chrome-extension://")}))}(n=i.sent())?[2,q(n,e)]:(r=function(t){var e;if(!t||"object"!==typeof t.notification)return;var n=Object(s.__assign)({},t.notification);return n.data=Object(s.__assign)(Object(s.__assign)({},t.notification.data),((e={}).FCM_MSG=t,e)),n}(e))?[4,W(r)]:[3,3];case 2:return i.sent(),[3,5];case 3:return this.bgMessageHandler?[4,this.bgMessageHandler(e)]:[3,5];case 4:i.sent(),i.label=5;case 5:return[2]}}
2))}))},t.prototype.onSubChange=function(t){var e,n;return Object(s.__awaiter)(this,void 0,void 0,(function(){var r;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return t.newSubscription?[3,2]:[4,R(this.firebaseDependencies,self.registration)];case 1:return i.sent(),[2];case 2:return[4,E(this.firebaseDependencies)];case 3:return r=i.sent(),[4,R(this.firebaseDependencies,self.registration)];case 4:return i.sent(),[4,P(this.firebaseDependencies,self.registration,null!==(n=null===(e=null===r||void 0===r?void 0:r.subscriptionOptions)||void 0===e?void 0:e.vapidKey)&&void 0!==n?n:d)];case 5:return i.sent(),[2]}}))}))},t.prototype.onNotificationClick=function(t){var e,n;return Object(s.__awaiter)(this,void 0,void 0,(function(){var r,i,o,a;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return(r=null===(n=null===(e=t.notification)||void 0===e?void 0:e.data)||void 0===n?void 0:n.FCM_MSG)?t.action?[2]:(t.stopImmediatePropagation(),t.notification.close(),(i=function(t){var e,n,r,i=null!==(n=null===(e=t.fcmOptions)||void 0===e?void 0:e.link)&&void 0!==n?n:null===(r=t.notification)||void 0===r?void 0:r.click_action;if(i)return i;return j(t.data)?self.location.origin:null}(r))?[4,V(i)]:[2]):[2];case 1:return(o=s.sent())?[3,4]:[4,self.clients.openWindow(i)];case 2:return o=s.sent(),[4,(u=3e3,new Promise((function(t){setTimeout(t,u)})))];case 3:return s.sent(),[3,6];case 4:return[4,o.focus()];case 5:o=s.sent(),s.label=6;case 6:return o?(a=z(p.NOTIFICATION_CLICKED,r),[2,o.postMessage(a)]):[2]}var u}))}))},t}();function V(t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var e,n,r,i,o,a,u;return Object(s.__generator)(this,(function(c){switch(c.label){case 0:return e=new URL(t,self.location.href),[4,B()];case 1:n=c.sent();try{for(r=Object(s.__values)(n),i=r.next();!i.done;i=r.next())if(o=i.value,new URL(o.url,self.location.href).host===e.host)return[2,o]}catch(l){a={error:l}}finally{try{i&&!i.done&&(u=r.return)&&u.call(r)}finally{if(a)throw a.error}}return[2,null]}}))}))}function q(t,e){var n,r,i=z(p.PUSH_RECEIVED,e);try{for(var o=Object(s.__values)(t),a=o.next();!a.done;a=o.next()){a.value.postMessage(i)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}function B(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function z(t,e){return{firebaseMessaging:{type:t,payload:e}}}function W(t){var e,n=null!==(e=t.title)&&void 0!==e?e:"",r=t.actions,i=Notification.maxActions;return r&&i&&r.length>i&&console.warn("This browser only supports "+i+" actions. The remaining actions will not be displayed."),self.registration.showNotification(n,t)}var H={isSupported:K};function K(){return self&&"ServiceWorkerGlobalScope"in self?"indexedDB"in self&&null!==indexedDB&&"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"):"indexedDB"in window&&null!==indexedDB&&navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}o.a.INTERNAL.registerComponent(new a.Component("messaging",(function(t){var e=t.getProvider("app").getImmediate(),n={app:e,appConfig:function(t){var e,n;if(!t||!t.options)throw f("App Configuration Object");if(!t.name)throw f("App Name");var r=t.options;try{for(var i=Object(s.__values)(["projectId","apiKey","appId","messagingSenderId"]),o=i.next();!o.done;o=i.next()){var a=o.value;if(!r[a])throw f(a)}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return{appName:t.name,projectId:r.projectId,apiKey:r.apiKey,appId:r.appId,senderId:r.messagingSenderId}}(e),installations:t.getProvider("installations").getImmediate(),analyticsProvider:t.getProvider("analytics-internal")};if(!K())throw h.create("unsupported-browser");return self&&"ServiceWorkerGlobalScope"in self?new U(n):new F(n)}),"PUBLIC").setServiceProps(H))},function(t,e,n){"use strict";n.r(e),n.d(e,"registerStorage",(function(){return de}));var r=n(4),i=n.n(r),o=n(1),a=n(7),s=function(){function t(t,e){this.co
2de_=C(t),this.message_="Firebase Storage: "+e,this.serverResponse_=null,this.name_="FirebaseError"}return t.prototype.codeProp=function(){return this.code},t.prototype.codeEquals=function(t){return C(t)===this.codeProp()},t.prototype.serverResponseProp=function(){return this.serverResponse_},t.prototype.setServerResponseProp=function(t){this.serverResponse_=t},Object.defineProperty(t.prototype,"name",{get:function(){return this.name_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"code",{get:function(){return this.code_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this.message_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"serverResponse",{get:function(){return this.serverResponse_},enumerable:!1,configurable:!0}),t}(),u="unknown",c="object-not-found",l="quota-exceeded",h="unauthenticated",f="unauthorized",p="retry-limit-exceeded",d="canceled",v="invalid-url",y="invalid-default-bucket",g="cannot-slice-blob",m="server-file-wrong-size",b="no-download-url",_="invalid-argument",w="invalid-argument-count",E="app-deleted",T="invalid-root-operation",S="invalid-format",I="internal-error";function C(t){return"storage/"+t}function k(){return new s(u,"An unknown error occurred, please check the error payload for server response.")}function x(){return new s(d,"User canceled the upload/download.")}function N(){return new s(g,"Cannot slice blob for upload. Please retry the upload.")}function A(){return new s(b,"The given file does not have any download URLs.")}function O(t,e,n){return new s(_,"Invalid argument in `"+e+"` at index "+t+": "+n)}function P(){return new s(E,"The Firebase app was deleted.")}function R(t,e){return new s(S,"String does not match format '"+t+"': "+e)}function D(t){throw new s(I,"Internal error: "+t)}var L={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};function M(t){switch(t){case L.RAW:case L.BASE64:case L.BASE64URL:case L.DATA_URL:return;default:throw"Expected one of the event types: ["+L.RAW+", "+L.BASE64+", "+L.BASE64URL+", "+L.DATA_URL+"]."}}var j=function(t,e){this.data=t,this.contentType=e||null};function F(t,e){switch(t){case L.RAW:return new j(U(e));case L.BASE64:case L.BASE64URL:return new j(V(t,e));case L.DATA_URL:return new j(function(t){var e=new q(t);return e.base64?V(L.BASE64,e.rest):function(t){var e;try{e=decodeURIComponent(t)}catch(n){throw R(L.DATA_URL,"Malformed data URL.")}return U(e)}(e.rest)}(e),new q(e).contentType)}throw k()}function U(t){for(var e=[],n=0;n<t.length;n++){var r=t.charCodeAt(n);if(r<=127)e.push(r);else if(r<=2047)e.push(192|r>>6,128|63&r);else if(55296===(64512&r))if(n<t.length-1&&56320===(64512&t.charCodeAt(n+1)))r=65536|(1023&r)<<10|1023&t.charCodeAt(++n),e.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r);else e.push(239,191,189);else 56320===(64512&r)?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(e)}function V(t,e){switch(t){case L.BASE64:var n=-1!==e.indexOf("-"),r=-1!==e.indexOf("_");if(n||r)throw R(t,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break;case L.BASE64URL:var i=-1!==e.indexOf("+"),o=-1!==e.indexOf("/");if(i||o)throw R(t,"Invalid character '"+(i?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/")}var a;try{a=atob(e)}catch(c){throw R(t,"Invalid character found")}for(var s=new Uint8Array(a.length),u=0;u<a.length;u++)s[u]=a.charCodeAt(u);return s}var q=function(t){this.base64=!1,this.contentType=null;var e=t.match(/^data:([^,]+)?,/);if(null===e)throw R(L.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");var n=e[1]||null;null!=n&&(this.base64=(r=n,i=";base64",r.length>=i.length&&r.substring(r.length-i.length)===i),this.contentType=this.base64?n.substring(0,n.length-";base64".length):n),this.rest=t.substring(t.indexOf(",")+1);var r,i};var B,z={STATE_CHANGED:"state_changed"},W="running",H="pausing",K="paused",G="success",Q="canceling",$="canceled",X="error",Y={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function J(t){switch(t){case W:case H:case Q:return Y.RUNNING;case K:return Y.PAUSED;case G:return Y.SUCCESS;case $:return Y.CANCELED;case X:default:return Y.ERROR}}function Z(t){return null!=t}function tt(t){return void 0!==t}function et(t){return"function"===typeof t}function nt(t){return"object"===typeof t}function rt(t){return nt(t)&&null!==t}function it(t){return"string"===typeof t||t instanceof String}function ot(t){return at(t)&&Number.isInteger(t)}function at(t){return"number"===typeof t||t instanceof Number}function st(t){return ut()&&t instanceof Blob}function ut(){return"undefined"!==typeof Blob}
2!function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"}(B||(B={}));var ct=function(){function t(){var t=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=B.NO_ERROR,this.sendPromise_=new Promise((function(e){t.xhr_.addEventListener("abort",(function(){t.errorCode_=B.ABORT,e(t)})),t.xhr_.addEventListener("error",(function(){t.errorCode_=B.NETWORK_ERROR,e(t)})),t.xhr_.addEventListener("load",(function(){e(t)}))}))}return t.prototype.send=function(t,e,n,r){if(this.sent_)throw D("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(e,t,!0),Z(r))for(var i in r)r.hasOwnProperty(i)&&this.xhr_.setRequestHeader(i,r[i].toString());return Z(n)?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_},t.prototype.getErrorCode=function(){if(!this.sent_)throw D("cannot .getErrorCode() before sending");return this.errorCode_},t.prototype.getStatus=function(){if(!this.sent_)throw D("cannot .getStatus() before sending");try{return this.xhr_.status}catch(t){return-1}},t.prototype.getResponseText=function(){if(!this.sent_)throw D("cannot .getResponseText() before sending");return this.xhr_.responseText},t.prototype.abort=function(){this.xhr_.abort()},t.prototype.getResponseHeader=function(t){return this.xhr_.getResponseHeader(t)},t.prototype.addUploadProgressListener=function(t){Z(this.xhr_.upload)&&this.xhr_.upload.addEventListener("progress",t)},t.prototype.removeUploadProgressListener=function(t){Z(this.xhr_.upload)&&this.xhr_.upload.removeEventListener("progress",t)},t}(),lt=function(){function t(){}return t.prototype.createXhrIo=function(){return new ct},t}();function ht(){return"undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function ft(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ht();if(void 0!==n){for(var r=new n,i=0;i<t.length;i++)r.append(t[i]);return r.getBlob()}if(ut())return new Blob(t);throw Error("This browser doesn't seem to support creating Blobs")}var pt=function(){function t(t,e){var n=0,r="";st(t)?(this.data_=t,n=t.size,r=t.type):t instanceof ArrayBuffer?(e?this.data_=new Uint8Array(t):(this.data_=new Uint8Array(t.byteLength),this.data_.set(new Uint8Array(t))),n=this.data_.length):t instanceof Uint8Array&&(e?this.data_=t:(this.data_=new Uint8Array(t.length),this.data_.set(t)),n=t.length),this.size_=n,this.type_=r}return t.prototype.size=function(){return this.size_},t.prototype.type=function(){return this.type_},t.prototype.slice=function(e,n){if(st(this.data_)){var r=function(t,e,n){return t.webkitSlice?t.webkitSlice(e,n):t.mozSlice?t.mozSlice(e,n):t.slice?t.slice(e,n):null}(this.data_,e,n);return null===r?null:new t(r)}return new t(new Uint8Array(this.data_.buffer,e,n-e),!0)},t.getBlob=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(ut()){var r=e.map((function(e){return e instanceof t?e.data_:e}));return new t(ft.apply(null,r))}var i=e.map((function(t){return it(t)?F(L.RAW,t).data:t.data_})),o=0;i.forEach((function(t){o+=t.byteLength}));var a=new Uint8Array(o),s=0;return i.forEach((function(t){for(var e=0;e<t.length;e++)a[s++]=t[e]})),new t(a,!0)},t.prototype.uploadData=function(){return this.data_},t}(),dt=function(){function t(t,e){this.bucket=t,this.path_=e}return Object.defineProperty(t.prototype,"path",{get:function(){return this.path_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRoot",{get:function(){return 0===this.path.length},enumerable:!1,configurable:!0}),t.prototype.fullServerUrl=function(){var t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)},t.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},t.makeFromBucketSpec=function(e){var n;try{n=t.makeFromUrl(e)}catch(r){return new t(e,"")}if(""===n.path)return n;throw new s(y,"Invalid default bucket '"+e+"'.")},t.makeFromUrl=function(e){var n=null;var r=new RegExp("^gs://([A-Za-z0-9.\\-_]+)(/(.*))?$","i");function i(t){t.path_=decodeURIComponent(t.path)}for(var o="firebasestorage.googleapis.com".replace(/[.]/g,"\\."),a=[{regex:r,
2indices:{bucket:1,path:3},postModify:function(t){"/"===t.path.charAt(t.path.length-1)&&(t.path_=t.path_.slice(0,-1))}},{regex:new RegExp("^https?://"+o+"/v[A-Za-z0-9_]+/b/([A-Za-z0-9.\\-_]+)/o(/([^?#]*).*)?$","i"),indices:{bucket:1,path:3},postModify:i},{regex:new RegExp("^https?://(?:storage.googleapis.com|storage.cloud.google.com)/([A-Za-z0-9.\\-_]+)/([^?#]*)","i"),indices:{bucket:1,path:2},postModify:i}],u=0;u<a.length;u++){var c=a[u],l=c.regex.exec(e);if(l){var h=l[c.indices.bucket],f=l[c.indices.path];f||(f=""),n=new t(h,f),c.postModify(n);break}}if(null==n)throw function(t){return new s(v,"Invalid URL '"+t+"'.")}(e);return n},t}();function vt(t){var e,n;try{e=JSON.parse(t)}catch(r){return null}return nt(n=e)&&!Array.isArray(n)?e:null}function yt(t,e){var n=e.split("/").filter((function(t){return t.length>0})).join("/");return 0===t.length?n:t+"/"+n}function gt(t){var e=t.lastIndexOf("/",t.length-2);return-1===e?t:t.slice(e+1)}function mt(t){return"https://firebasestorage.googleapis.com/v0"+t}function bt(t){var e=encodeURIComponent,n="?";for(var r in t){if(t.hasOwnProperty(r))n=n+(e(r)+"="+e(t[r]))+"&"}return n=n.slice(0,-1)}function _t(t,e){return e}var wt=function(t,e,n,r){this.server=t,this.local=e||t,this.writable=!!n,this.xform=r||_t},Et=null;function Tt(){if(Et)return Et;var t=[];t.push(new wt("bucket")),t.push(new wt("generation")),t.push(new wt("metageneration")),t.push(new wt("name","fullPath",!0));var e=new wt("name");e.xform=function(t,e){return function(t){return!it(t)||t.length<2?t:gt(t)}(e)},t.push(e);var n=new wt("size");return n.xform=function(t,e){return Z(e)?Number(e):e},t.push(n),t.push(new wt("timeCreated")),t.push(new wt("updated")),t.push(new wt("md5Hash",null,!0)),t.push(new wt("cacheControl",null,!0)),t.push(new wt("contentDisposition",null,!0)),t.push(new wt("contentEncoding",null,!0)),t.push(new wt("contentLanguage",null,!0)),t.push(new wt("contentType",null,!0)),t.push(new wt("metadata","customMetadata",!0)),Et=t}function St(t,e,n){for(var r={type:"file"},i=n.length,o=0;o<i;o++){var a=n[o];r[a.local]=a.xform(r,e[a.server])}return function(t,e){Object.defineProperty(t,"ref",{get:function(){var n=t.bucket,r=t.fullPath,i=new dt(n,r);return e.makeStorageReference(i)}})}(r,t),r}function It(t,e,n){var r=vt(e);return null===r?null:St(t,r,n)}function Ct(t,e){for(var n={},r=e.length,i=0;i<r;i++){var o=e[i];o.writable&&(n[o.server]=t[o.local])}return JSON.stringify(n)}function kt(t){if(!nt(t)||!t)throw"Expected Metadata object.";for(var e in t)if(t.hasOwnProperty(e)){var n=t[e];if("customMetadata"===e){if(!nt(n))throw"Expected object for 'customMetadata' mapping."}else if(rt(n))throw"Mapping for '"+e+"' cannot be an object."}}function xt(t,e,n){var r=vt(n);return null===r?null:function(t,e,n){var r={prefixes:[],items:[],nextPageToken:n.nextPageToken};if(n.prefixes)for(var i=0,o=n.prefixes;i<o.length;i++){var a=o[i].replace(/\/$/,""),s=t.makeStorageReference(new dt(e,a));r.prefixes.push(s)}if(n.items)for(var u=0,c=n.items;u<c.length;u++){var l=c[u];s=t.makeStorageReference(new dt(e,l.name));r.items.push(s)}return r}(t,e,r)}function Nt(t){if(!nt(t)||!t)throw"Expected ListOptions object.";for(var e in t)if("maxResults"===e){if(!ot(t.maxResults)||t.maxResults<=0)throw"Expected maxResults to be a positive number.";if(t.maxResults>1e3)throw"Expected maxResults to be less than or equal to 1000."}else{if("pageToken"!==e)throw"Unknown option: "+e;if(t.pageToken&&!it(t.pageToken))throw"Expected pageToken to be string."}}var At=function(t,e,n,r){this.url=t,this.method=e,this.handler=n,this.timeout=r,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]};function Ot(t){if(!t)throw k()}function Pt(t,e){return function(n,r){var i=It(t,r,e);return Ot(null!==i),i}}function Rt(t,e){return function(n,r){var i=It(t,r,e);return Ot(null!==i),function(t,e){var n=vt(e);if(null===n)return null;if(!it(n.downloadTokens))return null;var r=n.downloadTokens;if(0===r.length)return null;var i=encodeURIComponent;return r.split(",").map((function(e){var n=t.bucket,r=t.fullPath;return mt("/b/"+i(n)+"/o/"+i(r))+bt({alt:"media",token:e})}))[0]}(i,r)}}function Dt(t){return function(e,n){var r,i,o;return 401===e.getStatus()?r=new s(h,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===e.getStatus()?(o=t.bucket,r=new s(l,"Quota for bucket '"+o+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===e.getStatus()?(i=t.path,r=new s(f,"User does not have permission to access '"+i+"'.")):r=n,r.setServerResponseProp(n.serverResponseProp()),r}}function Lt(t){var e=Dt(t);return function(n,r){var i,o=e(n,r);
2return 404===n.getStatus()&&(i=t.path,o=new s(c,"Object '"+i+"' does not exist.")),o.setServerResponseProp(r.serverResponseProp()),o}}function Mt(t,e,n){var r=mt(e.fullServerUrl()),i=t.maxOperationRetryTime(),o=new At(r,"GET",Pt(t,n),i);return o.errorHandler=Lt(e),o}function jt(t,e,n,r,i){var o={};e.isRoot?o.prefix="":o.prefix=e.path+"/",n&&n.length>0&&(o.delimiter=n),r&&(o.pageToken=r),i&&(o.maxResults=i);var a=mt(e.bucketOnlyServerUrl()),s=t.maxOperationRetryTime(),u=new At(a,"GET",function(t,e){return function(n,r){var i=xt(t,e,r);return Ot(null!==i),i}}(t,e.bucket),s);return u.urlParams=o,u.errorHandler=Dt(e),u}function Ft(t,e,n){var r=mt(e.fullServerUrl()),i=t.maxOperationRetryTime(),o=new At(r,"GET",Rt(t,n),i);return o.errorHandler=Lt(e),o}function Ut(t,e,n,r){var i=mt(e.fullServerUrl()),o=Ct(n,r),a=t.maxOperationRetryTime(),s=new At(i,"PATCH",Pt(t,r),a);return s.headers={"Content-Type":"application/json; charset=utf-8"},s.body=o,s.errorHandler=Lt(e),s}function Vt(t,e){var n=mt(e.fullServerUrl()),r=t.maxOperationRetryTime();var i=new At(n,"DELETE",(function(t,e){}),r);return i.successCodes=[200,204],i.errorHandler=Lt(e),i}function qt(t,e,n){var r=Object.assign({},n);return r.fullPath=t.path,r.size=e.size(),r.contentType||(r.contentType=function(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}(null,e)),r}var Bt=function(t,e,n,r){this.current=t,this.total=e,this.finalized=!!n,this.metadata=r||null};function zt(t,e){var n=null;try{n=t.getResponseHeader("X-Goog-Upload-Status")}catch(r){Ot(!1)}return Ot(!!n&&-1!==(e||["active"]).indexOf(n)),n}function Wt(t,e,n,r,i,o,a,u){var c=new Bt(0,0);if(a?(c.current=a.current,c.total=a.total):(c.current=0,c.total=r.size()),r.size()!==c.total)throw new s(m,"Server recorded incorrect upload file size, please retry the upload.");var l=c.total-c.current,h=l;i>0&&(h=Math.min(h,i));var f=c.current,p=f+h,d={"X-Goog-Upload-Command":h===l?"upload, finalize":"upload","X-Goog-Upload-Offset":c.current},v=r.slice(f,p);if(null===v)throw N();var y=e.maxUploadRetryTime(),g=new At(n,"POST",(function(t,n){var i,a=zt(t,["active","final"]),s=c.current+h,u=r.size();return i="final"===a?Pt(e,o)(t,n):null,new Bt(s,u,"final"===a,i)}),y);return g.headers=d,g.body=v.uploadData(),g.progressCallback=u||null,g.errorHandler=Dt(t),g}var Ht=function(t,e,n){if(et(t)||Z(e)||Z(n))this.next=t,this.error=e||null,this.complete=n||null;else{var r=t;this.next=r.next||null,this.error=r.error||null,this.complete=r.complete||null}},Kt=function(t,e,n,r,i,o){this.bytesTransferred=t,this.totalBytes=e,this.state=n,this.metadata=r,this.task=i,this.ref=o};function Gt(t,e,n){for(var r=e.length,i=e.length,o=0;o<e.length;o++)if(e[o].optional){r=o;break}if(!(r<=n.length&&n.length<=i))throw function(t,e,n,r){var i,o;return t===e?(i=t,o=1===t?"argument":"arguments"):(i="between "+t+" and "+e,o="arguments"),new s(w,"Invalid argument count in `"+n+"`: Expected "+i+" "+o+", received "+r+".")}(r,i,t,n.length);for(o=0;o<n.length;o++)try{e[o].validator(n[o])}catch(a){throw a instanceof Error?O(o,t,a.message):O(o,t,a)}}var Qt=function(t,e){var n=this;this.validator=function(e){n.optional&&!tt(e)||t(e)},this.optional=!!e};function $t(t,e){function n(t){if(!it(t))throw"Expected string."}var r,i,o;return t?(i=n,o=t,r=function(t){i(t),o(t)}):r=n,new Qt(r,e)}function Xt(){return new Qt((function(t){if(!(t instanceof Uint8Array||t instanceof ArrayBuffer||ut()&&t instanceof Blob))throw"Expected Blob or File."}))}function Yt(t){return new Qt(kt,t)}function Jt(t){return new Qt(Nt,t)}function Zt(){return new Qt((function(t){if(!(at(t)&&t>=0))throw"Expected a number 0 or greater."}))}function te(t,e){return new Qt((function(e){if(!(null===e||Z(e)&&e instanceof Object))throw"Expected an Object.";void 0!==t&&null!==t&&t(e)}),e)}function ee(t){return new Qt((function(t){if(!(null===t||et(t)))throw"Expected a Function."}),t)}function ne(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];Promise.resolve().then((function(){return t.apply(void 0,e)}))}}var re=function(){function t(t,e,n,r,i,o){var a=this;void 0===o&&(o=null),this.transferred_=0,this.needToFetchStatus_=!1,this.needToFetchMetadata_=!1,this.observers_=[],this.error_=null,this.uploadUrl_=null,this.request_=null,this.chunkMultiplier_=1,this.resolve_=null,this.reject_=null,this.ref_=t,this.authWrapper_=e,this.location_=n,this.blob_=i,this.metadata_=o,this.mappings_=r,this.resumable_=this.shouldDoResumable_(this.blob_),this.state_=W,this.errorHandler_=function(t){a.request_=null,a.chunkMultiplier_=1,t.codeEquals(d)?(a.needToFetchStatus_=!0,a.completeTransitions_()):(a.error_=t,a.transition_(X))},this.metadataErrorHandler_=function(t){a.request_=null,t.codeEquals(d)?a.completeTransitions_():(a.error_=t,a.transition_(X))},this.promise_=new Promise((function(t,e){a.resolve_=t,a.reject_=e,a.start_()}
2)),this.promise_.then(null,(function(){}))}return t.prototype.makeProgressCallback_=function(){var t=this,e=this.transferred_;return function(n){return t.updateProgress_(e+n)}},t.prototype.shouldDoResumable_=function(t){return t.size()>262144},t.prototype.start_=function(){this.state_===W&&null===this.request_&&(this.resumable_?null===this.uploadUrl_?this.createResumable_():this.needToFetchStatus_?this.fetchStatus_():this.needToFetchMetadata_?this.fetchMetadata_():this.continueUpload_():this.oneShotUpload_())},t.prototype.resolveToken_=function(t){var e=this;this.authWrapper_.getAuthToken().then((function(n){switch(e.state_){case W:t(n);break;case Q:e.transition_($);break;case H:e.transition_(K)}}))},t.prototype.createResumable_=function(){var t=this;this.resolveToken_((function(e){var n=function(t,e,n,r,i){var o=e.bucketOnlyServerUrl(),a=qt(e,r,i),s={name:a.fullPath},u=mt(o),c={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":r.size(),"X-Goog-Upload-Header-Content-Type":a.contentType,"Content-Type":"application/json; charset=utf-8"},l=Ct(a,n),h=t.maxUploadRetryTime(),f=new At(u,"POST",(function(t){var e;zt(t);try{e=t.getResponseHeader("X-Goog-Upload-URL")}catch(n){Ot(!1)}return Ot(it(e)),e}),h);return f.urlParams=s,f.headers=c,f.body=l,f.errorHandler=Dt(e),f}(t.authWrapper_,t.location_,t.mappings_,t.blob_,t.metadata_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then((function(e){t.request_=null,t.uploadUrl_=e,t.needToFetchStatus_=!1,t.completeTransitions_()}),t.errorHandler_)}))},t.prototype.fetchStatus_=function(){var t=this,e=this.uploadUrl_;this.resolveToken_((function(n){var r=function(t,e,n,r){var i=t.maxUploadRetryTime(),o=new At(n,"POST",(function(t){var e=zt(t,["active","final"]),n=null;try{n=t.getResponseHeader("X-Goog-Upload-Size-Received")}catch(o){Ot(!1)}n||Ot(!1);var i=Number(n);return Ot(!isNaN(i)),new Bt(i,r.size(),"final"===e)}),i);return o.headers={"X-Goog-Upload-Command":"query"},o.errorHandler=Dt(e),o}(t.authWrapper_,t.location_,e,t.blob_),i=t.authWrapper_.makeRequest(r,n);t.request_=i,i.getPromise().then((function(e){e=e,t.request_=null,t.updateProgress_(e.current),t.needToFetchStatus_=!1,e.finalized&&(t.needToFetchMetadata_=!0),t.completeTransitions_()}),t.errorHandler_)}))},t.prototype.continueUpload_=function(){var t=this,e=262144*this.chunkMultiplier_,n=new Bt(this.transferred_,this.blob_.size()),r=this.uploadUrl_;this.resolveToken_((function(i){var o;try{o=Wt(t.location_,t.authWrapper_,r,t.blob_,e,t.mappings_,n,t.makeProgressCallback_())}catch(s){return t.error_=s,void t.transition_(X)}var a=t.authWrapper_.makeRequest(o,i);t.request_=a,a.getPromise().then((function(e){t.increaseMultiplier_(),t.request_=null,t.updateProgress_(e.current),e.finalized?(t.metadata_=e.metadata,t.transition_(G)):t.completeTransitions_()}),t.errorHandler_)}))},t.prototype.increaseMultiplier_=function(){262144*this.chunkMultiplier_<33554432&&(this.chunkMultiplier_*=2)},t.prototype.fetchMetadata_=function(){var t=this;this.resolveToken_((function(e){var n=Mt(t.authWrapper_,t.location_,t.mappings_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then((function(e){t.request_=null,t.metadata_=e,t.transition_(G)}),t.metadataErrorHandler_)}))},t.prototype.oneShotUpload_=function(){var t=this;this.resolveToken_((function(e){var n=function(t,e,n,r,i){var o=e.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"},s=function(){for(var t="",e=0;e<2;e++)t+=Math.random().toString().slice(2);return t}();a["Content-Type"]="multipart/related; boundary="+s;var u=qt(e,r,i),c="--"+s+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+Ct(u,n)+"\r\n--"+s+"\r\nContent-Type: "+u.contentType+"\r\n\r\n",l="\r\n--"+s+"--",h=pt.getBlob(c,r,l);if(null===h)throw N();var f={name:u.fullPath},p=mt(o),d=t.maxUploadRetryTime(),v=new At(p,"POST",Pt(t,n),d);return v.urlParams=f,v.headers=a,v.body=h.uploadData(),v.errorHandler=Dt(e),v}(t.authWrapper_,t.location_,t.mappings_,t.blob_,t.metadata_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then((function(e){t.request_=null,t.metadata_=e,t.updateProgress_(t.blob_.size()),t.transition_(G)}),t.errorHandler_)}))},t.prototype.updateProgress_=function(t){var e=this.transferred_;this.transferred_=t,this.transferred_!==e&&this.notifyObservers_()},t.prototype.transition_=function(t){if(this.state_!==t)switch(t){case Q:case H:this.state_=t,null!==this.request_&&this.request_.cancel();break;case W:var e=this.state_===K;this.state_=t,e&&(this.notifyObservers_(),this.start_());break;case K:this.state_=t,this.notifyObservers_();break;case $:this.error_=x(),this.state_=t,this.notifyObservers_();break;case X:case G:this.state_=t,this.notifyObservers_()}},t.prototype.completeTransitions_=function(){switch(this.state_){case H:this.transition_(K);break;case Q:this.transition_($);break;case W:this.start_()}},Object.defineProperty(t.prototype,"snapshot",{get:function(){var t=J(this.state_);return new Kt(this.transferred_,this.blob_.size(),t,this.metadata_,this,this.ref_)}
2,enumerable:!1,configurable:!0}),t.prototype.on=function(t,e,n,r){function i(){if(t!==z.STATE_CHANGED)throw"Expected one of the event types: ["+z.STATE_CHANGED+"]."}var o="Expected a function or an Object with one of `next`, `error`, `complete` properties.",a=ee(!0).validator,s=te(null,!0).validator;function u(t){try{return void a(t)}catch(e){}try{if(s(t),!(tt(t.next)||tt(t.error)||tt(t.complete)))throw"";return}catch(e){throw o}}var c=[$t(i),te(u,!0),ee(!0),ee(!0)];Gt("on",c,arguments);var l=this;function h(t){return function(e,n,i){null!==t&&Gt("on",t,arguments);var o=new Ht(e,n,r);return l.addObserver_(o),function(){l.removeObserver_(o)}}}function f(t){if(null===t)throw o;u(t)}var p=[te(f),ee(!0),ee(!0)],d=!(tt(e)||tt(n)||tt(r));return d?h(p):h(null)(e,n,r)},t.prototype.then=function(t,e){return this.promise_.then(t,e)},t.prototype.catch=function(t){return this.then(null,t)},t.prototype.addObserver_=function(t){this.observers_.push(t),this.notifyObserver_(t)},t.prototype.removeObserver_=function(t){var e=this.observers_.indexOf(t);-1!==e&&this.observers_.splice(e,1)},t.prototype.notifyObservers_=function(){var t=this;this.finishPromise_(),this.observers_.slice().forEach((function(e){t.notifyObserver_(e)}))},t.prototype.finishPromise_=function(){if(null!==this.resolve_){var t=!0;switch(J(this.state_)){case Y.SUCCESS:ne(this.resolve_.bind(null,this.snapshot))();break;case Y.CANCELED:case Y.ERROR:ne(this.reject_.bind(null,this.error_))();break;default:t=!1}t&&(this.resolve_=null,this.reject_=null)}},t.prototype.notifyObserver_=function(t){switch(J(this.state_)){case Y.RUNNING:case Y.PAUSED:t.next&&ne(t.next.bind(t,this.snapshot))();break;case Y.SUCCESS:t.complete&&ne(t.complete.bind(t))();break;case Y.CANCELED:case Y.ERROR:t.error&&ne(t.error.bind(t,this.error_))();break;default:t.error&&ne(t.error.bind(t,this.error_))()}},t.prototype.resume=function(){Gt("resume",[],arguments);var t=this.state_===K||this.state_===H;return t&&this.transition_(W),t},t.prototype.pause=function(){Gt("pause",[],arguments);var t=this.state_===W;return t&&this.transition_(H),t},t.prototype.cancel=function(){Gt("cancel",[],arguments);var t=this.state_===W||this.state_===H;return t&&this.transition_(Q),t},t}(),ie=function(){function t(t,e){this.authWrapper=t,this.location=e instanceof dt?e:dt.makeFromUrl(e)}return t.prototype.toString=function(){return Gt("toString",[],arguments),"gs://"+this.location.bucket+"/"+this.location.path},t.prototype.newRef=function(e,n){return new t(e,n)},t.prototype.mappings=function(){return Tt()},t.prototype.child=function(t){Gt("child",[$t()],arguments);var e=yt(this.location.path,t),n=new dt(this.location.bucket,e);return this.newRef(this.authWrapper,n)},Object.defineProperty(t.prototype,"parent",{get:function(){var t=function(t){if(0===t.length)return null;var e=t.lastIndexOf("/");return-1===e?"":t.slice(0,e)}(this.location.path);if(null===t)return null;var e=new dt(this.location.bucket,t);return this.newRef(this.authWrapper,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){var t=new dt(this.location.bucket,"");return this.newRef(this.authWrapper,t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this.location.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this.location.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return gt(this.location.path)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storage",{get:function(){return this.authWrapper.service()},enumerable:!1,configurable:!0}),t.prototype.put=function(t,e){return void 0===e&&(e=null),Gt("put",[Xt(),Yt(!0)],arguments),this.throwIfRoot_("put"),new re(this,this.authWrapper,this.location,this.mappings(),new pt(t),e)},t.prototype.putString=function(t,e,n){void 0===e&&(e=L.RAW),Gt("putString",[$t(),$t(M,!0),Yt(!0)],arguments),this.throwIfRoot_("putString");var r=F(e,t),i=Object.assign({},n);return!Z(i.contentType)&&Z(r.contentType)&&(i.contentType=r.contentType),new re(this,this.authWrapper,this.location,this.mappings(),new pt(r.data,!0),i)},t.prototype.delete=function(){var t=this;return Gt("delete",[],arguments),this.throwIfRoot_("delete"),this.authWrapper.getAuthToken().then((function(e){var n=Vt(t.authWrapper,t.location);
2return t.authWrapper.makeRequest(n,e).getPromise()}))},t.prototype.listAll=function(){Gt("listAll",[],arguments);var t={prefixes:[],items:[]};return this.listAllHelper(t).then((function(){return t}))},t.prototype.listAllHelper=function(t,e){return Object(o.__awaiter)(this,void 0,void 0,(function(){var n,r,i,a;return Object(o.__generator)(this,(function(o){switch(o.label){case 0:return n={pageToken:e},[4,this.list(n)];case 1:return r=o.sent(),(i=t.prefixes).push.apply(i,r.prefixes),(a=t.items).push.apply(a,r.items),null==r.nextPageToken?[3,3]:[4,this.listAllHelper(t,r.nextPageToken)];case 2:o.sent(),o.label=3;case 3:return[2]}}))}))},t.prototype.list=function(t){Gt("list",[Jt(!0)],arguments);var e=this;return this.authWrapper.getAuthToken().then((function(n){var r=t||{},i=jt(e.authWrapper,e.location,"/",r.pageToken,r.maxResults);return e.authWrapper.makeRequest(i,n).getPromise()}))},t.prototype.getMetadata=function(){var t=this;return Gt("getMetadata",[],arguments),this.throwIfRoot_("getMetadata"),this.authWrapper.getAuthToken().then((function(e){var n=Mt(t.authWrapper,t.location,t.mappings());return t.authWrapper.makeRequest(n,e).getPromise()}))},t.prototype.updateMetadata=function(t){var e=this;return Gt("updateMetadata",[Yt()],arguments),this.throwIfRoot_("updateMetadata"),this.authWrapper.getAuthToken().then((function(n){var r=Ut(e.authWrapper,e.location,t,e.mappings());return e.authWrapper.makeRequest(r,n).getPromise()}))},t.prototype.getDownloadURL=function(){var t=this;return Gt("getDownloadURL",[],arguments),this.throwIfRoot_("getDownloadURL"),this.authWrapper.getAuthToken().then((function(e){var n=Ft(t.authWrapper,t.location,t.mappings());return t.authWrapper.makeRequest(n,e).getPromise().then((function(t){if(null===t)throw A();return t}))}))},t.prototype.throwIfRoot_=function(t){if(""===this.location.path)throw function(t){return new s(T,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}(t)},t}(),oe=function(){function t(t){this.promise_=Promise.reject(t)}return t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){},t}(),ae=function(){function t(){this.map=new Map,this.id=-9007199254740991}return t.prototype.addRequest=function(t){var e=this,n=this.id;this.id++,this.map.set(n,t),t.getPromise().then((function(){return e.map.delete(n)}),(function(){return e.map.delete(n)}))},t.prototype.clear=function(){this.map.forEach((function(t){t&&t.cancel(!0)})),this.map.clear()},t}(),se=function(){function t(e,n,r,i,o,a){var s;if(this.bucket_=null,this.appId_=null,this.deleted_=!1,this.app_=e,null!==this.app_){var u=this.app_.options;Z(u)&&(this.bucket_=t.extractBucket_(u),this.appId_=null!==(s=u.appId)&&void 0!==s?s:null)}this.authProvider_=n,this.storageRefMaker_=r,this.requestMaker_=i,this.pool_=a,this.service_=o,this.maxOperationRetryTime_=12e4,this.maxUploadRetryTime_=6e5,this.requestMap_=new ae}return t.extractBucket_=function(t){var e=t.storageBucket||null;return null==e?null:dt.makeFromBucketSpec(e).bucket},t.prototype.getAuthToken=function(){var t=this.authProvider_.getImmediate({optional:!0});return t?t.getToken().then((function(t){return null!==t?t.accessToken:null}),(function(){return null})):Promise.resolve(null)},t.prototype.bucket=function(){if(this.deleted_)throw P();return this.bucket_},t.prototype.service=function(){return this.service_},t.prototype.makeStorageReference=function(t){return this.storageRefMaker_(this,t)},t.prototype.makeRequest=function(t,e){if(this.deleted_)return new oe(P());var n=this.requestMaker_(t,this.appId_,e,this.pool_);return this.requestMap_.addRequest(n),n},t.prototype.deleteApp=function(){this.deleted_=!0,this.app_=null,this.requestMap_.clear()},t.prototype.maxUploadRetryTime=function(){return this.maxUploadRetryTime_},t.prototype.setMaxUploadRetryTime=function(t){this.maxUploadRetryTime_=t},t.prototype.maxOperationRetryTime=function(){return this.maxOperationRetryTime_},t.prototype.setMaxOperationRetryTime=function(t){this.maxOperationRetryTime_=t},t}();var ue=function(){function t(t,e,n,r,i,o,a,s,u,c,l){var h=this;this.pendingXhr_=null,this.backoffId_=null,this.resolve_=null,this.reject_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=t,this.method_=e,this.headers_=n,this.body_=r,this.successCodes_=i.slice(),this.additionalRetryCodes_=o.slice(),this.callback_=a,this.errorCallback_=s,this.progressCallback_=c,this.timeout_=u,this.pool_=l,this.promise_=new Promise((function(t,e){h.resolve_=t,h.reject_=e,h.start_()}
2))}return t.prototype.start_=function(){var t=this;function e(e,n){var r,i=t.resolve_,o=t.reject_,a=n.xhr;if(n.wasSuccessCode)try{var u=t.callback_(a,a.getResponseText());tt(u)?i(u):i()}catch(c){o(c)}else null!==a?((r=k()).setServerResponseProp(a.getResponseText()),t.errorCallback_?o(t.errorCallback_(a,r)):o(r)):n.canceled?o(r=t.appDelete_?P():x()):o(r=new s(p,"Max retry time for operation exceeded, please try again."))}this.canceled_?e(0,new ce(!1,null,!0)):this.backoffId_=function(t,e,n){var r=1,i=null,a=!1,s=0;function u(){return 2===s}var c=!1;function l(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];c||(c=!0,e.apply(null,t))}function h(e){i=setTimeout((function(){i=null,t(f,u())}),e)}function f(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!c)if(t)l.call.apply(l,Object(o.__spreadArrays)([null,t],e));else{var i,f=u()||a;if(f)l.call.apply(l,Object(o.__spreadArrays)([null,t],e));else r<64&&(r*=2),1===s?(s=2,i=0):i=1e3*(r+Math.random()),h(i)}}var p=!1;function d(t){p||(p=!0,c||(null!==i?(t||(s=2),clearTimeout(i),h(0)):t||(s=1)))}return h(0),setTimeout((function(){a=!0,d(!0)}),n),d}((function(e,n){if(n)e(!1,new ce(!1,null,!0));else{var r=t.pool_.createXhrIo();t.pendingXhr_=r,null!==t.progressCallback_&&r.addUploadProgressListener(i),r.send(t.url_,t.method_,t.body_,t.headers_).then((function(n){null!==t.progressCallback_&&n.removeUploadProgressListener(i),t.pendingXhr_=null;var r=(n=n).getErrorCode()===B.NO_ERROR,o=n.getStatus();if(r&&!t.isRetryStatusCode_(o)){var a=-1!==t.successCodes_.indexOf(o);e(!0,new ce(a,n))}else{var s=n.getErrorCode()===B.ABORT;e(!1,new ce(!1,null,s))}}))}function i(e){var n=e.loaded,r=e.lengthComputable?e.total:-1;null!==t.progressCallback_&&t.progressCallback_(n,r)}}),e,this.timeout_)},t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){this.canceled_=!0,this.appDelete_=t||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingXhr_&&this.pendingXhr_.abort()},t.prototype.isRetryStatusCode_=function(t){var e=t>=500&&t<600,n=-1!==[408,429].indexOf(t),r=-1!==this.additionalRetryCodes_.indexOf(t);return e||n||r},t}(),ce=function(t,e,n){this.wasSuccessCode=t,this.xhr=e,this.canceled=!!n};function le(t,e,n,r){var o=bt(t.urlParams),a=t.url+o,s=Object.assign({},t.headers);return function(t,e){e&&(t["X-Firebase-GMPID"]=e)}(s,e),function(t,e){null!==e&&e.length>0&&(t.Authorization="Firebase "+e)}(s,n),function(t){var e="undefined"!==typeof i.a?i.a.SDK_VERSION:"AppManager";t["X-Firebase-Storage-Version"]="webjs/"+e}(s),new ue(a,t.method,s,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,r)}var he=function(){function t(t,e,n,r){if(this.bucket_=null,this.authWrapper_=new se(t,e,(function(t,e){return new ie(t,e)}),le,this,n),this.app_=t,null!=r)this.bucket_=dt.makeFromBucketSpec(r);else{var i=this.authWrapper_.bucket();null!=i&&(this.bucket_=new dt(i,""))}this.internals_=new fe(this)}return t.prototype.ref=function(t){function e(t){if("string"!==typeof t)throw"Path is not a string.";if(/^[A-Za-z]+:\/\//.test(t))throw"Expected child path but got a URL, use refFromURL instead."}if(Gt("ref",[$t(e,!0)],arguments),null==this.bucket_)throw new Error("No Storage Bucket defined in Firebase Options.");var n=new ie(this.authWrapper_,this.bucket_);return null!=t?n.child(t):n},t.prototype.refFromURL=function(t){function e(t){if("string"!==typeof t)throw"Path is not a string.";if(!/^[A-Za-z]+:\/\//.test(t))throw"Expected full URL but got a child path, use ref instead.";try{dt.makeFromUrl(t)}catch(e){throw"Expected valid full URL but got an invalid one."}}return Gt("refFromURL",[$t(e,!1)],arguments),new ie(this.authWrapper_,t)},Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this.authWrapper_.maxUploadRetryTime()},enumerable:!1,configurable:!0}),t.prototype.setMaxUploadRetryTime=function(t){Gt("setMaxUploadRetryTime",[Zt()],arguments),this.authWrapper_.setMaxUploadRetryTime(t)},t.prototype.setMaxOperationRetryTime=function(t){Gt("setMaxOperationRetryTime",[Zt()],arguments),this.authWrapper_.setMaxOperationRetryTime(t)},Object.defineProperty(t.prototype,"app",{get:function(){return this.app_}
2,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"INTERNAL",{get:function(){return this.internals_},enumerable:!1,configurable:!0}),t}(),fe=function(){function t(t){this.service_=t}return t.prototype.delete=function(){return this.service_.authWrapper_.deleteApp(),Promise.resolve()},t}();function pe(t,e){var n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal");return new he(n,r,new lt,e)}function de(t){var e={TaskState:Y,TaskEvent:z,StringFormat:L,Storage:he,Reference:ie};t.INTERNAL.registerComponent(new a.Component("storage",pe,"PUBLIC").setServiceProps(e).setMultipleInstances(!0)),t.registerVersion("@firebase/storage","0.3.39")}de(i.a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=(r=n(4))&&"object"===typeof r&&"default"in r?r.default:r;n(20);var o,a,s,u,c=n(1),l=n(9),h=n(15),f=n(7),p=((o={})["trace started"]="Trace {$traceName} was started before.",o["trace stopped"]="Trace {$traceName} is not running.",o["no window"]="Window is not available.",o["no app id"]="App id is not available.",o["no project id"]="Project id is not available.",o["no api key"]="Api key is not available.",o["invalid cc log"]="Attempted to queue invalid cc event",o["FB not default"]="Performance can only start when Firebase app instance is the default one.",o["RC response not ok"]="RC response is not ok",o["invalid attribute name"]="Attribute name {$attributeName} is invalid.",o["invalid attribute value"]="Attribute value {$attributeValue} is invalid.",o["invalid custom metric name"]="Custom metric name {$customMetricName} is invalid",o["invalid String merger input"]="Input for String merger is invalid, contact support team to resolve.",o),d=new l.ErrorFactory("performance","Performance",p),v=function(){function t(t){if(this.window=t,!t)throw d.create("no window");this.performance=t.performance,this.PerformanceObserver=t.PerformanceObserver,this.windowLocation=t.location,this.navigator=t.navigator,this.document=t.document,this.navigator&&this.navigator.cookieEnabled&&(this.localStorage=t.localStorage),t.perfMetrics&&t.perfMetrics.onFirstInputDelay&&(this.onFirstInputDelay=t.perfMetrics.onFirstInputDelay)}return t.prototype.getUrl=function(){return this.windowLocation.href.split("?")[0]},t.prototype.mark=function(t){this.performance&&this.performance.mark&&this.performance.mark(t)},t.prototype.measure=function(t,e,n){this.performance&&this.performance.measure&&this.performance.measure(t,e,n)},t.prototype.getEntriesByType=function(t){return this.performance&&this.performance.getEntriesByType?this.performance.getEntriesByType(t):[]},t.prototype.getEntriesByName=function(t){return this.performance&&this.performance.getEntriesByName?this.performance.getEntriesByName(t):[]},t.prototype.getTimeOrigin=function(){return this.performance&&(this.performance.timeOrigin||this.performance.timing.navigationStart)},t.prototype.requiredApisAvailable=function(){return!!(fetch&&Promise&&this.navigator&&this.navigator.cookieEnabled)},t.prototype.setupObserver=function(t,e){this.PerformanceObserver&&new this.PerformanceObserver((function(t){for(var n=0,r=t.getEntries();n<r.length;n++){var i=r[n];e(i)}})).observe({entryTypes:[t]})},t.getInstance=function(){return void 0===a&&(a=new t(s)),a},t}();function y(t,e){var n=t.length-e.length;if(n<0||n>1)throw d.create("invalid String merger input");for(var r=[],i=0;i<t.length;i++)r.push(t.charAt(i)),e.length>i&&r.push(e.charAt(i));return r.join("")}var g,m,b=function(){function t(){this.instrumentationEnabled=!0,this.dataCollectionEnabled=!0,this.loggingEnabled=!1,this.tracesSamplingRate=1,this.networkRequestsSamplingRate=1,this.logEndPointUrl="https://firebaselogging.googleapis.com/v0cc/log?format=json_proto",this.flTransportEndpointUrl=y("hts/frbslgigp.ogepscmv/ieo/eaylg","tp:/ieaeogn-agolai.o/1frlglgc/o"),this.transportKey=y("AzSC8r6ReiGqFMyfvgow","Iayx0u-XT3vksVM-pIV"),this.logSource=462,this.logTraceAfterSampling=!1,this.logNetworkAfterSampling=!1,this.configTimeToLive=12}return t.prototype.getAppId=function(){var t=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.appId;if(!t)throw d.create("no app id");return t},t.prototype.getProjectId=function(){var t=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.projectId;if(!t)throw d.create("no project id");return t},t.prototype.getApiKey=function(){var t=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.apiKey;if(!t)throw d.create("no api key");return t},t.prototype.getFlTransportFullUrl=function(){return this.flTrans
2portEndpointUrl.concat("?key=",this.transportKey)},t.getInstance=function(){return void 0===u&&(u=new t),u},t}();function _(){return g}!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.VISIBLE=1]="VISIBLE",t[t.HIDDEN=2]="HIDDEN"}(m||(m={}));var w=["firebase_","google_","ga_"],E=new RegExp("^[a-zA-Z]\\w*$");function T(){var t=v.getInstance().navigator;return"serviceWorker"in t?t.serviceWorker.controller?2:3:1}function S(){switch(v.getInstance().document.visibilityState){case"visible":return m.VISIBLE;case"hidden":return m.HIDDEN;default:return m.UNKNOWN}}function I(){var t=v.getInstance().navigator.connection;switch(t&&t.effectiveType){case"slow-2g":return 1;case"2g":return 2;case"3g":return 3;case"4g":return 4;default:return 0}}var C=new h.Logger("Performance");C.logLevel=h.LogLevel.INFO;var k=!0;function x(t){var e=function(){var t=v.getInstance().localStorage;if(!t)return;var e=t.getItem("@firebase/performance/configexpire");if(!e||(n=e,!(Number(n)>Date.now())))return;var n;var r=t.getItem("@firebase/performance/config");if(!r)return;try{return JSON.parse(r)}catch(o){return}}();return e?(N(e),Promise.resolve()):function(t){return function(){var t=b.getInstance().installationsService.getToken();return t.then((function(t){})),t}().then((function(e){var n="https://firebaseremoteconfig.googleapis.com/v1/projects/"+b.getInstance().getProjectId()+"/namespaces/fireperf:fetch?key="+b.getInstance().getApiKey(),r=new Request(n,{method:"POST",headers:{Authorization:"FIREBASE_INSTALLATIONS_AUTH "+e},body:JSON.stringify({app_instance_id:t,app_instance_id_token:e,app_id:b.getInstance().getAppId(),app_version:"0.3.9",sdk_version:"0.0.1"})});return fetch(r).then((function(t){if(t.ok)return t.json();throw d.create("RC response not ok")}))})).catch((function(){C.info("Could not fetch config, will use default configs")}))}(t).then(N).then((function(t){return function(t){var e=v.getInstance().localStorage;if(!t||!e)return;e.setItem("@firebase/performance/config",JSON.stringify(t)),e.setItem("@firebase/performance/configexpire",String(Date.now()+60*b.getInstance().configTimeToLive*60*1e3))}(t)}),(function(){}))}function N(t){if(!t)return t;var e=b.getInstance(),n=t.entries||{};return void 0!==n.fpr_enabled?e.loggingEnabled="true"===String(n.fpr_enabled):e.loggingEnabled=k,n.fpr_log_source&&(e.logSource=Number(n.fpr_log_source)),n.fpr_log_endpoint_url&&(e.logEndPointUrl=n.fpr_log_endpoint_url),n.fpr_log_transport_key&&(e.transportKey=n.fpr_log_transport_key),void 0!==n.fpr_vc_network_request_sampling_rate&&(e.networkRequestsSamplingRate=Number(n.fpr_vc_network_request_sampling_rate)),void 0!==n.fpr_vc_trace_sampling_rate&&(e.tracesSamplingRate=Number(n.fpr_vc_trace_sampling_rate)),e.logTraceAfterSampling=A(e.tracesSamplingRate),e.logNetworkAfterSampling=A(e.networkRequestsSamplingRate),t}function A(t){return Math.random()<=t}var O,P=1;function R(){return P=2,O=O||function(){var t=v.getInstance().document;return new Promise((function(e){t&&"complete"!==t.readyState?t.addEventListener("readystatechange",(function n(){"complete"===t.readyState&&(t.removeEventListener("readystatechange",n),e())})):e()}))}().then((function(){return function(){var t=b.getInstance().installationsService.getId();return t.then((function(t){g=t})),t}()})).then((function(t){return x(t)})).then((function(){return D()}),(function(){return D()}))}function D(){P=3}var L,M=3,j=[],F=!1;function U(t){setTimeout((function(){if(0!==M)return j.length?void function(){var t=c.__spreadArrays(j);j=[];var e=t.map((function(t){return{source_extension_json_proto3:t.message,event_time_ms:String(t.eventTime)}}));(function(t,e){return function(t){var e=b.getInstance().getFlTransportFullUrl();return fetch(e,{method:"POST",body:JSON.stringify(t)})}(t).then((function(t){return t.ok||C.info("Call to Firebase backend failed."),t.json()})).then((function(t){var n=Number(t.nextRequestWaitMillis),r=1e4;isNaN(n)||(r=Math.max(n,r));var i=t.logResponseDetails;Array.isArray(i)&&i.length>0&&"RETRY_REQUEST_LATER"===i[0].responseAction&&(j=c.__spreadArrays(e,j),C.info("Retry transport request later.")),M=3,U(r)}))})({request_time_ms:String(Date.now()),client_info:{client_type:1,js_client_info:{}},log_source:b.getInstance().logSource,log_event:e},t).catch((function(){j=c.__spreadArrays(t,j),M--,C.info("Tries left: "+M+"."),U(1e4)}))}():U(1e4)}),t)}function V(t){if(!t.eventTime||!t.message)throw d.create("invalid cc log");j=c.__spreadArrays(j,[t])}function q(t,e){L||(L=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(void 0,e);V({message:r,eventTime:Date.now()})}}(W)),L(t,e)}function B(t){var e=b.getInstance();!e.instrumentationEnabled&&t.isAuto||(e.dataCollectionEnabled||t.isAuto)&&v.getInstance().requiredApisAvailable()&&(t.isAuto&&S()!==m.VISIBLE||e.loggingEnabled&&e.logTraceAfterSampling&&(3===P?z(t):R().then((function(){return z(t)}),(function(){return z(t)}))))}function z(t){_()&&setTimeout((function(){return q(t,1)}),0)}function W(t,e){return 0===e?function(t){var e={url:t.url,http_method:t.httpMethod||0,http_response_code:200,response_payload_bytes:t.responsePayloadBytes,client_start_time_us:t.startTimeUs,time_to_response_initiated_us:t.timeToResponseInitiatedUs,time_to_response_completed_us:t.timeToResponseCompletedUs},n={application_info:H(),network_request_metric:e};return JSON.stringify(n)}(t):function(t){var e={name:t.name,is_auto:t.isAuto,client_start_time_us:t.startTimeUs,duration_us:t.durationUs};0!==Object.keys(t.counters).length&&(e.counters=t.counters);var n=t.getAttributes();0!==Object.keys(n).length&&(e.custom_attributes=n);var r={application_info:H(),trace_metric:e};return JSON.stringify(r)}(t)}function H(){return{google_app_id:b.getInstance().getAppId(),app_instance_id:_(),web_app_info:{sdk_version:"0.3.9",page_url:v.getInstance().getUrl(),service_worker_status:T(),visibility_state:S(),effective_connection_type:I()},application_process_state:0}}var K=["_fp","_fcp","_fid"];var G=function(){function t(t,e,n){void 0===e&&(e=!1),this.name=t,this.isAuto=e,this.state=1,this.customAttributes={},this.counters={},this.api=v.getInstance(),this.randomId=Math.floor(1e6*Math.random()),this.isAuto||(this.traceStartMark="FB-PERF-TRACE-START-"+this.randomId+"-"+this.name,this.traceStopMark="FB-PERF-TRACE-STOP-"+this.randomId+"-"+this.name,this.traceMeasure=n||"FB-PERF-TRACE-MEASURE-"+this.randomId+"-"+this.name,n&&this.calculateTraceMetrics())}return t.prototype.start=function(){if(1!==this.state)throw d.create("trace started",{traceName:this.name});this.api.mark(this.traceStartMark),this.state=2},t.prototype.stop=function(){if(2!==this.state)throw d.create("trace stopped",{traceName:this.name});this.state=3,this.api.mark(this.traceStopMark),this.api.measure(this.traceMeasure,this.traceStartMark,this.traceStopMark),this.calculateTraceMetrics(),B(this)},t.prototype.record=function(t,e,n){if(this.durationUs=Math.floor(1e3*e),this.startTimeUs=Math.floor(1e3*t),n&&n.attributes&&(this.customAttributes=c.__assign({},n.attributes)),n&&n.metrics)for(var r=0,i=Object.keys(n.metrics);r<i.length;r++){var o=i[r];isNaN(Number(n.metrics[o]))||(this.counters[o]=Number(Math.floor(n.metrics[o])))}B(this)},t.prototype.incrementMetric=function(t,e){void 0===e&&(e=1),void 0===this.counters[t]&&this.putMetric(t,0),this.counters[t]+=e},t.prototype.putMetric=function(t,e){if(!function(t,e){return!(0===t.length||t.length>100)&&(e&&e.startsWith("_wt_")&&K.indexOf(t)>-1||!t.startsWith("_"))}(t,this.name))throw d.create("invalid custom metric name",{customMetricName:t});this.counters[t]=e},t.prototype.getMetric=function(t){return this.counters[t]||0},t.prototype.putAttribute=function(t,e){var n=function(t){return!(0===t.length||t.length>40)&&(!w.some((function(e){return t.startsWith(e)}))&&!!t.match(E))}(t),r=function(t){return 0!==t.length&&t.length<=100}(e);if(n&&r)this.customAttributes[t]=e;else{if(!n)throw d.create("invalid attribute name",{attributeName:t});if(!r)throw d.create("invalid attribute value",{attributeValue:e})}},t.prototype.getAttribute=function(t){return this.customAttributes[t]},t.prototype.removeAttribute=function(t){void 0!==this.customAttributes[t]&&delete this.customAttributes[t]},t.prototype.getAttributes=function(){return c.__assign({},this.customAttributes)},t.prototype.setStartTime=function(t){this.startTimeUs=t},t.prototype.setDuration=function(t){this.durationUs=t},t.prototype.calculateTraceMetrics=function(){var t=this.api.getEntriesByName(this.traceMeasure),e=t&&t[0];e&&(this.durationUs=Math.floor(1e3*e.duration),this.startTimeUs=Math.floor(1e3*(e.startTime+this.api.getTimeOrigin())))},t.createOobTrace=function(e,n,r){var i=v.getInstance().getUrl();if(i){var o=new t("_wt_"+i,!0),a=Math.floor(1e3*v.getInstance().getTimeOrigin());o.setStartTime(a),e&&e[0]&&(o.setDuration(Math.floor(1e3*e[0].duration)),o.putMetric("domInteractive",Math.floor(1e3*e[0].domInteractive)),o.putMetric("domContentLoadedEventEnd",Math.floor(1e3*e[0].domContentLoadedEventEnd)),o.putMetric("loadEventEnd",Math.floor(1e3*e[0].loadEventEnd)));if(n){var s=n.find((function(t){return"first-paint"===t.name}));s&&s.startTime&&o.putMetric("_fp",Math.floor(1e3*s.startTime));var u=n.find((function(t){return"first-contentful-paint"===t.name}));u&&u.startTime&&o.putMetric("_fcp",Math.floor(1e3*u.startTime)),r&&o.putMetric("_fid",Math.floor(1e3*r))}B(o)}},t.createUserTimingTrace=function(e){B(new t(e,!1,e))},t}();function Q(t){var e=t;if(e&&void 0!==e.responseStart){var n=v.getInstance().getTimeOrigin(),r=Math.floor(1e3*(e.startTime+n)),i=e.responseStart?Math.floor(1e3*(e.responseStart-e.startTime)):void 0,o=Math.floor(1e3*(e.responseEnd-e.startTime));!function(t){var e=b.getInstance();if(e.instrumentationEnabled){var n=t.url,r=e.logEndPointUrl.split("?")[0],i=e.flTransportEndpointUrl.split("?")[0];n!==r&&n!==i&&e.loggingEnabled&&e.logNetworkAfterSampling&&setTimeout((function(){return q(t,0)}),0)}}({url:e.name&&e.name.split("?")[0],responsePayloadBytes:e.transferSize,startTimeUs:r,timeToResponseInitiatedUs:i,timeToResponseCompletedUs:o})}}
2function $(){_()&&(setTimeout((function(){return function(){var t=v.getInstance(),e=t.getEntriesByType("navigation"),n=t.getEntriesByType("paint");if(t.onFirstInputDelay){var r=setTimeout((function(){G.createOobTrace(e,n),r=void 0}),5e3);t.onFirstInputDelay((function(t){r&&(clearTimeout(r),G.createOobTrace(e,n,t))}))}else G.createOobTrace(e,n)}()}),0),setTimeout((function(){return function(){for(var t=v.getInstance(),e=t.getEntriesByType("resource"),n=0,r=e;n<r.length;n++){Q(r[n])}t.setupObserver("resource",Q)}()}),0),setTimeout((function(){return function(){for(var t=v.getInstance(),e=t.getEntriesByType("measure"),n=0,r=e;n<r.length;n++){X(r[n])}t.setupObserver("measure",X)}()}),0))}function X(t){var e=t.name;"FB-PERF-TRACE-MEASURE"!==e.substring(0,"FB-PERF-TRACE-MEASURE".length)&&G.createUserTimingTrace(e)}var Y=function(){function t(t){this.app=t,v.getInstance().requiredApisAvailable()?(F||(U(5500),F=!0),R().then($,$)):C.info("Firebase Performance cannot start if browser does not support fetch and Promise or cookie is disabled.")}return t.prototype.trace=function(t){return new G(t)},Object.defineProperty(t.prototype,"instrumentationEnabled",{get:function(){return b.getInstance().instrumentationEnabled},set:function(t){b.getInstance().instrumentationEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataCollectionEnabled",{get:function(){return b.getInstance().dataCollectionEnabled},set:function(t){b.getInstance().dataCollectionEnabled=t},enumerable:!1,configurable:!0}),t}();function J(t){var e=function(t,e){if("[DEFAULT]"!==t.name)throw d.create("FB not default");if("undefined"===typeof window)throw d.create("no window");return function(t){s=t}(window),b.getInstance().firebaseAppInstance=t,b.getInstance().installationsService=e,new Y(t)};t.INTERNAL.registerComponent(new f.Component("performance",(function(t){var n=t.getProvider("app").getImmediate(),r=t.getProvider("installations").getImmediate();return e(n,r)}),"PUBLIC")),t.registerVersion("@firebase/performance","0.3.9")}J(i),e.registerPerformance=J},function(t,e,n){"use strict";n.r(e),n.d(e,"factory",(function(){return C})),n.d(e,"getGlobalVars",(function(){return S})),n.d(e,"registerAnalytics",(function(){return k})),n.d(e,"resetGlobalVars",(function(){return T})),n.d(e,"settings",(function(){return I}));var r,i,o=n(4),a=n.n(o),s=(n(20),n(1)),u=n(15),c=n(9),l=n(7),h="https://www.googletagmanager.com/gtag/js";!function(t){t.EVENT="event",t.SET="set",t.CONFIG="config"}(r||(r={})),function(t){t.ADD_SHIPPING_INFO="add_shipping_info",t.ADD_PAYMENT_INFO="add_payment_info",t.ADD_TO_CART="add_to_cart",t.ADD_TO_WISHLIST="add_to_wishlist",t.BEGIN_CHECKOUT="begin_checkout",t.CHECKOUT_PROGRESS="checkout_progress",t.EXCEPTION="exception",t.GENERATE_LEAD="generate_lead",t.LOGIN="login",t.PAGE_VIEW="page_view",t.PURCHASE="purchase",t.REFUND="refund",t.REMOVE_FROM_CART="remove_from_cart",t.SCREEN_VIEW="screen_view",t.SEARCH="search",t.SELECT_CONTENT="select_content",t.SELECT_ITEM="select_item",t.SELECT_PROMOTION="select_promotion",t.SET_CHECKOUT_OPTION="set_checkout_option",t.SHARE="share",t.SIGN_UP="sign_up",t.TIMING_COMPLETE="timing_complete",t.VIEW_CART="view_cart",t.VIEW_ITEM="view_item",t.VIEW_ITEM_LIST="view_item_list",t.VIEW_PROMOTION="view_promotion",t.VIEW_SEARCH_RESULTS="view_search_results"}(i||(i={}));var f,p=new u.Logger("@firebase/analytics");function d(t,e,n){var i=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];window[e].push(arguments)};return window[n]&&"function"===typeof window[n]&&(i=window[n]),window[n]=function(t,e){return function(n,i,o){if(n===r.EVENT){var a=[];if(o&&o.send_to){var s=o.send_to;Array.isArray(s)||(s=[s]);for(var u=0,c=s;u<c.length;u++){var l=c[u],h=e[l];
2if(!h){a=[];break}a.push(h)}}if(0===a.length)for(var f=0,d=Object.values(e);f<d.length;f++){var v=d[f];a.push(v)}Promise.all(a).then((function(){return t(r.EVENT,i,o||{})})).catch((function(t){return p.error(t)}))}else if(n===r.CONFIG){(e[i]||Promise.resolve()).then((function(){t(r.CONFIG,i,o)})).catch((function(t){return p.error(t)}))}else t(r.SET,i)}}(i,t),{gtagCore:i,wrappedGtag:window[n]}}var v,y,g=((f={})["no-ga-id"]='"measurementId" field is empty in Firebase config. Firebase Analytics requires this field to contain a valid measurement ID.',f["already-exists"]="A Firebase Analytics instance with the measurement ID ${id} already exists. Only one Firebase Analytics instance can be created for each measurement ID.",f["already-initialized"]="Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.",f["interop-component-reg-failed"]="Firebase Analytics Interop Component failed to instantiate",f),m=new c.ErrorFactory("analytics","Analytics",g),b={},_="dataLayer",w="gtag",E=!1;function T(t,e){void 0===t&&(t=!1),void 0===e&&(e={}),E=t,b=e,_="dataLayer",w="gtag"}function S(){return{initializedIdPromisesMap:b}}function I(t){if(E)throw m.create("already-initialized");t.dataLayerName&&(_=t.dataLayerName),t.gtagName&&(w=t.gtagName)}function C(t,e){var n=t.options.measurementId;if(!n)throw m.create("no-ga-id");if(null!=b[n])throw m.create("already-exists",{id:n});if(!E){(function(){for(var t=window.document.getElementsByTagName("script"),e=0,n=Object.values(t);e<n.length;e++){var r=n[e];if(r.src&&r.src.includes(h))return r}return null})()||function(t){var e=document.createElement("script");e.src=h+"?l="+t,e.async=!0,document.head.appendChild(e)}(_),function(t){var e=[];Array.isArray(window[t])?e=window[t]:window[t]=e}(_);var i=d(b,_,w),o=i.wrappedGtag,a=i.gtagCore;y=o,v=a,E=!0}return b[n]=function(t,e,n){return Object(s.__awaiter)(this,void 0,void 0,(function(){var i,o;return Object(s.__generator)(this,(function(a){switch(a.label){case 0:return[4,e.getId()];case 1:return i=a.sent(),n("js",new Date),n(r.CONFIG,t.options.measurementId,((o={}).firebase_id=i,o.origin="firebase",o.update=!0,o)),[2]}}))}))}(t,e,v),{app:t,logEvent:function(t,e,i){return function(t,e,n,i,o){var a=i||{};o&&o.global||(a=Object(s.__assign)(Object(s.__assign)({},i),{send_to:e})),t(r.EVENT,n,a||{})}(y,n,t,e,i)},setCurrentScreen:function(t,e){return function(t,e,n,i){i&&i.global?t(r.SET,{screen_name:n}):t(r.CONFIG,e,{update:!0,screen_name:n})}(y,n,t,e)},setUserId:function(t,e){return function(t,e,n,i){i&&i.global?t(r.SET,{user_id:n}):t(r.CONFIG,e,{update:!0,user_id:n})}(y,n,t,e)},setUserProperties:function(t,e){return function(t,e,n,i){if(i&&i.global){for(var o={},a=0,s=Object.keys(n);a<s.length;a++){var u=s[a];o["user_properties."+u]=n[u]}t(r.SET,o)}else t(r.CONFIG,e,{update:!0,user_properties:n})}(y,n,t,e)},setAnalyticsCollectionEnabled:function(t){return function(t,e){window["ga-disable-"+t]=!e}(n,t)}}}function k(t){t.INTERNAL.registerComponent(new l.Component("analytics",(function(t){return C(t.getProvider("app").getImmediate(),t.getProvider("installations").getImmediate())}),"PUBLIC").setServiceProps({settings:I,EventName:i})),t.INTERNAL.registerComponent(new l.Component("analytics-internal",(function(t){try{return{logEvent:t.getProvider("analytics").getImmediate().logEvent}}catch(e){throw m.create("interop-component-reg-failed",{reason:e})}}),"PRIVATE")),t.registerVersion("@firebase/analytics","0.3.9")}k(a.a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=(r=n(4))&&"object"===typeof r&&"default"in r?r.default:r;n(20);var o,a=n(1),s=n(9),u=n(15),c=n(7),l=function(){function t(t,e,n,r){this.client=t,this.storage=e,this.storageCache=n,this.logger=r}return t.prototype.isCachedDataFresh=function(t,e){if(!e)return this.logger.debug("Config fetch cache check. Cache unpopulated."),!1;var n=Date.now()-e,r=n<=t;return this.logger.debug("Config fetch cache check. Cache age millis: "+n+". Cache max age millis (minimumFetchIntervalMillis setting): "+t+". Is cache hit: "+r+"."),r},t.prototype.fetch=function(t){return a.__awaiter(this,void 0,void 0,(function(){var e,n,r,i,o;return a.__generator(this,(function(a){switch(a.label){case 0:return[4,Promise.all([this.storage.getLastSuccessfulFetchTimestampMillis(),this.storage.getLastSuccessfulFetchResponse()])];
2case 1:return e=a.sent(),n=e[0],(r=e[1])&&this.isCachedDataFresh(t.cacheMaxAgeMillis,n)?[2,r]:(t.eTag=r&&r.eTag,[4,this.client.fetch(t)]);case 2:return i=a.sent(),o=[this.storageCache.setLastSuccessfulFetchTimestampMillis(Date.now())],200===i.status&&o.push(this.storage.setLastSuccessfulFetchResponse(i)),[4,Promise.all(o)];case 3:return a.sent(),[2,i]}}))}))},t}(),h=((o={})["registration-window"]="Undefined window object. This SDK only supports usage in a browser environment.",o["registration-project-id"]="Undefined project identifier. Check Firebase app initialization.",o["registration-api-key"]="Undefined API key. Check Firebase app initialization.",o["registration-app-id"]="Undefined app identifier. Check Firebase app initialization.",o["storage-open"]="Error thrown when opening storage. Original error: {$originalErrorMessage}.",o["storage-get"]="Error thrown when reading from storage. Original error: {$originalErrorMessage}.",o["storage-set"]="Error thrown when writing to storage. Original error: {$originalErrorMessage}.",o["storage-delete"]="Error thrown when deleting from storage. Original error: {$originalErrorMessage}.",o["fetch-client-network"]="Fetch client failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.",o["fetch-timeout"]='The config fetch request timed out. Configure timeout using "fetchTimeoutMillis" SDK setting.',o["fetch-throttle"]='The config fetch request timed out while in an exponential backoff state. Configure timeout using "fetchTimeoutMillis" SDK setting. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.',o["fetch-client-parse"]="Fetch client could not parse response. Original error: {$originalErrorMessage}.",o["fetch-status"]="Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.",o),f=new s.ErrorFactory("remoteconfig","Remote Config",h);var p=function(){function t(t,e,n,r,i,o){this.firebaseInstallations=t,this.sdkVersion=e,this.namespace=n,this.projectId=r,this.apiKey=i,this.appId=o}return t.prototype.fetch=function(t){return a.__awaiter(this,void 0,void 0,(function(){var e,n,r,i,o,s,u,c,l,h,p,d,v,y,g,m,b,_,w;return a.__generator(this,(function(a){switch(a.label){case 0:return[4,Promise.all([this.firebaseInstallations.getId(),this.firebaseInstallations.getToken()])];case 1:e=a.sent(),n=e[0],r=e[1],i=window.FIREBASE_REMOTE_CONFIG_URL_BASE||"https://firebaseremoteconfig.googleapis.com",o=i+"/v1/projects/"+this.projectId+"/namespaces/"+this.namespace+":fetch?key="+this.apiKey,s={"Content-Type":"application/json","Content-Encoding":"gzip","If-None-Match":t.eTag||"*"},u={sdk_version:this.sdkVersion,app_instance_id:n,app_instance_id_token:r,app_id:this.appId,language_code:(void 0===E&&(E=navigator),E.languages&&E.languages[0]||E.language)},c={method:"POST",headers:s,body:JSON.stringify(u)},l=fetch(o,c),h=new Promise((function(e,n){t.signal.addEventListener((function(){var t=new Error("The operation was aborted.");t.name="AbortError",n(t)}))})),a.label=2;case 2:return a.trys.push([2,5,,6]),[4,Promise.race([l,h])];case 3:return a.sent(),[4,l];case 4:return p=a.sent(),[3,6];case 5:throw d=a.sent(),v="fetch-client-network","AbortError"===d.name&&(v="fetch-timeout"),f.create(v,{originalErrorMessage:d.message});case 6:if(y=p.status,g=p.headers.get("ETag")||void 0,200!==p.status)return[3,11];_=void 0,a.label=7;case 7:return a.trys.push([7,9,,10]),[4,p.json()];case 8:return _=a.sent(),[3,10];case 9:throw w=a.sent(),f.create("fetch-client-parse",{originalErrorMessage:w.message});case 10:m=_.entries,b=_.state,a.label=11;case 11:if("INSTANCE_STATE_UNSPECIFIED"===b?y=500:"NO_CHANGE"===b?y=304:"NO_TEMPLATE"!==b&&"EMPTY_CONFIG"!==b||(m={}),304!==y&&200!==y)throw f.create("fetch-status",{httpStatus:y});return[2,{status:y,eTag:g,config:m}]}var E}))}))},t}(),d=function(){function t(){this.listeners=[]}return t.prototype.addEventListener=function(t){this.listeners.push(t)},t.prototype.abort=function(){this.listeners.forEach((function(t){return t()}))},t}(),v=["1","true","t","yes","y","on"],y=function(){function t(t,e){void 0===e&&(e=""),this._source=t,this._value=e}return t.prototype.asString=function(){return this._value},t.prototype.asBoolean=function(){return"static"!==this._source&&v.indexOf(this._value.toLowerCase())>=0},t.prototype.asNumber=function(){if("static"===this._source)return 0;var t=Number(this._value);return isNaN(t)&&(t=0),t},t.prototype.getSource=function(){return this._source},t}(),g=function(){function t(t,e,n,r,i){this.app=t,this._client=e,this._storageCache=n,this._storage=r,this._logger=i,this._isInitializationComplete=!1,this.settings={fetchTimeoutMillis:6e4,minimumFetchIntervalMillis:432e5},this.defaultConfig={}}return t.prototype.setLogLevel=function(t){switch(t){case"debug":this._logger.logLevel=u.LogLevel.DEBUG;break;case"silent":this._logger.logLevel=u.LogLevel.SILENT;break;default:this._logger.logLevel=u.LogLevel.ERROR}},Object.defineProperty(t.prototype,"fetchTimeMillis",{get:function(){return this._storageCache.getLastSuccessfulFetchTimestampMillis()||-1}
2,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastFetchStatus",{get:function(){return this._storageCache.getLastFetchStatus()||"no-fetch-yet"},enumerable:!1,configurable:!0}),t.prototype.activate=function(){return a.__awaiter(this,void 0,void 0,(function(){var t,e,n;return a.__generator(this,(function(r){switch(r.label){case 0:return[4,Promise.all([this._storage.getLastSuccessfulFetchResponse(),this._storage.getActiveConfigEtag()])];case 1:return t=r.sent(),e=t[0],n=t[1],e&&e.config&&e.eTag&&e.eTag!==n?[4,Promise.all([this._storageCache.setActiveConfig(e.config),this._storage.setActiveConfigEtag(e.eTag)])]:[2,!1];case 2:return r.sent(),[2,!0]}}))}))},t.prototype.ensureInitialized=function(){var t=this;return this._initializePromise||(this._initializePromise=this._storageCache.loadFromStorage().then((function(){t._isInitializationComplete=!0}))),this._initializePromise},t.prototype.fetch=function(){return a.__awaiter(this,void 0,void 0,(function(){var t,e,n,r=this;return a.__generator(this,(function(i){switch(i.label){case 0:t=new d,setTimeout((function(){return a.__awaiter(r,void 0,void 0,(function(){return a.__generator(this,(function(e){return t.abort(),[2]}))}))}),this.settings.fetchTimeoutMillis),i.label=1;case 1:return i.trys.push([1,4,,6]),[4,this._client.fetch({cacheMaxAgeMillis:this.settings.minimumFetchIntervalMillis,signal:t})];case 2:return i.sent(),[4,this._storageCache.setLastFetchStatus("success")];case 3:return i.sent(),[3,6];case 4:return e=i.sent(),u="fetch-throttle",n=(o=e)instanceof s.FirebaseError&&-1!==o.code.indexOf(u)?"throttle":"failure",[4,this._storageCache.setLastFetchStatus(n)];case 5:throw i.sent(),e;case 6:return[2]}var o,u}))}))},t.prototype.fetchAndActivate=function(){return a.__awaiter(this,void 0,void 0,(function(){return a.__generator(this,(function(t){switch(t.label){case 0:return[4,this.fetch()];case 1:return t.sent(),[2,this.activate()]}}))}))},t.prototype.getAll=function(){var t=this;return function(t,e){void 0===t&&(t={});void 0===e&&(e={});return Object.keys(a.__assign(a.__assign({},t),e))}(this._storageCache.getActiveConfig(),this.defaultConfig).reduce((function(e,n){return e[n]=t.getValue(n),e}),{})},t.prototype.getBoolean=function(t){return this.getValue(t).asBoolean()},t.prototype.getNumber=function(t){return this.getValue(t).asNumber()},t.prototype.getString=function(t){return this.getValue(t).asString()},t.prototype.getValue=function(t){this._isInitializationComplete||this._logger.debug('A value was requested for key "'+t+'" before SDK initialization completed. Await on ensureInitialized if the intent was to get a previously activated value.');var e=this._storageCache.getActiveConfig();return e&&void 0!==e[t]?new y("remote",e[t]):this.defaultConfig&&void 0!==this.defaultConfig[t]?new y("default",String(this.defaultConfig[t])):(this._logger.debug('Returning static value for key "'+t+'". Define a default or remote value if this is unintentional.'),new y("static"))},t}();function m(t,e){var n=t.target.error||void 0;return f.create(e,{originalErrorMessage:n&&n.message})}var b=function(){function t(t,e,n,r){void 0===r&&(r=new Promise((function(t,e){var n=indexedDB.open("firebase_remote_config",1);n.onerror=function(t){e(m(t,"storage-open"))},n.onsuccess=function(e){t(e.target.result)},n.onupgradeneeded=function(t){var e=t.target.result;switch(t.oldVersion){case 0:e.createObjectStore("app_namespace_store",{keyPath:"compositeKey"})}}}))),this.appId=t,this.appName=e,this.namespace=n,this.openDbPromise=r}return t.prototype.getLastFetchStatus=function(){return this.get("last_fetch_status")},t.prototype.setLastFetchStatus=function(t){return this.set("last_fetch_status",t)},t.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.get("last_successful_fetch_timestamp_millis")},t.prototype.setLastSuccessfulFetchTimestampMillis=function(t){return this.set("last_successful_fetch_timestamp_millis",t)},t.prototype.getLastSuccessfulFetchResponse=function(){return this.get("last_successful_fetch_response")},t.prototype.setLastSuccessfulFetchResponse=function(t){return this.set("last_successful_fetch_response",t)},t.prototype.getActiveConfig=function(){return this.get("active_config")},t.prototype.setActiveConfig=function(t){return this.set("active_config",t)},t.prototype.getActiveConfigEtag=function(){return this.get("active_config_etag")},t.prototype.setActiveConfigEtag=function(t){return this.set("active_config_etag",t)},t.prototype.getThrottleMetadata=function(){return this.get("throttle_metadata")},t.prototype.setThrottleMetadata=function(t){return this.set("throttle_metadata",t)},t.prototype.deleteThrottleMetadata=function(){return this.delete("throttle_metadata")},t.prototype.get=function(t){return a.__awaiter(this,void 0,void 0,(function(){var e,n=this;return a.__generator(this,(function(r){switch(r.label){case 0:return[4,this.openDbPromise];case 1:return e=r.sent(),[2,new Promise((function(r,i){var o=e.transaction(["app_namespace_store"],"readonly").objectStore("app_namespace_store"),a=n.createCompositeKey(t);try{var s=o.get(a);s.onerror=function(t){i(m(t,"storage-get"))},s.onsuccess=function(t){var e=t.target.result;r(e?e.value:void 0)}}catch(u){i(f.create("storage-get",{originalErrorMessage:u&&u.message}))}}))]}}))}))},t.prototype.set=function(t,e){return a.__awaiter(this,void 0,void 0,(function(){var n,r=this;return a.__generator(this,(function(i){switch(i.label){case 0:return[4,this.openDbPromise];case 1:return n=i.sent(),[2,new Promise((function(i,o){var a=n.transaction(["app_namespace_store"],"readwrite").objectStore("app_namespace_store"),s=r.createCompositeKey(t);try{var u=a.put({compositeKey:s,value:e});u.onerror=function(t){o(m(t,"storage-set"))},u.onsuccess=function(){i()}}catch(c){o(f.create("storage-set",{originalErrorMessage:c&&c.message}))}}))]}}))}))},t.prototype.delete=function(t){return a.__awaiter(this,void 0,void 0,(function(){var e,n=this;return a.__generator(this,(function(r){switch(r.label){case 0:return[4,this.openDbPromise];case 1:return e=r.sent(),[2,new Promise((function(r,i){var o=e.transaction(["app_namespace_store"],"readwrite").objectStore("app_namespace_store"),a=n.createCompositeKey(t);try{var s=o.delete(a);s.onerror=function(t){i(m(t,"storage-delete"))},s.onsuccess=function(){r()}}catch(u){i(f.create("storage-delete",{originalErrorMessage:u&&u.message}))}}))]}}))}))},t.prototype.createCompositeKey=function(t){return[this.appId,this.appName,this.namespace,t].join()},t}(),_=function(){function t(t){this.storage=t}return t.prototype.getLastFetchStatus=function(){return this.lastFetchStatus},t.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.lastSuccessfulFetchTimestampMillis},t.prototype.getActiveConfig=function(){return this.activeConfig},t.prototype.loadFromStorage=function(){return a.__awaiter(this,void 0,void 0,(function(){var t,e,n,r,i,o;return a.__generator(this,(function(a){switch(a.label){case 0:return t=this.storage.getLastFetchStatus(),e=this.storage.getLastSuccessfulFetchTimestampMillis(),n=this.storage.getActiveConfig(),[4,t];case 1:return(r=a.sent())&&(this.lastFetchStatus=r),[4,e];case 2:return(i=a.sent())&&(this.lastSuccessfulFetchTimestampMillis=i),[4,n];case 3:return(o=a.sent())&&(this.activeConfig=o),[2]}}))}))},t.prototype.setLastFetchStatus=function(t){return this.lastFetchStatus=t,this.storage.setLastFetchStatus(t)},t.prototype.setLastSuccessfulFetchTimestampMillis=function(t){return this.lastSuccessfulFetchTimestampMillis=t,this.storage.setLastSuccessfulFetchTimestampMillis(t)},t.prototype.setActiveConfig=function(t){return this.activeConfig=t,this.storage.setActiveConfig(t)},t}();function w(t){var e=1e3*Math.pow(2,t),n=Math.round(.5*e*(Math.random()-.5)*2);return Math.min(144e5,e+n)}function E(t,e){return new Promise((function(n,r){var i=Math.max(e-Date.now(),0),o=setTimeout(n,i);t.addEventListener((function(){clearTimeout(o),r(f.create("fetch-throttle",{throttleEndTimeMillis:e}))}))}))}var T=function(){function t(t,e){this.client=t,this.storage=e}return t.prototype.fetch=function(t){return a.__awaiter(this,void 0,void 0,(function(){var e;return a.__generator(this,(function(n){switch(n.label){case 0:return[4,this.storage.getThrottleMetadata()];case 1:return e=n.sent()||{backoffCount:0,throttleEndTimeMillis:Date.now()},[2,this.attemptFetch(t,e)]}}))}))},t.prototype.attemptFetch=function(t,e){var n=e.throttleEndTimeMillis,r=e.backoffCount;return a.__awaiter(this,void 0,void 0,(function(){var e,i,o;return a.__generator(this,(function(a){switch(a.label){case 0:return[4,E(t.signal,n)];case 1:a.sent(),a.label=2;case 2:return a.trys.push([2,5,,7]),[4,this.client.fetch(t)];case 3:return e=a.sent(),[4,this.storage.deleteThrottleMetadata()];case 4:return a.sent(),[2,e];case 5:if(!function(t){if(!(t instanceof s.FirebaseError))return!1;var e=Number(t.httpStatus);return 429===e||500===e||503===e||504===e}(i=a.sent()))throw i;return o={throttleEndTimeMillis:Date.now()+w(r),backoffCount:r+1},[4,this.storage.setThrottleMetadata(o)];case 6:return a.sent(),[2,this.attemptFetch(t,o)];case 7:return[2]}}
2))}))},t}(),S="@firebase/remote-config";function I(t){t.INTERNAL.registerComponent(new c.Component("remoteConfig",(function(e,n){var r=e.getProvider("app").getImmediate(),i=e.getProvider("installations").getImmediate();if("undefined"===typeof window)throw f.create("registration-window");var o=r.options,a=o.projectId,s=o.apiKey,c=o.appId;if(!a)throw f.create("registration-project-id");if(!s)throw f.create("registration-api-key");if(!c)throw f.create("registration-app-id");n=n||"firebase";var h=new b(c,r.name,n),d=new _(h),v=new u.Logger(S);v.logLevel=u.LogLevel.ERROR;var y=new p(i,t.SDK_VERSION,n,a,s,c),m=new T(y,h),w=new l(m,h,d,v),E=new g(r,w,d,h,v);return E.ensureInitialized(),E}),"PUBLIC").setMultipleInstances(!0)),t.registerVersion(S,"0.1.25")}I(i),e.registerRemoteConfig=I},function(t,e,n){"use strict";var r=n(58);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i}
2;return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,h=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,m=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function E(t){if("object"===typeof t&&null!==t){var e=t.$$typeof;switch(e){case i:switch(t=t.type){case h:case f:case a:case u:case s:case d:return t;default:switch(t=t&&t.$$typeof){case l:case p:case g:case y:case c:return t;default:return e}}case o:return e}}}function T(t){return E(t)===f}e.AsyncMode=h,e.ConcurrentMode=f,e.ContextConsumer=l,e.ContextProvider=c,e.Element=i,e.ForwardRef=p,e.Fragment=a,e.Lazy=g,e.Memo=y,e.Portal=o,e.Profiler=u,e.StrictMode=s,e.Suspense=d,e.isAsyncMode=function(t){return T(t)||E(t)===h},e.isConcurrentMode=T,e.isContextConsumer=function(t){return E(t)===l},e.isContextProvider=function(t){return E(t)===c},e.isElement=function(t){return"object"===typeof t&&null!==t&&t.$$typeof===i},e.isForwardRef=function(t){return E(t)===p},e.isFragment=function(t){return E(t)===a},e.isLazy=function(t){return E(t)===g},e.isMemo=function(t){return E(t)===y},e.isPortal=function(t){return E(t)===o},e.isProfiler=function(t){return E(t)===u},e.isStrictMode=function(t){return E(t)===s},e.isSuspense=function(t){return E(t)===d},e.isValidElementType=function(t){return"string"===typeof t||"function"===typeof t||t===a||t===f||t===u||t===s||t===d||t===v||"object"===typeof t&&null!==t&&(t.$$typeof===g||t.$$typeof===y||t.$$typeof===c||t.$$typeof===l||t.$$typeof===p||t.$$typeof===b||t.$$typeof===_||t.$$typeof===w||t.$$typeof===m)},e.typeOf=E},function(t,e){function n(){return t.exports=n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},n.apply(this,arguments)}t.exports=n},,,,,,function(t,e,n){"use strict";function r(t,e,n){for(var r="",i=n?"0":"",o=0;o<=e-1;o++)r+=t[o]||i;return r}Object.defineProperty(e,"__esModule",{value:!0}),e.noop=function(){},e.returnTrue=function(){return!0},e.charIsNumber=function(t){return!!(t||"").match(/\d/)},e.escapeRegExp=function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},e.fixLeadingZero=function(t){if(!t)return t;var e="-"===t[0];e&&(t=t.substring(1,t.length));var n=t.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(e?"-":"")+r+(i?"."+i:"")},e.splitString=function(t,e){return[t.substring(0,e),t.substring(e)]},e.limitToScale=r,e.roundToPrecision=function(t,e,n){var i=t.split("."),o=parseFloat("0."+(i[1]||"0")).toFixed(e).split("."),a=i[0].split("").reverse().reduce((function(t,e,n){return t.length>n?(Number(t[0])+Number(e)).toString()+t.substring(1,t.length):e+t}),o[0]),s=r(o[1]||"",(i[1]||"").length,n);return a+(s?"."+s:"")},e.omit=function(t,e){var n={};return Object.keys(t).forEach((function(r){e[r]||(n[r]=t[r])})),n},e.setCaretPosition=function(t,e){if(t.value=t.value,null!==t){if(t.createTextRange){var n=t.createTextRange();return n.move("character",e),n.select(),!0}return t.selectionStart||0===t.selectionStart?(t.focus(),t.setSelectionRange(e,e),!0):(t.focus(),!1)}};e.thousandGroupSpacing={two:"2",twoScaled:"2s",three:"3",four:"4"}},,function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return Er}));var r=n(2),i=n(10);function o(t,e){if(null==t)return{};var n,r,o=Object(i.a)(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var a=n(0),s=n.n(a);n(12);function u(t){var e,n,r="";if("string"===typeof t||"number"===typeof t)r+=t;else if("object"===typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=u(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}var c=function(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=u(t))&&(r&&(r+=" "),r+=e);return r},l=n(24),h=n.n(l),f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p="object"===("undefined"===typeof window?"undefined":f(window))&&"object"===("undefined"===typeof document?"undefined":f(document))&&9===document.nodeType;n(13);function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function v(t,e,n){return e&&d(t.prototype,e),n&&d(t,n),t}var y=n(5);function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var m={}.constructor;function b(t){if(null==t||"object"!==typeof t)return t;if(Array.isArray(t))return t.map(b);if(t.constructor!==m)return t;var e={};for(var n in t)e[n]=b(t[n]);return e}function _(t,e,n){void 0===t&&(t="unnamed");var r=n.jss,i=b(e),o=r.plugins.onCreateRule(t,i,n);return o||(t[0],null)}var w=function(t,e){for(var n="",r=0;r<t.length&&"!important"!==t[r];r++)n&&(n+=e),n+=t[r];return n};function E(t,e){if(void 0===e&&(e=!1),!Array.isArray(t))return t;var n="";if(Array.isArray(t[0]))for(var r=0;r<t.length&&"!important"!==t[r];r++)n&&(n+=", "),n+=w(t[r]," ");else n=w(t,", ");return e||"!important"!==t[t.length-1]||(n+=" !important"),n}function T(t,e){for(var n="",r=0;r<e;r++)n+=" ";return n+t}function S(t,e,n){void 0===n&&(n={});var r="";if(!e)return r;var i=n.indent,o=void 0===i?0:i,a=e.fallbacks;
vendor: 6,122 bytes, line 2
2if(t&&o++,a)if(Array.isArray(a))for(var s=0;s<a.length;s++){var u=a[s];for(var c in u){var l=u[c];null!=l&&(r&&(r+="\n"),r+=""+T(c+": "+E(l)+";",o))}}else for(var h in a){var f=a[h];null!=f&&(r&&(r+="\n"),r+=""+T(h+": "+E(f)+";",o))}for(var p in e){var d=e[p];null!=d&&"fallbacks"!==p&&(r&&(r+="\n"),r+=""+T(p+": "+E(d)+";",o))}return(r||n.allowEmpty)&&t?(r&&(r="\n"+r+"\n"),T(t+" {"+r,--o)+T("}",o)):r}var I=/([[\].#*$><+~=|^:(),"'`\s])/g,C="undefined"!==typeof CSS&&CSS.escape,k=function(t){return C?C(t):t.replace(I,"\\$1")},x=function(){function t(t,e,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,i=n.Renderer;this.key=t,this.options=n,this.style=e,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return t.prototype.prop=function(t,e,n){if(void 0===e)return this.style[t];var r=!!n&&n.force;if(!r&&this.style[t]===e)return this;var i=e;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(e,t,this));var o=null==i||!1===i,a=t in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[t]:this.style[t]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,t):this.renderer.setProperty(this.renderable,t,i),this;var u=this.options.sheet;return u&&u.attached,this},t}(),N=function(t){function e(e,n,r){var i;(i=t.call(this,e,n,r)||this).selectorText=void 0,i.id=void 0,i.renderable=void 0;var o=r.selector,a=r.scoped,s=r.sheet,u=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=u(g(g(i)),s),i.selectorText="."+k(i.id)),i}Object(y.a)(e,t);var n=e.prototype;return n.applyTo=function(t){var e=this.renderer;if(e){var n=this.toJSON();for(var r in n)e.setProperty(t,r,n[r])}return this},n.toJSON=function(){var t={};for(var e in this.style){var n=this.style[e];"object"!==typeof n?t[e]=n:Array.isArray(n)&&(t[e]=E(n))}return t},n.toString=function(t){var e=this.options.sheet,n=!!e&&e.options.link?Object(r.a)({},t,{allowEmpty:!0}):t;return S(this.selectorText,this.style,n)},v(e,[{key:"selector",set:function(t){if(t!==this.selectorText){this.selectorText=t;var e=this.renderer,n=this.renderable;if(n&&e)e.setSelector(n,t)||e.replaceRule(n,this)}},get:function(){return this.selectorText}}]),e}(x),A={onCreateRule:function(t,e,n){return"@"===t[0]||n.parent&&"keyframes"===n.parent.type?null:new N(t,e,n)}},O={indent:1,children:!0},P=/@([\w-]+)/,R=function(){function t(t,e,n){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=t,this.query=n.name;var i=t.match(P);for(var o in this.at=i?i[1]:"unknown",this.options=n,this.rules=new nt(Object(r.a)({},n,{parent:this})),e)this.rules.add(o,e[o]);this.rules.process()}var e=t.prototype;return e.getRule=function(t){return this.rules.get(t)},e.indexOf=function(t){return this.rules.indexOf(t)},e.addRule=function(t,e,n){var r=this.rules.add(t,e,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},e.toString=function(t){if(void 0===t&&(t=O),null==t.indent&&(t.indent=O.indent),null==t.children&&(t.children=O.children),!1===t.children)return this.query+" {}";var e=this.rules.toString(t);return e?this.query+" {\n"+e+"\n}":""},t}(),D=/@media|@supports\s+/,L={onCreateRule:function(t,e,n){return D.test(t)?new R(t,e,n):null}},M={indent:1,children:!0},j=/@keyframes\s+([\w-]+)/,F=function(){function t(t,e,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var i=t.match(j);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var o=n.scoped,a=n.sheet,s=n.generateId;for(var u in this.id=!1===o?this.name:k(s(this,a)),this.rules=new nt(Object(r.a)({},n,{parent:this})),e)this.rules.add(u,e[u],Object(r.a)({},n,{parent:this}));this.rules.process()}return t.prototype.toString=function(t){if(void 0===t&&(t=M),null==t.indent&&(t.indent=M.indent),null==t.children&&(t.children=M.children),!1===t.children)return this.at+" "+this.id+" {}";var e=this.rules.toString(t);return e&&(e="\n"+e+"\n"),this.at+" "+this.id+" {"+e+"}"},t}(),U=/@keyframes\s+/,V=/\$([\w-]+)/g,q=function(t,e){return"string"===typeof t?t.replace(V,(function(t,n){return n in e?e[n]:t})):t},B=function(t,e,n){var r=t[e],i=q(r,n);i!==r&&(t[e]=i)},z={onCreateRule:function(t,e,n){return"string"===typeof t&&U.test(t)?new F(t,e,n):null},onProcessStyle:function(t,e,n){return"style"===e.type&&n?("animation-name"in t&&B(t,"animation-name",n.keyframes),"animation"in t&&B(t,"animation",n.keyframes),t):t},onChangeValue:function(t,e,n){var r=n.options.sheet;if(!r)return t;switch(e){case"animation":case"animation-name":return q(t,r.keyframes);default:return t}}},W=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).renderable=void 0,e}return Object(y.a)(e,t),e.prototype.toString=function(t){var e=this.options.sheet,n=!!e&&e.options.link?Object(r.a)({},t,{allowEmpty:!0}):t;return S(this.key,this.style,n)},e}(x),H={onCreateRule:function(t,e,n){return n.parent&&"keyframes"===n.parent.type?new W(t,e,n):null}},K=function(){function t(t,e,n){this.type="font-face",this.at="@font-face",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=t,this.style=e,this.options=n}return t.prototype.toString=function(t){if(Array.isArray(this.style)){for(var e="",n=0;n<this.style.length;n++)e+=S(this.at,this.style[n]),this.style[n+1]&&(e+="\n");return e}return S(this.at,this.style,t)},t}(),G=/@font-face/,Q={onCreateRule:function(t,e,n){return G.test(t)?new K(t,e,n):null}},$=function(){function t(t,e,n){this.type="viewport",this.at="@viewport",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=t,this.style=e,this.options=n}return t.prototype.toString=function(t){return S(this.key,this.style,t)},t}(),X={onCreateRule:function(t,e,n){return"@viewport"===t||"@-ms-v
2iewport"===t?new $(t,e,n):null}},Y=function(){function t(t,e,n){this.type="simple",this.key=void 0,this.value=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=t,this.value=e,this.options=n}return t.prototype.toString=function(t){if(Array.isArray(this.value)){for(var e="",n=0;n<this.value.length;n++)e+=this.key+" "+this.value[n]+";",this.value[n+1]&&(e+="\n");return e}return this.key+" "+this.value+";"},t}(),J={"@charset":!0,"@import":!0,"@namespace":!0},Z=[A,L,z,H,Q,X,{onCreateRule:function(t,e,n){return t in J?new Y(t,e,n):null}}],tt={process:!0},et={force:!0,process:!0},nt=function(){function t(t){this.map={},this.raw={},this.index=[],this.counter=0,this.options=void 0,this.classes=void 0,this.keyframes=void 0,this.options=t,this.classes=t.classes,this.keyframes=t.keyframes}var e=t.prototype;return e.add=function(t,e,n){var i=this.options,o=i.parent,a=i.sheet,s=i.jss,u=i.Renderer,c=i.generateId,l=i.scoped,h=Object(r.a)({classes:this.classes,parent:o,sheet:a,jss:s,Renderer:u,generateId:c,scoped:l,name:t},n),f=t;t in this.raw&&(f=t+"-d"+this.counter++),this.raw[f]=e,f in this.classes&&(h.selector="."+k(this.classes[f]));var p=_(f,e,h);if(!p)return null;this.register(p);var d=void 0===h.index?this.index.length:h.index;return this.index.splice(d,0,p),p},e.get=function(t){return this.map[t]},e.remove=function(t){this.unregister(t),delete this.raw[t.key],this.index.splice(this.index.indexOf(t),1)},e.indexOf=function(t){return this.index.indexOf(t)},e.process=function(){var t=this.options.jss.plugins;this.index.slice(0).forEach(t.onProcessRule,t)},e.register=function(t){this.map[t.key]=t,t instanceof N?(this.map[t.selector]=t,t.id&&(this.classes[t.key]=t.id)):t instanceof F&&this.keyframes&&(this.keyframes[t.name]=t.id)},e.unregister=function(t){delete this.map[t.key],t instanceof N?(delete this.map[t.selector],delete this.classes[t.key]):t instanceof F&&delete this.keyframes[t.name]},e.update=function(){var t,e,n;if("string"===typeof(arguments.length<=0?void 0:arguments[0])?(t=arguments.length<=0?void 0:arguments[0],e=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(e=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],t=null),t)this.updateOne(this.map[t],e,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],e,n)},e.updateOne=function(e,n,r){void 0===r&&(r=tt);var i=this.options,o=i.jss.plugins,a=i.sheet;if(e.rules instanceof t)e.rules.update(n,r);else{var s=e,u=s.style;if(o.onUpdate(n,e,a,r),r.process&&u&&u!==s.style){for(var c in o.onProcessStyle(s.style,s,a),s.style){var l=s.style[c];l!==u[c]&&s.prop(c,l,et)}for(var h in u){var f=s.style[h],p=u[h];null==f&&f!==p&&s.prop(h,null,et)}}}},e.toString=function(t){for(var e="",n=this.options.sheet,r=!!n&&n.options.link,i=0;i<this.index.length;i++){var o=this.index[i].toString(t);(o||r)&&(e&&(e+="\n"),e+=o)}return e},t}(),rt=function(){function t(t,e){for(var n in this.options=void 0,this.deployed=void 0,this.attached=void 0,this.rules=void 0,this.renderer=void 0,this.classes=void 0,this.keyframes=void 0,this.queue=void 0,this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Object(r.a)({},e,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),e.Renderer&&(this.renderer=new e.Renderer(this)),this.rules=new nt(this.options),t)this.rules.add(n,t[n]);this.rules.process()}var e=t.prototype;return e.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},e.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},e.addRule=function(t,e,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(t,e,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},e.insertRule=function(t){this.renderer&&this.renderer.insertRule(t)},e.addRules=function(t,e){var n=[];for(var r in t){var i=this.addRule(r,t[r],e);i&&n.push(i)}return n},e.getRule=function(t){return this.rules.get(t)},e.deleteRule=function(t){var e="object"===typeof t?t:this.rules.get(t);return!!e&&(this.rules.remove(e),!(this.attached&&e.renderable&&this.renderer)||this.renderer.deleteRule(e.renderable))},e.indexOf=function(t){return this.rules.indexOf(t)},e.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},e.update=function(){var t;return(t=this.rules).update.apply(t,arguments),this},e.updateOne=function(t,e,n){return this.rules.updateOne(t,e,n),this},e.toString=function(t){return this.rules.toString(t)},t}(),it=function(){function t(){this.plugins={internal:[],external:[]},this.registry=void 0}var e=t.prototype;return e.onCreateRule=function(t,e,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](t,e,n);if(i)return i}return null},e.onProcessRule=function(t){if(!t.isProcessed){for(var e=t.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](t,e);t.style&&this.onProcessStyle(t.style,t,e),t.isProcessed=!0}},e.onProcessStyle=function(t,e,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)e.style=this.registry.onProcessStyle[r](e.style,e,n)},e.onProcessSheet=function(t){for(var e=0;e<this.registry.onProcessSheet.length;e++)this.registry.onProcessSheet[e](t)},e.onUpdate=function(t,e,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](t,e,n,r)},e.onChangeValue=function(t,e,n){for(var r=t,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,e,n);return r},e.use=function(t,e){void 0===e&&(e={queue:"external"});var n=this.plugins[e.queue];-1===n.indexOf(t)&&(n.push(t),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(t,e){for(var n in e)n in t&&t[n].push(e[n]);return t}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},t}(),ot=new(function(){function t(){this.registry=[]}var e=t.prototype;return e.add=function(t){var e=this.registry,n=t.options.index;if(-1===e.indexOf(t))if(0===e.length||n>=this.index)e.push(t);else for(var r=0;r<e.length;r++)if(e[r].options.index>n)return void e.splice(r,0,t)},e.reset=function(){this.registry=[]},e.remove=function(t){var e=this.registry.indexOf(t);this.registry.splice(e,1)},e.toString=function(t){for(var e=void 0===t?{}:t,n=e.attached,r=Object(i.a)(e,["attached"]),o="",a=0;a<this.registry.length;a++){var s=this.registry[a];null!=n&&s.attached!==n||(o&&(o+="\n"),o+=s.toString(r))}return o},v(t,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),t}()),at="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),st="2f1acc6c3a606b082e5eef5e54414ffb";null==at[st]&&(at[st]=0);var ut=at[st]++,ct=function(t){void 0===t&&(t={});var e=0;return function(n,r){e+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),t.minify?""+(o||"c")+ut+i+e:o+n.key+"-"+ut+(i?"-"+i:"")+"-"+e}},lt=function(t){var e;return function(){return e||(e=t()),e}};function ht(t,e){try{return t.attributeStyleMap?t.attributeStyleMap.get(e):t.style.getPropertyValue(e)}catch(n){return""}}function ft(t,e,n){try{var r=n;if(Array.isArray(n)&&(r=E(n,!0),"!important"===n[n.length-1]))return t.style.setProperty(e,r,"important"),!0;t.attributeStyleMap?t.attributeStyleMap.set(e,r):t.style.setProperty(e,r)}catch(i){return!1}return!0}function pt(t,e){try{t.attributeStyleMap?t.attributeStyleMap.delete(e):t.style.removeProperty(e)}catch(n){}}function dt(t,e){return t.selectorText=e,t.selectorText===e}var vt=lt((function(){return document.querySelector("head")}));function yt(t){var e=ot.registry;if(e.length>0){var n=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.attached&&r.options.index>e.index&&r.options.insertionPoint===e.insertionPoint)return r}return null}(e,t);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t[n];if(r.attached&&r.options.insertionPoint===e.insertionPoint)return r}return null}(e,t))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=t.insertionPoint;if(r&&"string"===typeof r){var i=function(t){for(var e=vt(),n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===t)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var gt=lt((function(){var t=document.querySelector('meta[property="csp-nonce"]');return t?t.getAttribute("content"):null})),mt=function(t,e,n){var r=t.cssRules.length;(void 0===n||n>r)&&(n=r);try{if("insertRule"in t)t.insertRule(e,n);else if("appendRule"in t){t.appendRule(e)}}catch(i){return!1}return t.cssRules[n]},bt=function(){function t(t){this.getPropertyValue=ht,this.setProperty=ft,this.removeProperty=pt,this.setSelector=dt,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,t&&ot.add(t),this.sheet=t;var e=this.sheet?this.sheet.options:{},n=e.media,r=e.meta,i=e.element;this.element=i||function(){var t=document.createElement("style");return t.textContent="\n",t}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=gt();o&&this.element.setAttribute("nonce",o)}var e=t.prototype;return e.attach=function(){if(!this.element.parentNode&&this.sheet){!function(t,e){var n=e.insertionPoint,r=yt(e);if(!1!==r&&r.parent)r.parent.insertBefore(t,r.node);else if(n&&"number"===typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(t,i.nextSibling)}else vt().appendChild(t)}(this.element,this.sheet.options);var t=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&t&&(this.hasInsertedRules=!1,this.deploy())}},e.detach=function(){var t=this.element.parentNode;t&&t.removeChild(this.element)},e.deploy=function(){var t=this.sheet;t&&(t.options.link?this.insertRules(t.rules):this.element.textContent="\n"+t.toString()+"\n")},e.insertRules=function(t,e){for(var n=0;n<t.index.length;n++)this.insertRule(t.index[n],n,e)},e.insertRule=function(t,e,n){if(void 0===n&&(n=this.element.sheet),t.rules){var r=t,i=n;return("conditional"!==t.type&&"keyframes"!==t.type||!1!==(i=mt(n,r.toString({children:!1}),e)))&&(this.insertRules(r.rules,i),i)}if(t.renderable&&t.renderable.parentStyleSheet===this.element.sheet)return t.renderable;var o=t.toString();if(!o)return!1;var a=mt(n,o,e);return!1!==a&&(this.hasInsertedRules=!0,t.renderable=a,a)},e.deleteRule=function(t){var e=this.element.sheet,n=this.indexOf(t);return-1!==n&&(e.deleteRule(n),!0)},e.indexOf=function(t){for(var e=this.element.sheet.cssRules,n=0;n<e.length;n++)if(t===e[n])return n;return-1},e.replaceRule=function(t,e){var n=this.indexOf(t);return-1!==n&&(this.element.sheet.deleteRule(n),this.insertRule(e,n))},e.getRules=function(){return this.element.sheet.cssRules},t}(),_t=0,wt=function(){function t(t){this.id=_t++,this.version="10.3.0",this.plugins=new it,this.options={id:{minify:!1},createGenerateId:ct,Renderer:p?bt:null,plugins:[]},this.generateId=ct({minify:!1});for(var e=0;e<Z.length;e++)this.plugins.use(Z[e],{queue:"internal"});this.setup(t)}var e=t.prototype;return e.setup=function(t){return void 0===t&&(t={}),t.createGenerateId&&(this.options.createGenerateId=t.createGenerateId),t.id&&(this.options.id=Object(r.a)({},this.options.id,t.id)),(t.createGenerateId||t.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=t.insertionPoint&&(this.options.insertionPoint=t.insertionPoint),"Renderer"in t&&(this.options.Renderer=t.Renderer),t.plugins&&this.use.apply(this,t.plugins),this},e.createStyleSheet=function(t,e){void 0===e&&(e={});var n=e.index;"number"!==typeof n&&(n=0===ot.index?0:ot.index+1);var i=new rt(t,Object(r.a)({},e,{jss:this,generateId:e.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(i),i},e.removeStyleSheet=function(t){return t.detach(),ot.remove(t),this},e.createRule=function(t,e,n){if(void 0===e&&(e={}),void 0===n&&(n={}),"object"===typeof t)return this.createRule(void 0,t,e);var i=Object(r.a)({},n,{name:t,jss:this,Renderer:this.options.Renderer});i.generateId||(i.generateId=this.generateId),i.classes||(i.classes={}),i.keyframes||(i.keyframes={});var o=_(t,e,i);return o&&this.plugins.onProcessRule(o),o},e.use=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];
2return n.forEach((function(e){t.plugins.use(e)})),this},t}();var Et="undefined"!==typeof CSS&&CSS&&"number"in CSS,Tt=function(t){return new wt(t)};Tt();function St(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.baseClasses,n=t.newClasses;t.Component;if(!n)return e;var i=Object(r.a)({},e);return Object.keys(n).forEach((function(t){n[t]&&(i[t]="".concat(e[t]," ").concat(n[t]))})),i}var It={set:function(t,e,n,r){var i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(n,r)},get:function(t,e,n){var r=t.get(e);return r?r.get(n):void 0},delete:function(t,e,n){t.get(e).delete(n)}};var Ct=s.a.createContext(null);function kt(){return s.a.useContext(Ct)}var xt="function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",Nt=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var At=Date.now(),Ot="fnValues"+At,Pt="fnStyle"+ ++At;var Rt=function(){return{onCreateRule:function(t,e,n){if("function"!==typeof e)return null;var r=_(t,{},n);return r[Pt]=e,r},onProcessStyle:function(t,e){if(Ot in e||Pt in e)return t;var n={};for(var r in t){var i=t[r];"function"===typeof i&&(delete t[r],n[r]=i)}return e[Ot]=n,t},onUpdate:function(t,e,n,r){var i=e,o=i[Pt];o&&(i.style=o(t)||{});var a=i[Ot];if(a)for(var s in a)i.prop(s,a[s](t),r)}}},Dt="@global",Lt=function(){function t(t,e,n){for(var i in this.type="global",this.at=Dt,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=t,this.options=n,this.rules=new nt(Object(r.a)({},n,{parent:this})),e)this.rules.add(i,e[i]);this.rules.process()}var e=t.prototype;return e.getRule=function(t){return this.rules.get(t)},e.addRule=function(t,e,n){var r=this.rules.add(t,e,n);return this.options.jss.plugins.onProcessRule(r),r},e.indexOf=function(t){return this.rules.indexOf(t)},e.toString=function(){return this.rules.toString()},t}(),Mt=function(){function t(t,e,n){this.type="global",this.at=Dt,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=t,this.options=n;var i=t.substr("@global ".length);this.rule=n.jss.createRule(i,e,Object(r.a)({},n,{parent:this}))}return t.prototype.toString=function(t){return this.rule?this.rule.toString(t):""},t}(),jt=/\s*,\s*/g;function Ft(t,e){for(var n=t.split(jt),r="",i=0;i<n.length;i++)r+=e+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}var Ut=function(){return{onCreateRule:function(t,e,n){if(!t)return null;if(t===Dt)return new Lt(t,e,n);if("@"===t[0]&&"@global "===t.substr(0,"@global ".length))return new Mt(t,e,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),!1===n.scoped&&(n.selector=t),null},onProcessRule:function(t){"style"===t.type&&(function(t){var e=t.options,n=t.style,i=n?n[Dt]:null;if(i){for(var o in i)e.sheet.addRule(o,i[o],Object(r.a)({},e,{selector:Ft(o,t.selector)}));delete n[Dt]}}(t),function(t){var e=t.options,n=t.style;for(var i in n)if("@"===i[0]&&i.substr(0,Dt.length)===Dt){var o=Ft(i.substr(Dt.length),t.selector);e.sheet.addRule(o,n[i],Object(r.a)({},e,{selector:o})),delete n[i]}}(t))}}},Vt=/\s*,\s*/g,qt=/&/g,Bt=/\$([\w-]+)/g;var zt=function(){function t(t,e){return function(n,r){var i=t.getRule(r)||e&&e.getRule(r);return i?(i=i).selector:r}}function e(t,e){for(var n=e.split(Vt),r=t.split(Vt),i="",o=0;o<n.length;o++)for(var a=n[o],s=0;s<r.length;s++){var u=r[s];i&&(i+=", "),i+=-1!==u.indexOf("&")?u.replace(qt,a):a+" "+u}return i}function n(t,e,n){if(n)return Object(r.a)({},n,{index:n.index+1});var i=t.options.nestingLevel;i=void 0===i?1:i+1;var o=Object(r.a)({},t.options,{nestingLevel:i,index:e.indexOf(t)+1});return delete o.name,o}return{onProcessStyle:function(i,o,a){if("style"!==o.type)return i;var s,u,c=o,l=c.options.parent;for(var h in i){var f=-1!==h.indexOf("&"),p="@"===h[0];if(f||p){if(s=n(c,l,s),f){var d=e(h,c.selector);u||(u=t(l,a)),d=d.replace(Bt,u),l.addRule(d,i[h],Object(r.a)({},s,{selector:d}))}else p&&l.addRule(h,{},s).addRule(c.key,i[h],{selector:c.selector});delete i[h]}}return i}}},Wt=/[A-Z]/g,Ht=/^ms-/,Kt={};function Gt(t){return"-"+t.toLowerCase()}var Qt=function(t){if(Kt.hasOwnProperty(t))return Kt[t];var e=t.replace(Wt,Gt);return Kt[t]=Ht.test(e)?"-"+e:e};function $t(t){var e={};for(var n in t){e[0===n.indexOf("--")?n:Qt(n)]=t[n]}return t.fallbacks&&(Array.isArray(t.fallbacks)?e.fallbacks=t.fallbacks.map($t):e.fallbacks=$t(t.fallbacks)),e}var Xt=function(){return{onProcessStyle:function(t){if(Array.isArray(t)){for(var e=0;e<t.length;e++)t[e]=$t(t[e]);return t}return $t(t)},onChangeValue:function(t,e,n){if(0===e.indexOf("--"))return t;var r=Qt(e);return e===r?t:(n.prop(r,t),null)}}},Yt=Et&&CSS?CSS.px:"px",Jt=Et&&CSS?CSS.ms:"ms",Zt=Et&&CSS?CSS.percent:"%";function te(t){var e=/(-[a-z])/g,n=function(t){return t[1].toUpperCase()},r={};for(var i in t)r[i]=t[i],r[i.replace(e,n)]=t[i];return r}var ee=te({"animation-delay":Jt,"animation-duration":Jt,"background-position":Yt,"background-position-x":Yt,"background-position-y":Yt,"background-size":Yt,border:Yt,"border-bottom":Yt,"border-bottom-left-radius":Yt,"border-bottom-right-radius":Yt,"border-bottom-width":Yt,"border-left":Yt,"border-left-width":Yt,"border-radius":Yt,"border-right":Yt,"border-right-width":Yt,"border-top":Yt,"border-top-left-radius":Yt,"border-top-right-radius":Yt,"border-top-width":Yt,"border-width":Yt,margin:Yt,"margin-bottom":Yt,"margin-left":Yt,"margin-right":Yt,"margin-top":Yt,padding:Yt,"padding-bottom":Yt,"padding-left":Yt,"padding-right":Yt,"padding-top":Yt,"mask-
2position-x":Yt,"mask-position-y":Yt,"mask-size":Yt,height:Yt,width:Yt,"min-height":Yt,"max-height":Yt,"min-width":Yt,"max-width":Yt,bottom:Yt,left:Yt,top:Yt,right:Yt,"box-shadow":Yt,"text-shadow":Yt,"column-gap":Yt,"column-rule":Yt,"column-rule-width":Yt,"column-width":Yt,"font-size":Yt,"font-size-delta":Yt,"letter-spacing":Yt,"text-indent":Yt,"text-stroke":Yt,"text-stroke-width":Yt,"word-spacing":Yt,motion:Yt,"motion-offset":Yt,outline:Yt,"outline-offset":Yt,"outline-width":Yt,perspective:Yt,"perspective-origin-x":Zt,"perspective-origin-y":Zt,"transform-origin":Zt,"transform-origin-x":Zt,"transform-origin-y":Zt,"transform-origin-z":Zt,"transition-delay":Jt,"transition-duration":Jt,"vertical-align":Yt,"flex-basis":Yt,"shape-margin":Yt,size:Yt,grid:Yt,"grid-gap":Yt,"grid-row-gap":Yt,"grid-column-gap":Yt,"grid-template-rows":Yt,"grid-template-columns":Yt,"grid-auto-rows":Yt,"grid-auto-columns":Yt,"box-shadow-x":Yt,"box-shadow-y":Yt,"box-shadow-blur":Yt,"box-shadow-spread":Yt,"font-line-height":Yt,"text-shadow-x":Yt,"text-shadow-y":Yt,"text-shadow-blur":Yt});function ne(t,e,n){if(!e)return e;if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]=ne(t,e[r],n);else if("object"===typeof e)if("fallbacks"===t)for(var i in e)e[i]=ne(i,e[i],n);else for(var o in e)e[o]=ne(t+"-"+o,e[o],n);else if("number"===typeof e){var a=n[t]||ee[t];return a?"function"===typeof a?a(e).toString():""+e+a:e.toString()}return e}var re=function(t){void 0===t&&(t={});var e=te(t);return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r in t)t[r]=ne(r,t[r],e);return t},onChangeValue:function(t,n){return ne(n,t,e)}}};function ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function oe(t,e){if(t){if("string"===typeof t)return ie(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ie(t,e):void 0}}function ae(t){return function(t){if(Array.isArray(t))return ie(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||oe(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var se="",ue="",ce="",le="",he=p&&"ontouchstart"in document.documentElement;if(p){var fe={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},pe=document.createElement("p").style;for(var de in fe)if(de+"Transform"in pe){se=de,ue=fe[de];break}"Webkit"===se&&"msHyphens"in pe&&(se="ms",ue=fe.ms,le="edge"),"Webkit"===se&&"-apple-trailing-word"in pe&&(ce="apple")}var ve=se,ye=ue,ge=ce,me=le,be=he;var _e={noPrefill:["appearance"],supportedProperty:function(t){return"appearance"===t&&("ms"===ve?"-webkit-"+t:ye+t)}},we={noPrefill:["color-adjust"],supportedProperty:function(t){return"color-adjust"===t&&("Webkit"===ve?ye+"print-"+t:t)}},Ee=/[-\s]+(.)?/g;function Te(t,e){return e?e.toUpperCase():""}function Se(t){return t.replace(Ee,Te)}function Ie(t){return Se("-"+t)}var Ce,ke={noPrefill:["mask"],supportedProperty:function(t,e){if(!/^mask/.test(t))return!1;if("Webkit"===ve){if(Se("mask-image")in e)return t;if(ve+Ie("mask-image")in e)return ye+t}return t}},xe={noPrefill:["text-orientation"],supportedProperty:function(t){return"text-orientation"===t&&("apple"!==ge||be?t:ye+t)}},Ne={noPrefill:["transform"],supportedProperty:function(t,e,n){return"transform"===t&&(n.transform?t:ye+t)}},Ae={noPrefill:["transition"],supportedProperty:function(t,e,n){return"transition"===t&&(n.transition?t:ye+t)}},Oe={noPrefill:["writing-mode"],supportedProperty:function(t){return"writing-mode"===t&&("Webkit"===ve||"ms"===ve&&"edge"!==me?ye+t:t)}},Pe={noPrefill:["user-select"],supportedProperty:function(t){return"user-select"===t&&("Moz"===ve||"ms"===ve||"apple"===ge?ye+t:t)}},Re={supportedProperty:function(t,e){return!!/^break-/.test(t)&&("Webkit"===ve?"WebkitColumn"+Ie(t)in e&&ye+"column-"+t:"Moz"===ve&&("page"+Ie(t)in e&&"page-"+t))}}
vendor: 4,194 bytes, line 2
2,De={supportedProperty:function(t,e){if(!/^(border|margin|padding)-inline/.test(t))return!1;if("Moz"===ve)return t;var n=t.replace("-inline","");return ve+Ie(n)in e&&ye+n}},Le={supportedProperty:function(t,e){return Se(t)in e&&t}},Me={supportedProperty:function(t,e){var n=Ie(t);return"-"===t[0]||"-"===t[0]&&"-"===t[1]?t:ve+n in e?ye+t:"Webkit"!==ve&&"Webkit"+n in e&&"-webkit-"+t}},je={supportedProperty:function(t){return"scroll-snap"===t.substring(0,11)&&("ms"===ve?""+ye+t:t)}},Fe={supportedProperty:function(t){return"overscroll-behavior"===t&&("ms"===ve?ye+"scroll-chaining":t)}},Ue={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},Ve={supportedProperty:function(t,e){var n=Ue[t];return!!n&&(ve+Ie(n)in e&&ye+n)}},qe={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},Be=Object.keys(qe),ze=function(t){return ye+t},We=[_e,we,ke,xe,Ne,Ae,Oe,Pe,Re,De,Le,Me,je,Fe,Ve,{supportedProperty:function(t,e,n){var r=n.multiple;if(Be.indexOf(t)>-1){var i=qe[t];if(!Array.isArray(i))return ve+Ie(i)in e&&ye+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(ve+Ie(i[0])in e))return!1;return i.map(ze)}return!1}}],He=We.filter((function(t){return t.supportedProperty})).map((function(t){return t.supportedProperty})),Ke=We.filter((function(t){return t.noPrefill})).reduce((function(t,e){return t.push.apply(t,ae(e.noPrefill)),t}),[]),Ge={};if(p){Ce=document.createElement("p");var Qe=window.getComputedStyle(document.documentElement,"");for(var $e in Qe)isNaN($e)||(Ge[Qe[$e]]=Qe[$e]);Ke.forEach((function(t){return delete Ge[t]}))}function Xe(t,e){if(void 0===e&&(e={}),!Ce)return t;if(null!=Ge[t])return Ge[t];"transition"!==t&&"transform"!==t||(e[t]=t in Ce.style);for(var n=0;n<He.length&&(Ge[t]=He[n](t,Ce.style,e),!Ge[t]);n++);try{Ce.style[t]=""}catch(r){return!1}return Ge[t]}var Ye,Je={},Ze={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},tn=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function en(t,e,n){if("var"===e)return"var";if("all"===e)return"all";if("all"===n)return", all";var r=e?Xe(e):", "+Xe(n);return r||(e||n)}function nn(t,e){var n=e;if(!Ye||"content"===t)return e;if("string"!==typeof n||!isNaN(parseInt(n,10)))return n;var r=t+n;if(null!=Je[r])return Je[r];try{Ye.style[t]=n}catch(i){return Je[r]=!1,!1}if(Ze[t])n=n.replace(tn,en);else if(""===Ye.style[t]&&("-ms-flex"===(n=ye+n)&&(Ye.style[t]="-ms-flexbox"),Ye.style[t]=n,""===Ye.style[t]))return Je[r]=!1,!1;return Ye.style[t]="",Je[r]=n,Je[r]}p&&(Ye=document.createElement("p"));var rn=function(){function t(e){for(var n in e){var r=e[n];if("fallbacks"===n&&Array.isArray(r))e[n]=r.map(t);else{var i=!1,o=Xe(n);o&&o!==n&&(i=!0);var a=!1,s=nn(o,E(r));s&&s!==r&&(a=!0),(i||a)&&(i&&delete e[n],e[o||n]=s||r)}}return e}return{onProcessRule:function(t){if("keyframes"===t.type){var e=t;e.at="-"===(n=e.at)[1]||"ms"===ve?n:"@"+ye+"keyframes"+n.substr(10)}var n},onProcessStyle:function(e,n){return"style"!==n.type?e:t(e)},onChangeValue:function(t,e){return nn(e,E(t))||t}}};var on=function(){var t=function(t,e){return t.length===e.length?t>e?1:-1:t.length-e.length};return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r={},i=Object.keys(e).sort(t),o=0;o<i.length;o++)r[i[o]]=e[i[o]];return r}}};function an(){return{plugins:[Rt(),Ut(),zt(),Xt(),re(),"undefined"===typeof window?null:rn(),on()]}}var sn=Tt(an()),un={disableGeneration:!1,generateClassName:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.disableGlobal,n=void 0!==e&&e,r=t.productionPrefix,i=void 0===r?"jss":r,o=t.seed,a=void 0===o?"":o,s=""===a?"":"".concat(a,"-"),u=0,c=function(){return u+=1};return function(t,e){var r=e.options.name;if(r&&0===r.indexOf("Mui")&&!e.options.link&&!n){if(-1!==Nt.indexOf(t.key))return"Mui-".concat(t.key);var o="".concat(s).concat(r,"-").concat(t.key);return e.options.theme[xt]&&""===a?"".concat(o,"-").concat(c()):o}
2return"".concat(s).concat(i).concat(c())}}(),jss:sn,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},cn=s.a.createContext(un);var ln=-1e9;function hn(){return ln+=1}function fn(t){return(fn="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pn(t){return t&&"object"===fn(t)&&t.constructor===Object}function dn(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},i=n.clone?Object(r.a)({},t):t;return pn(t)&&pn(e)&&Object.keys(e).forEach((function(r){"__proto__"!==r&&(pn(e[r])&&r in t?i[r]=dn(t[r],e[r],n):i[r]=e[r])})),i}function vn(t){var e="function"===typeof t;return{create:function(n,i){var o;try{o=e?t(n):t}catch(u){throw u}if(!i||!n.overrides||!n.overrides[i])return o;var a=n.overrides[i],s=Object(r.a)({},o);return Object.keys(a).forEach((function(t){s[t]=dn(s[t],a[t])})),s},options:{}}}var yn={};function gn(t,e,n){var r=t.state;if(t.stylesOptions.disableGeneration)return e||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),e!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=e,i=!0),i&&(r.cacheClasses.value=St({baseClasses:r.cacheClasses.lastJSS,newClasses:e,Component:n})),r.cacheClasses.value}function mn(t,e){var n=t.state,i=t.theme,o=t.stylesOptions,a=t.stylesCreator,s=t.name;if(!o.disableGeneration){var u=It.get(o.sheetsManager,a,i);u||(u={refs:0,staticSheet:null,dynamicStyles:null},It.set(o.sheetsManager,a,i,u));var c=Object(r.a)(Object(r.a)(Object(r.a)({},a.options),o),{},{theme:i,flip:"boolean"===typeof o.flip?o.flip:"rtl"===i.direction});c.generateId=c.serverGenerateClassName||c.generateClassName;var l=o.sheetsRegistry;if(0===u.refs){var h;o.sheetsCache&&(h=It.get(o.sheetsCache,a,i));var f=a.create(i,s);h||((h=o.jss.createStyleSheet(f,Object(r.a)({link:!1},c))).attach(),o.sheetsCache&&It.set(o.sheetsCache,a,i,h)),l&&l.add(h),u.staticSheet=h,u.dynamicStyles=function t(e){var n=null;for(var r in e){var i=e[r],o=typeof i;if("function"===o)n||(n={}),n[r]=i;else if("object"===o&&null!==i&&!Array.isArray(i)){var a=t(i);a&&(n||(n={}),n[r]=a)}}return n}(f)}if(u.dynamicStyles){var p=o.jss.createStyleSheet(u.dynamicStyles,Object(r.a)({link:!0},c));p.update(e),p.attach(),n.dynamicSheet=p,n.classes=St({baseClasses:u.staticSheet.classes,newClasses:p.classes}),l&&l.add(p)}else n.classes=u.staticSheet.classes;u.refs+=1}}function bn(t,e){var n=t.state;n.dynamicSheet&&n.dynamicSheet.update(e)}function _n(t){var e=t.state,n=t.theme,r=t.stylesOptions,i=t.stylesCreator;if(!r.disableGeneration){var o=It.get(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(It.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),e.dynamicSheet&&(r.jss.removeStyleSheet(e.dynamicSheet),a&&a.remove(e.dynamicSheet))}}function wn(t,e){var n,r=s.a.useRef([]),i=s.a.useMemo((function(){return{}}),e);r.current!==i&&(r.current=i,n=t()),s.a.useEffect((function(){return function(){n&&n()}}),[i])}function En(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.name,i=e.classNamePrefix,a=e.Component,u=e.defaultTheme,c=void 0===u?yn:u,l=o(e,["name","classNamePrefix","Component","defaultTheme"]),h=vn(t),f=n||i||"makeStyles";h.options={index:hn(),name:n,meta:f,classNamePrefix:f};var p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=kt()||c,i=Object(r.a)(Object(r.a)({},s.a.useContext(cn)),l),o=s.a.useRef(),u=s.a.useRef();
2wn((function(){var r={name:n,state:{},stylesCreator:h,stylesOptions:i,theme:e};return mn(r,t),u.current=!1,o.current=r,function(){_n(r)}}),[e,h]),s.a.useEffect((function(){u.current&&bn(o.current,t),u.current=!0}));var f=gn(o.current,t.classes,a);return f};return p}function Tn(t){var e=t.theme,n=t.name,r=t.props;if(!e||!e.props||!e.props[n])return r;var i,o=e.props[n];for(i in o)void 0===r[i]&&(r[i]=o[i]);return r}var Sn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var i=e.defaultTheme,a=e.withTheme,u=void 0!==a&&a,c=e.name,l=o(e,["defaultTheme","withTheme","name"]);var f=c,p=En(t,Object(r.a)({defaultTheme:i,Component:n,name:c||n.displayName,classNamePrefix:f},l)),d=s.a.forwardRef((function(t,e){t.classes;var a,l=t.innerRef,h=o(t,["classes","innerRef"]),f=p(Object(r.a)(Object(r.a)({},n.defaultProps),t)),d=h;return("string"===typeof c||u)&&(a=kt()||i,c&&(d=Tn({theme:a,name:c,props:h})),u&&!d.theme&&(d.theme=a)),s.a.createElement(n,Object(r.a)({ref:l||e,classes:f},d))}));return h()(d,n),d}};function In(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Cn=["xs","sm","md","lg","xl"];function kn(t){var e=t.values,n=void 0===e?{xs:0,sm:600,md:960,lg:1280,xl:1920}:e,i=t.unit,a=void 0===i?"px":i,s=t.step,u=void 0===s?5:s,c=o(t,["values","unit","step"]);function l(t){var e="number"===typeof n[t]?n[t]:t;return"@media (min-width:".concat(e).concat(a,")")}function h(t,e){var r=Cn.indexOf(e);return r===Cn.length-1?l(t):"@media (min-width:".concat("number"===typeof n[t]?n[t]:t).concat(a,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[Cn[r+1]]?n[Cn[r+1]]:e)-u/100).concat(a,")")}return Object(r.a)({keys:Cn,values:n,up:l,down:function(t){var e=Cn.indexOf(t)+1,r=n[Cn[e]];return e===Cn.length?l("xs"):"@media (max-width:".concat(("number"===typeof r&&e>0?r:t)-u/100).concat(a,")")},between:h,only:function(t){return h(t,t)},width:function(t){return n[t]}},c)}function xn(t,e,n){var i;return Object(r.a)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(r.a)({paddingLeft:e(2),paddingRight:e(2)},n,In({},t.up("sm"),Object(r.a)({paddingLeft:e(3),paddingRight:e(3)},n[t.up("sm")])))},toolbar:(i={minHeight:56},In(i,"".concat(t.up("xs")," and (orientation: landscape)"),{minHeight:48}),In(i,t.up("sm"),{minHeight:64}),i)},n)}function Nn(t){for(var e="https://material-ui.com/production-error/?code="+t,n=1;n<arguments.length;n+=1)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+t+"; visit "+e+" for the full message."}var An={black:"#000",white:"#fff"},On={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},Pn={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},Rn={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},Dn={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Ln={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Mn={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},jn={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function Fn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(e,t),n)}function Un(t){if(t.type)return t;if("#"===t.charAt(0))return Un(function(t){t=t.substr(1);var e=new RegExp(".{1,".concat(t.length>=6?2:1,"}"),"g"),n=t.match(e);return n&&1===n[0].length&&(n=n.map((function(t){return t+t}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(t,e){return e<3?parseInt(t,16):Math.round(parseInt(t,16)/255*1e3)/1e3})).join(", "),")"):""}(t));var e=t.indexOf("("),n=t.substring(0,e);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Nn(3,t));var r=t.substring(e+1,t.length-1).split(",");return{type:n,values:r=r.map((function(t){return parseFloat(t)}))}}function Vn(t){var e=t.type,n=t.values;return-1!==e.indexOf("rgb")?n=n.map((function(t,e){return e<3?parseInt(t,10):t})):-1!==e.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(e,"(").concat(n.join(", "),")")}function qn(t){var e="hsl"===(t=Un(t)).type?Un(function(t){var e=(t=Un(t)).values,n=e[0],r=e[1]/100,i=e[2]/100,o=r*Math.min(i,1-i),a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+n/30)%12;
2return i-o*Math.max(Math.min(e-3,9-e,1),-1)},s="rgb",u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===t.type&&(s+="a",u.push(e[3])),Vn({type:s,values:u})}(t)).values:t.values;return e=e.map((function(t){return(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)})),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function Bn(t,e){if(t=Un(t),e=Fn(e),-1!==t.type.indexOf("hsl"))t.values[2]*=1-e;else if(-1!==t.type.indexOf("rgb"))for(var n=0;n<3;n+=1)t.values[n]*=1-e;return Vn(t)}function zn(t,e){if(t=Un(t),e=Fn(e),-1!==t.type.indexOf("hsl"))t.values[2]+=(100-t.values[2])*e;else if(-1!==t.type.indexOf("rgb"))for(var n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;return Vn(t)}var Wn={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:An.white,default:On[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Hn={text:{primary:An.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:On[800],default:"#303030"},action:{active:An.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Kn(t,e,n,r){var i=r.light||r,o=r.dark||1.5*r;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:"light"===e?t.light=zn(t.main,i):"dark"===e&&(t.dark=Bn(t.main,o)))}function Gn(t){var e=t.primary,n=void 0===e?{light:Pn[300],main:Pn[500],dark:Pn[700]}:e,i=t.secondary,a=void 0===i?{light:Rn.A200,main:Rn.A400,dark:Rn.A700}:i,s=t.error,u=void 0===s?{light:Dn[300],main:Dn[500],dark:Dn[700]}:s,c=t.warning,l=void 0===c?{light:Ln[300],main:Ln[500],dark:Ln[700]}:c,h=t.info,f=void 0===h?{light:Mn[300],main:Mn[500],dark:Mn[700]}:h,p=t.success,d=void 0===p?{light:jn[300],main:jn[500],dark:jn[700]}:p,v=t.type,y=void 0===v?"light":v,g=t.contrastThreshold,m=void 0===g?3:g,b=t.tonalOffset,_=void 0===b?.2:b,w=o(t,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function E(t){return function(t,e){var n=qn(t),r=qn(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(t,Hn.text.primary)>=m?Hn.text.primary:Wn.text.primary}var T=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(t=Object(r.a)({},t)).main&&t[e]&&(t.main=t[e]),!t.main)throw new Error(Nn(4,e));if("string"!==typeof t.main)throw new Error(Nn(5,JSON.stringify(t.main)));return Kn(t,"light",n,_),Kn(t,"dark",i,_),t.contrastText||(t.contrastText=E(t.main)),t},S={dark:Hn,light:Wn};return dn(Object(r.a)({common:An,type:y,primary:T(n),secondary:T(a,"A400","A200","A700"),error:T(u),warning:T(l),info:T(f),success:T(d),grey:On,contrastThreshold:m,getContrastText:E,augmentColor:T,tonalOffset:_},S[y]),w)}function Qn(t){return Math.round(1e5*t)/1e5}var $n={textTransform:"uppercase"};function Xn(t,e){var n="function"===typeof e?e(t):e,i=n.fontFamily,a=void 0===i?'"Roboto", "Helvetica", "Arial", sans-serif':i,s=n.fontSize,u=void 0===s?14:s,c=n.fontWeightLight,l=void 0===c?300:c,h=n.fontWeightRegular,f=void 0===h?400:h,p=n.fontWeightMedium,d=void 0===p?500:p,v=n.fontWeightBold,y=void 0===v?700:v,g=n.htmlFontSize,m=void 0===g?16:g,b=n.allVariants,_=n.pxToRem,w=o(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var E=u/14,T=_||function(t){return"".concat(t/m*E,"rem")},S=function(t,e,n,i,o){return Object(r.a)({fontFamily:a,fontWeight:t,fontSize:T(e),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===a?{letterSpacing:"".concat(Qn(i/e),"em")}:{},o,b)},I={h1:S(l,96,1.167,-1.5),h2:S(l,60,1.2,-.5),h3:S(f,48,1.167,0),h4:S(f,34,1.235,.25),h5:S(f,24,1.334,0),h6:S(d,20,1.6,.15),subtitle1:S(f,16,1.75,.15),subtitle2:S(d,14,1.57,.1),body1:S(f,16,1.5,.15),body2:S(f,14,1.43,.15),button:S(d,14,1.75,.4,$n),caption:S(f,12,1.66,.4),overline:S(f,12,2.66,1,$n)};return dn(Object(r.a)({htmlFontSize:m,pxToRem:T,round:Qn,fontFamily:a,fontSize:u,fontWeightLight:l,fontWeightRegular:f,fontWeightMedium:d,fontWeightBold:y},I),w,{clone:!1})}function Yn(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var Jn=["none",Yn(0,2,1,-1,0,1,1,0,0,1,3,0),Yn(0,3,1,-2,0,2,2,0,0,1,5,0),Yn(0,3,3,-2,0,3,4,0,0,1,8,0),Yn(0,2,4,-1,0,4,5,0,0,1,10,0),Yn(0,3,5,-1,0,5,8,0,0,1,14,0),Yn(0,3,5,-1,0,6,10,0,0,1,18,0),Yn(0,4,5,-2,0,7,10,1,0,2,16,1),Yn(0,5,5,-3,0,8,10,1,0,3,14,2),Yn(0,5,6,-3,0,9,12,1,0,3,16,2),Yn(0,6,6,-3,0,10,14,1,0,4,18,3),Yn(0,6,7,-4,0,11,15,1,0,4,20,3),Yn(0,7,8,-4,0,12,17,2,0,5,22,4),Yn(0,7,8,-4,0,13,19,2,0,5,24,4),Yn(0,7,9,-4,0,14,21,2,0,5,26,4),Yn(0,8,9,-5,0,15,22,2,0,6,28,5),Yn(0,8,10,-5,0,16,24,2,0,6,30,5),Yn(0,8,11,-5,0,17,26,2,0,6,32,5),Yn(0,9,11,-5,0,18,28,2,0,7,34,6),Yn(0,9,12,-6,0,19,29,2,0,7,36,6
2),Yn(0,10,13,-6,0,20,31,3,0,8,38,7),Yn(0,10,13,-6,0,21,33,3,0,8,40,7),Yn(0,10,14,-6,0,22,35,3,0,8,42,7),Yn(0,11,14,-7,0,23,36,3,0,9,44,8),Yn(0,11,15,-7,0,24,38,3,0,9,46,8)],Zn={borderRadius:4};function tr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(t,e)||oe(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var er=function(t,e){return e?dn(t,e,{clone:!1}):t},nr={xs:0,sm:600,md:960,lg:1280,xl:1920},rr={keys:["xs","sm","md","lg","xl"],up:function(t){return"@media (min-width:".concat(nr[t],"px)")}};var ir={m:"margin",p:"padding"},or={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ar={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},sr=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}((function(t){if(t.length>2){if(!ar[t])return[t];t=ar[t]}var e=tr(t.split(""),2),n=e[0],r=e[1],i=ir[n],o=or[r]||"";return Array.isArray(o)?o.map((function(t){return i+t})):[i+o]})),ur=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function cr(t){var e=t.spacing||8;return"number"===typeof e?function(t){return e*t}:Array.isArray(e)?function(t){return e[t]}:"function"===typeof e?e:function(){}}function lr(t,e){return function(n){return t.reduce((function(t,r){return t[r]=function(t,e){if("string"===typeof e)return e;var n=t(Math.abs(e));return e>=0?n:"number"===typeof n?-n:"-".concat(n)}(e,n),t}),{})}}function hr(t){var e=cr(t.theme);return Object.keys(t).map((function(n){if(-1===ur.indexOf(n))return null;var r=lr(sr(n),e),i=t[n];return function(t,e,n){if(Array.isArray(e)){var r=t.theme.breakpoints||rr;return e.reduce((function(t,i,o){return t[r.up(r.keys[o])]=n(e[o]),t}),{})}if("object"===fn(e)){var i=t.theme.breakpoints||rr;return Object.keys(e).reduce((function(t,r){return t[i.up(r)]=n(e[r]),t}),{})}return n(e)}(t,i,r)})).reduce(er,{})}hr.propTypes={},hr.filterProps=ur;function fr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;var e=cr({spacing:t}),n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return 0===n.length?e(1):1===n.length?e(n[0]):n.map((function(t){if("string"===typeof t)return t;var n=e(t);return"number"===typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return t}}),n.mui=!0,n}var pr={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},dr={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function vr(t){return"".concat(Math.round(t),"ms")}var yr={easing:pr,duration:dr,create:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.duration,r=void 0===n?dr.standard:n,i=e.easing,a=void 0===i?pr.easeInOut:i,s=e.delay,u=void 0===s?0:s;o(e,["duration","easing","delay"]);return(Array.isArray(t)?t:[t]).map((function(t){return"".concat(t," ").concat("string"===typeof r?r:vr(r)," ").concat(a," ").concat("string"===typeof u?u:vr(u))})).join(",")},getAutoHeightDuration:function(t){if(!t)return 0;var e=t/36;return Math.round(10*(4+15*Math.pow(e,.25)+e/5))}},gr={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};var mr=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.breakpoints,n=void 0===e?{}:e,r=t.mixins,i=void 0===r?{}:r,a=t.palette,s=void 0===a?{}:a,u=t.spacing,c=t.typography,l=void 0===c?{}:c,h=o(t,["breakpoints","mixins","palette","spacing","typography"]),f=Gn(s),p=kn(n),d=fr(u),v=dn({breakpoints:p,direction:"ltr",mixins:xn(p,d,i),overrides:{},palette:f,props:{},shadows:Jn,typography:Xn(f,l),spacing:d,shape:Zn,transitions:yr,zIndex:gr},h),y=arguments.length,g=new Array(y>1?y-1:0),m=1;m<y;m++)g[m-1]=arguments[m];return v=g.reduce((function(t,e){return dn(t,e)}),v)}();var br=function(t,e){return Sn(t,Object(r.a)({defaultTheme:mr},e))};function _r(t){if("string"!==typeof t)throw new Error(Nn(7));return t.charAt(0).toUpperCase()+t.slice(1)}var wr=a.forwardRef((function(t,e){var n=t.children,i=t.classes,s=t.className,u=t.color,l=void 0===u?"inherit":u,h=t.component,f=void 0===h?"svg":h,p=t.fontSize,d=void 0===p?"default":p,v=t.htmlColor,y=t.titleAccess,g=t.viewBox,m=void 0===g?"0 0 24 24":g,b=o(t,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return a.createElement(f,Object(r.a)({className:c(i.root,s,"inherit"!==l&&i["color".concat(_r(l))],"default"!==d&&i["fontSize".concat(_r(d))]),focusable:"false",viewBox:m,color:v,"aria-hidden":!y||void 0,role:y?"img":void 0,ref:e},b),n,y?a.createElement("title",null,y):null)}));wr.muiName="SvgIcon";var Er=br((function(t){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:t.typography.pxToRem(24),transition:t.transitions.create("fill",{duration:t.transitions.duration.shorter})},colorPrimary:{color:t.palette.primary.main},colorSecondary:{color:t.palette.secondary.main},colorAction:{color:t.palette.action.active},colorError:{color:t.palette.error.main},colorDisabled:{color:t.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:t.typography.pxToRem(20)},fontSizeLarge:{fontSize:t.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(wr)}]]); 3//# sourceMappingURL=2.30aa20fc.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.