mirror of
https://github.com/FranP-code/Hangman-game-with-React.git
synced 2025-10-13 00:42:32 +00:00
3 lines
415 KiB
JavaScript
3 lines
415 KiB
JavaScript
/*! For license information please see 2.60c5fd81.chunk.js.LICENSE.txt */
|
|
(this["webpackJsonphangman-game"]=this["webpackJsonphangman-game"]||[]).push([[2],[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports=n(37)},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";function r(e,t,n,r,i,a,o){try{var u=e[a](o),s=u.value}catch(l){return void n(l)}u.done?t(s):Promise.resolve(s).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,a){var o=e.apply(t,n);function u(e){r(o,i,a,u,s,"next",e)}function s(e){r(o,i,a,u,s,"throw",e)}u(void 0)}))}}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(20);function i(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}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 o,u=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return u=e.done,e},e:function(e){s=!0,o=e},f:function(){try{u||null==n.return||n.return()}finally{if(s)throw o}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(21);function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Object(r.a)(e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(13),i=n(26);function a(e){return a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var o=n(25);function u(e,t){return!t||"object"!==a(t)&&"function"!==typeof t?Object(o.a)(e):t}function s(e){var t=Object(i.a)();return function(){var n,i=Object(r.a)(e);if(t){var a=Object(r.a)(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return u(this,n)}}},function(e,t,n){"use strict";e.exports=n(36)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return S})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return j})),n.d(t,"e",(function(){return x})),n.d(t,"f",(function(){return p})),n.d(t,"g",(function(){return y})),n.d(t,"h",(function(){return m})),n.d(t,"i",(function(){return b})),n.d(t,"j",(function(){return E})),n.d(t,"k",(function(){return v})),n.d(t,"l",(function(){return g})),n.d(t,"m",(function(){return w})),n.d(t,"n",(function(){return k}));n(4),n(11);var r=n(25),i=n(5),a=n(6),o=n(23),u=n(0),s=n(2),l=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296===(64512&i)&&r+1<e.length&&56320===(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},c={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"===typeof atob,encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<e.length;i+=3){var a=e[i],o=i+1<e.length,u=o?e[i+1]:0,s=i+2<e.length,l=s?e[i+2]:0,c=a>>2,f=(3&a)<<4|u>>4,h=(15&u)<<2|l>>6,d=63&l;s||(d=64,o||(h=64)),r.push(n[c],n[f],n[h],n[d])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(l(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){for(var t=[],n=0,r=0;n<e.length;){var i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){var a=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&a)}else if(i>239&&i<365){var o=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(o>>10)),t[r++]=String.fromCharCode(56320+(1023&o))}else{var u=e[n++],s=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&u)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<e.length;){var a=n[e.charAt(i++)],o=i<e.length?n[e.charAt(i)]:0,u=++i<e.length?n[e.charAt(i)]:64,s=++i<e.length?n[e.charAt(i)]:64;if(++i,null==a||null==o||null==u||null==s)throw Error();var l=a<<2|o>>4;if(r.push(l),64!==u){var c=o<<4&240|u>>2;if(r.push(c),64!==s){var f=u<<6&192|s;r.push(f)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},f=function(e){return function(e){var t=l(e);return c.encodeByteArray(t,!0)}(e).replace(/\./g,"")};var h=function(){function e(){var t=this;Object(u.a)(this,e),this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))}return Object(s.a)(e,[{key:"wrapCallback",value:function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"===typeof e&&(t.promise.catch((function(){})),1===e.length?e(n):e(n,r))}}}]),e}();function d(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');var n=t||"demo-project",r=e.iat||0,i=e.sub||e.user_id;if(!i)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");var a=Object.assign({iss:"https://securetoken.google.com/".concat(n),aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[f(JSON.stringify({alg:"none",type:"JWT"})),f(JSON.stringify(a)),""].join(".")}function p(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function v(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(p())}function y(){var e="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof e&&void 0!==e.id}function g(){return"object"===typeof navigator&&"ReactNative"===navigator.product}function m(){return p().indexOf("Electron/")>=0}function b(){var e=p();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function k(){return p().indexOf("MSAppHost/")>=0}function w(){return!function(){try{return"[object process]"===Object.prototype.toString.call(e.process)}catch(t){return!1}}()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function E(){return"object"===typeof indexedDB}var O=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e,i,a){var o;return Object(u.a)(this,n),(o=t.call(this,i)).code=e,o.customData=a,o.name="FirebaseError",Object.setPrototypeOf(Object(r.a)(o),n.prototype),Error.captureStackTrace&&Error.captureStackTrace(Object(r.a)(o),S.prototype.create),o}return n}(Object(o.a)(Error)),S=function(){function e(t,n,r){Object(u.a)(this,e),this.service=t,this.serviceName=n,this.errors=r}return Object(s.a)(e,[{key:"create",value:function(e){var t=(arguments.length<=1?void 0:arguments[1])||{},n="".concat(this.service,"/").concat(e),r=this.errors[e],i=r?T(r,t):"Error",a="".concat(this.serviceName,": ").concat(i," (").concat(n,")."),o=new O(n,a,t);return o}}]),e}();function T(e,t){return e.replace(_,(function(e,n){var r=t[n];return null!=r?String(r):"<".concat(n,"?>")}))}var _=/\{\$([^}]+)}/g;function j(e,t){if(e===t)return!0;for(var n=Object.keys(e),r=Object.keys(t),i=0,a=n;i<a.length;i++){var o=a[i];if(!r.includes(o))return!1;var u=e[o],s=t[o];if(I(u)&&I(s)){if(!j(u,s))return!1}else if(u!==s)return!1}for(var l=0,c=r;l<c.length;l++){var f=c[l];if(!n.includes(f))return!1}return!0}function I(e){return null!==e&&"object"===typeof e}function x(e){return e&&e._delegate?e._delegate:e}}).call(this,n(29))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";e.exports=n(32)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(20);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,u=e[Symbol.iterator]();!(r=(o=u.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(s){i=!0,a=s}finally{try{r||null==u.return||u.return()}finally{if(i)throw a}}return n}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return j})),n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return k})),n.d(t,"d",(function(){return E})),n.d(t,"e",(function(){return x})),n.d(t,"f",(function(){return I})),n.d(t,"g",(function(){return C}));n(1),n(3);var r,i,a=n(4),o=n(9),u=n(0),s=n(2),l=n(19),c=n(15),f=n(8),h=function(){function e(t){Object(u.a)(this,e),this.container=t}return Object(s.a)(e,[{key:"getPlatformInfoString",value:function(){return this.container.getProviders().map((function(e){if(function(e){var t=e.getComponent();return"VERSION"===(null===t||void 0===t?void 0:t.type)}(e)){var t=e.getImmediate();return"".concat(t.library,"/").concat(t.version)}return null})).filter((function(e){return e})).join(" ")}}]),e}();var d="@firebase/app",p=new c.b("@firebase/app"),v="[DEFAULT]",y=(r={},Object(o.a)(r,d,"fire-core"),Object(o.a)(r,"@firebase/app-compat","fire-core-compat"),Object(o.a)(r,"@firebase/analytics","fire-analytics"),Object(o.a)(r,"@firebase/analytics-compat","fire-analytics-compat"),Object(o.a)(r,"@firebase/app-check","fire-app-check"),Object(o.a)(r,"@firebase/app-check-compat","fire-app-check-compat"),Object(o.a)(r,"@firebase/auth","fire-auth"),Object(o.a)(r,"@firebase/auth-compat","fire-auth-compat"),Object(o.a)(r,"@firebase/database","fire-rtdb"),Object(o.a)(r,"@firebase/database-compat","fire-rtdb-compat"),Object(o.a)(r,"@firebase/functions","fire-fn"),Object(o.a)(r,"@firebase/functions-compat","fire-fn-compat"),Object(o.a)(r,"@firebase/installations","fire-iid"),Object(o.a)(r,"@firebase/installations-compat","fire-iid-compat"),Object(o.a)(r,"@firebase/messaging","fire-fcm"),Object(o.a)(r,"@firebase/messaging-compat","fire-fcm-compat"),Object(o.a)(r,"@firebase/performance","fire-perf"),Object(o.a)(r,"@firebase/performance-compat","fire-perf-compat"),Object(o.a)(r,"@firebase/remote-config","fire-rc"),Object(o.a)(r,"@firebase/remote-config-compat","fire-rc-compat"),Object(o.a)(r,"@firebase/storage","fire-gcs"),Object(o.a)(r,"@firebase/storage-compat","fire-gcs-compat"),Object(o.a)(r,"@firebase/firestore","fire-fst"),Object(o.a)(r,"@firebase/firestore-compat","fire-fst-compat"),Object(o.a)(r,"fire-js","fire-js"),Object(o.a)(r,"firebase","fire-js-all"),r),g=new Map,m=new Map;function b(e,t){try{e.container.addComponent(t)}catch(n){p.debug("Component ".concat(t.name," failed to register with FirebaseApp ").concat(e.name),n)}}function k(e){var t=e.name;if(m.has(t))return p.debug("There were multiple attempts to register component ".concat(t,".")),!1;m.set(t,e);var n,r=Object(a.a)(g.values());try{for(r.s();!(n=r.n()).done;){b(n.value,e)}}catch(i){r.e(i)}finally{r.f()}return!0}function w(e,t){return e.container.getProvider(t)}function E(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v;w(e,t).clearInstance(n)}var O,S=(i={},Object(o.a)(i,"no-app","No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()"),Object(o.a)(i,"bad-app-name","Illegal App name: '{$appName}"),Object(o.a)(i,"duplicate-app","Firebase App named '{$appName}' already exists with different options or config"),Object(o.a)(i,"app-deleted","Firebase App named '{$appName}' already deleted"),Object(o.a)(i,"invalid-app-argument","firebase.{$appName}() takes either no argument or a Firebase App instance."),Object(o.a)(i,"invalid-log-argument","First argument to `onLog` must be null or a function."),i),T=new f.b("app","Firebase",S),_=function(){function e(t,n,r){var i=this;Object(u.a)(this,e),this._isDeleted=!1,this._options=Object.assign({},t),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new l.a("app",(function(){return i}),"PUBLIC"))}return Object(s.a)(e,[{key:"automaticDataCollectionEnabled",get:function(){return this.checkDestroyed(),this._automaticDataCollectionEnabled},set:function(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}},{key:"name",get:function(){return this.checkDestroyed(),this._name}},{key:"options",get:function(){return this.checkDestroyed(),this._options}},{key:"config",get:function(){return this.checkDestroyed(),this._config}},{key:"container",get:function(){return this._container}},{key:"isDeleted",get:function(){return this._isDeleted},set:function(e){this._isDeleted=e}},{key:"checkDestroyed",value:function(){if(this.isDeleted)throw T.create("app-deleted",{appName:this._name})}}]),e}(),j="9.1.2";function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!==typeof t){var n=t;t={name:n}}var r=Object.assign({name:v,automaticDataCollectionEnabled:!1},t),i=r.name;if("string"!==typeof i||!i)throw T.create("bad-app-name",{appName:String(i)});var o=g.get(i);if(o){if(Object(f.d)(e,o.options)&&Object(f.d)(r,o.config))return o;throw T.create("duplicate-app",{appName:i})}var u,s=new l.b(i),c=Object(a.a)(m.values());try{for(c.s();!(u=c.n()).done;){var h=u.value;s.addComponent(h)}}catch(p){c.e(p)}finally{c.f()}var d=new _(e,r,s);return g.set(i,d),d}function x(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=g.get(e);if(!t)throw T.create("no-app",{appName:e});return t}function C(e,t,n){var r,i=null!==(r=y[e])&&void 0!==r?r:e;n&&(i+="-".concat(n));var a=i.match(/\s|\//),o=t.match(/\s|\//);if(a||o){var u=['Unable to register library "'.concat(i,'" with version "').concat(t,'":')];return a&&u.push('library name "'.concat(i,'" contains illegal characters (whitespace or "/")')),a&&o&&u.push("and"),o&&u.push('version name "'.concat(t,'" contains illegal characters (whitespace or "/")')),void p.warn(u.join(" "))}k(new l.a("".concat(i,"-version"),(function(){return{library:i,version:t}}),"VERSION"))}k(new l.a("platform-logger",(function(e){return new h(e)}),"PRIVATE")),C(d,"0.7.3",O),C("fire-js","")},function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(24);var i=n(20);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(i.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return y}));var r,i,a=n(4),o=n(0),u=n(2),s=n(9),l=[];!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(i||(i={}));var c={debug:i.DEBUG,verbose:i.VERBOSE,info:i.INFO,warn:i.WARN,error:i.ERROR,silent:i.SILENT},f=i.INFO,h=(r={},Object(s.a)(r,i.DEBUG,"log"),Object(s.a)(r,i.VERBOSE,"log"),Object(s.a)(r,i.INFO,"info"),Object(s.a)(r,i.WARN,"warn"),Object(s.a)(r,i.ERROR,"error"),r),d=function(e,t){if(!(t<e.logLevel)){var n=(new Date).toISOString(),r=h[t];if(!r)throw new Error("Attempted to log a message with an invalid logType (value: ".concat(t,")"));for(var i,a=arguments.length,o=new Array(a>2?a-2:0),u=2;u<a;u++)o[u-2]=arguments[u];(i=console)[r].apply(i,["[".concat(n,"] ").concat(e.name,":")].concat(o))}},p=function(){function e(t){Object(o.a)(this,e),this.name=t,this._logLevel=f,this._logHandler=d,this._userLogHandler=null,l.push(this)}return Object(u.a)(e,[{key:"logLevel",get:function(){return this._logLevel},set:function(e){if(!(e in i))throw new TypeError('Invalid value "'.concat(e,'" assigned to `logLevel`'));this._logLevel=e}},{key:"setLogLevel",value:function(e){this._logLevel="string"===typeof e?c[e]:e}},{key:"logHandler",get:function(){return this._logHandler},set:function(e){if("function"!==typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}},{key:"userLogHandler",get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e}},{key:"debug",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,i.DEBUG].concat(t)),this._logHandler.apply(this,[this,i.DEBUG].concat(t))}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,i.VERBOSE].concat(t)),this._logHandler.apply(this,[this,i.VERBOSE].concat(t))}},{key:"info",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,i.INFO].concat(t)),this._logHandler.apply(this,[this,i.INFO].concat(t))}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,i.WARN].concat(t)),this._logHandler.apply(this,[this,i.WARN].concat(t))}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,[this,i.ERROR].concat(t)),this._logHandler.apply(this,[this,i.ERROR].concat(t))}}]),e}();function v(e){l.forEach((function(t){t.setLogLevel(e)}))}function y(e,t){var n,r=Object(a.a)(l);try{var o=function(){var r=n.value,a=null;t&&t.level&&(a=c[t.level]),r.userLogHandler=null===e?null:function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),u=2;u<r;u++)o[u-2]=arguments[u];var s=o.map((function(e){if(null==e)return null;if("string"===typeof e)return e;if("number"===typeof e||"boolean"===typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(t){return null}})).filter((function(e){return e})).join(" ");n>=(null!==a&&void 0!==a?a:t.logLevel)&&e({level:i[n].toLowerCase(),message:s,args:o,type:t.name})}};for(r.s();!(n=r.n()).done;)o()}catch(u){r.e(u)}finally{r.f()}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return gr})),n.d(t,"b",(function(){return br})),n.d(t,"c",(function(){return mr})),n.d(t,"d",(function(){return wr})),n.d(t,"e",(function(){return kr})),n.d(t,"f",(function(){return Er})),n.d(t,"g",(function(){return Or})),n.d(t,"h",(function(){return vr})),n.d(t,"i",(function(){return yr}));var r,i=n(4),a=n(18),o=n(13),u=n(5),s=n(6),l=n(0),c=n(2),f="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},h={},d=d||{},p=f||self;function v(){}function y(e){var t=typeof e;return"array"==(t="object"!=t?t:e?Array.isArray(e)?"array":t:"null")||"object"==t&&"number"==typeof e.length}function g(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var m="closure_uid_"+(1e9*Math.random()>>>0),b=0;function k(e,t,n){return e.call.apply(e.bind,arguments)}function w(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function E(e,t,n){return(E=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?k:w).apply(null,arguments)}function O(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function S(e,t){function n(){}n.prototype=t.prototype,e.Z=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Vb=function(e,n,r){for(var i=Array(arguments.length-2),a=2;a<arguments.length;a++)i[a-2]=arguments[a];return t.prototype[n].apply(e,i)}}function T(){this.s=this.s,this.o=this.o}var _={};T.prototype.s=!1,T.prototype.na=function(){if(!this.s&&(this.s=!0,this.M(),0)){var e=function(e){return Object.prototype.hasOwnProperty.call(e,m)&&e[m]||(e[m]=++b)}(this);delete _[e]}},T.prototype.M=function(){if(this.o)for(;this.o.length;)this.o.shift()()};var j=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"===typeof e)return"string"!==typeof t||1!=t.length?-1:e.indexOf(t,0);for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},I=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(e,t,n){for(var r=e.length,i="string"===typeof e?e.split(""):e,a=0;a<r;a++)a in i&&t.call(n,i[a],a,e)};function x(e){return Array.prototype.concat.apply([],arguments)}function C(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}function N(e){return/^[\s\xa0]*$/.test(e)}var A,D=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]};function L(e,t){return-1!=e.indexOf(t)}function P(e,t){return e<t?-1:e>t?1:0}e:{var R=p.navigator;if(R){var F=R.userAgent;if(F){A=F;break e}}A=""}function M(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function V(e){var t={};for(var n in e)t[n]=e[n];return t}var U="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function z(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(var a=0;a<U.length;a++)n=U[a],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function B(e){return B[" "](e),e}B[" "]=v;var q,H=L(A,"Opera"),K=L(A,"Trident")||L(A,"MSIE"),G=L(A,"Edge"),W=G||K,Q=L(A,"Gecko")&&!(L(A.toLowerCase(),"webkit")&&!L(A,"Edge"))&&!(L(A,"Trident")||L(A,"MSIE"))&&!L(A,"Edge"),$=L(A.toLowerCase(),"webkit")&&!L(A,"Edge");function Y(){var e=p.document;return e?e.documentMode:void 0}e:{var X="",J=function(){var e=A;return Q?/rv:([^\);]+)(\)|;)/.exec(e):G?/Edge\/([\d\.]+)/.exec(e):K?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):$?/WebKit\/(\S+)/.exec(e):H?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(J&&(X=J?J[1]:""),K){var Z=Y();if(null!=Z&&Z>parseFloat(X)){q=String(Z);break e}}q=X}var ee,te={};function ne(){return function(e){var t=te;return Object.prototype.hasOwnProperty.call(t,9)?t[9]:t[9]=e(9)}((function(){for(var e=0,t=D(String(q)).split("."),n=D("9").split("."),r=Math.max(t.length,n.length),i=0;0==e&&i<r;i++){var a=t[i]||"",o=n[i]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],o=/(\d*)(\D*)(.*)/.exec(o)||["","","",""],0==a[0].length&&0==o[0].length)break;e=P(0==a[1].length?0:parseInt(a[1],10),0==o[1].length?0:parseInt(o[1],10))||P(0==a[2].length,0==o[2].length)||P(a[2],o[2]),a=a[3],o=o[3]}while(0==e)}return 0<=e}))}if(p.document&&K){var re=Y();ee=re||(parseInt(q,10)||void 0)}else ee=void 0;var ie=ee,ae=function(){if(!p.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{p.addEventListener("test",v,t),p.removeEventListener("test",v,t)}catch(n){}return e}();function oe(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}function ue(e,t){if(oe.call(this,e?e.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.g=t,t=e.relatedTarget){if(Q){e:{try{B(t.nodeName);var i=!0;break e}catch(a){}i=!1}i||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"===typeof e.pointerType?e.pointerType:se[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&ue.Z.h.call(this)}}oe.prototype.h=function(){this.defaultPrevented=!0},S(ue,oe);var se={2:"touch",3:"pen",4:"mouse"};ue.prototype.h=function(){ue.Z.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var le="closure_listenable_"+(1e6*Math.random()|0),ce=0;function fe(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.ia=i,this.key=++ce,this.ca=this.fa=!1}function he(e){e.ca=!0,e.listener=null,e.proxy=null,e.src=null,e.ia=null}function de(e){this.src=e,this.g={},this.h=0}function pe(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],a=j(i,t);(r=0<=a)&&Array.prototype.splice.call(i,a,1),r&&(he(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function ve(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i];if(!a.ca&&a.listener==t&&a.capture==!!n&&a.ia==r)return i}return-1}de.prototype.add=function(e,t,n,r,i){var a=e.toString();(e=this.g[a])||(e=this.g[a]=[],this.h++);var o=ve(e,t,r,i);return-1<o?(t=e[o],n||(t.fa=!1)):((t=new fe(t,this.src,a,!!r,i)).fa=n,e.push(t)),t};var ye="closure_lm_"+(1e6*Math.random()|0),ge={};function me(e,t,n,r,i){if(r&&r.once)return ke(e,t,n,r,i);if(Array.isArray(t)){for(var a=0;a<t.length;a++)me(e,t[a],n,r,i);return null}return n=je(n),e&&e[le]?e.N(t,n,g(r)?!!r.capture:!!r,i):be(e,t,n,!1,r,i)}function be(e,t,n,r,i,a){if(!t)throw Error("Invalid event type");var o=g(i)?!!i.capture:!!i,u=Te(e);if(u||(e[ye]=u=new de(e)),(n=u.add(t,n,r,o,a)).proxy)return n;if(r=function(){function e(n){return t.call(e.src,e.listener,n)}var t=Se;return e}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)ae||(i=o),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(Oe(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function ke(e,t,n,r,i){if(Array.isArray(t)){for(var a=0;a<t.length;a++)ke(e,t[a],n,r,i);return null}return n=je(n),e&&e[le]?e.O(t,n,g(r)?!!r.capture:!!r,i):be(e,t,n,!0,r,i)}function we(e,t,n,r,i){if(Array.isArray(t))for(var a=0;a<t.length;a++)we(e,t[a],n,r,i);else r=g(r)?!!r.capture:!!r,n=je(n),e&&e[le]?(e=e.i,(t=String(t).toString())in e.g&&(-1<(n=ve(a=e.g[t],n,r,i))&&(he(a[n]),Array.prototype.splice.call(a,n,1),0==a.length&&(delete e.g[t],e.h--)))):e&&(e=Te(e))&&(t=e.g[t.toString()],e=-1,t&&(e=ve(t,n,r,i)),(n=-1<e?t[e]:null)&&Ee(n))}function Ee(e){if("number"!==typeof e&&e&&!e.ca){var t=e.src;if(t&&t[le])pe(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(Oe(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=Te(t))?(pe(n,e),0==n.h&&(n.src=null,t[ye]=null)):he(e)}}}function Oe(e){return e in ge?ge[e]:ge[e]="on"+e}function Se(e,t){if(e.ca)e=!0;else{t=new ue(t,this);var n=e.listener,r=e.ia||e.src;e.fa&&Ee(e),e=n.call(r,t)}return e}function Te(e){return(e=e[ye])instanceof de?e:null}var _e="__closure_events_fn_"+(1e9*Math.random()>>>0);function je(e){return"function"===typeof e?e:(e[_e]||(e[_e]=function(t){return e.handleEvent(t)}),e[_e])}function Ie(){T.call(this),this.i=new de(this),this.P=this,this.I=null}function xe(e,t){var n,r=e.I;if(r)for(n=[];r;r=r.I)n.push(r);if(e=e.P,r=t.type||t,"string"===typeof t)t=new oe(t,e);else if(t instanceof oe)t.target=t.target||e;else{var i=t;z(t=new oe(r,e),i)}if(i=!0,n)for(var a=n.length-1;0<=a;a--){var o=t.g=n[a];i=Ce(o,r,!0,t)&&i}if(i=Ce(o=t.g=e,r,!0,t)&&i,i=Ce(o,r,!1,t)&&i,n)for(a=0;a<n.length;a++)i=Ce(o=t.g=n[a],r,!1,t)&&i}function Ce(e,t,n,r){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();for(var i=!0,a=0;a<t.length;++a){var o=t[a];if(o&&!o.ca&&o.capture==n){var u=o.listener,s=o.ia||o.src;o.fa&&pe(e.i,o),i=!1!==u.call(s,r)&&i}}return i&&!r.defaultPrevented}S(Ie,T),Ie.prototype[le]=!0,Ie.prototype.removeEventListener=function(e,t,n,r){we(this,e,t,n,r)},Ie.prototype.M=function(){if(Ie.Z.M.call(this),this.i){var e,t=this.i;for(e in t.g){for(var n=t.g[e],r=0;r<n.length;r++)he(n[r]);delete t.g[e],t.h--}}this.I=null},Ie.prototype.N=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},Ie.prototype.O=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};var Ne=p.JSON.stringify;function Ae(){var e=Ue,t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}var De,Le=function(){function e(){Object(l.a)(this,e),this.h=this.g=null}return Object(c.a)(e,[{key:"add",value:function(e,t){var n=Pe.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}}]),e}(),Pe=new(function(){function e(t,n){Object(l.a)(this,e),this.i=t,this.j=n,this.h=0,this.g=null}return Object(c.a)(e,[{key:"get",value:function(){var e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}]),e}())((function(){return new Re}),(function(e){return e.reset()})),Re=function(){function e(){Object(l.a)(this,e),this.next=this.g=this.h=null}return Object(c.a)(e,[{key:"set",value:function(e,t){this.h=e,this.g=t,this.next=null}},{key:"reset",value:function(){this.next=this.g=this.h=null}}]),e}();function Fe(e){p.setTimeout((function(){throw e}),0)}function Me(e,t){De||function(){var e=p.Promise.resolve(void 0);De=function(){e.then(ze)}}(),Ve||(De(),Ve=!0),Ue.add(e,t)}var Ve=!1,Ue=new Le;function ze(){for(var e;e=Ae();){try{e.h.call(e.g)}catch(n){Fe(n)}var t=Pe;t.j(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}Ve=!1}function Be(e,t){Ie.call(this),this.h=e||1,this.g=t||p,this.j=E(this.kb,this),this.l=Date.now()}function qe(e){e.da=!1,e.S&&(e.g.clearTimeout(e.S),e.S=null)}function He(e,t,n){if("function"===typeof e)n&&(e=E(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=E(e.handleEvent,e)}return 2147483647<Number(t)?-1:p.setTimeout(e,t||0)}function Ke(e){e.g=He((function(){e.g=null,e.i&&(e.i=!1,Ke(e))}),e.j);var t=e.h;e.h=null,e.m.apply(null,t)}S(Be,Ie),(r=Be.prototype).da=!1,r.S=null,r.kb=function(){if(this.da){var e=Date.now()-this.l;0<e&&e<.8*this.h?this.S=this.g.setTimeout(this.j,this.h-e):(this.S&&(this.g.clearTimeout(this.S),this.S=null),xe(this,"tick"),this.da&&(qe(this),this.start()))}},r.start=function(){this.da=!0,this.S||(this.S=this.g.setTimeout(this.j,this.h),this.l=Date.now())},r.M=function(){Be.Z.M.call(this),qe(this),delete this.g};var Ge=function(e){Object(u.a)(n,e);var t=Object(s.a)(n);function n(e,r){var i;return Object(l.a)(this,n),(i=t.call(this)).m=e,i.j=r,i.h=null,i.i=!1,i.g=null,i}return Object(c.a)(n,[{key:"l",value:function(e){this.h=arguments,this.g?this.i=!0:Ke(this)}},{key:"M",value:function(){Object(a.a)(Object(o.a)(n.prototype),"M",this).call(this),this.g&&(p.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}]),n}(T);function We(e){T.call(this),this.h=e,this.g={}}S(We,T);var Qe=[];function $e(e,t,n,r){Array.isArray(n)||(n&&(Qe[0]=n.toString()),n=Qe);for(var i=0;i<n.length;i++){var a=me(t,n[i],r||e.handleEvent,!1,e.h||e);if(!a)break;e.g[a.key]=a}}function Ye(e){M(e.g,(function(e,t){this.g.hasOwnProperty(t)&&Ee(e)}),e),e.g={}}function Xe(){this.g=!0}function Je(e,t,n,r){e.info((function(){return"XMLHTTP TEXT ("+t+"): "+function(e,t){if(!e.g)return t;if(!t)return null;try{var n=JSON.parse(t);if(n)for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var r=n[e];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var a=i[0];if("noop"!=a&&"stop"!=a&&"close"!=a)for(var o=1;o<i.length;o++)i[o]=""}}}return Ne(n)}catch(u){return t}}(e,n)+(r?" "+r:"")}))}We.prototype.M=function(){We.Z.M.call(this),Ye(this)},We.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},Xe.prototype.Aa=function(){this.g=!1},Xe.prototype.info=function(){};var Ze={},et=null;function tt(){return et=et||new Ie}function nt(e){oe.call(this,Ze.Ma,e)}function rt(e){var t=tt();xe(t,new nt(t,e))}function it(e,t){oe.call(this,Ze.STAT_EVENT,e),this.stat=t}function at(e){var t=tt();xe(t,new it(t,e))}function ot(e,t){oe.call(this,Ze.Na,e),this.size=t}function ut(e,t){if("function"!==typeof e)throw Error("Fn must not be null and must be a function");return p.setTimeout((function(){e()}),t)}Ze.Ma="serverreachability",S(nt,oe),Ze.STAT_EVENT="statevent",S(it,oe),Ze.Na="timingevent",S(ot,oe);var st={NO_ERROR:0,lb:1,yb:2,xb:3,sb:4,wb:5,zb:6,Ja:7,TIMEOUT:8,Cb:9},lt={qb:"complete",Mb:"success",Ka:"error",Ja:"abort",Eb:"ready",Fb:"readystatechange",TIMEOUT:"timeout",Ab:"incrementaldata",Db:"progress",tb:"downloadprogress",Ub:"uploadprogress"};function ct(){}function ft(e){return e.h||(e.h=e.i())}function ht(){}ct.prototype.h=null;var dt,pt={OPEN:"a",pb:"b",Ka:"c",Bb:"d"};function vt(){oe.call(this,"d")}function yt(){oe.call(this,"c")}function gt(){}function mt(e,t,n,r){this.l=e,this.j=t,this.m=n,this.X=r||1,this.V=new We(this),this.P=kt,e=W?125:void 0,this.W=new Be(e),this.H=null,this.i=!1,this.s=this.A=this.v=this.K=this.F=this.Y=this.B=null,this.D=[],this.g=null,this.C=0,this.o=this.u=null,this.N=-1,this.I=!1,this.O=0,this.L=null,this.aa=this.J=this.$=this.U=!1,this.h=new bt}function bt(){this.i=null,this.g="",this.h=!1}S(vt,oe),S(yt,oe),S(gt,ct),gt.prototype.g=function(){return new XMLHttpRequest},gt.prototype.i=function(){return{}},dt=new gt;var kt=45e3,wt={},Et={};function Ot(e,t,n){e.K=1,e.v=Gt(Ut(t)),e.s=n,e.U=!0,St(e,null)}function St(e,t){e.F=Date.now(),It(e),e.A=Ut(e.v);var n=e.A,r=e.X;Array.isArray(r)||(r=[String(r)]),on(n.h,"t",r),e.C=0,n=e.l.H,e.h=new bt,e.g=sr(e.l,n?t:null,!e.s),0<e.O&&(e.L=new Ge(E(e.Ia,e,e.g),e.O)),$e(e.V,e.g,"readystatechange",e.gb),t=e.H?V(e.H):{},e.s?(e.u||(e.u="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.ea(e.A,e.u,e.s,t)):(e.u="GET",e.g.ea(e.A,e.u,null,t)),rt(1),function(e,t,n,r,i,a){e.info((function(){if(e.g)if(a)for(var o="",u=a.split("&"),s=0;s<u.length;s++){var l=u[s].split("=");if(1<l.length){var c=l[0];l=l[1];var f=c.split("_");o=2<=f.length&&"type"==f[1]?o+(c+"=")+l+"&":o+(c+"=redacted&")}}else o=null;else o=a;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+o}))}(e.j,e.u,e.A,e.m,e.X,e.s)}function Tt(e){return!!e.g&&("GET"==e.u&&2!=e.K&&e.l.Ba)}function _t(e,t,n){for(var r,i=!0;!e.I&&e.C<n.length;){if((r=jt(e,n))==Et){4==t&&(e.o=4,at(14),i=!1),Je(e.j,e.m,null,"[Incomplete Response]");break}if(r==wt){e.o=4,at(15),Je(e.j,e.m,n,"[Invalid Chunk]"),i=!1;break}Je(e.j,e.m,r,null),Dt(e,r)}Tt(e)&&r!=Et&&r!=wt&&(e.h.g="",e.C=0),4!=t||0!=n.length||e.h.h||(e.o=1,at(16),i=!1),e.i=e.i&&i,i?0<n.length&&!e.aa&&(e.aa=!0,(t=e.l).g==e&&t.$&&!t.L&&(t.h.info("Great, no buffering proxy detected. Bytes received: "+n.length),er(t),t.L=!0,at(11))):(Je(e.j,e.m,n,"[Invalid Chunked Response]"),At(e),Nt(e))}function jt(e,t){var n=e.C,r=t.indexOf("\n",n);return-1==r?Et:(n=Number(t.substring(n,r)),isNaN(n)?wt:(r+=1)+n>t.length?Et:(t=t.substr(r,n),e.C=r+n,t))}function It(e){e.Y=Date.now()+e.P,xt(e,e.P)}function xt(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=ut(E(e.eb,e),t)}function Ct(e){e.B&&(p.clearTimeout(e.B),e.B=null)}function Nt(e){0==e.l.G||e.I||rr(e.l,e)}function At(e){Ct(e);var t=e.L;t&&"function"==typeof t.na&&t.na(),e.L=null,qe(e.W),Ye(e.V),e.g&&(t=e.g,e.g=null,t.abort(),t.na())}function Dt(e,t){try{var n=e.l;if(0!=n.G&&(n.g==e||pn(n.i,e)))if(n.I=e.N,!e.J&&pn(n.i,e)&&3==n.G){try{var r=n.Ca.g.parse(t)}catch(a){r=null}if(Array.isArray(r)&&3==r.length){var i=r;if(0==i[0]){e:if(!n.u){if(n.g){if(!(n.g.F+3e3<e.F))break e;nr(n),Kn(n)}Zn(n),at(18)}}else n.ta=i[1],0<n.ta-n.U&&37500>i[2]&&n.N&&0==n.A&&!n.v&&(n.v=ut(E(n.ab,n),6e3));if(1>=dn(n.i)&&n.ka){try{n.ka()}catch(a){}n.ka=void 0}}else ar(n,11)}else if((e.J||n.g==e)&&nr(n),!N(t))for(i=n.Ca.g.parse(t),t=0;t<i.length;t++){var a=i[t];if(n.U=a[0],a=a[1],2==n.G)if("c"==a[0]){n.J=a[1],n.la=a[2];var o=a[3];null!=o&&(n.ma=o,n.h.info("VER="+n.ma));var u=a[4];null!=u&&(n.za=u,n.h.info("SVER="+n.za));var s=a[5];null!=s&&"number"===typeof s&&0<s&&(r=1.5*s,n.K=r,n.h.info("backChannelRequestTimeoutMs_="+r)),r=n;var l=e.g;if(l){var c=l.g?l.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(c){var f=r.i;!f.g&&(L(c,"spdy")||L(c,"quic")||L(c,"h2"))&&(f.j=f.l,f.g=new Set,f.h&&(vn(f,f.h),f.h=null))}if(r.D){var h=l.g?l.g.getResponseHeader("X-HTTP-Session-Id"):null;h&&(r.sa=h,Kt(r.F,r.D,h))}}n.G=3,n.j&&n.j.xa(),n.$&&(n.O=Date.now()-e.F,n.h.info("Handshake RTT: "+n.O+"ms"));var d=e;if((r=n).oa=ur(r,r.H?r.la:null,r.W),d.J){yn(r.i,d);var p=d,v=r.K;v&&p.setTimeout(v),p.B&&(Ct(p),It(p)),r.g=d}else Jn(r);0<n.l.length&&Qn(n)}else"stop"!=a[0]&&"close"!=a[0]||ar(n,7);else 3==n.G&&("stop"==a[0]||"close"==a[0]?"stop"==a[0]?ar(n,7):Hn(n):"noop"!=a[0]&&n.j&&n.j.wa(a),n.A=0)}rt(4)}catch(a){}}function Lt(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(y(e)||"string"===typeof e)I(e,t,void 0);else{if(e.T&&"function"==typeof e.T)var n=e.T();else if(e.R&&"function"==typeof e.R)n=void 0;else if(y(e)||"string"===typeof e){n=[];for(var r=e.length,i=0;i<r;i++)n.push(i)}else for(i in n=[],r=0,e)n[r++]=i;r=function(e){if(e.R&&"function"==typeof e.R)return e.R();if("string"===typeof e)return e.split("");if(y(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}(e),i=r.length;for(var a=0;a<i;a++)t.call(void 0,r[a],n&&n[a],e)}}function Pt(e,t){this.h={},this.g=[],this.i=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(e)if(e instanceof Pt)for(n=e.T(),r=0;r<n.length;r++)this.set(n[r],e.get(n[r]));else for(r in e)this.set(r,e[r])}function Rt(e){if(e.i!=e.g.length){for(var t=0,n=0;t<e.g.length;){var r=e.g[t];Ft(e.h,r)&&(e.g[n++]=r),t++}e.g.length=n}if(e.i!=e.g.length){var i={};for(n=t=0;t<e.g.length;)Ft(i,r=e.g[t])||(e.g[n++]=r,i[r]=1),t++;e.g.length=n}}function Ft(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(r=mt.prototype).setTimeout=function(e){this.P=e},r.gb=function(e){e=e.target;var t=this.L;t&&3==Vn(e)?t.l():this.Ia(e)},r.Ia=function(e){try{if(e==this.g)e:{var t=Vn(this.g),n=this.g.Da(),r=this.g.ba();if(!(3>t)&&(3!=t||W||this.g&&(this.h.h||this.g.ga()||Un(this.g)))){this.I||4!=t||7==n||rt(8==n||0>=r?3:2),Ct(this);var i=this.g.ba();this.N=i;t:if(Tt(this)){var a=Un(this.g);e="";var o=a.length,u=4==Vn(this.g);if(!this.h.i){if("undefined"===typeof TextDecoder){At(this),Nt(this);var s="";break t}this.h.i=new p.TextDecoder}for(n=0;n<o;n++)this.h.h=!0,e+=this.h.i.decode(a[n],{stream:u&&n==o-1});a.splice(0,o),this.h.g+=e,this.C=0,s=this.h.g}else s=this.g.ga();if(this.i=200==i,function(e,t,n,r,i,a,o){e.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+a+" "+o}))}(this.j,this.u,this.A,this.m,this.X,t,i),this.i){if(this.$&&!this.J){t:{if(this.g){var l,c=this.g;if((l=c.g?c.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!N(l)){var f=l;break t}}f=null}if(!(i=f)){this.i=!1,this.o=3,at(12),At(this),Nt(this);break e}Je(this.j,this.m,i,"Initial handshake response via X-HTTP-Initial-Response"),this.J=!0,Dt(this,i)}this.U?(_t(this,t,s),W&&this.i&&3==t&&($e(this.V,this.W,"tick",this.fb),this.W.start())):(Je(this.j,this.m,s,null),Dt(this,s)),4==t&&At(this),this.i&&!this.I&&(4==t?rr(this.l,this):(this.i=!1,It(this)))}else 400==i&&0<s.indexOf("Unknown SID")?(this.o=3,at(12)):(this.o=0,at(13)),At(this),Nt(this)}}}catch(t){}},r.fb=function(){if(this.g){var e=Vn(this.g),t=this.g.ga();this.C<t.length&&(Ct(this),_t(this,e,t),this.i&&4!=e&&It(this))}},r.cancel=function(){this.I=!0,At(this)},r.eb=function(){this.B=null;var e=Date.now();0<=e-this.Y?(function(e,t){e.info((function(){return"TIMEOUT: "+t}))}(this.j,this.A),2!=this.K&&(rt(3),at(17)),At(this),this.o=2,Nt(this)):xt(this,this.Y-e)},(r=Pt.prototype).R=function(){Rt(this);for(var e=[],t=0;t<this.g.length;t++)e.push(this.h[this.g[t]]);return e},r.T=function(){return Rt(this),this.g.concat()},r.get=function(e,t){return Ft(this.h,e)?this.h[e]:t},r.set=function(e,t){Ft(this.h,e)||(this.i++,this.g.push(e)),this.h[e]=t},r.forEach=function(e,t){for(var n=this.T(),r=0;r<n.length;r++){var i=n[r],a=this.get(i);e.call(t,a,i,this)}};var Mt=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Vt(e,t){if(this.i=this.s=this.j="",this.m=null,this.o=this.l="",this.g=!1,e instanceof Vt){this.g=void 0!==t?t:e.g,zt(this,e.j),this.s=e.s,Bt(this,e.i),qt(this,e.m),this.l=e.l,t=e.h;var n=new tn;n.i=t.i,t.g&&(n.g=new Pt(t.g),n.h=t.h),Ht(this,n),this.o=e.o}else e&&(n=String(e).match(Mt))?(this.g=!!t,zt(this,n[1]||"",!0),this.s=Wt(n[2]||""),Bt(this,n[3]||"",!0),qt(this,n[4]),this.l=Wt(n[5]||"",!0),Ht(this,n[6]||"",!0),this.o=Wt(n[7]||"")):(this.g=!!t,this.h=new tn(null,this.g))}function Ut(e){return new Vt(e)}function zt(e,t,n){e.j=n?Wt(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function Bt(e,t,n){e.i=n?Wt(t,!0):t}function qt(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.m=t}else e.m=null}function Ht(e,t,n){t instanceof tn?(e.h=t,function(e,t){t&&!e.j&&(nn(e),e.i=null,e.g.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(rn(this,t),on(this,n,e))}),e)),e.j=t}(e.h,e.g)):(n||(t=Qt(t,Zt)),e.h=new tn(t,e.g))}function Kt(e,t,n){e.h.set(t,n)}function Gt(e){return Kt(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function Wt(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Qt(e,t,n){return"string"===typeof e?(e=encodeURI(e).replace(t,$t),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function $t(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}Vt.prototype.toString=function(){var e=[],t=this.j;t&&e.push(Qt(t,Yt,!0),":");var n=this.i;return(n||"file"==t)&&(e.push("//"),(t=this.s)&&e.push(Qt(t,Yt,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.m)&&e.push(":",String(n))),(n=this.l)&&(this.i&&"/"!=n.charAt(0)&&e.push("/"),e.push(Qt(n,"/"==n.charAt(0)?Jt:Xt,!0))),(n=this.h.toString())&&e.push("?",n),(n=this.o)&&e.push("#",Qt(n,en)),e.join("")};var Yt=/[#\/\?@]/g,Xt=/[#\?:]/g,Jt=/[#\?]/g,Zt=/[#\?@]/g,en=/#/g;function tn(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function nn(e){e.g||(e.g=new Pt,e.h=0,e.i&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var a=e[n].substring(0,r);i=e[n].substring(r+1)}else a=e[n];t(a,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.i,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function rn(e,t){nn(e),t=un(e,t),Ft(e.g.h,t)&&(e.i=null,e.h-=e.g.get(t).length,Ft((e=e.g).h,t)&&(delete e.h[t],e.i--,e.g.length>2*e.i&&Rt(e)))}function an(e,t){return nn(e),t=un(e,t),Ft(e.g.h,t)}function on(e,t,n){rn(e,t),0<n.length&&(e.i=null,e.g.set(un(e,t),C(n)),e.h+=n.length)}function un(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}(r=tn.prototype).add=function(e,t){nn(this),this.i=null,e=un(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this},r.forEach=function(e,t){nn(this),this.g.forEach((function(n,r){I(n,(function(n){e.call(t,n,r,this)}),this)}),this)},r.T=function(){nn(this);for(var e=this.g.R(),t=this.g.T(),n=[],r=0;r<t.length;r++)for(var i=e[r],a=0;a<i.length;a++)n.push(t[r]);return n},r.R=function(e){nn(this);var t=[];if("string"===typeof e)an(this,e)&&(t=x(t,this.g.get(un(this,e))));else{e=this.g.R();for(var n=0;n<e.length;n++)t=x(t,e[n])}return t},r.set=function(e,t){return nn(this),this.i=null,an(this,e=un(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},r.get=function(e,t){return e&&0<(e=this.R(e)).length?String(e[0]):t},r.toString=function(){if(this.i)return this.i;if(!this.g)return"";for(var e=[],t=this.g.T(),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r));r=this.R(r);for(var a=0;a<r.length;a++){var o=i;""!==r[a]&&(o+="="+encodeURIComponent(String(r[a]))),e.push(o)}}return this.i=e.join("&")};var sn=function e(t,n){Object(l.a)(this,e),this.h=t,this.g=n};function ln(e){this.l=e||fn,p.PerformanceNavigationTiming?e=0<(e=p.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(p.g&&p.g.Ea&&p.g.Ea()&&p.g.Ea().Zb),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var cn,fn=10;function hn(e){return!!e.h||!!e.g&&e.g.size>=e.j}function dn(e){return e.h?1:e.g?e.g.size:0}function pn(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function vn(e,t){e.g?e.g.add(t):e.h=t}function yn(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function gn(e){if(null!=e.h)return e.i.concat(e.h.D);if(null!=e.g&&0!==e.g.size){var t,n=e.i,r=Object(i.a)(e.g.values());try{for(r.s();!(t=r.n()).done;){var a=t.value;n=n.concat(a.D)}}catch(o){r.e(o)}finally{r.f()}return n}return C(e.i)}function mn(){}function bn(){this.g=new mn}function kn(e,t,n){var r=n||"";try{Lt(e,(function(e,n){var i=e;g(e)&&(i=Ne(e)),t.push(r+n+"="+encodeURIComponent(i))}))}catch(i){throw t.push(r+"type="+encodeURIComponent("_badmap")),i}}function wn(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(a){}}function En(e){this.l=e.$b||null,this.j=e.ib||!1}function On(e,t){Ie.call(this),this.D=e,this.u=t,this.m=void 0,this.readyState=Sn,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}ln.prototype.cancel=function(){if(this.i=gn(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){var e,t=Object(i.a)(this.g.values());try{for(t.s();!(e=t.n()).done;){e.value.cancel()}}catch(n){t.e(n)}finally{t.f()}this.g.clear()}},mn.prototype.stringify=function(e){return p.JSON.stringify(e,void 0)},mn.prototype.parse=function(e){return p.JSON.parse(e,void 0)},S(En,ct),En.prototype.g=function(){return new On(this.l,this.j)},En.prototype.i=(cn={},function(){return cn}),S(On,Ie);var Sn=0;function Tn(e){e.j.read().then(e.Sa.bind(e)).catch(e.ha.bind(e))}function _n(e){e.readyState=4,e.l=null,e.j=null,e.A=null,jn(e)}function jn(e){e.onreadystatechange&&e.onreadystatechange.call(e)}(r=On.prototype).open=function(e,t){if(this.readyState!=Sn)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,jn(this)},r.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;var t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};e&&(t.body=e),(this.D||p).fetch(new Request(this.B,t)).then(this.Va.bind(this),this.ha.bind(this))},r.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted."),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,_n(this)),this.readyState=Sn},r.Va=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,jn(this)),this.g&&(this.readyState=3,jn(this),this.g)))if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Ta.bind(this),this.ha.bind(this));else if("undefined"!==typeof p.ReadableStream&&"body"in e){if(this.j=e.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;Tn(this)}else e.text().then(this.Ua.bind(this),this.ha.bind(this))},r.Sa=function(e){if(this.g){if(this.u&&e.value)this.response.push(e.value);else if(!this.u){var t=e.value?e.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?_n(this):jn(this),3==this.readyState&&Tn(this)}},r.Ua=function(e){this.g&&(this.response=this.responseText=e,_n(this))},r.Ta=function(e){this.g&&(this.response=e,_n(this))},r.ha=function(){this.g&&_n(this)},r.setRequestHeader=function(e,t){this.v.append(e,t)},r.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},r.getAllResponseHeaders=function(){if(!this.h)return"";for(var e=[],t=this.h.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(On.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}});var In=p.JSON.parse;function xn(e){Ie.call(this),this.headers=new Pt,this.u=e||null,this.h=!1,this.C=this.g=null,this.H="",this.m=0,this.j="",this.l=this.F=this.v=this.D=!1,this.B=0,this.A=null,this.J=Cn,this.K=this.L=!1}S(xn,Ie);var Cn="",Nn=/^https?$/i,An=["POST","PUT"];function Dn(e){return"content-type"==e.toLowerCase()}function Ln(e,t){e.h=!1,e.g&&(e.l=!0,e.g.abort(),e.l=!1),e.j=t,e.m=5,Pn(e),Fn(e)}function Pn(e){e.D||(e.D=!0,xe(e,"complete"),xe(e,"error"))}function Rn(e){if(e.h&&"undefined"!=typeof d&&(!e.C[1]||4!=Vn(e)||2!=e.ba()))if(e.v&&4==Vn(e))He(e.Fa,0,e);else if(xe(e,"readystatechange"),4==Vn(e)){e.h=!1;try{var t,n=e.ba();e:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break e;default:r=!1}if(!(t=r)){var i;if(i=0===n){var a=String(e.H).match(Mt)[1]||null;if(!a&&p.self&&p.self.location){var o=p.self.location.protocol;a=o.substr(0,o.length-1)}i=!Nn.test(a?a.toLowerCase():"")}t=i}if(t)xe(e,"complete"),xe(e,"success");else{e.m=6;try{var u=2<Vn(e)?e.g.statusText:""}catch(s){u=""}e.j=u+" ["+e.ba()+"]",Pn(e)}}finally{Fn(e)}}}function Fn(e,t){if(e.g){Mn(e);var n=e.g,r=e.C[0]?v:null;e.g=null,e.C=null,t||xe(e,"ready");try{n.onreadystatechange=r}catch(i){}}}function Mn(e){e.g&&e.K&&(e.g.ontimeout=null),e.A&&(p.clearTimeout(e.A),e.A=null)}function Vn(e){return e.g?e.g.readyState:0}function Un(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.J){case Cn:case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(t){return null}}function zn(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=function(e){var t="";return M(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}(n),"string"===typeof e?null!=n&&encodeURIComponent(String(n)):Kt(e,t,n))}function Bn(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function qn(e){this.za=0,this.l=[],this.h=new Xe,this.la=this.oa=this.F=this.W=this.g=this.sa=this.D=this.aa=this.o=this.P=this.s=null,this.Za=this.V=0,this.Xa=Bn("failFast",!1,e),this.N=this.v=this.u=this.m=this.j=null,this.X=!0,this.I=this.ta=this.U=-1,this.Y=this.A=this.C=0,this.Pa=Bn("baseRetryDelayMs",5e3,e),this.$a=Bn("retryDelaySeedMs",1e4,e),this.Ya=Bn("forwardChannelMaxRetries",2,e),this.ra=Bn("forwardChannelRequestTimeoutMs",2e4,e),this.qa=e&&e.xmlHttpFactory||void 0,this.Ba=e&&e.Yb||!1,this.K=void 0,this.H=e&&e.supportsCrossDomainXhr||!1,this.J="",this.i=new ln(e&&e.concurrentRequestLimit),this.Ca=new bn,this.ja=e&&e.fastHandshake||!1,this.Ra=e&&e.Wb||!1,e&&e.Aa&&this.h.Aa(),e&&e.forceLongPolling&&(this.X=!1),this.$=!this.ja&&this.X&&e&&e.detectBufferingProxy||!1,this.ka=void 0,this.O=0,this.L=!1,this.B=null,this.Wa=!e||!1!==e.Xb}function Hn(e){if(Gn(e),3==e.G){var t=e.V++,n=Ut(e.F);Kt(n,"SID",e.J),Kt(n,"RID",t),Kt(n,"TYPE","terminate"),Yn(e,n),(t=new mt(e,e.h,t,void 0)).K=2,t.v=Gt(Ut(n)),n=!1,p.navigator&&p.navigator.sendBeacon&&(n=p.navigator.sendBeacon(t.v.toString(),"")),!n&&p.Image&&((new Image).src=t.v,n=!0),n||(t.g=sr(t.l,null),t.g.ea(t.v)),t.F=Date.now(),It(t)}or(e)}function Kn(e){e.g&&(er(e),e.g.cancel(),e.g=null)}function Gn(e){Kn(e),e.u&&(p.clearTimeout(e.u),e.u=null),nr(e),e.i.cancel(),e.m&&("number"===typeof e.m&&p.clearTimeout(e.m),e.m=null)}function Wn(e,t){e.l.push(new sn(e.Za++,t)),3==e.G&&Qn(e)}function Qn(e){hn(e.i)||e.m||(e.m=!0,Me(e.Ha,e),e.C=0)}function $n(e,t){var n;n=t?t.m:e.V++;var r=Ut(e.F);Kt(r,"SID",e.J),Kt(r,"RID",n),Kt(r,"AID",e.U),Yn(e,r),e.o&&e.s&&zn(r,e.o,e.s),n=new mt(e,e.h,n,e.C+1),null===e.o&&(n.H=e.s),t&&(e.l=t.D.concat(e.l)),t=Xn(e,n,1e3),n.setTimeout(Math.round(.5*e.ra)+Math.round(.5*e.ra*Math.random())),vn(e.i,n),Ot(n,r,t)}function Yn(e,t){e.j&&Lt({},(function(e,n){Kt(t,n,e)}))}function Xn(e,t,n){n=Math.min(e.l.length,n);var r=e.j?E(e.j.Oa,e.j,e):null;e:for(var i=e.l,a=-1;;){var o=["count="+n];-1==a?0<n?(a=i[0].h,o.push("ofs="+a)):a=0:o.push("ofs="+a);for(var u=!0,s=0;s<n;s++){var l=i[s].h,c=i[s].g;if(0>(l-=a))a=Math.max(0,i[s].h-100),u=!1;else try{kn(c,o,"req"+l+"_")}catch(f){r&&r(c)}}if(u){r=o.join("&");break e}}return e=e.l.splice(0,n),t.D=e,r}function Jn(e){e.g||e.u||(e.Y=1,Me(e.Ga,e),e.A=0)}function Zn(e){return!(e.g||e.u||3<=e.A)&&(e.Y++,e.u=ut(E(e.Ga,e),ir(e,e.A)),e.A++,!0)}function er(e){null!=e.B&&(p.clearTimeout(e.B),e.B=null)}function tr(e){e.g=new mt(e,e.h,"rpc",e.Y),null===e.o&&(e.g.H=e.s),e.g.O=0;var t=Ut(e.oa);Kt(t,"RID","rpc"),Kt(t,"SID",e.J),Kt(t,"CI",e.N?"0":"1"),Kt(t,"AID",e.U),Yn(e,t),Kt(t,"TYPE","xmlhttp"),e.o&&e.s&&zn(t,e.o,e.s),e.K&&e.g.setTimeout(e.K);var n=e.g;e=e.la,n.K=1,n.v=Gt(Ut(t)),n.s=null,n.U=!0,St(n,e)}function nr(e){null!=e.v&&(p.clearTimeout(e.v),e.v=null)}function rr(e,t){var n=null;if(e.g==t){nr(e),er(e),e.g=null;var r=2}else{if(!pn(e.i,t))return;n=t.D,yn(e.i,t),r=1}if(e.I=t.N,0!=e.G)if(t.i)if(1==r){n=t.s?t.s.length:0,t=Date.now()-t.F;var i=e.C;xe(r=tt(),new ot(r,n,t,i)),Qn(e)}else Jn(e);else if(3==(i=t.o)||0==i&&0<e.I||!(1==r&&function(e,t){return!(dn(e.i)>=e.i.j-(e.m?1:0))&&(e.m?(e.l=t.D.concat(e.l),!0):!(1==e.G||2==e.G||e.C>=(e.Xa?0:e.Ya))&&(e.m=ut(E(e.Ha,e,t),ir(e,e.C)),e.C++,!0))}(e,t)||2==r&&Zn(e)))switch(n&&0<n.length&&(t=e.i,t.i=t.i.concat(n)),i){case 1:ar(e,5);break;case 4:ar(e,10);break;case 3:ar(e,6);break;default:ar(e,2)}}function ir(e,t){var n=e.Pa+Math.floor(Math.random()*e.$a);return e.j||(n*=2),n*t}function ar(e,t){if(e.h.info("Error code "+t),2==t){var n=null;e.j&&(n=null);var r=E(e.jb,e);n||(n=new Vt("//www.google.com/images/cleardot.gif"),p.location&&"http"==p.location.protocol||zt(n,"https"),Gt(n)),function(e,t){var n=new Xe;if(p.Image){var r=new Image;r.onload=O(wn,n,r,"TestLoadImage: loaded",!0,t),r.onerror=O(wn,n,r,"TestLoadImage: error",!1,t),r.onabort=O(wn,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=O(wn,n,r,"TestLoadImage: timeout",!1,t),p.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}(n.toString(),r)}else at(2);e.G=0,e.j&&e.j.va(t),or(e),Gn(e)}function or(e){e.G=0,e.I=-1,e.j&&(0==gn(e.i).length&&0==e.l.length||(e.i.i.length=0,C(e.l),e.l.length=0),e.j.ua())}function ur(e,t,n){var r=function(e){return e instanceof Vt?Ut(e):new Vt(e,void 0)}(n);if(""!=r.i)t&&Bt(r,t+"."+r.i),qt(r,r.m);else{var i=p.location;r=function(e,t,n,r){var i=new Vt(null,void 0);return e&&zt(i,e),t&&Bt(i,t),n&&qt(i,n),r&&(i.l=r),i}(i.protocol,t?t+"."+i.hostname:i.hostname,+i.port,n)}return e.aa&&M(e.aa,(function(e,t){Kt(r,t,e)})),t=e.D,n=e.sa,t&&n&&Kt(r,t,n),Kt(r,"VER",e.ma),Yn(e,r),r}function sr(e,t,n){if(t&&!e.H)throw Error("Can't create secondary domain capable XhrIo object.");return(t=n&&e.Ba&&!e.qa?new xn(new En({ib:!0})):new xn(e.qa)).L=e.H,t}function lr(){}function cr(){if(K&&!(10<=Number(ie)))throw Error("Environmental error: no available transport.")}function fr(e,t){Ie.call(this),this.g=new qn(t),this.l=e,this.h=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.g.s=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.ya&&(e?e["X-WebChannel-Client-Profile"]=t.ya:e={"X-WebChannel-Client-Profile":t.ya}),this.g.P=e,(e=t&&t.httpHeadersOverwriteParam)&&!N(e)&&(this.g.o=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!N(t)&&(this.g.D=t,null!==(e=this.h)&&t in e&&(t in(e=this.h)&&delete e[t])),this.j=new pr(this)}function hr(e){vt.call(this);var t=e.__sm__;if(t){e:{for(var n in t){e=n;break e}e=void 0}(this.i=e)&&(e=this.i,t=null!==t&&e in t?t[e]:void 0),this.data=t}else this.data=e}function dr(){yt.call(this),this.status=1}function pr(e){this.g=e}(r=xn.prototype).ea=function(e,t,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.H+"; newUri="+e);t=t?t.toUpperCase():"GET",this.H=e,this.j="",this.m=0,this.D=!1,this.h=!0,this.g=this.u?this.u.g():dt.g(),this.C=this.u?ft(this.u):ft(dt),this.g.onreadystatechange=E(this.Fa,this);try{this.F=!0,this.g.open(t,String(e),!0),this.F=!1}catch(a){return void Ln(this,a)}e=n||"";var i=new Pt(this.headers);r&&Lt(r,(function(e,t){i.set(t,e)})),r=function(e){e:{for(var t=Dn,n=e.length,r="string"===typeof e?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e)){t=i;break e}t=-1}return 0>t?null:"string"===typeof e?e.charAt(t):e[t]}(i.T()),n=p.FormData&&e instanceof p.FormData,!(0<=j(An,t))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),i.forEach((function(e,t){this.g.setRequestHeader(t,e)}),this),this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{Mn(this),0<this.B&&((this.K=function(e){return K&&ne()&&"number"===typeof e.timeout&&void 0!==e.ontimeout}(this.g))?(this.g.timeout=this.B,this.g.ontimeout=E(this.pa,this)):this.A=He(this.pa,this.B,this)),this.v=!0,this.g.send(e),this.v=!1}catch(a){Ln(this,a)}},r.pa=function(){"undefined"!=typeof d&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,xe(this,"timeout"),this.abort(8))},r.abort=function(e){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=e||7,xe(this,"complete"),xe(this,"abort"),Fn(this))},r.M=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),Fn(this,!0)),xn.Z.M.call(this)},r.Fa=function(){this.s||(this.F||this.v||this.l?Rn(this):this.cb())},r.cb=function(){Rn(this)},r.ba=function(){try{return 2<Vn(this)?this.g.status:-1}catch(cn){return-1}},r.ga=function(){try{return this.g?this.g.responseText:""}catch(cn){return""}},r.Qa=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),In(t)}},r.Da=function(){return this.m},r.La=function(){return"string"===typeof this.j?this.j:String(this.j)},(r=qn.prototype).ma=8,r.G=1,r.hb=function(e){try{this.h.info("Origin Trials invoked: "+e)}catch(t){}},r.Ha=function(e){if(this.m)if(this.m=null,1==this.G){if(!e){this.V=Math.floor(1e5*Math.random()),e=this.V++;var t=new mt(this,this.h,e,void 0),n=this.s;if(this.P&&(n?z(n=V(n),this.P):n=this.P),null===this.o&&(t.H=n),this.ja)e:{for(var r=0,i=0;i<this.l.length;i++){var a=this.l[i];if(void 0===(a="__data__"in a.g&&"string"===typeof(a=a.g.__data__)?a.length:void 0))break;if(4096<(r+=a)){r=i;break e}if(4096===r||i===this.l.length-1){r=i+1;break e}}r=1e3}else r=1e3;r=Xn(this,t,r),Kt(i=Ut(this.F),"RID",e),Kt(i,"CVER",22),this.D&&Kt(i,"X-HTTP-Session-Id",this.D),Yn(this,i),this.o&&n&&zn(i,this.o,n),vn(this.i,t),this.Ra&&Kt(i,"TYPE","init"),this.ja?(Kt(i,"$req",r),Kt(i,"SID","null"),t.$=!0,Ot(t,i,null)):Ot(t,i,r),this.G=2}}else 3==this.G&&(e?$n(this,e):0==this.l.length||hn(this.i)||$n(this))},r.Ga=function(){if(this.u=null,tr(this),this.$&&!(this.L||null==this.g||0>=this.O)){var e=2*this.O;this.h.info("BP detection timer enabled: "+e),this.B=ut(E(this.bb,this),e)}},r.bb=function(){this.B&&(this.B=null,this.h.info("BP detection timeout reached."),this.h.info("Buffering proxy detected and switch to long-polling!"),this.N=!1,this.L=!0,at(10),Kn(this),tr(this))},r.ab=function(){null!=this.v&&(this.v=null,Kn(this),Zn(this),at(19))},r.jb=function(e){e?(this.h.info("Successfully pinged google.com"),at(2)):(this.h.info("Failed to ping google.com"),at(1))},(r=lr.prototype).xa=function(){},r.wa=function(){},r.va=function(){},r.ua=function(){},r.Oa=function(){},cr.prototype.g=function(e,t){return new fr(e,t)},S(fr,Ie),fr.prototype.m=function(){this.g.j=this.j,this.A&&(this.g.H=!0);var e=this.g,t=this.l,n=this.h||void 0;e.Wa&&(e.h.info("Origin Trials enabled."),Me(E(e.hb,e,t))),at(0),e.W=t,e.aa=n||{},e.N=e.X,e.F=ur(e,null,e.W),Qn(e)},fr.prototype.close=function(){Hn(this.g)},fr.prototype.u=function(e){if("string"===typeof e){var t={};t.__data__=e,Wn(this.g,t)}else this.v?((t={}).__data__=Ne(e),Wn(this.g,t)):Wn(this.g,e)},fr.prototype.M=function(){this.g.j=null,delete this.j,Hn(this.g),delete this.g,fr.Z.M.call(this)},S(hr,vt),S(dr,yt),S(pr,lr),pr.prototype.xa=function(){xe(this.g,"a")},pr.prototype.wa=function(e){xe(this.g,new hr(e))},pr.prototype.va=function(e){xe(this.g,new dr(e))},pr.prototype.ua=function(){xe(this.g,"b")},cr.prototype.createWebChannel=cr.prototype.g,fr.prototype.send=fr.prototype.u,fr.prototype.open=fr.prototype.m,fr.prototype.close=fr.prototype.close,st.NO_ERROR=0,st.TIMEOUT=8,st.HTTP_ERROR=6,lt.COMPLETE="complete",ht.EventType=pt,pt.OPEN="a",pt.CLOSE="b",pt.ERROR="c",pt.MESSAGE="d",Ie.prototype.listen=Ie.prototype.N,xn.prototype.listenOnce=xn.prototype.O,xn.prototype.getLastError=xn.prototype.La,xn.prototype.getLastErrorCode=xn.prototype.Da,xn.prototype.getStatus=xn.prototype.ba,xn.prototype.getResponseJson=xn.prototype.Qa,xn.prototype.getResponseText=xn.prototype.ga,xn.prototype.send=xn.prototype.ea;var vr=h.createWebChannelTransport=function(){return new cr},yr=h.getStatEventTarget=function(){return tt()},gr=h.ErrorCode=st,mr=h.EventType=lt,br=h.Event=Ze,kr=h.Stat={rb:0,ub:1,vb:2,Ob:3,Tb:4,Qb:5,Rb:6,Pb:7,Nb:8,Sb:9,PROXY:10,NOPROXY:11,Lb:12,Hb:13,Ib:14,Gb:15,Jb:16,Kb:17,nb:18,mb:19,ob:20},wr=h.FetchXmlHttpFactory=En,Er=h.WebChannel=ht,Or=h.XhrIo=xn}).call(this,n(29))},function(e,t,n){"use strict";n.d(t,"a",(function(){return gt})),n.d(t,"b",(function(){return xt})),n.d(t,"c",(function(){return dt}));var r=n(18),i=n(13),a=n(22),o=n(4),u=n(1),s=n.n(u),l=n(3),c=n(5),f=n(6),h=n(23),d=n(14),p=n(0),v=n(2),y=n(12),g=n(19),m=n(15),b=n(8),k=function(){function e(t){Object(p.a)(this,e),this.uid=t}return Object(v.a)(e,[{key:"isAuthenticated",value:function(){return null!=this.uid}},{key:"toKey",value:function(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}},{key:"isEqual",value:function(e){return e.uid===this.uid}}]),e}();k.UNAUTHENTICATED=new k(null),k.GOOGLE_CREDENTIALS=new k("google-credentials-uid"),k.FIRST_PARTY=new k("first-party-uid"),k.MOCK_USER=new k("mock-user");var w="9.1.0",E=new m.b("@firebase/firestore");function O(e){if(E.logLevel<=m.a.DEBUG){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(_);E.debug.apply(E,["Firestore (".concat(w,"): ").concat(e)].concat(Object(d.a)(i)))}}function S(e){if(E.logLevel<=m.a.ERROR){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(_);E.error.apply(E,["Firestore (".concat(w,"): ").concat(e)].concat(Object(d.a)(i)))}}function T(e){if(E.logLevel<=m.a.WARN){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(_);E.warn.apply(E,["Firestore (".concat(w,"): ").concat(e)].concat(Object(d.a)(i)))}}function _(e){if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(t){return e}var t}function j(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unexpected state",t="FIRESTORE (".concat(w,") INTERNAL ASSERTION FAILED: ")+e;throw S(t),new Error(t)}function I(e,t){e||j()}function x(e,t){return e}var C="ok",N="cancelled",A="unknown",D="invalid-argument",L="deadline-exceeded",P="not-found",R="permission-denied",F="unauthenticated",M="resource-exhausted",V="failed-precondition",U="aborted",z="out-of-range",B="unimplemented",q="internal",H="unavailable",K=function(e){Object(c.a)(n,e);var t=Object(f.a)(n);function n(e,r){var i;return Object(p.a)(this,n),(i=t.call(this,r)).code=e,i.message=r,i.name="FirebaseError",i.toString=function(){return"".concat(i.name,": [code=").concat(i.code,"]: ").concat(i.message)},i}return n}(Object(h.a)(Error)),G=function e(t,n){Object(p.a)(this,e),this.user=n,this.type="OAuth",this.authHeaders={},this.authHeaders.Authorization="Bearer ".concat(t)},W=function(){function e(){Object(p.a)(this,e)}return Object(v.a)(e,[{key:"getToken",value:function(){return Promise.resolve(null)}},{key:"invalidateToken",value:function(){}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(k.UNAUTHENTICATED)}))}},{key:"shutdown",value:function(){}}]),e}(),Q=function(){function e(t){var n=this;Object(p.a)(this,e),this.auth=null,t.onInit((function(e){n.auth=e}))}return Object(v.a)(e,[{key:"getToken",value:function(){var e=this;return this.auth?this.auth.getToken().then((function(t){return t?(I("string"==typeof t.accessToken),new G(t.accessToken,new k(e.auth.getUid()))):null})):Promise.resolve(null)}},{key:"invalidateToken",value:function(){}},{key:"start",value:function(e,t){}},{key:"shutdown",value:function(){}}]),e}(),$=function(){function e(t,n,r){Object(p.a)(this,e),this.t=t,this.i=n,this.o=r,this.type="FirstParty",this.user=k.FIRST_PARTY}return Object(v.a)(e,[{key:"authHeaders",get:function(){var e={"X-Goog-AuthUser":this.i},t=this.t.auth.getAuthHeaderValueForFirstParty([]);return t&&(e.Authorization=t),this.o&&(e["X-Goog-Iam-Authorization-Token"]=this.o),e}}]),e}(),Y=function(){function e(t,n,r){Object(p.a)(this,e),this.t=t,this.i=n,this.o=r}return Object(v.a)(e,[{key:"getToken",value:function(){return Promise.resolve(new $(this.t,this.i,this.o))}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(k.FIRST_PARTY)}))}},{key:"shutdown",value:function(){}},{key:"invalidateToken",value:function(){}}]),e}(),X=function e(t,n,r,i,a,o,u,s){Object(p.a)(this,e),this.databaseId=t,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=a,this.forceLongPolling=o,this.autoDetectLongPolling=u,this.useFetchStreams=s},J=function(){function e(t,n){Object(p.a)(this,e),this.projectId=t,this.database=n||"(default)"}return Object(v.a)(e,[{key:"isDefaultDatabase",get:function(){return"(default)"===this.database}},{key:"isEqual",value:function(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database}}]),e}(),Z=function(){function e(t,n,r){Object(p.a)(this,e),void 0===n?n=0:n>t.length&&j(),void 0===r?r=t.length-n:r>t.length-n&&j(),this.segments=t,this.offset=n,this.len=r}return Object(v.a)(e,[{key:"length",get:function(){return this.len}},{key:"isEqual",value:function(t){return 0===e.comparator(this,t)}},{key:"child",value:function(t){var n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach((function(e){n.push(e)})):n.push(t),this.construct(n)}},{key:"limit",value:function(){return this.offset+this.length}},{key:"popFirst",value:function(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}},{key:"popLast",value:function(){return this.construct(this.segments,this.offset,this.length-1)}},{key:"firstSegment",value:function(){return this.segments[this.offset]}},{key:"lastSegment",value:function(){return this.get(this.length-1)}},{key:"get",value:function(e){return this.segments[this.offset+e]}},{key:"isEmpty",value:function(){return 0===this.length}},{key:"isPrefixOf",value:function(e){if(e.length<this.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}},{key:"isImmediateParentOf",value:function(e){if(this.length+1!==e.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}},{key:"forEach",value:function(e){for(var t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])}},{key:"toArray",value:function(){return this.segments.slice(this.offset,this.limit())}}],[{key:"comparator",value:function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=e.get(r),a=t.get(r);if(i<a)return-1;if(i>a)return 1}return e.length<t.length?-1:e.length>t.length?1:0}}]),e}(),ee=function(e){Object(c.a)(n,e);var t=Object(f.a)(n);function n(){return Object(p.a)(this,n),t.apply(this,arguments)}return Object(v.a)(n,[{key:"construct",value:function(e,t,r){return new n(e,t,r)}},{key:"canonicalString",value:function(){return this.toArray().join("/")}},{key:"toString",value:function(){return this.canonicalString()}}],[{key:"fromString",value:function(){for(var e=[],t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];for(var a=0,o=r;a<o.length;a++){var u=o[a];if(u.indexOf("//")>=0)throw new K(D,"Invalid segment (".concat(u,"). Paths must not contain // in them."));e.push.apply(e,Object(d.a)(u.split("/").filter((function(e){return e.length>0}))))}return new n(e)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(Z),te=/^[_a-zA-Z][_a-zA-Z0-9]*$/,ne=function(e){Object(c.a)(n,e);var t=Object(f.a)(n);function n(){return Object(p.a)(this,n),t.apply(this,arguments)}return Object(v.a)(n,[{key:"construct",value:function(e,t,r){return new n(e,t,r)}},{key:"canonicalString",value:function(){return this.toArray().map((function(e){return e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),n.isValidIdentifier(e)||(e="`"+e+"`"),e})).join(".")}},{key:"toString",value:function(){return this.canonicalString()}},{key:"isKeyField",value:function(){return 1===this.length&&"__name__"===this.get(0)}}],[{key:"isValidIdentifier",value:function(e){return te.test(e)}},{key:"keyField",value:function(){return new n(["__name__"])}},{key:"fromServerFormat",value:function(e){for(var t=[],r="",i=0,a=function(){if(0===r.length)throw new K(D,"Invalid field path (".concat(e,"). Paths must not be empty, begin with '.', end with '.', or contain '..'"));t.push(r),r=""},o=!1;i<e.length;){var u=e[i];if("\\"===u){if(i+1===e.length)throw new K(D,"Path has trailing escape character: "+e);var s=e[i+1];if("\\"!==s&&"."!==s&&"`"!==s)throw new K(D,"Path has invalid escape sequence: "+e);r+=s,i+=2}else"`"===u?(o=!o,i++):"."!==u||o?(r+=u,i++):(a(),i++)}if(a(),o)throw new K(D,"Unterminated ` in path: "+e);return new n(t)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(Z),re=function(){function e(t){Object(p.a)(this,e),this.path=t}return Object(v.a)(e,[{key:"hasCollectionId",value:function(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}},{key:"isEqual",value:function(e){return null!==e&&0===ee.comparator(this.path,e.path)}},{key:"toString",value:function(){return this.path.toString()}}],[{key:"fromPath",value:function(t){return new e(ee.fromString(t))}},{key:"fromName",value:function(t){return new e(ee.fromString(t).popFirst(5))}},{key:"comparator",value:function(e,t){return ee.comparator(e.path,t.path)}},{key:"isDocumentKey",value:function(e){return e.length%2==0}},{key:"fromSegments",value:function(t){return new e(new ee(t.slice()))}}]),e}();function ie(e,t,n){if(!n)throw new K(D,"Function ".concat(e,"() cannot be called with an empty ").concat(t,"."))}function ae(e){if(re.isDocumentKey(e))throw new K(D,"Invalid collection reference. Collection references must have an odd number of segments, but ".concat(e," has ").concat(e.length,"."))}function oe(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e="".concat(e.substring(0,20),"...")),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";var t=function(e){return e.constructor?e.constructor.name:null}(e);return t?"a custom ".concat(t," object"):"an object"}return"function"==typeof e?"a function":j()}function ue(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new K(D,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var n=oe(e);throw new K(D,"Expected type '".concat(t.name,"', but it was: ").concat(n))}return e}function se(e){return null==e}function le(e){return 0===e&&1/e==-1/0}var ce,fe,he={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"};function de(e){if(void 0===e)return S("RPC_ERROR","HTTP error has no status"),A;switch(e){case 200:return C;case 400:return V;case 401:return F;case 403:return R;case 404:return P;case 409:return U;case 416:return z;case 429:return M;case 499:return N;case 500:return A;case 501:return B;case 503:return H;case 504:return L;default:return e>=200&&e<300?C:e>=400&&e<500?V:e>=500&&e<600?q:A}}(fe=ce||(ce={}))[fe.OK=0]="OK",fe[fe.CANCELLED=1]="CANCELLED",fe[fe.UNKNOWN=2]="UNKNOWN",fe[fe.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",fe[fe.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",fe[fe.NOT_FOUND=5]="NOT_FOUND",fe[fe.ALREADY_EXISTS=6]="ALREADY_EXISTS",fe[fe.PERMISSION_DENIED=7]="PERMISSION_DENIED",fe[fe.UNAUTHENTICATED=16]="UNAUTHENTICATED",fe[fe.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",fe[fe.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",fe[fe.ABORTED=10]="ABORTED",fe[fe.OUT_OF_RANGE=11]="OUT_OF_RANGE",fe[fe.UNIMPLEMENTED=12]="UNIMPLEMENTED",fe[fe.INTERNAL=13]="INTERNAL",fe[fe.UNAVAILABLE=14]="UNAVAILABLE",fe[fe.DATA_LOSS=15]="DATA_LOSS";var pe=function(e){Object(c.a)(n,e);var t=Object(f.a)(n);function n(e,r){var i;return Object(p.a)(this,n),(i=t.call(this,e)).I=r,i}return Object(v.a)(n,[{key:"T",value:function(e,t){throw new Error("Not supported by FetchConnection")}},{key:"g",value:function(){var e=Object(l.a)(s.a.mark((function e(t,n,r,i){var a,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=JSON.stringify(i),e.prev=1,e.next=4,this.I(n,{method:"POST",headers:r,body:a});case 4:o=e.sent,e.next=10;break;case 7:throw e.prev=7,e.t0=e.catch(1),new K(de(e.t0.status),"Request failed with error: "+e.t0.statusText);case 10:if(o.ok){e.next=12;break}throw new K(de(o.status),"Request failed with error: "+o.statusText);case 12:return e.abrupt("return",o.json());case 13:case"end":return e.stop()}}),e,this,[[1,7]])})));return function(t,n,r,i){return e.apply(this,arguments)}}()}]),n}(function(){function e(t){Object(p.a)(this,e),this.databaseInfo=t,this.databaseId=t.databaseId;var n=t.ssl?"https":"http";this.u=n+"://"+t.host,this.h="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}return Object(v.a)(e,[{key:"l",value:function(e,t,n,r){var i=this.m(e,t);O("RestConnection","Sending: ",i,n);var a={};return this.p(a,r),this.g(e,i,a,n).then((function(e){return O("RestConnection","Received: ",e),e}),(function(t){throw T("RestConnection","".concat(e," failed with error: "),t,"url: ",i,"request:",n),t}))}},{key:"v",value:function(e,t,n,r){return this.l(e,t,n,r)}},{key:"p",value:function(e,t){if(e["X-Goog-Api-Client"]="gl-js/ fire/"+w,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t)for(var n in t.authHeaders)t.authHeaders.hasOwnProperty(n)&&(e[n]=t.authHeaders[n])}},{key:"m",value:function(e,t){var n=he[e];return"".concat(this.u,"/v1/").concat(t,":").concat(n)}}]),e}());function ve(e,t){return e<t?-1:e>t?1:0}function ye(e,t,n){return e.length===t.length&&e.every((function(e,r){return n(e,t[r])}))}var ge=function(){function e(t,n){if(Object(p.a)(this,e),this.seconds=t,this.nanoseconds=n,n<0)throw new K(D,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new K(D,"Timestamp nanoseconds out of range: "+n);if(t<-62135596800)throw new K(D,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new K(D,"Timestamp seconds out of range: "+t)}return Object(v.a)(e,[{key:"toDate",value:function(){return new Date(this.toMillis())}},{key:"toMillis",value:function(){return 1e3*this.seconds+this.nanoseconds/1e6}},{key:"_compareTo",value:function(e){return this.seconds===e.seconds?ve(this.nanoseconds,e.nanoseconds):ve(this.seconds,e.seconds)}},{key:"isEqual",value:function(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}},{key:"toString",value:function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}},{key:"toJSON",value:function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}},{key:"valueOf",value:function(){var e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}],[{key:"now",value:function(){return e.fromMillis(Date.now())}},{key:"fromDate",value:function(t){return e.fromMillis(t.getTime())}},{key:"fromMillis",value:function(t){var n=Math.floor(t/1e3);return new e(n,Math.floor(1e6*(t-1e3*n)))}}]),e}(),me=function(){function e(t){Object(p.a)(this,e),this.timestamp=t}return Object(v.a)(e,[{key:"compareTo",value:function(e){return this.timestamp._compareTo(e.timestamp)}},{key:"isEqual",value:function(e){return this.timestamp.isEqual(e.timestamp)}},{key:"toMicroseconds",value:function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}},{key:"toString",value:function(){return"SnapshotVersion("+this.timestamp.toString()+")"}},{key:"toTimestamp",value:function(){return this.timestamp}}],[{key:"fromTimestamp",value:function(t){return new e(t)}},{key:"min",value:function(){return new e(new ge(0,0))}}]),e}();function be(e){var t=0;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function ke(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}var we=function(){function e(t){Object(p.a)(this,e),this.binaryString=t}return Object(v.a)(e,[{key:"toBase64",value:function(){return e=this.binaryString,btoa(e);var e}},{key:"toUint8Array",value:function(){return function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.binaryString)}},{key:"approximateByteSize",value:function(){return 2*this.binaryString.length}},{key:"compareTo",value:function(e){return ve(this.binaryString,e.binaryString)}},{key:"isEqual",value:function(e){return this.binaryString===e.binaryString}}],[{key:"fromBase64String",value:function(t){return new e(atob(t))}},{key:"fromUint8Array",value:function(t){var n=function(e){for(var t="",n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(t);return new e(n)}}]),e}();we.EMPTY_BYTE_STRING=new we("");var Ee=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Oe(e){if(I(!!e),"string"==typeof e){var t=0,n=Ee.exec(e);if(I(!!n),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),t=Number(r)}var i=new Date(e);return{seconds:Math.floor(i.getTime()/1e3),nanos:t}}return{seconds:Se(e.seconds),nanos:Se(e.nanos)}}function Se(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function Te(e){return"string"==typeof e?we.fromBase64String(e):we.fromUint8Array(e)}function _e(e){var t,n;return"server_timestamp"===(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function je(e){var t=e.mapValue.fields.__previous_value__;return _e(t)?je(t):t}function Ie(e){var t=Oe(e.mapValue.fields.__local_write_time__.timestampValue);return new ge(t.seconds,t.nanos)}function xe(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?_e(e)?4:10:j()}function Ce(e,t){var n=xe(e);if(n!==xe(t))return!1;switch(n){case 0:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return Ie(e).isEqual(Ie(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;var n=Oe(e.timestampValue),r=Oe(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(e,t){return Te(e.bytesValue).isEqual(Te(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return Se(e.geoPointValue.latitude)===Se(t.geoPointValue.latitude)&&Se(e.geoPointValue.longitude)===Se(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return Se(e.integerValue)===Se(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){var n=Se(e.doubleValue),r=Se(t.doubleValue);return n===r?le(n)===le(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return ye(e.arrayValue.values||[],t.arrayValue.values||[],Ce);case 10:return function(e,t){var n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(be(n)!==be(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!Ce(n[i],r[i])))return!1;return!0}(e,t);default:return j()}}function Ne(e){return!!e&&"nullValue"in e}function Ae(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function De(e){return!!e&&"mapValue"in e}function Le(e){if(e.geoPointValue)return{geoPointValue:Object.assign({},e.geoPointValue)};if(e.timestampValue&&"object"==typeof e.timestampValue)return{timestampValue:Object.assign({},e.timestampValue)};if(e.mapValue){var t={mapValue:{fields:{}}};return ke(e.mapValue.fields,(function(e,n){return t.mapValue.fields[e]=Le(n)})),t}if(e.arrayValue){for(var n={arrayValue:{values:[]}},r=0;r<(e.arrayValue.values||[]).length;++r)n.arrayValue.values[r]=Le(e.arrayValue.values[r]);return n}return Object.assign({},e)}var Pe=function(){function e(t){Object(p.a)(this,e),this.value=t}return Object(v.a)(e,[{key:"field",value:function(e){if(e.isEmpty())return this.value;for(var t=this.value,n=0;n<e.length-1;++n)if(!De(t=(t.mapValue.fields||{})[e.get(n)]))return null;return(t=(t.mapValue.fields||{})[e.lastSegment()])||null}},{key:"set",value:function(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=Le(t)}},{key:"setAll",value:function(e){var t=this,n=ne.emptyPath(),r={},i=[];e.forEach((function(e,a){if(!n.isImmediateParentOf(a)){var o=t.getFieldsMap(n);t.applyChanges(o,r,i),r={},i=[],n=a.popLast()}e?r[a.lastSegment()]=Le(e):i.push(a.lastSegment())}));var a=this.getFieldsMap(n);this.applyChanges(a,r,i)}},{key:"delete",value:function(e){var t=this.field(e.popLast());De(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}},{key:"isEqual",value:function(e){return Ce(this.value,e.value)}},{key:"getFieldsMap",value:function(e){var t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(var n=0;n<e.length;++n){var r=t.mapValue.fields[e.get(n)];De(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},t.mapValue.fields[e.get(n)]=r),t=r}return t.mapValue.fields}},{key:"applyChanges",value:function(e,t,n){ke(t,(function(t,n){return e[t]=n}));var r,i=Object(o.a)(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;delete e[a]}}catch(u){i.e(u)}finally{i.f()}}},{key:"clone",value:function(){return new e(Le(this.value))}}],[{key:"empty",value:function(){return new e({mapValue:{}})}}]),e}(),Re=function(){function e(t,n,r,i,a){Object(p.a)(this,e),this.key=t,this.documentType=n,this.version=r,this.data=i,this.documentState=a}return Object(v.a)(e,[{key:"convertToFoundDocument",value:function(e,t){return this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}},{key:"convertToNoDocument",value:function(e){return this.version=e,this.documentType=2,this.data=Pe.empty(),this.documentState=0,this}},{key:"convertToUnknownDocument",value:function(e){return this.version=e,this.documentType=3,this.data=Pe.empty(),this.documentState=2,this}},{key:"setHasCommittedMutations",value:function(){return this.documentState=2,this}},{key:"setHasLocalMutations",value:function(){return this.documentState=1,this}},{key:"hasLocalMutations",get:function(){return 1===this.documentState}},{key:"hasCommittedMutations",get:function(){return 2===this.documentState}},{key:"hasPendingWrites",get:function(){return this.hasLocalMutations||this.hasCommittedMutations}},{key:"isValidDocument",value:function(){return 0!==this.documentType}},{key:"isFoundDocument",value:function(){return 1===this.documentType}},{key:"isNoDocument",value:function(){return 2===this.documentType}},{key:"isUnknownDocument",value:function(){return 3===this.documentType}},{key:"isEqual",value:function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.documentType===t.documentType&&this.documentState===t.documentState&&this.data.isEqual(t.data)}},{key:"clone",value:function(){return new e(this.key,this.documentType,this.version,this.data.clone(),this.documentState)}},{key:"toString",value:function(){return"Document(".concat(this.key,", ").concat(this.version,", ").concat(JSON.stringify(this.data.value),", {documentType: ").concat(this.documentType,"}), {documentState: ").concat(this.documentState,"})")}}],[{key:"newInvalidDocument",value:function(t){return new e(t,0,me.min(),Pe.empty(),0)}},{key:"newFoundDocument",value:function(t,n,r){return new e(t,1,n,r,0)}},{key:"newNoDocument",value:function(t,n){return new e(t,2,n,Pe.empty(),0)}},{key:"newUnknownDocument",value:function(t,n){return new e(t,3,n,Pe.empty(),2)}}]),e}(),Fe=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;Object(p.a)(this,e),this.path=t,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=a,this.startAt=o,this.endAt=u,this.P=null};function Me(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;return new Fe(e,t,n,r,i,a,o)}var Ve=function e(t,n){Object(p.a)(this,e),this.position=t,this.before=n},Ue=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";Object(p.a)(this,e),this.field=t,this.dir=n};var ze=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"F",u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;Object(p.a)(this,e),this.path=t,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=a,this.limitType=o,this.startAt=u,this.endAt=s,this.D=null,this.$=null,this.startAt,this.endAt};function Be(e){return!se(e.limit)&&"L"===e.limitType}function qe(e){return e.explicitOrderBy.length>0?e.explicitOrderBy[0].field:null}function He(e){var t,n=Object(o.a)(e.filters);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.N())return r.field}}catch(i){n.e(i)}finally{n.f()}return null}function Ke(e){var t=x(e);if(null===t.D){t.D=[];var n=He(t),r=qe(t);if(null!==n&&null===r)n.isKeyField()||t.D.push(new Ue(n)),t.D.push(new Ue(ne.keyField(),"asc"));else{var i,a=!1,u=Object(o.a)(t.explicitOrderBy);try{for(u.s();!(i=u.n()).done;){var s=i.value;t.D.push(s),s.field.isKeyField()&&(a=!0)}}catch(c){u.e(c)}finally{u.f()}if(!a){var l=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";t.D.push(new Ue(ne.keyField(),l))}}}return t.D}function Ge(e){var t=x(e);if(!t.$)if("F"===t.limitType)t.$=Me(t.path,t.collectionGroup,Ke(t),t.filters,t.limit,t.startAt,t.endAt);else{var n,r=[],i=Object(o.a)(Ke(t));try{for(i.s();!(n=i.n()).done;){var a=n.value,u="desc"===a.dir?"asc":"desc";r.push(new Ue(a.field,u))}}catch(c){i.e(c)}finally{i.f()}var s=t.endAt?new Ve(t.endAt.position,!t.endAt.before):null,l=t.startAt?new Ve(t.startAt.position,!t.startAt.before):null;t.$=Me(t.path,t.collectionGroup,r,t.filters,t.limit,s,l)}return t.$}var We={asc:"ASCENDING",desc:"DESCENDING"},Qe={"<":"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"},$e=function e(t,n){Object(p.a)(this,e),this.databaseId=t,this.F=n};function Ye(e){return I(!!e),me.fromTimestamp(function(e){var t=Oe(e);return new ge(t.seconds,t.nanos)}(e))}function Xe(e,t){return function(e){return new ee(["projects",e.projectId,"databases",e.database])}(e).child("documents").child(t).canonicalString()}function Je(e,t){var n,r=function(e){var t=ee.fromString(e);return I(at(t)),t}(t);if(r.get(1)!==e.databaseId.projectId)throw new K(D,"Tried to deserialize key from different project: "+r.get(1)+" vs "+e.databaseId.projectId);if(r.get(3)!==e.databaseId.database)throw new K(D,"Tried to deserialize key from different database: "+r.get(3)+" vs "+e.databaseId.database);return new re((I((n=r).length>4&&"documents"===n.get(4)),n.popFirst(5)))}function Ze(e,t){return Xe(e.databaseId,t)}function et(e,t){var n={structuredQuery:{}},r=t.path;null!==t.collectionGroup?(n.parent=Ze(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=Ze(e,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);var i=function(e){if(0!==e.length){var t=e.map((function(e){return function(e){if("=="===e.op){if(Ae(e.value))return{unaryFilter:{field:it(e.field),op:"IS_NAN"}};if(Ne(e.value))return{unaryFilter:{field:it(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(Ae(e.value))return{unaryFilter:{field:it(e.field),op:"IS_NOT_NAN"}};if(Ne(e.value))return{unaryFilter:{field:it(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:it(e.field),op:rt(e.op),value:e.value}}}(e)}));return 1===t.length?t[0]:{compositeFilter:{op:"AND",filters:t}}}}(t.filters);i&&(n.structuredQuery.where=i);var a=function(e){if(0!==e.length)return e.map((function(e){return function(e){return{field:it(e.field),direction:nt(e.dir)}}(e)}))}(t.orderBy);a&&(n.structuredQuery.orderBy=a);var o=function(e,t){return e.F||se(t)?t:{value:t}}(e,t.limit);return null!==o&&(n.structuredQuery.limit=o),t.startAt&&(n.structuredQuery.startAt=tt(t.startAt)),t.endAt&&(n.structuredQuery.endAt=tt(t.endAt)),n}function tt(e){return{before:e.before,values:e.position}}function nt(e){return We[e]}function rt(e){return Qe[e]}function it(e){return{fieldPath:e.canonicalString()}}function at(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}function ot(e){return new $e(e,!0)}var ut=function(e){Object(c.a)(n,e);var t=Object(f.a)(n);function n(e,r,i){var a;return Object(p.a)(this,n),(a=t.call(this)).credentials=e,a.Y=r,a.S=i,a.K=!1,a}return Object(v.a)(n,[{key:"J",value:function(){if(this.K)throw new K(V,"The client has already been terminated.")}},{key:"l",value:function(e,t,n){var r=this;return this.J(),this.credentials.getToken().then((function(i){return r.Y.l(e,t,n,i)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===F&&r.credentials.invalidateToken(),e):new K(A,e.toString())}))}},{key:"v",value:function(e,t,n){var r=this;return this.J(),this.credentials.getToken().then((function(i){return r.Y.v(e,t,n,i)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===F&&r.credentials.invalidateToken(),e):new K(A,e.toString())}))}},{key:"terminate",value:function(){this.K=!0}}]),n}(function(){return function e(){Object(p.a)(this,e)}}());function st(){return(st=Object(l.a)(s.a.mark((function e(t,n){var r,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=x(t),i=et(r.S,Ge(n)),e.next=3,r.v("RunQuery",i.parent,{structuredQuery:i.structuredQuery});case 3:return e.abrupt("return",e.sent.filter((function(e){return!!e.document})).map((function(e){return function(e,t,n){var r=Je(e,t.name),i=Ye(t.updateTime),a=new Pe({mapValue:{fields:t.fields}}),o=Re.newFoundDocument(r,i,a);return o}(r.S,e.document)})));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var lt=new Map;function ct(e){if(e._terminated)throw new K(V,"The client has already been terminated.");if(!lt.has(e)){O("ComponentProvider","Initializing Datastore");var t=function(e){return new pe(e,fetch.bind(null))}((i=e._databaseId,a=e.app.options.appId||"",o=e._persistenceKey,u=e._freezeSettings(),new X(i,a,o,u.host,u.ssl,u.experimentalForceLongPolling,u.experimentalAutoDetectLongPolling,u.useFetchStreams))),n=ot(e._databaseId),r=function(e,t,n){return new ut(e,t,n)}(e._credentials,t,n);lt.set(e,r)}var i,a,o,u;return lt.get(e)}var ft=function(){function e(t){var n;if(Object(p.a)(this,e),void 0===t.host){if(void 0!==t.ssl)throw new K(D,"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===(n=t.ssl)||void 0===n||n;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 K(D,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.useFetchStreams=!!t.useFetchStreams,function(e,t,n,r){if(!0===t&&!0===r)throw new K(D,"".concat("experimentalForceLongPolling"," and ").concat("experimentalAutoDetectLongPolling"," cannot be used together."))}(0,t.experimentalForceLongPolling,0,t.experimentalAutoDetectLongPolling)}return Object(v.a)(e,[{key:"isEqual",value:function(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}]),e}(),ht=function(){function e(t,n){Object(p.a)(this,e),this._credentials=n,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new ft({}),this._settingsFrozen=!1,t instanceof J?this._databaseId=t:(this._app=t,this._databaseId=function(e){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new K(D,'"projectId" not provided in firebase.initializeApp.');return new J(e.options.projectId)}(t))}return Object(v.a)(e,[{key:"app",get:function(){if(!this._app)throw new K(V,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}},{key:"_initialized",get:function(){return this._settingsFrozen}},{key:"_terminated",get:function(){return void 0!==this._terminateTask}},{key:"_setSettings",value:function(e){if(this._settingsFrozen)throw new K(V,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new ft(e),void 0!==e.credentials&&(this._credentials=function(e){if(!e)return new W;switch(e.type){case"gapi":var t=e.client;return I(!("object"!=typeof t||null===t||!t.auth||!t.auth.getAuthHeaderValueForFirstParty)),new Y(t,e.sessionIndex||"0",e.iamToken||null);case"provider":return e.client;default:throw new K(D,"makeCredentialsProvider failed due to invalid credential type")}}(e.credentials))}},{key:"_getSettings",value:function(){return this._settings}},{key:"_freezeSettings",value:function(){return this._settingsFrozen=!0,this._settings}},{key:"_delete",value:function(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}},{key:"toJSON",value:function(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}},{key:"_terminate",value:function(){return function(e){var t=lt.get(e);t&&(O("ComponentProvider","Removing Datastore"),lt.delete(e),t.terminate())}(this),Promise.resolve()}}]),e}();function dt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(y.e)();return Object(y.b)(e,"firestore/lite").getImmediate()}var pt=function(){function e(t,n,r){Object(p.a)(this,e),this.converter=n,this._key=r,this.type="document",this.firestore=t}return Object(v.a)(e,[{key:"_path",get:function(){return this._key.path}},{key:"id",get:function(){return this._key.path.lastSegment()}},{key:"path",get:function(){return this._key.path.canonicalString()}},{key:"parent",get:function(){return new yt(this.firestore,this.converter,this._key.path.popLast())}},{key:"withConverter",value:function(t){return new e(this.firestore,t,this._key)}}]),e}(),vt=function(){function e(t,n,r){Object(p.a)(this,e),this.converter=n,this._query=r,this.type="query",this.firestore=t}return Object(v.a)(e,[{key:"withConverter",value:function(t){return new e(this.firestore,t,this._query)}}]),e}(),yt=function(e){Object(c.a)(n,e);var t=Object(f.a)(n);function n(e,r,i){var a;return Object(p.a)(this,n),(a=t.call(this,e,r,new ze(i)))._path=i,a.type="collection",a}return Object(v.a)(n,[{key:"id",get:function(){return this._query.path.lastSegment()}},{key:"path",get:function(){return this._query.path.canonicalString()}},{key:"parent",get:function(){var e=this._path.popLast();return e.isEmpty()?null:new pt(this.firestore,null,new re(e))}},{key:"withConverter",value:function(e){return new n(this.firestore,e,this._path)}}]),n}(vt);function gt(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(e=Object(b.e)(e),ie("collection","path",t),e instanceof ht){var a=ee.fromString.apply(ee,[t].concat(r));return ae(a),new yt(e,null,a)}if(!(e instanceof pt||e instanceof yt))throw new K(D,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");var o=e._path.child(ee.fromString.apply(ee,[t].concat(r)));return ae(o),new yt(e.firestore,null,o)}var mt=function(){function e(){Object(p.a)(this,e);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0;i<n.length;++i)if(0===n[i].length)throw new K(D,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new ne(n)}return Object(v.a)(e,[{key:"isEqual",value:function(e){return this._internalPath.isEqual(e._internalPath)}}]),e}();var bt=function(){function e(t){Object(p.a)(this,e),this._byteString=t}return Object(v.a)(e,[{key:"toBase64",value:function(){return this._byteString.toBase64()}},{key:"toUint8Array",value:function(){return this._byteString.toUint8Array()}},{key:"toString",value:function(){return"Bytes(base64: "+this.toBase64()+")"}},{key:"isEqual",value:function(e){return this._byteString.isEqual(e._byteString)}}],[{key:"fromBase64String",value:function(t){try{return new e(we.fromBase64String(t))}catch(t){throw new K(D,"Failed to construct data from Base64 string: "+t)}}},{key:"fromUint8Array",value:function(t){return new e(we.fromUint8Array(t))}}]),e}(),kt=function(){function e(t,n){if(Object(p.a)(this,e),!isFinite(t)||t<-90||t>90)throw new K(D,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(n)||n<-180||n>180)throw new K(D,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=t,this._long=n}return Object(v.a)(e,[{key:"latitude",get:function(){return this._lat}},{key:"longitude",get:function(){return this._long}},{key:"isEqual",value:function(e){return this._lat===e._lat&&this._long===e._long}},{key:"toJSON",value:function(){return{latitude:this._lat,longitude:this._long}}},{key:"_compareTo",value:function(e){return ve(this._lat,e._lat)||ve(this._long,e._long)}}]),e}();var wt=new RegExp("[~\\*/\\[\\]]");function Et(e,t,n){if(t.search(wt)>=0)throw Ot("Invalid field path (".concat(t,"). Paths must not contain '~', '*', '/', '[', or ']'"),e,!1,void 0,n);try{return Object(a.a)(mt,Object(d.a)(t.split(".")))._internalPath}catch(r){throw Ot("Invalid field path (".concat(t,"). Paths must not be empty, begin with '.', end with '.', or contain '..'"),e,!1,void 0,n)}}function Ot(e,t,n,r,i){var a=r&&!r.isEmpty(),o=void 0!==i,u="Function ".concat(t,"() called with invalid data");n&&(u+=" (via `toFirestore()`)"),u+=". ";var s="";return(a||o)&&(s+=" (found",a&&(s+=" in field ".concat(r)),o&&(s+=" in document ".concat(i)),s+=")"),new K(D,u+e+s)}var St=function(){function e(t,n,r,i,a){Object(p.a)(this,e),this._firestore=t,this._userDataWriter=n,this._key=r,this._document=i,this._converter=a}return Object(v.a)(e,[{key:"id",get:function(){return this._key.path.lastSegment()}},{key:"ref",get:function(){return new pt(this._firestore,this._converter,this._key)}},{key:"exists",value:function(){return null!==this._document}},{key:"data",value:function(){if(this._document){if(this._converter){var e=new Tt(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}},{key:"get",value:function(e){if(this._document){var t=this._document.data.field(jt("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}]),e}(),Tt=function(e){Object(c.a)(n,e);var t=Object(f.a)(n);function n(){return Object(p.a)(this,n),t.apply(this,arguments)}return Object(v.a)(n,[{key:"data",value:function(){return Object(r.a)(Object(i.a)(n.prototype),"data",this).call(this)}}]),n}(St),_t=function(){function e(t,n){Object(p.a)(this,e),this._docs=n,this.query=t}return Object(v.a)(e,[{key:"docs",get:function(){return Object(d.a)(this._docs)}},{key:"size",get:function(){return this.docs.length}},{key:"empty",get:function(){return 0===this.docs.length}},{key:"forEach",value:function(e,t){this._docs.forEach(e,t)}}]),e}();function jt(e,t){return"string"==typeof t?Et(e,t):t instanceof mt?t._internalPath:t._delegate._internalPath}var It=function(e){Object(c.a)(n,e);var t=Object(f.a)(n);function n(e){var r;return Object(p.a)(this,n),(r=t.call(this)).firestore=e,r}return Object(v.a)(n,[{key:"convertBytes",value:function(e){return new bt(e)}},{key:"convertReference",value:function(e){var t=this.convertDocumentKey(e,this.firestore._databaseId);return new pt(this.firestore,null,t)}}]),n}(function(){function e(){Object(p.a)(this,e)}return Object(v.a)(e,[{key:"convertValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";switch(xe(e)){case 0:return null;case 1:return e.booleanValue;case 2:return Se(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(Te(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 10:return this.convertObject(e.mapValue,t);default:throw j()}}},{key:"convertObject",value:function(e,t){var n=this,r={};return ke(e.fields,(function(e,i){r[e]=n.convertValue(i,t)})),r}},{key:"convertGeoPoint",value:function(e){return new kt(Se(e.latitude),Se(e.longitude))}},{key:"convertArray",value:function(e,t){var n=this;return(e.values||[]).map((function(e){return n.convertValue(e,t)}))}},{key:"convertServerTimestamp",value:function(e,t){switch(t){case"previous":var n=je(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(Ie(e));default:return null}}},{key:"convertTimestamp",value:function(e){var t=Oe(e);return new ge(t.seconds,t.nanos)}},{key:"convertDocumentKey",value:function(e,t){var n=ee.fromString(e);I(at(n));var r=new J(n.get(1),n.get(3)),i=new re(n.popFirst(5));return r.isEqual(t)||S("Document ".concat(i," contains a document reference within a different database (").concat(r.projectId,"/").concat(r.database,") which is not supported. It will be treated as a reference in the current database (").concat(t.projectId,"/").concat(t.database,") instead.")),i}}]),e}());function xt(e){!function(e){if(Be(e)&&0===e.explicitOrderBy.length)throw new K(B,"limitToLast() queries require specifying at least one orderBy() clause")}((e=ue(e,vt))._query);var t=ct(e.firestore),n=new It(e.firestore);return function(e,t){return st.apply(this,arguments)}(t,e._query).then((function(t){var r=t.map((function(t){return new Tt(e.firestore,n,t.key,t,e.converter)}));return Be(e._query)&&r.reverse(),new _t(e,r)}))}var Ct;Ct="".concat(y.a,"_lite"),w=Ct,Object(y.c)(new g.a("firestore/lite",(function(e,t){var n=t.options,r=e.getProvider("app").getImmediate(),i=new ht(r,new Q(e.getProvider("auth-internal")));return n&&i._setSettings(n),i}),"PUBLIC")),Object(y.g)("firestore-lite","3.1.0","node")},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(13);function i(e,t,n){return i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}(e,t);if(i){var a=Object.getOwnPropertyDescriptor(i,t);return a.get?a.get.call(n):a.value}},i(e,t,n||e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return h}));function r(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{s(r.next(e))}catch(t){a(t)}}function u(e){try{s(r.throw(e))}catch(t){a(t)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,u)}s((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(u){a=[6,u],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}Object.create;function a(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function u(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;var s=n(8),l=function(){function e(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return e.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},e.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},e.prototype.setServiceProps=function(e){return this.serviceProps=e,this},e.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},e}(),c="[DEFAULT]",f=function(){function e(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}return e.prototype.get=function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new s.a;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{var r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch(i){}}return this.instancesDeferred.get(t).promise},e.prototype.getImmediate=function(e){var t,n=this.normalizeInstanceIdentifier(null===e||void 0===e?void 0:e.identifier),r=null!==(t=null===e||void 0===e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error("Service "+this.name+" is not available")}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(i){if(r)return null;throw i}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(e){var t,n;if(e.name!==this.name)throw Error("Mismatching Component "+e.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:c})}catch(d){}try{for(var r=a(this.instancesDeferred.entries()),i=r.next();!i.done;i=r.next()){var u=o(i.value,2),s=u[0],l=u[1],f=this.normalizeInstanceIdentifier(s);try{var h=this.getOrInitializeService({instanceIdentifier:f});l.resolve(h)}catch(d){}}}catch(p){t={error:p}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}}},e.prototype.clearInstance=function(e){void 0===e&&(e=c),this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(u(u([],o(e.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()})))),o(e.filter((function(e){return"_delete"in e})).map((function(e){return e._delete()})))))];case 1:return t.sent(),[2]}}))}))},e.prototype.isComponentSet=function(){return null!=this.component},e.prototype.isInitialized=function(e){return void 0===e&&(e=c),this.instances.has(e)},e.prototype.getOptions=function(e){return void 0===e&&(e=c),this.instancesOptions.get(e)||{}},e.prototype.initialize=function(e){var t,n;void 0===e&&(e={});var r=e.options,i=void 0===r?{}:r,u=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(u))throw Error(this.name+"("+u+") has already been initialized");if(!this.isComponentSet())throw Error("Component "+this.name+" has not been registered yet");var s=this.getOrInitializeService({instanceIdentifier:u,options:i});try{for(var l=a(this.instancesDeferred.entries()),c=l.next();!c.done;c=l.next()){var f=o(c.value,2),h=f[0],d=f[1];u===this.normalizeInstanceIdentifier(h)&&d.resolve(s)}}catch(p){t={error:p}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return s},e.prototype.onInit=function(e,t){var n,r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);var a=this.instances.get(r);return a&&e(a,r),function(){i.delete(e)}},e.prototype.invokeOnInitCallbacks=function(e,t){var n,r,i=this.onInitCallbacks.get(t);if(i)try{for(var o=a(i),u=o.next();!u.done;u=o.next()){var s=u.value;try{s(e,t)}catch(l){}}}catch(c){n={error:c}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.getOrInitializeService=function(e){var t,n=e.instanceIdentifier,r=e.options,i=void 0===r?{}:r,a=this.instances.get(n);if(!a&&this.component&&(a=this.component.instanceFactory(this.container,{instanceIdentifier:(t=n,t===c?void 0:t),options:i}),this.instances.set(n,a),this.instancesOptions.set(n,i),this.invokeOnInitCallbacks(a,n),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,n,a)}catch(o){}return a||null},e.prototype.normalizeInstanceIdentifier=function(e){return void 0===e&&(e=c),this.component?this.component.multipleInstances?e:c:e},e.prototype.shouldAutoInitialize=function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode},e}();var h=function(){function e(e){this.name=e,this.providers=new Map}return e.prototype.addComponent=function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component "+e.name+" has already been registered with "+this.name);t.setComponent(e)},e.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},e.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new f(e,this);return this.providers.set(e,t),t},e.prototype.getProviders=function(){return Array.from(this.providers.values())},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(24);function i(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(21),i=n(26);function a(e,t,n){return a=Object(i.a)()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var a=new(Function.bind.apply(e,i));return n&&Object(r.a)(a,n.prototype),a},a.apply(null,arguments)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(13),i=n(21);var a=n(22);function o(e){var t="function"===typeof Map?new Map:void 0;return o=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return Object(a.a)(e,arguments,Object(r.a)(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Object(i.a)(o,e)},o(e)}},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){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(e){return!1}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return Ra})),n.d(t,"b",(function(){return ao})),n.d(t,"c",(function(){return Va}));var r=n(22),i=n(18),a=n(13),o=n(11),u=n(4),s=n(1),l=n.n(s),c=n(3),f=n(5),h=n(6),d=n(23),p=n(14),v=n(0),y=n(2),g=n(12),m=n(19),b=n(15),k=n(8),w=n(16),E=function(){function e(t){Object(v.a)(this,e),this.uid=t}return Object(y.a)(e,[{key:"isAuthenticated",value:function(){return null!=this.uid}},{key:"toKey",value:function(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}},{key:"isEqual",value:function(e){return e.uid===this.uid}}]),e}();E.UNAUTHENTICATED=new E(null),E.GOOGLE_CREDENTIALS=new E("google-credentials-uid"),E.FIRST_PARTY=new E("first-party-uid"),E.MOCK_USER=new E("mock-user");var O="9.1.0",S=new b.b("@firebase/firestore");function T(){return S.logLevel}function _(e){if(S.logLevel<=b.a.DEBUG){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(x);S.debug.apply(S,["Firestore (".concat(O,"): ").concat(e)].concat(Object(p.a)(i)))}}function j(e){if(S.logLevel<=b.a.ERROR){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(x);S.error.apply(S,["Firestore (".concat(O,"): ").concat(e)].concat(Object(p.a)(i)))}}function I(e){if(S.logLevel<=b.a.WARN){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n.map(x);S.warn.apply(S,["Firestore (".concat(O,"): ").concat(e)].concat(Object(p.a)(i)))}}function x(e){if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(t){return e}var t}function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unexpected state",t="FIRESTORE (".concat(O,") INTERNAL ASSERTION FAILED: ")+e;throw j(t),new Error(t)}function N(e,t){e||C()}function A(e,t){return e}var D={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"},L=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(v.a)(this,n),(i=t.call(this,r)).code=e,i.message=r,i.name="FirebaseError",i.toString=function(){return"".concat(i.name,": [code=").concat(i.code,"]: ").concat(i.message)},i}return n}(Object(d.a)(Error)),P=function e(){var t=this;Object(v.a)(this,e),this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},R=function e(t,n){Object(v.a)(this,e),this.user=n,this.type="OAuth",this.authHeaders={},this.authHeaders.Authorization="Bearer ".concat(t)},F=function(){function e(){Object(v.a)(this,e)}return Object(y.a)(e,[{key:"getToken",value:function(){return Promise.resolve(null)}},{key:"invalidateToken",value:function(){}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(E.UNAUTHENTICATED)}))}},{key:"shutdown",value:function(){}}]),e}(),M=function(){function e(t){Object(v.a)(this,e),this.t=t,this.currentUser=E.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}return Object(y.a)(e,[{key:"start",value:function(e,t){var n=this,r=this.i,i=function(e){return n.i!==r?(r=n.i,t(e)):Promise.resolve()},a=new P;this.o=function(){n.i++,n.currentUser=n.u(),a.resolve(),a=new P,e.enqueueRetryable((function(){return i(n.currentUser)}))};var o=function(){var t=a;e.enqueueRetryable(Object(c.a)(l.a.mark((function e(){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.promise;case 2:return e.next=4,i(n.currentUser);case 4:case"end":return e.stop()}}),e)}))))},u=function(e){_("FirebaseCredentialsProvider","Auth detected"),n.auth=e,n.auth.addAuthTokenListener(n.o),o()};this.t.onInit((function(e){return u(e)})),setTimeout((function(){if(!n.auth){var e=n.t.getImmediate({optional:!0});e?u(e):(_("FirebaseCredentialsProvider","Auth not yet detected"),a.resolve(),a=new P)}}),0),o()}},{key:"getToken",value:function(){var e=this,t=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((function(n){return e.i!==t?(_("FirebaseCredentialsProvider","getToken aborted due to token change."),e.getToken()):n?(N("string"==typeof n.accessToken),new R(n.accessToken,e.currentUser)):null})):Promise.resolve(null)}},{key:"invalidateToken",value:function(){this.forceRefresh=!0}},{key:"shutdown",value:function(){this.auth&&this.auth.removeAuthTokenListener(this.o)}},{key:"u",value:function(){var e=this.auth&&this.auth.getUid();return N(null===e||"string"==typeof e),new E(e)}}]),e}(),V=function(){function e(t,n,r){Object(v.a)(this,e),this.h=t,this.l=n,this.m=r,this.type="FirstParty",this.user=E.FIRST_PARTY}return Object(y.a)(e,[{key:"authHeaders",get:function(){var e={"X-Goog-AuthUser":this.l},t=this.h.auth.getAuthHeaderValueForFirstParty([]);return t&&(e.Authorization=t),this.m&&(e["X-Goog-Iam-Authorization-Token"]=this.m),e}}]),e}(),U=function(){function e(t,n,r){Object(v.a)(this,e),this.h=t,this.l=n,this.m=r}return Object(y.a)(e,[{key:"getToken",value:function(){return Promise.resolve(new V(this.h,this.l,this.m))}},{key:"start",value:function(e,t){e.enqueueRetryable((function(){return t(E.FIRST_PARTY)}))}},{key:"shutdown",value:function(){}},{key:"invalidateToken",value:function(){}}]),e}(),z=function(){function e(t,n){var r=this;Object(v.a)(this,e),this.previousValue=t,n&&(n.sequenceNumberHandler=function(e){return r.g(e)},this.p=function(e){return n.writeSequenceNumber(e)})}return Object(y.a)(e,[{key:"g",value:function(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}},{key:"next",value:function(){var e=++this.previousValue;return this.p&&this.p(e),e}}]),e}();function B(e){var t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(var r=0;r<e;r++)n[r]=Math.floor(256*Math.random());return n}z.T=-1;var q=function(){function e(){Object(v.a)(this,e)}return Object(y.a)(e,null,[{key:"I",value:function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length,n="";n.length<20;)for(var r=B(40),i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%e.length));return n}}]),e}();function H(e,t){return e<t?-1:e>t?1:0}function K(e,t,n){return e.length===t.length&&e.every((function(e,r){return n(e,t[r])}))}var G=function(){function e(t,n){if(Object(v.a)(this,e),this.seconds=t,this.nanoseconds=n,n<0)throw new L(D.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new L(D.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(t<-62135596800)throw new L(D.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new L(D.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return Object(y.a)(e,[{key:"toDate",value:function(){return new Date(this.toMillis())}},{key:"toMillis",value:function(){return 1e3*this.seconds+this.nanoseconds/1e6}},{key:"_compareTo",value:function(e){return this.seconds===e.seconds?H(this.nanoseconds,e.nanoseconds):H(this.seconds,e.seconds)}},{key:"isEqual",value:function(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}},{key:"toString",value:function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}},{key:"toJSON",value:function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}},{key:"valueOf",value:function(){var e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}],[{key:"now",value:function(){return e.fromMillis(Date.now())}},{key:"fromDate",value:function(t){return e.fromMillis(t.getTime())}},{key:"fromMillis",value:function(t){var n=Math.floor(t/1e3);return new e(n,Math.floor(1e6*(t-1e3*n)))}}]),e}(),W=function(){function e(t){Object(v.a)(this,e),this.timestamp=t}return Object(y.a)(e,[{key:"compareTo",value:function(e){return this.timestamp._compareTo(e.timestamp)}},{key:"isEqual",value:function(e){return this.timestamp.isEqual(e.timestamp)}},{key:"toMicroseconds",value:function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}},{key:"toString",value:function(){return"SnapshotVersion("+this.timestamp.toString()+")"}},{key:"toTimestamp",value:function(){return this.timestamp}}],[{key:"fromTimestamp",value:function(t){return new e(t)}},{key:"min",value:function(){return new e(new G(0,0))}}]),e}();function Q(e){var t=0;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function $(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function Y(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}var X=function(){function e(t,n,r){Object(v.a)(this,e),void 0===n?n=0:n>t.length&&C(),void 0===r?r=t.length-n:r>t.length-n&&C(),this.segments=t,this.offset=n,this.len=r}return Object(y.a)(e,[{key:"length",get:function(){return this.len}},{key:"isEqual",value:function(t){return 0===e.comparator(this,t)}},{key:"child",value:function(t){var n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach((function(e){n.push(e)})):n.push(t),this.construct(n)}},{key:"limit",value:function(){return this.offset+this.length}},{key:"popFirst",value:function(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}},{key:"popLast",value:function(){return this.construct(this.segments,this.offset,this.length-1)}},{key:"firstSegment",value:function(){return this.segments[this.offset]}},{key:"lastSegment",value:function(){return this.get(this.length-1)}},{key:"get",value:function(e){return this.segments[this.offset+e]}},{key:"isEmpty",value:function(){return 0===this.length}},{key:"isPrefixOf",value:function(e){if(e.length<this.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}},{key:"isImmediateParentOf",value:function(e){if(this.length+1!==e.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}},{key:"forEach",value:function(e){for(var t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])}},{key:"toArray",value:function(){return this.segments.slice(this.offset,this.limit())}}],[{key:"comparator",value:function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=e.get(r),a=t.get(r);if(i<a)return-1;if(i>a)return 1}return e.length<t.length?-1:e.length>t.length?1:0}}]),e}(),J=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return Object(y.a)(n,[{key:"construct",value:function(e,t,r){return new n(e,t,r)}},{key:"canonicalString",value:function(){return this.toArray().join("/")}},{key:"toString",value:function(){return this.canonicalString()}}],[{key:"fromString",value:function(){for(var e=[],t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];for(var a=0,o=r;a<o.length;a++){var u=o[a];if(u.indexOf("//")>=0)throw new L(D.INVALID_ARGUMENT,"Invalid segment (".concat(u,"). Paths must not contain // in them."));e.push.apply(e,Object(p.a)(u.split("/").filter((function(e){return e.length>0}))))}return new n(e)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(X),Z=/^[_a-zA-Z][_a-zA-Z0-9]*$/,ee=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return Object(y.a)(n,[{key:"construct",value:function(e,t,r){return new n(e,t,r)}},{key:"canonicalString",value:function(){return this.toArray().map((function(e){return e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),n.isValidIdentifier(e)||(e="`"+e+"`"),e})).join(".")}},{key:"toString",value:function(){return this.canonicalString()}},{key:"isKeyField",value:function(){return 1===this.length&&"__name__"===this.get(0)}}],[{key:"isValidIdentifier",value:function(e){return Z.test(e)}},{key:"keyField",value:function(){return new n(["__name__"])}},{key:"fromServerFormat",value:function(e){for(var t=[],r="",i=0,a=function(){if(0===r.length)throw new L(D.INVALID_ARGUMENT,"Invalid field path (".concat(e,"). Paths must not be empty, begin with '.', end with '.', or contain '..'"));t.push(r),r=""},o=!1;i<e.length;){var u=e[i];if("\\"===u){if(i+1===e.length)throw new L(D.INVALID_ARGUMENT,"Path has trailing escape character: "+e);var s=e[i+1];if("\\"!==s&&"."!==s&&"`"!==s)throw new L(D.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=s,i+=2}else"`"===u?(o=!o,i++):"."!==u||o?(r+=u,i++):(a(),i++)}if(a(),o)throw new L(D.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new n(t)}},{key:"emptyPath",value:function(){return new n([])}}]),n}(X);var te=function(){function e(t){Object(v.a)(this,e),this.binaryString=t}return Object(y.a)(e,[{key:"toBase64",value:function(){return e=this.binaryString,btoa(e);var e}},{key:"toUint8Array",value:function(){return function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.binaryString)}},{key:"approximateByteSize",value:function(){return 2*this.binaryString.length}},{key:"compareTo",value:function(e){return H(this.binaryString,e.binaryString)}},{key:"isEqual",value:function(e){return this.binaryString===e.binaryString}}],[{key:"fromBase64String",value:function(t){return new e(atob(t))}},{key:"fromUint8Array",value:function(t){var n=function(e){for(var t="",n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(t);return new e(n)}}]),e}();te.EMPTY_BYTE_STRING=new te("");var ne=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function re(e){if(N(!!e),"string"==typeof e){var t=0,n=ne.exec(e);if(N(!!n),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),t=Number(r)}var i=new Date(e);return{seconds:Math.floor(i.getTime()/1e3),nanos:t}}return{seconds:ie(e.seconds),nanos:ie(e.nanos)}}function ie(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function ae(e){return"string"==typeof e?te.fromBase64String(e):te.fromUint8Array(e)}function oe(e){var t,n;return"server_timestamp"===(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function ue(e){var t=e.mapValue.fields.__previous_value__;return oe(t)?ue(t):t}function se(e){var t=re(e.mapValue.fields.__local_write_time__.timestampValue);return new G(t.seconds,t.nanos)}function le(e){return null==e}function ce(e){return 0===e&&1/e==-1/0}var fe=function(){function e(t){Object(v.a)(this,e),this.path=t}return Object(y.a)(e,[{key:"hasCollectionId",value:function(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}},{key:"isEqual",value:function(e){return null!==e&&0===J.comparator(this.path,e.path)}},{key:"toString",value:function(){return this.path.toString()}}],[{key:"fromPath",value:function(t){return new e(J.fromString(t))}},{key:"fromName",value:function(t){return new e(J.fromString(t).popFirst(5))}},{key:"comparator",value:function(e,t){return J.comparator(e.path,t.path)}},{key:"isDocumentKey",value:function(e){return e.length%2==0}},{key:"fromSegments",value:function(t){return new e(new J(t.slice()))}}]),e}();function he(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?oe(e)?4:10:C()}function de(e,t){var n=he(e);if(n!==he(t))return!1;switch(n){case 0:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return se(e).isEqual(se(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;var n=re(e.timestampValue),r=re(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(e,t){return ae(e.bytesValue).isEqual(ae(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return ie(e.geoPointValue.latitude)===ie(t.geoPointValue.latitude)&&ie(e.geoPointValue.longitude)===ie(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return ie(e.integerValue)===ie(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){var n=ie(e.doubleValue),r=ie(t.doubleValue);return n===r?ce(n)===ce(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return K(e.arrayValue.values||[],t.arrayValue.values||[],de);case 10:return function(e,t){var n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(Q(n)!==Q(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!de(n[i],r[i])))return!1;return!0}(e,t);default:return C()}}function pe(e,t){return void 0!==(e.values||[]).find((function(e){return de(e,t)}))}function ve(e,t){var n=he(e),r=he(t);if(n!==r)return H(n,r);switch(n){case 0:return 0;case 1:return H(e.booleanValue,t.booleanValue);case 2:return function(e,t){var n=ie(e.integerValue||e.doubleValue),r=ie(t.integerValue||t.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return ye(e.timestampValue,t.timestampValue);case 4:return ye(se(e),se(t));case 5:return H(e.stringValue,t.stringValue);case 6:return function(e,t){var n=ae(e),r=ae(t);return n.compareTo(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){for(var n=e.split("/"),r=t.split("/"),i=0;i<n.length&&i<r.length;i++){var a=H(n[i],r[i]);if(0!==a)return a}return H(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){var n=H(ie(e.latitude),ie(t.latitude));return 0!==n?n:H(ie(e.longitude),ie(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return function(e,t){for(var n=e.values||[],r=t.values||[],i=0;i<n.length&&i<r.length;++i){var a=ve(n[i],r[i]);if(a)return a}return H(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){var n=e.fields||{},r=Object.keys(n),i=t.fields||{},a=Object.keys(i);r.sort(),a.sort();for(var o=0;o<r.length&&o<a.length;++o){var u=H(r[o],a[o]);if(0!==u)return u;var s=ve(n[r[o]],i[a[o]]);if(0!==s)return s}return H(r.length,a.length)}(e.mapValue,t.mapValue);default:throw C()}}function ye(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return H(e,t);var n=re(e),r=re(t),i=H(n.seconds,r.seconds);return 0!==i?i:H(n.nanos,r.nanos)}function ge(e){return me(e)}function me(e){return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(e){var t=re(e);return"time(".concat(t.seconds,",").concat(t.nanos,")")}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?ae(e.bytesValue).toBase64():"referenceValue"in e?(n=e.referenceValue,fe.fromName(n).toString()):"geoPointValue"in e?"geo(".concat((t=e.geoPointValue).latitude,",").concat(t.longitude,")"):"arrayValue"in e?function(e){var t,n="[",r=!0,i=Object(u.a)(e.values||[]);try{for(i.s();!(t=i.n()).done;){var a=t.value;r?r=!1:n+=",",n+=me(a)}}catch(o){i.e(o)}finally{i.f()}return n+"]"}(e.arrayValue):"mapValue"in e?function(e){var t,n=Object.keys(e.fields||{}).sort(),r="{",i=!0,a=Object(u.a)(n);try{for(a.s();!(t=a.n()).done;){var o=t.value;i?i=!1:r+=",",r+="".concat(o,":").concat(me(e.fields[o]))}}catch(s){a.e(s)}finally{a.f()}return r+"}"}(e.mapValue):C();var t,n}function be(e){return!!e&&"integerValue"in e}function ke(e){return!!e&&"arrayValue"in e}function we(e){return!!e&&"nullValue"in e}function Ee(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function Oe(e){return!!e&&"mapValue"in e}function Se(e){if(e.geoPointValue)return{geoPointValue:Object.assign({},e.geoPointValue)};if(e.timestampValue&&"object"==typeof e.timestampValue)return{timestampValue:Object.assign({},e.timestampValue)};if(e.mapValue){var t={mapValue:{fields:{}}};return $(e.mapValue.fields,(function(e,n){return t.mapValue.fields[e]=Se(n)})),t}if(e.arrayValue){for(var n={arrayValue:{values:[]}},r=0;r<(e.arrayValue.values||[]).length;++r)n.arrayValue.values[r]=Se(e.arrayValue.values[r]);return n}return Object.assign({},e)}var Te=function(){function e(t){Object(v.a)(this,e),this.value=t}return Object(y.a)(e,[{key:"field",value:function(e){if(e.isEmpty())return this.value;for(var t=this.value,n=0;n<e.length-1;++n)if(!Oe(t=(t.mapValue.fields||{})[e.get(n)]))return null;return(t=(t.mapValue.fields||{})[e.lastSegment()])||null}},{key:"set",value:function(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=Se(t)}},{key:"setAll",value:function(e){var t=this,n=ee.emptyPath(),r={},i=[];e.forEach((function(e,a){if(!n.isImmediateParentOf(a)){var o=t.getFieldsMap(n);t.applyChanges(o,r,i),r={},i=[],n=a.popLast()}e?r[a.lastSegment()]=Se(e):i.push(a.lastSegment())}));var a=this.getFieldsMap(n);this.applyChanges(a,r,i)}},{key:"delete",value:function(e){var t=this.field(e.popLast());Oe(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}},{key:"isEqual",value:function(e){return de(this.value,e.value)}},{key:"getFieldsMap",value:function(e){var t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(var n=0;n<e.length;++n){var r=t.mapValue.fields[e.get(n)];Oe(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},t.mapValue.fields[e.get(n)]=r),t=r}return t.mapValue.fields}},{key:"applyChanges",value:function(e,t,n){$(t,(function(t,n){return e[t]=n}));var r,i=Object(u.a)(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;delete e[a]}}catch(o){i.e(o)}finally{i.f()}}},{key:"clone",value:function(){return new e(Se(this.value))}}],[{key:"empty",value:function(){return new e({mapValue:{}})}}]),e}();var _e=function(){function e(t,n,r,i,a){Object(v.a)(this,e),this.key=t,this.documentType=n,this.version=r,this.data=i,this.documentState=a}return Object(y.a)(e,[{key:"convertToFoundDocument",value:function(e,t){return this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}},{key:"convertToNoDocument",value:function(e){return this.version=e,this.documentType=2,this.data=Te.empty(),this.documentState=0,this}},{key:"convertToUnknownDocument",value:function(e){return this.version=e,this.documentType=3,this.data=Te.empty(),this.documentState=2,this}},{key:"setHasCommittedMutations",value:function(){return this.documentState=2,this}},{key:"setHasLocalMutations",value:function(){return this.documentState=1,this}},{key:"hasLocalMutations",get:function(){return 1===this.documentState}},{key:"hasCommittedMutations",get:function(){return 2===this.documentState}},{key:"hasPendingWrites",get:function(){return this.hasLocalMutations||this.hasCommittedMutations}},{key:"isValidDocument",value:function(){return 0!==this.documentType}},{key:"isFoundDocument",value:function(){return 1===this.documentType}},{key:"isNoDocument",value:function(){return 2===this.documentType}},{key:"isUnknownDocument",value:function(){return 3===this.documentType}},{key:"isEqual",value:function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.documentType===t.documentType&&this.documentState===t.documentState&&this.data.isEqual(t.data)}},{key:"clone",value:function(){return new e(this.key,this.documentType,this.version,this.data.clone(),this.documentState)}},{key:"toString",value:function(){return"Document(".concat(this.key,", ").concat(this.version,", ").concat(JSON.stringify(this.data.value),", {documentType: ").concat(this.documentType,"}), {documentState: ").concat(this.documentState,"})")}}],[{key:"newInvalidDocument",value:function(t){return new e(t,0,W.min(),Te.empty(),0)}},{key:"newFoundDocument",value:function(t,n,r){return new e(t,1,n,r,0)}},{key:"newNoDocument",value:function(t,n){return new e(t,2,n,Te.empty(),0)}},{key:"newUnknownDocument",value:function(t,n){return new e(t,3,n,Te.empty(),2)}}]),e}(),je=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;Object(v.a)(this,e),this.path=t,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=a,this.startAt=o,this.endAt=u,this.A=null};function Ie(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;return new je(e,t,n,r,i,a,o)}function xe(e){var t=A(e);if(null===t.A){var n=t.path.canonicalString();null!==t.collectionGroup&&(n+="|cg:"+t.collectionGroup),n+="|f:",n+=t.filters.map((function(e){return function(e){return e.field.canonicalString()+e.op.toString()+ge(e.value)}(e)})).join(","),n+="|ob:",n+=t.orderBy.map((function(e){return function(e){return e.field.canonicalString()+e.dir}(e)})).join(","),le(t.limit)||(n+="|l:",n+=t.limit),t.startAt&&(n+="|lb:",n+=Be(t.startAt)),t.endAt&&(n+="|ub:",n+=Be(t.endAt)),t.A=n}return t.A}function Ce(e,t){if(e.limit!==t.limit)return!1;if(e.orderBy.length!==t.orderBy.length)return!1;for(var n=0;n<e.orderBy.length;n++)if(!He(e.orderBy[n],t.orderBy[n]))return!1;if(e.filters.length!==t.filters.length)return!1;for(var r=0;r<e.filters.length;r++)if(i=e.filters[r],a=t.filters[r],i.op!==a.op||!i.field.isEqual(a.field)||!de(i.value,a.value))return!1;var i,a;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!Ge(e.startAt,t.startAt)&&Ge(e.endAt,t.endAt)}function Ne(e){return fe.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}var Ae=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i){var a;return Object(v.a)(this,n),(a=t.call(this)).field=e,a.op=r,a.value=i,a}return Object(y.a)(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return"!="===this.op?null!==t&&this.P(ve(t,this.value)):null!==t&&he(this.value)===he(t)&&this.P(ve(t,this.value))}},{key:"P",value:function(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return C()}}},{key:"v",value:function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}}],[{key:"create",value:function(e,t,r){return e.isKeyField()?"in"===t||"not-in"===t?this.R(e,t,r):new De(e,t,r):"array-contains"===t?new Fe(e,r):"in"===t?new Me(e,r):"not-in"===t?new Ve(e,r):"array-contains-any"===t?new Ue(e,r):new n(e,t,r)}},{key:"R",value:function(e,t,n){return"in"===t?new Le(e,n):new Pe(e,n)}}]),n}(function(){return function e(){Object(v.a)(this,e)}}());var De=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i){var a;return Object(v.a)(this,n),(a=t.call(this,e,r,i)).key=fe.fromName(i.referenceValue),a}return Object(y.a)(n,[{key:"matches",value:function(e){var t=fe.comparator(e.key,this.key);return this.P(t)}}]),n}(Ae),Le=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(v.a)(this,n),(i=t.call(this,e,"in",r)).keys=Re("in",r),i}return Object(y.a)(n,[{key:"matches",value:function(e){return this.keys.some((function(t){return t.isEqual(e.key)}))}}]),n}(Ae),Pe=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(v.a)(this,n),(i=t.call(this,e,"not-in",r)).keys=Re("not-in",r),i}return Object(y.a)(n,[{key:"matches",value:function(e){return!this.keys.some((function(t){return t.isEqual(e.key)}))}}]),n}(Ae);function Re(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map((function(e){return fe.fromName(e.referenceValue)}))}var Fe=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){return Object(v.a)(this,n),t.call(this,e,"array-contains",r)}return Object(y.a)(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return ke(t)&&pe(t.arrayValue,this.value)}}]),n}(Ae),Me=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){return Object(v.a)(this,n),t.call(this,e,"in",r)}return Object(y.a)(n,[{key:"matches",value:function(e){var t=e.data.field(this.field);return null!==t&&pe(this.value.arrayValue,t)}}]),n}(Ae),Ve=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){return Object(v.a)(this,n),t.call(this,e,"not-in",r)}return Object(y.a)(n,[{key:"matches",value:function(e){if(pe(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var t=e.data.field(this.field);return null!==t&&!pe(this.value.arrayValue,t)}}]),n}(Ae),Ue=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){return Object(v.a)(this,n),t.call(this,e,"array-contains-any",r)}return Object(y.a)(n,[{key:"matches",value:function(e){var t=this,n=e.data.field(this.field);return!(!ke(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(e){return pe(t.value.arrayValue,e)}))}}]),n}(Ae),ze=function e(t,n){Object(v.a)(this,e),this.position=t,this.before=n};function Be(e){return"".concat(e.before?"b":"a",":").concat(e.position.map((function(e){return ge(e)})).join(","))}var qe=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";Object(v.a)(this,e),this.field=t,this.dir=n};function He(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}function Ke(e,t,n){for(var r=0,i=0;i<e.position.length;i++){var a=t[i],o=e.position[i];if(r=a.field.isKeyField()?fe.comparator(fe.fromName(o.referenceValue),n.key):ve(o,n.data.field(a.field)),"desc"===a.dir&&(r*=-1),0!==r)break}return e.before?r<=0:r<0}function Ge(e,t){if(null===e)return null===t;if(null===t)return!1;if(e.before!==t.before||e.position.length!==t.position.length)return!1;for(var n=0;n<e.position.length;n++)if(!de(e.position[n],t.position[n]))return!1;return!0}var We=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"F",u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;Object(v.a)(this,e),this.path=t,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=a,this.limitType=o,this.startAt=u,this.endAt=s,this.V=null,this.S=null,this.startAt,this.endAt};function Qe(e,t,n,r,i,a,o,u){return new We(e,t,n,r,i,a,o,u)}function $e(e){return new We(e)}function Ye(e){return!le(e.limit)&&"F"===e.limitType}function Xe(e){return!le(e.limit)&&"L"===e.limitType}function Je(e){return e.explicitOrderBy.length>0?e.explicitOrderBy[0].field:null}function Ze(e){var t,n=Object(u.a)(e.filters);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.v())return r.field}}catch(i){n.e(i)}finally{n.f()}return null}function et(e){return null!==e.collectionGroup}function tt(e){var t=A(e);if(null===t.V){t.V=[];var n=Ze(t),r=Je(t);if(null!==n&&null===r)n.isKeyField()||t.V.push(new qe(n)),t.V.push(new qe(ee.keyField(),"asc"));else{var i,a=!1,o=Object(u.a)(t.explicitOrderBy);try{for(o.s();!(i=o.n()).done;){var s=i.value;t.V.push(s),s.field.isKeyField()&&(a=!0)}}catch(c){o.e(c)}finally{o.f()}if(!a){var l=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";t.V.push(new qe(ee.keyField(),l))}}}return t.V}function nt(e){var t=A(e);if(!t.S)if("F"===t.limitType)t.S=Ie(t.path,t.collectionGroup,tt(t),t.filters,t.limit,t.startAt,t.endAt);else{var n,r=[],i=Object(u.a)(tt(t));try{for(i.s();!(n=i.n()).done;){var a=n.value,o="desc"===a.dir?"asc":"desc";r.push(new qe(a.field,o))}}catch(c){i.e(c)}finally{i.f()}var s=t.endAt?new ze(t.endAt.position,!t.endAt.before):null,l=t.startAt?new ze(t.startAt.position,!t.startAt.before):null;t.S=Ie(t.path,t.collectionGroup,r,t.filters,t.limit,s,l)}return t.S}function rt(e,t,n){return new We(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function it(e,t){return Ce(nt(e),nt(t))&&e.limitType===t.limitType}function at(e){return"".concat(xe(nt(e)),"|lt:").concat(e.limitType)}function ot(e){return"Query(target=".concat(function(e){var t=e.path.canonicalString();return null!==e.collectionGroup&&(t+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(t+=", filters: [".concat(e.filters.map((function(e){return"".concat((t=e).field.canonicalString()," ").concat(t.op," ").concat(ge(t.value));var t})).join(", "),"]")),le(e.limit)||(t+=", limit: "+e.limit),e.orderBy.length>0&&(t+=", orderBy: [".concat(e.orderBy.map((function(e){return function(e){return"".concat(e.field.canonicalString()," (").concat(e.dir,")")}(e)})).join(", "),"]")),e.startAt&&(t+=", startAt: "+Be(e.startAt)),e.endAt&&(t+=", endAt: "+Be(e.endAt)),"Target(".concat(t,")")}(nt(e)),"; limitType=").concat(e.limitType,")")}function ut(e,t){return t.isFoundDocument()&&function(e,t){var n=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(n):fe.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){var n,r=Object(u.a)(e.explicitOrderBy);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!i.field.isKeyField()&&null===t.data.field(i.field))return!1}}catch(a){r.e(a)}finally{r.f()}return!0}(e,t)&&function(e,t){var n,r=Object(u.a)(e.filters);try{for(r.s();!(n=r.n()).done;){if(!n.value.matches(t))return!1}}catch(i){r.e(i)}finally{r.f()}return!0}(e,t)&&function(e,t){return!(e.startAt&&!Ke(e.startAt,tt(e),t))&&(!e.endAt||!Ke(e.endAt,tt(e),t))}(e,t)}function st(e){return function(t,n){var r,i=!1,a=Object(u.a)(tt(e));try{for(a.s();!(r=a.n()).done;){var o=r.value,s=lt(o,t,n);if(0!==s)return s;i=i||o.field.isKeyField()}}catch(l){a.e(l)}finally{a.f()}return 0}}function lt(e,t,n){var r=e.field.isKeyField()?fe.comparator(t.key,n.key):function(e,t,n){var r=t.data.field(e),i=n.data.field(e);return null!==r&&null!==i?ve(r,i):C()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return C()}}function ct(e,t){if(e.D){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:ce(t)?"-0":t}}function ft(e){return{integerValue:""+e}}var ht=function e(){Object(v.a)(this,e),this._=void 0};function dt(e,t,n){return e instanceof yt?function(e,t){var n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&(n.fields.__previous_value__=t),{mapValue:n}}(n,t):e instanceof gt?mt(e,t):e instanceof bt?kt(e,t):function(e,t){var n=vt(e,t),r=Et(n)+Et(e.C);return be(n)&&be(e.C)?ft(r):ct(e.N,r)}(e,t)}function pt(e,t,n){return e instanceof gt?mt(e,t):e instanceof bt?kt(e,t):n}function vt(e,t){return e instanceof wt?be(n=t)||function(e){return!!e&&"doubleValue"in e}(n)?t:{integerValue:0}:null;var n}var yt=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return n}(ht),gt=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(v.a)(this,n),(r=t.call(this)).elements=e,r}return n}(ht);function mt(e,t){var n,r=Ot(t),i=Object(u.a)(e.elements);try{var a=function(){var e=n.value;r.some((function(t){return de(t,e)}))||r.push(e)};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return{arrayValue:{values:r}}}var bt=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(v.a)(this,n),(r=t.call(this)).elements=e,r}return n}(ht);function kt(e,t){var n,r=Ot(t),i=Object(u.a)(e.elements);try{var a=function(){var e=n.value;r=r.filter((function(t){return!de(t,e)}))};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return{arrayValue:{values:r}}}var wt=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(v.a)(this,n),(i=t.call(this)).N=e,i.C=r,i}return n}(ht);function Et(e){return ie(e.integerValue||e.doubleValue)}function Ot(e){return ke(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}function St(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}var Tt=function e(){Object(v.a)(this,e)};function _t(e,t,n){e instanceof Ct?function(e,t,n){var r=e.value.clone(),i=Dt(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(e,t,n):e instanceof Nt?function(e,t,n){if(St(e.precondition,t)){var r=Dt(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(At(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}else t.convertToUnknownDocument(n.version)}(e,t,n):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,t,n)}function jt(e,t,n){e instanceof Ct?function(e,t,n){if(St(e.precondition,t)){var r=e.value.clone(),i=Lt(e.fieldTransforms,n,t);r.setAll(i),t.convertToFoundDocument(xt(t),r).setHasLocalMutations()}}(e,t,n):e instanceof Nt?function(e,t,n){if(St(e.precondition,t)){var r=Lt(e.fieldTransforms,n,t),i=t.data;i.setAll(At(e)),i.setAll(r),t.convertToFoundDocument(xt(t),i).setHasLocalMutations()}}(e,t,n):function(e,t){St(e.precondition,t)&&t.convertToNoDocument(W.min())}(e,t)}function It(e,t){return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&!!function(e,t){return void 0===e&&void 0===t||!(!e||!t)&&K(e,t,(function(e,t){return function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof gt&&t instanceof gt||e instanceof bt&&t instanceof bt?K(e.elements,t.elements,de):e instanceof wt&&t instanceof wt?de(e.C,t.C):e instanceof yt&&t instanceof yt}(e.transform,t.transform)}(e,t)}))}(e.fieldTransforms,t.fieldTransforms)&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}function xt(e){return e.isFoundDocument()?e.version:W.min()}var Ct=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i){var a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return Object(v.a)(this,n),(a=t.call(this)).key=e,a.value=r,a.precondition=i,a.fieldTransforms=o,a.type=0,a}return n}(Tt),Nt=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i,a){var o,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];return Object(v.a)(this,n),(o=t.call(this)).key=e,o.data=r,o.fieldMask=i,o.precondition=a,o.fieldTransforms=u,o.type=1,o}return n}(Tt);function At(e){var t=new Map;return e.fieldMask.fields.forEach((function(n){if(!n.isEmpty()){var r=e.data.field(n);t.set(n,r)}})),t}function Dt(e,t,n){var r=new Map;N(e.length===n.length);for(var i=0;i<n.length;i++){var a=e[i],o=a.transform,u=t.data.field(a.field);r.set(a.field,pt(o,u,n[i]))}return r}function Lt(e,t,n){var r,i=new Map,a=Object(u.a)(e);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=o.transform,l=n.data.field(o.field);i.set(o.field,dt(s,l,t))}}catch(c){a.e(c)}finally{a.f()}return i}var Pt,Rt,Ft=function e(t){Object(v.a)(this,e),this.count=t};function Mt(e){if(void 0===e)return j("GRPC error has no .code"),D.UNKNOWN;switch(e){case Pt.OK:return D.OK;case Pt.CANCELLED:return D.CANCELLED;case Pt.UNKNOWN:return D.UNKNOWN;case Pt.DEADLINE_EXCEEDED:return D.DEADLINE_EXCEEDED;case Pt.RESOURCE_EXHAUSTED:return D.RESOURCE_EXHAUSTED;case Pt.INTERNAL:return D.INTERNAL;case Pt.UNAVAILABLE:return D.UNAVAILABLE;case Pt.UNAUTHENTICATED:return D.UNAUTHENTICATED;case Pt.INVALID_ARGUMENT:return D.INVALID_ARGUMENT;case Pt.NOT_FOUND:return D.NOT_FOUND;case Pt.ALREADY_EXISTS:return D.ALREADY_EXISTS;case Pt.PERMISSION_DENIED:return D.PERMISSION_DENIED;case Pt.FAILED_PRECONDITION:return D.FAILED_PRECONDITION;case Pt.ABORTED:return D.ABORTED;case Pt.OUT_OF_RANGE:return D.OUT_OF_RANGE;case Pt.UNIMPLEMENTED:return D.UNIMPLEMENTED;case Pt.DATA_LOSS:return D.DATA_LOSS;default:return C()}}(Rt=Pt||(Pt={}))[Rt.OK=0]="OK",Rt[Rt.CANCELLED=1]="CANCELLED",Rt[Rt.UNKNOWN=2]="UNKNOWN",Rt[Rt.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Rt[Rt.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Rt[Rt.NOT_FOUND=5]="NOT_FOUND",Rt[Rt.ALREADY_EXISTS=6]="ALREADY_EXISTS",Rt[Rt.PERMISSION_DENIED=7]="PERMISSION_DENIED",Rt[Rt.UNAUTHENTICATED=16]="UNAUTHENTICATED",Rt[Rt.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Rt[Rt.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Rt[Rt.ABORTED=10]="ABORTED",Rt[Rt.OUT_OF_RANGE=11]="OUT_OF_RANGE",Rt[Rt.UNIMPLEMENTED=12]="UNIMPLEMENTED",Rt[Rt.INTERNAL=13]="INTERNAL",Rt[Rt.UNAVAILABLE=14]="UNAVAILABLE",Rt[Rt.DATA_LOSS=15]="DATA_LOSS";var Vt=function(){function e(t,n){Object(v.a)(this,e),this.comparator=t,this.root=n||zt.EMPTY}return Object(y.a)(e,[{key:"insert",value:function(t,n){return new e(this.comparator,this.root.insert(t,n,this.comparator).copy(null,null,zt.BLACK,null,null))}},{key:"remove",value:function(t){return new e(this.comparator,this.root.remove(t,this.comparator).copy(null,null,zt.BLACK,null,null))}},{key:"get",value:function(e){for(var t=this.root;!t.isEmpty();){var n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}},{key:"indexOf",value:function(e){for(var t=0,n=this.root;!n.isEmpty();){var r=this.comparator(e,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1}},{key:"isEmpty",value:function(){return this.root.isEmpty()}},{key:"size",get:function(){return this.root.size}},{key:"minKey",value:function(){return this.root.minKey()}},{key:"maxKey",value:function(){return this.root.maxKey()}},{key:"inorderTraversal",value:function(e){return this.root.inorderTraversal(e)}},{key:"forEach",value:function(e){this.inorderTraversal((function(t,n){return e(t,n),!1}))}},{key:"toString",value:function(){var e=[];return this.inorderTraversal((function(t,n){return e.push("".concat(t,":").concat(n)),!1})),"{".concat(e.join(", "),"}")}},{key:"reverseTraversal",value:function(e){return this.root.reverseTraversal(e)}},{key:"getIterator",value:function(){return new Ut(this.root,null,this.comparator,!1)}},{key:"getIteratorFrom",value:function(e){return new Ut(this.root,e,this.comparator,!1)}},{key:"getReverseIterator",value:function(){return new Ut(this.root,null,this.comparator,!0)}},{key:"getReverseIteratorFrom",value:function(e){return new Ut(this.root,e,this.comparator,!0)}}]),e}(),Ut=function(){function e(t,n,r,i){Object(v.a)(this,e),this.isReverse=i,this.nodeStack=[];for(var a=1;!t.isEmpty();)if(a=n?r(t.key,n):1,i&&(a*=-1),a<0)t=this.isReverse?t.left:t.right;else{if(0===a){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}return Object(y.a)(e,[{key:"getNext",value:function(){var e=this.nodeStack.pop(),t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}},{key:"hasNext",value:function(){return this.nodeStack.length>0}},{key:"peek",value:function(){if(0===this.nodeStack.length)return null;var e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}]),e}(),zt=function(){function e(t,n,r,i,a){Object(v.a)(this,e),this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=i?i:e.EMPTY,this.right=null!=a?a:e.EMPTY,this.size=this.left.size+1+this.right.size}return Object(y.a)(e,[{key:"copy",value:function(t,n,r,i,a){return new e(null!=t?t:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=a?a:this.right)}},{key:"isEmpty",value:function(){return!1}},{key:"inorderTraversal",value:function(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}},{key:"reverseTraversal",value:function(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}},{key:"min",value:function(){return this.left.isEmpty()?this:this.left.min()}},{key:"minKey",value:function(){return this.min().key}},{key:"maxKey",value:function(){return this.right.isEmpty()?this.key:this.right.maxKey()}},{key:"insert",value:function(e,t,n){var r=this,i=n(e,r.key);return(r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n))).fixUp()}},{key:"removeMin",value:function(){if(this.left.isEmpty())return e.EMPTY;var t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),(t=t.copy(null,null,null,t.left.removeMin(),null)).fixUp()}},{key:"remove",value:function(t,n){var r,i=this;if(n(t,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(t,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),0===n(t,i.key)){if(i.right.isEmpty())return e.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(t,n))}return i.fixUp()}},{key:"isRed",value:function(){return this.color}},{key:"fixUp",value:function(){var e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}},{key:"moveRedLeft",value:function(){var e=this.colorFlip();return e.right.left.isRed()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight())).rotateLeft()).colorFlip()),e}},{key:"moveRedRight",value:function(){var e=this.colorFlip();return e.left.left.isRed()&&(e=(e=e.rotateRight()).colorFlip()),e}},{key:"rotateLeft",value:function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}},{key:"rotateRight",value:function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}},{key:"colorFlip",value:function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}},{key:"checkMaxDepth",value:function(){var e=this.check();return Math.pow(2,e)<=this.size+1}},{key:"check",value:function(){if(this.isRed()&&this.left.isRed())throw C();if(this.right.isRed())throw C();var e=this.left.check();if(e!==this.right.check())throw C();return e+(this.isRed()?0:1)}}]),e}();zt.EMPTY=null,zt.RED=!0,zt.BLACK=!1,zt.EMPTY=new(function(){function e(){Object(v.a)(this,e),this.size=0}return Object(y.a)(e,[{key:"key",get:function(){throw C()}},{key:"value",get:function(){throw C()}},{key:"color",get:function(){throw C()}},{key:"left",get:function(){throw C()}},{key:"right",get:function(){throw C()}},{key:"copy",value:function(e,t,n,r,i){return this}},{key:"insert",value:function(e,t,n){return new zt(e,t)}},{key:"remove",value:function(e,t){return this}},{key:"isEmpty",value:function(){return!0}},{key:"inorderTraversal",value:function(e){return!1}},{key:"reverseTraversal",value:function(e){return!1}},{key:"minKey",value:function(){return null}},{key:"maxKey",value:function(){return null}},{key:"isRed",value:function(){return!1}},{key:"checkMaxDepth",value:function(){return!0}},{key:"check",value:function(){return 0}}]),e}());var Bt=function(){function e(t){Object(v.a)(this,e),this.comparator=t,this.data=new Vt(this.comparator)}return Object(y.a)(e,[{key:"has",value:function(e){return null!==this.data.get(e)}},{key:"first",value:function(){return this.data.minKey()}},{key:"last",value:function(){return this.data.maxKey()}},{key:"size",get:function(){return this.data.size}},{key:"indexOf",value:function(e){return this.data.indexOf(e)}},{key:"forEach",value:function(e){this.data.inorderTraversal((function(t,n){return e(t),!1}))}},{key:"forEachInRange",value:function(e,t){for(var n=this.data.getIteratorFrom(e[0]);n.hasNext();){var r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}}},{key:"forEachWhile",value:function(e,t){var n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!e(n.getNext().key))return}},{key:"firstAfterOrEqual",value:function(e){var t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}},{key:"getIterator",value:function(){return new qt(this.data.getIterator())}},{key:"getIteratorFrom",value:function(e){return new qt(this.data.getIteratorFrom(e))}},{key:"add",value:function(e){return this.copy(this.data.remove(e).insert(e,!0))}},{key:"delete",value:function(e){return this.has(e)?this.copy(this.data.remove(e)):this}},{key:"isEmpty",value:function(){return this.data.isEmpty()}},{key:"unionWith",value:function(e){var t=this;return t.size<e.size&&(t=e,e=this),e.forEach((function(e){t=t.add(e)})),t}},{key:"isEqual",value:function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.data.getIterator(),r=t.data.getIterator();n.hasNext();){var i=n.getNext().key,a=r.getNext().key;if(0!==this.comparator(i,a))return!1}return!0}},{key:"toArray",value:function(){var e=[];return this.forEach((function(t){e.push(t)})),e}},{key:"toString",value:function(){var e=[];return this.forEach((function(t){return e.push(t)})),"SortedSet("+e.toString()+")"}},{key:"copy",value:function(t){var n=new e(this.comparator);return n.data=t,n}}]),e}(),qt=function(){function e(t){Object(v.a)(this,e),this.iter=t}return Object(y.a)(e,[{key:"getNext",value:function(){return this.iter.getNext().key}},{key:"hasNext",value:function(){return this.iter.hasNext()}}]),e}(),Ht=new Vt(fe.comparator);function Kt(){return Ht}var Gt=new Vt(fe.comparator);function Wt(){return Gt}new Vt(fe.comparator);var Qt=new Bt(fe.comparator);function $t(){for(var e=Qt,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];e=e.add(o)}return e}var Yt=new Bt(H);function Xt(){return Yt}var Jt=function(){function e(t,n,r,i,a){Object(v.a)(this,e),this.snapshotVersion=t,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=a}return Object(y.a)(e,null,[{key:"createSynthesizedRemoteEventForCurrentChange",value:function(t,n){var r=new Map;return r.set(t,Zt.createSynthesizedTargetChangeForCurrentChange(t,n)),new e(W.min(),r,Xt(),Kt(),$t())}}]),e}(),Zt=function(){function e(t,n,r,i,a){Object(v.a)(this,e),this.resumeToken=t,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=a}return Object(y.a)(e,null,[{key:"createSynthesizedTargetChangeForCurrentChange",value:function(t,n){return new e(te.EMPTY_BYTE_STRING,n,$t(),$t(),$t())}}]),e}(),en=function e(t,n,r,i){Object(v.a)(this,e),this.k=t,this.removedTargetIds=n,this.key=r,this.$=i},tn=function e(t,n){Object(v.a)(this,e),this.targetId=t,this.O=n},nn=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:te.EMPTY_BYTE_STRING,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;Object(v.a)(this,e),this.state=t,this.targetIds=n,this.resumeToken=r,this.cause=i},rn=function(){function e(){Object(v.a)(this,e),this.F=0,this.M=un(),this.L=te.EMPTY_BYTE_STRING,this.B=!1,this.U=!0}return Object(y.a)(e,[{key:"current",get:function(){return this.B}},{key:"resumeToken",get:function(){return this.L}},{key:"q",get:function(){return 0!==this.F}},{key:"K",get:function(){return this.U}},{key:"j",value:function(e){e.approximateByteSize()>0&&(this.U=!0,this.L=e)}},{key:"W",value:function(){var e=$t(),t=$t(),n=$t();return this.M.forEach((function(r,i){switch(i){case 0:e=e.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:C()}})),new Zt(this.L,this.B,e,t,n)}},{key:"G",value:function(){this.U=!1,this.M=un()}},{key:"H",value:function(e,t){this.U=!0,this.M=this.M.insert(e,t)}},{key:"J",value:function(e){this.U=!0,this.M=this.M.remove(e)}},{key:"Y",value:function(){this.F+=1}},{key:"X",value:function(){this.F-=1}},{key:"Z",value:function(){this.U=!0,this.B=!0}}]),e}(),an=function(){function e(t){Object(v.a)(this,e),this.tt=t,this.et=new Map,this.nt=Kt(),this.st=on(),this.it=new Bt(H)}return Object(y.a)(e,[{key:"rt",value:function(e){var t,n=Object(u.a)(e.k);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.$&&e.$.isFoundDocument()?this.ot(r,e.$):this.at(r,e.key,e.$)}}catch(s){n.e(s)}finally{n.f()}var i,a=Object(u.a)(e.removedTargetIds);try{for(a.s();!(i=a.n()).done;){var o=i.value;this.at(o,e.key,e.$)}}catch(s){a.e(s)}finally{a.f()}}},{key:"ct",value:function(e){var t=this;this.forEachTarget(e,(function(n){var r=t.ut(n);switch(e.state){case 0:t.ht(n)&&r.j(e.resumeToken);break;case 1:r.X(),r.q||r.G(),r.j(e.resumeToken);break;case 2:r.X(),r.q||t.removeTarget(n);break;case 3:t.ht(n)&&(r.Z(),r.j(e.resumeToken));break;case 4:t.ht(n)&&(t.lt(n),r.j(e.resumeToken));break;default:C()}}))}},{key:"forEachTarget",value:function(e,t){var n=this;e.targetIds.length>0?e.targetIds.forEach(t):this.et.forEach((function(e,r){n.ht(r)&&t(r)}))}},{key:"ft",value:function(e){var t=e.targetId,n=e.O.count,r=this.dt(t);if(r){var i=r.target;if(Ne(i))if(0===n){var a=new fe(i.path);this.at(t,a,_e.newNoDocument(a,W.min()))}else N(1===n);else this.wt(t)!==n&&(this.lt(t),this.it=this.it.add(t))}}},{key:"_t",value:function(e){var t=this,n=new Map;this.et.forEach((function(r,i){var a=t.dt(i);if(a){if(r.current&&Ne(a.target)){var o=new fe(a.target.path);null!==t.nt.get(o)||t.gt(i,o)||t.at(i,o,_e.newNoDocument(o,e))}r.K&&(n.set(i,r.W()),r.G())}}));var r=$t();this.st.forEach((function(e,n){var i=!0;n.forEachWhile((function(e){var n=t.dt(e);return!n||2===n.purpose||(i=!1,!1)})),i&&(r=r.add(e))}));var i=new Jt(e,n,this.it,this.nt,r);return this.nt=Kt(),this.st=on(),this.it=new Bt(H),i}},{key:"ot",value:function(e,t){if(this.ht(e)){var n=this.gt(e,t.key)?2:0;this.ut(e).H(t.key,n),this.nt=this.nt.insert(t.key,t),this.st=this.st.insert(t.key,this.yt(t.key).add(e))}}},{key:"at",value:function(e,t,n){if(this.ht(e)){var r=this.ut(e);this.gt(e,t)?r.H(t,1):r.J(t),this.st=this.st.insert(t,this.yt(t).delete(e)),n&&(this.nt=this.nt.insert(t,n))}}},{key:"removeTarget",value:function(e){this.et.delete(e)}},{key:"wt",value:function(e){var t=this.ut(e).W();return this.tt.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}},{key:"Y",value:function(e){this.ut(e).Y()}},{key:"ut",value:function(e){var t=this.et.get(e);return t||(t=new rn,this.et.set(e,t)),t}},{key:"yt",value:function(e){var t=this.st.get(e);return t||(t=new Bt(H),this.st=this.st.insert(e,t)),t}},{key:"ht",value:function(e){var t=null!==this.dt(e);return t||_("WatchChangeAggregator","Detected inactive target",e),t}},{key:"dt",value:function(e){var t=this.et.get(e);return t&&t.q?null:this.tt.Et(e)}},{key:"lt",value:function(e){var t=this;this.et.set(e,new rn),this.tt.getRemoteKeysForTarget(e).forEach((function(n){t.at(e,n,null)}))}},{key:"gt",value:function(e,t){return this.tt.getRemoteKeysForTarget(e).has(t)}}]),e}();function on(){return new Vt(fe.comparator)}function un(){return new Vt(fe.comparator)}var sn={asc:"ASCENDING",desc:"DESCENDING"},ln={"<":"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"},cn=function e(t,n){Object(v.a)(this,e),this.databaseId=t,this.D=n};function fn(e,t){return e.D?"".concat(new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z",""),".").concat(("000000000"+t.nanoseconds).slice(-9),"Z"):{seconds:""+t.seconds,nanos:t.nanoseconds}}function hn(e,t){return e.D?t.toBase64():t.toUint8Array()}function dn(e){return N(!!e),W.fromTimestamp(function(e){var t=re(e);return new G(t.seconds,t.nanos)}(e))}function pn(e,t){return function(e){return new J(["projects",e.projectId,"databases",e.database])}(e).child("documents").child(t).canonicalString()}function vn(e){var t=J.fromString(e);return N(Dn(t)),t}function yn(e,t){var n=vn(t);if(n.get(1)!==e.databaseId.projectId)throw new L(D.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new L(D.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new fe(kn(n))}function gn(e,t){return pn(e.databaseId,t)}function mn(e){var t=vn(e);return 4===t.length?J.emptyPath():kn(t)}function bn(e){return new J(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function kn(e){return N(e.length>4&&"documents"===e.get(4)),e.popFirst(5)}function wn(e,t){return{documents:[gn(e,t.path)]}}function En(e,t){var n={structuredQuery:{}},r=t.path;null!==t.collectionGroup?(n.parent=gn(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=gn(e,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);var i=function(e){if(0!==e.length){var t=e.map((function(e){return function(e){if("=="===e.op){if(Ee(e.value))return{unaryFilter:{field:xn(e.field),op:"IS_NAN"}};if(we(e.value))return{unaryFilter:{field:xn(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(Ee(e.value))return{unaryFilter:{field:xn(e.field),op:"IS_NOT_NAN"}};if(we(e.value))return{unaryFilter:{field:xn(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:xn(e.field),op:In(e.op),value:e.value}}}(e)}));return 1===t.length?t[0]:{compositeFilter:{op:"AND",filters:t}}}}(t.filters);i&&(n.structuredQuery.where=i);var a=function(e){if(0!==e.length)return e.map((function(e){return function(e){return{field:xn(e.field),direction:jn(e.dir)}}(e)}))}(t.orderBy);a&&(n.structuredQuery.orderBy=a);var o=function(e,t){return e.D||le(t)?t:{value:t}}(e,t.limit);return null!==o&&(n.structuredQuery.limit=o),t.startAt&&(n.structuredQuery.startAt=Tn(t.startAt)),t.endAt&&(n.structuredQuery.endAt=Tn(t.endAt)),n}function On(e){var t=mn(e.parent),n=e.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){N(1===r);var a=n.from[0];a.allDescendants?i=a.collectionId:t=t.child(a.collectionId)}var o=[];n.where&&(o=Sn(n.where));var u=[];n.orderBy&&(u=n.orderBy.map((function(e){return function(e){return new qe(Cn(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}(e)})));var s=null;n.limit&&(s=function(e){var t;return le(t="object"==typeof e?e.value:e)?null:t}(n.limit));var l=null;n.startAt&&(l=_n(n.startAt));var c=null;return n.endAt&&(c=_n(n.endAt)),Qe(t,i,u,o,s,"F",l,c)}function Sn(e){return e?void 0!==e.unaryFilter?[An(e)]:void 0!==e.fieldFilter?[Nn(e)]:void 0!==e.compositeFilter?e.compositeFilter.filters.map((function(e){return Sn(e)})).reduce((function(e,t){return e.concat(t)})):C():[]}function Tn(e){return{before:e.before,values:e.position}}function _n(e){var t=!!e.before,n=e.values||[];return new ze(n,t)}function jn(e){return sn[e]}function In(e){return ln[e]}function xn(e){return{fieldPath:e.canonicalString()}}function Cn(e){return ee.fromServerFormat(e.fieldPath)}function Nn(e){return Ae.create(Cn(e.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return C()}}(e.fieldFilter.op),e.fieldFilter.value)}function An(e){switch(e.unaryFilter.op){case"IS_NAN":var t=Cn(e.unaryFilter.field);return Ae.create(t,"==",{doubleValue:NaN});case"IS_NULL":var n=Cn(e.unaryFilter.field);return Ae.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var r=Cn(e.unaryFilter.field);return Ae.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=Cn(e.unaryFilter.field);return Ae.create(i,"!=",{nullValue:"NULL_VALUE"});default:return C()}}function Dn(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}function Ln(e){for(var t="",n=0;n<e.length;n++)t.length>0&&(t=Rn(t)),t=Pn(e.get(n),t);return Rn(t)}function Pn(e,t){for(var n=t,r=e.length,i=0;i<r;i++){var a=e.charAt(i);switch(a){case"\0":n+="\x01\x10";break;case"\x01":n+="\x01\x11";break;default:n+=a}}return n}function Rn(e){return e+"\x01\x01"}var Fn=function e(t,n,r){Object(v.a)(this,e),this.ownerId=t,this.allowTabSynchronization=n,this.leaseTimestampMs=r};Fn.store="owner",Fn.key="owner";var Mn=function e(t,n,r){Object(v.a)(this,e),this.userId=t,this.lastAcknowledgedBatchId=n,this.lastStreamToken=r};Mn.store="mutationQueues",Mn.keyPath="userId";var Vn=function e(t,n,r,i,a){Object(v.a)(this,e),this.userId=t,this.batchId=n,this.localWriteTimeMs=r,this.baseMutations=i,this.mutations=a};Vn.store="mutations",Vn.keyPath="batchId",Vn.userMutationsIndex="userMutationsIndex",Vn.userMutationsKeyPath=["userId","batchId"];var Un=function(){function e(){Object(v.a)(this,e)}return Object(y.a)(e,null,[{key:"prefixForUser",value:function(e){return[e]}},{key:"prefixForPath",value:function(e,t){return[e,Ln(t)]}},{key:"key",value:function(e,t,n){return[e,Ln(t),n]}}]),e}();Un.store="documentMutations",Un.PLACEHOLDER=new Un;var zn=function e(t,n,r,i,a,o){Object(v.a)(this,e),this.unknownDocument=t,this.noDocument=n,this.document=r,this.hasCommittedMutations=i,this.readTime=a,this.parentPath=o};zn.store="remoteDocuments",zn.readTimeIndex="readTimeIndex",zn.readTimeIndexPath="readTime",zn.collectionReadTimeIndex="collectionReadTimeIndex",zn.collectionReadTimeIndexPath=["parentPath","readTime"];var Bn=function e(t){Object(v.a)(this,e),this.byteSize=t};Bn.store="remoteDocumentGlobal",Bn.key="remoteDocumentGlobalKey";var qn=function e(t,n,r,i,a,o,u){Object(v.a)(this,e),this.targetId=t,this.canonicalId=n,this.readTime=r,this.resumeToken=i,this.lastListenSequenceNumber=a,this.lastLimboFreeSnapshotVersion=o,this.query=u};qn.store="targets",qn.keyPath="targetId",qn.queryTargetsIndexName="queryTargetsIndex",qn.queryTargetsKeyPath=["canonicalId","targetId"];var Hn=function e(t,n,r){Object(v.a)(this,e),this.targetId=t,this.path=n,this.sequenceNumber=r};Hn.store="targetDocuments",Hn.keyPath=["targetId","path"],Hn.documentTargetsIndex="documentTargetsIndex",Hn.documentTargetsKeyPath=["path","targetId"];var Kn=function e(t,n,r,i){Object(v.a)(this,e),this.highestTargetId=t,this.highestListenSequenceNumber=n,this.lastRemoteSnapshotVersion=r,this.targetCount=i};Kn.key="targetGlobalKey",Kn.store="targetGlobal";var Gn=function e(t,n){Object(v.a)(this,e),this.collectionId=t,this.parent=n};Gn.store="collectionParents",Gn.keyPath=["collectionId","parent"];var Wn=function e(t,n,r,i){Object(v.a)(this,e),this.clientId=t,this.updateTimeMs=n,this.networkEnabled=r,this.inForeground=i};Wn.store="clientMetadata",Wn.keyPath="clientId";var Qn=function e(t,n,r){Object(v.a)(this,e),this.bundleId=t,this.createTime=n,this.version=r};Qn.store="bundles",Qn.keyPath="bundleId";var $n=function e(t,n,r){Object(v.a)(this,e),this.name=t,this.readTime=n,this.bundledQuery=r};$n.store="namedQueries",$n.keyPath="name";[Mn.store,Vn.store,Un.store,zn.store,qn.store,Fn.store,Kn.store,Hn.store].concat([Wn.store]).concat([Bn.store]).concat([Gn.store]).concat([Qn.store,$n.store]);var Yn="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",Xn=function(){function e(){Object(v.a)(this,e),this.onCommittedListeners=[]}return Object(y.a)(e,[{key:"addOnCommittedListener",value:function(e){this.onCommittedListeners.push(e)}},{key:"raiseOnCommittedEvent",value:function(){this.onCommittedListeners.forEach((function(e){return e()}))}}]),e}(),Jn=function(){function e(t){var n=this;Object(v.a)(this,e),this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t((function(e){n.isDone=!0,n.result=e,n.nextCallback&&n.nextCallback(e)}),(function(e){n.isDone=!0,n.error=e,n.catchCallback&&n.catchCallback(e)}))}return Object(y.a)(e,[{key:"catch",value:function(e){return this.next(void 0,e)}},{key:"next",value:function(t,n){var r=this;return this.callbackAttached&&C(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(t,this.result):new e((function(e,i){r.nextCallback=function(n){r.wrapSuccess(t,n).next(e,i)},r.catchCallback=function(t){r.wrapFailure(n,t).next(e,i)}}))}},{key:"toPromise",value:function(){var e=this;return new Promise((function(t,n){e.next(t,n)}))}},{key:"wrapUserFunction",value:function(t){try{var n=t();return n instanceof e?n:e.resolve(n)}catch(t){return e.reject(t)}}},{key:"wrapSuccess",value:function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.resolve(n)}},{key:"wrapFailure",value:function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.reject(n)}}],[{key:"resolve",value:function(t){return new e((function(e,n){e(t)}))}},{key:"reject",value:function(t){return new e((function(e,n){n(t)}))}},{key:"waitFor",value:function(t){return new e((function(e,n){var r=0,i=0,a=!1;t.forEach((function(t){++r,t.next((function(){++i,a&&i===r&&e()}),(function(e){return n(e)}))})),a=!0,i===r&&e()}))}},{key:"or",value:function(t){var n,r=e.resolve(!1),i=Object(u.a)(t);try{var a=function(){var t=n.value;r=r.next((function(n){return n?e.resolve(n):t()}))};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}return r}},{key:"forEach",value:function(e,t){var n=this,r=[];return e.forEach((function(e,i){r.push(t.call(n,e,i))})),this.waitFor(r)}}]),e}();function Zn(e){return"IndexedDbTransactionError"===e.name}var er=function(){function e(t,n,r,i){Object(v.a)(this,e),this.batchId=t,this.localWriteTime=n,this.baseMutations=r,this.mutations=i}return Object(y.a)(e,[{key:"applyToRemoteDocument",value:function(e,t){for(var n=t.mutationResults,r=0;r<this.mutations.length;r++){var i=this.mutations[r];i.key.isEqual(e.key)&&_t(i,e,n[r])}}},{key:"applyToLocalView",value:function(e){var t,n=Object(u.a)(this.baseMutations);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.key.isEqual(e.key)&&jt(r,e,this.localWriteTime)}}catch(s){n.e(s)}finally{n.f()}var i,a=Object(u.a)(this.mutations);try{for(a.s();!(i=a.n()).done;){var o=i.value;o.key.isEqual(e.key)&&jt(o,e,this.localWriteTime)}}catch(s){a.e(s)}finally{a.f()}}},{key:"applyToLocalDocumentSet",value:function(e){var t=this;this.mutations.forEach((function(n){var r=e.get(n.key),i=r;t.applyToLocalView(i),r.isValidDocument()||i.convertToNoDocument(W.min())}))}},{key:"keys",value:function(){return this.mutations.reduce((function(e,t){return e.add(t.key)}),$t())}},{key:"isEqual",value:function(e){return this.batchId===e.batchId&&K(this.mutations,e.mutations,(function(e,t){return It(e,t)}))&&K(this.baseMutations,e.baseMutations,(function(e,t){return It(e,t)}))}}]),e}(),tr=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:W.min(),o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:W.min(),u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:te.EMPTY_BYTE_STRING;Object(v.a)(this,e),this.target=t,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=a,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=u}return Object(y.a)(e,[{key:"withSequenceNumber",value:function(t){return new e(this.target,this.targetId,this.purpose,t,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken)}},{key:"withResumeToken",value:function(t,n){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,t)}},{key:"withLastLimboFreeSnapshotVersion",value:function(t){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,t,this.resumeToken)}}]),e}(),nr=function e(t){Object(v.a)(this,e),this.Wt=t};function rr(e){var t=On({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?rt(t,t.limit,"L"):t}var ir=function(){function e(){Object(v.a)(this,e),this.Gt=new ar}return Object(y.a)(e,[{key:"addToCollectionParentIndex",value:function(e,t){return this.Gt.add(t),Jn.resolve()}},{key:"getCollectionParents",value:function(e,t){return Jn.resolve(this.Gt.getEntries(t))}}]),e}(),ar=function(){function e(){Object(v.a)(this,e),this.index={}}return Object(y.a)(e,[{key:"add",value:function(e){var t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new Bt(J.comparator),i=!r.has(n);return this.index[t]=r.add(n),i}},{key:"has",value:function(e){var t=e.lastSegment(),n=e.popLast(),r=this.index[t];return r&&r.has(n)}},{key:"getEntries",value:function(e){return(this.index[e]||new Bt(J.comparator)).toArray()}}]),e}();var or=function(){function e(t,n,r){Object(v.a)(this,e),this.cacheSizeCollectionThreshold=t,this.percentileToCollect=n,this.maximumSequenceNumbersToCollect=r}return Object(y.a)(e,null,[{key:"withCacheSize",value:function(t){return new e(t,e.DEFAULT_COLLECTION_PERCENTILE,e.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}]),e}();or.DEFAULT_COLLECTION_PERCENTILE=10,or.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,or.DEFAULT=new or(41943040,or.DEFAULT_COLLECTION_PERCENTILE,or.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),or.DISABLED=new or(-1,0,0);var ur=function(){function e(t){Object(v.a)(this,e),this.ne=t}return Object(y.a)(e,[{key:"next",value:function(){return this.ne+=2,this.ne}}],[{key:"se",value:function(){return new e(0)}},{key:"ie",value:function(){return new e(-1)}}]),e}();function sr(e){return lr.apply(this,arguments)}function lr(){return(lr=Object(c.a)(l.a.mark((function e(t){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.code===D.FAILED_PRECONDITION&&t.message===Yn){e.next=2;break}throw t;case 2:_("LocalStore","Unexpectedly lost primary lease");case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var cr=function(){function e(t,n){Object(v.a)(this,e),this.mapKeyFn=t,this.equalsFn=n,this.inner={}}return Object(y.a)(e,[{key:"get",value:function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n){var r,i=Object(u.a)(n);try{for(i.s();!(r=i.n()).done;){var a=Object(o.a)(r.value,2),s=a[0],l=a[1];if(this.equalsFn(s,e))return l}}catch(c){i.e(c)}finally{i.f()}}}},{key:"has",value:function(e){return void 0!==this.get(e)}},{key:"set",value:function(e,t){var n=this.mapKeyFn(e),r=this.inner[n];if(void 0!==r){for(var i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return void(r[i]=[e,t]);r.push([e,t])}else this.inner[n]=[[e,t]]}},{key:"delete",value:function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(this.equalsFn(n[r][0],e))return 1===n.length?delete this.inner[t]:n.splice(r,1),!0;return!1}},{key:"forEach",value:function(e){$(this.inner,(function(t,n){var r,i=Object(u.a)(n);try{for(i.s();!(r=i.n()).done;){var a=Object(o.a)(r.value,2),s=a[0],l=a[1];e(s,l)}}catch(c){i.e(c)}finally{i.f()}}))}},{key:"isEmpty",value:function(){return Y(this.inner)}}]),e}(),fr=function(){function e(){Object(v.a)(this,e),this.changes=new cr((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),this.changesApplied=!1}return Object(y.a)(e,[{key:"getReadTime",value:function(e){var t=this.changes.get(e);return t?t.readTime:W.min()}},{key:"addEntry",value:function(e,t){this.assertNotApplied(),this.changes.set(e.key,{document:e,readTime:t})}},{key:"removeEntry",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.assertNotApplied(),this.changes.set(e,{document:_e.newInvalidDocument(e),readTime:t})}},{key:"getEntry",value:function(e,t){this.assertNotApplied();var n=this.changes.get(t);return void 0!==n?Jn.resolve(n.document):this.getFromCache(e,t)}},{key:"getEntries",value:function(e,t){return this.getAllFromCache(e,t)}},{key:"apply",value:function(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}},{key:"assertNotApplied",value:function(){}}]),e}();var hr=function(){function e(t,n,r){Object(v.a)(this,e),this.He=t,this.In=n,this.Ht=r}return Object(y.a)(e,[{key:"An",value:function(e,t){var n=this;return this.In.getAllMutationBatchesAffectingDocumentKey(e,t).next((function(r){return n.Rn(e,t,r)}))}},{key:"Rn",value:function(e,t,n){return this.He.getEntry(e,t).next((function(e){var t,r=Object(u.a)(n);try{for(r.s();!(t=r.n()).done;){t.value.applyToLocalView(e)}}catch(i){r.e(i)}finally{r.f()}return e}))}},{key:"bn",value:function(e,t){e.forEach((function(e,n){var r,i=Object(u.a)(t);try{for(i.s();!(r=i.n()).done;){r.value.applyToLocalView(n)}}catch(a){i.e(a)}finally{i.f()}}))}},{key:"Pn",value:function(e,t){var n=this;return this.He.getEntries(e,t).next((function(t){return n.vn(e,t).next((function(){return t}))}))}},{key:"vn",value:function(e,t){var n=this;return this.In.getAllMutationBatchesAffectingDocumentKeys(e,t).next((function(e){return n.bn(t,e)}))}},{key:"getDocumentsMatchingQuery",value:function(e,t,n){return function(e){return fe.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}(t)?this.Vn(e,t.path):et(t)?this.Sn(e,t,n):this.Dn(e,t,n)}},{key:"Vn",value:function(e,t){return this.An(e,new fe(t)).next((function(e){var t=Wt();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t}))}},{key:"Sn",value:function(e,t,n){var r=this,i=t.collectionGroup,a=Wt();return this.Ht.getCollectionParents(e,i).next((function(o){return Jn.forEach(o,(function(o){var u=function(e,t){return new We(t,null,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(t,o.child(i));return r.Dn(e,u,n).next((function(e){e.forEach((function(e,t){a=a.insert(e,t)}))}))})).next((function(){return a}))}))}},{key:"Dn",value:function(e,t,n){var r,i,a=this;return this.He.getDocumentsMatchingQuery(e,t,n).next((function(n){return r=n,a.In.getAllMutationBatchesAffectingQuery(e,t)})).next((function(t){return i=t,a.Cn(e,i,r).next((function(e){r=e;var t,n=Object(u.a)(i);try{for(n.s();!(t=n.n()).done;){var a,o=t.value,s=Object(u.a)(o.mutations);try{for(s.s();!(a=s.n()).done;){var l=a.value,c=l.key,f=r.get(c);null==f&&(f=_e.newInvalidDocument(c),r=r.insert(c,f)),jt(l,f,o.localWriteTime),f.isFoundDocument()||(r=r.remove(c))}}catch(h){s.e(h)}finally{s.f()}}}catch(h){n.e(h)}finally{n.f()}}))})).next((function(){return r.forEach((function(e,n){ut(t,n)||(r=r.remove(e))})),r}))}},{key:"Cn",value:function(e,t,n){var r,i=$t(),a=Object(u.a)(t);try{for(a.s();!(r=a.n()).done;){var o,s=r.value,l=Object(u.a)(s.mutations);try{for(l.s();!(o=l.n()).done;){var c=o.value;c instanceof Nt&&null===n.get(c.key)&&(i=i.add(c.key))}}catch(h){l.e(h)}finally{l.f()}}}catch(h){a.e(h)}finally{a.f()}var f=n;return this.He.getEntries(e,i).next((function(e){return e.forEach((function(e,t){t.isFoundDocument()&&(f=f.insert(e,t))})),f}))}}]),e}(),dr=function(){function e(t,n,r,i){Object(v.a)(this,e),this.targetId=t,this.fromCache=n,this.Nn=r,this.xn=i}return Object(y.a)(e,null,[{key:"kn",value:function(t,n){var r,i=$t(),a=$t(),o=Object(u.a)(n.docChanges);try{for(o.s();!(r=o.n()).done;){var s=r.value;switch(s.type){case 0:i=i.add(s.doc.key);break;case 1:a=a.add(s.doc.key)}}}catch(l){o.e(l)}finally{o.f()}return new e(t,n.fromCache,i,a)}}]),e}(),pr=function(){function e(){Object(v.a)(this,e)}return Object(y.a)(e,[{key:"$n",value:function(e){this.On=e}},{key:"getDocumentsMatchingQuery",value:function(e,t,n,r){var i=this;return function(e){return 0===e.filters.length&&null===e.limit&&null==e.startAt&&null==e.endAt&&(0===e.explicitOrderBy.length||1===e.explicitOrderBy.length&&e.explicitOrderBy[0].field.isKeyField())}(t)||n.isEqual(W.min())?this.Fn(e,t):this.On.Pn(e,r).next((function(a){var o=i.Mn(t,a);return(Ye(t)||Xe(t))&&i.Ln(t.limitType,o,r,n)?i.Fn(e,t):(T()<=b.a.DEBUG&&_("QueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),ot(t)),i.On.getDocumentsMatchingQuery(e,t,n).next((function(e){return o.forEach((function(t){e=e.insert(t.key,t)})),e})))}))}},{key:"Mn",value:function(e,t){var n=new Bt(st(e));return t.forEach((function(t,r){ut(e,r)&&(n=n.add(r))})),n}},{key:"Ln",value:function(e,t,n,r){if(n.size!==t.size)return!0;var i="F"===e?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(r)>0)}},{key:"Fn",value:function(e,t){return T()<=b.a.DEBUG&&_("QueryEngine","Using full collection scan to execute query:",ot(t)),this.On.getDocumentsMatchingQuery(e,t,W.min())}}]),e}(),vr=function(){function e(t,n,r,i){Object(v.a)(this,e),this.persistence=t,this.Bn=n,this.N=i,this.Un=new Vt(H),this.qn=new cr((function(e){return xe(e)}),Ce),this.Kn=W.min(),this.In=t.getMutationQueue(r),this.jn=t.getRemoteDocumentCache(),this.ze=t.getTargetCache(),this.Qn=new hr(this.jn,this.In,this.persistence.getIndexManager()),this.Je=t.getBundleCache(),this.Bn.$n(this.Qn)}return Object(y.a)(e,[{key:"collectGarbage",value:function(e){var t=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",(function(n){return e.collect(n,t.Un)}))}}]),e}();function yr(e,t,n,r){return new vr(e,t,n,r)}function gr(e,t){return mr.apply(this,arguments)}function mr(){return(mr=Object(c.a)(l.a.mark((function e(t,n){var r,i,a,o;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=A(t),i=r.In,a=r.Qn,e.next=4,r.persistence.runTransaction("Handle user change","readonly",(function(e){var t;return r.In.getAllMutationBatches(e).next((function(o){return t=o,i=r.persistence.getMutationQueue(n),a=new hr(r.jn,i,r.persistence.getIndexManager()),i.getAllMutationBatches(e)})).next((function(n){var r,i=[],o=[],s=$t(),l=Object(u.a)(t);try{for(l.s();!(r=l.n()).done;){var c=r.value;i.push(c.batchId);var f,h=Object(u.a)(c.mutations);try{for(h.s();!(f=h.n()).done;){var d=f.value;s=s.add(d.key)}}catch(k){h.e(k)}finally{h.f()}}}catch(k){l.e(k)}finally{l.f()}var p,v=Object(u.a)(n);try{for(v.s();!(p=v.n()).done;){var y=p.value;o.push(y.batchId);var g,m=Object(u.a)(y.mutations);try{for(m.s();!(g=m.n()).done;){var b=g.value;s=s.add(b.key)}}catch(k){m.e(k)}finally{m.f()}}}catch(k){v.e(k)}finally{v.f()}return a.Pn(e,s).next((function(e){return{Wn:e,removedBatchIds:i,addedBatchIds:o}}))}))}));case 4:return o=e.sent,e.abrupt("return",(r.In=i,r.Qn=a,r.Bn.$n(r.Qn),o));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function br(e){var t=A(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(function(e){return t.ze.getLastRemoteSnapshotVersion(e)}))}function kr(e,t){var n=A(e),r=t.snapshotVersion,i=n.Un;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(function(e){var a=n.jn.newChangeBuffer({trackRemovals:!0});i=n.Un;var o=[];t.targetChanges.forEach((function(t,a){var u=i.get(a);if(u){o.push(n.ze.removeMatchingKeys(e,t.removedDocuments,a).next((function(){return n.ze.addMatchingKeys(e,t.addedDocuments,a)})));var s=t.resumeToken;if(s.approximateByteSize()>0){var l=u.withResumeToken(s,r).withSequenceNumber(e.currentSequenceNumber);i=i.insert(a,l),function(e,t,n){return N(t.resumeToken.approximateByteSize()>0),0===e.resumeToken.approximateByteSize()||(t.snapshotVersion.toMicroseconds()-e.snapshotVersion.toMicroseconds()>=3e8||n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0)}(u,l,t)&&o.push(n.ze.updateTargetData(e,l))}}}));var u=Kt();if(t.documentUpdates.forEach((function(r,i){t.resolvedLimboDocuments.has(r)&&o.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))})),o.push(wr(e,a,t.documentUpdates,r,void 0).next((function(e){u=e}))),!r.isEqual(W.min())){var s=n.ze.getLastRemoteSnapshotVersion(e).next((function(t){return n.ze.setTargetsMetadata(e,e.currentSequenceNumber,r)}));o.push(s)}return Jn.waitFor(o).next((function(){return a.apply(e)})).next((function(){return n.Qn.vn(e,u)})).next((function(){return u}))})).then((function(e){return n.Un=i,e}))}function wr(e,t,n,r,i){var a=$t();return n.forEach((function(e){return a=a.add(e)})),t.getEntries(e,a).next((function(e){var a=Kt();return n.forEach((function(n,o){var u=e.get(n),s=(null==i?void 0:i.get(n))||r;o.isNoDocument()&&o.version.isEqual(W.min())?(t.removeEntry(n,s),a=a.insert(n,o)):!u.isValidDocument()||o.version.compareTo(u.version)>0||0===o.version.compareTo(u.version)&&u.hasPendingWrites?(t.addEntry(o,s),a=a.insert(n,o)):_("LocalStore","Ignoring outdated watch update for ",n,". Current version:",u.version," Watch version:",o.version)})),a}))}function Er(e,t){var n=A(e);return n.persistence.runTransaction("Allocate target","readwrite",(function(e){var r;return n.ze.getTargetData(e,t).next((function(i){return i?(r=i,Jn.resolve(r)):n.ze.allocateTargetId(e).next((function(i){return r=new tr(t,i,0,e.currentSequenceNumber),n.ze.addTargetData(e,r).next((function(){return r}))}))}))})).then((function(e){var r=n.Un.get(e.targetId);return(null===r||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.Un=n.Un.insert(e.targetId,e),n.qn.set(t,e.targetId)),e}))}function Or(e,t,n){return Sr.apply(this,arguments)}function Sr(){return(Sr=Object(c.a)(l.a.mark((function e(t,n,r){var i,a,o;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=A(t),a=i.Un.get(n),o=r?"readwrite":"readwrite-primary",e.prev=1,e.t0=r,e.t0){e.next=6;break}return e.next=6,i.persistence.runTransaction("Release target",o,(function(e){return i.persistence.referenceDelegate.removeTarget(e,a)}));case 6:e.next=13;break;case 8:if(e.prev=8,e.t1=e.catch(1),Zn(e.t1)){e.next=12;break}throw e.t1;case 12:_("LocalStore","Failed to update sequence numbers for target ".concat(n,": ").concat(e.t1));case 13:i.Un=i.Un.remove(n),i.qn.delete(a.target);case 14:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}function Tr(e,t,n){var r=A(e),i=W.min(),a=$t();return r.persistence.runTransaction("Execute query","readonly",(function(e){return function(e,t,n){var r=A(e),i=r.qn.get(n);return void 0!==i?Jn.resolve(r.Un.get(i)):r.ze.getTargetData(t,n)}(r,e,nt(t)).next((function(t){if(t)return i=t.lastLimboFreeSnapshotVersion,r.ze.getMatchingKeysForTargetId(e,t.targetId).next((function(e){a=e}))})).next((function(){return r.Bn.getDocumentsMatchingQuery(e,t,n?i:W.min(),n?a:$t())})).next((function(e){return{documents:e,Gn:a}}))}))}var _r=function(){function e(t){Object(v.a)(this,e),this.N=t,this.Yn=new Map,this.Xn=new Map}return Object(y.a)(e,[{key:"getBundleMetadata",value:function(e,t){return Jn.resolve(this.Yn.get(t))}},{key:"saveBundleMetadata",value:function(e,t){var n;return this.Yn.set(t.id,{id:(n=t).id,version:n.version,createTime:dn(n.createTime)}),Jn.resolve()}},{key:"getNamedQuery",value:function(e,t){return Jn.resolve(this.Xn.get(t))}},{key:"saveNamedQuery",value:function(e,t){return this.Xn.set(t.name,function(e){return{name:e.name,query:rr(e.bundledQuery),readTime:dn(e.readTime)}}(t)),Jn.resolve()}}]),e}(),jr=function(){function e(){Object(v.a)(this,e),this.Zn=new Bt(Ir.ts),this.es=new Bt(Ir.ns)}return Object(y.a)(e,[{key:"isEmpty",value:function(){return this.Zn.isEmpty()}},{key:"addReference",value:function(e,t){var n=new Ir(e,t);this.Zn=this.Zn.add(n),this.es=this.es.add(n)}},{key:"ss",value:function(e,t){var n=this;e.forEach((function(e){return n.addReference(e,t)}))}},{key:"removeReference",value:function(e,t){this.rs(new Ir(e,t))}},{key:"os",value:function(e,t){var n=this;e.forEach((function(e){return n.removeReference(e,t)}))}},{key:"cs",value:function(e){var t=this,n=new fe(new J([])),r=new Ir(n,e),i=new Ir(n,e+1),a=[];return this.es.forEachInRange([r,i],(function(e){t.rs(e),a.push(e.key)})),a}},{key:"us",value:function(){var e=this;this.Zn.forEach((function(t){return e.rs(t)}))}},{key:"rs",value:function(e){this.Zn=this.Zn.delete(e),this.es=this.es.delete(e)}},{key:"hs",value:function(e){var t=new fe(new J([])),n=new Ir(t,e),r=new Ir(t,e+1),i=$t();return this.es.forEachInRange([n,r],(function(e){i=i.add(e.key)})),i}},{key:"containsKey",value:function(e){var t=new Ir(e,0),n=this.Zn.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}]),e}(),Ir=function(){function e(t,n){Object(v.a)(this,e),this.key=t,this.ls=n}return Object(y.a)(e,null,[{key:"ts",value:function(e,t){return fe.comparator(e.key,t.key)||H(e.ls,t.ls)}},{key:"ns",value:function(e,t){return H(e.ls,t.ls)||fe.comparator(e.key,t.key)}}]),e}(),xr=function(){function e(t,n){Object(v.a)(this,e),this.Ht=t,this.referenceDelegate=n,this.In=[],this.fs=1,this.ds=new Bt(Ir.ts)}return Object(y.a)(e,[{key:"checkEmpty",value:function(e){return Jn.resolve(0===this.In.length)}},{key:"addMutationBatch",value:function(e,t,n,r){var i=this.fs;this.fs++,this.In.length>0&&this.In[this.In.length-1];var a=new er(i,t,n,r);this.In.push(a);var o,s=Object(u.a)(r);try{for(s.s();!(o=s.n()).done;){var l=o.value;this.ds=this.ds.add(new Ir(l.key,i)),this.Ht.addToCollectionParentIndex(e,l.key.path.popLast())}}catch(c){s.e(c)}finally{s.f()}return Jn.resolve(a)}},{key:"lookupMutationBatch",value:function(e,t){return Jn.resolve(this.ws(t))}},{key:"getNextMutationBatchAfterBatchId",value:function(e,t){var n=t+1,r=this._s(n),i=r<0?0:r;return Jn.resolve(this.In.length>i?this.In[i]:null)}},{key:"getHighestUnacknowledgedBatchId",value:function(){return Jn.resolve(0===this.In.length?-1:this.fs-1)}},{key:"getAllMutationBatches",value:function(e){return Jn.resolve(this.In.slice())}},{key:"getAllMutationBatchesAffectingDocumentKey",value:function(e,t){var n=this,r=new Ir(t,0),i=new Ir(t,Number.POSITIVE_INFINITY),a=[];return this.ds.forEachInRange([r,i],(function(e){var t=n.ws(e.ls);a.push(t)})),Jn.resolve(a)}},{key:"getAllMutationBatchesAffectingDocumentKeys",value:function(e,t){var n=this,r=new Bt(H);return t.forEach((function(e){var t=new Ir(e,0),i=new Ir(e,Number.POSITIVE_INFINITY);n.ds.forEachInRange([t,i],(function(e){r=r.add(e.ls)}))})),Jn.resolve(this.gs(r))}},{key:"getAllMutationBatchesAffectingQuery",value:function(e,t){var n=t.path,r=n.length+1,i=n;fe.isDocumentKey(i)||(i=i.child(""));var a=new Ir(new fe(i),0),o=new Bt(H);return this.ds.forEachWhile((function(e){var t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(o=o.add(e.ls)),!0)}),a),Jn.resolve(this.gs(o))}},{key:"gs",value:function(e){var t=this,n=[];return e.forEach((function(e){var r=t.ws(e);null!==r&&n.push(r)})),n}},{key:"removeMutationBatch",value:function(e,t){var n=this;N(0===this.ys(t.batchId,"removed")),this.In.shift();var r=this.ds;return Jn.forEach(t.mutations,(function(i){var a=new Ir(i.key,t.batchId);return r=r.delete(a),n.referenceDelegate.markPotentiallyOrphaned(e,i.key)})).next((function(){n.ds=r}))}},{key:"te",value:function(e){}},{key:"containsKey",value:function(e,t){var n=new Ir(t,0),r=this.ds.firstAfterOrEqual(n);return Jn.resolve(t.isEqual(r&&r.key))}},{key:"performConsistencyCheck",value:function(e){return this.In.length,Jn.resolve()}},{key:"ys",value:function(e,t){return this._s(e)}},{key:"_s",value:function(e){return 0===this.In.length?0:e-this.In[0].batchId}},{key:"ws",value:function(e){var t=this._s(e);return t<0||t>=this.In.length?null:this.In[t]}}]),e}(),Cr=function(){function e(t,n){Object(v.a)(this,e),this.Ht=t,this.ps=n,this.docs=new Vt(fe.comparator),this.size=0}return Object(y.a)(e,[{key:"addEntry",value:function(e,t,n){var r=t.key,i=this.docs.get(r),a=i?i.size:0,o=this.ps(t);return this.docs=this.docs.insert(r,{document:t.clone(),size:o,readTime:n}),this.size+=o-a,this.Ht.addToCollectionParentIndex(e,r.path.popLast())}},{key:"removeEntry",value:function(e){var t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}},{key:"getEntry",value:function(e,t){var n=this.docs.get(t);return Jn.resolve(n?n.document.clone():_e.newInvalidDocument(t))}},{key:"getEntries",value:function(e,t){var n=this,r=Kt();return t.forEach((function(e){var t=n.docs.get(e);r=r.insert(e,t?t.document.clone():_e.newInvalidDocument(e))})),Jn.resolve(r)}},{key:"getDocumentsMatchingQuery",value:function(e,t,n){for(var r=Kt(),i=new fe(t.path.child("")),a=this.docs.getIteratorFrom(i);a.hasNext();){var o=a.getNext(),u=o.key,s=o.value,l=s.document,c=s.readTime;if(!t.path.isPrefixOf(u.path))break;c.compareTo(n)<=0||ut(t,l)&&(r=r.insert(l.key,l.clone()))}return Jn.resolve(r)}},{key:"Es",value:function(e,t){return Jn.forEach(this.docs,(function(e){return t(e)}))}},{key:"newChangeBuffer",value:function(e){return new Nr(this)}},{key:"getSize",value:function(e){return Jn.resolve(this.size)}}]),e}(),Nr=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(v.a)(this,n),(r=t.call(this)).Se=e,r}return Object(y.a)(n,[{key:"applyChanges",value:function(e){var t=this,n=[];return this.changes.forEach((function(r,i){i.document.isValidDocument()?n.push(t.Se.addEntry(e,i.document,t.getReadTime(r))):t.Se.removeEntry(r)})),Jn.waitFor(n)}},{key:"getFromCache",value:function(e,t){return this.Se.getEntry(e,t)}},{key:"getAllFromCache",value:function(e,t){return this.Se.getEntries(e,t)}}]),n}(fr),Ar=function(){function e(t){Object(v.a)(this,e),this.persistence=t,this.Ts=new cr((function(e){return xe(e)}),Ce),this.lastRemoteSnapshotVersion=W.min(),this.highestTargetId=0,this.Is=0,this.As=new jr,this.targetCount=0,this.Rs=ur.se()}return Object(y.a)(e,[{key:"forEachTarget",value:function(e,t){return this.Ts.forEach((function(e,n){return t(n)})),Jn.resolve()}},{key:"getLastRemoteSnapshotVersion",value:function(e){return Jn.resolve(this.lastRemoteSnapshotVersion)}},{key:"getHighestSequenceNumber",value:function(e){return Jn.resolve(this.Is)}},{key:"allocateTargetId",value:function(e){return this.highestTargetId=this.Rs.next(),Jn.resolve(this.highestTargetId)}},{key:"setTargetsMetadata",value:function(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.Is&&(this.Is=t),Jn.resolve()}},{key:"ae",value:function(e){this.Ts.set(e.target,e);var t=e.targetId;t>this.highestTargetId&&(this.Rs=new ur(t),this.highestTargetId=t),e.sequenceNumber>this.Is&&(this.Is=e.sequenceNumber)}},{key:"addTargetData",value:function(e,t){return this.ae(t),this.targetCount+=1,Jn.resolve()}},{key:"updateTargetData",value:function(e,t){return this.ae(t),Jn.resolve()}},{key:"removeTargetData",value:function(e,t){return this.Ts.delete(t.target),this.As.cs(t.targetId),this.targetCount-=1,Jn.resolve()}},{key:"removeTargets",value:function(e,t,n){var r=this,i=0,a=[];return this.Ts.forEach((function(o,u){u.sequenceNumber<=t&&null===n.get(u.targetId)&&(r.Ts.delete(o),a.push(r.removeMatchingKeysForTargetId(e,u.targetId)),i++)})),Jn.waitFor(a).next((function(){return i}))}},{key:"getTargetCount",value:function(e){return Jn.resolve(this.targetCount)}},{key:"getTargetData",value:function(e,t){var n=this.Ts.get(t)||null;return Jn.resolve(n)}},{key:"addMatchingKeys",value:function(e,t,n){return this.As.ss(t,n),Jn.resolve()}},{key:"removeMatchingKeys",value:function(e,t,n){this.As.os(t,n);var r=this.persistence.referenceDelegate,i=[];return r&&t.forEach((function(t){i.push(r.markPotentiallyOrphaned(e,t))})),Jn.waitFor(i)}},{key:"removeMatchingKeysForTargetId",value:function(e,t){return this.As.cs(t),Jn.resolve()}},{key:"getMatchingKeysForTargetId",value:function(e,t){var n=this.As.hs(t);return Jn.resolve(n)}},{key:"containsKey",value:function(e,t){return Jn.resolve(this.As.containsKey(t))}}]),e}(),Dr=function(){function e(t,n){var r=this;Object(v.a)(this,e),this.bs={},this.Le=new z(0),this.Be=!1,this.Be=!0,this.referenceDelegate=t(this),this.ze=new Ar(this),this.Ht=new ir,this.He=function(e,t){return new Cr(e,(function(e){return r.referenceDelegate.Ps(e)}))}(this.Ht),this.N=new nr(n),this.Je=new _r(this.N)}return Object(y.a)(e,[{key:"start",value:function(){return Promise.resolve()}},{key:"shutdown",value:function(){return this.Be=!1,Promise.resolve()}},{key:"started",get:function(){return this.Be}},{key:"setDatabaseDeletedListener",value:function(){}},{key:"setNetworkEnabled",value:function(){}},{key:"getIndexManager",value:function(){return this.Ht}},{key:"getMutationQueue",value:function(e){var t=this.bs[e.toKey()];return t||(t=new xr(this.Ht,this.referenceDelegate),this.bs[e.toKey()]=t),t}},{key:"getTargetCache",value:function(){return this.ze}},{key:"getRemoteDocumentCache",value:function(){return this.He}},{key:"getBundleCache",value:function(){return this.Je}},{key:"runTransaction",value:function(e,t,n){var r=this;_("MemoryPersistence","Starting transaction:",e);var i=new Lr(this.Le.next());return this.referenceDelegate.vs(),n(i).next((function(e){return r.referenceDelegate.Vs(i).next((function(){return e}))})).toPromise().then((function(e){return i.raiseOnCommittedEvent(),e}))}},{key:"Ss",value:function(e,t){return Jn.or(Object.values(this.bs).map((function(n){return function(){return n.containsKey(e,t)}})))}}]),e}(),Lr=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(v.a)(this,n),(r=t.call(this)).currentSequenceNumber=e,r}return n}(Xn),Pr=function(){function e(t){Object(v.a)(this,e),this.persistence=t,this.Ds=new jr,this.Cs=null}return Object(y.a)(e,[{key:"xs",get:function(){if(this.Cs)return this.Cs;throw C()}},{key:"addReference",value:function(e,t,n){return this.Ds.addReference(n,t),this.xs.delete(n.toString()),Jn.resolve()}},{key:"removeReference",value:function(e,t,n){return this.Ds.removeReference(n,t),this.xs.add(n.toString()),Jn.resolve()}},{key:"markPotentiallyOrphaned",value:function(e,t){return this.xs.add(t.toString()),Jn.resolve()}},{key:"removeTarget",value:function(e,t){var n=this;this.Ds.cs(t.targetId).forEach((function(e){return n.xs.add(e.toString())}));var r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,t.targetId).next((function(e){e.forEach((function(e){return n.xs.add(e.toString())}))})).next((function(){return r.removeTargetData(e,t)}))}},{key:"vs",value:function(){this.Cs=new Set}},{key:"Vs",value:function(e){var t=this,n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return Jn.forEach(this.xs,(function(r){var i=fe.fromPath(r);return t.ks(e,i).next((function(e){e||n.removeEntry(i)}))})).next((function(){return t.Cs=null,n.apply(e)}))}},{key:"updateLimboDocument",value:function(e,t){var n=this;return this.ks(e,t).next((function(e){e?n.xs.delete(t.toString()):n.xs.add(t.toString())}))}},{key:"Ps",value:function(e){return 0}},{key:"ks",value:function(e,t){var n=this;return Jn.or([function(){return Jn.resolve(n.Ds.containsKey(t))},function(){return n.persistence.getTargetCache().containsKey(e,t)},function(){return n.persistence.Ss(e,t)}])}}],[{key:"Ns",value:function(t){return new e(t)}}]),e}();var Rr=function(){function e(){Object(v.a)(this,e),this.activeTargetIds=Xt()}return Object(y.a)(e,[{key:"Fs",value:function(e){this.activeTargetIds=this.activeTargetIds.add(e)}},{key:"Ms",value:function(e){this.activeTargetIds=this.activeTargetIds.delete(e)}},{key:"Os",value:function(){var e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}]),e}(),Fr=function(){function e(){Object(v.a)(this,e),this.yi=new Rr,this.pi={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}return Object(y.a)(e,[{key:"addPendingMutation",value:function(e){}},{key:"updateMutationState",value:function(e,t,n){}},{key:"addLocalQueryTarget",value:function(e){return this.yi.Fs(e),this.pi[e]||"not-current"}},{key:"updateQueryState",value:function(e,t,n){this.pi[e]=t}},{key:"removeLocalQueryTarget",value:function(e){this.yi.Ms(e)}},{key:"isLocalQueryTarget",value:function(e){return this.yi.activeTargetIds.has(e)}},{key:"clearQueryState",value:function(e){delete this.pi[e]}},{key:"getAllActiveQueryTargets",value:function(){return this.yi.activeTargetIds}},{key:"isActiveQueryTarget",value:function(e){return this.yi.activeTargetIds.has(e)}},{key:"start",value:function(){return this.yi=new Rr,Promise.resolve()}},{key:"handleUserChange",value:function(e,t,n){}},{key:"setOnlineState",value:function(e){}},{key:"shutdown",value:function(){}},{key:"writeSequenceNumber",value:function(e){}},{key:"notifyBundleLoaded",value:function(){}}]),e}(),Mr=function(){function e(){Object(v.a)(this,e)}return Object(y.a)(e,[{key:"Ei",value:function(e){}},{key:"shutdown",value:function(){}}]),e}(),Vr=function(){function e(){var t=this;Object(v.a)(this,e),this.Ti=function(){return t.Ii()},this.Ai=function(){return t.Ri()},this.bi=[],this.Pi()}return Object(y.a)(e,[{key:"Ei",value:function(e){this.bi.push(e)}},{key:"shutdown",value:function(){window.removeEventListener("online",this.Ti),window.removeEventListener("offline",this.Ai)}},{key:"Pi",value:function(){window.addEventListener("online",this.Ti),window.addEventListener("offline",this.Ai)}},{key:"Ii",value:function(){_("ConnectivityMonitor","Network connectivity changed: AVAILABLE");var e,t=Object(u.a)(this.bi);try{for(t.s();!(e=t.n()).done;){(0,e.value)(0)}}catch(n){t.e(n)}finally{t.f()}}},{key:"Ri",value:function(){_("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");var e,t=Object(u.a)(this.bi);try{for(t.s();!(e=t.n()).done;){(0,e.value)(1)}}catch(n){t.e(n)}finally{t.f()}}}],[{key:"bt",value:function(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}]),e}(),Ur={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"},zr=function(){function e(t){Object(v.a)(this,e),this.vi=t.vi,this.Vi=t.Vi}return Object(y.a)(e,[{key:"Si",value:function(e){this.Di=e}},{key:"Ci",value:function(e){this.Ni=e}},{key:"onMessage",value:function(e){this.xi=e}},{key:"close",value:function(){this.Vi()}},{key:"send",value:function(e){this.vi(e)}},{key:"ki",value:function(){this.Di()}},{key:"$i",value:function(e){this.Ni(e)}},{key:"Oi",value:function(e){this.xi(e)}}]),e}(),Br=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(v.a)(this,n),(r=t.call(this,e)).forceLongPolling=e.forceLongPolling,r.autoDetectLongPolling=e.autoDetectLongPolling,r.useFetchStreams=e.useFetchStreams,r}return Object(y.a)(n,[{key:"qi",value:function(e,t,n,r){return new Promise((function(i,a){var o=new w.g;o.listenOnce(w.c.COMPLETE,(function(){try{switch(o.getLastErrorCode()){case w.a.NO_ERROR:var t=o.getResponseJson();_("Connection","XHR received:",JSON.stringify(t)),i(t);break;case w.a.TIMEOUT:_("Connection",'RPC "'+e+'" timed out'),a(new L(D.DEADLINE_EXCEEDED,"Request time out"));break;case w.a.HTTP_ERROR:var n=o.getStatus();if(_("Connection",'RPC "'+e+'" failed with status:',n,"response text:",o.getResponseText()),n>0){var r=o.getResponseJson().error;if(r&&r.status&&r.message){var u=function(e){var t=e.toLowerCase().replace(/_/g,"-");return Object.values(D).indexOf(t)>=0?t:D.UNKNOWN}(r.status);a(new L(u,r.message))}else a(new L(D.UNKNOWN,"Server responded with status "+o.getStatus()))}else a(new L(D.UNAVAILABLE,"Connection failed."));break;default:C()}}finally{_("Connection",'RPC "'+e+'" completed.')}}));var u=JSON.stringify(r);o.send(t,"POST",u,n,15)}))}},{key:"ji",value:function(e,t){var n=[this.Fi,"/","google.firestore.v1.Firestore","/",e,"/channel"],r=Object(w.h)(),i=Object(w.i)(),a={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/".concat(this.databaseId.projectId,"/databases/").concat(this.databaseId.database)},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(a.xmlHttpFactory=new w.d({})),this.Ui(a.initMessageHeaders,t),Object(k.k)()||Object(k.l)()||Object(k.h)()||Object(k.i)()||Object(k.n)()||Object(k.g)()||(a.httpHeadersOverwriteParam="$httpHeaders");var o=n.join("");_("Connection","Creating WebChannel: "+o,a);var u=r.createWebChannel(o,a),s=!1,l=!1,c=new zr({vi:function(e){l?_("Connection","Not sending because WebChannel is closed:",e):(s||(_("Connection","Opening WebChannel transport."),u.open(),s=!0),_("Connection","WebChannel sending:",e),u.send(e))},Vi:function(){return u.close()}}),f=function(e,t,n){e.listen(t,(function(e){try{n(e)}catch(e){setTimeout((function(){throw e}),0)}}))};return f(u,w.f.EventType.OPEN,(function(){l||_("Connection","WebChannel transport opened.")})),f(u,w.f.EventType.CLOSE,(function(){l||(l=!0,_("Connection","WebChannel transport closed"),c.$i())})),f(u,w.f.EventType.ERROR,(function(e){l||(l=!0,I("Connection","WebChannel transport errored:",e),c.$i(new L(D.UNAVAILABLE,"The operation could not be completed")))})),f(u,w.f.EventType.MESSAGE,(function(e){var t;if(!l){var n=e.data[0];N(!!n);var r=n,i=r.error||(null===(t=r[0])||void 0===t?void 0:t.error);if(i){_("Connection","WebChannel received error:",i);var a=i.status,o=function(e){var t=Pt[e];if(void 0!==t)return Mt(t)}(a),s=i.message;void 0===o&&(o=D.INTERNAL,s="Unknown error status: "+a+" with message "+i.message),l=!0,c.$i(new L(o,s)),u.close()}else _("Connection","WebChannel received:",n),c.Oi(n)}})),f(i,w.b.STAT_EVENT,(function(e){e.stat===w.e.PROXY?_("Connection","Detected buffering proxy"):e.stat===w.e.NOPROXY&&_("Connection","Detected no buffering proxy")})),setTimeout((function(){c.ki()}),0),c}}]),n}(function(){function e(t){Object(v.a)(this,e),this.databaseInfo=t,this.databaseId=t.databaseId;var n=t.ssl?"https":"http";this.Fi=n+"://"+t.host,this.Mi="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}return Object(y.a)(e,[{key:"Li",value:function(e,t,n,r){var i=this.Bi(e,t);_("RestConnection","Sending: ",i,n);var a={};return this.Ui(a,r),this.qi(e,i,a,n).then((function(e){return _("RestConnection","Received: ",e),e}),(function(t){throw I("RestConnection","".concat(e," failed with error: "),t,"url: ",i,"request:",n),t}))}},{key:"Ki",value:function(e,t,n,r){return this.Li(e,t,n,r)}},{key:"Ui",value:function(e,t){if(e["X-Goog-Api-Client"]="gl-js/ fire/"+O,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t)for(var n in t.authHeaders)t.authHeaders.hasOwnProperty(n)&&(e[n]=t.authHeaders[n])}},{key:"Bi",value:function(e,t){var n=Ur[e];return"".concat(this.Fi,"/v1/").concat(t,":").concat(n)}}]),e}());function qr(){return"undefined"!=typeof document?document:null}function Hr(e){return new cn(e,!0)}var Kr=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1.5,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:6e4;Object(v.a)(this,e),this.Oe=t,this.timerId=n,this.Qi=r,this.Wi=i,this.Gi=a,this.zi=0,this.Hi=null,this.Ji=Date.now(),this.reset()}return Object(y.a)(e,[{key:"reset",value:function(){this.zi=0}},{key:"Yi",value:function(){this.zi=this.Gi}},{key:"Xi",value:function(e){var t=this;this.cancel();var n=Math.floor(this.zi+this.Zi()),r=Math.max(0,Date.now()-this.Ji),i=Math.max(0,n-r);i>0&&_("ExponentialBackoff","Backing off for ".concat(i," ms (base delay: ").concat(this.zi," ms, delay with jitter: ").concat(n," ms, last attempt: ").concat(r," ms ago)")),this.Hi=this.Oe.enqueueAfterDelay(this.timerId,i,(function(){return t.Ji=Date.now(),e()})),this.zi*=this.Wi,this.zi<this.Qi&&(this.zi=this.Qi),this.zi>this.Gi&&(this.zi=this.Gi)}},{key:"tr",value:function(){null!==this.Hi&&(this.Hi.skipDelay(),this.Hi=null)}},{key:"cancel",value:function(){null!==this.Hi&&(this.Hi.cancel(),this.Hi=null)}},{key:"Zi",value:function(){return(Math.random()-.5)*this.zi}}]),e}(),Gr=function(){function e(t,n,r,i,a,o){Object(v.a)(this,e),this.Oe=t,this.er=r,this.nr=i,this.credentialsProvider=a,this.listener=o,this.state=0,this.sr=0,this.ir=null,this.stream=null,this.rr=new Kr(t,n)}return Object(y.a)(e,[{key:"ar",value:function(){return 1===this.state||2===this.state||4===this.state}},{key:"cr",value:function(){return 2===this.state}},{key:"start",value:function(){3!==this.state?this.auth():this.ur()}},{key:"stop",value:function(){var e=Object(c.a)(l.a.mark((function e(){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.ar(),!e.t0){e.next=4;break}return e.next=4,this.close(0);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"hr",value:function(){this.state=0,this.rr.reset()}},{key:"lr",value:function(){var e=this;this.cr()&&null===this.ir&&(this.ir=this.Oe.enqueueAfterDelay(this.er,6e4,(function(){return e.dr()})))}},{key:"wr",value:function(e){this._r(),this.stream.send(e)}},{key:"dr",value:function(){var e=Object(c.a)(l.a.mark((function e(){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.cr()){e.next=2;break}return e.abrupt("return",this.close(0));case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_r",value:function(){this.ir&&(this.ir.cancel(),this.ir=null)}},{key:"close",value:function(){var e=Object(c.a)(l.a.mark((function e(t,n){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._r(),this.rr.cancel(),this.sr++,3!==t?this.rr.reset():n&&n.code===D.RESOURCE_EXHAUSTED?(j(n.toString()),j("Using maximum backoff delay to prevent overloading the backend."),this.rr.Yi()):n&&n.code===D.UNAUTHENTICATED&&this.credentialsProvider.invalidateToken(),null!==this.stream&&(this.mr(),this.stream.close(),this.stream=null),this.state=t,e.next=8,this.listener.Ci(n);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"mr",value:function(){}},{key:"auth",value:function(){var e=this;this.state=1;var t=this.gr(this.sr),n=this.sr;this.credentialsProvider.getToken().then((function(t){e.sr===n&&e.yr(t)}),(function(n){t((function(){var t=new L(D.UNKNOWN,"Fetching auth token failed: "+n.message);return e.pr(t)}))}))}},{key:"yr",value:function(e){var t=this,n=this.gr(this.sr);this.stream=this.Er(e),this.stream.Si((function(){n((function(){return t.state=2,t.listener.Si()}))})),this.stream.Ci((function(e){n((function(){return t.pr(e)}))})),this.stream.onMessage((function(e){n((function(){return t.onMessage(e)}))}))}},{key:"ur",value:function(){var e=this;this.state=4,this.rr.Xi(Object(c.a)(l.a.mark((function t(){return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.state=0,e.start();case 1:case"end":return t.stop()}}),t)}))))}},{key:"pr",value:function(e){return _("PersistentStream","close with error: ".concat(e)),this.stream=null,this.close(3,e)}},{key:"gr",value:function(e){var t=this;return function(n){t.Oe.enqueueAndForget((function(){return t.sr===e?n():(_("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}}}]),e}(),Wr=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i,a,o){var u;return Object(v.a)(this,n),(u=t.call(this,e,"listen_stream_connection_backoff","listen_stream_idle",r,i,o)).N=a,u}return Object(y.a)(n,[{key:"Er",value:function(e){return this.nr.ji("Listen",e)}},{key:"onMessage",value:function(e){this.rr.reset();var t=function(e,t){var n;if("targetChange"in t){t.targetChange;var r=function(e){return"NO_CHANGE"===e?0:"ADD"===e?1:"REMOVE"===e?2:"CURRENT"===e?3:"RESET"===e?4:C()}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],a=function(e,t){return e.D?(N(void 0===t||"string"==typeof t),te.fromBase64String(t||"")):(N(void 0===t||t instanceof Uint8Array),te.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),o=t.targetChange.cause,u=o&&function(e){var t=void 0===e.code?D.UNKNOWN:Mt(e.code);return new L(t,e.message||"")}(o);n=new nn(r,i,a,u||null)}else if("documentChange"in t){t.documentChange;var s=t.documentChange;s.document,s.document.name,s.document.updateTime;var l=yn(e,s.document.name),c=dn(s.document.updateTime),f=new Te({mapValue:{fields:s.document.fields}}),h=_e.newFoundDocument(l,c,f),d=s.targetIds||[],p=s.removedTargetIds||[];n=new en(d,p,h.key,h)}else if("documentDelete"in t){t.documentDelete;var v=t.documentDelete;v.document;var y=yn(e,v.document),g=v.readTime?dn(v.readTime):W.min(),m=_e.newNoDocument(y,g),b=v.removedTargetIds||[];n=new en([],b,m.key,m)}else if("documentRemove"in t){t.documentRemove;var k=t.documentRemove;k.document;var w=yn(e,k.document),E=k.removedTargetIds||[];n=new en([],E,w,null)}else{if(!("filter"in t))return C();t.filter;var O=t.filter;O.targetId;var S=O.count||0,T=new Ft(S),_=O.targetId;n=new tn(_,T)}return n}(this.N,e),n=function(e){if(!("targetChange"in e))return W.min();var t=e.targetChange;return t.targetIds&&t.targetIds.length?W.min():t.readTime?dn(t.readTime):W.min()}(e);return this.listener.Tr(t,n)}},{key:"Ir",value:function(e){var t={};t.database=bn(this.N),t.addTarget=function(e,t){var n,r=t.target;return(n=Ne(r)?{documents:wn(e,r)}:{query:En(e,r)}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0?n.resumeToken=hn(e,t.resumeToken):t.snapshotVersion.compareTo(W.min())>0&&(n.readTime=fn(e,t.snapshotVersion.toTimestamp())),n}(this.N,e);var n=function(e,t){var n=function(e,t){switch(t){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return C()}}(0,t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.N,e);n&&(t.labels=n),this.wr(t)}},{key:"Ar",value:function(e){var t={};t.database=bn(this.N),t.removeTarget=e,this.wr(t)}}]),n}(Gr),Qr=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i){var a;return Object(v.a)(this,n),(a=t.call(this)).credentials=e,a.nr=r,a.N=i,a.Dr=!1,a}return Object(y.a)(n,[{key:"Cr",value:function(){if(this.Dr)throw new L(D.FAILED_PRECONDITION,"The client has already been terminated.")}},{key:"Li",value:function(e,t,n){var r=this;return this.Cr(),this.credentials.getToken().then((function(i){return r.nr.Li(e,t,n,i)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===D.UNAUTHENTICATED&&r.credentials.invalidateToken(),e):new L(D.UNKNOWN,e.toString())}))}},{key:"Ki",value:function(e,t,n){var r=this;return this.Cr(),this.credentials.getToken().then((function(i){return r.nr.Ki(e,t,n,i)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===D.UNAUTHENTICATED&&r.credentials.invalidateToken(),e):new L(D.UNKNOWN,e.toString())}))}},{key:"terminate",value:function(){this.Dr=!0}}]),n}(function(){return function e(){Object(v.a)(this,e)}}()),$r=function(){function e(t,n){Object(v.a)(this,e),this.asyncQueue=t,this.onlineStateHandler=n,this.state="Unknown",this.Nr=0,this.kr=null,this.$r=!0}return Object(y.a)(e,[{key:"Or",value:function(){var e=this;0===this.Nr&&(this.Fr("Unknown"),this.kr=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(function(){return e.kr=null,e.Mr("Backend didn't respond within 10 seconds."),e.Fr("Offline"),Promise.resolve()})))}},{key:"Lr",value:function(e){"Online"===this.state?this.Fr("Unknown"):(this.Nr++,this.Nr>=1&&(this.Br(),this.Mr("Connection failed 1 times. Most recent error: ".concat(e.toString())),this.Fr("Offline")))}},{key:"set",value:function(e){this.Br(),this.Nr=0,"Online"===e&&(this.$r=!1),this.Fr(e)}},{key:"Fr",value:function(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}},{key:"Mr",value:function(e){var t="Could not reach Cloud Firestore backend. ".concat(e,"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.");this.$r?(j(t),this.$r=!1):_("OnlineStateTracker",t)}},{key:"Br",value:function(){null!==this.kr&&(this.kr.cancel(),this.kr=null)}}]),e}(),Yr=function e(t,n,r,i,a){var o=this;Object(v.a)(this,e),this.localStore=t,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.Ur=[],this.qr=new Map,this.Kr=new Set,this.jr=[],this.Qr=a,this.Qr.Ei((function(e){r.enqueueAndForget(Object(c.a)(l.a.mark((function e(){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=ui(o),!e.t0){e.next=5;break}return _("RemoteStore","Restarting streams for network reachability change."),e.next=5,function(){var e=Object(c.a)(l.a.mark((function e(t){var n;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=A(t)).Kr.add(4),e.next=4,Zr(n);case 4:return n.Wr.set("Unknown"),n.Kr.delete(4),e.next=8,Xr(n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(o);case 5:case"end":return e.stop()}}),e)}))))})),this.Wr=new $r(r,i)};function Xr(e){return Jr.apply(this,arguments)}function Jr(){return(Jr=Object(c.a)(l.a.mark((function e(t){var n,r,i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ui(t)){e.next=18;break}n=Object(u.a)(t.jr),e.prev=2,n.s();case 4:if((r=n.n()).done){e.next=10;break}return i=r.value,e.next=8,i(!0);case 8:e.next=4;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[2,12,15,18]])})))).apply(this,arguments)}function Zr(e){return ei.apply(this,arguments)}function ei(){return(ei=Object(c.a)(l.a.mark((function e(t){var n,r,i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Object(u.a)(t.jr),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return i=r.value,e.next=7,i(!1);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})))).apply(this,arguments)}function ti(e,t){var n=A(e);n.qr.has(t.targetId)||(n.qr.set(t.targetId,t),oi(n)?ai(n):bi(n).cr()&&ri(n,t))}function ni(e,t){var n=A(e),r=bi(n);n.qr.delete(t),r.cr()&&ii(n,t),0===n.qr.size&&(r.cr()?r.lr():ui(n)&&n.Wr.set("Unknown"))}function ri(e,t){e.Gr.Y(t.targetId),bi(e).Ir(t)}function ii(e,t){e.Gr.Y(t),bi(e).Ar(t)}function ai(e){e.Gr=new an({getRemoteKeysForTarget:function(t){return e.remoteSyncer.getRemoteKeysForTarget(t)},Et:function(t){return e.qr.get(t)||null}}),bi(e).start(),e.Wr.Or()}function oi(e){return ui(e)&&!bi(e).ar()&&e.qr.size>0}function ui(e){return 0===A(e).Kr.size}function si(e){e.Gr=void 0}function li(e){return ci.apply(this,arguments)}function ci(){return(ci=Object(c.a)(l.a.mark((function e(t){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.qr.forEach((function(e,n){ri(t,e)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fi(e,t){return hi.apply(this,arguments)}function hi(){return(hi=Object(c.a)(l.a.mark((function e(t,n){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:si(t),oi(t)?(t.Wr.Lr(n),ai(t)):t.Wr.set("Unknown");case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function di(e,t,n){return pi.apply(this,arguments)}function pi(){return pi=Object(c.a)(l.a.mark((function e(t,n,r){var i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.Wr.set("Online"),!(n instanceof nn&&2===n.state&&n.cause)){e.next=13;break}return e.prev=1,e.next=4,function(){var e=Object(c.a)(l.a.mark((function e(t,n){var r,i,a,o;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.cause,i=Object(u.a)(n.targetIds),e.prev=2,i.s();case 4:if((a=i.n()).done){e.next=14;break}if(o=a.value,e.t0=t.qr.has(o),!e.t0){e.next=12;break}return e.next=10,t.remoteSyncer.rejectListen(o,r);case 10:t.qr.delete(o),t.Gr.removeTarget(o);case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t1=e.catch(2),i.e(e.t1);case 19:return e.prev=19,i.f(),e.finish(19);case 22:case"end":return e.stop()}}),e,null,[[2,16,19,22]])})));return function(t,n){return e.apply(this,arguments)}}()(t,n);case 4:e.next=11;break;case 6:return e.prev=6,e.t0=e.catch(1),_("RemoteStore","Failed to remove targets %s: %s ",n.targetIds.join(","),e.t0),e.next=11,vi(t,e.t0);case 11:case 22:e.next=29;break;case 13:if(n instanceof en?t.Gr.rt(n):n instanceof tn?t.Gr.ft(n):t.Gr.ct(n),r.isEqual(W.min())){e.next=29;break}return e.prev=14,e.next=17,br(t.localStore);case 17:if(i=e.sent,e.t1=r.compareTo(i)>=0,!e.t1){e.next=22;break}return e.next=22,function(e,t){var n=e.Gr._t(t);return n.targetChanges.forEach((function(n,r){if(n.resumeToken.approximateByteSize()>0){var i=e.qr.get(r);i&&e.qr.set(r,i.withResumeToken(n.resumeToken,t))}})),n.targetMismatches.forEach((function(t){var n=e.qr.get(t);if(n){e.qr.set(t,n.withResumeToken(te.EMPTY_BYTE_STRING,n.snapshotVersion)),ii(e,t);var r=new tr(n.target,t,1,n.sequenceNumber);ri(e,r)}})),e.remoteSyncer.applyRemoteEvent(n)}(t,r);case 24:return e.prev=24,e.t2=e.catch(14),_("RemoteStore","Failed to raise snapshot:",e.t2),e.next=29,vi(t,e.t2);case 29:case"end":return e.stop()}}),e,null,[[1,6],[14,24]])}))),pi.apply(this,arguments)}function vi(e,t,n){return yi.apply(this,arguments)}function yi(){return(yi=Object(c.a)(l.a.mark((function e(t,n,r){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Zn(n)){e.next=2;break}throw n;case 2:return t.Kr.add(1),e.next=5,Zr(t);case 5:t.Wr.set("Offline"),r||(r=function(){return br(t.localStore)}),t.asyncQueue.enqueueRetryable(Object(c.a)(l.a.mark((function e(){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _("RemoteStore","Retrying IndexedDB access"),e.next=3,r();case 3:return t.Kr.delete(1),e.next=6,Xr(t);case 6:case"end":return e.stop()}}),e)}))));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function gi(e,t){return mi.apply(this,arguments)}function mi(){return(mi=Object(c.a)(l.a.mark((function e(t,n){var r;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=A(t),!n){e.next=7;break}return r.Kr.delete(2),e.next=5,Xr(r);case 5:e.next=13;break;case 7:if(e.t0=n,e.t0){e.next=13;break}return r.Kr.add(2),e.next=12,Zr(r);case 12:r.Wr.set("Unknown");case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bi(e){return e.zr||(e.zr=function(e,t,n){var r=A(e);return r.Cr(),new Wr(t,r.nr,r.credentials,r.N,n)}(e.datastore,e.asyncQueue,{Si:li.bind(null,e),Ci:fi.bind(null,e),Tr:di.bind(null,e)}),e.jr.push(function(){var t=Object(c.a)(l.a.mark((function t(n){return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=4;break}e.zr.hr(),oi(e)?ai(e):e.Wr.set("Unknown"),t.next=7;break;case 4:return t.next=6,e.zr.stop();case 6:si(e);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())),e.zr}var ki=function(){function e(t,n,r,i,a){Object(v.a)(this,e),this.asyncQueue=t,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=a,this.deferred=new P,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((function(e){}))}return Object(y.a)(e,[{key:"start",value:function(e){var t=this;this.timerHandle=setTimeout((function(){return t.handleDelayElapsed()}),e)}},{key:"skipDelay",value:function(){return this.handleDelayElapsed()}},{key:"cancel",value:function(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new L(D.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}},{key:"handleDelayElapsed",value:function(){var e=this;this.asyncQueue.enqueueAndForget((function(){return null!==e.timerHandle?(e.clearTimeout(),e.op().then((function(t){return e.deferred.resolve(t)}))):Promise.resolve()}))}},{key:"clearTimeout",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}))}],[{key:"createAndSchedule",value:function(t,n,r,i,a){var o=new e(t,n,Date.now()+r,i,a);return o.start(r),o}}]),e}();function wi(e,t){if(j("AsyncQueue","".concat(t,": ").concat(e)),Zn(e))return new L(D.UNAVAILABLE,"".concat(t,": ").concat(e));throw e}var Ei=function(){function e(t){Object(v.a)(this,e),this.comparator=t?function(e,n){return t(e,n)||fe.comparator(e.key,n.key)}:function(e,t){return fe.comparator(e.key,t.key)},this.keyedMap=Wt(),this.sortedSet=new Vt(this.comparator)}return Object(y.a)(e,[{key:"has",value:function(e){return null!=this.keyedMap.get(e)}},{key:"get",value:function(e){return this.keyedMap.get(e)}},{key:"first",value:function(){return this.sortedSet.minKey()}},{key:"last",value:function(){return this.sortedSet.maxKey()}},{key:"isEmpty",value:function(){return this.sortedSet.isEmpty()}},{key:"indexOf",value:function(e){var t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}},{key:"size",get:function(){return this.sortedSet.size}},{key:"forEach",value:function(e){this.sortedSet.inorderTraversal((function(t,n){return e(t),!1}))}},{key:"add",value:function(e){var t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}},{key:"delete",value:function(e){var t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}},{key:"isEqual",value:function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.sortedSet.getIterator(),r=t.sortedSet.getIterator();n.hasNext();){var i=n.getNext().key,a=r.getNext().key;if(!i.isEqual(a))return!1}return!0}},{key:"toString",value:function(){var e=[];return this.forEach((function(t){e.push(t.toString())})),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"}},{key:"copy",value:function(t,n){var r=new e;return r.comparator=this.comparator,r.keyedMap=t,r.sortedSet=n,r}}],[{key:"emptySet",value:function(t){return new e(t.comparator)}}]),e}(),Oi=function(){function e(){Object(v.a)(this,e),this.Jr=new Vt(fe.comparator)}return Object(y.a)(e,[{key:"track",value:function(e){var t=e.doc.key,n=this.Jr.get(t);n?0!==e.type&&3===n.type?this.Jr=this.Jr.insert(t,e):3===e.type&&1!==n.type?this.Jr=this.Jr.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.Jr=this.Jr.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.Jr=this.Jr.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.Jr=this.Jr.remove(t):1===e.type&&2===n.type?this.Jr=this.Jr.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.Jr=this.Jr.insert(t,{type:2,doc:e.doc}):C():this.Jr=this.Jr.insert(t,e)}},{key:"Yr",value:function(){var e=[];return this.Jr.inorderTraversal((function(t,n){e.push(n)})),e}}]),e}(),Si=function(){function e(t,n,r,i,a,o,u,s){Object(v.a)(this,e),this.query=t,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=a,this.fromCache=o,this.syncStateChanged=u,this.excludesMetadataChanges=s}return Object(y.a)(e,[{key:"hasPendingWrites",get:function(){return!this.mutatedKeys.isEmpty()}},{key:"isEqual",value:function(e){if(!(this.fromCache===e.fromCache&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&it(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;var t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++)if(t[r].type!==n[r].type||!t[r].doc.isEqual(n[r].doc))return!1;return!0}}],[{key:"fromInitialDocuments",value:function(t,n,r,i){var a=[];return n.forEach((function(e){a.push({type:0,doc:e})})),new e(t,n,Ei.emptySet(n),a,r,i,!0,!1)}}]),e}(),Ti=function e(){Object(v.a)(this,e),this.Xr=void 0,this.listeners=[]},_i=function e(){Object(v.a)(this,e),this.queries=new cr((function(e){return at(e)}),it),this.onlineState="Unknown",this.Zr=new Set};function ji(e,t){return Ii.apply(this,arguments)}function Ii(){return(Ii=Object(c.a)(l.a.mark((function e(t,n){var r,i,a,o,u;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=A(t),i=n.query,a=!1,(o=r.queries.get(i))||(a=!0,o=new Ti),!a){e.next=13;break}return e.prev=3,e.next=6,r.onListen(i);case 6:o.Xr=e.sent,e.next=13;break;case 9:return e.prev=9,e.t0=e.catch(3),u=wi(e.t0,"Initialization of query '".concat(ot(n.query),"' failed")),e.abrupt("return",void n.onError(u));case 13:r.queries.set(i,o),o.listeners.push(n),n.eo(r.onlineState),o.Xr&&n.no(o.Xr)&&Di(r);case 14:case"end":return e.stop()}}),e,null,[[3,9]])})))).apply(this,arguments)}function xi(e,t){return Ci.apply(this,arguments)}function Ci(){return(Ci=Object(c.a)(l.a.mark((function e(t,n){var r,i,a,o,u;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=A(t),i=n.query,a=!1,(o=r.queries.get(i))&&(u=o.listeners.indexOf(n))>=0&&(o.listeners.splice(u,1),a=0===o.listeners.length),!a){e.next=6;break}return e.abrupt("return",(r.queries.delete(i),r.onUnlisten(i)));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ni(e,t){var n,r=A(e),i=!1,a=Object(u.a)(t);try{for(a.s();!(n=a.n()).done;){var o=n.value,s=o.query,l=r.queries.get(s);if(l){var c,f=Object(u.a)(l.listeners);try{for(f.s();!(c=f.n()).done;){c.value.no(o)&&(i=!0)}}catch(h){f.e(h)}finally{f.f()}l.Xr=o}}}catch(h){a.e(h)}finally{a.f()}i&&Di(r)}function Ai(e,t,n){var r=A(e),i=r.queries.get(t);if(i){var a,o=Object(u.a)(i.listeners);try{for(o.s();!(a=o.n()).done;){a.value.onError(n)}}catch(s){o.e(s)}finally{o.f()}}r.queries.delete(t)}function Di(e){e.Zr.forEach((function(e){e.next()}))}var Li=function(){function e(t,n,r){Object(v.a)(this,e),this.query=t,this.so=n,this.io=!1,this.ro=null,this.onlineState="Unknown",this.options=r||{}}return Object(y.a)(e,[{key:"no",value:function(e){if(!this.options.includeMetadataChanges){var t,n=[],r=Object(u.a)(e.docChanges);try{for(r.s();!(t=r.n()).done;){var i=t.value;3!==i.type&&n.push(i)}}catch(o){r.e(o)}finally{r.f()}e=new Si(e.query,e.docs,e.oldDocs,n,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0)}var a=!1;return this.io?this.oo(e)&&(this.so.next(e),a=!0):this.ao(e,this.onlineState)&&(this.co(e),a=!0),this.ro=e,a}},{key:"onError",value:function(e){this.so.error(e)}},{key:"eo",value:function(e){this.onlineState=e;var t=!1;return this.ro&&!this.io&&this.ao(this.ro,e)&&(this.co(this.ro),t=!0),t}},{key:"ao",value:function(e,t){if(!e.fromCache)return!0;var n="Offline"!==t;return(!this.options.uo||!n)&&(!e.docs.isEmpty()||"Offline"===t)}},{key:"oo",value:function(e){if(e.docChanges.length>0)return!0;var t=this.ro&&this.ro.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}},{key:"co",value:function(e){e=Si.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache),this.io=!0,this.so.next(e)}}]),e}();var Pi=function e(t){Object(v.a)(this,e),this.key=t},Ri=function e(t){Object(v.a)(this,e),this.key=t},Fi=function(){function e(t,n){Object(v.a)(this,e),this.query=t,this._o=n,this.mo=null,this.current=!1,this.yo=$t(),this.mutatedKeys=$t(),this.po=st(t),this.Eo=new Ei(this.po)}return Object(y.a)(e,[{key:"To",get:function(){return this._o}},{key:"Io",value:function(e,t){var n=this,r=t?t.Ao:new Oi,i=t?t.Eo:this.Eo,a=t?t.mutatedKeys:this.mutatedKeys,o=i,u=!1,s=Ye(this.query)&&i.size===this.query.limit?i.last():null,l=Xe(this.query)&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((function(e,t){var c=i.get(e),f=ut(n.query,t)?t:null,h=!!c&&n.mutatedKeys.has(c.key),d=!!f&&(f.hasLocalMutations||n.mutatedKeys.has(f.key)&&f.hasCommittedMutations),p=!1;c&&f?c.data.isEqual(f.data)?h!==d&&(r.track({type:3,doc:f}),p=!0):n.Ro(c,f)||(r.track({type:2,doc:f}),p=!0,(s&&n.po(f,s)>0||l&&n.po(f,l)<0)&&(u=!0)):!c&&f?(r.track({type:0,doc:f}),p=!0):c&&!f&&(r.track({type:1,doc:c}),p=!0,(s||l)&&(u=!0)),p&&(f?(o=o.add(f),a=d?a.add(e):a.delete(e)):(o=o.delete(e),a=a.delete(e)))})),Ye(this.query)||Xe(this.query))for(;o.size>this.query.limit;){var c=Ye(this.query)?o.last():o.first();o=o.delete(c.key),a=a.delete(c.key),r.track({type:1,doc:c})}return{Eo:o,Ao:r,Ln:u,mutatedKeys:a}}},{key:"Ro",value:function(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}},{key:"applyChanges",value:function(e,t,n){var r=this,i=this.Eo;this.Eo=e.Eo,this.mutatedKeys=e.mutatedKeys;var a=e.Ao.Yr();a.sort((function(e,t){return function(e,t){var n=function(e){switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return C()}};return n(e)-n(t)}(e.type,t.type)||r.po(e.doc,t.doc)})),this.bo(n);var o=t?this.Po():[],u=0===this.yo.size&&this.current?1:0,s=u!==this.mo;return this.mo=u,0!==a.length||s?{snapshot:new Si(this.query,e.Eo,i,a,e.mutatedKeys,0===u,s,!1),vo:o}:{vo:o}}},{key:"eo",value:function(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({Eo:this.Eo,Ao:new Oi,mutatedKeys:this.mutatedKeys,Ln:!1},!1)):{vo:[]}}},{key:"Vo",value:function(e){return!this._o.has(e)&&!!this.Eo.has(e)&&!this.Eo.get(e).hasLocalMutations}},{key:"bo",value:function(e){var t=this;e&&(e.addedDocuments.forEach((function(e){return t._o=t._o.add(e)})),e.modifiedDocuments.forEach((function(e){})),e.removedDocuments.forEach((function(e){return t._o=t._o.delete(e)})),this.current=e.current)}},{key:"Po",value:function(){var e=this;if(!this.current)return[];var t=this.yo;this.yo=$t(),this.Eo.forEach((function(t){e.Vo(t.key)&&(e.yo=e.yo.add(t.key))}));var n=[];return t.forEach((function(t){e.yo.has(t)||n.push(new Ri(t))})),this.yo.forEach((function(e){t.has(e)||n.push(new Pi(e))})),n}},{key:"So",value:function(e){this._o=e.Gn,this.yo=$t();var t=this.Io(e.documents);return this.applyChanges(t,!0)}},{key:"Do",value:function(){return Si.fromInitialDocuments(this.query,this.Eo,this.mutatedKeys,0===this.mo)}}]),e}(),Mi=function e(t,n,r){Object(v.a)(this,e),this.query=t,this.targetId=n,this.view=r},Vi=function e(t){Object(v.a)(this,e),this.key=t,this.Co=!1},Ui=function(){function e(t,n,r,i,a,o){Object(v.a)(this,e),this.localStore=t,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=a,this.maxConcurrentLimboResolutions=o,this.No={},this.xo=new cr((function(e){return at(e)}),it),this.ko=new Map,this.$o=new Set,this.Oo=new Vt(fe.comparator),this.Fo=new Map,this.Mo=new jr,this.Lo={},this.Bo=new Map,this.Uo=ur.ie(),this.onlineState="Unknown",this.qo=void 0}return Object(y.a)(e,[{key:"isPrimaryClient",get:function(){return!0===this.qo}}]),e}();function zi(e,t){return Bi.apply(this,arguments)}function Bi(){return(Bi=Object(c.a)(l.a.mark((function e(t,n){var r,i,a,o,u,s;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=sa(t),!(o=r.xo.get(n))){e.next=6;break}i=o.targetId,r.sharedClientState.addLocalQueryTarget(i),a=o.view.Do(),e.next=15;break;case 6:return e.next=8,Er(r.localStore,nt(n));case 8:return u=e.sent,s=r.sharedClientState.addLocalQueryTarget(u.targetId),i=u.targetId,e.next=13,qi(r,n,i,"current"===s);case 13:a=e.sent,r.isPrimaryClient&&ti(r.remoteStore,u);case 15:return e.abrupt("return",a);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qi(e,t,n,r){return Hi.apply(this,arguments)}function Hi(){return Hi=Object(c.a)(l.a.mark((function e(t,n,r,i){var a,o,u,s,f,h;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.Ko=function(e,n,r){return function(){var e=Object(c.a)(l.a.mark((function e(t,n,r,i){var a,o,u;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.view.Io(r),e.t0=a.Ln,!e.t0){e.next=6;break}return e.next=5,Tr(t.localStore,n.query,!1).then((function(e){var t=e.documents;return n.view.Io(t,a)}));case 5:a=e.sent;case 6:return o=i&&i.targetChanges.get(n.targetId),u=n.view.applyChanges(a,t.isPrimaryClient,o),e.abrupt("return",(ea(t,n.targetId,u.vo),u.snapshot));case 8:case"end":return e.stop()}}),e)})));return function(t,n,r,i){return e.apply(this,arguments)}}()(t,e,n,r)},e.next=3,Tr(t.localStore,n,!0);case 3:return a=e.sent,o=new Fi(n,a.Gn),u=o.Io(a.documents),s=Zt.createSynthesizedTargetChangeForCurrentChange(r,i&&"Offline"!==t.onlineState),f=o.applyChanges(u,t.isPrimaryClient,s),ea(t,r,f.vo),h=new Mi(n,r,o),e.abrupt("return",(t.xo.set(n,h),t.ko.has(r)?t.ko.get(r).push(n):t.ko.set(r,[n]),f.snapshot));case 11:case"end":return e.stop()}}),e)}))),Hi.apply(this,arguments)}function Ki(e,t){return Gi.apply(this,arguments)}function Gi(){return(Gi=Object(c.a)(l.a.mark((function e(t,n){var r,i,a;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=A(t),i=r.xo.get(n),!((a=r.ko.get(i.targetId)).length>1)){e.next=3;break}return e.abrupt("return",(r.ko.set(i.targetId,a.filter((function(e){return!it(e,n)}))),void r.xo.delete(n)));case 3:if(!r.isPrimaryClient){e.next=11;break}if(r.sharedClientState.removeLocalQueryTarget(i.targetId),e.t0=r.sharedClientState.isActiveQueryTarget(i.targetId),e.t0){e.next=9;break}return e.next=9,Or(r.localStore,i.targetId,!1).then((function(){r.sharedClientState.clearQueryState(i.targetId),ni(r.remoteStore,i.targetId),Ji(r,i.targetId)})).catch(sr);case 9:e.next=14;break;case 11:return Ji(r,i.targetId),e.next=14,Or(r.localStore,i.targetId,!0);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wi(e,t){return Qi.apply(this,arguments)}function Qi(){return(Qi=Object(c.a)(l.a.mark((function e(t,n){var r,i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=A(t),e.prev=1,e.next=4,kr(r.localStore,n);case 4:return i=e.sent,n.targetChanges.forEach((function(e,t){var n=r.Fo.get(t);n&&(N(e.addedDocuments.size+e.modifiedDocuments.size+e.removedDocuments.size<=1),e.addedDocuments.size>0?n.Co=!0:e.modifiedDocuments.size>0?N(n.Co):e.removedDocuments.size>0&&(N(n.Co),n.Co=!1))})),e.next=8,ra(r,i,n);case 8:e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(1),e.next=14,sr(e.t0);case 14:case"end":return e.stop()}}),e,null,[[1,10]])})))).apply(this,arguments)}function $i(e,t,n){var r=A(e);if(r.isPrimaryClient&&0===n||!r.isPrimaryClient&&1===n){var i=[];r.xo.forEach((function(e,n){var r=n.view.eo(t);r.snapshot&&i.push(r.snapshot)})),function(e,t){var n=A(e);n.onlineState=t;var r=!1;n.queries.forEach((function(e,n){var i,a=Object(u.a)(n.listeners);try{for(a.s();!(i=a.n()).done;){i.value.eo(t)&&(r=!0)}}catch(o){a.e(o)}finally{a.f()}})),r&&Di(n)}(r.eventManager,t),i.length&&r.No.Tr(i),r.onlineState=t,r.isPrimaryClient&&r.sharedClientState.setOnlineState(t)}}function Yi(e,t,n){return Xi.apply(this,arguments)}function Xi(){return(Xi=Object(c.a)(l.a.mark((function e(t,n,r){var i,a,o,u,s,c;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=A(t)).sharedClientState.updateQueryState(n,"rejected",r),a=i.Fo.get(n),!(o=a&&a.key)){e.next=14;break}return u=(u=new Vt(fe.comparator)).insert(o,_e.newNoDocument(o,W.min())),s=$t().add(o),c=new Jt(W.min(),new Map,new Bt(H),u,s),e.next=9,Wi(i,c);case 9:i.Oo=i.Oo.remove(o),i.Fo.delete(n),na(i),e.next=16;break;case 14:return e.next=16,Or(i.localStore,n,!1).then((function(){return Ji(i,n,r)})).catch(sr);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ji(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.sharedClientState.removeLocalQueryTarget(t);var r,i=Object(u.a)(e.ko.get(t));try{for(i.s();!(r=i.n()).done;){var a=r.value;e.xo.delete(a),n&&e.No.jo(a,n)}}catch(o){i.e(o)}finally{i.f()}e.ko.delete(t),e.isPrimaryClient&&e.Mo.cs(t).forEach((function(t){e.Mo.containsKey(t)||Zi(e,t)}))}function Zi(e,t){e.$o.delete(t.path.canonicalString());var n=e.Oo.get(t);null!==n&&(ni(e.remoteStore,n),e.Oo=e.Oo.remove(t),e.Fo.delete(n),na(e))}function ea(e,t,n){var r,i=Object(u.a)(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;a instanceof Pi?(e.Mo.addReference(a.key,t),ta(e,a)):a instanceof Ri?(_("SyncEngine","Document no longer in limbo: "+a.key),e.Mo.removeReference(a.key,t),e.Mo.containsKey(a.key)||Zi(e,a.key)):C()}}catch(o){i.e(o)}finally{i.f()}}function ta(e,t){var n=t.key,r=n.path.canonicalString();e.Oo.get(n)||e.$o.has(r)||(_("SyncEngine","New document in limbo: "+n),e.$o.add(r),na(e))}function na(e){for(;e.$o.size>0&&e.Oo.size<e.maxConcurrentLimboResolutions;){var t=e.$o.values().next().value;e.$o.delete(t);var n=new fe(J.fromString(t)),r=e.Uo.next();e.Fo.set(r,new Vi(n)),e.Oo=e.Oo.insert(n,r),ti(e.remoteStore,new tr(nt($e(n.path)),r,2,z.T))}}function ra(e,t,n){return ia.apply(this,arguments)}function ia(){return ia=Object(c.a)(l.a.mark((function e(t,n,r){var i,a,o,s;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=A(t),a=[],o=[],s=[],e.t0=i.xo.isEmpty(),e.t0){e.next=9;break}return i.xo.forEach((function(e,t){s.push(i.Ko(t,n,r).then((function(e){if(e){i.isPrimaryClient&&i.sharedClientState.updateQueryState(t.targetId,e.fromCache?"not-current":"current"),a.push(e);var n=dr.kn(t.targetId,e);o.push(n)}})))})),e.next=6,Promise.all(s);case 6:return i.No.Tr(a),e.next=9,function(){var e=Object(c.a)(l.a.mark((function e(t,n){var r,i,a,o,s,c,f,h;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=A(t),e.prev=1,e.next=4,r.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(e){return Jn.forEach(n,(function(t){return Jn.forEach(t.Nn,(function(n){return r.persistence.referenceDelegate.addReference(e,t.targetId,n)})).next((function(){return Jn.forEach(t.xn,(function(n){return r.persistence.referenceDelegate.removeReference(e,t.targetId,n)}))}))}))}));case 4:e.next=11;break;case 6:if(e.prev=6,e.t0=e.catch(1),Zn(e.t0)){e.next=10;break}throw e.t0;case 10:_("LocalStore","Failed to update sequence numbers: "+e.t0);case 11:i=Object(u.a)(n);try{for(i.s();!(a=i.n()).done;)o=a.value,s=o.targetId,o.fromCache||(c=r.Un.get(s),f=c.snapshotVersion,h=c.withLastLimboFreeSnapshotVersion(f),r.Un=r.Un.insert(s,h))}catch(l){i.e(l)}finally{i.f()}case 13:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t,n){return e.apply(this,arguments)}}()(i.localStore,o);case 9:case"end":return e.stop()}}),e)}))),ia.apply(this,arguments)}function aa(e,t){return oa.apply(this,arguments)}function oa(){return(oa=Object(c.a)(l.a.mark((function e(t,n){var r,i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=A(t)).currentUser.isEqual(n)){e.next=11;break}return _("SyncEngine","User change. New user:",n.toKey()),e.next=5,gr(r.localStore,n);case 5:return i=e.sent,r.currentUser=n,function(e,t){e.Bo.forEach((function(e){e.forEach((function(e){e.reject(new L(D.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),e.Bo.clear()}(r),r.sharedClientState.handleUserChange(n,i.removedBatchIds,i.addedBatchIds),e.next=11,ra(r,i.Wn);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ua(e,t){var n=A(e),r=n.Fo.get(t);if(r&&r.Co)return $t().add(r.key);var i=$t(),a=n.ko.get(t);if(!a)return i;var o,s=Object(u.a)(a);try{for(s.s();!(o=s.n()).done;){var l=o.value,c=n.xo.get(l);i=i.unionWith(c.view.To)}}catch(f){s.e(f)}finally{s.f()}return i}function sa(e){var t=A(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=Wi.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=ua.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=Yi.bind(null,t),t.No.Tr=Ni.bind(null,t.eventManager),t.No.jo=Ai.bind(null,t.eventManager),t}var la=function(){function e(){Object(v.a)(this,e),this.synchronizeTabs=!1}return Object(y.a)(e,[{key:"initialize",value:function(){var e=Object(c.a)(l.a.mark((function e(t){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.N=Hr(t.databaseInfo.databaseId),this.sharedClientState=this.Wo(t),this.persistence=this.Go(t),e.next=5,this.persistence.start();case 5:this.gcScheduler=this.zo(t),this.localStore=this.Ho(t);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"zo",value:function(e){return null}},{key:"Ho",value:function(e){return yr(this.persistence,new pr,e.initialUser,this.N)}},{key:"Go",value:function(e){return new Dr(Pr.Ns,this.N)}},{key:"Wo",value:function(e){return new Fr}},{key:"terminate",value:function(){var e=Object(c.a)(l.a.mark((function e(){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.gcScheduler&&this.gcScheduler.stop(),e.next=3,this.sharedClientState.shutdown();case 3:return e.next=5,this.persistence.shutdown();case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),ca=function(){function e(){Object(v.a)(this,e)}return Object(y.a)(e,[{key:"initialize",value:function(){var e=Object(c.a)(l.a.mark((function e(t,n){var r=this;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.localStore,e.t0){e.next=12;break}return this.localStore=t.localStore,this.sharedClientState=t.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!t.synchronizeTabs),this.sharedClientState.onlineStateHandler=function(e){return $i(r.syncEngine,e,1)},this.remoteStore.remoteSyncer.handleCredentialChange=aa.bind(null,this.syncEngine),e.next=12,gi(this.remoteStore,this.syncEngine.isPrimaryClient);case 12:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"createEventManager",value:function(e){return new _i}},{key:"createDatastore",value:function(e){var t,n=Hr(e.databaseInfo.databaseId),r=(t=e.databaseInfo,new Br(t));return function(e,t,n){return new Qr(e,t,n)}(e.credentials,r,n)}},{key:"createRemoteStore",value:function(e){var t,n,r,i,a,o=this;return t=this.localStore,n=this.datastore,r=e.asyncQueue,i=function(e){return $i(o.syncEngine,e,0)},a=Vr.bt()?new Vr:new Mr,new Yr(t,n,r,i,a)}},{key:"createSyncEngine",value:function(e,t){return function(e,t,n,r,i,a,o){var u=new Ui(e,t,n,r,i,a);return o&&(u.qo=!0),u}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}},{key:"terminate",value:function(){return function(){var e=Object(c.a)(l.a.mark((function e(t){var n;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A(t),_("RemoteStore","RemoteStore shutting down."),n.Kr.add(5),e.next=5,Zr(n);case 5:n.Qr.shutdown(),n.Wr.set("Unknown");case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()(this.remoteStore)}}]),e}();var fa=function(){function e(t){Object(v.a)(this,e),this.observer=t,this.muted=!1}return Object(y.a)(e,[{key:"next",value:function(e){this.observer.next&&this.Yo(this.observer.next,e)}},{key:"error",value:function(e){this.observer.error?this.Yo(this.observer.error,e):console.error("Uncaught Error in snapshot listener:",e)}},{key:"Xo",value:function(){this.muted=!0}},{key:"Yo",value:function(e,t){var n=this;this.muted||setTimeout((function(){n.muted||e(t)}),0)}}]),e}(),ha=function(){function e(t,n,r){var i=this;Object(v.a)(this,e),this.credentials=t,this.asyncQueue=n,this.databaseInfo=r,this.user=E.UNAUTHENTICATED,this.clientId=q.I(),this.credentialListener=function(){return Promise.resolve()},this.credentials.start(n,function(){var e=Object(c.a)(l.a.mark((function e(t){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _("FirestoreClient","Received user=",t.uid),e.next=3,i.credentialListener(t);case 3:i.user=t;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}return Object(y.a)(e,[{key:"getConfiguration",value:function(){var e=Object(c.a)(l.a.mark((function e(){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,credentials:this.credentials,initialUser:this.user,maxConcurrentLimboResolutions:100});case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setCredentialChangeListener",value:function(e){this.credentialListener=e}},{key:"verifyNotTerminated",value:function(){if(this.asyncQueue.isShuttingDown)throw new L(D.FAILED_PRECONDITION,"The client has already been terminated.")}},{key:"terminate",value:function(){var e=this;this.asyncQueue.enterRestrictedMode();var t=new P;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(Object(c.a)(l.a.mark((function n(){var r;return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,n.t0=e.onlineComponents,!n.t0){n.next=5;break}return n.next=5,e.onlineComponents.terminate();case 5:if(n.t1=e.offlineComponents,!n.t1){n.next=9;break}return n.next=9,e.offlineComponents.terminate();case 9:e.credentials.shutdown(),t.resolve(),n.next=17;break;case 13:n.prev=13,n.t2=n.catch(0),r=wi(n.t2,"Failed to shutdown persistence"),t.reject(r);case 17:case"end":return n.stop()}}),n,null,[[0,13]])})))),t.promise}}]),e}();function da(e,t){return pa.apply(this,arguments)}function pa(){return pa=Object(c.a)(l.a.mark((function e(t,n){var r,i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.asyncQueue.verifyOperationInProgress(),_("FirestoreClient","Initializing OfflineComponentProvider"),e.next=3,t.getConfiguration();case 3:return r=e.sent,e.next=6,n.initialize(r);case 6:i=r.initialUser,t.setCredentialChangeListener(function(){var e=Object(c.a)(l.a.mark((function e(t){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=i.isEqual(t),e.t0){e.next=5;break}return e.next=4,gr(n.localStore,t);case 4:i=t;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),n.persistence.setDatabaseDeletedListener((function(){return t.terminate()})),t.offlineComponents=n;case 8:case"end":return e.stop()}}),e)}))),pa.apply(this,arguments)}function va(e,t){return ya.apply(this,arguments)}function ya(){return ya=Object(c.a)(l.a.mark((function e(t,n){var r,i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.asyncQueue.verifyOperationInProgress(),e.next=3,ga(t);case 3:return r=e.sent,_("FirestoreClient","Initializing OnlineComponentProvider"),e.next=7,t.getConfiguration();case 7:return i=e.sent,e.next=10,n.initialize(r,i);case 10:t.setCredentialChangeListener((function(e){return function(){var e=Object(c.a)(l.a.mark((function e(t,n){var r,i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=A(t)).asyncQueue.verifyOperationInProgress(),_("RemoteStore","RemoteStore received new credentials"),i=ui(r),r.Kr.add(3),e.next=6,Zr(r);case 6:return i&&r.Wr.set("Unknown"),e.next=9,r.remoteSyncer.handleCredentialChange(n);case 9:return r.Kr.delete(3),e.next=12,Xr(r);case 12:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()(n.remoteStore,e)})),t.onlineComponents=n;case 12:case"end":return e.stop()}}),e)}))),ya.apply(this,arguments)}function ga(e){return ma.apply(this,arguments)}function ma(){return(ma=Object(c.a)(l.a.mark((function e(t){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t.offlineComponents,e.t0){e.next=5;break}return _("FirestoreClient","Using default OfflineComponentProvider"),e.next=5,da(t,new la);case 5:return e.abrupt("return",t.offlineComponents);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ba(e){return ka.apply(this,arguments)}function ka(){return(ka=Object(c.a)(l.a.mark((function e(t){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t.onlineComponents,e.t0){e.next=5;break}return _("FirestoreClient","Using default OnlineComponentProvider"),e.next=5,va(t,new ca);case 5:return e.abrupt("return",t.onlineComponents);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wa(e){return Ea.apply(this,arguments)}function Ea(){return(Ea=Object(c.a)(l.a.mark((function e(t){var n,r;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ba(t);case 2:return n=e.sent,r=n.eventManager,e.abrupt("return",(r.onListen=zi.bind(null,n.syncEngine),r.onUnlisten=Ki.bind(null,n.syncEngine),r));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Oa(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new P;return e.asyncQueue.enqueueAndForget(Object(c.a)(l.a.mark((function i(){return l.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.t0=function(e,t,n,r,i){var a=new fa({next:function(n){t.enqueueAndForget((function(){return xi(e,o)})),n.fromCache&&"server"===r.source?i.reject(new L(D.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):i.resolve(n)},error:function(e){return i.reject(e)}}),o=new Li(n,a,{includeMetadataChanges:!0,uo:!0});return ji(e,o)},i.next=3,wa(e);case 3:return i.t1=i.sent,i.t2=e.asyncQueue,i.t3=t,i.t4=n,i.t5=r,i.abrupt("return",(0,i.t0)(i.t1,i.t2,i.t3,i.t4,i.t5));case 9:case"end":return i.stop()}}),i)})))),r.promise}var Sa=function e(t,n,r,i,a,o,u,s){Object(v.a)(this,e),this.databaseId=t,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=a,this.forceLongPolling=o,this.autoDetectLongPolling=u,this.useFetchStreams=s},Ta=function(){function e(t,n){Object(v.a)(this,e),this.projectId=t,this.database=n||"(default)"}return Object(y.a)(e,[{key:"isDefaultDatabase",get:function(){return"(default)"===this.database}},{key:"isEqual",value:function(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database}}]),e}(),_a=new Map;function ja(e,t,n){if(!n)throw new L(D.INVALID_ARGUMENT,"Function ".concat(e,"() cannot be called with an empty ").concat(t,"."))}function Ia(e){if(fe.isDocumentKey(e))throw new L(D.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but ".concat(e," has ").concat(e.length,"."))}function xa(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e="".concat(e.substring(0,20),"...")),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";var t=function(e){return e.constructor?e.constructor.name:null}(e);return t?"a custom ".concat(t," object"):"an object"}return"function"==typeof e?"a function":C()}function Ca(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new L(D.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var n=xa(e);throw new L(D.INVALID_ARGUMENT,"Expected type '".concat(t.name,"', but it was: ").concat(n))}return e}var Na=function(){function e(t){var n;if(Object(v.a)(this,e),void 0===t.host){if(void 0!==t.ssl)throw new L(D.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===(n=t.ssl)||void 0===n||n;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 L(D.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.useFetchStreams=!!t.useFetchStreams,function(e,t,n,r){if(!0===t&&!0===r)throw new L(D.INVALID_ARGUMENT,"".concat(e," and ").concat(n," cannot be used together."))}("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling)}return Object(y.a)(e,[{key:"isEqual",value:function(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}]),e}(),Aa=function(){function e(t,n){Object(v.a)(this,e),this._credentials=n,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Na({}),this._settingsFrozen=!1,t instanceof Ta?this._databaseId=t:(this._app=t,this._databaseId=function(e){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new L(D.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Ta(e.options.projectId)}(t))}return Object(y.a)(e,[{key:"app",get:function(){if(!this._app)throw new L(D.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}},{key:"_initialized",get:function(){return this._settingsFrozen}},{key:"_terminated",get:function(){return void 0!==this._terminateTask}},{key:"_setSettings",value:function(e){if(this._settingsFrozen)throw new L(D.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new Na(e),void 0!==e.credentials&&(this._credentials=function(e){if(!e)return new F;switch(e.type){case"gapi":var t=e.client;return N(!("object"!=typeof t||null===t||!t.auth||!t.auth.getAuthHeaderValueForFirstParty)),new U(t,e.sessionIndex||"0",e.iamToken||null);case"provider":return e.client;default:throw new L(D.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(e.credentials))}},{key:"_getSettings",value:function(){return this._settings}},{key:"_freezeSettings",value:function(){return this._settingsFrozen=!0,this._settings}},{key:"_delete",value:function(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}},{key:"toJSON",value:function(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}},{key:"_terminate",value:function(){return function(e){var t=_a.get(e);t&&(_("ComponentProvider","Removing Datastore"),_a.delete(e),t.terminate())}(this),Promise.resolve()}}]),e}();var Da=function(){function e(t,n,r){Object(v.a)(this,e),this.converter=n,this._key=r,this.type="document",this.firestore=t}return Object(y.a)(e,[{key:"_path",get:function(){return this._key.path}},{key:"id",get:function(){return this._key.path.lastSegment()}},{key:"path",get:function(){return this._key.path.canonicalString()}},{key:"parent",get:function(){return new Pa(this.firestore,this.converter,this._key.path.popLast())}},{key:"withConverter",value:function(t){return new e(this.firestore,t,this._key)}}]),e}(),La=function(){function e(t,n,r){Object(v.a)(this,e),this.converter=n,this._query=r,this.type="query",this.firestore=t}return Object(y.a)(e,[{key:"withConverter",value:function(t){return new e(this.firestore,t,this._query)}}]),e}(),Pa=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i){var a;return Object(v.a)(this,n),(a=t.call(this,e,r,$e(i)))._path=i,a.type="collection",a}return Object(y.a)(n,[{key:"id",get:function(){return this._query.path.lastSegment()}},{key:"path",get:function(){return this._query.path.canonicalString()}},{key:"parent",get:function(){var e=this._path.popLast();return e.isEmpty()?null:new Da(this.firestore,null,new fe(e))}},{key:"withConverter",value:function(e){return new n(this.firestore,e,this._path)}}]),n}(La);function Ra(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(e=Object(k.e)(e),ja("collection","path",t),e instanceof Aa){var a=J.fromString.apply(J,[t].concat(r));return Ia(a),new Pa(e,null,a)}if(!(e instanceof Da||e instanceof Pa))throw new L(D.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");var o=e._path.child(J.fromString.apply(J,[t].concat(r)));return Ia(o),new Pa(e.firestore,null,o)}var Fa=function(){function e(){var t=this;Object(v.a)(this,e),this.fa=Promise.resolve(),this.da=[],this.wa=!1,this._a=[],this.ma=null,this.ga=!1,this.ya=!1,this.pa=[],this.rr=new Kr(this,"async_queue_retry"),this.Ea=function(){var e=qr();e&&_("AsyncQueue","Visibility state changed to "+e.visibilityState),t.rr.tr()};var n=qr();n&&"function"==typeof n.addEventListener&&n.addEventListener("visibilitychange",this.Ea)}return Object(y.a)(e,[{key:"isShuttingDown",get:function(){return this.wa}},{key:"enqueueAndForget",value:function(e){this.enqueue(e)}},{key:"enqueueAndForgetEvenWhileRestricted",value:function(e){this.Ta(),this.Ia(e)}},{key:"enterRestrictedMode",value:function(e){if(!this.wa){this.wa=!0,this.ya=e||!1;var t=qr();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Ea)}}},{key:"enqueue",value:function(e){var t=this;if(this.Ta(),this.wa)return new Promise((function(){}));var n=new P;return this.Ia((function(){return t.wa&&t.ya?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)})).then((function(){return n.promise}))}},{key:"enqueueRetryable",value:function(e){var t=this;this.enqueueAndForget((function(){return t.da.push(e),t.Aa()}))}},{key:"Aa",value:function(){var e=Object(c.a)(l.a.mark((function e(){var t=this;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0===this.da.length){e.next=14;break}return e.prev=1,e.next=4,this.da[0]();case 4:this.da.shift(),this.rr.reset(),e.next=13;break;case 8:if(e.prev=8,e.t0=e.catch(1),Zn(e.t0)){e.next=12;break}throw e.t0;case 12:_("AsyncQueue","Operation failed with retryable error: "+e.t0);case 13:this.da.length>0&&this.rr.Xi((function(){return t.Aa()}));case 14:case"end":return e.stop()}}),e,this,[[1,8]])})));return function(){return e.apply(this,arguments)}}()},{key:"Ia",value:function(e){var t=this,n=this.fa.then((function(){return t.ga=!0,e().catch((function(e){throw t.ma=e,t.ga=!1,j("INTERNAL UNHANDLED ERROR: ",function(e){var t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t}(e)),e})).then((function(e){return t.ga=!1,e}))}));return this.fa=n,n}},{key:"enqueueAfterDelay",value:function(e,t,n){var r=this;this.Ta(),this.pa.indexOf(e)>-1&&(t=0);var i=ki.createAndSchedule(this,e,t,n,(function(e){return r.Ra(e)}));return this._a.push(i),i}},{key:"Ta",value:function(){this.ma&&C()}},{key:"verifyOperationInProgress",value:function(){}},{key:"ba",value:function(){var e=Object(c.a)(l.a.mark((function e(){var t;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.fa,e.next=3,t;case 3:if(t!==this.fa){e.next=0;break}case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"Pa",value:function(e){var t,n=Object(u.a)(this._a);try{for(n.s();!(t=n.n()).done;){if(t.value.timerId===e)return!0}}catch(r){n.e(r)}finally{n.f()}return!1}},{key:"va",value:function(e){var t=this;return this.ba().then((function(){t._a.sort((function(e,t){return e.targetTimeMs-t.targetTimeMs}));var n,r=Object(u.a)(t._a);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.skipDelay(),"all"!==e&&i.timerId===e)break}}catch(a){r.e(a)}finally{r.f()}return t.ba()}))}},{key:"Va",value:function(e){this.pa.push(e)}},{key:"Ra",value:function(e){var t=this._a.indexOf(e);this._a.splice(t,1)}}]),e}();var Ma=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r){var i;return Object(v.a)(this,n),(i=t.call(this,e,r)).type="firestore",i._queue=new Fa,i._persistenceKey="name"in e?e.name:"[DEFAULT]",i}return Object(y.a)(n,[{key:"_terminate",value:function(){return this._firestoreClient||za(this),this._firestoreClient.terminate()}}]),n}(Aa);function Va(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(g.e)();return Object(g.b)(e,"firestore").getImmediate()}function Ua(e){return e._firestoreClient||za(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function za(e){var t,n=e._freezeSettings(),r=function(e,t,n,r){return new Sa(e,t,n,r.host,r.ssl,r.experimentalForceLongPolling,r.experimentalAutoDetectLongPolling,r.useFetchStreams)}(e._databaseId,(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",e._persistenceKey,n);e._firestoreClient=new ha(e._credentials,e._queue,r)}var Ba=function(){function e(){Object(v.a)(this,e);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=0;i<n.length;++i)if(0===n[i].length)throw new L(D.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new ee(n)}return Object(y.a)(e,[{key:"isEqual",value:function(e){return this._internalPath.isEqual(e._internalPath)}}]),e}();var qa=function(){function e(t){Object(v.a)(this,e),this._byteString=t}return Object(y.a)(e,[{key:"toBase64",value:function(){return this._byteString.toBase64()}},{key:"toUint8Array",value:function(){return this._byteString.toUint8Array()}},{key:"toString",value:function(){return"Bytes(base64: "+this.toBase64()+")"}},{key:"isEqual",value:function(e){return this._byteString.isEqual(e._byteString)}}],[{key:"fromBase64String",value:function(t){try{return new e(te.fromBase64String(t))}catch(t){throw new L(D.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}},{key:"fromUint8Array",value:function(t){return new e(te.fromUint8Array(t))}}]),e}(),Ha=function(){function e(t,n){if(Object(v.a)(this,e),!isFinite(t)||t<-90||t>90)throw new L(D.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(n)||n<-180||n>180)throw new L(D.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=t,this._long=n}return Object(y.a)(e,[{key:"latitude",get:function(){return this._lat}},{key:"longitude",get:function(){return this._long}},{key:"isEqual",value:function(e){return this._lat===e._lat&&this._long===e._long}},{key:"toJSON",value:function(){return{latitude:this._lat,longitude:this._long}}},{key:"_compareTo",value:function(e){return H(this._lat,e._lat)||H(this._long,e._long)}}]),e}();var Ka=new RegExp("[~\\*/\\[\\]]");function Ga(e,t,n){if(t.search(Ka)>=0)throw Wa("Invalid field path (".concat(t,"). Paths must not contain '~', '*', '/', '[', or ']'"),e,!1,void 0,n);try{return Object(r.a)(Ba,Object(p.a)(t.split(".")))._internalPath}catch(i){throw Wa("Invalid field path (".concat(t,"). Paths must not be empty, begin with '.', end with '.', or contain '..'"),e,!1,void 0,n)}}function Wa(e,t,n,r,i){var a=r&&!r.isEmpty(),o=void 0!==i,u="Function ".concat(t,"() called with invalid data");n&&(u+=" (via `toFirestore()`)"),u+=". ";var s="";return(a||o)&&(s+=" (found",a&&(s+=" in field ".concat(r)),o&&(s+=" in document ".concat(i)),s+=")"),new L(D.INVALID_ARGUMENT,u+e+s)}var Qa=function(){function e(t,n,r,i,a){Object(v.a)(this,e),this._firestore=t,this._userDataWriter=n,this._key=r,this._document=i,this._converter=a}return Object(y.a)(e,[{key:"id",get:function(){return this._key.path.lastSegment()}},{key:"ref",get:function(){return new Da(this._firestore,this._converter,this._key)}},{key:"exists",value:function(){return null!==this._document}},{key:"data",value:function(){if(this._document){if(this._converter){var e=new $a(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}},{key:"get",value:function(e){if(this._document){var t=this._document.data.field(Ya("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}]),e}(),$a=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return Object(y.a)(n,[{key:"data",value:function(){return Object(i.a)(Object(a.a)(n.prototype),"data",this).call(this)}}]),n}(Qa);function Ya(e,t){return"string"==typeof t?Ga(e,t):t instanceof Ba?t._internalPath:t._delegate._internalPath}var Xa=function(){function e(t,n){Object(v.a)(this,e),this.hasPendingWrites=t,this.fromCache=n}return Object(y.a)(e,[{key:"isEqual",value:function(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}]),e}(),Ja=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,r,i,a,o,u){var s;return Object(v.a)(this,n),(s=t.call(this,e,r,i,a,u))._firestore=e,s._firestoreImpl=e,s.metadata=o,s}return Object(y.a)(n,[{key:"exists",value:function(){return Object(i.a)(Object(a.a)(n.prototype),"exists",this).call(this)}},{key:"data",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._document){if(this._converter){var t=new Za(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._document){var n=this._document.data.field(Ya("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}]),n}(Qa),Za=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return Object(y.a)(n,[{key:"data",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(i.a)(Object(a.a)(n.prototype),"data",this).call(this,e)}}]),n}(Ja),eo=function(){function e(t,n,r,i){Object(v.a)(this,e),this._firestore=t,this._userDataWriter=n,this._snapshot=i,this.metadata=new Xa(i.hasPendingWrites,i.fromCache),this.query=r}return Object(y.a)(e,[{key:"docs",get:function(){var e=[];return this.forEach((function(t){return e.push(t)})),e}},{key:"size",get:function(){return this._snapshot.docs.size}},{key:"empty",get:function(){return 0===this.size}},{key:"forEach",value:function(e,t){var n=this;this._snapshot.docs.forEach((function(r){e.call(t,new Za(n._firestore,n._userDataWriter,r.key,r,new Xa(n._snapshot.mutatedKeys.has(r.key),n._snapshot.fromCache),n.query.converter))}))}},{key:"docChanges",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new L(D.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){var n=0;return e._snapshot.docChanges.map((function(t){return{type:"added",doc:new Za(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Xa(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),oldIndex:-1,newIndex:n++}}))}var r=e._snapshot.oldDocs;return e._snapshot.docChanges.filter((function(e){return t||3!==e.type})).map((function(t){var n=new Za(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Xa(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),i=-1,a=-1;return 0!==t.type&&(i=r.indexOf(t.doc.key),r=r.delete(t.doc.key)),1!==t.type&&(a=(r=r.add(t.doc)).indexOf(t.doc.key)),{type:to(t.type),doc:n,oldIndex:i,newIndex:a}}))}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}]),e}();function to(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return C()}}function no(e){if(Xe(e)&&0===e.explicitOrderBy.length)throw new L(D.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var ro=function(){function e(){Object(v.a)(this,e)}return Object(y.a)(e,[{key:"convertValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";switch(he(e)){case 0:return null;case 1:return e.booleanValue;case 2:return ie(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(ae(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 10:return this.convertObject(e.mapValue,t);default:throw C()}}},{key:"convertObject",value:function(e,t){var n=this,r={};return $(e.fields,(function(e,i){r[e]=n.convertValue(i,t)})),r}},{key:"convertGeoPoint",value:function(e){return new Ha(ie(e.latitude),ie(e.longitude))}},{key:"convertArray",value:function(e,t){var n=this;return(e.values||[]).map((function(e){return n.convertValue(e,t)}))}},{key:"convertServerTimestamp",value:function(e,t){switch(t){case"previous":var n=ue(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(se(e));default:return null}}},{key:"convertTimestamp",value:function(e){var t=re(e);return new G(t.seconds,t.nanos)}},{key:"convertDocumentKey",value:function(e,t){var n=J.fromString(e);N(Dn(n));var r=new Ta(n.get(1),n.get(3)),i=new fe(n.popFirst(5));return r.isEqual(t)||j("Document ".concat(i," contains a document reference within a different database (").concat(r.projectId,"/").concat(r.database,") which is not supported. It will be treated as a reference in the current database (").concat(t.projectId,"/").concat(t.database,") instead.")),i}}]),e}();var io=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(v.a)(this,n),(r=t.call(this)).firestore=e,r}return Object(y.a)(n,[{key:"convertBytes",value:function(e){return new qa(e)}},{key:"convertReference",value:function(e){var t=this.convertDocumentKey(e,this.firestore._databaseId);return new Da(this.firestore,null,t)}}]),n}(ro);function ao(e){e=Ca(e,La);var t=Ca(e.firestore,Ma),n=Ua(t),r=new io(t);return no(e._query),Oa(n,e._query).then((function(n){return new eo(t,r,e,n)}))}var oo;oo=g.a,O=oo,Object(g.c)(new m.a("firestore",(function(e,t){var n=t.options,r=e.getProvider("app").getImmediate(),i=new Ma(r,new M(e.getProvider("auth-internal")));return n=Object.assign({useFetchStreams:!0},n),i._setSettings(n),i}),"PUBLIC")),Object(g.g)("@firebase/firestore","3.1.0",undefined)}).call(this,n(38))},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,u,s=o(e),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(s[c]=n[c]);if(r){u=r(n);for(var f=0;f<u.length;f++)a.call(n,u[f])&&(s[u[f]]=n[u[f]])}}return s}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(33)},function(e,t,n){"use strict";var r=n(12);n.d(t,"a",(function(){return r.f}));Object(r.g)("firebase","9.1.2","app")},function(e,t,n){"use strict";var r=n(28),i=60103,a=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var o=60109,u=60110,s=60112;t.Suspense=60113;var l=60115,c=60116;if("function"===typeof Symbol&&Symbol.for){var f=Symbol.for;i=f("react.element"),a=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),o=f("react.provider"),u=f("react.context"),s=f("react.forward_ref"),t.Suspense=f("react.suspense"),l=f("react.memo"),c=f("react.lazy")}var h="function"===typeof Symbol&&Symbol.iterator;function d(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||p}function g(){}function m(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(d(85));this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=y.prototype;var b=m.prototype=new g;b.constructor=m,r(b,y.prototype),b.isPureReactComponent=!0;var k={current:null},w=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,n){var r,a={},o=null,u=null;if(null!=t)for(r in void 0!==t.ref&&(u=t.ref),void 0!==t.key&&(o=""+t.key),t)w.call(t,r)&&!E.hasOwnProperty(r)&&(a[r]=t[r]);var s=arguments.length-2;if(1===s)a.children=n;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];a.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===a[r]&&(a[r]=s[r]);return{$$typeof:i,type:e,key:o,ref:u,props:a,_owner:k.current}}function S(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var T=/\/+/g;function _(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function j(e,t,n,r,o){var u=typeof e;"undefined"!==u&&"boolean"!==u||(e=null);var s=!1;if(null===e)s=!0;else switch(u){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case i:case a:s=!0}}if(s)return o=o(s=e),e=""===r?"."+_(s,0):r,Array.isArray(o)?(n="",null!=e&&(n=e.replace(T,"$&/")+"/"),j(o,t,n,"",(function(e){return e}))):null!=o&&(S(o)&&(o=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(T,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=""===r?".":r+":",Array.isArray(e))for(var l=0;l<e.length;l++){var c=r+_(u=e[l],l);s+=j(u,t,n,c,o)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),l=0;!(u=e.next()).done;)s+=j(u=u.value,t,n,c=r+_(u,l++),o);else if("object"===u)throw t=""+e,Error(d(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function I(e,t,n){if(null==e)return e;var r=[],i=0;return j(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function x(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var C={current:null};function N(){var e=C.current;if(null===e)throw Error(d(321));return e}var A={ReactCurrentDispatcher:C,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:k,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:I,forEach:function(e,t,n){I(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return I(e,(function(){t++})),t},toArray:function(e){return I(e,(function(e){return e}))||[]},only:function(e){if(!S(e))throw Error(d(143));return e}},t.Component=y,t.PureComponent=m,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(d(267,e));var a=r({},e.props),o=e.key,u=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(u=t.ref,s=k.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)w.call(t,c)&&!E.hasOwnProperty(c)&&(a[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)a.children=n;else if(1<c){l=Array(c);for(var f=0;f<c;f++)l[f]=arguments[f+2];a.children=l}return{$$typeof:i,type:e.type,key:o,ref:u,props:a,_owner:s}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:u,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},t.createElement=O,t.createFactory=function(e){var t=O.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:s,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:x}},t.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return N().useCallback(e,t)},t.useContext=function(e,t){return N().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return N().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return N().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return N().useLayoutEffect(e,t)},t.useMemo=function(e,t){return N().useMemo(e,t)},t.useReducer=function(e,t,n){return N().useReducer(e,t,n)},t.useRef=function(e){return N().useRef(e)},t.useState=function(e){return N().useState(e)},t.version="17.0.2"},function(e,t,n){"use strict";var r=n(10),i=n(28),a=n(34);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(o(227));var u=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)u.add(t[e])}var f=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d=Object.prototype.hasOwnProperty,p={},v={};function y(e,t,n,r,i,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new y(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new y(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new y(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new y(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new y(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new y(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new y(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new y(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new y(e,5,!1,e.toLowerCase(),null,!1,!1)}));var m=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function k(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(v,e)||!d.call(p,e)&&(h.test(e)?v[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(m,b);g[t]=new y(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(m,b);g[t]=new y(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(m,b);g[t]=new y(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new y(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new y(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,O=60106,S=60107,T=60108,_=60114,j=60109,I=60110,x=60112,C=60113,N=60120,A=60115,D=60116,L=60121,P=60128,R=60129,F=60130,M=60131;if("function"===typeof Symbol&&Symbol.for){var V=Symbol.for;E=V("react.element"),O=V("react.portal"),S=V("react.fragment"),T=V("react.strict_mode"),_=V("react.profiler"),j=V("react.provider"),I=V("react.context"),x=V("react.forward_ref"),C=V("react.suspense"),N=V("react.suspense_list"),A=V("react.memo"),D=V("react.lazy"),L=V("react.block"),V("react.scope"),P=V("react.opaque.id"),R=V("react.debug_trace_mode"),F=V("react.offscreen"),M=V("react.legacy_hidden")}var U,z="function"===typeof Symbol&&Symbol.iterator;function B(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=z&&e[z]||e["@@iterator"])?e:null}function q(e){if(void 0===U)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);U=t&&t[1]||""}return"\n"+U+e}var H=!1;function K(e,t){if(!e||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(s){var r=s}Reflect.construct(e,[],t)}else{try{t.call()}catch(s){r=s}e.call(t.prototype)}else{try{throw Error()}catch(s){r=s}e()}}catch(s){if(s&&r&&"string"===typeof s.stack){for(var i=s.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,u=a.length-1;1<=o&&0<=u&&i[o]!==a[u];)u--;for(;1<=o&&0<=u;o--,u--)if(i[o]!==a[u]){if(1!==o||1!==u)do{if(o--,0>--u||i[o]!==a[u])return"\n"+i[o].replace(" at new "," at ")}while(1<=o&&0<=u);break}}}finally{H=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?q(e):""}function G(e){switch(e.tag){case 5:return q(e.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return e=K(e.type,!1);case 11:return e=K(e.type.render,!1);case 22:return e=K(e.type._render,!1);case 1:return e=K(e.type,!0);default:return""}}function W(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case O:return"Portal";case _:return"Profiler";case T:return"StrictMode";case C:return"Suspense";case N:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case I:return(e.displayName||"Context")+".Consumer";case j:return(e._context.displayName||"Context")+".Provider";case x:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case A:return W(e.type);case L:return W(e._render);case D:t=e._payload,e=e._init;try{return W(e(t))}catch(n){}}return null}function Q(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function $(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Y(e){e._valueTracker||(e._valueTracker=function(e){var t=$(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function X(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function J(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Q(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&k(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=Q(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ie(e,t.type,n):t.hasOwnProperty("defaultValue")&&ie(e,t.type,Q(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ie(e,t,n){"number"===t&&J(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ae(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function oe(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Q(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function ue(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function se(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Q(n)}}function le(e,t){var n=Q(t.value),r=Q(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml",he="http://www.w3.org/2000/svg";function de(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?de(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ve,ye,ge=(ye=function(e,t){if(e.namespaceURI!==he||"innerHTML"in e)e.innerHTML=t;else{for((ve=ve||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ve.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ye(e,t)}))}:ye);function me(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ke=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function Ee(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(be).forEach((function(e){ke.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Oe=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Se(e,t){if(t){if(Oe[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function Te(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function _e(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var je=null,Ie=null,xe=null;function Ce(e){if(e=ri(e)){if("function"!==typeof je)throw Error(o(280));var t=e.stateNode;t&&(t=ai(t),je(e.stateNode,e.type,t))}}function Ne(e){Ie?xe?xe.push(e):xe=[e]:Ie=e}function Ae(){if(Ie){var e=Ie,t=xe;if(xe=Ie=null,Ce(e),t)for(e=0;e<t.length;e++)Ce(t[e])}}function De(e,t){return e(t)}function Le(e,t,n,r,i){return e(t,n,r,i)}function Pe(){}var Re=De,Fe=!1,Me=!1;function Ve(){null===Ie&&null===xe||(Pe(),Ae())}function Ue(e,t){var n=e.stateNode;if(null===n)return null;var r=ai(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(o(231,t,typeof n));return n}var ze=!1;if(f)try{var Be={};Object.defineProperty(Be,"passive",{get:function(){ze=!0}}),window.addEventListener("test",Be,Be),window.removeEventListener("test",Be,Be)}catch(ye){ze=!1}function qe(e,t,n,r,i,a,o,u,s){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(c){this.onError(c)}}var He=!1,Ke=null,Ge=!1,We=null,Qe={onError:function(e){He=!0,Ke=e}};function $e(e,t,n,r,i,a,o,u,s){He=!1,Ke=null,qe.apply(Qe,arguments)}function Ye(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Xe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Je(e){if(Ye(e)!==e)throw Error(o(188))}function Ze(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ye(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Je(i),e;if(a===r)return Je(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var u=!1,s=i.child;s;){if(s===n){u=!0,n=i,r=a;break}if(s===r){u=!0,r=i,n=a;break}s=s.sibling}if(!u){for(s=a.child;s;){if(s===n){u=!0,n=a,r=i;break}if(s===r){u=!0,r=a,n=i;break}s=s.sibling}if(!u)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,it,at=!1,ot=[],ut=null,st=null,lt=null,ct=new Map,ft=new Map,ht=[],dt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pt(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function vt(e,t){switch(e){case"focusin":case"focusout":ut=null;break;case"dragenter":case"dragleave":st=null;break;case"mouseover":case"mouseout":lt=null;break;case"pointerover":case"pointerout":ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ft.delete(t.pointerId)}}function yt(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e=pt(t,n,r,i,a),null!==t&&(null!==(t=ri(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function gt(e){var t=ni(e.target);if(null!==t){var n=Ye(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Xe(n)))return e.blockedOn=t,void it(e.lanePriority,(function(){a.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function mt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ri(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){mt(e)&&n.delete(t)}function kt(){for(at=!1;0<ot.length;){var e=ot[0];if(null!==e.blockedOn){null!==(e=ri(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&ot.shift()}null!==ut&&mt(ut)&&(ut=null),null!==st&&mt(st)&&(st=null),null!==lt&&mt(lt)&&(lt=null),ct.forEach(bt),ft.forEach(bt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,at||(at=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,kt)))}function Et(e){function t(t){return wt(t,e)}if(0<ot.length){wt(ot[0],e);for(var n=1;n<ot.length;n++){var r=ot[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==ut&&wt(ut,e),null!==st&&wt(st,e),null!==lt&&wt(lt,e),ct.forEach(t),ft.forEach(t),n=0;n<ht.length;n++)(r=ht[n]).blockedOn===e&&(r.blockedOn=null);for(;0<ht.length&&null===(n=ht[0]).blockedOn;)gt(n),null===n.blockedOn&&ht.shift()}function Ot(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var St={animationend:Ot("Animation","AnimationEnd"),animationiteration:Ot("Animation","AnimationIteration"),animationstart:Ot("Animation","AnimationStart"),transitionend:Ot("Transition","TransitionEnd")},Tt={},_t={};function jt(e){if(Tt[e])return Tt[e];if(!St[e])return e;var t,n=St[e];for(t in n)if(n.hasOwnProperty(t)&&t in _t)return Tt[e]=n[t];return e}f&&(_t=document.createElement("div").style,"AnimationEvent"in window||(delete St.animationend.animation,delete St.animationiteration.animation,delete St.animationstart.animation),"TransitionEvent"in window||delete St.transitionend.transition);var It=jt("animationend"),xt=jt("animationiteration"),Ct=jt("animationstart"),Nt=jt("transitionend"),At=new Map,Dt=new Map,Lt=["abort","abort",It,"animationEnd",xt,"animationIteration",Ct,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Nt,"transitionEnd","waiting","waiting"];function Pt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Dt.set(r,t),At.set(r,i),l(i,[r])}}(0,a.unstable_now)();var Rt=8;function Ft(e){if(0!==(1&e))return Rt=15,1;if(0!==(2&e))return Rt=14,2;if(0!==(4&e))return Rt=13,4;var t=24&e;return 0!==t?(Rt=12,t):0!==(32&e)?(Rt=11,32):0!==(t=192&e)?(Rt=10,t):0!==(256&e)?(Rt=9,256):0!==(t=3584&e)?(Rt=8,t):0!==(4096&e)?(Rt=7,4096):0!==(t=4186112&e)?(Rt=6,t):0!==(t=62914560&e)?(Rt=5,t):67108864&e?(Rt=4,67108864):0!==(134217728&e)?(Rt=3,134217728):0!==(t=805306368&e)?(Rt=2,t):0!==(1073741824&e)?(Rt=1,1073741824):(Rt=8,e)}function Mt(e,t){var n=e.pendingLanes;if(0===n)return Rt=0;var r=0,i=0,a=e.expiredLanes,o=e.suspendedLanes,u=e.pingedLanes;if(0!==a)r=a,i=Rt=15;else if(0!==(a=134217727&n)){var s=a&~o;0!==s?(r=Ft(s),i=Rt):0!==(u&=a)&&(r=Ft(u),i=Rt)}else 0!==(a=n&~o)?(r=Ft(a),i=Rt):0!==u&&(r=Ft(u),i=Rt);if(0===r)return 0;if(r=n&((0>(r=31-Ht(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&o)){if(Ft(t),i<=Rt)return t;Rt=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-Ht(t)),r|=e[n],t&=~i;return r}function Vt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Ut(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=zt(24&~t))?Ut(10,t):e;case 10:return 0===(e=zt(192&~t))?Ut(8,t):e;case 8:return 0===(e=zt(3584&~t))&&(0===(e=zt(4186112&~t))&&(e=512)),e;case 2:return 0===(t=zt(805306368&~t))&&(t=268435456),t}throw Error(o(358,e))}function zt(e){return e&-e}function Bt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Kt(e)/Gt|0)|0},Kt=Math.log,Gt=Math.LN2;var Wt=a.unstable_UserBlockingPriority,Qt=a.unstable_runWithPriority,$t=!0;function Yt(e,t,n,r){Fe||Pe();var i=Jt,a=Fe;Fe=!0;try{Le(i,e,t,n,r)}finally{(Fe=a)||Ve()}}function Xt(e,t,n,r){Qt(Wt,Jt.bind(null,e,t,n,r))}function Jt(e,t,n,r){var i;if($t)if((i=0===(4&t))&&0<ot.length&&-1<dt.indexOf(e))e=pt(null,e,t,n,r),ot.push(e);else{var a=Zt(e,t,n,r);if(null===a)i&&vt(e,r);else{if(i){if(-1<dt.indexOf(e))return e=pt(a,e,t,n,r),void ot.push(e);if(function(e,t,n,r,i){switch(t){case"focusin":return ut=yt(ut,e,t,n,r,i),!0;case"dragenter":return st=yt(st,e,t,n,r,i),!0;case"mouseover":return lt=yt(lt,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return ct.set(a,yt(ct.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,ft.set(a,yt(ft.get(a)||null,e,t,n,r,i)),!0}return!1}(a,e,t,n,r))return;vt(e,r)}Pr(e,t,r,null,n)}}}function Zt(e,t,n,r){var i=_e(r);if(null!==(i=ni(i))){var a=Ye(i);if(null===a)i=null;else{var o=a.tag;if(13===o){if(null!==(i=Xe(a)))return i;i=null}else if(3===o){if(a.stateNode.hydrate)return 3===a.tag?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return Pr(e,t,r,i,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,i="value"in en?en.value:en.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return nn=i.slice(e,1<t?1-t:void 0)}function an(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function on(){return!0}function un(){return!1}function sn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?on:un,this.isPropagationStopped=un,this}return i(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=on)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=on)},persist:function(){},isPersistent:on}),t}var ln,cn,fn,hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=sn(hn),pn=i({},hn,{view:0,detail:0}),vn=sn(pn),yn=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(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fn&&(fn&&"mousemove"===e.type?(ln=e.screenX-fn.screenX,cn=e.screenY-fn.screenY):cn=ln=0,fn=e),ln)},movementY:function(e){return"movementY"in e?e.movementY:cn}}),gn=sn(yn),mn=sn(i({},yn,{dataTransfer:0})),bn=sn(i({},pn,{relatedTarget:0})),kn=sn(i({},hn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=i({},hn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),En=sn(wn),On=sn(i({},hn,{data:0})),Sn={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"},_n={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_n[e])&&!!t[e]}function In(){return jn}var xn=i({},pn,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=an(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Tn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:In,charCode:function(e){return"keypress"===e.type?an(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?an(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Cn=sn(xn),Nn=sn(i({},yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),An=sn(i({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:In})),Dn=sn(i({},hn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ln=i({},yn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Pn=sn(Ln),Rn=[9,13,27,32],Fn=f&&"CompositionEvent"in window,Mn=null;f&&"documentMode"in document&&(Mn=document.documentMode);var Vn=f&&"TextEvent"in window&&!Mn,Un=f&&(!Fn||Mn&&8<Mn&&11>=Mn),zn=String.fromCharCode(32),Bn=!1;function qn(e,t){switch(e){case"keyup":return-1!==Rn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Kn=!1;var Gn={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(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Gn[e.type]:"textarea"===t}function Qn(e,t,n,r){Ne(r),0<(t=Fr(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var $n=null,Yn=null;function Xn(e){xr(e,0)}function Jn(e){if(X(ii(e)))return e}function Zn(e,t){if("change"===e)return t}var er=!1;if(f){var tr;if(f){var nr="oninput"in document;if(!nr){var rr=document.createElement("div");rr.setAttribute("oninput","return;"),nr="function"===typeof rr.oninput}tr=nr}else tr=!1;er=tr&&(!document.documentMode||9<document.documentMode)}function ir(){$n&&($n.detachEvent("onpropertychange",ar),Yn=$n=null)}function ar(e){if("value"===e.propertyName&&Jn(Yn)){var t=[];if(Qn(t,Yn,e,_e(e)),e=Xn,Fe)e(t);else{Fe=!0;try{De(e,t)}finally{Fe=!1,Ve()}}}}function or(e,t,n){"focusin"===e?(ir(),Yn=n,($n=t).attachEvent("onpropertychange",ar)):"focusout"===e&&ir()}function ur(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Jn(Yn)}function sr(e,t){if("click"===e)return Jn(t)}function lr(e,t){if("input"===e||"change"===e)return Jn(t)}var cr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},fr=Object.prototype.hasOwnProperty;function hr(e,t){if(cr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!fr.call(t,n[r])||!cr(e[n[r]],t[n[r]]))return!1;return!0}function dr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pr(e,t){var n,r=dr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=dr(r)}}function vr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?vr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function yr(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var mr=f&&"documentMode"in document&&11>=document.documentMode,br=null,kr=null,wr=null,Er=!1;function Or(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Er||null==br||br!==J(r)||("selectionStart"in(r=br)&&gr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},wr&&hr(wr,r)||(wr=r,0<(r=Fr(kr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=br)))}Pt("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),Pt("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),Pt(Lt,2);for(var Sr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Tr=0;Tr<Sr.length;Tr++)Dt.set(Sr[Tr],0);c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _r="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),jr=new Set("cancel close invalid load scroll toggle".split(" ").concat(_r));function Ir(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,u,s,l){if($e.apply(this,arguments),He){if(!He)throw Error(o(198));var c=Ke;He=!1,Ke=null,Ge||(Ge=!0,We=c)}}(r,t,void 0,e),e.currentTarget=null}function xr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var u=r[o],s=u.instance,l=u.currentTarget;if(u=u.listener,s!==a&&i.isPropagationStopped())break e;Ir(i,u,l),a=s}else for(o=0;o<r.length;o++){if(s=(u=r[o]).instance,l=u.currentTarget,u=u.listener,s!==a&&i.isPropagationStopped())break e;Ir(i,u,l),a=s}}}if(Ge)throw e=We,Ge=!1,We=null,e}function Cr(e,t){var n=oi(t),r=e+"__bubble";n.has(r)||(Lr(t,e,2,!1),n.add(r))}var Nr="_reactListening"+Math.random().toString(36).slice(2);function Ar(e){e[Nr]||(e[Nr]=!0,u.forEach((function(t){jr.has(t)||Dr(t,!1,e,null),Dr(t,!0,e,null)})))}function Dr(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,a=n;if("selectionchange"===e&&9!==n.nodeType&&(a=n.ownerDocument),null!==r&&!t&&jr.has(e)){if("scroll"!==e)return;i|=2,a=r}var o=oi(a),u=e+"__"+(t?"capture":"bubble");o.has(u)||(t&&(i|=4),Lr(a,e,i,t),o.add(u))}function Lr(e,t,n,r){var i=Dt.get(t);switch(void 0===i?2:i){case 0:i=Yt;break;case 1:i=Xt;break;default:i=Jt}n=i.bind(null,t,n,e),i=void 0,!ze||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Pr(e,t,n,r,i){var a=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var u=r.stateNode.containerInfo;if(u===i||8===u.nodeType&&u.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var s=o.tag;if((3===s||4===s)&&((s=o.stateNode.containerInfo)===i||8===s.nodeType&&s.parentNode===i))return;o=o.return}for(;null!==u;){if(null===(o=ni(u)))return;if(5===(s=o.tag)||6===s){r=a=o;continue e}u=u.parentNode}}r=r.return}!function(e,t,n){if(Me)return e(t,n);Me=!0;try{Re(e,t,n)}finally{Me=!1,Ve()}}((function(){var r=a,i=_e(n),o=[];e:{var u=At.get(e);if(void 0!==u){var s=dn,l=e;switch(e){case"keypress":if(0===an(n))break e;case"keydown":case"keyup":s=Cn;break;case"focusin":l="focus",s=bn;break;case"focusout":l="blur",s=bn;break;case"beforeblur":case"afterblur":s=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=An;break;case It:case xt:case Ct:s=kn;break;case Nt:s=Dn;break;case"scroll":s=vn;break;case"wheel":s=Pn;break;case"copy":case"cut":case"paste":s=En;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=Nn}var c=0!==(4&t),f=!c&&"scroll"===e,h=c?null!==u?u+"Capture":null:u;c=[];for(var d,p=r;null!==p;){var v=(d=p).stateNode;if(5===d.tag&&null!==v&&(d=v,null!==h&&(null!=(v=Ue(p,h))&&c.push(Rr(p,v,d)))),f)break;p=p.return}0<c.length&&(u=new s(u,l,null,n,i),o.push({event:u,listeners:c}))}}if(0===(7&t)){if(s="mouseout"===e||"pointerout"===e,(!(u="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(l=n.relatedTarget||n.fromElement)||!ni(l)&&!l[ei])&&(s||u)&&(u=i.window===i?i:(u=i.ownerDocument)?u.defaultView||u.parentWindow:window,s?(s=r,null!==(l=(l=n.relatedTarget||n.toElement)?ni(l):null)&&(l!==(f=Ye(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(s=null,l=r),s!==l)){if(c=gn,v="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=Nn,v="onPointerLeave",h="onPointerEnter",p="pointer"),f=null==s?u:ii(s),d=null==l?u:ii(l),(u=new c(v,p+"leave",s,n,i)).target=f,u.relatedTarget=d,v=null,ni(i)===r&&((c=new c(h,p+"enter",l,n,i)).target=d,c.relatedTarget=f,v=c),f=v,s&&l)e:{for(h=l,p=0,d=c=s;d;d=Mr(d))p++;for(d=0,v=h;v;v=Mr(v))d++;for(;0<p-d;)c=Mr(c),p--;for(;0<d-p;)h=Mr(h),d--;for(;p--;){if(c===h||null!==h&&c===h.alternate)break e;c=Mr(c),h=Mr(h)}c=null}else c=null;null!==s&&Vr(o,u,s,c,!1),null!==l&&null!==f&&Vr(o,f,l,c,!0)}if("select"===(s=(u=r?ii(r):window).nodeName&&u.nodeName.toLowerCase())||"input"===s&&"file"===u.type)var y=Zn;else if(Wn(u))if(er)y=lr;else{y=ur;var g=or}else(s=u.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===u.type||"radio"===u.type)&&(y=sr);switch(y&&(y=y(e,r))?Qn(o,y,n,i):(g&&g(e,u,r),"focusout"===e&&(g=u._wrapperState)&&g.controlled&&"number"===u.type&&ie(u,"number",u.value)),g=r?ii(r):window,e){case"focusin":(Wn(g)||"true"===g.contentEditable)&&(br=g,kr=r,wr=null);break;case"focusout":wr=kr=br=null;break;case"mousedown":Er=!0;break;case"contextmenu":case"mouseup":case"dragend":Er=!1,Or(o,n,i);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":Or(o,n,i)}var m;if(Fn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Kn?qn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Un&&"ko"!==n.locale&&(Kn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Kn&&(m=rn()):(tn="value"in(en=i)?en.value:en.textContent,Kn=!0)),0<(g=Fr(r,b)).length&&(b=new On(b,e,null,n,i),o.push({event:b,listeners:g}),m?b.data=m:null!==(m=Hn(n))&&(b.data=m))),(m=Vn?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Bn=!0,zn);case"textInput":return(e=t.data)===zn&&Bn?null:e;default:return null}}(e,n):function(e,t){if(Kn)return"compositionend"===e||!Fn&&qn(e,t)?(e=rn(),nn=tn=en=null,Kn=!1,e):null;switch(e){default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Un&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Fr(r,"onBeforeInput")).length&&(i=new On("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=m))}xr(o,t)}))}function Rr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=Ue(e,n))&&r.unshift(Rr(e,a,i)),null!=(a=Ue(e,t))&&r.push(Rr(e,a,i))),e=e.return}return r}function Mr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Vr(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var u=n,s=u.alternate,l=u.stateNode;if(null!==s&&s===r)break;5===u.tag&&null!==l&&(u=l,i?null!=(s=Ue(n,a))&&o.unshift(Rr(n,s,u)):i||null!=(s=Ue(n,a))&&o.push(Rr(n,s,u))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}function Ur(){}var zr=null,Br=null;function qr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Hr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Kr="function"===typeof setTimeout?setTimeout:void 0,Gr="function"===typeof clearTimeout?clearTimeout:void 0;function Wr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Qr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function $r(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Yr=0;var Xr=Math.random().toString(36).slice(2),Jr="__reactFiber$"+Xr,Zr="__reactProps$"+Xr,ei="__reactContainer$"+Xr,ti="__reactEvents$"+Xr;function ni(e){var t=e[Jr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ei]||n[Jr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=$r(e);null!==e;){if(n=e[Jr])return n;e=$r(e)}return t}n=(e=n).parentNode}return null}function ri(e){return!(e=e[Jr]||e[ei])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ii(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function ai(e){return e[Zr]||null}function oi(e){var t=e[ti];return void 0===t&&(t=e[ti]=new Set),t}var ui=[],si=-1;function li(e){return{current:e}}function ci(e){0>si||(e.current=ui[si],ui[si]=null,si--)}function fi(e,t){si++,ui[si]=e.current,e.current=t}var hi={},di=li(hi),pi=li(!1),vi=hi;function yi(e,t){var n=e.type.contextTypes;if(!n)return hi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function gi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function mi(){ci(pi),ci(di)}function bi(e,t,n){if(di.current!==hi)throw Error(o(168));fi(di,t),fi(pi,n)}function ki(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var a in r=r.getChildContext())if(!(a in e))throw Error(o(108,W(t)||"Unknown",a));return i({},n,r)}function wi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hi,vi=di.current,fi(di,e),fi(pi,pi.current),!0}function Ei(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=ki(e,t,vi),r.__reactInternalMemoizedMergedChildContext=e,ci(pi),ci(di),fi(di,e)):ci(pi),fi(pi,n)}var Oi=null,Si=null,Ti=a.unstable_runWithPriority,_i=a.unstable_scheduleCallback,ji=a.unstable_cancelCallback,Ii=a.unstable_shouldYield,xi=a.unstable_requestPaint,Ci=a.unstable_now,Ni=a.unstable_getCurrentPriorityLevel,Ai=a.unstable_ImmediatePriority,Di=a.unstable_UserBlockingPriority,Li=a.unstable_NormalPriority,Pi=a.unstable_LowPriority,Ri=a.unstable_IdlePriority,Fi={},Mi=void 0!==xi?xi:function(){},Vi=null,Ui=null,zi=!1,Bi=Ci(),qi=1e4>Bi?Ci:function(){return Ci()-Bi};function Hi(){switch(Ni()){case Ai:return 99;case Di:return 98;case Li:return 97;case Pi:return 96;case Ri:return 95;default:throw Error(o(332))}}function Ki(e){switch(e){case 99:return Ai;case 98:return Di;case 97:return Li;case 96:return Pi;case 95:return Ri;default:throw Error(o(332))}}function Gi(e,t){return e=Ki(e),Ti(e,t)}function Wi(e,t,n){return e=Ki(e),_i(e,t,n)}function Qi(){if(null!==Ui){var e=Ui;Ui=null,ji(e)}$i()}function $i(){if(!zi&&null!==Vi){zi=!0;var e=0;try{var t=Vi;Gi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Vi=null}catch(n){throw null!==Vi&&(Vi=Vi.slice(e+1)),_i(Ai,Qi),n}finally{zi=!1}}}var Yi=w.ReactCurrentBatchConfig;function Xi(e,t){if(e&&e.defaultProps){for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Ji=li(null),Zi=null,ea=null,ta=null;function na(){ta=ea=Zi=null}function ra(e){var t=Ji.current;ci(Ji),e.type._context._currentValue=t}function ia(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function aa(e,t){Zi=e,ta=ea=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Fo=!0),e.firstContext=null)}function oa(e,t){if(ta!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(ta=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ea){if(null===Zi)throw Error(o(308));ea=t,Zi.dependencies={lanes:0,firstContext:t,responders:null}}else ea=ea.next=t;return e._currentValue}var ua=!1;function sa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function la(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ca(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fa(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function ha(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function da(e,t,n,r){var a=e.updateQueue;ua=!1;var o=a.firstBaseUpdate,u=a.lastBaseUpdate,s=a.shared.pending;if(null!==s){a.shared.pending=null;var l=s,c=l.next;l.next=null,null===u?o=c:u.next=c,u=l;var f=e.alternate;if(null!==f){var h=(f=f.updateQueue).lastBaseUpdate;h!==u&&(null===h?f.firstBaseUpdate=c:h.next=c,f.lastBaseUpdate=l)}}if(null!==o){for(h=a.baseState,u=0,f=c=l=null;;){s=o.lane;var d=o.eventTime;if((r&s)===s){null!==f&&(f=f.next={eventTime:d,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var p=e,v=o;switch(s=t,d=n,v.tag){case 1:if("function"===typeof(p=v.payload)){h=p.call(d,h,s);break e}h=p;break e;case 3:p.flags=-4097&p.flags|64;case 0:if(null===(s="function"===typeof(p=v.payload)?p.call(d,h,s):p)||void 0===s)break e;h=i({},h,s);break e;case 2:ua=!0}}null!==o.callback&&(e.flags|=32,null===(s=a.effects)?a.effects=[o]:s.push(o))}else d={eventTime:d,lane:s,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===f?(c=f=d,l=h):f=f.next=d,u|=s;if(null===(o=o.next)){if(null===(s=a.shared.pending))break;o=s.next,s.next=null,a.lastBaseUpdate=s,a.shared.pending=null}}null===f&&(l=h),a.baseState=l,a.firstBaseUpdate=c,a.lastBaseUpdate=f,zu|=u,e.lanes=u,e.memoizedState=h}}function pa(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(o(191,i));i.call(r)}}}var va=(new r.Component).refs;function ya(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:i({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ga={isMounted:function(e){return!!(e=e._reactInternals)&&Ye(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=hs(),i=ds(e),a=ca(r,i);a.payload=t,void 0!==n&&null!==n&&(a.callback=n),fa(e,a),ps(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=hs(),i=ds(e),a=ca(r,i);a.tag=1,a.payload=t,void 0!==n&&null!==n&&(a.callback=n),fa(e,a),ps(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=hs(),r=ds(e),i=ca(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),fa(e,i),ps(e,r,n)}};function ma(e,t,n,r,i,a,o){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!hr(n,r)||!hr(i,a))}function ba(e,t,n){var r=!1,i=hi,a=t.contextType;return"object"===typeof a&&null!==a?a=oa(a):(i=gi(t)?vi:di.current,a=(r=null!==(r=t.contextTypes)&&void 0!==r)?yi(e,i):hi),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ga,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function ka(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ga.enqueueReplaceState(t,t.state,null)}function wa(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=va,sa(e);var a=t.contextType;"object"===typeof a&&null!==a?i.context=oa(a):(a=gi(t)?vi:di.current,i.context=yi(e,a)),da(e,n,i,r),i.state=e.memoizedState,"function"===typeof(a=t.getDerivedStateFromProps)&&(ya(e,t,a,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&ga.enqueueReplaceState(i,i.state,null),da(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4)}var Ea=Array.isArray;function Oa(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=r.refs;t===va&&(t=r.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!==typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function Sa(e,t){if("textarea"!==e.type)throw Error(o(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Ta(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Gs(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function u(t){return e&&null===t.alternate&&(t.flags=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Ys(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=Oa(e,t,n),r.return=e,r):((r=Ws(n.type,n.key,n.props,null,e.mode,r)).ref=Oa(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Xs(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,a){return null===t||7!==t.tag?((t=Qs(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Ys(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case E:return(n=Ws(t.type,t.key,t.props,null,e.mode,n)).ref=Oa(e,null,t),n.return=e,n;case O:return(t=Xs(t,e.mode,n)).return=e,t}if(Ea(t)||B(t))return(t=Qs(t,e.mode,n,null)).return=e,t;Sa(e,t)}return null}function d(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:s(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case E:return n.key===i?n.type===S?f(e,t,n.props.children,r,i):l(e,t,n,r):null;case O:return n.key===i?c(e,t,n,r):null}if(Ea(n)||B(n))return null!==i?null:f(e,t,n,r,null);Sa(e,n)}return null}function p(e,t,n,r,i){if("string"===typeof r||"number"===typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case E:return e=e.get(null===r.key?n:r.key)||null,r.type===S?f(t,e,r.props.children,i,r.key):l(t,e,r,i);case O:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(Ea(r)||B(r))return f(t,e=e.get(n)||null,r,i,null);Sa(t,r)}return null}function v(i,o,u,s){for(var l=null,c=null,f=o,v=o=0,y=null;null!==f&&v<u.length;v++){f.index>v?(y=f,f=null):y=f.sibling;var g=d(i,f,u[v],s);if(null===g){null===f&&(f=y);break}e&&f&&null===g.alternate&&t(i,f),o=a(g,o,v),null===c?l=g:c.sibling=g,c=g,f=y}if(v===u.length)return n(i,f),l;if(null===f){for(;v<u.length;v++)null!==(f=h(i,u[v],s))&&(o=a(f,o,v),null===c?l=f:c.sibling=f,c=f);return l}for(f=r(i,f);v<u.length;v++)null!==(y=p(f,i,v,u[v],s))&&(e&&null!==y.alternate&&f.delete(null===y.key?v:y.key),o=a(y,o,v),null===c?l=y:c.sibling=y,c=y);return e&&f.forEach((function(e){return t(i,e)})),l}function y(i,u,s,l){var c=B(s);if("function"!==typeof c)throw Error(o(150));if(null==(s=c.call(s)))throw Error(o(151));for(var f=c=null,v=u,y=u=0,g=null,m=s.next();null!==v&&!m.done;y++,m=s.next()){v.index>y?(g=v,v=null):g=v.sibling;var b=d(i,v,m.value,l);if(null===b){null===v&&(v=g);break}e&&v&&null===b.alternate&&t(i,v),u=a(b,u,y),null===f?c=b:f.sibling=b,f=b,v=g}if(m.done)return n(i,v),c;if(null===v){for(;!m.done;y++,m=s.next())null!==(m=h(i,m.value,l))&&(u=a(m,u,y),null===f?c=m:f.sibling=m,f=m);return c}for(v=r(i,v);!m.done;y++,m=s.next())null!==(m=p(v,i,y,m.value,l))&&(e&&null!==m.alternate&&v.delete(null===m.key?y:m.key),u=a(m,u,y),null===f?c=m:f.sibling=m,f=m);return e&&v.forEach((function(e){return t(i,e)})),c}return function(e,r,a,s){var l="object"===typeof a&&null!==a&&a.type===S&&null===a.key;l&&(a=a.props.children);var c="object"===typeof a&&null!==a;if(c)switch(a.$$typeof){case E:e:{for(c=a.key,l=r;null!==l;){if(l.key===c){if(7===l.tag){if(a.type===S){n(e,l.sibling),(r=i(l,a.props.children)).return=e,e=r;break e}}else if(l.elementType===a.type){n(e,l.sibling),(r=i(l,a.props)).ref=Oa(e,l,a),r.return=e,e=r;break e}n(e,l);break}t(e,l),l=l.sibling}a.type===S?((r=Qs(a.props.children,e.mode,s,a.key)).return=e,e=r):((s=Ws(a.type,a.key,a.props,null,e.mode,s)).ref=Oa(e,r,a),s.return=e,e=s)}return u(e);case O:e:{for(l=a.key;null!==r;){if(r.key===l){if(4===r.tag&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),(r=i(r,a.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Xs(a,e.mode,s)).return=e,e=r}return u(e)}if("string"===typeof a||"number"===typeof a)return a=""+a,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,a)).return=e,e=r):(n(e,r),(r=Ys(a,e.mode,s)).return=e,e=r),u(e);if(Ea(a))return v(e,r,a,s);if(B(a))return y(e,r,a,s);if(c&&Sa(e,a),"undefined"===typeof a&&!l)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(o(152,W(e.type)||"Component"))}return n(e,r)}}var _a=Ta(!0),ja=Ta(!1),Ia={},xa=li(Ia),Ca=li(Ia),Na=li(Ia);function Aa(e){if(e===Ia)throw Error(o(174));return e}function Da(e,t){switch(fi(Na,t),fi(Ca,e),fi(xa,Ia),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pe(null,"");break;default:t=pe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ci(xa),fi(xa,t)}function La(){ci(xa),ci(Ca),ci(Na)}function Pa(e){Aa(Na.current);var t=Aa(xa.current),n=pe(t,e.type);t!==n&&(fi(Ca,e),fi(xa,n))}function Ra(e){Ca.current===e&&(ci(xa),ci(Ca))}var Fa=li(0);function Ma(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Va=null,Ua=null,za=!1;function Ba(e,t){var n=Hs(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function qa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Ha(e){if(za){var t=Ua;if(t){var n=t;if(!qa(e,t)){if(!(t=Qr(n.nextSibling))||!qa(e,t))return e.flags=-1025&e.flags|2,za=!1,void(Va=e);Ba(Va,n)}Va=e,Ua=Qr(t.firstChild)}else e.flags=-1025&e.flags|2,za=!1,Va=e}}function Ka(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Va=e}function Ga(e){if(e!==Va)return!1;if(!za)return Ka(e),za=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Hr(t,e.memoizedProps))for(t=Ua;t;)Ba(e,t),t=Qr(t.nextSibling);if(Ka(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ua=Qr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ua=null}}else Ua=Va?Qr(e.stateNode.nextSibling):null;return!0}function Wa(){Ua=Va=null,za=!1}var Qa=[];function $a(){for(var e=0;e<Qa.length;e++)Qa[e]._workInProgressVersionPrimary=null;Qa.length=0}var Ya=w.ReactCurrentDispatcher,Xa=w.ReactCurrentBatchConfig,Ja=0,Za=null,eo=null,to=null,no=!1,ro=!1;function io(){throw Error(o(321))}function ao(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cr(e[n],t[n]))return!1;return!0}function oo(e,t,n,r,i,a){if(Ja=a,Za=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ya.current=null===e||null===e.memoizedState?Do:Lo,e=n(r,i),ro){a=0;do{if(ro=!1,!(25>a))throw Error(o(301));a+=1,to=eo=null,t.updateQueue=null,Ya.current=Po,e=n(r,i)}while(ro)}if(Ya.current=Ao,t=null!==eo&&null!==eo.next,Ja=0,to=eo=Za=null,no=!1,t)throw Error(o(300));return e}function uo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===to?Za.memoizedState=to=e:to=to.next=e,to}function so(){if(null===eo){var e=Za.alternate;e=null!==e?e.memoizedState:null}else e=eo.next;var t=null===to?Za.memoizedState:to.next;if(null!==t)to=t,eo=e;else{if(null===e)throw Error(o(310));e={memoizedState:(eo=e).memoizedState,baseState:eo.baseState,baseQueue:eo.baseQueue,queue:eo.queue,next:null},null===to?Za.memoizedState=to=e:to=to.next=e}return to}function lo(e,t){return"function"===typeof t?t(e):t}function co(e){var t=so(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=eo,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var u=i.next;i.next=a.next,a.next=u}r.baseQueue=i=a,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var s=u=a=null,l=i;do{var c=l.lane;if((Ja&c)===c)null!==s&&(s=s.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),r=l.eagerReducer===e?l.eagerState:e(r,l.action);else{var f={lane:c,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};null===s?(u=s=f,a=r):s=s.next=f,Za.lanes|=c,zu|=c}l=l.next}while(null!==l&&l!==i);null===s?a=r:s.next=u,cr(r,t.memoizedState)||(Fo=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=s,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function fo(e){var t=so(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var u=i=i.next;do{a=e(a,u.action),u=u.next}while(u!==i);cr(a,t.memoizedState)||(Fo=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function ho(e,t,n){var r=t._getVersion;r=r(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(Ja&e)===e)&&(t._workInProgressVersionPrimary=r,Qa.push(t))),e)return n(t._source);throw Qa.push(t),Error(o(350))}function po(e,t,n,r){var i=Du;if(null===i)throw Error(o(349));var a=t._getVersion,u=a(t._source),s=Ya.current,l=s.useState((function(){return ho(i,t,n)})),c=l[1],f=l[0];l=to;var h=e.memoizedState,d=h.refs,p=d.getSnapshot,v=h.source;h=h.subscribe;var y=Za;return e.memoizedState={refs:d,source:t,subscribe:r},s.useEffect((function(){d.getSnapshot=n,d.setSnapshot=c;var e=a(t._source);if(!cr(u,e)){e=n(t._source),cr(f,e)||(c(e),e=ds(y),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,o=e;0<o;){var s=31-Ht(o),l=1<<s;r[s]|=e,o&=~l}}}),[n,t,r]),s.useEffect((function(){return r(t._source,(function(){var e=d.getSnapshot,n=d.setSnapshot;try{n(e(t._source));var r=ds(y);i.mutableReadLanes|=r&i.pendingLanes}catch(a){n((function(){throw a}))}}))}),[t,r]),cr(p,n)&&cr(v,t)&&cr(h,r)||((e={pending:null,dispatch:null,lastRenderedReducer:lo,lastRenderedState:f}).dispatch=c=No.bind(null,Za,e),l.queue=e,l.baseQueue=null,f=ho(i,t,n),l.memoizedState=l.baseState=f),f}function vo(e,t,n){return po(so(),e,t,n)}function yo(e){var t=uo();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:lo,lastRenderedState:e}).dispatch=No.bind(null,Za,e),[t.memoizedState,e]}function go(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Za.updateQueue)?(t={lastEffect:null},Za.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function mo(e){return e={current:e},uo().memoizedState=e}function bo(){return so().memoizedState}function ko(e,t,n,r){var i=uo();Za.flags|=e,i.memoizedState=go(1|t,n,void 0,void 0===r?null:r)}function wo(e,t,n,r){var i=so();r=void 0===r?null:r;var a=void 0;if(null!==eo){var o=eo.memoizedState;if(a=o.destroy,null!==r&&ao(r,o.deps))return void go(t,n,a,r)}Za.flags|=e,i.memoizedState=go(1|t,n,a,r)}function Eo(e,t){return ko(516,4,e,t)}function Oo(e,t){return wo(516,4,e,t)}function So(e,t){return wo(4,2,e,t)}function To(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function _o(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,wo(4,2,To.bind(null,t,e),n)}function jo(){}function Io(e,t){var n=so();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ao(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xo(e,t){var n=so();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ao(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Co(e,t){var n=Hi();Gi(98>n?98:n,(function(){e(!0)})),Gi(97<n?97:n,(function(){var n=Xa.transition;Xa.transition=1;try{e(!1),t()}finally{Xa.transition=n}}))}function No(e,t,n){var r=hs(),i=ds(e),a={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},o=t.pending;if(null===o?a.next=a:(a.next=o.next,o.next=a),t.pending=a,o=e.alternate,e===Za||null!==o&&o===Za)ro=no=!0;else{if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var u=t.lastRenderedState,s=o(u,n);if(a.eagerReducer=o,a.eagerState=s,cr(s,u))return}catch(l){}ps(e,i,r)}}var Ao={readContext:oa,useCallback:io,useContext:io,useEffect:io,useImperativeHandle:io,useLayoutEffect:io,useMemo:io,useReducer:io,useRef:io,useState:io,useDebugValue:io,useDeferredValue:io,useTransition:io,useMutableSource:io,useOpaqueIdentifier:io,unstable_isNewReconciler:!1},Do={readContext:oa,useCallback:function(e,t){return uo().memoizedState=[e,void 0===t?null:t],e},useContext:oa,useEffect:Eo,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ko(4,2,To.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ko(4,2,e,t)},useMemo:function(e,t){var n=uo();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=uo();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=No.bind(null,Za,e),[r.memoizedState,e]},useRef:mo,useState:yo,useDebugValue:jo,useDeferredValue:function(e){var t=yo(e),n=t[0],r=t[1];return Eo((function(){var t=Xa.transition;Xa.transition=1;try{r(e)}finally{Xa.transition=t}}),[e]),n},useTransition:function(){var e=yo(!1),t=e[0];return mo(e=Co.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=uo();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},po(r,e,t,n)},useOpaqueIdentifier:function(){if(za){var e=!1,t=function(e){return{$$typeof:P,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Yr++).toString(36))),Error(o(355))})),n=yo(t)[1];return 0===(2&Za.mode)&&(Za.flags|=516,go(5,(function(){n("r:"+(Yr++).toString(36))}),void 0,null)),t}return yo(t="r:"+(Yr++).toString(36)),t},unstable_isNewReconciler:!1},Lo={readContext:oa,useCallback:Io,useContext:oa,useEffect:Oo,useImperativeHandle:_o,useLayoutEffect:So,useMemo:xo,useReducer:co,useRef:bo,useState:function(){return co(lo)},useDebugValue:jo,useDeferredValue:function(e){var t=co(lo),n=t[0],r=t[1];return Oo((function(){var t=Xa.transition;Xa.transition=1;try{r(e)}finally{Xa.transition=t}}),[e]),n},useTransition:function(){var e=co(lo)[0];return[bo().current,e]},useMutableSource:vo,useOpaqueIdentifier:function(){return co(lo)[0]},unstable_isNewReconciler:!1},Po={readContext:oa,useCallback:Io,useContext:oa,useEffect:Oo,useImperativeHandle:_o,useLayoutEffect:So,useMemo:xo,useReducer:fo,useRef:bo,useState:function(){return fo(lo)},useDebugValue:jo,useDeferredValue:function(e){var t=fo(lo),n=t[0],r=t[1];return Oo((function(){var t=Xa.transition;Xa.transition=1;try{r(e)}finally{Xa.transition=t}}),[e]),n},useTransition:function(){var e=fo(lo)[0];return[bo().current,e]},useMutableSource:vo,useOpaqueIdentifier:function(){return fo(lo)[0]},unstable_isNewReconciler:!1},Ro=w.ReactCurrentOwner,Fo=!1;function Mo(e,t,n,r){t.child=null===e?ja(t,null,n,r):_a(t,e.child,n,r)}function Vo(e,t,n,r,i){n=n.render;var a=t.ref;return aa(t,i),r=oo(e,t,n,r,a,i),null===e||Fo?(t.flags|=1,Mo(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,au(e,t,i))}function Uo(e,t,n,r,i,a){if(null===e){var o=n.type;return"function"!==typeof o||Ks(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ws(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,zo(e,t,o,r,i,a))}return o=e.child,0===(i&a)&&(i=o.memoizedProps,(n=null!==(n=n.compare)?n:hr)(i,r)&&e.ref===t.ref)?au(e,t,a):(t.flags|=1,(e=Gs(o,r)).ref=t.ref,e.return=t,t.child=e)}function zo(e,t,n,r,i,a){if(null!==e&&hr(e.memoizedProps,r)&&e.ref===t.ref){if(Fo=!1,0===(a&i))return t.lanes=e.lanes,au(e,t,a);0!==(16384&e.flags)&&(Fo=!0)}return Ho(e,t,n,r,a)}function Bo(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},Es(t,n);else{if(0===(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Es(t,e),null;t.memoizedState={baseLanes:0},Es(t,null!==a?a.baseLanes:n)}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Es(t,r);return Mo(e,t,i,n),t.child}function qo(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Ho(e,t,n,r,i){var a=gi(n)?vi:di.current;return a=yi(t,a),aa(t,i),n=oo(e,t,n,r,a,i),null===e||Fo?(t.flags|=1,Mo(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,au(e,t,i))}function Ko(e,t,n,r,i){if(gi(n)){var a=!0;wi(t)}else a=!1;if(aa(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),ba(t,n,r),wa(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,u=t.memoizedProps;o.props=u;var s=o.context,l=n.contextType;"object"===typeof l&&null!==l?l=oa(l):l=yi(t,l=gi(n)?vi:di.current);var c=n.getDerivedStateFromProps,f="function"===typeof c||"function"===typeof o.getSnapshotBeforeUpdate;f||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(u!==r||s!==l)&&ka(t,o,r,l),ua=!1;var h=t.memoizedState;o.state=h,da(t,r,o,i),s=t.memoizedState,u!==r||h!==s||pi.current||ua?("function"===typeof c&&(ya(t,n,c,r),s=t.memoizedState),(u=ua||ma(t,n,u,r,h,s,l))?(f||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(t.flags|=4)):("function"===typeof o.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=s),o.props=r,o.state=s,o.context=l,r=u):("function"===typeof o.componentDidMount&&(t.flags|=4),r=!1)}else{o=t.stateNode,la(e,t),u=t.memoizedProps,l=t.type===t.elementType?u:Xi(t.type,u),o.props=l,f=t.pendingProps,h=o.context,"object"===typeof(s=n.contextType)&&null!==s?s=oa(s):s=yi(t,s=gi(n)?vi:di.current);var d=n.getDerivedStateFromProps;(c="function"===typeof d||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(u!==f||h!==s)&&ka(t,o,r,s),ua=!1,h=t.memoizedState,o.state=h,da(t,r,o,i);var p=t.memoizedState;u!==f||h!==p||pi.current||ua?("function"===typeof d&&(ya(t,n,d,r),p=t.memoizedState),(l=ua||ma(t,n,l,r,h,p,s))?(c||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,s),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,s)),"function"===typeof o.componentDidUpdate&&(t.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof o.componentDidUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=s,r=l):("function"!==typeof o.componentDidUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||u===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),r=!1)}return Go(e,t,n,r,a,i)}function Go(e,t,n,r,i,a){qo(e,t);var o=0!==(64&t.flags);if(!r&&!o)return i&&Ei(t,n,!1),au(e,t,a);r=t.stateNode,Ro.current=t;var u=o&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=_a(t,e.child,null,a),t.child=_a(t,null,u,a)):Mo(e,t,u,a),t.memoizedState=r.state,i&&Ei(t,n,!0),t.child}function Wo(e){var t=e.stateNode;t.pendingContext?bi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&bi(0,t.context,!1),Da(e,t.containerInfo)}var Qo,$o,Yo,Xo={dehydrated:null,retryLane:0};function Jo(e,t,n){var r,i=t.pendingProps,a=Fa.current,o=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&a)),r?(o=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),fi(Fa,1&a),null===e?(void 0!==i.fallback&&Ha(t),e=i.children,a=i.fallback,o?(e=Zo(t,e,a,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xo,e):"number"===typeof i.unstable_expectedLoadTime?(e=Zo(t,e,a,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xo,t.lanes=33554432,e):((n=$s({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,o?(i=tu(e,t,i.children,i.fallback,n),o=t.child,a=e.child.memoizedState,o.memoizedState=null===a?{baseLanes:n}:{baseLanes:a.baseLanes|n},o.childLanes=e.childLanes&~n,t.memoizedState=Xo,i):(n=eu(e,t,i.children,n),t.memoizedState=null,n))}function Zo(e,t,n,r){var i=e.mode,a=e.child;return t={mode:"hidden",children:t},0===(2&i)&&null!==a?(a.childLanes=0,a.pendingProps=t):a=$s(t,i,0,null),n=Qs(n,i,r,null),a.return=e,n.return=e,a.sibling=n,e.child=a,n}function eu(e,t,n,r){var i=e.child;return e=i.sibling,n=Gs(i,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function tu(e,t,n,r,i){var a=t.mode,o=e.child;e=o.sibling;var u={mode:"hidden",children:n};return 0===(2&a)&&t.child!==o?((n=t.child).childLanes=0,n.pendingProps=u,null!==(o=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=o,o.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Gs(o,u),null!==e?r=Gs(e,r):(r=Qs(r,a,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function nu(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ia(e.return,t)}function ru(e,t,n,r,i,a){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.lastEffect=a)}function iu(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Mo(e,t,r.children,n),0!==(2&(r=Fa.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&nu(e,n);else if(19===e.tag)nu(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fi(Fa,r),0===(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Ma(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ru(t,!1,i,n,a,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Ma(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ru(t,!0,n,null,a,t.lastEffect);break;case"together":ru(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function au(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),zu|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Gs(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Gs(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function ou(e,t){if(!za)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function uu(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return gi(t.type)&&mi(),null;case 3:return La(),ci(pi),ci(di),$a(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Ga(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Ra(t);var a=Aa(Na.current);if(n=t.type,null!==e&&null!=t.stateNode)$o(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(o(166));return null}if(e=Aa(xa.current),Ga(t)){r=t.stateNode,n=t.type;var u=t.memoizedProps;switch(r[Jr]=t,r[Zr]=u,n){case"dialog":Cr("cancel",r),Cr("close",r);break;case"iframe":case"object":case"embed":Cr("load",r);break;case"video":case"audio":for(e=0;e<_r.length;e++)Cr(_r[e],r);break;case"source":Cr("error",r);break;case"img":case"image":case"link":Cr("error",r),Cr("load",r);break;case"details":Cr("toggle",r);break;case"input":ee(r,u),Cr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!u.multiple},Cr("invalid",r);break;case"textarea":se(r,u),Cr("invalid",r)}for(var l in Se(n,u),e=null,u)u.hasOwnProperty(l)&&(a=u[l],"children"===l?"string"===typeof a?r.textContent!==a&&(e=["children",a]):"number"===typeof a&&r.textContent!==""+a&&(e=["children",""+a]):s.hasOwnProperty(l)&&null!=a&&"onScroll"===l&&Cr("scroll",r));switch(n){case"input":Y(r),re(r,u,!0);break;case"textarea":Y(r),ce(r);break;case"select":case"option":break;default:"function"===typeof u.onClick&&(r.onclick=Ur)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(l=9===a.nodeType?a:a.ownerDocument,e===fe&&(e=de(n)),e===fe?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Jr]=t,e[Zr]=r,Qo(e,t),t.stateNode=e,l=Te(n,r),n){case"dialog":Cr("cancel",e),Cr("close",e),a=r;break;case"iframe":case"object":case"embed":Cr("load",e),a=r;break;case"video":case"audio":for(a=0;a<_r.length;a++)Cr(_r[a],e);a=r;break;case"source":Cr("error",e),a=r;break;case"img":case"image":case"link":Cr("error",e),Cr("load",e),a=r;break;case"details":Cr("toggle",e),a=r;break;case"input":ee(e,r),a=Z(e,r),Cr("invalid",e);break;case"option":a=ae(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},a=i({},r,{value:void 0}),Cr("invalid",e);break;case"textarea":se(e,r),a=ue(e,r),Cr("invalid",e);break;default:a=r}Se(n,a);var c=a;for(u in c)if(c.hasOwnProperty(u)){var f=c[u];"style"===u?Ee(e,f):"dangerouslySetInnerHTML"===u?null!=(f=f?f.__html:void 0)&&ge(e,f):"children"===u?"string"===typeof f?("textarea"!==n||""!==f)&&me(e,f):"number"===typeof f&&me(e,""+f):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?null!=f&&"onScroll"===u&&Cr("scroll",e):null!=f&&k(e,u,f,l))}switch(n){case"input":Y(e),re(e,r,!1);break;case"textarea":Y(e),ce(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Q(r.value));break;case"select":e.multiple=!!r.multiple,null!=(u=r.value)?oe(e,!!r.multiple,u,!1):null!=r.defaultValue&&oe(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof a.onClick&&(e.onclick=Ur)}qr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Yo(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(o(166));n=Aa(Na.current),Aa(xa.current),Ga(t)?(r=t.stateNode,n=t.memoizedProps,r[Jr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Jr]=t,t.stateNode=r)}return null;case 13:return ci(Fa),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Ga(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Fa.current)?0===Mu&&(Mu=3):(0!==Mu&&3!==Mu||(Mu=4),null===Du||0===(134217727&zu)&&0===(134217727&Bu)||ms(Du,Pu))),(r||n)&&(t.flags|=4),null);case 4:return La(),null===e&&Ar(t.stateNode.containerInfo),null;case 10:return ra(t),null;case 19:if(ci(Fa),null===(r=t.memoizedState))return null;if(u=0!==(64&t.flags),null===(l=r.rendering))if(u)ou(r,!1);else{if(0!==Mu||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(l=Ma(e))){for(t.flags|=64,ou(r,!1),null!==(u=l.updateQueue)&&(t.updateQueue=u,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(u=n).flags&=2,u.nextEffect=null,u.firstEffect=null,u.lastEffect=null,null===(l=u.alternate)?(u.childLanes=0,u.lanes=e,u.child=null,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=l.childLanes,u.lanes=l.lanes,u.child=l.child,u.memoizedProps=l.memoizedProps,u.memoizedState=l.memoizedState,u.updateQueue=l.updateQueue,u.type=l.type,e=l.dependencies,u.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fi(Fa,1&Fa.current|2),t.child}e=e.sibling}null!==r.tail&&qi()>Gu&&(t.flags|=64,u=!0,ou(r,!1),t.lanes=33554432)}else{if(!u)if(null!==(e=Ma(l))){if(t.flags|=64,u=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),ou(r,!0),null===r.tail&&"hidden"===r.tailMode&&!l.alternate&&!za)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*qi()-r.renderingStartTime>Gu&&1073741824!==n&&(t.flags|=64,u=!0,ou(r,!1),t.lanes=33554432);r.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=r.last)?n.sibling=l:t.child=l,r.last=l)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=qi(),n.sibling=null,t=Fa.current,fi(Fa,u?1&t|2:1&t),n):null;case 23:case 24:return Os(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(o(156,t.tag))}function su(e){switch(e.tag){case 1:gi(e.type)&&mi();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(La(),ci(pi),ci(di),$a(),0!==(64&(t=e.flags)))throw Error(o(285));return e.flags=-4097&t|64,e;case 5:return Ra(e),null;case 13:return ci(Fa),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ci(Fa),null;case 4:return La(),null;case 10:return ra(e),null;case 23:case 24:return Os(),null;default:return null}}function lu(e,t){try{var n="",r=t;do{n+=G(r),r=r.return}while(r);var i=n}catch(a){i="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:i}}function cu(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Qo=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},$o=function(e,t,n,r){var a=e.memoizedProps;if(a!==r){e=t.stateNode,Aa(xa.current);var o,u=null;switch(n){case"input":a=Z(e,a),r=Z(e,r),u=[];break;case"option":a=ae(e,a),r=ae(e,r),u=[];break;case"select":a=i({},a,{value:void 0}),r=i({},r,{value:void 0}),u=[];break;case"textarea":a=ue(e,a),r=ue(e,r),u=[];break;default:"function"!==typeof a.onClick&&"function"===typeof r.onClick&&(e.onclick=Ur)}for(f in Se(n,r),n=null,a)if(!r.hasOwnProperty(f)&&a.hasOwnProperty(f)&&null!=a[f])if("style"===f){var l=a[f];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(s.hasOwnProperty(f)?u||(u=[]):(u=u||[]).push(f,null));for(f in r){var c=r[f];if(l=null!=a?a[f]:void 0,r.hasOwnProperty(f)&&c!==l&&(null!=c||null!=l))if("style"===f)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(u||(u=[]),u.push(f,n)),n=c;else"dangerouslySetInnerHTML"===f?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(u=u||[]).push(f,c)):"children"===f?"string"!==typeof c&&"number"!==typeof c||(u=u||[]).push(f,""+c):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(s.hasOwnProperty(f)?(null!=c&&"onScroll"===f&&Cr("scroll",e),u||l===c||(u=[])):"object"===typeof c&&null!==c&&c.$$typeof===P?c.toString():(u=u||[]).push(f,c))}n&&(u=u||[]).push("style",n);var f=u;(t.updateQueue=f)&&(t.flags|=4)}},Yo=function(e,t,n,r){n!==r&&(t.flags|=4)};var fu="function"===typeof WeakMap?WeakMap:Map;function hu(e,t,n){(n=ca(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Yu||(Yu=!0,Xu=r),cu(0,t)},n}function du(e,t,n){(n=ca(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return cu(0,t),r(i)}}var a=e.stateNode;return null!==a&&"function"===typeof a.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Ju?Ju=new Set([this]):Ju.add(this),cu(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var pu="function"===typeof WeakSet?WeakSet:Set;function vu(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Us(e,n)}else t.current=null}function yu(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Xi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Wr(t.stateNode.containerInfo))}throw Error(o(163))}function gu(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!==(4&(i=i.tag))&&0!==(1&i)&&(Fs(n,e),Rs(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Xi(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&pa(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}pa(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&qr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Et(n)))))}throw Error(o(163))}function mu(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=void 0!==i&&null!==i&&i.hasOwnProperty("display")?i.display:null,r.style.display=we("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function bu(e,t){if(Si&&"function"===typeof Si.onCommitFiberUnmount)try{Si.onCommitFiberUnmount(Oi,t)}catch(a){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!==(4&r))Fs(t,n);else{r=t;try{i()}catch(a){Us(r,a)}}n=n.next}while(n!==e)}break;case 1:if(vu(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(a){Us(t,a)}break;case 5:vu(t);break;case 4:Tu(e,t)}}function ku(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function wu(e){return 5===e.tag||3===e.tag||4===e.tag}function Eu(e){e:{for(var t=e.return;null!==t;){if(wu(t))break e;t=t.return}throw Error(o(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(o(161))}16&n.flags&&(me(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||wu(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Ou(e,n,t):Su(e,n,t)}function Ou(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Ur));else if(4!==r&&null!==(e=e.child))for(Ou(e,t,n),e=e.sibling;null!==e;)Ou(e,t,n),e=e.sibling}function Su(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Su(e,t,n),e=e.sibling;null!==e;)Su(e,t,n),e=e.sibling}function Tu(e,t){for(var n,r,i=t,a=!1;;){if(!a){a=i.return;e:for(;;){if(null===a)throw Error(o(160));switch(n=a.stateNode,a.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}a=a.return}a=!0}if(5===i.tag||6===i.tag){e:for(var u=e,s=i,l=s;;)if(bu(u,l),null!==l.child&&4!==l.tag)l.child.return=l,l=l.child;else{if(l===s)break e;for(;null===l.sibling;){if(null===l.return||l.return===s)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}r?(u=n,s=i.stateNode,8===u.nodeType?u.parentNode.removeChild(s):u.removeChild(s)):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(bu(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(a=!1)}i.sibling.return=i.return,i=i.sibling}}function _u(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var i=null!==e?e.memoizedProps:r;e=t.type;var a=t.updateQueue;if(t.updateQueue=null,null!==a){for(n[Zr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Te(e,i),t=Te(e,r),i=0;i<a.length;i+=2){var u=a[i],s=a[i+1];"style"===u?Ee(n,s):"dangerouslySetInnerHTML"===u?ge(n,s):"children"===u?me(n,s):k(n,u,s,t)}switch(e){case"input":ne(n,r);break;case"textarea":le(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(a=r.value)?oe(n,!!r.multiple,a,!1):e!==!!r.multiple&&(null!=r.defaultValue?oe(n,!!r.multiple,r.defaultValue,!0):oe(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(o(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,Et(n.containerInfo)));case 13:return null!==t.memoizedState&&(Ku=qi(),mu(t.child,!0)),void ju(t);case 19:return void ju(t);case 23:case 24:return void mu(t,null!==t.memoizedState)}throw Error(o(163))}function ju(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new pu),t.forEach((function(t){var r=Bs.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Iu(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var xu=Math.ceil,Cu=w.ReactCurrentDispatcher,Nu=w.ReactCurrentOwner,Au=0,Du=null,Lu=null,Pu=0,Ru=0,Fu=li(0),Mu=0,Vu=null,Uu=0,zu=0,Bu=0,qu=0,Hu=null,Ku=0,Gu=1/0;function Wu(){Gu=qi()+500}var Qu,$u=null,Yu=!1,Xu=null,Ju=null,Zu=!1,es=null,ts=90,ns=[],rs=[],is=null,as=0,os=null,us=-1,ss=0,ls=0,cs=null,fs=!1;function hs(){return 0!==(48&Au)?qi():-1!==us?us:us=qi()}function ds(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===Hi()?1:2;if(0===ss&&(ss=Uu),0!==Yi.transition){0!==ls&&(ls=null!==Hu?Hu.pendingLanes:0),e=ss;var t=4186112&~ls;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Hi(),0!==(4&Au)&&98===e?e=Ut(12,ss):e=Ut(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ss),e}function ps(e,t,n){if(50<as)throw as=0,os=null,Error(o(185));if(null===(e=vs(e,t)))return null;qt(e,t,n),e===Du&&(Bu|=t,4===Mu&&ms(e,Pu));var r=Hi();1===t?0!==(8&Au)&&0===(48&Au)?bs(e):(ys(e,n),0===Au&&(Wu(),Qi())):(0===(4&Au)||98!==r&&99!==r||(null===is?is=new Set([e]):is.add(e)),ys(e,n)),Hu=e}function vs(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function ys(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,u=e.pendingLanes;0<u;){var s=31-Ht(u),l=1<<s,c=a[s];if(-1===c){if(0===(l&r)||0!==(l&i)){c=t,Ft(l);var f=Rt;a[s]=10<=f?c+250:6<=f?c+5e3:-1}}else c<=t&&(e.expiredLanes|=l);u&=~l}if(r=Mt(e,e===Du?Pu:0),t=Rt,0===r)null!==n&&(n!==Fi&&ji(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Fi&&ji(n)}15===t?(n=bs.bind(null,e),null===Vi?(Vi=[n],Ui=_i(Ai,$i)):Vi.push(n),n=Fi):14===t?n=Wi(99,bs.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(o(358,e))}}(t),n=Wi(n,gs.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function gs(e){if(us=-1,ls=ss=0,0!==(48&Au))throw Error(o(327));var t=e.callbackNode;if(Ps()&&e.callbackNode!==t)return null;var n=Mt(e,e===Du?Pu:0);if(0===n)return null;var r=n,i=Au;Au|=16;var a=_s();for(Du===e&&Pu===r||(Wu(),Ss(e,r));;)try{xs();break}catch(s){Ts(e,s)}if(na(),Cu.current=a,Au=i,null!==Lu?r=0:(Du=null,Pu=0,r=Mu),0!==(Uu&Bu))Ss(e,0);else if(0!==r){if(2===r&&(Au|=64,e.hydrate&&(e.hydrate=!1,Wr(e.containerInfo)),0!==(n=Vt(e))&&(r=js(e,n))),1===r)throw t=Vu,Ss(e,0),ms(e,n),ys(e,qi()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(o(345));case 2:case 5:As(e);break;case 3:if(ms(e,n),(62914560&n)===n&&10<(r=Ku+500-qi())){if(0!==Mt(e,0))break;if(((i=e.suspendedLanes)&n)!==n){hs(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Kr(As.bind(null,e),r);break}As(e);break;case 4:if(ms(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var u=31-Ht(n);a=1<<u,(u=r[u])>i&&(i=u),n&=~a}if(n=i,10<(n=(120>(n=qi()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*xu(n/1960))-n)){e.timeoutHandle=Kr(As.bind(null,e),n);break}As(e);break;default:throw Error(o(329))}}return ys(e,qi()),e.callbackNode===t?gs.bind(null,e):null}function ms(e,t){for(t&=~qu,t&=~Bu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),r=1<<n;e[n]=-1,t&=~r}}function bs(e){if(0!==(48&Au))throw Error(o(327));if(Ps(),e===Du&&0!==(e.expiredLanes&Pu)){var t=Pu,n=js(e,t);0!==(Uu&Bu)&&(n=js(e,t=Mt(e,t)))}else n=js(e,t=Mt(e,0));if(0!==e.tag&&2===n&&(Au|=64,e.hydrate&&(e.hydrate=!1,Wr(e.containerInfo)),0!==(t=Vt(e))&&(n=js(e,t))),1===n)throw n=Vu,Ss(e,0),ms(e,t),ys(e,qi()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,As(e),ys(e,qi()),null}function ks(e,t){var n=Au;Au|=1;try{return e(t)}finally{0===(Au=n)&&(Wu(),Qi())}}function ws(e,t){var n=Au;Au&=-2,Au|=8;try{return e(t)}finally{0===(Au=n)&&(Wu(),Qi())}}function Es(e,t){fi(Fu,Ru),Ru|=t,Uu|=t}function Os(){Ru=Fu.current,ci(Fu)}function Ss(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Gr(n)),null!==Lu)for(n=Lu.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&mi();break;case 3:La(),ci(pi),ci(di),$a();break;case 5:Ra(r);break;case 4:La();break;case 13:case 19:ci(Fa);break;case 10:ra(r);break;case 23:case 24:Os()}n=n.return}Du=e,Lu=Gs(e.current,null),Pu=Ru=Uu=t,Mu=0,Vu=null,qu=Bu=zu=0}function Ts(e,t){for(;;){var n=Lu;try{if(na(),Ya.current=Ao,no){for(var r=Za.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}no=!1}if(Ja=0,to=eo=Za=null,ro=!1,Nu.current=null,null===n||null===n.return){Mu=1,Vu=t,Lu=null;break}e:{var a=e,o=n.return,u=n,s=t;if(t=Pu,u.flags|=2048,u.firstEffect=u.lastEffect=null,null!==s&&"object"===typeof s&&"function"===typeof s.then){var l=s;if(0===(2&u.mode)){var c=u.alternate;c?(u.updateQueue=c.updateQueue,u.memoizedState=c.memoizedState,u.lanes=c.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=0!==(1&Fa.current),h=o;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 y=h.updateQueue;if(null===y){var g=new Set;g.add(l),h.updateQueue=g}else y.add(l);if(0===(2&h.mode)){if(h.flags|=64,u.flags|=16384,u.flags&=-2981,1===u.tag)if(null===u.alternate)u.tag=17;else{var m=ca(-1,1);m.tag=2,fa(u,m)}u.lanes|=1;break e}s=void 0,u=t;var b=a.pingCache;if(null===b?(b=a.pingCache=new fu,s=new Set,b.set(l,s)):void 0===(s=b.get(l))&&(s=new Set,b.set(l,s)),!s.has(u)){s.add(u);var k=zs.bind(null,a,l,u);l.then(k,k)}h.flags|=4096,h.lanes=t;break e}h=h.return}while(null!==h);s=Error((W(u.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!==Mu&&(Mu=2),s=lu(s,u),h=o;do{switch(h.tag){case 3:a=s,h.flags|=4096,t&=-t,h.lanes|=t,ha(h,hu(0,a,t));break e;case 1:a=s;var w=h.type,E=h.stateNode;if(0===(64&h.flags)&&("function"===typeof w.getDerivedStateFromError||null!==E&&"function"===typeof E.componentDidCatch&&(null===Ju||!Ju.has(E)))){h.flags|=4096,t&=-t,h.lanes|=t,ha(h,du(h,a,t));break e}}h=h.return}while(null!==h)}Ns(n)}catch(O){t=O,Lu===n&&null!==n&&(Lu=n=n.return);continue}break}}function _s(){var e=Cu.current;return Cu.current=Ao,null===e?Ao:e}function js(e,t){var n=Au;Au|=16;var r=_s();for(Du===e&&Pu===t||Ss(e,t);;)try{Is();break}catch(i){Ts(e,i)}if(na(),Au=n,Cu.current=r,null!==Lu)throw Error(o(261));return Du=null,Pu=0,Mu}function Is(){for(;null!==Lu;)Cs(Lu)}function xs(){for(;null!==Lu&&!Ii();)Cs(Lu)}function Cs(e){var t=Qu(e.alternate,e,Ru);e.memoizedProps=e.pendingProps,null===t?Ns(e):Lu=t,Nu.current=null}function Ns(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=uu(n,t,Ru)))return void(Lu=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Ru)||0===(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=su(t)))return n.flags&=2047,void(Lu=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Lu=t);Lu=t=e}while(null!==t);0===Mu&&(Mu=5)}function As(e){var t=Hi();return Gi(99,Ds.bind(null,e,t)),null}function Ds(e,t){do{Ps()}while(null!==es);if(0!==(48&Au))throw Error(o(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,a=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var u=e.eventTimes,s=e.expirationTimes;0<a;){var l=31-Ht(a),c=1<<l;i[l]=0,u[l]=-1,s[l]=-1,a&=~c}if(null!==is&&0===(24&r)&&is.has(e)&&is.delete(e),e===Du&&(Lu=Du=null,Pu=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=Au,Au|=32,Nu.current=null,zr=$t,gr(u=yr())){if("selectionStart"in u)s={start:u.selectionStart,end:u.selectionEnd};else e:if(s=(s=u.ownerDocument)&&s.defaultView||window,(c=s.getSelection&&s.getSelection())&&0!==c.rangeCount){s=c.anchorNode,a=c.anchorOffset,l=c.focusNode,c=c.focusOffset;try{s.nodeType,l.nodeType}catch(_){s=null;break e}var f=0,h=-1,d=-1,p=0,v=0,y=u,g=null;t:for(;;){for(var m;y!==s||0!==a&&3!==y.nodeType||(h=f+a),y!==l||0!==c&&3!==y.nodeType||(d=f+c),3===y.nodeType&&(f+=y.nodeValue.length),null!==(m=y.firstChild);)g=y,y=m;for(;;){if(y===u)break t;if(g===s&&++p===a&&(h=f),g===l&&++v===c&&(d=f),null!==(m=y.nextSibling))break;g=(y=g).parentNode}y=m}s=-1===h||-1===d?null:{start:h,end:d}}else s=null;s=s||{start:0,end:0}}else s=null;Br={focusedElem:u,selectionRange:s},$t=!1,cs=null,fs=!1,$u=r;do{try{Ls()}catch(_){if(null===$u)throw Error(o(330));Us($u,_),$u=$u.nextEffect}}while(null!==$u);cs=null,$u=r;do{try{for(u=e;null!==$u;){var b=$u.flags;if(16&b&&me($u.stateNode,""),128&b){var k=$u.alternate;if(null!==k){var w=k.ref;null!==w&&("function"===typeof w?w(null):w.current=null)}}switch(1038&b){case 2:Eu($u),$u.flags&=-3;break;case 6:Eu($u),$u.flags&=-3,_u($u.alternate,$u);break;case 1024:$u.flags&=-1025;break;case 1028:$u.flags&=-1025,_u($u.alternate,$u);break;case 4:_u($u.alternate,$u);break;case 8:Tu(u,s=$u);var E=s.alternate;ku(s),null!==E&&ku(E)}$u=$u.nextEffect}}catch(_){if(null===$u)throw Error(o(330));Us($u,_),$u=$u.nextEffect}}while(null!==$u);if(w=Br,k=yr(),b=w.focusedElem,u=w.selectionRange,k!==b&&b&&b.ownerDocument&&vr(b.ownerDocument.documentElement,b)){null!==u&&gr(b)&&(k=u.start,void 0===(w=u.end)&&(w=k),"selectionStart"in b?(b.selectionStart=k,b.selectionEnd=Math.min(w,b.value.length)):(w=(k=b.ownerDocument||document)&&k.defaultView||window).getSelection&&(w=w.getSelection(),s=b.textContent.length,E=Math.min(u.start,s),u=void 0===u.end?E:Math.min(u.end,s),!w.extend&&E>u&&(s=u,u=E,E=s),s=pr(b,E),a=pr(b,u),s&&a&&(1!==w.rangeCount||w.anchorNode!==s.node||w.anchorOffset!==s.offset||w.focusNode!==a.node||w.focusOffset!==a.offset)&&((k=k.createRange()).setStart(s.node,s.offset),w.removeAllRanges(),E>u?(w.addRange(k),w.extend(a.node,a.offset)):(k.setEnd(a.node,a.offset),w.addRange(k))))),k=[];for(w=b;w=w.parentNode;)1===w.nodeType&&k.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b<k.length;b++)(w=k[b]).element.scrollLeft=w.left,w.element.scrollTop=w.top}$t=!!zr,Br=zr=null,e.current=n,$u=r;do{try{for(b=e;null!==$u;){var O=$u.flags;if(36&O&&gu(b,$u.alternate,$u),128&O){k=void 0;var S=$u.ref;if(null!==S){var T=$u.stateNode;$u.tag,k=T,"function"===typeof S?S(k):S.current=k}}$u=$u.nextEffect}}catch(_){if(null===$u)throw Error(o(330));Us($u,_),$u=$u.nextEffect}}while(null!==$u);$u=null,Mi(),Au=i}else e.current=n;if(Zu)Zu=!1,es=e,ts=t;else for($u=r;null!==$u;)t=$u.nextEffect,$u.nextEffect=null,8&$u.flags&&((O=$u).sibling=null,O.stateNode=null),$u=t;if(0===(r=e.pendingLanes)&&(Ju=null),1===r?e===os?as++:(as=0,os=e):as=0,n=n.stateNode,Si&&"function"===typeof Si.onCommitFiberRoot)try{Si.onCommitFiberRoot(Oi,n,void 0,64===(64&n.current.flags))}catch(_){}if(ys(e,qi()),Yu)throw Yu=!1,e=Xu,Xu=null,e;return 0!==(8&Au)||Qi(),null}function Ls(){for(;null!==$u;){var e=$u.alternate;fs||null===cs||(0!==(8&$u.flags)?et($u,cs)&&(fs=!0):13===$u.tag&&Iu(e,$u)&&et($u,cs)&&(fs=!0));var t=$u.flags;0!==(256&t)&&yu(e,$u),0===(512&t)||Zu||(Zu=!0,Wi(97,(function(){return Ps(),null}))),$u=$u.nextEffect}}function Ps(){if(90!==ts){var e=97<ts?97:ts;return ts=90,Gi(e,Ms)}return!1}function Rs(e,t){ns.push(t,e),Zu||(Zu=!0,Wi(97,(function(){return Ps(),null})))}function Fs(e,t){rs.push(t,e),Zu||(Zu=!0,Wi(97,(function(){return Ps(),null})))}function Ms(){if(null===es)return!1;var e=es;if(es=null,0!==(48&Au))throw Error(o(331));var t=Au;Au|=32;var n=rs;rs=[];for(var r=0;r<n.length;r+=2){var i=n[r],a=n[r+1],u=i.destroy;if(i.destroy=void 0,"function"===typeof u)try{u()}catch(l){if(null===a)throw Error(o(330));Us(a,l)}}for(n=ns,ns=[],r=0;r<n.length;r+=2){i=n[r],a=n[r+1];try{var s=i.create;i.destroy=s()}catch(l){if(null===a)throw Error(o(330));Us(a,l)}}for(s=e.current.firstEffect;null!==s;)e=s.nextEffect,s.nextEffect=null,8&s.flags&&(s.sibling=null,s.stateNode=null),s=e;return Au=t,Qi(),!0}function Vs(e,t,n){fa(e,t=hu(0,t=lu(n,t),1)),t=hs(),null!==(e=vs(e,1))&&(qt(e,1,t),ys(e,t))}function Us(e,t){if(3===e.tag)Vs(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Vs(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Ju||!Ju.has(r))){var i=du(n,e=lu(t,e),1);if(fa(n,i),i=hs(),null!==(n=vs(n,1)))qt(n,1,i),ys(n,i);else if("function"===typeof r.componentDidCatch&&(null===Ju||!Ju.has(r)))try{r.componentDidCatch(t,e)}catch(a){}break}}n=n.return}}function zs(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=hs(),e.pingedLanes|=e.suspendedLanes&n,Du===e&&(Pu&n)===n&&(4===Mu||3===Mu&&(62914560&Pu)===Pu&&500>qi()-Ku?Ss(e,0):qu|=n),ys(e,t)}function Bs(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===Hi()?1:2:(0===ss&&(ss=Uu),0===(t=zt(62914560&~ss))&&(t=4194304))),n=hs(),null!==(e=vs(e,t))&&(qt(e,t,n),ys(e,n))}function qs(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Hs(e,t,n,r){return new qs(e,t,n,r)}function Ks(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Gs(e,t){var n=e.alternate;return null===n?((n=Hs(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ws(e,t,n,r,i,a){var u=2;if(r=e,"function"===typeof e)Ks(e)&&(u=1);else if("string"===typeof e)u=5;else e:switch(e){case S:return Qs(n.children,i,a,t);case R:u=8,i|=16;break;case T:u=8,i|=1;break;case _:return(e=Hs(12,n,t,8|i)).elementType=_,e.type=_,e.lanes=a,e;case C:return(e=Hs(13,n,t,i)).type=C,e.elementType=C,e.lanes=a,e;case N:return(e=Hs(19,n,t,i)).elementType=N,e.lanes=a,e;case F:return $s(n,i,a,t);case M:return(e=Hs(24,n,t,i)).elementType=M,e.lanes=a,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case j:u=10;break e;case I:u=9;break e;case x:u=11;break e;case A:u=14;break e;case D:u=16,r=null;break e;case L:u=22;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Hs(u,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function Qs(e,t,n,r){return(e=Hs(7,e,r,t)).lanes=n,e}function $s(e,t,n,r){return(e=Hs(23,e,r,t)).elementType=F,e.lanes=n,e}function Ys(e,t,n){return(e=Hs(6,e,null,t)).lanes=n,e}function Xs(e,t,n){return(t=Hs(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Js(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Bt(0),this.expirationTimes=Bt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bt(0),this.mutableSourceEagerHydrationData=null}function Zs(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:O,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function el(e,t,n,r){var i=t.current,a=hs(),u=ds(i);e:if(n){t:{if(Ye(n=n._reactInternals)!==n||1!==n.tag)throw Error(o(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(gi(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(null!==s);throw Error(o(171))}if(1===n.tag){var l=n.type;if(gi(l)){n=ki(n,l,s);break e}}n=s}else n=hi;return null===t.context?t.context=n:t.pendingContext=n,(t=ca(a,u)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),fa(i,t),ps(i,u,a),u}function tl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function nl(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function rl(e,t){nl(e,t),(e=e.alternate)&&nl(e,t)}function il(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Js(e,t,null!=n&&!0===n.hydrate),t=Hs(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,sa(t),e[ei]=n.current,Ar(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var i=(t=r[e])._getVersion;i=i(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}function al(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ol(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a._internalRoot;if("function"===typeof i){var u=i;i=function(){var e=tl(o);u.call(e)}}el(t,o,e,i)}else{if(a=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new il(e,0,t?{hydrate:!0}:void 0)}(n,r),o=a._internalRoot,"function"===typeof i){var s=i;i=function(){var e=tl(o);s.call(e)}}ws((function(){el(t,o,e,i)}))}return tl(o)}function ul(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!al(t))throw Error(o(200));return Zs(e,t,null,n)}Qu=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||pi.current)Fo=!0;else{if(0===(n&r)){switch(Fo=!1,t.tag){case 3:Wo(t),Wa();break;case 5:Pa(t);break;case 1:gi(t.type)&&wi(t);break;case 4:Da(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;fi(Ji,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Jo(e,t,n):(fi(Fa,1&Fa.current),null!==(t=au(e,t,n))?t.sibling:null);fi(Fa,1&Fa.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return iu(e,t,n);t.flags|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),fi(Fa,Fa.current),r)break;return null;case 23:case 24:return t.lanes=0,Bo(e,t,n)}return au(e,t,n)}Fo=0!==(16384&e.flags)}else Fo=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=yi(t,di.current),aa(t,n),i=oo(null,t,r,e,i,n),t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,gi(r)){var a=!0;wi(t)}else a=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,sa(t);var u=r.getDerivedStateFromProps;"function"===typeof u&&ya(t,r,u,e),i.updater=ga,t.stateNode=i,i._reactInternals=t,wa(t,r,e,n),t=Go(null,t,r,!0,a,n)}else t.tag=0,Mo(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(a=i._init)(i._payload),t.type=i,a=t.tag=function(e){if("function"===typeof e)return Ks(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===x)return 11;if(e===A)return 14}return 2}(i),e=Xi(i,e),a){case 0:t=Ho(null,t,i,e,n);break e;case 1:t=Ko(null,t,i,e,n);break e;case 11:t=Vo(null,t,i,e,n);break e;case 14:t=Uo(null,t,i,Xi(i.type,e),r,n);break e}throw Error(o(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ho(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ko(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 3:if(Wo(t),r=t.updateQueue,null===e||null===r)throw Error(o(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,la(e,t),da(t,r,null,n),(r=t.memoizedState.element)===i)Wa(),t=au(e,t,n);else{if((a=(i=t.stateNode).hydrate)&&(Ua=Qr(t.stateNode.containerInfo.firstChild),Va=t,a=za=!0),a){if(null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)(a=e[i])._workInProgressVersionPrimary=e[i+1],Qa.push(a);for(n=ja(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Mo(e,t,r,n),Wa();t=t.child}return t;case 5:return Pa(t),null===e&&Ha(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,u=i.children,Hr(r,i)?u=null:null!==a&&Hr(r,a)&&(t.flags|=16),qo(e,t),Mo(e,t,u,n),t.child;case 6:return null===e&&Ha(t),null;case 13:return Jo(e,t,n);case 4:return Da(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=_a(t,null,r,n):Mo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Vo(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 7:return Mo(e,t,t.pendingProps,n),t.child;case 8:case 12:return Mo(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,u=t.memoizedProps,a=i.value;var s=t.type._context;if(fi(Ji,s._currentValue),s._currentValue=a,null!==u)if(s=u.value,0===(a=cr(s,a)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(s,a):1073741823))){if(u.children===i.children&&!pi.current){t=au(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var l=s.dependencies;if(null!==l){u=s.child;for(var c=l.firstContext;null!==c;){if(c.context===r&&0!==(c.observedBits&a)){1===s.tag&&((c=ca(-1,n&-n)).tag=2,fa(s,c)),s.lanes|=n,null!==(c=s.alternate)&&(c.lanes|=n),ia(s.return,n),l.lanes|=n;break}c=c.next}}else u=10===s.tag&&s.type===t.type?null:s.child;if(null!==u)u.return=s;else for(u=s;null!==u;){if(u===t){u=null;break}if(null!==(s=u.sibling)){s.return=u.return,u=s;break}u=u.return}s=u}Mo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(a=t.pendingProps).children,aa(t,n),r=r(i=oa(i,a.unstable_observedBits)),t.flags|=1,Mo(e,t,r,n),t.child;case 14:return a=Xi(i=t.type,t.pendingProps),Uo(e,t,i,a=Xi(i.type,a),r,n);case 15:return zo(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,gi(r)?(e=!0,wi(t)):e=!1,aa(t,n),ba(t,r,i),wa(t,r,i,n),Go(null,t,r,!0,e,n);case 19:return iu(e,t,n);case 23:case 24:return Bo(e,t,n)}throw Error(o(156,t.tag))},il.prototype.render=function(e){el(e,this._internalRoot,null,null)},il.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;el(null,e,null,(function(){t[ei]=null}))},tt=function(e){13===e.tag&&(ps(e,4,hs()),rl(e,4))},nt=function(e){13===e.tag&&(ps(e,67108864,hs()),rl(e,67108864))},rt=function(e){if(13===e.tag){var t=hs(),n=ds(e);ps(e,n,t),rl(e,n)}},it=function(e,t){return t()},je=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ai(r);if(!i)throw Error(o(90));X(r),ne(r,i)}}}break;case"textarea":le(e,n);break;case"select":null!=(t=n.value)&&oe(e,!!n.multiple,t,!1)}},De=ks,Le=function(e,t,n,r,i){var a=Au;Au|=4;try{return Gi(98,e.bind(null,t,n,r,i))}finally{0===(Au=a)&&(Wu(),Qi())}},Pe=function(){0===(49&Au)&&(function(){if(null!==is){var e=is;is=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,ys(e,qi())}))}Qi()}(),Ps())},Re=function(e,t){var n=Au;Au|=2;try{return e(t)}finally{0===(Au=n)&&(Wu(),Qi())}};var sl={Events:[ri,ii,ai,Ne,Ae,Ps,{current:!1}]},ll={findFiberByHostInstance:ni,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},cl={bundleType:ll.bundleType,version:ll.version,rendererPackageName:ll.rendererPackageName,rendererConfig:ll.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:ll.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var fl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fl.isDisabled&&fl.supportsFiber)try{Oi=fl.inject(cl),Si=fl}catch(ye){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sl,t.createPortal=ul,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(o(188));throw Error(o(268,Object.keys(e)))}return e=null===(e=Ze(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Au;if(0!==(48&n))return e(t);Au|=1;try{if(e)return Gi(99,e.bind(null,t))}finally{Au=n,Qi()}},t.hydrate=function(e,t,n){if(!al(t))throw Error(o(200));return ol(null,e,t,!0,n)},t.render=function(e,t,n){if(!al(t))throw Error(o(200));return ol(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!al(e))throw Error(o(40));return!!e._reactRootContainer&&(ws((function(){ol(null,null,e,!1,(function(){e._reactRootContainer=null,e[ei]=null}))})),!0)},t.unstable_batchedUpdates=ks,t.unstable_createPortal=function(e,t){return ul(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!al(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return ol(e,t,n,!1,r)},t.version="17.0.2"},function(e,t,n){"use strict";e.exports=n(35)},function(e,t,n){"use strict";var r,i,a,o;if("object"===typeof performance&&"function"===typeof performance.now){var u=performance;t.unstable_now=function(){return u.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var c=null,f=null,h=function e(){if(null!==c)try{var n=t.unstable_now();c(!0,n),c=null}catch(r){throw setTimeout(e,0),r}};r=function(e){null!==c?setTimeout(r,0,e):(c=e,setTimeout(h,0))},i=function(e,t){f=setTimeout(e,t)},a=function(){clearTimeout(f)},t.unstable_shouldYield=function(){return!1},o=t.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 y=!1,g=null,m=-1,b=5,k=0;t.unstable_shouldYield=function(){return t.unstable_now()>=k},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,E=w.port2;w.port1.onmessage=function(){if(null!==g){var e=t.unstable_now();k=e+b;try{g(!0,e)?E.postMessage(null):(y=!1,g=null)}catch(n){throw E.postMessage(null),n}}else y=!1},r=function(e){g=e,y||(y=!0,E.postMessage(null))},i=function(e,n){m=d((function(){e(t.unstable_now())}),n)},a=function(){p(m),m=-1}}function O(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<_(i,t)))break e;e[r]=t,e[n]=i,n=r}}function S(e){return void 0===(e=e[0])?null:e}function T(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var a=2*(r+1)-1,o=e[a],u=a+1,s=e[u];if(void 0!==o&&0>_(o,n))void 0!==s&&0>_(s,o)?(e[r]=s,e[u]=n,r=u):(e[r]=o,e[a]=n,r=a);else{if(!(void 0!==s&&0>_(s,n)))break e;e[r]=s,e[u]=n,r=u}}}return t}return null}function _(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var j=[],I=[],x=1,C=null,N=3,A=!1,D=!1,L=!1;function P(e){for(var t=S(I);null!==t;){if(null===t.callback)T(I);else{if(!(t.startTime<=e))break;T(I),t.sortIndex=t.expirationTime,O(j,t)}t=S(I)}}function R(e){if(L=!1,P(e),!D)if(null!==S(j))D=!0,r(F);else{var t=S(I);null!==t&&i(R,t.startTime-e)}}function F(e,n){D=!1,L&&(L=!1,a()),A=!0;var r=N;try{for(P(n),C=S(j);null!==C&&(!(C.expirationTime>n)||e&&!t.unstable_shouldYield());){var o=C.callback;if("function"===typeof o){C.callback=null,N=C.priorityLevel;var u=o(C.expirationTime<=n);n=t.unstable_now(),"function"===typeof u?C.callback=u:C===S(j)&&T(j),P(n)}else T(j);C=S(j)}if(null!==C)var s=!0;else{var l=S(I);null!==l&&i(R,l.startTime-n),s=!1}return s}finally{C=null,N=r,A=!1}}var M=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){D||A||(D=!0,r(F))},t.unstable_getCurrentPriorityLevel=function(){return N},t.unstable_getFirstCallbackNode=function(){return S(j)},t.unstable_next=function(e){switch(N){case 1:case 2:case 3:var t=3;break;default:t=N}var n=N;N=t;try{return e()}finally{N=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=M,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=N;N=e;try{return t()}finally{N=n}},t.unstable_scheduleCallback=function(e,n,o){var u=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?u+o:u:o=u,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:x++,callback:n,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>u?(e.sortIndex=o,O(I,e),null===S(j)&&e===S(I)&&(L?a():L=!0,i(R,o-u))):(e.sortIndex=s,O(j,e),D||A||(D=!0,r(F))),e},t.unstable_wrapCallback=function(e){var t=N;return function(){var n=N;N=t;try{return e.apply(this,arguments)}finally{N=n}}}},function(e,t,n){"use strict";n(28);var r=n(10),i=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var a=Symbol.for;i=a("react.element"),t.Fragment=a("react.fragment")}var o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,a={},l=null,c=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(c=t.ref),t)u.call(t,r)&&!s.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:i,type:e,key:l,ref:c,props:a,_owner:o.current}}t.jsx=l,t.jsxs=l},function(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(N){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var i=t&&t.prototype instanceof y?t:y,a=Object.create(i.prototype),o=new I(r||[]);return a._invoke=function(e,t,n){var r=f;return function(i,a){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw a;return C()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var u=T(o,n);if(u){if(u===v)continue;return u}}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 s=c(e,t,n);if("normal"===s.type){if(r=n.done?p:h,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=p,n.method="throw",n.arg=s.arg)}}}(e,n,o),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(N){return{type:"throw",arg:N}}}e.wrap=l;var f="suspendedStart",h="suspendedYield",d="executing",p="completed",v={};function y(){}function g(){}function m(){}var b={};s(b,a,(function(){return this}));var k=Object.getPrototypeOf,w=k&&k(k(x([])));w&&w!==n&&r.call(w,a)&&(b=w);var E=m.prototype=y.prototype=Object.create(b);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,a,o,u){var s=c(e[i],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"===typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,o,u)}),(function(e){n("throw",e,o,u)})):t.resolve(f).then((function(e){l.value=e,o(l)}),(function(e){return n("throw",e,o,u)}))}u(s.arg)}var i;this._invoke=function(e,r){function a(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(a,a):a()}}function T(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,T(e,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=c(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function x(e){if(e){var n=e[a];if(n)return n.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:C}}function C(){return{value:t,done:!0}}return g.prototype=m,s(E,"constructor",m),s(m,"constructor",g),g.displayName=s(m,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,u,"GeneratorFunction")),e.prototype=Object.create(E),e},e.awrap=function(e){return{__await:e}},O(S.prototype),s(S.prototype,o,(function(){return this})),e.AsyncIterator=S,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new S(l(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},O(E),s(E,u,"Generator"),s(E,a,(function(){return this})),s(E,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=x,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return u.type="throw",u.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],u=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){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 a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;j(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:x(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=r}catch(i){"object"===typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"===typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var s,l=[],c=!1,f=-1;function h(){c&&s&&(c=!1,s.length?l=s.concat(l):f=-1,l.length&&d())}function d(){if(!c){var e=u(h);c=!0;for(var t=l.length;t;){for(s=l,l=[];++f<t;)s&&s[f].run();f=-1,t=l.length}s=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function v(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||c||u(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(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}}]]);
|
|
//# sourceMappingURL=2.60c5fd81.chunk.js.map
|