PageSourceSearch

https://fiverrsenpai.netlify.app/static/js/2.b4d64528.chunk.js

js fiverrsenpai.netlify.app collected 2026-10-03 10:44:13 UTC 1,433,777 bytes, 3 lines download raw bytes

1/*! For license information please see 2.b4d64528.chunk.js.LICENSE.txt */
2(this["webpackJsonpwild-fiverr-hackaton"]=this["webpackJsonpwild-fiverr-hackaton"]||[]).push([[2],[function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return o})),n.d(t,"__rest",(function(){return a})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return h})),n.d(t,"__exportStar",(function(){return d})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return g})),n.d(t,"__spread",(function(){return v})),n.d(t,"__spreadArrays",(function(){return m})),n.d(t,"__spreadArray",(function(){return y})),n.d(t,"__await",(function(){return b})),n.d(t,"__asyncGenerator",(function(){return _})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return k}
2)),n.d(t,"__makeTemplateObject",(function(){return E})),n.d(t,"__importStar",(function(){return I})),n.d(t,"__importDefault",(function(){return x})),n.d(t,"__classPrivateFieldGet",(function(){return T})),n.d(t,"__classPrivateFieldSet",(function(){return C}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function s(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function f(e,t){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=t.call(e,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])}}}var h=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function d(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||h(t,e,n)}function p(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >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 v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function m(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function y(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function _(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof b?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(r){l(o[0][3],r)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function k(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};
2function I(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&h(t,e,n);return S(t,e),t}function x(e){return e&&e.__esModule?e:{default:e}}function T(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function C(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"CONSTANTS",(function(){return i})),n.d(t,"Deferred",(function(){return d})),n.d(t,"ErrorFactory",(function(){return N})),n.d(t,"FirebaseError",(function(){return A})),n.d(t,"MAX_VALUE_MILLIS",(function(){return ae})),n.d(t,"RANDOM_FACTOR",(function(){return se})),n.d(t,"Sha1",(function(){return Y})),n.d(t,"areCookiesEnabled",(function(){return C})),n.d(t,"assert",(function(){return o})),n.d(t,"assertionError",(function(){return a})),n.d(t,"async",(function(){return X})),n.d(t,"base64",(function(){return u})),n.d(t,"base64Decode",(function(){return l})),n.d(t,"base64Encode",(function(){return c})),n.d(t,"calculateBackoffMillis",(function(){return ue})),n.d(t,"contains",(function(){return B})),n.d(t,"createMockUserToken",(function(){return p})),n.d(t,"createSubscribe",(function(){return $})),n.d(t,"decode",(function(){return M})),n.d(t,"deepCopy",(function(){return f})),n.d(t,"deepExtend",(function(){return h})),n.d(t,"errorPrefix",(function(){return ee})),n.d(t,"extractQuerystring",(function(){return G})),n.d(t,"getGlobal",(function(){return O})),n.d(t,"getModularInstance",(function(){return le})),n.d(t,"getUA",(function(){return g})),n.d(t,"isAdmin",(function(){return V})),n.d(t,"isBrowser",(function(){return y})),n.d(t,"isBrowserExtension",(function(){return b})),n.d(t,"isElectron",(function(){return w})),n.d(t,"isEmpty",(function(){return z})),n.d(t,"isIE",(function(){return k})),n.d(t,"isIndexedDBAvailable",(function(){return x})),n.d(t,"isMobileCordova",(function(){return v})),n.d(t,"isNode",(function(){return m})),n.d(t,"isNodeSdk",(function(){return S})),n.d(t,"isReactNative",(function(){return _})),n.d(t,"isSafari",(function(){return I})),n.d(t,"isUWP",(function(){return E})),n.d(t,"isValidFormat",(function(){return U})),n.d(t,"isValidTimestamp",(function(){return L})),n.d(t,"issuedAtTime",(function(){return F})),n.d(t,"jsonEval",(function(){return j})),n.d(t,"map",(function(){return H})),n.d(t,"ordinal",(function(){return ce})),n.d(t,"querystring",(function(){return K})),n.d(t,"querystringDecode",(function(){return W})),n.d(t,"safeGet",(function(){return q})),n.d(t,"stringLength",(function(){return oe})),n.d(t,"stringToByteArray",(function(){return ie})),n.d(t,"stringify",(function(){return D})),n.d(t,"validateArgCount",(function(){return Z})),n.d(t,"validateCallback",(function(){return ne})),n.d(t,"validateContextObject",(function(){return re})),n.d(t,"validateIndexedDBOpenable",(function(){return T})),n.d(t,"validateNamespace",(function(){return te}));var r=n(0),i={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},o=function(e,t){if(!e)throw a(t)},a=function(e){return new Error("Firebase Database ("+i.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},s=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296===(64512&i)&&r+1<e.length&&56320===(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},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(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<e.length;i+=3){var o=e[i],a=i+1<e.length,s=a?e[i+1]:0,u=i+2<e.length,c=u?e[i+2]:0,l=o>>2,f=(3&o)<<4|s>>4,h=(15&s)<<2|c>>6,d=63&c;u||(d=64,a||(h=64)),r.push(n[l],n[f],n[h],n[d])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(s(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],n=0,r=0;n<e.length;){var i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){var o=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){var a=((7&i)<<18|(63&(o=e[n++]))<<12|(63&(s=e[n++]))<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(a>>10)),t[r++]=String.fromCharCode(56320+(1023&a))}else{o=e[n++];var s=e[n++];
2t[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<e.length;){var o=n[e.charAt(i++)],a=i<e.length?n[e.charAt(i)]:0,s=++i<e.length?n[e.charAt(i)]:64,u=++i<e.length?n[e.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 f=s<<6&192|u;r.push(f)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},c=function(e){var t=s(e);return u.encodeByteArray(t,!0)},l=function(e){try{return u.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function f(e){return h(void 0,e)}function h(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var n in t)t.hasOwnProperty(n)&&"__proto__"!==n&&(e[n]=h(e[n],t[n]));return e}var d=function(){function e(){var e=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))}return e.prototype.wrapCallback=function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"===typeof e&&(t.promise.catch((function(){})),1===e.length?e(n):e(n,r))}},e}();function p(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');var n=t||"demo-project",i=e.iat||0,o=e.sub||e.user_id;if(!o)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");var a=Object(r.__assign)({iss:"https://securetoken.google.com/"+n,aud:n,iat:i,exp:i+3600,auth_time:i,sub:o,user_id:o,firebase:{sign_in_provider:"custom",identities:{}}},e);return[u.encodeString(JSON.stringify({alg:"none",type:"JWT"}),!1),u.encodeString(JSON.stringify(a),!1),""].join(".")}function g(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function v(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(g())}function m(){try{return"[object process]"===Object.prototype.toString.call(e.process)}catch(t){return!1}}function y(){return"object"===typeof self&&self.self===self}function b(){var e="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof e&&void 0!==e.id}function _(){return"object"===typeof navigator&&"ReactNative"===navigator.product}function w(){return g().indexOf("Electron/")>=0}function k(){var e=g();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function E(){return g().indexOf("MSAppHost/")>=0}function S(){return!0===i.NODE_CLIENT||!0===i.NODE_ADMIN}function I(){return!m()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function x(){return"indexedDB"in self&&null!=indexedDB}function T(){return new Promise((function(e,t){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=function(){i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=function(){n=!1},i.onerror=function(){var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(o){t(o)}}))}function C(){return!(!navigator||!navigator.cookieEnabled)}function O(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw new Error("Unable to locate global object.")}var A=function(e){function t(n,r,i){var o=e.call(this,r)||this;return o.code=n,o.customData=i,o.name="FirebaseError",Object.setPrototypeOf(o,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(o,N.prototype.create),o}return Object(r.__extends)(t,e),t}(Error),N=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n}return e.prototype.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t[0]||{},i=this.service+"/"+e,o=this.errors[e],a=o?P(o,r):"Error",s=this.serviceName+": "+a+" ("+i+").",u=new A(i,s,r);return u},e}();function P(e,t){return e.replace(R,(function(e,n){var r=t[n];return null!=r?String(r):"<"+n+"?>"}))}var R=/\{\$([^}]+)}/g;function j(e){return JSON.parse(e)}function D(e){return JSON.stringify(e)}var M=function(e){var t={},n={},r={},i="";try{var o=e.split(".");t=j(l(o[0])||""),n=j(l(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(a){}return{header:t,claims:n,data:r,signature:i}},L=function(e){var t=M(e).claims,n=Math.floor((new Date).getTime()/1e3),r=0,i=0;return"object"===typeof t&&(t.hasOwnProperty("nbf")?r=t.nbf:t.hasOwnProperty("iat")&&(r=t.iat),i=t.hasOwnProperty("exp")?t.exp:r+86400),!!n&&!!r&&!!i&&n>=r&&n<=i},F=function(e){var t=M(e).claims;return"object"===typeof t&&t.hasOwnProperty("iat")?t.iat:null},U=function(e){var t=M(e).claims;return!!t&&"object"===typeof t&&t.hasOwnProperty("iat")},V=function(e){var t=M(e).claims;return"object"===typeof t&&!0===t.admin};function B(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function q(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function z(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function H(e,t,n){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r}function K(e){for(var t=[],n=function(e,n){Array.isArray(n)?n.forEac
2h((function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))})):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))},r=0,i=Object.entries(e);r<i.length;r++){var o=i[r];n(o[0],o[1])}return t.length?"&"+t.join("&"):""}function W(e){var t={};return e.replace(/^\?/,"").split("&").forEach((function(e){if(e){var n=e.split("="),r=n[0],i=n[1];t[decodeURIComponent(r)]=decodeURIComponent(i)}})),t}function G(e){var t=e.indexOf("?");if(!t)return"";var n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}var Y=function(){function e(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}return e.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},e.prototype.compress_=function(e,t){t||(t=0);var n=this.W_;if("string"===typeof e)for(var r=0;r<16;r++)n[r]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(r=0;r<16;r++)n[r]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=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],f=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+f+a+n[r]&4294967295;f=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]+f&4294967295},e.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var n=t-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<t;){if(0===o)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"===typeof e){for(;r<t;)if(i[o]=e.charCodeAt(r),++r,++o===this.blockSize){this.compress_(i),o=0;break}}else for(;r<t;)if(i[o]=e[r],++r,++o===this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=t}},e.prototype.digest=function(){var e=[],t=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&t,t/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var i=24;i>=0;i-=8)e[r]=this.chain_[n]>>i&255,++r;return e},e}();function $(e,t){var n=new Q(e,t);return n.subscribe.bind(n)}var Q=function(){function e(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((function(){e(n)})).catch((function(e){n.error(e)}))}return e.prototype.next=function(e){this.forEachObserver((function(t){t.next(e)}))},e.prototype.error=function(e){this.forEachObserver((function(t){t.error(e)})),this.close(e)},e.prototype.complete=function(){this.forEachObserver((function(e){e.complete()})),this.close()},e.prototype.subscribe=function(e,t,n){var r,i=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(e,t){if("object"!==typeof e||null===e)return!1;for(var n=0,r=t;n<r.length;n++){var i=r[n];if(i in e&&"function"===typeof e[i])return!0}return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n}).next&&(r.next=J),void 0===r.error&&(r.error=J),void 0===r.complete&&(r.complete=J);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(e){}})),this.observers.push(r),o},e.prototype.unsubscribeOne=function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},e.prototype.sendOne=function(e,t){var n=this;this.task.then((function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(r){"undefined"!==typeof console&&console.error&&console.error(r)}}))},e.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((function(){t.observers=void 0,t.onNoObservers=void 0})))},e}();function X(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];Promise.resolve(!0).then((function(){e.apply(void 0,n)})).catch((function(e){t&&t(e)}))}}function J(){}var Z=function(e,t,n,r){var i;if(r<t?i="at least "+t:r>n&&(i=0===n?"none":"no more than "+n),i)throw new Error(e+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")};function ee(e,t){return e+" failed: "+t+" argument "}function te(e,t,n){if((!n||t)&&"string"!==typeof t)throw new Error(ee(e,"namespace")+"must be a valid firebase namespace.")}function ne(e,t,n,r){if((!r||n)&&"function"!==typeof n)throw new Error(ee(e,t)+"must be a valid function.")}function re(e,t,n,r){if((!r||n)&&("object"!==typeof n||null===n))throw new Error(ee(e,t)+"must be a valid context object.")}var ie=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);if(i>=55296&&i<=56319){var a=i-55296;r++,o(r<e.length,"Surrogate pair missing trail surrogate."),i=65536+(a<<10)+(e.charCodeAt(r)-56320)}i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):i<65536?(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},oe=function(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t++:r<2048?t+=2:r>=55296&&r<=56319?(t+=4,n++):t+=3}return t},ae=144e5,se=.5;function ue(e,t,n){void 0===t&&(t=1e3),void 0===n&&(n=2);var r=t*Math.pow(n,e),i=Math.round(se*r*(Math.random()-.5)*2);return Math.min(ae,r+i)}function ce(e){return Number.isFinite(e)?e+function(e){var t=(e=Math.abs(e))%100;if(t>=10&&t<=20)return"th";var n=e%10;if(1===n)return"st";if(2===n)return"nd";if(3===n)return"rd";return"th"}(e):""+e}function le(e){return e&&e._delegate?e._delegate:e}}.call(this,n(32))},function(e,t,n){"use strict";e.exports=n(61)},function(e,t,n){"use strict";e.exports=n(65)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t),n.d(t,"firebase",(function(){return _}));var r,i,o=n(0),a=n(1),s=n(11),u=n(10),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}
2' 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),f="@firebase/app",h="[DEFAULT]",d=((i={})[f]="fire-core",i["@firebase/analytics"]="fire-analytics",i["@firebase/app-check"]="fire-app-check",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),p=new u.Logger("@firebase/app"),g=function(){function e(e,t,n){var r=this;this.firebase_=n,this.isDeleted_=!1,this.name_=t.name,this.automaticDataCollectionEnabled_=t.automaticDataCollectionEnabled||!1,this.options_=Object(a.deepCopy)(e),this.container=new s.ComponentContainer(t.name),this._addComponent(new s.Component("app",(function(){return r}),"PUBLIC")),this.firebase_.INTERNAL.components.forEach((function(e){return r._addComponent(e)}))}return Object.defineProperty(e.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(e){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!1,configurable:!0}),e.prototype.delete=function(){var e=this;return new Promise((function(t){e.checkDestroyed_(),t()})).then((function(){return e.firebase_.INTERNAL.removeApp(e.name_),Promise.all(e.container.getProviders().map((function(e){return e.delete()})))})).then((function(){e.isDeleted_=!0}))},e.prototype._getService=function(e,t){var n;void 0===t&&(t=h),this.checkDestroyed_();var r=this.container.getProvider(e);return r.isInitialized()||"EXPLICIT"!==(null===(n=r.getComponent())||void 0===n?void 0:n.instantiationMode)||r.initialize(),r.getImmediate({identifier:t})},e.prototype._removeServiceInstance=function(e,t){void 0===t&&(t=h),this.container.getProvider(e).clearInstance(t)},e.prototype._addComponent=function(e){try{this.container.addComponent(e)}catch(t){p.debug("Component "+e.name+" failed to register with FirebaseApp "+this.name,t)}},e.prototype._addOrOverwriteComponent=function(e){this.container.addOrOverwriteComponent(e)},e.prototype.toJSON=function(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}},e.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw l.create("app-deleted",{appName:this.name_})},e}();g.prototype.name&&g.prototype.options||g.prototype.delete||console.log("dc");var v=function e(){var t=function(e){var t={},n=new Map,r={__esModule:!0,initializeApp:function(n,i){void 0===i&&(i={}),"object"===typeof i&&null!==i||(i={name:i});var o=i;void 0===o.name&&(o.name=h);var s=o.name;if("string"!==typeof s||!s)throw l.create("bad-app-name",{appName:String(s)});if(Object(a.contains)(t,s))throw l.create("duplicate-app",{appName:s});var u=new e(n,o,r);return t[s]=u,u},app:i,registerVersion:function(e,t,n){var r,i=null!==(r=d[e])&&void 0!==r?r:e;n&&(i+="-"+n);var a=i.match(/\s|\//),u=t.match(/\s|\//);if(a||u){var c=['Unable to register library "'+i+'" with version "'+t+'":'];return a&&c.push('library name "'+i+'" contains illegal characters (whitespace or "/")'),a&&u&&c.push("and"),u&&c.push('version name "'+t+'" contains illegal characters (whitespace or "/")'),void p.warn(c.join(" "))}o(new s.Component(i+"-version",(function(){return{library:i,version:t}}),"VERSION"))},setLogLevel:u.setLogLevel,onLog:function(e,t){if(null!==e&&"function"!==typeof e)throw l.create("invalid-log-argument");Object(u.setUserLogHandler)(e,t)},apps:null,SDK_VERSION:"8.6.8",INTERNAL:{registerComponent:o,removeApp:function(e){delete t[e]}
2,components:n,useAsService:function(e,t){return"serverAuth"===t?null:t}}};function i(e){if(e=e||h,!Object(a.contains)(t,e))throw l.create("no-app",{appName:e});return t[e]}function o(o){var s=o.name;if(n.has(s))return p.debug("There were multiple attempts to register component "+s+"."),"PUBLIC"===o.type?r[s]:null;if(n.set(s,o),"PUBLIC"===o.type){var u=function(e){if(void 0===e&&(e=i()),"function"!==typeof e[s])throw l.create("invalid-app-argument",{appName:s});return e[s]()};void 0!==o.serviceProps&&Object(a.deepExtend)(u,o.serviceProps),r[s]=u,e.prototype[s]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._getService.bind(this,s).apply(this,o.multipleInstances?e:[])}}for(var c=0,f=Object.keys(t);c<f.length;c++){var h=f[c];t[h]._addComponent(o)}return"PUBLIC"===o.type?r[s]:null}return r.default=r,Object.defineProperty(r,"apps",{get:function(){return Object.keys(t).map((function(e){return t[e]}))}}),i.App=e,r}(g);return t.INTERNAL=Object(o.__assign)(Object(o.__assign)({},t.INTERNAL),{createFirebaseNamespace:e,extendNamespace:function(e){Object(a.deepExtend)(t,e)},createSubscribe:a.createSubscribe,ErrorFactory:a.ErrorFactory,deepExtend:a.deepExtend}),t}(),m=function(){function e(e){this.container=e}return e.prototype.getPlatformInfoString=function(){return this.container.getProviders().map((function(e){if(function(e){var t=e.getComponent();return"VERSION"===(null===t||void 0===t?void 0:t.type)}(e)){var t=e.getImmediate();return t.library+"/"+t.version}return null})).filter((function(e){return e})).join(" ")},e}();if(Object(a.isBrowser)()&&void 0!==self.firebase){p.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&&p.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 b=v.initializeApp;v.initializeApp=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Object(a.isNode)()&&p.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      '),b.apply(void 0,e)};var _=v;!function(e,t){e.INTERNAL.registerComponent(new s.Component("platform-logger",(function(e){return new m(e)}),"PRIVATE")),e.registerVersion(f,"0.6.27",t),e.registerVersion("fire-js","")}(_),t.default=_},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(39);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||Object(r.a)(e,t)||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(e,t,n){"use strict";var r=n(5);n.d(t,"a",(function(){return r.default}));var i="8.6.8";r.default.registerVersion("firebase",i,"app"),r.default.SDK_VERSION=i},function(e,t,n){e.exports=n(79)()},function(e,t,n){"use strict";function r(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var i;n.r(t),n.d(t,"LogLevel",(function(){return o}
2)),n.d(t,"Logger",(function(){return f})),n.d(t,"setLogLevel",(function(){return h})),n.d(t,"setUserLogHandler",(function(){return d}));var o,a=[];!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.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(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(!(t<e.logLevel)){var o=(new Date).toISOString(),a=c[t];if(!a)throw new Error("Attempted to log a message with an invalid logType (value: "+t+")");console[a].apply(console,r(["["+o+"]  "+e.name+":"],n))}},f=function(){function e(e){this.name=e,this._logLevel=u,this._logHandler=l,this._userLogHandler=null,a.push(this)}return Object.defineProperty(e.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in o))throw new TypeError('Invalid value "'+e+'" assigned to `logLevel`');this._logLevel=e},enumerable:!1,configurable:!0}),e.prototype.setLogLevel=function(e){this._logLevel="string"===typeof e?s[e]:e},Object.defineProperty(e.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!==typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e},enumerable:!1,configurable:!0}),e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.DEBUG],e)),this._logHandler.apply(this,r([this,o.DEBUG],e))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.VERBOSE],e)),this._logHandler.apply(this,r([this,o.VERBOSE],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.INFO],e)),this._logHandler.apply(this,r([this,o.INFO],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.WARN],e)),this._logHandler.apply(this,r([this,o.WARN],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.ERROR],e)),this._logHandler.apply(this,r([this,o.ERROR],e))},e}();function h(e){a.forEach((function(t){t.setLogLevel(e)}))}function d(e,t){for(var n=function(n){var r=null;t&&t.level&&(r=s[t.level]),n.userLogHandler=null===e?null:function(t,n){for(var i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=i.map((function(e){if(null==e)return null;if("string"===typeof e)return e;if("number"===typeof e||"boolean"===typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(t){return null}})).filter((function(e){return e})).join(" ");n>=(null!==r&&void 0!==r?r:t.logLevel)&&e({level:o[n].toLowerCase(),message:s,args:i,type:t.name})}},r=0,i=a;r<i.length;r++){n(i[r])}}},function(e,t,n){"use strict";n.r(t),n.d(t,"Component",(function(){return o})),n.d(t,"ComponentContainer",(function(){return u})),n.d(t,"Provider",(function(){return s}));var r=n(0),i=n(1),o=function(){function e(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return e.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},e.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},e.prototype.setServiceProps=function(e){return this.serviceProps=e,this},e.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},e}(),a="[DEFAULT]",s=function(){function e(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.onInitCallbacks=new Map}return e.prototype.get=function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new i.Deferred;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{var r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch(o){}}return this.instancesDeferred.get(t).promise},e.prototype.getImmediate=function(e){var t,n=this.normalizeInstanceIdentifier(null===e||void 0===e?void 0:e.identifier),r=null!==(t=null===e||void 0===e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error("Service "+this.name+" is not available")}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(i){if(r)return null;throw i}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(e){var t,n;if(e.name!==this.name)throw Error("Mismatching Component "+e.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");
2if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:a})}catch(h){}try{for(var i=Object(r.__values)(this.instancesDeferred.entries()),o=i.next();!o.done;o=i.next()){var s=Object(r.__read)(o.value,2),u=s[0],c=s[1],l=this.normalizeInstanceIdentifier(u);try{var f=this.getOrInitializeService({instanceIdentifier:l});c.resolve(f)}catch(h){}}}catch(d){t={error:d}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}},e.prototype.clearInstance=function(e){void 0===e&&(e=a),this.instancesDeferred.delete(e),this.instances.delete(e)},e.prototype.delete=function(){return Object(r.__awaiter)(this,void 0,void 0,(function(){var e;return Object(r.__generator)(this,(function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(Object(r.__spreadArray)(Object(r.__spreadArray)([],Object(r.__read)(e.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()})))),Object(r.__read)(e.filter((function(e){return"_delete"in e})).map((function(e){return e._delete()})))))];case 1:return t.sent(),[2]}}))}))},e.prototype.isComponentSet=function(){return null!=this.component},e.prototype.isInitialized=function(e){return void 0===e&&(e=a),this.instances.has(e)},e.prototype.initialize=function(e){var t,n;void 0===e&&(e={});var i=e.options,o=void 0===i?{}:i,a=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(a))throw Error(this.name+"("+a+") has already been initialized");if(!this.isComponentSet())throw Error("Component "+this.name+" has not been registered yet");var s=this.getOrInitializeService({instanceIdentifier:a,options:o});try{for(var u=Object(r.__values)(this.instancesDeferred.entries()),c=u.next();!c.done;c=u.next()){var l=Object(r.__read)(c.value,2),f=l[0],h=l[1];a===this.normalizeInstanceIdentifier(f)&&h.resolve(s)}}catch(d){t={error:d}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return this.invokeOnInitCallbacks(s,a),s},e.prototype.onInit=function(e,t){var n,r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);var o=this.instances.get(r);return o&&e(o,r),function(){i.delete(e)}},e.prototype.invokeOnInitCallbacks=function(e,t){var n,i,o=this.onInitCallbacks.get(t);if(o)try{for(var a=Object(r.__values)(o),s=a.next();!s.done;s=a.next()){var u=s.value;try{u(e,t)}catch(c){}}}catch(l){n={error:l}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},e.prototype.getOrInitializeService=function(e){var t,n=e.instanceIdentifier,r=e.options,i=void 0===r?{}:r,o=this.instances.get(n);if(!o&&this.component&&(o=this.component.instanceFactory(this.container,{instanceIdentifier:(t=n,t===a?void 0:t),options:i}),this.instances.set(n,o),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,n,o)}catch(s){}return o||null},e.prototype.normalizeInstanceIdentifier=function(e){return void 0===e&&(e=a),this.component?this.component.multipleInstances?e:a:e},e.prototype.shouldAutoInitialize=function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode},e}();var u=function(){function e(e){this.name=e,this.providers=new Map}return e.prototype.addComponent=function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component "+e.name+" has already been registered with "+this.name);t.setComponent(e)},e.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},e.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new s(e,this);return this.providers.set(e,t),t},e.prototype.getProviders=function(){return Array.from(this.providers.values())},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(19);function i(e,t){if(null==e)return{};var n,i,o=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return oc})),n.d(t,"b",(function(){return Xs})),n.d(t,"c",(function(){return zs})),n.d(t,"d",(function(){return hc})),n.d(t,"e",(function(){return cc})),n.d(t,"f",(function(){return S})),n.d(t,"g",(function(){return uc}
2)),n.d(t,"h",(function(){return mc})),n.d(t,"i",(function(){return vc})),n.d(t,"j",(function(){return yc})),n.d(t,"k",(function(){return ic})),n.d(t,"l",(function(){return xc})),n.d(t,"m",(function(){return _c})),n.d(t,"n",(function(){return Ec})),n.d(t,"o",(function(){return lc})),n.d(t,"p",(function(){return wc})),n.d(t,"q",(function(){return Ic})),n.d(t,"r",(function(){return qs})),n.d(t,"s",(function(){return ac})),n.d(t,"t",(function(){return Sc}));var r=n(1),i=n(10),o=n(16),a=n(0),s=function(){function e(e,t){var n=this;this.previousValue=e,t&&(t.sequenceNumberHandler=function(e){return n.t(e)},this.i=function(e){return t.writeSequenceNumber(e)})}return e.prototype.t=function(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue},e.prototype.next=function(){var e=++this.previousValue;return this.i&&this.i(e),e},e}();s.o=-1;var u={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"},c=function(e){function t(t,n){var r=this;return(r=e.call(this,n)||this).code=t,r.message=n,r.name="FirebaseError",r.toString=function(){return r.name+": [code="+r.code+"]: "+r.message},r}return Object(a.__extends)(t,e),t}(Error),l=new i.Logger("@firebase/firestore");function f(){return l.logLevel}function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(l.logLevel<=i.LogLevel.DEBUG){var r=t.map(g);l.debug.apply(l,Object(a.__spreadArray)(["Firestore (8.6.8): "+e],r))}}function d(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(l.logLevel<=i.LogLevel.ERROR){var r=t.map(g);l.error.apply(l,Object(a.__spreadArray)(["Firestore (8.6.8): "+e],r))}}function p(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(l.logLevel<=i.LogLevel.WARN){var r=t.map(g);l.warn.apply(l,Object(a.__spreadArray)(["Firestore (8.6.8): "+e],r))}}function g(e){if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(t){return e}var t}function v(e){void 0===e&&(e="Unexpected state");var t="FIRESTORE (8.6.8) INTERNAL ASSERTION FAILED: "+e;throw d(t),new Error(t)}function m(e,t){e||v()}function y(e,t){return e}function b(e){var t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(var r=0;r<e;r++)n[r]=Math.floor(256*Math.random());return n}var _=function(){function e(){}return e.u=function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length,n="";n.length<20;)for(var r=b(40),i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%e.length));return n},e}();function w(e,t){return e<t?-1:e>t?1:0}function k(e,t,n){return e.length===t.length&&e.every((function(e,r){return n(e,t[r])}))}function E(e){return e+"\0"}var S=function(){function e(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new c(u.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new c(u.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800)throw new c(u.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new c(u.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}return e.now=function(){return e.fromMillis(Date.now())},e.fromDate=function(t){return e.fromMillis(t.getTime())},e.fromMillis=function(t){var n=Math.floor(t/1e3);return new e(n,Math.floor(1e6*(t-1e3*n)))},e.prototype.toDate=function(){return new Date(this.toMillis())},e.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},e.prototype._compareTo=function(e){return this.seconds===e.seconds?w(this.nanoseconds,e.nanoseconds):w(this.seconds,e.seconds)},e.prototype.isEqual=function(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds},e.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},e.prototype.toJSON=function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}},e.prototype.valueOf=function(){var e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}
2,e}(),I=function(){function e(e){this.timestamp=e}return e.fromTimestamp=function(t){return new e(t)},e.min=function(){return new e(new S(0,0))},e.prototype.compareTo=function(e){return this.timestamp._compareTo(e.timestamp)},e.prototype.isEqual=function(e){return this.timestamp.isEqual(e.timestamp)},e.prototype.toMicroseconds=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},e.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},e.prototype.toTimestamp=function(){return this.timestamp},e}();function x(e){var t=0;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function T(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function C(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}var O=function(){function e(e,t,n){void 0===t?t=0:t>e.length&&v(),void 0===n?n=e.length-t:n>e.length-t&&v(),this.segments=e,this.offset=t,this.len=n}return Object.defineProperty(e.prototype,"length",{get:function(){return this.len},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return 0===e.comparator(this,t)},e.prototype.child=function(t){var n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach((function(e){n.push(e)})):n.push(t),this.construct(n)},e.prototype.limit=function(){return this.offset+this.length},e.prototype.popFirst=function(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)},e.prototype.popLast=function(){return this.construct(this.segments,this.offset,this.length-1)},e.prototype.firstSegment=function(){return this.segments[this.offset]},e.prototype.lastSegment=function(){return this.get(this.length-1)},e.prototype.get=function(e){return this.segments[this.offset+e]},e.prototype.isEmpty=function(){return 0===this.length},e.prototype.isPrefixOf=function(e){if(e.length<this.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0},e.prototype.isImmediateParentOf=function(e){if(this.length+1!==e.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0},e.prototype.forEach=function(e){for(var t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])},e.prototype.toArray=function(){return this.segments.slice(this.offset,this.limit())},e.comparator=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=e.get(r),o=t.get(r);if(i<o)return-1;if(i>o)return 1}return e.length<t.length?-1:e.length>t.length?1:0},e}(),A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.prototype.construct=function(e,n,r){return new t(e,n,r)},t.prototype.canonicalString=function(){return this.toArray().join("/")},t.prototype.toString=function(){return this.canonicalString()},t.fromString=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var r=[],i=0,o=e;i<o.length;i++){var a=o[i];if(a.indexOf("//")>=0)throw new c(u.INVALID_ARGUMENT,"Invalid segment ("+a+"). Paths must not contain // in them.");r.push.apply(r,a.split("/").filter((function(e){return e.length>0})))}return new t(r)},t.emptyPath=function(){return new t([])},t}(O),N=/^[_a-zA-Z][_a-zA-Z0-9]*$/,P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.prototype.construct=function(e,n,r){return new t(e,n,r)},t.isValidIdentifier=function(e){return N.test(e)},t.prototype.canonicalString=function(){return this.toArray().map((function(e){return e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),t.isValidIdentifier(e)||(e="`"+e+"`"),e})).join(".")},t.prototype.toString=function(){return this.canonicalString()},t.prototype.isKeyField=function(){return 1===this.length&&"__name__"===this.get(0)},t.keyField=function(){return new t(["__name__"])},t.fromServerFormat=function(e){for(var n=[],r="",i=0,o=function(){if(0===r.length)throw new c(u.INVALID_ARGUMENT,"Invalid field path ("+e+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");n.push(r),r=""},a=!1;i<e.length;){var s=e[i];if("\\"===s){if(i+1===e.length)throw new c(u.INVALID_ARGUMENT,"Path has trailing escape character: "+e);var l=e[i+1];if("\\"!==l&&"."!==l&&"`"!==l)throw new c(u.INVALID_ARGUMENT,"Path has invali
2d escape sequence: "+e);r+=l,i+=2}else"`"===s?(a=!a,i++):"."!==s||a?(r+=s,i++):(o(),i++)}if(o(),a)throw new c(u.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new t(n)},t.emptyPath=function(){return new t([])},t}(O),R=function(){function e(e){this.fields=e,e.sort(P.comparator)}return e.prototype.covers=function(e){for(var t=0,n=this.fields;t<n.length;t++)if(n[t].isPrefixOf(e))return!0;return!1},e.prototype.isEqual=function(e){return k(this.fields,e.fields,(function(e,t){return e.isEqual(t)}))},e}(),j=function(){function e(e){this.binaryString=e}return e.fromBase64String=function(t){return new e(atob(t))},e.fromUint8Array=function(t){return new e(function(e){for(var t="",n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(t))},e.prototype.toBase64=function(){return e=this.binaryString,btoa(e);var e},e.prototype.toUint8Array=function(){return function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.binaryString)},e.prototype.approximateByteSize=function(){return 2*this.binaryString.length},e.prototype.compareTo=function(e){return w(this.binaryString,e.binaryString)},e.prototype.isEqual=function(e){return this.binaryString===e.binaryString},e}();j.EMPTY_BYTE_STRING=new j("");var D=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function M(e){if(m(!!e),"string"==typeof e){var t=0,n=D.exec(e);if(m(!!n),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),t=Number(r)}var i=new Date(e);return{seconds:Math.floor(i.getTime()/1e3),nanos:t}}return{seconds:L(e.seconds),nanos:L(e.nanos)}}function L(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function F(e){return"string"==typeof e?j.fromBase64String(e):j.fromUint8Array(e)}function U(e){var t,n;return"server_timestamp"===(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function V(e){var t=e.mapValue.fields.__previous_value__;return U(t)?V(t):t}function B(e){var t=M(e.mapValue.fields.__local_write_time__.timestampValue);return new S(t.seconds,t.nanos)}function q(e){return null==e}function z(e){return 0===e&&1/e==-1/0}function H(e){return"number"==typeof e&&Number.isInteger(e)&&!z(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}var K=function(){function e(e){this.path=e}return e.fromPath=function(t){return new e(A.fromString(t))},e.fromName=function(t){return new e(A.fromString(t).popFirst(5))},e.prototype.hasCollectionId=function(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e},e.prototype.isEqual=function(e){return null!==e&&0===A.comparator(this.path,e.path)},e.prototype.toString=function(){return this.path.toString()},e.comparator=function(e,t){return A.comparator(e.path,t.path)},e.isDocumentKey=function(e){return e.length%2==0},e.fromSegments=function(t){return new e(new A(t.slice()))},e}();function W(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?U(e)?4:10:v()}function G(e,t){var n=W(e);if(n!==W(t))return!1;switch(n){case 0:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return B(e).isEqual(B(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;var n=M(e.timestampValue),r=M(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(e,t){return F(e.bytesValue).isEqual(F(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return L(e.geoPointValue.latitude)===L(t.geoPointValue.latitude)&&L(e.geoPointValue.longitude)===L(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return L(e.integerValue)===L(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){var n=L(e.doubleValue),r=L(t.doubleValue);return n===r?z(n)===z(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return k(e.arrayValue.values||[],t.arrayValue.values||[],G);case 10:return function(e,t){var n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(x(n)!==x(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!G(n[i],r[i])))return!1;return!0}(e,t);default:return v()}}function Y(e,t){return void 0!==(e.values||[]).find((function(e){return G(e,t)}))}function $(e,t){var n=W(e),r=W(t);if(n!==r)return w(n,r);switch(n){case 0:return 0;case 1:return w(e.booleanValue,t.booleanValue);case 2:return function(e,t){var n=L(e.integerValue||e.doubleValue),r=L(t.
2integerValue||t.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return Q(e.timestampValue,t.timestampValue);case 4:return Q(B(e),B(t));case 5:return w(e.stringValue,t.stringValue);case 6:return function(e,t){var n=F(e),r=F(t);return n.compareTo(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){for(var n=e.split("/"),r=t.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)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){var n=w(L(e.latitude),L(t.latitude));return 0!==n?n:w(L(e.longitude),L(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return function(e,t){for(var n=e.values||[],r=t.values||[],i=0;i<n.length&&i<r.length;++i){var o=$(n[i],r[i]);if(o)return o}return w(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){var n=e.fields||{},r=Object.keys(n),i=t.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=$(n[r[a]],i[o[a]]);if(0!==u)return u}return w(r.length,o.length)}(e.mapValue,t.mapValue);default:throw v()}}function Q(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return w(e,t);var n=M(e),r=M(t),i=w(n.seconds,r.seconds);return 0!==i?i:w(n.nanos,r.nanos)}function X(e){return J(e)}function J(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(e){var t=M(e);return"time("+t.seconds+","+t.nanos+")"}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?F(e.bytesValue).toBase64():"referenceValue"in e?(n=e.referenceValue,K.fromName(n).toString()):"geoPointValue"in e?"geo("+(t=e.geoPointValue).latitude+","+t.longitude+")":"arrayValue"in e?function(e){for(var t="[",n=!0,r=0,i=e.values||[];r<i.length;r++)n?n=!1:t+=",",t+=J(i[r]);return t+"]"}(e.arrayValue):"mapValue"in e?function(e){for(var t="{",n=!0,r=0,i=Object.keys(e.fields||{}).sort();r<i.length;r++){var o=i[r];n?n=!1:t+=",",t+=o+":"+J(e.fields[o])}return t+"}"}(e.mapValue):v();var t,n}function Z(e,t){return{referenceValue:"projects/"+e.projectId+"/databases/"+e.database+"/documents/"+t.path.canonicalString()}}function ee(e){return!!e&&"integerValue"in e}function te(e){return!!e&&"arrayValue"in e}function ne(e){return!!e&&"nullValue"in e}function re(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function ie(e){return!!e&&"mapValue"in e}function oe(e){if(e.geoPointValue)return{geoPointValue:Object.assign({},e.geoPointValue)};if(e.timestampValue)return{timestampValue:Object.assign({},M(e.timestampValue))};if(e.mapValue){var t={mapValue:{fields:{}}};return T(e.mapValue.fields,(function(e,n){return t.mapValue.fields[e]=oe(n)})),t}if(e.arrayValue){for(var n={arrayValue:{values:[]}},r=0;r<(e.arrayValue.values||[]).length;++r)n.arrayValue.values[r]=oe(e.arrayValue.values[r]);return n}return Object.assign({},e)}var ae=function(){function e(e){this.value=e}return e.empty=function(){return new e({mapValue:{}})},e.prototype.field=function(e){if(e.isEmpty())return this.value;for(var t=this.value,n=0;n<e.length-1;++n)if(!ie(t=(t.mapValue.fields||{})[e.get(n)]))return null;return(t=(t.mapValue.fields||{})[e.lastSegment()])||null},e.prototype.set=function(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=oe(t)},e.prototype.setAll=function(e){var t=this,n=P.emptyPath(),r={},i=[];e.forEach((function(e,o){if(!n.isImmediateParentOf(o)){var a=t.getFieldsMap(n);t.applyChanges(a,r,i),r={},i=[],n=o.popLast()}e?r[o.lastSegment()]=oe(e):i.push(o.lastSegment())}));var o=this.getFieldsMap(n);this.applyChanges(o,r,i)},e.prototype.delete=function(e){var t=this.field(e.popLast());ie(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]},e.prototype.isEqual=function(e){return G(this.value,e.value)},e.prototype.getFieldsMap=function(e){var t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(var n=0;n<e.length;++n){var r=t.mapValue.fields[e.get(n)];ie(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},t.mapValue.fields[e.get(n)]=r),t=r}return t.mapValue.fields},e.prototype.applyChanges=function(e,t,n){T(t,(function(t,n){return e[t]=n}));for(var r=0,i=n;r<i.length;r++){var o=i[r];delete e[o]}},e.prototype.clone=function(){return new e(oe(this.value))},e}();function se(e){var t=[];return T(e.fields,(function(e,n){var r=new P([e]);if(ie(n)){var i=se(n.mapValue).fields;if(0===i.length)t.push(r);else for(var o=0,a=i;o<a.length;o++){var s=a[o];t.push(r.child(s))}}else t.push(r)})),new R(t)}var ue=function(){function e(e,t,n,r,i){this.key=e,this.documentType=t,this.version=n,this.data=r,this.documentState=i}return e.newInvalidDocument=function(t){return new e(t,0,I.min(),ae.empty(),0)},e.newFoundDocument=function(t,n,r){return new e(t,1,n,r,0)},e.newNoDocument=function(t,n){return new e(t,2,n,ae.empty(),0)},e.newUnknownDocument=function(t,n){return new e(t,3,n,ae.empty(),2)},e.prototype.convertToFoundDocument=function(e,t){return this.version=e,this.documentType=1,this.data=t,this.documentState=0,this},e.prototype.convertToNoDocument=function(e){return this.version=e,this.documentType=2,this.data=ae.empty(),this.documentState=0,this},e.prototype.convertToUnknownDocument=function(e){return this.version=e,this.documentType=3,this.data=ae.empty(),this.documentState=2,this},e.prototype.setHasCommittedMutations=function(){return this.documentState=2,this},e.prototype.setHasLocalMutations=function(){return this.documentState=1,this},Object.defineProperty(e.prototype,"hasLocalMutations",{get:function(){return 1===this.documentState}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasCommittedMutations",{get:function(){return 2===this.documentState},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return this.hasLocalMutations||this.hasCommittedMutations},enumerable:!1,configurable:!0}),e.prototype.isValidDocument=function(){return 0!==this.documentType},e.prototype.isFoundDocument=function(){return 1===this.documentType},e.prototype.isNoDocument=function(){return 2===this.documentType},e.prototype.isUnknownDocument=function(){return 3===this.documentType},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.documentType===t.documentType&&this.documentState===t.documentState&&this.data.isEqual(t.data)},e.prototype.clone=function(){return new e(this.key,this.documentType,this.version,this.data.clone(),this.documentState)},e.prototype.toString=function(){return"Document("+this.key+", "+this.version+", "+JSON.stringify(this.data.value)+", {documentType: "+this.documentType+"}), {documentState: "+this.documentState+"})"},e}(),ce=function(e,t,n,r,i,o,a){void 0===t&&(t=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=e,this.collectionGroup=t,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=o,this.endAt=a,this.h=null};function le(e,t,n,r,i,o,a){return void 0===t&&(t=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 ce(e,t,n,r,i,o,a)}function fe(e){var t=y(e);if(null===t.h){var n=t.path.canonicalString();null!==t.collectionGroup&&(n+="|cg:"+t.collectionGroup),n+="|f:",n+=t.filters.map((function(e){return function(e){return e.field.canonicalString()+e.op.toString()+X(e.value)}(e)})).join(","),n+="|ob:",n+=t.orderBy.map((function(e){return function(e){return e.field.canonicalString()+e.dir}(e)})).join(","),q(t.limit)||(n+="|l:",n+=t.limit),t.startAt&&(n+="|lb:",n+=Se(t.startAt)),t.endAt&&(n+="|ub:",n+=Se(t.endAt)),t.h=n}return t.h}function he(e,t){if(e.limit!==t.limit)return!1;if(e.orderBy.length!==t.orderBy.length)return!1;for(var n=0;n<e.orderBy.length;n++)if(!xe(e.orderBy[n],t.orderBy[n]))return!1;if(e.filters.length!==t.filters.length)return!1;for(var r=0;r<e.filters.length;r++)if(i=e.filters[r],o=t.filters[r],i.op!==o.op||!i.field.isEqual(o.field)||!G(i.value,o.value))return!1;var i,o;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!Ce(e.startAt,t.startAt)&&Ce(e.endAt,t.endAt)}function de(e){return K.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}var pe=function(e){function t(t,n,r){var i=this;return(i=e.call(this)||this).field=t,i.op=n,i.value=r,i}return Object(a.__extends)(t,e),t.create=function(e,n,r){return e.isKeyField()?"in"===n||"not-in"===n?this.l(e,n,r):new ge(e,n,r):"array-contains"===n?new be(e,r):"in"===n?new _e(e,r):"not-in"===n?new we(e,r):"array-contains-any"===n?new ke(e,r):new t(e,n,r)},t.l=function(e,t,n){return"in"===t?new ve(e,n):new me(e,n)},t.prototype.matches=function(e){var t=e.data.field(this.field);return"!="===this.op?null!==t&&this.m($(t,this.value)):null!==t&&W(this.value)===W(t)&&this.m($(t,this.value))},t.prototype.m=function(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return v()}},t.prototype.g=function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0},t}((function(){})),ge=function(e){function t(t,n,r){var i=this;return(i=e.call(this,t,n,r)||this).key=K.fromName(r.referenceValue),i}return Object(a.__extends)(t,e),t.prototype.matches=function(e){var t=K.comparator(e.key,this.key);return this.m(t)},t}(pe),ve=function(e){function t(t,n){var r=this;return(r=e.call(this,t,"in",n)||this).keys=ye("in",n),r}return Object(a.__extends)(t,e),t.prototype.matches=function(e){return this.keys.some((function(t){return t.isEqual(e.key)}))},t}(pe),me=function(e){function t(t,n){var r=this;return(r=e.call(this,t,"not-in",n)||this).keys=ye("not-in",n),r}return Object(a.__extends)(t,e),t.prototype.matches=function(e){return!this.keys.some((function(t){return t.isEqual(e.key)}))},t}(pe);function ye(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map((function(e){return K.fromName(e.referenceValue)}))}var be=function(e){function t(t,n){return e.call(this,t,"array-contains",n)||this}return Object(a.__extends)(t,e),t.prototype.matches=function(e){var t=e.data.field(this.field);return te(t)&&Y(t.arrayValue,this.value)},t}(pe),_e=function(e){function t(t,n){return e.call(this,t,"in",n)||this}return Object(a.__extends)(t,e),t.prototype.matches=function(e){var t=e.data.field(this.field);return null!==t&&Y(this.value.arrayValue,t)},t}(pe),we=function(e){function t(t,n){return e.call(this,t,"not-in",n)||this}return Object(a.__extends)(t,e),t.prototype.matches=function(e){if(Y(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var t=e.data.field(this.field);return null!==t&&!Y(this.value.arrayValue,t)},t}(pe),ke=function(e){function t(t,n){return e.call(this,t,"array-contains-any",n)||this}return Object(a.__extends)(t,e),t.prototype.matches=function(e){var t=this,n=e.data.field(this.field);return!(!te(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(e){return Y(t.value.arrayValue,e)}))},t}(pe),Ee=function(e,t){this.position=e,this.before=t};function Se(e){return(e.before?"b":"a")+":"+e.position.map((function(e){return X(e)})).join(",")}var Ie=function(e,t){void 0===t&&(t="asc"),this.field=e,this.dir=t};function xe(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}function Te(e,t,n){for(var r=0,i=0;i<e.position.length;i++){var o=t[i],a=e.position[i];if(r=o.field.isKeyField()?K.comparator(K.fromName(a.referenceValue),n.key):$(a,n.data.field(o.field)),"desc"===o.dir&&(r*=-1),0!==r)break}return e.before?r<=0:r<0}function Ce(e,t){if(null===e)return null===t;if(null===t)return!1;if(e.before!==t.before||e.position.length!==t.position.length)return!1;for(var n=0;n<e.position.length;n++)if(!G(e.position[n],t.position[n]))return!1;return!0}var Oe=function(e,t,n,r,i,o,a,s){void 0===t&&(t=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=e,this.collectionGroup=t,this.explicitOrderBy=n,this.filters=r,this.limit=i,this.limitType=o,this.startAt=a,this.endAt=s,this.p=null,this.T=null,this.startAt,this.endAt};function Ae(e,t,n,r,i,o,a,s){return new Oe(e,t,n,r,i,o,a,s)}function Ne(e){return new Oe(e)}function Pe(e){return!q(e.limit)&&"F"===e.limitType}function Re(e){return!q(e.limit)&&"L"===e.limitType}function je(e){return e.explicitOrderBy.length>0?e.explicitOrderBy[0].field:null}function De(e){for(var t=0,n=e.filters;t<n.length;t++){var r=n[t];if(r.g())return r.field}return null}function Me(e){return null!==e.collectionGroup}function Le(e){var t=y(e);if(null===t.p){t.p=[];var n=De(t),r=je(t);if(null!==n&&null===r)n.isKeyField()||t.p.push(new Ie(n)),t.p.push(new Ie(P.keyField(),"asc"));else{for(var i=!1,o=0,a=t.explicitOrderBy;o<a.length;o++){var s=a[o];t.p.push(s),s.field.isKeyField()&&(i=!0)}if(!i){var u=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";t.p.push(new Ie(P.keyField(),u))}}}return t.p}function Fe(e){var t=y(e);if(!t.T)if("F"===t.limitType)t.T=le(t.path,t.collectionGroup,Le(t),t.filters,t.limit,t.startAt,t.endAt);else{for(var n=[],r=0,i=Le(t);r<i.length;r++){var o=i[r],a="desc"===o.dir?"asc":"desc";n.push(new Ie(o.field,a))}var s=t.endAt?new Ee(t.endAt.position,!t.endAt.before):null,u=t.
2startAt?new Ee(t.startAt.position,!t.startAt.before):null;t.T=le(t.path,t.collectionGroup,n,t.filters,t.limit,s,u)}return t.T}function Ue(e,t,n){return new Oe(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function Ve(e,t){return he(Fe(e),Fe(t))&&e.limitType===t.limitType}function Be(e){return fe(Fe(e))+"|lt:"+e.limitType}function qe(e){return"Query(target="+function(e){var t=e.path.canonicalString();return null!==e.collectionGroup&&(t+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(t+=", filters: ["+e.filters.map((function(e){return(t=e).field.canonicalString()+" "+t.op+" "+X(t.value);var t})).join(", ")+"]"),q(e.limit)||(t+=", limit: "+e.limit),e.orderBy.length>0&&(t+=", orderBy: ["+e.orderBy.map((function(e){return function(e){return e.field.canonicalString()+" ("+e.dir+")"}(e)})).join(", ")+"]"),e.startAt&&(t+=", startAt: "+Se(e.startAt)),e.endAt&&(t+=", endAt: "+Se(e.endAt)),"Target("+t+")"}(Fe(e))+"; limitType="+e.limitType+")"}function ze(e,t){return t.isFoundDocument()&&function(e,t){var n=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(n):K.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){for(var n=0,r=e.explicitOrderBy;n<r.length;n++){var i=r[n];if(!i.field.isKeyField()&&null===t.data.field(i.field))return!1}return!0}(e,t)&&function(e,t){for(var n=0,r=e.filters;n<r.length;n++)if(!r[n].matches(t))return!1;return!0}(e,t)&&function(e,t){return!(e.startAt&&!Te(e.startAt,Le(e),t))&&(!e.endAt||!Te(e.endAt,Le(e),t))}(e,t)}function He(e){return function(t,n){for(var r=!1,i=0,o=Le(e);i<o.length;i++){var a=o[i],s=Ke(a,t,n);if(0!==s)return s;r=r||a.field.isKeyField()}return 0}}function Ke(e,t,n){var r=e.field.isKeyField()?K.comparator(t.key,n.key):function(e,t,n){var r=t.data.field(e),i=n.data.field(e);return null!==r&&null!==i?$(r,i):v()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return v()}}function We(e,t){if(e.I){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:z(t)?"-0":t}}function Ge(e){return{integerValue:""+e}}function Ye(e,t){return H(t)?Ge(t):We(e,t)}var $e=function(){this._=void 0};function Qe(e,t,n){return e instanceof Ze?function(e,t){var n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&(n.fields.__previous_value__=t),{mapValue:n}}(n,t):e instanceof et?tt(e,t):e instanceof nt?rt(e,t):function(e,t){var n=Je(e,t),r=ot(n)+ot(e.A);return ee(n)&&ee(e.A)?Ge(r):We(e.R,r)}(e,t)}function Xe(e,t,n){return e instanceof et?tt(e,t):e instanceof nt?rt(e,t):n}function Je(e,t){return e instanceof it?ee(n=t)||function(e){return!!e&&"doubleValue"in e}(n)?t:{integerValue:0}:null;var n}var Ze=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t}($e),et=function(e){function t(t){var n=this;return(n=e.call(this)||this).elements=t,n}return Object(a.__extends)(t,e),t}($e);function tt(e,t){for(var n=at(t),r=function(e){n.some((function(t){return G(t,e)}))||n.push(e)},i=0,o=e.elements;i<o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var nt=function(e){function t(t){var n=this;return(n=e.call(this)||this).elements=t,n}return Object(a.__extends)(t,e),t}($e);function rt(e,t){for(var n=at(t),r=function(e){n=n.filter((function(t){return!G(t,e)}))},i=0,o=e.elements;i<o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var it=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).R=t,r.A=n,r}return Object(a.__extends)(t,e),t}($e);function ot(e){return L(e.integerValue||e.doubleValue)}function at(e){return te(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}var st=function(e,t){this.field=e,this.transform=t},ut=function(e,t){this.version=e,this.transformResults=t},ct=function(){function e(e,t){this.updateTime=e,this.exists=t}return e.none=function(){return new e},e.exists=function(t){return new e(void 0,t)},e.updateTime=function(t){return new e(t)},Object.defineProperty(e.prototype,"isNone",{get:function(){return void 0===this.updateTime&&void 0===this.exists}
2,enumerable:!1,configurable:!0}),e.prototype.isEqual=function(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)},e}();function lt(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}var ft=function(){};function ht(e,t,n){e instanceof mt?function(e,t,n){var r=e.value.clone(),i=_t(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(e,t,n):e instanceof yt?function(e,t,n){if(lt(e.precondition,t)){var r=_t(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(bt(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}else t.convertToUnknownDocument(n.version)}(e,t,n):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,t,n)}function dt(e,t,n){e instanceof mt?function(e,t,n){if(lt(e.precondition,t)){var r=e.value.clone(),i=wt(e.fieldTransforms,n,t);r.setAll(i),t.convertToFoundDocument(vt(t),r).setHasLocalMutations()}}(e,t,n):e instanceof yt?function(e,t,n){if(lt(e.precondition,t)){var r=wt(e.fieldTransforms,n,t),i=t.data;i.setAll(bt(e)),i.setAll(r),t.convertToFoundDocument(vt(t),i).setHasLocalMutations()}}(e,t,n):function(e,t){lt(e.precondition,t)&&t.convertToNoDocument(I.min())}(e,t)}function pt(e,t){for(var n=null,r=0,i=e.fieldTransforms;r<i.length;r++){var o=i[r],a=t.data.field(o.field),s=Je(o.transform,a||null);null!=s&&(null==n&&(n=ae.empty()),n.set(o.field,s))}return n||null}function gt(e,t){return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&!!function(e,t){return void 0===e&&void 0===t||!(!e||!t)&&k(e,t,(function(e,t){return function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof et&&t instanceof et||e instanceof nt&&t instanceof nt?k(e.elements,t.elements,G):e instanceof it&&t instanceof it?G(e.A,t.A):e instanceof Ze&&t instanceof Ze}(e.transform,t.transform)}(e,t)}))}(e.fieldTransforms,t.fieldTransforms)&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}function vt(e){return e.isFoundDocument()?e.version:I.min()}var mt=function(e){function t(t,n,r,i){void 0===i&&(i=[]);var o=this;return(o=e.call(this)||this).key=t,o.value=n,o.precondition=r,o.fieldTransforms=i,o.type=0,o}return Object(a.__extends)(t,e),t}(ft),yt=function(e){function t(t,n,r,i,o){void 0===o&&(o=[]);var a=this;return(a=e.call(this)||this).key=t,a.data=n,a.fieldMask=r,a.precondition=i,a.fieldTransforms=o,a.type=1,a}return Object(a.__extends)(t,e),t}(ft);function bt(e){var t=new Map;return e.fieldMask.fields.forEach((function(n){if(!n.isEmpty()){var r=e.data.field(n);t.set(n,r)}})),t}function _t(e,t,n){var r=new Map;m(e.length===n.length);for(var i=0;i<n.length;i++){var o=e[i],a=o.transform,s=t.data.field(o.field);r.set(o.field,Xe(a,s,n[i]))}return r}function wt(e,t,n){for(var r=new Map,i=0,o=e;i<o.length;i++){var a=o[i],s=a.transform,u=n.data.field(a.field);r.set(a.field,Qe(s,u,t))}return r}var kt,Et,St=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).key=t,r.precondition=n,r.type=2,r.fieldTransforms=[],r}return Object(a.__extends)(t,e),t}(ft),It=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).key=t,r.precondition=n,r.type=3,r.fieldTransforms=[],r}return Object(a.__extends)(t,e),t}(ft),xt=function(e){this.count=e};function Tt(e){switch(e){case u.OK:return v();case u.CANCELLED:case u.UNKNOWN:case u.DEADLINE_EXCEEDED:case u.RESOURCE_EXHAUSTED:case u.INTERNAL:case u.UNAVAILABLE:case u.UNAUTHENTICATED:return!1;case u.INVALID_ARGUMENT:case u.NOT_FOUND:case u.ALREADY_EXISTS:case u.PERMISSION_DENIED:case u.FAILED_PRECONDITION:case u.ABORTED:case u.OUT_OF_RANGE:case u.UNIMPLEMENTED:case u.DATA_LOSS:return!0;default:return v()}}function Ct(e){if(void 0===e)return d("GRPC error has no .code"),u.UNKNOWN;switch(e){case kt.OK:return u.OK;case kt.CANCELLED:return u.CANCELLED;case kt.UNKNOWN:return u.UNKNOWN;case kt.DEADLINE_EXCEEDED:return u.DEADLINE_EXCEEDED;case kt.RESOURCE_EXHAUSTED:return u.RESOURCE_EXHAUSTED;case kt.INTERNAL:return u.INTERNAL;case kt.UNAVAILABLE:return u.UNAVAILABLE;case kt.UNAUTHENTICATED:return u.UNAUTHENTICATED;case kt.INVALID_ARGUMENT:return u.INVALID_ARGUMENT;case kt.NOT_FOUND:return u.NOT_FOUND;case kt.ALREADY_EXISTS:return u.ALREADY_EXISTS;case kt.PERMISSION_DENIED:return u.PERMISSION_DENIED;case kt.FAILED_PRECONDITION:return u.FAILED_PRECONDITION;case kt.ABORTED:return u.ABORTED;case kt.OUT_OF_RANGE:return u.OUT_OF_RANGE;
2case kt.UNIMPLEMENTED:return u.UNIMPLEMENTED;case kt.DATA_LOSS:return u.DATA_LOSS;default:return v()}}(Et=kt||(kt={}))[Et.OK=0]="OK",Et[Et.CANCELLED=1]="CANCELLED",Et[Et.UNKNOWN=2]="UNKNOWN",Et[Et.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Et[Et.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Et[Et.NOT_FOUND=5]="NOT_FOUND",Et[Et.ALREADY_EXISTS=6]="ALREADY_EXISTS",Et[Et.PERMISSION_DENIED=7]="PERMISSION_DENIED",Et[Et.UNAUTHENTICATED=16]="UNAUTHENTICATED",Et[Et.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Et[Et.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Et[Et.ABORTED=10]="ABORTED",Et[Et.OUT_OF_RANGE=11]="OUT_OF_RANGE",Et[Et.UNIMPLEMENTED=12]="UNIMPLEMENTED",Et[Et.INTERNAL=13]="INTERNAL",Et[Et.UNAVAILABLE=14]="UNAVAILABLE",Et[Et.DATA_LOSS=15]="DATA_LOSS";var Ot=function(){function e(e,t){this.comparator=e,this.root=t||Nt.EMPTY}return e.prototype.insert=function(t,n){return new e(this.comparator,this.root.insert(t,n,this.comparator).copy(null,null,Nt.BLACK,null,null))},e.prototype.remove=function(t){return new e(this.comparator,this.root.remove(t,this.comparator).copy(null,null,Nt.BLACK,null,null))},e.prototype.get=function(e){for(var t=this.root;!t.isEmpty();){var n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null},e.prototype.indexOf=function(e){for(var t=0,n=this.root;!n.isEmpty();){var r=this.comparator(e,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1},e.prototype.isEmpty=function(){return this.root.isEmpty()},Object.defineProperty(e.prototype,"size",{get:function(){return this.root.size},enumerable:!1,configurable:!0}),e.prototype.minKey=function(){return this.root.minKey()},e.prototype.maxKey=function(){return this.root.maxKey()},e.prototype.inorderTraversal=function(e){return this.root.inorderTraversal(e)},e.prototype.forEach=function(e){this.inorderTraversal((function(t,n){return e(t,n),!1}))},e.prototype.toString=function(){var e=[];return this.inorderTraversal((function(t,n){return e.push(t+":"+n),!1})),"{"+e.join(", ")+"}"},e.prototype.reverseTraversal=function(e){return this.root.reverseTraversal(e)},e.prototype.getIterator=function(){return new At(this.root,null,this.comparator,!1)},e.prototype.getIteratorFrom=function(e){return new At(this.root,e,this.comparator,!1)},e.prototype.getReverseIterator=function(){return new At(this.root,null,this.comparator,!0)},e.prototype.getReverseIteratorFrom=function(e){return new At(this.root,e,this.comparator,!0)},e}(),At=function(){function e(e,t,n,r){this.isReverse=r,this.nodeStack=[];for(var i=1;!e.isEmpty();)if(i=t?n(e.key,t):1,r&&(i*=-1),i<0)e=this.isReverse?e.left:e.right;else{if(0===i){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}return e.prototype.getNext=function(){var e=this.nodeStack.pop(),t={key:e.key,value:e.value};if(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},e.prototype.hasNext=function(){return this.nodeStack.length>0},e.prototype.peek=function(){if(0===this.nodeStack.length)return null;var e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}},e}(),Nt=function(){function e(t,n,r,i,o){this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=i?i:e.EMPTY,this.right=null!=o?o:e.EMPTY,this.size=this.left.size+1+this.right.size}return e.prototype.copy=function(t,n,r,i,o){return new e(null!=t?t:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},e.prototype.isEmpty=function(){return!1},e.prototype.inorderTraversal=function(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)},e.prototype.min=function(){return this.left.isEmpty()?this:this.left.min()},e.prototype.minKey=function(){return this.min().key},e.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},e.prototype.insert=function(e,t,n){var r=this,i=n(e,r.key);return(r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n))).fixUp()},e.prototype.removeMin=function(){if(this.left.isEmpty())return e.EMPTY;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()},e.prototype.remove=function(t,n){var r,i=this;if(n(t,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(t,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),0===n(t,i.key)){if(i.right.isEmpty())return e.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(t,n))}return i.fixUp()},e.prototype.isRed=function(){return this.color},e.prototype.fixUp=function(){var e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e},e.prototype.moveRedLeft=function(){var e=this.colorFlip();return e.right.left.isRed()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight())).rotateLeft()).colorFlip()),e},e.prototype.moveRedRight=function(){var e=this.colorFlip();return e.left.left.isRed()&&(e=(e=e.rotateRight()).colorFlip()),e},e.prototype.rotateLeft=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.rotateRight=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.colorFlip=function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)},e.prototype.checkMaxDepth=function(){var e=this.check();return Math.pow(2,e)<=this.size+1},e.prototype.check=function(){if(this.isRed()&&this.left.isRed())throw v();if(this.right.isRed())throw v();var e=this.left.check();if(e!==this.right.check())throw v();return e+(this.isRed()?0:1)},e}();
2Nt.EMPTY=null,Nt.RED=!0,Nt.BLACK=!1,Nt.EMPTY=new(function(){function e(){this.size=0}return Object.defineProperty(e.prototype,"key",{get:function(){throw v()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){throw v()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){throw v()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){throw v()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){throw v()},enumerable:!1,configurable:!0}),e.prototype.copy=function(e,t,n,r,i){return this},e.prototype.insert=function(e,t,n){return new Nt(e,t)},e.prototype.remove=function(e,t){return this},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(e){return!1},e.prototype.reverseTraversal=function(e){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.isRed=function(){return!1},e.prototype.checkMaxDepth=function(){return!0},e.prototype.check=function(){return 0},e}());var Pt=function(){function e(e){this.comparator=e,this.data=new Ot(this.comparator)}return e.prototype.has=function(e){return null!==this.data.get(e)},e.prototype.first=function(){return this.data.minKey()},e.prototype.last=function(){return this.data.maxKey()},Object.defineProperty(e.prototype,"size",{get:function(){return this.data.size},enumerable:!1,configurable:!0}),e.prototype.indexOf=function(e){return this.data.indexOf(e)},e.prototype.forEach=function(e){this.data.inorderTraversal((function(t,n){return e(t),!1}))},e.prototype.forEachInRange=function(e,t){for(var n=this.data.getIteratorFrom(e[0]);n.hasNext();){var r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}},e.prototype.forEachWhile=function(e,t){var n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!e(n.getNext().key))return},e.prototype.firstAfterOrEqual=function(e){var t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null},e.prototype.getIterator=function(){return new Rt(this.data.getIterator())},e.prototype.getIteratorFrom=function(e){return new Rt(this.data.getIteratorFrom(e))},e.prototype.add=function(e){return this.copy(this.data.remove(e).insert(e,!0))},e.prototype.delete=function(e){return this.has(e)?this.copy(this.data.remove(e)):this},e.prototype.isEmpty=function(){return this.data.isEmpty()},e.prototype.unionWith=function(e){var t=this;return t.size<e.size&&(t=e,e=this),e.forEach((function(e){t=t.add(e)})),t},e.prototype.isEqual=function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.data.getIterator(),r=t.data.getIterator();n.hasNext();){var i=n.getNext().key,o=r.getNext().key;if(0!==this.comparator(i,o))return!1}return!0},e.prototype.toArray=function(){var e=[];return this.forEach((function(t){e.push(t)})),e},e.prototype.toString=function(){var e=[];return this.forEach((function(t){return e.push(t)})),"SortedSet("+e.toString()+")"},e.prototype.copy=function(t){var n=new e(this.comparator);return n.data=t,n},e}(),Rt=function(){function e(e){this.iter=e}return e.prototype.getNext=function(){return this.iter.getNext().key},e.prototype.hasNext=function(){return this.iter.hasNext()},e}(),jt=new Ot(K.comparator);function Dt(){return jt}var Mt=new Ot(K.comparator);function Lt(){return Mt}var Ft=new Ot(K.comparator);function Ut(){return Ft}var Vt=new Pt(K.comparator);function Bt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=Vt,r=0,i=e;r<i.length;r++){var o=i[r];n=n.add(o)}return n}var qt=new Pt(w);function zt(){return qt}var Ht=function(){function e(e,t,n,r,i){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=n,this.documentUpdates=r,this.resolvedLimboDocuments=i}return e.createSynthesizedRemoteEventForCurrentChange=function(t,n){var r=new Map;return r.set(t,Kt.createSynthesizedTargetChangeForCurrentChange(t,n)),new e(I.min(),r,zt(),Dt(),Bt())},e}(),Kt=function(){function e(e,t,n,r,i){this.resumeToken=e,this.current=t,this.addedDocuments=n,this.modifiedDocuments=r,this.removedDocuments=i}return e.createSynthesizedTargetChangeForCurrentChange=function(t,n){return new e(j.EMPTY_BYTE_STRING,n,Bt(),Bt(),Bt())},e}(),Wt=function(e,t,n,r){this.v=e,this.removedTargetIds=t,this.key=n,this.P=r},Gt=function(e,t){this.targetId=e,this.V=t},Yt=function(e,t,n,r){void 0===n&&(n=j.EMPTY_BYTE_STRING),void 0===r&&(r=null),this.state=e,this.targetIds=t,this.resumeToken=n,this.cause=r},$t=function(){function e(){this.S=0,this.D=Jt(),this.C=j.EMPTY_BYTE_STRING,this.N=!1,this.F=!0}return Object.defineProperty(e.prototype,"current",{get:function(){return this.N}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resumeToken",{get:function(){return this.C},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"k",{get:function(){return 0!==this.S},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"$",{get:function(){return this.F},enumerable:!1,configurable:!0}),e.prototype.O=function(e){e.approximateByteSize()>0&&(this.F=!0,this.C=e)},e.prototype.M=function(){var e=Bt(),t=Bt(),n=Bt();return this.D.forEach((function(r,i){switch(i){case 0:e=e.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:v()}})),new Kt(this.C,this.N,e,t,n)},e.prototype.L=function(){this.F=!1,this.D=Jt()},e.prototype.B=function(e,t){this.F=!0,this.D=this.D.insert(e,t)},e.prototype.q=function(e){this.F=!0,this.D=this.D.remove(e)},e.prototype.U=function(){this.S+=1},e.prototype.K=function(){this.S-=1},e.prototype.j=function(){this.F=!0,this.N=!0},e}(),Qt=function(){function e(e){this.W=e,this.G=new Map,this.H=Dt(),this.J=Xt(),this.Y=new Pt(w)}return e.prototype.X=function(e){for(var t=0,n=e.v;t<n.length;t++){var r=n[t];e.P&&e.P.isFoundDocument()?this.Z(r,e.P):this.tt(r,e.key,e.P)}for(var i=0,o=e.removedTargetIds;i<o.length;i++)r=o[i],this.tt(r,e.key,e.P)},e.prototype.et=function(e){var t=this;this.forEachTarget(e,(function(n){var r=t.nt(n);switch(e.state){case 0:t.st(n)&&r.O(e.resumeToken);break;case 1:r.K(),r.k||r.L(),r.O(e.resumeToken);break;case 2:r.K(),r.k||t.removeTarget(n);break;case 3:t.st(n)&&(r.j(),r.O(e.resumeToken));break;case 4:t.st(n)&&(t.it(n),r.O(e.resumeToken));break;default:v()}}))},e.prototype.forEachTarget=function(e,t){var n=this;e.targetIds.length>0?e.targetIds.forEach(t):this.G.forEach((function(e,r){n.st(r)&&t(r)}))},e.prototype.rt=function(e){var t=e.targetId,n=e.V.count,r=this.ot(t);if(r){var i=r.target;if(de(i))if(0===n){var o=new K(i.path);this.tt(t,o,ue.newNoDocument(o,I.min()))}else m(1===n);else this.ct(t)!==n&&(this.it(t),this.Y=this.Y.add(t))}},e.prototype.ut=function(e){var t=this,n=new Map;this.G.forEach((function(r,i){var o=t.ot(i);if(o){if(r.current&&de(o.target)){var a=new K(o.target.path);null!==t.H.get(a)||t.at(i,a)||t.tt(i,a,ue.newNoDocument(a,e))}r.$&&(n.set(i,r.M()),r.L())}}));var r=Bt();this.J.forEach((function(e,n){var i=!0;n.forEachWhile((function(e){var n=t.ot(e);return!n||2===n.purpose||(i=!1,!1)})),i&&(r=r.add(e))}));var i=new Ht(e,n,this.Y,this.H,r);return this.H=Dt(),this.J=Xt(),this.Y=new Pt(w),i},e.prototype.Z=function(e,t){if(this.st(e)){var n=this.at(e,t.key)?2:0;this.nt(e).B(t.key,n),this.H=this.H.insert(t.key,t),this.J=this.J.insert(t.key,this.ht(t.key).add(e))}},e.prototype.tt=function(e,t,n){if(this.st(e)){var r=this.nt(e);this.at(e,t)?r.B(t,1):r.q(t),this.J=this.J.insert(t,this.ht(t).delete(e)),n&&(this.H=this.H.insert(t,n))}},e.prototype.removeTarget=function(e){this.G.delete(e)},e.prototype.ct=function(e){var t=this.nt(e).M();return this.W.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size},e.prototype.U=function(e){this.nt(e).U()},e.prototype.nt=function(e){var t=this.G.get(e);return t||(t=new $t,this.G.set(e,t)),t},e.prototype.ht=function(e){var t=this.J.get(e);return t||(t=new Pt(w),this.J=this.J.insert(e,t)),t},e.prototype.st=function(e){var t=null!==this.ot(e);return t||h("WatchChangeAggregator","Detected inactive target",e),t},e.prototype.ot=function(e){var t=this.G.get(e);return t&&t.k?null:this.W.lt(e)},e.prototype.it=function(e){var t=this;this.G.set(e,new $t),this.W.getRemoteKeysForTarget(e).forEach((function(n){t.tt(e,n,null)}))},e.prototype.at=function(e,t){return this.W.getRemoteKeysForTarget(e).has(t)},e}();function Xt(){return new Ot(K.comparator)}function Jt(){return new Ot(K.comparator)}var Zt={asc:"ASCENDING",desc:"DESCENDING"},en={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},tn=function(e,t){this.databaseId=e,this.I=t};function nn(e,t){return e.I?new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")+"."+("000000000"+t.nanoseconds).slice(-9)+"Z":{seconds:""+t.seconds,nanos:t.nanoseconds}}function rn(e,t){return e.I?t.toBase64():t.toUint8Array()}function on(e,t){return nn(e,t.toTimestamp())}function an(e){return m(!!e),I.fromTimestamp(function(e){var t=M(e);return new S(t.seconds,t.nanos)}(e))}function sn(e,t){return function(e){return new A(["projects",e.projectId,"databases",e.database])}(e).child("documents").child(t).canonicalString()}function un(e){var t=A.fromString(e);return m(Pn(t)),t}function cn(e,t){return sn(e.databaseId,t.path)}function ln(e,t){var n=un(t);if(n.get(1)!==e.databaseId.projectId)throw new c(u.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new c(u.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new K(pn(n))}function fn(e,t){return sn(e.databaseId,t)}function hn(e){var t=un(e);return 4===t.length?A.emptyPath():pn(t)}function dn(e){return new A(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function pn(e){return m(e.length>4&&"documents"===e.get(4)),e.popFirst(5)}function gn(e,t,n){return{name:cn(e,t),fields:n.value.mapValue.fields}}
2function vn(e,t,n){var r=ln(e,t.name),i=an(t.updateTime),o=new ae({mapValue:{fields:t.fields}}),a=ue.newFoundDocument(r,i,o);return n&&a.setHasCommittedMutations(),n?a.setHasCommittedMutations():a}function mn(e,t){var n;if(t instanceof mt)n={update:gn(e,t.key,t.value)};else if(t instanceof St)n={delete:cn(e,t.key)};else if(t instanceof yt)n={update:gn(e,t.key,t.data),updateMask:Nn(t.fieldMask)};else{if(!(t instanceof It))return v();n={verify:cn(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map((function(e){return function(e,t){var n=t.transform;if(n instanceof Ze)return{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof et)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof nt)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof it)return{fieldPath:t.field.canonicalString(),increment:n.A};throw v()}(0,e)}))),t.precondition.isNone||(n.currentDocument=function(e,t){return void 0!==t.updateTime?{updateTime:on(e,t.updateTime)}:void 0!==t.exists?{exists:t.exists}:v()}(e,t.precondition)),n}function yn(e,t){var n=t.currentDocument?function(e){return void 0!==e.updateTime?ct.updateTime(an(e.updateTime)):void 0!==e.exists?ct.exists(e.exists):ct.none()}(t.currentDocument):ct.none(),r=t.updateTransforms?t.updateTransforms.map((function(t){return function(e,t){var n=null;if("setToServerValue"in t)m("REQUEST_TIME"===t.setToServerValue),n=new Ze;else if("appendMissingElements"in t){var r=t.appendMissingElements.values||[];n=new et(r)}else if("removeAllFromArray"in t){var i=t.removeAllFromArray.values||[];n=new nt(i)}else"increment"in t?n=new it(e,t.increment):v();var o=P.fromServerFormat(t.fieldPath);return new st(o,n)}(e,t)})):[];if(t.update){t.update.name;var i=ln(e,t.update.name),o=new ae({mapValue:{fields:t.update.fields}});if(t.updateMask){var a=function(e){var t=e.fieldPaths||[];return new R(t.map((function(e){return P.fromServerFormat(e)})))}(t.updateMask);return new yt(i,o,a,n,r)}return new mt(i,o,n,r)}if(t.delete){var s=ln(e,t.delete);return new St(s,n)}if(t.verify){var u=ln(e,t.verify);return new It(u,n)}return v()}function bn(e,t){return{documents:[fn(e,t.path)]}}function _n(e,t){var n={structuredQuery:{}},r=t.path;null!==t.collectionGroup?(n.parent=fn(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=fn(e,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);var i=function(e){if(0!==e.length){var t=e.map((function(e){return function(e){if("=="===e.op){if(re(e.value))return{unaryFilter:{field:Tn(e.field),op:"IS_NAN"}};if(ne(e.value))return{unaryFilter:{field:Tn(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(re(e.value))return{unaryFilter:{field:Tn(e.field),op:"IS_NOT_NAN"}};if(ne(e.value))return{unaryFilter:{field:Tn(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Tn(e.field),op:xn(e.op),value:e.value}}}(e)}));return 1===t.length?t[0]:{compositeFilter:{op:"AND",filters:t}}}}(t.filters);i&&(n.structuredQuery.where=i);var o=function(e){if(0!==e.length)return e.map((function(e){return function(e){return{field:Tn(e.field),direction:In(e.dir)}}(e)}))}(t.orderBy);o&&(n.structuredQuery.orderBy=o);var a=function(e,t){return e.I||q(t)?t:{value:t}}(e,t.limit);return null!==a&&(n.structuredQuery.limit=a),t.startAt&&(n.structuredQuery.startAt=En(t.startAt)),t.endAt&&(n.structuredQuery.endAt=En(t.endAt)),n}function wn(e){var t=hn(e.parent),n=e.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){m(1===r);var o=n.from[0];o.allDescendants?i=o.collectionId:t=t.child(o.collectionId)}var a=[];n.where&&(a=kn(n.where));var s=[];n.orderBy&&(s=n.orderBy.map((function(e){return function(e){return new Ie(Cn(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}(e)})));var u=null;n.limit&&(u=function(e){var t;return q(t="object"==typeof e?e.value:e)?null:t}(n.limit));var c=null;n.startAt&&(c=Sn(n.startAt));var l=null;return n.endAt&&(l=Sn(n.endAt)),Ae(t,i,s,a,u,"F",c,l)}function kn(e){return e?void 0!==e.unaryFilter?[An(e)]:void 0!==e.fieldFilter?[On(e)]:void 0!==e.compositeFilter?e.compositeFilter.filters.map((function(e){return kn(e)})).reduce((function(e,t){return e.concat(t)})):v():[]}function En(e){return{before:e.before,values:e.position}}function Sn(e){var t=!!e.before,n=e.values||[];return new Ee(n,t)}function In(e){return Zt[e]}function xn(e){return en[e]}function Tn(e){return{fieldPath:e.canonicalString()}}function Cn(e){return P.fromServerFormat(e.fieldPath)}function On(e){return pe.create(Cn(e.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_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"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":default:return v()}}(e.fieldFilter.op),e.fieldFilter.value)}function An(e){switch(e.unaryFilter.op){case"IS_NAN":var t=Cn(e.unaryFilter.field);return pe.create(t,"==",{doubleValue:NaN});case"IS_NULL":var n=Cn(e.unaryFilter.field);return pe.create(n,"==",{nullValue:"NULL_VALUE"});
2case"IS_NOT_NAN":var r=Cn(e.unaryFilter.field);return pe.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=Cn(e.unaryFilter.field);return pe.create(i,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":default:return v()}}function Nn(e){var t=[];return e.fields.forEach((function(e){return t.push(e.canonicalString())})),{fieldPaths:t}}function Pn(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}function Rn(e){for(var t="",n=0;n<e.length;n++)t.length>0&&(t=Dn(t)),t=jn(e.get(n),t);return Dn(t)}function jn(e,t){for(var n=t,r=e.length,i=0;i<r;i++){var o=e.charAt(i);switch(o){case"\0":n+="\x01\x10";break;case"\x01":n+="\x01\x11";break;default:n+=o}}return n}function Dn(e){return e+"\x01\x01"}function Mn(e){var t=e.length;if(m(t>=2),2===t)return m("\x01"===e.charAt(0)&&"\x01"===e.charAt(1)),A.emptyPath();for(var n=t-2,r=[],i="",o=0;o<t;){var a=e.indexOf("\x01",o);switch((a<0||a>n)&&v(),e.charAt(a+1)){case"\x01":var s=e.substring(o,a),u=void 0;0===i.length?u=s:(u=i+=s,i=""),r.push(u);break;case"\x10":i+=e.substring(o,a),i+="\0";break;case"\x11":i+=e.substring(o,a+1);break;default:v()}o=a+2}return new A(r)}var Ln=function(e,t){this.seconds=e,this.nanoseconds=t},Fn=function(e,t,n){this.ownerId=e,this.allowTabSynchronization=t,this.leaseTimestampMs=n};Fn.store="owner",Fn.key="owner";var Un=function(e,t,n){this.userId=e,this.lastAcknowledgedBatchId=t,this.lastStreamToken=n};Un.store="mutationQueues",Un.keyPath="userId";var Vn=function(e,t,n,r,i){this.userId=e,this.batchId=t,this.localWriteTimeMs=n,this.baseMutations=r,this.mutations=i};Vn.store="mutations",Vn.keyPath="batchId",Vn.userMutationsIndex="userMutationsIndex",Vn.userMutationsKeyPath=["userId","batchId"];var Bn=function(){function e(){}return e.prefixForUser=function(e){return[e]},e.prefixForPath=function(e,t){return[e,Rn(t)]},e.key=function(e,t,n){return[e,Rn(t),n]},e}();Bn.store="documentMutations",Bn.PLACEHOLDER=new Bn;var qn=function(e,t){this.path=e,this.readTime=t},zn=function(e,t){this.path=e,this.version=t},Hn=function(e,t,n,r,i,o){this.unknownDocument=e,this.noDocument=t,this.document=n,this.hasCommittedMutations=r,this.readTime=i,this.parentPath=o};Hn.store="remoteDocuments",Hn.readTimeIndex="readTimeIndex",Hn.readTimeIndexPath="readTime",Hn.collectionReadTimeIndex="collectionReadTimeIndex",Hn.collectionReadTimeIndexPath=["parentPath","readTime"];var Kn=function(e){this.byteSize=e};Kn.store="remoteDocumentGlobal",Kn.key="remoteDocumentGlobalKey";var Wn=function(e,t,n,r,i,o,a){this.targetId=e,this.canonicalId=t,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=i,this.lastLimboFreeSnapshotVersion=o,this.query=a};Wn.store="targets",Wn.keyPath="targetId",Wn.queryTargetsIndexName="queryTargetsIndex",Wn.queryTargetsKeyPath=["canonicalId","targetId"];var Gn=function(e,t,n){this.targetId=e,this.path=t,this.sequenceNumber=n};Gn.store="targetDocuments",Gn.keyPath=["targetId","path"],Gn.documentTargetsIndex="documentTargetsIndex",Gn.documentTargetsKeyPath=["path","targetId"];var Yn=function(e,t,n,r){this.highestTargetId=e,this.highestListenSequenceNumber=t,this.lastRemoteSnapshotVersion=n,this.targetCount=r};Yn.key="targetGlobalKey",Yn.store="targetGlobal";var $n=function(e,t){this.collectionId=e,this.parent=t};$n.store="collectionParents",$n.keyPath=["collectionId","parent"];var Qn=function(e,t,n,r){this.clientId=e,this.updateTimeMs=t,this.networkEnabled=n,this.inForeground=r};Qn.store="clientMetadata",Qn.keyPath="clientId";var Xn=function(e,t,n){this.bundleId=e,this.createTime=t,this.version=n};Xn.store="bundles",Xn.keyPath="bundleId";var Jn=function(e,t,n){this.name=e,this.readTime=t,this.bundledQuery=n};Jn.store="namedQueries",Jn.keyPath="name";var Zn=Object(a.__spreadArray)(Object(a.__spreadArray)([],Object(a.__spreadArray)(Object(a.__spreadArray)([],Object(a.__spreadArray)(Object(a.__spreadArray)([],Object(a.__spreadArray)(Object(a.__spreadArray)([],[Un.store,Vn.store,Bn.store,Hn.store,Wn.store,Fn.store,Yn.store,Gn.store]),[Qn.store])),[Kn.store])),[$n.store])),[Xn.store,Jn.store]),er="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",tr=function(){function e(){this.onCommittedListeners=[]}return e.prototype.addOnCommittedListener=function(e){this.onCommittedListeners.push(e)},e.prototype.raiseOnCommittedEvent=function(){this.onCommittedListeners.forEac
2h((function(e){return e()}))},e}(),nr=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))},rr=function(){function e(e){var t=this;this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e((function(e){t.isDone=!0,t.result=e,t.nextCallback&&t.nextCallback(e)}),(function(e){t.isDone=!0,t.error=e,t.catchCallback&&t.catchCallback(e)}))}return e.prototype.catch=function(e){return this.next(void 0,e)},e.prototype.next=function(t,n){var r=this;return this.callbackAttached&&v(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(t,this.result):new e((function(e,i){r.nextCallback=function(n){r.wrapSuccess(t,n).next(e,i)},r.catchCallback=function(t){r.wrapFailure(n,t).next(e,i)}}))},e.prototype.toPromise=function(){var e=this;return new Promise((function(t,n){e.next(t,n)}))},e.prototype.wrapUserFunction=function(t){try{var n=t();return n instanceof e?n:e.resolve(n)}catch(t){return e.reject(t)}},e.prototype.wrapSuccess=function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.resolve(n)},e.prototype.wrapFailure=function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.reject(n)},e.resolve=function(t){return new e((function(e,n){e(t)}))}
2,e.reject=function(t){return new e((function(e,n){n(t)}))},e.waitFor=function(t){return new e((function(e,n){var r=0,i=0,o=!1;t.forEach((function(t){++r,t.next((function(){++i,o&&i===r&&e()}),(function(e){return n(e)}))})),o=!0,i===r&&e()}))},e.or=function(t){for(var n=e.resolve(!1),r=function(t){n=n.next((function(n){return n?e.resolve(n):t()}))},i=0,o=t;i<o.length;i++)r(o[i]);return n},e.forEach=function(e,t){var n=this,r=[];return e.forEach((function(e,i){r.push(t.call(n,e,i))})),this.waitFor(r)},e}(),ir=function(){function e(e,t){var n=this;this.action=e,this.transaction=t,this.aborted=!1,this.ft=new nr,this.transaction.oncomplete=function(){n.ft.resolve()},this.transaction.onabort=function(){t.error?n.ft.reject(new sr(e,t.error)):n.ft.resolve()},this.transaction.onerror=function(t){var r=hr(t.target.error);n.ft.reject(new sr(e,r))}}return e.open=function(t,n,r,i){try{return new e(n,t.transaction(i,r))}catch(t){throw new sr(n,t)}},Object.defineProperty(e.prototype,"dt",{get:function(){return this.ft.promise},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){e&&this.ft.reject(e),this.aborted||(h("SimpleDb","Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())},e.prototype.store=function(e){var t=this.transaction.objectStore(e);return new cr(t)},e}(),or=function(){function t(e,n,i){this.name=e,this.version=n,this.wt=i,12.2===t._t(Object(r.getUA)())&&d("Firestore persistence suffers from a bug in iOS 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 t.delete=function(e){return h("SimpleDb","Removing database:",e),lr(window.indexedDB.deleteDatabase(e)).toPromise()},t.yt=function(){if("undefined"==typeof indexedDB)return!1;if(t.gt())return!0;var e=Object(r.getUA)(),n=t._t(e),i=0<n&&n<10,o=t.Et(e),a=0<o&&o<4.5;return!(e.indexOf("MSIE ")>0||e.indexOf("Trident/")>0||e.indexOf("Edge/")>0||i||a)},t.gt=function(){var t;return"undefined"!=typeof e&&"YES"===(null===(t=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}))||void 0===t?void 0:t.Tt)},t.It=function(e,t){return e.store(t)},t._t=function(e){var t=e.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=t?t[1].split("_").slice(0,2).join("."):"-1";return Number(n)},t.Et=function(e){var t=e.match(/Android ([\d.]+)/i),n=t?t[1].split(".").slice(0,2).join("."):"-1";return Number(n)},t.prototype.At=function(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t,n=this;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:return this.db?[3,2]:(h("SimpleDb","Opening database:",this.name),t=this,[4,new Promise((function(t,r){var i=indexedDB.open(n.name,n.version);i.onsuccess=function(e){var n=e.target.result;t(n)},i.onblocked=function(){r(new sr(e,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},i.onerror=function(t){var n=t.target.error;"VersionError"===n.name?r(new c(u.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.")):r(new sr(e,n))},i.onupgradeneeded=function(e){h("SimpleDb",'Database "'+n.name+'" requires upgrade from version:',e.oldVersion);var t=e.target.result;n.wt.Rt(t,i.transaction,e.oldVersion,n.version).next((function(){h("SimpleDb","Database upgrade to version "+n.version+" complete")}))}}))]);case 1:t.db=r.sent(),r.label=2;case 2:return[2,(this.bt&&(this.db.onversionchange=function(e){return n.bt(e)}),this.db)]}}))}))},t.prototype.vt=function(e){this.bt=e,this.db&&(this.db.onversionchange=function(t){return e(t)})},t.prototype.runTransaction=function(e,t,n,r){return Object(a.__awaiter)(this,void 0,void 0,(function(){var i,o,s,u,c;return Object(a.__generator)(this,(function(l){switch(l.label){case 0:i="readonly"===t,o=0,s=function(){var t,s,c,l,f;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:++o,a.label=1;case 1:return a.trys.push([1,4,,5]),[4,u.At(e)];
2case 2:return u.db=a.sent(),t=ir.open(u.db,e,i?"readonly":"readwrite",n),s=r(t).catch((function(e){return t.abort(e),rr.reject(e)})).toPromise(),c={},s.catch((function(){})),[4,t.dt];case 3:return[2,(c.value=(a.sent(),s),c)];case 4:return l=a.sent(),f="FirebaseError"!==l.name&&o<3,h("SimpleDb","Transaction failed with error:",l.message,"Retrying:",f),u.close(),f?[3,5]:[2,{value:Promise.reject(l)}];case 5:return[2]}}))},u=this,l.label=1;case 1:return[5,s()];case 2:if("object"==typeof(c=l.sent()))return[2,c.value];l.label=3;case 3:return[3,1];case 4:return[2]}}))}))},t.prototype.close=function(){this.db&&this.db.close(),this.db=void 0},t}(),ar=function(){function e(e){this.Pt=e,this.Vt=!1,this.St=null}return Object.defineProperty(e.prototype,"isDone",{get:function(){return this.Vt},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Dt",{get:function(){return this.St},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cursor",{set:function(e){this.Pt=e},enumerable:!1,configurable:!0}),e.prototype.done=function(){this.Vt=!0},e.prototype.Ct=function(e){this.St=e},e.prototype.delete=function(){return lr(this.Pt.delete())},e}(),sr=function(e){function t(t,n){var r=this;return(r=e.call(this,u.UNAVAILABLE,"IndexedDB transaction '"+t+"' failed: "+n)||this).name="IndexedDbTransactionError",r}return Object(a.__extends)(t,e),t}(c);function ur(e){return"IndexedDbTransactionError"===e.name}var cr=function(){function e(e){this.store=e}return e.prototype.put=function(e,t){var n;return void 0!==t?(h("SimpleDb","PUT",this.store.name,e,t),n=this.store.put(t,e)):(h("SimpleDb","PUT",this.store.name,"<auto-key>",e),n=this.store.put(e)),lr(n)},e.prototype.add=function(e){return h("SimpleDb","ADD",this.store.name,e,e),lr(this.store.add(e))},e.prototype.get=function(e){var t=this;return lr(this.store.get(e)).next((function(n){return void 0===n&&(n=null),h("SimpleDb","GET",t.store.name,e,n),n}))},e.prototype.delete=function(e){return h("SimpleDb","DELETE",this.store.name,e),lr(this.store.delete(e))},e.prototype.count=function(){return h("SimpleDb","COUNT",this.store.name),lr(this.store.count())},e.prototype.Nt=function(e,t){var n=this.cursor(this.options(e,t)),r=[];return this.xt(n,(function(e,t){r.push(t)})).next((function(){return r}))},e.prototype.Ft=function(e,t){h("SimpleDb","DELETE ALL",this.store.name);var n=this.options(e,t);n.kt=!1;var r=this.cursor(n);return this.xt(r,(function(e,t,n){return n.delete()}))},e.prototype.$t=function(e,t){var n;t?n=e:(n={},t=e);var r=this.cursor(n);return this.xt(r,t)},e.prototype.Ot=function(e){var t=this.cursor({});return new rr((function(n,r){t.onerror=function(e){var t=hr(e.target.error);r(t)},t.onsuccess=function(t){var r=t.target.result;r?e(r.primaryKey,r.value).next((function(e){e?r.continue():n()})):n()}}))},e.prototype.xt=function(e,t){var n=[];return new rr((function(r,i){e.onerror=function(e){i(e.target.error)},e.onsuccess=function(e){var i=e.target.result;if(i){var o=new ar(i),a=t(i.primaryKey,i.value,o);if(a instanceof rr){var s=a.catch((function(e){return o.done(),rr.reject(e)}));n.push(s)}o.isDone?r():null===o.Dt?i.continue():i.continue(o.Dt)}else r()}})).next((function(){return rr.waitFor(n)}))},e.prototype.options=function(e,t){var n;return void 0!==e&&("string"==typeof e?n=e:t=e),{index:n,range:t}},e.prototype.cursor=function(e){var t="next";if(e.reverse&&(t="prev"),e.index){var n=this.store.index(e.index);return e.kt?n.openKeyCursor(e.range,t):n.openCursor(e.range,t)}return this.store.openCursor(e.range,t)},e}();function lr(e){return new rr((function(t,n){e.onsuccess=function(e){var n=e.target.result;t(n)},e.onerror=function(e){var t=hr(e.target.error);n(t)}}))}var fr=!1;function hr(e){var t=or._t(Object(r.getUA)());if(t>=12.2&&t<13){var n="An internal error was encountered in the Indexed Database server";if(e.message.indexOf(n)>=0){var i=new c("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 fr||(fr=!0,setTimeout((function(){throw i}),0)),i}}return e}var dr=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).Mt=t,r.currentSequenceNumber=n,r}return Object(a.__extends)(t,e),t}(tr);function pr(e,t){var n=y(e);return or.It(n.Mt,t)}var gr=function(){function e(e,t,n,r){this.batchId=e,this.localWriteTime=t,this.baseMutations=n,this.mutations=r}return e.prototype.applyToRemoteDocument=function(e,t){for(var n=t.mutationResults,r=0;r<this.mutations.length;r++){var i=this.mutations[r];i.key.isEqual(e.key)&&ht(i,e,n[r])}},e.prototype.applyToLocalView=function(e){for(var t=0,n=this.baseMutations;t<n.length;t++)(o=n[t]).key.isEqual(e.key)&&dt(o,e,this.localWriteTime);for(var r=0,i=this.mutations;r<i.length;r++){var o;(o=i[r]).key.isEqual(e.key)&&dt(o,e,this.localWriteTime)}},e.prototype.applyToLocalDocumentSet=function(e){var t=this;this.mutations.forEach((function(n){var r=e.get(n.key),i=r;
2t.applyToLocalView(i),r.isValidDocument()||i.convertToNoDocument(I.min())}))},e.prototype.keys=function(){return this.mutations.reduce((function(e,t){return e.add(t.key)}),Bt())},e.prototype.isEqual=function(e){return this.batchId===e.batchId&&k(this.mutations,e.mutations,(function(e,t){return gt(e,t)}))&&k(this.baseMutations,e.baseMutations,(function(e,t){return gt(e,t)}))},e}(),vr=function(){function e(e,t,n,r){this.batch=e,this.commitVersion=t,this.mutationResults=n,this.docVersions=r}return e.from=function(t,n,r){m(t.mutations.length===r.length);for(var i=Ut(),o=t.mutations,a=0;a<o.length;a++)i=i.insert(o[a].key,r[a].version);return new e(t,n,r,i)},e}(),mr=function(){function e(e,t,n,r,i,o,a){void 0===i&&(i=I.min()),void 0===o&&(o=I.min()),void 0===a&&(a=j.EMPTY_BYTE_STRING),this.target=e,this.targetId=t,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=a}return e.prototype.withSequenceNumber=function(t){return new e(this.target,this.targetId,this.purpose,t,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken)},e.prototype.withResumeToken=function(t,n){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,t)},e.prototype.withLastLimboFreeSnapshotVersion=function(t){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,t,this.resumeToken)},e}(),yr=function(e){this.Lt=e};function br(e,t){if(t.document)return vn(e.Lt,t.document,!!t.hasCommittedMutations);if(t.noDocument){var n=K.fromSegments(t.noDocument.path),r=Sr(t.noDocument.readTime),i=ue.newNoDocument(n,r);return t.hasCommittedMutations?i.setHasCommittedMutations():i}if(t.unknownDocument){var o=K.fromSegments(t.unknownDocument.path);return r=Sr(t.unknownDocument.version),ue.newUnknownDocument(o,r)}return v()}function _r(e,t,n){var r=wr(n),i=t.key.path.popLast().toArray();if(t.isFoundDocument()){var o=function(e,t){return{name:cn(e,t.key),fields:t.data.value.mapValue.fields,updateTime:nn(e,t.version.toTimestamp())}}(e.Lt,t),a=t.hasCommittedMutations;return new Hn(null,null,o,a,r,i)}if(t.isNoDocument()){var s=t.key.path.toArray(),u=Er(t.version);return a=t.hasCommittedMutations,new Hn(null,new qn(s,u),null,a,r,i)}if(t.isUnknownDocument()){var c=t.key.path.toArray(),l=Er(t.version);return new Hn(new zn(c,l),null,null,!0,r,i)}return v()}function wr(e){var t=e.toTimestamp();return[t.seconds,t.nanoseconds]}function kr(e){var t=new S(e[0],e[1]);return I.fromTimestamp(t)}function Er(e){var t=e.toTimestamp();return new Ln(t.seconds,t.nanoseconds)}function Sr(e){var t=new S(e.seconds,e.nanoseconds);return I.fromTimestamp(t)}function Ir(e,t){for(var n=(t.baseMutations||[]).map((function(t){return yn(e.Lt,t)})),r=0;r<t.mutations.length-1;++r){var i=t.mutations[r];if(r+1<t.mutations.length&&void 0!==t.mutations[r+1].transform){var o=t.mutations[r+1];i.updateTransforms=o.transform.fieldTransforms,t.mutations.splice(r+1,1),++r}}var a=t.mutations.map((function(t){return yn(e.Lt,t)})),s=S.fromMillis(t.localWriteTimeMs);return new gr(t.batchId,s,n,a)}function xr(e){var t,n,r=Sr(e.readTime),i=void 0!==e.lastLimboFreeSnapshotVersion?Sr(e.lastLimboFreeSnapshotVersion):I.min();return void 0!==e.query.documents?(m(1===(n=e.query).documents.length),t=Fe(Ne(hn(n.documents[0])))):t=function(e){return Fe(wn(e))}(e.query),new mr(t,e.targetId,0,e.lastListenSequenceNumber,r,i,j.fromBase64String(e.resumeToken))}function Tr(e,t){var n,r=Er(t.snapshotVersion),i=Er(t.lastLimboFreeSnapshotVersion);n=de(t.target)?bn(e.Lt,t.target):_n(e.Lt,t.target);var o=t.resumeToken.toBase64();return new Wn(t.targetId,fe(t.target),r,o,t.sequenceNumber,i,n)}function Cr(e){var t=wn({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?Ue(t,t.limit,"L"):t}var Or=function(){function e(){}return e.prototype.getBundleMetadata=function(e,t){return Ar(e).get(t).next((function(e){if(e)return{id:(t=e).bundleId,createTime:Sr(t.createTime),version:t.version};var t}))},e.prototype.saveBundleMetadata=function(e,t){return Ar(e).put({bundleId:(n=t).id,createTime:Er(an(n.createTime)),version:n.version});var n}
2,e.prototype.getNamedQuery=function(e,t){return Nr(e).get(t).next((function(e){if(e)return{name:(t=e).name,query:Cr(t.bundledQuery),readTime:Sr(t.readTime)};var t}))},e.prototype.saveNamedQuery=function(e,t){return Nr(e).put(function(e){return{name:e.name,readTime:Er(an(e.readTime)),bundledQuery:e.bundledQuery}}(t))},e}();function Ar(e){return pr(e,Xn.store)}function Nr(e){return pr(e,Jn.store)}var Pr=function(){function e(){this.Bt=new Rr}return e.prototype.addToCollectionParentIndex=function(e,t){return this.Bt.add(t),rr.resolve()},e.prototype.getCollectionParents=function(e,t){return rr.resolve(this.Bt.getEntries(t))},e}(),Rr=function(){function e(){this.index={}}return e.prototype.add=function(e){var t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new Pt(A.comparator),i=!r.has(n);return this.index[t]=r.add(n),i},e.prototype.has=function(e){var t=e.lastSegment(),n=e.popLast(),r=this.index[t];return r&&r.has(n)},e.prototype.getEntries=function(e){return(this.index[e]||new Pt(A.comparator)).toArray()},e}(),jr=function(){function e(){this.qt=new Rr}return e.prototype.addToCollectionParentIndex=function(e,t){var n=this;if(!this.qt.has(t)){var r=t.lastSegment(),i=t.popLast();e.addOnCommittedListener((function(){n.qt.add(t)}));var o={collectionId:r,parent:Rn(i)};return Dr(e).put(o)}return rr.resolve()},e.prototype.getCollectionParents=function(e,t){var n=[],r=IDBKeyRange.bound([t,""],[E(t),""],!1,!0);return Dr(e).Nt(r).next((function(e){for(var r=0,i=e;r<i.length;r++){var o=i[r];if(o.collectionId!==t)break;n.push(Mn(o.parent))}return n}))},e}();function Dr(e){return pr(e,$n.store)}var Mr={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},Lr=function(){function e(e,t,n){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=n}return e.withCacheSize=function(t){return new e(t,e.DEFAULT_COLLECTION_PERCENTILE,e.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)},e}();function Fr(e,t,n){var r=e.store(Vn.store),i=e.store(Bn.store),o=[],a=IDBKeyRange.only(n.batchId),s=0,u=r.$t({range:a},(function(e,t,n){return s++,n.delete()}));o.push(u.next((function(){m(1===s)})));for(var c=[],l=0,f=n.mutations;l<f.length;l++){var h=f[l],d=Bn.key(t,h.key.path,n.batchId);o.push(i.delete(d)),c.push(h.key)}return rr.waitFor(o).next((function(){return c}))}function Ur(e){if(!e)return 0;var t;if(e.document)t=e.document;else if(e.unknownDocument)t=e.unknownDocument;else{if(!e.noDocument)throw v();t=e.noDocument}return JSON.stringify(t).length}Lr.DEFAULT_COLLECTION_PERCENTILE=10,Lr.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,Lr.DEFAULT=new Lr(41943040,Lr.DEFAULT_COLLECTION_PERCENTILE,Lr.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),Lr.DISABLED=new Lr(-1,0,0);var Vr=function(){function e(e,t,n,r){this.userId=e,this.R=t,this.Ut=n,this.referenceDelegate=r,this.Qt={}}return e.Kt=function(t,n,r,i){return m(""!==t.uid),new e(t.isAuthenticated()?t.uid:"",n,r,i)},e.prototype.checkEmpty=function(e){var t=!0,n=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return qr(e).$t({index:Vn.userMutationsIndex,range:n},(function(e,n,r){t=!1,r.done()})).next((function(){return t}))},e.prototype.addMutationBatch=function(e,t,n,r){var i=this,o=zr(e),a=qr(e);return a.add({}).next((function(s){m("number"==typeof s);for(var u=new gr(s,t,n,r),c=function(e,t,n){var r=n.baseMutations.map((function(t){return mn(e.Lt,t)})),i=n.mutations.map((function(t){return mn(e.Lt,t)}));return new Vn(t,n.batchId,n.localWriteTime.toMillis(),r,i)}(i.R,i.userId,u),l=[],f=new Pt((function(e,t){return w(e.canonicalString(),t.canonicalString())})),h=0,d=r;h<d.length;h++){var p=d[h],g=Bn.key(i.userId,p.key.path,s);f=f.add(p.key.path.popLast()),l.push(a.put(c)),l.push(o.put(g,Bn.PLACEHOLDER))}return f.forEach((function(t){l.push(i.Ut.addToCollectionParentIndex(e,t))})),e.addOnCommittedListener((function(){i.Qt[s]=u.keys()})),rr.waitFor(l).next((function(){return u}))}))},e.prototype.lookupMutationBatch=function(e,t){var n=this;return qr(e).get(t).next((function(e){return e?(m(e.userId===n.userId),Ir(n.R,e)):null}))},e.prototype.jt=function(e,t){var n=this;return this.Qt[t]?rr.resolve(this.Qt[t]):this.lookupMutationBatch(e,t).next((function(e){if(e){var r=e.keys();return n.Qt[t]=r,r}return null}))},e.prototype.getNextMutationBatchAfterBatchId=function(e,t){var n=this,r=t+1,i=IDBKeyRange.lowerBound([this.userId,r]),o=null;return qr(e).$t({index:Vn.userMutationsIndex,range:i},(function(e,t,i){t.userId===n.userId&&(m(t.batchId>=r),o=Ir(n.R,t)),i.done()})).next((function(){return o}
2))},e.prototype.getHighestUnacknowledgedBatchId=function(e){var t=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),n=-1;return qr(e).$t({index:Vn.userMutationsIndex,range:t,reverse:!0},(function(e,t,r){n=t.batchId,r.done()})).next((function(){return n}))},e.prototype.getAllMutationBatches=function(e){var t=this,n=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return qr(e).Nt(Vn.userMutationsIndex,n).next((function(e){return e.map((function(e){return Ir(t.R,e)}))}))},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(e,t){var n=this,r=Bn.prefixForPath(this.userId,t.path),i=IDBKeyRange.lowerBound(r),o=[];return zr(e).$t({range:i},(function(r,i,a){var s=r[0],u=r[1],c=r[2],l=Mn(u);if(s===n.userId&&t.path.isEqual(l))return qr(e).get(c).next((function(e){if(!e)throw v();m(e.userId===n.userId),o.push(Ir(n.R,e))}));a.done()})).next((function(){return o}))},e.prototype.getAllMutationBatchesAffectingDocumentKeys=function(e,t){var n=this,r=new Pt(w),i=[];return t.forEach((function(t){var o=Bn.prefixForPath(n.userId,t.path),a=IDBKeyRange.lowerBound(o),s=zr(e).$t({range:a},(function(e,i,o){var a=e[0],s=e[1],u=e[2],c=Mn(s);a===n.userId&&t.path.isEqual(c)?r=r.add(u):o.done()}));i.push(s)})),rr.waitFor(i).next((function(){return n.Wt(e,r)}))},e.prototype.getAllMutationBatchesAffectingQuery=function(e,t){var n=this,r=t.path,i=r.length+1,o=Bn.prefixForPath(this.userId,r),a=IDBKeyRange.lowerBound(o),s=new Pt(w);return zr(e).$t({range:a},(function(e,t,o){var a=e[0],u=e[1],c=e[2],l=Mn(u);a===n.userId&&r.isPrefixOf(l)?l.length===i&&(s=s.add(c)):o.done()})).next((function(){return n.Wt(e,s)}))},e.prototype.Wt=function(e,t){var n=this,r=[],i=[];return t.forEach((function(t){i.push(qr(e).get(t).next((function(e){if(null===e)throw v();m(e.userId===n.userId),r.push(Ir(n.R,e))})))})),rr.waitFor(i).next((function(){return r}))},e.prototype.removeMutationBatch=function(e,t){var n=this;return Fr(e.Mt,this.userId,t).next((function(r){return e.addOnCommittedListener((function(){n.Gt(t.batchId)})),rr.forEach(r,(function(t){return n.referenceDelegate.markPotentiallyOrphaned(e,t)}))}))},e.prototype.Gt=function(e){delete this.Qt[e]},e.prototype.performConsistencyCheck=function(e){var t=this;return this.checkEmpty(e).next((function(n){if(!n)return rr.resolve();
2var r=IDBKeyRange.lowerBound(Bn.prefixForUser(t.userId)),i=[];return zr(e).$t({range:r},(function(e,n,r){if(e[0]===t.userId){var o=Mn(e[1]);i.push(o)}else r.done()})).next((function(){m(0===i.length)}))}))},e.prototype.containsKey=function(e,t){return Br(e,this.userId,t)},e.prototype.zt=function(e){var t=this;return Hr(e).get(this.userId).next((function(e){return e||new Un(t.userId,-1,"")}))},e}();function Br(e,t,n){var r=Bn.prefixForPath(t,n.path),i=r[1],o=IDBKeyRange.lowerBound(r),a=!1;return zr(e).$t({range:o,kt:!0},(function(e,n,r){var o=e[0],s=e[1];e[2],o===t&&s===i&&(a=!0),r.done()})).next((function(){return a}))}function qr(e){return pr(e,Vn.store)}function zr(e){return pr(e,Bn.store)}function Hr(e){return pr(e,Un.store)}var Kr=function(){function e(e){this.Ht=e}return e.prototype.next=function(){return this.Ht+=2,this.Ht},e.Jt=function(){return new e(0)},e.Yt=function(){return new e(-1)},e}(),Wr=function(){function e(e,t){this.referenceDelegate=e,this.R=t}return e.prototype.allocateTargetId=function(e){var t=this;return this.Xt(e).next((function(n){var r=new Kr(n.highestTargetId);return n.highestTargetId=r.next(),t.Zt(e,n).next((function(){return n.highestTargetId}))}))},e.prototype.getLastRemoteSnapshotVersion=function(e){return this.Xt(e).next((function(e){return I.fromTimestamp(new S(e.lastRemoteSnapshotVersion.seconds,e.lastRemoteSnapshotVersion.nanoseconds))}))},e.prototype.getHighestSequenceNumber=function(e){return this.Xt(e).next((function(e){return e.highestListenSequenceNumber}))},e.prototype.setTargetsMetadata=function(e,t,n){var r=this;return this.Xt(e).next((function(i){return i.highestListenSequenceNumber=t,n&&(i.lastRemoteSnapshotVersion=n.toTimestamp()),t>i.highestListenSequenceNumber&&(i.highestListenSequenceNumber=t),r.Zt(e,i)}))},e.prototype.addTargetData=function(e,t){var n=this;return this.te(e,t).next((function(){return n.Xt(e).next((function(r){return r.targetCount+=1,n.ee(t,r),n.Zt(e,r)}))}))},e.prototype.updateTargetData=function(e,t){return this.te(e,t)},e.prototype.removeTargetData=function(e,t){var n=this;return this.removeMatchingKeysForTargetId(e,t.targetId).next((function(){return Gr(e).delete(t.targetId)})).next((function(){return n.Xt(e)})).next((function(t){return m(t.targetCount>0),t.targetCount-=1,n.Zt(e,t)}))},e.prototype.removeTargets=function(e,t,n){var r=this,i=0,o=[];return Gr(e).$t((function(a,s){var u=xr(s);u.sequenceNumber<=t&&null===n.get(u.targetId)&&(i++,o.push(r.removeTargetData(e,u)))})).next((function(){return rr.waitFor(o)})).next((function(){return i}))},e.prototype.forEachTarget=function(e,t){return Gr(e).$t((function(e,n){var r=xr(n);t(r)}))},e.prototype.Xt=function(e){return Yr(e).get(Yn.key).next((function(e){return m(null!==e),e}))},e.prototype.Zt=function(e,t){return Yr(e).put(Yn.key,t)},e.prototype.te=function(e,t){return Gr(e).put(Tr(this.R,t))},e.prototype.ee=function(e,t){var n=!1;return e.targetId>t.highestTargetId&&(t.highestTargetId=e.targetId,n=!0),e.sequenceNumber>t.highestListenSequenceNumber&&(t.highestListenSequenceNumber=e.sequenceNumber,n=!0),n},e.prototype.getTargetCount=function(e){return this.Xt(e).next((function(e){return e.targetCount}))},e.prototype.getTargetData=function(e,t){var n=fe(t),r=IDBKeyRange.bound([n,Number.NEGATIVE_INFINITY],[n,Number.POSITIVE_INFINITY]),i=null;return Gr(e).$t({range:r,index:Wn.queryTargetsIndexName},(function(e,n,r){var o=xr(n);he(t,o.target)&&(i=o,r.done())})).next((function(){return i}))},e.prototype.addMatchingKeys=function(e,t,n){var r=this,i=[],o=$r(e);return t.forEach((function(t){var a=Rn(t.path);i.push(o.put(new Gn(n,a))),i.push(r.referenceDelegate.addReference(e,n,t))})),rr.waitFor(i)},e.prototype.removeMatchingKeys=function(e,t,n){var r=this,i=$r(e);return rr.forEach(t,(function(t){var o=Rn(t.path);return rr.waitFor([i.delete([n,o]),r.referenceDelegate.removeReference(e,n,t)])}))},e.prototype.removeMatchingKeysForTargetId=function(e,t){var n=$r(e),r=IDBKeyRange.bound([t],[t+1],!1,!0);return n.delete(r)},e.prototype.getMatchingKeysForTargetId=function(e,t){var n=IDBKeyRange.bound([t],[t+1],!1,!0),r=$r(e),i=Bt();return r.$t({range:n,kt:!0},(function(e,t,n){var r=Mn(e[1]),o=new K(r);i=i.add(o)})).next((function(){return i}))},e.prototype.containsKey=function(e,t){var n=Rn(t.path),r=IDBKeyRange.bound([n],[E(n)],!1,!0),i=0;return $r(e).$t({index:Gn.documentTargetsIndex,kt:!0,range:r},(function(e,t,n){var r=e[0];e[1],0!==r&&(i++,n.done())})).next((function(){return i>0}))},e.prototype.lt=function(e,t){return Gr(e).get(t).next((function(e){return e?xr(e):null}))},e}();function Gr(e){return pr(e,Wn.store)}function Yr(e){return pr(e,Yn.store)}function $r(e){return pr(e,Gn.store)}function Qr(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(t){if(e.code!==u.FAILED_PRECONDITION||e.message!==er)throw e;return h("LocalStore","Unexpectedly lost primary lease"),[2]}))}
2))}function Xr(e,t){var n=e[0],r=e[1],i=t[0],o=t[1],a=w(n,i);return 0===a?w(r,o):a}var Jr=function(){function e(e){this.ne=e,this.buffer=new Pt(Xr),this.se=0}return e.prototype.ie=function(){return++this.se},e.prototype.re=function(e){var t=[e,this.ie()];if(this.buffer.size<this.ne)this.buffer=this.buffer.add(t);else{var n=this.buffer.last();Xr(t,n)<0&&(this.buffer=this.buffer.delete(n).add(t))}},Object.defineProperty(e.prototype,"maxValue",{get:function(){return this.buffer.last()[0]},enumerable:!1,configurable:!0}),e}(),Zr=function(){function e(e,t){this.garbageCollector=e,this.asyncQueue=t,this.oe=!1,this.ce=null}return e.prototype.start=function(e){-1!==this.garbageCollector.params.cacheSizeCollectionThreshold&&this.ue(e)},e.prototype.stop=function(){this.ce&&(this.ce.cancel(),this.ce=null)},Object.defineProperty(e.prototype,"started",{get:function(){return null!==this.ce},enumerable:!1,configurable:!0}),e.prototype.ue=function(e){var t=this,n=this.oe?3e5:6e4;h("LruGarbageCollector","Garbage collection scheduled in "+n+"ms"),this.ce=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",n,(function(){return Object(a.__awaiter)(t,void 0,void 0,(function(){var t;return Object(a.__generator)(this,(function(n){switch(n.label){case 0:this.ce=null,this.oe=!0,n.label=1;case 1:return n.trys.push([1,3,,7]),[4,e.collectGarbage(this.garbageCollector)];case 2:return n.sent(),[3,7];case 3:return ur(t=n.sent())?(h("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",t),[3,6]):[3,4];case 4:return[4,Qr(t)];case 5:n.sent(),n.label=6;case 6:return[3,7];case 7:return[4,this.ue(e)];case 8:return n.sent(),[2]}}))}))}))},e}(),ei=function(){function e(e,t){this.ae=e,this.params=t}return e.prototype.calculateTargetCount=function(e,t){return this.ae.he(e).next((function(e){return Math.floor(t/100*e)}))},e.prototype.nthSequenceNumber=function(e,t){var n=this;if(0===t)return rr.resolve(s.o);var r=new Jr(t);return this.ae.forEachTarget(e,(function(e){return r.re(e.sequenceNumber)})).next((function(){return n.ae.le(e,(function(e){return r.re(e)}))})).next((function(){return r.maxValue}))},e.prototype.removeTargets=function(e,t,n){return this.ae.removeTargets(e,t,n)},e.prototype.removeOrphanedDocuments=function(e,t){return this.ae.removeOrphanedDocuments(e,t)},e.prototype.collect=function(e,t){var n=this;return-1===this.params.cacheSizeCollectionThreshold?(h("LruGarbageCollector","Garbage collection skipped; disabled"),rr.resolve(Mr)):this.getCacheSize(e).next((function(r){return r<n.params.cacheSizeCollectionThreshold?(h("LruGarbageCollector","Garbage collection skipped; Cache size "+r+" is lower than threshold "+n.params.cacheSizeCollectionThreshold),Mr):n.fe(e,t)}))},e.prototype.getCacheSize=function(e){return this.ae.getCacheSize(e)},e.prototype.fe=function(e,t){var n,r,o,a,s,u,c,l=this,d=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next((function(t){return t>l.params.maximumSequenceNumbersToCollect?(h("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of "+l.params.maximumSequenceNumbersToCollect+" from "+t),r=l.params.maximumSequenceNumbersToCollect):r=t,a=Date.now(),l.nthSequenceNumber(e,r)})).next((function(r){return n=r,s=Date.now(),l.removeTargets(e,n,t)})).next((function(t){return o=t,u=Date.now(),l.removeOrphanedDocuments(e,n)})).next((function(e){return c=Date.now(),f()<=i.LogLevel.DEBUG&&h("LruGarbageCollector","LRU Garbage Collection\n\tCounted targets in "+(a-d)+"ms\n\tDetermined least recently used "+r+" in "+(s-a)+"ms\n\tRemoved "+o+" targets in "+(u-s)+"ms\n\tRemoved "+e+" documents in "+(c-u)+"ms\nTotal Duration: "+(c-d)+"ms"),rr.resolve({didRun:!0,sequenceNumbersCollected:r,targetsRemoved:o,documentsRemoved:e})}))},e}(),ti=function(){function e(e,t){this.db=e,this.garbageCollector=function(e,t){return new ei(e,t)}(this,t)}return e.prototype.he=function(e){var t=this.de(e);return this.db.getTargetCache().getTargetCount(e).next((function(e){return t.next((function(t){return e+t}))}))},e.prototype.de=function(e){var t=0;return this.le(e,(function(e){t++})).next((function(){return t}))},e.prototype.forEachTarget=function(e,t){return this.db.getTargetCache().forEac
2hTarget(e,t)},e.prototype.le=function(e,t){return this.we(e,(function(e,n){return t(n)}))},e.prototype.addReference=function(e,t,n){return ni(e,n)},e.prototype.removeReference=function(e,t,n){return ni(e,n)},e.prototype.removeTargets=function(e,t,n){return this.db.getTargetCache().removeTargets(e,t,n)},e.prototype.markPotentiallyOrphaned=function(e,t){return ni(e,t)},e.prototype._e=function(e,t){return function(e,t){var n=!1;return Hr(e).Ot((function(r){return Br(e,r,t).next((function(e){return e&&(n=!0),rr.resolve(!e)}))})).next((function(){return n}))}(e,t)},e.prototype.removeOrphanedDocuments=function(e,t){var n=this,r=this.db.getRemoteDocumentCache().newChangeBuffer(),i=[],o=0;return this.we(e,(function(a,s){if(s<=t){var u=n._e(e,a).next((function(t){if(!t)return o++,r.getEntry(e,a).next((function(){return r.removeEntry(a),$r(e).delete([0,Rn(a.path)])}))}));i.push(u)}})).next((function(){return rr.waitFor(i)})).next((function(){return r.apply(e)})).next((function(){return o}))},e.prototype.removeTarget=function(e,t){var n=t.withSequenceNumber(e.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(e,n)},e.prototype.updateLimboDocument=function(e,t){return ni(e,t)},e.prototype.we=function(e,t){var n,r=$r(e),i=s.o;return r.$t({index:Gn.documentTargetsIndex},(function(e,r){var o=e[0],a=(e[1],r.path),u=r.sequenceNumber;0===o?(i!==s.o&&t(new K(Mn(n)),i),i=u,n=a):i=s.o})).next((function(){i!==s.o&&t(new K(Mn(n)),i)}))},e.prototype.getCacheSize=function(e){return this.db.getRemoteDocumentCache().getSize(e)},e}();function ni(e,t){return $r(e).put(function(e,t){return new Gn(0,Rn(e.path),t)}(t,e.currentSequenceNumber))}var ri=function(){function e(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={}}return e.prototype.get=function(e){var t=this.mapKeyFn(e),n=this.inner[t];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.equalsFn(a,e))return s}},e.prototype.has=function(e){return void 0!==this.get(e)},e.prototype.set=function(e,t){var n=this.mapKeyFn(e),r=this.inner[n];if(void 0!==r){for(var i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return void(r[i]=[e,t]);r.push([e,t])}else this.inner[n]=[[e,t]]},e.prototype.delete=function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(this.equalsFn(n[r][0],e))return 1===n.length?delete this.inner[t]:n.splice(r,1),!0;return!1},e.prototype.forEach=function(e){T(this.inner,(function(t,n){for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];e(a,s)}}))},e.prototype.isEmpty=function(){return C(this.inner)},e}(),ii=function(){function e(){this.changes=new ri((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),this.changesApplied=!1}return e.prototype.getReadTime=function(e){var t=this.changes.get(e);return t?t.readTime:I.min()},e.prototype.addEntry=function(e,t){this.assertNotApplied(),this.changes.set(e.key,{document:e,readTime:t})},e.prototype.removeEntry=function(e,t){void 0===t&&(t=null),this.assertNotApplied(),this.changes.set(e,{document:ue.newInvalidDocument(e),readTime:t})},e.prototype.getEntry=function(e,t){this.assertNotApplied();var n=this.changes.get(t);return void 0!==n?rr.resolve(n.document):this.getFromCache(e,t)},e.prototype.getEntries=function(e,t){return this.getAllFromCache(e,t)},e.prototype.apply=function(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)},e.prototype.assertNotApplied=function(){},e}(),oi=function(){function e(e,t){this.R=e,this.Ut=t}return e.prototype.addEntry=function(e,t,n){return ui(e).put(ci(t),n)},e.prototype.removeEntry=function(e,t){var n=ui(e),r=ci(t);return n.delete(r)},e.prototype.updateMetadata=function(e,t){var n=this;return this.getMetadata(e).next((function(r){return r.byteSize+=t,n.me(e,r)}))},e.prototype.getEntry=function(e,t){var n=this;return ui(e).get(ci(t)).next((function(e){return n.ye(t,e)}))},e.prototype.ge=function(e,t){var n=this;return ui(e).get(ci(t)).next((function(e){return{document:n.ye(t,e),size:Ur(e)}}))},e.prototype.getEntries=function(e,t){var n=this,r=Dt();return this.pe(e,t,(function(e,t){var i=n.ye(e,t);r=r.insert(e,i)})).next((function(){return r}))},e.prototype.Ee=function(e,t){var n=this,r=Dt(),i=new Ot(K.comparator);return this.pe(e,t,(function(e,t){var o=n.ye(e,t);r=r.insert(e,o),i=i.insert(e,Ur(t))})).next((function(){return{documents:r,Te:i}}
2))},e.prototype.pe=function(e,t,n){if(t.isEmpty())return rr.resolve();var r=IDBKeyRange.bound(t.first().path.toArray(),t.last().path.toArray()),i=t.getIterator(),o=i.getNext();return ui(e).$t({range:r},(function(e,t,r){for(var a=K.fromSegments(e);o&&K.comparator(o,a)<0;)n(o,null),o=i.getNext();o&&o.isEqual(a)&&(n(o,t),o=i.hasNext()?i.getNext():null),o?r.Ct(o.path.toArray()):r.done()})).next((function(){for(;o;)n(o,null),o=i.hasNext()?i.getNext():null}))},e.prototype.getDocumentsMatchingQuery=function(e,t,n){var r=this,i=Dt(),o=t.path.length+1,a={};if(n.isEqual(I.min())){var s=t.path.toArray();a.range=IDBKeyRange.lowerBound(s)}else{var u=t.path.toArray(),c=wr(n);a.range=IDBKeyRange.lowerBound([u,c],!0),a.index=Hn.collectionReadTimeIndex}return ui(e).$t(a,(function(e,n,a){if(e.length===o){var s=br(r.R,n);t.path.isPrefixOf(s.key.path)?ze(t,s)&&(i=i.insert(s.key,s)):a.done()}})).next((function(){return i}))},e.prototype.newChangeBuffer=function(e){return new ai(this,!!e&&e.trackRemovals)},e.prototype.getSize=function(e){return this.getMetadata(e).next((function(e){return e.byteSize}))},e.prototype.getMetadata=function(e){return si(e).get(Kn.key).next((function(e){return m(!!e),e}))},e.prototype.me=function(e,t){return si(e).put(Kn.key,t)},e.prototype.ye=function(e,t){if(t){var n=br(this.R,t);if(!n.isNoDocument()||!n.version.isEqual(I.min()))return n}return ue.newInvalidDocument(e)},e}(),ai=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).Ie=t,r.trackRemovals=n,r.Ae=new ri((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),r}return Object(a.__extends)(t,e),t.prototype.applyChanges=function(e){var t=this,n=[],r=0,i=new Pt((function(e,t){return w(e.canonicalString(),t.canonicalString())}));
2return this.changes.forEach((function(o,a){var s=t.Ae.get(o);if(a.document.isValidDocument()){var u=_r(t.Ie.R,a.document,t.getReadTime(o));i=i.add(o.path.popLast());var c=Ur(u);r+=c-s,n.push(t.Ie.addEntry(e,o,u))}else if(r-=s,t.trackRemovals){var l=_r(t.Ie.R,ue.newNoDocument(o,I.min()),t.getReadTime(o));n.push(t.Ie.addEntry(e,o,l))}else n.push(t.Ie.removeEntry(e,o))})),i.forEach((function(r){n.push(t.Ie.Ut.addToCollectionParentIndex(e,r))})),n.push(this.Ie.updateMetadata(e,r)),rr.waitFor(n)},t.prototype.getFromCache=function(e,t){var n=this;return this.Ie.ge(e,t).next((function(e){return n.Ae.set(t,e.size),e.document}))},t.prototype.getAllFromCache=function(e,t){var n=this;return this.Ie.Ee(e,t).next((function(e){var t=e.documents;return e.Te.forEach((function(e,t){n.Ae.set(e,t)})),t}))},t}(ii);function si(e){return pr(e,Kn.store)}function ui(e){return pr(e,Hn.store)}function ci(e){return e.path.toArray()}var li=function(){function e(e){this.R=e}return e.prototype.Rt=function(e,t,n,r){var i=this;m(n<r&&n>=0&&r<=11);var o=new ir("createOrUpgrade",t);n<1&&r>=1&&(function(e){e.createObjectStore(Fn.store)}(e),function(e){e.createObjectStore(Un.store,{keyPath:Un.keyPath}),e.createObjectStore(Vn.store,{keyPath:Vn.keyPath,autoIncrement:!0}).createIndex(Vn.userMutationsIndex,Vn.userMutationsKeyPath,{unique:!0}),e.createObjectStore(Bn.store)}(e),fi(e),function(e){e.createObjectStore(Hn.store)}(e));var a=rr.resolve();return n<3&&r>=3&&(0!==n&&(function(e){e.deleteObjectStore(Gn.store),e.deleteObjectStore(Wn.store),e.deleteObjectStore(Yn.store)}(e),fi(e)),a=a.next((function(){return function(e){var t=e.store(Yn.store),n=new Yn(0,0,I.min().toTimestamp(),0);return t.put(Yn.key,n)}(o)}))),n<4&&r>=4&&(0!==n&&(a=a.next((function(){return function(e,t){return t.store(Vn.store).Nt().next((function(n){e.deleteObjectStore(Vn.store),e.createObjectStore(Vn.store,{keyPath:Vn.keyPath,autoIncrement:!0}).createIndex(Vn.userMutationsIndex,Vn.userMutationsKeyPath,{unique:!0});var r=t.store(Vn.store),i=n.map((function(e){return r.put(e)}));return rr.waitFor(i)}))}(e,o)}))),a=a.next((function(){!function(e){e.createObjectStore(Qn.store,{keyPath:Qn.keyPath})}(e)}))),n<5&&r>=5&&(a=a.next((function(){return i.Re(o)}))),n<6&&r>=6&&(a=a.next((function(){return function(e){e.createObjectStore(Kn.store)}(e),i.be(o)}))),n<7&&r>=7&&(a=a.next((function(){return i.ve(o)}))),n<8&&r>=8&&(a=a.next((function(){return i.Pe(e,o)}))),n<9&&r>=9&&(a=a.next((function(){!function(e){e.objectStoreNames.contains("remoteDocumentChanges")&&e.deleteObjectStore("remoteDocumentChanges")}(e),function(e){var t=e.objectStore(Hn.store);t.createIndex(Hn.readTimeIndex,Hn.readTimeIndexPath,{unique:!1}),t.createIndex(Hn.collectionReadTimeIndex,Hn.collectionReadTimeIndexPath,{unique:!1})}(t)}))),n<10&&r>=10&&(a=a.next((function(){return i.Ve(o)}))),n<11&&r>=11&&(a=a.next((function(){!function(e){e.createObjectStore(Xn.store,{keyPath:Xn.keyPath})}(e),function(e){e.createObjectStore(Jn.store,{keyPath:Jn.keyPath})}(e)}))),a},e.prototype.be=function(e){var t=0;return e.store(Hn.store).$t((function(e,n){t+=Ur(n)})).next((function(){var n=new Kn(t);return e.store(Kn.store).put(Kn.key,n)}))},e.prototype.Re=function(e){var t=this,n=e.store(Un.store),r=e.store(Vn.store);return n.Nt().next((function(n){return rr.forEach(n,(function(n){var i=IDBKeyRange.bound([n.userId,-1],[n.userId,n.lastAcknowledgedBatchId]);return r.Nt(Vn.userMutationsIndex,i).next((function(r){return rr.forEach(r,(function(r){m(r.userId===n.userId);var i=Ir(t.R,r);return Fr(e,n.userId,i).next((function(){}))}))}))}))}))},e.prototype.ve=function(e){var t=e.store(Gn.store),n=e.store(Hn.store);return e.store(Yn.store).get(Yn.key).next((function(e){var r=[];return n.$t((function(n,i){var o=new A(n),a=function(e){return[0,Rn(e)]}(o);r.push(t.get(a).next((function(n){return n?rr.resolve():function(n){return t.put(new Gn(0,Rn(n),e.highestListenSequenceNumber))}(o)})))})).next((function(){return rr.waitFor(r)}))}))},e.prototype.Pe=function(e,t){e.createObjectStore($n.store,{keyPath:$n.keyPath});var n=t.store($n.store),r=new Rr,i=function(e){if(r.add(e)){var t=e.lastSegment(),i=e.popLast();return n.put({collectionId:t,parent:Rn(i)})}};return t.store(Hn.store).$t({kt:!0},(function(e,t){var n=new A(e);return i(n.popLast())})).next((function(){return t.store(Bn.store).$t({kt:!0},(function(e,t){e[0];var n=e[1],r=(e[2],Mn(n));return i(r.popLast())}))}))},e.prototype.Ve=function(e){var t=this,n=e.store(Wn.store);return n.$t((function(e,r){var i=xr(r),o=Tr(t.R,i);
2return n.put(o)}))},e}();function fi(e){e.createObjectStore(Gn.store,{keyPath:Gn.keyPath}).createIndex(Gn.documentTargetsIndex,Gn.documentTargetsKeyPath,{unique:!0}),e.createObjectStore(Wn.store,{keyPath:Wn.keyPath}).createIndex(Wn.queryTargetsIndexName,Wn.queryTargetsKeyPath,{unique:!0}),e.createObjectStore(Yn.store)}var hi="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.",di=function(){function e(t,n,r,i,o,a,s,l,f,h){if(this.allowTabSynchronization=t,this.persistenceKey=n,this.clientId=r,this.Se=o,this.window=a,this.document=s,this.De=f,this.Ce=h,this.Ne=null,this.xe=!1,this.isPrimary=!1,this.networkEnabled=!0,this.Fe=null,this.inForeground=!1,this.ke=null,this.$e=null,this.Oe=Number.NEGATIVE_INFINITY,this.Me=function(e){return Promise.resolve()},!e.yt())throw new c(u.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new ti(this,i),this.Le=n+"main",this.R=new yr(l),this.Be=new or(this.Le,11,new li(this.R)),this.qe=new Wr(this.referenceDelegate,this.R),this.Ut=new jr,this.Ue=function(e,t){return new oi(e,t)}(this.R,this.Ut),this.Qe=new Or,this.window&&this.window.localStorage?this.Ke=this.window.localStorage:(this.Ke=null,!1===h&&d("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}return e.prototype.start=function(){var e=this;return this.je().then((function(){if(!e.isPrimary&&!e.allowTabSynchronization)throw new c(u.FAILED_PRECONDITION,hi);return e.We(),e.Ge(),e.ze(),e.runTransaction("getHighestListenSequenceNumber","readonly",(function(t){return e.qe.getHighestSequenceNumber(t)}))})).then((function(t){e.Ne=new s(t,e.De)})).then((function(){e.xe=!0})).catch((function(t){return e.Be&&e.Be.close(),Promise.reject(t)}))},e.prototype.He=function(e){var t=this;return this.Me=function(n){return Object(a.__awaiter)(t,void 0,void 0,(function(){return Object(a.__generator)(this,(function(t){return this.started?[2,e(n)]:[2]}))}))},e(this.isPrimary)},e.prototype.setDatabaseDeletedListener=function(e){var t=this;this.Be.vt((function(n){return Object(a.__awaiter)(t,void 0,void 0,(function(){return Object(a.__generator)(this,(function(t){switch(t.label){case 0:return null===n.newVersion?[4,e()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}
2))}))}))},e.prototype.setNetworkEnabled=function(e){var t=this;this.networkEnabled!==e&&(this.networkEnabled=e,this.Se.enqueueAndForget((function(){return Object(a.__awaiter)(t,void 0,void 0,(function(){return Object(a.__generator)(this,(function(e){switch(e.label){case 0:return this.started?[4,this.je()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))})))},e.prototype.je=function(){var e=this;return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(function(t){return gi(t).put(new Qn(e.clientId,Date.now(),e.networkEnabled,e.inForeground)).next((function(){if(e.isPrimary)return e.Je(t).next((function(t){t||(e.isPrimary=!1,e.Se.enqueueRetryable((function(){return e.Me(!1)})))}))})).next((function(){return e.Ye(t)})).next((function(n){return e.isPrimary&&!n?e.Xe(t).next((function(){return!1})):!!n&&e.Ze(t).next((function(){return!0}))}))})).catch((function(t){if(ur(t))return h("IndexedDbPersistence","Failed to extend owner lease: ",t),e.isPrimary;if(!e.allowTabSynchronization)throw t;return h("IndexedDbPersistence","Releasing owner lease after error during lease refresh",t),!1})).then((function(t){e.isPrimary!==t&&e.Se.enqueueRetryable((function(){return e.Me(t)})),e.isPrimary=t}))},e.prototype.Je=function(e){var t=this;return pi(e).get(Fn.key).next((function(e){return rr.resolve(t.tn(e))}))},e.prototype.en=function(e){return gi(e).delete(this.clientId)},e.prototype.nn=function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){var e,t,n,r,i=this;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:return!this.isPrimary||this.sn(this.Oe,18e5)?[3,2]:(this.Oe=Date.now(),[4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(function(e){var t=pr(e,Qn.store);return t.Nt().next((function(e){var n=i.rn(e,18e5),r=e.filter((function(e){return-1===n.indexOf(e)}));return rr.forEach(r,(function(e){return t.delete(e.clientId)})).next((function(){return r}))}))})).catch((function(){return[]}))]);case 1:if(e=o.sent(),this.Ke)for(t=0,n=e;t<n.length;t++)r=n[t],this.Ke.removeItem(this.on(r.clientId));o.label=2;case 2:return[2]}}
2))}))},e.prototype.ze=function(){var e=this;this.$e=this.Se.enqueueAfterDelay("client_metadata_refresh",4e3,(function(){return e.je().then((function(){return e.nn()})).then((function(){return e.ze()}))}))},e.prototype.tn=function(e){return!!e&&e.ownerId===this.clientId},e.prototype.Ye=function(e){var t=this;return this.Ce?rr.resolve(!0):pi(e).get(Fn.key).next((function(n){if(null!==n&&t.sn(n.leaseTimestampMs,5e3)&&!t.cn(n.ownerId)){if(t.tn(n)&&t.networkEnabled)return!0;if(!t.tn(n)){if(!n.allowTabSynchronization)throw new c(u.FAILED_PRECONDITION,hi);return!1}}return!(!t.networkEnabled||!t.inForeground)||gi(e).Nt().next((function(e){return void 0===t.rn(e,5e3).find((function(e){if(t.clientId!==e.clientId){var n=!t.networkEnabled&&e.networkEnabled,r=!t.inForeground&&e.inForeground,i=t.networkEnabled===e.networkEnabled;if(n||r&&i)return!0}return!1}))}))})).next((function(e){return t.isPrimary!==e&&h("IndexedDbPersistence","Client "+(e?"is":"is not")+" eligible for a primary lease."),e}))},e.prototype.shutdown=function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){var e=this;return Object(a.__generator)(this,(function(t){switch(t.label){case 0:return this.xe=!1,this.un(),this.$e&&(this.$e.cancel(),this.$e=null),this.an(),this.hn(),[4,this.Be.runTransaction("shutdown","readwrite",[Fn.store,Qn.store],(function(t){var n=new dr(t,s.o);return e.Xe(n).next((function(){return e.en(n)}))}))];case 1:return t.sent(),this.Be.close(),this.ln(),[2]}}))}))},e.prototype.rn=function(e,t){var n=this;return e.filter((function(e){return n.sn(e.updateTimeMs,t)&&!n.cn(e.clientId)}))},e.prototype.fn=function(){var e=this;return this.runTransaction("getActiveClients","readonly",(function(t){return gi(t).Nt().next((function(t){return e.rn(t,18e5).map((function(e){return e.clientId}))}))}))},Object.defineProperty(e.prototype,"started",{get:function(){return this.xe},enumerable:!1,configurable:!0}),e.prototype.getMutationQueue=function(e){return Vr.Kt(e,this.R,this.Ut,this.referenceDelegate)},e.prototype.getTargetCache=function(){return this.qe},e.prototype.getRemoteDocumentCache=function(){return this.Ue},e.prototype.getIndexManager=function(){return this.Ut},e.prototype.getBundleCache=function(){return this.Qe},e.prototype.runTransaction=function(e,t,n){var r=this;h("IndexedDbPersistence","Starting transaction:",e);var i,o="readonly"===t?"readonly":"readwrite";return this.Be.runTransaction(e,o,Zn,(function(o){return i=new dr(o,r.Ne?r.Ne.next():s.o),"readwrite-primary"===t?r.Je(i).next((function(e){return!!e||r.Ye(i)})).next((function(t){if(!t)throw d("Failed to obtain primary lease for action '"+e+"'."),r.isPrimary=!1,r.Se.enqueueRetryable((function(){return r.Me(!1)})),new c(u.FAILED_PRECONDITION,er);return n(i)})).next((function(e){return r.Ze(i).next((function(){return e}))})):r.dn(i).next((function(){return n(i)}))})).then((function(e){return i.raiseOnCommittedEvent(),e}))},e.prototype.dn=function(e){var t=this;return pi(e).get(Fn.key).next((function(e){if(null!==e&&t.sn(e.leaseTimestampMs,5e3)&&!t.cn(e.ownerId)&&!t.tn(e)&&!(t.Ce||t.allowTabSynchronization&&e.allowTabSynchronization))throw new c(u.FAILED_PRECONDITION,hi)}))},e.prototype.Ze=function(e){var t=new Fn(this.clientId,this.allowTabSynchronization,Date.now());return pi(e).put(Fn.key,t)},e.yt=function(){return or.yt()},e.prototype.Xe=function(e){var t=this,n=pi(e);return n.get(Fn.key).next((function(e){return t.tn(e)?(h("IndexedDbPersistence","Releasing primary lease."),n.delete(Fn.key)):rr.resolve()}))},e.prototype.sn=function(e,t){var n=Date.now();return!(e<n-t||e>n&&(d("Detected an update time that is in the future: "+e+" > "+n),1))},e.prototype.We=function(){var e=this;null!==this.document&&"function"==typeof this.document.addEventListener&&(this.ke=function(){e.Se.enqueueAndForget((function(){return e.inForeground="visible"===e.document.visibilityState,e.je()}))},this.document.addEventListener("visibilitychange",this.ke),this.inForeground="visible"===this.document.visibilityState)},e.prototype.an=function(){this.ke&&(this.document.removeEventListener("visibilitychange",this.ke),this.ke=null)},e.prototype.Ge=function(){var e,t=this;"function"==typeof(null===(e=this.window)||void 0===e?void 0:e.addEventListener)&&(this.Fe=function(){t.un(),t.Se.enqueueAndForget((function(){return t.shutdown()}))},this.window.addEventListener("pagehide",this.Fe))},e.prototype.hn=function(){this.Fe&&(this.window.removeEventListener("pagehide",this.Fe),this.Fe=null)},e.prototype.cn=function(e){var t;try{var n=null!==(null===(t=this.Ke)||void 0===t?void 0:t.getItem(this.on(e)));return h("IndexedDbPersistence","Client '"+e+"' "+(n?"is":"is not")+" zombied in LocalStorage"),n}catch(e){return d("IndexedDbPersistence","Failed to get zombied client id.",e),!1}},e.prototype.un=function(){if(this.Ke)try{this.Ke.setItem(this.on(this.clientId),String(Date.now()))}catch(e){d("Failed to set zombie client id.",e)}},e.prototype.ln=function(){if(this.Ke)try{this.Ke.removeItem(this.on(this.clientId))}catch(e){}},e.prototype.on=function(e){return"firestore_zombie_"+this.persistenceKey+"_"+e},e}();function pi(e){return pr(e,Fn.store)}function gi(e){return pr(e,Qn.store)}function vi(e,t){var n=e.projectId;return e.isDefaultDatabase||(n+="."+e.database),"firestore/"+t+"/"+n+"/"}var mi=function(e,t){this.progress=e,this.wn=t},yi=function(){function e(e,t,n){this.Ue=e,this._n=t,this.Ut=n}return e.prototype.mn=function(e,t){var n=this;return this._n.getAllMutationBatchesAffectingDocumentKey(e,t).next((function(r){return n.yn(e,t,r)}))},e.prototype.yn=function(e,t,n){return this.Ue.getEntry(e,t).next((function(e){for(var t=0,r=n;t<r.length;t++)r[t].applyToLocalView(e);return e}))},e.prototype.gn=function(e,t){e.forEach((function(e,n){for(var r=0,i=t;r<i.length;r++)i[r].applyToLocalView(n)}))},e.prototype.pn=function(e,t){var n=this;return this.Ue.getEntries(e,t).next((function(t){return n.En(e,t).next((function(){return t}))}))},e.prototype.En=function(e,t){var n=this;return this._n.getAllMutationBatchesAffectingDocumentKeys(e,t).next((function(e){return n.gn(t,e)}))},e.prototype.getDocumentsMatchingQuery=function(e,t,n){return function(e){return K.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}
2(t)?this.Tn(e,t.path):Me(t)?this.In(e,t,n):this.An(e,t,n)},e.prototype.Tn=function(e,t){return this.mn(e,new K(t)).next((function(e){var t=Lt();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t}))},e.prototype.In=function(e,t,n){var r=this,i=t.collectionGroup,o=Lt();return this.Ut.getCollectionParents(e,i).next((function(a){return rr.forEach(a,(function(a){var s=function(e,t){return new Oe(t,null,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(t,a.child(i));return r.An(e,s,n).next((function(e){e.forEach((function(e,t){o=o.insert(e,t)}))}))})).next((function(){return o}))}))},e.prototype.An=function(e,t,n){var r,i,o=this;return this.Ue.getDocumentsMatchingQuery(e,t,n).next((function(n){return r=n,o._n.getAllMutationBatchesAffectingQuery(e,t)})).next((function(t){return i=t,o.Rn(e,i,r).next((function(e){r=e;for(var t=0,n=i;t<n.length;t++)for(var o=n[t],a=0,s=o.mutations;a<s.length;a++){var u=s[a],c=u.key,l=r.get(c);null==l&&(l=ue.newInvalidDocument(c),r=r.insert(c,l)),dt(u,l,o.localWriteTime),l.isFoundDocument()||(r=r.remove(c))}}))})).next((function(){return r.forEach((function(e,n){ze(t,n)||(r=r.remove(e))})),r}))},e.prototype.Rn=function(e,t,n){for(var r=Bt(),i=0,o=t;i<o.length;i++)for(var a=0,s=o[i].mutations;a<s.length;a++){var u=s[a];u instanceof yt&&null===n.get(u.key)&&(r=r.add(u.key))}var c=n;return this.Ue.getEntries(e,r).next((function(e){return e.forEach((function(e,t){t.isFoundDocument()&&(c=c.insert(e,t))})),c}))},e}(),bi=function(){function e(e,t,n,r){this.targetId=e,this.fromCache=t,this.bn=n,this.vn=r}return e.Pn=function(t,n){for(var r=Bt(),i=Bt(),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 e(t,n.fromCache,r,i)},e}(),_i=function(){function e(){}return e.prototype.Vn=function(e){this.Sn=e},e.prototype.getDocumentsMatchingQuery=function(e,t,n,r){var o=this;return function(e){return 0===e.filters.length&&null===e.limit&&null==e.startAt&&null==e.endAt&&(0===e.explicitOrderBy.length||1===e.explicitOrderBy.length&&e.explicitOrderBy[0].field.isKeyField())}(t)||n.isEqual(I.min())?this.Dn(e,t):this.Sn.pn(e,r).next((function(a){var s=o.Cn(t,a);return(Pe(t)||Re(t))&&o.Nn(t.limitType,s,r,n)?o.Dn(e,t):(f()<=i.LogLevel.DEBUG&&h("QueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),qe(t)),o.Sn.getDocumentsMatchingQuery(e,t,n).next((function(e){return s.forEach((function(t){e=e.insert(t.key,t)})),e})))}))},e.prototype.Cn=function(e,t){var n=new Pt(He(e));return t.forEach((function(t,r){ze(e,r)&&(n=n.add(r))})),n},e.prototype.Nn=function(e,t,n,r){if(n.size!==t.size)return!0;var i="F"===e?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(r)>0)},e.prototype.Dn=function(e,t){return f()<=i.LogLevel.DEBUG&&h("QueryEngine","Using full collection scan to execute query:",qe(t)),this.Sn.getDocumentsMatchingQuery(e,t,I.min())},e}(),wi=function(){function e(e,t,n,r){this.persistence=e,this.xn=t,this.R=r,this.Fn=new Ot(w),this.kn=new ri((function(e){return fe(e)}),he),this.$n=I.min(),this._n=e.getMutationQueue(n),this.On=e.getRemoteDocumentCache(),this.qe=e.getTargetCache(),this.Mn=new yi(this.On,this._n,this.persistence.getIndexManager()),this.Qe=e.getBundleCache(),this.xn.Vn(this.Mn)}return e.prototype.collectGarbage=function(e){var t=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",(function(n){return e.collect(n,t.Fn)}))},e}();function ki(e,t,n,r){return new wi(e,t,n,r)}function Ei(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:return n=y(e),r=n._n,i=n.Mn,[4,n.persistence.runTransaction("Handle user change","readonly",(function(e){var o;return n._n.getAllMutationBatches(e).next((function(a){return o=a,r=n.persistence.getMutationQueue(t),i=new yi(n.On,r,n.persistence.getIndexManager()),r.getAllMutationBatches(e)})).next((function(t){for(var n=[],r=[],a=Bt(),s=0,u=o;s<u.length;s++){var c=u[s];n.push(c.batchId);for(var l=0,f=c.mutations;l<f.length;l++){var h=f[l];a=a.add(h.key)}}for(var d=0,p=t;d<p.length;d++){var g=p[d];r.push(g.batchId);for(var v=0,m=g.mutations;v<m.length;v++){var y=m[v];a=a.add(y.key)}}return i.pn(e,a).next((function(e){return{Ln:e,removedBatchIds:n,addedBatchIds:r}}))}))}))];case 1:return o=a.sent(),[2,(n._n=r,n.Mn=i,n.xn.Vn(n.Mn),o)]}}))}))}function Si(e,t){var n=y(e);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(function(e){var r=t.batch.keys(),i=n.On.newChangeBuffer({trackRemovals:!0});return function(e,t,n,r){var i=n.batch,o=i.keys(),a=rr.resolve();return o.forEach((function(e){a=a.next((function(){return r.getEntry(t,e)})).next((function(t){var o=n.docVersions.get(e);m(null!==o),t.version.compareTo(o)<0&&(i.applyToRemoteDocument(t,n),t.isValidDocument()&&r.addEntry(t,n.commitVersion))}))})),a.next((function(){return e._n.removeMutationBatch(t,i)}))}(n,e,t,i).next((function(){return i.apply(e)})).next((function(){return n._n.performConsistencyCheck(e)})).next((function(){return n.Mn.pn(e,r)}))}))}function Ii(e){var t=y(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(function(e){return t.qe.getLastRemoteSnapshotVersion(e)}))}function xi(e,t){var n=y(e),r=t.snapshotVersion,i=n.Fn;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(function(e){var o=n.On.newChangeBuffer({trackRemovals:!0});i=n.Fn;var a=[];
2t.targetChanges.forEach((function(t,o){var s=i.get(o);if(s){a.push(n.qe.removeMatchingKeys(e,t.removedDocuments,o).next((function(){return n.qe.addMatchingKeys(e,t.addedDocuments,o)})));var u=t.resumeToken;if(u.approximateByteSize()>0){var c=s.withResumeToken(u,r).withSequenceNumber(e.currentSequenceNumber);i=i.insert(o,c),function(e,t,n){return m(t.resumeToken.approximateByteSize()>0),0===e.resumeToken.approximateByteSize()||t.snapshotVersion.toMicroseconds()-e.snapshotVersion.toMicroseconds()>=3e8||n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0}(s,c,t)&&a.push(n.qe.updateTargetData(e,c))}}}));var s=Dt();if(t.documentUpdates.forEach((function(r,i){t.resolvedLimboDocuments.has(r)&&a.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))})),a.push(Ti(e,o,t.documentUpdates,r,void 0).next((function(e){s=e}))),!r.isEqual(I.min())){var u=n.qe.getLastRemoteSnapshotVersion(e).next((function(t){return n.qe.setTargetsMetadata(e,e.currentSequenceNumber,r)}));a.push(u)}return rr.waitFor(a).next((function(){return o.apply(e)})).next((function(){return n.Mn.En(e,s)})).next((function(){return s}))})).then((function(e){return n.Fn=i,e}))}function Ti(e,t,n,r,i){var o=Bt();return n.forEach((function(e){return o=o.add(e)})),t.getEntries(e,o).next((function(e){var o=Dt();return n.forEach((function(n,a){var s=e.get(n),u=(null==i?void 0:i.get(n))||r;a.isNoDocument()&&a.version.isEqual(I.min())?(t.removeEntry(n,u),o=o.insert(n,a)):!s.isValidDocument()||a.version.compareTo(s.version)>0||0===a.version.compareTo(s.version)&&s.hasPendingWrites?(t.addEntry(a,u),o=o.insert(n,a)):h("LocalStore","Ignoring outdated watch update for ",n,". Current version:",s.version," Watch version:",a.version)})),o}))}function Ci(e,t){var n=y(e);return n.persistence.runTransaction("Get next mutation batch","readonly",(function(e){return void 0===t&&(t=-1),n._n.getNextMutationBatchAfterBatchId(e,t)}))}function Oi(e,t){var n=y(e);return n.persistence.runTransaction("Allocate target","readwrite",(function(e){var r;return n.qe.getTargetData(e,t).next((function(i){return i?(r=i,rr.resolve(r)):n.qe.allocateTargetId(e).next((function(i){return r=new mr(t,i,0,e.currentSequenceNumber),n.qe.addTargetData(e,r).next((function(){return r}))}))}))})).then((function(e){var r=n.Fn.get(e.targetId);return(null===r||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.Fn=n.Fn.insert(e.targetId,e),n.kn.set(t,e.targetId)),e}))}function Ai(e,t,n){return Object(a.__awaiter)(this,void 0,void 0,(function(){var r,i,o,s;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:r=y(e),i=r.Fn.get(t),o=n?"readwrite":"readwrite-primary",a.label=1;case 1:return a.trys.push([1,4,,5]),n?[3,3]:[4,r.persistence.runTransaction("Release target",o,(function(e){return r.persistence.referenceDelegate.removeTarget(e,i)}))];case 2:a.sent(),a.label=3;case 3:return[3,5];case 4:if(!ur(s=a.sent()))throw s;return h("LocalStore","Failed to update sequence numbers for target "+t+": "+s),[3,5];case 5:return r.Fn=r.Fn.remove(t),r.kn.delete(i.target),[2]}}))}))}function Ni(e,t,n){var r=y(e),i=I.min(),o=Bt();return r.persistence.runTransaction("Execute query","readonly",(function(e){return function(e,t,n){var r=y(e),i=r.kn.get(n);return void 0!==i?rr.resolve(r.Fn.get(i)):r.qe.getTargetData(t,n)}(r,e,Fe(t)).next((function(t){if(t)return i=t.lastLimboFreeSnapshotVersion,r.qe.getMatchingKeysForTargetId(e,t.targetId).next((function(e){o=e}))})).next((function(){return r.xn.getDocumentsMatchingQuery(e,t,n?i:I.min(),n?o:Bt())})).next((function(e){return{documents:e,Bn:o}}))}))}function Pi(e,t){var n=y(e),r=y(n.qe),i=n.Fn.get(t);return i?Promise.resolve(i.target):n.persistence.runTransaction("Get target data","readonly",(function(e){return r.lt(e,t).next((function(e){return e?e.target:null}))}))}function Ri(e){var t=y(e);return t.persistence.runTransaction("Get new document changes","readonly",(function(e){return function(e,t,n){var r=y(e),i=Dt(),o=wr(n),a=ui(t),s=IDBKeyRange.lowerBound(o,!0);return a.$t({index:Hn.readTimeIndex,range:s},(function(e,t){var n=br(r.R,t);i=i.insert(n.key,n),o=t.readTime})).next((function(){return{wn:i,readTime:kr(o)}}))}(t.On,e,t.$n)})).then((function(e){var n=e.wn,r=e.readTime;return t.$n=r,n}
2))}function ji(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t;return Object(a.__generator)(this,(function(n){return[2,(t=y(e)).persistence.runTransaction("Synchronize last document change read time","readonly",(function(e){return function(e){var t=ui(e),n=I.min();return t.$t({index:Hn.readTimeIndex,reverse:!0},(function(e,t,r){t.readTime&&(n=kr(t.readTime)),r.done()})).next((function(){return n}))}(e)})).then((function(e){t.$n=e}))]}))}))}function Di(e,t,n,r){return Object(a.__awaiter)(this,void 0,void 0,(function(){var i,o,s,u,c,l,f,h,d,p;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:for(i=y(e),o=Bt(),s=Dt(),u=Ut(),c=0,l=n;c<l.length;c++)f=l[c],h=t.qn(f.metadata.name),f.document&&(o=o.add(h)),s=s.insert(h,t.Un(f)),u=u.insert(h,t.Qn(f.metadata.readTime));return d=i.On.newChangeBuffer({trackRemovals:!0}),[4,Oi(i,function(e){return Fe(Ne(A.fromString("__bundle__/docs/"+e)))}(r))];case 1:return p=a.sent(),[2,i.persistence.runTransaction("Apply bundle documents","readwrite",(function(e){return Ti(e,d,s,I.min(),u).next((function(t){return d.apply(e),t})).next((function(t){return i.qe.removeMatchingKeysForTargetId(e,p.targetId).next((function(){return i.qe.addMatchingKeys(e,o,p.targetId)})).next((function(){return i.Mn.En(e,t)})).next((function(){return t}))}))}))]}}))}))}function Mi(e,t,n){return void 0===n&&(n=Bt()),Object(a.__awaiter)(this,void 0,void 0,(function(){var r,i;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:return[4,Oi(e,Fe(Cr(t.bundledQuery)))];case 1:return r=o.sent(),[2,(i=y(e)).persistence.runTransaction("Save named query","readwrite",(function(e){var o=an(t.readTime);if(r.snapshotVersion.compareTo(o)>=0)return i.Qe.saveNamedQuery(e,t);var a=r.withResumeToken(j.EMPTY_BYTE_STRING,o);return i.Fn=i.Fn.insert(a.targetId,a),i.qe.updateTargetData(e,a).next((function(){return i.qe.removeMatchingKeysForTargetId(e,r.targetId)})).next((function(){return i.qe.addMatchingKeys(e,n,r.targetId)})).next((function(){return i.Qe.saveNamedQuery(e,t)}))}))]}}))}))}var Li=function(){function e(e){this.R=e,this.Kn=new Map,this.jn=new Map}return e.prototype.getBundleMetadata=function(e,t){return rr.resolve(this.Kn.get(t))},e.prototype.saveBundleMetadata=function(e,t){var n;return this.Kn.set(t.id,{id:(n=t).id,version:n.version,createTime:an(n.createTime)}),rr.resolve()},e.prototype.getNamedQuery=function(e,t){return rr.resolve(this.jn.get(t))},e.prototype.saveNamedQuery=function(e,t){return this.jn.set(t.name,function(e){return{name:e.name,query:Cr(e.bundledQuery),readTime:an(e.readTime)}}(t)),rr.resolve()},e}(),Fi=function(){function e(){this.Wn=new Pt(Ui.Gn),this.zn=new Pt(Ui.Hn)}return e.prototype.isEmpty=function(){return this.Wn.isEmpty()},e.prototype.addReference=function(e,t){var n=new Ui(e,t);this.Wn=this.Wn.add(n),this.zn=this.zn.add(n)},e.prototype.Jn=function(e,t){var n=this;e.forEach((function(e){return n.addReference(e,t)}))},e.prototype.removeReference=function(e,t){this.Yn(new Ui(e,t))},e.prototype.Xn=function(e,t){var n=this;e.forEach((function(e){return n.removeReference(e,t)}))},e.prototype.Zn=function(e){var t=this,n=new K(new A([])),r=new Ui(n,e),i=new Ui(n,e+1),o=[];return this.zn.forEachInRange([r,i],(function(e){t.Yn(e),o.push(e.key)})),o},e.prototype.ts=function(){var e=this;this.Wn.forEach((function(t){return e.Yn(t)}))},e.prototype.Yn=function(e){this.Wn=this.Wn.delete(e),this.zn=this.zn.delete(e)},e.prototype.es=function(e){var t=new K(new A([])),n=new Ui(t,e),r=new Ui(t,e+1),i=Bt();return this.zn.forEachInRange([n,r],(function(e){i=i.add(e.key)})),i},e.prototype.containsKey=function(e){var t=new Ui(e,0),n=this.Wn.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)},e}(),Ui=function(){function e(e,t){this.key=e,this.ns=t}return e.Gn=function(e,t){return K.comparator(e.key,t.key)||w(e.ns,t.ns)},e.Hn=function(e,t){return w(e.ns,t.ns)||K.comparator(e.key,t.key)},e}(),Vi=function(){function e(e,t){this.Ut=e,this.referenceDelegate=t,this._n=[],this.ss=1,this.rs=new Pt(Ui.Gn)}return e.prototype.checkEmpty=function(e){return rr.resolve(0===this._n.length)},e.prototype.addMutationBatch=function(e,t,n,r){var i=this.ss;this.ss++,this._n.length>0&&this._n[this._n.length-1];var o=new gr(i,t,n,r);this._n.push(o);for(var a=0,s=r;a<s.length;a++){var u=s[a];this.rs=this.rs.add(new Ui(u.key,i)),this.Ut.addToCollectionParentIndex(e,u.key.path.popLast())}return rr.resolve(o)},e.prototype.lookupMutationBatch=function(e,t){return rr.resolve(this.os(t))},e.prototype.getNextMutationBatchAfterBatchId=function(e,t){var n=t+1,r=this.cs(n),i=r
2<0?0:r;return rr.resolve(this._n.length>i?this._n[i]:null)},e.prototype.getHighestUnacknowledgedBatchId=function(){return rr.resolve(0===this._n.length?-1:this.ss-1)},e.prototype.getAllMutationBatches=function(e){return rr.resolve(this._n.slice())},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(e,t){var n=this,r=new Ui(t,0),i=new Ui(t,Number.POSITIVE_INFINITY),o=[];return this.rs.forEachInRange([r,i],(function(e){var t=n.os(e.ns);o.push(t)})),rr.resolve(o)},e.prototype.getAllMutationBatchesAffectingDocumentKeys=function(e,t){var n=this,r=new Pt(w);return t.forEach((function(e){var t=new Ui(e,0),i=new Ui(e,Number.POSITIVE_INFINITY);n.rs.forEachInRange([t,i],(function(e){r=r.add(e.ns)}))})),rr.resolve(this.us(r))},e.prototype.getAllMutationBatchesAffectingQuery=function(e,t){var n=t.path,r=n.length+1,i=n;K.isDocumentKey(i)||(i=i.child(""));var o=new Ui(new K(i),0),a=new Pt(w);return this.rs.forEachWhile((function(e){var t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(a=a.add(e.ns)),!0)}),o),rr.resolve(this.us(a))},e.prototype.us=function(e){var t=this,n=[];return e.forEach((function(e){var r=t.os(e);null!==r&&n.push(r)})),n},e.prototype.removeMutationBatch=function(e,t){var n=this;m(0===this.hs(t.batchId,"removed")),this._n.shift();var r=this.rs;return rr.forEach(t.mutations,(function(i){var o=new Ui(i.key,t.batchId);return r=r.delete(o),n.referenceDelegate.markPotentiallyOrphaned(e,i.key)})).next((function(){n.rs=r}))},e.prototype.Gt=function(e){},e.prototype.containsKey=function(e,t){var n=new Ui(t,0),r=this.rs.firstAfterOrEqual(n);return rr.resolve(t.isEqual(r&&r.key))},e.prototype.performConsistencyCheck=function(e){return this._n.length,rr.resolve()},e.prototype.hs=function(e,t){return this.cs(e)},e.prototype.cs=function(e){return 0===this._n.length?0:e-this._n[0].batchId},e.prototype.os=function(e){var t=this.cs(e);return t<0||t>=this._n.length?null:this._n[t]},e}(),Bi=function(){function e(e,t){this.Ut=e,this.ls=t,this.docs=new Ot(K.comparator),this.size=0}return e.prototype.addEntry=function(e,t,n){var r=t.key,i=this.docs.get(r),o=i?i.size:0,a=this.ls(t);return this.docs=this.docs.insert(r,{document:t.clone(),size:a,readTime:n}),this.size+=a-o,this.Ut.addToCollectionParentIndex(e,r.path.popLast())},e.prototype.removeEntry=function(e){var t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)},e.prototype.getEntry=function(e,t){var n=this.docs.get(t);return rr.resolve(n?n.document.clone():ue.newInvalidDocument(t))},e.prototype.getEntries=function(e,t){var n=this,r=Dt();return t.forEach((function(e){var t=n.docs.get(e);r=r.insert(e,t?t.document.clone():ue.newInvalidDocument(e))})),rr.resolve(r)},e.prototype.getDocumentsMatchingQuery=function(e,t,n){for(var r=Dt(),i=new K(t.path.child("")),o=this.docs.getIteratorFrom(i);o.hasNext();){var a=o.getNext(),s=a.key,u=a.value,c=u.document,l=u.readTime;if(!t.path.isPrefixOf(s.path))break;l.compareTo(n)<=0||ze(t,c)&&(r=r.insert(c.key,c.clone()))}return rr.resolve(r)},e.prototype.fs=function(e,t){return rr.forEach(this.docs,(function(e){return t(e)}))},e.prototype.newChangeBuffer=function(e){return new qi(this)},e.prototype.getSize=function(e){return rr.resolve(this.size)},e}(),qi=function(e){function t(t){var n=this;return(n=e.call(this)||this).Ie=t,n}return Object(a.__extends)(t,e),t.prototype.applyChanges=function(e){var t=this,n=[];
2return this.changes.forEach((function(r,i){i.document.isValidDocument()?n.push(t.Ie.addEntry(e,i.document,t.getReadTime(r))):t.Ie.removeEntry(r)})),rr.waitFor(n)},t.prototype.getFromCache=function(e,t){return this.Ie.getEntry(e,t)},t.prototype.getAllFromCache=function(e,t){return this.Ie.getEntries(e,t)},t}(ii),zi=function(){function e(e){this.persistence=e,this.ds=new ri((function(e){return fe(e)}),he),this.lastRemoteSnapshotVersion=I.min(),this.highestTargetId=0,this.ws=0,this._s=new Fi,this.targetCount=0,this.ys=Kr.Jt()}return e.prototype.forEachTarget=function(e,t){return this.ds.forEach((function(e,n){return t(n)})),rr.resolve()},e.prototype.getLastRemoteSnapshotVersion=function(e){return rr.resolve(this.lastRemoteSnapshotVersion)},e.prototype.getHighestSequenceNumber=function(e){return rr.resolve(this.ws)},e.prototype.allocateTargetId=function(e){return this.highestTargetId=this.ys.next(),rr.resolve(this.highestTargetId)},e.prototype.setTargetsMetadata=function(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.ws&&(this.ws=t),rr.resolve()},e.prototype.te=function(e){this.ds.set(e.target,e);var t=e.targetId;t>this.highestTargetId&&(this.ys=new Kr(t),this.highestTargetId=t),e.sequenceNumber>this.ws&&(this.ws=e.sequenceNumber)},e.prototype.addTargetData=function(e,t){return this.te(t),this.targetCount+=1,rr.resolve()},e.prototype.updateTargetData=function(e,t){return this.te(t),rr.resolve()},e.prototype.removeTargetData=function(e,t){return this.ds.delete(t.target),this._s.Zn(t.targetId),this.targetCount-=1,rr.resolve()},e.prototype.removeTargets=function(e,t,n){var r=this,i=0,o=[];return this.ds.forEach((function(a,s){s.sequenceNumber<=t&&null===n.get(s.targetId)&&(r.ds.delete(a),o.push(r.removeMatchingKeysForTargetId(e,s.targetId)),i++)})),rr.waitFor(o).next((function(){return i}))},e.prototype.getTargetCount=function(e){return rr.resolve(this.targetCount)},e.prototype.getTargetData=function(e,t){var n=this.ds.get(t)||null;return rr.resolve(n)},e.prototype.addMatchingKeys=function(e,t,n){return this._s.Jn(t,n),rr.resolve()},e.prototype.removeMatchingKeys=function(e,t,n){this._s.Xn(t,n);var r=this.persistence.referenceDelegate,i=[];return r&&t.forEach((function(t){i.push(r.markPotentiallyOrphaned(e,t))})),rr.waitFor(i)},e.prototype.removeMatchingKeysForTargetId=function(e,t){return this._s.Zn(t),rr.resolve()},e.prototype.getMatchingKeysForTargetId=function(e,t){var n=this._s.es(t);return rr.resolve(n)},e.prototype.containsKey=function(e,t){return rr.resolve(this._s.containsKey(t))},e}(),Hi=function(){function e(e,t){var n=this;this.gs={},this.Ne=new s(0),this.xe=!1,this.xe=!0,this.referenceDelegate=e(this),this.qe=new zi(this),this.Ut=new Pr,this.Ue=function(e,t){return new Bi(e,(function(e){return n.referenceDelegate.ps(e)}))}(this.Ut),this.R=new yr(t),this.Qe=new Li(this.R)}return e.prototype.start=function(){return Promise.resolve()},e.prototype.shutdown=function(){return this.xe=!1,Promise.resolve()},Object.defineProperty(e.prototype,"started",{get:function(){return this.xe},enumerable:!1,configurable:!0}),e.prototype.setDatabaseDeletedListener=function(){},e.prototype.setNetworkEnabled=function(){},e.prototype.getIndexManager=function(){return this.Ut},e.prototype.getMutationQueue=function(e){var t=this.gs[e.toKey()];return t||(t=new Vi(this.Ut,this.referenceDelegate),this.gs[e.toKey()]=t),t},e.prototype.getTargetCache=function(){return this.qe},e.prototype.getRemoteDocumentCache=function(){return this.Ue},e.prototype.getBundleCache=function(){return this.Qe},e.prototype.runTransaction=function(e,t,n){var r=this;h("MemoryPersistence","Starting transaction:",e);var i=new Ki(this.Ne.next());return this.referenceDelegate.Es(),n(i).next((function(e){return r.referenceDelegate.Ts(i).next((function(){return e}))})).toPromise().then((function(e){return i.raiseOnCommittedEvent(),e}))},e.prototype.Is=function(e,t){return rr.or(Object.values(this.gs).map((function(n){return function(){return n.containsKey(e,t)}})))},e}(),Ki=function(e){function t(t){var n=this;return(n=e.call(this)||this).currentSequenceNumber=t,n}return Object(a.__extends)(t,e),t}(tr),Wi=function(){function e(e){this.persistence=e,this.As=new Fi,this.Rs=null}return e.bs=function(t){return new e(t)},Object.defineProperty(e.prototype,"vs",{get:function(){if(this.Rs)return this.Rs;
2throw v()},enumerable:!1,configurable:!0}),e.prototype.addReference=function(e,t,n){return this.As.addReference(n,t),this.vs.delete(n.toString()),rr.resolve()},e.prototype.removeReference=function(e,t,n){return this.As.removeReference(n,t),this.vs.add(n.toString()),rr.resolve()},e.prototype.markPotentiallyOrphaned=function(e,t){return this.vs.add(t.toString()),rr.resolve()},e.prototype.removeTarget=function(e,t){var n=this;this.As.Zn(t.targetId).forEach((function(e){return n.vs.add(e.toString())}));var r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,t.targetId).next((function(e){e.forEach((function(e){return n.vs.add(e.toString())}))})).next((function(){return r.removeTargetData(e,t)}))},e.prototype.Es=function(){this.Rs=new Set},e.prototype.Ts=function(e){var t=this,n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return rr.forEach(this.vs,(function(r){var i=K.fromPath(r);return t.Ps(e,i).next((function(e){e||n.removeEntry(i)}))})).next((function(){return t.Rs=null,n.apply(e)}))},e.prototype.updateLimboDocument=function(e,t){var n=this;return this.Ps(e,t).next((function(e){e?n.vs.delete(t.toString()):n.vs.add(t.toString())}))},e.prototype.ps=function(e){return 0},e.prototype.Ps=function(e,t){var n=this;return rr.or([function(){return rr.resolve(n.As.containsKey(t))},function(){return n.persistence.getTargetCache().containsKey(e,t)},function(){return n.persistence.Is(e,t)}])},e}(),Gi=function(){function e(e){this.uid=e}return e.prototype.isAuthenticated=function(){return null!=this.uid},e.prototype.toKey=function(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"},e.prototype.isEqual=function(e){return e.uid===this.uid},e}();function Yi(e,t){return"firestore_clients_"+e+"_"+t}function $i(e,t,n){var r="firestore_mutations_"+e+"_"+n;return t.isAuthenticated()&&(r+="_"+t.uid),r}function Qi(e,t){return"firestore_targets_"+e+"_"+t}Gi.UNAUTHENTICATED=new Gi(null),Gi.GOOGLE_CREDENTIALS=new Gi("google-credentials-uid"),Gi.FIRST_PARTY=new Gi("first-party-uid");var Xi=function(){function e(e,t,n,r){this.user=e,this.batchId=t,this.state=n,this.error=r}return e.Vs=function(t,n,r){var i,o=JSON.parse(r),a="object"==typeof o&&-1!==["pending","acknowledged","rejected"].indexOf(o.state)&&(void 0===o.error||"object"==typeof o.error);return a&&o.error&&(a="string"==typeof o.error.message&&"string"==typeof o.error.code)&&(i=new c(o.error.code,o.error.message)),a?new e(t,n,o.state,i):(d("SharedClientState","Failed to parse mutation state for ID '"+n+"': "+r),null)},e.prototype.Ss=function(){var e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)},e}(),Ji=function(){function e(e,t,n){this.targetId=e,this.state=t,this.error=n}return e.Vs=function(t,n){var r,i=JSON.parse(n),o="object"==typeof i&&-1!==["not-current","current","rejected"].indexOf(i.state)&&(void 0===i.error||"object"==typeof i.error);return o&&i.error&&(o="string"==typeof i.error.message&&"string"==typeof i.error.code)&&(r=new c(i.error.code,i.error.message)),o?new e(t,i.state,r):(d("SharedClientState","Failed to parse target state for ID '"+t+"': "+n),null)},e.prototype.Ss=function(){var e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)},e}(),Zi=function(){function e(e,t){this.clientId=e,this.activeTargetIds=t}return e.Vs=function(t,n){for(var r=JSON.parse(n),i="object"==typeof r&&r.activeTargetIds instanceof Array,o=zt(),a=0;i&&a<r.activeTargetIds.length;++a)i=H(r.activeTargetIds[a]),o=o.add(r.activeTargetIds[a]);return i?new e(t,o):(d("SharedClientState","Failed to parse client data for instance '"+t+"': "+n),null)},e}(),eo=function(){function e(e,t){this.clientId=e,this.onlineState=t}return e.Vs=function(t){var n=JSON.parse(t);return"object"==typeof n&&-1!==["Unknown","Online","Offline"].indexOf(n.onlineState)&&"string"==typeof n.clientId?new e(n.clientId,n.onlineState):(d("SharedClientState","Failed to parse online state: "+t),null)},e}(),to=function(){function e(){this.activeTargetIds=zt()}return e.prototype.Ds=function(e){this.activeTargetIds=this.activeTargetIds.add(e)},e.prototype.Cs=function(e){this.activeTargetIds=this.activeTargetIds.delete(e)},e.prototype.Ss=function(){var e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)},e}(),no=function(){function e(e,t,n,r,i){this.window=e,this.Se=t,this.persistenceKey=n,this.Ns=r,this.syncEngine=null,this.onlineStateHandler=null,this.sequenceNumberHandler=null,this.xs=this.Fs.bind(this),this.ks=new Ot(w),this.started=!1,this.$s=[];var o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=i,this.Os=Yi(this.persistenceKey,this.Ns),this.Ms=function(e){return"firestore_sequence_number_"+e}(this.persistenceKey),this.ks=this.ks.insert(this.Ns,new to),this.Ls=new RegExp("^firestore_clients_"+o+"_([^_]*)$"),this.Bs=new RegExp("^firestore_mutations_"+o+"_(\\d+)(?:_(.*))?$"),this.qs=new RegExp("^firestore_targets_"+o+"_(\\d+)$"),this.Us=function(e){return"firestore_online_state_"+e}(this.persistenceKey),this.Qs=function(e){return"firestore_bundle_loaded_"+e}(this.persistenceKey),this.window.addEventListener("storage",this.xs)}return e.yt=function(e){return!(!e||!e.localStorage)},e.prototype.start=function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){var e,t,n,r,i,o,s,u,c,l,f,h=this;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:return[4,this.syncEngine.fn()];case 1:for(e=a.sent(),t=0,n=e;t<n.length;t++)(r=n[t])!==this.Ns&&(i=this.getItem(Yi(this.persistenceKey,r)))&&(o=Zi.Vs(r,i))&&(this.ks=this.ks.insert(o.clientId,o));for(this.Ks(),(s=this.storage.getItem(this.Us))&&(u=this.js(s))&&this.Ws(u),c=0,l=this.$s;c<l.length;c++)f=l[c],this.Fs(f);return this.$s=[],this.window.addEventListener("pagehide",(function(){return h.shutdown()})),this.started=!0,[2]}}))}))},e.prototype.writeSequenceNumber=function(e){this.setItem(this.Ms,JSON.stringify(e))},e.prototype.getAllActiveQueryTargets=function(){return this.Gs(this.ks)},e.prototype.isActiveQueryTarget=function(e){var t=!1;return this.ks.forEach((function(n,r){r.activeTargetIds.has(e)&&(t=!0)})),t},e.prototype.addPendingMutation=function(e){this.zs(e,"pending")},e.prototype.updateMutationState=function(e,t,n){this.zs(e,t,n),this.Hs(e)},e.prototype.addLocalQueryTarget=function(e){var t="not-current";if(this.isActiveQueryTarget(e)){var n=this.storage.getItem(Qi(this.persistenceKey,e));if(n){var r=Ji.Vs(e,n);r&&(t=r.state)}}return this.Js.Ds(e),this.Ks(),t},e.prototype.removeLocalQueryTarget=function(e){this.Js.Cs(e),this.Ks()},e.prototype.isLocalQueryTarget=function(e){return this.Js.activeTargetIds.has(e)},e.prototype.clearQueryState=function(e){this.removeItem(Qi(this.persistenceKey,e))}
2,e.prototype.updateQueryState=function(e,t,n){this.Ys(e,t,n)},e.prototype.handleUserChange=function(e,t,n){var r=this;t.forEach((function(e){r.Hs(e)})),this.currentUser=e,n.forEach((function(e){r.addPendingMutation(e)}))},e.prototype.setOnlineState=function(e){this.Xs(e)},e.prototype.notifyBundleLoaded=function(){this.Zs()},e.prototype.shutdown=function(){this.started&&(this.window.removeEventListener("storage",this.xs),this.removeItem(this.Os),this.started=!1)},e.prototype.getItem=function(e){var t=this.storage.getItem(e);return h("SharedClientState","READ",e,t),t},e.prototype.setItem=function(e,t){h("SharedClientState","SET",e,t),this.storage.setItem(e,t)},e.prototype.removeItem=function(e){h("SharedClientState","REMOVE",e),this.storage.removeItem(e)},e.prototype.Fs=function(e){var t=this,n=e;if(n.storageArea===this.storage){if(h("SharedClientState","EVENT",n.key,n.newValue),n.key===this.Os)return void d("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.Se.enqueueRetryable((function(){return Object(a.__awaiter)(t,void 0,void 0,(function(){var e,t,r,i,o,u;return Object(a.__generator)(this,(function(a){if(this.started){if(null!==n.key)if(this.Ls.test(n.key)){if(null==n.newValue)return e=this.ti(n.key),[2,this.ei(e,null)];if(t=this.ni(n.key,n.newValue))return[2,this.ei(t.clientId,t)]}else if(this.Bs.test(n.key)){if(null!==n.newValue&&(r=this.si(n.key,n.newValue)))return[2,this.ii(r)]}else if(this.qs.test(n.key)){if(null!==n.newValue&&(i=this.ri(n.key,n.newValue)))return[2,this.oi(i)]}else if(n.key===this.Us){if(null!==n.newValue&&(o=this.js(n.newValue)))return[2,this.Ws(o)]}else if(n.key===this.Ms)(u=function(e){var t=s.o;if(null!=e)try{var n=JSON.parse(e);m("number"==typeof n),t=n}catch(e){d("SharedClientState","Failed to read sequence number from WebStorage",e)}return t}(n.newValue))!==s.o&&this.sequenceNumberHandler(u);else if(n.key===this.Qs)return[2,this.syncEngine.ci()]}else this.$s.push(n);return[2]}))}))}))}},Object.defineProperty(e.prototype,"Js",{get:function(){return this.ks.get(this.Ns)},enumerable:!1,configurable:!0}),e.prototype.Ks=function(){this.setItem(this.Os,this.Js.Ss())},e.prototype.zs=function(e,t,n){var r=new Xi(this.currentUser,e,t,n),i=$i(this.persistenceKey,this.currentUser,e);this.setItem(i,r.Ss())},e.prototype.Hs=function(e){var t=$i(this.persistenceKey,this.currentUser,e);this.removeItem(t)},e.prototype.Xs=function(e){var t={clientId:this.Ns,onlineState:e};this.storage.setItem(this.Us,JSON.stringify(t))},e.prototype.Ys=function(e,t,n){var r=Qi(this.persistenceKey,e),i=new Ji(e,t,n);this.setItem(r,i.Ss())},e.prototype.Zs=function(){this.setItem(this.Qs,"value-not-used")},e.prototype.ti=function(e){var t=this.Ls.exec(e);return t?t[1]:null},e.prototype.ni=function(e,t){var n=this.ti(e);return Zi.Vs(n,t)},e.prototype.si=function(e,t){var n=this.Bs.exec(e),r=Number(n[1]),i=void 0!==n[2]?n[2]:null;return Xi.Vs(new Gi(i),r,t)},e.prototype.ri=function(e,t){var n=this.qs.exec(e),r=Number(n[1]);return Ji.Vs(r,t)},e.prototype.js=function(e){return eo.Vs(e)},e.prototype.ii=function(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(t){return e.user.uid===this.currentUser.uid?[2,this.syncEngine.ui(e.batchId,e.state,e.error)]:(h("SharedClientState","Ignoring mutation for non-active user "+e.user.uid),[2])}))}))},e.prototype.oi=function(e){return this.syncEngine.ai(e.targetId,e.state,e.error)},e.prototype.ei=function(e,t){var n=this,r=t?this.ks.insert(e,t):this.ks.remove(e),i=this.Gs(this.ks),o=this.Gs(r),a=[],s=[];return o.forEach((function(e){i.has(e)||a.push(e)})),i.forEach((function(e){o.has(e)||s.push(e)})),this.syncEngine.hi(a,s).then((function(){n.ks=r}))},e.prototype.Ws=function(e){this.ks.get(e.clientId)&&this.onlineStateHandler(e.onlineState)},e.prototype.Gs=function(e){var t=zt();return e.forEach((function(e,n){t=t.unionWith(n.activeTargetIds)})),t},e}(),ro=function(){function e(){this.li=new to,this.fi={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}return e.prototype.addPendingMutation=function(e){},e.prototype.updateMutationState=function(e,t,n){},e.prototype.addLocalQueryTarget=function(e){return this.li.Ds(e),this.fi[e]||"not-current"},e.prototype.updateQueryState=function(e,t,n){this.fi[e]=t},e.prototype.removeLocalQueryTarget=function(e){this.li.Cs(e)},e.prototype.isLocalQueryTarget=function(e){return this.li.activeTargetIds.has(e)},e.prototype.clearQueryState=function(e){delete this.fi[e]},e.prototype.getAllActiveQueryTargets=function(){return this.li.activeTargetIds},e.prototype.isActiveQueryTarget=function(e){return this.li.activeTargetIds.has(e)},e.prototype.start=function(){return this.li=new to,Promise.resolve()},e.prototype.handleUserChange=function(e,t,n){},e.prototype.setOnlineState=function(e){},e.prototype.shutdown=function(){},e.prototype.writeSequenceNumber=function(e){},e.prototype.notifyBundleLoaded=function(){},e}(),io=function(){function e(){}return e.prototype.di=function(e){},e.prototype.shutdown=function(){},e}(),oo=function(){function e(){var e=this;this.wi=function(){return e._i()},this.mi=function(){return e.yi()},this.gi=[],this.pi()}return e.prototype.di=function(e){this.gi.push(e)},e.prototype.shutdown=function(){window.removeEventListener("online",this.wi),window.removeEventListener("offline",this.mi)},e.prototype.pi=function(){window.addEventListener("online",this.wi),window.addEventListener("offline",this.mi)},e.prototype._i=function(){h("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(var e=0,t=this.gi;e<t.length;e++)(0,t[e])(0)},e.prototype.yi=function(){h("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(var e=0,t=this.gi;e<t.length;e++)(0,t[e])(1)},e.yt=function(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener},e}(),ao={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"},so=function(){function e(e){this.Ei=e.Ei,this.Ti=e.Ti}return e.prototype.Ii=function(e){this.Ai=e},e.prototype.Ri=function(e){this.bi=e},e.prototype.onMessage=function(e){this.vi=e},e.prototype.close=function(){this.Ti()},e.prototype.send=function(e){this.Ei(e)},e.prototype.Pi=function(){this.Ai()},e.prototype.Vi=function(e){this.bi(e)},e.prototype.Si=function(e){this.vi(e)},e}(),uo=function(e){function t(t){var n=this;return(n=e.call(this,t)||this).forceLongPolling=t.forceLongPolling,n.autoDetectLongPolling=t.autoDetectLongPolling,n.useFetchStreams=t.useFetchStreams,n}return Object(a.__extends)(t,e),t.prototype.ki=function(e,t,n,r){return new Promise((function(i,a){var s=new o.g;
2s.listenOnce(o.c.COMPLETE,(function(){try{switch(s.getLastErrorCode()){case o.a.NO_ERROR:var t=s.getResponseJson();h("Connection","XHR received:",JSON.stringify(t)),i(t);break;case o.a.TIMEOUT:h("Connection",'RPC "'+e+'" timed out'),a(new c(u.DEADLINE_EXCEEDED,"Request time out"));break;case o.a.HTTP_ERROR:var n=s.getStatus();if(h("Connection",'RPC "'+e+'" failed with status:',n,"response text:",s.getResponseText()),n>0){var r=s.getResponseJson().error;if(r&&r.status&&r.message){var l=function(e){var t=e.toLowerCase().replace(/_/g,"-");return Object.values(u).indexOf(t)>=0?t:u.UNKNOWN}(r.status);a(new c(l,r.message))}else a(new c(u.UNKNOWN,"Server responded with status "+s.getStatus()))}else a(new c(u.UNAVAILABLE,"Connection failed."));break;default:v()}}finally{h("Connection",'RPC "'+e+'" completed.')}}));var l=JSON.stringify(r);s.send(t,"POST",l,n,15)}))},t.prototype.Oi=function(e,t){var n=[this.Di,"/","google.firestore.v1.Firestore","/",e,"/channel"],i=Object(o.h)(),a=Object(o.i)(),s={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(s.xmlHttpFactory=new o.d({})),this.Fi(s.initMessageHeaders,t),Object(r.isMobileCordova)()||Object(r.isReactNative)()||Object(r.isElectron)()||Object(r.isIE)()||Object(r.isUWP)()||Object(r.isBrowserExtension)()||(s.httpHeadersOverwriteParam="$httpHeaders");var l=n.join("");h("Connection","Creating WebChannel: "+l,s);var f=i.createWebChannel(l,s),d=!1,g=!1,v=new so({Ei:function(e){g?h("Connection","Not sending because WebChannel is closed:",e):(d||(h("Connection","Opening WebChannel transport."),f.open(),d=!0),h("Connection","WebChannel sending:",e),f.send(e))},Ti:function(){return f.close()}}),y=function(e,t,n){e.listen(t,(function(e){try{n(e)}catch(e){setTimeout((function(){throw e}),0)}}))};return y(f,o.f.EventType.OPEN,(function(){g||h("Connection","WebChannel transport opened.")})),y(f,o.f.EventType.CLOSE,(function(){g||(g=!0,h("Connection","WebChannel transport closed"),v.Vi())})),y(f,o.f.EventType.ERROR,(function(e){g||(g=!0,p("Connection","WebChannel transport errored:",e),v.Vi(new c(u.UNAVAILABLE,"The operation could not be completed")))})),y(f,o.f.EventType.MESSAGE,(function(e){var t;if(!g){var n=e.data[0];m(!!n);var r=n,i=r.error||(null===(t=r[0])||void 0===t?void 0:t.error);if(i){h("Connection","WebChannel received error:",i);var o=i.status,a=function(e){var t=kt[e];if(void 0!==t)return Ct(t)}(o),s=i.message;void 0===a&&(a=u.INTERNAL,s="Unknown error status: "+o+" with message "+i.message),g=!0,v.Vi(new c(a,s)),f.close()}else h("Connection","WebChannel received:",n),v.Si(n)}})),y(a,o.b.STAT_EVENT,(function(e){e.stat===o.e.PROXY?h("Connection","Detected buffering proxy"):e.stat===o.e.NOPROXY&&h("Connection","Detected no buffering proxy")})),setTimeout((function(){v.Pi()}),0),v},t}(function(){function e(e){this.databaseInfo=e,this.databaseId=e.databaseId;var t=e.ssl?"https":"http";this.Di=t+"://"+e.host,this.Ci="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}return e.prototype.Ni=function(e,t,n,r){var i=this.xi(e,t);h("RestConnection","Sending: ",i,n);var o={};return this.Fi(o,r),this.ki(e,i,o,n).then((function(e){return h("RestConnection","Received: ",e),e}),(function(t){throw p("RestConnection",e+" failed with error: ",t,"url: ",i,"request:",n),t}))},e.prototype.$i=function(e,t,n,r){return this.Ni(e,t,n,r)},e.prototype.Fi=function(e,t){if(e["X-Goog-Api-Client"]="gl-js/ fire/8.6.8",e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t)for(var n in t.authHeaders)t.authHeaders.hasOwnProperty(n)&&(e[n]=t.authHeaders[n])},e.prototype.xi=function(e,t){var n=ao[e];return this.Di+"/v1/"+t+":"+n},e}());function co(){return"undefined"!=typeof window?window:null}function lo(){return"undefined"!=typeof document?document:null}function fo(e){return new tn(e,!0)}var ho=function(){function e(e,t,n,r,i){void 0===n&&(n=1e3),void 0===r&&(r=1.5),void 0===i&&(i=6e4),this.Se=e,this.timerId=t,this.Mi=n,this.Li=r,this.Bi=i,this.qi=0,this.Ui=null,this.Qi=Date.now(),this.reset()}return e.prototype.reset=function(){this.qi=0},e.prototype.Ki=function(){this.qi=this.Bi},e.prototype.ji=function(e){var t=this;this.cancel();var n=Math.floor(this.qi+this.Wi()),r=Math.max(0,Date.now()-this.Qi),i=Math.max(0,n-r);i>0&&h("ExponentialBackoff","Backing off for "+i+" ms (base delay: "+this.qi+" ms, delay with 
2jitter: "+n+" ms, last attempt: "+r+" ms ago)"),this.Ui=this.Se.enqueueAfterDelay(this.timerId,i,(function(){return t.Qi=Date.now(),e()})),this.qi*=this.Li,this.qi<this.Mi&&(this.qi=this.Mi),this.qi>this.Bi&&(this.qi=this.Bi)},e.prototype.Gi=function(){null!==this.Ui&&(this.Ui.skipDelay(),this.Ui=null)},e.prototype.cancel=function(){null!==this.Ui&&(this.Ui.cancel(),this.Ui=null)},e.prototype.Wi=function(){return(Math.random()-.5)*this.qi},e}(),po=function(){function e(e,t,n,r,i,o){this.Se=e,this.zi=n,this.Hi=r,this.Ji=i,this.listener=o,this.state=0,this.Yi=0,this.Xi=null,this.stream=null,this.Zi=new ho(e,t)}return e.prototype.tr=function(){return 1===this.state||2===this.state||4===this.state},e.prototype.er=function(){return 2===this.state},e.prototype.start=function(){3!==this.state?this.auth():this.nr()},e.prototype.stop=function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(e){switch(e.label){case 0:return this.tr()?[4,this.close(0)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}
2))}))},e.prototype.sr=function(){this.state=0,this.Zi.reset()},e.prototype.ir=function(){var e=this;this.er()&&null===this.Xi&&(this.Xi=this.Se.enqueueAfterDelay(this.zi,6e4,(function(){return e.rr()})))},e.prototype.cr=function(e){this.ur(),this.stream.send(e)},e.prototype.rr=function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(e){return this.er()?[2,this.close(0)]:[2]}))}))},e.prototype.ur=function(){this.Xi&&(this.Xi.cancel(),this.Xi=null)},e.prototype.close=function(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(n){switch(n.label){case 0:return this.ur(),this.Zi.cancel(),this.Yi++,3!==e?this.Zi.reset():t&&t.code===u.RESOURCE_EXHAUSTED?(d(t.toString()),d("Using maximum backoff delay to prevent overloading the backend."),this.Zi.Ki()):t&&t.code===u.UNAUTHENTICATED&&this.Ji.invalidateToken(),null!==this.stream&&(this.ar(),this.stream.close(),this.stream=null),this.state=e,[4,this.listener.Ri(t)];case 1:return n.sent(),[2]}}))}))},e.prototype.ar=function(){},e.prototype.auth=function(){var e=this;this.state=1;var t=this.hr(this.Yi),n=this.Yi;this.Ji.getToken().then((function(t){e.Yi===n&&e.lr(t)}),(function(n){t((function(){var t=new c(u.UNKNOWN,"Fetching auth token failed: "+n.message);return e.dr(t)}))}))},e.prototype.lr=function(e){var t=this,n=this.hr(this.Yi);this.stream=this.wr(e),this.stream.Ii((function(){n((function(){return t.state=2,t.listener.Ii()}))})),this.stream.Ri((function(e){n((function(){return t.dr(e)}))})),this.stream.onMessage((function(e){n((function(){return t.onMessage(e)}))}))},e.prototype.nr=function(){var e=this;this.state=4,this.Zi.ji((function(){return Object(a.__awaiter)(e,void 0,void 0,(function(){return Object(a.__generator)(this,(function(e){return this.state=0,this.start(),[2]}))}))}))},e.prototype.dr=function(e){return h("PersistentStream","close with error: "+e),this.stream=null,this.close(3,e)},e.prototype.hr=function(e){var t=this;return function(n){t.Se.enqueueAndForget((function(){return t.Yi===e?n():(h("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}},e}(),go=function(e){function t(t,n,r,i,o){var a=this;return(a=e.call(this,t,"listen_stream_connection_backoff","listen_stream_idle",n,r,o)||this).R=i,a}return Object(a.__extends)(t,e),t.prototype.wr=function(e){return this.Hi.Oi("Listen",e)},t.prototype.onMessage=function(e){this.Zi.reset();var t=function(e,t){var n;if("targetChange"in t){t.targetChange;var r=function(e){return"NO_CHANGE"===e?0:"ADD"===e?1:"REMOVE"===e?2:"CURRENT"===e?3:"RESET"===e?4:v()}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],o=function(e,t){return e.I?(m(void 0===t||"string"==typeof t),j.fromBase64String(t||"")):(m(void 0===t||t instanceof Uint8Array),j.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),a=(s=t.targetChange.cause)&&function(e){var t=void 0===e.code?u.UNKNOWN:Ct(e.code);return new c(t,e.message||"")}(s);n=new Yt(r,i,o,a||null)}else if("documentChange"in t){t.documentChange,(r=t.documentChange).document,r.document.name,r.document.updateTime,i=ln(e,r.document.name),o=an(r.document.updateTime);var s=new ae({mapValue:{fields:r.document.fields}}),l=(a=ue.newFoundDocument(i,o,s),r.targetIds||[]),f=r.removedTargetIds||[];n=new Wt(l,f,a.key,a)}else if("documentDelete"in t)t.documentDelete,(r=t.documentDelete).document,i=ln(e,r.document),o=r.readTime?an(r.readTime):I.min(),s=ue.newNoDocument(i,o),a=r.removedTargetIds||[],n=new Wt([],a,s.key,s);else if("documentRemove"in t)t.documentRemove,(r=t.documentRemove).document,i=ln(e,r.document),o=r.removedTargetIds||[],n=new Wt([],o,i,null);else{if(!("filter"in t))return v();t.filter;var h=t.filter;h.targetId,r=h.count||0,i=new xt(r),o=h.targetId,n=new Gt(o,i)}return n}(this.R,e),n=function(e){if(!("targetChange"in e))return I.min();var t=e.targetChange;return t.targetIds&&t.targetIds.length?I.min():t.readTime?an(t.readTime):I.min()}(e);return this.listener._r(t,n)},t.prototype.mr=function(e){var t={};t.database=dn(this.R),t.addTarget=function(e,t){var n,r=t.target;return(n=de(r)?{documents:bn(e,r)}:{query:_n(e,r)}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0?n.resumeToken=rn(e,t.resumeToken):t.snapshotVersion.compareTo(I.min())>0&&(n.readTime=nn(e,t.snapshotVersion.toTimestamp())),n}(this.R,e);var n=function(e,t){var n=function(e,t){switch(t){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return v()}}(0,t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.R,e);n&&(t.labels=n),this.cr(t)},t.prototype.yr=function(e){var t={};t.database=dn(this.R),t.removeTarget=e,this.cr(t)},t}(po),vo=function(e){function t(t,n,r,i,o){var a=this;return(a=e.call(this,t,"write_stream_connection_backoff","write_stream_idle",n,r,o)||this).R=i,a.gr=!1,a}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"pr",{get:function(){return this.gr}
2,enumerable:!1,configurable:!0}),t.prototype.start=function(){this.gr=!1,this.lastStreamToken=void 0,e.prototype.start.call(this)},t.prototype.ar=function(){this.gr&&this.Er([])},t.prototype.wr=function(e){return this.Hi.Oi("Write",e)},t.prototype.onMessage=function(e){if(m(!!e.streamToken),this.lastStreamToken=e.streamToken,this.gr){this.Zi.reset();var t=function(e,t){return e&&e.length>0?(m(void 0!==t),e.map((function(e){return function(e,t){var n=e.updateTime?an(e.updateTime):an(t);return n.isEqual(I.min())&&(n=an(t)),new ut(n,e.transformResults||[])}(e,t)}))):[]}(e.writeResults,e.commitTime),n=an(e.commitTime);return this.listener.Tr(n,t)}return m(!e.writeResults||0===e.writeResults.length),this.gr=!0,this.listener.Ir()},t.prototype.Ar=function(){var e={};e.database=dn(this.R),this.cr(e)},t.prototype.Er=function(e){var t=this,n={streamToken:this.lastStreamToken,writes:e.map((function(e){return mn(t.R,e)}))};this.cr(n)},t}(po),mo=function(e){function t(t,n,r){var i=this;return(i=e.call(this)||this).credentials=t,i.Hi=n,i.R=r,i.Rr=!1,i}return Object(a.__extends)(t,e),t.prototype.br=function(){if(this.Rr)throw new c(u.FAILED_PRECONDITION,"The client has already been terminated.")},t.prototype.Ni=function(e,t,n){var r=this;return this.br(),this.credentials.getToken().then((function(i){return r.Hi.Ni(e,t,n,i)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===u.UNAUTHENTICATED&&r.credentials.invalidateToken(),e):new c(u.UNKNOWN,e.toString())}))},t.prototype.$i=function(e,t,n){var r=this;return this.br(),this.credentials.getToken().then((function(i){return r.Hi.$i(e,t,n,i)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===u.UNAUTHENTICATED&&r.credentials.invalidateToken(),e):new c(u.UNKNOWN,e.toString())}))},t.prototype.terminate=function(){this.Rr=!0},t}((function(){})),yo=function(){function e(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.vr=0,this.Pr=null,this.Vr=!0}return e.prototype.Sr=function(){var e=this;0===this.vr&&(this.Dr("Unknown"),this.Pr=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(function(){return e.Pr=null,e.Cr("Backend didn't respond within 10 seconds."),e.Dr("Offline"),Promise.resolve()})))},e.prototype.Nr=function(e){"Online"===this.state?this.Dr("Unknown"):(this.vr++,this.vr>=1&&(this.Fr(),this.Cr("Connection failed 1 times. Most recent error: "+e.toString()),this.Dr("Offline")))},e.prototype.set=function(e){this.Fr(),this.vr=0,"Online"===e&&(this.Vr=!1),this.Dr(e)},e.prototype.Dr=function(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))},e.prototype.Cr=function(e){var t="Could not reach Cloud Firestore backend. "+e+"\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.Vr?(d(t),this.Vr=!1):h("OnlineStateTracker",t)},e.prototype.Fr=function(){null!==this.Pr&&(this.Pr.cancel(),this.Pr=null)},e}(),bo=function(e,t,n,r,i){var o=this;this.localStore=e,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.kr=[],this.$r=new Map,this.Or=new Set,this.Mr=[],this.Lr=i,this.Lr.di((function(e){n.enqueueAndForget((function(){return Object(a.__awaiter)(o,void 0,void 0,(function(){return Object(a.__generator)(this,(function(e){switch(e.label){case 0:return Co(this)?(h("RemoteStore","Restarting streams for network reachability change."),[4,function(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t;return Object(a.__generator)(this,(function(n){switch(n.label){case 0:return(t=y(e)).Or.add(4),[4,wo(t)];case 1:return n.sent(),t.Br.set("Unknown"),t.Or.delete(4),[4,_o(t)];case 2:return n.sent(),[2]}}))}))}(this)]):[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}
2))}))}))})),this.Br=new yo(n,r)};function _o(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t,n;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:if(!Co(e))return[3,4];t=0,n=e.Mr,r.label=1;case 1:return t<n.length?[4,(0,n[t])(!0)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))}))}function wo(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t,n;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:t=0,n=e.Mr,r.label=1;case 1:return t<n.length?[4,(0,n[t])(!1)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))}))}function ko(e,t){var n=y(e);n.$r.has(t.targetId)||(n.$r.set(t.targetId,t),To(n)?xo(n):zo(n).er()&&So(n,t))}function Eo(e,t){var n=y(e),r=zo(n);n.$r.delete(t),r.er()&&Io(n,t),0===n.$r.size&&(r.er()?r.ir():Co(n)&&n.Br.set("Unknown"))}function So(e,t){e.qr.U(t.targetId),zo(e).mr(t)}function Io(e,t){e.qr.U(t),zo(e).yr(t)}function xo(e){e.qr=new Qt({getRemoteKeysForTarget:function(t){return e.remoteSyncer.getRemoteKeysForTarget(t)},lt:function(t){return e.$r.get(t)||null}}),zo(e).start(),e.Br.Sr()}function To(e){return Co(e)&&!zo(e).tr()&&e.$r.size>0}function Co(e){return 0===y(e).Or.size}function Oo(e){e.qr=void 0}function Ao(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(t){return e.$r.forEach((function(t,n){So(e,t)})),[2]}))}))}function No(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(n){return Oo(e),To(e)?(e.Br.Nr(t),xo(e)):e.Br.set("Unknown"),[2]}))}))}function Po(e,t,n){return Object(a.__awaiter)(this,void 0,void 0,(function(){var r,i,o;return Object(a.__generator)(this,(function(s){switch(s.label){case 0:if(e.Br.set("Online"),!(t instanceof Yt&&2===t.state&&t.cause))return[3,6];s.label=1;case 1:return s.trys.push([1,3,,5]),[4,function(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:n=t.cause,r=0,i=t.targetIds,a.label=1;case 1:return r<i.length?(o=i[r],e.$r.has(o)?[4,e.remoteSyncer.rejectListen(o,n)]:[3,3]):[3,5];case 2:a.sent(),e.$r.delete(o),e.qr.removeTarget(o),a.label=3;case 3:a.label=4;case 4:return r++,[3,1];case 5:return[2]}}
2))}))}(e,t)];case 2:return s.sent(),[3,5];case 3:return r=s.sent(),h("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),r),[4,Ro(e,r)];case 4:return s.sent(),[3,5];case 5:return[3,13];case 6:if(t instanceof Wt?e.qr.X(t):t instanceof Gt?e.qr.rt(t):e.qr.et(t),n.isEqual(I.min()))return[3,13];s.label=7;case 7:return s.trys.push([7,11,,13]),[4,Ii(e.localStore)];case 8:return i=s.sent(),n.compareTo(i)>=0?[4,function(e,t){var n=e.qr.ut(t);return n.targetChanges.forEach((function(n,r){if(n.resumeToken.approximateByteSize()>0){var i=e.$r.get(r);i&&e.$r.set(r,i.withResumeToken(n.resumeToken,t))}})),n.targetMismatches.forEach((function(t){var n=e.$r.get(t);if(n){e.$r.set(t,n.withResumeToken(j.EMPTY_BYTE_STRING,n.snapshotVersion)),Io(e,t);var r=new mr(n.target,t,1,n.sequenceNumber);So(e,r)}})),e.remoteSyncer.applyRemoteEvent(n)}(e,n)]:[3,10];case 9:s.sent(),s.label=10;case 10:return[3,13];case 11:return h("RemoteStore","Failed to raise snapshot:",o=s.sent()),[4,Ro(e,o)];case 12:return s.sent(),[3,13];case 13:return[2]}}
2))}))}function Ro(e,t,n){return Object(a.__awaiter)(this,void 0,void 0,(function(){var r=this;return Object(a.__generator)(this,(function(i){switch(i.label){case 0:if(!ur(t))throw t;return e.Or.add(1),[4,wo(e)];case 1:return i.sent(),e.Br.set("Offline"),n||(n=function(){return Ii(e.localStore)}),e.asyncQueue.enqueueRetryable((function(){return Object(a.__awaiter)(r,void 0,void 0,(function(){return Object(a.__generator)(this,(function(t){switch(t.label){case 0:return h("RemoteStore","Retrying IndexedDB access"),[4,n()];case 1:return t.sent(),e.Or.delete(1),[4,_o(e)];case 2:return t.sent(),[2]}}))}))})),[2]}}))}))}function jo(e,t){return t().catch((function(n){return Ro(e,n,t)}))}function Do(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t,n,r,i,o;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:t=y(e),n=Ho(t),r=t.kr.length>0?t.kr[t.kr.length-1].batchId:-1,a.label=1;case 1:if(!function(e){return Co(e)&&e.kr.length<10}(t))return[3,7];a.label=2;case 2:return a.trys.push([2,4,,6]),[4,Ci(t.localStore,r)];case 3:return null===(i=a.sent())?(0===t.kr.length&&n.ir(),[3,7]):(r=i.batchId,function(e,t){e.kr.push(t);var n=Ho(e);n.er()&&n.pr&&n.Er(t.mutations)}(t,i),[3,6]);case 4:return o=a.sent(),[4,Ro(t,o)];case 5:return a.sent(),[3,6];case 6:return[3,1];case 7:return Mo(t)&&Lo(t),[2]}}))}))}function Mo(e){return Co(e)&&!Ho(e).tr()&&e.kr.length>0}function Lo(e){Ho(e).start()}function Fo(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(t){return Ho(e).Ar(),[2]}))}))}function Uo(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t,n,r,i;return Object(a.__generator)(this,(function(o){for(t=Ho(e),n=0,r=e.kr;n<r.length;n++)i=r[n],t.Er(i.mutations);return[2]}))}))}function Vo(e,t,n){return Object(a.__awaiter)(this,void 0,void 0,(function(){var r,i;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:return r=e.kr.shift(),i=vr.from(r,t,n),[4,jo(e,(function(){return e.remoteSyncer.applySuccessfulWrite(i)}))];case 1:return o.sent(),[4,Do(e)];case 2:return o.sent(),[2]}}))}))}function Bo(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(n){switch(n.label){case 0:return t&&Ho(e).pr?[4,function(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(a.__generator)(this,(function(i){switch(i.label){case 0:return Tt(r=t.code)&&r!==u.ABORTED?(n=e.kr.shift(),Ho(e).sr(),[4,jo(e,(function(){return e.remoteSyncer.rejectFailedWrite(n.batchId,t)}))]):[3,3];case 1:return i.sent(),[4,Do(e)];case 2:i.sent(),i.label=3;case 3:return[2]}}
2))}))}(e,t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return Mo(e)&&Lo(e),[2]}}))}))}function qo(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:return n=y(e),t?(n.Or.delete(2),[4,_o(n)]):[3,2];case 1:return r.sent(),[3,5];case 2:return t?[3,4]:(n.Or.add(2),[4,wo(n)]);case 3:r.sent(),n.Br.set("Unknown"),r.label=4;case 4:r.label=5;case 5:return[2]}}))}))}function zo(e){var t=this;return e.Ur||(e.Ur=function(e,t,n){var r=y(e);return r.br(),new go(t,r.Hi,r.credentials,r.R,n)}(e.datastore,e.asyncQueue,{Ii:Ao.bind(null,e),Ri:No.bind(null,e),_r:Po.bind(null,e)}),e.Mr.push((function(n){return Object(a.__awaiter)(t,void 0,void 0,(function(){return Object(a.__generator)(this,(function(t){switch(t.label){case 0:return n?(e.Ur.sr(),To(e)?xo(e):e.Br.set("Unknown"),[3,3]):[3,1];case 1:return[4,e.Ur.stop()];case 2:t.sent(),Oo(e),t.label=3;case 3:return[2]}}))}))}))),e.Ur}function Ho(e){var t=this;return e.Qr||(e.Qr=function(e,t,n){var r=y(e);return r.br(),new vo(t,r.Hi,r.credentials,r.R,n)}(e.datastore,e.asyncQueue,{Ii:Fo.bind(null,e),Ri:Bo.bind(null,e),Ir:Uo.bind(null,e),Tr:Vo.bind(null,e)}),e.Mr.push((function(n){return Object(a.__awaiter)(t,void 0,void 0,(function(){return Object(a.__generator)(this,(function(t){switch(t.label){case 0:return n?(e.Qr.sr(),[4,Do(e)]):[3,2];case 1:return t.sent(),[3,4];case 2:return[4,e.Qr.stop()];case 3:t.sent(),e.kr.length>0&&(h("RemoteStore","Stopping write stream with "+e.kr.length+" pending writes"),e.kr=[]),t.label=4;case 4:return[2]}}
2))}))}))),e.Qr}var Ko=function(){function e(e,t,n,r,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=i,this.deferred=new nr,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((function(e){}))}return e.createAndSchedule=function(t,n,r,i,o){var a=new e(t,n,Date.now()+r,i,o);return a.start(r),a},e.prototype.start=function(e){var t=this;this.timerHandle=setTimeout((function(){return t.handleDelayElapsed()}),e)},e.prototype.skipDelay=function(){return this.handleDelayElapsed()},e.prototype.cancel=function(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new c(u.CANCELLED,"Operation cancelled"+(e?": "+e:""))))},e.prototype.handleDelayElapsed=function(){var e=this;this.asyncQueue.enqueueAndForget((function(){return null!==e.timerHandle?(e.clearTimeout(),e.op().then((function(t){return e.deferred.resolve(t)}))):Promise.resolve()}))},e.prototype.clearTimeout=function(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)},e}();function Wo(e,t){if(d("AsyncQueue",t+": "+e),ur(e))return new c(u.UNAVAILABLE,t+": "+e);throw e}var Go=function(){function e(e){this.comparator=e?function(t,n){return e(t,n)||K.comparator(t.key,n.key)}:function(e,t){return K.comparator(e.key,t.key)},this.keyedMap=Lt(),this.sortedSet=new Ot(this.comparator)}return e.emptySet=function(t){return new e(t.comparator)},e.prototype.has=function(e){return null!=this.keyedMap.get(e)},e.prototype.get=function(e){return this.keyedMap.get(e)},e.prototype.first=function(){return this.sortedSet.minKey()},e.prototype.last=function(){return this.sortedSet.maxKey()},e.prototype.isEmpty=function(){return this.sortedSet.isEmpty()},e.prototype.indexOf=function(e){var t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1},Object.defineProperty(e.prototype,"size",{get:function(){return this.sortedSet.size},enumerable:!1,configurable:!0}),e.prototype.forEach=function(e){this.sortedSet.inorderTraversal((function(t,n){return e(t),!1}))},e.prototype.add=function(e){var t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))},e.prototype.delete=function(e){var t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this},e.prototype.isEqual=function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.sortedSet.getIterator(),r=t.sortedSet.getIterator();n.hasNext();){var i=n.getNext().key,o=r.getNext().key;if(!i.isEqual(o))return!1}return!0},e.prototype.toString=function(){var e=[];return this.forEach((function(t){e.push(t.toString())})),0===e.length?"DocumentSet ()":"DocumentSet (\n  "+e.join("  \n")+"\n)"},e.prototype.copy=function(t,n){var r=new e;return r.comparator=this.comparator,r.keyedMap=t,r.sortedSet=n,r},e}(),Yo=function(){function e(){this.Kr=new Ot(K.comparator)}return e.prototype.track=function(e){var t=e.doc.key,n=this.Kr.get(t);n?0!==e.type&&3===n.type?this.Kr=this.Kr.insert(t,e):3===e.type&&1!==n.type?this.Kr=this.Kr.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.Kr=this.Kr.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.Kr=this.Kr.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.Kr=this.Kr.remove(t):1===e.type&&2===n.type?this.Kr=this.Kr.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.Kr=this.Kr.insert(t,{type:2,doc:e.doc}):v():this.Kr=this.Kr.insert(t,e)},e.prototype.jr=function(){var e=[];return this.Kr.inorderTraversal((function(t,n){e.push(n)})),e},e}(),$o=function(){function e(e,t,n,r,i,o,a,s){this.query=e,this.docs=t,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=i,this.fromCache=o,this.syncStateChanged=a,this.excludesMetadataChanges=s}return e.fromInitialDocuments=function(t,n,r,i){var o=[];return n.forEach((function(e){o.push({type:0,doc:e})})),new e(t,n,Go.emptySet(n),o,r,i,!0,!1)},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return!this.mutatedKeys.isEmpty()},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(e){if(!(this.fromCache===e.fromCache&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&Ve(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;var t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++)if(t[r].type!==n[r].type||!t[r].doc.isEqual(n[r].doc))return!1;return!0},e}(),Qo=function(){this.Wr=void 0,this.listeners=[]},Xo=function(){this.queries=new ri((function(e){return Be(e)}),Ve),this.onlineState="Unknown",this.Gr=new Set};function Jo(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,s,u,c;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:if(n=y(e),r=t.query,i=!1,(o=n.queries.get(r))||(i=!0,o=new Qo),!i)return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),s=o,[4,n.onListen(r)];case 2:return s.Wr=a.sent(),[3,4];case 3:return u=a.sent(),c=Wo(u,"Initialization of query '"+qe(t.query)+"' failed"),[2,void t.onError(c)];case 4:return n.queries.set(r,o),o.listeners.push(t),t.zr(n.onlineState),o.Wr&&t.Hr(o.Wr)&&na(n),[2]}}))}))}function Zo(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,s;return Object(a.__generator)(this,(function(a){return n=y(e),r=t.query,i=!1,(o=n.queries.get(r))&&(s=o.listeners.indexOf(t))>=0&&(o.listeners.splice(s,1),i=0===o.listeners.length),i?[2,(n.queries.delete(r),n.onUnlisten(r))]:[2]}))}))}function ea(e,t){for(var n=y(e),r=!1,i=0,o=t;i<o.length;i++){var a=o[i],s=a.query,u=n.queries.get(s);if(u){for(var c=0,l=u.listeners;c<l.length;c++)l[c].Hr(a)&&(r=!0);u.Wr=a}}r&&na(n)}function ta(e,t,n){var r=y(e),i=r.queries.get(t);if(i)for(var o=0,a=i.listeners;o<a.length;o++)a[o].onError(n);r.queries.delete(t)}function na(e){e.Gr.forEach((function(e){e.next()}))}var ra=function(){function e(e,t,n){this.query=e,this.Jr=t,this.Yr=!1,this.Xr=null,this.onlineState="Unknown",this.options=n||{}}return e.prototype.Hr=function(e){if(!this.options.includeMetadataChanges){for(var t=[],n=0,r=e.docChanges;n<r.length;n++){var i=r[n];3!==i.type&&t.push(i)}e=new $o(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0)}var o=!1;return this.Yr?this.Zr(e)&&(this.Jr.next(e),o=!0):this.eo(e,this.onlineState)&&(this.no(e),o=!0),this.Xr=e,o},e.prototype.onError=function(e){this.Jr.error(e)},e.prototype.zr=function(e){this.onlineState=e;var t=!1;return this.Xr&&!this.Yr&&this.eo(this.Xr,e)&&(this.no(this.Xr),t=!0),t},e.prototype.eo=function(e,t){if(!e.fromCache)return!0;var n="Offline"!==t;return!(this.options.so&&n||e.docs.isEmpty()&&"Offline"!==t)},e.prototype.Zr=function(e){if(e.docChanges.length>0)return!0;var t=this.Xr&&this.Xr.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges},e.prototype.no=function(e){e=$o.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache),this.Yr=!0,this.Jr.next(e)},e}(),ia=function(){function e(e,t){this.payload=e,this.byteLength=t}return e.prototype.io=function(){return"metadata"in this.payload},e}(),oa=function(){function e(e){this.R=e}return e.prototype.qn=function(e){return ln(this.R,e)},e.prototype.Un=function(e){return e.metadata.exists?vn(this.R,e.document,!1):ue.newNoDocument(this.qn(e.metadata.name),this.Qn(e.metadata.readTime))},e.prototype.Qn=function(e){return an(e)},e}(),aa=function(){function e(e,t,n){this.ro=e,this.localStore=t,this.R=n,this.queries=[],this.documents=[],this.progress=sa(e)}return e.prototype.oo=function(e){this.progress.bytesLoaded+=e.byteLength;var t=this.progress.documentsLoaded;return e.payload.namedQuery?this.queries.push(e.payload.namedQuery):e.payload.documentMetadata?(this.documents.push({metadata:e.payload.documentMetadata}),e.payload.documentMetadata.exists||++t):e.payload.document&&(this.documents[this.documents.length-1].document=e.payload.document,++t),t!==this.progress.documentsLoaded?(this.progress.documentsLoaded=t,Object.assign({},this.progress)):null},e.prototype.co=function(e){for(var t=new Map,n=new oa(this.R),r=0,i=e;r<i.length;r++){var o=i[r];if(o.metadata.queries)for(var a=n.qn(o.metadata.name),s=0,u=o.metadata.queries;s<u.length;s++){var c=u[s],l=(t.get(c)||Bt()).add(a);t.set(c,l)}}return t},e.prototype.complete=function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){var e,t,n,r,i;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:return[4,Di(this.localStore,new oa(this.R),this.documents,this.ro.id)];case 1:e=o.sent(),t=this.co(this.documents),n=0,r=this.queries,o.label=2;case 2:return n<r.length?(i=r[n],[4,Mi(this.localStore,i,t.get(i.name))]):[3,5];case 3:o.sent(),o.label=4;case 4:return n++,[3,2];case 5:return[2,(this.progress.taskState="Success",new mi(Object.assign({},this.progress),e))]}}))}))},e}();function sa(e){return{taskState:"Running",documentsLoaded:0,bytesLoaded:0,totalDocuments:e.totalDocuments,totalBytes:e.totalBytes}}var ua=function(e){this.key=e},ca=function(e){this.key=e},la=function(){function e(e,t){this.query=e,this.uo=t,this.ao=null,this.current=!1,this.ho=Bt(),this.mutatedKeys=Bt(),this.lo=He(e),this.fo=new Go(this.lo)}return Object.defineProperty(e.prototype,"wo",{get:function(){return this.uo}
2,enumerable:!1,configurable:!0}),e.prototype._o=function(e,t){var n=this,r=t?t.mo:new Yo,i=t?t.fo:this.fo,o=t?t.mutatedKeys:this.mutatedKeys,a=i,s=!1,u=Pe(this.query)&&i.size===this.query.limit?i.last():null,c=Re(this.query)&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((function(e,t){var l=i.get(e),f=ze(n.query,t)?t:null,h=!!l&&n.mutatedKeys.has(l.key),d=!!f&&(f.hasLocalMutations||n.mutatedKeys.has(f.key)&&f.hasCommittedMutations),p=!1;l&&f?l.data.isEqual(f.data)?h!==d&&(r.track({type:3,doc:f}),p=!0):n.yo(l,f)||(r.track({type:2,doc:f}),p=!0,(u&&n.lo(f,u)>0||c&&n.lo(f,c)<0)&&(s=!0)):!l&&f?(r.track({type:0,doc:f}),p=!0):l&&!f&&(r.track({type:1,doc:l}),p=!0,(u||c)&&(s=!0)),p&&(f?(a=a.add(f),o=d?o.add(e):o.delete(e)):(a=a.delete(e),o=o.delete(e)))})),Pe(this.query)||Re(this.query))for(;a.size>this.query.limit;){var l=Pe(this.query)?a.last():a.first();a=a.delete(l.key),o=o.delete(l.key),r.track({type:1,doc:l})}return{fo:a,mo:r,Nn:s,mutatedKeys:o}},e.prototype.yo=function(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations},e.prototype.applyChanges=function(e,t,n){var r=this,i=this.fo;this.fo=e.fo,this.mutatedKeys=e.mutatedKeys;var o=e.mo.jr();o.sort((function(e,t){return function(e,t){var n=function(e){switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return v()}};return n(e)-n(t)}(e.type,t.type)||r.lo(e.doc,t.doc)})),this.po(n);var a=t?this.Eo():[],s=0===this.ho.size&&this.current?1:0,u=s!==this.ao;return this.ao=s,0!==o.length||u?{snapshot:new $o(this.query,e.fo,i,o,e.mutatedKeys,0===s,u,!1),To:a}:{To:a}},e.prototype.zr=function(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({fo:this.fo,mo:new Yo,mutatedKeys:this.mutatedKeys,Nn:!1},!1)):{To:[]}},e.prototype.Io=function(e){return!this.uo.has(e)&&!!this.fo.has(e)&&!this.fo.get(e).hasLocalMutations},e.prototype.po=function(e){var t=this;e&&(e.addedDocuments.forEach((function(e){return t.uo=t.uo.add(e)})),e.modifiedDocuments.forEach((function(e){})),e.removedDocuments.forEach((function(e){return t.uo=t.uo.delete(e)})),this.current=e.current)},e.prototype.Eo=function(){var e=this;if(!this.current)return[];var t=this.ho;this.ho=Bt(),this.fo.forEach((function(t){e.Io(t.key)&&(e.ho=e.ho.add(t.key))}));var n=[];return t.forEach((function(t){e.ho.has(t)||n.push(new ca(t))})),this.ho.forEach((function(e){t.has(e)||n.push(new ua(e))})),n},e.prototype.Ao=function(e){this.uo=e.Bn,this.ho=Bt();var t=this._o(e.documents);return this.applyChanges(t,!0)},e.prototype.Ro=function(){return $o.fromInitialDocuments(this.query,this.fo,this.mutatedKeys,0===this.ao)},e}(),fa=function(e,t,n){this.query=e,this.targetId=t,this.view=n},ha=function(e){this.key=e,this.bo=!1},da=function(){function e(e,t,n,r,i,o){this.localStore=e,this.remoteStore=t,this.eventManager=n,this.sharedClientState=r,this.currentUser=i,this.maxConcurrentLimboResolutions=o,this.vo={},this.Po=new ri((function(e){return Be(e)}),Ve),this.Vo=new Map,this.So=new Set,this.Do=new Ot(K.comparator),this.Co=new Map,this.No=new Fi,this.xo={},this.Fo=new Map,this.ko=Kr.Yt(),this.onlineState="Unknown",this.$o=void 0}return Object.defineProperty(e.prototype,"isPrimaryClient",{get:function(){return!0===this.$o},enumerable:!1,configurable:!0}),e}();function pa(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,s,u;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:return n=za(e),(o=n.Po.get(t))?(r=o.targetId,n.sharedClientState.addLocalQueryTarget(r),i=o.view.Ro(),[3,4]):[3,1];case 1:return[4,Oi(n.localStore,Fe(t))];case 2:return s=a.sent(),u=n.sharedClientState.addLocalQueryTarget(s.targetId),r=s.targetId,[4,ga(n,t,r,"current"===u)];case 3:i=a.sent(),n.isPrimaryClient&&ko(n.remoteStore,s),a.label=4;case 4:return[2,i]}}))}))}function ga(e,t,n,r){return Object(a.__awaiter)(this,void 0,void 0,(function(){var i,o,s,u,c,l;return Object(a.__generator)(this,(function(f){switch(f.label){case 0:return e.Oo=function(t,n,r){return function(e,t,n,r){return Object(a.__awaiter)(this,void 0,void 0,(function(){var i,o,s;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:return(i=t.view._o(n)).Nn?[4,Ni(e.localStore,t.query,!1).then((function(e){var n=e.documents;return t.view._o(n,i)}))]:[3,2];case 1:i=a.sent(),a.label=2;case 2:return o=r&&r.targetChanges.get(t.targetId),s=t.view.applyChanges(i,e.isPrimaryClient,o),[2,(Ca(e,t.targetId,s.To),s.snapshot)]}}))}))}(e,t,n,r)},[4,Ni(e.localStore,t,!0)];case 1:return i=f.sent(),o=new la(t,i.Bn),s=o._o(i.documents),u=Kt.createSynthesizedTargetChangeForCurrentChange(n,r&&"Offline"!==e.onlineState),c=o.applyChanges(s,e.isPrimaryClient,u),Ca(e,n,c.To),l=new fa(t,n,o),[2,(e.Po.set(t,l),e.Vo.has(n)?e.Vo.get(n).push(t):e.Vo.set(n,[t]),c.snapshot)]}}))}))}function va(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r,i;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:return n=y(e),r=n.Po.get(t),(i=n.Vo.get(r.targetId)).length>1?[2,(n.Vo.set(r.targetId,i.filter((function(e){return!Ve(e,t)}
2))),void n.Po.delete(t))]:n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(r.targetId),n.sharedClientState.isActiveQueryTarget(r.targetId)?[3,2]:[4,Ai(n.localStore,r.targetId,!1).then((function(){n.sharedClientState.clearQueryState(r.targetId),Eo(n.remoteStore,r.targetId),xa(n,r.targetId)})).catch(Qr)]):[3,3];case 1:o.sent(),o.label=2;case 2:return[3,5];case 3:return xa(n,r.targetId),[4,Ai(n.localStore,r.targetId,!0)];case 4:o.sent(),o.label=5;case 5:return[2]}}))}))}function ma(e,t,n){return Object(a.__awaiter)(this,void 0,void 0,(function(){var r,i,o,s;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:r=Ha(e),a.label=1;case 1:return a.trys.push([1,5,,6]),[4,function(e,t){var n,r=y(e),i=S.now(),o=t.reduce((function(e,t){return e.add(t.key)}),Bt());return r.persistence.runTransaction("Locally write mutations","readwrite",(function(e){return r.Mn.pn(e,o).next((function(o){n=o;for(var a=[],s=0,u=t;s<u.length;s++){var c=u[s],l=pt(c,n.get(c.key));null!=l&&a.push(new yt(c.key,l,se(l.value.mapValue),ct.exists(!0)))}return r._n.addMutationBatch(e,i,a,t)}))})).then((function(e){return e.applyToLocalDocumentSet(n),{batchId:e.batchId,changes:n}}))}(r.localStore,t)];
2case 2:return i=a.sent(),r.sharedClientState.addPendingMutation(i.batchId),function(e,t,n){var r=e.xo[e.currentUser.toKey()];r||(r=new Ot(w)),r=r.insert(t,n),e.xo[e.currentUser.toKey()]=r}(r,i.batchId,n),[4,Na(r,i.changes)];case 3:return a.sent(),[4,Do(r.remoteStore)];case 4:return a.sent(),[3,6];case 5:return o=a.sent(),s=Wo(o,"Failed to persist write"),n.reject(s),[3,6];case 6:return[2]}}))}))}function ya(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(a.__generator)(this,(function(i){switch(i.label){case 0:n=y(e),i.label=1;case 1:return i.trys.push([1,4,,6]),[4,xi(n.localStore,t)];case 2:return r=i.sent(),t.targetChanges.forEach((function(e,t){var r=n.Co.get(t);r&&(m(e.addedDocuments.size+e.modifiedDocuments.size+e.removedDocuments.size<=1),e.addedDocuments.size>0?r.bo=!0:e.modifiedDocuments.size>0?m(r.bo):e.removedDocuments.size>0&&(m(r.bo),r.bo=!1))})),[4,Na(n,r,t)];case 3:return i.sent(),[3,6];case 4:return[4,Qr(i.sent())];case 5:return i.sent(),[3,6];case 6:return[2]}}))}))}function ba(e,t,n){var r=y(e);if(r.isPrimaryClient&&0===n||!r.isPrimaryClient&&1===n){var i=[];r.Po.forEach((function(e,n){var r=n.view.zr(t);r.snapshot&&i.push(r.snapshot)})),function(e,t){var n=y(e);n.onlineState=t;var r=!1;n.queries.forEach((function(e,n){for(var i=0,o=n.listeners;i<o.length;i++)o[i].zr(t)&&(r=!0)})),r&&na(n)}(r.eventManager,t),i.length&&r.vo._r(i),r.onlineState=t,r.isPrimaryClient&&r.sharedCl
2ientState.setOnlineState(t)}}function _a(e,t,n){return Object(a.__awaiter)(this,void 0,void 0,(function(){var r,i,o,s,u,c;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:return(r=y(e)).sharedClientState.updateQueryState(t,"rejected",n),i=r.Co.get(t),(o=i&&i.key)?(s=(s=new Ot(K.comparator)).insert(o,ue.newNoDocument(o,I.min())),u=Bt().add(o),c=new Ht(I.min(),new Map,new Pt(w),s,u),[4,ya(r,c)]):[3,2];case 1:return a.sent(),r.Do=r.Do.remove(o),r.Co.delete(t),Aa(r),[3,4];case 2:return[4,Ai(r.localStore,t,!1).then((function(){return xa(r,t,n)})).catch(Qr)];case 3:a.sent(),a.label=4;case 4:return[2]}}))}))}function wa(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r,i;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:n=y(e),r=t.batch.batchId,o.label=1;case 1:return o.trys.push([1,4,,6]),[4,Si(n.localStore,t)];case 2:return i=o.sent(),Ia(n,r,null),Sa(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),[4,Na(n,i)];case 3:return o.sent(),[3,6];case 4:return[4,Qr(o.sent())];case 5:return o.sent(),[3,6];case 6:return[2]}}
2))}))}function ka(e,t,n){return Object(a.__awaiter)(this,void 0,void 0,(function(){var r,i;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:r=y(e),o.label=1;case 1:return o.trys.push([1,4,,6]),[4,function(e,t){var n=y(e);return n.persistence.runTransaction("Reject batch","readwrite-primary",(function(e){var r;return n._n.lookupMutationBatch(e,t).next((function(t){return m(null!==t),r=t.keys(),n._n.removeMutationBatch(e,t)})).next((function(){return n._n.performConsistencyCheck(e)})).next((function(){return n.Mn.pn(e,r)}))}))}(r.localStore,t)];case 2:return i=o.sent(),Ia(r,t,n),Sa(r,t),r.sharedClientState.updateMutationState(t,"rejected",n),[4,Na(r,i)];case 3:return o.sent(),[3,6];case 4:return[4,Qr(o.sent())];case 5:return o.sent(),[3,6];case 6:return[2]}}))}))}function Ea(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,s;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:Co((n=y(e)).remoteStore)||h("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled."),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,function(e){var t=y(e);return t.persistence.runTransaction("Get highest unacknowledged batch id","readonly",(function(e){return t._n.getHighestUnacknowledgedBatchId(e)}))}(n.localStore)];case 2:return-1===(r=a.sent())?[2,void t.resolve()]:((i=n.Fo.get(r)||[]).push(t),n.Fo.set(r,i),[3,4]);case 3:return o=a.sent(),s=Wo(o,"Initialization of waitForPendingWrites() operation failed"),t.reject(s),[3,4];case 4:return[2]}}
2))}))}function Sa(e,t){(e.Fo.get(t)||[]).forEach((function(e){e.resolve()})),e.Fo.delete(t)}function Ia(e,t,n){var r=y(e),i=r.xo[r.currentUser.toKey()];if(i){var o=i.get(t);o&&(n?o.reject(n):o.resolve(),i=i.remove(t)),r.xo[r.currentUser.toKey()]=i}}function xa(e,t,n){void 0===n&&(n=null),e.sharedClientState.removeLocalQueryTarget(t);for(var r=0,i=e.Vo.get(t);r<i.length;r++){var o=i[r];e.Po.delete(o),n&&e.vo.Mo(o,n)}e.Vo.delete(t),e.isPrimaryClient&&e.No.Zn(t).forEach((function(t){e.No.containsKey(t)||Ta(e,t)}))}function Ta(e,t){e.So.delete(t.path.canonicalString());var n=e.Do.get(t);null!==n&&(Eo(e.remoteStore,n),e.Do=e.Do.remove(t),e.Co.delete(n),Aa(e))}function Ca(e,t,n){for(var r=0,i=n;r<i.length;r++){var o=i[r];o instanceof ua?(e.No.addReference(o.key,t),Oa(e,o)):o instanceof ca?(h("SyncEngine","Document no longer in limbo: "+o.key),e.No.removeReference(o.key,t),e.No.containsKey(o.key)||Ta(e,o.key)):v()}}function Oa(e,t){var n=t.key,r=n.path.canonicalString();e.Do.get(n)||e.So.has(r)||(h("SyncEngine","New document in limbo: "+n),e.So.add(r),Aa(e))}function Aa(e){for(;e.So.size>0&&e.Do.size<e.maxConcurrentLimboResolutions;){var t=e.So.values().next().value;e.So.delete(t);var n=new K(A.fromString(t)),r=e.ko.next();e.Co.set(r,new ha(n)),e.Do=e.Do.insert(n,r),ko(e.remoteStore,new mr(Fe(Ne(n.path)),r,2,s.o))}}function Na(e,t,n){return Object(a.__awaiter)(this,void 0,void 0,(function(){var r,i,o,s;return Object(a.__generator)(this,(function(u){switch(u.label){case 0:return r=y(e),i=[],o=[],s=[],r.Po.isEmpty()?[3,3]:(r.Po.forEach((function(e,a){s.push(r.Oo(a,t,n).then((function(e){if(e){r.isPrimaryClient&&r.sharedCl
2ientState.updateQueryState(a.targetId,e.fromCache?"not-current":"current"),i.push(e);var t=bi.Pn(a.targetId,e);o.push(t)}})))})),[4,Promise.all(s)]);case 1:return u.sent(),r.vo._r(i),[4,function(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,s,u,c,l,f;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:n=y(e),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,n.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(e){return rr.forEach(t,(function(t){return rr.forEach(t.bn,(function(r){return n.persistence.referenceDelegate.addReference(e,t.targetId,r)})).next((function(){return rr.forEach(t.vn,(function(r){return n.persistence.referenceDelegate.removeReference(e,t.targetId,r)}))}))}))}))];case 2:return a.sent(),[3,4];case 3:if(!ur(r=a.sent()))throw r;return h("LocalStore","Failed to update sequence numbers: "+r),[3,4];case 4:for(i=0,o=t;i<o.length;i++)s=o[i],u=s.targetId,s.fromCache||(c=n.Fn.get(u),l=c.snapshotVersion,f=c.withLastLimboFreeSnapshotVersion(l),n.Fn=n.Fn.insert(u,f));return[2]}}))}))}(r.localStore,o)];case 2:u.sent(),u.label=3;case 3:return[2]}}
2))}))}function Pa(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(a.__generator)(this,(function(i){switch(i.label){case 0:return(n=y(e)).currentUser.isEqual(t)?[3,3]:(h("SyncEngine","User change. New user:",t.toKey()),[4,Ei(n.localStore,t)]);case 1:return r=i.sent(),n.currentUser=t,function(e,t){e.Fo.forEach((function(e){e.forEach((function(e){e.reject(new c(u.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),e.Fo.clear()}(n),n.sharedClientState.handleUserChange(t,r.removedBatchIds,r.addedBatchIds),[4,Na(n,r.Ln)];case 2:i.sent(),i.label=3;case 3:return[2]}}))}))}function Ra(e,t){var n=y(e),r=n.Co.get(t);if(r&&r.bo)return Bt().add(r.key);var i=Bt(),o=n.Vo.get(t);if(!o)return i;for(var a=0,s=o;a<s.length;a++){var u=s[a],c=n.Po.get(u);i=i.unionWith(c.view.wo)}return i}function ja(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r,i;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:return[4,Ni((n=y(e)).localStore,t.query,!0)];case 1:return r=o.sent(),i=t.view.Ao(r),[2,(n.isPrimaryClient&&Ca(n,t.targetId,i.To),i)]}}))}))}function Da(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t;return Object(a.__generator)(this,(function(n){return[2,Ri((t=y(e)).localStore).then((function(e){return Na(t,e)}))]}))}))}function Ma(e,t,n,r){return Object(a.__awaiter)(this,void 0,void 0,(function(){var i,o;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:return[4,function(e,t){var n=y(e),r=y(n._n);return n.persistence.runTransaction("Lookup mutation documents","readonly",(function(e){return r.jt(e,t).next((function(t){return t?n.Mn.pn(e,t):rr.resolve(null)}))}))}((i=y(e)).localStore,t)];case 1:return null===(o=a.sent())?[3,6]:"pending"!==n?[3,3]:[4,Do(i.remoteStore)];case 2:return a.sent(),[3,4];case 3:"acknowledged"===n||"rejected"===n?(Ia(i,t,r||null),Sa(i,t),function(e,t){y(y(e)._n).Gt(t)}(i.localStore,t)):v(),a.label=4;case 4:return[4,Na(i,o)];case 5:return a.sent(),[3,7];case 6:h("SyncEngine","Cannot apply mutation batch with id: "+t),a.label=7;case 7:return[2]}}
2))}))}function La(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,s,u,c,l;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:return za(n=y(e)),Ha(n),!0!==t||!0===n.$o?[3,3]:(r=n.sharedClientState.getAllActiveQueryTargets(),[4,Fa(n,r.toArray())]);case 1:return i=a.sent(),n.$o=!0,[4,qo(n.remoteStore,!0)];case 2:for(a.sent(),o=0,s=i;o<s.length;o++)u=s[o],ko(n.remoteStore,u);return[3,7];case 3:return!1!==t||!1===n.$o?[3,7]:(c=[],l=Promise.resolve(),n.Vo.forEach((function(e,t){n.sharedClientState.isLocalQueryTarget(t)?c.push(t):l=l.then((function(){return xa(n,t),Ai(n.localStore,t,!0)})),Eo(n.remoteStore,t)})),[4,l]);case 4:return a.sent(),[4,Fa(n,c)];case 5:return a.sent(),function(e){var t=y(e);t.Co.forEach((function(e,n){Eo(t.remoteStore,n)})),t.No.ts(),t.Co=new Map,t.Do=new Ot(K.comparator)}(n),n.$o=!1,[4,qo(n.remoteStore,!1)];case 6:a.sent(),a.label=7;case 7:return[2]}}))}))}function Fa(e,t,n){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,s,u,c,l,f,h,d,p,g,v;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:n=y(e),r=[],i=[],o=0,s=t,a.label=1;case 1:return o<s.length?(u=s[o],c=void 0,(l=n.Vo.get(u))&&0!==l.length?[4,Oi(n.localStore,Fe(l[0]))]:[3,7]):[3,13];case 2:c=a.sent(),f=0,h=l,a.label=3;case 3:return f<h.length?(d=h[f],p=n.Po.get(d),[4,ja(n,p)]):[3,6];case 4:(g=a.sent()).snapshot&&i.push(g.snapshot),a.label=5;case 5:return f++,[3,3];case 6:return[3,11];case 7:return[4,Pi(n.localStore,u)];case 8:return v=a.sent(),[4,Oi(n.localStore,v)];case 9:return c=a.sent(),[4,ga(n,Ua(v),u,!1)];case 10:a.sent(),a.label=11;case 11:r.push(c),a.label=12;case 12:return o++,[3,1];case 13:return[2,(n.vo._r(i),r)]}}))}))}function Ua(e){return Ae(e.path,e.collectionGroup,e.orderBy,e.filters,e.limit,"F",e.startAt,e.endAt)}function Va(e){var t=y(e);return y(y(t.localStore).persistence).fn()}function Ba(e,t,n,r){return Object(a.__awaiter)(this,void 0,void 0,(function(){var i,o,s;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:return(i=y(e)).$o?(h("SyncEngine","Ignoring unexpected query state notification."),[3,8]):[3,1];case 1:if(!i.Vo.has(t))return[3,8];switch(n){case"current":case"not-current":return[3,2];case"rejected":return[3,5]}return[3,7];case 2:return[4,Ri(i.localStore)];case 3:return o=a.sent(),s=Ht.createSynthesizedRemoteEventForCurrentChange(t,"current"===n),[4,Na(i,o,s)];case 4:return a.sent(),[3,8];case 5:return[4,Ai(i.localStore,t,!0)];case 6:return a.sent(),xa(i,t,r),[3,8];case 7:v(),a.label=8;case 8:return[2]}}
2))}))}function qa(e,t,n){return Object(a.__awaiter)(this,void 0,void 0,(function(){var r,i,o,s,u,c,l,f,d,p;return Object(a.__generator)(this,(function(g){switch(g.label){case 0:if(!(r=za(e)).$o)return[3,10];i=0,o=t,g.label=1;case 1:return i<o.length?(s=o[i],r.Vo.has(s)?(h("SyncEngine","Adding an already active target "+s),[3,5]):[4,Pi(r.localStore,s)]):[3,6];case 2:return u=g.sent(),[4,Oi(r.localStore,u)];case 3:return c=g.sent(),[4,ga(r,Ua(u),c.targetId,!1)];case 4:g.sent(),ko(r.remoteStore,c),g.label=5;case 5:return i++,[3,1];case 6:l=function(e){return Object(a.__generator)(this,(function(t){switch(t.label){case 0:return r.Vo.has(e)?[4,Ai(r.localStore,e,!1).then((function(){Eo(r.remoteStore,e),xa(r,e)})).catch(Qr)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))},f=0,d=n,g.label=7;case 7:return f<d.length?(p=d[f],[5,l(p)]):[3,10];case 8:g.sent(),g.label=9;case 9:return f++,[3,7];case 10:return[2]}}))}))}function za(e){var t=y(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=ya.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=Ra.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=_a.bind(null,t),t.vo._r=ea.bind(null,t.eventManager),t.vo.Mo=ta.bind(null,t.eventManager),t}function Ha(e){var t=y(e);return t.remoteStore.remoteSyncer.applySuccessfulWrite=wa.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=ka.bind(null,t),t}function Ka(e,t,n){var r=y(e);(function(e,t,n){return Object(a.__awaiter)(this,void 0,void 0,(function(){var r,i,o,s,u,c;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,14,,15]),[4,t.getMetadata()];case 1:return r=a.sent(),[4,function(e,t){var n=y(e),r=an(t.createTime);return n.persistence.runTransaction("hasNewerBundle","readonly",(function(e){return n.Qe.getBundleMetadata(e,t.id)})).then((function(e){return!!e&&e.createTime.compareTo(r)>=0}))}(e.localStore,r)];case 2:return a.sent()?[4,t.close()]:[3,4];case 3:return[2,(a.sent(),void n._completeWith(function(e){return{taskState:"Success",documentsLoaded:e.totalDocuments,bytesLoaded:e.totalBytes,totalDocuments:e.totalDocuments,totalBytes:e.totalBytes}}(r)))];case 4:return n._updateProgress(sa(r)),i=new aa(r,e.localStore,t.R),[4,t.Lo()];case 5:o=a.sent(),a.label=6;case 6:return o?[4,i.oo(o)]:[3,10];
2case 7:return(s=a.sent())&&n._updateProgress(s),[4,t.Lo()];case 8:o=a.sent(),a.label=9;case 9:return[3,6];case 10:return[4,i.complete()];case 11:return u=a.sent(),[4,Na(e,u.wn,void 0)];case 12:return a.sent(),[4,function(e,t){var n=y(e);return n.persistence.runTransaction("Save bundle","readwrite",(function(e){return n.Qe.saveBundleMetadata(e,t)}))}(e.localStore,r)];case 13:return a.sent(),n._completeWith(u.progress),[3,15];case 14:return p("SyncEngine","Loading bundle failed with "+(c=a.sent())),n._failWith(c),[3,15];case 15:return[2]}}))}))})(r,t,n).then((function(){r.sharedClientState.notifyBundleLoaded()}))}var Wa=function(){function e(){this.synchronizeTabs=!1}return e.prototype.initialize=function(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(t){switch(t.label){case 0:return this.R=fo(e.databaseInfo.databaseId),this.sharedClientState=this.Bo(e),this.persistence=this.qo(e),[4,this.persistence.start()];case 1:return t.sent(),this.gcScheduler=this.Uo(e),this.localStore=this.Qo(e),[2]}}))}))},e.prototype.Uo=function(e){return null},e.prototype.Qo=function(e){return ki(this.persistence,new _i,e.initialUser,this.R)},e.prototype.qo=function(e){return new Hi(Wi.bs,this.R)},e.prototype.Bo=function(e){return new ro},e.prototype.terminate=function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(e){switch(e.label){case 0:return this.gcScheduler&&this.gcScheduler.stop(),[4,this.sharedClientState.shutdown()];case 1:return e.sent(),[4,this.persistence.shutdown()];case 2:return e.sent(),[2]}}))}))},e}(),Ga=function(e){function t(t,n,r){var i=this;return(i=e.call(this)||this).Ko=t,i.cacheSizeBytes=n,i.forceOwnership=r,i.synchronizeTabs=!1,i}return Object(a.__extends)(t,e),t.prototype.initialize=function(t){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(n){switch(n.label){case 0:return[4,e.prototype.initialize.call(this,t)];case 1:return n.sent(),[4,ji(this.localStore)];case 2:return n.sent(),[4,this.Ko.initialize(this,t)];case 3:return n.sent(),[4,Ha(this.Ko.syncEngine)];case 4:return n.sent(),[4,Do(this.Ko.remoteStore)];case 5:return n.sent(),[2]}}))}))},t.prototype.Qo=function(e){return ki(this.persistence,new _i,e.initialUser,this.R)},t.prototype.Uo=function(e){var t=this.persistence.referenceDelegate.garbageCollector;return new Zr(t,e.asyncQueue)},t.prototype.qo=function(e){var t=vi(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey),n=void 0!==this.cacheSizeBytes?Lr.withCacheSize(this.cacheSizeBytes):Lr.DEFAULT;return new di(this.synchronizeTabs,t,e.clientId,n,e.asyncQueue,co(),lo(),this.R,this.sharedClientState,!!this.forceOwnership)},t.prototype.Bo=function(e){return new ro},t}(Wa),Ya=function(e){function t(t,n){var r=this;return(r=e.call(this,t,n,!1)||this).Ko=t,r.cacheSizeBytes=n,r.synchronizeTabs=!0,r}return Object(a.__extends)(t,e),t.prototype.initialize=function(t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r=this;return Object(a.__generator)(this,(function(i){switch(i.label){case 0:return[4,e.prototype.initialize.call(this,t)];case 1:return i.sent(),n=this.Ko.syncEngine,this.sharedClientState instanceof no?(this.sharedClientState.syncEngine={ui:Ma.bind(null,n),ai:Ba.bind(null,n),hi:qa.bind(null,n),fn:Va.bind(null,n),ci:Da.bind(null,n)},[4,this.sharedClientState.start()]):[3,3];case 2:i.sent(),i.label=3;case 3:return[4,this.persistence.He((function(e){return Object(a.__awaiter)(r,void 0,void 0,(function(){return Object(a.__generator)(this,(function(t){switch(t.label){case 0:return[4,La(this.Ko.syncEngine,e)];case 1:return t.sent(),this.gcScheduler&&(e&&!this.gcScheduler.started?this.gcScheduler.start(this.localStore):e||this.gcScheduler.stop()),[2]}}))}))}))];case 4:return i.sent(),[2]}}))}))},t.prototype.Bo=function(e){var t=co();if(!no.yt(t))throw new c(u.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");var n=vi(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey);return new no(t,e.asyncQueue,n,e.clientId,e.initialUser)},t}(Ga),$a=function(){function e(){}return e.prototype.initialize=function(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n=this;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:return this.localStore?[3,2]:(this.localStore=e.localStore,this.sharedCl
2ientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=function(e){return ba(n.syncEngine,e,1)},this.remoteStore.remoteSyncer.handleCredentialChange=Pa.bind(null,this.syncEngine),[4,qo(this.remoteStore,this.syncEngine.isPrimaryClient)]);case 1:r.sent(),r.label=2;case 2:return[2]}}))}))},e.prototype.createEventManager=function(e){return new Xo},e.prototype.createDatastore=function(e){var t,n=fo(e.databaseInfo.databaseId),r=(t=e.databaseInfo,new uo(t));return function(e,t,n){return new mo(e,t,n)}(e.credentials,r,n)},e.prototype.createRemoteStore=function(e){var t,n,r,i,o,a=this;return t=this.localStore,n=this.datastore,r=e.asyncQueue,i=function(e){return ba(a.syncEngine,e,0)},o=oo.yt()?new oo:new io,new bo(t,n,r,i,o)},e.prototype.createSyncEngine=function(e,t){return function(e,t,n,r,i,o,a){var s=new da(e,t,n,r,i,o);return a&&(s.$o=!0),s}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)},e.prototype.terminate=function(){return function(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t;return Object(a.__generator)(this,(function(n){switch(n.label){case 0:return t=y(e),h("RemoteStore","RemoteStore shutting down."),t.Or.add(5),[4,wo(t)];case 1:return n.sent(),t.Lr.shutdown(),t.Br.set("Unknown"),[2]}}))}))}(this.remoteStore)},e}();function Qa(e,t){void 0===t&&(t=10240);var n=0;return{read:function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){var r;return Object(a.__generator)(this,(function(i){return n<e.byteLength?(r={value:e.slice(n,n+t),done:!1},[2,(n+=t,r)]):[2,{done:!0}]}))}))},cancel:function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(e){return[2]}))}))},releaseLock:function(){},closed:Promise.reject("unimplemented")}}var Xa=function(){function e(e){this.observer=e,this.muted=!1}return e.prototype.next=function(e){this.observer.next&&this.jo(this.observer.next,e)},e.prototype.error=function(e){this.observer.error?this.jo(this.observer.error,e):console.error("Uncaught Error in snapshot listener:",e)},e.prototype.Wo=function(){this.muted=!0},e.prototype.jo=function(e,t){var n=this;this.muted||setTimeout((function(){n.muted||e(t)}),0)},e}(),Ja=function(){function e(e,t){var n=this;this.Go=e,this.R=t,this.metadata=new nr,this.buffer=new Uint8Array,this.zo=new TextDecoder("utf-8"),this.Ho().then((function(e){e&&e.io()?n.metadata.resolve(e.payload.metadata):n.metadata.reject(new Error("The first element of the bundle is not a metadata, it is\n             "+JSON.stringify(null==e?void 0:e.payload)))}),(function(e){return n.metadata.reject(e)}))}return e.prototype.close=function(){return this.Go.cancel()},e.prototype.getMetadata=function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(e){return[2,this.metadata.promise]}))}))},e.prototype.Lo=function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(e){switch(e.label){case 0:return[4,this.getMetadata()];case 1:return[2,(e.sent(),this.Ho())]}}))}))},e.prototype.Ho=function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){var e,t,n,r;return Object(a.__generator)(this,(function(i){switch(i.label){case 0:return[4,this.Jo()];case 1:return null===(e=i.sent())?[2,null]:(t=this.zo.decode(e),n=Number(t),isNaN(n)&&this.Yo("length string ("+t+") is not valid number"),[4,this.Xo(n)]);case 2:return r=i.sent(),[2,new ia(JSON.parse(r),e.length+n)]}}))}))},e.prototype.Zo=function(){return this.buffer.findIndex((function(e){return e==="{".charCodeAt(0)}))},e.prototype.Jo=function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){var e,t;return Object(a.__generator)(this,(function(n){switch(n.label){case 0:return this.Zo()<0?[4,this.tc()]:[3,3];case 1:if(n.sent())return[3,3];n.label=2;case 2:return[3,0];case 3:return 0===this.buffer.length?[2,null]:((e=this.Zo())<0&&this.Yo("Reached the end of bundle when a length string is expected."),t=this.buffer.slice(0,e),[2,(this.buffer=this.buffer.slice(e),t)])}}))}))},e.prototype.Xo=function(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t;return Object(a.__generator)(this,(function(n){switch(n.label){case 0:return this.buffer.length<e?[4,this.tc()]:[3,3];case 1:n.sent()&&this.Yo("Reached the end of bundle when more is expected."),n.label=2;case 2:return[3,0];case 3:return t=this.zo.decode(this.buffer.slice(0,e)),[2,(this.buffer=this.buffer.slice(e),t)]}}))}))},e.prototype.Yo=function(e){throw this.Go.cancel(),new Error("Invalid bundle format: "+e)},e.prototype.tc=function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){var e,t;return Object(a.__generator)(this,(function(n){switch(n.label){case 0:return[4,this.Go.read()];case 1:return(e=n.sent()).done||((t=new Uint8Array(this.buffer.length+e.value.length)).set(this.buffer),t.set(e.value,this.buffer.length),this.buffer=t),[2,e.done]}}))}))},e}(),Za=function(){function e(e){this.datastore=e,this.readVersions=new Map,this.mutations=[],this.committed=!1,this.lastWriteError=null,this.writtenDocs=new Set}return e.prototype.lookup=function(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t,n=this;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:if(this.ensureCommitNotCalled(),this.mutations.length>0)throw new c(u.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");return[4,function(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,s,u;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:return n=y(e),r=dn(n.R)+"/documents",i={documents:t.map((function(e){return cn(n.R,e)}))},[4,n.$i("BatchGetDocuments",r,i)];case 1:return o=a.sent(),s=new Map,o.forEach((function(e){var t=function(e,t){return"found"in t?function(e,t){m(!!t.found),t.found.name,t.found.updateTime;var n=ln(e,t.found.name),r=an(t.found.updateTime),i=new ae({mapValue:{fields:t.found.fields}});return ue.newFoundDocument(n,r,i)}(e,t):"missing"in t?function(e,t){m(!!t.missing),m(!!t.readTime);var n=ln(e,t.missing),r=an(t.readTime);return ue.newNoDocument(n,r)}(e,t):v()}(n.R,e);s.set(t.key.toString(),t)})),u=[],[2,(t.forEach((function(e){var t=s.get(e.toString());m(!!t),u.push(t)})),u)]}}))}))}(this.datastore,e)];
2case 1:return[2,((t=r.sent()).forEach((function(e){return n.recordVersion(e)})),t)]}}))}))},e.prototype.set=function(e,t){this.write(t.toMutation(e,this.precondition(e))),this.writtenDocs.add(e.toString())},e.prototype.update=function(e,t){try{this.write(t.toMutation(e,this.preconditionForUpdate(e)))}catch(e){this.lastWriteError=e}this.writtenDocs.add(e.toString())},e.prototype.delete=function(e){this.write(new St(e,this.precondition(e))),this.writtenDocs.add(e.toString())},e.prototype.commit=function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){var e,t=this;return Object(a.__generator)(this,(function(n){switch(n.label){case 0:if(this.ensureCommitNotCalled(),this.lastWriteError)throw this.lastWriteError;return e=this.readVersions,this.mutations.forEach((function(t){e.delete(t.key.toString())})),e.forEach((function(e,n){var r=K.fromPath(n);t.mutations.push(new It(r,t.precondition(r)))})),[4,function(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r,i;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:return n=y(e),r=dn(n.R)+"/documents",i={writes:t.map((function(e){return mn(n.R,e)}))},[4,n.Ni("Commit",r,i)];case 1:return o.sent(),[2]}}))}))}(this.datastore,this.mutations)];case 1:return n.sent(),this.committed=!0,[2]}}))}))},e.prototype.recordVersion=function(e){var t;if(e.isFoundDocument())t=e.version;else{if(!e.isNoDocument())throw v();t=I.min()}var n=this.readVersions.get(e.key.toString());if(n){if(!t.isEqual(n))throw new c(u.ABORTED,"Document version changed between two reads.")}else this.readVersions.set(e.key.toString(),t)},e.prototype.precondition=function(e){var t=this.readVersions.get(e.toString());return!this.writtenDocs.has(e.toString())&&t?ct.updateTime(t):ct.none()},e.prototype.preconditionForUpdate=function(e){var t=this.readVersions.get(e.toString());if(!this.writtenDocs.has(e.toString())&&t){if(t.isEqual(I.min()))throw new c(u.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return ct.updateTime(t)}return ct.exists(!0)},e.prototype.write=function(e){this.ensureCommitNotCalled(),this.mutations.push(e)},e.prototype.ensureCommitNotCalled=function(){},e}(),es=function(){function e(e,t,n,r){this.asyncQueue=e,this.datastore=t,this.updateFunction=n,this.deferred=r,this.ec=5,this.Zi=new ho(this.asyncQueue,"transaction_retry")}return e.prototype.run=function(){this.nc()},e.prototype.nc=function(){var e=this;this.Zi.ji((function(){return Object(a.__awaiter)(e,void 0,void 0,(function(){var e,t,n=this;return Object(a.__generator)(this,(function(r){return e=new Za(this.datastore),(t=this.sc(e))&&t.then((function(t){n.asyncQueue.enqueueAndForget((function(){return e.commit().then((function(){n.deferred.resolve(t)})).catch((function(e){n.ic(e)}))}))})).catch((function(e){n.ic(e)})),[2]}))}))}))},e.prototype.sc=function(e){try{var t=this.updateFunction(e);return!q(t)&&t.catch&&t.then?t:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(e){return this.deferred.reject(e),null}},e.prototype.ic=function(e){var t=this;this.ec>0&&this.rc(e)?(this.ec-=1,this.asyncQueue.enqueueAndForget((function(){return t.nc(),Promise.resolve()}))):this.deferred.reject(e)},e.prototype.rc=function(e){if("FirebaseError"===e.name){var t=e.code;return"aborted"===t||"failed-precondition"===t||!Tt(t)}return!1},e}(),ts=function(){function e(e,t,n){var r=this;this.credentials=e,this.asyncQueue=t,this.databaseInfo=n,this.user=Gi.UNAUTHENTICATED,this.clientId=_.u(),this.credentialListener=function(){return Promise.resolve()},this.credentials.setChangeListener(t,(function(e){return Object(a.__awaiter)(r,void 0,void 0,(function(){return Object(a.__generator)(this,(function(t){switch(t.label){case 0:return h("FirestoreClient","Received user=",e.uid),[4,this.credentialListener(e)];case 1:return t.sent(),this.user=e,[2]}}))}))}))}return e.prototype.getConfiguration=function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(e){return[2,{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,credentials:this.credentials,initialUser:this.user,maxConcurrentLimboResolutions:100}]}))}))},e.prototype.setCredentialChangeListener=function(e){this.credentialListener=e},e.prototype.verifyNotTerminated=function(){if(this.asyncQueue.isShuttingDown)throw new c(u.FAILED_PRECONDITION,"The client has already been terminated.")},e.prototype.terminate=function(){var e=this;this.asyncQueue.enterRestrictedMode();var t=new nr;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((function(){return Object(a.__awaiter)(e,void 0,void 0,(function(){var e,n;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,5,,6]),this.onlineComponents?[4,this.onlineComponents.terminate()]:[3,2];case 1:r.sent(),r.label=2;case 2:return this.offlineComponents?[4,this.offlineComponents.terminate()]:[3,4];case 3:r.sent(),r.label=4;case 4:return this.credentials.removeChangeListener(),t.resolve(),[3,6];case 5:return e=r.sent(),n=Wo(e,"Failed to shutdown persistence"),t.reject(n),[3,6];case 6:return[2]}}
2))}))})),t.promise},e}();function ns(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r,i=this;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:return e.asyncQueue.verifyOperationInProgress(),h("FirestoreClient","Initializing OfflineComponentProvider"),[4,e.getConfiguration()];case 1:return n=o.sent(),[4,t.initialize(n)];case 2:return o.sent(),r=n.initialUser,e.setCredentialChangeListener((function(e){return Object(a.__awaiter)(i,void 0,void 0,(function(){return Object(a.__generator)(this,(function(n){switch(n.label){case 0:return r.isEqual(e)?[3,2]:[4,Ei(t.localStore,e)];case 1:n.sent(),r=e,n.label=2;case 2:return[2]}}))}))})),t.persistence.setDatabaseDeletedListener((function(){return e.terminate()})),e.offlineComponents=t,[2]}}))}))}function rs(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(a.__generator)(this,(function(i){switch(i.label){case 0:return e.asyncQueue.verifyOperationInProgress(),[4,is(e)];case 1:return n=i.sent(),h("FirestoreClient","Initializing OnlineComponentProvider"),[4,e.getConfiguration()];case 2:return r=i.sent(),[4,t.initialize(n,r)];case 3:return i.sent(),e.setCredentialChangeListener((function(e){return function(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(a.__generator)(this,(function(i){switch(i.label){case 0:return(n=y(e)).asyncQueue.verifyOperationInProgress(),h("RemoteStore","RemoteStore received new credentials"),r=Co(n),n.Or.add(3),[4,wo(n)];case 1:return i.sent(),r&&n.Br.set("Unknown"),[4,n.remoteSyncer.handleCredentialChange(t)];case 2:return i.sent(),n.Or.delete(3),[4,_o(n)];case 3:return i.sent(),[2]}}))}))}(t.remoteStore,e)})),e.onlineComponents=t,[2]}}))}))}function is(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(t){switch(t.label){case 0:return e.offlineComponents?[3,2]:(h("FirestoreClient","Using default OfflineComponentProvider"),[4,ns(e,new Wa)]);case 1:t.sent(),t.label=2;case 2:return[2,e.offlineComponents]}}))}))}function os(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){return Object(a.__generator)(this,(function(t){switch(t.label){case 0:return e.onlineComponents?[3,2]:(h("FirestoreClient","Using default OnlineComponentProvider"),[4,rs(e,new $a)]);case 1:t.sent(),t.label=2;case 2:return[2,e.onlineComponents]}}))}))}function as(e){return is(e).then((function(e){return e.persistence}))}function ss(e){return is(e).then((function(e){return e.localStore}))}function us(e){return os(e).then((function(e){return e.remoteStore}))}function cs(e){return os(e).then((function(e){return e.syncEngine}))}function ls(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t,n;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:return[4,os(e)];case 1:return t=r.sent(),[2,((n=t.eventManager).onListen=pa.bind(null,t.syncEngine),n.onUnlisten=va.bind(null,t.syncEngine),n)]}}))}))}function fs(e,t,n){var r=this;void 0===n&&(n={});var i=new nr;return e.asyncQueue.enqueueAndForget((function(){return Object(a.__awaiter)(r,void 0,void 0,(function(){var r;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:return r=function(e,t,n,r,i){var o=new Xa({next:function(o){t.enqueueAndForget((function(){return Zo(e,a)}));var s=o.docs.has(n);!s&&o.fromCache?i.reject(new c(u.UNAVAILABLE,"Failed to get document because the client is offline.")):s&&o.fromCache&&r&&"server"===r.source?i.reject(new c(u.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.)')):i.resolve(o)},error:function(e){return i.reject(e)}}),a=new ra(Ne(n.path),o,{includeMetadataChanges:!0,so:!0});return Jo(e,a)},[4,ls(e)];case 1:return[2,r.apply(void 0,[o.sent(),e.asyncQueue,t,n,i])]}}))}))})),i.promise}function hs(e,t,n){var r=this;void 0===n&&(n={});var i=new nr;return e.asyncQueue.enqueueAndForget((function(){return Object(a.__awaiter)(r,void 0,void 0,(function(){var r;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:return r=function(e,t,n,r,i){var o=new Xa({next:function(n){t.enqueueAndForget((function(){return Zo(e,a)})),n.fromCache&&"server"===r.source?i.reject(new c(u.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.)')):i.resolve(n)},error:function(e){return i.reject(e)}}),a=new ra(n,o,{includeMetadataChanges:!0,so:!0});return Jo(e,a)},[4,ls(e)];case 1:return[2,r.apply(void 0,[o.sent(),e.asyncQueue,t,n,i])]}}))}))})),i.promise}var ds=function(e,t,n,r,i,o,a,s){this.databaseId=e,this.appId=t,this.persistenceKey=n,this.host=r,this.ssl=i,this.forceLongPolling=o,this.autoDetectLongPolling=a,this.useFetchStreams=s},ps=function(){function e(e,t){this.projectId=e,this.database=t||"(default)"}return Object.defineProperty(e.prototype,"isDefaultDatabase",{get:function(){return"(default)"===this.database}
2,enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database},e}(),gs=new Map,vs=function(e,t){this.user=t,this.type="OAuth",this.authHeaders={},this.authHeaders.Authorization="Bearer "+e},ms=function(){function e(){this.changeListener=null}return e.prototype.getToken=function(){return Promise.resolve(null)},e.prototype.invalidateToken=function(){},e.prototype.setChangeListener=function(e,t){this.changeListener=t,e.enqueueRetryable((function(){return t(Gi.UNAUTHENTICATED)}))},e.prototype.removeChangeListener=function(){this.changeListener=null},e}(),ys=function(){function e(e){this.token=e,this.changeListener=null}return e.prototype.getToken=function(){return Promise.resolve(this.token)},e.prototype.invalidateToken=function(){},e.prototype.setChangeListener=function(e,t){var n=this;this.changeListener=t,e.enqueueRetryable((function(){return t(n.token.user)}))},e.prototype.removeChangeListener=function(){this.changeListener=null},e}(),bs=function(){function e(e){var t=this;this.currentUser=Gi.UNAUTHENTICATED,this.oc=new nr,this.cc=0,this.forceRefresh=!1,this.auth=null,this.asyncQueue=null,this.uc=function(){t.cc++,t.currentUser=t.ac(),t.oc.resolve(),t.changeListener&&t.asyncQueue.enqueueRetryable((function(){return t.changeListener(t.currentUser)}))};var n=function(e){h("FirebaseCredentialsProvider","Auth detected"),t.auth=e,t.auth.addAuthTokenListener(t.uc)};e.onInit((function(e){return n(e)})),setTimeout((function(){if(!t.auth){var r=e.getImmediate({optional:!0});r?n(r):(h("FirebaseCredentialsProvider","Auth not yet detected"),t.oc.resolve())}}),0)}return e.prototype.getToken=function(){var e=this,t=this.cc,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((function(n){return e.cc!==t?(h("FirebaseCredentialsProvider","getToken aborted due to token change."),e.getToken()):n?(m("string"==typeof n.accessToken),new vs(n.accessToken,e.currentUser)):null})):Promise.resolve(null)},e.prototype.invalidateToken=function(){this.forceRefresh=!0},e.prototype.setChangeListener=function(e,t){var n=this;this.asyncQueue=e,this.asyncQueue.enqueueRetryable((function(){return Object(a.__awaiter)(n,void 0,void 0,(function(){return Object(a.__generator)(this,(function(e){switch(e.label){case 0:return[4,this.oc.promise];case 1:return e.sent(),[4,t(this.currentUser)];case 2:return e.sent(),this.changeListener=t,[2]}}))}))}))},e.prototype.removeChangeListener=function(){this.auth&&this.auth.removeAuthTokenListener(this.uc),this.changeListener=function(){return Promise.resolve()}},e.prototype.ac=function(){var e=this.auth&&this.auth.getUid();return m(null===e||"string"==typeof e),new Gi(e)},e}(),_s=function(){function e(e,t,n){this.hc=e,this.lc=t,this.fc=n,this.type="FirstParty",this.user=Gi.FIRST_PARTY}return Object.defineProperty(e.prototype,"authHeaders",{get:function(){var e={"X-Goog-AuthUser":this.lc},t=this.hc.auth.getAuthHeaderValueForFirstParty([]);return t&&(e.Authorization=t),this.fc&&(e["X-Goog-Iam-Authorization-Token"]=this.fc),e},enumerable:!1,configurable:!0}),e}(),ws=function(){function e(e,t,n){this.hc=e,this.lc=t,this.fc=n}return e.prototype.getToken=function(){return Promise.resolve(new _s(this.hc,this.lc,this.fc))},e.prototype.setChangeListener=function(e,t){e.enqueueRetryable((function(){return t(Gi.FIRST_PARTY)}))},e.prototype.removeChangeListener=function(){},e.prototype.invalidateToken=function(){},e}();function ks(e,t,n){if(!n)throw new c(u.INVALID_ARGUMENT,"Function "+e+"() cannot be called with an empty "+t+".")}function Es(e,t){if(void 0===t)return{merge:!1};if(void 0!==t.mergeFields&&void 0!==t.merge)throw new c(u.INVALID_ARGUMENT,"Invalid options passed to function "+e+'(): You cannot specify both "merge" and "mergeFields".');return t}function Ss(e,t,n,r){if(!0===t&&!0===r)throw new c(u.INVALID_ARGUMENT,e+" and "+n+" cannot be used together.")}function Is(e){if(!K.isDocumentKey(e))throw new c(u.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+e+" has "+e.length+".")}function xs(e){if(K.isDocumentKey(e))throw new c(u.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+e+" has "+e.length+".")}function Ts(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=e.substring(0,20)+"..."),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";var t=function(e){if(e.constructor){var t=/function\s+([^\s(]+)\s*\(/.exec(e.constructor.toString());if(t&&t.length>1)return t[1]}return null}(e);return t?"a custom "+t+" object":"an object"}return"function"==typeof e?"a function":v()}function Cs(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new c(u.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var n=Ts(e);throw new c(u.INVALID_ARGUMENT,"Expected type '"+t.name+"', but it was: "+n)}return e}function Os(e,t){if(t<=0)throw new c(u.INVALID_ARGUMENT,"Function "+e+"() requires a positive number, but it was: "+t+".")}var As=function(){function e(e){var t;if(void 0===e.host){if(void 0!==e.ssl)throw new c(u.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=null===(t=e.ssl)||void 0===t||t;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new c(u.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.useFetchStreams=!!e.useFetchStreams,Ss("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling)}return e.prototype.isEqual=function(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams},e}(),Ns=function(){function e(e,t){this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new As({}),this._settingsFrozen=!1,e instanceof ps?(this._databaseId=e,this._credentials=new ms):(this._app=e,this._databaseId=function(e){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new c(u.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new ps(e.options.projectId)}(e),this._credentials=new bs(t))}return Object.defineProperty(e.prototype,"app",{get:function(){if(!this._app)throw new c(u.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_initialized",{get:function(){return this._settingsFrozen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_terminated",{get:function(){return void 0!==this._terminateTask},enumerable:!1,configurable:!0}),e.prototype._setSettings=function(e){if(this._settingsFrozen)throw new c(u.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new As(e),void 0!==e.credentials&&(this._credentials=function(e){if(!e)return new ms;switch(e.type){case"gapi":var t=e.client;return m(!("object"!=typeof t||null===t||!t.auth||!t.auth.getAuthHeaderValueForFirstParty)),new ws(t,e.sessionIndex||"0",e.iamToken||null);case"provider":return e.client;default:throw new c(u.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(e.credentials))},e.prototype._getSettings=function(){return this._settings},e.prototype._freezeSettings=function(){return this._settingsFrozen=!0,this._settings},e.prototype._delete=function(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask},e.prototype.toJSON=function(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}},e.prototype._terminate=function(){return this,(e=gs.get(this))&&(h("ComponentProvider","Removing Datastore"),gs.delete(this),e.terminate()),Promise.resolve();var e},e}(),Ps=function(){function e(e,t,n){this.converter=t,this._key=n,this.type="document",this.firestore=e}return Object.defineProperty(e.prototype,"_path",{get:function(){return this._key.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._key.path.canonicalString()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return new js(this.firestore,this.converter,this._key.path.popLast())},enumerable:!1,configurable:!0}),e.prototype.withConverter=function(t){return new e(this.firestore,t,this._key)},e}(),Rs=function(){function e(e,t,n){this.converter=t,this._query=n,this.type="query",this.firestore=e}return e.prototype.withConverter=function(t){return new e(this.firestore,t,this._query)},e}(),js=function(e){function t(t,n,r){var i=this;return(i=e.call(this,t,n,Ne(r))||this)._path=r,i.type="collection",i}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._query.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this._query.path.canonicalString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=this._path.popLast();return e.isEmpty()?null:new Ps(this.firestore,null,new K(e))},enumerable:!1,configurable:!0}),t.prototype.withConverter=function(e){return new t(this.firestore,e,this._path)},t}(Rs);function Ds(e,t){for(var n,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];if(e=Object(r.getModularInstance)(e),ks("collection","path",t),e instanceof Ns)return xs(n=A.fromString.apply(A,Object(a.__spreadArray)([t],i))),new js(e,null,n);if(!(e instanceof Ps||e instanceof js))throw new c(u.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");return xs(n=A.fromString.apply(A,Object(a.__spreadArray)([e.path],i)).child(A.fromString(t))),new js(e.firestore,null,n)}function Ms(e,t){for(var n,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];if(e=Object(r.getModularInstance)(e),1===arguments.length&&(t=_.u()),ks("doc","path",t),e instanceof Ns)return Is(n=A.fromString.apply(A,Object(a.__spreadArray)([t],i))),new Ps(e,null,new K(n));if(!(e instanceof Ps||e instanceof js))throw new c(u.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");return Is(n=e._path.child(A.fromString.apply(A,Object(a.__spreadArray)([t],i)))),new Ps(e.firestore,e instanceof js?e.converter:null,new K(n))}function Ls(e,t){return e=Object(r.getModularInstance)(e),t=Object(r.getModularInstance)(t),(e instanceof Ps||e instanceof js)&&(t instanceof Ps||t instanceof js)&&e.firestore===t.firestore&&e.path===t.path&&e.converter===t.converter}function Fs(e,t){return e=Object(r.getModularInstance)(e),t=Object(r.getModularInstance)(t),e instanceof Rs&&t instanceof Rs&&e.firestore===t.firestore&&Ve(e._query,t._query)&&e.converter===t.converter}var Us=function(){function e(){var e=this;
2this.dc=Promise.resolve(),this.wc=[],this._c=!1,this.mc=[],this.yc=null,this.gc=!1,this.Ec=[],this.Zi=new ho(this,"async_queue_retry"),this.Tc=function(){var t=lo();t&&h("AsyncQueue","Visibility state changed to "+t.visibilityState),e.Zi.Gi()};var t=lo();t&&"function"==typeof t.addEventListener&&t.addEventListener("visibilitychange",this.Tc)}return Object.defineProperty(e.prototype,"isShuttingDown",{get:function(){return this._c},enumerable:!1,configurable:!0}),e.prototype.enqueueAndForget=function(e){this.enqueue(e)},e.prototype.enqueueAndForgetEvenWhileRestricted=function(e){this.Ic(),this.Ac(e)},e.prototype.enterRestrictedMode=function(){if(!this._c){this._c=!0;var e=lo();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("visibilitychange",this.Tc)}},e.prototype.enqueue=function(e){return this.Ic(),this._c?new Promise((function(e){})):this.Ac(e)},e.prototype.enqueueRetryable=function(e){var t=this;this.enqueueAndForget((function(){return t.wc.push(e),t.Rc()}))},e.prototype.Rc=function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){var e,t=this;return Object(a.__generator)(this,(function(n){switch(n.label){case 0:if(0===this.wc.length)return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.wc[0]()];case 2:return n.sent(),this.wc.shift(),this.Zi.reset(),[3,4];case 3:if(!ur(e=n.sent()))throw e;return h("AsyncQueue","Operation failed with retryable error: "+e),[3,4];case 4:this.wc.length>0&&this.Zi.ji((function(){return t.Rc()})),n.label=5;case 5:return[2]}}
2))}))},e.prototype.Ac=function(e){var t=this,n=this.dc.then((function(){return t.gc=!0,e().catch((function(e){throw t.yc=e,t.gc=!1,d("INTERNAL UNHANDLED ERROR: ",function(e){var t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t}(e)),e})).then((function(e){return t.gc=!1,e}))}));return this.dc=n,n},e.prototype.enqueueAfterDelay=function(e,t,n){var r=this;this.Ic(),this.Ec.indexOf(e)>-1&&(t=0);var i=Ko.createAndSchedule(this,e,t,n,(function(e){return r.bc(e)}));return this.mc.push(i),i},e.prototype.Ic=function(){this.yc&&v()},e.prototype.verifyOperationInProgress=function(){},e.prototype.vc=function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){var e;return Object(a.__generator)(this,(function(t){switch(t.label){case 0:return[4,e=this.dc];case 1:t.sent(),t.label=2;case 2:if(e!==this.dc)return[3,0];t.label=3;case 3:return[2]}}))}))},e.prototype.Pc=function(e){for(var t=0,n=this.mc;t<n.length;t++)if(n[t].timerId===e)return!0;return!1},e.prototype.Vc=function(e){var t=this;return this.vc().then((function(){t.mc.sort((function(e,t){return e.targetTimeMs-t.targetTimeMs}));for(var n=0,r=t.mc;n<r.length;n++){var i=r[n];if(i.skipDelay(),"all"!==e&&i.timerId===e)break}return t.vc()}))},e.prototype.Sc=function(e){this.Ec.push(e)},e.prototype.bc=function(e){var t=this.mc.indexOf(e);this.mc.splice(t,1)},e}();function Vs(e){return function(e,t){if("object"!=typeof e||null===e)return!1;for(var n=e,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}(e)}var Bs=function(){function e(){this._progressObserver={},this._taskCompletionResolver=new nr,this._lastProgress={taskState:"Running",totalBytes:0,totalDocuments:0,bytesLoaded:0,documentsLoaded:0}}return e.prototype.onProgress=function(e,t,n){this._progressObserver={next:e,error:t,complete:n}},e.prototype.catch=function(e){return this._taskCompletionResolver.promise.catch(e)},e.prototype.then=function(e,t){return this._taskCompletionResolver.promise.then(e,t)},e.prototype._completeWith=function(e){this._updateProgress(e),this._progressObserver.complete&&this._progressObserver.complete(),this._taskCompletionResolver.resolve(e)},e.prototype._failWith=function(e){this._lastProgress.taskState="Error",this._progressObserver.next&&this._progressObserver.next(this._lastProgress),this._progressObserver.error&&this._progressObserver.error(e),this._taskCompletionResolver.reject(e)},e.prototype._updateProgress=function(e){this._lastProgress=e,this._progressObserver.next&&this._progressObserver.next(e)},e}(),qs=-1,zs=function(e){function t(t,n){var r=this;return(r=e.call(this,t,n)||this).type="firestore",r._queue=new Us,r._persistenceKey="name"in t?t.name:"[DEFAULT]",r}return Object(a.__extends)(t,e),t.prototype._terminate=function(){return this._firestoreClient||Ks(this),this._firestoreClient.terminate()},t}(Ns);function Hs(e){return e._firestoreClient||Ks(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function Ks(e){var t,n=e._freezeSettings(),r=function(e,t,n,r){return new ds(e,t,n,r.host,r.ssl,r.experimentalForceLongPolling,r.experimentalAutoDetectLongPolling,r.useFetchStreams)}(e._databaseId,(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",e._persistenceKey,n);e._firestoreClient=new ts(e._credentials,e._queue,r)}function Ws(e,t,n){var r=this,i=new nr;return e.asyncQueue.enqueue((function(){return Object(a.__awaiter)(r,void 0,void 0,(function(){var r;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,ns(e,n)];case 1:return o.sent(),[4,rs(e,t)];case 2:return o.sent(),i.resolve(),[3,4];case 3:if(!function(e){return"FirebaseError"===e.name?e.code===u.FAILED_PRECONDITION||e.code===u.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&e instanceof DOMException)||22===e.code||20===e.code||11===e.code}(r=o.sent()))throw r;return console.warn("Error enabling offline persistence. Falling back to persistence disabled: "+r),i.reject(r),[3,4];case 4:return[2]}}
2))}))})).then((function(){return i.promise}))}function Gs(e){if(e._initialized||e._terminated)throw new c(u.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.")}var Ys=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0;n<e.length;++n)if(0===e[n].length)throw new c(u.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new P(e)}return e.prototype.isEqual=function(e){return this._internalPath.isEqual(e._internalPath)},e}(),$s=function(){function e(e){this._byteString=e}return e.fromBase64String=function(t){try{return new e(j.fromBase64String(t))}catch(t){throw new c(u.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}},e.fromUint8Array=function(t){return new e(j.fromUint8Array(t))},e.prototype.toBase64=function(){return this._byteString.toBase64()},e.prototype.toUint8Array=function(){return this._byteString.toUint8Array()},e.prototype.toString=function(){return"Bytes(base64: "+this.toBase64()+")"},e.prototype.isEqual=function(e){return this._byteString.isEqual(e._byteString)},e}(),Qs=function(e){this._methodName=e},Xs=function(){function e(e,t){if(!isFinite(e)||e<-90||e>90)throw new c(u.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new c(u.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}return Object.defineProperty(e.prototype,"latitude",{get:function(){return this._lat},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"longitude",{get:function(){return this._long},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(e){return this._lat===e._lat&&this._long===e._long},e.prototype.toJSON=function(){return{latitude:this._lat,longitude:this._long}},e.prototype._compareTo=function(e){return w(this._lat,e._lat)||w(this._long,e._long)},e}(),Js=/^__.*__$/,Zs=function(){function e(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}return e.prototype.toMutation=function(e,t){return null!==this.fieldMask?new yt(e,this.data,this.fieldMask,t,this.fieldTransforms):new mt(e,this.data,t,this.fieldTransforms)},e}(),eu=function(){function e(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}return e.prototype.toMutation=function(e,t){return new yt(e,this.data,this.fieldMask,t,this.fieldTransforms)},e}();function tu(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw v()}}var nu=function(){function e(e,t,n,r,i,o){this.settings=e,this.databaseId=t,this.R=n,this.ignoreUndefinedProperties=r,void 0===i&&this.Dc(),this.fieldTransforms=i||[],this.fieldMask=o||[]}return Object.defineProperty(e.prototype,"path",{get:function(){return this.settings.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Cc",{get:function(){return this.settings.Cc},enumerable:!1,configurable:!0}),e.prototype.Nc=function(t){return new e(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.R,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)},e.prototype.xc=function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.Nc({path:n,Fc:!1});return r.kc(e),r},e.prototype.$c=function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.Nc({path:n,Fc:!1});return r.Dc(),r},e.prototype.Oc=function(e){return this.Nc({path:void 0,Fc:!0})},e.prototype.Mc=function(e){return ku(e,this.settings.methodName,this.settings.Lc||!1,this.path,this.settings.Bc)},e.prototype.contains=function(e){return void 0!==this.fieldMask.find((function(t){return e.isPrefixOf(t)}))||void 0!==this.fieldTransforms.find((function(t){return e.isPrefixOf(t.field)}))},e.prototype.Dc=function(){if(this.path)for(var e=0;e<this.path.length;e++)this.kc(this.path.get(e))},e.prototype.kc=function(e){if(0===e.length)throw this.Mc("Document fields must not be empty");if(tu(this.Cc)&&Js.test(e))throw this.Mc('Document fields cannot begin and end with "__"')},e}(),ru=function(){function e(e,t,n){this.databaseId=e,this.ignoreUndefinedProperties=t,this.R=n||fo(e)}return e.prototype.qc=function(e,t,n,r){return void 0===r&&(r=!1),new nu({Cc:e,methodName:t,Bc:n,path:P.emptyPath(),Fc:!1,Lc:r},this.databaseId,this.R,this.ignoreUndefinedProperties)},e}();function iu(e){var t=e._freezeSettings(),n=fo(e._databaseId);return new ru(e._databaseId,!!t.ignoreUndefinedProperties,n)}function ou(e,t,n,r,i,o){void 0===o&&(o={});var a=e.qc(o.merge||o.mergeFields?2:0,t,n,i);yu("Data must be an object, but it was:",a,r);var s,l,f=vu(r,a);if(o.merge)s=new R(a.fieldMask),l=a.fieldTransforms;else if(o.mergeFields){for(var h=[],d=0,p=o.mergeFields;d<p.length;d++){var g=bu(t,p[d],n);if(!a.contains(g))throw new c(u.INVALID_ARGUMENT,"Field '"+g+"' is specified in your field mask but missing from your input data.");Eu(h,g)||h.push(g)}s=new R(h),l=a.fieldTransforms.filter((function(e){return s.covers(e.field)}))}else s=null,l=a.fieldTransforms;return new Zs(new ae(f),s,l)}var au=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.prototype._toFieldTransform=function(e){if(2!==e.Cc)throw 1===e.Cc?e.Mc(this._methodName+"() can only appear at the top level of your update data"):e.Mc(this._methodName+"() cannot be used with set() unless you pass {merge:true}");return e.fieldMask.push(e.path),null},t.prototype.isEqual=function(e){return e instanceof t},t}(Qs);function su(e,t,n){return new nu({Cc:3,Bc:t.settings.Bc,methodName:e._methodName,Fc:n},t.databaseId,t.R,t.ignoreUndefinedProperties)}var uu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.prototype._toFieldTransform=function(e){return new st(e.path,new Ze)},t.prototype.isEqual=function(e){return e instanceof t},t}(Qs),cu=function(e){function t(t,n){var r=this;return(r=e.call(this,t)||this).Uc=n,r}return Object(a.__extends)(t,e),t.prototype._toFieldTransform=function(e){var t=su(this,e,!0),n=this.Uc.map((function(e){return gu(e,t)})),r=new et(n);return new st(e.path,r)},t.prototype.isEqual=function(e){return this===e},t}(Qs),lu=function(e){function t(t,n){var r=this;return(r=e.call(this,t)||this).Uc=n,r}return Object(a.__extends)(t,e),t.prototype._toFieldTransform=function(e){var t=su(this,e,!0),n=this.Uc.map((function(e){return gu(e,t)})),r=new nt(n);return new st(e.path,r)},t.prototype.isEqual=function(e){return this===e},t}(Qs),fu=function(e){function t(t,n){var r=this;return(r=e.call(this,t)||this).Qc=n,r}return Object(a.__extends)(t,e),t.prototype._toFieldTransform=function(e){var t=new it(e.R,Ye(e.R,this.Qc));return new st(e.path,t)},t.prototype.isEqual=function(e){return this===e},t}(Qs);function hu(e,t,n,i){var o=e.qc(1,t,n);yu("Data must be an object, but it was:",o,i);var a=[],s=ae.empty();T(i,(function(e,i){var u=wu(t,e,n);i=Object(r.getModularInstance)(i);var c=o.$c(u);if(i instanceof au)a.push(u);else{var l=gu(i,c);null!=l&&(a.push(u),s.set(u,l))}}));var u=new R(a);return new eu(s,u,o.fieldTransforms)}function du(e,t,n,i,o,a){var s=e.qc(1,t,n),l=[bu(t,i,n)],f=[o];if(a.length%2!=0)throw new c(u.INVALID_ARGUMENT,"Function "+t+"() needs to be called with an even number of arguments that alternate between field names and values.");for(var h=0;h<a.length;
2h+=2)l.push(bu(t,a[h])),f.push(a[h+1]);for(var d=[],p=ae.empty(),g=l.length-1;g>=0;--g)if(!Eu(d,l[g])){var v=l[g],m=f[g];m=Object(r.getModularInstance)(m);var y=s.$c(v);if(m instanceof au)d.push(v);else{var b=gu(m,y);null!=b&&(d.push(v),p.set(v,b))}}var _=new R(d);return new eu(p,_,s.fieldTransforms)}function pu(e,t,n,r){return void 0===r&&(r=!1),gu(n,e.qc(r?4:3,t))}function gu(e,t){if(mu(e=Object(r.getModularInstance)(e)))return yu("Unsupported field value:",t,e),vu(e,t);if(e instanceof Qs)return function(e,t){if(!tu(t.Cc))throw t.Mc(e._methodName+"() can only be used with update() and set()");if(!t.path)throw t.Mc(e._methodName+"() is not currently supported inside arrays");var n=e._toFieldTransform(t);n&&t.fieldTransforms.push(n)}(e,t),null;if(void 0===e&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.settings.Fc&&4!==t.Cc)throw t.Mc("Nested arrays are not supported");return function(e,t){for(var n=[],r=0,i=0,o=e;i<o.length;i++){var a=gu(o[i],t.Oc(r));null==a&&(a={nullValue:"NULL_VALUE"}),n.push(a),r++}return{arrayValue:{values:n}}}(e,t)}return function(e,t){if(null===(e=Object(r.getModularInstance)(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return Ye(t.R,e);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){var n=S.fromDate(e);return{timestampValue:nn(t.R,n)}}if(e instanceof S)return n=new S(e.seconds,1e3*Math.floor(e.nanoseconds/1e3)),{timestampValue:nn(t.R,n)};if(e instanceof Xs)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof $s)return{bytesValue:rn(t.R,e._byteString)};if(e instanceof Ps){n=t.databaseId;var i=e.firestore._databaseId;if(!i.isEqual(n))throw t.Mc("Document reference is for database "+i.projectId+"/"+i.database+" but should be for database "+n.projectId+"/"+n.database);return{referenceValue:sn(e.firestore._databaseId||t.databaseId,e._key.path)}}throw t.Mc("Unsupported field value: "+Ts(e))}(e,t)}function vu(e,t){var n={};return C(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):T(e,(function(e,r){var i=gu(r,t.xc(e));null!=i&&(n[e]=i)})),{mapValue:{fields:n}}}function mu(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof S||e instanceof Xs||e instanceof $s||e instanceof Ps||e instanceof Qs)}function yu(e,t,n){if(!mu(n)||!function(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}(n)){var r=Ts(n);throw"an object"===r?t.Mc(e+" a custom object"):t.Mc(e+" "+r)}}function bu(e,t,n){if((t=Object(r.getModularInstance)(t))instanceof Ys)return t._internalPath;if("string"==typeof t)return wu(e,t);throw ku("Field path arguments must be of type string or FieldPath.",e,!1,void 0,n)}var _u=new RegExp("[~\\*/\\[\\]]");function wu(e,t,n){if(t.search(_u)>=0)throw ku("Invalid field path ("+t+"). Paths must not contain '~', '*', '/', '[', or ']'",e,!1,void 0,n);try{return(new(Ys.bind.apply(Ys,Object(a.__spreadArray)([void 0],t.split(".")))))._internalPath}catch(r){throw ku("Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'",e,!1,void 0,n)}}function ku(e,t,n,r,i){var o=r&&!r.isEmpty(),a=void 0!==i,s="Function "+t+"() called with invalid data";n&&(s+=" (via `toFirestore()`)");var l="";return(o||a)&&(l+=" (found",o&&(l+=" in field "+r),a&&(l+=" in document "+i),l+=")"),new c(u.INVALID_ARGUMENT,(s+=". ")+e+l)}function Eu(e,t){return e.some((function(e){return e.isEqual(t)}))}var Su=function(){function e(e,t,n,r,i){this._firestore=e,this._userDataWriter=t,this._key=n,this._document=r,this._converter=i}return Object.defineProperty(e.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ref",{get:function(){return new Ps(this._firestore,this._converter,this._key)},enumerable:!1,configurable:!0}),e.prototype.exists=function(){return null!==this._document},e.prototype.data=function(){if(this._document){if(this._converter){var e=new Iu(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}},e.prototype.get=function(e){if(this._document){var t=this._document.data.field(xu("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}},e}(),Iu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.prototype.data=function(){return e.prototype.data.call(this)},t}(Su);function xu(e,t){return"string"==typeof t?wu(e,t):t instanceof Ys?t._internalPath:t._delegate._internalPath}var Tu=function(){function e(e,t){this.hasPendingWrites=e,this.fromCache=t}return e.prototype.isEqual=function(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache},e}(),Cu=function(e){function t(t,n,r,i,o,a){var s=this;return(s=e.call(this,t,n,r,i,a)||this)._firestore=t,s._firestoreImpl=t,s.metadata=o,s}return Object(a.__extends)(t,e),t.prototype.exists=function(){return e.prototype.exists.call(this)},t.prototype.data=function(e){if(void 0===e&&(e={}
2),this._document){if(this._converter){var t=new Ou(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}},t.prototype.get=function(e,t){if(void 0===t&&(t={}),this._document){var n=this._document.data.field(xu("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}},t}(Su),Ou=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.prototype.data=function(t){return void 0===t&&(t={}),e.prototype.data.call(this,t)},t}(Cu),Au=function(){function e(e,t,n,r){this._firestore=e,this._userDataWriter=t,this._snapshot=r,this.metadata=new Tu(r.hasPendingWrites,r.fromCache),this.query=n}return Object.defineProperty(e.prototype,"docs",{get:function(){var e=[];return this.forEach((function(t){return e.push(t)})),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._snapshot.docs.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return 0===this.size},enumerable:!1,configurable:!0}),e.prototype.forEach=function(e,t){var n=this;this._snapshot.docs.forEach((function(r){e.call(t,new Ou(n._firestore,n._userDataWriter,r.key,r,new Tu(n._snapshot.mutatedKeys.has(r.key),n._snapshot.fromCache),n.query.converter))}))},e.prototype.docChanges=function(e){void 0===e&&(e={});var t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new c(u.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){var n=0;return e._snapshot.docChanges.map((function(t){var r=new Ou(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Tu(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter);return t.doc,{type:"added",doc:r,oldIndex:-1,newIndex:n++}}))}var r=e._snapshot.oldDocs;return e._snapshot.docChanges.filter((function(e){return t||3!==e.type})).map((function(t){var n=new Ou(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Tu(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),i=-1,o=-1;return 0!==t.type&&(i=r.indexOf(t.doc.key),r=r.delete(t.doc.key)),1!==t.type&&(o=(r=r.add(t.doc)).indexOf(t.doc.key)),{type:Nu(t.type),doc:n,oldIndex:i,newIndex:o}}))}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges},e}();function Nu(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return v()}}function Pu(e,t){return e instanceof Cu&&t instanceof Cu?e._firestore===t._firestore&&e._key.isEqual(t._key)&&(null===e._document?null===t._document:e._document.isEqual(t._document))&&e._converter===t._converter:e instanceof Au&&t instanceof Au&&e._firestore===t._firestore&&Fs(e.query,t.query)&&e.metadata.isEqual(t.metadata)&&e._snapshot.isEqual(t._snapshot)}function Ru(e){if(Re(e)&&0===e.explicitOrderBy.length)throw new c(u.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var ju=function(){};function Du(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o=i[r];e=o._apply(e)}return e}var Mu=function(e){function t(t,n,r){var i=this;return(i=e.call(this)||this).Kc=t,i.jc=n,i.Wc=r,i.type="where",i}return Object(a.__extends)(t,e),t.prototype._apply=function(e){var t=iu(e.firestore),n=function(e,t,n,r,i,o,a){var s;if(i.isKeyField()){if("array-contains"===o||"array-contains-any"===o)throw new c(u.INVALID_ARGUMENT,"Invalid Query. You can't perform '"+o+"' queries on FieldPath.documentId().");if("in"===o||"not-in"===o){zu(a,o);for(var l=[],f=0,h=a;f<h.length;f++){var d=h[f];l.push(qu(r,e,d))}s={arrayValue:{values:l}}}else s=qu(r,e,a)}else"in"!==o&&"not-in"!==o&&"array-contains-any"!==o||zu(a,o),s=pu(n,"where",a,"in"===o||"not-in"===o);var p=pe.create(i,o,s);return function(e,t){if(t.g()){var n=De(e);if(null!==n&&!n.isEqual(t.field))throw new c(u.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '"+n.toString()+"' and '"+t.field.toString()+"'");var r=je(e);null!==r&&Hu(e,t.field,r)}var i=function(e,t){for(var n=0,r=e.filters;n<r.length;n++){var i=r[n];if(t.indexOf(i.op)>=0)return i.op}return null}(e,function(e){switch(e){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","
2not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(t.op));if(null!==i)throw i===t.op?new c(u.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '"+t.op.toString()+"' filter."):new c(u.INVALID_ARGUMENT,"Invalid query. You cannot use '"+t.op.toString()+"' filters with '"+i.toString()+"' filters.")}(e,p),p}(e._query,0,t,e.firestore._databaseId,this.Kc,this.jc,this.Wc);return new Rs(e.firestore,e.converter,function(e,t){var n=e.filters.concat([t]);return new Oe(e.path,e.collectionGroup,e.explicitOrderBy.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)}(e._query,n))},t}(ju),Lu=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).Kc=t,r.Gc=n,r.type="orderBy",r}return Object(a.__extends)(t,e),t.prototype._apply=function(e){var t=function(e,t,n){if(null!==e.startAt)throw new c(u.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==e.endAt)throw new c(u.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");var r=new Ie(t,n);return function(e,t){if(null===je(e)){var n=De(e);null!==n&&Hu(e,n,t.field)}}(e,r),r}(e._query,this.Kc,this.Gc);return new Rs(e.firestore,e.converter,function(e,t){var n=e.explicitOrderBy.concat([t]);return new Oe(e.path,e.collectionGroup,n,e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(e._query,t))},t}(ju),Fu=function(e){function t(t,n,r){var i=this;return(i=e.call(this)||this).type=t,i.zc=n,i.Hc=r,i}return Object(a.__extends)(t,e),t.prototype._apply=function(e){return new Rs(e.firestore,e.converter,Ue(e._query,this.zc,this.Hc))},t}(ju),Uu=function(e){function t(t,n,r){var i=this;return(i=e.call(this)||this).type=t,i.Jc=n,i.Yc=r,i}return Object(a.__extends)(t,e),t.prototype._apply=function(e){var t=Bu(e,this.type,this.Jc,this.Yc);return new Rs(e.firestore,e.converter,function(e,t){return new Oe(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,t,e.endAt)}(e._query,t))},t}(ju),Vu=function(e){function t(t,n,r){var i=this;return(i=e.call(this)||this).type=t,i.Jc=n,i.Yc=r,i}return Object(a.__extends)(t,e),t.prototype._apply=function(e){var t=Bu(e,this.type,this.Jc,this.Yc);return new Rs(e.firestore,e.converter,function(e,t){return new Oe(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,t)}(e._query,t))},t}(ju);function Bu(e,t,n,i){if(n[0]=Object(r.getModularInstance)(n[0]),n[0]instanceof Su)return function(e,t,n,r,i){if(!r)throw new c(u.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+n+"().");for(var o=[],a=0,s=Le(e);a<s.length;a++){var l=s[a];if(l.field.isKeyField())o.push(Z(t,r.key));else{var f=r.data.field(l.field);if(U(f))throw new c(u.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+l.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===f){var h=l.field.canonicalString();throw new c(u.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '"+h+"' (used as the orderBy) does not exist.")}o.push(f)}}return new Ee(o,i)}(e._query,e.firestore._databaseId,t,n[0]._document,i);var o=iu(e.firestore);return function(e,t,n,r,i,o){var a=e.explicitOrderBy;if(i.length>a.length)throw new c(u.INVALID_ARGUMENT,"Too many arguments provided to "+r+"(). The number of arguments must be less than or equal to the number of orderBy() clauses");for(var s=[],l=0;l<i.length;l++){var f=i[l];if(a[l].field.isKeyField()){if("string"!=typeof f)throw new c(u.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in "+r+"(), but got a "+typeof f);if(!Me(e)&&-1!==f.indexOf("/"))throw new c(u.INVALID_ARGUMENT,"Invalid query. When querying a collection and ordering by FieldPath.documentId(), the value passed to "+r+"() must be a plain document ID, but '"+f+"' contains a slash.");var h=e.path.child(A.fromString(f));if(!K.isDocumentKey(h))throw new c(u.INVALID_ARGUMENT,"Invalid query. When querying a collection group and ordering by FieldPath.documentId(), the value passed to "+r+"() must result in a valid document path, but '"+h+"' is not because it c
2ontains an odd number of segments.");var d=new K(h);s.push(Z(t,d))}else{var p=pu(n,r,f);s.push(p)}}return new Ee(s,o)}(e._query,e.firestore._databaseId,o,t,n,i)}function qu(e,t,n){if("string"==typeof(n=Object(r.getModularInstance)(n))){if(""===n)throw new c(u.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid document ID, but it was an empty string.");if(!Me(t)&&-1!==n.indexOf("/"))throw new c(u.INVALID_ARGUMENT,"Invalid query. When querying a collection by FieldPath.documentId(), you must provide a plain document ID, but '"+n+"' contains a '/' character.");var i=t.path.child(A.fromString(n));if(!K.isDocumentKey(i))throw new c(u.INVALID_ARGUMENT,"Invalid query. When querying a collection group by FieldPath.documentId(), the value provided must result in a valid document path, but '"+i+"' is not because it has an odd number of segments ("+i.length+").");return Z(e,new K(i))}if(n instanceof Ps)return Z(e,n._key);throw new c(u.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid string or a DocumentReference, but it was: "+Ts(n)+".")}function zu(e,t){if(!Array.isArray(e)||0===e.length)throw new c(u.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '"+t.toString()+"' filters.");if(e.length>10)throw new c(u.INVALID_ARGUMENT,"Invalid Query. '"+t.toString()+"' filters support a maximum of 10 elements in the value array.")}function Hu(e,t,n){if(!n.isEqual(t))throw new c(u.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '"+t.toString()+"' and so you must also use '"+t.toString()+"' as your first argument to orderBy(), but your first orderBy() is on field '"+n.toString()+"' instead.")}var Ku=function(){function e(){}return e.prototype.convertValue=function(e,t){switch(void 0===t&&(t="none"),W(e)){case 0:return null;case 1:return e.booleanValue;case 2:return L(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(F(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 10:return this.convertObject(e.mapValue,t);default:throw v()}},e.prototype.convertObject=function(e,t){var n=this,r={};return T(e.fields,(function(e,i){r[e]=n.convertValue(i,t)})),r},e.prototype.convertGeoPoint=function(e){return new Xs(L(e.latitude),L(e.longitude))},e.prototype.convertArray=function(e,t){var n=this;return(e.values||[]).map((function(e){return n.convertValue(e,t)}))},e.prototype.convertServerTimestamp=function(e,t){switch(t){case"previous":var n=V(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(B(e));default:return null}},e.prototype.convertTimestamp=function(e){var t=M(e);return new S(t.seconds,t.nanos)},e.prototype.convertDocumentKey=function(e,t){var n=A.fromString(e);m(Pn(n));var r=new ps(n.get(1),n.get(3)),i=new K(n.popFirst(5));return r.isEqual(t)||d("Document "+i+" contains a document reference within a different database ("+r.projectId+"/"+r.database+") which is not supported. It will be treated as a reference in the current database ("+t.projectId+"/"+t.database+") instead."),i},e}();function Wu(e,t,n){return e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t}var Gu=function(e){function t(t){var n=this;return(n=e.call(this)||this).firestore=t,n}return Object(a.__extends)(t,e),t.prototype.convertBytes=function(e){return new $s(e)},t.prototype.convertReference=function(e){var t=this.convertDocumentKey(e,this.firestore._databaseId);return new Ps(this.firestore,null,t)},t}(Ku),Yu=function(){function e(e,t){this._firestore=e,this._commitHandler=t,this._mutations=[],this._committed=!1,this._dataReader=iu(e)}return e.prototype.set=function(e,t,n){this._verifyNotCommitted();var r=$u(e,this._firestore),i=Wu(r.converter,t,n),o=ou(this._dataReader,"WriteBatch.set",r._key,i,null!==r.converter,n);return this._mutations.push(o.toMutation(r._key,ct.none())),this},e.prototype.update=function(e,t,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];this._verifyNotCommitted();var a,s=$u(e,this._firestore);
2return a="string"==typeof(t=Object(r.getModularInstance)(t))||t instanceof Ys?du(this._dataReader,"WriteBatch.update",s._key,t,n,i):hu(this._dataReader,"WriteBatch.update",s._key,t),this._mutations.push(a.toMutation(s._key,ct.exists(!0))),this},e.prototype.delete=function(e){this._verifyNotCommitted();var t=$u(e,this._firestore);return this._mutations=this._mutations.concat(new St(t._key,ct.none())),this},e.prototype.commit=function(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()},e.prototype._verifyNotCommitted=function(){if(this._committed)throw new c(u.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},e}();function $u(e,t){if((e=Object(r.getModularInstance)(e)).firestore!==t)throw new c(u.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return e}var Qu=function(e){function t(t){var n=this;return(n=e.call(this)||this).firestore=t,n}return Object(a.__extends)(t,e),t.prototype.convertBytes=function(e){return new $s(e)},t.prototype.convertReference=function(e){var t=this.convertDocumentKey(e,this.firestore._databaseId);return new Ps(this.firestore,null,t)},t}(Ku);function Xu(e,t,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];e=Cs(e,Ps);var a=Cs(e.firestore,zs),s=iu(a);return Zu(a,[("string"==typeof(t=Object(r.getModularInstance)(t))||t instanceof Ys?du(s,"updateDoc",e._key,t,n,i):hu(s,"updateDoc",e._key,t)).toMutation(e._key,ct.exists(!0))])}function Ju(e){for(var t,n,i,o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];e=Object(r.getModularInstance)(e);var u={includeMetadataChanges:!1},c=0;"object"!=typeof o[c]||Vs(o[c])||(u=o[c],c++);var l,f,h,d={includeMetadataChanges:u.includeMetadataChanges};if(Vs(o[c])){var p=o[c];o[c]=null===(t=p.next)||void 0===t?void 0:t.bind(p),o[c+1]=null===(n=p.error)||void 0===n?void 0:n.bind(p),o[c+2]=null===(i=p.complete)||void 0===i?void 0:i.bind(p)}if(e instanceof Ps)f=Cs(e.firestore,zs),h=Ne(e._key.path),l={next:function(t){o[c]&&o[c](ec(f,e,t))},error:o[c+1],complete:o[c+2]};else{var g=Cs(e,Rs);f=Cs(g.firestore,zs),h=g._query;var v=new Qu(f);l={next:function(e){o[c]&&o[c](new Au(f,v,g,e))},error:o[c+1],complete:o[c+2]},Ru(e._query)}return function(e,t,n,r){var i=this,o=new Xa(r),s=new ra(t,o,n);return e.asyncQueue.enqueueAndForget((function(){return Object(a.__awaiter)(i,void 0,void 0,(function(){var t;return Object(a.__generator)(this,(function(n){switch(n.label){case 0:return t=Jo,[4,ls(e)];case 1:return[2,t.apply(void 0,[n.sent(),s])]}}))}))})),function(){o.Wo(),e.asyncQueue.enqueueAndForget((function(){return Object(a.__awaiter)(i,void 0,void 0,(function(){var t;return Object(a.__generator)(this,(function(n){switch(n.label){case 0:return t=Zo,[4,ls(e)];case 1:return[2,t.apply(void 0,[n.sent(),s])]}}))}))}))}}(Hs(f),h,d,l)}function Zu(e,t){return function(e,t){var n=this,r=new nr;return e.asyncQueue.enqueueAndForget((function(){return Object(a.__awaiter)(n,void 0,void 0,(function(){var n;return Object(a.__generator)(this,(function(i){switch(i.label){case 0:return n=ma,[4,cs(e)];case 1:return[2,n.apply(void 0,[i.sent(),t,r])]}}))}))})),r.promise}(Hs(e),t)}function ec(e,t,n){var r=n.docs.get(t._key),i=new Qu(e);return new Cu(e,i,t._key,r,new Tu(n.hasPendingWrites,n.fromCache),t.converter)}var tc=function(e){function t(t,n){var r=this;return(r=e.call(this,t,n)||this)._firestore=t,r}return Object(a.__extends)(t,e),t.prototype.get=function(t){var n=this,r=$u(t,this._firestore),i=new Qu(this._firestore);return e.prototype.get.call(this,t).then((function(e){return new Cu(n._firestore,i,r._key,e._document,new Tu(!1,!1),r.converter)}))},t}(function(){function e(e,t){this._firestore=e,this._transaction=t,this._dataReader=iu(e)}return e.prototype.get=function(e){var t=this,n=$u(e,this._firestore),r=new Gu(this._firestore);return this._transaction.lookup([n._key]).then((function(e){if(!e||1!==e.length)return v();var i=e[0];if(i.isFoundDocument())return new Su(t._firestore,r,i.key,i,n.converter);if(i.isNoDocument())return new Su(t._firestore,r,n._key,null,n.converter);
2throw v()}))},e.prototype.set=function(e,t,n){var r=$u(e,this._firestore),i=Wu(r.converter,t,n),o=ou(this._dataReader,"Transaction.set",r._key,i,null!==r.converter,n);return this._transaction.set(r._key,o),this},e.prototype.update=function(e,t,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var a,s=$u(e,this._firestore);return a="string"==typeof(t=Object(r.getModularInstance)(t))||t instanceof Ys?du(this._dataReader,"Transaction.update",s._key,t,n,i):hu(this._dataReader,"Transaction.update",s._key,t),this._transaction.update(s._key,a),this},e.prototype.delete=function(e){var t=$u(e,this._firestore);return this._transaction.delete(t._key),this},e}());function nc(){if("undefined"==typeof Uint8Array)throw new c(u.UNIMPLEMENTED,"Uint8Arrays are not available in this environment.")}function rc(){if("undefined"==typeof atob)throw new c(u.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var ic=function(){function e(e){this._delegate=e}return e.fromBase64String=function(t){return rc(),new e($s.fromBase64String(t))},e.fromUint8Array=function(t){return nc(),new e($s.fromUint8Array(t))},e.prototype.toBase64=function(){return rc(),this._delegate.toBase64()},e.prototype.toUint8Array=function(){return nc(),this._delegate.toUint8Array()},e.prototype.isEqual=function(e){return this._delegate.isEqual(e._delegate)},e.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},e}(),oc=function(){function e(){}return e.prototype.enableIndexedDbPersistence=function(e,t){return function(e,t){Gs(e=Cs(e,zs));var n=Hs(e),r=e._freezeSettings(),i=new $a;return Ws(n,i,new Ga(i,r.cacheSizeBytes,null==t?void 0:t.forceOwnership))}(e._delegate,{forceOwnership:t})},e.prototype.enableMultiTabIndexedDbPersistence=function(e){return function(e){Gs(e=Cs(e,zs));var t=Hs(e),n=e._freezeSettings(),r=new $a;return Ws(t,r,new Ya(r,n.cacheSizeBytes))}(e._delegate)},e.prototype.clearIndexedDbPersistence=function(e){return function(e){var t=this;if(e._initialized&&!e._terminated)throw new c(u.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");var n=new nr;return e._queue.enqueueAndForgetEvenWhileRestricted((function(){return Object(a.__awaiter)(t,void 0,void 0,(function(){var t;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,function(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t;return Object(a.__generator)(this,(function(n){switch(n.label){case 0:return or.yt()?(t=e+"main",[4,or.delete(t)]):[2,Promise.resolve()];case 1:return n.sent(),[2]}}))}))}(vi(e._databaseId,e._persistenceKey))];case 1:return r.sent(),n.resolve(),[3,3];case 2:return t=r.sent(),n.reject(t),[3,3];case 3:return[2]}}
2))}))})),n.promise}(e._delegate)},e}(),ac=function(){function e(e,t,n){var r=this;this._delegate=t,this.Xc=n,this.INTERNAL={delete:function(){return r.terminate()}},e instanceof ps||(this.Zc=e)}return Object.defineProperty(e.prototype,"_databaseId",{get:function(){return this._delegate._databaseId},enumerable:!1,configurable:!0}),e.prototype.settings=function(e){var t=this._delegate._getSettings();e.merge||t.host===e.host||p("You are overriding the original host. If you did not intend to override your settings, use {merge: true}."),e.merge&&delete(e=Object.assign(Object.assign({},t),e)).merge,this._delegate._setSettings(e)},e.prototype.useEmulator=function(e,t,n){void 0===n&&(n={}),function(e,t,n,i){void 0===i&&(i={});var o=(e=Cs(e,Ns))._getSettings();if("firestore.googleapis.com"!==o.host&&o.host!==t&&p("Host has been set in both settings() and useEmulator(), emulator host will be used"),e._setSettings(Object.assign(Object.assign({},o),{host:t+":"+n,ssl:!1})),i.mockUserToken){var a=Object(r.createMockUserToken)(i.mockUserToken),s=i.mockUserToken.sub||i.mockUserToken.user_id;if(!s)throw new c(u.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");e._credentials=new ys(new vs(a,new Gi(s)))}}(this._delegate,e,t,n)},e.prototype.enableNetwork=function(){return function(e){var t=this;return e.asyncQueue.enqueue((function(){return Object(a.__awaiter)(t,void 0,void 0,(function(){var t,n;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:return[4,as(e)];case 1:return t=r.sent(),[4,us(e)];case 2:return n=r.sent(),[2,(t.setNetworkEnabled(!0),function(e){var t=y(e);return t.Or.delete(0),_o(t)}(n))]}}))}))}))}(Hs(Cs(this._delegate,zs)))},e.prototype.disableNetwork=function(){return function(e){var t=this;return e.asyncQueue.enqueue((function(){return Object(a.__awaiter)(t,void 0,void 0,(function(){var t,n;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:return[4,as(e)];case 1:return t=r.sent(),[4,us(e)];case 2:return n=r.sent(),[2,(t.setNetworkEnabled(!1),function(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t;return Object(a.__generator)(this,(function(n){switch(n.label){case 0:return(t=y(e)).Or.add(0),[4,wo(t)];case 1:return n.sent(),t.Br.set("Offline"),[2]}}))}))}(n))]}}))}))}))}(Hs(Cs(this._delegate,zs)))},e.prototype.enablePersistence=function(e){var t=!1,n=!1;return e&&Ss("synchronizeTabs",t=!!e.synchronizeTabs,"experimentalForceOwningTab",n=!!e.experimentalForceOwningTab),t?this.Xc.enableMultiTabIndexedDbPersistence(this):this.Xc.enableIndexedDbPersistence(this,n)},e.prototype.clearPersistence=function(){return this.Xc.clearIndexedDbPersistence(this)},e.prototype.terminate=function(){return this.Zc&&(this.Zc._removeServiceInstance("firestore"),this.Zc._removeServiceInstance("firestore-exp")),this._delegate._delete()},e.prototype.waitForPendingWrites=function(){return function(e){var t=this,n=new nr;return e.asyncQueue.enqueueAndForget((function(){return Object(a.__awaiter)(t,void 0,void 0,(function(){var t;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:return t=Ea,[4,cs(e)];case 1:return[2,t.apply(void 0,[r.sent(),n])]}}))}))})),n.promise}(Hs(Cs(this._delegate,zs)))},e.prototype.onSnapshotsInSync=function(e){return function(e,t){return function(e,t){var n=this,r=new Xa(t);return e.asyncQueue.enqueueAndForget((function(){return Object(a.__awaiter)(n,void 0,void 0,(function(){var t;return Object(a.__generator)(this,(function(n){switch(n.label){case 0:return t=function(e,t){y(e).Gr.add(t),t.next()},[4,ls(e)];case 1:return[2,t.apply(void 0,[n.sent(),r])]}}))}))})),function(){r.Wo(),e.asyncQueue.enqueueAndForget((function(){return Object(a.__awaiter)(n,void 0,void 0,(function(){var t;return Object(a.__generator)(this,(function(n){switch(n.label){case 0:return t=function(e,t){y(e).Gr.delete(t)},[4,ls(e)];case 1:return[2,t.apply(void 0,[n.sent(),r])]}}))}))}))}}(Hs(e=Cs(e,zs)),Vs(t)?t:{next:t})}(this._delegate,e)},Object.defineProperty(e.prototype,"app",{get:function(){if(!this.Zc)throw new c(u.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.Zc}
2,enumerable:!1,configurable:!0}),e.prototype.collection=function(e){try{return new wc(this,Ds(this._delegate,e))}catch(e){throw dc(e,"collection()","Firestore.collection()")}},e.prototype.doc=function(e){try{return new hc(this,Ms(this._delegate,e))}catch(e){throw dc(e,"doc()","Firestore.doc()")}},e.prototype.collectionGroup=function(e){try{return new yc(this,function(e,t){if(e=Cs(e,Ns),ks("collectionGroup","collection id",t),t.indexOf("/")>=0)throw new c(u.INVALID_ARGUMENT,"Invalid collection ID '"+t+"' passed to function collectionGroup(). Collection IDs must not contain '/'.");return new Rs(e,null,function(e){return new Oe(A.emptyPath(),e)}(t))}(this._delegate,e))}catch(e){throw dc(e,"collectionGroup()","Firestore.collectionGroup()")}},e.prototype.runTransaction=function(e){var t=this;return function(e,t){return function(e,t){var n=this,r=new nr;return e.asyncQueue.enqueueAndForget((function(){return Object(a.__awaiter)(n,void 0,void 0,(function(){var n;return Object(a.__generator)(this,(function(i){switch(i.label){case 0:return[4,function(e){return os(e).then((function(e){return e.datastore}))}(e)];case 1:return n=i.sent(),new es(e.asyncQueue,n,t,r).run(),[2]}}))}))})),r.promise}(Hs(e),(function(n){return t(new tc(e,n))}))}(this._delegate,(function(n){return e(new cc(t,n))}))},e.prototype.batch=function(){var e=this;return Hs(this._delegate),new lc(new Yu(this._delegate,(function(t){return Zu(e._delegate,t)})))},e.prototype.loadBundle=function(e){throw new c(u.FAILED_PRECONDITION,'"loadBundle()" does not exist, have you imported "firebase/firestore/bundle"?')},e.prototype.namedQuery=function(e){throw new c(u.FAILED_PRECONDITION,'"namedQuery()" does not exist, have you imported "firebase/firestore/bundle"?')},e}(),sc=function(e){function t(t){var n=this;return(n=e.call(this)||this).firestore=t,n}return Object(a.__extends)(t,e),t.prototype.convertBytes=function(e){return new ic(new $s(e))},t.prototype.convertReference=function(e){var t=this.convertDocumentKey(e,this.firestore._databaseId);return hc.tu(t,this.firestore,null)},t}(Ku);function uc(e){var t;t=e,l.setLogLevel(t)}var cc=function(){function e(e,t){this._firestore=e,this._delegate=t,this._userDataWriter=new sc(e)}return e.prototype.get=function(e){var t=this,n=kc(e);return this._delegate.get(n).then((function(e){return new vc(t._firestore,new Cu(t._firestore._delegate,t._userDataWriter,e._key,e._document,e.metadata,n.converter))}))},e.prototype.set=function(e,t,n){var r=kc(e);return n?(Es("Transaction.set",n),this._delegate.set(r,t,n)):this._delegate.set(r,t),this},e.prototype.update=function(e,t,n){for(var r,i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=kc(e);return 2===arguments.length?this._delegate.update(s,t):(r=this._delegate).update.apply(r,Object(a.__spreadArray)([s,t,n],i)),this},e.prototype.delete=function(e){var t=kc(e);return this._delegate.delete(t),this},e}(),lc=function(){function e(e){this._delegate=e}return e.prototype.set=function(e,t,n){var r=kc(e);return n?(Es("WriteBatch.set",n),this._delegate.set(r,t,n)):this._delegate.set(r,t),this},e.prototype.update=function(e,t,n){for(var r,i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=kc(e);return 2===arguments.length?this._delegate.update(s,t):(r=this._delegate).update.apply(r,Object(a.__spreadArray)([s,t,n],i)),this},e.prototype.delete=function(e){var t=kc(e);return this._delegate.delete(t),this},e.prototype.commit=function(){return this._delegate.commit()},e}(),fc=function(){function e(e,t,n){this._firestore=e,this._userDataWriter=t,this._delegate=n}return e.prototype.fromFirestore=function(e,t){var n=new Ou(this._firestore._delegate,this._userDataWriter,e._key,e._document,e.metadata,null);return this._delegate.fromFirestore(new mc(this._firestore,n),null!=t?t:{})},e.prototype.toFirestore=function(e,t){return t?this._delegate.toFirestore(e,t):this._delegate.toFirestore(e)},e.eu=function(t,n){var r=e.nu,i=r.get(t);i||(i=new WeakMap,r.set(t,i));var o=i.get(n);return o||(o=new e(t,new sc(t),n),i.set(n,o)),o},e}();fc.nu=new WeakMap;var hc=function(){function e(e,t){this.firestore=e,this._delegate=t,this._userDataWriter=new sc(e)}return e.su=function(t,n,r){if(t.length%2!=0)throw new c(u.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+t.canonicalString()+" has "+t.length);
2return new e(n,new Ps(n._delegate,r,new K(t)))},e.tu=function(t,n,r){return new e(n,new Ps(n._delegate,r,t))},Object.defineProperty(e.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return new wc(this.firestore,this._delegate.parent)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._delegate.path},enumerable:!1,configurable:!0}),e.prototype.collection=function(e){try{return new wc(this.firestore,Ds(this._delegate,e))}catch(e){throw dc(e,"collection()","DocumentReference.collection()")}},e.prototype.isEqual=function(e){return(e=Object(r.getModularInstance)(e))instanceof Ps&&Ls(this._delegate,e)},e.prototype.set=function(e,t){t=Es("DocumentReference.set",t);try{return function(e,t,n){e=Cs(e,Ps);var r=Cs(e.firestore,zs),i=Wu(e.converter,t,n);return Zu(r,[ou(iu(r),"setDoc",e._key,i,null!==e.converter,n).toMutation(e._key,ct.none())])}(this._delegate,e,t)}catch(e){throw dc(e,"setDoc()","DocumentReference.set()")}},e.prototype.update=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];try{return 1===arguments.length?Xu(this._delegate,e):Xu.apply(void 0,Object(a.__spreadArray)([this._delegate,e,t],n))}catch(e){throw dc(e,"updateDoc()","DocumentReference.update()")}},e.prototype.delete=function(){return Zu(Cs((e=this._delegate).firestore,zs),[new St(e._key,ct.none())]);var e},e.prototype.onSnapshot=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=pc(t),i=gc(t,(function(t){return new vc(e.firestore,new Cu(e.firestore._delegate,e._userDataWriter,t._key,t._document,t.metadata,e._delegate.converter))}));return Ju(this._delegate,r,i)},e.prototype.get=function(e){var t=this;return("cache"===(null==e?void 0:e.source)?function(e){e=Cs(e,Ps);var t=Cs(e.firestore,zs),n=Hs(t),r=new Qu(t);return function(e,t){var n=this,r=new nr;return e.asyncQueue.enqueueAndForget((function(){return Object(a.__awaiter)(n,void 0,void 0,(function(){var n;return Object(a.__generator)(this,(function(i){switch(i.label){case 0:return n=function(e,t,n){return Object(a.__awaiter)(this,void 0,void 0,(function(){var r,i;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,function(e,t){var n=y(e);return n.persistence.runTransaction("read document","readonly",(function(e){return n.Mn.mn(e,t)}))}(e,t)];case 1:return(i=o.sent()).isFoundDocument()?n.resolve(i):i.isNoDocument()?n.resolve(null):n.reject(new c(u.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=o.sent(),i=Wo(r,"Failed to get document '"+t+" from cache"),n.reject(i),[3,3];case 3:return[2]}}
2))}))},[4,ss(e)];case 1:return[2,n.apply(void 0,[i.sent(),t,r])]}}))}))})),r.promise}(n,e._key).then((function(n){return new Cu(t,r,e._key,n,new Tu(null!==n&&n.hasLocalMutations,!0),e.converter)}))}(this._delegate):"server"===(null==e?void 0:e.source)?function(e){e=Cs(e,Ps);var t=Cs(e.firestore,zs);return fs(Hs(t),e._key,{source:"server"}).then((function(n){return ec(t,e,n)}))}(this._delegate):function(e){e=Cs(e,Ps);var t=Cs(e.firestore,zs);return fs(Hs(t),e._key).then((function(n){return ec(t,e,n)}))}(this._delegate)).then((function(e){return new vc(t.firestore,new Cu(t.firestore._delegate,t._userDataWriter,e._key,e._document,e.metadata,t._delegate.converter))}))},e.prototype.withConverter=function(t){return new e(this.firestore,t?this._delegate.withConverter(fc.eu(this.firestore,t)):this._delegate.withConverter(null))},e}();function dc(e,t,n){return e.message=e.message.replace(t,n),e}function pc(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];if("object"==typeof r&&!Vs(r))return r}return{}}function gc(e,t){var n,r,i;return{next:function(e){i.next&&i.next(t(e))},error:null===(n=(i=Vs(e[0])?e[0]:Vs(e[1])?e[1]:"function"==typeof e[0]?{next:e[0],error:e[1],complete:e[2]}:{next:e[1],error:e[2],complete:e[3]}).error)||void 0===n?void 0:n.bind(i),complete:null===(r=i.complete)||void 0===r?void 0:r.bind(i)}}var vc=function(){function e(e,t){this._firestore=e,this._delegate=t}return Object.defineProperty(e.prototype,"ref",{get:function(){return new hc(this._firestore,this._delegate.ref)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this._delegate.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exists",{get:function(){return this._delegate.exists()},enumerable:!1,configurable:!0}),e.prototype.data=function(e){return this._delegate.data(e)},e.prototype.get=function(e,t){return this._delegate.get(e,t)},e.prototype.isEqual=function(e){return Pu(this._delegate,e._delegate)},e}(),mc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.prototype.data=function(e){return this._delegate.data(e)},t}(vc),yc=function(){function e(e,t){this.firestore=e,this._delegate=t,this._userDataWriter=new sc(e)}return e.prototype.where=function(t,n,r){try{return new e(this.firestore,Du(this._delegate,function(e,t,n){var r=t,i=xu("where",e);return new Mu(i,r,n)}(t,n,r)))}catch(t){throw dc(t,/(orderBy|where)\(\)/,"Query.$1()")}},e.prototype.orderBy=function(t,n){try{return new e(this.firestore,Du(this._delegate,function(e,t){void 0===t&&(t="asc");var n=t,r=xu("orderBy",e);return new Lu(r,n)}(t,n)))}catch(t){throw dc(t,/(orderBy|where)\(\)/,"Query.$1()")}},e.prototype.limit=function(t){try{return new e(this.firestore,Du(this._delegate,function(e){return Os("limit",e),new Fu("limit",e,"F")}(t)))}catch(t){throw dc(t,"limit()","Query.limit()")}},e.prototype.limitToLast=function(t){try{return new e(this.firestore,Du(this._delegate,function(e){return Os("limitToLast",e),new Fu("limitToLast",e,"L")}(t)))}catch(t){throw dc(t,"limitToLast()","Query.limitToLast()")}},e.prototype.startAt=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return new e(this.firestore,Du(this._delegate,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new Uu("startAt",e,!0)}.apply(void 0,t)))}catch(t){throw dc(t,"startAt()","Query.startAt()")}},e.prototype.startAfter=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return new e(this.firestore,Du(this._delegate,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new Uu("startAfter",e,!1)}.apply(void 0,t)))}catch(t){throw dc(t,"startAfter()","Query.startAfter()")}},e.prototype.endBefore=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return new e(this.firestore,Du(this._delegate,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new Vu("endBefore",e,!0)}.apply(void 0,t)))}catch(t){throw dc(t,"endBefore()","Query.endBefore()")}},e.prototype.endAt=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return new e(this.firestore,Du(this._delegate,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new Vu("endAt",e,!1)}.apply(void 0,t)))}catch(t){throw dc(t,"endAt()","Query.endAt()")}},e.prototype.isEqual=function(e){return Fs(this._delegate,e._delegate)},e.prototype.get=function(e){var t=this;
2return("cache"===(null==e?void 0:e.source)?function(e){e=Cs(e,Rs);var t=Cs(e.firestore,zs),n=Hs(t),r=new Qu(t);return function(e,t){var n=this,r=new nr;return e.asyncQueue.enqueueAndForget((function(){return Object(a.__awaiter)(n,void 0,void 0,(function(){var n;return Object(a.__generator)(this,(function(i){switch(i.label){case 0:return n=function(e,t,n){return Object(a.__awaiter)(this,void 0,void 0,(function(){var r,i,o,s,u;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,Ni(e,t,!0)];case 1:return u=a.sent(),r=new la(t,u.Bn),i=r._o(u.documents),o=r.applyChanges(i,!1),n.resolve(o.snapshot),[3,3];case 2:return s=a.sent(),u=Wo(s,"Failed to execute query '"+t+" against cache"),n.reject(u),[3,3];case 3:return[2]}}))}))},[4,ss(e)];case 1:return[2,n.apply(void 0,[i.sent(),t,r])]}}))}))})),r.promise}(n,e._query).then((function(n){return new Au(t,r,e,n)}))}(this._delegate):"server"===(null==e?void 0:e.source)?function(e){e=Cs(e,Rs);var t=Cs(e.firestore,zs),n=Hs(t),r=new Qu(t);return hs(n,e._query,{source:"server"}).then((function(n){return new Au(t,r,e,n)}))}(this._delegate):function(e){e=Cs(e,Rs);var t=Cs(e.firestore,zs),n=Hs(t),r=new Qu(t);return Ru(e._query),hs(n,e._query).then((function(n){return new Au(t,r,e,n)}))}(this._delegate)).then((function(e){return new _c(t.firestore,new Au(t.firestore._delegate,t._userDataWriter,t._delegate,e._snapshot))}))},e.prototype.onSnapshot=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=pc(t),i=gc(t,(function(t){return new _c(e.firestore,new Au(e.firestore._delegate,e._userDataWriter,e._delegate,t._snapshot))}));return Ju(this._delegate,r,i)},e.prototype.withConverter=function(t){return new e(this.firestore,t?this._delegate.withConverter(fc.eu(this.firestore,t)):this._delegate.withConverter(null))},e}(),bc=function(){function e(e,t){this._firestore=e,this._delegate=t}return Object.defineProperty(e.prototype,"type",{get:function(){return this._delegate.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doc",{get:function(){return new mc(this._firestore,this._delegate.doc)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"oldIndex",{get:function(){return this._delegate.oldIndex},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"newIndex",{get:function(){return this._delegate.newIndex},enumerable:!1,configurable:!0}),e}(),_c=function(){function e(e,t){this._firestore=e,this._delegate=t}return Object.defineProperty(e.prototype,"query",{get:function(){return new yc(this._firestore,this._delegate.query)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this._delegate.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._delegate.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return this._delegate.empty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"docs",{get:function(){var e=this;return this._delegate.docs.map((function(t){return new mc(e._firestore,t)}))},enumerable:!1,configurable:!0}),e.prototype.docChanges=function(e){var t=this;return this._delegate.docChanges(e).map((function(e){return new bc(t._firestore,e)}))},e.prototype.forEach=function(e,t){var n=this;this._delegate.forEach((function(r){e.call(t,new mc(n._firestore,r))}))},e.prototype.isEqual=function(e){return Pu(this._delegate,e._delegate)},e}(),wc=function(e){function t(t,n){var r=this;return(r=e.call(this,t,n)||this).firestore=t,r._delegate=n,r}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this._delegate.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=this._delegate.parent;return e?new hc(this.firestore,e):null},enumerable:!1,configurable:!0}),t.prototype.doc=function(e){try{return new hc(this.firestore,void 0===e?Ms(this._delegate):Ms(this._delegate,e))}catch(e){throw dc(e,"doc()","CollectionReference.doc()")}},t.prototype.add=function(e){var t=this;return function(e,t){var n=Cs(e.firestore,zs),r=Ms(e),i=Wu(e.converter,t);return Zu(n,[ou(iu(e.firestore),"addDoc",r._key,i,null!==e.converter,{}).toMutation(r._key,ct.exists(!1))]).then((function(){return r}))}(this._delegate,e).then((function(e){return new hc(t.firestore,e)}))},t.prototype.isEqual=function(e){return Ls(this._delegate,e._delegate)},t.prototype.withConverter=function(e){return new t(this.firestore,e?this._delegate.withConverter(fc.eu(this.firestore,e)):this._delegate.withConverter(null))},t}(yc);function kc(e){return Cs(e,Ps)}var Ec=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._delegate=new(Ys.bind.apply(Ys,Object(a.__spreadArray)([void 0],e)))}return e.documentId=function(){return new e(P.keyField().canonicalString())},e.prototype.isEqual=function(e){return(e=Object(r.getModularInstance)(e))instanceof Ys&&this._delegate._internalPath.isEqual(e._internalPath)},e}(),Sc=function(){function e(e){this._delegate=e}return e.serverTimestamp=function(){var t=new uu("serverTimestamp");return t._methodName="FieldValue.serverTimestamp",new e(t)},e.delete=function(){var t=new au("deleteField");return t._methodName="FieldValue.delete",new e(t)},e.arrayUnion=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new cu("arrayUnion",e)}.apply(void 0,t);return r._methodName="FieldValue.arrayUnion",new e(r)},e.arrayRemove=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new lu("arrayRemove",e)}.apply(void 0,t);return r._methodName="FieldValue.arrayRemove",new e(r)},e.increment=function(t){var n=function(e){return new fu("increment",e)}(t);return n._methodName="FieldValue.increment",new e(n)},e.prototype.isEqual=function(e){return this._delegate.isEqual(e._delegate)},e}();function Ic(e){return function(e,t){var n=Hs(e=Cs(e,zs)),r=new Bs;return function(e,t,n,r){var i=this,o=function(e,t){return function(e,t){return new Ja(e,t)}(function(e,t){if(e instanceof Uint8Array)return Qa(e,t);if(e instanceof ArrayBuffer)return Qa(new Uint8Array(e),t);if(e instanceof ReadableStream)return e.getReader();throw new Error("Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream")}
2("string"==typeof e?(new TextEncoder).encode(e):e),t)}(n,fo(t));e.asyncQueue.enqueueAndForget((function(){return Object(a.__awaiter)(i,void 0,void 0,(function(){var t;return Object(a.__generator)(this,(function(n){switch(n.label){case 0:return t=Ka,[4,cs(e)];case 1:return t.apply(void 0,[n.sent(),o,r]),[2]}}))}))}))}(n,e._databaseId,t,r),r}(this._delegate,e)}function xc(e){var t,n,r=this;return(t=this._delegate,n=e,function(e,t){var n=this;return e.asyncQueue.enqueue((function(){return Object(a.__awaiter)(n,void 0,void 0,(function(){var n;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:return n=function(e,t){var n=y(e);return n.persistence.runTransaction("Get named query","readonly",(function(e){return n.Qe.getNamedQuery(e,t)}))},[4,ss(e)];case 1:return[2,n.apply(void 0,[r.sent(),t])]}}))}))}))}(Hs(t=Cs(t,zs)),n).then((function(e){return e?new Rs(t,null,e.query):null}))).then((function(e){return e?new yc(r,e):null}))}}).call(this,n(43))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return I})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return y})),n.d(t,"f",(function(){return T})),n.d(t,"g",(function(){return C}));var r=n(15),i=n(2),o=n.n(i),a=(n(9),n(24)),s=n(44),u=n(21),c=n(4),l=n(45),f=n.n(l),h=(n(82),n(19)),d=(n(33),function(e){var t=Object(s.a)();return t.displayName=e,t}("Router-History")),p=function(e){var t=Object(s.a)();return t.displayName=e,t}("Router"),g=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.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(p.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.a.createElement(d.Provider,{children:this.props.children||null,value:this.props.history}))},t}(o.a.Component);o.a.Component;o.a.Component;var v={},m=0;function y(e,t){void 0===t&&(t={}),("string"===typeof t||Array.isArray(t))&&(t={path:t});var n=t,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(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=v[n]||(v[n]={});if(r[e])return r[e];var i=[],o={regexp:f()(e,i,t),keys:i};return m<1e4&&(r[e]=o,m++),o}(n,{end:o,strict:s,sensitive:c}),i=r.regexp,a=r.keys,u=i.exec(e);if(!u)return null;var l=u[0],h=u.slice(1),d=e===l;return o&&!d?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:d,params:a.reduce((function(e,t,n){return e[t.name]=h[n],e}),{})}}),null)}var b=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(p.Consumer,null,(function(t){t||Object(u.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?y(n.pathname,e.props):t.match,i=Object(c.a)({},t,{location:n,match:r}),a=e.props,s=a.children,l=a.component,f=a.render;return Array.isArray(s)&&0===s.length&&(s=null),o.a.createElement(p.Provider,{value:i},i.match?s?"function"===typeof s?s(i):s:l?o.a.createElement(l,i):f?f(i):null:"function"===typeof s?s(i):null)}))},t}(o.a.Component);function _(e){return"/"===e.charAt(0)?e:"/"+e}function w(e,t){if(!e)return t;var n=_(e);return 0!==t.pathname.indexOf(n)?t:Object(c.a)({},t,{pathname:t.pathname.substr(n.length)})}function k(e){return"string"===typeof e?e:Object(a.e)(e)}function E(e){return function(){Object(u.a)(!1)}}function S(){}o.a.Component;var I=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(p.Consumer,null,(function(t){t||Object(u.a)(!1);var n,r,i=e.props.location||t.location;
2return o.a.Children.forEach(e.props.children,(function(e){if(null==r&&o.a.isValidElement(e)){n=e;var a=e.props.path||e.props.from;r=a?y(i.pathname,Object(c.a)({},e.props,{path:a})):t.match}})),r?o.a.cloneElement(n,{location:i,computedMatch:r}):null}))},t}(o.a.Component);var x=o.a.useContext;function T(){return x(d)}function C(){var e=x(p).match;return e?e.params:{}}},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return fr})),n.d(t,"b",(function(){return dr})),n.d(t,"c",(function(){return hr})),n.d(t,"d",(function(){return gr})),n.d(t,"e",(function(){return pr})),n.d(t,"f",(function(){return vr})),n.d(t,"g",(function(){return mr})),n.d(t,"h",(function(){return cr})),n.d(t,"i",(function(){return lr}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var o,a="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},s=s||{},u=a||self;function c(){}function l(e){var t=typeof e;return"array"==(t="object"!=t?t:e?Array.isArray(e)?"array":t:"null")||"object"==t&&"number"==typeof e.length}function f(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var h="closure_uid_"+(1e9*Math.random()>>>0),d=0;function p(e,t,n){return e.call.apply(e.bind,arguments)}function g(e,t,n){if(!e)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),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function v(e,t,n){return(v=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?p:g).apply(null,arguments)}function m(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function y(){return Date.now()}function b(e,t){function n(){}n.prototype=t.prototype,e.X=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Pb=function(e,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return t.prototype[n].apply(e,i)}}function _(){this.j=this.j,this.i=this.i}_.prototype.j=!1,_.prototype.ka=function(){if(!this.j&&(this.j=!0,this.H(),0))(function(e){Object.prototype.hasOwnProperty.call(e,h)&&e[h]||(e[h]=++d)})(this)},_.prototype.H=function(){if(this.i)for(;this.i.length;)this.i.shift()()};var w=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"===typeof e)return"string"!==typeof t||1!=t.length?-1:e.indexOf(t,0);for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},k=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(e,t,n){for(var r=e.length,i="string"===typeof e?e.split(""):e,o=0;o<r;o++)o in i&&t.call(n,i[o],o,e)};function E(e){return Array.prototype.concat.apply([],arguments)}function S(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}function I(e){return/^[\s\xa0]*$/.test(e)}var x,T=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]};function C(e,t){return-1!=e.indexOf(t)}function O(e,t){return e<t?-1:e>t?1:0}e:{var A=u.navigator;if(A){var N=A.userAgent;if(N){x=N;break e}}x=""}function P(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function R(e){var t={};for(var n in e)t[n]=e[n];return t}var j="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
2ing toString valueOf".split(" ");function D(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(var o=0;o<j.length;o++)n=j[o],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function M(e){return M[" "](e),e}M[" "]=c;var L,F=C(x,"Opera"),U=C(x,"Trident")||C(x,"MSIE"),V=C(x,"Edge"),B=V||U,q=C(x,"Gecko")&&!(C(x.toLowerCase(),"webkit")&&!C(x,"Edge"))&&!(C(x,"Trident")||C(x,"MSIE"))&&!C(x,"Edge"),z=C(x.toLowerCase(),"webkit")&&!C(x,"Edge");function H(){var e=u.document;return e?e.documentMode:void 0}e:{var K="",W=function(){var e=x;return q?/rv:([^\);]+)(\)|;)/.exec(e):V?/Edge\/([\d\.]+)/.exec(e):U?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):z?/WebKit\/(\S+)/.exec(e):F?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(W&&(K=W?W[1]:""),U){var G=H();if(null!=G&&G>parseFloat(K)){L=String(G);break e}}L=K}var Y,$={};function Q(e){return function(e,t){var n=$;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}(e,(function(){for(var t=0,n=T(String(L)).split("."),r=T(String(e)).split("."),i=Math.max(n.length,r.length),o=0;0==t&&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;t=O(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||O(0==a[2].length,0==s[2].length)||O(a[2],s[2]),a=a[3],s=s[3]}while(0==t)}return 0<=t}))}if(u.document&&U){var X=H();Y=X||(parseInt(L,10)||void 0)}else Y=void 0;var J=Y,Z=!U||9<=Number(J),ee=U&&!Q("9"),te=function(){if(!u.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{u.addEventListener("test",c,t),u.removeEventListener("test",c,t)}catch(n){}return e}();function ne(e,t){this.type=e,this.a=this.target=t,this.defaultPrevented=!1}function re(e,t){if(ne.call(this,e?e.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,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.a=t,t=e.relatedTarget){if(q){e:{try{M(t.nodeName);var i=!0;break e}catch(o){}i=!1}i||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,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!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"===typeof e.pointerType?e.pointerType:ie[e.pointerType]||"",this.c=e,e.defaultPrevented&&this.b()}}ne.prototype.b=function(){this.defaultPrevented=!0},b(re,ne);var ie={2:"touch",3:"pen",4:"mouse"};re.prototype.b=function(){re.X.b.call(this);var e=this.c;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,ee)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(t){}};var oe="closure_listenable_"+(1e6*Math.random()|0),ae=0;function se(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.da=i,this.key=++ae,this.Y=this.Z=!1}function ue(e){e.Y=!0,e.listener=null,e.proxy=null,e.src=null,e.da=null}function ce(e){this.src=e,this.a={},this.b=0}function le(e,t){var n=t.type;if(n in e.a){var r,i=e.a[n],o=w(i,t);(r=0<=o)&&Array.prototype.splice.call(i,o,1),r&&(ue(t),0==e.a[n].length&&(delete e.a[n],e.b--))}}function fe(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i];if(!o.Y&&o.listener==t&&o.capture==!!n&&o.da==r)return i}return-1}ce.prototype.add=function(e,t,n,r,i){var o=e.toString();(e=this.a[o])||(e=this.a[o]=[],this.b++);var a=fe(e,t,r,i);return-1<a?(t=e[a],n||(t.Z=!1)):((t=new se(t,this.src,o,!!r,i)).Z=n,e.push(t)),t};var he="closure_lm_"+(1e6*Math.random()|0),de={};function pe(e,t,n,r,i){if(r&&r.once)return ve(e,t,n,r,i);if(Array.isArray(t)){for(var o=0;o<t.length;o++)pe(e,t[o],n,r,i);return null}return n=Se(n),e&&e[oe]?e.wa(t,n,f(r)?!!r.capture:!!r,i):ge(e,t,n,!1,r,i)}function ge(e,t,n,r,i,o){if(!t)throw Error("Invalid event type");var a=f(i)?!!i.capture:!!i;if(a&&!Z)return null;var s=ke(e);if(s||(e[he]=s=new ce(e)),(n=s.add(t,n,r,a,o)).proxy)return n;if(r=function(){var e=we,t=Z?function(n){return e.call(t.src,t.listener,n)}:function(n){if(!(n=e.call(t.src,t.listener,n)))return n};return t}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)te||(i=a),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(be(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function ve(e,t,n,r,i){if(Array.isArray(t)){for(var o=0;o<t.length;o++)ve(e,t[o],n,r,i);return null}return n=Se(n),e&&e[oe]?e.xa(t,n,f(r)?!!r.capture:!!r,i):ge(e,t,n,!0,r,i)}function me(e,t,n,r,i){if(Array.isArray(t))for(var o=0;o<t.length;o++)me(e,t[o],n,r,i);else r=f(r)?!!r.capture:!!r,n=Se(n),e&&e[oe]?(e=e.c,(t=String(t).toString())in e.a&&(-1<(n=fe(o=e.a[t],n,r,i))&&(ue(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete e.a[t],e.b--)))):e&&(e=ke(e))&&(t=e.a[t.toString()],e=-1,t&&(e=fe(t,n,r,i)),(n=-1<e?t[e]:null)&&ye(n))}function ye(e){if("number"!==typeof e&&e&&!e.Y){var t=e.src;if(t&&t[oe])le(t.c,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(be(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=ke(t))?(le(n,e),0==n.b&&(n.src=null,t[he]=null)):ue(e)}}}function be(e){return e in de?de[e]:de[e]="on"+e}function _e(e,t){var n=e.listener,r=e.da||e.src;return e.Z&&ye(e),n.call(r,t)}function we(e,t){if(e.Y)return!0;
2if(!Z){if(!t)e:{t=["window","event"];for(var n=u,r=0;r<t.length;r++)if(null==(n=n[t[r]])){t=null;break e}t=n}return _e(e,t=new re(t,this))}return _e(e,new re(t,this))}function ke(e){return(e=e[he])instanceof ce?e:null}var Ee="__closure_events_fn_"+(1e9*Math.random()>>>0);function Se(e){return"function"===typeof e?e:(e[Ee]||(e[Ee]=function(t){return e.handleEvent(t)}),e[Ee])}function Ie(){_.call(this),this.c=new ce(this),this.J=this,this.D=null}function xe(e,t){var n,r=e.D;if(r)for(n=[];r;r=r.D)n.push(r);if(e=e.J,r=t.type||t,"string"===typeof t)t=new ne(t,e);else if(t instanceof ne)t.target=t.target||e;else{var i=t;D(t=new ne(r,e),i)}if(i=!0,n)for(var o=n.length-1;0<=o;o--){var a=t.a=n[o];i=Te(a,r,!0,t)&&i}if(i=Te(a=t.a=e,r,!0,t)&&i,i=Te(a,r,!1,t)&&i,n)for(o=0;o<n.length;o++)i=Te(a=t.a=n[o],r,!1,t)&&i}function Te(e,t,n,r){if(!(t=e.c.a[String(t)]))return!0;t=t.concat();for(var i=!0,o=0;o<t.length;++o){var a=t[o];if(a&&!a.Y&&a.capture==n){var s=a.listener,u=a.da||a.src;a.Z&&le(e.c,a),i=!1!==s.call(u,r)&&i}}return i&&!r.defaultPrevented}b(Ie,_),Ie.prototype[oe]=!0,(o=Ie.prototype).addEventListener=function(e,t,n,r){pe(this,e,t,n,r)},o.removeEventListener=function(e,t,n,r){me(this,e,t,n,r)},o.H=function(){if(Ie.X.H.call(this),this.c){var e,t=this.c;for(e in t.a){for(var n=t.a[e],r=0;r<n.length;r++)ue(n[r]);delete t.a[e],t.b--}}this.D=null},o.wa=function(e,t,n,r){return this.c.add(String(e),t,!1,n,r)},o.xa=function(e,t,n,r){return this.c.add(String(e),t,!0,n,r)};var Ce=u.JSON.stringify;function Oe(){this.b=this.a=null}var Ae,Ne=new(function(){function e(e,t){this.c=e,this.f=t,this.b=0,this.a=null}return e.prototype.get=function(){var e;return 0<this.b?(this.b--,e=this.a,this.a=e.next,e.next=null):e=this.c(),e},e}())((function(){return new Re}),(function(e){e.reset()}));function Pe(){var e=Le,t=null;return e.a&&(t=e.a,e.a=e.a.next,e.a||(e.b=null),t.next=null),t}function Re(){this.next=this.b=this.a=null}function je(e){u.setTimeout((function(){throw e}),0)}function De(e,t){Ae||function(){var e=u.Promise.resolve(void 0);Ae=function(){e.then(Fe)}}(),Me||(Ae(),Me=!0),Le.add(e,t)}Oe.prototype.add=function(e,t){var n=Ne.get();n.set(e,t),this.b?this.b.next=n:this.a=n,this.b=n},Re.prototype.set=function(e,t){this.a=e,this.b=t,this.next=null},Re.prototype.reset=function(){this.next=this.b=this.a=null};var Me=!1,Le=new Oe;function Fe(){for(var e;e=Pe();){try{e.a.call(e.b)}catch(n){je(n)}var t=Ne;t.f(e),100>t.b&&(t.b++,e.next=t.a,t.a=e)}Me=!1}function Ue(e,t){Ie.call(this),this.b=e||1,this.a=t||u,this.f=v(this.eb,this),this.g=y()}function Ve(e){e.aa=!1,e.M&&(e.a.clearTimeout(e.M),e.M=null)}function Be(e,t,n){if("function"===typeof e)n&&(e=v(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=v(e.handleEvent,e)}return 2147483647<Number(t)?-1:u.setTimeout(e,t||0)}function qe(e){e.a=Be((function(){e.a=null,e.c&&(e.c=!1,qe(e))}),e.h);var t=e.b;e.b=null,e.g.apply(null,t)}b(Ue,Ie),(o=Ue.prototype).aa=!1,o.M=null,o.eb=function(){if(this.aa){var e=y()-this.g;0<e&&e<.8*this.b?this.M=this.a.setTimeout(this.f,this.b-e):(this.M&&(this.a.clearTimeout(this.M),this.M=null),xe(this,"tick"),this.aa&&(Ve(this),this.start()))}},o.start=function(){this.aa=!0,this.M||(this.M=this.a.setTimeout(this.f,this.b),this.g=y())},o.H=function(){Ue.X.H.call(this),Ve(this),delete this.a};var ze=function(e){function t(t,n){var r=e.call(this)||this;return r.g=t,r.h=n,r.b=null,r.c=!1,r.a=null,r}return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.f=function(e){this.b=arguments,this.a?this.c=!0:qe(this)},t.prototype.H=function(){e.prototype.H.call(this),this.a&&(u.clearTimeout(this.a),this.a=null,this.c=!1,this.b=null)},t}(_);function He(e){_.call(this),this.b=e,this.a={}}b(He,_);var Ke=[];function We(e,t,n,r){Array.isArray(n)||(n&&(Ke[0]=n.toString()),n=Ke);for(var i=0;i<n.length;i++){var o=pe(t,n[i],r||e.handleEvent,!1,e.b||e);if(!o)break;e.a[o.key]=o}}function Ge(e){P(e.a,(function(e,t){this.a.hasOwnProperty(t)&&ye(e)}),e),e.a={}}function Ye(){this.a=!0}function $e(e,t,n,r){e.info((function(){return"XMLHTTP TEXT ("+t+"): "+function(e,t){if(!e.a)return t;if(!t)return null;try{var n=JSON.parse(t);if(n)for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var r=n[e];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var o=i[0];if("noop"!=o&&"stop"!=o&&"close"!=o)for(var a=1;a<i.length;a++)i[a]=""}}}return Ce(n)}catch(s){return t}}(e,n)+(r?" "+r:"")}))}He.prototype.H=function(){He.X.H.call(this),Ge(this)},He.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},Ye.prototype.info=function(){};var Qe={},Xe=null;function Je(){return Xe=Xe||new Ie}function Ze(e){ne.call(this,Qe.Ga,e)}function et(e){var t=Je();xe(t,new Ze(t,e))}function tt(e,t){ne.call(this,Qe.STAT_EVENT,e),this.stat=t}function nt(e){var t=Je();xe(t,new tt(t,e))}function rt(e){ne.call(this,Qe.Ha,e)}function it(e,t){if("function"!==typeof e)throw Error("Fn must not be null and must be a function");return u.setTimeout((function(){e()}),t)}Qe.Ga="serverreachability",b(Ze,ne),Qe.STAT_EVENT="statevent",b(tt,ne),Qe.Ha="timingevent",b(rt,ne);var ot={NO_ERROR:0,fb:1,sb:2,rb:3,mb:4,qb:5,tb:6,Ea:7,TIMEOUT:8,wb:9},at={kb:"complete",Gb:"success",Fa:"error",Ea:"abort",yb:"ready",zb:"readystatechange",TIMEOUT:"timeout",ub:"incrementaldata",xb:"progress",nb:"downloadprogress",Ob:"uploadprogress"};function st(){}function ut(e){return e.b||(e.b=e.c())}function ct(){}st.prototype.b=null;var lt,ft={OPEN:"a",jb:"b",Fa:"c",vb:"d"};function ht(){ne.call(this,"d")}
2function dt(){ne.call(this,"c")}function pt(){}function gt(e,t,n,r){this.g=e,this.c=t,this.f=n,this.S=r||1,this.J=new He(this),this.P=vt,e=B?125:void 0,this.R=new Ue(e),this.B=null,this.b=!1,this.j=this.l=this.i=this.G=this.u=this.T=this.o=null,this.s=[],this.a=null,this.D=0,this.h=this.m=null,this.N=-1,this.A=!1,this.O=0,this.F=null,this.V=this.C=this.U=this.I=!1}b(ht,ne),b(dt,ne),b(pt,st),pt.prototype.a=function(){return new XMLHttpRequest},pt.prototype.c=function(){return{}},lt=new pt;var vt=45e3,mt={},yt={};function bt(e,t,n){e.G=1,e.i=Bt(Dt(t)),e.j=n,e.I=!0,_t(e,null)}function _t(e,t){e.u=y(),Et(e),e.l=Dt(e.i);var n=e.l,r=e.S;Array.isArray(r)||(r=[String(r)]),en(n.b,"t",r),e.D=0,e.a=Qn(e.g,e.g.C?t:null),0<e.O&&(e.F=new ze(v(e.Da,e,e.a),e.O)),We(e.J,e.a,"readystatechange",e.bb),t=e.B?R(e.B):{},e.j?(e.m||(e.m="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.a.ba(e.l,e.m,e.j,t)):(e.m="GET",e.a.ba(e.l,e.m,null,t)),et(1),function(e,t,n,r,i,o){e.info((function(){if(e.a)if(o)for(var a="",s=o.split("&"),u=0;u<s.length;u++){var c=s[u].split("=");if(1<c.length){var l=c[0];c=c[1];var f=l.split("_");a=2<=f.length&&"type"==f[1]?a+(l+"=")+c+"&":a+(l+"=redacted&")}}else a=null;else a=o;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+a}))}(e.c,e.m,e.l,e.f,e.S,e.j)}function wt(e,t,n){for(var r=!0;!e.A&&e.D<n.length;){var i=kt(e,n);if(i==yt){4==t&&(e.h=4,nt(14),r=!1),$e(e.c,e.f,null,"[Incomplete Response]");break}if(i==mt){e.h=4,nt(15),$e(e.c,e.f,n,"[Invalid Chunk]"),r=!1;break}$e(e.c,e.f,i,null),Ct(e,i)}4==t&&0==n.length&&(e.h=1,nt(16),r=!1),e.b=e.b&&r,r?0<n.length&&!e.V&&(e.V=!0,(t=e.g).a==e&&t.U&&!t.F&&(t.c.info("Great, no buffering proxy detected. Bytes received: "+n.length),qn(t),t.F=!0,nt(11))):($e(e.c,e.f,n,"[Invalid Chunked Response]"),Tt(e),xt(e))}function kt(e,t){var n=e.D,r=t.indexOf("\n",n);return-1==r?yt:(n=Number(t.substring(n,r)),isNaN(n)?mt:(r+=1)+n>t.length?yt:(t=t.substr(r,n),e.D=r+n,t))}function Et(e){e.T=y()+e.P,St(e,e.P)}function St(e,t){if(null!=e.o)throw Error("WatchDog timer not null");e.o=it(v(e.$a,e),t)}function It(e){e.o&&(u.clearTimeout(e.o),e.o=null)}function xt(e){0==e.g.v||e.A||Kn(e.g,e)}function Tt(e){It(e);var t=e.F;t&&"function"==typeof t.ka&&t.ka(),e.F=null,Ve(e.R),Ge(e.J),e.a&&(t=e.a,e.a=null,t.abort(),t.ka())}function Ct(e,t){try{var n=e.g;if(0!=n.v&&(n.a==e||un(n.b,e)))if(n.I=e.N,!e.C&&un(n.b,e)&&3==n.v){try{var r=n.la.a.parse(t)}catch(m){r=null}if(Array.isArray(r)&&3==r.length){var i=r;if(0==i[0]){e:if(!n.j){if(n.a){if(!(n.a.u+3e3<e.u))break e;Hn(n),Rn(n)}Bn(n),nt(18)}}else n.pa=i[1],0<n.pa-n.P&&37500>i[2]&&n.G&&0==n.o&&!n.m&&(n.m=it(v(n.Xa,n),6e3));if(1>=sn(n.b)&&n.fa){try{n.fa()}catch(m){}n.fa=void 0}}else Gn(n,11)}else if((e.C||n.a==e)&&Hn(n),!I(t))for(t=r=n.la.a.parse(t),r=0;r<t.length;r++)if(i=t[r],n.P=i[0],i=i[1],2==n.v)if("c"==i[0]){n.J=i[1],n.ha=i[2];var o=i[3];null!=o&&(n.ia=o,n.c.info("VER="+n.ia));var a=i[4];null!=a&&(n.qa=a,n.c.info("SVER="+n.qa));var s=i[5];if(null!=s&&"number"===typeof s&&0<s){var u=1.5*s;n.D=u,n.c.info("backChannelRequestTimeoutMs_="+u)}u=n;var c=e.a;if(c){var l=c.a?c.a.getResponseHeader("X-Client-Wire-Protocol"):null;if(l){var f=u.b;!f.a&&(C(l,"spdy")||C(l,"quic")||C(l,"h2"))&&(f.f=f.g,f.a=new Set,f.b&&(cn(f,f.b),f.b=null))}if(u.A){var h=c.a?c.a.getResponseHeader("X-HTTP-Session-Id"):null;h&&(u.oa=h,Vt(u.B,u.A,h))}}n.v=3,n.f&&n.f.ua(),n.U&&(n.N=y()-e.u,n.c.info("Handshake RTT: "+n.N+"ms"));var d=e;if((u=n).ma=$n(u,u.C?u.ha:null,u.ga),d.C){ln(u.b,d);var p=d,g=u.D;g&&p.setTimeout(g),p.o&&(It(p),Et(p)),u.a=d}else Vn(u);0<n.g.length&&Mn(n)}else"stop"!=i[0]&&"close"!=i[0]||Gn(n,7);else 3==n.v&&("stop"==i[0]||"close"==i[0]?"stop"==i[0]?Gn(n,7):Pn(n):"noop"!=i[0]&&n.f&&n.f.ta(i),n.o=0);et(4)}catch(m){}}function Ot(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(l(e)||"string"===typeof e)k(e,t,void 0);else{if(e.L&&"function"==typeof e.L)var n=e.L();else if(e.K&&"function"==typeof e.K)n=void 0;else if(l(e)||"string"===typeof e){n=[];for(var r=e.length,i=0;i<r;i++)n.push(i)}else for(i in n=[],r=0,e)n[r++]=i;i=(r=function(e){if(e.K&&"function"==typeof e.K)return e.K();if("string"===typeof e)return e.split("");
vendor: 5,327 bytes, line 2
2if(l(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}(e)).length;for(var o=0;o<i;o++)t.call(void 0,r[o],n&&n[o],e)}}function At(e,t){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(e)if(e instanceof At)for(n=e.L(),r=0;r<n.length;r++)this.set(n[r],e.get(n[r]));else for(r in e)this.set(r,e[r])}function Nt(e){if(e.c!=e.a.length){for(var t=0,n=0;t<e.a.length;){var r=e.a[t];Pt(e.b,r)&&(e.a[n++]=r),t++}e.a.length=n}if(e.c!=e.a.length){var i={};for(n=t=0;t<e.a.length;)Pt(i,r=e.a[t])||(e.a[n++]=r,i[r]=1),t++;e.a.length=n}}function Pt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(o=gt.prototype).setTimeout=function(e){this.P=e},o.bb=function(e){e=e.target;var t=this.F;t&&3==Cn(e)?t.f():this.Da(e)},o.Da=function(e){try{if(e==this.a)e:{var t=Cn(this.a),n=this.a.va(),r=this.a.W();if(!(3>t||3==t&&!B&&!this.a.$())){this.A||4!=t||7==n||et(8==n||0>=r?3:2),It(this);var i=this.a.W();this.N=i;var o=this.a.$();if(this.b=200==i,function(e,t,n,r,i,o,a){e.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+o+" "+a}))}(this.c,this.m,this.l,this.f,this.S,t,i),this.b){if(this.U&&!this.C){t:{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 t}}u=null}if(!u){this.b=!1,this.h=3,nt(12),Tt(this),xt(this);break e}$e(this.c,this.f,u,"Initial handshake response via X-HTTP-Initial-Response"),this.C=!0,Ct(this,u)}this.I?(wt(this,t,o),B&&this.b&&3==t&&(We(this.J,this.R,"tick",this.ab),this.R.start())):($e(this.c,this.f,o,null),Ct(this,o)),4==t&&Tt(this),this.b&&!this.A&&(4==t?Kn(this.g,this):(this.b=!1,Et(this)))}else 400==i&&0<o.indexOf("Unknown SID")?(this.h=3,nt(12)):(this.h=0,nt(13)),Tt(this),xt(this)}}}catch(c){}},o.ab=function(){if(this.a){var e=Cn(this.a),t=this.a.$();this.D<t.length&&(It(this),wt(this,e,t),this.b&&4!=e&&Et(this))}},o.cancel=function(){this.A=!0,Tt(this)},o.$a=function(){this.o=null;var e=y();0<=e-this.T?(function(e,t){e.info((function(){return"TIMEOUT: "+t}))}(this.c,this.l),2!=this.G&&(et(3),nt(17)),Tt(this),this.h=2,xt(this)):St(this,this.T-e)},(o=At.prototype).K=function(){Nt(this);for(var e=[],t=0;t<this.a.length;t++)e.push(this.b[this.a[t]]);return e},o.L=function(){return Nt(this),this.a.concat()},o.get=function(e,t){return Pt(this.b,e)?this.b[e]:t},o.set=function(e,t){Pt(this.b,e)||(this.c++,this.a.push(e)),this.b[e]=t},o.forEach=function(e,t){for(var n=this.L(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);e.call(t,o,i,this)}};var Rt=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function jt(e,t){if(this.c=this.j=this.f="",this.h=null,this.i=this.g="",this.a=!1,e instanceof jt){this.a=void 0!==t?t:e.a,Mt(this,e.f),this.j=e.j,Lt(this,e.c),Ft(this,e.h),this.g=e.g,t=e.b;var n=new Qt;n.c=t.c,t.a&&(n.a=new At(t.a),n.b=t.b),Ut(this,n),this.i=e.i}else e&&(n=String(e).match(Rt))?(this.a=!!t,Mt(this,n[1]||"",!0),this.j=qt(n[2]||""),Lt(this,n[3]||"",!0),Ft(this,n[4]),this.g=qt(n[5]||"",!0),Ut(this,n[6]||"",!0),this.i=qt(n[7]||"")):(this.a=!!t,this.b=new Qt(null,this.a))}function Dt(e){return new jt(e)}function Mt(e,t,n){e.f=n?qt(t,!0):t,e.f&&(e.f=e.f.replace(/:$/,""))}function Lt(e,t,n){e.c=n?qt(t,!0):t}function Ft(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.h=t}else e.h=null}function Ut(e,t,n){t instanceof Qt?(e.b=t,function(e,t){t&&!e.f&&(Xt(e),e.c=null,e.a.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(Jt(this,t),en(this,n,e))}),e)),e.f=t}(e.b,e.a)):(n||(t=zt(t,Yt)),e.b=new Qt(t,e.a))}function Vt(e,t,n){e.b.set(t,n)}function Bt(e){return Vt(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^y()).toString(36)),e}function qt(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function zt(e,t,n){return"string"===typeof e?(e=encodeURI(e).replace(t,Ht),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Ht(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}jt.prototype.toString=function(){var e=[],t=this.f;t&&e.push(zt(t,Kt,!0),":");var n=this.c;return(n||"file"==t)&&(e.push("//"),(t=this.j)&&e.push(zt(t,Kt,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.h)&&e.push(":",String(n))),(n=this.g)&&(this.c&&"/"!=n.charAt(0)&&e.push("/"),e.push(zt(n,"/"==n.charAt(0)?Gt:Wt,!0))),(n=this.b.toString())&&e.push("?",n),(n=this.i)&&e.push("#",zt(n,$t)),e.join("")};var Kt=/[#\/\?@]/g,Wt=/[#\?:]/g,Gt=/[#\?]/g,Yt=/[#\?@]/g,$t=/#/g;function Qt(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function Xt(e){e.a||(e.a=new At,e.b=0,e.c&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var o=e[n].substring(0,r);i=e[n].substring(r+1)}else o=e[n];t(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.c,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function Jt(e,t){Xt(e),t=tn(e,t),Pt(e.a.b,t)&&(e.c=null,e.b-=e.a.get(t).length,Pt((e=e.a).b,t)&&(delete e.b[t],e.c--,e.a.length>2*e.c&&Nt(e)))}function Zt(e,t){return Xt(e),t=tn(e,t),Pt(e.a.b,t)}
2function en(e,t,n){Jt(e,t),0<n.length&&(e.c=null,e.a.set(tn(e,t),S(n)),e.b+=n.length)}function tn(e,t){return t=String(t),e.f&&(t=t.toLowerCase()),t}(o=Qt.prototype).add=function(e,t){Xt(this),this.c=null,e=tn(this,e);var n=this.a.get(e);return n||this.a.set(e,n=[]),n.push(t),this.b+=1,this},o.forEach=function(e,t){Xt(this),this.a.forEach((function(n,r){k(n,(function(n){e.call(t,n,r,this)}),this)}),this)},o.L=function(){Xt(this);for(var e=this.a.K(),t=this.a.L(),n=[],r=0;r<t.length;r++)for(var i=e[r],o=0;o<i.length;o++)n.push(t[r]);return n},o.K=function(e){Xt(this);var t=[];if("string"===typeof e)Zt(this,e)&&(t=E(t,this.a.get(tn(this,e))));else{e=this.a.K();for(var n=0;n<e.length;n++)t=E(t,e[n])}return t},o.set=function(e,t){return Xt(this),this.c=null,Zt(this,e=tn(this,e))&&(this.b-=this.a.get(e).length),this.a.set(e,[t]),this.b+=1,this},o.get=function(e,t){return e&&0<(e=this.K(e)).length?String(e[0]):t},o.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var e=[],t=this.a.L(),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r));r=this.K(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),e.push(a)}}return this.c=e.join("&")};var nn=function(e,t){this.b=e,this.a=t};function rn(e){this.g=e||on,u.PerformanceNavigationTiming?e=0<(e=u.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(u.ja&&u.ja.za&&u.ja.za()&&u.ja.za().Qb),this.f=e?this.g:1,this.a=null,1<this.f&&(this.a=new Set),this.b=null,this.c=[]}var on=10;function an(e){return!!e.b||!!e.a&&e.a.size>=e.f}function sn(e){return e.b?1:e.a?e.a.size:0}function un(e,t){return e.b?e.b==t:!!e.a&&e.a.has(t)}function cn(e,t){e.a?e.a.add(t):e.b=t}function ln(e,t){e.b&&e.b==t?e.b=null:e.a&&e.a.has(t)&&e.a.delete(t)}function fn(e){var t,n;if(null!=e.b)return e.c.concat(e.b.s);if(null!=e.a&&0!==e.a.size){var r=e.c;try{for(var o=i(e.a.values()),a=o.next();!a.done;a=o.next()){var s=a.value;r=r.concat(s.s)}}catch(u){t={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}return S(e.c)}function hn(){}function dn(){this.a=new hn}function pn(e,t,n){var r=n||"";try{Ot(e,(function(e,n){var i=e;f(e)&&(i=Ce(e)),t.push(r+n+"="+encodeURIComponent(i))}))}catch(i){throw t.push(r+"type="+encodeURIComponent("_badmap")),i}}function gn(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(o){}}rn.prototype.cancel=function(){var e,t;if(this.c=fn(this),this.b)this.b.cancel(),this.b=null;else if(this.a&&0!==this.a.size){try{for(var n=i(this.a.values()),r=n.next();!r.done;r=n.next()){r.value.cancel()}}catch(o){e={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.a.clear()}},hn.prototype.stringify=function(e){return u.JSON.stringify(e,void 0)},hn.prototype.parse=function(e){return u.JSON.parse(e,void 0)};var vn=u.JSON.parse;function mn(e){Ie.call(this),this.headers=new At,this.l=e||null,this.b=!1,this.u=this.a=null,this.C="",this.h=0,this.f="",this.g=this.B=this.m=this.A=!1,this.s=0,this.o=null,this.I=bn,this.F=this.G=!1}b(mn,Ie);var yn,bn="",_n=/^https?$/i,wn=["POST","PUT"];function kn(e){return"content-type"==e.toLowerCase()}function En(e,t){e.b=!1,e.a&&(e.g=!0,e.a.abort(),e.g=!1),e.f=t,e.h=5,Sn(e),xn(e)}function Sn(e){e.A||(e.A=!0,xe(e,"complete"),xe(e,"error"))}function In(e){if(e.b&&"undefined"!=typeof s&&(!e.u[1]||4!=Cn(e)||2!=e.W()))if(e.m&&4==Cn(e))Be(e.Aa,0,e);else if(xe(e,"readystatechange"),4==Cn(e)){e.b=!1;try{var t,n=e.W();e:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break e;default:r=!1}if(!(t=r)){var i;if(i=0===n){var o=String(e.C).match(Rt)[1]||null;if(!o&&u.self&&u.self.location){var a=u.self.location.protocol;o=a.substr(0,a.length-1)}i=!_n.test(o?o.toLowerCase():"")}t=i}if(t)xe(e,"complete"),xe(e,"success");else{e.h=6;try{var c=2<Cn(e)?e.a.statusText:""}catch(n){c=""}e.f=c+" ["+e.W()+"]",Sn(e)}}finally{xn(e)}}}function xn(e,t){if(e.a){Tn(e);var n=e.a,r=e.u[0]?c:null;e.a=null,e.u=null,t||xe(e,"ready");try{n.onreadystatechange=r}catch(i){}}}function Tn(e){e.a&&e.F&&(e.a.ontimeout=null),e.o&&(u.clearTimeout(e.o),e.o=null)}function Cn(e){return e.a?e.a.readyState:0}function On(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=function(e){var t="";return P(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}(n),"string"===typeof e?null!=n&&encodeURIComponent(String(n)):Vt(e,t,n))}
2function An(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function Nn(e){this.qa=0,this.g=[],this.c=new Ye,this.ha=this.ma=this.B=this.ga=this.a=this.oa=this.A=this.V=this.i=this.O=this.l=null,this.Pa=this.R=0,this.Ma=An("failFast",!1,e),this.G=this.m=this.j=this.h=this.f=null,this.S=!0,this.I=this.pa=this.P=-1,this.T=this.o=this.u=0,this.Ia=An("baseRetryDelayMs",5e3,e),this.Sa=An("retryDelaySeedMs",1e4,e),this.Na=An("forwardChannelMaxRetries",2,e),this.na=An("forwardChannelRequestTimeoutMs",2e4,e),this.Oa=e&&e.xmlHttpFactory||void 0,this.D=void 0,this.C=e&&e.supportsCrossDomainXhr||!1,this.J="",this.b=new rn(e&&e.concurrentRequestLimit),this.la=new dn,this.ea=e&&e.fastHandshake||!1,this.Ja=e&&e.b||!1,e&&e.f&&(this.c.a=!1),e&&e.forceLongPolling&&(this.S=!1),this.U=!this.ea&&this.S&&e&&e.detectBufferingProxy||!1,this.fa=void 0,this.N=0,this.F=!1,this.s=null,(this.La=e&&e.c||!1)&&this.c.info("Opt-in to enable Chrome Origin Trials.")}function Pn(e){if(jn(e),3==e.v){var t=e.R++,n=Dt(e.B);Vt(n,"SID",e.J),Vt(n,"RID",t),Vt(n,"TYPE","terminate"),Fn(e,n),(t=new gt(e,e.c,t,void 0)).G=2,t.i=Bt(Dt(n)),n=!1,u.navigator&&u.navigator.sendBeacon&&(n=u.navigator.sendBeacon(t.i.toString(),"")),!n&&u.Image&&((new Image).src=t.i,n=!0),n||(t.a=Qn(t.g,null),t.a.ba(t.i)),t.u=y(),Et(t)}Yn(e)}function Rn(e){e.a&&(qn(e),e.a.cancel(),e.a=null)}function jn(e){Rn(e),e.j&&(u.clearTimeout(e.j),e.j=null),Hn(e),e.b.cancel(),e.h&&("number"===typeof e.h&&u.clearTimeout(e.h),e.h=null)}function Dn(e,t){e.g.push(new nn(e.Pa++,t)),3==e.v&&Mn(e)}function Mn(e){an(e.b)||e.h||(e.h=!0,De(e.Ca,e),e.u=0)}function Ln(e,t){var n;n=t?t.f:e.R++;var r=Dt(e.B);Vt(r,"SID",e.J),Vt(r,"RID",n),Vt(r,"AID",e.P),Fn(e,r),e.i&&e.l&&On(r,e.i,e.l),n=new gt(e,e.c,n,e.u+1),null===e.i&&(n.B=e.l),t&&(e.g=t.s.concat(e.g)),t=Un(e,n,1e3),n.setTimeout(Math.round(.5*e.na)+Math.round(.5*e.na*Math.random())),cn(e.b,n),bt(n,r,t)}function Fn(e,t){e.f&&Ot({},(function(e,n){Vt(t,n,e)}))}function Un(e,t,n){n=Math.min(e.g.length,n);var r=e.f?v(e.f.Ka,e.f,e):null;e:for(var i=e.g,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{pn(l,a,"req"+c+"_")}catch(f){r&&r(l)}}if(s){r=a.join("&");break e}}return e=e.g.splice(0,n),t.s=e,r}function Vn(e){e.a||e.j||(e.T=1,De(e.Ba,e),e.o=0)}function Bn(e){return!(e.a||e.j||3<=e.o)&&(e.T++,e.j=it(v(e.Ba,e),Wn(e,e.o)),e.o++,!0)}function qn(e){null!=e.s&&(u.clearTimeout(e.s),e.s=null)}function zn(e){e.a=new gt(e,e.c,"rpc",e.T),null===e.i&&(e.a.B=e.l),e.a.O=0;var t=Dt(e.ma);Vt(t,"RID","rpc"),Vt(t,"SID",e.J),Vt(t,"CI",e.G?"0":"1"),Vt(t,"AID",e.P),Fn(e,t),Vt(t,"TYPE","xmlhttp"),e.i&&e.l&&On(t,e.i,e.l),e.D&&e.a.setTimeout(e.D);var n=e.a;e=e.ha,n.G=1,n.i=Bt(Dt(t)),n.j=null,n.I=!0,_t(n,e)}function Hn(e){null!=e.m&&(u.clearTimeout(e.m),e.m=null)}function Kn(e,t){var n=null;if(e.a==t){Hn(e),qn(e),e.a=null;var r=2}else{if(!un(e.b,t))return;n=t.s,ln(e.b,t),r=1}if(e.I=t.N,0!=e.v)if(t.b)if(1==r){n=t.j?t.j.length:0,t=y()-t.u;var i=e.u;xe(r=Je(),new rt(r,n,t,i)),Mn(e)}else Vn(e);else if(3==(i=t.h)||0==i&&0<e.I||!(1==r&&function(e,t){return!(sn(e.b)>=e.b.f-(e.h?1:0))&&(e.h?(e.g=t.s.concat(e.g),!0):!(1==e.v||2==e.v||e.u>=(e.Ma?0:e.Na))&&(e.h=it(v(e.Ca,e,t),Wn(e,e.u)),e.u++,!0))}(e,t)||2==r&&Bn(e)))switch(n&&0<n.length&&(t=e.b,t.c=t.c.concat(n)),i){case 1:Gn(e,5);break;case 4:Gn(e,10);break;case 3:Gn(e,6);break;default:Gn(e,2)}}function Wn(e,t){var n=e.Ia+Math.floor(Math.random()*e.Sa);return e.f||(n*=2),n*t}function Gn(e,t){if(e.c.info("Error code "+t),2==t){var n=null;e.f&&(n=null);var r=v(e.cb,e);n||(n=new jt("//www.google.com/images/cleardot.gif"),u.location&&"http"==u.location.protocol||Mt(n,"https"),Bt(n)),function(e,t){var n=new Ye;if(u.Image){var r=new Image;r.onload=m(gn,n,r,"TestLoadImage: loaded",!0,t),r.onerror=m(gn,n,r,"TestLoadImage: error",!1,t),r.onabort=m(gn,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=m(gn,n,r,"TestLoadImage: timeout",!1,t),u.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}(n.toString(),r)}else nt(2);e.v=0,e.f&&e.f.sa(t),Yn(e),jn(e)}function Yn(e){e.v=0,e.I=-1,e.f&&(0==fn(e.b).length&&0==e.g.length||(e.b.c.length=0,S(e.g),e.g.length=0),e.f.ra())}function $n(e,t,n){var r=function(e){return e instanceof jt?Dt(e):new jt(e,void 0)}(n);if(""!=r.c)t&&Lt(r,t+"."+r.c),Ft(r,r.h);else{var i=u.location;r=function(e,t,n,r){var i=new jt(null,void 0);return e&&Mt(i,e),t&&Lt(i,t),n&&Ft(i,n),r&&(i.g=r),i}(i.protocol,t?t+"."+i.hostname:i.hostname,+i.port,n)}return e.V&&P(e.V,(function(e,t){Vt(r,t,e)})),t=e.A,n=e.oa,t&&n&&Vt(r,t,n),Vt(r,"VER",e.ia),Fn(e,r),r}function Qn(e,t){if(t&&!e.C)throw Error("Can't create secondary domain capable XhrIo object.");return(t=new mn(e.Oa)).G=e.C,t}function Xn(){}function Jn(){if(U&&!(10<=Number(J)))throw Error("Environmental error: no available transport.")}function Zn(e,t){Ie.call(this),this.a=new Nn(t),this.g=e,this.b=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.a.l=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.a&&(e?e["X-WebChannel-Client-Profile"]=t.a:e={"X-WebChannel-Client-Profile":t.a}),this.a.O=e,(e=t&&t.httpHeadersOverwriteParam)&&!I(e)&&(this.a.i=e),this.o=t&&t.supportsCrossDomainXhr||!1,this.m=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!I(t)&&(this.a.A=t,null!==(e=this.b)&&t in e&&(t in(e=this.b)&&delete e[t])),this.f=new nr(this)}function er(e){ht.call(this);var t=e.__sm__;if(t){e:{for(var n in t){e=n;break e}e=void 0}(this.c=e)?(e=this.c,this.data=null!==t&&e in t?t[e]:void 0):this.data=t}else this.data=e}function tr(){dt.call(this),this.status=1}function nr(e){this.a=e}function rr(e){this.f=e}function ir(e){Ie.call(this),this.u=e,this.h=void 0,this.readyState=or,this.status=0,this.responseType=this.responseText=this.statusText="",this.onreadystatechange=null,this.l=new Headers,this.b=null,this.s="GET",this.o="",this.a=!1,this.m=this.f=this.g=null}(o=mn.prototype).ba=function(e,t,n,r){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.C+"; newUri="+e);t=t?t.toUpperCase():"GET",this.C=e,this.f="",this.h=0,this.A=!1,this.b=!0,this.a=this.l?this.l.a():lt.a(),this.u=this.l?ut(this.l):ut(lt),this.a.onreadystatechange=v(this.Aa,this);try{this.B=!0,this.a.open(t,String(e),!0),this.B=!1}catch(o){return void En(this,o)}e=n||"";var i=new At(this.headers);r&&Ot(r,(function(e,t){i.set(t,e)})),r=function(e){e:{for(var t=kn,n=e.length,r="string"===typeof e?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e)){t=i;break e}t=-1}return 0>t?null:"string"===typeof e?e.charAt(t):e[t]}(i.L()),n=u.FormData&&e instanceof u.FormData,!(0<=w(wn,t))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;
2charset=utf-8"),i.forEach((function(e,t){this.a.setRequestHeader(t,e)}),this),this.I&&(this.a.responseType=this.I),"withCredentials"in this.a&&this.a.withCredentials!==this.G&&(this.a.withCredentials=this.G);try{Tn(this),0<this.s&&((this.F=function(e){return U&&Q(9)&&"number"===typeof e.timeout&&void 0!==e.ontimeout}(this.a))?(this.a.timeout=this.s,this.a.ontimeout=v(this.ya,this)):this.o=Be(this.ya,this.s,this)),this.m=!0,this.a.send(e),this.m=!1}catch(o){En(this,o)}},o.ya=function(){"undefined"!=typeof s&&this.a&&(this.f="Timed out after "+this.s+"ms, aborting",this.h=8,xe(this,"timeout"),this.abort(8))},o.abort=function(e){this.a&&this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.h=e||7,xe(this,"complete"),xe(this,"abort"),xn(this))},o.H=function(){this.a&&(this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),xn(this,!0)),mn.X.H.call(this)},o.Aa=function(){this.j||(this.B||this.m||this.g?In(this):this.Za())},o.Za=function(){In(this)},o.W=function(){try{return 2<Cn(this)?this.a.status:-1}catch(yn){return-1}},o.$=function(){try{return this.a?this.a.responseText:""}catch(yn){return""}},o.Qa=function(e){if(this.a){var t=this.a.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),vn(t)}},o.va=function(){return this.h},o.Ra=function(){return"string"===typeof this.f?this.f:String(this.f)},(o=Nn.prototype).ia=8,o.v=1,o.Ca=function(e){if(this.h)if(this.h=null,1==this.v){if(!e){this.R=Math.floor(1e5*Math.random()),e=this.R++;var t,n=new gt(this,this.c,e,void 0),r=this.l;if(this.O&&(r?D(r=R(r),this.O):r=this.O),null===this.i&&(n.B=r),this.ea)e:{for(var i=t=0;i<this.g.length;i++){var o=this.g[i];if(void 0===(o="__data__"in o.a&&"string"===typeof(o=o.a.__data__)?o.length:void 0))break;if(4096<(t+=o)){t=i;break e}if(4096===t||i===this.g.length-1){t=i+1;break e}}t=1e3}else t=1e3;t=Un(this,n,t),Vt(i=Dt(this.B),"RID",e),Vt(i,"CVER",22),this.A&&Vt(i,"X-HTTP-Session-Id",this.A),Fn(this,i),this.i&&r&&On(i,this.i,r),cn(this.b,n),this.Ja&&Vt(i,"TYPE","init"),this.ea?(Vt(i,"$req",t),Vt(i,"SID","null"),n.U=!0,bt(n,i,null)):bt(n,i,t),this.v=2}}else 3==this.v&&(e?Ln(this,e):0==this.g.length||an(this.b)||Ln(this))},o.Ba=function(){if(this.j=null,zn(this),this.U&&!(this.F||null==this.a||0>=this.N)){var e=2*this.N;this.c.info("BP detection timer enabled: "+e),this.s=it(v(this.Ya,this),e)}},o.Ya=function(){this.s&&(this.s=null,this.c.info("BP detection timeout reached."),this.c.info("Buffering proxy detected and switch to long-polling!"),this.G=!1,this.F=!0,nt(10),Rn(this),zn(this))},o.Xa=function(){null!=this.m&&(this.m=null,Rn(this),Bn(this),nt(19))},o.cb=function(e){e?(this.c.info("Successfully pinged google.com"),nt(2)):(this.c.info("Failed to ping google.com"),nt(1))},(o=Xn.prototype).ua=function(){},o.ta=function(){},o.sa=function(){},o.ra=function(){},o.Ka=function(){},Jn.prototype.a=function(e,t){return new Zn(e,t)},b(Zn,Ie),Zn.prototype.h=function(){this.a.f=this.f,this.o&&(this.a.C=!0);var e=this.a,t=this.g,n=this.b||void 0;nt(0),e.ga=t,e.V=n||{},e.G=e.S,e.B=$n(e,null,e.ga),Mn(e)},Zn.prototype.close=function(){Pn(this.a)},Zn.prototype.l=function(e){if("string"===typeof e){var t={};t.__data__=e,Dn(this.a,t)}else this.m?((t={}).__data__=Ce(e),Dn(this.a,t)):Dn(this.a,e)},Zn.prototype.H=function(){this.a.f=null,delete this.f,Pn(this.a),delete this.a,Zn.X.H.call(this)},b(er,ht),b(tr,dt),b(nr,Xn),nr.prototype.ua=function(){xe(this.a,"a")},nr.prototype.ta=function(e){xe(this.a,new er(e))},nr.prototype.sa=function(e){xe(this.a,new tr(e))},nr.prototype.ra=function(){xe(this.a,"b")},b(rr,st),rr.prototype.a=function(){return new ir(this.f)},rr.prototype.c=(yn={},function(){return yn}),b(ir,Ie);var or=0;function ar(e){e.f.read().then(e.Ta.bind(e)).catch(e.ca.bind(e))}function sr(e){e.readyState=4,e.g=null,e.f=null,e.m=null,ur(e)}function ur(e){e.onreadystatechange&&e.onreadystatechange.call(e)}(o=ir.prototype).open=function(e,t){if(this.readyState!=or)throw this.abort(),Error("Error reopening a connection");this.s=e,this.o=t,this.readyState=1,ur(this)},o.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var t={headers:this.l,method:this.s,credentials:this.h,cache:void 0};
2e&&(t.body=e),this.u.fetch(new Request(this.o,t)).then(this.Wa.bind(this),this.ca.bind(this))},o.abort=function(){this.responseText="",this.l=new Headers,this.status=0,this.f&&this.f.cancel("Request was aborted."),1<=this.readyState&&this.a&&4!=this.readyState&&(this.a=!1,sr(this)),this.readyState=or},o.Wa=function(e){this.a&&(this.g=e,this.b||(this.status=this.g.status,this.statusText=this.g.statusText,this.b=e.headers,this.readyState=2,ur(this)),this.a&&(this.readyState=3,ur(this),this.a&&("arraybuffer"===this.responseType?e.arrayBuffer().then(this.Ua.bind(this),this.ca.bind(this)):"undefined"!==typeof u.ReadableStream&&"body"in e?(this.responseText="",this.f=e.body.getReader(),this.m=new TextDecoder,ar(this)):e.text().then(this.Va.bind(this),this.ca.bind(this)))))},o.Ta=function(e){if(this.a){var t=this.m.decode(e.value?e.value:new Uint8Array(0),{stream:!e.done});t&&(this.responseText+=t),e.done?sr(this):ur(this),3==this.readyState&&ar(this)}},o.Va=function(e){this.a&&(this.responseText=e,sr(this))},o.Ua=function(){this.a&&sr(this)},o.ca=function(){this.a&&sr(this)},o.setRequestHeader=function(e,t){this.l.append(e,t)},o.getResponseHeader=function(e){return this.b&&this.b.get(e.toLowerCase())||""},o.getAllResponseHeaders=function(){if(!this.b)return"";for(var e=[],t=this.b.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(ir.prototype,"withCredentials",{get:function(){return"include"===this.h},set:function(e){this.h=e?"include":"same-origin"}}),Jn.prototype.createWebChannel=Jn.prototype.a,Zn.prototype.send=Zn.prototype.l,Zn.prototype.open=Zn.prototype.h,Zn.prototype.close=Zn.prototype.close,ot.NO_ERROR=0,ot.TIMEOUT=8,ot.HTTP_ERROR=6,at.COMPLETE="complete",ct.EventType=ft,ft.OPEN="a",ft.CLOSE="b",ft.ERROR="c",ft.MESSAGE="d",Ie.prototype.listen=Ie.prototype.wa,mn.prototype.listenOnce=mn.prototype.xa,mn.prototype.getLastError=mn.prototype.Ra,mn.prototype.getLastErrorCode=mn.prototype.va,mn.prototype.getStatus=mn.prototype.W,mn.prototype.getResponseJson=mn.prototype.Qa,mn.prototype.getResponseText=mn.prototype.$,mn.prototype.send=mn.prototype.ba;var cr=function(){return new Jn},lr=function(){return Je()},fr=ot,hr=at,dr=Qe,pr={lb:0,ob:1,pb:2,Ib:3,Nb:4,Kb:5,Lb:6,Jb:7,Hb:8,Mb:9,PROXY:10,NOPROXY:11,Fb:12,Bb:13,Cb:14,Ab:15,Db:16,Eb:17,hb:18,gb:19,ib:20},gr=rr,vr=ct,mr=mn}).call(this,n(32))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return _}));var r=n(14),i=n(15),o=n(2),a=n.n(o),s=n(24),u=(n(9),n(4)),c=n(19),l=n(21),f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).history=Object(s.a)(t.props),t}return Object(i.a)(t,e),t.prototype.render=function(){return a.a.createElement(r.b,{history:this.history,children:this.props.children})},t}(a.a.Component);a.a.Component;var h=function(e,t){return"function"===typeof e?e(t):e},d=function(e,t){return"string"===typeof e?Object(s.c)(e,null,null,t):e},p=function(e){return e},g=a.a.forwardRef;"undefined"===typeof g&&(g=p);var v=g((function(e,t){var n=e.innerRef,r=e.navigate,i=e.onClick,o=Object(c.a)(e,["innerRef","navigate","onClick"]),s=o.target,l=Object(u.a)({},o,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return l.ref=p!==g&&t||n,a.a.createElement("a",l)}));var m=g((function(e,t){var n=e.component,i=void 0===n?v:n,o=e.replace,s=e.to,f=e.innerRef,m=Object(c.a)(e,["component","replace","to","innerRef"]);return a.a.createElement(r.d.Consumer,null,(function(e){e||Object(l.a)(!1);var n=e.history,r=d(h(s,e.location),e.location),c=r?n.createHref(r):"",v=Object(u.a)({},m,{href:c,navigate:function(){var t=h(s,e.location);(o?n.replace:n.push)(t)}});return p!==g?v.ref=t||f:v.innerRef=f,a.a.createElement(i,v)}))})),y=function(e){return e},b=a.a.forwardRef;"undefined"===typeof b&&(b=y);var _=b((function(e,t){var n=e["aria-current"],i=void 0===n?"page":n,o=e.activeClassName,s=void 0===o?"active":o,f=e.activeStyle,p=e.className,g=e.exact,v=e.isActive,_=e.location,w=e.sensitive,k=e.strict,E=e.style,S=e.to,I=e.innerRef,x=Object(c.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return a.a.createElement(r.d.Consumer,null,(function(e){e||Object(l.a)(!1);var n=_||e.location,o=d(h(S,n),n),c=o.pathname,T=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),C=T?Object(r.e)(n.pathname,{path:T,exact:g,sensitive:w,strict:k}):null,O=!!(v?v(C,n):C),A=O?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(p,s):p,N=O?Object(u.a)({},E,{},f):E,P=Object(u.a)({"aria-current":O&&i||null,className:A,style:N,to:o},x);return y!==b?P.ref=t||I:P.innerRef=I,a.a.createElement(m,P)}))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}
2));var r=n(28);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";var r="Invariant failed";t.a=function(e,t){if(!e)throw new Error(r)}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(37);var i=n(39);function o(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(i.a)(e)||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(e,t,n){"use strict";n.d(t,"a",(function(){return E})),n.d(t,"b",(function(){return O})),n.d(t,"d",(function(){return N})),n.d(t,"c",(function(){return g})),n.d(t,"f",(function(){return v})),n.d(t,"e",(function(){return p}));var r=n(4);function i(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}var a=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],a=t&&t.split("/")||[],s=e&&i(e),u=t&&i(t),c=s||u;if(e&&i(e)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var l=a[a.length-1];n="."===l||".."===l||""===l}else n=!1;for(var f=0,h=a.length;h>=0;h--){var d=a[h];"."===d?o(a,h):".."===d?(o(a,h),f++):f&&(o(a,h),f--)}if(!c)for(;f--;f)a.unshift("..");!c||""===a[0]||a[0]&&i(a[0])||a.unshift("");var p=a.join("/");return n&&"/"!==p.substr(-1)&&(p+="/"),p};function s(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"===typeof t||"object"===typeof n){var r=s(t),i=s(n);return r!==t||i!==n?e(r,i):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},c=n(21);function l(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function h(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function g(e,t,n,i){var o;"string"===typeof e?(o=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=Object(r.a)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(o.key=n),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o}function v(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var o="function"===typeof e?e(t,n):e;"string"===typeof o?"function"===typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var y=!("undefined"===typeof window||!window.document||!window.document.createElement);function b(e,t){t(window.confirm(e))}var _="popstate",w="hashchange";function k(){try{return window.history.state||{}}catch(e){return{}}}function E(e){void 0===e&&(e={}),y||Object(c.a)(!1);var t=window.history,n=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history}(),i=!(-1===window.navigator.userAgent.indexOf("Trident")),o=e,a=o.forceRefresh,s=void 0!==a&&a,u=o.getUserConfirmation,f=void 0===u?b:u,v=o.keyLength,E=void 0===v?6:v,S=e.basename?d(l(e.basename)):"";function I(e){var t=e||{},n=t.key,r=t.state,i=window.location,o=i.pathname+i.search+i.hash;return S&&(o=h(o,S)),g(o,r,n)}function x(){return Math.random().toString(36).substr(2,E)}var T=m();function C(e){Object(r.a)(V,e),V.length=t.length,T.notifyListeners(V.location,V.action)}function O(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||P(I(e.state))}function A(){P(I(k()))}var N=!1;function P(e){if(N)N=!1,C();else{T.confirmTransitionTo(e,"POP",f,(function(t){t?C({action:"POP",location:e}):function(e){var t=V.location,n=j.indexOf(t.key);-1===n&&(n=0);var r=j.indexOf(e.key);-1===r&&(r=0);var i=n-r;i&&(N=!0,M(i))}(e)}))}}var R=I(k()),j=[R.key];function D(e){return S+p(e)}function M(e){t.go(e)}var L=0;function F(e){1===(L+=e)&&1===e?(window.addEventListener(_,O),i&&window.addEventListener(w,A)):0===L&&(window.removeEventListener(_,O),i&&window.removeEventListener(w,A))}var U=!1;var V={length:t.length,action:"POP",location:R,createHref:D,push:function(e,r){var i="PUSH",o=g(e,r,x(),V.location);T.confirmTransitionTo(o,i,f,(function(e){if(e){var r=D(o),a=o.key,u=o.state;if(n)if(t.pushState({key:a,state:u},null,r),s)window.location.href=r;else{var c=j.indexOf(V.location.key),l=j.slice(0,c+1);l.push(o.key),j=l,C({action:i,location:o})}else window.location.href=r}}))},replace:function(e,r){var i="REPLACE",o=g(e,r,x(),V.location);T.confirmTransitionTo(o,i,f,(function(e){if(e){var r=D(o),a=o.key,u=o.state;if(n)if(t.replaceState({key:a,state:u},null,r),s)window.location.replace(r);else{var c=j.indexOf(V.location.key);-1!==c&&(j[c]=o.key),C({action:i,location:o})}else window.location.replace(r)}}))},go:M,goBack:function(){M(-1)},goForward:function(){M(1)},block:function(e){void 0===e&&(e=!1);var t=T.setPrompt(e);return U||(F(1),U=!0),function(){return U&&(U=!1,F(-1)),t()}},listen:function(e){var t=T.appendListener(e);return F(1),function(){F(-1),t()}}};return V}var S="hashchange",I={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+f(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:f,decodePath:l},slash:{encodePath:l,decodePath:l}};function x(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function T(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function C(e){window.location.replace(x(window.location.href)+"#"+e)}function O(e){void 0===e&&(e={}),y||Object(c.a)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),i=n.getUserConfirmation,o=void 0===i?b:i,a=n.hashType,s=void 0===a?"slash":a,u=e.basename?d(l(e.basename)):"",f=I[s],v=f.encodePath,_=f.decodePath;function w(){var e=_(T());return u&&(e=h(e,u)),g(e)}var k=m();function E(e){Object(r.a)(V,e),V.length=t.length,k.notifyListeners(V.location,V.action)}var O=!1,A=null;function N(){var e,t,n=T(),r=v(n);if(n!==r)C(r);else{var i=w(),a=V.location;if(!O&&(t=i,(e=a).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(A===p(i))return;A=null,function(e){if(O)O=!1,E();else{var t="POP";k.confirmTransitionTo(e,t,o,(function(n){n?E({action:t,location:e}):function(e){var t=V.location,n=D.lastIndexOf(p(t));-1===n&&(n=0);var r=D.lastIndexOf(p(e));-1===r&&(r=0);var i=n-r;i&&(O=!0,M(i))}(e)}))}}(i)}}var P=T(),R=v(P);P!==R&&C(R);var j=w(),D=[p(j)];function M(e){t.go(e)}var L=0;function F(e){1===(L+=e)&&1===e?window.addEventListener(S,N):0===L&&window.removeEventListener(S,N)}var U=!1;var V={length:t.length,action:"POP",location:j,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=x(window.location.href)),n+"#"+v(u+p(e))},push:function(e,t){var n="PUSH",r=g(e,void 0,void 0,V.location);k.confirmTransitionTo(r,n,o,(function(e){if(e){var t=p(r),i=v(u+t);if(T()!==i){A=t,function(e){window.location.hash=e}(i);var o=D.lastIndexOf(p(V.location)),a=D.slice(0,o+1);a.push(t),D=a,E({action:n,location:r})}else E()}}))},replace:function(e,t){var n="REPLACE",r=g(e,void 0,void 0,V.location);k.confirmTransitionTo(r,n,o,(function(e){if(e){var t=p(r),i=v(u+t);T()!==i&&(A=t,C(i));var o=D.indexOf(p(V.location));-1!==o&&(D[o]=t),E({action:n,location:r})}}))},go:M,goBack:function(){M(-1)},goForward:function(){M(1)},block:function(e){void 0===e&&(e=!1);var t=k.setPrompt(e);return U||(F(1),U=!0),function(){return U&&(U=!1,F(-1)),t()}},listen:function(e){var t=k.appendListener(e);return F(1),function(){F(-1),t()}}};return V}function A(e,t,n){return Math.min(Math.max(e,t),n)}function N(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,i=t.initialEntries,o=void 0===i?["/"]:i,a=t.initialIndex,s=void 0===a?0:a,u=t.keyLength,c=void 0===u?6:u,l=m();function f(e){Object(r.a)(_,e),_.length=_.entries.length,l.notifyListeners(_.location,_.action)}function h(){return Math.random().toString(36).substr(2,c)}var d=A(s,0,o.length-1),v=o.map((function(e){return g(e,void 0,"string"===typeof e?h():e.key||h())})),y=p;function b(e){var t=A(_.index+e,0,_.entries.length-1),r=_.entries[t];l.confirmTransitionTo(r,"POP",n,(function(e){e?f({action:"POP",location:r,index:t}):f()}))}var _={length:v.length,action:"POP",location:v[d],index:d,entries:v,createHref:y,push:function(e,t){var r="PUSH",i=g(e,t,h(),_.location);l.confirmTransitionTo(i,r,n,(function(e){if(e){var t=_.index+1,n=_.entries.slice(0);n.length>t?n.splice(t,n.length-t,i):n.push(i),f({action:r,location:i,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",i=g(e,t,h(),_.location);l.confirmTransitionTo(i,r,n,(function(e){e&&(_.entries[_.index]=i,f({action:r,location:i}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=_.index+e;return t>=0&&t<_.entries.length},block:function(e){return void 0===e&&(e=!1),l.setPrompt(e)},listen:function(e){return l.appendListener(e)}};return _}},function(e,t,n){"use strict";n.d(t,"a",(function(){return K})),n.d(t,"b",(function(){return F})),n.d(t,"c",(function(){return V})),n.d(t,"d",(function(){return W}));var r=n(2),i=n.n(r),o=n(9),a=n.n(o),s=n(19),u=n(15),c=n(26),l=n.n(c),f=!1,h=i.a.createContext(null),d="unmounted",p="exited",g="entering",v="entered",m="exiting",y=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=p,r.appearStatus=g):i=v:i=t.unmountOnExit||t.mountOnEnter?d:p,r.state={status:i},r.nextCallback=null,r}Object(u.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===d?{status:p}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==g&&n!==v&&(t=g):n!==g&&n!==v||(t=m)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,a
2ppear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===g?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===p&&this.setState({status:d})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[l.a.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),u=r?s.appear:s.enter;!e&&!n||f?this.safeSetState({status:v},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:g},(function(){t.props.onEntering(o,a),t.onTransitionEnd(u,(function(){t.safeSetState({status:v},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:l.a.findDOMNode(this);t&&!f?(this.props.onExit(r),this.safeSetState({status:m},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:p},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:p},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:l.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===d)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(s.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return i.a.createElement(h.Provider,{value:null},"function"===typeof n?n(e,r):i.a.cloneElement(i.a.Children.only(n),r))},t}(i.a.Component);function b(){}y.contextType=h,y.propTypes={},y.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:b,onEntering:b,onEntered:b,onExit:b,onExiting:b,onExited:b}
vendor: 1,683 bytes, line 2
2,y.UNMOUNTED=d,y.EXITED=p,y.ENTERING=g,y.ENTERED=v,y.EXITING=m;var _=y,w=n(4),k=n(38);function E(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Object(r.isValidElement)(e)?t(e):e}(e)})),n}function S(e,t,n){return null!=n[t]?n[t]:e.props[t]}function I(e,t,n){var i=E(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var u in t){if(i[u])for(r=0;r<i[u].length;r++){var c=i[u][r];s[i[u][r]]=n(c)}s[u]=n(u)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,i);return Object.keys(o).forEach((function(a){var s=o[a];if(Object(r.isValidElement)(s)){var u=a in t,c=a in i,l=t[a],f=Object(r.isValidElement)(l)&&!l.props.in;!c||u&&!f?c||!u||f?c&&u&&Object(r.isValidElement)(l)&&(o[a]=Object(r.cloneElement)(s,{onExited:n.bind(null,s),in:l.props.in,exit:S(s,"exit",e),enter:S(s,"enter",e)})):o[a]=Object(r.cloneElement)(s,{in:!1}):o[a]=Object(r.cloneElement)(s,{onExited:n.bind(null,s),in:!0,exit:S(s,"exit",e),enter:S(s,"enter",e)})}})),o}var x=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},T=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(Object(k.a)(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}Object(u.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,i,o=t.children,a=t.handleExited;
2return{children:t.firstRender?(n=e,i=a,E(n.children,(function(e){return Object(r.cloneElement)(e,{onExited:i.bind(null,e),in:!0,appear:S(e,"appear",n),enter:S(e,"enter",n),exit:S(e,"exit",n)})}))):I(e,o,a),firstRender:!1}},n.handleExited=function(e,t){var n=E(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=Object(w.a)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Object(s.a)(e,["component","childFactory"]),o=this.state.contextValue,a=x(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?i.a.createElement(h.Provider,{value:o},a):i.a.createElement(h.Provider,{value:o},i.a.createElement(t,r,a))},t}(i.a.Component);T.propTypes={},T.defaultProps={component:"div",childFactory:function(e){return e}};var C=T;function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(){return(A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var D,M,L=Object(r.createContext)(),F={TOP_LEFT:"top left",TOP_CENTER:"top center",TOP_RIGHT:"top right",MIDDLE_LEFT:"middle left",MIDDLE:"middle",MIDDLE_RIGHT:"middle right",BOTTOM_LEFT:"bottom left",BOTTOM_CENTER:"bottom center",BOTTOM_RIGHT:"bottom right"},U={INFO:"info",SUCCESS:"success",ERROR:"error"},V={FADE:"fade",SCALE:"scale"},B=function(e){var t=e.children,n=e.options,o=n.position,a=n.containerStyle,s=R(e,["children","options"]),u=Object(r.useMemo)((function(){return function(e){var t={left:0,position:"fixed",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",width:"100%",pointerEvents:"none"};switch(e){case F.TOP_LEFT:return P(P({},t),{},{top:0,alignItems:"flex-start"});case F.TOP_CENTER:return P(P({},t),{},{top:0});case F.TOP_RIGHT:return P(P({},t),{},{top:0,alignItems:"flex-end"});case F.MIDDLE_LEFT:return P(P({},t),{},{top:"50%",alignItems:"flex-start"});case F.MIDDLE:return P(P({},t),{},{top:"50%"});case F.MIDDLE_RIGHT:return P(P({},t),{},{top:"50%",alignItems:"flex-end"});case F.BOTTOM_LEFT:return P(P({},t),{},{bottom:0,alignItems:"flex-start"});case F.BOTTOM_CENTER:return P(P({},t),{},{bottom:0});case F.BOTTOM_RIGHT:return P(P({},t),{},{bottom:0,alignItems:"flex-end"});default:return t}}(o)}),[o]);return t.length>0&&i.a.createElement("div",A({style:P(P({},u),a)},s),t)},q=(O(D={},V.FADE,{transition:"opacity ".concat(250,"ms ease"),opacity:0}),O(D,V.SCALE,{transform:"scale(1)",transition:"all ".concat(250,"ms ease-in-out")}),D),z=(O(M={},V.FADE,{entering:{opacity:0}
2,entered:{opacity:1}}),O(M,V.SCALE,{entering:{transform:"scale(0)"},entered:{transform:"scale(1)"},exiting:{transform:"scale(0)"},exited:{transform:"scale(1)"}}),M),H=function(e){var t=e.children,n=e.type,o=R(e,["children","type"]),a=Object(r.useRef)(null);return i.a.createElement(_,A({nodeRef:a},o,{timeout:250}),(function(e){return i.a.createElement("div",{ref:a,style:P(P({},q[n]),z[n][e])},t)}))},K=function(e){var t=e.children,n=e.offset,o=e.position,a=e.timeout,s=e.type,u=e.transition,l=e.containerStyle,f=e.template,h=e.context,d=R(e,["children","offset","position","timeout","type","transition","containerStyle","template","context"]),p=Object(r.useRef)(null),g=Object(r.useRef)(null),v=Object(r.useRef)([]),m=j(Object(r.useState)([]),2),y=m[0],b=m[1];Object(r.useEffect)((function(){p.current=document.createElement("div"),p.current.id="__react-alert__",document.body.appendChild(p.current);var e=v.current;return function(){e.forEach(clearTimeout),p.current&&document.body.removeChild(p.current)}}),[]);var _=Object(r.useCallback)((function(e){b((function(t){var n=t.length,r=t.filter((function(t){return t.id!==e.id}));return n>r.length&&e.options.onClose&&e.options.onClose(),r}))}),[]),w=Object(r.useCallback)((function(){g.current.alerts.forEach(_)}),[_]),k=Object(r.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Math.random().toString(36).substr(2,9),r=P({position:t.position||o,timeout:a,type:s},t),i={id:n,message:e,options:r,close:function(){return _(i)}};if(i.options.timeout){var u=setTimeout((function(){_(i),v.current.splice(v.current.indexOf(u),1)}),i.options.timeout);v.current.push(u)}return b((function(e){return e.concat(i)})),i.options.onOpen&&i.options.onOpen(),i}),[o,_,a,s]),E=Object(r.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.type=U.SUCCESS,k(e,t)}),[k]),S=Object(r.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.type=U.ERROR,k(e,t)}),[k]),I=Object(r.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.type=U.INFO,k(e,t)}),[k]);g.current={alerts:y,show:k,remove:_,removeAll:w,success:E,error:S,info:I};var x,T=(x=function(e){return e.options.position},y.reduce((function(e,t){var n=x(t);return e[n]||(e[n]=[]),e[n].push(t),e}),{}));return i.a.createElement(h.Provider,{value:g},t,p.current&&Object(c.createPortal)(i.a.createElement(r.Fragment,null,Object.keys(F).map((function(e){var t=F[e];return i.a.createElement(C,A({appear:!0,key:t,options:{position:t,containerStyle:l},component:B},d),T[t]?T[t].map((function(e){return i.a.createElement(H,{type:u,key:e.id},i.a.createElement(f,A({style:{margin:n,pointerEvents:"all"}},e)))})):null)}))),p.current))};K.propTypes={offset:a.a.string,position:a.a.oneOf(Object.keys(F).map((function(e){return F[e]}))),timeout:a.a.number,type:a.a.oneOf(Object.keys(U).map((function(e){return U[e]}))),transition:a.a.oneOf(Object.keys(V).map((function(e){return V[e]}))),containerStyle:a.a.object,template:a.a.oneOfType([a.a.element,a.a.func,a.a.elementType]).isRequired,context:a.a.shape({Provider:a.a.object,Consumer:a.a.object})},K.defaultProps={offset:"10px",position:F.TOP_CENTER,timeout:0,type:U.INFO,transition:V.FADE,containerStyle:{zIndex:100},context:L};var W=function(e){var t=Object(r.useContext)(e||L);return Object(r.useMemo)((function(){return t.current}),[t])}},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(62)},function(e,t,n){"use strict";t.a=function(e,t){}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){var t,n,i="";if("string"===typeof e||"number"===typeof e)i+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}t.a=function(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}},function(e,t,n){"use strict";var r=n(106);t.a=function(e,t){return t?Object(r.a)(e,t,{clone:!1}):e}},function(e,t,n){!function(e){"use strict";function t(e){return Array.prototype.slice.call(e)}function n(e){return new Promise((function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function r(e,t,r){var i,o=new Promise((function(o,a){n(i=e[t].apply(e,r)).then(o,a)}));return o.request=i,o}function i(e,t,n){var i=r(e,t,n);return i.then((function(e){if(e)return new l(e,i.request)}))}
2function o(e,t,n){n.forEach((function(n){Object.defineProperty(e.prototype,n,{get:function(){return this[t][n]},set:function(e){this[t][n]=e}})}))}function a(e,t,n,i){i.forEach((function(i){i in n.prototype&&(e.prototype[i]=function(){return r(this[t],i,arguments)})}))}function s(e,t,n,r){r.forEach((function(r){r in n.prototype&&(e.prototype[r]=function(){return this[t][r].apply(this[t],arguments)})}))}function u(e,t,n,r){r.forEach((function(r){r in n.prototype&&(e.prototype[r]=function(){return i(this[t],r,arguments)})}))}function c(e){this._index=e}function l(e,t){this._cursor=e,this._request=t}function f(e){this._store=e}function h(e){this._tx=e,this.complete=new Promise((function(t,n){e.oncomplete=function(){t()},e.onerror=function(){n(e.error)},e.onabort=function(){n(e.error)}}))}function d(e,t,n){this._db=e,this.oldVersion=t,this.transaction=new h(n)}function p(e){this._db=e}function g(e,t,n){var i=r(indexedDB,"open",[e,t]),o=i.request;return o&&(o.onupgradeneeded=function(e){n&&n(new d(o.result,e.oldVersion,o.transaction))}),i.then((function(e){return new p(e)}))}function v(e){return r(indexedDB,"deleteDatabase",[e])}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(e){e in IDBCursor.prototype&&(l.prototype[e]=function(){var t=this,r=arguments;return Promise.resolve().then((function(){return t._cursor[e].apply(t._cursor,r),n(t._request).then((function(e){if(e)return new l(e,t._request)}))}))})})),f.prototype.createIndex=function(){return new c(this._store.createIndex.apply(this._store,arguments))},f.prototype.index=function(){return new c(this._store.index.apply(this._store,arguments))},o(f,"_store",["name","keyPath","indexNames","autoIncrement"]),a(f,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),u(f,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),s(f,"_store",IDBObjectStore,["deleteIndex"]),h.prototype.objectStore=function(){return new f(this._tx.objectStore.apply(this._tx,arguments))},o(h,"_tx",["objectStoreNames","mode"]),s(h,"_tx",IDBTransaction,["abort"]),d.prototype.createObjectStore=function(){return new f(this._db.createObjectStore.apply(this._db,arguments))},o(d,"_db",["name","version","objectStoreNames"]),s(d,"_db",IDBDatabase,["deleteObjectStore","close"]),p.prototype.transaction=function(){return new h(this._db.transaction.apply(this._db,arguments))},o(p,"_db",["name","version","objectStoreNames"]),s(p,"_db",IDBDatabase,["close"]),["openCursor","o
2penKeyCursor"].forEach((function(e){[f,c].forEach((function(n){e in n.prototype&&(n.prototype[e.replace("open","iterate")]=function(){var n=t(arguments),r=n[n.length-1],i=this._store||this._index,o=i[e].apply(i,n.slice(0,-1));o.onsuccess=function(){r(o.result)}})}))})),[c,f].forEach((function(e){e.prototype.getAll||(e.prototype.getAll=function(e,t){var n=this,r=[];return new Promise((function(i){n.iterateCursor(e,(function(e){e?(r.push(e.value),void 0===t||r.length!=t?e.continue():i(r)):i(r)}))}))})})),e.openDb=g,e.deleteDb=v,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(84),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(e){return r.isMemo(e)?a:s[e.$$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,f=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=d(n);i&&i!==p&&e(t,i,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var s=u(t),g=u(n),v=0;v<a.length;++v){var m=a[v];if(!o[m]&&(!r||!r[m])&&(!g||!g[m])&&(!s||!s[m])){var y=h(n,m);try{c(t,m,y)}catch(b){}}}}return t}},function(e,t,n){"use strict";var r=n(28),i=n(12),o=n(106),a=n(4),s=["xs","sm","md","lg","xl"];function u(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,o=void 0===r?"px":r,u=e.step,c=void 0===u?5:u,l=Object(i.a)(e,["values","unit","step"]);function f(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function h(e,t){var r=s.indexOf(t);return r===s.length-1?f(e):"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(o,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[s[r+1]]?n[s[r+1]]:t)-c/100).concat(o,")")}return Object(a.a)({keys:s,values:n,up:f,down:function(e){var t=s.indexOf(e)+1,r=n[s[t]];return t===s.length?f("xs"):"@media (max-width:".concat(("number"===typeof r&&t>0?r:e)-c/100).concat(o,")")},between:h,only:function(e){return h(e,e)},width:function(e){return n[e]}},l)}function c(e,t,n){var i;return Object(a.a)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(a.a)({paddingLeft:t(2),paddingRight:t(2)},n,Object(r.a)({},e.up("sm"),Object(a.a)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(i={minHeight:56},Object(r.a)(i,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(r.a)(i,e.up("sm"),{minHeight:64}),i)},n)}var l=n(120),f={black:"#000",white:"#fff"},h={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"},d={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"},p={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"},g={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"},v={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"},m={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"},y={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 b(e){var t=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(t,e),n)}function _(e){if(e.type)return e;if("#"===e.charAt(0))return _(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Object(l.a)(3,e));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function w(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function k(e){var t="hsl"===(e=_(e)).type?_(function(e){var t=(e=_(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;
2return i-o*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",u=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",u.push(t[3])),w({type:s,values:u})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function E(e,t){if(e=_(e),t=b(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return w(e)}function S(e,t){if(e=_(e),t=b(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return w(e)}var I={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:f.white,default:h[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}},x={text:{primary:f.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:h[800],default:"#303030"},action:{active:f.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 T(e,t,n,r){var i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=S(e.main,i):"dark"===t&&(e.dark=E(e.main,o)))}function C(e){var t=e.primary,n=void 0===t?{light:d[300],main:d[500],dark:d[700]}:t,r=e.secondary,s=void 0===r?{light:p.A200,main:p.A400,dark:p.A700}:r,u=e.error,c=void 0===u?{light:g[300],main:g[500],dark:g[700]}:u,b=e.warning,_=void 0===b?{light:v[300],main:v[500],dark:v[700]}:b,w=e.info,E=void 0===w?{light:m[300],main:m[500],dark:m[700]}:w,S=e.success,C=void 0===S?{light:y[300],main:y[500],dark:y[700]}:S,O=e.type,A=void 0===O?"light":O,N=e.contrastThreshold,P=void 0===N?3:N,R=e.tonalOffset,j=void 0===R?.2:R,D=Object(i.a)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function M(e){return function(e,t){var n=k(e),r=k(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,x.text.primary)>=P?x.text.primary:I.text.primary}var L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=Object(a.a)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(Object(l.a)(4,t));if("string"!==typeof e.main)throw new Error(Object(l.a)(5,JSON.stringify(e.main)));return T(e,"light",n,j),T(e,"dark",r,j),e.contrastText||(e.contrastText=M(e.main)),e},F={dark:x,light:I};return Object(o.a)(Object(a.a)({common:f,type:A,primary:L(n),secondary:L(s,"A400","A200","A700"),error:L(c),warning:L(_),info:L(E),success:L(C),grey:h,contrastThreshold:P,getContrastText:M,augmentColor:L,tonalOffset:j},F[A]),D)}function O(e){return Math.round(1e5*e)/1e5}var A={textTransform:"uppercase"},N='"Roboto", "Helvetica", "Arial", sans-serif';function P(e,t){var n="function"===typeof t?t(e):t,r=n.fontFamily,s=void 0===r?N:r,u=n.fontSize,c=void 0===u?14:u,l=n.fontWeightLight,f=void 0===l?300:l,h=n.fontWeightRegular,d=void 0===h?400:h,p=n.fontWeightMedium,g=void 0===p?500:p,v=n.fontWeightBold,m=void 0===v?700:v,y=n.htmlFontSize,b=void 0===y?16:y,_=n.allVariants,w=n.pxToRem,k=Object(i.a)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var E=c/14,S=w||function(e){return"".concat(e/b*E,"rem")},I=function(e,t,n,r,i){return Object(a.a)({fontFamily:s,fontWeight:e,fontSize:S(t),lineHeight:n},s===N?{letterSpacing:"".concat(O(r/t),"em")}:{},i,_)},x={h1:I(f,96,1.167,-1.5),h2:I(f,60,1.2,-.5),h3:I(d,48,1.167,0),h4:I(d,34,1.235,.25),h5:I(d,24,1.334,0),h6:I(g,20,1.6,.15),subtitle1:I(d,16,1.75,.15),subtitle2:I(g,14,1.57,.1),body1:I(d,16,1.5,.15),body2:I(d,14,1.43,.15),button:I(g,14,1.75,.4,A),caption:I(d,12,1.66,.4),overline:I(d,12,2.66,1,A)};return Object(o.a)(Object(a.a)({htmlFontSize:b,pxToRem:S,round:O,fontFamily:s,fontSize:c,fontWeightLight:f,fontWeightRegular:d,fontWeightMedium:g,fontWeightBold:m},x),k,{clone:!1})}function R(){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 j=["none",R(0,2,1,-1,0,1,1,0,0,1,3,0),R(0,3,1,-2,0,2,2,0,0,1,5,0),R(0,3,3,-2,0,3,4,0,0,1,8,0),R(0,2,4,-1,0,4,5,0,0,1,10,0),R(0,3,5,-1,0,5,8,0,0,1,14,0),R(0,3,5,-1,0,6,10,0,0,1,18,0),R(0,4,5,-2,0,7,10,1,0,2,16,1),R(0,5,5,-3,0,8,10,1,0,3,14,2),R(0,5,6,-3,0,9,12,1,0,3,16,2),R(0,6,6,-3,0,10,14,1,0,4,18,3),R(0,6,7,-4,0,11,15,1,0,4,20,3),R(0,7,8,-4,0,12,17,2,0,5,22,4),R(0,7,8,-4,0,13,19,2,0,5,24,4),R(0,7,9,-4,0,14,21,2,0,5,26,4),R(0,8,9,-5,0,15,22,2,0,6,28,5),R(0,8,10,-5,0,16,24,2,0,6,30,5),R(0,8,11,-5,0,17,26,2,0,6,32,5),R(0,9,11,-5,0,18,28,2,0,7,34,6),R(0,9,12,-6,0,19,29,2,0,7,36,6
2),R(0,10,13,-6,0,20,31,3,0,8,38,7),R(0,10,13,-6,0,21,33,3,0,8,40,7),R(0,10,14,-6,0,22,35,3,0,8,42,7),R(0,11,14,-7,0,23,36,3,0,9,44,8),R(0,11,15,-7,0,24,38,3,0,9,46,8)],D={borderRadius:4},M=n(125);function L(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=Object(M.a)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"===typeof e)return e;var n=t(e);return"number"===typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var F={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)"},U={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function V(e){return"".concat(Math.round(e),"ms")}var B={easing:F,duration:U,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?U.standard:n,o=t.easing,a=void 0===o?F.easeInOut:o,s=t.delay,u=void 0===s?0:s;Object(i.a)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof r?r:V(r)," ").concat(a," ").concat("string"===typeof u?u:V(u))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},q={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};var z=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,a=void 0===r?{}:r,s=e.palette,l=void 0===s?{}:s,f=e.spacing,h=e.typography,d=void 0===h?{}:h,p=Object(i.a)(e,["breakpoints","mixins","palette","spacing","typography"]),g=C(l),v=u(n),m=L(f),y=Object(o.a)({breakpoints:v,direction:"ltr",mixins:c(v,m,a),overrides:{},palette:g,props:{},shadows:j,typography:P(g,d),spacing:m,shape:D,transitions:B,zIndex:q},p),b=arguments.length,_=new Array(b>1?b-1:0),w=1;w<b;w++)_[w-1]=arguments[w];return y=_.reduce((function(e,t){return Object(o.a)(e,t)}),y)}();t.a=z},function(e,t,n){"use strict"},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(37);function i(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));n(23),n(4);var r=n(36),i=(n(9),n(30),{xs:0,sm:600,md:960,lg:1280,xl:1920}),o={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(i[e],"px)")}};function a(e,t,n){if(Array.isArray(t)){var i=e.theme.breakpoints||o;return t.reduce((function(e,r,o){return e[i.up(i.keys[o])]=n(t[o]),e}),{})}if("object"===Object(r.a)(t)){var a=e.theme.breakpoints||o;return Object.keys(t).reduce((function(e,r){return e[a.up(r)]=n(t[r]),e}),{})}return n(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scrollbars=void 0;var r,i=n(88),o=(r=i)&&r.__esModule?r:{default:r};t.default=o.default,t.Scrollbars=o.default},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;
2if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),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 f=0;f<s.length;f++)o.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=s(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||l||s(d)},p.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=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";(function(e){var r=n(2),i=n.n(r),o=n(15),a=n(9),s=n.n(a),u=1073741823,c="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:{};function l(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var f=i.a.createContext||function(e,t){var n,i,a="__create-react-context-"+function(){var e="__global_unique_id__";return c[e]=(c[e]||0)+1}()+"__",f=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=l(t.props.value),t}Object(o.a)(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[a]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,i=e.value;((o=r)===(a=i)?0!==o||1/o===1/a:o!==o&&a!==a)?n=0:(n="function"===typeof t?t(r,i):u,0!==(n|=0)&&this.emitter.set(e.value,n))}var o,a},r.render=function(){return this.props.children},n}(r.Component);f.childContextTypes=((n={})[a]=s.a.object.isRequired,n);var h=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!==((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}Object(o.a)(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=void 0===t||null===t?u:t},r.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=void 0===e||null===e?u:e},r.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},r.getValue=function(){return this.context[a]?this.context[a].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return h.contextTypes=((i={})[a]=s.a.object,i),{Provider:f,Consumer:h}};t.a=f}).call(this,n(32))},function(e,t,n){var r=n(81);e.exports=d,e.exports.parse=o,e.exports.compile=function(e,t){return s(o(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=h;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,a=0,s="",l=t&&t.delimiter||"/";null!=(n=i.exec(e));){var f=n[0],h=n[1],d=n.index;if(s+=e.slice(a,d),a=d+f.length,h)s+=h[1];else{var p=e[a],g=n[2],v=n[3],m=n[4],y=n[5],b=n[6],_=n[7];s&&(r.push(s),s="");var w=null!=g&&null!=p&&p!==g,k="+"===b||"*"===b,E="?"===b||"*"===b,S=n[2]||l,I=m||y;
2r.push({name:v||o++,prefix:g||"",delimiter:S,optional:E,repeat:k,partial:w,asterisk:!!_,pattern:I?c(I):_?".*":"[^"+u(S)+"]+?"})}}return a<e.length&&(s+=e.substr(a)),s&&r.push(s),r}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function s(e,t){for(var n=new Array(e.length),i=0;i<e.length;i++)"object"===typeof e[i]&&(n[i]=new RegExp("^(?:"+e[i].pattern+")$",f(t)));return function(t,i){for(var o="",s=t||{},u=(i||{}).pretty?a:encodeURIComponent,c=0;c<e.length;c++){var l=e[c];if("string"!==typeof l){var f,h=s[l.name];if(null==h){if(l.optional){l.partial&&(o+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(r(h)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var d=0;d<h.length;d++){if(f=u(h[d]),!n[c].test(f))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(f)+"`");o+=(0===d?l.prefix:l.delimiter)+f}}else{if(f=l.asterisk?encodeURI(h).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):u(h),!n[c].test(f))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+f+'"');o+=l.prefix+f}}else o+=l}return o}}function u(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function l(e,t){return e.keys=t,e}function f(e){return e&&e.sensitive?"":"i"}function h(e,t,n){r(t)||(n=t||n,t=[]);for(var i=(n=n||{}).strict,o=!1!==n.end,a="",s=0;s<e.length;s++){var c=e[s];if("string"===typeof c)a+=u(c);else{var h=u(c.prefix),d="(?:"+c.pattern+")";t.push(c),c.repeat&&(d+="(?:"+h+d+")*"),a+=d=c.optional?c.partial?h+"("+d+")?":"(?:"+h+"("+d+"))?":h+"("+d+")"}}var p=u(n.delimiter||"/"),g=a.slice(-p.length)===p;return i||(a=(g?a.slice(0,-p.length):a)+"(?:"+p+"(?=$))?"),a+=o?"$":i&&g?"":"(?="+p+"|$)",l(new RegExp("^"+a,f(n)),t)}function d(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],i=0;i<e.length;i++)r.push(d(e[i],t,n).source);return l(new RegExp("(?:"+r.join("|")+")",f(n)),t)}(e,t,n):function(e,t,n){return h(o(e,n),t,n)}(e,t,n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o.default}));var r,i,o=n(5),a=(n(50),n(67),n(1)),s=n(10),u=(n(16),n(13)),c=n(11),l={Firestore:u.s,GeoPoint:u.b,Timestamp:u.f,Blob:u.k,Transaction:u.e,WriteBatch:u.o,DocumentReference:u.d,DocumentSnapshot:u.i,Query:u.j,QueryDocumentSnapshot:u.h,QuerySnapshot:u.m,CollectionReference:u.p,FieldPath:u.n,FieldValue:u.t,setLogLevel:u.g,CACHE_SIZE_UNLIMITED:u.r};(function(e,t){e.INTERNAL.registerComponent(new c.Component("firestore",(function(e){return function(e,t){return new u.s(e,new u.c(e,t),new u.a)}(e.getProvider("app").getImmediate(),e.getProvider("auth-internal"))}),"PUBLIC").setServiceProps(Object.assign({},l)))})(r=o.default),r.registerVersion("@firebase/firestore","2.3.7"),(i=u.s).prototype.loadBundle=u.q,i.prototype.namedQuery=u.l;var f=n(0),h={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"},d=function(e){function t(n,r,i){var o=e.call(this,r)||this;return Object.setPrototypeOf(o,t.prototype),o.code=n,o.details=i,o}return Object(f.__extends)(t,e),t}(Error);var p=function(){function e(e,t){var n=this;this.auth=null,this.messaging=null,this.auth=e.getImmediate({optional:!0}),this.messaging=t.getImmediate({optional:!0}),this.auth||e.get().then((function(e){return n.auth=e}),(function(){})),this.messaging||t.get().then((function(e){return n.messaging=e}),(function(){}))}return e.prototype.getAuthToken=function(){return Object(f.__awaiter)(this,void 0,void 0,(function(){var e;return Object(f.__generator)(this,(function(t){switch(t.label){case 0:if(!this.auth)return[2,void 0];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.auth.getToken()];case 2:return(e=t.sent())?[2,e.accessToken]:[2,void 0];case 3:return t.sent(),[2,void 0];case 4:return[2]}}
2))}))},e.prototype.getInstanceIdToken=function(){return Object(f.__awaiter)(this,void 0,void 0,(function(){return Object(f.__generator)(this,(function(e){switch(e.label){case 0:if(!this.messaging||!("Notification"in self)||"granted"!==Notification.permission)return[2,void 0];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.messaging.getToken()];case 2:return[2,e.sent()];case 3:return e.sent(),[2,void 0];case 4:return[2]}}))}))},e.prototype.getContext=function(){return Object(f.__awaiter)(this,void 0,void 0,(function(){var e,t;return Object(f.__generator)(this,(function(n){switch(n.label){case 0:return[4,this.getAuthToken()];case 1:return e=n.sent(),[4,this.getInstanceIdToken()];case 2:return t=n.sent(),[2,{authToken:e,instanceIdToken:t}]}}))}))},e}();function g(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r]));return n}var v=function(){function e(){}return e.prototype.encode=function(e){var t=this;if(null==e)return null;if(e instanceof Number&&(e=e.valueOf()),"number"===typeof e&&isFinite(e))return e;if(!0===e||!1===e)return e;if("[object String]"===Object.prototype.toString.call(e))return e;if(e instanceof Date)return e.toISOString();if(Array.isArray(e))return e.map((function(e){return t.encode(e)}));if("function"===typeof e||"object"===typeof e)return g(e,(function(e){return t.encode(e)}));throw new Error("Data cannot be encoded in JSON: "+e)},e.prototype.decode=function(e){var t=this;if(null==e)return e;if(e["@type"])switch(e["@type"]){case"type.googleapis.com/google.protobuf.Int64Value":case"type.googleapis.com/google.protobuf.UInt64Value":var n=Number(e.value);if(isNaN(n))throw new Error("Data cannot be decoded from JSON: "+e);return n;default:throw new Error("Data cannot be decoded from JSON: "+e)}return Array.isArray(e)?e.map((function(e){return t.decode(e)})):"function"===typeof e||"object"===typeof e?g(e,(function(e){return t.decode(e)})):e},e}();var m=function(){function e(e,t,n,i,o,a){var s=this;void 0===o&&(o="us-central1"),this.app_=e,this.appCheckProvider=i,this.fetchImpl=a,this.serializer=new v,this.emulatorOrigin=null,this.INTERNAL={delete:function(){return Promise.resolve(s.deleteService())}},this.contextProvider=new p(t,n),this.cancelAllRequests=new Promise((function(e){s.deleteService=function(){return e()}}));try{var u=new URL(o);this.customDomain=u.origin,this.region="us-central1"}catch(r){this.customDomain=null,this.region=o}}return Object.defineProperty(e.prototype,"app",{get:function(){return this.app_},enumerable:!1,configurable:!0}),e.prototype._url=function(e){var t=this.app_.options.projectId;return null!==this.emulatorOrigin?this.emulatorOrigin+"/"+t+"/"+this.region+"/"+e:null!==this.customDomain?this.customDomain+"/"+e:"https://"+this.region+"-"+t+".cloudfunctions.net/"+e},e.prototype.useEmulator=function(e,t){this.emulatorOrigin="http://"+e+":"+t},e.prototype.useFunctionsEmulator=function(e){this.emulatorOrigin=e},e.prototype.httpsCallable=function(e,t){var n=this;return function(r){return n.call(e,r,t||{})}},e.prototype.postJSON=function(e,t,n){return Object(f.__awaiter)(this,void 0,void 0,(function(){var r,i,o;return Object(f.__generator)(this,(function(a){switch(a.label){case 0:return n["Content-Type"]="application/json",[4,this.getAppCheckToken()];case 1:null!==(r=a.sent())&&(n["X-Firebase-AppCheck"]=r),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.fetchImpl(e,{method:"POST",body:JSON.stringify(t),headers:n})];case 3:return i=a.sent(),[3,5];case 4:return a.sent(),[2,{status:0,json:null}];case 5:o=null,a.label=6;case 6:return a.trys.push([6,8,,9]),[4,i.json()];case 7:return o=a.sent(),[3,9];case 8:return a.sent(),[3,9];case 9:return[2,{status:i.status,json:o}]}}))}))},e.prototype.getAppCheckToken=function(){return Object(f.__awaiter)(this,void 0,void 0,(function(){var e;return Object(f.__generator)(this,(function(t){switch(t.label){case 0:return(e=this.appCheckProvider.getImmediate({optional:!0}))?[4,e.getToken()]:[3,2];case 1:return[2,t.sent().token];case 2:return[2,null]}}))}))},e.prototype.call=function(e,t,n){return Object(f.__awaiter)(this,void 0,void 0,(function(){var i,o,a,s,u,c,l,p,g,v,m;return Object(f.__generator)(this,(function(f){switch(f.label){case 0:return i=this._url(e),t=this.serializer.encode(t),o={data:t},a={},[4,this.contextProvider.getContext()];case 1:return(s=f.sent()).authToken&&(a.Authorization="Bearer "+s.authToken),s.instanceIdToken&&(a["Firebase-Instance-ID-Token"]=s.instanceIdToken),u=n.timeout||7e4,c=function(e){var t,n=new Promise((function(n,r){t=setTimeout((function(){r(new d("deadline-exceeded","deadline-exceeded"))}),e)}));return{timer:t,promise:n}}(u),l=c.timer,p=c.promise,[4,Promise.race([y(l,this.postJSON(i,o,a)),p,y(l,this.cancelAllRequests)])];case 2:if(!(g=f.sent()))throw new d("cancelled","Firebase Functions instance was deleted.");
2if(v=function(e,t,n){var i=function(e){if(e>=200&&e<300)return"ok";switch(e){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"}(e),o=i,a=void 0;try{var s=t&&t.error;if(s){var u=s.status;if("string"===typeof u){if(!h[u])return new d("internal","internal");i=h[u],o=u}var c=s.message;"string"===typeof c&&(o=c),void 0!==(a=s.details)&&(a=n.decode(a))}}catch(r){}return"ok"===i?null:new d(i,o,a)}(g.status,g.json,this.serializer))throw v;if(!g.json)throw new d("internal","Response is not valid JSON object.");if("undefined"===typeof(m=g.json.data)&&(m=g.json.result),"undefined"===typeof m)throw new d("internal","Response is missing data field.");return[2,{data:this.serializer.decode(m)}]}}))}))},e}();function y(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n;return Object(f.__generator)(this,(function(r){switch(r.label){case 0:return[4,t];case 1:return n=r.sent(),clearTimeout(e),[2,n]}}))}))}!function(e,t){var n={Functions:m};e.INTERNAL.registerComponent(new c.Component("functions",(function(e,n){var r=n.instanceIdentifier,i=e.getProvider("app").getImmediate(),o=e.getProvider("auth-internal"),a=e.getProvider("app-check-internal"),s=e.getProvider("messaging");return new m(i,o,s,a,r,t)}),"PUBLIC").setServiceProps(n).setMultipleInstances(!0))}(o.default,fetch.bind(self)),o.default.registerVersion("@firebase/functions","0.6.12");var b,_=n(31),w="0.4.29",k=1e4,E="w:0.4.29",S="FIS_v2",I=36e5,x=((b={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',b["not-registered"]="Firebase Installation is not registered.",b["installation-not-found"]="Firebase Installation not found.",b["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',b["app-offline"]="Could not process request. Application offline.",b["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",b),T=new a.ErrorFactory("installations","Installations",x);function C(e){return e instanceof a.FirebaseError&&e.code.includes("request-failed")}function O(e){return"https://firebaseinstallations.googleapis.com/v1/projects/"+e.projectId+"/installations"}function A(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}function N(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(f.__generator)(this,(function(i){switch(i.label){case 0:return[4,t.json()];case 1:return n=i.sent(),r=n.error,[2,T.create("request-failed",{requestName:e,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})]}}))}))}function P(e){var t=e.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function R(e,t){var n=t.refreshToken,r=P(e);return r.append("Authorization",function(e){return"FIS_v2 "+e}(n)),r}function j(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t;return Object(f.__generator)(this,(function(n){switch(n.label){case 0:return[4,e()];case 1:return(t=n.sent()).status>=500&&t.status<600?[2,e()]:[2,t]}}))}))}function D(e,t){var n=t.fid;return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,r,i,o,a,s;return Object(f.__generator)(this,(function(u){switch(u.label){case 0:return t=O(e),r=P(e),i={fid:n,authVersion:S,appId:e.appId,sdkVersion:E},o={method:"POST",headers:r,body:JSON.stringify(i)},[4,j((function(){return fetch(t,o)}))];case 1:return(a=u.sent()).ok?[4,a.json()]:[3,3];case 2:return s=u.sent(),[2,{fid:s.fid||n,registrationStatus:2,refreshToken:s.refreshToken,authToken:A(s.authToken)}];case 3:return[4,N("Create Installation",a)];case 4:throw u.sent()}}))}))}function M(e){return new Promise((function(t){setTimeout(t,e)}))}var L=/^[cdef][\w-]{21}$/;function F(){try{var e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;var t=function(e){return(t=e,btoa(String.fromCharCode.apply(String,Object(f.__spreadArray)([],Object(f.__read)(t)))).replace(/\+/g,"-").replace(/\//g,"_")).substr(0,22);var t}(e);return L.test(t)?t:""}catch(n){return""}}function U(e){return e.appName+"!"+e.appId}var V=new Map;function B(e,t){var n=U(e);q(n,t),function(e,t){var n=H();n&&n.postMessage({key:e,fid:t});K()}(n,t)}function q(e,t){var n,r,i=V.get(e);if(i)try{for(var o=Object(f.__values)(i),a=o.next();!a.done;a=o.next()){(0,a.value)(t)}}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}var z=null;function H(){return!z&&"BroadcastChannel"in self&&((z=new BroadcastChannel("[Firebase] FID Change")).onmessage=function(e){q(e.data.key,e.data.fid)}),z}function K(){0===V.size&&z&&(z.close(),z=null)}var W,G,Y="firebase-installations-store",$=null;function Q(){return $||($=Object(_.openDb)("firebase-installations-database",1,(function(e){switch(e.oldVersion){case 0:e.createObjectStore(Y)}}))),$}function X(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,a;return Object(f.__generator)(this,(function(s){switch(s.label){case 0:return n=U(e),[4,Q()];case 1:return r=s.sent(),i=r.transaction(Y,"readwrite"),[4,(o=i.objectStore(Y)).get(n)];case 2:return a=s.sent(),[4,o.put(t,n)];case 3:return s.sent(),[4,i.complete];case 4:return s.sent(),a&&a.fid===t.fid||B(e,t.fid),[2,t]}}))}))}function J(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return Object(f.__generator)(this,(function(i){switch(i.label){case 0:return t=U(e),[4,Q()];case 1:return n=i.sent(),[4,(r=n.transaction(Y,"readwrite")).objectStore(Y).delete(t)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function Z(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,a,s;return Object(f.__generator)(this,(function(u){switch(u.label){case 0:return n=U(e),[4,Q()];case 1:return r=u.sent(),i=r.transaction(Y,"readwrite"),[4,(o=i.objectStore(Y)).get(n)];case 2:return a=u.sent(),void 0!==(s=t(a))?[3,4]:[4,o.delete(n)];case 3:return u.sent(),[3,6];case 4:return[4,o.put(s,n)];case 5:u.sent(),u.label=6;case 6:return[4,i.complete];case 7:return u.sent(),!s||a&&a.fid===s.fid||B(e,s.fid),[2,s]}}))}))}function ee(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return Object(f.__generator)(this,(function(i){switch(i.label){case 0:return[4,Z(e,(function(n){var r=function(e){return re(e||{fid:F(),registrationStatus:0})}(n),i=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine)return{installationEntry:t,registrationPromise:Promise.reject(T.create("app-offline"))};var n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()};return{installationEntry:n,registrationPromise:function(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(f.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,D(e,t)];case 1:return n=i.sent(),[2,X(e,n)];case 2:return C(r=i.sent())&&409===r.customData.serverCode?[4,J(e)]:[3,4];case 3:return i.sent(),[3,6];case 4:return[4,X(e,{fid:t.fid,registrationStatus:0})];case 5:i.sent(),i.label=6;case 6:throw r;case 7:return[2]}}
2))}))}(e,n)}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:te(e)}:{installationEntry:t}}(e,r);return t=i.registrationPromise,i.installationEntry}))];case 1:return""!==(n=i.sent()).fid?[3,3]:(r={},[4,t]);case 2:return[2,(r.installationEntry=i.sent(),r)];case 3:return[2,{installationEntry:n,registrationPromise:t}]}}))}))}function te(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,n,r,i;return Object(f.__generator)(this,(function(o){switch(o.label){case 0:return[4,ne(e)];case 1:t=o.sent(),o.label=2;case 2:return 1!==t.registrationStatus?[3,5]:[4,M(100)];case 3:return o.sent(),[4,ne(e)];case 4:return t=o.sent(),[3,2];case 5:return 0!==t.registrationStatus?[3,7]:[4,ee(e)];case 6:return n=o.sent(),r=n.installationEntry,(i=n.registrationPromise)?[2,i]:[2,r];case 7:return[2,t]}}))}))}function ne(e){return Z(e,(function(e){if(!e)throw T.create("installation-not-found");return re(e)}))}function re(e){return 1===(t=e).registrationStatus&&t.registrationTime+k<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}function ie(e,t){var n=e.appConfig,r=e.platformLoggerProvider;return Object(f.__awaiter)(this,void 0,void 0,(function(){var e,i,o,a,s,u,c;return Object(f.__generator)(this,(function(l){switch(l.label){case 0:return e=function(e,t){var n=t.fid;return O(e)+"/"+n+"/authTokens:generate"}(n,t),i=R(n,t),(o=r.getImmediate({optional:!0}))&&i.append("x-firebase-client",o.getPlatformInfoString()),a={installation:{sdkVersion:E}},s={method:"POST",headers:i,body:JSON.stringify(a)},[4,j((function(){return fetch(e,s)}))];case 1:return(u=l.sent()).ok?[4,u.json()]:[3,3];case 2:return c=l.sent(),[2,A(c)];case 3:return[4,N("Generate Auth Token",u)];case 4:throw l.sent()}}))}))}function oe(e,t){return void 0===t&&(t=!1),Object(f.__awaiter)(this,void 0,void 0,(function(){var n,r,i;return Object(f.__generator)(this,(function(o){switch(o.label){case 0:return[4,Z(e.appConfig,(function(r){if(!se(r))throw T.create("not-registered");var i=r.authToken;if(!t&&function(e){return 2===e.requestStatus&&!function(e){var t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+I}(e)}(i))return r;if(1===i.requestStatus)return n=function(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(f.__generator)(this,(function(i){switch(i.label){case 0:return[4,ae(e.appConfig)];case 1:n=i.sent(),i.label=2;case 2:return 1!==n.authToken.requestStatus?[3,5]:[4,M(100)];case 3:return i.sent(),[4,ae(e.appConfig)];case 4:return n=i.sent(),[3,2];case 5:return 0===(r=n.authToken).requestStatus?[2,oe(e,t)]:[2,r]}}))}))}(e,t),r;if(!navigator.onLine)throw T.create("app-offline");var o=function(e){var t={requestStatus:1,requestTime:Date.now()};return Object(f.__assign)(Object(f.__assign)({},e),{authToken:t})}(r);return n=function(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n,r,i;return Object(f.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,8]),[4,ie(e,t)];case 1:return n=o.sent(),i=Object(f.__assign)(Object(f.__assign)({},t),{authToken:n}),[4,X(e.appConfig,i)];case 2:return o.sent(),[2,n];case 3:return!C(r=o.sent())||401!==r.customData.serverCode&&404!==r.customData.serverCode?[3,5]:[4,J(e.appConfig)];case 4:return o.sent(),[3,7];case 5:return i=Object(f.__assign)(Object(f.__assign)({},t),{authToken:{requestStatus:0}}),[4,X(e.appConfig,i)];case 6:o.sent(),o.label=7;case 7:throw r;case 8:return[2]}}
2))}))}(e,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 ae(e){return Z(e,(function(e){if(!se(e))throw T.create("not-registered");var t,n=e.authToken;return 1===(t=n).requestStatus&&t.requestTime+k<Date.now()?Object(f.__assign)(Object(f.__assign)({},e),{authToken:{requestStatus:0}}):e}))}function se(e){return void 0!==e&&2===e.registrationStatus}function ue(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t;return Object(f.__generator)(this,(function(n){switch(n.label){case 0:return[4,ee(e)];case 1:return(t=n.sent().registrationPromise)?[4,t]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))}function ce(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o;return Object(f.__generator)(this,(function(a){switch(a.label){case 0:return n=function(e,t){var n=t.fid;return O(e)+"/"+n}(e,t),r=R(e,t),i={method:"DELETE",headers:r},[4,j((function(){return fetch(n,i)}))];case 1:return(o=a.sent()).ok?[3,3]:[4,N("Delete Installation",o)];case 2:throw a.sent();case 3:return[2]}}
2))}))}function le(e,t){var n=e.appConfig;return function(e,t){H();var n=U(e),r=V.get(n);r||(r=new Set,V.set(n,r)),r.add(t)}(n,t),function(){!function(e,t){var n=U(e),r=V.get(n);r&&(r.delete(t),0===r.size&&V.delete(n),K())}(n,t)}}function fe(e){return T.create("missing-app-config-values",{valueName:e})}(W=o.default).INTERNAL.registerComponent(new c.Component("installations",(function(e){var t=e.getProvider("app").getImmediate(),n={appConfig:function(e){var t,n;if(!e||!e.options)throw fe("App Configuration");if(!e.name)throw fe("App Name");try{for(var r=Object(f.__values)(["projectId","apiKey","appId"]),i=r.next();!i.done;i=r.next()){var o=i.value;if(!e.options[o])throw fe(o)}}catch(a){t={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t),platformLoggerProvider:e.getProvider("platform-logger")};return{app:t,getId:function(){return function(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return Object(f.__generator)(this,(function(i){switch(i.label){case 0:return[4,ee(e.appConfig)];case 1:return t=i.sent(),n=t.installationEntry,(r=t.registrationPromise)?r.catch(console.error):oe(e).catch(console.error),[2,n.fid]}}))}))}(n)},getToken:function(e){return function(e,t){return void 0===t&&(t=!1),Object(f.__awaiter)(this,void 0,void 0,(function(){return Object(f.__generator)(this,(function(n){switch(n.label){case 0:return[4,ue(e.appConfig)];case 1:return n.sent(),[4,oe(e,t)];case 2:return[2,n.sent().token]}}))}))}(n,e)},delete:function(){return function(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,n;return Object(f.__generator)(this,(function(r){switch(r.label){case 0:return[4,Z(t=e.appConfig,(function(e){if(!e||0!==e.registrationStatus)return e}))];case 1:if(!(n=r.sent()))return[3,6];if(1!==n.registrationStatus)return[3,2];throw T.create("delete-pending-registration");case 2:if(2!==n.registrationStatus)return[3,6];if(navigator.onLine)return[3,3];throw T.create("app-offline");case 3:return[4,ce(t,n)];case 4:return r.sent(),[4,J(t)];case 5:r.sent(),r.label=6;case 6:return[2]}}
2))}))}(n)},onIdChange:function(e){return le(n,e)}}}),"PUBLIC")),W.registerVersion("@firebase/installations",w);var he,de=((G={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',G["only-available-in-window"]="This method is available in a Window context.",G["only-available-in-sw"]="This method is available in a service worker context.",G["permission-default"]="The notification permission was not granted and dismissed instead.",G["permission-blocked"]="The notification permission was not granted and blocked instead.",G["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",G["failed-service-worker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",G["token-subscribe-failed"]="A problem occurred while subscribing the user to FCM: {$errorInfo}",G["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",G["token-unsubscribe-failed"]="A problem occurred while unsubscribing the user from FCM: {$errorInfo}",G["token-update-failed"]="A problem occurred while updating the user from FCM: {$errorInfo}",G["token-update-no-token"]="FCM returned no token when updating the user to push.",G["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.",G["invalid-sw-registration"]="The input to useServiceWorker() must be a ServiceWorkerRegistration.",G["invalid-bg-handler"]="The input to setBackgroundMessageHandler() must be a function.",G["invalid-vapid-key"]="The public VAPID key must be a string.",G["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.",G),pe=new a.ErrorFactory("messaging","Messaging",de),ge="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",ve="google.c.a.c_id";function me(e){var t=new Uint8Array(e);return btoa(String.fromCharCode.apply(String,Object(f.__spreadArray)([],Object(f.__read)(t)))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function ye(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(t),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}!function(e){e.PUSH_RECEIVED="push-received",e.NOTIFICATION_CLICKED="notification-clicked"}(he||(he={}));var be="fcm_token_details_db",_e="fcm_token_object_Store";function we(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,n,r=this;return Object(f.__generator)(this,(function(i){switch(i.label){case 0:return"databases"in indexedDB?[4,indexedDB.databases()]:[3,2];case 1:if(t=i.sent(),!t.map((function(e){return e.name})).includes(be))return[2,null];i.label=2;case 2:return n=null,[4,Object(_.openDb)(be,5,(function(t){return Object(f.__awaiter)(r,void 0,void 0,(function(){var r,i,o,a;return Object(f.__generator)(this,(function(s){switch(s.label){case 0:return t.oldVersion<2?[2]:t.objectStoreNames.contains(_e)?[4,(r=t.transaction.objectStore(_e)).index("fcmSenderId").get(e)]:[2];case 1:return i=s.sent(),[4,r.clear()];case 2:if(s.sent(),!i)return[2];if(2===t.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:me(o.vapidKey)}}}else(3===t.oldVersion||4===t.oldVersion)&&(n={token:(o=i).fcmToken,createTime:o.createTime,subscriptionOptions:{auth:me(o.auth),p256dh:me(o.p256dh),endpoint:o.endpoint,swScope:o.swScope,vapidKey:me(o.vapidKey)}});return[2]}}))}))}))];case 3:return i.sent().close(),[4,Object(_.deleteDb)(be)];case 4:return i.sent(),[4,Object(_.deleteDb)("fcm_vapid_details_db")];case 5:return i.sent(),[4,Object(_.deleteDb)("undefined")];case 6:return i.sent(),[2,ke(n)?n:null]}}))}))}function ke(e){if(!e||!e.subscriptionOptions)return!1;var t=e.subscriptionOptions;return"number"===typeof e.createTime&&e.createTime>0&&"string"===typeof e.token&&e.token.length>0&&"string"===typeof t.auth&&t.auth.length>0&&"string"===typeof t.p256dh&&t.p256dh.length>0&&"string"===typeof t.endpoint&&t.endpoint.length>0&&"string"===typeof t.swScope&&t.swScope.length>0&&"string"===typeof t.vapidKey&&t.vapidKey.length>0}var Ee="firebase-messaging-store",Se=null;function Ie(){return Se||(Se=Object(_.openDb)("firebase-messaging-database",1,(function(e){switch(e.oldVersion){case 0:e.createObjectStore(Ee)}}))),Se}function xe(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return Object(f.__generator)(this,(function(i){switch(i.label){case 0:return t=Oe(e),[4,Ie()];case 1:return[4,i.sent().transaction(Ee).objectStore(Ee).get(t)];case 2:return(n=i.sent())?[2,n]:[3,3];case 3:return[4,we(e.appConfig.senderId)];case 4:return(r=i.sent())?[4,Te(e,r)]:[3,6];case 5:return i.sent(),[2,r];case 6:return[2]}}
2))}))}function Te(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n,r,i;return Object(f.__generator)(this,(function(o){switch(o.label){case 0:return n=Oe(e),[4,Ie()];case 1:return r=o.sent(),[4,(i=r.transaction(Ee,"readwrite")).objectStore(Ee).put(t,n)];case 2:return o.sent(),[4,i.complete];case 3:return o.sent(),[2,t]}}))}))}function Ce(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return Object(f.__generator)(this,(function(i){switch(i.label){case 0:return t=Oe(e),[4,Ie()];case 1:return n=i.sent(),[4,(r=n.transaction(Ee,"readwrite")).objectStore(Ee).delete(t)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function Oe(e){return e.appConfig.appId}function Ae(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,a,s;return Object(f.__generator)(this,(function(u){switch(u.label){case 0:return[4,je(e)];case 1:n=u.sent(),r=De(t),i={method:"POST",headers:n,body:JSON.stringify(r)},u.label=2;case 2:return u.trys.push([2,5,,6]),[4,fetch(Re(e.appConfig),i)];case 3:return[4,u.sent().json()];case 4:return o=u.sent(),[3,6];case 5:throw a=u.sent(),pe.create("token-subscribe-failed",{errorInfo:a});case 6:if(o.error)throw s=o.error.message,pe.create("token-subscribe-failed",{errorInfo:s});if(!o.token)throw pe.create("token-subscribe-no-token");return[2,o.token]}}))}))}function Ne(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,a,s;return Object(f.__generator)(this,(function(u){switch(u.label){case 0:return[4,je(e)];case 1:n=u.sent(),r=De(t.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)},u.label=2;case 2:return u.trys.push([2,5,,6]),[4,fetch(Re(e.appConfig)+"/"+t.token,i)];case 3:return[4,u.sent().json()];case 4:return o=u.sent(),[3,6];case 5:throw a=u.sent(),pe.create("token-update-failed",{errorInfo:a});case 6:if(o.error)throw s=o.error.message,pe.create("token-update-failed",{errorInfo:s});if(!o.token)throw pe.create("token-update-no-token");return[2,o.token]}}))}))}function Pe(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,a;return Object(f.__generator)(this,(function(s){switch(s.label){case 0:return[4,je(e)];case 1:n=s.sent(),r={method:"DELETE",headers:n},s.label=2;case 2:return s.trys.push([2,5,,6]),[4,fetch(Re(e.appConfig)+"/"+t,r)];case 3:return[4,s.sent().json()];case 4:if((i=s.sent()).error)throw o=i.error.message,pe.create("token-unsubscribe-failed",{errorInfo:o});return[3,6];case 5:throw a=s.sent(),pe.create("token-unsubscribe-failed",{errorInfo:a});case 6:return[2]}}
2))}))}function Re(e){return"https://fcmregistrations.googleapis.com/v1/projects/"+e.projectId+"/registrations"}function je(e){var t=e.appConfig,n=e.installations;return Object(f.__awaiter)(this,void 0,void 0,(function(){var e;return Object(f.__generator)(this,(function(r){switch(r.label){case 0:return[4,n.getToken()];case 1:return e=r.sent(),[2,new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t.apiKey,"x-goog-firebase-installations-auth":"FIS "+e})]}}))}))}function De(e){var t=e.p256dh,n=e.auth,r=e.endpoint,i=e.vapidKey,o={web:{endpoint:r,auth:n,p256dh:t}};return i!==ge&&(o.web.applicationPubKey=i),o}function Me(e,t,n){return Object(f.__awaiter)(this,void 0,void 0,(function(){var r,i,o,a;return Object(f.__generator)(this,(function(s){switch(s.label){case 0:if("granted"!==Notification.permission)throw pe.create("permission-blocked");return[4,Ve(t,n)];case 1:return r=s.sent(),[4,xe(e)];case 2:return i=s.sent(),o={vapidKey:n,swScope:t.scope,endpoint:r.endpoint,auth:me(r.getKey("auth")),p256dh:me(r.getKey("p256dh"))},i?[3,3]:[2,Ue(e,o)];case 3:if(function(e,t){var n=t.vapidKey===e.vapidKey,r=t.endpoint===e.endpoint,i=t.auth===e.auth,o=t.p256dh===e.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,Pe(e,i.token)];case 5:return s.sent(),[3,7];case 6:return a=s.sent(),console.warn(a),[3,7];case 7:return[2,Ue(e,o)];case 8:return Date.now()>=i.createTime+6048e5?[2,Fe({token:i.token,createTime:Date.now(),subscriptionOptions:o},e,t)]:[2,i.token];case 9:return[2]}}
2))}))}function Le(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(f.__generator)(this,(function(i){switch(i.label){case 0:return[4,xe(e)];case 1:return(n=i.sent())?[4,Pe(e,n.token)]:[3,4];case 2:return i.sent(),[4,Ce(e)];case 3:i.sent(),i.label=4;case 4:return[4,t.pushManager.getSubscription()];case 5:return(r=i.sent())?[2,r.unsubscribe()]:[2,!0]}}))}))}function Fe(e,t,n){return Object(f.__awaiter)(this,void 0,void 0,(function(){var r,i,o;return Object(f.__generator)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,5]),[4,Ne(t,e)];case 1:return r=a.sent(),i=Object(f.__assign)(Object(f.__assign)({},e),{token:r,createTime:Date.now()}),[4,Te(t,i)];case 2:return a.sent(),[2,r];case 3:return o=a.sent(),[4,Le(t,n)];case 4:throw a.sent(),o;case 5:return[2]}}))}))}function Ue(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(f.__generator)(this,(function(i){switch(i.label){case 0:return[4,Ae(e,t)];case 1:return n=i.sent(),r={token:n,createTime:Date.now(),subscriptionOptions:t},[4,Te(e,r)];case 2:return i.sent(),[2,r.token]}}))}))}function Ve(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n;return Object(f.__generator)(this,(function(r){switch(r.label){case 0:return[4,e.pushManager.getSubscription()];case 1:return(n=r.sent())?[2,n]:[2,e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:ye(t)})]}}))}))}function Be(e){return"object"===typeof e&&!!e&&ve in e}function qe(e){return new Promise((function(t){setTimeout(t,e)}))}var ze=function(){function e(e){var t=this;this.firebaseDependencies=e,this.isOnBackgroundMessageUsed=null,this.vapidKey=null,this.bgMessageHandler=null,self.addEventListener("push",(function(e){e.waitUntil(t.onPush(e))})),self.addEventListener("pushsubscriptionchange",(function(e){e.waitUntil(t.onSubChange(e))})),self.addEventListener("notificationclick",(function(e){e.waitUntil(t.onNotificationClick(e))}))}return Object.defineProperty(e.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),e.prototype.setBackgroundMessageHandler=function(e){if(this.isOnBackgroundMessageUsed=!1,!e||"function"!==typeof e)throw pe.create("invalid-bg-handler");this.bgMessageHandler=e},e.prototype.onBackgroundMessage=function(e){var t=this;return this.isOnBackgroundMessageUsed=!0,this.bgMessageHandler=e,function(){t.bgMessageHandler=null}},e.prototype.getToken=function(){var e,t;return Object(f.__awaiter)(this,void 0,void 0,(function(){var n;return Object(f.__generator)(this,(function(r){switch(r.label){case 0:return this.vapidKey?[3,2]:[4,xe(this.firebaseDependencies)];case 1:n=r.sent(),this.vapidKey=null!==(t=null===(e=null===n||void 0===n?void 0:n.subscriptionOptions)||void 0===e?void 0:e.vapidKey)&&void 0!==t?t:ge,r.label=2;case 2:return[2,Me(this.firebaseDependencies,self.registration,this.vapidKey)]}}))}))},e.prototype.deleteToken=function(){return Le(this.firebaseDependencies,self.registration)},e.prototype.requestPermission=function(){throw pe.create("only-available-in-window")},e.prototype.usePublicVapidKey=function(e){if(null!==this.vapidKey)throw pe.create("use-vapid-key-after-get-token");if("string"!==typeof e||0===e.length)throw pe.create("invalid-vapid-key");this.vapidKey=e},e.prototype.useServiceWorker=function(){throw pe.create("only-available-in-window")},e.prototype.onMessage=function(){throw pe.create("only-available-in-window")},e.prototype.onTokenRefresh=function(){throw pe.create("only-available-in-window")},e.prototype.onPush=function(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,n,r,i;return Object(f.__generator)(this,(function(o){switch(o.label){case 0:return(t=function(e){var t=e.data;if(!t)return null;try{return t.json()}catch(n){return null}}(e))?[4,Ge()]:(console.debug("FirebaseMessaging: failed to get parsed MessagePayload from the PushEvent. Skip handling the push."),[2]);case 1:return function(e){return e.some((function(e){return"visible"===e.visibilityState&&!e.url.startsWith("chrome-extension://")}))}(n=o.sent())?[2,We(n,t)]:(r=!1,t.notification?[4,Ye(He(t))]:[3,3]);case 2:o.sent(),r=!0,o.label=3;
2case 3:return!0===r&&!1===this.isOnBackgroundMessageUsed?[2]:(this.bgMessageHandler&&(i=function(e){var t={from:e.from,collapseKey:e.collapse_key};return function(e,t){if(t.notification){e.notification={};var n=t.notification.title;n&&(e.notification.title=n);var r=t.notification.body;r&&(e.notification.body=r);var i=t.notification.image;i&&(e.notification.image=i)}}(t,e),function(e,t){t.data&&(e.data=t.data)}(t,e),function(e,t){if(t.fcmOptions){e.fcmOptions={};var n=t.fcmOptions.link;n&&(e.fcmOptions.link=n);var r=t.fcmOptions.analytics_label;r&&(e.fcmOptions.analyticsLabel=r)}}(t,e),t}(t),"function"===typeof this.bgMessageHandler?this.bgMessageHandler(i):this.bgMessageHandler.next(i)),[4,qe(1e3)]);case 4:return o.sent(),[2]}}))}))},e.prototype.onSubChange=function(e){var t,n;return Object(f.__awaiter)(this,void 0,void 0,(function(){var r;return Object(f.__generator)(this,(function(i){switch(i.label){case 0:return e.newSubscription?[3,2]:[4,Le(this.firebaseDependencies,self.registration)];case 1:return i.sent(),[2];case 2:return[4,xe(this.firebaseDependencies)];case 3:return r=i.sent(),[4,Le(this.firebaseDependencies,self.registration)];case 4:return i.sent(),[4,Me(this.firebaseDependencies,self.registration,null!==(n=null===(t=null===r||void 0===r?void 0:r.subscriptionOptions)||void 0===t?void 0:t.vapidKey)&&void 0!==n?n:ge)];case 5:return i.sent(),[2]}}))}))},e.prototype.onNotificationClick=function(e){var t,n;return Object(f.__awaiter)(this,void 0,void 0,(function(){var r,i,o,a,s;return Object(f.__generator)(this,(function(u){switch(u.label){case 0:return(r=null===(n=null===(t=e.notification)||void 0===t?void 0:t.data)||void 0===n?void 0:n.FCM_MSG)?e.action?[2]:(e.stopImmediatePropagation(),e.notification.close(),(i=function(e){var t,n,r,i=null!==(n=null===(t=e.fcmOptions)||void 0===t?void 0:t.link)&&void 0!==n?n:null===(r=e.notification)||void 0===r?void 0:r.click_action;if(i)return i;return Be(e.data)?self.location.origin:null}(r))?(o=new URL(i,self.location.href),a=new URL(self.location.origin),o.host!==a.host?[2]:[4,Ke(o)]):[2]):[2];case 1:return(s=u.sent())?[3,4]:[4,self.clients.openWindow(i)];case 2:return s=u.sent(),[4,qe(3e3)];case 3:return u.sent(),[3,6];case 4:return[4,s.focus()];case 5:s=u.sent(),u.label=6;case 6:return s?(r.messageType=he.NOTIFICATION_CLICKED,r.isFirebaseMessaging=!0,[2,s.postMessage(r)]):[2]}}))}))},e}();function He(e){var t,n=Object(f.__assign)({},e.notification);return n.data=((t={}).FCM_MSG=e,t),n}function Ke(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,n,r,i,o,a,s;return Object(f.__generator)(this,(function(u){switch(u.label){case 0:return[4,Ge()];case 1:t=u.sent();try{for(n=Object(f.__values)(t),r=n.next();!r.done;r=n.next())if(i=r.value,o=new URL(i.url,self.location.href),e.host===o.host)return[2,i]}catch(c){a={error:c}}finally{try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}}return[2,null]}}))}))}function We(e,t){var n,r;t.isFirebaseMessaging=!0,t.messageType=he.PUSH_RECEIVED;try{for(var i=Object(f.__values)(e),o=i.next();!o.done;o=i.next()){o.value.postMessage(t)}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function Ge(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function Ye(e){var t,n=e.actions,r=Notification.maxActions;return n&&r&&n.length>r&&console.warn("This browser only supports "+r+" actions. The remaining actions will not be displayed."),self.registration.showNotification(null!==(t=e.title)&&void 0!==t?t:"",e)}var $e=function(){function e(e){var t=this;this.firebaseDependencies=e,this.vapidKey=null,this.onMessageCallback=null,navigator.serviceWorker.addEventListener("message",(function(e){return t.messageEventListener(e)}))}return Object.defineProperty(e.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),e.prototype.messageEventListener=function(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,n;return Object(f.__generator)(this,(function(r){switch(r.label){case 0:return(t=e.data).isFirebaseMessaging?(this.onMessageCallback&&t.messageType===he.PUSH_RECEIVED&&("function"===typeof this.onMessageCallback?this.onMessageCallback(function(e){return delete e.messageType,delete e.isFirebaseMessaging,e}(Object.assign({},t))):this.onMessageCallback.next(Object.assign({},t))),Be(n=t.data)&&"1"===n["google.c.a.e"]?[4,this.logEvent(t.messageType,n)]:[3,2]):[2];case 1:r.sent(),r.label=2;case 2:return[2]}}
2))}))},e.prototype.getVapidKey=function(){return this.vapidKey},e.prototype.getSwReg=function(){return this.swRegistration},e.prototype.getToken=function(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){return Object(f.__generator)(this,(function(t){switch(t.label){case 0:return"default"!==Notification.permission?[3,2]:[4,Notification.requestPermission()];case 1:t.sent(),t.label=2;case 2:if("granted"!==Notification.permission)throw pe.create("permission-blocked");return[4,this.updateVapidKey(null===e||void 0===e?void 0:e.vapidKey)];case 3:return t.sent(),[4,this.updateSwReg(null===e||void 0===e?void 0:e.serviceWorkerRegistration)];case 4:return t.sent(),[2,Me(this.firebaseDependencies,this.swRegistration,this.vapidKey)]}}))}))},e.prototype.updateVapidKey=function(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){return Object(f.__generator)(this,(function(t){return e?this.vapidKey=e:this.vapidKey||(this.vapidKey=ge),[2]}))}))},e.prototype.updateSwReg=function(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){return Object(f.__generator)(this,(function(t){switch(t.label){case 0:return e||this.swRegistration?[3,2]:[4,this.registerDefaultSw()];case 1:t.sent(),t.label=2;case 2:if(!e&&this.swRegistration)return[2];if(!(e instanceof ServiceWorkerRegistration))throw pe.create("invalid-sw-registration");return this.swRegistration=e,[2]}}))}))},e.prototype.registerDefaultSw=function(){return Object(f.__awaiter)(this,void 0,void 0,(function(){var e,t;return Object(f.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=this,[4,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"})];case 1:return e.swRegistration=n.sent(),this.swRegistration.update().catch((function(){})),[3,3];case 2:throw t=n.sent(),pe.create("failed-service-worker-registration",{browserErrorMessage:t.message});case 3:return[2]}}
2))}))},e.prototype.deleteToken=function(){return Object(f.__awaiter)(this,void 0,void 0,(function(){return Object(f.__generator)(this,(function(e){switch(e.label){case 0:return this.swRegistration?[3,2]:[4,this.registerDefaultSw()];case 1:e.sent(),e.label=2;case 2:return[2,Le(this.firebaseDependencies,this.swRegistration)]}}))}))},e.prototype.requestPermission=function(){return Object(f.__awaiter)(this,void 0,void 0,(function(){var e;return Object(f.__generator)(this,(function(t){switch(t.label){case 0:return"granted"===Notification.permission?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(e=t.sent()))return[2];throw"denied"===e?pe.create("permission-blocked"):pe.create("permission-default")}}))}))},e.prototype.usePublicVapidKey=function(e){if(null!==this.vapidKey)throw pe.create("use-vapid-key-after-get-token");if("string"!==typeof e||0===e.length)throw pe.create("invalid-vapid-key");this.vapidKey=e},e.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw pe.create("invalid-sw-registration");if(this.swRegistration)throw pe.create("use-sw-after-get-token");this.swRegistration=e},e.prototype.onMessage=function(e){var t=this;return this.onMessageCallback=e,function(){t.onMessageCallback=null}},e.prototype.setBackgroundMessageHandler=function(){throw pe.create("only-available-in-sw")},e.prototype.onBackgroundMessage=function(){throw pe.create("only-available-in-sw")},e.prototype.onTokenRefresh=function(){return function(){}},e.prototype.logEvent=function(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n;return Object(f.__generator)(this,(function(r){switch(r.label){case 0:return n=function(e){switch(e){case he.NOTIFICATION_CLICKED:return"notification_open";case he.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}(e),[4,this.firebaseDependencies.analyticsProvider.get()];case 1:return r.sent().logEvent(n,{message_id:t["google.c.a.c_id"],message_name:t["google.c.a.c_l"],message_time:t["google.c.a.ts"],message_device_time:Math.floor(Date.now()/1e3)}),[2]}}))}))},e}();function Qe(e){return pe.create("missing-app-config-values",{valueName:e})}var Xe={isSupported:Je};function Je(){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.default.INTERNAL.registerComponent(new c.Component("messaging",(function(e){var t=e.getProvider("app").getImmediate(),n={app:t,appConfig:function(e){var t,n;if(!e||!e.options)throw Qe("App Configuration Object");if(!e.name)throw Qe("App Name");var r=e.options;try{for(var i=Object(f.__values)(["projectId","apiKey","appId","messagingSenderId"]),o=i.next();!o.done;o=i.next()){var a=o.value;if(!r[a])throw Qe(a)}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return{appName:e.name,projectId:r.projectId,apiKey:r.apiKey,appId:r.appId,senderId:r.messagingSenderId}}(t),installations:e.getProvider("installations").getImmediate(),analyticsProvider:e.getProvider("analytics-internal")};if(!Je())throw pe.create("unsupported-browser");return self&&"ServiceWorkerGlobalScope"in self?new ze(n):new $e(n)}),"PUBLIC").setServiceProps(Xe));var Ze="firebasestorage.googleapis.com",et=function(e){function t(n,r){var i=e.call(this,tt(n),"Firebase Storage: "+r+" ("+tt(n)+")")||this;return i.customData={serverResponse:null},i._baseMessage=i.message,Object.setPrototypeOf(i,t.prototype),i}return Object(f.__extends)(t,e),t.prototype._codeEquals=function(e){return tt(e)===this.code},Object.defineProperty(t.prototype,"serverResponse",{get:function(){return this.customData.serverResponse},set:function(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=this._baseMessage+"\n"+this.customData.serverResponse:this.message=this._baseMessage}
2,enumerable:!1,configurable:!0}),t}(a.FirebaseError);function tt(e){return"storage/"+e}function nt(){return new et("unknown","An unknown error occurred, please check the error payload for server response.")}function rt(){return new et("canceled","User canceled the upload/download.")}function it(){return new et("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.")}function ot(e){return new et("invalid-argument",e)}function at(){return new et("app-deleted","The Firebase app was deleted.")}function st(e){return new et("invalid-root-operation","The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function ut(e,t){return new et("invalid-format","String does not match format '"+e+"': "+t)}function ct(e){throw new et("internal-error","Internal error: "+e)}var lt={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},ft=function(e,t){this.data=e,this.contentType=t||null};function ht(e,t){switch(e){case lt.RAW:return new ft(dt(t));case lt.BASE64:case lt.BASE64URL:return new ft(pt(e,t));case lt.DATA_URL:return new ft(function(e){var t=new gt(e);return t.base64?pt(lt.BASE64,t.rest):function(e){var t;try{t=decodeURIComponent(e)}catch(r){throw ut(lt.DATA_URL,"Malformed data URL.")}return dt(t)}(t.rest)}(t),new gt(t).contentType)}throw nt()}function dt(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=127)t.push(r);else if(r<=2047)t.push(192|r>>6,128|63&r);else if(55296===(64512&r))if(n<e.length-1&&56320===(64512&e.charCodeAt(n+1)))r=65536|(1023&r)<<10|1023&e.charCodeAt(++n),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r);else t.push(239,191,189);else 56320===(64512&r)?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(t)}function pt(e,t){switch(e){case lt.BASE64:var n=-1!==t.indexOf("-"),i=-1!==t.indexOf("_");if(n||i)throw ut(e,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break;case lt.BASE64URL:var o=-1!==t.indexOf("+"),a=-1!==t.indexOf("/");if(o||a)throw ut(e,"Invalid character '"+(o?"+":"/")+"' found: is it base64 encoded?");t=t.replace(/-/g,"+").replace(/_/g,"/")}var s;try{s=atob(t)}catch(r){throw ut(e,"Invalid character found")}for(var u=new Uint8Array(s.length),c=0;c<s.length;c++)u[c]=s.charCodeAt(c);return u}var gt=function(e){this.base64=!1,this.contentType=null;var t=e.match(/^data:([^,]+)?,/);if(null===t)throw ut(lt.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");var n=t[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=e.substring(e.indexOf(",")+1);var r,i};var vt,mt={STATE_CHANGED:"state_changed"},yt={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function bt(e){switch(e){case"running":case"pausing":case"canceling":return yt.RUNNING;case"paused":return yt.PAUSED;case"success":return yt.SUCCESS;case"canceled":return yt.CANCELED;case"error":default:return yt.ERROR}}!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(vt||(vt={}));var _t=function(){function e(){var e=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=vt.NO_ERROR,this.sendPromise_=new Promise((function(t){e.xhr_.addEventListener("abort",(function(){e.errorCode_=vt.ABORT,t(e)})),e.xhr_.addEventListener("error",(function(){e.errorCode_=vt.NETWORK_ERROR,t(e)})),e.xhr_.addEventListener("load",(function(){t(e)}))}))}return e.prototype.send=function(e,t,n,r){if(this.sent_)throw ct("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!0),void 0!==r)for(var i in r)r.hasOwnProperty(i)&&this.xhr_.setRequestHeader(i,r[i].toString());return void 0!==n?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_},e.prototype.getErrorCode=function(){if(!this.sent_)throw ct("cannot .getErrorCode() before sending");return this.errorCode_},e.prototype.getStatus=function(){if(!this.sent_)throw ct("cannot .getStatus() before sending");try{return this.xhr_.status}catch(r){return-1}},e.prototype.getResponseText=function(){if(!this.sent_)throw ct("cannot .getResponseText() before sending");return this.xhr_.responseText},e.prototype.abort=function(){this.xhr_.abort()},e.prototype.getResponseHeader=function(e){return this.xhr_.getResponseHeader(e)},e.prototype.addUploadProgressListener=function(e){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",e)},e.prototype.removeUploadProgressListener=function(e){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",e)},e}(),wt=function(){function e(){}return e.prototype.createXhrIo=function(){return new _t},e}(),kt=function(){function e(e,t){this.bucket=e,this.path_=t}return Object.defineProperty(e.prototype,"path",{get:function(){return this.path_}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return 0===this.path.length},enumerable:!1,configurable:!0}),e.prototype.fullServerUrl=function(){var e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)},e.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},e.makeFromBucketSpec=function(t,n){var i;try{i=e.makeFromUrl(t,n)}catch(r){return new e(t,"")}if(""===i.path)return i;throw new et("invalid-default-bucket","Invalid default bucket '"+t+"'.")},e.makeFromUrl=function(t,n){var r=null,i="([A-Za-z0-9.\\-_]+)";var o=new RegExp("^gs://"+i+"(/(.*))?$","i");function a(e){e.path_=decodeURIComponent(e.path)}for(var s=n.replace(/[.]/g,"\\."),u=[{regex:o,indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:new RegExp("^https?://"+s+"/v[A-Za-z0-9_]+/b/"+i+"/o(/([^?#]*).*)?$","i"),indices:{bucket:1,path:3},postModify:a},{regex:new RegExp("^https?://"+(n===Ze?"(?:storage.googleapis.com|storage.cloud.google.com)":n)+"/"+i+"/([^?#]*)","i"),indices:{bucket:1,path:2},postModify:a}],c=0;c<u.length;c++){var l=u[c],f=l.regex.exec(t);if(f){var h=f[l.indices.bucket],d=f[l.indices.path];d||(d=""),r=new e(h,d),l.postModify(r);break}}if(null==r)throw function(e){return new et("invalid-url","Invalid URL '"+e+"'.")}(t);return r},e}(),Et=function(){function e(e){this.promise_=Promise.reject(e)}return e.prototype.getPromise=function(){return this.promise_},e.prototype.cancel=function(e){},e}();function St(e){return"string"===typeof e||e instanceof String}function It(e){return xt()&&e instanceof Blob}function xt(){return"undefined"!==typeof Blob}function Tt(e,t,n,r){if(r<t)throw ot("Invalid value for '"+e+"'. Expected "+t+" or greater.");if(r>n)throw ot("Invalid value for '"+e+"'. Expected "+n+" or less.")}function Ct(e,t){var n=t.match(/^(\w+):\/\/.+/),r=t;return null==(null===n||void 0===n?void 0:n[1])&&(r="https://"+t),r+"/v0"+e}function Ot(e){var t=encodeURIComponent,n="?";for(var r in e){if(e.hasOwnProperty(r))n=n+(t(r)+"="+t(e[r]))+"&"}return n=n.slice(0,-1)}var At=function(){function e(e,t,n,r,i,o,a,s,u,c,l){var f=this;this.pendingXhr_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=e,this.method_=t,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(e,t){f.resolve_=e,f.reject_=t,f.start_()}))}return e.prototype.start_=function(){var e=this;function t(t,n){var i,o=e.resolve_,a=e.reject_,s=n.xhr;if(n.wasSuccessCode)try{var u=e.callback_(s,s.getResponseText());void 0!==u?o(u):o()}catch(r){a(r)}else null!==s?((i=nt()).serverResponse=s.getResponseText(),e.errorCallback_?a(e.errorCallback_(s,i)):a(i)):n.canceled?a(i=e.appDelete_?at():rt()):a(i=new et("retry-limit-exceeded","Max retry time for operation exceeded, please try again."))}this.canceled_?t(0,new Nt(!1,null,!0)):this.backoffId_=function(e,t,n){var r=1,i=null,o=!1,a=0;function s(){return 2===a}var u=!1;function c(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];u||(u=!0,t.apply(null,e))}function l(t){i=setTimeout((function(){i=null,e(h,s())}),t)}function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!u)if(e)c.call.apply(c,Object(f.__spreadArray)([null,e],t));else{var i;s()||o?c.call.apply(c,Object(f.__spreadArray)([null,e],t)):(r<64&&(r*=2),1===a?(a=2,i=0):i=1e3*(r+Math.random()),l(i))}}var d=!1;function p(e){d||(d=!0,u||(null!==i?(e||(a=2),clearTimeout(i),l(0)):e||(a=1)))}return l(0),setTimeout((function(){o=!0,p(!0)}),n),p}((function(t,n){if(n)t(!1,new Nt(!1,null,!0));else{var r=e.pool_.createXhrIo();e.pendingXhr_=r,null!==e.progressCallback_&&r.addUploadProgressListener(i),r.send(e.url_,e.method_,e.body_,e.headers_).then((function(n){null!==e.progressCallback_&&n.removeUploadProgressListener(i),e.pendingXhr_=null;var r=(n=n).getErrorCode()===vt.NO_ERROR,o=n.getStatus();if(r&&!e.isRetryStatusCode_(o)){var a=-1!==e.successCodes_.indexOf(o);t(!0,new Nt(a,n))}else{var s=n.getErrorCode()===vt.ABORT;t(!1,new Nt(!1,null,s))}}))}function i(t){var n=t.loaded,r=t.lengthComputable?t.total:-1;null!==e.progressCallback_&&e.progressCallback_(n,r)}}),t,this.timeout_)},e.prototype.getPromise=function(){return this.promise_},e.prototype.cancel=function(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingXhr_&&this.pendingXhr_.abort()},e.prototype.isRetryStatusCode_=function(e){var t=e>=500&&e<600,n=-1!==[408,429].indexOf(e),r=-1!==this.additionalRetryCodes_.indexOf(e);return t||n||r},e}(),Nt=function(e,t,n){this.wasSuccessCode=e,this.xhr=t,this.canceled=!!n};function Pt(){return"undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof WebKitBlobBuilder?Web
2KitBlobBuilder:void 0}function Rt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Pt();if(void 0!==n){for(var r=new n,i=0;i<e.length;i++)r.append(e[i]);return r.getBlob()}if(xt())return new Blob(e);throw new et("unsupported-environment","This browser doesn't seem to support creating Blobs")}var jt=function(){function e(e,t){var n=0,r="";It(e)?(this.data_=e,n=e.size,r=e.type):e instanceof ArrayBuffer?(t?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),n=this.data_.length):e instanceof Uint8Array&&(t?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),n=e.length),this.size_=n,this.type_=r}return e.prototype.size=function(){return this.size_},e.prototype.type=function(){return this.type_},e.prototype.slice=function(t,n){if(It(this.data_)){var r=function(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.mozSlice?e.mozSlice(t,n):e.slice?e.slice(t,n):null}(this.data_,t,n);return null===r?null:new e(r)}return new e(new Uint8Array(this.data_.buffer,t,n-t),!0)},e.getBlob=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(xt()){var r=t.map((function(t){return t instanceof e?t.data_:t}));return new e(Rt.apply(null,r))}var i=t.map((function(e){return St(e)?ht(lt.RAW,e).data:e.data_})),o=0;i.forEach((function(e){o+=e.byteLength}));var a=new Uint8Array(o),s=0;return i.forEach((function(e){for(var t=0;t<e.length;t++)a[s++]=e[t]})),new e(a,!0)},e.prototype.uploadData=function(){return this.data_},e}();function Dt(e){var t,n;try{t=JSON.parse(e)}catch(r){return null}return"object"!==typeof(n=t)||Array.isArray(n)?null:t}function Mt(e){var t=e.lastIndexOf("/",e.length-2);return-1===t?e:e.slice(t+1)}function Lt(e,t){return t}var Ft=function(e,t,n,r){this.server=e,this.local=t||e,this.writable=!!n,this.xform=r||Lt},Ut=null;function Vt(){if(Ut)return Ut;var e=[];e.push(new Ft("bucket")),e.push(new Ft("generation")),e.push(new Ft("metageneration")),e.push(new Ft("name","fullPath",!0));var t=new Ft("name");t.xform=function(e,t){return function(e){return!St(e)||e.length<2?e:Mt(e)}(t)},e.push(t);var n=new Ft("size");return n.xform=function(e,t){return void 0!==t?Number(t):t},e.push(n),e.push(new Ft("timeCreated")),e.push(new Ft("updated")),e.push(new Ft("md5Hash",null,!0)),e.push(new Ft("cacheControl",null,!0)),e.push(new Ft("contentDisposition",null,!0)),e.push(new Ft("contentEncoding",null,!0)),e.push(new Ft("contentLanguage",null,!0)),e.push(new Ft("contentType",null,!0)),e.push(new Ft("metadata","customMetadata",!0)),Ut=e}function Bt(e,t,n){for(var r={type:"file"},i=n.length,o=0;o<i;o++){var a=n[o];r[a.local]=a.xform(r,t[a.server])}return function(e,t){Object.defineProperty(e,"ref",{get:function(){var n=e.bucket,r=e.fullPath,i=new kt(n,r);return t._makeStorageReference(i)}})}(r,e),r}function qt(e,t,n){var r=Dt(t);return null===r?null:Bt(e,r,n)}function zt(e,t){for(var n={},r=t.length,i=0;i<r;i++){var o=t[i];o.writable&&(n[o.server]=e[o.local])}return JSON.stringify(n)}function Ht(e,t,n){var r=Dt(n);return null===r?null:function(e,t,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=e._makeStorageReference(new kt(t,a));r.prefixes.push(s)}if(n.items)for(var u=0,c=n.items;u<c.length;u++){var l=c[u];s=e._makeStorageReference(new kt(t,l.name)),r.items.push(s)}return r}(e,t,r)}var Kt=function(e,t,n,r){this.url=e,this.method=t,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 Wt(e){if(!e)throw nt()}function Gt(e,t){return function(n,r){var i=qt(e,r,t);return Wt(null!==i),i}}function Yt(e,t){return function(n,r){var i=qt(e,r,t);return Wt(null!==i),function(e,t,n){var r=Dt(t);if(null===r)return null;if(!St(r.downloadTokens))return null;var i=r.downloadTokens;if(0===i.length)return null;var o=encodeURIComponent;return i.split(",").map((function(t){var r=e.bucket,i=e.fullPath;return Ct("/b/"+o(r)+"/o/"+o(i),n)+Ot({alt:"media",token:t})}))[0]}(i,r,e.host)}}function $t(e){return function(t,n){var r,i,o;return 401===t.getStatus()?r=t.getResponseText().includes("Firebase App Check token is invali
2d")?new et("unauthorized-app","This app does not have permission to access Firebase Storage on this project."):new et("unauthenticated","User is not authenticated, please authenticate using Firebase Authentication and try again."):402===t.getStatus()?(o=e.bucket,r=new et("quota-exceeded","Quota for bucket '"+o+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===t.getStatus()?(i=e.path,r=new et("unauthorized","User does not have permission to access '"+i+"'.")):r=n,r.serverResponse=n.serverResponse,r}}function Qt(e){var t=$t(e);return function(n,r){var i,o=t(n,r);return 404===n.getStatus()&&(i=e.path,o=new et("object-not-found","Object '"+i+"' does not exist.")),o.serverResponse=r.serverResponse,o}}function Xt(e,t,n){var r=Ct(t.fullServerUrl(),e.host),i=e.maxOperationRetryTime,o=new Kt(r,"GET",Gt(e,n),i);return o.errorHandler=Qt(t),o}function Jt(e,t,n,r,i){var o={};t.isRoot?o.prefix="":o.prefix=t.path+"/",n&&n.length>0&&(o.delimiter=n),r&&(o.pageToken=r),i&&(o.maxResults=i);var a=Ct(t.bucketOnlyServerUrl(),e.host),s=e.maxOperationRetryTime,u=new Kt(a,"GET",function(e,t){return function(n,r){var i=Ht(e,t,r);return Wt(null!==i),i}}(e,t.bucket),s);return u.urlParams=o,u.errorHandler=$t(t),u}function Zt(e,t,n){var r=Object.assign({},n);return r.fullPath=e.path,r.size=t.size(),r.contentType||(r.contentType=function(e,t){return e&&e.contentType||t&&t.type()||"application/octet-stream"}(null,t)),r}var en=function(e,t,n,r){this.current=e,this.total=t,this.finalized=!!n,this.metadata=r||null};function tn(e,t){var n=null;try{n=e.getResponseHeader("X-Goog-Upload-Status")}catch(r){Wt(!1)}return Wt(!!n&&-1!==(t||["active"]).indexOf(n)),n}var nn=262144;function rn(e,t,n,r,i,o,a,s){var u=new en(0,0);if(a?(u.current=a.current,u.total=a.total):(u.current=0,u.total=r.size()),r.size()!==u.total)throw new et("server-file-wrong-size","Server recorded incorrect upload file size, please retry the upload.");var c=u.total-u.current,l=c;i>0&&(l=Math.min(l,i));var f=u.current,h=f+l,d={"X-Goog-Upload-Command":l===c?"upload, finalize":"upload","X-Goog-Upload-Offset":u.current},p=r.slice(f,h);if(null===p)throw it();var g=t.maxUploadRetryTime,v=new Kt(n,"POST",(function(e,n){var i,a=tn(e,["active","final"]),s=u.current+l,c=r.size();return i="final"===a?Gt(t,o)(e,n):null,new en(s,c,"final"===a,i)}),g);return v.headers=d,v.body=p.uploadData(),v.progressCallback=s||null,v.errorHandler=$t(e),v}var on=function(e,t,n){if("function"===typeof e||null!=t||null!=n)this.next=e,this.error=t,this.complete=n;else{var r=e;this.next=r.next,this.error=r.error,this.complete=r.complete}};function an(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];Promise.resolve().then((function(){return e.apply(void 0,t)}))}}var sn=function(){function e(e,t,n){var r=this;void 0===n&&(n=null),this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=e,this._blob=t,this._metadata=n,this._mappings=Vt(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=function(e){r._request=void 0,r._chunkMultiplier=1,e._codeEquals("canceled")?(r._needToFetchStatus=!0,r.completeTransitions_()):(r._error=e,r._transition("error"))},this._metadataErrorHandler=function(e){r._request=void 0,e._codeEquals("canceled")?r.completeTransitions_():(r._error=e,r._transition("error"))},this._promise=new Promise((function(e,t){r._resolve=e,r._reject=t,r._start()})),this._promise.then(null,(function(){}))}return e.prototype._makeProgressCallback=function(){var e=this,t=this._transferred;return function(n){return e._updateProgress(t+n)}},e.prototype._shouldDoResumable=function(e){return e.size()>262144},e.prototype._start=function(){"running"===this._state&&void 0===this._request&&(this._resumable?void 0===this._uploadUrl?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this._continueUpload():this._oneShotUpload())},e.prototype._resolveToken=function(e){var t=this;Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then((function(n){var r=n[0],i=n[1];switch(t._state){case"running":e(r,i);break;case"canceling":t._transition("canceled");break;case"pausing":t._transition("paused")}}))},e.prototype._createResumable=function(){var e=this;this._resolveToken((function(t,n){var i=function(e,t,n,i,o){var a=t.bucketOnlyServerUrl(),s=Zt(t,i,o),u={name:s.fullPath},c=Ct(a,e.host),l={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":i.size(),"X-Goog-Upload-Header-Content-Type":s.contentType,"Content-Type":"application/json; charset=utf-8"},f=zt(s,n),h=e.maxUploadRetryTime,d=new Kt(c,"POST",(function(e){var t;tn(e);try{t=e.getResponseHeader("X-Goog-Upload-URL")}catch(r){Wt(!1)}return Wt(St(t)),t}),h);
2return d.urlParams=u,d.headers=l,d.body=f,d.errorHandler=$t(t),d}(e._ref.storage,e._ref._location,e._mappings,e._blob,e._metadata),o=e._ref.storage._makeRequest(i,t,n);e._request=o,o.getPromise().then((function(t){e._request=void 0,e._uploadUrl=t,e._needToFetchStatus=!1,e.completeTransitions_()}),e._errorHandler)}))},e.prototype._fetchStatus=function(){var e=this,t=this._uploadUrl;this._resolveToken((function(n,i){var o=function(e,t,n,i){var o=e.maxUploadRetryTime,a=new Kt(n,"POST",(function(e){var t=tn(e,["active","final"]),n=null;try{n=e.getResponseHeader("X-Goog-Upload-Size-Received")}catch(r){Wt(!1)}n||Wt(!1);var o=Number(n);return Wt(!isNaN(o)),new en(o,i.size(),"final"===t)}),o);return a.headers={"X-Goog-Upload-Command":"query"},a.errorHandler=$t(t),a}(e._ref.storage,e._ref._location,t,e._blob),a=e._ref.storage._makeRequest(o,n,i);e._request=a,a.getPromise().then((function(t){t=t,e._request=void 0,e._updateProgress(t.current),e._needToFetchStatus=!1,t.finalized&&(e._needToFetchMetadata=!0),e.completeTransitions_()}),e._errorHandler)}))},e.prototype._continueUpload=function(){var e=this,t=nn*this._chunkMultiplier,n=new en(this._transferred,this._blob.size()),i=this._uploadUrl;this._resolveToken((function(o,a){var s;try{s=rn(e._ref._location,e._ref.storage,i,e._blob,t,e._mappings,n,e._makeProgressCallback())}catch(r){return e._error=r,void e._transition("error")}var u=e._ref.storage._makeRequest(s,o,a);e._request=u,u.getPromise().then((function(t){e._increaseMultiplier(),e._request=void 0,e._updateProgress(t.current),t.finalized?(e._metadata=t.metadata,e._transition("success")):e.completeTransitions_()}),e._errorHandler)}))},e.prototype._increaseMultiplier=function(){nn*this._chunkMultiplier<33554432&&(this._chunkMultiplier*=2)},e.prototype._fetchMetadata=function(){var e=this;this._resolveToken((function(t,n){var r=Xt(e._ref.storage,e._ref._location,e._mappings),i=e._ref.storage._makeRequest(r,t,n);e._request=i,i.getPromise().then((function(t){e._request=void 0,e._metadata=t,e._transition("success")}),e._metadataErrorHandler)}))},e.prototype._oneShotUpload=function(){var e=this;this._resolveToken((function(t,n){var r=function(e,t,n,r,i){var o=t.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"},s=function(){for(var e="",t=0;t<2;t++)e+=Math.random().toString().slice(2);return e}();a["Content-Type"]="multipart/related; boundary="+s;var u=Zt(t,r,i),c="--"+s+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+zt(u,n)+"\r\n--"+s+"\r\nContent-Type: "+u.contentType+"\r\n\r\n",l="\r\n--"+s+"--",f=jt.getBlob(c,r,l);if(null===f)throw it();var h={name:u.fullPath},d=Ct(o,e.host),p=e.maxUploadRetryTime,g=new Kt(d,"POST",Gt(e,n),p);return g.urlParams=h,g.headers=a,g.body=f.uploadData(),g.errorHandler=$t(t),g}(e._ref.storage,e._ref._location,e._mappings,e._blob,e._metadata),i=e._ref.storage._makeRequest(r,t,n);e._request=i,i.getPromise().then((function(t){e._request=void 0,e._metadata=t,e._updateProgress(e._blob.size()),e._transition("success")}),e._errorHandler)}))},e.prototype._updateProgress=function(e){var t=this._transferred;this._transferred=e,this._transferred!==t&&this._notifyObservers()},e.prototype._transition=function(e){if(this._state!==e)switch(e){case"canceling":case"pausing":this._state=e,void 0!==this._request&&this._request.cancel();break;case"running":var t="paused"===this._state;this._state=e,t&&(this._notifyObservers(),this._start());break;case"paused":this._state=e,this._notifyObservers();break;case"canceled":this._error=rt(),this._state=e,this._notifyObservers();break;case"error":case"success":this._state=e,this._notifyObservers()}},e.prototype.completeTransitions_=function(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start()}},Object.defineProperty(e.prototype,"snapshot",{get:function(){var e=bt(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:e,metadata:this._metadata,task:this,ref:this._ref}},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t,n,r){var i=this,o=new on(t,n,r);return this._addObserver(o),function(){i._removeObserver(o)}},e.prototype.then=function(e,t){return this._promise.then(e,t)},e.prototype.catch=function(e){return this.then(null,e)},e.prototype._addObserver=function(e){this._observers.push(e),this._notifyObserver(e)},e.prototype._removeObserver=function(e){var t=this._observers.indexOf(e);-1!==t&&this._observers.splice(t,1)},e.prototype._notifyObservers=function(){var e=this;
2this._finishPromise(),this._observers.slice().forEach((function(t){e._notifyObserver(t)}))},e.prototype._finishPromise=function(){if(void 0!==this._resolve){var e=!0;switch(bt(this._state)){case yt.SUCCESS:an(this._resolve.bind(null,this.snapshot))();break;case yt.CANCELED:case yt.ERROR:an(this._reject.bind(null,this._error))();break;default:e=!1}e&&(this._resolve=void 0,this._reject=void 0)}},e.prototype._notifyObserver=function(e){switch(bt(this._state)){case yt.RUNNING:case yt.PAUSED:e.next&&an(e.next.bind(e,this.snapshot))();break;case yt.SUCCESS:e.complete&&an(e.complete.bind(e))();break;case yt.CANCELED:case yt.ERROR:e.error&&an(e.error.bind(e,this._error))();break;default:e.error&&an(e.error.bind(e,this._error))()}},e.prototype.resume=function(){var e="paused"===this._state||"pausing"===this._state;return e&&this._transition("running"),e},e.prototype.pause=function(){var e="running"===this._state;return e&&this._transition("pausing"),e},e.prototype.cancel=function(){var e="running"===this._state||"pausing"===this._state;return e&&this._transition("canceling"),e},e}(),un=function(){function e(e,t){this._service=e,this._location=t instanceof kt?t:kt.makeFromUrl(t,e.host)}return e.prototype.toString=function(){return"gs://"+this._location.bucket+"/"+this._location.path},e.prototype._newRef=function(t,n){return new e(t,n)},Object.defineProperty(e.prototype,"root",{get:function(){var e=new kt(this._location.bucket,"");return this._newRef(this._service,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bucket",{get:function(){return this._location.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullPath",{get:function(){return this._location.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return Mt(this._location.path)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"storage",{get:function(){return this._service},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=function(e){if(0===e.length)return null;var t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}(this._location.path);if(null===t)return null;var n=new kt(this._location.bucket,t);return new e(this._service,n)},enumerable:!1,configurable:!0}),e.prototype._throwIfRoot=function(e){if(""===this._location.path)throw st(e)},e}();function cn(e){var t={prefixes:[],items:[]};return ln(e,t).then((function(){return t}))}
2function ln(e,t,n){return Object(f.__awaiter)(this,void 0,void 0,(function(){var r,i,o;return Object(f.__generator)(this,(function(a){switch(a.label){case 0:return[4,fn(e,{pageToken:n})];case 1:return r=a.sent(),(i=t.prefixes).push.apply(i,r.prefixes),(o=t.items).push.apply(o,r.items),null==r.nextPageToken?[3,3]:[4,ln(e,t,r.nextPageToken)];case 2:a.sent(),a.label=3;case 3:return[2]}}))}))}function fn(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n,r;return Object(f.__generator)(this,(function(i){switch(i.label){case 0:return null!=t&&"number"===typeof t.maxResults&&Tt("options.maxResults",1,1e3,t.maxResults),n=t||{},r=Jt(e.storage,e._location,"/",n.pageToken,n.maxResults),[4,e.storage.makeRequestWithTokens(r)];case 1:return[2,i.sent().getPromise()]}}))}))}function hn(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n;return Object(f.__generator)(this,(function(r){switch(r.label){case 0:return e._throwIfRoot("updateMetadata"),n=function(e,t,n,r){var i=Ct(t.fullServerUrl(),e.host),o=zt(n,r),a=e.maxOperationRetryTime,s=new Kt(i,"PATCH",Gt(e,r),a);return s.headers={"Content-Type":"application/json; charset=utf-8"},s.body=o,s.errorHandler=Qt(t),s}(e.storage,e._location,t,Vt()),[4,e.storage.makeRequestWithTokens(n)];case 1:return[2,r.sent().getPromise()]}}))}))}function dn(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t;return Object(f.__generator)(this,(function(n){switch(n.label){case 0:return e._throwIfRoot("getDownloadURL"),t=function(e,t,n){var r=Ct(t.fullServerUrl(),e.host),i=e.maxOperationRetryTime,o=new Kt(r,"GET",Yt(e,n),i);return o.errorHandler=Qt(t),o}(e.storage,e._location,Vt()),[4,e.storage.makeRequestWithTokens(t)];case 1:return[2,n.sent().getPromise().then((function(e){if(null===e)throw new et("no-download-url","The given file does not have any download URLs.");return e}))]}}))}))}function pn(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t;return Object(f.__generator)(this,(function(n){switch(n.label){case 0:return e._throwIfRoot("deleteObject"),t=function(e,t){var n=Ct(t.fullServerUrl(),e.host),r=e.maxOperationRetryTime,i=new Kt(n,"DELETE",(function(e,t){}),r);return i.successCodes=[200,204],i.errorHandler=Qt(t),i}(e.storage,e._location),[4,e.storage.makeRequestWithTokens(t)];case 1:return[2,n.sent().getPromise()]}}))}))}function gn(e,t){var n=function(e,t){var n=t.split("/").filter((function(e){return e.length>0})).join("/");return 0===e.length?n:e+"/"+n}(e._location.path,t),r=new kt(e._location.bucket,n);return new un(e.storage,r)}function vn(e){return/^[A-Za-z]+:\/\//.test(e)}function mn(e,t){if(e instanceof _n){var n=e;if(null==n._bucket)throw new et("no-default-bucket","No default bucket found. Did you set the 'storageBucket' property when initializing the app?");var r=new un(n,n._bucket);return null!=t?mn(r,t):r}if(void 0!==t){if(t.includes(".."))throw ot('`path` param cannot contain ".."');return gn(e,t)}return e}function yn(e,t){if(t&&vn(t)){if(e instanceof _n)return new un(e,t);throw ot("To use ref(service, url), the first argument must be a Storage instance.")}return mn(e,t)}function bn(e,t){var n=null===t||void 0===t?void 0:t.storageBucket;return null==n?null:kt.makeFromBucketSpec(n,e)}var _n=function(){function e(e,t,n,r,i,o){this.app=e,this._authProvider=t,this._appCheckProvider=n,this._pool=r,this._url=i,this._firebaseVersion=o,this._bucket=null,this._host=Ze,this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=i?kt.makeFromBucketSpec(i,this._host):bn(this._host,this.app.options)}return Object.defineProperty(e.prototype,"host",{get:function(){return this._host},set:function(e){this._host=e,null!=this._url?this._bucket=kt.makeFromBucketSpec(this._url,e):this._bucket=bn(e,this.app.options)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxUploadRetryTime",{get:function(){return this._maxUploadRetryTime},set:function(e){Tt("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxOperationRetryTime",{get:function(){return this._maxOperationRetryTime},set:function(e){Tt("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}
2,enumerable:!1,configurable:!0}),e.prototype._getAuthToken=function(){return Object(f.__awaiter)(this,void 0,void 0,(function(){var e,t;return Object(f.__generator)(this,(function(n){switch(n.label){case 0:return(e=this._authProvider.getImmediate({optional:!0}))?[4,e.getToken()]:[3,2];case 1:if(null!==(t=n.sent()))return[2,t.accessToken];n.label=2;case 2:return[2,null]}}))}))},e.prototype._getAppCheckToken=function(){return Object(f.__awaiter)(this,void 0,void 0,(function(){var e;return Object(f.__generator)(this,(function(t){switch(t.label){case 0:return(e=this._appCheckProvider.getImmediate({optional:!0}))?[4,e.getToken()]:[3,2];case 1:return[2,t.sent().token];case 2:return[2,null]}}))}))},e.prototype._delete=function(){return this._deleted=!0,this._requests.forEach((function(e){return e.cancel()})),this._requests.clear(),Promise.resolve()},e.prototype._makeStorageReference=function(e){return new un(this,e)},e.prototype._makeRequest=function(e,t,n){var r=this;if(this._deleted)return new Et(at());var i=function(e,t,n,r,i,o){var a=Ot(e.urlParams),s=e.url+a,u=Object.assign({},e.headers);return function(e,t){t&&(e["X-Firebase-GMPID"]=t)}(u,t),function(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}(u,n),function(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(null!==t&&void 0!==t?t:"AppManager")}(u,o),function(e,t){null!==t&&(e["X-Firebase-AppCheck"]=t)}(u,r),new At(s,e.method,u,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i)}(e,this._appId,t,n,this._pool,this._firebaseVersion);return this._requests.add(i),i.getPromise().then((function(){return r._requests.delete(i)}),(function(){return r._requests.delete(i)})),i},e.prototype.makeRequestWithTokens=function(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,n,r;return Object(f.__generator)(this,(function(i){switch(i.label){case 0:return[4,Promise.all([this._getAuthToken(),this._getAppCheckToken()])];case 1:return t=i.sent(),n=t[0],r=t[1],[2,this._makeRequest(e,n,r)]}}))}))},e}();function wn(e,t,n){return function(e,t,n){return e._throwIfRoot("uploadBytesResumable"),new sn(e,new jt(t),n)}(e=Object(a.getModularInstance)(e),t,n)}function kn(e){return function(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t;return Object(f.__generator)(this,(function(n){switch(n.label){case 0:return e._throwIfRoot("getMetadata"),t=Xt(e.storage,e._location,Vt()),[4,e.storage.makeRequestWithTokens(t)];case 1:return[2,n.sent().getPromise()]}}))}))}(e=Object(a.getModularInstance)(e))}function En(e,t){return yn(e=Object(a.getModularInstance)(e),t)}var Sn=function(){function e(e,t,n){this._delegate=e,this.task=t,this.ref=n}return Object.defineProperty(e.prototype,"bytesTransferred",{get:function(){return this._delegate.bytesTransferred},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this._delegate.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._delegate.state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalBytes",{get:function(){return this._delegate.totalBytes},enumerable:!1,configurable:!0}),e}(),In=function(){function e(e,t){this._delegate=e,this._ref=t,this.cancel=this._delegate.cancel.bind(this._delegate),this.catch=this._delegate.catch.bind(this._delegate),this.pause=this._delegate.pause.bind(this._delegate),this.resume=this._delegate.resume.bind(this._delegate)}return Object.defineProperty(e.prototype,"snapshot",{get:function(){return new Sn(this._delegate.snapshot,this,this._ref)},enumerable:!1,configurable:!0}),e.prototype.then=function(e,t){var n=this;return this._delegate.then((function(t){if(e)return e(new Sn(t,n,n._ref))}),t)},e.prototype.on=function(e,t,n,r){var i=this,o=void 0;return t&&(o="function"===typeof t?function(e){return t(new Sn(e,i,i._ref))}:{next:t.next?function(e){return t.next(new Sn(e,i,i._ref))}:void 0,complete:t.complete||void 0,error:t.error||void 0}),this._delegate.on(e,o,n||void 0,r||void 0)},e}(),xn=function(){function e(e,t){this._delegate=e,this._service=t}return Object.defineProperty(e.prototype,"prefixes",{get:function(){var e=this;return this._delegate.prefixes.map((function(t){return new Tn(t,e._service)}))}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){var e=this;return this._delegate.items.map((function(t){return new Tn(t,e._service)}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextPageToken",{get:function(){return this._delegate.nextPageToken||null},enumerable:!1,configurable:!0}),e}(),Tn=function(){function e(e,t){this._delegate=e,this.storage=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this._delegate.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bucket",{get:function(){return this._delegate.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullPath",{get:function(){return this._delegate.fullPath},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return this._delegate.toString()},e.prototype.child=function(t){return new e(function(e,t){return gn(e,t)}(this._delegate,t),this.storage)},Object.defineProperty(e.prototype,"root",{get:function(){return new e(this._delegate.root,this.storage)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this._delegate.parent;return null==t?null:new e(t,this.storage)},enumerable:!1,configurable:!0}),e.prototype.put=function(e,t){return this._throwIfRoot("put"),new In(wn(this._delegate,e,t),this)},e.prototype.putString=function(e,t,n){void 0===t&&(t=lt.RAW),this._throwIfRoot("putString");var r=ht(t,e),i=Object(f.__assign)({},n);return null==i.contentType&&null!=r.contentType&&(i.contentType=r.contentType),new In(new sn(this._delegate,new jt(r.data,!0),i),this)},e.prototype.listAll=function(){var e,t=this;return(e=this._delegate,cn(e=Object(a.getModularInstance)(e))).then((function(e){return new xn(e,t.storage)}))},e.prototype.list=function(e){var t=this;return function(e,t){return fn(e=Object(a.getModularInstance)(e),t)}(this._delegate,e||void 0).then((function(e){return new xn(e,t.storage)}))},e.prototype.getMetadata=function(){return kn(this._delegate)},e.prototype.updateMetadata=function(e){return function(e,t){return hn(e=Object(a.getModularInstance)(e),t)}(this._delegate,e)},e.prototype.getDownloadURL=function(){return e=this._delegate,dn(e=Object(a.getModularInstance)(e));var e},e.prototype.delete=function(){return this._throwIfRoot("delete"),e=this._delegate,pn(e=Object(a.getModularInstance)(e));var e},e.prototype._throwIfRoot=function(e){if(""===this._delegate._location.path)throw st(e)},e}(),Cn=function(){function e(e,t){var n=this;this.app=e,this._delegate=t,this.INTERNAL={delete:function(){return n._delegate._delete()}}}return Object.defineProperty(e.prototype,"maxOperationRetryTime",{get:function(){return this._delegate.maxOperationRetryTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxUploadRetryTime",{get:function(){return this._delegate.maxUploadRetryTime},enumerable:!1,configurable:!0}),e.prototype.ref=function(e){if(vn(e))throw ot("ref() expected a child path but got a URL, use refFromURL instead.");return new Tn(En(this._delegate,e),this)},e.prototype.refFromURL=function(e){if(!vn(e))throw ot("refFromURL() expected a full URL but got a child path, use ref() instead.");try{kt.makeFromUrl(e,this._delegate.host)}catch(r){throw ot("refFromUrl() expected a valid full URL but got an invalid one.")}return new Tn(En(this._delegate,e),this)},e.prototype.setMaxUploadRetryTime=function(e){this._delegate.maxUploadRetryTime=e},e.prototype.setMaxOperationRetryTime=function(e){this._delegate.maxOperationRetryTime=e},e.prototype.useEmulator=function(e,t){!function(e,t,n){e.host="http://"+t+":"+n}(this._delegate,e,t)},e}();function On(e,t){var n=t.instanceIdentifier,r=e.getProvider("app").getImmediate(),i=e.getProvider("auth-internal"),a=e.getProvider("app-check-internal");return new Cn(r,new _n(r,i,a,new wt,n,o.default.SDK_VERSION))}!function(e){var t={TaskState:yt,TaskEvent:mt,StringFormat:lt,Storage:_n,Reference:Tn};e.INTERNAL.registerComponent(new c.Component("storage",On,"PUBLIC").setServiceProps(t).setMultipleInstances(!0)),e.registerVersion("@firebase/storage","0.5.5")}(o.default);var An,Nn,Pn,Rn="0.4.15",jn=Rn,Dn="FB-PERF-TRACE-MEASURE",Mn="_wt_",Ln="_fcp",Fn="_fid",Un="@firebase/performance/config",Vn="@firebase/performance/configexpire",Bn="Performance",qn=((An={})["trace started"]="Trace {$traceName} was started before.",An["trace stopped"]="Trace {$traceName} is not running.",An["nonpositive trace startTime"]="Trace {$traceName} startTime should be positive.",An["nonpositive trace duration"]="Trace {$traceName} duration should be positive.",An["no window"]="Window is not available.",An["no app id"]="App id is not available.",An["no project id"]="Project id is not available.",An["no api key"]="Api key is not available.",An["invalid cc log"]="Attempted to queue invalid cc event",An["FB not default"]="Performance can only start when Firebase app instance is the default one.",An["RC response not ok"]="RC response is not ok",An["invalid attribute name"]="Attribute name {$attributeName}
2 is invalid.",An["invalid attribute value"]="Attribute value {$attributeValue} is invalid.",An["invalid custom metric name"]="Custom metric name {$customMetricName} is invalid",An["invalid String merger input"]="Input for String merger is invalid, contact support team to resolve.",An),zn=new a.ErrorFactory("performance",Bn,qn),Hn=new s.Logger(Bn);Hn.logLevel=s.LogLevel.INFO;var Kn,Wn=function(){function e(e){if(this.window=e,!e)throw zn.create("no window");this.performance=e.performance,this.PerformanceObserver=e.PerformanceObserver,this.windowLocation=e.location,this.navigator=e.navigator,this.document=e.document,this.navigator&&this.navigator.cookieEnabled&&(this.localStorage=e.localStorage),e.perfMetrics&&e.perfMetrics.onFirstInputDelay&&(this.onFirstInputDelay=e.perfMetrics.onFirstInputDelay)}return e.prototype.getUrl=function(){return this.windowLocation.href.split("?")[0]},e.prototype.mark=function(e){this.performance&&this.performance.mark&&this.performance.mark(e)},e.prototype.measure=function(e,t,n){this.performance&&this.performance.measure&&this.performance.measure(e,t,n)},e.prototype.getEntriesByType=function(e){return this.performance&&this.performance.getEntriesByType?this.performance.getEntriesByType(e):[]},e.prototype.getEntriesByName=function(e){return this.performance&&this.performance.getEntriesByName?this.performance.getEntriesByName(e):[]},e.prototype.getTimeOrigin=function(){return this.performance&&(this.performance.timeOrigin||this.performance.timing.navigationStart)},e.prototype.requiredApisAvailable=function(){return fetch&&Promise&&this.navigator&&this.navigator.cookieEnabled?!!Object(a.isIndexedDBAvailable)()||(Hn.info("IndexedDB is not supported by current browswer"),!1):(Hn.info("Firebase Performance cannot start if browser does not support fetch and Promise or cookie is disabled."),!1)},e.prototype.setupObserver=function(e,t){this.PerformanceObserver&&new this.PerformanceObserver((function(e){for(var n=0,r=e.getEntries();n<r.length;n++){var i=r[n];t(i)}})).observe({entryTypes:[e]})},e.getInstance=function(){return void 0===Nn&&(Nn=new e(Pn)),Nn},e}();function Gn(e,t){var n=e.length-t.length;if(n<0||n>1)throw zn.create("invalid String merger input");for(var r=[],i=0;i<e.length;i++)r.push(e.charAt(i)),t.length>i&&r.push(t.charAt(i));return r.join("")}var Yn,$n,Qn=function(){function e(){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=Gn("hts/frbslgigp.ogepscmv/ieo/eaylg","tp:/ieaeogn-agolai.o/1frlglgc/o"),this.transportKey=Gn("AzSC8r6ReiGqFMyfvgow","Iayx0u-XT3vksVM-pIV"),this.logSource=462,this.logTraceAfterSampling=!1,this.logNetworkAfterSampling=!1,this.configTimeToLive=12}return e.prototype.getAppId=function(){var e=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.appId;if(!e)throw zn.create("no app id");return e},e.prototype.getProjectId=function(){var e=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.projectId;if(!e)throw zn.create("no project id");return e},e.prototype.getApiKey=function(){var e=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.apiKey;if(!e)throw zn.create("no api key");return e},e.prototype.getFlTransportFullUrl=function(){return this.flTransportEndpointUrl.concat("?key=",this.transportKey)},e.getInstance=function(){return void 0===Kn&&(Kn=new e),Kn},e}();function Xn(){return Yn}!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.VISIBLE=1]="VISIBLE",e[e.HIDDEN=2]="HIDDEN"}($n||($n={}));var Jn=["firebase_","google_","ga_"],Zn=new RegExp("^[a-zA-Z]\\w*$");function er(){var e=Wn.getInstance().navigator;return"serviceWorker"in e?e.serviceWorker.controller?2:3:1}function tr(){switch(Wn.getInstance().document.visibilityState){case"visible":return $n.VISIBLE;case"hidden":return $n.HIDDEN;default:return $n.UNKNOWN}}function nr(){var e=Wn.getInstance().navigator.connection;switch(e&&e.effectiveType){case"slow-2g":return 1;case"2g":return 2;case"3g":return 3;case"4g":return 4;default:return 0}}var rr="0.0.1",ir=!0,or="FIREBASE_INSTALLATIONS_AUTH";function ar(e){var t=function(){var e=Wn.getInstance().localStorage;if(!e)return;var t=e.getItem(Vn);if(!t||(n=t,!(Number(n)>Date.now())))return;var n;var r=e.getItem(Un);if(!r)return;try{return JSON.parse(r)}catch(i){return}}();return t?(ur(t),Promise.resolve()):function(e){return function(){var e=Qn.getInstance().installationsService.getToken();return e.then((function(e){})),e}().then((function(t){var n="https://firebaseremoteconfig.googleapis.com/v1/projects/"+Qn.getInstance().getProjectId()+"/namespaces/fireperf:fetch?ke
2y="+Qn.getInstance().getApiKey(),r=new Request(n,{method:"POST",headers:{Authorization:or+" "+t},body:JSON.stringify({app_instance_id:e,app_instance_id_token:t,app_id:Qn.getInstance().getAppId(),app_version:jn,sdk_version:rr})});return fetch(r).then((function(e){if(e.ok)return e.json();throw zn.create("RC response not ok")}))})).catch((function(){Hn.info(sr)}))}(e).then(ur).then((function(e){return function(e){var t=Wn.getInstance().localStorage;if(!e||!t)return;t.setItem(Un,JSON.stringify(e)),t.setItem(Vn,String(Date.now()+60*Qn.getInstance().configTimeToLive*60*1e3))}(e)}),(function(){}))}var sr="Could not fetch config, will use default configs";function ur(e){if(!e)return e;var t=Qn.getInstance(),n=e.entries||{};return void 0!==n.fpr_enabled?t.loggingEnabled="true"===String(n.fpr_enabled):t.loggingEnabled=ir,n.fpr_log_source&&(t.logSource=Number(n.fpr_log_source)),n.fpr_log_endpoint_url&&(t.logEndPointUrl=n.fpr_log_endpoint_url),n.fpr_log_transport_key&&(t.transportKey=n.fpr_log_transport_key),void 0!==n.fpr_vc_network_request_sampling_rate&&(t.networkRequestsSamplingRate=Number(n.fpr_vc_network_request_sampling_rate)),void 0!==n.fpr_vc_trace_sampling_rate&&(t.tracesSamplingRate=Number(n.fpr_vc_trace_sampling_rate)),t.logTraceAfterSampling=cr(t.tracesSamplingRate),t.logNetworkAfterSampling=cr(t.networkRequestsSamplingRate),e}function cr(e){return Math.random()<=e}var lr,fr=1;function hr(){return fr=2,lr=lr||function(){var e=Wn.getInstance().document;return new Promise((function(t){if(e&&"complete"!==e.readyState){var n=function n(){"complete"===e.readyState&&(e.removeEventListener("readystatechange",n),t())};e.addEventListener("readystatechange",n)}else t()}))}().then((function(){return function(){var e=Qn.getInstance().installationsService.getId();return e.then((function(e){Yn=e})),e}()})).then((function(e){return ar(e)})).then((function(){return dr()}),(function(){return dr()}))}function dr(){fr=3}var pr,gr=1e4,vr=3,mr=[],yr=!1;function br(e){setTimeout((function(){if(0!==vr)return mr.length?void function(){var e=mr.splice(0,1e3),t=e.map((function(e){return{source_extension_json_proto3:e.message,event_time_ms:String(e.eventTime)}}));(function(e,t){return function(e){var t=Qn.getInstance().getFlTransportFullUrl();return fetch(t,{method:"POST",body:JSON.stringify(e)})}(e).then((function(e){return e.ok||Hn.info("Call to Firebase backend failed."),e.json()})).then((function(e){var n=Number(e.nextRequestWaitMillis),r=gr;isNaN(n)||(r=Math.max(n,r));var i=e.logResponseDetails;Array.isArray(i)&&i.length>0&&"RETRY_REQUEST_LATER"===i[0].responseAction&&(mr=Object(f.__spreadArray)(Object(f.__spreadArray)([],t),mr),Hn.info("Retry transport request later.")),vr=3,br(r)}))})({request_time_ms:String(Date.now()),client_info:{client_type:1,js_client_info:{}},log_source:Qn.getInstance().logSource,log_event:t},e).catch((function(){mr=Object(f.__spreadArray)(Object(f.__spreadArray)([],e),mr),vr--,Hn.info("Tries left: "+vr+"."),br(gr)}))}():br(gr)}),e)}function _r(e){if(!e.eventTime||!e.message)throw zn.create("invalid cc log");mr=Object(f.__spreadArray)(Object(f.__spreadArray)([],mr),[e])}function wr(e,t){pr||(pr=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];_r({message:e.apply(void 0,t),eventTime:Date.now()})}}(Sr)),pr(e,t)}function kr(e){var t=Qn.getInstance();!t.instrumentationEnabled&&e.isAuto||(t.dataCollectionEnabled||e.isAuto)&&Wn.getInstance().requiredApisAvailable()&&(e.isAuto&&tr()!==$n.VISIBLE||(3===fr?Er(e):hr().then((function(){return Er(e)}),(function(){return Er(e)}))))}function Er(e){if(Xn()){var t=Qn.getInstance();t.loggingEnabled&&t.logTraceAfterSampling&&setTimeout((function(){return wr(e,1)}),0)}}function Sr(e,t){return 0===t?function(e){var t={url:e.url,http_method:e.httpMethod||0,http_response_code:200,response_payload_bytes:e.responsePayloadBytes,client_start_time_us:e.startTimeUs,time_to_response_initiated_us:e.timeToResponseInitiatedUs,time_to_response_completed_us:e.timeToResponseCompletedUs},n={application_info:Ir(),network_request_metric:t};return JSON.stringify(n)}(e):function(e){var t={name:e.name,is_auto:e.isAuto,client_start_time_us:e.startTimeUs,duration_us:e.durationUs};0!==Object.keys(e.counters).length&&(t.counters=e.counters);var n=e.getAttributes();0!==Object.keys(n).length&&(t.custom_attributes=n);var r={application_info:Ir(),trace_metric:t};return JSON.stringify(r)}(e)}function Ir(){return{google_app_id:Qn.getInstance().getAppId(),app_instance_id:Xn(),web_app_info:{sdk_version:jn,page_url:Wn.getInstance().getUrl(),service_worker_status:er(),visibility_state:tr(),effective_connection_type:nr()},application_process_state:0}}var xr=["_fp",Ln,Fn];var Tr=function(){function e(e,t,n){void 0===t&&(t=!1),this.name=e,this.isAuto=t,this.state=1,this.customAttributes={},this.counters={},this.api=Wn.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 e.prototype.start=function(){if(1!==this.state)throw zn.create("trace started",{traceName:this.name});this.api.mark(this.traceStartMark),this.state=2},e.prototype.stop=function(){if(2!==this.state)throw zn.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(),kr(this)},e.prototype.record=function(e,t,n){if(e<=0)throw zn.create("nonpositive trace startTime",{traceName:this.name});if(t<=0)throw zn.create("nonpositive trace duration",{traceName:this.name});if(this.durationUs=Math.floor(1e3*t),this.startTimeUs=Math.floor(1e3*e),n&&n.attributes&&(this.customAttributes=Object(f.__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])))}kr(this)},e.prototype.incrementMetric=function(e,t){void 0===t&&(t=1),void 0===this.counters[e]?this.putMetric(e,t):this.putMetric(e,this.counters[e]+t)},e.prototype.putMetric=function(e,t){if(n=e,r=this.name,0===n.length||n.length>100||!(r&&r.startsWith(Mn)&&xr.indexOf(n)>-1)&&n.startsWith("_"))throw zn.create("invalid custom metric name",{customMetricName:e});var n,r;this.counters[e]=function(e){var t=Math.floor(e);return t<e&&Hn.info("Metric value should be an Integer, setting the value as : "+t+"."),t}(t)}
2,e.prototype.getMetric=function(e){return this.counters[e]||0},e.prototype.putAttribute=function(e,t){var n,r=!(0===(n=e).length||n.length>40)&&!Jn.some((function(e){return n.startsWith(e)}))&&!!n.match(Zn),i=function(e){return 0!==e.length&&e.length<=100}(t);if(r&&i)this.customAttributes[e]=t;else{if(!r)throw zn.create("invalid attribute name",{attributeName:e});if(!i)throw zn.create("invalid attribute value",{attributeValue:t})}},e.prototype.getAttribute=function(e){return this.customAttributes[e]},e.prototype.removeAttribute=function(e){void 0!==this.customAttributes[e]&&delete this.customAttributes[e]},e.prototype.getAttributes=function(){return Object(f.__assign)({},this.customAttributes)},e.prototype.setStartTime=function(e){this.startTimeUs=e},e.prototype.setDuration=function(e){this.durationUs=e},e.prototype.calculateTraceMetrics=function(){var e=this.api.getEntriesByName(this.traceMeasure),t=e&&e[0];t&&(this.durationUs=Math.floor(1e3*t.duration),this.startTimeUs=Math.floor(1e3*(t.startTime+this.api.getTimeOrigin())))},e.createOobTrace=function(t,n,r){var i=Wn.getInstance().getUrl();if(i){var o=new e(Mn+i,!0),a=Math.floor(1e3*Wn.getInstance().getTimeOrigin());o.setStartTime(a),t&&t[0]&&(o.setDuration(Math.floor(1e3*t[0].duration)),o.putMetric("domInteractive",Math.floor(1e3*t[0].domInteractive)),o.putMetric("domContentLoadedEventEnd",Math.floor(1e3*t[0].domContentLoadedEventEnd)),o.putMetric("loadEventEnd",Math.floor(1e3*t[0].loadEventEnd)));if(n){var s=n.find((function(e){return"first-paint"===e.name}));s&&s.startTime&&o.putMetric("_fp",Math.floor(1e3*s.startTime));var u=n.find((function(e){return"first-contentful-paint"===e.name}));u&&u.startTime&&o.putMetric(Ln,Math.floor(1e3*u.startTime)),r&&o.putMetric(Fn,Math.floor(1e3*r))}kr(o)}},e.createUserTimingTrace=function(t){kr(new e(t,!1,t))},e}();function Cr(e){var t=e;if(t&&void 0!==t.responseStart){var n=Wn.getInstance().getTimeOrigin(),r=Math.floor(1e3*(t.startTime+n)),i=t.responseStart?Math.floor(1e3*(t.responseStart-t.startTime)):void 0,o=Math.floor(1e3*(t.responseEnd-t.startTime));!function(e){var t=Qn.getInstance();if(t.instrumentationEnabled){var n=e.url,r=t.logEndPointUrl.split("?")[0],i=t.flTransportEndpointUrl.split("?")[0];n!==r&&n!==i&&t.loggingEnabled&&t.logNetworkAfterSampling&&setTimeout((function(){return wr(e,0)}),0)}}({url:t.name&&t.name.split("?")[0],responsePayloadBytes:t.transferSize,startTimeUs:r,timeToResponseInitiatedUs:i,timeToResponseCompletedUs:o})}}function Or(){Xn()&&(setTimeout((function(){return function(){var e=Wn.getInstance(),t=e.getEntriesByType("navigation"),n=e.getEntriesByType("paint");if(e.onFirstInputDelay){var r=setTimeout((function(){Tr.createOobTrace(t,n),r=void 0}),5e3);e.onFirstInputDelay((function(e){r&&(clearTimeout(r),Tr.createOobTrace(t,n,e))}))}else Tr.createOobTrace(t,n)}()}),0),setTimeout((function(){return function(){for(var e=Wn.getInstance(),t=e.getEntriesByType("resource"),n=0,r=t;n<r.length;n++){Cr(r[n])}e.setupObserver("resource",Cr)}()}),0),setTimeout((function(){return function(){for(var e=Wn.getInstance(),t=e.getEntriesByType("measure"),n=0,r=t;n<r.length;n++){Ar(r[n])}e.setupObserver("measure",Ar)}()}),0))}function Ar(e){var t=e.name;t.substring(0,Dn.length)!==Dn&&Tr.createUserTimingTrace(t)}var Nr=function(){function e(e){this.app=e,Wn.getInstance().requiredApisAvailable()&&Object(a.validateIndexedDBOpenable)().then((function(e){e&&(yr||(br(5500),yr=!0),hr().then(Or,Or))})).catch((function(e){Hn.info("Environment doesn't support IndexedDB: "+e)}))}return e.prototype.trace=function(e){return new Tr(e)},Object.defineProperty(e.prototype,"instrumentationEnabled",{get:function(){return Qn.getInstance().instrumentationEnabled},set:function(e){Qn.getInstance().instrumentationEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataCollectionEnabled",{get:function(){return Qn.getInstance().dataCollectionEnabled},set:function(e){Qn.getInstance().dataCollectionEnabled=e},enumerable:!1,configurable:!0}),e}();!function(e){var t=function(e,t){if("[DEFAULT]"!==e.name)throw zn.create("FB not default");if("undefined"===typeof window)throw zn.create("no window");return function(e){Pn=e}(window),Qn.getInstance().firebaseAppInstance=e,Qn.getInstance().installationsService=t,new Nr(e)};e.INTERNAL.registerComponent(new c.Component("performance",(function(e){var n=e.getProvider("app").getImmediate(),r=e.getProvider("installations").getImmediate();return t(n,r)}),"PUBLIC")),e.registerVersion("@firebase/performance",Rn)}(o.default);var Pr,Rr,jr="https://www.googletagmanager.com/gtag/js";!function(e){e.EVENT="event",e.SET="set",e.CONFIG="config"}(Pr||(Pr={})),function(e){e.ADD_SHIPPING_INFO="add_shipping_info",e.ADD_PAYMENT_INFO="add_payment_info",e.ADD_TO_CART="add_to_cart",e.ADD_TO_WISHLIST="add_to_wishlist",e.BEGIN_CHECKOUT="begin_checkout",e.CHECKOUT_PROGRESS="checkout_progress",e.EXCEPTION="exception",e.GENERATE_LEAD="generate_lead",e.LOGIN="login",e.PAGE_VIEW="page_view",e.PURCHASE="purchase",e.REFUND="refund",e.REMOVE_FROM_CART="remove_from_cart",e.SCREEN_VIEW="screen_view",e.SEARCH="search",e.SELECT_CONTENT="select_content",e.SELECT_ITEM="select_item",e.SELECT_PROMOTION="select_promotion",e.SET_CHECKOUT_OPTION="set_checkout_option",e.SHARE="share",e.SIGN_UP="sign_up",e.TIMING_COMPLETE="timing_complete",e.VIEW_CART="view_cart",e.VIEW_ITEM="view_item",e.VIEW_ITEM_LIST="view_item_list",e.VIEW_PROMOTION="view_promotion",e.VIEW_SEARCH_RESULTS="view_search_results"}(Rr||(Rr={}));var Dr,Mr=new s.Logger("@firebase/analytics");function Lr(e,t,n,r,i,o){return Object(f.__awaiter)(this,void 0,void 0,(function(){var a,s,u,c;return Object(f.__generator)(this,(function(l){switch(l.label){case 0:a=r[i],l.label=1;case 1:return l.trys.push([1,7,,8]),a?[4,t[a]]:[3,3];case 2:return l.sent(),[3,6];case 3:return[4,Promise.all(n)];case 4:return s=l.sent(),(u=s.find((function(e){return e.measurementId===i})))?[4,t[u.appId]]:[3,6];case 5:l.sent(),l.label=6;case 6:return[3,8];case 7:return c=l.sent(),Mr.error(c),[3,8];case 8:return e(Pr.CONFIG,i,o),[2]}}))}))}function Fr(e,t,n,r,i){return Object(f.__awaiter)(this,void 0,void 0,(function(){var o,a,s,u,c,l,h,d;return Object(f.__generator)(this,(function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),o=[],i&&i.send_to?(a=i.send_to,Array.isArray(a)||(a=[a]
2),[4,Promise.all(n)]):[3,2];case 1:for(s=f.sent(),u=function(e){var n=s.find((function(t){return t.measurementId===e})),r=n&&t[n.appId];if(!r)return o=[],"break";o.push(r)},c=0,l=a;c<l.length&&(h=l[c],"break"!==u(h));c++);f.label=2;case 2:return 0===o.length&&(o=Object.values(t)),[4,Promise.all(o)];case 3:return f.sent(),e(Pr.EVENT,r,i||{}),[3,5];case 4:return d=f.sent(),Mr.error(d),[3,5];case 5:return[2]}}))}))}function Ur(e,t,n,r,i){var o=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];window[r].push(arguments)};return window[i]&&"function"===typeof window[i]&&(o=window[i]),window[i]=function(e,t,n,r){return function(i,o,a){return Object(f.__awaiter)(this,void 0,void 0,(function(){var s;return Object(f.__generator)(this,(function(u){switch(u.label){case 0:return u.trys.push([0,6,,7]),i!==Pr.EVENT?[3,2]:[4,Fr(e,t,n,o,a)];case 1:return u.sent(),[3,5];case 2:return i!==Pr.CONFIG?[3,4]:[4,Lr(e,t,n,r,o,a)];case 3:return u.sent(),[3,5];case 4:e(Pr.SET,o),u.label=5;case 5:return[3,7];case 6:return s=u.sent(),Mr.error(s),[3,7];case 7:return[2]}}
2))}))}}(o,e,t,n),{gtagCore:o,wrappedGtag:window[i]}}var Vr=((Dr={})["already-exists"]="A Firebase Analytics instance with the appId {$id}  already exists. Only one Firebase Analytics instance can be created for each appId.",Dr["already-initialized"]="Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.",Dr["interop-component-reg-failed"]="Firebase Analytics Interop Component failed to instantiate: {$reason}",Dr["invalid-analytics-context"]="Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}",Dr["indexeddb-unavailable"]="IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}",Dr["fetch-throttle"]="The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.",Dr["config-fetch-failed"]="Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}",Dr["no-api-key"]='The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',Dr["no-app-id"]='The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',Dr),Br=new a.ErrorFactory("analytics","Analytics",Vr),qr=new(function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t=1e3),this.throttleMetadata=e,this.intervalMillis=t}return e.prototype.getThrottleMetadata=function(e){return this.throttleMetadata[e]},e.prototype.setThrottleMetadata=function(e,t){this.throttleMetadata[e]=t},e.prototype.deleteThrottleMetadata=function(e){delete this.throttleMetadata[e]},e}());function zr(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}function Hr(e){var t;return Object(f.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,a,s,u;return Object(f.__generator)(this,(function(c){switch(c.label){case 0:return n=e.appId,r=e.apiKey,i={method:"GET",headers:zr(r)},o="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",n),[4,fetch(o,i)];case 1:if(200===(a=c.sent()).status||304===a.status)return[3,6];s="",c.label=2;case 2:return c.trys.push([2,4,,5]),[4,a.json()];case 3:return u=c.sent(),(null===(t=u.error)||void 0===t?void 0:t.message)&&(s=u.error.message),[3,5];case 4:return c.sent(),[3,5];case 5:throw Br.create("config-fetch-failed",{httpStatus:a.status,responseMessage:s});case 6:return[2,a.json()]}}))}))}function Kr(e,t,n,r){var i=t.throttleEndTimeMillis,o=t.backoffCount;return void 0===r&&(r=qr),Object(f.__awaiter)(this,void 0,void 0,(function(){var t,s,u,c,l,h,d;return Object(f.__generator)(this,(function(f){switch(f.label){case 0:t=e.appId,s=e.measurementId,f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Wr(n,i)];case 2:return f.sent(),[3,4];case 3:if(u=f.sent(),s)return Mr.warn("Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID "+s+' provided in the "measurementId" field in the local Firebase config. ['+u.message+"]"),[2,{appId:t,measurementId:s}];throw u;case 4:return f.trys.push([4,6,,7]),[4,Hr(e)];case 5:return c=f.sent(),r.deleteThrottleMetadata(t),[2,c];case 6:if(!function(e){if(!(e instanceof a.FirebaseError)||!e.customData)return!1;var t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}(l=f.sent())){if(r.deleteThrottleMetadata(t),s)return Mr.warn("Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID "+s+' provided in the "measurementId" field in the local Firebase config. ['+l.message+"]"),[2,{appId:t,measurementId:s}];throw l}return h=503===Number(l.customData.httpStatus)?Object(a.calculateBackoffMillis)(o,r.intervalMillis,30):Object(a.calculateBackoffMillis)(o,r.intervalMillis),d={throttleEndTimeMillis:Date.now()+h,backoffCount:o+1},r.setThrottleMetadata(t,d),Mr.debug("Calling attemptFetch again in "+h+" millis"),[2,Kr(e,d,n,r)];case 7:return[2]}}
2))}))}function Wr(e,t){return new Promise((function(n,r){var i=Math.max(t-Date.now(),0),o=setTimeout(n,i);e.addEventListener((function(){clearTimeout(o),r(Br.create("fetch-throttle",{throttleEndTimeMillis:t}))}))}))}var Gr=function(){function e(){this.listeners=[]}return e.prototype.addEventListener=function(e){this.listeners.push(e)},e.prototype.abort=function(){this.listeners.forEach((function(e){return e()}))},e}();function Yr(e,t,n,r,i,o){return Object(f.__awaiter)(this,void 0,void 0,(function(){var s,u,c,l,h,d,p;return Object(f.__generator)(this,(function(g){switch(g.label){case 0:return(s=function(e,t,n){return void 0===t&&(t=qr),Object(f.__awaiter)(this,void 0,void 0,(function(){var r,i,o,a,s,u,c=this;return Object(f.__generator)(this,(function(l){if(r=e.options,i=r.appId,o=r.apiKey,a=r.measurementId,!i)throw Br.create("no-app-id");if(!o){if(a)return[2,{measurementId:a,appId:i}];throw Br.create("no-api-key")}return s=t.getThrottleMetadata(i)||{backoffCount:0,throttleEndTimeMillis:Date.now()},u=new Gr,setTimeout((function(){return Object(f.__awaiter)(c,void 0,void 0,(function(){return Object(f.__generator)(this,(function(e){return u.abort(),[2]}))}))}),void 0!==n?n:6e4),[2,Kr({appId:i,apiKey:o,measurementId:a},s,u,t)]}))}))}(e)).then((function(t){n[t.measurementId]=t.appId,e.options.measurementId&&t.measurementId!==e.options.measurementId&&Mr.warn("The measurement ID in the local Firebase config ("+e.options.measurementId+") does not match the measurement ID fetched from the server ("+t.measurementId+"). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.")})).catch((function(e){return Mr.error(e)})),t.push(s),u=function(){return Object(f.__awaiter)(this,void 0,void 0,(function(){var e;return Object(f.__generator)(this,(function(t){switch(t.label){case 0:return Object(a.isIndexedDBAvailable)()?[3,1]:(Mr.warn(Br.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),[2,!1]);case 1:return t.trys.push([1,3,,4]),[4,Object(a.validateIndexedDBOpenable)()];case 2:return t.sent(),[3,4];case 3:return e=t.sent(),Mr.warn(Br.create("indexeddb-unavailable",{errorInfo:e}).message),[2,!1];case 4:return[2,!0]}}))}))}().then((function(e){return e?r.getId():void 0})),[4,Promise.all([s,u])];case 1:return c=g.sent(),l=c[0],h=c[1],function(){for(var e=window.document.getElementsByTagName("script"),t=0,n=Object.values(e);t<n.length;t++){var r=n[t];if(r.src&&r.src.includes(jr))return r}return null}()||function(e,t){var n=document.createElement("script");n.src=jr+"?l="+e+"&id="+t,n.async=!0,document.head.appendChild(n)}(o,l.measurementId),i("js",new Date),(p={}).origin="firebase",p.update=!0,d=p,null!=h&&(d.firebase_id=h),i(Pr.CONFIG,l.measurementId,d),[2,l.measurementId]}}))}))}var $r,Qr,Xr={},Jr=[],Zr={},ei="dataLayer",ti="gtag",ni=!1;function ri(e){if(ni)throw Br.create("already-initialized");e.dataLayerName&&(ei=e.dataLayerName),e.gtagName&&(ti=e.gtagName)}function ii(e,t){!function(){var e=[];if(Object(a.isBrowserExtension)()&&e.push("This is a browser extension environment."),Object(a.areCookiesEnabled)()||e.push("Cookies are not available."),e.length>0){var t=e.map((function(e,t){return"("+(t+1)+") "+e})).join(" "),n=Br.create("invalid-analytics-context",{errorInfo:t});Mr.warn(n.message)}}();var n=e.options.appId;if(!n)throw Br.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw Br.create("no-api-key");Mr.warn('The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID '+e.options.measurementId+' provided in the "measurementId" field in the local Firebase config.')}if(null!=Xr[n])throw Br.create("already-exists",{id:n});if(!ni){!function(e){var t=[];Array.isArray(window[e])?t=window[e]:window[e]=t}(ei);var r=Ur(Xr,Jr,Zr,ei,ti),i=r.wrappedGtag,o=r.gtagCore;Qr=i,$r=o,ni=!0}return Xr[n]=Yr(e,Jr,Zr,t,$r,ei),{app:e,logEvent:function(e,t,r){(function(e,t,n,r,i){return Object(f.__awaiter)(this,void 0,void 0,(function(){var o,a;return Object(f.__generator)(this,(function(s){switch(s.label){case 0:return i&&i.global?(e(Pr.EVENT,n,r),[2]):[3,1];case 1:return[4,t];case 2:o=s.sent(),a=Object(f.__assign)(Object(f.__assign)({},r),{send_to:o}),e(Pr.EVENT,n,a),s.label=3;case 3:return[2]}}
2))}))})(Qr,Xr[n],e,t,r).catch((function(e){return Mr.error(e)}))},setCurrentScreen:function(e,t){(function(e,t,n,r){return Object(f.__awaiter)(this,void 0,void 0,(function(){var i;return Object(f.__generator)(this,(function(o){switch(o.label){case 0:return r&&r.global?(e(Pr.SET,{screen_name:n}),[2,Promise.resolve()]):[3,1];case 1:return[4,t];case 2:i=o.sent(),e(Pr.CONFIG,i,{update:!0,screen_name:n}),o.label=3;case 3:return[2]}}))}))})(Qr,Xr[n],e,t).catch((function(e){return Mr.error(e)}))},setUserId:function(e,t){(function(e,t,n,r){return Object(f.__awaiter)(this,void 0,void 0,(function(){var i;return Object(f.__generator)(this,(function(o){switch(o.label){case 0:return r&&r.global?(e(Pr.SET,{user_id:n}),[2,Promise.resolve()]):[3,1];case 1:return[4,t];case 2:i=o.sent(),e(Pr.CONFIG,i,{update:!0,user_id:n}),o.label=3;case 3:return[2]}}))}))})(Qr,Xr[n],e,t).catch((function(e){return Mr.error(e)}))},setUserProperties:function(e,t){(function(e,t,n,r){return Object(f.__awaiter)(this,void 0,void 0,(function(){var i,o,a,s,u;return Object(f.__generator)(this,(function(c){switch(c.label){case 0:if(!r||!r.global)return[3,1];for(i={},o=0,a=Object.keys(n);o<a.length;o++)s=a[o],i["user_properties."+s]=n[s];return e(Pr.SET,i),[2,Promise.resolve()];case 1:return[4,t];case 2:u=c.sent(),e(Pr.CONFIG,u,{update:!0,user_properties:n}),c.label=3;case 3:return[2]}}
2))}))})(Qr,Xr[n],e,t).catch((function(e){return Mr.error(e)}))},setAnalyticsCollectionEnabled:function(e){(function(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n;return Object(f.__generator)(this,(function(r){switch(r.label){case 0:return[4,e];case 1:return n=r.sent(),window["ga-disable-"+n]=!t,[2]}}))}))})(Xr[n],e).catch((function(e){return Mr.error(e)}))},INTERNAL:{delete:function(){return delete Xr[n],Promise.resolve()}}}}var oi="analytics";function ai(){return Object(f.__awaiter)(this,void 0,void 0,(function(){return Object(f.__generator)(this,(function(e){switch(e.label){case 0:if(Object(a.isBrowserExtension)())return[2,!1];if(!Object(a.areCookiesEnabled)())return[2,!1];if(!Object(a.isIndexedDBAvailable)())return[2,!1];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Object(a.validateIndexedDBOpenable)()];case 2:return[2,e.sent()];case 3:return e.sent(),[2,!1];case 4:return[2]}}))}))}!function(e){e.INTERNAL.registerComponent(new c.Component(oi,(function(e){return ii(e.getProvider("app").getImmediate(),e.getProvider("installations").getImmediate())}),"PUBLIC").setServiceProps({settings:ri,EventName:Rr,isSupported:ai})),e.INTERNAL.registerComponent(new c.Component("analytics-internal",(function(e){try{return{logEvent:e.getProvider(oi).getImmediate().logEvent}}catch(r){throw Br.create("interop-component-reg-failed",{reason:r})}}),"PRIVATE")),e.registerVersion("@firebase/analytics","0.6.13")}(o.default);var si,ui=function(){function e(e,t,n,r){this.client=e,this.storage=t,this.storageCache=n,this.logger=r}return e.prototype.isCachedDataFresh=function(e,t){if(!t)return this.logger.debug("Config fetch cache check. Cache unpopulated."),!1;var n=Date.now()-t,r=n<=e;return this.logger.debug("Config fetch cache check. Cache age millis: "+n+". Cache max age millis (minimumFetchIntervalMillis setting): "+e+". Is cache hit: "+r+"."),r},e.prototype.fetch=function(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,n,r,i,o;return Object(f.__generator)(this,(function(a){switch(a.label){case 0:return[4,Promise.all([this.storage.getLastSuccessfulFetchTimestampMillis(),this.storage.getLastSuccessfulFetchResponse()])];case 1:return t=a.sent(),n=t[0],(r=t[1])&&this.isCachedDataFresh(e.cacheMaxAgeMillis,n)?[2,r]:(e.eTag=r&&r.eTag,[4,this.client.fetch(e)]);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]}}))}))},e}(),ci=((si={})["registration-window"]="Undefined window object. This SDK only supports usage in a browser environment.",si["registration-project-id"]="Undefined project identifier. Check Firebase app initialization.",si["registration-api-key"]="Undefined API key. Check Firebase app initialization.",si["registration-app-id"]="Undefined app identifier. Check Firebase app initialization.",si["storage-open"]="Error thrown when opening storage. Original error: {$originalErrorMessage}.",si["storage-get"]="Error thrown when reading from storage. Original error: {$originalErrorMessage}.",si["storage-set"]="Error thrown when writing to storage. Original error: {$originalErrorMessage}.",si["storage-delete"]="Error thrown when deleting from storage. Original error: {$originalErrorMessage}.",si["fetch-client-network"]="Fetch client failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.",si["fetch-timeout"]='The config fetch request timed out.  Configure timeout using "fetchTimeoutMillis" SDK setting.',si["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}.',si["fetch-client-parse"]="Fetch client could not parse response. Original error: {$originalErrorMessage}.",si["fetch-status"]="Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.",si),li=new a.ErrorFactory("remoteconfig","Remote Config",ci);var fi=function(){function e(e,t,n,r,i,o){this.firebaseInstallations=e,this.sdkVersion=t,this.namespace=n,this.projectId=r,this.apiKey=i,this.appId=o}return e.prototype.fetch=function(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,n,r,i,o,a,s,u,c,l,h,d,p,g,v,m,y,b,_;return Object(f.__generator)(this,(function(f){switch(f.label){case 0:return[4,Promise.all([this.firebaseInstallations.getId(),this.firebaseInstallations.getToken()])];case 1:t=f.sent(),n=t[0],r=t[1],i=window.FIREBASE_REMOTE_CONFIG_URL_BASE||"https://firebaseremoteconfig.googleapis.com",o=i+"/v1/projects/"+this.projectId+"/namespaces/"+this.namespace+":fetch?ke
2y="+this.apiKey,a={"Content-Type":"application/json","Content-Encoding":"gzip","If-None-Match":e.eTag||"*"},s={sdk_version:this.sdkVersion,app_instance_id:n,app_instance_id_token:r,app_id:this.appId,language_code:(void 0===w&&(w=navigator),w.languages&&w.languages[0]||w.language)},u={method:"POST",headers:a,body:JSON.stringify(s)},c=fetch(o,u),l=new Promise((function(t,n){e.signal.addEventListener((function(){var e=new Error("The operation was aborted.");e.name="AbortError",n(e)}))})),f.label=2;case 2:return f.trys.push([2,5,,6]),[4,Promise.race([c,l])];case 3:return f.sent(),[4,c];case 4:return h=f.sent(),[3,6];case 5:throw d=f.sent(),p="fetch-client-network","AbortError"===d.name&&(p="fetch-timeout"),li.create(p,{originalErrorMessage:d.message});case 6:if(g=h.status,v=h.headers.get("ETag")||void 0,200!==h.status)return[3,11];b=void 0,f.label=7;case 7:return f.trys.push([7,9,,10]),[4,h.json()];case 8:return b=f.sent(),[3,10];case 9:throw _=f.sent(),li.create("fetch-client-parse",{originalErrorMessage:_.message});case 10:m=b.entries,y=b.state,f.label=11;case 11:if("INSTANCE_STATE_UNSPECIFIED"===y?g=500:"NO_CHANGE"===y?g=304:"NO_TEMPLATE"!==y&&"EMPTY_CONFIG"!==y||(m={}),304!==g&&200!==g)throw li.create("fetch-status",{httpStatus:g});return[2,{status:g,eTag:v,config:m}]}var w}))}))},e}(),hi=function(){function e(){this.listeners=[]}return e.prototype.addEventListener=function(e){this.listeners.push(e)},e.prototype.abort=function(){this.listeners.forEach((function(e){return e()}))},e}(),di=["1","true","t","yes","y","on"],pi=function(){function e(e,t){void 0===t&&(t=""),this._source=e,this._value=t}return e.prototype.asString=function(){return this._value},e.prototype.asBoolean=function(){return"static"!==this._source&&di.indexOf(this._value.toLowerCase())>=0},e.prototype.asNumber=function(){if("static"===this._source)return 0;var e=Number(this._value);return isNaN(e)&&(e=0),e},e.prototype.getSource=function(){return this._source},e}(),gi=function(){function e(e,t,n,r,i){this.app=e,this._client=t,this._storageCache=n,this._storage=r,this._logger=i,this._isInitializationComplete=!1,this.settings={fetchTimeoutMillis:6e4,minimumFetchIntervalMillis:432e5},this.defaultConfig={}}return e.prototype.setLogLevel=function(e){switch(e){case"debug":this._logger.logLevel=s.LogLevel.DEBUG;break;case"silent":this._logger.logLevel=s.LogLevel.SILENT;break;default:this._logger.logLevel=s.LogLevel.ERROR}},Object.defineProperty(e.prototype,"fetchTimeMillis",{get:function(){return this._storageCache.getLastSuccessfulFetchTimestampMillis()||-1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastFetchStatus",{get:function(){return this._storageCache.getLastFetchStatus()||"no-fetch-yet"},enumerable:!1,configurable:!0}),e.prototype.activate=function(){return Object(f.__awaiter)(this,void 0,void 0,(function(){var e,t,n;return Object(f.__generator)(this,(function(r){switch(r.label){case 0:return[4,Promise.all([this._storage.getLastSuccessfulFetchResponse(),this._storage.getActiveConfigEtag()])];case 1:return e=r.sent(),t=e[0],n=e[1],t&&t.config&&t.eTag&&t.eTag!==n?[4,Promise.all([this._storageCache.setActiveConfig(t.config),this._storage.setActiveConfigEtag(t.eTag)])]:[2,!1];case 2:return r.sent(),[2,!0]}}))}))},e.prototype.ensureInitialized=function(){var e=this;return this._initializePromise||(this._initializePromise=this._storageCache.loadFromStorage().then((function(){e._isInitializationComplete=!0}))),this._initializePromise},e.prototype.fetch=function(){return Object(f.__awaiter)(this,void 0,void 0,(function(){var e,t,n,r=this;return Object(f.__generator)(this,(function(i){switch(i.label){case 0:e=new hi,setTimeout((function(){return Object(f.__awaiter)(r,void 0,void 0,(function(){return Object(f.__generator)(this,(function(t){return e.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:e})];case 2:return i.sent(),[4,this._storageCache.setLastFetchStatus("success")];case 3:return i.sent(),[3,6];case 4:return t=i.sent(),n=function(e,t){return e instanceof a.FirebaseError&&-1!==e.code.indexOf(t)}(t,"fetch-throttle")?"throttle":"failure",[4,this._storageCache.setLastFetchStatus(n)];case 5:throw i.sent(),t;case 6:return[2]}}
2))}))},e.prototype.fetchAndActivate=function(){return Object(f.__awaiter)(this,void 0,void 0,(function(){return Object(f.__generator)(this,(function(e){switch(e.label){case 0:return[4,this.fetch()];case 1:return e.sent(),[2,this.activate()]}}))}))},e.prototype.getAll=function(){var e=this;return function(e,t){void 0===e&&(e={});void 0===t&&(t={});return Object.keys(Object(f.__assign)(Object(f.__assign)({},e),t))}(this._storageCache.getActiveConfig(),this.defaultConfig).reduce((function(t,n){return t[n]=e.getValue(n),t}),{})},e.prototype.getBoolean=function(e){return this.getValue(e).asBoolean()},e.prototype.getNumber=function(e){return this.getValue(e).asNumber()},e.prototype.getString=function(e){return this.getValue(e).asString()},e.prototype.getValue=function(e){this._isInitializationComplete||this._logger.debug('A value was requested for key "'+e+'" before SDK initialization completed. Await on ensureInitialized if the intent was to get a previously activated value.');var t=this._storageCache.getActiveConfig();return t&&void 0!==t[e]?new pi("remote",t[e]):this.defaultConfig&&void 0!==this.defaultConfig[e]?new pi("default",String(this.defaultConfig[e])):(this._logger.debug('Returning static value for key "'+e+'". Define a default or remote value if this is unintentional.'),new pi("static"))},e}();function vi(e,t){var n=e.target.error||void 0;return li.create(t,{originalErrorMessage:n&&n.message})}var mi="app_namespace_store";var yi=function(){function e(e,t,n,r){void 0===r&&(r=new Promise((function(e,t){var n=indexedDB.open("firebase_remote_config",1);n.onerror=function(e){t(vi(e,"storage-open"))},n.onsuccess=function(t){e(t.target.result)},n.onupgradeneeded=function(e){var t=e.target.result;switch(e.oldVersion){case 0:t.createObjectStore(mi,{keyPath:"compositeKey"})}}}))),this.appId=e,this.appName=t,this.namespace=n,this.openDbPromise=r}return e.prototype.getLastFetchStatus=function(){return this.get("last_fetch_status")},e.prototype.setLastFetchStatus=function(e){return this.set("last_fetch_status",e)},e.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.get("last_successful_fetch_timestamp_millis")},e.prototype.setLastSuccessfulFetchTimestampMillis=function(e){return this.set("last_successful_fetch_timestamp_millis",e)},e.prototype.getLastSuccessfulFetchResponse=function(){return this.get("last_successful_fetch_response")},e.prototype.setLastSuccessfulFetchResponse=function(e){return this.set("last_successful_fetch_response",e)},e.prototype.getActiveConfig=function(){return this.get("active_config")},e.prototype.setActiveConfig=function(e){return this.set("active_config",e)},e.prototype.getActiveConfigEtag=function(){return this.get("active_config_etag")},e.prototype.setActiveConfigEtag=function(e){return this.set("active_config_etag",e)},e.prototype.getThrottleMetadata=function(){return this.get("throttle_metadata")},e.prototype.setThrottleMetadata=function(e){return this.set("throttle_metadata",e)},e.prototype.deleteThrottleMetadata=function(){return this.delete("throttle_metadata")},e.prototype.get=function(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,n=this;return Object(f.__generator)(this,(function(i){switch(i.label){case 0:return[4,this.openDbPromise];case 1:return t=i.sent(),[2,new Promise((function(i,o){var a=t.transaction([mi],"readonly").objectStore(mi),s=n.createCompositeKey(e);try{var u=a.get(s);u.onerror=function(e){o(vi(e,"storage-get"))},u.onsuccess=function(e){var t=e.target.result;i(t?t.value:void 0)}}catch(r){o(li.create("storage-get",{originalErrorMessage:r&&r.message}))}}))]}}))}))},e.prototype.set=function(e,t){return Object(f.__awaiter)(this,void 0,void 0,(function(){var n,i=this;return Object(f.__generator)(this,(function(o){switch(o.label){case 0:return[4,this.openDbPromise];case 1:return n=o.sent(),[2,new Promise((function(o,a){var s=n.transaction([mi],"readwrite").objectStore(mi),u=i.createCompositeKey(e);try{var c=s.put({compositeKey:u,value:t});c.onerror=function(e){a(vi(e,"storage-set"))},c.onsuccess=function(){o()}}catch(r){a(li.create("storage-set",{originalErrorMessage:r&&r.message}))}}))]}}))}))},e.prototype.delete=function(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,n=this;return Object(f.__generator)(this,(function(i){switch(i.label){case 0:return[4,this.openDbPromise];case 1:return t=i.sent(),[2,new Promise((function(i,o){var a=t.transaction([mi],"readwrite").objectStore(mi),s=n.createCompositeKey(e);try{var u=a.delete(s);u.onerror=function(e){o(vi(e,"storage-delete"))},u.onsuccess=function(){i()}}catch(r){o(li.create("storage-delete",{originalErrorMessage:r&&r.message}))}}))]}}))}))},e.prototype.createCompositeKey=function(e){return[this.appId,this.appName,this.namespace,e].join()},e}(),bi=function(){function e(e){this.storage=e}return e.prototype.getLastFetchStatus=function(){return this.lastFetchStatus},e.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.lastSuccessfulFetchTimestampMillis},e.prototype.getActiveConfig=function(){return this.activeConfig},e.prototype.loadFromStorage=function(){return Object(f.__awaiter)(this,void 0,void 0,(function(){var e,t,n,r,i,o;return Object(f.__generator)(this,(function(a){switch(a.label){case 0:return e=this.storage.getLastFetchStatus(),t=this.storage.getLastSuccessfulFetchTimestampMillis(),n=this.storage.getActiveConfig(),[4,e];case 1:return(r=a.sent())&&(this.lastFetchStatus=r),[4,t];case 2:return(i=a.sent())&&(this.lastSuccessfulFetchTimestampMillis=i),[4,n];case 3:return(o=a.sent())&&(this.activeConfig=o),[2]}}))}))},e.prototype.setLastFetchStatus=function(e){return this.lastFetchStatus=e,this.storage.setLastFetchStatus(e)},e.prototype.setLastSuccessfulFetchTimestampMillis=function(e){return this.lastSuccessfulFetchTimestampMillis=e,this.storage.setLastSuccessfulFetchTimestampMillis(e)},e.prototype.setActiveConfig=function(e){return this.activeConfig=e,this.storage.setActiveConfig(e)},e}();function _i(e,t){return new Promise((function(n,r){var i=Math.max(t-Date.now(),0),o=setTimeout(n,i);e.addEventListener((function(){clearTimeout(o),r(li.create("fetch-throttle",{throttleEndTimeMillis:t}))}))}))}var wi,ki=function(){function e(e,t){this.client=e,this.storage=t}return e.prototype.fetch=function(e){return Object(f.__awaiter)(this,void 0,void 0,(function(){var t;return Object(f.__generator)(this,(function(n){switch(n.label){case 0:return[4,this.storage.getThrottleMetadata()];case 1:return t=n.sent()||{backoffCount:0,throttleEndTimeMillis:Date.now()},[2,this.attemptFetch(e,t)]}}))}))},e.prototype.attemptFetch=function(e,t){var n=t.throttleEndTimeMillis,r=t.backoffCount;return Object(f.__awaiter)(this,void 0,void 0,(function(){var t,i,o;return Object(f.__generator)(this,(function(s){switch(s.label){case 0:return[4,_i(e.signal,n)];case 1:s.sent(),s.label=2;case 2:return s.trys.push([2,5,,7]),[4,this.client.fetch(e)];case 3:return t=s.sent(),[4,this.storage.deleteThrottleMetadata()];case 4:return s.sent(),[2,t];case 5:if(!function(e){if(!(e instanceof a.FirebaseError)||!e.customData)return!1;var t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}(i=s.sent()))throw i;return o={throttleEndTimeMillis:Date.now()+Object(a.calculateBackoffMillis)(r),backoffCount:r+1},[4,this.storage.setThrottleMetadata(o)];case 6:return s.sent(),[2,this.attemptFetch(e,o)];case 7:return[2]}}
2))}))},e}(),Ei="@firebase/remote-config";(wi=o.default).INTERNAL.registerComponent(new c.Component("remoteConfig",(function(e,t){var n=t.instanceIdentifier,r=e.getProvider("app").getImmediate(),i=e.getProvider("installations").getImmediate();if("undefined"===typeof window)throw li.create("registration-window");var o=r.options,a=o.projectId,u=o.apiKey,c=o.appId;if(!a)throw li.create("registration-project-id");if(!u)throw li.create("registration-api-key");if(!c)throw li.create("registration-app-id");n=n||"firebase";var l=new yi(c,r.name,n),f=new bi(l),h=new s.Logger(Ei);h.logLevel=s.LogLevel.ERROR;var d=new fi(i,wi.SDK_VERSION,n,a,u,c),p=new ki(d,l),g=new ui(p,l,f,h),v=new gi(r,g,f,l,h);return v.ensureInitialized(),v}),"PUBLIC").setMultipleInstances(!0)),wi.registerVersion(Ei,"0.1.40");n(69);var Si="8.6.8";o.default.registerVersion("firebase",Si,"app"),o.default.SDK_VERSION=Si;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 firebase from 'firebase/app';\nimport 'firebase/<PACKAGE>';\n"),o.default.registerVersion("firebase","8.6.8")},,,,function(e,t,n){"use strict";(function(e){var t=n(5);(function(){var n,r="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)};var i=function(t){t=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof e&&e,t];for(var n=0;n<t.length;++n){var r=t[n];if(r&&r.Math==Math)return r}return globalThis}(this);function o(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}function a(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:o(e)}}!function(e,t){if(t){var n=i;e=e.split(".");for(var o=0;o<e.length-1;o++){var a=e[o];a in n||(n[a]={}),n=n[a]}(t=t(o=n[e=e[e.length-1]]))!=o&&null!=t&&r(n,e,{configurable:!0,writable:!0,value:t})}}("Promise",(function(e){function t(e){this.b=0,this.c=void 0,this.a=[];var t=this.f();try{e(t.resolve,t.reject)}catch(n){t.reject(n)}}function n(){this.a=null}function r(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;n.prototype.b=function(e){if(null==this.a){this.a=[];var t=this;this.c((function(){t.g()}))}this.a.push(e)};var o=i.setTimeout;n.prototype.c=function(e){o(e,0)},n.prototype.g=function(){for(;this.a&&this.a.length;){var e=this.a;this.a=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(r){this.f(r)}}}this.a=null},n.prototype.f=function(e){this.c((function(){throw e}))},t.prototype.f=function(){function e(e){return function(r){n||(n=!0,e.call(t,r))}}var t=this,n=!1;return{resolve:e(this.m),reject:e(this.g)}},t.prototype.m=function(e){if(e===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.s(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.v(e):this.h(e)}},t.prototype.v=function(e){var t=void 0;try{t=e.then}catch(n){return void this.g(n)}"function"==typeof t?this.u(t,e):this.h(e)},t.prototype.g=function(e){this.i(2,e)},t.prototype.h=function(e){this.i(1,e)},t.prototype.i=function(e,t){if(0!=this.b)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.b);this.b=e,this.c=t,this.l()},t.prototype.l=function(){if(null!=this.a){for(var e=0;e<this.a.length;++e)s.b(this.a[e]);this.a=null}};var s=new n;return t.prototype.s=function(e){var t=this.f();e.Ra(t.resolve,t.reject)},t.prototype.u=function(e,t){var n=this.f();try{e.call(t,n.resolve,n.reject)}catch(r){n.reject(r)}},t.prototype.then=function(e,n){function r(e,t){return"function"==typeof e?function(t){try{i(e(t))}catch(n){o(n)}}:t}var i,o,a=new t((function(e,t){i=e,o=t}));return this.Ra(r(e,i),r(n,o)),a},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.Ra=function(e,t){function n(){switch(r.b){case 1:e(r.c);break;case 2:t(r.c);break;default:throw Error("Unexpected state: "+r.b)}}var r=this;null==this.a?s.b(n):this.a.push(n)},t.resolve=r,t.reject=function(e){return new t((function(t,n){n(e)}))},t.race=function(e){return new t((function(t,n){for(var i=a(e),o=i.next();!o.done;o=i.next())r(o.value).Ra(t,n)}))},t.all=function(e){var n=a(e),i=n.next();return i.done?r([]):new t((function(e,t){function o(t){return function(n){a[t]=n,0==--s&&e(a)}}var a=[],s=0;do{a.push(void 0),s++,r(i.value).Ra(o(a.length-1),t),i=n.next()}while(!i.done)}))},t}));var s=s||{},u=this||self,c=/^[\w+/_-]+[=]{0,2}$/,l=null;function f(e){return(e=e.querySelector&&e.querySelector("script[n
2once]"))&&(e=e.nonce||e.getAttribute("nonce"))&&c.test(e)?e:""}function h(){}function d(e){var t=typeof e;return"object"!=t?t:e?Array.isArray(e)?"array":t:"null"}function p(e){var t=d(e);return"array"==t||"object"==t&&"number"==typeof e.length}function g(e){return"function"==d(e)}function v(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function m(e){return Object.prototype.hasOwnProperty.call(e,y)&&e[y]||(e[y]=++b)}var y="closure_uid_"+(1e9*Math.random()>>>0),b=0;function _(e,t,n){return e.call.apply(e.bind,arguments)}function w(e,t,n){if(!e)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),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function k(e,t,n){return(k=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?_:w).apply(null,arguments)}function E(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}var S=Date.now;function I(e,t){function n(){}n.prototype=t.prototype,e.bb=t.prototype,e.prototype=new n,e.prototype.constructor=e}function x(e){return e}function T(e,t,n){this.code=A+e,this.message=t||N[e]||"",this.a=n||null}function C(e){var t=e&&e.code;return t?new T(t.substring(A.length),e.message,e.serverResponse):null}I(T,Error),T.prototype.w=function(){var e={code:this.code,message:this.message};return this.a&&(e.serverResponse=this.a),e},T.prototype.toJSON=function(){return this.w()};var O,A="auth/",N={"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 to use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-dynamic-link-domain":"The provided dynamic link domain is not configured or authorized for the current project.","invalid-email":"The email address is badly formatted.","invalid-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."},P={ld:{Ua:"https://staging-identitytoolkit.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",$a:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Xa:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"b"},sd:{Ua:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",$a:"https://securetoken.googleapis.com/v1/token",Xa:"https://identitytoolkit.googleapis.com/v2/",id:"p"},ud:{Ua:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",$a:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Xa:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"s"},vd:{Ua:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",$a:"https://test-securetoken.sandbox.googleapis.com/v1/token",Xa:"https://test-identitytoolkit.sandbox.googleapis.com/v2/",id:"t"}};function R(e){for(var t in P)if(P[t].id===e)return{firebaseEndpoint:(e=P[t]).Ua,secureTokenEndpoint:e.$a,identityPlatformEndpoint:e.Xa};return null}function j(e){if(!e)return!1;
2try{return!!e.$goog_Thenable}catch(t){return!1}}function D(e){if(Error.captureStackTrace)Error.captureStackTrace(this,D);else{var t=Error().stack;t&&(this.stack=t)}e&&(this.message=String(e))}function M(e,t){for(var n="",r=(e=e.split("%s")).length-1,i=0;i<r;i++)n+=e[i]+(i<t.length?t[i]:"%s");D.call(this,n+e[r])}function L(e,t){throw new M("Failure"+(e?": "+e:""),Array.prototype.slice.call(arguments,1))}function F(e,t){this.c=e,this.f=t,this.b=0,this.a=null}function U(e,t){e.f(t),100>e.b&&(e.b++,t.next=e.a,e.a=t)}function V(){this.b=this.a=null}O=R("__EID__")?"__EID__":void 0,I(D,Error),D.prototype.name="CustomError",I(M,D),M.prototype.name="AssertionError",F.prototype.get=function(){if(0<this.b){this.b--;var e=this.a;this.a=e.next,e.next=null}else e=this.c();return e};var B=new F((function(){return new z}),(function(e){e.reset()}));function q(){var e=_t,t=null;return e.a&&(t=e.a,e.a=e.a.next,e.a||(e.b=null),t.next=null),t}function z(){this.next=this.b=this.a=null}V.prototype.add=function(e,t){var n=B.get();n.set(e,t),this.b?this.b.next=n:this.a=n,this.b=n},z.prototype.set=function(e,t){this.a=e,this.b=t,this.next=null},z.prototype.reset=function(){this.next=this.b=this.a=null};var H=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"===typeof e)return"string"!==typeof t||1!=t.length?-1:e.indexOf(t,0);for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},K=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(e,t,n){for(var r=e.length,i="string"===typeof e?e.split(""):e,o=0;o<r;o++)o in i&&t.call(n,i[o],o,e)};var W=Array.prototype.filter?function(e,t){return Array.prototype.filter.call(e,t,void 0)}:function(e,t){for(var n=e.length,r=[],i=0,o="string"===typeof e?e.split(""):e,a=0;a<n;a++)if(a in o){var s=o[a];t.call(void 0,s,a,e)&&(r[i++]=s)}return r},G=Array.prototype.map?function(e,t){return Array.prototype.map.call(e,t,void 0)}:function(e,t){for(var n=e.length,r=Array(n),i="string"===typeof e?e.split(""):e,o=0;o<n;o++)o in i&&(r[o]=t.call(void 0,i[o],o,e));return r},Y=Array.prototype.some?function(e,t){return Array.prototype.some.call(e,t,void 0)}:function(e,t){for(var n=e.length,r="string"===typeof e?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e))return!0;return!1};function $(e,t){return 0<=H(e,t)}function Q(e,t){var n;return(n=0<=(t=H(e,t)))&&Array.prototype.splice.call(e,t,1),n}function X(e,t){!function(e,t){for(var n="string"===typeof e?e.split(""):e,r=e.length-1;0<=r;--r)r in n&&t.call(void 0,n[r],r,e)}(e,(function(n,r){t.call(void 0,n,r,e)&&1==Array.prototype.splice.call(e,r,1).length&&0}))}function J(e){return Array.prototype.concat.apply([],arguments)}function Z(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}var ee,te=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]},ne=/&/g,re=/</g,ie=/>/g,oe=/"/g,ae=/'/g,se=/\x00/g,ue=/[\x00&<>"']/;function ce(e,t){return-1!=e.indexOf(t)}function le(e,t){return e<t?-1:e>t?1:0}e:{var fe=u.navigator;if(fe){var he=fe.userAgent;if(he){ee=he;break e}}ee=""}function de(e){return ce(ee,e)}function pe(e,t){for(var n in e)t.call(void 0,e[n],n,e)}function ge(e){for(var t in e)return!1;return!0}function ve(e){var t,n={};for(t in e)n[t]=e[t];return n}var me="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function ye(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(var o=0;o<me.length;o++)n=me[o],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function be(e,t){e:{try{var n=e&&e.ownerDocument,r=n&&(n.defaultView||n.parentWindow);if((r=r||u).Element&&r.Location){var i=r;break e}}catch(a){}i=null}if(i&&"undefined"!=typeof i[t]&&(!e||!(e instanceof i[t])&&(e instanceof i.Location||e instanceof i.Element))){if(v(e))try{var o=e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e)}catch(a){o="<object could not be stringified>"}else o=void 0===e?"undefined":null===e?"null":typeof e;L("Argument is not a %s (or a non-Element, non-Location mock); got: %s",t,o)}}function _e(e,t){this.a=e===Se&&t||"",this.b=Ee}function we(e){return e instanceof _e&&e.constructor===_e&&e.b===Ee?e.a:(L("expected object of type Const, got '"+e+"'"),"type_error:Const")}_e.prototype.ta=!0,_e.prototype.sa=function(){return this.a},_e.prototype.toString=function(){return"Const{"+this.a+"}"};var ke,Ee={},Se={};function Ie(){if(void 0===ke){var e=null,t=u.trustedTypes;if(t&&t.createPolicy){try{e=t.createPolicy("goog#html",{createHTML:x,createScript:x,createScriptURL:x})}catch(n){u.console&&u.console.error(n.message)}ke=e}else ke=e}return ke}function xe(e,t){this.a=t===Ne?e:""}function Te(e){return e instanceof xe&&e.constructor===xe?e.a:(L("expected object of type TrustedResourceUrl, got '"+e+"' of type "+d(e)),"type_error:TrustedResourceUrl")}function Ce(e,t){var n=we(e);if(!Ae.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return function(e){var t=Ie();return new xe(e=t?t.createScriptURL(e):e,Ne)}(e=n.replace(Oe,(function(e,r){if(!Object.prototype.hasOwnProperty.call(t,r))throw Error('Found marker, "'+r+'", in format str
2ing, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(t));return(e=t[r])instanceof _e?we(e):encodeURIComponent(String(e))})))}xe.prototype.ta=!0,xe.prototype.sa=function(){return this.a.toString()},xe.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var Oe=/%{(\w+)}/g,Ae=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,Ne={};function Pe(e,t){this.a=t===Ue?e:""}function Re(e){return e instanceof Pe&&e.constructor===Pe?e.a:(L("expected object of type SafeUrl, got '"+e+"' of type "+d(e)),"type_error:SafeUrl")}Pe.prototype.ta=!0,Pe.prototype.sa=function(){return this.a.toString()},Pe.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var je=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)|font\/\w+|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime|x-matroska))(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i,De=/^data:(.*);base64,[a-z0-9+\/]+=*$/i,Me=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function Le(e){if(e instanceof Pe)return e;if(e="object"==typeof e&&e.ta?e.sa():String(e),Me.test(e))e=new Pe(e,Ue);else{var t=(e=(e=String(e)).replace(/(%0A|%0D)/g,"")).match(De);e=t&&je.test(t[1])?new Pe(e,Ue):null}return e}function Fe(e){return e instanceof Pe?e:(e="object"==typeof e&&e.ta?e.sa():String(e),Me.test(e)||(e="about:invalid#zClosurez"),new Pe(e,Ue))}var Ue={},Ve=new Pe("about:invalid#zClosurez",Ue);function Be(e,t,n){this.a=n===qe?e:""}Be.prototype.ta=!0,Be.prototype.sa=function(){return this.a.toString()},Be.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var qe={};function ze(e,t,n,r){return e=e instanceof Pe?e:Fe(e),t=t||u,n=n instanceof _e?we(n):n||"",t.open(Re(e),n,r,void 0)}function He(e,t){for(var n=e.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 Ke(e){return ue.test(e)&&(-1!=e.indexOf("&")&&(e=e.replace(ne,"&amp;")),-1!=e.indexOf("<")&&(e=e.replace(re,"&lt;")),-1!=e.indexOf(">")&&(e=e.replace(ie,"&gt;")),-1!=e.indexOf('"')&&(e=e.replace(oe,"&quot;")),-1!=e.indexOf("'")&&(e=e.replace(ae,"&#39;")),-1!=e.indexOf("\0")&&(e=e.replace(se,"&#0;"))),e}function We(e){return We[" "](e),e}We[" "]=h;var Ge,Ye=de("Opera"),$e=de("Trident")||de("MSIE"),Qe=de("Edge"),Xe=Qe||$e,Je=de("Gecko")&&!(ce(ee.toLowerCase(),"webkit")&&!de("Edge"))&&!(de("Trident")||de("MSIE"))&&!de("Edge"),Ze=ce(ee.toLowerCase(),"webkit")&&!de("Edge");function et(){var e=u.document;return e?e.documentMode:void 0}e:{var tt="",nt=function(){var e=ee;return Je?/rv:([^\);]+)(\)|;)/.exec(e):Qe?/Edge\/([\d\.]+)/.exec(e):$e?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):Ze?/WebKit\/(\S+)/.exec(e):Ye?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(nt&&(tt=nt?nt[1]:""),$e){var rt=et();if(null!=rt&&rt>parseFloat(tt)){Ge=String(rt);break e}}Ge=tt}var it,ot={};function at(e){return function(e,t){var n=ot;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}(e,(function(){for(var t=0,n=te(String(Ge)).split("."),r=te(String(e)).split("."),i=Math.max(n.length,r.length),o=0;0==t&&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;t=le(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||le(0==a[2].length,0==s[2].length)||le(a[2],s[2]),a=a[3],s=s[3]}while(0==t)}return 0<=t}))}if(u.document&&$e){var st=et();it=st||(parseInt(Ge,10)||void 0)}else it=void 0;var ut=it;try{new self.OffscreenCanvas(0,0).getContext("2d")}catch(ha){}var ct=!$e||9<=Number(ut);function lt(e){var t=document;return"string"===typeof e?t.getElementById(e):e}function ft(e,t){pe(t,(function(t,n){t&&"object"==typeof t&&t.ta&&(t=t.sa()),"style"==n?e.style.cssText=t:"class"==n?e.className=t:"for"==n?e.htmlFor=t:pt.hasOwnProperty(n)?e.setAttribute(pt[n],t):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?e.setAttribute(n,t):e[n]=t}))}var ht,dt,pt={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",
2nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function gt(e,t,n){function r(n){n&&t.appendChild("string"===typeof n?e.createTextNode(n):n)}for(var i=2;i<n.length;i++){var o=n[i];if(!p(o)||v(o)&&0<o.nodeType)r(o);else{e:{if(o&&"number"==typeof o.length){if(v(o)){var a="function"==typeof o.item||"string"==typeof o.item;break e}if(g(o)){a="function"==typeof o.item;break e}}a=!1}K(a?Z(o):o,r)}}}function vt(e,t){return t=String(t),"application/xhtml+xml"===e.contentType&&(t=t.toLowerCase()),e.createElement(t)}function mt(e){u.setTimeout((function(){throw e}),0)}function yt(e,t){dt||function(){if(u.Promise&&u.Promise.resolve){var e=u.Promise.resolve(void 0);dt=function(){e.then(wt)}}else dt=function(){var e=wt;!g(u.setImmediate)||u.Window&&u.Window.prototype&&!de("Edge")&&u.Window.prototype.setImmediate==u.setImmediate?(ht||(ht=function(){var e=u.MessageChannel;if("undefined"===typeof e&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!de("Presto")&&(e=function(){var e=vt(document,"IFRAME");e.style.display="none",document.documentElement.appendChild(e);var t=e.contentWindow;(e=t.document).open(),e.close();var n="callImmediate"+Math.random(),r="file:"==t.location.protocol?"*":t.location.protocol+"//"+t.location.host;e=k((function(e){"*"!=r&&e.origin!=r||e.data!=n||this.port1.onmessage()}),this),t.addEventListener("message",e,!1),this.port1={},this.port2={postMessage:function(){t.postMessage(n,r)}}}),"undefined"!==typeof e&&!de("Trident")&&!de("MSIE")){var t=new e,n={},r=n;return t.port1.onmessage=function(){if(void 0!==n.next){var e=(n=n.next).Hb;n.Hb=null,e()}},function(e){r.next={Hb:e},r=r.next,t.port2.postMessage(0)}}return function(e){u.setTimeout(e,0)}}()),ht(e)):u.setImmediate(e)}}(),bt||(dt(),bt=!0),_t.add(e,t)}var bt=!1,_t=new V;function wt(){for(var e;e=q();){try{e.a.call(e.b)}catch(t){mt(t)}U(B,e)}bt=!1}function kt(e,t){if(this.a=Et,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,e!=h)try{var n=this;e.call(t,(function(e){Mt(n,St,e)}),(function(e){if(!(e instanceof zt))try{if(e instanceof Error)throw e;throw Error("Promise rejected.")}catch(t){}Mt(n,It,e)}))}catch(r){Mt(this,It,r)}}var Et=0,St=2,It=3;function xt(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}xt.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var Tt=new F((function(){return new xt}),(function(e){e.reset()}));function Ct(e,t,n){var r=Tt.get();return r.g=e,r.b=t,r.f=n,r}function Ot(e){if(e instanceof kt)return e;var t=new kt(h);return Mt(t,St,e),t}function At(e){return new kt((function(t,n){n(e)}))}function Nt(e,t,n){Lt(e,t,n,null)||yt(E(t,e))}function Pt(e){return new kt((function(t){var n=e.length,r=[];if(n)for(var i=function(e,i,o){n--,r[e]=i?{Qb:!0,value:o}:{Qb:!1,reason:o},0==n&&t(r)},o=0;o<e.length;o++)Nt(e[o],E(i,o,!0),E(i,o,!1));else t(r)}))}function Rt(e,t){if(e.a==Et)if(e.c){var n=e.c;if(n.b){for(var r=0,i=null,o=null,a=n.b;a&&(a.c||(r++,a.a==e&&(i=a),!(i&&1<r)));a=a.next)i||(o=a);i&&(n.a==Et&&1==r?Rt(n,t):(o?((r=o).next==n.f&&(n.f=r),r.next=r.next.next):Ut(n),Vt(n,i,It,t)))}e.c=null}else Mt(e,It,t)}function jt(e,t){e.b||e.a!=St&&e.a!=It||Ft(e),e.f?e.f.next=t:e.b=t,e.f=t}function Dt(e,t,n,r){var i=Ct(null,null,null);return i.a=new kt((function(e,o){i.g=t?function(n){try{var i=t.call(r,n);e(i)}catch(a){o(a)}}:e,i.b=n?function(t){try{var i=n.call(r,t);void 0===i&&t instanceof zt?o(t):e(i)}catch(a){o(a)}}:o})),i.a.c=e,jt(e,i),i.a}function Mt(e,t,n){e.a==Et&&(e===n&&(t=It,n=new TypeError("Promise cannot resolve to itself")),e.a=1,Lt(n,e.$c,e.ad,e)||(e.i=n,e.a=t,e.c=null,Ft(e),t!=It||n instanceof zt||function(e,t){e.g=!0,yt((function(){e.g&&qt.call(null,t)}))}(e,n)))}function Lt(e,t,n,r){if(e instanceof kt)return jt(e,Ct(t||h,n||null,r)),!0;if(j(e))return e.then(t,n,r),!0;if(v(e))try{var i=e.then;if(g(i))return function(e,t,n,r,i){function o(e){s||(s=!0,r.call(i,e))}function a(e){s||(s=!0,n.call(i,e))}var s=!1;try{t.call(e,a,o)}catch(u){o(u)}}(e,i,t,n,r),!0}catch(o){return n.call(r,o),!0}return!1}function Ft(e){e.h||(e.h=!0,yt(e.gc,e))}function Ut(e){var t=null;return e.b&&(t=e.b,e.b=t.next,t.next=null),e.b||(e.f=null),t}function Vt(e,t,n,r){if(n==It&&t.b&&!t.c)for(;e&&e.g;e=e.c)e.g=!1;if(t.a)t.a.c=null,Bt(t,n,r);else try{t.c?t.g.call(t.f):Bt(t,n,r)}catch(i){qt.call(null,i)}U(Tt,t)}function Bt(e,t,n){t==St?e.g.call(e.f,n):e.b&&e.b.call(e.f,n)}kt.prototype.then=function(e,t,n){return Dt(this,g(e)?e:null,g(t)?t:null,n)}
2,kt.prototype.$goog_Thenable=!0,(n=kt.prototype).oa=function(e,t){return(e=Ct(e,e,t)).c=!0,jt(this,e),this},n.o=function(e,t){return Dt(this,null,e,t)},n.cancel=function(e){if(this.a==Et){var t=new zt(e);yt((function(){Rt(this,t)}),this)}},n.$c=function(e){this.a=Et,Mt(this,St,e)},n.ad=function(e){this.a=Et,Mt(this,It,e)},n.gc=function(){for(var e;e=Ut(this);)Vt(this,e,this.a,this.i);this.h=!1};var qt=mt;function zt(e){D.call(this,e)}function Ht(){0!=Kt&&(Wt[m(this)]=this),this.ya=this.ya,this.pa=this.pa}I(zt,D),zt.prototype.name="cancel";var Kt=0,Wt={};function Gt(e){if(!e.ya&&(e.ya=!0,e.Da(),0!=Kt)){var t=m(e);if(0!=Kt&&e.pa&&0<e.pa.length)throw Error(e+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete Wt[t]}}Ht.prototype.ya=!1,Ht.prototype.Da=function(){if(this.pa)for(;this.pa.length;)this.pa.shift()()};var Yt=Object.freeze||function(e){return e},$t=!$e||9<=Number(ut),Qt=$e&&!at("9"),Xt=function(){if(!u.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{u.addEventListener("test",h,t),u.removeEventListener("test",h,t)}catch(n){}return e}();function Jt(e,t){this.type=e,this.b=this.target=t,this.defaultPrevented=!1}function Zt(e,t){if(Jt.call(this,e?e.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,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.b=t,t=e.relatedTarget){if(Je){e:{try{We(t.nodeName);var i=!0;break e}catch(o){}i=!1}i||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,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!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"===typeof e.pointerType?e.pointerType:en[e.pointerType]||"",this.a=e,e.defaultPrevented&&this.preventDefault()}}Jt.prototype.preventDefault=function(){this.defaultPrevented=!0},I(Zt,Jt);var en=Yt({2:"touch",3:"pen",4:"mouse"});Zt.prototype.preventDefault=function(){Zt.bb.preventDefault.call(this);var e=this.a;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,Qt)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(t){}},Zt.prototype.g=function(){return this.a};var tn="closure_listenable_"+(1e6*Math.random()|0),nn=0;function rn(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.Wa=i,this.key=++nn,this.wa=this.Qa=!1}function on(e){e.wa=!0,e.listener=null,e.proxy=null,e.src=null,e.Wa=null}function an(e){this.src=e,this.a={},this.b=0}function sn(e,t){var n=t.type;n in e.a&&Q(e.a[n],t)&&(on(t),0==e.a[n].length&&(delete e.a[n],e.b--))}function un(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i];if(!o.wa&&o.listener==t&&o.capture==!!n&&o.Wa==r)return i}return-1}an.prototype.add=function(e,t,n,r,i){var o=e.toString();(e=this.a[o])||(e=this.a[o]=[],this.b++);var a=un(e,t,r,i);return-1<a?(t=e[a],n||(t.Qa=!1)):((t=new rn(t,this.src,o,!!r,i)).Qa=n,e.push(t)),t};var cn="closure_lm_"+(1e6*Math.random()|0),ln={};function fn(e,t,n,r,i){if(r&&r.once)dn(e,t,n,r,i);else if(Array.isArray(t))for(var o=0;o<t.length;o++)fn(e,t[o],n,r,i);else n=kn(n),e&&e[tn]?Sn(e,t,n,v(r)?!!r.capture:!!r,i):hn(e,t,n,!1,r,i)}function hn(e,t,n,r,i,o){if(!t)throw Error("Invalid event type");var a=v(i)?!!i.capture:!!i,s=_n(e);if(s||(e[cn]=s=new an(e)),!(n=s.add(t,n,r,a,o)).proxy){if(r=function(){var e=bn,t=$t?function(n){return e.call(t.src,t.listener,n)}:function(n){if(!(n=e.call(t.src,t.listener,n)))return n};return t}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)Xt||(i=a),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(vn(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}0}}function dn(e,t,n,r,i){if(Array.isArray(t))for(var o=0;o<t.length;o++)dn(e,t[o],n,r,i);else n=kn(n),e&&e[tn]?In(e,t,n,v(r)?!!r.capture:!!r,i):hn(e,t,n,!0,r,i)}function pn(e,t,n,r,i){if(Array.isArray(t))for(var o=0;o<t.length;o++)pn(e,t[o],n,r,i);else r=v(r)?!!r.capture:!!r,n=kn(n),e&&e[tn]?(e=e.v,(t=String(t).toString())in e.a&&(-1<(n=un(o=e.a[t],n,r,i))&&(on(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete e.a[t],e.b--)))):e&&(e=_n(e))&&(t=e.a[t.toString()],e=-1,t&&(e=un(t,n,r,i)),(n=-1<e?t[e]:null)&&gn(n))}function gn(e){if("number"!==typeof e&&e&&!e.wa){var t=e.src;if(t&&t[tn])sn(t.v,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(vn(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=_n(t))?(sn(n,e),0==n.b&&(n.src=null,t[cn]=null)):on(e)}}}function vn(e){return e in ln?ln[e]:ln[e]="on"+e}function mn(e,t,n,r){var i=!0;if((e=_n(e))&&(t=e.a[t.toString()]))for(t=t.concat(),e=0;e<t.length;e++){var o=t[e];o&&o.capture==n&&!o.wa&&(o=yn(o,r),i=i&&!1!==o)}return i}function yn(e,t){var n=e.listener,r=e.Wa||e.src;return e.Qa&&gn(e),n.call(r,t)}function bn(e,t){if(e.wa)return!0;
2if(!$t){if(!t)e:{t=["window","event"];for(var n=u,r=0;r<t.length;r++)if(null==(n=n[t[r]])){t=null;break e}t=n}if(t=new Zt(r=t,this),n=!0,!(0>r.keyCode||void 0!=r.returnValue)){e:{var i=!1;if(0==r.keyCode)try{r.keyCode=-1;break e}catch(a){i=!0}(i||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],i=t.b;i;i=i.parentNode)r.push(i);for(e=e.type,i=r.length-1;0<=i;i--){t.b=r[i];var o=mn(r[i],e,!0,t);n=n&&o}for(i=0;i<r.length;i++)t.b=r[i],o=mn(r[i],e,!1,t),n=n&&o}return n}return yn(e,new Zt(t,this))}function _n(e){return(e=e[cn])instanceof an?e:null}var wn="__closure_events_fn_"+(1e9*Math.random()>>>0);function kn(e){return g(e)?e:(e[wn]||(e[wn]=function(t){return e.handleEvent(t)}),e[wn])}function En(){Ht.call(this),this.v=new an(this),this.bc=this,this.hb=null}function Sn(e,t,n,r,i){e.v.add(String(t),n,!1,r,i)}function In(e,t,n,r,i){e.v.add(String(t),n,!0,r,i)}function xn(e,t,n,r){if(!(t=e.v.a[String(t)]))return!0;t=t.concat();for(var i=!0,o=0;o<t.length;++o){var a=t[o];if(a&&!a.wa&&a.capture==n){var s=a.listener,u=a.Wa||a.src;a.Qa&&sn(e.v,a),i=!1!==s.call(u,r)&&i}}return i&&!r.defaultPrevented}function Tn(e,t,n){if(g(e))n&&(e=k(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=k(e.handleEvent,e)}return 2147483647<Number(t)?-1:u.setTimeout(e,t||0)}function Cn(e){var t=null;return new kt((function(n,r){-1==(t=Tn((function(){n(void 0)}),e))&&r(Error("Failed to schedule timer."))})).o((function(e){throw u.clearTimeout(t),e}))}function On(e){if(e.X&&"function"==typeof e.X)return e.X();if("string"===typeof e)return e.split("");if(p(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}function An(e){if(e.Y&&"function"==typeof e.Y)return e.Y();if(!e.X||"function"!=typeof e.X){if(p(e)||"string"===typeof e){var t=[];e=e.length;for(var n=0;n<e;n++)t.push(n);return t}for(var r in t=[],n=0,e)t[n++]=r;return t}}function Nn(e,t){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(e)if(e instanceof Nn)for(n=e.Y(),r=0;r<n.length;r++)this.set(n[r],e.get(n[r]));else for(r in e)this.set(r,e[r])}function Pn(e){if(e.c!=e.a.length){for(var t=0,n=0;t<e.a.length;){var r=e.a[t];Rn(e.b,r)&&(e.a[n++]=r),t++}e.a.length=n}if(e.c!=e.a.length){var i={};for(n=t=0;t<e.a.length;)Rn(i,r=e.a[t])||(e.a[n++]=r,i[r]=1),t++;e.a.length=n}}function Rn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}I(En,Ht),En.prototype[tn]=!0,En.prototype.addEventListener=function(e,t,n,r){fn(this,e,t,n,r)},En.prototype.removeEventListener=function(e,t,n,r){pn(this,e,t,n,r)},En.prototype.dispatchEvent=function(e){var t,n=this.hb;if(n)for(t=[];n;n=n.hb)t.push(n);n=this.bc;var r=e.type||e;if("string"===typeof e)e=new Jt(e,n);else if(e instanceof Jt)e.target=e.target||n;else{var i=e;ye(e=new Jt(r,n),i)}if(i=!0,t)for(var o=t.length-1;0<=o;o--){var a=e.b=t[o];i=xn(a,r,!0,e)&&i}if(i=xn(a=e.b=n,r,!0,e)&&i,i=xn(a,r,!1,e)&&i,t)for(o=0;o<t.length;o++)i=xn(a=e.b=t[o],r,!1,e)&&i;return i},En.prototype.Da=function(){if(En.bb.Da.call(this),this.v){var e,t=this.v;for(e in t.a){for(var n=t.a[e],r=0;r<n.length;r++)on(n[r]);delete t.a[e],t.b--}}this.hb=null},(n=Nn.prototype).X=function(){Pn(this);for(var e=[],t=0;t<this.a.length;t++)e.push(this.b[this.a[t]]);return e},n.Y=function(){return Pn(this),this.a.concat()},n.clear=function(){this.b={},this.c=this.a.length=0},n.get=function(e,t){return Rn(this.b,e)?this.b[e]:t},n.set=function(e,t){Rn(this.b,e)||(this.c++,this.a.push(e)),this.b[e]=t},n.forEach=function(e,t){for(var n=this.Y(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);e.call(t,o,i,this)}};var jn=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Dn(e,t){var n;this.a=this.l=this.c="",this.g=null,this.h=this.f="",this.i=!1,e instanceof Dn?(this.i=void 0!==t?t:e.i,Mn(this,e.c),this.l=e.l,this.a=e.a,Ln(this,e.g),this.f=e.f,Fn(this,rr(e.b)),this.h=e.h):e&&(n=String(e).match(jn))?(this.i=!!t,Mn(this,n[1]||"",!0),this.l=zn(n[2]||""),this.a=zn(n[3]||"",!0),Ln(this,n[4]),this.f=zn(n[5]||"",!0),Fn(this,n[6]||"",!0),this.h=zn(n[7]||"")):(this.i=!!t,this.b=new Xn(null,this.i))}function Mn(e,t,n){e.c=n?zn(t,!0):t,e.c&&(e.c=e.c.replace(/:$/,""))}function Ln(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.g=t}else e.g=null}function Fn(e,t,n){t instanceof Xn?(e.b=t,function(e,t){t&&!e.f&&(Jn(e),e.c=null,e.a.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(er(this,t),nr(this,n,e))}),e)),e.f=t}(e.b,e.i)):(n||(t=Hn(t,$n)),e.b=new Xn(t,e.i))}function Un(e,t,n){e.b.set(t,n)}function Vn(e,t){return e.b.get(t)}function Bn(e){return e instanceof Dn?new Dn(e):new Dn(e,void 0)}function qn(e,t,n,r){var i=new Dn(null,void 0);return e&&Mn(i,e),t&&(i.a=t),n&&Ln(i,n),r&&(i.f=r),i}function zn(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Hn(e,t,n){return"string"===typeof e?(e=encodeURI(e).replace(t,Kn),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Kn(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}Dn.prototype.toString=function(){var e=[],t=this.c;t&&e.push(Hn(t,Wn,!0),":");var n=this.a;return(n||"file"==t)&&(e.push("//"),(t=this.l)&&e.push(Hn(t,Wn,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.g)&&e.push(":",String(n))),(n=this.f)&&(this.a&&"/"!=n.charAt(0)&&e.push("/"),e.push(Hn(n,"/"==n.charAt(0)?Yn:Gn,!0))),(n=this.b.toString())&&e.push("?",n),(n=this.h)&&e.push("#",Hn(n,Qn)),e.join("")},Dn.prototype.resolve=function(e){var t=new Dn(this),n=!!e.c;n?Mn(t,e.c):n=!!e.l,n?t.l=e.l:n=!!e.a,n?t.a=e.a:n=null!=e.g;var r=e.f;if(n)Ln(t,e.g);else if(n=!!e.f){if("/"!=r.charAt(0))if(this.a&&!this.f)r="/"+r;else{var i=t.f.lastIndexOf("/");-1!=i&&(r=t.f.substr(0,i+1)+r)}if(".."==(i=r)||"."==i)r="";else if(ce(i,"./")||ce(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?t.f=r:n=""!==e.b.toString(),n?Fn(t,rr(e.b)):n=!!e.h,n&&(t.h=e.h),t};var Wn=/[#\/\?@]/g,Gn=/[#\?:]/g,Yn=/[#\?]/g,$n=/[#\?@]/g,Qn=/#/g;function Xn(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function Jn(e){e.a||(e.a=new Nn,e.b=0,e.c&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var o=e[n].substring(0,r);i=e[n].substring(r+1)}else o=e[n];t(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.c,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function Zn(e){var t=An(e);
2if("undefined"==typeof t)throw Error("Keys are undefined");var n=new Xn(null,void 0);e=On(e);for(var r=0;r<t.length;r++){var i=t[r],o=e[r];Array.isArray(o)?nr(n,i,o):n.add(i,o)}return n}function er(e,t){Jn(e),t=ir(e,t),Rn(e.a.b,t)&&(e.c=null,e.b-=e.a.get(t).length,Rn((e=e.a).b,t)&&(delete e.b[t],e.c--,e.a.length>2*e.c&&Pn(e)))}function tr(e,t){return Jn(e),t=ir(e,t),Rn(e.a.b,t)}function nr(e,t,n){er(e,t),0<n.length&&(e.c=null,e.a.set(ir(e,t),Z(n)),e.b+=n.length)}function rr(e){var t=new Xn;return t.c=e.c,e.a&&(t.a=new Nn(e.a),t.b=e.b),t}function ir(e,t){return t=String(t),e.f&&(t=t.toLowerCase()),t}function or(e){var t=[];return sr(new ar,e,t),t.join("")}function ar(){}function sr(e,t,n){if(null==t)n.push("null");else{if("object"==typeof t){if(Array.isArray(t)){var r=t;t=r.length,n.push("[");for(var i="",o=0;o<t;o++)n.push(i),sr(e,r[o],n),i=",";return void n.push("]")}if(!(t instanceof String||t instanceof Number||t instanceof Boolean)){for(r in n.push("{"),i="",t)Object.prototype.hasOwnProperty.call(t,r)&&("function"!=typeof(o=t[r])&&(n.push(i),lr(r,n),n.push(":"),sr(e,o,n),i=","));return void n.push("}")}t=t.valueOf()}switch(typeof t){case"string":lr(t,n);break;case"number":n.push(isFinite(t)&&!isNaN(t)?String(t):"null");break;case"boolean":n.push(String(t));break;case"function":n.push("null");break;default:throw Error("Unknown type: "+typeof t)}}}(n=Xn.prototype).add=function(e,t){Jn(this),this.c=null,e=ir(this,e);var n=this.a.get(e);return n||this.a.set(e,n=[]),n.push(t),this.b+=1,this},n.clear=function(){this.a=this.c=null,this.b=0},n.forEach=function(e,t){Jn(this),this.a.forEach((function(n,r){K(n,(function(n){e.call(t,n,r,this)}),this)}),this)},n.Y=function(){Jn(this);for(var e=this.a.X(),t=this.a.Y(),n=[],r=0;r<t.length;r++)for(var i=e[r],o=0;o<i.length;o++)n.push(t[r]);return n},n.X=function(e){Jn(this);var t=[];if("string"===typeof e)tr(this,e)&&(t=J(t,this.a.get(ir(this,e))));else{e=this.a.X();for(var n=0;n<e.length;n++)t=J(t,e[n])}return t},n.set=function(e,t){return Jn(this),this.c=null,tr(this,e=ir(this,e))&&(this.b-=this.a.get(e).length),this.a.set(e,[t]),this.b+=1,this},n.get=function(e,t){return e&&0<(e=this.X(e)).length?String(e[0]):t},n.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var e=[],t=this.a.Y(),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r));r=this.X(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),e.push(a)}}return this.c=e.join("&")};var ur={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},cr=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function lr(e,t){t.push('"',e.replace(cr,(function(e){var t=ur[e];return t||(t="\\u"+(65536|e.charCodeAt(0)).toString(16).substr(1),ur[e]=t),t})),'"')}function fr(){var e=Nr();return $e&&!!ut&&11==ut||/Edge\/\d+/.test(e)}function hr(){return u.window&&u.window.location.href||self&&self.location&&self.location.href||""}function dr(e,t){t=t||u.window;var n="about:blank";e&&(n=Re(Le(e)||Ve)),t.location.href=n}function pr(e,t){var n,r=[];for(n in e)n in t?typeof e[n]!=typeof t[n]?r.push(n):"object"==typeof e[n]&&null!=e[n]&&null!=t[n]?0<pr(e[n],t[n]).length&&r.push(n):e[n]!==t[n]&&r.push(n):r.push(n);for(n in t)n in e||r.push(n);return r}function gr(e){return!!((e=(e||Nr()).toLowerCase()).match(/android/)||e.match(/webos/)||e.match(/iphone|ipad|ipod/)||e.match(/blackberry/)||e.match(/windows phone/)||e.match(/iemobile/))}function vr(e){e=e||u.window;try{e.close()}catch(t){}}function mr(e,t,n){var r=Math.floor(1e9*Math.random()).toString();t=t||500,n=n||600;var i=(window.screen.availHeight-n)/2,o=(window.screen.availWidth-t)/2;for(a in t={width:t,height:n,top:0<i?i:0,left:0<o?o:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},n=Nr().toLowerCase(),r&&(t.target=r,ce(n,"crios/")&&(t.target="_blank")),Cr(Nr())==xr&&(e=e||"http://localhost",t.scrollbars=!0),n=e||"",(e=t)||(e={}),r=window,t=n instanceof Pe?n:Le("undefined"!=typeof n.href?n.href:String(n))||Ve,n=e.target||n.target,i=[],e)switch(a){case"width":case"height":case"top":case"left":i.push(a+"="+e[a]);break;case"target":case"noopener":case"noreferrer":break;default:i.push(a+"="+(e[a]?1:0))}var a=i.join(",");
2if((de("iPhone")&&!de("iPod")&&!de("iPad")||de("iPad")||de("iPod"))&&r.navigator&&r.navigator.standalone&&n&&"_self"!=n?(be(a=vt(document,"A"),"HTMLAnchorElement"),t=t instanceof Pe?t:Fe(t),a.href=Re(t),a.setAttribute("target",n),e.noreferrer&&a.setAttribute("rel","noreferrer"),(e=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,r,1),a.dispatchEvent(e),a={}):e.noreferrer?(a=ze("",r,n,a),e=Re(t),a&&(Xe&&ce(e,";")&&(e="'"+e.replace(/'/g,"%27")+"'"),a.opener=null,e='<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+Ke(e)+'">',e=new Be(e=(r=Ie())?r.createHTML(e):e,null,qe),r=a.document)&&(r.write(function(e){return e instanceof Be&&e.constructor===Be?e.a:(L("expected object of type SafeHtml, got '"+e+"' of type "+d(e)),"type_error:SafeHtml")}(e)),r.close())):(a=ze(t,r,n,a))&&e.noopener&&(a.opener=null),a)try{a.focus()}catch(s){}return a}var yr=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,br=/^[^@]+@[^@]+$/;function _r(){var e=null;return new kt((function(t){"complete"==u.document.readyState?t():(e=function(){t()},dn(window,"load",e))})).o((function(t){throw pn(window,"load",e),t}))}function wr(e){return e=e||Nr(),!("file:"!==Mr()&&"ionic:"!==Mr()||!e.toLowerCase().match(/iphone|ipad|ipod|android/))}function kr(){var e=u.window;try{return!(!e||e==e.top)}catch(t){return!1}}function Er(){return"undefined"!==typeof u.WorkerGlobalScope&&"function"===typeof u.importScripts}function Sr(){return t.default.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":t.default.INTERNAL.hasOwnProperty("node")?"Node":Er()?"Worker":"Browser"}function Ir(){var e=Sr();return"ReactNative"===e||"Node"===e}var xr="Firefox",Tr="Chrome";function Cr(e){var t=e.toLowerCase();return ce(t,"opera/")||ce(t,"opr/")||ce(t,"opios/")?"Opera":ce(t,"iemobile")?"IEMobile":ce(t,"msie")||ce(t,"trident/")?"IE":ce(t,"edge/")?"Edge":ce(t,"firefox/")?xr:ce(t,"silk/")?"Silk":ce(t,"blackberry")?"Blackberry":ce(t,"webos")?"Webos":!ce(t,"safari/")||ce(t,"chrome/")||ce(t,"crios/")||ce(t,"android")?!ce(t,"chrome/")&&!ce(t,"crios/")||ce(t,"edge/")?ce(t,"android")?"Android":(e=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==e.length?e[1]:"Other":Tr:"Safari"}var Or={md:"FirebaseCore-web",od:"FirebaseUI-web"};function Ar(e,t){t=t||[];var n,r=[],i={};for(n in Or)i[Or[n]]=!0;for(n=0;n<t.length;n++)"undefined"!==typeof i[t[n]]&&(delete i[t[n]],r.push(t[n]));return r.sort(),(t=r).length||(t=["FirebaseCore-web"]),"Browser"===(r=Sr())?r=Cr(i=Nr()):"Worker"===r&&(r=Cr(i=Nr())+"-"+r),r+"/JsCore/"+e+"/"+t.join(",")}function Nr(){return u.navigator&&u.navigator.userAgent||""}function Pr(e,t){e=e.split("."),t=t||u;for(var n=0;n<e.length&&"object"==typeof t&&null!=t;n++)t=t[e[n]];return n!=e.length&&(t=void 0),t}function Rr(){try{var e=u.localStorage,t=Br();if(e)return e.setItem(t,"1"),e.removeItem(t),!fr()||!!u.indexedDB}catch(n){return Er()&&!!u.indexedDB}return!1}function jr(){return(Dr()||"chrome-extension:"===Mr()||wr())&&!Ir()&&Rr()&&!Er()}function Dr(){return"http:"===Mr()||"https:"===Mr()}function Mr(){return u.location&&u.location.protocol||null}function Lr(e){return!gr(e=e||Nr())&&Cr(e)!=xr}function Fr(e){return"undefined"===typeof e?null:or(e)}function Ur(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&null!==e[t]&&void 0!==e[t]&&(n[t]=e[t]);return n}function Vr(e){if(null!==e)return JSON.parse(e)}function Br(e){return e||Math.floor(1e9*Math.random()).toString()}function qr(e){return"Safari"!=Cr(e=e||Nr())&&!e.toLowerCase().match(/iphone|ipad|ipod/)}function zr(){var e=u.___jsl;if(e&&e.H)for(var t in e.H)if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=e.H[t].L.concat(),e.CP)for(var n=0;n<e.CP.length;n++)e.CP[n]=null}function Hr(e,t){if(e>t)throw Error("Short delay should be less than long delay!");this.a=e,this.c=t,e=Nr(),t=Sr(),this.b=gr(e)||"ReactNative"===t}function Kr(){var e=u.document;return!e||"undefined"===typeof e.visibilityState||"visible"==e.visibilityState}function Wr(e){try{var t=new Date(parseInt(e,10));if(!isNaN(t.getTime())&&!/[^0-9]/.test(e))return t.toUTCString()}catch(n){}return null}function Gr(){return!(!Pr("fireauth.oauthhelper",u)&&!Pr("fireauth.iframe",u))}Hr.prototype.get=function(){var e=u.navigator;return!e||"boolean"!==typeof e.onLine||!Dr()&&"chrome-extension:"!==Mr()&&"undefined"===typeof e.connection||e.onLine?this.b?this.c:this.a:Math.min(5e3,this.a)};var Yr,$r={};function Qr(e){$r[e]||($r[e]=!0,"undefined"!==typeof console&&"function"===typeof console.warn&&console.warn(e))}try{var Xr={};Object.defineProperty(Xr,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Xr,"abcd",{configurable:!0,enumerable:!0,value:2}),Yr=2==Xr.abcd}catch(ha){Yr=!1}function Jr(e,t,n){Yr?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n}):e[t]=n}function Zr(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&Jr(e,n,t[n])}function ei(e){var t={};return Zr(t,e),t}function ti(e){var t=e;if("object"==typeof e&&null!=e)for(var n in t="length"in e?[]:{},e)Jr(t,n,ti(e[n]));return t}function ni(e){var t=e&&(e[si]?"phone":null);if(!(t&&e&&e[ai]))throw new T("internal-error","Internal assert: invalid MultiFactorInfo object");Jr(this,"uid",e[ai]),Jr(this,"displayName",e[ii]||null);var n=null;e[oi]&&(n=new Date(e[oi]).toUTCString()),Jr(this,"enrollmentTime",n),Jr(this,"factorId",t)}function ri(e){try{var t=new ui(e)}catch(n){t=null}return t}ni.prototype.w=function(){return{uid:this.uid,displayName:this.displayName,factorId:this.factorId,enrollmentTime:this.enrollmentTime}};var ii="displayName",oi="enrolledAt",ai="mfaEnrollmentId",si="phoneInfo";function ui(e){ni.call(this,e),Jr(this,"phoneNumber",e[si])}function ci(e){var t={},n=e[di],r=e[gi],i=e[vi];if(e=ri(e[pi]),!i||i!=fi&&i!=hi&&!n||i==hi&&!r||i==li&&!e)throw Error("Invalid checkActionCode response!");i==hi?(t[yi]=n||null,t[_i]=n||null,t[mi]=r):(t[yi]=r||null,t[_i]=r||null,t[mi]=n||null),t[bi]=e||null,Jr(this,ki,i),Jr(this,wi,ti(t))}I(ui,ni),ui.prototype.w=function(){var e=ui.bb.w.call(this);return e.phoneNumber=this.phoneNumber,e};var li="REVERT_SECOND_FACTOR_ADDITION",fi="EMAIL_SIGNIN",hi="VERIFY_AND_CHANGE_EMAIL",di="email",pi="mfaInfo",gi="newEmail",vi="requestType",mi="email",yi="fromEmail",bi="multiFactorInfo",_i="previousEmail",wi="data",ki="operation";function Ei(e){var t=Vn(e=Bn(e),Si)||null,n=Vn(e,Ii)||null,r=Vn(e,Ci)||null;if(r=r&&Ai[r]||null,!t||!n||!r)throw new T("argument-error",Si+", "+Ii+"and "+Ci+" are required in a valid action code URL.");Zr(this,{apiKey:t,operation:r,code:n,continueUrl:Vn(e,xi)||null,languageCode:Vn(e,Ti)||null,tenantId:Vn(e,Oi)||null})}var Si="apiKey",Ii="oobCode",xi="continueUrl",Ti="languageCode",Ci="mode",Oi="tenantId",Ai={recoverEmail:"RECOVER_EMAIL",resetPassword:"PASSWORD_RESET",revertSecondFactorAddition:li,signIn:fi,verifyAndChangeEmail:hi,verifyEmail:"VERIFY_EMAIL"};function Ni(e){try{return new Ei(e)}catch(t){return null}}function Pi(e){var t=e[Li];if("undefined"===typeof t)throw new T("missing-continue-uri");if("string"!==typeof t||"string"===typeof t&&!t.length)throw new T("invalid-continue-uri");this.h=t,this.b=this.a=null,this.g=!1;var n=e[Ri];if(n&&"object"===typeof n){t=n[Vi];var r=n[Fi];if(n=n[Ui],"string"===typeof t&&t.length){if(this.a=t,"undefined"!==typeof r&&"boolean"!==typeof r)throw new T("argument-error",Fi+" property must be a boolean when specified.");if(this.g=!!r,"undefined"!==typeof n&&("string"!==typeof n||"string"===typeof n&&!n.length))throw new T("argument-error",Ui+" property must be a non empty string when specified.");this.b=n||null}else{if("undefined"!==typeof t)throw new T("argument-error",Vi+" property must be a non empty string when specified.");if("undefined"!==typeof r||"undefined"!==typeof n)throw new T("missing-android-pkg-name")}}else if("undefined"!==typeof n)throw new T("argument-error",Ri+" property must be a non null object when specified.");if(this.f=null,(t=e[Mi])&&"object"===typeof t){if("string"===typeof(t=t[Bi])&&t.length)this.f=t;else if("undefined"!==typeof t)throw new T("argument-error",Bi+" property must be a non empty string when specified.")}else if("undefined"!==typeof t)throw new T("argument-error",Mi+" property must be a non null object when specified.");if("undefined"!==typeof(t=e[Di])&&"boolean"!==typeof t)throw new T("argument-error",Di+" property must be a boolean when specified.");if(this.c=!!t,"undefined"!==typeof(e=e[ji])&&("string"!==typeof e||"string"===typeof e&&!e.length))throw new T("argument-error",ji+" property must be a non empty string when specified.");this.i=e||null}var Ri="android",ji="dynamicLinkDomain",Di="handleCodeInApp",Mi="iOS",Li="url",Fi="installApp",Ui="minimumVersion",Vi="packageName",Bi="bundleId";function qi(e){var t={};for(var n in t.continueUrl=e.h,t.canHandleCodeInApp=e.c,(t.androidPackageName=e.a)&&(t.androidMinimumVersion=e.b,t.androidInstallApp=e.g),t.iOSBundleId=e.f,t.dynamicLinkDomain=e.i,t)null===t[n]&&delete t[n];return t}var zi=null;function Hi(e){var t=[];return function(e,t){function n(t){for(;r<e.length;){var n=e.charAt(r++),i=zi[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return t}!function(){if(!zi){zi={};for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++)for(var r=e.concat(t[n].split("")),i=0;i<r.length;i++){var o=r[i];void 0===zi[o]&&(zi[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;t(i<<2|o>>4),64!=a&&(t(o<<4&240|a>>2),64!=s&&t(a<<6&192|s))}}(e,(function(e){t.push(e)})),t}function Ki(e){var t=Gi(e);if(!(t&&t.sub&&t.iss&&t.aud&&t.exp))throw Error("Invalid JWT");this.h=e,this.a=t.exp,this.i=t.sub,e=Date.now()/1e3,this.g=t.iat||(e>this.a?this.a:e),this.b=t.provider_id||t.firebase&&t.firebase.sign_in_provider||null,this.f=t.firebase&&t.firebase.tenant||null,this.c=!!t.is_anonymous||"anonymous"==this.b}function Wi(e){try{return new Ki(e)}catch(t){return null}}function Gi(e){if(!e)return null;if(3!=(e=e.split(".")).length)return null;for(var t=(4-(e=e[1]).length%4)%4,n=0;n<t;n++)e+=".";try{var r=Hi(e);for(e=[],n=t=0;t<r.length;){var i=r[t++];if(128>i)e[n++]=String.fromCharCode(i);else if(191<i&&224>i){var o=r[t++];e[n++]=String.fromCharCode((31&i)<<6|63&o)}else if(239<i&&365>i){o=r[t++];var a=r[t++],s=((7&i)<<18|(63&o)<<12|(63&a)<<6|63&r[t++])-65536;e[n++]=String.fromCharCode(55296+(s>>10)),e[n++]=String.fromCharCode(56320+(1023&s))}
2else o=r[t++],a=r[t++],e[n++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&a)}return JSON.parse(e.join(""))}catch(u){}return null}Ki.prototype.T=function(){return this.f},Ki.prototype.l=function(){return this.c},Ki.prototype.toString=function(){return this.h};var Yi="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),$i=["client_id","response_type","scope","redirect_uri","state"],Qi={nd:{Ja:"locale",va:700,ua:600,fa:"facebook.com",Ya:$i},pd:{Ja:null,va:500,ua:750,fa:"github.com",Ya:$i},qd:{Ja:"hl",va:515,ua:680,fa:"google.com",Ya:$i},wd:{Ja:"lang",va:485,ua:705,fa:"twitter.com",Ya:Yi},kd:{Ja:"locale",va:640,ua:600,fa:"apple.com",Ya:[]}};function Xi(e){for(var t in Qi)if(Qi[t].fa==e)return Qi[t];return null}function Ji(e){var t={};t["facebook.com"]=ro,t["google.com"]=oo,t["github.com"]=io,t["twitter.com"]=ao;var n=e&&e[eo];try{if(n)return t[n]?new t[n](e):new no(e);if("undefined"!==typeof e[Zi])return new to(e)}catch(r){}return null}var Zi="idToken",eo="providerId";function to(e){var t=e[eo];if(!t&&e[Zi]){var n=Wi(e[Zi]);n&&n.b&&(t=n.b)}if(!t)throw Error("Invalid additional user info!");"anonymous"!=t&&"custom"!=t||(t=null),n=!1,"undefined"!==typeof e.isNewUser?n=!!e.isNewUser:"identitytoolkit#SignupNewUserResponse"===e.kind&&(n=!0),Jr(this,"providerId",t),Jr(this,"isNewUser",n)}function no(e){to.call(this,e),Jr(this,"profile",ti((e=Vr(e.rawUserInfo||"{}"))||{}))}function ro(e){if(no.call(this,e),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function io(e){if(no.call(this,e),"github.com"!=this.providerId)throw Error("Invalid provider ID!");Jr(this,"username",this.profile&&this.profile.login||null)}function oo(e){if(no.call(this,e),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function ao(e){if(no.call(this,e),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");Jr(this,"username",e.screenName||null)}function so(e){var t=Bn(e),n=Vn(t,"link"),r=Vn(Bn(n),"link");return t=Vn(t,"deep_link_id"),Vn(Bn(t),"link")||t||r||n||e}function uo(e,t){if(!e&&!t)throw new T("internal-error","Internal assert: no raw session string available");if(e&&t)throw new T("internal-error","Internal assert: unable to determine the session type");this.a=e||null,this.b=t||null,this.type=this.a?co:lo}I(no,to),I(ro,no),I(io,no),I(oo,no),I(ao,no);var co="enroll",lo="signin";function fo(){}function ho(e,t){return e.then((function(e){if(e[ns]){var n=Wi(e[ns]);if(!n||t!=n.i)throw new T("user-mismatch");return e}throw new T("user-mismatch")})).o((function(e){throw e&&e.code&&e.code==A+"user-not-found"?new T("user-mismatch"):e}))}function po(e,t){if(!t)throw new T("internal-error","failed to construct a credential");this.a=t,Jr(this,"providerId",e),Jr(this,"signInMethod",e)}function go(e){return{pendingToken:e.a,requestUri:"http://localhost"}}function vo(e){if(e&&e.providerId&&e.signInMethod&&0==e.providerId.indexOf("saml.")&&e.pendingToken)try{return new po(e.providerId,e.pendingToken)}catch(t){}return null}function mo(e,t,n){if(this.a=null,t.idToken||t.accessToken)t.idToken&&Jr(this,"idToken",t.idToken),t.accessToken&&Jr(this,"accessToken",t.accessToken),t.nonce&&!t.pendingToken&&Jr(this,"nonce",t.nonce),t.pendingToken&&(this.a=t.pendingToken);else{if(!t.oauthToken||!t.oauthTokenSecret)throw new T("internal-error","failed to construct a credential");Jr(this,"accessToken",t.oauthToken),Jr(this,"secret",t.oauthTokenSecret)}Jr(this,"providerId",e),Jr(this,"signInMethod",n)}function yo(e){var t={};return e.idToken&&(t.id_token=e.idToken),e.accessToken&&(t.access_token=e.accessToken),e.secret&&(t.oauth_token_secret=e.secret),t.providerId=e.providerId,e.nonce&&!e.a&&(t.nonce=e.nonce),t={postBody:Zn(t).toString(),requestUri:"http://localhost"},e.a&&(delete t.postBody,t.pendingToken=e.a),t}function bo(e){if(e&&e.providerId&&e.signInMethod){var t={idToken:e.oauthIdToken,accessToken:e.oauthTokenSecret?null:e.oauthAccessToken,oauthTokenSecret:e.oauthTokenSecret,oauthToken:e.oauthTokenSecret&&e.oauthAccessToken,nonce:e.nonce,pendingToken:e.pendingToken};try{return new mo(e.providerId,t,e.signInMethod)}catch(n){}}return null}function _o(e,t){this.Qc=t||[],Zr(this,{providerId:e,isOAuthProvider:!0}),this.Jb={},this.qb=(Xi(e)||{}).Ja||null,this.pb=null}function wo(e){if("string"!==typeof e||0!=e.indexOf("saml."))throw new T("argument-error",'SAML provider IDs must be prefixed with "saml."');_o.call(this,e,[])}function ko(e){_o.call(this,e,$i),this.a=[]}function Eo(){ko.call(this,"facebook.com")}function So(e){if(!e)throw new T("argument-error","credential failed: expected 1 argument (the OAuth access token).");var t=e;return v(e)&&(t=e.accessToken),(new Eo).credential({accessToken:t})}function Io(){ko.call(this,"github.com")}function xo(e){if(!e)throw new T("argument-error","credential failed: expected 1 argument (the OAuth access token).");var t=e;return v(e)&&(t=e.accessToken),(new Io).credential({accessToken:t})}function To(){ko.call(this,"google.com"),this.Ca("profile")}function Co(e,t){var n=e;return v(e)&&(n=e.idToken,t=e.accessToken),(new To).credential({idToken:n,accessToken:t})}function Oo(){_o.call(this,"twitter.com",Yi)}function Ao(e,t){var n=e;if(v(n)||(n={oauthToken:e,oauthTokenSecret:t}),!n.oauthToken||!n.oauthTokenSecret)throw new T("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new mo("twitter.com",n,"twitter.com")}function No(e,t,n){this.a=e,this.f=t,Jr(this,"providerId","password"),Jr(this,"signInMethod",n===Ro.E
2MAIL_LINK_SIGN_IN_METHOD?Ro.EMAIL_LINK_SIGN_IN_METHOD:Ro.EMAIL_PASSWORD_SIGN_IN_METHOD)}function Po(e){return e&&e.email&&e.password?new No(e.email,e.password,e.signInMethod):null}function Ro(){Zr(this,{providerId:"password",isOAuthProvider:!1})}function jo(e,t){if(!(t=Do(t)))throw new T("argument-error","Invalid email link!");return new No(e,t.code,Ro.EMAIL_LINK_SIGN_IN_METHOD)}function Do(e){return(e=Ni(e=so(e)))&&e.operation===fi?e:null}function Mo(e){if(!(e.fb&&e.eb||e.La&&e.ea))throw new T("internal-error");this.a=e,Jr(this,"providerId","phone"),this.fa="phone",Jr(this,"signInMethod","phone")}function Lo(e){if(e&&"phone"===e.providerId&&(e.verificationId&&e.verificationCode||e.temporaryProof&&e.phoneNumber)){var t={};return K(["verificationId","verificationCode","temporaryProof","phoneNumber"],(function(n){e[n]&&(t[n]=e[n])})),new Mo(t)}return null}function Fo(e){return e.a.La&&e.a.ea?{temporaryProof:e.a.La,phoneNumber:e.a.ea}:{sessionInfo:e.a.fb,code:e.a.eb}}function Uo(e){try{this.a=e||t.default.auth()}catch(n){throw new T("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().")}Zr(this,{providerId:"phone",isOAuthProvider:!1})}function Vo(e,t){if(!e)throw new T("missing-verification-id");if(!t)throw new T("missing-verification-code");return new Mo({fb:e,eb:t})}function Bo(e){if(e.temporaryProof&&e.phoneNumber)return new Mo({La:e.temporaryProof,ea:e.phoneNumber});var t=e&&e.providerId;if(!t||"password"===t)return null;var n=e&&e.oauthAccessToken,r=e&&e.oauthTokenSecret,i=e&&e.nonce,o=e&&e.oauthIdToken,a=e&&e.pendingToken;try{switch(t){case"google.com":return Co(o,n);case"facebook.com":return So(n);case"github.com":return xo(n);case"twitter.com":return Ao(n,r);default:return n||r||o||a?a?0==t.indexOf("saml.")?new po(t,a):new mo(t,{pendingToken:a,idToken:e.oauthIdToken,accessToken:e.oauthAccessToken},t):new ko(t).credential({idToken:o,accessToken:n,rawNonce:i}):null}}catch(s){return null}}function qo(e){if(!e.isOAuthProvider)throw new T("invalid-oauth-provider")}function zo(e,t,n,r,i,o,a){if(this.c=e,this.b=t||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 T("invalid-auth-event");if(this.g&&this.a)throw new T("invalid-auth-event");if(this.g&&!this.f)throw new T("invalid-auth-event")}function Ho(e){return(e=e||{}).type?new zo(e.type,e.eventId,e.urlResponse,e.sessionId,e.error&&C(e.error),e.postBody,e.tenantId):null}function Ko(){this.b=null,this.a=[]}uo.prototype.Ha=function(){return this.a?Ot(this.a):Ot(this.b)},uo.prototype.w=function(){return this.type==co?{multiFactorSession:{idToken:this.a}}:{multiFactorSession:{pendingCredential:this.b}}},fo.prototype.ka=function(){},fo.prototype.b=function(){},fo.prototype.c=function(){},fo.prototype.w=function(){},po.prototype.ka=function(e){return Ss(e,go(this))},po.prototype.b=function(e,t){var n=go(this);return n.idToken=t,Is(e,n)},po.prototype.c=function(e,t){return ho(xs(e,go(this)),t)},po.prototype.w=function(){return{providerId:this.providerId,sign
2InMethod:this.signInMethod,pendingToken:this.a}},mo.prototype.ka=function(e){return Ss(e,yo(this))},mo.prototype.b=function(e,t){var n=yo(this);return n.idToken=t,Is(e,n)},mo.prototype.c=function(e,t){return ho(xs(e,yo(this)),t)},mo.prototype.w=function(){var e={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(e.oauthIdToken=this.idToken),this.accessToken&&(e.oauthAccessToken=this.accessToken),this.secret&&(e.oauthTokenSecret=this.secret),this.nonce&&(e.nonce=this.nonce),this.a&&(e.pendingToken=this.a),e},_o.prototype.Ka=function(e){return this.Jb=ve(e),this},I(wo,_o),I(ko,_o),ko.prototype.Ca=function(e){return $(this.a,e)||this.a.push(e),this},ko.prototype.Rb=function(){return Z(this.a)},ko.prototype.credential=function(e,t){var n;if(!(n=v(e)?{idToken:e.idToken||null,accessToken:e.accessToken||null,nonce:e.rawNonce||null}:{idToken:e||null,accessToken:t||null}).idToken&&!n.accessToken)throw new T("argument-error","credential failed: must provide the ID token and/or the access token.");return new mo(this.providerId,n,this.providerId)},I(Eo,ko),Jr(Eo,"PROVIDER_ID","facebook.com"),Jr(Eo,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),I(Io,ko),Jr(Io,"PROVIDER_ID","github.com"),Jr(Io,"GITHUB_SIGN_IN_METHOD","github.com"),I(To,ko),Jr(To,"PROVIDER_ID","google.com"),Jr(To,"GOOGLE_SIGN_IN_METHOD","google.com"),I(Oo,_o),Jr(Oo,"PROVIDER_ID","twitter.com"),Jr(Oo,"TWITTER_SIGN_IN_METHOD","twitter.com"),No.prototype.ka=function(e){return this.signInMethod==Ro.EMAIL_LINK_SIGN_IN_METHOD?su(e,js,{email:this.a,oobCode:this.f}):su(e,nu,{email:this.a,password:this.f})},No.prototype.b=function(e,t){return this.signInMethod==Ro.EMAIL_LINK_SIGN_IN_METHOD?su(e,Ds,{idToken:t,email:this.a,oobCode:this.f}):su(e,Ys,{idToken:t,email:this.a,password:this.f})},No.prototype.c=function(e,t){return ho(this.ka(e),t)},No.prototype.w=function(){return{email:this.a,password:this.f,signInMethod:this.signInMethod}},Zr(Ro,{PROVIDER_ID:"password"}),Zr(Ro,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Zr(Ro,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Mo.prototype.ka=function(e){return e.gb(Fo(this))},Mo.prototype.b=function(e,t){var n=Fo(this);return n.idToken=t,su(e,iu,n)},Mo.prototype.c=function(e,t){var n=Fo(this);return n.operation="REAUTH",ho(e=su(e,ou,n),t)},Mo.prototype.w=function(){var e={providerId:"phone"};return this.a.fb&&(e.verificationId=this.a.fb),this.a.eb&&(e.verificationCode=this.a.eb),this.a.La&&(e.temporaryProof=this.a.La),this.a.ea&&(e.phoneNumber=this.a.ea),e},Uo.prototype.gb=function(e,t){var n=this.a.a;return Ot(t.verify()).then((function(r){if("string"!==typeof r)throw new T("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(t.type){case"recaptcha":var i=v(e)?e.session:null,o=v(e)?e.phoneNumber:e;return(i&&i.type==co?i.Ha().then((function(e){return function(e,t){return su(e,Qs,t).then((function(e){return e.phoneSessionInfo.sessionInfo}))}(n,{idToken:e,phoneEnrollmentInfo:{phoneNumber:o,recaptchaToken:r}})})):i&&i.type==lo?i.Ha().then((function(t){return function(e,t){return su(e,Xs,t).then((function(e){return e.phoneResponseInfo.sessionInfo}))}(n,{mfaPendingCredential:t,mfaEnrollmentId:e.multiFactorHint&&e.multiFactorHint.uid||e.multiFactorUid,phoneSignInInfo:{recaptchaToken:r}})})):function(e,t){return su(e,Ws,t)}(n,{phoneNumber:o,recaptchaToken:r})).then((function(e){return"function"===typeof t.reset&&t.reset(),e}),(function(e){throw"function"===typeof t.reset&&t.reset(),e}));default:throw new T("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}}))},Zr(Uo,{PROVIDER_ID:"phone"}),Zr(Uo,{PHONE_SIGN_IN_METHOD:"phone"}),zo.prototype.getUid=function(){var e=[];return e.push(this.c),this.b&&e.push(this.b),this.f&&e.push(this.f),this.h&&e.push(this.h),e.join("-")},zo.prototype.T=function(){return this.h},zo.prototype.w=function(){return{type:this.c,eventId:this.b,urlResponse:this.g,sessionId:this.f,postBody:this.i,tenantId:this.h,error:this.a&&this.a.w()}};var Wo,Go=null;function Yo(e){var t="unauthorized-domain",n=void 0,r=Bn(e);e=r.a,"chrome-extension"==(r=r.c)?n=He("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.",e):"http"==r||"https"==r?n=He("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.",e):t="operation-not-supported-in-this-environment",T.call(this,t,n)}function $o(e,t,n){T.call(this,e,n),(e=t||{}).Kb&&Jr(this,"email",e.Kb),e.ea&&Jr(this,"phoneNumber",e.ea),e.credential&&Jr(this,"credential",e.credential),e.$b&&Jr(this,"tenantId",e.$b)}function Qo(e){if(e.code){var t=e.code||"";
20==t.indexOf(A)&&(t=t.substring(A.length));var n={credential:Bo(e),$b:e.tenantId};if(e.email)n.Kb=e.email;else if(e.phoneNumber)n.ea=e.phoneNumber;else if(!n.credential)return new T(t,e.message||void 0);return new $o(t,n,e.message)}return null}function Xo(){}function Jo(e){return e.c||(e.c=e.b())}function Zo(){}function ea(e){if(!e.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var t=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n<t.length;n++){var r=t[n];try{return new ActiveXObject(r),e.f=r}catch(i){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return e.f}function ta(){}function na(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseType=this.responseText=this.response="",this.status=-1,this.statusText="",this.a.onload=k(this.qc,this),this.a.onerror=k(this.Tb,this),this.a.onprogress=k(this.rc,this),this.a.ontimeout=k(this.vc,this)}function ra(e,t){e.readyState=t,e.onreadystatechange&&e.onreadystatechange()}function ia(e,t,n){this.reset(e,t,n,void 0,void 0)}I(Yo,T),I($o,T),$o.prototype.w=function(){var e={code:this.code,message:this.message};this.email&&(e.email=this.email),this.phoneNumber&&(e.phoneNumber=this.phoneNumber),this.tenantId&&(e.tenantId=this.tenantId);var t=this.credential&&this.credential.w();return t&&ye(e,t),e},$o.prototype.toJSON=function(){return this.w()},Xo.prototype.c=null,I(Zo,Xo),Zo.prototype.a=function(){var e=ea(this);return e?new ActiveXObject(e):new XMLHttpRequest},Zo.prototype.b=function(){var e={};return ea(this)&&(e[0]=!0,e[1]=!0),e},Wo=new Zo,I(ta,Xo),ta.prototype.a=function(){var e=new XMLHttpRequest;if("withCredentials"in e)return e;if("undefined"!=typeof XDomainRequest)return new na;throw Error("Unsupported browser")},ta.prototype.b=function(){return{}},(n=na.prototype).open=function(e,t,n){if(null!=n&&!n)throw Error("Only async requests are supported.");this.a.open(e,t)},n.send=function(e){if(e){if("string"!=typeof e)throw Error("Only string data is supported");this.a.send(e)}else this.a.send()},n.abort=function(){this.a.abort()},n.setRequestHeader=function(){},n.getResponseHeader=function(e){return"content-type"==e.toLowerCase()?this.a.contentType:""},n.qc=function(){this.status=200,this.response=this.responseText=this.a.responseText,ra(this,4)},n.Tb=function(){this.status=500,this.response=this.responseText="",ra(this,4)},n.vc=function(){this.Tb()},n.rc=function(){this.status=200,ra(this,1)},n.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType},ia.prototype.a=null;function oa(e){this.f=e,this.b=this.c=this.a=null}function aa(e,t){this.name=e,this.value=t}ia.prototype.reset=function(e,t,n,r,i){"number"==typeof i||0,r||S(),delete this.a},aa.prototype.toString=function(){return this.name};var sa=new aa("SEVERE",1e3),ua=new aa("WARNING",900),ca=new aa("CONFIG",700),la=new aa("FINE",500);function fa(e){return e.c?e.c:e.a?fa(e.a):(L("Root logger has no level set."),null)}oa.prototype.log=function(e,t,n){if(e.value>=fa(this).value)for(g(t)&&(t=t()),e=new ia(e,String(t),this.f),n&&(e.a=n),n=this;n;)n=n.a};var ha,da={},pa=null;function ga(e){var t;if(pa||(pa=new oa(""),da[""]=pa,pa.c=ca),!(t=da[e])){t=new oa(e);var n=e.lastIndexOf("."),r=e.substr(n+1);(n=ga(e.substr(0,n))).b||(n.b={}),n.b[r]=t,t.a=n,da[e]=t}return t}function va(e,t){e&&e.log(la,t,void 0)}function ma(e){this.f=e}function ya(e){En.call(this),this.u=e,this.h=void 0,this.readyState=ba,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.l=new Headers,this.b=null,this.s="GET",this.f="",this.a=!1,this.i=ga("goog.net.FetchXmlHttp"),this.m=this.c=this.g=null}I(ma,Xo),ma.prototype.a=function(){return new ya(this.f)},ma.prototype.b=(ha={},function(){return ha}),I(ya,En);var ba=0;function _a(e){e.c.read().then(e.pc.bind(e)).catch(e.Va.bind(e))}function wa(e){e.readyState=4,e.g=null,e.c=null,e.m=null,ka(e)}function ka(e){e.onreadystatechange&&e.onreadystatechange.call(e)}function Ea(e){En.call(this),this.headers=new Nn,this.D=e||null,this.c=!1,this.C=this.a=null,this.h=this.P=this.l="",this.f=this.N=this.i=this.J=!1,this.g=0,this.s=null,this.m=Sa,this.u=this.S=!1}(n=ya.prototype).open=function(e,t){if(this.readyState!=ba)throw this.abort(),Error("Error reopening a connection");this.s=e,this.f=t,this.readyState=1,ka(this)},n.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var t={headers:this.l,method:this.s,credentials:this.h,cache:void 0};
2e&&(t.body=e),this.u.fetch(new Request(this.f,t)).then(this.uc.bind(this),this.Va.bind(this))},n.abort=function(){this.response=this.responseText="",this.l=new Headers,this.status=0,this.c&&this.c.cancel("Request was aborted."),1<=this.readyState&&this.a&&4!=this.readyState&&(this.a=!1,wa(this)),this.readyState=ba},n.uc=function(e){this.a&&(this.g=e,this.b||(this.status=this.g.status,this.statusText=this.g.statusText,this.b=e.headers,this.readyState=2,ka(this)),this.a&&(this.readyState=3,ka(this),this.a&&("arraybuffer"===this.responseType?e.arrayBuffer().then(this.sc.bind(this),this.Va.bind(this)):"undefined"!==typeof u.ReadableStream&&"body"in e?(this.response=this.responseText="",this.c=e.body.getReader(),this.m=new TextDecoder,_a(this)):e.text().then(this.tc.bind(this),this.Va.bind(this)))))},n.pc=function(e){if(this.a){var t=this.m.decode(e.value?e.value:new Uint8Array(0),{stream:!e.done});t&&(this.response=this.responseText+=t),e.done?wa(this):ka(this),3==this.readyState&&_a(this)}},n.tc=function(e){this.a&&(this.response=this.responseText=e,wa(this))},n.sc=function(e){this.a&&(this.response=e,wa(this))},n.Va=function(e){var t=this.i;t&&t.log(ua,"Failed to fetch url "+this.f,e instanceof Error?e:Error(e)),this.a&&wa(this)},n.setRequestHeader=function(e,t){this.l.append(e,t)},n.getResponseHeader=function(e){return this.b?this.b.get(e.toLowerCase())||"":((e=this.i)&&e.log(ua,"Attempting to get response header but no headers have been received for url: "+this.f,void 0),"")},n.getAllResponseHeaders=function(){if(!this.b){var e=this.i;return e&&e.log(ua,"Attempting to get all response headers but no headers have been received for url: "+this.f,void 0),""}e=[];for(var t=this.b.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(ya.prototype,"withCredentials",{get:function(){return"include"===this.h},set:function(e){this.h=e?"include":"same-origin"}}),I(Ea,En);var Sa="";Ea.prototype.b=ga("goog.net.XhrIo");var Ia=/^https?$/i,xa=["POST","PUT"];function Ta(e,t,n,r,i){if(e.a)throw Error("[goog.net.XhrIo] Object is active with another request="+e.l+"; newUri="+t);n=n?n.toUpperCase():"GET",e.l=t,e.h="",e.P=n,e.J=!1,e.c=!0,e.a=e.D?e.D.a():Wo.a(),e.C=e.D?Jo(e.D):Jo(Wo),e.a.onreadystatechange=k(e.Wb,e);try{va(e.b,Ma(e,"Opening Xhr")),e.N=!0,e.a.open(n,String(t),!0),e.N=!1}catch(a){return va(e.b,Ma(e,"Error opening Xhr: "+a.message)),void Oa(e,a)}t=r||"";var o=new Nn(e.headers);i&&function(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(p(e)||"string"===typeof e)K(e,t,void 0);else for(var n=An(e),r=On(e),i=r.length,o=0;o<i;o++)t.call(void 0,r[o],n&&n[o],e)}(i,(function(e,t){o.set(t,e)})),i=function(e){e:{for(var t=Ca,n=e.length,r="string"===typeof e?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e)){t=i;break e}t=-1}return 0>t?null:"string"===typeof e?e.charAt(t):e[t]}(o.Y()),r=u.FormData&&t instanceof u.FormData,!$(xa,n)||i||r||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach((function(e,t){this.a.setRequestHeader(t,e)}),e),e.m&&(e.a.responseType=e.m),"withCredentials"in e.a&&e.a.withCredentials!==e.S&&(e.a.withCredentials=e.S);try{Ra(e),0<e.g&&(e.u=function(e){return $e&&at(9)&&"number"===typeof e.timeout&&void 0!==e.ontimeout}(e.a),va(e.b,Ma(e,"Will abort after "+e.g+"ms if incomplete, xhr2 "+e.u)),e.u?(e.a.timeout=e.g,e.a.ontimeout=k(e.Ma,e)):e.s=Tn(e.Ma,e.g,e)),va(e.b,Ma(e,"Sending request")),e.i=!0,e.a.send(t),e.i=!1}catch(a){va(e.b,Ma(e,"Send error: "+a.message)),Oa(e,a)}}function Ca(e){return"content-type"==e.toLowerCase()}function Oa(e,t){e.c=!1,e.a&&(e.f=!0,e.a.abort(),e.f=!1),e.h=t,Aa(e),Pa(e)}function Aa(e){e.J||(e.J=!0,e.dispatchEvent("complete"),e.dispatchEvent("error"))}function Na(e){if(e.c&&"undefined"!=typeof s)if(e.C[1]&&4==ja(e)&&2==Da(e))va(e.b,Ma(e,"Local request error detected and ignored"));else if(e.i&&4==ja(e))Tn(e.Wb,0,e);else if(e.dispatchEvent("readystatechange"),4==ja(e)){va(e.b,Ma(e,"Request complete")),e.c=!1;try{var t,n=Da(e);e:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r
2=!0;break e;default:r=!1}if(!(t=r)){var i;if(i=0===n){var o=String(e.l).match(jn)[1]||null;if(!o&&u.self&&u.self.location){var a=u.self.location.protocol;o=a.substr(0,a.length-1)}i=!Ia.test(o?o.toLowerCase():"")}t=i}if(t)e.dispatchEvent("complete"),e.dispatchEvent("success");else{try{var c=2<ja(e)?e.a.statusText:""}catch(l){va(e.b,"Can not get status: "+l.message),c=""}e.h=c+" ["+Da(e)+"]",Aa(e)}}finally{Pa(e)}}}function Pa(e,t){if(e.a){Ra(e);var n=e.a,r=e.C[0]?h:null;e.a=null,e.C=null,t||e.dispatchEvent("ready");try{n.onreadystatechange=r}catch(i){(e=e.b)&&e.log(sa,"Problem encountered resetting onreadystatechange: "+i.message,void 0)}}}function Ra(e){e.a&&e.u&&(e.a.ontimeout=null),e.s&&(u.clearTimeout(e.s),e.s=null)}function ja(e){return e.a?e.a.readyState:0}function Da(e){try{return 2<ja(e)?e.a.status:-1}catch(t){return-1}}function Ma(e,t){return t+" ["+e.P+" "+e.l+" "+Da(e)+"]"}function La(e){var t=Ya;this.g=[],this.u=t,this.s=e||null,this.f=this.a=!1,this.c=void 0,this.v=this.C=this.i=!1,this.h=0,this.b=null,this.l=0}function Fa(e,t,n){e.a=!0,e.c=n,e.f=!t,qa(e)}function Ua(e){if(e.a){if(!e.v)throw new za(e);e.v=!1}}function Va(e,t,n,r){e.g.push([t,n,r]),e.a&&qa(e)}function Ba(e){return Y(e.g,(function(e){return g(e[1])}))}function qa(e){if(e.h&&e.a&&Ba(e)){var t=e.h,n=Wa[t];n&&(u.clearTimeout(n.a),delete Wa[t]),e.h=0}e.b&&(e.b.l--,delete e.b),t=e.c;for(var r=n=!1;e.g.length&&!e.i;){var i=e.g.shift(),o=i[0],a=i[1];if(i=i[2],o=e.f?a:o)try{var s=o.call(i||e.s,t);void 0!==s&&(e.f=e.f&&(s==t||s instanceof Error),e.c=t=s),(j(t)||"function"===typeof u.Promise&&t instanceof u.Promise)&&(r=!0,e.i=!0)}catch(c){t=c,e.f=!0,Ba(e)||(n=!0)}}e.c=t,r&&(s=k(e.m,e,!0),r=k(e.m,e,!1),t instanceof La?(Va(t,s,r),t.C=!0):t.then(s,r)),n&&(t=new Ka(t),Wa[t.a]=t,e.h=t.a)}function za(){D.call(this)}function Ha(){D.call(this)}function Ka(e){this.a=u.setTimeout(k(this.c,this),0),this.b=e}(n=Ea.prototype).Ma=function(){"undefined"!=typeof s&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",va(this.b,Ma(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},n.abort=function(){this.a&&this.c&&(va(this.b,Ma(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Pa(this))},n.Da=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),Pa(this,!0)),Ea.bb.Da.call(this)},n.Wb=function(){this.ya||(this.N||this.i||this.f?Na(this):this.Jc())},n.Jc=function(){Na(this)},n.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.m){case Sa:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var e=this.b;return e&&e.log(sa,"Response type "+this.m+" is not supported on this browser",void 0),null}catch(t){return va(this.b,"Can not get response: "+t.message),null}},La.prototype.cancel=function(e){if(this.a)this.c instanceof La&&this.c.cancel();else{if(this.b){var t=this.b;delete this.b,e?t.cancel(e):(t.l--,0>=t.l&&t.cancel())}this.u?this.u.call(this.s,this):this.v=!0,this.a||(e=new Ha(this),Ua(this),Fa(this,!1,e))}},La.prototype.m=function(e,t){this.i=!1,Fa(this,e,t)},La.prototype.then=function(e,t,n){var r,i,o=new kt((function(e,t){r=e,i=t}));return Va(this,r,(function(e){e instanceof Ha?o.cancel():i(e)})),o.then(e,t,n)},La.prototype.$goog_Thenable=!0,I(za,D),za.prototype.message="Deferred has already fired",za.prototype.name="AlreadyCalledError",I(Ha,D),Ha.prototype.message="Deferred was canceled",Ha.prototype.name="CanceledError",Ka.prototype.c=function(){throw delete Wa[this.a],this.b};var Wa={};function Ga(e){var t={},n=t.document||document,r=Te(e).toString(),i=vt(document,"SCRIPT"),o={Xb:i,Ma:void 0},a=new La(o),s=null,c=null!=t.timeout?t.timeout:5e3;return 0<c&&(s=window.setTimeout((function(){$a(i,!0);var e=new Ja(Xa,"Timeout reached for loading script "+r);Ua(a),Fa(a,!1,e)}),c),o.Ma=s),i.onload=i.onreadystatechange=function(){i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||($a(i,t.xd||!1,s),Ua(a),Fa(a,!0,null))},i.onerror=function(){$a(i,!0,s);var e=new Ja(Qa,"Error while loading script "+r);Ua(a),Fa(a,!1,e)},ye(o=t.attributes||{}
2,{type:"text/javascript",charset:"UTF-8"}),ft(i,o),function(e,t){be(e,"HTMLScriptElement"),e.src=Te(t),(t=e.ownerDocument&&e.ownerDocument.defaultView)&&t!=u?t=f(t.document):(null===l&&(l=f(u.document)),t=l),t&&e.setAttribute("nonce",t)}(i,e),function(e){var t;return(t=(e||document).getElementsByTagName("HEAD"))&&0!=t.length?t[0]:e.documentElement}(n).appendChild(i),a}function Ya(){if(this&&this.Xb){var e=this.Xb;e&&"SCRIPT"==e.tagName&&$a(e,!0,this.Ma)}}function $a(e,t,n){null!=n&&u.clearTimeout(n),e.onload=h,e.onerror=h,e.onreadystatechange=h,t&&window.setTimeout((function(){e&&e.parentNode&&e.parentNode.removeChild(e)}),0)}var Qa=0,Xa=1;function Ja(e,t){var n="Jsloader error (code #"+e+")";t&&(n+=": "+t),D.call(this,n),this.code=e}function Za(e){this.f=e}function es(e,n,r){if(this.c=e,e=n||{},this.l=e.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.m=e.secureTokenTimeout||rs,this.g=ve(e.secureTokenHeaders||is),this.h=e.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.i=e.identityPlatformEndpoint||"https://identitytoolkit.googleapis.com/v2/",this.v=e.firebaseTimeout||os,this.a=ve(e.firebaseHeaders||as),r&&(this.a["X-Client-Version"]=r,this.g["X-Client-Version"]=r),r="Node"==Sr(),!(r=u.XMLHttpRequest||r&&t.default.INTERNAL.node&&t.default.INTERNAL.node.XMLHttpRequest)&&!Er())throw new T("internal-error","The XMLHttpRequest compatibility library was not found.");this.f=void 0,Er()?this.f=new ma(self):Ir()?this.f=new Za(r):this.f=new ta,this.b=null}I(Ja,D),I(Za,Xo),Za.prototype.a=function(){return new this.f},Za.prototype.b=function(){return{}};var ts,ns="idToken",rs=new Hr(3e4,6e4),is={"Content-Type":"application/x-www-form-urlencoded"},os=new Hr(3e4,6e4),as={"Content-Type":"application/json"};function ss(e,t){t?e.a["X-Firebase-Locale"]=t:delete e.a["X-Firebase-Locale"]}function us(e,t){t&&(e.l=cs("https://securetoken.googleapis.com/v1/token",t),e.h=cs("https://www.googleapis.com/identitytoolkit/v3/relyingparty/",t),e.i=cs("https://identitytoolkit.googleapis.com/v2/",t))}function cs(e,t){return e=Bn(e),t=Bn(t.url),e.f=e.a+e.f,Mn(e,t.c),e.a=t.a,Ln(e,t.g),e.toString()}function ls(e,t){t?(e.a["X-Client-Version"]=t,e.g["X-Client-Version"]=t):(delete e.a["X-Client-Version"],delete e.g["X-Client-Version"])}function fs(e,t,n,r,i,o,a){(function(){var e=Nr();return!((e=Cr(e)!=Tr?null:(e=e.match(/\sChrome\/(\d+)/i))&&2==e.length?parseInt(e[1],10):null)&&30>e)&&(!$e||!ut||9<ut)})()||Er()?e=k(e.u,e):(ts||(ts=new kt((function(e,t){!function(e,t){if(((window.gapi||{}).client||{}).request)e();else{u[ds]=function(){((window.gapi||{}).client||{}).request?e():t(Error("CORS_UNSUPPORTED"))},function(e,t){Va(e,null,t,void 0)}(Ga(Ce(hs,{onload:ds})),(function(){t(Error("CORS_UNSUPPORTED"))}))}}(e,t)}))),e=k(e.s,e)),e(t,n,r,i,o,a)}es.prototype.T=function(){return this.b},es.prototype.u=function(e,t,n,r,i,o){if(Er()&&("undefined"===typeof u.fetch||"undefined"===typeof u.Headers||"undefined"===typeof u.Request))throw new T("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 Ea(this.f);if(o){a.g=Math.max(0,o);var s=setTimeout((function(){a.dispatchEvent("timeout")}),o)}Sn(a,"complete",(function(){s&&clearTimeout(s);var e=null;try{e=JSON.parse(function(e){try{return e.a?e.a.responseText:""}catch(t){return va(e.b,"Can not get responseText: "+t.message),""}}(this))||null}catch(n){e=null}t&&t(e)})),In(a,"ready",(function(){s&&clearTimeout(s),Gt(this)})),In(a,"timeout",(function(){s&&clearTimeout(s),Gt(this),t&&t(null)})),Ta(a,e,n,r,i)};var hs=new _e(Se,"https://apis.google.com/js/client.js?onload=%{onload}"),ds="__fcb"+Math.floor(1e6*Math.random()).toString();function ps(e,t,n,r,i,o,a){var s=Bn(t+n);Un(s,"key",e.c),a&&Un(s,"cb",Date.now().toString());var u="GET"==r;if(u)for(var c in i)i.hasOwnProperty(c)&&Un(s,c,i[c]);return new kt((function(t,n){fs(e,s.toString(),(function(e){e?e.error?n(cu(e,o||{})):t(e):n(new T("network-request-failed"))}),r,u?void 0:or(Ur(i)),e.a,e.v.get())}))}function gs(e){if("string"!==typeof(e=e.email)||!br.test(e))throw new T("invalid-email")}function vs(e){"email"in e&&gs(e)}function ms(e){if(!e[ns]){if(e.mfaPendingCredential)throw new T("multi-factor-auth-required",null,ve(e));throw new T("internal-error")}}function ys(e){if(e.phoneNumber||e.temporaryProof){if(!e.phoneNumber||!e.temporaryProof)throw new T("internal-error")}else{if(!e.sessionInfo)throw new T("missing-verification-id");if(!e.code)throw new T("missing-verification-code")}}es.prototype.s=function(e,t,n,r,i){var o=this;ts.then((function(){window.gapi.client.setApiKey(o.c);var a=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:e,method:n,body:r,headers:i,authType:"none",callback:function(e){window.gapi.auth.setToken(a),t&&t(e)}})})).o((function(e){t&&t({error:{message:e&&e.message||"CORS_UNSUPPORTED"}})}))},es.prototype.Ab=function(){return su(this,$s,{})},es.prototype.Cb=function(e,t){return su(this,Gs,{idToken:e,email:t})},es.prototype.Db=function(e,t){return su(this,Ys,{idToken:e,password:t})};
2var bs={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};function _s(e){if(!e.phoneVerificationInfo)throw new T("internal-error");if(!e.phoneVerificationInfo.sessionInfo)throw new T("missing-verification-id");if(!e.phoneVerificationInfo.code)throw new T("missing-verification-code")}function ws(e){if(!e.requestUri||!e.sessionId&&!e.postBody&&!e.pendingToken)throw new T("internal-error")}function ks(e,t){return t.oauthIdToken&&t.providerId&&0==t.providerId.indexOf("oidc.")&&!t.pendingToken&&(e.sessionId?t.nonce=e.sessionId:e.postBody&&(tr(e=new Xn(e.postBody),"nonce")&&(t.nonce=e.get("nonce")))),t}function Es(e){var t=null;if(e.needConfirmation?(e.code="account-exists-with-different-credential",t=Qo(e)):"FEDERATED_USER_ID_ALREADY_LINKED"==e.errorMessage?(e.code="credential-already-in-use",t=Qo(e)):"EMAIL_EXISTS"==e.errorMessage?(e.code="email-already-in-use",t=Qo(e)):e.errorMessage&&(t=uu(e.errorMessage)),t)throw t;ms(e)}function Ss(e,t){return t.returnIdpCredential=!0,su(e,Js,t)}function Is(e,t){return t.returnIdpCredential=!0,su(e,eu,t)}function xs(e,t){return t.returnIdpCredential=!0,t.autoCreate=!1,su(e,Zs,t)}function Ts(e){if(!e.oobCode)throw new T("invalid-action-code")}(n=es.prototype).Eb=function(e,t){var n={idToken:e},r=[];return pe(bs,(function(e,i){var o=t[i];null===o?r.push(e):i in t&&(n[i]=o)})),r.length&&(n.deleteAttribute=r),su(this,Gs,n)},n.wb=function(e,t){return ye(e={requestType:"PASSWORD_RESET",email:e},t),su(this,qs,e)},n.xb=function(e,t){return ye(e={requestType:"EMAIL_SIGNIN",email:e},t),su(this,Us,e)},n.vb=function(e,t){return ye(e={requestType:"VERIFY_EMAIL",idToken:e},t),su(this,Vs,e)},n.Fb=function(e,t,n){return ye(e={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:e,newEmail:t},n),su(this,Bs,e)},n.gb=function(e){return su(this,ru,e)},n.ob=function(e,t){return su(this,Ks,{oobCode:e,newPassword:t})},n.Sa=function(e){return su(this,Os,{oobCode:e})},n.kb=function(e){return su(this,Cs,{oobCode:e})};var Cs={endpoint:"setAccountInfo",A:Ts,Z:"email",B:!0},Os={endpoint:"resetPassword",A:Ts,G:function(e){var t=e.requestType;if(!t||!e.email&&"EMAIL_SIGNIN"!=t&&"VERIFY_AND_CHANGE_EMAIL"!=t)throw new T("internal-error")},B:!0},As={endpoint:"signupNewUser",A:function(e){if(gs(e),!e.password)throw new T("weak-password")},G:ms,V:!0,B:!0},Ns={endpoint:"createAuthUri",B:!0},Ps={endpoint:"deleteAccount",O:["idToken"]},Rs={endpoint:"setAccountInfo",O:["idToken","deleteProvider"],A:function(e){if(!Array.isArray(e.deleteProvider))throw new T("internal-error")}},js={endpoint:"emailLinkSignin",O:["email","oobCode"],A:gs,G:ms,V:!0,B:!0},Ds={endpoint:"emailLinkSignin",O:["idToken","email","oobCode"],A:gs,G:ms,V:!0},Ms={endpoint:"accounts/mfaEnrollment:finalize",O:["idToken","phoneVerificationInfo"],A:_s,G:ms,B:!0,Na:!0},Ls={endpoint:"accounts/mfaSignIn:finalize",O:["mfaPendingCredential","phoneVerificationInfo"],A:_s,G:ms,B:!0,Na:!0},Fs={endpoint:"getAccountInfo"},Us={endpoint:"getOobConfirmationCode",O:["requestType"],A:function(e){if("EMAIL_SIGNIN"!=e.requestType)throw new T("internal-error");gs(e)},Z:"email",B:!0},Vs={endpoint:"getOobConfirmationCode",O:["idToken","requestType"],A:function(e){if("VERIFY_EMAIL"!=e.requestType)throw new T("internal-error")},Z:"email",B:!0},Bs={endpoint:"getOobConfirmationCode",O:["idToken","newEmail","requestType"],A:function(e){if("VERIFY_AND_CHANGE_EMAIL"!=e.requestType)throw new T("internal-error")},Z:"email",B:!0},qs={endpoint:"getOobConfirmationCode",O:["requestType"],A:function(e){if("PASSWORD_RESET"!=e.requestType)throw new T("internal-error");gs(e)},Z:"email",B:!0},zs={mb:!0,endpoint:"getProjectConfig",Vb:"GET"},Hs={mb:!0,endpoint:"getRecaptchaParam",Vb:"GET",G:function(e){if(!e.recaptchaSiteKey)throw new T("internal-error")}},Ks={endpoint:"resetPassword",A:Ts,Z:"email",B:!0},Ws={endpoint:"sendVerificationCode",O:["phoneNumber","recaptchaToken"],Z:"sessionInfo",B:!0},Gs={endpoint:"setAccountInfo",O:["idToken"],A:vs,V:!0},Ys={endpoint:"setAccountInfo",O:["idToken"],A:function(e){if(vs(e),!e.password)throw new T("weak-password")},G:ms,V:!0},$s={endpoint:"signupNewUser",G:ms,V:!0,B:!0},Qs={endpoint:"accounts/mfaEnrollment:start",O:["idToken","phoneEnrollmentInfo"],A:function(e){if(!e.phoneEnrollmentInfo)throw new T("internal-error");
2if(!e.phoneEnrollmentInfo.phoneNumber)throw new T("missing-phone-number");if(!e.phoneEnrollmentInfo.recaptchaToken)throw new T("missing-app-credential")},G:function(e){if(!e.phoneSessionInfo||!e.phoneSessionInfo.sessionInfo)throw new T("internal-error")},B:!0,Na:!0},Xs={endpoint:"accounts/mfaSignIn:start",O:["mfaPendingCredential","mfaEnrollmentId","phoneSignInInfo"],A:function(e){if(!e.phoneSignInInfo||!e.phoneSignInInfo.recaptchaToken)throw new T("missing-app-credential")},G:function(e){if(!e.phoneResponseInfo||!e.phoneResponseInfo.sessionInfo)throw new T("internal-error")},B:!0,Na:!0},Js={endpoint:"verifyAssertion",A:ws,Za:ks,G:Es,V:!0,B:!0},Zs={endpoint:"verifyAssertion",A:ws,Za:ks,G:function(e){if(e.errorMessage&&"USER_NOT_FOUND"==e.errorMessage)throw new T("user-not-found");if(e.errorMessage)throw uu(e.errorMessage);ms(e)},V:!0,B:!0},eu={endpoint:"verifyAssertion",A:function(e){if(ws(e),!e.idToken)throw new T("internal-error")},Za:ks,G:Es,V:!0},tu={endpoint:"verifyCustomToken",A:function(e){if(!e.token)throw new T("invalid-custom-token")},G:ms,V:!0,B:!0},nu={endpoint:"verifyPassword",A:function(e){if(gs(e),!e.password)throw new T("wrong-password")},G:ms,V:!0,B:!0},ru={endpoint:"verifyPhoneNumber",A:ys,G:ms,B:!0},iu={endpoint:"verifyPhoneNumber",A:function(e){if(!e.idToken)throw new T("internal-error");ys(e)},G:function(e){if(e.temporaryProof)throw e.code="credential-already-in-use",Qo(e);ms(e)}},ou={Ib:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",A:ys,G:ms,B:!0},au={endpoint:"accounts/mfaEnrollment:withdraw",O:["idToken","mfaEnrollmentId"],G:function(e){if(!!e[ns]^!!e.refreshToken)throw new T("internal-error")},B:!0,Na:!0};function su(e,t,n){if(!function(e,t){if(!t||!t.length)return!0;if(!e)return!1;for(var n=0;n<t.length;n++){var r=e[t[n]];if(void 0===r||null===r||""===r)return!1}return!0}(n,t.O))return At(new T("internal-error"));var r,i=!!t.Na,o=t.Vb||"POST";return Ot(n).then(t.A).then((function(){return t.V&&(n.returnSecureToken=!0),t.B&&e.b&&"undefined"===typeof n.tenantId&&(n.tenantId=e.b),ps(e,i?e.i:e.h,t.endpoint,o,n,t.Ib,t.mb||!1)})).then((function(e){return r=e,t.Za?t.Za(n,r):r})).then(t.G).then((function(){if(!t.Z)return r;if(!(t.Z in r))throw new T("internal-error");return r[t.Z]}))}function uu(e){return cu({error:{errors:[{message:e}],code:400,message:e}})}function cu(e,t){var n=(e.error&&e.error.errors&&e.error.errors[0]||{}).reason||"",r={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(n=r[n]?new T(r[n]):null)return n;for(var i in n=e.error&&e.error.message||"",ye(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"},t||{}),t=(t=n.match(/^[^\s]+\s*:\s*([\s\S]*)$/))&&1<t.length?t[1]:void 0,r)if(0===n.indexOf(i))return new T(r[i],t);return!t&&e&&(t=Fr(e)),new T("internal-error",t)}function lu(e){this.b=e,this.a=null,this.sb=function(e){return(pu||(pu=new kt((function(e,t){function n(){zr(),Pr("gapi.load")("gapi.iframes",{callback:e,ontimeout:function(){zr(),t(Error("Network Error"))},timeout:hu.get()})}if(Pr("gapi.iframes.Iframe"))e();else if(Pr("gapi.load"))n();else{var r="__iframefcb"+Math.floor(1e6*Math.random()).toString();u[r]=function(){Pr("gapi.load")?n():t(Error("Network Error"))},Ot(Ga(r=Ce(fu,{onload:r}))).o((function(){t(Error("Network Error"))}))}})).o((function(e){throw pu=null,e})))).then((function(){return new kt((function(t,n){Pr("gapi.iframes.getContext")().open({where:document.body,url:e.b,messageHandlersFilter:Pr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},(function(r){function i(){clearTimeout(o),t()}e.a=r,e.a.restyle({setHideOnLeave:!1});var o=setTimeout((function(){n(Error("Network Error"))}),du.get());r.ping(i).then(i,(function(){n(Error("Network Error"))}))}))}))}))}(this)}var fu=new _e(Se,"https://apis.google.com/js/api.js?onload=%{onload}"),hu=new Hr(3e4,6e4),du=new Hr(5e3,15e3),pu=null;function gu(e,t,n,r){this.l=e,this.h=t,this.i=n,this.g=r,this.f=null,this.g?e=qn((e=Bn(this.g.url)).c,e.a,e.g,"/emulator/auth/iframe"):e=qn("https",this.l,null,"/__/auth/iframe"),this.a=e,Un(this.a,"apiKey",this.h),Un(this.a,"appName",this.i),this.b=null,this.c=[]}function vu(e,t,n,r,i,o){this.u=e,this.s=t,this.c=n,this.m=r,this.v=o,this.i=this.g=this.l=null,this.a=i,this.h=this.f=null}function mu(e){try{return t.default.app(e).auth().Ga()}catch(n){return[]}}function yu(e,t,n,r,i,o){this.s=e,this.g=t,this.b=n,this.f=o,this.c=r||null,this.i=i||null,this.l=this.u=this.C=null,this.h=[],this.m=this.a=null}function bu(e){var t=hr();return function(e){return su(e,zs,{}).then((function(e){return e.authorizedDomains||[]}))}(e).then((function(e){e:{var n=Bn(t),r=n.c;n=n.a;for(var i=0;i<e.length;i++){var o=e[i],a=n,s=r;if(0==o.indexOf("chrome-extension://")?a=Bn(o).a==a&&"chrome-extension"==s:"http"!=s&&"https"!=s?a=!1:yr.test(o)?a=a==o:(o=o.split(".").join("\\."),a=new RegExp("^(.+\\."+o+"|"+o+")$","i").test(a)),a){e=!0;break e}}e=!1}if(!e)throw new Yo(hr())}))}function _u(e){return e.m||(e.m=_r().then((function(){if(!e.u){var t=e.c,n=e.i,r=mu(e.b),i=new gu(e.s,e.g,e.b,e.f);i.f=t,i.b=n,i.c=Z(r||[]),e.u=i.toString()}e.v=new lu(e.u),function(e){if(!e.v)throw Error("IfcHandler must be initialized!");!function(e,t){e.sb.then((function(){e.a.register("authEvent",t,Pr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}(e.v,(function(t){var n={};if(t&&t.authEvent){var r=!1;for(t=Ho(t.authEvent),n=0;n<e.h.length;n++)r=e.h[n](t)||r;return(n={}).status=r?"ACK":"ERROR",Ot(n)}return n.status="ERROR",Ot(n)}))}(e)}))),e.m}function wu(e){return e.l||(e.C=e.c?Ar(e.c,mu(e.b)):null,e.l=new es(e.g,R(e.i),e.C),e.f&&us(e.l,e.f)),e.l}function ku(e,t,n,r,i,o,a,s,u,c,l,f){return(e=new vu(e,t,n,r,i,f)).l=o,e.g=a,e.i=s,e.b=ve(u||null),e.f=c,e.zb(l).toString()}function Eu(e){if(this.a=e||t.default.INTERNAL.reactNative&&t.default.INTERNAL.reactNative.AsyncStorage,!this.a)throw new T("internal-error","The React Native compatibility library was not found.");this.type="asyncStorage"}function Su(e){this.b=e,this.a={},this.f=k(this.c,this)}gu.prototype.toString=function(){return this.f?Un(this.a,"v",this.f):er(this.a.b,"v"),this.b?Un(this.a,"eid",this.b):er(this.a.b,"eid"),this.c.length?Un(this.a,"fw",this.c.join(",")):er(this.a.b,"fw"),this.a.toString()},vu.prototype.zb=function(e){return this.h=e,this},vu.prototype.toString=function(){if(this.v){var e=Bn(this.v.url);e=qn(e.c,e.a,e.g,"/emulator/auth/handler")}else e=qn("https",this.u,null,"/__/auth/handler");
2if(Un(e,"apiKey",this.s),Un(e,"appName",this.c),Un(e,"authType",this.m),this.a.isOAuthProvider){var n=this.a;try{var r=t.default.app(this.c).auth().la()}catch(u){r=null}for(var i in n.pb=r,Un(e,"providerId",this.a.providerId),n=Ur((r=this.a).Jb))n[i]=n[i].toString();i=r.Qc,n=ve(n);for(var o=0;o<i.length;o++){var a=i[o];a in n&&delete n[a]}r.qb&&r.pb&&!n[r.qb]&&(n[r.qb]=r.pb),ge(n)||Un(e,"customParameters",Fr(n))}if("function"===typeof this.a.Rb&&((r=this.a.Rb()).length&&Un(e,"scopes",r.join(","))),this.l?Un(e,"redirectUrl",this.l):er(e.b,"redirectUrl"),this.g?Un(e,"eventId",this.g):er(e.b,"eventId"),this.i?Un(e,"v",this.i):er(e.b,"v"),this.b)for(var s in this.b)this.b.hasOwnProperty(s)&&!Vn(e,s)&&Un(e,s,this.b[s]);return this.h?Un(e,"tid",this.h):er(e.b,"tid"),this.f?Un(e,"eid",this.f):er(e.b,"eid"),(s=mu(this.c)).length&&Un(e,"fw",s.join(",")),e.toString()},(n=yu.prototype).Pb=function(e,t,n){var r=new T("popup-closed-by-user"),i=new T("web-storage-unsupported"),o=this,a=!1;return this.ma().then((function(){(function(e){var t={type:"webStorageSupport"};return _u(e).then((function(){return function(e,t){return e.sb.then((function(){return new kt((function(n){e.a.send(t.type,t,n,Pr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}))}(e.v,t)})).then((function(e){if(e&&e.length&&"undefined"!==typeof e[0].webStorageSupport)return e[0].webStorageSupport;throw Error()}))})(o).then((function(n){n||(e&&vr(e),t(i),a=!0)}))})).o((function(){})).then((function(){if(!a)return function(e){return new kt((function(t){return function n(){Cn(2e3).then((function(){if(e&&!e.closed)return n();t()}))}()}))}(e)})).then((function(){if(!a)return Cn(n).then((function(){t(r)}))}))},n.Yb=function(){var e=Nr();return!Lr(e)&&!qr(e)},n.Ub=function(){return!1}
2,n.Nb=function(e,t,n,r,i,o,a,s){if(!e)return At(new T("popup-blocked"));if(a&&!Lr())return this.ma().o((function(t){vr(e),i(t)})),r(),Ot();this.a||(this.a=bu(wu(this)));var u=this;return this.a.then((function(){var t=u.ma().o((function(t){throw vr(e),i(t),t}));return r(),t})).then((function(){(qo(n),a)||dr(ku(u.s,u.g,u.b,t,n,null,o,u.c,void 0,u.i,s,u.f),e)})).o((function(e){throw"auth/network-request-failed"==e.code&&(u.a=null),e}))},n.Ob=function(e,t,n,r){this.a||(this.a=bu(wu(this)));var i=this;return this.a.then((function(){qo(t),dr(ku(i.s,i.g,i.b,e,t,hr(),n,i.c,void 0,i.i,r,i.f))})).o((function(e){throw"auth/network-request-failed"==e.code&&(i.a=null),e}))},n.ma=function(){var e=this;return _u(this).then((function(){return e.v.sb})).o((function(){throw e.a=null,new T("network-request-failed")}))},n.ac=function(){return!0},n.Ea=function(e){this.h.push(e)},n.Ta=function(e){X(this.h,(function(t){return t==e}))},(n=Eu.prototype).get=function(e){return Ot(this.a.getItem(e)).then((function(e){return e&&Vr(e)}))},n.set=function(e,t){return Ot(this.a.setItem(e,Fr(t)))},n.U=function(e){return Ot(this.a.removeItem(e))},n.ca=function(){},n.ia=function(){};var Iu,xu=[];function Tu(e,t,n){ge(e.a)&&e.b.addEventListener("message",e.f),"undefined"===typeof e.a[t]&&(e.a[t]=[]),e.a[t].push(n)}function Cu(e){this.a=e}function Ou(e){this.c=e,this.b=!1,this.a=[]}function Au(e,t,n,r){var i,o,a,s,u=n||{},c=null;if(e.b)return At(Error("connection_unavailable"));var l=r?800:50,f="undefined"!==typeof MessageChannel?new MessageChannel:null;return new kt((function(n,r){f?(i=Math.floor(Math.random()*Math.pow(10,20)).toString(),f.port1.start(),a=setTimeout((function(){r(Error("unsupported_event"))}),l),c={messageChannel:f,onMessage:o=function(e){e.data.eventId===i&&("ack"===e.data.status?(clearTimeout(a),s=setTimeout((function(){r(Error("timeout"))}),3e3)):"done"===e.data.status?(clearTimeout(s),"undefined"!==typeof e.data.response?n(e.data.response):r(Error("unknown_error"))):(clearTimeout(a),clearTimeout(s),r(Error("invalid_response"))))}},e.a.push(c),f.port1.addEventListener("message",o),e.c.postMessage({eventType:t,eventId:i,data:u},[f.port2])):r(Error("connection_unavailable"))})).then((function(t){return Nu(e,c),t})).o((function(t){throw Nu(e,c),t}))}function Nu(e,t){if(t){var n=t.messageChannel,r=t.onMessage;n&&(n.port1.removeEventListener("message",r),n.port1.close()),X(e.a,(function(e){return e==t}))}}function Pu(){if(!Mu())throw new T("web-storage-unsupported");this.c={},this.a=[],this.b=0,this.m=u.indexedDB,this.type="indexedDB",this.g=this.v=this.f=this.l=null,this.s=!1,this.h=null;var e=this;Er()&&self?(this.v=function(){var e=Er()?self:null;if(K(xu,(function(n){n.b==e&&(t=n)})),!t){var t=new Su(e);xu.push(t)}return t}(),Tu(this.v,"keyChanged",(function(t,n){return Bu(e).then((function(t){return 0<t.length&&K(e.a,(function(e){e(t)})),{keyProcessed:$(t,n.key)}}))})),Tu(this.v,"ping",(function(){return Ot(["keyChanged"])}))):function(){var e=u.navigator;return e&&e.serviceWorker?Ot().then((function(){return e.serviceWorker.ready})).then((function(e){return e.active||null})).o((function(){return null})):Ot(null)}().then((function(t){(e.h=t)&&(e.g=new Ou(new Cu(t)),Au(e.g,"ping",null,!0).then((function(t){t[0].fulfilled&&$(t[0].value,"keyChanged")&&(e.s=!0)})).o((function(){})))}))}function Ru(e){return new kt((function(t,n){var r=e.m.open("firebaseLocalStorageDb",1);r.onerror=function(e){try{e.preventDefault()}catch(t){}n(Error(e.target.error))},r.onupgradeneeded=function(e){e=e.target.result;try{e.createObjectStore("firebaseLocalStorage",{keyPath:"fbase_key"})}catch(t){n(t)}},r.onsuccess=function(r){(r=r.target.result).objectStoreNames.contains("firebaseLocalStorage")?t(r):function(e){return new kt((function(t,n){var r=e.m.deleteDatabase("firebaseLocalStorageDb");r.onsuccess=function(){t()},r.onerror=function(e){n(Error(e.target.error))}}))}(e).then((function(){return Ru(e)})).then((function(e){t(e)})).o((function(e){n(e)}))}}))}function ju(e){return e.i||(e.i=Ru(e)),e.i}function Du(e,t){var n=0;return new kt((function r(i,o){ju(e).then(t).then(i).o((function(t){if(!(3<++n))return ju(e).then((function(t){return t.close(),e.
2i=void 0,r(i,o)})).o((function(e){o(e)}));o(t)}))}))}function Mu(){try{return!!u.indexedDB}catch(ha){return!1}}function Lu(e){return e.objectStore("firebaseLocalStorage")}function Fu(e,t){return e.transaction(["firebaseLocalStorage"],t?"readwrite":"readonly")}function Uu(e){return new kt((function(t,n){e.onsuccess=function(e){e&&e.target?t(e.target.result):t()},e.onerror=function(e){n(e.target.error)}}))}function Vu(e,t){return e.g&&e.h&&function(){var e=u.navigator;return e&&e.serviceWorker&&e.serviceWorker.controller||null}()===e.h?Au(e.g,"keyChanged",{key:t},e.s).then((function(){})).o((function(){})):Ot()}function Bu(e){return ju(e).then((function(e){var t=Lu(Fu(e,!1));return t.getAll?Uu(t.getAll()):new kt((function(e,n){var r=[],i=t.openCursor();i.onsuccess=function(t){(t=t.target.result)?(r.push(t.value),t.continue()):e(r)},i.onerror=function(e){n(e.target.error)}}))})).then((function(t){var n={},r=[];if(0==e.b){for(r=0;r<t.length;r++)n[t[r].fbase_key]=t[r].value;r=pr(e.c,n),e.c=n}return r}))}function qu(e){e.l&&e.l.cancel("STOP_EVENT"),e.f&&(clearTimeout(e.f),e.f=null)}function zu(e){var t=this,n=null;this.a=[],this.type="indexedDB",this.c=e,this.b=Ot().then((function(){if(Mu()){var e=Br(),r="__sak"+e;return Iu||(Iu=new Pu),(n=Iu).set(r,e).then((function(){return n.get(r)})).then((function(t){if(t!==e)throw Error("indexedDB not supported!");return n.U(r)})).then((function(){return n})).o((function(){return t.c}))}return t.c})).then((function(e){return t.type=e.type,e.ca((function(e){K(t.a,(function(t){t(e)}))})),e}))}function Hu(){this.a={},this.type="inMemory"}function Ku(){if(!function(){var e="Node"==Sr();if(!(e=Wu()||e&&t.default.INTERNAL.node&&t.default.INTERNAL.node.localStorage))return!1;try{return e.setItem("__sak","1"),e.removeItem("__sak"),!0}catch(n){return!1}}()){if("Node"==Sr())throw new T("internal-error","The LocalStorage compatibility library was not found.");throw new T("web-storage-unsupported")}this.a=Wu()||t.default.INTERNAL.node.localStorage,this.type="localStorage"}function Wu(){try{var e=u.localStorage,t=Br();return e&&(e.setItem(t,"1"),e.removeItem(t)),e}catch(n){return null}}function Gu(){this.type="nullStorage"}function Yu(){if(!function(){var e="Node"==Sr();if(!(e=$u()||e&&t.default.INTERNAL.node&&t.default.INTERNAL.node.sessionStorage))return!1;try{return e.setItem("__sak","1"),e.removeItem("__sak"),!0}catch(n){return!1}}()){if("Node"==Sr())throw new T("internal-error","The SessionStorage compatibility library was not found.");throw new T("web-storage-unsupported")}this.a=$u()||t.default.INTERNAL.node.sessionStorage,this.type="sessionStorage"}function $u(){try{var e=u.sessionStorage,t=Br();return e&&(e.setItem(t,"1"),e.removeItem(t)),e}catch(n){return null}}function Qu(){var e={};e.Browser=Zu,e.Node=ec,e.ReactNative=tc,e.Worker=nc,this.a=e[Sr()]}Su.prototype.c=function(e){var t=e.data.eventType,n=e.data.eventId,r=this.a[t];if(r&&0<r.length){e.ports[0].postMessage({status:"ack",eventId:n,eventType:t,response:null});var i=[];K(r,(function(t){i.push(Ot().then((function(){return t(e.origin,e.data.data)})))})),Pt(i).then((function(r){var i=[];K(r,(function(e){i.push({fulfilled:e.Qb,value:e.value,reason:e.reason?e.reason.message:void 0})})),K(i,(function(e){for(var t in e)"undefined"===typeof e[t]&&delete e[t]})),e.ports[0].postMessage({status:"done",eventId:n,eventType:t,response:i})}))}},Cu.prototype.postMessage=function(e,t){this.a.postMessage(e,t)},Ou.prototype.close=function(){for(;0<this.a.length;)Nu(this,this.a[0]);this.b=!0},(n=Pu.prototype).set=function(e,t){var n=this,r=!1;return Du(this,(function(t){return Uu((t=Lu(Fu(t,!0))).get(e))})).then((function(i){return Du(n,(function(o){if(o=Lu(Fu(o,!0)),i)return i.value=t,Uu(o.put(i));n.b++,r=!0;var a={};return a.fbase_key=e,a.value=t,Uu(o.add(a))}))})).then((function(){return n.c[e]=t,Vu(n,e)})).oa((function(){r&&n.b--}))},n.get=function(e){return Du(this,(function(t){return Uu(Lu(Fu(t,!1)).get(e))})).then((function(e){return e&&e.value}))},n.U=function(e){var t=this,n=!1;return Du(this,(function(r){return n=!0,t.b++,Uu(Lu(Fu(r,!0)).delete(e))})).then((function(){return delete t.c[e],Vu(t,e)})).oa((function(){n&&t.b--}))},n.ca=function(e){0==this.a.length&&function(e){function t(){e.f=setTimeout((function(){e.l=Bu(e).then((function(t){0<t.length&&K(e.a,(function(e){e(t)}))}
2)).then((function(){t()})).o((function(e){"STOP_EVENT"!=e.message&&t()}))}),800)}qu(e),t()}(this),this.a.push(e)},n.ia=function(e){X(this.a,(function(t){return t==e})),0==this.a.length&&qu(this)},(n=zu.prototype).get=function(e){return this.b.then((function(t){return t.get(e)}))},n.set=function(e,t){return this.b.then((function(n){return n.set(e,t)}))},n.U=function(e){return this.b.then((function(t){return t.U(e)}))},n.ca=function(e){this.a.push(e)},n.ia=function(e){X(this.a,(function(t){return t==e}))},(n=Hu.prototype).get=function(e){return Ot(this.a[e])},n.set=function(e,t){return this.a[e]=t,Ot()},n.U=function(e){return delete this.a[e],Ot()},n.ca=function(){},n.ia=function(){},(n=Ku.prototype).get=function(e){var t=this;return Ot().then((function(){return Vr(t.a.getItem(e))}))},n.set=function(e,t){var n=this;return Ot().then((function(){var r=Fr(t);null===r?n.U(e):n.a.setItem(e,r)}))},n.U=function(e){var t=this;return Ot().then((function(){t.a.removeItem(e)}))},n.ca=function(e){u.window&&fn(u.window,"storage",e)},n.ia=function(e){u.window&&pn(u.window,"storage",e)},(n=Gu.prototype).get=function(){return Ot(null)},n.set=function(){return Ot()},n.U=function(){return Ot()},n.ca=function(){},n.ia=function(){},(n=Yu.prototype).get=function(e){var t=this;return Ot().then((function(){return Vr(t.a.getItem(e))}))},n.set=function(e,t){var n=this;return Ot().then((function(){var r=Fr(t);null===r?n.U(e):n.a.setItem(e,r)}))},n.U=function(e){var t=this;return Ot().then((function(){t.a.removeItem(e)}))},n.ca=function(){},n.ia=function(){};var Xu,Ju,Zu={F:Ku,cb:Yu},ec={F:Ku,cb:Yu},tc={F:Eu,cb:Gu},nc={F:Ku,cb:Gu},rc={rd:"local",NONE:"none",td:"session"};function ic(){var e=!(qr(Nr())||!kr()),t=Lr(),n=Rr();this.m=e,this.h=t,this.l=n,this.a={},Xu||(Xu=new Qu),e=Xu;try{this.g=!fr()&&Gr()||!u.indexedDB?new e.a.F:new zu(Er()?new Hu:new e.a.F)}catch(r){this.g=new Hu,this.h=!0}try{this.i=new e.a.cb}catch(r){this.i=new Hu}this.v=new Hu,this.f=k(this.Zb,this),this.b={}}function oc(){return Ju||(Ju=new ic),Ju}function ac(e,t){switch(t){case"session":return e.i;case"none":return e.v;default:return e.g}}function sc(e,t){return"firebase:"+e.name+(t?":"+t:"")}function uc(e,t,n){return n=sc(t,n),"local"==t.F&&(e.b[n]=null),ac(e,t.F).U(n)}function cc(e){e.c&&(clearInterval(e.c),e.c=null)}function lc(e){this.a=e,this.b=oc()}(n=ic.prototype).get=function(e,t){return ac(this,e.F).get(sc(e,t))},n.set=function(e,t,n){var r=sc(e,n),i=this,o=ac(this,e.F);return o.set(r,t).then((function(){return o.get(r)})).then((function(t){"local"==e.F&&(i.b[r]=t)}))},n.addListener=function(e,t,n){e=sc(e,t),this.l&&(this.b[e]=u.localStorage.getItem(e)),ge(this.a)&&(ac(this,"local").ca(this.f),this.h||(fr()||!Gr())&&u.indexedDB||!this.l||function(e){cc(e),e.c=setInterval((function(){for(var t in e.a){var n=u.localStorage.getItem(t),r=e.b[t];n!=r&&(e.b[t]=n,n=new Zt({type:"storage",key:t,target:window,oldValue:r,newValue:n,a:!0}),e.Zb(n))}}),1e3)}(this)),this.a[e]||(this.a[e]=[]),this.a[e].push(n)},n.removeListener=function(e,t,n){e=sc(e,t),this.a[e]&&(X(this.a[e],(function(e){return e==n})),0==this.a[e].length&&delete this.a[e]),ge(this.a)&&(ac(this,"local").ia(this.f),cc(this))},n.Zb=function(e){if(e&&e.g){var t=e.a.key;if(null==t)for(var n in this.a){var r=this.b[n];"undefined"===typeof r&&(r=null);var i=u.localStorage.getItem(n);i!==r&&(this.b[n]=i,this.nb(n))}else if(0==t.indexOf("firebase:")&&this.a[t]){if("undefined"!==typeof e.a.a?ac(this,"local").ia(this.f):cc(this),this.m)if(n=u.localStorage.getItem(t),(r=e.a.newValue)!==n)null!==r?u.localStorage.setItem(t,r):u.localStorage.removeItem(t);else if(this.b[t]===r&&"undefined"===typeof e.a.a)return;var o=this;n=function(){"undefined"===typeof e.a.a&&o.b[t]===u.localStorage.getItem(t)||(o.b[t]=u.localStorage.getItem(t),o.nb(t))},$e&&ut&&10==ut&&u.localStorage.getItem(t)!==e.a.newValue&&e.a.newValue!==e.a.oldValue?setTimeout(n,10):n()}}else K(e,k(this.nb,this))},n.nb=function(e){this.a[e]&&K(this.a[e],(function(e){e()}))};var fc,hc={name:"authEvent",F:"local"};function dc(){this.a=oc()}function pc(e,t){this.b=gc,this.f=u.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=e,this.h=t,this.l=u.Int32Array?new Int32Array(64):Array(64),void 0===fc&&(fc=u.Int32Array?new Int32Array(kc):kc),this.reset()}I(pc,(function(){this.b=-1}));for(var gc=64,vc=gc-1,mc=[],yc=0;yc<vc;yc++)mc[yc]=0;var bc=J(128,mc);function _c(e){for(var t=e.f,n=e.l,r=0,i=0;i<t.length;)n[r++]=t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3],i=4*r;for(t=16;64>t;t++){i=0|n[t-15],r=0|n[t-2];var o=(0|n[t-16])+((i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3)|0,a=(0|n[t-7])+((r>>>17|r<<15)^(r>>
2>19|r<<13)^r>>>10)|0;n[t]=o+a|0}r=0|e.a[0],i=0|e.a[1];var s=0|e.a[2],u=0|e.a[3],c=0|e.a[4],l=0|e.a[5],f=0|e.a[6];for(o=0|e.a[7],t=0;64>t;t++){var h=((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&f)+(0|fc[t])|0)+(0|n[t])|0)|0,o=f,f=l,l=c,c=u+a|0,u=s,s=i,i=r,r=a+h|0}e.a[0]=e.a[0]+r|0,e.a[1]=e.a[1]+i|0,e.a[2]=e.a[2]+s|0,e.a[3]=e.a[3]+u|0,e.a[4]=e.a[4]+c|0,e.a[5]=e.a[5]+l|0,e.a[6]=e.a[6]+f|0,e.a[7]=e.a[7]+o|0}function wc(e,t,n){void 0===n&&(n=t.length);var r=0,i=e.c;if("string"===typeof t)for(;r<n;)e.f[i++]=t.charCodeAt(r++),i==e.b&&(_c(e),i=0);else{if(!p(t))throw Error("message must be string or array");for(;r<n;){var o=t[r++];if(!("number"==typeof o&&0<=o&&255>=o&&o==(0|o)))throw Error("message must be a byte array");e.f[i++]=o,i==e.b&&(_c(e),i=0)}}e.c=i,e.g+=n}pc.prototype.reset=function(){this.g=this.c=0,this.a=u.Int32Array?new Int32Array(this.h):Z(this.h)};var kc=[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 Ec(){pc.call(this,8,Sc)}I(Ec,pc);var Sc=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function Ic(e,t,n,r,i,o){this.v=e,this.i=t,this.l=n,this.m=r||null,this.u=i||null,this.s=o,this.h=t+":"+n,this.C=new dc,this.g=new lc(this.h),this.f=null,this.b=[],this.a=this.c=null}function xc(e){return new T("invalid-cordova-configuration",e)}function Tc(e){var t=new Ec;wc(t,e),e=[];var n=8*t.g;56>t.c?wc(t,bc,56-t.c):wc(t,bc,t.b-(t.c-56));for(var r=63;56<=r;r--)t.f[r]=255&n,n/=256;for(_c(t),r=n=0;r<t.i;r++)for(var i=24;0<=i;i-=8)e[n++]=t.a[r]>>i&255;return function(e){return G(e,(function(e){return 1<(e=e.toString(16)).length?e:"0"+e})).join("")}(e)}function Cc(e,t){for(var n=0;n<e.b.length;n++)try{e.b[n](t)}catch(r){}}function Oc(e){return e.f||(e.f=e.ma().then((function(){return new kt((function(t){e.Ea((function n(r){return t(r),e.Ta(n),!1})),function(e){function t(t){r=!0,i&&i.cancel(),Ac(e).then((function(r){var i=n;if(r&&t&&t.url){var o=null;-1!=(i=so(t.url)).indexOf("/__/auth/callback")&&(o=(o="object"===typeof(o=Vr(Vn(o=Bn(i),"firebaseError")||null))?C(o):null)?new zo(r.c,r.b,null,null,o,null,r.T()):new zo(r.c,r.b,i,r.f,null,null,r.T())),i=o||n}Cc(e,i)}))}var n=new zo("unknown",null,null,null,new T("no-auth-event")),r=!1,i=Cn(500).then((function(){return Ac(e).then((function(){r||Cc(e,n)}))})),o=u.handleOpenURL;u.handleOpenURL=function(e){if(0==e.toLowerCase().indexOf(Pr("BuildInfo.packageName",u).toLowerCase()+"://")&&t({url:e}),"function"===typeof o)try{o(e)}catch(n){console.error(n)}},Go||(Go=new Ko),function(e){var t=Go;t.a.push(e),t.b||(t.b=function(e){for(var n=0;n<t.a.length;n++)t.a[n](e)},"function"===typeof(e=Pr("universalLinks.subscribe",u))&&e(null,t.b))}(t)}(e)}))}))),e.f}function Ac(e){var t=null;return function(e){return e.b.get(hc,e.a).then((function(e){return Ho(e)}))}(e.g).then((function(n){return t=n,uc((n=e.g).b,hc,n.a)})).then((function(){return t}))}function Nc(e){this.a=e,this.b=oc()}(n=Ic.prototype).ma=function(){return this.Ia?this.Ia:this.Ia=(wr(void 0)?_r().then((function(){return new kt((function(e,t){var n=u.document,r=setTimeout((function(){t(Error("Cordova framework is not ready."))}),1e3);n.addEventListener("deviceready",(function(){clearTimeout(r),e()}),!1)}))})):At(Error("Cordova must run in an Android or iOS file scheme."))).then((function(){if("function"!==typeof Pr("universalLinks.subscribe",u))throw xc("cordova-universal-links-plugin-fix is not installed");if("undefined"===typeof Pr("BuildInfo.packageName",u))throw xc("cordova-plugin-buildinfo is not installed");if("function"!==typeof Pr("cordova.plugins.browsertab.openUrl",u))throw xc("cordova-plugin-browsertab is not installed");if("function"!==typeof Pr("cordova.InAppBrowser.open",u))throw xc("cordova-plugin-inappbrowser is not installed")}),(function(){throw new T("cordova-not-ready")}))},n.Pb=function(e,t){return t(new T("operation-not-supported-in-this-environment")),Ot()},n.Nb=function(){return At(new T("operation-not-supported-in-this-environment"))},n.ac=function(){return!1},n.Yb=function(){return!0},n.Ub=function(){return!0},n.Ob=function(e,t,n,r){if(this.c)return At(new T("redirect-operation-pending"));var i=this,o=u.document,a=null,s=null,c=null,l=null;return this.c=Ot().then((function(){return qo(t),Oc(i)})).then((function(){return function(e,t,n,r,i){var o=function(){for(var e=20,t=[];0<e;)t.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),e--;return t.join("")}(),a=new zo(t,r,null,o,new T("no-auth-event"),null,i),s=Pr("BuildInfo.packageName",u);if("string"!==typeof s)throw new T("invalid-cordova-configuration");var c=Pr("BuildInfo.displayName",u),l={};if(Nr().toLowerCase().match(/iphone|ipad|ipod/))l.ibi=s;else{if(!Nr().toLowerCase().match(/android/))return At(new T("operation-not-supported-in-this-environment"));l.apn=s}c&&(l.appDisplayName=c),o=Tc(o),l.sessionId=o;var f=ku(e.v,e.i,e.l,t,n,null,r,e.m,l,e.u,i,e.s);return e.ma().then((function(){var t=e.h;return e.C.a.set(hc,a.w(),t)})).then((function(){var t=Pr("cordova.plugins.browsertab.isAvailable",u);if("function"!==typeof t)throw new T("invalid-cordova-configuration");var n=null;t((function(t){if(t){if("function"!==typeof(n=Pr("cordova.plugins.browsertab.openUrl",u)))throw new T("invalid-cordova-configuration");n(f)}else{if("function"!==typeof(n=Pr("cordova.InAppBrowser.open",u)))throw new T("invalid-cordova-configuration");t=Nr(),e.a=n(f,t.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||t.match(/(iPad|iPhone|iPod).*OS 8_\d/i)?"_blank":"_system","location=yes")}}))}))}(i,e,t,n,r)})).then((function(){return new kt((function(e,t){s=function(){var t=Pr("cordova.plugins.browsertab.close",u);return e(),"function"===typeof t&&t(),i.a&&"function"===typeof i.a.close&&(i.a.close(),i.a=null),!1},i.Ea(s),c=function(){a||(a=Cn(2e3).then((function(){t(new T("redirect-cancelled-by-user"))})))},l=function(){Kr()&&c()},o.addEventListener("resume",c,!1),Nr().toLowerCase().match(/android/)||o.addEventListener("visibilitychange",l,!1)})).o((function(e){return Ac(i).then((function(){throw e}))}))})).oa((function(){c&&o.removeEventListener("resume",c,!1),l&&o.removeEventListener("visibilitychange",l,!1),a&&a.cancel(),s&&i.Ta(s),i.c=null}))},n.Ea=function(e){this.b.push(e),Oc(this).o((function(t){"auth/invalid-cordova-configuration"===t.code&&(t=new zo("unknown",null,null,null,new T("no-auth-event")),e(t))}))},n.Ta=function(e){X(this.b,(function(t){return t==e}))};var Pc={name:"pendingRedirect",F:"session"};function Rc(e){return uc(e.b,Pc,e.a)}function jc(e,t,n,r){this.i={},this.u=0,this.D=e,this.v=t,this.m=n,this.J=r,this.h=[],this.f=!1,this.l=k(this.s,this),this.b=new $c,this.C=new el,this.g=new Nc(Gc(this.v,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.C,this.c.linkViaPopup=this.C,this.c.reauthViaPopup=this.C,this.a=Dc(this.D,this.v,this.m,O,this.J)}function Dc(e,n,r,i,o){var a=t.default.SDK_VERSION||null;return wr()?new Ic(e,n,r,a,i,o):new yu(e,n,r,a,i,o)}function Mc(e){e.f||(e.f=!0,e.a.Ea(e.l));var t=e.a;return e.a.ma().o((function(n){throw e.a==t&&e.reset(),n}))}function Lc(e){e.a.Yb()&&Mc(e).o((function(t){var n=new zo("unknown",null,null,null,new T("operation-not-supported-in-this-environment"));zc(t)&&e.s(n)})),e.a.Ub()||Qc(e.b)}function Fc(e,t){$(e.h,t)||e.h.push(t),e.f||function(e){return e.b.get(Pc,e.a).then((function(e){return"pending"==e}))}(e.g).then((function(t){t?Rc(e.g).then((function(){Mc(e).o((function(t){var n=new zo("unknown",null,null,null,new T("operation-not-supported-in-this-environment"));zc(t)&&e.s(n)}))})):Lc(e)})).o((function(){Lc(e)}))}function Uc(e,t){X(e.h,(function(e){return e==t}))}jc.prototype.reset=function(){this.f=!1,this.a.Ta(this.l),this.a=Dc(this.D,this.v,this.m,null,this.J),this.i={}},jc.prototype.s=function(e){if(!e)throw new T("invalid-auth-event");
2if(6e5<=Date.now()-this.u&&(this.i={},this.u=0),e&&e.getUid()&&this.i.hasOwnProperty(e.getUid()))return!1;for(var t=!1,n=0;n<this.h.length;n++){var r=this.h[n];if(r.Gb(e.c,e.b)){(t=this.c[e.c])&&(t.h(e,r),e&&(e.f||e.b)&&(this.i[e.getUid()]=!0,this.u=Date.now())),t=!0;break}}return Qc(this.b),t};var Vc=new Hr(2e3,1e4),Bc=new Hr(3e4,6e4);function qc(e,t,n,r,i,o,a){return e.a.Nb(t,n,r,(function(){e.f||(e.f=!0,e.a.Ea(e.l))}),(function(){e.reset()}),i,o,a)}function zc(e){return!(!e||"auth/cordova-not-ready"!=e.code)}function Hc(e,t,n,r,i){var o;return function(e){return e.b.set(Pc,"pending",e.a)}(e.g).then((function(){return e.a.Ob(t,n,r,i).o((function(t){if(zc(t))throw new T("operation-not-supported-in-this-environment");return o=t,Rc(e.g).then((function(){throw o}))})).then((function(){return e.a.ac()?new kt((function(){})):Rc(e.g).then((function(){return e.ra()})).then((function(){})).o((function(){}))}))}))}function Kc(e,t,n,r,i){return e.a.Pb(r,(function(e){t.na(n,null,e,i)}),Vc.get())}jc.prototype.ra=function(){return this.b.ra()};var Wc={};function Gc(e,t,n){return e=e+":"+t,n&&(e=e+":"+n.url),e}function Yc(e,t,n,r){var i=Gc(t,n,r);return Wc[i]||(Wc[i]=new jc(e,t,n,r)),Wc[i]}function $c(){this.b=null,this.f=[],this.c=[],this.a=null,this.i=this.g=!1}function Qc(e){e.g||(e.g=!0,Zc(e,!1,null,null))}function Xc(e){e.g&&!e.i&&Zc(e,!1,null,null)}function Jc(e,t){if(e.b=function(){return Ot(t)},e.f.length)for(var n=0;n<e.f.length;n++)e.f[n](t)}function Zc(e,t,n,r){t?r?function(e,t){if(e.b=function(){return At(t)},e.c.length)for(var n=0;n<e.c.length;n++)e.c[n](t)}(e,r):Jc(e,n):Jc(e,{user:null}),e.f=[],e.c=[]}function el(){}function tl(){this.jb=!1,Object.defineProperty(this,"appVerificationDisabled",{get:function(){return this.jb},set:function(e){this.jb=e},enumerable:!1})}function nl(e,t){this.a=t,Jr(this,"verificationId",e)}function rl(e,t,n,r){return new Uo(e).gb(t,n).then((function(e){return new nl(e,r)}))}function il(e){var t=Gi(e);if(!(t&&t.exp&&t.auth_time&&t.iat))throw new T("internal-error","An internal error occurred. The token obtained by Firebase appears to be malformed. Please retry the operation.");Zr(this,{token:e,expirationTime:Wr(1e3*t.exp),authTime:Wr(1e3*t.auth_time),issuedAtTime:Wr(1e3*t.iat),signInProvider:t.firebase&&t.firebase.sign_in_provider?t.firebase.sign_in_provider:null,signInSecondFactor:t.firebase&&t.firebase.sign_in_second_factor?t.firebase.sign_in_second_factor:null,claims:t})}function ol(e,t,n){var r=t&&t[sl];if(!r)throw new T("argument-error","Internal assert: Invalid MultiFactorResolver");this.a=e,this.f=ve(t),this.g=n,this.c=new uo(null,r),this.b=[];var i=this;K(t[al]||[],(function(e){(e=ri(e))&&i.b.push(e)})),Jr(this,"auth",this.a),Jr(this,"session",this.c),Jr(this,"hints",this.b)}$c.prototype.reset=function(){this.b=null,this.a&&(this.a.cancel(),this.a=null)},$c.prototype.h=function(e,t){if(e){this.reset(),this.g=!0;var n=e.c,r=e.b,i=e.a&&"auth/web-storage-unsupported"==e.a.code,o=e.a&&"auth/operation-not-supported-in-this-environment"==e.a.code;this.i=!(!i&&!o),"unknown"!=n||i||o?e.a?(Zc(this,!0,null,e.a),Ot()):t.Fa(n,r)?function(e,t,n){n=n.Fa(t.c,t.b);var r=t.g,i=t.f,o=t.i,a=t.T(),s=!!t.c.match(/Redirect$/);n(r,i,a,o).then((function(t){Zc(e,s,t,null)})).o((function(t){Zc(e,s,null,t)}))}(this,e,t):At(new T("invalid-auth-event")):(Zc(this,!1,null,null),Ot())}else At(new T("invalid-auth-event"))},$c.prototype.ra=function(){var e=this;return new kt((function(t,n){e.b?e.b().then(t,n):(e.f.push(t),e.c.push(n),function(e){var t=new T("timeout");e.a&&e.a.cancel(),e.a=Cn(Bc.get()).then((function(){e.b||(e.g=!0,Zc(e,!0,null,t))}))}(e))}))},el.prototype.h=function(e,t){if(e){var n=e.c,r=e.b;e.a?(t.na(e.c,null,e.a,e.b),Ot()):t.Fa(n,r)?function(e,t){var n=e.b,r=e.c;t.Fa(r,n)(e.g,e.f,e.T(),e.i).then((function(e){t.na(r,e,null,n)})).o((function(e){t.na(r,null,e,n)}))}(e,t):At(new T("invalid-auth-event"))}else At(new T("invalid-auth-event"))},nl.prototype.confirm=function(e){return e=Vo(this.verificationId,e),this.a(e)};var al="mfaInfo",sl="mfaPendingCredential";function ul(e,t,n,r){T.call(this,"multi-factor-auth-required",r,t),this.b=new ol(e,t,n),Jr(this,"resolver",this.b)}function cl(e,t,n){if(e&&v(e.serverResponse)&&"auth/multi-factor-auth-required"===e.code)try{return new ul(t,e.serverResponse,n,e.message)}catch(r){}return null}function ll(){}function fl(e){Jr(this,"factorId",e.fa),this.a=e}function hl(e){if(fl.call(this,e),this.a.fa!=Uo.PROVIDER_ID)throw new T("argument-error","firebase.auth.PhoneMultiFactorAssertion requires a valid firebase.auth.PhoneAuthCredential")}function dl(e,t){for(var n in Jt.call(this,e),t)this[n]=t[n]}function pl(e,t){this.a=e,this.b=[],this.c=k(this.yc,this),fn(this.a,"userReloaded",this.c);var n=[];t&&t.multiFactor&&t.multiFactor.enrolledFactors&&K(t.multiFactor.enrolledFactors,(function(e){var t=null,r={};if(e){e.uid&&(r[ai]=e.uid),e.displayName&&(r[ii]=e.displayName),e.enrollmentTime&&(r[oi]=new Date(e.enrollmentTime).toISOString()),e.phoneNumber&&(r[si]=e.phoneNumber);try{t=new ui(r)}catch(i){}e=t}else e=null;e&&n.push(e)})),gl(this,n)}function gl(e,t){e.b=t,Jr(e,"enrolledFactors",t)}function vl(e,t,n){if(this.h=e,this.i=t,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 ml(e,t){e.stop(),e.b=Cn(function(e,t){return t?(e.a=e.c,e.g()):(t=e.a,e.a*=2,e.a>e.f&&(e.a=e.f),t)}(e,t)).then((function(){return function(){var e=u.document,t=null;return Kr()||!e?Ot():new kt((function(n){t=function(){Kr()&&(e.removeEventListener("visibilitychange",t,!1),n())},e.addEventListener("visibilitychange",t,!1)})).o((function(n){throw e.removeEventListener("visibilitychange",t,!1),n}))}()})).then((function(){return e.h()})).then((function(){ml(e,!0)})).o((function(t){e.i(t)&&ml(e,!1)}))}function yl(e){this.f=e,this.b=this.a=null,this.c=Date.now()}function bl(e,t){"undefined"===typeof t&&(e.b?t=(t=e.b).a-t.g:t=0),e.c=Date.now()+1e3*t}function _l(e,t){e.b=Wi(t[ns]||""),e.a=t.refreshToken,bl(e,"undefined"!==typeof(t=t.expires
2In)?Number(t):void 0)}function wl(e,t){return function(e,t){return new kt((function(n,r){"refresh_token"==t.grant_type&&t.refresh_token||"authorization_code"==t.grant_type&&t.code?fs(e,e.l+"?key="+encodeURIComponent(e.c),(function(e){e?e.error?r(cu(e)):e.access_token&&e.refresh_token?n(e):r(new T("internal-error")):r(new T("network-request-failed"))}),"POST",Zn(t).toString(),e.g,e.m.get()):r(new T("internal-error"))}))}(e.f,t).then((function(t){return e.b=Wi(t.access_token),e.a=t.refresh_token,bl(e,t.expires_in),{accessToken:e.b.toString(),refreshToken:e.a}})).o((function(t){throw"auth/user-token-expired"==t.code&&(e.a=null),t}))}function kl(e,t){this.a=e||null,this.b=t||null,Zr(this,{lastSignInTime:Wr(t||null),creationTime:Wr(e||null)})}function El(e,t,n,r,i,o){Zr(this,{uid:e,displayName:r||null,photoURL:i||null,email:n||null,phoneNumber:o||null,providerId:t})}function Sl(e,n,r){this.N=[],this.l=e.apiKey,this.m=e.appName,this.s=e.authDomain||null;var i=t.default.SDK_VERSION?Ar(t.default.SDK_VERSION):null;this.a=new es(this.l,R(O),i),(this.u=e.emulatorConfig||null)&&us(this.a,this.u),this.h=new yl(this.a),Rl(this,n[ns]),_l(this.h,n),Jr(this,"refreshToken",this.h.a),Ml(this,r||{}),En.call(this),this.P=!1,this.s&&jr()&&(this.b=Yc(this.s,this.l,this.m,this.u)),this.W=[],this.i=null,this.D=function(e){return new vl((function(){return e.I(!0)}),(function(e){return!(!e||"auth/network-request-failed"!=e.code)}),(function(){var t=e.h.c-Date.now()-3e5;return 0<t?t:0}))}(this),this.ba=k(this.ib,this);var o=this;this.za=null,this.Pa=function(e){o.xa(e.h)},this.qa=null,this.Ba=function(e){Il(o,e.c)},this.$=null,this.aa=[],this.Oa=function(e){Cl(o,e.f)},this.ja=null,this.S=new pl(this,r),Jr(this,"multiFactor",this.S)}function Il(e,t){e.u=t,us(e.a,t),e.b&&(t=e.b,e.b=Yc(e.s,e.l,e.m,e.u),e.P&&(Uc(t,e),Fc(e.b,e)))}function xl(e,t){e.qa&&pn(e.qa,"languageCodeChanged",e.Pa),(e.qa=t)&&fn(t,"languageCodeChanged",e.Pa)}function Tl(e,t){e.$&&pn(e.$,"emulatorConfigChanged",e.Ba),(e.$=t)&&fn(t,"emulatorConfigChanged",e.Ba)}function Cl(e,n){e.aa=n,ls(e.a,t.default.SDK_VERSION?Ar(t.default.SDK_VERSION,e.aa):null)}function Ol(e,t){e.ja&&pn(e.ja,"frameworkChanged",e.Oa),(e.ja=t)&&fn(t,"frameworkChanged",e.Oa)}function Al(e){try{return t.default.app(e.m).auth()}catch(n){throw new T("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+e.m+"'!")}}function Nl(e){e.J||e.D.b||(e.D.start(),pn(e,"tokenChanged",e.ba),fn(e,"tokenChanged",e.ba))}function Pl(e){pn(e,"tokenChanged",e.ba),e.D.stop()}function Rl(e,t){e.Aa=t,Jr(e,"_lat",t)}function jl(e){for(var t=[],n=0;n<e.W.length;n++)t.push(e.W[n](e));return Pt(t).then((function(){return e}))}function Dl(e){e.b&&!e.P&&(e.P=!0,Fc(e.b,e))}function Ml(e,t){Zr(e,{uid:t.uid,displayName:t.displayName||null,photoURL:t.photoURL||null,email:t.email||null,emailVerified:t.emailVerified||!1,phoneNumber:t.phoneNumber||null,isAnonymous:t.isAnonymous||!1,tenantId:t.tenantId||null,metadata:new kl(t.createdAt,t.lastLoginAt),providerData:[]}),e.a.b=e.tenantId}function Ll(){}function Fl(e){return Ot().then((function(){if(e.J)throw new T("app-deleted")}))}function Ul(e){return G(e.providerData,(function(e){return e.providerId}))}function Vl(e,t){t&&(Bl(e,t.providerId),e.providerData.push(t))}function Bl(e,t){X(e.providerData,(function(e){return e.providerId==t}))}function ql(e,t,n){("uid"!=t||n)&&e.hasOwnProperty(t)&&Jr(e,t,n)}function zl(e,t){e!=t&&(Zr(e,{uid:t.uid,displayName:t.displayName,photoURL:t.photoURL,email:t.email,emailVerified:t.emailVerified,phoneNumber:t.phoneNumber,isAnonymous:t.isAnonymous,tenantId:t.tenantId,providerData:[]}),t.metadata?Jr(e,"metadata",function(e){return new kl(e.a,e.b)}(t.metadata)):Jr(e,"metadata",new kl),K(t.providerData,(function(t){Vl(e,t)})),function(e,t){e.b=t.b,e.a=t.a,e.c=t.c}(e.h,t.h),Jr(e,"refreshToken",e.h.a),gl(e.S,t.S.b))}function Hl(e){return e.I().then((function(t){var n=e.isAnonymous;return function(e,t){return su(e.a,Fs,{idToken:t}).then(k(e.Kc,e))}(e,t).then((function(){return n||ql(e,"isAnonymous",!1),t}))}))}function Kl(e,t){t[ns]&&e.Aa!=t[ns]&&(_l(e.h,t),e.dispatchEvent(new dl("tokenChanged")),Rl(e,t[ns]),ql(e,"refreshToken",e.h.a))}function Wl(e,t){return Hl(e).then((function(){if($(Ul(e),t))return jl(e).then((function(){throw new T("provider-already-linked")}))}))}function Gl(e,t,n){return ei({user:e,credential:Bo(t),additionalUserInfo:t=Ji(t),operationType:n})}function Yl(e,t){return Kl(e,t),e.reload().then((function(){return e}))}function $l(e,n,r,i,o){if(!jr())return At(new T("operation-not-supported-in-this-environment"));if(e.i&&!o)return At(e.i);var a=Xi(r.providerId),s=Br(e.uid+":::"),u=null;(!Lr()||kr())&&e.s&&r.isOAuthProvider&&(u=ku(e.s,e.l,e.m,n,r,null,s,t.default.SDK_VERSION||null,null,null,e.tenantId,e.u));var c=mr(u,a&&a.va,a&&a.ua);return i=i().then((function(){if(Xl(e),!o)return e.I().then((function(){}))})).then((function(){return qc(e.b,c,n,r,s,!!u,e.tenantId)})).then((function(){return new kt((function(t,r){e.na(n,null,new T("cancelled-popup-request"),e.g||null),e.f=t,e.C=r,e.g=s,e.c=Kc(e.b,e,n,c,s)}))})).then((function(e){return c&&vr(c),e?ei(e):null})).o((function(e){throw c&&vr(c),e})),Jl(e,i,o)}function Ql(e,t,n,r,i){if(!jr())return At(new T("operation-not-supported-in-this-environment"));if(e.i&&!i)return At(e.i);var o=null,a=Br(e.uid+":::");return r=r().then((function(){if(Xl(e),!i)return e.I().then((function(){}))})).then((function(){return e.ga=a,jl(e)})).then((function(t){return e.ha&&(t=(t=e.ha).b.set(tf,e.w(),t.a)),t})).then((function(){return Hc(e.b,t,n,a,e.tenantId)})).o((function(t){if(o=t,e.ha)return nf(e.ha);throw o})).then((function(){if(o)throw o})),Jl(e,r,i)}function Xl(e){if(!e.b||!e.P){if(e.b&&!e.P)throw new T("internal-error");throw new T("auth-domain-config-required")}}function Jl(e,t,n){var r=function(e,t,n){return e.i&&!n?(t.cancel(),At(e.i)):t.o((function(t){throw!t||"auth/user-disabled"!=t.code&&"auth/user-token-expired"!=t.code||(e.i||e.dispatchEvent(new dl("userInvalidated")),e.i=t),t}))}
2(e,t,n);return e.N.push(r),r.oa((function(){Q(e.N,r)})),r.o((function(t){var n=null;throw t&&"auth/multi-factor-auth-required"===t.code&&(n=cl(t.w(),Al(e),k(e.jc,e))),n||t}))}function Zl(e){if(!e.apiKey)return null;var t={apiKey:e.apiKey,authDomain:e.authDomain,appName:e.appName,emulatorConfig:e.emulatorConfig},n={};if(!e.stsTokenManager||!e.stsTokenManager.accessToken)return null;n[ns]=e.stsTokenManager.accessToken,n.refreshToken=e.stsTokenManager.refreshToken||null;var r=e.stsTokenManager.expirationTime;r&&(n.expiresIn=(r-Date.now())/1e3);var i=new Sl(t,n,e);return e.providerData&&K(e.providerData,(function(e){e&&Vl(i,ei(e))})),e.redirectEventId&&(i.ga=e.redirectEventId),i}function ef(e){this.a=e,this.b=oc()}ol.prototype.Rc=function(e){var t=this;return e.tb(this.a.a,this.c).then((function(e){var n=ve(t.f);return delete n[al],delete n[sl],ye(n,e),t.g(n)}))},I(ul,T),ll.prototype.tb=function(e,t,n){return t.type==co?function(e,t,n,r){return n.Ha().then((function(n){return n={idToken:n},"undefined"!==typeof r&&(n.displayName=r),ye(n,{phoneVerificationInfo:Fo(e.a)}),su(t,Ms,n)}))}(this,e,t,n):function(e,t,n){return n.Ha().then((function(n){return ye(n={mfaPendingCredential:n},{phoneVerificationInfo:Fo(e.a)}),su(t,Ls,n)}))}(this,e,t)},I(fl,ll),I(hl,fl),I(dl,Jt),(n=pl.prototype).yc=function(e){gl(this,function(e){var t=[];return K(e.mfaInfo||[],(function(e){(e=ri(e))&&t.push(e)})),t}(e.hd))},n.Sb=function(){return this.a.I().then((function(e){return new uo(e,null)}))},n.fc=function(e,t){var n=this,r=this.a.a;return this.Sb().then((function(n){return e.tb(r,n,t)})).then((function(e){return Kl(n.a,e),n.a.reload()}))},n.bd=function(e){var t=this,n="string"===typeof e?e:e.uid,r=this.a.a;return this.a.I().then((function(e){return su(r,au,{idToken:e,mfaEnrollmentId:n})})).then((function(e){var r=W(t.b,(function(e){return e.uid!=n}));return gl(t,r),Kl(t.a,e),t.a.reload().o((function(e){if("auth/user-token-expired"!=e.code)throw e}))}))},n.w=function(){return{multiFactor:{enrolledFactors:G(this.b,(function(e){return e.w()}))}}},vl.prototype.start=function(){this.a=this.c,ml(this,!0)},vl.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)},yl.prototype.w=function(){return{apiKey:this.f.c,refreshToken:this.a,accessToken:this.b&&this.b.toString(),expirationTime:this.c}},yl.prototype.getToken=function(e){return e=!!e,this.b&&!this.a?At(new T("user-token-expired")):e||!this.b||Date.now()>this.c-3e4?this.a?wl(this,{grant_type:"refresh_token",refresh_token:this.a}):Ot(null):Ot({accessToken:this.b.toString(),refreshToken:this.a})},kl.prototype.w=function(){return{lastLoginAt:this.b,createdAt:this.a}},I(Sl,En),Sl.prototype.xa=function(e){this.za=e,ss(this.a,e)},Sl.prototype.la=function(){return this.za},Sl.prototype.Ga=function(){return Z(this.aa)},Sl.prototype.ib=function(){this.D.b&&(this.D.stop(),this.D.start())},Jr(Sl.prototype,"providerId","firebase"),(n=Sl.prototype).reload=function(){var e=this;return Jl(this,Fl(this).then((function(){return Hl(e).then((function(){return jl(e)})).then(Ll)})))},n.oc=function(e){return this.I(e).then((function(e){return new il(e)}))},n.I=function(e){var t=this;return Jl(this,Fl(this).then((function(){return t.h.getToken(e)})).then((function(e){if(!e)throw new T("internal-error");return e.accessToken!=t.Aa&&(Rl(t,e.accessToken),t.dispatchEvent(new dl("tokenChanged"))),ql(t,"refreshToken",e.refreshToken),e.accessToken})))},n.Kc=function(e){if(!(e=e.users)||!e.length)throw new T("internal-error");Ml(this,{uid:(e=e[0]).localId,displayName:e.displayName,photoURL:e.photoUrl,email:e.email,emailVerified:!!e.emailVerified,phoneNumber:e.phoneNumber,lastLoginAt:e.lastLoginAt,createdAt:e.createdAt,tenantId:e.tenantId});for(var t=function(e){return(e=e.providerUserInfo)&&e.length?G(e,(function(e){return new El(e.rawId,e.providerId,e.email,e.displayName,e.photoUrl,e.phoneNumber)})):[]}(e),n=0;n<t.length;n++)Vl(this,t[n]);ql(this,"isAnonymous",!(this.email&&e.passwordHash)&&!(this.providerData&&this.providerData.length)),this.dispatchEvent(new dl("userReloaded",{hd:e}))},n.Lc=function(e){return Qr("firebase.User.prototype.reauthenticateAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.reauthenticateWithCredential instead."),this.ub(e)},n.ub=function(e){var t=this,n=null;return Jl(this,e.c(this.a,this.uid).then((function(e){return Kl(t,e),n=Gl(t,e,"reauthenticate"),t.i=null,t.reload()})).then((function(){return n})),!0)}
2,n.Cc=function(e){return Qr("firebase.User.prototype.linkAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.linkWithCredential instead."),this.rb(e)},n.rb=function(e){var t=this,n=null;return Jl(this,Wl(this,e.providerId).then((function(){return t.I()})).then((function(n){return e.b(t.a,n)})).then((function(e){return n=Gl(t,e,"link"),Yl(t,e)})).then((function(){return n})))},n.Dc=function(e,t){var n=this;return Jl(this,Wl(this,"phone").then((function(){return rl(Al(n),e,t,k(n.rb,n))})))},n.Mc=function(e,t){var n=this;return Jl(this,Ot().then((function(){return rl(Al(n),e,t,k(n.ub,n))})),!0)},n.Cb=function(e){var t=this;return Jl(this,this.I().then((function(n){return t.a.Cb(n,e)})).then((function(e){return Kl(t,e),t.reload()})))},n.ed=function(e){var t=this;return Jl(this,this.I().then((function(n){return e.b(t.a,n)})).then((function(e){return Kl(t,e),t.reload()})))},n.Db=function(e){var t=this;return Jl(this,this.I().then((function(n){return t.a.Db(n,e)})).then((function(e){return Kl(t,e),t.reload()})))},n.Eb=function(e){if(void 0===e.displayName&&void 0===e.photoURL)return Fl(this);var t=this;return Jl(this,this.I().then((function(n){return t.a.Eb(n,{displayName:e.displayName,photoUrl:e.photoURL})})).then((function(e){return Kl(t,e),ql(t,"displayName",e.displayName||null),ql(t,"photoURL",e.photoUrl||null),K(t.providerData,(function(e){"password"===e.providerId&&(Jr(e,"displayName",t.displayName),Jr(e,"photoURL",t.photoURL))})),jl(t)})).then(Ll))},n.cd=function(e){var t=this;return Jl(this,Hl(this).then((function(n){return $(Ul(t),e)?function(e,t,n){return su(e,Rs,{idToken:t,deleteProvider:n})}(t.a,n,[e]).then((function(e){var n={};return K(e.providerUserInfo||[],(function(e){n[e.providerId]=!0})),K(Ul(t),(function(e){n[e]||Bl(t,e)})),n[Uo.PROVIDER_ID]||Jr(t,"phoneNumber",null),jl(t)})):jl(t).then((function(){throw new T("no-such-provider")}))})))},n.delete=function(){var e=this;return Jl(this,this.I().then((function(t){return su(e.a,Ps,{idToken:t})})).then((function(){e.dispatchEvent(new dl("userDeleted"))}))).then((function(){for(var t=0;t<e.N.length;t++)e.N[t].cancel("app-deleted");xl(e,null),Tl(e,null),Ol(e,null),e.N=[],e.J=!0,Pl(e),Jr(e,"refreshToken",null),e.b&&Uc(e.b,e)}))},n.Gb=function(e,t){return!!("linkViaPopup"==e&&(this.g||null)==t&&this.f||"reauthViaPopup"==e&&(this.g||null)==t&&this.f||"linkViaRedirect"==e&&(this.ga||null)==t||"reauthViaRedirect"==e&&(this.ga||null)==t)},n.na=function(e,t,n,r){"linkViaPopup"!=e&&"reauthViaPopup"!=e||r!=(this.g||null)||(n&&this.C?this.C(n):t&&!n&&this.f&&this.f(t),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.C)},n.Fa=function(e,t){return"linkViaPopup"==e&&t==(this.g||null)?k(this.Lb,this):"reauthViaPopup"==e&&t==(this.g||null)?k(this.Mb,this):"linkViaRedirect"==e&&(this.ga||null)==t?k(this.Lb,this):"reauthViaRedirect"==e&&(this.ga||null)==t?k(this.Mb,this):null},n.Ec=function(e){var t=this;return $l(this,"linkViaPopup",e,(function(){return Wl(t,e.providerId).then((function(){return jl(t)}))}),!1)},n.Nc=function(e){return $l(this,"reauthViaPopup",e,(function(){return Ot()}),!0)},n.Fc=function(e){var t=this;return Ql(this,"linkViaRedirect",e,(function(){return Wl(t,e.providerId)}),!1)},n.Oc=function(e){return Ql(this,"reauthViaRedirect",e,(function(){return Ot()}),!0)},n.Lb=function(e,t,n,r){var i=this;this.c&&(this.c.cancel(),this.c=null);var o=null;return Jl(this,this.I().then((function(n){return Is(i.a,{requestUri:e,postBody:r,sessionId:t,idToken:n})})).then((function(e){return o=Gl(i,e,"link"),Yl(i,e)})).then((function(){return o})))},n.Mb=function(e,t,n,r){var i=this;this.c&&(this.c.cancel(),this.c=null);var o=null;return Jl(this,Ot().then((function(){return ho(xs(i.a,{requestUri:e,sessionId:t,postBody:r,tenantId:n}),i.uid)})).then((function(e){return o=Gl(i,e,"reauthenticate"),Kl(i,e),i.i=null,i.reload()})).then((function(){return o})),!0)},n.vb=function(e){var t=this,n=null;return Jl(this,this.I().then((function(t){return n=t,"undefined"===typeof e||ge(e)?{}:qi(new Pi(e))})).then((function(e){return t.a.vb(n,e)})).then((function(e){if(t.email!=e)return t.reload()})).then((function(){})))},n.Fb=function(e,t){var n=this,r=null;return Jl(this,this.I().then((function(e){return r=e,"undefined"===typeof t||ge(t)?{}:qi(new Pi(t))})).then((function(t){return n.a.Fb(r,e,t)})).then((function(e){if(n.email!=e)return n.reload()})).then((function(){})))},n.jc=function(e){var t=null,n=this;return Jl(this,e=ho(Ot(e),n.uid).then((function(e){return t=Gl(n,e,"reauthenticate"),Kl(n,e),n.i=null,n.reload()})).then((function(){return t})),!0)},n.toJSON=function(){return this.w()},n.w=function(){var e={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.h.w(),redirectEventId:this.ga||null};return this.metadata&&ye(e,this.metadata.w()),K(this.providerData,(function(t){e.providerData.push(function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}(t))})),ye(e,this.S.w()),e};var tf={name:"redirectUser",F:"session"};function nf(e){return uc(e.b,tf,e.a)}function rf(e){this.a=e,this.b=oc(),this.c=null,this.f=function(e){var t=sf("local"),n=sf("session"),r=sf("none");return function(e,t,n){var r=sc(t,n),i=ac(e,t.F);return e.get(t,n).then((function(o){var a=null;try{a=Vr(u.localStorage.getItem(r))}catch(s){}if(a&&!o)return u.localStorage.removeItem(r),e.set(t,a,n);a&&o&&"localStorage"!=i.type&&u.localStorage.removeItem(r)}))}(e.b,t,e.a).then((function(){return e.b.get(n,e.a)})).then((function(i){return i?n:e.b.get(r,e.a).then((function(n){return n?r:e.b.get(t,e.a).then((function(n){return n?t:e.b.get(af,e.a).then((function(e){return e?sf(e):t}))}))}))})).then((function(t){return e.c=t,of(e,t.F)})).o((function(){e.c||(e.c=t)}))}(this),this.b.addListener(sf("local"),this.a,k(this.g,this))}function of(e,t){var n,r=[];for(n in rc)rc[n]!==t&&r.push(uc(e.b,sf(rc[n]),e.a));return r.push(uc(e.b,af,e.a)),function(e){return new kt((function(t,n){var r=e.length,i=[];if(r)for(var o=function(e,n){r--,i[e]=n,0==r&&t(i)},a=function(e){n(e)},s=0;s<e.length;s++)Nt(e[s],E(o,s),a);else t(i)}))}(r)}rf.prototype.g=function(){var e=this,t=sf("local");ff(this,(function(){return Ot().then((function(){return e.c&&"local"!=e.c.F?e.b.get(t,e.a):null})).then((function(n){if(n)return of(e,"local").then((function(){e.c=t}))}))}))};var af={name:"persistence",F:"session"};function sf(e){return{name:"authUser",F:e}}function uf(e,t){return ff(e,(function(){return e.b.set(e.c,t.w(),e.a)}))}function cf(e){return ff(e,(function(){return uc(e.b,e.c,e.a)}))}function lf(e,t,n){return ff(e,(function(){return e.b.get(e.c,e.a).then((function(e){return e&&t&&(e.authDomain=t),e&&n&&(e.emulatorConfig=n),Zl(e||{})}))}))}function ff(e,t){return e.f=e.f.then(t,t),e.f}function hf(e){if(this.l=!1,Jr(this,"settings",new tl),Jr(this,"app",e),!wf(this).options||!wf(this).options.apiKey)throw new T("invalid-api-key");e=t.default.SDK_VERSION?Ar(t.default.SDK_VERSION):null,this.a=new es(wf(this).options&&wf(this).options.apiKey,R(O),e),this.P=[],this.s=[],this.N=[],this.Pa=t.default.INTERNAL.createSubscribe(k(this.zc,this)),this.W=void 0,this.ib=t.default.INTERNAL.createSubscribe(k(this.Ac,this)),bf(this,null),this.i=new rf(wf(this).options.apiKey+":"+wf(this).name),this.D=new ef(wf(this).options.apiKey+":"+wf(this).name),this.$=If(this,function(e){var t=wf(e).options.authDomain,n=function(e){var t=function(e,t){return e.b.get(tf,e.a).then((function(e){return e&&t&&(e.authDomain=t),Zl(e||{})}))}(e.D,wf(e).options.authDomain).then((function(t){return(e.m=t)&&(t.ha=e.D),nf(e.D)}));return If(e,t)}(e).then((function(){return lf(e.i,t,e.R)})).then((function(t){return t?(t.ha=e.D,e.m&&(e.m.ga||null)==(t.ga||null)?t:t.reload().then((function(){return uf(e.i,t).then((function(){return t}))})).o((function(n){return"auth/network-request-failed"==n.code?t:cf(e.i)}))):null})).then((function(t){bf(e,t||null)}));return If(e,n)}(this)),this.h=If(this,function(e){return e.$.then((function(){return mf(e)})).o((function(){})).then((function(){if(!e.l)return e.ja()})).o((function(){})).then((function(){if(!e.l){e.ba=!0;var t=e.i;t.b.addListener(sf("local"),t.a,e.ja)}}))}(this)),this.ba=!1,this.ja=k(this.Zc,this),this.Ba=k(this.da,this),this.qa=k(this.mc,this),this.za=k(this.wc,this),this.Aa=k(this.xc,this),this.b=null,function(e){var t=wf(e).options.authDomain,n=wf(e).options.apiKey;t&&jr()&&(e.Oa=e.$.then((function(){if(!e.l){if(e.b=Yc(t,n,wf(e).name,e.R),Fc(e.b,e),kf(e)&&Dl(kf(e)),e.m){Dl(e.m);var r=e.m;r.xa(e.la()),xl(r,e),Cl(r=e.m,e.J),Ol(r,e),Il(r=e.m,e.R),Tl(r,e),e.m=null}return e.b}})))}(this),this.INTERNAL={},this.INTERNAL.delete=k(this.delete,this),this.INTERNAL.logFramework=k(this.Gc,this),this.u=0,En.call(this),function(e){Object.defineProperty(e,"lc",{get:function(){return this.la()},set:function(e){this.xa(e)},enumerable:!1}),e.aa=null,Object.defineProperty(e,"ti",{get:function(){return this.T()},set:function(e){this.zb(e)},enumerable:!1}),e.S=null,Object.defineProperty(e,"emulatorConfig",{get:function(){if(this.R){var e=Bn(this.R.url);e=ei({protocol:e.c,host:e.a,port:e.g,options:ei({disableWarnings:this.R.ec})})}else e=null;return e},enumerable:!1})}(this),this.J=[],this.R=null}function df(e){Jt.call(this,"languageCodeChanged"),this.h=e}function pf(e){Jt.call(this,"emulatorConfigChanged"),this.c=e}function gf(e){Jt.call(this,"frameworkChanged"),this.f=e}function vf(e){return e.Oa||At(new T("auth-domain-config-required"))}function mf(e){if(!jr())return At(new T("operation-not-supported-in-this-environment"));var t=vf(e).then((function(){return e.b.ra()})).then((function(e){return e?ei(e):null}));return If(e,t)}function yf(e,t){var n={};return n.apiKey=wf(e).options.apiKey,n.authDomain=wf(e).options.authDomain,n.appName=wf(e).name,e.R&&(n.emulatorConfig=e.R),e.$.then((function(){return function(e,t,n,r){var i=new Sl(e,t);return n&&(i.ha=n),r&&Cl(i,r),i.reload().then((function(){return i}))}(n,t,e.D,e.Ga())})).then((function(t){return kf(e)&&t.uid==kf(e).uid?(zl(kf(e),t),e.da(t)):(bf(e,t),Dl(t),e.da(t))})).then((function(){Sf(e)}))}function bf(e,t){kf(e)&&(function(e,t){X(e.W,(function(e){return e==t}))}(kf(e),e.Ba),pn(kf(e),"tokenChanged",e.qa),pn(kf(e),"userDeleted",e.za),pn(kf(e),"userInvalidated",e.Aa),Pl(kf(e))),t&&(t.W.push(e.Ba),fn(t,"tokenChanged",e.qa),fn(t,"userDeleted",e.za),fn(t,"userInvalidated",e.Aa),0<e.u&&Nl(t)),Jr(e,"currentUser",t),t&&(t.xa(e.la()),xl(t,e),Cl(t,e.J),Ol(t,e),Il(t,e.R),Tl(t,e))}function _f(e,t){var n=null,r=null;return If(e,t.then((function(t){return n=Bo(t),r=Ji(t),yf(e,t)}),(function(t){var n=null;throw t&&"auth/multi-factor-auth-required"===t.code&&(n=cl(t.w(),e,k(e.kc,e))),n||t})).then((function(){return ei({user:kf(e),credential:n,additionalUserInfo:r,operationType:"signIn"})})))}function wf(e){return e.app}function kf(e){return e.currentUser}function Ef(e){return kf(e)&&kf(e)._lat||null}function Sf(e){if(e.ba){for(var t=0;t<e.s.length;t++)e.s[t]&&e.s[t](Ef(e));if(e.W!==e.getUid()&&e.N.length)for(e.W=e.getUid(),t=0;t<e.N.length;t++)e.N[t]&&e.N[t](Ef(e))}}function If(e,t){return e.P.push(t),t.oa((function(){Q(e.P,t)})),t}function xf(){}function Tf(){this.a={},this.b=1e12}rf.prototype.yb=function(e){var t=null,n=this;return function(e){var t=new T("invalid-persistence-type"),n=new T("unsupported-persistence-type");e:{for(r in rc)if(rc[r]==e){var r=!0;break e}r=!1}if(!r||"string"!==typeof e)throw t;switch(Sr()){case"ReactNative":if("session"===e)throw n;break;case"Node":if("none"!==e)throw n;break;case"Worker":if("session"===e||!Mu()&&"none"!==e)throw n;break;default:if(!Rr()&&"none"!==e)throw n}}
2(e),ff(this,(function(){return e!=n.c.F?n.b.get(n.c,n.a).then((function(r){return t=r,of(n,e)})).then((function(){if(n.c=sf(e),t)return n.b.set(n.c,t,n.a)})):Ot()}))},I(hf,En),I(df,Jt),I(pf,Jt),I(gf,Jt),(n=hf.prototype).yb=function(e){return If(this,e=this.i.yb(e))},n.xa=function(e){this.aa===e||this.l||(this.aa=e,ss(this.a,this.aa),this.dispatchEvent(new df(this.la())))},n.la=function(){return this.aa},n.fd=function(){var e=u.navigator;this.xa(e&&(e.languages&&e.languages[0]||e.language||e.userLanguage)||null)},n.gd=function(e,t){if(!this.R){if(!/^https?:\/\//.test(e))throw new T("argument-error","Emulator URL must start with a valid scheme (http:// or https://).");(function(e){"undefined"!==typeof console&&"function"===typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials."),u.document&&!e&&_r().then((function(){var e=u.document.createElement("div");e.innerText="Running in emulator mode. Do not use with production credentials.",e.style.position="fixed",e.style.width="100%",e.style.backgroundColor="#ffffff",e.style.border=".1em solid #000000",e.style.color="#b50000",e.style.bottom="0px",e.style.left="0px",e.style.margin="0px",e.style.zIndex=1e4,e.style.textAlign="center",e.classList.add("firebase-emulator-warning"),u.document.body.appendChild(e)}))})(t=!!t&&!!t.disableWarnings),this.R={url:e,ec:t},this.settings.jb=!0,us(this.a,this.R),this.dispatchEvent(new pf(this.R))}},n.Gc=function(e){this.J.push(e),ls(this.a,t.default.SDK_VERSION?Ar(t.default.SDK_VERSION,this.J):null),this.dispatchEvent(new gf(this.J))},n.Ga=function(){return Z(this.J)},n.zb=function(e){this.S===e||this.l||(this.S=e,this.a.b=this.S)},n.T=function(){return this.S},n.toJSON=function(){return{apiKey:wf(this).options.apiKey,authDomain:wf(this).options.authDomain,appName:wf(this).name,currentUser:kf(this)&&kf(this).w()}},n.Gb=function(e,t){switch(e){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==t&&!!this.f;default:return!1}},n.na=function(e,t,n,r){"signInViaPopup"==e&&this.g==r&&(n&&this.C?this.C(n):t&&!n&&this.f&&this.f(t),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.C)},n.Fa=function(e,t){return"signInViaRedirect"==e||"signInViaPopup"==e&&this.g==t&&this.f?k(this.ic,this):null},n.ic=function(e,t,n,r){var i=this,o={requestUri:e,postBody:r,sessionId:t,tenantId:n};return this.c&&(this.c.cancel(),this.c=null),i.$.then((function(){return _f(i,Ss(i.a,o))}))},n.Xc=function(e){if(!jr())return At(new T("operation-not-supported-in-this-environment"));var n=this,r=Xi(e.providerId),i=Br(),o=null;(!Lr()||kr())&&wf(this).options.authDomain&&e.isOAuthProvider&&(o=ku(wf(this).options.authDomain,wf(this).options.apiKey,wf(this).name,"signInViaPopup",e,null,i,t.default.SDK_VERSION||null,null,null,this.T(),this.R));var a=mr(o,r&&r.va,r&&r.ua);return If(this,r=vf(this).then((function(t){return qc(t,a,"signInViaPopup",e,i,!!o,n.T())})).then((function(){return new kt((function(e,t){n.na("signInViaPopup",null,new T("cancelled-popup-request"),n.g),n.f=e,n.C=t,n.g=i,n.c=Kc(n.b,n,"signInViaPopup",a,i)}))})).then((function(e){return a&&vr(a),e?ei(e):null})).o((function(e){throw a&&vr(a),e})))},n.Yc=function(e){if(!jr())return At(new T("operation-not-supported-in-this-environment"));var t=this;return If(this,vf(this).then((function(){return function(e){return ff(e,(function(){return e.b.set(af,e.c.F,e.a)}))}(t.i)})).then((function(){return Hc(t.b,"signInViaRedirect",e,void 0,t.T())})))},n.ra=function(){var e=this;return mf(this).then((function(t){return e.b&&Xc(e.b.b),t})).o((function(t){throw e.b&&Xc(e.b.b),t}))},n.dd=function(e){if(!e)return At(new T("null-user"));if(this.S!=e.tenantId)return At(new T("tenant-id-mismatch"));var t=this,n={};n.apiKey=wf(this).options.apiKey,n.authDomain=wf(this).options.authDomain,n.appName=wf(this).name;var r=function(e,t,n,r){var i=e.h,o={};return o[ns]=i.b&&i.b.toString(),o.refreshToken=i.a,t=new Sl(t||{apiKey:e.l,authDomain:e.s,appName:e.m},o),n&&(t.ha=n),r&&Cl(t,r),zl(t,e),t}(e,n,t.D,t.Ga());return If(this,this.h.then((function(){if(wf(t).options.apiKey!=e.l)return r.reload()})).then((function(){return kf(t)&&e.uid==kf(t).uid?(zl(kf(t),e),t.da(e)):(bf(t,r),Dl(r),t.da(r))})).then((function(){Sf(t)})))},n.Bb=function(){var e=this;return If(this,this.h.then((function(){return e.b&&Xc(e.b.b),kf(e)?(bf(e,null),cf(e.i).then((function(){Sf(e)}))):Ot()})))},n.Zc=function(){var e=this;return lf(this.i,wf(this).options.authDomain).then((function(t){if(!e.l){var n;if(n=kf(e)&&t){n=kf(e).uid;var r=t.uid;n=void 0!==n&&null!==n&&""!==n&&void 0!==r&&null!==r&&""!==r&&n==r}if(n)return zl(kf(e),t),kf(e).I();(kf(e)||t)&&(bf(e,t),t&&(Dl(t),t.ha=e.D),e.b&&Fc(e.b,e),Sf(e))}}))},n.da=function(e){return uf(this.i,e)},n.mc=function(){Sf(this),this.da(kf(this))},n.wc=function(){this.Bb()},n.xc=function(){this.Bb()},n.kc=function(e){var t=this;return this.h.then((function(){return _f(t,Ot(e))}))},n.zc=function(e){var t=this;this.addAuthTokenListener((function(){e.next(kf(t))}))},n.Ac=function(e){var t=this;!function(e,t){e.N.push(t),If(e,e.h.then((function(){!e.l&&$(e.N,t)&&e.W!==e.getUid()&&(e.W=e.getUid(),t(Ef(e)))})))}(this,(function(){e.next(kf(t))}))},n.Ic=function(e,t,n){var r=this;return this.ba&&Promise.resolve().then((function(){"function"===typeof e?e(kf(r)):"function"===typeof e.next&&e.next(kf(r))})),this.Pa(e,t,n)},n.Hc=function(e,t,n){var r=this;return this.ba&&Promise.resolve().then((function(){r.W=r.getUid(),"function"===typeof e?e(kf(r)):"function"===typeof e.next&&e.next(kf(r))})),this.ib(e,t,n)},n.nc=function(e){var t=this;return If(this,this.h.then((function(){return kf(t)?kf(t).I(e).then((function(e){return{accessToken:e}})):null})))},n.Tc=function(e){var t=this;return this.h.then((function(){return _f(t,su(t.a,tu,{token:e}))})).then((function(e){var n=e.user;return ql(n,"isAnonymous",!1),t.da(n),e}))},n.Uc=function(e,t){var n=this;return this.h.then((function(){return _f(n,su(n.a,nu,{email:e,password:t}))}))},n.dc=function(e,t){var n=this;return this.h.then((function(){return _f(n,su(n.a,As,{email:e,password:t}))}))},n.ab=function(e){var t=this;return this.h.then((function(){return _f(t,e.ka(t.a))}))},n.Sc=function(e){return Qr("firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential is deprecated. Please use firebase.auth.Auth.prototype.signInWithCredential instead."),this.ab(e)},n.Ab=function(){var e=this;return this.h.then((function(){var t=kf(e);
2if(t&&t.isAnonymous){var n=ei({providerId:null,isNewUser:!1});return ei({user:t,credential:null,additionalUserInfo:n,operationType:"signIn"})}return _f(e,e.a.Ab()).then((function(t){var n=t.user;return ql(n,"isAnonymous",!0),e.da(n),t}))}))},n.getUid=function(){return kf(this)&&kf(this).uid||null},n.cc=function(e){this.addAuthTokenListener(e),this.u++,0<this.u&&kf(this)&&Nl(kf(this))},n.Pc=function(e){var t=this;K(this.s,(function(n){n==e&&t.u--})),0>this.u&&(this.u=0),0==this.u&&kf(this)&&Pl(kf(this)),this.removeAuthTokenListener(e)},n.addAuthTokenListener=function(e){var t=this;this.s.push(e),If(this,this.h.then((function(){t.l||$(t.s,e)&&e(Ef(t))})))},n.removeAuthTokenListener=function(e){X(this.s,(function(t){return t==e}))},n.delete=function(){this.l=!0;for(var e=0;e<this.P.length;e++)this.P[e].cancel("app-deleted");return this.P=[],this.i&&(e=this.i).b.removeListener(sf("local"),e.a,this.ja),this.b&&(Uc(this.b,this),Xc(this.b.b)),Promise.resolve()},n.hc=function(e){return If(this,function(e,t){return su(e,Ns,{identifier:t,continueUri:Dr()?hr():"http://localhost"}).then((function(e){return e.signinMethods||[]}))}(this.a,e))},n.Bc=function(e){return!!Do(e)},n.xb=function(e,t){var n=this;return If(this,Ot().then((function(){var e=new Pi(t);if(!e.c)throw new T("argument-error",Di+" must be true when sending sign in link to email");return qi(e)})).then((function(t){return n.a.xb(e,t)})).then((function(){})))},n.jd=function(e){return this.Sa(e).then((function(e){return e.data.email}))},n.ob=function(e,t){return If(this,this.a.ob(e,t).then((function(){})))},n.Sa=function(e){return If(this,this.a.Sa(e).then((function(e){return new ci(e)})))},n.kb=function(e){return If(this,this.a.kb(e).then((function(){})))},n.wb=function(e,t){var n=this;return If(this,Ot().then((function(){return"undefined"===typeof t||ge(t)?{}:qi(new Pi(t))})).then((function(t){return n.a.wb(e,t)})).then((function(){})))},n.Wc=function(e,t){return If(this,rl(this,e,t,k(this.ab,this)))},n.Vc=function(e,t){var n=this;return If(this,Ot().then((function(){var r=t||hr(),i=jo(e,r);if(!(r=Do(r)))throw new T("argument-error","Invalid email link!");if(r.tenantId!==n.T())throw new T("tenant-id-mismatch");return n.ab(i)})))},xf.prototype.render=function(){},xf.prototype.reset=function(){},xf.prototype.getResponse=function(){},xf.prototype.execute=function(){};var Cf=null;function Of(e,t){return(t=Af(t))&&e.a[t]||null}function Af(e){return(e="undefined"===typeof e?1e12:e)?e.toString():null}function Nf(e,t){this.g=!1,this.c=t,this.a=this.b=null,this.h="invisible"!==this.c.size,this.f=lt(e);var n=this;this.i=function(){n.execute()},this.h?this.execute():fn(this.f,"click",this.i)}function Pf(e){if(e.g)throw Error("reCAPTCHA mock was already deleted!")}function Rf(){}function jf(){}Tf.prototype.render=function(e,t){return this.a[this.b.toString()]=new Nf(e,t),this.b++},Tf.prototype.reset=function(e){var t=Of(this,e);e=Af(e),t&&e&&(t.delete(),delete this.a[e])},Tf.prototype.getResponse=function(e){return(e=Of(this,e))?e.getResponse():null},Tf.prototype.execute=function(e){(e=Of(this,e))&&e.execute()},Nf.prototype.getResponse=function(){return Pf(this),this.b},Nf.prototype.execute=function(){Pf(this);var e=this;this.a||(this.a=setTimeout((function(){e.b=function(){for(var e=50,t=[];0<e;)t.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),e--;return t.join("")}();var t=e.c.callback,n=e.c["expired-callback"];if(t)try{t(e.b)}catch(r){}e.a=setTimeout((function(){if(e.a=null,e.b=null,n)try{n()}catch(r){}e.h&&e.execute()}),6e4)}),500))},Nf.prototype.delete=function(){Pf(this),this.g=!0,clearTimeout(this.a),this.a=null,pn(this.f,"click",this.i)},Jr(Rf,"FACTOR_ID","phone"),jf.prototype.g=function(){return Cf||(Cf=new Tf),Ot(Cf)},jf.prototype.c=function(){};var Df=null;function Mf(){this.b=u.grecaptcha?1/0:0,this.f=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}var Lf=new _e(Se,"https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),Ff=new Hr(3e4,6e4);Mf.prototype.g=function(e){var t=this;return new kt((function(n,r){var i=setTimeout((function(){r(new T("network-request-failed"))}),Ff.get());!u.grecaptcha||e!==t.f&&!t.b?(u[t.a]=function(){if(u.grecaptcha){t.f=e;var o=u.grecaptcha.render;u.grecaptcha.render=function(e,n){return e=o(e,n),t.b++,e},clearTimeout(i),n(u.grecaptcha)}else clearTimeout(i),r(new T("internal-error"));delete u[t.a]},Ot(Ga(Ce(Lf,{onload:t.a,hl:e||""}))).o((function(){clearTimeout(i),r(new T("internal-error","Unable to load external reCAPTCHA dependencies!"))}))):(clearTimeout(i),n(u.grecaptcha))}))},Mf.prototype.c=function(){this.b--};var Uf=null;function Vf(e,t,n,r,i,o,a){if(Jr(this,"type","recaptcha"),this.c=this.f=null,this.J=!1,this.v=t,this.g=null,a?(Df||(Df=ne
2w jf),a=Df):(Uf||(Uf=new Mf),a=Uf),this.m=a,this.a=n||{theme:"light",type:"image"},this.h=[],this.a[zf])throw new T("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.i="invisible"===this.a[Hf],!u.document)throw new T("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!lt(t)||!this.i&&lt(t).hasChildNodes())throw new T("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.s=new es(e,o||null,i||null),this.u=r||function(){return null};var s=this;this.l=[];var c=this.a[Bf];this.a[Bf]=function(e){if(Kf(s,e),"function"===typeof c)c(e);else if("string"===typeof c){var t=Pr(c,u);"function"===typeof t&&t(e)}};var l=this.a[qf];this.a[qf]=function(){if(Kf(s,null),"function"===typeof l)l();else if("string"===typeof l){var e=Pr(l,u);"function"===typeof e&&e()}}}var Bf="callback",qf="expired-callback",zf="sitekey",Hf="size";function Kf(e,t){for(var n=0;n<e.l.length;n++)try{e.l[n](t)}catch(r){}}function Wf(e,t){return e.h.push(t),t.oa((function(){Q(e.h,t)})),t}function Gf(e){if(e.J)throw new T("internal-error","RecaptchaVerifier instance has been destroyed.")}function Yf(e,n,r){var i=!1;try{this.b=r||t.default.app()}catch(s){throw new T("argument-error","No firebase.app.App instance is currently initialized.")}if(!this.b.options||!this.b.options.apiKey)throw new T("invalid-api-key");r=this.b.options.apiKey;var o=this,a=null;try{a=this.b.auth().Ga()}catch(s){}try{i=this.b.auth().settings.appVerificationDisabledForTesting}catch(s){}a=t.default.SDK_VERSION?Ar(t.default.SDK_VERSION,a):null,Vf.call(this,r,e,n,(function(){try{var e=o.b.auth().la()}catch(t){e=null}return e}),a,R(O),i)}function $f(e,t,n,r){e:{n=Array.prototype.slice.call(n);for(var i=0,o=!1,a=0;a<t.length;a++)if(t[a].optional)o=!0;else{if(o)throw new T("internal-error","Argument validator encountered a required argument after an optional argument.");i++}if(o=t.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=t[i].optional&&void 0===n[i],!t[i].M(n[i])&&!o){if(t=t[i],0>i||i>=Qf.length)throw new T("internal-error","Argument validator received an unsupported number of arguments.");n=Qf[i],r=(r?"":n+" argument ")+(t.name?'"'+t.name+'" ':"")+"must be "+t.K+".";break e}r=null}}if(r)throw new T("argument-error",e+" failed: "+r)}(n=Vf.prototype).Ia=function(){var e=this;return this.f?this.f:this.f=Wf(this,Ot().then((function(){if(Dr()&&!Er())return _r();throw new T("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")})).then((function(){return e.m.g(e.u())})).then((function(t){return e.g=t,su(e.s,Hs,{})})).then((function(t){e.a[zf]=t.recaptchaSiteKey})).o((function(t){throw e.f=null,t})))},n.render=function(){Gf(this);var e=this;return Wf(this,this.Ia().then((function(){if(null===e.c){var t=e.v;if(!e.i){var n=lt(t);t=function(e,t,n){var r=arguments,i=document,o=String(r[0]),a=r[1];if(!ct&&a&&(a.name||a.type)){if(o=["<",o],a.name&&o.push(' name="',Ke(a.name),'"'),a.type){o.push(' type="',Ke(a.type),'"');var s={};ye(s,a),delete s.type,a=s}o.push(">"),o=o.join("")}return o=vt(i,o),a&&("string"===typeof a?o.className=a:Array.isArray(a)?o.className=a.join(" "):ft(o,a)),2<r.length&&gt(i,o,r),o}("DIV"),n.appendChild(t)}e.c=e.g.render(t,e.a)}return e.c})))},n.verify=function(){Gf(this);var e=this;return Wf(this,this.render().then((function(t){return new kt((function(n){var r=e.g.getResponse(t);if(r)n(r);else{e.l.push((function t(r){r&&(function(e,t){X(e.l,(function(e){return e==t}))}(e,t),n(r))})),e.i&&e.g.execute(e.c)}}))})))},n.reset=function(){Gf(this),null!==this.c&&this.g.reset(this.c)},n.clear=function(){Gf(this),this.J=!0,this.m.c();for(var e=0;e<this.h.length;e++)this.h[e].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.i){e=lt(this.v);for(var t;t=e.firstChild;)e.removeChild(t)}},I(Yf,Vf);var Qf="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function Xf(e,t){return{name:e||"",K:"a valid string",optional:!!t,M:function(e){return"string"===typeof e}}}function Jf(e,t){return{name:e||"",K:"a boolean",optional:!!t,M:function(e){return"boolean"===typeof e}}}function Zf(e,t){return{name:e||"",K:"a valid object",optional:!!t,M:v}}function eh(e,t){return{name:e||"",K:"a function",optional:!!t,M:function(e){return"function"===typeof e}}}function th(e,t){return{name:e||"",K:"null",optional:!!t,M:function(e){return null===e}}}function nh(e){return{name:e?e+"Credential":"credential",K:e?"a valid "+e+" credential":"a valid credential",optional:!1,M:function(t){if(!t)return!1;var n=!e||t.providerId===e;return!(!t.ka||!n)}}}function rh(e,t){return v(e)&&"string"===typeof e.type&&e.type===t&&"function"===typeof e.Ha}function ih(e){return v(e)&&"string"===typeof e.uid}function oh(e,t,n,r){return{name:n||"",K:e.K+" or "+t.K,optional:!!r,M:function(n){return e.M(n)||t.M(n)}}}function ah(e,t){for(var n in t){var r=t[n].name;e[r]=ch(r,e[n],t[n].j)}}function sh(e,t){for(var n in t){var r=t[n].name;r!==n&&Object.defineProperty(e,r,{get:E((function(e){return this[e]}
2),n),set:E((function(e,t,n,r){$f(e,[n],[r],!0),this[t]=r}),r,n,t[n].lb),enumerable:!0})}}function uh(e,t,n,r){e[t]=ch(t,n,r)}function ch(e,t,n){function r(){var e=Array.prototype.slice.call(arguments);return $f(o,n,e),t.apply(this,e)}if(!n)return t;var i,o=function(e){return(e=e.split("."))[e.length-1]}(e);for(i in t)r[i]=t[i];for(i in t.prototype)r.prototype[i]=t.prototype[i];return r}ah(hf.prototype,{kb:{name:"applyActionCode",j:[Xf("code")]},Sa:{name:"checkActionCode",j:[Xf("code")]},ob:{name:"confirmPasswordReset",j:[Xf("code"),Xf("newPassword")]},dc:{name:"createUserWithEmailAndPassword",j:[Xf("email"),Xf("password")]},hc:{name:"fetchSignInMethodsForEmail",j:[Xf("email")]},ra:{name:"getRedirectResult",j:[]},Bc:{name:"isSignInWithEmailLink",j:[Xf("emailLink")]},Hc:{name:"onAuthStateChanged",j:[oh(Zf(),eh(),"nextOrObserver"),eh("opt_error",!0),eh("opt_completed",!0)]},Ic:{name:"onIdTokenChanged",j:[oh(Zf(),eh(),"nextOrObserver"),eh("opt_error",!0),eh("opt_completed",!0)]},wb:{name:"sendPasswordResetEmail",j:[Xf("email"),oh(Zf("opt_actionCodeSettings",!0),th(null,!0),"opt_actionCodeSettings",!0)]},xb:{name:"sendSignInLinkToEmail",j:[Xf("email"),Zf("actionCodeSettings")]},yb:{name:"setPersistence",j:[Xf("persistence")]},Sc:{name:"signInAndRetrieveDataWithCredential",j:[nh()]},Ab:{name:"signInAnonymously",j:[]},ab:{name:"signInWithCredential",j:[nh()]},Tc:{name:"signInWithCustomToken",j:[Xf("token")]},Uc:{name:"signInWithEmailAndPassword",j:[Xf("email"),Xf("password")]},Vc:{name:"signInWithEmailLink",j:[Xf("email"),Xf("emailLink",!0)]},Wc:{name:"signInWithPhoneNumber",j:[Xf("phoneNumber"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(e){return!(!e||"string"!==typeof e.type||"function"!==typeof e.verify)}}]},Xc:{name:"signInWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},Yc:{name:"signInWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},dd:{name:"updateCurrentUser",j:[oh({name:"user",K:"an instance of Firebase User",optional:!1,M:function(e){return!!(e&&e instanceof Sl)}},th(),"user")]},Bb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[Xf(null,!0)]},fd:{name:"useDeviceLanguage",j:[]},gd:{name:"useEmulator",j:[Xf("url"),Zf("options",!0)]},jd:{name:"verifyPasswordResetCode",j:[Xf("code")]}}),sh(hf.prototype,{lc:{name:"languageCode",lb:oh(Xf(),th(),"languageCode")},ti:{name:"tenantId",lb:oh(Xf(),th(),"tenantId")}}),hf.Persistence=rc,hf.Persistence.LOCAL="local",hf.Persistence.SESSION="session",hf.Persistence.NONE="none",ah(Sl.prototype,{delete:{name:"delete",j:[]},oc:{name:"getIdTokenResult",j:[Jf("opt_forceRefresh",!0)]},I:{name:"getIdToken",j:[Jf("opt_forceRefresh",!0)]},Cc:{name:"linkAndRetrieveDataWithCredential",j:[nh()]},rb:{name:"linkWithCredential",j:[nh()]},Dc:{name:"linkWithPhoneNumber",j:[Xf("phoneNumber"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(e){return!(!e||"string"!==typeof e.type||"function"!==typeof e.verify)}}]},Ec:{name:"linkWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},Fc:{name:"linkWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},Lc:{name:"reauthenticateAndRetrieveDataWithCredential",j:[nh()]},ub:{name:"reauthenticateWithCredential",j:[nh()]},Mc:{name:"reauthenticateWithPhoneNumber",j:[Xf("phoneNumber"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(e){return!(!e||"string"!==typeof e.type||"function"!==typeof e.verify)}}]},Nc:{name:"reauthenticateWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},Oc:{name:"reauthenticateWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},reload:{name:"reload",j:[]},vb:{name:"sendEmailVerification",j:[oh(Zf("opt_actionCodeSettings",!0),th(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[Xf(null,!0)]},cd:{name:"unlink",j:[Xf("provider")]},Cb:{name:"updateEmail",j:[Xf("email")]},Db:{name:"updatePassword",j:[Xf("password")]},ed:{name:"updatePhoneNumber",j:[nh("phone")]},Eb:{name:"updateProfile",j:[Zf("profile")]},Fb:{name:"verifyBeforeUpdateEmail",j:[Xf("email"),oh(Zf("opt_actionCodeSettings",!0),th(null,!0),"opt_actionCodeSettings",!0)]}}),ah(Tf.prototype,{execute:{name:"execute"},render:{name:"render"}
2,reset:{name:"reset"},getResponse:{name:"getResponse"}}),ah(xf.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),ah(kt.prototype,{oa:{name:"finally"},o:{name:"catch"},then:{name:"then"}}),sh(tl.prototype,{appVerificationDisabled:{name:"appVerificationDisabledForTesting",lb:Jf("appVerificationDisabledForTesting")}}),ah(nl.prototype,{confirm:{name:"confirm",j:[Xf("verificationCode")]}}),uh(fo,"fromJSON",(function(e){e="string"===typeof e?JSON.parse(e):e;for(var t,n=[bo,Po,Lo,vo],r=0;r<n.length;r++)if(t=n[r](e))return t;return null}),[oh(Xf(),Zf(),"json")]),uh(Ro,"credential",(function(e,t){return new No(e,t)}),[Xf("email"),Xf("password")]),ah(No.prototype,{w:{name:"toJSON",j:[Xf(null,!0)]}}),ah(Eo.prototype,{Ca:{name:"addScope",j:[Xf("scope")]},Ka:{name:"setCustomParameters",j:[Zf("customOAuthParameters")]}}),uh(Eo,"credential",So,[oh(Xf(),Zf(),"token")]),uh(Ro,"credentialWithLink",jo,[Xf("email"),Xf("emailLink")]),ah(Io.prototype,{Ca:{name:"addScope",j:[Xf("scope")]},Ka:{name:"setCustomParameters",j:[Zf("customOAuthParameters")]}}),uh(Io,"credential",xo,[oh(Xf(),Zf(),"token")]),ah(To.prototype,{Ca:{name:"addScope",j:[Xf("scope")]},Ka:{name:"setCustomParameters",j:[Zf("customOAuthParameters")]}}),uh(To,"credential",Co,[oh(Xf(),oh(Zf(),th()),"idToken"),oh(Xf(),th(),"accessToken",!0)]),ah(Oo.prototype,{Ka:{name:"setCustomParameters",j:[Zf("customOAuthParameters")]}}),uh(Oo,"credential",Ao,[oh(Xf(),Zf(),"token"),Xf("secret",!0)]),ah(ko.prototype,{Ca:{name:"addScope",j:[Xf("scope")]},credential:{name:"credential",j:[oh(Xf(),oh(Zf(),th()),"optionsOrIdToken"),oh(Xf(),th(),"accessToken",!0)]},Ka:{name:"setCustomParameters",j:[Zf("customOAuthParameters")]}}),ah(mo.prototype,{w:{name:"toJSON",j:[Xf(null,!0)]}}),ah(po.prototype,{w:{name:"toJSON",j:[Xf(null,!0)]}}),uh(Uo,"credential",Vo,[Xf("verificationId"),Xf("verificationCode")]),ah(Uo.prototype,{gb:{name:"verifyPhoneNumber",j:[oh(Xf(),{name:"phoneInfoOptions",K:"valid phone info options",optional:!1,M:function(e){return!!e&&(e.session&&e.phoneNumber?rh(e.session,co)&&"string"===typeof e.phoneNumber:e.session&&e.multiFactorHint?rh(e.session,lo)&&ih(e.multiFactorHint):e.session&&e.multiFactorUid?rh(e.session,lo)&&"string"===typeof e.multiFactorUid:!!e.phoneNumber&&"string"===typeof e.phoneNumber)}},"phoneInfoOptions"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(e){return!(!e||"string"!==typeof e.type||"function"!==typeof e.verify)}}]}}),ah(Mo.prototype,{w:{name:"toJSON",j:[Xf(null,!0)]}}),ah(T.prototype,{toJSON:{name:"toJSON",j:[Xf(null,!0)]}}),ah($o.prototype,{toJSON:{name:"toJSON",j:[Xf(null,!0)]}}),ah(Yo.prototype,{toJSON:{name:"toJSON",j:[Xf(null,!0)]}}),ah(ul.prototype,{toJSON:{name:"toJSON",j:[Xf(null,!0)]}}),ah(ol.prototype,{Rc:{name:"resolveSignIn",j:[{name:"multiFactorAssertion",K:"a valid multiFactorAssertion",optional:!1,M:function(e){return!!e&&!!e.tb}}]}}),ah(pl.prototype,{Sb:{name:"getSession",j:[]},fc:{name:"enroll",j:[{name:"multiFactorAssertion",K:"a valid multiFactorAssertion",optional:!1,M:function(e){return!!e&&!!e.tb}},Xf("displayName",!0)]},bd:{name:"unenroll",j:[oh({name:"multiFactorInfo",K:"a valid multiFactorInfo",optional:!1,M:ih},Xf(),"multiFactorInfoIdentifier")]}}),ah(Yf.prototype,{clear:{name:"clear",j:[]},render:{name:"render",j:[]},verify:{name:"verify",j:[]}}),uh(Ei,"parseLink",Ni,[Xf("link")]),uh(Rf,"assertion",(function(e){return new hl(e)}),[nh("phone")]),function(){if("undefined"===typeof t.default||!t.default.INTERNAL||!t.default.INTERNAL.registerComponent)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var e={ActionCodeInfo:{Operation:{EMAIL_SIGNIN:fi,PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:li,VERIFY_AND_CHANGE_EMAIL:hi,VERIFY_EMAIL:"VERIFY_EMAIL"}},Auth:hf,AuthCredential:fo,Error:T};uh(e,"EmailAuthProvider",Ro,[]),uh(e,"FacebookAuthProvider",Eo,[]),uh(e,"GithubAuthProvider",Io,[]),uh(e,"GoogleAuthProvider",To,[]),uh(e,"TwitterAuthProvider",Oo,[]),uh(e,"OAuthProvider",ko,[Xf("providerId")]),uh(e,"SAMLAuthProvider",wo,[Xf("providerId")]),uh(e,"PhoneAuthProvider",
2Uo,[{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(e){return!!(e&&e instanceof hf)}}]),uh(e,"RecaptchaVerifier",Yf,[oh(Xf(),{name:"",K:"an HTML element",optional:!1,M:function(e){return!!(e&&e instanceof Element)}},"recaptchaContainer"),Zf("recaptchaParameters",!0),{name:"app",K:"an instance of Firebase App",optional:!0,M:function(e){return!!(e&&e instanceof t.default.app.App)}}]),uh(e,"ActionCodeURL",Ei,[]),uh(e,"PhoneMultiFactorGenerator",Rf,[]),t.default.INTERNAL.registerComponent({name:"auth",instanceFactory:function(e){return new hf(e=e.getProvider("app").getImmediate())},multipleInstances:!1,serviceProps:e,instantiationMode:"LAZY",type:"PUBLIC"}),t.default.INTERNAL.registerComponent({name:"auth-internal",instanceFactory:function(e){return{getUid:k((e=e.getProvider("auth").getImmediate()).getUid,e),getToken:k(e.nc,e),addAuthTokenListener:k(e.cc,e),removeAuthTokenListener:k(e.Pc,e)}},multipleInstances:!1,instantiationMode:"LAZY",type:"PRIVATE"}),t.default.registerVersion("@firebase/auth","0.16.7"),t.default.INTERNAL.extendNamespace({User:Sl})}()}).apply("undefined"!==typeof e?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})}).call(this,n(32))},function(e,t,n){var r=n(91),i=n(92),o={float:"cssFloat"},a=n(95);function s(e,t,n){var s=o[t];if("undefined"===typeof s&&(s=function(e){var t=i(e),n=r(t);return o[t]=o[e]=o[n]=n,n}(t)),s){if(void 0===n)return e.style[s];e.style[s]=a(s,n)}}function u(e,t){for(var n in t)t.hasOwnProperty(n)&&s(e,n,t[n])}function c(){2===arguments.length?"string"===typeof arguments[1]?arguments[0].style.cssText=arguments[1]:u(arguments[0],arguments[1]):s(arguments[0],arguments[1],arguments[2])}e.exports=c,e.exports.set=c,e.exports.get=function(e,t){return Array.isArray(t)?t.reduce((function(t,n){return t[n]=s(e,n||""),t}),{}):s(e,t||"")}},,function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=function(e){var t=e.color,n=e.pushRight,r=void 0===n||n,o=e.children;return i.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{marginRight:r?"20px":"0",minWidth:24}},o)},a=function(){return i.a.createElement(o,{color:"#2E9AFE"},i.a.createElement("circle",{cx:"12",cy:"12",r:"10"}),i.a.createElement("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),i.a.createElement("line",{x1:"12",y1:"8",x2:"12",y2:"8"}))},s=function(){return i.a.createElement(o,{color:"#31B404"},i.a.createElement("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),i.a.createElement("polyline",{points:"22 4 12 14.01 9 11.01"}))},u=function(){return i.a.createElement(o,{color:"#FF0040"},i.a.createElement("circle",{cx:"12",cy:"12",r:"10"}),i.a.createElement("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),i.a.createElement("line",{x1:"12",y1:"16",x2:"12",y2:"16"}))},c=function(){return i.a.createElement(o,{color:"#FFFFFF",pushRight:!1},i.a.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.a.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))},l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f={backgroundColor:"#151515",color:"white",padding:"10px",textTransform:"uppercase",borderRadius:"3px",display:"flex",justifyContent:"space-between",alignItems:"center",boxShadow:"0px 2px 2px 2px rgba(0, 0, 0, 0.03)",fontFamily:"Arial",width:"300px",boxSizing:"border-box"},h={marginLeft:"20px",border:"none",backgroundColor:"transparent",cursor:"pointer",color:"#FFFFFF"};t.a=function(e){var t=e.message,n=e.options,r=e.style,o=e.close;return i.a.createElement("div",{style:l({},f,r)},"info"===n.type&&i.a.createElement(a,null),"success"===n.type&&i.a.createElement(s,null),"error"===n.type&&i.a.createElement(u,null),i.a.createElement("span",{style:{flex:2}},t),i.a.createElement("button",{onClick:o,style:h},i.a.createElement(c,null)))}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
2),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";t.__esModule=!0;var r,i=(r=n(1))&&r.__esModule?r:{default:r},o=Promise.resolve(),a=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.uiConfig=n.uiConfig,r.firebaseAuth=n.firebaseAuth,r.className=n.className,r.uiCallback=n.uiCallback,r.unregisterAuthObserver=function(){},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentDidMount=function(){var e=this;n(2);var t=n(7);return o.then((function(){e.firebaseUiWidget=t.auth.AuthUI.getInstance()||new t.auth.AuthUI(e.firebaseAuth),"popup"===e.uiConfig.signInFlow&&e.firebaseUiWidget.reset(),e.userSignedIn=!1,e.unregisterAuthObserver=e.firebaseAuth.onAuthStateChanged((function(t){!t&&e.userSignedIn&&e.firebaseUiWidget.reset(),e.userSignedIn=!!t})),e.uiCallback&&e.uiCallback(e.firebaseUiWidget),e.firebaseUiWidget.start("#firebaseui_container",e.uiConfig)}))},t.prototype.componentWillUnmount=function(){var e=this;return o=o.then((function(){return e.unregisterAuthObserver(),e.firebaseUiWidget.delete()}))},t.prototype.render=function(){return i.default.createElement("div",{className:this.className,id:"firebaseui_container"})},t}(i.default.Component);t.default=a},function(e,t){e.exports=n(2)},function(e,t,n){var r=n(3);"string"==typeof r&&(r=[[e.i,r,""]]);n(5)(r,{hmr:!0,transform:void 0,insertInto:void 0}),r.locals&&(e.exports=r.locals)},function(e,t,n){(t=e.exports=n(4)(!1)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap);",""]),t.push([e.i,'.mdl-button{background:0 0;border:none;border-radius:2px;color:#000;position:relative;height:36px;margin:0;min-width:64px;padding:0 16px;display:inline-block;font-family:Roboto,Helvetica,Arial,sans-serif;font-size:14px;font-weight:500;text-transform:uppercase;line-height:1;letter-spacing:0;overflow:hidden;will-change:box-shadow;transition:box-shadow .2s cubic-bezier(.4,0,1,1),background-color .2s cubic-bezier(.4,0,.2,1),color .2s cubic-bezier(.4,0,.2,1);outline:0;cursor:pointer;text-decoration:none;text-align:center;line-height:36px;vertical-align:middle}.mdl-button::-moz-focus-inner{border:0}.mdl-button:hover{background-color:hsla(0,0%,62%,.2)}.mdl-button:focus:not(:active){background-color:rgba(0,0,0,.12)}.mdl-button:active{background-color:hsla(0,0%,62%,.4)}.mdl-button.mdl-button--colored{color:#3f51b5}.mdl-button.mdl-button--colored:focus:not(:active){background-color:rgba(0,0,0,.12)}input.mdl-button[type=submit]{-webkit-appearance:none}.mdl-button--raised{background:hsla(0,0%,62%,.2);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}.mdl-button--raised:active{box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.2);background-color:hsla(0,0%,62%,.4)}.mdl-button--raised:focus:not(:active){box-shadow:0 0 8px rgba(0,0,0,.18),0 8px 16px rgba(0,0,0,.36);background-color:hsla(0,0%,62%,.4)}.mdl-button--raised.mdl-button--colored{background:#3f51b5;color:#fff}.mdl-button--raised.mdl-button--colored:active,.mdl-button--raised.mdl-button--colored:focus:not(:active),.mdl-button--raised.mdl-button--colored:hover{background-color:#3f51b5}.mdl-button--raised.mdl-button--colored .mdl-ripple{background:#fff}.mdl-button--fab{border-radius:50%;font-size:24px;height:56px;margin:auto;min-width:56px;width:56px;padding:0;overflow:hidden;background:hsla(0,0%,62%,.2);box-shadow:0 1px 1.5px 0 rgba(0,0,0,.12),0 1px 1px 0 rgba(0,0,0,.24);position:relative;line-height:normal}.mdl-button--fab .material-icons{position:absolute;top:50%;left:50%;transform:translate(-12px,-12px);line-height:24px;width:24px}.mdl-button--fab.mdl-button--mini-fab{height:40px;min-width:40px;width:40px}.mdl-button--fab .mdl-button__ripple-container{border-radius:50%;-webkit-mask-image:-webkit-radial-gradient(circle,#fff,#000)}.mdl-button--fab:active{box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.2);background-color:hsla(0,0%,62%,.4)}.mdl-button--fab:focus:not(:active){box-shadow:0 0 8px rgba(0,0,0,.18),0 8px 16px rgba(0,0,0,.36);background-color:hsla(0,0%,62%,.4)}.mdl-button--fab.mdl-button--colored{background:#ff4081;color:#fff}.mdl-button--fab.mdl-button--colored:active,.mdl-button--fab.mdl-button--colored:focus:not(:active),.mdl-button--fab.mdl-button--colored:hover{background-color:#ff4081}.mdl-button--fab.mdl-button--colored .mdl-ripple{background:#fff}.mdl-button--icon{border-radius:50%;font-size:24px;height:32px;margin-left:0;margin-right:0;min-width:32px;width:32px;padding:0;overflow:hidden;color:inherit;line-height:normal}.mdl-button--icon .material-icons{position:absolute;top:50%;left:50%;transform:translate(-12px,-12px);line-height:24px;width:24px}.mdl-button--icon.mdl-button--mini-icon{height:24px;min-width:24px;width:24px}.mdl-button--icon.mdl-button--mini-icon .material-icons{top:0;left:0}.mdl-button--icon .mdl-button__ripple-container{border-radius:50%;-webkit-mask-image:-webkit-radial-gradient(circle,#fff,#000)}.mdl-button__ripple-container{display:block;height:100%;left:0;position:absolute;top:0;width:100%;z-index:0;overflow:hidden}.mdl-button.mdl-button--disabled .mdl-button__ripple-container .mdl-ripple,.mdl-button[disabled] .mdl-button__ripple-container .mdl-ripple{background-color:transparent}.mdl-button--primary.mdl-button--primary{color:#3f51b5}.mdl-button--primary.mdl-button--primary .mdl-ripple{background:#fff}.mdl-button--primary.mdl-button--primary.mdl-button--fab,.mdl-button--primary.mdl-button--primary.mdl-button--raised{color:#fff;background-color:#3f51b5}.mdl-button--accent.mdl-button--accent{color:#ff4081}.mdl-button--accent.mdl-button--accent .mdl-ripple{background:#fff}.mdl-button--accent.mdl-button--accent.mdl-button--fab,.mdl-button--accent.mdl-button--accent.mdl-button--raised{color:#fff;background-color:#ff4081}.mdl-button.mdl-button--disabled.mdl-button--disabled,.mdl-button[disabled][disabled]{color:rgba(0,0,0,.26);cursor:default;background-color:transparent}.mdl-button--fab.mdl-button--disabled.mdl-button--disabled,.mdl-button--fab[disabled][disabled]{background-color:rgba(0,0,0,.12);color:rgba(0,0,0,.26)}.mdl-button--raised.mdl-button--disabled.mdl-button--disabled,.mdl-button--raised[disabled][disabled]{background-color:rgba(0,0,0,.12);color:rgba(0,0,0,.26);box-shadow:none}.mdl-button--colored.mdl-button--disabled.mdl-button--disabled,.mdl-button--colored[disabled][disabled]{color:rgba(0,0,0,.26)}.mdl-button .material-icons{vertical-align:middle}.mdl-card{display:flex;flex-direction:column;font-size:16px;font-weight:400;min-height:200px;overflow:hidden;width:330px;z-index:1;position:relative;background:#fff;border-radius:2px;box-sizing:border-box}.mdl-card__media{background-color:#ff4081;background-repeat:repeat;background-position:50% 50%;background-size:cover;background-origin:padding-box;background-attachment:scroll;box-sizing:border-box}.mdl-card__title{align-items:center;color:#000;display:block;display:flex;justify-content:stretch;line-height:normal;padding:16px;perspective-origin:165px 56px;transform-origin:165px 56px;box-sizing:border-box}.mdl-card__title.mdl-card--border{border-bottom:1px solid rgba(0,0,0,.1)}.mdl-card__title-text{align-self:flex-end;color:inherit;display:block;display:flex;font-size:24px;font-weight:300;line-height:normal;overflow:hidden;transform-origin:149px 48px;margin:0}.mdl-card__subtitle-text{font-size:14px;color:rgba(0,0,0,.54);margin:0}.mdl-card__supporting-text{color:rgba(0,0,0,.54);font-size:1rem;line-height:18px;overflow:hidden;padding:16px;width:90%}.mdl-card__supporting-text.mdl-card--border{border-bottom:1px solid rgba(0,0,0,.1)}.mdl-card__actions{font-size:16px;line-height:normal;width:100%;background-color:transparent;padding:8px;box-sizing:border-box}.mdl-card__actions.mdl-card--border{border-top:1px solid rgba(0,0,0,.1)}.mdl-card--expand{flex-grow:1}.mdl-card__menu{position:absolute;right:16px;top:16px}.mdl-dialog{border:none;box-shadow:0 9px 46px 8px rgba(0,0,0,.14),0 11px 15px -7px rgba(0,0,0,.12),0 24px 38px 3px rgba(0,0,0,.2);width:280px}.mdl-dialog__title{padding:24px 24px 0;margin:0;font-size:2.5rem}.mdl-dialog__actions{padding:8px 8px 8px 24px;display:flex;flex-direction:row-reverse;flex-wrap:wrap}.mdl-dialog__actions>*{margin-right:8px;height:36px}.mdl-dialog__actions>:first-child{margin-right:0}.mdl-dialog__actions--full-width{padding:0 0 8px}.mdl-dialog__actions--full-width>*{height:48px;flex:0 0 100%;padding-right:16px;margin-right:0;text-align:right}.mdl-dialog__content{padding:20px 24px 24px;color:rgba(0,0,0,.54)}.mdl-progress{display:block;position:relative;height:4px;width:500px;max-width:100%}.mdl-progress>.bar{display:block;position:absolute;top:0;bottom:0;width:0;transition:width .2s cubic-bezier(.4,0,.2,1)}.mdl-progress>.progressbar{background-color:#3f51b5;z-index:1;left:0}.mdl-progress>.bufferbar{background-image:linear-gradient(90deg,hsla(0,0%,100%,.7),hsla(0,0%,100%,.7)),linear-gradient(90deg,#3f51b5,#3f51b5);z-index:0;left:0}.mdl-progress>.auxbar{right:0}@supports (-webkit-appearance:none){.mdl-progress:not(.mdl-progress--indeterminate):not(.mdl-progress--indeterminate)>.auxbar,.mdl-progress:not(.mdl-progress__indeterminate):not(.mdl-progress__indeterminate)>.auxbar{background-image:linear-gradient(90deg,hsla(0,0%,100%,.7),hsla(0,0%,100%,.7)),linear-gradient(90deg,#3f51b5,#3f51b5);mask:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+Cjxzdmcgd2lkdGg9IjEyIiBoZWlnaHQ9IjQiIHZpZXdQb3J0PSIwIDAgMTIgNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxlbGxpcHNlIGN4PSIyIiBjeT0iMiIgcng9IjIiIHJ5PSIyIj4KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9ImN4IiBmcm9tPSIyIiB0bz0iLTEwIiBkdXI9IjAuNnMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPgogIDwvZWxsaXBzZT4KICA8ZWxsaXBzZSBjeD0iMTQiIGN5PSIyIiByeD0iMiIgcnk9IjIiIGNsYXNzPSJsb2FkZXIiPgogICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iY3giIGZyb209IjE0IiB0bz0iMiIgZHVyPSIwLjZzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4KICA8L2VsbGlwc2U+Cjwvc3ZnPgo=)}}.mdl-progress:not(.mdl-progress--indeterminate)>.auxbar,.mdl-progress:not(.mdl-progress__indeterminate)>.auxbar{background-image:linear-gradient(90deg,hsla(0,0%,100%,.9),hsla(0,0%,100%,.9)),linear-gradient(90deg,#3f51b5,#3f51b5)}.mdl-progress.mdl-progress--indeterminate>.bar1,.mdl-progress.mdl-progress__indeterminate>.bar1{background-color:#3f51b5;animation-name:indeterminate1;animation-duration:2s;animation-iteration-count:infinite;animation-timing-function:linear}.mdl-progress.mdl-progress--indeterminate>.bar3,.mdl-progress.mdl-progress__indeterminate>.bar3{background-image:none;background-color:#3f51b5;animation-name:indeterminate2;animation-duration:2s;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes indeterminate1{0%{left:0;width:0}50%{left:25%;width:75%}75%{left:100%;width:0}}@keyframes indeterminate2{0%{left:0;width:0}50%{left:0;width:0}75%{left:0;width:25%}to{left:100%;width:0}}.mdl-shadow--2dp{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12)}
2.mdl-shadow--3dp{box-shadow:0 3px 4px 0 rgba(0,0,0,.14),0 3px 3px -2px rgba(0,0,0,.2),0 1px 8px 0 rgba(0,0,0,.12)}.mdl-shadow--4dp{box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.2)}.mdl-shadow--6dp{box-shadow:0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12),0 3px 5px -1px rgba(0,0,0,.2)}.mdl-shadow--8dp{box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)}.mdl-shadow--16dp{box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.2)}.mdl-shadow--24dp{box-shadow:0 9px 46px 8px rgba(0,0,0,.14),0 11px 15px -7px rgba(0,0,0,.12),0 24px 38px 3px rgba(0,0,0,.2)}.mdl-spinner{display:inline-block;position:relative;width:28px;height:28px}.mdl-spinner:not(.is-upgraded).is-active:after{content:"Loading..."}.mdl-spinner.is-upgraded.is-active{animation:mdl-spinner__container-rotate 1.568s linear infinite}@keyframes mdl-spinner__container-rotate{to{transform:rotate(1turn)}}.mdl-spinner__layer{position:absolute;width:100%;height:100%;opacity:0}.mdl-spinner__layer-1{border-color:#42a5f5}.mdl-spinner--single-color .mdl-spinner__layer-1{border-color:#3f51b5}.mdl-spinner.is-active .mdl-spinner__layer-1{animation:mdl-spinner__fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1) infinite both,mdl-spinner__layer-1-fade-in-out 5332ms cubic-bezier(.4,0,.2,1) infinite both}.mdl-spinner__layer-2{border-color:#f44336}.mdl-spinner--single-color .mdl-spinner__layer-2{border-color:#3f51b5}.mdl-spinner.is-active .mdl-spinner__layer-2{animation:mdl-spinner__fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1) infinite both,mdl-spinner__layer-2-fade-in-out 5332ms cubic-bezier(.4,0,.2,1) infinite both}.mdl-spinner__layer-3{border-color:#fdd835}.mdl-spinner--single-color .mdl-spinner__layer-3{border-color:#3f51b5}.mdl-spinner.is-active .mdl-spinner__layer-3{animation:mdl-spinner__fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1) infinite both,mdl-spinner__layer-3-fade-in-out 5332ms cubic-bezier(.4,0,.2,1) infinite both}.mdl-spinner__layer-4{border-color:#4caf50}.mdl-spinner--single-color .mdl-spinner__layer-4{border-color:#3f51b5}.mdl-spinner.is-active .mdl-spinner__layer-4{animation:mdl-spinner__fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1) infinite both,mdl-spinner__layer-4-fade-in-out 5332ms cubic-bezier(.4,0,.2,1) infinite both}@keyframes mdl-spinner__fill-unfill-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}to{transform:rotate(3turn)}}@keyframes mdl-spinner__layer-1-fade-in-out{0%{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}
290%{opacity:.99}to{opacity:.99}}@keyframes mdl-spinner__layer-2-fade-in-out{0%{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}}@keyframes mdl-spinner__layer-3-fade-in-out{0%{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}}@keyframes mdl-spinner__layer-4-fade-in-out{0%{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}to{opacity:0}}.mdl-spinner__gap-patch{position:absolute;box-sizing:border-box;top:0;left:45%;width:10%;height:100%;overflow:hidden;border-color:inherit}.mdl-spinner__gap-patch .mdl-spinner__circle{width:1000%;left:-450%}.mdl-spinner__circle-clipper{display:inline-block;position:relative;width:50%;height:100%;overflow:hidden;border-color:inherit}.mdl-spinner__circle-clipper.mdl-spinner__left{float:left}.mdl-spinner__circle-clipper.mdl-spinner__right{float:right}.mdl-spinner__circle-clipper .mdl-spinner__circle{width:200%}.mdl-spinner__circle{box-sizing:border-box;height:100%;border-width:3px;border-style:solid;border-color:inherit;border-bottom-color:transparent!important;border-radius:50%;animation:none;position:absolute;top:0;right:0;bottom:0;left:0}.mdl-spinner__left .mdl-spinner__circle{border-right-color:transparent!important;transform:rotate(129deg)}.mdl-spinner.is-active .mdl-spinner__left .mdl-spinner__circle{animation:mdl-spinner__left-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both}.mdl-spinner__right .mdl-spinner__circle{left:-100%;border-left-color:transparent!important;transform:rotate(-129deg)}.mdl-spinner.is-active .mdl-spinner__right .mdl-spinner__circle{animation:mdl-spinner__right-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both}@keyframes mdl-spinner__left-spin{0%{transform:rotate(130deg)}50%{transform:rotate(-5deg)}to{transform:rotate(130deg)}}@keyframes mdl-spinner__right-spin{0%{transform:rotate(-130deg)}50%{transform:rotate(5deg)}to{transform:rotate(-130deg)}}.mdl-textfield{position:relative;font-size:16px;display:inline-block;box-sizing:border-box;width:300px;max-width:100%;margin:0;padding:20px 0}.mdl-textfield .mdl-button{position:absolute;bottom:20px}.mdl-textfield--align-right{text-align:right}.mdl-textfield--full-width{width:100%}.mdl-textfield--expandable{min-width:32px;width:auto;min-height:32px}.mdl-textfield--expandable .mdl-button--icon{top:16px}.mdl-textfield__input{border:none;border-bottom:1px solid rgba(0,0,0,.12);display:block;font-size:16px;font-family:Helvetica,Arial,sans-serif;margin:0;padding:4px 0;width:100%;background:0 0;text-align:left;color:inherit}.mdl-textfield__input[type=number]{-moz-appearance:textfield}.mdl-textfield__input[type=number]::-webkit-inner-spin-button,.mdl-textfield__input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.mdl-textfield.is-focused .mdl-textfield__input{outline:0}.mdl-textfield.is-invalid .mdl-textfield__input{border-color:#d50000;box-shadow:none}.mdl-textfield.is-disabled .mdl-textfield__input,fieldset[disabled] .mdl-textfield .mdl-textfield__input{background-color:transparent;border-bottom:1px dotted rgba(0,0,0,.12);color:rgba(0,0,0,.26)}.mdl-textfield textarea.mdl-textfield__input{display:block}.mdl-textfield__label{bottom:0;color:rgba(0,0,0,.26);font-size:16px;left:0;right:0;pointer-events:none;position:absolute;display:block;top:24px;width:100%;overflow:hidden;white-space:nowrap;text-align:left}.mdl-textfield.has-placeholder .mdl-textfield__label,.mdl-textfield.is-dirty .mdl-textfield__label{visibility:hidden}.mdl-textfield--floating-label .mdl-textfield__label{transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.mdl-textfield--floating-label.has-placeholder .mdl-textfield__label{transition:none}.mdl-textfield.is-disabled.is-disabled .mdl-textfield__label,fieldset[disabled] .mdl-textfield .mdl-textfield__label{color:rgba(0,0,0,.26)}.mdl-textfield--floating-label.has-placeholder .mdl-textfield__label,.mdl-textfield--floating-label.is-dirty .mdl-textfield__label,.mdl-textfield--floating-label.is-focused .mdl-textfield__label{color:#3f51b5;font-size:12px;top:4px;visibility:visible}.mdl-textfield--floating-label.has-placeholder .mdl-textfield__expandable-holder .mdl-textfield__label,.mdl-textfield--floating-label.is-dirty .mdl-textfield__expandable-holder .mdl-textfield__label,.mdl-textfield--floating-label.is-focused .mdl-textfield__expandable-holder .mdl-textfield__label{top:-16px}.mdl-textfield--floating-label.is-invalid .mdl-textfield__label{color:#d50000;font-size:12px}.mdl-textfield__label:after{background-color:#3f51b5;bottom:20px;content:"";height:2px;left:45%;position:absolute;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);visibility:hidden;width:10px}.mdl-textfield.is-focused .mdl-textfield__label:after{left:0;visibility:visible;width:100%}.mdl-textfield.is-invalid .mdl-textfield__label:after{background-color:#d50000}.mdl-textfield__error{color:#d50000;position:absolute;font-size:12px;margin-top:3px;visibility:hidden;display:block}.mdl-textfield.is-invalid .mdl-textfield__error{visibility:visible}.mdl-textfield__expandable-holder{position:relative;margin-left:32px;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);display:inline-block;max-width:.1px}.mdl-textfield.is-dirty .mdl-textfield__expandable-holder,.mdl-textfield.is-focused .mdl-textfield__expandable-holder{max-width:600px}.mdl-textfield__expandable-holder .mdl-textfield__label:after{bottom:0}dialog{position:absolute;
2left:0;right:0;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;margin:auto;border:solid;padding:1em;background:#fff;color:#000;display:block}dialog:not([open]){display:none}dialog+.backdrop{background:rgba(0,0,0,.1)}._dialog_overlay,dialog+.backdrop{position:fixed;top:0;right:0;bottom:0;left:0}dialog.fixed{position:fixed;top:50%;transform:translateY(-50%)}.firebaseui-container{background-color:#fff;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;color:rgba(0,0,0,.87);direction:ltr;font:16px Roboto,arial,sans-serif;margin:0 auto;max-width:360px;overflow:visible;position:relative;text-align:left;width:100%}.firebaseui-container.mdl-card{overflow:visible}.firebaseui-card-header{padding:24px 24px 0}.firebaseui-card-content,.firebaseui-card-footer{padding:0 24px}.firebaseui-card-actions{box-sizing:border-box;display:table;font-size:14px;padding:8px 24px 24px;text-align:left;width:100%}.firebaseui-form-links{display:table-cell;vertical-align:middle;width:100%}.firebaseui-form-actions{display:table-cell;text-align:right;white-space:nowrap;width:100%}.firebaseui-subtitle,.firebaseui-title{color:rgba(0,0,0,.87);direction:ltr;font-size:20px;font-weight:500;line-height:24px;margin:0;padding:0;text-align:left}.firebaseui-title{padding-bottom:16px}.firebaseui-subtitle{margin:16px 0}.firebaseui-text{color:rgba(0,0,0,.87);direction:ltr;font-size:16px;line-height:24px;text-align:left}.firebaseui-id-page-password-recovery-email-sent p.firebaseui-text{margin:16px 0}.firebaseui-text-emphasis{font-weight:700}.firebaseui-error{color:#dd2c00;direction:ltr;font-size:12px;line-height:16px;margin:0;text-align:left}.firebaseui-text-input-error{margin:-16px 0 16px}.firebaseui-error-wrapper{min-height:16px}.firebaseui-list-item{direction:ltr;margin:0;padding:0;text-align:left}.firebaseui-hidden{display:none}.firebaseui-relative-wrapper{position:relative}.firebaseui-label{color:rgba(0,0,0,.54);direction:ltr;font-size:16px;text-align:left}.mdl-textfield--floating-label.is-dirty .mdl-textfield__label,.mdl-textfield--floating-label.is-focused .mdl-textfield__label{color:#757575}.firebaseui-input,.firebaseui-input-invalid{border-radius:0;color:rgba(0,0,0,.87);direction:ltr;font-size:16px;width:100%}input.firebaseui-input,input.firebaseui-input-invalid{direction:ltr;text-align:left}.firebaseui-input-invalid{border-color:#dd2c00}.firebaseui-textfield{width:100%}.firebaseui-textfield.mdl-textfield .firebaseui-input{border-color:rgba(0,0,0,.12)}.firebaseui-textfield.mdl-textfield .firebaseui-label:after{background-color:#3f51b5}.firebaseui-textfield-invalid.mdl-textfield .firebaseui-input{border-color:#dd2c00}.firebaseui-textfield-invalid.mdl-textfield .firebaseui-label:after{background-color:#dd2c00}.firebaseui-button{display:inline-block;height:36px;margin-left:8px;min-width:88px}.firebaseui-link{color:#4285f4;font-variant:normal;font-weight:400;text-decoration:none}.firebaseui-link:hover{text-decoration:underline}.firebaseui-indent{margin-left:1em}.firebaseui-tos{color:#757575;direction:ltr;font-size:12px;line-height:16px;margin-bottom:24px;margin-top:0;text-align:left}.firebaseui-provider-sign-in-footer>.firebaseui-tos{text-align:center}.firebaseui-tos-list{list-style:none;text-align:right}.firebaseui-inline-list-item{display:inline-block;margin-left:5px;margin-right:5px}.firebaseui-page-provider-sign-in,.firebaseui-page-select-tenant{background:inherit}.firebaseui-idp-list,.firebaseui-tenant-list{list-style:none;margin:1em 0;padding:0}.firebaseui-idp-button,.firebaseui-tenant-button{direction:ltr;font-weight:500;height:auto;line-height:normal;max-width:220px;min-height:40px;padding:8px 16px;text-align:left;width:100%}.firebaseui-idp-list>.firebaseui-list-item,.firebaseui-tenant-list>.firebaseui-list-item{margin-bottom:15px;text-align:center}.firebaseui-idp-icon-wrapper{display:table-cell;vertical-align:middle}.firebaseui-idp-icon{height:18px;width:18px}.firebaseui-idp-favicon,.firebaseui-idp-icon{border:none;display:inline-block;vertical-align:middle}.firebaseui-idp-favicon{height:14px;margin-right:5px;width:14px}.firebaseui-idp-text{color:#fff;display:table-cell;font-size:14px;padding-left:16px;text-transform:none;vertical-align:middle}.firebaseui-idp-text.firebaseui-idp-text-long{display:table-cell}.firebaseui-idp-text.firebaseui-idp-text-short{display:none}@media (max-width:268px){.firebaseui-idp-text.firebaseui-idp-text-long{display:none}.firebaseui-idp-text.firebaseui-idp-text-short{display:table-cell}}@media (max-width:320px){.firebaseui-recaptcha-container>div>div{transform:scale(.9);-webkit-transform:scale(.9);transform-origin:0 0;-webkit-transform-origin:0 0}}.firebaseui-idp-google>.firebaseui-idp-text{color:#757575}[data-provider-id="yahoo.com"]>.firebaseui-idp-icon-wrapper>.firebaseui-idp-icon{height:22px;width:22px}.firebaseui-info-bar{background-color:#f9edbe;border:1px solid #f0c36d;box-shadow:0 2px 4px rgba(0,0,0,.2);-webkit-box-shadow:0 2px 4px rgba(0,0,0,.2);-moz-box-shadow:0 2px 4px rgba(0,0,0,.2);left:10%;padding:8px 16px;position:absolute;right:10%;text-align:center;top:0}.firebaseui-info-bar-message{font-size:12px;margin:0}.firebaseui-dialog{box-sizing:border-box;color:rgba(0,0,0,.87);font:16px Roboto,arial,sans-serif;height:auto;max-height:fit-content;padding:24px;text-align:left}.firebaseui-dialog-icon-wrapper{display:table-cell;vertical-align:middle}.firebaseui-dialog-icon{float:left;height:40px;margin-right:24px;width:40px}.firebaseui-progress-dialog-message{display:table-cell;font-size:16px;font-weight:400;min-height:40px;vertical-align:middle}.firebaseui-progress-dialog-loading-icon{height:28px;margin:6px 30px 6px 6px;width:28px}
2.firebaseui-icon-done{background-image:url(https://www.gstatic.com/images/icons/material/system/2x/done_googgreen_36dp.png);background-position:50%;background-repeat:no-repeat;background-size:36px 36px}.firebaseui-phone-number{display:flex}.firebaseui-country-selector{background-image:url(https://www.gstatic.com/images/icons/material/system/1x/arrow_drop_down_grey600_18dp.png);background-position:100%;background-repeat:no-repeat;background-size:18px auto;border-radius:0;border-bottom:1px solid rgba(0,0,0,.12);color:rgba(0,0,0,.87);flex-shrink:0;font-size:16px;font-weight:400;height:auto;line-height:normal;margin:20px 24px 20px 0;padding:4px 20px 4px 0;width:90px}.firebaseui-country-selector-flag{display:inline-block;margin-right:1ex}.firebaseui-flag{background-image:url(https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/flags_sprite_2x.png);background-size:100% auto;filter:drop-shadow(1px 1px 1px rgba(0,0,0,.54));height:14px;width:24px}.firebaseui-list-box-dialog{max-height:90%;overflow:auto;padding:8px 0 0}.firebaseui-list-box-actions{padding-bottom:8px}.firebaseui-list-box-icon-wrapper{padding-right:24px}.firebaseui-list-box-icon-wrapper,.firebaseui-list-box-label-wrapper{display:table-cell;vertical-align:top}.firebaseui-list-box-dialog-button{color:rgba(0,0,0,.87);direction:ltr;font-size:16px;font-weight:400;height:auto;line-height:normal;min-height:48px;padding:14px 24px;text-align:left;text-transform:none;width:100%}.firebaseui-phone-number-error{margin-left:114px}.mdl-progress.firebaseui-busy-indicator{height:2px;left:0;position:absolute;top:55px;width:100%}.mdl-spinner.firebaseui-busy-indicator{direction:ltr;height:56px;left:0;margin:auto;position:absolute;right:0;top:30%;width:56px}.firebaseui-callback-indicator-container .firebaseui-busy-indicator{top:0}.firebaseui-callback-indicator-container{height:120px}.firebaseui-new-password-component{display:inline-block;position:relative;width:100%}.firebaseui-input-floating-button{background-position:50%;background-repeat:no-repeat;display:block;height:24px;position:absolute;right:0;top:20px;width:24px}.firebaseui-input-toggle-on{background-image:url(https://www.gstatic.com/images/icons/material/system/1x/visibility_black_24dp.png)}.firebaseui-input-toggle-off{background-image:url(https://www.gstatic.com/images/icons/material/system/1x/visibility_off_black_24dp.png)}.firebaseui-input-toggle-focus{opacity:.87}.firebaseui-input-toggle-blur{opacity:.38}.firebaseui-recaptcha-wrapper{display:table;margin:0 auto;padding-bottom:8px}.firebaseui-recaptcha-container{display:table-cell}.firebaseui-recaptcha-error-wrapper{caption-side:bottom;display:table-caption}.firebaseui-change-phone-number-link{display:block}.firebaseui-resend-container{direction:ltr;margin:20px 0;text-align:center}.firebaseui-id-resend-countdown{color:rgba(0,0,0,.38)}.firebaseui-id-page-phone-sign-in-start .firebaseui-form-actions div{float:left}@media (max-width:480px){.firebaseui-container{box-shadow:none;max-width:none;width:100%}.firebaseui-card-header{border-bottom:1px solid #e0e0e0;margin-bottom:16px;padding:16px 24px 0}.firebaseui-title{padding-bottom:16px}.firebaseui-card-actions{padding-right:24px}.firebaseui-busy-indicator{top:0}}.mdl-textfield__label{font-weight:400;margin-bottom:0}.firebaseui-id-page-blank,.firebaseui-id-page-spinner{background:inherit;height:64px}.firebaseui-email-sent{background-image:url(https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/success_status.png);background-position:50%;background-repeat:no-repeat;background-size:64px 64px;height:64px;margin-top:16px;text-align:center}.firebaseui-text-justify{text-align:justify}.firebaseui-flag-KY{background-position:0 0}.firebaseui-flag-AC{background-position:0 -14px}.firebaseui-flag-AE{background-position:0 -28px}.firebaseui-flag-AF{background-position:0 -42px}.firebaseui-flag-AG{background-position:0 -56px}.firebaseui-flag-AI{background-position:0 -70px}.firebaseui-flag-AL{background-position:0 -84px}.firebaseui-flag-AM{background-position:0 -98px}.firebaseui-flag-AO{background-position:0 -112px}.firebaseui-flag-AQ{background-position:0 -126px}.firebaseui-flag-AR{background-position:0 -140px}.firebaseui-flag-AS{background-position:0 -154px}.firebaseui-flag-AT{background-position:0 -168px}.firebaseui-flag-AU{background-position:0 -182px}.firebaseui-flag-AW{background-position:0 -196px}.firebaseui-flag-AX{background-position:0 -210px}.firebaseui-flag-AZ{background-position:0 -224px}.firebaseui-flag-BA{background-position:0 -238px}.firebaseui-flag-BB{background-position:0 -252px}
2.firebaseui-flag-BD{background-position:0 -266px}.firebaseui-flag-BE{background-position:0 -280px}.firebaseui-flag-BF{background-position:0 -294px}.firebaseui-flag-BG{background-position:0 -308px}.firebaseui-flag-BH{background-position:0 -322px}.firebaseui-flag-BI{background-position:0 -336px}.firebaseui-flag-BJ{background-position:0 -350px}.firebaseui-flag-BL{background-position:0 -364px}.firebaseui-flag-BM{background-position:0 -378px}.firebaseui-flag-BN{background-position:0 -392px}.firebaseui-flag-BO{background-position:0 -406px}.firebaseui-flag-BQ{background-position:0 -420px}.firebaseui-flag-BR{background-position:0 -434px}.firebaseui-flag-BS{background-position:0 -448px}.firebaseui-flag-BT{background-position:0 -462px}.firebaseui-flag-BV{background-position:0 -476px}.firebaseui-flag-BW{background-position:0 -490px}.firebaseui-flag-BY{background-position:0 -504px}.firebaseui-flag-BZ{background-position:0 -518px}.firebaseui-flag-CA{background-position:0 -532px}.firebaseui-flag-CC{background-position:0 -546px}.firebaseui-flag-CD{background-position:0 -560px}.firebaseui-flag-CF{background-position:0 -574px}.firebaseui-flag-CG{background-position:0 -588px}.firebaseui-flag-CH{background-position:0 -602px}.firebaseui-flag-CI{background-position:0 -616px}.firebaseui-flag-CK{background-position:0 -630px}.firebaseui-flag-CL{background-position:0 -644px}.firebaseui-flag-CM{background-position:0 -658px}.firebaseui-flag-CN{background-position:0 -672px}.firebaseui-flag-CO{background-position:0 -686px}.firebaseui-flag-CP{background-position:0 -700px}.firebaseui-flag-CR{background-position:0 -714px}.firebaseui-flag-CU{background-position:0 -728px}.firebaseui-flag-CV{background-position:0 -742px}.firebaseui-flag-CW{background-position:0 -756px}.firebaseui-flag-CX{background-position:0 -770px}.firebaseui-flag-CY{background-position:0 -784px}.firebaseui-flag-CZ{background-position:0 -798px}.firebaseui-flag-DE{background-position:0 -812px}.firebaseui-flag-DG{background-position:0 -826px}.firebaseui-flag-DJ{background-position:0 -840px}.firebaseui-flag-DK{background-position:0 -854px}.firebaseui-flag-DM{background-position:0 -868px}.firebaseui-flag-DO{background-position:0 -882px}.firebaseui-flag-DZ{background-position:0 -896px}.firebaseui-flag-EA{background-position:0 -910px}.firebaseui-flag-EC{background-position:0 -924px}.firebaseui-flag-EE{background-position:0 -938px}.firebaseui-flag-EG{background-position:0 -952px}.firebaseui-flag-EH{background-position:0 -966px}.firebaseui-flag-ER{background-position:0 -980px}.firebaseui-flag-ES{background-position:0 -994px}.firebaseui-flag-ET{background-position:0 -1008px}.firebaseui-flag-EU{background-position:0 -1022px}.firebaseui-flag-FI{background-position:0 -1036px}.firebaseui-flag-FJ{background-position:0 -1050px}.firebaseui-flag-FK{background-position:0 -1064px}.firebaseui-flag-FM{background-position:0 -1078px}.firebaseui-flag-FO{background-position:0 -1092px}.firebaseui-flag-FR{background-position:0 -1106px}.firebaseui-flag-GA{background-position:0 -1120px}.firebaseui-flag-GB{background-position:0 -1134px}.firebaseui-flag-GD{background-position:0 -1148px}.firebaseui-flag-GE{background-position:0 -1162px}.firebaseui-flag-GF{background-position:0 -1176px}.firebaseui-flag-GG{background-position:0 -1190px}.firebaseui-flag-GH{background-position:0 -1204px}.firebaseui-flag-GI{background-position:0 -1218px}.firebaseui-flag-GL{background-position:0 -1232px}.firebaseui-flag-GM{background-position:0 -1246px}.firebaseui-flag-GN{background-position:0 -1260px}.firebaseui-flag-GP{background-position:0 -1274px}.firebaseui-flag-GQ{background-position:0 -1288px}.firebaseui-flag-GR{background-position:0 -1302px}.firebaseui-flag-GS{background-position:0 -1316px}.firebaseui-flag-GT{background-position:0 -1330px}.firebaseui-flag-GU{background-position:0 -1344px}.firebaseui-flag-GW{background-position:0 -1358px}.firebaseui-flag-GY{background-position:0 -1372px}.firebaseui-flag-HK{background-position:0 -1386px}.firebaseui-flag-HM{background-position:0 -1400px}.firebaseui-flag-HN{background-position:0 -1414px}.firebaseui-flag-HR{background-position:0 -1428px}.firebaseui-flag-HT{background-position:0 -1442px}.firebaseui-flag-HU{background-position:0 -1456px}.firebaseui-flag-IC{background-position:0 -1470px}.firebaseui-flag-ID{background-position:0 -1484px}.firebaseui-flag-IE{background-position:0 -1498px}.firebaseui-flag-IL{background-position:0 -1512px}.firebaseui-flag-IM{background-position:0 -1526px}.firebaseui-flag-IN{background-position:0 -1540px}.firebaseui-flag-IO{background-position:0 -1554px}.firebaseui-flag-IQ{background-position:0 -1568px}.firebaseui-flag-IR{background-position:0 -1582px}.firebaseui-flag-IS{background-position:0 -1596px}.firebaseui-flag-IT{background-position:0 -1610px}.firebaseui-flag-JE{background-position:0 -1624px}.firebaseui-flag-JM{background-position:0 -1638px}.firebaseui-flag-JO{background-position:0 -1652px}.firebaseui-flag-JP{background-position:0 -1666px}.firebaseui-flag-KE{background-position:0 -1680px}.firebaseui-flag-KG{background-position:0 -1694px}.firebaseui-flag-KH{background-position:0 -1708px}.firebaseui-flag-KI{background-position:0 -1722px}.firebaseui-flag-KM{background-position:0 -1736px}.firebaseui-flag-KN{background-position:0 -1750px}.firebaseui-flag-KP{background-position:0 -1764px}.firebaseui-flag-KR{background-position:0 -1778px}.firebaseui-flag-KW{background-position:0 -1792px}.firebaseui-flag-AD{background-position:0 -1806px}.firebaseui-flag-KZ{background-position:0 -1820px}.firebaseui-flag-LA{background-position:0 -1834px}.firebaseui-flag-LB{background-position:0 -1848px}.firebaseui-flag-LC{background-position:0 -1862px}.firebaseui-flag-LI{background-position:0 -1876px}.firebaseui-flag-LK{background-position:0 -1890px}.firebaseui-flag-LR{background-position:0 -1904px}.firebaseui-flag-LS{background-position:0 -1918px}.firebaseui-flag-LT{background-position:0 -1932px}.firebaseui-flag-LU{background-position:0 -1946px}.firebaseui-flag-LV{background-position:0 -1960px}.firebaseui-flag-LY{background-position:0 -1974px}.firebaseui-flag-MA{background-position:0 -1988px}.firebaseui-flag-MC{background-position:0 -2002px}.firebaseui-flag-MD{background-position:0 -2016px}.firebaseui-flag-ME{background-position:0 -2030px}.firebaseui-flag-MF{background-position:0 -2044px}.firebaseui-flag-MG{background-position:0 -2058px}.firebaseui-flag-MH{background-position:0 -2072px}.firebaseui-flag-MK{background-position:0 -2086px}.firebaseui-flag-ML{background-position:0 -2100px}.firebaseui-flag-MM{background-position:0 -2114px}.firebaseui-flag-MN{background-position:0 -2128px}.firebaseui-flag-MO{background-position:0 -2142px}.firebaseui-flag-MP{background-position:0 -2156px}.firebaseui-flag-MQ{background-position:0 -2170px}.firebaseui-flag-MR{background-position:0 -2184px}.firebaseui-flag-MS{background-position:0 -2198px}.firebaseui-flag-MT{background-position:0 -2212px}.firebaseui-flag-MU{background-position:0 -2226px}.firebaseui-flag-MV{background-position:0 -2240px}.firebaseui-flag-MW{background-position:0 -2254px}.firebaseui-flag-MX{background-position:0 -2268px}.firebaseui-flag-MY{background-position:0 -2282px}.firebaseui-flag-MZ{background-position:0 -2296px}.firebaseui-flag-NA{background-position:0 -2310px}.firebaseui-flag-NC{background-position:0 -2324px}.firebaseui-flag-NE{background-position:0 -2338px}.firebaseui-flag-NF{background-position:0 -2352px}.firebaseui-flag-NG{background-position:0 -2366px}.firebaseui-flag-NI{background-position:0 -2380px}.firebaseui-flag-NL{background-position:0 -2394px}.firebaseui-flag-NO{background-position:0 -2408px}.firebaseui-flag-NP{background-position:0 -2422px}.firebaseui-flag-NR{background-position:0 -2436px}.firebaseui-flag-NU{background-position:0 -2450px}.firebaseui-flag-NZ{background-position:0 -2464px}.firebaseui-flag-OM{background-position:0 -2478px}.firebaseui-flag-PA{background-position:0 -2492px}.firebaseui-flag-PE{background-position:0 -2506px}.firebaseui-flag-PF{background-position:0 -2520px}.firebaseui-flag-PG{background-position:0 -2534px}.firebaseui-flag-PH{background-position:0 -2548px}.firebaseui-flag-PK{background-position:0 -2562px}.firebaseui-flag-PL{background-position:0 -2576px}.firebaseui-flag-PM{background-position:0 -2590px}.firebaseui-flag-PN{background-position:0 -2604px}.firebaseui-flag-PR{background-position:0 -2618px}.firebaseui-flag-PS{background-position:0 -2632px}.firebaseui-flag-PT{background-position:0 -2646px}.firebaseui-flag-PW{background-position:0 -2660px}.firebaseui-flag-PY{background-position:0 -2674px}.firebaseui-flag-QA{background-position:0 -2688px}.firebaseui-flag-RE{background-position:0 -2702px}.firebaseui-flag-RO{background-position:0 -2716px}.firebaseui-flag-RS{background-position:0 -2730px}.firebaseui-flag-RU{background-position:0 -2744px}.firebaseui-flag-RW{background-position:0 -2758px}.firebaseui-flag-SA{background-position:0 -2772px}.firebaseui-flag-SB{background-position:0 -2786px}.firebaseui-flag-SC{background-position:0 -2800px}.firebaseui-flag-SD{background-position:0 -2814px}.firebaseui-flag-SE{background-position:0 -2828px}.firebaseui-flag-SG{background-position:0 -2842px}.firebaseui-flag-SH{background-position:0 -2856px}.firebaseui-flag-SI{background-position:0 -2870px}.firebaseui-flag-SJ{background-position:0 -2884px}.firebaseui-flag-SK{background-position:0 -2898px}.firebaseui-flag-SL{background-position:0 -2912px}.firebaseui-flag-SM{background-position:0 -2926px}.firebaseui-flag-SN{background-position:0 -2940px}.firebaseui-flag-SO{background-position:0 -2954px}.firebaseui-flag-SR{background-position:0 -2968px}.firebaseui-flag-SS{background-position:0 -2982px}.firebaseui-flag-ST{background-position:0 -2996px}.firebaseui-flag-SV{background-position:0 -3010px}.firebaseui-flag-SX{background-position:0 -3024px}.firebaseui-flag-SY{background-position:0 -3038px}.firebaseui-flag-SZ{background-position:0 -3052px}.firebaseui-flag-TA{background-position:0 -3066px}.firebaseui-flag-TC{background-position:0 -3080px}.firebaseui-flag-TD{background-position:0 -3094px}.firebaseui-flag-TF{background-position:0 -3108px}.firebaseui-flag-TG{background-position:0 -3122px}.firebaseui-flag-TH{background-position:0 -3136px}.firebaseui-flag-TJ{background-position:0 -3150px}.firebaseui-flag-TK{background-position:0 -3164px}.firebaseui-flag-TL{background-position:0 -3178px}.firebaseui-flag-TM{background-position:0 -3192px}.firebaseui-flag-TN{background-position:0 -3206px}
2.firebaseui-flag-TO{background-position:0 -3220px}.firebaseui-flag-TR{background-position:0 -3234px}.firebaseui-flag-TT{background-position:0 -3248px}.firebaseui-flag-TV{background-position:0 -3262px}.firebaseui-flag-TW{background-position:0 -3276px}.firebaseui-flag-TZ{background-position:0 -3290px}.firebaseui-flag-UA{background-position:0 -3304px}.firebaseui-flag-UG{background-position:0 -3318px}.firebaseui-flag-UM{background-position:0 -3332px}.firebaseui-flag-UN{background-position:0 -3346px}.firebaseui-flag-US{background-position:0 -3360px}.firebaseui-flag-UY{background-position:0 -3374px}.firebaseui-flag-UZ{background-position:0 -3388px}.firebaseui-flag-VA{background-position:0 -3402px}.firebaseui-flag-VC{background-position:0 -3416px}.firebaseui-flag-VE{background-position:0 -3430px}.firebaseui-flag-VG{background-position:0 -3444px}.firebaseui-flag-VI{background-position:0 -3458px}.firebaseui-flag-VN{background-position:0 -3472px}.firebaseui-flag-VU{background-position:0 -3486px}.firebaseui-flag-WF{background-position:0 -3500px}.firebaseui-flag-WS{background-position:0 -3514px}.firebaseui-flag-XK{background-position:0 -3528px}.firebaseui-flag-YE{background-position:0 -3542px}.firebaseui-flag-YT{background-position:0 -3556px}.firebaseui-flag-ZA{background-position:0 -3570px}.firebaseui-flag-ZM{background-position:0 -3584px}.firebaseui-flag-ZW{background-position:0 -3598px}',""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r=e[1]||"",i=e[3];if(!i)return r;if(t&&"function"==typeof btoa){var o=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=i.sources.map((function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"}));return[r].concat(a).concat([o]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){var r,i,o={},a=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=r.apply(this,arguments)),i}),s=function(e){return document.querySelector(e)},u=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var n=s.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),c=null,l=0,f=[],h=n(6);function d(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=o[r.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](r.parts[a]);for(;a<r.parts.length;a++)i.parts.push(b(r.parts[a],t))}else{var s=[];for(a=0;a<r.parts.length;a++)s.push(b(r.parts[a],t));o[r.id]={id:r.id,refs:1,parts:s}}}}function p(e,t){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],a=t.base?o[0]+t.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}function g(e,t){var n=u(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=f[f.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),f.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=u(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,i)}}function v(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=f.indexOf(e);t>=0&&f.splice(t,1)}function m(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),y(t,e.attrs),g(e,t),t}
2function y(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var a=l++;n=c||(c=m(t)),r=k.bind(null,n,a,!1),i=k.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",y(t,e.attrs),g(e,t),t}(t),r=S.bind(null,n,t),i=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(t),r=E.bind(null,n),i=function(){v(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return d(n,t),function(e){for(var r=[],i=0;i<n.length;i++){var a=n[i];(s=o[a.id]).refs--,r.push(s)}for(e&&d(p(e,t),t),i=0;i<r.length;i++){var s;if(0===(s=r[i]).refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete o[s.id]}}}};var _,w=(_=[],function(e,t){return _[e]=t,_.filter(Boolean).join("\n")});function k(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function E(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function S(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=h(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var i,o=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},function(e,t){e.exports=n(70)}])},function(e,t,n){var r;!function(){var i=window.CustomEvent;function o(e){for(;e;){if("dialog"===e.localName)return e;e=e.parentElement}return null}function a(e){e&&e.blur&&e!==document.body&&e.blur()}function s(e,t){for(var n=0;n<e.length;++n)if(e[n]===t)return!0;return!1}function u(e){return!(!e||!e.hasAttribute("method"))&&"dialog"===e.getAttribute("method").toLowerCase()}function c(e){if(this.dialog_=e,this.replacedStyleTop_=!1,this.openAsModal_=!1,e.hasAttribute("role")||e.setAttribute("role","dialog"),e.show=this.show.bind(this),e.showModal=this.showModal.bind(this),e.close=this.close.bind(this),"returnValue"in e||(e.returnValue=""),"MutationObserver"in window){new MutationObserver(this.maybeHideModal.bind(this)).observe(e,{attributes:!0,attributeFilter:["open"]})}else{var t,n=!1,r=function(){n?this.downgradeModal():this.maybeHideModal(),n=!1}.bind(this),i=function(i){if(i.target===e){var o="DOMNodeRemoved";n|=i.type.substr(0,o.length)===o,window.clearTimeout(t),t=window.setTimeout(r,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach((function(t){e.addEventListener(t,i)}))}Object.defineProperty(e,"open",{set:this.setOpen.bind(this),get:e.hasAttribute.bind(e,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("click",this.backdropClick_.bind(this))}i&&"object"!==typeof i||((i=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");
2return n.initCustomEvent(e,!!t.bubbles,!!t.cancelable,t.detail||null),n}).prototype=window.Event.prototype),c.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&document.body.contains(this.dialog_)||this.downgradeModal()},downgradeModal:function(){this.openAsModal_&&(this.openAsModal_=!1,this.dialog_.style.zIndex="",this.replacedStyleTop_&&(this.dialog_.style.top="",this.replacedStyleTop_=!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),l.dm.removeDialog(this))},setOpen:function(e){e?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropClick_:function(e){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var t=document.createElement("div");this.dialog_.insertBefore(t,this.dialog_.firstChild),t.tabIndex=-1,t.focus(),this.dialog_.removeChild(t)}var n=document.createEvent("MouseEvents");n.initMouseEvent(e.type,e.bubbles,e.cancelable,window,e.detail,e.screenX,e.screenY,e.clientX,e.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget),this.dialog_.dispatchEvent(n),e.stopPropagation()},focus_:function(){var e=this.dialog_.querySelector("[autofocus]:not([disabled])");if(!e&&this.dialog_.tabIndex>=0&&(e=this.dialog_),!e){var t=["button","input","keygen","select","textarea"].map((function(e){return e+":not([disabled])"}));t.push('[tabindex]:not([disabled]):not([tabindex=""])'),e=this.dialog_.querySelector(t.join(", "))}a(document.activeElement),e&&e.focus()},updateZIndex:function(e,t){if(e<t)throw new Error("dialogZ should never be < backdropZ");this.dialog_.style.zIndex=e,this.backdrop_.style.zIndex=t},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");if(!document.body.contains(this.dialog_))throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");if(!l.dm.pushDialog(this))throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");(function(e){for(;e&&e!==document.body;){var t=window.getComputedStyle(e),n=function(e,n){return!(void 0===t[e]||t[e]===n)};if(t.opacity<1||n("zIndex","auto")||n("transform","none")||n("mixBlendMode","normal")||n("filter","none")||n("perspective","none")||"isolate"===t.isolation||"fixed"===t.position||"touch"===t.webkitOverflowScrolling)return!0;e=e.parentElement}return!1})(this.dialog_.parentElement)&&console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"),this.setOpen(!0),this.openAsModal_=!0,l.needsCentering(this.dialog_)?(l.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(e){if(!this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");this.setOpen(!1),void 0!==e&&(this.dialog_.returnValue=e);var t=new i("close",{bubbles:!1,cancelable:!1});this.dialog_.dispatchEvent(t)}};var l={reposition:function(e){var t=document.body.scrollTop||document.documentElement.scrollTop,n=t+(window.innerHeight-e.offsetHeight)/2;e.style.top=Math.max(t,n)+"px"},isInlinePositionSetByStylesheet:function(e){for(var t=0;t<document.styleSheets.length;++t){var n=document.styleSheets[t],r=null;try{r=n.cssRules}catch(l){}if(r)for(var i=0;i<r.length;++i){var o=r[i],a=null;try{a=document.querySelectorAll(o.selectorText)}catch(l){}if(a&&s(a,e)){var u=o.style.getPropertyValue("top"),c=o.style.getPropertyValue("bottom");if(u&&"auto"!==u||c&&"auto"!==c)return!0}}}return!1},needsCentering:function(e){return"absolute"===window.getComputedStyle(e).position&&(!("auto"!==e.style.top&&""!==e.style.top||"auto"!==e.style.bottom&&""!==e.style.bottom)&&!l.isInlinePositionSetByStylesheet(e))},forceRegisterDialog:function(e){if((window.HTMLDialogElement||e.showModal)&&console.warn("This browser already supports <dialog>, the polyfill may not work correctly",e),"dialog"!==e.localName)throw new Error("Failed to register dialog: The element is not a dialog.");new c(e)},registerDialog:function(e){e.showModal||l.forceRegisterDialog(e)},DialogManager:function(){this.pendingDialogStack=[];var e=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",function(t){this.forwardTab_=void 0,t.stopPropagation(),e([])}.bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver((function(t){var n=[];t.forEach((function(e){for(var t,r=0;t=e.removedNodes[r];++r)t instanceof Element&&("dialog"===t.localName&&n.push(t),n=n.concat(t.querySelectorAll("dialog")))})),n.length&&e(n)})))}};if(l.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},l.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},l.DialogManager.prototype.updateStacking=function(){for(var e,t=this.zIndexHigh_,n=0;e=this.pendingDialogStack[n];++n)e.updateZIndex(--t,--t),0===n&&(this.overlay.style.zIndex=--t);var r=this.pendingDialogStack[0];r?(r.dialog.parentNode||document.body).appendChild(this.overlay):this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},l.DialogManager.prototype.containedByTopDialog_=function(e){for(;e=o(e);){for(var t,n=0;t=this.pendingDialogStack[n];++n)if(t.dialog===e)return 0===n;e=e.parentElement}return!1},l.DialogManager.prototype.handleFocus_=function(e){if(!this.containedByTopDialog_(e.target)&&(e.preventDefault(),e.stopPropagation(),a(e.target),void 0!==this.forwardTab_)){var t=this.pendingDialogStack[0];return t.dialog.compareDocumentPosition(e.target)&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?t.focus_():document.documentElement.focus()),!1}},l.DialogManager.prototype.handleKey_=function(e){if(this.forwardTab_=void 0,27===e.ke
2yCode){e.preventDefault(),e.stopPropagation();var t=new i("cancel",{bubbles:!1,cancelable:!0}),n=this.pendingDialogStack[0];n&&n.dialog.dispatchEvent(t)&&n.dialog.close()}else 9===e.keyCode&&(this.forwardTab_=!e.shiftKey)},l.DialogManager.prototype.checkDOM_=function(e){this.pendingDialogStack.slice().forEach((function(t){-1!==e.indexOf(t.dialog)?t.downgradeModal():t.maybeHideModal()}))},l.DialogManager.prototype.pushDialog=function(e){var t=(this.zIndexHigh_-this.zIndexLow_)/2-1;return!(this.pendingDialogStack.length>=t)&&(1===this.pendingDialogStack.unshift(e)&&this.blockDocument(),this.updateStacking(),!0)},l.DialogManager.prototype.removeDialog=function(e){var t=this.pendingDialogStack.indexOf(e);-1!==t&&(this.pendingDialogStack.splice(t,1),0===this.pendingDialogStack.length&&this.unblockDocument(),this.updateStacking())},l.dm=new l.DialogManager,l.formSubmitter=null,l.useValue=null,void 0===window.HTMLDialogElement){var f=document.createElement("form");if(f.setAttribute("method","dialog"),"dialog"!==f.method){var h=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(h){var d=h.get;h.get=function(){return u(this)?"dialog":d.call(this)};var p=h.set;h.set=function(e){return"string"===typeof e&&"dialog"===e.toLowerCase()?this.setAttribute("method",e):p.call(this,e)},Object.defineProperty(HTMLFormElement.prototype,"method",h)}}document.addEventListener("click",(function(e){if(l.formSubmitter=null,l.useValue=null,!e.defaultPrevented){var t=e.target;if(t&&u(t.form)){if(!("submit"===t.type&&["button","input"].indexOf(t.localName)>-1)){if("input"!==t.localName||"image"!==t.type)return;l.useValue=e.offsetX+","+e.offsetY}o(t)&&(l.formSubmitter=t)}}}),!1);var g=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(){if(!u(this))return g.call(this);var e=o(this);e&&e.close()},document.addEventListener("submit",(function(e){var t=e.target;if(u(t)){e.preventDefault();var n=o(t);if(n){var r=l.formSubmitter;r&&r.form===t?n.close(l.useValue||r.value):n.close(),l.formSubmitter=null}}}),!0)}l.forceRegisterDialog=l.forceRegisterDialog,l.registerDialog=l.registerDialog,"amd"in n(72)?void 0===(r=function(){return l}.call(t,n,t,e))||(e.exports=r):"object"===typeof e.exports?e.exports=l:window.dialogPolyfill=l}()},,,,,,function(e,t,n){"use strict";var r=n(42),i=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,u=60112;t.Suspense=60113;var c=60115,l=60116;if("function"===typeof Symbol&&Symbol.for){var f=Symbol.for;i=f("react.element"),o=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),s=f("react.context"),u=f("react.forward_ref"),t.Suspense=f("react.suspense"),c=f("react.memo"),l=f("react.lazy")}var h="function"===typeof Symbol&&Symbol.iterator;function d(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}function m(){}function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(d(85));this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},m.prototype=v.prototype;var b=y.prototype=new m;b.constructor=y,r(b,v.prototype),b.isPureReactComponent=!0;var _={current:null},w=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,n){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)w.call(t,r)&&!k.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];o.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:_.current}}function S(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var I=/\/+/g;function x(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function T(e,t,n,r,a){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 i:case o:u=!0}}if(u)return a=a(u=e),e=""===r?"."+x(u,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(I,"$&/")+"/"),T(a,t,n,"",(function(e){return e}))):null!=a&&(S(a)&&(a=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(I,"$&/")+"/")+e)),t.push(a)),1;if(u=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var l=r+x(s=e[c],c);u+=T(s,t,n,l,a)}else if("function"===typeof(l=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e)))for(e=l.call(e),c=0;!(s=e.next()).done;)u+=T(s=s.value,t,n,l=r+x(s,c++),a);else if("object"===s)throw t=""+e,Error(d(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return u}
vendor: 13,399 bytes, line 2
2function C(e,t,n){if(null==e)return e;var r=[],i=0;return T(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function O(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var A={current:null};function N(){var e=A.current;if(null===e)throw Error(d(321));return e}var P={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:_,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:C,forEach:function(e,t,n){C(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return C(e,(function(){t++})),t},toArray:function(e){return C(e,(function(e){return e}))||[]},only:function(e){if(!S(e))throw Error(d(143));return e}},t.Component=v,t.PureComponent=y,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(d(267,e));var o=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=_.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)w.call(t,l)&&!k.hasOwnProperty(l)&&(o[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];o.children=c}return{$$typeof:i,type:e.type,key:a,ref:s,props:o,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=E,t.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:l,_payload:{_status:-1,_result:e},_init:O}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return N().useCallback(e,t)},t.useContext=function(e,t){return N().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return N().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return N().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return N().useLayoutEffect(e,t)},t.useMemo=function(e,t){return N().useMemo(e,t)},t.useReducer=function(e,t,n){return N().useReducer(e,t,n)},t.useRef=function(e){return N().useRef(e)},t.useState=function(e){return N().useState(e)},t.version="17.0.1"},function(e,t,n){"use strict";var r=n(2),i=n(42),o=n(63);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=new Set,u={};function c(e,t){l(e,t),l(e+"Capture",t)}function l(e,t){for(u[e]=t,e=0;e<t.length;e++)s.add(t[e])}var f=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),h=/^[: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]*$/,d=Object.prototype.hasOwnProperty,p={},g={};function v(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new v(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new v(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new v(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function _(e,t,n,r){var i=m.hasOwnProperty(t)?m[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(g,e)||!d.call(p,e)&&(h.test(e)?g[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(e){var t=e.replace(y,b);m[t]=new v(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,b);m[t]=new v(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,b);m[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=60103,E=60106,S=60107,I=60108,x=60114,T=60109,C=60110,O=60112,A=60113,N=60120,P=60115,R=60116,j=60121,D=60128,M=60129,L=60130,F=60131;if("function"===typeof Symbol&&Symbol.for){var U=Symbol.for;k=U("react.element"),E=U("react.portal"),S=U("react.fragment"),I=U("react.strict_mode"),x=U("react.profiler"),T=U("react.provider"),C=U("react.context"),O=U("react.forward_ref"),A=U("react.suspense"),N=U("react.suspense_list"),P=U("react.memo"),R=U("react.lazy"),j=U("react.block"),U("react.scope"),D=U("react.opaque.id"),M=U("react.debug_trace_mode"),L=U("react.offscreen"),F=U("react.legacy_hidden")}var V,B="function"===typeof Symbol&&Symbol.iterator;function q(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=B&&e[B]||e["@@iterator"])?e:null}function z(e){if(void 0===V)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);V=t&&t[1]||""}return"\n"+V+e}var H=!1;function K(e,t){if(!e||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var i=u.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{H=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?z(e):""}function W(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=K(e.type,!1);case 11:return e=K(e.type.render,!1);case 22:return e=K(e.type._render,!1);case 1:return e=K(e.type,!0);default:return""}}function G(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case E:return"Portal";case x:return"Profiler";case I:return"StrictMode";case A:return"Suspense";case N:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case C:return(e.displayName||"Context")+".Consumer";case T:return(e._context.displayName||"Context")+".Provider";case O:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case P:return G(e.type);case j:return G(e._render);case R:t=e._payload,e=e._init;try{return G(e(t))}catch(n){}}return null}function Y(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function $(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Q(e){e._valueTracker||(e._valueTracker=function(e){var t=$(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function X(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function J(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Y(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&_(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=Y(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ie(e,t.type,n):t.hasOwnProperty("defaultValue")&&ie(e,t.type,Y(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ie(e,t,n){"number"===t&&J(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function oe(e,t){return e=i({children:void 0},t),(t=function(e){var t="";
vendor: 4,117 bytes, line 2
2return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Y(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ue(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Y(n)}}function ce(e,t){var n=Y(t.value),r=Y(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function le(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml",he="http://www.w3.org/2000/svg";function de(e){switch(e){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 pe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?de(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ge,ve,me=(ve=function(e,t){if(e.namespaceURI!==he||"innerHTML"in e)e.innerHTML=t;else{for((ge=ge||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ge.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ve(e,t)}))}:ve);function ye(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={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},_e=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function ke(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(be).forEach((function(e){_e.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Ee=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 Se(e,t){if(t){if(Ee[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function Ie(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){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}}function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.n
vendor: 3,897 bytes, line 2
2odeType?e.parentNode:e}var Te=null,Ce=null,Oe=null;function Ae(e){if(e=ei(e)){if("function"!==typeof Te)throw Error(a(280));var t=e.stateNode;t&&(t=ni(t),Te(e.stateNode,e.type,t))}}function Ne(e){Ce?Oe?Oe.push(e):Oe=[e]:Ce=e}function Pe(){if(Ce){var e=Ce,t=Oe;if(Oe=Ce=null,Ae(e),t)for(e=0;e<t.length;e++)Ae(t[e])}}function Re(e,t){return e(t)}function je(e,t,n,r,i){return e(t,n,r,i)}function De(){}var Me=Re,Le=!1,Fe=!1;function Ue(){null===Ce&&null===Oe||(De(),Pe())}function Ve(e,t){var n=e.stateNode;if(null===n)return null;var r=ni(n);if(null===r)return null;n=r[t];e:switch(t){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"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Be=!1;if(f)try{var qe={};Object.defineProperty(qe,"passive",{get:function(){Be=!0}}),window.addEventListener("test",qe,qe),window.removeEventListener("test",qe,qe)}catch(ve){Be=!1}function ze(e,t,n,r,i,o,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(l){this.onError(l)}}var He=!1,Ke=null,We=!1,Ge=null,Ye={onError:function(e){He=!0,Ke=e}};function $e(e,t,n,r,i,o,a,s,u){He=!1,Ke=null,ze.apply(Ye,arguments)}function Qe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Xe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Je(e){if(Qe(e)!==e)throw Error(a(188))}function Ze(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Qe(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){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 Je(i),e;if(o===r)return Je(i),t;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?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,it,ot=!1,at=[],st=null,ut=null,ct=null,lt=new Map,ft=new Map,ht=[],dt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pt(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function gt(e,t){switch(e){case"focusin":case"focusout":st=null;break;case"dragenter":case"dragleave":ut=null;break;case"mouseover":case"mouseout":ct=null;break;case"pointerover":case"pointerout":lt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ft.delete(t.pointerId)}}function vt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=pt(t,n,r,i,o),null!==t&&(null!==(t=ei(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function mt(e){var t=Zr(e.target);if(null!==t){var n=Qe(t);
vendor: 26,922 bytes, line 2
2if(null!==n)if(13===(t=n.tag)){if(null!==(t=Xe(n)))return e.blockedOn=t,void it(e.lanePriority,(function(){o.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function yt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ei(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){yt(e)&&n.delete(t)}function _t(){for(ot=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=ei(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==st&&yt(st)&&(st=null),null!==ut&&yt(ut)&&(ut=null),null!==ct&&yt(ct)&&(ct=null),lt.forEach(bt),ft.forEach(bt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,ot||(ot=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,_t)))}function kt(e){function t(t){return wt(t,e)}if(0<at.length){wt(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==st&&wt(st,e),null!==ut&&wt(ut,e),null!==ct&&wt(ct,e),lt.forEach(t),ft.forEach(t),n=0;n<ht.length;n++)(r=ht[n]).blockedOn===e&&(r.blockedOn=null);for(;0<ht.length&&null===(n=ht[0]).blockedOn;)mt(n),null===n.blockedOn&&ht.shift()}function Et(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var St={animationend:Et("Animation","AnimationEnd"),animationiteration:Et("Animation","AnimationIteration"),animationstart:Et("Animation","AnimationStart"),transitionend:Et("Transition","TransitionEnd")},It={},xt={};function Tt(e){if(It[e])return It[e];if(!St[e])return e;var t,n=St[e];for(t in n)if(n.hasOwnProperty(t)&&t in xt)return It[e]=n[t];return e}f&&(xt=document.createElement("div").style,"AnimationEvent"in window||(delete St.animationend.animation,delete St.animationiteration.animation,delete St.animationstart.animation),"TransitionEvent"in window||delete St.transitionend.transition);var Ct=Tt("animationend"),Ot=Tt("animationiteration"),At=Tt("animationstart"),Nt=Tt("transitionend"),Pt=new Map,Rt=new Map,jt=["abort","abort",Ct,"animationEnd",Ot,"animationIteration",At,"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",Nt,"transitionEnd","waiting","waiting"];function Dt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Rt.set(r,t),Pt.set(r,i),c(i,[r])}}(0,o.unstable_now)();var Mt=8;function Lt(e){if(0!==(1&e))return Mt=15,1;if(0!==(2&e))return Mt=14,2;if(0!==(4&e))return Mt=13,4;var t=24&e;return 0!==t?(Mt=12,t):0!==(32&e)?(Mt=11,32):0!==(t=192&e)?(Mt=10,t):0!==(256&e)?(Mt=9,256):0!==(t=3584&e)?(Mt=8,t):0!==(4096&e)?(Mt=7,4096):0!==(t=4186112&e)?(Mt=6,t):0!==(t=62914560&e)?(Mt=5,t):67108864&e?(Mt=4,67108864):0!==(134217728&e)?(Mt=3,134217728):0!==(t=805306368&e)?(Mt=2,t):0!==(1073741824&e)?(Mt=1,1073741824):(Mt=8,e)}function Ft(e,t){var n=e.pendingLanes;if(0===n)return Mt=0;var r=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==o)r=o,i=Mt=15;else if(0!==(o=134217727&n)){var u=o&~a;0!==u?(r=Lt(u),i=Mt):0!==(s&=o)&&(r=Lt(s),i=Mt)}else 0!==(o=n&~a)?(r=Lt(o),i=Mt):0!==s&&(r=Lt(s),i=Mt);if(0===r)return 0;if(r=n&((0>(r=31-Ht(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(Lt(t),i<=Mt)return t;Mt=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-Ht(t)),r|=e[n],t&=~i;return r}function Ut(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Vt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Bt(24&~t))?Vt(10,t):e;case 10:return 0===(e=Bt(192&~t))?Vt(8,t):e;case 8:return 0===(e=Bt(3584&~t))&&(0===(e=Bt(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Bt(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function Bt(e){return e&-e}function qt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function zt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Kt(e)/Wt|0)|0},Kt=Math.log,Wt=Math.LN2;var Gt=o.unstable_UserBlockingPriority,Yt=o.unstable_runWithPriority,$t=!0;function Qt(e,t,n,r){Le||De();var i=Jt,o=Le;Le=!0;try{je(i,e,t,n,r)}finally{(Le=o)||Ue()}}function Xt(e,t,n,r){Yt(Gt,Jt.bind(null,e,t,n,r))}function Jt(e,t,n,r){var i;if($t)if((i=0===(4&t))&&0<at.length&&-1<dt.indexOf(e))e=pt(null,e,t,n,r),at.push(e);else{var o=Zt(e,t,n,r);if(null===o)i&&gt(e,r);else{if(i){if(-1<dt.indexOf(e))return e=pt(o,e,t,n,r),void at.push(e);if(function(e,t,n,r,i){switch(t){case"focusin":return st=vt(st,e,t,n,r,i),!0;case"dragenter":return ut=vt(ut,e,t,n,r,i),!0;case"mouseover":return ct=vt(ct,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return lt.set(o,vt(lt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ft.set(o,vt(ft.get(o)||null,e,t,n,r,i)),!0}return!1}(o,e,t,n,r))return;gt(e,r)}Pr(e,t,r,null,n)}}}function Zt(e,t,n,r){var i=xe(r);if(null!==(i=Zr(i))){var o=Qe(i);if(null===o)i=null;else{var a=o.tag;if(13===a){if(null!==(i=Xe(o)))return i;i=null}else if(3===a){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return Pr(e,t,r,i,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,i="value"in en?en.value:en.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return nn=i.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function sn(){return!1}function un(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?an:sn,this.isPropagationStopped=sn,this}return i(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var cn,ln,fn,hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=un(hn),pn=i({},hn,{view:0,detail:0}),gn=un(pn),vn=i({},pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fn&&(fn&&"mousemove"===e.type?(cn=e.screenX-fn.screenX,ln=e.screenY-fn.screenY):ln=cn=0,fn=e),cn)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),mn=un(vn),yn=un(i({},vn,{dataTransfer:0})),bn=un(i({},pn,{relatedTarget:0})),_n=un(i({},hn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=un(i({},hn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),kn=un(i({},hn,{data:0})),En={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={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"},In={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=In[e])&&!!t[e]}function Tn(){return xn}var Cn=un(i({},pn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tn,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),On=un(i({},vn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),An=un(i({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tn})),Nn=un(i({},hn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pn=un(i({},vn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Rn=[9,13,27,32],jn=f&&"CompositionEvent"in window,Dn=null;f&&"documentMode"in document&&(Dn=document.documentMode);var Mn=f&&"TextEvent"in window&&!Dn,Ln=f&&(!jn||Dn&&8<Dn&&11>=Dn),Fn=String.fromCharCode(32),Un=!1;function Vn(e,t){switch(e){case"keyup":return-1!==Rn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var qn=!1;var zn={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 Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!zn[e.type]:"textarea"===t}function Kn(e,t,n,r){Ne(r),0<(t=jr(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wn=null,Gn=null;function Yn(e){xr(e,0)}function $n(e){if(X(ti(e)))return e}function Qn(e,t){if("change"===e)return t}var Xn=!1;if(f){var Jn;if(f){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"===typeof er.oninput}Jn=Zn}else Jn=!1;Xn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){Wn&&(Wn.detachEvent("onpropertychange",nr),Gn=Wn=null)}function nr(e){if("value"===e.propertyName&&$n(Gn)){var t=[];if(Kn(t,Gn,e,xe(e)),e=Yn,Le)e(t);else{Le=!0;try{Re(e,t)}finally{Le=!1,Ue()}}}}function rr(e,t,n){"focusin"===e?(tr(),Gn=n,(Wn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return $n(Gn)}function or(e,t){if("click"===e)return $n(t)}function ar(e,t){if("input"===e||"change"===e)return $n(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},ur=Object.prototype.hasOwnProperty;function cr(e,t){if(sr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!ur.call(t,n[r])||!sr(e[n[r]],t[n[r]]))return!1;return!0}function lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fr(e,t){var n,r=lr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=lr(r)}}function hr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dr(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var gr=f&&"documentMode"in document&&11>=document.documentMode,vr=null,mr=null,yr=null,br=!1;function _r(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==vr||vr!==J(r)||("selectionStart"in(r=vr)&&pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&cr(yr,r)||(yr=r,0<(r=jr(mr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vr)))}Dt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur 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),Dt("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),Dt(jt,2);for(var wr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),kr=0;kr<wr.length;kr++)Rt.set(wr[kr],0);l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Er="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Sr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Er));function Ir(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,s,u,c){if($e.apply(this,arguments),He){if(!He)throw Error(a(198));var l=Ke;He=!1,Ke=null,We||(We=!0,Ge=l)}}(r,t,void 0,e),e.currentTarget=null}function xr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,c=s.currentTarget;if(s=s.listener,u!==o&&i.isPropagationStopped())break e;Ir(i,s,c),o=u}else for(a=0;a<r.length;a++){if(u=(s=r[a]).instance,c=s.currentTarget,s=s.listener,u!==o&&i.isPropagationStopped())break e;Ir(i,s,c),o=u}}}if(We)throw e=Ge,We=!1,Ge=null,e}function Tr(e,t){var n=ri(t),r=e+"__bubble";n.has(r)||(Nr(t,e,2,!1),n.add(r))}var Cr="_reactListening"+Math.random().toString(36).slice(2);function Or(e){e[Cr]||(e[Cr]=!0,s.forEach((function(t){Sr.has(t)||Ar(t,!1,e,null),Ar(t,!0,e,null)})))}function Ar(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===e&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!t&&Sr.has(e)){if("scroll"!==e)return;i|=2,o=r}var a=ri(o),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(i|=4),Nr(o,e,i,t),a.add(s))}function Nr(e,t,n,r){var i=Rt.get(t);switch(void 0===i?2:i){case 0:i=Qt;break;case 1:i=Xt;break;default:i=Jt}n=i.bind(null,t,n,e),i=void 0,!Be||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Pr(e,t,n,r,i){var o=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var u=a.tag;if((3===u||4===u)&&((u=a.stateNode.containerInfo)===i||8===u.nodeType&&u.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=Zr(s)))return;if(5===(u=a.tag)||6===u){r=o=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Fe)return e(t,n);Fe=!0;try{Me(e,t,n)}finally{Fe=!1,Ue()}}((function(){var r=o,i=xe(n),a=[];e:{var s=Pt.get(e);if(void 0!==s){var u=dn,c=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":u=Cn;break;case"focusin":c="focus",u=bn;break;case"focusout":c="blur",u=bn;break;case"beforeblur":case"afterblur":u=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=An;break;case Ct:case Ot:case At:u=_n;break;case Nt:u=Nn;break;case"scroll":u=gn;break;case"wheel":u=Pn;break;case"copy":case"cut":case"paste":u=wn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=On}var l=0!==(4&t),f=!l&&"scroll"===e,h=l?null!==s?s+"Capture":null:s;l=[];for(var d,p=r;null!==p;){var g=(d=p).stateNode;if(5===d.tag&&null!==g&&(d=g,null!==h&&(null!=(g=Ve(p,h))&&l.push(Rr(p,g,d)))),f)break;p=p.return}0<l.length&&(s=new u(s,c,null,n,i),a.push({event:s,listeners:l}))}}if(0===(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(c=n.relatedTarget||n.fromElement)||!Zr(c)&&!c[Xr])&&(u||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(c=(c=n.relatedTarget||n.toElement)?Zr(c):null)&&(c!==(f=Qe(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(u=null,c=r),u!==c)){if(l=mn,g="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(l=On,g="onPointerLeave",h="onPointerEnter",p="pointer"),f=null==u?s:ti(u),d=null==c?s:ti(c),(s=new l(g,p+"leave",u,n,i)).target=f,s.relatedTarget=d,g=null,Zr(i)===r&&((l=new l(h,p+"enter",c,n,i)).target=d,l.relatedTarget=f,g=l),f=g,u&&c)e:{for(h=c,p=0,d=l=u;d;d=Dr(d))p++;for(d=0,g=h;g;g=Dr(g))d++;for(;0<p-d;)l=Dr(l),p--;for(;0<d-p;)h=Dr(h),d--;for(;p--;){if(l===h||null!==h&&l===h.alternate)break e;l=Dr(l),h=Dr(h)}l=null}else l=null;null!==u&&Mr(a,s,u,l,!1),null!==c&&null!==f&&Mr(a,f,c,l,!0)}if("select"===(u=(s=r?ti(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var v=Qn;else if(Hn(s))if(Xn)v=ar;else{v=ir;var m=rr}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(v=or);switch(v&&(v=v(e,r))?Kn(a,v,n,i):(m&&m(e,s,r),"focusout"===e&&(m=s._wrapperState)&&m.controlled&&"number"===s.type&&ie(s,"number",s.value)),m=r?ti(r):window,e){case"focusin":(Hn(m)||"true"===m.contentEditable)&&(vr=m,mr=r,yr=null);break;case"focusout":yr=mr=vr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,_r(a,n,i);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":_r(a,n,i)}var y;if(jn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else qn?Vn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Ln&&"ko"!==n.locale&&(qn||"onCompositionStart"!==b?"onCompositionEnd"===b&&qn&&(y=rn()):(tn="value"in(en=i)?en.value:en.textContent,qn=!0)),0<(m=jr(r,b)).length&&(b=new kn(b,e,null,n,i),a.push({event:b,listeners:m}),y?b.data=y:null!==(y=Bn(n))&&(b.data=y))),(y=Mn?function(e,t){switch(e){case"compositionend":return Bn(t);case"keypress":return 32!==t.which?null:(Un=!0,Fn);case"textInput":return(e=t.data)===Fn&&Un?null:e;default:return null}}(e,n):function(e,t){if(qn)return"compositionend"===e||!jn&&Vn(e,t)?(e=rn(),nn=tn=en=null,qn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ln&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))&&(0<(r=jr(r,"onBeforeInput")).length&&(i=new kn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y))}xr(a,t)}))}function Rr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Ve(e,n))&&r.unshift(Rr(e,o,i)),null!=(o=Ve(e,t))&&r.push(Rr(e,o,i))),e=e.return}return r}function Dr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Mr(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,u=s.alternate,c=s.stateNode;if(null!==u&&u===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(u=Ve(n,o))&&a.unshift(Rr(n,u,s)):i||null!=(u=Ve(n,o))&&a.push(Rr(n,u,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function Lr(){}var Fr=null,Ur=null;function Vr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Br(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var qr="function"===typeof setTimeout?setTimeout:void 0,zr="function"===typeof clearTimeout?clearTimeout:void 0;function Hr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Kr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Wr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Gr=0;var Yr=Math.random().toString(36).slice(2),$r="__reactFiber$"+Yr,Qr="__reactProps$"+Yr,Xr="__reactContainer$"+Yr,Jr="__reactEvents$"+Yr;function Zr(e){var t=e[$r];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xr]||n[$r]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Wr(e);null!==e;){if(n=e[$r])return n;e=Wr(e)}return t}n=(e=n).parentNode}return null}function ei(e){return!(e=e[$r]||e[Xr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ti(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function ni(e){return e[Qr]||null}function ri(e){var t=e[Jr];return void 0===t&&(t=e[Jr]=new Set),t}var ii=[],oi=-1;function ai(e){return{current:e}}function si(e){0>oi||(e.current=ii[oi],ii[oi]=null,oi--)}function ui(e,t){oi++,ii[oi]=e.current,e.current=t}var ci={},li=ai(ci),fi=ai(!1),hi=ci;function di(e,t){var n=e.type.contextTypes;if(!n)return ci;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function pi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function gi(){si(fi),si(li)}function vi(e,t,n){if(li.current!==ci)throw Error(a(168));ui(li,t),ui(fi,n)}function mi(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(a(108,G(t)||"Unknown",o));return i({},n,r)}function yi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ci,hi=li.current,ui(li,e),ui(fi,fi.current),!0}function bi(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=mi(e,t,hi),r.__reactInternalMemoizedMergedChildContext=e,si(fi),si(li),ui(li,e)):si(fi),ui(fi,n)}var _i=null,wi=null,ki=o.unstable_runWithPriority,Ei=o.unstable_scheduleCallback,Si=o.unstable_cancelCallback,Ii=o.unstable_shouldYield,xi=o.unstable_requestPaint,Ti=o.unstable_now,Ci=o.unstable_getCurrentPriorityLevel,Oi=o.unstable_ImmediatePriority,Ai=o.unstable_UserBlockingPriority,Ni=o.unstable_NormalPriority,Pi=o.unstable_LowPriority,Ri=o.unstable_IdlePriority,ji={},Di=void 0!==xi?xi:function(){},Mi=null,Li=null,Fi=!1,Ui=Ti(),Vi=1e4>Ui?Ti:function(){return Ti()-Ui};function Bi(){switch(Ci()){case Oi:return 99;case Ai:return 98;case Ni:return 97;case Pi:return 96;case Ri:return 95;default:throw Error(a(332))}}function qi(e){switch(e){case 99:return Oi;case 98:return Ai;case 97:return Ni;case 96:return Pi;case 95:return Ri;default:throw Error(a(332))}}function zi(e,t){return e=qi(e),ki(e,t)}function Hi(e,t,n){return e=qi(e),Ei(e,t,n)}function Ki(){if(null!==Li){var e=Li;Li=null,Si(e)}Wi()}function Wi(){if(!Fi&&null!==Mi){Fi=!0;var e=0;try{var t=Mi;zi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Mi=null}catch(n){throw null!==Mi&&(Mi=Mi.slice(e+1)),Ei(Oi,Ki),n}finally{Fi=!1}}}var Gi=w.ReactCurrentBatchConfig;function Yi(e,t){if(e&&e.defaultProps){for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var $i=ai(null),Qi=null,Xi=null,Ji=null;function Zi(){Ji=Xi=Qi=null}function eo(e){var t=$i.current;si($i),e.type._context._currentValue=t}function to(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}
2function no(e,t){Qi=e,Ji=Xi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ja=!0),e.firstContext=null)}function ro(e,t){if(Ji!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(Ji=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Xi){if(null===Qi)throw Error(a(308));Xi=t,Qi.dependencies={lanes:0,firstContext:t,responders:null}}else Xi=Xi.next=t;return e._currentValue}var io=!1;function oo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function ao(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function so(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function uo(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function co(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function lo(e,t,n,r){var o=e.updateQueue;io=!1;var a=o.firstBaseUpdate,s=o.lastBaseUpdate,u=o.shared.pending;if(null!==u){o.shared.pending=null;var c=u,l=c.next;c.next=null,null===s?a=l:s.next=l,s=c;var f=e.alternate;if(null!==f){var h=(f=f.updateQueue).lastBaseUpdate;h!==s&&(null===h?f.firstBaseUpdate=l:h.next=l,f.lastBaseUpdate=c)}}if(null!==a){for(h=o.baseState,s=0,f=l=c=null;;){u=a.lane;var d=a.eventTime;if((r&u)===u){null!==f&&(f=f.next={eventTime:d,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,g=a;switch(u=t,d=n,g.tag){case 1:if("function"===typeof(p=g.payload)){h=p.call(d,h,u);break e}h=p;break e;case 3:p.flags=-4097&p.flags|64;case 0:if(null===(u="function"===typeof(p=g.payload)?p.call(d,h,u):p)||void 0===u)break e;h=i({},h,u);break e;case 2:io=!0}}null!==a.callback&&(e.flags|=32,null===(u=o.effects)?o.effects=[a]:u.push(a))}else d={eventTime:d,lane:u,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===f?(l=f=d,c=h):f=f.next=d,s|=u;if(null===(a=a.next)){if(null===(u=o.shared.pending))break;a=u.next,u.next=null,o.lastBaseUpdate=u,o.shared.pending=null}}null===f&&(c=h),o.baseState=c,o.firstBaseUpdate=l,o.lastBaseUpdate=f,Fs|=s,e.lanes=s,e.memoizedState=h}}function fo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(a(191,i));i.call(r)}}}var ho=(new r.Component).refs;function po(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:i({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var go={isMounted:function(e){return!!(e=e._reactInternals)&&Qe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=cu(),i=lu(e),o=so(r,i);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),uo(e,o),fu(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=cu(),i=lu(e),o=so(r,i);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),uo(e,o),fu(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=cu(),r=lu(e),i=so(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),uo(e,i),fu(e,r,n)}};function vo(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!cr(n,r)||!cr(i,o))}function mo(e,t,n){var r=!1,i=ci,o=t.contextType;return"object"===typeof o&&null!==o?o=ro(o):(i=pi(t)?hi:li.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?di(e,i):ci),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=go,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function yo(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&go.enqueueReplaceState(t,t.state,null)}function bo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=ho,oo(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=ro(o):(o=pi(t)?hi:li.current,i.context=di(e,o)),lo(e,n,i,r),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(po(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&go.enqueueReplaceState(i,i.state,null),lo(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4)}var _o=Array.isArray;function wo(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){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,e));var i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;
vendor: 14,827 bytes, line 2
2t===ho&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function ko(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Eo(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=zu(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Gu(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=wo(e,t,n),r.return=e,r):((r=Hu(n.type,n.key,n.props,null,e.mode,r)).ref=wo(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Yu(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,o){return null===t||7!==t.tag?((t=Ku(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Gu(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case k:return(n=Hu(t.type,t.key,t.props,null,e.mode,n)).ref=wo(e,null,t),n.return=e,n;case E:return(t=Yu(t,e.mode,n)).return=e,t}if(_o(t)||q(t))return(t=Ku(t,e.mode,n,null)).return=e,t;ko(e,t)}return null}function d(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:u(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case k:return n.key===i?n.type===S?f(e,t,n.props.children,r,i):c(e,t,n,r):null;case E:return n.key===i?l(e,t,n,r):null}if(_o(n)||q(n))return null!==i?null:f(e,t,n,r,null);ko(e,n)}return null}function p(e,t,n,r,i){if("string"===typeof r||"number"===typeof r)return u(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case k:return e=e.get(null===r.key?n:r.key)||null,r.type===S?f(t,e,r.props.children,i,r.key):c(t,e,r,i);case E:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(_o(r)||q(r))return f(t,e=e.get(n)||null,r,i,null);ko(t,r)}return null}function g(i,a,s,u){for(var c=null,l=null,f=a,g=a=0,v=null;null!==f&&g<s.length;g++){f.index>g?(v=f,f=null):v=f.sibling;var m=d(i,f,s[g],u);if(null===m){null===f&&(f=v);break}e&&f&&null===m.alternate&&t(i,f),a=o(m,a,g),null===l?c=m:l.sibling=m,l=m,f=v}if(g===s.length)return n(i,f),c;if(null===f){for(;g<s.length;g++)null!==(f=h(i,s[g],u))&&(a=o(f,a,g),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(i,f);g<s.length;g++)null!==(v=p(f,i,g,s[g],u))&&(e&&null!==v.alternate&&f.delete(null===v.key?g:v.key),a=o(v,a,g),null===l?c=v:l.sibling=v,l=v);return e&&f.forEach((function(e){return t(i,e)})),c}function v(i,s,u,c){var l=q(u);if("function"!==typeof l)throw Error(a(150));if(null==(u=l.call(u)))throw Error(a(151));for(var f=l=null,g=s,v=s=0,m=null,y=u.next();null!==g&&!y.done;v++,y=u.next()){g.index>v?(m=g,g=null):m=g.sibling;var b=d(i,g,y.value,c);if(null===b){null===g&&(g=m);break}e&&g&&null===b.alternate&&t(i,g),s=o(b,s,v),null===f?l=b:f.sibling=b,f=b,g=m}if(y.done)return n(i,g),l;if(null===g){for(;!y.done;v++,y=u.next())null!==(y=h(i,y.value,c))&&(s=o(y,s,v),null===f?l=y:f.sibling=y,f=y);return l}for(g=r(i,g);!y.done;v++,y=u.next())null!==(y=p(g,i,v,y.value,c))&&(e&&null!==y.alternate&&g.delete(null===y.key?v:y.key),s=o(y,s,v),null===f?l=y:f.sibling=y,f=y);return e&&g.forEach((function(e){return t(i,e)})),l}return function(e,r,o,u){var c="object"===typeof o&&null!==o&&o.type===S&&null===o.key;c&&(o=o.props.children);var l="object"===typeof o&&null!==o;if(l)switch(o.$$typeof){case k:e:{for(l=o.key,c=r;null!==c;){if(c.key===l){switch(c.tag){case 7:if(o.type===S){n(e,c.sibling),(r=i(c,o.props.children)).return=e,e=r;break e}break;default:if(c.elementType===o.type){n(e,c.sibling),(r=i(c,o.props)).ref=wo(e,c,o),r.return=e,e=r;break e}}n(e,c);break}t(e,c),c=c.sibling}o.type===S?((r=Ku(o.props.children,e.mode,u,o.key)).return=e,e=r):((u=Hu(o.type,o.key,o.props,null,e.mode,u)).ref=wo(e,r,o),u.return=e,e=u)}return s(e);case E:e:{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(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Yu(o,e.mode,u)).return=e,e=r}return s(e)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Gu(o,e.mode,u)).return=e,e=r),s(e);if(_o(o))return g(e,r,o,u);if(q(o))return v(e,r,o,u);if(l&&ko(e,o),"undefined"===typeof o&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,G(e.type)||"Component"))}return n(e,r)}}var So=Eo(!0),Io=Eo(!1),xo={},To=ai(xo),Co=ai(xo),Oo=ai(xo);function Ao(e){if(e===xo)throw Error(a(174));return e}function No(e,t){switch(ui(Oo,t),ui(Co,e),ui(To,xo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pe(null,"");break;default:t=pe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}si(To),ui(To,t)}function Po(){si(To),si(Co),si(Oo)}function Ro(e){Ao(Oo.current);var t=Ao(To.current),n=pe(t,e.type);t!==n&&(ui(Co,e),ui(To,n))}function jo(e){Co.current===e&&(si(To),si(Co))}var Do=ai(0);function Mo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Lo=null,Fo=null,Uo=!1;function Vo(e,t){var n=Bu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Bo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function qo(e){if(Uo){var t=Fo;if(t){var n=t;if(!Bo(e,t)){if(!(t=Kr(n.nextSibling))||!Bo(e,t))return e.flags=-1025&e.flags|2,Uo=!1,void(Lo=e);Vo(Lo,n)}Lo=e,Fo=Kr(t.firstChild)}else e.flags=-1025&e.flags|2,Uo=!1,Lo=e}}function zo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Lo=e}function Ho(e){if(e!==Lo)return!1;if(!Uo)return zo(e),Uo=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Br(t,e.memoizedProps))for(t=Fo;t;)Vo(e,t),t=Kr(t.nextSibling);if(zo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Fo=Kr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Fo=null}}else Fo=Lo?Kr(e.stateNode.nextSibling):null;return!0}function Ko(){Fo=Lo=null,Uo=!1}var Wo=[];function Go(){for(var e=0;e<Wo.length;e++)Wo[e]._workInProgressVersionPrimary=null;Wo.length=0}var Yo=w.ReactCurrentDispatcher,$o=w.ReactCurrentBatchConfig,Qo=0,Xo=null,Jo=null,Zo=null,ea=!1,ta=!1;function na(){throw Error(a(321))}function ra(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function ia(e,t,n,r,i,o){if(Qo=o,Xo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Yo.current=null===e||null===e.memoizedState?Aa:Na,e=n(r,i),ta){o=0;do{if(ta=!1,!(25>o))throw Error(a(301));o+=1,Zo=Jo=null,t.updateQueue=null,Yo.current=Pa,e=n(r,i)}while(ta)}if(Yo.current=Oa,t=null!==Jo&&null!==Jo.next,Qo=0,Zo=Jo=Xo=null,ea=!1,t)throw Error(a(300));return e}function oa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Zo?Xo.memoizedState=Zo=e:Zo=Zo.next=e,Zo}function aa(){if(null===Jo){var e=Xo.alternate;e=null!==e?e.memoizedState:null}else e=Jo.next;var t=null===Zo?Xo.memoizedState:Zo.next;if(null!==t)Zo=t,Jo=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Jo=e).memoizedState,baseState:Jo.baseState,baseQueue:Jo.baseQueue,queue:Jo.queue,next:null},null===Zo?Xo.memoizedState=Zo=e:Zo=Zo.next=e}return Zo}function sa(e,t){return"function"===typeof t?t(e):t}function ua(e){var t=aa(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Jo,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.lane;if((Qo&l)===l)null!==u&&(u=u.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var f={lane:l,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(s=u=f,o=r):u=u.next=f,Xo.lanes|=l,Fs|=l}c=c.next}while(null!==c&&c!==i);null===u?o=r:u.next=s,sr(r,t.memoizedState)||(ja=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ca(e){var t=aa(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);sr(o,t.memoizedState)||(ja=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function la(e,t,n){var r=t._getVersion;r=r(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(Qo&e)===e)&&(t._workInProgressVersionPrimary=r,Wo.push(t))),e)return n(t._source);throw Wo.push(t),Error(a(350))}function fa(e,t,n,r){var i=As;if(null===i)throw Error(a(349));var o=t._getVersion,s=o(t._source),u=Yo.current,c=u.useState((function(){return la(i,t,n)})),l=c[1],f=c[0];c=Zo;var h=e.memoizedState,d=h.refs,p=d.getSnapshot,g=h.source;h=h.subscribe;var v=Xo;return e.memoizedState={refs:d,source:t,subscribe:r},u.useEffect((function(){d.getSnapshot=n,d.setSnapshot=l;var e=o(t._source);if(!sr(s,e)){e=n(t._source),sr(f,e)||(l(e),e=lu(v),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,a=e;0<a;){var u=31-Ht(a),c=1<<u;r[u]|=e,a&=~c}}}),[n,t,r]),u.useEffect((function(){return r(t._source,(function(){var e=d.getSnapshot,n=d.setSnapshot;try{n(e(t._source));var r=lu(v);i.mutableReadLanes|=r&i.pendingLanes}catch(o){n((function(){throw o}))}}))}),[t,r]),sr(p,n)&&sr(g,t)&&sr(h,r)||((e={pending:null,dispatch:null,lastRenderedReducer:sa,lastRenderedState:f}).dispatch=l=Ca.bind(null,Xo,e),c.queue=e,c.baseQueue=null,f=la(i,t,n),c.memoizedState=c.baseState=f),f}function ha(e,t,n){return fa(aa(),e,t,n)}function da(e){var t=oa();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:sa,lastRenderedState:e}).dispatch=Ca.bind(null,Xo,e),[t.memoizedState,e]}function pa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Xo.updateQueue)?(t={lastEffect:null},Xo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ga(e){return e={current:e},oa().memoizedState=e}function va(){return aa().memoizedState}function ma(e,t,n,r){var i=oa();Xo.flags|=e,i.memoizedState=pa(1|t,n,void 0,void 0===r?null:r)}function ya(e,t,n,r){var i=aa();r=void 0===r?null:r;var o=void 0;if(null!==Jo){var a=Jo.memoizedState;if(o=a.destroy,null!==r&&ra(r,a.deps))return void pa(t,n,o,r)}Xo.flags|=e,i.memoizedState=pa(1|t,n,o,r)}function ba(e,t){return ma(516,4,e,t)}function _a(e,t){return ya(516,4,e,t)}function wa(e,t){return ya(4,2,e,t)}function ka(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ea(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ya(4,2,ka.bind(null,t,e),n)}function Sa(){}function Ia(e,t){var n=aa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ra(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xa(e,t){var n=aa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ra(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ta(e,t){var n=Bi();zi(98>n?98:n,(function(){e(!0)})),zi(97<n?97:n,(function(){var n=$o.transition;$o.transition=1;try{e(!1),t()}finally{$o.transition=n}}))}function Ca(e,t,n){var r=cu(),i=lu(e),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?o.next=o:(o.next=a.next,a.next=o),t.pending=o,a=e.alternate,e===Xo||null!==a&&a===Xo)ta=ea=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,u=a(s,n);if(o.eagerReducer=a,o.eagerState=u,sr(u,s))return}catch(c){}fu(e,i,r)}}var Oa={readContext:ro,useCallback:na,useContext:na,useEffect:na,useImperativeHandle:na,useLayoutEffect:na,useMemo:na,useReducer:na,useRef:na,useState:na,useDebugValue:na,useDeferredValue:na,useTransition:na,useMutableSource:na,useOpaqueIdentifier:na,unstable_isNewReconciler:!1},Aa={readContext:ro,useCallback:function(e,t){return oa().memoizedState=[e,void 0===t?null:t],e},useContext:ro,useEffect:ba,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ma(4,2,ka.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ma(4,2,e,t)},useMemo:function(e,t){var n=oa();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=oa();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Ca.bind(null,Xo,e),[r.memoizedState,e]},useRef:ga,useState:da,useDebugValue:Sa,useDeferredValue:function(e){var t=da(e),n=t[0],r=t[1];return ba((function(){var t=$o.transition;$o.transition=1;try{r(e)}finally{$o.transition=t}}),[e]),n},useTransition:function(){var e=da(!1),t=e[0];return ga(e=Ta.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=oa();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},fa(r,e,t,n)},useOpaqueIdentifier:function(){if(Uo){var e=!1,t=function(e){return{$$typeof:D,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Gr++).toString(36))),Error(a(355))}
2)),n=da(t)[1];return 0===(2&Xo.mode)&&(Xo.flags|=516,pa(5,(function(){n("r:"+(Gr++).toString(36))}),void 0,null)),t}return da(t="r:"+(Gr++).toString(36)),t},unstable_isNewReconciler:!1},Na={readContext:ro,useCallback:Ia,useContext:ro,useEffect:_a,useImperativeHandle:Ea,useLayoutEffect:wa,useMemo:xa,useReducer:ua,useRef:va,useState:function(){return ua(sa)},useDebugValue:Sa,useDeferredValue:function(e){var t=ua(sa),n=t[0],r=t[1];return _a((function(){var t=$o.transition;$o.transition=1;try{r(e)}finally{$o.transition=t}}),[e]),n},useTransition:function(){var e=ua(sa)[0];return[va().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return ua(sa)[0]},unstable_isNewReconciler:!1},Pa={readContext:ro,useCallback:Ia,useContext:ro,useEffect:_a,useImperativeHandle:Ea,useLayoutEffect:wa,useMemo:xa,useReducer:ca,useRef:va,useState:function(){return ca(sa)},useDebugValue:Sa,useDeferredValue:function(e){var t=ca(sa),n=t[0],r=t[1];return _a((function(){var t=$o.transition;$o.transition=1;try{r(e)}finally{$o.transition=t}}),[e]),n},useTransition:function(){var e=ca(sa)[0];return[va().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return ca(sa)[0]},unstable_isNewReconciler:!1},Ra=w.ReactCurrentOwner,ja=!1;function Da(e,t,n,r){t.child=null===e?Io(t,null,n,r):So(t,e.child,n,r)}function Ma(e,t,n,r,i){n=n.render;var o=t.ref;return no(t,i),r=ia(e,t,n,r,o,i),null===e||ja?(t.flags|=1,Da(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,ns(e,t,i))}function La(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!==typeof a||qu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Hu(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Fa(e,t,a,r,i,o))}return a=e.child,0===(i&o)&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:cr)(i,r)&&e.ref===t.ref)?ns(e,t,o):(t.flags|=1,(e=zu(a,r)).ref=t.ref,e.return=t,t.child=e)}function Fa(e,t,n,r,i,o){if(null!==e&&cr(e.memoizedProps,r)&&e.ref===t.ref){if(ja=!1,0===(o&i))return t.lanes=e.lanes,ns(e,t,o);0!==(16384&e.flags)&&(ja=!0)}return Ba(e,t,n,r,o)}function Ua(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},bu(t,n);else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},bu(t,e),null;t.memoizedState={baseLanes:0},bu(t,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,bu(t,r);return Da(e,t,i,n),t.child}function Va(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Ba(e,t,n,r,i){var o=pi(n)?hi:li.current;return o=di(t,o),no(t,i),n=ia(e,t,n,r,o,i),null===e||ja?(t.flags|=1,Da(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,ns(e,t,i))}function qa(e,t,n,r,i){if(pi(n)){var o=!0;yi(t)}else o=!1;if(no(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),mo(t,n,r),bo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=ro(c):c=di(t,c=pi(n)?hi:li.current);var l=n.getDerivedStateFromProps,f="function"===typeof l||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==c)&&yo(t,a,r,c),io=!1;var h=t.memoizedState;a.state=h,lo(t,r,a,i),u=t.memoizedState,s!==r||h!==u||fi.current||io?("function"===typeof l&&(po(t,n,l,r),u=t.memoizedState),(s=io||vo(t,n,s,r,h,u,c))?(f||"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&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,ao(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Yi(t.type,s),a.props=c,f=t.pen
2dingProps,h=a.context,"object"===typeof(u=n.contextType)&&null!==u?u=ro(u):u=di(t,u=pi(n)?hi:li.current);var d=n.getDerivedStateFromProps;(l="function"===typeof d||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==f||h!==u)&&yo(t,a,r,u),io=!1,h=t.memoizedState,a.state=h,lo(t,r,a,i);var p=t.memoizedState;s!==f||h!==p||fi.current||io?("function"===typeof d&&(po(t,n,d,r),p=t.memoizedState),(c=io||vo(t,n,c,r,h,p,u))?(l||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,u),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,u)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=u,r=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),r=!1)}return za(e,t,n,r,o,i)}function za(e,t,n,r,i,o){Va(e,t);var a=0!==(64&t.flags);if(!r&&!a)return i&&bi(t,n,!1),ns(e,t,o);r=t.stateNode,Ra.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=So(t,e.child,null,o),t.child=So(t,null,s,o)):Da(e,t,s,o),t.memoizedState=r.state,i&&bi(t,n,!0),t.child}function Ha(e){var t=e.stateNode;t.pendingContext?vi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&vi(0,t.context,!1),No(e,t.containerInfo)}var Ka,Wa,Ga,Ya={dehydrated:null,retryLane:0};function $a(e,t,n){var r,i=t.pendingProps,o=Do.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&o)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),ui(Do,1&o),null===e?(void 0!==i.fallback&&qo(t),e=i.children,o=i.fallback,a?(e=Qa(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ya,e):"number"===typeof i.unstable_expectedLoadTime?(e=Qa(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ya,t.lanes=33554432,e):((n=Wu({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(i=Ja(e,t,i.children,i.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Ya,i):(n=Xa(e,t,i.children,n),t.memoizedState=null,n))}function Qa(e,t,n,r){var i=e.mode,o=e.child;return t={mode:"hidden",children:t},0===(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=Wu(t,i,0,null),n=Ku(n,i,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function Xa(e,t,n,r){var i=e.child;return e=i.sibling,n=zu(i,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function Ja(e,t,n,r,i){var o=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0===(2&o)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=zu(a,s),null!==e?r=zu(e,r):(r=Ku(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Za(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),to(e.return,t)}function es(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.lastEffect=o)}function ts(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Da(e,t,r.children,n),0!==(2&(r=Do.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;
2){if(13===e.tag)null!==e.memoizedState&&Za(e,n);else if(19===e.tag)Za(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ui(Do,r),0===(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Mo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),es(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Mo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}es(t,!0,n,null,o,t.lastEffect);break;case"together":es(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function ns(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Fs|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=zu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;
2)e=e.sibling,(n=n.sibling=zu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function rs(e,t){if(!Uo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function is(e,t,n){var r=t.pendingProps;switch(t.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 pi(t.type)&&gi(),null;case 3:return Po(),si(fi),si(li),Go(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Ho(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:jo(t);var o=Ao(Oo.current);if(n=t.type,null!==e&&null!=t.stateNode)Wa(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Ao(To.current),Ho(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[$r]=t,r[Qr]=s,n){case"dialog":Tr("cancel",r),Tr("close",r);break;case"iframe":case"object":case"embed":Tr("load",r);break;case"video":case"audio":for(e=0;e<Er.length;e++)Tr(Er[e],r);break;case"source":Tr("error",r);break;case"img":case"image":case"link":Tr("error",r),Tr("load",r);break;case"details":Tr("toggle",r);break;case"input":ee(r,s),Tr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Tr("invalid",r);break;case"textarea":ue(r,s),Tr("invalid",r)}for(var c in Se(n,s),e=null,s)s.hasOwnProperty(c)&&(o=s[c],"children"===c?"string"===typeof o?r.textContent!==o&&(e=["children",o]):"number"===typeof o&&r.textContent!==""+o&&(e=["children",""+o]):u.hasOwnProperty(c)&&null!=o&&"onScroll"===c&&Tr("scroll",r));switch(n){case"input":Q(r),re(r,s,!0);break;case"textarea":Q(r),le(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=Lr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(c=9===o.nodeType?o:o.ownerDocument,e===fe&&(e=de(n)),e===fe?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[$r]=t,e[Qr]=r,Ka(e,t),t.stateNode=e,c=Ie(n,r),n){case"dialog":Tr("cancel",e),Tr("close",e),o=r;break;case"iframe":case"object":case"embed":Tr("load",e),o=r;break;case"video":case"audio":for(o=0;o<Er.length;o++)Tr(Er[o],e);o=r;break;case"source":Tr("error",e),o=r;break;case"img":case"image":case"link":Tr("error",e),Tr("load",e),o=r;break;case"details":Tr("toggle",e),o=r;break;case"input":ee(e,r),o=Z(e,r),Tr("invalid",e);break;case"option":o=oe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=i({},r,{value:void 0}),Tr("invalid",e);break;case"textarea":ue(e,r),o=se(e,r),Tr("invalid",e);break;default:o=r}Se(n,o);var l=o;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];"style"===s?ke(e,f):"dangerouslySetInnerHTML"===s?null!=(f=f?f.__html:void 0)&&me(e,f):"children"===s?"string"===typeof f?("textarea"!==n||""!==f)&&ye(e,f):"number"===typeof f&&ye(e,""+f):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(u.hasOwnProperty(s)?null!=f&&"onScroll"===s&&Tr("scroll",e):null!=f&&_(e,s,f,c))}switch(n){case"input":Q(e),re(e,r,!1);break;case"textarea":Q(e),le(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Y(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ae(e,!!r.multiple,s,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=Lr)}Vr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Ga(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=Ao(Oo.current),Ao(To.current),Ho(t)?(r=t.stateNode,n=t.memoizedProps,r[$r]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[$r]=t,t.stateNode=r)}return null;case 13:return si(Do),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Ho(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Do.current)?0===Ds&&(Ds=3):(0!==Ds&&3!==Ds||(Ds=4),null===As||0===(134217727&Fs)&&0===(134217727&Us)||gu(As,Ps))),(r||n)&&(t.flags|=4),null);case 4:return Po(),null===e&&Or(t.stateNode.containerInfo),null;case 10:return eo(t),null;case 17:return pi(t.type)&&gi(),null;
vendor: 4,529 bytes, line 2
2case 19:if(si(Do),null===(r=t.memoizedState))return null;if(s=0!==(64&t.flags),null===(c=r.rendering))if(s)rs(r,!1);else{if(0!==Ds||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(c=Mo(e))){for(t.flags|=64,rs(r,!1),null!==(s=c.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(c=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ui(Do,1&Do.current|2),t.child}e=e.sibling}null!==r.tail&&Vi()>zs&&(t.flags|=64,s=!0,rs(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=Mo(c))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),rs(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!Uo)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Vi()-r.renderingStartTime>zs&&1073741824!==n&&(t.flags|=64,s=!0,rs(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Vi(),n.sibling=null,t=Do.current,ui(Do,s?1&t|2:1&t),n):null;case 23:case 24:return _u(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function os(e){switch(e.tag){case 1:pi(e.type)&&gi();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Po(),si(fi),si(li),Go(),0!==(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return jo(e),null;case 13:return si(Do),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return si(Do),null;case 4:return Po(),null;case 10:return eo(e),null;case 23:case 24:return _u(),null;default:return null}}function as(e,t){try{var n="",r=t;do{n+=W(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i}}function ss(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Ka=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Wa=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ao(To.current);var a,s=null;switch(n){case"input":o=Z(e,o),r=Z(e,r),s=[];break;case"option":o=oe(e,o),r=oe(e,r),s=[];break;case"select":o=i({},o,{value:void 0}),r=i({},r,{value:void 0}),s=[];break;case"textarea":o=se(e,o),r=se(e,r),s=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(e.onclick=Lr)}for(f in Se(n,r),n=null,o)if(!r.hasOwnProperty(f)&&o.hasOwnProperty(f)&&null!=o[f])if("style"===f){var c=o[f];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(u.hasOwnProperty(f)?s||(s=[]):(s=s||[]).push(f,null));for(f in r){var l=r[f];if(c=null!=o?o[f]:void 0,r.hasOwnProperty(f)&&l!==c&&(null!=l||null!=c))if("style"===f)if(c){for(a in c)!c.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&c[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(s||(s=[]),s.push(f,n)),n=l;else"dangerouslySetInnerHTML"===f?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(s=s||[]).push(f,l)):"children"===f?"string"!==typeof l&&"number"!==typeof l||(s=s||[]).push(f,""+l):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(u.hasOwnProperty(f)?(null!=l&&"onScroll"===f&&Tr("scroll",e),s||c===l||(s=[])):"object"===typeof l&&null!==l&&l.$$typeof===D?l.toString():(s=s||[]).push(f,l))}n&&(s=s||[]).push("style",n);var f=s;(t.updateQueue=f)&&(t.flags|=4)}},Ga=function(e,t,n,r){n!==r&&(t.flags|=4)};var us="function"===typeof WeakMap?WeakMap:Map;function cs(e,t,n){(n=so(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gs||(Gs=!0,Ys=r),ss(0,t)},n}
2function ls(e,t,n){(n=so(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return ss(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===$s?$s=new Set([this]):$s.add(this),ss(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var fs="function"===typeof WeakSet?WeakSet:Set;function hs(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Lu(e,n)}else t.current=null}function ds(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Yi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Hr(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(a(163))}function ps(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!==(4&(i=i.tag))&&0!==(1&i)&&(ju(n,e),Ru(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Yi(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&fo(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}fo(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Vr(n.type,n.memoizedProps)&&e.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&&kt(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(a(163))}function gs(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=void 0!==i&&null!==i&&i.hasOwnProperty("display")?i.display:null,r.style.display=we("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&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}}function vs(e,t){if(wi&&"function"===typeof wi.onCommitFiberUnmount)try{wi.onCommitFiberUnmount(_i,t)}catch(o){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!==(4&r))ju(t,n);else{r=t;try{i()}catch(o){Lu(r,o)}}n=n.next}while(n!==e)}break;case 1:if(hs(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){Lu(t,o)}break;case 5:hs(t);break;case 4:ks(e,t)}}function ms(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function ys(e){return 5===e.tag||3===e.tag||4===e.tag}function bs(e){e:{for(var t=e.return;null!==t;){if(ys(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ye(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ys(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?_s(e,n,t):ws(e,n,t)}
vendor: 11,460 bytes, line 2
2function _s(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Lr));else if(4!==r&&null!==(e=e.child))for(_s(e,t,n),e=e.sibling;null!==e;)_s(e,t,n),e=e.sibling}function ws(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ws(e,t,n),e=e.sibling;null!==e;)ws(e,t,n),e=e.sibling}function ks(e,t){for(var n,r,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(a(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag){e:for(var s=e,u=i,c=u;;)if(vs(s,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===u)break e;for(;null===c.sibling;){if(null===c.return||c.return===u)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(s=n,u=i.stateNode,8===s.nodeType?s.parentNode.removeChild(u):s.removeChild(u)):n.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(vs(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function Es(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Qr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Ie(e,i),t=Ie(e,r),i=0;i<o.length;i+=2){var s=o[i],u=o[i+1];"style"===s?ke(n,u):"dangerouslySetInnerHTML"===s?me(n,u):"children"===s?ye(n,u):_(n,s,u,t)}switch(e){case"input":ne(n,r);break;case"textarea":ce(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?ae(n,!!r.multiple,o,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,kt(n.containerInfo)));case 12:return;case 13:return null!==t.memoizedState&&(qs=Vi(),gs(t.child,!0)),void Ss(t);case 19:return void Ss(t);case 17:return;case 23:case 24:return void gs(t,null!==t.memoizedState)}throw Error(a(163))}function Ss(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new fs),t.forEach((function(t){var r=Uu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Is(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var xs=Math.ceil,Ts=w.ReactCurrentDispatcher,Cs=w.ReactCurrentOwner,Os=0,As=null,Ns=null,Ps=0,Rs=0,js=ai(0),Ds=0,Ms=null,Ls=0,Fs=0,Us=0,Vs=0,Bs=null,qs=0,zs=1/0;function Hs(){zs=Vi()+500}var Ks,Ws=null,Gs=!1,Ys=null,$s=null,Qs=!1,Xs=null,Js=90,Zs=[],eu=[],tu=null,nu=0,ru=null,iu=-1,ou=0,au=0,su=null,uu=!1;function cu(){return 0!==(48&Os)?Vi():-1!==iu?iu:iu=Vi()}function lu(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===Bi()?1:2;if(0===ou&&(ou=Ls),0!==Gi.transition){0!==au&&(au=null!==Bs?Bs.pendingLanes:0),e=ou;var t=4186112&~au;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Bi(),0!==(4&Os)&&98===e?e=Vt(12,ou):e=Vt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ou),e}function fu(e,t,n){if(50<nu)throw nu=0,ru=null,Error(a(185));if(null===(e=hu(e,t)))return null;zt(e,t,n),e===As&&(Us|=t,4===Ds&&gu(e,Ps));var r=Bi();1===t?0!==(8&Os)&&0===(48&Os)?vu(e):(du(e,n),0===Os&&(Hs(),Ki())):(0===(4&Os)||98!==r&&99!==r||(null===tu?tu=new Set([e]):tu.add(e)),du(e,n)),Bs=e}function hu(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function du(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var u=31-Ht(s),c=1<<u,l=o[u];if(-1===l){if(0===(c&r)||0!==(c&i)){l=t,Lt(c);var f=Mt;o[u]=10<=f?l+250:6<=f?l+5e3:-1}}else l<=t&&(e.expiredLanes|=c);s&=~c}if(r=Ft(e,e===As?Ps:0),t=Mt,0===r)null!==n&&(n!==ji&&Si(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==ji&&Si(n)}15===t?(n=vu.bind(null,e),null===Mi?(Mi=[n],Li=Ei(Oi,Wi)):Mi.push(n),n=ji):14===t?n=Hi(99,vu.bind(null,e)):n=Hi(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),pu.bind(null,e)),e.callbackPriority=t,e.callbackNode=n}}function pu(e){if(iu=-1,au=ou=0,0!==(48&Os))throw Error(a(327));var t=e.callbackNode;if(Pu()&&e.callbackNode!==t)return null;var n=Ft(e,e===As?Ps:0);if(0===n)return null;var r=n,i=Os;Os|=16;var o=Eu();for(As===e&&Ps===r||(Hs(),wu(e,r));;)try{xu();break}catch(u){ku(e,u)}if(Zi(),Ts.current=o,Os=i,null!==Ns?r=0:(As=null,Ps=0,r=Ds),0!==(Ls&Us))wu(e,0);else if(0!==r){if(2===r&&(Os|=64,e.hydrate&&(e.hydrate=!1,Hr(e.containerInfo)),0!==(n=Ut(e))&&(r=Su(e,n))),1===r)throw t=Ms,wu(e,0),gu(e,n),du(e,Vi()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:Ou(e);break;case 3:if(gu(e,n),(62914560&n)===n&&10<(r=qs+500-Vi())){if(0!==Ft(e,0))break;if(((i=e.suspendedLanes)&n)!==n){cu(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=qr(Ou.bind(null,e),r);break}Ou(e);break;case 4:if(gu(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var s=31-Ht(n);o=1<<s,(s=r[s])>i&&(i=s),n&=~o}if(n=i,10<(n=(120>(n=Vi()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*xs(n/1960))-n)){e.timeoutHandle=qr(Ou.bind(null,e),n);break}Ou(e);break;case 5:Ou(e);break;default:throw Error(a(329))}}return du(e,Vi()),e.callbackNode===t?pu.bind(null,e):null}function gu(e,t){for(t&=~Vs,t&=~Us,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),r=1<<n;e[n]=-1,t&=~r}}function vu(e){if(0!==(48&Os))throw Error(a(327));if(Pu(),e===As&&0!==(e.expiredLanes&Ps)){var t=Ps,n=Su(e,t);0!==(Ls&Us)&&(n=Su(e,t=Ft(e,t)))}else n=Su(e,t=Ft(e,0));if(0!==e.tag&&2===n&&(Os|=64,e.hydrate&&(e.hydrate=!1,Hr(e.containerInfo)),0!==(t=Ut(e))&&(n=Su(e,t))),1===n)throw n=Ms,wu(e,0),gu(e,t),du(e,Vi()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ou(e),du(e,Vi()),null}function mu(e,t){var n=Os;Os|=1;try{return e(t)}finally{0===(Os=n)&&(Hs(),Ki())}}function yu(e,t){var n=Os;Os&=-2,Os|=8;try{return e(t)}finally{0===(Os=n)&&(Hs(),Ki())}}function bu(e,t){ui(js,Rs),Rs|=t,Ls|=t}function _u(){Rs=js.current,si(js)}function wu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,zr(n)),null!==Ns)for(n=Ns.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&gi();break;case 3:Po(),si(fi),si(li),Go();break;case 5:jo(r);break;case 4:Po();break;case 13:case 19:si(Do);break;case 10:eo(r);break;case 23:case 24:_u()}n=n.return}As=e,Ns=zu(e.current,null),Ps=Rs=Ls=t,Ds=0,Ms=null,Vs=Us=Fs=0}function ku(e,t){for(;;){var n=Ns;try{if(Zi(),Yo.current=Oa,ea){for(var r=Xo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ea=!1}if(Qo=0,Zo=Jo=Xo=null,ta=!1,Cs.current=null,null===n||null===n.return){Ds=1,Ms=t,Ns=null;break}e:{var o=e,a=n.return,s=n,u=t;if(t=Ps,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u;if(0===(2&s.mode)){var l=s.alternate;l?(s.updateQueue=l.updateQueue,s.memoizedState=l.memoizedState,s.lanes=l.lanes):(s.updateQueue=null,s.memoizedState=null)}var f=0!==(1&Do.current),h=a;do{var d;if(d=13===h.tag){var p=h.memoizedState;if(null!==p)d=null!==p.dehydrated;else{var g=h.memoizedProps;d=void 0!==g.fallback&&(!0!==g.unstable_avoidThisFallback||!f)}}if(d){var v=h.updateQueue;if(null===v){var m=new Set;m.add(c),h.updateQueue=m}else v.add(c);if(0===(2&h.mode)){if(h.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var y=so(-1,1);y.tag=2,uo(s,y)}s.lanes|=1;break e}u=void 0,s=t;var b=o.pingCache;if(null===b?(b=o.pingCache=new us,u=new Set,b.set(c,u)):void 0===(u=b.get(c))&&(u=new Set,b.set(c,u)),!u.has(s)){u.add(s);var _=Fu.bind(null,o,c,s);c.then(_,_)}h.flags|=4096,h.lanes=t;break e}h=h.return}while(null!==h);u=Error((G(s.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.")}5!==Ds&&(Ds=2),u=as(u,s),h=a;do{switch(h.tag){case 3:o=u,h.flags|=4096,t&=-t,h.lanes|=t,co(h,cs(0,o,t));break e;case 1:o=u;var w=h.type,k=h.stateNode;if(0===(64&h.flags)&&("function"===typeof w.getDerivedStateFromError||null!==k&&"function"===typeof k.componentDidCatch&&(null===$s||!$s.has(k)))){h.flags|=4096,t&=-t,h.lanes|=t,co(h,ls(h,o,t));break e}}h=h.return}while(null!==h)}Cu(n)}catch(E){t=E,Ns===n&&null!==n&&(Ns=n=n.return);continue}break}}function Eu(){var e=Ts.current;return Ts.current=Oa,null===e?Oa:e}function Su(e,t){var n=Os;Os|=16;var r=Eu();for(As===e&&Ps===t||wu(e,t);;)try{Iu();break}catch(i){ku(e,i)}if(Zi(),Os=n,Ts.current=r,null!==Ns)throw Error(a(261));return As=null,Ps=0,Ds}function Iu(){for(;null!==Ns;)Tu(Ns)}function xu(){for(;null!==Ns&&!Ii();)Tu(Ns)}function Tu(e){var t=Ks(e.alternate,e,Rs);e.memoizedProps=e.pendingProps,null===t?Cu(e):Ns=t,Cs.current=null}function Cu(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=is(n,t,Rs)))return void(Ns=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Rs)||0===(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=os(t)))return n.flags&=2047,void(Ns=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Ns=t);Ns=t=e}while(null!==t);0===Ds&&(Ds=5)}function Ou(e){var t=Bi();return zi(99,Au.bind(null,e,t)),null}function Au(e,t){do{Pu()}while(null!==Xs);if(0!==(48&Os))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var s=e.eventTimes,u=e.expirationTimes;0<o;){var c=31-Ht(o),l=1<<c;i[c]=0,s[c]=-1,u[c]=-1,o&=~l}
vendor: 13,843 bytes, line 2
2if(null!==tu&&0===(24&r)&&tu.has(e)&&tu.delete(e),e===As&&(Ns=As=null,Ps=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=Os,Os|=32,Cs.current=null,Fr=$t,pr(s=dr())){if("selectionStart"in s)u={start:s.selectionStart,end:s.selectionEnd};else e:if(u=(u=s.ownerDocument)&&u.defaultView||window,(l=u.getSelection&&u.getSelection())&&0!==l.rangeCount){u=l.anchorNode,o=l.anchorOffset,c=l.focusNode,l=l.focusOffset;try{u.nodeType,c.nodeType}catch(x){u=null;break e}var f=0,h=-1,d=-1,p=0,g=0,v=s,m=null;t:for(;;){for(var y;v!==u||0!==o&&3!==v.nodeType||(h=f+o),v!==c||0!==l&&3!==v.nodeType||(d=f+l),3===v.nodeType&&(f+=v.nodeValue.length),null!==(y=v.firstChild);)m=v,v=y;for(;;){if(v===s)break t;if(m===u&&++p===o&&(h=f),m===c&&++g===l&&(d=f),null!==(y=v.nextSibling))break;m=(v=m).parentNode}v=y}u=-1===h||-1===d?null:{start:h,end:d}}else u=null;u=u||{start:0,end:0}}else u=null;Ur={focusedElem:s,selectionRange:u},$t=!1,su=null,uu=!1,Ws=r;do{try{Nu()}catch(x){if(null===Ws)throw Error(a(330));Lu(Ws,x),Ws=Ws.nextEffect}}while(null!==Ws);su=null,Ws=r;do{try{for(s=e;null!==Ws;){var b=Ws.flags;if(16&b&&ye(Ws.stateNode,""),128&b){var _=Ws.alternate;if(null!==_){var w=_.ref;null!==w&&("function"===typeof w?w(null):w.current=null)}}switch(1038&b){case 2:bs(Ws),Ws.flags&=-3;break;case 6:bs(Ws),Ws.flags&=-3,Es(Ws.alternate,Ws);break;case 1024:Ws.flags&=-1025;break;case 1028:Ws.flags&=-1025,Es(Ws.alternate,Ws);break;case 4:Es(Ws.alternate,Ws);break;case 8:ks(s,u=Ws);var k=u.alternate;ms(u),null!==k&&ms(k)}Ws=Ws.nextEffect}}catch(x){if(null===Ws)throw Error(a(330));Lu(Ws,x),Ws=Ws.nextEffect}}while(null!==Ws);if(w=Ur,_=dr(),b=w.focusedElem,s=w.selectionRange,_!==b&&b&&b.ownerDocument&&hr(b.ownerDocument.documentElement,b)){null!==s&&pr(b)&&(_=s.start,void 0===(w=s.end)&&(w=_),"selectionStart"in b?(b.selectionStart=_,b.selectionEnd=Math.min(w,b.value.length)):(w=(_=b.ownerDocument||document)&&_.defaultView||window).getSelection&&(w=w.getSelection(),u=b.textContent.length,k=Math.min(s.start,u),s=void 0===s.end?k:Math.min(s.end,u),!w.extend&&k>s&&(u=s,s=k,k=u),u=fr(b,k),o=fr(b,s),u&&o&&(1!==w.rangeCount||w.anchorNode!==u.node||w.anchorOffset!==u.offset||w.focusNode!==o.node||w.focusOffset!==o.offset)&&((_=_.createRange()).setStart(u.node,u.offset),w.removeAllRanges(),k>s?(w.addRange(_),w.extend(o.node,o.offset)):(_.setEnd(o.node,o.offset),w.addRange(_))))),_=[];for(w=b;w=w.parentNode;)1===w.nodeType&&_.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b<_.length;b++)(w=_[b]).element.scrollLeft=w.left,w.element.scrollTop=w.top}$t=!!Fr,Ur=Fr=null,e.current=n,Ws=r;do{try{for(b=e;null!==Ws;){var E=Ws.flags;if(36&E&&ps(b,Ws.alternate,Ws),128&E){_=void 0;var S=Ws.ref;if(null!==S){var I=Ws.stateNode;switch(Ws.tag){case 5:_=I;break;default:_=I}"function"===typeof S?S(_):S.current=_}}Ws=Ws.nextEffect}}catch(x){if(null===Ws)throw Error(a(330));Lu(Ws,x),Ws=Ws.nextEffect}}while(null!==Ws);Ws=null,Di(),Os=i}else e.current=n;if(Qs)Qs=!1,Xs=e,Js=t;else for(Ws=r;null!==Ws;)t=Ws.nextEffect,Ws.nextEffect=null,8&Ws.flags&&((E=Ws).sibling=null,E.stateNode=null),Ws=t;if(0===(r=e.pendingLanes)&&($s=null),1===r?e===ru?nu++:(nu=0,ru=e):nu=0,n=n.stateNode,wi&&"function"===typeof wi.onCommitFiberRoot)try{wi.onCommitFiberRoot(_i,n,void 0,64===(64&n.current.flags))}catch(x){}if(du(e,Vi()),Gs)throw Gs=!1,e=Ys,Ys=null,e;return 0!==(8&Os)||Ki(),null}function Nu(){for(;null!==Ws;){var e=Ws.alternate;uu||null===su||(0!==(8&Ws.flags)?et(Ws,su)&&(uu=!0):13===Ws.tag&&Is(e,Ws)&&et(Ws,su)&&(uu=!0));var t=Ws.flags;0!==(256&t)&&ds(e,Ws),0===(512&t)||Qs||(Qs=!0,Hi(97,(function(){return Pu(),null}))),Ws=Ws.nextEffect}}function Pu(){if(90!==Js){var e=97<Js?97:Js;return Js=90,zi(e,Du)}return!1}function Ru(e,t){Zs.push(t,e),Qs||(Qs=!0,Hi(97,(function(){return Pu(),null})))}function ju(e,t){eu.push(t,e),Qs||(Qs=!0,Hi(97,(function(){return Pu(),null})))}function Du(){if(null===Xs)return!1;var e=Xs;if(Xs=null,0!==(48&Os))throw Error(a(331));var t=Os;Os|=32;var n=eu;eu=[];for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1],s=i.destroy;if(i.destroy=void 0,"function"===typeof s)try{s()}catch(c){if(null===o)throw Error(a(330));Lu(o,c)}}for(n=Zs,Zs=[],r=0;r<n.length;r+=2){i=n[r],o=n[r+1];try{var u=i.create;i.destroy=u()}catch(c){if(null===o)throw Error(a(330));Lu(o,c)}}for(u=e.current.firstEffect;null!==u;)e=u.nextEffect,u.nextEffect=null,8&u.flags&&(u.sibling=null,u.stateNode=null),u=e;return Os=t,Ki(),!0}function Mu(e,t,n){uo(e,t=cs(0,t=as(n,t),1)),t=cu(),null!==(e=hu(e,1))&&(zt(e,1,t),du(e,t))}function Lu(e,t){if(3===e.tag)Mu(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Mu(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===$s||!$s.has(r))){var i=ls(n,e=as(t,e),1);if(uo(n,i),i=cu(),null!==(n=hu(n,1)))zt(n,1,i),du(n,i);else if("function"===typeof r.componentDidCatch&&(null===$s||!$s.has(r)))try{r.componentDidCatch(t,e)}catch(o){}break}}n=n.return}}function Fu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=cu(),e.pingedLanes|=e.suspendedLanes&n,As===e&&(Ps&n)===n&&(4===Ds||3===Ds&&(62914560&Ps)===Ps&&500>Vi()-qs?wu(e,0):Vs|=n),du(e,t)}function Uu(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===Bi()?1:2:(0===ou&&(ou=Ls),0===(t=Bt(62914560&~ou))&&(t=4194304))),n=cu(),null!==(e=hu(e,t))&&(zt(e,t,n),du(e,n))}function Vu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Bu(e,t,n,r){return new Vu(e,t,n,r)}function qu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function zu(e,t){var n=e.alternate;return null===n?((n=Bu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Hu(e,t,n,r,i,o){var s=2;if(r=e,"function"===typeof e)qu(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case S:return Ku(n.children,i,o,t);case M:s=8,i|=16;break;case I:s=8,i|=1;break;case x:return(e=Bu(12,n,t,8|i)).elementType=x,e.type=x,e.lanes=o,e;case A:return(e=Bu(13,n,t,i)).type=A,e.elementType=A,e.lanes=o,e;case N:return(e=Bu(19,n,t,i)).elementType=N,e.lanes=o,e;case L:return Wu(n,i,o,t);case F:return(e=Bu(24,n,t,i)).elementType=F,e.lanes=o,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case T:s=10;break e;case C:s=9;break e;case O:s=11;break e;case P:s=14;break e;case R:s=16,r=null;break e;case j:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Bu(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Ku(e,t,n,r){return(e=Bu(7,e,r,t)).lanes=n,e}function Wu(e,t,n,r){return(e=Bu(23,e,r,t)).elementType=L,e.lanes=n,e}function Gu(e,t,n){return(e=Bu(6,e,null,t)).lanes=n,e}function Yu(e,t,n){return(t=Bu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $u(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=qt(0),this.expirationTimes=qt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qt(0),this.mutableSourceEagerHydrationData=null}function Qu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:E,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Xu(e,t,n,r){var i=t.current,o=cu(),s=lu(i);e:if(n){t:{if(Qe(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(pi(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(pi(c)){n=mi(n,c,u);break e}}n=u}else n=ci;return null===t.context?t.context=n:t.pendingContext=n,(t=so(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),uo(i,t),fu(i,s,o),s}function Ju(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Zu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function ec(e,t){Zu(e,t),(e=e.alternate)&&Zu(e,t)}function tc(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new $u(e,t,null!=n&&!0===n.hydrate),t=Bu(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,oo(t),e[Xr]=n.current,Or(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var i=(t=r[e])._getVersion;i=i(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}function nc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function rc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var s=i;i=function(){var e=Ju(a);s.call(e)}}Xu(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new tc(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"===typeof i){var u=i;i=function(){var e=Ju(a);u.call(e)}}yu((function(){Xu(t,a,e,i)}))}return Ju(a)}function ic(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!nc(t))throw Error(a(200));return Qu(e,t,null,n)}Ks=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||fi.current)ja=!0;else{if(0===(n&r)){switch(ja=!1,t.tag){case 3:Ha(t),Ko();break;case 5:Ro(t);break;case 1:pi(t.type)&&yi(t);break;case 4:No(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;ui($i,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?$a(e,t,n):(ui(Do,1&Do.current),null!==(t=ns(e,t,n))?t.sibling:null);ui(Do,1&Do.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return ts(e,t,n);t.flags|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),ui(Do,Do.current),r)break;return null;case 23:case 24:return t.lanes=0,Ua(e,t,n)}return ns(e,t,n)}ja=0!==(16384&e.flags)}else ja=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=di(t,li.current),no(t,n),i=ia(null,t,r,e,i,n),t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,pi(r)){var o=!0;yi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,oo(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&po(t,r,s,e),i.updater=go,t.stateNode=i,i._reactInternals=t,bo(t,r,e,n),t=za(null,t,r,!0,o,n)}else t.tag=0,Da(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"===typeof e)return qu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===O)return 11;if(e===P)return 14}return 2}(i),e=Yi(i,e),o){case 0:t=Ba(null,t,i,e,n);break e;case 1:t=qa(null,t,i,e,n);break e;case 11:t=Ma(null,t,i,e,n);break e;case 14:t=La(null,t,i,Yi(i.type,e),r,n);break e}throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ba(e,t,r,i=t.elementType===r?i:Yi(r,i),n);case 1:return r=t.type,i=t.pendingProps,qa(e,t,r,i=t.elementType===r?i:Yi(r,i),n);case 3:if(Ha(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,ao(e,t),lo(t,r,null,n),(r=t.memoizedState.element)===i)Ko(),t=ns(e,t,n);else{if((o=(i=t.stateNode).hydrate)&&(Fo=Kr(t.stateNode.containerInfo.firstChild),Lo=t,o=Uo=!0),o){if(null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)(o=e[i])._workInProgressVersionPrimary=e[i+1],Wo.push(o);for(n=Io(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Da(e,t,r,n),Ko();t=t.child}return t;case 5:return Ro(t),null===e&&qo(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,Br(r,i)?s=null:null!==o&&Br(r,o)&&(t.flags|=16),Va(e,t),Da(e,t,s,n),t.child;case 6:return null===e&&qo(t),null;case 13:return $a(e,t,n);case 4:return No(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=So(t,null,r,n):Da(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ma(e,t,r,i=t.elementType===r?i:Yi(r,i),n);case 7:return Da(e,t,t.pendingProps,n),t.child;case 8:case 12:return Da(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value;var u=t.type._context;if(ui($i,u._currentValue),u._currentValue=o,null!==s)if(u=s.value,0===(o=sr(u,o)?0:0|("function"===typeof r._calculateChangedBits?r._
vendor: 6,617 bytes, line 2
2calculateChangedBits(u,o):1073741823))){if(s.children===i.children&&!fi.current){t=ns(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);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(-1,n&-n)).tag=2,uo(u,l)),u.lanes|=n,null!==(l=u.alternate)&&(l.lanes|=n),to(u.return,n),c.lanes|=n;break}l=l.next}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}Da(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,no(t,n),r=r(i=ro(i,o.unstable_observedBits)),t.flags|=1,Da(e,t,r,n),t.child;case 14:return o=Yi(i=t.type,t.pendingProps),La(e,t,i,o=Yi(i.type,o),r,n);case 15:return Fa(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,pi(r)?(e=!0,yi(t)):e=!1,no(t,n),mo(t,r,i),bo(t,r,i,n),za(null,t,r,!0,e,n);case 19:return ts(e,t,n);case 23:case 24:return Ua(e,t,n)}throw Error(a(156,t.tag))},tc.prototype.render=function(e){Xu(e,this._internalRoot,null,null)},tc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Xu(null,e,null,(function(){t[Xr]=null}))},tt=function(e){13===e.tag&&(fu(e,4,cu()),ec(e,4))},nt=function(e){13===e.tag&&(fu(e,67108864,cu()),ec(e,67108864))},rt=function(e){if(13===e.tag){var t=cu(),n=lu(e);fu(e,n,t),ec(e,n)}},it=function(e,t){return t()},Te=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ni(r);if(!i)throw Error(a(90));X(r),ne(r,i)}}}break;case"textarea":ce(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},Re=mu,je=function(e,t,n,r,i){var o=Os;Os|=4;try{return zi(98,e.bind(null,t,n,r,i))}finally{0===(Os=o)&&(Hs(),Ki())}},De=function(){0===(49&Os)&&(function(){if(null!==tu){var e=tu;tu=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,du(e,Vi())}))}Ki()}(),Pu())},Me=function(e,t){var n=Os;Os|=2;try{return e(t)}finally{0===(Os=n)&&(Hs(),Ki())}};var oc={Events:[ei,ti,ni,Ne,Pe,Pu,{current:!1}]},ac={findFiberByHostInstance:Zr,bundleType:0,version:"17.0.1",rendererPackageName:"react-dom"},sc={bundleType:ac.bundleType,version:ac.version,rendererPackageName:ac.rendererPackageName,rendererConfig:ac.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:ac.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uc.isDisabled&&uc.supportsFiber)try{_i=uc.inject(sc),wi=uc}catch(ve){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oc,t.createPortal=ic,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Ze(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Os;if(0!==(48&n))return e(t);Os|=1;try{if(e)return zi(99,e.bind(null,t))}finally{Os=n,Ki()}},t.hydrate=function(e,t,n){if(!nc(t))throw Error(a(200));return rc(null,e,t,!0,n)},t.render=function(e,t,n){if(!nc(t))throw Error(a(200));return rc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!nc(e))throw Error(a(40));return!!e._reactRootContainer&&(yu((function(){rc(null,null,e,!1,(function(){e._reactRootContainer=null,e[Xr]=null}))})),!0)},t.unstable_batchedUpdates=mu,t.unstable_createPortal=function(e,t){return ic(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!nc(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return rc(e,t,n,!1,r)},t.version="17.0.1"},function(e,t,n){"use strict";e.exports=n(64)},function(e,t,n){"use strict";var r,i,o,a;if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var u=Date,c=u.now();t.unstable_now=function(){return u.now()-c}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var l=null,f=null,h=function e(){if(null!==l)try{var n=t.unstable_now();l(!0,n),l=null}catch(r){throw setTimeout(e,0),r}};r=function(e){null!==l?setTimeout(r,0,e):(l=e,setTimeout(h,0))},i=function(e,t){f=setTimeout(e,t)},o=function(){clearTimeout(f)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,p=window.clearTimeout;if("undefined"!==typeof console){var g=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://reactjs.org/link/react-polyfills"),"function"!==typeof g&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var v=!1,m=null,y=-1,b=5,_=0;t.unstable_shouldYield=function(){return t.unstable_now()>=_},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,k=w.port2;w.port1.onmessage=function(){if(null!==m){var e=t.unstable_now();_=e+b;try{m(!0,e)?k.postMessage(null):(v=!1,m=null)}catch(n){throw k.postMessage(null),n}}else v=!1},r=function(e){m=e,v||(v=!0,k.postMessage(null))},i=function(e,n){y=d((function(){e(t.unstable_now())}),n)},o=function(){p(y),y=-1}}function E(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<x(i,t)))break e;e[r]=t,e[n]=i,n=r}}function S(e){return void 0===(e=e[0])?null:e}function I(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,u=e[s];if(void 0!==a&&0>
2x(a,n))void 0!==u&&0>x(u,a)?(e[r]=u,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==u&&0>x(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function x(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var T=[],C=[],O=1,A=null,N=3,P=!1,R=!1,j=!1;function D(e){for(var t=S(C);null!==t;){if(null===t.callback)I(C);else{if(!(t.startTime<=e))break;I(C),t.sortIndex=t.expirationTime,E(T,t)}t=S(C)}}function M(e){if(j=!1,D(e),!R)if(null!==S(T))R=!0,r(L);else{var t=S(C);null!==t&&i(M,t.startTime-e)}}function L(e,n){R=!1,j&&(j=!1,o()),P=!0;var r=N;try{for(D(n),A=S(T);null!==A&&(!(A.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=A.callback;if("function"===typeof a){A.callback=null,N=A.priorityLevel;var s=a(A.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?A.callback=s:A===S(T)&&I(T),D(n)}else I(T);A=S(T)}if(null!==A)var u=!0;else{var c=S(C);null!==c&&i(M,c.startTime-n),u=!1}return u}finally{A=null,N=r,P=!1}}var F=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||P||(R=!0,r(L))},t.unstable_getCurrentPriorityLevel=function(){return N},t.unstable_getFirstCallbackNode=function(){return S(T)},t.unstable_next=function(e){switch(N){case 1:case 2:case 3:var t=3;break;default:t=N}var n=N;N=t;try{return e()}finally{N=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=N;N=e;try{return t()}finally{N=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return e={id:O++,callback:n,priorityLevel:e,startTime:a,expirationTime:u=a+u,sortIndex:-1},a>s?(e.sortIndex=a,E(C,e),null===S(T)&&e===S(C)&&(j?o():j=!0,i(M,a-s))):(e.sortIndex=u,E(T,e),R||P||(R=!0,r(L))),e},t.unstable_wrapCallback=function(e){var t=N;return function(){var n=N;N=t;try{return e.apply(this,arguments)}finally{N=n}}}},function(e,t,n){"use strict";n(42);var r=n(2),i=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),t.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)s.call(t,r)&&!u.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:l,props:o,_owner:a.current}}t.jsx=c,t.jsxs=c},,function(e,t,n){"use strict";(function(e,t){var r=n(5),i=n(11),o=n(1),a=n(0),s=n(10),u="";function c(e){u=e}var l=function(){function e(e){this.domStorage_=e,this.prefix_="firebase:"}return e.prototype.set=function(e,t){null==t?this.domStorage_.removeItem(this.prefixedName_(e)):this.domStorage_.setItem(this.prefixedName_(e),Object(o.stringify)(t))},e.prototype.get=function(e){var t=this.domStorage_.getItem(this.prefixedName_(e));return null==t?null:Object(o.jsonEval)(t)},e.prototype.remove=function(e){this.domStorage_.removeItem(this.prefixedName_(e))},e.prototype.prefixedName_=function(e){return this.prefix_+e},e.prototype.toString=function(){return this.domStorage_.toString()},e}(),f=function(){function e(){this.cache_={},this.isInMemoryStorage=!0}return e.prototype.set=function(e,t){null==t?delete this.cache_[e]:this.cache_[e]=t},e.prototype.get=function(e){return Object(o.contains)(this.cache_,e)?this.cache_[e]:null},e.prototype.remove=function(e){delete this.cache_[e]},e}(),h=function(e){try{if("undefined"!==typeof window&&"undefined"!==typeof window[e]){var t=window[e];return t.setItem("firebase:sentinel","cache"),t.removeItem("firebase:sentinel"),new l(t)}}catch(n){}return new f},d=h("localStorage"),p=h("sessionStorage"),g=new s.Logger("@firebase/database"),v=function(){var e=1;return function(){return e++}}(),m=function(e){var t=Object(o.stringToByteArray)(e),n=new o.Sha1;n.update(t);var r=n.digest();return o.base64.encodeByteArray(r)},y=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=0;i<t.length;i++){var a=t[i];Array.isArray(a)||a&&"object"===typeof a&&"number"===typeof a.length?r+=e.apply(null,a):r+="object"===typeof a?Object(o.stringify)(a):a,r+=" "}return r},b=null,_=!0,w=function(e,t){Object(o.assert)(!t||!0===e||!1===e,"Can't turn on custom loggers persistently."),!0===e?(g.logLevel=s.LogLevel.VERBOSE,b=g.log.bind(g),t&&p.set("logging_enabled",!0)):"function"===typeof e?b=e:(b=null,p.remove("logging_enabled"))},k=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!0===_&&(_=!1,null===b&&!0===p.get("logging_enabled")&&w(!0)),b){var n=y.apply(null,e);b(n)}},E=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];k.apply(void 0,Object(a.__spreadArray)([e],Object(a.__read)(t)))}},S=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="FIREBASE INTERNAL ERROR: "+y.apply(void 0,Object(a.__spreadArray)([],Object(a.__read)(e)));g.error(n)},I=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="FIREBASE FATAL ERROR: "+y.apply(void 0,Object(a.__spreadArray)([],Object(a.__read)(e)));throw g.error(n),new Error(n)},x=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="FIREBASE WARNING: "+y.apply(void 0,Object(a.__spreadArray)([],Object(a.__read)(e)));g.warn(n)},T=function(e){return"number"===typeof e&&(e!==e||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY)}
2,C="[MIN_NAME]",O="[MAX_NAME]",A=function(e,t){if(e===t)return 0;if(e===C||t===O)return-1;if(t===C||e===O)return 1;var n=V(e),r=V(t);return null!==n?null!==r?n-r===0?e.length-t.length:n-r:-1:null!==r?1:e<t?-1:1},N=function(e,t){return e===t?0:e<t?-1:1},P=function(e,t){if(t&&e in t)return t[e];throw new Error("Missing required key ("+e+") in object: "+Object(o.stringify)(t))},R=function e(t){if("object"!==typeof t||null===t)return Object(o.stringify)(t);var n=[];for(var r in t)n.push(r);n.sort();for(var i="{",a=0;a<n.length;a++)0!==a&&(i+=","),i+=Object(o.stringify)(n[a]),i+=":",i+=e(t[n[a]]);return i+="}"},j=function(e,t){var n=e.length;if(n<=t)return[e];for(var r=[],i=0;i<n;i+=t)i+t>n?r.push(e.substring(i,n)):r.push(e.substring(i,i+t));return r};function D(e,t){for(var n in e)e.hasOwnProperty(n)&&t(n,e[n])}var M=function(e){Object(o.assert)(!T(e),"Invalid JSON number");var t,n,r,i,a,s=1023;0===e?(n=0,r=0,t=1/e===-1/0?1:0):(t=e<0,(e=Math.abs(e))>=Math.pow(2,-1022)?(n=(i=Math.min(Math.floor(Math.log(e)/Math.LN2),s))+s,r=Math.round(e*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,r=Math.round(e/Math.pow(2,-1074))));var u=[];for(a=52;a;a-=1)u.push(r%2?1:0),r=Math.floor(r/2);for(a=11;a;a-=1)u.push(n%2?1:0),n=Math.floor(n/2);u.push(t?1:0),u.reverse();var c=u.join(""),l="";for(a=0;a<64;a+=8){var f=parseInt(c.substr(a,8),2).toString(16);1===f.length&&(f="0"+f),l+=f}return l.toLowerCase()};var L=new RegExp("^-?(0*)\\d{1,10}$"),F=-2147483648,U=2147483647,V=function(e){if(L.test(e)){var t=Number(e);if(t>=F&&t<=U)return t}return null},B=function(e){try{e()}catch(t){setTimeout((function(){var e=t.stack||"";throw x("Exception was thrown by user callback.",e),t}),Math.floor(0))}},q=function(e,t){var n=setTimeout(e,t);return"object"===typeof n&&n.unref&&n.unref(),n},z=function(){function e(e,t){var n=this;this.appName_=e,this.appCheckProvider=t,this.appCheck=null===t||void 0===t?void 0:t.getImmediate({optional:!0}),this.appCheck||null===t||void 0===t||t.get().then((function(e){return n.appCheck=e}))}return e.prototype.getToken=function(e){var t=this;return this.appCheck?this.appCheck.getToken(e):new Promise((function(n,r){setTimeout((function(){t.appCheck?t.getToken(e).then(n,r):n(null)}),0)}))},e.prototype.addTokenChangeListener=function(e){var t;null===(t=this.appCheckProvider)||void 0===t||t.get().then((function(t){return t.addTokenListener(e)}))},e.prototype.notifyForInvalidToken=function(){x('Provided AppCheck credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly.')},e}(),H=function(){function e(e,t,n){var r=this;this.appName_=e,this.firebaseOptions_=t,this.authProvider_=n,this.auth_=null,this.auth_=n.getImmediate({optional:!0}),this.auth_||n.onInit((function(e){return r.auth_=e}))}return e.prototype.getToken=function(e){var t=this;return this.auth_?this.auth_.getToken(e).catch((function(e){return e&&"auth/token-not-initialized"===e.code?(k("Got auth/token-not-initialized error.  Treating as null token."),null):Promise.reject(e)})):new Promise((function(n,r){setTimeout((function(){t.auth_?t.getToken(e).then(n,r):n(null)}),0)}))},e.prototype.addTokenChangeListener=function(e){this.auth_?this.auth_.addAuthTokenListener(e):this.authProvider_.get().then((function(t){return t.addAuthTokenListener(e)}))},e.prototype.removeTokenChangeListener=function(e){this.authProvider_.get().then((function(t){return t.removeAuthTokenListener(e)}))},e.prototype.notifyForInvalidToken=function(){var e='Provided authentication credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.firebaseOptions_?e+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.firebaseOptions_?e+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':e+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',x(e)},e}(),K=function(){function e(e){this.accessToken=e}return e.prototype.getToken=function(e){return Promise.resolve({accessToken:this.accessToken})},e.prototype.addTokenChangeListener=function(e){e(this.accessToken)},e.prototype.removeTokenChangeListener=function(e){},e.prototype.notifyForInvalidToken=function(){},e.OWNER="owner",e}(),W="5",G=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,Y="websocket",$="long_polling",Q=function(){function e(e,t,n,r,i,o,a){void 0===i&&(i=!1),void 0===o&&(o=""),void 0===a&&(a=!1),this.secure=t,this.namespace=n,this.webSocketOnly=r,this.nodeAdmin=i,this.persistenceKey=o,this.includeNamespaceInQueryParams=a,this._host=e.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=d.get("host:"+e)||this._host}return e.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},e.prototype.isCustomHost=function(){return"firebaseio.com"!==this._domain&&"firebaseio-demo.com"!==this._domain},Object.defineProperty(e.prototype,"host",{get:function(){return this._host},set:function(e){e!==this.internalHost&&(this.internalHost=e,this.isCacheableHost()&&d.set("host:"+this._host,this.internalHost))}
2,enumerable:!1,configurable:!0}),e.prototype.toString=function(){var e=this.toURLString();return this.persistenceKey&&(e+="<"+this.persistenceKey+">"),e},e.prototype.toURLString=function(){var e=this.secure?"https://":"http://",t=this.includeNamespaceInQueryParams?"?ns="+this.namespace:"";return""+e+this.host+"/"+t},e}();function X(e,t,n){var r;if(Object(o.assert)("string"===typeof t,"typeof type must == string"),Object(o.assert)("object"===typeof n,"typeof params must == object"),t===Y)r=(e.secure?"wss://":"ws://")+e.internalHost+"/.ws?";else{if(t!==$)throw new Error("Unknown connection type: "+t);r=(e.secure?"https://":"http://")+e.internalHost+"/.lp?"}(function(e){return e.host!==e.internalHost||e.isCustomHost()||e.includeNamespaceInQueryParams})(e)&&(n.ns=e.namespace);var i=[];return D(n,(function(e,t){i.push(e+"="+t)})),r+i.join("&")}var J=function(){function e(){this.counters_={}}return e.prototype.incrementCounter=function(e,t){void 0===t&&(t=1),Object(o.contains)(this.counters_,e)||(this.counters_[e]=0),this.counters_[e]+=t},e.prototype.get=function(){return Object(o.deepCopy)(this.counters_)},e}(),Z={},ee={};function te(e){var t=e.toString();return Z[t]||(Z[t]=new J),Z[t]}var ne=function(){function e(e){this.onMessage_=e,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return e.prototype.closeAfter=function(e,t){this.closeAfterResponse=e,this.onClose=t,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)},e.prototype.handleResponse=function(e,t){var n=this;this.pendingResponses[e]=t;for(var r=function(){var e=i.pendingResponses[i.currentResponseNum];delete i.pendingResponses[i.currentResponseNum];for(var t=function(t){e[t]&&B((function(){n.onMessage_(e[t])}))},r=0;r<e.length;++r)t(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}},e}(),re="start",ie="close",oe=function(){function e(e,t,n,r,i,o,a){var s=this;this.connId=e,this.repoInfo=t,this.applicationId=n,this.appCheckToken=r,this.authToken=i,this.transportSessionId=o,this.lastSessionId=a,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=E(e),this.stats_=te(t),this.urlFn=function(e){return s.appCheckToken&&(e.ac=s.appCheckToken),X(t,$,e)}}return e.prototype.open=function(e,t){var n=this;this.curSegmentNum=0,this.onDisconnect_=t,this.myPacketOrderer=new ne(e),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout((function(){n.log_("Timed out trying to connect."),n.onClosed_(),n.connectTimeoutTimer_=null}),Math.floor(3e4)),function(e){if(Object(o.isNodeSdk)()||"complete"===document.readyState)e();else{var t=!1,n=function n(){document.body?t||(t=!0,e()):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 ae((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object(a.__read)(e,5),i=r[0],o=r[1],s=r[2];r[3],r[4];if(n.incrementIncomingBytes_(e),n.scriptTagHolder)if(n.connectTimeoutTimer_&&(clearTimeout(n.connectTimeoutTimer_),n.connectTimeoutTimer_=null),n.everConnected_=!0,i===re)n.id=o,n.password=s;else{if(i!==ie)throw new Error("Unrecognized command received: "+i);o?(n.scriptTagHolder.sendNewPolls=!1,n.myPacketOrderer.closeAfter(o,(function(){n.onClosed_()}))):n.onClosed_()}}),(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object(a.__read)(e,2),i=r[0],o=r[1];n.incrementIncomingBytes_(e),n.myPacketOrderer.handleResponse(i,o)}),(function(){n.onClosed_()}),n.urlFn);var e={start:"t"};e.ser=Math.floor(1e8*Math.random()),n.scriptTagHolder.uniqueCallbackIdentifier&&(e.cb=n.scriptTagHolder.uniqueCallbackIdentifier),e.v=W,n.transportSessionId&&(e.s=n.transportSessionId),n.lastSessionId&&(e.ls=n.lastSessionId),n.applicationId&&(e.p=n.applicationId),n.appCheckToken&&(e.ac=n.appCheckToken),"undefined"!==typeof location&&location.hostname&&G.test(location.hostname)&&(e.r="f");var t=n.urlFn(e);n.log_("Connecting via long-poll to "+t),n.scriptTagHolder.addTag(t,(function(){}))}}))},e.prototype.start=function(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)},e.forceAllow=function(){e.forceAllow_=!0},e.forceDisallow=function(){e.forceDisallow_=!0},e.isAvailable=function(){return!Object(o.isNodeSdk)()&&(!!e.forceAllow_||!e.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))},e.prototype.markConnectionHealthy=function(){},e.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)},e.prototype.onClosed_=function(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))},e.prototype.close=function(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())},e.prototype.send=function(e){var t=Object(o.stringify)(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);for(var n=Object(o.base64Encode)(t),r=j(n,1840),i=0;i<r.length;i++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,r.length,r[i]),this.curSegmentNum++},e.prototype.addDisconnectPingFrame=function(e,t){if(!Object(o.isNodeSdk)()){this.myDisconnFrame=document.createElement("iframe");var n={dframe:"t"};n.id=e,n.pw=t,this.myDisconnFrame.src=this.urlFn(n),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}},e.prototype.incrementIncomingBytes_=function(e){var t=Object(o.stringify)(e).length;this.bytesReceived+=t,this.stats_.incrementCounter("bytes_received",t)},e}(),ae=function(){function e(t,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,Object(o.isNodeSdk)())this.commandCB=t,this.onMessageCB=n;else{this.uniqueCallbackIdentifier=v(),window["pLPCommand"+this.uniqueCallbackIdentifier]=t,window["pRTLPCB"+this.uniqueCallbackIdentifier]=n,this.myIFrame=e.createI
2Frame_();var a="";if(this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,"javascript:".length))a='<script>document.domain="'+document.domain+'";<\/script>';var s="<html><body>"+a+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(s),this.myIFrame.doc.close()}catch(u){k("frame writing exception"),u.stack&&k(u.stack),k(u)}}}return e.createIFrame_=function(){var e=document.createElement("iframe");if(e.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(e);try{e.contentWindow.document||k("No IE domain setting required")}catch(n){var t=document.domain;e.src="javascript:void((function(){document.open();document.domain='"+t+"';document.close();})())"}return e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document),e},e.prototype.close=function(){var e=this;this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout((function(){null!==e.myIFrame&&(document.body.removeChild(e.myIFrame),e.myIFrame=null)}),Math.floor(0)));var t=this.onDisconnect;t&&(this.onDisconnect=null,t())},e.prototype.startLongPoll=function(e,t){for(this.myID=e,this.myPW=t,this.alive=!0;this.newRequest_(););},e.prototype.newRequest_=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var e={};e.id=this.myID,e.pw=this.myPW,e.ser=this.currentSerial;for(var t=this.urlFn(e),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 t+=n,this.addLongPollTag_(t,this.currentSerial),!0}return!1},e.prototype.enqueueSegment=function(e,t,n){this.pendingSegs.push({seg:e,ts:t,d:n}),this.alive&&this.newRequest_()},e.prototype.addLongPollTag_=function(e,t){var n=this;this.outstandingRequests.add(t);var r=function(){n.outstandingRequests.delete(t),n.newRequest_()},i=setTimeout(r,Math.floor(25e3));this.addTag(e,(function(){clearTimeout(i),r()}))},e.prototype.addTag=function(e,t){var n=this;Object(o.isNodeSdk)()?this.doNodeLongPoll(e,t):setTimeout((function(){try{if(!n.sendNewPolls)return;var r=n.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=e,r.onload=r.onreadystatechange=function(){var e=r.readyState;e&&"loaded"!==e&&"complete"!==e||(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),t())},r.onerror=function(){k("Long-poll script failed to load: "+e),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(r)}catch(i){}}),Math.floor(1))},e}(),se=null;"undefined"!==typeof MozWebSocket?se=MozWebSocket:"undefined"!==typeof WebSocket&&(se=WebSocket);var ue=function(){function t(e,n,r,i,o,a,s){this.connId=e,this.applicationId=r,this.appCheckToken=i,this.authToken=o,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=E(this.connId),this.stats_=te(n),this.connURL=t.connectionURL_(n,a,s,i),this.nodeAdmin=n.nodeAdmin}return t.connectionURL_=function(e,t,n,r){var i={};return i.v=W,!Object(o.isNodeSdk)()&&"undefined"!==typeof location&&location.hostname&&G.test(location.hostname)&&(i.r="f"),t&&(i.s=t),n&&(i.ls=n),r&&(i.ac=r),X(e,Y,i)},t.prototype.open=function(t,n){var r=this;this.onDisconnect=n,this.onMessage=t,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,d.set("previous_websocket_failure",!0);try{if(Object(o.isNodeSdk)()){var i=this.nodeAdmin?"AdminNode":"Node",a={headers:{"User-Agent":"Firebase/5/"+u+"/"+e.platform+"/"+i,"X-Firebase-GMPID":this.applicationId||""}};this.nodeAdmin?a.headers.Authorization=this.authToken||"":a.headers["X-Firebase-AppCheck"]=this.appCheckToken||"";var s=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}),c=0===this.connURL.indexOf("wss://")?s.HTTPS_PROXY||s.https_proxy:s.HTTP_PROXY||s.http_proxy;c&&(a.proxy={origin:c}),this.mySock=new se(this.connURL,[],a)}else{a={headers:{"X-Firebase-GMPID":this.applicationId||"","X-Firebase-AppCheck":this.appCheckToken||""}};this.mySock=new se(this.connURL,[],a)}}catch(f){this.log_("Error instantiating WebSocket.");var l=f.message||f.data;return l&&this.log_(l),void this.onClosed_()}this.mySock.onopen=function(){r.log_("Websocket connected."),r.everConnected_=!0}
2,this.mySock.onclose=function(){r.log_("Websocket connection was disconnected."),r.mySock=null,r.onClosed_()},this.mySock.onmessage=function(e){r.handleIncomingFrame(e)},this.mySock.onerror=function(e){r.log_("WebSocket error.  Closing connection.");var t=e.message||e.data;t&&r.log_(t),r.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!==se&&!t.forceDisallow_},t.previouslyFailed=function(){return d.isInMemoryStorage||!0===d.get("previous_websocket_failure")},t.prototype.markConnectionHealthy=function(){d.remove("previous_websocket_failure")},t.prototype.appendFrame_=function(e){if(this.frames.push(e),this.frames.length===this.totalFrames){var t=this.frames.join("");this.frames=null;var n=Object(o.jsonEval)(t);this.onMessage(n)}},t.prototype.handleNewFrameCount_=function(e){this.totalFrames=e,this.frames=[]},t.prototype.extractFrameCount_=function(e){if(Object(o.assert)(null===this.frames,"We already have a frame buffer"),e.length<=6){var t=Number(e);if(!isNaN(t))return this.handleNewFrameCount_(t),null}return this.handleNewFrameCount_(1),e},t.prototype.handleIncomingFrame=function(e){if(null!==this.mySock){var t=e.data;if(this.bytesReceived+=t.length,this.stats_.incrementCounter("bytes_received",t.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(t);else{var n=this.extractFrameCount_(t);null!==n&&this.appendFrame_(n)}}},t.prototype.send=function(e){this.resetKeepAlive();var t=Object(o.stringify)(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);var n=j(t,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 e=this;clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval((function(){e.mySock&&e.sendString_("0"),e.resetKeepAlive()}),Math.floor(45e3))},t.prototype.sendString_=function(e){try{this.mySock.send(e)}catch(t){this.log_("Exception thrown from WebSocket.send():",t.message||t.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}},t.responsesRequiredToBeHealthy=2,t.healthyTimeout=3e4,t}(),ce=function(){function e(e){this.initTransports_(e)}return Object.defineProperty(e,"ALL_TRANSPORTS",{get:function(){return[oe,ue]},enumerable:!1,configurable:!0}),e.prototype.initTransports_=function(t){var n,r,i=ue&&ue.isAvailable(),o=i&&!ue.previouslyFailed();if(t.webSocketOnly&&(i||x("wss:// URL used, but browser isn't known to support websockets.  Trying anyway."),o=!0),o)this.transports_=[ue];else{var s=this.transports_=[];try{for(var u=Object(a.__values)(e.ALL_TRANSPORTS),c=u.next();!c.done;c=u.next()){var l=c.value;l&&l.isAvailable()&&s.push(l)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}},e.prototype.initialTransport=function(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")},e.prototype.upgradeTransport=function(){return this.transports_.length>1?this.transports_[1]:null},e}(),le=function(){function e(e,t,n,r,i,o,a,s,u,c){this.id=e,this.repoInfo_=t,this.applicationId_=n,this.appCheckToken_=r,this.authToken_=i,this.onMessage_=o,this.onReady_=a,this.onDisconnect_=s,this.onKill_=u,this.lastSessionId=c,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=E("c:"+this.id+":"),this.transportManager_=new ce(t),this.log_("Connection created"),this.start_()}return e.prototype.start_=function(){var e=this,t=this.transportManager_.initialTransport();this.conn_=new t(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.lastSessionId),this.primaryResponsesRequired_=t.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(){e.conn_&&e.conn_.open(n,r)}),Math.floor(0));var i=t.healthyTimeout||0;i>0&&(this.healthyTimeout_=q((function(){e.healthyTimeout_=null,e.isHealthy_||(e.conn_&&e.conn_.bytesReceived>
2102400?(e.log_("Connection exceeded healthy timeout but has received "+e.conn_.bytesReceived+" bytes.  Marking connection healthy."),e.isHealthy_=!0,e.conn_.markConnectionHealthy()):e.conn_&&e.conn_.bytesSent>10240?e.log_("Connection exceeded healthy timeout but has sent "+e.conn_.bytesSent+" bytes.  Leaving connection alive."):(e.log_("Closing unhealthy connection after timeout."),e.close()))}),Math.floor(i)))},e.prototype.nextTransportId_=function(){return"c:"+this.id+":"+this.connectionCount++},e.prototype.disconnReceiver_=function(e){var t=this;return function(n){e===t.conn_?t.onConnectionLost_(n):e===t.secondaryConn_?(t.log_("Secondary connection lost."),t.onSecondaryConnectionLost_()):t.log_("closing an old connection")}},e.prototype.connReceiver_=function(e){var t=this;return function(n){2!==t.state_&&(e===t.rx_?t.onPrimaryMessageReceived_(n):e===t.secondaryConn_?t.onSecondaryMessageReceived_(n):t.log_("message on old connection"))}},e.prototype.sendRequest=function(e){var t={t:"d",d:e};this.sendData_(t)},e.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)},e.prototype.onSecondaryControl_=function(e){if("t"in e){var t=e.t;"a"===t?this.upgradeIfSecondaryHealthy_():"r"===t?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===t&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}},e.prototype.onSecondaryMessageReceived_=function(e){var t=P("t",e),n=P("d",e);if("c"===t)this.onSecondaryControl_(n);else{if("d"!==t)throw new Error("Unknown protocol layer: "+t);this.pendingDataMessages.push(n)}},e.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:{}}}))},e.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()},e.prototype.onPrimaryMessageReceived_=function(e){var t=P("t",e),n=P("d",e);"c"===t?this.onControl_(n):"d"===t&&this.onDataMessage_(n)},e.prototype.onDataMessage_=function(e){this.onPrimaryResponse_(),this.onMessage_(e)},e.prototype.onPrimaryResponse_=function(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))},e.prototype.onControl_=function(e){var t=P("t",e);if("d"in e){var n=e.d;if("h"===t)this.onHandshake_(n);else if("n"===t){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"===t?this.onConnectionShutdown_(n):"r"===t?this.onReset_(n):"e"===t?S("Server Error: "+n):"o"===t?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):S("Unknown control packet command: "+t)}},e.prototype.onHandshake_=function(e){var t=e.ts,n=e.v,r=e.h;this.sessionId=e.s,this.repoInfo_.host=r,0===this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,t),W!==n&&x("Protocol version mismatch detected"),this.tryStartUpgrade_())},e.prototype.tryStartUpgrade_=function(){var e=this.transportManager_.upgradeTransport();e&&this.startUpgrade_(e)},e.prototype.startUpgrade_=function(e){var t=this;this.secondaryConn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,this.sessionId),this.secondaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.secondaryConn_),r=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,r),q((function(){t.secondaryConn_&&(t.log_("Timed out trying to upgrade."),t.secondaryConn_.close())}),Math.floor(6e4))},e.prototype.onReset_=function(e){this.log_("Reset packet received.  New host: "+e),this.repoInfo_.host=e,1===this.state_?this.close():(this.closeConnections_(),this.start_())},e.prototype.onConnectionEstablished_=function(e,t){var n=this;this.log_("Realtime connection established."),this.conn_=e,this.state_=1,this.onReady_&&(this.onReady_(t,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):q((function(){n.sendPingOnPrimaryIfNecessary_()}),Math.floor(5e3))},e.prototype.sendPingOnPrimaryIfNecessary_=function(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))},e.prototype.onSecondaryConnectionLost_=function(){var e=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==e&&this.rx_!==e||this.close()},e.prototype.onConnectionLost_=function(e){this.conn_=null,e||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(d.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()},e.prototype.onConnectionShutdown_=function(e){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(e),this.onKill_=null),this.onDisconnect_=null,this.close()},e.prototype.sendData_=function(e){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(e)},e.prototype.close=function(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))},e.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)},e}(),fe=function(){function e(){}return e.prototype.put=function(e,t,n,r){},e.prototype.merge=function(e,t,n,r){},e.prototype.refreshAuthToken=function(e){},e.prototype.refreshAppCheckToken=function(e){},e.prototype.onDisconnectPut=function(e,t,n){},e.prototype.onDisconnectMerge=function(e,t,n){},e.prototype.onDisconnectCancel=function(e,t){},e.prototype.reportStats=function(e){},e}(),he=function(){function e(e){this.allowedEvents_=e,this.listeners_={},Object(o.assert)(Array.isArray(e)&&e.length>0,"Requires a non-empty array")}return e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(Array.isArray(this.listeners_[e]))for(var r=Object(a.__spreadArray)([],Object(a.__read)(this.listeners_[e])),i=0;i<r.length;i++)r[i].callback.apply(r[i].context,t)},e.prototype.on=function(e,t,n){this.validateEventType_(e),this.listeners_[e]=this.listeners_[e]||[],this.listeners_[e].push({callback:t,context:n});var r=this.getInitialEvent(e);r&&t.apply(n,r)},e.prototype.off=function(e,t,n){this.validateEventType_(e);for(var r=this.listeners_[e]||[],i=0;i<r.length;i++)if(r[i].callback===t&&(!n||n===r[i].context))return void r.splice(i,1)},e.prototype.validateEventType_=function(e){Object(o.assert)(this.allowedEvents_.find((function(t){return t===e})),"Unknown event: "+e)},e}(),de=function(e){function t(){var t=e.call(this,["online"])||this;return t.online_=!0,"undefined"===typeof window||"undefined"===typeof window.addEventListener||Object(o.isMobileCordova)()||(window.addEventListener("online",(function(){t.online_||(t.online_=!0,t.trigger("online",!0))}),!1),window.addEventListener("offline",(function(){t.online_&&(t.online_=!1,t.trigger("online",!1))}),!1)),t}return Object(a.__extends)(t,e),t.getInstance=function(){return new t},t.prototype.getInitialEvent=function(e){return Object(o.assert)("online"===e,"Unknown event type: "+e),[this.online_]},t.prototype.currentlyOnline=function(){return this.online_},t}(he),pe=function(){function e(e,t){if(void 0===t){this.pieces_=e.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_=e,this.pieceNum_=t}return e.prototype.toString=function(){for(var e="",t=this.pieceNum_;t<this.pieces_.length;t++)""!==this.pieces_[t]&&(e+="/"+this.pieces_[t]);return e||"/"},e}();function ge(){return new pe("")}function ve(e){return e.pieceNum_>=e.pieces_.length?null:e.pieces_[e.pieceNum_]}function me(e){return e.pieces_.length-e.pieceNum_}function ye(e){var t=e.pieceNum_;return t<e.pieces_.length&&t++,new pe(e.pieces_,t)}function be(e){return e.pieceNum_<e.pieces_.length?e.pieces_[e.pieces_.length-1]:null}function _e(e,t){return void 0===t&&(t=0),e.pieces_.slice(e.pieceNum_+t)}function we(e){if(e.pieceNum_>=e.pieces_.length)return null;for(var t=[],n=e.pieceNum_;n<e.pieces_.length-1;n++)t.push(e.pieces_[n]);return new pe(t,0)}function ke(e,t){for(var n=[],r=e.pieceNum_;r<e.pieces_.length;r++)n.push(e.pieces_[r]);if(t instanceof pe)for(r=t.pieceNum_;r<t.pieces_.length;r++)n.push(t.pieces_[r]);else{var i=t.split("/");for(r=0;r<i.length;r++)i[r].length>0&&n.push(i[r])}return new pe(n,0)}function Ee(e){return e.pieceNum_>=e.pieces_.length}function Se(e,t){var n=ve(e),r=ve(t);if(null===n)return t;if(n===r)return Se(ye(e),ye(t));
2throw new Error("INTERNAL ERROR: innerPath ("+t+") is not within outerPath ("+e+")")}function Ie(e,t){for(var n=_e(e,0),r=_e(t,0),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}function xe(e,t){if(me(e)!==me(t))return!1;for(var n=e.pieceNum_,r=t.pieceNum_;n<=e.pieces_.length;n++,r++)if(e.pieces_[n]!==t.pieces_[r])return!1;return!0}function Te(e,t){var n=e.pieceNum_,r=t.pieceNum_;if(me(e)>me(t))return!1;for(;n<e.pieces_.length;){if(e.pieces_[n]!==t.pieces_[r])return!1;++n,++r}return!0}var Ce=function(e,t){this.errorPrefix_=t,this.parts_=_e(e,0),this.byteLength_=Math.max(1,this.parts_.length);for(var n=0;n<this.parts_.length;n++)this.byteLength_+=Object(o.stringLength)(this.parts_[n]);Oe(this)};function Oe(e){if(e.byteLength_>768)throw new Error(e.errorPrefix_+"has a key path longer than 768 bytes ("+e.byteLength_+").");if(e.parts_.length>32)throw new Error(e.errorPrefix_+"path specified exceeds the maximum depth that can be written (32) or object contains a cycle "+Ae(e))}function Ae(e){return 0===e.parts_.length?"":"in property '"+e.parts_.join(".")+"'"}var Ne,Pe,Re=function(e){function t(){var t,n,r=e.call(this,["visible"])||this;return"undefined"!==typeof document&&"undefined"!==typeof document.addEventListener&&("undefined"!==typeof document.hidden?(n="visibilitychange",t="hidden"):"undefined"!==typeof document.mozHidden?(n="mozvisibilitychange",t="mozHidden"):"undefined"!==typeof document.msHidden?(n="msvisibilitychange",t="msHidden"):"undefined"!==typeof document.webkitHidden&&(n="webkitvisibilitychange",t="webkitHidden")),r.visible_=!0,n&&document.addEventListener(n,(function(){var e=!document[t];e!==r.visible_&&(r.visible_=e,r.trigger("visible",e))}),!1),r}return Object(a.__extends)(t,e),t.getInstance=function(){return new t},t.prototype.getInitialEvent=function(e){return Object(o.assert)("visible"===e,"Unknown event type: "+e),[this.visible_]},t}(he),je=1e3,De=function(e){function t(n,r,i,a,s,u,c,l){var f=e.call(this)||this;if(f.repoInfo_=n,f.applicationId_=r,f.onDataUpdate_=i,f.onConnectStatus_=a,f.onServerInfoUpdate_=s,f.authTokenProvider_=u,f.appCheckTokenProvider_=c,f.authOverride_=l,f.id=t.nextPersistentConnectionId_++,f.log_=E("p:"+f.id+":"),f.interruptReasons_={},f.listens=new Map,f.outstandingPuts_=[],f.outstandingGets_=[],f.outstandingPutCount_=0,f.outstandingGetCount_=0,f.onDisconnectRequestQueue_=[],f.connected_=!1,f.reconnectDelay_=je,f.maxReconnectDelay_=3e5,f.securityDebugCallback_=null,f.lastSessionId=null,f.establishConnectionTimer_=null,f.visible_=!1,f.requestCBHash_={},f.requestNumber_=0,f.realtime_=null,f.authToken_=null,f.appCheckToken_=null,f.forceTokenRefresh_=!1,f.invalidAuthTokenCount_=0,f.invalidAppCheckTokenCount_=0,f.firstConnection_=!0,f.lastConnectionAttemptTime_=null,f.lastConnectionEstablishedTime_=null,l&&!Object(o.isNodeSdk)())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");return Re.getInstance().on("visible",f.onVisible_,f),-1===n.host.indexOf("fblocal")&&de.getInstance().on("online",f.onOnline_,f),f}return Object(a.__extends)(t,e),t.prototype.sendRequest=function(e,t,n){var r=++this.requestNumber_,i={r:r,a:e,b:t};this.log_(Object(o.stringify)(i)),Object(o.assert)(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)},t.prototype.get=function(e){var t=this;this.initConnection_();var n=new o.Deferred,r={p:e._path.toString(),q:e._queryObject},i={action:"g",request:r,onComplete:function(e){var i=e.d;"ok"===e.s?(t.onDataUpdate_(r.p,i,!1,null),n.resolve(i)):n.reject(i)}};this.outstandingGets_.push(i),this.outstandingGetCount_++;var a=this.outstandingGets_.length-1;return this.connected_||setTimeout((function(){var e=t.outstandingGets_[a];void 0!==e&&i===e&&(delete t.outstandingGets_[a],t.outstandingGetCount_--,0===t.outstandingGetCount_&&(t.outstandingGets_=[]),t.log_("get "+a+" timed out on connection"),n.reject(new Error("Client is offline.")))}),3e3),this.connected_&&this.sendGet_(a),n.promise},t.prototype.listen=function(e,t,n,r){this.initConnection_();var i=e._queryIdentifier,a=e._path.toString();this.log_("Listen called for "+a+" "+i),this.listens.has(a)||this.listens.set(a,new Map),Object(o.assert)(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"listen() called for non-default but complete query"),Object(o.assert)(!this.listens.get(a).has(i),"listen() called twice for same path/queryId.");var s={onComplete:r,hashFn:t,query:e,tag:n};this.listens.get(a).set(i,s),this.connected_&&this.sendListen_(s)},t.prototype.sendGet_=function(e){var t=this,n=this.outstandingGets_[e];this.sendRequest("g",n.request,(function(r){delete t.outstandingGets_[e],t.outstandingGetCount_--,0===t.outstandingGetCount_&&(t.outstandingGets_=[]),n.onComplete&&n.onComplete(r)}))},t.prototype.sendListen_=function(e){var n=this,r=e.query,i=r._path.toString(),o=r._queryIdentifier;this.log_("Listen on "+i+" for "+o);var a={p:i};e.tag&&(a.q=r._queryObject,a.t=e.tag),a.h=e.hashFn(),this.sendRequest("q",a,(function(a){var s=a.d,u=a.s;t.warnOnListenWarnings_(s,r),(n.listens.get(i)&&n.listens.get(i).get(o))===e&&(n.log_("listen response",a),"ok"!==u&&n.removeListen_(i,o),e.onComplete&&e.onComplete(u,s))}))},t.warnOnListenWarnings_=function(e,t){if(e&&"object"===typeof e&&Object(o.contains)(e,"w")){var n=Object(o.safeGet)(e,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){var r='".indexOn": "'+t._queryParams.getIndex().toString()+'"',i=t._path.toString();x("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.")}}},t.prototype.refreshAuthToken=function(e){this.authToken_=e,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},(function(){})),this.reduceReconnectDelayIfAdminCredential_(e)},t.prototype.reduceReconnectDelayIfAdminCredential_=function(e){(e&&40===e.length||Object(o.isAdmin)(e))&&(this.log_("Admin auth credential detected.  Reducing max reconnect time."),this.maxReconnectDelay_=3e4)},t.prototype.refreshAppCheckToken=function(e){this.appCheckToken_=e,this.log_("App check token refreshed"),this.appCheckToken_?this.tryAppCheck():this.connected_&&this.sendRequest("unappeck",{},(function(){}))},t.prototype.tryAuth=function(){var e=this;if(this.connected_&&this.authToken_){var t=this.authToken_,n=Object(o.isValidFormat)(t)?"auth":"gauth",r={cred:t};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";
2e.authToken_===t&&("ok"===r?e.invalidAuthTokenCount_=0:e.onAuthRevoked_(r,i))}))}},t.prototype.tryAppCheck=function(){var e=this;this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},(function(t){var n=t.s,r=t.d||"error";"ok"===n?e.invalidAppCheckTokenCount_=0:e.onAppCheckRevoked_(n,r)}))},t.prototype.unlisten=function(e,t){var n=e._path.toString(),r=e._queryIdentifier;this.log_("Unlisten called for "+n+" "+r),Object(o.assert)(e._queryParams.isDefault()||!e._queryParams.loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,e._queryObject,t)},t.prototype.sendUnlisten_=function(e,t,n,r){this.log_("Unlisten on "+e+" for "+t);var i={p:e};r&&(i.q=n,i.t=r),this.sendRequest("n",i)},t.prototype.onDisconnectPut=function(e,t,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"o",data:t,onComplete:n})},t.prototype.onDisconnectMerge=function(e,t,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",e,t,n):this.onDisconnectRequestQueue_.push({pathString:e,action:"om",data:t,onComplete:n})},t.prototype.onDisconnectCancel=function(e,t){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",e,null,t):this.onDisconnectRequestQueue_.push({pathString:e,action:"oc",data:null,onComplete:t})},t.prototype.sendOnDisconnect_=function(e,t,n,r){var i={p:t,d:n};this.log_("onDisconnect "+e,i),this.sendRequest(e,i,(function(e){r&&setTimeout((function(){r(e.s,e.d)}),Math.floor(0))}))},t.prototype.put=function(e,t,n,r){this.putInternal("p",e,t,n,r)},t.prototype.merge=function(e,t,n,r){this.putInternal("m",e,t,n,r)},t.prototype.putInternal=function(e,t,n,r,i){this.initConnection_();var o={p:t,d:n};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:e,request:o,onComplete:r}),this.outstandingPutCount_++;var a=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(a):this.log_("Buffering put: "+t)},t.prototype.sendPut_=function(e){var t=this,n=this.outstandingPuts_[e].action,r=this.outstandingPuts_[e].request,i=this.outstandingPuts_[e].onComplete;this.outstandingPuts_[e].queued=this.connected_,this.sendRequest(n,r,(function(r){t.log_(n+" response",r),delete t.outstandingPuts_[e],t.outstandingPutCount_--,0===t.outstandingPutCount_&&(t.outstandingPuts_=[]),i&&i(r.s,r.d)}))},t.prototype.reportStats=function(e){var t=this;if(this.connected_){var n={c:e};this.log_("reportStats",n),this.sendRequest("s",n,(function(e){if("ok"!==e.s){var n=e.d;t.log_("reportStats","Error sending stats: "+n)}}))}},t.prototype.onDataMessage_=function(e){if("r"in e){this.log_("from server: "+Object(o.stringify)(e));var t=e.r,n=this.requestCBHash_[t];n&&(delete this.requestCBHash_[t],n(e.b))}else{if("error"in e)throw"A server-side error has occurred: "+e.error;"a"in e&&this.onDataPush_(e.a,e.b)}},t.prototype.onDataPush_=function(e,t){this.log_("handleServerMessage",e,t),"d"===e?this.onDataUpdate_(t.p,t.d,!1,t.t):"m"===e?this.onDataUpdate_(t.p,t.d,!0,t.t):"c"===e?this.onListenRevoked_(t.p,t.q):"ac"===e?this.onAuthRevoked_(t.s,t.d):"apc"===e?this.onAppCheckRevoked_(t.s,t.d):"sd"===e?this.onSecurityDebugPacket_(t):S("Unrecognized action received from server: "+Object(o.stringify)(e)+"\nAre you using the latest client?")},t.prototype.onReady_=function(e,t){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(e),this.lastSessionId=t,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)},t.prototype.scheduleConnect_=function(e){var t=this;Object(o.assert)(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout((function(){t.establishConnectionTimer_=null,t.establishConnection_()}),Math.floor(e))},t.prototype.initConnection_=function(){!this.realtime_&&this.firstConnection_&&this.scheduleConnect_(0)},t.prototype.onVisible_=function(e){e&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible.  Reducing delay."),this.reconnectDelay_=je,this.realtime_||this.scheduleConnect_(0)),this.visible_=e},t.prototype.onOnline_=function(e){e?(this.log_("Browser went online."),this.reconnectDelay_=je,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline.  Killing connection."),this.realtime_&&this.realtime_.close())},t.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_=je),this.lastConnectionEstablishedTime_=null}}else this.log_("Window isn't visible.  Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime();var e=(new Date).getTime()-this.lastConnectionAttemptTime_,t=Math.max(0,this.reconnectDelay_-e);
2t=Math.random()*t,this.log_("Trying to reconnect in "+t+"ms"),this.scheduleConnect_(t),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)},t.prototype.establishConnection_=function(){return Object(a.__awaiter)(this,void 0,void 0,(function(){var e,n,r,i,s,u,c,l,f,h,d,p,g,v,m=this;return Object(a.__generator)(this,(function(y){switch(y.label){case 0:if(!this.shouldReconnect_())return[3,4];this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=(new Date).getTime(),this.lastConnectionEstablishedTime_=null,e=this.onDataMessage_.bind(this),n=this.onReady_.bind(this),r=this.onRealtimeDisconnect_.bind(this),i=this.id+":"+t.nextConnectionId_++,s=this.lastSessionId,u=!1,c=null,l=function(){c?c.close():(u=!0,r())},f=function(e){Object(o.assert)(c,"sendRequest call when we're not connected not allowed."),c.sendRequest(e)},this.realtime_={close:l,sendRequest:f},h=this.forceTokenRefresh_,this.forceTokenRefresh_=!1,y.label=1;case 1:return y.trys.push([1,3,,4]),[4,Promise.all([this.authTokenProvider_.getToken(h),this.appCheckTokenProvider_.getToken(h)])];case 2:return d=a.__read.apply(void 0,[y.sent(),2]),p=d[0],g=d[1],u?k("getToken() completed but was canceled"):(k("getToken() completed. Creating connection."),this.authToken_=p&&p.accessToken,this.appCheckToken_=g&&g.token,c=new le(i,this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,e,n,r,(function(e){x(e+" ("+m.repoInfo_.toString()+")"),m.interrupt("server_kill")}),s)),[3,4];case 3:return v=y.sent(),this.log_("Failed to get token: "+v),u||(this.repoInfo_.nodeAdmin&&x(v),l()),[3,4];case 4:return[2]}}
2))}))},t.prototype.interrupt=function(e){k("Interrupting connection for reason: "+e),this.interruptReasons_[e]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())},t.prototype.resume=function(e){k("Resuming connection for reason: "+e),delete this.interruptReasons_[e],Object(o.isEmpty)(this.interruptReasons_)&&(this.reconnectDelay_=je,this.realtime_||this.scheduleConnect_(0))},t.prototype.handleTimestamp_=function(e){var t=e-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:t})},t.prototype.cancelSentTransactions_=function(){for(var e=0;e<this.outstandingPuts_.length;e++){var t=this.outstandingPuts_[e];t&&"h"in t.request&&t.queued&&(t.onComplete&&t.onComplete("disconnect"),delete this.outstandingPuts_[e],this.outstandingPutCount_--)}0===this.outstandingPutCount_&&(this.outstandingPuts_=[])},t.prototype.onListenRevoked_=function(e,t){var n;n=t?t.map((function(e){return R(e)})).join("$"):"default";var r=this.removeListen_(e,n);r&&r.onComplete&&r.onComplete("permission_denied")},t.prototype.removeListen_=function(e,t){var n,r=new pe(e).toString();if(this.listens.has(r)){var i=this.listens.get(r);n=i.get(t),i.delete(t),0===i.size&&this.listens.delete(r)}else n=void 0;return n},t.prototype.onAuthRevoked_=function(e,t){k("Auth token revoked: "+e+"/"+t),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==e&&"permission_denied"!==e||(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))},t.prototype.onAppCheckRevoked_=function(e,t){k("App check token revoked: "+e+"/"+t),this.appCheckToken_=null,this.forceTokenRefresh_=!0,"invalid_token"!==e&&"permission_denied"!==e||(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=3&&this.appCheckTokenProvider_.notifyForInvalidToken())},t.prototype.onSecurityDebugPacket_=function(e){this.securityDebugCallback_?this.securityDebugCallback_(e):"msg"in e&&console.log("FIREBASE: "+e.msg.replace("\n","\nFIREBASE: "))},t.prototype.restoreState_=function(){var e,t,n,r;this.tryAuth(),this.tryAppCheck();try{for(var i=Object(a.__values)(this.listens.values()),o=i.next();!o.done;o=i.next()){var s=o.value;try{for(var u=(n=void 0,Object(a.__values)(s.values())),c=u.next();!c.done;c=u.next()){var l=c.value;this.sendListen_(l)}}catch(d){n={error:d}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(p){e={error:p}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}for(var f=0;f<this.outstandingPuts_.length;f++)this.outstandingPuts_[f]&&this.sendPut_(f);for(;this.onDisconnectRequestQueue_.length;){var h=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(h.action,h.pathString,h.data,h.onComplete)}for(f=0;f<this.outstandingGets_.length;f++)this.outstandingGets_[f]&&this.sendGet_(f)},t.prototype.sendConnectStats_=function(){var e={},t="js";Object(o.isNodeSdk)()&&(t=this.repoInfo_.nodeAdmin?"admin_node":"node"),e["sdk."+t+"."+u.replace(/\./g,"-")]=1,Object(o.isMobileCordova)()?e["framework.cordova"]=1:Object(o.isReactNative)()&&(e["framework.reactnative"]=1),this.reportStats(e)},t.prototype.shouldReconnect_=function(){var e=de.getInstance().currentlyOnline();return Object(o.isEmpty)(this.interruptReasons_)&&e},t.nextPersistentConnectionId_=0,t.nextConnectionId_=0,t}(fe),Me=function(){function e(e,t){this.name=e,this.node=t}return e.Wrap=function(t,n){return new e(t,n)},e}(),Le=function(){function e(){}return e.prototype.getCompare=function(){return this.compare.bind(this)},e.prototype.indexedValueChanged=function(e,t){var n=new Me(C,e),r=new Me(C,t);return 0!==this.compare(n,r)},e.prototype.minPost=function(){return Me.MIN},e}(),Fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),Object.defineProperty(t,"__EMPTY_NODE",{get:function(){return Ne},set:function(e){Ne=e},enumerable:!1,configurable:!0}),t.prototype.compare=function(e,t){return A(e.name,t.name)},t.prototype.isDefinedOn=function(e){throw Object(o.assertionError)("KeyIndex.isDefinedOn not expected to be called.")},t.prototype.indexedValueChanged=function(e,t){return!1},t.prototype.minPost=function(){return Me.MIN}
2,t.prototype.maxPost=function(){return new Me(O,Ne)},t.prototype.makePost=function(e,t){return Object(o.assert)("string"===typeof e,"KeyIndex indexValue must always be a string."),new Me(e,Ne)},t.prototype.toString=function(){return".key"},t}(Le),Ue=new Fe,Ve=function(){function e(e,t,n,r,i){void 0===i&&(i=null),this.isReverse_=r,this.resultGenerator_=i,this.nodeStack_=[];for(var o=1;!e.isEmpty();)if(e=e,o=t?n(e.key,t):1,r&&(o*=-1),o<0)e=this.isReverse_?e.left:e.right;else{if(0===o){this.nodeStack_.push(e);break}this.nodeStack_.push(e),e=this.isReverse_?e.right:e.left}}return e.prototype.getNext=function(){if(0===this.nodeStack_.length)return null;var e,t=this.nodeStack_.pop();if(e=this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value},this.isReverse_)for(t=t.left;!t.isEmpty();)this.nodeStack_.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack_.push(t),t=t.left;return e},e.prototype.hasNext=function(){return this.nodeStack_.length>0},e.prototype.peek=function(){if(0===this.nodeStack_.length)return null;var e=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value}},e}(),Be=function(){function e(t,n,r,i,o){this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=i?i:ze.EMPTY_NODE,this.right=null!=o?o:ze.EMPTY_NODE}return e.prototype.copy=function(t,n,r,i,o){return new e(null!=t?t:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},e.prototype.count=function(){return this.left.count()+1+this.right.count()},e.prototype.isEmpty=function(){return!1},e.prototype.inorderTraversal=function(e){return this.left.inorderTraversal(e)||!!e(this.key,this.value)||this.right.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)},e.prototype.min_=function(){return this.left.isEmpty()?this:this.left.min_()},e.prototype.minKey=function(){return this.min_().key},e.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},e.prototype.insert=function(e,t,n){var r=this,i=n(e,r.key);return(r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n))).fixUp_()},e.prototype.removeMin_=function(){if(this.left.isEmpty())return ze.EMPTY_NODE;var e=this;return e.left.isRed_()||e.left.left.isRed_()||(e=e.moveRedLeft_()),(e=e.copy(null,null,null,e.left.removeMin_(),null)).fixUp_()},e.prototype.remove=function(e,t){var n,r;if(t(e,(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(e,t),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===t(e,n.key)){if(n.right.isEmpty())return ze.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(e,t))}return n.fixUp_()},e.prototype.isRed_=function(){return this.color},e.prototype.fixUp_=function(){var e=this;return e.right.isRed_()&&!e.left.isRed_()&&(e=e.rotateLeft_()),e.left.isRed_()&&e.left.left.isRed_()&&(e=e.rotateRight_()),e.left.isRed_()&&e.right.isRed_()&&(e=e.colorFlip_()),e},e.prototype.moveRedLeft_=function(){var e=this.colorFlip_();return e.right.left.isRed_()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight_())).rotateLeft_()).colorFlip_()),e},e.prototype.moveRedRight_=function(){var e=this.colorFlip_();return e.left.left.isRed_()&&(e=(e=e.rotateRight_()).colorFlip_()),e},e.prototype.rotateLeft_=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.rotateRight_=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.colorFlip_=function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)},e.prototype.checkMaxDepth_=function(){var e=this.check_();return Math.pow(2,e)<=this.count()+1},e.prototype.check_=function(){if(this.isRed_()&&this.left.isRed_()
2)throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");var e=this.left.check_();if(e!==this.right.check_())throw new Error("Black depths differ");return e+(this.isRed_()?0:1)},e.RED=!0,e.BLACK=!1,e}(),qe=function(){function e(){}return e.prototype.copy=function(e,t,n,r,i){return this},e.prototype.insert=function(e,t,n){return new Be(e,t,null)},e.prototype.remove=function(e,t){return this},e.prototype.count=function(){return 0},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(e){return!1},e.prototype.reverseTraversal=function(e){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.check_=function(){return 0},e.prototype.isRed_=function(){return!1},e}(),ze=function(){function e(t,n){void 0===n&&(n=e.EMPTY_NODE),this.comparator_=t,this.root_=n}return e.prototype.insert=function(t,n){return new e(this.comparator_,this.root_.insert(t,n,this.comparator_).copy(null,null,Be.BLACK,null,null))},e.prototype.remove=function(t){return new e(this.comparator_,this.root_.remove(t,this.comparator_).copy(null,null,Be.BLACK,null,null))},e.prototype.get=function(e){for(var t,n=this.root_;!n.isEmpty();){if(0===(t=this.comparator_(e,n.key)))return n.value;t<0?n=n.left:t>0&&(n=n.right)}return null},e.prototype.getPredecessorKey=function(e){for(var t,n=this.root_,r=null;!n.isEmpty();){if(0===(t=this.comparator_(e,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}t<0?n=n.left:t>0&&(r=n,n=n.right)}throw new Error("Attempted to find predecessor key for a nonexistent key.  What gives?")},e.prototype.isEmpty=function(){return this.root_.isEmpty()},e.prototype.count=function(){return this.root_.count()},e.prototype.minKey=function(){return this.root_.minKey()},e.prototype.maxKey=function(){return this.root_.maxKey()},e.prototype.inorderTraversal=function(e){return this.root_.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.root_.reverseTraversal(e)},e.prototype.getIterator=function(e){return new Ve(this.root_,null,this.comparator_,!1,e)},e.prototype.getIteratorFrom=function(e,t){return new Ve(this.root_,e,this.comparator_,!1,t)},e.prototype.getReverseIteratorFrom=function(e,t){return new Ve(this.root_,e,this.comparator_,!0,t)},e.prototype.getReverseIterator=function(e){return new Ve(this.root_,null,this.comparator_,!0,e)},e.EMPTY_NODE=new qe,e}();function He(e,t){return A(e.name,t.name)}function Ke(e,t){return A(e,t)}var We,Ge,Ye,$e=function(e){return"number"===typeof e?"number:"+M(e):"string:"+e},Qe=function(e){if(e.isLeafNode()){var t=e.val();Object(o.assert)("string"===typeof t||"number"===typeof t||"object"===typeof t&&Object(o.contains)(t,".sv"),"Priority must be a string or number.")}else Object(o.assert)(e===Pe||e.isEmpty(),"priority of unexpected type.");Object(o.assert)(e===Pe||e.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")},Xe=function(){function e(t,n){void 0===n&&(n=e.__childrenNodeConstructor.EMPTY_NODE),this.value_=t,this.priorityNode_=n,this.lazyHash_=null,Object(o.assert)(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),Qe(this.priorityNode_)}return Object.defineProperty(e,"__childrenNodeConstructor",{get:function(){return We},set:function(e){We=e},enumerable:!1,configurable:!0}),e.prototype.isLeafNode=function(){return!0},e.prototype.getPriority=function(){return this.priorityNode_},e.prototype.updatePriority=function(t){return new e(this.value_,t)},e.prototype.getImmediateChild=function(t){return".priority"===t?this.priorityNode_:e.__childrenNodeConstructor.EMPTY_NODE},e.prototype.getChild=function(t){return Ee(t)?this:".priority"===ve(t)?this.priorityNode_:e.__childrenNodeConstructor.EMPTY_NODE},e.prototype.hasChild=function(){return!1},e.prototype.getPredecessorChildName=function(e,t){return null},e.prototype.updateImmediateChild=function(t,n){return".priority"===t?this.updatePriority(n):n.isEmpty()&&".priority"!==t?this:e.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(t,n).updatePriority(this.priorityNode_)},e.prototype.updateChild=function(t,n){var r=ve(t);return null===r?n:n.isEmpty()&&".priority"!==r?this:(Object(o.assert)(".priority"!==r||1===me(t),".priority must be the last token in a path"),this.updateImmediateChild(r,e.__childrenNodeConstructor.EMPTY_NODE.updateChild(ye(t),n)))},e.prototype.isEmpty=function(){return!1},e.prototype.numChildren=function(){return 0},e.prototype.forEachChild=function(e,t){return!1}
2,e.prototype.val=function(e){return e&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()},e.prototype.hash=function(){if(null===this.lazyHash_){var e="";this.priorityNode_.isEmpty()||(e+="priority:"+$e(this.priorityNode_.val())+":");var t=typeof this.value_;e+=t+":",e+="number"===t?M(this.value_):this.value_,this.lazyHash_=m(e)}return this.lazyHash_},e.prototype.getValue=function(){return this.value_},e.prototype.compareTo=function(t){return t===e.__childrenNodeConstructor.EMPTY_NODE?1:t instanceof e.__childrenNodeConstructor?-1:(Object(o.assert)(t.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(t))},e.prototype.compareToLeafNode_=function(t){var n=typeof t.value_,r=typeof this.value_,i=e.VALUE_TYPE_ORDER.indexOf(n),a=e.VALUE_TYPE_ORDER.indexOf(r);return Object(o.assert)(i>=0,"Unknown leaf type: "+n),Object(o.assert)(a>=0,"Unknown leaf type: "+r),i===a?"object"===r?0:this.value_<t.value_?-1:this.value_===t.value_?0:1:a-i},e.prototype.withIndex=function(){return this},e.prototype.isIndexed=function(){return!0},e.prototype.equals=function(e){if(e===this)return!0;if(e.isLeafNode()){var t=e;return this.value_===t.value_&&this.priorityNode_.equals(t.priorityNode_)}return!1},e.VALUE_TYPE_ORDER=["object","boolean","number","string"],e}();var Je,Ze,et=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.prototype.compare=function(e,t){var n=e.node.getPriority(),r=t.node.getPriority(),i=n.compareTo(r);return 0===i?A(e.name,t.name):i},t.prototype.isDefinedOn=function(e){return!e.getPriority().isEmpty()},t.prototype.indexedValueChanged=function(e,t){return!e.getPriority().equals(t.getPriority())},t.prototype.minPost=function(){return Me.MIN},t.prototype.maxPost=function(){return new Me(O,new Xe("[PRIORITY-POST]",Ye))},t.prototype.makePost=function(e,t){var n=Ge(e);return new Me(t,new Xe("[PRIORITY-POST]",n))},t.prototype.toString=function(){return".priority"},t}(Le)),tt=Math.log(2),nt=function(){function e(e){var t;this.count=(t=e+1,parseInt(Math.log(t)/tt,10)),this.current_=this.count-1;var n,r=(n=this.count,parseInt(Array(n+1).join("1"),2));this.bits_=e+1&r}return e.prototype.nextBitIsOne=function(){var e=!(this.bits_&1<<this.current_);return this.current_--,e},e}(),rt=function(e,t,n,r){e.sort(t);var i=function t(r,i){var o,a,s=i-r;if(0===s)return null;if(1===s)return o=e[r],a=n?n(o):o,new Be(a,o.node,Be.BLACK,null,null);var u=parseInt(s/2,10)+r,c=t(r,u),l=t(u+1,i);return o=e[u],a=n?n(o):o,new Be(a,o.node,Be.BLACK,c,l)},o=function(t){for(var r=null,o=null,a=e.length,s=function(t,r){var o=a-t,s=a;a-=t;var c=i(o+1,s),l=e[o],f=n?n(l):l;u(new Be(f,l.node,r,null,c))},u=function(e){r?(r.left=e,r=e):(o=e,r=e)},c=0;c<t.count;++c){var l=t.nextBitIsOne(),f=Math.pow(2,t.count-(c+1));l?s(f,Be.BLACK):(s(f,Be.BLACK),s(f,Be.RED))}return o}(new nt(e.length));return new ze(r||t,o)},it={},ot=function(){function e(e,t){this.indexes_=e,this.indexSet_=t}return Object.defineProperty(e,"Default",{get:function(){return Object(o.assert)(it&&et,"ChildrenNode.ts has not been loaded"),Je=Je||new e({".priority":it},{".priority":et})},enumerable:!1,configurable:!0}),e.prototype.get=function(e){var t=Object(o.safeGet)(this.indexes_,e);if(!t)throw new Error("No index defined for "+e);return t instanceof ze?t:null},e.prototype.hasIndex=function(e){return Object(o.contains)(this.indexSet_,e.toString())},e.prototype.addIndex=function(t,n){Object(o.assert)(t!==Ue,"KeyIndex always exists and isn't meant to be added to the IndexMap.");for(var r,i=[],s=!1,u=n.getIterator(Me.Wrap),c=u.getNext();c;)s=s||t.isDefinedOn(c.node),i.push(c),c=u.getNext();r=s?rt(i,t.getCompare()):it;var l=t.toString(),f=Object(a.__assign)({},this.indexSet_);f[l]=t;var h=Object(a.__assign)({},this.indexes_);return h[l]=r,new e(h,f)},e.prototype.addToIndexes=function(t,n){var r=this;return new e(Object(o.map)(this.indexes_,(function(e,i){var a=Object(o.safeGet)(r.indexSet_,i);if(Object(o.assert)(a,"Missing index implementation for "+i),e===it){if(a.isDefinedOn(t.node)){for(var s=[],u=n.getIterator(Me.Wrap),c=u.getNext();c;)c.name!==t.name&&s.push(c),c=u.getNext();return s.push(t),rt(s,a.getCompare())}return it}var l=n.get(t.name),f=e;return l&&(f=f.remove(new Me(t.name,l))),f.insert(t,t.node)})),this.indexSet_)}
2,e.prototype.removeFromIndexes=function(t,n){return new e(Object(o.map)(this.indexes_,(function(e){if(e===it)return e;var r=n.get(t.name);return r?e.remove(new Me(t.name,r)):e})),this.indexSet_)},e}(),at=function(){function e(e,t,n){this.children_=e,this.priorityNode_=t,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&Qe(this.priorityNode_),this.children_.isEmpty()&&Object(o.assert)(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(e,"EMPTY_NODE",{get:function(){return Ze||(Ze=new e(new ze(Ke),null,ot.Default))},enumerable:!1,configurable:!0}),e.prototype.isLeafNode=function(){return!1},e.prototype.getPriority=function(){return this.priorityNode_||Ze},e.prototype.updatePriority=function(t){return this.children_.isEmpty()?this:new e(this.children_,t,this.indexMap_)},e.prototype.getImmediateChild=function(e){if(".priority"===e)return this.getPriority();var t=this.children_.get(e);return null===t?Ze:t},e.prototype.getChild=function(e){var t=ve(e);return null===t?this:this.getImmediateChild(t).getChild(ye(e))},e.prototype.hasChild=function(e){return null!==this.children_.get(e)},e.prototype.updateImmediateChild=function(t,n){if(Object(o.assert)(n,"We should always be passing snapshot nodes"),".priority"===t)return this.updatePriority(n);var r=new Me(t,n),i=void 0,a=void 0;n.isEmpty()?(i=this.children_.remove(t),a=this.indexMap_.removeFromIndexes(r,this.children_)):(i=this.children_.insert(t,n),a=this.indexMap_.addToIndexes(r,this.children_));var s=i.isEmpty()?Ze:this.priorityNode_;return new e(i,s,a)},e.prototype.updateChild=function(e,t){var n=ve(e);if(null===n)return t;Object(o.assert)(".priority"!==ve(e)||1===me(e),".priority must be the last token in a path");var r=this.getImmediateChild(n).updateChild(ye(e),t);return this.updateImmediateChild(n,r)},e.prototype.isEmpty=function(){return this.children_.isEmpty()},e.prototype.numChildren=function(){return this.children_.count()},e.prototype.val=function(t){if(this.isEmpty())return null;var n={},r=0,i=0,o=!0;if(this.forEachChild(et,(function(a,s){n[a]=s.val(t),r++,o&&e.INTEGER_REGEXP_.test(a)?i=Math.max(i,Number(a)):o=!1})),!t&&o&&i<2*r){var a=[];for(var s in n)a[s]=n[s];return a}return t&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n},e.prototype.hash=function(){if(null===this.lazyHash_){var e="";this.getPriority().isEmpty()||(e+="priority:"+$e(this.getPriority().val())+":"),this.forEachChild(et,(function(t,n){var r=n.hash();""!==r&&(e+=":"+t+":"+r)})),this.lazyHash_=""===e?"":m(e)}return this.lazyHash_},e.prototype.getPredecessorChildName=function(e,t,n){var r=this.resolveIndex_(n);if(r){var i=r.getPredecessorKey(new Me(e,t));return i?i.name:null}return this.children_.getPredecessorKey(e)},e.prototype.getFirstChildName=function(e){var t=this.resolveIndex_(e);if(t){var n=t.minKey();return n&&n.name}return this.children_.minKey()},e.prototype.getFirstChild=function(e){var t=this.getFirstChildName(e);return t?new Me(t,this.children_.get(t)):null},e.prototype.getLastChildName=function(e){var t=this.resolveIndex_(e);if(t){var n=t.maxKey();return n&&n.name}return this.children_.maxKey()},e.prototype.getLastChild=function(e){var t=this.getLastChildName(e);return t?new Me(t,this.children_.get(t)):null},e.prototype.forEachChild=function(e,t){var n=this.resolveIndex_(e);return n?n.inorderTraversal((function(e){return t(e.name,e.node)})):this.children_.inorderTraversal(t)},e.prototype.getIterator=function(e){return this.getIteratorFrom(e.minPost(),e)},e.prototype.getIteratorFrom=function(e,t){var n=this.resolveIndex_(t);if(n)return n.getIteratorFrom(e,(function(e){return e}));for(var r=this.children_.getIteratorFrom(e.name,Me.Wrap),i=r.peek();null!=i&&t.compare(i,e)<0;)r.getNext(),i=r.peek();return r},e.prototype.getReverseIterator=function(e){return this.getReverseIteratorFrom(e.maxPost(),e)},e.prototype.getReverseIteratorFrom=function(e,t){var n=this.resolveIndex_(t);if(n)return n.getReverseIteratorFrom(e,(function(e){return e}));for(var r=this.children_.getReverseIteratorFrom(e.name,Me.Wrap),i=r.peek();null!=i&&t.compare(i,e)>0;)r.getNext(),i=r.peek();return r},e.prototype.compareTo=function(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===st?-1:0},e.prototype.withIndex=function(t){if(t===Ue||this.indexMap_.hasIndex(t))return this;var n=this.indexMap_.addIndex(t,this.children_);return new e(this.children_,this.priorityNode_,n)},e.prototype.isIndexed=function(e){return e===Ue||this.indexMap_.hasIndex(e)},e.prototype.equals=function(e){if(e===this)return!0;
2if(e.isLeafNode())return!1;var t=e;if(this.getPriority().equals(t.getPriority())){if(this.children_.count()===t.children_.count()){for(var n=this.getIterator(et),r=t.getIterator(et),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},e.prototype.resolveIndex_=function(e){return e===Ue?null:this.indexMap_.get(e.toString())},e.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,e}(),st=new(function(e){function t(){return e.call(this,new ze(Ke),at.EMPTY_NODE,ot.Default)||this}return Object(a.__extends)(t,e),t.prototype.compareTo=function(e){return e===this?0:1},t.prototype.equals=function(e){return e===this},t.prototype.getPriority=function(){return this},t.prototype.getImmediateChild=function(e){return at.EMPTY_NODE},t.prototype.isEmpty=function(){return!1},t}(at));Object.defineProperties(Me,{MIN:{value:new Me(C,at.EMPTY_NODE)},MAX:{value:new Me(O,st)}}),Fe.__EMPTY_NODE=at.EMPTY_NODE,Xe.__childrenNodeConstructor=at,Pe=st,function(e){Ye=e}(st);function ut(e,t){if(void 0===t&&(t=null),null===e)return at.EMPTY_NODE;if("object"===typeof e&&".priority"in e&&(t=e[".priority"]),Object(o.assert)(null===t||"string"===typeof t||"number"===typeof t||"object"===typeof t&&".sv"in t,"Invalid priority type found: "+typeof t),"object"===typeof e&&".value"in e&&null!==e[".value"]&&(e=e[".value"]),"object"!==typeof e||".sv"in e)return new Xe(e,ut(t));if(e instanceof Array){var n=at.EMPTY_NODE;return D(e,(function(t,r){if(Object(o.contains)(e,t)&&"."!==t.substring(0,1)){var i=ut(r);!i.isLeafNode()&&i.isEmpty()||(n=n.updateImmediateChild(t,i))}})),n.updatePriority(ut(t))}var r=[],i=!1;if(D(e,(function(e,t){if("."!==e.substring(0,1)){var n=ut(t);n.isEmpty()||(i=i||!n.getPriority().isEmpty(),r.push(new Me(e,n)))}})),0===r.length)return at.EMPTY_NODE;var a=rt(r,He,(function(e){return e.name}),Ke);if(i){var s=rt(r,et.getCompare());return new at(a,ut(t),new ot({".priority":s},{".priority":et}))}return new at(a,ut(t),ot.Default)}!function(e){Ge=e}(ut);var ct=function(e){function t(t){var n=e.call(this)||this;return n.indexPath_=t,Object(o.assert)(!Ee(t)&&".priority"!==ve(t),"Can't create PathIndex with empty path or .priority key"),n}return Object(a.__extends)(t,e),t.prototype.extractChild=function(e){return e.getChild(this.indexPath_)},t.prototype.isDefinedOn=function(e){return!e.getChild(this.indexPath_).isEmpty()},t.prototype.compare=function(e,t){var n=this.extractChild(e.node),r=this.extractChild(t.node),i=n.compareTo(r);return 0===i?A(e.name,t.name):i},t.prototype.makePost=function(e,t){var n=ut(e),r=at.EMPTY_NODE.updateChild(this.indexPath_,n);return new Me(t,r)},t.prototype.maxPost=function(){var e=at.EMPTY_NODE.updateChild(this.indexPath_,st);return new Me(O,e)},t.prototype.toString=function(){return _e(this.indexPath_,0).join("/")},t}(Le),lt=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.prototype.compare=function(e,t){var n=e.node.compareTo(t.node);return 0===n?A(e.name,t.name):n},t.prototype.isDefinedOn=function(e){return!0},t.prototype.indexedValueChanged=function(e,t){return!e.equals(t)},t.prototype.minPost=function(){return Me.MIN},t.prototype.maxPost=function(){return Me.MAX},t.prototype.makePost=function(e,t){var n=ut(e);return new Me(t,n)},t.prototype.toString=function(){return".value"},t}(Le)),ft="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",ht=function(){var e=0,t=[];return function(n){var r,i=n===e;e=n;var a=new Array(8);for(r=7;r>=0;r--)a[r]=ft.charAt(n%64),n=Math.floor(n/64);Object(o.assert)(0===n,"Cannot push at time == 0");var s=a.join("");if(i){for(r=11;r>=0&&63===t[r];r--)t[r]=0;t[r]++}else for(r=0;r<12;r++)t[r]=Math.floor(64*Math.random());for(r=0;r<12;r++)s+=ft.charAt(t[r]);return Object(o.assert)(20===s.length,"nextPushId: Length should be 20."),s}}(),dt=function(e){if("2147483647"===e)return"-";var t=V(e);if(null!=t)return""+(t+1);for(var n=new Array(e.length),r=0;r<n.length;r++)n[r]=e.charAt(r);if(n.length<786)return n.push("-"),n.join("");for(var i=n.length-1;i>=0&&"z"===n[i];)i--;if(-1===i)return O;var o=n[i],a=ft.charAt(ft.indexOf(o)+1);return n[i]=a,n.slice(0,i+1).join("")},pt=function(e){if("-2147483648"===e)return C;var t=V(e);if(null!=t)return""+(t-1);for(var n=new Array(e.length),r=0;r<n.length;r++)n[r]=e.charAt(r);return"-"===n[n.length-1]?1===n.length?"2147483647":(delete n[n.length-1],n.join("")):(n[n.length-1]=ft.charAt(ft.indexOf(n[n.length-1])-1),n.join("")+"z".repeat(786-n.length))};function gt(e){return{type:"value",snapshotNode:e}}function vt(e,t){return{type:"child_added",snapshotNode:t,childName:e}}function mt(e,t){return{type:"child_removed",snapshotNode:t,childName:e}}function yt(e,t,n){return{type:"child_changed",snapshotNode:t,childName:e,oldSnap:n}}var bt=function(){function e(e){this.index_=e}return e.prototype.updateChild=function(e,t,n,r,i,a){Object(o.assert)(e.isIndexed(this.index_),"A node must be indexed if only a child is updated");var s=e.getImmediateChild(t);return s.getChild(r).equals(n.getChild(r))&&s.isEmpty()===n.isEmpty()?e:(null!=a&&(n.isEmpty()?e.hasChild(t)?a.trackChildChange(mt(t,s)):Object(o.assert)(e.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):s.isEmpty()?a.trackChildChange(vt(t,n)):a.trackChildChange(yt(t,n,s))),e.isLeafNode()&&n.isEmpty()?e:e.updateImmediateChild(t,n).withIndex(this.index_))},e.prototype.updateFullNode=function(e,t,n){return null!=n&&(e.isLeafNode()||e.forEachChild(et,(function(e,r){t.hasChild(e)||n.trackChildChange(mt(e,r))})),t.isLeafNode()||t.forEachChild(et,(function(t,r){if(e.hasChild(t)){var i=e.getImmediateChild(t);i.equals(r)||n.trackChildChange(yt(t,r,i))}else n.trackChildChange(vt(t,r))}))),t.withIndex(this.index_)},e.prototype.updatePriority=function(e,t){return e.isEmpty()?at.EMPTY_NODE:e.updatePriority(t)},e.prototype.filtersNodes=function(){return!1},e.prototype.getIndexedFilter=function(){return this},e.prototype.getIndex=function(){return this.index_},e}
2(),_t=function(){function e(t){this.indexedFilter_=new bt(t.getIndex()),this.index_=t.getIndex(),this.startPost_=e.getStartPost_(t),this.endPost_=e.getEndPost_(t)}return e.prototype.getStartPost=function(){return this.startPost_},e.prototype.getEndPost=function(){return this.endPost_},e.prototype.matches=function(e){return this.index_.compare(this.getStartPost(),e)<=0&&this.index_.compare(e,this.getEndPost())<=0},e.prototype.updateChild=function(e,t,n,r,i,o){return this.matches(new Me(t,n))||(n=at.EMPTY_NODE),this.indexedFilter_.updateChild(e,t,n,r,i,o)},e.prototype.updateFullNode=function(e,t,n){t.isLeafNode()&&(t=at.EMPTY_NODE);var r=t.withIndex(this.index_);r=r.updatePriority(at.EMPTY_NODE);var i=this;return t.forEachChild(et,(function(e,t){i.matches(new Me(e,t))||(r=r.updateImmediateChild(e,at.EMPTY_NODE))})),this.indexedFilter_.updateFullNode(e,r,n)},e.prototype.updatePriority=function(e,t){return e},e.prototype.filtersNodes=function(){return!0},e.prototype.getIndexedFilter=function(){return this.indexedFilter_},e.prototype.getIndex=function(){return this.index_},e.getStartPost_=function(e){if(e.hasStart()){var t=e.getIndexStartName();return e.getIndex().makePost(e.getIndexStartValue(),t)}return e.getIndex().minPost()},e.getEndPost_=function(e){if(e.hasEnd()){var t=e.getIndexEndName();return e.getIndex().makePost(e.getIndexEndValue(),t)}return e.getIndex().maxPost()},e}(),wt=function(){function e(e){this.rangedFilter_=new _t(e),this.index_=e.getIndex(),this.limit_=e.getLimit(),this.reverse_=!e.isViewFromLeft()}return e.prototype.updateChild=function(e,t,n,r,i,o){return this.rangedFilter_.matches(new Me(t,n))||(n=at.EMPTY_NODE),e.getImmediateChild(t).equals(n)?e:e.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(e,t,n,r,i,o):this.fullLimitUpdateChild_(e,t,n,i,o)},e.prototype.updateFullNode=function(e,t,n){var r;if(t.isLeafNode()||t.isEmpty())r=at.EMPTY_NODE.withIndex(this.index_);else if(2*this.limit_<t.numChildren()&&t.isIndexed(this.index_)){r=at.EMPTY_NODE.withIndex(this.index_);var i=void 0;i=this.reverse_?t.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):t.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=t.withIndex(this.index_)).updatePriority(at.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(e,t){return l(t,e)}}else i=r.getIterator(this.index_),s=this.rangedFilter_.getStartPost(),u=this.rangedFilter_.getEndPost(),c=this.index_.getCompare();o=0;for(var f=!1;i.hasNext();){a=i.getNext();!f&&c(s,a)<=0&&(f=!0),f&&o<this.limit_&&c(a,u)<=0?o++:r=r.updateImmediateChild(a.name,at.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(e,r,n)},e.prototype.updatePriority=function(e,t){return e},e.prototype.filtersNodes=function(){return!0},e.prototype.getIndexedFilter=function(){return this.rangedFilter_.getIndexedFilter()},e.prototype.getIndex=function(){return this.index_},e.prototype.fullLimitUpdateChild_=function(e,t,n,r,i){var a;if(this.reverse_){var s=this.index_.getCompare();a=function(e,t){return s(t,e)}}else a=this.index_.getCompare();var u=e;Object(o.assert)(u.numChildren()===this.limit_,"");var c=new Me(t,n),l=this.reverse_?u.getFirstChild(this.index_):u.getLastChild(this.index_),f=this.rangedFilter_.matches(c);if(u.hasChild(t)){for(var h=u.getImmediateChild(t),d=r.getChildAfterChild(this.index_,l,this.reverse_);null!=d&&(d.name===t||u.hasChild(d.name));)d=r.getChildAfterChild(this.index_,d,this.reverse_);var p=null==d?1:a(d,c);if(f&&!n.isEmpty()&&p>=0)return null!=i&&i.trackChildChange(yt(t,n,h)),u.updateImmediateChild(t,n);null!=i&&i.trackChildChange(mt(t,h));var g=u.updateImmediateChild(t,at.EMPTY_NODE);return null!=d&&this.rangedFilter_.matches(d)?(null!=i&&i.trackChildChange(vt(d.name,d.node)),g.updateImmediateChild(d.name,d.node)):g}return n.isEmpty()?e:f&&a(l,c)>=0?(null!=i&&(i.trackChildChange(mt(l.name,l.node)),i.trackChildChange(vt(t,n))),u.updateImmediateChild(t,n).updateImmediateChild(l.name,at.EMPTY_NODE)):e},e}(),kt=function(){function e(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.startAfterSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.endBeforeSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=et}return e.prototype.hasStart=function(){return this.startSet_},e.prototype.hasStartAfter=function(){return this.startAfterSet_},e.prototype.hasEndBefore=function(){return this.endBeforeSet_},e.prototype.isViewFromLeft=function(){return""===this.viewFrom_?this.startSet_:"l"===this.viewFrom_},e.prototype.getIndexStartValue=function(){return Object(o.assert)(this.startSet_,"Only valid if start has been set"),this.indexStartValue_},e.prototype.getIndexStartName=function(){return Object(o.assert)(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:C},e.prototype.hasEnd=function(){return this.endSet_},e.prototype.getIndexEndValue=function(){return Object(o.assert)(this.endSet_,"Only valid if end has been set"),this.indexEndValue_},e.prototype.getIndexEndName=function(){return Object(o.assert)(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:O},e.prototype.hasLimit=function(){return this.limitSet_},e.prototype.hasAnchoredLimit=function(){return this.limitSet_&&""!==this.viewFrom_},e.prototype.getLimit=function(){return Object(o.assert)(this.limitSet_,"Only valid if limit has been set"),this.limit_},e.prototype.getIndex=function(){return this.index_},e.prototype.loadsAllData=function(){return!(this.startSet_||this.endSet_||this.limitSet_)},e.prototype.isDefault=function(){return this.loadsAllData()&&this.index_===et},e.prototype.copy=function(){var t=new e;return t.limitSet_=this.limitSet_,t.limit_=this.limit_,t.startSet_=this.startSet_,t.indexStartValue_=this.indexStartValue_,t.startNameSet_=this.startNameSet_,t.indexStartName_=this.indexStartName_,t.endSet_=this.endSet_,t.indexEndValue_=this.indexEndValue_,t.endNameSet_=this.endNameSet_,t.indexEndName_=this.indexEndName_,t.index_
2=this.index_,t.viewFrom_=this.viewFrom_,t},e}();function Et(e,t,n){var r=e.copy();return r.startSet_=!0,void 0===t&&(t=null),r.indexStartValue_=t,null!=n?(r.startNameSet_=!0,r.indexStartName_=n):(r.startNameSet_=!1,r.indexStartName_=""),r}function St(e,t,n){var r=e.copy();return r.endSet_=!0,void 0===t&&(t=null),r.indexEndValue_=t,void 0!==n?(r.endNameSet_=!0,r.indexEndName_=n):(r.endNameSet_=!1,r.indexEndName_=""),r}function It(e,t){var n=e.copy();return n.index_=t,n}function xt(e){var t,n={};return e.isDefault()||(e.index_===et?t="$priority":e.index_===lt?t="$value":e.index_===Ue?t="$key":(Object(o.assert)(e.index_ instanceof ct,"Unrecognized index type!"),t=e.index_.toString()),n.orderBy=Object(o.stringify)(t),e.startSet_&&(n.startAt=Object(o.stringify)(e.indexStartValue_),e.startNameSet_&&(n.startAt+=","+Object(o.stringify)(e.indexStartName_))),e.endSet_&&(n.endAt=Object(o.stringify)(e.indexEndValue_),e.endNameSet_&&(n.endAt+=","+Object(o.stringify)(e.indexEndName_))),e.limitSet_&&(e.isViewFromLeft()?n.limitToFirst=e.limit_:n.limitToLast=e.limit_)),n}function Tt(e){var t={};if(e.startSet_&&(t.sp=e.indexStartValue_,e.startNameSet_&&(t.sn=e.indexStartName_)),e.endSet_&&(t.ep=e.indexEndValue_,e.endNameSet_&&(t.en=e.indexEndName_)),e.limitSet_){t.l=e.limit_;var n=e.viewFrom_;""===n&&(n=e.isViewFromLeft()?"l":"r"),t.vf=n}return e.index_!==et&&(t.i=e.index_.toString()),t}var Ct=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.repoInfo_=t,o.onDataUpdate_=n,o.authTokenProvider_=r,o.appCheckTokenProvider_=i,o.log_=E("p:rest:"),o.listens_={},o}return Object(a.__extends)(t,e),t.prototype.reportStats=function(e){throw new Error("Method not implemented.")},t.getListenId_=function(e,t){return void 0!==t?"tag$"+t:(Object(o.assert)(e._queryParams.isDefault(),"should have a tag if it's not a default query."),e._path.toString())},t.prototype.listen=function(e,n,r,i){var a=this,s=e._path.toString();this.log_("Listen called for "+s+" "+e._queryIdentifier);var u=t.getListenId_(e,r),c={};this.listens_[u]=c;var l=xt(e._queryParams);this.restRequest_(s+".json",l,(function(e,t){var n=t;(404===e&&(n=null,e=null),null===e&&a.onDataUpdate_(s,n,!1,r),Object(o.safeGet)(a.listens_,u)===c)&&i(e?401===e?"permission_denied":"rest_error:"+e:"ok",null)}))},t.prototype.unlisten=function(e,n){var r=t.getListenId_(e,n);delete this.listens_[r]},t.prototype.get=function(e){var t=this,n=xt(e._queryParams),r=e._path.toString(),i=new o.Deferred;return this.restRequest_(r+".json",n,(function(e,n){var o=n;404===e&&(o=null,e=null),null===e?(t.onDataUpdate_(r,o,!1,null),i.resolve(o)):i.reject(new Error(o))})),i.promise},t.prototype.refreshAuthToken=function(e){},t.prototype.restRequest_=function(e,t,n){var r=this;return void 0===t&&(t={}),t.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then((function(i){var s=Object(a.__read)(i,2),u=s[0],c=s[1];u&&u.accessToken&&(t.auth=u.accessToken),c&&c.token&&(t.ac=c.token);var l=(r.repoInfo_.secure?"https://":"http://")+r.repoInfo_.host+e+"?ns="+r.repoInfo_.namespace+Object(o.querystring)(t);r.log_("Sending REST request for "+l);var f=new XMLHttpRequest;f.onreadystatechange=function(){if(n&&4===f.readyState){r.log_("REST Response for "+l+" received. status:",f.status,"response:",f.responseText);var e=null;if(f.status>=200&&f.status<300){try{e=Object(o.jsonEval)(f.responseText)}catch(t){x("Failed to parse JSON response for "+l+": "+f.responseText)}n(null,e)}else 401!==f.status&&404!==f.status&&x("Got unsuccessful REST response for "+l+" Status: "+f.status),n(f.status);n=null}},f.open("GET",l,!0),f.send()}))},t}(fe),Ot=function(){function e(){this.rootNode_=at.EMPTY_NODE}return e.prototype.getNode=function(e){return this.rootNode_.getChild(e)},e.prototype.updateSnapshot=function(e,t){this.rootNode_=this.rootNode_.updateChild(e,t)},e}();function At(){return{value:null,children:new Map}}function Nt(e,t,n){if(Ee(t))e.value=n,e.children.clear();else if(null!==e.value)e.value=e.value.updateChild(t,n);else{var r=ve(t);e.children.has(r)||e.children.set(r,At()),Nt(e.children.get(r),t=ye(t),n)}}function Pt(e,t){if(Ee(t))return e.value=null,e.children.clear(),!0;if(null!==e.value){if(e.value.isLeafNode())return!1;var n=e.value;
2return e.value=null,n.forEachChild(et,(function(t,n){Nt(e,new pe(t),n)})),Pt(e,t)}if(e.children.size>0){var r=ve(t);if(t=ye(t),e.children.has(r))Pt(e.children.get(r),t)&&e.children.delete(r);return 0===e.children.size}return!0}function Rt(e,t,n){null!==e.value?n(t,e.value):function(e,t){e.children.forEach((function(e,n){t(n,e)}))}(e,(function(e,r){Rt(r,new pe(t.toString()+"/"+e),n)}))}var jt,Dt=function(){function e(e){this.collection_=e,this.last_=null}return e.prototype.get=function(){var e=this.collection_.get(),t=Object(a.__assign)({},e);return this.last_&&D(this.last_,(function(e,n){t[e]=t[e]-n})),this.last_=e,t},e}(),Mt=function(){function e(e,t){this.server_=t,this.statsToReport_={},this.statsListener_=new Dt(e);var n=1e4+2e4*Math.random();q(this.reportStats_.bind(this),Math.floor(n))}return e.prototype.reportStats_=function(){var e=this,t=this.statsListener_.get(),n={},r=!1;D(t,(function(t,i){i>0&&Object(o.contains)(e.statsToReport_,t)&&(n[t]=i,r=!0)})),r&&this.server_.reportStats(n),q(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))},e}();function Lt(e){return{fromUser:!1,fromServer:!0,queryId:e,tagged:!0}}!function(e){e[e.OVERWRITE=0]="OVERWRITE",e[e.MERGE=1]="MERGE",e[e.ACK_USER_WRITE=2]="ACK_USER_WRITE",e[e.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(jt||(jt={}));var Ft,Ut=function(){function e(e,t,n){this.path=e,this.affectedTree=t,this.revert=n,this.type=jt.ACK_USER_WRITE,this.source={fromUser:!0,fromServer:!1,queryId:null,tagged:!1}}return e.prototype.operationForChild=function(t){if(Ee(this.path)){if(null!=this.affectedTree.value)return Object(o.assert)(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new pe(t));return new e(ge(),n,this.revert)}return Object(o.assert)(ve(this.path)===t,"operationForChild called for unrelated child."),new e(ye(this.path),this.affectedTree,this.revert)},e}(),Vt=function(){function e(e,t){this.source=e,this.path=t,this.type=jt.LISTEN_COMPLETE}return e.prototype.operationForChild=function(t){return Ee(this.path)?new e(this.source,ge()):new e(this.source,ye(this.path))},e}(),Bt=function(){function e(e,t,n){this.source=e,this.path=t,this.snap=n,this.type=jt.OVERWRITE}return e.prototype.operationForChild=function(t){return Ee(this.path)?new e(this.source,ge(),this.snap.getImmediateChild(t)):new e(this.source,ye(this.path),this.snap)},e}(),qt=function(){function e(e,t,n){this.source=e,this.path=t,this.children=n,this.type=jt.MERGE}return e.prototype.operationForChild=function(t){if(Ee(this.path)){var n=this.children.subtree(new pe(t));return n.isEmpty()?null:n.value?new Bt(this.source,ge(),n.value):new e(this.source,ge(),n)}return Object(o.assert)(ve(this.path)===t,"Can't get a merge for a child not on the path of the operation"),new e(this.source,ye(this.path),this.children)},e.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"},e}(),zt=function(){function e(e,t,n){this.node_=e,this.fullyInitialized_=t,this.filtered_=n}return e.prototype.isFullyInitialized=function(){return this.fullyInitialized_},e.prototype.isFiltered=function(){return this.filtered_},e.prototype.isCompleteForPath=function(e){if(Ee(e))return this.isFullyInitialized()&&!this.filtered_;var t=ve(e);return this.isCompleteForChild(t)},e.prototype.isCompleteForChild=function(e){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(e)},e.prototype.getNode=function(){return this.node_},e}(),Ht=function(e){this.query_=e,this.index_=this.query_._queryParams.getIndex()};function Kt(e,t,n,r,i,a){var s=r.filter((function(e){return e.type===n}));s.sort((function(t,n){return function(e,t,n){if(null==t.childName||null==n.childName)throw Object(o.assertionError)("Should only compare child_ events.");var r=new Me(t.childName,t.snapshotNode),i=new Me(n.childName,n.snapshotNode);return e.index_.compare(r,i)}(e,t,n)})),s.forEach((function(n){var r=function(e,t,n){return"value"===t.type||"child_removed"===t.type||(t.prevName=n.getPredecessorChildName(t.childName,t.snapshotNode,e.index_)),t}(e,n,a);
2i.forEach((function(i){i.respondsTo(n.type)&&t.push(i.createEvent(r,e.query_))}))}))}function Wt(e,t){return{eventCache:e,serverCache:t}}function Gt(e,t,n,r){return Wt(new zt(t,n,r),e.serverCache)}function Yt(e,t,n,r){return Wt(e.eventCache,new zt(t,n,r))}function $t(e){return e.eventCache.isFullyInitialized()?e.eventCache.getNode():null}function Qt(e){return e.serverCache.isFullyInitialized()?e.serverCache.getNode():null}var Xt=function(){function e(e,t){void 0===t&&(Ft||(Ft=new ze(N)),t=Ft),this.value=e,this.children=t}return e.fromObject=function(t){var n=new e(null);return D(t,(function(e,t){n=n.set(new pe(e),t)})),n},e.prototype.isEmpty=function(){return null===this.value&&this.children.isEmpty()},e.prototype.findRootMostMatchingPathAndValue=function(e,t){if(null!=this.value&&t(this.value))return{path:ge(),value:this.value};if(Ee(e))return null;var n=ve(e),r=this.children.get(n);if(null!==r){var i=r.findRootMostMatchingPathAndValue(ye(e),t);return null!=i?{path:ke(new pe(n),i.path),value:i.value}:null}return null},e.prototype.findRootMostValueAndPath=function(e){return this.findRootMostMatchingPathAndValue(e,(function(){return!0}))},e.prototype.subtree=function(t){if(Ee(t))return this;var n=ve(t),r=this.children.get(n);return null!==r?r.subtree(ye(t)):new e(null)},e.prototype.set=function(t,n){if(Ee(t))return new e(n,this.children);var r=ve(t),i=(this.children.get(r)||new e(null)).set(ye(t),n),o=this.children.insert(r,i);return new e(this.value,o)},e.prototype.remove=function(t){if(Ee(t))return this.children.isEmpty()?new e(null):new e(null,this.children);var n=ve(t),r=this.children.get(n);if(r){var i=r.remove(ye(t)),o=void 0;return o=i.isEmpty()?this.children.remove(n):this.children.insert(n,i),null===this.value&&o.isEmpty()?new e(null):new e(this.value,o)}return this},e.prototype.get=function(e){if(Ee(e))return this.value;var t=ve(e),n=this.children.get(t);return n?n.get(ye(e)):null},e.prototype.setTree=function(t,n){if(Ee(t))return n;var r=ve(t),i=(this.children.get(r)||new e(null)).setTree(ye(t),n),o=void 0;return o=i.isEmpty()?this.children.remove(r):this.children.insert(r,i),new e(this.value,o)},e.prototype.fold=function(e){return this.fold_(ge(),e)},e.prototype.fold_=function(e,t){var n={};return this.children.inorderTraversal((function(r,i){n[r]=i.fold_(ke(e,r),t)})),t(e,this.value,n)},e.prototype.findOnPath=function(e,t){return this.findOnPath_(e,ge(),t)},e.prototype.findOnPath_=function(e,t,n){var r=!!this.value&&n(t,this.value);if(r)return r;if(Ee(e))return null;var i=ve(e),o=this.children.get(i);return o?o.findOnPath_(ye(e),ke(t,i),n):null},e.prototype.foreachOnPath=function(e,t){return this.foreachOnPath_(e,ge(),t)},e.prototype.foreachOnPath_=function(t,n,r){if(Ee(t))return this;this.value&&r(n,this.value);var i=ve(t),o=this.children.get(i);return o?o.foreachOnPath_(ye(t),ke(n,i),r):new e(null)},e.prototype.foreach=function(e){this.foreach_(ge(),e)},e.prototype.foreach_=function(e,t){this.children.inorderTraversal((function(n,r){r.foreach_(ke(e,n),t)})),this.value&&t(e,this.value)},e.prototype.foreachChild=function(e){this.children.inorderTraversal((function(t,n){n.value&&e(t,n.value)}))},e}(),Jt=function(){function e(e){this.writeTree_=e}return e.empty=function(){return new e(new Xt(null))},e}();function Zt(e,t,n){if(Ee(t))return new Jt(new Xt(n));var r=e.writeTree_.findRootMostValueAndPath(t);if(null!=r){var i=r.path,o=r.value,a=Se(i,t);return o=o.updateChild(a,n),new Jt(e.writeTree_.set(i,o))}var s=new Xt(n),u=e.writeTree_.setTree(t,s);return new Jt(u)}function en(e,t,n){var r=e;return D(n,(function(e,n){r=Zt(r,ke(t,e),n)})),r}function tn(e,t){if(Ee(t))return Jt.empty();var n=e.writeTree_.setTree(t,new Xt(null));return new Jt(n)}function nn(e,t){return null!=rn(e,t)}function rn(e,t){var n=e.writeTree_.findRootMostValueAndPath(t);return null!=n?e.writeTree_.get(n.path).getChild(Se(n.path,t)):null}function on(e){var t=[],n=e.writeTree_.value;return null!=n?n.isLeafNode()||n.forEachChild(et,(function(e,n){t.push(new Me(e,n))}
2)):e.writeTree_.children.inorderTraversal((function(e,n){null!=n.value&&t.push(new Me(e,n.value))})),t}function an(e,t){if(Ee(t))return e;var n=rn(e,t);return new Jt(null!=n?new Xt(n):e.writeTree_.subtree(t))}function sn(e){return e.writeTree_.isEmpty()}function un(e,t){return cn(ge(),e.writeTree_,t)}function cn(e,t,n){if(null!=t.value)return n.updateChild(e,t.value);var r=null;return t.children.inorderTraversal((function(t,i){".priority"===t?(Object(o.assert)(null!==i.value,"Priority writes must always be leaf nodes"),r=i.value):n=cn(ke(e,t),i,n)})),n.getChild(e).isEmpty()||null===r||(n=n.updateChild(ke(e,".priority"),r)),n}function ln(e,t){return En(t,e)}function fn(e,t){var n=e.allWrites.findIndex((function(e){return e.writeId===t}));Object(o.assert)(n>=0,"removeWrite called with nonexistent writeId.");var r=e.allWrites[n];e.allWrites.splice(n,1);for(var i=r.visible,a=!1,s=e.allWrites.length-1;i&&s>=0;){var u=e.allWrites[s];u.visible&&(s>=n&&hn(u,r.path)?i=!1:Te(r.path,u.path)&&(a=!0)),s--}if(i){if(a)return function(e){e.visibleWrites=pn(e.allWrites,dn,ge()),e.allWrites.length>0?e.lastWriteId=e.allWrites[e.allWrites.length-1].writeId:e.lastWriteId=-1}(e),!0;r.snap?e.visibleWrites=tn(e.visibleWrites,r.path):D(r.children,(function(t){e.visibleWrites=tn(e.visibleWrites,ke(r.path,t))}));return!0}return!1}function hn(e,t){if(e.snap)return Te(e.path,t);for(var n in e.children)if(e.children.hasOwnProperty(n)&&Te(ke(e.path,n),t))return!0;return!1}function dn(e){return e.visible}function pn(e,t,n){for(var r=Jt.empty(),i=0;i<e.length;++i){var a=e[i];if(t(a)){var s=a.path,u=void 0;if(a.snap)Te(n,s)?r=Zt(r,u=Se(n,s),a.snap):Te(s,n)&&(u=Se(s,n),r=Zt(r,ge(),a.snap.getChild(u)));else{if(!a.children)throw Object(o.assertionError)("WriteRecord should have .snap or .children");if(Te(n,s))r=en(r,u=Se(n,s),a.children);else if(Te(s,n))if(Ee(u=Se(s,n)))r=en(r,ge(),a.children);else{var c=Object(o.safeGet)(a.children,ve(u));if(c){var l=c.getChild(ye(u));r=Zt(r,ge(),l)}}}}}return r}function gn(e,t,n,r,i){if(r||i){var o=an(e.visibleWrites,t);if(!i&&sn(o))return n;if(i||null!=n||nn(o,ge())){return un(pn(e.allWrites,(function(e){return(e.visible||i)&&(!r||!~r.indexOf(e.writeId))&&(Te(e.path,t)||Te(t,e.path))}),t),n||at.EMPTY_NODE)}return null}var a=rn(e.visibleWrites,t);if(null!=a)return a;var s=an(e.visibleWrites,t);return sn(s)?n:null!=n||nn(s,ge())?un(s,n||at.EMPTY_NODE):null}function vn(e,t,n,r){return gn(e.writeTree,e.treePath,t,n,r)}function mn(e,t){return function(e,t,n){var r=at.EMPTY_NODE,i=rn(e.visibleWrites,t);if(i)return i.isLeafNode()||i.forEachChild(et,(function(e,t){r=r.updateImmediateChild(e,t)})),r;if(n){var o=an(e.visibleWrites,t);return n.forEachChild(et,(function(e,t){var n=un(an(o,new pe(e)),t);r=r.updateImmediateChild(e,n)})),on(o).forEach((function(e){r=r.updateImmediateChild(e.name,e.node)})),r}
2return on(an(e.visibleWrites,t)).forEach((function(e){r=r.updateImmediateChild(e.name,e.node)})),r}(e.writeTree,e.treePath,t)}function yn(e,t,n,r){return function(e,t,n,r,i){Object(o.assert)(r||i,"Either existingEventSnap or existingServerSnap must exist");var a=ke(t,n);if(nn(e.visibleWrites,a))return null;var s=an(e.visibleWrites,a);return sn(s)?i.getChild(n):un(s,i.getChild(n))}(e.writeTree,e.treePath,t,n,r)}function bn(e,t){return function(e,t){return rn(e.visibleWrites,t)}(e.writeTree,ke(e.treePath,t))}function _n(e,t,n,r,i,o){return function(e,t,n,r,i,o,a){var s,u=an(e.visibleWrites,t),c=rn(u,ge());if(null!=c)s=c;else{if(null==n)return[];s=un(u,n)}if((s=s.withIndex(a)).isEmpty()||s.isLeafNode())return[];for(var l=[],f=a.getCompare(),h=o?s.getReverseIteratorFrom(r,a):s.getIteratorFrom(r,a),d=h.getNext();d&&l.length<i;)0!==f(d,r)&&l.push(d),d=h.getNext();return l}(e.writeTree,e.treePath,t,n,r,i,o)}function wn(e,t,n){return function(e,t,n,r){var i=ke(t,n),o=rn(e.visibleWrites,i);return null!=o?o:r.isCompleteForChild(n)?un(an(e.visibleWrites,i),r.getNode().getImmediateChild(n)):null}(e.writeTree,e.treePath,t,n)}function kn(e,t){return En(ke(e.treePath,t),e.writeTree)}function En(e,t){return{treePath:e,writeTree:t}}var Sn=function(){function e(){this.changeMap=new Map}return e.prototype.trackChildChange=function(e){var t=e.type,n=e.childName;Object(o.assert)("child_added"===t||"child_changed"===t||"child_removed"===t,"Only child changes supported for tracking"),Object(o.assert)(".priority"!==n,"Only non-priority child changes can be tracked.");var r=this.changeMap.get(n);if(r){var i=r.type;if("child_added"===t&&"child_removed"===i)this.changeMap.set(n,yt(n,e.snapshotNode,r.snapshotNode));else if("child_removed"===t&&"child_added"===i)this.changeMap.delete(n);else if("child_removed"===t&&"child_changed"===i)this.changeMap.set(n,mt(n,r.oldSnap));else if("child_changed"===t&&"child_added"===i)this.changeMap.set(n,vt(n,e.snapshotNode));else{if("child_changed"!==t||"child_changed"!==i)throw Object(o.assertionError)("Illegal combination of changes: "+e+" occurred after "+r);this.changeMap.set(n,yt(n,e.snapshotNode,r.oldSnap))}}else this.changeMap.set(n,e)},e.prototype.getChanges=function(){return Array.from(this.changeMap.values())},e}(),In=new(function(){function e(){}return e.prototype.getCompleteChild=function(e){return null},e.prototype.getChildAfterChild=function(e,t,n){return null},e}()),xn=function(){function e(e,t,n){void 0===n&&(n=null),this.writes_=e,this.viewCache_=t,this.optCompleteServerCache_=n}return e.prototype.getCompleteChild=function(e){var t=this.viewCache_.eventCache;if(t.isCompleteForChild(e))return t.getNode().getImmediateChild(e);var n=null!=this.optCompleteServerCache_?new zt(this.optCompleteServerCache_,!0,!1):this.viewCache_.serverCache;return wn(this.writes_,e,n)},e.prototype.getChildAfterChild=function(e,t,n){var r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:Qt(this.viewCache_),i=_n(this.writes_,r,t,1,n,e);return 0===i.length?null:i[0]},e}();function Tn(e,t,n,r,i){var a,s,u=new Sn;if(n.type===jt.OVERWRITE){var c=n;c.source.fromUser?a=An(e,t,c.path,c.snap,r,i,u):(Object(o.assert)(c.source.fromServer,"Unknown source."),s=c.source.tagged||t.serverCache.isFiltered()&&!Ee(c.path),a=On(e,t,c.path,c.snap,r,i,s,u))}else if(n.type===jt.MERGE){var l=n;l.source.fromUser?a=function(e,t,n,r,i,o,a){var s=t;return r.foreach((function(r,u){var c=ke(n,r);Nn(t,ve(c))&&(s=An(e,s,c,u,i,o,a))})),r.foreach((function(r,u){var c=ke(n,r);Nn(t,ve(c))||(s=An(e,s,c,u,i,o,a))})),s}(e,t,l.path,l.children,r,i,u):(Object(o.assert)(l.source.fromServer,"Unknown source."),s=l.source.tagged||t.serverCache.isFiltered(),a=Rn(e,t,l.path,l.children,r,i,s,u))}else if(n.type===jt.ACK_USER_WRITE){var f=n;a=f.revert?function(e,t,n,r,i,a){var s;if(null!=bn(r,n))return t;var u=new xn(r,t,i),c=t.eventCache.getNode(),l=void 0;if(Ee(n)||".priority"===ve(n)){var f=void 0;if(t.serverCache.isFullyInitialized())f=vn(r,Qt(t));else{var h=t.serverCache.getNode();Object(o.assert)(h instanceof at,"serverChildren would be complete if leaf node"),f=mn(r,h)}f=f,l=e.filter.updateFullNode(c,f,a)}else{var d=ve(n),p=wn(r,d,t.serverCache);null==p&&t.serverCache.isCompleteForChild(d)&&(p=c.getImmediateChild(d)),(l=null!=p?e.filter.updateChild(c,d,p,ye(n),u,a):t.eventCache.getNode().hasChild(d)?e.filter.updateChild(c,d,at.EMPTY_NODE,ye(n),u,a):c).isEmpty()&&t.serverCache.isFullyInitialized()&&(s=vn(r,Qt(t))).isLeafNode()&&(l=e.filter.updateFullNode(l,s,a))}return s=t.serverCache.isFullyInitialized()||null!=bn(r,ge()),Gt(t,l,s,e.filter.filtersNodes())}(e,t,f.path,r,i,u):function(e,t,n,r,i,o,a){if(null!=bn(i,n))return t;var s=t.serverCache.isFiltered(),u=t.serverCache;
2if(null!=r.value){if(Ee(n)&&u.isFullyInitialized()||u.isCompleteForPath(n))return On(e,t,n,u.getNode().getChild(n),i,o,s,a);if(Ee(n)){var c=new Xt(null);return u.getNode().forEachChild(Ue,(function(e,t){c=c.set(new pe(e),t)})),Rn(e,t,n,c,i,o,s,a)}return t}var l=new Xt(null);return r.foreach((function(e,t){var r=ke(n,e);u.isCompleteForPath(r)&&(l=l.set(e,u.getNode().getChild(r)))})),Rn(e,t,n,l,i,o,s,a)}(e,t,f.path,f.affectedTree,r,i,u)}else{if(n.type!==jt.LISTEN_COMPLETE)throw Object(o.assertionError)("Unknown operation type: "+n.type);a=function(e,t,n,r,i){var o=t.serverCache,a=Yt(t,o.getNode(),o.isFullyInitialized()||Ee(n),o.isFiltered());return Cn(e,a,n,r,In,i)}(e,t,n.path,r,u)}var h=u.getChanges();return function(e,t,n){var r=t.eventCache;if(r.isFullyInitialized()){var i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=$t(e);(n.length>0||!e.eventCache.isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(gt($t(t)))}}(t,a,h),{viewCache:a,changes:h}}function Cn(e,t,n,r,i,a){var s=t.eventCache;if(null!=bn(r,n))return t;var u=void 0,c=void 0;if(Ee(n))if(Object(o.assert)(t.serverCache.isFullyInitialized(),"If change path is empty, we must have complete server data"),t.serverCache.isFiltered()){var l=Qt(t),f=mn(r,l instanceof at?l:at.EMPTY_NODE);u=e.filter.updateFullNode(t.eventCache.getNode(),f,a)}else{var h=vn(r,Qt(t));u=e.filter.updateFullNode(t.eventCache.getNode(),h,a)}else{var d=ve(n);if(".priority"===d){Object(o.assert)(1===me(n),"Can't have a priority with additional path components");var p=s.getNode(),g=yn(r,n,p,c=t.serverCache.getNode());u=null!=g?e.filter.updatePriority(p,g):s.getNode()}else{var v=ye(n),m=void 0;if(s.isCompleteForChild(d)){c=t.serverCache.getNode();var y=yn(r,n,s.getNode(),c);m=null!=y?s.getNode().getImmediateChild(d).updateChild(v,y):s.getNode().getImmediateChild(d)}else m=wn(r,d,t.serverCache);u=null!=m?e.filter.updateChild(s.getNode(),d,m,v,i,a):s.getNode()}}return Gt(t,u,s.isFullyInitialized()||Ee(n),e.filter.filtersNodes())}function On(e,t,n,r,i,o,a,s){var u,c=t.serverCache,l=a?e.filter:e.filter.getIndexedFilter();if(Ee(n))u=l.updateFullNode(c.getNode(),r,null);else if(l.filtersNodes()&&!c.isFiltered()){var f=c.getNode().updateChild(n,r);u=l.updateFullNode(c.getNode(),f,null)}else{var h=ve(n);if(!c.isCompleteForPath(n)&&me(n)>1)return t;var d=ye(n),p=c.getNode().getImmediateChild(h).updateChild(d,r);u=".priority"===h?l.updatePriority(c.getNode(),p):l.updateChild(c.getNode(),h,p,d,In,null)}var g=Yt(t,u,c.isFullyInitialized()||Ee(n),l.filtersNodes());return Cn(e,g,n,i,new xn(i,g,o),s)}function An(e,t,n,r,i,o,a){var s,u,c=t.eventCache,l=new xn(i,t,o);if(Ee(n))u=e.filter.updateFullNode(t.eventCache.getNode(),r,a),s=Gt(t,u,!0,e.filter.filtersNodes());else{var f=ve(n);if(".priority"===f)u=e.filter.updatePriority(t.eventCache.getNode(),r),s=Gt(t,u,c.isFullyInitialized(),c.isFiltered());else{var h=ye(n),d=c.getNode().getImmediateChild(f),p=void 0;if(Ee(h))p=r;else{var g=l.getCompleteChild(f);p=null!=g?".priority"===be(h)&&g.getChild(we(h)).isEmpty()?g:g.updateChild(h,r):at.EMPTY_NODE}if(d.equals(p))s=t;else s=Gt(t,e.filter.updateChild(c.getNode(),f,p,h,l,a),c.isFullyInitialized(),e.filter.filtersNodes())}}return s}function Nn(e,t){return e.eventCache.isCompleteForChild(t)}function Pn(e,t,n){return n.foreach((function(e,n){t=t.updateChild(e,n)})),t}
2function Rn(e,t,n,r,i,o,a,s){if(t.serverCache.getNode().isEmpty()&&!t.serverCache.isFullyInitialized())return t;var u,c=t;u=Ee(n)?r:new Xt(null).setTree(n,r);var l=t.serverCache.getNode();return u.children.inorderTraversal((function(n,r){if(l.hasChild(n)){var u=Pn(0,t.serverCache.getNode().getImmediateChild(n),r);c=On(e,c,new pe(n),u,i,o,a,s)}})),u.children.inorderTraversal((function(n,r){var u=!t.serverCache.isCompleteForChild(n)&&void 0===r.value;if(!l.hasChild(n)&&!u){var f=Pn(0,t.serverCache.getNode().getImmediateChild(n),r);c=On(e,c,new pe(n),f,i,o,a,s)}})),c}var jn,Dn=function(){function e(e,t){this.query_=e,this.eventRegistrations_=[];var n,r=this.query_._queryParams,i=new bt(r.getIndex()),o=(n=r).loadsAllData()?new bt(n.getIndex()):n.hasLimit()?new wt(n):new _t(n);this.processor_=function(e){return{filter:e}}(o);var a=t.serverCache,s=t.eventCache,u=i.updateFullNode(at.EMPTY_NODE,a.getNode(),null),c=o.updateFullNode(at.EMPTY_NODE,s.getNode(),null),l=new zt(u,a.isFullyInitialized(),i.filtersNodes()),f=new zt(c,s.isFullyInitialized(),o.filtersNodes());this.viewCache_=Wt(f,l),this.eventGenerator_=new Ht(this.query_)}return Object.defineProperty(e.prototype,"query",{get:function(){return this.query_},enumerable:!1,configurable:!0}),e}();function Mn(e,t){var n=Qt(e.viewCache_);return n&&(e.query._queryParams.loadsAllData()||!Ee(t)&&!n.getImmediateChild(ve(t)).isEmpty())?n.getChild(t):null}function Ln(e){return 0===e.eventRegistrations_.length}function Fn(e,t,n){var r=[];if(n){Object(o.assert)(null==t,"A cancel should cancel all event registrations.");var i=e.query._path;e.eventRegistrations_.forEach((function(e){var t=e.createCancelEvent(n,i);t&&r.push(t)}))}if(t){for(var a=[],s=0;s<e.eventRegistrations_.length;++s){var u=e.eventRegistrations_[s];if(u.matches(t)){if(t.hasAnyCallback()){a=a.concat(e.eventRegistrations_.slice(s+1));break}}else a.push(u)}e.eventRegistrations_=a}else e.eventRegistrations_=[];return r}function Un(e,t,n,r){t.type===jt.MERGE&&null!==t.source.queryId&&(Object(o.assert)(Qt(e.viewCache_),"We should always have a full cache before handling merges"),Object(o.assert)($t(e.viewCache_),"Missing event cache, even though we have a server cache"));var i,a,s=e.viewCache_,u=Tn(e.processor_,s,t,n,r);return i=e.processor_,a=u.viewCache,Object(o.assert)(a.eventCache.getNode().isIndexed(i.filter.getIndex()),"Event snap not indexed"),Object(o.assert)(a.serverCache.getNode().isIndexed(i.filter.getIndex()),"Server snap not indexed"),Object(o.assert)(u.viewCache.serverCache.isFullyInitialized()||!s.serverCache.isFullyInitialized(),"Once a server snap is complete, it should never go back"),e.viewCache_=u.viewCache,Vn(e,u.changes,u.viewCache.eventCache.getNode(),null)}function Vn(e,t,n,r){var i=r?[r]:e.eventRegistrations_;return function(e,t,n,r){var i=[],o=[];return t.forEach((function(t){var n;"child_changed"===t.type&&e.index_.indexedValueChanged(t.oldSnap,t.snapshotNode)&&o.push((n=t.childName,{type:"child_moved",snapshotNode:t.snapshotNode,childName:n}))})),Kt(e,i,"child_removed",t,r,n),Kt(e,i,"child_added",t,r,n),Kt(e,i,"child_moved",o,r,n),Kt(e,i,"child_changed",t,r,n),Kt(e,i,"value",t,r,n),i}(e.eventGenerator_,t,n,i)}var Bn,qn=function(){this.views=new Map};function zn(e,t,n,r){var i,s,u=t.source.queryId;if(null!==u){var c=e.views.get(u);return Object(o.assert)(null!=c,"SyncTree gave us an op for an invalid query."),Un(c,t,n,r)}var l=[];try{for(var f=Object(a.__values)(e.views.values()),h=f.next();!h.done;h=f.next()){c=h.value;l=l.concat(Un(c,t,n,r))}}catch(d){i={error:d}}finally{try{h&&!h.done&&(s=f.return)&&s.call(f)}finally{if(i)throw i.error}}return l}function Hn(e,t,n,r,i){var o=t._queryIdentifier,a=e.views.get(o);if(!a){var s=vn(n,i?r:null),u=!1;s?u=!0:r instanceof at?(s=mn(n,r),u=!1):(s=at.EMPTY_NODE,u=!1);var c=Wt(new zt(s,u,!1),new zt(r,i,!1));return new Dn(t,c)}return a}function Kn(e,t,n,r,i,o){var a=Hn(e,t,r,i,o);return e.views.has(t._queryIdentifier)||e.views.set(t._queryIdentifier,a),function(e,t){e.eventRegistrations_.push(t)}(a,n),function(e,t){var n=e.viewCache_.eventCache,r=[];
2return n.getNode().isLeafNode()||n.getNode().forEachChild(et,(function(e,t){r.push(vt(e,t))})),n.isFullyInitialized()&&r.push(gt(n.getNode())),Vn(e,r,n.getNode(),t)}(a,n)}function Wn(e,t,n,r){var i,s,u=t._queryIdentifier,c=[],l=[],f=Xn(e);if("default"===u)try{for(var h=Object(a.__values)(e.views.entries()),d=h.next();!d.done;d=h.next()){var p=Object(a.__read)(d.value,2),g=p[0],v=p[1];l=l.concat(Fn(v,n,r)),Ln(v)&&(e.views.delete(g),v.query._queryParams.loadsAllData()||c.push(v.query))}}catch(m){i={error:m}}finally{try{d&&!d.done&&(s=h.return)&&s.call(h)}finally{if(i)throw i.error}}else(v=e.views.get(u))&&(l=l.concat(Fn(v,n,r)),Ln(v)&&(e.views.delete(u),v.query._queryParams.loadsAllData()||c.push(v.query)));return f&&!Xn(e)&&c.push(new(Object(o.assert)(jn,"Reference.ts has not been loaded"),jn)(t._repo,t._path)),{removed:c,events:l}}function Gn(e){var t,n,r=[];try{for(var i=Object(a.__values)(e.views.values()),o=i.next();!o.done;o=i.next()){var s=o.value;s.query._queryParams.loadsAllData()||r.push(s)}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function Yn(e,t){var n,r,i=null;try{for(var o=Object(a.__values)(e.views.values()),s=o.next();!s.done;s=o.next()){var u=s.value;i=i||Mn(u,t)}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}function $n(e,t){if(t._queryParams.loadsAllData())return Jn(e);var n=t._queryIdentifier;return e.views.get(n)}function Qn(e,t){return null!=$n(e,t)}function Xn(e){return null!=Jn(e)}function Jn(e){var t,n;try{for(var r=Object(a.__values)(e.views.values()),i=r.next();!i.done;i=r.next()){var o=i.value;if(o.query._queryParams.loadsAllData())return o}}catch(s){t={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return null}var Zn=1,er=function(e){this.listenProvider_=e,this.syncPointTree_=new Xt(null),this.pendingWriteTree_={visibleWrites:Jt.empty(),allWrites:[],lastWriteId:-1},this.tagToQueryMap=new Map,this.queryToTagMap=new Map};function tr(e,t,n,r,i){return function(e,t,n,r,i){Object(o.assert)(r>e.lastWriteId,"Stacking an older write on top of newer ones"),void 0===i&&(i=!0),e.allWrites.push({path:t,snap:n,writeId:r,visible:i}),i&&(e.visibleWrites=Zt(e.visibleWrites,t,n)),e.lastWriteId=r}(e.pendingWriteTree_,t,n,r,i),i?cr(e,new Bt({fromUser:!0,fromServer:!1,queryId:null,tagged:!1},t,n)):[]}function nr(e,t,n,r){!function(e,t,n,r){Object(o.assert)(r>e.lastWriteId,"Stacking an older merge on top of newer ones"),e.allWrites.push({path:t,children:n,writeId:r,visible:!0}),e.visibleWrites=en(e.visibleWrites,t,n),e.lastWriteId=r}(e.pendingWriteTree_,t,n,r);var i=Xt.fromObject(n);return cr(e,new qt({fromUser:!0,fromServer:!1,queryId:null,tagged:!1},t,i))}function rr(e,t,n){void 0===n&&(n=!1);var r=function(e,t){for(var n=0;n<e.allWrites.length;n++){var r=e.allWrites[n];if(r.writeId===t)return r}return null}(e.pendingWriteTree_,t);if(fn(e.pendingWriteTree_,t)){var i=new Xt(null);return null!=r.snap?i=i.set(ge(),!0):D(r.children,(function(e){i=i.set(new pe(e),!0)})),cr(e,new Ut(r.path,i,n))}return[]}function ir(e,t,n){return cr(e,new Bt({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t,n))}function or(e,t,n,r){var i=t._path,o=e.syncPointTree_.get(i),a=[];if(o&&("default"===t._queryIdentifier||Qn(o,t))){var s=Wn(o,t,n,r);0===o.views.size&&(e.syncPointTree_=e.syncPointTree_.remove(i));var u=s.removed;a=s.events;var c=-1!==u.findIndex((function(e){return e._queryParams.loadsAllData()})),l=e.syncPointTree_.findOnPath(i,(function(e,t){return Xn(t)}));if(c&&!l){var f=e.syncPointTree_.subtree(i);if(!f.isEmpty())for(var h=function(e){return e.fold((function(e,t,n){if(t&&Xn(t))return[Jn(t)];var r=[];return t&&(r=Gn(t)),D(n,(function(e,t){r=r.concat(t)})),r}))}(f),d=0;d<h.length;++d){var p=h[d],g=p.query,v=hr(e,p);e.listenProvider_.startListening(yr(g),dr(e,g),v.hashFn,v.onComplete)}}if(!l&&u.length>0&&!r)if(c){e.listenProvider_.stopListening(yr(t),null)}else u.forEach((function(t){var n=e.queryToTagMap.get(pr(t));e.listenProvider_.stopListening(yr(t),n)}));!function(e,t){for(var n=0;n<t.length;++n){var r=t[n];if(!r._queryParams.loadsAllData()){var i=pr(r),o=e.queryToTagMap.get(i);e.queryToTagMap.delete(i),e.tagToQueryMap.delete(o)}}}(e,u)}return a}function ar(e,t,n){var r=t._path,i=null,a=!1;e.syncPointTree_.foreachOnPath(r,(function(e,t){var n=Se(e,r);i=i||Yn(t,n),a=a||Xn(t)}));var s,u=e.syncPointTree_.get(r);(u?(a=a||Xn(u),i=i||Yn(u,ge())):(u=new qn,e.syncPointTree_=e.syncPointTree_.set(r,u)),null!=i)?s=!0:(s=!1,i=at.EMPTY_NODE,e.syncPointTree_.subtree(r).foreachChild((function(e,t){var n=Yn(t,ge());n&&(i=i.updateImmediateChild(e,n))})));var c=Qn(u,t);if(!c&&!t._queryParams.loadsAllData()){var l=pr(t);Object(o.assert)(!e.queryToTagMap.has(l),"View does not exist, but we have a tag");var f=Zn++;e.queryToTagMap.set(l,f),e.tagToQueryMap.set(f,l)}var h=Kn(u,t,n,ln(e.pendingWriteTree_,r),i,s);if(!c&&!a){var d=$n(u,t);h=h.concat(function(e,t,n){var r=t._path,i=dr(e,t),a=hr(e,n),s=e.listenProvi
2der_.startListening(yr(t),i,a.hashFn,a.onComplete),u=e.syncPointTree_.subtree(r);if(i)Object(o.assert)(!Xn(u.value),"If we're adding a query, it shouldn't be shadowed");else for(var c=u.fold((function(e,t,n){if(!Ee(e)&&t&&Xn(t))return[Jn(t).query];var r=[];return t&&(r=r.concat(Gn(t).map((function(e){return e.query})))),D(n,(function(e,t){r=r.concat(t)})),r})),l=0;l<c.length;++l){var f=c[l];e.listenProvider_.stopListening(yr(f),dr(e,f))}return s}(e,t,d))}return h}function sr(e,t,n){var r=e.pendingWriteTree_,i=e.syncPointTree_.findOnPath(t,(function(e,n){var r=Yn(n,Se(e,t));if(r)return r}));return gn(r,t,i,n,!0)}function ur(e,t){var n=t._path,r=null;e.syncPointTree_.foreachOnPath(n,(function(e,t){var i=Se(e,n);r=r||Yn(t,i)}));var i=e.syncPointTree_.get(n);i?r=r||Yn(i,ge()):(i=new qn,e.syncPointTree_=e.syncPointTree_.set(n,i));var o=null!=r,a=o?new zt(r,!0,!1):null;return function(e){return $t(e.viewCache_)}(Hn(i,t,ln(e.pendingWriteTree_,t._path),o?a.getNode():at.EMPTY_NODE,o))}function cr(e,t){return lr(t,e.syncPointTree_,null,ln(e.pendingWriteTree_,ge()))}function lr(e,t,n,r){if(Ee(e.path))return fr(e,t,n,r);var i=t.get(ge());null==n&&null!=i&&(n=Yn(i,ge()));var o=[],a=ve(e.path),s=e.operationForChild(a),u=t.children.get(a);if(u&&s){var c=n?n.getImmediateChild(a):null,l=kn(r,a);o=o.concat(lr(s,u,c,l))}return i&&(o=o.concat(zn(i,e,r,n))),o}function fr(e,t,n,r){var i=t.get(ge());null==n&&null!=i&&(n=Yn(i,ge()));var o=[];return t.children.inorderTraversal((function(t,i){var a=n?n.getImmediateChild(t):null,s=kn(r,t),u=e.operationForChild(t);u&&(o=o.concat(fr(u,i,a,s)))})),i&&(o=o.concat(zn(i,e,r,n))),o}function hr(e,t){var n=t.query,r=dr(e,n);return{hashFn:function(){return(function(e){return e.viewCache_.serverCache.getNode()}(t)||at.EMPTY_NODE).hash()},onComplete:function(t){if("ok"===t)return r?function(e,t,n){var r=gr(e,n);if(r){var i=vr(r),o=i.path,a=i.queryId,s=Se(o,t);return mr(e,o,new Vt(Lt(a),s))}return[]}(e,n._path,r):function(e,t){return cr(e,new Vt({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t))}(e,n._path);var i=function(e,t){var n="Unknown Error";"too_big"===e?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"===e?n="Client doesn't have permission to access the desired data.":"unavailable"===e&&(n="The service is unavailable");var r=new Error(e+" at "+t._path.toString()+": "+n);return r.code=e.toUpperCase(),r}(t,n);return or(e,n,null,i)}}}function dr(e,t){var n=pr(t);return e.queryToTagMap.get(n)}function pr(e){return e._path.toString()+"$"+e._queryIdentifier}function gr(e,t){return e.tagToQueryMap.get(t)}function vr(e){var t=e.indexOf("$");return Object(o.assert)(-1!==t&&t<e.length-1,"Bad queryKey."),{queryId:e.substr(t+1),path:new pe(e.substr(0,t))}}function mr(e,t,n){var r=e.syncPointTree_.get(t);return Object(o.assert)(r,"Missing sync point for query tag that we're tracking"),zn(r,n,ln(e.pendingWriteTree_,t),null)}
2function yr(e){return e._queryParams.loadsAllData()&&!e._queryParams.isDefault()?new(Object(o.assert)(Bn,"Reference.ts has not been loaded"),Bn)(e._repo,e._path):e}var br=function(){function e(e){this.node_=e}return e.prototype.getImmediateChild=function(t){return new e(this.node_.getImmediateChild(t))},e.prototype.node=function(){return this.node_},e}(),_r=function(){function e(e,t){this.syncTree_=e,this.path_=t}return e.prototype.getImmediateChild=function(t){var n=ke(this.path_,t);return new e(this.syncTree_,n)},e.prototype.node=function(){return sr(this.syncTree_,this.path_)},e}(),wr=function(e,t,n){return e&&"object"===typeof e?(Object(o.assert)(".sv"in e,"Unexpected leaf node or priority contents"),"string"===typeof e[".sv"]?kr(e[".sv"],t,n):"object"===typeof e[".sv"]?Er(e[".sv"],t):void Object(o.assert)(!1,"Unexpected server value: "+JSON.stringify(e,null,2))):e},kr=function(e,t,n){switch(e){case"timestamp":return n.timestamp;default:Object(o.assert)(!1,"Unexpected server value: "+e)}},Er=function(e,t,n){e.hasOwnProperty("increment")||Object(o.assert)(!1,"Unexpected server value: "+JSON.stringify(e,null,2));var r=e.increment;"number"!==typeof r&&Object(o.assert)(!1,"Unexpected increment value: "+r);var i=t.node();if(Object(o.assert)(null!==i&&"undefined"!==typeof i,"Expected ChildrenNode.EMPTY_NODE for nulls"),!i.isLeafNode())return r;var a=i.getValue();return"number"!==typeof a?r:a+r},Sr=function(e,t,n,r){return xr(t,new _r(n,e),r)},Ir=function(e,t,n){return xr(e,new br(t),n)};function xr(e,t,n){var r,i=e.getPriority().val(),o=wr(i,t.getImmediateChild(".priority"),n);if(e.isLeafNode()){var a=e,s=wr(a.getValue(),t,n);return s!==a.getValue()||o!==a.getPriority().val()?new Xe(s,ut(o)):e}var u=e;return r=u,o!==u.getPriority().val()&&(r=r.updatePriority(new Xe(o))),u.forEachChild(et,(function(e,i){var o=xr(i,t.getImmediateChild(e),n);o!==i&&(r=r.updateImmediateChild(e,o))})),r}var Tr=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t=null),void 0===n&&(n={children:{},childCount:0}),this.name=e,this.parent=t,this.node=n};function Cr(e,t){for(var n=t instanceof pe?t:new pe(t),r=e,i=ve(n);null!==i;){var a=Object(o.safeGet)(r.node.children,i)||{children:{},childCount:0};r=new Tr(i,r,a),i=ve(n=ye(n))}return r}function Or(e){return e.node.value}function Ar(e,t){e.node.value=t,Dr(e)}function Nr(e){return e.node.childCount>0}function Pr(e,t){D(e.node.children,(function(n,r){t(new Tr(n,e,r))}))}function Rr(e,t,n,r){n&&!r&&t(e),Pr(e,(function(e){Rr(e,t,!0,r)})),n&&r&&t(e)}function jr(e){return new pe(null===e.parent?e.name:jr(e.parent)+"/"+e.name)}function Dr(e){null!==e.parent&&function(e,t,n){var r=function(e){return void 0===Or(e)&&!Nr(e)}(n),i=Object(o.contains)(e.node.children,t);r&&i?(delete e.node.children[t],e.node.childCount--,Dr(e)):r||i||(e.node.children[t]=n.node,e.node.childCount++,Dr(e))}(e.parent,e.name,e)}var Mr=/[\[\].#$\/\u0000-\u001F\u007F]/,Lr=/[\[\].#$\u0000-\u001F\u007F]/,Fr=10485760,Ur=function(e){return"string"===typeof e&&0!==e.length&&!Mr.test(e)},Vr=function(e){return"string"===typeof e&&0!==e.length&&!Lr.test(e)},Br=function(e){return null===e||"string"===typeof e||"number"===typeof e&&!T(e)||e&&"object"===typeof e&&Object(o.contains)(e,".sv")},qr=function(e,t,n,r){r&&void 0===t||zr(Object(o.errorPrefix)(e,"value"),t,n)},zr=function e(t,n,r){var i=r instanceof pe?new Ce(r,t):r;if(void 0===n)throw new Error(t+"contains undefined "+Ae(i));if("function"===typeof n)throw new Error(t+"contains a function "+Ae(i)+" with contents = "+n.toString());if(T(n))throw new Error(t+"contains "+n.toString()+" "+Ae(i));if("string"===typeof n&&n.length>Fr/3&&Object(o.stringLength)(n)>Fr)throw new Error(t+"contains a string greater than "+"10485760 utf8 bytes "+Ae(i)+" ('"+n.substring(0,50)+"...')");if(n&&"object"===typeof n){var a=!1,s=!1;if(D(n,(function(n,r){if(".value"===n)a=!0;else if(".priority"!==n&&".sv"!==n&&(s=!0,!Ur(n)))throw new Error(t+" contains an invalid key ("+n+") "+Ae(i)+'.  Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');!function(e,t){e.parts_.length>0&&(e.byteLength_+=1),e.parts_.push(t),e.byteLength_+=Object(o.stringLength)(t),Oe(e)}(i,n),e(t,r,i),function(e){var t=e.parts_.pop();e.byteLength_-=Object(o.stringLength)(t),e.parts_.length>0&&(e.byteLength_-=1)}(i)})),a&&s)throw new Error(t+' contains ".value" child '+Ae(i)+" in addition to actual children.")}},Hr=function(e,t,n,r){if(!r||void 0!==t){var i=Object(o.errorPrefix)(e,"values");if(!t||"object"!==typeof t||Array.isArray(t))throw new Error(i+" must be an object c
2ontaining the children to replace.");var a=[];D(t,(function(e,t){var r=new pe(e);if(zr(i,t,ke(n,r)),".priority"===be(r)&&!Br(t))throw new Error(i+"contains an invalid value for '"+r.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");a.push(r)})),function(e,t){var n,r;for(n=0;n<t.length;n++)for(var i=_e(r=t[n]),o=0;o<i.length;o++)if(".priority"===i[o]&&o===i.length-1);else if(!Ur(i[o]))throw new Error(e+"contains an invalid key ("+i[o]+") in path "+r.toString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');t.sort(Ie);var a=null;for(n=0;n<t.length;n++){if(r=t[n],null!==a&&Te(a,r))throw new Error(e+"contains a path "+a.toString()+" that is ancestor of another path "+r.toString());a=r}}(i,a)}},Kr=function(e,t,n){if(!n||void 0!==t){if(T(t))throw new Error(Object(o.errorPrefix)(e,"priority")+"is "+t.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!Br(t))throw new Error(Object(o.errorPrefix)(e,"priority")+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},Wr=function(e,t,n){if(!n||void 0!==t)switch(t){case"value":case"child_added":case"child_removed":case"child_changed":case"child_moved":break;default:throw new Error(Object(o.errorPrefix)(e,"eventType")+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}},Gr=function(e,t,n,r){if((!r||void 0!==n)&&!Ur(n))throw new Error(Object(o.errorPrefix)(e,t)+'was an invalid key = "'+n+'".  Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").')},Yr=function(e,t,n,r){if((!r||void 0!==n)&&!Vr(n))throw new Error(Object(o.errorPrefix)(e,t)+'was an invalid path = "'+n+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},$r=function(e,t){if(".info"===ve(t))throw new Error(e+" failed = Can't modify data under /.info/")},Qr=function(e,t){var n=t.path.toString();if("string"!==typeof t.repoInfo.host||0===t.repoInfo.host.length||!Ur(t.repoInfo.namespace)&&"localhost"!==t.repoInfo.host.split(":")[0]||0!==n.length&&!function(e){return e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),Vr(e)}(n))throw new Error(Object(o.errorPrefix)(e,"url")+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')},Xr=function(e,t,n,r){if((!r||void 0!==n)&&"boolean"!==typeof n)throw new Error(Object(o.errorPrefix)(e,t)+"must be a boolean.")},Jr=function(){this.eventLists_=[],this.recursionDepth_=0};function Zr(e,t){for(var n=null,r=0;r<t.length;r++){var i=t[r],o=i.getPath();null===n||xe(o,n.path)||(e.eventLists_.push(n),n=null),null===n&&(n={events:[],path:o}),n.events.push(i)}n&&e.eventLists_.push(n)}function ei(e,t,n){Zr(e,n),ni(e,(function(e){return xe(e,t)}))}function ti(e,t,n){Zr(e,n),ni(e,(function(e){return Te(e,t)||Te(t,e)}))}function ni(e,t){e.recursionDepth_++;for(var n=!0,r=0;r<e.eventLists_.length;r++){var i=e.eventLists_[r];if(i)t(i.path)?(ri(e.eventLists_[r]),e.eventLists_[r]=null):n=!1}n&&(e.eventLists_=[]),e.recursionDepth_--}function ri(e){for(var t=0;t<e.events.length;t++){var n=e.events[t];if(null!==n){e.events[t]=null;var r=n.getEventRunner();b&&k("event: "+n.toString()),B(r)}}}var ii="repo_interrupt",oi=function(){function e(e,t,n,r){this.repoInfo_=e,this.forceRestClient_=t,this.authTokenProvider_=n,this.appCheckProvider_=r,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new Jr,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=At(),this.transactionQueueTree_=new Tr,this.persistentConnection_=null,this.key=this.repoInfo_.toURLString()}return e.prototype.toString=function(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host},e}();function ai(e,t,n){if(e.stats_=te(e.repoInfo_),e.forceRestClient_||("object"===typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0)e.server_=new Ct(e.repoInfo_,(function(t,n,r,i){ci(e,t,n,r,i)}),e.authTokenProvider_,e.appCheckProvider_),setTimeout((function(){return li(e,!0)}),0);else{if("undefined"!==typeof n&&null!==n){if("object"!==typeof n)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{Object(o.stringify)(n)}catch(r){throw new Error("Invalid authOverride provided: "+r)}}e.persistentConnection_=new De(e.repoInfo_,t,(function(t,n,r,i){ci(e,t,n,r,i)}),(function(t){li(e,t)}),(function(t){!function(e,t){D(t,(function(t,n){fi(e,t,n)}))}(e,t)}),e.authTokenProvider_,e.appCheckProvider_,n),e.server_=e.persistentConnection_}e.authTokenProvider_.addTokenChangeListener((function(t){e.server_.refreshAuthToken(t)})),e.appCheckProvider_.addTokenChangeListener((function(t){e.server_.refreshAppCheckToken(t.token)})),e.statsReporter_=function(e,t){var n=e.toString();return ee[n]||(ee[n]=t()),ee[n]}(e.repoInfo_,(function(){return new Mt(e.stats_,e.server_)})),e.infoData_=new Ot,e.infoSyncTree_=new er({startListening:function(t,n,r,i){var o=[],a=e.infoData_.getNode(t._path);return a.isEmpty()||(o=ir(e.infoSyncTree_,t._path,a),setTimeout((function(){i("ok")}),0)),o},stopListening:function(){}}),fi(e,"connected",!1),e.serverSyncTree_=new er({startListening:function(t,n,r,i){return e.server_.listen(t,r,n,(function(n,r){var o=i(n,r);ti(e.eventQueue_,t._path,o)})),[]},stopListening:function(t,n){e.server_.unlisten(t,n)}})}function si(e){var t=e.infoData_.getNode(new pe(".info/serverTimeOffset")).val()||0;return(new Date).getTime()+t}function ui(e){return(t=(t={timestamp:si(e)})||{}).timestamp=t.timestamp||(new Date).getTime(),t;var t}function ci(e,t,n,r,i){e.dataUpdateCount++;var a=new pe(t);n=e.interceptServerDataCallback_?e.interceptServerDataCallback_(t,n):n;var s=[];if(i)if(r){var u=Object(o.map)(n,(function(e){return ut(e)}));s=function(e,t,n,r){var i=gr(e,r);if(i){var o=vr(i),a=o.path,s=o.queryId,u=Se(a,t),c=Xt.fromObject(n);return mr(e,a,new qt(Lt(s),u,c))}return[]}(e.serverSyncTree_,a,u,i)}else{var c=ut(n);s=function(e,t,n,r){var i=gr(e,r);if(null!=i){var o=vr(i),a=o.path,s=o.queryId,u=Se(a,t);return mr(e,a,new Bt(Lt(s),u,n))}return[]}(e.serverSyncTree_,a,c,i)}else if(r){var l=Object(o.map)(n,(function(e){return ut(e)}));s=function(e,t,n){var r=Xt.fromObject(n);return cr(e,new qt({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t,r))}(e.serverSyncTree_,a,l)}else{var f=ut(n);s=ir(e.serverSyncTree_,a,f)}var h=a;s.length>0&&(h=ki(e,a)),ti(e.eventQueue_,h,s)}function li(e,t){fi(e,"connected",t),!1===t&&function(e){yi(e,"onDisconnectEvents");var t=ui(e),n=At();Rt(e.onDisconnect_,ge(),(function(r,i){var o=Sr(r,i,e.serverSyncTree_,t);Nt(n,r,o)}));var r=[];Rt(n,ge(),(function(t,n){r=r.concat(ir(e.serverSyncTree_,t,n));var i=Ti(e,t);ki(e,i)}
2)),e.onDisconnect_=At(),ti(e.eventQueue_,ge(),r)}(e)}function fi(e,t,n){var r=new pe("/.info/"+t),i=ut(n);e.infoData_.updateSnapshot(r,i);var o=ir(e.infoSyncTree_,r,i);ti(e.eventQueue_,r,o)}function hi(e){return e.nextWriteId_++}function di(e,t,n,r,i){yi(e,"set",{path:t.toString(),value:n,priority:r});var o=ui(e),a=ut(n,r),s=sr(e.serverSyncTree_,t),u=Ir(a,s,o),c=hi(e),l=tr(e.serverSyncTree_,t,u,c,!0);Zr(e.eventQueue_,l),e.server_.put(t.toString(),a.val(!0),(function(n,r){var o="ok"===n;o||x("set at "+t+" failed: "+n);var a=rr(e.serverSyncTree_,c,!o);ti(e.eventQueue_,t,a),bi(e,i,n,r)}));var f=Ti(e,t);ki(e,f),ti(e.eventQueue_,f,[])}function pi(e,t,n){e.server_.onDisconnectCancel(t.toString(),(function(r,i){"ok"===r&&Pt(e.onDisconnect_,t),bi(e,n,r,i)}))}function gi(e,t,n,r){var i=ut(n);e.server_.onDisconnectPut(t.toString(),i.val(!0),(function(n,o){"ok"===n&&Nt(e.onDisconnect_,t,i),bi(e,r,n,o)}))}function vi(e,t,n){var r;r=".info"===ve(t._path)?or(e.infoSyncTree_,t,n):or(e.serverSyncTree_,t,n),ei(e.eventQueue_,t._path,r)}function mi(e){e.persistentConnection_&&e.persistentConnection_.interrupt(ii)}function yi(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r="";e.persistentConnection_&&(r=e.persistentConnection_.id+":"),k.apply(void 0,Object(a.__spreadArray)([r],Object(a.__read)(t)))}function bi(e,t,n,r){t&&B((function(){if("ok"===n)t(null);else{var e=(n||"error").toUpperCase(),i=e;r&&(i+=": "+r);var o=new Error(i);o.code=e,t(o)}}))}function _i(e,t,n){return sr(e.serverSyncTree_,t,n)||at.EMPTY_NODE}function wi(e,t){if(void 0===t&&(t=e.transactionQueueTree_),t||xi(e,t),Or(t)){var n=Si(e,t);Object(o.assert)(n.length>0,"Sending zero length transaction queue"),n.every((function(e){return 0===e.status}))&&function(e,t,n){for(var r=n.map((function(e){return e.currentWriteId})),i=_i(e,t,r),a=i,s=i.hash(),u=0;u<n.length;u++){var c=n[u];Object(o.assert)(0===c.status,"tryToSendTransactionQueue_: items in queue should all be run."),c.status=1,c.retryCount++;var l=Se(t,c.path);a=a.updateChild(l,c.currentOutputSnapshotRaw)}var f=a.val(!0),h=t;e.server_.put(h.toString(),f,(function(r){yi(e,"transaction put response",{path:h.toString(),status:r});var i=[];if("ok"===r){for(var o=[],a=function(t){n[t].status=2,i=i.concat(rr(e.serverSyncTree_,n[t].currentWriteId)),n[t].onComplete&&o.push((function(){return n[t].onComplete(null,!0,n[t].currentOutputSnapshotResolved)})),n[t].unwatcher()},s=0;s<n.length;s++)a(s);xi(e,Cr(e.transactionQueueTree_,t)),wi(e,e.transactionQueueTree_),ti(e.eventQueue_,t,i);for(s=0;s<o.length;s++)B(o[s])}else{if("datastale"===r)for(s=0;s<n.length;s++)3===n[s].status?n[s].status=4:n[s].status=0;else{x("transaction at "+h.toString()+" failed: "+r);for(s=0;s<n.length;s++)n[s].status=4,n[s].abortReason=r}ki(e,t)}}),s)}(e,jr(t),n)}else Nr(t)&&Pr(t,(function(t){wi(e,t)}))}function ki(e,t){var n=Ei(e,t),r=jr(n);return function(e,t,n){if(0===t.length)return;for(var r=[],i=[],a=t.filter((function(e){return 0===e.status})).map((function(e){return e.currentWriteId})),s=function(s){var u,c,l=t[s],f=Se(n,l.path),h=!1;if(Object(o.assert)(null!==f,"rerunTransactionsUnderNode_: relativePath should not be null."),4===l.status)h=!0,u=l.abortReason,i=i.concat(rr(e.serverSyncTree_,l.currentWriteId,!0));else if(0===l.status)if(l.retryCount>=25)h=!0,u="maxretry",i=i.concat(rr(e.serverSyncTree_,l.currentWriteId,!0));else{var d=_i(e,l.path,a);l.currentInputSnapshot=d;var p=t[s].update(d.val());if(void 0!==p){zr("transaction failed: Data returned ",p,l.path);var g=ut(p);"object"===typeof p&&null!=p&&Object(o.contains)(p,".priority")||(g=g.updatePriority(d.getPriority()));var v=l.currentWriteId,m=ui(e),y=Ir(g,d,m);l.currentOutputSnapshotRaw=g,l.currentOutputSnapshotResolved=y,l.currentWriteId=hi(e),a.splice(a.indexOf(v),1),i=(i=i.concat(tr(e.serverSyncTree_,l.path,y,l.currentWriteId,l.applyLocally))).concat(rr(e.serverSyncTree_,v,!0))}else h=!0,u="nodata",i=i.concat(rr(e.serverSyncTree_,l.currentWriteId,!0))}ti(e.eventQueue_,n,i),i=[],h&&(t[s].status=2,c=t[s].unwatcher,setTimeout(c,Math.floor(0)),t[s].onComplete&&("nodata"===u?r.push((function(){return t[s].onComplete(null,!1,t[s].currentInputSnapshot)})):r.push((function(){return t[s].onComplete(new Error(u),!1,null)}))))},u=0;u<t.length;u++)s(u);xi(e,e.transactionQueueTree_);for(u=0;
2u<r.length;u++)B(r[u]);wi(e,e.transactionQueueTree_)}(e,Si(e,n),r),r}function Ei(e,t){var n,r=e.transactionQueueTree_;for(n=ve(t);null!==n&&void 0===Or(r);)r=Cr(r,n),n=ve(t=ye(t));return r}function Si(e,t){var n=[];return Ii(e,t,n),n.sort((function(e,t){return e.order-t.order})),n}function Ii(e,t,n){var r=Or(t);if(r)for(var i=0;i<r.length;i++)n.push(r[i]);Pr(t,(function(t){Ii(e,t,n)}))}function xi(e,t){var n=Or(t);if(n){for(var r=0,i=0;i<n.length;i++)2!==n[i].status&&(n[r]=n[i],r++);n.length=r,Ar(t,n.length>0?n:void 0)}Pr(t,(function(t){xi(e,t)}))}function Ti(e,t){var n=jr(Ei(e,t)),r=Cr(e.transactionQueueTree_,t);return function(e,t,n){for(var r=n?e:e.parent;null!==r;){if(t(r))return!0;r=r.parent}}(r,(function(t){Ci(e,t)})),Ci(e,r),Rr(r,(function(t){Ci(e,t)})),n}function Ci(e,t){var n=Or(t);if(n){for(var r=[],i=[],a=-1,s=0;s<n.length;s++)3===n[s].status||(1===n[s].status?(Object(o.assert)(a===s-1,"All SENT items should be at beginning of queue."),a=s,n[s].status=3,n[s].abortReason="set"):(Object(o.assert)(0===n[s].status,"Unexpected transaction status in abort"),n[s].unwatcher(),i=i.concat(rr(e.serverSyncTree_,n[s].currentWriteId,!0)),n[s].onComplete&&r.push(n[s].onComplete.bind(null,new Error("set"),!1,null))));-1===a?Ar(t,void 0):n.length=a+1,ti(e.eventQueue_,jr(t),i);for(s=0;s<r.length;s++)B(r[s])}}var Oi=function(e,t){var n=Ai(e),r=n.namespace;"firebase.com"===n.domain&&I(n.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),r&&"undefined"!==r||"localhost"===n.domain||I("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),n.secure||"undefined"!==typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&x("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().");var i="ws"===n.scheme||"wss"===n.scheme;return{repoInfo:new Q(n.host,n.secure,r,t,i,"",r!==n.subdomain),path:new pe(n.pathString)}},Ai=function(e){var t="",n="",r="",i="",o="",s=!0,u="https",c=443;if("string"===typeof e){var l=e.indexOf("//");l>=0&&(u=e.substring(0,l-1),e=e.substring(l+2));var f=e.indexOf("/");-1===f&&(f=e.length);var h=e.indexOf("?");-1===h&&(h=e.length),t=e.substring(0,Math.min(f,h)),f<h&&(i=function(e){for(var t="",n=e.split("/"),r=0;r<n.length;r++)if(n[r].length>0){var i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch(o){}t+="/"+i}return t}(e.substring(f,h)));var d=function(e){var t,n,r={};"?"===e.charAt(0)&&(e=e.substring(1));try{for(var i=Object(a.__values)(e.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]):x("Invalid query segment '"+s+"' in query '"+e+"'")}}}catch(c){t={error:c}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(e.substring(Math.min(e.length,h)));(l=t.indexOf(":"))>=0?(s="https"===u||"wss"===u,c=parseInt(t.substring(l+1),10)):l=t.length;var p=t.slice(0,l);if("localhost"===p.toLowerCase())n="localhost";else if(p.split(".").length<=2)n=p;else{var g=t.indexOf(".");r=t.substring(0,g).toLowerCase(),n=t.substring(g+1),o=r}"ns"in d&&(o=d.ns)}return{host:t,port:c,domain:n,subdomain:r,secure:s,scheme:u,pathString:i,namespace:o}},Ni=function(){function e(e,t,n,r){this.eventType=e,this.eventRegistration=t,this.snapshot=n,this.prevName=r}return e.prototype.getPath=function(){var e=this.snapshot.ref;return"value"===this.eventType?e._path:e.parent._path},e.prototype.getEventType=function(){return this.eventType},e.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},e.prototype.toString=function(){return this.getPath().toString()+":"+this.eventType+":"+Object(o.stringify)(this.snapshot.exportVal())},e}(),Pi=function(){function e(e,t,n){this.eventRegistration=e,this.error=t,this.path=n}return e.prototype.getPath=function(){return this.path},e.prototype.getEventType=function(){return"cancel"},e.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},e.prototype.toString=function(){return this.path.toString()+":cancel"},e}(),Ri=function(){function e(e,t){this.snapshotCallback=e,this.cancelCallback=t}return e.prototype.onValue=function(e,t){this.snapshotCallback.call(null,e,t)},e.prototype.onCancel=function(e){return Object(o.assert)(this.hasCancelCallback,"Raising a cancel event on a listener with no cancel callback"),this.cancelCallback.call(null,e)},Object.defineProperty(e.prototype,"hasCancelCallback",{get:function(){return!!this.cancelCallback}
2,enumerable:!1,configurable:!0}),e.prototype.matches=function(e){return this.snapshotCallback===e.snapshotCallback||this.snapshotCallback.userCallback===e.snapshotCallback.userCallback&&this.snapshotCallback.context===e.snapshotCallback.context},e}(),ji=function(){function e(e,t){this._repo=e,this._path=t}return e.prototype.cancel=function(){var e=new o.Deferred;return pi(this._repo,this._path,e.wrapCallback((function(){}))),e.promise},e.prototype.remove=function(){$r("OnDisconnect.remove",this._path);var e=new o.Deferred;return gi(this._repo,this._path,null,e.wrapCallback((function(){}))),e.promise},e.prototype.set=function(e){$r("OnDisconnect.set",this._path),qr("OnDisconnect.set",e,this._path,!1);var t=new o.Deferred;return gi(this._repo,this._path,e,t.wrapCallback((function(){}))),t.promise},e.prototype.setWithPriority=function(e,t){$r("OnDisconnect.setWithPriority",this._path),qr("OnDisconnect.setWithPriority",e,this._path,!1),Kr("OnDisconnect.setWithPriority",t,!1);var n=new o.Deferred;return function(e,t,n,r,i){var o=ut(n,r);e.server_.onDisconnectPut(t.toString(),o.val(!0),(function(n,r){"ok"===n&&Nt(e.onDisconnect_,t,o),bi(0,i,n,r)}))}(this._repo,this._path,e,t,n.wrapCallback((function(){}))),n.promise},e.prototype.update=function(e){$r("OnDisconnect.update",this._path),Hr("OnDisconnect.update",e,this._path,!1);var t=new o.Deferred;return function(e,t,n,r){if(Object(o.isEmpty)(n))return k("onDisconnect().update() called with empty data.  Don't do anything."),void bi(0,r,"ok",void 0);e.server_.onDisconnectMerge(t.toString(),n,(function(i,o){"ok"===i&&D(n,(function(n,r){var i=ut(r);Nt(e.onDisconnect_,ke(t,n),i)})),bi(0,r,i,o)}))}(this._repo,this._path,e,t.wrapCallback((function(){}))),t.promise},e}(),Di=function(){function e(e,t,n,r){this._repo=e,this._path=t,this._queryParams=n,this._orderByCalled=r}return Object.defineProperty(e.prototype,"key",{get:function(){return Ee(this._path)?null:be(this._path)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ref",{get:function(){return new Ui(this._repo,this._path)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_queryIdentifier",{get:function(){var e=Tt(this._queryParams),t=R(e);return"{}"===t?"default":t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_queryObject",{get:function(){return Tt(this._queryParams)},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){if(!((t=Object(o.getModularInstance)(t))instanceof e))return!1;var n=this._repo===t._repo,r=xe(this._path,t._path),i=this._queryIdentifier===t._queryIdentifier;return n&&r&&i},e.prototype.toJSON=function(){return this.toString()},e.prototype.toString=function(){return this._repo.toString()+function(e){for(var t="",n=e.pieceNum_;n<e.pieces_.length;n++)""!==e.pieces_[n]&&(t+="/"+encodeURIComponent(String(e.pieces_[n])));return t||"/"}(this._path)},e}();function Mi(e,t){if(!0===e._orderByCalled)throw new Error(t+": You can't combine multiple orderBy calls.")}function Li(e){var t=null,n=null;if(e.hasStart()&&(t=e.getIndexStartValue()),e.hasEnd()&&(n=e.getIndexEndValue()),e.getIndex()===Ue){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(), startAfter(), endAt(), endBefore(), or equalTo() must be a string.";if(e.hasStart()){if(e.getIndexStartName()!==C)throw new Error(r);if("string"!==typeof t)throw new Error(i)}if(e.hasEnd()){if(e.getIndexEndName()!==O)throw new Error(r);if("string"!==typeof n)throw new Error(i)}}else if(e.getIndex()===et){if(null!=t&&!Br(t)||null!=n&&!Br(n))throw new Error("Query: When ordering by priority, the first argument passed to startAt(), startAfter() endAt(), endBefore(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(Object(o.assert)(e.getIndex()instanceof ct||e.getIndex()===lt,"unknown index type."),null!=t&&"object"===typeof t||null!=n&&"object"===typeof n)throw new Error("Query: First argument passed to startAt(), startAfter(), endAt(), endBefore(), or equalTo() cannot be an object.")}function Fi(e){if(e.hasStart()&&e.hasEnd()&&e.hasLimit()&&!e.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), startAfter(), endAt(), endBefore(), and limit(). Use limitToFirst() or limitToLast() instead.")}var Ui=function(e){function t(t,n){return e.call(this,t,n,new kt,!1)||this}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"parent",{get:function(){var e=we(this._path);return null===e?null:new t(this._repo,e)}
2,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e},enumerable:!1,configurable:!0}),t}(Di),Vi=function(){function e(e,t,n){this._node=e,this.ref=t,this._index=n}return Object.defineProperty(e.prototype,"priority",{get:function(){return this._node.getPriority().val()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"key",{get:function(){return this.ref.key},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._node.numChildren()},enumerable:!1,configurable:!0}),e.prototype.child=function(t){var n=new pe(t),r=zi(this.ref,t);return new e(this._node.getChild(n),r,et)},e.prototype.exists=function(){return!this._node.isEmpty()},e.prototype.exportVal=function(){return this._node.val(!0)},e.prototype.forEach=function(t){var n=this;return!this._node.isLeafNode()&&!!this._node.forEachChild(this._index,(function(r,i){return t(new e(i,zi(n.ref,r),et))}))},e.prototype.hasChild=function(e){var t=new pe(e);return!this._node.getChild(t).isEmpty()},e.prototype.hasChildren=function(){return!this._node.isLeafNode()&&!this._node.isEmpty()},e.prototype.toJSON=function(){return this.exportVal()},e.prototype.val=function(){return this._node.val()},e}();function Bi(e,t){return(e=Object(o.getModularInstance)(e))._checkNotDeleted("ref"),void 0!==t?zi(e._root,t):e._root}function qi(e,t){(e=Object(o.getModularInstance)(e))._checkNotDeleted("refFromURL");var n=Oi(t,e._repo.repoInfo_.nodeAdmin);Qr("refFromURL",n);var r=n.repoInfo;return e._repo.repoInfo_.isCustomHost()||r.host===e._repo.repoInfo_.host||I("refFromURL: Host name does not match the current database: (found "+r.host+" but expected "+e._repo.repoInfo_.host+")"),Bi(e,n.path.toString())}function zi(e,t){var n,r,i,a;return null===ve((e=Object(o.getModularInstance)(e))._path)?(n="child",r="path",a=!1,(i=t)&&(i=i.replace(/^\/*\.info(\/|$)/,"/")),Yr(n,r,i,a)):Yr("child","path",t,!1),new Ui(e._repo,ke(e._path,t))}function Hi(e,t){e=Object(o.getModularInstance)(e),$r("push",e._path),qr("push",t,e._path,!0);var n,r=si(e._repo),i=ht(r),a=zi(e,i),s=zi(e,i);return n=null!=t?Wi(s,t).then((function(){return s})):Promise.resolve(s),a.then=n.then.bind(n),a.catch=n.then.bind(n,void 0),a}function Ki(e){return $r("remove",e._path),Wi(e,null)}function Wi(e,t){e=Object(o.getModularInstance)(e),$r("set",e._path),qr("set",t,e._path,!1);var n=new o.Deferred;return di(e._repo,e._path,t,null,n.wrapCallback((function(){}))),n.promise}function Gi(e,t){e=Object(o.getModularInstance)(e),$r("setPriority",e._path),Kr("setPriority",t,!1);var n=new o.Deferred;return di(e._repo,ke(e._path,".priority"),t,null,n.wrapCallback((function(){}))),n.promise}function Yi(e,t,n){if($r("setWithPriority",e._path),qr("setWithPriority",t,e._path,!1),Kr("setWithPriority",n,!1),".length"===e.key||".keys"===e.key)throw"setWithPriority failed: "+e.key+" is a read-only object.";var r=new o.Deferred;return di(e._repo,e._path,t,n,r.wrapCallback((function(){}))),r.promise}function $i(e,t){Hr("update",t,e._path,!1);var n=new o.Deferred;return function(e,t,n,r){yi(e,"update",{path:t.toString(),value:n});var i=!0,o=ui(e),a={};if(D(n,(function(n,r){i=!1,a[n]=Sr(ke(t,n),ut(r),e.serverSyncTree_,o)})),i)k("update() called with empty data.  Don't do anything."),bi(0,r,"ok",void 0);else{var s=hi(e),u=nr(e.serverSyncTree_,t,a,s);Zr(e.eventQueue_,u),e.server_.merge(t.toString(),n,(function(n,i){var o="ok"===n;o||x("update at "+t+" failed: "+n);var a=rr(e.serverSyncTree_,s,!o),u=a.length>0?ki(e,t):t;ti(e.eventQueue_,u,a),bi(0,r,n,i)})),D(n,(function(n){var r=Ti(e,ke(t,n));ki(e,r)})),ti(e.eventQueue_,t,[])}}(e._repo,e._path,t,n.wrapCallback((function(){}))),n.promise}function Qi(e){return function(e,t){var n=ur(e.serverSyncTree_,t);return null!=n?Promise.resolve(n):e.server_.get(t).then((function(n){var r=ut(n).withIndex(t._queryParams.getIndex()),i=ir(e.serverSyncTree_,t._path,r);return ei(e.eventQueue_,t._path,i),Promise.resolve(r)}),(function(n){return yi(e,"get for query "+Object(o.stringify)(t)+" failed: "+n),Promise.reject(new Error(n))}))}((e=Object(o.getModularInstance)(e))._repo,e).then((function(t){return new Vi(t,new Ui(e._repo,e._path),e._queryParams.getIndex())}))}var Xi=function(){function e(e){this.callbackContext=e}return e.prototype.respondsTo=function(e){return"value"===e},e.prototype.createEvent=function(e,t){var n=t._queryParams.getIndex();return new Ni("value",this,new Vi(e.snapshotNode,new Ui(t._repo,t._path),n))},e.prototype.getEventRunner=function(e){var t=this;return"cancel"===e.getEventType()?function(){return t.callbackContext.onCancel(e.error)}:function(){return t.callbackContext.onValue(e.snapshot,null)}},e.prototype.createCancelEvent=function(e,t){return this.callbackContext.hasCancelCallback?new Pi(this,e,t):null},e.prototype.matches=function(t){return t instanceof e&&(!t.callbackContext||!this.callbackContext||t.callbackContext.matches(this.callbackContext))},e.prototype.hasAnyCallback=function(){return null!==this.callbackContext},e}(),Ji=function(){function e(e,t){this.eventType=e,this.callbackContext=t}return e.prototype.respondsTo=function(e){var t="children_added"===e?"child_added":e;return t="children_removed"===t?"child_removed":t,this.eventType===t},e.prototype.createCancelEvent=function(e,t){return this.callbackContext.hasCancelCallback?new Pi(this,e,t):null},e.prototype.createEvent=function(e,t){Object(o.assert)(null!=e.childName,"Child events should have a childName.");var n=zi(new Ui(t._repo,t._path),e.childName),r=t._queryParams.getIndex();return new Ni(e.type,this,new Vi(e.snapshotNode,n,r),e.prevName)},e.prototype.getEventRunner=function(e){var t=this;return"cancel"===e.getEventType()?function(){return t.callbackContext.onCancel(e.error)}:function(){return t.callbackContext.onValue(e.snapshot,e.prevName)}},e.prototype.matches=function(t){return t instanceof e&&(this.eventType===t.eventType&&(!this.callbackContext||!t.callbackContext||this.callbackContext.matches(t.callbackContext)))},e.prototype.hasAnyCallback=function(){return!!this.callbackContext},e}();function Zi(e,t,n,r,i){var o;if("object"===typeof r&&(o=void 0,i=r),"function"===typeof r&&(o=r),i&&i.onlyOnce){var a=n,s=function(t,n){vi(e._repo,e,c),a(t,n)};
2s.userCallback=n.userCallback,s.context=n.context,n=s}var u=new Ri(n,o||void 0),c="value"===t?new Xi(u):new Ji(t,u);return function(e,t,n){var r;r=".info"===ve(t._path)?ar(e.infoSyncTree_,t,n):ar(e.serverSyncTree_,t,n),ei(e.eventQueue_,t._path,r)}(e._repo,e,c),function(){return vi(e._repo,e,c)}}function eo(e,t,n,r){return Zi(e,"value",t,n,r)}function to(e,t,n,r){return Zi(e,"child_added",t,n,r)}function no(e,t,n,r){return Zi(e,"child_changed",t,n,r)}function ro(e,t,n,r){return Zi(e,"child_moved",t,n,r)}function io(e,t,n,r){return Zi(e,"child_removed",t,n,r)}function oo(e,t,n){var r=null,i=n?new Ri(n):null;"value"===t?r=new Xi(i):t&&(r=new Ji(t,i)),vi(e._repo,e,r)}var ao=function(){},so=function(e){function t(t,n){var r=e.call(this)||this;return r._value=t,r._key=n,r}return Object(a.__extends)(t,e),t.prototype._apply=function(e){qr("endAt",this._value,e._path,!0);var t=St(e._queryParams,this._value,this._key);if(Fi(t),Li(t),e._queryParams.hasEnd())throw new Error("endAt: Starting point was already set (by another call to endAt, endBefore or equalTo).");return new Di(e._repo,e._path,t,e._orderByCalled)},t}(ao);function uo(e,t){return Gr("endAt","key",t,!0),new so(e,t)}var co=function(e){function t(t,n){var r=e.call(this)||this;return r._value=t,r._key=n,r}return Object(a.__extends)(t,e),t.prototype._apply=function(e){qr("endBefore",this._value,e._path,!1);var t=function(e,t,n){var r;return e.index_===Ue?("string"===typeof t&&(t=pt(t)),r=St(e,t,n)):r=St(e,t,null==n?C:pt(n)),r.endBeforeSet_=!0,r}(e._queryParams,this._value,this._key);if(Fi(t),Li(t),e._queryParams.hasEnd())throw new Error("endBefore: Starting point was already set (by another call to endAt, endBefore or equalTo).");return new Di(e._repo,e._path,t,e._orderByCalled)},t}(ao);function lo(e,t){return Gr("endBefore","key",t,!0),new co(e,t)}var fo=function(e){function t(t,n){var r=e.call(this)||this;return r._value=t,r._key=n,r}return Object(a.__extends)(t,e),t.prototype._apply=function(e){qr("startAt",this._value,e._path,!0);var t=Et(e._queryParams,this._value,this._key);if(Fi(t),Li(t),e._queryParams.hasStart())throw new Error("startAt: Starting point was already set (by another call to startAt, startBefore or equalTo).");return new Di(e._repo,e._path,t,e._orderByCalled)},t}(ao);function ho(e,t){return void 0===e&&(e=null),Gr("startAt","key",t,!0),new fo(e,t)}var po=function(e){function t(t,n){var r=e.call(this)||this;return r._value=t,r._key=n,r}return Object(a.__extends)(t,e),t.prototype._apply=function(e){qr("startAfter",this._value,e._path,!1);var t=function(e,t,n){var r;e.index_===Ue?("string"===typeof t&&(t=dt(t)),r=Et(e,t,n)):r=Et(e,t,null==n?O:dt(n));return r.startAfterSet_=!0,r}(e._queryParams,this._value,this._key);if(Fi(t),Li(t),e._queryParams.hasStart())throw new Error("startAfter: Starting point was already set (by another call to startAt, startAfter, or equalTo).");return new Di(e._repo,e._path,t,e._orderByCalled)},t}(ao);function go(e,t){return Gr("startAfter","key",t,!0),new po(e,t)}var vo=function(e){function t(t){var n=e.call(this)||this;return n._limit=t,n}return Object(a.__extends)(t,e),t.prototype._apply=function(e){if(e._queryParams.hasLimit())throw new Error("limitToFirst: Limit was already set (by another call to limitToFirst or limitToLast).");return new Di(e._repo,e._path,function(e,t){var n=e.copy();return n.limitSet_=!0,n.limit_=t,n.viewFrom_="l",n}(e._queryParams,this._limit),e._orderByCalled)},t}(ao);function mo(e){if("number"!==typeof e||Math.floor(e)!==e||e<=0)throw new Error("limitToFirst: First argument must be a positive integer.");return new vo(e)}var yo=function(e){function t(t){var n=e.call(this)||this;return n._limit=t,n}return Object(a.__extends)(t,e),t.prototype._apply=function(e){if(e._queryParams.hasLimit())throw new Error("limitToLast: Limit was already set (by another call to limitToFirst or limitToLast).");return new Di(e._repo,e._path,function(e,t){var n=e.copy();return n.limitSet_=!0,n.limit_=t,n.viewFrom_="r",n}(e._queryParams,this._limit),e._orderByCalled)},t}(ao);function bo(e){if("number"!==typeof e||Math.floor(e)!==e||e<=0)throw new Error("limitToLast: First argument must be a positive integer.");return new yo(e)}var _o=function(e){function t(t){var n=e.call(this)||this;return n._path=t,n}return Object(a.__extends)(t,e),t.prototype._apply=function(e){Mi(e,"orderByChild");var t=new pe(this._path);if(Ee(t))throw new Error("orderByChild: cannot pass in empty path. Use orderByValue() instead.");var n=new ct(t),r=It(e._queryParams,n);return Li(r),new Di(e._repo,e._path,r,!0)},t}(ao);function wo(e){if("$key"===e)throw new Error('orderByChild: "$key" is invali
2d.  Use orderByKey() instead.');if("$priority"===e)throw new Error('orderByChild: "$priority" is invalid.  Use orderByPriority() instead.');if("$value"===e)throw new Error('orderByChild: "$value" is invalid.  Use orderByValue() instead.');return Yr("orderByChild","path",e,!1),new _o(e)}var ko=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.prototype._apply=function(e){Mi(e,"orderByKey");var t=It(e._queryParams,Ue);return Li(t),new Di(e._repo,e._path,t,!0)},t}(ao);function Eo(){return new ko}var So=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.prototype._apply=function(e){Mi(e,"orderByPriority");var t=It(e._queryParams,et);return Li(t),new Di(e._repo,e._path,t,!0)},t}(ao);function Io(){return new So}var xo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.prototype._apply=function(e){Mi(e,"orderByValue");var t=It(e._queryParams,lt);return Li(t),new Di(e._repo,e._path,t,!0)},t}(ao);function To(){return new xo}var Co=function(e){function t(t,n){var r=e.call(this)||this;return r._value=t,r._key=n,r}return Object(a.__extends)(t,e),t.prototype._apply=function(e){if(qr("equalTo",this._value,e._path,!1),e._queryParams.hasStart())throw new Error("equalTo: Starting point was already set (by another call to startAt/startAfter or equalTo).");if(e._queryParams.hasEnd())throw new Error("equalTo: Ending point was already set (by another call to endAt/endBefore or equalTo).");return new so(this._value,this._key)._apply(new fo(this._value,this._key)._apply(e))},t}(ao);function Oo(e,t){return Gr("equalTo","key",t,!0),new Co(e,t)}function Ao(e){for(var t,n,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var s=Object(o.getModularInstance)(e);try{for(var u=Object(a.__values)(r),c=u.next();!c.done;c=u.next()){var l=c.value;s=l._apply(s)}}catch(f){t={error:f}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return s}!function(e){Object(o.assert)(!jn,"__referenceConstructor has already been defined"),jn=e}(Ui),function(e){Object(o.assert)(!Bn,"__referenceConstructor has already been defined"),Bn=e}(Ui);var No={},Po=!1;function Ro(t,n,r,i,o){var a=i||t.options.databaseURL;void 0===a&&(t.options.projectId||I("Can't determine Firebase Database URL. Be sure to include  a Project ID when calling firebase.initializeApp()."),k("Using default host for project ",t.options.projectId),a=t.options.projectId+"-default-rtdb.firebaseio.com");var s,u=Oi(a,o),c=u.repoInfo,l=void 0;"undefined"!==typeof e&&(l=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}).FIREBASE_DATABASE_EMULATOR_HOST),l?(s=!0,a="http://"+l+"?ns="+c.namespace,c=(u=Oi(a,o)).repoInfo):s=!u.repoInfo.secure;var f=o&&s?new K(K.OWNER):new H(t.name,t.options,n);Qr("Invalid Firebase Database URL",u),Ee(u.path)||I("Database URL must point to the root of a Firebase Database (not including a child path).");var h=function(e,t,n,r){var i=No[t.name];i||(i={},No[t.name]=i);var o=i[e.toURLString()];o&&I("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call.");return o=new oi(e,Po,n,r),i[e.toURLString()]=o,o}(c,t,f,new z(t.name,r));return new jo(h,t)}var jo=function(){function e(e,t){this._repoInternal=e,this.app=t,this.type="database",this._instanceStarted=!1}return Object.defineProperty(e.prototype,"_repo",{get:function(){return this._instanceStarted||(ai(this._repoInternal,this.app.options.appId,this.app.options.databaseAuthVariableOverride),this._instanceStarted=!0),this._repoInternal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_root",{get:function(){return this._rootInternal||(this._rootInternal=new Ui(this._repo,ge())),this._rootInternal},enumerable:!1,configurable:!0}),e.prototype._delete=function(){return this._checkNotDeleted("delete"),function(e,t){var n=No[t];n&&n[e.key]===e||I("Database "+t+"("+e.repoInfo_+") has already been deleted."),mi(e),delete n[e.key]}(this._repo,this.app.name),this._repoInternal=null,this._rootInternal=null,Promise.resolve()},e.prototype._checkNotDeleted=function(e){null===this._rootInternal&&I("Cannot call "+e+" on a deleted database.")},e}();function Do(e,t,n,r){void 0===r&&(r={}),(e=Object(o.getModularInstance)(e))._checkNotDeleted("useEmulator"),e._instanceStarted&&I("Cannot call useEmulator() after instance has already been initialized.");var i=e._repoInternal,a=void 0;if(i.repoInfo_.nodeAdmin)r.mockUserToken&&I('mockUserToken is not supported by the Admin SDK. For client access with mock users, please use the "firebase" package instead of "firebase-admin".'),a=new K(K.OWNER);else if(r.mockUserToken){var s=Object(o.createMockUserToken)(r.mockUserToken,e.app.options.projectId);a=new K(s)}!function(e,t,n,r){e.repoInfo_=new Q(t+":"+n,!1,e.repoInfo_.namespace,e.repoInfo_.webSocketOnly,e.repoInfo_.nodeAdmin,e.repoInfo_.persistenceKey,e.repoInfo_.includeNamespaceInQueryParams),r&&(e.authTokenProvider_=r)}(i,t,n,a)}function Mo(e){(e=Object(o.getModularInstance)(e))._checkNotDeleted("goOffline"),mi(e._repo)}function Lo(e){var t;(e=Object(o.getModularInstance)(e))._checkNotDeleted("goOnline"),(t=e._repo).persistentConnection_&&t.persistentConnection_.resume(ii)}var Fo={".sv":"timestamp"};var Uo=function(){function e(e,t){this.committed=e,this.snapshot=t}return e.prototype.toJSON=function(){return{committed:this.committed,snapshot:this.snapshot.toJSON()}},e}();function Vo(e,t,n){var r;if(e=Object(o.getModularInstance)(e),$r("Reference.transaction",e._path),".length"===e.key||".keys"===e.key)throw"Reference.transaction failed: "+e.key+" is a read-only object.";var i=null===(r=null===n||void 0===n?void 0:n.applyLocally)||void 0===r||r,a=new o.Deferred,s=eo(e,(function(){}));return function(e,t,n,r,i,a){yi(e,"transaction on "+t);var s={path:t,update:n,onComplete:r,status:null,order:v(),applyLocally:a,retryCount:0,unwatcher:i,abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},u=_i(e,t,void 0);s.currentInputSnapshot=u;var c=s.update(u.val());if(void 0===c)s.unwatcher(),s.currentOutputSnapshotRaw=null,s.currentOutputSnapshotResolved=null,s.onComplete&&s.onComplete(null,!1,s.currentInputSnapshot);else{zr("transaction failed: Data returned ",c,s.path),s.status=0;var l=Cr(e.transactionQueueTree_,t),f=Or(l)||[];f.push(s),Ar(l,f);var h=void 0;"object"===typeof c&&null!==c&&Object(o.contains)(c,".priority")?(h=Object(o.safeGet)(c,".priority"),Object(o.assert)(Br(h),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.")):h=(sr(e.serverSyncTree_,t)||at.EMPTY_NODE).getPriority().val();var d=ui(e),p=ut(c,h),g=Ir(p,u,d);s.currentOutputSnapshotRaw=p,s.currentOutputSnapshotResolved=g,s.currentWriteId=hi(e);var m=tr(e.serverSyncTree_,t,g,s.currentWriteId,s.applyLocally);ti(e.eventQueue_,t,m),wi(e,e.transactionQueueTree_)}}(e._repo,e._path,t,(function(t,n,r){var i=null;t?a.reject(t):(i=new Vi(r,new Ui(e._repo,e._path),et),a.resolve(new Uo(n,i)))}),s,i),a.promise}var Bo=function(){function e(e){this._delegate=e}return e.prototype.cancel=function(e){Object(o.validateArgCount)("OnDisconnect.cancel",0,1,arguments.length),Object(o.validateCallback)("O
2nDisconnect.cancel","onComplete",e,!0);var t=this._delegate.cancel();return e&&t.then((function(){return e(null)}),(function(t){return e(t)})),t},e.prototype.remove=function(e){Object(o.validateArgCount)("OnDisconnect.remove",0,1,arguments.length),Object(o.validateCallback)("OnDisconnect.remove","onComplete",e,!0);var t=this._delegate.remove();return e&&t.then((function(){return e(null)}),(function(t){return e(t)})),t},e.prototype.set=function(e,t){Object(o.validateArgCount)("OnDisconnect.set",1,2,arguments.length),Object(o.validateCallback)("OnDisconnect.set","onComplete",t,!0);var n=this._delegate.set(e);return t&&n.then((function(){return t(null)}),(function(e){return t(e)})),n},e.prototype.setWithPriority=function(e,t,n){Object(o.validateArgCount)("OnDisconnect.setWithPriority",2,3,arguments.length),Object(o.validateCallback)("OnDisconnect.setWithPriority","onComplete",n,!0);var r=this._delegate.setWithPriority(e,t);return n&&r.then((function(){return n(null)}),(function(e){return n(e)})),r},e.prototype.update=function(e,t){if(Object(o.validateArgCount)("OnDisconnect.update",1,2,arguments.length),Array.isArray(e)){for(var n={},r=0;r<e.length;++r)n[""+r]=e[r];e=n,x("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.")}Object(o.validateCallback)("OnDisconnect.update","onComplete",t,!0);var i=this._delegate.update(e);return t&&i.then((function(){return t(null)}),(function(e){return t(e)})),i},e}(),qo=function(){function e(e,t){this.committed=e,this.snapshot=t}return e.prototype.toJSON=function(){return Object(o.validateArgCount)("TransactionResult.toJSON",0,1,arguments.length),{committed:this.committed,snapshot:this.snapshot.toJSON()}},e}(),zo=function(){function e(e,t){this._database=e,this._delegate=t}return e.prototype.val=function(){return Object(o.validateArgCount)("DataSnapshot.val",0,0,arguments.length),this._delegate.val()},e.prototype.exportVal=function(){return Object(o.validateArgCount)("DataSnapshot.exportVal",0,0,arguments.length),this._delegate.exportVal()},e.prototype.toJSON=function(){return Object(o.validateArgCount)("DataSnapshot.toJSON",0,1,arguments.length),this._delegate.toJSON()},e.prototype.exists=function(){return Object(o.validateArgCount)("DataSnapshot.exists",0,0,arguments.length),this._delegate.exists()},e.prototype.child=function(t){return Object(o.validateArgCount)("DataSnapshot.child",0,1,arguments.length),t=String(t),Yr("DataSnapshot.child","path",t,!1),new e(this._database,this._delegate.child(t))},e.prototype.hasChild=function(e){return Object(o.validateArgCount)("DataSnapshot.hasChild",1,1,arguments.length),Yr("DataSnapshot.hasChild","path",e,!1),this._delegate.hasChild(e)},e.prototype.getPriority=function(){return Object(o.validateArgCount)("DataSnapshot.getPriority",0,0,arguments.length),this._delegate.priority},e.prototype.forEach=function(t){var n=this;return Object(o.validateArgCount)("DataSnapshot.forEach",1,1,arguments.length),Object(o.validateCallback)("DataSnapshot.forEach","action",t,!1),this._delegate.forEach((function(r){return t(new e(n._database,r))}))},e.prototype.hasChildren=function(){return Object(o.validateArgCount)("DataSnapshot.hasChildren",0,0,arguments.length),this._delegate.hasChildren()},Object.defineProperty(e.prototype,"key",{get:function(){return this._delegate.key},enumerable:!1,configurable:!0}),e.prototype.numChildren=function(){return Object(o.validateArgCount)("DataSnapshot.numChildren",0,0,arguments.length),this._delegate.size},e.prototype.getRef=function(){return Object(o.validateArgCount)("DataSnapshot.ref",0,0,arguments.length),new Ko(this._database,this._delegate.ref)},Object.defineProperty(e.prototype,"ref",{get:function(){return this.getRef()},enumerable:!1,configurable:!0}),e}(),Ho=function(){function e(e,t){this.database=e,this._delegate=t}return e.prototype.on=function(t,n,r,i){var a,s=this;Object(o.validateArgCount)("Query.on",2,4,arguments.length),Object(o.validateCallback)("Query.on","callback",n,!1);var u=e.getCancelAndContextArgs_("Query.on",r,i),c=function(e,t){n.call(u.context,new zo(s.database,e),t)};c.userCallback=n,c.context=u.context;var l=null===(a=u.cancel)||void 0===a?void 0:a.bind(u.context);switch(t){case"value":return eo(this._delegate,c,l),n;case"child_added":return to(this._delegate,c,l),n;case"child_removed":return io(this._delegate,c,l),n;case"child_changed":return no(this._delegate,c,l),n;case"child_moved":return ro(this._delegate,c,l),n;default:throw new Error(Object(o.errorPrefix)("Query.on","eventType")+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}},e.prototype.off=function(e,t,n){if(Object(o.validateArgCount)("Query.off",0,3,arguments.length),Wr("Query.off",e,!0),Object(o.validateCallback)("Query.off","callback",t,!0),Object(o.validateContextObject)("Query.off","context",n,!0),t){var r=function(){};r.userCallback=t,r.context=n,oo(this._delegate,e,r)}else oo(this._delegate,e)},e.prototype.get=function(){var e=this;return Qi(this._delegate).then((function(t){return new zo(e.database,t)}))},e.prototype.once=function(t,n,r,i){var a=this;Object(o.validateArgCount)("Query.once",1,4,arguments.length),Object(o.validateCallback)("Query.once","callback",n,!0);var s=e.getCancelAndContextArgs_("Query.once",r,i),u=new o.Deferred,c=function(e,t){var r=new zo(a.database,e);n&&n.call(s.context,r,t),u.resolve(r)};c.userCallback=n,c.context=s.context;var l=function(e){s.cancel&&s.cancel.call(s.context,e),u.reject(e)};switch(t){case"value":eo(this._delegate,c,l,{onlyOnce:!0});break;case"child_added":to(this._delegate,c,l,{onlyOnce:!0});break;case"child_removed":io(this._delegate,c,l,{onlyOnce:!0});break;case"child_changed":no(this._delegate,c,l,{onlyOnce:!0});break;case"child_moved":ro(this._delegate,c,l,{onlyOnce:!0});break;default:throw new Error(Object(o.errorPrefix)("Query.once","eventType")+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}return u.promise},e.prototype.limitToFirst=function(t){return Object(o.validateArgCount)("Query.limitToFirst",1,1,arguments.length),new e(this.database,Ao(this._delegate,mo(t)))},e.prototype.limitToLast=function(t){return Object(o.validateArgCount)("Query.limitToLast",1,1,arguments.length),new e(this.database,Ao(this._delegate,bo(t)))},e.prototype.orderByChild=function(t){return Object(o.validateArgCount)("Query.orderByChild",1,1,arguments.length),new e(this.database,Ao(this._delegate,wo(t)))},e.prototype.orderByKey=function(){return Object(o.validateArgCount)("Query.orderByKey",0,0,arguments.length),new e(this.database,Ao(this._delegate,Eo()))},e.prototype.orderByPriority=function(){return Object(o.validateArgCount)("Query.orderByPriority",0,0,arguments.length),new e(this.database,Ao(this._delegate,Io()))},e.prototype.orderByValue=function(){return Object(o.validateArgCount)("Query.orderByValue",0,0,arguments.length),new e(this.database,Ao(this._delegate,To()))},e.prototype.startAt=function(t,n){return void 0===t&&(t=null),Object(o.validateArgCount)("Query.startAt",0,2,arguments.length),new e(this.database,Ao(this._delegate,ho(t,n)))},e.prototype.startAfter=function(t,n){return void 0===t&&(t=null),Object(o.validateArgCount)("Query.startAfter",0,2,arguments.length),new e(this.database,Ao(this._delegate,go(t,n)))},e.prototype.endAt=function(t,n){return void 0===t&&(t=null),Object(o.validateArgCount)("Query.endAt",0,2,arguments.length),new e(this.database,Ao(this._delegate,uo(t,n)))},e.prototype.endBefore=function(t,n){return void 0===t&&(t=null),Object(o.validateArgCount)("Query.endBefore",0,2,arguments.length),new e(this.database,Ao(this._delegate,lo(t,n)))},e.prototype.equalTo=function(t,n){return Object(o.validateArgCount)("Query.equalTo",1,2,arguments.length),new e(this.database,Ao(this._delegate,Oo(t,n)))},e.prototype.toString=function(){return Object(o.validateArgCount)("Query.toString",0,0,arguments.length),this._delegate.toString()},e.prototype.toJSON=function(){return Object(o.validateArgCount)("Query.toJSON",0,1,arguments.length),this._delegate.toJSON()},e.prototype.isEqual=function(t){if(Object(o.validateArgCount)("Query.isEqual",1,1,arguments.length),!(t instanceof e)){var n="Query.isEqual failed: First argument must be an instance of firebase.database.Query.";throw new Error(n)}return this._delegate.isEqual(t._delegate)},e.getCancelAndContextArgs_=function(e,t,n){var r={cancel:void 0,context:void 0};if(t&&n)r.cancel=t,Object(o.validateCallback)(e,"cancel",r.cancel,!0),r.context=n,Object(o.validateContextObject)(e,"context",r.context,!0);else if(t)if("object"===typeof t&&null!==t)r.context=t;else{if("function"!==typeof t)throw new Error(Object(o.errorPrefix)(e,"cancelOrContext")+" must either be a cancel callback or a context object.");r.cancel=t}return r},Object.defineProperty(e.prototype,"ref",{get:function(){return new Ko(this.database,new Ui(this._delegate._repo,this._delegate._path))}
2,enumerable:!1,configurable:!0}),e}(),Ko=function(e){function t(t,n){var r=e.call(this,t,new Di(n._repo,n._path,new kt,!1))||this;return r.database=t,r._delegate=n,r}return Object(a.__extends)(t,e),t.prototype.getKey=function(){return Object(o.validateArgCount)("Reference.key",0,0,arguments.length),this._delegate.key},t.prototype.child=function(e){return Object(o.validateArgCount)("Reference.child",1,1,arguments.length),"number"===typeof e&&(e=String(e)),new t(this.database,zi(this._delegate,e))},t.prototype.getParent=function(){Object(o.validateArgCount)("Reference.parent",0,0,arguments.length);var e=this._delegate.parent;return e?new t(this.database,e):null},t.prototype.getRoot=function(){return Object(o.validateArgCount)("Reference.root",0,0,arguments.length),new t(this.database,this._delegate.root)},t.prototype.set=function(e,t){Object(o.validateArgCount)("Reference.set",1,2,arguments.length),Object(o.validateCallback)("Reference.set","onComplete",t,!0);var n=Wi(this._delegate,e);return t&&n.then((function(){return t(null)}),(function(e){return t(e)})),n},t.prototype.update=function(e,t){if(Object(o.validateArgCount)("Reference.update",1,2,arguments.length),Array.isArray(e)){for(var n={},r=0;r<e.length;++r)n[""+r]=e[r];e=n,x("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.")}$r("Reference.update",this._delegate._path),Object(o.validateCallback)("Reference.update","onComplete",t,!0);var i=$i(this._delegate,e);return t&&i.then((function(){return t(null)}),(function(e){return t(e)})),i},t.prototype.setWithPriority=function(e,t,n){Object(o.validateArgCount)("Reference.setWithPriority",2,3,arguments.length),Object(o.validateCallback)("Reference.setWithPriority","onComplete",n,!0);var r=Yi(this._delegate,e,t);return n&&r.then((function(){return n(null)}),(function(e){return n(e)})),r},t.prototype.remove=function(e){Object(o.validateArgCount)("Reference.remove",0,1,arguments.length),Object(o.validateCallback)("Reference.remove","onComplete",e,!0);var t=Ki(this._delegate);return e&&t.then((function(){return e(null)}),(function(t){return e(t)})),t},t.prototype.transaction=function(e,t,n){var r=this;Object(o.validateArgCount)("Reference.transaction",1,3,arguments.length),Object(o.validateCallback)("Reference.transaction","transactionUpdate",e,!1),Object(o.validateCallback)("Reference.transaction","onComplete",t,!0),Xr("Reference.transaction","applyLocally",n,!0);var i=Vo(this._delegate,e,{applyLocally:n}).then((function(e){return new qo(e.committed,new zo(r.database,e.snapshot))}));return t&&i.then((function(e){return t(null,e.committed,e.snapshot)}),(function(e){return t(e,!1,null)})),i},t.prototype.setPriority=function(e,t){Object(o.validateArgCount)("Reference.setPriority",1,2,arguments.length),Object(o.validateCallback)("Reference.setPriority","onComplete",t,!0);var n=Gi(this._delegate,e);return t&&n.then((function(){return t(null)}),(function(e){return t(e)})),n},t.prototype.push=function(e,n){var r=this;Object(o.validateArgCount)("Reference.push",0,2,arguments.length),Object(o.validateCallback)("Reference.push","onComplete",n,!0);var i=Hi(this._delegate,e),a=i.then((function(e){return new t(r.database,e)}));n&&a.then((function(){return n(null)}),(function(e){return n(e)}));var s=new t(this.database,i);return s.then=a.then.bind(a),s.catch=a.catch.bind(a,void 0),s},t.prototype.onDisconnect=function(){return $r("Reference.onDisconnect",this._delegate._path),new Bo(new ji(this._delegate._repo,this._delegate._path))},Object.defineProperty(t.prototype,"key",{get:function(){return this.getKey()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this.getParent()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this.getRoot()},enumerable:!1,configurable:!0}),t}(Ho),Wo=function(){function e(e,t){var n=this;this._delegate=e,this.app=t,this.INTERNAL={delete:function(){return n._delegate._delete()}}}return e.prototype.useEmulator=function(e,t,n){void 0===n&&(n={}),Do(this._delegate,e,t,n)},e.prototype.ref=function(e){if(Object(o.validateArgCount)("database.ref",0,1,arguments.length),e instanceof Ko){var t=qi(this._delegate,e.toString());return new Ko(this,t)}t=Bi(this._delegate,e);return new Ko(this,t)},e.prototype.refFromURL=function(e){var t="database.refFromURL";Object(o.validateArgCount)(t,1,1,arguments.length);var n=qi(this._delegate,e);return new Ko(this,n)},e.prototype.goOffline=function(){return Object(o.validateArgCount)("database.goOffline",0,0,arguments.length),Mo(this._delegate)},e.prototype.goOnline=function(){return Object(o.validateArgCount)("database.goOnline",0,0,arguments.length),Lo(this._delegate)},e.ServerValue={TIMESTAMP:Fo,increment:function(e){return function(e){return{".sv":{increment:e}}}(e)}},e}();var Go=Object.freeze({__proto__:null,forceLongPolling:function(){ue.forceDisallow(),oe.forceAllow()},forceWebSockets:function(){oe.forceDisallow()},isWebSocketsAvailable:function(){return ue.isAvailable()},setSecurityDebugCallback:function(e,t){e._delegate._repo.persistentConnection_.securityDebugCallback_=t},stats:function(e,t){!function(e,t){if(void 0===t&&(t=!1),"undefined"!==typeof console){var n;t?(e.statsListener_||(e.statsListener_=new Dt(e.stats_)),n=e.statsListener_.get()):n=e.stats_.get();var r=Object.keys(n).reduce((function(e,t){return Math.max(t.length,e)}),0);D(n,(function(e,t){for(var n=e,i=e.length;i<r+2;i++)n+=" ";console.log(n+t)}))}}(e._delegate._repo,t)},statsIncrementCounter:function(e,t){!function(e,t){var n,r;e.stats_.incrementCounter(t),n=e.statsReporter_,r=t,n.statsToReport_[r]=!0}(e._delegate._repo,t)},dataUpdateCount:function(e){return e._delegate._repo.dataUpdateCount},interceptServerData:function(e,t){return function(e,t){e.interceptServerDataCallback_=t}(e._delegate._repo,t)},initStandalone:function(e){var t=e.app,n=e.url,r=e.version,o=e.customAuthImpl,a=e.namespace,s=e.nodeAdmin,u=void 0!==s&&s;c(r);var l=new i.Provider("auth-internal",new i.ComponentContainer("database-standalone"));return l.setComponent(new i.Component("auth-internal",(function(){return o}
2),"PRIVATE")),{instance:new Wo(Ro(t,l,void 0,n,u),t),namespace:a}}}),Yo=De;De.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)},De.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)};var $o=le,Qo=Q,Xo=Object.freeze({__proto__:null,DataConnection:Yo,RealTimeConnection:$o,hijackHash:function(e){var t=De.prototype.put;return De.prototype.put=function(n,r,i,o){void 0!==o&&(o=e()),t.call(this,n,r,i,o)},function(){De.prototype.put=t}},ConnectionTarget:Qo,queryIdentifier:function(e){return e._delegate._queryIdentifier},forceRestClient:function(e){!function(e){Po=e}(e)}}),Jo=Wo.ServerValue;!function(e){c(e.SDK_VERSION);var n=e.INTERNAL.registerComponent(new i.Component("database",(function(e,t){var n=t.instanceIdentifier,r=e.getProvider("app").getImmediate(),i=e.getProvider("auth-internal"),o=e.getProvider("app-check-internal");return new Wo(Ro(r,i,o,n),r)}),"PUBLIC").setServiceProps({Reference:Ko,Query:Ho,Database:Wo,DataSnapshot:zo,enableLogging:w,INTERNAL:Go,ServerValue:Jo,TEST_ACCESS:Xo}).setMultipleInstances(!0));e.registerVersion("@firebase/database","0.10.5"),Object(o.isNodeSdk)()&&(t.exports=n)}(r.default)}).call(this,n(43),n(68)(e))},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";var r=n(5),i=n(11),o=n(0),a=n(1),s=n(10);function u(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var c,l=u(r),f=((c={})["already-activated"]="You are trying to activate AppCheck for FirebaseApp {$appName}, while it is already activated. AppCheck can only be activated once.",c["use-before-activation"]="AppCheck is being used before activate() is called for FirebaseApp {$appName}. Please make sure you call activate() before instantiating other Firebase services.",c["fetch-network-error"]="Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.",c["fetch-parse-error"]="Fetch client could not parse response. Original error: {$originalErrorMessage}.",c["fetch-status-error"]="Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.",c["storage-open"]="Error thrown when opening storage. Original error: {$originalErrorMessage}.",c["storage-get"]="Error thrown when reading from storage. Original error: {$originalErrorMessage}.",c["storage-set"]="Error thrown when writing to storage. Original error: {$originalErrorMessage}.",c["recaptcha-error"]="ReCAPTCHA error.",c),h=new a.ErrorFactory("appCheck","AppCheck",f),d=new Map,p={activated:!1,tokenListeners:[]},g={enabled:!1};function v(e){return d.get(e)||p}function m(e,t){d.set(e,t)}function y(){return g}function b(){return self.grecaptcha}function _(e){if(!v(e).activated)throw h.create("use-before-activation",{appName:e.name})}var w="https://www.google.com/recaptcha/api.js";function k(e,t){var n=v(e),r=new a.Deferred;m(e,o.__assign(o.__assign({},n),{reCAPTCHAState:{initialized:r}}));var i="fire_app_check_"+e.name,s=document.createElement("div");s.id=i,s.style.display="none",document.body.appendChild(s);var u=b();return u?u.ready((function(){S(e,t,u,i),r.resolve(u)})):function(e){var t=document.createElement("script");t.src=""+w,t.onload=e,document.head.appendChild(t)}((function(){var n=b();if(!n)throw new Error("no recaptcha");n.ready((function(){S(e,t,n,i),r.resolve(n)}))})),r.promise}function E(e){return o.__awaiter(this,void 0,void 0,(function(){var t;return o.__generator(this,(function(n){switch(n.label){case 0:return _(e),[4,v(e).reCAPTCHAState.initialized.promise];case 1:return t=n.sent(),[2,new Promise((function(n,r){var i=v(e).reCAPTCHAState;t.ready((function(){n(t.execute(i.widgetId,{action:"fire_app_check"}))}))}))]}}))}))}function S(e,t,n,r){var i=n.render(r,{sitekey:t,size:"invisible"}),a=v(e);m(e,o.__assign(o.__assign({},a),{reCAPTCHAState:o.__assign(o.__assign({},a.reCAPTCHAState),{widgetId:i})}))}var I="https://content-firebaseappcheck.googleapis.com/v1beta",x=3e4,T=96e4,C=function(){function e(e,t,n,r,i){if(this.operation=e,this.retryPolicy=t,this.getWaitDuration=n,this.lowerBound=r,this.up
2perBound=i,this.pending=null,this.nextErrorWaitInterval=r,r>i)throw new Error("Proactive refresh lower bound greater than upper bound!")}return e.prototype.start=function(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch((function(){}))},e.prototype.stop=function(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)},e.prototype.isRunning=function(){return!!this.pending},e.prototype.process=function(e){return o.__awaiter(this,void 0,void 0,(function(){var t;return o.__generator(this,(function(n){switch(n.label){case 0:this.stop(),n.label=1;case 1:return n.trys.push([1,6,,7]),this.pending=new a.Deferred,[4,(r=this.getNextRun(e),new Promise((function(e){setTimeout(e,r)})))];case 2:return n.sent(),this.pending.resolve(),[4,this.pending.promise];case 3:return n.sent(),this.pending=new a.Deferred,[4,this.operation()];case 4:return n.sent(),this.pending.resolve(),[4,this.pending.promise];case 5:return n.sent(),this.process(!0).catch((function(){})),[3,7];case 6:return t=n.sent(),this.retryPolicy(t)?this.process(!1).catch((function(){})):this.stop(),[3,7];case 7:return[2]}var r}))}))},e.prototype.getNextRun=function(e){if(e)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();var t=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),t},e}();function O(e,t){var n=e.url,r=e.body;return o.__awaiter(this,void 0,void 0,(function(){var e,i,a,s,u,c,l,f,d,p;return o.__generator(this,(function(o){switch(o.label){case 0:e={"Content-Type":"application/json"},(i=t.getImmediate({optional:!0}))&&(e["X-Firebase-Client"]=i.getPlatformInfoString()),a={method:"POST",body:JSON.stringify(r),headers:e},o.label=1;case 1:return o.trys.push([1,3,,4]),[4,fetch(n,a)];case 2:return s=o.sent(),[3,4];case 3:throw u=o.sent(),h.create("fetch-network-error",{originalErrorMessage:u.message});case 4:if(200!==s.status)throw h.create("fetch-status-error",{httpStatus:s.status});o.label=5;case 5:return o.trys.push([5,7,,8]),[4,s.json()];case 6:return c=o.sent(),[3,8];case 7:throw l=o.sent(),h.create("fetch-parse-error",{originalErrorMessage:l.message});case 8:if(!(f=c.ttl.match(/^([\d.]+)(s)$/))||!f[2]||isNaN(Number(f[1])))throw h.create("fetch-parse-error",{originalErrorMessage:"ttl field (timeToLive) is not in standard Protobuf Duration format: "+c.ttl});return d=1e3*Number(f[1]),p=Date.now(),[2,{token:c.attestationToken,expireTimeMillis:p+d,issuedAtTimeMillis:p}]}}))}))}function A(e,t){var n=e.options,r=n.projectId,i=n.appId,o=n.apiKey;return{url:I+"/projects/"+r+"/apps/"+i+":exchangeRecaptchaToken?key="+o,body:{recaptcha_token:t}}}function N(e,t){var n=e.options,r=n.projectId,i=n.appId,o=n.apiKey;return{url:I+"/projects/"+r+"/apps/"+i+":exchangeDebugToken?key="+o,body:{debug_token:t}}}var P="firebase-app-check-store",R="debug-token",j=null;function D(){return j||(j=new Promise((function(e,t){try{var n=indexedDB.open("firebase-app-check-database",1);n.onsuccess=function(t){e(t.target.result)},n.onerror=function(e){var n;t(h.create("storage-open",{originalErrorMessage:null===(n=e.target.error)||void 0===n?void 0:n.message}))},n.onupgradeneeded=function(e){var t=e.target.result;switch(e.oldVersion){case 0:t.createObjectStore(P,{keyPath:"compositeKey"})}}}catch(r){t(h.create("storage-open",{originalErrorMessage:r.message}))}})))}function M(e){return F(U(e))}function L(e,t){return o.__awaiter(this,void 0,void 0,(function(){var n,r,i,a;return o.__generator(this,(function(o){switch(o.label){case 0:return[4,D()];case 1:return n=o.sent(),r=n.transaction(P,"readwrite"),i=r.objectStore(P),a=i.put({compositeKey:e,value:t}),[2,new Promise((function(e,t){a.onsuccess=function(t){e()},r.onerror=function(e){var n;t(h.create("storage-set",{originalErrorMessage:null===(n=e.target.error)||void 0===n?void 0:n.message}))}}))]}}))}))}function F(e){return o.__awaiter(this,void 0,void 0,(function(){var t,n,r,i;return o.__generator(this,(function(o){switch(o.label){case 0:return[4,D()];case 1:return t=o.sent(),n=t.transaction(P,"readonly"),r=n.objectStore(P),i=r.get(e),[2,new Promise((function(e,t){i.onsuccess=function(t){var n=t.target.result;e(n?n.value:void 0)},n.onerror=function(e){var n;t(h.create("storage-get",{originalErrorMessage:null===(n=e.target.error)||void 0===n?void 0:n.message}))}}))]}}))}))}function U(e){return e.options.appId+"-"+e.name}var V=new s.Logger("@firebase/app-check");function B(e){return o.__awaiter(this,void 0,void 0,(function(){var t,n;return o.__generator(this,(function(r){switch(r.label){case 0:if(!a.isIndexedDBAvailable())return[3,5];t=void 0,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,M(e)];case 2:return t=r.sent(),[3,4];case 3:return n=r.sent(),V.warn("Failed to read token from indexeddb. Error: "+n),[3,4];case 4:return[2,t];case 5:return[2,void 0]}}))}))}function q(e,t){return a.isIndexedDBAvailable()?function(e,t){return L(U(e),t)}(e,t).catch((function(e){V.warn("Failed to write token to indexeddb. Error: "+e)})):Promise.resolve()}function z(){return o.__awaiter(this,void 0,void 0,(function(){var e,t;return o.__generator(this,(function(n){switch(n.label){case 0:e=void 0,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,F(R)];case 2:return e=n.sent(),[3,4];case 3:return n.sent(),[3,4];case 4:return e?[2,e]:(t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})),(r=t,L(R,r)).catch((function(e){return V.warn("Failed to persist debug token to indexeddb. Error: "+e)})),console.log("AppCheck debug token: "+t+". You will need to whitelist it in the Firebase console for it to work"),[2,t])}var r}))}))}function H(){return y().enabled}function K(){return o.__awaiter(this,void 0,void 0,(function(){var e;return o.__generator(this,(function(t){if((e=y()).enabled&&e.token)return[2,e.token.promise];throw Error("\n            Can't get debug token in production mode.\n        ")}))}))}var W={error:"UNKNOWN_ERROR"};function G(e){return a.base64.encodeString(JSON.stringify(e),!1)}function Y(e,t,n){return void 0===n&&(n=!1),o.__awaiter(this,void 0,void 0,(function(){var r,i,s,u,c,l,f,d,p,g,y,b,w;return o.__generator(this,(function(k){switch(k.label){case 0:return _(e),H()?(r=O,i=N,s=[e],[4,K()]):[3,3];case 1:return[4,r.apply(void 0,[i.apply(void 0,s.concat([k.sent()])),t])];case 2:return[2,{token:k.sent().token}];case 3:return u=v(e),c=u.token,l=void 0,c?[3,5]:[4,B(e)];case 4:(f=k.sent())&&X(f)&&(c=f,m(e,o.__assign(o.__assign({},u),{token:c})),Q(e,{token:c.token}
2)),k.label=5;case 5:if(!n&&c&&X(c))return[2,{token:c.token}];k.label=6;case 6:return k.trys.push([6,12,,13]),u.customProvider?[4,u.customProvider.getToken()]:[3,8];case 7:return d=k.sent(),p=a.issuedAtTime(d.token),g=null!==p&&p<Date.now()&&p>0?1e3*p:Date.now(),c=o.__assign(o.__assign({},d),{issuedAtTimeMillis:g}),[3,11];case 8:return[4,E(e).catch((function(e){throw h.create("recaptcha-error")}))];case 9:return y=k.sent(),[4,O(A(e,y),t)];case 10:c=k.sent(),k.label=11;case 11:return[3,13];case 12:return b=k.sent(),V.error(b),l=b,[3,13];case 13:return c?[3,14]:(w=function(e){return{token:G(W),error:e}}(l),[3,16]);case 14:return w={token:c.token},m(e,o.__assign(o.__assign({},u),{token:c})),[4,q(e,c)];case 15:k.sent(),k.label=16;case 16:return Q(e,w),[2,w]}}))}))}function $(e,t,n){var r=v(e),i=o.__assign(o.__assign({},r),{tokenListeners:o.__spreadArray(o.__spreadArray([],r.tokenListeners),[n])});if(H()){var a=y();a.enabled&&a.token&&a.token.promise.then((function(e){return n({token:e})})).catch((function(){}))}else{if(!i.tokenRefresher){var s=function(e,t){var n=this;return new C((function(){return o.__awaiter(n,void 0,void 0,(function(){var n;return o.__generator(this,(function(r){switch(r.label){case 0:return v(e).token?[3,2]:[4,Y(e,t)];case 1:return n=r.sent(),[3,4];case 2:return[4,Y(e,t,!0)];case 3:n=r.sent(),r.label=4;case 4:if(n.error)throw n.error;return[2]}}))}))}),(function(){return!0}),(function(){var t=v(e);if(t.token){var n=t.token.issuedAtTimeMillis+.5*(t.token.expireTimeMillis-t.token.issuedAtTimeMillis)+3e5,r=t.token.expireTimeMillis-3e5;return n=Math.min(n,r),Math.max(0,n-Date.now())}return 0}),x,T)}(e,t);i.tokenRefresher=s}if(i.tokenRefresher.isRunning()||!0!==r.isTokenAutoRefreshEnabled||i.tokenRefresher.start(),r.token&&X(r.token)){var u=r.token;Promise.resolve().then((function(){return n({token:u.token})})).catch((function(){}))}}m(e,i)}function Q(e,t){for(var n=0,r=v(e).tokenListeners;n<r.length;n++){var i=r[n];try{i(t)}catch(o){}}}function X(e){return e.expireTimeMillis-Date.now()>0}function J(e){return{activate:function(t,n){return function(e,t,n){var r=v(e);if(r.activated)throw h.create("already-activated",{appName:e.name});var i=o.__assign(o.__assign({},r),{activated:!0});"string"===typeof t?i.siteKey=t:i.customProvider=t,i.isTokenAutoRefreshEnabled=void 0===n?e.automaticDataCollectionEnabled:n,m(e,i),i.siteKey&&k(e,i.siteKey).catch((function(){}))}(e,t,n)},setTokenAutoRefreshEnabled:function(t){return function(e,t){var n=v(e);n.tokenRefresher&&(!0===t?n.tokenRefresher.start():n.tokenRefresher.stop()),m(e,o.__assign(o.__assign({},n),{isTokenAutoRefreshEnabled:t}))}(e,t)}}}function Z(e,t){return{getToken:function(n){return Y(e,t,n)},addTokenListener:function(n){return $(e,t,n)},removeTokenListener:function(t){return function(e,t){var n=v(e),r=n.tokenListeners.filter((function(e){return e!==t}));0===r.length&&n.tokenRefresher&&n.tokenRefresher.isRunning()&&n.tokenRefresher.stop(),m(e,o.__assign(o.__assign({},n),{tokenListeners:r}))}(e,t)}}}var ee="app-check-internal";!function(e){e.INTERNAL.registerComponent(new i.Component("appCheck",(function(e){return J(e.getProvider("app").getImmediate())}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((function(e,t,n){e.getProvider(ee).initialize()}))),e.INTERNAL.registerComponent(new i.Component(ee,(function(e){return Z(e.getProvider("app").getImmediate(),e.getProvider("platform-logger"))}),"PUBLIC").setInstantiationMode("EXPLICIT")),e.registerVersion("@firebase/app-check","0.1.4")}(l.default),function(){var e=a.getGlobal();if("string"===typeof e.FIREBASE_APPCHECK_DEBUG_TOKEN||!0===e.FIREBASE_APPCHECK_DEBUG_TOKEN){var t=y();t.enabled=!0;var n=new a.Deferred;t.token=n,"string"===typeof e.FIREBASE_APPCHECK_DEBUG_TOKEN?n.resolve(e.FIREBASE_APPCHECK_DEBUG_TOKEN):n.resolve(z())}}()},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"auth",(function(){return a}));var r=n(8),i=(n(71),n(55)),o=n.n(i);n(73),n(74),n(75),n(76),n(77);(function(){(function(){var t,n,i="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};
2if("function"==typeof Object.setPrototypeOf)n=Object.setPrototypeOf;else{var o;e:{var a={};try{a.__proto__={xb:!0},o=a.xb;break e}catch(Zf){}o=!1}n=o?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var s=n;function u(e,t){if(e.prototype=i(t.prototype),e.prototype.constructor=e,s)s(e,t);else for(var n in t)if("prototype"!=n)if(Object.defineProperties){var r=Object.getOwnPropertyDescriptor(t,n);r&&Object.defineProperty(e,n,r)}else e[n]=t[n];e.K=t.prototype}var c="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},l="undefined"!=typeof window&&window===this?this:"undefined"!=typeof e&&null!=e?e:this;function f(e,t){if(t){var n=l;e=e.split(".");for(var r=0;r<e.length-1;r++){var i=e[r];i in n||(n[i]={}),n=n[i]}(t=t(r=n[e=e[e.length-1]]))!=r&&null!=t&&c(n,e,{configurable:!0,writable:!0,value:t})}}f("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}})),f("Array.prototype.includes",(function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var r=n.length;for(0>(t=t||0)&&(t=Math.max(t+r,0));t<r;t++){var i=n[t];if(i===e||Object.is(i,e))return!0}return!1}}));var h=this;function d(e){return void 0!==e}function p(e){return"string"==typeof e}var g=/^[\w+/_-]+[=]{0,2}$/,v=null;function m(){}function y(e){e.W=void 0,e.Xa=function(){return e.W?e.W:e.W=new e}}function b(e){var t=typeof e;if("object"==t){if(!e)return"null";if(e instanceof Array)return"array";if(e instanceof Object)return t;var n=Object.prototype.toString.call(e);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof e.length&&"undefined"!=typeof e.splice&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||"undefined"!=typeof e.call&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("call"))return"function"}else if("function"==t&&"undefined"==typeof e.call)return"object";return t}function _(e){return"array"==b(e)}function w(e){var t=b(e);return"array"==t||"object"==t&&"number"==typeof e.length}function k(e){return"function"==b(e)}function E(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var S="closure_uid_"+(1e9*Math.random()>>>0),I=0;function x(e,t,n){return e.call.apply(e.bind,arguments)}function T(e,t,n){if(!e)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),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function C(e,t,n){return(C=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?x:T).apply(null,arguments)}function O(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function A(e,t){for(var n in t)e[n]=t[n]}var N,P=Date.now||function(){return+new Date};function R(e,t){e=e.split(".");var n,r=h;e[0]in r||"undefined"==typeof r.execScript||r.execScript("var "+e[0]);for(;e.length&&(n=e.shift());)!e.length&&d(t)?r[n]=t:r=r[n]&&r[n]!==Object.prototype[n]?r[n]:r[n]={}}function j(e,t){function n(){}n.prototype=t.prototype,e.K=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.vc=function(e,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return t.prototype[n].apply(e,i)}}function D(e){if(Error.captureStackTrace)Error.captureStackTrace(this,D);else{var t=Error().stack;t&&(this.stack=t)}e&&(this.message=String(e))}function M(e,t){for(var n="",r=(e=e.split("%s")).length-1,i=0;i<r;i++)n+=e[i]+(i<t.length?t[i]:"%s");D.call(this,n+e[r])}function L(e,t){throw new M("Failure"+(e?": "+e:""),Array.prototype.slice.call(arguments,1))}j(D,Error),D.prototype.name="CustomError",j(M,D),M.prototype.name="AssertionError";var F=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if(p(e))return p(t)&&1==t.length?e.indexOf(t,0):-1;for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},U=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(e,t,n){for(var r=e.length,i=p(e)?e.split(""):e,o=0;o<r;o++)o in i&&t.call(n,i[o],o,e)};var V=Array.prototype.filter?function(e,t){return Array.prototype.filter.call(e,t,void 0)}:function(e,t){for(var n=e.length,r=[],i=0,o=p(e)?e.split(""):e,a=0;a<n;a++)if(a in o){var s=o[a];t.call(void 0,s,a,e)&&(r[i++]=s)}return r},B=Array.prototype.map?function(e,t){return Array.prototype.map.call(e,t,void 0)}:function(e,t){for(var n=e.length,r=Array(n),i=p(e)?e.split(""):e,o=0;o<n;o++)o in i&&(r[o]=t.call(void 0,i[o],o,e));return r},q=Array.prototype.some?function(e,t){return Array.prototype.some.call(e,t,void 0)}:function(e,t){for(var n=e.length,r=p(e)?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e))return!0;return!1};function z(e,t){return 0<=F(e,t)}function H(e,t){var n;return(n=0<=(t=F(e,t)))&&K(e,t),n}function K(e,t){return 1==Array.prototype.splice.call(e,t,1).length}function W(e,t){!function(e,t){for(var n=p(e)?e.split(""):e,r=e.length-1;0<=r;--r)r in n&&t.call(void 0,n[r],r,e)}(e,(function(n,r){t.call(void 0,n,r,e)&&K(e,r)&&0}))}function G(e){return Array.prototype.concat.apply([],arguments)}function Y(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}function $(e,t,n,r){return Array.prototype.splice.apply(e,Q(arguments,1
2))}function Q(e,t,n){return 2>=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,n)}var X=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]},J=/&/g,Z=/</g,ee=/>/g,te=/"/g,ne=/'/g,re=/\x00/g,ie=/[\x00&<>"']/;function oe(e,t){return e<t?-1:e>t?1:0}function ae(e){return ie.test(e)&&(-1!=e.indexOf("&")&&(e=e.replace(J,"&amp;")),-1!=e.indexOf("<")&&(e=e.replace(Z,"&lt;")),-1!=e.indexOf(">")&&(e=e.replace(ee,"&gt;")),-1!=e.indexOf('"')&&(e=e.replace(te,"&quot;")),-1!=e.indexOf("'")&&(e=e.replace(ne,"&#39;")),-1!=e.indexOf("\0")&&(e=e.replace(re,"&#0;"))),e}function se(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function ue(e){var t,n={};for(t in e)n[t]=e[t];return n}var ce="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function le(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(var o=0;o<ce.length;o++)n=ce[o],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}var fe="StopIteration"in h?h.StopIteration:{message:"StopIteration",stack:""};function he(){}function de(e){if(e instanceof he)return e;if("function"==typeof e.ha)return e.ha(!1);if(w(e)){var t=0,n=new he;return n.next=function(){for(;;){if(t>=e.length)throw fe;if(t in e)return e[t++];t++}},n}throw Error("Not implemented")}function pe(e){if(w(e))return Y(e);e=de(e);var t=[];return function(e,t){if(w(e))try{U(e,t,void 0)}catch(n){if(n!==fe)throw n}else{e=de(e);try{for(;;)t.call(void 0,e.next(),void 0,e)}catch(r){if(r!==fe)throw r}}}(e,(function(e){t.push(e)})),t}function ge(e,t){this.g={},this.a=[],this.j=this.h=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(e)if(e instanceof ge)for(n=e.ja(),r=0;r<n.length;r++)this.set(n[r],e.get(n[r]));else for(r in e)this.set(r,e[r])}function ve(e){if(e.h!=e.a.length){for(var t=0,n=0;t<e.a.length;){var r=e.a[t];me(e.g,r)&&(e.a[n++]=r),t++}e.a.length=n}if(e.h!=e.a.length){var i={};for(n=t=0;t<e.a.length;)me(i,r=e.a[t])||(e.a[n++]=r,i[r]=1),t++;e.a.length=n}}function me(e,t){return Object.prototype.hasOwnProperty.call(e,t)}he.prototype.next=function(){throw fe},he.prototype.ha=function(){return this},(t=ge.prototype).la=function(){ve(this);for(var e=[],t=0;t<this.a.length;t++)e.push(this.g[this.a[t]]);return e},t.ja=function(){return ve(this),this.a.concat()},t.clear=function(){this.g={},this.j=this.h=this.a.length=0},t.get=function(e,t){return me(this.g,e)?this.g[e]:t},t.set=function(e,t){me(this.g,e)||(this.h++,this.a.push(e),this.j++),this.g[e]=t},t.forEach=function(e,t){for(var n=this.ja(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);e.call(t,o,i,this)}},t.ha=function(e){ve(this);var t=0,n=this.j,r=this,i=new he;return i.next=function(){if(n!=r.j)throw Error("The map has changed since the iterator was created");if(t>=r.a.length)throw fe;var i=r.a[t++];return e?i:r.g[i]},i};var ye=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function be(e,t,n,r){for(var i=n.length;0<=(t=e.indexOf(n,t))&&t<r;){var o=e.charCodeAt(t-1);if((38==o||63==o)&&(!(o=e.charCodeAt(t+i))||61==o||38==o||35==o))return t;t+=i+1}return-1}var _e=/#|$/;function we(e,t){var n=e.search(_e),r=be(e,0,t,n);if(0>r)return null;var i=e.indexOf("&",r);return(0>i||i>n)&&(i=n),r+=t.length+1,decodeURIComponent(e.substr(r,i-r).replace(/\+/g," "))}var ke=/[?&]($|#)/;function Ee(e,t){var n;this.h=this.A=this.j="",this.C=null,this.s=this.g="",this.i=!1,e instanceof Ee?(this.i=d(t)?t:e.i,Se(this,e.j),this.A=e.A,this.h=e.h,Ie(this,e.C),this.g=e.g,xe(this,Ve(e.a)),this.s=e.s):e&&(n=String(e).match(ye))?(this.i=!!t,Se(this,n[1]||"",!0),this.A=Ce(n[2]||""),this.h=Ce(n[3]||"",!0),Ie(this,n[4]),this.g=Ce(n[5]||"",!0),xe(this,n[6]||"",!0),this.s=Ce(n[7]||"")):(this.i=!!t,this.a=new Me(null,this.i))}function Se(e,t,n){e.j=n?Ce(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function Ie(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.C=t}else e.C=null}function xe(e,t,n){t instanceof Me?(e.a=t,function(e,t){t&&!e.j&&(Le(e),e.h=null,e.a.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(Fe(this,t),Fe(this,n),0<e.length&&(this.h=null,this.a.set(Be(this,n),Y(e)),this.g+=e.length))}),e)),e.j=t}(e.a,e.i)):(n||(t=Oe(t,je)),e.a=new Me(t,e.i))}function Te(e){return e instanceof Ee?new Ee(e):new Ee(e,void 0)}function Ce(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Oe(e,t,n){return p(e)?(e=encodeURI(e).replace(t,Ae),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Ae(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}Ee.prototype.toString=function(){var e=[],t=this.j;t&&e.push(Oe(t,Ne,!0),":");var n=this.h;return(n||"file"==t)&&(e.push("//"),(t=this.A)&&e.push(Oe(t,Ne,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.C)&&e.push(":",String(n))),(n=this.g)&&(this.h&&"/"!=n.charAt(0)&&e.push("/"),e.push(Oe(n,"/"==n.charAt(0)?Re:Pe,!0))),(n=this.a.toString())&&e.push("?",n),(n=this.s)&&e.push("#",Oe(n,De)),e.join("")};var Ne=/[#\/\?@]/g,Pe=/[#\?:]/g,Re=/[#\?]/g,je=/[#\?@]/g,De=/#/g;function Me(e,t){this.g=this.a=null,this.h=e||null,this.j=!!t}function Le(e){e.a||(e.a=new ge,e.g=0,e.h&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var o=e[n].substring(0,r);i=e[n].substring(r+1)}else o=e[n];t(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.h,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function Fe(e,t){Le(e),t=Be(e,t),me(e.a.g,t)&&(e.h=null,e.g-=e.a.get(t).length,me((e=e.a).g,t)&&(delete e.g[t],e.h--,e.j++,e.a.length>2*e.h&&ve(e)))}function Ue(e,t){return Le(e),t=Be(e,t),me(e.a.g,t)}function Ve(e){var t=new Me;return t.h=e.h,e.a&&(t.a=new ge(e.a),t.g=e.g),t}function Be(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}function qe(e){this.a=Te(e)}function ze(e){return e.a.a.get(We.Pa)||null}function He(e,t){t?e.a.a.set(We.PROVIDER_ID,t):Fe(e.a.a,We.PROVIDER_ID)}(t=Me.prototype).add=function(e,t){Le(this),this.h=null,e=Be(this,e);var n=this.a.get(e);return n||this.a.set(e,n=[]),n.push(t),this.g+=1,this},t.clear=function(){this.a=this.h=null,this.g=0},t.forEach=function(e,t){Le(this),this.a.forEach((function(n,r){U(n,(function(n){e.call(t,n,r,this)}),this)}),this)},t.ja=function(){Le(this);for(var e=this.a.la(),t=this.a.ja(),n=[],r=0;r<t.length;r++)for(var i=e[r],o=0;o<i.length;o++)n.push(t[r]);return n},t.la=function(e){Le(this);var t=[];if(p(e))Ue(this,e)&&(t=G(t,this.a.get(Be(this,e))));else{e=this.a.la();for(var n=0;n<e.length;n++)t=G(t,e[n])}return t},t.set=function(e,t){return Le(this),this.h=null,Ue(this,e=Be(this,e))&&(this.g-=this.a.get(e).length),this.a.set(e,[t]),this.g+=1,this},t.get=function(e,t){return e&&0<(e=this.la(e)).length?String(e[0]):t},t.toString=function(){if(this.h)return this.h;
2if(!this.a)return"";for(var e=[],t=this.a.ja(),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r));r=this.la(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),e.push(a)}}return this.h=e.join("&")},qe.prototype.toString=function(){return this.a.toString()};var Ke,We={Pa:"ui_auid",lc:"apiKey",Qa:"ui_sd",ub:"mode",$a:"oobCode",PROVIDER_ID:"ui_pid",Sa:"ui_sid",vb:"tenantId"};e:{var Ge=h.navigator;if(Ge){var Ye=Ge.userAgent;if(Ye){Ke=Ye;break e}}Ke=""}function $e(e){return-1!=Ke.indexOf(e)}function Qe(){return($e("Chrome")||$e("CriOS"))&&!$e("Edge")}function Xe(e){return Xe[" "](e),e}Xe[" "]=m;var Je,Ze=$e("Opera"),et=$e("Trident")||$e("MSIE"),tt=$e("Edge"),nt=tt||et,rt=$e("Gecko")&&!(-1!=Ke.toLowerCase().indexOf("webkit")&&!$e("Edge"))&&!($e("Trident")||$e("MSIE"))&&!$e("Edge"),it=-1!=Ke.toLowerCase().indexOf("webkit")&&!$e("Edge"),ot=it&&$e("Mobile"),at=$e("Macintosh");function st(){var e=h.document;return e?e.documentMode:void 0}e:{var ut="",ct=function(){var e=Ke;return rt?/rv:([^\);]+)(\)|;)/.exec(e):tt?/Edge\/([\d\.]+)/.exec(e):et?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):it?/WebKit\/(\S+)/.exec(e):Ze?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(ct&&(ut=ct?ct[1]:""),et){var lt=st();if(null!=lt&&lt>parseFloat(ut)){Je=String(lt);break e}}Je=ut}var ft,ht={};function dt(e){return function(e,t){var n=ht;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}(e,(function(){for(var t=0,n=X(String(Je)).split("."),r=X(String(e)).split("."),i=Math.max(n.length,r.length),o=0;0==t&&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;t=oe(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||oe(0==a[2].length,0==s[2].length)||oe(a[2],s[2]),a=a[3],s=s[3]}while(0==t)}return 0<=t}))}var pt=h.document;function gt(e,t){this.a=e===mt&&t||"",this.g=vt}ft=pt&&et?st()||("CSS1Compat"==pt.compatMode?parseInt(Je,10):5):void 0,gt.prototype.ma=!0,gt.prototype.ka=function(){return this.a},gt.prototype.toString=function(){return"Const{"+this.a+"}"};var vt={},mt={};function yt(){this.a="",this.h=_t}function bt(e){return e instanceof yt&&e.constructor===yt&&e.h===_t?e.a:(L("expected object of type TrustedResourceUrl, got '"+e+"' of type "+b(e)),"type_error:TrustedResourceUrl")}yt.prototype.ma=!0,yt.prototype.ka=function(){return this.a.toString()},yt.prototype.g=function(){return 1},yt.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var _t={};function wt(){this.a="",this.h=xt}function kt(e){return e instanceof wt&&e.constructor===wt&&e.h===xt?e.a:(L("expected object of type SafeUrl, got '"+e+"' of type "+b(e)),"type_error:SafeUrl")}wt.prototype.ma=!0,wt.prototype.ka=function(){return this.a.toString()},wt.prototype.g=function(){return 1},wt.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var Et=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function St(e){return e instanceof wt?e:(e="object"==typeof e&&e.ma?e.ka():String(e),Et.test(e)||(e="about:invalid#zClosurez"),Tt(e))}function It(e){return e instanceof wt?e:(e="object"==typeof e&&e.ma?e.ka():String(e),Et.test(e)||(e="about:invalid#zClosurez"),Tt(e))}var xt={};function Tt(e){var t=new wt;return t.a=e,t}function Ct(){this.a="",this.g=Ot}Tt("about:blank"),Ct.prototype.ma=!0;var Ot={};function At(){this.a="",this.j=Pt,this.h=null}function Nt(e){return e instanceof At&&e.constructor===At&&e.j===Pt?e.a:(L("expected object of type SafeHtml, got '"+e+"' of type "+b(e)),"type_error:SafeHtml")}Ct.prototype.ka=function(){return this.a},Ct.prototype.toString=function(){return"SafeStyle{"+this.a+"}"},At.prototype.g=function(){return this.h},At.prototype.ma=!0,At.prototype.ka=function(){return this.a.toString()},At.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var Pt={};function Rt(e,t){var n=new At;return n.a=e,n.h=t,n}Rt("<!DOCTYPE html>",0);var jt=Rt("",0);Rt("<br>",0);var Dt=function(e){var t,n=!1;return function(){return n||(t=function(){if("undefined"===typeof document)return!1;var e=document.createElement("div"),t=document.createElement("div");return t.appendChild(document.createElement("div")),e.appendChild(t),!!e.firstChild&&(t=e.firstChild.firstChild,e.innerHTML=Nt(jt),!t.parentElement)}(),n=!0),t}}();function Mt(e,t){t=t instanceof wt?t:It(t),e.assign(kt(t))}function Lt(e,t){this.a=d(e)?e:0,this.g=d(t)?t:0}function Ft(e,t){this.width=e,this.height=t}function Ut(e){return e?new $t(Wt(e)):N||(N=new $t)}function Vt(e,t){var n=t||document;return n.querySelectorAll&&n.querySelector?n.querySelectorAll("."+e):qt(document,e,t)}function Bt(e,t){var n=t||document;if(n.getElementsByClassName)e=n.getElementsByClassName(e)[0];else{n=document;var r=t||n;e=r.querySelectorAll&&r.querySelector&&e?r.querySelector(e?"."+e:""):qt(n,e,t)[0]||null}return e||null}function qt(e,t,n){var r;if((e=n||e).querySelectorAll&&e.querySelector&&t)return e.querySelectorAll(t?"."+t:"");if(t&&e.getElementsByClassName){var i=e.getElementsByClassName(t);return i}if(i=e.getElementsByTagName("*"),t){var o={};for(n=r=0;e=i[n];n++){var a=e.className;"function"==typeof a.split&&z(a.split(/\s+/),t)&&(o[r++]=e)}return o.length=r,o}return i}Lt.prototype.toString=function(){return"("+this.a+", "+this.g+")"},Lt.prototype.ceil=function(){return this.a=Math.ceil(this.a),this.g=Math.ceil(this.g),this},Lt.prototype.floor=function(){return this.a=Math.floor(this.a),this.g=Math.floor(this.g),this},Lt.prototype.round=function(){return this.a=Math.round(this.a),this.g=Math.round(this.g),this},(t=Ft.prototype).toString=function(){return"("+this.width+" x "+this.height+")"},t.aspectRatio=function(){return this.width/this.height},t.ceil=function(){return this.width=Math.ceil(this.width),this.height=Math.ceil(this.height),this},t.floor=function(){return this.width=Math.floor(this.width),this.height=Math.floor(this.height),this},t.round=function(){return this.width=Math.round(this.width),this.height=Math.round(this.height),this};var zt={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",
2nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function Ht(e){return e.scrollingElement?e.scrollingElement:(it||"CSS1Compat"!=e.compatMode)&&e.body||e.documentElement}function Kt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Wt(e){return 9==e.nodeType?e:e.ownerDocument||e.document}function Gt(e,t){if("textContent"in e)e.textContent=t;else if(3==e.nodeType)e.data=String(t);else if(e.firstChild&&3==e.firstChild.nodeType){for(;e.lastChild!=e.firstChild;)e.removeChild(e.lastChild);e.firstChild.data=String(t)}else{for(var n;n=e.firstChild;)e.removeChild(n);e.appendChild(Wt(e).createTextNode(String(t)))}}function Yt(e,t){return t?function(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}(e,(function(e){return!t||p(e.className)&&z(e.className.split(/\s+/),t)})):null}function $t(e){this.a=e||h.document||document}$t.prototype.N=function(){return p(void 0)?this.a.getElementById(void 0):void 0};var Qt={Fc:!0},Xt={Hc:!0},Jt={Ec:!0},Zt={Gc:!0};function en(){throw Error("Do not instantiate directly")}function tn(e,t,n,r){if(e=e(t||rn,void 0,n),r=(r||Ut()).a.createElement("DIV"),(e=function(e){if(!E(e))return ae(String(e));if(e instanceof en){if(e.fa===Qt)return e.content;if(e.fa===Zt)return ae(e.content)}return L("Soy template output is unsafe for use as HTML: "+e),"zSoyz"}(e)).match(nn),e=Rt(e,null),Dt())for(;r.lastChild;)r.removeChild(r.lastChild);return r.innerHTML=Nt(e),1==r.childNodes.length&&(1==(e=r.firstChild).nodeType&&(r=e)),r}en.prototype.va=null,en.prototype.toString=function(){return this.content};var nn=/^<(body|caption|col|colgroup|head|html|tr|td|th|tbody|thead|tfoot)>/i,rn={};function on(){en.call(this)}function an(e){return null!=e&&e.fa===Qt?e:e instanceof At?ln(Nt(e).toString(),e.g()):ln(ae(String(String(e))),function(e){if(null!=e)switch(e.va){case 1:return 1;case-1:return-1;case 0:return 0}return null}(e))}function sn(){en.call(this)}function un(e,t){this.content=String(e),this.va=null!=t?t:null}function cn(e){return new un(e,void 0)}j(on,en),on.prototype.fa=Qt,j(sn,en),sn.prototype.fa=Xt,sn.prototype.va=1,j(un,en),un.prototype.fa=Zt;var ln=function(e){function t(e){this.content=e}return t.prototype=e.prototype,function(e,n){return e=new t(String(e)),void 0!==n&&(e.va=n),e}}(on),fn=function(e){function t(e){this.content=e}return t.prototype=e.prototype,function(e){return new t(String(e))}}(sn);function hn(e){return(e=String(e))?new un(e,void 0):""}var dn=function(e){function t(e){this.content=e}return t.prototype=e.prototype,function(e,n){return(e=String(e))?(e=new t(e),void 0!==n&&(e.va=n),e):""}}(on);function pn(e){return null!=e&&e.fa===Qt?String(String(e.content).replace(In,"").replace(xn,"&lt;")).replace(wn,yn):ae(String(e))}function gn(e){return null!=e&&e.fa===Xt?e=String(e).replace(kn,_n):e instanceof wt?e=String(kt(e).toString()).replace(kn,_n):(e=String(e),Sn.test(e)?e=e.replace(kn,_n):(L("Bad value `%s` for |filterNormalizeUri",[e]),e="#zSoyz")),e}function vn(e){return null!=e&&e.fa===Jt?e=e.content:null==e?e="":e instanceof Ct?e instanceof Ct&&e.constructor===Ct&&e.g===Ot?e=e.a:(L("expected object of type SafeStyle, got '"+e+"' of type "+b(e)),e="type_error:SafeStyle"):(e=String(e),En.test(e)||(L("Bad value `%s` for |filterCssValue",[e]),e="zSoyz")),e}var mn={"\0":"&#0;","\t":"&#9;","\n":"&#10;","\v":"&#11;","\f":"&#12;","\r":"&#13;"," ":"&#32;",'"':"&quot;","&":"&amp;","'":"&#39;","-":"&#45;","/":"&#47;","<":"&lt;","=":"&#61;",">":"&gt;","`":"&#96;","\x85":"&#133;","\xa0":"&#160;","\u2028":"&#8232;","\u2029":"&#8233;"};function yn(e){return mn[e]}var bn={"\0":"%00","\x01":"%01","\x02":"%02","\x03":"%03","\x04":"%04","\x05":"%05","\x06":"%06","\x07":"%07","\b":"%08","\t":"%09","\n":"%0A","\v":"%0B","\f":"%0C","\r":"%0D","\x0e":"%0E","\x0f":"%0F","\x10":"%10","\x11":"%11","\x12":"%12","\x13":"%13","\x14":"%14","\x15":"%15","\x16":"%16","\x17":"%17","\x18":"%18","\x19":"%19","\x1a":"%1A","\x1b":"%1B","\x1c":"%1C","\x1d":"%1D","\x1e":"%1E","\x1f":"%1F"," ":"%20",'"':"%22","'":"%27","(":"%28",")":"%29","<":"%3C",">":"%3E","\\":"%5C","{":"%7B","}":"%7D","\x7f":"%7F","\x85":"%C2%85","\xa0":"%C2%A0","\u2028":"%E2%80%A8","\u2029":"%E2%80%A9","\uff01":"%EF%BC%81","\uff03":"%EF%BC%83","\uff04":"%EF%BC%84","\uff06":"%EF%BC%86","\uff07":"%EF%BC%87","\uff08":"%EF%BC%88","\uff09":"%EF%BC%89","\uff0a":"%EF%BC%8A","\uff0b":"%EF%BC%8B","\uff0c":"%EF%BC%8C","\uff0f":"%EF%BC%8F","\uff1a":"%EF%BC%9A","\uff1b":"%EF%BC%9B","\uff1d":"%EF%BC%9D","\uff1f":"%EF%BC%9F","\uff20":"%EF%BC%A0","\uff3b":"%EF%BC%BB","\uff3d":"%EF%BC%BD"};function _n(e){return bn[e]}var wn=/[\x00\x22\x27\x3c\x3e]/g,kn=/[\x00- \x22\x27-\x29\x3c\x3e\\\x7b\x7d\x7f\x85\xa0\u2028\u2029\uff01\uff03\uff04\uff06-\uff0c\uff0f\uff1a\uff1b\uff1d\uff1f\uff20\uff3b\uff3d]/g,En=/^(?!-*(?:expression|(?:moz-)?binding))(?:[.#]?-?(?:[_a-z0-9-]+)(?:-[_a-z0-9-]+)*-?|-?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[a-z]{1,2}|%)?|!important|)$/i,Sn=/^(?![^#?]*\/(?:\.|%2E){2}(?:[\/?#]|$))(?:(?:https?|mailto):|[^&:\/?#]*(?:[\/?#]|$))/i,In=/<(?:!|\/?([a-zA-Z][a-zA-Z0-9:\-]*))(?:[^>'"]|"[^"]*"|'[^']*')*>/g,xn=/</g;function Tn(){return cn("Enter a valid phone number")}function Cn(){return cn("Unable to send password reset code to specified email")}function On(){return cn("Something went wrong. Please try again.")}function An(){return cn("This email already exists without any means of sign-in. Please reset the password to recover.")}function Nn(e){var t="";switch((e=e||{}
2).code){case"invalid-argument":t+="Client specified an invalid argument.";break;case"invalid-configuration":t+="Client specified an invalid project configuration.";break;case"failed-precondition":t+="Request can not be executed in the current system state.";break;case"out-of-range":t+="Client specified an invalid range.";break;case"unauthenticated":t+="Request not authenticated due to missing, invalid, or expired OAuth token.";break;case"permission-denied":t+="Client does not have sufficient permission.";break;case"not-found":t+="Specified resource is not found.";break;case"aborted":t+="Concurrency conflict, such as read-modify-write conflict.";break;case"already-exists":t+="The resource that a client tried to create already exists.";break;case"resource-exhausted":t+="Either out of resource quota or reaching rate limiting.";break;case"cancelled":t+="Request cancelled by the client.";break;case"data-loss":t+="Unrecoverable data loss or data corruption.";break;case"unknown":t+="Unknown server error.";break;case"internal":t+="Internal server error.";break;case"not-implemented":t+="API method not implemented by the server.";break;case"unavailable":t+="Service unavailable.";break;case"deadline-exceeded":t+="Request deadline exceeded.";break;case"auth/user-disabled":t+="The user account has been disabled by an administrator.";break;case"auth/timeout":t+="The operation has timed out.";break;case"auth/too-many-requests":t+="We have blocked all requests from this device due to unusual activity. Try again later.";break;case"auth/quota-exceeded":t+="The quota for this operation has been exceeded. Try again later.";break;case"auth/network-request-failed":t+="A network error has occurred. Try again later.";break;case"restart-process":t+="An issue was encountered when authenticating your request. Please visit the URL that redirected you to this page again to restart the authentication process.";break;case"no-matching-tenant-for-email":t+="No sign-in provider is available for the given email, please try with a different email."}return cn(t)}function Pn(){return cn("Please login again to perform this operation")}function Rn(e,t,n){var r=Error.call(this);if(this.message=r.message,"stack"in r&&(this.stack=r.stack),this.code=jn+e,!(e=t)){switch(e="",this.code){case"firebaseui/merge-conflict":e+="The current anonymous user failed to upgrade. The non-anonymous credential is already associated with a different user account.";break;default:e+=On()}e=cn(e).toString()}this.message=e||"",this.credential=n||null}u(Rn,Error),Rn.prototype.toJSON=function(){return{code:this.code,message:this.message}};var jn="firebaseui/";function Dn(){0!=Mn&&(Ln[this[S]||(this[S]=++I)]=this),this.T=this.T,this.C=this.C}var Mn=0,Ln={};function Fn(e,t){e.T?d(void 0)?t.call(void 0):t():(e.C||(e.C=[]),e.C.push(d(void 0)?C(t,void 0):t))}function Un(e){e&&"function"==typeof e.o&&e.o()}Dn.prototype.T=!1,Dn.prototype.o=function(){if(!this.T&&(this.T=!0,this.m(),0!=Mn)){var e=this[S]||(this[S]=++I);if(0!=Mn&&this.C&&0<this.C.length)throw Error(this+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete Ln[e]}},Dn.prototype.m=function(){if(this.C)for(;this.C.length;)this.C.shift()()};var Vn=Object.freeze||function(e){return e},Bn=!et||9<=Number(ft),qn=et&&!dt("9"),zn=function(){if(!h.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{h.addEventListener("test",m,t),h.removeEventListener("test",m,t)}catch(n){}return e}();function Hn(e,t){this.type=e,this.g=this.target=t,this.h=!1,this.qb=!0}function Kn(e,t){if(Hn.call(this,e?e.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.j=this.keyCode=0,this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.a=null,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.g=t,t=e.relatedTarget){if(rt){e:{try{Xe(t.nodeName);var i=!0;break e}catch(o){}i=!1}i||(t=null)}}
2else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,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!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.keyCode=e.keyCode||0,this.key=e.key||"",this.j=e.charCode||("keypress"==n?e.keyCode:0),this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType=p(e.pointerType)?e.pointerType:Wn[e.pointerType]||"",this.a=e,e.defaultPrevented&&this.preventDefault()}}Hn.prototype.stopPropagation=function(){this.h=!0},Hn.prototype.preventDefault=function(){this.qb=!1},j(Kn,Hn);var Wn=Vn({2:"touch",3:"pen",4:"mouse"});Kn.prototype.stopPropagation=function(){Kn.K.stopPropagation.call(this),this.a.stopPropagation?this.a.stopPropagation():this.a.cancelBubble=!0},Kn.prototype.preventDefault=function(){Kn.K.preventDefault.call(this);var e=this.a;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,qn)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(t){}};var Gn="closure_listenable_"+(1e6*Math.random()|0),Yn=0;function $n(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.La=i,this.key=++Yn,this.sa=this.Ia=!1}function Qn(e){e.sa=!0,e.listener=null,e.proxy=null,e.src=null,e.La=null}function Xn(e){this.src=e,this.a={},this.g=0}function Jn(e,t){var n=t.type;n in e.a&&H(e.a[n],t)&&(Qn(t),0==e.a[n].length&&(delete e.a[n],e.g--))}function Zn(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i];if(!o.sa&&o.listener==t&&o.capture==!!n&&o.La==r)return i}return-1}Xn.prototype.add=function(e,t,n,r,i){var o=e.toString();(e=this.a[o])||(e=this.a[o]=[],this.g++);var a=Zn(e,t,r,i);return-1<a?(t=e[a],n||(t.Ia=!1)):((t=new $n(t,this.src,o,!!r,i)).Ia=n,e.push(t)),t};var er="closure_lm_"+(1e6*Math.random()|0),tr={};function nr(e,t,n,r,i){if(r&&r.once)return ir(e,t,n,r,i);if(_(t)){for(var o=0;o<t.length;o++)nr(e,t[o],n,r,i);return null}return n=dr(n),e&&e[Gn]?e.J.add(String(t),n,!1,E(r)?!!r.capture:!!r,i):rr(e,t,n,!1,r,i)}function rr(e,t,n,r,i,o){if(!t)throw Error("Invalid event type");var a=E(i)?!!i.capture:!!i,s=fr(e);if(s||(e[er]=s=new Xn(e)),(n=s.add(t,n,r,a,o)).proxy)return n;if(r=function(){var e=lr,t=Bn?function(n){return e.call(t.src,t.listener,n)}:function(n){if(!(n=e.call(t.src,t.listener,n)))return n};return t}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)zn||(i=a),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(sr(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function ir(e,t,n,r,i){if(_(t)){for(var o=0;o<t.length;o++)ir(e,t[o],n,r,i);return null}return n=dr(n),e&&e[Gn]?e.J.add(String(t),n,!0,E(r)?!!r.capture:!!r,i):rr(e,t,n,!0,r,i)}function or(e,t,n,r,i){if(_(t))for(var o=0;o<t.length;o++)or(e,t[o],n,r,i);else r=E(r)?!!r.capture:!!r,n=dr(n),e&&e[Gn]?(e=e.J,(t=String(t).toString())in e.a&&(-1<(n=Zn(o=e.a[t],n,r,i))&&(Qn(o[n]),K(o,n),0==o.length&&(delete e.a[t],e.g--)))):e&&(e=fr(e))&&(t=e.a[t.toString()],e=-1,t&&(e=Zn(t,n,r,i)),(n=-1<e?t[e]:null)&&ar(n))}function ar(e){if("number"!=typeof e&&e&&!e.sa){var t=e.src;if(t&&t[Gn])Jn(t.J,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(sr(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=fr(t))?(Jn(n,e),0==n.g&&(n.src=null,t[er]=null)):Qn(e)}}}function sr(e){return e in tr?tr[e]:tr[e]="on"+e}function ur(e,t,n,r){var i=!0;if((e=fr(e))&&(t=e.a[t.toString()]))for(t=t.concat(),e=0;e<t.length;e++){var o=t[e];o&&o.capture==n&&!o.sa&&(o=cr(o,r),i=i&&!1!==o)}return i}function cr(e,t){var n=e.listener,r=e.La||e.src;return e.Ia&&ar(e),n.call(r,t)}function lr(e,t){if(e.sa)return!0;if(!Bn){if(!t)e:{t=["window","event"];for(var n=h,r=0;r<t.length;r++)if(null==(n=n[t[r]])){t=null;break e}t=n}if(t=new Kn(r=t,this),n=!0,!(0>r.keyCode||void 0!=r.returnValue)){e:{var i=!1;if(0==r.keyCode)try{r.keyCode=-1;break e}catch(a){i=!0}(i||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],i=t.g;i;i=i.parentNode)r.push(i);for(e=e.type,i=r.length-1;!t.h&&0<=i;i--){t.g=r[i];var o=ur(r[i],e,!0,t);n=n&&o}for(i=0;!t.h&&i<r.length;i++)t.g=r[i],o=ur(r[i],e,!1,t),n=n&&o}return n}return cr(e,new Kn(t,this))}function fr(e){return(e=e[er])instanceof Xn?e:null}var hr="__closure_events_fn_"+(1e9*Math.random()>>>0);function dr(e){return k(e)?e:(e[hr]||(e[hr]=function(t){return e.handleEvent(t)}),e[hr])}function pr(){Dn.call(this),this.J=new Xn(this),this.wb=this,this.Ha=null}function gr(e,t){var n,r=e.Ha;if(r)for(n=[];r;r=r.Ha)n.push(r);if(e=e.wb,r=t.type||t,p(t))t=new Hn(t,e);else if(t instanceof Hn)t.target=t.target||e;else{var i=t;le(t=new Hn(r,e),i)}if(i=!0,n)for(var o=n.length-1;!t.h&&0<=o;o--){var a=t.g=n[o];i=vr(a,r,!0,t)&&i}if(t.h||(i=vr(a=t.g=e,r,!0,t)&&i,t.h||(i=vr(a,r,!1,t)&&i)),n)for(o=0;!t.h&&o<n.length;o++)i=vr(a=t.g=n[o],r,!1,t)&&i;return i}function vr(e,t,n,r){if(!(t=e.J.a[String(t)]))return!0;t=t.concat();for(var i=!0,o=0;o<t.length;++o){var a=t[o];if(a&&!a.sa&&a.capture==n){var s=a.listener,u=a.La||a.src;a.Ia&&Jn(e.J,a),i=!1!==s.call(u,r)&&i}}return i&&0!=r.qb}j(pr,Dn),pr.prototype[Gn]=!0,pr.prototype.Za=function(e){this.Ha=e},pr.prototype.removeEventListener=function(e,t,n,r){or(this,e,t,n,r)},pr.prototype.m=function(){if(pr.K.m.call(this),this.J){var e,t=this.J;
2for(e in t.a){for(var n=t.a[e],r=0;r<n.length;r++)Qn(n[r]);delete t.a[e],t.g--}}this.Ha=null};var mr={},yr=0;function br(e,t){if(!e)throw Error("Event target element must be provided!");if(e=wr(e),mr[e]&&mr[e].length)for(var n=0;n<mr[e].length;n++)gr(mr[e][n],t)}function _r(e){var t=wr(e.N());mr[t]&&mr[t].length&&(function(e,t){e:{for(var n=e.length,r=p(e)?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e)){t=i;break e}t=-1}0<=t&&K(e,t)}(mr[t],(function(t){return t==e})),mr[t].length||delete mr[t])}function wr(e){return"undefined"===typeof e.a&&(e.a=yr,yr++),e.a}function kr(e){if(!e)throw Error("Event target element must be provided!");pr.call(this),this.a=e}function Er(e){if(!e)return!1;try{return!!e.$goog_Thenable}catch(t){return!1}}function Sr(e,t){this.h=e,this.j=t,this.g=0,this.a=null}function Ir(e,t){e.j(t),100>e.g&&(e.g++,t.next=e.a,e.a=t)}function xr(){this.g=this.a=null}u(kr,pr),kr.prototype.N=function(){return this.a},kr.prototype.register=function(){var e=wr(this.N());mr[e]?z(mr[e],this)||mr[e].push(this):mr[e]=[this]},Sr.prototype.get=function(){if(0<this.g){this.g--;var e=this.a;this.a=e.next,e.next=null}else e=this.h();return e};var Tr,Cr,Or=new Sr((function(){return new Nr}),(function(e){e.reset()}));function Ar(){var e=Dr,t=null;return e.a&&(t=e.a,e.a=e.a.next,e.a||(e.g=null),t.next=null),t}function Nr(){this.next=this.g=this.a=null}function Pr(e){h.setTimeout((function(){throw e}),0)}function Rr(e,t){Cr||function(){if(h.Promise&&h.Promise.resolve){var e=h.Promise.resolve(void 0);Cr=function(){e.then(Mr)}}else Cr=function(){var e=Mr;!k(h.setImmediate)||h.Window&&h.Window.prototype&&!$e("Edge")&&h.Window.prototype.setImmediate==h.setImmediate?(Tr||(Tr=function(){var e=h.MessageChannel;if("undefined"===typeof e&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!$e("Presto")&&(e=function(){var e=document.createElement("IFRAME");e.style.display="none",e.src="",document.documentElement.appendChild(e);var t=e.contentWindow;(e=t.document).open(),e.write(""),e.close();var n="callImmediate"+Math.random(),r="file:"==t.location.protocol?"*":t.location.protocol+"//"+t.location.host;e=C((function(e){"*"!=r&&e.origin!=r||e.data!=n||this.port1.onmessage()}),this),t.addEventListener("message",e,!1),this.port1={},this.port2={postMessage:function(){t.postMessage(n,r)}}}),"undefined"!==typeof e&&!$e("Trident")&&!$e("MSIE")){var t=new e,n={},r=n;return t.port1.onmessage=function(){if(d(n.next)){var e=(n=n.next).gb;n.gb=null,e()}},function(e){r.next={gb:e},r=r.next,t.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(e){var t=document.createElement("SCRIPT");t.onreadystatechange=function(){t.onreadystatechange=null,t.parentNode.removeChild(t),t=null,e(),e=null},document.documentElement.appendChild(t)}:function(e){h.setTimeout(e,0)}}()),Tr(e)):h.setImmediate(e)}}(),jr||(Cr(),jr=!0),Dr.add(e,t)}xr.prototype.add=function(e,t){var n=Or.get();n.set(e,t),this.g?this.g.next=n:this.a=n,this.g=n},Nr.prototype.set=function(e,t){this.a=e,this.g=t,this.next=null},Nr.prototype.reset=function(){this.next=this.g=this.a=null};var jr=!1,Dr=new xr;function Mr(){for(var e;e=Ar();){try{e.a.call(e.g)}catch(t){Pr(t)}Ir(Or,e)}jr=!1}function Lr(e){if(this.a=Fr,this.A=void 0,this.j=this.g=this.h=null,this.s=this.i=!1,e!=m)try{var t=this;e.call(void 0,(function(e){$r(t,Ur,e)}),(function(e){if(!(e instanceof ti))try{if(e instanceof Error)throw e;throw Error("Promise rejected.")}catch(n){}$r(t,Vr,e)}))}catch(n){$r(this,Vr,n)}}var Fr=0,Ur=2,Vr=3;function Br(){this.next=this.j=this.g=this.s=this.a=null,this.h=!1}Br.prototype.reset=function(){this.j=this.g=this.s=this.a=null,this.h=!1};var qr=new Sr((function(){return new Br}),(function(e){e.reset()}));function zr(e,t,n){var r=qr.get();return r.s=e,r.g=t,r.j=n,r}function Hr(e){if(e instanceof Lr)return e;var t=new Lr(m);return $r(t,Ur,e),t}function Kr(e){return new Lr((function(t,n){n(e)}))}function Wr(e,t){if(e.a==Fr)if(e.h){var n=e.h;if(n.g){for(var r=0,i=null,o=null,a=n.g;a&&(a.h||(r++,a.a==e&&(i=a),!(i&&1<r)));a=a.next)i||(o=a);i&&(n.a==Fr&&1==r?Wr(n,t):(o?((r=o).next==n.j&&(n.j=r),r.next=r.next.next):Xr(n),Jr(n,i,Vr,t)))}e.h=null}else $r(e,Vr,t)}function Gr(e,t){e.g||e.a!=Ur&&e.a!=Vr||Qr(e),e.j?e.j.next=t:e.g=t,e.j=t}function Yr(e,t,n,r){var i=zr(null,null,null);return i.a=new Lr((function(e,o){i.s=t?function(n){try{var i=t.call(r,n);e(i)}catch(a){o(a)}}:e,i.g=n?function(t){try{var i=n.call(r,t);!d(i)&&t instanceof ti?o(t):e(i)}catch(a){o(a)}}:o})),i.a.h=e,Gr(e,i),i.a}function $r(e,t,n){if(e.a==Fr){e===n&&(t=Vr,n=new TypeError("Promise cannot resolve to itself")),e.a=1;e:{var r=n,i=e.hc,o=e.ic;if(r instanceof Lr){Gr(r,zr(i||m,o||null,e));var a=!0}else if(Er(r))r.then(i,o,e),a=!0;else{if(E(r))try{var s=r.then;if(k(s)){!function(e,t,n,r,i){function o(e){s||(s=!0,r.call(i,e))}function a(e){s||(s=!0,n.call(i,e))}var s=!1;try{t.call(e,a,o)}catch(u){o(u)}}(r,s,i,o,e),a=!0;break e}}catch(u){o.call(e,u),a=!0;break e}a=!1}}a||(e.A=n,e.a=t,e.h=null,Qr(e),t!=Vr||n instanceof ti||function(e,t){e.s=!0,Rr((function(){e.s&&ei.call(null,t)}))}(e,n))}}function Qr(e){e.i||(e.i=!0,Rr(e.Hb,e))}function Xr(e){var t=null;return e.g&&(t=e.g,e.g=t.next,t.next=null),e.g||(e.j=null),t}function Jr(e,t,n,r){if(n==Vr&&t.g&&!t.h)for(;e&&e.s;e=e.h)e.s=!1;if(t.a)t.a.h=null,Zr(t,n,r);else try{t.h?t.s.call(t.j):Zr(t,n,r)}catch(i){ei.call(null,i)}Ir(qr,t)}function Zr(e,t,n){t==Ur?e.s.call(e.j,n):e.g&&e.g.call(e.j,n)}Lr.prototype.then=function(e,t,n){return Yr(this,k(e)?e:null,k(t)?t:null,n)}
2,Lr.prototype.$goog_Thenable=!0,(t=Lr.prototype).fc=function(e,t){return(e=zr(e,e,t)).h=!0,Gr(this,e),this},t.Ca=function(e,t){return Yr(this,null,e,t)},t.cancel=function(e){this.a==Fr&&Rr((function(){Wr(this,new ti(e))}),this)},t.hc=function(e){this.a=Fr,$r(this,Ur,e)},t.ic=function(e){this.a=Fr,$r(this,Vr,e)},t.Hb=function(){for(var e;e=Xr(this);)Jr(this,e,this.a,this.A);this.i=!1};var ei=Pr;function ti(e){D.call(this,e)}function ni(e,t,n){t||(t={}),n=n||window;var r=e instanceof wt?e:St("undefined"!=typeof e.href?e.href:String(e));e=t.target||e.target;var i=[];for(o in t)switch(o){case"width":case"height":case"top":case"left":i.push(o+"="+t[o]);break;case"target":case"noopener":case"noreferrer":break;default:i.push(o+"="+(t[o]?1:0))}var o=i.join(",");return($e("iPhone")&&!$e("iPod")&&!$e("iPad")||$e("iPad")||$e("iPod"))&&n.navigator&&n.navigator.standalone&&e&&"_self"!=e?(o=n.document.createElement("A"),r=r instanceof wt?r:It(r),o.href=kt(r),o.setAttribute("target",e),t.noreferrer&&o.setAttribute("rel","noreferrer"),(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,n,1),o.dispatchEvent(t),n={}):t.noreferrer?(n=n.open("",e,o),t=kt(r).toString(),n&&(nt&&-1!=t.indexOf(";")&&(t="'"+t.replace(/'/g,"%27")+"'"),n.opener=null,t=Rt('<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+ae(t)+'">',null),n.document.write(Nt(t)),n.document.close())):(n=n.open(kt(r).toString(),e,o))&&t.noopener&&(n.opener=null),n}function ri(){try{return!(!window.opener||!window.opener.location||window.opener.location.hostname!==window.location.hostname||window.opener.location.protocol!==window.location.protocol)}catch(e){}return!1}function ii(e){ni(e,{target:window.cordova&&window.cordova.InAppBrowser?"_system":"_blank"},void 0)}function oi(e,t){if(null==(e=E(e)&&1==e.nodeType?e:document.querySelector(String(e))))throw Error(t||"Cannot find element.");return e}function ai(){return window.location.href}function si(e){var t=yi;this.s=[],this.T=t,this.O=e||null,this.j=this.a=!1,this.h=void 0,this.J=this.l=this.A=!1,this.i=0,this.g=null,this.C=0}function ui(e,t,n){e.a=!0,e.h=n,e.j=!t,hi(e)}function ci(e){if(e.a){if(!e.J)throw new di(e);e.J=!1}}function li(e,t,n){e.s.push([t,n,void 0]),e.a&&hi(e)}function fi(e){return q(e.s,(function(e){return k(e[1])}))}function hi(e){if(e.i&&e.a&&fi(e)){var t=e.i,n=vi[t];n&&(h.clearTimeout(n.a),delete vi[t]),e.i=0}e.g&&(e.g.C--,delete e.g),t=e.h;for(var r=n=!1;e.s.length&&!e.A;){var i=e.s.shift(),o=i[0],a=i[1];if(i=i[2],o=e.j?a:o)try{var s=o.call(i||e.O,t);d(s)&&(e.j=e.j&&(s==t||s instanceof Error),e.h=t=s),(Er(t)||"function"===typeof h.Promise&&t instanceof h.Promise)&&(r=!0,e.A=!0)}catch(u){t=u,e.j=!0,fi(e)||(n=!0)}}e.h=t,r&&(s=C(e.L,e,!0),r=C(e.L,e,!1),t instanceof si?(li(t,s,r),t.l=!0):t.then(s,r)),n&&(t=new gi(t),vi[t.a]=t,e.i=t.a)}function di(){D.call(this)}function pi(){D.call(this)}function gi(e){this.a=h.setTimeout(C(this.h,this),0),this.g=e}j(ti,D),ti.prototype.name="cancel",si.prototype.cancel=function(e){if(this.a)this.h instanceof si&&this.h.cancel();else{if(this.g){var t=this.g;delete this.g,e?t.cancel(e):(t.C--,0>=t.C&&t.cancel())}this.T?this.T.call(this.O,this):this.J=!0,this.a||(e=new pi(this),ci(this),ui(this,!1,e))}},si.prototype.L=function(e,t){this.A=!1,ui(this,e,t)},si.prototype.callback=function(e){ci(this),ui(this,!0,e)},si.prototype.then=function(e,t,n){var r,i,o=new Lr((function(e,t){r=e,i=t}));return li(this,r,(function(e){e instanceof pi?o.cancel():i(e)})),o.then(e,t,n)},si.prototype.$goog_Thenable=!0,j(di,D),di.prototype.message="Deferred has already fired",di.prototype.name="AlreadyCalledError",j(pi,D),pi.prototype.message="Deferred was canceled",pi.prototype.name="CanceledError",gi.prototype.h=function(){throw delete vi[this.a],this.g};var vi={};function mi(e){var t={},n=t.document||document,r=bt(e).toString(),i=document.createElement("SCRIPT"),o={rb:i,sb:void 0},a=new si(o),s=null,u=null!=t.timeout?t.timeout:5e3;return 0<u&&(s=window.setTimeout((function(){bi(i,!0);var e=new ki(wi,"Timeout reached for loading script "+r);ci(a),ui(a,!1,e)}),u),o.sb=s),i.onload=i.onreadystatechange=function(){i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(bi(i,t.xc||!1,s),a.callback(null))},i.onerror=function(){bi(i,!0,s);var e=new ki(_i,"Error while loading script "+r);ci(a),ui(a,!1,e)},le(o=t.attributes||{}
2,{type:"text/javascript",charset:"UTF-8"}),function(e,t){se(t,(function(t,n){t&&"object"==typeof t&&t.ma&&(t=t.ka()),"style"==n?e.style.cssText=t:"class"==n?e.className=t:"for"==n?e.htmlFor=t:zt.hasOwnProperty(n)?e.setAttribute(zt[n],t):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?e.setAttribute(n,t):e[n]=t}))}(i,o),function(e,t){e.src=bt(t),null===v&&(v=(t=(t=h.document).querySelector&&t.querySelector("script[nonce]"))&&(t=t.nonce||t.getAttribute("nonce"))&&g.test(t)?t:""),(t=v)&&e.setAttribute("nonce",t)}(i,e),function(e){var t=(e||document).getElementsByTagName("HEAD");return t&&0!=t.length?t[0]:e.documentElement}(n).appendChild(i),a}function yi(){if(this&&this.rb){var e=this.rb;e&&"SCRIPT"==e.tagName&&bi(e,!0,this.sb)}}function bi(e,t,n){null!=n&&h.clearTimeout(n),e.onload=m,e.onerror=m,e.onreadystatechange=m,t&&window.setTimeout((function(){Kt(e)}),0)}var _i=0,wi=1;function ki(e,t){var n="Jsloader error (code #"+e+")";t&&(n+=": "+t),D.call(this,n),this.code=e}function Ei(){return h.google&&h.google.accounts&&h.google.accounts.id||null}function Si(e){this.a=e||Ei(),this.h=!1,this.g=null}function Ii(e,t,n){return e.a&&t?(e.h=!0,new Lr((function(r){e.g=r,e.a.initialize({client_id:t,callback:r,auto_select:!n}),e.a.prompt()}))):Hr(t?Ti.Xa().load().then((function(){return e.a=Ei(),Ii(e,t,n)})).Ca((function(){return null})):null)}j(ki,D),Si.prototype.cancel=function(){this.a&&this.h&&(this.g&&this.g(null),this.a.cancel())},y(Si);var xi=new gt(mt,"https://accounts.google.com/gsi/client");function Ti(){this.a=null}function Ci(e,t){this.a=e,this.g=t||function(e){throw e}}function Oi(e,t,n){this.reset(e,t,n,void 0,void 0)}Ti.prototype.load=function(){var e=this;if(this.a)return this.a;var t=function(){var e=xi;e instanceof gt&&e.constructor===gt&&e.g===vt?e=e.a:(L("expected object of type Const, got '"+e+"'"),e="type_error:Const");var t=new yt;return t.a=e,t}();return Ei()?Hr():this.a=function(){var e=null;return new Lr((function(t){"complete"==h.document.readyState?t():(e=function(){t()},ir(window,"load",e))})).Ca((function(t){throw or(window,"load",e),t}))}().then((function(){if(!Ei())return new Lr((function(n,r){var i=setTimeout((function(){e.a=null,r(Error("Network error!"))}),1e4);h.onGoogleLibraryLoad=function(){clearTimeout(i),n()},Hr(mi(t)).then((function(){Ei()&&n()})).Ca((function(t){clearTimeout(i),e.a=null,r(t)}))}))}))},y(Ti),Ci.prototype.confirm=function(e){return Hr(this.a.confirm(e)).Ca(this.g)},Oi.prototype.a=null;function Ai(e){this.s=e,this.a=this.h=this.j=this.g=null}function Ni(e,t){this.name=e,this.value=t}Oi.prototype.reset=function(e,t,n,r,i){"number"==typeof i||0,this.h=r||P(),this.j=e,this.s=t,this.g=n,delete this.a},Ni.prototype.toString=function(){return this.name};var Pi=new Ni("SEVERE",1e3),Ri=new Ni("WARNING",900),ji=new Ni("CONFIG",700);function Di(e){return e.j?e.j:e.g?Di(e.g):(L("Root logger has no level set."),null)}Ai.prototype.log=function(e,t,n){if(e.value>=Di(this).value)for(k(t)&&(t=t()),e=new Oi(e,String(t),this.s),n&&(e.a=n),n=this;n;){var r=n,i=e;if(r.a)for(var o=0;t=r.a[o];o++)t(i);n=n.g}};var Mi={},Li=null;function Fi(){Li||(Li=new Ai(""),Mi[""]=Li,Li.j=ji)}function Ui(){this.a=P()}var Vi=null;function Bi(e){this.j=e||"",Vi||(Vi=new Ui),this.s=Vi}function qi(e){return 10>e?"0"+e:String(e)}function zi(e){Bi.call(this,e)}function Hi(){this.s=C(this.h,this),this.a=new zi,this.a.g=!1,this.a.h=!1,this.g=this.a.a=!1,this.j={}}Ui.prototype.set=function(e){this.a=e},Ui.prototype.reset=function(){this.set(P())},Ui.prototype.get=function(){return this.a},Bi.prototype.a=!0,Bi.prototype.g=!0,Bi.prototype.h=!1,j(zi,Bi),Hi.prototype.h=function(e){if(!this.j[e.g]){var t=function(e,t){var n=[];if(n.push(e.j," "),e.g){var r=new Date(t.h);n.push("[",qi(r.getFullYear()-2e3)+qi(r.getMonth()+1)+qi(r.getDate())+" "+qi(r.getHours())+":"+qi(r.getMinutes())+":"+qi(r.getSeconds())+"."+qi(Math.floor(r.getMilliseconds()/10)),"] ")}return n.push("[",function(e,t){t=(e=(e.h-t)/1e3).toFixed(3);var n=0;if(1>e)n=2;else for(;100>e;)n++,e*=10;for(;0<n--;)t=" "+t;return t}(t,e.s.get()),"s] "),n.push("[",t.g,"] "),n.push(t.s),e.h&&(t=t.a)&&n.push("\n",t instanceof Error?t.message:t.toString()),e.a&&n.push("\n"),n.join("")}(this.a,e);if(Wi)!function(e,t,n,r){e[t]?e[t](n,r||""):e.log(n,r||"")}(Wi,function(e){if(e){if(e.value>=Pi.value)return"error";if(e.value>=Ri.value)return"warn";if(e.value>=ji.value)return"log"}return"debug"}(e.j),t,e.a)}};var Ki,Wi=h.console;function Gi(e,t){Ki&&Ki.log(Pi,e,t)}Ki=function e(t){var n;if(Fi(),!(n=Mi[t])){n=new Ai(t);var r=t.lastIndexOf("."),i=t.substr(r+1);(r=e(t.substr(0,r))).h||(r.h={}),r.h[i]=n,n.g=r,Mi[t]=n}return n}("firebaseui");var Yi=new Hi;if(1!=Yi.g){var $i;Fi(),$i=Li;var Qi=Yi.s;$i.a||($i.a=[]),$i.a.push(Qi),Yi.g=!0}function Xi(e){Ki&&Ki.log(Ri,e,void 0)}
2function Ji(){this.a=("undefined"==typeof document?null:document)||{cookie:""}}function Zi(e){e=(e.a.cookie||"").split(";");for(var t,n,r=[],i=[],o=0;o<e.length;o++)-1==(t=(n=X(e[o])).indexOf("="))?(r.push(""),i.push(n)):(r.push(n.substring(0,t)),i.push(n.substring(t+1)));return{keys:r,values:i}}(t=Ji.prototype).set=function(e,t,n,r,i,o){if(/[;=\s]/.test(e))throw Error('Invalid cookie name "'+e+'"');if(/[;\r\n]/.test(t))throw Error('Invalid cookie value "'+t+'"');d(n)||(n=-1),i=i?";domain="+i:"",r=r?";path="+r:"",o=o?";secure":"",n=0>n?"":0==n?";expires="+new Date(1970,1,1).toUTCString():";expires="+new Date(P()+1e3*n).toUTCString(),this.a.cookie=e+"="+t+i+r+n+o},t.get=function(e,t){for(var n,r=e+"=",i=(this.a.cookie||"").split(";"),o=0;o<i.length;o++){if(0==(n=X(i[o])).lastIndexOf(r,0))return n.substr(r.length);if(n==e)return""}return t},t.ja=function(){return Zi(this).keys},t.la=function(){return Zi(this).values},t.clear=function(){for(var e=Zi(this).keys,t=e.length-1;0<=t;t--){var n=e[t];this.get(n),this.set(n,"",0,void 0,void 0)}};var eo=new Ji;function to(){}function no(e,t,n,r){this.h="undefined"!==typeof e&&null!==e?e:-1,this.g=t||null,this.a=n||null,this.j=!!r}function ro(e,t){this.g=e,this.a=t||null}function io(e){return{email:e.g,credential:e.a&&e.a.toJSON()}}function oo(e){if(e&&e.email){var t=e.credential&&r.a.auth.AuthCredential.fromJSON(e.credential);return new ro(e.email,t)}return null}function ao(e){this.a=e||null}function so(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);255<i&&(t[n++]=255&i,i>>=8),t[n++]=i}return t}function uo(e){return B(e,(function(e){return 1<(e=e.toString(16)).length?e:"0"+e})).join("")}function co(e){for(this.i=e,this.g=this.i.length/4,this.j=this.g+6,this.h=[[],[],[],[]],this.s=[[],[],[],[]],this.a=Array(lo*(this.j+1)),e=0;e<this.g;e++)this.a[e]=[this.i[4*e],this.i[4*e+1],this.i[4*e+2],this.i[4*e+3]];var t=Array(4);for(e=this.g;e<lo*(this.j+1);e++){if(t[0]=this.a[e-1][0],t[1]=this.a[e-1][1],t[2]=this.a[e-1][2],t[3]=this.a[e-1][3],0==e%this.g){var n=t,r=n[0];
2n[0]=n[1],n[1]=n[2],n[2]=n[3],n[3]=r,yo(t),t[0]^=wo[e/this.g][0],t[1]^=wo[e/this.g][1],t[2]^=wo[e/this.g][2],t[3]^=wo[e/this.g][3]}else 6<this.g&&4==e%this.g&&yo(t);this.a[e]=Array(4),this.a[e][0]=this.a[e-this.g][0]^t[0],this.a[e][1]=this.a[e-this.g][1]^t[1],this.a[e][2]=this.a[e-this.g][2]^t[2],this.a[e][3]=this.a[e-this.g][3]^t[3]}}u(no,to),no.prototype.set=function(e,t){eo.set(e,t,this.h,this.g,this.a,this.j)},no.prototype.get=function(e){return eo.get(e)||null},no.prototype.ra=function(e){var t=this.g,n=this.a;eo.get(e),eo.set(e,"",0,t,n)},co.prototype.A=16;var lo=co.prototype.A/4;function fo(e,t){for(var n,r=0;r<lo;r++)for(var i=0;4>i;i++)n=t[n=4*i+r],e.h[r][i]=n}function ho(e){for(var t=[],n=0;n<lo;n++)for(var r=0;4>r;r++)t[4*r+n]=e.h[n][r];return t}function po(e,t){for(var n=0;4>n;n++)for(var r=0;4>r;r++)e.h[n][r]^=e.a[4*t+r][n]}function go(e,t){for(var n=0;4>n;n++)for(var r=0;4>r;r++)e.h[n][r]=t[e.h[n][r]]}function vo(e){for(var t=1;4>t;t++)for(var n=0;4>n;n++)e.s[t][n]=e.h[t][n];for(t=1;4>t;t++)for(n=0;4>n;n++)e.h[t][n]=e.s[t][(n+t)%lo]}function mo(e){for(var t=1;4>t;t++)for(var n=0;4>n;n++)e.s[t][(n+t)%lo]=e.h[t][n];for(t=1;4>t;t++)for(n=0;4>n;n++)e.h[t][n]=e.s[t][n]}function yo(e){e[0]=bo[e[0]],e[1]=bo[e[1]],e[2]=bo[e[2]],e[3]=bo[e[3]]}var bo=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],_o=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],wo=[[0,0,0,0],[1,0,0,0],[2,0,0,0],[4,0,0,0],[8,0,0,0],[16,0,0,0],[32,0,0,0],[64,0,0,0],[128,0,0,0],[27,0,0,0],[54,0,0,0]],ko=[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200,202,204,206,208,210,212,214,216,218,220,222,224,226,228,230,232,234,236,238,240,242,244,246,248,250,252,254,27,25,31,29,19,17,23,21,11,9,15,13,3,1,7,5,59,57,63,61,51,49,55,53,43,41,47,45,35,33,39,37,91,89,95,93,83,81,87,85,75,73,79,77,67,65,71,69,123,121,127,125,115,113,119,117,107,105,111,109,99,97,103,101,155,153,159,157,147,145,151,149,139,137,143,141,131,129,135,133,187,185,191,189,179,177,183,181,171,169,175,173,163,161,167,165,219,217,223,221,211,209,215,213,203,201,207,205,195,193,199,197,251,249,25
25,253,243,241,247,245,235,233,239,237,227,225,231,229],Eo=[0,3,6,5,12,15,10,9,24,27,30,29,20,23,18,17,48,51,54,53,60,63,58,57,40,43,46,45,36,39,34,33,96,99,102,101,108,111,106,105,120,123,126,125,116,119,114,113,80,83,86,85,92,95,90,89,72,75,78,77,68,71,66,65,192,195,198,197,204,207,202,201,216,219,222,221,212,215,210,209,240,243,246,245,252,255,250,249,232,235,238,237,228,231,226,225,160,163,166,165,172,175,170,169,184,187,190,189,180,183,178,177,144,147,150,149,156,159,154,153,136,139,142,141,132,135,130,129,155,152,157,158,151,148,145,146,131,128,133,134,143,140,137,138,171,168,173,174,167,164,161,162,179,176,181,182,191,188,185,186,251,248,253,254,247,244,241,242,227,224,229,230,239,236,233,234,203,200,205,206,199,196,193,194,211,208,213,214,223,220,217,218,91,88,93,94,87,84,81,82,67,64,69,70,79,76,73,74,107,104,109,110,103,100,97,98,115,112,117,118,127,124,121,122,59,56,61,62,55,52,49,50,35,32,37,38,47,44,41,42,11,8,13,14,7,4,1,2,19,16,21,22,31,28,25,26],So=[0,9,18,27,36,45,54,63,72,65,90,83,108,101,126,119,144,153,130,139,180,189,166,175,216,209,202,195,252,245,238,231,59,50,41,32,31,22,13,4,115,122,97,104,87,94,69,76,171,162,185,176,143,134,157,148,227,234,241,248,199,206,213,220,118,127,100,109,82,91,64,73,62,55,44,37,26,19,8,1,230,239,244,253,194,203,208,217,174,167,188,181,138,131,152,145,77,68,95,86,105,96,123,114,5,12,23,30,33,40,51,58,221,212,207,198,249,240,235,226,149,156,135,142,177,184,163,170,236,229,254,247,200,193,218,211,164,173,182,191,128,137,146,155,124,117,110,103,88,81,74,67,52,61,38,47,16,25,2,11,215,222,197,204,243,250,225,232,159,150,141,132,187,178,169,160,71,78,85,92,99,106,113,120,15,6,29,20,43,34,57,48,154,147,136,129,190,183,172,165,210,219,192,201,246,255,228,237,10,3,24,17,46,39,60,53,66,75,80,89,102,111,116,125,161,168,179,186,133,140,151,158,233,224,251,242,205,196,223,214,49,56,35,42,21,28,7,14,121,112,107,98,93,84,79,70],Io=[0,11,22,29,44,39,58,49,88,83,78,69,116,127,98,105,176,187,166,173,156,151,138,129,232,227,254,245,196,207,210,217,123,112,109,102,87,92,65,74,35,40,53,62,15,4,25,18,203,192,221,214,231,236,241,250,147,152,133,142,191,180,169,162,246,253,224,235,218,209,204,199,174,165,184,179,130,137,148,159,70,77,80,91,106,97,124,119,30,21,8,3,50,57,36,47,141,134,155,144,161,170,183,188,213,222,195,200,249,242,239,228,61,54,43,32,17,26,7,12,101,110,115,120,73,66,95,84,247,252,225,234,219,208,205,198,175,164,185,178,131,136,149,158,71,76,81,90,107,96,125,118,31,20,9,2,51,56,37,46,140,135,154,145,160,171,182,189,212,223,194,201,248,243,238,229,60,55,42,33,16,27,6,13,100,111,114,121,72,67,94,85,1,10,23,28,45,38,59,48,89,82,79,68,117,126,99,104,177,186,167,172,157,150,139,128,233,226,255,244,197,206,211,216,122,113,108,103,86,93,64,75,34,41,52,63,14,5,24,19,202,193,220,215,230,237,240,251,146,153,132,143,190,181,168,163],xo=[0,13,26,23,52,57,46,35,104,101,114,127,92,81,70,75,208,221,202,199,228,233,254,243,184,181,162,175,140,129,150,155,187,182,161,172,143,130,149,152,211,222,201,196,231,234,253,240,107,102,113,124,95,82,69,72,3,14,25,20,55,58,45,32,109,96,119,122,89,84,67,78,5,8,31,18,49,60,43,38,189,176,167,170,137,132,147,158,213,216,207,194,225,236,251,246,214,219,204,193,226,239,248,245,190,179,164,169,138,135,144,157,6,11,28,17,50,63,40,37,110,99,116,121,90,87,64,77,218,215,192,205,238,227,244,249,178,191,168,165,134,139,156,145,10,7,16,29,62,51,36,41,98,111,120,117,86,91,76,65,97,108,123,118,85,88,79,66,9,4,19,30,61,48,39,42,177,188,171,166,133,136,159,146,217,212,195,206,237,224,247,250,183,186,173,160,131,142,153,148,223,210,197,200,235,230,241,252,103,106,125,112,83,94,73,68,15,2,21,24,59,54,33,44,12,1,22,27,56,53,34,47,100,105,126,115,80,93,74,71,220,209,198,203,232,229,242,255,180,185,174,163,128,141,154,151],To=[0,14,28,18,56,54,36,42,112,126,108,98,72,70,84,90,224,238,252,242,216,214,196,202,144,158,140,130,168,166,180,186,219,213,199,201,227,237,255,241,171,165,183,185,147,157,143,129,59,53,39,41,3,13,31,17,75,69,87,89,115,125,111,97,173,163,177,191,149,155,137,135,221,211,193,207,229,235,249,247,77,67,81,95,117,123,105,103,61,51,33,47,5,11,25,23,118,120,106,100,78,64,82,92,6,8,26,20,62,48,34,44,150,152,138,132,174,160,178,188,230,232,250,244,222,208,194,204,65,79,93,83,121,119,101,107,49,63,45,35,9,7,21,27,161,175,189,179,153,151,133,139,209,223,205,195,233,231,245,251,154,148,134,136,162,172,190,176,234,228,246,248,210,220,206,192,122,116,102,104,66,76,94,80,10,4,22,24,50,60,46,32,236,226,240,254,212,218,200,198,156,146,128,142,164,170,184,182,12,2,16,30,52,58,40,38,124,114,96,110,68,74,88,86,55,57,43,37,15,1,19,29,71,73,91,85,127,113,99,109,215,217,203,197,239,225,243,253,167,169,187,
2181,159,145,131,141];function Co(e,t){e=new co(Ao(e));for(var n,r=$(t=so(t),0,16),i="";r.length;){n=16-r.length;for(var o=0;o<n;o++)r.push(0);for(fo(n=e,r),po(n,0),r=1;r<n.j;++r){go(n,bo),vo(n),o=n.h;for(var a=n.s[0],s=0;4>s;s++)a[0]=o[0][s],a[1]=o[1][s],a[2]=o[2][s],a[3]=o[3][s],o[0][s]=ko[a[0]]^Eo[a[1]]^a[2]^a[3],o[1][s]=a[0]^ko[a[1]]^Eo[a[2]]^a[3],o[2][s]=a[0]^a[1]^ko[a[2]]^Eo[a[3]],o[3][s]=Eo[a[0]]^a[1]^a[2]^ko[a[3]];po(n,r)}go(n,bo),vo(n),po(n,n.j),i+=uo(ho(n)),r=$(t,0,16)}return i}function Oo(e,t){e=new co(Ao(e));for(var n=[],r=0;r<t.length;r+=2)n.push(parseInt(t.substring(r,r+2),16));var i=$(n,0,16);for(t="";i.length;){for(fo(r=e,i),po(r,r.j),i=1;i<r.j;++i){mo(r),go(r,_o),po(r,r.j-i);for(var o=r.h,a=r.s[0],s=0;4>s;s++)a[0]=o[0][s],a[1]=o[1][s],a[2]=o[2][s],a[3]=o[3][s],o[0][s]=To[a[0]]^Io[a[1]]^xo[a[2]]^So[a[3]],o[1][s]=So[a[0]]^To[a[1]]^Io[a[2]]^xo[a[3]],o[2][s]=xo[a[0]]^So[a[1]]^To[a[2]]^Io[a[3]],o[3][s]=Io[a[0]]^xo[a[1]]^So[a[2]]^To[a[3]]}if(mo(r),go(r,_o),po(r,0),8192>=(r=ho(r)).length)r=String.fromCharCode.apply(null,r);else{for(i="",o=0;o<r.length;o+=8192)i+=String.fromCharCode.apply(null,Q(r,o,o+8192));r=i}t+=r,i=$(n,0,16)}return t.replace(/(\x00)+$/,"")}function Ao(e){for(var t=32-(e=so(e.substring(0,32))).length,n=0;n<t;n++)e.push(0);return e}function No(e){var t=[];return Ro(new Po,e,t),t.join("")}function Po(){}function Ro(e,t,n){if(null==t)n.push("null");else{if("object"==typeof t){if(_(t)){var r=t;t=r.length,n.push("[");for(var i="",o=0;o<t;o++)n.push(i),Ro(e,r[o],n),i=",";return void n.push("]")}if(!(t instanceof String||t instanceof Number||t instanceof Boolean)){for(r in n.push("{"),i="",t)Object.prototype.hasOwnProperty.call(t,r)&&("function"!=typeof(o=t[r])&&(n.push(i),Mo(r,n),n.push(":"),Ro(e,o,n),i=","));return void n.push("}")}t=t.valueOf()}switch(typeof t){case"string":Mo(t,n);break;case"number":n.push(isFinite(t)&&!isNaN(t)?String(t):"null");break;case"boolean":n.push(String(t));break;case"function":n.push("null");break;default:throw Error("Unknown type: "+typeof t)}}}var jo={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},Do=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function Mo(e,t){t.push('"',e.replace(Do,(function(e){var t=jo[e];return t||(t="\\u"+(65536|e.charCodeAt(0)).toString(16).substr(1),jo[e]=t),t})),'"')}function Lo(e){this.a=e}function Fo(){}function Uo(e){this.a=e}function Vo(e){if(!e.a)return!1;try{return e.a.setItem("__sak","1"),e.a.removeItem("__sak"),!0}catch(t){return!1}}function Bo(){var e=null;try{e=window.localStorage||null}catch(t){}this.a=e}function qo(){var e=null;try{e=window.sessionStorage||null}catch(t){}this.a=e}function zo(e,t){this.g=e,this.a=t+"::"}Lo.prototype.set=function(e,t){d(t)?this.a.set(e,No(t)):this.a.ra(e)},Lo.prototype.get=function(e){try{var t=this.a.get(e)}catch(n){return}if(null!==t)try{return JSON.parse(t)}catch(r){throw"Storage: Invalid value was encountered"}},j(Fo,to),Fo.prototype.clear=function(){var e=pe(this.ha(!0)),t=this;U(e,(function(e){t.ra(e)}))},j(Uo,Fo),(t=Uo.prototype).set=function(e,t){try{this.a.setItem(e,t)}catch(n){if(0==this.a.length)throw"Storage mechanism: Storage disabled";throw"Storage mechanism: Quota exceeded"}},t.get=function(e){if(!p(e=this.a.getItem(e))&&null!==e)throw"Storage mechanism: Invalid value was encountered";return e},t.ra=function(e){this.a.removeItem(e)},t.ha=function(e){var t=0,n=this.a,r=new he;return r.next=function(){if(t>=n.length)throw fe;var r=n.key(t++);if(e)return r;if(!p(r=n.getItem(r)))throw"Storage mechanism: Invalid value was encountered";return r},r},t.clear=function(){this.a.clear()},t.key=function(e){return this.a.key(e)},j(Bo,Uo),j(qo,Uo),j(zo,Fo),zo.prototype.set=function(e,t){this.g.set(this.a+e,t)},zo.prototype.get=function(e){return this.g.get(this.a+e)},zo.prototype.ra=function(e){this.g.ra(this.a+e)},zo.prototype.ha=function(e){var t=this.g.ha(!0),n=this,r=new he;return r.next=function(){for(var r=t.next();r.substr(0,n.a.length)!=n.a;)r=t.next();return e?r.substr(n.a.length):n.g.get(r)},r},Vo(new Bo);var Ho=new qo,Ko=new Lo(Vo(Ho)?new zo(Ho,"firebaseui"):null),Wo={name:"pendingEmailCredential",storage:Ko},Go={name:"redirectStatus",storage:Ko},Yo={name:"redirectUrl",storage:Ko},$o={name:"emailForSignIn",storage:new Lo(new no(3600,"/"))},Qo={name:"pendingEncryptedCredential",storage:new Lo(new no(3600,"/"))};function Xo(e,t){return e.storage.get(t?e.name+":"+t:e.name)}
2function Jo(e,t){e.storage.a.ra(t?e.name+":"+t:e.name)}function Zo(e,t,n){e.storage.set(n?e.name+":"+n:e.name,t)}function ea(e){return Xo(Yo,e)||null}function ta(e){return oo(e=Xo(Wo,e)||null)}function na(e){Jo(Wo,e)}function ra(e,t){Zo(Wo,io(e),t)}function ia(e){return(e=Xo(Go,e)||null)&&"undefined"!==typeof e.tenantId?new ao(e.tenantId):null}function oa(){this.W={}}function aa(e,t,n){if(t.toLowerCase()in e.W)throw Error("Configuration "+t+" has already been defined.");e.W[t.toLowerCase()]=n}function sa(e,t,n){if(!(t.toLowerCase()in e.W))throw Error("Configuration "+t+" is not defined.");e.W[t.toLowerCase()]=n}function ua(e,t){if(!(e=e.get(t)))throw Error("Configuration "+t+" is required.");return e}function ca(){this.g=void 0,this.a={}}function la(e,t,n,r){for(var i=0;i<t.length;i++){var o=t.charAt(i);e.a[o]||(e.a[o]=new ca),e=e.a[o]}if(r&&void 0!==e.g)throw Error('The collection already contains the key "'+t+'"');e.g=n}function fa(e,t){for(var n in void 0!==e.g&&t.push(e.g),e.a)fa(e.a[n],t)}function ha(e,t,n){for(var r in void 0!==e.g&&n.push(t),e.a)ha(e.a[r],t+r,n)}function da(e){for(this.a=e,this.g=new ca,e=0;e<this.a.length;e++){var t=this.g.get("+"+this.a[e].b);t?t.push(this.a[e]):this.g.add("+"+this.a[e].b,[this.a[e]])}}function pa(e,t){var n={},r=0;for(void 0!==(e=e.g).g&&(n[r]=e.g);r<t.length;r++){var i=t.charAt(r);if(!(i in e.a))break;void 0!==(e=e.a[i]).g&&(n[r]=e.g)}for(var o in n)if(n.hasOwnProperty(o))return n[o];return[]}function ga(e){for(var t=0;t<ba.length;t++)if(ba[t].c===e)return ba[t];return null}function va(e){e=e.toUpperCase();for(var t=[],n=0;n<ba.length;n++)ba[n].f===e&&t.push(ba[n]);return t}function ma(e){if(0<e.length&&"+"==e.charAt(0)){e=e.substring(1);for(var t=[],n=0;n<ba.length;n++)ba[n].b==e&&t.push(ba[n]);e=t}else e=va(e);return e}function ya(e){e.sort((function(e,t){return e.name.localeCompare(t.name,"en")}))}oa.prototype.get=function(e){if(!(e.toLowerCase()in this.W))throw Error("Configuration "+e+" is not defined.");return this.W[e.toLowerCase()]},(t=ca.prototype).set=function(e,t){la(this,e,t,!1)},t.add=function(e,t){la(this,e,t,!0)},t.get=function(e){e:{for(var t=this,n=0;n<e.length;n++)if(!(t=t.a[e.charAt(n)])){e=void 0;break e}e=t}return e?e.g:void 0},t.la=function(){var e=[];return fa(this,e),e},t.ja=function(){var e=[];return ha(this,"",e),e},t.clear=function(){this.a={},this.g=void 0};var ba=[{name:"Afghanistan",c:"93-AF-0",b:"93",f:"AF"},{name:"\xc5land Islands",c:"358-AX-0",b:"358",f:"AX"},{name:"Albania",c:"355-AL-0",b:"355",f:"AL"},{name:"Algeria",c:"213-DZ-0",b:"213",f:"DZ"},{name:"American Samoa",c:"1-AS-0",b:"1",f:"AS"},{name:"Andorra",c:"376-AD-0",b:"376",f:"AD"},{name:"Angola",c:"244-AO-0",b:"244",f:"AO"},{name:"Anguilla",c:"1-AI-0",b:"1",f:"AI"},{name:"Antigua and Barbuda",c:"1-AG-0",b:"1",f:"AG"},{name:"Argentina",c:"54-AR-0",b:"54",f:"AR"},{name:"Armenia",c:"374-AM-0",b:"374",f:"AM"},{name:"Aruba",c:"297-AW-0",b:"297",f:"AW"},{name:"Ascension Island",c:"247-AC-0",b:"247",f:"AC"},{name:"Australia",c:"61-AU-0",b:"61",f:"AU"},{name:"Austria",c:"43-AT-0",b:"43",f:"AT"},{name:"Azerbaijan",c:"994-AZ-0",b:"994",f:"AZ"},{name:"Bahamas",c:"1-BS-0",b:"1",f:"BS"},{name:"Bahrain",c:"973-BH-0",b:"973",f:"BH"},{name:"Bangladesh",c:"880-BD-0",b:"880",f:"BD"},{name:"Barbados",c:"1-BB-0",b:"1",f:"BB"},{name:"Belarus",c:"375-BY-0",b:"375",f:"BY"},{name:"Belgium",c:"32-BE-0",b:"32",f:"BE"},{name:"Belize",c:"501-BZ-0",b:"501",f:"BZ"},{name:"Benin",c:"229-BJ-0",b:"229",f:"BJ"},{name:"Bermuda",c:"1-BM-0",b:"1",f:"BM"},{name:"Bhutan",c:"975-BT-0",b:"975",f:"BT"},{name:"Bolivia",c:"591-BO-0",b:"591",f:"BO"},{name:"Bosnia and Herzegovina",c:"387-BA-0",b:"387",f:"BA"},{name:"Botswana",c:"267-BW-0",b:"267",f:"BW"},{name:"Brazil",c:"55-BR-0",b:"55",f:"BR"},{name:"British Indian Ocean Territory",c:"246-IO-0",b:"246",f:"IO"},{name:"British Virgin Islands",c:"1-VG-0",b:"1",f:"VG"},{name:"Brunei",c:"673-BN-0",b:"673",f:"BN"},{name:"Bulgaria",c:"359-BG-0",b:"359",f:"BG"},{name:"Burkina Faso",c:"226-BF-0",b:"226",f:"BF"},{name:"Burundi",c:"257-BI-0",b:"257",f:"BI"},{name:"Cambodia",c:"855-KH-0",b:"855",f:"KH"},{name:"Cameroon",c:"237-CM-0",b:"237",f:"CM"},{name:"Canada",c:"1-CA-0",b:"1",f:"CA"},{name:"Cape Verde",c:"238-CV-0",b:"238",f:"CV"},{name:"Caribbean Netherlands",c:"599-BQ-0",b:"599",f:"BQ"},{name:"Cayman Islands",c:"1-KY-0",b:"1",f:"KY"},{name:"Central African Republic",c:"236-CF-0",b:"236",f:"CF"},{name:"Chad",c:"235-TD-0",b:"235",f:"TD"},{name:"Chile",c:"56-CL-0",b:"56",f:"CL"},{name:"China",c:"86-CN-0",b:"86",f:"CN"}
2,{name:"Christmas Island",c:"61-CX-0",b:"61",f:"CX"},{name:"Cocos [Keeling] Islands",c:"61-CC-0",b:"61",f:"CC"},{name:"Colombia",c:"57-CO-0",b:"57",f:"CO"},{name:"Comoros",c:"269-KM-0",b:"269",f:"KM"},{name:"Democratic Republic Congo",c:"243-CD-0",b:"243",f:"CD"},{name:"Republic of Congo",c:"242-CG-0",b:"242",f:"CG"},{name:"Cook Islands",c:"682-CK-0",b:"682",f:"CK"},{name:"Costa Rica",c:"506-CR-0",b:"506",f:"CR"},{name:"C\xf4te d'Ivoire",c:"225-CI-0",b:"225",f:"CI"},{name:"Croatia",c:"385-HR-0",b:"385",f:"HR"},{name:"Cuba",c:"53-CU-0",b:"53",f:"CU"},{name:"Cura\xe7ao",c:"599-CW-0",b:"599",f:"CW"},{name:"Cyprus",c:"357-CY-0",b:"357",f:"CY"},{name:"Czech Republic",c:"420-CZ-0",b:"420",f:"CZ"},{name:"Denmark",c:"45-DK-0",b:"45",f:"DK"},{name:"Djibouti",c:"253-DJ-0",b:"253",f:"DJ"},{name:"Dominica",c:"1-DM-0",b:"1",f:"DM"},{name:"Dominican Republic",c:"1-DO-0",b:"1",f:"DO"},{name:"East Timor",c:"670-TL-0",b:"670",f:"TL"},{name:"Ecuador",c:"593-EC-0",b:"593",f:"EC"},{name:"Egypt",c:"20-EG-0",b:"20",f:"EG"},{name:"El Salvador",c:"503-SV-0",b:"503",f:"SV"},{name:"Equatorial Guinea",c:"240-GQ-0",b:"240",f:"GQ"},{name:"Eritrea",c:"291-ER-0",b:"291",f:"ER"},{name:"Estonia",c:"372-EE-0",b:"372",f:"EE"},{name:"Ethiopia",c:"251-ET-0",b:"251",f:"ET"},{name:"Falkland Islands [Islas Malvinas]",c:"500-FK-0",b:"500",f:"FK"},{name:"Faroe Islands",c:"298-FO-0",b:"298",f:"FO"},{name:"Fiji",c:"679-FJ-0",b:"679",f:"FJ"},{name:"Finland",c:"358-FI-0",b:"358",f:"FI"},{name:"France",c:"33-FR-0",b:"33",f:"FR"},{name:"French Guiana",c:"594-GF-0",b:"594",f:"GF"},{name:"French Polynesia",c:"689-PF-0",b:"689",f:"PF"},{name:"Gabon",c:"241-GA-0",b:"241",f:"GA"},{name:"Gambia",c:"220-GM-0",b:"220",f:"GM"},{name:"Georgia",c:"995-GE-0",b:"995",f:"GE"},{name:"Germany",c:"49-DE-0",b:"49",f:"DE"},{name:"Ghana",c:"233-GH-0",b:"233",f:"GH"},{name:"Gibraltar",c:"350-GI-0",b:"350",f:"GI"},{name:"Greece",c:"30-GR-0",b:"30",f:"GR"},{name:"Greenland",c:"299-GL-0",b:"299",f:"GL"},{name:"Grenada",c:"1-GD-0",b:"1",f:"GD"},{name:"Guadeloupe",c:"590-GP-0",b:"590",f:"GP"},{name:"Guam",c:"1-GU-0",b:"1",f:"GU"},{name:"Guatemala",c:"502-GT-0",b:"502",f:"GT"},{name:"Guernsey",c:"44-GG-0",b:"44",f:"GG"},{name:"Guinea Conakry",c:"224-GN-0",b:"224",f:"GN"},{name:"Guinea-Bissau",c:"245-GW-0",b:"245",f:"GW"},{name:"Guyana",c:"592-GY-0",b:"592",f:"GY"},{name:"Haiti",c:"509-HT-0",b:"509",f:"HT"},{name:"Heard Island and McDonald Islands",c:"672-HM-0",b:"672",f:"HM"},{name:"Honduras",c:"504-HN-0",b:"504",f:"HN"},{name:"Hong Kong",c:"852-HK-0",b:"852",f:"HK"},{name:"Hungary",c:"36-HU-0",b:"36",f:"HU"},{name:"Iceland",c:"354-IS-0",b:"354",f:"IS"},{name:"India",c:"91-IN-0",b:"91",f:"IN"},{name:"Indonesia",c:"62-ID-0",b:"62",f:"ID"},{name:"Iran",c:"98-IR-0",b:"98",f:"IR"},{name:"Iraq",c:"964-IQ-0",b:"964",f:"IQ"},{name:"Ireland",c:"353-IE-0",b:"353",f:"IE"},{name:"Isle of Man",c:"44-IM-0",b:"44",f:"IM"},{name:"Israel",c:"972-IL-0",b:"972",f:"IL"},{name:"Italy",c:"39-IT-0",b:"39",f:"IT"},{name:"Jamaica",c:"1-JM-0",b:"1",f:"JM"},{name:"Japan",c:"81-JP-0",b:"81",f:"JP"},{name:"Jersey",c:"44-JE-0",b:"44",f:"JE"},{name:"Jordan",c:"962-JO-0",b:"962",f:"JO"},{name:"Kazakhstan",c:"7-KZ-0",b:"7",f:"KZ"},{name:"Kenya",c:"254-KE-0",b:"254",f:"KE"},{name:"Kiribati",c:"686-KI-0",b:"686",f:"KI"},{name:"Kosovo",c:"377-XK-0",b:"377",f:"XK"},{name:"Kosovo",c:"381-XK-0",b:"381",f:"XK"},{name:"Kosovo",c:"386-XK-0",b:"386",f:"XK"},{name:"Kuwait",c:"965-KW-0",b:"965",f:"KW"},{name:"Kyrgyzstan",c:"996-KG-0",b:"996",f:"KG"},{name:"Laos",c:"856-LA-0",b:"856",f:"LA"},{name:"Latvia",c:"371-LV-0",b:"371",f:"LV"},{name:"Lebanon",c:"961-LB-0",b:"961",f:"LB"},{name:"Lesotho",c:"266-LS-0",b:"266",f:"LS"},{name:"Liberia",c:"231-LR-0",b:"231",f:"LR"},{name:"Libya",c:"218-LY-0",b:"218",f:"LY"},{name:"Liechtenstein",c:"423-LI-0",b:"423",f:"LI"},{name:"Lithuania",c:"370-LT-0",b:"370",f:"LT"},{name:"Luxembourg",c:"352-LU-0",b:"352",f:"LU"},{name:"Macau",c:"853-MO-0",b:"853",f:"MO"},{name:"Macedonia",c:"389-MK-0",b:"389",f:"MK"},{name:"Madagascar",c:"261-MG-0",b:"261",f:"MG"},{name:"Malawi",c:"265-MW-0",b:"265",f:"MW"},{name:"Malaysia",c:"60-MY-0",b:"60",f:"MY"}
2,{name:"Maldives",c:"960-MV-0",b:"960",f:"MV"},{name:"Mali",c:"223-ML-0",b:"223",f:"ML"},{name:"Malta",c:"356-MT-0",b:"356",f:"MT"},{name:"Marshall Islands",c:"692-MH-0",b:"692",f:"MH"},{name:"Martinique",c:"596-MQ-0",b:"596",f:"MQ"},{name:"Mauritania",c:"222-MR-0",b:"222",f:"MR"},{name:"Mauritius",c:"230-MU-0",b:"230",f:"MU"},{name:"Mayotte",c:"262-YT-0",b:"262",f:"YT"},{name:"Mexico",c:"52-MX-0",b:"52",f:"MX"},{name:"Micronesia",c:"691-FM-0",b:"691",f:"FM"},{name:"Moldova",c:"373-MD-0",b:"373",f:"MD"},{name:"Monaco",c:"377-MC-0",b:"377",f:"MC"},{name:"Mongolia",c:"976-MN-0",b:"976",f:"MN"},{name:"Montenegro",c:"382-ME-0",b:"382",f:"ME"},{name:"Montserrat",c:"1-MS-0",b:"1",f:"MS"},{name:"Morocco",c:"212-MA-0",b:"212",f:"MA"},{name:"Mozambique",c:"258-MZ-0",b:"258",f:"MZ"},{name:"Myanmar [Burma]",c:"95-MM-0",b:"95",f:"MM"},{name:"Namibia",c:"264-NA-0",b:"264",f:"NA"},{name:"Nauru",c:"674-NR-0",b:"674",f:"NR"},{name:"Nepal",c:"977-NP-0",b:"977",f:"NP"},{name:"Netherlands",c:"31-NL-0",b:"31",f:"NL"},{name:"New Caledonia",c:"687-NC-0",b:"687",f:"NC"},{name:"New Zealand",c:"64-NZ-0",b:"64",f:"NZ"},{name:"Nicaragua",c:"505-NI-0",b:"505",f:"NI"},{name:"Niger",c:"227-NE-0",b:"227",f:"NE"},{name:"Nigeria",c:"234-NG-0",b:"234",f:"NG"},{name:"Niue",c:"683-NU-0",b:"683",f:"NU"},{name:"Norfolk Island",c:"672-NF-0",b:"672",f:"NF"},{name:"North Korea",c:"850-KP-0",b:"850",f:"KP"},{name:"Northern Mariana Islands",c:"1-MP-0",b:"1",f:"MP"},{name:"Norway",c:"47-NO-0",b:"47",f:"NO"},{name:"Oman",c:"968-OM-0",b:"968",f:"OM"},{name:"Pakistan",c:"92-PK-0",b:"92",f:"PK"},{name:"Palau",c:"680-PW-0",b:"680",f:"PW"},{name:"Palestinian Territories",c:"970-PS-0",b:"970",f:"PS"},{name:"Panama",c:"507-PA-0",b:"507",f:"PA"},{name:"Papua New Guinea",c:"675-PG-0",b:"675",f:"PG"},{name:"Paraguay",c:"595-PY-0",b:"595",f:"PY"},{name:"Peru",c:"51-PE-0",b:"51",f:"PE"},{name:"Philippines",c:"63-PH-0",b:"63",f:"PH"},{name:"Poland",c:"48-PL-0",b:"48",f:"PL"},{name:"Portugal",c:"351-PT-0",b:"351",f:"PT"},{name:"Puerto Rico",c:"1-PR-0",b:"1",f:"PR"},{name:"Qatar",c:"974-QA-0",b:"974",f:"QA"},{name:"R\xe9union",c:"262-RE-0",b:"262",f:"RE"},{name:"Romania",c:"40-RO-0",b:"40",f:"RO"},{name:"Russia",c:"7-RU-0",b:"7",f:"RU"},{name:"Rwanda",c:"250-RW-0",b:"250",f:"RW"},{name:"Saint Barth\xe9lemy",c:"590-BL-0",b:"590",f:"BL"},{name:"Saint Helena",c:"290-SH-0",b:"290",f:"SH"},{name:"St. Kitts",c:"1-KN-0",b:"1",f:"KN"},{name:"St. Lucia",c:"1-LC-0",b:"1",f:"LC"},{name:"Saint Martin",c:"590-MF-0",b:"590",f:"MF"},{name:"Saint Pierre and Miquelon",c:"508-PM-0",b:"508",f:"PM"},{name:"St. Vincent",c:"1-VC-0",b:"1",f:"VC"},{name:"Samoa",c:"685-WS-0",b:"685",f:"WS"},{name:"San Marino",c:"378-SM-0",b:"378",f:"SM"},{name:"S\xe3o Tom\xe9 and Pr\xedncipe",c:"239-ST-0",b:"239",f:"ST"},{name:"Saudi Arabia",c:"966-SA-0",b:"966",f:"SA"},{name:"Senegal",c:"221-SN-0",b:"221",f:"SN"},{name:"Serbia",c:"381-RS-0",b:"381",f:"RS"},{name:"Seychelles",c:"248-SC-0",b:"248",f:"SC"},{name:"Sierra Leone",c:"232-SL-0",b:"232",f:"SL"},{name:"Singapore",c:"65-SG-0",b:"65",f:"SG"},{name:"Sint Maarten",c:"1-SX-0",b:"1",f:"SX"},{name:"Slovakia",c:"421-SK-0",b:"421",f:"SK"},{name:"Slovenia",c:"386-SI-0",b:"386",f:"SI"},{name:"Solomon Islands",c:"677-SB-0",b:"677",f:"SB"},{name:"Somalia",c:"252-SO-0",b:"252",f:"SO"},{name:"South Africa",c:"27-ZA-0",b:"27",f:"ZA"},{name:"South Georgia and the South Sandwich Islands",c:"500-GS-0",b:"500",f:"GS"},{name:"South Korea",c:"82-KR-0",b:"82",f:"KR"},{name:"South Sudan",c:"211-SS-0",b:"211",f:"SS"},{name:"Spain",c:"34-ES-0",b:"34",f:"ES"},{name:"Sri Lanka",c:"94-LK-0",b:"94",f:"LK"},{name:"Sudan",c:"249-SD-0",b:"249",f:"SD"},{name:"Suriname",c:"597-SR-0",b:"597",f:"SR"},{name:"Svalbard and Jan Mayen",c:"47-SJ-0",b:"47",f:"SJ"},{name:"Swaziland",c:"268-SZ-0",b:"268",f:"SZ"},{name:"Sweden",c:"46-SE-0",b:"46",f:"SE"},{name:"Switzerland",c:"41-CH-0",b:"41",f:"CH"},{name:"Syria",c:"963-SY-0",b:"963",f:"SY"},{name:"Taiwan",c:"886-TW-0",b:"886",f:"TW"},{name:"Tajikistan",c:"992-TJ-0",b:"992",f:"TJ"},{name:"Tanzania",c:"255-TZ-0",b:"255",f:"TZ"},{name:"Thailand",c:"66-TH-0",b:"66",f:"TH"},{name:"Togo",c:"228-TG-0",b:"228",f:"TG"},{name:"Tokelau",c:"690-TK-0",b:"690",f:"TK"},{name:"Tonga",c:"676-TO-0",b:"676",f:"TO"}
2,{name:"Trinidad/Tobago",c:"1-TT-0",b:"1",f:"TT"},{name:"Tunisia",c:"216-TN-0",b:"216",f:"TN"},{name:"Turkey",c:"90-TR-0",b:"90",f:"TR"},{name:"Turkmenistan",c:"993-TM-0",b:"993",f:"TM"},{name:"Turks and Caicos Islands",c:"1-TC-0",b:"1",f:"TC"},{name:"Tuvalu",c:"688-TV-0",b:"688",f:"TV"},{name:"U.S. Virgin Islands",c:"1-VI-0",b:"1",f:"VI"},{name:"Uganda",c:"256-UG-0",b:"256",f:"UG"},{name:"Ukraine",c:"380-UA-0",b:"380",f:"UA"},{name:"United Arab Emirates",c:"971-AE-0",b:"971",f:"AE"},{name:"United Kingdom",c:"44-GB-0",b:"44",f:"GB"},{name:"United States",c:"1-US-0",b:"1",f:"US"},{name:"Uruguay",c:"598-UY-0",b:"598",f:"UY"},{name:"Uzbekistan",c:"998-UZ-0",b:"998",f:"UZ"},{name:"Vanuatu",c:"678-VU-0",b:"678",f:"VU"},{name:"Vatican City",c:"379-VA-0",b:"379",f:"VA"},{name:"Venezuela",c:"58-VE-0",b:"58",f:"VE"},{name:"Vietnam",c:"84-VN-0",b:"84",f:"VN"},{name:"Wallis and Futuna",c:"681-WF-0",b:"681",f:"WF"},{name:"Western Sahara",c:"212-EH-0",b:"212",f:"EH"},{name:"Yemen",c:"967-YE-0",b:"967",f:"YE"},{name:"Zambia",c:"260-ZM-0",b:"260",f:"ZM"}
2,{name:"Zimbabwe",c:"263-ZW-0",b:"263",f:"ZW"}];ya(ba);var _a=new da(ba);function wa(e,t){this.a=e,this.Aa=t}function ka(e){e=X(e);var t=pa(_a,e);return 0<t.length?new wa("1"==t[0].b?"1-US-0":t[0].c,X(e.substr(t[0].b.length+1))):null}function Ea(e){var t=ga(e.a);if(!t)throw Error("Country ID "+e.a+" not found.");return"+"+t.b+e.Aa}function Sa(e,t){for(var n=0;n<e.length;n++)if(!z(Ia,e[n])&&(null!==xa&&e[n]in xa||z(t,e[n])))return e[n];return null}var Ia=["emailLink","password","phone"],xa={"facebook.com":"FacebookAuthProvider","github.com":"GithubAuthProvider","google.com":"GoogleAuthProvider",password:"EmailAuthProvider","twitter.com":"TwitterAuthProvider",phone:"PhoneAuthProvider"};function Ta(){this.a=new oa,aa(this.a,"acUiConfig"),aa(this.a,"autoUpgradeAnonymousUsers"),aa(this.a,"callbacks"),aa(this.a,"credentialHelper",ts),aa(this.a,"immediateFederatedRedirect",!1),aa(this.a,"popupMode",!1),aa(this.a,"privacyPolicyUrl"),aa(this.a,"queryParameterForSignInSuccessUrl","signInSuccessUrl"),aa(this.a,"queryParameterForWidgetMode","mode"),aa(this.a,"signInFlow"),aa(this.a,"signInOptions"),aa(this.a,"signInSuccessUrl"),aa(this.a,"siteName"),aa(this.a,"tosUrl"),aa(this.a,"widgetUrl")}function Ca(e){var t=!!e.a.get("autoUpgradeAnonymousUsers");return t&&!Ga(e)&&Gi('Missing "signInFailure" callback: "signInFailure" callback needs to be provided when "autoUpgradeAnonymousUsers" is set to true.',void 0),t}function Oa(e){e=e.a.get("signInOptions")||[];for(var t=[],n=0;n<e.length;n++){var r=e[n];(r=E(r)?r:{provider:r}).provider&&t.push(r)}return t}function Aa(e,t){e=Oa(e);for(var n=0;n<e.length;n++)if(e[n].provider===t)return e[n];return null}function Na(e){return B(Oa(e),(function(e){return e.provider}))}function Pa(e,t){e=Ra(e);for(var n=0;n<e.length;n++)if(e[n].providerId===t)return e[n];return null}function Ra(e){return B(Oa(e),(function(e){if(xa[e.provider]||z(as,e.provider)){for(var t in e={providerId:e.provider,S:e.providerName||null,V:e.fullLabel||null,ta:e.buttonColor||null,za:e.iconUrl?kt(St(e.iconUrl)).toString():null})null===e[t]&&delete e[t];return e}return{providerId:e.provider,S:e.providerName||null,V:e.fullLabel||null,ta:e.buttonColor||null,za:e.iconUrl?kt(St(e.iconUrl)).toString():null,Ob:e.loginHintKey||null}}))}function ja(e){var t=Aa(e,r.a.auth.GoogleAuthProvider.PROVIDER_ID);return t&&t.clientId&&function(e){if("http:"!==(window.location&&window.location.protocol)&&"https:"!==(window.location&&window.location.protocol))return ts;if((e=e.a.get("credentialHelper"))===Za)return ts;for(var t in ns)if(ns[t]===e)return ns[t];return ts}(e)===es&&t.clientId||null}function Da(e,t){return e=(e=Aa(e,t))&&e.scopes,Array.isArray(e)?e:[]}function Ma(e,t){return E(e=(e=Aa(e,t))&&e.customParameters)?(e=ue(e),t===r.a.auth.GoogleAuthProvider.PROVIDER_ID&&delete e.login_hint,t===r.a.auth.GithubAuthProvider.PROVIDER_ID&&delete e.login,e):null}function La(e){if(!(e=Aa(e,r.a.auth.PhoneAuthProvider.PROVIDER_ID)))return null;var t=e.whitelistedCountries,n=e.blacklistedCountries;if("undefined"!==typeof t&&(!Array.isArray(t)||0==t.length))throw Error("WhitelistedCountries must be a non-empty array.");if("undefined"!==typeof n&&!Array.isArray(n))throw Error("BlacklistedCountries must be an array.");if(t&&n)throw Error("Both whitelistedCountries and blacklistedCountries are provided.");if(!t&&!n)return ba;if(e=[],t){n={};for(var i=0;i<t.length;i++)for(var o=ma(t[i]),a=0;a<o.length;a++)n[o[a].c]=o[a];for(var s in n)n.hasOwnProperty(s)&&e.push(n[s])}else{for(s={},t=0;t<n.length;t++)for(o=ma(n[t]),i=0;i<o.length;i++)s[o[i].c]=o[i];for(o=0;o<ba.length;o++)null!==s&&ba[o].c in s||e.push(ba[o])}return e}function Fa(e){return ua(e.a,"queryParameterForWidgetMode")}function Ua(e){var t=e.a.get("tosUrl")||null;if(e=e.a.get("privacyPolicyUrl")||null,t&&!e&&Xi("Privacy Policy URL is missing, the link will not be displayed."),t&&e){if("function"===typeof t)return t;if("string"===typeof t)return function(){ii(t)}}return null}function Va(e){var t=e.a.get("tosUrl")||null,n=e.a.get("privacyPolicyUrl")||null;if(n&&!t&&Xi("Term of Service URL is missing, the link will not be displayed."),t&&n){if("function"===typeof n)return n;if("string"===typeof n)return function(){ii(n)}}return null}function Ba(e){return!(e=Aa(e,r.a.auth.EmailAuthProvider.PROVIDER_ID))||"undefined"===typeof e.requireDisplayName||!!e.requireDisplayName}function qa(e){return!(!(e=Aa(e,r.a.auth.EmailAuthProvider.PROVIDER_ID))||e.signInMethod!==r.a.auth.EmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD)}function za(e){var t=!!e.a.get("immediateFederatedRedirect"),n=Na(e);
2return e=Ha(e),t&&1==n.length&&!z(Ia,n[0])&&e==rs}function Ha(e){for(var t in e=e.a.get("signInFlow"),is)if(is[t]==e)return is[t];return rs}function Ka(e){return Ya(e).signInSuccess||null}function Wa(e){return Ya(e).signInSuccessWithAuthResult||null}function Ga(e){return Ya(e).signInFailure||null}function Ya(e){return e.a.get("callbacks")||{}}var $a,Qa,Xa,Ja,Za="accountchooser.com",es="googleyolo",ts="none",ns={kc:Za,nc:es,NONE:ts},rs="redirect",is={qc:"popup",rc:rs},os={mc:"callback",RECOVER_EMAIL:"recoverEmail",sc:"resetPassword",REVERT_SECOND_FACTOR_ADDITION:"revertSecondFactorAddition",tc:"select",uc:"signIn",VERIFY_AND_CHANGE_EMAIL:"verifyAndChangeEmail",VERIFY_EMAIL:"verifyEmail"},as=["anonymous"],ss=["sitekey","tabindex","callback","expired-callback"],us={};function cs(e,t,n,r){us[e].apply(null,Array.prototype.slice.call(arguments,1))}function ls(e){return e.classList?e.classList:p(e=e.className)&&e.match(/\S+/g)||[]}function fs(e,t){return e.classList?e.classList.contains(t):z(ls(e),t)}function hs(e,t){e.classList?e.classList.add(t):fs(e,t)||(e.className+=0<e.className.length?" "+t:t)}function ds(e,t){e.classList?e.classList.remove(t):fs(e,t)&&(e.className=V(ls(e),(function(e){return e!=t})).join(" "))}function ps(e){var t=e.type;switch(p(t)&&t.toLowerCase()){case"checkbox":case"radio":return e.checked?e.value:null;case"select-one":return 0<=(t=e.selectedIndex)?e.options[t].value:null;case"select-multiple":t=[];for(var n,r=0;n=e.options[r];r++)n.selected&&t.push(n.value);return t.length?t:null;default:return null!=e.value?e.value:null}}function gs(e,t){var n=e.type;switch(p(n)&&n.toLowerCase()){case"checkbox":case"radio":e.checked=t;break;case"select-one":if(e.selectedIndex=-1,p(t))for(var r=0;n=e.options[r];r++)if(n.value==t){n.selected=!0;break}break;case"select-multiple":for(p(t)&&(t=[t]),r=0;n=e.options[r];r++)if(n.selected=!1,t)for(var i,o=0;i=t[o];o++)n.value==i&&(n.selected=!0);break;default:e.value=null!=t?t:""}}function vs(e,t,n,r,i,o){if(it&&!dt("525"))return!0;if(at&&i)return ms(e);if(i&&!r)return!1;if(!rt&&("number"==typeof t&&(t=ys(t)),(!n||at)&&(17==t||18==t||at&&91==t)||at&&16==t&&(r||o)))return!1;if((it||tt)&&r&&n)switch(e){case 220:case 219:case 221:case 192:case 186:case 189:case 187:case 188:case 190:case 191:case 192:case 222:return!1}if(et&&r&&t==e)return!1;switch(e){case 13:return!rt||!o&&!i&&!(n&&r);case 27:return!(it||tt||rt)}return(!rt||!(r||i||o))&&ms(e)}function ms(e){if(48<=e&&57>=e||96<=e&&106>=e||65<=e&&90>=e||(it||tt)&&0==e)return!0;switch(e){case 32:case 43:case 63:case 64:case 107:case 109:case 110:case 111:case 186:case 59:case 189:case 187:case 61:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:case 163:return!0;case 173:return rt;default:return!1}}function ys(e){if(rt)e=function(e){switch(e){case 61:return 187;case 59:return 186;case 173:return 189;case 224:return 91;case 0:return 224;default:return e}}(e);else if(at&&it)switch(e){case 93:e=91}return e}function bs(e){pr.call(this),this.a=e,nr(e,"keydown",this.g,!1,this),nr(e,"click",this.h,!1,this)}function _s(e,t){var n=new ks(t);if(gr(e,n)){n=new ws(t);try{gr(e,n)}finally{t.stopPropagation()}}}function ws(e){Kn.call(this,e.a),this.type="action"}function ks(e){Kn.call(this,e.a),this.type="beforeaction"}function Es(e){pr.call(this),this.a=e,e=et?"focusout":"blur",this.g=nr(this.a,et?"focusin":"focus",this,!et),this.h=nr(this.a,e,this,!et)}function Ss(e,t){pr.call(this),this.g=e||1,this.a=t||h,this.h=C(this.gc,this),this.j=P()}function Is(e){e.Ka=!1,e.aa&&(e.a.clearTimeout(e.aa),e.aa=null)}function xs(e){Dn.call(this),this.g=e,this.a={}}j(bs,pr),bs.prototype.g=function(e){(13==e.keyCode||it&&3==e.keyCode)&&_s(this,e)},bs.prototype.h=function(e){_s(this,e)},bs.prototype.m=function(){bs.K.m.call(this),or(this.a,"keydown",this.g,!1,this),or(this.a,"click",this.h,!1,this),delete this.a},j(ws,Kn),j(ks,Kn),j(Es,pr),Es.prototype.handleEvent=function(e){var t=new Kn(e.a);t.type="focusin"==e.type||"focus"==e.type?"focusin":"focusout",gr(this,t)},Es.prototype.m=function(){Es.K.m.call(this),ar(this.g),ar(this.h),delete this.a},j(Ss,pr),(t=Ss.prototype).Ka=!1,t.aa=null,t.gc=function(){if(this.Ka){var e=P()-this.j;0<e&&e<.8*this.g?this.aa=this.a.setTimeout(this.h,this.g-e):(this.aa&&(this.a.clearTimeout(this.aa),this.aa=null),gr(this,"tick"),this.Ka&&(Is(this),this.start()))}},t.start=function(){this.Ka=!0,this.aa||(this.aa=this.a.setTimeout(this.h,this.g),this.j=P())},t.m=function(){Ss.K.m.call(this),Is(this),delete this.a},j(xs,Dn);var Ts=[];function Cs(e,t,n,r){_(n)||(n&&(Ts[0]=n.toString()),n=Ts);for(var i=0;i<n.length;i++){var o=nr(t,n[i],r||e.handleEvent,!1,e.g||e);if(!o)break;e.a[o.key]=o}}function Os(e){se(e.a,(function(e,t){this.a.hasOwnProperty(t)&&ar(e)}),e),e.a={}}function As(e){pr.call(this),this.a=null,this.g=e,e=et||tt||it&&!dt("531")&&"TEXTAREA"==e.tagName,this.h=new xs(this),Cs(this.h,this.g,e?["keydown","paste","cut","drop","input"]:"input",this)}function Ns(e){null!=e.a&&(h.clearTimeout(e.a),e.a=null)}function Ps(e){return(e=new Kn(e.a)).type="input",e}function Rs(e,t){pr.call(this),e&&(this.Oa&&Fs(this),this.qa=e,this.Na=nr(this.qa,"keypress",this,t),this.Ya=nr(this.qa,"keydown",this.Jb,t,this),this.Oa=nr(this.qa,"keyup",this.Kb,t,this))}xs.prototype.m=function(){xs.K.m.call(this),Os(this)},xs.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},j(As,pr),As.prototype.handleEvent=function(e){if("input"==e.type)et&&dt(10)&&0==e.keyCode&&0==e.j||(Ns(this),gr(this,Ps(e)));else if("keydown"!=e.type||function(e){if(e.altKey&&!e.ctrlKey||e.metaKey||112<=e.keyCode&&123>
2=e.keyCode)return!1;if(ms(e.keyCode))return!0;switch(e.keyCode){case 18:case 20:case 93:case 17:case 40:case 35:case 27:case 36:case 45:case 37:case 224:case 91:case 144:case 12:case 34:case 33:case 19:case 255:case 44:case 39:case 145:case 16:case 38:case 252:case 224:case 92:return!1;case 0:return!rt;default:return 166>e.keyCode||183<e.keyCode}}(e)){var t="keydown"==e.type?this.g.value:null;et&&229==e.keyCode&&(t=null);var n=Ps(e);Ns(this),this.a=function(e,t){if(k(e))t&&(e=C(e,t));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=C(e.handleEvent,e)}return 2147483647<Number(0)?-1:h.setTimeout(e,0)}((function(){this.a=null,this.g.value!=t&&gr(this,n)}),this)}},As.prototype.m=function(){As.K.m.call(this),this.h.o(),Ns(this),delete this.g},j(Rs,pr),(t=Rs.prototype).qa=null,t.Na=null,t.Ya=null,t.Oa=null,t.R=-1,t.X=-1,t.Ua=!1;var js={3:13,12:144,63232:38,63233:40,63234:37,63235:39,63236:112,63237:113,63238:114,63239:115,63240:116,63241:117,63242:118,63243:119,63244:120,63245:121,63246:122,63247:123,63248:44,63272:46,63273:36,63275:35,63276:33,63277:34,63289:144,63302:45},Ds={Up:38,Down:40,Left:37,Right:39,Enter:13,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"U+007F":46,Home:36,End:35,PageUp:33,PageDown:34,Insert:45},Ms=!it||dt("525"),Ls=at&&rt;function Fs(e){e.Na&&(ar(e.Na),ar(e.Ya),ar(e.Oa),e.Na=null,e.Ya=null,e.Oa=null),e.qa=null,e.R=-1,e.X=-1}function Us(e,t,n,r){Kn.call(this,r),this.type="key",this.keyCode=e,this.j=t,this.repeat=n}function Vs(e,t,n,r){this.top=e,this.right=t,this.bottom=n,this.left=r}function Bs(e,t){var n=Wt(e);return n.defaultView&&n.defaultView.getComputedStyle&&(e=n.defaultView.getComputedStyle(e,null))&&(e[t]||e.getPropertyValue(t))||""}function qs(e){try{var t=e.getBoundingClientRect()}catch(n){return{left:0,top:0,right:0,bottom:0}}return et&&e.ownerDocument.body&&(e=e.ownerDocument,t.left-=e.documentElement.clientLeft+e.body.clientLeft,t.top-=e.documentElement.clientTop+e.body.clientTop),t}function zs(e){var t=Wt(e),n=new Lt(0,0),r=t?Wt(t):document;return e==(r=!et||9<=Number(ft)||"CSS1Compat"==Ut(r).a.compatMode?r.documentElement:r.body)||(e=qs(e),t=Ht(r=Ut(t).a),r=r.parentWindow||r.defaultView,t=et&&dt("10")&&r.pageYOffset!=t.scrollTop?new Lt(t.scrollLeft,t.scrollTop):new Lt(r.pageXOffset||t.scrollLeft,r.pageYOffset||t.scrollTop),n.a=e.left+t.a,n.g=e.top+t.g),n}(t=Rs.prototype).Jb=function(e){(it||tt)&&(17==this.R&&!e.ctrlKey||18==this.R&&!e.altKey||at&&91==this.R&&!e.metaKey)&&(this.X=this.R=-1),-1==this.R&&(e.ctrlKey&&17!=e.keyCode?this.R=17:e.altKey&&18!=e.keyCode?this.R=18:e.metaKey&&91!=e.keyCode&&(this.R=91)),Ms&&!vs(e.keyCode,this.R,e.shiftKey,e.ctrlKey,e.altKey,e.metaKey)?this.handleEvent(e):(this.X=ys(e.keyCode),Ls&&(this.Ua=e.altKey))},t.Kb=function(e){this.X=this.R=-1,this.Ua=e.altKey},t.handleEvent=function(e){var t=e.a,n=t.altKey;if(et&&"keypress"==e.type)var r=this.X,i=13!=r&&27!=r?t.keyCode:0;else(it||tt)&&"keypress"==e.type?(r=this.X,i=0<=t.charCode&&63232>t.charCode&&ms(r)?t.charCode:0):Ze&&!it?i=ms(r=this.X)?t.keyCode:0:("keypress"==e.type?(Ls&&(n=this.Ua),t.keyCode==t.charCode?32>t.keyCode?(r=t.keyCode,i=0):(r=this.X,i=t.charCode):(r=t.keyCode||this.X,i=t.charCode||0)):(r=t.keyCode||this.X,i=t.charCode||0),at&&63==i&&224==r&&(r=191));var o=r=ys(r);r?63232<=r&&r in js?o=js[r]:25==r&&e.shiftKey&&(o=9):t.keyIdentifier&&t.keyIdentifier in Ds&&(o=Ds[t.keyIdentifier]),rt&&Ms&&"keypress"==e.type&&!vs(o,this.R,e.shiftKey,e.ctrlKey,n,e.metaKey)||(e=o==this.R,this.R=o,(t=new Us(o,i,e,t)).altKey=n,gr(this,t))},t.N=function(){return this.qa},t.m=function(){Rs.K.m.call(this),Fs(this)},j(Us,Kn),Vs.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"},Vs.prototype.ceil=function(){return this.top=Math.ceil(this.top),this.right=Math.ceil(this.right),this.bottom=Math.ceil(this.bottom),this.left=Math.ceil(this.left),this},Vs.prototype.floor=function(){return this.top=Math.floor(this.top),this.right=Math.floor(this.right),this.bottom=Math.floor(this.bottom),this.left=Math.floor(this.left),this},Vs.prototype.round=function(){return this.top=Math.round(this.top),this.right=Math.round(this.right),this.bottom=Math.round(this.bottom),this.left=Math.round(this.left),this};var Hs={thin:2,medium:4,thick:6};function Ks(e,t){if("none"==(e.currentStyle?e.currentStyle[t+"Style"]:null))return 0;var n=e.currentStyle?e.currentStyle[t+"Width"]:null;if(n in Hs)e=Hs[n];else if(/^\d+px?$/.test(n))e=parseInt(n,10);else{t=e.style.left;var r=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,e.style.left=n,n=e.style.pixelLeft,e.style.left=t,e.runtimeStyle.left=r,e=+n}return e}function Ws(){}function Gs(e){pr.call(this),this.s=e||Ut(),this.cb=null,this.na=!1,this.g=null,this.L=void 0,this.oa=this.Ea=this.Y=null}function Ys(e,t){return e.g?Bt(t,e.g||e.s.a):null}function $s(e){return e.L||(e.L=new xs(e)),e.L}function Qs(e,t){e.Ea&&U(e.Ea,t,void 0)}function Xs(e,t){var n=Yt(e,"firebaseui-textfield");t?(ds(e,"firebaseui-input-invalid"),hs(e,"firebaseui-input"),n&&ds(n,"firebaseui-textfield-invalid")):(ds(e,"firebaseui-input"),hs(e,"firebaseui-input-invalid"),n&&hs(n,"firebaseui-textfield-invalid"))}
2function Js(e,t,n){Fn(e,O(Un,t=new As(t))),Cs($s(e),t,"input",n)}function Zs(e,t,n){Fn(e,O(Un,t=new Rs(t))),Cs($s(e),t,"key",(function(e){13==e.keyCode&&(e.stopPropagation(),e.preventDefault(),n(e))}))}function eu(e,t,n){Fn(e,O(Un,t=new bs(t))),Cs($s(e),t,"action",(function(e){e.stopPropagation(),e.preventDefault(),n(e)}))}function tu(e){hs(e,"firebaseui-hidden")}function nu(e,t){t&&Gt(e,t),ds(e,"firebaseui-hidden")}function ru(e){return!fs(e,"firebaseui-hidden")&&"none"!=e.style.display}function iu(e){var t=(e=e||{}).email,n=e.disabled,r='<div class="firebaseui-textfield mdl-textfield mdl-js-textfield mdl-textfield--floating-label"><label class="mdl-textfield__label firebaseui-label" for="ui-sign-in-email-input">';return r=e.wc?r+"Enter new email address":r+"Email",r+='</label><input type="email" name="email" id="ui-sign-in-email-input" autocomplete="username" class="mdl-textfield__input firebaseui-input firebaseui-id-email" value="'+pn(null!=t?t:"")+'"'+(n?"disabled":"")+'></div><div class="firebaseui-error-wrapper"><p class="firebaseui-error firebaseui-text-input-error firebaseui-hidden firebaseui-id-email-error"></p></div>',ln(r)}function ou(e){var t='<button type="submit" class="firebaseui-id-submit firebaseui-button mdl-button mdl-js-button mdl-button--raised mdl-button--colored">';return t=(e=(e=e||{}).label)?t+an(e):t+"Next",ln(t+"</button>")}function au(){var e=""+ou({label:hn("Sign In")});return ln(e)}function su(){var e=""+ou({label:hn("Save")});return ln(e)}function uu(){var e=""+ou({label:hn("Continue")});return ln(e)}function cu(e){var t='<div class="firebaseui-new-password-component"><div class="firebaseui-textfield mdl-textfield mdl-js-textfield mdl-textfield--floating-label"><label class="mdl-textfield__label firebaseui-label" for="ui-sign-in-new-password-input">';return t=(e=(e=e||{}).label)?t+an(e):t+"Choose password",ln(t+'</label><input type="password" name="newPassword" id="ui-sign-in-new-password-input" autocomplete="new-password" class="mdl-textfield__input firebaseui-input firebaseui-id-new-password"></div><a href="javascript:void(0)" class="firebaseui-input-floating-button firebaseui-id-password-toggle firebaseui-input-toggle-on firebaseui-input-toggle-blur"></a><div class="firebaseui-error-wrapper"><p class="firebaseui-error firebaseui-text-input-error firebaseui-hidden firebaseui-id-new-password-error"></p></div></div>')}function lu(){var e='<div class="firebaseui-textfield mdl-textfield mdl-js-textfield mdl-textfield--floating-label"><label class="mdl-textfield__label firebaseui-label" for="ui-sign-in-password-input">';return ln((e={}.current?e+"Current password":e+"Password")+'</label><input type="password" name="password" id="ui-sign-in-password-input" autocomplete="current-password" class="mdl-textfield__input firebaseui-input firebaseui-id-password"></div><div class="firebaseui-error-wrapper"><p class="firebaseui-error firebaseui-text-input-error firebaseui-hidden firebaseui-id-password-error"></p></div>')}function fu(){return ln('<a class="firebaseui-link firebaseui-id-secondary-link" href="javascript:void(0)">Trouble signing in?</a>')}function hu(e){var t='<button class="firebaseui-id-secondary-link firebaseui-button mdl-button mdl-js-button mdl-button--primary">';return t=(e=(e=e||{}).label)?t+an(e):t+"Cancel",ln(t+"</button>")}function du(e){var t="";return e.F&&e.D&&(t+='<ul class="firebaseui-tos-list firebaseui-tos"><li class="firebaseui-inline-list-item"><a href="javascript:void(0)" class="firebaseui-link firebaseui-tos-link" target="_blank">Terms of Service</a></li><li class="firebaseui-inline-list-item"><a href="javascript:void(0)" class="firebaseui-link firebaseui-pp-link" target="_blank">Privacy Policy</a></li></ul>'),ln(t)}function pu(e){var t="";return e.F&&e.D&&(t+='<p class="firebaseui-tos firebaseui-tospp-full-message">By continuing, you are indicating that you accept our <a href="javascript:void(0)" class="firebaseui-link firebaseui-tos-link" target="_blank">Terms of Service</a> and <a href="javascript:void(0)" class="firebaseui-link firebaseui-pp-link" target="_blank">Privacy Policy</a>.</p>'),ln(t)}function gu(e){return e='<div class="firebaseui-info-bar firebaseui-id-info-bar"><p class="firebaseui-info-bar-message">'+an(e.message)+'&nbsp;&nbsp;<a href="javascript:void(0)" class="firebaseui-link firebaseui-id-dismiss-info-bar">Dismiss</a></p></div>',ln(e)}function vu(e){var t=e.content;return e=e.Ab,ln('<dialog class="mdl-dialog firebaseui-dialog firebaseui-id-dialog'+(e?" "+pn(e):"")+'">'+an(t)+"</dialog>")}function mu(e){var t=e.message;return ln(vu({content:dn('<div class="firebaseui-dialog-icon-wrapper"><div class="'+pn(e.Ma)+' firebaseui-dialog-icon"></div></div><div class="firebaseui-progress-dialog-message">'+an(t)+"</div>")}))}function yu(e){for(var t='<div class="firebaseui-list-box-actions">',n=(e=e.items).length,r=0;r<n;r++){var i=e[r];t+='<button type="button" data-listboxid="'+pn(i.id)+'" class="mdl-button firebaseui-id-list-box-dialog-button firebaseui-list-box-dialog-button">'+(i.Ma?'<div class="firebaseui-list-box-icon-wrapper"><div class="firebaseui-list-box-icon '+pn(i.Ma)+'"></div></div>':"")+'<div class="firebaseui-list-box-label-wrapper">'+an(i.label)+"</div></button>"}return t=""+vu({Ab:hn("firebaseui-list-box-dialog"),content:dn(t+"</div>")}),ln(t)}function bu(e){return ln((e=e||{}).tb?'<div class="mdl-spinner mdl-spinner--single-color mdl-js-spinner is-active firebaseui-busy-indicator firebaseui-id-busy-indicator"></div>':'<div class="mdl-progress mdl-js-progress mdl-progress__indeterminate firebaseui-busy-indicator firebaseui-id-busy-indicator"></div>')}function _u(e,t){return cn((e=(e=e||{}).ga).S?e.S:t.hb[e.providerId]?""+t.hb[e.providerId]:e.providerId&&0==e.providerId.indexOf("saml.")||e.providerId&&0==e.providerId.indexOf("oidc.")?e.providerId.substring(5):""+e.providerId)}function wu(e){Su(e,"upgradeElement")}function ku(e){Su(e,"downgradeElements")}y(Ws),Ws.prototype.a=0,j(Gs,pr),(t=Gs.prototype).Lb=Ws.Xa(),t.N=function(){return this.g},t.Za=function(e){if(this.Y&&this.Y!=e)throw Error("Method not supported");Gs.K.Za.call(this,e)},t.kb=function(){this.g=this.s.a.createElement("DIV")},t.render=function(e){if(this.na)throw Error("Component already rendered");this.g||this.kb(),e?e.insertBefore(this.g,null):this.s.a.body.appendChild(this.g),this.Y&&!this.Y.na||this.v()}
2,t.v=function(){this.na=!0,Qs(this,(function(e){!e.na&&e.N()&&e.v()}))},t.ya=function(){Qs(this,(function(e){e.na&&e.ya()})),this.L&&Os(this.L),this.na=!1},t.m=function(){this.na&&this.ya(),this.L&&(this.L.o(),delete this.L),Qs(this,(function(e){e.o()})),this.g&&Kt(this.g),this.Y=this.g=this.oa=this.Ea=null,Gs.K.m.call(this)},t.removeChild=function(e,t){if(e){var n=p(e)?e:e.cb||(e.cb=":"+(e.Lb.a++).toString(36));if(this.oa&&n?e=(null!==(e=this.oa)&&n in e?e[n]:void 0)||null:e=null,n&&e){var r=this.oa;if(n in r&&delete r[n],H(this.Ea,e),t&&(e.ya(),e.g&&Kt(e.g)),null==(t=e))throw Error("Unable to set parent component");t.Y=null,Gs.K.Za.call(t,null)}}if(!e)throw Error("Child is not in parent component");return e},gu.a="firebaseui.auth.soy2.element.infoBar",mu.a="firebaseui.auth.soy2.element.progressDialog",yu.a="firebaseui.auth.soy2.element.listBoxDialog",bu.a="firebaseui.auth.soy2.element.busyIndicator";var Eu=["mdl-js-textfield","mdl-js-progress","mdl-js-spinner","mdl-js-button"];function Su(e,t){e&&window.componentHandler&&window.componentHandler[t]&&U(Eu,(function(n){fs(e,n)&&window.componentHandler[t](e),U(Vt(n,e),(function(e){window.componentHandler[t](e)}))}))}function Iu(e,t,n){if(xu.call(this),document.body.appendChild(e),e.showModal||window.dialogPolyfill.registerDialog(e),e.showModal(),wu(e),t&&eu(this,e,(function(t){var n=e.getBoundingClientRect();(t.clientX<n.left||n.left+n.width<t.clientX||t.clientY<n.top||n.top+n.height<t.clientY)&&xu.call(this)})),!n){var r=this.N().parentElement||this.N().parentNode;if(r){var i=this;this.da=function(){if(e.open){var t=e.getBoundingClientRect().height,n=r.getBoundingClientRect().height,o=r.getBoundingClientRect().top-document.body.getBoundingClientRect().top,a=r.getBoundingClientRect().left-document.body.getBoundingClientRect().left,s=e.getBoundingClientRect().width,u=r.getBoundingClientRect().width;e.style.top=(o+(n-t)/2).toString()+"px",t=a+(u-s)/2,e.style.left=t.toString()+"px",e.style.right=(document.body.getBoundingClientRect().width-t-s).toString()+"px"}else window.removeEventListener("resize",i.da)},this.da(),window.addEventListener("resize",this.da,!1)}}}function xu(){var e=Tu.call(this);e&&(ku(e),e.open&&e.close(),Kt(e),this.da&&window.removeEventListener("resize",this.da))}function Tu(){return Bt("firebaseui-id-dialog")}function Cu(){Kt(Ou.call(this))}function Ou(){return Ys(this,"firebaseui-id-info-bar")}function Au(){return Ys(this,"firebaseui-id-dismiss-info-bar")}var Nu={xa:{"google.com":"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg","github.com":"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/github.svg","facebook.com":"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/facebook.svg","twitter.com":"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/twitter.svg",password:"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/mail.svg",phone:"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/phone.svg",anonymous:"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/anonymous.png","microsoft.com":"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/microsoft.svg","yahoo.com":"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/yahoo.svg","apple.com":"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/apple.png",saml:"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/saml.svg",oidc:"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/oidc.svg"},wa:{"google.com":"#ffffff","github.com":"#333333","facebook.com":"#3b5998","twitter.com":"#55acee",password:"#db4437",phone:"#02bd7e",anonymous:"#f4b400","microsoft.com":"#2F2F2F","yahoo.com":"#720E9E","apple.com":"#000000",saml:"#007bff",oidc:"#007bff"},hb:{"google.com":"Google","github.com":"GitHub","facebook.com":"Facebook","twitter.com":"Twitter",password:"Password",phone:"Phone",anonymous:"Guest","microsoft.com":"Microsoft","yahoo.com":"Yahoo","apple.com":"Apple"}};function Pu(e,t,n){for(var r in Hn.call(this,e,t),n)this[r]=n[r]}function Ru(e,t,n,r,i){Gs.call(this,n),this.fb=e,this.eb=t,this.Fa=!1,this.Ga=r||null,this.A=this.ca=null,this.Z=ue(Nu),le(this.Z,i||{})}function ju(e){return e.N().parentElement||e.N().parentNode}function Du(e,t,n){Zs(e,t,(function(){n.focus()}))}function Mu(e,t,n){Zs(e,t,(function(){n()}))}function Lu(e,t,n){t=(e=e||{}
2).Va;var r=e.ia;return e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-sign-in"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Sign in with email</h1></div><div class="firebaseui-card-content"><div class="firebaseui-relative-wrapper">'+iu(e)+'</div></div><div class="firebaseui-card-actions"><div class="firebaseui-form-actions">'+(t?hu(null):"")+ou(null)+'</div></div><div class="firebaseui-card-footer">'+(r?pu(n):du(n))+"</div></form></div>",ln(e)}function Fu(e,t,n){return t=(e=e||{}).ia,e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-password-sign-in"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Sign in</h1></div><div class="firebaseui-card-content">'+iu(e)+lu()+'</div><div class="firebaseui-card-actions"><div class="firebaseui-form-links">'+fu()+'</div><div class="firebaseui-form-actions">'+au()+'</div></div><div class="firebaseui-card-footer">'+(t?pu(n):du(n))+"</div></form></div>",ln(e)}function Uu(e,t,n){var r=(e=e||{}).Tb;t=e.Ta;var i=e.ia,o='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-password-sign-up"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Create account</h1></div><div class="firebaseui-card-content">'+iu(e);return r?(e='<div class="firebaseui-textfield mdl-textfield mdl-js-textfield mdl-textfield--floating-label"><label class="mdl-textfield__label firebaseui-label" for="ui-sign-in-name-input">First &amp; last name</label><input type="text" name="name" id="ui-sign-in-name-input" autocomplete="name" class="mdl-textfield__input firebaseui-input firebaseui-id-name" value="'+pn(null!=(e=(e=e||{}).name)?e:"")+'"></div><div class="firebaseui-error-wrapper"><p class="firebaseui-error firebaseui-text-input-error firebaseui-hidden firebaseui-id-name-error"></p></div>',e=ln(e)):e="",n=o+e+cu(null)+'</div><div class="firebaseui-card-actions"><div class="firebaseui-form-actions">'+(t?hu(null):"")+su()+'</div></div><div class="firebaseui-card-footer">'+(i?pu(n):du(n))+"</div></form></div>",ln(n)}function Vu(e,t,n){return t=(e=e||{}).Ta,e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-password-recovery"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Recover password</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">Get instructions sent to this email that explain how to reset your password</p>'+iu(e)+'</div><div class="firebaseui-card-actions"><div class="firebaseui-form-actions">'+(t?hu(null):"")+ou({label:hn("Send")})+'</div></div><div class="firebaseui-card-footer">'+du(n)+"</div></form></div>",ln(e)}function Bu(e,t,n){t=e.G;var r="";return r+='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-password-recovery-email-sent"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Check your email</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">'+(e="Follow the instructions sent to <strong>"+an(e.email)+"</strong> to recover your password")+'</p></div><div class="firebaseui-card-actions">',t&&(r+='<div class="firebaseui-form-actions">'+ou({label:hn("Done")})+"</div>"),r+='</div><div class="firebaseui-card-footer">'+du(n)+"</div></div>",ln(r)}function qu(e,t,n){return ln('<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-callback"><div class="firebaseui-callback-indicator-container">'+bu(null)+"</div></div>")}function zu(e,t,n){return ln('<div class="firebaseui-container firebaseui-id-page-spinner">'+bu({tb:!0})+"</div>")}function Hu(){return ln('<div class="firebaseui-container firebaseui-id-page-blank firebaseui-use-spinner"></div>')}function Ku(e,t,n){return t="",t+='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-email-link-sign-in-sent"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Sign-in email sent</h1></div><div class="firebaseui-card-content"><div class="firebaseui-email-sent"></div><p class="firebaseui-text">'+(e="A sign-in email with additional instructions was sent to <strong>"+an(e.email)+"</strong>. Check your email to complete sign-in.")+'</p></div><div class="firebaseui-card-actions"><div class="firebaseui-form-links">'+ln('<a class="firebaseui-link firebaseui-id-trouble-getting-email-link" href="javascript:void(0)">Trouble getting email?</a>')+'</div><div class="firebaseui-form-actions">'+hu({label:hn("Back")})+'</div></div><div class="firebaseui-card-footer">'+du(n)+"</div></form></div>",ln(t)}function Wu(e,t,n){return e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-email-not-received"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Trouble getting email?</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">Try these common fixes:<ul><li>Check if the email was marked as spam or filtered.</li><li>Check your internet connection.</li><li>Check that you did not misspell your email.</li><li>Check that your inbox space is not running out or other inbox settings related issues.</li></ul></p><p class="firebaseui-text">If the steps above didn\'t work, you can resend the email. Note that this will deactivate the link in the older email.</p></div><div class="firebaseui-card-actions"><div class="firebaseui-form-links">'+ln('<a class="firebaseui-link firebaseui-id-resend-email-link" href="javascript:void(0)">Resend</a>')+'</div><div class="firebaseui-form-actions">'+hu({label:hn("Back")})+'</div></div><div class="firebaseui-card-footer">'+du(n)+"</div></form></div>",ln(e)}function Gu(e,t,n){return e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-email-link-sign-in-confirmation"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Confirm email</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">Confirm your email to complete sign in</p><div class="firebaseui-relative-wrapper">
2'+iu(e)+'</div></div><div class="firebaseui-card-actions"><div class="firebaseui-form-actions">'+hu(null)+ou(null)+'</div></div><div class="firebaseui-card-footer">'+du(n)+"</div></form></div>",ln(e)}function Yu(){var e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-different-device-error"><div class="firebaseui-card-header"><h1 class="firebaseui-title">New device or browser detected</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">Try opening the link using the same device or browser where you started the sign-in process.</p></div><div class="firebaseui-card-actions"><div class="firebaseui-form-actions">'+hu({label:hn("Dismiss")})+"</div></div></div>";return ln(e)}function $u(){var e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-anonymous-user-mismatch"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Session ended</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">The session associated with this sign-in request has either expired or was cleared.</p></div><div class="firebaseui-card-actions"><div class="firebaseui-form-actions">'+hu({label:hn("Dismiss")})+"</div></div></div>";return ln(e)}function Qu(e,t,n){return t="",t+='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-password-linking"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Sign in</h1></div><div class="firebaseui-card-content"><h2 class="firebaseui-subtitle">You already have an account</h2><p class="firebaseui-text">'+(e="You\u2019ve already used <strong>"+an(e.email)+"</strong> to sign in. Enter your password for that account.")+"</p>"+lu()+'</div><div class="firebaseui-card-actions"><div class="firebaseui-form-links">'+fu()+'</div><div class="firebaseui-form-actions">'+au()+'</div></div><div class="firebaseui-card-footer">'+du(n)+"</div></form></div>",ln(t)}function Xu(e,t,n){var r=e.email;return t="",e=hn(e=""+_u(e,n)),t+='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-email-link-sign-in-linking"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Sign in</h1></div><div class="firebaseui-card-content"><h2 class="firebaseui-subtitle">You already have an account</h2><p class="firebaseui-text firebaseui-text-justify">'+(r="You\u2019ve already used <strong>"+an(r)+"</strong>. You can connect your <strong>"+an(e)+"</strong> account with <strong>"+an(r)+"</strong> by signing in with email link below.")+'<p class="firebaseui-text firebaseui-text-justify">'+(e="For this flow to successfully connect your "+an(e)+" account with this email, you have to open the link on the same device or browser.")+'</p></div><div class="firebaseui-card-actions"><div class="firebaseui-form-actions">'+au()+'</div></div><div class="firebaseui-card-footer">'+du(n)+"</div></form></div>",ln(t)}function Ju(e,t,n){t="";var r=""+_u(e,n);return t+='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-email-link-sign-in-linking-different-device"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Sign in</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text firebaseui-text-justify">'+(e="You originally intended to connect <strong>"+an(r=hn(r))+"</strong> to your email account but have opened the link on a different device where you are not signed in.")+'</p><p class="firebaseui-text firebaseui-text-justify">'+(r="If you still want to connect your <strong>"+an(r)+"</strong> account, open the link on the same device where you started sign-in. Otherwise, tap Continue to sign-in on this device.")+'</p></div><div class="firebaseui-card-actions"><div class="firebaseui-form-actions">'+uu()+'</div></div><div class="firebaseui-card-footer">'+du(n)+"</div></form></div>",ln(t)}function Zu(e,t,n){var r=e.email;return t="",e=hn(e=""+_u(e,n)),t+='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-federated-linking"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Sign in</h1></div><div class="firebaseui-card-content"><h2 class="firebaseui-subtitle">You already have an account</h2><p class="firebaseui-text">'+(r="You\u2019ve already used <strong>"+an(r)+"</strong>. Sign in with "+an(e)+" to continue.")+'</p></div><div class="firebaseui-card-actions"><div class="firebaseui-form-actions">'+ou({label:hn("Sign in with "+e)})+'</div></div><div class="firebaseui-card-footer">'+du(n)+"</div></form></div>",ln(t)}function ec(e,t,n){var r=(e=e||{}).email;t=e.yb,e=e.Eb;var i='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-un
2authorized-user"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Not Authorized</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">';return r?i+=r="<strong>"+an(r)+"</strong> is not authorized to view the requested page.":i+="User is not authorized to view the requested page.",i+="</p>",t&&(i+='<p class="firebaseui-text firebaseui-id-unauthorized-user-admin-email">'+(t="Please contact <strong>"+an(t)+"</strong> for authorization.")+"</p>"),i+='</div><div class="firebaseui-card-actions"><div class="firebaseui-form-links">',e&&(i+='<a class="firebaseui-link firebaseui-id-unauthorized-user-help-link" href="javascript:void(0)" target="_blank">Learn More</a>'),i+='</div><div class="firebaseui-form-actions">'+hu({label:hn("Back")})+'</div></div><div class="firebaseui-card-footer">'+du(n)+"</div></form></div>",ln(i)}function tc(e,t,n){return t="",t+='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-unsupported-provider"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Sign in</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">'+(e="To continue sign in with <strong>"+an(e.email)+"</strong> on this device, you have to recover the password.")+'</p></div><div class="firebaseui-card-actions"><div class="firebaseui-form-actions">'+hu(null)+ou({label:hn("Recover password")})+'</div></div><div class="firebaseui-card-footer">'+du(n)+"</div></form></div>",ln(t)}function nc(e){var t="";return t+='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-password-reset"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Reset your password</h1></div><div class="firebaseui-card-content">'+('<p class="firebaseui-text">for <strong>'+an(e.email)+"</strong></p>")+cu(function(e){function t(){}var n={label:hn("New password")};for(var r in t.prototype=e,e=new t,n)e[r]=n[r];return e}(e))+'</div><div class="firebaseui-card-actions"><div class="firebaseui-form-actions">'+su()+"</div></div></form></div>",ln(t)}function rc(e){return e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-password-reset-success"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Password changed</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">You can now sign in with your new password</p></div><div class="firebaseui-card-actions">'+((e=e||{}).G?'<div class="firebaseui-form-actions">'+uu()+"</div>":"")+"</div></div>",ln(e)}function ic(e){return e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-password-reset-failure"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Try resetting your password again</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">Your request to reset your password has expired or the link has already been used</p></div><div class="firebaseui-card-actions">'+((e=e||{}).G?'<div class="firebaseui-form-actions">'+uu()+"</div>":"")+"</div></div>",ln(e)}function oc(e){var t=e.G,n="";return n+='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-email-change-revoke-success"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Updated email address</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">'+(e="Your sign-in email address has been changed back to <strong>"+an(e.email)+"</strong>.")+'</p><p class="firebaseui-text">If you didn\u2019t ask to change your sign-in email, it\u2019s possible someone is trying to access your account and you should <a class="firebaseui-link firebaseui-id-reset-password-link" href="javascript:void(0)">change your password right away</a>.</p></div><div class="firebaseui-card-actions">'+(t?'<div class="firebaseui-form-actions">'+uu()+"</div>":"")+"</div></form></div>",ln(n)}function ac(e){return e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-email-change-revoke-failure"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Unable to update your email address</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">There was a problem changing your sign-in email back.</p><p class="firebaseui-text">If you try again and still can\u2019t reset your email, try asking your administrator for help.</p></div><div class="firebaseui-card-actions">'+((e=e||{}).G?'<div class="firebaseui-form-actions">'+uu()+"</div>":"")+"</div></div>",ln(e)}function sc(e){return e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-email-verification-success"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Your email has been verified</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">You can now sign in with your new account</p></div><div class="firebaseui-card-actions">'+((e=e||{}).G?'<div class="firebaseui-form-actions">'+uu()+"</div>":"")+"</div></div>",ln(e)}function uc(e){return e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-email-verification-failure"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Try verifying your email again</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">Your request to verify your email has expired or the link has already been used</p></div><div class="firebaseui-card-actions">'+((e=e||{}).G?'<div class="firebaseui-form-actions">'+uu()+"</div>":"")+"</div></div>",ln(e)}function cc(e){var t=e.G,n="";return n+='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-verify-and-change-email-success"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Your email has been verified and changed</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">'+(e="You can now sign in with your new email <strong>"+an(e.email)+"</strong>.")+'</p></div><div class="firebaseui-card-actions">'+(t?'<div class="firebaseui-form-actions">'+uu()+"</div>":"")+"</div></div>",ln(n)}function lc(e){return e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-verify-and-change-email-failure"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Try updating your email again</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">Your request to verify and update your email has expired or the link has already been used.</p></div><div class="firebaseui-card-actions">'+((e=e||{}).G?'<div class="firebaseui-form-actions">'+uu()+"</div>":"")+"</div></div>",ln(e)}function fc(e){var t=e.factorId,n=e.phoneNumber;e=e.G;var r='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-revert-second-factor-addition-success"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Removed second factor</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">';switch(t){case"phone":r+=t="The <strong>"+an(t)+" "+an(n)+"</strong> was removed as a second authentication step.";break;default:r+="The device or app was removed as a second authentication step."}return r+='</p><p class="firebaseui-text">If you don\'t recognize this device, someone might be trying to access your account. Consider <a class="firebaseui-link firebaseui-id-reset-password-link" href="javascript:void(0)">changing your password right away</a>.</p></div><div class="firebaseui-card-actions">'+(e?'<div class="firebaseui-form-actions">'+uu()+"</div>":"")+"</div></form></div>",ln(r)}function hc(e){return e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-revert-second-factor-addition-failure"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Couldn\'t remove your second factor</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">Something went wrong removing your second factor.</p><p class="firebaseui-text">Try removing it again. If that doesn\'t work, contact support for assistance.</p></div><div class="firebaseui-card-actions">'+((e=e||{}).G?'<div class="firebaseui-form-actions">'+uu()+"</div>":"")+"</div></div>",ln(e)}function dc(e){var t=e.zb;return e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-recoverable-error"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Error encountered</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">'+an(e.errorMessage)+'</p></div><div class="firebaseui-card-actions"><div class="firebaseui-form-actions">',t&&(e+=ou({label:hn("Retry")})),ln(e+"</div></div></div>")}function pc(e){return e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-unrecoverable-error"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Error encountered</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">'+an(e.errorMessage)+"</p></div></div>",ln(e)}
2function gc(e,t,n){var r=e.Qb;return t="",t+='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-email-mismatch"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Sign in</h1></div><div class="firebaseui-card-content"><h2 class="firebaseui-subtitle">'+(e="Continue with "+an(e.jc)+"?")+'</h2><p class="firebaseui-text">'+(r="You originally wanted to sign in with "+an(r))+'</p></div><div class="firebaseui-card-actions"><div class="firebaseui-form-actions">'+hu(null)+ou({label:hn("Continue")})+'</div></div><div class="firebaseui-card-footer">'+du(n)+"</div></form></div>",ln(t)}function vc(e,t,n){var r='<div class="firebaseui-container firebaseui-page-provider-sign-in firebaseui-id-page-provider-sign-in firebaseui-use-spinner"><div class="firebaseui-card-content"><form onsubmit="return false;"><ul class="firebaseui-idp-list">';t=(e=e.Sb).length;for(var i=0;i<t;i++){var o={ga:e[i]},a=n,s=(o=o||{}).ga,u=o,c="";switch((u=u||{}).ga.providerId){case"google.com":c+="firebaseui-idp-google";break;case"github.com":c+="firebaseui-idp-github";break;case"facebook.com":c+="firebaseui-idp-facebook";break;case"twitter.com":c+="firebaseui-idp-twitter";break;case"phone":c+="firebaseui-idp-phone";break;case"anonymous":c+="firebaseui-idp-anonymous";break;case"password":c+="firebaseui-idp-password";break;default:c+="firebaseui-idp-generic"}u=(u='<button class="firebaseui-idp-button mdl-button mdl-js-button mdl-button--raised '+pn(cn(c))+' firebaseui-id-idp-button" data-provider-id="'+pn(s.providerId)+'" style="background-color:')+pn(vn(cn((c=(c=(c=o)||{}).ga).ta?c.ta:a.wa[c.providerId]?""+a.wa[c.providerId]:0==c.providerId.indexOf("saml.")?""+a.wa.saml:0==c.providerId.indexOf("oidc.")?""+a.wa.oidc:""+a.wa.password)))+'"><span class="firebaseui-idp-icon-wrapper"><img class="firebaseui-idp-icon" alt="" src="';var l=o;c=a,l=(l=l||{}).ga,c=fn(l.za?gn(l.za):c.xa[l.providerId]?gn(c.xa[l.providerId]):0==l.providerId.indexOf("saml.")?gn(c.xa.saml):0==l.providerId.indexOf("oidc.")?gn(c.xa.oidc):gn(c.xa.password)),u=u+pn(gn(c))+'"></span>',"password"==s.providerId?(u+='<span class="firebaseui-idp-text firebaseui-idp-text-long">',s.V?u+=an(s.V):s.S?u+=o="Sign in with "+an(_u(o,a)):u+="Sign in with email",u+='</span><span class="firebaseui-idp-text firebaseui-idp-text-short">',u=s.S?u+an(s.S):u+"Email",u+="</span>"):"phone"==s.providerId?(u+='<span class="firebaseui-idp-text firebaseui-idp-text-long">',s.V?u+=an(s.V):s.S?u+=o="Sign in with "+an(_u(o,a)):u+="Sign in with phone",u+='</span><span class="firebaseui-idp-text firebaseui-idp-text-short">',u=s.S?u+an(s.S):u+"Phone",u+="</span>"):"anonymous"==s.providerId?(u+='<span class="firebaseui-idp-text firebaseui-idp-text-long">',s.V?u+=an(s.V):s.S?u+=o="Sign in with "+an(_u(o,a)):u+="Continue as guest",u+='</span><span class="firebaseui-idp-text firebaseui-idp-text-short">',u=s.S?u+an(s.S):u+"Guest",u+="</span>"):(u+='<span class="firebaseui-idp-text firebaseui-idp-text-long">',s.V?u+=an(s.V):u+=c="Sign in with "+an(_u(o,a)),u+='</span><span class="firebaseui-idp-text firebaseui-idp-text-short">'+(s.S?an(s.S):an(_u(o,a)))+"</span>"),r+='<li class="firebaseui-list-item">'+(s=ln(u+"</button>"))+"</li>"}return r+='</ul></form></div><div class="firebaseui-card-footer firebaseui-provider-sign-in-footer">'+pu(n)+"</div></div>",ln(r)}function mc(e,t,n){var r,i=(e=e||{}).Gb,o=e.Va;return t=e.ia,e='<div class="firebaseui-phone-number"><button class="firebaseui-id-country-selector firebaseui-country-selector mdl-button mdl-js-button"><span class="firebaseui-flag firebaseui-country-selector-flag firebaseui-id-country-selector-flag"></span><span class="firebaseui-id-country-selector-code"></span></button><div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label firebaseui-textfield firebaseui-phone-input-wrapper"><label class="mdl-textfield__label firebaseui-label" for="ui-sign-in-phone-number-input">Phone number</label><input type="tel" name="phoneNumber" id="ui-sign-in-phone-number-input" class="mdl-textfield__input firebaseui-input firebaseui-id-phone-number" value="'+pn(null!=(e=(e=e||{}).Aa)?e:"")+'"></div></div><div class="firebaseui-error-wrapper"><p class="firebaseui-error firebaseui-text-input-error firebaseui-hidden firebaseui-phone-number-error firebaseui-id-phone-number-error"></p></div>',r=(e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-phone-sign-in-start"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Enter your phone number</h1></div><div class="firebaseui-card-content"><div class="firebaseui-relative-wrapper">'+ln(e))+(r=i?ln('<div class="firebaseui-recaptcha-wrapper"><div class="firebaseui-recaptcha-container"></div><div class="firebaseui-error-wrapper firebaseui-recaptcha-error-wrapper"><p class="firebaseui-error firebaseui-hidden firebaseui-id-recaptcha-error"></p></div></div>
2'):"")+'</div></div><div class="firebaseui-card-actions"><div class="firebaseui-form-actions">'+(o?hu(null):"")+ou({label:hn("Verify")})+'</div></div><div class="firebaseui-card-footer">',t?(t='<p class="firebaseui-tos firebaseui-phone-tos">',t=n.F&&n.D?t+'By tapping Verify, you are indicating that you accept our <a href="javascript:void(0)" class="firebaseui-link firebaseui-tos-link" target="_blank">Terms of Service</a> and <a href="javascript:void(0)" class="firebaseui-link firebaseui-pp-link" target="_blank">Privacy Policy</a>. An SMS may be sent. Message &amp; data rates may apply.':t+"By tapping Verify, an SMS may be sent. Message &amp; data rates may apply.",n=ln(t+"</p>")):n=ln('<p class="firebaseui-tos firebaseui-phone-sms-notice">By tapping Verify, an SMS may be sent. Message &amp; data rates may apply.</p>')+du(n),ln(r+n+"</div></form></div>")}function yc(e,t,n){var r="";return e='Enter the 6-digit code we sent to <a class="firebaseui-link firebaseui-change-phone-number-link firebaseui-id-change-phone-number-link" href="javascript:void(0)">&lrm;'+an(t=(e=e||{}).phoneNumber)+"</a>",an(t),t=r,n='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-phone-sign-in-finish"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Verify your phone number</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">'+e+"</p>"+(r=ln('<div class="firebaseui-textfield mdl-textfield mdl-js-textfield mdl-textfield--floating-label"><label class="mdl-textfield__label firebaseui-label" for="ui-sign-in-phone-confirmation-code-input">6-digit code</label><input type="number" name="phoneConfirmationCode" id="ui-sign-in-phone-confirmation-code-input" class="mdl-textfield__input firebaseui-input firebaseui-id-phone-confirmation-code"></div><div class="firebaseui-error-wrapper"><p class="firebaseui-error firebaseui-text-input-error firebaseui-hidden firebaseui-id-phone-confirmation-code-error"></p></div>'))+'</div><div class="firebaseui-card-actions"><div class="firebaseui-form-actions">'+hu(null)+ou({label:hn("Continue")})+'</div></div><div class="firebaseui-card-footer">'+du(n)+"</div></form>",e=ln('<div class="firebaseui-resend-container"><span class="firebaseui-id-resend-countdown"></span><a href="javascript:void(0)" class="firebaseui-id-resend-link firebaseui-hidden firebaseui-link">Resend</a></div>'),ln(t+(n+e+"</div>"))}function bc(){return ln('<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-sign-out"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Sign Out</h1></div><div class="firebaseui-card-content"><p class="firebaseui-text">You are now successfully signed out.</p></div></div>')}function _c(e,t,n){var r='<div class="firebaseui-container firebaseui-page-select-tenant firebaseui-id-page-select-tenant"><div class="firebaseui-card-content"><form onsubmit="return false;"><ul class="firebaseui-tenant-list">';t=(e=e.ec).length;for(var i=0;i<t;i++){var o=e[i],a="",s=an(o.displayName),u=o.tenantId?o.tenantId:"top-level-project";a+='<button class="firebaseui-tenant-button mdl-button mdl-js-button mdl-button--raised firebaseui-tenant-selection-'+pn(u=hn(u))+' firebaseui-id-tenant-selection-button"'+(o.tenantId?'data-tenant-id="'+pn(o.tenantId)+'"':"")+'style="background-color:'+pn(vn(o.ta))+'"><span class="firebaseui-idp-icon-wrapper"><img class="firebaseui-idp-icon" alt="" src="'+pn(gn(o.za))+'"></span><span class="firebaseui-idp-text firebaseui-idp-text-long">',o.V?a+=an(o.V):a+=o="Sign in to "+an(o.displayName),r+='<li class="firebaseui-list-item">'+(a=ln(a+'</span><span class="firebaseui-idp-text firebaseui-idp-text-short">'+s+"</span></button>"))+"</li>"}return r+='</ul></form></div><div class="firebaseui-card-footer firebaseui-provider-sign-in-footer">'+pu(n)+"</div></div>",ln(r)}function wc(e,t,n){return e='<div class="mdl-card mdl-shadow--2dp firebaseui-container firebaseui-id-page-provider-match-by-email"><form onsubmit="return false;"><div class="firebaseui-card-header"><h1 class="firebaseui-title">Sign in</h1></div><div class="firebaseui-card-content"><div class="firebaseui-relative-wrapper">'+iu(null)+'</div></div><div class="firebaseui-card-actions"><div class="firebaseui-form-actions">'+ou(null)+'</div></div><div class="firebaseui-card-footer">'+pu(n)+"</div></form></div>",ln(e)}function kc(){return Ys(this,"firebaseui-id-submit")}function Ec(){return Ys(this,"firebaseui-id-secondary-link")}function Sc(e,t){eu(this,kc.call(this),(function(t){e(t)}));var n=Ec.call(this);n&&t&&eu(this,n,(function(e){t(e)}))}function Ic(){return Ys(this,"firebaseui-id-password")}function xc(){return Ys(this,"firebaseui-id-password-error")}function Tc(){var e=Ic.call(this),t=xc.call(this);Js(this,e,(function(){ru(t)&&(Xs(e,!0),tu(t))}))}function Cc(){var e=Ic.call(this),t=xc.call(this);return ps(e)?(Xs(e,!0),tu(t),t=!0):(Xs(e,!1),nu(t,cn("Enter your password").toString()),t=!1),t?ps(e):null}function Oc(e,t,n,r,i,o){Ru.call(this,Qu,{email:e},o,"passwordLinking",{F:r,D:i}),this.w=t,this.H=n}j(Pu,Hn),j(Ru,Gs),(t=Ru.prototype).kb=function(){var e=tn(this.fb,this.eb,this.Z,this.s);wu(e),this.g=e},t.v=function(){if(Ru.K.v.call(this),br(ju(this),new Pu("pageEnter",ju(this),{pageId:this.Ga})),this.bb()&&this.Z.F){var e=this.Z.F;eu(this,this.bb(),(function(){e()}))}if(this.ab()&&this.Z.D){var t=this.Z.D;eu(this,this.ab(),(function(){t()}))}},t.ya=function(){br(ju(this),new Pu("pageExit",ju(this),{pageId:this.Ga})),Ru.K.ya.call(this)},t.m=function(){window.clearTimeout(this.ca),this.eb=this.fb=this.ca=null,this.Fa=!1,this.A=null,ku(this.N()),Ru.K.m.call(this)},t.I=function(e,t,n,r){function i(){if(o.T)return null;o.Fa=!1,window.clearTimeout(o.ca),o.ca=null,o.A&&(ku(o.A),Kt(o.A),o.A=null)}var o=this;return o.Fa?null:(function(e){e.Fa=!0;var t=fs(e.N(),"firebaseui-use-spinner");e.ca=window.setTimeout((function(){e.N()&&null===e.A&&(e.A=tn(bu,{tb:t},null,e.s),e.N().appendChild(e.A),wu(e.A))}),500)}(o),e.apply(null,t).then(n,r).then(i,i))},A(Ru.prototype,{a:function(e){Cu.call(this);var t=tn(gu,{message:e},null,this.s);this.N().appendChild(t),eu(this,Au.call(this),(function(){Kt(t)}))},yc:Cu,Ac:Ou,zc:Au,$:function(e,t){e=tn(mu,{Ma:e,message:t},null,this.s),Iu.call(this,e)},h:xu,Cb:Tu,Cc:function(){return Ys(this,"firebaseui-tos")},bb:function(){return Ys(this,"firebaseui-tos-link")},ab:function(){return Ys(this,"firebaseui-pp-link")},Dc:function(){return Ys(this,"firebaseui-tos-list")}}),Lu.a="firebaseui.auth.soy2.page.signIn",Fu.a="firebaseui.auth.soy2.page.passwordSignIn",Uu.a="firebaseui.auth.soy2.page.passwordSignUp",Vu.a="firebaseui.auth.soy2.page.passwordRecovery",Bu.a="firebaseui.auth.soy2.page.passwordRecoveryEmailSent",qu.a="firebaseui.auth.soy2.page.callback",zu.a="firebaseui.auth.soy2.page.spinner",Hu.a="firebaseui.auth.soy2.page.blank",Ku.a="firebaseui.auth.soy2.page.emailLinkSignInSent",Wu.a="firebaseui.auth.soy2.page.emailNotReceived",Gu.a="firebaseui.auth.soy2.page.emailLinkSignInConfirmation",Yu.a="firebaseui.auth.soy2.page.differentDeviceError",$u.a="firebaseui.auth.soy2.page.anonymousUserMismatch",Qu.a="firebaseui.auth.soy2.page.passwordLinking",Xu.a="firebaseui.auth.soy2.page.emailLinkSignInLinking",Ju.a="firebaseui.auth.soy2.page.emailLinkSignInLinkingDifferentDevice",Zu.a="firebaseui.auth.soy2.page.federatedLinking",ec.a="firebaseui.auth.soy2.page.unauthorizedUser",tc.a="firebaseui.auth.soy2.page.unsupportedProvider",nc.a="firebaseui.auth.soy2.page.passwordReset",rc.a="firebaseui.auth.soy2.page.passwordResetSuccess",ic.a="firebaseui.auth.soy2.page.passwordResetFailure",oc.a="firebaseui.auth.soy2.page.emailChangeRevokeSuccess",ac.a="firebaseui.auth.soy2.page.emailChangeRevokeFailure",sc.a="firebaseui.auth.soy2.page.emailVerificationSuccess",uc.a="firebaseui.auth.soy2.page.emailVerificationFailure",cc.a="firebaseui.auth.soy2.page.verifyAndChangeEmailSuccess",lc.a="firebaseui.auth.soy2.page.verifyAndChangeEmailFailure",fc.a="firebaseui.auth.soy2.page.revertSecondFactorAdditionSuccess",hc.a="firebaseui.auth.soy2.page.revertSecondFactorAdditionFailure",dc.a="firebaseui.auth.soy2.page.recoverableError",pc.a="firebaseui.auth.soy2.page.unrecoverableError",gc.a="firebaseui.auth.soy2.page.emailMismatch",vc.a="firebaseui.auth.soy2.page.providerSignIn",mc.a="firebaseui.auth.soy2.page.phoneSignInStart",yc.a="firebaseui.auth.soy2.page.phoneSignInFinish",bc.a="firebaseui.auth.soy2.page.signOut",_c.a="firebaseui.auth.soy2.page.selectTenant",wc.a="firebaseui.auth.soy2.page.providerMatchByEmail",u(Oc,Ru),Oc.prototype.v=function(){this.P(),this.M(this.w,this.H),Mu(this,this.i(),this.w),this.i().focus(),Ru.prototype.v.call(this)},Oc.prototype.m=function(){this.w=null,Ru.prototype.m.call(this)},Oc.prototype.j=function(){return ps(Ys(this,"firebaseui-id-email"))},A(Oc.prototype,{i:Ic,B:xc,P:Tc,u:Cc,ea:kc,ba:Ec,M:Sc});var Ac=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;function Nc(){return Ys(this,"firebaseui-id-email")}function Pc(){return Ys(this,"firebaseui-id-email-error")}function Rc(e){var t=Nc.call(this),n=Pc.call(this);Js(this,t,(function(){ru(n)&&(Xs(t,!0),tu(n))})),e&&Zs(this,t,(function(){e()}))}function jc(){return X(ps(Nc.call(this))||"")}
2function Dc(){var e=Nc.call(this),t=Pc.call(this),n=ps(e)||"";return n?Ac.test(n)?(Xs(e,!0),tu(t),t=!0):(Xs(e,!1),nu(t,cn("That email address isn't correct").toString()),t=!1):(Xs(e,!1),nu(t,cn("Enter your email address to continue").toString()),t=!1),t?X(ps(e)):null}function Mc(e,t,n,r,i,o,a){Ru.call(this,Fu,{email:n,ia:!!o},a,"passwordSignIn",{F:r,D:i}),this.w=e,this.H=t}function Lc(e,t,n,r,i,o){Ru.call(this,e,t,r,i||"notice",o),this.i=n||null}function Fc(e,t,n,r,i){Lc.call(this,Bu,{email:e,G:!!t},t,i,"passwordRecoveryEmailSent",{F:n,D:r})}function Uc(e,t){Lc.call(this,sc,{G:!!e},e,t,"emailVerificationSuccess")}function Vc(e,t){Lc.call(this,uc,{G:!!e},e,t,"emailVerificationFailure")}function Bc(e,t,n){Lc.call(this,cc,{email:e,G:!!t},t,n,"verifyAndChangeEmailSuccess")}function qc(e,t){Lc.call(this,lc,{G:!!e},e,t,"verifyAndChangeEmailFailure")}function zc(e,t){Lc.call(this,hc,{G:!!e},e,t,"revertSecondFactorAdditionFailure")}function Hc(e){Lc.call(this,bc,void 0,void 0,e,"signOut")}function Kc(e,t){Lc.call(this,rc,{G:!!e},e,t,"passwordResetSuccess")}function Wc(e,t){Lc.call(this,ic,{G:!!e},e,t,"passwordResetFailure")}function Gc(e,t){Lc.call(this,ac,{G:!!e},e,t,"emailChangeRevokeFailure")}function Yc(e,t,n){Lc.call(this,dc,{errorMessage:e,zb:!!t},t,n,"recoverableError")}function $c(e,t){Lc.call(this,pc,{errorMessage:e},void 0,t,"unrecoverableError")}function Qc(e){if("auth/invalid-credential"===e.code&&e.message&&-1!==e.message.indexOf("error=consent_required"))return{code:"auth/user-cancelled"};if(e.message&&-1!==e.message.indexOf("HTTP Cloud Function returned an error:")){var t=JSON.parse(e.message.substring(e.message.indexOf("{"),e.message.lastIndexOf("}")+1));return{code:e.code,message:t&&t.error&&t.error.message||e.message}}return e}function Xc(e,t,n,r){function i(n){if(!n.name||"cancel"!=n.name){e:{var r=n.message;try{var i=((JSON.parse(r).error||{}).message||"").toLowerCase().match(/invalid.+(access|id)_token/);if(i&&i.length){var o=!0;break e}}catch(a){}o=!1}if(o)n=ju(t),t.o(),il(e,n,void 0,cn("Your sign-in session has expired. Please try again.").toString());else{if(o=n&&n.message||"",n.code){if("auth/email-already-in-use"==n.code||"auth/credential-already-in-use"==n.code)return;o=el(n)}t.a(o)}}}if(Af(e),r)return Jc(e,n),Hr();if(!n.credential)throw Error("No credential found!");if(!_f(e).currentUser&&!n.user)throw Error("User not logged in.");try{var o=function(e,t){return Rf(e),Tf(e,(function(n){if(e.j&&!e.j.isAnonymous&&Ca(Pf(e))&&!_f(e).currentUser)return Df(e).then((function(){return"password"==t.credential.providerId&&(t.credential=null),t}));if(n)return Df(e).then((function(){return n.linkWithCredential(t.credential)})).then((function(e){return t.user=e.user,t.credential=e.credential,t.operationType=e.operationType,t.additionalUserInfo=e.additionalUserInfo,t}),(function(n){if(n&&"auth/email-already-in-use"==n.code&&n.email&&n.credential)throw n;return Mf(e,n,t.credential)}));if(!t.user)throw Error('Internal error: An incompatible or outdated version of "firebase.js" may be used.');return Df(e).then((function(){return wf(e).updateCurrentUser(t.user)})).then((function(){return t.user=wf(e).currentUser,t.operationType="signIn",t.credential&&t.credential.providerId&&"password"==t.credential.providerId&&(t.credential=null),t}))}))}(e,n)}catch(a){return Gi(a.code||a.message,a),t.a(a.code||a.message),Hr()}return n=o.then((function(t){Jc(e,t)}),i).then(void 0,i),Of(e,o),Hr(n)}function Jc(e,t){if(!t.user)throw Error("No user found");var n=Wa(Pf(e));if(Ka(Pf(e))&&n&&Xi("Both signInSuccess and signInSuccessWithAuthResult callbacks are provided. Only signInSuccessWithAuthResult callback will be invoked."),n){n=Wa(Pf(e));var r=ea(kf(e))||void 0;Jo(Yo,kf(e));var i=!1;ri()?(n&&!n(t,r)||(i=!0,Mt(window.opener.location,Zc(e,r))),n||window.close()):n&&!n(t,r)||(i=!0,Mt(window.location,Zc(e,r))),i||e.reset()}else{n=t.user,t=t.credential,r=Ka(Pf(e)),i=ea(kf(e))||void 0,Jo(Yo,kf(e));var o=!1;ri()?(r&&!r(n,t,i)||(o=!0,Mt(window.opener.location,Zc(e,i))),r||window.close()):r&&!r(n,t,i)||(o=!0,Mt(window.location,Zc(e,i))),o||e.reset()}}function Zc(e,t){if(!(e=t||Pf(e).a.get("signInSuccessUrl")))throw Error("No redirect URL has been found. You must either specify a signInSuccessUrl in the configuration, pass in a redirect URL to the widget URL, or return false from the callback.");return e}function el(e){var t={code:e.code},n="";switch((t=t||{}).code){case"auth/email-already-in-use":n+="The email address is already used by another account";break;case"auth/requires-recent-login":n+=Pn();break;case"auth/too-many-requests":n+="You have entered an incorrect password too many times. Please try again in a few minutes.";break;case"auth/user-cancelled":n+="Please authorize the required permissions to sign in to the application";break;case"auth/user-not-found":n+="That email address doesn't match an existing account";break;case"auth/user-token-expired":n+=Pn();break;case"auth/weak-password":n+="Strong passwords have at least 6 characters and a mix of letters and numbers";break;case"auth/wrong-password":n+="The email and password you entered don't match";break;case"auth/network-request-failed":n+="A network error has occurred";break;case"auth/invalid-phone-number":n+=Tn();break;case"auth/invalid-verification-code":n+=cn("Wrong code. Try again.");break;case"auth/code-expired":n+="This code is no longer valid";break;case"auth/expired-action-code":n+="This code has expired.";break;
2case"auth/invalid-action-code":n+="The action code is invalid. This can happen if the code is malformed, expired, or has already been used."}if(t=cn(n).toString())return t;try{return JSON.parse(e.message),Gi("Internal error: "+e.message,void 0),On().toString()}catch(r){return e.message}}function tl(e,t,n,i){function o(){!function(e,t){Zo(Go,{tenantId:e.a},t)}(new ao(e.h.tenantId||null),kf(e)),Of(e,t.I(C(e.dc,e),[c],(function(){if("file:"===(window.location&&window.location.protocol))return Of(e,mf(e).then((function(n){t.o(),Jo(Go,kf(e)),cs("callback",e,u,Hr(n))}),a))}),s))}function a(n){if(Jo(Go,kf(e)),!n.name||"cancel"!=n.name)switch(n=Qc(n),n.code){case"auth/popup-blocked":o();break;case"auth/popup-closed-by-user":case"auth/cancelled-popup-request":case"auth/credential-already-in-use":break;case"auth/network-request-failed":case"auth/too-many-requests":case"auth/user-cancelled":t.a(el(n));break;default:t.o(),cs("callback",e,u,Kr(n))}}function s(n){Jo(Go,kf(e)),n.name&&"cancel"==n.name||(Gi("signInWithRedirect: "+n.code,void 0),n=el(n),"blank"==t.Ga&&za(Pf(e))?(t.o(),cs("providerSignIn",e,u,n)):t.a(n))}var u=ju(t),c=function(e,t,n){var i=xa[t]&&r.a.auth[xa[t]]?new r.a.auth[xa[t]]:0==t.indexOf("saml.")?new r.a.auth.SAMLAuthProvider(t):new r.a.auth.OAuthProvider(t);if(!i)throw Error("Invalid Firebase Auth provider!");var o=Da(Pf(e),t);if(i.addScope)for(var a=0;a<o.length;a++)i.addScope(o[a]);return o=Ma(Pf(e),t)||{},n&&(e=t==r.a.auth.GoogleAuthProvider.PROVIDER_ID?"login_hint":t==r.a.auth.GithubAuthProvider.PROVIDER_ID?"login":(e=Pa(Pf(e),t))&&e.Ob)&&(o[e]=n),i.setCustomParameters&&i.setCustomParameters(o),i}(e,n,i);Ha(Pf(e))==rs?o():Of(e,function(e,t){return Rf(e),Tf(e,(function(n){return n&&!ta(kf(e))?n.linkWithPopup(t).then((function(e){return e}),(function(t){if(t&&"auth/email-already-in-use"==t.code&&t.email&&t.credential)throw t;return Mf(e,t)})):_f(e).signInWithPopup(t)}))}(e,c).then((function(n){t.o(),cs("callback",e,u,Hr(n))}),a))}function nl(e){return 1==(e=Na(Pf(e))).length&&e[0]==r.a.auth.EmailAuthProvider.PROVIDER_ID}function rl(e){return 1==(e=Na(Pf(e))).length&&e[0]==r.a.auth.PhoneAuthProvider.PROVIDER_ID}function il(e,t,n,r){nl(e)?r?cs("signIn",e,t,n,r):ul(e,t,n):e&&rl(e)&&!r?cs("phoneSignInStart",e,t):e&&za(Pf(e))&&!r?cs("federatedRedirect",e,t,n):cs("providerSignIn",e,t,r,n)}function ol(e,t,n,r){var i=ju(t);Of(e,t.I(C(_f(e).fetchSignInMethodsForEmail,_f(e)),[n],(function(o){t.o(),al(e,i,o,n,r)}),(function(e){e=el(e),t.a(e)})))}function al(e,t,n,i,o,a){n.length||qa(Pf(e))&&!qa(Pf(e))?z(n,r.a.auth.EmailAuthProvider.EMAIL_PASSWORD_SIGN_IN_METHOD)?cs("passwordSignIn",e,t,i,a):1==n.length&&n[0]===r.a.auth.EmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD?qa(Pf(e))?cs("sendEmailLinkForSignIn",e,t,i,(function(){cs("signIn",e,t)})):cs("unsupportedProvider",e,t,i):(n=Sa(n,Na(Pf(e))))?(ra(new ro(i),kf(e)),cs("federatedSignIn",e,t,i,n,o)):cs("unsupportedProvider",e,t,i):function(e){return!!((e=Aa(e,r.a.auth.EmailAuthProvider.PROVIDER_ID))&&e.disableSignUp&&e.disableSignUp.status)}(Pf(e))?cs("handleUnauthorizedUser",e,t,i,r.a.auth.EmailAuthProvider.PROVIDER_ID):qa(Pf(e))?cs("sendEmailLinkForSignIn",e,t,i,(function(){cs("signIn",e,t)})):cs("passwordSignUp",e,t,i,void 0,void 0,a)}function sl(e,t,n,r,i,o){var a=ju(t);Of(e,t.I(C(e.Ib,e),[n,o],(function(){t.o(),cs("emailLinkSignInSent",e,a,n,r,o)}),i))}function ul(e,t,n){n?cs("prefilledEmailSignIn",e,t,n):cs("signIn",e,t)}function cl(){return we(ai(),"oobCode")}function ll(){var e=we(ai(),"continueUrl");return e?function(){Mt(window.location,e)}:null}function fl(e,t){Ru.call(this,$u,void 0,t,"anonymousUserMismatch"),this.i=e}function hl(e){Ru.call(this,qu,void 0,e,"callback")}function dl(e,t,n){if(n.user){var r={user:n.user,credential:n.credential,operationType:n.operationType,additionalUserInfo:n.additionalUserInfo},i=ta(kf(e)),o=i&&i.g;if(o&&!function(e,t){if(t==e.email)return!0;if(e.providerData)for(var n=0;n<e.providerData.length;n++)if(t==e.providerData[n].email)return!0;return!1}(n.user,o))!function(e,t,n){var r=ju(t);Of(e,Df(e).then((function(){t.o(),cs("emailMismatch",e,r,n)}),(function(e){e.name&&"cancel"==e.name||(e=el(e.code),t.a(e))})))}(e,t,r);else{var a=i&&i.a;a?Of(e,n.user.linkWithCredential(a).then((function(n){r={user:n.user,credential:a,operationType:n.operationType,additionalUserInfo:n.additionalUserInfo},pl(e,t,r)}),(function(n){gl(e,t,n)}))):pl(e,t,r)}}else n=ju(t),t.o(),na(kf(e)),il(e,n)}function pl(e,t,n){na(kf(e)),Xc(e,t,n)}function gl(e,t,n){var r=ju(t);na(kf(e)),n=el(n),t.o(),il(e,r,void 0,n)}function vl(e,t,n,i){var o=ju(t);Of(e,_f(e).fetchSignInMethodsForEmail(n).then((function(a){t.o(),a.length?z(a,r.a.auth.EmailAuthProvider.EMAIL_PASSWORD_SIGN_IN_METHOD)?cs("passwordLinking",e,o,n):1==a.length&&a[0]===r.a.auth.EmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD?cs("emailLinkSignInLinking",e,o,n):(a=Sa(a,Na(Pf(e))))?cs("federatedLinking",e,o,n,a,i):(na(kf(e)),cs("unsupportedProvider",e,o,n)):(na(kf(e)),cs("passwordRecovery",e,o,n,!1,An().toString()))}),(function(n){gl(e,t,n)})))}function ml(e,t){Ru.call(this,Yu,void 0,t,"differentDeviceError"),this.i=e}function yl(e,t,n,r){Ru.call(this,oc,{email:e,G:!!n},r,"emailChangeRevoke"),this.l=t,this.i=n||null}function bl(){return Ys(this,"firebaseui-id-new-password")}function _l(){return Ys(this,"firebaseui-id-password-toggle")}function wl(){this.Ra=!this.Ra;var e=_l.call(this),t=bl.call(this);this.Ra?(t.type="text",hs(e,"firebaseui-input-toggle-off"),ds(e,"firebaseui-input-toggle-on")):(t.type="password",hs(e,"firebaseui-input-toggle-on"),ds(e,"firebaseui-input-toggle-off")),t.focus()}function kl(){return Ys(this,"firebaseui-id-new-password-error")}function El(){this.Ra=!1;var e=bl.call(this);e.type="password";var t=kl.call(this);Js(this,e,(function(){ru(t)&&(Xs(e,!0),tu(t))}));var n=_l.call(this);hs(n,"firebaseui-input-toggle-on"),ds(n,"firebaseui-input-toggle-off"),function(e,t,n){Fn(e,O(Un,t=new Es(t))),Cs($s(e),t,"focusin",n)}(this,e,(function(){hs(n,"firebaseui-input-toggle-focus"),ds(n,"firebaseui-input-toggle-blur")})),function(e,t,n){Fn(e,O(Un,t=new Es(t))),Cs($s(e),t,"focusout",n)}(this,e,(function(){hs(n,"firebaseui-input-toggle-blur"),ds(n,"firebaseui-input-toggle-focus")})),eu(this,n,C(wl,this))}function Sl(){var e=bl.call(this),t=kl.call(this);return ps(e)?(Xs(e,!0),tu(t),t=!0):(Xs(e,!1),nu(t,cn("Enter your password").toString()),t=!1),t?ps(e):null}function Il(e,t,n){Ru.call(this,nc,{email:e},n,"passwordReset"),this.l=t}function xl(e,t,n,r,i){Ru.call(this,fc,{factorId:e,phoneNumber:n||null,G:!!r},i,"revertSecondFactorAdditionSuccess"),this.l=t,this.i=r||null}function Tl(e,t,n,r){"auth/weak-password"==(r&&r.code)?(e=el(r),Xs(n.i(),!1),nu(n.w(),e),n.i().focus()):(n&&n.o(),(n=new Wc).render(t),yf(e,n))}function Cl(e,t){try{var n="number"==typeof e.selectionStart}catch(r){n=!1}n?(e.selectionStart=t,e.selectionEnd=t):et&&!dt("9")&&("textarea"==e.type&&(t=e.value.substring(0,t).replace(/(\r\n|\r|\n)/g,"\n").length),(e=e.createTextRange()).collapse(!0),e.move("character",t),e.select())}function Ol(e,t,n,r,i,o){Ru.call(this,Gu,{email:n},o,"emailLinkSignInConfirmation",{F:r,D:i}),this.l=e,this.u=t}function Al(e,t,n,r,i){Ru.call(this,Ju,{ga:e},i,"emailLinkSignInLinkingDifferentDevice",{F:n,D:r}),this.i=t}function Nl(e){Ru.call(this,Hu,void 0,e,"blank")}function Pl(e,t,n,i,o){var a=new Nl,s=new qe(n),u=s.a.a.get(We.$a)||"",c=s.a.a.get(We.Sa)||"",l="1"===s.a.a.get(We.Qa),f=ze(s),h=s.a.a.get(We.PROVIDER_ID)||null;s=s.a.a.get(We.vb)||null,Nf(e,s);var d=!Xo($o,kf(e)),p=i||function(e,t){var n=null;if(t=Xo($o,t))try{var r=Oo(e,t),i=JSON.parse(r);n=i&&i.email||null}catch(a){}return n}(c,kf(e)),g=(i=function(e,t){var n=null;if(t=Xo(Qo,t))try{var r=Oo(e,t);n=JSON.parse(r)}catch(o){}return oo(n||null)}(c,kf(e)))&&i.a;h&&g&&g.providerId!==h&&(g=null),a.render(t),yf(e,a),Of(e,a.I((function(){var t=Hr(null);t=f&&d||d&&l?Kr(Error("anonymous-user-not-found")):function(e,t){var n=ze(new qe(t));return n?(t=new Lr((function(t,r){var i=wf(e).onAuthStateChanged((function(e){i(),e&&e.isAnonymous&&e.uid===n?t(e):e&&e.isAnonymous&&e.uid!==n?r(Error("anonymous-user-mismatch")):r(Error("anonymous-user-not-found"))}));Of(e,i)})),Of(e,t),t):Hr(null)}(e,n).then((function(e){if(h&&!g)throw Error("pending-credential-not-found");return e}));var r=null;return t.then((function(t){return r=t,o?null:_f(e).checkActionCode(u)})).then((function(){return r}))}),[],(function(i){p?function(e,t,n,i,o,a){var s=ju(t);t.$("mdl-spinner mdl-spinner--single-color mdl-js-spinner is-active firebaseui-progress-dialog-loading-icon",cn("Signing in...").toString());var u=null;o=(a?function(e,t,n,i,o){Rf(e);var a=o||null,s=r.a.auth.EmailAuthProvider.credentialWithLink(n,i);return n=a?_f(e).signInWithEmailLink(n,i).then((function(e){return e.user.linkWithCredential(a)})).then((function(){return Df(e)})).then((function(){return Mf(e,{code:"auth/email-already-in-use"},a)})):_f(e).fetchSignInMethodsForEmail(n).then((function(n){return n.length?Mf(e,{code:"auth/email-already-in-use"},s):t.linkWithCredential(s)})),Of(e,n),n}(e,a,n,i,o):function(e,t,n,r){Rf(e);var i,o=r||null;return t=_f(e).signInWithEmailLink(t,n).then((function(e){if(i={user:e.user,credential:null,operationType:e.operationType,additionalUserInfo:e.additionalUserInfo},o)return e.user.linkWithCredential(o).then((function(e){i={user:e.user,credential:o,operationType:i.operationType,additionalUserInfo:e.additionalUserInfo}}))})).then((function(){Df(e)}
2)).then((function(){return wf(e).updateCurrentUser(i.user)})).then((function(){return i.user=wf(e).currentUser,i})),Of(e,t),t}(e,n,i,o)).then((function(n){Jo(Qo,kf(e)),Jo($o,kf(e)),t.h(),t.$("firebaseui-icon-done",cn("Signed in!").toString()),u=setTimeout((function(){t.h(),Xc(e,t,n,!0)}),1e3),Of(e,(function(){t&&(t.h(),t.o()),clearTimeout(u)}))}),(function(r){if(t.h(),t.o(),!r.name||"cancel"!=r.name){var o=el(r=Qc(r));"auth/email-already-in-use"==r.code||"auth/credential-already-in-use"==r.code?(Jo(Qo,kf(e)),Jo($o,kf(e))):"auth/invalid-email"==r.code?(o=cn("The email provided does not match the current sign-in session.").toString(),cs("emailLinkConfirmation",e,s,i,Rl,null,o)):il(e,s,n,o)}})),Of(e,o)}(e,a,p,n,g,i):l?(a.o(),cs("differentDeviceError",e,t)):(a.o(),cs("emailLinkConfirmation",e,t,n,Rl))}),(function(r){var i=void 0;if(!r||!r.name||"cancel"!=r.name)switch(a.o(),r&&r.message){case"anonymous-user-not-found":cs("differentDeviceError",e,t);break;case"anonymous-user-mismatch":cs("anonymousUserMismatch",e,t);break;case"pending-credential-not-found":cs("emailLinkNewDeviceLinking",e,t,n,jl);break;default:r&&(i=el(r)),il(e,t,void 0,i)}})))}function Rl(e,t,n,r){Pl(e,t,r,n,!0)}function jl(e,t,n){Pl(e,t,n)}function Dl(e,t,n,r,i,o){Ru.call(this,Xu,{email:e,ga:t},o,"emailLinkSignInLinking",{F:r,D:i}),this.i=n}function Ml(e,t,n,r,i,o){Ru.call(this,Ku,{email:e},o,"emailLinkSignInSent",{F:r,D:i}),this.u=t,this.i=n}function Ll(e,t,n,r,i,o,a){Ru.call(this,gc,{jc:e,Qb:t},a,"emailMismatch",{F:i,D:o}),this.l=n,this.i=r}function Fl(e,t,n,r,i){Ru.call(this,Wu,void 0,i,"emailNotReceived",{F:n,D:r}),this.l=e,this.i=t}function Ul(e,t,n,r,i,o){Ru.call(this,Zu,{email:e,ga:t},o,"federatedLinking",{F:r,D:i}),this.i=n}function Vl(e,t,n,r,i,o){Ru.call(this,Vu,{email:n,Ta:!!t},o,"passwordRecovery",{F:r,D:i}),this.l=e,this.u=t}function Bl(){return Ys(this,"firebaseui-id-name")}function ql(){return Ys(this,"firebaseui-id-name-error")}function zl(e,t,n,r,i,o,a,s,u){Ru.call(this,Uu,{email:r,Tb:e,name:i,Ta:!!n,ia:!!s},u,"passwordSignUp",{F:o,D:a}),this.w=t,this.H=n,this.B=e}function Hl(e,t){var n=Ba(Pf(e)),i=t.j(),o=null;n&&(o=t.M());var a=t.P();if(i){if(n){if(!o)return void t.u().focus();o=ae(o)}if(a){var s=r.a.auth.EmailAuthProvider.credential(i,a);Of(e,t.I(C(e.Yb,e),[i,a],(function(r){var i={user:r.user,credential:s,operationType:r.operationType,additionalUserInfo:r.additionalUserInfo};return n?(r=r.user.updateProfile({displayName:o}).then((function(){return Xc(e,t,i)})),Of(e,r),r):Xc(e,t,i)}),(function(n){if(!n.name||"cancel"!=n.name){var r=Qc(n);switch(n=el(r),r.code){case"auth/email-already-in-use":return function(e,t,n,r){function i(){var e=el(r);Xs(t.i(),!1),nu(t.U(),e),t.i().focus()}var o=_f(e).fetchSignInMethodsForEmail(n).then((function(r){r.length?i():(r=ju(t),t.o(),cs("passwordRecovery",e,r,n,!1,An().toString()))}),(function(){i()}));return Of(e,o),o}(e,t,i,r);case"auth/too-many-requests":n=cn("Too many account requests are coming from your IP address. Try again in a few minutes.").toString();case"auth/operation-not-allowed":case"auth/weak-password":Xs(t.l(),!1),nu(t.ba(),n);break;default:Gi(r="setAccountInfo: "+No(r),void 0),t.a(n)}}})))}else t.l().focus()}else t.i().focus()}function Kl(){return Ys(this,"firebaseui-id-phone-confirmation-code")}function Wl(){return Ys(this,"firebaseui-id-phone-confirmation-code-error")}function Gl(){return Ys(this,"firebaseui-id-resend-countdown")}function Yl(e,t,n,r,i,o,a,s,u){Ru.call(this,yc,{phoneNumber:i},u,"phoneSignInFinish",{F:a,D:s}),this.jb=o,this.i=new Ss(1e3),this.B=o,this.P=e,this.l=t,this.H=n,this.M=r}u(Mc,Ru),Mc.prototype.v=function(){this.P(),this.ea(),this.ba(this.w,this.H),Du(this,this.l(),this.i()),Mu(this,this.i(),this.w),ps(this.l())?this.i().focus():this.l().focus(),Ru.prototype.v.call(this)},Mc.prototype.m=function(){this.H=this.w=null,Ru.prototype.m.call(this)},A(Mc.prototype,{l:Nc,U:Pc,P:Rc,M:jc,j:Dc,i:Ic,B:xc,ea:Tc,u:Cc,ua:kc,pa:Ec,ba:Sc}),j(Lc,Ru),Lc.prototype.v=function(){this.i&&(this.u(this.i),this.l().focus()),Lc.K.v.call(this)},Lc.prototype.m=function(){this.i=null,Lc.K.m.call(this)},A(Lc.prototype,{l:kc,w:Ec,u:Sc}),j(Fc,Lc),j(Uc,Lc),j(Vc,Lc),j(Bc,Lc),j(qc,Lc),j(zc,Lc),j(Hc,Lc),j(Kc,Lc),j(Wc,Lc),j(Gc,Lc),j(Yc,Lc),j($c,Lc),u(fl,Ru),fl.prototype.v=function(){var e=this;eu(this,this.l(),(function(){e.i()})),this.l().focus(),Ru.prototype.v.call(this)},fl.prototype.m=function(){this.i=null,Ru.prototype.m.call(this)},A(fl.prototype,{l:Ec}),us.anonymousUserMismatch=function(e,t){var n=new fl((function(){n.o(),il(e,t)}));n.render(t),yf(e,n)},u(hl,Ru),hl.prototype.I=function(e,t,n,r){return e.apply(null,t).then(n,r)},us.callback=function(e,t,n){var r=new hl;r.render(t),yf(e,r),t=n||mf(e),Of(e,t.then((function(t){dl(e,r,t)}),(function(t){if((t=Qc(t))&&("auth/account-exists-with-different-credential"==t.code||"auth/email-already-in-use"==t.code)&&t.email&&t.credential)ra(new ro(t.email,t.credential),kf(e)),vl(e,r,t.email);else if(t&&"auth/user-cancelled"==t.code){var n=ta(kf(e)),i=el(t);n&&n.a?vl(e,r,n.g,i):n?ol(e,r,n.g,i):gl(e,r,t)}else t&&"auth/credential-already-in-use"==t.code||(t&&"auth/operation-not-supported-in-this-environment"==t.code&&nl(e)?dl(e,r,{user:null,credential:null}):gl(e,r,t))})))},u(ml,Ru),ml.prototype.v=function(){var e=this;eu(this,this.l(),(function(){e.i()})),this.l().focus(),Ru.prototype.v.call(this)},ml.prototype.m=function(){this.i=null,Ru.prototype.m.call(this)},A(ml.prototype,{l:Ec}),us.differentDeviceError=function(e,t){var n=new ml((function(){n.o(),il(e,t)}));n.render(t),yf(e,n)},u(yl,Ru),yl.prototype.v=function(){var e=this;eu(this,Ys(this,"firebaseui-id-reset-password-link"),(function(){e.l()})),this.i&&(this.w(this.i),this.u().focus()),Ru.prototype.v.call(this)},yl.prototype.m=function(){this.l=this.i=null,Ru.prototype.m.call(this)},A(yl.prototype,{u:kc,B:Ec,w:Sc}),u(Il,Ru),Il.prototype.v=function(){this.H(),this.B(this.l),Mu(this,this.i(),this.l),this.i().focus(),Ru.prototype.v.call(this)},Il.prototype.m=function(){this.l=null,Ru.prototype.m.call(this)},A(Il.prototype,{i:bl,w:kl,M:_l,H:El,u:Sl,U:kc,P:Ec,B:Sc}),u(xl,Ru),xl.prototype.v=function(){var e=this;eu(this,Ys(this,"firebaseui-id-reset-password-link"),(function(){e.l()})),this.i&&(this.w(this.i),this.u().focus()),Ru.prototype.v.call(this)},xl.prototype.m=function(){this.l=this.i=null,Ru.prototype.m.call(this)},A(xl.prototype,{u:kc,B:Ec,w:Sc}),us.passwordReset=function(e,t,n,r){Of(e,_f(e).verifyPasswordResetCode(n).then((function(i){var o=new Il(i,(function(){!function(e,t,n,r,i){var o=n.u();o&&Of(e,n.I(C(_f(e).confirmPasswordReset,_f(e)),[r,o],(function(){n.o();var r=new Kc(i);r.render(t),yf(e,r)}),(function(r){Tl(e,t,n,r)})))}(e,t,o,n,r)}));o.render(t),yf(e,o)}),(function(){Tl(e,t)})))},us.emailChangeRevocation=function(e,t,n){var r=null;Of(e,_f(e).checkActionCode(n).then((function(t){return r=t.data.email,_f(e).applyActionCode(n)})).then((function(){!function(e,t,n){var r=new yl(n,(function(){Of(e,r.I(C(_f(e).sendPasswordResetEmail,_f(e)),[n],(function(){r.o(),(r=new Fc(n,void 0,Ua(Pf(e)),Va(Pf(e)))).render(t),yf(e,r)}),(function(){r.a(Cn().toString())})))}));r.render(t),yf(e,r)}(e,t,r)}),(function(){var n=new Gc;n.render(t),yf(e,n)})))},us.emailVerification=function(e,t,n,r){Of(e,_f(e).applyActionCode(n).then((function(){var n=new Uc(r);n.render(t),yf(e,n)}),(function(){var n=new Vc;n.render(t),yf(e,n)})))},us.revertSecondFactorAddition=function(e,t,n){var r=null,i=null;Of(e,_f(e).checkActionCode(n).then((function(t){return r=t.data.email,i=t.data.multiFactorInfo,_f(e).applyActionCode(n)})).then((function(){!function(e,t,n,r){var i=new xl(r.factorId,(function(){i.I(C(_f(e).sendPasswordResetEmail,_f(e)),[n],(function(){i.o(),(i=new Fc(n,void 0,Ua(Pf(e)),Va(Pf(e)))).render(t),yf(e,i)}),(function(){i.a(Cn().toString())}))}),r.phoneNumber);i.render(t),yf(e,i)}(e,t,r,i)}),(function(){var n=new zc;n.render(t),yf(e,n)})))},us.verifyAndChangeEmail=function(e,t,n,r){var i=null;Of(e,_f(e).checkActionCode(n).then((function(t){return i=t.data.email,_f(e).applyActionCode(n)})).then((function(){var n=new Bc(i,r);n.render(t),yf(e,n)}),(function(){var n=new qc;n.render(t),yf(e,n)})))},u(Ol,Ru),Ol.prototype.v=function(){this.w(this.l),this.B(this.l,this.u),this.i().focus(),Cl(this.i(),(this.i().value||"").length),Ru.prototype.v.call(this)},Ol.prototype.m=function(){this.u=this.l=null,Ru.prototype.m.call(this)},A(Ol.prototype,{i:Nc,M:Pc,w:Rc,H:jc,j:Dc,U:kc,P:Ec,B:Sc}),us.emailLinkConfirmation=function(e,t,n,r,i,o){var a=new Ol((function(){var i=a.j();i?(a.o(),r(e,t,i,n)):a.i().focus()}),(function(){a.o(),il(e,t,i||void 0)}),i||void 0,Ua(Pf(e)),Va(Pf(e)));a.render(t),yf(e,a),o&&a.a(o)},u(Al,Ru),Al.prototype.v=function(){this.u(this.i),this.l().focus(),Ru.prototype.v.call(this)},Al.prototype.m=function(){this.i=null,Ru.prototype.m.call(this)},A(Al.prototype,{l:kc,u:Sc}),us.emailLinkNewDeviceLinking=function(e,t,n,r){var i=new qe(n);if(n=i.a.a.get(We.PROVIDER_ID)||null,He(i,null),n){var o=new Al(Pa(Pf(e),n),(function(){o.o(),r(e,t,i.toString())}),Ua(Pf(e)),Va(Pf(e)));o.render(t),yf(e,o)}else il(e,t)},u(Nl,Ru),us.emailLinkSignInCallback=Pl,u(Dl,Ru),Dl.prototype.v=function(){this.u(this.i),this.l().focus(),Ru.prototype.v.call(this)},Dl.prototype.m=function(){this.i=null,Ru.prototype.m.call(this)},A(Dl.prototype,{l:kc,u:Sc}),us.emailLinkSignInLinking=function(e,t,n){var r=ta(kf(e));if(na(kf(e)),r){var i=r.a.providerId,o=new Dl(n,Pa(Pf(e),i),(function(){!function(e,t,n,r){var i=ju(t);sl(e,t,n,(function(){il(e,i,n)}),(function(r){if(!r.name||"cancel"!=r.name){var o=el(r);r&&"auth/network-request-failed"==r.code?t.a(o):(t.o(),il(e,i,n,o))}}),r)}(e,o,n,r)}),Ua(Pf(e)),Va(Pf(e)));o.render(t),yf(e,o)}else il(e,t)},u(Ml,Ru),Ml.prototype.v=function(){var e=this;eu(this,this.l(),(function(){e.i()})),eu(this,Ys(this,"firebaseui-id-trouble-getting-email-link"),(function(){e.u()})),this.l().focus(),Ru.prototype.v.call(this)},Ml.prototype.m=function(){this.i=this.u=null,Ru.prototype.m.call(this)},A(Ml.prototype,{l:Ec}),us.emailLinkSignInSent=function(e,t,n,r,i){var o=new Ml(n,(function(){o.o(),cs("emailN
2otReceived",e,t,n,r,i)}),(function(){o.o(),r()}),Ua(Pf(e)),Va(Pf(e)));o.render(t),yf(e,o)},u(Ll,Ru),Ll.prototype.v=function(){this.w(this.l,this.i),this.u().focus(),Ru.prototype.v.call(this)},Ll.prototype.m=function(){this.i=null,Ru.prototype.m.call(this)},A(Ll.prototype,{u:kc,B:Ec,w:Sc}),us.emailMismatch=function(e,t,n){var r=ta(kf(e));if(r){var i=new Ll(n.user.email,r.g,(function(){var t=i;na(kf(e)),Xc(e,t,n)}),(function(){var t=n.credential.providerId,o=ju(i);i.o(),r.a?cs("federatedLinking",e,o,r.g,t):cs("federatedSignIn",e,o,r.g,t)}),Ua(Pf(e)),Va(Pf(e)));i.render(t),yf(e,i)}else il(e,t)},u(Fl,Ru),Fl.prototype.v=function(){var e=this;eu(this,this.u(),(function(){e.i()})),eu(this,this.Da(),(function(){e.l()})),this.u().focus(),Ru.prototype.v.call(this)},Fl.prototype.Da=function(){return Ys(this,"firebaseui-id-resend-email-link")},Fl.prototype.m=function(){this.i=this.l=null,Ru.prototype.m.call(this)},A(Fl.prototype,{u:Ec}),us.emailNotReceived=function(e,t,n,r,i){var o=new Fl((function(){sl(e,o,n,r,(function(e){e=el(e),o.a(e)}),i)}),(function(){o.o(),il(e,t,n)}),Ua(Pf(e)),Va(Pf(e)));o.render(t),yf(e,o)},u(Ul,Ru),Ul.prototype.v=function(){this.u(this.i),this.l().focus(),Ru.prototype.v.call(this)},Ul.prototype.m=function(){this.i=null,Ru.prototype.m.call(this)},A(Ul.prototype,{l:kc,u:Sc}),us.federatedLinking=function(e,t,n,r,i){var o=ta(kf(e));if(o&&o.a){var a=new Ul(n,Pa(Pf(e),r),(function(){tl(e,a,r,n)}),Ua(Pf(e)),Va(Pf(e)));a.render(t),yf(e,a),i&&a.a(i)}else il(e,t)},us.federatedRedirect=function(e,t,n){var r=new Nl;r.render(t),yf(e,r),tl(e,r,t=Na(Pf(e))[0],n)},us.federatedSignIn=function(e,t,n,r,i){var o=new Ul(n,Pa(Pf(e),r),(function(){tl(e,o,r,n)}),Ua(Pf(e)),Va(Pf(e)));o.render(t),yf(e,o),i&&o.a(i)},us.passwordLinking=function(e,t,n){var r=ta(kf(e));na(kf(e));var i=r&&r.a;if(i){var o=new Oc(n,(function(){!function(e,t,n,r){var i=t.u();i?Of(e,t.I(C(e.Xb,e),[n,i],(function(n){return n=n.user.linkWithCredential(r).then((function(n){return Xc(e,t,{user:n.user,credential:r,operationType:n.operationType,additionalUserInfo:n.additionalUserInfo})})),Of(e,n),n}),(function(e){if(!e.name||"cancel"!=e.name)switch(e.code){case"auth/wrong-password":Xs(t.i(),!1),nu(t.B(),el(e));break;case"auth/too-many-requests":t.a(el(e));break;default:Gi("signInWithEmailAndPassword: "+e.message,void 0),t.a(el(e))}}))):t.i().focus()}(e,o,n,i)}),(function(){o.o(),cs("passwordRecovery",e,t,n)}),Ua(Pf(e)),Va(Pf(e)));o.render(t),yf(e,o)}else il(e,t)},u(Vl,Ru),Vl.prototype.v=function(){this.B(),this.H(this.l,this.u),ps(this.i())||this.i().focus(),Mu(this,this.i(),this.l),Ru.prototype.v.call(this)},Vl.prototype.m=function(){this.u=this.l=null,Ru.prototype.m.call(this)},A(Vl.prototype,{i:Nc,w:Pc,B:Rc,M:jc,j:Dc,U:kc,P:Ec,H:Sc}),us.passwordRecovery=function(e,t,n,r,i){var o=new Vl((function(){!function(e,t){var n=t.j();if(n){var r=ju(t);Of(e,t.I(C(_f(e).sendPasswordResetEmail,_f(e)),[n],(function(){t.o();var i=new Fc(n,(function(){i.o(),il(e,r)}),Ua(Pf(e)),Va(Pf(e)));i.render(r),yf(e,i)}),(function(e){Xs(t.i(),!1),nu(t.w(),el(e))})))}else t.i().focus()}(e,o)}),r?void 0:function(){o.o(),il(e,t)},n,Ua(Pf(e)),Va(Pf(e)));o.render(t),yf(e,o),i&&o.a(i)},us.passwordSignIn=function(e,t,n,i){var o=new Mc((function(){!function(e,t){var n=t.j(),i=t.u();if(n)if(i){var o=r.a.auth.EmailAuthProvider.credential(n,i);Of(e,t.I(C(e.bc,e),[n,i],(function(n){return Xc(e,t,{user:n.user,credential:o,operationType:n.operationType,additionalUserInfo:n.additionalUserInfo})}),(function(e){if(!e.name||"cancel"!=e.name)switch(e.code){case"auth/email-already-in-use":break;case"auth/email-exists":Xs(t.l(),!1),nu(t.U(),el(e));break;case"auth/too-many-requests":case"auth/wrong-password":Xs(t.i(),!1),nu(t.B(),el(e));break;default:Gi("verifyPassword: "+e.message,void 0),t.a(el(e))}})))}else t.i().focus();else t.l().focus()}(e,o)}),(function(){var n=o.M();o.o(),cs("passwordRecovery",e,t,n)}),n,Ua(Pf(e)),Va(Pf(e)),i);o.render(t),yf(e,o)},u(zl,Ru),zl.prototype.v=function(){this.ea(),this.B&&this.Ja(),this.ua(),this.pa(this.w,this.H),this.B?(Du(this,this.i(),this.u()),Du(this,this.u(),this.l())):Du(this,this.i(),this.l()),this.w&&Mu(this,this.l(),this.w),ps(this.i())?this.B&&!ps(this.u())?this.u().focus():this.l().focus():this.i().focus(),Ru.prototype.v.call(this)},zl.prototype.m=function(){this.H=this.w=null,Ru.prototype.m.call(this)},A(zl.prototype,{i:Nc,U:Pc,ea:Rc,jb:jc,j:Dc,u:Bl,Bc:ql,Ja:function(){var e=Bl.call(this),t=ql.call(this);Js(this,e,(function(){ru(t)&&(Xs(e,!0),tu(t))}))},M:function(){var e=Bl.call(this),t=ql.call(this),n=ps(e);return Xs(e,n=!/^[\s\xa0]*$/.test(null==n?"":String(n))),n?(tu(t),t=!0):(nu(t,cn("Enter your account name").toString()),t=!1),t?X(ps(e)):null},l:bl,ba:kl,lb:_l,ua:El,P:Sl,Nb:kc,Mb:Ec,pa:Sc}),us.passwordSignUp=function(e,t,n,r,i,o){var a=new zl(Ba(Pf(e)),(function(){Hl(e,a)}),i?void 0:function(){a.o(),il(e,t)},n,r,Ua(Pf(e)),Va(Pf(e)),o);a.render(t),yf(e,a)},u(Yl,Ru),Yl.prototype.v=function(){var e=this;this.U(this.jb),nr(this.i,"tick",this.w,!1,this),this.i.start(),eu(this,Ys(this,"firebaseui-id-change-phone-number-link"),(function(){e.P()})),eu(this,this.Da(),(function(){e.M()})),this.Ja(this.l),this.ea(this.l,this.H),this.u().focus(),Ru.prototype.v.call(this)},Yl.prototype.m=function(){this.M=this.H=this.l=this.P=null,Is(this.i),or(this.i,"tick",this.w),this.i=null,Ru.prototype.m.call(this)},Yl.prototype.w=function(){--this.B,0<this.B?this.U(this.B):(Is(this.i),or(this.i,"tick",this.w),this.ua(),this.lb())},A(Yl.prototype,{u:Kl,pa:Wl,Ja:function(e){var t=Kl.call(this),n=Wl.call(this);Js(this,t,(function(){ru(n)&&(Xs(t,!0),tu(n))})),e&&Zs(this,t,(function(){e()}))},ba:function(){var e=X(ps(Kl.call(this))||"");return/^\d{6}$/.test(e)?e:null},Fb:Gl,U:function(e){Gt(Gl.call(this),cn("Resend code in "+(9<e?"0:":"0:0")+e).toString())},ua:function(){tu(this.Fb())},Da:function(){return Ys(this,"firebaseui-id-resend-link")},lb:function(){nu(this.Da())},Nb:kc,Mb:Ec,ea:Sc}),us.phoneSignInFinish=function(e,t,n,r,i,o){var a=new Yl((function(){a.o(),cs("phoneSignInStart",e,t,n)}),(function(){!function(e,t,n,r){function i(e){t.u().focus(),Xs(t.u(),!1),nu(t.pa(),e)}var o=t.ba();o?(t.$("mdl-spinner mdl-spinner--single-color mdl-js-spinner is-active firebaseui-progress-dialog-loading-icon",cn("Verifying...").toString()),Of(e,t.I(C(r.confirm,r),[o],(function(n){t.h(),t.$("firebaseui-icon-done",cn("Verified!").toString());var r=setTimeout((function(){t.h(),t.o();var r={user:wf(e).currentUser,credential:null,operationType:n.operationType,additionalUserInfo:n.additionalUserInfo};Xc(e,t,r,!0)}),1e3);Of(e,(function(){t&&t.h(),clearTimeout(r)}))}),(function(r){if(r.name&&"cancel"==r.name)t.h();else{var o=Qc(r);switch(r=el(o),o.code){case"auth/credential-already-in-use":t.h();break;case"auth/code-expired":o=ju(t),t.h(),t.o(),cs("phoneSignInStart",e,o,n,r);break;case"auth/missing-verification-code":case"auth/invalid-verification-code":t.h(),i(r);break;default:t.h(),t.a(r)}}})))):i(cn("Wrong code. Try again.").toString())}(e,a,n,i)}),(function(){a.o(),il(e,t)}),(function(){a.o(),cs("phoneSignInStart",e,t,n)}),Ea(n),r,Ua(Pf(e)),Va(Pf(e)));a.render(t),yf(e,a),o&&a.a(o)};var $l=!et&&!($e("Safari")&&!(Qe()||$e("Coast")||$e("Opera")||$e("Edge")||$e("Firefox")||$e("FxiOS")||$e("Silk")||$e("Android")));function Ql(e,t){return/-[a-z]/.test(t)?null:$l&&e.dataset?!$e("Android")||Qe()||$e("Firefox")||$e("FxiOS")||$e("Opera")||$e("Silk")||t in e.dataset?void 0===(e=e.dataset[t])?null:e:null:e.getAttribute("data-"+String(t).replace(/([A-Z])/g,"-$1").toLowerCase())}function Xl(e,t,n){var r=this;e=tn(yu,{items:e},null,this.s),Iu.call(this,e,!0,!0),n&&(n=function(e,t){e=(e||document).getElementsByTagName("BUTTON");for(var n=0;n<e.length;n++)if(Ql(e[n],"listboxid")===t)return e[n];return null}
2(e,n))&&(n.focus(),function(e,t){var n=(t=t||Ht(document))||Ht(document),r=zs(e),i=zs(n);if(!et||9<=Number(ft)){a=Bs(n,"borderLeftWidth");var o=Bs(n,"borderRightWidth");s=Bs(n,"borderTopWidth"),u=Bs(n,"borderBottomWidth"),o=new Vs(parseFloat(s),parseFloat(o),parseFloat(u),parseFloat(a))}else{var a=Ks(n,"borderLeft");o=Ks(n,"borderRight");var s=Ks(n,"borderTop"),u=Ks(n,"borderBottom");o=new Vs(s,o,u,a)}n==Ht(document)?(a=r.a-n.scrollLeft,r=r.g-n.scrollTop,!et||10<=Number(ft)||(a+=o.left,r+=o.top)):(a=r.a-i.a-o.left,r=r.g-i.g-o.top),i=e.offsetWidth,o=e.offsetHeight,s=it&&!i&&!o,e=d(i)&&!s||!e.getBoundingClientRect?new Ft(i,o):new Ft((e=qs(e)).right-e.left,e.bottom-e.top),i=n.clientHeight-e.height,o=n.scrollLeft,s=n.scrollTop,n=new Lt(o+=Math.min(a,Math.max(a-(n.clientWidth-e.width),0)),s+=Math.min(r,Math.max(r-i,0))),t.scrollLeft=n.a,t.scrollTop=n.g}(n,e)),eu(this,e,(function(e){(e=(e=Yt(e.target,"firebaseui-id-list-box-dialog-button"))&&Ql(e,"listboxid"))&&(xu.call(r),t(e))}))}function Jl(){return Ys(this,"firebaseui-id-phone-number")}function Zl(){return Ys(this,"firebaseui-id-country-selector")}function ef(){return Ys(this,"firebaseui-id-phone-number-error")}function tf(e,t){var n=e.a,r=nf("1-US-0",n),i=null;if(!(i=t&&nf(t,n)?t:r?"1-US-0":0<n.length?n[0].c:null))throw Error("No available default country");af.call(this,i,e)}function nf(e,t){return!(!(e=ga(e))||!z(t,e))}function rf(e){return"firebaseui-flag-"+e.f}function of(e){var t=this;Xl.call(this,function(e){return B(e,(function(e){return{id:e.c,Ma:"firebaseui-flag "+rf(e),label:e.name+" \u200e+"+e.b}}))}(e.a),(function(n){af.call(t,n,e,!0),t.O().focus()}),this.Ba)}function af(e,t,n){var r=ga(e);r&&(n&&((t=pa(t,n=X(ps(Jl.call(this))||""))).length&&t[0].b!=r.b&&(n="+"+r.b+n.substr(t[0].b.length+1),gs(Jl.call(this),n))),t=ga(this.Ba),this.Ba=e,e=Ys(this,"firebaseui-id-country-selector-flag"),t&&ds(e,rf(t)),hs(e,rf(r)),Gt(Ys(this,"firebaseui-id-country-selector-code"),"\u200e+"+r.b))}function sf(e,t,n,r,i,o,a,s,u,c){Ru.call(this,mc,{Gb:t,Aa:u||null,Va:!!n,ia:!!o},c,"phoneSignInStart",{F:r,D:i}),this.H=s||null,this.M=t,this.l=e,this.w=n||null,this.pa=a||null}function uf(e,t,n,r){try{var i=t.U(Xa)}catch(o){return}i?$a?(t.$("mdl-spinner mdl-spinner--single-color mdl-js-spinner is-active firebaseui-progress-dialog-loading-icon",cn("Verifying...").toString()),Of(e,t.I(C(e.cc,e),[Ea(i),n],(function(n){var r=ju(t);t.$("firebaseui-icon-done",cn("Code sent!").toString());var o=setTimeout((function(){t.h(),t.o(),cs("phoneSignInFinish",e,r,i,15,n)}),1e3);Of(e,(function(){t&&t.h(),clearTimeout(o)}))}),(function(e){if(t.h(),!e.name||"cancel"!=e.name){grecaptcha.reset(Ja),$a=null;var n=e&&e.message||"";if(e.code)switch(e.code){case"auth/too-many-requests":n=cn("This phone number has been used too many times").toString();break;case"auth/invalid-phone-number":case"auth/missing-phone-number":return t.O().focus(),void nu(t.B(),Tn().toString());default:n=el(e)}t.a(n)}})))):Qa?nu(t.u(),cn("Solve the reCAPTCHA").toString()):!Qa&&r&&t.i().click():(t.O().focus(),nu(t.B(),Tn().toString()))}function cf(e,t,n,r,i){Ru.call(this,vc,{Sb:t},i,"providerSignIn",{F:n,D:r}),this.i=e}function lf(e,t,n,r,i,o,a){Ru.call(this,Lu,{email:n,Va:!!t,ia:!!o},a,"signIn",{F:r,D:i}),this.i=e,this.u=t}function ff(e,t,n,r,i,o,a){Ru.call(this,ec,{email:e,yb:n,Eb:!!r},a,"unauthorizedUser",{F:i,D:o}),this.l=t,this.i=r}function hf(e,t,n,r,i,o){Ru.call(this,tc,{email:e},o,"unsupportedProvider",{F:r,D:i}),this.l=t,this.i=n}function df(e,t){this.$=!1;var n=vf(t);if(gf[n])throw Error('An AuthUI instance already exists for the key "'+n+'"');gf[n]=this,this.a=e,this.u=null,this.Y=!1,pf(this.a),this.h=r.a.initializeApp({apiKey:e.app.options.apiKey,authDomain:e.app.options.authDomain},e.app.name+"-firebaseui-temp").auth(),(e=e.emulatorConfig)&&(n=e.port,this.h.useEmulator(e.protocol+"://"+e.host+(null===n?"":":"+n),e.options)),pf(this.h),this.h.setPersistence&&this.h.setPersistence(r.a.auth.Auth.Persistence.SESSION),this.oa=t,this.ca=new Ta,this.g=this.T=this.i=this.J=this.O=null,this.s=[],this.Z=!1,this.l=Si.Xa(),this.j=this.C=null,this.da=this.A=!1}function pf(e){e&&e.INTERNAL&&e.INTERNAL.logFramework&&e.INTERNAL.logFramework("FirebaseUI-web")}u(sf,Ru),sf.prototype.v=function(){this.ea(this.pa,this.H),this.P(this.l,this.w||void 0),this.M||Du(this,this.O(),this.i()),Mu(this,this.i(),this.l),this.O().focus(),Cl(this.O(),(this.O().value||"").length),Ru.prototype.v.call(this)},sf.prototype.m=function(){this.w=this.l=null,Ru.prototype.m.call(this)},A(sf.prototype,{Cb:Tu,O:Jl,B:ef,ea:function(e,t,n){var r=this,i=Jl.call(this),o=Zl.call(this),a=ef.call(this),s=e||_a,u=s.a;if(0==u.length)throw Error("No available countries provided.");tf.call(r,s,t),eu(this,o,(function(){of.call(r,s)})),Js(this,i,(function(){ru(a)&&(Xs(i,!0),tu(a));var e=X(ps(i)||""),t=ga(this.Ba),n=pa(s,e);e=nf("1-US-0",u),n.length&&n[0].b!=t.b&&(t=n[0],af.call(r,"1"==t.b&&e?"1-US-0":t.c,s))})),n&&Zs(this,i,(function(){n()}))},U:function(e){var t=X(ps(Jl.call(this))||""),n=(e=e||_a).a,r=pa(_a,t);if(r.length&&!z(n,r[0]))throw gs(Jl.call(this)),Jl.call(this).focus(),nu(ef.call(this),cn("The country code provided is not supported.").toString()),Error("The country code provided is not supported.");return n=ga(this.Ba),r.length&&r[0].b!=n.b&&af.call(this,r[0].c,e),r.length&&(t=t.
2substr(r[0].b.length+1)),t?new wa(this.Ba,t):null},Ja:Zl,ba:function(){return Ys(this,"firebaseui-recaptcha-container")},u:function(){return Ys(this,"firebaseui-id-recaptcha-error")},i:kc,ua:Ec,P:Sc}),us.phoneSignInStart=function(e,t,n,i){var o=function(e){var t=null;if(U(Oa(e),(function(e){e.provider==r.a.auth.PhoneAuthProvider.PROVIDER_ID&&E(e.recaptchaParameters)&&!Array.isArray(e.recaptchaParameters)&&(t=ue(e.recaptchaParameters))})),t){var n=[];U(ss,(function(e){"undefined"!==typeof t[e]&&(n.push(e),delete t[e])})),n.length&&Xi('The following provided "recaptchaParameters" keys are not allowed: '+n.join(", "))}return t}(Pf(e))||{};$a=null,Qa=!(o&&"invisible"===o.size);var a=rl(e),s=function(e){var t=(e=Aa(e,r.a.auth.PhoneAuthProvider.PROVIDER_ID))&&e.defaultCountry||null;t=t&&va(t);var n=null;return e&&"string"===typeof e.loginHint&&(n=ka(e.loginHint)),t&&t[0]||n&&ga(n.a)||null}(Pf(e)),u=a?function(e){var t=null;return(e=Aa(e,r.a.auth.PhoneAuthProvider.PROVIDER_ID))&&"string"===typeof e.loginHint&&(t=ka(e.loginHint)),e&&e.defaultNationalNumber||t&&t.Aa||null}(Pf(e)):null;s=n&&n.a||s&&s.c||null,n=n&&n.Aa||u,(u=La(Pf(e)))&&ya(u),Xa=u?new da(La(Pf(e))):_a;var c=new sf((function(t){uf(e,c,l,!(!t||!t.keyCode))}),Qa,a?null:function(){l.clear(),c.o(),il(e,t)},Ua(Pf(e)),Va(Pf(e)),a,Xa,s,n);c.render(t),yf(e,c),i&&c.a(i),o.callback=function(t){c.u()&&tu(c.u()),$a=t,Qa||uf(e,c,l)},o["expired-callback"]=function(){$a=null};var l=new r.a.auth.RecaptchaVerifier(Qa?c.ba():c.i(),o,wf(e).app);Of(e,c.I(C(l.render,l),[],(function(e){Ja=e}),(function(n){n.name&&"cancel"==n.name||(n=el(n),c.o(),il(e,t,void 0,n))})))},us.prefilledEmailSignIn=function(e,t,n){var r=new Nl;r.render(t),yf(e,r),Of(e,r.I(C(_f(e).fetchSignInMethodsForEmail,_f(e)),[n],(function(i){r.o();var o=!(!nl(e)||!Ef(e));al(e,t,i,n,void 0,o)}),(function(i){i=el(i),r.o(),cs("signIn",e,t,n,i)})))},u(cf,Ru),cf.prototype.v=function(){this.l(this.i),Ru.prototype.v.call(this)},cf.prototype.m=function(){this.i=null,Ru.prototype.m.call(this)},A(cf.prototype,{l:function(e){function t(t){e(t)}for(var n=this.g?Vt("firebaseui-id-idp-button",this.g||this.s.a):[],r=0;r<n.length;r++){var i=n[r];eu(this,i,O(t,Ql(i,"providerId")))}}}),us.providerSignIn=function(e,t,n,i){var o=new cf((function(n){n==r.a.auth.EmailAuthProvider.PROVIDER_ID?(o.o(),ul(e,t,i)):n==r.a.auth.PhoneAuthProvider.PROVIDER_ID?(o.o(),cs("phoneSignInStart",e,t)):"anonymous"==n?function(e,t){Of(e,t.I(C(e.$b,e),[],(function(n){return t.o(),Xc(e,t,n,!0)}),(function(e){e.name&&"cancel"==e.name||(Gi("ContinueAsGuest: "+e.code,void 0),e=el(e),t.a(e))})))}(e,o):tl(e,o,n,i),Rf(e),e.l.cancel()}),Ra(Pf(e)),Ua(Pf(e)),Va(Pf(e)));o.render(t),yf(e,o),n&&o.a(n),function(e){Rf(e);try{Ii(e.l,ja(Pf(e)),function(e){var t;return Rf(e),(t=e.Z)||(e=Ma(e=Pf(e),r.a.auth.GoogleAuthProvider.PROVIDER_ID),t=!(!e||"select_account"!==e.prompt)),t}(e)).then((function(t){return!!e.g&&function(e,t,n){if(n&&n.credential&&n.clientId===ja(Pf(e))){if(Da(Pf(e),r.a.auth.GoogleAuthProvider.PROVIDER_ID).length){try{var i=JSON.parse(atob(n.credential.split(".")[1])).email}catch(o){}return tl(e,t,r.a.auth.GoogleAuthProvider.PROVIDER_ID,i),Hr(!0)}return function(n){var r=!1;return n=t.I(C(e.ac,e),[n],(function(n){var i=ju(t);t.o(),cs("callback",e,i,Hr(n)),r=!0}),(function(n){if((!n.name||"cancel"!=n.name)&&(!n||"auth/credential-already-in-use"!=n.code))if(n&&"auth/email-already-in-use"==n.code&&n.email&&n.credential){var r=ju(t);t.o(),cs("callback",e,r,Kr(n))}else n=el(n),t.a(n)})),Of(e,n),n.then((function(){return r}),(function(){return!1}))}(r.a.auth.GoogleAuthProvider.credential(n.credential))}return n&&t.a(cn("The selected credential for the authentication provider is not supported!").toString()),Hr(!1)}(e,e.g,t)}))}catch(t){}}(e)},us.sendEmailLinkForSignIn=function(e,t,n,r){var i=new hl;i.render(t),yf(e,i),sl(e,i,n,r,(function(r){i.o(),r=el(r),cs("signIn",e,t,n,r)}))},u(lf,Ru),lf.prototype.v=function(){this.w(this.i),this.B(this.i,this.u||void 0),this.l().focus(),Cl(this.l(),(this.l().value||"").length),Ru.prototype.v.call(this)},lf.prototype.m=function(){this.u=this.i=null,Ru.prototype.m.call(this)},A(lf.prototype,{l:Nc,M:Pc,w:Rc,H:jc,j:Dc,U:kc,P:Ec,B:Sc}),us.signIn=function(e,t,n,r){var i=nl(e),o=new lf((function(){var t=o,n=t.j()||"";n&&ol(e,t,n)}),i?null:function(){o.o(),il(e,t,n)},n,Ua(Pf(e)),Va(Pf(e)),i);o.render(t),yf(e,o),r&&o.a(r)},u(ff,Ru),ff.prototype.v=function(){var e=this,t=Ys(this,"firebaseui-id-unauthorized-user-help-link");this.i&&t&&eu(this,t,(function(){e.i()})),eu(this,this.u(),(function(){e.l()})),this.u().focus(),Ru.prototype.v.call(this)},ff.prototype.m=function(){this.i=this.l=null,Ru.prototype.m.call(this)},A(ff.prototype,{u:Ec}),us.handleUnauthorizedUser=function(e,t,n,i){function o(){il(e,t)}i===r.a.auth.EmailAuthProvider.PROVIDER_ID&&(o=function(){ul(e,t)});var a=new ff(n||null,(function(){a.o(),o()}),function(e){return(e=Aa(e,r.a.auth.EmailAuthProvider.PROVIDER_ID))&&e.disableSignUp&&e.disableSignUp.adminEmail||null}(Pf(e)),function(e){if((e=Aa(e,r.a.auth.EmailAuthProvider.PROVIDER_ID))&&e.disableSignUp){var t=e.disableSignUp.helpLink||null;if(t&&"string"===typeof t)return function(){ii(t)}}return null}(Pf(e)),Ua(Pf(e)),Va(Pf(e)));a.render(t),yf(e,a)},u(hf,Ru),hf.prototype.v=function(){this.w(this.l,this.i),this.u().focus(),Ru.prototype.v.call(this)},hf.prototype.m=function(){this.i=this.l=null,Ru.prototype.m.call(this)},A(hf.prototype,{u:kc,B:Ec,w:Sc}),us.unsupportedProvider=function(e,t,n){var r=new hf(n,(function(){r.o(),cs("passwordRecovery",e,t,n)}),(function(){r.o(),il(e,t,n)}),Ua(Pf(e)),Va(Pf(e)));r.render(t),yf(e,r)};var gf={};function vf(e){return e||"[DEFAULT]"}function mf(e){return Rf(e),e.i||(e.i=Tf(e,(function(t){return t&&!ta(kf(e))?Hr(wf(e).getRedirectResult().then((function(e){return e}),(function(t){if(t&&"auth/email-already-in-use"==t.code&&t.email&&t.credential)throw t;return Mf(e,t)}))):Hr(_f(e).getRedirectResult().then((function(t){return Ca(Pf(e))&&!t.user&&e.j&&!e.j.isAnonymous?wf(e).getRedirectResult():t})))}))),e.i}function yf(e,t){Rf(e),e.g=t}var bf=null;function _f(e){return Rf(e),e.h}function wf(e){return Rf(e),e.a}function kf(e){return Rf(e),e.oa}function Ef(e){return Rf(e),e.O?e.O.emailHint:void 0}function Sf(e){return"signIn"===((e=new qe(e)).a.a.get(We.ub)||null)&&!!e.a.a.get(We.$a)}function If(e,t,n,r){Rf(e),"undefined"!==typeof e.a.languageCode&&(e.u=e.a.languageCode);var i="en".replace(/_/g,"-");e.a.languageCode=i,e.h.languageCode=i,e.Y=!0,"undefined"!==typeof e.a.tenantId&&(e.h.tenantId=e.a.tenantId),e.ib(n),e.O=r||null;var o=h.document;e.C?e.C.then((function(){"complete"==o.readyState?xf(e,t):ir(window,"load",(function(){xf(e,t)}))})):"complete"==o.readyState?xf(e,t):ir(window,"load",(function(){xf(e,t)}))}function xf(e,t){var n=oi(t,"Could not find the FirebaseUI widget element on the page.");if(n.setAttribute("lang","en".replace(/_/g,"-")),bf){var r=bf;Rf(r),ta(kf(r))&&Xi("UI Widget is already rendered on the page and is pending some user interaction. Only one widget instance can be rendered per page. The previous instance has been automatically reset."),bf.reset()}if(bf=e,e.T=n,function(e,t){e.L=null,e.J=new kr(t),e.J.register(),nr(e.J,"pageEnter",(function(t){if(t=t&&t.pageId,e.L!=t){var n=Pf(e);(n=Ya(n).uiChanged||null)&&n(e.L,t),e.L=t}}))}
2(e,n),Vo(new Bo)&&Vo(new qo)){t=oi(t,"Could not find the FirebaseUI widget element on the page."),n=(n=we(n=ai(),r=ua(Pf(e).a,"queryParameterForSignInSuccessUrl")))?kt(St(n)).toString():null;e:{r=ai();var i=Fa(Pf(e));for(o in r=we(r,i)||"",os)if(os[o].toLowerCase()==r.toLowerCase()){var o=os[o];break e}o="callback"}switch(o){case"callback":n&&(o=kf(e),Zo(Yo,n,o)),e.nb()?cs("callback",e,t):il(e,t,Ef(e));break;case"resetPassword":cs("passwordReset",e,t,cl(),ll());break;case"recoverEmail":cs("emailChangeRevocation",e,t,cl());break;case"revertSecondFactorAddition":cs("revertSecondFactorAddition",e,t,cl());break;case"verifyEmail":cs("emailVerification",e,t,cl(),ll());break;case"verifyAndChangeEmail":cs("verifyAndChangeEmail",e,t,cl(),ll());break;case"signIn":cs("emailLinkSignInCallback",e,t,ai()),jf();break;case"select":n&&(o=kf(e),Zo(Yo,n,o)),il(e,t);break;default:throw Error("Unhandled widget operation.")}(t=Ya(t=Pf(e)).uiShown||null)&&t()}else t=oi(t,"Could not find the FirebaseUI widget element on the page."),(o=new $c(cn("The browser you are using does not support Web Storage. Please try again in a different browser.").toString())).render(t),yf(e,o);t=e.g&&"blank"==e.g.Ga&&za(Pf(e)),ia(kf(e))&&!t&&(Nf(e,(t=ia(kf(e))).a),Jo(Go,kf(e)))}function Tf(e,t){if(e.A)return t(Cf(e));if(Of(e,(function(){e.A=!1})),Ca(Pf(e))){var n=new Lr((function(n){Of(e,e.a.onAuthStateChanged((function(r){e.j=r,e.A||(e.A=!0,n(t(Cf(e))))})))}));return Of(e,n),n}return e.A=!0,t(null)}function Cf(e){return Rf(e),Ca(Pf(e))&&e.j&&e.j.isAnonymous?e.j:null}function Of(e,t){if(Rf(e),t){e.s.push(t);var n=function(){W(e.s,(function(e){return e==t}))};"function"!=typeof t&&t.then(n,n)}}function Af(e){"undefined"!==typeof e.a.languageCode&&e.Y&&(e.Y=!1,e.a.languageCode=e.u)}function Nf(e,t){e.a.tenantId=t,e.h.tenantId=t}function Pf(e){return Rf(e),e.ca}function Rf(e){if(e.$)throw Error("AuthUI instance is deleted!")}function jf(){var e=ai();if(Sf(e)){for(var t in e=new qe(e),We)We.hasOwnProperty(t)&&Fe(e.a.a,We[t]);t={state:"signIn",mode:"emailLink",operation:"clear"};var n=h.document.title;h.history&&h.history.replaceState&&h.history.replaceState(t,n,e.toString())}}function Df(e){return Rf(e),_f(e).signOut()}function Mf(e,t,n){if(Rf(e),t&&t.code&&("auth/email-already-in-use"==t.code||"auth/credential-already-in-use"==t.code)){var r=Ga(Pf(e));return Hr().then((function(){return r(new Rn("anonymous-upgrade-merge-conflict",null,n||t.credential))})).then((function(){throw e.g&&(e.g.o(),e.g=null),t}))}return Kr(t)}function Lf(e,t,n,r){Ru.call(this,wc,void 0,r,"providerMatchByEmail",{F:t,D:n}),this.i=e}function Ff(e,t,n,r,i){Ru.call(this,_c,{ec:t},i,"selectTenant",{F:n,D:r}),this.i=e}function Uf(e){Ru.call(this,zu,void 0,e,"spinner")}function Vf(e){for(var t in this.a=new oa,aa(this.a,"authDomain"),aa(this.a,"displayMode",Yf),aa(this.a,"tenants"),aa(this.a,"callbacks"),aa(this.a,"tosUrl"),aa(this.a,"privacyPolicyUrl"),e)if(e.hasOwnProperty(t))try{sa(this.a,t,e[t])}catch(n){Gi('Invalid config: "'+t+'"',void 0)}}function Bf(e){return e.a.get("callbacks")||{}}function qf(e){var t=e.a.get("tosUrl")||null;if(e=e.a.get("privacyPolicyUrl")||null,t&&!e&&Xi("Privacy Policy URL is missing, the link will not be displayed."),t&&e){if("function"===typeof t)return t;if("string"===typeof t)return function(){ii(t)}}return null}function zf(e){var t=e.a.get("tosUrl")||null,n=e.a.get("privacyPolicyUrl")||null;if(n&&!t&&Xi("Terms of Service URL is missing, the link will not be displayed."),t&&n){if("function"===typeof n)return n;if("string"===typeof n)return function(){ii(n)}}return null}function Hf(e,t){if(!(e=e.a.get("tenants"))||!e.hasOwnProperty(t)&&!e.hasOwnProperty(Qf))throw Error("Invalid tenant configuration!")}function Kf(e,t,n){if(!(e=e.a.get("tenants")))throw Error("Invalid tenant configuration!");var r=[];if(!(e=e[t]||e[Qf]))return Gi("Invalid tenant configuration: "+t+" is not configured!",void 0),r;if(!(t=e.signInOptions))throw Error("Invalid tenant configuration: signInOptions are invalid!");return t.forEach((function(e){if("string"===typeof e)r.push(e);else if("string"===typeof e.provider){var t=e.hd;t&&n?(t instanceof RegExp?t:new RegExp("@"+t.replace(".","\\.")+"$")).test(n)&&r.push(e.provider):r.push(e.provider)}else Gi(e="Invalid tenant configuration: signInOption "+JSON.stringify(e)+" is invali
2d!",void 0)})),r}function Wf(e,t,n){return e=function(e,t){var n=Gf,r=void 0===r?{}:r;return Hf(e,t),function(e,t,n){return n=void 0===n?{}:n,Object.keys(e).filter((function(e){return t.includes(e)})).reduce((function(t,n){return t[n]=e[n],t}),n)}((e=e.a.get("tenants"))[t]||e[Qf],n,r)}(e,t),(t=e.signInOptions)&&n&&(t=t.filter((function(e){return"string"===typeof e?n.includes(e):n.includes(e.provider)})),e.signInOptions=t),e}(t=df.prototype).nb=function(){return Rf(this),!!ia(kf(this))||Sf(ai())},t.start=function(e,t){If(this,e,t)},t.Db=function(){Rf(this),this.Z=!0},t.reset=function(){Rf(this);var e=this;this.T&&this.T.removeAttribute("lang"),this.J&&_r(this.J),Af(this),this.O=null,jf(),Jo(Go,kf(this)),Rf(this),this.l.cancel(),this.i=Hr({user:null,credential:null}),bf==this&&(bf=null),this.T=null;for(var t=0;t<this.s.length;t++)"function"==typeof this.s[t]?this.s[t]():this.s[t].cancel&&this.s[t].cancel();this.s=[],na(kf(this)),this.g&&(this.g.o(),this.g=null),this.L=null,this.h&&(this.C=Df(this).then((function(){e.C=null}),(function(){e.C=null})))},t.ib=function(e){Rf(this);var t,n=this.ca;for(t in e)try{sa(n.a,t,e[t])}catch(r){Gi('Invalid config: "'+t+'"',void 0)}ot&&sa(n.a,"popupMode",!1),La(n),!this.da&&Ka(Pf(this))&&(Xi("signInSuccess callback is deprecated. Please use signInSuccessWithAuthResult callback instead."),this.da=!0)},t.Wb=function(){Rf(this);var e=Pf(this),t=ua(e.a,"widgetUrl");e=Fa(e);for(var n,r=t.search(_e),i=0,o=[];0<=(n=be(t,i,e,r));)o.push(t.substring(i,n)),i=Math.min(t.indexOf("&",n)+1||r,r);o.push(t.substr(i)),t=o.join("").replace(ke,"$1"),(e+=r="="+encodeURIComponent("select"))?(0>(r=t.indexOf("#"))&&(r=t.length),0>(i=t.indexOf("?"))||i>r?(i=r,n=""):n=t.substring(i+1,r),r=(t=[t.substr(0,i),n,t.substr(r)])[1],t[1]=e?r?r+"&"+e:e:r,r=t[0]+(t[1]?"?"+t[1]:"")+t[2]):r=t,Pf(this).a.get("popupMode")?(r=r||"about:blank",(e={width:500,height:600,top:0<(e=(window.screen.availHeight-600)/2)?e:0,left:0<(t=(window.screen.availWidth-500)/2)?t:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1}).target=e.target||r.target||"google_popup",e.width=e.width||690,e.height=e.height||500,(e=ni(r,e))&&e.focus()):Mt(window.location,r)},t.Wa=function(){var e=this;return Rf(this),this.h.app.delete().then((function(){var t=vf(kf(e));delete gf[t],e.reset(),e.$=!0}))},t.Ib=function(e,t){Rf(this);var n=this,i=function(){for(var e=32,t=[];0<e;)t.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),e--;return t.join("")}();if(!qa(Pf(this)))return Kr(Error("Email link sign-in should be enabled to trigger email sending."));var o=function(e){if(qa(e)){var t={url:ai(),handleCodeInApp:!0};(e=Aa(e,r.a.auth.EmailAuthProvider.PROVIDER_ID))&&"function"===typeof e.emailLinkSignIn&&le(t,e.emailLinkSignIn()),e=t.url;var n=ai();n instanceof Ee||(n=Te(n)),e instanceof Ee||(e=Te(e));var i=n;n=new Ee(i);var o=!!e.j;o?Se(n,e.j):o=!!e.A,o?n.A=e.A:o=!!e.h,o?n.h=e.h:o=null!=e.C;var a=e.g;if(o)Ie(n,e.C);else if(o=!!e.g)if("/"!=a.charAt(0)&&(i.h&&!i.g?a="/"+a:-1!=(i=n.g.lastIndexOf("/"))&&(a=n.g.substr(0,i+1)+a)),".."==a||"."==a)a="";else if(-1!=a.indexOf("./")||-1!=a.indexOf("/.")){i=0==a.lastIndexOf("/",0),a=a.split("/");for(var s=[],u=0;u<a.length;){var c=a[u++];"."==c?i&&u==a.length&&s.push(""):".."==c?((1<s.length||1==s.length&&""!=s[0])&&s.pop(),i&&u==a.length&&s.push("")):(s.push(c),i=!0)}a=s.join("/")}return o?n.g=a:o=""!==e.a.toString(),o?xe(n,Ve(e.a)):o=!!e.s,o&&(n.s=e.s),t.url=n.toString(),t}return null}(Pf(this)),a=new qe(o.url);
2return function(e,t){t?e.a.a.set(We.Sa,t):Fe(e.a.a,We.Sa)}(a,i),t&&t.a&&(function(e,t,n){Zo(Qo,Co(e,JSON.stringify(io(t))),n)}(i,t,kf(this)),He(a,t.a.providerId)),function(e,t){null!==t?e.a.a.set(We.Qa,t?"1":"0"):Fe(e.a.a,We.Qa)}(a,function(e){return!(!(e=Aa(e,r.a.auth.EmailAuthProvider.PROVIDER_ID))||!e.forceSameDevice)}(Pf(this))),Tf(this,(function(t){return t&&((t=t.uid)?a.a.a.set(We.Pa,t):Fe(a.a.a,We.Pa)),o.url=a.toString(),_f(n).sendSignInLinkToEmail(e,o)})).then((function(){var t=kf(n),r={};r.email=e,Zo($o,Co(i,JSON.stringify(r)),t)}),(function(e){throw Jo(Qo,kf(n)),Jo($o,kf(n)),e}))},t.bc=function(e,t){Rf(this);var n=this;return _f(this).signInWithEmailAndPassword(e,t).then((function(i){return Tf(n,(function(o){return o?Df(n).then((function(){return Mf(n,{code:"auth/email-already-in-use"},r.a.auth.EmailAuthProvider.credential(e,t))})):i}))}))},t.Yb=function(e,t){Rf(this);var n=this;return Tf(this,(function(i){if(i){var o=r.a.auth.EmailAuthProvider.credential(e,t);return i.linkWithCredential(o)}return _f(n).createUserWithEmailAndPassword(e,t)}))},t.ac=function(e){Rf(this);var t=this;return Tf(this,(function(n){return n?n.linkWithCredential(e).then((function(e){return e}),(function(n){if(n&&"auth/email-already-in-use"==n.code&&n.email&&n.credential)throw n;return Mf(t,n,e)})):_f(t).signInWithCredential(e)}))},t.dc=function(e){Rf(this);var t=this,n=this.i;return this.i=null,Tf(this,(function(n){return n&&!ta(kf(t))?n.linkWithRedirect(e):_f(t).signInWithRedirect(e)})).then((function(){}),(function(e){throw t.i=n,e}))},t.cc=function(e,t){Rf(this);var n=this;return Tf(this,(function(r){return r?r.linkWithPhoneNumber(e,t).then((function(e){return new Ci(e,(function(e){if("auth/credential-already-in-use"==e.code)return Mf(n,e);throw e}))})):wf(n).signInWithPhoneNumber(e,t).then((function(e){return new Ci(e)}))}))},t.$b=function(){return Rf(this),wf(this).signInAnonymously()},t.Xb=function(e,t){return Rf(this),_f(this).signInWithEmailAndPassword(e,t)},u(Lf,Ru),Lf.prototype.v=function(){this.u(this.i),this.w(this.i),this.l().focus(),Cl(this.l(),(this.l().value||"").length),Ru.prototype.v.call(this)},Lf.prototype.m=function(){this.i=null,Ru.prototype.m.call(this)},A(Lf.prototype,{l:Nc,H:Pc,u:Rc,B:jc,j:Dc,M:kc,w:Sc}),u(Ff,Ru),Ff.prototype.v=function(){!function(e,t){function n(e){t(e)}for(var r=e.g?Vt("firebaseui-id-tenant-selection-button",e.g||e.s.a):[],i=0;i<r.length;i++){var o=r[i];eu(e,o,O(n,Ql(o,"tenantId")))}}(this,this.i),Ru.prototype.v.call(this)},Ff.prototype.m=function(){this.i=null,Ru.prototype.m.call(this)},u(Uf,Ru);var Gf=["immediateFederatedRedirect","privacyPolicyUrl","signInFlow","signInOptions","tosUrl"],Yf="optionFirst",$f={pc:Yf,oc:"identifierFirst"},Qf="*";function Xf(e,t){var n=this;this.s=oi(e),this.a={},Object.keys(t).forEach((function(e){n.a[e]=new Vf(t[e])})),this.ob=this.g=this.A=this.h=this.i=this.j=null,Object.defineProperty(this,"languageCode",{get:function(){return this.ob},set:function(e){this.ob=e||null},enumerable:!1})}function Jf(e){e.j&&e.j.reset(),e.mb(),e.g&&e.g.o()}(t=Xf.prototype).Ub=function(e,t){var n=this;Jf(this);var r=e.apiKey;return new Lr((function(e,i){if(n.a.hasOwnProperty(r)){var o=Bf(n.a[r]).selectTenantUiHidden||null;if(function(e){for(var t in e=e.a.get("displayMode"),$f)if($f[t]===e)return $f[t];return Yf}(n.a[r])===Yf){var a=[];t.forEach((function(e){e=e||"_";var t=n.a[r].a.get("tenants");if(!t)throw Error("Invalid tenant configuration!");(t=t[e]||t[Qf])?e={tenantId:"_"!==e?e:null,V:t.fullLabel||null,displayName:t.displayName,za:t.iconUrl,ta:t.buttonColor}:(Gi("Invalid tenant configuration: "+e+" is not configured!",void 0),e=null),e&&a.push(e)}));var s=function(t){t={tenantId:t,providerIds:Kf(n.a[r],t||"_")},e(t)};if(1===a.length)return void s(a[0].tenantId);n.g=new Ff((function(e){Jf(n),o&&o(),s(e)}),a,qf(n.a[r]),zf(n.a[r]))}else n.g=new Lf((function(){var i=n.g.j();if(i){for(var a=0;a<t.length;a++){var s=Kf(n.a[r],t[a]||"_",i);if(0!==s.length)return i={tenantId:t[a],providerIds:s,email:i},Jf(n),o&&o(),void e(i)}n.g.a(Nn({code:"no-matching-tenant-for-email"}).toString())}}),qf(n.a[r]),zf(n.a[r]));n.g.render(n.s),(i=Bf(n.a[r]).selectTenantUiShown||null)&&i()}else{var u=Error("Invalid project configuration: API key is invali
2d!");u.code="invalid-configuration",n.pb(u),i(u)}}))},t.Pb=function(e,t){if(!this.a.hasOwnProperty(e))throw Error("Invalid project configuration: API key is invalid!");var n=t||void 0;Hf(this.a[e],t||"_");try{this.i=r.a.app(n).auth()}catch(o){var i=this.a[e].a.get("authDomain");if(!i)throw Error("Invalid project configuration: authDomain is required!");(e=r.a.initializeApp({apiKey:e,authDomain:i},n)).auth().tenantId=t,this.i=e.auth()}return this.i},t.Zb=function(e,t){var n=this;return new Lr((function(r,i){function o(t,r){n.j=new df(e),If(n.j,n.s,t,r)}var a=e.app.options.apiKey;n.a.hasOwnProperty(a)||i(Error("Invalid project configuration: API key is invalid!"));var s=Wf(n.a[a],e.tenantId||"_",t&&t.providerIds);Jf(n),i={signInSuccessWithAuthResult:function(e){return r(e),!1}};var u,c=Bf(n.a[a]).signInUiShown||null,l=!1;i.uiChanged=function(t,r){null===t&&"callback"===r?((t=Bt("firebaseui-id-page-callback",n.s))&&tu(t),n.h=new Uf,n.h.render(n.s)):l||null===t&&"spinner"===r||"blank"===r||(n.h&&(n.h.o(),n.h=null),l=!0,c&&c(e.tenantId))},s.callbacks=i,s.credentialHelper="none",t&&t.email&&(u={emailHint:t.email}),n.j?n.j.Wa().then((function(){o(s,u)})):o(s,u)}))},t.reset=function(){var e=this;return Hr().then((function(){e.j&&e.j.Wa()})).then((function(){e.j=null,Jf(e)}))},t.Vb=function(){var e=this;this.h||this.A||(this.A=window.setTimeout((function(){Jf(e),e.h=new Uf,e.g=e.h,e.h.render(e.s),e.A=null}),500))},t.mb=function(){window.clearTimeout(this.A),this.A=null,this.h&&(this.h.o(),this.h=null)},t.Bb=function(){return Jf(this),this.g=new Hc,this.g.render(this.s),Hr()},t.pb=function(e){var t,n=this,r=Nn({code:e.code}).toString()||e.message;Jf(this),e.retry&&"function"===typeof e.retry&&(t=function(){n.reset(),e.retry()}),this.g=new Yc(r,t),this.g.render(this.s)},t.Rb=function(e){var t=this;return Hr().then((function(){var n=t.i&&t.i.app.options.apiKey;if(!t.a.hasOwnProperty(n))throw Error("Invalid project configuration: API key is invalid!");if(Hf(t.a[n],e.tenantId||"_"),!t.i.currentUser||t.i.currentUser.uid!==e.uid)throw Error("The user being processed does not match the signed in user!");return(n=Bf(t.a[n]).beforeSignInSuccess||null)?n(e):e})).then((function(t){if(t.uid!==e.uid)throw Error("User with mismatching UID returned.");return t}))},R("firebaseui.auth.FirebaseUiHandler",Xf),R("firebaseui.auth.FirebaseUiHandler.prototype.selectTenant",Xf.prototype.Ub),R("firebaseui.auth.FirebaseUiHandler.prototype.getAuth",Xf.prototype.Pb),R("firebaseui.auth.FirebaseUiHandler.prototype.startSignIn",Xf.prototype.Zb),R("firebaseui.auth.FirebaseUiHandler.prototype.reset",Xf.prototype.reset),R("firebaseui.auth.FirebaseUiHandler.prototype.showProgressBar",Xf.prototype.Vb),R("firebaseui.auth.FirebaseUiHandler.prototype.hideProgressBar",Xf.prototype.mb),R("firebaseui.auth.FirebaseUiHandler.prototype.completeSignOut",Xf.prototype.Bb),R("firebaseui.auth.FirebaseUiHandler.prototype.handleError",Xf.prototype.pb),R("firebaseui.auth.FirebaseUiHandler.prototype.processUser",Xf.prototype.Rb),R("firebaseui.auth.AuthUI",df),R("firebaseui.auth.AuthUI.getInstance",(function(e){return e=vf(e),gf[e]?gf[e]:null})),R("firebaseui.auth.AuthUI.prototype.disableAutoSignIn",df.prototype.Db),R("firebaseui.auth.AuthUI.prototype.start",df.prototype.start),R("firebaseui.auth.AuthUI.prototype.setConfig",df.prototype.ib),R("firebaseui.auth.AuthUI.prototype.signIn",df.prototype.Wb),R("firebaseui.auth.AuthUI.prototype.reset",df.prototype.reset),R("firebaseui.auth.AuthUI.prototype.delete",df.prototype.Wa),R("firebaseui.auth.AuthUI.prototype.isPendingRedirect",df.prototype.nb),R("firebaseui.auth.AuthUIError",Rn),R("firebaseui.auth.AuthUIError.prototype.toJSON",Rn.prototype.toJSON),R("firebaseui.auth.CredentialHelper.ACCOUNT_CHOOSER_COM",Za),R("firebaseui.auth.CredentialHelper.GOOGLE_YOLO",es),R("firebaseui.auth.CredentialHelper.NONE",ts),R("firebaseui.auth.AnonymousAuthProvider.PROVIDER_ID","anonymous"),Lr.prototype.catch=Lr.prototype.Ca,Lr.prototype.finally=Lr.prototype.fc}).apply("undefined"!==typeof e?e:"undefined"!==typeof self?self:window)}).apply("undefined"!==typeof e?e:"undefined"!==typeof self?self:window),"undefined"!==typeof window&&(window.dialogPolyfill=o.a);var a=firebaseui.auth}.call(this,n(32))},function(e,t,n){"use strict";n(50)},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t){var n={upgradeDom:function(e,t){},upgradeElement:function(e,t){},upgradeElements:function(e){},upgradeAllRegistered:function(){},registerUpgradedCallback:function(e,t){},register:function(e){},downgradeElements:function(e){}};(n=function(){"use strict";var e=[],t=[],n="mdlComponentConfigInternal_";function r(t,n){for(var r=0;r<e.length;r++)if(e[r].className===t)return"undefined"!==typeof n&&(e[r]=n),e[r];return!1}function i(e){var t=e.getAttribute("data-upgraded");return null===t?[""]:t.split(",")}function o(e,t){return-1!==i(e).indexOf(t)}function a(e,t,n){if("CustomEvent"in window&&"function"===typeof window.CustomEvent)return new CustomEvent(e,{bubbles:t,cancelable:n});var r=document.createEvent("Events");return r.initEvent(e,t,n),r}function s(t,n){if("undefined"===typeof t&&"undefined"===typeof n)for(var i=0;i<e.length;i++)s(e[i].className,e[i].cssClass);else{var o=t;if("undefined"===typeof n){var a=r(o);a&&(n=a.cssClass)}for(var c=document.querySelectorAll("."+n),l=0;l<c.length;l++)u(c[l],o)}}function u(s,u){if(!("object"===typeof s&&s instanceof Element))throw new Error("Invalid argument provided to upgrade MDL element.");var c=a("mdl-componentupgrading",!0,!0);if(s.dispatchEvent(c),!c.defaultPrevented){var l=i(s),f=[];if(u)o(s,u)||f.push(r(u));else{var h=s.classList;e.forEach((function(e){h.contains(e.cssClass)&&-1===f.indexOf(e)&&!o(s,e.className)&&f.push(e)}))}for(var d,p=0,g=f.length;p<g;p++){if(!(d=f[p]))throw new Error("Unable to find a registered component for the given class.");l.push(d.className),s.setAttribute("data-upgraded",l.join(","));var v=new d.classConstructor(s);v[n]=d,t.push(v);for(var m=0,y=d.callbacks.length;m<y;m++)d.callbacks[m](s);d.widget&&(s[d.className]=v);var b=a("mdl-componentupgraded",!0,!1);s.dispatchEvent(b)}}}function c(e){if(e){var r=t.indexOf(e);t.splice(r,1);var i=e.element_.getAttribute("data-upgraded").split(","),o=i.indexOf(e[n].classAsString);i.splice(o,1),e.element_.setAttribute("data-upgraded",i.join(","));var s=a("mdl-componentdowngraded",!0,!1);e.element_.dispatchEvent(s)}}return{upgradeDom:s,upgradeElement:u,upgradeElements:function e(t){Array.isArray(t)||(t=t instanceof Element?[t]:Array.prototype.slice.call(t));for(var n,r=0,i=t.length;r<i;r++)(n=t[r])instanceof HTMLElement&&(u(n),n.children.length>0&&e(n.children))},upgradeAllRegistered:function(){for(var t=0;t<e.length;t++)s(e[t].className)},registerUpgradedCallback:function(e,t){var n=r(e);n&&n.callbacks.push(t)},register:function(t){var i=!0;"undefined"===typeof t.widget&&"undefined"===typeof t.widget||(i=t.widget||t.widget);var o={classConstructor:t.constructor||t.constructor,className:t.classAsString||t.classAsString,cssClass:t.cssClass||t.cssClass,widget:i,callbacks:[]};if(e.forEach((function(e){if(e.cssClass===o.cssClass)throw new Error("The provided cssClass has already been registered: "+e.cssClass);if(e.className===o.className)throw new Error("The provided className has already been registered")})),t.constructor.prototype.hasOwnProperty(n))throw new Error("MDL component classes must not have mdlComponentConfigInternal_ defined as a property.");r(t.classAsString,o)||e.push(o)},downgradeElements:function(e){var n=function(e){t.filter((function(t){return t.element_===e}
2)).forEach(c)};if(e instanceof Array||e instanceof NodeList)for(var r=0;r<e.length;r++)n(e[r]);else{if(!(e instanceof Node))throw new Error("Invalid argument provided to downgrade MDL nodes.");n(e)}}}}()).ComponentConfigPublic,n.ComponentConfig,n.Component,n.upgradeDom=n.upgradeDom,n.upgradeElement=n.upgradeElement,n.upgradeElements=n.upgradeElements,n.upgradeAllRegistered=n.upgradeAllRegistered,n.registerUpgradedCallback=n.registerUpgradedCallback,n.register=n.register,n.downgradeElements=n.downgradeElements,window.componentHandler=n,window.componentHandler=n,window.addEventListener("load",(function(){"use strict";"classList"in document.createElement("div")&&"querySelector"in document&&"addEventListener"in window&&Array.prototype.forEach?(document.documentElement.classList.add("mdl-js"),n.upgradeAllRegistered()):(n.upgradeElement=function(){},n.register=function(){})}))},function(e,t){!function(){"use strict";var e=function(e){this.element_=e,this.init()};window.MaterialButton=e,e.prototype.Constant_={},e.prototype.CssClasses_={RIPPLE_EFFECT:"mdl-js-ripple-effect",RIPPLE_CONTAINER:"mdl-button__ripple-container",RIPPLE:"mdl-ripple"},e.prototype.blurHandler_=function(e){e&&this.element_.blur()},e.prototype.disable=function(){this.element_.disabled=!0},e.prototype.disable=e.prototype.disable,e.prototype.enable=function(){this.element_.disabled=!1},e.prototype.enable=e.prototype.enable,e.prototype.init=function(){if(this.element_){if(this.element_.classList.contains(this.CssClasses_.RIPPLE_EFFECT)){var e=document.createElement("span");e.classList.add(this.CssClasses_.RIPPLE_CONTAINER),this.rippleElement_=document.createElement("span"),this.rippleElement_.classList.add(this.CssClasses_.RIPPLE),e.appendChild(this.rippleElement_),this.boundRippleBlurHandler=this.blurHandler_.bind(this),this.rippleElement_.addEventListener("mouseup",this.boundRippleBlurHandler),this.element_.appendChild(e)}this.boundButtonBlurHandler=this.blurHandler_.bind(this),this.element_.addEventListener("mouseup",this.boundButtonBlurHandler),this.element_.addEventListener("mouseleave",this.boundButtonBlurHandler)}},componentHandler.register({constructor:e,classAsString:"MaterialButton",cssClass:"mdl-js-button",widget:!0})}()},function(e,t){!function(){"use strict";var e=function(e){this.element_=e,this.init()};window.MaterialProgress=e,e.prototype.Constant_={},e.prototype.CssClasses_={INDETERMINATE_CLASS:"mdl-progress__indeterminate"},e.prototype.setProgress=function(e){this.element_.classList.contains(this.CssClasses_.INDETERMINATE_CLASS)||(this.progressbar_.style.width=e+"%")},e.prototype.setProgress=e.prototype.setProgress,e.prototype.setBuffer=function(e){this.bufferbar_.style.width=e+"%",this.auxbar_.style.width=100-e+"%"},e.prototype.setBuffer=e.prototype.setBuffer,e.prototype.init=function(){if(this.element_){var e=document.createElement("div");e.className="progressbar bar bar1",this.element_.appendChild(e),this.progressbar_=e,(e=document.createElement("div")).className="bufferbar bar bar2",this.element_.appendChild(e),this.bufferbar_=e,(e=document.createElement("div")).className="auxbar bar bar3",this.element_.appendChild(e),this.auxbar_=e,this.progressbar_.style.width="0%",this.bufferbar_.style.width="100%",this.auxbar_.style.width="0%",this.element_.classList.add("is-upgraded")}},componentHandler.register({constructor:e,classAsString:"MaterialProgress",cssClass:"mdl-js-progress",widget:!0})}()},function(e,t){!function(){"use strict";var e=function(e){this.element_=e,this.init()};window.MaterialSpinner=e,e.prototype.Constant_={MDL_SPINNER_LAYER_COUNT:4},e.prototype.CssClasses_={MDL_SPINNER_LAYER:"mdl-spinner__layer",MDL_SPINNER_CIRCLE_CLIPPER:"mdl-spinner__circle-clipper",MDL_SPINNER_CIRCLE:"mdl-spinner__circle",MDL_SPINNER_GAP_PATCH:"mdl-spinner__gap-patch",MDL_SPINNER_LEFT:"mdl-spinner__left",MDL_SPINNER_RIGHT:"mdl-spinner__right"},e.prototype.createLayer=function(e){var t=document.createElement("div");t.classList.add(this.CssClasses_.MDL_SPINNER_LAYER),t.classList.add(this.CssClasses_.MDL_SPINNER_LAYER+"-"+e);var n=document.createElement("div");
vendor: 4,521 bytes, line 2
2n.classList.add(this.CssClasses_.MDL_SPINNER_CIRCLE_CLIPPER),n.classList.add(this.CssClasses_.MDL_SPINNER_LEFT);var r=document.createElement("div");r.classList.add(this.CssClasses_.MDL_SPINNER_GAP_PATCH);var i=document.createElement("div");i.classList.add(this.CssClasses_.MDL_SPINNER_CIRCLE_CLIPPER),i.classList.add(this.CssClasses_.MDL_SPINNER_RIGHT);for(var o=[n,r,i],a=0;a<o.length;a++){var s=document.createElement("div");s.classList.add(this.CssClasses_.MDL_SPINNER_CIRCLE),o[a].appendChild(s)}t.appendChild(n),t.appendChild(r),t.appendChild(i),this.element_.appendChild(t)},e.prototype.createLayer=e.prototype.createLayer,e.prototype.stop=function(){this.element_.classList.remove("is-active")},e.prototype.stop=e.prototype.stop,e.prototype.start=function(){this.element_.classList.add("is-active")},e.prototype.start=e.prototype.start,e.prototype.init=function(){if(this.element_){for(var e=1;e<=this.Constant_.MDL_SPINNER_LAYER_COUNT;e++)this.createLayer(e);this.element_.classList.add("is-upgraded")}},componentHandler.register({constructor:e,classAsString:"MaterialSpinner",cssClass:"mdl-js-spinner",widget:!0})}()},function(e,t){!function(){"use strict";var e=function(e){this.element_=e,this.maxRows=this.Constant_.NO_MAX_ROWS,this.init()};window.MaterialTextfield=e,e.prototype.Constant_={NO_MAX_ROWS:-1,MAX_ROWS_ATTRIBUTE:"maxrows"},e.prototype.CssClasses_={LABEL:"mdl-textfield__label",INPUT:"mdl-textfield__input",IS_DIRTY:"is-dirty",IS_FOCUSED:"is-focused",IS_DISABLED:"is-disabled",IS_INVALID:"is-invalid",IS_UPGRADED:"is-upgraded",HAS_PLACEHOLDER:"has-placeholder"},e.prototype.onKeyDown_=function(e){var t=e.target.value.split("\n").length;13===e.keyCode&&t>=this.maxRows&&e.preventDefault()},e.prototype.onFocus_=function(e){this.element_.classList.add(this.CssClasses_.IS_FOCUSED)},e.prototype.onBlur_=function(e){this.element_.classList.remove(this.CssClasses_.IS_FOCUSED)},e.prototype.onReset_=function(e){this.updateClasses_()},e.prototype.updateClasses_=function(){this.checkDisabled(),this.checkValidity(),this.checkDirty(),this.checkFocus()},e.prototype.checkDisabled=function(){this.input_.disabled?this.element_.classList.add(this.CssClasses_.IS_DISABLED):this.element_.classList.remove(this.CssClasses_.IS_DISABLED)},e.prototype.checkDisabled=e.prototype.checkDisabled,e.prototype.checkFocus=function(){Boolean(this.element_.querySelector(":focus"))?this.element_.classList.add(this.CssClasses_.IS_FOCUSED):this.element_.classList.remove(this.CssClasses_.IS_FOCUSED)},e.prototype.checkFocus=e.prototype.checkFocus,e.prototype.checkValidity=function(){this.input_.validity&&(this.input_.validity.valid?this.element_.classList.remove(this.CssClasses_.IS_INVALID):this.element_.classList.add(this.CssClasses_.IS_INVALID))},e.prototype.checkValidity=e.prototype.checkValidity,e.prototype.checkDirty=function(){this.input_.value&&this.input_.value.length>0?this.element_.classList.add(this.CssClasses_.IS_DIRTY):this.element_.classList.remove(this.CssClasses_.IS_DIRTY)},e.prototype.checkDirty=e.prototype.checkDirty,e.prototype.disable=function(){this.input_.disabled=!0,this.updateClasses_()},e.prototype.disable=e.prototype.disable,e.prototype.enable=function(){this.input_.disabled=!1,this.updateClasses_()},e.prototype.enable=e.prototype.enable,e.prototype.change=function(e){this.input_.value=e||"",this.updateClasses_()},e.prototype.change=e.prototype.change,e.prototype.init=function(){if(this.element_&&(this.label_=this.element_.querySelector("."+this.CssClasses_.LABEL),this.input_=this.element_.querySelector("."+this.CssClasses_.INPUT),this.input_)){this.input_.hasAttribute(this.Constant_.MAX_ROWS_ATTRIBUTE)&&(this.maxRows=parseInt(this.input_.getAttribute(this.Constant_.MAX_ROWS_ATTRIBUTE),10),isNaN(this.maxRows)&&(this.maxRows=this.Constant_.NO_MAX_ROWS)),this.input_.hasAttribute("placeholder")&&this.element_.classList.add(this.CssClasses_.HAS_PLACEHOLDER),this.boundUpdateClassesHandler=this.updateClasses_.bind(this),this.boundFocusHandler=this.onFocus_.bind(this),this.boundBlurHandler=this.onBlur_.bind(this),this.boundResetHandler=this.onReset_.bind(this),this.input_.addEventListener("input",this.boundUpdateClassesHandler),this.input_.addEventListener("focus",this.boundFocusHandler),this.input_.addEventListener("blur",this.boundBlurHandler),this.input_.addEventListener("reset",this.boundResetHandler),this.maxRows!==this.Constant_.NO_MAX_ROWS&&(this.boundKeyDownHandler=this.onKeyDown_.bind(this),this.input_.addEventListener("keydown",this.boundKeyDownHandler));
2var e=this.element_.classList.contains(this.CssClasses_.IS_INVALID);this.updateClasses_(),this.element_.classList.add(this.CssClasses_.IS_UPGRADED),e&&this.element_.classList.add(this.CssClasses_.IS_INVALID),this.input_.hasAttribute("autofocus")&&(this.element_.focus(),this.checkFocus())}},componentHandler.register({constructor:e,classAsString:"MaterialTextfield",cssClass:"mdl-js-textfield",widget:!0})}()},,function(e,t,n){"use strict";var r=n(80);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,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 t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t,n){"use strict";e.exports=n(83)},function(e,t,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,f=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,g=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,y=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 k(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case f:case h:case a:case u:case s:case p:return e;default:switch(e=e&&e.$$typeof){case l:case d:case m:case v:case c:return e;default:return t}}case o:return t}}}function E(e){return k(e)===h}t.AsyncMode=f,t.ConcurrentMode=h,t.ContextConsumer=l,t.ContextProvider=c,t.Element=i,t.ForwardRef=d,t.Fragment=a,t.Lazy=m,t.Memo=v,t.Portal=o,t.Profiler=u,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return E(e)||k(e)===f},t.isConcurrentMode=E,t.isContextConsumer=function(e){return k(e)===l},t.isContextProvider=function(e){return k(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return k(e)===d},t.isFragment=function(e){return k(e)===a},t.isLazy=function(e){return k(e)===m},t.isMemo=function(e){return k(e)===v},t.isPortal=function(e){return k(e)===o},t.isProfiler=function(e){return k(e)===u},t.isStrictMode=function(e){return k(e)===s},t.isSuspense=function(e){return k(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===h||e===u||e===s||e===p||e===g||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===c||e.$$typeof===l||e.$$typeof===d||e.$$typeof===b||e.$$typeof===_||e.$$typeof===w||e.$$typeof===y)},t.typeOf=k},function(e,t,n){"use strict";e.exports=n(85)},function(e,t,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,f=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,g=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,y=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 k(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case f:case h:case a:case u:case s:case p:return e;default:switch(e=e&&e.$$typeof){case l:case d:case m:case v:case c:return e;default:return t}}case o:return t}}}function E(e){return k(e)===h}t.AsyncMode=f,t.ConcurrentMode=h,t.ContextConsumer=l,t.ContextProvider=c,t.Element=i,t.ForwardRef=d,t.Fragment=a,t.Lazy=m,t.Memo=v,t.Portal=o,t.Profiler=u,t.
2StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return E(e)||k(e)===f},t.isConcurrentMode=E,t.isContextConsumer=function(e){return k(e)===l},t.isContextProvider=function(e){return k(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return k(e)===d},t.isFragment=function(e){return k(e)===a},t.isLazy=function(e){return k(e)===m},t.isMemo=function(e){return k(e)===v},t.isPortal=function(e){return k(e)===o},t.isProfiler=function(e){return k(e)===u},t.isStrictMode=function(e){return k(e)===s},t.isSuspense=function(e){return k(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===h||e===u||e===s||e===p||e===g||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===c||e.$$typeof===l||e.$$typeof===d||e.$$typeof===b||e.$$typeof===_||e.$$typeof===w||e.$$typeof===y)},t.typeOf=k},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(89),a=m(o),s=m(n(51)),u=n(2),c=m(n(9)),l=m(n(96)),f=m(n(97)),h=m(n(98)),d=m(n(99)),p=m(n(100)),g=n(101),v=n(102);function m(e){return e&&e.__esModule?e:{default:e}}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var _=function(e){function t(e){var n;y(this,t);for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var a=b(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this,e].concat(i)));return a.getScrollLeft=a.getScrollLeft.bind(a),a.getScrollTop=a.getScrollTop.bind(a),a.getScrollWidth=a.getScrollWidth.bind(a),a.getScrollHeight=a.getScrollHeight.bind(a),a.getClientWidth=a.getClientWidth.bind(a),a.getClientHeight=a.getClientHeight.bind(a),a.getValues=a.getValues.bind(a),a.getThumbHorizontalWidth=a.getThumbHorizontalWidth.bind(a),a.getThumbVerticalHeight=a.getThumbVerticalHeight.bind(a),a.getScrollLeftForOffset=a.getScrollLeftForOffset.bind(a),a.getScrollTopForOffset=a.getScrollTopForOffset.bind(a),a.scrollLeft=a.scrollLeft.bind(a),a.scrollTop=a.scrollTop.bind(a),a.scrollToLeft=a.scrollToLeft.bind(a),a.scrollToTop=a.scrollToTop.bind(a),a.scrollToRight=a.scrollToRight.bind(a),a.scrollToBottom=a.scrollToBottom.bind(a),a.handleTrackMouseEnter=a.handleTrackMouseEnter.bind(a),a.handleTrackMouseLeave=a.handleTrackMouseLeave.bind(a),a.handleHorizontalTrackMouseDown=a.handleHorizontalTrackMouseDown.bind(a),a.handleVerticalTrackMouseDown=a.handleVerticalTrackMouseDown.bind(a),a.handleHorizontalThumbMouseDown=a.handleHorizontalThumbMouseDown.bind(a),a.handleVerticalThumbMouseDown=a.handleVerticalThumbMouseDown.bind(a),a.handleWindowResize=a.handleWindowResize.bind(a),a.handleScroll=a.handleScroll.bind(a),a.handleDrag=a.handleDrag.bind(a),a.handleDragEnd=a.handleDragEnd.bind(a),a.state={didMountUniversal:!1},a}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.addListeners(),this.update(),this.componentDidMountUniversal()}},{key:"componentDidMountUniversal",value:function(){this.props.universal&&this.setState({didMountUniversal:!0})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"componentWillUnmount",value:function(){this.removeListeners(),(0,o.cancel)(this.requestFrame),clearTimeout(this.hideTracksTimeout),clearInterval(this.detectScrollingInterval)}},{key:"getScrollLeft",value:function(){return this.view?this.view.scrollLeft:0}},{key:"getScrollTop",value:function(){return this.view?this.view.scrollTop:0}},{key:"getScrollWidth",value:function(){return this.view?this.view.scrollWidth:0}},{key:"getScrollHeight",value:function(){return this.view?this.view.scrollHeight:0}},{key:"getClientWidth",value:function(){return this.view?this.view.clientWidth:0}},{key:"getClientHeight",value:function(){return this.view?this.view.clientHeight:0}},{key:"getValues",value:function(){var e=this.view||{},t=e.scrollLeft,n=void 0===t?0:t,r=e.scrollTop,i=void 0===r?0:r,o=e.scrollWidth,a=void 0===o?0:o,s=e.scrollHeight,u=void 0===s?0:s,c=e.clientWidth,l=void 0===c?0:c,f=e.clientHeight,h=void 0===f?0:f;return{left:n/(a-l)||0,top:i/(u-h)||0,scrollLeft:n,scrollTop:i,scrollWidth:a,scrollHeight:u,clientWidth:l,clientHeight:h}}},{key:"getThumbHorizontalWidth",value:function(){var e=this.props,t=e.thumbSize,n=e.thumbMinSize,r=this.view,i=r.scrollWidth,o=r.clientWidth,a=(0,d.default)(this.trackHorizontal),s=Math.ceil(o/i*a);return a===s?0:t||Math.max(s,n)}},{key:"getThumbVerticalHeight",value:function(){var e=this.props,t=e.thumbSize,n=e.thumbMinSize,r=this.view,i=r.scrollHeight,o=r.clientHeight,a=(0,p.default)(this.trackVertical),s=Math.ceil(o/i*a);return a===s?0:t||Math.max(s,n)}},{key:"getScrollLeftForOffset",value:function(e){var t=this.view,n=t.scrollWidth,r=t.clientWidth;return e/((0,d.default)(this.trackHorizontal)-this.getThumbHorizontalWidth())*(n-r)}},{key:"getScrollTopForOffset",value:function(e){var t=this.view,n=t.scrollHeight,r=t.clientHeight;return e/((0,p.default)(this.trackVertical)-this.getThumbVerticalHeight())*(n-r)}},{key:"scrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.view&&(this.view.scrollLeft=e)}},{key:"scrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.view&&(this.view.scrollTop=e)}},{key:"scrollToLeft",value:function(){this.view&&(this.view.scrollLeft=0)}},{key:"scrollToTop",value:function(){this.view&&(this.view.scrollTop=0)}},{key:"scrollToRight",value:function(){this.view&&(this.view.scrollLeft=this.view.scrollWidth)}},{key:"scrollToBottom",value:function(){this.view&&(this.view.scrollTop=this.view.scrollHeight)}},{key:"addListeners",value:function(){if("undefined"!==typeof document&&this.view){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,r=this.thumbHorizontal,i=this.thumbVertical;e.addEventListener("scroll",this.handleScroll),(0,f.default)()&&(t.addEventListener("mouseenter",this.handleTrackMouseEnter),t.addEventListener("mouseleave",this.handleTrackMouseLeave),t.addEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.addEventListener("mouseenter",this.handleTrackMouseEnter),n.addEventListener("mouseleave",this.handleTrackMouseLeave),n.addEventListener("mousedown",this.handleVerticalTrackMouseDown),r.addEventListener("mousedown",this.handleHorizontalThumbMouseDown),i.addEventListener("mousedown",this.handleVerticalThumbMouseDown),window.addEventListener("resize",this.handleWindowResize))}}},{key:"removeListeners",value:function(){if("undefined"!==typeof document&&this.view){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,r=this.thumbHorizontal,i=this.thumbVertical;e.removeEventListener("scroll",this.handleScroll),(0,f.default)()&&(t.removeEventListener("mouseenter",this.handleTrackMouseEnter),t.removeEventListener("mouseleave",this.handleTrackMouseLeave),t.removeEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.removeEventListener("mouseenter",this.handleTrackMouseEnter),n.removeEventListener("mouseleave",this.handleTrackMouseLeave),n.removeEventListener("mousedown",this.handleVerticalTrackMouseDown),r.removeEventListener("mousedown",this.handleHorizontalThumbMouseDown),i.removeEventListener("mousedown",this.handleVerticalThumbMouseDown),window.removeEventListener("resize",this.handleWindowResize),this.teardownDragging())}}},{key:"handleScroll",value:function(e){var t=this,n=this.props,r=n.onScroll,i=n.onScrollFrame;r&&r(e),this.update((function(e){var n=e.scrollLeft,r=e.scrollTop;t.viewScrollLeft=n,t.viewScrollTop=r,i&&i(e)})),this.detectScrolling()}},{key:"handleScrollStart",value:function(){var e=this.props.onScrollStart;e&&e(),this.handleScrollStartAutoHide()}},{key:"handleScrollStartAutoHide",value:function(){this.props.autoHide&&this.showTracks()}},{key:"handleScrollStop",value:function(){var e=this.props.onScrollStop;e&&e(),this.handleScrollStopAutoHide()}},{key:"handleScrollStopAutoHide",value:function(){this.props.autoHide&&this.hideTracks()}},{key:"handleWindowResize",value:function(){this.update()}},{key:"handleHorizontalTrackMouseDown",value:function(e){e.preventDefault();var t=e.target,n=e.clientX,r=t.getBoundingClientRect().left,i=this.getThumbHorizontalWidth(),o=Math.abs(r-n)-i/2;this.view.scrollLeft=this.getScrollLeftForOffset(o)}},{key:"handleVerticalTrackMouseDown",value:function(e){e.preventDefault();var t=e.target,n=e.clientY,r=t.getBoundingClientRect().top,i=this.getThumbVerticalHeight(),o=Math.abs(r-n)-i/2;this.view.scrollTop=this.getScrollTopForOffset(o)}},{key:"handleHorizontalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientX,r=t.offsetWidth,i=t.getBoundingClientRect().left;this.prevPageX=r-(n-i)}},{key:"handleVerticalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientY,r=t.offsetHeight,i=t.getBoundingClientRect().top;this.prevPageY=r-(n-i)}},{key:"setupDragging",value:function(){(0,s.default)(document.body,g.disableSelectStyle),document.addEventListener("mousemove",this.handleDrag),document.addEventListener("mouseup",this.handleDragEnd),document.onselectstart=h.default}},{key:"teardownDragging",value:function(){(0,s.default)(document.body,g.disableSelectStyleReset),document.removeEventListener("mousemove",this.handleDrag),document.removeEventListener("mouseup",this.handleDragEnd),document.onselectstart=void 0}},{key:"handleDragStart",value:function(e){this.dragging=!0,e.stopImmediatePropagation(),this.setupDragging()}},{key:"handleDrag",value:function(e){if(this.prevPageX){var t=e.clientX,n=-this.trackHorizontal.getBoundingClientRect().left+t-(this.getThumbHorizontalWidth()-this.prevPageX);this.view.scrollLeft=this.getScrollLeftForOffset(n)}if(this.prevPageY){var r=e.clientY,i=-this.trackVertical.getBoundingClientRect().top+r-(this.getThumbVerticalHeight()-this.prevPageY);this.view.scrollTop=this.getScrollTopForOffset(i)}return!1}},{key:"handleDragEnd",value:function(){this.dragging=!1,this.prevPageX=this.prevPageY=0,this.teardownDragging(),this.handleDragEndAutoHide()}},{key:"handleDragEndAutoHide",value:function(){this.props.autoHide&&this.hideTracks()}},{key:"handleTrackMouseEnter",value:function(){this.trackMouseOver=!0,this.handleTrackMouseEnterAutoHide()}},{key:"handleTrackMouseEnterAutoHide",value:function(){this.props.autoHide&&this.showTracks()}},{key:"handleTrackMouseLeave",value:function(){this.trackMouseOver=!1,this.handleTrackMouseLeaveAutoHide()}},{key:"handleTrackMouseLeaveAutoHide",value:function(){this.props.autoHide&&this.hideTracks()}},{key:"showTracks",value:function(){clearTimeout(this.hideTracksTimeout),(0,s.default)(this.trackHorizontal,{opacity:1}),(0,s.default)(this.trackVertical,{opacity:1})}},{key:"hideTracks",value:function(){var e=this;if(!this.dragging&&!this.scrolling&&!this.trackMouseOver){var t=this.props.autoHideTimeout;clearTimeout(this.hideTracksTimeout),this.hideTracksTimeout=setTimeout((function(){(0,s.default)(e.trackHorizontal,{opacity:0}
2),(0,s.default)(e.trackVertical,{opacity:0})}),t)}}},{key:"detectScrolling",value:function(){var e=this;this.scrolling||(this.scrolling=!0,this.handleScrollStart(),this.detectScrollingInterval=setInterval((function(){e.lastViewScrollLeft===e.viewScrollLeft&&e.lastViewScrollTop===e.viewScrollTop&&(clearInterval(e.detectScrollingInterval),e.scrolling=!1,e.handleScrollStop()),e.lastViewScrollLeft=e.viewScrollLeft,e.lastViewScrollTop=e.viewScrollTop}),100))}},{key:"raf",value:function(e){var t=this;this.requestFrame&&a.default.cancel(this.requestFrame),this.requestFrame=(0,a.default)((function(){t.requestFrame=void 0,e()}))}},{key:"update",value:function(e){var t=this;this.raf((function(){return t._update(e)}))}},{key:"_update",value:function(e){var t=this.props,n=t.onUpdate,r=t.hideTracksWhenNotNeeded,i=this.getValues();if((0,f.default)()){var o=i.scrollLeft,a=i.clientWidth,u=i.scrollWidth,c=(0,d.default)(this.trackHorizontal),l=this.getThumbHorizontalWidth(),h={width:l,transform:"translateX("+o/(u-a)*(c-l)+"px)"},g=i.scrollTop,v=i.clientHeight,m=i.scrollHeight,y=(0,p.default)(this.trackVertical),b=this.getThumbVerticalHeight(),_={height:b,transform:"translateY("+g/(m-v)*(y-b)+"px)"};if(r){var w={visibility:u>a?"visible":"hidden"},k={visibility:m>v?"visible":"hidden"};(0,s.default)(this.trackHorizontal,w),(0,s.default)(this.trackVertical,k)}(0,s.default)(this.thumbHorizontal,h),(0,s.default)(this.thumbVertical,_)}n&&n(i),"function"===typeof e&&e(i)}},{key:"render",value:function(){var e=this,t=(0,f.default)(),n=this.props,i=(n.onScroll,n.onScrollFrame,n.onScrollStart,n.onScrollStop,n.onUpdate,n.renderView),o=n.renderTrackHorizontal,a=n.renderTrackVertical,s=n.renderThumbHorizontal,c=n.renderThumbVertical,h=n.tagName,d=(n.hideTracksWhenNotNeeded,n.autoHide),p=(n.autoHideTimeout,n.autoHideDuration),v=(n.thumbSize,n.thumbMinSize,n.universal),m=n.autoHeight,y=n.autoHeightMin,b=n.autoHeightMax,_=n.style,w=n.children,k=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(n,["onScroll","onScrollFrame","onScrollStart","onScrollStop","onUpdate","renderView","renderTrackHorizontal","renderTrackVertical","renderThumbHorizontal","renderThumbVertical","tagName","hideTracksWhenNotNeeded","autoHide","autoHideTimeout","autoHideDuration","thumbSize","thumbMinSize","universal","autoHeight","autoHeightMin","autoHeightMax","style","children"]),E=this.state.didMountUniversal,S=r({},g.containerStyleDefault,m&&r({},g.containerStyleAutoHeight,{minHeight:y,maxHeight:b}),_),I=r({},g.viewStyleDefault,{marginRight:t?-t:0,marginBottom:t?-t:0},m&&r({},g.viewStyleAutoHeight,{minHeight:(0,l.default)(y)?"calc("+y+" + "+t+"px)":y+t,maxHeight:(0,l.default)(b)?"calc("+b+" + "+t+"px)":b+t}),m&&v&&!E&&{minHeight:y,maxHeight:b},v&&!E&&g.viewStyleUniversalInitial),x={transition:"opacity "+p+"ms",opacity:0},T=r({},g.trackHorizontalStyleDefault,d&&x,(!t||v&&!E)&&{display:"none"}),C=r({},g.trackVerticalStyleDefault,d&&x,(!t||v&&!E)&&{display:"none"});return(0,u.createElement)(h,r({},k,{style:S,ref:function(t){e.container=t}}),[(0,u.cloneElement)(i({style:I}),{key:"view",ref:function(t){e.view=t}},w),(0,u.cloneElement)(o({style:T}),{key:"trackHorizontal",ref:function(t){e.trackHorizontal=t}},(0,u.cloneElement)(s({style:g.thumbHorizontalStyleDefault}),{ref:function(t){e.thumbHorizontal=t}})),(0,u.cloneElement)(a({style:C}),{key:"trackVertical",ref:function(t){e.trackVertical=t}},(0,u.cloneElement)(c({style:g.thumbVerticalStyleDefault}),{ref:function(t){e.thumbVertical=t}}))])}}]),t}(u.Component);t.default=_,_.propTypes={onScroll:c.default.func,onScrollFrame:c.default.func,onScrollStart:c.default.func,onScrollStop:c.default.func,onUpdate:c.default.func,renderView:c.default.func,renderTrackHorizontal:c.default.func,renderTrackVertical:c.default.func,renderThumbHorizontal:c.default.func,renderThumbVertical:c.default.func,tagName:c.default.string,thumbSize:c.default.number,thumbMinSize:c.default.number,hideTracksWhenNotNeeded:c.default.bool,autoHide:c.default.bool,autoHideTimeout:c.default.number,autoHideDuration:c.default.number,autoHeight:c.default.bool,autoHeightMin:c.default.oneOfType([c.default.number,c.default.string]),autoHeightMax:c.default.oneOfType([c.default.number,c.default.string]),universal:c.default.bool,style:c.default.object,children:c.default.node},_.defaultProps={renderView:v.renderViewDefault,renderTrackHorizontal:v.renderTrackHorizontalDefault,renderTrackVertical:v.renderTrackVerticalDefault,renderThumbHorizontal:v.renderThumbHorizontalDefault,renderThumbVertical:v.renderThumbVerticalDefault,tagName:"div",thumbMinSize:30,hideTracksWhenNotNeeded:!1,autoHide:!1,autoHideTimeout:1e3,autoHideDuration:200,autoHeight:!1,autoHeightMin:0,autoHeightMax:200,universal:!1}},function(e,t,n){(function(t){for(var r=n(90),i="undefined"===typeof window?t:window,o=["moz","webkit"],a="AnimationFrame",s=i["request"+a],u=i["cancel"+a]||i["cancelRequest"+a],c=0;!s&&c<o.length;c++)s=i[o[c]+"Request"+a],u=i[o[c]+"Cancel"+a]||i[o[c]+"CancelRequest"+a];if(!s||!u){var l=0,f=0,h=[];s=function(e){if(0===h.length){var t=r(),n=Math.max(0,16.666666666666668-(t-l));l=n+t,setTimeout((function(){var e=h.slice(0);h.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(l)}catch(n){setTimeout((function(){throw n}),0)}}),Math.round(n))}return h.push({handle:++f,callback:e,cancelled:!1}),f},u=function(e){for(var t=0;t<h.length;t++)h[t].handle===e&&(h[t].cancelled=!0)}}e.exports=function(e){return s.call(i,e)},e.exports.cancel=function(){u.apply(i,arguments)},e.exports.polyfill=function(e){e||(e=i),e.requestAnimationFrame=s,e.cancelAnimationFrame=u}}).call(this,n(32))},function(e,t,n){(function(t){(function(){var n,r,i,o,a,s;"undefined"!==typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!==typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-a)/1e6},r=t.hrtime,o=(n=function(){var e;return 1e9*(e=r())[0]+e[1]}
2)(),s=1e9*t.uptime(),a=o-s):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this,n(43))},function(e,t){var n=null,r=["Webkit","Moz","O","ms"];e.exports=function(e){n||(n=document.createElement("div"));var t=n.style;if(e in t)return e;for(var i=e.charAt(0).toUpperCase()+e.slice(1),o=r.length;o>=0;o--){var a=r[o]+i;if(a in t)return a}return!1}},function(e,t,n){var r=n(93);e.exports=function(e){return r(e).replace(/\s(\w)/g,(function(e,t){return t.toUpperCase()}))}},function(e,t,n){var r=n(94);e.exports=function(e){return r(e).replace(/[\W_]+(.|$)/g,(function(e,t){return t?" "+t:""})).trim()}},function(e,t){e.exports=function(e){return n.test(e)?e.toLowerCase():r.test(e)?(function(e){return e.replace(o,(function(e,t){return t?" "+t:""}))}(e)||e).toLowerCase():i.test(e)?function(e){return e.replace(a,(function(e,t,n){return t+" "+n.toLowerCase().split("").join(" ")}))}(e).toLowerCase():e.toLowerCase()};var n=/\s/,r=/(_|-|\.|:)/,i=/([a-z][A-Z]|[A-Z][a-z])/;var o=/[\W_]+(.|$)/g;var a=/(.)([A-Z]+)/g},function(e,t){var n={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};e.exports=function(e,t){return"number"!==typeof t||n[e]?t:t+"px"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"===typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!1!==a)return a;if("undefined"!==typeof document){var e=document.createElement("div");(0,o.default)(e,{width:100,height:100,position:"absolute",top:-9999,overflow:"scroll",MsOverflowStyle:"scrollbar"}),document.body.appendChild(e),a=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}else a=0;return a||0};var r,i=n(51),o=(r=i)&&r.__esModule?r:{default:r};var a=!1},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.clientWidth,n=getComputedStyle(e),r=n.paddingLeft,i=n.paddingRight;return t-parseFloat(r)-parseFloat(i)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.clientHeight,n=getComputedStyle(e),r=n.paddingTop,i=n.paddingBottom;return t-parseFloat(r)-parseFloat(i)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.containerStyleDefault={position:"relative",overflow:"hidden",width:"100%",height:"100%"},t.containerStyleAutoHeight={height:"auto"},t.viewStyleDefault={position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"scroll",WebkitOverflowScrolling:"touch"},t.viewStyleAutoHeight={position:"relative",top:void 0,left:void 0,right:void 0,bottom:void 0},t.viewStyleUniversalInitial={overflow:"hidden",marginRight:0,marginBottom:0},t.trackHorizontalStyleDefault={position:"absolute",height:6},t.trackVerticalStyleDefault={position:"absolute",width:6},t.thumbHorizontalStyleDefault={position:"relative",display:"block",height:"100%"},t.thumbVerticalStyleDefault={position:"relative",display:"block",width:"100%"},t.disableSelectStyle={userSelect:"none"},t.disableSelectStyleReset={userSelect:""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.renderViewDefault=function(e){return a.default.createElement("div",e)},t.renderTrackHorizontalDefault=function(e){var t=e.style,n=s(e,["style"]),i=r({},t,{right:2,bottom:2,left:2,borderRadius:3});return a.default.createElement("div",r({style:i},n))},t.renderTrackVerticalDefault=function(e){var t=e.style,n=s(e,["
2style"]),i=r({},t,{right:2,bottom:2,top:2,borderRadius:3});return a.default.createElement("div",r({style:i},n))},t.renderThumbHorizontalDefault=function(e){var t=e.style,n=s(e,["style"]),i=r({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return a.default.createElement("div",r({style:i},n))},t.renderThumbVerticalDefault=function(e){var t=e.style,n=s(e,["style"]),i=r({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return a.default.createElement("div",r({style:i},n))};var i,o=n(2),a=(i=o)&&i.__esModule?i:{default:i};function s(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(4),i=n(36);function o(e){return e&&"object"===Object(i.a)(e)&&e.constructor===Object}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},i=n.clone?Object(r.a)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(o(t[r])&&r in e?i[r]=a(e[r],t[r],n):i[r]=t[r])})),i}},,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e){for(var t="https://material-ui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return vn}));var r=n(12),i=n(4),o=n(2),a=n.n(o),s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u="object"===("undefined"===typeof window?"undefined":s(window))&&"object"===("undefined"===typeof document?"undefined":s(document))&&9===document.nodeType;n(27);function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}var f=n(15),h=n(38),d=n(19),p={}.constructor;function g(e){if(null==e||"object"!==typeof e)return e;if(Array.isArray(e))return e.map(g);if(e.constructor!==p)return e;var t={};for(var n in e)t[n]=g(e[n]);return t}function v(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=g(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var m=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},y=function(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=m(e[r]," ");else n=m(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n};function b(e,t){for(var n="",r=0;r<t;r++)n+="  ";return n+e}function _(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,o=void 0===i?0:i,a=t.fallbacks;if(e&&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+=b(c+": "+y(l)+";",o))}}else for(var f in a){var h=a[f];null!=h&&(r&&(r+="\n"),r+=b(f+": "+y(h)+";",o))}for(var d in t){var p=t[d];null!=p&&"fallbacks"!==d&&(r&&(r+="\n"),r+=b(d+": "+y(p)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r="\n"+r+"\n"),b(e+" {"+r,--o)+b("}",o)):r}var w=/([[\].#*$><+~=|^:(),"'`\s])/g,k="undefined"!==typeof CSS&&CSS.escape,E=function(e){return k?k(e):e.replace(w,"\\$1")},S=function(){function e(e,t,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=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var u=this.options.sheet;return u&&u.attached,this},e}(),I=function(e){function t(t,n,r){var i;(i=e.call(this,t,n,r)||this).selectorText=void 0,i.id=void 0,i.renderable=void 0;
2var o=r.selector,a=r.scoped,s=r.sheet,u=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=u(Object(h.a)(Object(h.a)(i)),s),i.selectorText="."+E(i.id)),i}Object(f.a)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==typeof n?e[t]=n:Array.isArray(n)&&(e[t]=y(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(i.a)({},e,{allowEmpty:!0}):e;return _(this.selectorText,this.style,n)},l(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(S),x={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new I(e,t,n)}},T={indent:1,children:!0},C=/@([\w-]+)/,O=function(){function e(e,t,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=e;var r=e.match(C);for(var o in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new J(Object(i.a)({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=T),null==e.indent&&(e.indent=T.indent),null==e.children&&(e.children=T.children),!1===e.children)return this.query+" {}";var t=this.rules.toString(e);return t?this.query+" {\n"+t+"\n}":""},e}(),A=/@media|@supports\s+/,N={onCreateRule:function(e,t,n){return A.test(e)?new O(e,t,n):null}},P={indent:1,children:!0},R=/@keyframes\s+([\w-]+)/,j=function(){function e(e,t,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 r=e.match(R);r&&r[1]?this.name=r[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:E(s(this,a)),this.rules=new J(Object(i.a)({},n,{parent:this})),t)this.rules.add(u,t[u],Object(i.a)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=P),null==e.indent&&(e.indent=P.indent),null==e.children&&(e.children=P.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),D=/@keyframes\s+/,M=/\$([\w-]+)/g,L=function(e,t){return"string"===typeof e?e.replace(M,(function(e,n){return n in t?t[n]:e})):e},F=function(e,t,n){var r=e[t],i=L(r,n);i!==r&&(e[t]=i)},U={onCreateRule:function(e,t,n){return"string"===typeof e&&D.test(e)?new j(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&F(e,"animation-name",n.keyframes),"animation"in e&&F(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return L(e,r.keyframes);default:return e}}},V=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).renderable=void 0,t}return Object(f.a)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(i.a)({},e,{allowEmpty:!0}):e;return _(this.key,this.style,n)},t}(S),B={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new V(e,t,n
vendor: 8,638 bytes, line 2
2):null}},q=function(){function e(e,t,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=e,this.style=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=_(this.at,this.style[n]),this.style[n+1]&&(t+="\n");return t}return _(this.at,this.style,e)},e}(),z=/@font-face/,H={onCreateRule:function(e,t,n){return z.test(e)?new q(e,t,n):null}},K=function(){function e(e,t,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=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return _(this.key,this.style,e)},e}(),W={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new K(e,t,n):null}},G=function(){function e(e,t,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=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),Y={"@charset":!0,"@import":!0,"@namespace":!0},$=[x,N,U,B,H,W,{onCreateRule:function(e,t,n){return e in Y?new G(e,t,n):null}}],Q={process:!0},X={force:!0,process:!0},J=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=void 0,this.classes=void 0,this.keyframes=void 0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,o=r.parent,a=r.sheet,s=r.jss,u=r.Renderer,c=r.generateId,l=r.scoped,f=Object(i.a)({classes:this.classes,parent:o,sheet:a,jss:s,Renderer:u,generateId:c,scoped:l,name:e,keyframes:this.keyframes,selector:void 0},n),h=e;e in this.raw&&(h=e+"-d"+this.counter++),this.raw[h]=t,h in this.classes&&(f.selector="."+E(this.classes[h]));var d=v(h,t,f);if(!d)return null;this.register(d);var p=void 0===f.index?this.index.length:f.index;return this.index.splice(p,0,d),d},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof I?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof j&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof I?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof j&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"===typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.map[e],t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=Q);var i=this.options,o=i.jss.plugins,a=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t,u=s.style;if(o.onUpdate(n,t,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,X)}for(var f in u){var h=s.style[f],d=u[f];null==h&&h!==d&&s.prop(f,null,X)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=0;i<this.index.length;i++){var o=this.index[i].toString(e);(o||r)&&(t&&(t+="\n"),t+=o)}return t},e}(),Z=function(){function e(e,t){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(i.a)({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new J(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,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},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"===typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),ee=function(){function e(){this.plugins={internal:[],external:[]},this.registry=void 0}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),te=new(function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Object(d.a)(t,["attached"]),i="",o=0;o<this.registry.length;o++){var a=this.registry[o];null!=n&&a.attached!==n||(i&&(i+="\n"),i+=a.toString(r))}return i},l(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}()),ne="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window&&window.Math===Math?window:"undefined"!==typeof self&&self.Math===Math?self:Function("return this")(),re="2f1acc6c3a606b082e5eef5e54414ffb";null==ne[re]&&(ne[re]=0);var ie=ne[re]++,oe=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(o||"c")+ie+i+t:o+n.key+"-"+ie+(i?"-"+i:"")+"-"+t}},ae=function(e){var t;return function(){return t||(t=e()),t}},se=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(n){return""}},ue=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=y(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"
2important"),!0;e.attributeStyleMap?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(i){return!1}return!0},ce=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(n){}},le=function(e,t){return e.selectorText=t,e.selectorText===t},fe=ae((function(){return document.querySelector("head")}));function he(e){var t=te.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var i=function(e){for(var t=fe(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var de=ae((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),pe=function(e,t,n){try{if("insertRule"in e)e.insertRule(t,n);else if("appendRule"in e){e.appendRule(t)}}catch(r){return!1}return e.cssRules[n]},ge=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},ve=function(){function e(e){this.getPropertyValue=se,this.setProperty=ue,this.removeProperty=ce,this.setSelector=le,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,this.cssRules=[],e&&te.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=de();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=he(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else fe().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;if("conditional"===e.type||"keyframes"===e.type){var o=ge(n,t);if(!1===(i=pe(n,r.toString({children:!1}),o)))return!1;this.refCssRule(e,o,i)}return this.insertRules(r.rules,i),i}var a=e.toString();if(!a)return!1;var s=ge(n,t),u=pe(n,a,s);return!1!==u&&(this.hasInsertedRules=!0,this.refCssRule(e,s,u),u)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof Z&&(this.cssRules[t]=n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),me=0,ye=function(){function e(e){this.id=me++,this.version="10.7.1",this.plugins=new ee,this.options={id:{minify:!1},createGenerateId:oe,Renderer:u?ve:null,plugins:[]},this.generateId=oe({minify:!1});for(var t=0;t<$.length;t++)this.plugins.use($[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=Object(i.a)({}
2,this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!==typeof n&&(n=0===te.index?0:te.index+1);var r=new Z(e,Object(i.a)({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),te.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"===typeof e)return this.createRule(void 0,e,t);var r=Object(i.a)({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var o=v(e,t,r);return o&&this.plugins.onProcessRule(o),o},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}();function be(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if("function"===i)t||(t={}),t[n]=r;else if("object"===i&&null!==r&&!Array.isArray(r)){var o=be(r);o&&(t||(t={}),t[n]=o)}}return t}var _e="object"===typeof CSS&&null!=CSS&&"number"in CSS,we=function(e){return new ye(e)};we();function ke(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var r=Object(i.a)({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}var Ee={set:function(e,t,n,r){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}},Se=n(126),Ie=(n(9),"function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__"),xe=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var Te=Date.now(),Ce="fnValues"+Te,Oe="fnStyle"+ ++Te,Ae=function(){return{onCreateRule:function(e,t,n){if("function"!==typeof t)return null;var r=v(e,{},n);return r[Oe]=t,r},onProcessStyle:function(e,t){if(Ce in t||Oe in t)return e;var n={};for(var r in e){var i=e[r];"function"===typeof i&&(delete e[r],n[r]=i)}return t[Ce]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[Oe];o&&(i.style=o(e)||{});var a=i[Ce];if(a)for(var s in a)i.prop(s,a[s](e),r)}}},Ne="@global",Pe="@global ",Re=function(){function e(e,t,n){for(var r in this.type="global",this.at=Ne,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new J(Object(i.a)({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),je=function(){function e(e,t,n){this.type="global",this.at=Ne,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=n;var r=e.substr(Pe.length);this.rule=n.jss.createRule(r,t,Object(i.a)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),De=/\s*,\s*/g;function Me(e,t){for(var n=e.split(De),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}var Le=function(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===Ne)return new Re(e,t,n);if("@"===e[0]&&e.substr(0,Pe.length)===Pe)return new je(e,t,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=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,o=r?r[Ne]:null;if(o){for(var a in o)t.addRule(a,o[a],Object(i.a)({},n,{selector:Me(a,e.selector)}));delete r[Ne]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var o in r)if("@"===o[0]&&o.substr(0,Ne.length)===Ne){var a=Me(o.substr(Ne.length),e.selector);t.addRule(a,r[o],Object(i.a)({},n,{selector:a})),delete r[o]}}(e,t))}}},Fe=/\s*,\s*/g,Ue=/&/g,Ve=/\$([\w-]+)/g;var Be=function(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?(i=i).selector:r}}function t(e,t){for(var n=t.split(Fe),r=e.split(Fe),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(Ue,a):a+" "+u}return i}function n(e,t,n){if(n)return Object(i.a)({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var o=Object(i.a)({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete o.name,o}return{onProcessStyle:function(r,o,a){if("style"!==o.type)return r;var s,u,c=o,l=c.options.parent;for(var f in r){var h=-1!==f.indexOf("&"),d="@"===f[0];if(h||d){if(s=n(c,l,s),h){var p=t(f,c.selector);u||(u=e(l,a)),p=p.replace(Ve,u),l.addRule(p,r[f],Object(i.a)({},s,{selector:p}))}else d&&l.addRule(f,{},s).addRule(c.key,r[f],{selector:c.selector});delete r[f]}}return r}}},qe=/[A-Z]/g,ze=/^ms-/,He={};function Ke(e){return"-"+e.toLowerCase()}var We=function(e){if(He.hasOwnProperty(e))return He[e];var t=e.replace(qe,Ke);return He[e]=ze.test(t)?"-"+t:t};function Ge(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:We(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(Ge):t.fallbacks=Ge(e.fallbacks)),t}var Ye=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=Ge(e[t]);return e}return Ge(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=We(t);return t===r?e:(n.prop(r,e),null)}}},$e=_e&&CSS?CSS.px:"px",Qe=_e&&CSS?CSS.ms:"ms",Xe=_e&&CSS?CSS.percent:"%";function Je(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var Ze=Je({"animation-delay":Qe,"animation-duration":Qe,"background-position":$e,"background-position-x":$e,"background-position-y":$e,"background-size":$e,border:$e,"border-bottom":$e,"border-bottom-left-radius":$e,"border-bottom-right-radius":$e,"border-bottom-width":$e,"border-left":$e,"border-left-width":$e,"border-radius":$e,"border-right":$e,"border-right-width":$e,"border-top":$e,"border-top-left-radius":$e,"border-top-right-radius":$e,"border-top-width":$e,"border-width":$e,"border-block":$e,"border-block-end":$e,"border-block-end-width":$e,"border-block-start":$e,"border-block-start-width":$e,"border-block-width":$e,"border-inline":$e,"border-inline-end":$e,"border-inline-end-width":$e,"border-inline-start":$e,"border-inline-start-width":$e,"border-inline-width":$e,"border-start-start-radius":$e,"border-start-end-radius":$e,"border-end-start-radius":$e,"border-end-end-radius":$e,margin:$e,"margin-bottom":$e,"margin-left":$e,"margin-right":$e,"margin-top":$e,"margin-block":$e,"margin-block-end":$e,"margin-block-start":$e,"margin-inline":$e,"margin-inline-end":$e,"margin-inline-start":$e,padding:$e,"padding-bottom":$e,"padding-left":$e,"padding-right":$e,"padding-top":$e,"padding-block":$e,"padding-block-end":$e,"padding-block-start":$e,"padding-inline":$e,"padding-inline-end":$e,"padding-inline-start":$e,"mask-position-x":$e,"mask-position-y":$e,"mask-size":$e,height:$e,width:$e,"min-height":$e,"max-height":$e,"min-width":$e,"max-width":$e,bottom:$e,left:$e,top:$e,right:$e,inset:$e,"inset-block":$e,"inset-block-end":$e,"inset-block-start":$e,"inset-inline":$e,"inset-inline-end":$e,"inset-inline-start":$e,"box-shadow":$e,"text-shadow":$e,"column-gap":$e,"column-rule":$e,"column-rule-width":$e,"column-width":$e,"font-size":$e,"font-size-delta":$e,"letter-spacing":$e,"text-decoration-thickness":$e,"text-indent":$e,"text-stroke":$e,"text-stroke-width":$e,"word-spacing":$e,motion:$e,"motion-offset":$e,outline:$e,"outline-offset":$e,"outline-width":$e,perspective:$e,"perspective-origin-x":Xe,"perspective-origin-y":Xe,"transform-origin":Xe,"transform-origin-x":Xe,"transform-origin-y":Xe,"transform-origin-z":Xe,"transition-delay":Qe,"transition-duration":Qe,"vertical-align":$e,"flex-basis":$e,"shape-margin":$e,
vendor: 4,086 bytes, line 2
2size:$e,gap:$e,grid:$e,"grid-gap":$e,"row-gap":$e,"grid-row-gap":$e,"grid-column-gap":$e,"grid-template-rows":$e,"grid-template-columns":$e,"grid-auto-rows":$e,"grid-auto-columns":$e,"box-shadow-x":$e,"box-shadow-y":$e,"box-shadow-blur":$e,"box-shadow-spread":$e,"font-line-height":$e,"text-shadow-x":$e,"text-shadow-y":$e,"text-shadow-blur":$e});function et(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=et(e,t[r],n);else if("object"===typeof t)if("fallbacks"===e)for(var i in t)t[i]=et(i,t[i],n);else for(var o in t)t[o]=et(e+"-"+o,t[o],n);else if("number"===typeof t&&!1===isNaN(t)){var a=n[e]||Ze[e];return!a||0===t&&a===$e?t.toString():"function"===typeof a?a(t).toString():""+t+a}return t}var tt=function(e){void 0===e&&(e={});var t=Je(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=et(r,e[r],t);return e},onChangeValue:function(e,n){return et(n,e,t)}}},nt=n(23),rt="",it="",ot="",at="",st=u&&"ontouchstart"in document.documentElement;if(u){var ut={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},ct=document.createElement("p").style;for(var lt in ut)if(lt+"Transform"in ct){rt=lt,it=ut[lt];break}"Webkit"===rt&&"msHyphens"in ct&&(rt="ms",it=ut.ms,at="edge"),"Webkit"===rt&&"-apple-trailing-word"in ct&&(ot="apple")}var ft=rt,ht=it,dt=ot,pt=at,gt=st;var vt={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===ft?"-webkit-"+e:ht+e)}},mt={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===ft?ht+"print-"+e:e)}},yt=/[-\s]+(.)?/g;function bt(e,t){return t?t.toUpperCase():""}function _t(e){return e.replace(yt,bt)}function wt(e){return _t("-"+e)}var kt,Et={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===ft){var n="mask-image";if(_t(n)in t)return e;if(ft+wt(n)in t)return ht+e}return e}},St={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==dt||gt?e:ht+e)}},It={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:ht+e)}},xt={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:ht+e)}},Tt={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===ft||"ms"===ft&&"edge"!==pt?ht+e:e)}},Ct={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===ft||"ms"===ft||"apple"===dt?ht+e:e)}},Ot={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===ft?"WebkitColumn"+wt(e)in t&&ht+"column-"+e:"Moz"===ft&&("page"+wt(e)in t&&"page-"+e))}},At={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===ft)return e;var n=e.replace("-inline","");return ft+wt(n)in t&&ht+n}},Nt={supportedProperty:function(e,t){return _t(e)in t&&e}},Pt={supportedProperty:function(e,t){var n=wt(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:ft+n in t?ht+e:"Webkit"!==ft&&"Webkit"+n in t&&"-webkit-"+e}},Rt={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===ft?""+ht+e:e)}},jt={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===ft?ht+"scroll-chaining":e)}},Dt={"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"},Mt={supportedProperty:function(e,t){var n=Dt[e];return!!n&&(ft+wt(n)in t&&ht+n)}},Lt={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"},Ft=Object.keys(Lt),Ut=function(e){return ht+e},Vt=[vt,mt,Et,St,It,xt,Tt,Ct,Ot,At,Nt,Pt,Rt,jt,Mt,{supportedProperty:function(e,t,n){var r=n.multiple;if(Ft.indexOf(e)>-1){var i=Lt[e];if(!Array.isArray(i))return ft+wt(i)in t&&ht+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(ft+wt(i[0])in t))return!1;return i.map(Ut)}return!1}}
2],Bt=Vt.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),qt=Vt.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Object(nt.a)(t.noPrefill)),e}),[]),zt={};if(u){kt=document.createElement("p");var Ht=window.getComputedStyle(document.documentElement,"");for(var Kt in Ht)isNaN(Kt)||(zt[Ht[Kt]]=Ht[Kt]);qt.forEach((function(e){return delete zt[e]}))}function Wt(e,t){if(void 0===t&&(t={}),!kt)return e;if(null!=zt[e])return zt[e];"transition"!==e&&"transform"!==e||(t[e]=e in kt.style);for(var n=0;n<Bt.length&&(zt[e]=Bt[n](e,kt.style,t),!zt[e]);n++);try{kt.style[e]=""}catch(r){return!1}return zt[e]}var Gt,Yt={},$t={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Qt=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Xt(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?Wt(t):", "+Wt(n);return r||(t||n)}function Jt(e,t){var n=t;if(!Gt||"content"===e)return t;if("string"!==typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=Yt[r])return Yt[r];try{Gt.style[e]=n}catch(i){return Yt[r]=!1,!1}if($t[e])n=n.replace(Qt,Xt);else if(""===Gt.style[e]&&("-ms-flex"===(n=ht+n)&&(Gt.style[e]="-ms-flexbox"),Gt.style[e]=n,""===Gt.style[e]))return Yt[r]=!1,!1;return Gt.style[e]="",Yt[r]=n,Yt[r]}u&&(Gt=document.createElement("p"));var Zt=function(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var i=!1,o=Wt(n);o&&o!==n&&(i=!0);var a=!1,s=Jt(o,y(r));s&&s!==r&&(a=!0),(i||a)&&(i&&delete t[n],t[o||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at="-"===(n=t.at)[1]||"ms"===ft?n:"@"+ht+"keyframes"+n.substr(10)}var n},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return Jt(t,y(e))||e}}};var en=function(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)r[i[o]]=t[i[o]];return r}}};function tn(){return{plugins:[Ae(),Le(),Be(),Ye(),tt(),"undefined"===typeof window?null:Zt(),en()]}}var nn=we(tn()),rn={disableGeneration:!1,generateClassName:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,i=void 0===r?"jss":r,o=e.seed,a=void 0===o?"":o,s=""===a?"":"".concat(a,"-"),u=0,c=function(){return u+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==xe.indexOf(e.key))return"Mui-".concat(e.key);var o="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[Ie]&&""===a?"".concat(o,"-").concat(c()):o}return"".concat(s).concat(i).concat(c())}}(),jss:nn,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},on=a.a.createContext(rn);var an=-1e9;function sn(){return an+=1}n(36);var un=n(106);function cn(e){var t="function"===typeof e;return{create:function(n,r){var o;try{o=t?e(n):e}catch(u){throw u}if(!r||!n.overrides||!n.overrides[r])return o;var a=n.overrides[r],s=Object(i.a)({},o);return Object.keys(a).forEach((function(e){s[e]=Object(un.a)(s[e],a[e])})),s},options:{}}}var ln={};function fn(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};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),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,i=!0),i&&(r.cacheClasses.value=ke({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function hn(e,t){var n=e.state,r=e.theme,o=e.stylesOptions,a=e.stylesCreator,s=e.name;if(!o.disableGeneration){var u=Ee.get(o.sheetsManager,a,r);u||(u={refs:0,staticSheet:null,dynamicStyles:null},Ee.set(o.sheetsManager,a,r,u));var c=Object(i.a)({},a.options,o,{theme:r,flip:"boolean"===typeof o.flip?o.flip:"rtl"===r.direction});c.generateId=c.serverGenerateClassName||c.generateClassName;var l=o.sheetsRegistry;if(0===u.refs){var f;o.sheetsCache&&(f=Ee.get(o.sheetsCache,a,r));var h=a.create(r,s);
2f||((f=o.jss.createStyleSheet(h,Object(i.a)({link:!1},c))).attach(),o.sheetsCache&&Ee.set(o.sheetsCache,a,r,f)),l&&l.add(f),u.staticSheet=f,u.dynamicStyles=be(h)}if(u.dynamicStyles){var d=o.jss.createStyleSheet(u.dynamicStyles,Object(i.a)({link:!0},c));d.update(t),d.attach(),n.dynamicSheet=d,n.classes=ke({baseClasses:u.staticSheet.classes,newClasses:d.classes}),l&&l.add(d)}else n.classes=u.staticSheet.classes;u.refs+=1}}function dn(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function pn(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var o=Ee.get(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(Ee.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function gn(e,t){var n,r=a.a.useRef([]),i=a.a.useMemo((function(){return{}}),t);r.current!==i&&(r.current=i,n=e()),a.a.useEffect((function(){return function(){n&&n()}}),[i])}function vn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,o=t.classNamePrefix,s=t.Component,u=t.defaultTheme,c=void 0===u?ln:u,l=Object(r.a)(t,["name","classNamePrefix","Component","defaultTheme"]),f=cn(e),h=n||o||"makeStyles";f.options={index:sn(),name:n,meta:h,classNamePrefix:h};var d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(Se.a)()||c,r=Object(i.a)({},a.a.useContext(on),l),o=a.a.useRef(),u=a.a.useRef();gn((function(){var i={name:n,state:{},stylesCreator:f,stylesOptions:r,theme:t};return hn(i,e),u.current=!1,o.current=i,function(){pn(i)}}),[t,f]),a.a.useEffect((function(){u.current&&dn(o.current,e),u.current=!0}));var h=fn(o.current,e.classes,s);return h};return d}},function(e,t,n){"use strict";var r=n(23),i=n(4),o=(n(9),n(30));var a=function(e){var t=function(t){var n=e(t);return t.css?Object(i.a)({},Object(o.a)(n,e(Object(i.a)({theme:t.theme},t.css))),function(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}(t.css,[e.filterProps])):n};return t.propTypes={},t.filterProps=["css"].concat(Object(r.a)(e.filterProps)),t};var s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=function(e){return t.reduce((function(t,n){var r=n(e);return r?Object(o.a)(t,r):t}),{})};return r.propTypes={},r.filterProps=t.reduce((function(e,t){return e.concat(t.filterProps)}),[]),r},u=n(28),c=n(40);function l(e,t){return t&&"string"===typeof t?t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:null}),e):null}var f=function(e){var t=e.prop,n=e.cssProperty,r=void 0===n?e.prop:n,i=e.themeKey,o=e.transform,a=function(e){if(null==e[t])return null;var n=e[t],a=l(e.theme,i)||{};return Object(c.a)(e,n,(function(e){var t;return"function"===typeof a?t=a(e):Array.isArray(a)?t=a[e]||e:(t=l(a,e)||e,o&&(t=o(t))),!1===r?t:Object(u.a)({},r,t)}))};return a.propTypes={},a.filterProps=[t],a};function h(e){return"number"!==typeof e?e:"".concat(e,"px solid")}var d=s(f({prop:"border",themeKey:"borders",transform:h}),f({prop:"borderTop",themeKey:"borders",transform:h}),f({prop:"borderRight",themeKey:"borders",transform:h}),f({prop:"borderBottom",themeKey:"borders",transform:h}),f({prop:"borderLeft",themeKey:"borders",transform:h}),f({prop:"borderColor",themeKey:"palette"}),f({prop:"borderRadius",themeKey:"shape"})),p=s(f({prop:"displayPrint",cssProperty:!1,transform:function(e){return{"@media print":{display:e}}}}),f({prop:"display"}),f({prop:"overflow"}),f({prop:"textOverflow"}),f({prop:"visibility"}),f({prop:"whiteSpace"})),g=s(f({prop:"flexBasis"}),f({prop:"flexDirection"}),f({prop:"flexWrap"}),f({prop:"justifyContent"}),f({prop:"alignItems"}),f({prop:"alignContent"}),f({prop:"order"}),f({prop:"flex"}),f({prop:"flexGrow"}),f({prop:"flexShrink"}),f({prop:"alignSelf"}),f({prop:"justifyItems"}),f({prop:"justifySelf"})),v=s(f({prop:"gridGap"}),f({prop:"gridColumnGap"}),f({prop:"gridRowGap"}),f({prop:"gridColumn"}),f({prop:"gridRow"}),f({prop:"gridAutoFlow"}),f({prop:"gridAutoColumns"}),f({prop:"gridAutoRows"}),f({prop:"gridTemplateColumns"}),f({prop:"gridTemplateRows"}),f({prop:"gridTemplateAreas"}),f({prop:"gridArea"})),m=s(f({prop:"position"}),f({prop:"zIndex",themeKey:"zIndex"}),f({prop:"top"}),f({prop:"right"}),f({prop:"bottom"}),f({prop:"left"})),y=s(f({prop:"color",themeKey:"palette"}),f({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}
2)),b=f({prop:"boxShadow",themeKey:"shadows"});function _(e){return e<=1?"".concat(100*e,"%"):e}var w=f({prop:"width",transform:_}),k=f({prop:"maxWidth",transform:_}),E=f({prop:"minWidth",transform:_}),S=f({prop:"height",transform:_}),I=f({prop:"maxHeight",transform:_}),x=f({prop:"minHeight",transform:_}),T=(f({prop:"size",cssProperty:"width",transform:_}),f({prop:"size",cssProperty:"height",transform:_}),s(w,k,E,S,I,x,f({prop:"boxSizing"}))),C=n(125),O=s(f({prop:"fontFamily",themeKey:"typography"}),f({prop:"fontSize",themeKey:"typography"}),f({prop:"fontStyle",themeKey:"typography"}),f({prop:"fontWeight",themeKey:"typography"}),f({prop:"letterSpacing"}),f({prop:"lineHeight"}),f({prop:"textAlign"})),A=n(12),N=n(2),P=n.n(N),R=n(29),j=n(33),D=n.n(j),M=n(121);function L(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}var F=n(34),U=function(e){var t=function(e){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.name,a=Object(A.a)(r,["name"]),s=o,u="function"===typeof t?function(e){return{root:function(n){return t(Object(i.a)({theme:e},n))}}}:{root:t},c=Object(M.a)(u,Object(i.a)({Component:e,name:o||e.displayName,classNamePrefix:s},a));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var l=P.a.forwardRef((function(t,r){var o=t.children,a=t.className,s=t.clone,u=t.component,l=Object(A.a)(t,["children","className","clone","component"]),f=c(t),h=Object(R.a)(f.root,a),d=l;if(n&&(d=L(d,n)),s)return P.a.cloneElement(o,Object(i.a)({className:Object(R.a)(o.props.className,h)},d));if("function"===typeof o)return o(Object(i.a)({className:h},d));var p=u||e;return P.a.createElement(p,Object(i.a)({ref:r,className:h},d),o)}));return D()(l,e),l}}(e);return function(e,n){return t(e,Object(i.a)({defaultTheme:F.a},n))}},V=a(s(d,p,g,v,m,y,b,T,C.b,O)),B=U("div")(V,{name:"MuiBox"});t.a=B},function(e,t,n){"use strict";var r=n(4),i=n(7),o=n(12),a=n(2),s=n.n(a),u=(n(9),n(29)),c=n(126),l=n(34);var f=n(33),h=n.n(f),d=n(121);function p(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i,o=t.props[n];for(i in o)void 0===r[i]&&(r[i]=o[i]);return r}var g=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var i=t.defaultTheme,a=t.withTheme,u=void 0!==a&&a,l=t.name,f=Object(o.a)(t,["defaultTheme","withTheme","name"]);var g=l,v=Object(d.a)(e,Object(r.a)({defaultTheme:i,Component:n,name:l||n.displayName,classNamePrefix:g},f)),m=s.a.forwardRef((function(e,t){e.classes;var a,f=e.innerRef,h=Object(o.a)(e,["classes","innerRef"]),d=v(Object(r.a)({},n.defaultProps,e)),g=h;return("string"===typeof l||u)&&(a=Object(c.a)()||i,l&&(g=p({theme:a,name:l,props:h})),u&&!g.theme&&(g.theme=a)),s.a.createElement(n,Object(r.a)({ref:f||t,classes:d},g))}));return h()(m,n),m}};var v=function(e,t){return g(e,Object(r.a)({defaultTheme:l.a},t))};var m=n(26),y=!0,b=!1,_=null,w={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function k(e){e.metaKey||e.altKey||e.ctrlKey||(y=!0)}function E(){y=!1}function S(){"hidden"===this.visibilityState&&b&&(y=!0)}function I(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return y||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!w[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function x(){b=!0,window.clearTimeout(_),_=window.setTimeout((function(){b=!1}),100)}function T(){return{isFocusVisible:I,onBlurVisible:x,ref:a.useCallback((function(e){var t,n=m.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",k,!0),t.addEventListener("mousedown",E,!0),t.addEventListener("pointerdown",E,!0),t.addEventListener("touchstart",E,!0),t.addEventListener("visibilitychange",S,!0))}),[])}}function C(e,t){"function"===typeof e?e(t):e&&(e.current=t)}function O(e,t){return a.useMemo((function(){return null==e&&null==t?null:function(n){C(e,n),C(t,n)}}),[e,t])}var A=n(120);function N(e){if("string"!==typeof e)throw new Error(Object(A.a)(7));return e.charAt(0).toUpperCase()+e.slice(1)}var P=a.forwardRef((function(e,t){var n=e.children,i=e.classes,s=e.className,c=e.color,l=void 0===c?"inherit":c,f=e.component,h=void 0===f?"svg":f,d=e.fontSize,p=void 0===d?"default":d,g=e.htmlColor,v=e.titleAccess,m=e.viewBox,y=void 0===m?"0 0 24 24":m,b=Object(o.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return a.createElement(h,Object(r.a)({className:Object(u.a)(i.root,s,"inherit"!==l&&i["color".concat(N(l))],"default"!==p&&i["fontSize".concat(N(p
2))]),focusable:"false",viewBox:y,color:g,"aria-hidden":!v||void 0,role:v?"img":void 0,ref:t},b),n,v?a.createElement("title",null,v):null)}));P.muiName="SvgIcon";var R=v((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(P);var j=function(e,t){var n=function(t,n){return s.a.createElement(R,Object(r.a)({ref:n},t),e)};return n.muiName=R.muiName,s.a.memo(s.a.forwardRef(n))}(a.createElement("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}));function D(e,t){if(null==e)return e;var n=Math.round(e/t)*t;return Number(n.toFixed(function(e){var t=e.toString().split(".")[1];return t?t.length:0}(t)))}function M(e){e.value;var t=Object(o.a)(e,["value"]);return a.createElement("span",t)}var L=a.createElement(j,{fontSize:"inherit"});function F(e){return"".concat(e," Star").concat(1!==e?"s":"")}var U=a.forwardRef((function(e,t){var n=e.classes,s=e.className,f=e.defaultValue,h=void 0===f?null:f,d=e.disabled,p=void 0!==d&&d,g=e.emptyIcon,v=e.emptyLabelText,m=void 0===v?"Empty":v,y=e.getLabelText,b=void 0===y?F:y,_=e.icon,w=void 0===_?L:_,k=e.IconContainerComponent,E=void 0===k?M:k,S=e.max,I=void 0===S?5:S,x=e.name,C=e.onChange,A=e.onChangeActive,P=e.onMouseLeave,R=e.onMouseMove,j=e.precision,U=void 0===j?1:j,V=e.readOnly,B=void 0!==V&&V,q=e.size,z=void 0===q?"medium":q,H=e.value,K=Object(o.a)(e,["classes","className","defaultValue","disabled","emptyIcon","emptyLabelText","getLabelText","icon","IconContainerComponent","max","name","onChange","onChangeActive","onMouseLeave","onMouseMove","precision","readOnly","size","value"]),W=function(e){var t=a.useState(e),n=t[0],r=t[1],i=e||n;return a.useEffect((function(){null==n&&r("mui-".concat(Math.round(1e5*Math.random())))}),[n]),i}(x),G=function(e){var t=e.controlled,n=e.default,r=(e.name,e.state,a.useRef(void 0!==t).current),i=a.useState(n),o=i[0],s=i[1];return[r?t:o,a.useCallback((function(e){r||s(e)}),[])]}({controlled:H,default:h,name:"Rating"}),Y=Object(i.a)(G,2),$=Y[0],Q=Y[1],X=D($,U),J=Object(c.a)()||l.a,Z=a.useState({hover:-1,focus:-1}),ee=Z[0],te=ee.hover,ne=ee.focus,re=Z[1],ie=X;-1!==te&&(ie=te),-1!==ne&&(ie=ne);var oe=T(),ae=oe.isFocusVisible,se=oe.onBlurVisible,ue=oe.ref,ce=a.useState(!1),le=ce[0],fe=ce[1],he=a.useRef(),de=O(ue,he),pe=O(de,t),ge=function(e){var t=parseFloat(e.target.value);Q(t),C&&C(e,t)},ve=function(e){0===e.clientX&&0===e.clientY||(re({hover:-1,focus:-1}),Q(null),C&&parseFloat(e.target.value)===X&&C(e,null))},me=function(e){ae(e)&&fe(!0);var t=parseFloat(e.target.value);re((function(e){return{hover:e.hover,focus:t}})),A&&ne!==t&&A(e,t)},ye=function(e){if(-1===te){!1!==le&&(fe(!1),se());re((function(e){return{hover:e.hover,focus:-1}})),A&&-1!==ne&&A(e,-1)}},be=function(e,t){var i="".concat(W,"-").concat(String(e.value).replace(".","-")),o=a.createElement(E,{value:e.value,className:Object(u.a)(n.icon,e.filled?n.iconFilled:n.iconEmpty,e.hover&&n.iconHover,e.focus&&n.iconFocus,e.active&&n.iconActive)},g&&!e.filled?g:w);return B?a.createElement("span",Object(r.a)({key:e.value},t),o):a.createElement(a.Fragment,{key:e.value},a.createElement("label",Object(r.a)({className:n.label,htmlFor:i},t),o,a.createElement("span",{className:n.visuallyhidden},b(e.value))),a.createElement("input",{onFocus:me,onBlur:ye,onChange:ge,onClick:ve,disabled:p,value:e.value,id:i,type:"radio",name:W,checked:e.checked,className:n.visuallyhidden}))};return a.createElement("span",Object(r.a)({ref:pe,onMouseMove:function(e){R&&R(e);var t,n=he.current,r=n.getBoundingClientRect(),i=r.right,o=r.left,a=n.firstChild.getBoundingClientRect().width;t="rtl"===J.direction?(i-e.clientX)/(a*I):(e.clientX-o)/(a*I);var s=D(I*t+U/2,U);s=function(e,t,n){return e<t?t:e>n?n:e}(s,U,I),re((function(e){return e.hover===s&&e.focus===s?e:{hover:s,focus:s}})),fe(!1),A&&te!==s&&A(e,s)},onMouseLeave:function(e){P&&P(e);re({hover:-1,focus:-1}),A&&-1!==te&&A(e,-1)},className:Object(u.a)(n.root,s,"medium"!==z&&n["size".concat(N(z))],p&&n.disabled,le&&n.focusVisible,B&&n.readOnly),role:B?"img":null,"aria-label":B?b(ie):null},K),Array.from(new Array(I)).map((function(e,t){var r=t+1;if(U<1){var i=Array.from(new Array(1/U));return a.createElement("span",{key:r,className:Object(u.a)(n.decimal,r===Math.ceil(ie)&&(-1!==te||-1!==ne)&&n.iconActive)},i.map((function(e,t){var n=D(r-1+(t+1)*U,U);return be({value:n,filled:n<=ie,hover:n<=te,focus:n<=ne,checked:n===X},{style:i.length-1===t?{}:{width:n===ie?"".concat((t+1)*U*100,"%"):"0%",overflow:"hidden",zIndex:1,position:"absolute"}})})))}return be({value:r,active:r===ie&&(-1!==te||-1!==ne),filled:r<=ie,hover:r<=te,focus:r<=ne,checked:r===X})}
2)),!B&&!p&&null==X&&a.createElement(a.Fragment,null,a.createElement("input",{value:"",id:"".concat(W,"-empty"),type:"radio",name:W,defaultChecked:!0,className:n.visuallyhidden}),a.createElement("label",{className:n.pristine,htmlFor:"".concat(W,"-empty")},a.createElement("span",{className:n.visuallyhidden},m))))}));t.a=v((function(e){return{root:{display:"inline-flex",position:"relative",fontSize:e.typography.pxToRem(24),color:"#ffb400",cursor:"pointer",textAlign:"left",WebkitTapHighlightColor:"transparent","&$disabled":{opacity:.5,pointerEvents:"none"},"&$focusVisible $iconActive":{outline:"1px solid #999"}},sizeSmall:{fontSize:e.typography.pxToRem(18)},sizeLarge:{fontSize:e.typography.pxToRem(30)},readOnly:{pointerEvents:"none"},disabled:{},focusVisible:{},visuallyhidden:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,color:"#000",overflow:"hidden",padding:0,position:"absolute",top:20,width:1},pristine:{"input:focus + &":{top:0,bottom:0,position:"absolute",outline:"1px solid #999",width:"100%"}},label:{cursor:"inherit"},icon:{display:"flex",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),pointerEvents:"none"},iconEmpty:{color:e.palette.action.disabled},iconFilled:{},iconHover:{},iconFocus:{},iconActive:{transform:"scale(1.2)"},decimal:{position:"relative"}}}),{name:"MuiRating"})(U)},function(e,t,n){"use strict";var r=n(2);var i="undefined"!==typeof window,o=function(e){Object(r.useEffect)(e,[])},a=function(e){var t=Object(r.useRef)(e);t.current=e,o((function(){return function(){return t.current()}}))},s=function(e){var t=Object(r.useRef)(0),n=Object(r.useState)(e),i=n[0],o=n[1],s=Object(r.useCallback)((function(e){cancelAnimationFrame(t.current),t.current=requestAnimationFrame((function(){o(e)}))}),[]);return a((function(){cancelAnimationFrame(t.current)})),[i,s]};t.a=function(){var e=s((function(){return{x:i?window.pageXOffset:0,y:i?window.pageYOffset:0}})),t=e[0],n=e[1];return Object(r.useEffect)((function(){var e=function(){n((function(e){var t=window.pageXOffset,n=window.pageYOffset;return e.x!==t||e.y!==n?{x:t,y:n}:e}))};return e(),function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}(window,"scroll",e,{capture:!1,passive:!0}),function(){!function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}(window,"scroll",e)}}),[]),t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(7),i=n(40),o=n(30);var a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},u={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){if(e.length>2){if(!u[e])return[e];e=u[e]}var t=e.split(""),n=Object(r.a)(t,2),i=n[0],o=n[1],c=a[i],l=s[o]||"";return Array.isArray(l)?l.map((function(e){return c+e})):[c+l]})),l=["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 f(e){var t=e.spacing||8;return"number"===typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"===typeof t?t:function(){}}function h(e,t){return function(n){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"===typeof t||null==t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}(t,n),e}),{})}}function d(e){var t=f(e.theme);return Object.keys(e).map((function(n){if(-1===l.indexOf(n))return null;var r=h(c(n),t),o=e[n];return Object(i.a)(e,o,r)})).reduce(o.a,{})}d.propTypes={},d.filterProps=l;t.b=d},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),i=n.n(r);var o=i.a.createContext(null);function a(){return i.a.useContext(o)}}]]);
3//# sourceMappingURL=2.b4d64528.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.