1/*! For license information please see 2.324719fa.chunk.js.LICENSE.txt */ 2(this["webpackJsonpselv-hent-main"]=this["webpackJsonpselv-hent-main"]||[]).push([[2],[function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"h",(function(){return u})),n.d(e,"e",(function(){return c})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return f}));var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function a(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(e){o(e)}}function s(t){try{u(r.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function s(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function u(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(t,e){var n="function"===typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function l(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t}function f(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}},function(t,e,n){"use strict";t.exports=n(89)},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return v})),n.d(e,"b",(function(){return x})),n.d(e,"c",(function(){return N})),n.d(e,"d",(function(){return z})),n.d(e,"e",(function(){return C})),n.d(e,"f",(function(){return s})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return l})),n.d(e,"i",(function(){return f})),n.d(e,"j",(function(){return Z})),n.d(e,"k",(function(){return F})),n.d(e,"l",(function(){return W})),n.d(e,"m",(function(){return d})),n.d(e,"n",(function(){return p})),n.d(e,"o",(function(){return K})),n.d(e,"p",(function(){return m})),n.d(e,"q",(function(){return L})),n.d(e,"r",(function(){return b})),n.d(e,"s",(function(){return w})),n.d(e,"t",(function(){return E})),n.d(e,"u",(function(){return V})),n.d(e,"v",(function(){return O})),n.d(e,"w",(function(){return k})),n.d(e,"x",(function(){return y}
2)),n.d(e,"y",(function(){return g})),n.d(e,"z",(function(){return S})),n.d(e,"A",(function(){return _})),n.d(e,"B",(function(){return T})),n.d(e,"C",(function(){return M})),n.d(e,"D",(function(){return A})),n.d(e,"E",(function(){return B})),n.d(e,"F",(function(){return q})),n.d(e,"G",(function(){return U})),n.d(e,"H",(function(){return J})),n.d(e,"I",(function(){return $})),n.d(e,"J",(function(){return D})),n.d(e,"K",(function(){return Y})),n.d(e,"L",(function(){return Q})),n.d(e,"M",(function(){return X})),n.d(e,"N",(function(){return I}));var r=n(0),i=!1,o=!1,a="${JSCORE_VERSION}",s=function(t,e){if(!t)throw u(e)},u=function(t){return new Error("Firebase Database ("+a+") INTERNAL ASSERT FAILED: "+t)},c=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):55296===(64512&i)&&r+1<t.length&&56320===(64512&t.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&t.charCodeAt(++r)),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e},l={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"===typeof atob,encodeByteArray:function(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<t.length;i+=3){var o=t[i],a=i+1<t.length,s=a?t[i+1]:0,u=i+2<t.length,c=u?t[i+2]:0,l=o>>2,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(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(c(t),e)},decodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):function(t){for(var e=[],n=0,r=0;n<t.length;){var i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){var o=t[n++];e[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){var a=((7&i)<<18|(63&(o=t[n++]))<<12|(63&(s=t[n++]))<<6|63&t[n++])-65536;e[r++]=String.fromCharCode(55296+(a>>10)),e[r++]=String.fromCharCode(56320+(1023&a))}else{o=t[n++];var s=t[n++];e[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray:function(t,e){this.init_();for(var n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<t.length;){var o=n[t.charAt(i++)],a=i<t.length?n[t.charAt(i)]:0,s=++i<t.length?n[t.charAt(i)]:64,u=++i<t.length?n[t.charAt(i)]:64;if(++i,null==o||null==a||null==s||null==u)throw Error();var c=o<<2|a>>4;if(r.push(c),64!==s){var l=a<<4&240|s>>2;if(r.push(l),64!==u){var 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 t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},f=function(t){var e=c(t);return l.encodeByteArray(e,!0)},h=function(t){try{return l.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function d(t){return p(void 0,t)}function p(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:return new Date(e.getTime());case Object:void 0===t&&(t={});break;case Array:t=[];break;default:return e}for(var n in e)e.hasOwnProperty(n)&&"__proto__"!==n&&(t[n]=p(t[n],e[n]));return t}var v=function(){function t(){var t=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))}return t.prototype.wrapCallback=function(t){var e=this;return function(n,r){n?e.reject(n):e.resolve(r),"function"===typeof t&&(e.promise.catch((function(){})),1===t.length?t(n):t(n,r))}},t}();function m(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function y(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(m())}function g(){try{return"[object process]"===Object.prototype.toString.call(t.process)}catch(e){return!1}}function b(){return"object"===typeof self&&self.self===self}function w(){var t="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof t&&void 0!==t.id}function _(){return"object"===typeof navigator&&"ReactNative"===navigator.product}function E(){return m().indexOf("Electron/")>=0}function O(){var t=m();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function T(){return m().indexOf("MSAppHost/")>=0}function S(){return!0===i||!0===o}function k(){return"indexedDB"in self&&null!=indexedDB}function I(){return new Promise((function(t,e){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=window.indexedDB.open(r);i.onsuccess=function(){i.result.close(),n||window.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=function(){n=!1},i.onerror=function(){var t;e((null===(t=i.error)||void 0===t?void 0:t.message)||"")}}catch(o){e(o)}}))}function C(){return!(!navigator||!navigator.cookieEnabled)}var N=function(t){function e(n,r,i){var o=t.call(this,r)||this;return o.code=n,o.customData=i,o.name="FirebaseError",Object.setPrototypeOf(o,e.prototype),Error.captureStackTrace&&Error.captureStackTrace(o,x.prototype.create),o}return Object(r.c)(e,t),e}(Error),x=function(){function t(t,e,n){this.service=t,this.serviceName=e,this.errors=n}return t.prototype.create=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=e[0]||{},i=this.service+"/"+t,o=this.errors[t],a=o?P(o,r):"Error",s=this.serviceName+": "+a+" ("+i+").",u=new N(i,s,r);return u},t}();function P(t,e){return t.replace(j,(function(t,n){var r=e[n];return null!=r?String(r):"<"+n+"?>"}))}var j=/\{\$([^}]+)}/g;function A(t){return JSON.parse(t)}function D(t){return JSON.stringify(t)}var R=function(t){var e={},n={},r={},i="";try{var o=t.split(".");e=A(h(o[0])||""),n=A(h(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(a){}return{header:e,claims:n,data:r,signature:i}},M=function(t){var e=R(t).claims;return!!e&&"object"===typeof e&&e.hasOwnProperty("iat")},L=function(t){var e=R(t).claims;return"object"===typeof e&&!0===e.admin};function F(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function U(t,e){return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0}function V(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function B(t,e,n){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=e.call(n,t[i],i,t));return r}function q(t){for(var e=[],n=function(t,n){Array.isArray(n)?n.forEac
2h((function(n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))})):e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))},r=0,i=Object.entries(t);r<i.length;r++){var o=i[r];n(o[0],o[1])}return e.length?"&"+e.join("&"):""}var z=function(){function t(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var t=1;t<this.blockSize;++t)this.pad_[t]=0;this.reset()}return t.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},t.prototype.compress_=function(t,e){e||(e=0);var n=this.W_;if("string"===typeof t)for(var r=0;r<16;r++)n[r]=t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|t.charCodeAt(e+3),e+=4;else for(r=0;r<16;r++)n[r]=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3],e+=4;for(r=16;r<80;r++){var i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(i<<1|i>>>31)}var o,a,s=this.chain_[0],u=this.chain_[1],c=this.chain_[2],l=this.chain_[3],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},t.prototype.update=function(t,e){if(null!=t){void 0===e&&(e=t.length);for(var n=e-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<e;){if(0===o)for(;r<=n;)this.compress_(t,r),r+=this.blockSize;if("string"===typeof t){for(;r<e;)if(i[o]=t.charCodeAt(r),++r,++o===this.blockSize){this.compress_(i),o=0;break}}else for(;r<e;)if(i[o]=t[r],++r,++o===this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=e}},t.prototype.digest=function(){var t=[],e=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&e,e/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var i=24;i>=0;i-=8)t[r]=this.chain_[n]>>i&255,++r;return t},t}();function W(t,e){var n=new H(t,e);return n.subscribe.bind(n)}var H=function(){function t(t,e){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then((function(){t(n)})).catch((function(t){n.error(t)}))}return t.prototype.next=function(t){this.forEachObserver((function(e){e.next(t)}))},t.prototype.error=function(t){this.forEachObserver((function(e){e.error(t)})),this.close(t)},t.prototype.complete=function(){this.forEachObserver((function(t){t.complete()})),this.close()},t.prototype.subscribe=function(t,e,n){var r,i=this;if(void 0===t&&void 0===e&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(t,e){if("object"!==typeof t||null===t)return!1;for(var n=0,r=e;n<r.length;n++){var i=r[n];if(i in t&&"function"===typeof t[i])return!0}return!1}(t,["next","error","complete"])?t:{next:t,error:e,complete:n}).next&&(r.next=G),void 0===r.error&&(r.error=G),void 0===r.complete&&(r.complete=G);var o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(t){}})),this.observers.push(r),o},t.prototype.unsubscribeOne=function(t){void 0!==this.observers&&void 0!==this.observers[t]&&(delete this.observers[t],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},t.prototype.forEachObserver=function(t){if(!this.finalized)for(var e=0;e<this.observers.length;e++)this.sendOne(e,t)},t.prototype.sendOne=function(t,e){var n=this;this.task.then((function(){if(void 0!==n.observers&&void 0!==n.observers[t])try{e(n.observers[t])}catch(r){"undefined"!==typeof console&&console.error&&console.error(r)}}))},t.prototype.close=function(t){var e=this;this.finalized||(this.finalized=!0,void 0!==t&&(this.finalError=t),this.task.then((function(){e.observers=void 0,e.onNoObservers=void 0})))},t}();function G(){}var Y=function(t,e,n,r){var i;if(r<e?i="at least "+e:r>n&&(i=0===n?"none":"no more than "+n),i)throw new Error(t+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")};function K(t,e,n){var r="";switch(e){case 1:r=n?"first":"First";break;case 2:r=n?"second":"Second";break;case 3:r=n?"third":"Third";break;case 4:r=n?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber > 4. Need to update it?")}var i=t+" failed: ";return i+=r+" argument "}function Q(t,e,n,r){if((!r||n)&&"function"!==typeof n)throw new Error(K(t,e,r)+"must be a valid function.")}function X(t,e,n,r){if((!r||n)&&("object"!==typeof n||null===n))throw new Error(K(t,e,r)+"must be a valid context object.")}var $=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);if(i>=55296&&i<=56319){var o=i-55296;r++,s(r<t.length,"Surrogate pair missing trail surrogate."),i=65536+(o<<10)+(t.charCodeAt(r)-56320)}i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):i<65536?(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e},J=function(t){for(var e=0,n=0;n<t.length;n++){var r=t.charCodeAt(n);
2r<128?e++:r<2048?e+=2:r>=55296&&r<=56319?(e+=4,n++):e+=3}return e};function Z(t,e,n){void 0===e&&(e=1e3),void 0===n&&(n=2);var r=e*Math.pow(n,t),i=Math.round(.5*r*(Math.random()-.5)*2);return Math.min(144e5,r+i)}}).call(this,n(37))},function(t,e,n){t.exports=n(82)()},function(t,e,n){"use strict";t.exports=n(73)},function(t,e,n){"use strict";n.d(e,"n",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"e",(function(){return u})),n.d(e,"k",(function(){return c})),n.d(e,"l",(function(){return l})),n.d(e,"m",(function(){return f})),n.d(e,"q",(function(){return d})),n.d(e,"p",(function(){return v})),n.d(e,"o",(function(){return m})),n.d(e,"c",(function(){return y})),n.d(e,"a",(function(){return g})),n.d(e,"b",(function(){return b})),n.d(e,"j",(function(){return w})),n.d(e,"d",(function(){return _})),n.d(e,"i",(function(){return O})),n.d(e,"h",(function(){return k})),n.d(e,"f",(function(){return I}));var r,i=n(3),o=n.n(i);function a(t){document.body.style.paddingRight=t>0?t+"px":null}function s(){var t=window.getComputedStyle(document.body,null);return parseInt(t&&t.getPropertyValue("padding-right")||0,10)}function u(){var t=function(){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e}(),e=document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")[0],n=e?parseInt(e.style.paddingRight||0,10):0;document.body.clientWidth<window.innerWidth&&a(n+t)}function c(t,e){return void 0===t&&(t=""),void 0===e&&(e=r),e?t.split(" ").map((function(t){return e[t]||t})).join(" "):t}function l(t,e){var n={};return Object.keys(t).forEach((function(r){-1===e.indexOf(r)&&(n[r]=t[r])})),n}function f(t,e){for(var n,r=Array.isArray(e)?e:[e],i=r.length,o={};i>0;)o[n=r[i-=1]]=t[n];return o}var h={};function d(t){h[t]||("undefined"!==typeof console&&console.error(t),h[t]=!0)}var p="object"===typeof window&&window.Element||function(){};var v=o.a.oneOfType([o.a.string,o.a.func,function(t,e,n){if(!(t[e]instanceof p))return new Error("Invalid prop `"+e+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")},o.a.shape({current:o.a.any})]),m=o.a.oneOfType([o.a.func,o.a.string,o.a.shape({$$typeof:o.a.symbol,render:o.a.func}),o.a.arrayOf(o.a.oneOfType([o.a.func,o.a.string,o.a.shape({$$typeof:o.a.symbol,render:o.a.func})]))]),y={Fade:150,Collapse:350,Modal:300,Carousel:600},g=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],b={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},w={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},_=!("undefined"===typeof window||!window.document||!window.document.createElement);function E(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}function O(t){var e=typeof t;return null!=t&&("object"===e||"function"===e)}function T(t){if(function(t){return!(!t||"object"!==typeof t)&&"current"in t}(t))return t.current;if(function(t){if(!O(t))return!1;var e=E(t);return"[object Function]"===e||"[object AsyncFunction]"===e||"[object GeneratorFunction]"===e||"[object Proxy]"===e}(t))return t();if("string"===typeof t&&_){var e=document.querySelectorAll(t);if(e.length||(e=document.querySelectorAll("#"+t)),!e.length)throw new Error("The target '"+t+"' could not be identified in the dom, tip: check spelling");return e}return t}function S(t){return null!==t&&(Array.isArray(t)||_&&"number"===typeof t.length)}function k(t,e){var n=T(t);return e?S(n)?n:null===n?[]:[n]:S(n)?n[0]:n}var I=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])']},function(t,e,n){"use strict";var r,i,o=n(0),a=n(2),s=n(14),u=n(13),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.b("app","Firebase",c),f="@firebase/app",h="[DEFAULT]",d=((i={})[f]="fire-core",i["@firebase/analytics"]="fire-analytics",i["@firebase/auth"]="fire-auth",i["@firebase/database"]="fire-rtdb",i["@firebase/functions"]="fire-fn",i["@firebase/installations"]="fire-iid",i["@firebase/messaging"]="fire-fcm",i["@firebase/performance"]="fire-perf",i["@firebase/remote-config"]="fire-rc",i["@firebase/storage"]="fire-gcs",i["@firebase/firestore"]="fire-fst",i["fire-js"]="fire-js",i["firebase-wrapper"]="fire-js-all",i),p=new u.b("@firebase/app"),v=function(){function t(t,e,n){var r=this;this.firebase_=n,this.isDeleted_=!1,this.name_=e.name,this.automaticDataCollectionEnabled_=e.automaticDataCollectionEnabled||!1,this.options_=Object(a.m)(t),this.container=new s.b(e.name),this._addComponent(new s.a("app",(function(){return r}),"PUBLIC")),this.firebase_.INTERNAL.components.forEach((function(t){return r._addComponent(t)}))}return Object.defineProperty(t.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(t){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!1,configurable:!0}),t.prototype.delete=function(){var t=this;return new Promise((function(e){t.checkDestroyed_(),e()})).then((function(){return t.firebase_.INTERNAL.removeApp(t.name_),Promise.all(t.container.getProviders().map((function(t){return t.delete()})))})).then((function(){t.isDeleted_=!0}))},t.prototype._getService=function(t,e){return void 0===e&&(e=h),this.checkDestroyed_(),this.container.getProvider(t).getImmediate({identifier:e})},t.prototype._removeServiceInstance=function(t,e){void 0===e&&(e=h),this.container.getProvider(t).clearInstance(e)},t.prototype._addComponent=function(t){try{this.container.addComponent(t)}catch(e){p.debug("Component "+t.name+" failed to register with FirebaseApp "+this.name,e)}},t.prototype._addOrOverwriteComponent=function(t){this.container.addOrOverwriteComponent(t)},t.prototype.toJSON=function(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}},t.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw l.create("app-deleted",{appName:this.name_})},t}();v.prototype.name&&v.prototype.options||v.prototype.delete||console.log("dc");var m=function t(){var e=function(t){var e={},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)});
2if(Object(a.k)(e,s))throw l.create("duplicate-app",{appName:s});var u=new t(n,o,r);return e[s]=u,u},app:i,registerVersion:function(t,e,n){var r,i=null!==(r=d[t])&&void 0!==r?r:t;n&&(i+="-"+n);var a=i.match(/\s|\//),u=e.match(/\s|\//);if(a||u){var c=['Unable to register library "'+i+'" with version "'+e+'":'];return a&&c.push('library name "'+i+'" contains illegal characters (whitespace or "/")'),a&&u&&c.push("and"),u&&c.push('version name "'+e+'" contains illegal characters (whitespace or "/")'),void p.warn(c.join(" "))}o(new s.a(i+"-version",(function(){return{library:i,version:e}}),"VERSION"))},setLogLevel:u.c,onLog:function(t,e){if(null!==t&&"function"!==typeof t)throw l.create("invalid-log-argument");Object(u.d)(t,e)},apps:null,SDK_VERSION:"8.2.9",INTERNAL:{registerComponent:o,removeApp:function(t){delete e[t]},components:n,useAsService:function(t,e){return"serverAuth"===e?null:e}}};function i(t){if(t=t||h,!Object(a.k)(e,t))throw l.create("no-app",{appName:t});return e[t]}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(t){if(void 0===t&&(t=i()),"function"!==typeof t[s])throw l.create("invalid-app-argument",{appName:s});return t[s]()};void 0!==o.serviceProps&&Object(a.n)(u,o.serviceProps),r[s]=u,t.prototype[s]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._getService.bind(this,s).apply(this,o.multipleInstances?t:[])}}for(var c=0,f=Object.keys(e);c<f.length;c++){var h=f[c];e[h]._addComponent(o)}return"PUBLIC"===o.type?r[s]:null}return r.default=r,Object.defineProperty(r,"apps",{get:function(){return Object.keys(e).map((function(t){return e[t]}))}}),i.App=t,r}(v);return e.INTERNAL=Object(o.a)(Object(o.a)({},e.INTERNAL),{createFirebaseNamespace:t,extendNamespace:function(t){Object(a.n)(e,t)},createSubscribe:a.l,ErrorFactory:a.b,deepExtend:a.n}),e}(),y=function(){function t(t){this.container=t}return t.prototype.getPlatformInfoString=function(){return this.container.getProviders().map((function(t){if(function(t){var e=t.getComponent();return"VERSION"===(null===e||void 0===e?void 0:e.type)}(t)){var e=t.getImmediate();return e.library+"/"+e.version}return null})).filter((function(t){return t})).join(" ")},t}();if(Object(a.r)()&&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 g=self.firebase.SDK_VERSION;g&&g.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=m.initializeApp;m.initializeApp=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Object(a.y)()&&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,t)};var w=m;!function(t,e){t.INTERNAL.registerComponent(new s.a("platform-logger",(function(t){return new y(t)}),"PRIVATE")),t.registerVersion(f,"0.6.15",e),t.registerVersion("fire-js","")}(w),e.a=w},function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}n.d(e,"a",(function(){return r}))},function(t,e,n){t.exports=n(85)},function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}
2));var r=n(22);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){Object(r.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f})),n.d(e,"b",(function(){return y}));var r=n(19),i=n(15),o=n(4),a=n.n(o),s=n(30),u=(n(3),n(7)),c=n(9),l=n(29),f=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).history=Object(s.a)(e.props),e}return Object(i.a)(e,t),e.prototype.render=function(){return a.a.createElement(r.c,{history:this.history,children:this.props.children})},e}(a.a.Component);a.a.Component;var h=function(t,e){return"function"===typeof t?t(e):t},d=function(t,e){return"string"===typeof t?Object(s.c)(t,null,null,e):t},p=function(t){return t},v=a.a.forwardRef;"undefined"===typeof v&&(v=p);var m=v((function(t,e){var n=t.innerRef,r=t.navigate,i=t.onClick,o=Object(c.a)(t,["innerRef","navigate","onClick"]),s=o.target,l=Object(u.a)({},o,{onClick:function(t){try{i&&i(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||s&&"_self"!==s||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),r())}});return l.ref=p!==v&&e||n,a.a.createElement("a",l)}));var y=v((function(t,e){var n=t.component,i=void 0===n?m:n,o=t.replace,s=t.to,f=t.innerRef,y=Object(c.a)(t,["component","replace","to","innerRef"]);return a.a.createElement(r.e.Consumer,null,(function(t){t||Object(l.a)(!1);var n=t.history,r=d(h(s,t.location),t.location),c=r?n.createHref(r):"",m=Object(u.a)({},y,{href:c,navigate:function(){var e=h(s,t.location);(o?n.replace:n.push)(e)}});return p!==v?m.ref=e||f:m.innerRef=f,a.a.createElement(i,m)}))})),g=function(t){return t},b=a.a.forwardRef;"undefined"===typeof b&&(b=g);b((function(t,e){var n=t["aria-current"],i=void 0===n?"page":n,o=t.activeClassName,s=void 0===o?"active":o,f=t.activeStyle,p=t.className,v=t.exact,m=t.isActive,w=t.location,_=t.sensitive,E=t.strict,O=t.style,T=t.to,S=t.innerRef,k=Object(c.a)(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return a.a.createElement(r.e.Consumer,null,(function(t){t||Object(l.a)(!1);var n=w||t.location,o=d(h(T,n),n),c=o.pathname,I=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),C=I?Object(r.f)(n.pathname,{path:I,exact:v,sensitive:_,strict:E}):null,N=!!(m?m(C,n):C),x=N?function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.filter((function(t){return t})).join(" ")}(p,s):p,P=N?Object(u.a)({},O,{},f):O,j=Object(u.a)({"aria-current":N&&i||null,className:x,style:P,to:o},k);return g!==b?j.ref=e||S:j.innerRef=S,a.a.createElement(y,j)}))}))},function(t,e,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var o=typeof r;if("string"===o||"number"===o)t.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&t.push(a)}else if("object"===o)for(var s in r)n.call(r,s)&&r[s]&&t.push(s)}}return t.join(" ")}t.exports?(i.default=i,t.exports=i):void 0===(r=function(){return i}.apply(e,[]))||(t.exports=r)}()},function(t,e,n){"use strict";function r(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var i;n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return f})),n.d(e,"c",(function(){return h})),n.d(e,"d",(function(){return d}));var o,a=[];!function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"}(o||(o={}));var s={debug:o.DEBUG,verbose:o.VERBOSE,info:o.INFO,warn:o.WARN,error:o.ERROR,silent:o.SILENT},u=o.INFO,c=((i={})[o.DEBUG]="log",i[o.VERBOSE]="log",i[o.INFO]="info",i[o.WARN]="warn",i[o.ERROR]="error",i),l=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(!(e<t.logLevel)){var o=(new Date).toISOString(),a=c[e];if(!a)throw new Error("Attempted to log a message with an invali
2d logType (value: "+e+")");console[a].apply(console,r(["["+o+"] "+t.name+":"],n))}},f=function(){function t(t){this.name=t,this._logLevel=u,this._logHandler=l,this._userLogHandler=null,a.push(this)}return Object.defineProperty(t.prototype,"logLevel",{get:function(){return this._logLevel},set:function(t){if(!(t in o))throw new TypeError('Invalid value "'+t+'" assigned to `logLevel`');this._logLevel=t},enumerable:!1,configurable:!0}),t.prototype.setLogLevel=function(t){this._logLevel="string"===typeof t?s[t]:t},Object.defineProperty(t.prototype,"logHandler",{get:function(){return this._logHandler},set:function(t){if("function"!==typeof t)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(t){this._userLogHandler=t},enumerable:!1,configurable:!0}),t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.DEBUG],t)),this._logHandler.apply(this,r([this,o.DEBUG],t))},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.VERBOSE],t)),this._logHandler.apply(this,r([this,o.VERBOSE],t))},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.INFO],t)),this._logHandler.apply(this,r([this,o.INFO],t))},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.WARN],t)),this._logHandler.apply(this,r([this,o.WARN],t))},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.ERROR],t)),this._logHandler.apply(this,r([this,o.ERROR],t))},t}();function h(t){a.forEach((function(e){e.setLogLevel(t)}))}function d(t,e){for(var n=function(n){var r=null;e&&e.level&&(r=s[e.level]),n.userLogHandler=null===t?null:function(e,n){for(var i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=i.map((function(t){if(null==t)return null;if("string"===typeof t)return t;if("number"===typeof t||"boolean"===typeof t)return t.toString();if(t instanceof Error)return t.message;try{return JSON.stringify(t)}catch(e){return null}})).filter((function(t){return t})).join(" ");n>=(null!==r&&void 0!==r?r:e.logLevel)&&t({level:o[n].toLowerCase(),message:s,args:i,type:e.name})}},r=0,i=a;r<i.length;r++){n(i[r])}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return s}));var r=n(0),i=n(2),o=function(){function t(t,e,n){this.name=t,this.instanceFactory=e,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY"}return t.prototype.setInstantiationMode=function(t){return this.instantiationMode=t,this},t.prototype.setMultipleInstances=function(t){return this.multipleInstances=t,this},t.prototype.setServiceProps=function(t){return this.serviceProps=t,this},t}(),a="[DEFAULT]",s=function(){function t(t,e){this.name=t,this.container=e,this.component=null,this.instances=new Map,this.instancesDeferred=new Map}return t.prototype.get=function(t){void 0===t&&(t=a);var e=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(e)){var n=new i.a;this.instancesDeferred.set(e,n);try{var r=this.getOrInitializeService(e);r&&n.resolve(r)}catch(o){}}return this.instancesDeferred.get(e).promise},t.prototype.getImmediate=function(t){var e=Object(r.a)({identifier:a,optional:!1},t),n=e.identifier,i=e.optional,o=this.normalizeInstanceIdentifier(n);try{var s=this.getOrInitializeService(o);if(!s){if(i)return null;throw Error("Service "+this.name+" is not available")}return s}catch(u){if(i)return null;throw u}},t.prototype.getComponent=function(){return this.component},t.prototype.setComponent=function(t){var e,n;if(t.name!==this.name)throw Error("Mismatching Component "+t.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");
2if(this.component=t,function(t){return"EAGER"===t.instantiationMode}(t))try{this.getOrInitializeService(a)}catch(h){}try{for(var i=Object(r.h)(this.instancesDeferred.entries()),o=i.next();!o.done;o=i.next()){var s=Object(r.e)(o.value,2),u=s[0],c=s[1],l=this.normalizeInstanceIdentifier(u);try{var f=this.getOrInitializeService(l);c.resolve(f)}catch(h){}}}catch(d){e={error:d}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}},t.prototype.clearInstance=function(t){void 0===t&&(t=a),this.instancesDeferred.delete(t),this.instances.delete(t)},t.prototype.delete=function(){return Object(r.b)(this,void 0,void 0,(function(){var t;return Object(r.d)(this,(function(e){switch(e.label){case 0:return t=Array.from(this.instances.values()),[4,Promise.all(Object(r.f)(t.filter((function(t){return"INTERNAL"in t})).map((function(t){return t.INTERNAL.delete()})),t.filter((function(t){return"_delete"in t})).map((function(t){return t._delete()}))))];case 1:return e.sent(),[2]}}))}))},t.prototype.isComponentSet=function(){return null!=this.component},t.prototype.isInitialized=function(t){return void 0===t&&(t=a),this.instances.has(t)},t.prototype.getOrInitializeService=function(t){var e=this.instances.get(t);return!e&&this.component&&(e=this.component.instanceFactory(this.container,function(t){return t===a?void 0:t}(t)),this.instances.set(t,e)),e||null},t.prototype.normalizeInstanceIdentifier=function(t){return this.component?this.component.multipleInstances?t:a:t},t}();var u=function(){function t(t){this.name=t,this.providers=new Map}return t.prototype.addComponent=function(t){var e=this.getProvider(t.name);if(e.isComponentSet())throw new Error("Component "+t.name+" has already been registered with "+this.name);e.setComponent(t)},t.prototype.addOrOverwriteComponent=function(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)},t.prototype.getProvider=function(t){if(this.providers.has(t))return this.providers.get(t);var e=new s(t,this);return this.providers.set(t,e),e},t.prototype.getProviders=function(){return Array.from(this.providers.values())},t}()},function(t,e,n){"use strict";function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function r(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(c){return void n(c)}s.done?e(u):Promise.resolve(u).then(r,i)}function i(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var a=t.apply(e,n);function s(t){r(a,i,o,s,u,"next",t)}function u(t){r(a,i,o,s,u,"throw",t)}s(void 0)}))}}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return vc})),n.d(e,"b",(function(){return yc})),n.d(e,"c",(function(){return D})),n.d(e,"d",(function(){return cc})),n.d(e,"e",(function(){return fc})),n.d(e,"f",(function(){return lc})),n.d(e,"g",(function(){return dc})),n.d(e,"h",(function(){return Tu})),n.d(e,"i",(function(){return Ou})),n.d(e,"j",(function(){return As})),n.d(e,"k",(function(){return _c})),n.d(e,"l",(function(){return xc})),n.d(e,"m",(function(){return Nc})),n.d(e,"n",(function(){return Oc})),n.d(e,"o",(function(){return kc})),n.d(e,"p",(function(){return pc})),n.d(e,"q",(function(){return Cc})),n.d(e,"r",(function(){return Sc})),n.d(e,"s",(function(){return Ec})),n.d(e,"t",(function(){return Pc}));var r=n(13),i=n(2),o=n(23),a=n(0),s=function(t,e,n,r,i,o){this.t=t,this.persistenceKey=e,this.host=n,this.ssl=r,this.forceLongPolling=i,this.i=o},u=function(){function t(t,e){this.projectId=t,this.database=e||"(default)"}return Object.defineProperty(t.prototype,"o",{get:function(){return"(default)"===this.database},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return e instanceof t&&e.projectId===this.projectId&&e.database===this.database},t}(),c=new r.b("@firebase/firestore");function l(){return c.logLevel}function f(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(c.logLevel<=r.a.DEBUG){var i=e.map(p);c.debug.apply(c,Object(a.g)(["Firestore (8.2.9): "+t],i))}}function h(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(c.logLevel<=r.a.ERROR){var i=e.map(p);c.error.apply(c,Object(a.g)(["Firestore (8.2.9): "+t],i))}}function d(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(c.logLevel<=r.a.WARN){var i=e.map(p);c.warn.apply(c,Object(a.g)(["Firestore (8.2.9): "+t],i))}}function p(t){if("string"==typeof t)return t;try{return e=t,JSON.stringify(e)}catch(e){return t}var e}function v(t){void 0===t&&(t="Unexpected state");var e="FIRESTORE (8.2.9) INTERNAL ASSERTION FAILED: "+t;throw h(e),new Error(e)}function m(t,e){t||v()}function y(t,e){return t}function g(t){var e="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&&"function"==typeof e.getRandomValues)e.getRandomValues(n);else for(var r=0;r<t;
2r++)n[r]=Math.floor(256*Math.random());return n}var b=function(){function t(){}return t.u=function(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e=Math.floor(256/t.length)*t.length,n="";n.length<20;)for(var r=g(40),i=0;i<r.length;++i)n.length<20&&r[i]<e&&(n+=t.charAt(r[i]%t.length));return n},t}();function w(t,e){return t<e?-1:t>e?1:0}function _(t,e,n){return t.length===e.length&&t.every((function(t,r){return n(t,e[r])}))}function E(t){return t+"\0"}var O=function(){function t(t){this.h=t}return t.fromBase64String=function(e){return new t(atob(e))},t.fromUint8Array=function(e){return new t(function(t){for(var e="",n=0;n<t.length;++n)e+=String.fromCharCode(t[n]);return e}(e))},t.prototype.toBase64=function(){return t=this.h,btoa(t);var t},t.prototype.toUint8Array=function(){return function(t){for(var e=new Uint8Array(t.length),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}(this.h)},t.prototype.l=function(){return 2*this.h.length},t.prototype._=function(t){return w(this.h,t.h)},t.prototype.isEqual=function(t){return this.h===t.h},t}();O.T=new O("");var T={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"},S=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).code=e,r.message=n,r.name="FirebaseError",r.toString=function(){return r.name+": [code="+r.code+"]: "+r.message},r}return Object(a.c)(e,t),e}(Error),k=function(){function t(t){this.I=t}return t.fromBase64String=function(e){try{return new t(O.fromBase64String(e))}catch(e){throw new S(T.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}},t.fromUint8Array=function(e){return new t(O.fromUint8Array(e))},t.prototype.toBase64=function(){return this.I.toBase64()},t.prototype.toUint8Array=function(){return this.I.toUint8Array()},t.prototype.toString=function(){return"Bytes(base64: "+this.toBase64()+")"},t.prototype.isEqual=function(t){return this.I.isEqual(t.I)},t}(),I=function(){function t(t){this.uid=t}return t.prototype.m=function(){return null!=this.uid},t.prototype.A=function(){return this.m()?"uid:"+this.uid:"anonymous-user"},t.prototype.isEqual=function(t){return t.uid===this.uid},t}();I.UNAUTHENTICATED=new I(null),I.R=new I("google-credentials-uid"),I.P=new I("first-party-uid");var C=function(t,e){this.user=e,this.type="OAuth",this.g={},this.g.Authorization="Bearer "+t},N=function(){function t(){this.V=null}return t.prototype.getToken=function(){return Promise.resolve(null)},t.prototype.p=function(){},t.prototype.v=function(t){this.V=t,t(I.UNAUTHENTICATED)},t.prototype.S=function(){this.V=null},t}(),x=function(){function t(t){var e=this;this.D=null,this.currentUser=I.UNAUTHENTICATED,this.C=!1,this.N=0,this.V=null,this.forceRefresh=!1,this.D=function(){e.N++,e.currentUser=e.$(),e.C=!0,e.V&&e.V(e.currentUser)},this.N=0,this.auth=t.getImmediate({optional:!0}),this.auth?this.auth.addAuthTokenListener(this.D):(this.D(null),t.get().then((function(t){e.auth=t,e.D&&e.auth.addAuthTokenListener(e.D)}),(function(){})))}return t.prototype.getToken=function(){var t=this,e=this.N,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((function(n){return t.N!==e?(f("FirebaseCredentialsProvider","getToken aborted due to token change."),t.getToken()):n?(m("string"==typeof n.accessToken),new C(n.accessToken,t.currentUser)):null})):Promise.resolve(null)},t.prototype.p=function(){this.forceRefresh=!0},t.prototype.v=function(t){this.V=t,this.C&&t(this.currentUser)},t.prototype.S=function(){this.auth&&this.auth.removeAuthTokenListener(this.D),this.D=null,this.V=null},t.prototype.$=function(){var t=this.auth&&this.auth.getUid();return m(null===t||"string"==typeof t),new I(t)},t}(),P=function(){function t(t,e){this.F=t,this.O=e,this.type="FirstParty",this.user=I.P}return Object.defineProperty(t.prototype,"g",{get:function(){var t={"X-Goog-AuthUser":this.O},e=this.F.auth.getAuthHeaderValueForFirstParty([]);return e&&(t.Authorization=e),t}
2,enumerable:!1,configurable:!0}),t}(),j=function(){function t(t,e){this.F=t,this.O=e}return t.prototype.getToken=function(){return Promise.resolve(new P(this.F,this.O))},t.prototype.v=function(t){t(I.P)},t.prototype.S=function(){},t.prototype.p=function(){},t}(),A=function(){function t(t,e){var n=this;this.previousValue=t,e&&(e.k=function(t){return n.M(t)},this.L=function(t){return e.B(t)})}return t.prototype.M=function(t){return this.previousValue=Math.max(t,this.previousValue),this.previousValue},t.prototype.next=function(){var t=++this.previousValue;return this.L&&this.L(t),t},t}();A.q=-1;var D=function(){function t(t,e){if(this.seconds=t,this.nanoseconds=e,e<0)throw new S(T.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e>=1e9)throw new S(T.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(t<-62135596800)throw new S(T.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new S(T.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return t.now=function(){return t.fromMillis(Date.now())},t.fromDate=function(e){return t.fromMillis(e.getTime())},t.fromMillis=function(e){var n=Math.floor(e/1e3);return new t(n,1e6*(e-1e3*n))},t.prototype.toDate=function(){return new Date(this.toMillis())},t.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},t.prototype.U=function(t){return this.seconds===t.seconds?w(this.nanoseconds,t.nanoseconds):w(this.seconds,t.seconds)},t.prototype.isEqual=function(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds},t.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},t.prototype.toJSON=function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}},t.prototype.valueOf=function(){var t=this.seconds- -62135596800;return String(t).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")},t}(),R=function(){function t(t){this.timestamp=t}return t.K=function(e){return new t(e)},t.min=function(){return new t(new D(0,0))},t.prototype._=function(t){return this.timestamp.U(t.timestamp)},t.prototype.isEqual=function(t){return this.timestamp.isEqual(t.timestamp)},t.prototype.W=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},t.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},t.prototype.j=function(){return this.timestamp},t}(),M=function(){function t(t,e,n){void 0===e?e=0:e>t.length&&v(),void 0===n?n=t.length-e:n>t.length-e&&v(),this.segments=t,this.offset=e,this.G=n}return Object.defineProperty(t.prototype,"length",{get:function(){return this.G},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return 0===t.H(this,e)},t.prototype.child=function(e){var n=this.segments.slice(this.offset,this.limit());return e instanceof t?e.forEach((function(t){n.push(t)})):n.push(e),this.J(n)},t.prototype.limit=function(){return this.offset+this.length},t.prototype.Y=function(t){return t=void 0===t?1:t,this.J(this.segments,this.offset+t,this.length-t)},t.prototype.X=function(){return this.J(this.segments,this.offset,this.length-1)},t.prototype.Z=function(){return this.segments[this.offset]},t.prototype.tt=function(){return this.get(this.length-1)},t.prototype.get=function(t){return this.segments[this.offset+t]},t.prototype.et=function(){return 0===this.length},t.prototype.nt=function(t){if(t.length<this.length)return!1;for(var e=0;e<this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},t.prototype.st=function(t){if(this.length+1!==t.length)return!1;for(var e=0;e<this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},t.prototype.forEach=function(t){for(var e=this.offset,n=this.limit();e<n;e++)t(this.segments[e])},t.prototype.it=function(){return this.segments.slice(this.offset,this.limit())},t.H=function(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++){var i=t.get(r),o=e.get(r);if(i<o)return-1;if(i>o)return 1}return t.length<e.length?-1:t.length>e.length?1:0},t}(),L=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.J=function(t,n,r){return new e(t,n,r)},e.prototype.rt=function(){return this.it().join("/")},e.prototype.toString=function(){return this.rt()},e.ot=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=[],i=0,o=t;i<o.length;i++){var a=o[i];if(a.indexOf("//")>=0)throw new S(T.INVALID_ARGUMENT,"Invalid segment ("+a+"). Paths must not contain // in them.");r.push.apply(r,a.split("/").filter((function(t){return t.length>0})))}return new e(r)},e.ct=function(){return new e([])},e}(M),F=/^[_a-zA-Z][_a-zA-Z0-9]*$/,U=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.J=function(t,n,r){return new e(t,n,r)},e.at=function(t){return F.test(t)},e.prototype.rt=function(){return this.it().map((function(t){return t=t.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),e.at(t)||(t="`"+t+"`"),t})).join(".")},e.prototype.toString=function(){return this.rt()},e.prototype.ut=function(){return 1===this.length&&"__name__"===this.get(0)},e.ht=function(){return new e(["__name__"])},e.lt=function(t){for(var n=[],r="",i=0,o=function(){if(0===r.length)throw new S(T.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");n.push(r),r=""},a=!1;i<t.length;){var s=t[i];if("\\"===s){if(i+1===t.length)throw new S(T.INVALID_ARGUMENT,"Path has trailing escape character: "+t);var u=t[i+1];if("\\"!==u&&"."!==u&&"`"!==u)throw new S(T.INVALID_ARGUMENT,"Path has invali
2d escape sequence: "+t);r+=u,i+=2}else"`"===s?(a=!a,i++):"."!==s||a?(r+=s,i++):(o(),i++)}if(o(),a)throw new S(T.INVALID_ARGUMENT,"Unterminated ` in path: "+t);return new e(n)},e.ct=function(){return new e([])},e}(M),V=function(){function t(t){this.path=t}return t._t=function(e){return new t(L.ot(e))},t.ft=function(e){return new t(L.ot(e).Y(5))},t.prototype.dt=function(t){return this.path.length>=2&&this.path.get(this.path.length-2)===t},t.prototype.isEqual=function(t){return null!==t&&0===L.H(this.path,t.path)},t.prototype.toString=function(){return this.path.toString()},t.H=function(t,e){return L.H(t.path,e.path)},t.wt=function(t){return t.length%2==0},t.Et=function(e){return new t(new L(e.slice()))},t}();function B(t){var e=0;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function q(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function z(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}var W=function(){function t(t){this.fields=t,t.sort(U.H)}return t.prototype.Tt=function(t){for(var e=0,n=this.fields;e<n.length;e++)if(n[e].nt(t))return!0;return!1},t.prototype.isEqual=function(t){return _(this.fields,t.fields,(function(t,e){return t.isEqual(e)}))},t}(),H=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function G(t){if(m(!!t),"string"==typeof t){var e=0,n=H.exec(t);if(m(!!n),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),e=Number(r)}var i=new Date(t);return{seconds:Math.floor(i.getTime()/1e3),nanos:e}}return{seconds:Y(t.seconds),nanos:Y(t.nanos)}}function Y(t){return"number"==typeof t?t:"string"==typeof t?Number(t):0}function K(t){return"string"==typeof t?O.fromBase64String(t):O.fromUint8Array(t)}function Q(t){var e,n;return"server_timestamp"===(null===(n=((null===(e=null==t?void 0:t.mapValue)||void 0===e?void 0:e.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function X(t){var e=t.mapValue.fields.__previous_value__;return Q(e)?X(e):e}function $(t){var e=G(t.mapValue.fields.__local_write_time__.timestampValue);return new D(e.seconds,e.nanos)}function J(t){return null==t}function Z(t){return 0===t&&1/t==-1/0}function tt(t){return"number"==typeof t&&Number.isInteger(t)&&!Z(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}function et(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?Q(t)?4:10:v()}function nt(t,e){var n=et(t);if(n!==et(e))return!1;switch(n){case 0:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return $(t).isEqual($(e));case 3:return function(t,e){if("string"==typeof t.timestampValue&&"string"==typeof e.timestampValue&&t.timestampValue.length===e.timestampValue.length)return t.timestampValue===e.timestampValue;var n=G(t.timestampValue),r=G(e.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(t,e){return K(t.bytesValue).isEqual(K(e.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(t,e){return Y(t.geoPointValue.latitude)===Y(e.geoPointValue.latitude)&&Y(t.geoPointValue.longitude)===Y(e.geoPointValue.longitude)}(t,e);case 2:return function(t,e){if("integerValue"in t&&"integerValue"in e)return Y(t.integerValue)===Y(e.integerValue);if("doubleValue"in t&&"doubleValue"in e){var n=Y(t.doubleValue),r=Y(e.doubleValue);return n===r?Z(n)===Z(r):isNaN(n)&&isNaN(r)}return!1}(t,e);case 9:return _(t.arrayValue.values||[],e.arrayValue.values||[],nt);case 10:return function(t,e){var n=t.mapValue.fields||{},r=e.mapValue.fields||{};if(B(n)!==B(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!nt(n[i],r[i])))return!1;return!0}(t,e);default:return v()}}function rt(t,e){return void 0!==(t.values||[]).find((function(t){return nt(t,e)}))}function it(t,e){var n=et(t),r=et(e);if(n!==r)return w(n,r);switch(n){case 0:return 0;case 1:return w(t.booleanValue,e.booleanValue);case 2:return function(t,e){var n=Y(t.integerValue||t.doubleValue),r=Y(e.integerValue||e.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(t,e);case 3:return ot(t.timestampValue,e.timestampValue);case 4:return ot($(t),$(e));case 5:return w(t.stringValue,e.stringValue);case 6:return function(t,e){var n=K(t),r=K(e);return n._(r)}(t.bytesValue,e.bytesValue);case 7:return function(t,e){for(var n=t.split("/"),r=e.split("/"),i=0;i<n.length&&i<r.length;i++){var o=w(n[i],r[i]);if(0!==o)return o}return w(n.length,r.length)}(t.referenceValue,e.referenceValue);case 8:return function(t,e){var n=w(Y(t.latitude),Y(e.latitude));return 0!==n?n:w(Y(t.longitude),Y(e.longitude))}(t.geoPointValue,e.geoPointValue);case 9:return function(t,e){for(var n=t.values||[],r=e.values||[],i=0;i<n.length&&i<r.length;++i){var o=it(n[i],r[i]);if(o)return o}return w(n.length,r.length)}(t.arrayValue,e.arrayValue);case 10:return function(t,e){var n=t.fields||{},r=Object.keys(n),i=e.fields||{},o=Object.keys(i);r.sort(),o.sort();for(var a=0;a<r.length&&a<o.length;++a){var s=w(r[a],o[a]);if(0!==s)return s;var u=it(n[r[a]],i[o[a]]);if(0!==u)return u}return w(r.length,o.length)}(t.mapValue,e.mapValue);default:throw v()}}function ot(t,e){if("string"==typeof t&&"string"==typeof e&&t.length===e.length)return w(t,e);var n=G(t),r=G(e),i=w(n.seconds,r.seconds);return 0!==i?i:w(n.nanos,r.nanos)}function at(t){return st(t)}function st(t){return"nullValue"in t?"null":"booleanValue"in t?""+t.booleanValue:"integerValue"in t?""+t.integerValue:"doubleValue"in t?""+t.doubleValue:"timestampValue"in t?function(t){var e=G
2(t);return"time("+e.seconds+","+e.nanos+")"}(t.timestampValue):"stringValue"in t?t.stringValue:"bytesValue"in t?K(t.bytesValue).toBase64():"referenceValue"in t?(n=t.referenceValue,V.ft(n).toString()):"geoPointValue"in t?"geo("+(e=t.geoPointValue).latitude+","+e.longitude+")":"arrayValue"in t?function(t){for(var e="[",n=!0,r=0,i=t.values||[];r<i.length;r++)n?n=!1:e+=",",e+=st(i[r]);return e+"]"}(t.arrayValue):"mapValue"in t?function(t){for(var e="{",n=!0,r=0,i=Object.keys(t.fields||{}).sort();r<i.length;r++){var o=i[r];n?n=!1:e+=",",e+=o+":"+st(t.fields[o])}return e+"}"}(t.mapValue):v();var e,n}function ut(t,e){return{referenceValue:"projects/"+t.projectId+"/databases/"+t.database+"/documents/"+e.path.rt()}}function ct(t){return!!t&&"integerValue"in t}function lt(t){return!!t&&"arrayValue"in t}function ft(t){return!!t&&"nullValue"in t}function ht(t){return!!t&&"doubleValue"in t&&isNaN(Number(t.doubleValue))}function dt(t){return!!t&&"mapValue"in t}var pt=function(){function t(t){this.proto=t}return t.empty=function(){return new t({mapValue:{}})},t.prototype.field=function(t){if(t.et())return this.proto;for(var e=this.proto,n=0;n<t.length-1;++n){if(!e.mapValue.fields)return null;if(!dt(e=e.mapValue.fields[t.get(n)]))return null}return(e=(e.mapValue.fields||{})[t.tt()])||null},t.prototype.isEqual=function(t){return nt(this.proto,t.proto)},t}(),vt=function(){function t(t){void 0===t&&(t=pt.empty()),this.It=t,this.At=new Map}return t.prototype.set=function(t,e){return this.Rt(t,e),this},t.prototype.delete=function(t){return this.Rt(t,null),this},t.prototype.Rt=function(t,e){for(var n=this.At,r=0;r<t.length-1;++r){var i=t.get(r),o=n.get(i);o instanceof Map?n=o:o&&10===et(o)?(o=new Map(Object.entries(o.mapValue.fields||{})),n.set(i,o),n=o):(o=new Map,n.set(i,o),n=o)}n.set(t.tt(),e)},t.prototype.Pt=function(){var t=this.yt(U.ct(),this.At);return null!=t?new pt(t):this.It},t.prototype.yt=function(t,e){var n=this,r=!1,i=this.It.field(t),o=dt(i)?Object.assign({},i.mapValue.fields):{};return e.forEach((function(e,i){if(e instanceof Map){var a=n.yt(t.child(i),e);null!=a&&(o[i]=a,r=!0)}else null!==e?(o[i]=e,r=!0):o.hasOwnProperty(i)&&(delete o[i],r=!0)})),r?{mapValue:{fields:o}}:null},t}();function mt(t){var e=[];return q(t.fields||{},(function(t,n){var r=new U([t]);if(dt(n)){var i=mt(n.mapValue).fields;if(0===i.length)e.push(r);else for(var o=0,a=i;o<a.length;o++){var s=a[o];e.push(r.child(s))}}else e.push(r)})),new W(e)}var yt=function(t,e){this.key=t,this.version=e},gt=function(t){function e(e,n,r,i){var o=this;return(o=t.call(this,e,n)||this).gt=r,o.Vt=!!i.Vt,o.hasCommittedMutations=!!i.hasCommittedMutations,o}return Object(a.c)(e,t),e.prototype.field=function(t){return this.gt.field(t)},e.prototype.data=function(){return this.gt},e.prototype.bt=function(){return this.gt.proto},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.Vt===t.Vt&&this.hasCommittedMutations===t.hasCommittedMutations&&this.gt.isEqual(t.gt)},e.prototype.toString=function(){return"Document("+this.key+", "+this.version+", "+this.gt.toString()+", {hasLocalMutations: "+this.Vt+"}), {hasCommittedMutations: "+this.hasCommittedMutations+"})"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return this.Vt||this.hasCommittedMutations},enumerable:!1,configurable:!0}),e}(yt),bt=function(t){function e(e,n,r){var i=this;return(i=t.call(this,e,n)||this).hasCommittedMutations=!(!r||!r.hasCommittedMutations),i}return Object(a.c)(e,t),e.prototype.toString=function(){return"NoDocument("+this.key+", "+this.version+")"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return this.hasCommittedMutations},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.hasCommittedMutations===this.hasCommittedMutations&&t.version.isEqual(this.version)&&t.key.isEqual(this.key)},e}(yt),wt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.toString=function(){return"UnknownDocument("+this.key+", "+this.version+")"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return!0}
2,enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.version.isEqual(this.version)&&t.key.isEqual(this.key)},e}(yt),_t=function(t,e,n,r,i,o,a){void 0===e&&(e=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o=null),void 0===a&&(a=null),this.path=t,this.collectionGroup=e,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=o,this.endAt=a,this.vt=null};function Et(t,e,n,r,i,o,a){return void 0===e&&(e=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o=null),void 0===a&&(a=null),new _t(t,e,n,r,i,o,a)}function Ot(t){var e=y(t);if(null===e.vt){var n=e.path.rt();null!==e.collectionGroup&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map((function(t){return function(t){return t.field.rt()+t.op.toString()+at(t.value)}(t)})).join(","),n+="|ob:",n+=e.orderBy.map((function(t){return function(t){return t.field.rt()+t.dir}(t)})).join(","),J(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=Mt(e.startAt)),e.endAt&&(n+="|ub:",n+=Mt(e.endAt)),e.vt=n}return e.vt}function Tt(t,e){if(t.limit!==e.limit)return!1;if(t.orderBy.length!==e.orderBy.length)return!1;for(var n=0;n<t.orderBy.length;n++)if(!Ft(t.orderBy[n],e.orderBy[n]))return!1;if(t.filters.length!==e.filters.length)return!1;for(var r=0;r<t.filters.length;r++)if(i=t.filters[r],o=e.filters[r],i.op!==o.op||!i.field.isEqual(o.field)||!nt(i.value,o.value))return!1;var i,o;return t.collectionGroup===e.collectionGroup&&!!t.path.isEqual(e.path)&&!!Vt(t.startAt,e.startAt)&&Vt(t.endAt,e.endAt)}function St(t){return V.wt(t.path)&&null===t.collectionGroup&&0===t.filters.length}var kt=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).field=e,i.op=n,i.value=r,i}return Object(a.c)(e,t),e.create=function(t,n,r){return t.ut()?"in"===n||"not-in"===n?this.St(t,n,r):new It(t,n,r):"array-contains"===n?new Pt(t,r):"in"===n?new jt(t,r):"not-in"===n?new At(t,r):"array-contains-any"===n?new Dt(t,r):new e(t,n,r)},e.St=function(t,e,n){return"in"===e?new Ct(t,n):new Nt(t,n)},e.prototype.matches=function(t){var e=t.field(this.field);return"!="===this.op?null!==e&&this.Dt(it(e,this.value)):null!==e&&et(this.value)===et(e)&&this.Dt(it(e,this.value))},e.prototype.Dt=function(t){switch(this.op){case"<":return t<0;case"<=":return t<=0;case"==":return 0===t;case"!=":return 0!==t;case">":return t>0;case">=":return t>=0;default:return v()}},e.prototype.Ct=function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0},e}((function(){})),It=function(t){function e(e,n,r){var i=this;return(i=t.call(this,e,n,r)||this).key=V.ft(r.referenceValue),i}return Object(a.c)(e,t),e.prototype.matches=function(t){var e=V.H(t.key,this.key);return this.Dt(e)},e}(kt),Ct=function(t){function e(e,n){var r=this;return(r=t.call(this,e,"in",n)||this).keys=xt("in",n),r}return Object(a.c)(e,t),e.prototype.matches=function(t){return this.keys.some((function(e){return e.isEqual(t.key)}))},e}(kt),Nt=function(t){function e(e,n){var r=this;return(r=t.call(this,e,"not-in",n)||this).keys=xt("not-in",n),r}return Object(a.c)(e,t),e.prototype.matches=function(t){return!this.keys.some((function(e){return e.isEqual(t.key)}))},e}(kt);function xt(t,e){var n;return((null===(n=e.arrayValue)||void 0===n?void 0:n.values)||[]).map((function(t){return V.ft(t.referenceValue)}))}var Pt=function(t){function e(e,n){return t.call(this,e,"array-contains",n)||this}return Object(a.c)(e,t),e.prototype.matches=function(t){var e=t.field(this.field);return lt(e)&&rt(e.arrayValue,this.value)},e}(kt),jt=function(t){function e(e,n){return t.call(this,e,"in",n)||this}return Object(a.c)(e,t),e.prototype.matches=function(t){var e=t.field(this.field);return null!==e&&rt(this.value.arrayValue,e)},e}(kt),At=function(t){function e(e,n){return t.call(this,e,"not-in",n)||this}return Object(a.c)(e,t),e.prototype.matches=function(t){if(rt(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var e=t.field(this.field);return null!==e&&!rt(this.value.arrayValue,e)},e}(kt),Dt=function(t){function e(e,n){return t.call(this,e,"array-contains-any",n)||this}return Object(a.c)(e,t),e.prototype.matches=function(t){var e=this,n=t.field(this.field);return!(!lt(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(t){return rt(e.value.arrayValue,t)}))},e}(kt),Rt=function(t,e){this.position=t,this.before=e};function Mt(t){return(t.before?"b":"a")+":"+t.position.map((function(t){return at(t)})).join(",")}var Lt=function(t,e){void 0===e&&(e="asc"),this.field=t,this.dir=e};function Ft(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}function Ut(t,e,n){for(var r=0,i=0;i<t.position.length;i++){var o=e[i],a=t.position[i];if(r=o.field.ut()?V.H(V.ft(a.referenceValue),n.key):it(a,n.field(o.field)),"desc"===o.dir&&(r*=-1),0!==r)break}return t.before?r<=0:r<0}function Vt(t,e){if(null===t)return null===e;if(null===e)return!1;if(t.before!==e.before||t.position.length!==e.position.length)return!1;for(var n=0;n<t.position.length;n++)if(!nt(t.position[n],e.position[n]))return!1;return!0}var Bt=function(t,e,n,r,i,o,a,s){void 0===e&&(e=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o="F"),void 0===a&&(a=null),void 0===s&&(s=null),this.path=t,this.collectionGroup=e,this.xt=n,this.filters=r,this.limit=i,this.limitType=o,this.startAt=a,this.endAt=s,this.Nt=null,this.$t
2=null,this.startAt,this.endAt};function qt(t,e,n,r,i,o,a,s){return new Bt(t,e,n,r,i,o,a,s)}function zt(t){return new Bt(t)}function Wt(t){return!J(t.limit)&&"F"===t.limitType}function Ht(t){return!J(t.limit)&&"L"===t.limitType}function Gt(t){return t.xt.length>0?t.xt[0].field:null}function Yt(t){for(var e=0,n=t.filters;e<n.length;e++){var r=n[e];if(r.Ct())return r.field}return null}function Kt(t){return null!==t.collectionGroup}function Qt(t){var e=y(t);if(null===e.Nt){e.Nt=[];var n=Yt(e),r=Gt(e);if(null!==n&&null===r)n.ut()||e.Nt.push(new Lt(n)),e.Nt.push(new Lt(U.ht(),"asc"));else{for(var i=!1,o=0,a=e.xt;o<a.length;o++){var s=a[o];e.Nt.push(s),s.field.ut()&&(i=!0)}if(!i){var u=e.xt.length>0?e.xt[e.xt.length-1].dir:"asc";e.Nt.push(new Lt(U.ht(),u))}}}return e.Nt}function Xt(t){var e=y(t);if(!e.$t)if("F"===e.limitType)e.$t=Et(e.path,e.collectionGroup,Qt(e),e.filters,e.limit,e.startAt,e.endAt);else{for(var n=[],r=0,i=Qt(e);r<i.length;r++){var o=i[r],a="desc"===o.dir?"asc":"desc";n.push(new Lt(o.field,a))}var s=e.endAt?new Rt(e.endAt.position,!e.endAt.before):null,u=e.startAt?new Rt(e.startAt.position,!e.startAt.before):null;e.$t=Et(e.path,e.collectionGroup,n,e.filters,e.limit,s,u)}return e.$t}function $t(t,e,n){return new Bt(t.path,t.collectionGroup,t.xt.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function Jt(t,e){return Tt(Xt(t),Xt(e))&&t.limitType===e.limitType}function Zt(t){return Ot(Xt(t))+"|lt:"+t.limitType}function te(t){return"Query(target="+function(t){var e=t.path.rt();return null!==t.collectionGroup&&(e+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(e+=", filters: ["+t.filters.map((function(t){return(e=t).field.rt()+" "+e.op+" "+at(e.value);var e})).join(", ")+"]"),J(t.limit)||(e+=", limit: "+t.limit),t.orderBy.length>0&&(e+=", orderBy: ["+t.orderBy.map((function(t){return function(t){return t.field.rt()+" ("+t.dir+")"}(t)})).join(", ")+"]"),t.startAt&&(e+=", startAt: "+Mt(t.startAt)),t.endAt&&(e+=", endAt: "+Mt(t.endAt)),"Target("+e+")"}(Xt(t))+"; limitType="+t.limitType+")"}function ee(t,e){return function(t,e){var n=e.key.path;return null!==t.collectionGroup?e.key.dt(t.collectionGroup)&&t.path.nt(n):V.wt(t.path)?t.path.isEqual(n):t.path.st(n)}(t,e)&&function(t,e){for(var n=0,r=t.xt;n<r.length;n++){var i=r[n];if(!i.field.ut()&&null===e.field(i.field))return!1}return!0}(t,e)&&function(t,e){for(var n=0,r=t.filters;n<r.length;n++)if(!r[n].matches(e))return!1;return!0}(t,e)&&function(t,e){return!(t.startAt&&!Ut(t.startAt,Qt(t),e))&&(!t.endAt||!Ut(t.endAt,Qt(t),e))}(t,e)}function ne(t){return function(e,n){for(var r=!1,i=0,o=Qt(t);i<o.length;i++){var a=o[i],s=re(a,e,n);if(0!==s)return s;r=r||a.field.ut()}return 0}}function re(t,e,n){var r=t.field.ut()?V.H(e.key,n.key):function(t,e,n){var r=e.field(t),i=n.field(t);return null!==r&&null!==i?it(r,i):v()}(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return v()}}var ie=function(){function t(t,e,n,r,i,o,a){void 0===i&&(i=R.min()),void 0===o&&(o=R.min()),void 0===a&&(a=O.T),this.target=t,this.targetId=e,this.Ft=n,this.sequenceNumber=r,this.Ot=i,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=a}return t.prototype.kt=function(e){return new t(this.target,this.targetId,this.Ft,e,this.Ot,this.lastLimboFreeSnapshotVersion,this.resumeToken)},t.prototype.Mt=function(e,n){return new t(this.target,this.targetId,this.Ft,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e)},t.prototype.Lt=function(e){return new t(this.target,this.targetId,this.Ft,this.sequenceNumber,this.Ot,e,this.resumeToken)},t}();function oe(t,e){if(t.Bt){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Z(e)?"-0":e}}function ae(t){return{integerValue:""+t}}function se(t,e){return tt(e)?ae(e):oe(t,e)}var ue=function(){this.qt=void 0};function ce(t,e,n){return t instanceof he?function(t,e){var n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:t.seconds,nanos:t.nanoseconds}}}};return e&&(n.fields.__previous_value__=e),{mapValue:n}}(n,e):t instanceof de?pe(t,e):t instanceof ve?me(t,e):function(t,e){var n=fe(t,e),r=ge(n)+ge(t.Ut);return ct(n)&&ct(t.Ut)?ae(r):oe(t.Qt,r)}(t,e)}function le(t,e,n){return t instanceof de?pe(t,e):t instanceof ve?me(t,e):n}function fe(t,e){return t instanceof ye?ct(n=e)||function(t){return!!t&&"doubleValue"in t}(n)?e:{integerValue:0}:null;var n}var he=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e}(ue),de=function(t){function e(e){var n=this;return(n=t.call(this)||this).elements=e,n}return Object(a.c)(e,t),e}(ue);function pe(t,e){for(var n=be(e),r=function(t){n.some((function(e){return nt(e,t)}))||n.push(t)},i=0,o=t.elements;i<o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var ve=function(t){function e(e){var n=this;return(n=t.call(this)||this).elements=e,n}return Object(a.c)(e,t),e}(ue);function me(t,e){for(var n=be(e),r=function(t){n=n.filter((function(e){return!nt(e,t)}))},i=0,o=t.elements;i<o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var ye=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).Qt=e,r.Ut=n,r}return Object(a.c)(e,t),e}(ue);function ge(t){return Y(t.integerValue||t.doubleValue)}function be(t){return lt(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}var we=function(t,e){this.field=t,this.transform=e},_e=function(t,e){this.version=t,this.transformResults=e},Ee=function(){function t(t,e){this.updateTime=t,this.exists=e}return t.Kt=function(){return new t},t.exists=function(e){return new t(void 0,e)},t.updateTime=function(e){return new t(e)},Object.defineProperty(t.prototype,"Wt",{get:function(){return void 0===this.updateTime&&void 0===this.exists}
2,enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.exists===t.exists&&(this.updateTime?!!t.updateTime&&this.updateTime.isEqual(t.updateTime):!t.updateTime)},t}();function Oe(t,e){return void 0!==t.updateTime?e instanceof gt&&e.version.isEqual(t.updateTime):void 0===t.exists||t.exists===e instanceof gt}var Te=function(){};function Se(t,e,n){return t instanceof xe?function(t,e,n){var r=t.value;if(n.transformResults){var i=Ae(t.fieldTransforms,e,n.transformResults);r=Re(t.fieldTransforms,r,i)}return new gt(t.key,n.version,r,{hasCommittedMutations:!0})}(t,e,n):t instanceof Pe?function(t,e,n){if(!Oe(t.jt,e))return new wt(t.key,n.version);var r=je(t,e,n.transformResults?Ae(t.fieldTransforms,e,n.transformResults):[]);return new gt(t.key,n.version,r,{hasCommittedMutations:!0})}(t,e,n):function(t,e,n){return new bt(t.key,n.version,{hasCommittedMutations:!0})}(t,0,n)}function ke(t,e,n){return t instanceof xe?function(t,e,n){if(!Oe(t.jt,e))return e;var r=t.value,i=De(t.fieldTransforms,n,e);r=Re(t.fieldTransforms,r,i);var o=Ne(e);return new gt(t.key,o,r,{Vt:!0})}(t,e,n):t instanceof Pe?function(t,e,n){if(!Oe(t.jt,e))return e;var r=Ne(e),i=je(t,e,De(t.fieldTransforms,n,e));return new gt(t.key,r,i,{Vt:!0})}(t,e,n):function(t,e){return Oe(t.jt,e)?new bt(t.key,R.min()):e}(t,e)}function Ie(t,e){return function(t,e){for(var n=null,r=0,i=t;r<i.length;r++){var o=i[r],a=e instanceof gt?e.field(o.field):void 0,s=fe(o.transform,a||null);null!=s&&(n=null==n?(new vt).set(o.field,s):n.set(o.field,s))}return n?n.Pt():null}(t.fieldTransforms,e)}function Ce(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.jt.isEqual(e.jt)&&!!function(t,e){return void 0===t&&void 0===e||!(!t||!e)&&_(t,e,(function(t,e){return function(t,e){return t.field.isEqual(e.field)&&function(t,e){return t instanceof de&&e instanceof de||t instanceof ve&&e instanceof ve?_(t.elements,e.elements,nt):t instanceof ye&&e instanceof ye?nt(t.Ut,e.Ut):t instanceof he&&e instanceof he}(t.transform,e.transform)}(t,e)}))}(t.fieldTransforms,e.fieldTransforms)&&(0===t.type?t.value.isEqual(e.value):1!==t.type||t.data.isEqual(e.data)&&t.Gt.isEqual(e.Gt))}function Ne(t){return t instanceof gt?t.version:R.min()}var xe=function(t){function e(e,n,r,i){void 0===i&&(i=[]);var o=this;return(o=t.call(this)||this).key=e,o.value=n,o.jt=r,o.fieldTransforms=i,o.type=0,o}return Object(a.c)(e,t),e}(Te),Pe=function(t){function e(e,n,r,i,o){void 0===o&&(o=[]);var a=this;return(a=t.call(this)||this).key=e,a.data=n,a.Gt=r,a.jt=i,a.fieldTransforms=o,a.type=1,a}return Object(a.c)(e,t),e}(Te);function je(t,e,n){var r;return r=function(t,e){var n=new vt(e);return t.Gt.fields.forEach((function(e){if(!e.et()){var r=t.data.field(e);null!==r?n.set(e,r):n.delete(e)}})),n.Pt()}(t,r=e instanceof gt?e.data():pt.empty()),Re(t.fieldTransforms,r,n)}function Ae(t,e,n){var r=[];m(t.length===n.length);for(var i=0;i<n.length;i++){var o=t[i],a=o.transform,s=null;e instanceof gt&&(s=e.field(o.field)),r.push(le(a,s,n[i]))}return r}function De(t,e,n){for(var r=[],i=0,o=t;i<o.length;i++){var a=o[i],s=a.transform,u=null;n instanceof gt&&(u=n.field(a.field)),r.push(ce(s,u,e))}return r}function Re(t,e,n){for(var r=new vt(e),i=0;i<t.length;i++){var o=t[i];r.set(o.field,n[i])}return r.Pt()}var Me,Le,Fe=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).key=e,r.jt=n,r.type=2,r.fieldTransforms=[],r}return Object(a.c)(e,t),e}(Te),Ue=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).key=e,r.jt=n,r.type=3,r.fieldTransforms=[],r}return Object(a.c)(e,t),e}(Te),Ve=function(t){this.count=t};function Be(t){switch(t){case T.OK:return v();case T.CANCELLED:case T.UNKNOWN:case T.DEADLINE_EXCEEDED:case T.RESOURCE_EXHAUSTED:case T.INTERNAL:case T.UNAVAILABLE:case T.UNAUTHENTICATED:return!1;case T.INVALID_ARGUMENT:case T.NOT_FOUND:case T.ALREADY_EXISTS:case T.PERMISSION_DENIED:case T.FAILED_PRECONDITION:case T.ABORTED:case T.OUT_OF_RANGE:case T.UNIMPLEMENTED:case T.DATA_LOSS:return!0;default:return v()}}function qe(t){if(void 0===t)return h("GRPC error has no .code"),T.UNKNOWN;switch(t){case Me.OK:return T.OK;case Me.CANCELLED:return T.CANCELLED;case Me.UNKNOWN:return T.UNKNOWN;case Me.DEADLINE_EXCEEDED:return T.DEADLINE_EXCEEDED;case Me.RESOURCE_EXHAUSTED:return T.RESOURCE_EXHAUSTED;case Me.INTERNAL:return T.INTERNAL;case Me.UNAVAILABLE:return T.UNAVAILABLE;case Me.UNAUTHENTICATED:return T.UNAUTHENTICATED;case Me.INVALID_ARGUMENT:return T.INVALID_ARGUMENT;case Me.NOT_FOUND:return T.NOT_FOUND;case Me.ALREADY_EXISTS:return T.ALREADY_EXISTS;case Me.PERMISSION_DENIED:return T.PERMISSION_DENIED;case Me.FAILED_PRECONDITION:return T.FAILED_PRECONDITION;case Me.ABORTED:return T.ABORTED;case Me.OUT_OF_RANGE:return T.OUT_OF_RANGE;
2case Me.UNIMPLEMENTED:return T.UNIMPLEMENTED;case Me.DATA_LOSS:return T.DATA_LOSS;default:return v()}}(Le=Me||(Me={}))[Le.OK=0]="OK",Le[Le.CANCELLED=1]="CANCELLED",Le[Le.UNKNOWN=2]="UNKNOWN",Le[Le.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Le[Le.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Le[Le.NOT_FOUND=5]="NOT_FOUND",Le[Le.ALREADY_EXISTS=6]="ALREADY_EXISTS",Le[Le.PERMISSION_DENIED=7]="PERMISSION_DENIED",Le[Le.UNAUTHENTICATED=16]="UNAUTHENTICATED",Le[Le.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Le[Le.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Le[Le.ABORTED=10]="ABORTED",Le[Le.OUT_OF_RANGE=11]="OUT_OF_RANGE",Le[Le.UNIMPLEMENTED=12]="UNIMPLEMENTED",Le[Le.INTERNAL=13]="INTERNAL",Le[Le.UNAVAILABLE=14]="UNAVAILABLE",Le[Le.DATA_LOSS=15]="DATA_LOSS";var ze=function(){function t(t,e){this.H=t,this.root=e||He.EMPTY}return t.prototype.zt=function(e,n){return new t(this.H,this.root.zt(e,n,this.H).copy(null,null,He.Ht,null,null))},t.prototype.remove=function(e){return new t(this.H,this.root.remove(e,this.H).copy(null,null,He.Ht,null,null))},t.prototype.get=function(t){for(var e=this.root;!e.et();){var n=this.H(t,e.key);if(0===n)return e.value;n<0?e=e.left:n>0&&(e=e.right)}return null},t.prototype.indexOf=function(t){for(var e=0,n=this.root;!n.et();){var r=this.H(t,n.key);if(0===r)return e+n.left.size;r<0?n=n.left:(e+=n.left.size+1,n=n.right)}return-1},t.prototype.et=function(){return this.root.et()},Object.defineProperty(t.prototype,"size",{get:function(){return this.root.size},enumerable:!1,configurable:!0}),t.prototype.Jt=function(){return this.root.Jt()},t.prototype.Yt=function(){return this.root.Yt()},t.prototype.Xt=function(t){return this.root.Xt(t)},t.prototype.forEach=function(t){this.Xt((function(e,n){return t(e,n),!1}))},t.prototype.toString=function(){var t=[];return this.Xt((function(e,n){return t.push(e+":"+n),!1})),"{"+t.join(", ")+"}"},t.prototype.Zt=function(t){return this.root.Zt(t)},t.prototype.te=function(){return new We(this.root,null,this.H,!1)},t.prototype.ee=function(t){return new We(this.root,t,this.H,!1)},t.prototype.ne=function(){return new We(this.root,null,this.H,!0)},t.prototype.se=function(t){return new We(this.root,t,this.H,!0)},t}(),We=function(){function t(t,e,n,r){this.ie=r,this.re=[];for(var i=1;!t.et();)if(i=e?n(t.key,e):1,r&&(i*=-1),i<0)t=this.ie?t.left:t.right;else{if(0===i){this.re.push(t);break}this.re.push(t),t=this.ie?t.right:t.left}}return t.prototype.oe=function(){var t=this.re.pop(),e={key:t.key,value:t.value};if(this.ie)for(t=t.left;!t.et();)this.re.push(t),t=t.right;else for(t=t.right;!t.et();)this.re.push(t),t=t.left;return e},t.prototype.ce=function(){return this.re.length>0},t.prototype.ae=function(){if(0===this.re.length)return null;var t=this.re[this.re.length-1];return{key:t.key,value:t.value}},t}(),He=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:t.EMPTY,this.right=null!=o?o:t.EMPTY,this.size=this.left.size+1+this.right.size}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.et=function(){return!1},t.prototype.Xt=function(t){return this.left.Xt(t)||t(this.key,this.value)||this.right.Xt(t)},t.prototype.Zt=function(t){return this.right.Zt(t)||t(this.key,this.value)||this.left.Zt(t)},t.prototype.min=function(){return this.left.et()?this:this.left.min()},t.prototype.Jt=function(){return this.min().key},t.prototype.Yt=function(){return this.right.et()?this.key:this.right.Yt()},t.prototype.zt=function(t,e,n){var r=this,i=n(t,r.key);return(r=i<0?r.copy(null,null,null,r.left.zt(t,e,n),null):0===i?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.zt(t,e,n))).ue()},t.prototype.he=function(){if(this.left.et())return t.EMPTY;var e=this;return e.left.le()||e.left.left.le()||(e=e._e()),(e=e.copy(null,null,null,e.left.he(),null)).ue()},t.prototype.remove=function(e,n){var r,i=this;if(n(e,i.key)<0)i.left.et()||i.left.le()||i.left.left.le()||(i=i._e()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.le()&&(i=i.fe()),i.right.et()||i.right.le()||i.right.left.le()||(i=i.de()),0===n(e,i.key)){if(i.right.et())return t.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.he())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.ue()},t.prototype.le=function(){return this.color},t.prototype.ue=function(){var t=this;return t.right.le()&&!t.left.le()&&(t=t.we()),t.left.le()&&t.left.left.le()&&(t=t.fe()),t.left.le()&&t.right.le()&&(t=t.Ee()),t},t.prototype._e=function(){var t=this.Ee();return t.right.left.le()&&(t=(t=(t=t.copy(null,null,null,null,t.right.fe())).we()).Ee()),t},t.prototype.de=function(){var t=this.Ee();
2return t.left.left.le()&&(t=(t=t.fe()).Ee()),t},t.prototype.we=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.fe=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.Ee=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.Te=function(){var t=this.Ie();return Math.pow(2,t)<=this.size+1},t.prototype.Ie=function(){if(this.le()&&this.left.le())throw v();if(this.right.le())throw v();var t=this.left.Ie();if(t!==this.right.Ie())throw v();return t+(this.le()?0:1)},t}();He.EMPTY=null,He.RED=!0,He.Ht=!1,He.EMPTY=new(function(){function t(){this.size=0}return Object.defineProperty(t.prototype,"key",{get:function(){throw v()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){throw v()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){throw v()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){throw v()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){throw v()},enumerable:!1,configurable:!0}),t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.zt=function(t,e,n){return new He(t,e)},t.prototype.remove=function(t,e){return this},t.prototype.et=function(){return!0},t.prototype.Xt=function(t){return!1},t.prototype.Zt=function(t){return!1},t.prototype.Jt=function(){return null},t.prototype.Yt=function(){return null},t.prototype.le=function(){return!1},t.prototype.Te=function(){return!0},t.prototype.Ie=function(){return 0},t}());var Ge=function(){function t(t){this.H=t,this.data=new ze(this.H)}return t.prototype.has=function(t){return null!==this.data.get(t)},t.prototype.first=function(){return this.data.Jt()},t.prototype.last=function(){return this.data.Yt()},Object.defineProperty(t.prototype,"size",{get:function(){return this.data.size},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){return this.data.indexOf(t)},t.prototype.forEach=function(t){this.data.Xt((function(e,n){return t(e),!1}))},t.prototype.me=function(t,e){for(var n=this.data.ee(t[0]);n.ce();){var r=n.oe();if(this.H(r.key,t[1])>=0)return;e(r.key)}},t.prototype.Ae=function(t,e){var n;for(n=void 0!==e?this.data.ee(e):this.data.te();n.ce();)if(!t(n.oe().key))return},t.prototype.Re=function(t){var e=this.data.ee(t);return e.ce()?e.oe().key:null},t.prototype.te=function(){return new Ye(this.data.te())},t.prototype.ee=function(t){return new Ye(this.data.ee(t))},t.prototype.add=function(t){return this.copy(this.data.remove(t).zt(t,!0))},t.prototype.delete=function(t){return this.has(t)?this.copy(this.data.remove(t)):this},t.prototype.et=function(){return this.data.et()},t.prototype.Pe=function(t){var e=this;return e.size<t.size&&(e=t,t=this),t.forEach((function(t){e=e.add(t)})),e},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.data.te(),r=e.data.te();n.ce();){var i=n.oe().key,o=r.oe().key;if(0!==this.H(i,o))return!1}return!0},t.prototype.it=function(){var t=[];return this.forEach((function(e){t.push(e)})),t},t.prototype.toString=function(){var t=[];return this.forEach((function(e){return t.push(e)})),"SortedSet("+t.toString()+")"},t.prototype.copy=function(e){var n=new t(this.H);return n.data=e,n},t}(),Ye=function(){function t(t){this.ye=t}return t.prototype.oe=function(){return this.ye.oe().key},t.prototype.ce=function(){return this.ye.ce()},t}(),Ke=new ze(V.H);function Qe(){return Ke}function Xe(){return Qe()}var $e=new ze(V.H);function Je(){return $e}var Ze=new ze(V.H);function tn(){return Ze}var en=new Ge(V.H);function nn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=en,r=0,i=t;r<i.length;r++){var o=i[r];n=n.add(o)}return n}var rn=new Ge(w);function on(){return rn}var an=function(){function t(t){this.H=t?function(e,n){return t(e,n)||V.H(e.key,n.key)}:function(t,e){return V.H(t.key,e.key)},this.ge=Je(),this.Ve=new ze(this.H)}return t.pe=function(e){return new t(e.H)},t.prototype.has=function(t){return null!=this.ge.get(t)},t.prototype.get=function(t){return this.ge.get(t)},t.prototype.first=function(){return this.Ve.Jt()},t.prototype.last=function(){return this.Ve.Yt()},t.prototype.et=function(){return this.Ve.et()},t.prototype.indexOf=function(t){var e=this.ge.get(t);return e?this.Ve.indexOf(e):-1},Object.defineProperty(t.prototype,"size",{get:function(){return this.Ve.size}
2,enumerable:!1,configurable:!0}),t.prototype.forEach=function(t){this.Ve.Xt((function(e,n){return t(e),!1}))},t.prototype.add=function(t){var e=this.delete(t.key);return e.copy(e.ge.zt(t.key,t),e.Ve.zt(t,null))},t.prototype.delete=function(t){var e=this.get(t);return e?this.copy(this.ge.remove(t),this.Ve.remove(e)):this},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.Ve.te(),r=e.Ve.te();n.ce();){var i=n.oe().key,o=r.oe().key;if(!i.isEqual(o))return!1}return!0},t.prototype.toString=function(){var t=[];return this.forEach((function(e){t.push(e.toString())})),0===t.length?"DocumentSet ()":"DocumentSet (\n "+t.join(" \n")+"\n)"},t.prototype.copy=function(e,n){var r=new t;return r.H=this.H,r.ge=e,r.Ve=n,r},t}(),sn=function(){function t(){this.be=new ze(V.H)}return t.prototype.track=function(t){var e=t.doc.key,n=this.be.get(e);n?0!==t.type&&3===n.type?this.be=this.be.zt(e,t):3===t.type&&1!==n.type?this.be=this.be.zt(e,{type:n.type,doc:t.doc}):2===t.type&&2===n.type?this.be=this.be.zt(e,{type:2,doc:t.doc}):2===t.type&&0===n.type?this.be=this.be.zt(e,{type:0,doc:t.doc}):1===t.type&&0===n.type?this.be=this.be.remove(e):1===t.type&&2===n.type?this.be=this.be.zt(e,{type:1,doc:n.doc}):0===t.type&&1===n.type?this.be=this.be.zt(e,{type:2,doc:t.doc}):v():this.be=this.be.zt(e,t)},t.prototype.ve=function(){var t=[];return this.be.Xt((function(e,n){t.push(n)})),t},t}(),un=function(){function t(t,e,n,r,i,o,a,s){this.query=t,this.docs=e,this.Se=n,this.docChanges=r,this.De=i,this.fromCache=o,this.Ce=a,this.xe=s}return t.Ne=function(e,n,r,i){var o=[];return n.forEach((function(t){o.push({type:0,doc:t})})),new t(e,n,an.pe(n),o,r,i,!0,!1)},Object.defineProperty(t.prototype,"hasPendingWrites",{get:function(){return!this.De.et()},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){if(!(this.fromCache===t.fromCache&&this.Ce===t.Ce&&this.De.isEqual(t.De)&&Jt(this.query,t.query)&&this.docs.isEqual(t.docs)&&this.Se.isEqual(t.Se)))return!1;var e=this.docChanges,n=t.docChanges;if(e.length!==n.length)return!1;for(var r=0;r<e.length;r++)if(e[r].type!==n[r].type||!e[r].doc.isEqual(n[r].doc))return!1;return!0},t}(),cn=function(){function t(t,e,n,r,i){this.Ot=t,this.$e=e,this.Fe=n,this.Oe=r,this.ke=i}return t.Me=function(e,n){var r=new Map;return r.set(e,ln.Le(e,n)),new t(R.min(),r,on(),Qe(),nn())},t}(),ln=function(){function t(t,e,n,r,i){this.resumeToken=t,this.Be=e,this.qe=n,this.Ue=r,this.Qe=i}return t.Le=function(e,n){return new t(O.T,n,nn(),nn(),nn())},t}(),fn=function(t,e,n,r){this.Ke=t,this.removedTargetIds=e,this.key=n,this.We=r},hn=function(t,e){this.targetId=t,this.je=e},dn=function(t,e,n,r){void 0===n&&(n=O.T),void 0===r&&(r=null),this.state=t,this.targetIds=e,this.resumeToken=n,this.cause=r},pn=function(){function t(){this.Ge=0,this.ze=yn(),this.He=O.T,this.Je=!1,this.Ye=!0}return Object.defineProperty(t.prototype,"Be",{get:function(){return this.Je},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resumeToken",{get:function(){return this.He},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Xe",{get:function(){return 0!==this.Ge},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Ze",{get:function(){return this.Ye},enumerable:!1,configurable:!0}),t.prototype.tn=function(t){t.l()>0&&(this.Ye=!0,this.He=t)},t.prototype.en=function(){var t=nn(),e=nn(),n=nn();return this.ze.forEach((function(r,i){switch(i){case 0:t=t.add(r);break;case 2:e=e.add(r);break;case 1:n=n.add(r);break;default:v()}})),new ln(this.He,this.Je,t,e,n)},t.prototype.nn=function(){this.Ye=!1,this.ze=yn()},t.prototype.sn=function(t,e){this.Ye=!0,this.ze=this.ze.zt(t,e)},t.prototype.rn=function(t){this.Ye=!0,this.ze=this.ze.remove(t)},t.prototype.on=function(){this.Ge+=1},t.prototype.cn=function(){this.Ge-=1},t.prototype.an=function(){this.Ye=!0,this.Je=!0},t}(),vn=function(){function t(t){this.un=t,this.hn=new Map,this.ln=Qe(),this._n=mn(),this.fn=new Ge(w)}return t.prototype.dn=function(t){for(var e=0,n=t.Ke;e<n.length;e++){var r=n[e];t.We instanceof gt?this.wn(r,t.We):t.We instanceof bt&&this.En(r,t.key,t.We)}for(var i=0,o=t.removedTargetIds;i<o.length;i++)r=o[i],this.En(r,t.key,t.We)},t.prototype.Tn=function(t){var e=this;this.In(t,(function(n){var r=e.mn(n);switch(t.state){case 0:e.An(n)&&r.tn(t.resumeToken);break;case 1:r.cn(),r.Xe||r.nn(),r.tn(t.resumeToken);break;case 2:r.cn(),r.Xe||e.removeTarget(n);break;case 3:e.An(n)&&(r.an(),r.tn(t.resumeToken));break;case 4:e.An(n)&&(e.Rn(n),r.tn(t.resumeToken));break;default:v()}}))},t.prototype.In=function(t,e){var n=this;t.targetIds.length>0?t.targetIds.forEach(e):this.hn.forEach((function(t,r){n.An(r)&&e(r)}))},t.prototype.Pn=function(t){var e=t.targetId,n=t.je.count,r=this.yn(e);if(r){var i=r.target;if(St(i))if(0===n){var o=new V(i.path);this.En(e,o,new bt(o,R.min()))}else m(1===n);else this.gn(e)!==n&&(this.Rn(e),this.fn=this.fn.add(e))}},t.prototype.Vn=function(t){var e=this,n=new Map;this.hn.forEach((function(r,i){var o=e.yn(i);if(o){if(r.Be&&St(o.target)){var a=new V(o.target.path);null!==e.ln.get(a)||e.pn(i,a)||e.En(i,a,new bt(a,t))}r.Ze&&(n.set(i,r.en()),r.nn())}}));var r=nn();
2this._n.forEach((function(t,n){var i=!0;n.Ae((function(t){var n=e.yn(t);return!n||2===n.Ft||(i=!1,!1)})),i&&(r=r.add(t))}));var i=new cn(t,n,this.fn,this.ln,r);return this.ln=Qe(),this._n=mn(),this.fn=new Ge(w),i},t.prototype.wn=function(t,e){if(this.An(t)){var n=this.pn(t,e.key)?2:0;this.mn(t).sn(e.key,n),this.ln=this.ln.zt(e.key,e),this._n=this._n.zt(e.key,this.bn(e.key).add(t))}},t.prototype.En=function(t,e,n){if(this.An(t)){var r=this.mn(t);this.pn(t,e)?r.sn(e,1):r.rn(e),this._n=this._n.zt(e,this.bn(e).delete(t)),n&&(this.ln=this.ln.zt(e,n))}},t.prototype.removeTarget=function(t){this.hn.delete(t)},t.prototype.gn=function(t){var e=this.mn(t).en();return this.un.vn(t).size+e.qe.size-e.Qe.size},t.prototype.on=function(t){this.mn(t).on()},t.prototype.mn=function(t){var e=this.hn.get(t);return e||(e=new pn,this.hn.set(t,e)),e},t.prototype.bn=function(t){var e=this._n.get(t);return e||(e=new Ge(w),this._n=this._n.zt(t,e)),e},t.prototype.An=function(t){var e=null!==this.yn(t);return e||f("WatchChangeAggregator","Detected inactive target",t),e},t.prototype.yn=function(t){var e=this.hn.get(t);return e&&e.Xe?null:this.un.Sn(t)},t.prototype.Rn=function(t){var e=this;this.hn.set(t,new pn),this.un.vn(t).forEach((function(n){e.En(t,n,null)}))},t.prototype.pn=function(t,e){return this.un.vn(t).has(e)},t}();function mn(){return new ze(V.H)}function yn(){return new ze(V.H)}var gn={asc:"ASCENDING",desc:"DESCENDING"},bn={"<":"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"},wn=function(t,e){this.t=t,this.Bt=e};function _n(t,e){return t.Bt?new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")+"."+("000000000"+e.nanoseconds).slice(-9)+"Z":{seconds:""+e.seconds,nanos:e.nanoseconds}}function En(t,e){return t.Bt?e.toBase64():e.toUint8Array()}function On(t,e){return _n(t,e.j())}function Tn(t){return m(!!t),R.K(function(t){var e=G(t);return new D(e.seconds,e.nanos)}(t))}function Sn(t,e){return function(t){return new L(["projects",t.projectId,"databases",t.database])}(t).child("documents").child(e).rt()}function kn(t){var e=L.ot(t);return m(Xn(e)),e}function In(t,e){return Sn(t.t,e.path)}function Cn(t,e){var n=kn(e);if(n.get(1)!==t.t.projectId)throw new S(T.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.t.projectId);if(n.get(3)!==t.t.database)throw new S(T.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.t.database);return new V(jn(n))}function Nn(t,e){return Sn(t.t,e)}function xn(t){var e=kn(t);return 4===e.length?L.ct():jn(e)}function Pn(t){return new L(["projects",t.t.projectId,"databases",t.t.database]).rt()}function jn(t){return m(t.length>4&&"documents"===t.get(4)),t.Y(5)}function An(t,e,n){return{name:In(t,e),fields:n.proto.mapValue.fields}}function Dn(t,e,n){var r=Cn(t,e.name),i=Tn(e.updateTime),o=new pt({mapValue:{fields:e.fields}});return new gt(r,i,o,{hasCommittedMutations:!!n})}function Rn(t,e){var n;if(e instanceof xe)n={update:An(t,e.key,e.value)};else if(e instanceof Fe)n={delete:In(t,e.key)};else if(e instanceof Pe)n={update:An(t,e.key,e.data),updateMask:Qn(e.Gt)};else{if(!(e instanceof Ue))return v();n={verify:In(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map((function(t){return function(t,e){var n=e.transform;if(n instanceof he)return{fieldPath:e.field.rt(),setToServerValue:"REQUEST_TIME"};if(n instanceof de)return{fieldPath:e.field.rt(),appendMissingElements:{values:n.elements}};if(n instanceof ve)return{fieldPath:e.field.rt(),removeAllFromArray:{values:n.elements}};if(n instanceof ye)return{fieldPath:e.field.rt(),increment:n.Ut};throw v()}(0,t)}))),e.jt.Wt||(n.currentDocument=function(t,e){return void 0!==e.updateTime?{updateTime:On(t,e.updateTime)}:void 0!==e.exists?{exists:e.exists}:v()}(t,e.jt)),n}function Mn(t,e){var n=e.currentDocument?function(t){return void 0!==t.updateTime?Ee.updateTime(Tn(t.updateTime)):void 0!==t.exists?Ee.exists(t.exists):Ee.Kt()}(e.currentDocument):Ee.Kt(),r=e.updateTransforms?e.updateTransforms.map((function(e){return function(t,e){var n=null;if("setToServerValue"in e)m("REQUEST_TIME"===e.setToServerValue),n=new he;else if("appendMissingElements"in e){var r=e.appendMissingElements.values||[];n=new de(r)}else if("removeAllFromArray"in e){var i=e.removeAllFromArray.values||[];n=new ve(i)}else"increment"in e?n=new ye(t,e.increment):v();var o=U.lt(e.fieldPath);return new we(o,n)}(t,e)})):[];if(e.update){e.update.name;var i=Cn(t,e.update.name),o=new pt({mapValue:{fields:e.update.fields}});if(e.updateMask){var a=function(t){var e=t.fieldPaths||[];return new W(e.map((function(t){return U.lt(t)})))}(e.updateMask);return new Pe(i,o,a,n,r)}return new xe(i,o,n,r)}if(e.delete){var s=Cn(t,e.delete);return new Fe(s,n)}if(e.verify){var u=Cn(t,e.verify);return new Ue(u,n)}return v()}function Ln(t,e){return{documents:[Nn(t,e.path)]}}function Fn(t,e){var n={structuredQuery:{}},r=e.path;null!==e.collectionGroup?(n.parent=Nn(t,r),n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(n.parent=Nn(t,r.X()),n.structuredQuery.from=[{collectionId:r.tt()}]);var i=function(t){if(0!==t.length){var e=t.map((function(t){return function(t){if("=="===t.op){if(ht(t.value))return{unaryFilter:{field:Hn(t.field),op:"IS_NAN"}};if(ft(t.value))return{unaryFilter:{field:Hn(t.field),op:"IS_NULL"}}}else if("!="===t.op){if(ht(t.value))return{unaryFilter:{field:Hn(t.field),op:"IS_NOT_NA
2N"}};if(ft(t.value))return{unaryFilter:{field:Hn(t.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Hn(t.field),op:Wn(t.op),value:t.value}}}(t)}));return 1===e.length?e[0]:{compositeFilter:{op:"AND",filters:e}}}}(e.filters);i&&(n.structuredQuery.where=i);var o=function(t){if(0!==t.length)return t.map((function(t){return function(t){return{field:Hn(t.field),direction:zn(t.dir)}}(t)}))}(e.orderBy);o&&(n.structuredQuery.orderBy=o);var a=function(t,e){return t.Bt||J(e)?e:{value:e}}(t,e.limit);return null!==a&&(n.structuredQuery.limit=a),e.startAt&&(n.structuredQuery.startAt=Bn(e.startAt)),e.endAt&&(n.structuredQuery.endAt=Bn(e.endAt)),n}function Un(t){var e=xn(t.parent),n=t.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:e=e.child(o.collectionId)}var a=[];n.where&&(a=Vn(n.where));var s=[];n.orderBy&&(s=n.orderBy.map((function(t){return function(t){return new Lt(Gn(t.field),function(t){switch(t){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(t.direction))}(t)})));var u=null;n.limit&&(u=function(t){var e;return J(e="object"==typeof t?t.value:t)?null:e}(n.limit));var c=null;n.startAt&&(c=qn(n.startAt));var l=null;return n.endAt&&(l=qn(n.endAt)),qt(e,i,s,a,u,"F",c,l)}function Vn(t){return t?void 0!==t.unaryFilter?[Kn(t)]:void 0!==t.fieldFilter?[Yn(t)]:void 0!==t.compositeFilter?t.compositeFilter.filters.map((function(t){return Vn(t)})).reduce((function(t,e){return t.concat(e)})):v():[]}function Bn(t){return{before:t.before,values:t.position}}function qn(t){var e=!!t.before,n=t.values||[];return new Rt(n,e)}function zn(t){return gn[t]}function Wn(t){return bn[t]}function Hn(t){return{fieldPath:t.rt()}}function Gn(t){return U.lt(t.fieldPath)}function Yn(t){return kt.create(Gn(t.fieldFilter.field),function(t){switch(t){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()}}(t.fieldFilter.op),t.fieldFilter.value)}function Kn(t){switch(t.unaryFilter.op){case"IS_NAN":var e=Gn(t.unaryFilter.field);return kt.create(e,"==",{doubleValue:NaN});case"IS_NULL":var n=Gn(t.unaryFilter.field);return kt.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var r=Gn(t.unaryFilter.field);return kt.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=Gn(t.unaryFilter.field);return kt.create(i,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":default:return v()}}function Qn(t){var e=[];return t.fields.forEach((function(t){return e.push(t.rt())})),{fieldPaths:e}}function Xn(t){return t.length>=4&&"projects"===t.get(0)&&"databases"===t.get(2)}var $n=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},Jn=function(){function t(t){var e=this;this.Dn=null,this.Cn=null,this.result=void 0,this.error=void 0,this.xn=!1,this.Nn=!1,t((function(t){e.xn=!0,e.result=t,e.Dn&&e.Dn(t)}),(function(t){e.xn=!0,e.error=t,e.Cn&&e.Cn(t)}))}return t.prototype.catch=function(t){return this.next(void 0,t)},t.prototype.next=function(e,n){var r=this;return this.Nn&&v(),this.Nn=!0,this.xn?this.error?this.$n(n,this.error):this.Fn(e,this.result):new t((function(t,i){r.Dn=function(n){r.Fn(e,n).next(t,i)},r.Cn=function(e){r.$n(n,e).next(t,i)}}))},t.prototype.On=function(){var t=this;return new Promise((function(e,n){t.next(e,n)}))},t.prototype.kn=function(e){try{var n=e();return n instanceof t?n:t.resolve(n)}catch(e){return t.reject(e)}},t.prototype.Fn=function(e,n){return e?this.kn((function(){return e(n)})):t.resolve(n)},t.prototype.$n=function(e,n){return e?this.kn((function(){return e(n)})):t.reject(n)},t.resolve=function(e){return new t((function(t,n){t(e)}))},t.reject=function(e){return new t((function(t,n){n(e)}))},t.Mn=function(e){return new t((function(t,n){var r=0,i=0,o=!1;e.forEach((function(e){++r,e.next((function(){++i,o&&i===r&&t()}),(function(t){return n(t)}))})),o=!0,i===r&&t()}))},t.Ln=function(e){for(var n=t.resolve(!1),r=function(e){n=n.next((function(n){return n?t.resolve(n):e()}))},i=0,o=e;i<o.length;i++)r(o[i]);return n},t.forEach=function(t,e){var n=this,r=[];return t.forEach((function(t,i){r.push(e.call(n,t,i))})),this.Mn(r)},t}(),Zn=function(){function t(t,e){var n=this;this.action=t,this.transaction=e,this.aborted=!1,this.Bn=new $n,this.transaction.oncomplete=function(){n.Bn.resolve()},this.transaction.onabort=function(){e.error?n.Bn.reject(new nr(t,e.error)):n.Bn.resolve()},this.transaction.onerror=function(e){var r=sr(e.target.error);n.Bn.reject(new nr(t,r))}}return t.open=function(e,n,r,i){try{return new t(n,e.transaction(i,r))}catch(e){throw new nr(n,e)}},Object.defineProperty(t.prototype,"qn",{get:function(){return this.Bn.promise}
2,enumerable:!1,configurable:!0}),t.prototype.abort=function(t){t&&this.Bn.reject(t),this.aborted||(f("SimpleDb","Aborting transaction:",t?t.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())},t.prototype.store=function(t){var e=this.transaction.objectStore(t);return new ir(e)},t}(),tr=function(){function e(t,n,r){this.name=t,this.version=n,this.Un=r,12.2===e.Qn(Object(i.p)())&&h("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 e.delete=function(t){return f("SimpleDb","Removing database:",t),or(window.indexedDB.deleteDatabase(t)).On()},e.Kn=function(){if("undefined"==typeof indexedDB)return!1;if(e.Wn())return!0;var t=Object(i.p)(),n=e.Qn(t),r=0<n&&n<10,o=e.jn(t),a=0<o&&o<4.5;return!(t.indexOf("MSIE ")>0||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||r||a)},e.Wn=function(){var e;return"undefined"!=typeof t&&"YES"===(null===(e=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}))||void 0===e?void 0:e.Gn)},e.zn=function(t,e){return t.store(e)},e.Qn=function(t){var e=t.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=e?e[1].split("_").slice(0,2).join("."):"-1";return Number(n)},e.jn=function(t){var e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)},e.prototype.Hn=function(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n=this;return Object(a.d)(this,(function(r){switch(r.label){case 0:return this.db?[3,2]:(f("SimpleDb","Opening database:",this.name),e=this,[4,new Promise((function(e,r){var i=indexedDB.open(n.name,n.version);i.onsuccess=function(t){var n=t.target.result;e(n)},i.onblocked=function(){r(new nr(t,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},i.onerror=function(e){var n=e.target.error;"VersionError"===n.name?r(new S(T.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 nr(t,n))},i.onupgradeneeded=function(t){f("SimpleDb",'Database "'+n.name+'" requires upgrade from version:',t.oldVersion);var e=t.target.result;n.Un.Jn(e,i.transaction,t.oldVersion,n.version).next((function(){f("SimpleDb","Database upgrade to version "+n.version+" complete")}))}}))]);case 1:e.db=r.sent(),r.label=2;case 2:return[2,(this.Yn&&(this.db.onversionchange=function(t){return n.Yn(t)}),this.db)]}}))}))},e.prototype.Xn=function(t){this.Yn=t,this.db&&(this.db.onversionchange=function(e){return t(e)})},e.prototype.runTransaction=function(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o,s,u,c;return Object(a.d)(this,(function(l){switch(l.label){case 0:i="readonly"===e,o=0,s=function(){var e,s,c,l,h;return Object(a.d)(this,(function(a){switch(a.label){case 0:++o,a.label=1;case 1:return a.trys.push([1,4,,5]),[4,u.Hn(t)];case 2:return u.db=a.sent(),e=Zn.open(u.db,t,i?"readonly":"readwrite",n),s=r(e).catch((function(t){return e.abort(t),Jn.reject(t)})).On(),c={},s.catch((function(){})),[4,e.qn];case 3:return[2,(c.value=(a.sent(),s),c)];case 4:return l=a.sent(),h="FirebaseError"!==l.name&&o<3,f("SimpleDb","Transaction failed with error:",l.message,"Retrying:",h),u.close(),h?[3,5]:[2,{value:Promise.reject(l)}];case 5:return[2]}}
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]}}))}))},e.prototype.close=function(){this.db&&this.db.close(),this.db=void 0},e}(),er=function(){function t(t){this.Zn=t,this.ts=!1,this.es=null}return Object.defineProperty(t.prototype,"xn",{get:function(){return this.ts},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ns",{get:function(){return this.es},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cursor",{set:function(t){this.Zn=t},enumerable:!1,configurable:!0}),t.prototype.done=function(){this.ts=!0},t.prototype.ss=function(t){this.es=t},t.prototype.delete=function(){return or(this.Zn.delete())},t}(),nr=function(t){function e(e,n){var r=this;return(r=t.call(this,T.UNAVAILABLE,"IndexedDB transaction '"+e+"' failed: "+n)||this).name="IndexedDbTransactionError",r}return Object(a.c)(e,t),e}(S);function rr(t){return"IndexedDbTransactionError"===t.name}var ir=function(){function t(t){this.store=t}return t.prototype.put=function(t,e){var n;return void 0!==e?(f("SimpleDb","PUT",this.store.name,t,e),n=this.store.put(e,t)):(f("SimpleDb","PUT",this.store.name,"<auto-key>",t),n=this.store.put(t)),or(n)},t.prototype.add=function(t){return f("SimpleDb","ADD",this.store.name,t,t),or(this.store.add(t))},t.prototype.get=function(t){var e=this;return or(this.store.get(t)).next((function(n){return void 0===n&&(n=null),f("SimpleDb","GET",e.store.name,t,n),n}))},t.prototype.delete=function(t){return f("SimpleDb","DELETE",this.store.name,t),or(this.store.delete(t))},t.prototype.count=function(){return f("SimpleDb","COUNT",this.store.name),or(this.store.count())},t.prototype.rs=function(t,e){var n=this.cursor(this.options(t,e)),r=[];return this.os(n,(function(t,e){r.push(e)})).next((function(){return r}))},t.prototype.cs=function(t,e){f("SimpleDb","DELETE ALL",this.store.name);var n=this.options(t,e);n.us=!1;var r=this.cursor(n);return this.os(r,(function(t,e,n){return n.delete()}))},t.prototype.hs=function(t,e){var n;e?n=t:(n={},e=t);var r=this.cursor(n);return this.os(r,e)},t.prototype.ls=function(t){var e=this.cursor({});return new Jn((function(n,r){e.onerror=function(t){var e=sr(t.target.error);r(e)},e.onsuccess=function(e){var r=e.target.result;r?t(r.primaryKey,r.value).next((function(t){t?r.continue():n()})):n()}}))},t.prototype.os=function(t,e){var n=[];return new Jn((function(r,i){t.onerror=function(t){i(t.target.error)},t.onsuccess=function(t){var i=t.target.result;if(i){var o=new er(i),a=e(i.primaryKey,i.value,o);if(a instanceof Jn){var s=a.catch((function(t){return o.done(),Jn.reject(t)}));n.push(s)}o.xn?r():null===o.ns?i.continue():i.continue(o.ns)}else r()}})).next((function(){return Jn.Mn(n)}))},t.prototype.options=function(t,e){var n;return void 0!==t&&("string"==typeof t?n=t:e=t),{index:n,range:e}},t.prototype.cursor=function(t){var e="next";if(t.reverse&&(e="prev"),t.index){var n=this.store.index(t.index);return t.us?n.openKeyCursor(t.range,e):n.openCursor(t.range,e)}return this.store.openCursor(t.range,e)},t}();function or(t){return new Jn((function(e,n){t.onsuccess=function(t){var n=t.target.result;e(n)},t.onerror=function(t){var e=sr(t.target.error);n(e)}}))}var ar=!1;function sr(t){var e=tr.Qn(Object(i.p)());if(e>=12.2&&e<13){var n="An internal error was encountered in the Indexed Database server";if(t.message.indexOf(n)>=0){var r=new S("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 ar||(ar=!0,setTimeout((function(){throw r}),0)),r}}return t}var ur=function(){function t(t,e,n,r,i){this._s=t,this.fs=e,this.ds=n,this.op=r,this.ws=i,this.Es=new $n,this.then=this.Es.promise.then.bind(this.Es.promise),this.Es.promise.catch((function(t){}))}return t.Ts=function(e,n,r,i,o){var a=new t(e,n,Date.now()+r,i,o);return a.start(r),a},t.prototype.start=function(t){var e=this;this.Is=setTimeout((function(){return e.As()}),t)},t.prototype.Rs=function(){return this.As()},t.prototype.cancel=function(t){null!==this.Is&&(this.clearTimeout(),this.Es.reject(new S(T.CANCELLED,"Operation cancelled"+(t?": "+t:"")))
2)},t.prototype.As=function(){var t=this;this._s.Ps((function(){return null!==t.Is?(t.clearTimeout(),t.op().then((function(e){return t.Es.resolve(e)}))):Promise.resolve()}))},t.prototype.clearTimeout=function(){null!==this.Is&&(this.ws(this),clearTimeout(this.Is),this.Is=null)},t}();function cr(t,e){if(h("AsyncQueue",e+": "+t),rr(t))return new S(T.UNAVAILABLE,e+": "+t);throw t}var lr="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",fr=function(){function t(){this.ys=[]}return t.prototype.gs=function(t){this.ys.push(t)},t.prototype.Vs=function(){this.ys.forEach((function(t){return t()}))},t}();function hr(t){for(var e="",n=0;n<t.length;n++)e.length>0&&(e=pr(e)),e=dr(t.get(n),e);return pr(e)}function dr(t,e){for(var n=e,r=t.length,i=0;i<r;i++){var o=t.charAt(i);switch(o){case"\0":n+="\x01\x10";break;case"\x01":n+="\x01\x11";break;default:n+=o}}return n}function pr(t){return t+"\x01\x01"}function vr(t){var e=t.length;if(m(e>=2),2===e)return m("\x01"===t.charAt(0)&&"\x01"===t.charAt(1)),L.ct();for(var n=e-2,r=[],i="",o=0;o<e;){var a=t.indexOf("\x01",o);switch((a<0||a>n)&&v(),t.charAt(a+1)){case"\x01":var s=t.substring(o,a),u=void 0;0===i.length?u=s:(u=i+=s,i=""),r.push(u);break;case"\x10":i+=t.substring(o,a),i+="\0";break;case"\x11":i+=t.substring(o,a+1);break;default:v()}o=a+2}return new L(r)}var mr=function(t,e){this.seconds=t,this.nanoseconds=e},yr=function(t,e,n){this.ownerId=t,this.allowTabSynchronization=e,this.leaseTimestampMs=n};yr.store="owner",yr.key="owner";var gr=function(t,e,n){this.userId=t,this.lastAcknowledgedBatchId=e,this.lastStreamToken=n};gr.store="mutationQueues",gr.keyPath="userId";var br=function(t,e,n,r,i){this.userId=t,this.batchId=e,this.localWriteTimeMs=n,this.baseMutations=r,this.mutations=i};br.store="mutations",br.keyPath="batchId",br.userMutationsIndex="userMutationsIndex",br.userMutationsKeyPath=["userId","batchId"];var wr=function(){function t(){}return t.prefixForUser=function(t){return[t]},t.prefixForPath=function(t,e){return[t,hr(e)]},t.key=function(t,e,n){return[t,hr(e),n]},t}();wr.store="documentMutations",wr.PLACEHOLDER=new wr;var _r=function(t,e){this.path=t,this.readTime=e},Er=function(t,e){this.path=t,this.version=e},Or=function(t,e,n,r,i,o){this.unknownDocument=t,this.noDocument=e,this.document=n,this.hasCommittedMutations=r,this.readTime=i,this.parentPath=o};Or.store="remoteDocuments",Or.readTimeIndex="readTimeIndex",Or.readTimeIndexPath="readTime",Or.collectionReadTimeIndex="collectionReadTimeIndex",Or.collectionReadTimeIndexPath=["parentPath","readTime"];var Tr=function(t){this.byteSize=t};Tr.store="remoteDocumentGlobal",Tr.key="remoteDocumentGlobalKey";var Sr=function(t,e,n,r,i,o,a){this.targetId=t,this.canonicalId=e,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=i,this.lastLimboFreeSnapshotVersion=o,this.query=a};Sr.store="targets",Sr.keyPath="targetId",Sr.queryTargetsIndexName="queryTargetsIndex",Sr.queryTargetsKeyPath=["canonicalId","targetId"];var kr=function(t,e,n){this.targetId=t,this.path=e,this.sequenceNumber=n};kr.store="targetDocuments",kr.keyPath=["targetId","path"],kr.documentTargetsIndex="documentTargetsIndex",kr.documentTargetsKeyPath=["path","targetId"];var Ir=function(t,e,n,r){this.highestTargetId=t,this.highestListenSequenceNumber=e,this.lastRemoteSnapshotVersion=n,this.targetCount=r};Ir.key="targetGlobalKey",Ir.store="targetGlobal";var Cr=function(t,e){this.collectionId=t,this.parent=e};Cr.store="collectionParents",Cr.keyPath=["collectionId","parent"];var Nr=function(t,e,n,r){this.clientId=t,this.updateTimeMs=e,this.networkEnabled=n,this.inForeground=r};Nr.store="clientMetadata",Nr.keyPath="clientId";var xr=function(t,e,n){this.bundleId=t,this.createTime=e,this.version=n};xr.store="bundles",xr.keyPath="bundleId";var Pr=function(t,e,n){this.name=t,this.readTime=e,this.bundledQuery=n};Pr.store="namedQueries",Pr.keyPath="name";var jr=Object(a.g)(Object(a.g)(Object(a.g)(Object(a.g)([gr.store,br.store,wr.store,Or.store,Sr.store,yr.store,Ir.store,kr.store],[Nr.store]),[Tr.store]),[Cr.store]),[xr.store,Pr.store]),Ar=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).ps=e,r.bs=n,r}return Object(a.c)(e,t),e}(fr);function Dr(t,e){var n=y(t);return tr.zn(n.ps,e)}var Rr=function(){function t(t,e,n,r){this.batchId=t,this.vs=e,this.baseMutations=n,this.mutations=r}return t.prototype.Ss=function(t,e,n){for(var r=n.Ds,i=0;i<this.mutations.length;i++){var o=this.mutations[i];o.key.isEqual(t)&&(e=Se(o,e,r[i]))}return e},t.prototype.Cs=function(t,e){for(var n=0,r=this.baseMutations;n<r.length;n++)(a=r[n]).key.isEqual(t)&&(e=ke(a,e,this.vs));for(var i=0,o=this.mutations;i<o.length;i++){var a;(a=o[i]).key.isEqual(t)&&(e=ke(a,e,this.vs))}return e},t.prototype.xs=function(t){var e=this,n=t;return this.mutations.forEach((function(r){var i=e.Cs(r.key,t.get(r.key));i&&(n=n.zt(r.key,i))})),n},t.prototype.keys=function(){return this.mutations.reduce((function(t,e){return t.add(e.key)}),nn())},t.prototype.isEqual=function(t){return this.batchId===t.batchId&&_(this.mutations,t.mutations,(function(t,e){return Ce(t,e)}))&&_(this.baseMutations,t.baseMutations,(function(t,e){return Ce(t,e)}))},t}(),Mr=function(){function t(t,e,n,r){this.batch=t,this.Ns=e,this.Ds=n,this.$s=r}return t.from=function(e,n,r){m(e.mutations.length===r.length);for(var i=tn(),o=e.mutations,a=0;a<o.length;
2a++)i=i.zt(o[a].key,r[a].version);return new t(e,n,r,i)},t}(),Lr=function(t){this.Fs=t};function Fr(t,e){if(e.document)return Dn(t.Fs,e.document,!!e.hasCommittedMutations);if(e.noDocument){var n=V.Et(e.noDocument.path),r=zr(e.noDocument.readTime);return new bt(n,r,{hasCommittedMutations:!!e.hasCommittedMutations})}if(e.unknownDocument){var i=V.Et(e.unknownDocument.path);return r=zr(e.unknownDocument.version),new wt(i,r)}return v()}function Ur(t,e,n){var r=Vr(n),i=e.key.path.X().it();if(e instanceof gt){var o=function(t,e){return{name:In(t,e.key),fields:e.bt().mapValue.fields,updateTime:_n(t,e.version.j())}}(t.Fs,e),a=e.hasCommittedMutations;return new Or(null,null,o,a,r,i)}if(e instanceof bt){var s=e.key.path.it(),u=qr(e.version);return a=e.hasCommittedMutations,new Or(null,new _r(s,u),null,a,r,i)}if(e instanceof wt){var c=e.key.path.it(),l=qr(e.version);return new Or(new Er(c,l),null,null,!0,r,i)}return v()}function Vr(t){var e=t.j();return[e.seconds,e.nanoseconds]}function Br(t){var e=new D(t[0],t[1]);return R.K(e)}function qr(t){var e=t.j();return new mr(e.seconds,e.nanoseconds)}function zr(t){var e=new D(t.seconds,t.nanoseconds);return R.K(e)}function Wr(t,e){for(var n=(e.baseMutations||[]).map((function(e){return Mn(t.Fs,e)})),r=0;r<e.mutations.length-1;++r){var i=e.mutations[r];if(r+1<e.mutations.length&&void 0!==e.mutations[r+1].transform){var o=e.mutations[r+1];i.updateTransforms=o.transform.fieldTransforms,e.mutations.splice(r+1,1),++r}}var a=e.mutations.map((function(e){return Mn(t.Fs,e)})),s=D.fromMillis(e.localWriteTimeMs);return new Rr(e.batchId,s,n,a)}function Hr(t){var e,n,r=zr(t.readTime),i=void 0!==t.lastLimboFreeSnapshotVersion?zr(t.lastLimboFreeSnapshotVersion):R.min();return void 0!==t.query.documents?(m(1===(n=t.query).documents.length),e=Xt(zt(xn(n.documents[0])))):e=function(t){return Xt(Un(t))}(t.query),new ie(e,t.targetId,0,t.lastListenSequenceNumber,r,i,O.fromBase64String(t.resumeToken))}function Gr(t,e){var n,r=qr(e.Ot),i=qr(e.lastLimboFreeSnapshotVersion);n=St(e.target)?Ln(t.Fs,e.target):Fn(t.Fs,e.target);var o=e.resumeToken.toBase64();return new Sr(e.targetId,Ot(e.target),r,o,e.sequenceNumber,i,n)}function Yr(t){var e=Un({parent:t.parent,structuredQuery:t.structuredQuery});return"LAST"===t.limitType?$t(e,e.limit,"L"):e}var Kr=function(){function t(){}return t.prototype.Os=function(t,e){return Qr(t).get(e).next((function(t){if(t)return{id:(e=t).bundleId,createTime:zr(e.createTime),version:e.version};var e}))},t.prototype.ks=function(t,e){return Qr(t).put({bundleId:(n=e).id,createTime:qr(Tn(n.createTime)),version:n.version});var n},t.prototype.Ms=function(t,e){return Xr(t).get(e).next((function(t){if(t)return{name:(e=t).name,query:Yr(e.bundledQuery),readTime:zr(e.readTime)};var e}))},t.prototype.Ls=function(t,e){return Xr(t).put(function(t){return{name:t.name,readTime:qr(Tn(t.readTime)),bundledQuery:t.bundledQuery}}(e))},t}();function Qr(t){return Dr(t,xr.store)}function Xr(t){return Dr(t,Pr.store)}var $r=function(){function t(){this.Bs=new Jr}return t.prototype.qs=function(t,e){return this.Bs.add(e),Jn.resolve()},t.prototype.Us=function(t,e){return Jn.resolve(this.Bs.getEntries(e))},t}(),Jr=function(){function t(){this.index={}}return t.prototype.add=function(t){var e=t.tt(),n=t.X(),r=this.index[e]||new Ge(L.H),i=!r.has(n);return this.index[e]=r.add(n),i},t.prototype.has=function(t){var e=t.tt(),n=t.X(),r=this.index[e];return r&&r.has(n)},t.prototype.getEntries=function(t){return(this.index[t]||new Ge(L.H)).it()},t}(),Zr=function(){function t(){this.Qs=new Jr}return t.prototype.qs=function(t,e){var n=this;if(!this.Qs.has(e)){var r=e.tt(),i=e.X();t.gs((function(){n.Qs.add(e)}));var o={collectionId:r,parent:hr(i)};return ti(t).put(o)}return Jn.resolve()},t.prototype.Us=function(t,e){var n=[],r=IDBKeyRange.bound([e,""],[E(e),""],!1,!0);return ti(t).rs(r).next((function(t){for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.collectionId!==e)break;n.push(vr(o.parent))}return n}))},t}();function ti(t){return Dr(t,Cr.store)}var ei={Ks:!1,Ws:0,js:0,Gs:0},ni=function(){function t(t,e,n){this.zs=t,this.Hs=e,this.Js=n}return t.Ys=function(e){return new t(e,t.Xs,t.Zs)},t}();function ri(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){if(t.code!==T.FAILED_PRECONDITION||t.message!==lr)throw t;return f("LocalStore","Unexpectedly lost primary lease"),[2]}))}
2))}ni.Xs=10,ni.Zs=1e3,ni.ti=new ni(41943040,ni.Xs,ni.Zs),ni.ei=new ni(-1,0,0);var ii=function(){function t(t,e){this.ni=t,this.si=e,this.ii={}}return t.prototype.get=function(t){var e=this.ni(t),n=this.ii[e];if(void 0!==n)for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];if(this.si(a,t))return s}},t.prototype.has=function(t){return void 0!==this.get(t)},t.prototype.set=function(t,e){var n=this.ni(t),r=this.ii[n];if(void 0!==r){for(var i=0;i<r.length;i++)if(this.si(r[i][0],t))return void(r[i]=[t,e]);r.push([t,e])}else this.ii[n]=[[t,e]]},t.prototype.delete=function(t){var e=this.ni(t),n=this.ii[e];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(this.si(n[r][0],t))return 1===n.length?delete this.ii[e]:n.splice(r,1),!0;return!1},t.prototype.forEach=function(t){q(this.ii,(function(e,n){for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];t(a,s)}}))},t.prototype.et=function(){return z(this.ii)},t}(),oi=function(){function t(){this.ri=new ii((function(t){return t.toString()}),(function(t,e){return t.isEqual(e)})),this.oi=!1}return t.prototype.ci=function(t){var e=this.ri.get(t);return e?e.readTime:R.min()},t.prototype.ai=function(t,e){this.ui(),this.ri.set(t.key,{hi:t,readTime:e})},t.prototype.li=function(t,e){void 0===e&&(e=null),this.ui(),this.ri.set(t,{hi:null,readTime:e})},t.prototype._i=function(t,e){this.ui();var n=this.ri.get(e);return void 0!==n?Jn.resolve(n.hi):this.fi(t,e)},t.prototype.getEntries=function(t,e){return this.di(t,e)},t.prototype.apply=function(t){return this.ui(),this.oi=!0,this.wi(t)},t.prototype.ui=function(){},t}();function ai(t,e,n){var r=t.store(br.store),i=t.store(wr.store),o=[],a=IDBKeyRange.only(n.batchId),s=0,u=r.hs({range:a},(function(t,e,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=wr.key(e,h.key.path,n.batchId);o.push(i.delete(d)),c.push(h.key)}return Jn.Mn(o).next((function(){return c}))}function si(t){var e;if(t.document)e=t.document;else if(t.unknownDocument)e=t.unknownDocument;else{if(!t.noDocument)throw v();e=t.noDocument}return JSON.stringify(e).length}var ui=function(){function t(t,e,n,r){this.userId=t,this.Qt=e,this.Ei=n,this.Ti=r,this.Ii={}}return t.mi=function(e,n,r,i){return m(""!==e.uid),new t(e.m()?e.uid:"",n,r,i)},t.prototype.Ai=function(t){var e=!0,n=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return li(t).hs({index:br.userMutationsIndex,range:n},(function(t,n,r){e=!1,r.done()})).next((function(){return e}))},t.prototype.Ri=function(t,e,n,r){var i=this,o=fi(t),a=li(t);return a.add({}).next((function(s){m("number"==typeof s);for(var u=new Rr(s,e,n,r),c=function(t,e,n){var r=n.baseMutations.map((function(e){return Rn(t.Fs,e)})),i=n.mutations.map((function(e){return Rn(t.Fs,e)}));return new br(e,n.batchId,n.vs.toMillis(),r,i)}(i.Qt,i.userId,u),l=[],f=new Ge((function(t,e){return w(t.rt(),e.rt())})),h=0,d=r;h<d.length;h++){var p=d[h],v=wr.key(i.userId,p.key.path,s);f=f.add(p.key.path.X()),l.push(a.put(c)),l.push(o.put(v,wr.PLACEHOLDER))}return f.forEach((function(e){l.push(i.Ei.qs(t,e))})),t.gs((function(){i.Ii[s]=u.keys()})),Jn.Mn(l).next((function(){return u}))}))},t.prototype.Pi=function(t,e){var n=this;return li(t).get(e).next((function(t){return t?(m(t.userId===n.userId),Wr(n.Qt,t)):null}))},t.prototype.yi=function(t,e){var n=this;return this.Ii[e]?Jn.resolve(this.Ii[e]):this.Pi(t,e).next((function(t){if(t){var r=t.keys();return n.Ii[e]=r,r}return null}))},t.prototype.gi=function(t,e){var n=this,r=e+1,i=IDBKeyRange.lowerBound([this.userId,r]),o=null;return li(t).hs({index:br.userMutationsIndex,range:i},(function(t,e,i){e.userId===n.userId&&(m(e.batchId>=r),o=Wr(n.Qt,e)),i.done()})).next((function(){return o}))},t.prototype.Vi=function(t){var e=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),n=-1;return li(t).hs({index:br.userMutationsIndex,range:e,reverse:!0},(function(t,e,r){n=e.batchId,r.done()})).next((function(){return n}))},t.prototype.pi=function(t){var e=this,n=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return li(t).rs(br.userMutationsIndex,n).next((function(t){return t.map((function(t){return Wr(e.Qt,t)}))}))},t.prototype.bi=function(t,e){var n=this,r=wr.prefixForPath(this.userId,e.path),i=IDBKeyRange.lowerBound(r),o=[];return fi(t).hs({range:i},(function(r,i,a){var s=r[0],u=r[1],c=r[2],l=vr(u);if(s===n.userId&&e.path.isEqual(l))return li(t).get(c).next((function(t){if(!t)throw v();m(t.userId===n.userId),o.push(Wr(n.Qt,t))}));a.done()})).next((function(){return o}
2))},t.prototype.vi=function(t,e){var n=this,r=new Ge(w),i=[];return e.forEach((function(e){var o=wr.prefixForPath(n.userId,e.path),a=IDBKeyRange.lowerBound(o),s=fi(t).hs({range:a},(function(t,i,o){var a=t[0],s=t[1],u=t[2],c=vr(s);a===n.userId&&e.path.isEqual(c)?r=r.add(u):o.done()}));i.push(s)})),Jn.Mn(i).next((function(){return n.Si(t,r)}))},t.prototype.Di=function(t,e){var n=this,r=e.path,i=r.length+1,o=wr.prefixForPath(this.userId,r),a=IDBKeyRange.lowerBound(o),s=new Ge(w);return fi(t).hs({range:a},(function(t,e,o){var a=t[0],u=t[1],c=t[2],l=vr(u);a===n.userId&&r.nt(l)?l.length===i&&(s=s.add(c)):o.done()})).next((function(){return n.Si(t,s)}))},t.prototype.Si=function(t,e){var n=this,r=[],i=[];return e.forEach((function(e){i.push(li(t).get(e).next((function(t){if(null===t)throw v();m(t.userId===n.userId),r.push(Wr(n.Qt,t))})))})),Jn.Mn(i).next((function(){return r}))},t.prototype.Ci=function(t,e){var n=this;return ai(t.ps,this.userId,e).next((function(r){return t.gs((function(){n.xi(e.batchId)})),Jn.forEach(r,(function(e){return n.Ti.Ni(t,e)}))}))},t.prototype.xi=function(t){delete this.Ii[t]},t.prototype.$i=function(t){var e=this;return this.Ai(t).next((function(n){if(!n)return Jn.resolve();var r=IDBKeyRange.lowerBound(wr.prefixForUser(e.userId)),i=[];return fi(t).hs({range:r},(function(t,n,r){if(t[0]===e.userId){var o=vr(t[1]);i.push(o)}else r.done()})).next((function(){m(0===i.length)}))}))},t.prototype.Fi=function(t,e){return ci(t,this.userId,e)},t.prototype.Oi=function(t){var e=this;return hi(t).get(this.userId).next((function(t){return t||new gr(e.userId,-1,"")}))},t}();function ci(t,e,n){var r=wr.prefixForPath(e,n.path),i=r[1],o=IDBKeyRange.lowerBound(r),a=!1;return fi(t).hs({range:o,us:!0},(function(t,n,r){var o=t[0],s=t[1];t[2],o===e&&s===i&&(a=!0),r.done()})).next((function(){return a}))}function li(t){return Dr(t,br.store)}function fi(t){return Dr(t,wr.store)}function hi(t){return Dr(t,gr.store)}var di=function(){function t(t){this.ki=t}return t.prototype.next=function(){return this.ki+=2,this.ki},t.Mi=function(){return new t(0)},t.Li=function(){return new t(-1)},t}(),pi=function(){function t(t,e){this.Ti=t,this.Qt=e}return t.prototype.Bi=function(t){var e=this;return this.qi(t).next((function(n){var r=new di(n.highestTargetId);return n.highestTargetId=r.next(),e.Ui(t,n).next((function(){return n.highestTargetId}))}))},t.prototype.Qi=function(t){return this.qi(t).next((function(t){return R.K(new D(t.lastRemoteSnapshotVersion.seconds,t.lastRemoteSnapshotVersion.nanoseconds))}))},t.prototype.Ki=function(t){return this.qi(t).next((function(t){return t.highestListenSequenceNumber}))},t.prototype.Wi=function(t,e,n){var r=this;return this.qi(t).next((function(i){return i.highestListenSequenceNumber=e,n&&(i.lastRemoteSnapshotVersion=n.j()),e>i.highestListenSequenceNumber&&(i.highestListenSequenceNumber=e),r.Ui(t,i)}))},t.prototype.ji=function(t,e){var n=this;return this.Gi(t,e).next((function(){return n.qi(t).next((function(r){return r.targetCount+=1,n.zi(e,r),n.Ui(t,r)}))}))},t.prototype.Hi=function(t,e){return this.Gi(t,e)},t.prototype.Ji=function(t,e){var n=this;return this.Yi(t,e.targetId).next((function(){return vi(t).delete(e.targetId)})).next((function(){return n.qi(t)})).next((function(e){return m(e.targetCount>0),e.targetCount-=1,n.Ui(t,e)}))},t.prototype.Xi=function(t,e,n){var r=this,i=0,o=[];return vi(t).hs((function(a,s){var u=Hr(s);u.sequenceNumber<=e&&null===n.get(u.targetId)&&(i++,o.push(r.Ji(t,u)))})).next((function(){return Jn.Mn(o)})).next((function(){return i}))},t.prototype.In=function(t,e){return vi(t).hs((function(t,n){var r=Hr(n);e(r)}))},t.prototype.qi=function(t){return mi(t).get(Ir.key).next((function(t){return m(null!==t),t}))},t.prototype.Ui=function(t,e){return mi(t).put(Ir.key,e)},t.prototype.Gi=function(t,e){return vi(t).put(Gr(this.Qt,e))},t.prototype.zi=function(t,e){var n=!1;return t.targetId>e.highestTargetId&&(e.highestTargetId=t.targetId,n=!0),t.sequenceNumber>e.highestListenSequenceNumber&&(e.highestListenSequenceNumber=t.sequenceNumber,n=!0),n},t.prototype.Zi=function(t){return this.qi(t).next((function(t){return t.targetCount}))},t.prototype.tr=function(t,e){var n=Ot(e),r=IDBKeyRange.bound([n,Number.NEGATIVE_INFINITY],[n,Number.POSITIVE_INFINITY]),i=null;return vi(t).hs({range:r,index:Sr.queryTargetsIndexName},(function(t,n,r){var o=Hr(n);Tt(e,o.target)&&(i=o,r.done())})).next((function(){return i}))},t.prototype.er=function(t,e,n){var r=this,i=[],o=yi(t);return e.forEach((function(e){var a=hr(e.path);i.push(o.put(new kr(n,a))),i.push(r.Ti.nr(t,n,e))})),Jn.Mn(i)},t.prototype.sr=function(t,e,n){var r=this,i=yi(t);
2return Jn.forEach(e,(function(e){var o=hr(e.path);return Jn.Mn([i.delete([n,o]),r.Ti.ir(t,n,e)])}))},t.prototype.Yi=function(t,e){var n=yi(t),r=IDBKeyRange.bound([e],[e+1],!1,!0);return n.delete(r)},t.prototype.rr=function(t,e){var n=IDBKeyRange.bound([e],[e+1],!1,!0),r=yi(t),i=nn();return r.hs({range:n,us:!0},(function(t,e,n){var r=vr(t[1]),o=new V(r);i=i.add(o)})).next((function(){return i}))},t.prototype.Fi=function(t,e){var n=hr(e.path),r=IDBKeyRange.bound([n],[E(n)],!1,!0),i=0;return yi(t).hs({index:kr.documentTargetsIndex,us:!0,range:r},(function(t,e,n){var r=t[0];t[1],0!==r&&(i++,n.done())})).next((function(){return i>0}))},t.prototype.Sn=function(t,e){return vi(t).get(e).next((function(t){return t?Hr(t):null}))},t}();function vi(t){return Dr(t,Sr.store)}function mi(t){return Dr(t,Ir.store)}function yi(t){return Dr(t,kr.store)}function gi(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=w(n,i);return 0===a?w(r,o):a}var bi=function(){function t(t){this.cr=t,this.buffer=new Ge(gi),this.ar=0}return t.prototype.ur=function(){return++this.ar},t.prototype.hr=function(t){var e=[t,this.ur()];if(this.buffer.size<this.cr)this.buffer=this.buffer.add(e);else{var n=this.buffer.last();gi(e,n)<0&&(this.buffer=this.buffer.delete(n).add(e))}},Object.defineProperty(t.prototype,"maxValue",{get:function(){return this.buffer.last()[0]},enumerable:!1,configurable:!0}),t}(),wi=function(){function t(t,e){this.lr=t,this._s=e,this._r=!1,this.dr=null}return t.prototype.start=function(t){-1!==this.lr.params.zs&&this.wr(t)},t.prototype.stop=function(){this.dr&&(this.dr.cancel(),this.dr=null)},Object.defineProperty(t.prototype,"Er",{get:function(){return null!==this.dr},enumerable:!1,configurable:!0}),t.prototype.wr=function(t){var e=this,n=this._r?3e5:6e4;f("LruGarbageCollector","Garbage collection scheduled in "+n+"ms"),this.dr=this._s.Tr("lru_garbage_collection",n,(function(){return Object(a.b)(e,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:this.dr=null,this._r=!0,n.label=1;case 1:return n.trys.push([1,3,,7]),[4,t.Ir(this.lr)];case 2:return n.sent(),[3,7];case 3:return rr(e=n.sent())?(f("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",e),[3,6]):[3,4];case 4:return[4,ri(e)];case 5:n.sent(),n.label=6;case 6:return[3,7];case 7:return[4,this.wr(t)];case 8:return n.sent(),[2]}}))}))}))},t}(),_i=function(){function t(t,e){this.mr=t,this.params=e}return t.prototype.Ar=function(t,e){return this.mr.Rr(t).next((function(t){return Math.floor(e/100*t)}))},t.prototype.Pr=function(t,e){var n=this;if(0===e)return Jn.resolve(A.q);var r=new bi(e);return this.mr.In(t,(function(t){return r.hr(t.sequenceNumber)})).next((function(){return n.mr.yr(t,(function(t){return r.hr(t)}))})).next((function(){return r.maxValue}))},t.prototype.Xi=function(t,e,n){return this.mr.Xi(t,e,n)},t.prototype.gr=function(t,e){return this.mr.gr(t,e)},t.prototype.Vr=function(t,e){var n=this;return-1===this.params.zs?(f("LruGarbageCollector","Garbage collection skipped; disabled"),Jn.resolve(ei)):this.pr(t).next((function(r){return r<n.params.zs?(f("LruGarbageCollector","Garbage collection skipped; Cache size "+r+" is lower than threshold "+n.params.zs),ei):n.br(t,e)}))},t.prototype.pr=function(t){return this.mr.pr(t)},t.prototype.br=function(t,e){var n,i,o,a,s,u,c,h=this,d=Date.now();return this.Ar(t,this.params.Hs).next((function(e){return e>h.params.Js?(f("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of "+h.params.Js+" from "+e),i=h.params.Js):i=e,a=Date.now(),h.Pr(t,i)})).next((function(r){return n=r,s=Date.now(),h.Xi(t,n,e)})).next((function(e){return o=e,u=Date.now(),h.gr(t,n)})).next((function(t){return c=Date.now(),l()<=r.a.DEBUG&&f("LruGarbageCollector","LRU Garbage Collection\n\tCounted targets in "+(a-d)+"ms\n\tDetermined least recently used "+i+" in "+(s-a)+"ms\n\tRemoved "+o+" targets in "+(u-s)+"ms\n\tRemoved "+t+" documents in "+(c-u)+"ms\nTotal Duration: "+(c-d)+"ms"),Jn.resolve({Ks:!0,Ws:i,js:o,Gs:t})}))},t}(),Ei=function(){function t(t,e){this.db=t,this.lr=function(t,e){return new _i(t,e)}(this,e)}return t.prototype.Rr=function(t){var e=this.vr(t);return this.db.Sr().Zi(t).next((function(t){return e.next((function(e){return t+e}))}))},t.prototype.vr=function(t){var e=0;return this.yr(t,(function(t){e++})).next((function(){return e}))},t.prototype.In=function(t,e){return this.db.Sr().In(t,e)},t.prototype.yr=function(t,e){return this.Dr(t,(function(t,n){return e(n)}))},t.prototype.nr=function(t,e,n){return Oi(t,n)},t.prototype.ir=function(t,e,n){return Oi(t,n)},t.prototype.Xi=function(t,e,n){return this.db.Sr().Xi(t,e,n)},t.prototype.Ni=function(t,e){return Oi(t,e)},t.prototype.Cr=function(t,e){return function(t,e){var n=!1;return hi(t).ls((function(r){return ci(t,r,e).next((function(t){return t&&(n=!0),Jn.resolve(!t)}))})).next((function(){return n}))}(t,e)},t.prototype.gr=function(t,e){var n=this,r=this.db.$r().Nr(),i=[],o=0;return this.Dr(t,(function(a,s){if(s<=e){var u=n.Cr(t,a).next((function(e){if(!e)return o++,r._i(t,a).next((function(){return r.li(a),yi(t).delete([0,hr(a.path)])}))}));i.push(u)}})).next((function(){return Jn.Mn(i)})).next((function(){return r.apply(t)})).next((function(){return o}
2))},t.prototype.removeTarget=function(t,e){var n=e.kt(t.bs);return this.db.Sr().Hi(t,n)},t.prototype.Fr=function(t,e){return Oi(t,e)},t.prototype.Dr=function(t,e){var n,r=yi(t),i=A.q;return r.hs({index:kr.documentTargetsIndex},(function(t,r){var o=t[0],a=(t[1],r.path),s=r.sequenceNumber;0===o?(i!==A.q&&e(new V(vr(n)),i),i=s,n=a):i=A.q})).next((function(){i!==A.q&&e(new V(vr(n)),i)}))},t.prototype.pr=function(t){return this.db.$r().Or(t)},t}();function Oi(t,e){return yi(t).put(function(t,e){return new kr(0,hr(t.path),e)}(e,t.bs))}var Ti=function(){function t(t,e){this.Qt=t,this.Ei=e}return t.prototype.ai=function(t,e,n){return Ii(t).put(Ci(e),n)},t.prototype.li=function(t,e){var n=Ii(t),r=Ci(e);return n.delete(r)},t.prototype.updateMetadata=function(t,e){var n=this;return this.getMetadata(t).next((function(r){return r.byteSize+=e,n.kr(t,r)}))},t.prototype._i=function(t,e){var n=this;return Ii(t).get(Ci(e)).next((function(t){return n.Mr(t)}))},t.prototype.Lr=function(t,e){var n=this;return Ii(t).get(Ci(e)).next((function(t){var e=n.Mr(t);return e?{hi:e,size:si(t)}:null}))},t.prototype.getEntries=function(t,e){var n=this,r=Xe();return this.Br(t,e,(function(t,e){var i=n.Mr(e);r=r.zt(t,i)})).next((function(){return r}))},t.prototype.qr=function(t,e){var n=this,r=Xe(),i=new ze(V.H);return this.Br(t,e,(function(t,e){var o=n.Mr(e);o?(r=r.zt(t,o),i=i.zt(t,si(e))):(r=r.zt(t,null),i=i.zt(t,0))})).next((function(){return{Ur:r,Qr:i}}))},t.prototype.Br=function(t,e,n){if(e.et())return Jn.resolve();var r=IDBKeyRange.bound(e.first().path.it(),e.last().path.it()),i=e.te(),o=i.oe();return Ii(t).hs({range:r},(function(t,e,r){for(var a=V.Et(t);o&&V.H(o,a)<0;)n(o,null),o=i.oe();o&&o.isEqual(a)&&(n(o,e),o=i.ce()?i.oe():null),o?r.ss(o.path.it()):r.done()})).next((function(){for(;o;)n(o,null),o=i.ce()?i.oe():null}))},t.prototype.Kr=function(t,e,n){var r=this,i=Je(),o=e.path.length+1,a={};if(n.isEqual(R.min())){var s=e.path.it();a.range=IDBKeyRange.lowerBound(s)}else{var u=e.path.it(),c=Vr(n);a.range=IDBKeyRange.lowerBound([u,c],!0),a.index=Or.collectionReadTimeIndex}return Ii(t).hs(a,(function(t,n,a){if(t.length===o){var s=Fr(r.Qt,n);e.path.nt(s.key.path)?s instanceof gt&&ee(e,s)&&(i=i.zt(s.key,s)):a.done()}})).next((function(){return i}))},t.prototype.Nr=function(t){return new Si(this,!!t&&t.Wr)},t.prototype.Or=function(t){return this.getMetadata(t).next((function(t){return t.byteSize}))},t.prototype.getMetadata=function(t){return ki(t).get(Tr.key).next((function(t){return m(!!t),t}))},t.prototype.kr=function(t,e){return ki(t).put(Tr.key,e)},t.prototype.Mr=function(t){if(t){var e=Fr(this.Qt,t);return e instanceof bt&&e.version.isEqual(R.min())?null:e}return null},t}(),Si=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).jr=e,r.Wr=n,r.Gr=new ii((function(t){return t.toString()}),(function(t,e){return t.isEqual(e)})),r}return Object(a.c)(e,t),e.prototype.wi=function(t){var e=this,n=[],r=0,i=new Ge((function(t,e){return w(t.rt(),e.rt())}));return this.ri.forEach((function(o,a){var s=e.Gr.get(o);if(a.hi){var u=Ur(e.jr.Qt,a.hi,e.ci(o));i=i.add(o.path.X());var c=si(u);r+=c-s,n.push(e.jr.ai(t,o,u))}else if(r-=s,e.Wr){var l=Ur(e.jr.Qt,new bt(o,R.min()),e.ci(o));n.push(e.jr.ai(t,o,l))}else n.push(e.jr.li(t,o))})),i.forEach((function(r){n.push(e.jr.Ei.qs(t,r))})),n.push(this.jr.updateMetadata(t,r)),Jn.Mn(n)},e.prototype.fi=function(t,e){var n=this;return this.jr.Lr(t,e).next((function(t){return null===t?(n.Gr.set(e,0),null):(n.Gr.set(e,t.size),t.hi)}))},e.prototype.di=function(t,e){var n=this;return this.jr.qr(t,e).next((function(t){var e=t.Ur;return t.Qr.forEach((function(t,e){n.Gr.set(t,e)})),e}))},e}(oi);function ki(t){return Dr(t,Tr.store)}function Ii(t){return Dr(t,Or.store)}function Ci(t){return t.path.it()}var Ni=function(){function t(t){this.Qt=t}return t.prototype.Jn=function(t,e,n,r){var i=this;m(n<r&&n>=0&&r<=11);var o=new Zn("createOrUpgrade",e);n<1&&r>=1&&(function(t){t.createObjectStore(yr.store)}(t),function(t){t.createObjectStore(gr.store,{keyPath:gr.keyPath}),t.createObjectStore(br.store,{keyPath:br.keyPath,autoIncrement:!0}).createIndex(br.userMutationsIndex,br.userMutationsKeyPath,{unique:!0}),t.createObjectStore(wr.store)}(t),xi(t),function(t){t.createObjectStore(Or.store)}(t));var a=Jn.resolve();return n<3&&r>=3&&(0!==n&&(function(t){t.deleteObjectStore(kr.store),t.deleteObjectStore(Sr.store),t.deleteObjectStore(Ir.store)}(t),xi(t)),a=a.next((function(){return function(t){var e=t.store(Ir.store),n=new Ir(0,0,R.min().j(),0);return e.put(Ir.key,n)}(o)}))),n<4&&r>=4&&(0!==n&&(a=a.next((function(){return function(t,e){return e.store(br.store).rs().next((function(n){t.deleteObjectStore(br.store),t.createObjectStore(br.store,{keyPath:br.keyPath,autoIncrement:!0}).createIndex(br.userMutationsIndex,br.userMutationsKeyPath,{unique:!0});var r=e.store(br.store),i=n.map((function(t){return r.put(t)}));return Jn.Mn(i)}))}(t,o)}))),a=a.next((function(){!function(t){t.createObjectStore(Nr.store,{keyPath:Nr.keyPath})}(t)}))),n<5&&r>=5&&(a=a.next((function(){return i.zr(o)}))),n<6&&r>=6&&(a=a.next((function(){return function(t){t.createObjectStore(Tr.store)}(t),i.Hr(o)}))),n<7&&r>=7&&(a=a.next((function(){return i.Jr(o)}))),n<8&&r>=8&&(a=a.next((function(){return i.Yr(t,o)}))),n<9&&r>=9&&(a=a.next((function(){!function(t){t.objectStoreNames.contains("remoteDocumentChanges")&&t.deleteObjectStore("remoteDocumentChanges")}
2(t),function(t){var e=t.objectStore(Or.store);e.createIndex(Or.readTimeIndex,Or.readTimeIndexPath,{unique:!1}),e.createIndex(Or.collectionReadTimeIndex,Or.collectionReadTimeIndexPath,{unique:!1})}(e)}))),n<10&&r>=10&&(a=a.next((function(){return i.Xr(o)}))),n<11&&r>=11&&(a=a.next((function(){!function(t){t.createObjectStore(xr.store,{keyPath:xr.keyPath})}(t),function(t){t.createObjectStore(Pr.store,{keyPath:Pr.keyPath})}(t)}))),a},t.prototype.Hr=function(t){var e=0;return t.store(Or.store).hs((function(t,n){e+=si(n)})).next((function(){var n=new Tr(e);return t.store(Tr.store).put(Tr.key,n)}))},t.prototype.zr=function(t){var e=this,n=t.store(gr.store),r=t.store(br.store);return n.rs().next((function(n){return Jn.forEach(n,(function(n){var i=IDBKeyRange.bound([n.userId,-1],[n.userId,n.lastAcknowledgedBatchId]);return r.rs(br.userMutationsIndex,i).next((function(r){return Jn.forEach(r,(function(r){m(r.userId===n.userId);var i=Wr(e.Qt,r);return ai(t,n.userId,i).next((function(){}))}))}))}))}))},t.prototype.Jr=function(t){var e=t.store(kr.store),n=t.store(Or.store);return t.store(Ir.store).get(Ir.key).next((function(t){var r=[];return n.hs((function(n,i){var o=new L(n),a=function(t){return[0,hr(t)]}(o);r.push(e.get(a).next((function(n){return n?Jn.resolve():function(n){return e.put(new kr(0,hr(n),t.highestListenSequenceNumber))}(o)})))})).next((function(){return Jn.Mn(r)}))}))},t.prototype.Yr=function(t,e){t.createObjectStore(Cr.store,{keyPath:Cr.keyPath});var n=e.store(Cr.store),r=new Jr,i=function(t){if(r.add(t)){var e=t.tt(),i=t.X();return n.put({collectionId:e,parent:hr(i)})}};return e.store(Or.store).hs({us:!0},(function(t,e){var n=new L(t);return i(n.X())})).next((function(){return e.store(wr.store).hs({us:!0},(function(t,e){t[0];var n=t[1],r=(t[2],vr(n));return i(r.X())}))}))},t.prototype.Xr=function(t){var e=this,n=t.store(Sr.store);return n.hs((function(t,r){var i=Hr(r),o=Gr(e.Qt,i);return n.put(o)}))},t}();function xi(t){t.createObjectStore(kr.store,{keyPath:kr.keyPath}).createIndex(kr.documentTargetsIndex,kr.documentTargetsKeyPath,{unique:!0}),t.createObjectStore(Sr.store,{keyPath:Sr.keyPath}).createIndex(Sr.queryTargetsIndexName,Sr.queryTargetsKeyPath,{unique:!0}),t.createObjectStore(Ir.store)}var Pi="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.",ji=function(){function t(e,n,r,i,o,a,s,u,c,l){if(this.allowTabSynchronization=e,this.persistenceKey=n,this.clientId=r,this.Zr=o,this.window=a,this.document=s,this.eo=c,this.no=l,this.so=null,this.io=!1,this.isPrimary=!1,this.networkEnabled=!0,this.ro=null,this.inForeground=!1,this.oo=null,this.co=null,this.ao=Number.NEGATIVE_INFINITY,this.uo=function(t){return Promise.resolve()},!t.Kn())throw new S(T.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.Ti=new Ei(this,i),this.ho=n+"main",this.Qt=new Lr(u),this.lo=new tr(this.ho,11,new Ni(this.Qt)),this._o=new pi(this.Ti,this.Qt),this.Ei=new Zr,this.fo=function(t,e){return new Ti(t,e)}(this.Qt,this.Ei),this.wo=new Kr,this.window&&this.window.localStorage?this.Eo=this.window.localStorage:(this.Eo=null,!1===l&&h("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}return t.prototype.start=function(){var t=this;return this.To().then((function(){if(!t.isPrimary&&!t.allowTabSynchronization)throw new S(T.FAILED_PRECONDITION,Pi);return t.Io(),t.mo(),t.Ao(),t.runTransaction("getHighestListenSequenceNumber","readonly",(function(e){return t._o.Ki(e)}))})).then((function(e){t.so=new A(e,t.eo)})).then((function(){t.io=!0})).catch((function(e){return t.lo&&t.lo.close(),Promise.reject(e)}))},t.prototype.Ro=function(t){var e=this;return this.uo=function(n){return Object(a.b)(e,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return this.Er?[2,t(n)]:[2]}))}))},t(this.isPrimary)},t.prototype.Po=function(t){var e=this;this.lo.Xn((function(n){return Object(a.b)(e,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return null===n.newVersion?[4,t()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}
2))}))}))},t.prototype.yo=function(t){var e=this;this.networkEnabled!==t&&(this.networkEnabled=t,this.Zr.Ps((function(){return Object(a.b)(e,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return this.Er?[4,this.To()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))})))},t.prototype.To=function(){var t=this;return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(function(e){return Di(e).put(new Nr(t.clientId,Date.now(),t.networkEnabled,t.inForeground)).next((function(){if(t.isPrimary)return t.Vo(e).next((function(e){e||(t.isPrimary=!1,t.Zr.po((function(){return t.uo(!1)})))}))})).next((function(){return t.bo(e)})).next((function(n){return t.isPrimary&&!n?t.vo(e).next((function(){return!1})):!!n&&t.So(e).next((function(){return!0}))}))})).catch((function(e){if(rr(e))return f("IndexedDbPersistence","Failed to extend owner lease: ",e),t.isPrimary;if(!t.allowTabSynchronization)throw e;return f("IndexedDbPersistence","Releasing owner lease after error during lease refresh",e),!1})).then((function(e){t.isPrimary!==e&&t.Zr.po((function(){return t.uo(e)})),t.isPrimary=e}))},t.prototype.Vo=function(t){var e=this;return Ai(t).get(yr.key).next((function(t){return Jn.resolve(e.Do(t))}))},t.prototype.Co=function(t){return Di(t).delete(this.clientId)},t.prototype.xo=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e,n,r,i=this;return Object(a.d)(this,(function(o){switch(o.label){case 0:return!this.isPrimary||this.No(this.ao,18e5)?[3,2]:(this.ao=Date.now(),[4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(function(t){var e=Dr(t,Nr.store);return e.rs().next((function(t){var n=i.$o(t,18e5),r=t.filter((function(t){return-1===n.indexOf(t)}));return Jn.forEach(r,(function(t){return e.delete(t.clientId)})).next((function(){return r}))}))})).catch((function(){return[]}))]);case 1:if(t=o.sent(),this.Eo)for(e=0,n=t;e<n.length;e++)r=n[e],this.Eo.removeItem(this.Fo(r.clientId));o.label=2;case 2:return[2]}}
2))}))},t.prototype.Ao=function(){var t=this;this.co=this.Zr.Tr("client_metadata_refresh",4e3,(function(){return t.To().then((function(){return t.xo()})).then((function(){return t.Ao()}))}))},t.prototype.Do=function(t){return!!t&&t.ownerId===this.clientId},t.prototype.bo=function(t){var e=this;return this.no?Jn.resolve(!0):Ai(t).get(yr.key).next((function(n){if(null!==n&&e.No(n.leaseTimestampMs,5e3)&&!e.Oo(n.ownerId)){if(e.Do(n)&&e.networkEnabled)return!0;if(!e.Do(n)){if(!n.allowTabSynchronization)throw new S(T.FAILED_PRECONDITION,Pi);return!1}}return!(!e.networkEnabled||!e.inForeground)||Di(t).rs().next((function(t){return void 0===e.$o(t,5e3).find((function(t){if(e.clientId!==t.clientId){var n=!e.networkEnabled&&t.networkEnabled,r=!e.inForeground&&t.inForeground,i=e.networkEnabled===t.networkEnabled;if(n||r&&i)return!0}return!1}))}))})).next((function(t){return e.isPrimary!==t&&f("IndexedDbPersistence","Client "+(t?"is":"is not")+" eligible for a primary lease."),t}))},t.prototype.ko=function(){return Object(a.b)(this,void 0,void 0,(function(){var t=this;return Object(a.d)(this,(function(e){switch(e.label){case 0:return this.io=!1,this.Mo(),this.co&&(this.co.cancel(),this.co=null),this.Lo(),this.Bo(),[4,this.lo.runTransaction("shutdown","readwrite",[yr.store,Nr.store],(function(e){var n=new Ar(e,A.q);return t.vo(n).next((function(){return t.Co(n)}))}))];case 1:return e.sent(),this.lo.close(),this.qo(),[2]}}))}))},t.prototype.$o=function(t,e){var n=this;return t.filter((function(t){return n.No(t.updateTimeMs,e)&&!n.Oo(t.clientId)}))},t.prototype.Uo=function(){var t=this;return this.runTransaction("getActiveClients","readonly",(function(e){return Di(e).rs().next((function(e){return t.$o(e,18e5).map((function(t){return t.clientId}))}))}))},Object.defineProperty(t.prototype,"Er",{get:function(){return this.io},enumerable:!1,configurable:!0}),t.prototype.Qo=function(t){return ui.mi(t,this.Qt,this.Ei,this.Ti)},t.prototype.Sr=function(){return this._o},t.prototype.$r=function(){return this.fo},t.prototype.Ko=function(){return this.Ei},t.prototype.Wo=function(){return this.wo},t.prototype.runTransaction=function(t,e,n){var r=this;f("IndexedDbPersistence","Starting transaction:",t);var i,o="readonly"===e?"readonly":"readwrite";return this.lo.runTransaction(t,o,jr,(function(o){return i=new Ar(o,r.so?r.so.next():A.q),"readwrite-primary"===e?r.Vo(i).next((function(t){return!!t||r.bo(i)})).next((function(e){if(!e)throw h("Failed to obtain primary lease for action '"+t+"'."),r.isPrimary=!1,r.Zr.po((function(){return r.uo(!1)})),new S(T.FAILED_PRECONDITION,lr);return n(i)})).next((function(t){return r.So(i).next((function(){return t}))})):r.jo(i).next((function(){return n(i)}))})).then((function(t){return i.Vs(),t}))},t.prototype.jo=function(t){var e=this;return Ai(t).get(yr.key).next((function(t){if(null!==t&&e.No(t.leaseTimestampMs,5e3)&&!e.Oo(t.ownerId)&&!e.Do(t)&&!(e.no||e.allowTabSynchronization&&t.allowTabSynchronization))throw new S(T.FAILED_PRECONDITION,Pi)}))},t.prototype.So=function(t){var e=new yr(this.clientId,this.allowTabSynchronization,Date.now());return Ai(t).put(yr.key,e)},t.Kn=function(){return tr.Kn()},t.prototype.vo=function(t){var e=this,n=Ai(t);return n.get(yr.key).next((function(t){return e.Do(t)?(f("IndexedDbPersistence","Releasing primary lease."),n.delete(yr.key)):Jn.resolve()}))},t.prototype.No=function(t,e){var n=Date.now();return!(t<n-e||t>n&&(h("Detected an update time that is in the future: "+t+" > "+n),1))},t.prototype.Io=function(){var t=this;null!==this.document&&"function"==typeof this.document.addEventListener&&(this.oo=function(){t.Zr.Ps((function(){return t.inForeground="visible"===t.document.visibilityState,t.To()}))},this.document.addEventListener("visibilitychange",this.oo),this.inForeground="visible"===this.document.visibilityState)},t.prototype.Lo=function(){this.oo&&(this.document.removeEventListener("visibilitychange",this.oo),this.oo=null)},t.prototype.mo=function(){var t,e=this;"function"==typeof(null===(t=this.window)||void 0===t?void 0:t.addEventListener)&&(this.ro=function(){e.Mo(),e.Zr.Ps((function(){return e.ko()}))},this.window.addEventListener("unload",this.ro))},t.prototype.Bo=function(){this.ro&&(this.window.removeEventListener("unload",this.ro),this.ro=null)},t.prototype.Oo=function(t){var e;try{var n=null!==(null===(e=this.Eo)||void 0===e?void 0:e.getItem(this.Fo(t)));return f("IndexedDbPersistence","Client '"+t+"' "+(n?"is":"is not")+" zombied in LocalStorage"),n}catch(t){return h("IndexedDbPersistence","Failed to get zombied client id.",t),!1}},t.prototype.Mo=function(){if(this.Eo)try{this.Eo.setItem(this.Fo(this.clientId),String(Date.now()))}catch(t){h("Failed to set zombie client id.",t)}},t.prototype.qo=function(){if(this.Eo)try{this.Eo.removeItem(this.Fo(this.clientId))}catch(t){}},t.prototype.Fo=function(t){return"firestore_zombie_"+this.persistenceKey+"_"+t},t}();function Ai(t){return Dr(t,yr.store)}function Di(t){return Dr(t,Nr.store)}function Ri(t,e){var n=t.projectId;return t.o||(n+="."+t.database),"firestore/"+e+"/"+n+"/"}var Mi=function(t,e){this.progress=t,this.Go=e},Li=function(){function t(t,e,n){this.fo=t,this.zo=e,this.Ei=n}return t.prototype.Ho=function(t,e){var n=this;return this.zo.bi(t,e).next((function(r){return n.Jo(t,e,r)}))},t.prototype.Jo=function(t,e,n){return this.fo._i(t,e).next((function(t){for(var r=0,i=n;r<i.length;r++)t=i[r].Cs(e,t);return t}))},t.prototype.Yo=function(t,e,n){var r=Xe();return e.forEach((function(t,e){for(var i=0,o=n;i<o.length;i++)e=o[i].Cs(t,e);r=r.zt(t,e)})),r},t.prototype.Xo=function(t,e){var n=this;return this.fo.getEntries(t,e).next((function(e){return n.Zo(t,e)}))},t.prototype.Zo=function(t,e){var n=this;return this.zo.vi(t,e).next((function(r){var i=n.Yo(t,e,r),o=Qe();
2return i.forEach((function(t,e){e||(e=new bt(t,R.min())),o=o.zt(t,e)})),o}))},t.prototype.Kr=function(t,e,n){return function(t){return V.wt(t.path)&&null===t.collectionGroup&&0===t.filters.length}(e)?this.tc(t,e.path):Kt(e)?this.ec(t,e,n):this.nc(t,e,n)},t.prototype.tc=function(t,e){return this.Ho(t,new V(e)).next((function(t){var e=Je();return t instanceof gt&&(e=e.zt(t.key,t)),e}))},t.prototype.ec=function(t,e,n){var r=this,i=e.collectionGroup,o=Je();return this.Ei.Us(t,i).next((function(a){return Jn.forEach(a,(function(a){var s=function(t,e){return new Bt(e,null,t.xt.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt)}(e,a.child(i));return r.nc(t,s,n).next((function(t){t.forEach((function(t,e){o=o.zt(t,e)}))}))})).next((function(){return o}))}))},t.prototype.nc=function(t,e,n){var r,i,o=this;return this.fo.Kr(t,e,n).next((function(n){return r=n,o.zo.Di(t,e)})).next((function(e){return i=e,o.sc(t,i,r).next((function(t){r=t;for(var e=0,n=i;e<n.length;e++)for(var o=n[e],a=0,s=o.mutations;a<s.length;a++){var u=s[a],c=u.key,l=ke(u,r.get(c),o.vs);r=l instanceof gt?r.zt(c,l):r.remove(c)}}))})).next((function(){return r.forEach((function(t,n){ee(e,n)||(r=r.remove(t))})),r}))},t.prototype.sc=function(t,e,n){for(var r=nn(),i=0,o=e;i<o.length;i++)for(var a=0,s=o[i].mutations;a<s.length;a++){var u=s[a];u instanceof Pe&&null===n.get(u.key)&&(r=r.add(u.key))}var c=n;return this.fo.getEntries(t,r).next((function(t){return t.forEach((function(t,e){null!==e&&e instanceof gt&&(c=c.zt(t,e))})),c}))},t}(),Fi=function(){function t(t,e,n,r){this.targetId=t,this.fromCache=e,this.ic=n,this.rc=r}return t.oc=function(e,n){for(var r=nn(),i=nn(),o=0,a=n.docChanges;o<a.length;o++){var s=a[o];switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}}return new t(e,n.fromCache,r,i)},t}(),Ui=function(){function t(){}return t.prototype.cc=function(t){this.ac=t},t.prototype.Kr=function(t,e,n,i){var o=this;return function(t){return 0===t.filters.length&&null===t.limit&&null==t.startAt&&null==t.endAt&&(0===t.xt.length||1===t.xt.length&&t.xt[0].field.ut())}(e)||n.isEqual(R.min())?this.uc(t,e):this.ac.Xo(t,i).next((function(a){var s=o.hc(e,a);return(Wt(e)||Ht(e))&&o.lc(e.limitType,s,i,n)?o.uc(t,e):(l()<=r.a.DEBUG&&f("QueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),te(e)),o.ac.Kr(t,e,n).next((function(t){return s.forEach((function(e){t=t.zt(e.key,e)})),t})))}))},t.prototype.hc=function(t,e){var n=new Ge(ne(t));return e.forEach((function(e,r){r instanceof gt&&ee(t,r)&&(n=n.add(r))})),n},t.prototype.lc=function(t,e,n,r){if(n.size!==e.size)return!0;var i="F"===t?e.last():e.first();return!!i&&(i.hasPendingWrites||i.version._(r)>0)},t.prototype.uc=function(t,e){return l()<=r.a.DEBUG&&f("QueryEngine","Using full collection scan to execute query:",te(e)),this.ac.Kr(t,e,R.min())},t}(),Vi=function(){function t(t,e,n,r){this.persistence=t,this._c=e,this.Qt=r,this.fc=new ze(w),this.dc=new ii((function(t){return Ot(t)}),Tt),this.wc=R.min(),this.zo=t.Qo(n),this.Ec=t.$r(),this._o=t.Sr(),this.Tc=new Li(this.Ec,this.zo,this.persistence.Ko()),this.wo=t.Wo(),this._c.cc(this.Tc)}return t.prototype.Ir=function(t){var e=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",(function(n){return t.Vr(n,e.fc)}))},t}();function Bi(t,e,n,r){return new Vi(t,e,n,r)}function qi(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o;return Object(a.d)(this,(function(a){switch(a.label){case 0:return n=y(t),r=n.zo,i=n.Tc,[4,n.persistence.runTransaction("Handle user change","readonly",(function(t){var o;return n.zo.pi(t).next((function(a){return o=a,r=n.persistence.Qo(e),i=new Li(n.Ec,r,n.persistence.Ko()),r.pi(t)})).next((function(e){for(var n=[],r=[],a=nn(),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=e;d<p.length;d++){var v=p[d];r.push(v.batchId);for(var m=0,y=v.mutations;m<y.length;m++){var g=y[m];a=a.add(g.key)}}return i.Xo(t,a).next((function(t){return{Ic:t,mc:n,Ac:r}}))}))}))];case 1:return o=a.sent(),[2,(n.zo=r,n.Tc=i,n._c.cc(n.Tc),o)]}}))}))}function zi(t,e){var n=y(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(function(t){var r=e.batch.keys(),i=n.Ec.Nr({Wr:!0});return function(t,e,n,r){var i=n.batch,o=i.keys(),a=Jn.resolve();return o.forEach((function(t){a=a.next((function(){return r._i(e,t)})).next((function(e){var o=e,a=n.$s.get(t);m(null!==a),(!o||o.version._(a)<0)&&(o=i.Ss(t,o,n))&&r.ai(o,n.Ns)}))})),a.next((function(){return t.zo.Ci(e,i)}))}(n,t,e,i).next((function(){return i.apply(t)})).next((function(){return n.zo.$i(t)})).next((function(){return n.Tc.Xo(t,r)}
2))}))}function Wi(t){var e=y(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",(function(t){return e._o.Qi(t)}))}function Hi(t,e){var n=y(t),r=e.Ot,i=n.fc;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(function(t){var o=n.Ec.Nr({Wr:!0});i=n.fc;var a=[];e.$e.forEach((function(e,o){var s=i.get(o);if(s){a.push(n._o.sr(t,e.Qe,o).next((function(){return n._o.er(t,e.qe,o)})));var u=e.resumeToken;if(u.l()>0){var c=s.Mt(u,r).kt(t.bs);i=i.zt(o,c),function(t,e,n){return m(e.resumeToken.l()>0),0===t.resumeToken.l()||e.Ot.W()-t.Ot.W()>=3e8||n.qe.size+n.Ue.size+n.Qe.size>0}(s,c,e)&&a.push(n._o.Hi(t,c))}}}));var s=Qe();if(e.Oe.forEach((function(r,i){e.ke.has(r)&&a.push(n.persistence.Ti.Fr(t,r))})),a.push(Gi(t,o,e.Oe,r,void 0).next((function(t){s=t}))),!r.isEqual(R.min())){var u=n._o.Qi(t).next((function(e){return n._o.Wi(t,t.bs,r)}));a.push(u)}return Jn.Mn(a).next((function(){return o.apply(t)})).next((function(){return n.Tc.Zo(t,s)}))})).then((function(t){return n.fc=i,t}))}function Gi(t,e,n,r,i){var o=nn();return n.forEach((function(t){return o=o.add(t)})),e.getEntries(t,o).next((function(t){var o=Qe();return n.forEach((function(n,a){var s=t.get(n),u=(null==i?void 0:i.get(n))||r;a instanceof bt&&a.version.isEqual(R.min())?(e.li(n,u),o=o.zt(n,a)):null==s||a.version._(s.version)>0||0===a.version._(s.version)&&s.hasPendingWrites?(e.ai(a,u),o=o.zt(n,a)):f("LocalStore","Ignoring outdated watch update for ",n,". Current version:",s.version," Watch version:",a.version)})),o}))}function Yi(t,e){var n=y(t);return n.persistence.runTransaction("Get next mutation batch","readonly",(function(t){return void 0===e&&(e=-1),n.zo.gi(t,e)}))}function Ki(t,e){var n=y(t);return n.persistence.runTransaction("Allocate target","readwrite",(function(t){var r;return n._o.tr(t,e).next((function(i){return i?(r=i,Jn.resolve(r)):n._o.Bi(t).next((function(i){return r=new ie(e,i,0,t.bs),n._o.ji(t,r).next((function(){return r}))}))}))})).then((function(t){var r=n.fc.get(t.targetId);return(null===r||t.Ot._(r.Ot)>0)&&(n.fc=n.fc.zt(t.targetId,t),n.dc.set(e,t.targetId)),t}))}function Qi(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s;return Object(a.d)(this,(function(a){switch(a.label){case 0:r=y(t),i=r.fc.get(e),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(t){return r.persistence.Ti.removeTarget(t,i)}))];case 2:a.sent(),a.label=3;case 3:return[3,5];case 4:if(!rr(s=a.sent()))throw s;return f("LocalStore","Failed to update sequence numbers for target "+e+": "+s),[3,5];case 5:return r.fc=r.fc.remove(e),r.dc.delete(i.target),[2]}}))}))}function Xi(t,e,n){var r=y(t),i=R.min(),o=nn();return r.persistence.runTransaction("Execute query","readonly",(function(t){return function(t,e,n){var r=y(t),i=r.dc.get(n);return void 0!==i?Jn.resolve(r.fc.get(i)):r._o.tr(e,n)}(r,t,Xt(e)).next((function(e){if(e)return i=e.lastLimboFreeSnapshotVersion,r._o.rr(t,e.targetId).next((function(t){o=t}))})).next((function(){return r._c.Kr(t,e,n?i:R.min(),n?o:nn())})).next((function(t){return{documents:t,Rc:o}}))}))}function $i(t,e){var n=y(t),r=y(n._o),i=n.fc.get(e);return i?Promise.resolve(i.target):n.persistence.runTransaction("Get target data","readonly",(function(t){return r.Sn(t,e).next((function(t){return t?t.target:null}))}))}function Ji(t){var e=y(t);return e.persistence.runTransaction("Get new document changes","readonly",(function(t){return function(t,e,n){var r=y(t),i=Qe(),o=Vr(n),a=Ii(e),s=IDBKeyRange.lowerBound(o,!0);return a.hs({index:Or.readTimeIndex,range:s},(function(t,e){var n=Fr(r.Qt,e);i=i.zt(n.key,n),o=e.readTime})).next((function(){return{Go:i,readTime:Br(o)}}))}(e.Ec,t,e.wc)})).then((function(t){var n=t.Go,r=t.readTime;return e.wc=r,n}))}function Zi(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){return[2,(e=y(t)).persistence.runTransaction("Synchronize last document change read time","readonly",(function(t){return function(t){var e=Ii(t),n=R.min();return e.hs({index:Or.readTimeIndex,reverse:!0},(function(t,e,r){e.readTime&&(n=Br(e.readTime)),r.done()})).next((function(){return n}))}(t)})).then((function(t){e.wc=t}))]}))}))}function to(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o,s,u,c,l,f,h,d,p;return Object(a.d)(this,(function(a){switch(a.label){case 0:for(i=y(t),o=nn(),s=Qe(),u=tn(),c=0,l=n;c<l.length;c++)f=l[c],h=e.Pc(f.metadata.name),f.document&&(o=o.add(h)),s=s.zt(h,e.yc(f)),u=u.zt(h,e.gc(f.metadata.readTime));return d=i.Ec.Nr({Wr:!0}),[4,Ki(i,function(t){return Xt(zt(L.ot("__bundle__/docs/"+t)))}(r))];case 1:return p=a.sent(),[2,i.persistence.runTransaction("Apply bundle documents","readwrite",(function(t){return Gi(t,d,s,R.min(),u).next((function(e){return d.apply(t),e})).next((function(e){return i._o.Yi(t,p.targetId).next((function(){return i._o.er(t,o,p.targetId)})).next((function(){return i.Tc.Zo(t,e)}))}
2))}))]}}))}))}function eo(t,e,n){return void 0===n&&(n=nn()),Object(a.b)(this,void 0,void 0,(function(){var r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return[4,Ki(t,Xt(Yr(e.bundledQuery)))];case 1:return r=o.sent(),[2,(i=y(t)).persistence.runTransaction("Save named query","readwrite",(function(t){var o=Tn(e.readTime);if(r.Ot._(o)>=0)return i.wo.Ls(t,e);var a=r.Mt(O.T,o);return i.fc=i.fc.zt(a.targetId,a),i._o.Hi(t,a).next((function(){return i._o.Yi(t,r.targetId)})).next((function(){return i._o.er(t,n,r.targetId)})).next((function(){return i.wo.Ls(t,e)}))}))]}}))}))}var no=function(){function t(t){this.Qt=t,this.Vc=new Map,this.bc=new Map}return t.prototype.Os=function(t,e){return Jn.resolve(this.Vc.get(e))},t.prototype.ks=function(t,e){var n;return this.Vc.set(e.id,{id:(n=e).id,version:n.version,createTime:Tn(n.createTime)}),Jn.resolve()},t.prototype.Ms=function(t,e){return Jn.resolve(this.bc.get(e))},t.prototype.Ls=function(t,e){return this.bc.set(e.name,function(t){return{name:t.name,query:Yr(t.bundledQuery),readTime:Tn(t.readTime)}}(e)),Jn.resolve()},t}(),ro=function(){function t(){this.vc=new Ge(io.Sc),this.Dc=new Ge(io.Cc)}return t.prototype.et=function(){return this.vc.et()},t.prototype.nr=function(t,e){var n=new io(t,e);this.vc=this.vc.add(n),this.Dc=this.Dc.add(n)},t.prototype.xc=function(t,e){var n=this;t.forEach((function(t){return n.nr(t,e)}))},t.prototype.ir=function(t,e){this.Nc(new io(t,e))},t.prototype.$c=function(t,e){var n=this;t.forEach((function(t){return n.ir(t,e)}))},t.prototype.Fc=function(t){var e=this,n=new V(new L([])),r=new io(n,t),i=new io(n,t+1),o=[];return this.Dc.me([r,i],(function(t){e.Nc(t),o.push(t.key)})),o},t.prototype.Oc=function(){var t=this;this.vc.forEach((function(e){return t.Nc(e)}))},t.prototype.Nc=function(t){this.vc=this.vc.delete(t),this.Dc=this.Dc.delete(t)},t.prototype.kc=function(t){var e=new V(new L([])),n=new io(e,t),r=new io(e,t+1),i=nn();return this.Dc.me([n,r],(function(t){i=i.add(t.key)})),i},t.prototype.Fi=function(t){var e=new io(t,0),n=this.vc.Re(e);return null!==n&&t.isEqual(n.key)},t}(),io=function(){function t(t,e){this.key=t,this.Mc=e}return t.Sc=function(t,e){return V.H(t.key,e.key)||w(t.Mc,e.Mc)},t.Cc=function(t,e){return w(t.Mc,e.Mc)||V.H(t.key,e.key)},t}(),oo=function(){function t(t,e){this.Ei=t,this.Ti=e,this.zo=[],this.Lc=1,this.Bc=new Ge(io.Sc)}return t.prototype.Ai=function(t){return Jn.resolve(0===this.zo.length)},t.prototype.Ri=function(t,e,n,r){var i=this.Lc;this.Lc++,this.zo.length>0&&this.zo[this.zo.length-1];var o=new Rr(i,e,n,r);this.zo.push(o);for(var a=0,s=r;a<s.length;a++){var u=s[a];this.Bc=this.Bc.add(new io(u.key,i)),this.Ei.qs(t,u.key.path.X())}return Jn.resolve(o)},t.prototype.Pi=function(t,e){return Jn.resolve(this.qc(e))},t.prototype.gi=function(t,e){var n=e+1,r=this.Uc(n),i=r<0?0:r;return Jn.resolve(this.zo.length>i?this.zo[i]:null)},t.prototype.Vi=function(){return Jn.resolve(0===this.zo.length?-1:this.Lc-1)},t.prototype.pi=function(t){return Jn.resolve(this.zo.slice())},t.prototype.bi=function(t,e){var n=this,r=new io(e,0),i=new io(e,Number.POSITIVE_INFINITY),o=[];return this.Bc.me([r,i],(function(t){var e=n.qc(t.Mc);o.push(e)})),Jn.resolve(o)},t.prototype.vi=function(t,e){var n=this,r=new Ge(w);return e.forEach((function(t){var e=new io(t,0),i=new io(t,Number.POSITIVE_INFINITY);n.Bc.me([e,i],(function(t){r=r.add(t.Mc)}))})),Jn.resolve(this.Qc(r))},t.prototype.Di=function(t,e){var n=e.path,r=n.length+1,i=n;V.wt(i)||(i=i.child(""));var o=new io(new V(i),0),a=new Ge(w);return this.Bc.Ae((function(t){var e=t.key.path;return!!n.nt(e)&&(e.length===r&&(a=a.add(t.Mc)),!0)}),o),Jn.resolve(this.Qc(a))},t.prototype.Qc=function(t){var e=this,n=[];return t.forEach((function(t){var r=e.qc(t);null!==r&&n.push(r)})),n},t.prototype.Ci=function(t,e){var n=this;m(0===this.Kc(e.batchId,"removed")),this.zo.shift();var r=this.Bc;return Jn.forEach(e.mutations,(function(i){var o=new io(i.key,e.batchId);return r=r.delete(o),n.Ti.Ni(t,i.key)})).next((function(){n.Bc=r}))},t.prototype.xi=function(t){},t.prototype.Fi=function(t,e){var n=new io(e,0),r=this.Bc.Re(n);return Jn.resolve(e.isEqual(r&&r.key))},t.prototype.$i=function(t){return this.zo.length,Jn.resolve()},t.prototype.Kc=function(t,e){return this.Uc(t)},t.prototype.Uc=function(t){return 0===this.zo.length?0:t-this.zo[0].batchId},t.prototype.qc=function(t){var e=this.Uc(t);return e<0||e>=this.zo.length?null:this.zo[e]},t}(),ao=function(){function t(t,e){this.Ei=t,this.Wc=e,this.docs=new ze(V.H),this.size=0}return t.prototype.ai=function(t,e,n){var r=e.key,i=this.docs.get(r),o=i?i.size:0,a=this.Wc(e);return this.docs=this.docs.zt(r,{hi:e,size:a,readTime:n}),this.size+=a-o,this.Ei.qs(t,r.path.X())},t.prototype.li=function(t){var e=this.docs.get(t);e&&(this.docs=this.docs.remove(t),this.size-=e.size)},t.prototype._i=function(t,e){var n=this.docs.get(e);return Jn.resolve(n?n.hi:null)},t.prototype.getEntries=function(t,e){var n=this,r=Xe();return e.forEach((function(t){var e=n.docs.get(t);r=r.zt(t,e?e.hi:null)})),Jn.resolve(r)},t.prototype.Kr=function(t,e,n){for(var r=Je(),i=new V(e.path.child("")),o=this.docs.ee(i);o.ce();){var a=o.oe(),s=a.key,u=a.value,c=u.hi,l=u.readTime;if(!e.path.nt(s.path))break;l._(n)<=0||c instanceof gt&&ee(e,c)&&(r=r.zt(c.key,c))}return Jn.resolve(r)}
2,t.prototype.jc=function(t,e){return Jn.forEach(this.docs,(function(t){return e(t)}))},t.prototype.Nr=function(t){return new so(this)},t.prototype.Or=function(t){return Jn.resolve(this.size)},t}(),so=function(t){function e(e){var n=this;return(n=t.call(this)||this).jr=e,n}return Object(a.c)(e,t),e.prototype.wi=function(t){var e=this,n=[];return this.ri.forEach((function(r,i){i&&i.hi?n.push(e.jr.ai(t,i.hi,e.ci(r))):e.jr.li(r)})),Jn.Mn(n)},e.prototype.fi=function(t,e){return this.jr._i(t,e)},e.prototype.di=function(t,e){return this.jr.getEntries(t,e)},e}(oi),uo=function(){function t(t){this.persistence=t,this.Gc=new ii((function(t){return Ot(t)}),Tt),this.lastRemoteSnapshotVersion=R.min(),this.highestTargetId=0,this.zc=0,this.Hc=new ro,this.targetCount=0,this.Jc=di.Mi()}return t.prototype.In=function(t,e){return this.Gc.forEach((function(t,n){return e(n)})),Jn.resolve()},t.prototype.Qi=function(t){return Jn.resolve(this.lastRemoteSnapshotVersion)},t.prototype.Ki=function(t){return Jn.resolve(this.zc)},t.prototype.Bi=function(t){return this.highestTargetId=this.Jc.next(),Jn.resolve(this.highestTargetId)},t.prototype.Wi=function(t,e,n){return n&&(this.lastRemoteSnapshotVersion=n),e>this.zc&&(this.zc=e),Jn.resolve()},t.prototype.Gi=function(t){this.Gc.set(t.target,t);var e=t.targetId;e>this.highestTargetId&&(this.Jc=new di(e),this.highestTargetId=e),t.sequenceNumber>this.zc&&(this.zc=t.sequenceNumber)},t.prototype.ji=function(t,e){return this.Gi(e),this.targetCount+=1,Jn.resolve()},t.prototype.Hi=function(t,e){return this.Gi(e),Jn.resolve()},t.prototype.Ji=function(t,e){return this.Gc.delete(e.target),this.Hc.Fc(e.targetId),this.targetCount-=1,Jn.resolve()},t.prototype.Xi=function(t,e,n){var r=this,i=0,o=[];return this.Gc.forEach((function(a,s){s.sequenceNumber<=e&&null===n.get(s.targetId)&&(r.Gc.delete(a),o.push(r.Yi(t,s.targetId)),i++)})),Jn.Mn(o).next((function(){return i}))},t.prototype.Zi=function(t){return Jn.resolve(this.targetCount)},t.prototype.tr=function(t,e){var n=this.Gc.get(e)||null;return Jn.resolve(n)},t.prototype.er=function(t,e,n){return this.Hc.xc(e,n),Jn.resolve()},t.prototype.sr=function(t,e,n){this.Hc.$c(e,n);var r=this.persistence.Ti,i=[];return r&&e.forEach((function(e){i.push(r.Ni(t,e))})),Jn.Mn(i)},t.prototype.Yi=function(t,e){return this.Hc.Fc(e),Jn.resolve()},t.prototype.rr=function(t,e){var n=this.Hc.kc(e);return Jn.resolve(n)},t.prototype.Fi=function(t,e){return Jn.resolve(this.Hc.Fi(e))},t}(),co=function(){function t(t,e){var n=this;this.Yc={},this.so=new A(0),this.io=!1,this.io=!0,this.Ti=t(this),this._o=new uo(this),this.Ei=new $r,this.fo=function(t,e){return new ao(t,(function(t){return n.Ti.Xc(t)}))}(this.Ei),this.Qt=new Lr(e),this.wo=new no(this.Qt)}return t.prototype.start=function(){return Promise.resolve()},t.prototype.ko=function(){return this.io=!1,Promise.resolve()},Object.defineProperty(t.prototype,"Er",{get:function(){return this.io},enumerable:!1,configurable:!0}),t.prototype.Po=function(){},t.prototype.yo=function(){},t.prototype.Ko=function(){return this.Ei},t.prototype.Qo=function(t){var e=this.Yc[t.A()];return e||(e=new oo(this.Ei,this.Ti),this.Yc[t.A()]=e),e},t.prototype.Sr=function(){return this._o},t.prototype.$r=function(){return this.fo},t.prototype.Wo=function(){return this.wo},t.prototype.runTransaction=function(t,e,n){var r=this;f("MemoryPersistence","Starting transaction:",t);var i=new lo(this.so.next());return this.Ti.Zc(),n(i).next((function(t){return r.Ti.ta(i).next((function(){return t}))})).On().then((function(t){return i.Vs(),t}))},t.prototype.ea=function(t,e){return Jn.Ln(Object.values(this.Yc).map((function(n){return function(){return n.Fi(t,e)}})))},t}(),lo=function(t){function e(e){var n=this;return(n=t.call(this)||this).bs=e,n}return Object(a.c)(e,t),e}(fr),fo=function(){function t(t){this.persistence=t,this.na=new ro,this.sa=null}return t.ia=function(e){return new t(e)},Object.defineProperty(t.prototype,"ra",{get:function(){if(this.sa)return this.sa;throw v()},enumerable:!1,configurable:!0}),t.prototype.nr=function(t,e,n){return this.na.nr(n,e),this.ra.delete(n.toString()),Jn.resolve()},t.prototype.ir=function(t,e,n){return this.na.ir(n,e),this.ra.add(n.toString()),Jn.resolve()},t.prototype.Ni=function(t,e){return this.ra.add(e.toString()),Jn.resolve()},t.prototype.removeTarget=function(t,e){var n=this;
2this.na.Fc(e.targetId).forEach((function(t){return n.ra.add(t.toString())}));var r=this.persistence.Sr();return r.rr(t,e.targetId).next((function(t){t.forEach((function(t){return n.ra.add(t.toString())}))})).next((function(){return r.Ji(t,e)}))},t.prototype.Zc=function(){this.sa=new Set},t.prototype.ta=function(t){var e=this,n=this.persistence.$r().Nr();return Jn.forEach(this.ra,(function(r){var i=V._t(r);return e.oa(t,i).next((function(t){t||n.li(i)}))})).next((function(){return e.sa=null,n.apply(t)}))},t.prototype.Fr=function(t,e){var n=this;return this.oa(t,e).next((function(t){t?n.ra.delete(e.toString()):n.ra.add(e.toString())}))},t.prototype.Xc=function(t){return 0},t.prototype.oa=function(t,e){var n=this;return Jn.Ln([function(){return Jn.resolve(n.na.Fi(e))},function(){return n.persistence.Sr().Fi(t,e)},function(){return n.persistence.ea(t,e)}])},t}();function ho(t,e){return"firestore_clients_"+t+"_"+e}function po(t,e,n){var r="firestore_mutations_"+t+"_"+n;return e.m()&&(r+="_"+e.uid),r}function vo(t,e){return"firestore_targets_"+t+"_"+e}var mo=function(){function t(t,e,n,r){this.user=t,this.batchId=e,this.state=n,this.error=r}return t.ca=function(e,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 S(o.error.code,o.error.message)),a?new t(e,n,o.state,i):(h("SharedClientState","Failed to parse mutation state for ID '"+n+"': "+r),null)},t.prototype.aa=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},t}(),yo=function(){function t(t,e,n){this.targetId=t,this.state=e,this.error=n}return t.ca=function(e,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 S(i.error.code,i.error.message)),o?new t(e,i.state,r):(h("SharedClientState","Failed to parse target state for ID '"+e+"': "+n),null)},t.prototype.aa=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},t}(),go=function(){function t(t,e){this.clientId=t,this.activeTargetIds=e}return t.ca=function(e,n){for(var r=JSON.parse(n),i="object"==typeof r&&r.activeTargetIds instanceof Array,o=on(),a=0;i&&a<r.activeTargetIds.length;++a)i=tt(r.activeTargetIds[a]),o=o.add(r.activeTargetIds[a]);return i?new t(e,o):(h("SharedClientState","Failed to parse client data for instance '"+e+"': "+n),null)},t}(),bo=function(){function t(t,e){this.clientId=t,this.onlineState=e}return t.ca=function(e){var n=JSON.parse(e);return"object"==typeof n&&-1!==["Unknown","Online","Offline"].indexOf(n.onlineState)&&"string"==typeof n.clientId?new t(n.clientId,n.onlineState):(h("SharedClientState","Failed to parse online state: "+e),null)},t}(),wo=function(){function t(){this.activeTargetIds=on()}return t.prototype.ua=function(t){this.activeTargetIds=this.activeTargetIds.add(t)},t.prototype.ha=function(t){this.activeTargetIds=this.activeTargetIds.delete(t)},t.prototype.aa=function(){var t={activeTargetIds:this.activeTargetIds.it(),updateTimeMs:Date.now()};return JSON.stringify(t)},t}(),_o=function(){function t(t,e,n,r,i){this.window=t,this.Zr=e,this.persistenceKey=n,this.la=r,this._a=null,this.fa=null,this.k=null,this.da=this.wa.bind(this),this.Ea=new ze(w),this.Er=!1,this.Ta=[];var o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=i,this.Ia=ho(this.persistenceKey,this.la),this.ma=function(t){return"firestore_sequence_number_"+t}(this.persistenceKey),this.Ea=this.Ea.zt(this.la,new wo),this.Aa=new RegExp("^firestore_clients_"+o+"_([^_]*)$"),this.Ra=new RegExp("^firestore_mutations_"+o+"_(\\d+)(?:_(.*))?$"),this.Pa=new RegExp("^firestore_targets_"+o+"_(\\d+)$"),this.ya=function(t){return"firestore_online_state_"+t}(this.persistenceKey),this.ga=function(t){return"firestore_bundle_loaded_"+t}(this.persistenceKey),this.window.addEventListener("storage",this.da)}return t.Kn=function(t){return!(!t||!t.localStorage)},t.prototype.start=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e,n,r,i,o,s,u,c,l,f,h=this;return Object(a.d)(this,(function(a){switch(a.label){case 0:return[4,this._a.Uo()];case 1:for(t=a.sent(),e=0,n=t;e<n.length;e++)(r=n[e])!==this.la&&(i=this.getItem(ho(this.persistenceKey,r)))&&(o=go.ca(r,i))&&(this.Ea=this.Ea.zt(o.clientId,o));
2for(this.Va(),(s=this.storage.getItem(this.ya))&&(u=this.pa(s))&&this.ba(u),c=0,l=this.Ta;c<l.length;c++)f=l[c],this.wa(f);return this.Ta=[],this.window.addEventListener("unload",(function(){return h.ko()})),this.Er=!0,[2]}}))}))},t.prototype.B=function(t){this.setItem(this.ma,JSON.stringify(t))},t.prototype.va=function(){return this.Sa(this.Ea)},t.prototype.Da=function(t){var e=!1;return this.Ea.forEach((function(n,r){r.activeTargetIds.has(t)&&(e=!0)})),e},t.prototype.Ca=function(t){this.xa(t,"pending")},t.prototype.Na=function(t,e,n){this.xa(t,e,n),this.$a(t)},t.prototype.Fa=function(t){var e="not-current";if(this.Da(t)){var n=this.storage.getItem(vo(this.persistenceKey,t));if(n){var r=yo.ca(t,n);r&&(e=r.state)}}return this.Oa.ua(t),this.Va(),e},t.prototype.ka=function(t){this.Oa.ha(t),this.Va()},t.prototype.Ma=function(t){return this.Oa.activeTargetIds.has(t)},t.prototype.La=function(t){this.removeItem(vo(this.persistenceKey,t))},t.prototype.Ba=function(t,e,n){this.qa(t,e,n)},t.prototype.Ua=function(t,e,n){var r=this;e.forEach((function(t){r.$a(t)})),this.currentUser=t,n.forEach((function(t){r.Ca(t)}))},t.prototype.Qa=function(t){this.Ka(t)},t.prototype.Wa=function(){this.ja()},t.prototype.ko=function(){this.Er&&(this.window.removeEventListener("storage",this.da),this.removeItem(this.Ia),this.Er=!1)},t.prototype.getItem=function(t){var e=this.storage.getItem(t);return f("SharedClientState","READ",t,e),e},t.prototype.setItem=function(t,e){f("SharedClientState","SET",t,e),this.storage.setItem(t,e)},t.prototype.removeItem=function(t){f("SharedClientState","REMOVE",t),this.storage.removeItem(t)},t.prototype.wa=function(t){var e=this,n=t;if(n.storageArea===this.storage){if(f("SharedClientState","EVENT",n.key,n.newValue),n.key===this.Ia)return void h("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.Zr.po((function(){return Object(a.b)(e,void 0,void 0,(function(){var t,e,r,i,o,s;return Object(a.d)(this,(function(a){if(this.Er){if(null!==n.key)if(this.Aa.test(n.key)){if(null==n.newValue)return t=this.Ga(n.key),[2,this.za(t,null)];if(e=this.Ha(n.key,n.newValue))return[2,this.za(e.clientId,e)]}else if(this.Ra.test(n.key)){if(null!==n.newValue&&(r=this.Ja(n.key,n.newValue)))return[2,this.Ya(r)]}else if(this.Pa.test(n.key)){if(null!==n.newValue&&(i=this.Xa(n.key,n.newValue)))return[2,this.Za(i)]}else if(n.key===this.ya){if(null!==n.newValue&&(o=this.pa(n.newValue)))return[2,this.ba(o)]}else if(n.key===this.ma)(s=function(t){var e=A.q;if(null!=t)try{var n=JSON.parse(t);m("number"==typeof n),e=n}catch(t){h("SharedClientState","Failed to read sequence number from WebStorage",t)}return e}(n.newValue))!==A.q&&this.k(s);else if(n.key===this.ga)return[2,this._a.tu()]}else this.Ta.push(n);return[2]}))}))}))}},Object.defineProperty(t.prototype,"Oa",{get:function(){return this.Ea.get(this.la)},enumerable:!1,configurable:!0}),t.prototype.Va=function(){this.setItem(this.Ia,this.Oa.aa())},t.prototype.xa=function(t,e,n){var r=new mo(this.currentUser,t,e,n),i=po(this.persistenceKey,this.currentUser,t);this.setItem(i,r.aa())},t.prototype.$a=function(t){var e=po(this.persistenceKey,this.currentUser,t);this.removeItem(e)},t.prototype.Ka=function(t){var e={clientId:this.la,onlineState:t};this.storage.setItem(this.ya,JSON.stringify(e))},t.prototype.qa=function(t,e,n){var r=vo(this.persistenceKey,t),i=new yo(t,e,n);this.setItem(r,i.aa())},t.prototype.ja=function(){this.setItem(this.ga,"value-not-used")},t.prototype.Ga=function(t){var e=this.Aa.exec(t);return e?e[1]:null},t.prototype.Ha=function(t,e){var n=this.Ga(t);return go.ca(n,e)},t.prototype.Ja=function(t,e){var n=this.Ra.exec(t),r=Number(n[1]),i=void 0!==n[2]?n[2]:null;return mo.ca(new I(i),r,e)},t.prototype.Xa=function(t,e){var n=this.Pa.exec(t),r=Number(n[1]);return yo.ca(r,e)},t.prototype.pa=function(t){return bo.ca(t)},t.prototype.Ya=function(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return t.user.uid===this.currentUser.uid?[2,this._a.eu(t.batchId,t.state,t.error)]:(f("SharedClientState","Ignoring mutation for non-active user "+t.user.uid),[2])}))}))},t.prototype.Za=function(t){return this._a.nu(t.targetId,t.state,t.error)},t.prototype.za=function(t,e){var n=this,r=e?this.Ea.zt(t,e):this.Ea.remove(t),i=this.Sa(this.Ea),o=this.Sa(r),a=[],s=[];return o.forEach((function(t){i.has(t)||a.push(t)}
2)),i.forEach((function(t){o.has(t)||s.push(t)})),this._a.su(a,s).then((function(){n.Ea=r}))},t.prototype.ba=function(t){this.Ea.get(t.clientId)&&this.fa(t.onlineState)},t.prototype.Sa=function(t){var e=on();return t.forEach((function(t,n){e=e.Pe(n.activeTargetIds)})),e},t}(),Eo=function(){function t(){this.iu=new wo,this.ru={},this.fa=null,this.k=null}return t.prototype.Ca=function(t){},t.prototype.Na=function(t,e,n){},t.prototype.Fa=function(t){return this.iu.ua(t),this.ru[t]||"not-current"},t.prototype.Ba=function(t,e,n){this.ru[t]=e},t.prototype.ka=function(t){this.iu.ha(t)},t.prototype.Ma=function(t){return this.iu.activeTargetIds.has(t)},t.prototype.La=function(t){delete this.ru[t]},t.prototype.va=function(){return this.iu.activeTargetIds},t.prototype.Da=function(t){return this.iu.activeTargetIds.has(t)},t.prototype.start=function(){return this.iu=new wo,Promise.resolve()},t.prototype.Ua=function(t,e,n){},t.prototype.Qa=function(t){},t.prototype.ko=function(){},t.prototype.B=function(t){},t.prototype.Wa=function(){},t}(),Oo=function(){function t(){}return t.prototype.ou=function(t){},t.prototype.ko=function(){},t}(),To=function(){function t(){var t=this;this.cu=function(){return t.au()},this.uu=function(){return t.hu()},this.lu=[],this._u()}return t.prototype.ou=function(t){this.lu.push(t)},t.prototype.ko=function(){window.removeEventListener("online",this.cu),window.removeEventListener("offline",this.uu)},t.prototype._u=function(){window.addEventListener("online",this.cu),window.addEventListener("offline",this.uu)},t.prototype.au=function(){f("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(var t=0,e=this.lu;t<e.length;t++)(0,e[t])(0)},t.prototype.hu=function(){f("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(var t=0,e=this.lu;t<e.length;t++)(0,e[t])(1)},t.Kn=function(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener},t}(),So={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"},ko=function(){function t(t){this.fu=t.fu,this.du=t.du}return t.prototype.wu=function(t){this.Eu=t},t.prototype.Tu=function(t){this.Iu=t},t.prototype.onMessage=function(t){this.mu=t},t.prototype.close=function(){this.du()},t.prototype.send=function(t){this.fu(t)},t.prototype.Au=function(){this.Eu()},t.prototype.Ru=function(t){this.Iu(t)},t.prototype.Pu=function(t){this.mu(t)},t}(),Io=function(t){function e(e){var n=this;return(n=t.call(this,e)||this).forceLongPolling=e.forceLongPolling,n.i=e.i,n}return Object(a.c)(e,t),e.prototype.Su=function(t,e,n,r){return new Promise((function(i,a){var s=new o.f;s.listenOnce(o.c.COMPLETE,(function(){try{switch(s.getLastErrorCode()){case o.a.NO_ERROR:var e=s.getResponseJson();f("Connection","XHR received:",JSON.stringify(e)),i(e);break;case o.a.TIMEOUT:f("Connection",'RPC "'+t+'" timed out'),a(new S(T.DEADLINE_EXCEEDED,"Request time out"));break;case o.a.HTTP_ERROR:var n=s.getStatus();if(f("Connection",'RPC "'+t+'" failed with status:',n,"response text:",s.getResponseText()),n>0){var r=s.getResponseJson().error;if(r&&r.status&&r.message){var u=function(t){var e=t.toLowerCase().replace(/_/g,"-");return Object.values(T).indexOf(e)>=0?e:T.UNKNOWN}(r.status);a(new S(u,r.message))}else a(new S(T.UNKNOWN,"Server responded with status "+s.getStatus()))}else a(new S(T.UNAVAILABLE,"Connection failed."));break;default:v()}}finally{f("Connection",'RPC "'+t+'" completed.')}}));var u=JSON.stringify(r);s.send(e,"POST",u,n,15)}))},e.prototype.Cu=function(t,e){var n=[this.gu,"/","google.firestore.v1.Firestore","/",t,"/channel"],r=Object(o.g)(),a=Object(o.h)(),s={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.t.projectId+"/databases/"+this.t.database},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.i};this.vu(s.initMessageHeaders,e),Object(i.x)()||Object(i.A)()||Object(i.t)()||Object(i.v)()||Object(i.B)()||Object(i.s)()||(s.httpHeadersOverwriteParam="$httpHeaders");var u=n.join("");f("Connection","Creating WebChannel: "+u,s);var c=r.createWebChannel(u,s),l=!1,h=!1,p=new ko({fu:function(t){h?f("Connection","Not sending because WebChannel is closed:",t):(l||(f("Connection","Opening WebChannel transport."),c.open(),l=!0),f("Connection","WebChannel sending:",t),c.send(t))},du:function(){return c.close()}}),v=function(t,e,n){t.listen(e,(function(t){try{n(t)}catch(t){setTimeout((function(){throw t}),0)}}))};return v(c,o.e.EventType.OPEN,(function(){h||f("Connection","WebChannel transport opened.")})),v(c,o.e.EventType.CLOSE,(function(){h||(h=!0,f("Connection","WebChannel transport closed"),p.Ru())}
2)),v(c,o.e.EventType.ERROR,(function(t){h||(h=!0,d("Connection","WebChannel transport errored:",t),p.Ru(new S(T.UNAVAILABLE,"The operation could not be completed")))})),v(c,o.e.EventType.MESSAGE,(function(t){var e;if(!h){var n=t.data[0];m(!!n);var r=n,i=r.error||(null===(e=r[0])||void 0===e?void 0:e.error);if(i){f("Connection","WebChannel received error:",i);var o=i.status,a=function(t){var e=Me[t];if(void 0!==e)return qe(e)}(o),s=i.message;void 0===a&&(a=T.INTERNAL,s="Unknown error status: "+o+" with message "+i.message),h=!0,p.Ru(new S(a,s)),c.close()}else f("Connection","WebChannel received:",n),p.Pu(n)}})),v(a,o.b.STAT_EVENT,(function(t){t.stat===o.d.PROXY?f("Connection","Detected buffering proxy"):t.stat===o.d.NOPROXY&&f("Connection","Detected no buffering proxy")})),setTimeout((function(){p.Au()}),0),p},e}(function(){function t(t){this.yu=t,this.t=t.t;var e=t.ssl?"https":"http";this.gu=e+"://"+t.host,this.Vu="projects/"+this.t.projectId+"/databases/"+this.t.database+"/documents"}return t.prototype.pu=function(t,e,n,r){var i=this.bu(t,e);f("RestConnection","Sending: ",i,n);var o={};return this.vu(o,r),this.Su(t,i,o,n).then((function(t){return f("RestConnection","Received: ",t),t}),(function(e){throw d("RestConnection",t+" failed with error: ",e,"url: ",i,"request:",n),e}))},t.prototype.Du=function(t,e,n,r){return this.pu(t,e,n,r)},t.prototype.vu=function(t,e){if(t["X-Goog-Api-Client"]="gl-js/ fire/8.2.9",t["Content-Type"]="text/plain",e)for(var n in e.g)e.g.hasOwnProperty(n)&&(t[n]=e.g[n])},t.prototype.bu=function(t,e){var n=So[t];return this.gu+"/v1/"+e+":"+n},t}());function Co(){return"undefined"!=typeof window?window:null}function No(){return"undefined"!=typeof document?document:null}function xo(t){return new wn(t,!0)}var Po=function(){function t(t,e,n,r,i){void 0===n&&(n=1e3),void 0===r&&(r=1.5),void 0===i&&(i=6e4),this.Zr=t,this.fs=e,this.xu=n,this.Nu=r,this.$u=i,this.Fu=0,this.Ou=null,this.ku=Date.now(),this.reset()}return t.prototype.reset=function(){this.Fu=0},t.prototype.Mu=function(){this.Fu=this.$u},t.prototype.Lu=function(t){var e=this;this.cancel();var n=Math.floor(this.Fu+this.Bu()),r=Math.max(0,Date.now()-this.ku),i=Math.max(0,n-r);i>0&&f("ExponentialBackoff","Backing off for "+i+" ms (base delay: "+this.Fu+" ms, delay with jitter: "+n+" ms, last attempt: "+r+" ms ago)"),this.Ou=this.Zr.Tr(this.fs,i,(function(){return e.ku=Date.now(),t()})),this.Fu*=this.Nu,this.Fu<this.xu&&(this.Fu=this.xu),this.Fu>this.$u&&(this.Fu=this.$u)},t.prototype.qu=function(){null!==this.Ou&&(this.Ou.Rs(),this.Ou=null)},t.prototype.cancel=function(){null!==this.Ou&&(this.Ou.cancel(),this.Ou=null)},t.prototype.Bu=function(){return(Math.random()-.5)*this.Fu},t}(),jo=function(){function t(t,e,n,r,i,o){this.Zr=t,this.Uu=n,this.Qu=r,this.Ku=i,this.listener=o,this.state=0,this.Wu=0,this.ju=null,this.stream=null,this.Gu=new Po(t,e)}return t.prototype.zu=function(){return 1===this.state||2===this.state||4===this.state},t.prototype.Hu=function(){return 2===this.state},t.prototype.start=function(){3!==this.state?this.auth():this.Ju()},t.prototype.stop=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return this.zu()?[4,this.close(0)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}
2))}))},t.prototype.Yu=function(){this.state=0,this.Gu.reset()},t.prototype.Xu=function(){var t=this;this.Hu()&&null===this.ju&&(this.ju=this.Zr.Tr(this.Uu,6e4,(function(){return t.Zu()})))},t.prototype.th=function(t){this.eh(),this.stream.send(t)},t.prototype.Zu=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){return this.Hu()?[2,this.close(0)]:[2]}))}))},t.prototype.eh=function(){this.ju&&(this.ju.cancel(),this.ju=null)},t.prototype.close=function(t,e){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(n){switch(n.label){case 0:return this.eh(),this.Gu.cancel(),this.Wu++,3!==t?this.Gu.reset():e&&e.code===T.RESOURCE_EXHAUSTED?(h(e.toString()),h("Using maximum backoff delay to prevent overloading the backend."),this.Gu.Mu()):e&&e.code===T.UNAUTHENTICATED&&this.Ku.p(),null!==this.stream&&(this.nh(),this.stream.close(),this.stream=null),this.state=t,[4,this.listener.Tu(e)];case 1:return n.sent(),[2]}}))}))},t.prototype.nh=function(){},t.prototype.auth=function(){var t=this;this.state=1;var e=this.sh(this.Wu),n=this.Wu;this.Ku.getToken().then((function(e){t.Wu===n&&t.ih(e)}),(function(n){e((function(){var e=new S(T.UNKNOWN,"Fetching auth token failed: "+n.message);return t.rh(e)}))}))},t.prototype.ih=function(t){var e=this,n=this.sh(this.Wu);this.stream=this.oh(t),this.stream.wu((function(){n((function(){return e.state=2,e.listener.wu()}))})),this.stream.Tu((function(t){n((function(){return e.rh(t)}))})),this.stream.onMessage((function(t){n((function(){return e.onMessage(t)}))}))},t.prototype.Ju=function(){var t=this;this.state=4,this.Gu.Lu((function(){return Object(a.b)(t,void 0,void 0,(function(){return Object(a.d)(this,(function(t){return this.state=0,this.start(),[2]}))}))}))},t.prototype.rh=function(t){return f("PersistentStream","close with error: "+t),this.stream=null,this.close(3,t)},t.prototype.sh=function(t){var e=this;return function(n){e.Zr.Ps((function(){return e.Wu===t?n():(f("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}},t}(),Ao=function(t){function e(e,n,r,i,o){var a=this;return(a=t.call(this,e,"listen_stream_connection_backoff","listen_stream_idle",n,r,o)||this).Qt=i,a}return Object(a.c)(e,t),e.prototype.oh=function(t){return this.Qu.Cu("Listen",t)},e.prototype.onMessage=function(t){this.Gu.reset();var e=function(t,e){var n;if("targetChange"in e){e.targetChange;var r=function(t){return"NO_CHANGE"===t?0:"ADD"===t?1:"REMOVE"===t?2:"CURRENT"===t?3:"RESET"===t?4:v()}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],o=function(t,e){return t.Bt?(m(void 0===e||"string"==typeof e),O.fromBase64String(e||"")):(m(void 0===e||e instanceof Uint8Array),O.fromUint8Array(e||new Uint8Array))}(t,e.targetChange.resumeToken),a=(s=e.targetChange.cause)&&function(t){var e=void 0===t.code?T.UNKNOWN:qe(t.code);return new S(e,t.message||"")}(s);n=new dn(r,i,o,a||null)}else if("documentChange"in e){e.documentChange,(r=e.documentChange).document,r.document.name,r.document.updateTime,i=Cn(t,r.document.name),o=Tn(r.document.updateTime);var s=new pt({mapValue:{fields:r.document.fields}}),u=(a=new gt(i,o,s,{}),r.targetIds||[]),c=r.removedTargetIds||[];n=new fn(u,c,a.key,a)}else if("documentDelete"in e)e.documentDelete,(r=e.documentDelete).document,i=Cn(t,r.document),o=r.readTime?Tn(r.readTime):R.min(),s=new bt(i,o),a=r.removedTargetIds||[],n=new fn([],a,s.key,s);else if("documentRemove"in e)e.documentRemove,(r=e.documentRemove).document,i=Cn(t,r.document),o=r.removedTargetIds||[],n=new fn([],o,i,null);else{if(!("filter"in e))return v();e.filter;var l=e.filter;l.targetId,r=l.count||0,i=new Ve(r),o=l.targetId,n=new hn(o,i)}return n}(this.Qt,t),n=function(t){if(!("targetChange"in t))return R.min();var e=t.targetChange;return e.targetIds&&e.targetIds.length?R.min():e.readTime?Tn(e.readTime):R.min()}(t);return this.listener.ah(e,n)},e.prototype.uh=function(t){var e={};e.database=Pn(this.Qt),e.addTarget=function(t,e){var n,r=e.target;return(n=St(r)?{documents:Ln(t,r)}:{query:Fn(t,r)}).targetId=e.targetId,e.resumeToken.l()>0?n.resumeToken=En(t,e.resumeToken):e.Ot._(R.min())>0&&(n.readTime=_n(t,e.Ot.j())),n}(this.Qt,t);var n=function(t,e){var n=function(t,e){switch(e){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return v()}}(0,e.Ft);return null==n?null:{"goog-listen-tags":n}}(this.Qt,t);n&&(e.labels=n),this.th(e)},e.prototype.hh=function(t){var e={};e.database=Pn(this.Qt),e.removeTarget=t,this.th(e)},e}(jo),Do=function(t){function e(e,n,r,i,o){var a=this;return(a=t.call(this,e,"write_stream_connection_backoff","write_stream_idle",n,r,o)||this).Qt=i,a.lh=!1,a}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"_h",{get:function(){return this.lh}
2,enumerable:!1,configurable:!0}),e.prototype.start=function(){this.lh=!1,this.lastStreamToken=void 0,t.prototype.start.call(this)},e.prototype.nh=function(){this.lh&&this.fh([])},e.prototype.oh=function(t){return this.Qu.Cu("Write",t)},e.prototype.onMessage=function(t){if(m(!!t.streamToken),this.lastStreamToken=t.streamToken,this.lh){this.Gu.reset();var e=function(t,e){return t&&t.length>0?(m(void 0!==e),t.map((function(t){return function(t,e){var n=t.updateTime?Tn(t.updateTime):Tn(e);n.isEqual(R.min())&&(n=Tn(e));var r=null;return t.transformResults&&t.transformResults.length>0&&(r=t.transformResults),new _e(n,r)}(t,e)}))):[]}(t.writeResults,t.commitTime),n=Tn(t.commitTime);return this.listener.dh(n,e)}return m(!t.writeResults||0===t.writeResults.length),this.lh=!0,this.listener.wh()},e.prototype.Eh=function(){var t={};t.database=Pn(this.Qt),this.th(t)},e.prototype.fh=function(t){var e=this,n={streamToken:this.lastStreamToken,writes:t.map((function(t){return Rn(e.Qt,t)}))};this.th(n)},e}(jo),Ro=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).credentials=e,i.Qu=n,i.Qt=r,i.Th=!1,i}return Object(a.c)(e,t),e.prototype.Ih=function(){if(this.Th)throw new S(T.FAILED_PRECONDITION,"The client has already been terminated.")},e.prototype.pu=function(t,e,n){var r=this;return this.Ih(),this.credentials.getToken().then((function(i){return r.Qu.pu(t,e,n,i)})).catch((function(t){throw t.code===T.UNAUTHENTICATED&&r.credentials.p(),t}))},e.prototype.Du=function(t,e,n){var r=this;return this.Ih(),this.credentials.getToken().then((function(i){return r.Qu.Du(t,e,n,i)})).catch((function(t){throw t.code===T.UNAUTHENTICATED&&r.credentials.p(),t}))},e.prototype.terminate=function(){this.Th=!1},e}((function(){})),Mo=function(){function t(t,e){this._s=t,this.fa=e,this.state="Unknown",this.mh=0,this.Ah=null,this.Rh=!0}return t.prototype.Ph=function(){var t=this;0===this.mh&&(this.yh("Unknown"),this.Ah=this._s.Tr("online_state_timeout",1e4,(function(){return t.Ah=null,t.gh("Backend didn't respond within 10 seconds."),t.yh("Offline"),Promise.resolve()})))},t.prototype.Vh=function(t){"Online"===this.state?this.yh("Unknown"):(this.mh++,this.mh>=1&&(this.ph(),this.gh("Connection failed 1 times. Most recent error: "+t.toString()),this.yh("Offline")))},t.prototype.set=function(t){this.ph(),this.mh=0,"Online"===t&&(this.Rh=!1),this.yh(t)},t.prototype.yh=function(t){t!==this.state&&(this.state=t,this.fa(t))},t.prototype.gh=function(t){var e="Could not reach Cloud Firestore backend. "+t+"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";this.Rh?(h(e),this.Rh=!1):f("OnlineStateTracker",e)},t.prototype.ph=function(){null!==this.Ah&&(this.Ah.cancel(),this.Ah=null)},t}(),Lo=function(t,e,n,r,i){var o=this;this.bh=t,this.Sh=e,this._s=n,this.Dh={},this.Ch=[],this.xh=new Map,this.Nh=new Set,this.$h=[],this.Fh=i,this.Fh.ou((function(t){n.Ps((function(){return Object(a.b)(o,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return Go(this)?(f("RemoteStore","Restarting streams for network reachability change."),[4,function(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return(e=y(t)).Nh.add(4),[4,Uo(e)];case 1:return n.sent(),e.Oh.set("Unknown"),e.Nh.delete(4),[4,Fo(e)];case 2:return n.sent(),[2]}}))}))}(this)]):[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}
2))}))}))})),this.Oh=new Mo(n,r)};function Fo(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:if(!Go(t))return[3,4];e=0,n=t.$h,r.label=1;case 1:return e<n.length?[4,(0,n[e])(!0)]:[3,4];case 2:r.sent(),r.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))}function Uo(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:e=0,n=t.$h,r.label=1;case 1:return e<n.length?[4,(0,n[e])(!1)]:[3,4];case 2:r.sent(),r.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))}function Vo(t,e){var n=y(t);n.xh.has(e.targetId)||(n.xh.set(e.targetId,e),Ho(n)?Wo(n):sa(n).Hu()&&qo(n,e))}function Bo(t,e){var n=y(t),r=sa(n);n.xh.delete(e),r.Hu()&&zo(n,e),0===n.xh.size&&(r.Hu()?r.Xu():Go(n)&&n.Oh.set("Unknown"))}function qo(t,e){t.kh.on(e.targetId),sa(t).uh(e)}function zo(t,e){t.kh.on(e),sa(t).hh(e)}function Wo(t){t.kh=new vn({vn:function(e){return t.Dh.vn(e)},Sn:function(e){return t.xh.get(e)||null}}),sa(t).start(),t.Oh.Ph()}function Ho(t){return Go(t)&&!sa(t).zu()&&t.xh.size>0}function Go(t){return 0===y(t).Nh.size}function Yo(t){t.kh=void 0}function Ko(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return t.xh.forEach((function(e,n){qo(t,e)})),[2]}))}))}function Qo(t,e){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(n){return Yo(t),Ho(t)?(t.Oh.Vh(e),Wo(t)):t.Oh.set("Unknown"),[2]}))}))}function Xo(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o;return Object(a.d)(this,(function(s){switch(s.label){case 0:if(t.Oh.set("Online"),!(e instanceof dn&&2===e.state&&e.cause))return[3,6];s.label=1;case 1:return s.trys.push([1,3,,5]),[4,function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o;return Object(a.d)(this,(function(a){switch(a.label){case 0:n=e.cause,r=0,i=e.targetIds,a.label=1;case 1:return r<i.length?(o=i[r],t.xh.has(o)?[4,t.Dh.Mh(o,n)]:[3,3]):[3,5];case 2:a.sent(),t.xh.delete(o),t.kh.removeTarget(o),a.label=3;case 3:a.label=4;case 4:return r++,[3,1];case 5:return[2]}}
2))}))}(t,e)];case 2:return s.sent(),[3,5];case 3:return r=s.sent(),f("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),r),[4,$o(t,r)];case 4:return s.sent(),[3,5];case 5:return[3,13];case 6:if(e instanceof fn?t.kh.dn(e):e instanceof hn?t.kh.Pn(e):t.kh.Tn(e),n.isEqual(R.min()))return[3,13];s.label=7;case 7:return s.trys.push([7,11,,13]),[4,Wi(t.bh)];case 8:return i=s.sent(),n._(i)>=0?[4,function(t,e){var n=t.kh.Vn(e);return n.$e.forEach((function(n,r){if(n.resumeToken.l()>0){var i=t.xh.get(r);i&&t.xh.set(r,i.Mt(n.resumeToken,e))}})),n.Fe.forEach((function(e){var n=t.xh.get(e);if(n){t.xh.set(e,n.Mt(O.T,n.Ot)),zo(t,e);var r=new ie(n.target,e,1,n.sequenceNumber);qo(t,r)}})),t.Dh.Lh(n)}(t,n)]:[3,10];case 9:s.sent(),s.label=10;case 10:return[3,13];case 11:return f("RemoteStore","Failed to raise snapshot:",o=s.sent()),[4,$o(t,o)];case 12:return s.sent(),[3,13];case 13:return[2]}}))}))}function $o(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r=this;return Object(a.d)(this,(function(i){switch(i.label){case 0:if(!rr(e))throw e;return t.Nh.add(1),[4,Uo(t)];case 1:return i.sent(),t.Oh.set("Offline"),n||(n=function(){return Wi(t.bh)}),t._s.po((function(){return Object(a.b)(r,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return f("RemoteStore","Retrying IndexedDB access"),[4,n()];case 1:return e.sent(),t.Nh.delete(1),[4,Fo(t)];case 2:return e.sent(),[2]}}))}))})),[2]}}))}))}function Jo(t,e){return e().catch((function(n){return $o(t,n,e)}))}function Zo(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n,r,i,o;return Object(a.d)(this,(function(a){switch(a.label){case 0:e=y(t),n=ua(e),r=e.Ch.length>0?e.Ch[e.Ch.length-1].batchId:-1,a.label=1;case 1:if(!function(t){return Go(t)&&t.Ch.length<10}(e))return[3,7];a.label=2;case 2:return a.trys.push([2,4,,6]),[4,Yi(e.bh,r)];case 3:return null===(i=a.sent())?(0===e.Ch.length&&n.Xu(),[3,7]):(r=i.batchId,function(t,e){t.Ch.push(e);var n=ua(t);n.Hu()&&n._h&&n.fh(e.mutations)}(e,i),[3,6]);case 4:return o=a.sent(),[4,$o(e,o)];case 5:return a.sent(),[3,6];case 6:return[3,1];case 7:return ta(e)&&ea(e),[2]}}))}))}function ta(t){return Go(t)&&!ua(t).zu()&&t.Ch.length>0}function ea(t){ua(t).start()}function na(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return ua(t).Eh(),[2]}))}
2))}function ra(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n,r,i;return Object(a.d)(this,(function(o){for(e=ua(t),n=0,r=t.Ch;n<r.length;n++)i=r[n],e.fh(i.mutations);return[2]}))}))}function ia(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return r=t.Ch.shift(),i=Mr.from(r,e,n),[4,Jo(t,(function(){return t.Dh.Bh(i)}))];case 1:return o.sent(),[4,Zo(t)];case 2:return o.sent(),[2]}}))}))}function oa(t,e){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(n){switch(n.label){case 0:return e&&ua(t)._h?[4,function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:return Be(r=e.code)&&r!==T.ABORTED?(n=t.Ch.shift(),ua(t).Yu(),[4,Jo(t,(function(){return t.Dh.qh(n.batchId,e)}))]):[3,3];case 1:return i.sent(),[4,Zo(t)];case 2:i.sent(),i.label=3;case 3:return[2]}}))}))}(t,e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return ta(t)&&ea(t),[2]}}))}))}function aa(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return n=y(t),e?(n.Nh.delete(2),[4,Fo(n)]):[3,2];case 1:return r.sent(),[3,5];case 2:return e?[3,4]:(n.Nh.add(2),[4,Uo(n)]);case 3:r.sent(),n.Oh.set("Unknown"),r.label=4;case 4:r.label=5;case 5:return[2]}}
2))}))}function sa(t){var e=this;return t.Uh||(t.Uh=function(t,e,n){var r=y(t);return r.Ih(),new Ao(e,r.Qu,r.credentials,r.Qt,n)}(t.Sh,t._s,{wu:Ko.bind(null,t),Tu:Qo.bind(null,t),ah:Xo.bind(null,t)}),t.$h.push((function(n){return Object(a.b)(e,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return n?(t.Uh.Yu(),Ho(t)?Wo(t):t.Oh.set("Unknown"),[3,3]):[3,1];case 1:return[4,t.Uh.stop()];case 2:e.sent(),Yo(t),e.label=3;case 3:return[2]}}))}))}))),t.Uh}function ua(t){var e=this;return t.Qh||(t.Qh=function(t,e,n){var r=y(t);return r.Ih(),new Do(e,r.Qu,r.credentials,r.Qt,n)}(t.Sh,t._s,{wu:na.bind(null,t),Tu:oa.bind(null,t),wh:ra.bind(null,t),dh:ia.bind(null,t)}),t.$h.push((function(n){return Object(a.b)(e,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return n?(t.Qh.Yu(),[4,Zo(t)]):[3,2];case 1:return e.sent(),[3,4];case 2:return[4,t.Qh.stop()];case 3:e.sent(),t.Ch.length>0&&(f("RemoteStore","Stopping write stream with "+t.Ch.length+" pending writes"),t.Ch=[]),e.label=4;case 4:return[2]}}
2))}))}))),t.Qh}var ca=function(){this.Kh=void 0,this.listeners=[]},la=function(){this.queries=new ii((function(t){return Zt(t)}),Jt),this.onlineState="Unknown",this.Wh=new Set};function fa(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u,c;return Object(a.d)(this,(function(a){switch(a.label){case 0:if(n=y(t),r=e.query,i=!1,(o=n.queries.get(r))||(i=!0,o=new ca),!i)return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),s=o,[4,n.jh(r)];case 2:return s.Kh=a.sent(),[3,4];case 3:return u=a.sent(),c=cr(u,"Initialization of query '"+te(e.query)+"' failed"),[2,void e.onError(c)];case 4:return n.queries.set(r,o),o.listeners.push(e),e.Gh(n.onlineState),o.Kh&&e.zh(o.Kh)&&va(n),[2]}}))}))}function ha(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s;return Object(a.d)(this,(function(a){return n=y(t),r=e.query,i=!1,(o=n.queries.get(r))&&(s=o.listeners.indexOf(e))>=0&&(o.listeners.splice(s,1),i=0===o.listeners.length),i?[2,(n.queries.delete(r),n.Hh(r))]:[2]}))}))}function da(t,e){for(var n=y(t),r=!1,i=0,o=e;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].zh(a)&&(r=!0);u.Kh=a}}r&&va(n)}function pa(t,e,n){var r=y(t),i=r.queries.get(e);if(i)for(var o=0,a=i.listeners;o<a.length;o++)a[o].onError(n);r.queries.delete(e)}function va(t){t.Wh.forEach((function(t){t.next()}))}var ma=function(){function t(t,e,n){this.query=t,this.Jh=e,this.Yh=!1,this.Xh=null,this.onlineState="Unknown",this.options=n||{}}return t.prototype.zh=function(t){if(!this.options.includeMetadataChanges){for(var e=[],n=0,r=t.docChanges;n<r.length;n++){var i=r[n];3!==i.type&&e.push(i)}t=new un(t.query,t.docs,t.Se,e,t.De,t.fromCache,t.Ce,!0)}var o=!1;return this.Yh?this.Zh(t)&&(this.Jh.next(t),o=!0):this.tl(t,this.onlineState)&&(this.el(t),o=!0),this.Xh=t,o},t.prototype.onError=function(t){this.Jh.error(t)},t.prototype.Gh=function(t){this.onlineState=t;var e=!1;return this.Xh&&!this.Yh&&this.tl(this.Xh,t)&&(this.el(this.Xh),e=!0),e},t.prototype.tl=function(t,e){if(!t.fromCache)return!0;var n="Offline"!==e;return!(this.options.nl&&n||t.docs.et()&&"Offline"!==e)},t.prototype.Zh=function(t){if(t.docChanges.length>0)return!0;var e=this.Xh&&this.Xh.hasPendingWrites!==t.hasPendingWrites;return!(!t.Ce&&!e)&&!0===this.options.includeMetadataChanges},t.prototype.el=function(t){t=un.Ne(t.query,t.docs,t.De,t.fromCache),this.Yh=!0,this.Jh.next(t)},t}(),ya=function(){function t(t,e){this.payload=t,this.byteLength=e}return t.prototype.sl=function(){return"metadata"in this.payload},t}(),ga=function(){function t(t){this.Qt=t}return t.prototype.Pc=function(t){return Cn(this.Qt,t)},t.prototype.yc=function(t){return t.metadata.exists?Dn(this.Qt,t.document,!1):new bt(this.Pc(t.metadata.name),this.gc(t.metadata.readTime))},t.prototype.gc=function(t){return Tn(t)},t}(),ba=function(){function t(t,e,n){this.il=t,this.bh=e,this.Qt=n,this.queries=[],this.documents=[],this.progress=wa(t)}return t.prototype.rl=function(t){this.progress.bytesLoaded+=t.byteLength;var e=this.progress.documentsLoaded;return t.payload.namedQuery?this.queries.push(t.payload.namedQuery):t.payload.documentMetadata?(this.documents.push({metadata:t.payload.documentMetadata}),t.payload.documentMetadata.exists||++e):t.payload.document&&(this.documents[this.documents.length-1].document=t.payload.document,++e),e!==this.progress.documentsLoaded?(this.progress.documentsLoaded=e,Object.assign({},this.progress)):null},t.prototype.ol=function(t){for(var e=new Map,n=new ga(this.Qt),r=0,i=t;r<i.length;r++){var o=i[r];if(o.metadata.queries)for(var a=n.Pc(o.metadata.name),s=0,u=o.metadata.queries;s<u.length;s++){var c=u[s],l=(e.get(c)||nn()).add(a);e.set(c,l)}}return e},t.prototype.complete=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e,n,r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return[4,to(this.bh,new ga(this.Qt),this.documents,this.il.id)];case 1:t=o.sent(),e=this.ol(this.documents),n=0,r=this.queries,o.label=2;case 2:return n<r.length?(i=r[n],[4,eo(this.bh,i,e.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),t))]}}))}))},t}();function wa(t){return{taskState:"Running",documentsLoaded:0,bytesLoaded:0,totalDocuments:t.totalDocuments,totalBytes:t.totalBytes}}var _a=function(t){this.key=t},Ea=function(t){this.key=t},Oa=function(){function t(t,e){this.query=t,this.cl=e,this.al=null,this.Be=!1,this.ul=nn(),this.De=nn(),this.hl=ne(t),this.ll=new an(this.hl)}return Object.defineProperty(t.prototype,"_l",{get:function(){return this.cl}
2,enumerable:!1,configurable:!0}),t.prototype.fl=function(t,e){var n=this,r=e?e.dl:new sn,i=e?e.ll:this.ll,o=e?e.De:this.De,a=i,s=!1,u=Wt(this.query)&&i.size===this.query.limit?i.last():null,c=Ht(this.query)&&i.size===this.query.limit?i.first():null;if(t.Xt((function(t,e){var l=i.get(t),f=e instanceof gt?e:null;f&&(f=ee(n.query,f)?f:null);var h=!!l&&n.De.has(l.key),d=!!f&&(f.Vt||n.De.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.wl(l,f)||(r.track({type:2,doc:f}),p=!0,(u&&n.hl(f,u)>0||c&&n.hl(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(t):o.delete(t)):(a=a.delete(t),o=o.delete(t)))})),Wt(this.query)||Ht(this.query))for(;a.size>this.query.limit;){var l=Wt(this.query)?a.last():a.first();a=a.delete(l.key),o=o.delete(l.key),r.track({type:1,doc:l})}return{ll:a,dl:r,lc:s,De:o}},t.prototype.wl=function(t,e){return t.Vt&&e.hasCommittedMutations&&!e.Vt},t.prototype.wi=function(t,e,n){var r=this,i=this.ll;this.ll=t.ll,this.De=t.De;var o=t.dl.ve();o.sort((function(t,e){return function(t,e){var n=function(t){switch(t){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return v()}};return n(t)-n(e)}(t.type,e.type)||r.hl(t.doc,e.doc)})),this.El(n);var a=e?this.Tl():[],s=0===this.ul.size&&this.Be?1:0,u=s!==this.al;return this.al=s,0!==o.length||u?{snapshot:new un(this.query,t.ll,i,o,t.De,0===s,u,!1),Il:a}:{Il:a}},t.prototype.Gh=function(t){return this.Be&&"Offline"===t?(this.Be=!1,this.wi({ll:this.ll,dl:new sn,De:this.De,lc:!1},!1)):{Il:[]}},t.prototype.ml=function(t){return!this.cl.has(t)&&!!this.ll.has(t)&&!this.ll.get(t).Vt},t.prototype.El=function(t){var e=this;t&&(t.qe.forEach((function(t){return e.cl=e.cl.add(t)})),t.Ue.forEach((function(t){})),t.Qe.forEach((function(t){return e.cl=e.cl.delete(t)})),this.Be=t.Be)},t.prototype.Tl=function(){var t=this;if(!this.Be)return[];var e=this.ul;this.ul=nn(),this.ll.forEach((function(e){t.ml(e.key)&&(t.ul=t.ul.add(e.key))}));var n=[];return e.forEach((function(e){t.ul.has(e)||n.push(new Ea(e))})),this.ul.forEach((function(t){e.has(t)||n.push(new _a(t))})),n},t.prototype.Al=function(t){this.cl=t.Rc,this.ul=nn();var e=this.fl(t.documents);return this.wi(e,!0)},t.prototype.Rl=function(){return un.Ne(this.query,this.ll,this.De,0===this.al)},t}(),Ta=function(t,e,n){this.query=t,this.targetId=e,this.view=n},Sa=function(t){this.key=t,this.Pl=!1},ka=function(){function t(t,e,n,r,i,o){this.bh=t,this.yl=e,this.gl=n,this.Vl=r,this.currentUser=i,this.pl=o,this.bl={},this.vl=new ii((function(t){return Zt(t)}),Jt),this.Sl=new Map,this.Dl=new Set,this.Cl=new ze(V.H),this.xl=new Map,this.Nl=new ro,this.$l={},this.Fl=new Map,this.Ol=di.Li(),this.onlineState="Unknown",this.kl=void 0}return Object.defineProperty(t.prototype,"Ml",{get:function(){return!0===this.kl},enumerable:!1,configurable:!0}),t}();function Ia(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u;return Object(a.d)(this,(function(a){switch(a.label){case 0:return n=ns(t),(o=n.vl.get(e))?(r=o.targetId,n.Vl.Fa(r),i=o.view.Rl(),[3,4]):[3,1];case 1:return[4,Ki(n.bh,Xt(e))];case 2:return s=a.sent(),u=n.Vl.Fa(s.targetId),r=s.targetId,[4,Ca(n,e,r,"current"===u)];case 3:i=a.sent(),n.Ml&&Vo(n.yl,s),a.label=4;case 4:return[2,i]}}))}))}function Ca(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o,s,u,c,l;return Object(a.d)(this,(function(f){switch(f.label){case 0:return t.Ll=function(e,n,r){return function(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o,s;return Object(a.d)(this,(function(a){switch(a.label){case 0:return(i=e.view.fl(n)).lc?[4,Xi(t.bh,e.query,!1).then((function(t){var n=t.documents;return e.view.fl(n,i)}))]:[3,2];case 1:i=a.sent(),a.label=2;case 2:return o=r&&r.$e.get(e.targetId),s=e.view.wi(i,t.Ml,o),[2,(Ba(t,e.targetId,s.Il),s.snapshot)]}}))}))}(t,e,n,r)},[4,Xi(t.bh,e,!0)];case 1:return i=f.sent(),o=new Oa(e,i.Rc),s=o.fl(i.documents),u=ln.Le(n,r&&"Offline"!==t.onlineState),c=o.wi(s,t.Ml,u),Ba(t,n,c.Il),l=new Ta(e,n,o),[2,(t.vl.set(e,l),t.Sl.has(n)?t.Sl.get(n).push(e):t.Sl.set(n,[e]),c.snapshot)]}}))}))}function Na(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return n=y(t),r=n.vl.get(e),(i=n.Sl.get(r.targetId)).length>1?[2,(n.Sl.set(r.targetId,i.filter((function(t){return!Jt(t,e)}
2))),void n.vl.delete(e))]:n.Ml?(n.Vl.ka(r.targetId),n.Vl.Da(r.targetId)?[3,2]:[4,Qi(n.bh,r.targetId,!1).then((function(){n.Vl.La(r.targetId),Bo(n.yl,r.targetId),Ua(n,r.targetId)})).catch(ri)]):[3,3];case 1:o.sent(),o.label=2;case 2:return[3,5];case 3:return Ua(n,r.targetId),[4,Qi(n.bh,r.targetId,!0)];case 4:o.sent(),o.label=5;case 5:return[2]}}))}))}function xa(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s;return Object(a.d)(this,(function(a){switch(a.label){case 0:r=rs(t),a.label=1;case 1:return a.trys.push([1,5,,6]),[4,function(t,e){var n,r=y(t),i=D.now(),o=e.reduce((function(t,e){return t.add(e.key)}),nn());return r.persistence.runTransaction("Locally write mutations","readwrite",(function(t){return r.Tc.Xo(t,o).next((function(o){n=o;for(var a=[],s=0,u=e;s<u.length;s++){var c=u[s],l=Ie(c,n.get(c.key));null!=l&&a.push(new Pe(c.key,l,mt(l.proto.mapValue),Ee.exists(!0)))}return r.zo.Ri(t,i,a,e)}))})).then((function(t){var e=t.xs(n);return{batchId:t.batchId,ri:e}}))}(r.bh,e)];case 2:return i=a.sent(),r.Vl.Ca(i.batchId),function(t,e,n){var r=t.$l[t.currentUser.A()];r||(r=new ze(w)),r=r.zt(e,n),t.$l[t.currentUser.A()]=r}(r,i.batchId,n),[4,Wa(r,i.ri)];case 3:return a.sent(),[4,Zo(r.yl)];case 4:return a.sent(),[3,6];case 5:return o=a.sent(),s=cr(o,"Failed to persist write"),n.reject(s),[3,6];case 6:return[2]}}
2))}))}function Pa(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:n=y(t),i.label=1;case 1:return i.trys.push([1,4,,6]),[4,Hi(n.bh,e)];case 2:return r=i.sent(),e.$e.forEach((function(t,e){var r=n.xl.get(e);r&&(m(t.qe.size+t.Ue.size+t.Qe.size<=1),t.qe.size>0?r.Pl=!0:t.Ue.size>0?m(r.Pl):t.Qe.size>0&&(m(r.Pl),r.Pl=!1))})),[4,Wa(n,r,e)];case 3:return i.sent(),[3,6];case 4:return[4,ri(i.sent())];case 5:return i.sent(),[3,6];case 6:return[2]}}))}))}function ja(t,e,n){var r=y(t);if(r.Ml&&0===n||!r.Ml&&1===n){var i=[];r.vl.forEach((function(t,n){var r=n.view.Gh(e);r.snapshot&&i.push(r.snapshot)})),function(t,e){var n=y(t);n.onlineState=e;var r=!1;n.queries.forEach((function(t,n){for(var i=0,o=n.listeners;i<o.length;i++)o[i].Gh(e)&&(r=!0)})),r&&va(n)}(r.gl,e),i.length&&r.bl.ah(i),r.onlineState=e,r.Ml&&r.Vl.Qa(e)}}function Aa(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s,u,c;return Object(a.d)(this,(function(a){switch(a.label){case 0:return(r=y(t)).Vl.Ba(e,"rejected",n),i=r.xl.get(e),(o=i&&i.key)?(s=(s=new ze(V.H)).zt(o,new bt(o,R.min())),u=nn().add(o),c=new cn(R.min(),new Map,new Ge(w),s,u),[4,Pa(r,c)]):[3,2];case 1:return a.sent(),r.Cl=r.Cl.remove(o),r.xl.delete(e),za(r),[3,4];case 2:return[4,Qi(r.bh,e,!1).then((function(){return Ua(r,e,n)}
2)).catch(ri)];case 3:a.sent(),a.label=4;case 4:return[2]}}))}))}function Da(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:n=y(t),r=e.batch.batchId,o.label=1;case 1:return o.trys.push([1,4,,6]),[4,zi(n.bh,e)];case 2:return i=o.sent(),Fa(n,r,null),La(n,r),n.Vl.Na(r,"acknowledged"),[4,Wa(n,i)];case 3:return o.sent(),[3,6];case 4:return[4,ri(o.sent())];case 5:return o.sent(),[3,6];case 6:return[2]}}))}))}function Ra(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:r=y(t),o.label=1;case 1:return o.trys.push([1,4,,6]),[4,function(t,e){var n=y(t);return n.persistence.runTransaction("Reject batch","readwrite-primary",(function(t){var r;return n.zo.Pi(t,e).next((function(e){return m(null!==e),r=e.keys(),n.zo.Ci(t,e)})).next((function(){return n.zo.$i(t)})).next((function(){return n.Tc.Xo(t,r)}))}))}(r.bh,e)];case 2:return i=o.sent(),Fa(r,e,n),La(r,e),r.Vl.Na(e,"rejected",n),[4,Wa(r,i)];case 3:return o.sent(),[3,6];case 4:return[4,ri(o.sent())];case 5:return o.sent(),[3,6];case 6:return[2]}}
2))}))}function Ma(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s;return Object(a.d)(this,(function(a){switch(a.label){case 0:Go((n=y(t)).yl)||f("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(t){var e=y(t);return e.persistence.runTransaction("Get highest unacknowledged batch id","readonly",(function(t){return e.zo.Vi(t)}))}(n.bh)];case 2:return-1===(r=a.sent())?[2,void e.resolve()]:((i=n.Fl.get(r)||[]).push(e),n.Fl.set(r,i),[3,4]);case 3:return o=a.sent(),s=cr(o,"Initialization of waitForPendingWrites() operation failed"),e.reject(s),[3,4];case 4:return[2]}}))}))}function La(t,e){(t.Fl.get(e)||[]).forEach((function(t){t.resolve()})),t.Fl.delete(e)}function Fa(t,e,n){var r=y(t),i=r.$l[r.currentUser.A()];if(i){var o=i.get(e);o&&(n?o.reject(n):o.resolve(),i=i.remove(e)),r.$l[r.currentUser.A()]=i}}function Ua(t,e,n){void 0===n&&(n=null),t.Vl.ka(e);for(var r=0,i=t.Sl.get(e);r<i.length;r++){var o=i[r];t.vl.delete(o),n&&t.bl.Bl(o,n)}t.Sl.delete(e),t.Ml&&t.Nl.Fc(e).forEach((function(e){t.Nl.Fi(e)||Va(t,e)}))}function Va(t,e){t.Dl.delete(e.path.rt());var n=t.Cl.get(e);null!==n&&(Bo(t.yl,n),t.Cl=t.Cl.remove(e),t.xl.delete(n),za(t))}function Ba(t,e,n){for(var r=0,i=n;r<i.length;r++){var o=i[r];o instanceof _a?(t.Nl.nr(o.key,e),qa(t,o)):o instanceof Ea?(f("SyncEngine","Document no longer in limbo: "+o.key),t.Nl.ir(o.key,e),t.Nl.Fi(o.key)||Va(t,o.key)):v()}}function qa(t,e){var n=e.key,r=n.path.rt();t.Cl.get(n)||t.Dl.has(r)||(f("SyncEngine","New document in limbo: "+n),t.Dl.add(r),za(t))}function za(t){for(;t.Dl.size>0&&t.Cl.size<t.pl;){var e=t.Dl.values().next().value;t.Dl.delete(e);var n=new V(L.ot(e)),r=t.Ol.next();t.xl.set(r,new Sa(n)),t.Cl=t.Cl.zt(n,r),Vo(t.yl,new ie(Xt(zt(n.path)),r,2,A.q))}}function Wa(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s;return Object(a.d)(this,(function(u){switch(u.label){case 0:return r=y(t),i=[],o=[],s=[],r.vl.et()?[3,3]:(r.vl.forEach((function(t,a){s.push(r.Ll(a,e,n).then((function(t){if(t){r.Ml&&r.Vl.Ba(a.targetId,t.fromCache?"not-current":"current"),i.push(t);var e=Fi.oc(a.targetId,t);o.push(e)}})))})),[4,Promise.all(s)]);case 1:return u.sent(),r.bl.ah(i),[4,function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u,c,l,h;return Object(a.d)(this,(function(a){switch(a.label){case 0:n=y(t),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,n.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(t){return Jn.forEach(e,(function(e){return Jn.forEach(e.ic,(function(r){return n.persistence.Ti.nr(t,e.targetId,r)})).next((function(){return Jn.forEach(e.rc,(function(r){return n.persistence.Ti.ir(t,e.targetId,r)}))}))}))}))];case 2:return a.sent(),[3,4];case 3:if(!rr(r=a.sent()))throw r;return f("LocalStore","Failed to update sequence numbers: "+r),[3,4];case 4:for(i=0,o=e;i<o.length;i++)s=o[i],u=s.targetId,s.fromCache||(c=n.fc.get(u),l=c.Ot,h=c.Lt(l),n.fc=n.fc.zt(u,h));return[2]}}))}))}(r.bh,o)];case 2:u.sent(),u.label=3;case 3:return[2]}}
2))}))}function Ha(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:return(n=y(t)).currentUser.isEqual(e)?[3,3]:(f("SyncEngine","User change. New user:",e.A()),[4,qi(n.bh,e)]);case 1:return r=i.sent(),n.currentUser=e,function(t,e){t.Fl.forEach((function(t){t.forEach((function(t){t.reject(new S(T.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),t.Fl.clear()}(n),n.Vl.Ua(e,r.mc,r.Ac),[4,Wa(n,r.Ic)];case 2:i.sent(),i.label=3;case 3:return[2]}}))}))}function Ga(t,e){var n=y(t),r=n.xl.get(e);if(r&&r.Pl)return nn().add(r.key);var i=nn(),o=n.Sl.get(e);if(!o)return i;for(var a=0,s=o;a<s.length;a++){var u=s[a],c=n.vl.get(u);i=i.Pe(c.view._l)}return i}function Ya(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return[4,Xi((n=y(t)).bh,e.query,!0)];case 1:return r=o.sent(),i=e.view.Al(r),[2,(n.Ml&&Ba(n,e.targetId,i.Il),i)]}}))}))}function Ka(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){return[2,Ji((e=y(t)).bh).then((function(t){return Wa(e,t)}))]}))}))}function Qa(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o;return Object(a.d)(this,(function(a){switch(a.label){case 0:return[4,function(t,e){var n=y(t),r=y(n.zo);return n.persistence.runTransaction("Lookup mutation documents","readonly",(function(t){return r.yi(t,e).next((function(e){return e?n.Tc.Xo(t,e):Jn.resolve(null)}))}))}((i=y(t)).bh,e)];case 1:return null===(o=a.sent())?[3,6]:"pending"!==n?[3,3]:[4,Zo(i.yl)];case 2:return a.sent(),[3,4];case 3:"acknowledged"===n||"rejected"===n?(Fa(i,e,r||null),La(i,e),function(t,e){y(y(t).zo).xi(e)}(i.bh,e)):v(),a.label=4;case 4:return[4,Wa(i,o)];case 5:return a.sent(),[3,7];case 6:f("SyncEngine","Cannot apply mutation batch with id: "+e),a.label=7;case 7:return[2]}}
2))}))}function Xa(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u,c,l;return Object(a.d)(this,(function(a){switch(a.label){case 0:return ns(n=y(t)),rs(n),!0!==e||!0===n.kl?[3,3]:(r=n.Vl.va(),[4,$a(n,r.it())]);case 1:return i=a.sent(),n.kl=!0,[4,aa(n.yl,!0)];case 2:for(a.sent(),o=0,s=i;o<s.length;o++)u=s[o],Vo(n.yl,u);return[3,7];case 3:return!1!==e||!1===n.kl?[3,7]:(c=[],l=Promise.resolve(),n.Sl.forEach((function(t,e){n.Vl.Ma(e)?c.push(e):l=l.then((function(){return Ua(n,e),Qi(n.bh,e,!0)})),Bo(n.yl,e)})),[4,l]);case 4:return a.sent(),[4,$a(n,c)];case 5:return a.sent(),function(t){var e=y(t);e.xl.forEach((function(t,n){Bo(e.yl,n)})),e.Nl.Oc(),e.xl=new Map,e.Cl=new ze(V.H)}(n),n.kl=!1,[4,aa(n.yl,!1)];case 6:a.sent(),a.label=7;case 7:return[2]}}))}))}function $a(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u,c,l,f,h,d,p,v,m;return Object(a.d)(this,(function(a){switch(a.label){case 0:n=y(t),r=[],i=[],o=0,s=e,a.label=1;case 1:return o<s.length?(u=s[o],c=void 0,(l=n.Sl.get(u))&&0!==l.length?[4,Ki(n.bh,Xt(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.vl.get(d),[4,Ya(n,p)]):[3,6];case 4:(v=a.sent()).snapshot&&i.push(v.snapshot),a.label=5;case 5:return f++,[3,3];case 6:return[3,11];case 7:return[4,$i(n.bh,u)];case 8:return m=a.sent(),[4,Ki(n.bh,m)];case 9:return c=a.sent(),[4,Ca(n,Ja(m),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.bl.ah(i),r)]}}))}))}function Ja(t){return qt(t.path,t.collectionGroup,t.orderBy,t.filters,t.limit,"F",t.startAt,t.endAt)}function Za(t){var e=y(t);return y(y(e.bh).persistence).Uo()}function ts(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o,s;return Object(a.d)(this,(function(a){switch(a.label){case 0:return(i=y(t)).kl?(f("SyncEngine","Ignoring unexpected query state notification."),[3,8]):[3,1];case 1:if(!i.Sl.has(e))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,Ji(i.bh)];case 3:return o=a.sent(),s=cn.Me(e,"current"===n),[4,Wa(i,o,s)];case 4:return a.sent(),[3,8];case 5:return[4,Qi(i.bh,e,!0)];case 6:return a.sent(),Ua(i,e,r),[3,8];case 7:v(),a.label=8;case 8:return[2]}}
2))}))}function es(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s,u,c,l,h,d,p;return Object(a.d)(this,(function(v){switch(v.label){case 0:if(!(r=ns(t)).kl)return[3,10];i=0,o=e,v.label=1;case 1:return i<o.length?(s=o[i],r.Sl.has(s)?(f("SyncEngine","Adding an already active target "+s),[3,5]):[4,$i(r.bh,s)]):[3,6];case 2:return u=v.sent(),[4,Ki(r.bh,u)];case 3:return c=v.sent(),[4,Ca(r,Ja(u),c.targetId,!1)];case 4:v.sent(),Vo(r.yl,c),v.label=5;case 5:return i++,[3,1];case 6:l=function(t){return Object(a.d)(this,(function(e){switch(e.label){case 0:return r.Sl.has(t)?[4,Qi(r.bh,t,!1).then((function(){Bo(r.yl,t),Ua(r,t)})).catch(ri)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))},h=0,d=n,v.label=7;case 7:return h<d.length?(p=d[h],[5,l(p)]):[3,10];case 8:v.sent(),v.label=9;case 9:return h++,[3,7];case 10:return[2]}}))}))}function ns(t){var e=y(t);return e.yl.Dh.Lh=Pa.bind(null,e),e.yl.Dh.vn=Ga.bind(null,e),e.yl.Dh.Mh=Aa.bind(null,e),e.bl.ah=da.bind(null,e.gl),e.bl.Bl=pa.bind(null,e.gl),e}function rs(t){var e=y(t);return e.yl.Dh.Bh=Da.bind(null,e),e.yl.Dh.qh=Ra.bind(null,e),e}function is(t,e,n){var r=y(t);(function(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s,u,c;return Object(a.d)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,14,,15]),[4,e.getMetadata()];case 1:return r=a.sent(),[4,function(t,e){var n=y(t),r=Tn(e.createTime);return n.persistence.runTransaction("hasNewerBundle","readonly",(function(t){return n.wo.Os(t,e.id)})).then((function(t){return!!t&&t.createTime._(r)>=0}))}(t.bh,r)];case 2:return a.sent()?[4,e.close()]:[3,4];case 3:return[2,(a.sent(),void n.ql(function(t){return{taskState:"Success",documentsLoaded:t.totalDocuments,bytesLoaded:t.totalBytes,totalDocuments:t.totalDocuments,totalBytes:t.totalBytes}}(r)))];case 4:return n.Ul(wa(r)),i=new ba(r,t.bh,e.Qt),[4,e.Ql()];case 5:o=a.sent(),a.label=6;case 6:return o?[4,i.rl(o)]:[3,10];case 7:return(s=a.sent())&&n.Ul(s),[4,e.Ql()];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,Wa(t,u.Go,void 0)];case 12:return a.sent(),[4,function(t,e){var n=y(t);return n.persistence.runTransaction("Save bundle","readwrite",(function(t){return n.wo.ks(t,e)}))}(t.bh,r)];case 13:return a.sent(),n.ql(u.progress),[3,15];case 14:return d("SyncEngine","Loading bundle failed with "+(c=a.sent())),n.Kl(c),[3,15];case 15:return[2]}}
2))}))})(r,e,n).then((function(){r.Vl.Wa()}))}var os=function(){function t(){this.synchronizeTabs=!1}return t.prototype.initialize=function(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return this.Qt=xo(t.yu.t),this.Vl=this.Wl(t),this.persistence=this.jl(t),[4,this.persistence.start()];case 1:return e.sent(),this.Gl=this.zl(t),this.bh=this.Hl(t),[2]}}))}))},t.prototype.zl=function(t){return null},t.prototype.Hl=function(t){return Bi(this.persistence,new Ui,t.Jl,this.Qt)},t.prototype.jl=function(t){return new co(fo.ia,this.Qt)},t.prototype.Wl=function(t){return new Eo},t.prototype.terminate=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return this.Gl&&this.Gl.stop(),[4,this.Vl.ko()];case 1:return t.sent(),[4,this.persistence.ko()];case 2:return t.sent(),[2]}}))}))},t}(),as=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).Yl=e,i.cacheSizeBytes=n,i.forceOwnership=r,i.synchronizeTabs=!1,i}return Object(a.c)(e,t),e.prototype.initialize=function(e){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(n){switch(n.label){case 0:return[4,t.prototype.initialize.call(this,e)];case 1:return n.sent(),[4,Zi(this.bh)];case 2:return n.sent(),[4,this.Yl.initialize(this,e)];case 3:return n.sent(),[4,rs(this.Yl._a)];case 4:return n.sent(),[4,Zo(this.Yl.yl)];case 5:return n.sent(),[2]}}))}))},e.prototype.Hl=function(t){return Bi(this.persistence,new Ui,t.Jl,this.Qt)},e.prototype.zl=function(t){var e=this.persistence.Ti.lr;return new wi(e,t._s)},e.prototype.jl=function(t){var e=Ri(t.yu.t,t.yu.persistenceKey),n=void 0!==this.cacheSizeBytes?ni.Ys(this.cacheSizeBytes):ni.ti;return new ji(this.synchronizeTabs,e,t.clientId,n,t._s,Co(),No(),this.Qt,this.Vl,!!this.forceOwnership)},e.prototype.Wl=function(t){return new Eo},e}(os),ss=function(t){function e(e,n){var r=this;return(r=t.call(this,e,n,!1)||this).Yl=e,r.cacheSizeBytes=n,r.synchronizeTabs=!0,r}return Object(a.c)(e,t),e.prototype.initialize=function(e){return Object(a.b)(this,void 0,void 0,(function(){var n,r=this;return Object(a.d)(this,(function(i){switch(i.label){case 0:return[4,t.prototype.initialize.call(this,e)];case 1:return i.sent(),n=this.Yl._a,this.Vl instanceof _o?(this.Vl._a={eu:Qa.bind(null,n),nu:ts.bind(null,n),su:es.bind(null,n),Uo:Za.bind(null,n),tu:Ka.bind(null,n)},[4,this.Vl.start()]):[3,3];case 2:i.sent(),i.label=3;case 3:return[4,this.persistence.Ro((function(t){return Object(a.b)(r,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return[4,Xa(this.Yl._a,t)];case 1:return e.sent(),this.Gl&&(t&&!this.Gl.Er?this.Gl.start(this.bh):t||this.Gl.stop()),[2]}}))}))}))];case 4:return i.sent(),[2]}}))}))},e.prototype.Wl=function(t){var e=Co();if(!_o.Kn(e))throw new S(T.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");var n=Ri(t.yu.t,t.yu.persistenceKey);return new _o(e,t._s,n,t.clientId,t.Jl)},e}(as),us=function(){function t(){}return t.prototype.initialize=function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n=this;return Object(a.d)(this,(function(r){switch(r.label){case 0:return this.bh?[3,2]:(this.bh=t.bh,this.Vl=t.Vl,this.Sh=this.Xl(e),this.yl=this.Zl(e),this.gl=this.t_(e),this._a=this.e_(e,!t.synchronizeTabs),this.Vl.fa=function(t){return ja(n._a,t,1)},this.yl.Dh.n_=Ha.bind(null,this._a),[4,aa(this.yl,this._a.Ml)]);case 1:r.sent(),r.label=2;case 2:return[2]}}
2))}))},t.prototype.t_=function(t){return new la},t.prototype.Xl=function(t){var e,n=xo(t.yu.t),r=(e=t.yu,new Io(e));return function(t,e,n){return new Ro(t,e,n)}(t.credentials,r,n)},t.prototype.Zl=function(t){var e,n,r,i,o,a=this;return e=this.bh,n=this.Sh,r=t._s,i=function(t){return ja(a._a,t,0)},o=To.Kn()?new To:new Oo,new Lo(e,n,r,i,o)},t.prototype.e_=function(t,e){return function(t,e,n,r,i,o,a){var s=new ka(t,e,n,r,i,o);return a&&(s.kl=!0),s}(this.bh,this.yl,this.gl,this.Vl,t.Jl,t.pl,e)},t.prototype.terminate=function(){return function(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=y(t),f("RemoteStore","RemoteStore shutting down."),e.Nh.add(5),[4,Uo(e)];case 1:return n.sent(),e.Fh.ko(),e.Oh.set("Unknown"),[2]}}))}))}(this.yl)},t}();function cs(t,e){void 0===e&&(e=10240);var n=0;return{read:function(){return Object(a.b)(this,void 0,void 0,(function(){var r;return Object(a.d)(this,(function(i){return n<t.byteLength?(r={value:t.slice(n,n+e),done:!1},[2,(n+=e,r)]):[2,{done:!0}]}))}))},cancel:function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){return[2]}))}))},releaseLock:function(){}}}var ls=function(){function t(t){this.observer=t,this.muted=!1}return t.prototype.next=function(t){this.observer.next&&this.s_(this.observer.next,t)},t.prototype.error=function(t){this.observer.error?this.s_(this.observer.error,t):console.error("Uncaught Error in snapshot listener:",t)},t.prototype.i_=function(){this.muted=!0},t.prototype.s_=function(t,e){var n=this;this.muted||setTimeout((function(){n.muted||t(e)}),0)},t}(),fs=function(){function t(t,e){var n=this;this.r_=t,this.Qt=e,this.metadata=new $n,this.buffer=new Uint8Array,this.o_=new TextDecoder("utf-8"),this.c_().then((function(t){t&&t.sl()?n.metadata.resolve(t.payload.metadata):n.metadata.reject(new Error("The first element of the bundle is not a metadata, it is\n "+JSON.stringify(null==t?void 0:t.payload)))}),(function(t){return n.metadata.reject(t)}))}return t.prototype.close=function(){return this.r_.cancel()},t.prototype.getMetadata=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){return[2,this.metadata.promise]}))}))},t.prototype.Ql=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return[4,this.getMetadata()];case 1:return[2,(t.sent(),this.c_())]}}))}))},t.prototype.c_=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e,n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:return[4,this.a_()];case 1:return null===(t=i.sent())?[2,null]:(e=this.o_.decode(t),n=Number(e),isNaN(n)&&this.u_("length string ("+e+") is not valid number"),[4,this.h_(n)]);case 2:return r=i.sent(),[2,new ya(JSON.parse(r),t.length+n)]}}))}))},t.prototype.l_=function(){return this.buffer.findIndex((function(t){return t==="{".charCodeAt(0)}))},t.prototype.a_=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return this.l_()<0?[4,this.__()]:[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]:((t=this.l_())<0&&this.u_("Reached the end of bundle when a length string is expected."),e=this.buffer.slice(0,t),[2,(this.buffer=this.buffer.slice(t),e)])}}))}))},t.prototype.h_=function(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return this.buffer.length<t?[4,this.__()]:[3,3];case 1:n.sent()&&this.u_("Reached the end of bundle when more is expected."),n.label=2;case 2:return[3,0];case 3:return e=this.o_.decode(this.buffer.slice(0,t)),[2,(this.buffer=this.buffer.slice(t),e)]}}))}))},t.prototype.u_=function(t){throw this.r_.cancel(),new Error("Invalid bundle format: "+t)},t.prototype.__=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return[4,this.r_.read()];
2case 1:return(t=n.sent()).done||((e=new Uint8Array(this.buffer.length+t.value.length)).set(this.buffer),e.set(t.value,this.buffer.length),this.buffer=e),[2,t.done]}}))}))},t}(),hs=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0;n<t.length;++n)if(0===t[n].length)throw new S(T.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this.f_=new U(t)}return t.prototype.isEqual=function(t){return this.f_.isEqual(t.f_)},t}(),ds=function(t){this._methodName=t},ps=function(t){this.d_=t};function vs(t,e,n){if(!n)throw new S(T.INVALID_ARGUMENT,"Function "+t+"() cannot be called with an empty "+e+".")}function ms(t,e){if(void 0===e)return{merge:!1};if(void 0!==e.mergeFields&&void 0!==e.merge)throw new S(T.INVALID_ARGUMENT,"Invalid options passed to function "+t+'(): You cannot specify both "merge" and "mergeFields".');return e}function ys(t,e,n,r){if(!0===e&&!0===r)throw new S(T.INVALID_ARGUMENT,t+" and "+n+" cannot be used together.")}function gs(t){if(!V.wt(t))throw new S(T.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+t+" has "+t.length+".")}function bs(t){if(V.wt(t))throw new S(T.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+t+" has "+t.length+".")}function ws(t){if(void 0===t)return"undefined";if(null===t)return"null";if("string"==typeof t)return t.length>20&&(t=t.substring(0,20)+"..."),JSON.stringify(t);if("number"==typeof t||"boolean"==typeof t)return""+t;if("object"==typeof t){if(t instanceof Array)return"an array";var e=function(t){if(t.constructor){var e=/function\s+([^\s(]+)\s*\(/.exec(t.constructor.toString());if(e&&e.length>1)return e[1]}return null}(t);return e?"a custom "+e+" object":"an object"}return"function"==typeof t?"a function":v()}function _s(t,e){if("_delegate"in t&&(t=t.d_),!(t instanceof e)){if(e.name===t.constructor.name)throw new S(T.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var n=ws(t);throw new S(T.INVALID_ARGUMENT,"Expected type '"+e.name+"', but it was: "+n)}return t}function Es(t,e){if(e<=0)throw new S(T.INVALID_ARGUMENT,"Function "+t+"() requires a positive number, but it was: "+e+".")}var Os=function(){function t(t){var e;if(void 0===t.host){if(void 0!==t.ssl)throw new S(T.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=t.host,this.ssl=null===(e=t.ssl)||void 0===e||e;if(this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,void 0===t.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==t.cacheSizeBytes&&t.cacheSizeBytes<1048576)throw new S(T.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,ys("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling)}return t.prototype.isEqual=function(t){return this.host===t.host&&this.ssl===t.ssl&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.experimentalForceLongPolling===t.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===t.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties},t}(),Ts=new Map,Ss=function(){function t(t,e){this.w_="(lite)",this.E_=new Os({}),this.T_=!1,t instanceof u?(this.I_=t,this.m_=new N):(this.A_=t,this.I_=function(t){if(!Object.prototype.hasOwnProperty.apply(t.options,["projectId"]))throw new S(T.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new u(t.options.projectId)}(t),this.m_=new x(e))}return Object.defineProperty(t.prototype,"app",{get:function(){if(!this.A_)throw new S(T.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.A_}
2,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"R_",{get:function(){return this.T_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"P_",{get:function(){return void 0!==this.y_},enumerable:!1,configurable:!0}),t.prototype.g_=function(t){if(this.T_)throw new S(T.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.E_=new Os(t),void 0!==t.credentials&&(this.m_=function(t){if(!t)return new N;switch(t.type){case"gapi":var e=t.client;return m(!("object"!=typeof e||null===e||!e.auth||!e.auth.getAuthHeaderValueForFirstParty)),new j(e,t.sessionIndex||"0");case"provider":return t.client;default:throw new S(T.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(t.credentials))},t.prototype.V_=function(){return this.E_},t.prototype.p_=function(){return this.T_=!0,this.E_},t.prototype._delete=function(){return this.y_||(this.y_=this.b_()),this.y_},t.prototype.toJSON=function(){return{app:this.A_,t:this.I_,settings:this.E_}},t.prototype.b_=function(){return this,(t=Ts.get(this))&&(f("ComponentProvider","Removing Datastore"),Ts.delete(this),t.terminate()),Promise.resolve();var t},t}(),ks=function(){function t(t,e,n){this.v_=e,this.S_=n,this.type="document",this.firestore=t}return Object.defineProperty(t.prototype,"D_",{get:function(){return this.S_.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this.S_.path.tt()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this.S_.path.rt()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return new Cs(this.firestore,this.v_,this.S_.path.X())},enumerable:!1,configurable:!0}),t.prototype.withConverter=function(e){return new t(this.firestore,e,this.S_)},t}(),Is=function(){function t(t,e,n){this.v_=e,this.C_=n,this.type="query",this.firestore=t}return t.prototype.withConverter=function(e){return new t(this.firestore,e,this.C_)},t}(),Cs=function(t){function e(e,n,r){var i=this;return(i=t.call(this,e,n,zt(r))||this).firestore=e,i.D_=r,i.type="collection",i}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.C_.path.tt()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.C_.path.rt()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this.D_.X();return t.et()?null:new ks(this.firestore,null,new V(t))},enumerable:!1,configurable:!0}),e.prototype.withConverter=function(t){return new e(this.firestore,t,this.D_)},e}(Is);function Ns(t,e){for(var n,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];if(t instanceof ps&&(t=t.d_),vs("collection","path",e),t instanceof Ss)return bs(n=L.ot.apply(L,Object(a.g)([e],r))),new Cs(t,null,n);if(!(t instanceof ks||t instanceof Cs))throw new S(T.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");return bs(n=L.ot.apply(L,Object(a.g)([t.path],r)).child(L.ot(e))),new Cs(t.firestore,null,n)}function xs(t,e){for(var n,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];if(t instanceof ps&&(t=t.d_),1===arguments.length&&(e=b.u()),vs("doc","path",e),t instanceof Ss)return gs(n=L.ot.apply(L,Object(a.g)([e],r))),new ks(t,null,new V(n));if(!(t instanceof ks||t instanceof Cs))throw new S(T.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");return gs(n=t.D_.child(L.ot.apply(L,Object(a.g)([e],r)))),new ks(t.firestore,t instanceof Cs?t.v_:null,new V(n))}function Ps(t,e){return t instanceof ps&&(t=t.d_),e instanceof ps&&(e=e.d_),(t instanceof ks||t instanceof Cs)&&(e instanceof ks||e instanceof Cs)&&t.firestore===e.firestore&&t.path===e.path&&t.v_===e.v_}function js(t,e){return t instanceof ps&&(t=t.d_),e instanceof ps&&(e=e.d_),t instanceof Is&&e instanceof Is&&t.firestore===e.firestore&&Jt(t.C_,e.C_)&&t.v_===e.v_}var As=function(){function t(t,e){if(!isFinite(t)||t<-90||t>90)throw new S(T.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e<-180||e>180)throw new S(T.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this.x_=t,this.N_=e}return Object.defineProperty(t.prototype,"latitude",{get:function(){return this.x_}
2,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"longitude",{get:function(){return this.N_},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.x_===t.x_&&this.N_===t.N_},t.prototype.toJSON=function(){return{latitude:this.x_,longitude:this.N_}},t.prototype.U=function(t){return w(this.x_,t.x_)||w(this.N_,t.N_)},t}(),Ds=/^__.*__$/,Rs=function(){function t(t,e,n){this.data=t,this.Gt=e,this.fieldTransforms=n}return t.prototype.F_=function(t,e){return null!==this.Gt?new Pe(t,this.data,this.Gt,e,this.fieldTransforms):new xe(t,this.data,e,this.fieldTransforms)},t}(),Ms=function(){function t(t,e,n){this.data=t,this.Gt=e,this.fieldTransforms=n}return t.prototype.F_=function(t,e){return new Pe(t,this.data,this.Gt,e,this.fieldTransforms)},t}();function Ls(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw v()}}var Fs=function(){function t(t,e,n,r,i,o){this.settings=t,this.t=e,this.Qt=n,this.ignoreUndefinedProperties=r,void 0===i&&this.O_(),this.fieldTransforms=i||[],this.Gt=o||[]}return Object.defineProperty(t.prototype,"path",{get:function(){return this.settings.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"k_",{get:function(){return this.settings.k_},enumerable:!1,configurable:!0}),t.prototype.M_=function(e){return new t(Object.assign(Object.assign({},this.settings),e),this.t,this.Qt,this.ignoreUndefinedProperties,this.fieldTransforms,this.Gt)},t.prototype.L_=function(t){var e,n=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.M_({path:n,B_:!1});return r.q_(t),r},t.prototype.U_=function(t){var e,n=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.M_({path:n,B_:!1});return r.O_(),r},t.prototype.Q_=function(t){return this.M_({path:void 0,B_:!0})},t.prototype.K_=function(t){return iu(t,this.settings.methodName,this.settings.W_||!1,this.path,this.settings.j_)},t.prototype.contains=function(t){return void 0!==this.Gt.find((function(e){return t.nt(e)}))||void 0!==this.fieldTransforms.find((function(e){return t.nt(e.field)}))},t.prototype.O_=function(){if(this.path)for(var t=0;t<this.path.length;t++)this.q_(this.path.get(t))},t.prototype.q_=function(t){if(0===t.length)throw this.K_("Document fields must not be empty");if(Ls(this.k_)&&Ds.test(t))throw this.K_('Document fields cannot begin and end with "__"')},t}(),Us=function(){function t(t,e,n){this.t=t,this.ignoreUndefinedProperties=e,this.Qt=n||xo(t)}return t.prototype.G_=function(t,e,n,r){return void 0===r&&(r=!1),new Fs({k_:t,methodName:e,j_:n,path:U.ct(),B_:!1,W_:r},this.t,this.Qt,this.ignoreUndefinedProperties)},t}();function Vs(t){var e=t.p_(),n=xo(t.I_);return new Us(t.I_,!!e.ignoreUndefinedProperties,n)}function Bs(t,e,n,r,i,o){void 0===o&&(o={});var a=t.G_(o.merge||o.mergeFields?2:0,e,n,i);tu("Data must be an object, but it was:",a,r);var s,u,c=Js(r,a);if(o.merge)s=new W(a.Gt),u=a.fieldTransforms;else if(o.mergeFields){for(var l=[],f=0,h=o.mergeFields;f<h.length;f++){var d=eu(e,h[f],n);if(!a.contains(d))throw new S(T.INVALID_ARGUMENT,"Field '"+d+"' is specified in your field mask but missing from your input data.");ou(l,d)||l.push(d)}s=new W(l),u=a.fieldTransforms.filter((function(t){return s.Tt(t.field)}))}else s=null,u=a.fieldTransforms;return new Rs(new pt(c),s,u)}var qs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.z_=function(t){if(2!==t.k_)throw 1===t.k_?t.K_(this._methodName+"() can only appear at the top level of your update data"):t.K_(this._methodName+"() cannot be used with set() unless you pass {merge:true}");return t.Gt.push(t.path),null},e.prototype.isEqual=function(t){return t instanceof e},e}(ds);function zs(t,e,n){return new Fs({k_:3,j_:e.settings.j_,methodName:t._methodName,B_:n},e.t,e.Qt,e.ignoreUndefinedProperties)}var Ws=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.z_=function(t){return new we(t.path,new he)},e.prototype.isEqual=function(t){return t instanceof e},e}(ds),Hs=function(t){function e(e,n){var r=this;return(r=t.call(this,e)||this).H_=n,r}return Object(a.c)(e,t),e.prototype.z_=function(t){var e=zs(this,t,!0),n=this.H_.map((function(t){return $s(t,e)})),r=new de(n);return new we(t.path,r)},e.prototype.isEqual=function(t){return this===t},e}(ds),Gs=function(t){function e(e,n){var r=this;return(r=t.call(this,e)||this).H_=n,r}return Object(a.c)(e,t),e.prototype.z_=function(t){var e=zs(this,t,!0),n=this.H_.map((function(t){return $s(t,e)})),r=new ve(n);return new we(t.path,r)},e.prototype.isEqual=function(t){return this===t},e}(ds),Ys=function(t){function e(e,n){var r=this;return(r=t.call(this,e)||this).J_=n,r}return Object(a.c)(e,t),e.prototype.z_=function(t){var e=new ye(t.Qt,se(t.Qt,this.J_));return new we(t.path,e)},e.prototype.isEqual=function(t){return this===t},e}(ds);function Ks(t,e,n,r){var i=t.G_(1,e,n);tu("Data must be an object, but it was:",i,r);var o=[],a=new vt;q(r,(function(t,r){var s=ru(e,t,n);r instanceof ps&&(r=r.d_);var u=i.U_(s);if(r instanceof qs)o.push(s);else{var c=$s(r,u);null!=c&&(o.push(s),a.set(s,c))}}));var s=new W(o);return new Ms(a.Pt(),s,i.fieldTransforms)}function Qs(t,e,n,r,i,o){var a=t.G_(1,e,n),s=[eu(e,r,n)],u=[i];if(o.length%2!=0)throw new S(T.INVALID_ARGUMENT,"Function "+e+"() needs to be called with an even number of arguments that alternate between field names and values.");for(var c=0;c<o.length;c+=2)s.push(eu(e,o[c])),u.push(o[c+1]);for(var l=[],f=new vt,h=s.length-1;h>=0;--h)if(!ou(l,s[h])){var d=s[h],p=u[h];p instanceof ps&&(p=p.d_);var v=a.U_(d);if(p instanceof qs)l.push(d);else{var m=$s(p,v);null!=m&&(l.push(d),f.set(d,m))}}var y=new W(l);return new Ms(f.Pt(),y,a.fieldTransforms)}function Xs(t,e,n,r){return void 0===r&&(r=!1),$s(n,t.G_(r?4:3,e))}function $s(t,e){if(t instanceof ps&&(t=t.d_),Zs(t))return tu("Unsupported field value:",e,t),Js(t,e);if(t instanceof ds)return function(t,e){if(!Ls(e.k_))throw e.K_(t._methodName+"() can only be used with update(
2) and set()");if(!e.path)throw e.K_(t._methodName+"() is not currently supported inside arrays");var n=t.z_(e);n&&e.fieldTransforms.push(n)}(t,e),null;if(void 0===t&&e.ignoreUndefinedProperties)return null;if(e.path&&e.Gt.push(e.path),t instanceof Array){if(e.settings.B_&&4!==e.k_)throw e.K_("Nested arrays are not supported");return function(t,e){for(var n=[],r=0,i=0,o=t;i<o.length;i++){var a=$s(o[i],e.Q_(r));null==a&&(a={nullValue:"NULL_VALUE"}),n.push(a),r++}return{arrayValue:{values:n}}}(t,e)}return function(t,e){if(t instanceof ps&&(t=t.d_),null===t)return{nullValue:"NULL_VALUE"};if("number"==typeof t)return se(e.Qt,t);if("boolean"==typeof t)return{booleanValue:t};if("string"==typeof t)return{stringValue:t};if(t instanceof Date){var n=D.fromDate(t);return{timestampValue:_n(e.Qt,n)}}if(t instanceof D)return n=new D(t.seconds,1e3*Math.floor(t.nanoseconds/1e3)),{timestampValue:_n(e.Qt,n)};if(t instanceof As)return{geoPointValue:{latitude:t.latitude,longitude:t.longitude}};if(t instanceof k)return{bytesValue:En(e.Qt,t.I)};if(t instanceof ks){n=e.t;var r=t.firestore.I_;if(!r.isEqual(n))throw e.K_("Document reference is for database "+r.projectId+"/"+r.database+" but should be for database "+n.projectId+"/"+n.database);return{referenceValue:Sn(t.firestore.I_||e.t,t.S_.path)}}throw e.K_("Unsupported field value: "+ws(t))}(t,e)}function Js(t,e){var n={};return z(t)?e.path&&e.path.length>0&&e.Gt.push(e.path):q(t,(function(t,r){var i=$s(r,e.L_(t));null!=i&&(n[t]=i)})),{mapValue:{fields:n}}}function Zs(t){return!("object"!=typeof t||null===t||t instanceof Array||t instanceof Date||t instanceof D||t instanceof As||t instanceof k||t instanceof ks||t instanceof ds)}function tu(t,e,n){if(!Zs(n)||!function(t){return"object"==typeof t&&null!==t&&(Object.getPrototypeOf(t)===Object.prototype||null===Object.getPrototypeOf(t))}(n)){var r=ws(n);throw"an object"===r?e.K_(t+" a custom object"):e.K_(t+" "+r)}}function eu(t,e,n){if(e instanceof ps&&(e=e.d_),e instanceof hs)return e.f_;if("string"==typeof e)return ru(t,e);throw iu("Field path arguments must be of type string or FieldPath.",t,!1,void 0,n)}var nu=new RegExp("[~\\*/\\[\\]]");function ru(t,e,n){if(e.search(nu)>=0)throw iu("Invalid field path ("+e+"). Paths must not contain '~', '*', '/', '[', or ']'",t,!1,void 0,n);try{return(new(hs.bind.apply(hs,Object(a.g)([void 0],e.split("."))))).f_}catch(r){throw iu("Invalid field path ("+e+"). Paths must not be empty, begin with '.', end with '.', or contain '..'",t,!1,void 0,n)}}function iu(t,e,n,r,i){var o=r&&!r.et(),a=void 0!==i,s="Function "+e+"() called with invalid data";n&&(s+=" (via `toFirestore()`)");var u="";return(o||a)&&(u+=" (found",o&&(u+=" in field "+r),a&&(u+=" in document "+i),u+=")"),new S(T.INVALID_ARGUMENT,(s+=". ")+t+u)}function ou(t,e){return t.some((function(t){return t.isEqual(e)}))}var au=function(){function t(t){this.Sh=t,this.Y_=new Map,this.mutations=[],this.X_=!1,this.Z_=null,this.tf=new Set}return t.prototype.ef=function(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n=this;return Object(a.d)(this,(function(r){switch(r.label){case 0:if(this.nf(),this.mutations.length>0)throw new S(T.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");return[4,function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u;return Object(a.d)(this,(function(a){switch(a.label){case 0:return n=y(t),r=Pn(n.Qt)+"/documents",i={documents:e.map((function(t){return In(n.Qt,t)}))},[4,n.Du("BatchGetDocuments",r,i)];case 1:return o=a.sent(),s=new Map,o.forEach((function(t){var e=function(t,e){return"found"in e?function(t,e){m(!!e.found),e.found.name,e.found.updateTime;var n=Cn(t,e.found.name),r=Tn(e.found.updateTime),i=new pt({mapValue:{fields:e.found.fields}});return new gt(n,r,i,{})}(t,e):"missing"in e?function(t,e){m(!!e.missing),m(!!e.readTime);var n=Cn(t,e.missing),r=Tn(e.readTime);return new bt(n,r)}(t,e):v()}(n.Qt,t);s.set(e.key.toString(),e)})),u=[],[2,(e.forEach((function(t){var e=s.get(t.toString());m(!!e),u.push(e)})),u)]}}))}))}(this.Sh,t)];
2case 1:return[2,((e=r.sent()).forEach((function(t){t instanceof bt||t instanceof gt?n.sf(t):v()})),e)]}}))}))},t.prototype.set=function(t,e){this.write(e.F_(t,this.jt(t))),this.tf.add(t.toString())},t.prototype.update=function(t,e){try{this.write(e.F_(t,this.rf(t)))}catch(t){this.Z_=t}this.tf.add(t.toString())},t.prototype.delete=function(t){this.write(new Fe(t,this.jt(t))),this.tf.add(t.toString())},t.prototype.commit=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e=this;return Object(a.d)(this,(function(n){switch(n.label){case 0:if(this.nf(),this.Z_)throw this.Z_;return t=this.Y_,this.mutations.forEach((function(e){t.delete(e.key.toString())})),t.forEach((function(t,n){var r=V._t(n);e.mutations.push(new Ue(r,e.jt(r)))})),[4,function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return n=y(t),r=Pn(n.Qt)+"/documents",i={writes:e.map((function(t){return Rn(n.Qt,t)}))},[4,n.pu("Commit",r,i)];case 1:return o.sent(),[2]}}))}))}(this.Sh,this.mutations)];case 1:return n.sent(),this.X_=!0,[2]}}))}))},t.prototype.sf=function(t){var e;if(t instanceof gt)e=t.version;else{if(!(t instanceof bt))throw v();e=R.min()}var n=this.Y_.get(t.key.toString());if(n){if(!e.isEqual(n))throw new S(T.ABORTED,"Document version changed between two reads.")}else this.Y_.set(t.key.toString(),e)},t.prototype.jt=function(t){var e=this.Y_.get(t.toString());return!this.tf.has(t.toString())&&e?Ee.updateTime(e):Ee.Kt()},t.prototype.rf=function(t){var e=this.Y_.get(t.toString());if(!this.tf.has(t.toString())&&e){if(e.isEqual(R.min()))throw new S(T.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return Ee.updateTime(e)}return Ee.exists(!0)},t.prototype.write=function(t){this.nf(),this.mutations.push(t)},t.prototype.nf=function(){},t}(),su=function(){function t(t,e,n,r){this._s=t,this.Sh=e,this.updateFunction=n,this.Es=r,this.cf=5,this.Gu=new Po(this._s,"transaction_retry")}return t.prototype.run=function(){this.af()},t.prototype.af=function(){var t=this;this.Gu.Lu((function(){return Object(a.b)(t,void 0,void 0,(function(){var t,e,n=this;return Object(a.d)(this,(function(r){return t=new au(this.Sh),(e=this.uf(t))&&e.then((function(e){n._s.Ps((function(){return t.commit().then((function(){n.Es.resolve(e)})).catch((function(t){n.hf(t)}))}))})).catch((function(t){n.hf(t)})),[2]}))}))}))},t.prototype.uf=function(t){try{var e=this.updateFunction(t);return!J(e)&&e.catch&&e.then?e:(this.Es.reject(Error("Transaction callback must return a Promise")),null)}catch(t){return this.Es.reject(t),null}},t.prototype.hf=function(t){var e=this;this.cf>0&&this.lf(t)?(this.cf-=1,this._s.Ps((function(){return e.af(),Promise.resolve()}))):this.Es.reject(t)},t.prototype.lf=function(t){if("FirebaseError"===t.name){var e=t.code;return"aborted"===e||"failed-precondition"===e||!Be(e)}return!1},t}(),uu=function(){function t(t,e,n){var r=this;this.credentials=t,this._s=e,this.yu=n,this.user=I.UNAUTHENTICATED,this.clientId=b.u(),this._f=function(){},this.C=new $n,this.credentials.v((function(t){f("FirestoreClient","Received user=",t.uid),r.user=t,r._f(t),r.C.resolve()}))}return t.prototype.getConfiguration=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return[4,this.C.promise];case 1:return[2,(t.sent(),{_s:this._s,yu:this.yu,clientId:this.clientId,credentials:this.credentials,Jl:this.user,pl:100})]}}))}))},t.prototype.ff=function(t){var e=this;this._f=t,this.C.promise.then((function(){return e._f(e.user)}))},t.prototype.df=function(){if(this._s.wf)throw new S(T.FAILED_PRECONDITION,"The client has already been terminated.")},t.prototype.terminate=function(){var t=this;this._s.Ef();var e=new $n;return this._s.Tf((function(){return Object(a.b)(t,void 0,void 0,(function(){var t,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,5,,6]),this.If?[4,this.If.terminate()]:[3,2];case 1:r.sent(),r.label=2;case 2:return this.mf?[4,this.mf.terminate()]:[3,4];case 3:r.sent(),r.label=4;case 4:return this.credentials.S(),e.resolve(),[3,6];case 5:return t=r.sent(),n=cr(t,"Failed to shutdown persistence"),e.reject(n),[3,6];case 6:return[2]}}
2))}))})),e.promise},t}();function cu(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i=this;return Object(a.d)(this,(function(o){switch(o.label){case 0:return t._s.Af(),f("FirestoreClient","Initializing OfflineComponentProvider"),[4,t.getConfiguration()];case 1:return n=o.sent(),[4,e.initialize(n)];case 2:return o.sent(),r=n.Jl,t.ff((function(n){r.isEqual(n)||(r=n,t._s.po((function(){return Object(a.b)(i,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return[4,qi(e.bh,n)];case 1:return t.sent(),[2]}}))}))})))})),e.persistence.Po((function(){return t.terminate()})),t.mf=e,[2]}}))}))}function lu(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:return t._s.Af(),[4,fu(t)];case 1:return n=i.sent(),f("FirestoreClient","Initializing OnlineComponentProvider"),[4,t.getConfiguration()];case 2:return r=i.sent(),[4,e.initialize(n,r)];case 3:return i.sent(),t.ff((function(n){return t._s.po((function(){return function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:return(n=y(t))._s.Af(),f("RemoteStore","RemoteStore received new credentials"),r=Go(n),n.Nh.add(3),[4,Uo(n)];case 1:return i.sent(),r&&n.Oh.set("Unknown"),[4,n.Dh.n_(e)];case 2:return i.sent(),n.Nh.delete(3),[4,Fo(n)];case 3:return i.sent(),[2]}}))}))}(e.yl,n)}))})),t.If=e,[2]}}))}))}function fu(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return t.mf?[3,2]:(f("FirestoreClient","Using default OfflineComponentProvider"),[4,cu(t,new os)]);case 1:e.sent(),e.label=2;case 2:return[2,t.mf]}}))}))}function hu(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return t.If?[3,2]:(f("FirestoreClient","Using default OnlineComponentProvider"),[4,lu(t,new us)]);case 1:e.sent(),e.label=2;case 2:return[2,t.If]}}))}))}function du(t){return fu(t).then((function(t){return t.persistence}))}function pu(t){return fu(t).then((function(t){return t.bh}))}function vu(t){return hu(t).then((function(t){return t.yl}))}function mu(t){return hu(t).then((function(t){return t._a}))}function yu(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return[4,hu(t)];case 1:return e=r.sent(),[2,((n=e.gl).jh=Ia.bind(null,e._a),n.Hh=Na.bind(null,e._a),n)]}}))}))}function gu(t,e,n){var r=this;void 0===n&&(n={});var i=new $n;return t._s.Ps((function(){return Object(a.b)(r,void 0,void 0,(function(){var r;return Object(a.d)(this,(function(o){switch(o.label){case 0:return r=function(t,e,n,r,i){var o=new ls({next:function(o){e.Ps((function(){return ha(t,a)}));var s=o.docs.has(n);!s&&o.fromCache?i.reject(new S(T.UNAVAILABLE,"Failed to get document because the client is offline.")):s&&o.fromCache&&r&&"server"===r.source?i.reject(new S(T.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(t){return i.reject(t)}}),a=new ma(zt(n.path),o,{includeMetadataChanges:!0,nl:!0});return fa(t,a)},[4,yu(t)];case 1:return[2,r.apply(void 0,[o.sent(),t._s,e,n,i])]}}))}))})),i.promise}function bu(t,e,n){var r=this;void 0===n&&(n={});var i=new $n;return t._s.Ps((function(){return Object(a.b)(r,void 0,void 0,(function(){var r;return Object(a.d)(this,(function(o){switch(o.label){case 0:return r=function(t,e,n,r,i){var o=new ls({next:function(n){e.Ps((function(){return ha(t,a)})),n.fromCache&&"server"===r.source?i.reject(new S(T.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(t){return i.reject(t)}}),a=new ma(n,o,{includeMetadataChanges:!0,nl:!0});return fa(t,a)},[4,yu(t)];case 1:return[2,r.apply(void 0,[o.sent(),t._s,e,n,i])]}}))}))})),i.promise}var wu=function(){function t(){var t=this;this.Rf=Promise.resolve(),this.Pf=[],this.yf=!1,this.gf=[],this.Vf=null,this.pf=!1,this.bf=[],this.Gu=new Po(this,"async_queue_retry"),this.vf=function(){var e=No();e&&f("AsyncQueue","Visibility state changed to "+e.visibilityState),t.Gu.qu()};var e=No();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.vf)}return Object.defineProperty(t.prototype,"wf",{get:function(){return this.yf}
2,enumerable:!1,configurable:!0}),t.prototype.Ps=function(t){this.enqueue(t)},t.prototype.Tf=function(t){this.Sf(),this.Df(t)},t.prototype.Ef=function(){if(!this.yf){this.yf=!0;var t=No();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.vf)}},t.prototype.enqueue=function(t){return this.Sf(),this.yf?new Promise((function(t){})):this.Df(t)},t.prototype.po=function(t){var e=this;this.Ps((function(){return e.Pf.push(t),e.Cf()}))},t.prototype.Cf=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e=this;return Object(a.d)(this,(function(n){switch(n.label){case 0:if(0===this.Pf.length)return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.Pf[0]()];case 2:return n.sent(),this.Pf.shift(),this.Gu.reset(),[3,4];case 3:if(!rr(t=n.sent()))throw t;return f("AsyncQueue","Operation failed with retryable error: "+t),[3,4];case 4:this.Pf.length>0&&this.Gu.Lu((function(){return e.Cf()})),n.label=5;case 5:return[2]}}))}))},t.prototype.Df=function(t){var e=this,n=this.Rf.then((function(){return e.pf=!0,t().catch((function(t){throw e.Vf=t,e.pf=!1,h("INTERNAL UNHANDLED ERROR: ",function(t){var e=t.message||"";return t.stack&&(e=t.stack.includes(t.message)?t.stack:t.message+"\n"+t.stack),e}(t)),t})).then((function(t){return e.pf=!1,t}))}));return this.Rf=n,n},t.prototype.Tr=function(t,e,n){var r=this;this.Sf(),this.bf.indexOf(t)>-1&&(e=0);var i=ur.Ts(this,t,e,n,(function(t){return r.xf(t)}));return this.gf.push(i),i},t.prototype.Sf=function(){this.Vf&&v()},t.prototype.Af=function(){},t.prototype.Nf=function(){return Object(a.b)(this,void 0,void 0,(function(){var t;return Object(a.d)(this,(function(e){switch(e.label){case 0:return[4,t=this.Rf];case 1:e.sent(),e.label=2;case 2:if(t!==this.Rf)return[3,0];e.label=3;case 3:return[2]}}
2))}))},t.prototype.$f=function(t){for(var e=0,n=this.gf;e<n.length;e++)if(n[e].fs===t)return!0;return!1},t.prototype.Ff=function(t){var e=this;return this.Nf().then((function(){e.gf.sort((function(t,e){return t.ds-e.ds}));for(var n=0,r=e.gf;n<r.length;n++){var i=r[n];if(i.Rs(),"all"!==t&&i.fs===t)break}return e.Nf()}))},t.prototype.Of=function(t){this.bf.push(t)},t.prototype.xf=function(t){var e=this.gf.indexOf(t);this.gf.splice(e,1)},t}();function _u(t){return function(t,e){if("object"!=typeof t||null===t)return!1;for(var n=t,r=0,i=["next","error","complete"];r<i.length;r++){var o=i[r];if(o in n&&"function"==typeof n[o])return!0}return!1}(t)}var Eu=function(){function t(){this.kf={},this.Mf=new $n,this.Lf={taskState:"Running",totalBytes:0,totalDocuments:0,bytesLoaded:0,documentsLoaded:0}}return t.prototype.onProgress=function(t,e,n){this.kf={next:t,error:e,complete:n}},t.prototype.catch=function(t){return this.Mf.promise.catch(t)},t.prototype.then=function(t,e){return this.Mf.promise.then(t,e)},t.prototype.ql=function(t){this.Ul(t),this.kf.complete&&this.kf.complete(),this.Mf.resolve(t)},t.prototype.Kl=function(t){this.Lf.taskState="Error",this.kf.next&&this.kf.next(this.Lf),this.kf.error&&this.kf.error(t),this.Mf.reject(t)},t.prototype.Ul=function(t){this.Lf=t,this.kf.next&&this.kf.next(t)},t}(),Ou=-1,Tu=function(t){function e(e,n){var r=this;return(r=t.call(this,e,n)||this).Bf=new wu,r.w_="name"in e?e.name:"[DEFAULT]",r}return Object(a.c)(e,t),e.prototype.b_=function(){return this.qf||ku(this),this.qf.terminate()},e}(Ss);function Su(t){return t.qf||ku(t),t.qf.df(),t.qf}function ku(t){var e=t.p_(),n=function(t,e,n){return new s(t,e,n.host,n.ssl,n.experimentalForceLongPolling,n.experimentalAutoDetectLongPolling)}(t.I_,t.w_,e);t.qf=new uu(t.m_,t.Bf,n)}function Iu(t,e,n){var r=this,i=new $n;return t._s.enqueue((function(){return Object(a.b)(r,void 0,void 0,(function(){var r;return Object(a.d)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,cu(t,n)];case 1:return o.sent(),[4,lu(t,e)];case 2:return o.sent(),i.resolve(),[3,4];case 3:if(!function(t){return"FirebaseError"===t.name?t.code===T.FAILED_PRECONDITION||t.code===T.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&t instanceof DOMException)||22===t.code||20===t.code||11===t.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 Cu(t){if(t.R_||t.P_)throw new S(T.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 Nu=function(){function t(){}return t.prototype.Uf=function(t,e){switch(void 0===e&&(e="none"),et(t)){case 0:return null;case 1:return t.booleanValue;case 2:return Y(t.integerValue||t.doubleValue);case 3:return this.Qf(t.timestampValue);case 4:return this.Kf(t,e);case 5:return t.stringValue;case 6:return this.Wf(K(t.bytesValue));case 7:return this.jf(t.referenceValue);case 8:return this.Gf(t.geoPointValue);case 9:return this.zf(t.arrayValue,e);case 10:return this.Hf(t.mapValue,e);default:throw v()}},t.prototype.Hf=function(t,e){var n=this,r={};return q(t.fields||{},(function(t,i){r[t]=n.Uf(i,e)})),r},t.prototype.Gf=function(t){return new As(Y(t.latitude),Y(t.longitude))},t.prototype.zf=function(t,e){var n=this;return(t.values||[]).map((function(t){return n.Uf(t,e)}))},t.prototype.Kf=function(t,e){switch(e){case"previous":var n=X(t);return null==n?null:this.Uf(n,e);case"estimate":return this.Qf($(t));default:return null}},t.prototype.Qf=function(t){var e=G(t);return new D(e.seconds,e.nanos)},t.prototype.Jf=function(t,e){var n=L.ot(t);m(Xn(n));var r=new u(n.get(1),n.get(3)),i=new V(n.Y(5));return r.isEqual(e)||h("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 ("+e.projectId+"/"+e.database+") instead."),i},t}(),xu=function(){function t(t,e,n,r,i){this.Yf=t,this.Xf=e,this.S_=n,this.Zf=r,this.v_=i}return Object.defineProperty(t.prototype,"id",{get:function(){return this.S_.path.tt()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ref",{get:function(){return new ks(this.Yf,this.v_,this.S_)},enumerable:!1,configurable:!0}),t.prototype.exists=function(){return null!==this.Zf},t.prototype.data=function(){if(this.Zf){if(this.v_){var t=new Pu(this.Yf,this.Xf,this.S_,this.Zf,null);return this.v_.fromFirestore(t)}return this.Xf.Uf(this.Zf.bt())}},t.prototype.get=function(t){if(this.Zf){var e=this.Zf.data().field(ju("DocumentSnapshot.get",t));if(null!==e)return this.Xf.Uf(e)}},t}(),Pu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.data=function(){return t.prototype.data.call(this)},e}(xu);function ju(t,e){return"string"==typeof e?ru(t,e):e instanceof ps?e.d_.f_:e.f_}function Au(t){if(Ht(t)&&0===t.xt.length)throw new S(T.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var Du=function(){};function Ru(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var o=i[r];t=o.td(t)}return t}var Mu=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).ed=e,i.nd=n,i.sd=r,i.type="where",i}return Object(a.c)(e,t),e.prototype.td=function(t){var e=Vs(t.firestore),n=function(t,e,n,r,i,o,a){var s;if(i.ut()){if("array-contains"===o||"array-contains-any"===o)throw new S(T.INVALID_ARGUMENT,"Invalid Query. You can't perform '"+o+"' queries on FieldPath.documentId().");if("in"===o||"not-in"===o){zu(a,o);for(var u=[],c=0,l=a;c<l.length;c++){var f=l[c];u.push(qu(r,t,f))}s={arrayValue:{values:u}}}else s=qu(r,t,a)}else"in"!==o&&"not-in"!==o&&"array-contains-any"!==o||zu(a,o),s=Xs(n,"where",a,"in"===o||"not-in"===o);var h=kt.create(i,o,s);return function(t,e){if(e.Ct()){var n=Yt(t);if(null!==n&&!n.isEqual(e.field))throw new S(T.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 '"+e.field.toString()+"'");var r=Gt(t);null!==r&&Wu(t,e.field,r)}var i=function(t,e){for(var n=0,r=t.filters;n<r.length;n++){var i=r[n];if(e.indexOf(i.op)>=0)return i.op}return null}(t,function(t){switch(t){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[]}}(e.op));if(null!==i)throw i===e.op?new S(T.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '"+e.op.toString()+"' filter."):new S(T.INVALID_ARGUMENT,"Invalid query. You cannot use '"+e.op.toString()+"' filters with '"+i.toString()+"' filters.")}(t,h),h}(t.C_,0,e,t.firestore.I_,this.ed,this.nd,this.sd);return new Is(t.firestore,t.v_,function(t,e){var n=t.filters.concat([e]);return new Bt(t.path,t.collectionGroup,t.xt.slice(),n,t.limit,t.limitType,t.startAt,t.endAt)}(t.C_,n))},e}(Du),Lu=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).ed=e,r.rd=n,r.type="orderBy",r}return Object(a.c)(e,t),e.prototype.td=function(t){var e=function(t,e,n){if(null!==t.startAt)throw new S(T.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==t.endAt)throw new S(T.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");var r=new Lt(e,n);return function(t,e){if(null===Gt(t)){var n=Yt(t);null!==n&&Wu(t,n,e.field)}}(t,r),r}(t.C_,this.ed,this.rd);return new Is(t.firestore,t.v_,function(t,e){var n=t.xt.concat([e]);return new Bt(t.path,t.collectionGroup,n,t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt)}(t.C_,e))},e}(Du),Fu=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).type=e,i.od=n,i.ad=r,i}return Object(a.c)(e,t),e.prototype.td=function(t){return new Is(t.firestore,t.v_,$t(t.C_,this.od,this.ad))},e}(Du),Uu=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).type=e,i.ud=n,i.hd=r,i}return Object(a.c)(e,t),e.prototype.td=function(t){var e=Bu(t,this.type,this.ud,this.hd);return new Is(t.firestore,t.v_,function(t,e){return new Bt(t.path,t.collectionGroup,t.xt.slice(),t.filters.slice(),t.limit,t.limitType,e,t.endAt)}(t.C_,e))},e}(Du),Vu=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).type=e,i.ud=n,i.hd=r,i}return Object(a.c)(e,t),e.prototype.td=function(t){var e=Bu(t,this.type,this.ud,this.hd);return new Is(t.firestore,t.v_,function(t,e){return new Bt(t.path,t.collectionGroup,t.xt.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,e)}(t.C_,e))},e}(Du);function Bu(t,e,n,r){if(n[0]instanceof ps&&(n[0]=n[0].d_),n[0]instanceof xu)return function(t,e,n,r,i){if(!r)throw new S(T.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+n+"().");for(var o=[],a=0,s=Qt(t);a<s.length;a++){var u=s[a];if(u.field.ut())o.push(ut(e,r.key));else{var c=r.field(u.field);if(Q(c))throw new S(T.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+u.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===c){var l=u.field.rt();throw new S(T.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '"+l+"' (used as the orderBy) does not exist.")}o.push(c)}}return new Rt(o,i)}(t.C_,t.firestore.I_,e,n[0].Zf,r);var i=Vs(t.firestore);return function(t,e,n,r,i,o){var a=t.xt;if(i.length>a.length)throw new S(T.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=[],u=0;u<i.length;u++){var c=i[u];if(a[u].field.ut()){if("string"!=typeof c)throw new S(T.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in "+r+"(), but got a "+typeof c);if(!Kt(t)&&-1!==c.indexOf("/"))throw new S(T.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 '"+c+"' contains a slash.");var l=t.path.child(L.ot(c));if(!V.wt(l))throw new S(T.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 '"+l+"' is not because it c
2ontains an odd number of segments.");var f=new V(l);s.push(ut(e,f))}else{var h=Xs(n,r,c);s.push(h)}}return new Rt(s,o)}(t.C_,t.firestore.I_,i,e,n,r)}function qu(t,e,n){if(n instanceof ps&&(n=n.d_),"string"==typeof n){if(""===n)throw new S(T.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid document ID, but it was an empty string.");if(!Kt(e)&&-1!==n.indexOf("/"))throw new S(T.INVALID_ARGUMENT,"Invalid query. When querying a collection by FieldPath.documentId(), you must provide a plain document ID, but '"+n+"' contains a '/' character.");var r=e.path.child(L.ot(n));if(!V.wt(r))throw new S(T.INVALID_ARGUMENT,"Invalid query. When querying a collection group by FieldPath.documentId(), the value provided must result in a valid document path, but '"+r+"' is not because it has an odd number of segments ("+r.length+").");return ut(t,new V(r))}if(n instanceof ks)return ut(t,n.S_);throw new S(T.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid string or a DocumentReference, but it was: "+ws(n)+".")}function zu(t,e){if(!Array.isArray(t)||0===t.length)throw new S(T.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '"+e.toString()+"' filters.");if(t.length>10)throw new S(T.INVALID_ARGUMENT,"Invalid Query. '"+e.toString()+"' filters support a maximum of 10 elements in the value array.")}function Wu(t,e,n){if(!n.isEqual(e))throw new S(T.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '"+e.toString()+"' and so you must also use '"+e.toString()+"' as your first argument to orderBy(), but your first orderBy() is on field '"+n.toString()+"' instead.")}function Hu(t,e,n){return t?n&&(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e}var Gu=function(t){function e(e){var n=this;return(n=t.call(this)||this).firestore=e,n}return Object(a.c)(e,t),e.prototype.Wf=function(t){return new k(t)},e.prototype.jf=function(t){var e=this.Jf(t,this.firestore.I_);return new ks(this.firestore,null,e)},e}(Nu),Yu=function(){function t(t,e){this.hasPendingWrites=t,this.fromCache=e}return t.prototype.isEqual=function(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache},t}(),Ku=function(t){function e(e,n,r,i,o,a){var s=this;return(s=t.call(this,e,n,r,i,a)||this).Yf=e,s.ld=e,s.metadata=o,s}return Object(a.c)(e,t),e.prototype.exists=function(){return t.prototype.exists.call(this)},e.prototype.data=function(t){if(void 0===t&&(t={}),this.Zf){if(this.v_){var e=new Qu(this.Yf,this.Xf,this.S_,this.Zf,this.metadata,null);return this.v_.fromFirestore(e,t)}return this.Xf.Uf(this.Zf.bt(),t.serverTimestamps)}},e.prototype.get=function(t,e){if(void 0===e&&(e={}),this.Zf){var n=this.Zf.data().field(ju("DocumentSnapshot.get",t));if(null!==n)return this.Xf.Uf(n,e.serverTimestamps)}},e}(xu),Qu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.data=function(e){return void 0===e&&(e={}),t.prototype.data.call(this,e)},e}(Ku),Xu=function(){function t(t,e,n,r){this.Yf=t,this.Xf=e,this._d=r,this.metadata=new Yu(r.hasPendingWrites,r.fromCache),this.query=n}return Object.defineProperty(t.prototype,"docs",{get:function(){var t=[];return this.forEach((function(e){return t.push(e)})),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this._d.docs.size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this.size},enumerable:!1,configurable:!0}),t.prototype.forEach=function(t,e){var n=this;this._d.docs.forEach((function(r){t.call(e,new Qu(n.Yf,n.Xf,r.key,r,new Yu(n._d.De.has(r.key),n._d.fromCache),n.query.v_))}))},t.prototype.docChanges=function(t){void 0===t&&(t={});var e=!!t.includeMetadataChanges;if(e&&this._d.xe)throw new S(T.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this.fd&&this.dd===e||(this.fd=function(t,e){if(t._d.Se.et()){var n=0;return t._d.docChanges.map((function(e){var r=new Qu(t.Yf,t.Xf,e.doc.key,e.doc,new Yu(t._d.De.has(e.doc.key),t._d.fromCache),t.query.v_);return e.doc,{type:"added",doc:r,oldIndex:-1,newIndex:n++}}))}var r=t._d.Se;return t._d.docChanges.filter((function(t){return e||3!==t.type})).map((function(e){var n=new Qu(t.Yf,t.Xf,e.doc.key,e.doc,new Yu(t._d.De.has(e.doc.key),t._d.fromCache),t.query.v_),i=-1,o=-1;return 0!==e.type&&(i=r.indexOf(e.doc.key),r=r.delete(e.doc.key)),1!==e.type&&(o=(r=r.add(e.doc)).indexOf(e.doc.key)),{type:$u(e.type),doc:n,oldIndex:i,newIndex:o}}))}(this,e),this.dd=e),this.fd},t}();function $u(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return v()}}function Ju(t,e){return t instanceof Ku&&e instanceof Ku?t.Yf===e.Yf&&t.S_.isEqual(e.S_)&&(null===t.Zf?null===e.Zf:t.Zf.isEqual(e.Zf))&&t.v_===e.v_:t instanceof Xu&&e instanceof Xu&&t.Yf===e.Yf&&js(t.query,e.query)&&t.metadata.isEqual(e.metadata)&&t._d.isEqual(e._d)}var Zu=function(t){function e(e){var n=this;return(n=t.call(this)||this).firestore=e,n}return Object(a.c)(e,t),e.prototype.Wf=function(t){return new k(t)},e.prototype.jf=function(t){var e=this.Jf(t,this.firestore.I_);
2return new ks(this.firestore,null,e)},e}(Nu);function tc(t,e,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];t=_s(t,ks);var o=_s(t.firestore,Tu),a=Vs(o);return e instanceof ps&&(e=e.d_),nc(o,[("string"==typeof e||e instanceof hs?Qs(a,"updateDoc",t.S_,e,n,r):Ks(a,"updateDoc",t.S_,e)).F_(t.S_,Ee.exists(!0))])}function ec(t){for(var e,n,r,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];t instanceof ps&&(t=t.d_);var s={includeMetadataChanges:!1},u=0;"object"!=typeof i[u]||_u(i[u])||(s=i[u],u++);var c,l,f,h={includeMetadataChanges:s.includeMetadataChanges};if(_u(i[u])){var d=i[u];i[u]=null===(e=d.next)||void 0===e?void 0:e.bind(d),i[u+1]=null===(n=d.error)||void 0===n?void 0:n.bind(d),i[u+2]=null===(r=d.complete)||void 0===r?void 0:r.bind(d)}if(t instanceof ks)l=_s(t.firestore,Tu),f=zt(t.S_.path),c={next:function(e){i[u]&&i[u](rc(l,t,e))},error:i[u+1],complete:i[u+2]};else{var p=_s(t,Is);l=_s(p.firestore,Tu),f=p.C_;var v=new Zu(l);c={next:function(t){i[u]&&i[u](new Xu(l,v,p,t))},error:i[u+1],complete:i[u+2]},Au(t.C_)}return function(t,e,n,r){var i=this,o=new ls(r),s=new ma(e,o,n);return t._s.Ps((function(){return Object(a.b)(i,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=fa,[4,yu(t)];case 1:return[2,e.apply(void 0,[n.sent(),s])]}}))}))})),function(){o.i_(),t._s.Ps((function(){return Object(a.b)(i,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=ha,[4,yu(t)];case 1:return[2,e.apply(void 0,[n.sent(),s])]}}))}))}))}}(Su(l),f,h,c)}function nc(t,e){return function(t,e){var n=this,r=new $n;return t._s.Ps((function(){return Object(a.b)(n,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(i){switch(i.label){case 0:return n=xa,[4,mu(t)];case 1:return[2,n.apply(void 0,[i.sent(),e,r])]}}))}))})),r.promise}(Su(t),e)}function rc(t,e,n){var r=n.docs.get(e.S_),i=new Zu(t);return new Ku(t,i,e.S_,r,new Yu(n.hasPendingWrites,n.fromCache),e.v_)}var ic=function(){function t(t,e){this.Yf=t,this.wd=e,this.Ed=[],this.Td=!1,this.Id=Vs(t)}return t.prototype.set=function(t,e,n){this.md();var r=oc(t,this.Yf),i=Hu(r.v_,e,n),o=Bs(this.Id,"WriteBatch.set",r.S_,i,null!==r.v_,n);return this.Ed.push(o.F_(r.S_,Ee.Kt())),this},t.prototype.update=function(t,e,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];this.md();var o,a=oc(t,this.Yf);return e instanceof ps&&(e=e.d_),o="string"==typeof e||e instanceof hs?Qs(this.Id,"WriteBatch.update",a.S_,e,n,r):Ks(this.Id,"WriteBatch.update",a.S_,e),this.Ed.push(o.F_(a.S_,Ee.exists(!0))),this},t.prototype.delete=function(t){this.md();var e=oc(t,this.Yf);return this.Ed=this.Ed.concat(new Fe(e.S_,Ee.Kt())),this},t.prototype.commit=function(){return this.md(),this.Td=!0,this.Ed.length>0?this.wd(this.Ed):Promise.resolve()},t.prototype.md=function(){if(this.Td)throw new S(T.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},t}();function oc(t,e){if(t instanceof ps&&(t=t.d_),t.firestore!==e)throw new S(T.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return t}var ac=function(t){function e(e,n){var r=this;return(r=t.call(this,e,n)||this).Yf=e,r}return Object(a.c)(e,t),e.prototype.get=function(e){var n=this,r=oc(e,this.Yf),i=new Zu(this.Yf);return t.prototype.get.call(this,e).then((function(t){return new Ku(n.Yf,i,r.S_,t.Zf,new Yu(!1,!1),r.v_)}))},e}(function(){function t(t,e){this.Yf=t,this.Ad=e,this.Id=Vs(t)}return t.prototype.get=function(t){var e=this,n=oc(t,this.Yf),r=new Gu(this.Yf);return this.Ad.ef([n.S_]).then((function(t){if(!t||1!==t.length)return v();var i=t[0];if(i instanceof bt)return new xu(e.Yf,r,n.S_,null,n.v_);if(i instanceof gt)return new xu(e.Yf,r,i.key,i,n.v_);throw v()}))},t.prototype.set=function(t,e,n){var r=oc(t,this.Yf),i=Hu(r.v_,e,n),o=Bs(this.Id,"Transaction.set",r.S_,i,null!==r.v_,n);return this.Ad.set(r.S_,o),this},t.prototype.update=function(t,e,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];var o,a=oc(t,this.Yf);return e instanceof ps&&(e=e.d_),o="string"==typeof e||e instanceof hs?Qs(this.Id,"Transaction.update",a.S_,e,n,r):Ks(this.Id,"Transaction.update",a.S_,e),this.Ad.update(a.S_,o),this},t.prototype.delete=function(t){var e=oc(t,this.Yf);return this.Ad.delete(e.S_),this},t}());function sc(){if("undefined"==typeof Uint8Array)throw new S(T.UNIMPLEMENT
2ED,"Uint8Arrays are not available in this environment.")}function uc(){if("undefined"==typeof atob)throw new S(T.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var cc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.fromBase64String=function(t){return uc(),new e(k.fromBase64String(t))},e.fromUint8Array=function(t){return sc(),new e(k.fromUint8Array(t))},e.prototype.toBase64=function(){return uc(),this.d_.toBase64()},e.prototype.toUint8Array=function(){return sc(),this.d_.toUint8Array()},e.prototype.isEqual=function(t){return this.d_.isEqual(t.d_)},e.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},e}(ps),lc=function(){function t(){}return t.prototype.enableIndexedDbPersistence=function(t,e){return function(t,e){Cu(t=_s(t,Tu));var n=Su(t),r=t.p_(),i=new us;return Iu(n,i,new as(i,r.cacheSizeBytes,null==e?void 0:e.forceOwnership))}(t.d_,{forceOwnership:e})},t.prototype.enableMultiTabIndexedDbPersistence=function(t){return function(t){Cu(t=_s(t,Tu));var e=Su(t),n=t.p_(),r=new us;return Iu(e,r,new ss(r,n.cacheSizeBytes))}(t.d_)},t.prototype.clearIndexedDbPersistence=function(t){return function(t){var e=this;if(t.R_&&!t.P_)throw new S(T.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");var n=new $n;return t.Bf.Tf((function(){return Object(a.b)(e,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,function(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return tr.Kn()?(e=t+"main",[4,tr.delete(e)]):[2,Promise.resolve()];case 1:return n.sent(),[2]}}))}))}(Ri(t.I_,t.w_))];case 1:return r.sent(),n.resolve(),[3,3];case 2:return e=r.sent(),n.reject(e),[3,3];case 3:return[2]}}
2))}))})),n.promise}(t.d_)},t}(),fc=function(t){function e(e,n,r){var i=this;return(i=t.call(this,n)||this).Rd=r,i.INTERNAL={delete:function(){return i.terminate()}},e instanceof u||(i.Pd=e),i}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"I_",{get:function(){return this.d_.I_},enumerable:!1,configurable:!0}),e.prototype.settings=function(t){t.merge&&delete(t=Object.assign(Object.assign({},this.d_.V_()),t)).merge,this.d_.g_(t)},e.prototype.useEmulator=function(t,e){!function(t,e,n){var r=(t=_s(t,Ss)).V_();"firestore.googleapis.com"!==r.host&&r.host!==e&&d("Host has been set in both settings() and useEmulator(), emulator host will be used"),t.g_(Object.assign(Object.assign({},r),{host:e+":"+n,ssl:!1}))}(this.d_,t,e)},e.prototype.enableNetwork=function(){return function(t){var e=this;return t._s.enqueue((function(){return Object(a.b)(e,void 0,void 0,(function(){var e,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return[4,du(t)];case 1:return e=r.sent(),[4,vu(t)];case 2:return n=r.sent(),[2,(e.yo(!0),function(t){var e=y(t);return e.Nh.delete(0),Fo(e)}(n))]}}))}))}))}(Su(_s(this.d_,Tu)))},e.prototype.disableNetwork=function(){return function(t){var e=this;return t._s.enqueue((function(){return Object(a.b)(e,void 0,void 0,(function(){var e,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return[4,du(t)];case 1:return e=r.sent(),[4,vu(t)];case 2:return n=r.sent(),[2,(e.yo(!1),function(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return(e=y(t)).Nh.add(0),[4,Uo(e)];case 1:return n.sent(),e.Oh.set("Offline"),[2]}}))}))}(n))]}}))}))}))}(Su(_s(this.d_,Tu)))},e.prototype.enablePersistence=function(t){var e=!1,n=!1;return t&&ys("synchronizeTabs",e=!!t.synchronizeTabs,"experimentalForceOwningTab",n=!!t.experimentalForceOwningTab),e?this.Rd.enableMultiTabIndexedDbPersistence(this):this.Rd.enableIndexedDbPersistence(this,n)},e.prototype.clearPersistence=function(){return this.Rd.clearIndexedDbPersistence(this)},e.prototype.terminate=function(){return this.Pd&&(this.Pd._removeServiceInstance("firestore"),this.Pd._removeServiceInstance("firestore-exp")),this.d_._delete()},e.prototype.waitForPendingWrites=function(){return function(t){var e=this,n=new $n;return t._s.Ps((function(){return Object(a.b)(e,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(r){switch(r.label){case 0:return e=Ma,[4,mu(t)];case 1:return[2,e.apply(void 0,[r.sent(),n])]}}))}))})),n.promise}(Su(_s(this.d_,Tu)))},e.prototype.onSnapshotsInSync=function(t){return function(t,e){return function(t,e){var n=this,r=new ls(e);return t._s.Ps((function(){return Object(a.b)(n,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=function(t,e){y(t).Wh.add(e),e.next()},[4,yu(t)];case 1:return[2,e.apply(void 0,[n.sent(),r])]}}))}))})),function(){r.i_(),t._s.Ps((function(){return Object(a.b)(n,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=function(t,e){y(t).Wh.delete(e)},[4,yu(t)];case 1:return[2,e.apply(void 0,[n.sent(),r])]}}))}))}))}}(Su(t=_s(t,Tu)),_u(e)?e:{next:e})}(this.d_,t)},Object.defineProperty(e.prototype,"app",{get:function(){if(!this.Pd)throw new S(T.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.Pd},enumerable:!1,configurable:!0}),e.prototype.collection=function(t){try{return new kc(this,Ns(this.d_,t))}catch(t){throw gc(t,"collection()","Firestore.collection()")}},e.prototype.doc=function(t){try{return new yc(this,xs(this.d_,t))}catch(t){throw gc(t,"doc()","Firestore.doc()")}},e.prototype.collectionGroup=function(t){try{return new Oc(this,function(t,e){if(t=_s(t,Ss),vs("collectionGroup","collection id",e),e.indexOf("/")>=0)throw new S(T.INVALID_ARGUMENT,"Invalid collection ID '"+e+"' passed to function collectionGroup(). Collection IDs must not contain '/'.");return new Is(t,null,function(t){return new Bt(L.ct(),t)}(e))}(this.d_,t))}catch(t){throw gc(t,"collectionGroup()","Firestore.collectionGroup()")}},e.prototype.runTransaction=function(t){var e=this;return function(t,e){return function(t,e){var n=this,r=new $n;return t._s.Ps((function(){return Object(a.b)(n,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(i){switch(i.label){case 0:return[4,function(t){return hu(t).then((function(t){return t.Sh}))}(t)];case 1:return n=i.sent(),new su(t._s,n,e,r).run(),[2]}}))}))})),r.promise}(Su(t),(function(n){return e(new ac(t,n))}
2))}(this.d_,(function(n){return t(new pc(e,n))}))},e.prototype.batch=function(){var t=this;return Su(this.d_),new vc(new ic(this.d_,(function(e){return nc(t.d_,e)})))},e.prototype.loadBundle=function(t){throw new S(T.FAILED_PRECONDITION,'"loadBundle()" does not exist, have you imported "firebase/firestore/bundle"?')},e.prototype.namedQuery=function(t){throw new S(T.FAILED_PRECONDITION,'"namedQuery()" does not exist, have you imported "firebase/firestore/bundle"?')},e}(ps),hc=function(t){function e(e){var n=this;return(n=t.call(this)||this).firestore=e,n}return Object(a.c)(e,t),e.prototype.Wf=function(t){return new cc(new k(t))},e.prototype.jf=function(t){var e=this.Jf(t,this.firestore.I_);return yc.yd(e,this.firestore,null)},e}(Nu);function dc(t){var e;e=t,c.setLogLevel(e)}var pc=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).Yf=e,r.Xf=new hc(e),r}return Object(a.c)(e,t),e.prototype.get=function(t){var e=this,n=Ic(t);return this.d_.get(n).then((function(t){return new _c(e.Yf,new Ku(e.Yf.d_,e.Xf,t.S_,t.Zf,t.metadata,n.v_))}))},e.prototype.set=function(t,e,n){var r=Ic(t);return n?(ms("Transaction.set",n),this.d_.set(r,e,n)):this.d_.set(r,e),this},e.prototype.update=function(t,e,n){for(var r,i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=Ic(t);return 2===arguments.length?this.d_.update(s,e):(r=this.d_).update.apply(r,Object(a.g)([s,e,n],i)),this},e.prototype.delete=function(t){var e=Ic(t);return this.d_.delete(e),this},e}(ps),vc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.set=function(t,e,n){var r=Ic(t);return n?(ms("WriteBatch.set",n),this.d_.set(r,e,n)):this.d_.set(r,e),this},e.prototype.update=function(t,e,n){for(var r,i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=Ic(t);return 2===arguments.length?this.d_.update(s,e):(r=this.d_).update.apply(r,Object(a.g)([s,e,n],i)),this},e.prototype.delete=function(t){var e=Ic(t);return this.d_.delete(e),this},e.prototype.commit=function(){return this.d_.commit()},e}(ps),mc=function(t){function e(e,n,r){var i=this;return(i=t.call(this,r)||this).Yf=e,i.Xf=n,i}return Object(a.c)(e,t),e.prototype.fromFirestore=function(t,e){var n=new Qu(this.Yf.d_,this.Xf,t.S_,t.Zf,t.metadata,null);return this.d_.fromFirestore(new Ec(this.Yf,n),null!=e?e:{})},e.prototype.toFirestore=function(t,e){return e?this.d_.toFirestore(t,e):this.d_.toFirestore(t)},e.gd=function(t,n){var r=e.Vd,i=r.get(t);i||(i=new WeakMap,r.set(t,i));var o=i.get(n);return o||(o=new e(t,new hc(t),n),i.set(n,o)),o},e}(ps);mc.Vd=new WeakMap;var yc=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).firestore=e,r.Xf=new hc(e),r}return Object(a.c)(e,t),e.pd=function(t,n,r){if(t.length%2!=0)throw new S(T.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+t.rt()+" has "+t.length);return new e(n,new ks(n.d_,r,new V(t)))},e.yd=function(t,n,r){return new e(n,new ks(n.d_,r,t))},Object.defineProperty(e.prototype,"id",{get:function(){return this.d_.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return new kc(this.firestore,this.d_.parent)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.d_.path},enumerable:!1,configurable:!0}),e.prototype.collection=function(t){try{return new kc(this.firestore,Ns(this.d_,t))}catch(t){throw gc(t,"collection()","DocumentReference.collection()")}},e.prototype.isEqual=function(t){return t instanceof ps&&(t=t.d_),t instanceof ks&&Ps(this.d_,t)},e.prototype.set=function(t,e){e=ms("DocumentReference.set",e);try{return function(t,e,n){t=_s(t,ks);var r=_s(t.firestore,Tu),i=Hu(t.v_,e,n);return nc(r,[Bs(Vs(r),"setDoc",t.S_,i,null!==t.v_,n).F_(t.S_,Ee.Kt())])}(this.d_,t,e)}catch(t){throw gc(t,"setDoc()","DocumentReference.set()")}},e.prototype.update=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];try{return 1===arguments.length?tc(this.d_,t):tc.apply(void 0,Object(a.g)([this.d_,t,e],n))}
2catch(t){throw gc(t,"updateDoc()","DocumentReference.update()")}},e.prototype.delete=function(){return nc(_s((t=this.d_).firestore,Tu),[new Fe(t.S_,Ee.Kt())]);var t},e.prototype.onSnapshot=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=bc(e),i=wc(e,(function(e){return new _c(t.firestore,new Ku(t.firestore.d_,t.Xf,e.S_,e.Zf,e.metadata,t.d_.v_))}));return ec(this.d_,r,i)},e.prototype.get=function(t){var e=this;return("cache"===(null==t?void 0:t.source)?function(t){t=_s(t,ks);var e=_s(t.firestore,Tu),n=Su(e),r=new Zu(e);return function(t,e){var n=this,r=new $n;return t._s.Ps((function(){return Object(a.b)(n,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(i){switch(i.label){case 0:return n=function(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,function(t,e){var n=y(t);return n.persistence.runTransaction("read document","readonly",(function(t){return n.Tc.Ho(t,e)}))}(t,e)];case 1:return(i=o.sent())instanceof gt?n.resolve(i):i instanceof bt?n.resolve(null):n.reject(new S(T.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=cr(r,"Failed to get document '"+e+" from cache"),n.reject(i),[3,3];case 3:return[2]}}
2))}))},[4,pu(t)];case 1:return[2,n.apply(void 0,[i.sent(),e,r])]}}))}))})),r.promise}(n,t.S_).then((function(n){return new Ku(e,r,t.S_,n,new Yu(n instanceof gt&&n.Vt,!0),t.v_)}))}(this.d_):"server"===(null==t?void 0:t.source)?function(t){t=_s(t,ks);var e=_s(t.firestore,Tu);return gu(Su(e),t.S_,{source:"server"}).then((function(n){return rc(e,t,n)}))}(this.d_):function(t){t=_s(t,ks);var e=_s(t.firestore,Tu);return gu(Su(e),t.S_).then((function(n){return rc(e,t,n)}))}(this.d_)).then((function(t){return new _c(e.firestore,new Ku(e.firestore.d_,e.Xf,t.S_,t.Zf,t.metadata,e.d_.v_))}))},e.prototype.withConverter=function(t){return new e(this.firestore,this.d_.withConverter(mc.gd(this.firestore,t)))},e}(ps);function gc(t,e,n){return t.message=t.message.replace(e,n),t}function bc(t){for(var e=0,n=t;e<n.length;e++){var r=n[e];if("object"==typeof r&&!_u(r))return r}return{}}function wc(t,e){var n,r,i;return{next:function(t){i.next&&i.next(e(t))},error:null===(n=(i=_u(t[0])?t[0]:_u(t[1])?t[1]:"function"==typeof t[0]?{next:t[0],error:t[1],complete:t[2]}:{next:t[1],error:t[2],complete:t[3]}).error)||void 0===n?void 0:n.bind(i),complete:null===(r=i.complete)||void 0===r?void 0:r.bind(i)}}var _c=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).Yf=e,r}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"ref",{get:function(){return new yc(this.Yf,this.d_.ref)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this.d_.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this.d_.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exists",{get:function(){return this.d_.exists()},enumerable:!1,configurable:!0}),e.prototype.data=function(t){return this.d_.data(t)},e.prototype.get=function(t,e){return this.d_.get(t,e)},e.prototype.isEqual=function(t){return Ju(this.d_,t.d_)},e}(ps),Ec=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.data=function(t){return this.d_.data(t)},e}(_c),Oc=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).firestore=e,r.Xf=new hc(e),r}return Object(a.c)(e,t),e.prototype.where=function(t,n,r){try{return new e(this.firestore,Ru(this.d_,function(t,e,n){var r=e,i=ju("where",t);return new Mu(i,r,n)}(t,n,r)))}catch(t){throw gc(t,/(orderBy|where)\(\)/,"Query.$1()")}},e.prototype.orderBy=function(t,n){try{return new e(this.firestore,Ru(this.d_,function(t,e){void 0===e&&(e="asc");var n=e,r=ju("orderBy",t);return new Lu(r,n)}(t,n)))}catch(t){throw gc(t,/(orderBy|where)\(\)/,"Query.$1()")}},e.prototype.limit=function(t){try{return new e(this.firestore,Ru(this.d_,function(t){return Es("limit",t),new Fu("limit",t,"F")}(t)))}catch(t){throw gc(t,"limit()","Query.limit()")}},e.prototype.limitToLast=function(t){try{return new e(this.firestore,Ru(this.d_,function(t){return Es("limitToLast",t),new Fu("limitToLast",t,"L")}(t)))}catch(t){throw gc(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,Ru(this.d_,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new Uu("startAt",t,!0)}.apply(void 0,t)))}catch(t){throw gc(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,Ru(this.d_,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new Uu("startAfter",t,!1)}.apply(void 0,t)))}catch(t){throw gc(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,Ru(this.d_,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new Vu("endBefore",t,!0)}.apply(void 0,t)))}catch(t){throw gc(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,Ru(this.d_,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new Vu("endAt",t,!1)}.apply(void 0,t)))}catch(t){throw gc(t,"endAt()","Query.endAt()")}},e.prototype.isEqual=function(t){return js(this.d_,t.d_)},e.prototype.get=function(t){var e=this;
2return("cache"===(null==t?void 0:t.source)?function(t){t=_s(t,Is);var e=_s(t.firestore,Tu),n=Su(e),r=new Zu(e);return function(t,e){var n=this,r=new $n;return t._s.Ps((function(){return Object(a.b)(n,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(i){switch(i.label){case 0:return n=function(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s,u;return Object(a.d)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,Xi(t,e,!0)];case 1:return u=a.sent(),r=new Oa(e,u.Rc),i=r.fl(u.documents),o=r.wi(i,!1),n.resolve(o.snapshot),[3,3];case 2:return s=a.sent(),u=cr(s,"Failed to execute query '"+e+" against cache"),n.reject(u),[3,3];case 3:return[2]}}))}))},[4,pu(t)];case 1:return[2,n.apply(void 0,[i.sent(),e,r])]}}))}))})),r.promise}(n,t.C_).then((function(n){return new Xu(e,r,t,n)}))}(this.d_):"server"===(null==t?void 0:t.source)?function(t){t=_s(t,Is);var e=_s(t.firestore,Tu),n=Su(e),r=new Zu(e);return bu(n,t.C_,{source:"server"}).then((function(n){return new Xu(e,r,t,n)}))}(this.d_):function(t){t=_s(t,Is);var e=_s(t.firestore,Tu),n=Su(e),r=new Zu(e);return Au(t.C_),bu(n,t.C_).then((function(n){return new Xu(e,r,t,n)}))}(this.d_)).then((function(t){return new Sc(e.firestore,new Xu(e.firestore.d_,e.Xf,e.d_,t._d))}))},e.prototype.onSnapshot=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=bc(e),i=wc(e,(function(e){return new Sc(t.firestore,new Xu(t.firestore.d_,t.Xf,t.d_,e._d))}));return ec(this.d_,r,i)},e.prototype.withConverter=function(t){return new e(this.firestore,this.d_.withConverter(mc.gd(this.firestore,t)))},e}(ps),Tc=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).Yf=e,r}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"type",{get:function(){return this.d_.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doc",{get:function(){return new Ec(this.Yf,this.d_.doc)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"oldIndex",{get:function(){return this.d_.oldIndex},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"newIndex",{get:function(){return this.d_.newIndex},enumerable:!1,configurable:!0}),e}(ps),Sc=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).Yf=e,r}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"query",{get:function(){return new Oc(this.Yf,this.d_.query)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this.d_.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.d_.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return this.d_.empty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"docs",{get:function(){var t=this;return this.d_.docs.map((function(e){return new Ec(t.Yf,e)}))},enumerable:!1,configurable:!0}),e.prototype.docChanges=function(t){var e=this;return this.d_.docChanges(t).map((function(t){return new Tc(e.Yf,t)}))},e.prototype.forEach=function(t,e){var n=this;this.d_.forEach((function(r){t.call(e,new Ec(n.Yf,r))}))},e.prototype.isEqual=function(t){return Ju(this.d_,t.d_)},e}(ps),kc=function(t){function e(e,n){var r=this;return(r=t.call(this,e,n)||this).firestore=e,r.d_=n,r}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.d_.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.d_.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this.d_.parent;return t?new yc(this.firestore,t):null},enumerable:!1,configurable:!0}),e.prototype.doc=function(t){try{return new yc(this.firestore,void 0===t?xs(this.d_):xs(this.d_,t))}catch(t){throw gc(t,"doc()","CollectionReference.doc()")}},e.prototype.add=function(t){var e=this;return function(t,e){var n=_s(t.firestore,Tu),r=xs(t),i=Hu(t.v_,e);return nc(n,[Bs(Vs(t.firestore),"addDoc",r.S_,i,null!==t.v_,{}).F_(r.S_,Ee.exists(!1))]).then((function(){return r}))}(this.d_,t).then((function(t){return new yc(e.firestore,t)}))},e.prototype.isEqual=function(t){return Ps(this.d_,t.d_)},e.prototype.withConverter=function(t){return new e(this.firestore,this.d_.withConverter(mc.gd(this.firestore,t)))},e}(Oc);function Ic(t){return t instanceof ps&&(t=t.d_),_s(t,ks)}var Cc=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.call(this,new(hs.bind.apply(hs,Object(a.g)([void 0],e))))||this}return Object(a.c)(e,t),e.documentId=function(){return new e(U.ht().rt())},e.prototype.isEqual=function(t){return t instanceof ps&&(t=t.d_),t instanceof hs&&this.d_.f_.isEqual(t.f_)},e}(ps),Nc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.serverTimestamp=function(){var t=new Ws("serverTimestamp");return t._methodName="FieldValue.serverTimestamp",new e(t)},e.delete=function(){var t=new qs("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 t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new Hs("arrayUnion",t)}.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 t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new Gs("arrayRemove",t)}.apply(void 0,t);return r._methodName="FieldValue.arrayRemove",new e(r)},e.increment=function(t){var n=function(t){return new Ys("increment",t)}(t);return n._methodName="FieldValue.increment",new e(n)},e.prototype.isEqual=function(t){return this.d_.isEqual(t.d_)},e}(ps);function xc(t){return function(t,e){var n=Su(t=_s(t,Tu)),r=new Eu;return function(t,e,n,r){var i=this,o=function(t,e){return function(t,e){return new fs(t,e)}(function(t,e){if(t instanceof Uint8Array)return cs(t,e);if(t instanceof ArrayBuffer)return cs(new Uint8Array(t),e);if(t instanceof ReadableStream)return t.getReader();throw new Error("Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream")}
2("string"==typeof t?(new TextEncoder).encode(t):t),e)}(n,xo(e));t._s.Ps((function(){return Object(a.b)(i,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=is,[4,mu(t)];case 1:return e.apply(void 0,[n.sent(),o,r]),[2]}}))}))}))}(n,t.I_,e,r),r}(this.d_,t)}function Pc(t){var e,n,r=this;return(e=this.d_,n=t,function(t,e){var n=this;return t._s.enqueue((function(){return Object(a.b)(n,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return n=function(t,e){var n=y(t);return n.persistence.runTransaction("Get named query","readonly",(function(t){return n.wo.Ms(t,e)}))},[4,pu(t)];case 1:return[2,n.apply(void 0,[r.sent(),e])]}}))}))}))}(Su(e=_s(e,Tu)),n).then((function(t){return t?new Is(e,null,t.query):null}))).then((function(t){return t?new Oc(r,t):null}))}}).call(this,n(45))},function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return E})),n.d(e,"b",(function(){return k})),n.d(e,"c",(function(){return y})),n.d(e,"d",(function(){return j})),n.d(e,"e",(function(){return m})),n.d(e,"f",(function(){return S})),n.d(e,"g",(function(){return A}));var r=n(15),i=n(4),o=n.n(i),a=(n(3),n(30)),s=n(47),u=n(29),c=n(7),l=n(48),f=n.n(l),h=(n(42),n(9)),d=n(39),p=n.n(d),v=function(t){var e=Object(s.a)();return e.displayName=t,e}("Router-History"),m=function(t){var e=Object(s.a)();return e.displayName=t,e}("Router"),y=function(t){function e(e){var n;return(n=t.call(this,e)||this).state={location:e.history.location},n._isMounted=!1,n._pendingLocation=null,e.staticContext||(n.unlisten=e.history.listen((function(t){n._isMounted?n.setState({location:t}):n._pendingLocation=t}))),n}Object(r.a)(e,t),e.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var n=e.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return o.a.createElement(m.Provider,{value:{history:this.props.history,location:this.state.location,match:e.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.a.createElement(v.Provider,{children:this.props.children||null,value:this.props.history}))},e}(o.a.Component);o.a.Component;var g=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(t){this.props.onUpdate&&this.props.onUpdate.call(this,this,t)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},e}(o.a.Component);var b={},w=0;function _(t,e){return void 0===t&&(t="/"),void 0===e&&(e={}),"/"===t?t:function(t){if(b[t])return b[t];var e=f.a.compile(t);return w<1e4&&(b[t]=e,w++),e}(t)(e,{pretty:!0})}function E(t){var e=t.computedMatch,n=t.to,r=t.push,i=void 0!==r&&r;return o.a.createElement(m.Consumer,null,(function(t){t||Object(u.a)(!1);var r=t.history,s=t.staticContext,l=i?r.push:r.replace,f=Object(a.c)(e?"string"===typeof n?_(n,e.params):Object(c.a)({},n,{pathname:_(n.pathname,e.params)}):n);return s?(l(f),null):o.a.createElement(g,{onMount:function(){l(f)},onUpdate:function(t,e){var n=Object(a.c)(e.to);Object(a.f)(n,Object(c.a)({},f,{key:n.key}))||l(f)},to:n})}))}var O={},T=0;function S(t,e){void 0===e&&(e={}),("string"===typeof e||Array.isArray(e))&&(e={path:e});var n=e,r=n.path,i=n.exact,o=void 0!==i&&i,a=n.strict,s=void 0!==a&&a,u=n.sensitive,c=void 0!==u&&u;return[].concat(r).reduce((function(e,n){if(!n&&""!==n)return null;if(e)return e;var r=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=O[n]||(O[n]={});if(r[t])return r[t];var i=[],o={regexp:f()(t,i,e),keys:i};return T<1e4&&(r[t]=o,T++),o}(n,{end:o,strict:s,sensitive:c}),i=r.regexp,a=r.keys,u=i.exec(t);if(!u)return null;var l=u[0],h=u.slice(1),d=t===l;return o&&!d?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:d,params:a.reduce((function(t,e,n){return t[e.name]=h[n],t}),{})}}),null)}var k=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.render=function(){var t=this;return o.a.createElement(m.Consumer,null,(function(e){e||Object(u.a)(!1);var n=t.props.location||e.location,r=t.props.computedMatch?t.props.computedMatch:t.props.path?S(n.pathname,t.props):e.match,i=Object(c.a)({},e,{location:n,match:r}),a=t.props,s=a.children,l=a.component,f=a.render;return Array.isArray(s)&&0===s.length&&(s=null),o.a.createElement(m.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)}))},e}(o.a.Component);function I(t){return"/"===t.charAt(0)?t:"/"+t}function C(t,e){if(!t)return e;var n=I(t);return 0!==e.pathname.indexOf(n)?e:Object(c.a)({},e,{pathname:e.pathname.substr(n.length)})}function N(t){return"string"===typeof t?t:Object(a.e)(t)}function x(t){return function(){Object(u.a)(!1)}}function P(){}o.a.Component;var j=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.render=function(){var t=this;return o.a.createElement(m.Consumer,null,(function(e){e||Object(u.a)(!1);var n,r,i=t.props.location||e.location;
2return o.a.Children.forEach(t.props.children,(function(t){if(null==r&&o.a.isValidElement(t)){n=t;var a=t.props.path||t.props.from;r=a?S(i.pathname,Object(c.a)({},t.props,{path:a})):e.match}})),r?o.a.cloneElement(n,{location:i,computedMatch:r}):null}))},e}(o.a.Component);function A(t){var e="withRouter("+(t.displayName||t.name)+")",n=function(e){var n=e.wrappedComponentRef,r=Object(h.a)(e,["wrappedComponentRef"]);return o.a.createElement(m.Consumer,null,(function(e){return e||Object(u.a)(!1),o.a.createElement(t,Object(c.a)({},r,e,{ref:n}))}))};return n.displayName=e,n.WrappedComponent=t,p()(n,t)}o.a.useContext},function(t,e,n){(function(t){t.exports=function(){"use strict";var e,n;function r(){return e.apply(null,arguments)}function i(t){e=t}function o(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function a(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function u(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(s(t,e))return!1;return!0}function c(t){return void 0===t}function l(t){return"number"===typeof t||"[object Number]"===Object.prototype.toString.call(t)}function f(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function h(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function d(t,e){for(var n in e)s(e,n)&&(t[n]=e[n]);return s(e,"toString")&&(t.toString=e.toString),s(e,"valueOf")&&(t.valueOf=e.valueOf),t}function p(t,e,n,r){return Yn(t,e,n,r,!0).utc()}function v(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function m(t){return null==t._pf&&(t._pf=v()),t._pf}function y(t){if(null==t._isValid){var e=m(t),r=n.call(e.parsedDateParts,(function(t){return null!=t})),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&r);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function g(t){var e=p(NaN);return null!=t?d(m(e),t):m(e).userInvalidated=!0,e}n=Array.prototype.some?Array.prototype.some:function(t){var e,n=Object(this),r=n.length>>>0;for(e=0;e<r;e++)if(e in n&&t.call(this,n[e],e,n))return!0;return!1};var b=r.momentProperties=[],w=!1;function _(t,e){var n,r,i;if(c(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),c(e._i)||(t._i=e._i),c(e._f)||(t._f=e._f),c(e._l)||(t._l=e._l),c(e._strict)||(t._strict=e._strict),c(e._tzm)||(t._tzm=e._tzm),c(e._isUTC)||(t._isUTC=e._isUTC),c(e._offset)||(t._offset=e._offset),c(e._pf)||(t._pf=m(e)),c(e._locale)||(t._locale=e._locale),b.length>0)for(n=0;n<b.length;n++)c(i=e[r=b[n]])||(t[r]=i);return t}function E(t){_(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===w&&(w=!0,r.updateOffset(this),w=!1)}function O(t){return t instanceof E||null!=t&&null!=t._isAMomentObject}function T(t){!1===r.suppressDeprecationWarnings&&"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function S(t,e){var n=!0;return d((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,t),n){var i,o,a,u=[];for(o=0;o<arguments.length;o++){if(i="","object"===typeof arguments[o]){for(a in i+="\n["+o+"] ",arguments[0])s(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[o];u.push(i)}T(t+"\nArguments: "+Array.prototype.slice.call(u).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var k,I={};function C(t,e){null!=r.deprecationHandler&&r.deprecationHandler(t,e),I[t]||(T(e),I[t]=!0)}function N(t){return"undefined"!==typeof Function&&t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function x(t){var e,n;for(n in t)s(t,n)&&(N(e=t[n])?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function P(t,e){var n,r=d({},t);for(n in e)s(e,n)&&(a(t[n])&&a(e[n])?(r[n]={},d(r[n],t[n]),d(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)s(t,n)&&!s(e,n)&&a(t[n])&&(r[n]=d({},r[n]));return r}function j(t){null!=t&&this.set(t)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,k=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)s(t,e)&&n.push(e);return n};var A={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function D(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return N(r)?r.call(e,n):r}function R(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(t>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var M=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}
vendor: 54,496 bytes, line 2
2|x|X|zz?|ZZ?|.)/g,L=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,F={},U={};function V(t,e,n,r){var i=r;"string"===typeof r&&(i=function(){return this[r]()}),t&&(U[t]=i),e&&(U[e[0]]=function(){return R(i.apply(this,arguments),e[1],e[2])}),n&&(U[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function B(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function q(t){var e,n,r=t.match(M);for(e=0,n=r.length;e<n;e++)U[r[e]]?r[e]=U[r[e]]:r[e]=B(r[e]);return function(e){var i,o="";for(i=0;i<n;i++)o+=N(r[i])?r[i].call(e,t):r[i];return o}}function z(t,e){return t.isValid()?(e=W(e,t.localeData()),F[e]=F[e]||q(e),F[e](t)):t.localeData().invalidDate()}function W(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(L.lastIndex=0;n>=0&&L.test(t);)t=t.replace(L,r),L.lastIndex=0,n-=1;return t}var H={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function G(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(M).map((function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t})).join(""),this._longDateFormat[t])}var Y="Invalid date";function K(){return this._invalidDate}var Q="%d",X=/\d{1,2}/;function $(t){return this._ordinal.replace("%d",t)}var J={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Z(t,e,n,r){var i=this._relativeTime[n];return N(i)?i(t,e,n,r):i.replace(/%d/i,t)}function tt(t,e){var n=this._relativeTime[t>0?"future":"past"];return N(n)?n(e):n.replace(/%s/i,e)}var et={};function nt(t,e){var n=t.toLowerCase();et[n]=et[n+"s"]=et[e]=t}function rt(t){return"string"===typeof t?et[t]||et[t.toLowerCase()]:void 0}function it(t){var e,n,r={};for(n in t)s(t,n)&&(e=rt(n))&&(r[e]=t[n]);return r}var ot={};function at(t,e){ot[t]=e}function st(t){var e,n=[];for(e in t)s(t,e)&&n.push({unit:e,priority:ot[e]});return n.sort((function(t,e){return t.priority-e.priority})),n}function ut(t){return t%4===0&&t%100!==0||t%400===0}function ct(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function lt(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=ct(e)),n}function ft(t,e){return function(n){return null!=n?(dt(this,t,n),r.updateOffset(this,e),this):ht(this,t)}}function ht(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function dt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&ut(t.year())&&1===t.month()&&29===t.date()?(n=lt(n),t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),Zt(n,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function pt(t){return N(this[t=rt(t)])?this[t]():this}function vt(t,e){if("object"===typeof t){var n,r=st(t=it(t));for(n=0;n<r.length;n++)this[r[n].unit](t[r[n].unit])}else if(N(this[t=rt(t)]))return this[t](e);return this}var mt,yt=/\d/,gt=/\d\d/,bt=/\d{3}/,wt=/\d{4}/,_t=/[+-]?\d{6}/,Et=/\d\d?/,Ot=/\d\d\d\d?/,Tt=/\d\d\d\d\d\d?/,St=/\d{1,3}/,kt=/\d{1,4}/,It=/[+-]?\d{1,6}/,Ct=/\d+/,Nt=/[+-]?\d+/,xt=/Z|[+-]\d\d:?\d\d/gi,Pt=/Z|[+-]\d\d(?::?\d\d)?/gi,jt=/[+-]?\d+(\.\d{1,3})?/,At=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function Dt(t,e,n){mt[t]=N(e)?e:function(t,r){return t&&n?n:e}}function Rt(t,e){return s(mt,t)?mt[t](e._strict,e._locale):new RegExp(Mt(t))}function Mt(t){return Lt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i})))}function Lt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}mt={};var Ft={};function Ut(t,e){var n,r=e;for("string"===typeof t&&(t=[t]),l(e)&&(r=function(t,n){n[e]=lt(t)}),n=0;n<t.length;n++)Ft[t[n]]=r}function Vt(t,e){Ut(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)}))}function Bt(t,e,n){null!=e&&s(Ft,t)&&Ft[t](e,n._a,n,t)}var qt,zt=0,Wt=1,Ht=2,Gt=3,Yt=4,Kt=5,Qt=6,Xt=7,$t=8;function Jt(t,e){return(t%e+e)%e}function Zt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=Jt(e,12);return t+=(e-n)/12,1===n?ut(t)?29:28:31-n%7%2}qt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},V("M",["MM",2],"Mo",(function(){return this.month()+1})),V("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),V("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),nt("month","M"),at("month",8),Dt("M",Et),Dt("MM",Et,gt),Dt("MMM",(function(t,e){return e.monthsShortRegex(t)})),Dt("MMMM",(function(t,e){return e.monthsRegex(t)})),Ut(["M","MM"],(function(t,e){e[Wt]=lt(t)-1})),Ut(["MMM","MMMM"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[Wt]=i:m(n).invalidMonth=t}));var te="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ee="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ne=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,re=At,ie=At;function oe(t,e){return t?o(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||ne).test(e)?"format":"standalone"][t.month()]:o(this._months)?this._months:this._months.standalone}function ae(t,e){return t?o(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[ne.test(e)?"format":"standalone"][t.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function se(t,e,n){var r,i,o,a=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=qt.call(this._shortMonthsParse,a))?i:null:-1!==(i=qt.call(this._longMonthsParse,a))?i:null:"MMM"===e?-1!==(i=qt.call(this._shortMonthsParse,a))||-1!==(i=qt.call(this._longMonthsParse,a))?i:null:-1!==(i=qt.call(this._longMonthsParse,a))||-1!==(i=qt.call(this._shortMonthsParse,a))?i:null}function ue(t,e,n){var r,i,o;if(this._monthsParseExact)return se.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=p([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function ce(t,e){var n;if(!t.isValid())return t;if("string"===typeof e)if(/^\d+$/.test(e))e=lt(e);else if(!l(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),Zt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function le(t){return null!=t?(ce(this,t),r.updateOffset(this,!0),this):ht(this,"Month")}function fe(){return Zt(this.year(),this.month())}function he(t){return this._monthsParseExact?(s(this,"_monthsRegex")||pe.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=re),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function de(t){return this._monthsParseExact?(s(this,"_monthsRegex")||pe.call(this),t?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=ie),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function pe(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],o=[];for(e=0;e<12;e++)n=p([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),o.sort(t),e=0;e<12;e++)r[e]=Lt(r[e]),i[e]=Lt(i[e]);for(e=0;e<24;e++)o[e]=Lt(o[e]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function ve(t){return ut(t)?366:365}V("Y",0,0,(function(){var t=this.year();return t<=9999?R(t,4):"+"+t})),V(0,["YY",2],0,(function(){return this.year()%100})),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),nt("year","y"),at("year",1),Dt("Y",Nt),Dt("YY",Et,gt),Dt("YYYY",kt,wt),Dt("YYYYY",It,_t),Dt("YYYYYY",It,_t),Ut(["YYYYY","YYYYYY"],zt),Ut("YYYY",(function(t,e){e[zt]=2===t.length?r.parseTwoDigitYear(t):lt(t)})),Ut("YY",(function(t,e){e[zt]=r.parseTwoDigitYear(t)})),Ut("Y",(function(t,e){e[zt]=parseInt(t,10)})),r.parseTwoDigitYear=function(t){return lt(t)+(lt(t)>68?1900:2e3)};var me=ft("FullYear",!0);function ye(){return ut(this.year())}function ge(t,e,n,r,i,o,a){var s;return t<100&&t>=0?(s=new Date(t+400,e,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,o,a),s}function be(t){var e,n;return t<100&&t>=0?((n=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function we(t,e,n){var r=7+e-n;return-(7+be(t,0,r).getUTCDay()-e)%7+r-1}function _e(t,e,n,r,i){var o,a,s=1+7*(e-1)+(7+n-r)%7+we(t,r,i);return s<=0?a=ve(o=t-1)+s:s>ve(t)?(o=t+1,a=s-ve(t)):(o=t,a=s),{year:o,dayOfYear:a}}function Ee(t,e,n){var r,i,o=we(t.year(),e,n),a=Math.floor((t.dayOfYear()-o-1)/7)+1;return a<1?r=a+Oe(i=t.year()-1,e,n):a>Oe(t.year(),e,n)?(r=a-Oe(t.year(),e,n),i=t.year()+1):(i=t.year(),r=a),{week:r,year:i}}function Oe(t,e,n){var r=we(t,e,n),i=we(t+1,e,n);return(ve(t)-r+i)/7}function Te(t){return Ee(t,this._week.dow,this._week.doy).week}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),nt("week","w"),nt("isoWeek","W"),at("week",5),at("isoWeek",5),Dt("w",Et),Dt("ww",Et,gt),Dt("W",Et),Dt("WW",Et,gt),Vt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=lt(t)}));var Se={dow:0,doy:6};function ke(){return this._week.dow}function Ie(){return this._week.doy}function Ce(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Ne(t){var e=Ee(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function xe(t,e){return"string"!==typeof t?t:isNaN(t)?"number"===typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}function Pe(t,e){return"string"===typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function je(t,e){return t.slice(e,7).concat(t.slice(0,e))}V("d",0,"do","day"),V("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),V("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),V("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),nt("day","d"),nt("weekday","e"),nt("isoWeekday","E"),at("day",11),at("weekday",11),at("isoWeekday",11),Dt("d",Et),Dt("e",Et),Dt("E",Et),Dt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),Dt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),Dt("dddd",(function(t,e){return e.weekdaysRegex(t)})),Vt(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:m(n).invalidWeekday=t})),Vt(["d","e","E"],(function(t,e,n,r){e[r]=lt(t)}));var Ae="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),De="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Re="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Me=At,Le=At,Fe=At;function Ue(t,e){var n=o(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?je(n,this._week.dow):t?n[t.day()]:n}function Ve(t){return!0===t?je(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Be(t){return!0===t?je(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function qe(t,e,n){var r,i,o,a=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=qt.call(this._weekdaysParse,a))?i:null:"ddd"===e?-1!==(i=qt.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=qt.call(this._minWeekdaysParse,a))?i:null:"dddd"===e?-1!==(i=qt.call(this._weekdaysParse,a))||-1!==(i=qt.call(this._shortWeekdaysParse,a))||-1!==(i=qt.call(this._minWeekdaysParse,a))?i:null:"ddd"===e?-1!==(i=qt.call(this._shortWeekdaysParse,a))||-1!==(i=qt.call(this._weekdaysParse,a))||-1!==(i=qt.call(this._minWeekdaysParse,a))?i:null:-1!==(i=qt.call(this._minWeekdaysParse,a))||-1!==(i=qt.call(this._weekdaysParse,a))||-1!==(i=qt.call(this._shortWeekdaysParse,a))?i:null}function ze(t,e,n){var r,i,o;if(this._weekdaysParseExact)return qe.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=p([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function We(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=xe(t,this.localeData()),this.add(t-e,"d")):e}function He(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Ge(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Pe(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function Ye(t){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Xe.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Me),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ke(t){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Xe.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Le),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Qe(t){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Xe.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Fe),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Xe(){function t(t,e){return e.length-t.length}var e,n,r,i,o,a=[],s=[],u=[],c=[];for(e=0;e<7;e++)n=p([2e3,1]).day(e),r=Lt(this.weekdaysMin(n,"")),i=Lt(this.weekdaysShort(n,"")),o=Lt(this.weekdays(n,"")),a.push(r),s.push(i),u.push(o),c.push(r),c.push(i),c.push(o);a.sort(t),s.sort(t),u.sort(t),c.sort(t),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function $e(){return this.hours()%12||12}function Je(){return this.hours()||24}function Ze(t,e){V(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function tn(t,e){return e._meridiemParse}function en(t){return"p"===(t+"").toLowerCase().charAt(0)}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,$e),V("k",["kk",2],0,Je),V("hmm",0,0,(function(){return""+$e.apply(this)+R(this.minutes(),2)})),V("hmmss",0,0,(function(){return""+$e.apply(this)+R(this.minutes(),2)+R(this.seconds(),2)})),V("Hmm",0,0,(function(){return""+this.hours()+R(this.minutes(),2)})),V("Hmmss",0,0,(function(){return""+this.hours()+R(this.minutes(),2)+R(this.seconds(),2)})),Ze("a",!0),Ze("A",!1),nt("hour","h"),at("hour",13),Dt("a",tn),Dt("A",tn),Dt("H",Et),Dt("h",Et),Dt("k",Et),Dt("HH",Et,gt),Dt("hh",Et,gt),Dt("kk",Et,gt),Dt("hmm",Ot),Dt("hmmss",Tt),Dt("Hmm",Ot),Dt("Hmmss",Tt),Ut(["H","HH"],Gt),Ut(["k","kk"],(function(t,e,n){var r=lt(t);e[Gt]=24===r?0:r})),Ut(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),Ut(["h","hh"],(function(t,e,n){e[Gt]=lt(t),m(n).bigHour=!0})),Ut("hmm",(function(t,e,n){var r=t.length-2;e[Gt]=lt(t.substr(0,r)),e[Yt]=lt(t.substr(r)),m(n).bigHour=!0})),Ut("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[Gt]=lt(t.substr(0,r)),e[Yt]=lt(t.substr(r,2)),e[Kt]=lt(t.substr(i)),m(n).bigHour=!0})),Ut("Hmm",(function(t,e,n){var r=t.length-2;e[Gt]=lt(t.substr(0,r)),e[Yt]=lt(t.substr(r))})),Ut("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[Gt]=lt(t.substr(0,r)),e[Yt]=lt(t.substr(r,2)),e[Kt]=lt(t.substr(i))}));var nn=/[ap]\.?m?\.?/i,rn=ft("Hours",!0);function on(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var an,sn={calendar:A,longDateFormat:H,invalidDate:Y,ordinal:Q,dayOfMonthOrdinalParse:X,relativeTime:J,months:te,monthsShort:ee,week:Se,weekdays:Ae,weekdaysMin:Re,weekdaysShort:De,meridiemParse:nn},un={},cn={};function ln(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function fn(t){return t?t.toLowerCase().replace("_","-"):t}function hn(t){for(var e,n,r,i,o=0;o<t.length;){for(e=(i=fn(t[o]).split("-")).length,n=(n=fn(t[o+1]))?n.split("-"):null;e>0;){if(r=dn(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&ln(i,n)>=e-1)break;e--}o++}return an}function dn(e){var n=null;if(void 0===un[e]&&"undefined"!==typeof t&&t&&t.exports)try{n=an._abbr,function(){var t=new Error("Cannot find module 'undefined'");throw t.code="MODULE_NOT_FOUND",t}(),pn(n)}catch(r){un[e]=null}return un[e]}function pn(t,e){var n;return t&&((n=c(e)?yn(t):vn(t,e))?an=n:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),an._abbr}function vn(t,e){if(null!==e){var n,r=sn;if(e.abbr=t,null!=un[t])C("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=un[t]._config;else if(null!=e.parentLocale)if(null!=un[e.parentLocale])r=un[e.parentLocale]._config;else{if(null==(n=dn(e.parentLocale)))return cn[e.parentLocale]||(cn[e.parentLocale]=[]),cn[e.parentLocale].push({name:t,config:e}),null;r=n._config}return un[t]=new j(P(r,e)),cn[t]&&cn[t].forEach((function(t){vn(t.name,t.config)})),pn(t),un[t]}return delete un[t],null}function mn(t,e){if(null!=e){var n,r,i=sn;null!=un[t]&&null!=un[t].parentLocale?un[t].set(P(un[t]._config,e)):(null!=(r=dn(t))&&(i=r._config),e=P(i,e),null==r&&(e.abbr=t),(n=new j(e)).parentLocale=un[t],un[t]=n),pn(t)}else null!=un[t]&&(null!=un[t].parentLocale?(un[t]=un[t].parentLocale,t===pn()&&pn(t)):null!=un[t]&&delete un[t]);return un[t]}function yn(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return an;if(!o(t)){if(e=dn(t))return e;t=[t]}return hn(t)}function gn(){return k(un)}function bn(t){var e,n=t._a;return n&&-2===m(t).overflow&&(e=n[Wt]<0||n[Wt]>11?Wt:n[Ht]<1||n[Ht]>Zt(n[zt],n[Wt])?Ht:n[Gt]<0||n[Gt]>24||24===n[Gt]&&(0!==n[Yt]||0!==n[Kt]||0!==n[Qt])?Gt:n[Yt]<0||n[Yt]>59?Yt:n[Kt]<0||n[Kt]>59?Kt:n[Qt]<0||n[Qt]>999?Qt:-1,m(t)._overflowDayOfYear&&(e<zt||e>Ht)&&(e=Ht),m(t)._overflowWeeks&&-1===e&&(e=Xt),m(t)._overflowWeekday&&-1===e&&(e=$t),m(t).overflow=e),t}var wn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_n=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,En=/Z|[+-]\d\d(?::?\d\d)?/,On=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Tn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Sn=/^\/?Date\((-?\d+)/i,kn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,In={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Cn(t){var e,n,r,i,o,a,s=t._i,u=wn.exec(s)||_n.exec(s);if(u){for(m(t).iso=!0,e=0,n=On.length;e<n;e++)if(On[e][1].exec(u[1])){i=On[e][0],r=!1!==On[e][2];break}if(null==i)return void(t._isValid=!1);if(u[3]){for(e=0,n=Tn.length;e<n;e++)if(Tn[e][1].exec(u[3])){o=(u[2]||" ")+Tn[e][0];break}if(null==o)return void(t._isValid=!1)}if(!r&&null!=o)return void(t._isValid=!1);if(u[4]){if(!En.exec(u[4]))return void(t._isValid=!1);a="Z"}t._f=i+(o||"")+(a||""),Vn(t)}else t._isValid=!1}function Nn(t,e,n,r,i,o){var a=[xn(t),ee.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return o&&a.push(parseInt(o,10)),a}function xn(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function Pn(t){return t.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function jn(t,e,n){return!t||De.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}function An(t,e,n){if(t)return In[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}function Dn(t){var e,n=kn.exec(Pn(t._i));if(n){if(e=Nn(n[4],n[3],n[2],n[5],n[6],n[7]),!jn(n[1],e,t))return;t._a=e,t._tzm=An(n[8],n[9],n[10]),t._d=be.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),m(t).rfc2822=!0}else t._isValid=!1}function Rn(t){var e=Sn.exec(t._i);null===e?(Cn(t),!1===t._isValid&&(delete t._isValid,Dn(t),!1===t._isValid&&(delete t._isValid,t._strict?t._isValid=!1:r.createFromInputFallback(t)))):t._d=new Date(+e[1])}function Mn(t,e,n){return null!=t?t:null!=e?e:n}function Ln(t){var e=new Date(r.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Fn(t){var e,n,r,i,o,a=[];if(!t._d){for(r=Ln(t),t._w&&null==t._a[Ht]&&null==t._a[Wt]&&Un(t),null!=t._dayOfYear&&(o=Mn(t._a[zt],r[zt]),(t._dayOfYear>ve(o)||0===t._dayOfYear)&&(m(t)._overflowDayOfYear=!0),n=be(o,0,t._dayOfYear),t._a[Wt]=n.getUTCMonth(),t._a[Ht]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=a[e]=r[e];for(;e<7;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Gt]&&0===t._a[Yt]&&0===t._a[Kt]&&0===t._a[Qt]&&(t._nextDay=!0,t._a[Gt]=0),t._d=(t._useUTC?be:ge).apply(null,a),i=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Gt]=24),t._w&&"undefined"!==typeof t._w.d&&t._w.d!==i&&(m(t).weekdayMismatch=!0)}}function Un(t){var e,n,r,i,o,a,s,u,c;null!=(e=t._w).GG||null!=e.W||null!=e.E?(o=1,a=4,n=Mn(e.GG,t._a[zt],Ee(Kn(),1,4).year),r=Mn(e.W,1),((i=Mn(e.E,1))<1||i>7)&&(u=!0)):(o=t._locale._week.dow,a=t._locale._week.doy,c=Ee(Kn(),o,a),n=Mn(e.gg,t._a[zt],c.year),r=Mn(e.w,c.week),null!=e.d?((i=e.d)<0||i>6)&&(u=!0):null!=e.e?(i=e.e+o,(e.e<0||e.e>6)&&(u=!0)):i=o),r<1||r>Oe(n,o,a)?m(t)._overflowWeeks=!0:null!=u?m(t)._overflowWeekday=!0:(s=_e(n,r,i,o,a),t._a[zt]=s.year,t._dayOfYear=s.dayOfYear)}function Vn(t){if(t._f!==r.ISO_8601)if(t._f!==r.RFC_2822){t._a=[],m(t).empty=!0;var e,n,i,o,a,s,u=""+t._i,c=u.length,l=0;for(i=W(t._f,t._locale).match(M)||[],e=0;e<i.length;e++)o=i[e],(n=(u.match(Rt(o,t))||[])[0])&&((a=u.substr(0,u.indexOf(n))).length>0&&m(t).unusedInput.push(a),u=u.slice(u.indexOf(n)+n.length),l+=n.length),U[o]?(n?m(t).empty=!1:m(t).unusedTokens.push(o),Bt(o,n,t)):t._strict&&!n&&m(t).unusedTokens.push(o);m(t).charsLeftOver=c-l,u.length>0&&m(t).unusedInput.push(u),t._a[Gt]<=12&&!0===m(t).bigHour&&t._a[Gt]>0&&(m(t).bigHour=void 0),m(t).parsedDateParts=t._a.slice(0),m(t).meridiem=t._meridiem,t._a[Gt]=Bn(t._locale,t._a[Gt],t._meridiem),null!==(s=m(t).era)&&(t._a[zt]=t._locale.erasConvertYear(s,t._a[zt])),Fn(t),bn(t)}else Dn(t);else Cn(t)}function Bn(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0),e):e}function qn(t){var e,n,r,i,o,a,s=!1;if(0===t._f.length)return m(t).invalidFormat=!0,void(t._d=new Date(NaN));for(i=0;i<t._f.length;i++)o=0,a=!1,e=_({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],Vn(e),y(e)&&(a=!0),o+=m(e).charsLeftOver,o+=10*m(e).unusedTokens.length,m(e).score=o,s?o<r&&(r=o,n=e):(null==r||o<r||a)&&(r=o,n=e,a&&(s=!0));d(t,n||e)}function zn(t){if(!t._d){var e=it(t._i),n=void 0===e.day?e.date:e.day;t._a=h([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),Fn(t)}}function Wn(t){var e=new E(bn(Hn(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Hn(t){var e=t._i,n=t._f;return t._locale=t._locale||yn(t._l),null===e||void 0===n&&""===e?g({nullInput:!0}):("string"===typeof e&&(t._i=e=t._locale.preparse(e)),O(e)?new E(bn(e)):(f(e)?t._d=e:o(n)?qn(t):n?Vn(t):Gn(t),y(t)||(t._d=null),t))}function Gn(t){var e=t._i;c(e)?t._d=new Date(r.now()):f(e)?t._d=new Date(e.valueOf()):"string"===typeof e?Rn(t):o(e)?(t._a=h(e.slice(0),(function(t){return parseInt(t,10)})),Fn(t)):a(e)?zn(t):l(e)?t._d=new Date(e):r.createFromInputFallback(t)}function Yn(t,e,n,r,i){var s={};return!0!==e&&!1!==e||(r=e,e=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(a(t)&&u(t)||o(t)&&0===t.length)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=t,s._f=e,s._strict=r,Wn(s)}function Kn(t,e,n,r){return Yn(t,e,n,r,!1)}r.createFromInputFallback=S("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),r.ISO_8601=function(){},r.RFC_2822=function(){};var Qn=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Kn.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:g()})),Xn=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Kn.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:g()}));function $n(t,e){var n,r;if(1===e.length&&o(e[0])&&(e=e[0]),!e.length)return Kn();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}function Jn(){return $n("isBefore",[].slice.call(arguments,0))}function Zn(){return $n("isAfter",[].slice.call(arguments,0))}var tr=function(){return Date.now?Date.now():+new Date},er=["year","quarter","month","week","day","hour","minute","second","millisecond"];function nr(t){var e,n,r=!1;for(e in t)if(s(t,e)&&(-1===qt.call(er,e)||null!=t[e]&&isNaN(t[e])))return!1;for(n=0;n<er.length;++n)if(t[er[n]]){if(r)return!1;parseFloat(t[er[n]])!==lt(t[er[n]])&&(r=!0)}return!0}function rr(){return this._isValid}function ir(){return Ir(NaN)}function or(t){var e=it(t),n=e.year||0,r=e.quarter||0,i=e.month||0,o=e.week||e.isoWeek||0,a=e.day||0,s=e.hour||0,u=e.minute||0,c=e.second||0,l=e.millisecond||0;this._isValid=nr(e),this._milliseconds=+l+1e3*c+6e4*u+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=yn(),this._bubble()}function ar(t){return t instanceof or}function sr(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function ur(t,e,n){var r,i=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),a=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&<(t[r])!==lt(e[r]))&&a++;return a+o}function cr(t,e){V(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+R(~~(t/60),2)+e+R(~~t%60,2)}))}cr("Z",":"),cr("ZZ",""),Dt("Z",Pt),Dt("ZZ",Pt),Ut(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=fr(Pt,t)}));var lr=/([\+\-]|\d\d)/gi;function fr(t,e){var n,r,i=(e||"").match(t);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(lr)||["-",0,0])[1]+lt(n[2]))?0:"+"===n[0]?r:-r}function hr(t,e){var n,i;return e._isUTC?(n=e.clone(),i=(O(t)||f(t)?t.valueOf():Kn(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):Kn(t).local()}function dr(t){return-Math.round(t._d.getTimezoneOffset())}function pr(t,e,n){var i,o=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"===typeof t){if(null===(t=fr(Pt,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(i=dr(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==t&&(!e||this._changeInProgress?jr(this,Ir(t-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:dr(this)}function vr(t,e){return null!=t?("string"!==typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function mr(t){return this.utcOffset(0,t)}function yr(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(dr(this),"m")),this}function gr(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var t=fr(xt,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this}function br(t){return!!this.isValid()&&(t=t?Kn(t).utcOffset():0,(this.utcOffset()-t)%60===0)}function wr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function _r(){if(!c(this._isDSTShifted))return this._isDSTShifted;var t,e={};return _(e,this),(e=Hn(e))._a?(t=e._isUTC?p(e._a):Kn(e._a),this._isDSTShifted=this.isValid()&&ur(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Er(){return!!this.isValid()&&!this._isUTC}function Or(){return!!this.isValid()&&this._isUTC}function Tr(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Sr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,kr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ir(t,e){var n,r,i,o=t,a=null;return ar(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:l(t)||!isNaN(+t)?(o={},e?o[e]=+t:o.milliseconds=+t):(a=Sr.exec(t))?(n="-"===a[1]?-1:1,o={y:0,d:lt(a[Ht])*n,h:lt(a[Gt])*n,m:lt(a[Yt])*n,s:lt(a[Kt])*n,ms:lt(sr(1e3*a[Qt]))*n}):(a=kr.exec(t))?(n="-"===a[1]?-1:1,o={y:Cr(a[2],n),M:Cr(a[3],n),w:Cr(a[4],n),d:Cr(a[5],n),h:Cr(a[6],n),m:Cr(a[7],n),s:Cr(a[8],n)}):null==o?o={}:"object"===typeof o&&("from"in o||"to"in o)&&(i=xr(Kn(o.from),Kn(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),r=new or(o),ar(t)&&s(t,"_locale")&&(r._locale=t._locale),ar(t)&&s(t,"_isValid")&&(r._isValid=t._isValid),r}function Cr(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Nr(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function xr(t,e){var n;return t.isValid()&&e.isValid()?(e=hr(e,t),t.isBefore(e)?n=Nr(t,e):((n=Nr(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Pr(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(C(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),jr(this,Ir(n,r),t),this}}function jr(t,e,n,i){var o=e._milliseconds,a=sr(e._days),s=sr(e._months);t.isValid()&&(i=null==i||i,s&&ce(t,ht(t,"Month")+s*n),a&&dt(t,"Date",ht(t,"Date")+a*n),o&&t._d.setTime(t._d.valueOf()+o*n),i&&r.updateOffset(t,a||s))}Ir.fn=or.prototype,Ir.invalid=ir;var Ar=Pr(1,"add"),Dr=Pr(-1,"subtract");function Rr(t){return"string"===typeof t||t instanceof String}function Mr(t){return O(t)||f(t)||Rr(t)||l(t)||Fr(t)||Lr(t)||null===t||void 0===t}function Lr(t){var e,n,r=a(t)&&!u(t),i=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(e=0;e<o.length;e+=1)n=o[e],i=i||s(t,n);return r&&i}function Fr(t){var e=o(t),n=!1;return e&&(n=0===t.filter((function(e){return!l(e)&&Rr(t)})).length),e&&n}function Ur(t){var e,n,r=a(t)&&!u(t),i=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(e=0;e<o.length;e+=1)n=o[e],i=i||s(t,n);return r&&i}function Vr(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Br(t,e){1===arguments.length&&(arguments[0]?Mr(arguments[0])?(t=arguments[0],e=void 0):Ur(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||Kn(),i=hr(n,this).startOf("day"),o=r.calendarFormat(this,i)||"sameElse",a=e&&(N(e[o])?e[o].call(this,n):e[o]);return this.format(a||this.localeData().calendar(o,this,Kn(n)))}function qr(){return new E(this)}function zr(t,e){var n=O(t)?t:Kn(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=rt(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())}function Wr(t,e){var n=O(t)?t:Kn(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=rt(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())}function Hr(t,e,n,r){var i=O(t)?t:Kn(t),o=O(e)?e:Kn(e);return!!(this.isValid()&&i.isValid()&&o.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(o,n):!this.isAfter(o,n))}function Gr(t,e){var n,r=O(t)?t:Kn(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=rt(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))}function Yr(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function Kr(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function Qr(t,e,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=hr(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=rt(e)){case"year":o=Xr(this,r)/12;break;case"month":o=Xr(this,r);break;case"quarter":o=Xr(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:ct(o)}function Xr(t,e){if(t.date()<e.date())return-Xr(e,t);var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return-(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r)))||0}function $r(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Jr(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?z(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):N(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",z(n,"Z")):z(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Zr(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,n,r,i="moment",o="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),t="["+i+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=o+'[")]',this.format(t+e+n+r)}function ti(t){t||(t=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var e=z(this,t);return this.localeData().postformat(e)}function ei(t,e){return this.isValid()&&(O(t)&&t.isValid()||Kn(t).isValid())?Ir({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ni(t){return this.from(Kn(),t)}function ri(t,e){return this.isValid()&&(O(t)&&t.isValid()||Kn(t).isValid())?Ir({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ii(t){return this.to(Kn(),t)}function oi(t){var e;return void 0===t?this._locale._abbr:(null!=(e=yn(t))&&(this._locale=e),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ai=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function si(){return this._locale}var ui=1e3,ci=60*ui,li=60*ci,fi=3506328*li;function hi(t,e){return(t%e+e)%e}function di(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-fi:new Date(t,e,n).valueOf()}function pi(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-fi:Date.UTC(t,e,n)}function vi(t){var e,n;if(void 0===(t=rt(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?pi:di,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=hi(e+(this._isUTC?0:this.utcOffset()*ci),li);break;case"minute":e=this._d.valueOf(),e-=hi(e,ci);break;case"second":e=this._d.valueOf(),e-=hi(e,ui)}return this._d.setTime(e),r.updateOffset(this,!0),this}function mi(t){var e,n;if(void 0===(t=rt(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?pi:di,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=li-hi(e+(this._isUTC?0:this.utcOffset()*ci),li)-1;break;case"minute":e=this._d.valueOf(),e+=ci-hi(e,ci)-1;break;case"second":e=this._d.valueOf(),e+=ui-hi(e,ui)-1}return this._d.setTime(e),r.updateOffset(this,!0),this}function yi(){return this._d.valueOf()-6e4*(this._offset||0)}function gi(){return Math.floor(this.valueOf()/1e3)}function bi(){return new Date(this.valueOf())}function wi(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function _i(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Ei(){return this.isValid()?this.toISOString():null}function Oi(){return y(this)}function Ti(){return d({},m(this))}function Si(){return m(this).overflow}function ki(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ii(t,e){var n,i,o,a=this._eras||yn("en")._eras;for(n=0,i=a.length;n<i;++n){switch(typeof a[n].since){case"string":o=r(a[n].since).startOf("day"),a[n].since=o.valueOf()}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":o=r(a[n].until).startOf("day").valueOf(),a[n].until=o.valueOf()}}return a}function Ci(t,e,n){var r,i,o,a,s,u=this.eras();for(t=t.toUpperCase(),r=0,i=u.length;r<i;++r)if(o=u[r].name.toUpperCase(),a=u[r].abbr.toUpperCase(),s=u[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(a===t)return u[r];break;case"NNNN":if(o===t)return u[r];break;case"NNNNN":if(s===t)return u[r]}else if([o,a,s].indexOf(t)>=0)return u[r]}function Ni(t,e){var n=t.since<=t.until?1:-1;return void 0===e?r(t.since).year():r(t.since).year()+(e-t.offset)*n}function xi(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until)return r[t].name;if(r[t].until<=n&&n<=r[t].since)return r[t].name}return""}function Pi(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until)return r[t].narrow;if(r[t].until<=n&&n<=r[t].since)return r[t].narrow}return""}function ji(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until)return r[t].abbr;if(r[t].until<=n&&n<=r[t].since)return r[t].abbr}return""}function Ai(){var t,e,n,i,o=this.localeData().eras();for(t=0,e=o.length;t<e;++t)if(n=o[t].since<=o[t].until?1:-1,i=this.clone().startOf("day").valueOf(),o[t].since<=i&&i<=o[t].until||o[t].until<=i&&i<=o[t].since)return(this.year()-r(o[t].since).year())*n+o[t].offset;return this.year()}function Di(t){return s(this,"_erasNameRegex")||Bi.call(this),t?this._erasNameRegex:this._erasRegex}function Ri(t){return s(this,"_erasAbbrRegex")||Bi.call(this),t?this._erasAbbrRegex:this._erasRegex}function Mi(t){return s(this,"_erasNarrowRegex")||Bi.call(this),t?this._erasNarrowRegex:this._erasRegex}function Li(t,e){return e.erasAbbrRegex(t)}function Fi(t,e){return e.erasNameRegex(t)}function Ui(t,e){return e.erasNarrowRegex(t)}function Vi(t,e){return e._eraYearOrdinalRegex||Ct}function Bi(){var t,e,n=[],r=[],i=[],o=[],a=this.eras();for(t=0,e=a.length;t<e;++t)r.push(Lt(a[t].name)),n.push(Lt(a[t].abbr)),i.push(Lt(a[t].narrow)),o.push(Lt(a[t].name)),o.push(Lt(a[t].abbr)),o.push(Lt(a[t].narrow));this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}function qi(t,e){V(0,[t,t.length],0,e)}function zi(t){return Qi.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Wi(t){return Qi.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Hi(){return Oe(this.year(),1,4)}function Gi(){return Oe(this.isoWeekYear(),1,4)}function Yi(){var t=this.localeData()._week;return Oe(this.year(),t.dow,t.doy)}function Ki(){var t=this.localeData()._week;return Oe(this.weekYear(),t.dow,t.doy)}function Qi(t,e,n,r,i){var o;return null==t?Ee(this,r,i).year:(e>(o=Oe(t,r,i))&&(e=o),Xi.call(this,t,e,n,r,i))}function Xi(t,e,n,r,i){var o=_e(t,e,n,r,i),a=be(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function $i(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}V("N",0,0,"eraAbbr"),V("NN",0,0,"eraAbbr"),V("NNN",0,0,"eraAbbr"),V("NNNN",0,0,"eraName"),V("NNNNN",0,0,"eraNarrow"),V("y",["y",1],"yo","eraYear"),V("y",["yy",2],0,"eraYear"),V("y",["yyy",3],0,"eraYear"),V("y",["yyyy",4],0,"eraYear"),Dt("N",Li),Dt("NN",Li),Dt("NNN",Li),Dt("NNNN",Fi),Dt("NNNNN",Ui),Ut(["N","NN","NNN","NNNN","NNNNN"],(function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?m(n).era=i:m(n).invalidEra=t})),Dt("y",Ct),Dt("yy",Ct),Dt("yyy",Ct),Dt("yyyy",Ct),Dt("yo",Vi),Ut(["y","yy","yyy","yyyy"],zt),Ut(["yo"],(function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[zt]=n._locale.eraYearOrdinalParse(t,i):e[zt]=parseInt(t,10)})),V(0,["gg",2],0,(function(){return this.weekYear()%100})),V(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),qi("gggg","weekYear"),qi("ggggg","weekYear"),qi("GGGG","isoWeekYear"),qi("GGGGG","isoWeekYear"),nt("weekYear","gg"),nt("isoWeekYear","GG"),at("weekYear",1),at("isoWeekYear",1),Dt("G",Nt),Dt("g",Nt),Dt("GG",Et,gt),Dt("gg",Et,gt),Dt("GGGG",kt,wt),Dt("gggg",kt,wt),Dt("GGGGG",It,_t),Dt("ggggg",It,_t),Vt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=lt(t)})),Vt(["gg","GG"],(function(t,e,n,i){e[i]=r.parseTwoDigitYear(t)})),V("Q",0,"Qo","quarter"),nt("quarter","Q"),at("quarter",7),Dt("Q",yt),Ut("Q",(function(t,e){e[Wt]=3*(lt(t)-1)})),V("D",["DD",2],"Do","date"),nt("date","D"),at("date",9),Dt("D",Et),Dt("DD",Et,gt),Dt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),Ut(["D","DD"],Ht),Ut("Do",(function(t,e){e[Ht]=lt(t.match(Et)[0])}));var Ji=ft("Date",!0);function Zi(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}V("DDD",["DDDD",3],"DDDo","dayOfYear"),nt("dayOfYear","DDD"),at("dayOfYear",4),Dt("DDD",St),Dt("DDDD",bt),Ut(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=lt(t)})),V("m",["mm",2],0,"minute"),nt("minute","m"),at("minute",14),Dt("m",Et),Dt("mm",Et,gt),Ut(["m","mm"],Yt);var to=ft("Minutes",!1);V("s",["ss",2],0,"second"),nt("second","s"),at("second",15),Dt("s",Et),Dt("ss",Et,gt),Ut(["s","ss"],Kt);var eo,no,ro=ft("Seconds",!1);for(V("S",0,0,(function(){return~~(this.millisecond()/100)})),V(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),V(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),V(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),V(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),V(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),V(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),nt("millisecond","ms"),at("millisecond",16),Dt("S",St,yt),Dt("SS",St,gt),Dt("SSS",St,bt),eo="SSSS";eo.length<=9;eo+="S")Dt(eo,Ct);function io(t,e){e[Qt]=lt(1e3*("0."+t))}for(eo="S";eo.length<=9;eo+="S")Ut(eo,io);function oo(){return this._isUTC?"UTC":""}function ao(){return this._isUTC?"Coordinated Universal Time":""}no=ft("Milliseconds",!1),V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");var so=E.prototype;function uo(t){return Kn(1e3*t)}function co(){return Kn.apply(null,arguments).parseZone()}function lo(t){return t}so.add=Ar,so.calendar=Br,so.clone=qr,so.diff=Qr,so.endOf=mi,so.format=ti,so.from=ei,so.fromNow=ni,so.to=ri,so.toNow=ii,so.get=pt,so.invalidAt=Si,so.isAfter=zr,so.isBefore=Wr,so.isBetween=Hr,so.isSame=Gr,so.isSameOrAfter=Yr,so.isSameOrBefore=Kr,so.isValid=Oi,so.lang=ai,so.locale=oi,so.localeData=si,so.max=Xn,so.min=Qn,so.parsingFlags=Ti,so.set=vt,so.startOf=vi,so.subtract=Dr,so.toArray=wi,so.toObject=_i,so.toDate=bi,so.toISOString=Jr,so.inspect=Zr,"undefined"!==typeof Symbol&&null!=Symbol.for&&(so[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),so.toJSON=Ei,so.toString=$r,so.unix=gi,so.valueOf=yi,so.creationData=ki,so.eraName=xi,so.eraNarrow=Pi,so.eraAbbr=ji,so.eraYear=Ai,so.year=me,so.isLeapYear=ye,so.weekYear=zi,so.isoWeekYear=Wi,so.quarter=so.quarters=$i,so.month=le,so.daysInMonth=fe,so.week=so.weeks=Ce,so.isoWeek=so.isoWeeks=Ne,so.weeksInYear=Yi,so.weeksInWeekYear=Ki,so.isoWeeksInYear=Hi,so.isoWeeksInISOWeekYear=Gi,so.date=Ji,so.day=so.days=We,so.weekday=He,so.isoWeekday=Ge,so.dayOfYear=Zi,so.hour=so.hours=rn,so.minute=so.minutes=to,so.second=so.seconds=ro,so.millisecond=so.milliseconds=no,so.utcOffset=pr,so.utc=mr,so.local=yr,so.parseZone=gr,so.hasAlignedHourOffset=br,so.isDST=wr,so.isLocal=Er,so.isUtcOffset=Or,so.isUtc=Tr,so.isUTC=Tr,so.zoneAbbr=oo,so.zoneName=ao,so.dates=S("dates accessor is deprecated. Use date instead.",Ji),so.months=S("months accessor is deprecated. Use month instead",le),so.years=S("years accessor is deprecated. Use year instead",me),so.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",vr),so.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",_r);var fo=j.prototype;function ho(t,e,n,r){var i=yn(),o=p().set(r,e);return i[n](o,t)}function po(t,e,n){if(l(t)&&(e=t,t=void 0),t=t||"",null!=e)return ho(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=ho(t,r,n,"month");return i}function vo(t,e,n,r){"boolean"===typeof t?(l(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,l(e)&&(n=e,e=void 0),e=e||"");var i,o=yn(),a=t?o._week.dow:0,s=[];if(null!=n)return ho(e,(n+a)%7,r,"day");for(i=0;i<7;i++)s[i]=ho(e,(i+a)%7,r,"day");return s}function mo(t,e){return po(t,e,"months")}function yo(t,e){return po(t,e,"monthsShort")}function go(t,e,n){return vo(t,e,n,"weekdays")}function bo(t,e,n){return vo(t,e,n,"weekdaysShort")}function wo(t,e,n){return vo(t,e,n,"weekdaysMin")}fo.calendar=D,fo.longDateFormat=G,fo.invalidDate=K,fo.ordinal=$,fo.preparse=lo,fo.postformat=lo,fo.relativeTime=Z,fo.pastFuture=tt,fo.set=x,fo.eras=Ii,fo.erasParse=Ci,fo.erasConvertYear=Ni,fo.erasAbbrRegex=Ri,fo.erasNameRegex=Di,fo.erasNarrowRegex=Mi,fo.months=oe,fo.monthsShort=ae,fo.monthsParse=ue,fo.monthsRegex=de,fo.monthsShortRegex=he,fo.week=Te,fo.firstDayOfYear=Ie,fo.firstDayOfWeek=ke,fo.weekdays=Ue,fo.weekdaysMin=Be,fo.weekdaysShort=Ve,fo.weekdaysParse=ze,fo.weekdaysRegex=Ye,fo.weekdaysShortRegex=Ke,fo.weekdaysMinRegex=Qe,fo.isPM=en,fo.meridiem=on,pn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===lt(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),r.lang=S("moment.lang is deprecated. Use moment.locale instead.",pn),r.langData=S("moment.langData is deprecated. Use moment.localeData instead.",yn);var _o=Math.abs;function Eo(){var t=this._data;return this._milliseconds=_o(this._milliseconds),this._days=_o(this._days),this._months=_o(this._months),t.milliseconds=_o(t.milliseconds),t.seconds=_o(t.seconds),t.minutes=_o(t.minutes),t.hours=_o(t.hours),t.months=_o(t.months),t.years=_o(t.years),this}function Oo(t,e,n,r){var i=Ir(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function To(t,e){return Oo(this,t,e,1)}function So(t,e){return Oo(this,t,e,-1)}function ko(t){return t<0?Math.floor(t):Math.ceil(t)}function Io(){var t,e,n,r,i,o=this._milliseconds,a=this._days,s=this._months,u=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*ko(No(s)+a),a=0,s=0),u.milliseconds=o%1e3,t=ct(o/1e3),u.seconds=t%60,e=ct(t/60),u.minutes=e%60,n=ct(e/60),u.hours=n%24,a+=ct(n/24),s+=i=ct(Co(a)),a-=ko(No(i)),r=ct(s/12),s%=12,u.days=a,u.months=s,u.years=r,this}function Co(t){return 4800*t/146097}function No(t){return 146097*t/4800}function xo(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=rt(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+Co(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(No(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}}function Po(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*lt(this._months/12):NaN}function jo(t){return function(){return this.as(t)}}var Ao=jo("ms"),Do=jo("s"),Ro=jo("m"),Mo=jo("h"),Lo=jo("d"),Fo=jo("w"),Uo=jo("M"),Vo=jo("Q"),Bo=jo("y");function qo(){return Ir(this)}function zo(t){return t=rt(t),this.isValid()?this[t+"s"]():NaN}function Wo(t){return function(){return this.isValid()?this._data[t]:NaN}}var Ho=Wo("milliseconds"),Go=Wo("seconds"),Yo=Wo("minutes"),Ko=Wo("hours"),Qo=Wo("days"),Xo=Wo("months"),$o=Wo("years");function Jo(){return ct(this.days()/7)}var Zo=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ea(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function na(t,e,n,r){var i=Ir(t).abs(),o=Zo(i.as("s")),a=Zo(i.as("m")),s=Zo(i.as("h")),u=Zo(i.as("d")),c=Zo(i.as("M")),l=Zo(i.as("w")),f=Zo(i.as("y")),h=o<=n.ss&&["s",o]||o<n.s&&["ss",o]||a<=1&&["m"]||a<n.m&&["mm",a]||s<=1&&["h"]||s<n.h&&["hh",s]||u<=1&&["d"]||u<n.d&&["dd",u];return null!=n.w&&(h=h||l<=1&&["w"]||l<n.w&&["ww",l]),(h=h||c<=1&&["M"]||c<n.M&&["MM",c]||f<=1&&["y"]||["yy",f])[2]=e,h[3]=+t>0,h[4]=r,ea.apply(null,h)}function ra(t){return void 0===t?Zo:"function"===typeof t&&(Zo=t,!0)}function ia(t,e){return void 0!==ta[t]&&(void 0===e?ta[t]:(ta[t]=e,"s"===t&&(ta.ss=e-1),!0))}function oa(t,e){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,o=ta;return"object"===typeof t&&(e=t,t=!1),"boolean"===typeof t&&(i=t),"object"===typeof e&&(o=Object.assign({},ta,e),null!=e.s&&null==e.ss&&(o.ss=e.s-1)),r=na(this,!i,o,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var aa=Math.abs;function sa(t){return(t>0)-(t<0)||+t}function ua(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,r,i,o,a,s,u=aa(this._milliseconds)/1e3,c=aa(this._days),l=aa(this._months),f=this.asSeconds();return f?(t=ct(u/60),e=ct(t/60),u%=60,t%=60,n=ct(l/12),l%=12,r=u?u.toFixed(3).replace(/\.?0+$/,""):"",i=f<0?"-":"",o=sa(this._months)!==sa(f)?"-":"",a=sa(this._days)!==sa(f)?"-":"",s=sa(this._milliseconds)!==sa(f)?"-":"",i+"P"+(n?o+n+"Y":"")+(l?o+l+"M":"")+(c?a+c+"D":"")+(e||t||u?"T":"")+(e?s+e+"H":"")+(t?s+t+"M":"")+(u?s+r+"S":"")):"P0D"}var ca=or.prototype;return ca.isValid=rr,ca.abs=Eo,ca.add=To,ca.subtract=So,ca.as=xo,ca.asMilliseconds=Ao,ca.asSeconds=Do,ca.asMinutes=Ro,ca.asHours=Mo,ca.asDays=Lo,ca.asWeeks=Fo,ca.asMonths=Uo,ca.asQuarters=Vo,ca.asYears=Bo,ca.valueOf=Po,ca._bubble=Io,ca.clone=qo,ca.get=zo,ca.milliseconds=Ho,ca.seconds=Go,ca.minutes=Yo,ca.hours=Ko,ca.days=Qo,ca.weeks=Jo,ca.months=Xo,c
2a.years=$o,ca.humanize=oa,ca.toISOString=ua,ca.toString=ua,ca.toJSON=ua,ca.locale=oi,ca.localeData=si,ca.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ua),ca.lang=ai,V("X",0,0,"unix"),V("x",0,0,"valueOf"),Dt("x",Nt),Dt("X",jt),Ut("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t))})),Ut("x",(function(t,e,n){n._d=new Date(lt(t))})),r.version="2.29.1",i(Kn),r.fn=so,r.min=Jn,r.max=Zn,r.now=tr,r.utc=p,r.unix=uo,r.months=mo,r.isDate=f,r.locale=pn,r.invalid=g,r.duration=Ir,r.isMoment=O,r.weekdays=go,r.parseZone=co,r.localeData=yn,r.isDuration=ar,r.monthsShort=yo,r.weekdaysMin=wo,r.defineLocale=vn,r.updateLocale=mn,r.locales=gn,r.weekdaysShort=bo,r.normalizeUnits=rt,r.relativeTimeRounding=ra,r.relativeTimeThreshold=ia,r.calendarFormat=Vr,r.prototype=so,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}).call(this,n(86)(t))},function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return B}));var r=n(4),i=n.n(r),o=(n(3),i.a.createContext(null));var a=function(t){t()},s={notify:function(){}};function u(){var t=a,e=null,n=null;return{clear:function(){e=null,n=null},notify:function(){t((function(){for(var t=e;t;)t.callback(),t=t.next}))},get:function(){for(var t=[],n=e;n;)t.push(n),n=n.next;return t},subscribe:function(t){var r=!0,i=n={callback:t,next:null,prev:n};return i.prev?i.prev.next=i:e=i,function(){r&&null!==e&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var c=function(){function t(t,e){this.store=t,this.parentSub=e,this.unsubscribe=null,this.listeners=s,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var e=t.prototype;return e.addNestedSub=function(t){return this.trySubscribe(),this.listeners.subscribe(t)},e.notifyNestedSubs=function(){this.listeners.notify()},e.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},e.isSubscribed=function(){return Boolean(this.unsubscribe)},e.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=u())},e.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=s)},t}();var l=function(t){var e=t.store,n=t.context,a=t.children,s=Object(r.useMemo)((function(){var t=new c(e);return t.onStateChange=t.notifyNestedSubs,{store:e,subscription:t}}),[e]),u=Object(r.useMemo)((function(){return e.getState()}),[e]);Object(r.useEffect)((function(){var t=s.subscription;return t.trySubscribe(),u!==e.getState()&&t.notifyNestedSubs(),function(){t.tryUnsubscribe(),t.onStateChange=null}}),[s,u]);var l=n||o;return i.a.createElement(l.Provider,{value:s},a)},f=n(7),h=n(9),d=n(39),p=n.n(d),v=n(42),m="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?r.useLayoutEffect:r.useEffect,y=[],g=[null,null];function b(t,e){var n=t[1];return[e.payload,n+1]}function w(t,e,n){m((function(){return t.apply(void 0,e)}),n)}function _(t,e,n,r,i,o,a){t.current=r,e.current=i,n.current=!1,o.current&&(o.current=null,a())}function E(t,e,n,r,i,o,a,s,u,c){if(t){var l=!1,f=null,h=function(){if(!l){var t,n,h=e.getState();try{t=r(h,i.current)}catch(d){n=d,f=d}n||(f=null),t===o.current?a.current||u():(o.current=t,s.current=t,a.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=h,n.trySubscribe(),h();return function(){if(l=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}}var O=function(){return[null,0]};function T(t,e){void 0===e&&(e={});var n=e,a=n.getDisplayName,s=void 0===a?function(t){return"ConnectAdvanced("+t+")"}:a,u=n.methodName,l=void 0===u?"connectAdvanced":u,d=n.renderCountProp,m=void 0===d?void 0:d,T=n.shouldHandleStateChanges,S=void 0===T||T,k=n.storeKey,I=void 0===k?"store":k,C=(n.withRef,n.forwardRef),N=void 0!==C&&C,x=n.context,P=void 0===x?o:x,j=Object(h.a)(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),A=P;return function(e){var n=e.displayName||e.name||"Component",o=s(n),a=Object(f.a)({},j,{getDisplayName:s,methodName:l,renderCountProp:m,shouldHandleStateChanges:S,storeKey:I,displayName:o,wrappedComponentName:n,WrappedComponent:e}),u=j.pure;var d=u?r.useMemo:function(t){return t()};function T(n){var o=Object(r.useMemo)((function(){var t=n.reactReduxForwardedRef,e=Object(h.a)(n,["reactReduxForwardedRef"]);return[n.context,t,e]}),[n]),s=o[0],u=o[1],l=o[2],p=Object(r.useMemo)((function(){return s&&s.Consumer&&Object(v.isContextConsumer)(i.a.createElement(s.Consumer,null))?s:A}),[s,A]),m=Object(r.useContext)(p),T=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(m)&&Boolean(m.store);var k=T?n.store:m.store,I=Object(r.useMemo)((function(){return function(e){return t(e.dispatch,a)}(k)}),[k]),C=Object(r.useMemo)((function(){if(!S)return g;var t=new c(k,T?null:m.subscription),e=t.notifyNestedSubs.bind(t);return[t,e]}),[k,T,m]),N=C[0],x=C[1],P=Object(r.useMemo)((function(){return T?m:Object(f.a)({},m,{subscription:N})}),[T,m,N]),j=Object(r.useReducer)(b,y,O),D=j[0][0],R=j[1];if(D&&D.error)throw D.error;var M=Object(r.useRef)(),L=Object(r.useRef)(l),F=Object(r.useRef)(),U=Object(r.useRef)(!1),V=d((function(){return F.current&&l===L.current?F.
2current:I(k.getState(),l)}),[k,D,l]);w(_,[L,M,U,l,V,F,x]),w(E,[S,k,N,I,L,M,U,F,x,R],[k,N,I]);var B=Object(r.useMemo)((function(){return i.a.createElement(e,Object(f.a)({},V,{ref:u}))}),[u,e,V]);return Object(r.useMemo)((function(){return S?i.a.createElement(p.Provider,{value:P},B):B}),[p,B,P])}var k=u?i.a.memo(T):T;if(k.WrappedComponent=e,k.displayName=o,N){var C=i.a.forwardRef((function(t,e){return i.a.createElement(k,Object(f.a)({},t,{reactReduxForwardedRef:e}))}));return C.displayName=o,C.WrappedComponent=e,p()(C,e)}return p()(k,e)}}function S(t,e){return t===e?0!==t||0!==e||1/t===1/e:t!==t&&e!==e}function k(t,e){if(S(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(e,n[i])||!S(t[n[i]],e[n[i]]))return!1;return!0}var I=n(32);function C(t){return function(e,n){var r=t(e,n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function N(t){return null!==t.dependsOnOwnProps&&void 0!==t.dependsOnOwnProps?Boolean(t.dependsOnOwnProps):1!==t.length}
2function x(t,e){return function(e,n){n.displayName;var r=function(t,e){return r.dependsOnOwnProps?r.mapToProps(t,e):r.mapToProps(t)};return r.dependsOnOwnProps=!0,r.mapToProps=function(e,n){r.mapToProps=t,r.dependsOnOwnProps=N(t);var i=r(e,n);return"function"===typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=N(i),i=r(e,n)),i},r}}var P=[function(t){return"function"===typeof t?x(t):void 0},function(t){return t?void 0:C((function(t){return{dispatch:t}}))},function(t){return t&&"object"===typeof t?C((function(e){return Object(I.b)(t,e)})):void 0}];var j=[function(t){return"function"===typeof t?x(t):void 0},function(t){return t?void 0:C((function(){return{}}))}];function A(t,e,n){return Object(f.a)({},n,t,e)}var D=[function(t){return"function"===typeof t?function(t){return function(e,n){n.displayName;var r,i=n.pure,o=n.areMergedPropsEqual,a=!1;return function(e,n,s){var u=t(e,n,s);return a?i&&o(u,r)||(r=u):(a=!0,r=u),r}}}(t):void 0},function(t){return t?void 0:function(){return A}}];function R(t,e,n,r){return function(i,o){return n(t(i,o),e(r,o),o)}}function M(t,e,n,r,i){var o,a,s,u,c,l=i.areStatesEqual,f=i.areOwnPropsEqual,h=i.areStatePropsEqual,d=!1;function p(i,d){var p=!f(d,a),v=!l(i,o);return o=i,a=d,p&&v?(s=t(o,a),e.dependsOnOwnProps&&(u=e(r,a)),c=n(s,u,a)):p?(t.dependsOnOwnProps&&(s=t(o,a)),e.dependsOnOwnProps&&(u=e(r,a)),c=n(s,u,a)):v?function(){var e=t(o,a),r=!h(e,s);return s=e,r&&(c=n(s,u,a)),c}():c}return function(i,l){return d?p(i,l):(s=t(o=i,a=l),u=e(r,a),c=n(s,u,a),d=!0,c)}}function L(t,e){var n=e.initMapStateToProps,r=e.initMapDispatchToProps,i=e.initMergeProps,o=Object(h.a)(e,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=n(t,o),s=r(t,o),u=i(t,o);return(o.pure?M:R)(a,s,u,t,o)}function F(t,e,n){for(var r=e.length-1;r>=0;r--){var i=e[r](t);if(i)return i}return function(e,r){throw new Error("Invalid value of type "+typeof t+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function U(t,e){return t===e}function V(t){var e=void 0===t?{}:t,n=e.connectHOC,r=void 0===n?T:n,i=e.mapStateToPropsFactories,o=void 0===i?j:i,a=e.mapDispatchToPropsFactories,s=void 0===a?P:a,u=e.mergePropsFactories,c=void 0===u?D:u,l=e.selectorFactory,d=void 0===l?L:l;return function(t,e,n,i){void 0===i&&(i={});var a=i,u=a.pure,l=void 0===u||u,p=a.areStatesEqual,v=void 0===p?U:p,m=a.areOwnPropsEqual,y=void 0===m?k:m,g=a.areStatePropsEqual,b=void 0===g?k:g,w=a.areMergedPropsEqual,_=void 0===w?k:w,E=Object(h.a)(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),O=F(t,o,"mapStateToProps"),T=F(e,s,"mapDispatchToProps"),S=F(n,c,"mergeProps");return r(d,Object(f.a)({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:O,initMapDispatchToProps:T,initMergeProps:S,pure:l,areStatesEqual:v,areOwnPropsEqual:y,areStatePropsEqual:b,areMergedPropsEqual:_},E))}}var B=V();var q,z=n(31);q=z.unstable_batchedUpdates,a=q},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return ir})),n.d(e,"b",(function(){return ar})),n.d(e,"c",(function(){return or})),n.d(e,"d",(function(){return sr})),n.d(e,"e",(function(){return ur})),n.d(e,"f",(function(){return cr})),n.d(e,"g",(function(){return nr})),n.d(e,"h",(function(){return rr}));var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function i(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var o,a="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},s=s||{},u=a||self;function c(){}function l(t){var e=typeof t;return"array"==(e="object"!=e?e:t?Array.isArray(t)?"array":e:"null")||"object"==e&&"number"==typeof t.length}function f(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}var h="closure_uid_"+(1e9*Math.random()>>>0),d=0;function p(t,e,n){return t.call.apply(t.bind,arguments)}function v(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function m(t,e,n){return(m=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?p:v).apply(null,arguments)}
2function y(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}function g(){return Date.now()}function b(t,e){function n(){}n.prototype=e.prototype,t.X=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.Kb=function(t,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return e.prototype[n].apply(t,i)}}function w(){this.j=this.j,this.i=this.i}w.prototype.j=!1,w.prototype.ja=function(){if(!this.j&&(this.j=!0,this.G(),0))(function(t){Object.prototype.hasOwnProperty.call(t,h)&&t[h]||(t[h]=++d)})(this)},w.prototype.G=function(){if(this.i)for(;this.i.length;)this.i.shift()()};var _=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if("string"===typeof t)return"string"!==typeof e||1!=e.length?-1:t.indexOf(e,0);for(var n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1},E=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,i="string"===typeof t?t.split(""):t,o=0;o<r;o++)o in i&&e.call(n,i[o],o,t)};function O(t){return Array.prototype.concat.apply([],arguments)}function T(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}function S(t){return/^[\s\xa0]*$/.test(t)}var k,I=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]};function C(t,e){return-1!=t.indexOf(e)}function N(t,e){return t<e?-1:t>e?1:0}t:{var x=u.navigator;if(x){var P=x.userAgent;if(P){k=P;break t}}k=""}function j(t,e,n){for(var r in t)e.call(n,t[r],r,t)}function A(t){var e={};for(var n in t)e[n]=t[n];return e}var D="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function R(t,e){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o<D.length;o++)n=D[o],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function M(t){return M[" "](t),t}M[" "]=c;var L,F=C(k,"Opera"),U=C(k,"Trident")||C(k,"MSIE"),V=C(k,"Edge"),B=V||U,q=C(k,"Gecko")&&!(C(k.toLowerCase(),"webkit")&&!C(k,"Edge"))&&!(C(k,"Trident")||C(k,"MSIE"))&&!C(k,"Edge"),z=C(k.toLowerCase(),"webkit")&&!C(k,"Edge");function W(){var t=u.document;return t?t.documentMode:void 0}t:{var H="",G=function(){var t=k;return q?/rv:([^\);]+)(\)|;)/.exec(t):V?/Edge\/([\d\.]+)/.exec(t):U?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t):z?/WebKit\/(\S+)/.exec(t):F?/(?:Version)[ \/]?(\S+)/.exec(t):void 0}();if(G&&(H=G?G[1]:""),U){var Y=W();if(null!=Y&&Y>parseFloat(H)){L=String(Y);break t}}L=H}var K,Q={};function X(t){return function(t,e){var n=Q;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}(t,(function(){for(var e=0,n=I(String(L)).split("."),r=I(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&o<i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;e=N(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||N(0==a[2].length,0==s[2].length)||N(a[2],s[2]),a=a[3],s=s[3]}while(0==e)}return 0<=e}))}if(u.document&&U){var $=W();K=$||(parseInt(L,10)||void 0)}else K=void 0;var J=K,Z=!U||9<=Number(J),tt=U&&!X("9"),et=function(){if(!u.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});try{u.addEventListener("test",c,e),u.removeEventListener("test",c,e)}catch(n){}return t}();function nt(t,e){this.type=t,this.a=this.target=e,this.defaultPrevented=!1}function rt(t,e){if(nt.call(this,t?t.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,t){var n=this.type=t.type,r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.a=e,e=t.relatedTarget){if(q){t:{try{M(e.nodeName);var i=!0;break t}catch(o){}i=!1}i||(e=null)}}
2else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType="string"===typeof t.pointerType?t.pointerType:it[t.pointerType]||"",this.c=t,t.defaultPrevented&&this.b()}}nt.prototype.b=function(){this.defaultPrevented=!0},b(rt,nt);var it={2:"touch",3:"pen",4:"mouse"};rt.prototype.b=function(){rt.X.b.call(this);var t=this.c;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,tt)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(e){}};var ot="closure_listenable_"+(1e6*Math.random()|0),at=0;function st(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.ca=i,this.key=++at,this.Y=this.Z=!1}function ut(t){t.Y=!0,t.listener=null,t.proxy=null,t.src=null,t.ca=null}function ct(t){this.src=t,this.a={},this.b=0}function lt(t,e){var n=e.type;if(n in t.a){var r,i=t.a[n],o=_(i,e);(r=0<=o)&&Array.prototype.splice.call(i,o,1),r&&(ut(e),0==t.a[n].length&&(delete t.a[n],t.b--))}}function ft(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.Y&&o.listener==e&&o.capture==!!n&&o.ca==r)return i}return-1}ct.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=ft(t,e,r,i);return-1<a?(e=t[a],n||(e.Z=!1)):((e=new st(e,this.src,o,!!r,i)).Z=n,t.push(e)),e};var ht="closure_lm_"+(1e6*Math.random()|0),dt={};function pt(t,e,n,r,i){if(r&&r.once)return mt(t,e,n,r,i);if(Array.isArray(e)){for(var o=0;o<e.length;o++)pt(t,e[o],n,r,i);return null}return n=Tt(n),t&&t[ot]?t.va(e,n,f(r)?!!r.capture:!!r,i):vt(t,e,n,!1,r,i)}function vt(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var a=f(i)?!!i.capture:!!i;if(a&&!Z)return null;var s=Et(t);if(s||(t[ht]=s=new ct(t)),(n=s.add(e,n,r,a,o)).proxy)return n;if(r=function(){var t=_t,e=Z?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)et||(i=a),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(bt(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}return n}function mt(t,e,n,r,i){if(Array.isArray(e)){for(var o=0;o<e.length;o++)mt(t,e[o],n,r,i);return null}return n=Tt(n),t&&t[ot]?t.wa(e,n,f(r)?!!r.capture:!!r,i):vt(t,e,n,!0,r,i)}function yt(t,e,n,r,i){if(Array.isArray(e))for(var o=0;o<e.length;o++)yt(t,e[o],n,r,i);else r=f(r)?!!r.capture:!!r,n=Tt(n),t&&t[ot]?(t=t.c,(e=String(e).toString())in t.a&&(-1<(n=ft(o=t.a[e],n,r,i))&&(ut(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete t.a[e],t.b--)))):t&&(t=Et(t))&&(e=t.a[e.toString()],t=-1,e&&(t=ft(e,n,r,i)),(n=-1<t?e[t]:null)&>(n))}function gt(t){if("number"!==typeof t&&t&&!t.Y){var e=t.src;if(e&&e[ot])lt(e.c,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(bt(n),r):e.addListener&&e.removeListener&&e.removeListener(r),(n=Et(e))?(lt(n,t),0==n.b&&(n.src=null,e[ht]=null)):ut(t)}}}function bt(t){return t in dt?dt[t]:dt[t]="on"+t}function wt(t,e){var n=t.listener,r=t.ca||t.src;return t.Z&>(t),n.call(r,e)}function _t(t,e){if(t.Y)return!0;if(!Z){if(!e)t:{e=["window","event"];for(var n=u,r=0;r<e.length;r++)if(null==(n=n[e[r]])){e=null;break t}e=n}return wt(t,e=new rt(e,this))}return wt(t,new rt(e,this))}function Et(t){return(t=t[ht])instanceof ct?t:null}var Ot="__closure_events_fn_"+(1e9*Math.random()>>>0);function Tt(t){return"function"===typeof t?t:(t[Ot]||(t[Ot]=function(e){return t.handleEvent(e)}),t[Ot])}function St(){w.call(this),this.c=new ct(this),this.J=this,this.C=null}function kt(t,e){var n,r=t.C;if(r)for(n=[];r;r=r.C)n.push(r);if(t=t.J,r=e.type||e,"string"===typeof e)e=new nt(e,t);else if(e instanceof nt)e.target=e.target||t;else{var i=e;R(e=new nt(r,t),i)}if(i=!0,n)for(var o=n.length-1;0<=o;o--){var a=e.a=n[o];i=It(a,r,!0,e)&&i}if(i=It(a=e.a=t,r,!0,e)&&i,i=It(a,r,!1,e)&&i,n)for(o=0;o<n.length;o++)i=It(a=e.a=n[o],r,!1,e)&&i}function It(t,e,n,r){if(!(e=t.c.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var a=e[o];if(a&&!a.Y&&a.capture==n){var s=a.listener,u=a.ca||a.src;a.Z&<(t.c,a),i=!1!==s.call(u,r)&&i}}return i&&!r.defaultPrevented}
2b(St,w),St.prototype[ot]=!0,(o=St.prototype).addEventListener=function(t,e,n,r){pt(this,t,e,n,r)},o.removeEventListener=function(t,e,n,r){yt(this,t,e,n,r)},o.G=function(){if(St.X.G.call(this),this.c){var t,e=this.c;for(t in e.a){for(var n=e.a[t],r=0;r<n.length;r++)ut(n[r]);delete e.a[t],e.b--}}this.C=null},o.va=function(t,e,n,r){return this.c.add(String(t),e,!1,n,r)},o.wa=function(t,e,n,r){return this.c.add(String(t),e,!0,n,r)};var Ct=u.JSON.stringify;function Nt(){this.b=this.a=null}var xt,Pt=new(function(){function t(t,e){this.c=t,this.f=e,this.b=0,this.a=null}return t.prototype.get=function(){var t;return 0<this.b?(this.b--,t=this.a,this.a=t.next,t.next=null):t=this.c(),t},t}())((function(){return new At}),(function(t){t.reset()}));function jt(){var t=Lt,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function At(){this.next=this.b=this.a=null}function Dt(t){u.setTimeout((function(){throw t}),0)}function Rt(t,e){xt||function(){var t=u.Promise.resolve(void 0);xt=function(){t.then(Ft)}}(),Mt||(xt(),Mt=!0),Lt.add(t,e)}Nt.prototype.add=function(t,e){var n=Pt.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},At.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},At.prototype.reset=function(){this.next=this.b=this.a=null};var Mt=!1,Lt=new Nt;function Ft(){for(var t;t=jt();){try{t.a.call(t.b)}catch(n){Dt(n)}var e=Pt;e.f(t),100>e.b&&(e.b++,t.next=e.a,e.a=t)}Mt=!1}function Ut(t,e){St.call(this),this.b=t||1,this.a=e||u,this.f=m(this.Za,this),this.g=g()}function Vt(t){t.aa=!1,t.M&&(t.a.clearTimeout(t.M),t.M=null)}function Bt(t,e,n){if("function"===typeof t)n&&(t=m(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=m(t.handleEvent,t)}return 2147483647<Number(e)?-1:u.setTimeout(t,e||0)}function qt(t){t.a=Bt((function(){t.a=null,t.c&&(t.c=!1,qt(t))}),t.h);var e=t.b;t.b=null,t.g.apply(null,e)}b(Ut,St),(o=Ut.prototype).aa=!1,o.M=null,o.Za=function(){if(this.aa){var t=g()-this.g;0<t&&t<.8*this.b?this.M=this.a.setTimeout(this.f,this.b-t):(this.M&&(this.a.clearTimeout(this.M),this.M=null),kt(this,"tick"),this.aa&&(Vt(this),this.start()))}},o.start=function(){this.aa=!0,this.M||(this.M=this.a.setTimeout(this.f,this.b),this.g=g())},o.G=function(){Ut.X.G.call(this),Vt(this),delete this.a};var zt=function(t){function e(e,n){var r=t.call(this)||this;return r.g=e,r.h=n,r.b=null,r.c=!1,r.a=null,r}return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.f=function(t){this.b=arguments,this.a?this.c=!0:qt(this)},e.prototype.G=function(){t.prototype.G.call(this),this.a&&(u.clearTimeout(this.a),this.a=null,this.c=!1,this.b=null)},e}(w);function Wt(t){w.call(this),this.b=t,this.a={}}b(Wt,w);var Ht=[];function Gt(t,e,n,r){Array.isArray(n)||(n&&(Ht[0]=n.toString()),n=Ht);for(var i=0;i<n.length;i++){var o=pt(e,n[i],r||t.handleEvent,!1,t.b||t);if(!o)break;t.a[o.key]=o}}function Yt(t){j(t.a,(function(t,e){this.a.hasOwnProperty(e)&>(t)}),t),t.a={}}function Kt(){this.a=!0}function Qt(t,e,n,r){t.info((function(){return"XMLHTTP TEXT ("+e+"): "+function(t,e){if(!t.a)return e;if(!e)return null;try{var n=JSON.parse(e);if(n)for(t=0;t<n.length;t++)if(Array.isArray(n[t])){var r=n[t];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 Ct(n)}catch(s){return e}}(t,n)+(r?" "+r:"")}))}Wt.prototype.G=function(){Wt.X.G.call(this),Yt(this)},Wt.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},Kt.prototype.info=function(){};var Xt={},$t=null;function Jt(){return $t=$t||new St}function Zt(t){nt.call(this,Xt.Fa,t)}function te(t){var e=Jt();kt(e,new Zt(e,t))}function ee(t,e){nt.call(this,Xt.STAT_EVENT,t),this.stat=e}function ne(t){var e=Jt();kt(e,new ee(e,t))}function re(t){nt.call(this,Xt.Ga,t)}function ie(t,e){if("function"!==typeof t)throw Error("Fn must not be null and must be a function");return u.setTimeout((function(){t()}),e)}Xt.Fa="serverreachability",b(Zt,nt),Xt.STAT_EVENT="statevent",b(ee,nt),Xt.Ga="timingevent",b(re,nt);var oe={NO_ERROR:0,$a:1,nb:2,mb:3,hb:4,lb:5,ob:6,Da:7,TIMEOUT:8,rb:9},ae={fb:"complete",Bb:"success",Ea:"error",Da:"abort",tb:"ready",ub:"readystatechange",TIMEOUT:"timeout",pb:"incrementaldata",sb:"progress",ib:"downloadprogress",Jb:"uploadprogress"};function se(){}function ue(t){var e;return(e=t.a)||(e=t.a={}),e}function ce(){}se.prototype.a=null;var le,fe={OPEN:"a",eb:"b",Ea:"c",qb:"d"};function he(){nt.call(this,"d")}function de(){nt.call(this,"c")}function pe(){}function ve(t,e,n,r){this.g=t,this.c=e,this.f=n,this.S=r||1,this.J=new Wt(this),this.P=me,t=B?125:void 0,this.R=new Ut(t),this.B=null,this.b=!1,this.j=this.l=this.i=this.H=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(he,nt),b(de,nt),b(pe,se),le=new pe;var me=45e3,ye={},ge={};function be(t,e,n){t.H=1,t.i=Be(Re(e)),t.j=n,t.I=!0,we(t,null)}function we(t,e){t.u=g(),Oe(t),t.l=Re(t.i);var n=t.l,r=t.S;Array.isArray(r)||(r=[String(r)]),tn(n.b,"t",r),t.D=0,t.a=Qn(t.g,t.g.C?e:null),0<t.O&&(t.F=new zt(m(t.Ca,t,t.a),t.O)),Gt(t.J,t.a,"readystatechange",t.Xa),e=t.B?A(t.B):{},t.j?(t.m||(t.m="POST"),e["Content-Type"]="application/x-www-form-urlencoded",t.a.ba(t.l,t.m,t.j,e)):(t.m="GET",t.a.ba(t.l,t.m,null,e)),te(1),function(t,e,n,r,i,o){t.info((function(){if(t.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+"]: "+e+"\n"+n+"\n"+a}))}(t.c,t.m,t.l,t.f,t.S,t.j)}function _e(t,e,n){for(var r=!0;!t.A&&t.D<n.length;){var i=Ee(t,n);if(i==ge){4==e&&(t.h=4,ne(14),r=!1),Qt(t.c,t.f,null,"[Incomplete Response]");break}if(i==ye){t.h=4,ne(15),Qt(t.c,t.f,n,"[Invalid Chunk]"),r=!1;break}Qt(t.c,t.f,i,null),Ce(t,i)}4==e&&0==n.length&&(t.h=1,ne(16),r=!1),t.b=t.b&&r,r?0<n.length&&!t.V&&(t.V=!0,(e=t.g).a==t&&e.U&&!e.F&&(e.c.info("Great, no buffering proxy detected. Bytes received: "+n.length),Bn(e),e.F=!0,ne(11))):(Qt(t.c,t.f,n,"[Invalid Chunked Response]"),Ie(t),ke(t))}function Ee(t,e){var n=t.D,r=e.indexOf("\n",n);return-1==r?ge:(n=Number(e.substring(n,r)),isNaN(n)?ye:(r+=1)+n>e.length?ge:(e=e.substr(r,n),t.D=r+n,e))}function Oe(t){t.T=g()+t.P,Te(t,t.P)}function Te(t,e){if(null!=t.o)throw Error("WatchDog timer not null");t.o=ie(m(t.Va,t),e)}function Se(t){t.o&&(u.clearTimeout(t.o),t.o=null)}function ke(t){0==t.g.v||t.A||Wn(t.g,t)}function Ie(t){Se(t);var e=t.F;e&&"function"==typeof e.ja&&e.ja(),t.F=null,Vt(t.R),Yt(t.J),t.a&&(e=t.a,t.a=null,e.abort(),e.ja())}function Ce(t,e){try{var n=t.g;if(0!=n.v&&(n.a==t||un(n.b,t)))if(n.I=t.N,!t.C&&un(n.b,t)&&3==n.v){try{var r=n.ka.a.parse(e)}catch(y){r=null}if(Array.isArray(r)&&3==r.length){var i=r;
2if(0==i[0]){t:if(!n.j){if(n.a){if(!(n.a.u+3e3<t.u))break t;zn(n),jn(n)}Vn(n),ne(18)}}else n.oa=i[1],0<n.oa-n.P&&37500>i[2]&&n.H&&0==n.o&&!n.m&&(n.m=ie(m(n.Sa,n),6e3));if(1>=sn(n.b)&&n.ea){try{n.ea()}catch(y){}n.ea=void 0}}else Gn(n,11)}else if((t.C||n.a==t)&&zn(n),!S(e))for(e=r=n.ka.a.parse(e),r=0;r<e.length;r++)if(i=e[r],n.P=i[0],i=i[1],2==n.v)if("c"==i[0]){n.J=i[1],n.ga=i[2];var o=i[3];null!=o&&(n.ha=o,n.c.info("VER="+n.ha));var a=i[4];null!=a&&(n.pa=a,n.c.info("SVER="+n.pa));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=t.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.na=h,Ve(u.B,u.A,h))}}n.v=3,n.f&&n.f.ta(),n.U&&(n.N=g()-t.u,n.c.info("Handshake RTT: "+n.N+"ms"));var d=t;if((u=n).la=Kn(u,u.C?u.ga:null,u.fa),d.C){ln(u.b,d);var p=d,v=u.D;v&&p.setTimeout(v),p.o&&(Se(p),Oe(p)),u.a=d}else Un(u);0<n.g.length&&Rn(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.sa(i),n.o=0);te(4)}catch(y){}}function Ne(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(l(t)||"string"===typeof t)E(t,e,void 0);else{if(t.L&&"function"==typeof t.L)var n=t.L();else if(t.K&&"function"==typeof t.K)n=void 0;else if(l(t)||"string"===typeof t){n=[];for(var r=t.length,i=0;i<r;i++)n.push(i)}else for(i in n=[],r=0,t)n[r++]=i;i=(r=function(t){if(t.K&&"function"==typeof t.K)return t.K();if("string"===typeof t)return t.split("");if(l(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}for(r in e=[],n=0,t)e[n++]=t[r];return e}(t)).length;for(var o=0;o<i;o++)e.call(void 0,r[o],n&&n[o],t)}}function xe(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof xe)for(n=t.L(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function Pe(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];je(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e<t.a.length;)je(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function je(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(o=ve.prototype).setTimeout=function(t){this.P=t},o.Xa=function(t){t=t.target;var e=this.F;e&&3==In(t)?e.f():this.Ca(t)},o.Ca=function(t){try{if(t==this.a)t:{var e=In(this.a),n=this.a.ua(),r=this.a.W();if(!(3>e||3==e&&!B&&!this.a.$())){this.A||4!=e||7==n||te(8==n||0>=r?3:2),Se(this);var i=this.a.W();this.N=i;var o=this.a.$();if(this.b=200==i,function(t,e,n,r,i,o,a){t.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+e+"\n"+n+"\n"+o+" "+a}))}(this.c,this.m,this.l,this.f,this.S,e,i),this.b){if(this.U&&!this.C){e:{if(this.a){var a,s=this.a;if((a=s.a?s.a.getResponseHeader("X-HTTP-Initial-Response"):null)&&!S(a)){var u=a;break e}}u=null}if(!u){this.b=!1,this.h=3,ne(12),Ie(this),ke(this);break t}Qt(this.c,this.f,u,"Initial handshake response via X-HTTP-Initial-Response"),this.C=!0,Ce(this,u)}this.I?(_e(this,e,o),B&&this.b&&3==e&&(Gt(this.J,this.R,"tick",this.Wa),this.R.start())):(Qt(this.c,this.f,o,null),Ce(this,o)),4==e&&Ie(this),this.b&&!this.A&&(4==e?Wn(this.g,this):(this.b=!1,Oe(this)))}else 400==i&&0<o.indexOf("Unknown SID")?(this.h=3,ne(12)):(this.h=0,ne(13)),Ie(this),ke(this)}}}catch(c){}},o.Wa=function(){if(this.a){var t=In(this.a),e=this.a.$();this.D<e.length&&(Se(this),_e(this,t,e),this.b&&4!=t&&Oe(this))}},o.cancel=function(){this.A=!0,Ie(this)},o.Va=function(){this.o=null;var t=g();0<=t-this.T?(function(t,e){t.info((function(){return"TIMEOUT: "+e}))}(this.c,this.l),2!=this.H&&(te(3),ne(17)),Ie(this),this.h=2,ke(this)):Te(this,this.T-t)},(o=xe.prototype).K=function(){Pe(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},o.L=function(){return Pe(this),this.a.concat()},o.get=function(t,e){return je(this.b,t)?this.b[t]:e},o.set=function(t,e){je(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},o.forEach=function(t,e){for(var n=this.L(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var Ae=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function De(t,e){if(this.c=this.j=this.f="",this.h=null,this.i=this.g="",this.a=!1,t instanceof De){this.a=void 0!==e?e:t.a,Me(this,t.f),this.j=t.j,Le(this,t.c),Fe(this,t.h),this.g=t.g,e=t.b;var n=new Xe;n.c=e.c,e.a&&(n.a=new xe(e.a),n.b=e.b),Ue(this,n),this.i=t.i}else t&&(n=String(t).match(Ae))?(this.a=!!e,Me(this,n[1]||"",!0),this.j=qe(n[2]||""),Le(this,n[3]||"",!0),Fe(this,n[4]),this.g=qe(n[5]||"",!0),Ue(this,n[6]||"",!0),this.i=qe(n[7]||"")):(this.a=!!e,this.b=new Xe(null,this.a))}function Re(t){return new De(t)}
vendor: 5,664 bytes, line 2
2function Me(t,e,n){t.f=n?qe(e,!0):e,t.f&&(t.f=t.f.replace(/:$/,""))}function Le(t,e,n){t.c=n?qe(e,!0):e}function Fe(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.h=e}else t.h=null}function Ue(t,e,n){e instanceof Xe?(t.b=e,function(t,e){e&&!t.f&&($e(t),t.c=null,t.a.forEach((function(t,e){var n=e.toLowerCase();e!=n&&(Je(this,e),tn(this,n,t))}),t)),t.f=e}(t.b,t.a)):(n||(e=ze(e,Ke)),t.b=new Xe(e,t.a))}function Ve(t,e,n){t.b.set(e,n)}function Be(t){return Ve(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^g()).toString(36)),t}function qe(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function ze(t,e,n){return"string"===typeof t?(t=encodeURI(t).replace(e,We),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function We(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}De.prototype.toString=function(){var t=[],e=this.f;e&&t.push(ze(e,He,!0),":");var n=this.c;return(n||"file"==e)&&(t.push("//"),(e=this.j)&&t.push(ze(e,He,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.h)&&t.push(":",String(n))),(n=this.g)&&(this.c&&"/"!=n.charAt(0)&&t.push("/"),t.push(ze(n,"/"==n.charAt(0)?Ye:Ge,!0))),(n=this.b.toString())&&t.push("?",n),(n=this.i)&&t.push("#",ze(n,Qe)),t.join("")};var He=/[#\/\?@]/g,Ge=/[#\?:]/g,Ye=/[#\?]/g,Ke=/[#\?@]/g,Qe=/#/g;function Xe(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function $e(t){t.a||(t.a=new xe,t.b=0,t.c&&function(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(t.c,(function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)})))}function Je(t,e){$e(t),e=en(t,e),je(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,je((t=t.a).b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&Pe(t)))}function Ze(t,e){return $e(t),e=en(t,e),je(t.a.b,e)}function tn(t,e,n){Je(t,e),0<n.length&&(t.c=null,t.a.set(en(t,e),T(n)),t.b+=n.length)}function en(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}(o=Xe.prototype).add=function(t,e){$e(this),this.c=null,t=en(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},o.forEach=function(t,e){$e(this),this.a.forEach((function(n,r){E(n,(function(n){t.call(e,n,r,this)}),this)}),this)},o.L=function(){$e(this);for(var t=this.a.K(),e=this.a.L(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},o.K=function(t){$e(this);var e=[];if("string"===typeof t)Ze(this,t)&&(e=O(e,this.a.get(en(this,t))));else{t=this.a.K();for(var n=0;n<t.length;n++)e=O(e,t[n])}return e},o.set=function(t,e){return $e(this),this.c=null,Ze(this,t=en(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},o.get=function(t,e){return t&&0<(t=this.K(t)).length?String(t[0]):e},o.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.L(),n=0;n<e.length;n++){var r=e[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]))),t.push(a)}}return this.c=t.join("&")};var nn=function(t,e){this.b=t,this.a=e};function rn(t){this.g=t||on,u.PerformanceNavigationTiming?t=0<(t=u.performance.getEntriesByType("navigation")).length&&("hq"==t[0].nextHopProtocol||"h2"==t[0].nextHopProtocol):t=!!(u.ia&&u.ia.ya&&u.ia.ya()&&u.ia.ya().Lb),this.f=t?this.g:1,this.a=null,1<this.f&&(this.a=new Set),this.b=null,this.c=[]}var on=10;function an(t){return!!t.b||!!t.a&&t.a.size>=t.f}function sn(t){return t.b?1:t.a?t.a.size:0}function un(t,e){return t.b?t.b==e:!!t.a&&t.a.has(e)}function cn(t,e){t.a?t.a.add(e):t.b=e}function ln(t,e){t.b&&t.b==e?t.b=null:t.a&&t.a.has(e)&&t.a.delete(e)}function fn(t){var e,n;if(null!=t.b)return t.c.concat(t.b.s);if(null!=t.a&&0!==t.a.size){var r=t.c;try{for(var o=i(t.a.values()),a=o.next();!a.done;a=o.next()){var s=a.value;r=r.concat(s.s)}}catch(u){e={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}return T(t.c)}function hn(){}function dn(){this.a=new hn}function pn(t,e,n){var r=n||"";try{Ne(t,(function(t,n){var i=t;f(t)&&(i=Ct(t)),e.push(r+n+"="+encodeURIComponent(i))}))}catch(i){throw e.push(r+"type="+encodeURIComponent("_badmap")),i}}function vn(t,e,n,r,i){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch(o){}}rn.prototype.cancel=function(){var t,e;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){t={error:o}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}this.a.clear()}},hn.prototype.stringify=function(t){return u.JSON.stringify(t,void 0)},hn.prototype.parse=function(t){return u.JSON.parse(t,void 0)};var mn=u.JSON.parse;function yn(t){St.call(this),this.headers=new xe,this.H=t||null,this.b=!1,this.s=this.a=null,this.B="",this.h=0,this.f="",this.g=this.A=this.l=this.u=!1,this.o=0,this.m=null,this.I=gn,this.D=this.F=!1}b(yn,St);var gn="",bn=/^https?$/i,wn=["POST","PUT"];function _n(t){return"content-type"==t.toLowerCase()}function En(t,e){t.b=!1,t.a&&(t.g=!0,t.a.abort(),t.g=!1),t.f=e,t.h=5,On(t),Sn(t)}function On(t){t.u||(t.u=!0,kt(t,"complete"),kt(t,"error"))}function Tn(t){if(t.b&&"undefined"!=typeof s&&(!t.s[1]||4!=In(t)||2!=t.W()))if(t.l&&4==In(t))Bt(t.za,0,t);else if(kt(t,"readystatechange"),4==In(t)){t.b=!1;try{var e,n=t.W();t:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r
2=!0;break t;default:r=!1}if(!(e=r)){var i;if(i=0===n){var o=String(t.B).match(Ae)[1]||null;if(!o&&u.self&&u.self.location){var a=u.self.location.protocol;o=a.substr(0,a.length-1)}i=!bn.test(o?o.toLowerCase():"")}e=i}if(e)kt(t,"complete"),kt(t,"success");else{t.h=6;try{var c=2<In(t)?t.a.statusText:""}catch(n){c=""}t.f=c+" ["+t.W()+"]",On(t)}}finally{Sn(t)}}}function Sn(t,e){if(t.a){kn(t);var n=t.a,r=t.s[0]?c:null;t.a=null,t.s=null,e||kt(t,"ready");try{n.onreadystatechange=r}catch(i){}}}function kn(t){t.a&&t.D&&(t.a.ontimeout=null),t.m&&(u.clearTimeout(t.m),t.m=null)}function In(t){return t.a?t.a.readyState:0}function Cn(t,e,n){t:{for(r in n){var r=!1;break t}r=!0}r||(n=function(t){var e="";return j(t,(function(t,n){e+=n,e+=":",e+=t,e+="\r\n"})),e}(n),"string"===typeof t?null!=n&&encodeURIComponent(String(n)):Ve(t,e,n))}function Nn(t,e,n){return n&&n.internalChannelParams&&n.internalChannelParams[t]||e}function xn(t){this.pa=0,this.g=[],this.c=new Kt,this.ga=this.la=this.B=this.fa=this.a=this.na=this.A=this.V=this.i=this.O=this.l=null,this.Oa=this.R=0,this.La=Nn("failFast",!1,t),this.H=this.m=this.j=this.h=this.f=null,this.S=!0,this.I=this.oa=this.P=-1,this.T=this.o=this.u=0,this.Ha=Nn("baseRetryDelayMs",5e3,t),this.Ra=Nn("retryDelaySeedMs",1e4,t),this.Ma=Nn("forwardChannelMaxRetries",2,t),this.ma=Nn("forwardChannelRequestTimeoutMs",2e4,t),this.Na=t&&t.g||void 0,this.D=void 0,this.C=t&&t.supportsCrossDomainXhr||!1,this.J="",this.b=new rn(t&&t.concurrentRequestLimit),this.ka=new dn,this.da=t&&t.fastHandshake||!1,this.Ia=t&&t.b||!1,t&&t.f&&(this.c.a=!1),t&&t.forceLongPolling&&(this.S=!1),this.U=!this.da&&this.S&&t&&t.detectBufferingProxy||!1,this.ea=void 0,this.N=0,this.F=!1,this.s=null,(this.Ka=t&&t.c||!1)&&this.c.info("Opt-in to enable Chrome Origin Trials.")}function Pn(t){if(An(t),3==t.v){var e=t.R++,n=Re(t.B);Ve(n,"SID",t.J),Ve(n,"RID",e),Ve(n,"TYPE","terminate"),Ln(t,n),(e=new ve(t,t.c,e,void 0)).H=2,e.i=Be(Re(n)),n=!1,u.navigator&&u.navigator.sendBeacon&&(n=u.navigator.sendBeacon(e.i.toString(),"")),!n&&u.Image&&((new Image).src=e.i,n=!0),n||(e.a=Qn(e.g,null),e.a.ba(e.i)),e.u=g(),Oe(e)}Yn(t)}function jn(t){t.a&&(Bn(t),t.a.cancel(),t.a=null)}function An(t){jn(t),t.j&&(u.clearTimeout(t.j),t.j=null),zn(t),t.b.cancel(),t.h&&("number"===typeof t.h&&u.clearTimeout(t.h),t.h=null)}function Dn(t,e){t.g.push(new nn(t.Oa++,e)),3==t.v&&Rn(t)}function Rn(t){an(t.b)||t.h||(t.h=!0,Rt(t.Ba,t),t.u=0)}function Mn(t,e){var n;n=e?e.f:t.R++;var r=Re(t.B);Ve(r,"SID",t.J),Ve(r,"RID",n),Ve(r,"AID",t.P),Ln(t,r),t.i&&t.l&&Cn(r,t.i,t.l),n=new ve(t,t.c,n,t.u+1),null===t.i&&(n.B=t.l),e&&(t.g=e.s.concat(t.g)),e=Fn(t,n,1e3),n.setTimeout(Math.round(.5*t.ma)+Math.round(.5*t.ma*Math.random())),cn(t.b,n),be(n,r,e)}function Ln(t,e){t.f&&Ne({},(function(t,n){Ve(e,n,t)}))}function Fn(t,e,n){n=Math.min(t.g.length,n);var r=t.f?m(t.f.Ja,t.f,t):null;t:for(var i=t.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 t}}return t=t.g.splice(0,n),e.s=t,r}function Un(t){t.a||t.j||(t.T=1,Rt(t.Aa,t),t.o=0)}function Vn(t){return!(t.a||t.j||3<=t.o)&&(t.T++,t.j=ie(m(t.Aa,t),Hn(t,t.o)),t.o++,!0)}function Bn(t){null!=t.s&&(u.clearTimeout(t.s),t.s=null)}function qn(t){t.a=new ve(t,t.c,"rpc",t.T),null===t.i&&(t.a.B=t.l),t.a.O=0;var e=Re(t.la);Ve(e,"RID","rpc"),Ve(e,"SID",t.J),Ve(e,"CI",t.H?"0":"1"),Ve(e,"AID",t.P),Ln(t,e),Ve(e,"TYPE","xmlhttp"),t.i&&t.l&&Cn(e,t.i,t.l),t.D&&t.a.setTimeout(t.D);var n=t.a;t=t.ga,n.H=1,n.i=Be(Re(e)),n.j=null,n.I=!0,we(n,t)}function zn(t){null!=t.m&&(u.clearTimeout(t.m),t.m=null)}function Wn(t,e){var n=null;if(t.a==e){zn(t),Bn(t),t.a=null;var r=2}else{if(!un(t.b,e))return;n=e.s,ln(t.b,e),r=1}if(t.I=e.N,0!=t.v)if(e.b)if(1==r){n=e.j?e.j.length:0,e=g()-e.u;var i=t.u;kt(r=Jt(),new re(r,n,e,i)),Rn(t)}else Un(t);else if(3==(i=e.h)||0==i&&0<t.I||!(1==r&&function(t,e){return!(sn(t.b)>=t.b.f-(t.h?1:0))&&(t.h?(t.g=e.s.concat(t.g),!0):!(1==t.v||2==t.v||t.u>
2=(t.La?0:t.Ma))&&(t.h=ie(m(t.Ba,t,e),Hn(t,t.u)),t.u++,!0))}(t,e)||2==r&&Vn(t)))switch(n&&0<n.length&&(e=t.b,e.c=e.c.concat(n)),i){case 1:Gn(t,5);break;case 4:Gn(t,10);break;case 3:Gn(t,6);break;default:Gn(t,2)}}function Hn(t,e){var n=t.Ha+Math.floor(Math.random()*t.Ra);return t.f||(n*=2),n*e}function Gn(t,e){if(t.c.info("Error code "+e),2==e){var n=null;t.f&&(n=null);var r=m(t.Ya,t);n||(n=new De("//www.google.com/images/cleardot.gif"),u.location&&"http"==u.location.protocol||Me(n,"https"),Be(n)),function(t,e){var n=new Kt;if(u.Image){var r=new Image;r.onload=y(vn,n,r,"TestLoadImage: loaded",!0,e),r.onerror=y(vn,n,r,"TestLoadImage: error",!1,e),r.onabort=y(vn,n,r,"TestLoadImage: abort",!1,e),r.ontimeout=y(vn,n,r,"TestLoadImage: timeout",!1,e),u.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=t}else e(!1)}(n.toString(),r)}else ne(2);t.v=0,t.f&&t.f.ra(e),Yn(t),An(t)}function Yn(t){t.v=0,t.I=-1,t.f&&(0==fn(t.b).length&&0==t.g.length||(t.b.c.length=0,T(t.g),t.g.length=0),t.f.qa())}function Kn(t,e,n){var r=function(t){return t instanceof De?Re(t):new De(t,void 0)}(n);if(""!=r.c)e&&Le(r,e+"."+r.c),Fe(r,r.h);else{var i=u.location;r=function(t,e,n,r){var i=new De(null,void 0);return t&&Me(i,t),e&&Le(i,e),n&&Fe(i,n),r&&(i.g=r),i}(i.protocol,e?e+"."+i.hostname:i.hostname,+i.port,n)}return t.V&&j(t.V,(function(t,e){Ve(r,e,t)})),e=t.A,n=t.na,e&&n&&Ve(r,e,n),Ve(r,"VER",t.ha),Ln(t,r),r}function Qn(t,e){if(e&&!t.C)throw Error("Can't create secondary domain capable XhrIo object.");return(e=new yn(t.Na)).F=t.C,e}function Xn(){}function $n(){if(U&&!(10<=Number(J)))throw Error("Environmental error: no available transport.")}function Jn(t,e){St.call(this),this.a=new xn(e),this.o=t,this.b=e&&e.messageUrlParams||null,t=e&&e.messageHeaders||null,e&&e.clientProtocolHeaderRequired&&(t?t["X-Client-Protocol"]="webchannel":t={"X-Client-Protocol":"webchannel"}),this.a.l=t,t=e&&e.initMessageHeaders||null,e&&e.messageContentType&&(t?t["X-WebChannel-Content-Type"]=e.messageContentType:t={"X-WebChannel-Content-Type":e.messageContentType}),e&&e.a&&(t?t["X-WebChannel-Client-Profile"]=e.a:t={"X-WebChannel-Client-Profile":e.a}),this.a.O=t,(t=e&&e.httpHeadersOverwriteParam)&&!S(t)&&(this.a.i=t),this.m=e&&e.supportsCrossDomainXhr||!1,this.l=e&&e.sendRawJson||!1,(e=e&&e.httpSessionIdParam)&&!S(e)&&(this.a.A=e,null!==(t=this.b)&&e in t&&(e in(t=this.b)&&delete t[e])),this.f=new er(this)}function Zn(t){he.call(this);var e=t.__sm__;if(e){t:{for(var n in e){t=n;break t}t=void 0}(this.c=t)?(t=this.c,this.data=null!==e&&t in e?e[t]:void 0):this.data=e}else this.data=t}function tr(){de.call(this),this.status=1}function er(t){this.a=t}(o=yn.prototype).ba=function(t,e,n,r){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.B+"; newUri="+t);e=e?e.toUpperCase():"GET",this.B=t,this.f="",this.h=0,this.u=!1,this.b=!0,this.a=new XMLHttpRequest,this.s=this.H?ue(this.H):ue(le),this.a.onreadystatechange=m(this.za,this);try{this.A=!0,this.a.open(e,String(t),!0),this.A=!1}catch(o){return void En(this,o)}t=n||"";var i=new xe(this.headers);r&&Ne(r,(function(t,e){i.set(e,t)})),r=function(t){t:{for(var e=_n,n=t.length,r="string"===typeof t?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t)){e=i;break t}e=-1}return 0>e?null:"string"===typeof t?t.charAt(e):t[e]}(i.L()),n=u.FormData&&t instanceof u.FormData,!(0<=_(wn,e))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),i.forEach((function(t,e){this.a.setRequestHeader(e,t)}),this),this.I&&(this.a.responseType=this.I),"withCredentials"in this.a&&this.a.withCredentials!==this.F&&(this.a.withCredentials=this.F);try{kn(this),0<this.o&&((this.D=function(t){return U&&X(9)&&"number"===typeof t.timeout&&void 0!==t.ontimeout}(this.a))?(this.a.timeout=this.o,this.a.ontimeout=m(this.xa,this)):this.m=Bt(this.xa,this.o,this)),this.l=!0,this.a.send(t),this.l=!1}catch(o){En(this,o)}},o.xa=function(){"undefined"!=typeof s&&this.a&&(this.f="Timed out after "+this.o+"ms, aborting",this.h=8,kt(this,"timeout"),this.abort(8))},o.abort=function(t){this.a&&this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.h=t||7,kt(this,"complete"),kt(this,"abort"),Sn(this))},o.G=function(){this.a&&(this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),Sn(this,!0)),yn.X.G.call(this)},o.za=function(){this.j||(this.A||this.l||this.g?Tn(this):this.Ua())},o.Ua=function(){Tn(this)}
2,o.W=function(){try{return 2<In(this)?this.a.status:-1}catch(t){return-1}},o.$=function(){try{return this.a?this.a.responseText:""}catch(t){return""}},o.Pa=function(t){if(this.a){var e=this.a.responseText;return t&&0==e.indexOf(t)&&(e=e.substring(t.length)),mn(e)}},o.ua=function(){return this.h},o.Qa=function(){return"string"===typeof this.f?this.f:String(this.f)},(o=xn.prototype).ha=8,o.v=1,o.Ba=function(t){if(this.h)if(this.h=null,1==this.v){if(!t){this.R=Math.floor(1e5*Math.random()),t=this.R++;var e,n=new ve(this,this.c,t,void 0),r=this.l;if(this.O&&(r?R(r=A(r),this.O):r=this.O),null===this.i&&(n.B=r),this.da)t:{for(var i=e=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<(e+=o)){e=i;break t}if(4096===e||i===this.g.length-1){e=i+1;break t}}e=1e3}else e=1e3;e=Fn(this,n,e),Ve(i=Re(this.B),"RID",t),Ve(i,"CVER",22),this.A&&Ve(i,"X-HTTP-Session-Id",this.A),Ln(this,i),this.i&&r&&Cn(i,this.i,r),cn(this.b,n),this.Ia&&Ve(i,"TYPE","init"),this.da?(Ve(i,"$req",e),Ve(i,"SID","null"),n.U=!0,be(n,i,null)):be(n,i,e),this.v=2}}else 3==this.v&&(t?Mn(this,t):0==this.g.length||an(this.b)||Mn(this))},o.Aa=function(){if(this.j=null,qn(this),this.U&&!(this.F||null==this.a||0>=this.N)){var t=2*this.N;this.c.info("BP detection timer enabled: "+t),this.s=ie(m(this.Ta,this),t)}},o.Ta=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.H=!1,this.F=!0,ne(10),jn(this),qn(this))},o.Sa=function(){null!=this.m&&(this.m=null,jn(this),Vn(this),ne(19))},o.Ya=function(t){t?(this.c.info("Successfully pinged google.com"),ne(2)):(this.c.info("Failed to ping google.com"),ne(1))},(o=Xn.prototype).ta=function(){},o.sa=function(){},o.ra=function(){},o.qa=function(){},o.Ja=function(){},$n.prototype.a=function(t,e){return new Jn(t,e)},b(Jn,St),Jn.prototype.g=function(){this.a.f=this.f,this.m&&(this.a.C=!0);var t=this.a,e=this.o,n=this.b||void 0;ne(0),t.fa=e,t.V=n||{},t.H=t.S,t.B=Kn(t,null,t.fa),Rn(t)},Jn.prototype.close=function(){Pn(this.a)},Jn.prototype.h=function(t){if("string"===typeof t){var e={};e.__data__=t,Dn(this.a,e)}else this.l?((e={}).__data__=Ct(t),Dn(this.a,e)):Dn(this.a,t)},Jn.prototype.G=function(){this.a.f=null,delete this.f,Pn(this.a),delete this.a,Jn.X.G.call(this)},b(Zn,he),b(tr,de),b(er,Xn),er.prototype.ta=function(){kt(this.a,"a")},er.prototype.sa=function(t){kt(this.a,new Zn(t))},er.prototype.ra=function(t){kt(this.a,new tr(t))},er.prototype.qa=function(){kt(this.a,"b")},$n.prototype.createWebChannel=$n.prototype.a,Jn.prototype.send=Jn.prototype.h,Jn.prototype.open=Jn.prototype.g,Jn.prototype.close=Jn.prototype.close,oe.NO_ERROR=0,oe.TIMEOUT=8,oe.HTTP_ERROR=6,ae.COMPLETE="complete",ce.EventType=fe,fe.OPEN="a",fe.CLOSE="b",fe.ERROR="c",fe.MESSAGE="d",St.prototype.listen=St.prototype.va,yn.prototype.listenOnce=yn.prototype.wa,yn.prototype.getLastError=yn.prototype.Qa,yn.prototype.getLastErrorCode=yn.prototype.ua,yn.prototype.getStatus=yn.prototype.W,yn.prototype.getResponseJson=yn.prototype.Pa,yn.prototype.getResponseText=yn.prototype.$,yn.prototype.send=yn.prototype.ba;var nr=function(){return new $n},rr=function(){return Jt()},ir=oe,or=ae,ar=Xt,sr={gb:0,jb:1,kb:2,Db:3,Ib:4,Fb:5,Gb:6,Eb:7,Cb:8,Hb:9,PROXY:10,NOPROXY:11,Ab:12,wb:13,xb:14,vb:15,yb:16,zb:17,bb:18,ab:19,cb:20},ur=ce,cr=yn}).call(this,n(37))},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function r(t){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function a(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=r(t);if(e){var a=r(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return o(this,n)}}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var r=n(52),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function a(t){return"undefined"===typeof t}function s(t){return null!==t&&"object"===typeof t}function u(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!==t&&"undefined"!==typeof t)if("object"!==typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!a(t)&&null!==t.constructor&&!
2a(t.constructor)&&"function"===typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!==typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"===typeof t},isNumber:function(t){return"number"===typeof t},isObject:s,isPlainObject:u,isUndefined:a,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return s(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!==typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)},forEach:l,merge:function t(){var e={};function n(n,r){u(e[r])&&u(n)?e[r]=t(e[r],n):u(n)?e[r]=t({},n):o(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(e,(function(e,i){t[i]=n&&"function"===typeof e?r(e,n):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},function(t,e,n){"use strict";var r="Invariant failed";e.a=function(t,e){if(!t)throw new Error(r)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return O})),n.d(e,"b",(function(){return N})),n.d(e,"d",(function(){return P})),n.d(e,"c",(function(){return v})),n.d(e,"f",(function(){return m})),n.d(e,"e",(function(){return p}));var r=n(7);function i(t){return"/"===t.charAt(0)}function o(t,e){for(var n=e,r=n+1,i=t.length;r<i;n+=1,r+=1)t[n]=t[r];t.pop()}var a=function(t,e){void 0===e&&(e="");var n,r=t&&t.split("/")||[],a=e&&e.split("/")||[],s=t&&i(t),u=e&&i(e),c=s||u;if(t&&i(t)?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(t){return t.valueOf?t.valueOf():Object.prototype.valueOf.call(t)}var u=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every((function(e,r){return t(e,n[r])}));if("object"===typeof e||"object"===typeof n){var r=s(e),i=s(n);return r!==e||i!==n?t(r,i):Object.keys(Object.assign({},e,n)).every((function(r){return t(e[r],n[r])}))}return!1},c=n(29);function l(t){return"/"===t.charAt(0)?t:"/"+t}function f(t){return"/"===t.charAt(0)?t.substr(1):t}function h(t,e){return function(t,e){return 0===t.toLowerCase().indexOf(e.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(e.length))}(t,e)?t.substr(e.length):t}function d(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function p(t){var e=t.pathname,n=t.search,r=t.hash,i=e||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function v(t,e,n,i){var o;"string"===typeof t?(o=function(t){var e=t||"/",n="",r="",i=e.indexOf("#");-1!==i&&(r=e.substr(i),e=e.substr(0,i));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(o=Object(r.a)({},t)).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!==e&&void 0===o.state&&(o.state=e));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 m(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&u(t.state,e.state)}function y(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,i){if(null!=t){var o="function"===typeof t?t(e,n):t;"string"===typeof o?"function"===typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach((function(t){return t.apply(void 0,n)}))}}}var g=!("undefined"===typeof window||!window.document||!window.document.createElement);function b(t,e){e(window.confirm(t))}var w="popstate",_="hashchange";function E(){try{return window.history.state||{}}catch(t){return{}}}function O(t){void 0===t&&(t={}
vendor: 7,332 bytes, line 2
2),g||Object(c.a)(!1);var e=window.history,n=function(){var t=window.navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history}(),i=!(-1===window.navigator.userAgent.indexOf("Trident")),o=t,a=o.forceRefresh,s=void 0!==a&&a,u=o.getUserConfirmation,f=void 0===u?b:u,m=o.keyLength,O=void 0===m?6:m,T=t.basename?d(l(t.basename)):"";function S(t){var e=t||{},n=e.key,r=e.state,i=window.location,o=i.pathname+i.search+i.hash;return T&&(o=h(o,T)),v(o,r,n)}function k(){return Math.random().toString(36).substr(2,O)}var I=y();function C(t){Object(r.a)(V,t),V.length=e.length,I.notifyListeners(V.location,V.action)}function N(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||j(S(t.state))}function x(){j(S(E()))}var P=!1;function j(t){if(P)P=!1,C();else{I.confirmTransitionTo(t,"POP",f,(function(e){e?C({action:"POP",location:t}):function(t){var e=V.location,n=D.indexOf(e.key);-1===n&&(n=0);var r=D.indexOf(t.key);-1===r&&(r=0);var i=n-r;i&&(P=!0,M(i))}(t)}))}}var A=S(E()),D=[A.key];function R(t){return T+p(t)}function M(t){e.go(t)}var L=0;function F(t){1===(L+=t)&&1===t?(window.addEventListener(w,N),i&&window.addEventListener(_,x)):0===L&&(window.removeEventListener(w,N),i&&window.removeEventListener(_,x))}var U=!1;var V={length:e.length,action:"POP",location:A,createHref:R,push:function(t,r){var i="PUSH",o=v(t,r,k(),V.location);I.confirmTransitionTo(o,i,f,(function(t){if(t){var r=R(o),a=o.key,u=o.state;if(n)if(e.pushState({key:a,state:u},null,r),s)window.location.href=r;else{var c=D.indexOf(V.location.key),l=D.slice(0,c+1);l.push(o.key),D=l,C({action:i,location:o})}else window.location.href=r}}))},replace:function(t,r){var i="REPLACE",o=v(t,r,k(),V.location);I.confirmTransitionTo(o,i,f,(function(t){if(t){var r=R(o),a=o.key,u=o.state;if(n)if(e.replaceState({key:a,state:u},null,r),s)window.location.replace(r);else{var c=D.indexOf(V.location.key);-1!==c&&(D[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(t){void 0===t&&(t=!1);var e=I.setPrompt(t);return U||(F(1),U=!0),function(){return U&&(U=!1,F(-1)),e()}},listen:function(t){var e=I.appendListener(t);return F(1),function(){F(-1),e()}}};return V}var T="hashchange",S={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+f(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:f,decodePath:l},slash:{encodePath:l,decodePath:l}};function k(t){var e=t.indexOf("#");return-1===e?t:t.slice(0,e)}function I(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)}function C(t){window.location.replace(k(window.location.href)+"#"+t)}function N(t){void 0===t&&(t={}),g||Object(c.a)(!1);var e=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),t),i=n.getUserConfirmation,o=void 0===i?b:i,a=n.hashType,s=void 0===a?"slash":a,u=t.basename?d(l(t.basename)):"",f=S[s],m=f.encodePath,w=f.decodePath;function _(){var t=w(I());return u&&(t=h(t,u)),v(t)}var E=y();function O(t){Object(r.a)(V,t),V.length=e.length,E.notifyListeners(V.location,V.action)}var N=!1,x=null;function P(){var t,e,n=I(),r=m(n);if(n!==r)C(r);else{var i=_(),a=V.location;if(!N&&(e=i,(t=a).pathname===e.pathname&&t.search===e.search&&t.hash===e.hash))return;if(x===p(i))return;x=null,function(t){if(N)N=!1,O();else{var e="POP";E.confirmTransitionTo(t,e,o,(function(n){n?O({action:e,location:t}):function(t){var e=V.location,n=R.lastIndexOf(p(e));-1===n&&(n=0);var r=R.lastIndexOf(p(t));-1===r&&(r=0);var i=n-r;i&&(N=!0,M(i))}(t)}))}}(i)}}var j=I(),A=m(j);j!==A&&C(A);var D=_(),R=[p(D)];function M(t){e.go(t)}var L=0;function F(t){1===(L+=t)&&1===t?window.addEventListener(T,P):0===L&&window.removeEventListener(T,P)}var U=!1;var V={length:e.length,action:"POP",location:D,createHref:function(t){var e=document.querySelector("base"),n="";return e&&e.getAttribute("href")&&(n=k(window.location.href)),n+"#"+m(u+p(t))},push:function(t,e){var n="PUSH",r=v(t,void 0,void 0,V.location);E.confirmTransitionTo(r,n,o,(function(t){if(t){var e=p(r),i=m(u+e);if(I()!==i){x=e,function(t){window.location.hash=t}(i);var o=R.lastIndexOf(p(V.location)),a=R.slice(0,o+1);a.push(e),R=a,O({action:n,location:r})}else O()}}))},replace:function(t,e){var n="REPLACE",r=v(t,void 0,void 0,V.location);E.confirmTransitionTo(r,n,o,(function(t){if(t){var e=p(r),i=m(u+e);I()!==i&&(x=e,C(i));var o=R.indexOf(p(V.location));-1!==o&&(R[o]=e),O({action:n,location:r})}}))},go:M,goBack:function(){M(-1)},goForward:function(){M(1)},block:function(t){void 0===t&&(t=!1);var e=E.setPrompt(t);return U||(F(1),U=!0),function(){return U&&(U=!1,F(-1)),e()}},listen:function(t){var e=E.appendListener(t);return F(1),function(){F(-1),e()}}};return V}function x(t,e,n){return Math.min(Math.max(t,e),n)}function P(t){void 0===t&&(t={});var e=t,n=e.getUserConfirmation,i=e.initialEntries,o=void 0===i?["/"]:i,a=e.initialIndex,s=void 0===a?0:a,u=e.keyLength,c=void 0===u?6:u,l=y();function f(t){Object(r.a)(w,t),w.length=w.entries.length,l.notifyListeners(w.location,w.action)}function h(){return Math.random().toString(36).substr(2,c)}var d=x(s,0,o.length-1),m=o.map((function(t){return v(t,void 0,"string"===typeof t?h():t.key||h())})),g=p;function b(t){var e=x(w.index+t,0,w.entries.length-1),r=w.entries[e];l.confirmTransitionTo(r,"POP",n,(function(t){t?f({action:"POP",location:r,index:e}):f()}))}var w={length:m.length,action:"POP",location:m[d],index:d,entries:m,createHref:g,push:function(t,e){var r="PUSH",i=v(t,e,h(),w.location);l.confirmTransitionTo(i,r,n,(function(t){if(t){var e=w.index+1,n=w.entries.slice(0);n.length>e?n.splice(e,n.length-e,i):n.push(i),f({action:r,location:i,index:e,entries:n})}}))},replace:function(t,e){var r="REPLACE",i=v(t,e,h(),w.location);l.confirmTransitionTo(i,r,n,(function(t){t&&(w.entries[w.index]=i,f({action:r,location:i}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(t){var e=w.index+t;return e>=0&&e<w.entries.length},block:function(t){return void 0===t&&(t=!1),l.setPrompt(t)},listen:function(t){return l.appendListener(t)}};return w}},function(t,e,n){"use strict";!function t(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}(),t.exports=n(74)},function(t,e,n){"use strict";n.d(e,"a",(function(){return m})),n.d(e,"b",(function(){return f})),n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return v})),n.d(e,"e",(function(){return s}));var r=n(46),i=function(){return Math.random().toString(36).substring(7).split("").join(".")},o={INIT:"@@redux/INIT"+i(),REPLACE:"@@redux/REPLACE"+i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+i()}};function a(t){if("object"!==typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function s(t,e,n){var i;if("function"===typeof e&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(
2). This is not supported. Instead, compose them together to a single function.");if("function"===typeof e&&"undefined"===typeof n&&(n=e,e=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error("Expected the enhancer to be a function.");return n(s)(t,e)}if("function"!==typeof t)throw new Error("Expected the reducer to be a function.");var u=t,c=e,l=[],f=l,h=!1;function d(){f===l&&(f=l.slice())}function p(){if(h)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return c}function v(t){if("function"!==typeof t)throw new Error("Expected the listener to be a function.");if(h)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var e=!0;return d(),f.push(t),function(){if(e){if(h)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");e=!1,d();var n=f.indexOf(t);f.splice(n,1),l=null}}}function m(t){if(!a(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"===typeof t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(h)throw new Error("Reducers may not dispatch actions.");try{h=!0,c=u(c,t)}finally{h=!1}for(var e=l=f,n=0;n<e.length;n++){(0,e[n])()}return t}function y(t){if("function"!==typeof t)throw new Error("Expected the nextReducer to be a function.");u=t,m({type:o.REPLACE})}function g(){var t,e=v;return(t={subscribe:function(t){if("object"!==typeof t||null===t)throw new TypeError("Expected the observer to be an object.");function n(){t.next&&t.next(p())}return n(),{unsubscribe:e(n)}}})[r.a]=function(){return this},t}return m({type:o.INIT}),(i={dispatch:m,subscribe:v,getState:p,replaceReducer:y})[r.a]=g,i}function u(t,e){var n=e&&e.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+t+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function c(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var i=e[r];0,"function"===typeof t[i]&&(n[i]=t[i])}var a,s=Object.keys(n);try{!function(t){Object.keys(t).forEach((function(e){var n=t[e];if("undefined"===typeof n(void 0,{type:o.INIT}))throw new Error('Reducer "'+e+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if("undefined"===typeof n(void 0,{type:o.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+e+"\" returned undefined when probed with a random type. Don't try to handle "+o.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(n)}catch(c){a=c}return function(t,e){if(void 0===t&&(t={}),a)throw a;for(var r=!1,i={},o=0;o<s.length;o++){var c=s[o],l=n[c],f=t[c],h=l(f,e);if("undefined"===typeof h){var d=u(c,e);throw new Error(d)}i[c]=h,r=r||h!==f}return(r=r||s.length!==Object.keys(t).length)?i:t}}function l(t,e){return function(){return e(t.apply(this,arguments))}}function f(t,e){if("function"===typeof t)return l(t,e);if("object"!==typeof t||null===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var n={};for(var r in t){var i=t[r];"function"===typeof i&&(n[r]=l(i,e))}return n}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t,e){var n=Object.keys(t);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(t)),e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
2e%2?d(n,!0).forEach((function(e){h(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function v(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function m(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=e.map((function(t){return t(i)}));return p({},n,{dispatch:r=v.apply(void 0,o)(n.dispatch)})}}}},function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"===typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}n.d(e,"a",(function(){return i}))},function(t,e,n){!function(t){"use strict";function e(t){return Array.prototype.slice.call(t)}function n(t){return new Promise((function(e,n){t.onsuccess=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function r(t,e,r){var i,o=new Promise((function(o,a){n(i=t[e].apply(t,r)).then(o,a)}));return o.request=i,o}function i(t,e,n){var i=r(t,e,n);return i.then((function(t){if(t)return new l(t,i.request)}))}function o(t,e,n){n.forEach((function(n){Object.defineProperty(t.prototype,n,{get:function(){return this[e][n]},set:function(t){this[e][n]=t}})}))}function a(t,e,n,i){i.forEach((function(i){i in n.prototype&&(t.prototype[i]=function(){return r(this[e],i,arguments)})}))}function s(t,e,n,r){r.forEach((function(r){r in n.prototype&&(t.prototype[r]=function(){return this[e][r].apply(this[e],arguments)})}))}function u(t,e,n,r){r.forEach((function(r){r in n.prototype&&(t.prototype[r]=function(){return i(this[e],r,arguments)})}))}function c(t){this._index=t}function l(t,e){this._cursor=t,this._request=e}function f(t){this._store=t}function h(t){this._tx=t,this.complete=new Promise((function(e,n){t.oncomplete=function(){e()},t.onerror=function(){n(t.error)},t.onabort=function(){n(t.error)}}))}function d(t,e,n){this._db=t,this.oldVersion=e,this.transaction=new h(n)}function p(t){this._db=t}function v(t,e,n){var i=r(indexedDB,"open",[t,e]),o=i.request;return o&&(o.onupgradeneeded=function(t){n&&n(new d(o.result,t.oldVersion,o.transaction))}),i.then((function(t){return new p(t)}))}function m(t){return r(indexedDB,"deleteDatabase",[t])}o(c,"_index",["name","keyPath","multiEntry","unique"]),a(c,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),u(c,"_index",IDBIndex,["openCursor","o
2penKeyCursor"]),o(l,"_cursor",["direction","key","primaryKey","value"]),a(l,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach((function(t){t in IDBCursor.prototype&&(l.prototype[t]=function(){var e=this,r=arguments;return Promise.resolve().then((function(){return e._cursor[t].apply(e._cursor,r),n(e._request).then((function(t){if(t)return new l(t,e._request)}))}))})})),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(t){[f,c].forEach((function(n){t in n.prototype&&(n.prototype[t.replace("open","iterate")]=function(){var n=e(arguments),r=n[n.length-1],i=this._store||this._index,o=i[t].apply(i,n.slice(0,-1));o.onsuccess=function(){r(o.result)}})}))})),[c,f].forEach((function(t){t.prototype.getAll||(t.prototype.getAll=function(t,e){var n=this,r=[];return new Promise((function(i){n.iterateCursor(t,(function(t){t?(r.push(t.value),void 0===e||r.length!=e?t.continue():i(r)):i(r)}))}))})})),t.openDb=v,t.deleteDb=m,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,n){"use strict";var r=s(n(108)),i=s(n(113)),o=s(n(63)),a=s(n(60));function s(t){return t&&t.__esModule?t:{default:t}}t.exports={Transition:a.default,TransitionGroup:o.default,ReplaceTransition:i.default,CSSTransition:r.default}},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(t,e){for(var n,s,u=a(t),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))i.call(n,l)&&(u[l]=n[l]);if(r){s=r(n);for(var f=0;f<s.length;f++)o.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(t,e,n){"use strict";var r=n(42),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(t){return r.isMemo(t)?a:s[t.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;t.exports=function t(e,n,r){if("string"!==typeof n){if(p){var i=d(n);i&&i!==p&&t(e,i,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var s=u(e),v=u(n),m=0;m<a.length;++m){var y=a[m];if(!o[y]&&(!r||!r[y])&&(!v||!v[y])&&(!s||!s[y])){var g=h(n,y);try{c(e,y,g)}catch(b){}}}}return e}},function(t,e,n){"use strict";(function(e){var r=n(28),i=n(96),o=n(54),a={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:function(){var t;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof e&&"[object process]"===Object.prototype.toString.call(e))&&(t=n(55)),t}(),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)||e&&"application/json"===e["Content-Type"]?(s(e,"application/json"),function(t,e,n){if(r.isString(t))try{return(e||JSON.parse)(t),r.trim(t)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||u.transitional,n=e&&e.silentJSONParsing,i=e&&e.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(s){if(a){if("SyntaxError"===s.name)throw o(s,this,"E_JSON_PARSE");throw s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){u.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){u.headers[t]=r.merge(a)}
2)),t.exports=u}).call(this,n(45))},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){"use strict";t.exports=n(84)},function(t,e,n){"use strict";var r=n(4),i=n.n(r),o=n(38),a=n.n(o),s=function(){return(s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};e.a=function(t){for(var e=t.url,n=t.allowFullScreen,r=t.position,o=t.display,u=t.height,c=t.width,l=t.overflow,f=t.styles,h=t.onLoad,d=t.onMouseOver,p=t.onMouseOut,v=t.scrolling,m=t.id,y=t.frameBorder,g=t.ariaHidden,b=t.sandbox,w=t.allow,_=t.className,E=t.title,O=t.ariaLabel,T=t.ariaLabelledby,S=t.name,k=t.target,I=t.loading,C=t.importance,N=t.referrerpolicy,x=t.allowpaymentrequest,P=t.src,j=a()({src:P||e,target:k||null,style:{position:r||null,display:o||"block",overflow:l||null},scrolling:v||null,allowpaymentrequest:x||null,importance:C||null,sandbox:b||null,loading:I||null,styles:f||null,name:S||null,className:_||null,referrerpolicy:N||null,title:E||null,allow:w||null,id:m||null,"aria-labelledby":T||null,"aria-hidden":g||null,"aria-label":O||null,width:c||null,height:u||null,onLoad:h||null,onMouseOver:d||null,onMouseOut:p||null}),A=Object.create(null),D=0,R=Object.keys(j);D<R.length;D++){var M=R[D];null!=j[M]&&(A[M]=j[M])}for(var L=0,F=Object.keys(A.style);L<F.length;L++){var U=F[L];null==A.style[U]&&delete A.style[U]}if(n)if("allow"in A){var V=A.allow.replace("fullscreen","");A.allow=("fullscreen "+V.trim()).trim()}else A.allow="fullscreen";return y>=0&&(A.style.hasOwnProperty("border")||(A.style.border=y)),i.a.createElement("iframe",s({},A))}},,function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var t=s(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f<e;)u&&u[f].run();f=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function v(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),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=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";(function(t,r){var i,o=n(68);i="undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof t?t:r;var a=Object(o.a)(i);e.a=a}).call(this,n(37),n(51)(t))},function(t,e,n){"use strict";(function(t){var r=n(4),i=n.n(r),o=n(15),a=n(3),s=n.n(a),u=1073741823,c="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:{};function l(t){var e=[];return{on:function(t){e.push(t)},off:function(t){e=e.filter((function(e){return e!==t}))},get:function(){return t},set:function(n,r){t=n,e.forEach((function(e){return e(t,r)}))}}}var f=i.a.createContext||function(t,e){var n,i,a="__create-react-context-"+function(){var t="__global_unique_id__";return c[t]=(c[t]||0)+1}()+"__",f=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).emitter=l(e.props.value),e}Object(o.a)(n,t);var r=n.prototype;return r.getChildContext=function(){var t;return(t={})[a]=this.emitter,t},r.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var n,r=this.props.value,i=t.value;((o=r)===(a=i)?0!==o||1/o===1/a:o!==o&&a!==a)?n=0:(n="function"===typeof e?e(r,i):u,0!==(n|=0)&&this.emitter.set(t.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(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={value:t.getValue()},t.onUpdate=function(e,n){0!==((0|t.observedBits)&n)&&t.setState({value:t.getValue()})},t}Object(o.a)(n,e);var r=n.prototype;return r.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=void 0===e||null===e?u:e},r.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=void 0===t||null===t?u:t},r.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},r.getValue=function(){return this.context[a]?this.context[a].get():t},r.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(r.Component);return h.contextTypes=((i={})[a]=s.a.object,i),{Provider:f,Consumer:h}};e.a=f}).call(this,n(37))},function(t,e,n){var r=n(90);t.exports=d,t.exports.parse=o,t.exports.compile=function(t,e){return s(o(t,e),e)},t.exports.tokensToFunction=s,t.exports.tokensToRegExp=h;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(t,e){for(var n,r=[],o=0,a=0,s="",l=e&&e.delimiter||"/";null!=(n=i.exec(t));){var f=n[0],h=n[1],d=n.index;if(s+=t.slice(a,d),a=d+f.length,h)s+=h[1];else{var p=t[a],v=n[2],m=n[3],y=n[4],g=n[5],b=n[6],w=n[7];s&&(r.push(s),s="");var _=null!=v&&null!=p&&p!==v,E="+"===b||"*"===b,O="?"===b||"*"===b,T=n[2]||l,S=y||g;r.push({name:m||o++,prefix:v||"",delimiter:T,optional:O,repeat:E,partial:_,asterisk:!!w,pattern:S?c(S):w?".*":"[^"+u(T)+"]+?"})}}return a<t.length&&(s+=t.substr(a)),s&&r.push(s),r}function a(t){return encodeURI(t).replace(/[\/?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}function s(t,e){for(var n=new Array(t.length),i=0;i<t.length;i++)"object"===typeof t[i]&&(n[i]=new RegExp("^(?:"+t[i].pattern+")$",f(e)));return function(e,i){for(var o="",s=e||{},u=(i||{}).pretty?a:encodeURIComponent,c=0;c<t.length;c++){var l=t[c];if("string"!==typeof l){var 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(t){return"%"+t.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(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function l(t,e){return t.keys=e,t}function f(t){return t&&t.sensitive?"":"i"}function h(t,e,n){r(e)||(n=e||n,e=[]);for(var i=(n=n||{}).strict,o=!1!==n.end,a="",s=0;s<t.length;s++){var c=t[s];if("string"===typeof c)a+=u(c);else{var h=u(c.prefix),d="(?:"+c.pattern+")";e.push(c),c.repeat&&(d+="(?:"+h+d+")*"),a+=d=c.optional?c.partial?h+"("+d+")?":"(?:"+h+"("+d+"))?":h+"("+d+")"}}var p=u(n.delimiter||"/"),v=a.slice(-p.length)===p;
2return i||(a=(v?a.slice(0,-p.length):a)+"(?:"+p+"(?=$))?"),a+=o?"$":i&&v?"":"(?="+p+"|$)",l(new RegExp("^"+a,f(n)),e)}function d(t,e,n){return r(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(t,e)}(t,e):r(t)?function(t,e,n){for(var r=[],i=0;i<t.length;i++)r.push(d(t[i],e,n).source);return l(new RegExp("(?:"+r.join("|")+")",f(n)),e)}(t,e,n):function(t,e,n){return h(o(t,n),e,n)}(t,e,n)}},function(t,e,n){t.exports=n(91)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o.a}));var r,i,o=n(6),a=(n(87),n(88),n(13)),s=n(2),u=(n(23),n(17)),c=n(14),l={Firestore:u.e,GeoPoint:u.j,Timestamp:u.c,Blob:u.d,Transaction:u.p,WriteBatch:u.a,DocumentReference:u.b,DocumentSnapshot:u.k,Query:u.n,QueryDocumentSnapshot:u.s,QuerySnapshot:u.r,CollectionReference:u.o,FieldPath:u.q,FieldValue:u.m,setLogLevel:u.g,CACHE_SIZE_UNLIMITED:u.i};(function(t,e){t.INTERNAL.registerComponent(new c.a("firestore",(function(t){return function(t,e){return new u.e(t,new u.h(t,e),new u.f)}(t.getProvider("app").getImmediate(),t.getProvider("auth-internal"))}),"PUBLIC").setServiceProps(Object.assign({},l)))})(r=o.a),r.registerVersion("@firebase/firestore","2.1.7"),(i=u.e).prototype.loadBundle=u.l,i.prototype.namedQuery=u.t;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(t){function e(n,r,i){var o=t.call(this,r)||this;return Object.setPrototypeOf(o,e.prototype),o.code=n,o.details=i,o}return Object(f.c)(e,t),e}(Error);var p=function(){function t(t,e){var n=this;this.auth=null,this.messaging=null,this.auth=t.getImmediate({optional:!0}),this.messaging=e.getImmediate({optional:!0}),this.auth||t.get().then((function(t){return n.auth=t}),(function(){})),this.messaging||e.get().then((function(t){return n.messaging=t}),(function(){}))}return t.prototype.getAuthToken=function(){return Object(f.b)(this,void 0,void 0,(function(){var t;return Object(f.d)(this,(function(e){switch(e.label){case 0:if(!this.auth)return[2,void 0];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.auth.getToken()];case 2:return(t=e.sent())?[2,t.accessToken]:[2,void 0];case 3:return e.sent(),[2,void 0];case 4:return[2]}}
2))}))},t.prototype.getInstanceIdToken=function(){return Object(f.b)(this,void 0,void 0,(function(){return Object(f.d)(this,(function(t){if(!this.messaging||!("Notification"in self)||"granted"!==Notification.permission)return[2,void 0];try{return[2,this.messaging.getToken()]}catch(r){return[2,void 0]}return[2]}))}))},t.prototype.getContext=function(){return Object(f.b)(this,void 0,void 0,(function(){var t,e;return Object(f.d)(this,(function(n){switch(n.label){case 0:return[4,this.getAuthToken()];case 1:return t=n.sent(),[4,this.getInstanceIdToken()];case 2:return e=n.sent(),[2,{authToken:t,instanceIdToken:e}]}}))}))},t}();function v(t,e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r]));return n}var m=function(){function t(){}return t.prototype.encode=function(t){var e=this;if(null==t)return null;if(t instanceof Number&&(t=t.valueOf()),"number"===typeof t&&isFinite(t))return t;if(!0===t||!1===t)return t;if("[object String]"===Object.prototype.toString.call(t))return t;if(Array.isArray(t))return t.map((function(t){return e.encode(t)}));if("function"===typeof t||"object"===typeof t)return v(t,(function(t){return e.encode(t)}));throw new Error("Data cannot be encoded in JSON: "+t)},t.prototype.decode=function(t){var e=this;if(null==t)return t;if(t["@type"])switch(t["@type"]){case"type.googleapis.com/google.protobuf.Int64Value":case"type.googleapis.com/google.protobuf.UInt64Value":var n=Number(t.value);if(isNaN(n))throw new Error("Data cannot be decoded from JSON: "+t);return n;default:throw new Error("Data cannot be decoded from JSON: "+t)}return Array.isArray(t)?t.map((function(t){return e.decode(t)})):"function"===typeof t||"object"===typeof t?v(t,(function(t){return e.decode(t)})):t},t}();var y=function(){function t(t,e,n,i,o){var a=this;void 0===i&&(i="us-central1"),this.app_=t,this.fetchImpl=o,this.serializer=new m,this.emulatorOrigin=null,this.INTERNAL={delete:function(){return Promise.resolve(a.deleteService())}},this.contextProvider=new p(e,n),this.cancelAllRequests=new Promise((function(t){a.deleteService=function(){return t()}}));try{var s=new URL(i);this.customDomain=s.origin,this.region="us-central1"}catch(r){this.customDomain=null,this.region=i}}return Object.defineProperty(t.prototype,"app",{get:function(){return this.app_},enumerable:!1,configurable:!0}),t.prototype._url=function(t){var e=this.app_.options.projectId;return null!==this.emulatorOrigin?this.emulatorOrigin+"/"+e+"/"+this.region+"/"+t:null!==this.customDomain?this.customDomain+"/"+t:"https://"+this.region+"-"+e+".cloudfunctions.net/"+t},t.prototype.useEmulator=function(t,e){this.emulatorOrigin="http://"+t+":"+e},t.prototype.useFunctionsEmulator=function(t){this.emulatorOrigin=t},t.prototype.httpsCallable=function(t,e){var n=this;return function(r){return n.call(t,r,e||{})}},t.prototype.postJSON=function(t,e,n){return Object(f.b)(this,void 0,void 0,(function(){var r,i;return Object(f.d)(this,(function(o){switch(o.label){case 0:n["Content-Type"]="application/json",o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.fetchImpl(t,{method:"POST",body:JSON.stringify(e),headers:n})];case 2:return r=o.sent(),[3,4];case 3:return o.sent(),[2,{status:0,json:null}];case 4:i=null,o.label=5;case 5:return o.trys.push([5,7,,8]),[4,r.json()];case 6:return i=o.sent(),[3,8];case 7:return o.sent(),[3,8];case 8:return[2,{status:r.status,json:i}]}}))}))},t.prototype.call=function(t,e,n){return Object(f.b)(this,void 0,void 0,(function(){var i,o,a,s,u,c,l,p,v,m,y;return Object(f.d)(this,(function(f){switch(f.label){case 0:return i=this._url(t),e=this.serializer.encode(e),o={data:e},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(t){var e,n=new Promise((function(n,r){e=setTimeout((function(){r(new d("deadline-exceeded","deadline-exceeded"))}),t)}));return{timer:e,promise:n}}(u),l=c.timer,p=c.promise,[4,Promise.race([g(l,this.postJSON(i,o,a)),p,g(l,this.cancelAllRequests)])];case 2:if(!(v=f.sent()))throw new d("cancelled","Firebase Functions instance was deleted.");
2if(m=function(t,e,n){var i=function(t){if(t>=200&&t<300)return"ok";switch(t){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}(t),o=i,a=void 0;try{var s=e&&e.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)}(v.status,v.json,this.serializer))throw m;if(!v.json)throw new d("internal","Response is not valid JSON object.");if("undefined"===typeof(y=v.json.data)&&(y=v.json.result),"undefined"===typeof y)throw new d("internal","Response is missing data field.");return[2,{data:this.serializer.decode(y)}]}}))}))},t}();function g(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return[4,e];case 1:return n=r.sent(),clearTimeout(t),[2,n]}}))}))}!function(t,e){var n={Functions:y};t.INTERNAL.registerComponent(new c.a("functions",(function(t,n){var r=t.getProvider("app").getImmediate(),i=t.getProvider("auth-internal"),o=t.getProvider("messaging");return new y(r,i,o,n,e)}),"PUBLIC").setServiceProps(n).setMultipleInstances(!0))}(o.a,fetch.bind(self)),o.a.registerVersion("@firebase/functions","0.6.2");var b,w=n(34),_="0.4.20",E=1e4,O="w:0.4.20",T="FIS_v2",S=36e5,k=((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),I=new s.b("installations","Installations",k);function C(t){return t instanceof s.c&&t.code.includes("request-failed")}function N(t){return"https://firebaseinstallations.googleapis.com/v1/projects/"+t.projectId+"/installations"}function x(t){return{token:t.token,requestStatus:2,expiresIn:(e=t.expiresIn,Number(e.replace("s","000"))),creationTime:Date.now()};var e}function P(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,e.json()];case 1:return n=i.sent(),r=n.error,[2,I.create("request-failed",{requestName:t,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})]}}))}))}function j(t){var e=t.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function A(t,e){var n=e.refreshToken,r=j(t);return r.append("Authorization",function(t){return"FIS_v2 "+t}(n)),r}function D(t){return Object(f.b)(this,void 0,void 0,(function(){var e;return Object(f.d)(this,(function(n){switch(n.label){case 0:return[4,t()];case 1:return(e=n.sent()).status>=500&&e.status<600?[2,t()]:[2,e]}}))}))}function R(t,e){var n=e.fid;return Object(f.b)(this,void 0,void 0,(function(){var e,r,i,o,a,s;return Object(f.d)(this,(function(u){switch(u.label){case 0:return e=N(t),r=j(t),i={fid:n,authVersion:T,appId:t.appId,sdkVersion:O},o={method:"POST",headers:r,body:JSON.stringify(i)},[4,D((function(){return fetch(e,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:x(s.authToken)}];case 3:return[4,P("Create Installation",a)];case 4:throw u.sent()}}))}))}function M(t){return new Promise((function(e){setTimeout(e,t)}))}var L=/^[cdef][\w-]{21}$/;function F(){try{var t=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(t),t[0]=112+t[0]%16;var e=function(t){return(e=t,btoa(String.fromCharCode.apply(String,Object(f.f)(e))).replace(/\+/g,"-").replace(/\//g,"_")).substr(0,22);var e}(t);return L.test(e)?e:""}catch(n){return""}}function U(t){return t.appName+"!"+t.appId}var V=new Map;function B(t,e){var n=U(t);q(n,e),function(t,e){var n=W();n&&n.postMessage({key:t,fid:e});H()}(n,e)}function q(t,e){var n,r,i=V.get(t);if(i)try{for(var o=Object(f.h)(i),a=o.next();!a.done;a=o.next()){(0,a.value)(e)}}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 W(){return!z&&"BroadcastChannel"in self&&((z=new BroadcastChannel("[Firebase] FID Change")).onmessage=function(t){q(t.data.key,t.data.fid)}),z}function H(){0===V.size&&z&&(z.close(),z=null)}var G,Y,K="firebase-installations-store",Q=null;function X(){return Q||(Q=Object(w.openDb)("firebase-installations-database",1,(function(t){switch(t.oldVersion){case 0:t.createObjectStore(K)}}))),Q}function $(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r,i,o,a;return Object(f.d)(this,(function(s){switch(s.label){case 0:return n=U(t),[4,X()];case 1:return r=s.sent(),i=r.transaction(K,"readwrite"),[4,(o=i.objectStore(K)).get(n)];case 2:return a=s.sent(),[4,o.put(e,n)];case 3:return s.sent(),[4,i.complete];case 4:return s.sent(),a&&a.fid===e.fid||B(t,e.fid),[2,e]}}))}))}function J(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return e=U(t),[4,X()];case 1:return n=i.sent(),[4,(r=n.transaction(K,"readwrite")).objectStore(K).delete(e)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function Z(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r,i,o,a,s;return Object(f.d)(this,(function(u){switch(u.label){case 0:return n=U(t),[4,X()];case 1:return r=u.sent(),i=r.transaction(K,"readwrite"),[4,(o=i.objectStore(K)).get(n)];case 2:return a=u.sent(),void 0!==(s=e(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(t,s.fid),[2,s]}}))}))}function tt(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,Z(t,(function(n){var r=function(t){return rt(t||{fid:F(),registrationStatus:0})}(n),i=function(t,e){if(0===e.registrationStatus){if(!navigator.onLine)return{installationEntry:e,registrationPromise:Promise.reject(I.create("app-offline"))};var n={fid:e.fid,registrationStatus:1,registrationTime:Date.now()};return{installationEntry:n,registrationPromise:function(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,R(t,e)];case 1:return n=i.sent(),[2,$(t,n)];case 2:return C(r=i.sent())&&409===r.customData.serverCode?[4,J(t)]:[3,4];case 3:return i.sent(),[3,6];case 4:return[4,$(t,{fid:e.fid,registrationStatus:0})];case 5:i.sent(),i.label=6;case 6:throw r;case 7:return[2]}}
2))}))}(t,n)}}return 1===e.registrationStatus?{installationEntry:e,registrationPromise:et(t)}:{installationEntry:e}}(t,r);return e=i.registrationPromise,i.installationEntry}))];case 1:return""!==(n=i.sent()).fid?[3,3]:(r={},[4,e]);case 2:return[2,(r.installationEntry=i.sent(),r)];case 3:return[2,{installationEntry:n,registrationPromise:e}]}}))}))}function et(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r,i;return Object(f.d)(this,(function(o){switch(o.label){case 0:return[4,nt(t)];case 1:e=o.sent(),o.label=2;case 2:return 1!==e.registrationStatus?[3,5]:[4,M(100)];case 3:return o.sent(),[4,nt(t)];case 4:return e=o.sent(),[3,2];case 5:return 0!==e.registrationStatus?[3,7]:[4,tt(t)];case 6:return n=o.sent(),r=n.installationEntry,(i=n.registrationPromise)?[2,i]:[2,r];case 7:return[2,e]}}))}))}function nt(t){return Z(t,(function(t){if(!t)throw I.create("installation-not-found");return rt(t)}))}function rt(t){return 1===(e=t).registrationStatus&&e.registrationTime+E<Date.now()?{fid:t.fid,registrationStatus:0}:t;var e}function it(t,e){var n=t.appConfig,r=t.platformLoggerProvider;return Object(f.b)(this,void 0,void 0,(function(){var t,i,o,a,s,u,c;return Object(f.d)(this,(function(l){switch(l.label){case 0:return t=function(t,e){var n=e.fid;return N(t)+"/"+n+"/authTokens:generate"}(n,e),i=A(n,e),(o=r.getImmediate({optional:!0}))&&i.append("x-firebase-client",o.getPlatformInfoString()),a={installation:{sdkVersion:O}},s={method:"POST",headers:i,body:JSON.stringify(a)},[4,D((function(){return fetch(t,s)}))];case 1:return(u=l.sent()).ok?[4,u.json()]:[3,3];case 2:return c=l.sent(),[2,x(c)];case 3:return[4,P("Generate Auth Token",u)];case 4:throw l.sent()}}))}))}function ot(t,e){return void 0===e&&(e=!1),Object(f.b)(this,void 0,void 0,(function(){var n,r,i;return Object(f.d)(this,(function(o){switch(o.label){case 0:return[4,Z(t.appConfig,(function(r){if(!st(r))throw I.create("not-registered");var i=r.authToken;if(!e&&function(t){return 2===t.requestStatus&&!function(t){var e=Date.now();return e<t.creationTime||t.creationTime+t.expiresIn<e+S}(t)}(i))return r;if(1===i.requestStatus)return n=function(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,at(t.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,at(t.appConfig)];case 4:return n=i.sent(),[3,2];case 5:return 0===(r=n.authToken).requestStatus?[2,ot(t,e)]:[2,r]}}))}))}(t,e),r;if(!navigator.onLine)throw I.create("app-offline");var o=function(t){var e={requestStatus:1,requestTime:Date.now()};return Object(f.a)(Object(f.a)({},t),{authToken:e})}(r);return n=function(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r,i;return Object(f.d)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,8]),[4,it(t,e)];case 1:return n=o.sent(),i=Object(f.a)(Object(f.a)({},e),{authToken:n}),[4,$(t.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(t.appConfig)];case 4:return o.sent(),[3,7];case 5:return i=Object(f.a)(Object(f.a)({},e),{authToken:{requestStatus:0}}),[4,$(t.appConfig,i)];case 6:o.sent(),o.label=7;case 7:throw r;case 8:return[2]}}
2))}))}(t,o),o}))];case 1:return r=o.sent(),n?[4,n]:[3,3];case 2:return i=o.sent(),[3,4];case 3:i=r.authToken,o.label=4;case 4:return[2,i]}}))}))}function at(t){return Z(t,(function(t){if(!st(t))throw I.create("not-registered");var e,n=t.authToken;return 1===(e=n).requestStatus&&e.requestTime+E<Date.now()?Object(f.a)(Object(f.a)({},t),{authToken:{requestStatus:0}}):t}))}function st(t){return void 0!==t&&2===t.registrationStatus}function ut(t){return Object(f.b)(this,void 0,void 0,(function(){var e;return Object(f.d)(this,(function(n){switch(n.label){case 0:return[4,tt(t)];case 1:return(e=n.sent().registrationPromise)?[4,e]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))}function ct(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r,i,o;return Object(f.d)(this,(function(a){switch(a.label){case 0:return n=function(t,e){var n=e.fid;return N(t)+"/"+n}(t,e),r=A(t,e),i={method:"DELETE",headers:r},[4,D((function(){return fetch(n,i)}))];case 1:return(o=a.sent()).ok?[3,3]:[4,P("Delete Installation",o)];case 2:throw a.sent();case 3:return[2]}}
2))}))}function lt(t,e){var n=t.appConfig;return function(t,e){W();var n=U(t),r=V.get(n);r||(r=new Set,V.set(n,r)),r.add(e)}(n,e),function(){!function(t,e){var n=U(t),r=V.get(n);r&&(r.delete(e),0===r.size&&V.delete(n),H())}(n,e)}}function ft(t){return I.create("missing-app-config-values",{valueName:t})}(G=o.a).INTERNAL.registerComponent(new c.a("installations",(function(t){var e=t.getProvider("app").getImmediate(),n={appConfig:function(t){var e,n;if(!t||!t.options)throw ft("App Configuration");if(!t.name)throw ft("App Name");try{for(var r=Object(f.h)(["projectId","apiKey","appId"]),i=r.next();!i.done;i=r.next()){var o=i.value;if(!t.options[o])throw ft(o)}}catch(a){e={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return{appName:t.name,projectId:t.options.projectId,apiKey:t.options.apiKey,appId:t.options.appId}}(e),platformLoggerProvider:t.getProvider("platform-logger")};return{app:e,getId:function(){return function(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,tt(t.appConfig)];case 1:return e=i.sent(),n=e.installationEntry,(r=e.registrationPromise)?r.catch(console.error):ot(t).catch(console.error),[2,n.fid]}}))}))}(n)},getToken:function(t){return function(t,e){return void 0===e&&(e=!1),Object(f.b)(this,void 0,void 0,(function(){return Object(f.d)(this,(function(n){switch(n.label){case 0:return[4,ut(t.appConfig)];case 1:return n.sent(),[4,ot(t,e)];case 2:return[2,n.sent().token]}}))}))}(n,t)},delete:function(){return function(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return[4,Z(e=t.appConfig,(function(t){if(!t||0!==t.registrationStatus)return t}))];case 1:if(!(n=r.sent()))return[3,6];if(1!==n.registrationStatus)return[3,2];throw I.create("delete-pending-registration");case 2:if(2!==n.registrationStatus)return[3,6];if(navigator.onLine)return[3,3];throw I.create("app-offline");case 3:return[4,ct(e,n)];case 4:return r.sent(),[4,J(e)];case 5:r.sent(),r.label=6;case 6:return[2]}}
2))}))}(n)},onIdChange:function(t){return lt(n,t)}}}),"PUBLIC")),G.registerVersion("@firebase/installations",_);var ht,dt=((Y={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',Y["only-available-in-window"]="This method is available in a Window context.",Y["only-available-in-sw"]="This method is available in a service worker context.",Y["permission-default"]="The notification permission was not granted and dismissed instead.",Y["permission-blocked"]="The notification permission was not granted and blocked instead.",Y["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",Y["failed-service-worker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",Y["token-subscribe-failed"]="A problem occurred while subscribing the user to FCM: {$errorInfo}",Y["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",Y["token-unsubscribe-failed"]="A problem occurred while unsubscribing the user from FCM: {$errorInfo}",Y["token-update-failed"]="A problem occurred while updating the user from FCM: {$errorInfo}",Y["token-update-no-token"]="FCM returned no token when updating the user to push.",Y["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.",Y["invalid-sw-registration"]="The input to useServiceWorker() must be a ServiceWorkerRegistration.",Y["invalid-bg-handler"]="The input to setBackgroundMessageHandler() must be a function.",Y["invalid-vapid-key"]="The public VAPID key must be a string.",Y["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.",Y),pt=new s.b("messaging","Messaging",dt),vt="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",mt="google.c.a.c_id";function yt(t){var e=new Uint8Array(t);return btoa(String.fromCharCode.apply(String,Object(f.f)(e))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function gt(t){for(var e=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(e),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}!function(t){t.PUSH_RECEIVED="push-received",t.NOTIFICATION_CLICKED="notification-clicked"}(ht||(ht={}));var bt="fcm_token_details_db",wt="fcm_token_object_Store";function _t(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r=this;return Object(f.d)(this,(function(i){switch(i.label){case 0:return"databases"in indexedDB?[4,indexedDB.databases()]:[3,2];case 1:if(e=i.sent(),!e.map((function(t){return t.name})).includes(bt))return[2,null];i.label=2;case 2:return n=null,[4,Object(w.openDb)(bt,5,(function(e){return Object(f.b)(r,void 0,void 0,(function(){var r,i,o,a;return Object(f.d)(this,(function(s){switch(s.label){case 0:return e.oldVersion<2?[2]:e.objectStoreNames.contains(wt)?[4,(r=e.transaction.objectStore(wt)).index("fcmSenderId").get(t)]:[2];case 1:return i=s.sent(),[4,r.clear()];case 2:if(s.sent(),!i)return[2];if(2===e.oldVersion){if(!(o=i).auth||!o.p256dh||!o.endpoint)return[2];n={token:o.fcmToken,createTime:null!==(a=o.createTime)&&void 0!==a?a:Date.now(),subscriptionOptions:{auth:o.auth,p256dh:o.p256dh,endpoint:o.endpoint,swScope:o.swScope,vapidKey:"string"===typeof o.vapidKey?o.vapidKey:yt(o.vapidKey)}}}else(3===e.oldVersion||4===e.oldVersion)&&(n={token:(o=i).fcmToken,createTime:o.createTime,subscriptionOptions:{auth:yt(o.auth),p256dh:yt(o.p256dh),endpoint:o.endpoint,swScope:o.swScope,vapidKey:yt(o.vapidKey)}});return[2]}}))}))}))];case 3:return i.sent().close(),[4,Object(w.deleteDb)(bt)];case 4:return i.sent(),[4,Object(w.deleteDb)("fcm_vapid_details_db")];case 5:return i.sent(),[4,Object(w.deleteDb)("undefined")];case 6:return i.sent(),[2,Et(n)?n:null]}}))}))}function Et(t){if(!t||!t.subscriptionOptions)return!1;var e=t.subscriptionOptions;return"number"===typeof t.createTime&&t.createTime>0&&"string"===typeof t.token&&t.token.length>0&&"string"===typeof e.auth&&e.auth.length>0&&"string"===typeof e.p256dh&&e.p256dh.length>0&&"string"===typeof e.endpoint&&e.endpoint.length>0&&"string"===typeof e.swScope&&e.swScope.length>0&&"string"===typeof e.vapidKey&&e.vapidKey.length>0}var Ot="firebase-messaging-store",Tt=null;function St(){return Tt||(Tt=Object(w.openDb)("firebase-messaging-database",1,(function(t){switch(t.oldVersion){case 0:t.createObjectStore(Ot)}}))),Tt}function kt(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return e=Nt(t),[4,St()];case 1:return[4,i.sent().transaction(Ot).objectStore(Ot).get(e)];case 2:return(n=i.sent())?[2,n]:[3,3];case 3:return[4,_t(t.appConfig.senderId)];case 4:return(r=i.sent())?[4,It(t,r)]:[3,6];case 5:return i.sent(),[2,r];case 6:return[2]}}
2))}))}function It(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r,i;return Object(f.d)(this,(function(o){switch(o.label){case 0:return n=Nt(t),[4,St()];case 1:return r=o.sent(),[4,(i=r.transaction(Ot,"readwrite")).objectStore(Ot).put(e,n)];case 2:return o.sent(),[4,i.complete];case 3:return o.sent(),[2,e]}}))}))}function Ct(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return e=Nt(t),[4,St()];case 1:return n=i.sent(),[4,(r=n.transaction(Ot,"readwrite")).objectStore(Ot).delete(e)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function Nt(t){return t.appConfig.appId}function xt(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r,i,o,a,s;return Object(f.d)(this,(function(u){switch(u.label){case 0:return[4,Dt(t)];case 1:n=u.sent(),r=Rt(e),i={method:"POST",headers:n,body:JSON.stringify(r)},u.label=2;case 2:return u.trys.push([2,5,,6]),[4,fetch(At(t.appConfig),i)];case 3:return[4,u.sent().json()];case 4:return o=u.sent(),[3,6];case 5:throw a=u.sent(),pt.create("token-subscribe-failed",{errorInfo:a});case 6:if(o.error)throw s=o.error.message,pt.create("token-subscribe-failed",{errorInfo:s});if(!o.token)throw pt.create("token-subscribe-no-token");return[2,o.token]}}))}))}function Pt(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r,i,o,a,s;return Object(f.d)(this,(function(u){switch(u.label){case 0:return[4,Dt(t)];case 1:n=u.sent(),r=Rt(e.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)},u.label=2;case 2:return u.trys.push([2,5,,6]),[4,fetch(At(t.appConfig)+"/"+e.token,i)];case 3:return[4,u.sent().json()];case 4:return o=u.sent(),[3,6];case 5:throw a=u.sent(),pt.create("token-update-failed",{errorInfo:a});case 6:if(o.error)throw s=o.error.message,pt.create("token-update-failed",{errorInfo:s});if(!o.token)throw pt.create("token-update-no-token");return[2,o.token]}}))}))}function jt(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r,i,o,a;return Object(f.d)(this,(function(s){switch(s.label){case 0:return[4,Dt(t)];case 1:n=s.sent(),r={method:"DELETE",headers:n},s.label=2;case 2:return s.trys.push([2,5,,6]),[4,fetch(At(t.appConfig)+"/"+e,r)];case 3:return[4,s.sent().json()];case 4:if((i=s.sent()).error)throw o=i.error.message,pt.create("token-unsubscribe-failed",{errorInfo:o});return[3,6];case 5:throw a=s.sent(),pt.create("token-unsubscribe-failed",{errorInfo:a});case 6:return[2]}}
2))}))}function At(t){return"https://fcmregistrations.googleapis.com/v1/projects/"+t.projectId+"/registrations"}function Dt(t){var e=t.appConfig,n=t.installations;return Object(f.b)(this,void 0,void 0,(function(){var t;return Object(f.d)(this,(function(r){switch(r.label){case 0:return[4,n.getToken()];case 1:return t=r.sent(),[2,new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e.apiKey,"x-goog-firebase-installations-auth":"FIS "+t})]}}))}))}function Rt(t){var e=t.p256dh,n=t.auth,r=t.endpoint,i=t.vapidKey,o={web:{endpoint:r,auth:n,p256dh:e}};return i!==vt&&(o.web.applicationPubKey=i),o}function Mt(t,e,n){return Object(f.b)(this,void 0,void 0,(function(){var r,i,o,a;return Object(f.d)(this,(function(s){switch(s.label){case 0:if("granted"!==Notification.permission)throw pt.create("permission-blocked");return[4,Vt(e,n)];case 1:return r=s.sent(),[4,kt(t)];case 2:return i=s.sent(),o={vapidKey:n,swScope:e.scope,endpoint:r.endpoint,auth:yt(r.getKey("auth")),p256dh:yt(r.getKey("p256dh"))},i?[3,3]:[2,Ut(t,o)];case 3:if(function(t,e){var n=e.vapidKey===t.vapidKey,r=e.endpoint===t.endpoint,i=e.auth===t.auth,o=e.p256dh===t.p256dh;return n&&r&&i&&o}(i.subscriptionOptions,o))return[3,8];s.label=4;case 4:return s.trys.push([4,6,,7]),[4,jt(t,i.token)];case 5:return s.sent(),[3,7];case 6:return a=s.sent(),console.warn(a),[3,7];case 7:return[2,Ut(t,o)];case 8:return Date.now()>=i.createTime+6048e5?[2,Ft({token:i.token,createTime:Date.now(),subscriptionOptions:o},t,e)]:[2,i.token];case 9:return[2]}}
2))}))}function Lt(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,kt(t)];case 1:return(n=i.sent())?[4,jt(t,n.token)]:[3,4];case 2:return i.sent(),[4,Ct(t)];case 3:i.sent(),i.label=4;case 4:return[4,e.pushManager.getSubscription()];case 5:return(r=i.sent())?[2,r.unsubscribe()]:[2,!0]}}))}))}function Ft(t,e,n){return Object(f.b)(this,void 0,void 0,(function(){var r,i,o;return Object(f.d)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,5]),[4,Pt(e,t)];case 1:return r=a.sent(),i=Object(f.a)(Object(f.a)({},t),{token:r,createTime:Date.now()}),[4,It(e,i)];case 2:return a.sent(),[2,r];case 3:return o=a.sent(),[4,Lt(e,n)];case 4:throw a.sent(),o;case 5:return[2]}}))}))}function Ut(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,xt(t,e)];case 1:return n=i.sent(),r={token:n,createTime:Date.now(),subscriptionOptions:e},[4,It(t,r)];case 2:return i.sent(),[2,r.token]}}))}))}function Vt(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return[4,t.pushManager.getSubscription()];case 1:return(n=r.sent())?[2,n]:[2,t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:gt(e)})]}}))}))}function Bt(t){return"object"===typeof t&&!!t&&mt in t}function qt(t){return new Promise((function(e){setTimeout(e,t)}))}var zt=function(){function t(t){var e=this;this.firebaseDependencies=t,this.isOnBackgroundMessageUsed=null,this.vapidKey=null,this.bgMessageHandler=null,self.addEventListener("push",(function(t){t.waitUntil(e.onPush(t))})),self.addEventListener("pushsubscriptionchange",(function(t){t.waitUntil(e.onSubChange(t))})),self.addEventListener("notificationclick",(function(t){t.waitUntil(e.onNotificationClick(t))}))}return Object.defineProperty(t.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),t.prototype.setBackgroundMessageHandler=function(t){if(this.isOnBackgroundMessageUsed=!1,!t||"function"!==typeof t)throw pt.create("invalid-bg-handler");this.bgMessageHandler=t},t.prototype.onBackgroundMessage=function(t){var e=this;return this.isOnBackgroundMessageUsed=!0,this.bgMessageHandler=t,function(){e.bgMessageHandler=null}},t.prototype.getToken=function(){var t,e;return Object(f.b)(this,void 0,void 0,(function(){var n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return this.vapidKey?[3,2]:[4,kt(this.firebaseDependencies)];case 1:n=r.sent(),this.vapidKey=null!==(e=null===(t=null===n||void 0===n?void 0:n.subscriptionOptions)||void 0===t?void 0:t.vapidKey)&&void 0!==e?e:vt,r.label=2;case 2:return[2,Mt(this.firebaseDependencies,self.registration,this.vapidKey)]}}))}))},t.prototype.deleteToken=function(){return Lt(this.firebaseDependencies,self.registration)},t.prototype.requestPermission=function(){throw pt.create("only-available-in-window")},t.prototype.usePublicVapidKey=function(t){if(null!==this.vapidKey)throw pt.create("use-vapid-key-after-get-token");if("string"!==typeof t||0===t.length)throw pt.create("invalid-vapid-key");this.vapidKey=t},t.prototype.useServiceWorker=function(){throw pt.create("only-available-in-window")},t.prototype.onMessage=function(){throw pt.create("only-available-in-window")},t.prototype.onTokenRefresh=function(){throw pt.create("only-available-in-window")},t.prototype.onPush=function(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r,i;return Object(f.d)(this,(function(o){switch(o.label){case 0:return(e=function(t){var e=t.data;if(!e)return null;try{return e.json()}catch(n){return null}}(t))?[4,Yt()]:(console.debug("FirebaseMessaging: failed to get parsed MessagePayload from the PushEvent. Skip handling the push."),[2]);case 1:return function(t){return t.some((function(t){return"visible"===t.visibilityState&&!t.url.startsWith("chrome-extension://")}))}(n=o.sent())?[2,Gt(n,e)]:(r=!1,e.notification?[4,Kt(Wt(e))]:[3,3]);case 2:o.sent(),r=!0,o.label=3;
2case 3:return!0===r&&!1===this.isOnBackgroundMessageUsed?[2]:(this.bgMessageHandler&&(i=function(t){var e={from:t.from,collapseKey:t.collapse_key};return function(t,e){if(e.notification){t.notification={};var n=e.notification.title;n&&(t.notification.title=n);var r=e.notification.body;r&&(t.notification.body=r);var i=e.notification.image;i&&(t.notification.image=i)}}(e,t),function(t,e){e.data&&(t.data=e.data)}(e,t),function(t,e){if(e.fcmOptions){t.fcmOptions={};var n=e.fcmOptions.link;n&&(t.fcmOptions.link=n);var r=e.fcmOptions.analytics_label;r&&(t.fcmOptions.analyticsLabel=r)}}(e,t),e}(e),"function"===typeof this.bgMessageHandler?this.bgMessageHandler(i):this.bgMessageHandler.next(i)),[4,qt(1e3)]);case 4:return o.sent(),[2]}}))}))},t.prototype.onSubChange=function(t){var e,n;return Object(f.b)(this,void 0,void 0,(function(){var r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return t.newSubscription?[3,2]:[4,Lt(this.firebaseDependencies,self.registration)];case 1:return i.sent(),[2];case 2:return[4,kt(this.firebaseDependencies)];case 3:return r=i.sent(),[4,Lt(this.firebaseDependencies,self.registration)];case 4:return i.sent(),[4,Mt(this.firebaseDependencies,self.registration,null!==(n=null===(e=null===r||void 0===r?void 0:r.subscriptionOptions)||void 0===e?void 0:e.vapidKey)&&void 0!==n?n:vt)];case 5:return i.sent(),[2]}}))}))},t.prototype.onNotificationClick=function(t){var e,n;return Object(f.b)(this,void 0,void 0,(function(){var r,i,o,a,s;return Object(f.d)(this,(function(u){switch(u.label){case 0:return(r=null===(n=null===(e=t.notification)||void 0===e?void 0:e.data)||void 0===n?void 0:n.FCM_MSG)?t.action?[2]:(t.stopImmediatePropagation(),t.notification.close(),(i=function(t){var e,n,r,i=null!==(n=null===(e=t.fcmOptions)||void 0===e?void 0:e.link)&&void 0!==n?n:null===(r=t.notification)||void 0===r?void 0:r.click_action;if(i)return i;return Bt(t.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,Ht(o)]):[2]):[2];case 1:return(s=u.sent())?[3,4]:[4,self.clients.openWindow(i)];case 2:return s=u.sent(),[4,qt(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=ht.NOTIFICATION_CLICKED,r.isFirebaseMessaging=!0,[2,s.postMessage(r)]):[2]}}))}))},t}();function Wt(t){var e,n=Object(f.a)({},t.notification);return n.data=((e={}).FCM_MSG=t,e),n}function Ht(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r,i,o,a,s;return Object(f.d)(this,(function(u){switch(u.label){case 0:return[4,Yt()];case 1:e=u.sent();try{for(n=Object(f.h)(e),r=n.next();!r.done;r=n.next())if(i=r.value,o=new URL(i.url,self.location.href),t.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 Gt(t,e){var n,r;e.isFirebaseMessaging=!0,e.messageType=ht.PUSH_RECEIVED;try{for(var i=Object(f.h)(t),o=i.next();!o.done;o=i.next()){o.value.postMessage(e)}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function Yt(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function Kt(t){var e,n=t.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!==(e=t.title)&&void 0!==e?e:"",t)}var Qt=function(){function t(t){var e=this;this.firebaseDependencies=t,this.vapidKey=null,this.onMessageCallback=null,navigator.serviceWorker.addEventListener("message",(function(t){return e.messageEventListener(t)}))}return Object.defineProperty(t.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),t.prototype.messageEventListener=function(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return(e=t.data).isFirebaseMessaging?(this.onMessageCallback&&e.messageType===ht.PUSH_RECEIVED&&("function"===typeof this.onMessageCallback?this.onMessageCallback(function(t){return delete t.messageType,delete t.isFirebaseMessaging,t}(Object.assign({},e))):this.onMessageCallback.next(Object.assign({},e))),Bt(n=e.data)&&"1"===n["google.c.a.e"]?[4,this.logEvent(e.messageType,n)]:[3,2]):[2];case 1:r.sent(),r.label=2;case 2:return[2]}}
2))}))},t.prototype.getVapidKey=function(){return this.vapidKey},t.prototype.getSwReg=function(){return this.swRegistration},t.prototype.getToken=function(t){return Object(f.b)(this,void 0,void 0,(function(){return Object(f.d)(this,(function(e){switch(e.label){case 0:return"default"!==Notification.permission?[3,2]:[4,Notification.requestPermission()];case 1:e.sent(),e.label=2;case 2:if("granted"!==Notification.permission)throw pt.create("permission-blocked");return[4,this.updateVapidKey(null===t||void 0===t?void 0:t.vapidKey)];case 3:return e.sent(),[4,this.updateSwReg(null===t||void 0===t?void 0:t.serviceWorkerRegistration)];case 4:return e.sent(),[2,Mt(this.firebaseDependencies,this.swRegistration,this.vapidKey)]}}))}))},t.prototype.updateVapidKey=function(t){return Object(f.b)(this,void 0,void 0,(function(){return Object(f.d)(this,(function(e){return t?this.vapidKey=t:this.vapidKey||(this.vapidKey=vt),[2]}))}))},t.prototype.updateSwReg=function(t){return Object(f.b)(this,void 0,void 0,(function(){return Object(f.d)(this,(function(e){switch(e.label){case 0:return t||this.swRegistration?[3,2]:[4,this.registerDefaultSw()];case 1:e.sent(),e.label=2;case 2:if(!t&&this.swRegistration)return[2];if(!(t instanceof ServiceWorkerRegistration))throw pt.create("invalid-sw-registration");return this.swRegistration=t,[2]}}))}))},t.prototype.registerDefaultSw=function(){return Object(f.b)(this,void 0,void 0,(function(){var t,e;return Object(f.d)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=this,[4,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"})];case 1:return t.swRegistration=n.sent(),this.swRegistration.update().catch((function(){})),[3,3];case 2:throw e=n.sent(),pt.create("failed-service-worker-registration",{browserErrorMessage:e.message});case 3:return[2]}}
2))}))},t.prototype.deleteToken=function(){return Object(f.b)(this,void 0,void 0,(function(){return Object(f.d)(this,(function(t){switch(t.label){case 0:return this.swRegistration?[3,2]:[4,this.registerDefaultSw()];case 1:t.sent(),t.label=2;case 2:return[2,Lt(this.firebaseDependencies,this.swRegistration)]}}))}))},t.prototype.requestPermission=function(){return Object(f.b)(this,void 0,void 0,(function(){var t;return Object(f.d)(this,(function(e){switch(e.label){case 0:return"granted"===Notification.permission?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(t=e.sent()))return[2];throw"denied"===t?pt.create("permission-blocked"):pt.create("permission-default")}}))}))},t.prototype.usePublicVapidKey=function(t){if(null!==this.vapidKey)throw pt.create("use-vapid-key-after-get-token");if("string"!==typeof t||0===t.length)throw pt.create("invalid-vapid-key");this.vapidKey=t},t.prototype.useServiceWorker=function(t){if(!(t instanceof ServiceWorkerRegistration))throw pt.create("invalid-sw-registration");if(this.swRegistration)throw pt.create("use-sw-after-get-token");this.swRegistration=t},t.prototype.onMessage=function(t){var e=this;return this.onMessageCallback=t,function(){e.onMessageCallback=null}},t.prototype.setBackgroundMessageHandler=function(){throw pt.create("only-available-in-sw")},t.prototype.onBackgroundMessage=function(){throw pt.create("only-available-in-sw")},t.prototype.onTokenRefresh=function(){return function(){}},t.prototype.logEvent=function(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return n=function(t){switch(t){case ht.NOTIFICATION_CLICKED:return"notification_open";case ht.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}(t),[4,this.firebaseDependencies.analyticsProvider.get()];case 1:return r.sent().logEvent(n,{message_id:e["google.c.a.c_id"],message_name:e["google.c.a.c_l"],message_time:e["google.c.a.ts"],message_device_time:Math.floor(Date.now()/1e3)}),[2]}}))}))},t}();function Xt(t){return pt.create("missing-app-config-values",{valueName:t})}var $t={isSupported:Jt};function Jt(){return self&&"ServiceWorkerGlobalScope"in self?"indexedDB"in self&&null!==indexedDB&&"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"):"indexedDB"in window&&null!==indexedDB&&navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}o.a.INTERNAL.registerComponent(new c.a("messaging",(function(t){var e=t.getProvider("app").getImmediate(),n={app:e,appConfig:function(t){var e,n;if(!t||!t.options)throw Xt("App Configuration Object");if(!t.name)throw Xt("App Name");var r=t.options;try{for(var i=Object(f.h)(["projectId","apiKey","appId","messagingSenderId"]),o=i.next();!o.done;o=i.next()){var a=o.value;if(!r[a])throw Xt(a)}}catch(s){e={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return{appName:t.name,projectId:r.projectId,apiKey:r.apiKey,appId:r.appId,senderId:r.messagingSenderId}}(e),installations:t.getProvider("installations").getImmediate(),analyticsProvider:t.getProvider("analytics-internal")};if(!Jt())throw pt.create("unsupported-browser");return self&&"ServiceWorkerGlobalScope"in self?new zt(n):new Qt(n)}),"PUBLIC").setServiceProps($t));var Zt="firebasestorage.googleapis.com",te=function(t){function e(n,r){var i=t.call(this,ee(n),"Firebase Storage: "+r+" ("+ee(n)+")")||this;return i.customData={serverResponse:null},Object.setPrototypeOf(i,e.prototype),i}return Object(f.c)(e,t),e.prototype._codeEquals=function(t){return ee(t)===this.code},Object.defineProperty(e.prototype,"message",{get:function(){return this.customData.serverResponse?this.message+"\n"+this.customData.serverResponse:this.message},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"serverResponse",{get:function(){return this.customData.serverResponse},set:function(t){this.customData.serverResponse=t}
2,enumerable:!1,configurable:!0}),e}(s.c);function ee(t){return"storage/"+t}function ne(){return new te("unknown","An unknown error occurred, please check the error payload for server response.")}function re(){return new te("canceled","User canceled the upload/download.")}function ie(){return new te("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.")}function oe(t){return new te("invalid-argument",t)}function ae(){return new te("app-deleted","The Firebase app was deleted.")}function se(t){return new te("invalid-root-operation","The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function ue(t,e){return new te("invalid-format","String does not match format '"+t+"': "+e)}function ce(t){throw new te("internal-error","Internal error: "+t)}var le={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},fe=function(t,e){this.data=t,this.contentType=e||null};function he(t,e){switch(t){case le.RAW:return new fe(de(e));case le.BASE64:case le.BASE64URL:return new fe(pe(t,e));case le.DATA_URL:return new fe(function(t){var e=new ve(t);return e.base64?pe(le.BASE64,e.rest):function(t){var e;try{e=decodeURIComponent(t)}catch(r){throw ue(le.DATA_URL,"Malformed data URL.")}return de(e)}(e.rest)}(e),new ve(e).contentType)}throw ne()}function de(t){for(var e=[],n=0;n<t.length;n++){var r=t.charCodeAt(n);if(r<=127)e.push(r);else if(r<=2047)e.push(192|r>>6,128|63&r);else if(55296===(64512&r))if(n<t.length-1&&56320===(64512&t.charCodeAt(n+1)))r=65536|(1023&r)<<10|1023&t.charCodeAt(++n),e.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r);else e.push(239,191,189);else 56320===(64512&r)?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(e)}function pe(t,e){switch(t){case le.BASE64:var n=-1!==e.indexOf("-"),i=-1!==e.indexOf("_");if(n||i)throw ue(t,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break;case le.BASE64URL:var o=-1!==e.indexOf("+"),a=-1!==e.indexOf("/");if(o||a)throw ue(t,"Invalid character '"+(o?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/")}var s;try{s=atob(e)}catch(r){throw ue(t,"Invalid character found")}for(var u=new Uint8Array(s.length),c=0;c<s.length;c++)u[c]=s.charCodeAt(c);return u}var ve=function(t){this.base64=!1,this.contentType=null;var e=t.match(/^data:([^,]+)?,/);if(null===e)throw ue(le.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");var n=e[1]||null;null!=n&&(this.base64=(r=n,i=";base64",r.length>=i.length&&r.substring(r.length-i.length)===i),this.contentType=this.base64?n.substring(0,n.length-";base64".length):n),this.rest=t.substring(t.indexOf(",")+1);var r,i};var me,ye={STATE_CHANGED:"state_changed"},ge={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function be(t){switch(t){case"running":case"pausing":case"canceling":return ge.RUNNING;case"paused":return ge.PAUSED;case"success":return ge.SUCCESS;case"canceled":return ge.CANCELED;case"error":default:return ge.ERROR}}!function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"}(me||(me={}));var we=function(){function t(){var t=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=me.NO_ERROR,this.sendPromise_=new Promise((function(e){t.xhr_.addEventListener("abort",(function(){t.errorCode_=me.ABORT,e(t)})),t.xhr_.addEventListener("error",(function(){t.errorCode_=me.NETWORK_ERROR,e(t)})),t.xhr_.addEventListener("load",(function(){e(t)}))}))}return t.prototype.send=function(t,e,n,r){if(this.sent_)throw ce("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(e,t,!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_},t.prototype.getErrorCode=function(){if(!this.sent_)throw ce("cannot .getErrorCode() before sending");return this.errorCode_},t.prototype.getStatus=function(){if(!this.sent_)throw ce("cannot .getStatus() before sending");try{return this.xhr_.status}catch(r){return-1}},t.prototype.getResponseText=function(){if(!this.sent_)throw ce("cannot .getResponseText() before sending");return this.xhr_.responseText},t.prototype.abort=function(){this.xhr_.abort()},t.prototype.getResponseHeader=function(t){return this.xhr_.getResponseHeader(t)},t.prototype.addUploadProgressListener=function(t){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",t)},t.prototype.removeUploadProgressListener=function(t){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",t)},t}(),_e=function(){function t(){}return t.prototype.createXhrIo=function(){return new we},t}();function Ee(t){return"string"===typeof t||t instanceof String}function Oe(t){return Te()&&t instanceof Blob}function Te(){return"undefined"!==typeof Blob}function Se(t,e,n,r){if(r<e)throw oe("Invalid value for '"+t+"'. Expected "+e+" or greater.");if(r>n)throw oe("Invalid value for '"+t+"'. Expected "+n+" or less.")}function ke(){return"undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof WebKitBlobBuilder?Web
2KitBlobBuilder:void 0}function Ie(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ke();if(void 0!==n){for(var r=new n,i=0;i<t.length;i++)r.append(t[i]);return r.getBlob()}if(Te())return new Blob(t);throw new te("unsupported-environment","This browser doesn't seem to support creating Blobs")}var Ce=function(){function t(t,e){var n=0,r="";Oe(t)?(this.data_=t,n=t.size,r=t.type):t instanceof ArrayBuffer?(e?this.data_=new Uint8Array(t):(this.data_=new Uint8Array(t.byteLength),this.data_.set(new Uint8Array(t))),n=this.data_.length):t instanceof Uint8Array&&(e?this.data_=t:(this.data_=new Uint8Array(t.length),this.data_.set(t)),n=t.length),this.size_=n,this.type_=r}return t.prototype.size=function(){return this.size_},t.prototype.type=function(){return this.type_},t.prototype.slice=function(e,n){if(Oe(this.data_)){var r=function(t,e,n){return t.webkitSlice?t.webkitSlice(e,n):t.mozSlice?t.mozSlice(e,n):t.slice?t.slice(e,n):null}(this.data_,e,n);return null===r?null:new t(r)}return new t(new Uint8Array(this.data_.buffer,e,n-e),!0)},t.getBlob=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(Te()){var r=e.map((function(e){return e instanceof t?e.data_:e}));return new t(Ie.apply(null,r))}var i=e.map((function(t){return Ee(t)?he(le.RAW,t).data:t.data_})),o=0;i.forEach((function(t){o+=t.byteLength}));var a=new Uint8Array(o),s=0;return i.forEach((function(t){for(var e=0;e<t.length;e++)a[s++]=t[e]})),new t(a,!0)},t.prototype.uploadData=function(){return this.data_},t}(),Ne=function(){function t(t,e){this.bucket=t,this.path_=e}return Object.defineProperty(t.prototype,"path",{get:function(){return this.path_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRoot",{get:function(){return 0===this.path.length},enumerable:!1,configurable:!0}),t.prototype.fullServerUrl=function(){var t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)},t.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},t.makeFromBucketSpec=function(e){var n;try{n=t.makeFromUrl(e)}catch(r){return new t(e,"")}if(""===n.path)return n;throw new te("invalid-default-bucket","Invalid default bucket '"+e+"'.")},t.makeFromUrl=function(e){var n=null,r="([A-Za-z0-9.\\-_]+)";var i=new RegExp("^gs://"+r+"(/(.*))?$","i");function o(t){t.path_=decodeURIComponent(t.path)}for(var a=Zt.replace(/[.]/g,"\\."),s=[{regex:i,indices:{bucket:1,path:3},postModify:function(t){"/"===t.path.charAt(t.path.length-1)&&(t.path_=t.path_.slice(0,-1))}},{regex:new RegExp("^https?://"+a+"/v[A-Za-z0-9_]+/b/"+r+"/o(/([^?#]*).*)?$","i"),indices:{bucket:1,path:3},postModify:o},{regex:new RegExp("^https?://(?:storage.googleapis.com|storage.cloud.google.com)/"+r+"/([^?#]*)","i"),indices:{bucket:1,path:2},postModify:o}],u=0;u<s.length;u++){var c=s[u],l=c.regex.exec(e);if(l){var f=l[c.indices.bucket],h=l[c.indices.path];h||(h=""),n=new t(f,h),c.postModify(n);break}}if(null==n)throw function(t){return new te("invalid-url","Invalid URL '"+t+"'.")}(e);return n},t}();function xe(t){var e,n;try{e=JSON.parse(t)}catch(r){return null}return"object"!==typeof(n=e)||Array.isArray(n)?null:e}function Pe(t){var e=t.lastIndexOf("/",t.length-2);return-1===e?t:t.slice(e+1)}function je(t){return"https://"+Zt+"/v0"+t}function Ae(t){var e=encodeURIComponent,n="?";for(var r in t){if(t.hasOwnProperty(r))n=n+(e(r)+"="+e(t[r]))+"&"}return n=n.slice(0,-1)}function De(t,e){return e}var Re=function(t,e,n,r){this.server=t,this.local=e||t,this.writable=!!n,this.xform=r||De},Me=null;function Le(){if(Me)return Me;var t=[];t.push(new Re("bucket")),t.push(new Re("generation")),t.push(new Re("metageneration")),t.push(new Re("name","fullPath",!0));var e=new Re("name");e.xform=function(t,e){return function(t){return!Ee(t)||t.length<2?t:Pe(t)}(e)},t.push(e);var n=new Re("size");return n.xform=function(t,e){return void 0!==e?Number(e):e},t.push(n),t.push(new Re("timeCreated")),t.push(new Re("updated")),t.push(new Re("md5Hash",null,!0)),t.push(new Re("cacheControl",null,!0)),t.push(new Re("contentDisposition",null,!0)),t.push(new Re("contentEncoding",null,!0)),t.push(new Re("contentLanguage",null,!0)),t.push(new Re("contentType",null,!0)),t.push(new Re("metadata","customMetadata",!0)),Me=t}function Fe(t,e,n){for(var r={type:"file"},i=n.length,o=0;o<i;o++){var a=n[o];r[a.local]=a.xform(r,e[a.server])}return function(t,e){Object.defineProperty(t,"ref",{get:function(){var n=t.bucket,r=t.fullPath,i=new Ne(n,r);return e._makeStorageReference(i)}})}(r,t),r}function Ue(t,e,n){var r=xe(e);return null===r?null:Fe(t,r,n)}function Ve(t,e){for(var n={},r=e.length,i=0;i<r;i++){var o=e[i];o.writable&&(n[o.server]=t[o.local])}return JSON.stringify(n)}function Be(t,e,n){var r=xe(n);return null===r?null:function(t,e,n){var r={prefixes:[],items:[],nextPageToken:n.nextPageToken};if(n.prefixes)for(var i=0,o=n.prefixes;i<o.length;i++){var a=o[i].replace(/\/$/,""),s=t._makeStorageReference(new Ne(e,a));r.prefixes.push(s)}if(n.items)for(var u=0,c=n.items;u<c.length;u++){var l=c[u];s=t._makeStorageReference(new Ne(e,l.name)),r.items.push(s)}return r}(t,e,r)}var qe=function(t,e,n,r){this.url=t,this.method=e,this.handler=n,this.timeout=r,this.urlParam
2s={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]};function ze(t){if(!t)throw ne()}function We(t,e){return function(n,r){var i=Ue(t,r,e);return ze(null!==i),i}}function He(t,e){return function(n,r){var i=Ue(t,r,e);return ze(null!==i),function(t,e){var n=xe(e);if(null===n)return null;if(!Ee(n.downloadTokens))return null;var r=n.downloadTokens;if(0===r.length)return null;var i=encodeURIComponent;return r.split(",").map((function(e){var n=t.bucket,r=t.fullPath;return je("/b/"+i(n)+"/o/"+i(r))+Ae({alt:"media",token:e})}))[0]}(i,r)}}function Ge(t){return function(e,n){var r,i,o;return 401===e.getStatus()?r=new te("unauthenticated","User is not authenticated, please authenticate using Firebase Authentication and try again."):402===e.getStatus()?(o=t.bucket,r=new te("quota-exceeded","Quota for bucket '"+o+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===e.getStatus()?(i=t.path,r=new te("unauthorized","User does not have permission to access '"+i+"'.")):r=n,r.serverResponse=n.serverResponse,r}}function Ye(t){var e=Ge(t);return function(n,r){var i,o=e(n,r);return 404===n.getStatus()&&(i=t.path,o=new te("object-not-found","Object '"+i+"' does not exist.")),o.serverResponse=r.serverResponse,o}}function Ke(t,e,n){var r=je(e.fullServerUrl()),i=t.maxOperationRetryTime,o=new qe(r,"GET",We(t,n),i);return o.errorHandler=Ye(e),o}function Qe(t,e,n,r,i){var o={};e.isRoot?o.prefix="":o.prefix=e.path+"/",n&&n.length>0&&(o.delimiter=n),r&&(o.pageToken=r),i&&(o.maxResults=i);var a=je(e.bucketOnlyServerUrl()),s=t.maxOperationRetryTime,u=new qe(a,"GET",function(t,e){return function(n,r){var i=Be(t,e,r);return ze(null!==i),i}}(t,e.bucket),s);return u.urlParams=o,u.errorHandler=Ge(e),u}function Xe(t,e,n){var r=Object.assign({},n);return r.fullPath=t.path,r.size=e.size(),r.contentType||(r.contentType=function(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}(null,e)),r}var $e=function(t,e,n,r){this.current=t,this.total=e,this.finalized=!!n,this.metadata=r||null};function Je(t,e){var n=null;try{n=t.getResponseHeader("X-Goog-Upload-Status")}catch(r){ze(!1)}return ze(!!n&&-1!==(e||["active"]).indexOf(n)),n}var Ze=262144;function tn(t,e,n,r,i,o,a,s){var u=new $e(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 te("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 ie();var v=e.maxUploadRetryTime,m=new qe(n,"POST",(function(t,n){var i,a=Je(t,["active","final"]),s=u.current+l,c=r.size();return i="final"===a?We(e,o)(t,n):null,new $e(s,c,"final"===a,i)}),v);return m.headers=d,m.body=p.uploadData(),m.progressCallback=s||null,m.errorHandler=Ge(t),m}var en=function(t,e,n){if("function"===typeof t||null!=e||null!=n)this.next=t,this.error=e,this.complete=n;else{var r=t;this.next=r.next,this.error=r.error,this.complete=r.complete}};function nn(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];Promise.resolve().then((function(){return t.apply(void 0,e)}))}}var rn=function(){function t(t,e,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=t,this._blob=e,this._metadata=n,this._mappings=Le(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=function(t){r._request=void 0,r._chunkMultiplier=1,t._codeEquals("canceled")?(r._needToFetchStatus=!0,r.completeTransitions_()):(r._error=t,r._transition("error"))},this._metadataErrorHandler=function(t){r._request=void 0,t._codeEquals("canceled")?r.completeTransitions_():(r._error=t,r._transition("error"))},this._promise=new Promise((function(t,e){r._resolve=t,r._reject=e,r._start()})),this._promise.then(null,(function(){}))}return t.prototype._makeProgressCallback=function(){var t=this,e=this._transferred;return function(n){return t._updateProgress(e+n)}},t.prototype._shouldDoResumable=function(t){return t.size()>262144},t.prototype._start=function(){"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())},t.prototype._resolveToken=function(t){var e=this;this._ref.storage._getAuthToken().then((function(n){switch(e._state){case"running":t(n);break;case"canceling":e._transition("canceled");break;case"pausing":e._transition("paused")}}))},t.prototype._createResumable=function(){var t=this;this._resolveToken((function(e){var n=function(t,e,n,i,o){var a=e.bucketOnlyServerUrl(),s=Xe(e,i,o),u={name:s.fullPath}
2,c=je(a),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=Ve(s,n),h=t.maxUploadRetryTime,d=new qe(c,"POST",(function(t){var e;Je(t);try{e=t.getResponseHeader("X-Goog-Upload-URL")}catch(r){ze(!1)}return ze(Ee(e)),e}),h);return d.urlParams=u,d.headers=l,d.body=f,d.errorHandler=Ge(e),d}(t._ref.storage,t._ref._location,t._mappings,t._blob,t._metadata),i=t._ref.storage._makeRequest(n,e);t._request=i,i.getPromise().then((function(e){t._request=void 0,t._uploadUrl=e,t._needToFetchStatus=!1,t.completeTransitions_()}),t._errorHandler)}))},t.prototype._fetchStatus=function(){var t=this,e=this._uploadUrl;this._resolveToken((function(n){var i=function(t,e,n,i){var o=t.maxUploadRetryTime,a=new qe(n,"POST",(function(t){var e=Je(t,["active","final"]),n=null;try{n=t.getResponseHeader("X-Goog-Upload-Size-Received")}catch(r){ze(!1)}n||ze(!1);var o=Number(n);return ze(!isNaN(o)),new $e(o,i.size(),"final"===e)}),o);return a.headers={"X-Goog-Upload-Command":"query"},a.errorHandler=Ge(e),a}(t._ref.storage,t._ref._location,e,t._blob),o=t._ref.storage._makeRequest(i,n);t._request=o,o.getPromise().then((function(e){e=e,t._request=void 0,t._updateProgress(e.current),t._needToFetchStatus=!1,e.finalized&&(t._needToFetchMetadata=!0),t.completeTransitions_()}),t._errorHandler)}))},t.prototype._continueUpload=function(){var t=this,e=Ze*this._chunkMultiplier,n=new $e(this._transferred,this._blob.size()),i=this._uploadUrl;this._resolveToken((function(o){var a;try{a=tn(t._ref._location,t._ref.storage,i,t._blob,e,t._mappings,n,t._makeProgressCallback())}catch(r){return t._error=r,void t._transition("error")}var s=t._ref.storage._makeRequest(a,o);t._request=s,s.getPromise().then((function(e){t._increaseMultiplier(),t._request=void 0,t._updateProgress(e.current),e.finalized?(t._metadata=e.metadata,t._transition("success")):t.completeTransitions_()}),t._errorHandler)}))},t.prototype._increaseMultiplier=function(){Ze*this._chunkMultiplier<33554432&&(this._chunkMultiplier*=2)},t.prototype._fetchMetadata=function(){var t=this;this._resolveToken((function(e){var n=Ke(t._ref.storage,t._ref._location,t._mappings),r=t._ref.storage._makeRequest(n,e);t._request=r,r.getPromise().then((function(e){t._request=void 0,t._metadata=e,t._transition("success")}),t._metadataErrorHandler)}))},t.prototype._oneShotUpload=function(){var t=this;this._resolveToken((function(e){var n=function(t,e,n,r,i){var o=e.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"},s=function(){for(var t="",e=0;e<2;e++)t+=Math.random().toString().slice(2);return t}();a["Content-Type"]="multipart/related; boundary="+s;var u=Xe(e,r,i),c="--"+s+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+Ve(u,n)+"\r\n--"+s+"\r\nContent-Type: "+u.contentType+"\r\n\r\n",l="\r\n--"+s+"--",f=Ce.getBlob(c,r,l);if(null===f)throw ie();var h={name:u.fullPath},d=je(o),p=t.maxUploadRetryTime,v=new qe(d,"POST",We(t,n),p);return v.urlParams=h,v.headers=a,v.body=f.uploadData(),v.errorHandler=Ge(e),v}(t._ref.storage,t._ref._location,t._mappings,t._blob,t._metadata),r=t._ref.storage._makeRequest(n,e);t._request=r,r.getPromise().then((function(e){t._request=void 0,t._metadata=e,t._updateProgress(t._blob.size()),t._transition("success")}),t._errorHandler)}))},t.prototype._updateProgress=function(t){var e=this._transferred;this._transferred=t,this._transferred!==e&&this._notifyObservers()},t.prototype._transition=function(t){if(this._state!==t)switch(t){case"canceling":case"pausing":this._state=t,void 0!==this._request&&this._request.cancel();break;case"running":var e="paused"===this._state;this._state=t,e&&(this._notifyObservers(),this._start());break;case"paused":this._state=t,this._notifyObservers();break;case"canceled":this._error=re(),this._state=t,this._notifyObservers();break;case"error":case"success":this._state=t,this._notifyObservers()}},t.prototype.completeTransitions_=function(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start()}},Object.defineProperty(t.prototype,"snapshot",{get:function(){var t=be(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:t,metadata:this._metadata,task:this,ref:this._ref}}
2,enumerable:!1,configurable:!0}),t.prototype.on=function(t,e,n,r){var i=this,o=new en(e,n,r);return this._addObserver(o),function(){i._removeObserver(o)}},t.prototype.then=function(t,e){return this._promise.then(t,e)},t.prototype.catch=function(t){return this.then(null,t)},t.prototype._addObserver=function(t){this._observers.push(t),this._notifyObserver(t)},t.prototype._removeObserver=function(t){var e=this._observers.indexOf(t);-1!==e&&this._observers.splice(e,1)},t.prototype._notifyObservers=function(){var t=this;this._finishPromise(),this._observers.slice().forEach((function(e){t._notifyObserver(e)}))},t.prototype._finishPromise=function(){if(void 0!==this._resolve){var t=!0;switch(be(this._state)){case ge.SUCCESS:nn(this._resolve.bind(null,this.snapshot))();break;case ge.CANCELED:case ge.ERROR:nn(this._reject.bind(null,this._error))();break;default:t=!1}t&&(this._resolve=void 0,this._reject=void 0)}},t.prototype._notifyObserver=function(t){switch(be(this._state)){case ge.RUNNING:case ge.PAUSED:t.next&&nn(t.next.bind(t,this.snapshot))();break;case ge.SUCCESS:t.complete&&nn(t.complete.bind(t))();break;case ge.CANCELED:case ge.ERROR:t.error&&nn(t.error.bind(t,this._error))();break;default:t.error&&nn(t.error.bind(t,this._error))()}},t.prototype.resume=function(){var t="paused"===this._state||"pausing"===this._state;return t&&this._transition("running"),t},t.prototype.pause=function(){var t="running"===this._state;return t&&this._transition("pausing"),t},t.prototype.cancel=function(){var t="running"===this._state||"pausing"===this._state;return t&&this._transition("canceling"),t},t}(),on=function(){function t(t,e){this._service=t,this._location=e instanceof Ne?e:Ne.makeFromUrl(e)}return t.prototype.toString=function(){return"gs://"+this._location.bucket+"/"+this._location.path},t.prototype._newRef=function(e,n){return new t(e,n)},Object.defineProperty(t.prototype,"root",{get:function(){var t=new Ne(this._location.bucket,"");return this._newRef(this._service,t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this._location.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this._location.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return Pe(this._location.path)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storage",{get:function(){return this._service},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=function(t){if(0===t.length)return null;var e=t.lastIndexOf("/");return-1===e?"":t.slice(0,e)}(this._location.path);if(null===e)return null;var n=new Ne(this._location.bucket,e);return new t(this._service,n)},enumerable:!1,configurable:!0}),t.prototype._throwIfRoot=function(t){if(""===this._location.path)throw se(t)},t}();function an(t){var e={prefixes:[],items:[]};return sn(t,e).then((function(){return e}))}function sn(t,e,n){return Object(f.b)(this,void 0,void 0,(function(){var r,i,o;return Object(f.d)(this,(function(a){switch(a.label){case 0:return[4,un(t,{pageToken:n})];case 1:return r=a.sent(),(i=e.prefixes).push.apply(i,r.prefixes),(o=e.items).push.apply(o,r.items),null==r.nextPageToken?[3,3]:[4,sn(t,e,r.nextPageToken)];case 2:a.sent(),a.label=3;case 3:return[2]}}
2))}))}function un(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r,i;return Object(f.d)(this,(function(o){switch(o.label){case 0:return null!=e&&"number"===typeof e.maxResults&&Se("options.maxResults",1,1e3,e.maxResults),[4,t.storage._getAuthToken()];case 1:return n=o.sent(),r=e||{},i=Qe(t.storage,t._location,"/",r.pageToken,r.maxResults),[2,t.storage._makeRequest(i,n).getPromise()]}}))}))}function cn(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,r;return Object(f.d)(this,(function(i){switch(i.label){case 0:return t._throwIfRoot("updateMetadata"),[4,t.storage._getAuthToken()];case 1:return n=i.sent(),r=function(t,e,n,r){var i=je(e.fullServerUrl()),o=Ve(n,r),a=t.maxOperationRetryTime,s=new qe(i,"PATCH",We(t,r),a);return s.headers={"Content-Type":"application/json; charset=utf-8"},s.body=o,s.errorHandler=Ye(e),s}(t.storage,t._location,e,Le()),[2,t.storage._makeRequest(r,n).getPromise()]}}))}))}function ln(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return t._throwIfRoot("getDownloadURL"),[4,t.storage._getAuthToken()];case 1:return e=r.sent(),n=function(t,e,n){var r=je(e.fullServerUrl()),i=t.maxOperationRetryTime,o=new qe(r,"GET",He(t,n),i);return o.errorHandler=Ye(e),o}(t.storage,t._location,Le()),[2,t.storage._makeRequest(n,e).getPromise().then((function(t){if(null===t)throw new te("no-download-url","The given file does not have any download URLs.");return t}))]}}))}))}function fn(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return t._throwIfRoot("deleteObject"),[4,t.storage._getAuthToken()];case 1:return e=r.sent(),n=function(t,e){var n=je(e.fullServerUrl()),r=t.maxOperationRetryTime,i=new qe(n,"DELETE",(function(t,e){}),r);return i.successCodes=[200,204],i.errorHandler=Ye(e),i}(t.storage,t._location),[2,t.storage._makeRequest(n,e).getPromise()]}}))}))}function hn(t,e){var n=function(t,e){var n=e.split("/").filter((function(t){return t.length>0})).join("/");return 0===t.length?n:t+"/"+n}(t._location.path,e),r=new Ne(t._location.bucket,n);return new on(t.storage,r)}var dn=function(){function t(t,e,n){this._delegate=t,this.task=e,this.ref=n}return Object.defineProperty(t.prototype,"bytesTransferred",{get:function(){return this._delegate.bytesTransferred},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"metadata",{get:function(){return this._delegate.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._delegate.state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalBytes",{get:function(){return this._delegate.totalBytes},enumerable:!1,configurable:!0}),t}(),pn=function(){function t(t,e){this._delegate=t,this._ref=e,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(t.prototype,"snapshot",{get:function(){return new dn(this._delegate.snapshot,this,this._ref)},enumerable:!1,configurable:!0}),t.prototype.then=function(t,e){var n=this;return this._delegate.then((function(e){if(t)return t(new dn(e,n,n._ref))}),e)},t.prototype.on=function(t,e,n,r){var i=this,o=void 0;return e&&(o="function"===typeof e?function(t){return e(new dn(t,i,i._ref))}:{next:e.next?function(t){return e.next(new dn(t,i,i._ref))}:void 0,complete:e.complete||void 0,error:e.error||void 0}),this._delegate.on(t,o,n||void 0,r||void 0)},t}(),vn=function(){function t(t,e){this._delegate=t,this._service=e}return Object.defineProperty(t.prototype,"prefixes",{get:function(){var t=this;return this._delegate.prefixes.map((function(e){return new mn(e,t._service)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){var t=this;return this._delegate.items.map((function(e){return new mn(e,t._service)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextPageToken",{get:function(){return this._delegate.nextPageToken||null}
2,enumerable:!1,configurable:!0}),t}(),mn=function(){function t(t,e){this._delegate=t,this.storage=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this._delegate.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this._delegate.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this._delegate.fullPath},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return this._delegate.toString()},t.prototype.child=function(e){return new t(hn(this._delegate,e),this.storage)},Object.defineProperty(t.prototype,"root",{get:function(){return new t(this._delegate.root,this.storage)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=this._delegate.parent;return null==e?null:new t(e,this.storage)},enumerable:!1,configurable:!0}),t.prototype.put=function(t,e){return this._throwIfRoot("put"),new pn(function(t,e,n){return t._throwIfRoot("uploadBytesResumable"),new rn(t,new Ce(e),n)}(this._delegate,t,e),this)},t.prototype.putString=function(t,e,n){void 0===e&&(e=le.RAW),this._throwIfRoot("putString");var r=he(e,t),i=Object(f.a)({},n);return null==i.contentType&&null!=r.contentType&&(i.contentType=r.contentType),new pn(new rn(this._delegate,new Ce(r.data,!0),i),this)},t.prototype.listAll=function(){var t=this;return an(this._delegate).then((function(e){return new vn(e,t.storage)}))},t.prototype.list=function(t){var e=this;return un(this._delegate,t).then((function(t){return new vn(t,e.storage)}))},t.prototype.getMetadata=function(){return function(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return t._throwIfRoot("getMetadata"),[4,t.storage._getAuthToken()];case 1:return e=r.sent(),n=Ke(t.storage,t._location,Le()),[2,t.storage._makeRequest(n,e).getPromise()]}}))}))}(this._delegate)},t.prototype.updateMetadata=function(t){return cn(this._delegate,t)},t.prototype.getDownloadURL=function(){return ln(this._delegate)},t.prototype.delete=function(){return this._throwIfRoot("delete"),fn(this._delegate)},t.prototype._throwIfRoot=function(t){if(""===this._delegate._location.path)throw se(t)},t}(),yn=function(){function t(t){this.promise_=Promise.reject(t)}return t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){},t}();var gn=function(){function t(t,e,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_=t,this.method_=e,this.headers_=n,this.body_=r,this.successCodes_=i.slice(),this.additionalRetryCodes_=o.slice(),this.callback_=a,this.errorCallback_=s,this.progressCallback_=c,this.timeout_=u,this.pool_=l,this.promise_=new Promise((function(t,e){f.resolve_=t,f.reject_=e,f.start_()}))}return t.prototype.start_=function(){var t=this;function e(e,n){var i,o=t.resolve_,a=t.reject_,s=n.xhr;if(n.wasSuccessCode)try{var u=t.callback_(s,s.getResponseText());void 0!==u?o(u):o()}catch(r){a(r)}else null!==s?((i=ne()).serverResponse=s.getResponseText(),t.errorCallback_?a(t.errorCallback_(s,i)):a(i)):n.canceled?a(i=t.appDelete_?ae():re()):a(i=new te("retry-limit-exceeded","Max retry time for operation exceeded, please try again."))}this.canceled_?e(0,new bn(!1,null,!0)):this.backoffId_=function(t,e,n){var r=1,i=null,o=!1,a=0;function s(){return 2===a}var u=!1;function c(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];u||(u=!0,e.apply(null,t))}function l(e){i=setTimeout((function(){i=null,t(h,s())}),e)}function h(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!u)if(t)c.call.apply(c,Object(f.g)([null,t],e));else{var i;s()||o?c.call.apply(c,Object(f.g)([null,t],e)):(r<64&&(r*=2),1===a?(a=2,i=0):i=1e3*(r+Math.random()),l(i))}}var d=!1;function p(t){d||(d=!0,u||(null!==i?(t||(a=2),clearTimeout(i),l(0)):t||(a=1)))}return l(0),setTimeout((function(){o=!0,p(!0)}),n),p}((function(e,n){if(n)e(!1,new bn(!1,null,!0));else{var r=t.pool_.createXhrIo();t.pendingXhr_=r,null!==t.progressCallback_&&r.addUploadProgressListener(i),r.send(t.url_,t.method_,t.body_,t.headers_).then((function(n){null!==t.progressCallback_&&n.removeUploadProgressListener(i),t.pendingXhr_=null;
2var r=(n=n).getErrorCode()===me.NO_ERROR,o=n.getStatus();if(r&&!t.isRetryStatusCode_(o)){var a=-1!==t.successCodes_.indexOf(o);e(!0,new bn(a,n))}else{var s=n.getErrorCode()===me.ABORT;e(!1,new bn(!1,null,s))}}))}function i(e){var n=e.loaded,r=e.lengthComputable?e.total:-1;null!==t.progressCallback_&&t.progressCallback_(n,r)}}),e,this.timeout_)},t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){this.canceled_=!0,this.appDelete_=t||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingXhr_&&this.pendingXhr_.abort()},t.prototype.isRetryStatusCode_=function(t){var e=t>=500&&t<600,n=-1!==[408,429].indexOf(t),r=-1!==this.additionalRetryCodes_.indexOf(t);return e||n||r},t}(),bn=function(t,e,n){this.wasSuccessCode=t,this.xhr=e,this.canceled=!!n};function wn(t){return/^[A-Za-z]+:\/\//.test(t)}function _n(t,e){if(t instanceof On){var n=t;if(null==n._bucket)throw new te("no-default-bucket","No default bucket found. Did you set the 'storageBucket' property when initializing the app?");var r=new on(n,n._bucket);return null!=e?_n(r,e):r}if(void 0!==e){if(e.includes(".."))throw oe('`path` param cannot contain ".."');return hn(t,e)}return t}function En(t,e){if(e&&wn(e)){if(t instanceof On)return new on(t,e);throw oe("To use ref(service, url), the first argument must be a Storage instance.")}return _n(t,e)}var On=function(){function t(t,e,n,r,i){this.app=t,this._authProvider=e,this._pool=n,this._url=r,this._firebaseVersion=i,this._bucket=null,this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=r?Ne.makeFromBucketSpec(r):function(t){var e=null===t||void 0===t?void 0:t.storageBucket;return null==e?null:Ne.makeFromBucketSpec(e)}(this.app.options)}return Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this._maxUploadRetryTime},set:function(t){Se("time",0,Number.POSITIVE_INFINITY,t),this._maxUploadRetryTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxOperationRetryTime",{get:function(){return this._maxOperationRetryTime},set:function(t){Se("time",0,Number.POSITIVE_INFINITY,t),this._maxOperationRetryTime=t},enumerable:!1,configurable:!0}),t.prototype._getAuthToken=function(){return Object(f.b)(this,void 0,void 0,(function(){var t,e;return Object(f.d)(this,(function(n){switch(n.label){case 0:return(t=this._authProvider.getImmediate({optional:!0}))?[4,t.getToken()]:[3,2];case 1:if(null!==(e=n.sent()))return[2,e.accessToken];n.label=2;case 2:return[2,null]}}))}))},t.prototype._delete=function(){return this._deleted=!0,this._requests.forEach((function(t){return t.cancel()})),this._requests.clear(),Promise.resolve()},t.prototype._makeStorageReference=function(t){return new on(this,t)},t.prototype._makeRequest=function(t,e){var n=this;if(this._deleted)return new yn(ae());var r=function(t,e,n,r,i){var o=Ae(t.urlParams),a=t.url+o,s=Object.assign({},t.headers);return function(t,e){e&&(t["X-Firebase-GMPID"]=e)}(s,e),function(t,e){null!==e&&e.length>0&&(t.Authorization="Firebase "+e)}(s,n),function(t,e){t["X-Firebase-Storage-Version"]="webjs/"+(null!==e&&void 0!==e?e:"AppManager")}(s,i),new gn(a,t.method,s,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,r)}(t,this._appId,e,this._pool,this._firebaseVersion);return this._requests.add(r),r.getPromise().then((function(){return n._requests.delete(r)}),(function(){return n._requests.delete(r)})),r},t}(),Tn=function(){function t(t,e){var n=this;this.app=t,this._delegate=e,this.INTERNAL={delete:function(){return n._delegate._delete()}}}return Object.defineProperty(t.prototype,"maxOperationRetryTime",{get:function(){return this._delegate.maxOperationRetryTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this._delegate.maxUploadRetryTime},enumerable:!1,configurable:!0}),t.prototype.ref=function(t){if(wn(t))throw oe("ref() expected a child path but got a URL, use refFromURL instead.");return new mn(En(this._delegate,t),this)},t.prototype.refFromURL=function(t){if(!wn(t))throw oe("refFromURL() expected a full URL but got a child path, use ref() instead.");try{Ne.makeFromUrl(t)}catch(r){throw oe("refFromUrl() expected a valid full URL but got an invali
2d one.")}return new mn(En(this._delegate,t),this)},t.prototype.setMaxUploadRetryTime=function(t){this._delegate.maxUploadRetryTime=t},t.prototype.setMaxOperationRetryTime=function(t){this._delegate.maxOperationRetryTime=t},t}();function Sn(t,e){var n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal");return new Tn(n,new On(n,r,new _e,e,o.a.SDK_VERSION))}!function(t){var e={TaskState:ge,TaskEvent:ye,StringFormat:le,Storage:On,Reference:mn};t.INTERNAL.registerComponent(new c.a("storage",Sn,"PUBLIC").setServiceProps(e).setMultipleInstances(!0)),t.registerVersion("@firebase/storage","0.4.3")}(o.a);var kn,In,Cn,Nn="0.4.6",xn=Nn,Pn="FB-PERF-TRACE-MEASURE",jn="_wt_",An="_fcp",Dn="_fid",Rn="@firebase/performance/config",Mn="@firebase/performance/configexpire",Ln="Performance",Fn=((kn={})["trace started"]="Trace {$traceName} was started before.",kn["trace stopped"]="Trace {$traceName} is not running.",kn["nonpositive trace startTime"]="Trace {$traceName} startTime should be positive.",kn["nonpositive trace duration"]="Trace {$traceName} duration should be positive.",kn["no window"]="Window is not available.",kn["no app id"]="App id is not available.",kn["no project id"]="Project id is not available.",kn["no api key"]="Api key is not available.",kn["invalid cc log"]="Attempted to queue invalid cc event",kn["FB not default"]="Performance can only start when Firebase app instance is the default one.",kn["RC response not ok"]="RC response is not ok",kn["invalid attribute name"]="Attribute name {$attributeName} is invalid.",kn["invalid attribute value"]="Attribute value {$attributeValue} is invalid.",kn["invalid custom metric name"]="Custom metric name {$customMetricName} is invalid",kn["invalid String merger input"]="Input for String merger is invalid, contact support team to resolve.",kn),Un=new s.b("performance",Ln,Fn),Vn=new a.b(Ln);Vn.logLevel=a.a.INFO;var Bn,qn=function(){function t(t){if(this.window=t,!t)throw Un.create("no window");this.performance=t.performance,this.PerformanceObserver=t.PerformanceObserver,this.windowLocation=t.location,this.navigator=t.navigator,this.document=t.document,this.navigator&&this.navigator.cookieEnabled&&(this.localStorage=t.localStorage),t.perfMetrics&&t.perfMetrics.onFirstInputDelay&&(this.onFirstInputDelay=t.perfMetrics.onFirstInputDelay)}return t.prototype.getUrl=function(){return this.windowLocation.href.split("?")[0]},t.prototype.mark=function(t){this.performance&&this.performance.mark&&this.performance.mark(t)},t.prototype.measure=function(t,e,n){this.performance&&this.performance.measure&&this.performance.measure(t,e,n)},t.prototype.getEntriesByType=function(t){return this.performance&&this.performance.getEntriesByType?this.performance.getEntriesByType(t):[]},t.prototype.getEntriesByName=function(t){return this.performance&&this.performance.getEntriesByName?this.performance.getEntriesByName(t):[]},t.prototype.getTimeOrigin=function(){return this.performance&&(this.performance.timeOrigin||this.performance.timing.navigationStart)},t.prototype.requiredApisAvailable=function(){return fetch&&Promise&&this.navigator&&this.navigator.cookieEnabled?!!Object(s.w)()||(Vn.info("IndexedDB is not supported by current browswer"),!1):(Vn.info("Firebase Performance cannot start if browser does not support fetch and Promise or cookie is disabled."),!1)},t.prototype.setupObserver=function(t,e){this.PerformanceObserver&&new this.PerformanceObserver((function(t){for(var n=0,r=t.getEntries();n<r.length;n++){var i=r[n];e(i)}})).observe({entryTypes:[t]})},t.getInstance=function(){return void 0===In&&(In=new t(Cn)),In},t}();function zn(t,e){var n=t.length-e.length;if(n<0||n>1)throw Un.create("invalid String merger input");for(var r=[],i=0;i<t.length;i++)r.push(t.charAt(i)),e.length>i&&r.push(e.charAt(i));return r.join("")}var Wn,Hn,Gn=function(){function t(){this.instrumentationEnabled=!0,this.dataCollectionEnabled=!0,this.loggingEnabled=!1,this.tracesSamplingRate=1,this.networkRequestsSamplingRate=1,this.logEndPointUrl="https://firebaselogging.googleapis.com/v0cc/log?format=json_proto",this.flTrans
2portEndpointUrl=zn("hts/frbslgigp.ogepscmv/ieo/eaylg","tp:/ieaeogn-agolai.o/1frlglgc/o"),this.transportKey=zn("AzSC8r6ReiGqFMyfvgow","Iayx0u-XT3vksVM-pIV"),this.logSource=462,this.logTraceAfterSampling=!1,this.logNetworkAfterSampling=!1,this.configTimeToLive=12}return t.prototype.getAppId=function(){var t=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.appId;if(!t)throw Un.create("no app id");return t},t.prototype.getProjectId=function(){var t=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.projectId;if(!t)throw Un.create("no project id");return t},t.prototype.getApiKey=function(){var t=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.apiKey;if(!t)throw Un.create("no api key");return t},t.prototype.getFlTransportFullUrl=function(){return this.flTransportEndpointUrl.concat("?key=",this.transportKey)},t.getInstance=function(){return void 0===Bn&&(Bn=new t),Bn},t}();function Yn(){return Wn}!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.VISIBLE=1]="VISIBLE",t[t.HIDDEN=2]="HIDDEN"}(Hn||(Hn={}));var Kn=["firebase_","google_","ga_"],Qn=new RegExp("^[a-zA-Z]\\w*$");function Xn(){var t=qn.getInstance().navigator;return"serviceWorker"in t?t.serviceWorker.controller?2:3:1}function $n(){switch(qn.getInstance().document.visibilityState){case"visible":return Hn.VISIBLE;case"hidden":return Hn.HIDDEN;default:return Hn.UNKNOWN}}function Jn(){var t=qn.getInstance().navigator.connection;switch(t&&t.effectiveType){case"slow-2g":return 1;case"2g":return 2;case"3g":return 3;case"4g":return 4;default:return 0}}var Zn="0.0.1",tr=!0,er="FIREBASE_INSTALLATIONS_AUTH";function nr(t){var e=function(){var t=qn.getInstance().localStorage;if(!t)return;var e=t.getItem(Mn);if(!e||(n=e,!(Number(n)>Date.now())))return;var n;var r=t.getItem(Rn);if(!r)return;try{return JSON.parse(r)}catch(i){return}}();return e?(ir(e),Promise.resolve()):function(t){return function(){var t=Gn.getInstance().installationsService.getToken();return t.then((function(t){})),t}().then((function(e){var n="https://firebaseremoteconfig.googleapis.com/v1/projects/"+Gn.getInstance().getProjectId()+"/namespaces/fireperf:fetch?key="+Gn.getInstance().getApiKey(),r=new Request(n,{method:"POST",headers:{Authorization:er+" "+e},body:JSON.stringify({app_instance_id:t,app_instance_id_token:e,app_id:Gn.getInstance().getAppId(),app_version:xn,sdk_version:Zn})});return fetch(r).then((function(t){if(t.ok)return t.json();throw Un.create("RC response not ok")}))})).catch((function(){Vn.info(rr)}))}(t).then(ir).then((function(t){return function(t){var e=qn.getInstance().localStorage;if(!t||!e)return;e.setItem(Rn,JSON.stringify(t)),e.setItem(Mn,String(Date.now()+60*Gn.getInstance().configTimeToLive*60*1e3))}(t)}),(function(){}))}var rr="Could not fetch config, will use default configs";function ir(t){if(!t)return t;var e=Gn.getInstance(),n=t.entries||{};return void 0!==n.fpr_enabled?e.loggingEnabled="true"===String(n.fpr_enabled):e.loggingEnabled=tr,n.fpr_log_source&&(e.logSource=Number(n.fpr_log_source)),n.fpr_log_endpoint_url&&(e.logEndPointUrl=n.fpr_log_endpoint_url),n.fpr_log_transport_key&&(e.transportKey=n.fpr_log_transport_key),void 0!==n.fpr_vc_network_request_sampling_rate&&(e.networkRequestsSamplingRate=Number(n.fpr_vc_network_request_sampling_rate)),void 0!==n.fpr_vc_trace_sampling_rate&&(e.tracesSamplingRate=Number(n.fpr_vc_trace_sampling_rate)),e.logTraceAfterSampling=or(e.tracesSamplingRate),e.logNetworkAfterSampling=or(e.networkRequestsSamplingRate),t}function or(t){return Math.random()<=t}var ar,sr=1;function ur(){return sr=2,ar=ar||function(){var t=qn.getInstance().document;return new Promise((function(e){if(t&&"complete"!==t.readyState){var n=function n(){"complete"===t.readyState&&(t.removeEventListener("readystatechange",n),e())};t.addEventListener("readystatechange",n)}else e()}))}().then((function(){return function(){var t=Gn.getInstance().installationsService.getId();return t.then((function(t){Wn=t})),t}()})).then((function(t){return nr(t)})).then((function(){return cr()}),(function(){return cr()}))}function cr(){sr=3}var lr,fr=1e4,hr=3,dr=[],pr=!1;function vr(t){setTimeout((function(){if(0!==hr)return dr.length?void function(){var t=dr.splice(0,1e3),e=t.map((function(t){return{source_extension_json_proto3:t.message,event_time_ms:String(t.eventTime)}}));(function(t,e){return function(t){var e=Gn.getInstance().getFlTransportFullUrl();return fetch(e,{method:"POST",body:JSON.stringify(t)})}(t).then((function(t){return t.ok||Vn.info("Call to Firebase backend failed."),t.json()}
2)).then((function(t){var n=Number(t.nextRequestWaitMillis),r=fr;isNaN(n)||(r=Math.max(n,r));var i=t.logResponseDetails;Array.isArray(i)&&i.length>0&&"RETRY_REQUEST_LATER"===i[0].responseAction&&(dr=Object(f.g)(e,dr),Vn.info("Retry transport request later.")),hr=3,vr(r)}))})({request_time_ms:String(Date.now()),client_info:{client_type:1,js_client_info:{}},log_source:Gn.getInstance().logSource,log_event:e},t).catch((function(){dr=Object(f.g)(t,dr),hr--,Vn.info("Tries left: "+hr+"."),vr(fr)}))}():vr(fr)}),t)}function mr(t){if(!t.eventTime||!t.message)throw Un.create("invalid cc log");dr=Object(f.g)(dr,[t])}function yr(t,e){lr||(lr=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];mr({message:t.apply(void 0,e),eventTime:Date.now()})}}(wr)),lr(t,e)}function gr(t){var e=Gn.getInstance();!e.instrumentationEnabled&&t.isAuto||(e.dataCollectionEnabled||t.isAuto)&&qn.getInstance().requiredApisAvailable()&&(t.isAuto&&$n()!==Hn.VISIBLE||(3===sr?br(t):ur().then((function(){return br(t)}),(function(){return br(t)}))))}function br(t){if(Yn()){var e=Gn.getInstance();e.loggingEnabled&&e.logTraceAfterSampling&&setTimeout((function(){return yr(t,1)}),0)}}function wr(t,e){return 0===e?function(t){var e={url:t.url,http_method:t.httpMethod||0,http_response_code:200,response_payload_bytes:t.responsePayloadBytes,client_start_time_us:t.startTimeUs,time_to_response_initiated_us:t.timeToResponseInitiatedUs,time_to_response_completed_us:t.timeToResponseCompletedUs},n={application_info:_r(),network_request_metric:e};return JSON.stringify(n)}(t):function(t){var e={name:t.name,is_auto:t.isAuto,client_start_time_us:t.startTimeUs,duration_us:t.durationUs};0!==Object.keys(t.counters).length&&(e.counters=t.counters);var n=t.getAttributes();0!==Object.keys(n).length&&(e.custom_attributes=n);var r={application_info:_r(),trace_metric:e};return JSON.stringify(r)}(t)}function _r(){return{google_app_id:Gn.getInstance().getAppId(),app_instance_id:Yn(),web_app_info:{sdk_version:xn,page_url:qn.getInstance().getUrl(),service_worker_status:Xn(),visibility_state:$n(),effective_connection_type:Jn()},application_process_state:0}}var Er=["_fp",An,Dn];var Or=function(){function t(t,e,n){void 0===e&&(e=!1),this.name=t,this.isAuto=e,this.state=1,this.customAttributes={},this.counters={},this.api=qn.getInstance(),this.randomId=Math.floor(1e6*Math.random()),this.isAuto||(this.traceStartMark="FB-PERF-TRACE-START-"+this.randomId+"-"+this.name,this.traceStopMark="FB-PERF-TRACE-STOP-"+this.randomId+"-"+this.name,this.traceMeasure=n||"FB-PERF-TRACE-MEASURE-"+this.randomId+"-"+this.name,n&&this.calculateTraceMetrics())}return t.prototype.start=function(){if(1!==this.state)throw Un.create("trace started",{traceName:this.name});this.api.mark(this.traceStartMark),this.state=2},t.prototype.stop=function(){if(2!==this.state)throw Un.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(),gr(this)},t.prototype.record=function(t,e,n){if(t<=0)throw Un.create("nonpositive trace startTime",{traceName:this.name});if(e<=0)throw Un.create("nonpositive trace duration",{traceName:this.name});if(this.durationUs=Math.floor(1e3*e),this.startTimeUs=Math.floor(1e3*t),n&&n.attributes&&(this.customAttributes=Object(f.a)({},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])))}gr(this)},t.prototype.incrementMetric=function(t,e){void 0===e&&(e=1),void 0===this.counters[t]?this.putMetric(t,e):this.putMetric(t,this.counters[t]+e)},t.prototype.putMetric=function(t,e){if(n=t,r=this.name,0===n.length||n.length>100||!(r&&r.startsWith(jn)&&Er.indexOf(n)>-1)&&n.startsWith("_"))throw Un.create("invalid custom metric name",{customMetricName:t});var n,r;this.counters[t]=function(t){var e=Math.floor(t);return e<t&&Vn.info("Metric value should be an Integer, setting the value as : "+e+"."),e}(e)},t.prototype.getMetric=function(t){return this.counters[t]||0},t.prototype.putAttribute=function(t,e){var n,r=!(0===(n=t).length||n.length>40)&&!Kn.some((function(t){return n.startsWith(t)}))&&!!n.match(Qn),i=function(t){return 0!==t.length&&t.length<=100}(e);if(r&&i)this.customAttributes[t]=e;else{if(!r)throw Un.create("invalid attribute name",{attributeName:t});if(!i)throw Un.create("invalid attribute value",{attributeValue:e})}},t.prototype.getAttribute=function(t){return this.customAttributes[t]},t.prototype.removeAttribute=function(t){void 0!==this.customAttributes[t]&&delete this.customAttributes[t]},t.prototype.getAttributes=function(){return Object(f.a)({},this.customAttributes)},t.prototype.setStartTime=function(t){this.startTimeUs=t},t.prototype.setDuration=function(t){this.durationUs=t},t.prototype.calculateTraceMetrics=function(){var t=this.api.getEntriesByName(this.traceMeasure),e=t&&t[0];e&&(this.durationUs=Math.floor(1e3*e.duration),this.startTimeUs=Math.floor(1e3*(e.startTime+this.api.getTimeOrigin())))},t.createOobTrace=function(e,n,r){var i=qn.getInstance().getUrl();if(i){var o=new t(jn+i,!0),a=Math.floor(1e3*qn.getInstance().getTimeOrigin());o.setStartTime(a),e&&e[0]&&(o.setDuration(Math.floor(1e3*e[0].duration)),o.putMetric("domInteractive",Math.floor(1e3*e[0].domInteractive)),o.putMetric("domContentLoadedEventEnd",Math.floor(1e3*e[0].domContentLoadedEventEnd)),o.putMetric("loadEventEnd",Math.floor(1e3*e[0].loadEventEnd)));if(n){var s=n.find((function(t){return"first-paint"===t.name}));s&&s.startTime&&o.putMetric("_fp",Math.floor(1e3*s.startTime));var u=n.find((function(t){return"first-contentful-paint"===t.name}));u&&u.startTime&&o.putMetric(An,Math.floor(1e3*u.startTime)),r&&o.putMetric(Dn,Math.floor(1e3*r))}gr(o)}},t.createUserTimingTrace=function(e){gr(new t(e,!1,e))},t}();function Tr(t){var e=t;if(e&&void 0!==e.responseStart){var n=qn.getInstance().getTimeOrigin(),r=Math.floor(1e3*(e.startTime+n)),i=e.responseStart?Math.floor(1e3*(e.responseStart-e.startTime)):void 0,o=Math.floor(1e3*(e.responseEnd-e.startTime));!function(t){var e=Gn.getInstance();if(e.instrumentationEnabled){var n=t.url,r=e.logEndPointUrl.split("?")[0],i=e.flTransportEndpointUrl.split("?")[0];n!==r&&n!==i&&e.loggingEnabled&&e.logNetworkAfterSampling&&setTimeout((function(){return yr(t,0)}),0)}}({url:e.name&&e.name.split("?")[0],responsePayloadBytes:e.transferSize,startTimeUs:r,timeToResponseInitiatedUs:i,timeToResponseCompletedUs:o})}}function Sr(){Yn()&&(setTimeout((function(){return function(){var t=qn.getInstance(),e=t.getEntriesByType("navigation"),n=t.getEntriesByType("paint");if(t.onFirstInputDelay){var r=setTimeout((function(){Or.createOobTrace(e,n),r=void 0}),5e3);t.onFirstInputDelay((function(t){r&&(clearTimeout(r),Or.createOobTrace(e,n,t))}))}else Or.createOobTrace(e,n)}()}),0),setTimeout((function(){return function(){for(var t=qn.getInstance(),e=t.getEntriesByType("resource"),n=0,r=e;n<r.length;n++){Tr(r[n])}t.setupObserver("resource",Tr)}()}),0),setTimeout((function(){return function(){for(var t=qn.getInstance(),e=t.getEntriesByType("measure"),n=0,r=e;n<r.length;n++){kr(r[n])}t.setupObserver("measure",kr)}()}),0))}function kr(t){var e=t.name;e.substring(0,Pn.length)!==Pn&&Or.createUserTimingTrace(e)}var Ir=function(){function t(t){this.app=t,qn.getInstance().requiredApisAvailable()&&Object(s.N)().then((function(t){t&&(pr||(vr(5500),pr=!0),ur().then(Sr,Sr))})).catch((function(t){Vn.info("Environment doesn't support IndexedDB: "+t)}))}return t.prototype.trace=function(t){return new Or(t)},Object.defineProperty(t.prototype,"instrumentationEnabled",{get:function(){return Gn.getInstance().instrumentationEnabled},set:function(t){Gn.getInstance().instrumentationEnabled=t}
2,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataCollectionEnabled",{get:function(){return Gn.getInstance().dataCollectionEnabled},set:function(t){Gn.getInstance().dataCollectionEnabled=t},enumerable:!1,configurable:!0}),t}();!function(t){var e=function(t,e){if("[DEFAULT]"!==t.name)throw Un.create("FB not default");if("undefined"===typeof window)throw Un.create("no window");return function(t){Cn=t}(window),Gn.getInstance().firebaseAppInstance=t,Gn.getInstance().installationsService=e,new Ir(t)};t.INTERNAL.registerComponent(new c.a("performance",(function(t){var n=t.getProvider("app").getImmediate(),r=t.getProvider("installations").getImmediate();return e(n,r)}),"PUBLIC")),t.registerVersion("@firebase/performance",Nn)}(o.a);var Cr,Nr,xr="https://www.googletagmanager.com/gtag/js";!function(t){t.EVENT="event",t.SET="set",t.CONFIG="config"}(Cr||(Cr={})),function(t){t.ADD_SHIPPING_INFO="add_shipping_info",t.ADD_PAYMENT_INFO="add_payment_info",t.ADD_TO_CART="add_to_cart",t.ADD_TO_WISHLIST="add_to_wishlist",t.BEGIN_CHECKOUT="begin_checkout",t.CHECKOUT_PROGRESS="checkout_progress",t.EXCEPTION="exception",t.GENERATE_LEAD="generate_lead",t.LOGIN="login",t.PAGE_VIEW="page_view",t.PURCHASE="purchase",t.REFUND="refund",t.REMOVE_FROM_CART="remove_from_cart",t.SCREEN_VIEW="screen_view",t.SEARCH="search",t.SELECT_CONTENT="select_content",t.SELECT_ITEM="select_item",t.SELECT_PROMOTION="select_promotion",t.SET_CHECKOUT_OPTION="set_checkout_option",t.SHARE="share",t.SIGN_UP="sign_up",t.TIMING_COMPLETE="timing_complete",t.VIEW_CART="view_cart",t.VIEW_ITEM="view_item",t.VIEW_ITEM_LIST="view_item_list",t.VIEW_PROMOTION="view_promotion",t.VIEW_SEARCH_RESULTS="view_search_results"}(Nr||(Nr={}));var Pr,jr=new a.b("@firebase/analytics");function Ar(t,e,n,r,i,o){return Object(f.b)(this,void 0,void 0,(function(){var a,s,u,c;return Object(f.d)(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,e[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(t){return t.measurementId===i})))?[4,e[u.appId]]:[3,6];case 5:l.sent(),l.label=6;case 6:return[3,8];case 7:return c=l.sent(),jr.error(c),[3,8];case 8:return t(Cr.CONFIG,i,o),[2]}}))}))}function Dr(t,e,n,r,i){return Object(f.b)(this,void 0,void 0,(function(){var o,a,s,u,c,l,h,d;return Object(f.d)(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]),[4,Promise.all(n)]):[3,2];case 1:for(s=f.sent(),u=function(t){var n=s.find((function(e){return e.measurementId===t})),r=n&&e[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(e)),[4,Promise.all(o)];case 3:return f.sent(),t(Cr.EVENT,r,i||{}),[3,5];case 4:return d=f.sent(),jr.error(d),[3,5];case 5:return[2]}}
2))}))}function Rr(t,e,n,r,i){var o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];window[r].push(arguments)};return window[i]&&"function"===typeof window[i]&&(o=window[i]),window[i]=function(t,e,n,r){return function(i,o,a){return Object(f.b)(this,void 0,void 0,(function(){var s;return Object(f.d)(this,(function(u){switch(u.label){case 0:return u.trys.push([0,6,,7]),i!==Cr.EVENT?[3,2]:[4,Dr(t,e,n,o,a)];case 1:return u.sent(),[3,5];case 2:return i!==Cr.CONFIG?[3,4]:[4,Ar(t,e,n,r,o,a)];case 3:return u.sent(),[3,5];case 4:t(Cr.SET,o),u.label=5;case 5:return[3,7];case 6:return s=u.sent(),jr.error(s),[3,7];case 7:return[2]}}))}))}}(o,t,e,n),{gtagCore:o,wrappedGtag:window[i]}}var Mr=((Pr={})["already-exists"]="A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.",Pr["already-initialized"]="Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.",Pr["interop-component-reg-failed"]="Firebase Analytics Interop Component failed to instantiate: {$reason}",Pr["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}",Pr["indexeddb-unavailable"]="IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}",Pr["fetch-throttle"]="The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.",Pr["config-fetch-failed"]="Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}",Pr["no-api-key"]='The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',Pr["no-app-id"]='The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',Pr),Lr=new s.b("analytics","Analytics",Mr),Fr=new(function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=1e3),this.throttleMetadata=t,this.intervalMillis=e}return t.prototype.getThrottleMetadata=function(t){return this.throttleMetadata[t]},t.prototype.setThrottleMetadata=function(t,e){this.throttleMetadata[t]=e},t.prototype.deleteThrottleMetadata=function(t){delete this.throttleMetadata[t]},t}());function Ur(t){return new Headers({Accept:"application/json","x-goog-api-key":t})}function Vr(t){var e;return Object(f.b)(this,void 0,void 0,(function(){var n,r,i,o,a,s,u;return Object(f.d)(this,(function(c){switch(c.label){case 0:return n=t.appId,r=t.apiKey,i={method:"GET",headers:Ur(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===(e=u.error)||void 0===e?void 0:e.message)&&(s=u.error.message),[3,5];case 4:return c.sent(),[3,5];case 5:throw Lr.create("config-fetch-failed",{httpStatus:a.status,responseMessage:s});case 6:return[2,a.json()]}}))}))}function Br(t,e,n,r){var i=e.throttleEndTimeMillis,o=e.backoffCount;return void 0===r&&(r=Fr),Object(f.b)(this,void 0,void 0,(function(){var e,a,u,c,l,h,d;return Object(f.d)(this,(function(f){switch(f.label){case 0:e=t.appId,a=t.measurementId,f.label=1;case 1:return f.trys.push([1,3,,4]),[4,qr(n,i)];case 2:return f.sent(),[3,4];case 3:if(u=f.sent(),a)return jr.warn("Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID "+a+' provided in the "measurementId" field in the local Firebase config. ['+u.message+"]"),[2,{appId:e,measurementId:a}];throw u;case 4:return f.trys.push([4,6,,7]),[4,Vr(t)];case 5:return c=f.sent(),r.deleteThrottleMetadata(e),[2,c];case 6:if(!function(t){if(!(t instanceof s.c)||!t.customData)return!1;var e=Number(t.customData.httpStatus);return 429===e||500===e||503===e||504===e}(l=f.sent())){if(r.deleteThrottleMetadata(e),a)return jr.warn("Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID "+a+' provided in the "measurementId" field in the local Firebase config. ['+l.message+"]"),[2,{appId:e,measurementId:a}];throw l}
2return h=503===Number(l.customData.httpStatus)?Object(s.j)(o,r.intervalMillis,30):Object(s.j)(o,r.intervalMillis),d={throttleEndTimeMillis:Date.now()+h,backoffCount:o+1},r.setThrottleMetadata(e,d),jr.debug("Calling attemptFetch again in "+h+" millis"),[2,Br(t,d,n,r)];case 7:return[2]}}))}))}function qr(t,e){return new Promise((function(n,r){var i=Math.max(e-Date.now(),0),o=setTimeout(n,i);t.addEventListener((function(){clearTimeout(o),r(Lr.create("fetch-throttle",{throttleEndTimeMillis:e}))}))}))}var zr=function(){function t(){this.listeners=[]}return t.prototype.addEventListener=function(t){this.listeners.push(t)},t.prototype.abort=function(){this.listeners.forEach((function(t){return t()}))},t}();function Wr(t,e,n,r,i,o){return Object(f.b)(this,void 0,void 0,(function(){var a,u,c,l,h,d,p;return Object(f.d)(this,(function(v){switch(v.label){case 0:return(a=function(t,e,n){return void 0===e&&(e=Fr),Object(f.b)(this,void 0,void 0,(function(){var r,i,o,a,s,u,c=this;return Object(f.d)(this,(function(l){if(r=t.options,i=r.appId,o=r.apiKey,a=r.measurementId,!i)throw Lr.create("no-app-id");if(!o){if(a)return[2,{measurementId:a,appId:i}];throw Lr.create("no-api-key")}return s=e.getThrottleMetadata(i)||{backoffCount:0,throttleEndTimeMillis:Date.now()},u=new zr,setTimeout((function(){return Object(f.b)(c,void 0,void 0,(function(){return Object(f.d)(this,(function(t){return u.abort(),[2]}))}))}),void 0!==n?n:6e4),[2,Br({appId:i,apiKey:o,measurementId:a},s,u,e)]}))}))}(t)).then((function(e){n[e.measurementId]=e.appId,t.options.measurementId&&e.measurementId!==t.options.measurementId&&jr.warn("The measurement ID in the local Firebase config ("+t.options.measurementId+") does not match the measurement ID fetched from the server ("+e.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(t){return jr.error(t)})),e.push(a),u=function(){return Object(f.b)(this,void 0,void 0,(function(){var t;return Object(f.d)(this,(function(e){switch(e.label){case 0:return Object(s.w)()?[3,1]:(jr.warn(Lr.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),[2,!1]);case 1:return e.trys.push([1,3,,4]),[4,Object(s.N)()];case 2:return e.sent(),[3,4];case 3:return t=e.sent(),jr.warn(Lr.create("indexeddb-unavailable",{errorInfo:t}).message),[2,!1];case 4:return[2,!0]}}))}))}().then((function(t){return t?r.getId():void 0})),[4,Promise.all([a,u])];case 1:return c=v.sent(),l=c[0],h=c[1],function(){for(var t=window.document.getElementsByTagName("script"),e=0,n=Object.values(t);e<n.length;e++){var r=n[e];if(r.src&&r.src.includes(xr))return r}return null}()||function(t,e){var n=document.createElement("script");n.src=xr+"?l="+t+"&id="+e,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(Cr.CONFIG,l.measurementId,d),[2,l.measurementId]}}))}))}var Hr,Gr,Yr={},Kr=[],Qr={},Xr="dataLayer",$r="gtag",Jr=!1;function Zr(t){if(Jr)throw Lr.create("already-initialized");t.dataLayerName&&(Xr=t.dataLayerName),t.gtagName&&($r=t.gtagName)}function ti(t,e){!function(){var t=[];if(Object(s.s)()&&t.push("This is a browser extension environment."),Object(s.e)()||t.push("Cookies are not available."),t.length>0){var e=t.map((function(t,e){return"("+(e+1)+") "+t})).join(" "),n=Lr.create("invalid-analytics-context",{errorInfo:e});jr.warn(n.message)}}();var n=t.options.appId;if(!n)throw Lr.create("no-app-id");if(!t.options.apiKey){if(!t.options.measurementId)throw Lr.create("no-api-key");jr.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 '+t.options.measurementId+' provided in the "measurementId" field in the local Firebase config.')}if(null!=Yr[n])throw Lr.create("already-exists",{id:n});if(!Jr){!function(t){var e=[];Array.isArray(window[t])?e=window[t]:window[t]=e}(Xr);var r=Rr(Yr,Kr,Qr,Xr,$r),i=r.wrappedGtag,o=r.gtagCore;Gr=i,Hr=o,Jr=!0}return Yr[n]=Wr(t,Kr,Qr,e,Hr,Xr),{app:t,logEvent:function(t,e,r){(function(t,e,n,r,i){return Object(f.b)(this,void 0,void 0,(function(){var o,a;return Object(f.d)(this,(function(s){switch(s.label){case 0:return i&&i.global?(t(Cr.EVENT,n,r),[2]):[3,1];case 1:return[4,e];case 2:o=s.sent(),a=Object(f.a)(Object(f.a)({},r),{send_to:o}),t(Cr.EVENT,n,a),s.label=3;case 3:return[2]}}
2))}))})(Gr,Yr[n],t,e,r).catch((function(t){return jr.error(t)}))},setCurrentScreen:function(t,e){(function(t,e,n,r){return Object(f.b)(this,void 0,void 0,(function(){var i;return Object(f.d)(this,(function(o){switch(o.label){case 0:return r&&r.global?(t(Cr.SET,{screen_name:n}),[2,Promise.resolve()]):[3,1];case 1:return[4,e];case 2:i=o.sent(),t(Cr.CONFIG,i,{update:!0,screen_name:n}),o.label=3;case 3:return[2]}}))}))})(Gr,Yr[n],t,e).catch((function(t){return jr.error(t)}))},setUserId:function(t,e){(function(t,e,n,r){return Object(f.b)(this,void 0,void 0,(function(){var i;return Object(f.d)(this,(function(o){switch(o.label){case 0:return r&&r.global?(t(Cr.SET,{user_id:n}),[2,Promise.resolve()]):[3,1];case 1:return[4,e];case 2:i=o.sent(),t(Cr.CONFIG,i,{update:!0,user_id:n}),o.label=3;case 3:return[2]}}))}))})(Gr,Yr[n],t,e).catch((function(t){return jr.error(t)}))},setUserProperties:function(t,e){(function(t,e,n,r){return Object(f.b)(this,void 0,void 0,(function(){var i,o,a,s,u;return Object(f.d)(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 t(Cr.SET,i),[2,Promise.resolve()];case 1:return[4,e];case 2:u=c.sent(),t(Cr.CONFIG,u,{update:!0,user_properties:n}),c.label=3;case 3:return[2]}}
2))}))})(Gr,Yr[n],t,e).catch((function(t){return jr.error(t)}))},setAnalyticsCollectionEnabled:function(t){(function(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return[4,t];case 1:return n=r.sent(),window["ga-disable-"+n]=!e,[2]}}))}))})(Yr[n],t).catch((function(t){return jr.error(t)}))},INTERNAL:{delete:function(){return delete Yr[n],Promise.resolve()}}}}var ei="analytics";function ni(){return Object(f.b)(this,void 0,void 0,(function(){return Object(f.d)(this,(function(t){switch(t.label){case 0:if(Object(s.s)())return[2,!1];if(!Object(s.e)())return[2,!1];if(!Object(s.w)())return[2,!1];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,Object(s.N)()];case 2:return[2,t.sent()];case 3:return t.sent(),[2,!1];case 4:return[2]}}))}))}!function(t){t.INTERNAL.registerComponent(new c.a(ei,(function(t){return ti(t.getProvider("app").getImmediate(),t.getProvider("installations").getImmediate())}),"PUBLIC").setServiceProps({settings:Zr,EventName:Nr,isSupported:ni})),t.INTERNAL.registerComponent(new c.a("analytics-internal",(function(t){try{return{logEvent:t.getProvider(ei).getImmediate().logEvent}}catch(r){throw Lr.create("interop-component-reg-failed",{reason:r})}}),"PRIVATE")),t.registerVersion("@firebase/analytics","0.6.4")}(o.a);var ri,ii=function(){function t(t,e,n,r){this.client=t,this.storage=e,this.storageCache=n,this.logger=r}return t.prototype.isCachedDataFresh=function(t,e){if(!e)return this.logger.debug("Config fetch cache check. Cache unpopulated."),!1;var n=Date.now()-e,r=n<=t;return this.logger.debug("Config fetch cache check. Cache age millis: "+n+". Cache max age millis (minimumFetchIntervalMillis setting): "+t+". Is cache hit: "+r+"."),r},t.prototype.fetch=function(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r,i,o;return Object(f.d)(this,(function(a){switch(a.label){case 0:return[4,Promise.all([this.storage.getLastSuccessfulFetchTimestampMillis(),this.storage.getLastSuccessfulFetchResponse()])];case 1:return e=a.sent(),n=e[0],(r=e[1])&&this.isCachedDataFresh(t.cacheMaxAgeMillis,n)?[2,r]:(t.eTag=r&&r.eTag,[4,this.client.fetch(t)]);case 2:return i=a.sent(),o=[this.storageCache.setLastSuccessfulFetchTimestampMillis(Date.now())],200===i.status&&o.push(this.storage.setLastSuccessfulFetchResponse(i)),[4,Promise.all(o)];case 3:return a.sent(),[2,i]}}))}))},t}(),oi=((ri={})["registration-window"]="Undefined window object. This SDK only supports usage in a browser environment.",ri["registration-project-id"]="Undefined project identifier. Check Firebase app initialization.",ri["registration-api-key"]="Undefined API key. Check Firebase app initialization.",ri["registration-app-id"]="Undefined app identifier. Check Firebase app initialization.",ri["storage-open"]="Error thrown when opening storage. Original error: {$originalErrorMessage}.",ri["storage-get"]="Error thrown when reading from storage. Original error: {$originalErrorMessage}.",ri["storage-set"]="Error thrown when writing to storage. Original error: {$originalErrorMessage}.",ri["storage-delete"]="Error thrown when deleting from storage. Original error: {$originalErrorMessage}.",ri["fetch-client-network"]="Fetch client failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.",ri["fetch-timeout"]='The config fetch request timed out. Configure timeout using "fetchTimeoutMillis" SDK setting.',ri["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}.',ri["fetch-client-parse"]="Fetch client could not parse response. Original error: {$originalErrorMessage}.",ri["fetch-status"]="Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.",ri),ai=new s.b("remoteconfig","Remote Config",oi);var si=function(){function t(t,e,n,r,i,o){this.firebaseInstallations=t,this.sdkVersion=e,this.namespace=n,this.projectId=r,this.apiKey=i,this.appId=o}return t.prototype.fetch=function(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n,r,i,o,a,s,u,c,l,h,d,p,v,m,y,g,b,w;return Object(f.d)(this,(function(f){switch(f.label){case 0:return[4,Promise.all([this.firebaseInstallations.getId(),this.firebaseInstallations.getToken()])];case 1:e=f.sent(),n=e[0],r=e[1],i=window.FIREBASE_REMOTE_CONFIG_URL_BASE||"https://firebaseremoteconfig.googleapis.com",o=i+"/v1/projects/"+this.projectId+"/namespaces/"+this.namespace+":fetch?ke
2y="+this.apiKey,a={"Content-Type":"application/json","Content-Encoding":"gzip","If-None-Match":t.eTag||"*"},s={sdk_version:this.sdkVersion,app_instance_id:n,app_instance_id_token:r,app_id:this.appId,language_code:(void 0===_&&(_=navigator),_.languages&&_.languages[0]||_.language)},u={method:"POST",headers:a,body:JSON.stringify(s)},c=fetch(o,u),l=new Promise((function(e,n){t.signal.addEventListener((function(){var t=new Error("The operation was aborted.");t.name="AbortError",n(t)}))})),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"),ai.create(p,{originalErrorMessage:d.message});case 6:if(v=h.status,m=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 w=f.sent(),ai.create("fetch-client-parse",{originalErrorMessage:w.message});case 10:y=b.entries,g=b.state,f.label=11;case 11:if("INSTANCE_STATE_UNSPECIFIED"===g?v=500:"NO_CHANGE"===g?v=304:"NO_TEMPLATE"!==g&&"EMPTY_CONFIG"!==g||(y={}),304!==v&&200!==v)throw ai.create("fetch-status",{httpStatus:v});return[2,{status:v,eTag:m,config:y}]}var _}))}))},t}(),ui=function(){function t(){this.listeners=[]}return t.prototype.addEventListener=function(t){this.listeners.push(t)},t.prototype.abort=function(){this.listeners.forEach((function(t){return t()}))},t}(),ci=["1","true","t","yes","y","on"],li=function(){function t(t,e){void 0===e&&(e=""),this._source=t,this._value=e}return t.prototype.asString=function(){return this._value},t.prototype.asBoolean=function(){return"static"!==this._source&&ci.indexOf(this._value.toLowerCase())>=0},t.prototype.asNumber=function(){if("static"===this._source)return 0;var t=Number(this._value);return isNaN(t)&&(t=0),t},t.prototype.getSource=function(){return this._source},t}(),fi=function(){function t(t,e,n,r,i){this.app=t,this._client=e,this._storageCache=n,this._storage=r,this._logger=i,this._isInitializationComplete=!1,this.settings={fetchTimeoutMillis:6e4,minimumFetchIntervalMillis:432e5},this.defaultConfig={}}return t.prototype.setLogLevel=function(t){switch(t){case"debug":this._logger.logLevel=a.a.DEBUG;break;case"silent":this._logger.logLevel=a.a.SILENT;break;default:this._logger.logLevel=a.a.ERROR}},Object.defineProperty(t.prototype,"fetchTimeMillis",{get:function(){return this._storageCache.getLastSuccessfulFetchTimestampMillis()||-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastFetchStatus",{get:function(){return this._storageCache.getLastFetchStatus()||"no-fetch-yet"},enumerable:!1,configurable:!0}),t.prototype.activate=function(){return Object(f.b)(this,void 0,void 0,(function(){var t,e,n;return Object(f.d)(this,(function(r){switch(r.label){case 0:return[4,Promise.all([this._storage.getLastSuccessfulFetchResponse(),this._storage.getActiveConfigEtag()])];case 1:return t=r.sent(),e=t[0],n=t[1],e&&e.config&&e.eTag&&e.eTag!==n?[4,Promise.all([this._storageCache.setActiveConfig(e.config),this._storage.setActiveConfigEtag(e.eTag)])]:[2,!1];case 2:return r.sent(),[2,!0]}}))}))},t.prototype.ensureInitialized=function(){var t=this;return this._initializePromise||(this._initializePromise=this._storageCache.loadFromStorage().then((function(){t._isInitializationComplete=!0}))),this._initializePromise},t.prototype.fetch=function(){return Object(f.b)(this,void 0,void 0,(function(){var t,e,n,r=this;return Object(f.d)(this,(function(i){switch(i.label){case 0:t=new ui,setTimeout((function(){return Object(f.b)(r,void 0,void 0,(function(){return Object(f.d)(this,(function(e){return t.abort(),[2]}))}))}),this.settings.fetchTimeoutMillis),i.label=1;case 1:return i.trys.push([1,4,,6]),[4,this._client.fetch({cacheMaxAgeMillis:this.settings.minimumFetchIntervalMillis,signal:t})];case 2:return i.sent(),[4,this._storageCache.setLastFetchStatus("success")];case 3:return i.sent(),[3,6];case 4:return e=i.sent(),n=function(t,e){return t instanceof s.c&&-1!==t.code.indexOf(e)}(e,"fetch-throttle")?"throttle":"failure",[4,this._storageCache.setLastFetchStatus(n)];case 5:throw i.sent(),e;case 6:return[2]}}
2))}))},t.prototype.fetchAndActivate=function(){return Object(f.b)(this,void 0,void 0,(function(){return Object(f.d)(this,(function(t){switch(t.label){case 0:return[4,this.fetch()];case 1:return t.sent(),[2,this.activate()]}}))}))},t.prototype.getAll=function(){var t=this;return function(t,e){void 0===t&&(t={});void 0===e&&(e={});return Object.keys(Object(f.a)(Object(f.a)({},t),e))}(this._storageCache.getActiveConfig(),this.defaultConfig).reduce((function(e,n){return e[n]=t.getValue(n),e}),{})},t.prototype.getBoolean=function(t){return this.getValue(t).asBoolean()},t.prototype.getNumber=function(t){return this.getValue(t).asNumber()},t.prototype.getString=function(t){return this.getValue(t).asString()},t.prototype.getValue=function(t){this._isInitializationComplete||this._logger.debug('A value was requested for key "'+t+'" before SDK initialization completed. Await on ensureInitialized if the intent was to get a previously activated value.');var e=this._storageCache.getActiveConfig();return e&&void 0!==e[t]?new li("remote",e[t]):this.defaultConfig&&void 0!==this.defaultConfig[t]?new li("default",String(this.defaultConfig[t])):(this._logger.debug('Returning static value for key "'+t+'". Define a default or remote value if this is unintentional.'),new li("static"))},t}();function hi(t,e){var n=t.target.error||void 0;return ai.create(e,{originalErrorMessage:n&&n.message})}var di="app_namespace_store";var pi=function(){function t(t,e,n,r){void 0===r&&(r=new Promise((function(t,e){var n=indexedDB.open("firebase_remote_config",1);n.onerror=function(t){e(hi(t,"storage-open"))},n.onsuccess=function(e){t(e.target.result)},n.onupgradeneeded=function(t){var e=t.target.result;switch(t.oldVersion){case 0:e.createObjectStore(di,{keyPath:"compositeKey"})}}}))),this.appId=t,this.appName=e,this.namespace=n,this.openDbPromise=r}return t.prototype.getLastFetchStatus=function(){return this.get("last_fetch_status")},t.prototype.setLastFetchStatus=function(t){return this.set("last_fetch_status",t)},t.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.get("last_successful_fetch_timestamp_millis")},t.prototype.setLastSuccessfulFetchTimestampMillis=function(t){return this.set("last_successful_fetch_timestamp_millis",t)},t.prototype.getLastSuccessfulFetchResponse=function(){return this.get("last_successful_fetch_response")},t.prototype.setLastSuccessfulFetchResponse=function(t){return this.set("last_successful_fetch_response",t)},t.prototype.getActiveConfig=function(){return this.get("active_config")},t.prototype.setActiveConfig=function(t){return this.set("active_config",t)},t.prototype.getActiveConfigEtag=function(){return this.get("active_config_etag")},t.prototype.setActiveConfigEtag=function(t){return this.set("active_config_etag",t)},t.prototype.getThrottleMetadata=function(){return this.get("throttle_metadata")},t.prototype.setThrottleMetadata=function(t){return this.set("throttle_metadata",t)},t.prototype.deleteThrottleMetadata=function(){return this.delete("throttle_metadata")},t.prototype.get=function(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n=this;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,this.openDbPromise];case 1:return e=i.sent(),[2,new Promise((function(i,o){var a=e.transaction([di],"readonly").objectStore(di),s=n.createCompositeKey(t);try{var u=a.get(s);u.onerror=function(t){o(hi(t,"storage-get"))},u.onsuccess=function(t){var e=t.target.result;i(e?e.value:void 0)}}catch(r){o(ai.create("storage-get",{originalErrorMessage:r&&r.message}))}}))]}}))}))},t.prototype.set=function(t,e){return Object(f.b)(this,void 0,void 0,(function(){var n,i=this;return Object(f.d)(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([di],"readwrite").objectStore(di),u=i.createCompositeKey(t);try{var c=s.put({compositeKey:u,value:e});c.onerror=function(t){a(hi(t,"storage-set"))},c.onsuccess=function(){o()}}catch(r){a(ai.create("storage-set",{originalErrorMessage:r&&r.message}))}}))]}}))}))},t.prototype.delete=function(t){return Object(f.b)(this,void 0,void 0,(function(){var e,n=this;return Object(f.d)(this,(function(i){switch(i.label){case 0:return[4,this.openDbPromise];case 1:return e=i.sent(),[2,new Promise((function(i,o){var a=e.transaction([di],"readwrite").objectStore(di),s=n.createCompositeKey(t);try{var u=a.delete(s);u.onerror=function(t){o(hi(t,"storage-delete"))},u.onsuccess=function(){i()}}catch(r){o(ai.create("storage-delete",{originalErrorMessage:r&&r.message}))}}))]}}))}))},t.prototype.createCompositeKey=function(t){return[this.appId,this.appName,this.namespace,t].join()},t}(),vi=function(){function t(t){this.storage=t}return t.prototype.getLastFetchStatus=function(){return this.lastFetchStatus},t.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.lastSuccessfulFetchTimestampMillis},t.prototype.getActiveConfig=function(){return this.activeConfig},t.prototype.loadFromStorage=function(){return Object(f.b)(this,void 0,void 0,(function(){var t,e,n,r,i,o;return Object(f.d)(this,(function(a){switch(a.label){case 0:return t=this.storage.getLastFetchStatus(),e=this.storage.getLastSuccessfulFetchTimestampMillis(),n=this.storage.getActiveConfig(),[4,t];case 1:return(r=a.sent())&&(this.lastFetchStatus=r),[4,e];case 2:return(i=a.sent())&&(this.lastSuccessfulFetchTimestampMillis=i),[4,n];case 3:return(o=a.sent())&&(this.activeConfig=o),[2]}}))}))},t.prototype.setLastFetchStatus=function(t){return this.lastFetchStatus=t,this.storage.setLastFetchStatus(t)},t.prototype.setLastSuccessfulFetchTimestampMillis=function(t){return this.lastSuccessfulFetchTimestampMillis=t,this.storage.setLastSuccessfulFetchTimestampMillis(t)},t.prototype.setActiveConfig=function(t){return this.activeConfig=t,this.storage.setActiveConfig(t)},t}();function mi(t,e){return new Promise((function(n,r){var i=Math.max(e-Date.now(),0),o=setTimeout(n,i);t.addEventListener((function(){clearTimeout(o),r(ai.create("fetch-throttle",{throttleEndTimeMillis:e}))}))}))}var yi,gi=function(){function t(t,e){this.client=t,this.storage=e}return t.prototype.fetch=function(t){return Object(f.b)(this,void 0,void 0,(function(){var e;return Object(f.d)(this,(function(n){switch(n.label){case 0:return[4,this.storage.getThrottleMetadata()];case 1:return e=n.sent()||{backoffCount:0,throttleEndTimeMillis:Date.now()},[2,this.attemptFetch(t,e)]}}))}))},t.prototype.attemptFetch=function(t,e){var n=e.throttleEndTimeMillis,r=e.backoffCount;return Object(f.b)(this,void 0,void 0,(function(){var e,i,o;return Object(f.d)(this,(function(a){switch(a.label){case 0:return[4,mi(t.signal,n)];case 1:a.sent(),a.label=2;case 2:return a.trys.push([2,5,,7]),[4,this.client.fetch(t)];case 3:return e=a.sent(),[4,this.storage.deleteThrottleMetadata()];case 4:return a.sent(),[2,e];case 5:if(!function(t){if(!(t instanceof s.c)||!t.customData)return!1;var e=Number(t.customData.httpStatus);return 429===e||500===e||503===e||504===e}(i=a.sent()))throw i;return o={throttleEndTimeMillis:Date.now()+Object(s.j)(r),backoffCount:r+1},[4,this.storage.setThrottleMetadata(o)];case 6:return a.sent(),[2,this.attemptFetch(t,o)];case 7:return[2]}}
2))}))},t}(),bi="@firebase/remote-config";(yi=o.a).INTERNAL.registerComponent(new c.a("remoteConfig",(function(t,e){var n=t.getProvider("app").getImmediate(),r=t.getProvider("installations").getImmediate();if("undefined"===typeof window)throw ai.create("registration-window");var i=n.options,o=i.projectId,s=i.apiKey,u=i.appId;if(!o)throw ai.create("registration-project-id");if(!s)throw ai.create("registration-api-key");if(!u)throw ai.create("registration-app-id");e=e||"firebase";var c=new pi(u,n.name,e),l=new vi(c),f=new a.b(bi);f.logLevel=a.a.ERROR;var h=new si(r,yi.SDK_VERSION,e,o,s,u),d=new gi(h,c),p=new ii(d,c,l,f),v=new fi(n,p,l,c,f);return v.ensureInitialized(),v}),"PUBLIC").setMultipleInstances(!0)),yi.registerVersion(bi,"0.1.31");o.a.registerVersion("firebase","8.2.9","app");console.warn("\nIt looks like you're using the development build of the Firebase JS SDK.\nWhen deploying Firebase apps to production, it is advisable to only import\nthe individual SDK components you intend to use.\n\nFor the module builds, these are available in the following manner\n(replace <PACKAGE> with the name of a component - i.e. auth, database, etc):\n\nCommonJS Modules:\nconst firebase = require('firebase/app');\nrequire('firebase/<PACKAGE>');\n\nES Modules:\nimport firebase from 'firebase/app';\nimport 'firebase/<PACKAGE>';\n\nTypescript:\nimport firebase from 'firebase/app';\nimport 'firebase/<PACKAGE>';\n"),o.a.registerVersion("firebase","8.2.9")},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(28);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var a=[];r.forEach(e,(function(t,e){null!==t&&"undefined"!==typeof t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(i(e)+"="+i(t))})))})),o=a.join("&")}if(o){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t}},function(t,e,n){"use strict";var r=n(28),i=n(97),o=n(98),a=n(53),s=n(99),u=n(102),c=n(103),l=n(56),f=n(40),h=n(41);t.exports=function(t){return new Promise((function(e,n){var d,p=t.data,v=t.headers,m=t.responseType;function y(){t.cancelToken&&t.cancelToken.unsubscribe(d),t.signal&&t.signal.removeEventListener("abort",d)}r.isFormData(p)&&delete v["Content-Type"];var g=new XMLHttpRequest;if(t.auth){var b=t.auth.username||"",w=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";v.Authorization="Basic "+btoa(b+":"+w)}var _=s(t.baseURL,t.url);function E(){if(g){var r="getAllResponseHeaders"in g?u(g.getAllResponseHeaders()):null,o={data:m&&"text"!==m&&"json"!==m?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:t,request:g};i((function(t){e(t),y()}),(function(t){n(t),y()}),o),g=null}}if(g.open(t.method.toUpperCase(),a(_,t.params,t.paramsSerializer),!0),g.timeout=t.timeout,"onloadend"in g?g.onloadend=E:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(E)},g.onabort=function(){g&&(n(l("Request aborted",t,"ECONNABORTED",g)),g=null)},g.onerror=function(){n(l("Network Error",t,null,g)),g=null},g.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",r=t.transitional||f.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",g)),g=null},r.isStandardBrowserEnv()){var O=(t.withCredentials||c(_))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;O&&(v[t.xsrfHeaderName]=O)}"setRequestHeader"in g&&r.forEach(v,(function(t,e){"undefined"===typeof p&&"content-type"===e.toLowerCase()?delete v[e]:g.setRequestHeader(e,t)}
2)),r.isUndefined(t.withCredentials)||(g.withCredentials=!!t.withCredentials),m&&"json"!==m&&(g.responseType=t.responseType),"function"===typeof t.onDownloadProgress&&g.addEventListener("progress",t.onDownloadProgress),"function"===typeof t.onUploadProgress&&g.upload&&g.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(d=function(t){g&&(n(!t||t&&t.type?new h("canceled"):t),g.abort(),g=null)},t.cancelToken&&t.cancelToken.subscribe(d),t.signal&&(t.signal.aborted?d():t.signal.addEventListener("abort",d))),p||(p=null),g.send(p)}))}},function(t,e,n){"use strict";var r=n(54);t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";var r=n(28);t.exports=function(t,e){e=e||{};var n={};function i(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function o(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(t[n],e[n])}function a(t){if(!r.isUndefined(e[t]))return i(void 0,e[t])}function s(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(void 0,e[n])}function u(n){return n in e?i(t[n],e[n]):n in t?i(void 0,t[n]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return r.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||o,i=e(t);r.isUndefined(i)&&e!==u||(n[t]=i)})),n}},function(t,e){t.exports={version:"0.24.0"}},function(t,e,n){"use strict";e.__esModule=!0,e.default=e.EXITING=e.ENTERED=e.ENTERING=e.EXITED=e.UNMOUNTED=void 0;var r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,n):{};r.get||r.set?Object.defineProperty(e,n,r):e[n]=t[n]}return e.default=t,e}(n(3)),i=s(n(4)),o=s(n(31)),a=n(61);n(62);function s(t){return t&&t.__esModule?t:{default:t}}var u="unmounted";e.UNMOUNTED=u;var c="exited";e.EXITED=c;var l="entering";e.ENTERING=l;var f="entered";e.ENTERED=f;var h="exiting";e.EXITING=h;var d=function(t){var e,n;function r(e,n){var r;r=t.call(this,e,n)||this;var i,o=n.transitionGroup,a=o&&!o.isMounting?e.enter:e.appear;return r.appearStatus=null,e.in?a?(i=c,r.appearStatus=l):i=f:i=e.unmountOnExit||e.mountOnEnter?u:c,r.state={status:i},r.nextCallback=null,r}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var a=r.prototype;return a.getChildContext=function(){return{transitionGroup:null}},r.getDerivedStateFromProps=function(t,e){return t.in&&e.status===u?{status:c}:null},a.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},a.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==l&&n!==f&&(e=l):n!==l&&n!==f||(e=h)}this.updateStatus(!1,e)},a.componentWillUnmount=function(){this.cancelNextCallback()},a.getTimeouts=function(){var t,e,n,r=this.props.timeout;return t=e=n=r,null!=r&&"number"!==typeof r&&(t=r.exit,e=r.enter,n=void 0!==r.appear?r.appear:e),{exit:t,enter:e,appear:n}},a.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e){this.cancelNextCallback();var n=o.default.findDOMNode(this);e===l?this.performEnter(n,t):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===c&&this.setState({status:u})},a.performEnter=function(t,e){var n=this,r=this.props.enter,i=this.context.transitionGroup?this.context.transitionGroup.isMounting:e,o=this.getTimeouts(),a=i?o.appear:o.enter;e||r?(this.props.onEnter(t,i),this.safeSetState({status:l},(function(){n.props.onEntering(t,i),n.onTransitionEnd(t,a,(function(){n.safeSetState({status:f}
2,(function(){n.props.onEntered(t,i)}))}))}))):this.safeSetState({status:f},(function(){n.props.onEntered(t)}))},a.performExit=function(t){var e=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(t),this.safeSetState({status:h},(function(){e.props.onExiting(t),e.onTransitionEnd(t,r.exit,(function(){e.safeSetState({status:c},(function(){e.props.onExited(t)}))}))}))):this.safeSetState({status:c},(function(){e.props.onExited(t)}))},a.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},a.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},a.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,e.nextCallback=null,t(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},a.onTransitionEnd=function(t,e,n){this.setNextCallback(n);var r=null==e&&!this.props.addEndListener;t&&!r?(this.props.addEndListener&&this.props.addEndListener(t,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},a.render=function(){var t=this.state.status;if(t===u)return null;var e=this.props,n=e.children,r=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(e,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"===typeof n)return n(t,r);var o=i.default.Children.only(n);return i.default.cloneElement(o,r)},r}(i.default.Component);function p(){}d.contextTypes={transitionGroup:r.object},d.childContextTypes={transitionGroup:function(){}},d.propTypes={},d.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:p,onEntering:p,onEntered:p,onExit:p,onExiting:p,onExited:p},d.UNMOUNTED=0,d.EXITED=1,d.ENTERING=2,d.ENTERED=3,d.EXITING=4;var v=(0,a.polyfill)(d);e.default=v},function(t,e,n){"use strict";function r(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==t&&void 0!==t&&this.setState(t)}function i(t){this.setState(function(e){var n=this.constructor.getDerivedStateFromProps(t,e);return null!==n&&void 0!==n?n:null}.bind(this))}function o(t,e){try{var n=this.props,r=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof t.getDerivedStateFromProps&&"function"!==typeof e.getSnapshotBeforeUpdate)return t;var n=null,a=null,s=null;if("function"===typeof e.componentWillMount?n="componentWillMount":"function"===typeof e.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof e.componentWillReceiveProps?a="componentWillReceiveProps":"function"===typeof e.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"===typeof e.componentWillUpdate?s="componentWillUpdate":"function"===typeof e.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var u=t.displayName||t.name,c="function"===typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof t.getDerivedStateFromProps&&(e.componentWillMount=r,e.componentWillReceiveProps=i),"function"===typeof e.getSnapshotBeforeUpdate){if("function"!==typeof e.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=o;var l=e.componentDidUpdate;e.componentDidUpdate=function(t,e,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,t,e,r)}}return t}n.r(e),n.d(e,"polyfill",(function(){return a})),r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0},function(t,e,n){"use strict";
2e.__esModule=!0,e.classNamesShape=e.timeoutsShape=void 0;var r;(r=n(3))&&r.__esModule;e.timeoutsShape=null;e.classNamesShape=null},function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var r=s(n(3)),i=s(n(4)),o=n(61),a=n(114);function s(t){return t&&t.__esModule?t:{default:t}}function u(){return(u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var l=Object.values||function(t){return Object.keys(t).map((function(e){return t[e]}))},f=function(t){var e,n;function r(e,n){var r,i=(r=t.call(this,e,n)||this).handleExited.bind(c(c(r)));return r.state={handleExited:i,firstRender:!0},r}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var o=r.prototype;return o.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},o.componentDidMount=function(){this.appeared=!0,this.mounted=!0},o.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(t,e){var n=e.children,r=e.handleExited;return{children:e.firstRender?(0,a.getInitialChildMapping)(t,r):(0,a.getNextChildMapping)(t,n,r),firstRender:!1}},o.handleExited=function(t,e){var n=(0,a.getChildMapping)(this.props.children);t.key in n||(t.props.onExited&&t.props.onExited(e),this.mounted&&this.setState((function(e){var n=u({},e.children);return delete n[t.key],{children:n}})))},o.render=function(){var t=this.props,e=t.component,n=t.childFactory,r=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,["component","childFactory"]),o=l(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===e?o:i.default.createElement(e,r,o)},r}(i.default.Component);f.childContextTypes={transitionGroup:r.default.object.isRequired},f.propTypes={},f.defaultProps={component:"div",childFactory:function(t){return t}};var h=(0,o.polyfill)(f);e.default=h,t.exports=e.default},function(t,e){t.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},function(t,e){t.exports={L:1,M:0,Q:3,H:2}},function(t,e,n){var r=n(67);function i(t,e){if(void 0==t.length)throw new Error(t.length+"/"+e);for(var n=0;n<t.length&&0==t[n];)n++;this.num=new Array(t.length-n+e);for(var r=0;r<t.length-n;r++)this.num[r]=t[r+n]}i.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),n=0;n<this.getLength();n++)for(var o=0;o<t.getLength();o++)e[n+o]^=r.gexp(r.glog(this.get(n))+r.glog(t.get(o)));return new i(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=r.glog(this.get(0))-r.glog(t.get(0)),n=new Array(this.getLength()),o=0;o<this.getLength();o++)n[o]=this.get(o);for(o=0;o<t.getLength();o++)n[o]^=r.gexp(r.glog(t.get(o))+e);return new i(n,0).mod(t)}},t.exports=i},function(t,e){for(var n={glog:function(t){if(t<1)throw new Error("glog("+t+")");return n.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return n.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},r=0;r<8;r++)n.EXP_TABLE[r]=1<<r;for(r=8;r<256;r++)n.EXP_TABLE[r]=n.EXP_TABLE[r-4]^n.EXP_TABLE[r-5]^n.EXP_TABLE[r-6]^n.EXP_TABLE[r-8];for(r=0;r<255;r++)n.LOG_TABLE[n.EXP_TABLE[r]]=r;t.exports=n},function(t,e,n){"use strict";function r(t){var e,n=t.Symbol;return"function"===typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=p;var i,o=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==r(t)&&"function"!==typeof t)return{default:t};var e=u();if(e&&e.has(t))return e.get(t);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var a=i?Object.getOwnPropertyDescriptor(t,o):null;
2a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=t[o]}n.default=t,e&&e.set(t,n);return n}(n(4)),a=(i=n(3))&&i.__esModule?i:{default:i},s=n(115);function u(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return u=function(){return t},t}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var d=["Audio","BallTriangle","Bars","Circles","Grid","Hearts","Oval","Puff","Rings","TailSpin","ThreeDots","Watch","RevolvingDot","Triangle","Plane","MutatingDots","CradleLoader"];function p(t){var e,n=f((0,o.useState)(!0),2),r=n[0],i=n[1];return(0,o.useEffect)((function(){var e;return t.timeout&&t.timeout>0&&(e=setTimeout((function(){i(!1)}),t.timeout)),function(){e&&clearTimeout(e)}})),t.visible&&"false"!==t.visible&&r?o.default.createElement("div",{"aria-busy":"true",className:t.className,style:t.style},o.default.createElement((e=t.type,d.includes(e)?s.Spinner[e]:s.Spinner.Audio),function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t))):null}p.propTypes={type:a.default.oneOf([].concat(d)),style:a.default.objectOf(a.default.string),className:a.default.string,visible:a.default.oneOfType([a.default.bool,a.default.string]),timeout:a.default.number},p.defaultProps={type:"Audio",style:{},className:"",visible:!0,timeout:0}},function(t,e,n){"use strict";function r(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(i){return"function"===typeof i?i(n,r,t):e(i)}}}}var i=r();i.withExtraArgument=r,e.a=i},function(t,e,n){"use strict";function r(t){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(n,!0).forEach((function(e){m(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e,n){return e&&c(t.prototype,e),n&&c(t,n),t}function f(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?d(t):e}
2function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&v(t,e)}function v(t,e){return(v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var y=n(4),g=(n(3),n(133)),b=n(65);function w(t){for(var e="",n=0;n<t.length;n++){var r=t.charCodeAt(n);r<128?e+=String.fromCharCode(r):r<2048?(e+=String.fromCharCode(192|r>>6),e+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(e+=String.fromCharCode(224|r>>12),e+=String.fromCharCode(128|r>>6&63),e+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&t.charCodeAt(n)),e+=String.fromCharCode(240|r>>18),e+=String.fromCharCode(128|r>>12&63),e+=String.fromCharCode(128|r>>6&63),e+=String.fromCharCode(128|63&r))}return e}var _={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1};function E(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return t.forEach((function(t,r){var i=null;t.forEach((function(o,a){if(!o&&null!==i)return n.push("M".concat(i+e," ").concat(r+e,"h").concat(a-i,"v1H").concat(i+e,"z")),void(i=null);if(a!==t.length-1)o&&null===i&&(i=a);else{if(!o)return;null===i?n.push("M".concat(a+e,",").concat(r+e," h1v1H").concat(a+e,"z")):n.push("M".concat(i+e,",").concat(r+e," h").concat(a+1-i,"v1H").concat(i+e,"z"))}}))})),n.join("")}function O(t,e){return t.slice().map((function(t,n){return n<e.y||n>=e.y+e.h?t:t.map((function(t,n){return(n<e.x||n>=e.x+e.w)&&t}))}))}function T(t,e){var n=t.imageSettings,r=t.size,i=t.includeMargin;if(null==n)return null;var o=i?4:0,a=e.length+2*o,s=Math.floor(.1*r),u=a/r,c=(n.width||s)*u,l=(n.height||s)*u,f=null==n.x?e.length/2-c/2:n.x*u,h=null==n.y?e.length/2-l/2:n.y*u,d=null;if(n.excavate){var p=Math.floor(f),v=Math.floor(h);d={x:p,y:v,w:Math.ceil(c+f-p),h:Math.ceil(l+h-v)}}return{x:f,y:h,h:l,w:c,excavation:d}}var S=function(){try{(new Path2D).addPath(new Path2D)}catch(t){return!1}return!0}(),k=function(t){function e(){var t,n;u(this,e);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return m(d(n=f(this,(t=h(e)).call.apply(t,[this].concat(i)))),"_canvas",void 0),m(d(n),"_image",void 0),m(d(n),"state",{imgLoaded:!1}),m(d(n),"handleImageLoad",(function(){n.setState({imgLoaded:!0})})),n}return p(e,t),l(e,[{key:"componentDidMount",value:function(){this._image&&this._image.complete&&this.handleImageLoad(),this.update()}},{key:"componentWillReceiveProps",value:function(t){var e,n;(null===(e=this.props.imageSettings)||void 0===e?void 0:e.src)!==(null===(n=t.imageSettings)||void 0===n?void 0:n.src)&&this.setState({imgLoaded:!1})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var t=this.props,e=t.value,n=t.size,r=t.level,i=t.bgColor,o=t.fgColor,a=t.includeMargin,s=t.imageSettings,u=new g(-1,b[r]);if(u.addData(w(e)),u.make(),null!=this._canvas){var c=this._canvas,l=c.getContext("2d");if(!l)return;var f=u.modules;if(null===f)return;var h=a?4:0,d=f.length+2*h,p=T(this.props,f);null!=s&&null!=p&&null!=p.excavation&&(f=O(f,p.excavation));var v=window.devicePixelRatio||1;c.height=c.width=n*v;var m=n/d*v;l.scale(m,m),l.fillStyle=i,l.fillRect(0,0,d,d),l.fillStyle=o,S?l.fill(new Path2D(E(f,h))):f.forEach((function(t,e){t.forEach((function(t,n){t&&l.fillRect(n+h,e+h,1,1)}))})),this.state.imgLoaded&&this._image&&null!=p&&l.drawImage(this._image,p.x+h,p.y+h,p.w,p.h)}}},{key:"render",value:function(){var t=this,e=this.props,n=(e.value,e.size),r=(e.level,e.bgColor,e.fgColor,e.style),o=(e.includeMargin,e.imageSettings),u=s(e,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),c=a({height:n,width:n},r),l=null,f=o&&o.src;return null!=o&&null!=f&&(l=y.createElement("img",{src:f,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(e){return t._image=e}})),y.createElement(y.Fragment,null,y.createElement("canvas",i({style:c,height:n,width:n,ref:function(e){return t._canvas=e}},u)),l)}}]),e}(y.PureComponent);m(k,"defaultProps",_);var I=function(t){function e(){return u(this,e),f(this,h(e).apply(this,arguments))}return p(e,t),l(e,[{key:"render",value:function(){var t=this.props,e=t.value,n=t.size,r=t.level,o=t.bgColor,a=t.fgColor,u=t.includeMargin,c=t.
2imageSettings,l=s(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),f=new g(-1,b[r]);f.addData(w(e)),f.make();var h=f.modules;if(null===h)return null;var d=u?4:0,p=h.length+2*d,v=T(this.props,h),m=null;null!=c&&null!=v&&(null!=v.excavation&&(h=O(h,v.excavation)),m=y.createElement("image",{xlinkHref:c.src,height:v.h,width:v.w,x:v.x+d,y:v.y+d,preserveAspectRatio:"none"}));var _=E(h,d);return y.createElement("svg",i({shapeRendering:"crispEdges",height:n,width:n,viewBox:"0 0 ".concat(p," ").concat(p)},l),y.createElement("path",{fill:o,d:"M0,0 h".concat(p,"v").concat(p,"H0z")}),y.createElement("path",{fill:a,d:_}),m)}}]),e}(y.PureComponent);m(I,"defaultProps",_);var C=function(t){var e=t.renderAs,n=s(t,["renderAs"]),r="svg"===e?I:k;return y.createElement(r,n)};C.defaultProps=a({renderAs:"canvas"},_),t.exports=C},,function(t,e,n){"use strict";var r=n(38),i=60103,o=60106;e.Fragment=60107,e.StrictMode=60108,e.Profiler=60114;var a=60109,s=60110,u=60112;e.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"),e.Fragment=f("react.fragment"),e.StrictMode=f("react.strict_mode"),e.Profiler=f("react.profiler"),a=f("react.provider"),s=f("react.context"),u=f("react.forward_ref"),e.Suspense=f("react.suspense"),c=f("react.memo"),l=f("react.lazy")}var h="function"===typeof Symbol&&Symbol.iterator;function d(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function m(t,e,n){this.props=t,this.context=e,this.refs=v,this.updater=n||p}function y(){}function g(t,e,n){this.props=t,this.context=e,this.refs=v,this.updater=n||p}m.prototype.isReactComponent={},m.prototype.setState=function(t,e){if("object"!==typeof t&&"function"!==typeof t&&null!=t)throw Error(d(85));this.updater.enqueueSetState(this,t,e,"setState")},m.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},y.prototype=m.prototype;var b=g.prototype=new y;b.constructor=g,r(b,m.prototype),b.isPureReactComponent=!0;var w={current:null},_=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function O(t,e,n){var r,o={},a=null,s=null;
vendor: 12,576 bytes, line 2
2if(null!=e)for(r in void 0!==e.ref&&(s=e.ref),void 0!==e.key&&(a=""+e.key),e)_.call(e,r)&&!E.hasOwnProperty(r)&&(o[r]=e[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(t&&t.defaultProps)for(r in u=t.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:i,type:t,key:a,ref:s,props:o,_owner:w.current}}function T(t){return"object"===typeof t&&null!==t&&t.$$typeof===i}var S=/\/+/g;function k(t,e){return"object"===typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,(function(t){return e[t]}))}(""+t.key):e.toString(36)}function I(t,e,n,r,a){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var u=!1;if(null===t)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case i:case o:u=!0}}if(u)return a=a(u=t),t=""===r?"."+k(u,0):r,Array.isArray(a)?(n="",null!=t&&(n=t.replace(S,"$&/")+"/"),I(a,e,n,"",(function(t){return t}))):null!=a&&(T(a)&&(a=function(t,e){return{$$typeof:i,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(a,n+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(S,"$&/")+"/")+t)),e.push(a)),1;if(u=0,r=""===r?".":r+":",Array.isArray(t))for(var c=0;c<t.length;c++){var l=r+k(s=t[c],c);u+=I(s,e,n,l,a)}else if("function"===typeof(l=function(t){return null===t||"object"!==typeof t?null:"function"===typeof(t=h&&t[h]||t["@@iterator"])?t:null}(t)))for(t=l.call(t),c=0;!(s=t.next()).done;)u+=I(s=s.value,e,n,l=r+k(s,c++),a);else if("object"===s)throw e=""+t,Error(d(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e));return u}function C(t,e,n){if(null==t)return t;var r=[],i=0;return I(t,r,"","",(function(t){return e.call(n,t,i++)})),r}function N(t){if(-1===t._status){var e=t._result;e=e(),t._status=0,t._result=e,e.then((function(e){0===t._status&&(e=e.default,t._status=1,t._result=e)}),(function(e){0===t._status&&(t._status=2,t._result=e)}))}if(1===t._status)return t._result;throw t._result}var x={current:null};function P(){var t=x.current;if(null===t)throw Error(d(321));return t}var j={ReactCurrentDispatcher:x,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};e.Children={map:C,forEach:function(t,e,n){C(t,(function(){e.apply(this,arguments)}),n)},count:function(t){var e=0;return C(t,(function(){e++})),e},toArray:function(t){return C(t,(function(t){return t}))||[]},only:function(t){if(!T(t))throw Error(d(143));return t}},e.Component=m,e.PureComponent=g,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j,e.cloneElement=function(t,e,n){if(null===t||void 0===t)throw Error(d(267,t));var o=r({},t.props),a=t.key,s=t.ref,u=t._owner;if(null!=e){if(void 0!==e.ref&&(s=e.ref,u=w.current),void 0!==e.key&&(a=""+e.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(l in e)_.call(e,l)&&!E.hasOwnProperty(l)&&(o[l]=void 0===e[l]&&void 0!==c?c[l]:e[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:t.type,key:a,ref:s,props:o,_owner:u}},e.createContext=function(t,e){return void 0===e&&(e=null),(t={$$typeof:s,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:t},t.Consumer=t},e.createElement=O,e.createFactory=function(t){var e=O.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:u,render:t}},e.isValidElement=T,e.lazy=function(t){return{$$typeof:l,_payload:{_status:-1,_result:t},_init:N}},e.memo=function(t,e){return{$$typeof:c,type:t,compare:void 0===e?null:e}},e.useCallback=function(t,e){return P().useCallback(t,e)},e.useContext=function(t,e){return P().useContext(t,e)},e.useDebugValue=function(){},e.useEffect=function(t,e){return P().useEffect(t,e)},e.useImperativeHandle=function(t,e,n){return P().useImperativeHandle(t,e,n)},e.useLayoutEffect=function(t,e){return P().useLayoutEffect(t,e)},e.useMemo=function(t,e){return P().useMemo(t,e)},e.useReducer=function(t,e,n){return P().useReducer(t,e,n)},e.useRef=function(t){return P().useRef(t)},e.useState=function(t){return P().useState(t)},e.version="17.0.1"},function(t,e,n){"use strict";var r=n(4),i=n(38),o=n(75);function a(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=new Set,u={};function c(t,e){l(t,e),l(t+"Capture",e)}function l(t,e){for(u[t]=e,t=0;t<e.length;t++)s.add(e[t])}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={},v={};function m(t,e,n,r,i,o,a){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(t){y[t]=new m(t,0,!1,t,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(t){var e=t[0];y[e]=new m(e,1,!1,t[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(t){y[t]=new m(t,2,!1,t.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(t){y[t]=new m(t,2,!1,t,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(t){y[t]=new m(t,3,!1,t.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(t){y[t]=new m(t,3,!0,t,null,!1,!1)})),["capture","download"].forEach((function(t){y[t]=new m(t,4,!1,t,null,!1,!1)})),["cols","rows","size","span"].forEach((function(t){y[t]=new m(t,6,!1,t,null,!1,!1)})),["rowSpan","start"].forEach((function(t){y[t]=new m(t,5,!1,t.toLowerCase(),null,!1,!1)}));var g=/[\-:]([a-z])/g;function b(t){return t[1].toUpperCase()}function w(t,e,n,r){var i=y.hasOwnProperty(e)?y[e]:null;(null!==i?0===i.type:!r&&(2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])))||(function(t,e,n,r){if(null===e||"undefined"===typeof e||function(t,e,n,r){if(null!==n&&0===n.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}(t,e,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(e,n,i,r)&&(n=null),r||null===i?function(t){return!!d.call(v,t)||!d.call(p,t)&&(h.test(t)?v[t]=!0:(p[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=null===n?3!==i.type&&"":n:(e=i.attributeName,r=i.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(t){var e=t.replace(g,b);y[e]=new m(e,1,!1,t,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(t){var e=t.replace(g,b);y[e]=new m(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(t){var e=t.replace(g,b);y[e]=new m(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(t){y[t]=new m(t,1,!1,t.toLowerCase(),null,!1,!1)})),y.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(t){y[t]=new m(t,1,!1,t.toLowerCase(),null,!0,!0)}));var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,O=60106,T=60107,S=60108,k=60114,I=60109,C=60110,N=60112,x=60113,P=60120,j=60115,A=60116,D=60121,R=60128,M=60129,L=60130,F=60131;if("function"===typeof Symbol&&Symbol.for){var U=Symbol.for;E=U("react.element"),O=U("react.portal"),T=U("react.fragment"),S=U("react.strict_mode"),k=U("react.profiler"),I=U("react.provider"),C=U("react.context"),N=U("react.forward_ref"),x=U("react.suspense"),P=U("react.suspense_list"),j=U("react.memo"),A=U("react.lazy"),D=U("react.block"),U("react.scope"),R=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(t){return null===t||"object"!==typeof t?null:"function"===typeof(t=B&&t[B]||t["@@iterator"])?t:null}function z(t){if(void 0===V)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);V=e&&e[1]||""}return"\n"+V+t}var W=!1;function H(t,e){if(!t||W)return"";W=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}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{W=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?z(t):""}function G(t){switch(t.tag){case 5:return z(t.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return t=H(t.type,!1);case 11:return t=H(t.type.render,!1);case 22:return t=H(t.type._render,!1);case 1:return t=H(t.type,!0);default:return""}}function Y(t){if(null==t)return null;if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t;switch(t){case T:return"Fragment";case O:return"Portal";case k:return"Profiler";case S:return"StrictMode";case x:return"Suspense";case P:return"SuspenseList"}if("object"===typeof t)switch(t.$$typeof){case C:return(t.displayName||"Context")+".Consumer";case I:return(t._context.displayName||"Context")+".Provider";case N:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case j:return Y(t.type);case D:return Y(t._render);case A:e=t._payload,t=t._init;try{return Y(t(e))}catch(n){}}return null}function K(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function Q(t){var e=t.type;
vendor: 5,699 bytes, line 2
2return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function X(t){t._valueTracker||(t._valueTracker=function(t){var e=Q(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){r=""+t,o.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function $(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=Q(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}function J(t){if("undefined"===typeof(t=t||("undefined"!==typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function Z(t,e){var n=e.checked;return i({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function tt(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=K(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function et(t,e){null!=(e=e.checked)&&w(t,"checked",e,!1)}function nt(t,e){et(t,e);var n=K(e.value),r=e.type;if(null!=n)"number"===r?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if("submit"===r||"reset"===r)return void t.removeAttribute("value");e.hasOwnProperty("value")?it(t,e.type,n):e.hasOwnProperty("defaultValue")&&it(t,e.type,K(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function rt(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!("submit"!==r&&"reset"!==r||void 0!==e.value&&null!==e.value))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,""!==n&&(t.name=n)}function it(t,e,n){"number"===e&&J(t.ownerDocument)===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}function ot(t,e){return t=i({children:void 0},e),(e=function(t){var e="";return r.Children.forEach(t,(function(t){null!=t&&(e+=t)})),e}(e.children))&&(t.children=e),t}function at(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+K(n),e=null,i=0;i<t.length;i++){if(t[i].value===n)return t[i].selected=!0,void(r&&(t[i].defaultSelected=!0));null!==e||t[i].disabled||(e=t[i])}null!==e&&(e.selected=!0)}}function st(t,e){if(null!=e.dangerouslySetInnerHTML)throw Error(a(91));return i({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function ut(t,e){var n=e.value;if(null==n){if(n=e.children,e=e.defaultValue,null!=n){if(null!=e)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}e=n}null==e&&(e=""),n=e}t._wrapperState={initialValue:K(n)}}function ct(t,e){var n=K(e.value),r=K(e.defaultValue);null!=n&&((n=""+n)!==t.value&&(t.value=n),null==e.defaultValue&&t.defaultValue!==n&&(t.defaultValue=n)),null!=r&&(t.defaultValue=""+r)}function lt(t){var e=t.textContent;e===t._wrapperState.initialValue&&""!==e&&null!==e&&(t.value=e)}var ft="http://www.w3.org/1999/xhtml",ht="http://www.w3.org/2000/svg";function dt(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pt(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?dt(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var vt,mt,yt=(mt=function(t,e){if(t.namespaceURI!==ht||"innerHTML"in t)t.innerHTML=e;else{for((vt=vt||document.createElement("div")).innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=vt.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,n,r){MSApp.execUnsafeLocalFunction((function(){return mt(t,e)}))}:mt);function gt(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}var bt={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},wt=["Webkit","ms","Moz","O"];function _t(t,e,n){return null==e||"boolean"===typeof e||""===e?"":n||"number"!==typeof e||0===e||bt.hasOwnProperty(t)&&bt[t]?(""+e).trim():e+"px"}function Et(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=_t(n,e[n],r);"float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}Object.keys(bt).forEach((function(t){wt.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),bt[e]=bt[t]}))}
vendor: 4,785 bytes, line 2
2));var Ot=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 Tt(t,e){if(e){if(Ot[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML))throw Error(a(137,t));if(null!=e.dangerouslySetInnerHTML){if(null!=e.children)throw Error(a(60));if("object"!==typeof e.dangerouslySetInnerHTML||!("__html"in e.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=e.style&&"object"!==typeof e.style)throw Error(a(62))}}function St(t,e){if(-1===t.indexOf("-"))return"string"===typeof e.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function kt(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}var It=null,Ct=null,Nt=null;function xt(t){if(t=ti(t)){if("function"!==typeof It)throw Error(a(280));var e=t.stateNode;e&&(e=ni(e),It(t.stateNode,t.type,e))}}function Pt(t){Ct?Nt?Nt.push(t):Nt=[t]:Ct=t}function jt(){if(Ct){var t=Ct,e=Nt;if(Nt=Ct=null,xt(t),e)for(t=0;t<e.length;t++)xt(e[t])}}function At(t,e){return t(e)}function Dt(t,e,n,r,i){return t(e,n,r,i)}function Rt(){}var Mt=At,Lt=!1,Ft=!1;function Ut(){null===Ct&&null===Nt||(Rt(),jt())}function Vt(t,e){var n=t.stateNode;if(null===n)return null;var r=ni(n);if(null===r)return null;n=r[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!r;break t;default:t=!1}if(t)return null;if(n&&"function"!==typeof n)throw Error(a(231,e,typeof n));return n}var Bt=!1;if(f)try{var qt={};Object.defineProperty(qt,"passive",{get:function(){Bt=!0}}),window.addEventListener("test",qt,qt),window.removeEventListener("test",qt,qt)}catch(mt){Bt=!1}function zt(t,e,n,r,i,o,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(l){this.onError(l)}}var Wt=!1,Ht=null,Gt=!1,Yt=null,Kt={onError:function(t){Wt=!0,Ht=t}};function Qt(t,e,n,r,i,o,a,s,u){Wt=!1,Ht=null,zt.apply(Kt,arguments)}function Xt(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do{0!==(1026&(e=t).flags)&&(n=e.return),t=e.return}while(t)}return 3===e.tag?n:null}function $t(t){if(13===t.tag){var e=t.memoizedState;if(null===e&&(null!==(t=t.alternate)&&(e=t.memoizedState)),null!==e)return e.dehydrated}return null}function Jt(t){if(Xt(t)!==t)throw Error(a(188))}function Zt(t){if(!(t=function(t){var e=t.alternate;if(!e){if(null===(e=Xt(t)))throw Error(a(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Jt(i),t;if(o===r)return Jt(i),e;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?t:e}(t)))return null;for(var e=t;;){if(5===e.tag||6===e.tag)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}function te(t,e){for(var n=t.alternate;null!==e;){if(e===t||e===n)return!0;e=e.return}return!1}var ee,ne,re,ie,oe=!1,ae=[],se=null,ue=null,ce=null,le=new Map,fe=new Map,he=[],de="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 pe(t,e,n,r,i){return{blockedOn:t,domEventName:e,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function ve(t,e){switch(t){case"focusin":case"focusout":se=null;break;case"dragenter":case"dragleave":ue=null;break;case"mouseover":case"mouseout":ce=null;break;case"pointerover":case"pointerout":le.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":fe.delete(e.pointerId)}}function me(t,e,n,r,i,o){return null===t||t.nativeEvent!==o?(t=pe(e,n,r,i,o),null!==e&&(null!==(e=ti(e))&&ne(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,null!==i&&-1===e.indexOf(i)&&e.push(i),t)}function ye(t){var e=Zr(t.target);if(null!==e){var n=Xt(e);
vendor: 8,994 bytes, line 2
2if(null!==n)if(13===(e=n.tag)){if(null!==(e=$t(n)))return t.blockedOn=e,void ie(t.lanePriority,(function(){o.unstable_runWithPriority(t.priority,(function(){re(n)}))}))}else if(3===e&&n.stateNode.hydrate)return void(t.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}t.blockedOn=null}function ge(t){if(null!==t.blockedOn)return!1;for(var e=t.targetContainers;0<e.length;){var n=Ze(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(null!==n)return null!==(e=ti(n))&&ne(e),t.blockedOn=n,!1;e.shift()}return!0}function be(t,e,n){ge(t)&&n.delete(e)}function we(){for(oe=!1;0<ae.length;){var t=ae[0];if(null!==t.blockedOn){null!==(t=ti(t.blockedOn))&&ee(t);break}for(var e=t.targetContainers;0<e.length;){var n=Ze(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(null!==n){t.blockedOn=n;break}e.shift()}null===t.blockedOn&&ae.shift()}null!==se&&ge(se)&&(se=null),null!==ue&&ge(ue)&&(ue=null),null!==ce&&ge(ce)&&(ce=null),le.forEach(be),fe.forEach(be)}function _e(t,e){t.blockedOn===e&&(t.blockedOn=null,oe||(oe=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,we)))}function Ee(t){function e(e){return _e(e,t)}if(0<ae.length){_e(ae[0],t);for(var n=1;n<ae.length;n++){var r=ae[n];r.blockedOn===t&&(r.blockedOn=null)}}for(null!==se&&_e(se,t),null!==ue&&_e(ue,t),null!==ce&&_e(ce,t),le.forEach(e),fe.forEach(e),n=0;n<he.length;n++)(r=he[n]).blockedOn===t&&(r.blockedOn=null);for(;0<he.length&&null===(n=he[0]).blockedOn;)ye(n),null===n.blockedOn&&he.shift()}function Oe(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Te={animationend:Oe("Animation","AnimationEnd"),animationiteration:Oe("Animation","AnimationIteration"),animationstart:Oe("Animation","AnimationStart"),transitionend:Oe("Transition","TransitionEnd")},Se={},ke={};function Ie(t){if(Se[t])return Se[t];if(!Te[t])return t;var e,n=Te[t];for(e in n)if(n.hasOwnProperty(e)&&e in ke)return Se[t]=n[e];return t}f&&(ke=document.createElement("div").style,"AnimationEvent"in window||(delete Te.animationend.animation,delete Te.animationiteration.animation,delete Te.animationstart.animation),"TransitionEvent"in window||delete Te.transitionend.transition);var Ce=Ie("animationend"),Ne=Ie("animationiteration"),xe=Ie("animationstart"),Pe=Ie("transitionend"),je=new Map,Ae=new Map,De=["abort","abort",Ce,"animationEnd",Ne,"animationIteration",xe,"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",Pe,"transitionEnd","waiting","waiting"];function Re(t,e){for(var n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Ae.set(r,e),je.set(r,i),c(i,[r])}}(0,o.unstable_now)();var Me=8;function Le(t){if(0!==(1&t))return Me=15,1;if(0!==(2&t))return Me=14,2;if(0!==(4&t))return Me=13,4;var e=24&t;return 0!==e?(Me=12,e):0!==(32&t)?(Me=11,32):0!==(e=192&t)?(Me=10,e):0!==(256&t)?(Me=9,256):0!==(e=3584&t)?(Me=8,e):0!==(4096&t)?(Me=7,4096):0!==(e=4186112&t)?(Me=6,e):0!==(e=62914560&t)?(Me=5,e):67108864&t?(Me=4,67108864):0!==(134217728&t)?(Me=3,134217728):0!==(e=805306368&t)?(Me=2,e):0!==(1073741824&t)?(Me=1,1073741824):(Me=8,t)}function Fe(t,e){var n=t.pendingLanes;if(0===n)return Me=0;var r=0,i=0,o=t.expiredLanes,a=t.suspendedLanes,s=t.pingedLanes;if(0!==o)r=o,i=Me=15;else if(0!==(o=134217727&n)){var u=o&~a;0!==u?(r=Le(u),i=Me):0!==(s&=o)&&(r=Le(s),i=Me)}else 0!==(o=n&~a)?(r=Le(o),i=Me):0!==s&&(r=Le(s),i=Me);if(0===r)return 0;if(r=n&((0>(r=31-We(r))?0:1<<r)<<1)-1,0!==e&&e!==r&&0===(e&a)){if(Le(e),i<=Me)return e;Me=i}if(0!==(e=t.entangledLanes))for(t=t.entanglements,e&=r;0<e;)i=1<<(n=31-We(e)),r|=t[n],e&=~i;return r}function Ue(t){return 0!==(t=-1073741825&t.pendingLanes)?t:1073741824&t?1073741824:0}function Ve(t,e){switch(t){case 15:return 1;case 14:return 2;case 12:return 0===(t=Be(24&~e))?Ve(10,e):t;case 10:return 0===(t=Be(192&~e))?Ve(8,e):t;case 8:return 0===(t=Be(3584&~e))&&(0===(t=Be(4186112&~e))&&(t=512)),t;case 2:return 0===(e=Be(805306368&~e))&&(e=268435456),e}throw Error(a(358,t))}function Be(t){return t&-t}function qe(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ze(t,e,n){t.pendingLanes|=e;var r=e-1;t.suspendedLanes&=r,t.pingedLanes&=r,(t=t.eventTimes)[e=31-We(e)]=n}var We=Math.clz32?Math.clz32:function(t){return 0===t?32:31-(He(t)/Ge|0)|0},He=Math.log,Ge=Math.LN2;var Ye=o.unstable_UserBlockingPriority,Ke=o.unstable_runWithPriority,Qe=!0;function Xe(t,e,n,r){Lt||Rt();var i=Je,o=Lt;Lt=!0;try{Dt(i,t,e,n,r)}finally{(Lt=o)||Ut()}}function $e(t,e,n,r){Ke(Ye,Je.bind(null,t,e,n,r))}function Je(t,e,n,r){var i;if(Qe)if((i=0===(4&e))&&0<ae.length&&-1<de.indexOf(t))t=pe(null,t,e,n,r),ae.push(t);else{var o=Ze(t,e,n,r);if(null===o)i&&ve(t,r);else{if(i){if(-1<de.indexOf(t))return t=pe(o,t,e,n,r),void ae.push(t);if(function(t,e,n,r,i){switch(e){case"focusin":return se=me(se,t,e,n,r,i),!0;case"dragenter":return ue=me(ue,t,e,n,r,i),!0;case"mouseover":return ce=me(ce,t,e,n,r,i),!0;case"pointerover":var o=i.pointerId;return le.set(o,me(le.get(o)||null,t,e,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,fe.set(o,me(fe.get(o)||null,t,e,n,r,i)),!0}return!1}(o,t,e,n,r))return;ve(t,r)}jr(t,e,r,null,n)}}}function Ze(t,e,n,r){var i=kt(r);if(null!==(i=Zr(i))){var o=Xt(i);if(null===o)i=null;else{var a=o.tag;if(13===a){if(null!==(i=$t(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 jr(t,e,r,i,n),null}var tn=null,en=null,nn=null;function rn(){if(nn)return nn;var t,e,n=en,r=n.length,i="value"in tn?tn.value:tn.textContent,o=i.length;for(t=0;t<r&&n[t]===i[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===i[o-e];e++);return nn=i.slice(t,1<e?1-e:void 0)}function on(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}function an(){return!0}function sn(){return!1}function un(t){function e(e,n,r,i,o){for(var a in this._reactName=e,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,t)t.hasOwnProperty(a)&&(e=t[a],this[a]=e?e(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?an:sn,this.isPropagationStopped=sn,this}return i(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!==typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!==typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),e}var cn,ln,fn,hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=un(hn),pn=i({},hn,{view:0,detail:0}),vn=un(pn),mn=i({},pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:In,button:0,buttons:0,relatedTarget:function(t){return void 0===t.relatedTarget?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==fn&&(fn&&"mousemove"===t.type?(cn=t.screenX-fn.screenX,ln=t.screenY-fn.screenY):ln=cn=0,fn=t),cn)},movementY:function(t){return"movementY"in t?t.movementY:ln}}),yn=un(mn),gn=un(i({},mn,{dataTransfer:0})),bn=un(i({},pn,{relatedTarget:0})),wn=un(i({},hn,{animationName:0,elapsedTime:0,pseudoElement:0})),_n=un(i({},hn,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}})),En=un(i({},hn,{data:0})),On={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Tn={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"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kn(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=Sn[t])&&!!e[t]}function In(){return kn}var Cn=un(i({},pn,{key:function(t){if(t.key){var e=On[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=on(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"ke
2yup"===t.type?Tn[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:In,charCode:function(t){return"keypress"===t.type?on(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?on(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}})),Nn=un(i({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),xn=un(i({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:In})),Pn=un(i({},hn,{propertyName:0,elapsedTime:0,pseudoElement:0})),jn=un(i({},mn,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0})),An=[9,13,27,32],Dn=f&&"CompositionEvent"in window,Rn=null;f&&"documentMode"in document&&(Rn=document.documentMode);var Mn=f&&"TextEvent"in window&&!Rn,Ln=f&&(!Dn||Rn&&8<Rn&&11>=Rn),Fn=String.fromCharCode(32),Un=!1;function Vn(t,e){switch(t){case"keyup":return-1!==An.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bn(t){return"object"===typeof(t=t.detail)&&"data"in t?t.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 Wn(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!zn[t.type]:"textarea"===e}function Hn(t,e,n,r){Pt(r),0<(e=Dr(e,"onChange")).length&&(n=new dn("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Gn=null,Yn=null;function Kn(t){kr(t,0)}function Qn(t){if($(ei(t)))return t}function Xn(t,e){if("change"===t)return e}var $n=!1;if(f){var Jn;if(f){var Zn="oninput"in document;if(!Zn){var tr=document.createElement("div");tr.setAttribute("oninput","return;"),Zn="function"===typeof tr.oninput}Jn=Zn}else Jn=!1;$n=Jn&&(!document.documentMode||9<document.documentMode)}function er(){Gn&&(Gn.detachEvent("onpropertychange",nr),Yn=Gn=null)}function nr(t){if("value"===t.propertyName&&Qn(Yn)){var e=[];if(Hn(e,Yn,t,kt(t)),t=Kn,Lt)t(e);else{Lt=!0;try{At(t,e)}finally{Lt=!1,Ut()}}}}function rr(t,e,n){"focusin"===t?(er(),Yn=n,(Gn=e).attachEvent("onpropertychange",nr)):"focusout"===t&&er()}function ir(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return Qn(Yn)}function or(t,e){if("click"===t)return Qn(e)}function ar(t,e){if("input"===t||"change"===t)return Qn(e)}var sr="function"===typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t===1/e)||t!==t&&e!==e},ur=Object.prototype.hasOwnProperty;function cr(t,e){if(sr(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!ur.call(e,n[r])||!sr(t[n[r]],e[n[r]]))return!1;return!0}function lr(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function fr(t,e){var n,r=lr(t);for(t=0;r;){if(3===r.nodeType){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=lr(r)}}function hr(t,e){return!(!t||!e)&&(t===e||(!t||3!==t.nodeType)&&(e&&3===e.nodeType?hr(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}function dr(){for(var t=window,e=J();e instanceof t.HTMLIFrameElement;){try{var n="string"===typeof e.contentWindow.location.href}catch(r){n=!1}if(!n)break;e=J((t=e.contentWindow).document)}return e}function pr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}var vr=f&&"documentMode"in document&&11>=document.documentMode,mr=null,yr=null,gr=null,br=!1;function wr(t,e,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==mr||mr!==J(r)||("selectionStart"in(r=mr)&&pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 12,834 bytes, line 2
2sNode:r.focusNode,focusOffset:r.focusOffset},gr&&cr(gr,r)||(gr=r,0<(r=Dr(yr,"onSelect")).length&&(e=new dn("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=mr)))}Re("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),Re("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),Re(De,2);for(var _r="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Er=0;Er<_r.length;Er++)Ae.set(_r[Er],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 Or="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Tr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Or));function Sr(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,function(t,e,n,r,i,o,s,u,c){if(Qt.apply(this,arguments),Wt){if(!Wt)throw Error(a(198));var l=Ht;Wt=!1,Ht=null,Gt||(Gt=!0,Yt=l)}}(r,e,void 0,t),t.currentTarget=null}function kr(t,e){e=0!==(4&e);for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;t:{var o=void 0;if(e)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 t;Sr(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 t;Sr(i,s,c),o=u}}}if(Gt)throw t=Yt,Gt=!1,Yt=null,t}function Ir(t,e){var n=ri(e),r=t+"__bubble";n.has(r)||(Pr(e,t,2,!1),n.add(r))}var Cr="_reactListening"+Math.random().toString(36).slice(2);function Nr(t){t[Cr]||(t[Cr]=!0,s.forEach((function(e){Tr.has(e)||xr(e,!1,t,null),xr(e,!0,t,null)})))}function xr(t,e,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===t&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!e&&Tr.has(t)){if("scroll"!==t)return;i|=2,o=r}var a=ri(o),s=t+"__"+(e?"capture":"bubble");a.has(s)||(e&&(i|=4),Pr(o,t,i,e),a.add(s))}function Pr(t,e,n,r){var i=Ae.get(e);switch(void 0===i?2:i){case 0:i=Xe;break;case 1:i=$e;break;default:i=Je}n=i.bind(null,e,n,t),i=void 0,!Bt||"touchstart"!==e&&"touchmove"!==e&&"wheel"!==e||(i=!0),r?void 0!==i?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):void 0!==i?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function jr(t,e,n,r,i){var o=r;if(0===(1&e)&&0===(2&e)&&null!==r)t: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 t}s=s.parentNode}}r=r.return}!function(t,e,n){if(Ft)return t(e,n);Ft=!0;try{Mt(t,e,n)}finally{Ft=!1,Ut()}}((function(){var r=o,i=kt(n),a=[];t:{var s=je.get(t);if(void 0!==s){var u=dn,c=t;switch(t){case"keypress":if(0===on(n))break t;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 t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=yn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=xn;break;case Ce:case Ne:case xe:u=wn;break;case Pe:u=Pn;break;case"scroll":u=vn;break;case"wheel":u=jn;break;case"copy":case"cut":case"paste":u=_n;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Nn}var l=0!==(4&e),f=!l&&"scroll"===t,h=l?null!==s?s+"Capture":null:s;l=[];for(var d,p=r;null!==p;){var v=(d=p).stateNode;if(5===d.tag&&null!==v&&(d=v,null!==h&&(null!=(v=Vt(p,h))&&l.push(Ar(p,v,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&e)){if(u="mouseout"===t||"pointerout"===t,(!(s="mouseover"===t||"pointerover"===t)||0!==(16&e)||!(c=n.relatedTarget||n.fromElement)||!Zr(c)&&!c[$r])&&(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=Xt(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(u=null,c=r),u!==c)){if(l=yn,v="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==t&&"pointerover"!==t||(l=Nn,v="onPointerLeave",h="onPointerEnter",p="pointer"),f=null==u?s:ei(u),d=null==c?s:ei(c),(s=new l(v,p+"leave",u,n,i)).target=f,s.relatedTarget=d,v=null,Zr(i)===r&&((l=new l(h,p+"enter",c,n,i)).target=d,l.relatedTarget=f,v=l),f=v,u&&c)t:{for(h=c,p=0,d=l=u;d;d=Rr(d))p++;for(d=0,v=h;v;v=Rr(v))d++;for(;0<p-d;)l=Rr(l),p--;for(;0<d-p;)h=Rr(h),d--;for(;p--;){if(l===h||null!==h&&l===h.alternate)break t;l=Rr(l),h=Rr(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?ei(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var m=Xn;else if(Wn(s))if($n)m=ar;else{m=ir;var y=rr}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=or);switch(m&&(m=m(t,r))?Hn(a,m,n,i):(y&&y(t,s,r),"focusout"===t&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&it(s,"number",s.value)),y=r?ei(r):window,t){case"focusin":(Wn(y)||"true"===y.contentEditable)&&(mr=y,yr=r,gr=null);break;case"focusout":gr=yr=mr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,wr(a,n,i);break;case"selectionchange":if(vr)break;case"keydown":case"keyup":wr(a,n,i)}var g;if(Dn)t:{switch(t){case"compositionstart":var b="onCompositionStart";break t;case"compositionend":b="onCompositionEnd";break t;case"compositionupdate":b="onCompositionUpdate";break t}b=void 0}else qn?Vn(t,n)&&(b="onCompositionEnd"):"keydown"===t&&229===n.keyCode&&(b="onCompositionStart");b&&(Ln&&"ko"!==n.locale&&(qn||"onCompositionStart"!==b?"onCompositionEnd"===b&&qn&&(g=rn()):(en="value"in(tn=i)?tn.value:tn.textContent,qn=!0)),0<(y=Dr(r,b)).length&&(b=new En(b,t,null,n,i),a.push({event:b,listeners:y}),g?b.data=g:null!==(g=Bn(n))&&(b.data=g))),(g=Mn?function(t,e){switch(t){case"compositionend":return Bn(e);case"keypress":return 32!==e.which?null:(Un=!0,Fn);case"textInput":return(t=e.data)===Fn&&Un?null:t;default:return null}}(t,n):function(t,e){if(qn)return"compositionend"===t||!Dn&&Vn(t,e)?(t=rn(),nn=en=tn=null,qn=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Ln&&"ko"!==e.locale?null:e.data;default:return null}}(t,n))&&(0<(r=Dr(r,"onBeforeInput")).length&&(i=new En("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=g))}kr(a,e)}))}function Ar(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Dr(t,e){for(var n=e+"Capture",r=[];null!==t;){var i=t,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Vt(t,n))&&r.unshift(Ar(t,o,i)),null!=(o=Vt(t,e))&&r.push(Ar(t,o,i))),t=t.return}return r}function Rr(t){if(null===t)return null;do{t=t.return}while(t&&5!==t.tag);return t||null}function Mr(t,e,n,r,i){for(var o=e._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=Vt(n,o))&&a.unshift(Ar(n,u,s)):i||null!=(u=Vt(n,o))&&a.push(Ar(n,u,s))),n=n.return}0!==a.length&&t.push({event:e,listeners:a})}function Lr(){}var Fr=null,Ur=null;function Vr(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function Br(t,e){return"textarea"===t||"option"===t||"noscript"===t||"string"===typeof e.children||"number"===typeof e.children||"object"===typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&null!=e.dangerouslySetInnerHTML.__html}var qr="function"===typeof setTimeout?setTimeout:void 0,zr="function"===typeof clearTimeout?clearTimeout:void 0;function Wr(t){1===t.nodeType?t.textContent="":9===t.nodeType&&(null!=(t=t.body)&&(t.textContent=""))}function Hr(t){for(;null!=t;t=t.nextSibling){var e=t.nodeType;if(1===e||3===e)break}return t}function Gr(t){t=t.previousSibling;for(var e=0;t;){if(8===t.nodeType){var n=t.data;if("$"===n||"$!"===n||"$?"===n){if(0===e)return t;e--}else"/$"===n&&e++}t=t.previousSibling}return null}var Yr=0;var Kr=Math.random().toString(36).slice(2),Qr="__reactFiber$"+Kr,Xr="__reactProps$"+Kr,$r="__reactContainer$"+Kr,Jr="__reactEvents$"+Kr;function Zr(t){var e=t[Qr];if(e)return e;for(var n=t.parentNode;n;){if(e=n[$r]||n[Qr]){if(n=e.alternate,null!==e.child||null!==n&&null!==n.child)for(t=Gr(t);null!==t;){if(n=t[Qr])return n;t=Gr(t)}return e}n=(t=n).parentNode}return null}function ti(t){return!(t=t[Qr]||t[$r])||5!==t.tag&&6!==t.tag&&13!==t.tag&&3!==t.tag?null:t}function ei(t){if(5===t.tag||6===t.tag)return t.stateNode;throw Error(a(33))}function ni(t){return t[Xr]||null}function ri(t){var e=t[Jr];return void 0===e&&(e=t[Jr]=new Set),e}var ii=[],oi=-1;function ai(t){return{current:t}}function si(t){0>oi||(t.current=ii[oi],ii[oi]=null,oi--)}function ui(t,e){oi++,ii[oi]=t.current,t.current=e}var ci={},li=ai(ci),fi=ai(!1),hi=ci;function di(t,e){var n=t.type.contextTypes;if(!n)return ci;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function pi(t){return null!==(t=t.childContextTypes)&&void 0!==t}function vi(){si(fi),si(li)}function mi(t,e,n){if(li.current!==ci)throw Error(a(168));ui(li,e),ui(fi,n)}function yi(t,e,n){var r=t.stateNode;if(t=e.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(a(108,Y(e)||"Unknown",o));return i({},n,r)}function gi(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ci,hi=li.current,ui(li,t),ui(fi,fi.current),!0}function bi(t,e,n){var r=t.stateNode;if(!r)throw Error(a(169));n?(t=yi(t,e,hi),r.__reactInternalMemoizedMergedChildContext=t,si(fi),si(li),ui(li,t)):si(fi),ui(fi,n)}var wi=null,_i=null,Ei=o.unstable_runWithPriority,Oi=o.unstable_scheduleCallback,Ti=o.unstable_cancelCallback,Si=o.unstable_shouldYield,ki=o.unstable_requestPaint,Ii=o.unstable_now,Ci=o.unstable_getCurrentPriorityLevel,Ni=o.unstable_ImmediatePriority,xi=o.unstable_UserBlockingPriority,Pi=o.unstable_NormalPriority,ji=o.unstable_LowPriority,Ai=o.unstable_IdlePriority,Di={},Ri=void 0!==ki?ki:function(){},Mi=null,Li=null,Fi=!1,Ui=Ii(),Vi=1e4>Ui?Ii:function(){return Ii()-Ui};function Bi(){switch(Ci()){case Ni:return 99;case xi:return 98;case Pi:return 97;case ji:return 96;case Ai:return 95;default:throw Error(a(332))}}function qi(t){switch(t){case 99:return Ni;case 98:return xi;case 97:return Pi;case 96:return ji;case 95:return Ai;default:throw Error(a(332))}}function zi(t,e){return t=qi(t),Ei(t,e)}function Wi(t,e,n){return t=qi(t),Oi(t,e,n)}function Hi(){if(null!==Li){var t=Li;Li=null,Ti(t)}Gi()}
2function Gi(){if(!Fi&&null!==Mi){Fi=!0;var t=0;try{var e=Mi;zi(99,(function(){for(;t<e.length;t++){var n=e[t];do{n=n(!0)}while(null!==n)}})),Mi=null}catch(n){throw null!==Mi&&(Mi=Mi.slice(t+1)),Oi(Ni,Hi),n}finally{Fi=!1}}}var Yi=_.ReactCurrentBatchConfig;function Ki(t,e){if(t&&t.defaultProps){for(var n in e=i({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}return e}var Qi=ai(null),Xi=null,$i=null,Ji=null;function Zi(){Ji=$i=Xi=null}function to(t){var e=Qi.current;si(Qi),t.type._context._currentValue=e}function eo(t,e){for(;null!==t;){var n=t.alternate;if((t.childLanes&e)===e){if(null===n||(n.childLanes&e)===e)break;n.childLanes|=e}else t.childLanes|=e,null!==n&&(n.childLanes|=e);t=t.return}}function no(t,e){Xi=t,Ji=$i=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(0!==(t.lanes&e)&&(Da=!0),t.firstContext=null)}function ro(t,e){if(Ji!==t&&!1!==e&&0!==e)if("number"===typeof e&&1073741823!==e||(Ji=t,e=1073741823),e={context:t,observedBits:e,next:null},null===$i){if(null===Xi)throw Error(a(308));$i=e,Xi.dependencies={lanes:0,firstContext:e,responders:null}}else $i=$i.next=e;return t._currentValue}var io=!1;function oo(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function ao(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function so(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function uo(t,e){if(null!==(t=t.updateQueue)){var n=(t=t.shared).pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}}function co(t,e){var n=t.updateQueue,r=t.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=e:o=o.next=e}else i=o=e;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(t.updateQueue=n)}null===(t=n.lastBaseUpdate)?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function lo(t,e,n,r){var o=t.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=t.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});t:{var p=t,v=a;switch(u=e,d=n,v.tag){case 1:if("function"===typeof(p=v.payload)){h=p.call(d,h,u);break t}h=p;break t;case 3:p.flags=-4097&p.flags|64;case 0:if(null===(u="function"===typeof(p=v.payload)?p.call(d,h,u):p)||void 0===u)break t;h=i({},h,u);break t;case 2:io=!0}}null!==a.callback&&(t.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,t.lanes=s,t.memoizedState=h}}function fo(t,e,n){if(t=e.effects,e.effects=null,null!==t)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(a(191,i));i.call(r)}}}var ho=(new r.Component).refs;function po(t,e,n,r){n=null===(n=n(r,e=t.memoizedState))||void 0===n?e:i({},e,n),t.memoizedState=n,0===t.lanes&&(t.updateQueue.baseState=n)}var vo={isMounted:function(t){return!!(t=t._reactInternals)&&Xt(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=cu(),i=lu(t),o=so(r,i);o.payload=e,void 0!==n&&null!==n&&(o.callback=n),uo(t,o),fu(t,i,r)},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=cu(),i=lu(t),o=so(r,i);o.tag=1,o.payload=e,void 0!==n&&null!==n&&(o.callback=n),uo(t,o),fu(t,i,r)},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=cu(),r=lu(t),i=so(n,r);i.tag=2,void 0!==e&&null!==e&&(i.callback=e),uo(t,i),fu(t,r,n)}};function mo(t,e,n,r,i,o,a){return"function"===typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(r,o,a):!e.prototype||!e.prototype.isPureReactComponent||(!cr(n,r)||!cr(i,o))}function yo(t,e,n){var r=!1,i=ci,o=e.contextType;return"object"===typeof o&&null!==o?o=ro(o):(i=pi(e)?hi:li.current,o=(r=null!==(r=e.contextTypes)&&void 0!==r)?di(t,i):ci),e=new e(n,o),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=vo,t.stateNode=e,e._reactInternals=t,r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function go(t,e,n,r){t=e.state,"function"===typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),"function"===typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&vo.enqueueReplaceState(e,e.state,null)}function bo(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=ho,oo(t);var o=e.contextType;"object"===typeof o&&null!==o?i.context=ro(o):(o=pi(e)?hi:li.current,i.context=di(t,o)),lo(t,n,i,r),i.state=t.memoizedState,"function"===typeof(o=e.getDerivedStateFromProps)&&(po(t,e,o,n),i.state=t.memoizedState),"function"===typeof e.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(e=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),e!==i.state&&vo.enqueueReplaceState(i,i.state,null),lo(t,n,i,r),i.state=t.memoizedState),"function"===typeof i.componentDidMount&&(t.flags|=4)}var wo=Array.isArray;function _o(t,e,n){if(null!==(t=n.ref)&&"function"!==typeof t&&"object"!==typeof t){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,t));var i=""+t;return null!==e&&null!==e.ref&&"function"===typeof e.ref&&e.ref._stringRef===i?e.ref:((e=function(t){var e=r.refs;e===ho&&(e=r.refs={}),null===t?delete e[i]:e[i]=t})._stringRef=i,e)}if("string"!==typeof t)throw Error(a(284));if(!n._owner)throw Error(a(290,t))}return t}function Eo(t,e){if("textarea"!==t.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(e)?"object with keys {"+Object.keys(e).join(", ")+"}":e))}function Oo(t){function e(e,n){if(t){var r=e.lastEffect;null!==r?(r.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!t)return null;for(;null!==r;)e(n,r),r=r.sibling;return null}function r(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(t,e){return(t=zu(t,e)).index=0,t.sibling=null,t}function o(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index)<n?(e.flags=2,n):r:(e.flags=2,n):n}function s(e){return t&&null===e.alternate&&(e.flags=2),e}function u(t,e,n,r){return null===e||6!==e.tag?((e=Yu(n,t.mode,r)).return=t,e):((e=i(e,n)).return=t,e)}function c(t,e,n,r){return null!==e&&e.elementType===n.type?((r=i(e,n.props)).ref=_o(t,e,n),r.return=t,r):((r=Wu(n.type,n.key,n.props,null,t.mode,r)).ref=_o(t,e,n),r.return=t,r)}function l(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=Ku(n,t.mode,r)).return=t,e):((e=i(e,n.children||[])).return=t,e)}function f(t,e,n,r,o){return null===e||7!==e.tag?((e=Hu(n,t.mode,r,o)).return=t,e):((e=i(e,n)).return=t,e)}function h(t,e,n){if("string"===typeof e||"number"===typeof e)return(e=Yu(""+e,t.mode,n)).return=t,e;if("object"===typeof e&&null!==e){switch(e.$$typeof){case E:return(n=Wu(e.type,e.key,e.props,null,t.mode,n)).ref=_o(t,null,e),n.return=t,n;case O:return(e=Ku(e,t.mode,n)).return=t,e}if(wo(e)||q(e))return(e=Hu(e,t.mode,n,null)).return=t,e;Eo(t,e)}return null}function d(t,e,n,r){var i=null!==e?e.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:u(t,e,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case E:return n.key===i?n.type===T?f(t,e,n.props.children,r,i):c(t,e,n,r):null;case O:return n.key===i?l(t,e,n,r):null}if(wo(n)||q(n))return null!==i?null:f(t,e,n,r,null);Eo(t,n)}return null}function p(t,e,n,r,i){if("string"===typeof r||"number"===typeof r)return u(e,t=t.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case E:return t=t.get(null===r.key?n:r.key)||null,r.type===T?f(e,t,r.props.children,i,r.key):c(e,t,r,i);case O:return l(e,t=t.get(null===r.key?n:r.key)||null,r,i)}if(wo(r)||q(r))return f(e,t=t.get(n)||null,r,i,null);Eo(e,r)}return null}function v(i,a,s,u){for(var c=null,l=null,f=a,v=a=0,m=null;null!==f&&v<s.length;v++){f.index>
vendor: 4,793 bytes, line 2
2v?(m=f,f=null):m=f.sibling;var y=d(i,f,s[v],u);if(null===y){null===f&&(f=m);break}t&&f&&null===y.alternate&&e(i,f),a=o(y,a,v),null===l?c=y:l.sibling=y,l=y,f=m}if(v===s.length)return n(i,f),c;if(null===f){for(;v<s.length;v++)null!==(f=h(i,s[v],u))&&(a=o(f,a,v),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(i,f);v<s.length;v++)null!==(m=p(f,i,v,s[v],u))&&(t&&null!==m.alternate&&f.delete(null===m.key?v:m.key),a=o(m,a,v),null===l?c=m:l.sibling=m,l=m);return t&&f.forEach((function(t){return e(i,t)})),c}function m(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,v=s,m=s=0,y=null,g=u.next();null!==v&&!g.done;m++,g=u.next()){v.index>m?(y=v,v=null):y=v.sibling;var b=d(i,v,g.value,c);if(null===b){null===v&&(v=y);break}t&&v&&null===b.alternate&&e(i,v),s=o(b,s,m),null===f?l=b:f.sibling=b,f=b,v=y}if(g.done)return n(i,v),l;if(null===v){for(;!g.done;m++,g=u.next())null!==(g=h(i,g.value,c))&&(s=o(g,s,m),null===f?l=g:f.sibling=g,f=g);return l}for(v=r(i,v);!g.done;m++,g=u.next())null!==(g=p(v,i,m,g.value,c))&&(t&&null!==g.alternate&&v.delete(null===g.key?m:g.key),s=o(g,s,m),null===f?l=g:f.sibling=g,f=g);return t&&v.forEach((function(t){return e(i,t)})),l}return function(t,r,o,u){var c="object"===typeof o&&null!==o&&o.type===T&&null===o.key;c&&(o=o.props.children);var l="object"===typeof o&&null!==o;if(l)switch(o.$$typeof){case E:t:{for(l=o.key,c=r;null!==c;){if(c.key===l){switch(c.tag){case 7:if(o.type===T){n(t,c.sibling),(r=i(c,o.props.children)).return=t,t=r;break t}break;default:if(c.elementType===o.type){n(t,c.sibling),(r=i(c,o.props)).ref=_o(t,c,o),r.return=t,t=r;break t}}n(t,c);break}e(t,c),c=c.sibling}o.type===T?((r=Hu(o.props.children,t.mode,u,o.key)).return=t,t=r):((u=Wu(o.type,o.key,o.props,null,t.mode,u)).ref=_o(t,r,o),u.return=t,t=u)}return s(t);case O:t:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(t,r.sibling),(r=i(r,o.children||[])).return=t,t=r;break t}n(t,r);break}e(t,r),r=r.sibling}(r=Ku(o,t.mode,u)).return=t,t=r}return s(t)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(t,r.sibling),(r=i(r,o)).return=t,t=r):(n(t,r),(r=Yu(o,t.mode,u)).return=t,t=r),s(t);if(wo(o))return v(t,r,o,u);if(q(o))return m(t,r,o,u);if(l&&Eo(t,o),"undefined"===typeof o&&!c)switch(t.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,Y(t.type)||"Component"))}return n(t,r)}}var To=Oo(!0),So=Oo(!1),ko={},Io=ai(ko),Co=ai(ko),No=ai(ko);function xo(t){if(t===ko)throw Error(a(174));return t}function Po(t,e){switch(ui(No,e),ui(Co,t),ui(Io,ko),t=e.nodeType){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:pt(null,"");break;default:e=pt(e=(t=8===t?e.parentNode:e).namespaceURI||null,t=t.tagName)}si(Io),ui(Io,e)}function jo(){si(Io),si(Co),si(No)}function Ao(t){xo(No.current);var e=xo(Io.current),n=pt(e,t.type);e!==n&&(ui(Co,t),ui(Io,n))}function Do(t){Co.current===t&&(si(Io),si(Co))}var Ro=ai(0);function Mo(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!==(64&e.flags))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Lo=null,Fo=null,Uo=!1;function Vo(t,e){var n=Bu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=e,n.return=t,n.flags=8,null!==t.lastEffect?(t.lastEffect.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n}function Bo(t,e){switch(t.tag){case 5:var n=t.type;return null!==(e=1!==e.nodeType||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,!0);case 6:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,!0);case 13:default:return!1}}function qo(t){if(Uo){var e=Fo;if(e){var n=e;if(!Bo(t,e)){if(!(e=Hr(n.nextSibling))||!Bo(t,e))return t.flags=-1025&t.flags|2,Uo=!1,void(Lo=t);Vo(Lo,n)}Lo=t,Fo=Hr(e.firstChild)}else t.flags=-1025&t.flags|2,Uo=!1,Lo=t}}function zo(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;Lo=t}function Wo(t){if(t!==Lo)return!1;if(!Uo)return zo(t),Uo=!0,!1;var e=t.type;if(5!==t.tag||"head"!==e&&"body"!==e&&!Br(e,t.memoizedProps))for(e=Fo;e;)Vo(t,e),e=Hr(e.nextSibling);if(zo(t),13===t.tag){if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(a(317));t:{for(t=t.nextSibling,e=0;t;){if(8===t.nodeType){var n=t.data;if("/$"===n){if(0===e){Fo=Hr(t.nextSibling);break t}e--}else"$"!==n&&"$!"!==n&&"$?"!==n||e++}t=t.nextSibling}Fo=null}}else Fo=Lo?Hr(t.stateNode.nextSibling):null;return!0}
vendor: 8,172 bytes, line 2
2function Ho(){Fo=Lo=null,Uo=!1}var Go=[];function Yo(){for(var t=0;t<Go.length;t++)Go[t]._workInProgressVersionPrimary=null;Go.length=0}var Ko=_.ReactCurrentDispatcher,Qo=_.ReactCurrentBatchConfig,Xo=0,$o=null,Jo=null,Zo=null,ta=!1,ea=!1;function na(){throw Error(a(321))}function ra(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!sr(t[n],e[n]))return!1;return!0}function ia(t,e,n,r,i,o){if(Xo=o,$o=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Ko.current=null===t||null===t.memoizedState?xa:Pa,t=n(r,i),ea){o=0;do{if(ea=!1,!(25>o))throw Error(a(301));o+=1,Zo=Jo=null,e.updateQueue=null,Ko.current=ja,t=n(r,i)}while(ea)}if(Ko.current=Na,e=null!==Jo&&null!==Jo.next,Xo=0,Zo=Jo=$o=null,ta=!1,e)throw Error(a(300));return t}function oa(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Zo?$o.memoizedState=Zo=t:Zo=Zo.next=t,Zo}function aa(){if(null===Jo){var t=$o.alternate;t=null!==t?t.memoizedState:null}else t=Jo.next;var e=null===Zo?$o.memoizedState:Zo.next;if(null!==e)Zo=e,Jo=t;else{if(null===t)throw Error(a(310));t={memoizedState:(Jo=t).memoizedState,baseState:Jo.baseState,baseQueue:Jo.baseQueue,queue:Jo.queue,next:null},null===Zo?$o.memoizedState=Zo=t:Zo=Zo.next=t}return Zo}function sa(t,e){return"function"===typeof e?e(t):e}function ua(t){var e=aa(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;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((Xo&l)===l)null!==u&&(u=u.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===t?c.eagerState:t(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,$o.lanes|=l,Fs|=l}c=c.next}while(null!==c&&c!==i);null===u?o=r:u.next=s,sr(r,e.memoizedState)||(Da=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=u,n.lastRenderedState=r}return[e.memoizedState,n.dispatch]}function ca(t){var e=aa(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=t(o,s.action),s=s.next}while(s!==i);sr(o,e.memoizedState)||(Da=!0),e.memoizedState=o,null===e.baseQueue&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function la(t,e,n){var r=e._getVersion;r=r(e._source);var i=e._workInProgressVersionPrimary;if(null!==i?t=i===r:(t=t.mutableReadLanes,(t=(Xo&t)===t)&&(e._workInProgressVersionPrimary=r,Go.push(e))),t)return n(e._source);throw Go.push(e),Error(a(350))}function fa(t,e,n,r){var i=xs;if(null===i)throw Error(a(349));var o=e._getVersion,s=o(e._source),u=Ko.current,c=u.useState((function(){return la(i,e,n)})),l=c[1],f=c[0];c=Zo;var h=t.memoizedState,d=h.refs,p=d.getSnapshot,v=h.source;h=h.subscribe;var m=$o;return t.memoizedState={refs:d,source:e,subscribe:r},u.useEffect((function(){d.getSnapshot=n,d.setSnapshot=l;var t=o(e._source);if(!sr(s,t)){t=n(e._source),sr(f,t)||(l(t),t=lu(m),i.mutableReadLanes|=t&i.pendingLanes),t=i.mutableReadLanes,i.entangledLanes|=t;for(var r=i.entanglements,a=t;0<a;){var u=31-We(a),c=1<<u;r[u]|=t,a&=~c}}}),[n,e,r]),u.useEffect((function(){return r(e._source,(function(){var t=d.getSnapshot,n=d.setSnapshot;try{n(t(e._source));var r=lu(m);i.mutableReadLanes|=r&i.pendingLanes}catch(o){n((function(){throw o}))}}))}),[e,r]),sr(p,n)&&sr(v,e)&&sr(h,r)||((t={pending:null,dispatch:null,lastRenderedReducer:sa,lastRenderedState:f}).dispatch=l=Ca.bind(null,$o,t),c.queue=t,c.baseQueue=null,f=la(i,e,n),c.memoizedState=c.baseState=f),f}function ha(t,e,n){return fa(aa(),t,e,n)}function da(t){var e=oa();return"function"===typeof t&&(t=t()),e.memoizedState=e.baseState=t,t=(t=e.queue={pending:null,dispatch:null,lastRenderedReducer:sa,lastRenderedState:t}).dispatch=Ca.bind(null,$o,t),[e.memoizedState,t]}function pa(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===(e=$o.updateQueue)?(e={lastEffect:null},$o.updateQueue=e,e.lastEffect=t.next=t):null===(n=e.lastEffect)?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t),t}function va(t){return t={current:t},oa().memoizedState=t}function ma(){return aa().memoizedState}function ya(t,e,n,r){var i=oa();$o.flags|=t,i.memoizedState=pa(1|e,n,void 0,void 0===r?null:r)}function ga(t,e,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(e,n,o,r)}$o.flags|=t,i.memoizedState=pa(1|e,n,o,r)}function ba(t,e){return ya(516,4,t,e)}function wa(t,e){return ga(516,4,t,e)}function _a(t,e){return ga(4,2,t,e)}function Ea(t,e){return"function"===typeof e?(t=t(),e(t),function(){e(null)}):null!==e&&void 0!==e?(t=t(),e.current=t,function(){e.current=null}):void 0}function Oa(t,e,n){return n=null!==n&&void 0!==n?n.concat([t]):null,ga(4,2,Ea.bind(null,e,t),n)}function Ta(){}function Sa(t,e){var n=aa();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&ra(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function ka(t,e){var n=aa();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&ra(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function Ia(t,e){var n=Bi();zi(98>n?98:n,(function(){t(!0)})),zi(97<n?97:n,(function(){var n=Qo.transition;Qo.transition=1;try{t(!1),e()}finally{Qo.transition=n}}))}function Ca(t,e,n){var r=cu(),i=lu(t),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},a=e.pending;if(null===a?o.next=o:(o.next=a.next,a.next=o),e.pending=o,a=t.alternate,t===$o||null!==a&&a===$o)ea=ta=!0;else{if(0===t.lanes&&(null===a||0===a.lanes)&&null!==(a=e.lastRenderedReducer))try{var s=e.lastRenderedState,u=a(s,n);if(o.eagerReducer=a,o.eagerState=u,sr(u,s))return}catch(c){}fu(t,i,r)}}var Na={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},xa={readContext:ro,useCallback:function(t,e){return oa().memoizedState=[t,void 0===e?null:e],t},useContext:ro,useEffect:ba,useImperativeHandle:function(t,e,n){return n=null!==n&&void 0!==n?n.concat([t]):null,ya(4,2,Ea.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ya(4,2,t,e)},useMemo:function(t,e){var n=oa();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=oa();return e=void 0!==n?n(e):e,r.memoizedState=r.baseState=e,t=(t=r.queue={pending:null,dispatch:null,lastRenderedReducer:t,lastRenderedState:e}).dispatch=Ca.bind(null,$o,t),[r.memoizedState,t]},useRef:va,useState:da,useDebugValue:Ta,useDeferredValue:function(t){var e=da(t),n=e[0],r=e[1];return ba((function(){var e=Qo.transition;Qo.transition=1;try{r(t)}finally{Qo.transition=e}}),[t]),n},useTransition:function(){var t=da(!1),e=t[0];return va(t=Ia.bind(null,t[1])),[t,e]},useMutableSource:function(t,e,n){var r=oa();return r.memoizedState={refs:{getSnapshot:e,setSnapshot:null},source:t,subscribe:n},fa(r,t,e,n)},useOpaqueIdentifier:function(){if(Uo){var t=!1,e=function(t){return{$$typeof:R,toString:t,valueOf:t}}((function(){throw t||(t=!0,n("r:"+(Yr++).toString(36))),Error(a(355))})),n=da(e)[1];return 0===(2&$o.mode)&&($o.flags|=516,pa(5,(function(){n("r:"+(Yr++).toString(36))}),void 0,null)),e}return da(e="r:"+(Yr++).toString(36)),e},unstable_isNewReconciler:!1},Pa={readContext:ro,useCallback:Sa,useContext:ro,useEffect:wa,useImperativeHandle:Oa,useLayoutEffect:_a,useMemo:ka,useReducer:ua,useRef:ma,useState:function(){return ua(sa)},useDebugValue:Ta,useDeferredValue:function(t){var e=ua(sa),n=e[0],r=e[1];return wa((function(){var e=Qo.transition;Qo.transition=1;try{r(t)}finally{Qo.transition=e}}),[t]),n},useTransition:function(){var t=ua(sa)[0];return[ma().current,t]},useMutableSource:ha,useOpaqueIdentifier:function(){return ua(sa)[0]},unstable_isNewReconciler:!1},ja={readContext:ro,useCallback:Sa,useContext:ro,useEffect:wa,useImperativeHandle:Oa,useLayoutEffect:_a,useMemo:ka,useReducer:ca,useRef
2:ma,useState:function(){return ca(sa)},useDebugValue:Ta,useDeferredValue:function(t){var e=ca(sa),n=e[0],r=e[1];return wa((function(){var e=Qo.transition;Qo.transition=1;try{r(t)}finally{Qo.transition=e}}),[t]),n},useTransition:function(){var t=ca(sa)[0];return[ma().current,t]},useMutableSource:ha,useOpaqueIdentifier:function(){return ca(sa)[0]},unstable_isNewReconciler:!1},Aa=_.ReactCurrentOwner,Da=!1;function Ra(t,e,n,r){e.child=null===t?So(e,null,n,r):To(e,t.child,n,r)}function Ma(t,e,n,r,i){n=n.render;var o=e.ref;return no(e,i),r=ia(t,e,n,r,o,i),null===t||Da?(e.flags|=1,Ra(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~i,ns(t,e,i))}function La(t,e,n,r,i,o){if(null===t){var a=n.type;return"function"!==typeof a||qu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=Wu(n.type,null,r,e,e.mode,o)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=a,Fa(t,e,a,r,i,o))}return a=t.child,0===(i&o)&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:cr)(i,r)&&t.ref===e.ref)?ns(t,e,o):(e.flags|=1,(t=zu(a,r)).ref=e.ref,t.return=e,e.child=t)}function Fa(t,e,n,r,i,o){if(null!==t&&cr(t.memoizedProps,r)&&t.ref===e.ref){if(Da=!1,0===(o&i))return e.lanes=t.lanes,ns(t,e,o);0!==(16384&t.flags)&&(Da=!0)}return Ba(t,e,n,r,o)}function Ua(t,e,n){var r=e.pendingProps,i=r.children,o=null!==t?t.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&e.mode))e.memoizedState={baseLanes:0},bu(e,n);else{if(0===(1073741824&n))return t=null!==o?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t},bu(e,t),null;e.memoizedState={baseLanes:0},bu(e,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,e.memoizedState=null):r=n,bu(e,r);return Ra(t,e,i,n),e.child}function Va(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.flags|=128)}function Ba(t,e,n,r,i){var o=pi(n)?hi:li.current;return o=di(e,o),no(e,i),n=ia(t,e,n,r,o,i),null===t||Da?(e.flags|=1,Ra(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~i,ns(t,e,i))}function qa(t,e,n,r,i){if(pi(n)){var o=!0;gi(e)}else o=!1;if(no(e,i),null===e.stateNode)null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),yo(e,n,r),bo(e,n,r,i),r=!0;else if(null===t){var a=e.stateNode,s=e.memoizedProps;a.props=s;var u=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=ro(c):c=di(e,c=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)&&go(e,a,r,c),io=!1;var h=e.memoizedState;a.state=h,lo(e,r,a,i),u=e.memoizedState,s!==r||h!==u||fi.current||io?("function"===typeof l&&(po(e,n,l,r),u=e.memoizedState),(s=io||mo(e,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&&(e.flags|=4)):("function"===typeof a.componentDidMount&&(e.flags|=4),e.memoizedProps=r,e.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"===typeof a.componentDidMount&&(e.flags|=4),r=!1)}else{a=e.stateNode,ao(t,e),s=e.memoizedProps,c=e.type===e.elementType?s:Ki(e.type,s),a.props=c,f=e.pendingProps,h=a.context,"object"===typeof(u=n.contextType)&&null!==u?u=ro(u):u=di(e,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)&&go(e,a,r,u),io=!1,h=e.memoizedState,a.state=h,lo(e,r,a,i);var p=e.memoizedState;s!==f||h!==p||fi.current||io?("function"===typeof d&&(po(e,n,d,r),p=e.memoizedState),(c=io||mo(e,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&&(e.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(e.flags|=256)):("function"!==typeof a.componentDidUpdate||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=256),e.memoizedProps=r,e.memoizedState=p),a.props=r,a.state=p,a.context=u,r=c):("function"!==typeof a.componentDidUpdate||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=256),r=!1)}return za(t,e,n,r,o,i)}function za(t,e,n,r,i,o){Va(t,e);var a=0!==(64&e.flags);if(!r&&!a)return i&&bi(e,n,!1),ns(t,e,o);r=e.stateNode,Aa.current=e;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return e.flags|=1,null!==t&&a?(e.child=To(e,t.child,null,o),e.child=To(e,null,s,o)):Ra(t,e,s,o),e.memoizedState=r.state,i&&bi(e,n,!0),e.child}function Wa(t){var e=t.stateNode;e.pendingContext?mi(0,e.pendingContext,e.pendingContext!==e.context):e.context&&mi(0,e.context,!1),Po(t,e.containerInfo)}var Ha,Ga,Ya,Ka={dehydrated:null,retryLane:0};function Qa(t,e,n){var r,i=e.pendingProps,o=Ro.current,a=!1;return(r=0!==(64&e.flags))||(r=(null===t||null!==t.memoizedState)&&0!==(2&o)),r?
vendor: 13,263 bytes, line 2
2(a=!0,e.flags&=-65):null!==t&&null===t.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),ui(Ro,1&o),null===t?(void 0!==i.fallback&&qo(e),t=i.children,o=i.fallback,a?(t=Xa(e,t,o,n),e.child.memoizedState={baseLanes:n},e.memoizedState=Ka,t):"number"===typeof i.unstable_expectedLoadTime?(t=Xa(e,t,o,n),e.child.memoizedState={baseLanes:n},e.memoizedState=Ka,e.lanes=33554432,t):((n=Gu({mode:"visible",children:t},e.mode,n,null)).return=e,e.child=n)):(t.memoizedState,a?(i=Ja(t,e,i.children,i.fallback,n),a=e.child,o=t.child.memoizedState,a.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=t.childLanes&~n,e.memoizedState=Ka,i):(n=$a(t,e,i.children,n),e.memoizedState=null,n))}function Xa(t,e,n,r){var i=t.mode,o=t.child;return e={mode:"hidden",children:e},0===(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=e):o=Gu(e,i,0,null),n=Hu(n,i,r,null),o.return=t,n.return=t,o.sibling=n,t.child=o,n}function $a(t,e,n,r){var i=t.child;return t=i.sibling,n=zu(i,{mode:"visible",children:n}),0===(2&e.mode)&&(n.lanes=r),n.return=e,n.sibling=null,null!==t&&(t.nextEffect=null,t.flags=8,e.firstEffect=e.lastEffect=t),e.child=n}function Ja(t,e,n,r,i){var o=e.mode,a=t.child;t=a.sibling;var s={mode:"hidden",children:n};return 0===(2&o)&&e.child!==a?((n=e.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(e.firstEffect=n.firstEffect,e.lastEffect=a,a.nextEffect=null):e.firstEffect=e.lastEffect=null):n=zu(a,s),null!==t?r=zu(t,r):(r=Hu(r,o,i,null)).flags|=2,r.return=e,n.return=e,n.sibling=r,e.child=n,r}function Za(t,e){t.lanes|=e;var n=t.alternate;null!==n&&(n.lanes|=e),eo(t.return,e)}function ts(t,e,n,r,i,o){var a=t.memoizedState;null===a?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(a.isBackwards=e,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.lastEffect=o)}function es(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(Ra(t,e,r.children,n),0!==(2&(r=Ro.current)))r=1&r|2,e.flags|=64;else{if(null!==t&&0!==(64&t.flags))t:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&Za(t,n);else if(19===t.tag)Za(t,n);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;null===t.sibling;){if(null===t.return||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(ui(Ro,r),0===(2&e.mode))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;null!==n;)null!==(t=n.alternate)&&null===Mo(t)&&(i=n),n=n.sibling;null===(n=i)?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),ts(e,!1,i,n,o,e.lastEffect);break;case"backwards":for(n=null,i=e.child,e.child=null;null!==i;){if(null!==(t=i.alternate)&&null===Mo(t)){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}ts(e,!0,n,null,o,e.lastEffect);break;case"together":ts(e,!1,null,null,void 0,e.lastEffect);break;default:e.memoizedState=null}return e.child}function ns(t,e,n){if(null!==t&&(e.dependencies=t.dependencies),Fs|=e.lanes,0!==(n&e.childLanes)){if(null!==t&&e.child!==t.child)throw Error(a(153));if(null!==e.child){for(n=zu(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=zu(t,t.pendingProps)).return=e;n.sibling=null}return e.child}return null}function rs(t,e){if(!Uo)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;null!==e;)null!==e.alternate&&(n=e),e=e.sibling;null===n?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e||null===t.tail?t.tail=null:t.tail.sibling=null:r.sibling=null}}function is(t,e,n){var r=e.pendingProps;switch(e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return pi(e.type)&&vi(),null;case 3:return jo(),si(fi),si(li),Yo(),(r=e.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==t&&null!==t.child||(Wo(e)?e.flags|=4:r.hydrate||(e.flags|=256)),null;case 5:Do(e);var o=xo(No.current);if(n=e.type,null!==t&&null!=e.stateNode)Ga(t,e,n,r),t.ref!==e.ref&&(e.flags|=128);else{if(!r){if(null===e.stateNode)throw Error(a(166));return null}if(t=xo(Io.current),Wo(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[Qr]=e,r[Xr]=s,n){case"dialog":Ir("cancel",r),Ir("close",r);break;case"iframe":case"object":case"embed":Ir("load",r);break;case"video":case"audio":for(t=0;t<Or.length;t++)Ir(Or[t],r);break;case"source":Ir("error",r);break;case"img":case"image":case"link":Ir("error",r),Ir("load",r);break;case"details":Ir("toggle",r);break;case"input":tt(r,s),Ir("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ir("invalid",r);break;case"textarea":ut(r,s),Ir("invalid",r)}for(var c in Tt(n,s),t=null,s)s.hasOwnProperty(c)&&(o=s[c],"children"===c?"string"===typeof o?r.textContent!==o&&(t=["children",o]):"number"===typeof o&&r.textContent!==""+o&&(t=["children",""+o]):u.hasOwnProperty(c)&&null!=o&&"onScroll"===c&&Ir("scroll",r));switch(n){case"input":X(r),rt(r,s,!0);break;case"textarea":X(r),lt(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=Lr)}r=t,e.updateQueue=r,null!==r&&(e.flags|=4)}else{switch(c=9===o.nodeType?o:o.ownerDocument,t===ft&&(t=dt(n)),t===ft?"script"===n?((t=c.createElement("div")).innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):"string"===typeof r.is?t=c.createElement(n,{is:r.is}):(t=c.createElement(n),"select"===n&&(c=t,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):t=c.createElementNS(t,n),t[Qr]=e,t[Xr]=r,Ha(t,e),e.stateNode=t,c=St(n,r),n){case"dialog":Ir("cancel",t),Ir("close",t),o=r;break;case"iframe":case"object":case"embed":Ir("load",t),o=r;break;case"video":case"audio":for(o=0;o<Or.length;o++)Ir(Or[o],t);o=r;break;case"source":Ir("error",t),o=r;break;case"img":case"image":case"link":Ir("error",t),Ir("load",t),o=r;break;case"details":Ir("toggle",t),o=r;break;case"input":tt(t,r),o=Z(t,r),Ir("invalid",t);break;case"option":o=ot(t,r);break;case"select":t._wrapperState={wasMultiple:!!r.multiple},o=i({},r,{value:void 0}),Ir("invalid",t);break;case"textarea":ut(t,r),o=st(t,r),Ir("invalid",t);break;default:o=r}Tt(n,o);var l=o;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];"style"===s?Et(t,f):"dangerouslySetInnerHTML"===s?null!=(f=f?f.__html:void 0)&&yt(t,f):"children"===s?"string"===typeof f?("textarea"!==n||""!==f)&>(t,f):"number"===typeof f&>(t,""+f):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(u.hasOwnProperty(s)?null!=f&&"onScroll"===s&&Ir("scroll",t):null!=f&&w(t,s,f,c))}switch(n){case"input":X(t),rt(t,r,!1);break;case"textarea":X(t),lt(t);break;case"option":null!=r.value&&t.setAttribute("value",""+K(r.value));break;case"select":t.multiple=!!r.multiple,null!=(s=r.value)?at(t,!!r.multiple,s,!1):null!=r.defaultValue&&at(t,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(t.onclick=Lr)}Vr(n,r)&&(e.flags|=4)}null!==e.ref&&(e.flags|=128)}return null;case 6:if(t&&null!=e.stateNode)Ya(0,e,t.memoizedProps,r);else{if("string"!==typeof r&&null===e.stateNode)throw Error(a(166));n=xo(No.current),xo(Io.current),Wo(e)?(r=e.stateNode,n=e.memoizedProps,r[Qr]=e,r.nodeValue!==n&&(e.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Qr]=e,e.stateNode=r)}return null;case 13:return si(Ro),r=e.memoizedState,0!==(64&e.flags)?(e.lanes=n,e):(r=null!==r,n=!1,null===t?void 0!==e.memoizedProps.fallback&&Wo(e):n=null!==t.memoizedState,r&&!n&&0!==(2&e.mode)&&(null===t&&!0!==e.memoizedProps.unstable_avoidThisFallback||0!==(1&Ro.current)?0===Rs&&(Rs=3):(0!==Rs&&3!==Rs||(Rs=4),null===xs||0===(134217727&Fs)&&0===(134217727&Us)||vu(xs,js))),(r||n)&&(e.flags|=4),null);case 4:return jo(),null===t&&Nr(e.stateNode.containerInfo),null;case 10:return to(e),null;case 17:return pi(e.type)&&vi(),null;case 19:if(si(Ro),null===(r=e.memoizedState))return null;if(s=0!==(64&e.flags),null===(c=r.rendering))if(s)rs(r,!1);else{if(0!==Rs||null!==t&&0!==(64&t.flags))for(t=e.child;null!==t;){if(null!==(c=Mo(t))){for(e.flags|=64,rs(r,!1),null!==(s=c.updateQueue)&&(e.updateQueue=s,e.flags|=4),null===r.lastEffect&&(e.firstEffect=null),e.lastEffect=r.lastEffect,r=n,n=e.child;null!==n;)t=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(c=s.alternate)?(s.childLanes=0,s.lanes=t,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,t=c.dependencies,s.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return ui(Ro,1&Ro.current|2),e.child}t=t.sibling}null!==r.tail&&Vi()>zs&&(e.flags|=64,s=!0,rs(r,!1),e.lanes=33554432)}else{if(!s)if(null!==(t=Mo(c))){if(e.flags|=64,s=!0,null!==(n=t.updateQueue)&&(e.updateQueue=n,e.flags|=4),rs(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!Uo)return null!==(e=e.lastEffect=r.lastEffect)&&(e.nextEffect=null),null}else 2*Vi()-r.renderingStartTime>zs&&1073741824!==n&&(e.flags|=64,s=!0,rs(r,!1),e.lanes=33554432);r.isBackwards?(c.sibling=e.child,e.child=c):(null!==(n=r.last)?n.sibling=c:e.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=e.lastEffect,r.renderingStartTime=Vi(),n.sibling=null,e=Ro.current,ui(Ro,s?1&e|2:1&e),n):null;case 23:case 24:return wu(),null!==t&&null!==t.memoizedState!==(null!==e.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(e.flags|=4),null}throw Error(a(156,e.tag))}function os(t){switch(t.tag){case 1:pi(t.type)&&vi();var e=t.flags;return 4096&e?(t.flags=-4097&e|64,t):null;case 3:if(jo(),si(fi),si(li),Yo(),0!==(64&(e=t.flags)))throw Error(a(285));return t.flags=-4097&e|64,t;case 5:return Do(t),null;case 13:return si(Ro),4096&(e=t.flags)?(t.flags=-4097&e|64,t):null;case 19:return si(Ro),null;case 4:return jo(),null;case 10:return to(t),null;case 23:case 24:return wu(),null;default:return null}}function as(t,e){try{var n="",r=e;do{n+=G(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:t,source:e,stack:i}}function ss(t,e){try{console.error(e.value)}catch(n){setTimeout((function(){throw n}))}}Ha=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)t.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ga=function(t,e,n,r){var o=t.memoizedProps;if(o!==r){t=e.stateNode,xo(Io.current);var a,s=null;switch(n){case"input":o=Z(t,o),r=Z(t,r),s=[];break;case"option":o=ot(t,o),r=ot(t,r),s=[];break;case"select":o=i({},o,{value:void 0}),r=i({},r,{value:void 0}),s=[];break;case"textarea":o=st(t,o),r=st(t,r),s=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(t.onclick=Lr)}for(f in Tt(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&&Ir("scroll",t),s||c===l||(s=[])):"object"===typeof l&&null!==l&&l.$$typeof===R?l.toString():(s=s||[]).push(f,l))}n&&(s=s||[]).push("style",n);var f=s;(e.updateQueue=f)&&(e.flags|=4)}},Ya=function(t,e,n,r){n!==r&&(e.flags|=4)};var us="function"===typeof WeakMap?WeakMap:Map;function cs(t,e,n){(n=so(-1,n)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Ys||(Ys=!0,Ks=r),ss(0,e)},n}function ls(t,e,n){(n=so(-1,n)).tag=3;var r=t.type.getDerivedStateFromError;if("function"===typeof r){var i=e.value;n.payload=function(){return ss(0,e),r(i)}}var o=t.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Qs?Qs=new Set([this]):Qs.add(this),ss(0,e));var t=e.stack;this.componentDidCatch(e.value,{componentStack:null!==t?t:""})}),n}var fs="function"===typeof WeakSet?WeakSet:Set;function hs(t){var e=t.ref;if(null!==e)if("function"===typeof e)try{e(null)}catch(n){Lu(t,n)}else e.current=null}function ds(t,e){switch(e.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&e.flags&&null!==t){var n=t.memoizedProps,r=t.memoizedState;e=(t=e.stateNode).getSnapshotBeforeUpdate(e.elementType===e.type?n:Ki(e.type,n),r),t.__reactInternalSnapshotBeforeUpdate=e}return;case 3:return void(256&e.flags&&Wr(e.stateNode.containerInfo));
vendor: 4,942 bytes, line 2
2case 5:case 6:case 4:case 17:return}throw Error(a(163))}function ps(t,e,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(e=null!==(e=n.updateQueue)?e.lastEffect:null)){t=e=e.next;do{if(3===(3&t.tag)){var r=t.create;t.destroy=r()}t=t.next}while(t!==e)}if(null!==(e=null!==(e=n.updateQueue)?e.lastEffect:null)){t=e=e.next;do{var i=t;r=i.next,0!==(4&(i=i.tag))&&0!==(1&i)&&(Du(n,t),Au(n,t)),t=r}while(t!==e)}return;case 1:return t=n.stateNode,4&n.flags&&(null===e?t.componentDidMount():(r=n.elementType===n.type?e.memoizedProps:Ki(n.type,e.memoizedProps),t.componentDidUpdate(r,e.memoizedState,t.__reactInternalSnapshotBeforeUpdate))),void(null!==(e=n.updateQueue)&&fo(n,e,t));case 3:if(null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}fo(n,e,t)}return;case 5:return t=n.stateNode,void(null===e&&4&n.flags&&Vr(n.type,n.memoizedProps)&&t.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Ee(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(a(163))}function vs(t,e){for(var n=t;;){if(5===n.tag){var r=n.stateNode;if(e)"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=_t("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=e?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===t)&&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}}function ms(t,e){if(_i&&"function"===typeof _i.onCommitFiberUnmount)try{_i.onCommitFiberUnmount(wi,e)}catch(o){}switch(e.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(t=e.updateQueue)&&null!==(t=t.lastEffect)){var n=t=t.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!==(4&r))Du(e,n);else{r=e;try{i()}catch(o){Lu(r,o)}}n=n.next}while(n!==t)}break;case 1:if(hs(e),"function"===typeof(t=e.stateNode).componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(o){Lu(e,o)}break;case 5:hs(e);break;case 4:Es(t,e)}}function ys(t){t.alternate=null,t.child=null,t.dependencies=null,t.firstEffect=null,t.lastEffect=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.return=null,t.updateQueue=null}function gs(t){return 5===t.tag||3===t.tag||4===t.tag}function bs(t){t:{for(var e=t.return;null!==e;){if(gs(e))break t;e=e.return}throw Error(a(160))}var n=e;switch(e=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:e=e.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(gt(e,""),n.flags&=-17);t:e:for(n=t;;){for(;null===n.sibling;){if(null===n.return||gs(n.return)){n=null;break t}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue e;if(null===n.child||4===n.tag)continue e;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break t}}r?ws(t,n,e):_s(t,n,e)}function ws(t,e,n){var r=t.tag,i=5===r||6===r;if(i)t=i?t.stateNode:t.stateNode.instance,e?8===n.nodeType?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(8===n.nodeType?(e=n.parentNode).insertBefore(t,n):(e=n).appendChild(t),null!==(n=n._reactRootContainer)&&void 0!==n||null!==e.onclick||(e.onclick=Lr));else if(4!==r&&null!==(t=t.child))for(ws(t,e,n),t=t.sibling;null!==t;)ws(t,e,n),t=t.sibling}function _s(t,e,n){var r=t.tag,i=5===r||6===r;if(i)t=i?t.stateNode:t.stateNode.instance,e?n.insertBefore(t,e):n.appendChild(t);else if(4!==r&&null!==(t=t.child))for(_s(t,e,n),t=t.sibling;null!==t;)_s(t,e,n),t=t.sibling}function Es(t,e){for(var n,r,i=e,o=!1;;){if(!o){o=i.return;t:for(;;){if(null===o)throw Error(a(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break t;case 3:case 4:n=n.containerInfo,r=!0;break t}o=o.return}o=!0}if(5===i.tag||6===i.tag){t:for(var s=t,u=i,c=u;;)if(ms(s,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===u)break t;for(;null===c.sibling;){if(null===c.return||c.return===u)break t;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(ms(t,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function Os(t,e){switch(e.tag){case 0:case 11:case 14:case 15:case 22:var n=e.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(t=r.destroy,r.destroy=void 0,void 0!==t&&t()),r=r.next}
vendor: 7,797 bytes, line 2
2while(r!==n)}return;case 1:return;case 5:if(null!=(n=e.stateNode)){r=e.memoizedProps;var i=null!==t?t.memoizedProps:r;t=e.type;var o=e.updateQueue;if(e.updateQueue=null,null!==o){for(n[Xr]=r,"input"===t&&"radio"===r.type&&null!=r.name&&et(n,r),St(t,i),e=St(t,r),i=0;i<o.length;i+=2){var s=o[i],u=o[i+1];"style"===s?Et(n,u):"dangerouslySetInnerHTML"===s?yt(n,u):"children"===s?gt(n,u):w(n,s,u,e)}switch(t){case"input":nt(n,r);break;case"textarea":ct(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?at(n,!!r.multiple,o,!1):t!==!!r.multiple&&(null!=r.defaultValue?at(n,!!r.multiple,r.defaultValue,!0):at(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===e.stateNode)throw Error(a(162));return void(e.stateNode.nodeValue=e.memoizedProps);case 3:return void((n=e.stateNode).hydrate&&(n.hydrate=!1,Ee(n.containerInfo)));case 12:return;case 13:return null!==e.memoizedState&&(qs=Vi(),vs(e.child,!0)),void Ts(e);case 19:return void Ts(e);case 17:return;case 23:case 24:return void vs(e,null!==e.memoizedState)}throw Error(a(163))}function Ts(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new fs),e.forEach((function(e){var r=Uu.bind(null,t,e);n.has(e)||(n.add(e),e.then(r,r))}))}}function Ss(t,e){return null!==t&&(null===(t=t.memoizedState)||null!==t.dehydrated)&&(null!==(e=e.memoizedState)&&null===e.dehydrated)}var ks=Math.ceil,Is=_.ReactCurrentDispatcher,Cs=_.ReactCurrentOwner,Ns=0,xs=null,Ps=null,js=0,As=0,Ds=ai(0),Rs=0,Ms=null,Ls=0,Fs=0,Us=0,Vs=0,Bs=null,qs=0,zs=1/0;function Ws(){zs=Vi()+500}var Hs,Gs=null,Ys=!1,Ks=null,Qs=null,Xs=!1,$s=null,Js=90,Zs=[],tu=[],eu=null,nu=0,ru=null,iu=-1,ou=0,au=0,su=null,uu=!1;function cu(){return 0!==(48&Ns)?Vi():-1!==iu?iu:iu=Vi()}function lu(t){if(0===(2&(t=t.mode)))return 1;if(0===(4&t))return 99===Bi()?1:2;if(0===ou&&(ou=Ls),0!==Yi.transition){0!==au&&(au=null!==Bs?Bs.pendingLanes:0),t=ou;var e=4186112&~au;return 0===(e&=-e)&&(0===(e=(t=4186112&~t)&-t)&&(e=8192)),e}return t=Bi(),0!==(4&Ns)&&98===t?t=Ve(12,ou):t=Ve(t=function(t){switch(t){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(t),ou),t}function fu(t,e,n){if(50<nu)throw nu=0,ru=null,Error(a(185));if(null===(t=hu(t,e)))return null;ze(t,e,n),t===xs&&(Us|=e,4===Rs&&vu(t,js));var r=Bi();1===e?0!==(8&Ns)&&0===(48&Ns)?mu(t):(du(t,n),0===Ns&&(Ws(),Hi())):(0===(4&Ns)||98!==r&&99!==r||(null===eu?eu=new Set([t]):eu.add(t)),du(t,n)),Bs=t}function hu(t,e){t.lanes|=e;var n=t.alternate;for(null!==n&&(n.lanes|=e),n=t,t=t.return;null!==t;)t.childLanes|=e,null!==(n=t.alternate)&&(n.childLanes|=e),n=t,t=t.return;return 3===n.tag?n.stateNode:null}function du(t,e){for(var n=t.callbackNode,r=t.suspendedLanes,i=t.pingedLanes,o=t.expirationTimes,s=t.pendingLanes;0<s;){var u=31-We(s),c=1<<u,l=o[u];if(-1===l){if(0===(c&r)||0!==(c&i)){l=e,Le(c);var f=Me;o[u]=10<=f?l+250:6<=f?l+5e3:-1}}else l<=e&&(t.expiredLanes|=c);s&=~c}if(r=Fe(t,t===xs?js:0),e=Me,0===r)null!==n&&(n!==Di&&Ti(n),t.callbackNode=null,t.callbackPriority=0);else{if(null!==n){if(t.callbackPriority===e)return;n!==Di&&Ti(n)}15===e?(n=mu.bind(null,t),null===Mi?(Mi=[n],Li=Oi(Ni,Gi)):Mi.push(n),n=Di):14===e?n=Wi(99,mu.bind(null,t)):n=Wi(n=function(t){switch(t){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,t))}}(e),pu.bind(null,t)),t.callbackPriority=e,t.callbackNode=n}}function pu(t){if(iu=-1,au=ou=0,0!==(48&Ns))throw Error(a(327));var e=t.callbackNode;if(ju()&&t.callbackNode!==e)return null;var n=Fe(t,t===xs?js:0);if(0===n)return null;var r=n,i=Ns;Ns|=16;var o=Ou();for(xs===t&&js===r||(Ws(),_u(t,r));;)try{ku();break}catch(u){Eu(t,u)}if(Zi(),Is.current=o,Ns=i,null!==Ps?r=0:(xs=null,js=0,r=Rs),0!==(Ls&Us))_u(t,0);else if(0!==r){if(2===r&&(Ns|=64,t.hydrate&&(t.hydrate=!1,Wr(t.containerInfo)),0!==(n=Ue(t))&&(r=Tu(t,n))),1===r)throw e=Ms,_u(t,0),vu(t,n),du(t,Vi()),e;switch(t.finishedWork=t.current.alternate,t.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:Nu(t);break;case 3:if(vu(t,n),(62914560&n)===n&&10<(r=qs+500-Vi())){if(0!==Fe(t,0))break;if(((i=t.suspendedLanes)&n)!==n){cu(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=qr(Nu.bind(null,t),r);break}Nu(t);break;case 4:if(vu(t,n),(4186112&n)===n)break;for(r=t.eventTimes,i=-1;0<n;){var s=31-We(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*ks(n/1960))-n)){t.timeoutHandle=qr(Nu.bind(null,t),n);break}Nu(t);break;case 5:Nu(t);break;default:throw Error(a(329))}}return du(t,Vi()),t.callbackNode===e?pu.bind(null,t):null}function vu(t,e){for(e&=~Vs,e&=~Us,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-We(e),r=1<<n;t[n]=-1,e&=~r}}function mu(t){if(0!==(48&Ns))throw Error(a(327));if(ju(),t===xs&&0!==(t.expiredLanes&js)){var e=js,n=Tu(t,e);0!==(Ls&Us)&&(n=Tu(t,e=Fe(t,e)))}else n=Tu(t,e=Fe(t,0));if(0!==t.tag&&2===n&&(Ns|=64,t.hydrate&&(t.hydrate=!1,Wr(t.containerInfo)),0!==(e=Ue(t))&&(n=Tu(t,e))),1===n)throw n=Ms,_u(t,0),vu(t,e),du(t,Vi()),n;return t.finishedWork=t.current.alternate,t.finishedLanes=e,Nu(t),du(t,Vi()),null}function yu(t,e){var n=Ns;Ns|=1;try{return t(e)}finally{0===(Ns=n)&&(Ws(),Hi())}}function gu(t,e){var n=Ns;Ns&=-2,Ns|=8;try{return t(e)}finally{0===(Ns=n)&&(Ws(),Hi())}}function bu(t,e){ui(Ds,As),As|=e,Ls|=e}function wu(){As=Ds.current,si(Ds)}function _u(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(-1!==n&&(t.timeoutHandle=-1,zr(n)),null!==Ps)for(n=Ps.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&vi();break;case 3:jo(),si(fi),si(li),Yo();break;case 5:Do(r);break;case 4:jo();break;case 13:case 19:si(Ro);break;case 10:to(r);break;case 23:case 24:wu()}n=n.return}xs=t,Ps=zu(t.current,null),js=As=Ls=e,Rs=0,Ms=null,Vs=Us=Fs=0}function Eu(t,e){for(;;){var n=Ps;try{if(Zi(),Ko.current=Na,ta){for(var r=$o.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ta=!1}if(Xo=0,Zo=Jo=$o=null,ea=!1,Cs.current=null,null===n||null===n.return){Rs=1,Ms=e,Ps=null;break}t:{var o=t,a=n.return,s=n,u=e;if(e=js,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&Ro.current),h=a;do{var d;if(d=13===h.tag){var p=h.memoizedState;if(null!==p)d=null!==p.dehydrated;else{var v=h.memoizedProps;d=void 0!==v.fallback&&(!0!==v.unstable_avoidThisFallback||!f)}}if(d){var m=h.updateQueue;if(null===m){var y=new Set;y.add(c),h.updateQueue=y}else m.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 g=so(-1,1);g.tag=2,uo(s,g)}s.lanes|=1;break t}u=void 0,s=e;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 w=Fu.bind(null,o,c,s);c.then(w,w)}h.flags|=4096,h.lanes=e;break t}h=h.return}while(null!==h);u=Error((Y(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!==Rs&&(Rs=2),u=as(u,s),h=a;do{switch(h.tag){case 3:o=u,h.flags|=4096,e&=-e,h.lanes|=e,co(h,cs(0,o,e));break t;case 1:o=u;var _=h.type,E=h.stateNode;if(0===(64&h.flags)&&("function"===typeof _.getDerivedStateFromError||null!==E&&"function"===typeof E.componentDidCatch&&(null===Qs||!Qs.has(E))
vendor: 4,459 bytes, line 2
2)){h.flags|=4096,e&=-e,h.lanes|=e,co(h,ls(h,o,e));break t}}h=h.return}while(null!==h)}Cu(n)}catch(O){e=O,Ps===n&&null!==n&&(Ps=n=n.return);continue}break}}function Ou(){var t=Is.current;return Is.current=Na,null===t?Na:t}function Tu(t,e){var n=Ns;Ns|=16;var r=Ou();for(xs===t&&js===e||_u(t,e);;)try{Su();break}catch(i){Eu(t,i)}if(Zi(),Ns=n,Is.current=r,null!==Ps)throw Error(a(261));return xs=null,js=0,Rs}function Su(){for(;null!==Ps;)Iu(Ps)}function ku(){for(;null!==Ps&&!Si();)Iu(Ps)}function Iu(t){var e=Hs(t.alternate,t,As);t.memoizedProps=t.pendingProps,null===e?Cu(t):Ps=e,Cs.current=null}function Cu(t){var e=t;do{var n=e.alternate;if(t=e.return,0===(2048&e.flags)){if(null!==(n=is(n,e,As)))return void(Ps=n);if(24!==(n=e).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&As)||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!==t&&0===(2048&t.flags)&&(null===t.firstEffect&&(t.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==t.lastEffect&&(t.lastEffect.nextEffect=e.firstEffect),t.lastEffect=e.lastEffect),1<e.flags&&(null!==t.lastEffect?t.lastEffect.nextEffect=e:t.firstEffect=e,t.lastEffect=e))}else{if(null!==(n=os(e)))return n.flags&=2047,void(Ps=n);null!==t&&(t.firstEffect=t.lastEffect=null,t.flags|=2048)}if(null!==(e=e.sibling))return void(Ps=e);Ps=e=t}while(null!==e);0===Rs&&(Rs=5)}function Nu(t){var e=Bi();return zi(99,xu.bind(null,t,e)),null}function xu(t,e){do{ju()}while(null!==$s);if(0!==(48&Ns))throw Error(a(327));var n=t.finishedWork;if(null===n)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(a(177));t.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=t.pendingLanes&~i;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=i,t.mutableReadLanes&=i,t.entangledLanes&=i,i=t.entanglements;for(var s=t.eventTimes,u=t.expirationTimes;0<o;){var c=31-We(o),l=1<<c;i[c]=0,s[c]=-1,u[c]=-1,o&=~l}if(null!==eu&&0===(24&r)&&eu.has(t)&&eu.delete(t),t===xs&&(Ps=xs=null,js=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=Ns,Ns|=32,Cs.current=null,Fr=Qe,pr(s=dr())){if("selectionStart"in s)u={start:s.selectionStart,end:s.selectionEnd};else t: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(k){u=null;break t}var f=0,h=-1,d=-1,p=0,v=0,m=s,y=null;e:for(;;){for(var g;m!==u||0!==o&&3!==m.nodeType||(h=f+o),m!==c||0!==l&&3!==m.nodeType||(d=f+l),3===m.nodeType&&(f+=m.nodeValue.length),null!==(g=m.firstChild);)y=m,m=g;for(;;){if(m===s)break e;if(y===u&&++p===o&&(h=f),y===c&&++v===l&&(d=f),null!==(g=m.nextSibling))break;y=(m=y).parentNode}m=g}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},Qe=!1,su=null,uu=!1,Gs=r;do{try{Pu()}catch(k){if(null===Gs)throw Error(a(330));Lu(Gs,k),Gs=Gs.nextEffect}}while(null!==Gs);su=null,Gs=r;do{try{for(s=t;null!==Gs;){var b=Gs.flags;if(16&b&>(Gs.stateNode,""),128&b){var w=Gs.alternate;if(null!==w){var _=w.ref;null!==_&&("function"===typeof _?_(null):_.current=null)}}switch(1038&b){case 2:bs(Gs),Gs.flags&=-3;break;case 6:bs(Gs),Gs.flags&=-3,Os(Gs.alternate,Gs);break;case 1024:Gs.flags&=-1025;break;case 1028:Gs.flags&=-1025,Os(Gs.alternate,Gs);break;case 4:Os(Gs.alternate,Gs);break;case 8:Es(s,u=Gs);var E=u.alternate;ys(u),null!==E&&ys(E)}Gs=Gs.nextEffect}}catch(k){if(null===Gs)throw Error(a(330));Lu(Gs,k),Gs=Gs.nextEffect}}while(null!==Gs);if(_=Ur,w=dr(),b=_.focusedElem,s=_.selectionRange,w!==b&&b&&b.ownerDocument&&hr(b.ownerDocument.documentElement,b)){null!==s&&pr(b)&&(w=s.start,void 0===(_=s.end)&&(_=w),"selectionStart"in b?(b.selectionStart=w,b.selectionEnd=Math.min(_,b.value.length)):(_=(w=b.ownerDocument||document)&&w.defaultView||window).getSelection&&(_=_.getSelection(),u=b.textContent.length,E=Math.min(s.start,u),s=void 0===s.end?E:Math.min(s.end,u),!_.extend&&E>s&&(u=s,s=E,E=u),u=fr(b,E),o=fr(b,s),u&&o&&(1!==_.rangeCount||_.anchorNode!==u.node||_.anchorOffset!==u.offset||_.focusNode!==o.node||_.focusOffset!==o.offset)&&((w=w.createRange()).setStart(u.node,u.offset),_.removeAllRanges(),E>s?(_.addRange(w),_.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),_.addRange(w))))),w=[];for(_=b;_=_.parentNode;)1===_.nodeType&&w.push({element:_,left:_.scrollLeft,top:_.scrollTop});
2for("function"===typeof b.focus&&b.focus(),b=0;b<w.length;b++)(_=w[b]).element.scrollLeft=_.left,_.element.scrollTop=_.top}Qe=!!Fr,Ur=Fr=null,t.current=n,Gs=r;do{try{for(b=t;null!==Gs;){var O=Gs.flags;if(36&O&&ps(b,Gs.alternate,Gs),128&O){w=void 0;var T=Gs.ref;if(null!==T){var S=Gs.stateNode;switch(Gs.tag){case 5:w=S;break;default:w=S}"function"===typeof T?T(w):T.current=w}}Gs=Gs.nextEffect}}catch(k){if(null===Gs)throw Error(a(330));Lu(Gs,k),Gs=Gs.nextEffect}}while(null!==Gs);Gs=null,Ri(),Ns=i}else t.current=n;if(Xs)Xs=!1,$s=t,Js=e;else for(Gs=r;null!==Gs;)e=Gs.nextEffect,Gs.nextEffect=null,8&Gs.flags&&((O=Gs).sibling=null,O.stateNode=null),Gs=e;if(0===(r=t.pendingLanes)&&(Qs=null),1===r?t===ru?nu++:(nu=0,ru=t):nu=0,n=n.stateNode,_i&&"function"===typeof _i.onCommitFiberRoot)try{_i.onCommitFiberRoot(wi,n,void 0,64===(64&n.current.flags))}catch(k){}if(du(t,Vi()),Ys)throw Ys=!1,t=Ks,Ks=null,t;return 0!==(8&Ns)||Hi(),null}function Pu(){for(;null!==Gs;){var t=Gs.alternate;uu||null===su||(0!==(8&Gs.flags)?te(Gs,su)&&(uu=!0):13===Gs.tag&&Ss(t,Gs)&&te(Gs,su)&&(uu=!0));var e=Gs.flags;0!==(256&e)&&ds(t,Gs),0===(512&e)||Xs||(Xs=!0,Wi(97,(function(){return ju(),null}))),Gs=Gs.nextEffect}}function ju(){if(90!==Js){var t=97<Js?97:Js;return Js=90,zi(t,Ru)}return!1}function Au(t,e){Zs.push(e,t),Xs||(Xs=!0,Wi(97,(function(){return ju(),null})))}function Du(t,e){tu.push(e,t),Xs||(Xs=!0,Wi(97,(function(){return ju(),null})))}function Ru(){if(null===$s)return!1;var t=$s;if($s=null,0!==(48&Ns))throw Error(a(331));var e=Ns;Ns|=32;var n=tu;tu=[];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=t.current.firstEffect;null!==u;)t=u.nextEffect,u.nextEffect=null,8&u.flags&&(u.sibling=null,u.stateNode=null),u=t;return Ns=e,Hi(),!0}function Mu(t,e,n){uo(t,e=cs(0,e=as(n,e),1)),e=cu(),null!==(t=hu(t,1))&&(ze(t,1,e),du(t,e))}function Lu(t,e){if(3===t.tag)Mu(t,t,e);else for(var n=t.return;null!==n;){if(3===n.tag){Mu(n,t,e);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Qs||!Qs.has(r))){var i=ls(n,t=as(e,t),1);if(uo(n,i),i=cu(),null!==(n=hu(n,1)))ze(n,1,i),du(n,i);else if("function"===typeof r.componentDidCatch&&(null===Qs||!Qs.has(r)))try{r.componentDidCatch(e,t)}catch(o){}break}}n=n.return}}function Fu(t,e,n){var r=t.pingCache;null!==r&&r.delete(e),e=cu(),t.pingedLanes|=t.suspendedLanes&n,xs===t&&(js&n)===n&&(4===Rs||3===Rs&&(62914560&js)===js&&500>Vi()-qs?_u(t,0):Vs|=n),du(t,e)}function Uu(t,e){var n=t.stateNode;null!==n&&n.delete(e),0===(e=0)&&(0===(2&(e=t.mode))?e=1:0===(4&e)?e=99===Bi()?1:2:(0===ou&&(ou=Ls),0===(e=Be(62914560&~ou))&&(e=4194304))),n=cu(),null!==(t=hu(t,e))&&(ze(t,e,n),du(t,n))}function Vu(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Bu(t,e,n,r){return new Vu(t,e,n,r)}function qu(t){return!(!(t=t.prototype)||!t.isReactComponent)}function zu(t,e){var n=t.alternate;return null===n?((n=Bu(t.tag,e,t.key,t.mode)).elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Wu(t,e,n,r,i,o){var s=2;if(r=t,"function"===typeof t)qu(t)&&(s=1);else if("string"===typeof t)s=5;else t:switch(t){case T:return Hu(n.children,i,o,e);case M:s=8,i|=16;break;case S:s=8,i|=1;break;case k:return(t=Bu(12,n,e,8|i)).elementType=k,t.type=k,t.lanes=o,t;
vendor: 6,809 bytes, line 2
2case x:return(t=Bu(13,n,e,i)).type=x,t.elementType=x,t.lanes=o,t;case P:return(t=Bu(19,n,e,i)).elementType=P,t.lanes=o,t;case L:return Gu(n,i,o,e);case F:return(t=Bu(24,n,e,i)).elementType=F,t.lanes=o,t;default:if("object"===typeof t&&null!==t)switch(t.$$typeof){case I:s=10;break t;case C:s=9;break t;case N:s=11;break t;case j:s=14;break t;case A:s=16,r=null;break t;case D:s=22;break t}throw Error(a(130,null==t?t:typeof t,""))}return(e=Bu(s,n,e,i)).elementType=t,e.type=r,e.lanes=o,e}function Hu(t,e,n,r){return(t=Bu(7,t,r,e)).lanes=n,t}function Gu(t,e,n,r){return(t=Bu(23,t,r,e)).elementType=L,t.lanes=n,t}function Yu(t,e,n){return(t=Bu(6,t,null,e)).lanes=n,t}function Ku(t,e,n){return(e=Bu(4,null!==t.children?t.children:[],t.key,e)).lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Qu(t,e,n){this.tag=e,this.containerInfo=t,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=qe(0),this.expirationTimes=qe(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qe(0),this.mutableSourceEagerHydrationData=null}function Xu(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:O,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}}function $u(t,e,n,r){var i=e.current,o=cu(),s=lu(i);t:if(n){e:{if(Xt(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 e;case 1:if(pi(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(pi(c)){n=yi(n,c,u);break t}}n=u}else n=ci;return null===e.context?e.context=n:e.pendingContext=n,(e=so(o,s)).payload={element:t},null!==(r=void 0===r?null:r)&&(e.callback=r),uo(i,e),fu(i,s,o),s}function Ju(t){if(!(t=t.current).child)return null;switch(t.child.tag){case 5:default:return t.child.stateNode}}function Zu(t,e){if(null!==(t=t.memoizedState)&&null!==t.dehydrated){var n=t.retryLane;t.retryLane=0!==n&&n<e?n:e}}function tc(t,e){Zu(t,e),(t=t.alternate)&&Zu(t,e)}function ec(t,e,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Qu(t,e,null!=n&&!0===n.hydrate),e=Bu(3,null,null,2===e?7:1===e?3:0),n.current=e,e.stateNode=n,oo(e),t[$r]=n.current,Nr(8===t.nodeType?t.parentNode:t),r)for(t=0;t<r.length;t++){var i=(e=r[t])._getVersion;i=i(e._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[e,i]:n.mutableSourceEagerHydrationData.push(e,i)}this._internalRoot=n}function nc(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function rc(t,e,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var s=i;i=function(){var t=Ju(a);s.call(t)}}$u(e,a,t,i)}else{if(o=n._reactRootContainer=function(t,e){if(e||(e=!(!(e=t?9===t.nodeType?t.documentElement:t.firstChild:null)||1!==e.nodeType||!e.hasAttribute("data-reactroot"))),!e)for(var n;n=t.lastChild;)t.removeChild(n);return new ec(t,0,e?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"===typeof i){var u=i;i=function(){var t=Ju(a);u.call(t)}}gu((function(){$u(e,a,t,i)}))}return Ju(a)}function ic(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!nc(e))throw Error(a(200));return Xu(t,e,null,n)}Hs=function(t,e,n){var r=e.lanes;if(null!==t)if(t.memoizedProps!==e.pendingProps||fi.current)Da=!0;else{if(0===(n&r)){switch(Da=!1,e.tag){case 3:Wa(e),Ho();break;case 5:Ao(e);break;case 1:pi(e.type)&&gi(e);break;case 4:Po(e,e.stateNode.containerInfo);break;case 10:r=e.memoizedProps.value;var i=e.type._context;ui(Qi,i._currentValue),i._currentValue=r;break;case 13:if(null!==e.memoizedState)return 0!==(n&e.child.childLanes)?Qa(t,e,n):(ui(Ro,1&Ro.current),null!==(e=ns(t,e,n))?e.sibling:null);ui(Ro,1&Ro.current);break;case 19:if(r=0!==(n&e.childLanes),0!==(64&t.flags)){if(r)return es(t,e,n);e.flags|=64}if(null!==(i=e.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),ui(Ro,Ro.current),r)break;return null;case 23:case 24:return e.lanes=0,Ua(t,e,n)}return ns(t,e,n)}Da=0!==(16384&t.flags)}else Da=!1;switch(e.lanes=0,e.tag){case 2:if(r=e.type,null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,i=di(e,li.current),no(e,n),i=ia(null,e,r,t,i,n),e.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,pi(r)){var o=!0;gi(e)}else o=!1;e.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,oo(e);var s=r.getDerivedStateFromProps;"function"===typeof s&&po(e,r,s,t),i.updater=vo,e.stateNode=i,i._reactInternals=e,bo(e,r,t,n),e=za(null,e,r,!0,o,n)}else e.tag=0,Ra(null,e,i,n),e=e.child;return e;case 16:i=e.elementType;t:{switch(null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,i=(o=i._init)(i._payload),e.type=i,o=e.tag=function(t){if("function"===typeof t)return qu(t)?1:0;if(void 0!==t&&null!==t){if((t=t.$$typeof)===N)return 11;if(t===j)return 14}return 2}(i),t=Ki(i,t),o){case 0:e=Ba(null,e,i,t,n);break t;case 1:e=qa(null,e,i,t,n);break t;case 11:e=Ma(null,e,i,t,n);break t;case 14:e=La(null,e,i,Ki(i.type,t),r,n);break t}throw Error(a(306,i,""))}return e;case 0:return r=e.type,i=e.pendingProps,Ba(t,e,r,i=e.elementType===r?i:Ki(r,i),n);case 1:return r=e.type,i=e.pendingProps,qa(t,e,r,i=e.elementType===r?i:Ki(r,i),n);case 3:if(Wa(e),r=e.updateQueue,null===t||null===r)throw Error(a(282));if(r=e.pendingProps,i=null!==(i=e.memoizedState)?i.element:null,ao(t,e),lo(e,r,null,n),(r=e.memoizedState.element)===i)Ho(),e=ns(t,e,n);else{if((o=(i=e.stateNode).hydrate)&&(Fo=Hr(e.stateNode.containerInfo.firstChild),Lo=e,o=Uo=!0),o){if(null!=(t=i.mutableSourceEagerHydrationData))for(i=0;i<t.length;i+=2)(o=t[i])._workInProgressVersionPrimary=t[i+1],Go.push(o);for(n=So(e,null,r,n),e.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Ra(t,e,r,n),Ho();e=e.child}return e;case 5:return Ao(e),null===t&&qo(e),r=e.type,i=e.pendingProps,o=null!==t?t.memoizedProps:null,s=i.children,Br(r,i)?s=null:null!==o&&Br(r,o)&&(e.flags|=16),Va(t,e),Ra(t,e,s,n),e.child;case 6:return null===t&&qo(e),null;case 13:return Qa(t,e,n);case 4:return Po(e,e.stateNode.containerInfo),r=e.pendingProps,null===t?e.child=To(e,null,r,n):Ra(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,Ma(t,e,r,i=e.elementType===r?i:Ki(r,i),n);case 7:return Ra(t,e,e.pendingProps,n),e.child;case 8:case 12:return Ra(t,e,e.pendingProps.children,n),e.child;
vendor: 4,695 bytes, line 2
2case 10:t:{r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value;var u=e.type._context;if(ui(Qi,u._currentValue),u._currentValue=o,null!==s)if(u=s.value,0===(o=sr(u,o)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,o):1073741823))){if(s.children===i.children&&!fi.current){e=ns(t,e,n);break t}}else for(null!==(u=e.child)&&(u.return=e);null!==u;){var c=u.dependencies;if(null!==c){s=u.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!==(l.observedBits&o)){1===u.tag&&((l=so(-1,n&-n)).tag=2,uo(u,l)),u.lanes|=n,null!==(l=u.alternate)&&(l.lanes|=n),eo(u.return,n),c.lanes|=n;break}l=l.next}}else s=10===u.tag&&u.type===e.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===e){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}Ra(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=(o=e.pendingProps).children,no(e,n),r=r(i=ro(i,o.unstable_observedBits)),e.flags|=1,Ra(t,e,r,n),e.child;case 14:return o=Ki(i=e.type,e.pendingProps),La(t,e,i,o=Ki(i.type,o),r,n);case 15:return Fa(t,e,e.type,e.pendingProps,r,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Ki(r,i),null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),e.tag=1,pi(r)?(t=!0,gi(e)):t=!1,no(e,n),yo(e,r,i),bo(e,r,i,n),za(null,e,r,!0,t,n);case 19:return es(t,e,n);case 23:case 24:return Ua(t,e,n)}throw Error(a(156,e.tag))},ec.prototype.render=function(t){$u(t,this._internalRoot,null,null)},ec.prototype.unmount=function(){var t=this._internalRoot,e=t.containerInfo;$u(null,t,null,(function(){e[$r]=null}))},ee=function(t){13===t.tag&&(fu(t,4,cu()),tc(t,4))},ne=function(t){13===t.tag&&(fu(t,67108864,cu()),tc(t,67108864))},re=function(t){if(13===t.tag){var e=cu(),n=lu(t);fu(t,n,e),tc(t,n)}},ie=function(t,e){return e()},It=function(t,e,n){switch(e){case"input":if(nt(t,n),e=n.name,"radio"===n.type&&null!=e){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=ni(r);if(!i)throw Error(a(90));$(r),nt(r,i)}}}break;case"textarea":ct(t,n);break;case"select":null!=(e=n.value)&&at(t,!!n.multiple,e,!1)}},At=yu,Dt=function(t,e,n,r,i){var o=Ns;Ns|=4;try{return zi(98,t.bind(null,e,n,r,i))}finally{0===(Ns=o)&&(Ws(),Hi())}},Rt=function(){0===(49&Ns)&&(function(){if(null!==eu){var t=eu;eu=null,t.forEach((function(t){t.expiredLanes|=24&t.pendingLanes,du(t,Vi())}))}Hi()}(),ju())},Mt=function(t,e){var n=Ns;Ns|=2;try{return t(e)}finally{0===(Ns=n)&&(Ws(),Hi())}};var oc={Events:[ti,ei,ni,Pt,jt,ju,{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:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return null===(t=Zt(t))?null:t.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{wi=uc.inject(sc),_i=uc}catch(mt){}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oc,e.createPortal=ic,e.findDOMNode=function(t){if(null==t)return null;if(1===t.nodeType)return t;var e=t._reactInternals;if(void 0===e){if("function"===typeof t.render)throw Error(a(188));throw Error(a(268,Object.keys(t)))}return t=null===(t=Zt(e))?null:t.stateNode},e.flushSync=function(t,e){var n=Ns;if(0!==(48&n))return t(e);Ns|=1;try{if(t)return zi(99,t.bind(null,e))}finally{Ns=n,Hi()}},e.hydrate=function(t,e,n){if(!nc(e))throw Error(a(200));return rc(null,t,e,!0,n)},e.render=function(t,e,n){if(!nc(e))throw Error(a(200));return rc(null,t,e,!1,n)},e.unmountComponentAtNode=function(t){if(!nc(t))throw Error(a(40));return!!t._reactRootContainer&&(gu((function(){rc(null,null,t,!1,(function(){t._reactRootContainer=null,t[$r]=null}))})),!0)},e.unstable_batchedUpdates=yu,e.unstable_createPortal=function(t,e){return ic(t,e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},e.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!nc(n))throw Error(a(200));if(null==t||void 0===t._reactInternals)throw Error(a(38));return rc(t,e,n,!1,r)},e.version="17.0.1"},function(t,e,n){"use strict";
vendor: 4,165 bytes, line 2
2t.exports=n(76)},function(t,e,n){"use strict";var r,i,o,a;if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var l=null,f=null,h=function t(){if(null!==l)try{var n=e.unstable_now();l(!0,n),l=null}catch(r){throw setTimeout(t,0),r}};r=function(t){null!==l?setTimeout(r,0,t):(l=t,setTimeout(h,0))},i=function(t,e){f=setTimeout(t,e)},o=function(){clearTimeout(f)},e.unstable_shouldYield=function(){return!1},a=e.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,p=window.clearTimeout;if("undefined"!==typeof console){var v=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 v&&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 m=!1,y=null,g=-1,b=5,w=0;e.unstable_shouldYield=function(){return e.unstable_now()>=w},a=function(){},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<t?Math.floor(1e3/t):5};var _=new MessageChannel,E=_.port2;_.port1.onmessage=function(){if(null!==y){var t=e.unstable_now();w=t+b;try{y(!0,t)?E.postMessage(null):(m=!1,y=null)}catch(n){throw E.postMessage(null),n}}else m=!1},r=function(t){y=t,m||(m=!0,E.postMessage(null))},i=function(t,n){g=d((function(){t(e.unstable_now())}),n)},o=function(){p(g),g=-1}}function O(t,e){var n=t.length;t.push(e);t:for(;;){var r=n-1>>>1,i=t[r];if(!(void 0!==i&&0<k(i,e)))break t;t[r]=e,t[n]=i,n=r}}function T(t){return void 0===(t=t[0])?null:t}function S(t){var e=t[0];if(void 0!==e){var n=t.pop();if(n!==e){t[0]=n;t:for(var r=0,i=t.length;r<i;){var o=2*(r+1)-1,a=t[o],s=o+1,u=t[s];if(void 0!==a&&0>k(a,n))void 0!==u&&0>k(u,a)?(t[r]=u,t[s]=n,r=s):(t[r]=a,t[o]=n,r=o);else{if(!(void 0!==u&&0>k(u,n)))break t;t[r]=u,t[s]=n,r=s}}}return e}return null}function k(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}var I=[],C=[],N=1,x=null,P=3,j=!1,A=!1,D=!1;function R(t){for(var e=T(C);null!==e;){if(null===e.callback)S(C);else{if(!(e.startTime<=t))break;S(C),e.sortIndex=e.expirationTime,O(I,e)}e=T(C)}}function M(t){if(D=!1,R(t),!A)if(null!==T(I))A=!0,r(L);else{var e=T(C);null!==e&&i(M,e.startTime-t)}}function L(t,n){A=!1,D&&(D=!1,o()),j=!0;var r=P;try{for(R(n),x=T(I);null!==x&&(!(x.expirationTime>n)||t&&!e.unstable_shouldYield());){var a=x.callback;if("function"===typeof a){x.callback=null,P=x.priorityLevel;var s=a(x.expirationTime<=n);n=e.unstable_now(),"function"===typeof s?x.callback=s:x===T(I)&&S(I),R(n)}else S(I);x=T(I)}if(null!==x)var u=!0;else{var c=T(C);null!==c&&i(M,c.startTime-n),u=!1}return u}finally{x=null,P=r,j=!1}}var F=a;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){A||j||(A=!0,r(L))},e.unstable_getCurrentPriorityLevel=function(){return P},e.unstable_getFirstCallbackNode=function(){return T(I)},e.unstable_next=function(t){switch(P){case 1:case 2:case 3:var e=3;break;default:e=P}var n=P;P=e;try{return t()}finally{P=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=F,e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=P;P=t;try{return e()}finally{P=n}},e.unstable_scheduleCallback=function(t,n,a){var s=e.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,t){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 t={id:N++,callback:n,priorityLevel:t,startTime:a,expirationTime:u=
2a+u,sortIndex:-1},a>s?(t.sortIndex=a,O(C,t),null===T(I)&&t===T(C)&&(D?o():D=!0,i(M,a-s))):(t.sortIndex=u,O(I,t),A||j||(A=!0,r(L))),t},e.unstable_wrapCallback=function(t){var e=P;return function(){var n=P;P=e;try{return t.apply(this,arguments)}finally{P=n}}}},,,,,function(t,e,n){},function(t,e,n){"use strict";var r=n(83);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,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,v=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,_=r?Symbol.for("react.scope"):60119;function E(t){if("object"===typeof t&&null!==t){var e=t.$$typeof;switch(e){case i:switch(t=t.type){case f:case h:case a:case u:case s:case p:return t;default:switch(t=t&&t.$$typeof){case l:case d:case y:case m:case c:return t;default:return e}}case o:return e}}}function O(t){return E(t)===h}e.AsyncMode=f,e.ConcurrentMode=h,e.ContextConsumer=l,e.ContextProvider=c,e.Element=i,e.ForwardRef=d,e.Fragment=a,e.Lazy=y,e.Memo=m,e.Portal=o,e.Profiler=u,e.StrictMode=s,e.Suspense=p,e.isAsyncMode=function(t){return O(t)||E(t)===f},e.isConcurrentMode=O,e.isContextConsumer=function(t){return E(t)===l},e.isContextProvider=function(t){return E(t)===c},e.isElement=function(t){return"object"===typeof t&&null!==t&&t.$$typeof===i},e.isForwardRef=function(t){return E(t)===d},e.isFragment=function(t){return E(t)===a},e.isLazy=function(t){return E(t)===y},e.isMemo=function(t){return E(t)===m},e.isPortal=function(t){return E(t)===o},e.isProfiler=function(t){return E(t)===u},e.isStrictMode=function(t){return E(t)===s},e.isSuspense=function(t){return E(t)===p},e.isValidElementType=function(t){return"string"===typeof t||"function"===typeof t||t===a||t===h||t===u||t===s||t===p||t===v||"object"===typeof t&&null!==t&&(t.$$typeof===y||t.$$typeof===m||t.$$typeof===c||t.$$typeof===l||t.$$typeof===d||t.$$typeof===b||t.$$typeof===w||t.$$typeof===_||t.$$typeof===g)},e.typeOf=E},function(t,e,n){var r=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(P){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new C(r||[]);return o._invoke=function(t,e,n){var r=f;return function(i,o){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return x()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var u=l(t,e,n);if("normal"===u.type){if(r=n.done?p:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=p,n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",d="executing",p="completed",v={};function m(){}function y(){}function g(){}var b={};b[o]=function(){return this};var w=Object.getPrototypeOf,_=w&&w(w(N([])));_&&_!==n&&r.call(_,o)&&(b=_);var E=g.prototype=m.prototype=Object.create(b);function O(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"===typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function S(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&
2(n.method="return",n.arg=e,S(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=l(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(t){if(t){var n=t[o];if(n)return n.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:x}}function x(){return{value:e,done:!0}}return y.prototype=E.constructor=g,g.constructor=y,y.displayName=u(g,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},O(T.prototype),T.prototype[a]=function(){return this},t.AsyncIterator=T,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new T(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(E),u(E,s,"Generator"),E[o]=function(){return this},E.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=N,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),I(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;I(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=r}catch(i){Function("r","regeneratorRuntime = r")(r)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],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}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";(function(t){var e=n(6);(function(){var n,r="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)};var i=function(e){e=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof t&&t,e];for(var n=0;n<e.length;++n){var r=e[n];if(r&&r.Math==Math)return r}return globalThis}(this);function o(t){var e=0;return function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}}function a(t){var e="undefined"!=typeof Symbol&&Symbol.iterator&&t[Symbol.iterator];return e?e.call(t):{next:o(t)}}!function(t,e){if(e){var n=i;t=t.split(".");for(var o=0;o<t.length-1;o++){var a=t[o];a in n||(n[a]={}),n=n[a]}(e=e(o=n[t=t[t.length-1]]))!=o&&null!=e&&r(n,t,{configurable:!0,writable:!0,value:e})}}("Promise",(function(t){function e(t){this.b=0,this.c=void 0,this.a=[];var e=this.f();try{t(e.resolve,e.reject)}catch(n){e.reject(n)}}function n(){this.a=null}function r(t){return t instanceof e?t:new e((function(e){e(t)}))}if(t)return t;n.prototype.b=function(t){if(null==this.a){this.a=[];var e=this;this.c((function(){e.g()}))}this.a.push(t)};var o=i.setTimeout;n.prototype.c=function(t){o(t,0)},n.prototype.g=function(){for(;this.a&&this.a.length;){var t=this.a;this.a=[];for(var e=0;e<t.length;++e){var n=t[e];t[e]=null;try{n()}catch(r){this.f(r)}}}this.a=null},n.prototype.f=function(t){this.c((function(){throw t}))},e.prototype.f=function(){function t(t){return function(r){n||(n=!0,t.call(e,r))}}var e=this,n=!1;return{resolve:t(this.m),reject:t(this.g)}}
vendor: 1,338 bytes, line 2
2,e.prototype.m=function(t){if(t===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(t instanceof e)this.s(t);else{t:switch(typeof t){case"object":var n=null!=t;break t;case"function":n=!0;break t;default:n=!1}n?this.v(t):this.h(t)}},e.prototype.v=function(t){var e=void 0;try{e=t.then}catch(n){return void this.g(n)}"function"==typeof e?this.u(e,t):this.h(t)},e.prototype.g=function(t){this.i(2,t)},e.prototype.h=function(t){this.i(1,t)},e.prototype.i=function(t,e){if(0!=this.b)throw Error("Cannot settle("+t+", "+e+"): Promise already settled in state"+this.b);this.b=t,this.c=e,this.l()},e.prototype.l=function(){if(null!=this.a){for(var t=0;t<this.a.length;++t)s.b(this.a[t]);this.a=null}};var s=new n;return e.prototype.s=function(t){var e=this.f();t.Qa(e.resolve,e.reject)},e.prototype.u=function(t,e){var n=this.f();try{t.call(e,n.resolve,n.reject)}catch(r){n.reject(r)}},e.prototype.then=function(t,n){function r(t,e){return"function"==typeof t?function(e){try{i(t(e))}catch(n){o(n)}}:e}var i,o,a=new e((function(t,e){i=t,o=e}));return this.Qa(r(t,i),r(n,o)),a},e.prototype.catch=function(t){return this.then(void 0,t)},e.prototype.Qa=function(t,e){function n(){switch(r.b){case 1:t(r.c);break;case 2:e(r.c);break;default:throw Error("Unexpected state: "+r.b)}}var r=this;null==this.a?s.b(n):this.a.push(n)}
2,e.resolve=r,e.reject=function(t){return new e((function(e,n){n(t)}))},e.race=function(t){return new e((function(e,n){for(var i=a(t),o=i.next();!o.done;o=i.next())r(o.value).Qa(e,n)}))},e.all=function(t){var n=a(t),i=n.next();return i.done?r([]):new e((function(t,e){function o(e){return function(n){a[e]=n,0==--s&&t(a)}}var a=[],s=0;do{a.push(void 0),s++,r(i.value).Qa(o(a.length-1),e),i=n.next()}while(!i.done)}))},e}));var s=s||{},u=this||self,c=/^[\w+/_-]+[=]{0,2}$/,l=null;function f(t){return(t=t.querySelector&&t.querySelector("script[nonce]"))&&(t=t.nonce||t.getAttribute("nonce"))&&c.test(t)?t:""}function h(){}function d(t){var e=typeof t;return"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}function p(t){var e=d(t);return"array"==e||"object"==e&&"number"==typeof t.length}function v(t){return"function"==d(t)}function m(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}function y(t){return Object.prototype.hasOwnProperty.call(t,g)&&t[g]||(t[g]=++b)}var g="closure_uid_"+(1e9*Math.random()>>>0),b=0;function w(t,e,n){return t.call.apply(t.bind,arguments)}function _(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function E(t,e,n){return(E=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?w:_).apply(null,arguments)}function O(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}var T=Date.now;function S(t,e){function n(){}n.prototype=e.prototype,t.ab=e.prototype,t.prototype=new n,t.prototype.constructor=t}function k(t){return t}
2function I(t,e,n){this.code=x+t,this.message=e||P[t]||"",this.a=n||null}function C(t){var e=t&&t.code;return e?new I(e.substring(x.length),t.message,t.serverResponse):null}S(I,Error),I.prototype.w=function(){var t={code:this.code,message:this.message};return this.a&&(t.serverResponse=this.a),t},I.prototype.toJSON=function(){return this.w()};var N,x="auth/",P={"admin-restricted-operation":"This operation is restricted to administrators only.","argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-change-needs-verification":"Multi-factor users must al
2ways have a verified email.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-dynamic-link-domain":"The provided dynamic link domain is not configured or authorized for the current project.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-multi-factor-session":"The request does not contain a valid proof of first factor successful sign-in.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invali
2d-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-provider-id":"The specified provider ID is invalid.","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","invalid-tenant-id":"The Auth instance's tenant ID is invalid.","multi-factor-info-not-found":"The user does not have a second factor matching the identifier provided.","multi-factor-auth-required":"Proof of ownership of a second factor is required to complete sign-in.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-multi-factor-info":"No second factor identifier is provided.","missing-multi-factor-session":"The request is missing proof of first factor successful sign-in.","missing-or-invalid-nonce":"The request does not contain a valid nonce. This can occur if the SHA-256 hash of the provided raw nonce does not match the hashed nonce in the ID token payload.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.","rejected-credential":"The request contains malformed or mismatching credentials.","second-factor-already-in-use":"The second factor is already enrolled on this account.","maximum-second-factor-count-exceeded":"The maximum allowed number of second factors on a user has been exceeded.","tenant-id-mismatch":"The provided tenant ID does not match the Auth instance's tenant ID",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.","unsupported-first-factor":"Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","unsupported-tenant-operation":"This operation is not supported in a multi-tenant context.","unverified-email":"The operation requires a verified email.","user-cancelled":"The user did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."},j={ld:{Ta:"https://staging-identitytoolkit.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",Za:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Wa:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"b"},sd:{Ta:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",Za:"https://securetoken.googleapis.com/v1/token",Wa:"https://identitytoolkit.googleapis.com/v2/",id:"p"},ud:{Ta:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",Za:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Wa:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"s"},vd:{Ta:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",Za:"https://test-securetoken.sandbox.googleapis.com/v1/token",Wa:"https://test-identitytoolkit.sandbox.googleapis.com/v2/",id:"t"}};function A(t){for(var e in j)if(j[e].id===t)return{firebaseEndpoint:(t=j[e]).Ta,secureTokenEndpoint:t.Za,identityPlatformEndpoint:t.Wa};return null}function D(t){if(!t)return!1;
2try{return!!t.$goog_Thenable}catch(e){return!1}}function R(t){if(Error.captureStackTrace)Error.captureStackTrace(this,R);else{var e=Error().stack;e&&(this.stack=e)}t&&(this.message=String(t))}function M(t,e){for(var n="",r=(t=t.split("%s")).length-1,i=0;i<r;i++)n+=t[i]+(i<e.length?e[i]:"%s");R.call(this,n+t[r])}function L(t,e){throw new M("Failure"+(t?": "+t:""),Array.prototype.slice.call(arguments,1))}function F(t,e){this.c=t,this.f=e,this.b=0,this.a=null}function U(t,e){t.f(e),100>t.b&&(t.b++,e.next=t.a,t.a=e)}function V(){this.b=this.a=null}N=A("__EID__")?"__EID__":void 0,S(R,Error),R.prototype.name="CustomError",S(M,R),M.prototype.name="AssertionError",F.prototype.get=function(){if(0<this.b){this.b--;var t=this.a;this.a=t.next,t.next=null}else t=this.c();return t};var B=new F((function(){return new z}),(function(t){t.reset()}));function q(){var t=we,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function z(){this.next=this.b=this.a=null}V.prototype.add=function(t,e){var n=B.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},z.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},z.prototype.reset=function(){this.next=this.b=this.a=null};var W=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if("string"===typeof t)return"string"!==typeof e||1!=e.length?-1:t.indexOf(e,0);for(var n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1},H=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,i="string"===typeof t?t.split(""):t,o=0;o<r;o++)o in i&&e.call(n,i[o],o,t)};var G=Array.prototype.filter?function(t,e){return Array.prototype.filter.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=[],i=0,o="string"===typeof t?t.split(""):t,a=0;a<n;a++)if(a in o){var s=o[a];e.call(void 0,s,a,t)&&(r[i++]=s)}return r},Y=Array.prototype.map?function(t,e){return Array.prototype.map.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=Array(n),i="string"===typeof t?t.split(""):t,o=0;o<n;o++)o in i&&(r[o]=e.call(void 0,i[o],o,t));return r},K=Array.prototype.some?function(t,e){return Array.prototype.some.call(t,e,void 0)}:function(t,e){for(var n=t.length,r="string"===typeof t?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t))return!0;return!1};function Q(t,e){return 0<=W(t,e)}function X(t,e){var n;return(n=0<=(e=W(t,e)))&&Array.prototype.splice.call(t,e,1),n}function $(t,e){!function(t,e){for(var n="string"===typeof t?t.split(""):t,r=t.length-1;0<=r;--r)r in n&&e.call(void 0,n[r],r,t)}(t,(function(n,r){e.call(void 0,n,r,t)&&1==Array.prototype.splice.call(t,r,1).length&&0}))}function J(t){return Array.prototype.concat.apply([],arguments)}function Z(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}var tt,et=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]},nt=/&/g,rt=/</g,it=/>/g,ot=/"/g,at=/'/g,st=/\x00/g,ut=/[\x00&<>"']/;function ct(t,e){return-1!=t.indexOf(e)}function lt(t,e){return t<e?-1:t>e?1:0}t:{var ft=u.navigator;if(ft){var ht=ft.userAgent;if(ht){tt=ht;break t}}tt=""}function dt(t){return ct(tt,t)}function pt(t,e){for(var n in t)e.call(void 0,t[n],n,t)}function vt(t){for(var e in t)return!1;return!0}function mt(t){var e,n={};for(e in t)n[e]=t[e];return n}var yt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function gt(t,e){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o<yt.length;o++)n=yt[o],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function bt(t,e){t:{try{var n=t&&t.ownerDocument,r=n&&(n.defaultView||n.parentWindow);if((r=r||u).Element&&r.Location){var i=r;break t}}catch(a){}i=null}if(i&&"undefined"!=typeof i[e]&&(!t||!(t instanceof i[e])&&(t instanceof i.Location||t instanceof i.Element))){if(m(t))try{var o=t.constructor.displayName||t.constructor.name||Object.prototype.toString.call(t)}catch(a){o="<object could not be stringified>"}else o=void 0===t?"undefined":null===t?"null":typeof t;L("Argument is not a %s (or a non-Element, non-Location mock); got: %s",e,o)}}function wt(t,e){this.a=t===Tt&&e||"",this.b=Ot}function _t(t){return t instanceof wt&&t.constructor===wt&&t.b===Ot?t.a:(L("expected object of type Const, got '"+t+"'"),"type_error:Const")}wt.prototype.sa=!0,wt.prototype.ra=function(){return this.a},wt.prototype.toString=function(){return"Const{"+this.a+"}"};var Et,Ot={},Tt={};function St(){if(void 0===Et){var t=null,e=u.trustedTypes;if(e&&e.createPolicy){try{t=e.createPolicy("goog#html",{createHTML:k,createScript:k,createScriptURL:k})}catch(n){u.console&&u.console.error(n.message)}Et=t}else Et=t}return Et}function kt(t,e){this.a=e===Pt?t:""}function It(t){return t instanceof kt&&t.constructor===kt?t.a:(L("expected object of type TrustedResourceUrl, got '"+t+"' of type "+d(t)),"type_error:TrustedResourceUrl")}function Ct(t,e){var n=_t(t);if(!xt.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return function(t){var e=St();return new kt(t=e?e.createScriptURL(t):t,Pt)}(t=n.replace(Nt,(function(t,r){if(!Object.prototype.hasOwnProperty.call(e,r))throw Error('Found marker, "'+r+'", in format str
2ing, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(e));return(t=e[r])instanceof wt?_t(t):encodeURIComponent(String(t))})))}kt.prototype.sa=!0,kt.prototype.ra=function(){return this.a.toString()},kt.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var Nt=/%{(\w+)}/g,xt=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,Pt={};function jt(t,e){this.a=e===Ut?t:""}function At(t){return t instanceof jt&&t.constructor===jt?t.a:(L("expected object of type SafeUrl, got '"+t+"' of type "+d(t)),"type_error:SafeUrl")}jt.prototype.sa=!0,jt.prototype.ra=function(){return this.a.toString()},jt.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var Dt=/^(?: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,Rt=/^data:(.*);base64,[a-z0-9+\/]+=*$/i,Mt=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function Lt(t){if(t instanceof jt)return t;if(t="object"==typeof t&&t.sa?t.ra():String(t),Mt.test(t))t=new jt(t,Ut);else{var e=(t=(t=String(t)).replace(/(%0A|%0D)/g,"")).match(Rt);t=e&&Dt.test(e[1])?new jt(t,Ut):null}return t}function Ft(t){return t instanceof jt?t:(t="object"==typeof t&&t.sa?t.ra():String(t),Mt.test(t)||(t="about:invalid#zClosurez"),new jt(t,Ut))}var Ut={},Vt=new jt("about:invalid#zClosurez",Ut);function Bt(t,e,n){this.a=n===qt?t:""}Bt.prototype.sa=!0,Bt.prototype.ra=function(){return this.a.toString()},Bt.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var qt={};function zt(t,e,n,r){return t=t instanceof jt?t:Ft(t),e=e||u,n=n instanceof wt?_t(n):n||"",e.open(At(t),n,r,void 0)}function Wt(t,e){for(var n=t.split("%s"),r="",i=Array.prototype.slice.call(arguments,1);i.length&&1<n.length;)r+=n.shift()+i.shift();return r+n.join("%s")}function Ht(t){return ut.test(t)&&(-1!=t.indexOf("&")&&(t=t.replace(nt,"&")),-1!=t.indexOf("<")&&(t=t.replace(rt,"<")),-1!=t.indexOf(">")&&(t=t.replace(it,">")),-1!=t.indexOf('"')&&(t=t.replace(ot,""")),-1!=t.indexOf("'")&&(t=t.replace(at,"'")),-1!=t.indexOf("\0")&&(t=t.replace(st,"�"))),t}function Gt(t){return Gt[" "](t),t}Gt[" "]=h;var Yt,Kt=dt("Opera"),Qt=dt("Trident")||dt("MSIE"),Xt=dt("Edge"),$t=Xt||Qt,Jt=dt("Gecko")&&!(ct(tt.toLowerCase(),"webkit")&&!dt("Edge"))&&!(dt("Trident")||dt("MSIE"))&&!dt("Edge"),Zt=ct(tt.toLowerCase(),"webkit")&&!dt("Edge");function te(){var t=u.document;return t?t.documentMode:void 0}t:{var ee="",ne=function(){var t=tt;return Jt?/rv:([^\);]+)(\)|;)/.exec(t):Xt?/Edge\/([\d\.]+)/.exec(t):Qt?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t):Zt?/WebKit\/(\S+)/.exec(t):Kt?/(?:Version)[ \/]?(\S+)/.exec(t):void 0}();if(ne&&(ee=ne?ne[1]:""),Qt){var re=te();if(null!=re&&re>parseFloat(ee)){Yt=String(re);break t}}Yt=ee}var ie,oe={};function ae(t){return function(t,e){var n=oe;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}(t,(function(){for(var e=0,n=et(String(Yt)).split("."),r=et(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&o<i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;e=lt(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||lt(0==a[2].length,0==s[2].length)||lt(a[2],s[2]),a=a[3],s=s[3]}while(0==e)}return 0<=e}))}if(u.document&&Qt){var se=te();ie=se||(parseInt(Yt,10)||void 0)}else ie=void 0;var ue=ie;try{new self.OffscreenCanvas(0,0).getContext("2d")}catch(ha){}var ce=!Qt||9<=Number(ue);function le(t){var e=document;return"string"===typeof t?e.getElementById(t):t}function fe(t,e){pt(e,(function(e,n){e&&"object"==typeof e&&e.sa&&(e=e.ra()),"style"==n?t.style.cssText=e:"class"==n?t.className=e:"for"==n?t.htmlFor=e:pe.hasOwnProperty(n)?t.setAttribute(pe[n],e):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?t.setAttribute(n,e):t[n]=e}))}var he,de,pe={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 ve(t,e,n){function r(n){n&&e.appendChild("string"===typeof n?t.createTextNode(n):n)}for(var i=2;i<n.length;i++){var o=n[i];if(!p(o)||m(o)&&0<o.nodeType)r(o);else{t:{if(o&&"number"==typeof o.length){if(m(o)){var a="function"==typeof o.item||"string"==typeof o.item;break t}if(v(o)){a="function"==typeof o.item;break t}}a=!1}H(a?Z(o):o,r)}}}function me(t,e){return e=String(e),"application/xhtml+xml"===t.contentType&&(e=e.toLowerCase()),t.createElement(e)}function ye(t){u.setTimeout((function(){throw t}),0)}function ge(t,e){de||function(){if(u.Promise&&u.Promise.resolve){var t=u.Promise.resolve(void 0);de=function(){t.then(_e)}}else de=function(){var t=_e;!v(u.setImmediate)||u.Window&&u.Window.prototype&&!dt("Edge")&&u.Window.prototype.setImmediate==u.setImmediate?(he||(he=function(){var t=u.MessageChannel;if("undefined"===typeof t&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!dt("Presto")&&(t=function(){var t=me(document,"IFRAME");t.style.display="none",document.documentElement.appendChild(t);var e=t.contentWindow;(t=e.document).open(),t.close();var n="callImmediate"+Math.random(),r="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host;t=E((function(t){"*"!=r&&t.origin!=r||t.data!=n||this.port1.onmessage()}),this),e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(n,r)}}}),"undefined"!==typeof t&&!dt("Trident")&&!dt("MSIE")){var e=new t,n={},r=n;return e.port1.onmessage=function(){if(void 0!==n.next){var t=(n=n.next).Gb;n.Gb=null,t()}},function(t){r.next={Gb:t},r=r.next,e.port2.postMessage(0)}}return function(t){u.setTimeout(t,0)}}()),he(t)):u.setImmediate(t)}}(),be||(de(),be=!0),we.add(t,e)}var be=!1,we=new V;function _e(){for(var t;t=q();){try{t.a.call(t.b)}catch(e){ye(e)}U(B,t)}be=!1}function Ee(t,e){if(this.a=Oe,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,t!=h)try{var n=this;t.call(e,(function(t){Me(n,Te,t)}),(function(t){if(!(t instanceof ze))try{if(t instanceof Error)throw t;throw Error("Promise rejected.")}catch(e){}Me(n,Se,t)}))}catch(r){Me(this,Se,r)}}var Oe=0,Te=2,Se=3;function ke(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}ke.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var Ie=new F((function(){return new ke}),(function(t){t.reset()}));function Ce(t,e,n){var r=Ie.get();return r.g=t,r.b=e,r.f=n,r}function Ne(t){if(t instanceof Ee)return t;var e=new Ee(h);return Me(e,Te,t),e}
2function xe(t){return new Ee((function(e,n){n(t)}))}function Pe(t,e,n){Le(t,e,n,null)||ge(O(e,t))}function je(t){return new Ee((function(e){var n=t.length,r=[];if(n)for(var i=function(t,i,o){n--,r[t]=i?{Pb:!0,value:o}:{Pb:!1,reason:o},0==n&&e(r)},o=0;o<t.length;o++)Pe(t[o],O(i,o,!0),O(i,o,!1));else e(r)}))}function Ae(t,e){if(t.a==Oe)if(t.c){var n=t.c;if(n.b){for(var r=0,i=null,o=null,a=n.b;a&&(a.c||(r++,a.a==t&&(i=a),!(i&&1<r)));a=a.next)i||(o=a);i&&(n.a==Oe&&1==r?Ae(n,e):(o?((r=o).next==n.f&&(n.f=r),r.next=r.next.next):Ue(n),Ve(n,i,Se,e)))}t.c=null}else Me(t,Se,e)}function De(t,e){t.b||t.a!=Te&&t.a!=Se||Fe(t),t.f?t.f.next=e:t.b=e,t.f=e}function Re(t,e,n,r){var i=Ce(null,null,null);return i.a=new Ee((function(t,o){i.g=e?function(n){try{var i=e.call(r,n);t(i)}catch(a){o(a)}}:t,i.b=n?function(e){try{var i=n.call(r,e);void 0===i&&e instanceof ze?o(e):t(i)}catch(a){o(a)}}:o})),i.a.c=t,De(t,i),i.a}function Me(t,e,n){t.a==Oe&&(t===n&&(e=Se,n=new TypeError("Promise cannot resolve to itself")),t.a=1,Le(n,t.$c,t.ad,t)||(t.i=n,t.a=e,t.c=null,Fe(t),e!=Se||n instanceof ze||function(t,e){t.g=!0,ge((function(){t.g&&qe.call(null,e)}))}(t,n)))}function Le(t,e,n,r){if(t instanceof Ee)return De(t,Ce(e||h,n||null,r)),!0;if(D(t))return t.then(e,n,r),!0;if(m(t))try{var i=t.then;if(v(i))return function(t,e,n,r,i){function o(t){s||(s=!0,r.call(i,t))}function a(t){s||(s=!0,n.call(i,t))}var s=!1;try{e.call(t,a,o)}catch(u){o(u)}}(t,i,e,n,r),!0}catch(o){return n.call(r,o),!0}return!1}function Fe(t){t.h||(t.h=!0,ge(t.gc,t))}function Ue(t){var e=null;return t.b&&(e=t.b,t.b=e.next,e.next=null),t.b||(t.f=null),e}function Ve(t,e,n,r){if(n==Se&&e.b&&!e.c)for(;t&&t.g;t=t.c)t.g=!1;if(e.a)e.a.c=null,Be(e,n,r);else try{e.c?e.g.call(e.f):Be(e,n,r)}catch(i){qe.call(null,i)}U(Ie,e)}function Be(t,e,n){e==Te?t.g.call(t.f,n):t.b&&t.b.call(t.f,n)}Ee.prototype.then=function(t,e,n){return Re(this,v(t)?t:null,v(e)?e:null,n)},Ee.prototype.$goog_Thenable=!0,(n=Ee.prototype).oa=function(t,e){return(t=Ce(t,t,e)).c=!0,De(this,t),this},n.o=function(t,e){return Re(this,null,t,e)},n.cancel=function(t){if(this.a==Oe){var e=new ze(t);ge((function(){Ae(this,e)}),this)}},n.$c=function(t){this.a=Oe,Me(this,Te,t)},n.ad=function(t){this.a=Oe,Me(this,Se,t)},n.gc=function(){for(var t;t=Ue(this);)Ve(this,t,this.a,this.i);this.h=!1};var qe=ye;function ze(t){R.call(this,t)}function We(){0!=He&&(Ge[y(this)]=this),this.xa=this.xa,this.pa=this.pa}S(ze,R),ze.prototype.name="cancel";var He=0,Ge={};function Ye(t){if(!t.xa&&(t.xa=!0,t.Da(),0!=He)){var e=y(t);if(0!=He&&t.pa&&0<t.pa.length)throw Error(t+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete Ge[e]}}We.prototype.xa=!1,We.prototype.Da=function(){if(this.pa)for(;this.pa.length;)this.pa.shift()()};var Ke=Object.freeze||function(t){return t},Qe=!Qt||9<=Number(ue),Xe=Qt&&!ae("9"),$e=function(){if(!u.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});try{u.addEventListener("test",h,e),u.removeEventListener("test",h,e)}catch(n){}return t}();function Je(t,e){this.type=t,this.b=this.target=e,this.defaultPrevented=!1}function Ze(t,e){if(Je.call(this,t?t.type:""),this.relatedTarget=this.b=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.a=null,t){var n=this.type=t.type,r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.b=e,e=t.relatedTarget){if(Jt){t:{try{Gt(e.nodeName);var i=!0;break t}catch(o){}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType="string"===typeof t.pointerType?t.pointerType:tn[t.pointerType]||"",this.a=t,t.defaultPrevented&&this.preventDefault()}}Je.prototype.preventDefault=function(){this.defaultPrevented=!0},S(Ze,Je);var tn=Ke({2:"touch",3:"pen",4:"mouse"});Ze.prototype.preventDefault=function(){Ze.ab.preventDefault.call(this);var t=this.a;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,Xe)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(e){}},Ze.prototype.g=function(){return this.a};var en="closure_listenable_"+(1e6*Math.random()|0),nn=0;function rn(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.Va=i,this.key=++nn,this.va=this.Pa=!1}function on(t){t.va=!0,t.listener=null,t.proxy=null,t.src=null,t.Va=null}function an(t){this.src=t,this.a={},this.b=0}function sn(t,e){var n=e.type;n in t.a&&X(t.a[n],e)&&(on(e),0==t.a[n].length&&(delete t.a[n],t.b--))}function un(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.va&&o.listener==e&&o.capture==!!n&&o.Va==r)return i}return-1}an.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=un(t,e,r,i);return-1<a?(e=t[a],n||(e.Pa=!1)):((e=new rn(e,this.src,o,!!r,i)).Pa=n,t.push(e)),e};var cn="closure_lm_"+(1e6*Math.random()|0),ln={};function fn(t,e,n,r,i){if(r&&r.once)dn(t,e,n,r,i);else if(Array.isArray(e))for(var o=0;o<e.length;o++)fn(t,e[o],n,r,i);else n=En(n),t&&t[en]?Tn(t,e,n,m(r)?!!r.capture:!!r,i):hn(t,e,n,!1,r,i)}function hn(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var a=m(i)?!!i.capture:!!i,s=wn(t);if(s||(t[cn]=s=new an(t)),!(n=s.add(e,n,r,a,o)).proxy){if(r=function(){var t=bn,e=Qe?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)$e||(i=a),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(mn(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}0}}function dn(t,e,n,r,i){if(Array.isArray(e))for(var o=0;o<e.length;o++)dn(t,e[o],n,r,i);else n=En(n),t&&t[en]?Sn(t,e,n,m(r)?!!r.capture:!!r,i):hn(t,e,n,!0,r,i)}function pn(t,e,n,r,i){if(Array.isArray(e))for(var o=0;o<e.length;o++)pn(t,e[o],n,r,i);else r=m(r)?!!r.capture:!!r,n=En(n),t&&t[en]?(t=t.v,(e=String(e).toString())in t.a&&(-1<(n=un(o=t.a[e],n,r,i))&&(on(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete t.a[e],t.b--)))):t&&(t=wn(t))&&(e=t.a[e.toString()],t=-1,e&&(t=un(e,n,r,i)),(n=-1<t?e[t]:null)&&vn(n))}function vn(t){if("number"!==typeof t&&t&&!t.va){var e=t.src;if(e&&e[en])sn(e.v,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(mn(n),r):e.addListener&&e.removeListener&&e.removeListener(r),(n=wn(e))?(sn(n,t),0==n.b&&(n.src=null,e[cn]=null)):on(t)}}}function mn(t){return t in ln?ln[t]:ln[t]="on"+t}function yn(t,e,n,r){var i=!0;if((t=wn(t))&&(e=t.a[e.toString()]))for(e=e.concat(),t=0;t<e.length;t++){var o=e[t];o&&o.capture==n&&!o.va&&(o=gn(o,r),i=i&&!1!==o)}return i}function gn(t,e){var n=t.listener,r=t.Va||t.src;return t.Pa&&vn(t),n.call(r,e)}function bn(t,e){if(t.va)return!0;
2if(!Qe){if(!e)t:{e=["window","event"];for(var n=u,r=0;r<e.length;r++)if(null==(n=n[e[r]])){e=null;break t}e=n}if(e=new Ze(r=e,this),n=!0,!(0>r.keyCode||void 0!=r.returnValue)){t:{var i=!1;if(0==r.keyCode)try{r.keyCode=-1;break t}catch(a){i=!0}(i||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],i=e.b;i;i=i.parentNode)r.push(i);for(t=t.type,i=r.length-1;0<=i;i--){e.b=r[i];var o=yn(r[i],t,!0,e);n=n&&o}for(i=0;i<r.length;i++)e.b=r[i],o=yn(r[i],t,!1,e),n=n&&o}return n}return gn(t,new Ze(e,this))}function wn(t){return(t=t[cn])instanceof an?t:null}var _n="__closure_events_fn_"+(1e9*Math.random()>>>0);function En(t){return v(t)?t:(t[_n]||(t[_n]=function(e){return t.handleEvent(e)}),t[_n])}function On(){We.call(this),this.v=new an(this),this.ac=this,this.gb=null}function Tn(t,e,n,r,i){t.v.add(String(e),n,!1,r,i)}function Sn(t,e,n,r,i){t.v.add(String(e),n,!0,r,i)}function kn(t,e,n,r){if(!(e=t.v.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var a=e[o];if(a&&!a.va&&a.capture==n){var s=a.listener,u=a.Va||a.src;a.Pa&&sn(t.v,a),i=!1!==s.call(u,r)&&i}}return i&&!r.defaultPrevented}function In(t,e,n){if(v(t))n&&(t=E(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=E(t.handleEvent,t)}return 2147483647<Number(e)?-1:u.setTimeout(t,e||0)}function Cn(t){var e=null;return new Ee((function(n,r){-1==(e=In((function(){n(void 0)}),t))&&r(Error("Failed to schedule timer."))})).o((function(t){throw u.clearTimeout(e),t}))}function Nn(t){if(t.W&&"function"==typeof t.W)return t.W();if("string"===typeof t)return t.split("");if(p(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}for(r in e=[],n=0,t)e[n++]=t[r];return e}function xn(t){if(t.Y&&"function"==typeof t.Y)return t.Y();if(!t.W||"function"!=typeof t.W){if(p(t)||"string"===typeof t){var e=[];t=t.length;for(var n=0;n<t;n++)e.push(n);return e}for(var r in e=[],n=0,t)e[n++]=r;return e}}function Pn(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof Pn)for(n=t.Y(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function jn(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];An(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e<t.a.length;)An(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function An(t,e){return Object.prototype.hasOwnProperty.call(t,e)}S(On,We),On.prototype[en]=!0,On.prototype.addEventListener=function(t,e,n,r){fn(this,t,e,n,r)},On.prototype.removeEventListener=function(t,e,n,r){pn(this,t,e,n,r)},On.prototype.dispatchEvent=function(t){var e,n=this.gb;if(n)for(e=[];n;n=n.gb)e.push(n);n=this.ac;var r=t.type||t;if("string"===typeof t)t=new Je(t,n);else if(t instanceof Je)t.target=t.target||n;else{var i=t;gt(t=new Je(r,n),i)}if(i=!0,e)for(var o=e.length-1;0<=o;o--){var a=t.b=e[o];i=kn(a,r,!0,t)&&i}if(i=kn(a=t.b=n,r,!0,t)&&i,i=kn(a,r,!1,t)&&i,e)for(o=0;o<e.length;o++)i=kn(a=t.b=e[o],r,!1,t)&&i;return i},On.prototype.Da=function(){if(On.ab.Da.call(this),this.v){var t,e=this.v;for(t in e.a){for(var n=e.a[t],r=0;r<n.length;r++)on(n[r]);delete e.a[t],e.b--}}this.gb=null},(n=Pn.prototype).W=function(){jn(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},n.Y=function(){return jn(this),this.a.concat()},n.clear=function(){this.b={},this.c=this.a.length=0},n.get=function(t,e){return An(this.b,t)?this.b[t]:e},n.set=function(t,e){An(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},n.forEach=function(t,e){for(var n=this.Y(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var Dn=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Rn(t,e){var n;this.a=this.l=this.c="",this.g=null,this.h=this.f="",this.i=!1,t instanceof Rn?(this.i=void 0!==e?e:t.i,Mn(this,t.c),this.l=t.l,this.a=t.a,Ln(this,t.g),this.f=t.f,Fn(this,rr(t.b)),this.h=t.h):t&&(n=String(t).match(Dn))?(this.i=!!e,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=!!e,this.b=new $n(null,this.i))}function Mn(t,e,n){t.c=n?zn(e,!0):e,t.c&&(t.c=t.c.replace(/:$/,""))}function Ln(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.g=e}else t.g=null}function Fn(t,e,n){e instanceof $n?(t.b=e,function(t,e){e&&!t.f&&(Jn(t),t.c=null,t.a.forEach((function(t,e){var n=e.toLowerCase();e!=n&&(tr(this,e),nr(this,n,t))}),t)),t.f=e}(t.b,t.i)):(n||(e=Wn(e,Qn)),t.b=new $n(e,t.i))}function Un(t,e,n){t.b.set(e,n)}function Vn(t,e){return t.b.get(e)}function Bn(t){return t instanceof Rn?new Rn(t):new Rn(t,void 0)}function qn(t,e,n,r){var i=new Rn(null,void 0);return t&&Mn(i,t),e&&(i.a=e),n&&Ln(i,n),r&&(i.f=r),i}function zn(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function Wn(t,e,n){return"string"===typeof t?(t=encodeURI(t).replace(e,Hn),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function Hn(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}Rn.prototype.toString=function(){var t=[],e=this.c;e&&t.push(Wn(e,Gn,!0),":");var n=this.a;return(n||"file"==e)&&(t.push("//"),(e=this.l)&&t.push(Wn(e,Gn,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.g)&&t.push(":",String(n))),(n=this.f)&&(this.a&&"/"!=n.charAt(0)&&t.push("/"),t.push(Wn(n,"/"==n.charAt(0)?Kn:Yn,!0))),(n=this.b.toString())&&t.pu
2sh("?",n),(n=this.h)&&t.push("#",Wn(n,Xn)),t.join("")},Rn.prototype.resolve=function(t){var e=new Rn(this),n=!!t.c;n?Mn(e,t.c):n=!!t.l,n?e.l=t.l:n=!!t.a,n?e.a=t.a:n=null!=t.g;var r=t.f;if(n)Ln(e,t.g);else if(n=!!t.f){if("/"!=r.charAt(0))if(this.a&&!this.f)r="/"+r;else{var i=e.f.lastIndexOf("/");-1!=i&&(r=e.f.substr(0,i+1)+r)}if(".."==(i=r)||"."==i)r="";else if(ct(i,"./")||ct(i,"/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var o=[],a=0;a<i.length;){var s=i[a++];"."==s?r&&a==i.length&&o.push(""):".."==s?((1<o.length||1==o.length&&""!=o[0])&&o.pop(),r&&a==i.length&&o.push("")):(o.push(s),r=!0)}r=o.join("/")}else r=i}return n?e.f=r:n=""!==t.b.toString(),n?Fn(e,rr(t.b)):n=!!t.h,n&&(e.h=t.h),e};var Gn=/[#\/\?@]/g,Yn=/[#\?:]/g,Kn=/[#\?]/g,Qn=/[#\?@]/g,Xn=/#/g;function $n(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function Jn(t){t.a||(t.a=new Pn,t.b=0,t.c&&function(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(t.c,(function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)})))}function Zn(t){var e=xn(t);if("undefined"==typeof e)throw Error("Keys are undefined");var n=new $n(null,void 0);t=Nn(t);for(var r=0;r<e.length;r++){var i=e[r],o=t[r];Array.isArray(o)?nr(n,i,o):n.add(i,o)}return n}function tr(t,e){Jn(t),e=ir(t,e),An(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,An((t=t.a).b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&jn(t)))}function er(t,e){return Jn(t),e=ir(t,e),An(t.a.b,e)}function nr(t,e,n){tr(t,e),0<n.length&&(t.c=null,t.a.set(ir(t,e),Z(n)),t.b+=n.length)}function rr(t){var e=new $n;return e.c=t.c,t.a&&(e.a=new Pn(t.a),e.b=t.b),e}function ir(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}function or(t){var e=[];return sr(new ar,t,e),e.join("")}function ar(){}function sr(t,e,n){if(null==e)n.push("null");else{if("object"==typeof e){if(Array.isArray(e)){var r=e;e=r.length,n.push("[");for(var i="",o=0;o<e;o++)n.push(i),sr(t,r[o],n),i=",";return void n.push("]")}if(!(e instanceof String||e instanceof Number||e instanceof Boolean)){for(r in n.push("{"),i="",e)Object.prototype.hasOwnProperty.call(e,r)&&("function"!=typeof(o=e[r])&&(n.push(i),lr(r,n),n.push(":"),sr(t,o,n),i=","));return void n.push("}")}e=e.valueOf()}switch(typeof e){case"string":lr(e,n);break;case"number":n.push(isFinite(e)&&!isNaN(e)?String(e):"null");break;case"boolean":n.push(String(e));break;case"function":n.push("null");break;default:throw Error("Unknown type: "+typeof e)}}}(n=$n.prototype).add=function(t,e){Jn(this),this.c=null,t=ir(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},n.clear=function(){this.a=this.c=null,this.b=0},n.forEach=function(t,e){Jn(this),this.a.forEach((function(n,r){H(n,(function(n){t.call(e,n,r,this)}),this)}),this)},n.Y=function(){Jn(this);for(var t=this.a.W(),e=this.a.Y(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},n.W=function(t){Jn(this);var e=[];if("string"===typeof t)er(this,t)&&(e=J(e,this.a.get(ir(this,t))));else{t=this.a.W();for(var n=0;n<t.length;n++)e=J(e,t[n])}return e},n.set=function(t,e){return Jn(this),this.c=null,er(this,t=ir(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},n.get=function(t,e){return t&&0<(t=this.W(t)).length?String(t[0]):e},n.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.Y(),n=0;n<e.length;n++){var r=e[n],i=encodeURIComponent(String(r));r=this.W(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),t.push(a)}}return this.c=t.join("&")};var 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(t,e){e.push('"',t.replace(cr,(function(t){var e=ur[t];return e||(e="\\u"+(65536|t.charCodeAt(0)).toString(16).substr(1),ur[t]=e),e})),'"')}function fr(){var t=Pr();return Qt&&!!ue&&11==ue||/Edge\/\d+/.test(t)}function hr(){return u.window&&u.window.location.href||self&&self.location&&self.location.href||""}function dr(t,e){e=e||u.window;var n="about:blank";t&&(n=At(Lt(t)||Vt)),e.location.href=n}function pr(t,e){var n,r=[];
2for(n in t)n in e?typeof t[n]!=typeof e[n]?r.push(n):"object"==typeof t[n]&&null!=t[n]&&null!=e[n]?0<pr(t[n],e[n]).length&&r.push(n):t[n]!==e[n]&&r.push(n):r.push(n);for(n in e)n in t||r.push(n);return r}function vr(t){return!!((t=(t||Pr()).toLowerCase()).match(/android/)||t.match(/webos/)||t.match(/iphone|ipad|ipod/)||t.match(/blackberry/)||t.match(/windows phone/)||t.match(/iemobile/))}function mr(t){t=t||u.window;try{t.close()}catch(e){}}function yr(t,e,n){var r=Math.floor(1e9*Math.random()).toString();e=e||500,n=n||600;var i=(window.screen.availHeight-n)/2,o=(window.screen.availWidth-e)/2;for(a in e={width:e,height:n,top:0<i?i:0,left:0<o?o:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},n=Pr().toLowerCase(),r&&(e.target=r,ct(n,"crios/")&&(e.target="_blank")),Cr(Pr())==kr&&(t=t||"http://localhost",e.scrollbars=!0),n=t||"",(t=e)||(t={}),r=window,e=n instanceof jt?n:Lt("undefined"!=typeof n.href?n.href:String(n))||Vt,n=t.target||n.target,i=[],t)switch(a){case"width":case"height":case"top":case"left":i.push(a+"="+t[a]);break;case"target":case"noopener":case"noreferrer":break;default:i.push(a+"="+(t[a]?1:0))}var a=i.join(",");if((dt("iPhone")&&!dt("iPod")&&!dt("iPad")||dt("iPad")||dt("iPod"))&&r.navigator&&r.navigator.standalone&&n&&"_self"!=n?(bt(a=me(document,"A"),"HTMLAnchorElement"),e=e instanceof jt?e:Ft(e),a.href=At(e),a.setAttribute("target",n),t.noreferrer&&a.setAttribute("rel","noreferrer"),(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,r,1),a.dispatchEvent(t),a={}):t.noreferrer?(a=zt("",r,n,a),t=At(e),a&&($t&&ct(t,";")&&(t="'"+t.replace(/'/g,"%27")+"'"),a.opener=null,t='<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+Ht(t)+'">',t=new Bt(t=(r=St())?r.createHTML(t):t,null,qt),r=a.document)&&(r.write(function(t){return t instanceof Bt&&t.constructor===Bt?t.a:(L("expected object of type SafeHtml, got '"+t+"' of type "+d(t)),"type_error:SafeHtml")}(t)),r.close())):(a=zt(e,r,n,a))&&t.noopener&&(a.opener=null),a)try{a.focus()}catch(s){}return a}var gr=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,br=/^[^@]+@[^@]+$/;function wr(){var t=null;return new Ee((function(e){"complete"==u.document.readyState?e():(t=function(){e()},dn(window,"load",t))})).o((function(e){throw pn(window,"load",t),e}))}function _r(t){return t=t||Pr(),!("file:"!==Mr()&&"ionic:"!==Mr()||!t.toLowerCase().match(/iphone|ipad|ipod|android/))}function Er(){var t=u.window;try{return!(!t||t==t.top)}catch(e){return!1}}function Or(){return"undefined"!==typeof u.WorkerGlobalScope&&"function"===typeof u.importScripts}function Tr(){return e.a.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":e.a.INTERNAL.hasOwnProperty("node")?"Node":Or()?"Worker":"Browser"}function Sr(){var t=Tr();return"ReactNative"===t||"Node"===t}var kr="Firefox",Ir="Chrome";function Cr(t){var e=t.toLowerCase();return ct(e,"opera/")||ct(e,"opr/")||ct(e,"opios/")?"Opera":ct(e,"iemobile")?"IEMobile":ct(e,"msie")||ct(e,"trident/")?"IE":ct(e,"edge/")?"Edge":ct(e,"firefox/")?kr:ct(e,"silk/")?"Silk":ct(e,"blackberry")?"Blackberry":ct(e,"webos")?"Webos":!ct(e,"safari/")||ct(e,"chrome/")||ct(e,"crios/")||ct(e,"android")?!ct(e,"chrome/")&&!ct(e,"crios/")||ct(e,"edge/")?ct(e,"android")?"Android":(t=t.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==t.length?t[1]:"Other":Ir:"Safari"}var Nr={md:"FirebaseCore-web",od:"FirebaseUI-web"};function xr(t,e){e=e||[];var n,r=[],i={};for(n in Nr)i[Nr[n]]=!0;for(n=0;n<e.length;n++)"undefined"!==typeof i[e[n]]&&(delete i[e[n]],r.push(e[n]));return r.sort(),(e=r).length||(e=["FirebaseCore-web"]),"Browser"===(r=Tr())?r=Cr(i=Pr()):"Worker"===r&&(r=Cr(i=Pr())+"-"+r),r+"/JsCore/"+t+"/"+e.join(",")}function Pr(){return u.navigator&&u.navigator.userAgent||""}function jr(t,e){t=t.split("."),e=e||u;for(var n=0;n<t.length&&"object"==typeof e&&null!=e;n++)e=e[t[n]];return n!=t.length&&(e=void 0),e}function Ar(){try{var t=u.localStorage,e=Br();if(t)return t.setItem(e,"1"),t.removeItem(e),!fr()||!!u.indexedDB}catch(n){return Or()&&!!u.indexedDB}return!1}function Dr(){return(Rr()||"chrome-extension:"===Mr()||_r())&&!Sr()&&Ar()&&!Or()}function Rr(){return"http:"===Mr()||"https:"===Mr()}function Mr(){return u.location&&u.location.protocol||null}function Lr(t){return!vr(t=t||Pr())&&Cr(t)!=kr}function Fr(t){return"undefined"===typeof t?null:or(t)}function Ur(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&null!==t[e]&&void 0!==t[e]&&(n[e]=t[e]);return n}function Vr(t){if(null!==t)return JSON.parse(t)}function Br(t){return t||Math.floor(1e9*Math.random()).toString()}function qr(t){return"Safari"!=Cr(t=t||Pr())&&!t.toLowerCase().match(/iphone|ipad|ipod/)}function zr(){var t=u.___jsl;if(t&&t.H)for(var e in t.H)if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=t.H[e].L.concat(),t.CP)for(var n=0;n<t.CP.length;n++)t.CP[n]=null}function Wr(t,e){if(t>
2e)throw Error("Short delay should be less than long delay!");this.a=t,this.c=e,t=Pr(),e=Tr(),this.b=vr(t)||"ReactNative"===e}function Hr(){var t=u.document;return!t||"undefined"===typeof t.visibilityState||"visible"==t.visibilityState}function Gr(t){try{var e=new Date(parseInt(t,10));if(!isNaN(e.getTime())&&!/[^0-9]/.test(t))return e.toUTCString()}catch(n){}return null}function Yr(){return!(!jr("fireauth.oauthhelper",u)&&!jr("fireauth.iframe",u))}Wr.prototype.get=function(){var t=u.navigator;return!t||"boolean"!==typeof t.onLine||!Rr()&&"chrome-extension:"!==Mr()&&"undefined"===typeof t.connection||t.onLine?this.b?this.c:this.a:Math.min(5e3,this.a)};var Kr,Qr={};function Xr(t){Qr[t]||(Qr[t]=!0,"undefined"!==typeof console&&"function"===typeof console.warn&&console.warn(t))}try{var $r={};Object.defineProperty($r,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty($r,"abcd",{configurable:!0,enumerable:!0,value:2}),Kr=2==$r.abcd}catch(ha){Kr=!1}function Jr(t,e,n){Kr?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n}):t[e]=n}function Zr(t,e){if(e)for(var n in e)e.hasOwnProperty(n)&&Jr(t,n,e[n])}function ti(t){var e={};return Zr(e,t),e}function ei(t){var e=t;if("object"==typeof t&&null!=t)for(var n in e="length"in t?[]:{},t)Jr(e,n,ei(t[n]));return e}function ni(t){var e=t&&(t[si]?"phone":null);if(!(e&&t&&t[ai]))throw new I("internal-error","Internal assert: invalid MultiFactorInfo object");Jr(this,"uid",t[ai]),Jr(this,"displayName",t[ii]||null);var n=null;t[oi]&&(n=new Date(t[oi]).toUTCString()),Jr(this,"enrollmentTime",n),Jr(this,"factorId",e)}function ri(t){try{var e=new ui(t)}catch(n){e=null}return e}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(t){ni.call(this,t),Jr(this,"phoneNumber",t[si])}function ci(t){var e={},n=t[di],r=t[vi],i=t[mi];if(t=ri(t[pi]),!i||i!=fi&&i!=hi&&!n||i==hi&&!r||i==li&&!t)throw Error("Invalid checkActionCode response!");
2i==hi?(e[gi]=n||null,e[wi]=n||null,e[yi]=r):(e[gi]=r||null,e[wi]=r||null,e[yi]=n||null),e[bi]=t||null,Jr(this,Ei,i),Jr(this,_i,ei(e))}S(ui,ni),ui.prototype.w=function(){var t=ui.ab.w.call(this);return t.phoneNumber=this.phoneNumber,t};var li="REVERT_SECOND_FACTOR_ADDITION",fi="EMAIL_SIGNIN",hi="VERIFY_AND_CHANGE_EMAIL",di="email",pi="mfaInfo",vi="newEmail",mi="requestType",yi="email",gi="fromEmail",bi="multiFactorInfo",wi="previousEmail",_i="data",Ei="operation";function Oi(t){var e=Vn(t=Bn(t),Ti)||null,n=Vn(t,Si)||null,r=Vn(t,Ci)||null;if(r=r&&xi[r]||null,!e||!n||!r)throw new I("argument-error",Ti+", "+Si+"and "+Ci+" are required in a valid action code URL.");Zr(this,{apiKey:e,operation:r,code:n,continueUrl:Vn(t,ki)||null,languageCode:Vn(t,Ii)||null,tenantId:Vn(t,Ni)||null})}var Ti="apiKey",Si="oobCode",ki="continueUrl",Ii="languageCode",Ci="mode",Ni="tenantId",xi={recoverEmail:"RECOVER_EMAIL",resetPassword:"PASSWORD_RESET",revertSecondFactorAddition:li,signIn:fi,verifyAndChangeEmail:hi,verifyEmail:"VERIFY_EMAIL"};function Pi(t){try{return new Oi(t)}catch(e){return null}}function ji(t){var e=t[Li];if("undefined"===typeof e)throw new I("missing-continue-uri");if("string"!==typeof e||"string"===typeof e&&!e.length)throw new I("invalid-continue-uri");this.h=e,this.b=this.a=null,this.g=!1;var n=t[Ai];if(n&&"object"===typeof n){e=n[Vi];var r=n[Fi];if(n=n[Ui],"string"===typeof e&&e.length){if(this.a=e,"undefined"!==typeof r&&"boolean"!==typeof r)throw new I("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 I("argument-error",Ui+" property must be a non empty string when specified.");this.b=n||null}else{if("undefined"!==typeof e)throw new I("argument-error",Vi+" property must be a non empty string when specified.");if("undefined"!==typeof r||"undefined"!==typeof n)throw new I("missing-android-pkg-name")}}else if("undefined"!==typeof n)throw new I("argument-error",Ai+" property must be a non null object when specified.");if(this.f=null,(e=t[Mi])&&"object"===typeof e){if("string"===typeof(e=e[Bi])&&e.length)this.f=e;else if("undefined"!==typeof e)throw new I("argument-error",Bi+" property must be a non empty string when specified.")}else if("undefined"!==typeof e)throw new I("argument-error",Mi+" property must be a non null object when specified.");if("undefined"!==typeof(e=t[Ri])&&"boolean"!==typeof e)throw new I("argument-error",Ri+" property must be a boolean when specified.");if(this.c=!!e,"undefined"!==typeof(t=t[Di])&&("string"!==typeof t||"string"===typeof t&&!t.length))throw new I("argument-error",Di+" property must be a non empty string when specified.");this.i=t||null}var Ai="android",Di="dynamicLinkDomain",Ri="handleCodeInApp",Mi="iOS",Li="url",Fi="installApp",Ui="minimumVersion",Vi="packageName",Bi="bundleId";function qi(t){var e={};for(var n in e.continueUrl=t.h,e.canHandleCodeInApp=t.c,(e.androidPackageName=t.a)&&(e.androidMinimumVersion=t.b,e.androidInstallApp=t.g),e.iOSBundleId=t.f,e.dynamicLinkDomain=t.i,e)null===e[n]&&delete e[n];return e}var zi=null;function Wi(t){var e=[];return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),i=zi[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}!function(){if(!zi){zi={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++)for(var r=t.concat(e[n].split("")),i=0;i<r.length;i++){var o=r[i];void 0===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;e(i<<2|o>>4),64!=a&&(e(o<<4&240|a>>2),64!=s&&e(a<<6&192|s))}}(t,(function(t){e.push(t)})),e}function Hi(t){var e=Yi(t);if(!(e&&e.sub&&e.iss&&e.aud&&e.exp))throw Error("Invalid JWT");this.h=t,this.a=e.exp,this.i=e.sub,t=Date.now()/1e3,this.g=e.iat||(t>this.a?this.a:t),this.b=e.provider_id||e.firebase&&e.firebase.sign_in_provider||null,this.f=e.firebase&&e.firebase.tenant||null,this.c=!!e.is_anonymous||"anonymous"==this.b}function Gi(t){try{return new Hi(t)}catch(e){return null}}function Yi(t){if(!t)return null;if(3!=(t=t.split(".")).length)return null;for(var e=(4-(t=t[1]).length%4)%4,n=0;n<e;n++)t+=".";try{var r=Wi(t);for(t=[],n=e=0;e<r.length;){var i=r[e++];if(128>i)t[n++]=String.fromCharCode(i);else if(191<i&&224>i){var o=r[e++];t[n++]=String.fromCharCode((31&i)<<6|63&o)}else if(239<i&&365>
2i){o=r[e++];var a=r[e++],s=((7&i)<<18|(63&o)<<12|(63&a)<<6|63&r[e++])-65536;t[n++]=String.fromCharCode(55296+(s>>10)),t[n++]=String.fromCharCode(56320+(1023&s))}else o=r[e++],a=r[e++],t[n++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&a)}return JSON.parse(t.join(""))}catch(u){}return null}Hi.prototype.T=function(){return this.f},Hi.prototype.l=function(){return this.c},Hi.prototype.toString=function(){return this.h};var Ki="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),Qi=["client_id","response_type","scope","redirect_uri","state"],Xi={nd:{Ja:"locale",ua:700,ta:600,fa:"facebook.com",Xa:Qi},pd:{Ja:null,ua:500,ta:750,fa:"github.com",Xa:Qi},qd:{Ja:"hl",ua:515,ta:680,fa:"google.com",Xa:Qi},wd:{Ja:"lang",ua:485,ta:705,fa:"twitter.com",Xa:Ki},kd:{Ja:"locale",ua:640,ta:600,fa:"apple.com",Xa:[]}};function $i(t){for(var e in Xi)if(Xi[e].fa==t)return Xi[e];return null}function Ji(t){var e={};e["facebook.com"]=ro,e["google.com"]=oo,e["github.com"]=io,e["twitter.com"]=ao;var n=t&&t[to];try{if(n)return e[n]?new e[n](t):new no(t);if("undefined"!==typeof t[Zi])return new eo(t)}catch(r){}return null}var Zi="idToken",to="providerId";function eo(t){var e=t[to];if(!e&&t[Zi]){var n=Gi(t[Zi]);n&&n.b&&(e=n.b)}if(!e)throw Error("Invalid additional user info!");"anonymous"!=e&&"custom"!=e||(e=null),n=!1,"undefined"!==typeof t.isNewUser?n=!!t.isNewUser:"identitytoolkit#SignupNewUserResponse"===t.kind&&(n=!0),Jr(this,"providerId",e),Jr(this,"isNewUser",n)}function no(t){eo.call(this,t),Jr(this,"profile",ei((t=Vr(t.rawUserInfo||"{}"))||{}))}function ro(t){if(no.call(this,t),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function io(t){if(no.call(this,t),"github.com"!=this.providerId)throw Error("Invalid provider ID!");Jr(this,"username",this.profile&&this.profile.login||null)}function oo(t){if(no.call(this,t),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function ao(t){if(no.call(this,t),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");Jr(this,"username",t.screenName||null)}function so(t){var e=Bn(t),n=Vn(e,"link"),r=Vn(Bn(n),"link");return e=Vn(e,"deep_link_id"),Vn(Bn(e),"link")||e||r||n||t}function uo(t,e){if(!t&&!e)throw new I("internal-error","Internal assert: no raw session string available");if(t&&e)throw new I("internal-error","Internal assert: unable to determine the session type");this.a=t||null,this.b=e||null,this.type=this.a?co:lo}S(no,eo),S(ro,no),S(io,no),S(oo,no),S(ao,no);var co="enroll",lo="signin";function fo(){}function ho(t,e){return t.then((function(t){if(t[ns]){var n=Gi(t[ns]);if(!n||e!=n.i)throw new I("user-mismatch");return t}throw new I("user-mismatch")})).o((function(t){throw t&&t.code&&t.code==x+"user-not-found"?new I("user-mismatch"):t}))}function po(t,e){if(!e)throw new I("internal-error","failed to construct a credential");this.a=e,Jr(this,"providerId",t),Jr(this,"signInMethod",t)}function vo(t){return{pendingToken:t.a,requestUri:"http://localhost"}}function mo(t){if(t&&t.providerId&&t.signInMethod&&0==t.providerId.indexOf("saml.")&&t.pendingToken)try{return new po(t.providerId,t.pendingToken)}catch(e){}return null}function yo(t,e,n){if(this.a=null,e.idToken||e.accessToken)e.idToken&&Jr(this,"idToken",e.idToken),e.accessToken&&Jr(this,"accessToken",e.accessToken),e.nonce&&!e.pendingToken&&Jr(this,"nonce",e.nonce),e.pendingToken&&(this.a=e.pendingToken);else{if(!e.oauthToken||!e.oauthTokenSecret)throw new I("internal-error","failed to construct a credential");Jr(this,"accessToken",e.oauthToken),Jr(this,"secret",e.oauthTokenSecret)}Jr(this,"providerId",t),Jr(this,"signInMethod",n)}function go(t){var e={};return t.idToken&&(e.id_token=t.idToken),t.accessToken&&(e.access_token=t.accessToken),t.secret&&(e.oauth_token_secret=t.secret),e.providerId=t.providerId,t.nonce&&!t.a&&(e.nonce=t.nonce),e={postBody:Zn(e).toString(),requestUri:"http://localhost"},t.a&&(delete e.postBody,e.pendingToken=t.a),e}function bo(t){if(t&&t.providerId&&t.signInMethod){var e={idToken:t.oauthIdToken,accessToken:t.oauthTokenSecret?null:t.oauthAccessToken,oauthTokenSecret:t.oauthTokenSecret,oauthToken:t.oauthTokenSecret&&t.oauthAccessToken,nonce:t.nonce,pendingToken:t.pendingToken};try{return new yo(t.providerId,e,t.signInMethod)}catch(n){}}return null}function wo(t,e){this.Qc=e||[],Zr(this,{providerId:t,isOAuthProvider:!0}),this.Ib={},this.pb=($i(t)||{}).Ja||null,this.ob=null}function _o(t){if("string"!==typeof t||0!=t.indexOf("saml."))throw new I("argument-error",'SAML provider IDs must be prefixed with "saml."');wo.call(this,t,[])}function Eo(t){wo.call(this,t,Qi),this.a=[]}
2function Oo(){Eo.call(this,"facebook.com")}function To(t){if(!t)throw new I("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return m(t)&&(e=t.accessToken),(new Oo).credential({accessToken:e})}function So(){Eo.call(this,"github.com")}function ko(t){if(!t)throw new I("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return m(t)&&(e=t.accessToken),(new So).credential({accessToken:e})}function Io(){Eo.call(this,"google.com"),this.Ca("profile")}function Co(t,e){var n=t;return m(t)&&(n=t.idToken,e=t.accessToken),(new Io).credential({idToken:n,accessToken:e})}function No(){wo.call(this,"twitter.com",Ki)}function xo(t,e){var n=t;if(m(n)||(n={oauthToken:t,oauthTokenSecret:e}),!n.oauthToken||!n.oauthTokenSecret)throw new I("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new yo("twitter.com",n,"twitter.com")}function Po(t,e,n){this.a=t,this.f=e,Jr(this,"providerId","password"),Jr(this,"signInMethod",n===Ao.EMAIL_LINK_SIGN_IN_METHOD?Ao.EMAIL_LINK_SIGN_IN_METHOD:Ao.EMAIL_PASSWORD_SIGN_IN_METHOD)}function jo(t){return t&&t.email&&t.password?new Po(t.email,t.password,t.signInMethod):null}function Ao(){Zr(this,{providerId:"password",isOAuthProvider:!1})}function Do(t,e){if(!(e=Ro(e)))throw new I("argument-error","Invalid email link!");return new Po(t,e.code,Ao.EMAIL_LINK_SIGN_IN_METHOD)}function Ro(t){return(t=Pi(t=so(t)))&&t.operation===fi?t:null}function Mo(t){if(!(t.eb&&t.cb||t.La&&t.ea))throw new I("internal-error");this.a=t,Jr(this,"providerId","phone"),this.fa="phone",Jr(this,"signInMethod","phone")}function Lo(t){if(t&&"phone"===t.providerId&&(t.verificationId&&t.verificationCode||t.temporaryProof&&t.phoneNumber)){var e={};return H(["verificationId","verificationCode","temporaryProof","phoneNumber"],(function(n){t[n]&&(e[n]=t[n])})),new Mo(e)}return null}function Fo(t){return t.a.La&&t.a.ea?{temporaryProof:t.a.La,phoneNumber:t.a.ea}:{sessionInfo:t.a.eb,code:t.a.cb}}function Uo(t){try{this.a=t||e.a.auth()}catch(n){throw new I("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}Zr(this,{providerId:"phone",isOAuthProvider:!1})}function Vo(t,e){if(!t)throw new I("missing-verification-id");if(!e)throw new I("missing-verification-code");return new Mo({eb:t,cb:e})}function Bo(t){if(t.temporaryProof&&t.phoneNumber)return new Mo({La:t.temporaryProof,ea:t.phoneNumber});var e=t&&t.providerId;if(!e||"password"===e)return null;var n=t&&t.oauthAccessToken,r=t&&t.oauthTokenSecret,i=t&&t.nonce,o=t&&t.oauthIdToken,a=t&&t.pendingToken;try{switch(e){case"google.com":return Co(o,n);case"facebook.com":return To(n);case"github.com":return ko(n);case"twitter.com":return xo(n,r);default:return n||r||o||a?a?0==e.indexOf("saml.")?new po(e,a):new yo(e,{pendingToken:a,idToken:t.oauthIdToken,accessToken:t.oauthAccessToken},e):new Eo(e).credential({idToken:o,accessToken:n,rawNonce:i}):null}}catch(s){return null}}function qo(t){if(!t.isOAuthProvider)throw new I("invalid-oauth-provider")}function zo(t,e,n,r,i,o,a){if(this.c=t,this.b=e||null,this.g=n||null,this.f=r||null,this.i=o||null,this.h=a||null,this.a=i||null,!this.g&&!this.a)throw new I("invalid-auth-event");if(this.g&&this.a)throw new I("invalid-auth-event");if(this.g&&!this.f)throw new I("invalid-auth-event")}function Wo(t){return(t=t||{}).type?new zo(t.type,t.eventId,t.urlResponse,t.sessionId,t.error&&C(t.error),t.postBody,t.tenantId):null}function Ho(){this.b=null,this.a=[]}uo.prototype.Ha=function(){return this.a?Ne(this.a):Ne(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(t){return Ts(t,vo(this))},po.prototype.b=function(t,e){var n=vo(this);return n.idToken=e,Ss(t,n)},po.prototype.c=function(t,e){return ho(ks(t,vo(this)),e)},po.prototype.w=function(){return{providerId:this.providerId,sign
2InMethod:this.signInMethod,pendingToken:this.a}},yo.prototype.ka=function(t){return Ts(t,go(this))},yo.prototype.b=function(t,e){var n=go(this);return n.idToken=e,Ss(t,n)},yo.prototype.c=function(t,e){return ho(ks(t,go(this)),e)},yo.prototype.w=function(){var t={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(t.oauthIdToken=this.idToken),this.accessToken&&(t.oauthAccessToken=this.accessToken),this.secret&&(t.oauthTokenSecret=this.secret),this.nonce&&(t.nonce=this.nonce),this.a&&(t.pendingToken=this.a),t},wo.prototype.Ka=function(t){return this.Ib=mt(t),this},S(_o,wo),S(Eo,wo),Eo.prototype.Ca=function(t){return Q(this.a,t)||this.a.push(t),this},Eo.prototype.Qb=function(){return Z(this.a)},Eo.prototype.credential=function(t,e){var n;if(!(n=m(t)?{idToken:t.idToken||null,accessToken:t.accessToken||null,nonce:t.rawNonce||null}:{idToken:t||null,accessToken:e||null}).idToken&&!n.accessToken)throw new I("argument-error","credential failed: must provide the ID token and/or the access token.");return new yo(this.providerId,n,this.providerId)},S(Oo,Eo),Jr(Oo,"PROVIDER_ID","facebook.com"),Jr(Oo,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),S(So,Eo),Jr(So,"PROVIDER_ID","github.com"),Jr(So,"GITHUB_SIGN_IN_METHOD","github.com"),S(Io,Eo),Jr(Io,"PROVIDER_ID","google.com"),Jr(Io,"GOOGLE_SIGN_IN_METHOD","google.com"),S(No,wo),Jr(No,"PROVIDER_ID","twitter.com"),Jr(No,"TWITTER_SIGN_IN_METHOD","twitter.com"),Po.prototype.ka=function(t){return this.signInMethod==Ao.EMAIL_LINK_SIGN_IN_METHOD?su(t,Ds,{email:this.a,oobCode:this.f}):su(t,nu,{email:this.a,password:this.f})},Po.prototype.b=function(t,e){return this.signInMethod==Ao.EMAIL_LINK_SIGN_IN_METHOD?su(t,Rs,{idToken:e,email:this.a,oobCode:this.f}):su(t,Ks,{idToken:e,email:this.a,password:this.f})},Po.prototype.c=function(t,e){return ho(this.ka(t),e)},Po.prototype.w=function(){return{email:this.a,password:this.f,signInMethod:this.signInMethod}},Zr(Ao,{PROVIDER_ID:"password"}),Zr(Ao,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Zr(Ao,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Mo.prototype.ka=function(t){return t.fb(Fo(this))},Mo.prototype.b=function(t,e){var n=Fo(this);return n.idToken=e,su(t,iu,n)},Mo.prototype.c=function(t,e){var n=Fo(this);return n.operation="REAUTH",ho(t=su(t,ou,n),e)},Mo.prototype.w=function(){var t={providerId:"phone"};return this.a.eb&&(t.verificationId=this.a.eb),this.a.cb&&(t.verificationCode=this.a.cb),this.a.La&&(t.temporaryProof=this.a.La),this.a.ea&&(t.phoneNumber=this.a.ea),t},Uo.prototype.fb=function(t,e){var n=this.a.a;return Ne(e.verify()).then((function(r){if("string"!==typeof r)throw new I("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(e.type){case"recaptcha":var i=m(t)?t.session:null,o=m(t)?t.phoneNumber:t;return(i&&i.type==co?i.Ha().then((function(t){return function(t,e){return su(t,Xs,e).then((function(t){return t.phoneSessionInfo.sessionInfo}))}(n,{idToken:t,phoneEnrollmentInfo:{phoneNumber:o,recaptchaToken:r}})})):i&&i.type==lo?i.Ha().then((function(e){return function(t,e){return su(t,$s,e).then((function(t){return t.phoneResponseInfo.sessionInfo}))}(n,{mfaPendingCredential:e,mfaEnrollmentId:t.multiFactorHint&&t.multiFactorHint.uid||t.multiFactorUid,phoneSignInInfo:{recaptchaToken:r}})})):function(t,e){return su(t,Gs,e)}(n,{phoneNumber:o,recaptchaToken:r})).then((function(t){return"function"===typeof e.reset&&e.reset(),t}),(function(t){throw"function"===typeof e.reset&&e.reset(),t}));default:throw new I("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 t=[];return t.push(this.c),this.b&&t.push(this.b),this.f&&t.push(this.f),this.h&&t.push(this.h),t.join("-")},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 Go,Yo=null;function Ko(t){var e="unauthorized-domain",n=void 0,r=Bn(t);t=r.a,"chrome-extension"==(r=r.c)?n=Wt("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):"http"==r||"https"==r?n=Wt("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):e="operation-not-supported-in-this-environment",I.call(this,e,n)}function Qo(t,e,n){I.call(this,t,n),(t=e||{}).Jb&&Jr(this,"email",t.Jb),t.ea&&Jr(this,"phoneNumber",t.ea),t.credential&&Jr(this,"credential",t.credential),t.Zb&&Jr(this,"tenantId",t.Zb)}function Xo(t){if(t.code){var e=t.code||"";0==e.indexOf(x)&&(e=e.substring(x.length));var n={credential:Bo(t),Zb:t.tenantId};if(t.email)n.Jb=t.email;else if(t.phoneNumber)n.ea=t.phoneNumber;else if(!n.credential)return new I(e,t.message||void 0);return new Qo(e,n,t.message)}return null}function $o(){}function Jo(t){return t.c||(t.c=t.b())}function Zo(){}function ta(t){if(!t.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n<e.length;n++){var r=e[n];try{return new ActiveXObject(r),t.f=r}catch(i){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return t.f}function ea(){}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=E(this.qc,this),this.a.onerror=E(this.Sb,this),this.a.onprogress=E(this.rc,this),this.a.ontimeout=E(this.vc,this)}function ra(t,e){t.readyState=e,t.onreadystatechange&&t.onreadystatechange()}function ia(t,e,n){this.reset(t,e,n,void 0,void 0)}S(Ko,I),S(Qo,I),Qo.prototype.w=function(){var t={code:this.code,message:this.message};this.email&&(t.email=this.email),this.phoneNumber&&(t.phoneNumber=this.phoneNumber),this.tenantId&&(t.tenantId=this.tenantId);var e=this.credential&&this.credential.w();return e&>(t,e),t},Qo.prototype.toJSON=function(){return this.w()},$o.prototype.c=null,S(Zo,$o),Zo.prototype.a=function(){var t=ta(this);return t?new ActiveXObject(t):new XMLHttpRequest},Zo.prototype.b=function(){var t={};return ta(this)&&(t[0]=!0,t[1]=!0),t},Go=new Zo,S(ea,$o),ea.prototype.a=function(){var t=new XMLHttpRequest;if("withCredentials"in t)return t;if("undefined"!=typeof XDomainRequest)return new na;throw Error("Unsupported browser")},ea.prototype.b=function(){return{}},(n=na.prototype).open=function(t,e,n){if(null!=n&&!n)throw Error("Only async requests are supported.");this.a.open(t,e)},n.send=function(t){if(t){if("string"!=typeof t)throw Error("Only string data is supported");this.a.send(t)}else this.a.send()},n.abort=function(){this.a.abort()},n.setRequestHeader=function(){},n.getResponseHeader=function(t){return"content-type"==t.toLowerCase()?this.a.contentType:""},n.qc=function(){this.status=200,this.response=this.responseText=this.a.responseText,ra(this,4)},n.Sb=function(){this.status=500,this.response=this.responseText="",ra(this,4)},n.vc=function(){this.Sb()},n.rc=function(){this.status=200,ra(this,1)},n.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType},ia.prototype.a=null;function oa(t){this.f=t,this.b=this.c=this.a=null}function aa(t,e){this.name=t,this.value=e}ia.prototype.reset=function(t,e,n,r,i){"number"==typeof i||0,r||T(),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(t){return t.c?t.c:t.a?fa(t.a):(L("Root logger has no level set."),null)}oa.prototype.log=function(t,e,n){if(t.value>=fa(this).value)for(v(e)&&(e=e()),t=new ia(t,String(e),this.f),n&&(t.a=n),n=this;n;)n=n.a};var ha,da={},pa=null;function va(t){var e;if(pa||(pa=new oa(""),da[""]=pa,pa.c=ca),!(e=da[t])){e=new oa(t);var n=t.lastIndexOf("."),r=t.substr(n+1);(n=va(t.substr(0,n))).b||(n.b={}),n.b[r]=e,e.a=n,da[t]=e}return e}function ma(t,e){t&&t.log(la,e,void 0)}function ya(t){this.f=t}function ga(t){On.call(this),this.u=t,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=va("goog.net.FetchXmlHttp"),this.m=this.c=this.g=null}S(ya,$o),ya.prototype.a=function(){return new ga(this.f)},ya.prototype.b=(ha={},function(){return ha}),S(ga,On);var ba=0;function wa(t){t.c.read().then(t.pc.bind(t)).catch(t.Ua.bind(t))}function _a(t){t.readyState=4,t.g=null,t.c=null,t.m=null,Ea(t)}function Ea(t){t.onreadystatechange&&t.onreadystatechange.call(t)}function Oa(t){On.call(this),this.headers=new Pn,this.D=t||null,this.c=!1,this.C=this.a=null,this.h=this.R=this.l="",this.f=this.O=this.i=this.J=!1,this.g=0,this.s=null,this.m=Ta,this.u=this.S=!1}(n=ga.prototype).open=function(t,e){if(this.readyState!=ba)throw this.abort(),Error("Error reopening a connection");this.s=t,this.f=e,this.readyState=1,Ea(this)},n.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var e={headers:this.l,method:this.s,credentials:this.h,cache:void 0};
2t&&(e.body=t),this.u.fetch(new Request(this.f,e)).then(this.uc.bind(this),this.Ua.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,_a(this)),this.readyState=ba},n.uc=function(t){this.a&&(this.g=t,this.b||(this.status=this.g.status,this.statusText=this.g.statusText,this.b=t.headers,this.readyState=2,Ea(this)),this.a&&(this.readyState=3,Ea(this),this.a&&("arraybuffer"===this.responseType?t.arrayBuffer().then(this.sc.bind(this),this.Ua.bind(this)):"undefined"!==typeof u.ReadableStream&&"body"in t?(this.response=this.responseText="",this.c=t.body.getReader(),this.m=new TextDecoder,wa(this)):t.text().then(this.tc.bind(this),this.Ua.bind(this)))))},n.pc=function(t){if(this.a){var e=this.m.decode(t.value?t.value:new Uint8Array(0),{stream:!t.done});e&&(this.response=this.responseText+=e),t.done?_a(this):Ea(this),3==this.readyState&&wa(this)}},n.tc=function(t){this.a&&(this.response=this.responseText=t,_a(this))},n.sc=function(t){this.a&&(this.response=t,_a(this))},n.Ua=function(t){var e=this.i;e&&e.log(ua,"Failed to fetch url "+this.f,t instanceof Error?t:Error(t)),this.a&&_a(this)},n.setRequestHeader=function(t,e){this.l.append(t,e)},n.getResponseHeader=function(t){return this.b?this.b.get(t.toLowerCase())||"":((t=this.i)&&t.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 t=this.i;return t&&t.log(ua,"Attempting to get all response headers but no headers have been received for url: "+this.f,void 0),""}t=[];for(var e=this.b.entries(),n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join("\r\n")},Object.defineProperty(ga.prototype,"withCredentials",{get:function(){return"include"===this.h},set:function(t){this.h=t?"include":"same-origin"}}),S(Oa,On);var Ta="";Oa.prototype.b=va("goog.net.XhrIo");var Sa=/^https?$/i,ka=["POST","PUT"];function Ia(t,e,n,r,i){if(t.a)throw Error("[goog.net.XhrIo] Object is active with another request="+t.l+"; newUri="+e);n=n?n.toUpperCase():"GET",t.l=e,t.h="",t.R=n,t.J=!1,t.c=!0,t.a=t.D?t.D.a():Go.a(),t.C=t.D?Jo(t.D):Jo(Go),t.a.onreadystatechange=E(t.Vb,t);try{ma(t.b,Ma(t,"Opening Xhr")),t.O=!0,t.a.open(n,String(e),!0),t.O=!1}catch(a){return ma(t.b,Ma(t,"Error opening Xhr: "+a.message)),void Na(t,a)}e=r||"";var o=new Pn(t.headers);i&&function(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(p(t)||"string"===typeof t)H(t,e,void 0);else for(var n=xn(t),r=Nn(t),i=r.length,o=0;o<i;o++)e.call(void 0,r[o],n&&n[o],t)}(i,(function(t,e){o.set(e,t)})),i=function(t){t:{for(var e=Ca,n=t.length,r="string"===typeof t?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t)){e=i;break t}e=-1}return 0>e?null:"string"===typeof t?t.charAt(e):t[e]}(o.Y()),r=u.FormData&&e instanceof u.FormData,!Q(ka,n)||i||r||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach((function(t,e){this.a.setRequestHeader(e,t)}),t),t.m&&(t.a.responseType=t.m),"withCredentials"in t.a&&t.a.withCredentials!==t.S&&(t.a.withCredentials=t.S);try{Aa(t),0<t.g&&(t.u=function(t){return Qt&&ae(9)&&"number"===typeof t.timeout&&void 0!==t.ontimeout}(t.a),ma(t.b,Ma(t,"Will abort after "+t.g+"ms if incomplete, xhr2 "+t.u)),t.u?(t.a.timeout=t.g,t.a.ontimeout=E(t.Ma,t)):t.s=In(t.Ma,t.g,t)),ma(t.b,Ma(t,"Sending request")),t.i=!0,t.a.send(e),t.i=!1}catch(a){ma(t.b,Ma(t,"Send error: "+a.message)),Na(t,a)}}function Ca(t){return"content-type"==t.toLowerCase()}function Na(t,e){t.c=!1,t.a&&(t.f=!0,t.a.abort(),t.f=!1),t.h=e,xa(t),ja(t)}function xa(t){t.J||(t.J=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function Pa(t){if(t.c&&"undefined"!=typeof s)if(t.C[1]&&4==Da(t)&&2==Ra(t))ma(t.b,Ma(t,"Local request error detected and ignored"));else if(t.i&&4==Da(t))In(t.Vb,0,t);else if(t.dispatchEvent("readystatechange"),4==Da(t)){ma(t.b,Ma(t,"Request complete")),t.c=!1;try{var e,n=Ra(t);t:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r
2=!0;break t;default:r=!1}if(!(e=r)){var i;if(i=0===n){var o=String(t.l).match(Dn)[1]||null;if(!o&&u.self&&u.self.location){var a=u.self.location.protocol;o=a.substr(0,a.length-1)}i=!Sa.test(o?o.toLowerCase():"")}e=i}if(e)t.dispatchEvent("complete"),t.dispatchEvent("success");else{try{var c=2<Da(t)?t.a.statusText:""}catch(l){ma(t.b,"Can not get status: "+l.message),c=""}t.h=c+" ["+Ra(t)+"]",xa(t)}}finally{ja(t)}}}function ja(t,e){if(t.a){Aa(t);var n=t.a,r=t.C[0]?h:null;t.a=null,t.C=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(i){(t=t.b)&&t.log(sa,"Problem encountered resetting onreadystatechange: "+i.message,void 0)}}}function Aa(t){t.a&&t.u&&(t.a.ontimeout=null),t.s&&(u.clearTimeout(t.s),t.s=null)}function Da(t){return t.a?t.a.readyState:0}function Ra(t){try{return 2<Da(t)?t.a.status:-1}catch(e){return-1}}function Ma(t,e){return e+" ["+t.R+" "+t.l+" "+Ra(t)+"]"}function La(t){var e=Ka;this.g=[],this.u=e,this.s=t||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(t,e,n){t.a=!0,t.c=n,t.f=!e,qa(t)}function Ua(t){if(t.a){if(!t.v)throw new za(t);t.v=!1}}function Va(t,e,n,r){t.g.push([e,n,r]),t.a&&qa(t)}function Ba(t){return K(t.g,(function(t){return v(t[1])}))}function qa(t){if(t.h&&t.a&&Ba(t)){var e=t.h,n=Ga[e];n&&(u.clearTimeout(n.a),delete Ga[e]),t.h=0}t.b&&(t.b.l--,delete t.b),e=t.c;for(var r=n=!1;t.g.length&&!t.i;){var i=t.g.shift(),o=i[0],a=i[1];if(i=i[2],o=t.f?a:o)try{var s=o.call(i||t.s,e);void 0!==s&&(t.f=t.f&&(s==e||s instanceof Error),t.c=e=s),(D(e)||"function"===typeof u.Promise&&e instanceof u.Promise)&&(r=!0,t.i=!0)}catch(c){e=c,t.f=!0,Ba(t)||(n=!0)}}t.c=e,r&&(s=E(t.m,t,!0),r=E(t.m,t,!1),e instanceof La?(Va(e,s,r),e.C=!0):e.then(s,r)),n&&(e=new Ha(e),Ga[e.a]=e,t.h=e.a)}function za(){R.call(this)}function Wa(){R.call(this)}function Ha(t){this.a=u.setTimeout(E(this.c,this),0),this.b=t}(n=Oa.prototype).Ma=function(){"undefined"!=typeof s&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",ma(this.b,Ma(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},n.abort=function(){this.a&&this.c&&(ma(this.b,Ma(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ja(this))},n.Da=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),ja(this,!0)),Oa.ab.Da.call(this)},n.Vb=function(){this.xa||(this.O||this.i||this.f?Pa(this):this.Jc())},n.Jc=function(){Pa(this)},n.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.m){case Ta:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var t=this.b;return t&&t.log(sa,"Response type "+this.m+" is not supported on this browser",void 0),null}catch(e){return ma(this.b,"Can not get response: "+e.message),null}},La.prototype.cancel=function(t){if(this.a)this.c instanceof La&&this.c.cancel();else{if(this.b){var e=this.b;delete this.b,t?e.cancel(t):(e.l--,0>=e.l&&e.cancel())}this.u?this.u.call(this.s,this):this.v=!0,this.a||(t=new Wa(this),Ua(this),Fa(this,!1,t))}},La.prototype.m=function(t,e){this.i=!1,Fa(this,t,e)},La.prototype.then=function(t,e,n){var r,i,o=new Ee((function(t,e){r=t,i=e}));return Va(this,r,(function(t){t instanceof Wa?o.cancel():i(t)})),o.then(t,e,n)},La.prototype.$goog_Thenable=!0,S(za,R),za.prototype.message="Deferred has already fired",za.prototype.name="AlreadyCalledError",S(Wa,R),Wa.prototype.message="Deferred was canceled",Wa.prototype.name="CanceledError",Ha.prototype.c=function(){throw delete Ga[this.a],this.b};var Ga={};function Ya(t){var e={},n=e.document||document,r=It(t).toString(),i=me(document,"SCRIPT"),o={Wb:i,Ma:void 0},a=new La(o),s=null,c=null!=e.timeout?e.timeout:5e3;return 0<c&&(s=window.setTimeout((function(){Qa(i,!0);var t=new Ja($a,"Timeout reached for loading script "+r);Ua(a),Fa(a,!1,t)}),c),o.Ma=s),i.onload=i.onreadystatechange=function(){i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(Qa(i,e.xd||!1,s),Ua(a),Fa(a,!0,null))},i.onerror=function(){Qa(i,!0,s);var t=new Ja(Xa,"Error while loading script "+r);Ua(a),Fa(a,!1,t)},gt(o=e.attributes||{}
2,{type:"text/javascript",charset:"UTF-8"}),fe(i,o),function(t,e){bt(t,"HTMLScriptElement"),t.src=It(e),(e=t.ownerDocument&&t.ownerDocument.defaultView)&&e!=u?e=f(e.document):(null===l&&(l=f(u.document)),e=l),e&&t.setAttribute("nonce",e)}(i,t),function(t){var e;return(e=(t||document).getElementsByTagName("HEAD"))&&0!=e.length?e[0]:t.documentElement}(n).appendChild(i),a}function Ka(){if(this&&this.Wb){var t=this.Wb;t&&"SCRIPT"==t.tagName&&Qa(t,!0,this.Ma)}}function Qa(t,e,n){null!=n&&u.clearTimeout(n),t.onload=h,t.onerror=h,t.onreadystatechange=h,e&&window.setTimeout((function(){t&&t.parentNode&&t.parentNode.removeChild(t)}),0)}var Xa=0,$a=1;function Ja(t,e){var n="Jsloader error (code #"+t+")";e&&(n+=": "+e),R.call(this,n),this.code=t}function Za(t){this.f=t}function ts(t,n,r){if(this.c=t,t=n||{},this.l=t.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.m=t.secureTokenTimeout||rs,this.g=mt(t.secureTokenHeaders||is),this.h=t.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.i=t.identityPlatformEndpoint||"https://identitytoolkit.googleapis.com/v2/",this.v=t.firebaseTimeout||os,this.a=mt(t.firebaseHeaders||as),r&&(this.a["X-Client-Version"]=r,this.g["X-Client-Version"]=r),r="Node"==Tr(),!(r=u.XMLHttpRequest||r&&e.a.INTERNAL.node&&e.a.INTERNAL.node.XMLHttpRequest)&&!Or())throw new I("internal-error","The XMLHttpRequest compatibility library was not found.");this.f=void 0,Or()?this.f=new ya(self):Sr()?this.f=new Za(r):this.f=new ea,this.b=null}S(Ja,R),S(Za,$o),Za.prototype.a=function(){return new this.f},Za.prototype.b=function(){return{}};var es,ns="idToken",rs=new Wr(3e4,6e4),is={"Content-Type":"application/x-www-form-urlencoded"},os=new Wr(3e4,6e4),as={"Content-Type":"application/json"};function ss(t,e){e?t.a["X-Firebase-Locale"]=e:delete t.a["X-Firebase-Locale"]}function us(t,e){e&&(t.l=cs("https://securetoken.googleapis.com/v1/token",e),t.h=cs("https://www.googleapis.com/identitytoolkit/v3/relyingparty/",e),t.i=cs("https://identitytoolkit.googleapis.com/v2/",e))}function cs(t,e){return t=Bn(t),e=Bn(e.url),t.f=t.a+t.f,Mn(t,e.c),t.a=e.a,Ln(t,e.g),t.toString()}function ls(t,e){e?(t.a["X-Client-Version"]=e,t.g["X-Client-Version"]=e):(delete t.a["X-Client-Version"],delete t.g["X-Client-Version"])}function fs(t,e,n,r,i,o,a){(function(){var t=Pr();return!((t=Cr(t)!=Ir?null:(t=t.match(/\sChrome\/(\d+)/i))&&2==t.length?parseInt(t[1],10):null)&&30>t)&&(!Qt||!ue||9<ue)})()||Or()?t=E(t.u,t):(es||(es=new Ee((function(t,e){!function(t,e){if(((window.gapi||{}).client||{}).request)t();else{u[ds]=function(){((window.gapi||{}).client||{}).request?t():e(Error("CORS_UNSUPPORTED"))},function(t,e){Va(t,null,e,void 0)}(Ya(Ct(hs,{onload:ds})),(function(){e(Error("CORS_UNSUPPORTED"))}))}}(t,e)}))),t=E(t.s,t)),t(e,n,r,i,o,a)}ts.prototype.T=function(){return this.b},ts.prototype.u=function(t,e,n,r,i,o){if(Or()&&("undefined"===typeof u.fetch||"undefined"===typeof u.Headers||"undefined"===typeof u.Request))throw new I("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 Oa(this.f);if(o){a.g=Math.max(0,o);var s=setTimeout((function(){a.dispatchEvent("timeout")}),o)}Tn(a,"complete",(function(){s&&clearTimeout(s);var t=null;try{t=JSON.parse(function(t){try{return t.a?t.a.responseText:""}catch(e){return ma(t.b,"Can not get responseText: "+e.message),""}}(this))||null}catch(n){t=null}e&&e(t)})),Sn(a,"ready",(function(){s&&clearTimeout(s),Ye(this)})),Sn(a,"timeout",(function(){s&&clearTimeout(s),Ye(this),e&&e(null)})),Ia(a,t,n,r,i)};var hs=new wt(Tt,"https://apis.google.com/js/client.js?onload=%{onload}"),ds="__fcb"+Math.floor(1e6*Math.random()).toString();function ps(t,e,n,r,i,o,a){var s=Bn(e+n);Un(s,"key",t.c),a&&Un(s,"cb",T().toString());var u="GET"==r;if(u)for(var c in i)i.hasOwnProperty(c)&&Un(s,c,i[c]);return new Ee((function(e,n){fs(t,s.toString(),(function(t){t?t.error?n(cu(t,o||{})):e(t):n(new I("network-request-failed"))}),r,u?void 0:or(Ur(i)),t.a,t.v.get())}))}function vs(t){if("string"!==typeof(t=t.email)||!br.test(t))throw new I("invalid-email")}function ms(t){"email"in t&&vs(t)}function ys(t){if(!t[ns]){if(t.mfaPendingCredential)throw new I("multi-factor-auth-required",null,mt(t));throw new I("internal-error")}}function gs(t){if(t.phoneNumber||t.temporaryProof){if(!t.phoneNumber||!t.temporaryProof)throw new I("internal-error")}else{if(!t.sessionInfo)throw new I("missing-verification-id");if(!t.code)throw new I("missing-verification-code")}}ts.prototype.s=function(t,e,n,r,i){var o=this;es.then((function(){window.gapi.client.setApiKey(o.c);var a=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:t,method:n,body:r,headers:i,authType:"none",callback:function(t){window.gapi.auth.setToken(a),e&&e(t)}})})).o((function(t){e&&e({error:{message:t&&t.message||"CORS_UNSUPPORTED"}})}))},ts.prototype.zb=function(){return su(this,Qs,{})},ts.prototype.Bb=function(t,e){return su(this,Ys,{idToken:t,email:e})},ts.prototype.Cb=function(t,e){return su(this,Ks,{idToken:t,password:e})};
2var bs={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};function ws(t){if(!t.phoneVerificationInfo)throw new I("internal-error");if(!t.phoneVerificationInfo.sessionInfo)throw new I("missing-verification-id");if(!t.phoneVerificationInfo.code)throw new I("missing-verification-code")}function _s(t){if(!t.requestUri||!t.sessionId&&!t.postBody&&!t.pendingToken)throw new I("internal-error")}function Es(t,e){return e.oauthIdToken&&e.providerId&&0==e.providerId.indexOf("oidc.")&&!e.pendingToken&&(t.sessionId?e.nonce=t.sessionId:t.postBody&&(er(t=new $n(t.postBody),"nonce")&&(e.nonce=t.get("nonce")))),e}function Os(t){var e=null;if(t.needConfirmation?(t.code="account-exists-with-different-credential",e=Xo(t)):"FEDERATED_USER_ID_ALREADY_LINKED"==t.errorMessage?(t.code="credential-already-in-use",e=Xo(t)):"EMAIL_EXISTS"==t.errorMessage?(t.code="email-already-in-use",e=Xo(t)):t.errorMessage&&(e=uu(t.errorMessage)),e)throw e;ys(t)}function Ts(t,e){return e.returnIdpCredential=!0,su(t,Js,e)}function Ss(t,e){return e.returnIdpCredential=!0,su(t,tu,e)}function ks(t,e){return e.returnIdpCredential=!0,e.autoCreate=!1,su(t,Zs,e)}function Is(t){if(!t.oobCode)throw new I("invalid-action-code")}(n=ts.prototype).Db=function(t,e){var n={idToken:t},r=[];return pt(bs,(function(t,i){var o=e[i];null===o?r.push(t):i in e&&(n[i]=o)})),r.length&&(n.deleteAttribute=r),su(this,Ys,n)},n.vb=function(t,e){return gt(t={requestType:"PASSWORD_RESET",email:t},e),su(this,qs,t)},n.wb=function(t,e){return gt(t={requestType:"EMAIL_SIGNIN",email:t},e),su(this,Us,t)},n.ub=function(t,e){return gt(t={requestType:"VERIFY_EMAIL",idToken:t},e),su(this,Vs,t)},n.Eb=function(t,e,n){return gt(t={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:t,newEmail:e},n),su(this,Bs,t)},n.fb=function(t){return su(this,ru,t)},n.nb=function(t,e){return su(this,Hs,{oobCode:t,newPassword:e})},n.Ra=function(t){return su(this,Ns,{oobCode:t})},n.jb=function(t){return su(this,Cs,{oobCode:t})};var Cs={endpoint:"setAccountInfo",A:Is,Z:"email",B:!0},Ns={endpoint:"resetPassword",A:Is,G:function(t){var e=t.requestType;if(!e||!t.email&&"EMAIL_SIGNIN"!=e&&"VERIFY_AND_CHANGE_EMAIL"!=e)throw new I("internal-error")},B:!0},xs={endpoint:"signupNewUser",A:function(t){if(vs(t),!t.password)throw new I("weak-password")},G:ys,V:!0,B:!0},Ps={endpoint:"createAuthUri",B:!0},js={endpoint:"deleteAccount",N:["idToken"]},As={endpoint:"setAccountInfo",N:["idToken","deleteProvider"],A:function(t){if(!Array.isArray(t.deleteProvider))throw new I("internal-error")}},Ds={endpoint:"emailLinkSignin",N:["email","oobCode"],A:vs,G:ys,V:!0,B:!0},Rs={endpoint:"emailLinkSignin",N:["idToken","email","oobCode"],A:vs,G:ys,V:!0},Ms={endpoint:"accounts/mfaEnrollment:finalize",N:["idToken","phoneVerificationInfo"],A:ws,G:ys,B:!0,Na:!0},Ls={endpoint:"accounts/mfaSignIn:finalize",N:["mfaPendingCredential","phoneVerificationInfo"],A:ws,G:ys,B:!0,Na:!0},Fs={endpoint:"getAccountInfo"},Us={endpoint:"getOobConfirmationCode",N:["requestType"],A:function(t){if("EMAIL_SIGNIN"!=t.requestType)throw new I("internal-error");vs(t)},Z:"email",B:!0},Vs={endpoint:"getOobConfirmationCode",N:["idToken","requestType"],A:function(t){if("VERIFY_EMAIL"!=t.requestType)throw new I("internal-error")},Z:"email",B:!0},Bs={endpoint:"getOobConfirmationCode",N:["idToken","newEmail","requestType"],A:function(t){if("VERIFY_AND_CHANGE_EMAIL"!=t.requestType)throw new I("internal-error")},Z:"email",B:!0},qs={endpoint:"getOobConfirmationCode",N:["requestType"],A:function(t){if("PASSWORD_RESET"!=t.requestType)throw new I("internal-error");vs(t)},Z:"email",B:!0},zs={lb:!0,endpoint:"getProjectConfig",Ub:"GET"},Ws={lb:!0,endpoint:"getRecaptchaParam",Ub:"GET",G:function(t){if(!t.recaptchaSiteKey)throw new I("internal-error")}},Hs={endpoint:"resetPassword",A:Is,Z:"email",B:!0},Gs={endpoint:"sendVerificationCode",N:["phoneNumber","recaptchaToken"],Z:"sessionInfo",B:!0},Ys={endpoint:"setAccountInfo",N:["idToken"],A:ms,V:!0},Ks={endpoint:"setAccountInfo",N:["idToken"],A:function(t){if(ms(t),!t.password)throw new I("weak-password")},G:ys,V:!0},Qs={endpoint:"signupNewUser",G:ys,V:!0,B:!0},Xs={endpoint:"accounts/mfaEnrollment:start",N:["idToken","phoneEnrollmentInfo"],A:function(t){if(!t.phone
2EnrollmentInfo)throw new I("internal-error");if(!t.phoneEnrollmentInfo.phoneNumber)throw new I("missing-phone-number");if(!t.phoneEnrollmentInfo.recaptchaToken)throw new I("missing-app-credential")},G:function(t){if(!t.phoneSessionInfo||!t.phoneSessionInfo.sessionInfo)throw new I("internal-error")},B:!0,Na:!0},$s={endpoint:"accounts/mfaSignIn:start",N:["mfaPendingCredential","mfaEnrollmentId","phoneSignInInfo"],A:function(t){if(!t.phoneSignInInfo||!t.phoneSignInInfo.recaptchaToken)throw new I("missing-app-credential")},G:function(t){if(!t.phoneResponseInfo||!t.phoneResponseInfo.sessionInfo)throw new I("internal-error")},B:!0,Na:!0},Js={endpoint:"verifyAssertion",A:_s,Ya:Es,G:Os,V:!0,B:!0},Zs={endpoint:"verifyAssertion",A:_s,Ya:Es,G:function(t){if(t.errorMessage&&"USER_NOT_FOUND"==t.errorMessage)throw new I("user-not-found");if(t.errorMessage)throw uu(t.errorMessage);ys(t)},V:!0,B:!0},tu={endpoint:"verifyAssertion",A:function(t){if(_s(t),!t.idToken)throw new I("internal-error")},Ya:Es,G:Os,V:!0},eu={endpoint:"verifyCustomToken",A:function(t){if(!t.token)throw new I("invalid-custom-token")},G:ys,V:!0,B:!0},nu={endpoint:"verifyPassword",A:function(t){if(vs(t),!t.password)throw new I("wrong-password")},G:ys,V:!0,B:!0},ru={endpoint:"verifyPhoneNumber",A:gs,G:ys,B:!0},iu={endpoint:"verifyPhoneNumber",A:function(t){if(!t.idToken)throw new I("internal-error");gs(t)},G:function(t){if(t.temporaryProof)throw t.code="credential-already-in-use",Xo(t);ys(t)}},ou={Hb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",A:gs,G:ys,B:!0},au={endpoint:"accounts/mfaEnrollment:withdraw",N:["idToken","mfaEnrollmentId"],G:function(t){if(!!t[ns]^!!t.refreshToken)throw new I("internal-error")},B:!0,Na:!0};function su(t,e,n){if(!function(t,e){if(!e||!e.length)return!0;if(!t)return!1;for(var n=0;n<e.length;n++){var r=t[e[n]];if(void 0===r||null===r||""===r)return!1}return!0}(n,e.N))return xe(new I("internal-error"));var r,i=!!e.Na,o=e.Ub||"POST";return Ne(n).then(e.A).then((function(){return e.V&&(n.returnSecureToken=!0),e.B&&t.b&&"undefined"===typeof n.tenantId&&(n.tenantId=t.b),ps(t,i?t.i:t.h,e.endpoint,o,n,e.Hb,e.lb||!1)})).then((function(t){return r=t,e.Ya?e.Ya(n,r):r})).then(e.G).then((function(){if(!e.Z)return r;if(!(e.Z in r))throw new I("internal-error");return r[e.Z]}))}function uu(t){return cu({error:{errors:[{message:t}],code:400,message:t}})}function cu(t,e){var n=(t.error&&t.error.errors&&t.error.errors[0]||{}).reason||"",r={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(n=r[n]?new I(r[n]):null)return n;for(var i in n=t.error&&t.error.message||"",gt(r={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_OR_INVALID_
2NONCE:"missing-or-invalid-nonce",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",INVALID_PROVIDER_ID:"invalid-provider-id",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",REJECTED_CREDENTIAL:"rejected-credential",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_DYNAMIC_LINK_DOMAIN:"invalid-dynamic-link-domain",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash",UNSUPPORTED_TENANT_OPERATION:"unsupported-tenant-operation",INVALID_TENANT_ID:"invalid-tenant-id",TENANT_ID_MISMATCH:"tenant-id-mismatch",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",EMAIL_CHANGE_NEEDS_VERIFICATION:"email-change-needs-verification",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",UNSUPPORTED_FIRST_FACTOR:"unsupported-first-factor",UNVERIFIED_EMAIL:"unverified-email"},e||{}),e=(e=n.match(/^[^\s]+\s*:\s*([\s\S]*)$/))&&1<e.length?e[1]:void 0,r)if(0===n.indexOf(i))return new I(r[i],e);return!e&&t&&(e=Fr(t)),new I("internal-error",e)}function lu(t){this.b=t,this.a=null,this.rb=function(t){return(pu||(pu=new Ee((function(t,e){function n(){zr(),jr("gapi.load")("gapi.iframes",{callback:t,ontimeout:function(){zr(),e(Error("Network Error"))},timeout:hu.get()})}if(jr("gapi.iframes.Iframe"))t();else if(jr("gapi.load"))n();else{var r="__iframefcb"+Math.floor(1e6*Math.random()).toString();u[r]=function(){jr("gapi.load")?n():e(Error("Network Error"))},Ne(Ya(r=Ct(fu,{onload:r}))).o((function(){e(Error("Network Error"))}))}})).o((function(t){throw pu=null,t})))).then((function(){return new Ee((function(e,n){jr("gapi.iframes.getContext")().open({where:document.body,url:t.b,messageHandlersFilter:jr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},(function(r){function i(){clearTimeout(o),e()}t.a=r,t.a.restyle({setHideOnLeave:!1});var o=setTimeout((function(){n(Error("Network Error"))}),du.get());r.ping(i).then(i,(function(){n(Error("Network Error"))}))}))}))}))}(this)}var fu=new wt(Tt,"https://apis.google.com/js/api.js?onload=%{onload}"),hu=new Wr(3e4,6e4),du=new Wr(5e3,15e3),pu=null;function vu(t,e,n,r){this.l=t,this.h=e,this.i=n,this.g=r,this.f=null,this.g?t=qn((t=Bn(this.g.url)).c,t.a,t.g,"/emulator/auth/iframe"):t=qn("https",this.l,null,"/__/auth/iframe"),this.a=t,Un(this.a,"apiKey",this.h),Un(this.a,"appName",this.i),this.b=null,this.c=[]}function mu(t,e,n,r,i,o){this.u=t,this.s=e,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 yu(t){try{return e.a.app(t).auth().Ga()}catch(n){return[]}}function gu(t,e,n,r,i,o){this.s=t,this.g=e,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(t){var e=hr();return function(t){return su(t,zs,{}).then((function(t){return t.authorizedDomains||[]}))}(t).then((function(t){t:{var n=Bn(e),r=n.c;n=n.a;for(var i=0;i<t.length;i++){var o=t[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:gr.test(o)?a=a==o:(o=o.split(".").join("\\."),a=new RegExp("^(.+\\."+o+"|"+o+")$","i").test(a)),a){t=!0;break t}}t=!1}if(!t)throw new Ko(hr())}))}function wu(t){return t.m||(t.m=wr().then((function(){if(!t.u){var e=t.c,n=t.i,r=yu(t.b),i=new vu(t.s,t.g,t.b,t.f);i.f=e,i.b=n,i.c=Z(r||[]),t.u=i.toString()}t.v=new lu(t.u),function(t){if(!t.v)throw Error("IfcHandler must be initialized!");!function(t,e){t.rb.then((function(){t.a.register("authEvent",e,jr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}(t.v,(function(e){var n={};if(e&&e.authEvent){var r=!1;for(e=Wo(e.authEvent),n=0;n<t.h.length;n++)r=t.h[n](e)||r;return(n={}).status=r?"ACK":"ERROR",Ne(n)}return n.status="ERROR",Ne(n)}))}(t)}))),t.m}function _u(t){return t.l||(t.C=t.c?xr(t.c,yu(t.b)):null,t.l=new ts(t.g,A(t.i),t.C),t.f&&us(t.l,t.f)),t.l}function Eu(t,e,n,r,i,o,a,s,u,c,l,f){return(t=new mu(t,e,n,r,i,f)).l=o,t.g=a,t.i=s,t.b=mt(u||null),t.f=c,t.yb(l).toString()}function Ou(t){if(this.a=t||e.a.INTERNAL.reactNative&&e.a.INTERNAL.reactNative.AsyncStorage,!this.a)throw new I("internal-error","The React Native compatibility library was not found.");this.type="asyncStorage"}function Tu(t){this.b=t,this.a={},this.f=E(this.c,this)}vu.prototype.toString=function(){return this.f?Un(this.a,"v",this.f):tr(this.a.b,"v"),this.b?Un(this.a,"eid",this.b):tr(this.a.b,"eid"),this.c.length?Un(this.a,"fw",this.c.join(",")):tr(this.a.b,"fw"),this.a.toString()},mu.prototype.yb=function(t){return this.h=t,this},mu.prototype.toString=function(){if(this.v){var t=Bn(this.v.url);t=qn(t.c,t.a,t.g,"/emulator/auth/handler")}else t=qn("https",this.u,null,"/__/auth/handler");if(Un(t,"apiKey",this.s),Un(t,"appName",this.c),Un(t,"authType",this.m),this.a.isOAuthProvider){var n=this.a;try{var r=e.a.app(this.c).auth().la()}catch(u){r=null}for(var i in n.ob=r,Un(t,"providerId",this.a.providerId),n=Ur((r=this.a).Ib))n[i]=n[i].toString();i=r.Qc,n=mt(n);for(var o=0;o<i.length;o++){var a=i[o];a in n&&delete n[a]}r.pb&&r.ob&&!n[r.pb]&&(n[r.pb]=r.ob),vt(n)||Un(t,"customParameters",Fr(n))}if("function"===typeof this.a.Qb&&((r=this.a.Qb()).length&&Un(t,"scopes",r.join(","))),this.l?Un(t,"redirectUrl",this.l):tr(t.b,"redirectUrl"),this.g?Un(t,"eventId",this.g):tr(t.b,"eventId"),this.i?Un(t,"v",this.i):tr(t.b,"v"),this.b)for(var s in this.b)this.b.hasOwnProperty(s)&&!Vn(t,s)&&Un(t,s,this.b[s]);return this.h?Un(t,"tid",this.h):tr(t.b,"tid"),this.f?Un(t,"eid",this.f):tr(t.b,"eid"),(s=yu(this.c)).length&&Un(t,"fw",s.join(",")),t.toString()},(n=gu.prototype).Ob=function(t,e,n){var r=new I("popup-closed-by-user"),i=new I("web-storage-unsupported"),o=this,a=!1;return this.ma().then((function(){(function(t){var e={type:"webStorageSupport"};return wu(t).then((function(){return function(t,e){return t.rb.then((function(){return new Ee((function(n){t.a.send(e.type,e,n,jr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}))}(t.v,e)})).then((function(t){if(t&&t.length&&"undefined"!==typeof t[0].webStorageSupport)return t[0].webStorageSupport;throw Error()}))})(o).then((function(n){n||(t&&mr(t),e(i),a=!0)}))})).o((function(){})).then((function(){if(!a)return function(t){return new Ee((function(e){return function n(){Cn(2e3).then((function(){if(t&&!t.closed)return n();e()}
2))}()}))}(t)})).then((function(){if(!a)return Cn(n).then((function(){e(r)}))}))},n.Xb=function(){var t=Pr();return!Lr(t)&&!qr(t)},n.Tb=function(){return!1},n.Mb=function(t,e,n,r,i,o,a,s){if(!t)return xe(new I("popup-blocked"));if(a&&!Lr())return this.ma().o((function(e){mr(t),i(e)})),r(),Ne();this.a||(this.a=bu(_u(this)));var u=this;return this.a.then((function(){var e=u.ma().o((function(e){throw mr(t),i(e),e}));return r(),e})).then((function(){(qo(n),a)||dr(Eu(u.s,u.g,u.b,e,n,null,o,u.c,void 0,u.i,s,u.f),t)})).o((function(t){throw"auth/network-request-failed"==t.code&&(u.a=null),t}))},n.Nb=function(t,e,n,r){this.a||(this.a=bu(_u(this)));var i=this;return this.a.then((function(){qo(e),dr(Eu(i.s,i.g,i.b,t,e,hr(),n,i.c,void 0,i.i,r,i.f))})).o((function(t){throw"auth/network-request-failed"==t.code&&(i.a=null),t}))},n.ma=function(){var t=this;return wu(this).then((function(){return t.v.rb})).o((function(){throw t.a=null,new I("network-request-failed")}))},n.$b=function(){return!0},n.Ea=function(t){this.h.push(t)},n.Sa=function(t){$(this.h,(function(e){return e==t}))},(n=Ou.prototype).get=function(t){return Ne(this.a.getItem(t)).then((function(t){return t&&Vr(t)}))},n.set=function(t,e){return Ne(this.a.setItem(t,Fr(e)))},n.U=function(t){return Ne(this.a.removeItem(t))},n.ca=function(){},n.ia=function(){};var Su,ku=[];function Iu(t,e,n){vt(t.a)&&t.b.addEventListener("message",t.f),"undefined"===typeof t.a[e]&&(t.a[e]=[]),t.a[e].push(n)}function Cu(t){this.a=t}function Nu(t){this.c=t,this.b=!1,this.a=[]}function xu(t,e,n,r){var i,o,a,s,u=n||{},c=null;if(t.b)return xe(Error("connection_unavailable"));var l=r?800:50,f="undefined"!==typeof MessageChannel?new MessageChannel:null;return new Ee((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(t){t.data.eventId===i&&("ack"===t.data.status?(clearTimeout(a),s=setTimeout((function(){r(Error("timeout"))}),3e3)):"done"===t.data.status?(clearTimeout(s),"undefined"!==typeof t.data.response?n(t.data.response):r(Error("unknown_error"))):(clearTimeout(a),clearTimeout(s),r(Error("invalid_response"))))}},t.a.push(c),f.port1.addEventListener("message",o),t.c.postMessage({eventType:e,eventId:i,data:u},[f.port2])):r(Error("connection_unavailable"))})).then((function(e){return Pu(t,c),e})).o((function(e){throw Pu(t,c),e}))}function Pu(t,e){if(e){var n=e.messageChannel,r=e.onMessage;n&&(n.port1.removeEventListener("message",r),n.port1.close()),$(t.a,(function(t){return t==e}))}}function ju(){if(!Mu())throw new I("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 t=this;Or()&&self?(this.v=function(){var t=Or()?self:null;if(H(ku,(function(n){n.b==t&&(e=n)})),!e){var e=new Tu(t);ku.push(e)}return e}(),Iu(this.v,"keyChanged",(function(e,n){return Bu(t).then((function(e){return 0<e.length&&H(t.a,(function(t){t(e)})),{keyProcessed:Q(e,n.key)}}))})),Iu(this.v,"ping",(function(){return Ne(["keyChanged"])}))):function(){var t=u.navigator;return t&&t.serviceWorker?Ne().then((function(){return t.serviceWorker.ready})).then((function(t){return t.active||null})).o((function(){return null})):Ne(null)}().then((function(e){(t.h=e)&&(t.g=new Nu(new Cu(e)),xu(t.g,"ping",null,!0).then((function(e){e[0].fulfilled&&Q(e[0].value,"keyChanged")&&(t.s=!0)})).o((function(){})))}))}function Au(t){return new Ee((function(e,n){var r=t.m.open("firebaseLocalStorageDb",1);r.onerror=function(t){try{t.preventDefault()}catch(e){}n(Error(t.target.error))},r.onupgradeneeded=function(t){t=t.target.result;try{t.createObjectStore("firebaseLocalStorage",{keyPath:"fbase_key"})}catch(e){n(e)}},r.onsuccess=function(r){(r=r.target.result).objectStoreNames.contains("firebaseLocalStorage")?e(r):function(t){return new Ee((function(e,n){var r=t.m.deleteDatabase("firebaseLocalStorageDb");r.onsuccess=function(){e()},r.onerror=function(t){n(Error(t.target.error))}}))}(t).then((function(){return Au(t)})).then((function(t){e(t)})).o((function(t){n(t)}))}}))}function Du(t){return t.i||(t.i=Au(t)),t.i}function Ru(t,e){var n=0;return new Ee((function r(i,o){Du(t).then(e).then(i).o((function(e){if(!(3<++n))return Du(t).then((function(e){return e.close(),t.i=void 0,r(i,o)})).o((function(t){o(t)}));o(e)}))}))}function Mu(){try{return!!u.indexedDB}catch(ha){return!1}}function Lu(t){return t.objectStore("firebaseLocalStorage")}function Fu(t,e){return t.transaction(["firebaseLocalStorage"],e?"readwrite":"readonly")}function Uu(t){return new Ee((function(e,n){t.onsuccess=function(t){t&&t.target?e(t.target.result):e()},t.onerror=function(t){n(t.target.error)}}))}function Vu(t,e){return t.g&&t.h&&function(){var t=u.navigator;return t&&t.serviceWorker&&t.serviceWorker.controller||null}()===t.h?xu(t.g,"keyChanged",{key:e},t.s).then((function(){})).o((function(){})):Ne()}function Bu(t){return Du(t).then((function(t){var e=Lu(Fu(t,!1));return e.getAll?Uu(e.getAll()):new Ee((function(t,n){var r=[],i=e.openCursor();i.onsuccess=function(e){(e=e.target.result)?(r.push(e.value),e.continue()):t(r)},i.onerror=function(t){n(t.target.error)}}))})).then((function(e){var n={},r=[];if(0==t.b){for(r=0;r<e.length;r++)n[e[r].fbase_key]=e[r].value;r=pr(t.c,n),t.c=n}return r}))}function qu(t){t.l&&t.l.cancel("STOP_EVENT"),t.f&&(clearTimeout(t.f),t.f=null)}function zu(t){var e=this,n=null;this.a=[],this.type="indexedDB",this.c=t,this.b=Ne().then((function(){if(Mu()){var t=Br(),r="__sak"+t;return Su||(Su=new ju),(n=Su).set(r,t).then((function(){return n.get(r)})).then((function(e){if(e!==t)throw Error("indexedDB not supported!");return n.U(r)})).then((function(){return n})).o((function(){return e.c}))}return e.c})).then((function(t){return e.type=t.type,t.ca((function(t){H(e.a,(function(e){e(t)}))}
2)),t}))}function Wu(){this.a={},this.type="inMemory"}function Hu(){if(!function(){var t="Node"==Tr();if(!(t=Gu()||t&&e.a.INTERNAL.node&&e.a.INTERNAL.node.localStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(n){return!1}}()){if("Node"==Tr())throw new I("internal-error","The LocalStorage compatibility library was not found.");throw new I("web-storage-unsupported")}this.a=Gu()||e.a.INTERNAL.node.localStorage,this.type="localStorage"}function Gu(){try{var t=u.localStorage,e=Br();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(n){return null}}function Yu(){this.type="nullStorage"}function Ku(){if(!function(){var t="Node"==Tr();if(!(t=Qu()||t&&e.a.INTERNAL.node&&e.a.INTERNAL.node.sessionStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(n){return!1}}()){if("Node"==Tr())throw new I("internal-error","The SessionStorage compatibility library was not found.");throw new I("web-storage-unsupported")}this.a=Qu()||e.a.INTERNAL.node.sessionStorage,this.type="sessionStorage"}function Qu(){try{var t=u.sessionStorage,e=Br();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(n){return null}}function Xu(){var t={};t.Browser=Zu,t.Node=tc,t.ReactNative=ec,t.Worker=nc,this.a=t[Tr()]}Tu.prototype.c=function(t){var e=t.data.eventType,n=t.data.eventId,r=this.a[e];if(r&&0<r.length){t.ports[0].postMessage({status:"ack",eventId:n,eventType:e,response:null});var i=[];H(r,(function(e){i.push(Ne().then((function(){return e(t.origin,t.data.data)})))})),je(i).then((function(r){var i=[];H(r,(function(t){i.push({fulfilled:t.Pb,value:t.value,reason:t.reason?t.reason.message:void 0})})),H(i,(function(t){for(var e in t)"undefined"===typeof t[e]&&delete t[e]})),t.ports[0].postMessage({status:"done",eventId:n,eventType:e,response:i})}))}},Cu.prototype.postMessage=function(t,e){this.a.postMessage(t,e)},Nu.prototype.close=function(){for(;0<this.a.length;)Pu(this,this.a[0]);this.b=!0},(n=ju.prototype).set=function(t,e){var n=this,r=!1;return Ru(this,(function(e){return Uu((e=Lu(Fu(e,!0))).get(t))})).then((function(i){return Ru(n,(function(o){if(o=Lu(Fu(o,!0)),i)return i.value=e,Uu(o.put(i));n.b++,r=!0;var a={};return a.fbase_key=t,a.value=e,Uu(o.add(a))}))})).then((function(){return n.c[t]=e,Vu(n,t)})).oa((function(){r&&n.b--}))},n.get=function(t){return Ru(this,(function(e){return Uu(Lu(Fu(e,!1)).get(t))})).then((function(t){return t&&t.value}))},n.U=function(t){var e=this,n=!1;return Ru(this,(function(r){return n=!0,e.b++,Uu(Lu(Fu(r,!0)).delete(t))})).then((function(){return delete e.c[t],Vu(e,t)})).oa((function(){n&&e.b--}))},n.ca=function(t){0==this.a.length&&function(t){function e(){t.f=setTimeout((function(){t.l=Bu(t).then((function(e){0<e.length&&H(t.a,(function(t){t(e)}))})).then((function(){e()})).o((function(t){"STOP_EVENT"!=t.message&&e()}))}),800)}qu(t),e()}(this),this.a.push(t)},n.ia=function(t){$(this.a,(function(e){return e==t})),0==this.a.length&&qu(this)},(n=zu.prototype).get=function(t){return this.b.then((function(e){return e.get(t)}))},n.set=function(t,e){return this.b.then((function(n){return n.set(t,e)}))},n.U=function(t){return this.b.then((function(e){return e.U(t)}))},n.ca=function(t){this.a.push(t)},n.ia=function(t){$(this.a,(function(e){return e==t}))},(n=Wu.prototype).get=function(t){return Ne(this.a[t])},n.set=function(t,e){return this.a[t]=e,Ne()},n.U=function(t){return delete this.a[t],Ne()},n.ca=function(){},n.ia=function(){},(n=Hu.prototype).get=function(t){var e=this;return Ne().then((function(){return Vr(e.a.getItem(t))}))},n.set=function(t,e){var n=this;return Ne().then((function(){var r=Fr(e);null===r?n.U(t):n.a.setItem(t,r)}))},n.U=function(t){var e=this;return Ne().then((function(){e.a.removeItem(t)}))},n.ca=function(t){u.window&&fn(u.window,"storage",t)},n.ia=function(t){u.window&&pn(u.window,"storage",t)},(n=Yu.prototype).get=function(){return Ne(null)},n.set=function(){return Ne()},n.U=function(){return Ne()},n.ca=function(){},n.ia=function(){},(n=Ku.prototype).get=function(t){var e=this;return Ne().then((function(){return Vr(e.a.getItem(t))}))},n.set=function(t,e){var n=this;return Ne().then((function(){var r=Fr(e);null===r?n.U(t):n.a.setItem(t,r)}))},n.U=function(t){var e=this;return Ne().then((function(){e.a.removeItem(t)}))},n.ca=function(){},n.ia=function(){};var $u,Ju,Zu={F:Hu,bb:Ku},tc={F:Hu,bb:Ku},ec={F:Ou,bb:Yu},nc={F:Hu,bb:Yu},rc={rd:"local",NONE:"none",td:"session"};function ic(){var t=!(qr(Pr())||!Er()),e=Lr(),n=Ar();this.m=t,this.h=e,this.l=n,this.a={},$u||($u=new Xu),t=$u;try{this.g=!fr()&&Yr()||!u.indexedDB?new t.a.F:new zu(Or()?new Wu:new t.a.F)}catch(r){this.g=new Wu,this.h=!0}try{this.i=new t.a.bb}catch(r){this.i=new Wu}this.v=new Wu,this.f=E(this.Yb,this),this.b={}}function oc(){return Ju||(Ju=new ic),Ju}function ac(t,e){switch(e){case"session":return t.i;case"none":return t.v;default:return t.g}}function sc(t,e){return"firebase:"+t.name+(e?":"+e:"")}function uc(t,e,n){return n=sc(e,n),"local"==e.F&&(t.b[n]=null),ac(t,e.F).U(n)}function cc(t){t.c&&(clearInterval(t.c),t.c=null)}function lc(t){this.a=t,this.b=oc()}(n=ic.prototype).get=function(t,e){return ac(this,t.F).get(sc(t,e))},n.set=function(t,e,n){var r=sc(t,n),i=this,o=ac(this,t.F);return o.set(r,e).then((function(){return o.get(r)})).then((function(e){"local"==t.F&&(i.b[r]=e)}))},n.addListener=function(t,e,n){t=sc(t,e),this.l&&(this.b[t]=u.localStorage.getItem(t)),vt(this.a)&&(ac(this,"local").ca(this.f),this.h||(fr()||!Yr())&&u.indexedDB||!this.l||function(t){cc(t),t.c=setInterval((function(){for(var e in t.a){var n=u.localStorage.getItem(e),r=t.b[e];n!=r&&(t.b[e]=n,n=new Ze({type:"storage",key:e,target:window,oldValue:r,newValue:n,a:!0}),t.Yb(n))}}),1e3)}(this)),this.a[t]||(this.a[t]=[]),this.a[t].push(n)},n.removeListener=function(t,e,n){t=sc(t,e),this.a[t]&&($(this.a[t],(function(t){return t==n})),0==this.a[t].length&&delete this.a[t]),vt(this.a)&&(ac(this,"local").ia(this.f),cc(this))},n.Yb=function(t){if(t&&t.g){var e=t.a.key;if(null==e)for(var n in this.a){var r=this.b[n];"undefined"===typeof r&&(r=null);var i=u.localStorage.getItem(n);i!==r&&(this.b[n]=i,this.mb(n))}else if(0==e.indexOf("firebase:")&&this.a[e]){if("undefined"!==typeof t.a.a?ac(this,"local").ia(this.f):cc(this),this.m)if(n=u.localStorage.getItem(e),(r=t.a.newValue)!==n)null!==r?u.localStorage.setItem(e,r):u.localStorage.removeItem(e);else if(this.b[e]===r&&"undefined"===typeof t.a.a)return;var o=this;n=function(){"undefined"===typeof t.a.a&&o.b[e]===u.localStorage.getItem(e)||(o.b[e]=u.localStorage.getItem(e),o.mb(e))},Qt&&ue&&10==ue&&u.localStorage.getItem(e)!==t.a.newValue&&t.a.newValue!==t.a.oldValue?setTimeout(n,10):n()}}else H(t,E(this.mb,this))},n.mb=function(t){this.a[t]&&H(this.a[t],(function(t){t()}))};var fc,hc={name:"authEvent",F:"local"};function dc(){this.a=oc()}function pc(t,e){this.b=vc,this.f=u.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=t,this.h=e,this.l=u.Int32Array?new Int32Array(64):Array(64),void 0===fc&&(fc=u.Int32Array?new Int32Array(Ec):Ec),this.reset()}S(pc,(function(){this.b=-1}));for(var vc=64,mc=vc-1,yc=[],gc=0;gc<mc;gc++)yc[gc]=0;var bc=J(128,yc);function wc(t){for(var e=t.f,n=t.l,r=0,i=0;i<e.length;)n[r++]=e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3],i=4*r;for(e=16;64>e;e++){i=0|n[e-15],r=0|n[e-2];var o=(0|n[e-16])+((i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3)|0,a=(0|n[e-7])+((r>>>17|r<<15)^(r>>
2>19|r<<13)^r>>>10)|0;n[e]=o+a|0}r=0|t.a[0],i=0|t.a[1];var s=0|t.a[2],u=0|t.a[3],c=0|t.a[4],l=0|t.a[5],f=0|t.a[6];for(o=0|t.a[7],e=0;64>e;e++){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[e])|0)+(0|n[e])|0)|0,o=f,f=l,l=c,c=u+a|0,u=s,s=i,i=r,r=a+h|0}t.a[0]=t.a[0]+r|0,t.a[1]=t.a[1]+i|0,t.a[2]=t.a[2]+s|0,t.a[3]=t.a[3]+u|0,t.a[4]=t.a[4]+c|0,t.a[5]=t.a[5]+l|0,t.a[6]=t.a[6]+f|0,t.a[7]=t.a[7]+o|0}function _c(t,e,n){void 0===n&&(n=e.length);var r=0,i=t.c;if("string"===typeof e)for(;r<n;)t.f[i++]=e.charCodeAt(r++),i==t.b&&(wc(t),i=0);else{if(!p(e))throw Error("message must be string or array");for(;r<n;){var o=e[r++];if(!("number"==typeof o&&0<=o&&255>=o&&o==(0|o)))throw Error("message must be a byte array");t.f[i++]=o,i==t.b&&(wc(t),i=0)}}t.c=i,t.g+=n}pc.prototype.reset=function(){this.g=this.c=0,this.a=u.Int32Array?new Int32Array(this.h):Z(this.h)};var Ec=[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 Oc(){pc.call(this,8,Tc)}S(Oc,pc);var Tc=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function Sc(t,e,n,r,i,o){this.v=t,this.i=e,this.l=n,this.m=r||null,this.u=i||null,this.s=o,this.h=e+":"+n,this.C=new dc,this.g=new lc(this.h),this.f=null,this.b=[],this.a=this.c=null}function kc(t){return new I("invalid-cordova-configuration",t)}function Ic(t){var e=new Oc;_c(e,t),t=[];var n=8*e.g;56>e.c?_c(e,bc,56-e.c):_c(e,bc,e.b-(e.c-56));for(var r=63;56<=r;r--)e.f[r]=255&n,n/=256;for(wc(e),r=n=0;r<e.i;r++)for(var i=24;0<=i;i-=8)t[n++]=e.a[r]>>i&255;return function(t){return Y(t,(function(t){return 1<(t=t.toString(16)).length?t:"0"+t})).join("")}(t)}function Cc(t,e){for(var n=0;n<t.b.length;n++)try{t.b[n](e)}catch(r){}}function Nc(t){return t.f||(t.f=t.ma().then((function(){return new Ee((function(e){t.Ea((function n(r){return e(r),t.Sa(n),!1})),function(t){function e(e){r=!0,i&&i.cancel(),xc(t).then((function(r){var i=n;if(r&&e&&e.url){var o=null;-1!=(i=so(e.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(t,i)}))}var n=new zo("unknown",null,null,null,new I("no-auth-event")),r=!1,i=Cn(500).then((function(){return xc(t).then((function(){r||Cc(t,n)}))})),o=u.handleOpenURL;u.handleOpenURL=function(t){if(0==t.toLowerCase().indexOf(jr("BuildInfo.packageName",u).toLowerCase()+"://")&&e({url:t}),"function"===typeof o)try{o(t)}catch(n){console.error(n)}},Yo||(Yo=new Ho),function(t){var e=Yo;e.a.push(t),e.b||(e.b=function(t){for(var n=0;n<e.a.length;n++)e.a[n](t)},"function"===typeof(t=jr("universalLinks.subscribe",u))&&t(null,e.b))}(e)}(t)}))}))),t.f}function xc(t){var e=null;return function(t){return t.b.get(hc,t.a).then((function(t){return Wo(t)}))}(t.g).then((function(n){return e=n,uc((n=t.g).b,hc,n.a)})).then((function(){return e}))}function Pc(t){this.a=t,this.b=oc()}(n=Sc.prototype).ma=function(){return this.Ia?this.Ia:this.Ia=(_r(void 0)?wr().then((function(){return new Ee((function(t,e){var n=u.document,r=setTimeout((function(){e(Error("Cordova framework is not ready."))}),1e3);n.addEventListener("deviceready",(function(){clearTimeout(r),t()}),!1)}))})):xe(Error("Cordova must run in an Android or iOS file scheme."))).then((function(){if("function"!==typeof jr("universalLinks.subscribe",u))throw kc("cordova-universal-links-plugin-fix is not installed");if("undefined"===typeof jr("BuildInfo.packageName",u))throw kc("cordova-plugin-buildinfo is not installed");if("function"!==typeof jr("cordova.plugins.browsertab.openUrl",u))throw kc("cordova-plugin-browsertab is not installed");if("function"!==typeof jr("cordova.InAppBrowser.open",u))throw kc("cordova-plugin-inappbrowser is not installed")}),(function(){throw new I("cordova-not-ready")}))}
2,n.Ob=function(t,e){return e(new I("operation-not-supported-in-this-environment")),Ne()},n.Mb=function(){return xe(new I("operation-not-supported-in-this-environment"))},n.$b=function(){return!1},n.Xb=function(){return!0},n.Tb=function(){return!0},n.Nb=function(t,e,n,r){if(this.c)return xe(new I("redirect-operation-pending"));var i=this,o=u.document,a=null,s=null,c=null,l=null;return this.c=Ne().then((function(){return qo(e),Nc(i)})).then((function(){return function(t,e,n,r,i){var o=function(){for(var t=20,e=[];0<t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}(),a=new zo(e,r,null,o,new I("no-auth-event"),null,i),s=jr("BuildInfo.packageName",u);if("string"!==typeof s)throw new I("invalid-cordova-configuration");var c=jr("BuildInfo.displayName",u),l={};if(Pr().toLowerCase().match(/iphone|ipad|ipod/))l.ibi=s;else{if(!Pr().toLowerCase().match(/android/))return xe(new I("operation-not-supported-in-this-environment"));l.apn=s}c&&(l.appDisplayName=c),o=Ic(o),l.sessionId=o;var f=Eu(t.v,t.i,t.l,e,n,null,r,t.m,l,t.u,i,t.s);return t.ma().then((function(){var e=t.h;return t.C.a.set(hc,a.w(),e)})).then((function(){var e=jr("cordova.plugins.browsertab.isAvailable",u);if("function"!==typeof e)throw new I("invalid-cordova-configuration");var n=null;e((function(e){if(e){if("function"!==typeof(n=jr("cordova.plugins.browsertab.openUrl",u)))throw new I("invalid-cordova-configuration");n(f)}else{if("function"!==typeof(n=jr("cordova.InAppBrowser.open",u)))throw new I("invalid-cordova-configuration");e=Pr(),t.a=n(f,e.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||e.match(/(iPad|iPhone|iPod).*OS 8_\d/i)?"_blank":"_system","location=yes")}}))}))}(i,t,e,n,r)})).then((function(){return new Ee((function(t,e){s=function(){var e=jr("cordova.plugins.browsertab.close",u);return t(),"function"===typeof e&&e(),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(){e(new I("redirect-cancelled-by-user"))})))},l=function(){Hr()&&c()},o.addEventListener("resume",c,!1),Pr().toLowerCase().match(/android/)||o.addEventListener("visibilitychange",l,!1)})).o((function(t){return xc(i).then((function(){throw t}))}))})).oa((function(){c&&o.removeEventListener("resume",c,!1),l&&o.removeEventListener("visibilitychange",l,!1),a&&a.cancel(),s&&i.Sa(s),i.c=null}))},n.Ea=function(t){this.b.push(t),Nc(this).o((function(e){"auth/invalid-cordova-configuration"===e.code&&(e=new zo("unknown",null,null,null,new I("no-auth-event")),t(e))}))},n.Sa=function(t){$(this.b,(function(e){return e==t}))};var jc={name:"pendingRedirect",F:"session"};function Ac(t){return uc(t.b,jc,t.a)}function Dc(t,e,n,r){this.i={},this.u=0,this.D=t,this.v=e,this.m=n,this.J=r,this.h=[],this.f=!1,this.l=E(this.s,this),this.b=new Qc,this.C=new tl,this.g=new Pc(Yc(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=Rc(this.D,this.v,this.m,N,this.J)}function Rc(t,n,r,i,o){var a=e.a.SDK_VERSION||null;return _r()?new Sc(t,n,r,a,i,o):new gu(t,n,r,a,i,o)}function Mc(t){t.f||(t.f=!0,t.a.Ea(t.l));var e=t.a;return t.a.ma().o((function(n){throw t.a==e&&t.reset(),n}))}function Lc(t){t.a.Xb()&&Mc(t).o((function(e){var n=new zo("unknown",null,null,null,new I("operation-not-supported-in-this-environment"));zc(e)&&t.s(n)})),t.a.Tb()||Xc(t.b)}function Fc(t,e){Q(t.h,e)||t.h.push(e),t.f||function(t){return t.b.get(jc,t.a).then((function(t){return"pending"==t}))}(t.g).then((function(e){e?Ac(t.g).then((function(){Mc(t).o((function(e){var n=new zo("unknown",null,null,null,new I("operation-not-supported-in-this-environment"));zc(e)&&t.s(n)}))})):Lc(t)})).o((function(){Lc(t)}))}function Uc(t,e){$(t.h,(function(t){return t==e}))}Dc.prototype.reset=function(){this.f=!1,this.a.Sa(this.l),this.a=Rc(this.D,this.v,this.m,null,this.J),this.i={}},Dc.prototype.s=function(t){if(!t)throw new I("invalid-auth-event");if(6e5<=T()-this.u&&(this.i={},this.u=0),t&&t.getUid()&&this.i.hasOwnProperty(t.getUid()))return!1;for(var e=!1,n=0;n<this.h.length;n++){var r=this.h[n];if(r.Fb(t.c,t.b)){(e=this.c[t.c])&&(e.h(t,r),t&&(t.f||t.b)&&(this.i[t.getUid()]=!0,this.u=T())),e=!0;break}}return Xc(this.b),e};var Vc=new Wr(2e3,1e4),Bc=new Wr(3e4,6e4);function qc(t,e,n,r,i,o,a){return t.a.Mb(e,n,r,(function(){t.f||(t.f
2=!0,t.a.Ea(t.l))}),(function(){t.reset()}),i,o,a)}function zc(t){return!(!t||"auth/cordova-not-ready"!=t.code)}function Wc(t,e,n,r,i){var o;return function(t){return t.b.set(jc,"pending",t.a)}(t.g).then((function(){return t.a.Nb(e,n,r,i).o((function(e){if(zc(e))throw new I("operation-not-supported-in-this-environment");return o=e,Ac(t.g).then((function(){throw o}))})).then((function(){return t.a.$b()?new Ee((function(){})):Ac(t.g).then((function(){return t.qa()})).then((function(){})).o((function(){}))}))}))}function Hc(t,e,n,r,i){return t.a.Ob(r,(function(t){e.na(n,null,t,i)}),Vc.get())}Dc.prototype.qa=function(){return this.b.qa()};var Gc={};function Yc(t,e,n){return t=t+":"+e,n&&(t=t+":"+n.url),t}function Kc(t,e,n,r){var i=Yc(e,n,r);return Gc[i]||(Gc[i]=new Dc(t,e,n,r)),Gc[i]}function Qc(){this.b=null,this.f=[],this.c=[],this.a=null,this.i=this.g=!1}function Xc(t){t.g||(t.g=!0,Zc(t,!1,null,null))}function $c(t){t.g&&!t.i&&Zc(t,!1,null,null)}function Jc(t,e){if(t.b=function(){return Ne(e)},t.f.length)for(var n=0;n<t.f.length;n++)t.f[n](e)}function Zc(t,e,n,r){e?r?function(t,e){if(t.b=function(){return xe(e)},t.c.length)for(var n=0;n<t.c.length;n++)t.c[n](e)}(t,r):Jc(t,n):Jc(t,{user:null}),t.f=[],t.c=[]}function tl(){}function el(){this.ib=!1,Object.defineProperty(this,"appVerificationDisabled",{get:function(){return this.ib},set:function(t){this.ib=t},enumerable:!1})}function nl(t,e){this.a=e,Jr(this,"verificationId",t)}function rl(t,e,n,r){return new Uo(t).fb(e,n).then((function(t){return new nl(t,r)}))}function il(t){var e=Yi(t);if(!(e&&e.exp&&e.auth_time&&e.iat))throw new I("internal-error","An internal error occurred. The token obtained by Firebase appears to be malformed. Please retry the operation.");Zr(this,{token:t,expirationTime:Gr(1e3*e.exp),authTime:Gr(1e3*e.auth_time),issuedAtTime:Gr(1e3*e.iat),signInProvider:e.firebase&&e.firebase.sign_in_provider?e.firebase.sign_in_provider:null,signInSecondFactor:e.firebase&&e.firebase.sign_in_second_factor?e.firebase.sign_in_second_factor:null,claims:e})}function ol(t,e,n){var r=e&&e[sl];if(!r)throw new I("argument-error","Internal assert: Invalid MultiFactorResolver");this.a=t,this.f=mt(e),this.g=n,this.c=new uo(null,r),this.b=[];var i=this;H(e[al]||[],(function(t){(t=ri(t))&&i.b.push(t)})),Jr(this,"auth",this.a),Jr(this,"session",this.c),Jr(this,"hints",this.b)}Qc.prototype.reset=function(){this.b=null,this.a&&(this.a.cancel(),this.a=null)},Qc.prototype.h=function(t,e){if(t){this.reset(),this.g=!0;var n=t.c,r=t.b,i=t.a&&"auth/web-storage-unsupported"==t.a.code,o=t.a&&"auth/operation-not-supported-in-this-environment"==t.a.code;this.i=!(!i&&!o),"unknown"!=n||i||o?t.a?(Zc(this,!0,null,t.a),Ne()):e.Fa(n,r)?function(t,e,n){n=n.Fa(e.c,e.b);var r=e.g,i=e.f,o=e.i,a=e.T(),s=!!e.c.match(/Redirect$/);n(r,i,a,o).then((function(e){Zc(t,s,e,null)})).o((function(e){Zc(t,s,null,e)}))}(this,t,e):xe(new I("invalid-auth-event")):(Zc(this,!1,null,null),Ne())}else xe(new I("invalid-auth-event"))},Qc.prototype.qa=function(){var t=this;return new Ee((function(e,n){t.b?t.b().then(e,n):(t.f.push(e),t.c.push(n),function(t){var e=new I("timeout");t.a&&t.a.cancel(),t.a=Cn(Bc.get()).then((function(){t.b||(t.g=!0,Zc(t,!0,null,e))}))}(t))}))},tl.prototype.h=function(t,e){if(t){var n=t.c,r=t.b;t.a?(e.na(t.c,null,t.a,t.b),Ne()):e.Fa(n,r)?function(t,e){var n=t.b,r=t.c;e.Fa(r,n)(t.g,t.f,t.T(),t.i).then((function(t){e.na(r,t,null,n)})).o((function(t){e.na(r,null,t,n)}))}(t,e):xe(new I("invalid-auth-event"))}else xe(new I("invalid-auth-event"))},nl.prototype.confirm=function(t){return t=Vo(this.verificationId,t),this.a(t)};var al="mfaInfo",sl="mfaPendingCredential";function ul(t,e,n,r){I.call(this,"multi-factor-auth-required",r,e),this.b=new ol(t,e,n),Jr(this,"resolver",this.b)}function cl(t,e,n){if(t&&m(t.serverResponse)&&"auth/multi-factor-auth-required"===t.code)try{return new ul(e,t.serverResponse,n,t.message)}catch(r){}return null}function ll(){}function fl(t){Jr(this,"factorId",t.fa),this.a=t}function hl(t){if(fl.call(this,t),this.a.fa!=Uo.PROVIDER_ID)throw new I("argument-error","firebase.auth.PhoneMultiFactorAssertion requires a valid firebase.auth.PhoneAuthCredential")}function dl(t,e){for(var n in Je.call(this,t),e)this[n]=e[n]}function pl(t,e){this.a=t,this.b=[],this.c=E(this.yc,this),fn(this.a,"userReloaded",this.c);var n=[];e&&e.multiFactor&&e.multiFactor.enrolledFactors&&H(e.multiFactor.enrolledFactors,(function(t){var e=null,r={};
2if(t){t.uid&&(r[ai]=t.uid),t.displayName&&(r[ii]=t.displayName),t.enrollmentTime&&(r[oi]=new Date(t.enrollmentTime).toISOString()),t.phoneNumber&&(r[si]=t.phoneNumber);try{e=new ui(r)}catch(i){}t=e}else t=null;t&&n.push(t)})),vl(this,n)}function vl(t,e){t.b=e,Jr(t,"enrolledFactors",e)}function ml(t,e,n){if(this.h=t,this.i=e,this.g=n,this.c=3e4,this.f=96e4,this.b=null,this.a=this.c,this.f<this.c)throw Error("Proactive refresh lower bound greater than upper bound!")}function yl(t,e){t.stop(),t.b=Cn(function(t,e){return e?(t.a=t.c,t.g()):(e=t.a,t.a*=2,t.a>t.f&&(t.a=t.f),e)}(t,e)).then((function(){return function(){var t=u.document,e=null;return Hr()||!t?Ne():new Ee((function(n){e=function(){Hr()&&(t.removeEventListener("visibilitychange",e,!1),n())},t.addEventListener("visibilitychange",e,!1)})).o((function(n){throw t.removeEventListener("visibilitychange",e,!1),n}))}()})).then((function(){return t.h()})).then((function(){yl(t,!0)})).o((function(e){t.i(e)&&yl(t,!1)}))}function gl(t){this.f=t,this.b=this.a=null,this.c=Date.now()}function bl(t,e){"undefined"===typeof e&&(t.b?e=(e=t.b).a-e.g:e=0),t.c=Date.now()+1e3*e}function wl(t,e){t.b=Gi(e[ns]||""),t.a=e.refreshToken,bl(t,"undefined"!==typeof(e=e.expiresIn)?Number(e):void 0)}function _l(t,e){return function(t,e){return new Ee((function(n,r){"refresh_token"==e.grant_type&&e.refresh_token||"authorization_code"==e.grant_type&&e.code?fs(t,t.l+"?key="+encodeURIComponent(t.c),(function(t){t?t.error?r(cu(t)):t.access_token&&t.refresh_token?n(t):r(new I("internal-error")):r(new I("network-request-failed"))}),"POST",Zn(e).toString(),t.g,t.m.get()):r(new I("internal-error"))}))}(t.f,e).then((function(e){return t.b=Gi(e.access_token),t.a=e.refresh_token,bl(t,e.expires_in),{accessToken:t.b.toString(),refreshToken:t.a}})).o((function(e){throw"auth/user-token-expired"==e.code&&(t.a=null),e}))}function El(t,e){this.a=t||null,this.b=e||null,Zr(this,{lastSignInTime:Gr(e||null),creationTime:Gr(t||null)})}function Ol(t,e,n,r,i,o){Zr(this,{uid:t,displayName:r||null,photoURL:i||null,email:n||null,phoneNumber:o||null,providerId:e})}function Tl(t,n,r){this.J=[],this.l=t.apiKey,this.m=t.appName,this.s=t.authDomain||null;var i=e.a.SDK_VERSION?xr(e.a.SDK_VERSION):null;this.a=new ts(this.l,A(N),i),t.emulatorConfig&&us(this.a,t.emulatorConfig),this.b=new gl(this.a),jl(this,n[ns]),wl(this.b,n),Jr(this,"refreshToken",this.b.a),Rl(this,r||{}),On.call(this),this.R=!1,this.s&&Dr()&&(this.i=Kc(this.s,this.l,this.m)),this.S=[],this.h=null,this.u=function(t){return new ml((function(){return t.I(!0)}),(function(t){return!(!t||"auth/network-request-failed"!=t.code)}),(function(){var e=t.b.c-Date.now()-3e5;return 0<e?e:0}))}(this),this.aa=E(this.hb,this);var o=this;this.ya=null,this.Oa=function(t){o.wa(t.h)},this.ja=null,this.Aa=function(t){us(o.a,t.c)},this.X=null,this.$=[],this.Ba=function(t){Il(o,t.f)},this.ba=null,this.O=new pl(this,r),Jr(this,"multiFactor",this.O)}function Sl(t,e){t.ja&&pn(t.ja,"languageCodeChanged",t.Oa),(t.ja=e)&&fn(e,"languageCodeChanged",t.Oa)}function kl(t,e){t.X&&pn(t.X,"emulatorConfigChanged",t.Aa),(t.X=e)&&fn(e,"emulatorConfigChanged",t.Aa)}function Il(t,n){t.$=n,ls(t.a,e.a.SDK_VERSION?xr(e.a.SDK_VERSION,t.$):null)}function Cl(t,e){t.ba&&pn(t.ba,"frameworkChanged",t.Ba),(t.ba=e)&&fn(e,"frameworkChanged",t.Ba)}function Nl(t){try{return e.a.app(t.m).auth()}catch(n){throw new I("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+t.m+"'!")}}function xl(t){t.D||t.u.b||(t.u.start(),pn(t,"tokenChanged",t.aa),fn(t,"tokenChanged",t.aa))}function Pl(t){pn(t,"tokenChanged",t.aa),t.u.stop()}function jl(t,e){t.za=e,Jr(t,"_lat",e)}function Al(t){for(var e=[],n=0;n<t.S.length;n++)e.push(t.S[n](t));return je(e).then((function(){return t}))}function Dl(t){t.i&&!t.R&&(t.R=!0,Fc(t.i,t))}function Rl(t,e){Zr(t,{uid:e.uid,displayName:e.displayName||null,photoURL:e.photoURL||null,email:e.email||null,emailVerified:e.emailVerified||!1,phoneNumber:e.phoneNumber||null,isAnonymous:e.isAnonymous||!1,tenantId:e.tenantId||null,metadata:new El(e.createdAt,e.lastLoginAt),providerData:[]}),t.a.b=t.tenantId}function Ml(){}function Ll(t){return Ne().then((function(){if(t.D)throw new I("app-deleted")}))}function Fl(t){return Y(t.providerData,(function(t){return t.providerId}))}function Ul(t,e){e&&(Vl(t,e.providerId),t.providerData.push(e))}function Vl(t,e){$(t.providerData,(function(t){return t.providerId==e}))}function Bl(t,e,n){("uid"!=e||n)&&t.hasOwnProperty(e)&&Jr(t,e,n)}function ql(t,e){t!=e&&(Zr(t,{uid:e.uid,displayName:e.displayName,photoURL:e.ph
2otoURL,email:e.email,emailVerified:e.emailVerified,phoneNumber:e.phoneNumber,isAnonymous:e.isAnonymous,tenantId:e.tenantId,providerData:[]}),e.metadata?Jr(t,"metadata",function(t){return new El(t.a,t.b)}(e.metadata)):Jr(t,"metadata",new El),H(e.providerData,(function(e){Ul(t,e)})),function(t,e){t.b=e.b,t.a=e.a,t.c=e.c}(t.b,e.b),Jr(t,"refreshToken",t.b.a),vl(t.O,e.O.b))}function zl(t){return t.I().then((function(e){var n=t.isAnonymous;return function(t,e){return su(t.a,Fs,{idToken:e}).then(E(t.Kc,t))}(t,e).then((function(){return n||Bl(t,"isAnonymous",!1),e}))}))}function Wl(t,e){e[ns]&&t.za!=e[ns]&&(wl(t.b,e),t.dispatchEvent(new dl("tokenChanged")),jl(t,e[ns]),Bl(t,"refreshToken",t.b.a))}function Hl(t,e){return zl(t).then((function(){if(Q(Fl(t),e))return Al(t).then((function(){throw new I("provider-already-linked")}))}))}function Gl(t,e,n){return ti({user:t,credential:Bo(e),additionalUserInfo:e=Ji(e),operationType:n})}function Yl(t,e){return Wl(t,e),t.reload().then((function(){return t}))}function Kl(t,n,r,i,o){if(!Dr())return xe(new I("operation-not-supported-in-this-environment"));if(t.h&&!o)return xe(t.h);var a=$i(r.providerId),s=Br(t.uid+":::"),u=null;(!Lr()||Er())&&t.s&&r.isOAuthProvider&&(u=Eu(t.s,t.l,t.m,n,r,null,s,e.a.SDK_VERSION||null,null,null,t.tenantId));var c=yr(u,a&&a.ua,a&&a.ta);return i=i().then((function(){if(Xl(t),!o)return t.I().then((function(){}))})).then((function(){return qc(t.i,c,n,r,s,!!u,t.tenantId)})).then((function(){return new Ee((function(e,r){t.na(n,null,new I("cancelled-popup-request"),t.g||null),t.f=e,t.C=r,t.g=s,t.c=Hc(t.i,t,n,c,s)}))})).then((function(t){return c&&mr(c),t?ti(t):null})).o((function(t){throw c&&mr(c),t})),$l(t,i,o)}function Ql(t,e,n,r,i){if(!Dr())return xe(new I("operation-not-supported-in-this-environment"));if(t.h&&!i)return xe(t.h);var o=null,a=Br(t.uid+":::");return r=r().then((function(){if(Xl(t),!i)return t.I().then((function(){}))})).then((function(){return t.ga=a,Al(t)})).then((function(e){return t.ha&&(e=(e=t.ha).b.set(tf,t.w(),e.a)),e})).then((function(){return Wc(t.i,e,n,a,t.tenantId)})).o((function(e){if(o=e,t.ha)return ef(t.ha);throw o})).then((function(){if(o)throw o})),$l(t,r,i)}function Xl(t){if(!t.i||!t.R){if(t.i&&!t.R)throw new I("internal-error");throw new I("auth-domain-config-required")}}function $l(t,e,n){var r=function(t,e,n){return t.h&&!n?(e.cancel(),xe(t.h)):e.o((function(e){throw!e||"auth/user-disabled"!=e.code&&"auth/user-token-expired"!=e.code||(t.h||t.dispatchEvent(new dl("userInvalidated")),t.h=e),e}))}(t,e,n);return t.J.push(r),r.oa((function(){X(t.J,r)})),r.o((function(e){var n=null;throw e&&"auth/multi-factor-auth-required"===e.code&&(n=cl(e.w(),Nl(t),E(t.jc,t))),n||e}))}function Jl(t){if(!t.apiKey)return null;var e={apiKey:t.apiKey,authDomain:t.authDomain,appName:t.appName,emulatorConfig:t.emulatorConfig},n={};if(!t.stsTokenManager||!t.stsTokenManager.accessToken)return null;n[ns]=t.stsTokenManager.accessToken,n.refreshToken=t.stsTokenManager.refreshToken||null;var r=t.stsTokenManager.expirationTime;r&&(n.expiresIn=(r-Date.now())/1e3);var i=new Tl(e,n,t);return t.providerData&&H(t.providerData,(function(t){t&&Ul(i,ti(t))})),t.redirectEventId&&(i.ga=t.redirectEventId),i}function Zl(t){this.a=t,this.b=oc()}ol.prototype.Rc=function(t){var e=this;return t.sb(this.a.a,this.c).then((function(t){var n=mt(e.f);return delete n[al],delete n[sl],gt(n,t),e.g(n)}))},S(ul,I),ll.prototype.sb=function(t,e,n){return e.type==co?function(t,e,n,r){return n.Ha().then((function(n){return n={idToken:n},"undefined"!==typeof r&&(n.displayName=r),gt(n,{phoneVerificationInfo:Fo(t.a)}),su(e,Ms,n)}))}(this,t,e,n):function(t,e,n){return n.Ha().then((function(n){return gt(n={mfaPendingCredential:n},{phoneVerificationInfo:Fo(t.a)}),su(e,Ls,n)}))}(this,t,e)},S(fl,ll),S(hl,fl),S(dl,Je),(n=pl.prototype).yc=function(t){vl(this,function(t){var e=[];return H(t.mfaInfo||[],(function(t){(t=ri(t))&&e.push(t)})),e}(t.hd))},n.Rb=function(){return this.a.I().then((function(t){return new uo(t,null)}))},n.fc=function(t,e){var n=this,r=this.a.a;return this.Rb().then((function(n){return t.sb(r,n,e)})).then((function(t){return Wl(n.a,t),n.a.reload()}))},n.bd=function(t){var e=this,n="string"===typeof t?t:t.uid,r=this.a.a;return this.a.I().then((function(t){return su(r,au,{idToken:t,mfaEnrollmentId:n})})).then((function(t){var r=G(e.b,(function(t){return t.uid!=n}));return vl(e,r),Wl(e.a,t),e.a.reload().o((function(t){if("auth/user-token-expired"!=t.code)throw t}))}))},n.w=function(){return{multiFactor:{enrolledFactors:Y(this.b,(function(t){return t.w()}))}}},ml.prototype.start=function(){this.a=this.c,yl(this,!0)},ml.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)},gl.prototype.w=function(){return{apiKey:this.f.c,refreshToken:this.a,accessToken:this.b&&this.b.toString(),expirationTime:this.c}},gl.prototype.getToken=function(t){return t=!!t,this.b&&!this.a?xe(new I("user-token-expired")):t||!this.b||Date.now()>this.c-3e4?this.a?_l(this,{grant_type:"refresh_token",refresh_token:this.a}):Ne(null):Ne({accessToken:this.b.toString(),refreshToken:this.a})},El.prototype.w=function(){return{lastLoginAt:this.b,createdAt:this.a}},S(Tl,On),Tl.prototype.wa=function(t){this.ya=t,ss(this.a,t)},Tl.prototype.la=function(){return this.ya},Tl.prototype.Ga=function(){return Z(this.$)},Tl.prototype.hb=function(){this.u.b&&(this.u.stop(),this.u.start())},Jr(Tl.prototype,"providerId","firebase"),(n=Tl.prototype).reload=function(){var t=this;
2return $l(this,Ll(this).then((function(){return zl(t).then((function(){return Al(t)})).then(Ml)})))},n.oc=function(t){return this.I(t).then((function(t){return new il(t)}))},n.I=function(t){var e=this;return $l(this,Ll(this).then((function(){return e.b.getToken(t)})).then((function(t){if(!t)throw new I("internal-error");return t.accessToken!=e.za&&(jl(e,t.accessToken),e.dispatchEvent(new dl("tokenChanged"))),Bl(e,"refreshToken",t.refreshToken),t.accessToken})))},n.Kc=function(t){if(!(t=t.users)||!t.length)throw new I("internal-error");Rl(this,{uid:(t=t[0]).localId,displayName:t.displayName,photoURL:t.photoUrl,email:t.email,emailVerified:!!t.emailVerified,phoneNumber:t.phoneNumber,lastLoginAt:t.lastLoginAt,createdAt:t.createdAt,tenantId:t.tenantId});for(var e=function(t){return(t=t.providerUserInfo)&&t.length?Y(t,(function(t){return new Ol(t.rawId,t.providerId,t.email,t.displayName,t.photoUrl,t.phoneNumber)})):[]}(t),n=0;n<e.length;n++)Ul(this,e[n]);Bl(this,"isAnonymous",!(this.email&&t.passwordHash)&&!(this.providerData&&this.providerData.length)),this.dispatchEvent(new dl("userReloaded",{hd:t}))},n.Lc=function(t){return Xr("firebase.User.prototype.reauthenticateAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.reauthenticateWithCredential instead."),this.tb(t)},n.tb=function(t){var e=this,n=null;return $l(this,t.c(this.a,this.uid).then((function(t){return Wl(e,t),n=Gl(e,t,"reauthenticate"),e.h=null,e.reload()})).then((function(){return n})),!0)},n.Cc=function(t){return Xr("firebase.User.prototype.linkAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.linkWithCredential instead."),this.qb(t)},n.qb=function(t){var e=this,n=null;return $l(this,Hl(this,t.providerId).then((function(){return e.I()})).then((function(n){return t.b(e.a,n)})).then((function(t){return n=Gl(e,t,"link"),Yl(e,t)})).then((function(){return n})))},n.Dc=function(t,e){var n=this;return $l(this,Hl(this,"phone").then((function(){return rl(Nl(n),t,e,E(n.qb,n))})))},n.Mc=function(t,e){var n=this;return $l(this,Ne().then((function(){return rl(Nl(n),t,e,E(n.tb,n))})),!0)},n.Bb=function(t){var e=this;return $l(this,this.I().then((function(n){return e.a.Bb(n,t)})).then((function(t){return Wl(e,t),e.reload()})))},n.ed=function(t){var e=this;return $l(this,this.I().then((function(n){return t.b(e.a,n)})).then((function(t){return Wl(e,t),e.reload()})))},n.Cb=function(t){var e=this;return $l(this,this.I().then((function(n){return e.a.Cb(n,t)})).then((function(t){return Wl(e,t),e.reload()})))},n.Db=function(t){if(void 0===t.displayName&&void 0===t.photoURL)return Ll(this);var e=this;return $l(this,this.I().then((function(n){return e.a.Db(n,{displayName:t.displayName,photoUrl:t.photoURL})})).then((function(t){return Wl(e,t),Bl(e,"displayName",t.displayName||null),Bl(e,"photoURL",t.photoUrl||null),H(e.providerData,(function(t){"password"===t.providerId&&(Jr(t,"displayName",e.displayName),Jr(t,"photoURL",e.photoURL))})),Al(e)})).then(Ml))},n.cd=function(t){var e=this;return $l(this,zl(this).then((function(n){return Q(Fl(e),t)?function(t,e,n){return su(t,As,{idToken:e,deleteProvider:n})}(e.a,n,[t]).then((function(t){var n={};return H(t.providerUserInfo||[],(function(t){n[t.providerId]=!0})),H(Fl(e),(function(t){n[t]||Vl(e,t)})),n[Uo.PROVIDER_ID]||Jr(e,"phoneNumber",null),Al(e)})):Al(e).then((function(){throw new I("no-such-provider")}))})))},n.delete=function(){var t=this;return $l(this,this.I().then((function(e){return su(t.a,js,{idToken:e})})).then((function(){t.dispatchEvent(new dl("userDeleted"))}))).then((function(){for(var e=0;e<t.J.length;e++)t.J[e].cancel("app-deleted");Sl(t,null),kl(t,null),Cl(t,null),t.J=[],t.D=!0,Pl(t),Jr(t,"refreshToken",null),t.i&&Uc(t.i,t)}))},n.Fb=function(t,e){return!!("linkViaPopup"==t&&(this.g||null)==e&&this.f||"reauthViaPopup"==t&&(this.g||null)==e&&this.f||"linkViaRedirect"==t&&(this.ga||null)==e||"reauthViaRedirect"==t&&(this.ga||null)==e)},n.na=function(t,e,n,r){"linkViaPopup"!=t&&"reauthViaPopup"!=t||r!=(this.g||null)||(n&&this.C?this.C(n):e&&!n&&this.f&&this.f(e),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.C)},n.Fa=function(t,e){return"linkViaPopup"==t&&e==(this.g||null)?E(this.Kb,this):"reauthViaPopup"==t&&e==(this.g||null)?E(this.Lb,this):"linkViaRedirect"==t&&(this.ga||null)==e?E(this.Kb,this):"reauthViaRedirect"==t&&(this.ga||null)==e?E(this.Lb,this):null},n.Ec=function(t){var e=this;return Kl(this,"linkViaPopup",t,(function(){return Hl(e,t.providerId).then((function(){return Al(e)}))}),!1)},n.Nc=function(t){return Kl(this,"reauthViaPopup",t,(function(){return Ne()}),!0)},n.Fc=function(t){var e=this;return Ql(this,"linkViaRedirect",t,(function(){return Hl(e,t.providerId)}),!1)},n.Oc=function(t){return Ql(this,"reauthViaRedirect",t,(function(){return Ne()}),!0)},n.Kb=function(t,e,n,r){var i=this;this.c&&(this.c.cancel(),this.c=null);var o=null;
2return $l(this,this.I().then((function(n){return Ss(i.a,{requestUri:t,postBody:r,sessionId:e,idToken:n})})).then((function(t){return o=Gl(i,t,"link"),Yl(i,t)})).then((function(){return o})))},n.Lb=function(t,e,n,r){var i=this;this.c&&(this.c.cancel(),this.c=null);var o=null;return $l(this,Ne().then((function(){return ho(ks(i.a,{requestUri:t,sessionId:e,postBody:r,tenantId:n}),i.uid)})).then((function(t){return o=Gl(i,t,"reauthenticate"),Wl(i,t),i.h=null,i.reload()})).then((function(){return o})),!0)},n.ub=function(t){var e=this,n=null;return $l(this,this.I().then((function(e){return n=e,"undefined"===typeof t||vt(t)?{}:qi(new ji(t))})).then((function(t){return e.a.ub(n,t)})).then((function(t){if(e.email!=t)return e.reload()})).then((function(){})))},n.Eb=function(t,e){var n=this,r=null;return $l(this,this.I().then((function(t){return r=t,"undefined"===typeof e||vt(e)?{}:qi(new ji(e))})).then((function(e){return n.a.Eb(r,t,e)})).then((function(t){if(n.email!=t)return n.reload()})).then((function(){})))},n.jc=function(t){var e=null,n=this;return $l(this,t=ho(Ne(t),n.uid).then((function(t){return e=Gl(n,t,"reauthenticate"),Wl(n,t),n.h=null,n.reload()})).then((function(){return e})),!0)},n.toJSON=function(){return this.w()},n.w=function(){var t={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,tenantId:this.tenantId,providerData:[],apiKey:this.l,appName:this.m,authDomain:this.s,stsTokenManager:this.b.w(),redirectEventId:this.ga||null};return this.metadata&>(t,this.metadata.w()),H(this.providerData,(function(e){t.providerData.push(function(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}(e))})),gt(t,this.O.w()),t};var tf={name:"redirectUser",F:"session"};function ef(t){return uc(t.b,tf,t.a)}function nf(t){this.a=t,this.b=oc(),this.c=null,this.f=function(t){var e=af("local"),n=af("session"),r=af("none");return function(t,e,n){var r=sc(e,n),i=ac(t,e.F);return t.get(e,n).then((function(o){var a=null;try{a=Vr(u.localStorage.getItem(r))}catch(s){}if(a&&!o)return u.localStorage.removeItem(r),t.set(e,a,n);a&&o&&"localStorage"!=i.type&&u.localStorage.removeItem(r)}))}(t.b,e,t.a).then((function(){return t.b.get(n,t.a)})).then((function(i){return i?n:t.b.get(r,t.a).then((function(n){return n?r:t.b.get(e,t.a).then((function(n){return n?e:t.b.get(of,t.a).then((function(t){return t?af(t):e}))}))}))})).then((function(e){return t.c=e,rf(t,e.F)})).o((function(){t.c||(t.c=e)}))}(this),this.b.addListener(af("local"),this.a,E(this.g,this))}function rf(t,e){var n,r=[];for(n in rc)rc[n]!==e&&r.push(uc(t.b,af(rc[n]),t.a));return r.push(uc(t.b,of,t.a)),function(t){return new Ee((function(e,n){var r=t.length,i=[];if(r)for(var o=function(t,n){r--,i[t]=n,0==r&&e(i)},a=function(t){n(t)},s=0;s<t.length;s++)Pe(t[s],O(o,s),a);else e(i)}))}(r)}nf.prototype.g=function(){var t=this,e=af("local");lf(this,(function(){return Ne().then((function(){return t.c&&"local"!=t.c.F?t.b.get(e,t.a):null})).then((function(n){if(n)return rf(t,"local").then((function(){t.c=e}))}))}))};var of={name:"persistence",F:"session"};function af(t){return{name:"authUser",F:t}}function sf(t,e){return lf(t,(function(){return t.b.set(t.c,e.w(),t.a)}))}function uf(t){return lf(t,(function(){return uc(t.b,t.c,t.a)}))}function cf(t,e,n){return lf(t,(function(){return t.b.get(t.c,t.a).then((function(t){return t&&e&&(t.authDomain=e),t&&n&&(t.emulatorConfig=n),Jl(t||{})}))}))}function lf(t,e){return t.f=t.f.then(e,e),t.f}function ff(t){if(this.l=!1,Jr(this,"settings",new el),Jr(this,"app",t),!wf(this).options||!wf(this).options.apiKey)throw new I("invalid-api-key");t=e.a.SDK_VERSION?xr(e.a.SDK_VERSION):null,this.a=new ts(wf(this).options&&wf(this).options.apiKey,A(N),t),this.R=[],this.s=[],this.O=[],this.hb=e.a.INTERNAL.createSubscribe(E(this.zc,this)),this.X=void 0,this.bc=e.a.INTERNAL.createSubscribe(E(this.Ac,this)),gf(this,null),this.i=new nf(wf(this).options.apiKey+":"+wf(this).name),this.D=new Zl(wf(this).options.apiKey+":"+wf(this).name),this.$=Tf(this,function(t){var e=wf(t).options.authDomain,n=function(t){var e=function(t,e){return t.b.get(tf,t.a).then((function(t){return t&&e&&(t.authDomain=e),Jl(t||{})}))}(t.D,wf(t).options.authDomain).then((function(e){return(t.m=e)&&(e.ha=t.D),ef(t.D)}));return Tf(t,e)}(t).then((function(){return cf(t.i,e,t.P)})).then((function(e){return e?(e.ha=t.D,t.m&&(t.m.ga||null)==(e.ga||null)?e:e.reload().then((function(){return sf(t.i,e).then((function(){return e}))})).o((function(n){return"auth/network-request-failed"==n.code?e:uf(t.i)}))):null})).then((function(e){gf(t,e||null)}));return Tf(t,n)}(this)),this.h=Tf(this,function(t){return t.$.then((function(){return mf(t)})).o((function(){})).then((function(){if(!t.l)return t.ja()})).o((function(){})).then((function(){if(!t.l){t.ba=!0;var e=t.i;e.b.addListener(af("local"),e.a,t.ja)}}))}(this)),this.ba=!1,this.ja=E(this.Zc,this),this.Ba=E(this.da,this),this.ya=E(this.mc,this),this.za=E(this.wc,this),this.Aa=E(this.xc,this),this.b=null,function(t){var e=wf(t).options.authDomain,n=wf(t).options.apiKey;e&&Dr()&&(t.Oa=t.$.then((function(){if(!t.l){if(t.b=Kc(e,n,wf(t).name,t.P),Fc(t.b,t),_f(t)&&Dl(_f(t)),t.m){Dl(t.m);var r=t.m;r.wa(t.la()),Sl(r,t),Il(r=t.m,t.J),Cl(r,t),us((r=t.m).a,t.P),kl(r,t),t.m=null}return t.b}})))}(this),this.INTERNAL={},this.INTERNAL.delete=E(this.delete,this),this.INTERNAL.logFramework=E(this.Gc,this),this.u=0,On.call(this),function(t){Object.defineProperty(t,"lc",{get:function(){return this.la()},set:function(t){this.wa(t)},enumerable:!1}),t.aa=null,Object.defineProperty(t,"ti",{get:function(){return this.T()},set:function(t){this.yb(t)},enumerable:!1}),t.S=null,Object.defineProperty(t,"emulatorConfig",{get:function(){if(this.P){var t=Bn(this.P.url);t=ti({protocol:t.c,host:t.a,port:t.g,options:ti({disableWarnings:this.P.ec})})}else t=null;return t},enumerable:!1})}(this),this.J=[],this.P=null}function hf(t){Je.call(this,"languageCodeChanged"),this.h=t}function df(t){Je.call(this,"emulatorConfigChanged"),this.c=t}function pf(t){Je.call(this,"frameworkChanged"),this.f=t}function vf(t){return t.Oa||xe(new I("auth-domain-config-required"))}function mf(t){if(!Dr())return xe(new I("operation-not-supported-in-this-environment"));var e=vf(t).then((function(){return t.b.qa()})).then((function(t){return t?ti(t):null}));return Tf(t,e)}function yf(t,e){var n={};return n.apiKey=wf(t).options.apiKey,n.authDomain=wf(t).options.authDomain,n.appName=wf(t).name,t.P&&(n.emulatorConfig=t.P),t.$.then((function(){return function(t,e,n,r){var i=new Tl(t,e);return n&&(i.ha=n),r&&Il(i,r),i.reload().then((function(){return i}))}(n,e,t.D,t.Ga())})).then((function(e){return _f(t)&&e.uid==_f(t).uid?(ql(_f(t),e),t.da(e)):(gf(t,e),Dl(e),t.da(e))})).then((function(){Of(t)}))}function gf(t,e){_f(t)&&(function(t,e){$(t.S,(function(t){return t==e}))}(_f(t),t.Ba),pn(_f(t),"tokenChanged",t.ya),pn(_f(t),"userDeleted",t.za),pn(_f(t),"userInvalidated",t.Aa),Pl(_f(t))),e&&(e.S.push(t.Ba),fn(e,"tokenChanged",t.ya),fn(e,"userDeleted",t.za),fn(e,"userInvalidated",t.Aa),0<t.u&&xl(e)),Jr(t,"currentUser",e),e&&(e.wa(t.la()),Sl(e,t),Il(e,t.J),Cl(e,t),us(e.a,t.P),kl(e,t))}function bf(t,e){var n=null,r=null;return Tf(t,e.then((function(e){return n=Bo(e),r=Ji(e),yf(t,e)}),(function(e){var n=null;throw e&&"auth/multi-factor-auth-required"===e.code&&(n=cl(e.w(),t,E(t.kc,t))),n||e})).then((function(){return ti({user:_f(t),credential:n,additionalUserInfo:r,operationType:"signIn"})})))}function wf(t){return t.app}function _f(t){return t.currentUser}function Ef(t){return _f(t)&&_f(t)._lat||null}function Of(t){if(t.ba){for(var e=0;e<t.s.length;e++)t.s[e]&&t.s[e](Ef(t));if(t.X!==t.getUid()&&t.O.length)for(t.X=t.getUid(),e=0;e<t.O.length;e++)t.O[e]&&t.O[e](Ef(t))}}function Tf(t,e){return t.R.push(e),e.oa((function(){X(t.R,e)})),e}function Sf(){}function kf(){this.a={},this.b=1e12}nf.prototype.xb=function(t){var e=null,n=this;return function(t){var e=new I("invalid-persistence-type"),n=new I("unsupported-persistence-type");t:{for(r in rc)if(rc[r]==t){var r=!0;break t}r=!1}if(!r||"string"!==typeof t)throw e;switch(Tr()){case"ReactNative":if("session"===t)throw n;break;case"Node":if("none"!==t)throw n;break;case"Worker":if("session"===t||!Mu()&&"none"!==t)throw n;break;default:if(!Ar()&&"none"!==t)throw n}}(t),lf(this,(function(){return t!=n.c.F?n.b.get(n.c,n.a).then((function(r){return e=r,rf(n,t)})).then((function(){if(n.c=af(t),e)return n.b.set(n.c,e,n.a)})):Ne()}))},S(ff,On),S(hf,Je),S(df,Je),S(pf,Je),(n=ff.prototype).xb=function(t){return Tf(this,t=this.i.xb(t))},n.wa=function(t){this.aa===t||this.l||(this.aa=t,ss(this.a,this.aa),this.dispatchEvent(new hf(this.la())))},n.la=function(){return this.aa},n.fd=function(){var t=u.navigator;this.wa(t&&(t.languages&&t.languages[0]||t.language||t.userLanguage)||null)},n.gd=function(t,e){if(!this.P){if(!/^https?:\/\//.test(t))throw new I("argument-error","Emulator URL must start with a valid scheme (http:// or https://).");(function(t){"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&&!t&&wr().then((function(){var t=u.document.createElement("div");t.innerText="Running in emulator mode. Do not use with production credentials.",t.style.position="fixed",t.style.width="100%",t.style.backgroundColor="#ffffff",t.style.border=".1em solid #000000",t.style.color="#ff0000",t.style.bottom="0px",t.style.left="0px",t.style.margin="0px",t.style.zIndex=1e4,t.style.textAlign="center",t.classList.add("firebase-emulator-warning"),u.document.body.appendChild(t)}))})(e=!!e&&!!e.disableWarnings),this.P={url:t,ec:e},this.settings.ib=!0,us(this.a,this.P),this.dispatchEvent(new df(this.P))}},n.Gc=function(t){this.J.push(t),ls(this.a,e.a.SDK_VERSION?xr(e.a.SDK_VERSION,this.J):null),this.dispatchEvent(new pf(this.J))},n.Ga=function(){return Z(this.J)},n.yb=function(t){this.S===t||this.l||(this.S=t,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:_f(this)&&_f(this).w()}},n.Fb=function(t,e){switch(t){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==e&&!!this.f;default:return!1}},n.na=function(t,e,n,r){"signInViaPopup"==t&&this.g==r&&(n&&this.C?this.C(n):e&&!n&&this.f&&this.f(e),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.C)},n.Fa=function(t,e){return"signInViaRedirect"==t||"signInViaPopup"==t&&this.g==e&&this.f?E(this.ic,this):null},n.ic=function(t,e,n,r){var i=this,o={requestUri:t,postBody:r,sessionId:e,tenantId:n};return this.c&&(this.c.cancel(),this.c=null),i.$.then((function(){return bf(i,Ts(i.a,o))}))},n.Xc=function(t){if(!Dr())return xe(new I("operation-not-supported-in-this-environment"));var n=this,r=$i(t.providerId),i=Br(),o=null;(!Lr()||Er())&&wf(this).options.authDomain&&t.isOAuthProvider&&(o=Eu(wf(this).options.authDomain,wf(this).options.apiKey,wf(this).name,"signInViaPopup",t,null,i,e.a.SDK_VERSION||null,null,null,this.T(),this.P));var a=yr(o,r&&r.ua,r&&r.ta);return Tf(this,r=vf(this).then((function(e){return qc(e,a,"signInViaPopup",t,i,!!o,n.T())})).then((function(){return new Ee((function(t,e){n.na("signInViaPopup",null,new I("cancelled-popup-request"),n.g),n.f=t,n.C=e,n.g=i,n.c=Hc(n.b,n,"signInViaPopup",a,i)}))}
2)).then((function(t){return a&&mr(a),t?ti(t):null})).o((function(t){throw a&&mr(a),t})))},n.Yc=function(t){if(!Dr())return xe(new I("operation-not-supported-in-this-environment"));var e=this;return Tf(this,vf(this).then((function(){return function(t){return lf(t,(function(){return t.b.set(of,t.c.F,t.a)}))}(e.i)})).then((function(){return Wc(e.b,"signInViaRedirect",t,void 0,e.T())})))},n.qa=function(){var t=this;return mf(this).then((function(e){return t.b&&$c(t.b.b),e})).o((function(e){throw t.b&&$c(t.b.b),e}))},n.dd=function(t){if(!t)return xe(new I("null-user"));if(this.S!=t.tenantId)return xe(new I("tenant-id-mismatch"));var e=this,n={};n.apiKey=wf(this).options.apiKey,n.authDomain=wf(this).options.authDomain,n.appName=wf(this).name;var r=function(t,e,n,r){var i=t.b,o={};return o[ns]=i.b&&i.b.toString(),o.refreshToken=i.a,e=new Tl(e||{apiKey:t.l,authDomain:t.s,appName:t.m},o),n&&(e.ha=n),r&&Il(e,r),ql(e,t),e}(t,n,e.D,e.Ga());return Tf(this,this.h.then((function(){if(wf(e).options.apiKey!=t.l)return r.reload()})).then((function(){return _f(e)&&t.uid==_f(e).uid?(ql(_f(e),t),e.da(t)):(gf(e,r),Dl(r),e.da(r))})).then((function(){Of(e)})))},n.Ab=function(){var t=this;return Tf(this,this.h.then((function(){return t.b&&$c(t.b.b),_f(t)?(gf(t,null),uf(t.i).then((function(){Of(t)}))):Ne()})))},n.Zc=function(){var t=this;return cf(this.i,wf(this).options.authDomain).then((function(e){if(!t.l){var n;if(n=_f(t)&&e){n=_f(t).uid;var r=e.uid;n=void 0!==n&&null!==n&&""!==n&&void 0!==r&&null!==r&&""!==r&&n==r}if(n)return ql(_f(t),e),_f(t).I();(_f(t)||e)&&(gf(t,e),e&&(Dl(e),e.ha=t.D),t.b&&Fc(t.b,t),Of(t))}}))},n.da=function(t){return sf(this.i,t)},n.mc=function(){Of(this),this.da(_f(this))},n.wc=function(){this.Ab()},n.xc=function(){this.Ab()},n.kc=function(t){var e=this;return this.h.then((function(){return bf(e,Ne(t))}))},n.zc=function(t){var e=this;this.addAuthTokenListener((function(){t.next(_f(e))}))},n.Ac=function(t){var e=this;!function(t,e){t.O.push(e),Tf(t,t.h.then((function(){!t.l&&Q(t.O,e)&&t.X!==t.getUid()&&(t.X=t.getUid(),e(Ef(t)))})))}(this,(function(){t.next(_f(e))}))},n.Ic=function(t,e,n){var r=this;return this.ba&&Promise.resolve().then((function(){"function"===typeof t?t(_f(r)):"function"===typeof t.next&&t.next(_f(r))})),this.hb(t,e,n)},n.Hc=function(t,e,n){var r=this;return this.ba&&Promise.resolve().then((function(){r.X=r.getUid(),"function"===typeof t?t(_f(r)):"function"===typeof t.next&&t.next(_f(r))})),this.bc(t,e,n)},n.nc=function(t){var e=this;return Tf(this,this.h.then((function(){return _f(e)?_f(e).I(t).then((function(t){return{accessToken:t}})):null})))},n.Tc=function(t){var e=this;return this.h.then((function(){return bf(e,su(e.a,eu,{token:t}))})).then((function(t){var n=t.user;return Bl(n,"isAnonymous",!1),e.da(n),t}))},n.Uc=function(t,e){var n=this;return this.h.then((function(){return bf(n,su(n.a,nu,{email:t,password:e}))}))},n.dc=function(t,e){var n=this;return this.h.then((function(){return bf(n,su(n.a,xs,{email:t,password:e}))}))},n.$a=function(t){var e=this;return this.h.then((function(){return bf(e,t.ka(e.a))}))},n.Sc=function(t){return Xr("firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential is deprecated. Please use firebase.auth.Auth.prototype.signInWithCredential instead."),this.$a(t)},n.zb=function(){var t=this;return this.h.then((function(){var e=_f(t);if(e&&e.isAnonymous){var n=ti({providerId:null,isNewUser:!1});return ti({user:e,credential:null,additionalUserInfo:n,operationType:"signIn"})}return bf(t,t.a.zb()).then((function(e){var n=e.user;return Bl(n,"isAnonymous",!0),t.da(n),e}))}))},n.getUid=function(){return _f(this)&&_f(this).uid||null},n.cc=function(t){this.addAuthTokenListener(t),this.u++,0<this.u&&_f(this)&&xl(_f(this))},n.Pc=function(t){var e=this;H(this.s,(function(n){n==t&&e.u--})),0>this.u&&(this.u=0),0==this.u&&_f(this)&&Pl(_f(this)),this.removeAuthTokenListener(t)},n.addAuthTokenListener=function(t){var e=this;this.s.push(t),Tf(this,this.h.then((function(){e.l||Q(e.s,t)&&t(Ef(e))})))},n.removeAuthTokenListener=function(t){$(this.s,(function(e){return e==t}))},n.delete=function(){this.l=!0;for(var t=0;t<this.R.length;t++)this.R[t].cancel("app-deleted");return this.R=[],this.i&&(t=this.i).b.removeListener(af("local"),t.a,this.ja),this.b&&(Uc(this.b,this),$c(this.b.b)),Promise.resolve()},n.hc=function(t){return Tf(this,function(t,e){return su(t,Ps,{identifier:e,continueUri:Rr()?hr():"http://localhost"}).then((function(t){return t.signinMethods||[]}))}(this.a,t))},n.Bc=function(t){return!!Ro(t)},n.wb=function(t,e){var n=this;return Tf(this,Ne().then((function(){var t=new ji(e);if(!t.c)throw new I("argument-error",Ri+" must be true when sending sign in link to email");return qi(t)})).then((function(e){return n.a.wb(t,e)})).then((function(){})))},n.jd=function(t){return this.Ra(t).then((function(t){return t.data.email}))},n.nb=function(t,e){return Tf(this,this.a.nb(t,e).then((function(){})))},n.Ra=function(t){return Tf(this,this.a.Ra(t).then((function(t){return new ci(t)})))},n.jb=function(t){return Tf(this,this.a.jb(t).then((function(){})))},n.vb=function(t,e){var n=this;return Tf(this,Ne().then((function(){return"undefined"===typeof e||vt(e)?{}:qi(new ji(e))})).then((function(e){return n.a.vb(t,e)})).then((function(){})))},n.Wc=function(t,e){return Tf(this,rl(this,t,e,E(this.$a,this)))},n.Vc=function(t,e){var n=this;return Tf(this,Ne().then((function(){var r=e||hr(),i=Do(t,r);if(!(r=Ro(r)))throw new I("argument-error","Invalid email link!");if(r.tenantId!==n.T())throw new I("tenant-id-mismatch");return n.$a(i)})))},Sf.prototype.render=function(){},Sf.prototype.reset=function(){},Sf.prototype.getResponse=function(){},Sf.prototype.execute=function(){};var If=null;function Cf(t,e){return(e=Nf(e))&&t.a[e]||null}function Nf(t){return(t="undefined"===typeof t?1e12:t)?t.toString():null}function xf(t,e){this.g=!1,this.c=e,this.a=this.b=null,this.h="invisible"!==this.c.size,this.f=le(t);var n=this;this.i=function(){n.execute()},this.h?this.execute():fn(this.f,"click",this.i)}function Pf(t){if(t.g)throw Error("reCAPTCHA mock was already deleted!")}function jf(){}function Af(){}kf.prototype.render=function(t,e){return this.a[this.b.toString()]=new xf(t,e),this.b++},kf.prototype.reset=function(t){var e=Cf(this,t);t=Nf(t),e&&t&&(e.delete(),delete this.a[t])},kf.prototype.getResponse=function(t){return(t=Cf(this,t))?t.getResponse():null},kf.prototype.execute=function(t){(t=Cf(this,t))&&t.execute()},xf.prototype.getResponse=function(){return Pf(this),this.b},xf.prototype.execute=function(){Pf(this);var t=this;this.a||(this.a=setTimeout((function(){t.b=function(){for(var t=50,e=[];0<t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}();var e=t.c.callback,n=t.c["expired-callback"];if(e)try{e(t.b)}catch(r){}t.a=setTimeout((function(){if(t.a=null,t.b=null,n)try{n()}catch(r){}t.h&&t.execute()}),6e4)}),500))},xf.prototype.delete=function(){Pf(this),this.g=!0,clearTimeout(this.a),this.a=null,pn(this.f,"click",this.i)},Jr(jf,"FACTOR_ID","phone"),Af.prototype.g=function(){return If||(If=new kf),Ne(If)},Af.prototype.c=function(){};var Df=null;function Rf(){this.b=u.grecaptcha?1/0:0,this.f=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}var Mf=new wt(Tt,"https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),Lf=new Wr(3e4,6e4);Rf.prototype.g=function(t){var e=this;return new Ee((function(n,r){var i=setTimeout((function(){r(new I("network-request-failed"))}),Lf.get());!u.grecaptcha||t!==e.f&&!e.b?(u[e.a]=function(){if(u.grecaptcha){e.f=t;var o=u.grecaptcha.render;u.grecaptcha.render=function(t,n){return t=o(t,n),e.b++,t},clearTimeout(i),n(u.grecaptcha)}else clearTimeout(i),r(new I("internal-error"));delete u[e.a]},Ne(Ya(Ct(Mf,{onload:e.a,hl:t||""}))).o((function(){clearTimeout(i),r(new I("internal-error","Unable to load external reCAPTCHA dependencies!"))}))):(clearTimeout(i),n(u.grecaptcha))}))},Rf.prototype.c=function(){this.b--};var Ff=null;function Uf(t,e,n,r,i,o,a){if(Jr(this,"type","recaptcha"),this.c=this.f=null,this.D=!1,this.v=e,this.g=null,a?(Df||(Df=ne
2w Af),a=Df):(Ff||(Ff=new Rf),a=Ff),this.m=a,this.a=n||{theme:"light",type:"image"},this.h=[],this.a[qf])throw new I("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.i="invisible"===this.a[zf],!u.document)throw new I("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!le(e)||!this.i&&le(e).hasChildNodes())throw new I("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.s=new ts(t,o||null,i||null),this.u=r||function(){return null};var s=this;this.l=[];var c=this.a[Vf];this.a[Vf]=function(t){if(Wf(s,t),"function"===typeof c)c(t);else if("string"===typeof c){var e=jr(c,u);"function"===typeof e&&e(t)}};var l=this.a[Bf];this.a[Bf]=function(){if(Wf(s,null),"function"===typeof l)l();else if("string"===typeof l){var t=jr(l,u);"function"===typeof t&&t()}}}var Vf="callback",Bf="expired-callback",qf="sitekey",zf="size";function Wf(t,e){for(var n=0;n<t.l.length;n++)try{t.l[n](e)}catch(r){}}function Hf(t,e){return t.h.push(e),e.oa((function(){X(t.h,e)})),e}function Gf(t){if(t.D)throw new I("internal-error","RecaptchaVerifier instance has been destroyed.")}function Yf(t,n,r){var i=!1;try{this.b=r||e.a.app()}catch(s){throw new I("argument-error","No firebase.app.App instance is currently initialized.")}if(!this.b.options||!this.b.options.apiKey)throw new I("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=e.a.SDK_VERSION?xr(e.a.SDK_VERSION,a):null,Uf.call(this,r,t,n,(function(){try{var t=o.b.auth().la()}catch(e){t=null}return t}),a,A(N),i)}function Kf(t,e,n,r){t:{n=Array.prototype.slice.call(n);for(var i=0,o=!1,a=0;a<e.length;a++)if(e[a].optional)o=!0;else{if(o)throw new I("internal-error","Argument validator encountered a required argument after an optional argument.");i++}if(o=e.length,n.length<i||o<n.length)r="Expected "+(i==o?1==i?"1 argument":i+" arguments":i+"-"+o+" arguments")+" but got "+n.length+".";else{for(i=0;i<n.length;i++)if(o=e[i].optional&&void 0===n[i],!e[i].M(n[i])&&!o){if(e=e[i],0>i||i>=Qf.length)throw new I("internal-error","Argument validator received an unsupported number of arguments.");n=Qf[i],r=(r?"":n+" argument ")+(e.name?'"'+e.name+'" ':"")+"must be "+e.K+".";break t}r=null}}if(r)throw new I("argument-error",t+" failed: "+r)}(n=Uf.prototype).Ia=function(){var t=this;return this.f?this.f:this.f=Hf(this,Ne().then((function(){if(Rr()&&!Or())return wr();throw new I("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")})).then((function(){return t.m.g(t.u())})).then((function(e){return t.g=e,su(t.s,Ws,{})})).then((function(e){t.a[qf]=e.recaptchaSiteKey})).o((function(e){throw t.f=null,e})))},n.render=function(){Gf(this);var t=this;return Hf(this,this.Ia().then((function(){if(null===t.c){var e=t.v;if(!t.i){var n=le(e);e=function(t,e,n){var r=arguments,i=document,o=String(r[0]),a=r[1];if(!ce&&a&&(a.name||a.type)){if(o=["<",o],a.name&&o.push(' name="',Ht(a.name),'"'),a.type){o.push(' type="',Ht(a.type),'"');var s={};gt(s,a),delete s.type,a=s}o.push(">"),o=o.join("")}return o=me(i,o),a&&("string"===typeof a?o.className=a:Array.isArray(a)?o.className=a.join(" "):fe(o,a)),2<r.length&&ve(i,o,r),o}("DIV"),n.appendChild(e)}t.c=t.g.render(e,t.a)}return t.c})))},n.verify=function(){Gf(this);var t=this;return Hf(this,this.render().then((function(e){return new Ee((function(n){var r=t.g.getResponse(e);if(r)n(r);else{t.l.push((function e(r){r&&(function(t,e){$(t.l,(function(t){return t==e}))}(t,e),n(r))})),t.i&&t.g.execute(t.c)}}))})))},n.reset=function(){Gf(this),null!==this.c&&this.g.reset(this.c)},n.clear=function(){Gf(this),this.D=!0,this.m.c();for(var t=0;t<this.h.length;t++)this.h[t].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.i){t=le(this.v);for(var e;e=t.firstChild;)t.removeChild(e)}},S(Yf,Uf);var Qf="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function Xf(t,e){return{name:t||"",K:"a valid string",optional:!!e,M:function(t){return"string"===typeof t}}}function $f(t,e){return{name:t||"",K:"a boolean",optional:!!e,M:function(t){return"boolean"===typeof t}}}function Jf(t,e){return{name:t||"",K:"a valid object",optional:!!e,M:m}}function Zf(t,e){return{name:t||"",K:"a function",optional:!!e,M:function(t){return"function"===typeof t}}}function th(t,e){return{name:t||"",K:"null",optional:!!e,M:function(t){return null===t}}}function eh(t){return{name:t?t+"Credential":"credential",K:t?"a valid "+t+" credential":"a valid credential",optional:!1,M:function(e){if(!e)return!1;var n=!t||e.providerId===t;return!(!e.ka||!n)}}}function nh(t,e){return m(t)&&"string"===typeof t.type&&t.type===e&&"function"===typeof t.Ha}function rh(t){return m(t)&&"string"===typeof t.uid}function ih(t,e,n,r){return{name:n||"",K:t.K+" or "+e.K,optional:!!r,M:function(n){return t.M(n)||e.M(n)}}}function oh(t,e){for(var n in e){var r=e[n].name;t[r]=uh(r,t[n],e[n].j)}}function ah(t,e){for(var n in e){var r=e[n].name;r!==n&&Object.defineProperty(t,r,{get:O((function(t){return this[t]}
2),n),set:O((function(t,e,n,r){Kf(t,[n],[r],!0),this[e]=r}),r,n,e[n].kb),enumerable:!0})}}function sh(t,e,n,r){t[e]=uh(e,n,r)}function uh(t,e,n){function r(){var t=Array.prototype.slice.call(arguments);return Kf(o,n,t),e.apply(this,t)}if(!n)return e;var i,o=function(t){return(t=t.split("."))[t.length-1]}(t);for(i in e)r[i]=e[i];for(i in e.prototype)r.prototype[i]=e.prototype[i];return r}oh(ff.prototype,{jb:{name:"applyActionCode",j:[Xf("code")]},Ra:{name:"checkActionCode",j:[Xf("code")]},nb:{name:"confirmPasswordReset",j:[Xf("code"),Xf("newPassword")]},dc:{name:"createUserWithEmailAndPassword",j:[Xf("email"),Xf("password")]},hc:{name:"fetchSignInMethodsForEmail",j:[Xf("email")]},qa:{name:"getRedirectResult",j:[]},Bc:{name:"isSignInWithEmailLink",j:[Xf("emailLink")]},Hc:{name:"onAuthStateChanged",j:[ih(Jf(),Zf(),"nextOrObserver"),Zf("opt_error",!0),Zf("opt_completed",!0)]},Ic:{name:"onIdTokenChanged",j:[ih(Jf(),Zf(),"nextOrObserver"),Zf("opt_error",!0),Zf("opt_completed",!0)]},vb:{name:"sendPasswordResetEmail",j:[Xf("email"),ih(Jf("opt_actionCodeSettings",!0),th(null,!0),"opt_actionCodeSettings",!0)]},wb:{name:"sendSignInLinkToEmail",j:[Xf("email"),Jf("actionCodeSettings")]},xb:{name:"setPersistence",j:[Xf("persistence")]},Sc:{name:"signInAndRetrieveDataWithCredential",j:[eh()]},zb:{name:"signInAnonymously",j:[]},$a:{name:"signInWithCredential",j:[eh()]},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(t){return!(!t||"string"!==typeof t.type||"function"!==typeof t.verify)}}]},Xc:{name:"signInWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Yc:{name:"signInWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},dd:{name:"updateCurrentUser",j:[ih({name:"user",K:"an instance of Firebase User",optional:!1,M:function(t){return!!(t&&t instanceof Tl)}},th(),"user")]},Ab:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[Xf(null,!0)]},fd:{name:"useDeviceLanguage",j:[]},gd:{name:"useEmulator",j:[Xf("url"),Jf("options",!0)]},jd:{name:"verifyPasswordResetCode",j:[Xf("code")]}}),ah(ff.prototype,{lc:{name:"languageCode",kb:ih(Xf(),th(),"languageCode")},ti:{name:"tenantId",kb:ih(Xf(),th(),"tenantId")}}),ff.Persistence=rc,ff.Persistence.LOCAL="local",ff.Persistence.SESSION="session",ff.Persistence.NONE="none",oh(Tl.prototype,{delete:{name:"delete",j:[]},oc:{name:"getIdTokenResult",j:[$f("opt_forceRefresh",!0)]},I:{name:"getIdToken",j:[$f("opt_forceRefresh",!0)]},Cc:{name:"linkAndRetrieveDataWithCredential",j:[eh()]},qb:{name:"linkWithCredential",j:[eh()]},Dc:{name:"linkWithPhoneNumber",j:[Xf("phoneNumber"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(t){return!(!t||"string"!==typeof t.type||"function"!==typeof t.verify)}}]},Ec:{name:"linkWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Fc:{name:"linkWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Lc:{name:"reauthenticateAndRetrieveDataWithCredential",j:[eh()]},tb:{name:"reauthenticateWithCredential",j:[eh()]},Mc:{name:"reauthenticateWithPhoneNumber",j:[Xf("phoneNumber"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(t){return!(!t||"string"!==typeof t.type||"function"!==typeof t.verify)}}]},Nc:{name:"reauthenticateWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Oc:{name:"reauthenticateWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},reload:{name:"reload",j:[]},ub:{name:"sendEmailVerification",j:[ih(Jf("opt_actionCodeSettings",!0),th(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[Xf(null,!0)]},cd:{name:"unlink",j:[Xf("provider")]},Bb:{name:"updateEmail",j:[Xf("email")]},Cb:{name:"updatePassword",j:[Xf("password")]},ed:{name:"updatePhoneNumber",j:[eh("phone")]},Db:{name:"updateProfile",j:[Jf("profile")]},Eb:{name:"verifyBeforeUpdateEmail",j:[Xf("email"),ih(Jf("opt_actionCodeSettings",!0),th(null,!0),"opt_actionCodeSettings",!0)]}}),oh(kf.prototype,{execute:{name:"execute"},render:{name:"render"}
2,reset:{name:"reset"},getResponse:{name:"getResponse"}}),oh(Sf.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),oh(Ee.prototype,{oa:{name:"finally"},o:{name:"catch"},then:{name:"then"}}),ah(el.prototype,{appVerificationDisabled:{name:"appVerificationDisabledForTesting",kb:$f("appVerificationDisabledForTesting")}}),oh(nl.prototype,{confirm:{name:"confirm",j:[Xf("verificationCode")]}}),sh(fo,"fromJSON",(function(t){t="string"===typeof t?JSON.parse(t):t;for(var e,n=[bo,jo,Lo,mo],r=0;r<n.length;r++)if(e=n[r](t))return e;return null}),[ih(Xf(),Jf(),"json")]),sh(Ao,"credential",(function(t,e){return new Po(t,e)}),[Xf("email"),Xf("password")]),oh(Po.prototype,{w:{name:"toJSON",j:[Xf(null,!0)]}}),oh(Oo.prototype,{Ca:{name:"addScope",j:[Xf("scope")]},Ka:{name:"setCustomParameters",j:[Jf("customOAuthParameters")]}}),sh(Oo,"credential",To,[ih(Xf(),Jf(),"token")]),sh(Ao,"credentialWithLink",Do,[Xf("email"),Xf("emailLink")]),oh(So.prototype,{Ca:{name:"addScope",j:[Xf("scope")]},Ka:{name:"setCustomParameters",j:[Jf("customOAuthParameters")]}}),sh(So,"credential",ko,[ih(Xf(),Jf(),"token")]),oh(Io.prototype,{Ca:{name:"addScope",j:[Xf("scope")]},Ka:{name:"setCustomParameters",j:[Jf("customOAuthParameters")]}}),sh(Io,"credential",Co,[ih(Xf(),ih(Jf(),th()),"idToken"),ih(Xf(),th(),"accessToken",!0)]),oh(No.prototype,{Ka:{name:"setCustomParameters",j:[Jf("customOAuthParameters")]}}),sh(No,"credential",xo,[ih(Xf(),Jf(),"token"),Xf("secret",!0)]),oh(Eo.prototype,{Ca:{name:"addScope",j:[Xf("scope")]},credential:{name:"credential",j:[ih(Xf(),ih(Jf(),th()),"optionsOrIdToken"),ih(Xf(),th(),"accessToken",!0)]},Ka:{name:"setCustomParameters",j:[Jf("customOAuthParameters")]}}),oh(yo.prototype,{w:{name:"toJSON",j:[Xf(null,!0)]}}),oh(po.prototype,{w:{name:"toJSON",j:[Xf(null,!0)]}}),sh(Uo,"credential",Vo,[Xf("verificationId"),Xf("verificationCode")]),oh(Uo.prototype,{fb:{name:"verifyPhoneNumber",j:[ih(Xf(),{name:"phoneInfoOptions",K:"valid phone info options",optional:!1,M:function(t){return!!t&&(t.session&&t.phoneNumber?nh(t.session,co)&&"string"===typeof t.phoneNumber:t.session&&t.multiFactorHint?nh(t.session,lo)&&rh(t.multiFactorHint):t.session&&t.multiFactorUid?nh(t.session,lo)&&"string"===typeof t.multiFactorUid:!!t.phoneNumber&&"string"===typeof t.phoneNumber)}},"phoneInfoOptions"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(t){return!(!t||"string"!==typeof t.type||"function"!==typeof t.verify)}}]}}),oh(Mo.prototype,{w:{name:"toJSON",j:[Xf(null,!0)]}}),oh(I.prototype,{toJSON:{name:"toJSON",j:[Xf(null,!0)]}}),oh(Qo.prototype,{toJSON:{name:"toJSON",j:[Xf(null,!0)]}}),oh(Ko.prototype,{toJSON:{name:"toJSON",j:[Xf(null,!0)]}}),oh(ul.prototype,{toJSON:{name:"toJSON",j:[Xf(null,!0)]}}),oh(ol.prototype,{Rc:{name:"resolveSignIn",j:[{name:"multiFactorAssertion",K:"a valid multiFactorAssertion",optional:!1,M:function(t){return!!t&&!!t.sb}}]}}),oh(pl.prototype,{Rb:{name:"getSession",j:[]},fc:{name:"enroll",j:[{name:"multiFactorAssertion",K:"a valid multiFactorAssertion",optional:!1,M:function(t){return!!t&&!!t.sb}},Xf("displayName",!0)]},bd:{name:"unenroll",j:[ih({name:"multiFactorInfo",K:"a valid multiFactorInfo",optional:!1,M:rh},Xf(),"multiFactorInfoIdentifier")]}}),oh(Yf.prototype,{clear:{name:"clear",j:[]},render:{name:"render",j:[]},verify:{name:"verify",j:[]}}),sh(Oi,"parseLink",Pi,[Xf("link")]),sh(jf,"assertion",(function(t){return new hl(t)}),[eh("phone")]),function(){if("undefined"===typeof e.a||!e.a.INTERNAL||!e.a.INTERNAL.registerComponent)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var t={ActionCodeInfo:{Operation:{EMAIL_SIGNIN:fi,PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:li,VERIFY_AND_CHANGE_EMAIL:hi,VERIFY_EMAIL:"VERIFY_EMAIL"}},Auth:ff,AuthCredential:fo,Error:I};sh(t,"EmailAuthProvider",Ao,[]),sh(t,"FacebookAuthProvider",Oo,[]),sh(t,"GithubAuthProvider",So,[]),sh(t,"GoogleAuthProvider",Io,[]),sh(t,"TwitterAuthProvider",No,[]),sh(t,"OAuthProvider",Eo,[Xf("providerId")]),sh(t,"SAMLAuthProvider",_o,[Xf("providerId")]),sh(t,"PhoneAuthProvider",
2Uo,[{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(t){return!!(t&&t instanceof ff)}}]),sh(t,"RecaptchaVerifier",Yf,[ih(Xf(),{name:"",K:"an HTML element",optional:!1,M:function(t){return!!(t&&t instanceof Element)}},"recaptchaContainer"),Jf("recaptchaParameters",!0),{name:"app",K:"an instance of Firebase App",optional:!0,M:function(t){return!!(t&&t instanceof e.a.app.App)}}]),sh(t,"ActionCodeURL",Oi,[]),sh(t,"PhoneMultiFactorGenerator",jf,[]),e.a.INTERNAL.registerComponent({name:"auth",instanceFactory:function(t){return new ff(t=t.getProvider("app").getImmediate())},multipleInstances:!1,serviceProps:t,instantiationMode:"LAZY",type:"PUBLIC"}),e.a.INTERNAL.registerComponent({name:"auth-internal",instanceFactory:function(t){return{getUid:E((t=t.getProvider("auth").getImmediate()).getUid,t),getToken:E(t.nc,t),addAuthTokenListener:E(t.cc,t),removeAuthTokenListener:E(t.Pc,t)}},multipleInstances:!1,instantiationMode:"LAZY",type:"PRIVATE"}),e.a.registerVersion("@firebase/auth","0.16.4"),e.a.INTERNAL.extendNamespace({User:Tl})}()}).apply("undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})}).call(this,n(37))},function(t,e,n){"use strict";(function(t,e){var r=n(6),i=n(0),o=n(2),a=n(13),s=n(14),u=function(){function t(t){this.domStorage_=t,this.prefix_="firebase:"}return t.prototype.set=function(t,e){null==e?this.domStorage_.removeItem(this.prefixedName_(t)):this.domStorage_.setItem(this.prefixedName_(t),Object(o.J)(e))},t.prototype.get=function(t){var e=this.domStorage_.getItem(this.prefixedName_(t));return null==e?null:Object(o.D)(e)},t.prototype.remove=function(t){this.domStorage_.removeItem(this.prefixedName_(t))},t.prototype.prefixedName_=function(t){return this.prefix_+t},t.prototype.toString=function(){return this.domStorage_.toString()},t}(),c=function(){function t(){this.cache_={},this.isInMemoryStorage=!0}return t.prototype.set=function(t,e){null==e?delete this.cache_[t]:this.cache_[t]=e},t.prototype.get=function(t){return Object(o.k)(this.cache_,t)?this.cache_[t]:null},t.prototype.remove=function(t){delete this.cache_[t]},t}(),l=function(t){try{if("undefined"!==typeof window&&"undefined"!==typeof window[t]){var e=window[t];return e.setItem("firebase:sentinel","cache"),e.removeItem("firebase:sentinel"),new u(e)}}catch(n){}return new c},f=l("localStorage"),h=l("sessionStorage"),d=new a.b("@firebase/database"),p=function(){var t=1;return function(){return t++}}(),v=function(t){var e=Object(o.I)(t),n=new o.d;n.update(e);var r=n.digest();return o.h.encodeByteArray(r)},m=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var r="",i=0;i<e.length;i++){var a=e[i];Array.isArray(a)||a&&"object"===typeof a&&"number"===typeof a.length?r+=t.apply(null,a):r+="object"===typeof a?Object(o.J)(a):a,r+=" "}return r},y=null,g=!0,b=function(t,e){Object(o.f)(!e||!0===t||!1===t,"Can't turn on custom loggers persistently."),!0===t?(d.logLevel=a.a.VERBOSE,y=d.log.bind(d),e&&h.set("logging_enabled",!0)):"function"===typeof t?y=t:(y=null,h.remove("logging_enabled"))},w=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!0===g&&(g=!1,null===y&&!0===h.get("logging_enabled")&&b(!0)),y){var n=m.apply(null,t);y(n)}},_=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];w.apply(void 0,Object(i.f)([t],e))}},E=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE INTERNAL ERROR: "+m.apply(void 0,Object(i.f)(t));d.error(n)},O=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE FATAL ERROR: "+m.apply(void 0,Object(i.f)(t));throw d.error(n),new Error(n)},T=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE WARNING: "+m.apply(void 0,Object(i.f)(t));d.warn(n)},S=function(t){return"number"===typeof t&&(t!==t||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY)},k="[MIN_NAME]",I="[MAX_NAME]",C=function(t,e){if(t===e)return 0;if(t===k||e===I)return-1;if(e===k||t===I)return 1;var n=F(t),r=F(e);return null!==n?null!==r?n-r===0?t.length-e.length:n-r:-1:null!==r?1:t<e?-1:1},N=function(t,e){return t===e?0:t<e?-1:1},x=function(t,e){if(e&&t in e)return e[t];throw new Error("Missing required key ("+t+") in object: "+Object(o.J)(e))},P=function t(e){if("object"!==typeof e||null===e)return Object(o.J)(e);var n=[];for(var r in e)n.push(r);n.sort();for(var i="{",a=0;a<n.length;
2a++)0!==a&&(i+=","),i+=Object(o.J)(n[a]),i+=":",i+=t(e[n[a]]);return i+="}"},j=function(t,e){var n=t.length;if(n<=e)return[t];for(var r=[],i=0;i<n;i+=e)i+e>n?r.push(t.substring(i,n)):r.push(t.substring(i,i+e));return r};function A(t,e){for(var n in t)t.hasOwnProperty(n)&&e(n,t[n])}var D=function(t){Object(o.f)(!S(t),"Invalid JSON number");var e,n,r,i,a,s=1023;0===t?(n=0,r=0,e=1/t===-1/0?1:0):(e=t<0,(t=Math.abs(t))>=Math.pow(2,-1022)?(n=(i=Math.min(Math.floor(Math.log(t)/Math.LN2),s))+s,r=Math.round(t*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,r=Math.round(t/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(e?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()},R=new RegExp("^-?(0*)\\d{1,10}$"),M=-2147483648,L=2147483647,F=function(t){if(R.test(t)){var e=Number(t);if(e>=M&&e<=L)return e}return null},U=function(t){try{t()}catch(e){setTimeout((function(){var t=e.stack||"";throw T("Exception was thrown by user callback.",t),e}),Math.floor(0))}},V=function(t,e){var n=setTimeout(t,e);return"object"===typeof n&&n.unref&&n.unref(),n},B=function(){function t(t,e){if(void 0===e){this.pieces_=t.split("/");for(var n=0,r=0;r<this.pieces_.length;r++)this.pieces_[r].length>0&&(this.pieces_[n]=this.pieces_[r],n++);this.pieces_.length=n,this.pieceNum_=0}else this.pieces_=t,this.pieceNum_=e}return t.prototype.toString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+this.pieces_[e]);return t||"/"},t}();function q(){return new B("")}function z(t){return t.pieceNum_>=t.pieces_.length?null:t.pieces_[t.pieceNum_]}function W(t){return t.pieces_.length-t.pieceNum_}function H(t){var e=t.pieceNum_;return e<t.pieces_.length&&e++,new B(t.pieces_,e)}function G(t){return t.pieceNum_<t.pieces_.length?t.pieces_[t.pieces_.length-1]:null}function Y(t){for(var e="",n=t.pieceNum_;n<t.pieces_.length;n++)""!==t.pieces_[n]&&(e+="/"+encodeURIComponent(String(t.pieces_[n])));return e||"/"}function K(t,e){return void 0===e&&(e=0),t.pieces_.slice(t.pieceNum_+e)}function Q(t){if(t.pieceNum_>=t.pieces_.length)return null;for(var e=[],n=t.pieceNum_;n<t.pieces_.length-1;n++)e.push(t.pieces_[n]);return new B(e,0)}function X(t,e){for(var n=[],r=t.pieceNum_;r<t.pieces_.length;r++)n.push(t.pieces_[r]);if(e instanceof B)for(r=e.pieceNum_;r<e.pieces_.length;r++)n.push(e.pieces_[r]);else{var i=e.split("/");for(r=0;r<i.length;r++)i[r].length>0&&n.push(i[r])}return new B(n,0)}function $(t){return t.pieceNum_>=t.pieces_.length}function J(t,e){var n=z(t),r=z(e);if(null===n)return e;if(n===r)return J(H(t),H(e));throw new Error("INTERNAL ERROR: innerPath ("+e+") is not within outerPath ("+t+")")}function Z(t,e){for(var n=K(t,0),r=K(e,0),i=0;i<n.length&&i<r.length;i++){var o=C(n[i],r[i]);if(0!==o)return o}return n.length===r.length?0:n.length<r.length?-1:1}function tt(t,e){if(W(t)!==W(e))return!1;for(var n=t.pieceNum_,r=e.pieceNum_;n<=t.pieces_.length;n++,r++)if(t.pieces_[n]!==e.pieces_[r])return!1;return!0}function et(t,e){var n=t.pieceNum_,r=e.pieceNum_;if(W(t)>W(e))return!1;for(;n<t.pieces_.length;){if(t.pieces_[n]!==e.pieces_[r])return!1;++n,++r}return!0}var nt=function(){function t(t,e){this.errorPrefix_=e,this.parts_=K(t,0),this.byteLength_=Math.max(1,this.parts_.length);for(var n=0;n<this.parts_.length;n++)this.byteLength_+=Object(o.H)(this.parts_[n]);this.checkValid_()}return Object.defineProperty(t,"MAX_PATH_DEPTH",{get:function(){return 32},enumerable:!1,configurable:!0}),Object.defineProperty(t,"MAX_PATH_LENGTH_BYTES",{get:function(){return 768},enumerable:!1,configurable:!0}),t.prototype.push=function(t){this.parts_.length>0&&(this.byteLength_+=1),this.parts_.push(t),this.byteLength_+=Object(o.H)(t),this.checkValid_()},t.prototype.pop=function(){var t=this.parts_.pop();this.byteLength_-=Object(o.H)(t),this.parts_.length>0&&(this.byteLength_-=1)},t.prototype.checkValid_=function(){if(this.byteLength_>t.MAX_PATH_LENGTH_BYTES)throw new Error(this.errorPrefix_+"has a key path longer than "+t.MAX_PATH_LENGTH_BYTES+" bytes ("+this.byteLength_+").");
2if(this.parts_.length>t.MAX_PATH_DEPTH)throw new Error(this.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+t.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString())},t.prototype.toErrorString=function(){return 0===this.parts_.length?"":"in property '"+this.parts_.join(".")+"'"},t}(),rt="5",it=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,ot="websocket",at="long_polling",st=function(){function t(t,e,n,r,i,o,a){void 0===i&&(i=!1),void 0===o&&(o=""),void 0===a&&(a=!1),this.secure=e,this.namespace=n,this.webSocketOnly=r,this.nodeAdmin=i,this.persistenceKey=o,this.includeNamespaceInQueryParams=a,this.host=t.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.internalHost=f.get("host:"+t)||this.host}return t.prototype.needsQueryParam=function(){return this.host!==this.internalHost||this.isCustomHost()||this.includeNamespaceInQueryParams},t.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},t.prototype.isDemoHost=function(){return"firebaseio-demo.com"===this.domain},t.prototype.isCustomHost=function(){return"firebaseio.com"!==this.domain&&"firebaseio-demo.com"!==this.domain},t.prototype.updateHost=function(t){t!==this.internalHost&&(this.internalHost=t,this.isCacheableHost()&&f.set("host:"+this.host,this.internalHost))},t.prototype.connectionURL=function(t,e){var n;if(Object(o.f)("string"===typeof t,"typeof type must == string"),Object(o.f)("object"===typeof e,"typeof params must == object"),t===ot)n=(this.secure?"wss://":"ws://")+this.internalHost+"/.ws?";else{if(t!==at)throw new Error("Unknown connection type: "+t);n=(this.secure?"https://":"http://")+this.internalHost+"/.lp?"}this.needsQueryParam()&&(e.ns=this.namespace);var r=[];return A(e,(function(t,e){r.push(t+"="+e)})),n+r.join("&")},t.prototype.toString=function(){var t=this.toURLString();return this.persistenceKey&&(t+="<"+this.persistenceKey+">"),t},t.prototype.toURLString=function(){var t=this.secure?"https://":"http://",e=this.includeNamespaceInQueryParams?"?ns="+this.namespace:"";return""+t+this.host+"/"+e},t}();var ut,ct,lt=function(t,e){var n=ft(t),r=n.namespace;"firebase.com"===n.domain&&O(n.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),r&&"undefined"!==r||"localhost"===n.domain||O("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:")&&T("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 st(n.host,n.secure,r,e,i,"",r!==n.subdomain),path:new B(n.pathString)}},ft=function(t){var e="",n="",r="",o="",a="",s=!0,u="https",c=443;if("string"===typeof t){var l=t.indexOf("//");l>=0&&(u=t.substring(0,l-1),t=t.substring(l+2));var f=t.indexOf("/");-1===f&&(f=t.length);var h=t.indexOf("?");-1===h&&(h=t.length),e=t.substring(0,Math.min(f,h)),f<h&&(o=function(t){for(var e="",n=t.split("/"),r=0;r<n.length;r++)if(n[r].length>0){var i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch(o){}e+="/"+i}return e}(t.substring(f,h)));var d=function(t){var e,n,r={};"?"===t.charAt(0)&&(t=t.substring(1));try{for(var o=Object(i.h)(t.split("&")),a=o.next();!a.done;a=o.next()){var s=a.value;if(0!==s.length){var u=s.split("=");2===u.length?r[decodeURIComponent(u[0])]=decodeURIComponent(u[1]):T("Invalid query segment '"+s+"' in query '"+t+"'")}}}catch(c){e={error:c}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}(t.substring(Math.min(t.length,h)));(l=e.indexOf(":"))>=0?(s="https"===u||"wss"===u,c=parseInt(e.substring(l+1),10)):l=e.length;var p=e.slice(0,l);if("localhost"===p.toLowerCase())n="localhost";else if(p.split(".").length<=2)n=p;else{var v=e.indexOf(".");r=e.substring(0,v).toLowerCase(),n=e.substring(v+1),a=r}"ns"in d&&(a=d.ns)}return{host:e,port:c,domain:n,subdomain:r,secure:s,scheme:u,pathString:o,namespace:a}},ht=/[\[\].#$\/\u0000-\u001F\u007F]/,dt=/[\[\].#$\u0000-\u001F\u007F]/,pt=10485760,vt=function(t){return"string"===typeof t&&0!==t.length&&!ht.test(t)},mt=function(t){return"string"===typeof t&&0!==t.length&&!dt.test(t)},yt=function(t){return null===t||"string"===typeof t||"number"===typeof t&&!S(t)||t&&"object"===typeof t&&Object(o.k)(t,".sv")},gt=function(t,e,n,r,i){i&&void 0===n||bt(Object(o.o)(t,e,i),n,r)},bt=function t(e,n,r){var i=r instanceof B?new nt(r,e):r;if(void 0===n)throw new Error(e+"contains undefined "+i.toErrorString());if("function"===typeof n)throw new Error(e+"contains a function "+i.toErrorString()+" with contents = "+n.toString());if(S(n))throw new Error(e+"contains "+n.toString()+" "+i.toErrorString());if("string"===typeof n&&n.length>pt/3&&Object(o.H)(n)>pt)throw new Error(e+"contains a string greater than "+"10485760 utf8 bytes "+i.toErrorString()+" ('"+n.substring(0,50)+"...')");if(n&&"object"===typeof n){var a=!1,s=!1;if(A(n,(function(n,r){if(".value"===n)a=!0;else if(".priority"!==n&&".sv"!==n&&(s=!0,!vt(n)))throw new Error(e+" contains an invali
2d key ("+n+") "+i.toErrorString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');i.push(n),t(e,r,i),i.pop()})),a&&s)throw new Error(e+' contains ".value" child '+i.toErrorString()+" in addition to actual children.")}},wt=function(t,e,n,r,i){if(!i||void 0!==n){var a=Object(o.o)(t,e,i);if(!n||"object"!==typeof n||Array.isArray(n))throw new Error(a+" must be an object containing the children to replace.");var s=[];A(n,(function(t,e){var n=new B(t);if(bt(a,e,X(r,n)),".priority"===G(n)&&!yt(e))throw new Error(a+"contains an invalid value for '"+n.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");s.push(n)})),function(t,e){var n,r;for(n=0;n<e.length;n++)for(var i=K(r=e[n]),o=0;o<i.length;o++)if(".priority"===i[o]&&o===i.length-1);else if(!vt(i[o]))throw new Error(t+"contains an invalid key ("+i[o]+") in path "+r.toString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');e.sort(Z);var a=null;for(n=0;n<e.length;n++){if(r=e[n],null!==a&&et(a,r))throw new Error(t+"contains a path "+a.toString()+" that is ancestor of another path "+r.toString());a=r}}(a,s)}},_t=function(t,e,n,r){if(!r||void 0!==n){if(S(n))throw new Error(Object(o.o)(t,e,r)+"is "+n.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!yt(n))throw new Error(Object(o.o)(t,e,r)+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},Et=function(t,e,n,r){if(!r||void 0!==n)switch(n){case"value":case"child_added":case"child_removed":case"child_changed":case"child_moved":break;default:throw new Error(Object(o.o)(t,e,r)+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}},Ot=function(t,e,n,r){if((!r||void 0!==n)&&!vt(n))throw new Error(Object(o.o)(t,e,r)+'was an invalid key = "'+n+'". Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").')},Tt=function(t,e,n,r){if((!r||void 0!==n)&&!mt(n))throw new Error(Object(o.o)(t,e,r)+'was an invalid path = "'+n+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},St=function(t,e,n,r){n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),Tt(t,e,n,r)},kt=function(t,e){if(".info"===z(e))throw new Error(t+" failed = Can't modify data under /.info/")},It=function(t,e,n){var r=n.path.toString();if("string"!==typeof n.repoInfo.host||0===n.repoInfo.host.length||!vt(n.repoInfo.namespace)&&"localhost"!==n.repoInfo.host.split(":")[0]||0!==r.length&&!function(t){return t&&(t=t.replace(/^\/*\.info(\/|$)/,"/")),mt(t)}(r))throw new Error(Object(o.o)(t,e,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')},Ct=function(t,e,n,r){if((!r||void 0!==n)&&"boolean"!==typeof n)throw new Error(Object(o.o)(t,e,r)+"must be a boolean.")},Nt=function(){function t(t,e){this.repo_=t,this.path_=e}return t.prototype.cancel=function(t){Object(o.K)("OnDisconnect.cancel",0,1,arguments.length),Object(o.L)("OnDisconnect.cancel",1,t,!0);var e=new o.a;return this.repo_.onDisconnectCancel(this.path_,e.wrapCallback(t)),e.promise},t.prototype.remove=function(t){Object(o.K)("OnDisconnect.remove",0,1,arguments.length),kt("OnDisconnect.remove",this.path_),Object(o.L)("OnDisconnect.remove",1,t,!0);var e=new o.a;return this.repo_.onDisconnectSet(this.path_,null,e.wrapCallback(t)),e.promise},t.prototype.set=function(t,e){Object(o.K)("OnDisconnect.set",1,2,arguments.length),kt("OnDisconnect.set",this.path_),gt("OnDisconnect.set",1,t,this.path_,!1),Object(o.L)("OnDisconnect.set",2,e,!0);var n=new o.a;return this.repo_.onDisconnectSet(this.path_,t,n.wrapCallback(e)),n.promise},t.prototype.setWithPriority=function(t,e,n){Object(o.K)("OnDisconnect.setWithPriority",2,3,arguments.length),kt("OnDisconnect.setWithPriority",this.path_),gt("OnDisconnect.setWithPriority",1,t,this.path_,!1),_t("OnDisconnect.setWithPriority",2,e,!1),Object(o.L)("OnDisconnect.setWithPriority",3,n,!0);var r=new o.a;return this.repo_.onDisconnectSetWithPriority(this.path_,t,e,r.wrapCallback(n)),r.promise},t.prototype.update=function(t,e){if(Object(o.K)("OnDisconnect.update",1,2,arguments.length),kt("OnDisconnect.update",this.path_),Array.isArray(t)){for(var n={},r=0;r<t.length;++r)n[""+r]=t[r];t=n,T("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.")}wt("OnDisconnect.update",1,t,this.path_,!1),Object(o.L)("OnDisconnect.update",2,e,!0);var i=new o.a;return this.repo_.onDisconnectUpdate(this.path_,t,i.wrapCallback(e)),i.promise},t}(),xt=function(){function t(t,e){this.committed=t,this.snapshot=e}return t.prototype.toJSON=function(){return Object(o.K)("TransactionResult.toJSON",0,1,arguments.length),{committed:this.committed,snapshot:this.snapshot.toJSON()}},t}(),Pt="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",jt=function(){var t=0,e=[];return function(n){var r,i=n===t;t=n;var a=new Array(8);for(r=7;r>=0;r--)a[r]=Pt.charAt(n%64),n=Math.floor(n/64);Object(o.f)(0===n,"Cannot push at time == 0");var s=a.join("");if(i){for(r=11;r>=0&&63===e[r];r--)e[r]=0;e[r]++}else for(r=0;r<12;r++)e[r]=Math.floor(64*Math.random());for(r=0;r<12;r++)s+=Pt.charAt(e[r]);return Object(o.f)(20===s.length,"nextPushId: Length should be 20."),s}}(),At=function(t){if("2147483647"===t)return"-";var e=F(t);if(null!=e)return""+(e+1);for(var n=new Array(t.length),r=0;r<n.length;r++)n[r]=t.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 I;var o=n[i],a=Pt.charAt(Pt.indexOf(o)+1);return n[i]=a,n.slice(0,i+1).join("")},Dt=function(t){if("-2147483648"===t)return k;var e=F(t);if(null!=e)return""+(e-1);for(var n=new Array(t.length),r=0;r<n.length;r++)n[r]=t.charAt(r);return"-"===n[n.length-1]?1===n.length?"2147483647":(delete n[n.length-1],n.join("")):(n[n.length-1]=Pt.charAt(Pt.indexOf(n[n.length-1])-1),n.join("")+"z".repeat(786-n.length))},Rt=function(){function t(t,e){this.name=t,this.node=e}return t.Wrap=function(e,n){return new t(e,n)},t}(),Mt=function(){function t(){}return t.prototype.getCompare=function(){return this.compare.bind(this)},t.prototype.indexedValueChanged=function(t,e){var n=new Rt(k,t),r=new Rt(k,e);return 0!==this.compare(n,r)},t.prototype.minPost=function(){return Rt.MIN},t}(),Lt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.c)(e,t),Object.defineProperty(e,"__EMPTY_NODE",{get:function(){return ut},set:function(t){ut=t}
2,enumerable:!1,configurable:!0}),e.prototype.compare=function(t,e){return C(t.name,e.name)},e.prototype.isDefinedOn=function(t){throw Object(o.g)("KeyIndex.isDefinedOn not expected to be called.")},e.prototype.indexedValueChanged=function(t,e){return!1},e.prototype.minPost=function(){return Rt.MIN},e.prototype.maxPost=function(){return new Rt(I,ut)},e.prototype.makePost=function(t,e){return Object(o.f)("string"===typeof t,"KeyIndex indexValue must always be a string."),new Rt(t,ut)},e.prototype.toString=function(){return".key"},e}(Mt),Ft=new Lt;var Ut,Vt,Bt,qt=function(t){return"number"===typeof t?"number:"+D(t):"string:"+t},zt=function(t){if(t.isLeafNode()){var e=t.val();Object(o.f)("string"===typeof e||"number"===typeof e||"object"===typeof e&&Object(o.k)(e,".sv"),"Priority must be a string or number.")}else Object(o.f)(t===ct||t.isEmpty(),"priority of unexpected type.");Object(o.f)(t===ct||t.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")},Wt=function(){function t(e,n){void 0===n&&(n=t.__childrenNodeConstructor.EMPTY_NODE),this.value_=e,this.priorityNode_=n,this.lazyHash_=null,Object(o.f)(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),zt(this.priorityNode_)}return Object.defineProperty(t,"__childrenNodeConstructor",{get:function(){return Ut},set:function(t){Ut=t},enumerable:!1,configurable:!0}),t.prototype.isLeafNode=function(){return!0},t.prototype.getPriority=function(){return this.priorityNode_},t.prototype.updatePriority=function(e){return new t(this.value_,e)},t.prototype.getImmediateChild=function(e){return".priority"===e?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.getChild=function(e){return $(e)?this:".priority"===z(e)?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.hasChild=function(){return!1},t.prototype.getPredecessorChildName=function(t,e){return null},t.prototype.updateImmediateChild=function(e,n){return".priority"===e?this.updatePriority(n):n.isEmpty()&&".priority"!==e?this:t.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,n).updatePriority(this.priorityNode_)},t.prototype.updateChild=function(e,n){var r=z(e);return null===r?n:n.isEmpty()&&".priority"!==r?this:(Object(o.f)(".priority"!==r||1===W(e),".priority must be the last token in a path"),this.updateImmediateChild(r,t.__childrenNodeConstructor.EMPTY_NODE.updateChild(H(e),n)))},t.prototype.isEmpty=function(){return!1},t.prototype.numChildren=function(){return 0},t.prototype.forEachChild=function(t,e){return!1},t.prototype.val=function(t){return t&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.priorityNode_.isEmpty()||(t+="priority:"+qt(this.priorityNode_.val())+":");var e=typeof this.value_;t+=e+":",t+="number"===e?D(this.value_):this.value_,this.lazyHash_=v(t)}return this.lazyHash_},t.prototype.getValue=function(){return this.value_},t.prototype.compareTo=function(e){return e===t.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof t.__childrenNodeConstructor?-1:(Object(o.f)(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))},t.prototype.compareToLeafNode_=function(e){var n=typeof e.value_,r=typeof this.value_,i=t.VALUE_TYPE_ORDER.indexOf(n),a=t.VALUE_TYPE_ORDER.indexOf(r);return Object(o.f)(i>=0,"Unknown leaf type: "+n),Object(o.f)(a>=0,"Unknown leaf type: "+r),i===a?"object"===r?0:this.value_<e.value_?-1:this.value_===e.value_?0:1:a-i},t.prototype.withIndex=function(){return this},t.prototype.isIndexed=function(){return!0},t.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode()){var e=t;return this.value_===e.value_&&this.priorityNode_.equals(e.priorityNode_)}return!1},t.VALUE_TYPE_ORDER=["object","boolean","number","string"],t}();var Ht,Gt,Yt=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.c)(e,t),e.prototype.compare=function(t,e){var n=t.node.getPriority(),r=e.node.getPriority(),i=n.compareTo(r);return 0===i?C(t.name,e.name):i},e.prototype.isDefinedOn=function(t){return!t.getPriority().isEmpty()},e.prototype.indexedValueChanged=function(t,e){return!t.getPriority().equals(e.getPriority())},e.prototype.minPost=function(){return Rt.MIN},e.prototype.maxPost=function(){return new Rt(I,new Wt("[PRIORITY-POST]",Bt))},e.prototype.makePost=function(t,e){var n=Vt(t);return new Rt(e,new Wt("[PRIORITY-POST]",n))},e.prototype.toString=function(){return".priority"},e}(Mt)),Kt=function(){function t(t,e,n,r,i){void 0===i&&(i=null),this.isReverse_=r,this.resultGenerator_=i,this.nodeStack_=[];for(var o=1;!t.isEmpty();)if(t=t,o=e?n(t.key,e):1,r&&(o*=-1),o<0)t=this.isReverse_?t.left:t.right;else{if(0===o){this.nodeStack_.push(t);break}this.nodeStack_.push(t),t=this.isReverse_?t.right:t.left}}return t.prototype.getNext=function(){if(0===this.nodeStack_.length)return null;var t,e=this.nodeStack_.pop();if(t=this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value},this.isReverse_)for(e=e.left;!e.isEmpty();)this.nodeStack_.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack_.push(e),e=e.left;return t},t.prototype.hasNext=function(){return this.nodeStack_.length>0},t.prototype.peek=function(){if(0===this.nodeStack_.length)return null;var t=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value}},t}(),Qt=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:$t.EMPTY_NODE,this.right=null!=o?o:$t.EMPTY_NODE}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,
2null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.count=function(){return this.left.count()+1+this.right.count()},t.prototype.isEmpty=function(){return!1},t.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||!!t(this.key,this.value)||this.right.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},t.prototype.min_=function(){return this.left.isEmpty()?this:this.left.min_()},t.prototype.minKey=function(){return this.min_().key},t.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},t.prototype.insert=function(t,e,n){var r=this,i=n(t,r.key);return(r=i<0?r.copy(null,null,null,r.left.insert(t,e,n),null):0===i?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.insert(t,e,n))).fixUp_()},t.prototype.removeMin_=function(){if(this.left.isEmpty())return $t.EMPTY_NODE;var t=this;return t.left.isRed_()||t.left.left.isRed_()||(t=t.moveRedLeft_()),(t=t.copy(null,null,null,t.left.removeMin_(),null)).fixUp_()},t.prototype.remove=function(t,e){var n,r;if(e(t,(n=this).key)<0)n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(t,e),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===e(t,n.key)){if(n.right.isEmpty())return $t.EMPTY_NODE;r=n.right.min_(),n=n.copy(r.key,r.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(t,e))}return n.fixUp_()},t.prototype.isRed_=function(){return this.color},t.prototype.fixUp_=function(){var t=this;return t.right.isRed_()&&!t.left.isRed_()&&(t=t.rotateLeft_()),t.left.isRed_()&&t.left.left.isRed_()&&(t=t.rotateRight_()),t.left.isRed_()&&t.right.isRed_()&&(t=t.colorFlip_()),t},t.prototype.moveRedLeft_=function(){var t=this.colorFlip_();return t.right.left.isRed_()&&(t=(t=(t=t.copy(null,null,null,null,t.right.rotateRight_())).rotateLeft_()).colorFlip_()),t},t.prototype.moveRedRight_=function(){var t=this.colorFlip_();return t.left.left.isRed_()&&(t=(t=t.rotateRight_()).colorFlip_()),t},t.prototype.rotateLeft_=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.rotateRight_=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.colorFlip_=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.checkMaxDepth_=function(){var t=this.check_();return Math.pow(2,t)<=this.count()+1},t.prototype.check_=function(){if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");
2if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");var t=this.left.check_();if(t!==this.right.check_())throw new Error("Black depths differ");return t+(this.isRed_()?0:1)},t.RED=!0,t.BLACK=!1,t}(),Xt=function(){function t(){}return t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.insert=function(t,e,n){return new Qt(t,e,null)},t.prototype.remove=function(t,e){return this},t.prototype.count=function(){return 0},t.prototype.isEmpty=function(){return!0},t.prototype.inorderTraversal=function(t){return!1},t.prototype.reverseTraversal=function(t){return!1},t.prototype.minKey=function(){return null},t.prototype.maxKey=function(){return null},t.prototype.check_=function(){return 0},t.prototype.isRed_=function(){return!1},t}(),$t=function(){function t(e,n){void 0===n&&(n=t.EMPTY_NODE),this.comparator_=e,this.root_=n}return t.prototype.insert=function(e,n){return new t(this.comparator_,this.root_.insert(e,n,this.comparator_).copy(null,null,Qt.BLACK,null,null))},t.prototype.remove=function(e){return new t(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,Qt.BLACK,null,null))},t.prototype.get=function(t){for(var e,n=this.root_;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key)))return n.value;e<0?n=n.left:e>0&&(n=n.right)}return null},t.prototype.getPredecessorKey=function(t){for(var e,n=this.root_,r=null;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}e<0?n=n.left:e>0&&(r=n,n=n.right)}throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")},t.prototype.isEmpty=function(){return this.root_.isEmpty()},t.prototype.count=function(){return this.root_.count()},t.prototype.minKey=function(){return this.root_.minKey()},t.prototype.maxKey=function(){return this.root_.maxKey()},t.prototype.inorderTraversal=function(t){return this.root_.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.root_.reverseTraversal(t)},t.prototype.getIterator=function(t){return new Kt(this.root_,null,this.comparator_,!1,t)},t.prototype.getIteratorFrom=function(t,e){return new Kt(this.root_,t,this.comparator_,!1,e)},t.prototype.getReverseIteratorFrom=function(t,e){return new Kt(this.root_,t,this.comparator_,!0,e)},t.prototype.getReverseIterator=function(t){return new Kt(this.root_,null,this.comparator_,!0,t)},t.EMPTY_NODE=new Xt,t}(),Jt=Math.log(2),Zt=function(){function t(t){var e;this.count=(e=t+1,parseInt(Math.log(e)/Jt,10)),this.current_=this.count-1;var n,r=(n=this.count,parseInt(Array(n+1).join("1"),2));this.bits_=t+1&r}return t.prototype.nextBitIsOne=function(){var t=!(this.bits_&1<<this.current_);return this.current_--,t},t}(),te=function(t,e,n,r){t.sort(e);var i=function e(r,i){var o,a,s=i-r;if(0===s)return null;if(1===s)return o=t[r],a=n?n(o):o,new Qt(a,o.node,Qt.BLACK,null,null);var u=parseInt(s/2,10)+r,c=e(r,u),l=e(u+1,i);return o=t[u],a=n?n(o):o,new Qt(a,o.node,Qt.BLACK,c,l)},o=function(e){for(var r=null,o=null,a=t.length,s=function(e,r){var o=a-e,s=a;a-=e;var c=i(o+1,s),l=t[o],f=n?n(l):l;u(new Qt(f,l.node,r,null,c))},u=function(t){r?(r.left=t,r=t):(o=t,r=t)},c=0;c<e.count;++c){var l=e.nextBitIsOne(),f=Math.pow(2,e.count-(c+1));l?s(f,Qt.BLACK):(s(f,Qt.BLACK),s(f,Qt.RED))}return o}(new Zt(t.length));return new $t(r||e,o)},ee={},ne=function(){function t(t,e){this.indexes_=t,this.indexSet_=e}return Object.defineProperty(t,"Default",{get:function(){return Object(o.f)(ee&&Yt,"ChildrenNode.ts has not been loaded"),Ht=Ht||new t({".priority":ee},{".priority":Yt})},enumerable:!1,configurable:!0}),t.prototype.get=function(t){var e=Object(o.G)(this.indexes_,t);if(!e)throw new Error("No index defined for "+t);return e instanceof $t?e:null},t.prototype.hasIndex=function(t){return Object(o.k)(this.indexSet_,t.toString())},t.prototype.addIndex=function(e,n){Object(o.f)(e!==Ft,"KeyIndex always exists and isn't meant to be added to the IndexMap.");for(var r,a=[],s=!1,u=n.getIterator(Rt.Wrap),c=u.getNext();c;)s=s||e.isDefinedOn(c.node),a.push(c),c=u.getNext();r=s?te(a,e.getCompare()):ee;var l=e.toString(),f=Object(i.a)({},this.indexSet_);f[l]=e;var h=Object(i.a)({},this.indexes_);return h[l]=r,new t(h,f)},t.prototype.addToIndexes=function(e,n){var r=this;return new t(Object(o.E)(this.indexes_,(function(t,i){var a=Object(o.G)(r.indexSet_,i);if(Object(o.f)(a,"Missing index implementation for "+i),t===ee){if(a.isDefinedOn(e.node)){for(var s=[],u=n.getIterator(Rt.Wrap),c=u.getNext();c;)c.name!==e.name&&s.push(c),c=u.getNext();return s.push(e),te(s,a.getCompare())}return ee}var l=n.get(e.name),f=t;return l&&(f=f.remove(new Rt(e.name,l))),f.insert(e,e.node)})),this.indexSet_)}
2,t.prototype.removeFromIndexes=function(e,n){return new t(Object(o.E)(this.indexes_,(function(t){if(t===ee)return t;var r=n.get(e.name);return r?t.remove(new Rt(e.name,r)):t})),this.indexSet_)},t}();function re(t,e){return C(t.name,e.name)}function ie(t,e){return C(t,e)}var oe=function(){function t(t,e,n){this.children_=t,this.priorityNode_=e,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&zt(this.priorityNode_),this.children_.isEmpty()&&Object(o.f)(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(t,"EMPTY_NODE",{get:function(){return Gt||(Gt=new t(new $t(ie),null,ne.Default))},enumerable:!1,configurable:!0}),t.prototype.isLeafNode=function(){return!1},t.prototype.getPriority=function(){return this.priorityNode_||Gt},t.prototype.updatePriority=function(e){return this.children_.isEmpty()?this:new t(this.children_,e,this.indexMap_)},t.prototype.getImmediateChild=function(t){if(".priority"===t)return this.getPriority();var e=this.children_.get(t);return null===e?Gt:e},t.prototype.getChild=function(t){var e=z(t);return null===e?this:this.getImmediateChild(e).getChild(H(t))},t.prototype.hasChild=function(t){return null!==this.children_.get(t)},t.prototype.updateImmediateChild=function(e,n){if(Object(o.f)(n,"We should always be passing snapshot nodes"),".priority"===e)return this.updatePriority(n);var r=new Rt(e,n),i=void 0,a=void 0;n.isEmpty()?(i=this.children_.remove(e),a=this.indexMap_.removeFromIndexes(r,this.children_)):(i=this.children_.insert(e,n),a=this.indexMap_.addToIndexes(r,this.children_));var s=i.isEmpty()?Gt:this.priorityNode_;return new t(i,s,a)},t.prototype.updateChild=function(t,e){var n=z(t);if(null===n)return e;Object(o.f)(".priority"!==z(t)||1===W(t),".priority must be the last token in a path");var r=this.getImmediateChild(n).updateChild(H(t),e);return this.updateImmediateChild(n,r)},t.prototype.isEmpty=function(){return this.children_.isEmpty()},t.prototype.numChildren=function(){return this.children_.count()},t.prototype.val=function(e){if(this.isEmpty())return null;var n={},r=0,i=0,o=!0;if(this.forEachChild(Yt,(function(a,s){n[a]=s.val(e),r++,o&&t.INTEGER_REGEXP_.test(a)?i=Math.max(i,Number(a)):o=!1})),!e&&o&&i<2*r){var a=[];for(var s in n)a[s]=n[s];return a}return e&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.getPriority().isEmpty()||(t+="priority:"+qt(this.getPriority().val())+":"),this.forEachChild(Yt,(function(e,n){var r=n.hash();""!==r&&(t+=":"+e+":"+r)})),this.lazyHash_=""===t?"":v(t)}return this.lazyHash_},t.prototype.getPredecessorChildName=function(t,e,n){var r=this.resolveIndex_(n);if(r){var i=r.getPredecessorKey(new Rt(t,e));return i?i.name:null}return this.children_.getPredecessorKey(t)},t.prototype.getFirstChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.minKey();return n&&n.name}return this.children_.minKey()},t.prototype.getFirstChild=function(t){var e=this.getFirstChildName(t);return e?new Rt(e,this.children_.get(e)):null},t.prototype.getLastChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.maxKey();return n&&n.name}return this.children_.maxKey()},t.prototype.getLastChild=function(t){var e=this.getLastChildName(t);return e?new Rt(e,this.children_.get(e)):null},t.prototype.forEachChild=function(t,e){var n=this.resolveIndex_(t);return n?n.inorderTraversal((function(t){return e(t.name,t.node)})):this.children_.inorderTraversal(e)},t.prototype.getIterator=function(t){return this.getIteratorFrom(t.minPost(),t)},t.prototype.getIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getIteratorFrom(t,(function(t){return t}));for(var r=this.children_.getIteratorFrom(t.name,Rt.Wrap),i=r.peek();null!=i&&e.compare(i,t)<0;)r.getNext(),i=r.peek();return r},t.prototype.getReverseIterator=function(t){return this.getReverseIteratorFrom(t.maxPost(),t)},t.prototype.getReverseIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getReverseIteratorFrom(t,(function(t){return t}));for(var r=this.children_.getReverseIteratorFrom(t.name,Rt.Wrap),i=r.peek();null!=i&&e.compare(i,t)>0;)r.getNext(),i=r.peek();return r},t.prototype.compareTo=function(t){return this.isEmpty()?t.isEmpty()?0:-1:t.isLeafNode()||t.isEmpty()?1:t===ae?-1:0},t.prototype.withIndex=function(e){if(e===Ft||this.indexMap_.hasIndex(e))return this;var n=this.indexMap_.addIndex(e,this.children_);return new t(this.children_,this.priorityNode_,n)},t.prototype.isIndexed=function(t){return t===Ft||this.indexMap_.hasIndex(t)},t.prototype.equals=function(t){if(t===this)return!0;
2if(t.isLeafNode())return!1;var e=t;if(this.getPriority().equals(e.getPriority())){if(this.children_.count()===e.children_.count()){for(var n=this.getIterator(Yt),r=e.getIterator(Yt),i=n.getNext(),o=r.getNext();i&&o;){if(i.name!==o.name||!i.node.equals(o.node))return!1;i=n.getNext(),o=r.getNext()}return null===i&&null===o}return!1}return!1},t.prototype.resolveIndex_=function(t){return t===Ft?null:this.indexMap_.get(t.toString())},t.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,t}(),ae=new(function(t){function e(){return t.call(this,new $t(ie),oe.EMPTY_NODE,ne.Default)||this}return Object(i.c)(e,t),e.prototype.compareTo=function(t){return t===this?0:1},e.prototype.equals=function(t){return t===this},e.prototype.getPriority=function(){return this},e.prototype.getImmediateChild=function(t){return oe.EMPTY_NODE},e.prototype.isEmpty=function(){return!1},e}(oe));Object.defineProperties(Rt,{MIN:{value:new Rt(k,oe.EMPTY_NODE)},MAX:{value:new Rt(I,ae)}}),Lt.__EMPTY_NODE=oe.EMPTY_NODE,Wt.__childrenNodeConstructor=oe,ct=ae,function(t){Bt=t}(ae);function se(t,e){if(void 0===e&&(e=null),null===t)return oe.EMPTY_NODE;if("object"===typeof t&&".priority"in t&&(e=t[".priority"]),Object(o.f)(null===e||"string"===typeof e||"number"===typeof e||"object"===typeof e&&".sv"in e,"Invalid priority type found: "+typeof e),"object"===typeof t&&".value"in t&&null!==t[".value"]&&(t=t[".value"]),"object"!==typeof t||".sv"in t)return new Wt(t,se(e));if(t instanceof Array){var n=oe.EMPTY_NODE;return A(t,(function(e,r){if(Object(o.k)(t,e)&&"."!==e.substring(0,1)){var i=se(r);!i.isLeafNode()&&i.isEmpty()||(n=n.updateImmediateChild(e,i))}})),n.updatePriority(se(e))}var r=[],i=!1;if(A(t,(function(t,e){if("."!==t.substring(0,1)){var n=se(e);n.isEmpty()||(i=i||!n.getPriority().isEmpty(),r.push(new Rt(t,n)))}})),0===r.length)return oe.EMPTY_NODE;var a=te(r,re,(function(t){return t.name}),ie);if(i){var s=te(r,Yt.getCompare());return new oe(a,se(e),new ne({".priority":s},{".priority":Yt}))}return new oe(a,se(e),ne.Default)}!function(t){Vt=t}(se);var ue=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.c)(e,t),e.prototype.compare=function(t,e){var n=t.node.compareTo(e.node);return 0===n?C(t.name,e.name):n},e.prototype.isDefinedOn=function(t){return!0},e.prototype.indexedValueChanged=function(t,e){return!t.equals(e)},e.prototype.minPost=function(){return Rt.MIN},e.prototype.maxPost=function(){return Rt.MAX},e.prototype.makePost=function(t,e){var n=se(t);return new Rt(e,n)},e.prototype.toString=function(){return".value"},e}(Mt)),ce=function(t){function e(e){var n=t.call(this)||this;return n.indexPath_=e,Object(o.f)(!$(e)&&".priority"!==z(e),"Can't create PathIndex with empty path or .priority key"),n}return Object(i.c)(e,t),e.prototype.extractChild=function(t){return t.getChild(this.indexPath_)},e.prototype.isDefinedOn=function(t){return!t.getChild(this.indexPath_).isEmpty()},e.prototype.compare=function(t,e){var n=this.extractChild(t.node),r=this.extractChild(e.node),i=n.compareTo(r);return 0===i?C(t.name,e.name):i},e.prototype.makePost=function(t,e){var n=se(t),r=oe.EMPTY_NODE.updateChild(this.indexPath_,n);return new Rt(e,r)},e.prototype.maxPost=function(){var t=oe.EMPTY_NODE.updateChild(this.indexPath_,ae);return new Rt(I,t)},e.prototype.toString=function(){return K(this.indexPath_,0).join("/")},e}(Mt),le=function(){function t(t,e,n){this.node_=t,this.ref_=e,this.index_=n}return t.prototype.val=function(){return Object(o.K)("DataSnapshot.val",0,0,arguments.length),this.node_.val()},t.prototype.exportVal=function(){return Object(o.K)("DataSnapshot.exportVal",0,0,arguments.length),this.node_.val(!0)},t.prototype.toJSON=function(){return Object(o.K)("DataSnapshot.toJSON",0,1,arguments.length),this.exportVal()},t.prototype.exists=function(){return Object(o.K)("DataSnapshot.exists",0,0,arguments.length),!this.node_.isEmpty()},t.prototype.child=function(e){Object(o.K)("DataSnapshot.child",0,1,arguments.length),e=String(e),Tt("DataSnapshot.child",1,e,!1);var n=new B(e),r=this.ref_.child(n);return new t(this.node_.getChild(n),r,Yt)},t.prototype.hasChild=function(t){Object(o.K)("DataSnapshot.hasChild",1,1,arguments.length),Tt("DataSnapshot.hasChild",1,t,!1);var e=new B(t);return!this.node_.getChild(e).isEmpty()},t.prototype.getPriority=function(){return Object(o.K)("DataSnapshot.getPriority",0,0,arguments.length),this.node_.getPriority().val()},t.prototype.forEach=function(e){var n=this;if(Object(o.K)("DataSnapshot.forEach",1,1,arguments.length),Object(o.L)("DataSnapshot.forEach",1,e,!1),this.node_.isLeafNode())return!1;var r=this.node_;return!!r.forEachChild(this.index_,(function(r,i){return e(new t(i,n.ref_.child(r),Yt))}))},t.prototype.hasChildren=function(){return Object(o.K)("DataSnapshot.hasChildren",0,0,arguments.length),!this.node_.isLeafNode()&&!this.node_.isEmpty()},Object.defineProperty(t.prototype,"key",{get:function(){return this.ref_.getKey()}
2,enumerable:!1,configurable:!0}),t.prototype.numChildren=function(){return Object(o.K)("DataSnapshot.numChildren",0,0,arguments.length),this.node_.numChildren()},t.prototype.getRef=function(){return Object(o.K)("DataSnapshot.ref",0,0,arguments.length),this.ref_},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!1,configurable:!0}),t}(),fe=function(){function t(t,e,n,r){this.eventType=t,this.eventRegistration=e,this.snapshot=n,this.prevName=r}return t.prototype.getPath=function(){var t=this.snapshot.getRef();return"value"===this.eventType?t.path:t.getParent().path},t.prototype.getEventType=function(){return this.eventType},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.getPath().toString()+":"+this.eventType+":"+Object(o.J)(this.snapshot.exportVal())},t}(),he=function(){function t(t,e,n){this.eventRegistration=t,this.error=e,this.path=n}return t.prototype.getPath=function(){return this.path},t.prototype.getEventType=function(){return"cancel"},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.path.toString()+":cancel"},t}(),de=function(){function t(t,e,n){this.callback_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){return"value"===t},t.prototype.createEvent=function(t,e){var n=e.getQueryParams().getIndex();return new fe("value",this,new le(t.snapshotNode,e.getRef(),n))},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){Object(o.f)(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callback_;return function(){r.call(e,t.snapshot)}},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new he(this,t,e):null},t.prototype.matches=function(e){return e instanceof t&&(!e.callback_||!this.callback_||e.callback_===this.callback_&&e.context_===this.context_)},t.prototype.hasAnyCallback=function(){return null!==this.callback_},t}(),pe=function(){function t(t,e,n){this.callbacks_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){var e="children_added"===t?"child_added":t;return e="children_removed"===e?"child_removed":e,Object(o.k)(this.callbacks_,e)},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new he(this,t,e):null},t.prototype.createEvent=function(t,e){Object(o.f)(null!=t.childName,"Child events should have a childName.");var n=e.getRef().child(t.childName),r=e.getQueryParams().getIndex();return new fe(t.type,this,new le(t.snapshotNode,n,r),t.prevName)},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){Object(o.f)(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callbacks_[t.eventType];return function(){r.call(e,t.snapshot,t.prevName)}},t.prototype.matches=function(e){var n=this;if(e instanceof t){if(!this.callbacks_||!e.callbacks_)return!0;if(this.context_===e.context_){var r=Object.keys(e.callbacks_),i=Object.keys(this.callbacks_),o=r.length;if(o===i.length){if(1===o){var a=r[0],s=i[0];return s===a&&(!e.callbacks_[a]||!this.callbacks_[s]||e.callbacks_[a]===this.callbacks_[s])}return i.every((function(t){return e.callbacks_[t]===n.callbacks_[t]}))}}}return!1},t.prototype.hasAnyCallback=function(){return null!==this.callbacks_},t}();function ve(t){return{type:"value",snapshotNode:t}}function me(t,e){return{type:"child_added",snapshotNode:e,childName:t}}function ye(t,e){return{type:"child_removed",snapshotNode:e,childName:t}}function ge(t,e,n){return{type:"child_changed",snapshotNode:e,childName:t,oldSnap:n}}var be,we=function(){function t(t){this.index_=t}return t.prototype.updateChild=function(t,e,n,r,i,a){Object(o.f)(t.isIndexed(this.index_),"A node must be indexed if only a child is updated");var s=t.getImmediateChild(e);return s.getChild(r).equals(n.getChild(r))&&s.isEmpty()===n.isEmpty()?t:(null!=a&&(n.isEmpty()?t.hasChild(e)?a.trackChildChange(ye(e,s)):Object(o.f)(t.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):s.isEmpty()?a.trackChildChange(me(e,n)):a.trackChildChange(ge(e,n,s))),t.isLeafNode()&&n.isEmpty()?t:t.updateImmediateChild(e,n).withIndex(this.index_))},t.prototype.updateFullNode=function(t,e,n){return null!=n&&(t.isLeafNode()||t.forEachChild(Yt,(function(t,r){e.hasChild(t)||n.trackChildChange(ye(t,r))})),e.isLeafNode()||e.forEachChild(Yt,(function(e,r){if(t.hasChild(e)){var i=t.getImmediateChild(e);i.equals(r)||n.trackChildChange(ge(e,r,i))}else n.trackChildChange(me(e,r))}))),e.withIndex(this.index_)},t.prototype.updatePriority=function(t,e){return t.isEmpty()?oe.EMPTY_NODE:t.updatePriority(e)},t.prototype.filtersNodes=function(){return!1},t.prototype.getIndexedFilter=function(){return this},t.prototype.getIndex=function(){return this.index_},t}
2(),_e=function(){function t(e){this.indexedFilter_=new we(e.getIndex()),this.index_=e.getIndex(),this.startPost_=t.getStartPost_(e),this.endPost_=t.getEndPost_(e)}return t.prototype.getStartPost=function(){return this.startPost_},t.prototype.getEndPost=function(){return this.endPost_},t.prototype.matches=function(t){return this.index_.compare(this.getStartPost(),t)<=0&&this.index_.compare(t,this.getEndPost())<=0},t.prototype.updateChild=function(t,e,n,r,i,o){return this.matches(new Rt(e,n))||(n=oe.EMPTY_NODE),this.indexedFilter_.updateChild(t,e,n,r,i,o)},t.prototype.updateFullNode=function(t,e,n){e.isLeafNode()&&(e=oe.EMPTY_NODE);var r=e.withIndex(this.index_);r=r.updatePriority(oe.EMPTY_NODE);var i=this;return e.forEachChild(Yt,(function(t,e){i.matches(new Rt(t,e))||(r=r.updateImmediateChild(t,oe.EMPTY_NODE))})),this.indexedFilter_.updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.indexedFilter_},t.prototype.getIndex=function(){return this.index_},t.getStartPost_=function(t){if(t.hasStart()){var e=t.getIndexStartName();return t.getIndex().makePost(t.getIndexStartValue(),e)}return t.getIndex().minPost()},t.getEndPost_=function(t){if(t.hasEnd()){var e=t.getIndexEndName();return t.getIndex().makePost(t.getIndexEndValue(),e)}return t.getIndex().maxPost()},t}(),Ee=function(){function t(t){this.rangedFilter_=new _e(t),this.index_=t.getIndex(),this.limit_=t.getLimit(),this.reverse_=!t.isViewFromLeft()}return t.prototype.updateChild=function(t,e,n,r,i,o){return this.rangedFilter_.matches(new Rt(e,n))||(n=oe.EMPTY_NODE),t.getImmediateChild(e).equals(n)?t:t.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(t,e,n,r,i,o):this.fullLimitUpdateChild_(t,e,n,i,o)},t.prototype.updateFullNode=function(t,e,n){var r;if(e.isLeafNode()||e.isEmpty())r=oe.EMPTY_NODE.withIndex(this.index_);else if(2*this.limit_<e.numChildren()&&e.isIndexed(this.index_)){r=oe.EMPTY_NODE.withIndex(this.index_);var i=void 0;i=this.reverse_?e.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):e.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);for(var o=0;i.hasNext()&&o<this.limit_;){var a=i.getNext();if(!(this.reverse_?this.index_.compare(this.rangedFilter_.getStartPost(),a)<=0:this.index_.compare(a,this.rangedFilter_.getEndPost())<=0))break;r=r.updateImmediateChild(a.name,a.node),o++}}else{r=(r=e.withIndex(this.index_)).updatePriority(oe.EMPTY_NODE);var s=void 0,u=void 0,c=void 0;i=void 0;if(this.reverse_){i=r.getReverseIterator(this.index_),s=this.rangedFilter_.getEndPost(),u=this.rangedFilter_.getStartPost();var l=this.index_.getCompare();c=function(t,e){return l(e,t)}}else i=r.getIterator(this.index_),s=this.rangedFilter_.getStartPost(),u=this.rangedFilter_.getEndPost(),c=this.index_.getCompare();o=0;for(var 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,oe.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.rangedFilter_.getIndexedFilter()},t.prototype.getIndex=function(){return this.index_},t.prototype.fullLimitUpdateChild_=function(t,e,n,r,i){var a;if(this.reverse_){var s=this.index_.getCompare();a=function(t,e){return s(e,t)}}else a=this.index_.getCompare();var u=t;Object(o.f)(u.numChildren()===this.limit_,"");var c=new Rt(e,n),l=this.reverse_?u.getFirstChild(this.index_):u.getLastChild(this.index_),f=this.rangedFilter_.matches(c);if(u.hasChild(e)){for(var h=u.getImmediateChild(e),d=r.getChildAfterChild(this.index_,l,this.reverse_);null!=d&&(d.name===e||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(ge(e,n,h)),u.updateImmediateChild(e,n);null!=i&&i.trackChildChange(ye(e,h));var v=u.updateImmediateChild(e,oe.EMPTY_NODE);return null!=d&&this.rangedFilter_.matches(d)?(null!=i&&i.trackChildChange(me(d.name,d.node)),v.updateImmediateChild(d.name,d.node)):v}return n.isEmpty()?t:f&&a(l,c)>=0?(null!=i&&(i.trackChildChange(ye(l.name,l.node)),i.trackChildChange(me(e,n))),u.updateImmediateChild(e,n).updateImmediateChild(l.name,oe.EMPTY_NODE)):t},t}(),Oe=function(){function t(){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_=Yt}return t.prototype.hasStart=function(){return this.startSet_},t.prototype.hasStartAfter=function(){return this.startAfterSet_},t.prototype.hasEndBefore=function(){return this.endBeforeSet_},t.prototype.isViewFromLeft=function(){return""===this.viewFrom_?this.startSet_:"l"===this.viewFrom_},t.prototype.getIndexStartValue=function(){return Object(o.f)(this.startSet_,"Only valid if start has been set"),this.indexStartValue_},t.prototype.getIndexStartName=function(){return Object(o.f)(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:k},t.prototype.hasEnd=function(){return this.endSet_},t.prototype.getIndexEndValue=function(){return Object(o.f)(this.endSet_,"Only valid if end has been set"),this.indexEndValue_},t.prototype.getIndexEndName=function(){return Object(o.f)(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:I},t.prototype.hasLimit=function(){return this.limitSet_},t.prototype.hasAnchoredLimit=function(){return this.limitSet_&&""!==this.viewFrom_},t.prototype.getLimit=function(){return Object(o.f)(this.limitSet_,"Only valid if limit has been set"),this.limit_},t.prototype.getIndex=function(){return this.index_},t.prototype.loadsAllData=function(){return!(this.startSet_||this.endSet_||this.limitSet_)},t.prototype.isDefault=function(){return this.loadsAllData()&&this.index_===Yt},t.prototype.copy=function(){var e=new t;return e.limitSet_=this.limitSet_,e.limit_=this.limit_,e.startSet_=this.startSet_,e.indexStartValue_=this.indexStartValue_,e.startNameSet_=this.startNameSet_,e.indexStartName_=this.indexStartName_,e.endSet_=this.endSet_,e.indexEndValue_=this.indexEndValue_,e.endNameSet_=this.endNameSet_,e.indexEndName_=this.indexEndName_,e.index_=this.index_,e.viewFrom_=this.viewFrom_,e},t}();function Te(t,e){var n=t.copy();return n.limitSet_=!0,n.limit_=e,n.viewFrom_="l",n}function Se(t,e){var n=t.copy();return n.limitSet_=!0,n.limit_=e,n.viewFrom_="r",n}function ke(t,e,n){var r=t.copy();return r.startSet_=!0,void 0===e&&(e=null),r.indexStartValue_=e,null!=n?(r.startNameSet_=!0,r.indexStartName_=n):(r.startNameSet_=!1,r.indexStartName_=""),r}function Ie(t,e,n){var r;if(t.index_===Ft)"string"===typeof e&&(e=At(e)),r=ke(t,e,n);else{r=ke(t,e,null==n?I:At(n))}return r.startAfterSet_=!0,r}function Ce(t,e,n){var r=t.copy();return r.endSet_=!0,void 0===e&&(e=null),r.indexEndValue_=e,void 0!==n?(r.endNameSet_=!0,r.indexEndName_=n):(r.endNameSet_=!1,r.indexEndName_=""),r}function Ne(t,e,n){var r;
2return t.index_===Ft?("string"===typeof e&&(e=Dt(e)),r=Ce(t,e,n)):r=Ce(t,e,null==n?k:Dt(n)),r.endBeforeSet_=!0,r}function xe(t,e){var n=t.copy();return n.index_=e,n}function Pe(t){var e,n={};return t.isDefault()||(t.index_===Yt?e="$priority":t.index_===ue?e="$value":t.index_===Ft?e="$key":(Object(o.f)(t.index_ instanceof ce,"Unrecognized index type!"),e=t.index_.toString()),n.orderBy=Object(o.J)(e),t.startSet_&&(n.startAt=Object(o.J)(t.indexStartValue_),t.startNameSet_&&(n.startAt+=","+Object(o.J)(t.indexStartName_))),t.endSet_&&(n.endAt=Object(o.J)(t.indexEndValue_),t.endNameSet_&&(n.endAt+=","+Object(o.J)(t.indexEndName_))),t.limitSet_&&(t.isViewFromLeft()?n.limitToFirst=t.limit_:n.limitToLast=t.limit_)),n}var je=function(){function t(t,e,n,r){this.repo=t,this.path=e,this.queryParams_=n,this.orderByCalled_=r}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return Object(o.f)(be,"Reference.ts has not been loaded"),be},set:function(t){be=t},enumerable:!1,configurable:!0}),t.validateQueryEndpoints_=function(t){var e=null,n=null;if(t.hasStart()&&(e=t.getIndexStartValue()),t.hasEnd()&&(n=t.getIndexEndValue()),t.getIndex()===Ft){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(t.hasStart()){if(t.getIndexStartName()!==k)throw new Error(r);if("string"!==typeof e)throw new Error(i)}if(t.hasEnd()){if(t.getIndexEndName()!==I)throw new Error(r);if("string"!==typeof n)throw new Error(i)}}else if(t.getIndex()===Yt){if(null!=e&&!yt(e)||null!=n&&!yt(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.f)(t.getIndex()instanceof ce||t.getIndex()===ue,"unknown index type."),null!=e&&"object"===typeof e||null!=n&&"object"===typeof n)throw new Error("Query: First argument passed to startAt(), startAfter(), endAt(), endBefore(), or equalTo() cannot be an object.")},t.validateLimit_=function(t){if(t.hasStart()&&t.hasEnd()&&t.hasLimit()&&!t.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), startAfter(), endAt(), endBefore(), and limit(). Use limitToFirst() or limitToLast() instead.")},t.prototype.validateNoPreviousOrderByCall_=function(t){if(!0===this.orderByCalled_)throw new Error(t+": You can't combine multiple orderBy calls.")},t.prototype.getQueryParams=function(){return this.queryParams_},t.prototype.getRef=function(){return Object(o.K)("Query.ref",0,0,arguments.length),new t.__referenceConstructor(this.repo,this.path)},t.prototype.on=function(e,n,r,i){Object(o.K)("Query.on",2,4,arguments.length),Et("Query.on",1,e,!1),Object(o.L)("Query.on",2,n,!1);var a=t.getCancelAndContextArgs_("Query.on",r,i);if("value"===e)this.onValueEvent(n,a.cancel,a.context);else{var s={};s[e]=n,this.onChildEvent(s,a.cancel,a.context)}return n},t.prototype.onValueEvent=function(t,e,n){var r=new de(t,e||null,n||null);this.repo.addEventCallbackForQuery(this,r)},t.prototype.onChildEvent=function(t,e,n){var r=new pe(t,e,n);this.repo.addEventCallbackForQuery(this,r)},t.prototype.off=function(t,e,n){Object(o.K)("Query.off",0,3,arguments.length),Et("Query.off",1,t,!0),Object(o.L)("Query.off",2,e,!0),Object(o.M)("Query.off",3,n,!0);var r=null,i=null;if("value"===t){var a=e||null;r=new de(a,null,n||null)}else t&&(e&&((i={})[t]=e),r=new pe(i,null,n||null));this.repo.removeEventCallbackForQuery(this,r)},t.prototype.get=function(){return this.repo.getValue(this)},t.prototype.once=function(e,n,r,i){var a=this;Object(o.K)("Query.once",1,4,arguments.length),Et("Query.once",1,e,!1),Object(o.L)("Query.once",2,n,!0);var s=t.getCancelAndContextArgs_("Query.once",r,i),u=!0,c=new o.a;c.promise.catch((function(){}));var l=function t(r){u&&(u=!1,a.off(e,t),n&&n.bind(s.context)(r),c.resolve(r))};return this.on(e,l,(function(t){a.off(e,l),s.cancel&&s.cancel.bind(s.context)(t),c.reject(t)})),c.promise},t.prototype.limitToFirst=function(e){if(Object(o.K)("Query.limitToFirst",1,1,arguments.length),"number"!==typeof e||Math.floor(e)!==e||e<=0)throw new Error("Query.limitToFirst: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToFirst: Limit was already set
2(by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,Te(this.queryParams_,e),this.orderByCalled_)},t.prototype.limitToLast=function(e){if(Object(o.K)("Query.limitToLast",1,1,arguments.length),"number"!==typeof e||Math.floor(e)!==e||e<=0)throw new Error("Query.limitToLast: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,Se(this.queryParams_,e),this.orderByCalled_)},t.prototype.orderByChild=function(e){if(Object(o.K)("Query.orderByChild",1,1,arguments.length),"$key"===e)throw new Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===e)throw new Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');if("$value"===e)throw new Error('Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.');Tt("Query.orderByChild",1,e,!1),this.validateNoPreviousOrderByCall_("Query.orderByChild");var n=new B(e);if($(n))throw new Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.");var r=new ce(n),i=xe(this.queryParams_,r);return t.validateQueryEndpoints_(i),new t(this.repo,this.path,i,!0)},t.prototype.orderByKey=function(){Object(o.K)("Query.orderByKey",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByKey");var e=xe(this.queryParams_,Ft);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByPriority=function(){Object(o.K)("Query.orderByPriority",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByPriority");var e=xe(this.queryParams_,Yt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByValue=function(){Object(o.K)("Query.orderByValue",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByValue");var e=xe(this.queryParams_,ue);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.startAt=function(e,n){void 0===e&&(e=null),Object(o.K)("Query.startAt",0,2,arguments.length),gt("Query.startAt",1,e,this.path,!0),Ot("Query.startAt",2,n,!0);var r=ke(this.queryParams_,e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasStart())throw new Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return void 0===e&&(e=null,n=null),new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.startAfter=function(e,n){void 0===e&&(e=null),Object(o.K)("Query.startAfter",0,2,arguments.length),gt("Query.startAfter",1,e,this.path,!1),Ot("Query.startAfter",2,n,!0);var r=Ie(this.queryParams_,e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasStart())throw new Error("Query.startAfter: Starting point was already set (by another call to startAt, startAfter or equalTo).");return new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.endAt=function(e,n){void 0===e&&(e=null),Object(o.K)("Query.endAt",0,2,arguments.length),gt("Query.endAt",1,e,this.path,!0),Ot("Query.endAt",2,n,!0);var r=Ce(this.queryParams_,e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasEnd())throw new Error("Query.endAt: Ending point was already set (by another call to endAt, endBefore, or equalTo).");return new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.endBefore=function(e,n){void 0===e&&(e=null),Object(o.K)("Query.endBefore",0,2,arguments.length),gt("Query.endBefore",1,e,this.path,!1),Ot("Query.endBefore",2,n,!0);var r=Ne(this.queryParams_,e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasEnd())throw new Error("Query.endBefore: Ending point was already set (by another call to endAt, endBefore, or equalTo).");return new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.equalTo=function(t,e){if(Object(o.K)("Query.equalTo",1,2,arguments.length),gt("Query.equalTo",1,t,this.path,!1),Ot("Query.equalTo",2,e,!0),this.queryParams_.hasStart())throw new Error("Query.equalTo: Starting point was already set
2(by another call to startAt/startAfter or equalTo).");if(this.queryParams_.hasEnd())throw new Error("Query.equalTo: Ending point was already set (by another call to endAt/endBefore or equalTo).");return this.startAt(t,e).endAt(t,e)},t.prototype.toString=function(){return Object(o.K)("Query.toString",0,0,arguments.length),this.repo.toString()+Y(this.path)},t.prototype.toJSON=function(){return Object(o.K)("Query.toJSON",0,1,arguments.length),this.toString()},t.prototype.queryObject=function(){return function(t){var e={};if(t.startSet_&&(e.sp=t.indexStartValue_,t.startNameSet_&&(e.sn=t.indexStartName_)),t.endSet_&&(e.ep=t.indexEndValue_,t.endNameSet_&&(e.en=t.indexEndName_)),t.limitSet_){e.l=t.limit_;var n=t.viewFrom_;""===n&&(n=t.isViewFromLeft()?"l":"r"),e.vf=n}return t.index_!==Yt&&(e.i=t.index_.toString()),e}(this.queryParams_)},t.prototype.queryIdentifier=function(){var t=this.queryObject(),e=P(t);return"{}"===e?"default":e},t.prototype.isEqual=function(e){if(Object(o.K)("Query.isEqual",1,1,arguments.length),!(e instanceof t)){var n="Query.isEqual failed: First argument must be an instance of firebase.database.Query.";throw new Error(n)}
2var r=this.repo===e.repo,i=tt(this.path,e.path),a=this.queryIdentifier()===e.queryIdentifier();return r&&i&&a},t.getCancelAndContextArgs_=function(t,e,n){var r={cancel:null,context:null};if(e&&n)r.cancel=e,Object(o.L)(t,3,r.cancel,!0),r.context=n,Object(o.M)(t,4,r.context,!0);else if(e)if("object"===typeof e&&null!==e)r.context=e;else{if("function"!==typeof e)throw new Error(Object(o.o)(t,3,!0)+" must either be a cancel callback or a context object.");r.cancel=e}return r},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!1,configurable:!0}),t}(),Ae=function(){function t(t){this.node_=t}return t.prototype.getImmediateChild=function(e){return new t(this.node_.getImmediateChild(e))},t.prototype.node=function(){return this.node_},t}(),De=function(){function t(t,e){this.syncTree_=t,this.path_=e}return t.prototype.getImmediateChild=function(e){var n=X(this.path_,e);return new t(this.syncTree_,n)},t.prototype.node=function(){return this.syncTree_.calcCompleteEventCache(this.path_)},t}(),Re=function(t,e,n){return t&&"object"===typeof t?(Object(o.f)(".sv"in t,"Unexpected leaf node or priority contents"),"string"===typeof t[".sv"]?Me(t[".sv"],e,n):"object"===typeof t[".sv"]?Le(t[".sv"],e):void Object(o.f)(!1,"Unexpected server value: "+JSON.stringify(t,null,2))):t},Me=function(t,e,n){switch(t){case"timestamp":return n.timestamp;default:Object(o.f)(!1,"Unexpected server value: "+t)}},Le=function(t,e,n){t.hasOwnProperty("increment")||Object(o.f)(!1,"Unexpected server value: "+JSON.stringify(t,null,2));var r=t.increment;"number"!==typeof r&&Object(o.f)(!1,"Unexpected increment value: "+r);var i=e.node();if(Object(o.f)(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},Fe=function(t,e,n,r){return Ve(e,new De(n,t),r)},Ue=function(t,e,n){return Ve(t,new Ae(e),n)};function Ve(t,e,n){var r,i=t.getPriority().val(),o=Re(i,e.getImmediateChild(".priority"),n);if(t.isLeafNode()){var a=t,s=Re(a.getValue(),e,n);return s!==a.getValue()||o!==a.getPriority().val()?new Wt(s,se(o)):t}var u=t;return r=u,o!==u.getPriority().val()&&(r=r.updatePriority(new Wt(o))),u.forEachChild(Yt,(function(t,i){var o=Ve(i,e.getImmediateChild(t),n);o!==i&&(r=r.updateImmediateChild(t,o))})),r}var Be,qe=function(){function t(){this.value=null,this.children=new Map}return t.prototype.find=function(t){if(null!=this.value)return this.value.getChild(t);if(!$(t)&&this.children.size>0){var e=z(t);return t=H(t),this.children.has(e)?this.children.get(e).find(t):null}return null},t.prototype.remember=function(e,n){if($(e))this.value=n,this.children.clear();else if(null!==this.value)this.value=this.value.updateChild(e,n);else{var r=z(e);this.children.has(r)||this.children.set(r,new t);var i=this.children.get(r);e=H(e),i.remember(e,n)}},t.prototype.forget=function(t){if($(t))return this.value=null,this.children.clear(),!0;if(null!==this.value){if(this.value.isLeafNode())return!1;var e=this.value;this.value=null;var n=this;return e.forEachChild(Yt,(function(t,e){n.remember(new B(t),e)})),this.forget(t)}if(this.children.size>0){var r=z(t);if(t=H(t),this.children.has(r))this.children.get(r).forget(t)&&this.children.delete(r);return 0===this.children.size}return!0},t.prototype.forEachTree=function(t,e){null!==this.value?e(t,this.value):this.forEachChild((function(n,r){var i=new B(t.toString()+"/"+n);r.forEachTree(i,e)}))},t.prototype.forEachChild=function(t){this.children.forEach((function(e,n){t(n,e)}))},t}();function ze(t){return{fromUser:!1,fromServer:!0,queryId:t,tagged:!0}}!function(t){t[t.OVERWRITE=0]="OVERWRITE",t[t.MERGE=1]="MERGE",t[t.ACK_USER_WRITE=2]="ACK_USER_WRITE",t[t.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(Be||(Be={}));var We,He=function(){function t(t,e,n){this.path=t,this.affectedTree=e,this.revert=n,this.type=Be.ACK_USER_WRITE,this.source={fromUser:!0,fromServer:!1,queryId:null,tagged:!1}}return t.prototype.operationForChild=function(e){if($(this.path)){if(null!=this.affectedTree.value)return Object(o.f)(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new B(e));return new t(q(),n,this.revert)}return Object(o.f)(z(this.path)===e,"operationForChild called for unrelated child."),new t(H(this.path),this.affectedTree,this.revert)},t}(),Ge=function(){function t(t,e){void 0===e&&(We||(We=new $t(N)),e=We),this.value=t,this.children=e}return t.fromObject=function(e){var n=new t(null);return A(e,(function(t,e){n=n.set(new B(t),e)})),n},t.prototype.isEmpty=function(){return null===this.value&&this.children.isEmpty()},t.prototype.findRootMostMatchingPathAndValue=function(t,e){if(null!=this.value&&e(this.value))return{path:q(),value:this.value};if($(t))return null;var n=z(t),r=this.children.get(n);if(null!==r){var i=r.findRootMostMatchingPathAndValue(H(t),e);return null!=i?{path:X(new B(n),i.path),value:i.value}:null}return null},t.prototype.findRootMostValueAndPath=function(t){return this.findRootMostMatchingPathAndValue(t,(function(){return!0}))},t.prototype.subtree=function(e){if($(e))return this;var n=z(e),r=this.children.get(n);return null!==r?r.subtree(H(e)):new t(null)},t.prototype.set=function(e,n){if($(e))return new t(n,this.children);var r=z(e),i=(this.children.get(r)||new t(null)).set(H(e),n),o=this.children.insert(r,i);return new t(this.value,o)},t.prototype.remove=function(e){if($(e))return this.children.isEmpty()?new t(null):new t(null,this.children);var n=z(e),r=this.children.get(n);if(r){var i=r.remove(H(e)),o=void 0;return o=i.isEmpty()?this.children.remove(n):this.children.insert(n,i),null===this.value&&o.isEmpty()?new t(null):new t(this.value,o)}return this},t.prototype.get=function(t){if($(t))return this.value;var e=z(t),n=this.children.get(e);return n?n.get(H(t)):null},t.prototype.setTree=function(e,n){if($(e))return n;var r=z(e),i=(this.children.get(r)||new t(null)).setTree(H(e),n),o=void 0;return o=i.isEmpty()?this.children.remove(r):this.children.insert(r,i),new t(this.value,o)},t.prototype.fold=function(t){return this.fold_(q(),t)}
2,t.prototype.fold_=function(t,e){var n={};return this.children.inorderTraversal((function(r,i){n[r]=i.fold_(X(t,r),e)})),e(t,this.value,n)},t.prototype.findOnPath=function(t,e){return this.findOnPath_(t,q(),e)},t.prototype.findOnPath_=function(t,e,n){var r=!!this.value&&n(e,this.value);if(r)return r;if($(t))return null;var i=z(t),o=this.children.get(i);return o?o.findOnPath_(H(t),X(e,i),n):null},t.prototype.foreachOnPath=function(t,e){return this.foreachOnPath_(t,q(),e)},t.prototype.foreachOnPath_=function(e,n,r){if($(e))return this;this.value&&r(n,this.value);var i=z(e),o=this.children.get(i);return o?o.foreachOnPath_(H(e),X(n,i),r):new t(null)},t.prototype.foreach=function(t){this.foreach_(q(),t)},t.prototype.foreach_=function(t,e){this.children.inorderTraversal((function(n,r){r.foreach_(X(t,n),e)})),this.value&&e(t,this.value)},t.prototype.foreachChild=function(t){this.children.inorderTraversal((function(e,n){n.value&&t(e,n.value)}))},t}(),Ye=function(){function t(t,e){this.source=t,this.path=e,this.type=Be.LISTEN_COMPLETE}return t.prototype.operationForChild=function(e){return $(this.path)?new t(this.source,q()):new t(this.source,H(this.path))},t}(),Ke=function(){function t(t,e,n){this.source=t,this.path=e,this.snap=n,this.type=Be.OVERWRITE}return t.prototype.operationForChild=function(e){return $(this.path)?new t(this.source,q(),this.snap.getImmediateChild(e)):new t(this.source,H(this.path),this.snap)},t}(),Qe=function(){function t(t,e,n){this.source=t,this.path=e,this.children=n,this.type=Be.MERGE}return t.prototype.operationForChild=function(e){if($(this.path)){var n=this.children.subtree(new B(e));return n.isEmpty()?null:n.value?new Ke(this.source,q(),n.value):new t(this.source,q(),n)}return Object(o.f)(z(this.path)===e,"Can't get a merge for a child not on the path of the operation"),new t(this.source,H(this.path),this.children)},t.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"},t}(),Xe=function(){function t(t,e,n){this.node_=t,this.fullyInitialized_=e,this.filtered_=n}return t.prototype.isFullyInitialized=function(){return this.fullyInitialized_},t.prototype.isFiltered=function(){return this.filtered_},t.prototype.isCompleteForPath=function(t){if($(t))return this.isFullyInitialized()&&!this.filtered_;var e=z(t);return this.isCompleteForChild(e)},t.prototype.isCompleteForChild=function(t){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(t)},t.prototype.getNode=function(){return this.node_},t}(),$e=function(){function t(t,e){this.eventCache_=t,this.serverCache_=e}return t.prototype.updateEventSnap=function(e,n,r){return new t(new Xe(e,n,r),this.serverCache_)},t.prototype.updateServerSnap=function(e,n,r){return new t(this.eventCache_,new Xe(e,n,r))},t.prototype.getEventCache=function(){return this.eventCache_},t.prototype.getCompleteEventSnap=function(){return this.eventCache_.isFullyInitialized()?this.eventCache_.getNode():null},t.prototype.getServerCache=function(){return this.serverCache_},t.prototype.getCompleteServerSnap=function(){return this.serverCache_.isFullyInitialized()?this.serverCache_.getNode():null},t}(),Je=function(){function t(){this.changeMap=new Map}return t.prototype.trackChildChange=function(t){var e=t.type,n=t.childName;Object(o.f)("child_added"===e||"child_changed"===e||"child_removed"===e,"Only child changes supported for tracking"),Object(o.f)(".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"===e&&"child_removed"===i)this.changeMap.set(n,ge(n,t.snapshotNode,r.snapshotNode));else if("child_removed"===e&&"child_added"===i)this.changeMap.delete(n);else if("child_removed"===e&&"child_changed"===i)this.changeMap.set(n,ye(n,r.oldSnap));else if("child_changed"===e&&"child_added"===i)this.changeMap.set(n,me(n,t.snapshotNode));else{if("child_changed"!==e||"child_changed"!==i)throw Object(o.g)("Illegal combination of changes: "+t+" occurred after "+r);this.changeMap.set(n,ge(n,t.snapshotNode,r.oldSnap))}}else this.changeMap.set(n,t)},t.prototype.getChanges=function(){return Array.from(this.changeMap.values())},t}(),Ze=new(function(){function t(){}return t.prototype.getCompleteChild=function(t){return null},t.prototype.getChildAfterChild=function(t,e,n){return null},t}()),tn=function(){function t(t,e,n){void 0===n&&(n=null),this.writes_=t,this.viewCache_=e,this.optCompleteServerCache_=n}return t.prototype.getCompleteChild=function(t){var e=this.viewCache_.getEventCache();if(e.isCompleteForChild(t))return e.getNode().getImmediateChild(t);var n=null!=this.optCompleteServerCache_?new Xe(this.optCompleteServerCache_,!0,!1):this.viewCache_.getServerCache();return this.writes_.calcCompleteChild(t,n)},t.prototype.getChildAfterChild=function(t,e,n){var r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:this.viewCache_.getCompleteServerSnap(),i=this.writes_.calcIndexedSlice(r,e,1,n,t);return 0===i.length?null:i[0]},t}(),en=function(t,e){this.viewCache=t,this.changes=e},nn=function(){function t(t){this.filter_=t}return t.prototype.assertIndexed=function(t){Object(o.f)(t.getEventCache().getNode().isIndexed(this.filter_.getIndex()),"Event snap not indexed"),Object(o.f)(t.getServerCache().getNode().isIndexed(this.filter_.getIndex()),"Server snap not indexed")},t.prototype.applyOperation=function(e,n,r,i){var a,s,u=new Je;if(n.type===Be.OVERWRITE){var c=n;c.source.fromUser?a=this.applyUserOverwrite_(e,c.path,c.snap,r,i,u):(Object(o.f)(c.source.fromServer,"Unknown source."),s=c.source.tagged||e.getServerCache().isFiltered()&&!$(c.path),a=this.applyServerOverwrite_(e,c.path,c.snap,r,i,s,u))}else if(n.type===Be.MERGE){var l=n;l.source.fromUser?a=this.applyUserMerge_(e,l.path,l.children,r,i,u):(Object(o.f)(l.source.fromServer,"Unknown source."),s=l.source.tagged||e.getServerCache().isFiltered(),a=this.applyServerMerge_(e,l.path,l.children,r,i,s,u))}else if(n.type===Be.ACK_USER_WRITE){var f=n;a=f.revert?this.revertUserWrite_(e,f.path,r,i,u):this.ackUserWrite_(e,f.path,f.affectedTree,r,i,u)}else{if(n.type!==Be.LISTEN_COMPLETE)throw Object(o.g)("Unknown operation type: "+n.type);a=this.listenComplete_(e,n.path,r,u)}var h=u.getChanges();return t.maybeAddValueEvent_(e,a,h),new en(a,h)},t.maybeAddValueEvent_=function(t,e,n){var r=e.getEventCache();if(r.isFullyInitialized()){var i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=t.getCompleteEventSnap();(n.length>
20||!t.getEventCache().isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(ve(e.getCompleteEventSnap()))}},t.prototype.generateEventCacheAfterServerEvent_=function(t,e,n,r,i){var a=t.getEventCache();if(null!=n.shadowingWrite(e))return t;var s=void 0,u=void 0;if($(e))if(Object(o.f)(t.getServerCache().isFullyInitialized(),"If change path is empty, we must have complete server data"),t.getServerCache().isFiltered()){var c=t.getCompleteServerSnap(),l=c instanceof oe?c:oe.EMPTY_NODE,f=n.calcCompleteEventChildren(l);s=this.filter_.updateFullNode(t.getEventCache().getNode(),f,i)}else{var h=n.calcCompleteEventCache(t.getCompleteServerSnap());s=this.filter_.updateFullNode(t.getEventCache().getNode(),h,i)}else{var d=z(e);if(".priority"===d){Object(o.f)(1===W(e),"Can't have a priority with additional path components");var p=a.getNode();u=t.getServerCache().getNode();var v=n.calcEventCacheAfterServerOverwrite(e,p,u);s=null!=v?this.filter_.updatePriority(p,v):a.getNode()}else{var m=H(e),y=void 0;if(a.isCompleteForChild(d)){u=t.getServerCache().getNode();var g=n.calcEventCacheAfterServerOverwrite(e,a.getNode(),u);y=null!=g?a.getNode().getImmediateChild(d).updateChild(m,g):a.getNode().getImmediateChild(d)}else y=n.calcCompleteChild(d,t.getServerCache());s=null!=y?this.filter_.updateChild(a.getNode(),d,y,m,r,i):a.getNode()}}return t.updateEventSnap(s,a.isFullyInitialized()||$(e),this.filter_.filtersNodes())},t.prototype.applyServerOverwrite_=function(t,e,n,r,i,o,a){var s,u=t.getServerCache(),c=o?this.filter_:this.filter_.getIndexedFilter();if($(e))s=c.updateFullNode(u.getNode(),n,null);else if(c.filtersNodes()&&!u.isFiltered()){var l=u.getNode().updateChild(e,n);s=c.updateFullNode(u.getNode(),l,null)}else{var f=z(e);if(!u.isCompleteForPath(e)&&W(e)>1)return t;var h=H(e),d=u.getNode().getImmediateChild(f).updateChild(h,n);s=".priority"===f?c.updatePriority(u.getNode(),d):c.updateChild(u.getNode(),f,d,h,Ze,null)}var p=t.updateServerSnap(s,u.isFullyInitialized()||$(e),c.filtersNodes()),v=new tn(r,p,i);return this.generateEventCacheAfterServerEvent_(p,e,r,v,a)},t.prototype.applyUserOverwrite_=function(t,e,n,r,i,o){var a,s,u=t.getEventCache(),c=new tn(r,t,i);if($(e))s=this.filter_.updateFullNode(t.getEventCache().getNode(),n,o),a=t.updateEventSnap(s,!0,this.filter_.filtersNodes());else{var l=z(e);if(".priority"===l)s=this.filter_.updatePriority(t.getEventCache().getNode(),n),a=t.updateEventSnap(s,u.isFullyInitialized(),u.isFiltered());else{var f=H(e),h=u.getNode().getImmediateChild(l),d=void 0;if($(f))d=n;else{var p=c.getCompleteChild(l);d=null!=p?".priority"===G(f)&&p.getChild(Q(f)).isEmpty()?p:p.updateChild(f,n):oe.EMPTY_NODE}if(h.equals(d))a=t;else{var v=this.filter_.updateChild(u.getNode(),l,d,f,c,o);a=t.updateEventSnap(v,u.isFullyInitialized(),this.filter_.filtersNodes())}}}return a},t.cacheHasChild_=function(t,e){return t.getEventCache().isCompleteForChild(e)},t.prototype.applyUserMerge_=function(e,n,r,i,o,a){var s=this,u=e;return r.foreach((function(r,c){var l=X(n,r);t.cacheHasChild_(e,z(l))&&(u=s.applyUserOverwrite_(u,l,c,i,o,a))})),r.foreach((function(r,c){var l=X(n,r);t.cacheHasChild_(e,z(l))||(u=s.applyUserOverwrite_(u,l,c,i,o,a))})),u},t.prototype.applyMerge_=function(t,e){return e.foreach((function(e,n){t=t.updateChild(e,n)})),t},t.prototype.applyServerMerge_=function(t,e,n,r,i,o,a){var s=this;if(t.getServerCache().getNode().isEmpty()&&!t.getServerCache().isFullyInitialized())return t;var u,c=t;u=$(e)?n:new Ge(null).setTree(e,n);var l=t.getServerCache().getNode();return u.children.inorderTraversal((function(e,n){if(l.hasChild(e)){var u=t.getServerCache().getNode().getImmediateChild(e),f=s.applyMerge_(u,n);c=s.applyServerOverwrite_(c,new B(e),f,r,i,o,a)}})),u.children.inorderTraversal((function(e,n){var u=!t.getServerCache().isCompleteForChild(e)&&null==n.value;if(!l.hasChild(e)&&!u){var f=t.getServerCache().getNode().getImmediateChild(e),h=s.applyMerge_(f,n);c=s.applyServerOverwrite_(c,new B(e),h,r,i,o,a)}})),c},t.prototype.ackUserWrite_=function(t,e,n,r,i,o){if(null!=r.shadowingWrite(e))return t;var a=t.getServerCache().isFiltered(),s=t.getServerCache();if(null!=n.value){if($(e)&&s.isFullyInitialized()||s.isCompleteForPath(e))return this.applyServerOverwrite_(t,e,s.getNode().getChild(e),r,i,a,o);if($(e)){var u=new Ge(null);
2return s.getNode().forEachChild(Ft,(function(t,e){u=u.set(new B(t),e)})),this.applyServerMerge_(t,e,u,r,i,a,o)}return t}var c=new Ge(null);return n.foreach((function(t,n){var r=X(e,t);s.isCompleteForPath(r)&&(c=c.set(t,s.getNode().getChild(r)))})),this.applyServerMerge_(t,e,c,r,i,a,o)},t.prototype.listenComplete_=function(t,e,n,r){var i=t.getServerCache(),o=t.updateServerSnap(i.getNode(),i.isFullyInitialized()||$(e),i.isFiltered());return this.generateEventCacheAfterServerEvent_(o,e,n,Ze,r)},t.prototype.revertUserWrite_=function(t,e,n,r,i){var a;if(null!=n.shadowingWrite(e))return t;var s=new tn(n,t,r),u=t.getEventCache().getNode(),c=void 0;if($(e)||".priority"===z(e)){var l=void 0;if(t.getServerCache().isFullyInitialized())l=n.calcCompleteEventCache(t.getCompleteServerSnap());else{var f=t.getServerCache().getNode();Object(o.f)(f instanceof oe,"serverChildren would be complete if leaf node"),l=n.calcCompleteEventChildren(f)}l=l,c=this.filter_.updateFullNode(u,l,i)}else{var h=z(e),d=n.calcCompleteChild(h,t.getServerCache());null==d&&t.getServerCache().isCompleteForChild(h)&&(d=u.getImmediateChild(h)),(c=null!=d?this.filter_.updateChild(u,h,d,H(e),s,i):t.getEventCache().getNode().hasChild(h)?this.filter_.updateChild(u,h,oe.EMPTY_NODE,H(e),s,i):u).isEmpty()&&t.getServerCache().isFullyInitialized()&&(a=n.calcCompleteEventCache(t.getCompleteServerSnap())).isLeafNode()&&(c=this.filter_.updateFullNode(c,a,i))}return a=t.getServerCache().isFullyInitialized()||null!=n.shadowingWrite(q()),t.updateEventSnap(c,a,this.filter_.filtersNodes())},t}(),rn=function(t){this.query_=t,this.index_=this.query_.getQueryParams().getIndex()};function on(t,e,n,r,i,a){var s=r.filter((function(t){return t.type===n}));s.sort((function(e,n){return function(t,e,n){if(null==e.childName||null==n.childName)throw Object(o.g)("Should only compare child_ events.");var r=new Rt(e.childName,e.snapshotNode),i=new Rt(n.childName,n.snapshotNode);return t.index_.compare(r,i)}(t,e,n)})),s.forEach((function(n){var r=function(t,e,n){return"value"===e.type||"child_removed"===e.type||(e.prevName=n.getPredecessorChildName(e.childName,e.snapshotNode,t.index_)),e}(t,n,a);i.forEach((function(i){i.respondsTo(n.type)&&e.push(i.createEvent(r,t.query_))}))}))}var an,sn=function(){function t(t,e){this.query_=t,this.eventRegistrations_=[];var n,r=this.query_.getQueryParams(),i=new we(r.getIndex()),o=(n=r).loadsAllData()?new we(n.getIndex()):n.hasLimit()?new Ee(n):new _e(n);this.processor_=new nn(o);var a=e.getServerCache(),s=e.getEventCache(),u=i.updateFullNode(oe.EMPTY_NODE,a.getNode(),null),c=o.updateFullNode(oe.EMPTY_NODE,s.getNode(),null),l=new Xe(u,a.isFullyInitialized(),i.filtersNodes()),f=new Xe(c,s.isFullyInitialized(),o.filtersNodes());this.viewCache_=new $e(f,l),this.eventGenerator_=new rn(this.query_)}return t.prototype.getQuery=function(){return this.query_},t.prototype.getServerCache=function(){return this.viewCache_.getServerCache().getNode()},t.prototype.getCompleteNode=function(){return this.viewCache_.getCompleteEventSnap()},t.prototype.getCompleteServerCache=function(t){var e=this.viewCache_.getCompleteServerSnap();return e&&(this.query_.getQueryParams().loadsAllData()||!$(t)&&!e.getImmediateChild(z(t)).isEmpty())?e.getChild(t):null},t.prototype.isEmpty=function(){return 0===this.eventRegistrations_.length},t.prototype.addEventRegistration=function(t){this.eventRegistrations_.push(t)},t.prototype.removeEventRegistration=function(t,e){var n=[];if(e){Object(o.f)(null==t,"A cancel should cancel all event registrations.");var r=this.query_.path;this.eventRegistrations_.forEach((function(t){var i=t.createCancelEvent(e,r);i&&n.push(i)}))}if(t){for(var i=[],a=0;a<this.eventRegistrations_.length;++a){var s=this.eventRegistrations_[a];if(s.matches(t)){if(t.hasAnyCallback()){i=i.concat(this.eventRegistrations_.slice(a+1));break}}else i.push(s)}this.eventRegistrations_=i}else this.eventRegistrations_=[];return n},t.prototype.applyOperation=function(t,e,n){t.type===Be.MERGE&&null!==t.source.queryId&&(Object(o.f)(this.viewCache_.getCompleteServerSnap(),"We should always have a full c
2ache before handling merges"),Object(o.f)(this.viewCache_.getCompleteEventSnap(),"Missing event cache, even though we have a server cache"));var r=this.viewCache_,i=this.processor_.applyOperation(r,t,e,n);return this.processor_.assertIndexed(i.viewCache),Object(o.f)(i.viewCache.getServerCache().isFullyInitialized()||!r.getServerCache().isFullyInitialized(),"Once a server snap is complete, it should never go back"),this.viewCache_=i.viewCache,this.generateEventsForChanges_(i.changes,i.viewCache.getEventCache().getNode(),null)},t.prototype.getInitialEvents=function(t){var e=this.viewCache_.getEventCache(),n=[];e.getNode().isLeafNode()||e.getNode().forEachChild(Yt,(function(t,e){n.push(me(t,e))}));return e.isFullyInitialized()&&n.push(ve(e.getNode())),this.generateEventsForChanges_(n,e.getNode(),t)},t.prototype.generateEventsForChanges_=function(t,e,n){var r=n?[n]:this.eventRegistrations_;return function(t,e,n,r){var i=[],o=[];return e.forEach((function(e){var n;"child_changed"===e.type&&t.index_.indexedValueChanged(e.oldSnap,e.snapshotNode)&&o.push((n=e.childName,{type:"child_moved",snapshotNode:e.snapshotNode,childName:n}))})),on(t,i,"child_removed",e,r,n),on(t,i,"child_added",e,r,n),on(t,i,"child_moved",o,r,n),on(t,i,"child_changed",e,r,n),on(t,i,"value",e,r,n),i}(this.eventGenerator_,t,e,r)},t}(),un=function(){function t(){this.views=new Map}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return Object(o.f)(an,"Reference.ts has not been loaded"),an},set:function(t){Object(o.f)(!an,"__referenceConstructor has already been defined"),an=t},enumerable:!1,configurable:!0}),t.prototype.isEmpty=function(){return 0===this.views.size},t.prototype.applyOperation=function(t,e,n){var r,a,s=t.source.queryId;if(null!==s){var u=this.views.get(s);return Object(o.f)(null!=u,"SyncTree gave us an op for an invalid query."),u.applyOperation(t,e,n)}var c=[];try{for(var l=Object(i.h)(this.views.values()),f=l.next();!f.done;f=l.next()){u=f.value;c=c.concat(u.applyOperation(t,e,n))}}catch(h){r={error:h}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return c},t.prototype.getView=function(t,e,n,r){var i=t.queryIdentifier(),o=this.views.get(i);if(!o){var a=e.calcCompleteEventCache(r?n:null),s=!1;a?s=!0:n instanceof oe?(a=e.calcCompleteEventChildren(n),s=!1):(a=oe.EMPTY_NODE,s=!1);var u=new $e(new Xe(a,s,!1),new Xe(n,r,!1));return new sn(t,u)}return o},t.prototype.addEventRegistration=function(t,e,n,r,i){var o=this.getView(t,n,r,i);return this.views.has(t.queryIdentifier())||this.views.set(t.queryIdentifier(),o),o.addEventRegistration(e),o.getInitialEvents(e)},t.prototype.removeEventRegistration=function(e,n,r){var o,a,s=e.queryIdentifier(),u=[],c=[],l=this.hasCompleteView();if("default"===s)try{for(var f=Object(i.h)(this.views.entries()),h=f.next();!h.done;h=f.next()){var d=Object(i.e)(h.value,2),p=d[0],v=d[1];c=c.concat(v.removeEventRegistration(n,r)),v.isEmpty()&&(this.views.delete(p),v.getQuery().getQueryParams().loadsAllData()||u.push(v.getQuery()))}}catch(m){o={error:m}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}else(v=this.views.get(s))&&(c=c.concat(v.removeEventRegistration(n,r)),v.isEmpty()&&(this.views.delete(s),v.getQuery().getQueryParams().loadsAllData()||u.push(v.getQuery())));return l&&!this.hasCompleteView()&&u.push(new t.__referenceConstructor(e.repo,e.path)),{removed:u,events:c}},t.prototype.getQueryViews=function(){var t,e,n=[];try{for(var r=Object(i.h)(this.views.values()),o=r.next();!o.done;o=r.next()){var a=o.value;a.getQuery().getQueryParams().loadsAllData()||n.push(a)}}catch(s){t={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},t.prototype.getCompleteServerCache=function(t){var e,n,r=null;try{for(var o=Object(i.h)(this.views.values()),a=o.next();!a.done;a=o.next()){var s=a.value;r=r||s.getCompleteServerCache(t)}}catch(u){e={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r},t.prototype.viewForQuery=function(t){if(t.getQueryParams().loadsAllData())return this.getCompleteView();var e=t.queryIdentifier();return this.views.get(e)},t.prototype.viewExistsForQuery=function(t){return null!=this.viewForQuery(t)},t.prototype.hasCompleteView=function(){return null!=this.getCompleteView()},t.prototype.getCompleteView=function(){var t,e;try{for(var n=Object(i.h)(this.views.values()),r=n.next();!r.done;r=n.next()){var o=r.value;if(o.getQuery().getQueryParams().loadsAllData())return o}}catch(a){t={error:a}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return null},t}(),cn=function(){function t(t){this.writeTree_=t}return t.empty=function(){return new t(new Ge(null))},t}();function ln(t,e,n){if($(e))return new cn(new Ge(n));var r=t.writeTree_.findRootMostValueAndPath(e);if(null!=r){var i=r.path,o=r.value,a=J(i,e);return o=o.updateChild(a,n),new cn(t.writeTree_.set(i,o))}var s=new Ge(n),u=t.writeTree_.setTree(e,s);return new cn(u)}function fn(t,e,n){var r=t;return A(n,(function(t,n){r=ln(r,X(e,t),n)})),r}function hn(t,e){if($(e))return cn.empty();
2var n=t.writeTree_.setTree(e,new Ge(null));return new cn(n)}function dn(t,e){return null!=pn(t,e)}function pn(t,e){var n=t.writeTree_.findRootMostValueAndPath(e);return null!=n?t.writeTree_.get(n.path).getChild(J(n.path,e)):null}function vn(t){var e=[],n=t.writeTree_.value;return null!=n?n.isLeafNode()||n.forEachChild(Yt,(function(t,n){e.push(new Rt(t,n))})):t.writeTree_.children.inorderTraversal((function(t,n){null!=n.value&&e.push(new Rt(t,n.value))})),e}function mn(t,e){if($(e))return t;var n=pn(t,e);return new cn(null!=n?new Ge(n):t.writeTree_.subtree(e))}function yn(t){return t.writeTree_.isEmpty()}function gn(t,e){return bn(q(),t.writeTree_,e)}function bn(t,e,n){if(null!=e.value)return n.updateChild(t,e.value);var r=null;return e.children.inorderTraversal((function(e,i){".priority"===e?(Object(o.f)(null!==i.value,"Priority writes must always be leaf nodes"),r=i.value):n=bn(X(t,e),i,n)})),n.getChild(t).isEmpty()||null===r||(n=n.updateChild(X(t,".priority"),r)),n}var wn=function(){function t(){this.visibleWrites_=cn.empty(),this.allWrites_=[],this.lastWriteId_=-1}return t.prototype.childWrites=function(t){return new _n(t,this)},t.prototype.addOverwrite=function(t,e,n,r){Object(o.f)(n>this.lastWriteId_,"Stacking an older write on top of newer ones"),void 0===r&&(r=!0),this.allWrites_.push({path:t,snap:e,writeId:n,visible:r}),r&&(this.visibleWrites_=ln(this.visibleWrites_,t,e)),this.lastWriteId_=n},t.prototype.addMerge=function(t,e,n){Object(o.f)(n>this.lastWriteId_,"Stacking an older merge on top of newer ones"),this.allWrites_.push({path:t,children:e,writeId:n,visible:!0}),this.visibleWrites_=fn(this.visibleWrites_,t,e),this.lastWriteId_=n},t.prototype.getWrite=function(t){for(var e=0;e<this.allWrites_.length;e++){var n=this.allWrites_[e];if(n.writeId===t)return n}return null},t.prototype.removeWrite=function(t){var e=this,n=this.allWrites_.findIndex((function(e){return e.writeId===t}));Object(o.f)(n>=0,"removeWrite called with nonexistent writeId.");var r=this.allWrites_[n];this.allWrites_.splice(n,1);for(var i=r.visible,a=!1,s=this.allWrites_.length-1;i&&s>=0;){var u=this.allWrites_[s];u.visible&&(s>=n&&this.recordContainsPath_(u,r.path)?i=!1:et(r.path,u.path)&&(a=!0)),s--}if(i){if(a)return this.resetTree_(),!0;r.snap?this.visibleWrites_=hn(this.visibleWrites_,r.path):A(r.children,(function(t){e.visibleWrites_=hn(e.visibleWrites_,X(r.path,t))}));return!0}return!1},t.prototype.getCompleteWriteData=function(t){return pn(this.visibleWrites_,t)},t.prototype.calcCompleteEventCache=function(e,n,r,i){if(r||i){var o=mn(this.visibleWrites_,e);if(!i&&yn(o))return n;if(i||null!=n||dn(o,q())){return gn(t.layerTree_(this.allWrites_,(function(t){return(t.visible||i)&&(!r||!~r.indexOf(t.writeId))&&(et(t.path,e)||et(e,t.path))}),e),n||oe.EMPTY_NODE)}return null}var a=pn(this.visibleWrites_,e);if(null!=a)return a;var s=mn(this.visibleWrites_,e);return yn(s)?n:null!=n||dn(s,q())?gn(s,n||oe.EMPTY_NODE):null},t.prototype.calcCompleteEventChildren=function(t,e){var n=oe.EMPTY_NODE,r=pn(this.visibleWrites_,t);if(r)return r.isLeafNode()||r.forEachChild(Yt,(function(t,e){n=n.updateImmediateChild(t,e)})),n;if(e){var i=mn(this.visibleWrites_,t);return e.forEachChild(Yt,(function(t,e){var r=gn(mn(i,new B(t)),e);n=n.updateImmediateChild(t,r)})),vn(i).forEach((function(t){n=n.updateImmediateChild(t.name,t.node)})),n}return vn(mn(this.visibleWrites_,t)).forEach((function(t){n=n.updateImmediateChild(t.name,t.node)})),n},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n,r){Object(o.f)(n||r,"Either existingEventSnap or existingServerSnap must exist");var i=X(t,e);if(dn(this.visibleWrites_,i))return null;var a=mn(this.visibleWrites_,i);return yn(a)?r.getChild(e):gn(a,r.getChild(e))},t.prototype.calcCompleteChild=function(t,e,n){var r=X(t,e),i=pn(this.visibleWrites_,r);return null!=i?i:n.isCompleteForChild(e)?gn(mn(this.visibleWrites_,r),n.getNode().getImmediateChild(e)):null},t.prototype.shadowingWrite=function(t){return pn(this.visibleWrites_,t)},t.prototype.calcIndexedSlice=function(t,e,n,r,i,o){var a,s=mn(this.visibleWrites_,t),u=pn(s,q());if(null!=u)a=u;else{if(null==e)return[];a=gn(s,e)}if((a=a.withIndex(o)).isEmpty()||a.isLeafNode())return[];for(var c=[],l=o.getCompare(),f=i?a.getReverseIteratorFrom(n,o):a.getIteratorFrom(n,o),h=f.getNext();
2h&&c.length<r;)0!==l(h,n)&&c.push(h),h=f.getNext();return c},t.prototype.recordContainsPath_=function(t,e){if(t.snap)return et(t.path,e);for(var n in t.children)if(t.children.hasOwnProperty(n)&&et(X(t.path,n),e))return!0;return!1},t.prototype.resetTree_=function(){this.visibleWrites_=t.layerTree_(this.allWrites_,t.DefaultFilter_,q()),this.allWrites_.length>0?this.lastWriteId_=this.allWrites_[this.allWrites_.length-1].writeId:this.lastWriteId_=-1},t.DefaultFilter_=function(t){return t.visible},t.layerTree_=function(t,e,n){for(var r=cn.empty(),i=0;i<t.length;++i){var a=t[i];if(e(a)){var s=a.path,u=void 0;if(a.snap)et(n,s)?r=ln(r,u=J(n,s),a.snap):et(s,n)&&(u=J(s,n),r=ln(r,q(),a.snap.getChild(u)));else{if(!a.children)throw Object(o.g)("WriteRecord should have .snap or .children");if(et(n,s))r=fn(r,u=J(n,s),a.children);else if(et(s,n))if($(u=J(s,n)))r=fn(r,q(),a.children);else{var c=Object(o.G)(a.children,z(u));if(c){var l=c.getChild(H(u));r=ln(r,q(),l)}}}}}return r},t}(),_n=function(){function t(t,e){this.treePath_=t,this.writeTree_=e}return t.prototype.calcCompleteEventCache=function(t,e,n){return this.writeTree_.calcCompleteEventCache(this.treePath_,t,e,n)},t.prototype.calcCompleteEventChildren=function(t){return this.writeTree_.calcCompleteEventChildren(this.treePath_,t)},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n){return this.writeTree_.calcEventCacheAfterServerOverwrite(this.treePath_,t,e,n)},t.prototype.shadowingWrite=function(t){return this.writeTree_.shadowingWrite(X(this.treePath_,t))},t.prototype.calcIndexedSlice=function(t,e,n,r,i){return this.writeTree_.calcIndexedSlice(this.treePath_,t,e,n,r,i)},t.prototype.calcCompleteChild=function(t,e){return this.writeTree_.calcCompleteChild(this.treePath_,t,e)},t.prototype.child=function(e){return new t(X(this.treePath_,e),this.writeTree_)},t}(),En=function(){function t(t){this.listenProvider_=t,this.syncPointTree_=new Ge(null),this.pendingWriteTree_=new wn,this.tagToQueryMap=new Map,this.queryToTagMap=new Map}return t.prototype.applyUserOverwrite=function(t,e,n,r){return this.pendingWriteTree_.addOverwrite(t,e,n,r),r?this.applyOperationToSyncPoints_(new Ke({fromUser:!0,fromServer:!1,queryId:null,tagged:!1},t,e)):[]},t.prototype.applyUserMerge=function(t,e,n){this.pendingWriteTree_.addMerge(t,e,n);var r=Ge.fromObject(e);return this.applyOperationToSyncPoints_(new Qe({fromUser:!0,fromServer:!1,queryId:null,tagged:!1},t,r))},t.prototype.ackUserWrite=function(t,e){void 0===e&&(e=!1);var n=this.pendingWriteTree_.getWrite(t);if(this.pendingWriteTree_.removeWrite(t)){var r=new Ge(null);return null!=n.snap?r=r.set(q(),!0):A(n.children,(function(t){r=r.set(new B(t),!0)})),this.applyOperationToSyncPoints_(new He(n.path,r,e))}return[]},t.prototype.applyServerOverwrite=function(t,e){return this.applyOperationToSyncPoints_(new Ke({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t,e))},t.prototype.applyServerMerge=function(t,e){var n=Ge.fromObject(e);return this.applyOperationToSyncPoints_(new Qe({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t,n))},t.prototype.applyListenComplete=function(t){return this.applyOperationToSyncPoints_(new Ye({fromUser:!1,fromServer:!0,queryId:null,tagged:!1},t))},t.prototype.applyTaggedQueryOverwrite=function(e,n,r){var i=this.queryKeyForTag_(r);if(null!=i){var o=t.parseQueryKey_(i),a=o.path,s=o.queryId,u=J(a,e),c=new Ke(ze(s),u,n);return this.applyTaggedOperation_(a,c)}return[]},t.prototype.applyTaggedQueryMerge=function(e,n,r){var i=this.queryKeyForTag_(r);if(i){var o=t.parseQueryKey_(i),a=o.path,s=o.queryId,u=J(a,e),c=Ge.fromObject(n),l=new Qe(ze(s),u,c);return this.applyTaggedOperation_(a,l)}return[]},t.prototype.applyTaggedListenComplete=function(e,n){var r=this.queryKeyForTag_(n);if(r){var i=t.parseQueryKey_(r),o=i.path,a=i.queryId,s=J(o,e),u=new Ye(ze(a),s);return this.applyTaggedOperation_(o,u)}return[]},t.prototype.addEventRegistration=function(e,n){var r=e.path,i=null,a=!1;this.syncPointTree_.foreachOnPath(r,(function(t,e){var n=J(t,r);i=i||e.getCompleteServerCache(n),a=a||e.hasCompleteView()}));var s,u=this.syncPointTree_.get(r);(u?(a=a||u.hasCompleteView(),i=i||u.getCompleteServerCache(q())):(u=new un,this.syncPointTree_=this.syncPointTree_.set(r,u)),null!=i)?s=!0:(s=!1,i=oe.EMPTY_NODE,this.syncPointTree_.subtree(r).foreachChild((function(t,e){var n=e.getCompleteServerCache(q());n&&(i=i.updateImmediateChild(t,n))}
2)));var c=u.viewExistsForQuery(e);if(!c&&!e.getQueryParams().loadsAllData()){var l=t.makeQueryKey_(e);Object(o.f)(!this.queryToTagMap.has(l),"View does not exist, but we have a tag");var f=t.getNextQueryTag_();this.queryToTagMap.set(l,f),this.tagToQueryMap.set(f,l)}var h=this.pendingWriteTree_.childWrites(r),d=u.addEventRegistration(e,n,h,i,s);if(!c&&!a){var p=u.viewForQuery(e);d=d.concat(this.setupListener_(e,p))}return d},t.prototype.removeEventRegistration=function(e,n,r){var i=this,o=e.path,a=this.syncPointTree_.get(o),s=[];if(a&&("default"===e.queryIdentifier()||a.viewExistsForQuery(e))){var u=a.removeEventRegistration(e,n,r);a.isEmpty()&&(this.syncPointTree_=this.syncPointTree_.remove(o));var c=u.removed;s=u.events;var l=-1!==c.findIndex((function(t){return t.getQueryParams().loadsAllData()})),f=this.syncPointTree_.findOnPath(o,(function(t,e){return e.hasCompleteView()}));if(l&&!f){var h=this.syncPointTree_.subtree(o);if(!h.isEmpty())for(var d=this.collectDistinctViewsForSubTree_(h),p=0;p<d.length;++p){var v=d[p],m=v.getQuery(),y=this.createListenerForView_(v);this.listenProvider_.startListening(t.queryForListening_(m),this.tagForQuery_(m),y.hashFn,y.onComplete)}}if(!f&&c.length>0&&!r)if(l){this.listenProvider_.stopListening(t.queryForListening_(e),null)}else c.forEach((function(e){var n=i.queryToTagMap.get(t.makeQueryKey_(e));i.listenProvider_.stopListening(t.queryForListening_(e),n)}));this.removeTags_(c)}return s},t.prototype.calcCompleteEventCache=function(t,e){var n=this.pendingWriteTree_,r=this.syncPointTree_.findOnPath(t,(function(e,n){var r=J(e,t),i=n.getCompleteServerCache(r);if(i)return i}));return n.calcCompleteEventCache(t,r,e,!0)},t.prototype.getServerValue=function(t){var e=t.path,n=null;this.syncPointTree_.foreachOnPath(e,(function(t,r){var i=J(t,e);n=n||r.getCompleteServerCache(i)}));var r=this.syncPointTree_.get(e);r?n=n||r.getCompleteServerCache(q()):(r=new un,this.syncPointTree_=this.syncPointTree_.set(e,r));var i=null!=n,o=i?new Xe(n,!0,!1):null,a=this.pendingWriteTree_.childWrites(t.path);return r.getView(t,a,i?o.getNode():oe.EMPTY_NODE,i).getCompleteNode()},t.prototype.collectDistinctViewsForSubTree_=function(t){return t.fold((function(t,e,n){if(e&&e.hasCompleteView())return[e.getCompleteView()];var r=[];return e&&(r=e.getQueryViews()),A(n,(function(t,e){r=r.concat(e)})),r}))},t.prototype.removeTags_=function(e){for(var n=0;n<e.length;++n){var r=e[n];if(!r.getQueryParams().loadsAllData()){var i=t.makeQueryKey_(r),o=this.queryToTagMap.get(i);this.queryToTagMap.delete(i),this.tagToQueryMap.delete(o)}}},t.queryForListening_=function(t){return t.getQueryParams().loadsAllData()&&
2!t.getQueryParams().isDefault()?t.getRef():t},t.prototype.setupListener_=function(e,n){var r=e.path,i=this.tagForQuery_(e),a=this.createListenerForView_(n),s=this.listenProvider_.startListening(t.queryForListening_(e),i,a.hashFn,a.onComplete),u=this.syncPointTree_.subtree(r);if(i)Object(o.f)(!u.value.hasCompleteView(),"If we're adding a query, it shouldn't be shadowed");else for(var c=u.fold((function(t,e,n){if(!$(t)&&e&&e.hasCompleteView())return[e.getCompleteView().getQuery()];var r=[];return e&&(r=r.concat(e.getQueryViews().map((function(t){return t.getQuery()})))),A(n,(function(t,e){r=r.concat(e)})),r})),l=0;l<c.length;++l){var f=c[l];this.listenProvider_.stopListening(t.queryForListening_(f),this.tagForQuery_(f))}return s},t.prototype.createListenerForView_=function(t){var e=this,n=t.getQuery(),r=this.tagForQuery_(n);return{hashFn:function(){return(t.getServerCache()||oe.EMPTY_NODE).hash()},onComplete:function(t){if("ok"===t)return r?e.applyTaggedListenComplete(n.path,r):e.applyListenComplete(n.path);var i=function(t,e){var n="Unknown Error";"too_big"===t?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"===t?n="Client doesn't have permission to access the desired data.":"unavailable"===t&&(n="The service is unavailable");var r=new Error(t+" at "+e.path.toString()+": "+n);return r.code=t.toUpperCase(),r}(t,n);return e.removeEventRegistration(n,null,i)}}},t.makeQueryKey_=function(t){return t.path.toString()+"$"+t.queryIdentifier()},t.parseQueryKey_=function(t){var e=t.indexOf("$");return Object(o.f)(-1!==e&&e<t.length-1,"Bad queryKey."),{queryId:t.substr(e+1),path:new B(t.substr(0,e))}},t.prototype.queryKeyForTag_=function(t){return this.tagToQueryMap.get(t)},t.prototype.tagForQuery_=function(e){var n=t.makeQueryKey_(e);return this.queryToTagMap.get(n)},t.getNextQueryTag_=function(){return t.nextQueryTag_++},t.prototype.applyTaggedOperation_=function(t,e){var n=this.syncPointTree_.get(t);Object(o.f)(n,"Missing sync point for query tag that we're tracking");var r=this.pendingWriteTree_.childWrites(t);return n.applyOperation(e,r,null)},t.prototype.applyOperationToSyncPoints_=function(t){return this.applyOperationHelper_(t,this.syncPointTree_,null,this.pendingWriteTree_.childWrites(q()))},t.prototype.applyOperationHelper_=function(t,e,n,r){if($(t.path))return this.applyOperationDescendantsHelper_(t,e,n,r);var i=e.get(q());null==n&&null!=i&&(n=i.getCompleteServerCache(q()));var o=[],a=z(t.path),s=t.operationForChild(a),u=e.children.get(a);if(u&&s){var c=n?n.getImmediateChild(a):null,l=r.child(a);o=o.concat(this.applyOperationHelper_(s,u,c,l))}return i&&(o=o.concat(i.applyOperation(t,r,n))),o},t.prototype.applyOperationDescendantsHelper_=function(t,e,n,r){var i=this,o=e.get(q());null==n&&null!=o&&(n=o.getCompleteServerCache(q()));var a=[];return e.children.inorderTraversal((function(e,o){var s=n?n.getImmediateChild(e):null,u=r.child(e),c=t.operationForChild(e);c&&(a=a.concat(i.applyOperationDescendantsHelper_(c,o,s,u)))})),o&&(a=a.concat(o.applyOperation(t,r,n))),a},t.nextQueryTag_=1,t}(),On=function(){function t(){this.rootNode_=oe.EMPTY_NODE}return t.prototype.getNode=function(t){return this.rootNode_.getChild(t)},t.prototype.updateSnapshot=function(t,e){this.rootNode_=this.rootNode_.updateChild(t,e)},t}(),Tn=function(){function t(){this.counters_={}}return t.prototype.incrementCounter=function(t,e){void 0===e&&(e=1),Object(o.k)(this.counters_,t)||(this.counters_[t]=0),this.counters_[t]+=e},t.prototype.get=function(){return Object(o.m)(this.counters_)},t}(),Sn=function(){function t(){}return t.getCollection=function(t){var e=t.toString();return this.collections_[e]||(this.collections_[e]=new Tn),this.collections_[e]},t.getOrCreateReporter=function(t,e){var n=t.toString();return this.reporters_[n]||(this.reporters_[n]=e()),this.reporters_[n]},t.collections_={},t.reporters_={},t}(),kn=function(){function t(t){this.collection_=t,this.last_=null}return t.prototype.get=function(){var t=this.collection_.get(),e=Object(i.a)({},t);return this.last_&&A(this.last_,(function(t,n){e[t]=e[t]-n})),this.last_=t,e},t}(),In=function(){function t(t,e){this.server_=e,this.statsToReport_={},this.statsListener_=new kn(t);var n=1e4+2e4*Math.random();V(this.reportStats_.bind(this),Math.floor(n))}return t.prototype.includeStat=function(t){this.statsToReport_[t]=!0},t.prototype.reportStats_=function(){var t=this,e=this.statsListener_.get(),n={},r=!1;A(e,(function(e,i){i>0&&Object(o.k)(t.statsToReport_,e)&&(n[e]=i,r=!0)})),r&&this.server_.reportStats(n),V(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))},t}(),Cn=function(){this.eventLists_=[],this.recursionDepth_=0};function Nn(t,e){for(var n=null,r=0;r<e.length;r++){var i=e[r],o=i.getPath();null===n||tt(o,n.path)||(t.eventLists_.push(n),n=null),null===n&&(n={events:[],path:o}),n.events.push(i)}n&&t.eventLists_.push(n)}function xn(t,e,n){Nn(t,n),jn(t,(function(t){return tt(t,e)}))}function Pn(t,e,n){Nn(t,n),jn(t,(function(t){return et(t,e)||et(e,t)}))}function jn(t,e){t.recursionDepth_++;for(var n=!0,r=0;r<t.eventLists_.length;r++){var i=t.eventLists_[r];if(i)e(i.path)?(An(t.eventLists_[r]),t.eventLists_[r]=null):n=!1}n&&(t.eventLists_=[]),t.recursionDepth_--}function An(t){for(var e=0;e<t.events.length;e++){var n=t.events[e];if(null!==n){t.events[e]=null;var r=n.getEventRunner();y&&w("event: "+n.toString()),U(r)}}}var Dn=function(){function t(t){this.allowedEvents_=t,this.listeners_={},Object(o.f)(Array.isArray(t)&&t.length>0,"Requires a non-empty array")}return t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(Array.isArray(this.listeners_[t]))for(var r=Object(i.f)(this.listeners_[t]),o=0;o<r.length;o++)r[o].callback.apply(r[o].context,e)},t.prototype.on=function(t,e,n){this.validateEventType_(t),this.listeners_[t]=this.listeners_[t]||[],this.listeners_[t].push({callback:e,context:n});var r=this.getInitialEvent(t);r&&e.apply(n,r)},t.prototype.off=function(t,e,n){this.validateEventType_(t);for(var r=this.listeners_[t]||[],i=0;i<r.length;i++)if(r[i].callback===e&&(!n||n===r[i].context))return void r.splice(i,1)},t.prototype.validateEventType_=function(t){Object(o.f)(this.allowedEvents_.find((function(e){return e===t})),"Unknown event: "+t)},t}(),Rn=function(t){function e(){var e,n,r=t.call(this,["visible"])||this;return"undefined"!==typeof document&&"undefined"!==typeof document.addEventListener&&("undefined"!==typeof document.hidden?(n="visibilitychange",e="hidden"):"undefined"!==typeof document.mozHidden?(n="mozvisibilitychange",e="mozHidden"):"undefined"!==typeof document.msHidden?(n="msvisibilitychange",e="msHidden"):"undefined"!==typeof document.webkitHidden&&(n="webkitvisibilitychange",e="webkitHidden")),r.visible_=!0,n&&document.addEventListener(n,(function(){var t=!document[e];t!==r.visible_&&(r.visible_=t,r.trigger("visible",t))}),!1),r}return Object(i.c)(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return Object(o.f)("visible"===t,"Unknown event type: "+t),[this.visible_]},e}(Dn),Mn=function(t){function e(){var e=t.call(this,["online"])||this;return e.online_=!0,"undefined"===typeof window||"undefined"===typeof window.addEventListener||Object(o.x)()||(window.addEventListener("online",(function(){e.online_||(e.online_=!0,e.trigger("online",!0))}),!1),window.addEventListener("offline",(function(){e.online_&&(e.online_=!1,e.trigger("online",!1))}),!1)),e}return Object(i.c)(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return Object(o.f)("online"===t,"Unknown event type: "+t),[this.online_]},e.prototype.currentlyOnline=function(){return this.online_},e}(Dn),Ln=function(){function t(t){this.onMessage_=t,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return t.prototype.closeAfter=function(t,e){this.closeAfterResponse=t,this.onClose=e,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)},t.prototype.handleResponse=function(t,e){var n=this;this.pendingResponses[t]=e;for(var r=function(){var t=i.pendingResponses[i.currentResponseNum];delete i.pendingResponses[i.currentResponseNum];for(var e=function(e){t[e]&&U((function(){n.onMessage_(t[e])}))},r=0;r<t.length;++r)e(r);
2if(i.currentResponseNum===i.closeAfterResponse)return i.onClose&&(i.onClose(),i.onClose=null),"break";i.currentResponseNum++},i=this;this.pendingResponses[this.currentResponseNum];){if("break"===r())break}},t}(),Fn="start",Un="close",Vn=function(){function t(t,e,n,r,i){this.connId=t,this.repoInfo=e,this.applicationId=n,this.transportSessionId=r,this.lastSessionId=i,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=_(t),this.stats_=Sn.getCollection(e),this.urlFn=function(t){return e.connectionURL(at,t)}}return t.prototype.open=function(t,e){var n=this;this.curSegmentNum=0,this.onDisconnect_=e,this.myPacketOrderer=new Ln(t),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout((function(){n.log_("Timed out trying to connect."),n.onClosed_(),n.connectTimeoutTimer_=null}),Math.floor(3e4)),function(t){if(Object(o.z)()||"complete"===document.readyState)t();else{var e=!1,n=function n(){document.body?e||(e=!0,t()):setTimeout(n,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&n()})),window.attachEvent("onload",n))}}((function(){if(!n.isClosed_){n.scriptTagHolder=new Bn((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Object(i.e)(t,5),o=r[0],a=r[1],s=r[2];r[3],r[4];if(n.incrementIncomingBytes_(t),n.scriptTagHolder)if(n.connectTimeoutTimer_&&(clearTimeout(n.connectTimeoutTimer_),n.connectTimeoutTimer_=null),n.everConnected_=!0,o===Fn)n.id=a,n.password=s;else{if(o!==Un)throw new Error("Unrecognized command received: "+o);a?(n.scriptTagHolder.sendNewPolls=!1,n.myPacketOrderer.closeAfter(a,(function(){n.onClosed_()}))):n.onClosed_()}}),(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Object(i.e)(t,2),o=r[0],a=r[1];n.incrementIncomingBytes_(t),n.myPacketOrderer.handleResponse(o,a)}),(function(){n.onClosed_()}),n.urlFn);var t={start:"t"};t.ser=Math.floor(1e8*Math.random()),n.scriptTagHolder.uniqueCallbackIdentifier&&(t.cb=n.scriptTagHolder.uniqueCallbackIdentifier),t.v=rt,n.transportSessionId&&(t.s=n.transportSessionId),n.lastSessionId&&(t.ls=n.lastSessionId),n.applicationId&&(t.p=n.applicationId),"undefined"!==typeof location&&location.hostname&&it.test(location.hostname)&&(t.r="f");var e=n.urlFn(t);n.log_("Connecting via long-poll to "+e),n.scriptTagHolder.addTag(e,(function(){}))}}))},t.prototype.start=function(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)},t.forceAllow=function(){t.forceAllow_=!0},t.forceDisallow=function(){t.forceDisallow_=!0},t.isAvailable=function(){return!Object(o.z)()&&(!!t.forceAllow_||!t.forceDisallow_&&"undefined"!==typeof document&&null!=document.createElement&&!("object"===typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"===typeof Windows&&"object"===typeof Windows.UI))},t.prototype.markConnectionHealthy=function(){},t.prototype.shutdown_=function(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)},t.prototype.onClosed_=function(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))},t.prototype.close=function(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())},t.prototype.send=function(t){var e=Object(o.J)(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);for(var n=Object(o.i)(e),r=j(n,1840),i=0;i<r.length;i++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,r.length,r[i]),this.curSegmentNum++},t.prototype.addDisconnectPingFrame=function(t,e){if(!Object(o.z)()){this.myDisconnFrame=document.createElement("iframe");var n={dframe:"t"};n.id=t,n.pw=e,this.myDisconnFrame.src=this.urlFn(n),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}},t.prototype.incrementIncomingBytes_=function(t){var e=Object(o.J)(t).length;this.bytesReceived+=e,this.stats_.incrementCounter("bytes_received",e)},t}(),Bn=function(){function t(e,n,r,i){if(this.onDisconnect=r,this.urlFn=i,this.outstandingRequests=new Set,this.pendingSegs=[],this.currentSerial=Math.floor(1e8*Math.random()),this.sendNewPolls=!0,Object(o.z)())this.commandCB=e,this.onMessageCB=n;else{this.uniqueCallbackIdentifier=p(),window["pLPCommand"+this.uniqueCallbackIdentifier]=e,window["pRTLPCB"+this.uniqueCallbackIdentifier]=n,this.myIFrame=t.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){w("frame writing exception"),u.stack&&w(u.stack),w(u)}}}return t.createIFrame_=function(){var t=document.createElement("iframe");if(t.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(t);try{t.contentWindow.document||w("No IE domain setting required")}catch(n){var e=document.domain;t.src="javascript:void((function(){document.open();document.domain='"+e+"';document.close();})())"}return t.contentDocument?t.doc=t.contentDocument:t.contentWindow?t.doc=t.contentWindow.document:t.document&&(t.doc=t.document),t},t.prototype.close=function(){var t=this;this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout((function(){null!==t.myIFrame&&(document.body.removeChild(t.myIFrame),t.myIFrame=null)}),Math.floor(0)));var e=this.onDisconnect;e&&(this.onDisconnect=null,e())},t.prototype.startLongPoll=function(t,e){for(this.myID=t,this.myPW=e,this.alive=!0;this.newRequest_(););},t.prototype.newRequest_=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var t={};t.id=this.myID,t.pw=this.myPW,t.ser=this.currentSerial;for(var e=this.urlFn(t),n="",r=0;this.pendingSegs.length>0;){if(!(this.pendingSegs[0].d.length+30+n.length<=1870))break;var i=this.pendingSegs.shift();n=n+"&seg"+r+"="+i.seg+"&ts"+r+"="+i.ts+"&d"+r+"="+i.d,r++}return e+=n,this.addLongPollTag_(e,this.currentSerial),!0}return!1},t.prototype.enqueueSegment=function(t,e,n){this.pendingSegs.push({seg:t,ts:e,d:n}),this.alive&&this.newRequest_()},t.prototype.addLongPollTag_=function(t,e){var n=this;this.outstandingRequests.add(e);var r=function(){n.outstandingRequests.delete(e),n.newRequest_()},i=setTimeout(r,Math.floor(25e3));this.addTag(t,(function(){clearTimeout(i),r()}))},t.prototype.addTag=function(t,e){var n=this;Object(o.z)()?this.doNodeLongPoll(t,e):setTimeout((function(){try{if(!n.sendNewPolls)return;var r=n.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=t,r.onload=r.onreadystatechange=function(){var t=r.readyState;t&&"loaded"!==t&&"complete"!==t||(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),e())},r.onerror=function(){w("Long-poll script failed to load: "+t),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(r)}catch(i){}}),Math.floor(1))},t}(),qn="";function zn(t){qn=t}var Wn=null;"undefined"!==typeof MozWebSocket?Wn=MozWebSocket:"undefined"!==typeof WebSocket&&(Wn=WebSocket);var Hn,Gn=function(){function e(t,n,r,i,o){this.connId=t,this.applicationId=r,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=_(this.connId),this.stats_=Sn.getCollection(n),this.connURL=e.connectionURL_(n,i,o),this.nodeAdmin=n.nodeAdmin}return e.connectionURL_=function(t,e,n){var r={};return r.v=rt,!Object(o.z)()&&"undefined"!==typeof location&&location.hostname&&it.test(location.hostname)&&(r.r="f"),e&&(r.s=e),n&&(r.ls=n),t.connectionURL(ot,r)},e.prototype.open=function(e,n){var r=this;this.onDisconnect=n,this.onMessage=e,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,f.set("previous_websocket_failure",!0);try{if(Object(o.z)()){var i=this.nodeAdmin?"AdminNode":"Node",a={headers:{"User-Agent":"Firebase/5/"+qn+"/"+t.platform+"/"+i,"X-Firebase-GMPID":this.applicationId||""}},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}),u=0===this.connURL.indexOf("wss://")?s.HTTPS_PROXY||s.https_proxy:s.HTTP_PROXY||s.http_proxy;u&&(a.proxy={origin:u}),this.mySock=new Wn(this.connURL,[],a)}else{a={headers:{"X-Firebase-GMPID":this.applicationId||""}};this.mySock=new Wn(this.connURL,[],a)}}catch(l){this.log_("Error instantiating WebSocket.");var c=l.message||l.data;return c&&this.log_(c),void this.onClosed_()}this.mySock.onopen=function(){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(t){r.handleIncomingFrame(t)},this.mySock.onerror=function(t){r.log_("WebSocket error. Closing connection.");var e=t.message||t.data;e&&r.log_(e),r.onClosed_()}},e.prototype.start=function(){},e.forceDisallow=function(){e.forceDisallow_=!0},e.isAvailable=function(){var t=!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&&(t=!0)}return!t&&null!==Wn&&!e.forceDisallow_},e.previouslyFailed=function(){return f.isInMemoryStorage||!0===f.get("previous_websocket_failure")},e.prototype.markConnectionHealthy=function(){f.remove("previous_websocket_failure")},e.prototype.appendFrame_=function(t){if(this.frames.push(t),this.frames.length===this.totalFrames){var e=this.frames.join("");this.frames=null;var n=Object(o.D)(e);this.onMessage(n)}},e.prototype.handleNewFrameCount_=function(t){this.totalFrames=t,this.frames=[]},e.prototype.extractFrameCount_=function(t){if(Object(o.f)(null===this.frames,"We already have a frame buffer"),t.length<=6){var e=Number(t);if(!isNaN(e))return this.handleNewFrameCount_(e),null}return this.handleNewFrameCount_(1),t},e.prototype.handleIncomingFrame=function(t){if(null!==this.mySock){var e=t.data;if(this.bytesReceived+=e.length,this.stats_.incrementCounter("bytes_received",e.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(e);else{var n=this.extractFrameCount_(e);null!==n&&this.appendFrame_(n)}}},e.prototype.send=function(t){this.resetKeepAlive();var e=Object(o.J)(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);var n=j(e,16384);n.length>1&&this.sendString_(String(n.length));for(var r=0;r<n.length;r++)this.sendString_(n[r])},e.prototype.shutdown_=function(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)},e.prototype.onClosed_=function(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))},e.prototype.close=function(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())},e.prototype.resetKeepAlive=function(){var t=this;clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval((function(){t.mySock&&t.sendString_("0"),t.resetKeepAlive()}),Math.floor(45e3))},e.prototype.sendString_=function(t){try{this.mySock.send(t)}catch(e){this.log_("Exception thrown from WebSocket.send():",e.message||e.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}},e.responsesRequiredToBeHealthy=2,e.healthyTimeout=3e4,e}(),Yn=function(){function t(t){this.initTransports_(t)}return Object.defineProperty(t,"ALL_TRANSPORTS",{get:function(){return[Vn,Gn]},enumerable:!1,configurable:!0}),t.prototype.initTransports_=function(e){var n,r,o=Gn&&Gn.isAvailable(),a=o&&!Gn.previouslyFailed();if(e.webSocketOnly&&(o||T("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),a=!0),a)this.transports_=[Gn];else{var s=this.transports_=[];try{for(var u=Object(i.h)(t.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}}}},t.prototype.initialTransport=function(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")},t.prototype.upgradeTransport=function(){return this.transports_.length>1?this.transports_[1]:null},t}(),Kn=function(){function t(t,e,n,r,i,o,a,s){this.id=t,this.repoInfo_=e,this.applicationId_=n,this.onMessage_=r,this.onReady_=i,this.onDisconnect_=o,this.onKill_=a,this.lastSessionId=s,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=_("c:"+this.id+":"),this.transportManager_=new Yn(e),this.log_("Connection created"),this.start_()}return t.prototype.start_=function(){var t=this,e=this.transportManager_.initialTransport();this.conn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,void 0,this.lastSessionId),this.primaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.conn_),r=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout((function(){t.conn_&&t.conn_.open(n,r)}),Math.floor(0));var i=e.healthyTimeout||0;i>0&&(this.healthyTimeout_=V((function(){t.healthyTimeout_=null,t.isHealthy_||(t.conn_&&t.conn_.bytesReceived>
2102400?(t.log_("Connection exceeded healthy timeout but has received "+t.conn_.bytesReceived+" bytes. Marking connection healthy."),t.isHealthy_=!0,t.conn_.markConnectionHealthy()):t.conn_&&t.conn_.bytesSent>10240?t.log_("Connection exceeded healthy timeout but has sent "+t.conn_.bytesSent+" bytes. Leaving connection alive."):(t.log_("Closing unhealthy connection after timeout."),t.close()))}),Math.floor(i)))},t.prototype.nextTransportId_=function(){return"c:"+this.id+":"+this.connectionCount++},t.prototype.disconnReceiver_=function(t){var e=this;return function(n){t===e.conn_?e.onConnectionLost_(n):t===e.secondaryConn_?(e.log_("Secondary connection lost."),e.onSecondaryConnectionLost_()):e.log_("closing an old connection")}},t.prototype.connReceiver_=function(t){var e=this;return function(n){2!==e.state_&&(t===e.rx_?e.onPrimaryMessageReceived_(n):t===e.secondaryConn_?e.onSecondaryMessageReceived_(n):e.log_("message on old connection"))}},t.prototype.sendRequest=function(t){var e={t:"d",d:t};this.sendData_(e)},t.prototype.tryCleanupConnection=function(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)},t.prototype.onSecondaryControl_=function(t){if("t"in t){var e=t.t;"a"===e?this.upgradeIfSecondaryHealthy_():"r"===e?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===e&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}},t.prototype.onSecondaryMessageReceived_=function(t){var e=x("t",t),n=x("d",t);if("c"===e)this.onSecondaryControl_(n);else{if("d"!==e)throw new Error("Unknown protocol layer: "+e);this.pendingDataMessages.push(n)}},t.prototype.upgradeIfSecondaryHealthy_=function(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:"p",d:{}}}))},t.prototype.proceedWithUpgrade_=function(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()},t.prototype.onPrimaryMessageReceived_=function(t){var e=x("t",t),n=x("d",t);"c"===e?this.onControl_(n):"d"===e&&this.onDataMessage_(n)},t.prototype.onDataMessage_=function(t){this.onPrimaryResponse_(),this.onMessage_(t)},t.prototype.onPrimaryResponse_=function(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))},t.prototype.onControl_=function(t){var e=x("t",t);if("d"in t){var n=t.d;if("h"===e)this.onHandshake_(n);else if("n"===e){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(var r=0;r<this.pendingDataMessages.length;++r)this.onDataMessage_(this.pendingDataMessages[r]);this.pendingDataMessages=[],this.tryCleanupConnection()}else"s"===e?this.onConnectionShutdown_(n):"r"===e?this.onReset_(n):"e"===e?E("Server Error: "+n):"o"===e?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):E("Unknown control packet command: "+e)}},t.prototype.onHandshake_=function(t){var e=t.ts,n=t.v,r=t.h;this.sessionId=t.s,this.repoInfo_.updateHost(r),0===this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,e),rt!==n&&T("Protocol version mismatch detected"),this.tryStartUpgrade_())},t.prototype.tryStartUpgrade_=function(){var t=this.transportManager_.upgradeTransport();t&&this.startUpgrade_(t)},t.prototype.startUpgrade_=function(t){var e=this;this.secondaryConn_=new t(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.sessionId),this.secondaryResponsesRequired_=t.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.secondaryConn_),r=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,r),V((function(){e.secondaryConn_&&(e.log_("Timed out trying to upgrade."),e.secondaryConn_.close())}),Math.floor(6e4))},t.prototype.onReset_=function(t){this.log_("Reset packet received. New host: "+t),this.repoInfo_.updateHost(t),1===this.state_?this.close():(this.closeConnections_(),this.start_())},t.prototype.onConnectionEstablished_=function(t,e){var n=this;this.log_("Realtime connection established."),this.conn_=t,this.state_=1,this.onReady_&&(this.onReady_(e,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):V((function(){n.sendPingOnPrimaryIfNecessary_()}),Math.floor(5e3))},t.prototype.sendPingOnPrimaryIfNecessary_=function(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))},t.prototype.onSecondaryConnectionLost_=function(){var t=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==t&&this.rx_!==t||this.close()},t.prototype.onConnectionLost_=function(t){this.conn_=null,t||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(f.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()},t.prototype.onConnectionShutdown_=function(t){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(t),this.onKill_=null),this.onDisconnect_=null,this.close()},t.prototype.sendData_=function(t){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(t)},t.prototype.close=function(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))},t.prototype.closeConnections_=function(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)},t}(),Qn=function(){function t(){}return t.prototype.put=function(t,e,n,r){},t.prototype.merge=function(t,e,n,r){},t.prototype.refreshAuthToken=function(t){},t.prototype.onDisconnectPut=function(t,e,n){},t.prototype.onDisconnectMerge=function(t,e,n){},t.prototype.onDisconnectCancel=function(t,e){},t.prototype.reportStats=function(t){},t}(),Xn=1e3,$n=function(t){function e(n,r,i,a,s,u,c){var l=t.call(this)||this;if(l.repoInfo_=n,l.applicationId_=r,l.onDataUpdate_=i,l.onConnectStatus_=a,l.onServerInfoUpdate_=s,l.authTokenProvider_=u,l.authOverride_=c,l.id=e.nextPersistentConnectionId_++,l.log_=_("p:"+l.id+":"),l.interruptReasons_={},l.listens=new Map,l.outstandingPuts_=[],l.outstandingGets_=[],l.outstandingPutCount_=0,l.outstandingGetCount_=0,l.onDisconnectRequestQueue_=[],l.connected_=!1,l.reconnectDelay_=Xn,l.maxReconnectDelay_=3e5,l.securityDebugCallback_=null,l.lastSessionId=null,l.establishConnectionTimer_=null,l.visible_=!1,l.requestCBHash_={},l.requestNumber_=0,l.realtime_=null,l.authToken_=null,l.forceTokenRefresh_=!1,l.invali
2dAuthTokenCount_=0,l.firstConnection_=!0,l.lastConnectionAttemptTime_=null,l.lastConnectionEstablishedTime_=null,c&&!Object(o.z)())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");return l.scheduleConnect_(0),Rn.getInstance().on("visible",l.onVisible_,l),-1===n.host.indexOf("fblocal")&&Mn.getInstance().on("online",l.onOnline_,l),l}return Object(i.c)(e,t),e.prototype.sendRequest=function(t,e,n){var r=++this.requestNumber_,i={r:r,a:t,b:e};this.log_(Object(o.J)(i)),Object(o.f)(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)},e.prototype.get=function(t){var e=this,n=new o.a,r={p:t.path.toString(),q:t.queryObject()},i={action:"g",request:r,onComplete:function(t){var i=t.d;"ok"===t.s?(e.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 t=e.outstandingGets_[a];void 0!==t&&i===t&&(delete e.outstandingGets_[a],e.outstandingGetCount_--,0===e.outstandingGetCount_&&(e.outstandingGets_=[]),e.log_("get "+a+" timed out on connection"),n.reject(new Error("Client is offline.")))}),3e3),this.connected_&&this.sendGet_(a),n.promise},e.prototype.listen=function(t,e,n,r){var i=t.queryIdentifier(),a=t.path.toString();this.log_("Listen called for "+a+" "+i),this.listens.has(a)||this.listens.set(a,new Map),Object(o.f)(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"listen() called for non-default but complete query"),Object(o.f)(!this.listens.get(a).has(i),"listen() called twice for same path/queryId.");var s={onComplete:r,hashFn:e,query:t,tag:n};this.listens.get(a).set(i,s),this.connected_&&this.sendListen_(s)},e.prototype.sendGet_=function(t){var e=this,n=this.outstandingGets_[t];this.sendRequest("g",n.request,(function(r){delete e.outstandingGets_[t],e.outstandingGetCount_--,0===e.outstandingGetCount_&&(e.outstandingGets_=[]),n.onComplete&&n.onComplete(r)}))},e.prototype.sendListen_=function(t){var n=this,r=t.query,i=r.path.toString(),o=r.queryIdentifier();this.log_("Listen on "+i+" for "+o);var a={p:i};t.tag&&(a.q=r.queryObject(),a.t=t.tag),a.h=t.hashFn(),this.sendRequest("q",a,(function(a){var s=a.d,u=a.s;e.warnOnListenWarnings_(s,r),(n.listens.get(i)&&n.listens.get(i).get(o))===t&&(n.log_("listen response",a),"ok"!==u&&n.removeListen_(i,o),t.onComplete&&t.onComplete(u,s))}))},e.warnOnListenWarnings_=function(t,e){if(t&&"object"===typeof t&&Object(o.k)(t,"w")){var n=Object(o.G)(t,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){var r='".indexOn": "'+e.getQueryParams().getIndex().toString()+'"',i=e.path.toString();T("Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding "+r+" at "+i+" to your security rules for better performance.")}}},e.prototype.refreshAuthToken=function(t){this.authToken_=t,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},(function(){})),this.reduceReconnectDelayIfAdminCredential_(t)},e.prototype.reduceReconnectDelayIfAdminCredential_=function(t){(t&&40===t.length||Object(o.q)(t))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=3e4)},e.prototype.tryAuth=function(){var t=this;if(this.connected_&&this.authToken_){var e=this.authToken_,n=Object(o.C)(e)?"auth":"gauth",r={cred:e};null===this.authOverride_?r.noauth=!0:"object"===typeof this.authOverride_&&(r.authvar=this.authOverride_),this.sendRequest(n,r,(function(n){var r=n.s,i=n.d||"error";t.authToken_===e&&("ok"===r?t.invalidAuthTokenCount_=0:t.onAuthRevoked_(r,i))}))}},e.prototype.unlisten=function(t,e){var n=t.path.toString(),r=t.queryIdentifier();this.log_("Unlisten called for "+n+" "+r),Object(o.f)(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,t.queryObject(),e)},e.prototype.sendUnlisten_=function(t,e,n,r){this.log_("Unlisten on "+t+" for "+e);var i={p:t};r&&(i.q=n,i.t=r),this.sendRequest("n",i)},e.prototype.onDisconnectPut=function(t,e,n){this.connected_?this.sendOnDisconnect_("o",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"o",data:e,onComplete:n})},e.prototype.onDisconnectMerge=function(t,e,n){this.connected_?this.sendOnDisconnect_("om",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"om",data:e,onComplete:n})},e.prototype.onDisconnectCancel=function(t,e){this.connected_?this.sendOnDisconnect_("oc",t,null,e):this.onDisconnectRequestQueue_.push({pathString:t,action:"oc",data:null,onComplete:e})},e.prototype.sendOnDisconnect_=function(t,e,n,r){var i={p:e,d:n};this.log_("onDisconnect "+t,i),this.sendRequest(t,i,(function(t){r&&setTimeout((function(){r(t.s,t.d)}),Math.floor(0))}))},e.prototype.put=function(t,e,n,r){this.putInternal("p",t,e,n,r)},e.prototype.merge=function(t,e,n,r){this.putInternal("m",t,e,n,r)},e.prototype.putInternal=function(t,e,n,r,i){var o={p:e,d:n};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:t,request:o,onComplete:r}),this.outstandingPutCount_++;var a=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(a):this.log_("Buffering put: "+e)},e.prototype.sendPut_=function(t){var e=this,n=this.outstandingPuts_[t].action,r=this.outstandingPuts_[t].request,i=this.outstandingPuts_[t].onComplete;this.outstandingPuts_[t].queued=this.connected_,this.sendRequest(n,r,(function(r){e.log_(n+" response",r),delete e.outstandingPuts_[t],e.outstandingPutCount_--,0===e.outstandingPutCount_&&(e.outstandingPuts_=[]),i&&i(r.s,r.d)}))},e.prototype.reportStats=function(t){var e=this;if(this.connected_){var n={c:t};this.log_("reportStats",n),this.sendRequest("s",n,(function(t){if("ok"!==t.s){var n=t.d;e.log_("reportStats","Error sending stats: "+n)}}))}},e.prototype.onDataMessage_=function(t){if("r"in t){this.log_("from server: "+Object(o.J)(t));var e=t.r,n=this.requestCBHash_[e];n&&(delete this.requestCBHash_[e],n(t.b))}else{if("error"in t)throw"A server-side error has occurred: "+t.error;"a"in t&&this.onDataPush_(t.a,t.b)}},e.prototype.onDataPush_=function(t,e){this.log_("handleServerMessage",t,e),"d"===t?this.onDataUpdate_(e.p,e.d,!1,e.t):"m"===t?this.onDataUpdate_(e.p,e.d,!0,e.t):"c"===t?this.onListenRevoked_(e.p,e.q):"ac"===t?this.onAuthRevoked_(e.s,e.d):"sd"===t?this.onSecurityDebugPacket_(e):E("Unrecognized action received from server: "+Object(o.J)(t)+"\nAre you using the latest client?")},e.prototype.onReady_=function(t,e){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(t),this.lastSessionId=e,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)},e.prototype.scheduleConnect_=function(t){var e=this;Object(o.f)(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout((function(){e.establishConnectionTimer_=null,e.establishConnection_()}),Math.floor(t))},e.prototype.onVisible_=function(t){t&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=Xn,this.realtime_||this.scheduleConnect_(0)),this.visible_=t},e.prototype.onOnline_=function(t){t?(this.log_("Browser went online."),this.reconnectDelay_=Xn,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())},e.prototype.onRealtimeDisconnect_=function(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){if(this.visible_){if(this.lastConnectionEstablishedTime_){(new Date).getTime()-this.lastConnectionEstablishedTime_>3e4&&(this.reconnectDelay_=Xn),this.lastConnectionEstablishedTime_=null}}else this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime();var t=(new Date).getTime()-this.lastConnectionAttemptTime_,e=Math.max(0,this.reconnectDelay_-t);
2e=Math.random()*e,this.log_("Trying to reconnect in "+e+"ms"),this.scheduleConnect_(e),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)},e.prototype.establishConnection_=function(){var t=this;if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=(new Date).getTime(),this.lastConnectionEstablishedTime_=null;var n=this.onDataMessage_.bind(this),r=this.onReady_.bind(this),i=this.onRealtimeDisconnect_.bind(this),a=this.id+":"+e.nextConnectionId_++,s=this,u=this.lastSessionId,c=!1,l=null,f=function(){l?l.close():(c=!0,i())};this.realtime_={close:f,sendRequest:function(t){Object(o.f)(l,"sendRequest call when we're not connected not allowed."),l.sendRequest(t)}};var h=this.forceTokenRefresh_;this.forceTokenRefresh_=!1,this.authTokenProvider_.getToken(h).then((function(t){c?w("getToken() completed but was canceled"):(w("getToken() completed. Creating connection."),s.authToken_=t&&t.accessToken,l=new Kn(a,s.repoInfo_,s.applicationId_,n,r,i,(function(t){T(t+" ("+s.repoInfo_.toString()+")"),s.interrupt("server_kill")}),u))})).then(null,(function(e){s.log_("Failed to get token: "+e),c||(t.repoInfo_.nodeAdmin&&T(e),f())}))}},e.prototype.interrupt=function(t){w("Interrupting connection for reason: "+t),this.interruptReasons_[t]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())},e.prototype.resume=function(t){w("Resuming connection for reason: "+t),delete this.interruptReasons_[t],Object(o.u)(this.interruptReasons_)&&(this.reconnectDelay_=Xn,this.realtime_||this.scheduleConnect_(0))},e.prototype.handleTimestamp_=function(t){var e=t-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:e})},e.prototype.cancelSentTransactions_=function(){for(var t=0;t<this.outstandingPuts_.length;t++){var e=this.outstandingPuts_[t];e&&"h"in e.request&&e.queued&&(e.onComplete&&e.onComplete("disconnect"),delete this.outstandingPuts_[t],this.outstandingPutCount_--)}0===this.outstandingPutCount_&&(this.outstandingPuts_=[])},e.prototype.onListenRevoked_=function(t,e){var n;n=e?e.map((function(t){return P(t)})).join("$"):"default";var r=this.removeListen_(t,n);r&&r.onComplete&&r.onComplete("permission_denied")},e.prototype.removeListen_=function(t,e){var n,r=new B(t).toString();if(this.listens.has(r)){var i=this.listens.get(r);n=i.get(e),i.delete(e),0===i.size&&this.listens.delete(r)}else n=void 0;return n},e.prototype.onAuthRevoked_=function(t,e){w("Auth token revoked: "+t+"/"+e),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==t&&"permission_denied"!==t||(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))},e.prototype.onSecurityDebugPacket_=function(t){this.securityDebugCallback_?this.securityDebugCallback_(t):"msg"in t&&console.log("FIREBASE: "+t.msg.replace("\n","\nFIREBASE: "))},e.prototype.restoreState_=function(){var t,e,n,r;this.tryAuth();try{for(var o=Object(i.h)(this.listens.values()),a=o.next();!a.done;a=o.next()){var s=a.value;try{for(var u=(n=void 0,Object(i.h)(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){t={error:p}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.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)},e.prototype.sendConnectStats_=function(){var t={},e="js";Object(o.z)()&&(e=this.repoInfo_.nodeAdmin?"admin_node":"node"),t["sdk."+e+"."+qn.replace(/\./g,"-")]=1,Object(o.x)()?t["framework.cordova"]=1:Object(o.A)()&&(t["framework.reactnative"]=1),this.reportStats(t)},e.prototype.shouldReconnect_=function(){var t=Mn.getInstance().currentlyOnline();return Object(o.u)(this.interruptReasons_)&&t},e.nextPersistentConnectionId_=0,e.nextConnectionId_=0,e}(Qn),Jn=function(t){function e(e,n,r){var i=t.call(this)||this;return i.repoInfo_=e,i.onDataUpdate_=n,i.authTokenProvider_=r,i.log_=_("p:rest:"),i.listens_={},i}return Object(i.c)(e,t),e.prototype.reportStats=function(t){throw new Error("Method not implemented.")},e.getListenId_=function(t,e){return void 0!==e?"tag$"+e:(Object(o.f)(t.getQueryParams().isDefault(),"should have a tag if it's not a default query."),t.path.toString())},e.prototype.listen=function(t,n,r,i){var a=this,s=t.path.toString();this.log_("Listen called for "+s+" "+t.queryIdentifier());var u=e.getListenId_(t,r),c={};this.listens_[u]=c;var l=Pe(t.getQueryParams());this.restRequest_(s+".json",l,(function(t,e){var n=e;(404===t&&(n=null,t=null),null===t&&a.onDataUpdate_(s,n,!1,r),Object(o.G)(a.listens_,u)===c)&&i(t?401===t?"permission_denied":"rest_error:"+t:"ok",null)}))},e.prototype.unlisten=function(t,n){var r=e.getListenId_(t,n);delete this.listens_[r]},e.prototype.get=function(t){var e=this,n=Pe(t.getQueryParams()),r=t.path.toString(),i=new o.a;return this.restRequest_(r+".json",n,(function(t,n){var o=n;404===t&&(o=null,t=null),null===t?(e.onDataUpdate_(r,o,!1,null),i.resolve(o)):i.reject(new Error(o))})),i.promise},e.prototype.refreshAuthToken=function(t){},e.prototype.restRequest_=function(t,e,n){var r=this;void 0===e&&(e={}),e.format="export",this.authTokenProvider_.getToken(!1).then((function(i){var a=i&&i.accessToken;a&&(e.auth=a);var s=(r.repoInfo_.secure?"https://":"http://")+r.repoInfo_.host+t+"?ns="+r.repoInfo_.namespace+Object(o.F)(e);r.log_("Sending REST request for "+s);var u=new XMLHttpRequest;u.onreadystatechange=function(){if(n&&4===u.readyState){r.log_("REST Response for "+s+" received. status:",u.status,"response:",u.responseText);var t=null;if(u.status>=200&&u.status<300){try{t=Object(o.D)(u.responseText)}catch(e){T("Failed to parse JSON response for "+s+": "+u.responseText)}n(null,t)}else 401!==u.status&&404!==u.status&&T("Got unsuccessful REST response for "+s+" Status: "+u.status),n(u.status);n=null}},u.open("GET",s,!0),u.send()}))},e}(Qn),Zn=function(){this.children={},this.childCount=0,this.value=null},tr=function(){function t(t,e,n){void 0===t&&(t=""),void 0===e&&(e=null),void 0===n&&(n=new Zn),this.name_=t,this.parent_=e,this.node_=n}return t.prototype.subTree=function(e){for(var n=e instanceof B?e:new B(e),r=this,i=z(n);null!==i;
2){r=new t(i,r,Object(o.G)(r.node_.children,i)||new Zn),i=z(n=H(n))}return r},t.prototype.getValue=function(){return this.node_.value},t.prototype.setValue=function(t){Object(o.f)("undefined"!==typeof t,"Cannot set value to undefined"),this.node_.value=t,this.updateParents_()},t.prototype.clear=function(){this.node_.value=null,this.node_.children={},this.node_.childCount=0,this.updateParents_()},t.prototype.hasChildren=function(){return this.node_.childCount>0},t.prototype.isEmpty=function(){return null===this.getValue()&&!this.hasChildren()},t.prototype.forEachChild=function(e){var n=this;A(this.node_.children,(function(r,i){e(new t(r,n,i))}))},t.prototype.forEachDescendant=function(t,e,n){e&&!n&&t(this),this.forEachChild((function(e){e.forEachDescendant(t,!0,n)})),e&&n&&t(this)},t.prototype.forEachAncestor=function(t,e){for(var n=e?this:this.parent();null!==n;){if(t(n))return!0;n=n.parent()}return!1},t.prototype.forEachImmediateDescendantWithValue=function(t){this.forEachChild((function(e){null!==e.getValue()?t(e):e.forEachImmediateDescendantWithValue(t)}))},t.prototype.path=function(){return new B(null===this.parent_?this.name_:this.parent_.path()+"/"+this.name_)},t.prototype.name=function(){return this.name_},t.prototype.parent=function(){return this.parent_},t.prototype.updateParents_=function(){null!==this.parent_&&this.parent_.updateChild_(this.name_,this)},t.prototype.updateChild_=function(t,e){var n=e.isEmpty(),r=Object(o.k)(this.node_.children,t);n&&r?(delete this.node_.children[t],this.node_.childCount--,this.updateParents_()):n||r||(this.node_.children[t]=e.node_,this.node_.childCount++,this.updateParents_())},t}(),er="repo_interrupt";!function(t){t[t.RUN=0]="RUN",t[t.SENT=1]="SENT",t[t.COMPLETED=2]="COMPLETED",t[t.SENT_NEEDS_ABORT=3]="SENT_NEEDS_ABORT",t[t.NEEDS_ABORT=4]="NEEDS_ABORT"}(Hn||(Hn={}));var nr=function(){function t(t,e,n,r){this.repoInfo_=t,this.forceRestClient_=e,this.app=n,this.authTokenProvider_=r,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new Cn,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=new qe,this.transactionQueueTree_=new tr,this.persistentConnection_=null,this.key=this.repoInfo_.toURLString()}return t.prototype.start=function(){var t=this;if(this.stats_=Sn.getCollection(this.repoInfo_),this.forceRestClient_||("object"===typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0)this.server_=new Jn(this.repoInfo_,this.onDataUpdate_.bind(this),this.authTokenProvider_),setTimeout(this.onConnectStatus_.bind(this,!0),0);else{var e=this.app.options.databaseAuthVariableOverride;if("undefined"!==typeof e&&null!==e){if("object"!==typeof e)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{Object(o.J)(e)}catch(n){throw new Error("Invalid authOverride provided: "+n)}}this.persistentConnection_=new $n(this.repoInfo_,this.app.options.appId,this.onDataUpdate_.bind(this),this.onConnectStatus_.bind(this),this.onServerInfoUpdate_.bind(this),this.authTokenProvider_,e),this.server_=this.persistentConnection_}this.authTokenProvider_.addTokenChangeListener((function(e){t.server_.refreshAuthToken(e)})),this.statsReporter_=Sn.getOrCreateReporter(this.repoInfo_,(function(){return new In(t.stats_,t.server_)})),this.infoData_=new On,this.infoSyncTree_=new En({startListening:function(e,n,r,i){var o=[],a=t.infoData_.getNode(e.path);return a.isEmpty()||(o=t.infoSyncTree_.applyServerOverwrite(e.path,a),setTimeout((function(){i("ok")}),0)),o},stopListening:function(){}}),this.updateInfo_("connected",!1),this.serverSyncTree_=new En({startListening:function(e,n,r,i){return t.server_.listen(e,r,n,(function(n,r){var o=i(n,r);Pn(t.eventQueue_,e.path,o)})),[]},stopListening:function(e,n){t.server_.unlisten(e,n)}})},t.prototype.toString=function(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host},t.prototype.name=function(){return this.repoInfo_.namespace},t.prototype.serverTime=function(){var t=this.infoData_.getNode(new B(".info/serverTimeOffset")).val()||0;return(new Date).getTime()+t},t.prototype.generateServerValues=function(){return(t=(t={timestamp:this.serverTime()})||{}).timestamp=t.timestamp||(new Date).getTime(),t;var t},t.prototype.onDataUpdate_=function(t,e,n,r){this.dataUpdateCount++;var i=new B(t);e=this.interceptServerDataCallback_?this.interceptServerDataCallback_(t,e):e;var a=[];if(r)if(n){var s=Object(o.E)(e,(function(t){return se(t)}));a=this.serverSyncTree_.applyTaggedQueryMerge(i,s,r)}else{var u=se(e);a=this.serverSyncTree_.applyTaggedQueryOverwrite(i,u,r)}else if(n){var c=Object(o.E)(e,(function(t){return se(t)}));a=this.serverSyncTree_.applyServerMerge(i,c)}else{var l=se(e);a=this.serverSyncTree_.applyServerOverwrite(i,l)}var f=i;a.length>0&&(f=this.rerunTransactions_(i)),Pn(this.eventQueue_,f,a)},t.prototype.interceptServerData_=function(t){this.interceptServerDataCallback_=t},t.prototype.onConnectStatus_=function(t){this.updateInfo_("connected",t),!1===t&&this.runOnDisconnectEvents_()},t.prototype.onServerInfoUpdate_=function(t){var e=this;A(t,(function(t,n){e.updateInfo_(t,n)}
2))},t.prototype.updateInfo_=function(t,e){var n=new B("/.info/"+t),r=se(e);this.infoData_.updateSnapshot(n,r);var i=this.infoSyncTree_.applyServerOverwrite(n,r);Pn(this.eventQueue_,n,i)},t.prototype.getNextWriteId_=function(){return this.nextWriteId_++},t.prototype.getValue=function(t){var e=this,n=this.serverSyncTree_.getServerValue(t);return null!=n?Promise.resolve(new le(n,t.getRef(),t.getQueryParams().getIndex())):this.server_.get(t).then((function(n){var r=se(n),i=e.serverSyncTree_.applyServerOverwrite(t.path,r);return xn(e.eventQueue_,t.path,i),Promise.resolve(new le(r,t.getRef(),t.getQueryParams().getIndex()))}),(function(n){return e.log_("get for query "+Object(o.J)(t)+" failed: "+n),Promise.reject(new Error(n))}))},t.prototype.setWithPriority=function(t,e,n,r){var i=this;this.log_("set",{path:t.toString(),value:e,priority:n});var o=this.generateServerValues(),a=se(e,n),s=this.serverSyncTree_.calcCompleteEventCache(t),u=Ue(a,s,o),c=this.getNextWriteId_(),l=this.serverSyncTree_.applyUserOverwrite(t,u,c,!0);Nn(this.eventQueue_,l),this.server_.put(t.toString(),a.val(!0),(function(e,n){var o="ok"===e;o||T("set at "+t+" failed: "+e);var a=i.serverSyncTree_.ackUserWrite(c,!o);Pn(i.eventQueue_,t,a),i.callOnCompleteCallback(r,e,n)}));var f=this.abortTransactions_(t);this.rerunTransactions_(f),Pn(this.eventQueue_,f,[])},t.prototype.update=function(t,e,n){var r=this;this.log_("update",{path:t.toString(),value:e});var i=!0,o=this.generateServerValues(),a={};if(A(e,(function(e,n){i=!1,a[e]=Fe(X(t,e),se(n),r.serverSyncTree_,o)})),i)w("update() called with empty data. Don't do anything."),this.callOnCompleteCallback(n,"ok");else{var s=this.getNextWriteId_(),u=this.serverSyncTree_.applyUserMerge(t,a,s);Nn(this.eventQueue_,u),this.server_.merge(t.toString(),e,(function(e,i){var o="ok"===e;o||T("update at "+t+" failed: "+e);var a=r.serverSyncTree_.ackUserWrite(s,!o),u=a.length>0?r.rerunTransactions_(t):t;Pn(r.eventQueue_,u,a),r.callOnCompleteCallback(n,e,i)})),A(e,(function(e){var n=r.abortTransactions_(X(t,e));r.rerunTransactions_(n)})),Pn(this.eventQueue_,t,[])}},t.prototype.runOnDisconnectEvents_=function(){var t=this;this.log_("onDisconnectEvents");var e=this.generateServerValues(),n=new qe;this.onDisconnect_.forEachTree(q(),(function(r,i){var o=Fe(r,i,t.serverSyncTree_,e);n.remember(r,o)}));var r=[];n.forEachTree(q(),(function(e,n){r=r.concat(t.serverSyncTree_.applyServerOverwrite(e,n));var i=t.abortTransactions_(e);t.rerunTransactions_(i)})),this.onDisconnect_=new qe,Pn(this.eventQueue_,q(),r)},t.prototype.onDisconnectCancel=function(t,e){var n=this;this.server_.onDisconnectCancel(t.toString(),(function(r,i){"ok"===r&&n.onDisconnect_.forget(t),n.callOnCompleteCallback(e,r,i)}))},t.prototype.onDisconnectSet=function(t,e,n){var r=this,i=se(e);this.server_.onDisconnectPut(t.toString(),i.val(!0),(function(e,o){"ok"===e&&r.onDisconnect_.remember(t,i),r.callOnCompleteCallback(n,e,o)}))},t.prototype.onDisconnectSetWithPriority=function(t,e,n,r){var i=this,o=se(e,n);this.server_.onDisconnectPut(t.toString(),o.val(!0),(function(e,n){"ok"===e&&i.onDisconnect_.remember(t,o),i.callOnCompleteCallback(r,e,n)}))},t.prototype.onDisconnectUpdate=function(t,e,n){var r=this;if(Object(o.u)(e))return w("onDisconnect().update() called with empty data. Don't do anything."),void this.callOnCompleteCallback(n,"ok");this.server_.onDisconnectMerge(t.toString(),e,(function(i,o){"ok"===i&&A(e,(function(e,n){var i=se(n);r.onDisconnect_.remember(X(t,e),i)})),r.callOnCompleteCallback(n,i,o)}))},t.prototype.addEventCallbackForQuery=function(t,e){var n;n=".info"===z(t.path)?this.infoSyncTree_.addEventRegistration(t,e):this.serverSyncTree_.addEventRegistration(t,e),xn(this.eventQueue_,t.path,n)},t.prototype.removeEventCallbackForQuery=function(t,e){var n;n=".info"===z(t.path)?this.infoSyncTree_.removeEventRegistration(t,e):this.serverSyncTree_.removeEventRegistration(t,e),xn(this.eventQueue_,t.path,n)},t.prototype.interrupt=function(){this.persistentConnection_&&this.persistentConnection_.interrupt(er)},t.prototype.resume=function(){this.persistentConnection_&&this.persistentConnection_.resume(er)},t.prototype.stats=function(t){if(void 0===t&&(t=!1),"undefined"!==typeof console){var e;t?(this.statsListener_||(this.statsListener_=new kn(this.stats_)),e=this.statsListener_.get()):e=this.stats_.get();var n=Object.keys(e).reduce((function(t,e){return Math.max(e.length,t)}),0);A(e,(function(t,e){for(var r=t,i=t.length;i<n+2;i++)r+=" ";console.log(r+e)}))}},t.prototype.statsIncrementCounter=function(t){this.stats_.incrementCounter(t),this.statsReporter_.includeStat(t)}
2,t.prototype.log_=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="";this.persistentConnection_&&(n=this.persistentConnection_.id+":"),w.apply(void 0,Object(i.f)([n],t))},t.prototype.callOnCompleteCallback=function(t,e,n){t&&U((function(){if("ok"===e)t(null);else{var r=(e||"error").toUpperCase(),i=r;n&&(i+=": "+n);var o=new Error(i);o.code=r,t(o)}}))},Object.defineProperty(t.prototype,"database",{get:function(){return this.__database||(this.__database=new ur(this))},enumerable:!1,configurable:!0}),t.prototype.startTransaction=function(t,e,n,r){this.log_("transaction on "+t);var i=function(){},a=new rr(this,t);a.on("value",i);var s={path:t,update:e,onComplete:n,status:null,order:p(),applyLocally:r,retryCount:0,unwatcher:function(){a.off("value",i)},abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},u=this.getLatestState_(t);s.currentInputSnapshot=u;var c=s.update(u.val());if(void 0===c){if(s.unwatcher(),s.currentOutputSnapshotRaw=null,s.currentOutputSnapshotResolved=null,s.onComplete){var l=new le(s.currentInputSnapshot,new rr(this,s.path),Yt);s.onComplete(null,!1,l)}}else{bt("transaction failed: Data returned ",c,s.path),s.status=Hn.RUN;var f=this.transactionQueueTree_.subTree(t),h=f.getValue()||[];h.push(s),f.setValue(h);var d=void 0;if("object"===typeof c&&null!==c&&Object(o.k)(c,".priority"))d=Object(o.G)(c,".priority"),Object(o.f)(yt(d),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.");else d=(this.serverSyncTree_.calcCompleteEventCache(t)||oe.EMPTY_NODE).getPriority().val();var v=this.generateServerValues(),m=se(c,d),y=Ue(m,u,v);s.currentOutputSnapshotRaw=m,s.currentOutputSnapshotResolved=y,s.currentWriteId=this.getNextWriteId_();var g=this.serverSyncTree_.applyUserOverwrite(t,y,s.currentWriteId,s.applyLocally);Pn(this.eventQueue_,t,g),this.sendReadyTransactions_()}},t.prototype.getLatestState_=function(t,e){return this.serverSyncTree_.calcCompleteEventCache(t,e)||oe.EMPTY_NODE},t.prototype.sendReadyTransactions_=function(t){var e=this;if(void 0===t&&(t=this.transactionQueueTree_),t||this.pruneCompletedTransactionsBelowNode_(t),null!==t.getValue()){var n=this.buildTransactionQueue_(t);Object(o.f)(n.length>0,"Sending zero length transaction queue"),n.every((function(t){return t.status===Hn.RUN}))&&this.sendTransactionQueue_(t.path(),n)}else t.hasChildren()&&t.forEachChild((function(t){e.sendReadyTransactions_(t)}))},t.prototype.sendTransactionQueue_=function(t,e){for(var n=this,r=e.map((function(t){return t.currentWriteId})),i=this.getLatestState_(t,r),a=i,s=i.hash(),u=0;u<e.length;u++){var c=e[u];Object(o.f)(c.status===Hn.RUN,"tryToSendTransactionQueue_: items in queue should all be run."),c.status=Hn.SENT,c.retryCount++;var l=J(t,c.path);a=a.updateChild(l,c.currentOutputSnapshotRaw)}var f=a.val(!0),h=t;this.server_.put(h.toString(),f,(function(r){n.log_("transaction put response",{path:h.toString(),status:r});var i=[];if("ok"===r){for(var o=[],a=0;a<e.length;a++){if(e[a].status=Hn.COMPLETED,i=i.concat(n.serverSyncTree_.ackUserWrite(e[a].currentWriteId)),e[a].onComplete){var s=e[a].currentOutputSnapshotResolved,u=new rr(n,e[a].path),c=new le(s,u,Yt);o.push(e[a].onComplete.bind(null,null,!0,c))}e[a].unwatcher()}n.pruneCompletedTransactionsBelowNode_(n.transactionQueueTree_.subTree(t)),n.sendReadyTransactions_(),Pn(n.eventQueue_,t,i);for(a=0;a<o.length;a++)U(o[a])}else{if("datastale"===r)for(a=0;a<e.length;a++)e[a].status===Hn.SENT_NEEDS_ABORT?e[a].status=Hn.NEEDS_ABORT:e[a].status=Hn.RUN;else{T("transaction at "+h.toString()+" failed: "+r);for(a=0;a<e.length;a++)e[a].status=Hn.NEEDS_ABORT,e[a].abortReason=r}n.rerunTransactions_(t)}}),s)},t.prototype.rerunTransactions_=function(t){var e=this.getAncestorTransactionNode_(t),n=e.path(),r=this.buildTransactionQueue_(e);return this.rerunTransactionQueue_(r,n),n},t.prototype.rerunTransactionQueue_=function(t,e){if(0!==t.length){for(var n,r=[],i=[],a=t.filter((function(t){return t.status===Hn.RUN})).map((function(t){return t.currentWriteId})),s=0;s<t.length;s++){var u=t[s],c=J(e,u.path),l=!1,f=void 0;if(Object(o.f)(null!==c,"rerunTransactionsUnderNode_: relativePath should not be null."),u.status===Hn.NEEDS_ABORT)l=!0,f=u.abortReason,i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else if(u.status===Hn.RUN)if(u.retryCount>=25)l=!0,f="maxretry",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else{var h=this.getLatestState_(u.path,a);u.currentInputSnapshot=h;var d=t[s].update(h.val());if(void 0!==d){bt("transaction failed: Data returned ",d,u.path);var p=se(d);"object"===typeof d&&null!=d&&Object(o.k)(d,".priority")||(p=p.updatePriority(h.getPriority()));var v=u.currentWriteId,m=this.generateServerValues(),y=Ue(p,h,m);u.currentOutputSnapshotRaw=p,u.currentOutputSnapshotResolved=y,u.currentWriteId=this.getNextWriteId_(),a.splice(a.indexOf(v),1),i=(i=i.concat(this.serverSyncTree_.applyUserOverwrite(u.path,y,u.currentWriteId,u.applyLocally))).concat(this.serverSyncTree_.ackUserWrite(v,!0))}else l=!0,f="nodata",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0))}if(Pn(this.eventQueue_,e,i),i=[],l&&(t[s].status=Hn.COMPLETED,n=t[s].unwatcher,setTimeout(n,Math.floor(0)),t[s].onComplete))if("nodata"===f){var g=new rr(this,t[s].path),b=t[s].currentInputSnapshot,w=new le(b,g,Yt);r.push(t[s].onComplete.bind(null,null,!1,w))}else r.push(t[s].onComplete.bind(null,new Error(f),!1,null))}this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);for(s=0;s<r.length;s++)U(r[s]);this.sendReadyTransactions_()}},t.prototype.getAncestorTransactionNode_=function(t){var e,n=this.transactionQueueTree_;
2for(e=z(t);null!==e&&null===n.getValue();)n=n.subTree(e),e=z(t=H(t));return n},t.prototype.buildTransactionQueue_=function(t){var e=[];return this.aggregateTransactionQueuesForNode_(t,e),e.sort((function(t,e){return t.order-e.order})),e},t.prototype.aggregateTransactionQueuesForNode_=function(t,e){var n=this,r=t.getValue();if(null!==r)for(var i=0;i<r.length;i++)e.push(r[i]);t.forEachChild((function(t){n.aggregateTransactionQueuesForNode_(t,e)}))},t.prototype.pruneCompletedTransactionsBelowNode_=function(t){var e=this,n=t.getValue();if(n){for(var r=0,i=0;i<n.length;i++)n[i].status!==Hn.COMPLETED&&(n[r]=n[i],r++);n.length=r,t.setValue(n.length>0?n:null)}t.forEachChild((function(t){e.pruneCompletedTransactionsBelowNode_(t)}))},t.prototype.abortTransactions_=function(t){var e=this,n=this.getAncestorTransactionNode_(t).path(),r=this.transactionQueueTree_.subTree(t);return r.forEachAncestor((function(t){e.abortTransactionsOnNode_(t)})),this.abortTransactionsOnNode_(r),r.forEachDescendant((function(t){e.abortTransactionsOnNode_(t)})),n},t.prototype.abortTransactionsOnNode_=function(t){var e=t.getValue();if(null!==e){for(var n=[],r=[],i=-1,a=0;a<e.length;a++)if(e[a].status===Hn.SENT_NEEDS_ABORT);else if(e[a].status===Hn.SENT)Object(o.f)(i===a-1,"All SENT items should be at beginning of queue."),i=a,e[a].status=Hn.SENT_NEEDS_ABORT,e[a].abortReason="set";else if(Object(o.f)(e[a].status===Hn.RUN,"Unexpected transaction status in abort"),e[a].unwatcher(),r=r.concat(this.serverSyncTree_.ackUserWrite(e[a].currentWriteId,!0)),e[a].onComplete){n.push(e[a].onComplete.bind(null,new Error("set"),!1,null))}-1===i?t.setValue(null):e.length=i+1,Pn(this.eventQueue_,t.path(),r);for(a=0;a<n.length;a++)U(n[a])}},t}(),rr=function(t){function e(e,n){if(!(e instanceof nr))throw new Error("new Reference() no longer supported - use app.database().");return t.call(this,e,n,new Oe,!1)||this}return Object(i.c)(e,t),e.prototype.getKey=function(){return Object(o.K)("Reference.key",0,0,arguments.length),$(this.path)?null:G(this.path)},e.prototype.child=function(t){return Object(o.K)("Reference.child",1,1,arguments.length),"number"===typeof t?t=String(t):t instanceof B||(null===z(this.path)?St("Reference.child",1,t,!1):Tt("Reference.child",1,t,!1)),new e(this.repo,X(this.path,t))},e.prototype.getParent=function(){Object(o.K)("Reference.parent",0,0,arguments.length);var t=Q(this.path);return null===t?null:new e(this.repo,t)},e.prototype.getRoot=function(){Object(o.K)("Reference.root",0,0,arguments.length);for(var t=this;null!==t.getParent();)t=t.getParent();return t},e.prototype.databaseProp=function(){return this.repo.database},e.prototype.set=function(t,e){Object(o.K)("Reference.set",1,2,arguments.length),kt("Reference.set",this.path),gt("Reference.set",1,t,this.path,!1),Object(o.L)("Reference.set",2,e,!0);var n=new o.a;return this.repo.setWithPriority(this.path,t,null,n.wrapCallback(e)),n.promise},e.prototype.update=function(t,e){if(Object(o.K)("Reference.update",1,2,arguments.length),kt("Reference.update",this.path),Array.isArray(t)){for(var n={},r=0;r<t.length;++r)n[""+r]=t[r];t=n,T("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.")}wt("Reference.update",1,t,this.path,!1),Object(o.L)("Reference.update",2,e,!0);var i=new o.a;return this.repo.update(this.path,t,i.wrapCallback(e)),i.promise},e.prototype.setWithPriority=function(t,e,n){if(Object(o.K)("Reference.setWithPriority",2,3,arguments.length),kt("Reference.setWithPriority",this.path),gt("Reference.setWithPriority",1,t,this.path,!1),_t("Reference.setWithPriority",2,e,!1),Object(o.L)("Reference.setWithPriority",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.setWithPriority failed: "+this.getKey()+" is a read-only object.";var r=new o.a;return this.repo.setWithPriority(this.path,t,e,r.wrapCallback(n)),r.promise},e.prototype.remove=function(t){return Object(o.K)("Reference.remove",0,1,arguments.length),kt("Reference.remove",this.path),Object(o.L)("Reference.remove",1,t,!0),this.set(null,t)},e.prototype.transaction=function(t,e,n){if(Object(o.K)("Reference.transaction",1,3,arguments.length),kt("Reference.transaction",this.path),Object(o.L)("Reference.transaction",1,t,!1),Object(o.L)("Reference.transaction",2,e,!0),Ct("Reference.transaction",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.transaction failed: "+this.getKey()+" is a read-only object.";void 0===n&&(n=!0);var r=new o.a;"function"===typeof e&&r.promise.catch((function(){}));var i=function(t,n,i){t?r.reject(t):r.resolve(new xt(n,i)),"function"===typeof e&&e(t,n,i)};return this.repo.startTransaction(this.path,t,i,n),r.promise},e.prototype.setPriority=function(t,e){Object(o.K)("Reference.setPriority",1,2,arguments.length),kt("Reference.setPriority",this.path),_t("Reference.setPriority",1,t,!1),Object(o.L)("Reference.setPriority",2,e,!0);var n=new o.a;return this.repo.setWithPriority(X(this.path,".priority"),t,null,n.wrapCallback(e)),n.promise},e.prototype.push=function(t,e){Object(o.K)("Reference.push",0,2,arguments.length),kt("Reference.push",this.path),gt("Reference.push",1,t,this.path,!0),Object(o.L)("Reference.push",2,e,!0);var n,r=this.repo.serverTime(),i=jt(r),a=this.child(i),s=this.child(i);return n=null!=t?a.set(t,e).then((function(){return s})):Promise.resolve(s),a.then=n.then.bind(n),a.catch=n.then.bind(n,void 0),"function"===typeof e&&n.catch((function(){})),a},e.prototype.onDisconnect=function(){return kt("Reference.onDisconnect",this.path),new Nt(this.repo,this.path)},Object.defineProperty(e.prototype,"database",{get:function(){return this.databaseProp()}
2,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"key",{get:function(){return this.getKey()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this.getParent()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this.getRoot()},enumerable:!1,configurable:!0}),e}(je);je.__referenceConstructor=rr,un.__referenceConstructor=rr;var ir,or=function(){function t(t,e){var n=this;this.app_=t,this.authProvider_=e,this.auth_=null,this.auth_=e.getImmediate({optional:!0}),this.auth_||e.get().then((function(t){return n.auth_=t}))}return t.prototype.getToken=function(t){return this.auth_?this.auth_.getToken(t).catch((function(t){return t&&"auth/token-not-initialized"===t.code?(w("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(t)})):Promise.resolve(null)},t.prototype.addTokenChangeListener=function(t){this.auth_?this.auth_.addAuthTokenListener(t):(setTimeout((function(){return t(null)}),0),this.authProvider_.get().then((function(e){return e.addAuthTokenListener(t)})))},t.prototype.removeTokenChangeListener=function(t){this.authProvider_.get().then((function(e){return e.removeAuthTokenListener(t)}))},t.prototype.notifyForInvalidToken=function(){var t='Provided authentication credentials for the app named "'+this.app_.name+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.app_.options?t+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.app_.options?t+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':t+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',T(t)},t}(),ar=function(){function t(){}return t.prototype.getToken=function(e){return Promise.resolve({accessToken:t.EMULATOR_AUTH_TOKEN})},t.prototype.addTokenChangeListener=function(e){e(t.EMULATOR_AUTH_TOKEN)},t.prototype.removeTokenChangeListener=function(t){},t.prototype.notifyForInvalidToken=function(){},t.EMULATOR_AUTH_TOKEN="owner",t}(),sr=function(){function e(){this.repos_={},this.useRestClient_=!1}return e.getInstance=function(){return ir||(ir=new e),ir},e.prototype.interrupt=function(){var t,e,n,r;try{for(var o=Object(i.h)(Object.keys(this.repos_)),a=o.next();!a.done;a=o.next()){var s=a.value;try{for(var u=(n=void 0,Object(i.h)(Object.keys(this.repos_[s]))),c=u.next();!c.done;c=u.next()){var l=c.value;this.repos_[s][l].interrupt()}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(h){t={error:h}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},e.prototype.resume=function(){var t,e,n,r;try{for(var o=Object(i.h)(Object.keys(this.repos_)),a=o.next();!a.done;a=o.next()){var s=a.value;try{for(var u=(n=void 0,Object(i.h)(Object.keys(this.repos_[s]))),c=u.next();!c.done;c=u.next()){var l=c.value;this.repos_[s][l].resume()}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(h){t={error:h}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},e.prototype.applyEmulatorSettings=function(t,e,n){t.repoInfo_=new st(e+":"+n,!1,t.repoInfo_.namespace,t.repoInfo_.webSocketOnly,t.repoInfo_.nodeAdmin,t.repoInfo_.persistenceKey,t.repoInfo_.includeNamespaceInQueryParams),t.repoInfo_.nodeAdmin&&(t.authTokenProvider_=new ar)},e.prototype.databaseFromApp=function(e,n,r,i){var o=r||e.options.databaseURL;void 0===o&&(e.options.projectId||O("Can't determine Firebase Database URL. Be sure to include a Project ID when calling firebase.initializeApp()."),w("Using default host for project ",e.options.projectId),o=e.options.projectId+"-default-rtdb.firebaseio.com");var a,s=lt(o,i),u=s.repoInfo,c=void 0;"undefined"!==typeof t&&(c=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),c?(a=!0,o="http://"+c+"?ns="+u.namespace,u=(s=lt(o,i)).repoInfo):a=!s.repoInfo.secure;var l=i&&a?new ar:new or(e,n);return It("Invalid Firebase Database URL",1,s),$(s.path)||O("Database URL must point to the root of a Firebase Database (not including a child path)."),this.createRepo(u,e,l).database},e.prototype.deleteRepo=function(t){var e=Object(o.G)(this.repos_,t.app.name);e&&Object(o.G)(e,t.key)===t||O("Database "+t.app.name+"("+t.repoInfo_+") has already been deleted."),t.interrupt(),delete e[t.key]},e.prototype.createRepo=function(t,e,n){var r=Object(o.G)(this.repos_,e.name);r||(r={},this.repos_[e.name]=r);var i=Object(o.G)(r,t.toURLString());return i&&O("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),i=new nr(t,this.useRestClient_,e,n),r[t.toURLString()]=i,i},e.prototype.forceRestClient=function(t){this.useRestClient_=t},e}
2(),ur=function(){function t(t){var e=this;this.repoInternal_=t,this.instanceStarted_=!1,this.INTERNAL={delete:function(){return Object(i.b)(e,void 0,void 0,(function(){return Object(i.d)(this,(function(t){return this.checkDeleted_("delete"),sr.getInstance().deleteRepo(this.repo_),this.repoInternal_=null,this.rootInternal_=null,[2]}))}))}},t instanceof nr||O("Don't call new Database() directly - please use firebase.database().")}return Object.defineProperty(t.prototype,"repo_",{get:function(){return this.instanceStarted_||(this.repoInternal_.start(),this.instanceStarted_=!0),this.repoInternal_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"root_",{get:function(){return this.rootInternal_||(this.rootInternal_=new rr(this.repo_,q())),this.rootInternal_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"app",{get:function(){return this.repo_.app},enumerable:!1,configurable:!0}),t.prototype.useEmulator=function(t,e){this.checkDeleted_("useEmulator"),this.instanceStarted_?O("Cannot call useEmulator() after instance has already been initialized."):sr.getInstance().applyEmulatorSettings(this.repoInternal_,t,e)},t.prototype.ref=function(t){return this.checkDeleted_("ref"),Object(o.K)("database.ref",0,1,arguments.length),t instanceof rr?this.refFromURL(t.toString()):void 0!==t?this.root_.child(t):this.root_},t.prototype.refFromURL=function(t){var e="database.refFromURL";this.checkDeleted_(e),Object(o.K)(e,1,1,arguments.length);var n=lt(t,this.repo_.repoInfo_.nodeAdmin);It(e,1,n);var r=n.repoInfo;return this.repo_.repoInfo_.isCustomHost()||r.host===this.repo_.repoInfo_.host||O(e+": Host name does not match the current database: (found "+r.host+" but expected "+this.repo_.repoInfo_.host+")"),this.ref(n.path.toString())},t.prototype.checkDeleted_=function(t){null===this.repoInternal_&&O("Cannot call "+t+" on a deleted database.")},t.prototype.goOffline=function(){Object(o.K)("database.goOffline",0,0,arguments.length),this.checkDeleted_("goOffline"),this.repo_.interrupt()},t.prototype.goOnline=function(){Object(o.K)("database.goOnline",0,0,arguments.length),this.checkDeleted_("goOnline"),this.repo_.resume()},t.ServerValue={TIMESTAMP:{".sv":"timestamp"},increment:function(t){return{".sv":{increment:t}}}},t}();var cr=Object.freeze({__proto__:null,forceLongPolling:function(){Gn.forceDisallow(),Vn.forceAllow()},forceWebSockets:function(){Vn.forceDisallow()},isWebSocketsAvailable:function(){return Gn.isAvailable()},setSecurityDebugCallback:function(t,e){t.repo.persistentConnection_.securityDebugCallback_=e},stats:function(t,e){t.repo.stats(e)},statsIncrementCounter:function(t,e){t.repo.statsIncrementCounter(e)},dataUpdateCount:function(t){return t.repo.dataUpdateCount},interceptServerData:function(t,e){return t.repo.interceptServerData_(e)},initStandalone:function(t){var e=t.app,n=t.url,r=t.version,i=t.customAuthImpl,o=t.namespace,a=t.nodeAdmin,u=void 0!==a&&a;zn(r);var c=new s.c("auth-internal",new s.b("database-standalone"));return c.setComponent(new s.a("auth-internal",(function(){return i}),"PRIVATE")),{instance:sr.getInstance().databaseFromApp(e,c,n,u),namespace:o}}}),lr=$n;$n.prototype.simpleListen=function(t,e){this.sendRequest("q",{p:t},e)},$n.prototype.echo=function(t,e){this.sendRequest("echo",{d:t},e)};var fr=Kn,hr=st,dr=Object.freeze({__proto__:null,DataConnection:lr,RealTimeConnection:fr,hijackHash:function(t){var e=$n.prototype.put;return $n.prototype.put=function(n,r,i,o){void 0!==o&&(o=t()),e.call(this,n,r,i,o)},function(){$n.prototype.put=e}},ConnectionTarget:hr,queryIdentifier:function(t){return t.queryIdentifier()},forceRestClient:function(t){sr.getInstance().forceRestClient(t)}}),pr=ur.ServerValue;!function(t){zn(t.SDK_VERSION);var n=t.INTERNAL.registerComponent(new s.a("database",(function(t,e){var n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal");return sr.getInstance().databaseFromApp(n,r,e)}),"PUBLIC").setServiceProps({Reference:rr,Query:je,Database:ur,DataSnapshot:le,enableLogging:b,INTERNAL:cr,ServerValue:pr,TEST_ACCESS:dr}).setMultipleInstances(!0));t.registerVersion("@firebase/database","0.9.4"),Object(o.z)()&&(e.exports=n)}(r.a)}).call(this,n(45),n(51)(t))},function(t,e,n){"use strict";n(38);var r=n(4),i=60103;if(e.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),e.Fragment=o("react.fragment")}
2var 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(t,e,n){var r,o={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(l=e.ref),e)s.call(e,r)&&!u.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps)void 0===o[r]&&(o[r]=e[r]);return{$$typeof:i,type:t,key:c,ref:l,props:o,_owner:a.current}}e.jsx=c,e.jsxs=c},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,n){"use strict";var r=n(28),i=n(52),o=n(92),a=n(58);var s=function t(e){var n=new o(e),s=i(o.prototype.request,n);return r.extend(s,o.prototype,n),r.extend(s,n),s.create=function(n){return t(a(e,n))},s}(n(40));s.Axios=o,s.Cancel=n(41),s.CancelToken=n(105),s.isCancel=n(57),s.VERSION=n(59).version,s.all=function(t){return Promise.all(t)},s.spread=n(106),s.isAxiosError=n(107),t.exports=s,t.exports.default=s},function(t,e,n){"use strict";var r=n(28),i=n(53),o=n(93),a=n(94),s=n(58),u=n(104),c=u.validators;function l(t){this.defaults=t,this.interceptors={request:new o,response:new o}}l.prototype.request=function(t){"string"===typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&u.assertOptions(e,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(t){o.push(t.fulfilled,t.rejected)})),!r){var l=[a,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(o),i=Promise.resolve(t);l.length;)i=i.then(l.shift(),l.shift());return i}for(var f=t;n.length;){var h=n.shift(),d=n.shift();try{f=h(f)}catch(p){d(p);break}}try{i=a(f)}catch(p){return Promise.reject(p)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},l.prototype.getUri=function(t){return t=s(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){l.prototype[t]=function(e,n){return this.request(s(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){l.prototype[t]=function(e,n,r){return this.request(s(r||{},{method:t,url:e,data:n}))}})),t.exports=l},function(t,e,n){"use strict";var r=n(28);function i(){this.handlers=[]}i.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},function(t,e,n){"use strict";var r=n(28),i=n(95),o=n(57),a=n(40),s=n(41);function u(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new s("canceled")}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=i.call(t,t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return u(t),e.data=i.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(u(t),e&&e.response&&(e.response.data=i.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,n){"use strict";var r=n(28),i=n(40);t.exports=function(t,e,n){var o=this||i;return r.forEach(n,(function(n){t=n.call(o,t,e)})),t}},function(t,e,n){"use strict";var r=n(28);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},function(t,e,n){"use strict";var r=n(56);t.exports=function(t,e,n){var i=n.config.validateStatus;
2n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";var r=n(28);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(100),i=n(101);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(28),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,a={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}})),a):a}},function(t,e,n){"use strict";var r=n(28);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r=n(59).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));var o={};i.transitional=function(t,e,n){function i(t,e){return"[Axios v"+r+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,r,a){if(!1===t)throw new Error(i(r," has been removed"+(e?" in "+e:"")));return e&&!o[r]&&(o[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,a)}},t.exports={assertOptions:function(t,e,n){if("object"!==typeof t)throw new TypeError("options must be an object");for(var r=Object.keys(t),i=r.length;i-- >0;){var o=r[i],a=e[o];if(a){var s=t[o],u=void 0===s||a(s,o,t);if(!0!==u)throw new TypeError("option "+o+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},function(t,e,n){"use strict";var r=n(41);function i(t){if("function"!==typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;this.promise.then((function(t){if(n._listeners){var e,r=n._listeners.length;for(e=0;e<r;e++)n._listeners[e](t);n._listeners=null}})),this.promise.then=function(t){var e,r=new Promise((function(t){n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},i.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";
2t.exports=function(t){return"object"===typeof t&&!0===t.isAxiosError}},function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;!function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,n):{};r.get||r.set?Object.defineProperty(e,n,r):e[n]=t[n]}e.default=t}(n(3));var r=s(n(109)),i=s(n(112)),o=s(n(4)),a=s(n(60));n(62);function s(t){return t&&t.__esModule?t:{default:t}}function u(){return(u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var c=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return(0,r.default)(t,e)}))},l=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return(0,i.default)(t,e)}))},f=function(t){var e,n;function r(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).onEnter=function(t,n){var r=e.getClassNames(n?"appear":"enter").className;e.removeClasses(t,"exit"),c(t,r),e.props.onEnter&&e.props.onEnter(t,n)},e.onEntering=function(t,n){var r=e.getClassNames(n?"appear":"enter").activeClassName;e.reflowAndAddClass(t,r),e.props.onEntering&&e.props.onEntering(t,n)},e.onEntered=function(t,n){var r=e.getClassNames("appear").doneClassName,i=e.getClassNames("enter").doneClassName,o=n?r+" "+i:i;
2e.removeClasses(t,n?"appear":"enter"),c(t,o),e.props.onEntered&&e.props.onEntered(t,n)},e.onExit=function(t){var n=e.getClassNames("exit").className;e.removeClasses(t,"appear"),e.removeClasses(t,"enter"),c(t,n),e.props.onExit&&e.props.onExit(t)},e.onExiting=function(t){var n=e.getClassNames("exit").activeClassName;e.reflowAndAddClass(t,n),e.props.onExiting&&e.props.onExiting(t)},e.onExited=function(t){var n=e.getClassNames("exit").doneClassName;e.removeClasses(t,"exit"),c(t,n),e.props.onExited&&e.props.onExited(t)},e.getClassNames=function(t){var n=e.props.classNames,r="string"===typeof n,i=r?(r&&n?n+"-":"")+t:n[t];return{className:i,activeClassName:r?i+"-active":n[t+"Active"],doneClassName:r?i+"-done":n[t+"Done"]}},e}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i=r.prototype;return i.removeClasses=function(t,e){var n=this.getClassNames(e),r=n.className,i=n.activeClassName,o=n.doneClassName;r&&l(t,r),i&&l(t,i),o&&l(t,o)},i.reflowAndAddClass=function(t,e){e&&(t&&t.scrollTop,c(t,e))},i.render=function(){var t=u({},this.props);return delete t.classNames,o.default.createElement(a.default,u({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},r}(o.default.Component);f.defaultProps={classNames:""},f.propTypes={};var h=f;e.default=h,t.exports=e.default},function(t,e,n){"use strict";var r=n(110);e.__esModule=!0,e.default=function(t,e){t.classList?t.classList.add(e):(0,i.default)(t,e)||("string"===typeof t.className?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))};var i=r(n(111));t.exports=e.default},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")},t.exports=e.default},function(t,e,n){"use strict";function r(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}t.exports=function(t,e){t.classList?t.classList.remove(e):"string"===typeof t.className?t.className=r(t.className,e):t.setAttribute("class",r(t.className&&t.className.baseVal||"",e))}},function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;a(n(3));var r=a(n(4)),i=n(31),o=a(n(63));function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){var e,n;function a(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).handleEnter=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.handleLifecycle("onEnter",0,n)},e.handleEntering=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.handleLifecycle("onEntering",0,n)},e.handleEntered=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.handleLifecycle("onEntered",0,n)},e.handleExit=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.handleLifecycle("onExit",1,n)},e.handleExiting=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.handleLifecycle("onExiting",1,n)},e.handleExited=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.handleLifecycle("onExited",1,n)},e}n=t,(e=a).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var s=a.prototype;return s.handleLifecycle=function(t,e,n){var o,a=this.props.children,s=r.default.Children.toArray(a)[e];s.props[t]&&(o=s.props)[t].apply(o,n),this.props[t]&&this.props[t]((0,i.findDOMNode)(this))},s.render=function(){var t=this.props,e=t.children,n=t.in,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,["children","in"]),a=r.default.Children.toArray(e),s=a[0],u=a[1];return delete i.onEnter,delete i.onEntering,delete i.onEntered,delete i.onExit,delete i.onExiting,delete i.onExited,r.default.createElement(o.default,i,n?r.default.cloneElement(s,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(u,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},a}(r.default.Component);s.propTypes={};var u=s;e.default=u,t.exports=e.default},function(t,e,n){"use strict";
2e.__esModule=!0,e.getChildMapping=i,e.mergeChildMappings=o,e.getInitialChildMapping=function(t,e){return i(t.children,(function(n){return(0,r.cloneElement)(n,{onExited:e.bind(null,n),in:!0,appear:a(n,"appear",t),enter:a(n,"enter",t),exit:a(n,"exit",t)})}))},e.getNextChildMapping=function(t,e,n){var s=i(t.children),u=o(e,s);return Object.keys(u).forEach((function(i){var o=u[i];if((0,r.isValidElement)(o)){var c=i in e,l=i in s,f=e[i],h=(0,r.isValidElement)(f)&&!f.props.in;!l||c&&!h?l||!c||h?l&&c&&(0,r.isValidElement)(f)&&(u[i]=(0,r.cloneElement)(o,{onExited:n.bind(null,o),in:f.props.in,exit:a(o,"exit",t),enter:a(o,"enter",t)})):u[i]=(0,r.cloneElement)(o,{in:!1}):u[i]=(0,r.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:a(o,"exit",t),enter:a(o,"enter",t)})}})),u};var r=n(4);function i(t,e){var n=Object.create(null);return t&&r.Children.map(t,(function(t){return t})).forEach((function(t){n[t.key]=function(t){return e&&(0,r.isValidElement)(t)?e(t):t}(t)})),n}function o(t,e){function n(n){return n in e?e[n]:t[n]}t=t||{},e=e||{};var r,i=Object.create(null),o=[];for(var a in t)a in e?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var u in e){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}function a(t,e,n){return null!=n[e]?n[e]:t.props[e]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Spinner=void 0;var r=n(116),i=n(117),o=n(118),a=n(119),s=n(120),u=n(121),c=n(122),l=n(123),f=n(124),h=n(125),d=n(126),p=n(127),v=n(128),m=n(129),y=n(130),g=n(131),b=n(132),w={Circles:r.Circles,Audio:o.Audio,BallTriangle:a.BallTriangle,Bars:s.Bars,CradleLoader:u.CradleLoader,Grid:c.Grid,Hearts:l.Hearts,MutatingDots:f.MutatingDots,Oval:h.Oval,Plane:d.Plane,Puff:p.Puff,RevolvingDot:v.RevolvingDot,Rings:m.Rings,TailSpin:y.TailSpin,ThreeDots:g.ThreeDots,Triangle:b.Triangle,Watch:i.Watch};e.Spinner=w},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Circles=void 0;var r=o(n(4)),i=o(n(3));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){return r.default.createElement("svg",{width:t.width,height:t.height,viewBox:"0 0 135 135",xmlns:"http://www.w3.org/2000/svg",fill:t.color,"aria-label":t.label},r.default.createElement("path",{d:"M67.447 58c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10zm9.448 9.447c0 5.523 4.477 10 10 10 5.522 0 10-4.477 10-10s-4.478-10-10-10c-5.523 0-10 4.477-10 10zm-9.448 9.448c-5.523 0-10 4.477-10 10 0 5.522 4.477 10 10 10s10-4.478 10-10c0-5.523-4.477-10-10-10zM58 67.447c0-5.523-4.477-10-10-10s-10 4.477-10 10 4.477 10 10 10 10-4.477 10-10z"},r.default.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 67 67",to:"-360 67 67",dur:"2.5s",repeatCount:"indefinite"})),r.default.createElement("path",{d:"M28.19 40.31c6.627 0 12-5.374 12-12 0-6.628-5.373-12-12-12-6.628 0-12 5.372-12 12 0 6.626 5.372 12 12 12zm30.72-19.825c4.686 4.687 12.284 4.687 16.97 0 4.686-4.686 4.686-12.284 0-16.97-4.686-4.687-12.284-4.687-16.97 0-4.687 4.686-4.687 12.284 0 16.97zm35.74 7.705c0 6.627 5.37 12 12 12 6.626 0 12-5.373 12-12 0-6.628-5.374-12-12-12-6.63 0-12 5.372-12 12zm19.822 30.72c-4.686 4.686-4.686 12.284 0 16.97 4.687 4.686 12.285 4.686 16.97 0 4.687-4.686 4.687-12.284 0-16.97-4.685-4.687-12.283-4.687-16.97 0zm-7.704 35.74c-6.627 0-12 5.37-12 12 0 6.626 5.373 12 12 12s12-5.374 12-12c0-6.63-5.373-12-12-12zm-30.72 19.822c-4.686-4.686-12.284-4.686-16.97 0-4.686 4.687-4.686 12.285 0 16.97 4.686 4.687 12.284 4.687 16.97 0 4.687-4.685 4.687-12.283 0-16.97zm-35.74-7.704c0-6.627-5.372-12-12-12-6.626 0-12 5.373-12 12s5.374 12 12 12c6.628 0 12-5.373 12-12zm-19.823-30.72c4.687-4.686 4.687-12.284 0-16.97-4.686-4.686-12.284-4.686-16.97 0-4.687 4.686-4.687 12.284 0 16.97 4.686 4.687 12.284 4.687 16.97 0z"},r.default.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 67 67",to:"360 67 67",dur:"8s",repeatCount:"indefinite"})))};e.Circles=a,a.propTypes={height:i.default.oneOfType([i.default.string,i.default.number]),width:i.default.oneOfType([i.default.string,i.default.number]),color:i.default.string,label:i.default.string},a.defaultProps={height:80,width:80,color:"green",label:"audio-loading"}},function(t,e,n){"use strict";
2Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;var r=o(n(4)),i=o(n(3));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){return r.default.createElement("svg",{width:t.width,height:t.height,version:"1.1",id:"L2",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 100 100",enableBackground:"new 0 0 100 100",xmlSpace:"preserve","aria-label":t.label},r.default.createElement("circle",{fill:"none",stroke:t.color,strokeWidth:"4",strokeMiterlimit:"10",cx:"50",cy:"50",r:t.radius}),r.default.createElement("line",{fill:"none",strokeLinecap:"round",stroke:t.color,strokeWidth:"4",strokeMiterlimit:"10",x1:"50",y1:"50",x2:"85",y2:"50.5"},r.default.createElement("animateTransform",{attributeName:"transform",dur:"2s",type:"rotate",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})),r.default.createElement("line",{fill:"none",strokeLinecap:"round",stroke:t.color,strokeWidth:"4",strokeMiterlimit:"10",x1:"50",y1:"50",x2:"49.5",y2:"74"},r.default.createElement("animateTransform",{attributeName:"transform",dur:"15s",type:"rotate",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})))};e.Watch=a,a.propTypes={height:i.default.oneOfType([i.default.string,i.default.number]),width:i.default.oneOfType([i.default.string,i.default.number]),color:i.default.string,label:i.default.string,radius:i.default.number},a.defaultProps={height:80,width:80,color:"green",label:"audio-loading",radius:48}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Audio=void 0;var r=o(n(4)),i=o(n(3));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){return r.default.createElement("svg",{height:t.height,width:t.width,fill:t.color,viewBox:"0 0 55 80",xmlns:"http://www.w3.org/2000/svg","aria-label":t.label},r.default.createElement("g",{transform:"matrix(1 0 0 -1 0 80)"},r.default.createElement("rect",{width:"10",height:"20",rx:"3"},r.default.createElement("animate",{attributeName:"height",begin:"0s",dur:"4.3s",values:"20;45;57;80;64;32;66;45;64;23;66;13;64;56;34;34;2;23;76;79;20",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("rect",{x:"15",width:"10",height:"80",rx:"3"},r.default.createElement("animate",{attributeName:"height",begin:"0s",dur:"2s",values:"80;55;33;5;75;23;73;33;12;14;60;80",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("rect",{x:"30",width:"10",height:"50",rx:"3"},r.default.createElement("animate",{attributeName:"height",begin:"0s",dur:"1.4s",values:"50;34;78;23;56;23;34;76;80;54;21;50",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("rect",{x:"45",width:"10",height:"30",rx:"3"},r.default.createElement("animate",{attributeName:"height",begin:"0s",dur:"2s",values:"30;45;13;80;56;72;45;76;34;23;67;30",calcMode:"linear",repeatCount:"indefinite"}))))};e.Audio=a,a.propTypes={height:i.default.oneOfType([i.default.string,i.default.number]),width:i.default.oneOfType([i.default.string,i.default.number]),color:i.default.string,label:i.default.string},a.defaultProps={height:80,width:80,color:"green",label:"audio-loading"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BallTriangle=void 0;var r=o(n(4)),i=o(n(3));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){return r.default.createElement("svg",{height:t.height,width:t.width,stroke:t.color,viewBox:"0 0 57 57",xmlns:"http://www.w3.org/2000/svg","aria-label":t.label},r.default.createElement("g",{fill:"none",fillRule:"evenodd"},r.default.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},r.default.createElement("circle",{cx:"5",cy:"50",r:t.radius},r.default.createElement("animate",{attributeName:"cy",begin:"0s",dur:"2.2s",values:"50;5;50;50",calcMode:"linear",repeatCount:"indefinite"}),r.default.createElement("animate",{attributeName:"cx",begin:"0s",dur:"2.2s",values:"5;27;49;5",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("circle",{cx:"27",cy:"5",r:t.radius},r.default.createElement("animate",{attributeName:"cy",begin:"0s",dur:"2.2s",from:"5",to:"5",values:"5;50;50;
25",calcMode:"linear",repeatCount:"indefinite"}),r.default.createElement("animate",{attributeName:"cx",begin:"0s",dur:"2.2s",from:"27",to:"27",values:"27;49;5;27",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("circle",{cx:"49",cy:"50",r:t.radius},r.default.createElement("animate",{attributeName:"cy",begin:"0s",dur:"2.2s",values:"50;50;5;50",calcMode:"linear",repeatCount:"indefinite"}),r.default.createElement("animate",{attributeName:"cx",from:"49",to:"49",begin:"0s",dur:"2.2s",values:"49;5;27;49",calcMode:"linear",repeatCount:"indefinite"})))))};e.BallTriangle=a,a.propTypes={height:i.default.oneOfType([i.default.string,i.default.number]),width:i.default.oneOfType([i.default.string,i.default.number]),color:i.default.string,label:i.default.string,radius:i.default.number},a.defaultProps={height:80,width:80,color:"green",radius:5,label:"audio-loading"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Bars=void 0;var r=o(n(4)),i=o(n(3));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){return r.default.createElement("svg",{width:t.width,height:t.height,fill:t.color,viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg","aria-label":t.label},r.default.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},r.default.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),r.default.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},r.default.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),r.default.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},r.default.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),r.default.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},r.default.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),r.default.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},r.default.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),r.default.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))};e.Bars=a,a.propTypes={height:i.default.oneOfType([i.default.string,i.default.number]),width:i.default.oneOfType([i.default.string,i.default.number]),color:i.default.string,label:i.default.string},a.defaultProps={height:80,width:80,color:"green",label:"audio-loading"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CradleLoader=void 0;var r=o(n(4)),i=o(n(3));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){return r.default.createElement("div",{"aria-label":t.label,role:"presentation",className:"container"},r.default.createElement("div",{className:"react-spinner-loader-swing"},r.default.createElement("div",{className:"react-spinner-loader-swing-l"}),r.default.createElement("div",null),r.default.createElement("div",null),r.default.createElement("div",null),r.default.createElement("div",null),r.default.createElement("div",null),r.default.createElement("div",{className:"react-spinner-loader-swing-r"})),r.default.createElement("div",{className:"react-spinner-loader-shadow"},r.default.createElement("div",{className:"react-spinner-loader-shadow-l"}),r.default.createElement("div",null),r.default.createElement("div",null),r.default.createElement("div",null),r.default.createElement("div",null),r.default.createElement("div",null),r.default.createElement("div",{className:"react-spinner-loader-shadow-r"})))};e.CradleLoader=a,a.propTypes={label:i.default.string},a.defaultProps={label:"audio-loading"}},function(t,e,n){"use strict";
2Object.defineProperty(e,"__esModule",{value:!0}),e.Grid=void 0;var r=o(n(4)),i=o(n(3));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){return r.default.createElement("svg",{width:t.width,height:t.height,viewBox:"0 0 105 105",fill:t.color,"aria-label":t.label},r.default.createElement("circle",{cx:"12.5",cy:"12.5",r:t.radius},r.default.createElement("animate",{attributeName:"fill-opacity",begin:"0s",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("circle",{cx:"12.5",cy:"52.5",r:t.radius},r.default.createElement("animate",{attributeName:"fill-opacity",begin:"100ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("circle",{cx:"52.5",cy:"12.5",r:t.radius},r.default.createElement("animate",{attributeName:"fill-opacity",begin:"300ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("circle",{cx:"52.5",cy:"52.5",r:t.radius},r.default.createElement("animate",{attributeName:"fill-opacity",begin:"600ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("circle",{cx:"92.5",cy:"12.5",r:t.radius},r.default.createElement("animate",{attributeName:"fill-opacity",begin:"800ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("circle",{cx:"92.5",cy:"52.5",r:t.radius},r.default.createElement("animate",{attributeName:"fill-opacity",begin:"400ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("circle",{cx:"12.5",cy:"92.5",r:t.radius},r.default.createElement("animate",{attributeName:"fill-opacity",begin:"700ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("circle",{cx:"52.5",cy:"92.5",r:t.radius},r.default.createElement("animate",{attributeName:"fill-opacity",begin:"500ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("circle",{cx:"92.5",cy:"92.5",r:t.radius},r.default.createElement("animate",{attributeName:"fill-opacity",begin:"200ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"})))};e.Grid=a,a.propTypes={height:i.default.oneOfType([i.default.string,i.default.number]),width:i.default.oneOfType([i.default.string,i.default.number]),color:i.default.string,label:i.default.string,radius:i.default.number},a.defaultProps={height:80,width:80,color:"green",radius:12.5,label:"audio-loading"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Hearts=void 0;var r=o(n(4)),i=o(n(3));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){return r.default.createElement("svg",{width:t.width,height:t.height,viewBox:"0 0 140 64",xmlns:"http://www.w3.org/2000/svg",fill:t.color,"aria-label":t.label},r.default.createElement("path",{d:"M30.262 57.02L7.195 40.723c-5.84-3.976-7.56-12.06-3.842-18.063 3.715-6 11.467-7.65 17.306-3.68l4.52 3.76 2.6-5.274c3.717-6.002 11.47-7.65 17.305-3.68 5.84 3.97 7.56 12.054 3.842 18.062L34.49 56.118c-.897 1.512-2.793 1.915-4.228.9z",attributeName:"fill-opacity",from:"0",to:".5"},r.default.createElement("animate",{attributeName:"fill-opacity",begin:"0s",dur:"1.4s",values:"0.5;1;0.5",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("path",{d:"M105.512 56.12l-14.44-24.272c-3.716-6.008-1.996-14.093 3.843-18.062 5.835-3.97 13.588-2.322 17.306 3.68l2.6 5.274 4.52-3.76c5.84-3.97 13.592-2.32 17.307 3.68 3.718 6.003 1.998 14.088-3.842 18.064L109.74 57.02c-1.434 1.014-3.33.61-4.228-.9z",attributeName:"fill-opacity",from:"0",to:".5"},r.default.createElement("animate",{attributeName:"fill-opacity",begin:"0.7s",dur:"1.4s",values:"0.5;1;0.5",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("path",{d:"M67.408 57.834l-23.01-24.98c-5.864-6.15-5.864-16.108 0-22.248 5.86-6.14 15.37-6.14 21.234 0L70 16.168l4.368-5.562c5.863-6.14 15.375-6.14 21.235 0 5.863 6.14 5.863 16.098 0 22.247l-23.007 24.98c-1.43 1.556-3.757 1.556-5.188 0z"}))};e.Hearts=a,a.propTypes={height:i.default.oneOfType([i.default.string,i.default.number]),width:i.default.oneOfType([i.default.string,i.default.number]),color:i.default.string,label:i.default.string},a.defaultProps={height:80,width:80,color:"green",label:"audio-loading"}},function(t,e,n){"use strict";
2Object.defineProperty(e,"__esModule",{value:!0}),e.MutatingDots=void 0;var r=o(n(4)),i=o(n(3));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){return r.default.createElement("svg",{id:"goo-loader",width:t.width,height:t.height,"aria-label":t.label},r.default.createElement("filter",{id:"fancy-goo"},r.default.createElement("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"6",result:"blur"}),r.default.createElement("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 19 -9",result:"goo"}),r.default.createElement("feComposite",{in:"SourceGraphic",in2:"goo",operator:"atop"})),r.default.createElement("g",{filter:"url(#fancy-goo)"},r.default.createElement("animateTransform",{id:"mainAnim",attributeName:"transform",attributeType:"XML",type:"rotate",from:"0 50 50",to:"359 50 50",dur:"1.2s",repeatCount:"indefinite"}),r.default.createElement("circle",{cx:"50%",cy:"40",r:t.radius,fill:t.color},r.default.createElement("animate",{id:"cAnim1",attributeType:"XML",attributeName:"cy",dur:"0.6s",begin:"0;cAnim1.end+0.2s",calcMode:"spline",values:"40;20;40",keyTimes:"0;0.3;1",keySplines:"0.09, 0.45, 0.16, 1;0.09, 0.45, 0.16, 1"})),r.default.createElement("circle",{cx:"50%",cy:"60",r:t.radius,fill:t.secondaryColor},r.default.createElement("animate",{id:"cAnim2",attributeType:"XML",attributeName:"cy",dur:"0.6s",begin:"0.4s;cAnim2.end+0.2s",calcMode:"spline",values:"60;80;60",keyTimes:"0;0.3;1",keySplines:"0.09, 0.45, 0.16, 1;0.09, 0.45, 0.16, 1"}))))};e.MutatingDots=a,a.propTypes={width:i.default.number,secondaryColor:i.default.string,height:i.default.number,color:i.default.string,radius:i.default.number,label:i.default.string},a.defaultProps={width:80,height:90,color:"green",radius:11,secondaryColor:"green",label:"audio-loading"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Oval=void 0;var r=o(n(4)),i=o(n(3));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){return r.default.createElement("svg",{width:t.width,height:t.height,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:t.color,"aria-label":t.label},r.default.createElement("g",{fill:"none",fillRule:"evenodd"},r.default.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},r.default.createElement("circle",{strokeOpacity:".5",cx:"18",cy:"18",r:t.radius}),r.default.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},r.default.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))};e.Oval=a,a.propTypes={height:i.default.oneOfType([i.default.string,i.default.number]),width:i.default.oneOfType([i.default.string,i.default.number]),color:i.default.string,label:i.default.string,radius:i.default.number},a.defaultProps={height:80,width:80,color:"green",label:"audio-loading",radius:18}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Plane=void 0;var r=o(n(4)),i=o(n(3));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){return r.default.createElement("svg",{className:"react-spinner-loader-svg-calLoader",xmlns:"http://www.w3.org/2000/svg",width:"230",height:"230","aria-label":t.label},r.default.createElement("desc",null,"Plane animation. Loading "),r.default.createElement("path",{className:"react-spinner-loader-cal-loader__path",style:{stroke:t.secondaryColor},d:"M86.429 40c63.616-20.04 101.511 25.08 107.265 61.93 6.487 41.54-18.593 76.99-50.6 87.643-59.46 19.791-101.262-23.577-107.142-62.616C29.398 83.441 59.945 48.343 86.43 40z",fill:"none",stroke:"#0099cc",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",strokeDasharray:"10 10 10 10 10 10 10 432",strokeDashoffset:"77"}),r.default.createElement("path",{className:"cal-loader__plane",style:{fill:t.color},d:"M141.493 37.93c-1.087-.927-2.942-2.002-4.32-2.501-2.259-.824-3.252-.955-9.293-1.172-4.017-.146-5.197-.23-5.47-.37-.766-.407-1.526-1.448-7.114-9.773-4.8-7.145-5.344-7.914-6.327-8.976-1.214-1.306-1.396-1.378-3.79-1.473-1.036-.04-2-.043-2.153-.002-.353.1-.87.586-1 .952-.139.399-.076.71.431 2.22.241.72 1.029 3.386 1.742 5.918 1.644 5.844 2.378 8.343 2.863 9.705.206.601.33 1.1.275 1.125-.24.097-10.56 1.066-11.014 1.032a3.532 3.532 0 0 1-1.002-.276l-.487-.246-2.044-2.613c-2.234-2.87-2.228-2.864-3.35-3.309-.717-.287-2.82-.386-3.276-.163-.457.237-.727.644-.737 1.152-.018.39.167.805 1.916 4.373 1.06 2.166 1.964 4.083 1.998 4.27.04.179.004.521-.076.75-.093.228-1.109 2.064-2.269 4.088-1.921 3.34-2.11 3.711-2.123 4.107-.008.25.061.557.168.725.328.512.72.644 1.966.676 1.32.029 2.352-.236 3.05-.762.222-.171 1.275-1.313 2.412-2.611 1.918-2.185 2.048-2.32 2.45-2.505.241-.111.601-.232.82-.271.267-.058 2.213.201 5.912.8 3.036.48 5.525.894 5.518.914 0 .026-.121.306-.27.638-.54 1.198-1.515 3.842-3.35 9.021-1.029 2.913-2.107 5.897-2.4 6.62-.703 1.748-.725 1.833-.594 2.286.137.46.45.833.872 1.012.41.177 3.823.24 4.37.085.852-.25 1.44-.688 2.312-1.724 1.166-1.39 3.169-3.948 6.771-8.661 5.8-7.583 6.561-8.49 7.387-8.702.233-.065 2.828-.056 5.784.011 5.827.138 6.64.09 8.62-.5 2.24-.67 4.035-1.65 5.517-3.016 1.136-1.054 1.135-1.014.207-1.962-.357-.38-.767-.777-.902-.893z",fill:"#000033"}))};e.Plane=a,a.propTypes={secondaryColor:i.default.string,color:i.default.string,label:i.default.string},a.defaultProps={secondaryColor:"grey",color:"#FFA500",label:"async-loading"}},function(t,e,n){"use strict";
2Object.defineProperty(e,"__esModule",{value:!0}),e.Puff=void 0;var r=o(n(4)),i=o(n(3));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){return r.default.createElement("svg",{width:t.width,height:t.height,viewBox:"0 0 44 44",xmlns:"http://www.w3.org/2000/svg",stroke:t.color,"aria-label":t.label},r.default.createElement("g",{fill:"none",fillRule:"evenodd",strokeWidth:"2"},r.default.createElement("circle",{cx:"22",cy:"22",r:t.radius},r.default.createElement("animate",{attributeName:"r",begin:"0s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),r.default.createElement("animate",{attributeName:"strokeOpacity",begin:"0s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"})),r.default.createElement("circle",{cx:"22",cy:"22",r:t.radius},r.default.createElement("animate",{attributeName:"r",begin:"-0.9s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}),r.default.createElement("animate",{attributeName:"strokeOpacity",begin:"-0.9s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"}))))};e.Puff=a,a.propTypes={height:i.default.oneOfType([i.default.string,i.default.number]),width:i.default.oneOfType([i.default.string,i.default.number]),color:i.default.string,label:i.default.string,radius:i.default.number},a.defaultProps={height:80,width:80,color:"green",label:"audio-loading",radius:1}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RevolvingDot=void 0;var r=o(n(4)),i=o(n(3));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){return r.default.createElement("svg",{version:"1.1",width:t.width,height:t.height,xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px","aria-label":t.label},r.default.createElement("circle",{fill:"none",stroke:t.color,strokeWidth:"4",cx:"50",cy:"50",r:t.radius+38,style:{opacity:.5}}),r.default.createElement("circle",{fill:t.color,stroke:t.color,strokeWidth:"3",cx:"8",cy:"54",r:t.radius},r.default.createElement("animateTransform",{attributeName:"transform",dur:"2s",type:"rotate",from:"0 50 48",to:"360 50 52",repeatCount:"indefinite"})))};e.RevolvingDot=a,a.propTypes={height:i.default.oneOfType([i.default.string,i.default.number]),width:i.default.oneOfType([i.default.string,i.default.number]),color:i.default.string,label:i.default.string,radius:i.default.number},a.defaultProps={height:80,width:80,color:"green",label:"audio-loading",radius:6}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rings=void 0;var r=o(n(4)),i=o(n(3));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){return r.default.createElement("svg",{width:t.width,height:t.height,viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:t.color,"aria-label":t.label},r.default.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2"},r.default.createElement("circle",{cx:"22",cy:"22",r:t.radius,strokeOpacity:"0"},r.default.createElement("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.default.createElement("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.default.createElement("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("circle",{cx:"22",cy:"22",r:t.radius,strokeOpacity:"0"},r.default.createElement("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.default.createElement("animate",{attributeName:"strokeOpacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.default.createElement("animate",{attributeName:"strokeWidth",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("circle",{cx:"22",cy:"22",r:t.radius+2},r.default.createElement("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;
26",calcMode:"linear",repeatCount:"indefinite"}))))};e.Rings=a,a.propTypes={height:i.default.oneOfType([i.default.string,i.default.number]),width:i.default.oneOfType([i.default.string,i.default.number]),color:i.default.string,label:i.default.string,radius:i.default.number},a.defaultProps={height:80,width:80,color:"green",radius:6,label:"audio-loading"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TailSpin=void 0;var r=o(n(4)),i=o(n(3));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){return r.default.createElement("svg",{width:t.width,height:t.height,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg","aria-label":t.label},r.default.createElement("defs",null,r.default.createElement("linearGradient",{x1:"8.042%",y1:"0%",x2:"65.682%",y2:"23.865%",id:"a"},r.default.createElement("stop",{stopColor:t.color,stopOpacity:"0",offset:"0%"}),r.default.createElement("stop",{stopColor:t.color,stopOpacity:".631",offset:"63.146%"}),r.default.createElement("stop",{stopColor:t.color,offset:"100%"}))),r.default.createElement("g",{fill:"none",fillRule:"evenodd"},r.default.createElement("g",{transform:"translate(1 1)"},r.default.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18",id:"Oval-2",stroke:t.color,strokeWidth:"2"},r.default.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"0.9s",repeatCount:"indefinite"})),r.default.createElement("circle",{fill:"#fff",cx:"36",cy:"18",r:t.radius},r.default.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"0.9s",repeatCount:"indefinite"})))))};e.TailSpin=a,a.propTypes={height:i.default.oneOfType([i.default.string,i.default.number]),width:i.default.oneOfType([i.default.string,i.default.number]),color:i.default.string,label:i.default.string,radius:i.default.number},a.defaultProps={height:80,width:80,color:"green",radius:1,label:"audio-loading"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ThreeDots=void 0;var r=o(n(4)),i=o(n(3));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){return r.default.createElement("svg",{width:t.width,height:t.height,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:t.color,"aria-label":t.label},r.default.createElement("circle",{cx:"15",cy:"15",r:t.radius+6},r.default.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),r.default.createElement("animate",{attributeName:"fillOpacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("circle",{cx:"60",cy:"15",r:t.radius,attributeName:"fillOpacity",from:"1",to:"0.3"},r.default.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),r.default.createElement("animate",{attributeName:"fillOpacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),r.default.createElement("circle",{cx:"105",cy:"15",r:t.radius+6},r.default.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),r.default.createElement("animate",{attributeName:"fillOpacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))};e.ThreeDots=a,a.propTypes={height:i.default.oneOfType([i.default.string,i.default.number]),width:i.default.oneOfType([i.default.string,i.default.number]),color:i.default.string,label:i.default.string,radius:i.default.number},a.defaultProps={height:80,width:80,color:"green",label:"audio-loading",radius:9}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Triangle=void 0;var r=o(n(4)),i=o(n(3));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){return r.default.createElement("div",{className:"react-spinner-loader-svg"},r.default.createElement("svg",{id:"triangle",width:t.width,height:t.height,viewBox:"-3 -4 39 39","aria-label":t.label},r.default.createElement("polygon",{fill:"transparent",stroke:t.color,strokeWidth:"1",points:"16,0 32,32 0,32"})))};e.Triangle=a,a.propTypes={height:i.default.oneOfType([i.default.string,i.default.number]),width:i.default.oneOfType([i.default.string,i.default.number]),color:i.default.string,label:i.default.string},a.defaultProps={height:80,width:80,color:"green",label:"audio-loading"}},function(t,e,n){var r=n(134),i=n(135),o=n(136),a=n(137),s=n(66);function u(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=u.prototype;c.addData=function(t){var e=new r(t);this.dataList.push(e),this.dataCache=null},c.isDark=function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},c.getModuleCount=function(){return this.moduleCount}
vendor: 9,418 bytes, line 2
2,c.make=function(){if(this.typeNumber<1){var t=1;for(t=1;t<40;t++){for(var e=i.getRSBlocks(t,this.errorCorrectLevel),n=new o,r=0,s=0;s<e.length;s++)r+=e[s].dataCount;for(s=0;s<this.dataList.length;s++){var u=this.dataList[s];n.put(u.mode,4),n.put(u.getLength(),a.getLengthInBits(u.mode,t)),u.write(n)}if(n.getLengthInBits()<=8*r)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(t,e){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=u.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},c.setupPositionProbePattern=function(t,e){for(var n=-1;n<=7;n++)if(!(t+n<=-1||this.moduleCount<=t+n))for(var r=-1;r<=7;r++)e+r<=-1||this.moduleCount<=e+r||(this.modules[t+n][e+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},c.getBestMaskPattern=function(){for(var t=0,e=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=a.getLostPoint(this);(0==n||t>r)&&(t=r,e=n)}return e},c.createMovieClip=function(t,e,n){var r=t.createEmptyMovieClip(e,n);this.make();for(var i=0;i<this.modules.length;i++)for(var o=1*i,a=0;a<this.modules[i].length;a++){var s=1*a;this.modules[i][a]&&(r.beginFill(0,100),r.moveTo(s,o),r.lineTo(s+1,o),r.lineTo(s+1,o+1),r.lineTo(s,o+1),r.endFill())}return r},c.setupTimingPattern=function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},c.setupPositionAdjustPattern=function(){for(var t=a.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var n=0;n<t.length;n++){var r=t[e],i=t[n];if(null==this.modules[r][i])for(var o=-2;o<=2;o++)for(var s=-2;s<=2;s++)this.modules[r+o][i+s]=-2==o||2==o||-2==s||2==s||0==o&&0==s}},c.setupTypeNumber=function(t){for(var e=a.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!t&&1==(e>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!t&&1==(e>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},c.setupTypeInfo=function(t,e){for(var n=this.errorCorrectLevel<<3|e,r=a.getBCHTypeInfo(n),i=0;i<15;i++){var o=!t&&1==(r>>i&1);i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(i=0;i<15;i++){o=!t&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!t},c.mapData=function(t,e){for(var n=-1,r=this.moduleCount-1,i=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var u=0;u<2;u++)if(null==this.modules[r][s-u]){var c=!1;o<t.length&&(c=1==(t[o]>>>i&1)),a.getMask(e,r,s-u)&&(c=!c),this.modules[r][s-u]=c,-1==--i&&(o++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},u.PAD0=236,u.PAD1=17,u.createData=function(t,e,n){for(var r=i.getRSBlocks(t,e),s=new o,c=0;c<n.length;c++){var l=n[c];s.put(l.mode,4),s.put(l.getLength(),a.getLengthInBits(l.mode,t)),l.write(s)}var f=0;for(c=0;c<r.length;c++)f+=r[c].dataCount;if(s.getLengthInBits()>8*f)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*f+")");for(s.getLengthInBits()+4<=8*f&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*f)&&(s.put(u.PAD0,8),!(s.getLengthInBits()>=8*f));)s.put(u.PAD1,8);return u.createBytes(s,r)},u.createBytes=function(t,e){for(var n=0,r=0,i=0,o=new Array(e.length),u=new Array(e.length),c=0;c<e.length;c++){var l=e[c].dataCount,f=e[c].totalCount-l;r=Math.max(r,l),i=Math.max(i,f),o[c]=new Array(l);for(var h=0;h<o[c].length;h++)o[c][h]=255&t.buffer[h+n];n+=l;var d=a.getErrorCorrectPolynomial(f),p=new s(o[c],d.getLength()-1).mod(d);u[c]=new Array(d.getLength()-1);for(h=0;h<u[c].length;h++){var v=h+p.getLength()-u[c].length;u[c][h]=v>=0?p.get(v):0}}var m=0;for(h=0;h<e.length;h++)m+=e[h].totalCount;var y=new Array(m),g=0;for(h=0;h<r;h++)for(c=0;c<e.length;c++)h<o[c].length&&(y[g++]=o[c][h]);for(h=0;h<i;h++)for(c=0;c<e.length;c++)h<u[c].length&&(y[g++]=u[c][h]);return y},t.exports=u},function(t,e,n){var r=n(64);function i(t){this.mode=r.MODE_8BIT_BYTE,this.data=t}i.prototype={getLength:function(t){return this.data.length},write:function(t){for(var e=0;e<this.data.length;e++)t.put(this.data.charCodeAt(e),8)}},t.exports=i},function(t,e,n){var r=n(65);function i(t,e){this.totalCount=t,this.dataCount=e}i.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],i.getRSBlocks=function(t,e){var n=i.getRsBlockTable(t,e);if(void 0==n)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var r=n.length/3,o=new Array,a=0;a<r;a++)for(var s=n[3*a+0],u=n[3*a+1],c=n[3*a+2],l=0;l<s;l++)o.push(new i(u,c));return o},i.getRsBlockTable=function(t,e){switch(e){case r.L:return i.RS_BLOCK_TABLE[4*(t-1)+0];case r.M:return i.RS_BLOCK_TABLE[4*(t-1)+1];case r.Q:return i.RS_BLOCK_TABLE[4*(t-1)+2];case r.H:return i.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},t.exports=i},function(t,e){function n(){this.buffer=new Array,this.length=0}n.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=n},function(t,e,n){var r=n(64),i=n(66),o=n(67),a=0,s=1,u=2,c=3,l=4,f=5,h=6,d=7,p={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;
2p.getBCHDigit(e)-p.getBCHDigit(p.G15)>=0;)e^=p.G15<<p.getBCHDigit(e)-p.getBCHDigit(p.G15);return(t<<10|e)^p.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;p.getBCHDigit(e)-p.getBCHDigit(p.G18)>=0;)e^=p.G18<<p.getBCHDigit(e)-p.getBCHDigit(p.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return p.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,n){switch(t){case a:return(e+n)%2==0;case s:return e%2==0;case u:return n%3==0;case c:return(e+n)%3==0;case l:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case f:return e*n%2+e*n%3==0;case h:return(e*n%2+e*n%3)%2==0;case d:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new i([1],0),n=0;n<t;n++)e=e.multiply(new i([1,o.gexp(n)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:case r.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),n=0,r=0;r<e;r++)for(var i=0;i<e;i++){for(var o=0,a=t.isDark(r,i),s=-1;s<=1;s++)if(!(r+s<0||e<=r+s))for(var u=-1;u<=1;u++)i+u<0||e<=i+u||0==s&&0==u||a==t.isDark(r+s,i+u)&&o++;o>5&&(n+=3+o-5)}for(r=0;r<e-1;r++)for(i=0;i<e-1;i++){var c=0;t.isDark(r,i)&&c++,t.isDark(r+1,i)&&c++,t.isDark(r,i+1)&&c++,t.isDark(r+1,i+1)&&c++,0!=c&&4!=c||(n+=3)}for(r=0;r<e;r++)for(i=0;i<e-6;i++)t.isDark(r,i)&&!t.isDark(r,i+1)&&t.isDark(r,i+2)&&t.isDark(r,i+3)&&t.isDark(r,i+4)&&!t.isDark(r,i+5)&&t.isDark(r,i+6)&&(n+=40);for(i=0;i<e;i++)for(r=0;r<e-6;r++)t.isDark(r,i)&&!t.isDark(r+1,i)&&t.isDark(r+2,i)&&t.isDark(r+3,i)&&t.isDark(r+4,i)&&!t.isDark(r+5,i)&&t.isDark(r+6,i)&&(n+=40);var l=0;for(i=0;i<e;i++)for(r=0;r<e;r++)t.isDark(r,i)&&l++;return n+=10*(Math.abs(100*l/e/e-50)/5)}};t.exports=p},,function(t,e,n){"use strict";var r=n(7),i=n(9),o=n(18),a=n(15),s=n(4),u=n.n(s),c=n(3),l=n.n(c),f=n(12),h=n.n(f),d=n(5),p={active:l.a.bool,"aria-label":l.a.string,block:l.a.bool,color:l.a.string,disabled:l.a.bool,outline:l.a.bool,tag:d.o,innerRef:l.a.oneOfType([l.a.object,l.a.func,l.a.string]),onClick:l.a.func,size:l.a.string,children:l.a.node,className:l.a.string,cssModule:l.a.object,close:l.a.bool},v=function(t){function e(e){var n;return(n=t.call(this,e)||this).onClick=n.onClick.bind(Object(o.a)(n)),n}Object(a.a)(e,t);var n=e.prototype;return n.onClick=function(t){if(!this.props.disabled)return this.props.onClick?this.props.onClick(t):void 0;t.preventDefault()},n.render=function(){var t=this.props,e=t.active,n=t["aria-label"],o=t.block,a=t.className,s=t.close,c=t.cssModule,l=t.color,f=t.outline,p=t.size,v=t.tag,m=t.innerRef,y=Object(i.a)(t,["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"]);s&&"undefined"===typeof y.children&&(y.children=u.a.createElement("span",{"aria-hidden":!0},"\xd7"));var g="btn"+(f?"-outline":"")+"-"+l,b=Object(d.k)(h()(a,{close:s},s||"btn",s||g,!!p&&"btn-"+p,!!o&&"btn-block",{active:e,disabled:this.props.disabled}),c);y.href&&"button"===v&&(v="a");var w=s?"Close":null;return u.a.createElement(v,Object(r.a)({type:"button"===v&&y.onClick?"button":void 0},y,{className:b,ref:m,onClick:this.onClick,"aria-label":n||w}))},e}(u.a.Component);v.propTypes=p,v.defaultProps={color:"secondary",tag:"button"},e.a=v},function(t,e,n){"use strict";var r=n(7),i=n(9),o=n(18),a=n(15),s=n(4),u=n.n(s),c=n(3),l=n.n(c),f=n(12),h=n.n(f),d=n(5),p={children:l.a.node,inline:l.a.bool,tag:d.o,innerRef:l.a.oneOfType([l.a.object,l.a.func,l.a.string]),className:l.a.string,cssModule:l.a.object},v=function(t){function e(e){var n;return(n=t.call(this,e)||this).getRef=n.getRef.bind(Object(o.a)(n)),n.submit=n.submit.bind(Object(o.a)(n)),n}Object(a.a)(e,t);var n=e.prototype;return n.getRef=function(t){this.props.innerRef&&this.props.innerRef(t),this.ref=t},n.submit=function(){this.ref&&this.ref.submit()},n.render=function(){var t=this.props,e=t.className,n=t.cssModule,o=t.inline,a=t.tag,s=t.
2innerRef,c=Object(i.a)(t,["className","cssModule","inline","tag","innerRef"]),l=Object(d.k)(h()(e,!!o&&"form-inline"),n);return u.a.createElement(a,Object(r.a)({},c,{ref:s,className:l}))},e}(s.Component);v.propTypes=p,v.defaultProps={tag:"form"},e.a=v},function(t,e,n){"use strict";var r=n(7),i=n(9),o=n(18),a=n(15),s=n(4),u=n.n(s),c=n(3),l=n.n(c),f=n(12),h=n.n(f),d=n(5),p={children:l.a.node,type:l.a.string,size:l.a.oneOfType([l.a.number,l.a.string]),bsSize:l.a.string,valid:l.a.bool,invalid:l.a.bool,tag:d.o,innerRef:l.a.oneOfType([l.a.object,l.a.func,l.a.string]),plaintext:l.a.bool,addon:l.a.bool,className:l.a.string,cssModule:l.a.object},v=function(t){function e(e){var n;return(n=t.call(this,e)||this).getRef=n.getRef.bind(Object(o.a)(n)),n.focus=n.focus.bind(Object(o.a)(n)),n}Object(a.a)(e,t);var n=e.prototype;return n.getRef=function(t){this.props.innerRef&&this.props.innerRef(t),this.ref=t},n.focus=function(){this.ref&&this.ref.focus()},n.render=function(){var t=this.props,e=t.className,n=t.cssModule,o=t.type,a=t.bsSize,s=t.valid,c=t.invalid,l=t.tag,f=t.addon,p=t.plaintext,v=t.innerRef,m=Object(i.a)(t,["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"]),y=["radio","checkbox"].indexOf(o)>-1,g=new RegExp("\\D","g"),b=l||("select"===o||"textarea"===o?o:"input"),w="form-control";p?(w+="-plaintext",b=l||"input"):"file"===o?w+="-file":"range"===o?w+="-range":y&&(w=f?null:"form-check-input"),m.size&&g.test(m.size)&&(Object(d.q)('Please use the prop "bsSize" instead of the "size" to bootstrap\'s input sizing.'),a=m.size,delete m.size);var _=Object(d.k)(h()(e,c&&"is-invalid",s&&"is-valid",!!a&&"form-control-"+a,w),n);return("input"===b||l&&"function"===typeof l)&&(m.type=o),m.children&&!p&&"select"!==o&&"string"===typeof b&&"select"!==b&&(Object(d.q)('Input with a type of "'+o+'" cannot have children. Please use "value"/"defaultValue" instead.'),delete m.children),u.a.createElement(b,Object(r.a)({},m,{ref:v,className:_,"aria-invalid":c}))},e}(u.a.Component);v.propTypes=p,v.defaultProps={type:"text"},e.a=v},function(t,e,n){"use strict";var r=n(7),i=n(9),o=n(4),a=n.n(o),s=n(3),u=n.n(s),c=n(12),l=n.n(c),f=n(5),h={tag:f.o,wrapTag:f.o,toggle:u.a.func,className:u.a.string,cssModule:u.a.object,children:u.a.node,closeAriaLabel:u.a.string,charCode:u.a.oneOfType([u.a.string,u.a.number]),close:u.a.object},d=function(t){var e,n=t.className,o=t.cssModule,s=t.children,u=t.toggle,c=t.tag,h=t.wrapTag,d=t.closeAriaLabel,p=t.charCode,v=t.close,m=Object(i.a)(t,["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","charCode","close"]),y=Object(f.k)(l()(n,"modal-header"),o);if(!v&&u){var g="number"===typeof p?String.fromCharCode(p):p;e=a.a.createElement("button",{type:"button",onClick:u,className:Object(f.k)("close",o),"aria-label":d},a.a.createElement("span",{"aria-hidden":"true"},g))}return a.a.createElement(h,Object(r.a)({},m,{className:y}),a.a.createElement(c,{className:Object(f.k)("modal-title",o)},s),v||e)};d.propTypes=h,d.defaultProps={tag:"h5",wrapTag:"div",closeAriaLabel:"Close",charCode:215},e.a=d},function(t,e,n){"use strict";var r=n(7),i=n(9),o=n(4),a=n.n(o),s=n(3),u=n.n(s),c=n(12),l=n.n(c),f=n(5),h={tag:f.o,className:u.a.string,cssModule:u.a.object},d=function(t){var e=t.className,n=t.cssModule,o=t.tag,s=Object(i.a)(t,["className","cssModule","tag"]),u=Object(f.k)(l()(e,"modal-body"),n);return a.a.createElement(o,Object(r.a)({},s,{className:u}))};d.propTypes=h,d.defaultProps={tag:"div"},e.a=d},function(t,e,n){"use strict";var r=n(7),i=n(9),o=n(4),a=n.n(o),s=n(3),u=n.n(s),c=n(12),l=n.n(c),f=n(5),h={tag:f.o,type:u.a.string,size:u.a.string,color:u.a.string,className:u.a.string,cssModule:u.a.object,children:u.a.string},d=function(t){var e=t.className,n=t.cssModule,o=t.type,s=t.size,u=t.color,c=t.children,h=t.tag,d=Object(i.a)(t,["className","cssModule","type","size","color","children","tag"]),p=Object(f.k)(l()(e,!!s&&"spinner-"+o+"-"+s,"spinner-"+o,!!u&&"text-"+u),n);return a.a.createElement(h,Object(r.a)({role:"status"},d,{className:p}),c&&a.a.createElement("span",{className:Object(f.k)("sr-only",n)},c))};d.propTypes=h,d.defaultProps={tag:"div",type:"border",children:"Loading..."},e.a=d},function(t,e,n){"use strict";var r=n(7),i=n(9),o=n(4),a=n.n(o),s=n(3),u=n.n(s),c=n(12),l=n.n(c),f=n(5),h=u.a.oneOfType([u.a.number,u.a.string]),d={tag:f.o,noGutters:u.a.bool,className:u.a.string,cssModule:u.a.object,form:u.a.bool,xs:h,sm:h,md:h,lg:h,xl:h},p={tag:"div",widths:["xs","sm","md","lg","xl"]},v=function(t){var e=t.className,n=t.cssModule,o=t.noGutters,s=t.tag,u=t.form,c=t.widths,h=Object(i.a)(t,["className","cssModule","noGutters","tag","form","widths"]),d=[];
2c.forEach((function(e,n){var r=t[e];if(delete h[e],r){var i=!n;d.push(i?"row-cols-"+r:"row-cols-"+e+"-"+r)}}));var p=Object(f.k)(l()(e,o?"no-gutters":null,u?"form-row":"row",d),n);return a.a.createElement(s,Object(r.a)({},h,{className:p}))};v.propTypes=d,v.defaultProps=p,e.a=v},function(t,e,n){"use strict";var r=n(7),i=n(9),o=n(4),a=n.n(o),s=n(3),u=n.n(s),c=n(12),l=n.n(c),f=n(5),h=u.a.oneOfType([u.a.number,u.a.string]),d=u.a.oneOfType([u.a.bool,u.a.number,u.a.string,u.a.shape({size:u.a.oneOfType([u.a.bool,u.a.number,u.a.string]),order:h,offset:h})]),p={tag:f.o,xs:d,sm:d,md:d,lg:d,xl:d,className:u.a.string,cssModule:u.a.object,widths:u.a.array},v={tag:"div",widths:["xs","sm","md","lg","xl"]},m=function(t,e,n){return!0===n||""===n?t?"col":"col-"+e:"auto"===n?t?"col-auto":"col-"+e+"-auto":t?"col-"+n:"col-"+e+"-"+n},y=function(t){var e=t.className,n=t.cssModule,o=t.widths,s=t.tag,u=Object(i.a)(t,["className","cssModule","widths","tag"]),c=[];o.forEach((function(e,r){var i=t[e];if(delete u[e],i||""===i){var o=!r;if(Object(f.i)(i)){var a,s=o?"-":"-"+e+"-",h=m(o,e,i.size);c.push(Object(f.k)(l()(((a={})[h]=i.size||""===i.size,a["order"+s+i.order]=i.order||0===i.order,a["offset"+s+i.offset]=i.offset||0===i.offset,a)),n))}else{var d=m(o,e,i);c.push(d)}}})),c.length||c.push("col");var h=Object(f.k)(l()(e,c),n);return a.a.createElement(s,Object(r.a)({},u,{className:h}))};y.propTypes=p,y.defaultProps=v,e.a=y},function(t,e,n){"use strict";var r,i=n(7),o=n(9),a=n(18),s=n(15),u=n(36),c=n(4),l=n.n(c),f=n(3),h=n.n(f),d=n(12),p=n.n(d),v=n(35),m=n(5);function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach((function(e){Object(u.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var b=g(g({},v.Transition.propTypes),{},{isOpen:h.a.bool,children:h.a.oneOfType([h.a.arrayOf(h.a.node),h.a.node]),tag:m.o,className:h.a.node,navbar:h.a.bool,cssModule:h.a.object,innerRef:h.a.oneOfType([h.a.func,h.a.string,h.a.object])}),w=g(g({},v.Transition.defaultProps),{},{isOpen:!1,appear:!1,enter:!0,exit:!0,tag:"div",timeout:m.c.Collapse}),_=((r={})[m.b.ENTERING]="collapsing",r[m.b.ENTERED]="collapse show",r[m.b.EXITING]="collapsing",r[m.b.EXITED]="collapse",r);function E(t){return t.scrollHeight}var O=function(t){function e(e){var n;return(n=t.call(this,e)||this).state={height:null},["onEntering","onEntered","onExit","onExiting","onExited"].forEach((function(t){n[t]=n[t].bind(Object(a.a)(n))})),n}Object(s.a)(e,t);var n=e.prototype;return n.onEntering=function(t,e){this.setState({height:E(t)}),this.props.onEntering(t,e)},n.onEntered=function(t,e){this.setState({height:null}),this.props.onEntered(t,e)},n.onExit=function(t){this.setState({height:E(t)}),this.props.onExit(t)},n.onExiting=function(t){t.offsetHeight;this.setState({height:0}),this.props.onExiting(t)},n.onExited=function(t){this.setState({height:null}),this.props.onExited(t)},n.render=function(){var t=this,e=this.props,n=e.tag,r=e.isOpen,a=e.className,s=e.navbar,u=e.cssModule,c=e.children,f=(e.innerRef,Object(o.a)(e,["tag","isOpen","className","navbar","cssModule","children","innerRef"])),h=this.state.height,d=Object(m.m)(f,m.a),y=Object(m.l)(f,m.a);return l.a.createElement(v.Transition,Object(i.a)({},d,{in:r,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),(function(e){var r=function(t){return _[t]||"collapse"}(e),o=Object(m.k)(p()(a,r,s&&"navbar-collapse"),u),f=null===h?null:{height:h};return l.a.createElement(n,Object(i.a)({},y,{style:g(g({},y.style),f),className:o,ref:t.props.innerRef}),c)}))},e}(c.Component);O.propTypes=b,O.defaultProps=w,e.a=O},function(t,e,n){"use strict";var r=n(7),i=n(9),o=n(4),a=n.n(o),s=n(3),u=n.n(s),c=n(12),l=n.n(c),f=n(5),h={tag:f.o,inverse:u.a.bool,color:u.a.string,body:u.a.bool,outline:u.a.bool,className:u.a.string,cssModule:u.a.object,innerRef:u.a.oneOfType([u.a.object,u.a.string,u.a.func])},d=function(t){var e=t.className,n=t.cssModule,o=t.color,s=t.body,u=t.inverse,c=t.outline,h=t.tag,d=t.innerRef,p=Object(i.a)(t,["className","cssModule","color","body","inverse","outline","tag","innerRef"]),v=Object(f.k)(l()(e,"card",!!u&&"text-white",!!s&&"card-body",!!o&&(c?"border":"bg")+"-"+o),n);return a.a.createElement(h,Object(r.a)({},p,{className:v,ref:d}))};d.propTypes=h,d.defaultProps={tag:"div"},e.a=d},function(t,e,n){"use strict";var r=n(7),i=n(9),o=n(4),a=n.n(o),s=n(3),u=n.n(s),c=n(12),l=n.n(c),f=n(5),h={tag:f.o,className:u.a.string,cssModule:u.a.object},d=function(t){var e=t.className,n=t.cssModule,o=t.tag,s=Object(i.a)(t,["className","cssModule","tag"]),u=Object(f.k)(l()(e,"card-header"),n);return a.a.createElement(o,Object(r.a)({},s,{className:u}))};d.propTypes=h,d.defaultProps={tag:"div"},e.a=d},function(t,e,n){"use strict";var r=n(7),i=n(9),o=n(4),a=n.n(o),s=n(3),u=n.n(s),c=n(12),l=n.n(c),f=n(5),h={tag:f.o,className:u.a.string,cssModule:u.a.object,innerRef:u.a.oneOfType([u.a.object,u.a.string,u.a.func])},d=function(t){var e=t.className,n=t.cssModule,o=t.innerRef,s=t.tag,u=Object(i.a)(t,["className","cssModule","innerRef","tag"]),c=Object(f.k)(l()(e,"card-body"),n);return a.a.createElement(s,Object(r.a)({},u,{className:c,ref:o}))};d.propTypes=h,d.defaultProps={tag:"div"},e.a=d},function(t,e,n){"use strict";var r=n(7),i=n(9),o=n(4),a=n.n(o),s=n(3),u=n.n(s),c=n(12),l=n.n(c),f=n(5),h={className:u.a.string,cssModule:u.a.object,size:u.a.string,bordered:u.a.bool,borderless:u.a.bool,striped:u.a.bool,dark:u.a.bool,hover:u.a.bool,responsive:u.a.oneOfType([u.a.bool,u.a.string]),tag:f.o,responsiveTag:f.o,innerRef:u.a.oneOfType([u.a.func,u.a.string,u.a.object])},d=function(t){var e=t.className,n=t.cssModule,o=t.size,s=t.bordered,u=t.borderless,c=t.striped,h=t.dar
2k,d=t.hover,p=t.responsive,v=t.tag,m=t.responsiveTag,y=t.innerRef,g=Object(i.a)(t,["className","cssModule","size","bordered","borderless","striped","dark","hover","responsive","tag","responsiveTag","innerRef"]),b=Object(f.k)(l()(e,"table",!!o&&"table-"+o,!!s&&"table-bordered",!!u&&"table-borderless",!!c&&"table-striped",!!h&&"table-dark",!!d&&"table-hover"),n),w=a.a.createElement(v,Object(r.a)({},g,{ref:y,className:b}));if(p){var _=Object(f.k)(!0===p?"table-responsive":"table-responsive-"+p,n);return a.a.createElement(m,{className:_},w)}return w};d.propTypes=h,d.defaultProps={tag:"table",responsiveTag:"div"},e.a=d},function(t,e,n){"use strict";var r=n(36),i=n(7),o=n(18),a=n(15),s=n(4),u=n.n(s),c=n(3),l=n.n(c),f=n(12),h=n.n(f),d=n(31),p=n.n(d),v=n(5),m={children:l.a.node.isRequired,node:l.a.any},y=function(t){function e(){return t.apply(this,arguments)||this}Object(a.a)(e,t);var n=e.prototype;return n.componentWillUnmount=function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null},n.render=function(){return v.d?(this.props.node||this.defaultNode||(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),p.a.createPortal(this.props.children,this.props.node||this.defaultNode)):null},e}(u.a.Component);y.propTypes=m;var g=y,b=n(9),w=n(35);function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function E(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_(Object(n),!0).forEach((function(e){Object(r.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var O=E(E({},w.Transition.propTypes),{},{children:l.a.oneOfType([l.a.arrayOf(l.a.node),l.a.node]),tag:v.o,baseClass:l.a.string,baseClassActive:l.a.string,className:l.a.string,cssModule:l.a.object,innerRef:l.a.oneOfType([l.a.object,l.a.string,l.a.func])}),T=E(E({},w.Transition.defaultProps),{},{tag:"div",baseClass:"fade",baseClassActive:"show",timeout:v.c.Fade,appear:!0,enter:!0,exit:!0,in:!0});function S(t){var e=t.tag,n=t.baseClass,r=t.baseClassActive,o=t.className,a=t.cssModule,s=t.children,c=t.innerRef,l=Object(b.a)(t,["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"]),f=Object(v.m)(l,v.a),d=Object(v.l)(l,v.a);return u.a.createElement(w.Transition,f,(function(t){var l="entered"===t,f=Object(v.k)(h()(o,n,l&&r),a);return u.a.createElement(e,Object(i.a)({className:f},d,{ref:c}),s)}))}S.propTypes=O,S.defaultProps=T;var k=S;function I(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?I(Object(n),!0).forEach((function(e){Object(r.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function N(){}var x=l.a.shape(k.propTypes),P={isOpen:l.a.bool,autoFocus:l.a.bool,centered:l.a.bool,scrollable:l.a.bool,size:l.a.string,toggle:l.a.func,keyboard:l.a.bool,role:l.a.string,labelledBy:l.a.string,backdrop:l.a.oneOfType([l.a.bool,l.a.oneOf(["static"])]),onEnter:l.a.func,onExit:l.a.func,onOpened:l.a.func,onClosed:l.a.func,children:l.a.node,className:l.a.string,wrapClassName:l.a.string,modalClassName:l.a.string,backdropClassName:l.a.string,contentClassName:l.a.string,external:l.a.node,fade:l.a.bool,cssModule:l.a.object,zIndex:l.a.oneOfType([l.a.number,l.a.string]),backdropTransition:x,modalTransition:x,innerRef:l.a.oneOfType([l.a.object,l.a.string,l.a.func]),unmountOnClose:l.a.bool,returnFocusAfterClose:l.a.bool,container:v.p,trapFocus:l.a.bool},j=Object.keys(P),A={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:N,onClosed:N,modalTransition:{timeout:v.c.Modal},backdropTransition:{mountOnEnter:!0,timeout:v.c.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},D=function(t){function e(e){var n;return(n=t.call(this,e)||this)._element=null,n._originalBodyPadding=null,n.getFocusableChildren=n.getFocusableChildren.bind(Object(o.a)(n)),n.handleBackdropClick=n.handleBackdropClick.bind(Object(o.a)(n)),n.handleBackdropMouseDown=n.handleBackdropMouseDown.bind(Object(o.a)(n)),n.handleEscape=n.handleEscape.bind(Object(o.a)(n)),n.handleStaticBackdropAnimation=n.handleStaticBackdropAnimation.bind(Object(o.a)(n)),n.handleTab=n.handleTab.bind(Object(o.a)(n)),n.onOpened=n.onOpened.bind(Object(o.a)(n)),n.onClosed=n.onClosed.bind(Object(o.a)(n)),n.manageFocusAfterClose=n.manageFocusAfterClose.bind(Object(o.a)(n)),n.clearBackdropAnimationTimeout=n.clearBackdropAnimationTimeout.bind(Object(o.a)(n)),n.trapFocus=n.trapFocus.bind(Object(o.a)(n)),n.state={isOpen:!1,showStaticBackdropAnimation:!1},n}Object(a.a)(e,t);var n=e.prototype;return n.componentDidMount=function(){var t=this.props,e=t.isOpen,n=t.autoF
2ocus,r=t.onEnter;e&&(this.init(),this.setState({isOpen:!0}),n&&this.setFocus()),r&&r(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0},n.componentDidUpdate=function(t,e){if(this.props.isOpen&&!t.isOpen)return this.init(),void this.setState({isOpen:!0});this.props.autoFocus&&this.state.isOpen&&!e.isOpen&&this.setFocus(),this._element&&t.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)},n.componentWillUnmount=function(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1},n.trapFocus=function(t){if(this.props.trapFocus&&this._element&&(!this._dialog||this._dialog.parentNode!==t.target)&&!(this.modalIndex<e.openCount-1)){for(var n=this.getFocusableChildren(),r=0;r<n.length;r++)if(n[r]===t.target)return;n.length>0&&(t.preventDefault(),t.stopPropagation(),n[0].focus())}},n.onOpened=function(t,e){this.props.onOpened(),(this.props.modalTransition.onEntered||N)(t,e)},n.onClosed=function(t){var e=this.props.unmountOnClose;this.props.onClosed(),(this.props.modalTransition.onExited||N)(t),e&&this.destroy(),this.close(),this._isMounted&&this.setState({isOpen:!1})},n.setFocus=function(){this._dialog&&this._dialog.parentNode&&"function"===typeof this._dialog.parentNode.focus&&this._dialog.parentNode.focus()},n.getFocusableChildren=function(){return this._element.querySelectorAll(v.f.join(", "))},n.getFocusedChild=function(){var t,e=this.getFocusableChildren();try{t=document.activeElement}catch(n){t=e[0]}return t},n.handleBackdropClick=function(t){if(t.target===this._mouseDownElement){t.stopPropagation();var e=this._dialog?this._dialog.parentNode:null;if(e&&t.target===e&&"static"===this.props.backdrop&&this.handleStaticBackdropAnimation(),!this.props.isOpen||!0!==this.props.backdrop)return;e&&t.target===e&&this.props.toggle&&this.props.toggle(t)}},n.handleTab=function(t){if(9===t.which&&!(this.modalIndex<e.openCount-1)){var n=this.getFocusableChildren(),r=n.length;if(0!==r){for(var i=this.getFocusedChild(),o=0,a=0;a<r;a+=1)if(n[a]===i){o=a;break}t.shiftKey&&0===o?(t.preventDefault(),n[r-1].focus()):t.shiftKey||o!==r-1||(t.preventDefault(),n[0].focus())}}},n.handleBackdropMouseDown=function(t){this._mouseDownElement=t.target},n.handleEscape=function(t){this.props.isOpen&&t.keyCode===v.j.esc&&this.props.toggle&&(this.props.keyboard?(t.preventDefault(),t.stopPropagation(),this.props.toggle(t)):"static"===this.props.backdrop&&(t.preventDefault(),t.stopPropagation(),this.handleStaticBackdropAnimation()))},n.handleStaticBackdropAnimation=function(){var t=this;this.clearBackdropAnimationTimeout(),this.setState({showStaticBackdropAnimation:!0}),this._backdropAnimationTimeout=setTimeout((function(){t.setState({showStaticBackdropAnimation:!1})}),100)},n.init=function(){try{this._triggeringElement=document.activeElement}catch(t){this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Object(v.h)(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=Object(v.g)(),Object(v.e)(),0===e.openCount&&(document.body.className=h()(document.body.className,Object(v.k)("modal-open",this.props.cssModule))),this.modalIndex=e.openCount,e.openCount+=1},n.destroy=function(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()},n.manageFocusAfterClose=function(){if(this._triggeringElement){var t=this.props.returnFocusAfterClose;this._triggeringElement.focus&&t&&this._triggeringElement.focus(),this._triggeringElement=null}},n.close=function(){if(e.openCount<=1){var t=Object(v.k)("modal-open",this.props.cssModule),n=new RegExp("(^| )"+t+"( |$)");document.body.className=document.body.className.replace(n," ").trim()}this.manageFocusAfterClose(),e.openCount=Math.max(0,e.openCount-1),Object(v.n)(this._originalBodyPadding)},n.renderModalDialog=function(){var t,e=this,n=Object(v.l)(this.props,j),r="modal-dialog";return u.a.createElement("div",Object(i.a)({},n,{className:Object(v.k)(h()(r,this.props.className,(t={},t["modal-"+this.props.size]=this.props.size,t["modal-dialog-centered"]=this.props.centered,t["modal-dialog-scrollable"]=this.props.scrollable,t)),this.props.cssModule),role:"document",ref:function(t){e._dialog=t}}),u.a.createElement("div",{className:Object(v.k)(h()("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))},n.render=function(){var t=this.props.unmountOnClose;if(this._element&&(this.state.isOpen||!t)){var e=!!this._element&&!this.state.isOpen&&!t;this._element.style.display=e?"none":"block";var n=this.props,r=n.wrapClassName,o=n.modalClassName,a=n.backdropClassName,s=n.cssModule,c=n.isOpen,l=n.backdrop,f=n.role,d=n.labelledBy,p=n.external,m=n.innerRef,y={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":d,role:f,tabIndex:"-1"},b=this.props.fade,w=C(C(C({},k.defaultProps),this.props.modalTransition),{},{baseClass:b?this.props.modalTransition.baseClass:"",timeout:b?this.props.modalTransition.timeout:0}),_=C(C(C({},k.defaultProps),this.props.backdropTransition),{},{baseClass:b?this.props.backdropTransition.baseClass:"",timeout:b?this.props.backdropTransition.timeout:0}),E=l&&(b?u.a.createElement(k,Object(i.a)({},_,{in:c&&!!l,cssModule:s,className:Object(v.k)(h()("modal-backdrop",a),s)})):u.a.createElement("div",{className:Object(v.k)(h()("modal-backdrop","show",a),s)}));return u.a.createElement(g,{node:this._element},u.a.createElement("div",{className:Object(v.k)(r)},u.a.createElement(k,Object(i.a)({},y,w,{in:c,onEntered:this.onOpened,onExited:this.onClosed,cssModule:s,className:Object(v.k)(h()("modal",o,this.state.showStaticBackdropAnimation&&"modal-static"),s),innerRef:m}),p,this.renderModalDialog()),E))}return null},n.clearBackdropAnimationTimeout=function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)},e}(u.a.Component);D.propTypes=P,D.defaultProps=A,D.openCount=0;e.a=D}]]); 3//# sourceMappingURL=2.324719fa.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.